mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-16 01:40:53 +08:00
3ac4097dc4
* style: button主题适配 (#5780) * feat: button增加font-weight (#5781) * feat: button增加font-weight * fix: button-fix * fix: button-fix Co-authored-by: hongyang03 <hongyang03@baidu.com> * style: font * feat: input输入框变量样式&切换图标方案 (#5847) * feat: input输入框变量样式&切换图标方案 * fix: 去掉多余代码 * fix: 去掉多余代码 Co-authored-by: hongyang03 <hongyang03@baidu.com> * style: input外观 * fix: 修复选择图标没选中 (#5858) * fix: 修复选择图标没选中 * fix: 代码格式 Co-authored-by: hongyang03 <hongyang03@baidu.com> * style: link组件 * style: form * inputNumber输入输入框 组件css变量 (#5874) * inputNumber输入输入框 组件css变量 * inputNumber组件 兼容变量 * inputNumber组件 css变量文件迁移 * inputNumber组件 删除变量 * 去除无用变量 Co-authored-by: xujiahao01 <xujiahao01@baidu.com> * style: form * style: form * InputNumber组件 变量修改 (#5879) * inputNumber输入输入框 组件css变量 * inputNumber组件 兼容变量 * inputNumber组件 css变量文件迁移 * inputNumber组件 删除变量 * 去除无用变量 * InputNumber组件 变量修改 Co-authored-by: xujiahao01 <xujiahao01@baidu.com> * style: form * style: input * inputNumber组件 加强版分别配置 (#5887) Co-authored-by: xujiahao01 <xujiahao01@baidu.com> * style: input-range * inputNumber组件 加强版图标 (#5888) * inputNumber组件 加强版分别配置 * inputNumber组件 加强版图标 * 修改图标变量 Co-authored-by: xujiahao01 <xujiahao01@baidu.com> * style: rating * checkbox组件变量 (#5902) * inputNumber组件 加强版分别配置 * inputNumber组件 加强版图标 * 修改图标变量 * checkbox组件变量 * 修改checkbox-size * 修改checkbox-size变量 * 优化 * 优化 Co-authored-by: xujiahao01 <xujiahao01@baidu.com> * checkbox边框 背景分别配置变量 (#5904) * inputNumber组件 加强版分别配置 * inputNumber组件 加强版图标 * 修改图标变量 * checkbox组件变量 * 修改checkbox-size * 修改checkbox-size变量 * 优化 * 优化 * checkbox边框 背景分别配置变量 Co-authored-by: xujiahao01 <xujiahao01@baidu.com> * listSelect组件变量 (#5917) * listSelect组件变量 * 优化 Co-authored-by: xujiahao01 <xujiahao01@baidu.com> * feat: radio&switch样式变量适配 (#5924) * feat: radio&switch样式变量适配 * fix:修复变量 * fix: 变量修复 * fix: 变量修复 Co-authored-by: hongyang03 <hongyang03@baidu.com> * style: 兼容style * feat: Collapse变量适配 (#5934) Co-authored-by: hongyang03 <hongyang03@baidu.com> * 组件自定义变量补充 (#5947) Co-authored-by: xujiahao01 <xujiahao01@baidu.com> * inputNumber加强版背景覆盖普通版 (#5951) * 组件自定义变量补充 * inputNumber加强版背景覆盖普通版 Co-authored-by: xujiahao01 <xujiahao01@baidu.com> * pref: 已修改组件变量迁移到components (#5952) * pref: 将变量冲properties迁移到components * pref: 已修改组件变量迁移到components Co-authored-by: hongyang03 <hongyang03@baidu.com> * pref: 优化变量位置 (#5953) Co-authored-by: hongyang03 <hongyang03@baidu.com> * theme: 面板\分割线\选项卡 * theme: 选项卡 * theme: link * feat: inputFile&inputImage组件变量 (#5982) Co-authored-by: hongyang03 <hongyang03@baidu.com> * fix: 图标选择修复和兼容处理 (#5984) Co-authored-by: hongyang03 <hongyang03@baidu.com> * theme: bugfix * theme: bugfix * fix: 去掉input的size&修复collapse样式 (#5985) Co-authored-by: hongyang03 <hongyang03@baidu.com> * theme: 样式调整 * theme: 样式调整 * pref: 折叠器样式变量修改 (#5991) Co-authored-by: hongyang03 <hongyang03@baidu.com> * theme: 样式调整 * theme: 样式调整 * theme: 样式调整 * theme: 样式调整 * styles: 主题变量bugfix * checkbox&number组件变量修复 (#6019) Co-authored-by: xujiahao01 <xujiahao01@baidu.com> * fix: 输入框图标样式修复 (#6021) Co-authored-by: hongyang03 <hongyang03@baidu.com> * 回滚注释 * 更新快照 * fix: 修复评分组件报错问题 Co-authored-by: HongYang <33488114+hy993658052@users.noreply.github.com> Co-authored-by: hongyang03 <hongyang03@baidu.com> Co-authored-by: 徐佳豪 <1440054388@qq.com> Co-authored-by: xujiahao01 <xujiahao01@baidu.com>
302 lines
7.0 KiB
SCSS
302 lines
7.0 KiB
SCSS
.#{$ns}InputRange {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: var(--InputRange-padding) 0;
|
|
width: 100%;
|
|
|
|
&-wrap {
|
|
position: relative;
|
|
flex: auto;
|
|
}
|
|
|
|
&-input {
|
|
width: var(--InputRange-input-width);
|
|
margin: var(--InputRange-input-marginTop)
|
|
var(--InputRange-input-marginRight) var(--InputRange-input-marginBottom)
|
|
var(--InputRange-input-marginLeft);
|
|
|
|
.#{$ns}Number {
|
|
overflow: hidden;
|
|
}
|
|
|
|
.#{$ns}Number-handler {
|
|
transition: 0.3s opacity;
|
|
color: var(--Number-handler-color);
|
|
|
|
&-up-inner,
|
|
&-down-inner {
|
|
cursor: pointer;
|
|
&:hover {
|
|
color: var(--Number-handler-onHover-color);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&-clear {
|
|
display: flex;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
|
|
svg {
|
|
height: var(--InputRange-clearIcon-height);
|
|
width: var(--InputRange-clearIcon-width);
|
|
fill: var(--InputRange-clearIcon-color);
|
|
}
|
|
&:hover svg {
|
|
fill: var(--InputRange-clearIcon-hoverColor);
|
|
}
|
|
}
|
|
|
|
// disabled
|
|
&.is-disabled {
|
|
.#{$ns}InputRange-track {
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.#{$ns}InputRange-track-active {
|
|
background-color: var(--InputRange-track-onActive-onDisabled-bg);
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.#{$ns}InputRange-handle-icon {
|
|
border-color: var(--InputRange-handle-onDisabled-border-color);
|
|
background-color: var(--InputRange-handle-onDisabled-bg);
|
|
cursor: not-allowed;
|
|
|
|
&:hover {
|
|
transform: none;
|
|
}
|
|
|
|
.icon-slider-handle {
|
|
g path {
|
|
fill: var(--InputRange-handle-icon-onDisabled-color);
|
|
}
|
|
}
|
|
}
|
|
|
|
.#{$ns}Number-handler {
|
|
cursor: not-allowed;
|
|
|
|
&-up-inner,
|
|
&-down-inner {
|
|
cursor: not-allowed;
|
|
&:hover {
|
|
color: var(--text--muted-color);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// hander
|
|
&-handle {
|
|
position: absolute;
|
|
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: var(--InputRange-handle-border-radius);
|
|
transition: var(--InputRange-handle-transition);
|
|
|
|
&:hover {
|
|
transform: var(--InputRange-handle-onActive-transform);
|
|
box-shadow: var(--InputRange-handle-onFocus-boxShadow);
|
|
}
|
|
|
|
&:active {
|
|
transform: var(--InputRange-handle-onActive-transform);
|
|
}
|
|
|
|
&:focus {
|
|
box-shadow: var(--InputRange-handle-onFocus-boxShadow);
|
|
}
|
|
}
|
|
|
|
&-drage {
|
|
transform: var(--InputRange-handle-onActive-transform);
|
|
box-shadow: var(--InputRange-handle-onFocus-boxShadow);
|
|
border-width: var(--InputRange-handle-onDrage-border-width);
|
|
}
|
|
|
|
.input-range--disabled & {
|
|
background: var(--InputRange-slider-onDisabled-bg);
|
|
border: var(--InputRange-slider-onDisabled-border);
|
|
box-shadow: none;
|
|
transform: none;
|
|
}
|
|
|
|
.icon-slider-handle {
|
|
width: var(--InputRange-handle-icon-width);
|
|
height: var(--InputRange-handle-icon-height);
|
|
top: 0;
|
|
|
|
g path {
|
|
fill: var(--InputRange-handle-icon-color);
|
|
}
|
|
}
|
|
}
|
|
|
|
// track
|
|
&-track {
|
|
background: var(--InputRange-track-bg);
|
|
border-radius: var(--InputRange-track-border-radius);
|
|
cursor: pointer;
|
|
display: block;
|
|
height: var(--InputRange-track-height);
|
|
position: relative;
|
|
transition: var(--InputRange-track-transition);
|
|
|
|
&.is-active {
|
|
background: var(--InputRange-track-onActive-bg);
|
|
transition: 0.3s all;
|
|
}
|
|
|
|
&-dot {
|
|
width: var(--InputRange-track-dot-width);
|
|
height: var(--InputRange-track-dot-height);
|
|
border-radius: 50%;
|
|
background-color: var(--InputRange-track-dot-bg);
|
|
position: absolute;
|
|
transform: translateX(-50%);
|
|
}
|
|
}
|
|
|
|
&-track--background {
|
|
left: 0.5rem;
|
|
margin-top: calc(-0.5 * var(--InputRange-track-height));
|
|
position: absolute;
|
|
right: 0.5rem;
|
|
top: 50%;
|
|
}
|
|
|
|
&-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);
|
|
font-weight: var(--InputRange-label-fontWeight);
|
|
line-height: var(--InputRange-label-lineHeight);
|
|
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: var(--InputRange-label-bg) transparent transparent
|
|
transparent;
|
|
}
|
|
}
|
|
|
|
&.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 var(--InputRange-label-bg)
|
|
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
|
|
var(--InputRange-label-bg);
|
|
}
|
|
}
|
|
|
|
&.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 var(--InputRange-label-bg) transparent
|
|
transparent;
|
|
}
|
|
}
|
|
}
|
|
|
|
// marks
|
|
&-marks {
|
|
position: relative;
|
|
top: 8px;
|
|
color: var(--InputRange-marks-color);
|
|
font-size: var(--InputRange-marks-fontSize);
|
|
font-weight: var(--InputRange-marks-fontWeight);
|
|
line-height: var(--InputRange-marks-lineHeight);
|
|
margin-top: var(--InputRange-marks-marginTop);
|
|
div {
|
|
position: absolute;
|
|
top: 0;
|
|
span {
|
|
position: absolute;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
}
|
|
}
|
|
}
|
|
}
|