2022-02-18 12:44:57 +08:00
|
|
|
.#{$ns}InputRange {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
padding: var(--InputRange-padding) 0;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
&-wrap {
|
|
|
|
position: relative;
|
|
|
|
flex: auto;
|
|
|
|
}
|
2019-05-19 11:45:40 +08:00
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
&-input {
|
|
|
|
width: 20 * 4px;
|
|
|
|
height: 8 * 4px;
|
|
|
|
margin: 0 2 * 4px;
|
2019-05-15 16:10:20 +08:00
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
.#{$ns}Number {
|
|
|
|
overflow: hidden;
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-05-15 16:10:20 +08:00
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
.#{$ns}Number-handler {
|
|
|
|
transition: 0.3s opacity;
|
|
|
|
color: var(--Number-handler-color);
|
2019-05-15 16:10:20 +08:00
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
&-up-inner,
|
|
|
|
&-down-inner {
|
|
|
|
cursor: pointer;
|
|
|
|
&:hover {
|
|
|
|
color: var(--Number-handler-onHover-color);
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
&-clear {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
cursor: pointer;
|
2019-05-15 16:10:20 +08:00
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
svg {
|
|
|
|
height: px2rem(12px);
|
|
|
|
width: px2rem(12px);
|
|
|
|
fill: #999;
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
2022-02-18 12:44:57 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
// disabled
|
|
|
|
&.is-disabled {
|
|
|
|
.#{$ns}InputRange-track {
|
|
|
|
cursor: not-allowed;
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
.#{$ns}InputRange-track-active {
|
|
|
|
background-color: var(--InputRange-track-onActive-onDisabled-bg);
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
.#{$ns}InputRange-handle-icon {
|
|
|
|
border-color: var(--InputRange-handle-onDisabled-border-color);
|
|
|
|
cursor: not-allowed;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
transform: none;
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
.#{$ns}Number-handler {
|
|
|
|
cursor: not-allowed;
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
&-up-inner,
|
|
|
|
&-down-inner {
|
|
|
|
cursor: not-allowed;
|
|
|
|
&:hover {
|
|
|
|
color: var(--text--muted-color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// hander
|
|
|
|
&-handle {
|
2019-12-06 09:58:08 +08:00
|
|
|
position: absolute;
|
2022-02-18 12:44:57 +08:00
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
margin: auto 0 auto calc(var(--InputRange-handle-width) / -2);
|
|
|
|
width: var(--InputRange-handle-width);
|
|
|
|
height: var(--InputRange-handle-height);
|
|
|
|
|
|
|
|
&-icon,
|
|
|
|
&-drage {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
appearance: none;
|
|
|
|
background-color: var(--InputRange-handle-bg);
|
|
|
|
border: var(--InputRange-handle-border);
|
|
|
|
cursor: pointer;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
outline: none;
|
|
|
|
border-radius: 50%;
|
|
|
|
transition: var(--InputRange-handle-transition);
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
transform: var(--InputRange-handle-onActive-transform);
|
|
|
|
box-shadow: var(--InputRange-handle-onFocus-boxShadow);
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
&:active {
|
|
|
|
transform: var(--InputRange-handle-onActive-transform);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
box-shadow: var(--InputRange-handle-onFocus-boxShadow);
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
&-drage {
|
|
|
|
transform: var(--InputRange-handle-onActive-transform);
|
|
|
|
box-shadow: var(--InputRange-handle-onFocus-boxShadow);
|
|
|
|
border-width: var(--InputRange-handle-onDrage-border-width);
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
.input-range--disabled & {
|
2020-12-21 10:08:40 +08:00
|
|
|
background: var(--InputRange-slider-onDisabled-bg);
|
|
|
|
border: var(--InputRange-slider-onDisabled-border);
|
2019-12-06 09:58:08 +08:00
|
|
|
box-shadow: none;
|
|
|
|
transform: none;
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
.icon-slider-handle {
|
|
|
|
width: var(--InputRange-handle-icon-width);
|
|
|
|
height: var(--InputRange-handle-icon-height);
|
|
|
|
top: 0;
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// track
|
|
|
|
&-track {
|
2020-12-21 10:08:40 +08:00
|
|
|
background: var(--InputRange-track-bg);
|
2022-02-18 12:44:57 +08:00
|
|
|
border-radius: var(--InputRange-track-border-radius);
|
2019-12-06 09:58:08 +08:00
|
|
|
cursor: pointer;
|
|
|
|
display: block;
|
2020-12-21 10:08:40 +08:00
|
|
|
height: var(--InputRange-track-height);
|
2019-12-06 09:58:08 +08:00
|
|
|
position: relative;
|
2020-12-21 10:08:40 +08:00
|
|
|
transition: var(--InputRange-track-transition);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&.is-active {
|
2020-12-21 10:08:40 +08:00
|
|
|
background: var(--InputRange-track-onActive-bg);
|
2022-02-18 12:44:57 +08:00
|
|
|
transition: 0.3s all;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-dot {
|
|
|
|
width: var(--InputRange-track-dot-height);
|
|
|
|
height: var(--InputRange-track-dot-height);
|
|
|
|
border-radius: 50%;
|
|
|
|
background-color: var(--InputRange-track-dot-bg);
|
|
|
|
position: absolute;
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-track--background {
|
|
|
|
left: 0.5rem;
|
2020-12-21 10:08:40 +08:00
|
|
|
margin-top: calc(-0.5 * var(--InputRange-track-height));
|
2019-12-06 09:58:08 +08:00
|
|
|
position: absolute;
|
|
|
|
right: 0.5rem;
|
|
|
|
top: 50%;
|
2022-02-18 12:44:57 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
&-track-active {
|
|
|
|
background: var(--InputRange-track-onActive-bg);
|
|
|
|
border-radius: var(--InputRange-track-border-radius);
|
|
|
|
position: absolute;
|
|
|
|
height: 100%;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// label
|
|
|
|
&-label {
|
|
|
|
position: absolute;
|
|
|
|
padding: var(--InputRange-label-padding);
|
|
|
|
background-color: var(--InputRange-label-bg);
|
|
|
|
color: var(--InputRange-label-color);
|
|
|
|
font-size: var(--InputRange-label-font-size);
|
|
|
|
border-radius: var(--InputRange-label-border-radius);
|
|
|
|
visibility: hidden;
|
|
|
|
|
|
|
|
&-visible {
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.pos-top {
|
|
|
|
left: 50%;
|
|
|
|
bottom: var(--InputRange-label-position-bottom);
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
left: 50%;
|
|
|
|
transform: translateX(-50%);
|
|
|
|
bottom: -4px;
|
|
|
|
border-width: 4px 4px 0 4px;
|
|
|
|
border-style: solid;
|
|
|
|
border-color: #000 transparent transparent transparent;
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
&.pos-bottom {
|
|
|
|
top: var(--InputRange-label-position-bottom);
|
|
|
|
left: 50%;
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
left: 50%;
|
|
|
|
transform: translateX(-50%);
|
|
|
|
top: -4px;
|
|
|
|
border-width: 0 4px 4px 4px;
|
|
|
|
border-style: solid;
|
|
|
|
border-color: transparent transparent #000 transparent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.pos-left {
|
|
|
|
top: 50%;
|
|
|
|
transform: translateY(-50%) translateX(-100%) translateX(-12px);
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
transform: translateY(-50%);
|
|
|
|
right: -4px;
|
|
|
|
border-width: 4px 0 4px 4px;
|
|
|
|
border-style: solid;
|
|
|
|
border-color: transparent transparent transparent #000;
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
&.pos-right {
|
|
|
|
top: 50%;
|
|
|
|
transform: translateY(-50%) translateX(26px);
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
transform: translateY(-50%);
|
|
|
|
left: -4px;
|
|
|
|
border-width: 4px 4px 4px 0;
|
|
|
|
border-style: solid;
|
|
|
|
border-color: transparent #000 transparent transparent;
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
|
2022-02-18 12:44:57 +08:00
|
|
|
// marks
|
|
|
|
&-marks {
|
|
|
|
position: relative;
|
|
|
|
top: 8px;
|
|
|
|
div {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
span {
|
|
|
|
position: absolute;
|
|
|
|
left: 50%;
|
|
|
|
transform: translateX(-50%);
|
|
|
|
}
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|