bin-ui
Version:
基于 vue2.6 / vue-cli3 的 UI 组件库
293 lines (286 loc) • 5.94 kB
text/stylus
.bin-date-picker {
display: inline-block;
line-height: normal;
width: 100%;
font-size: $base-font-size;
.bin-input {
padding 0 28px 0 8px;
}
.bin-input-suffix .icon-ios-close-circle {
cursor: pointer;
}
&-rel {
position: relative;
}
.bin-select-dropdown {
width: auto;
padding: 0;
overflow: visible;
max-height: none;
}
&-header {
height: 32px;
line-height: 32px;
text-align: center;
border-bottom: $border-base;
&-label {
cursor: pointer;
transition: color $animation-duration-base ease-in-out;
&:hover {
color: $color-primary;
}
}
}
&-prev-btn {
float: left;
&-arrow-double {
margin-left: 10px;
i:after {
content: "\e7f3";
margin-left: -8px;
}
}
}
&-next-btn {
float: right;
&-arrow-double {
margin-right: 10px;
i:after {
content: "\e7fd";
margin-left: -8px;
}
}
}
&-cells {
width: 196px;
margin: 10px;
white-space: normal;
span {
display: inline-block;
width: 24px;
height: 24px;
em {
display: inline-block;
width: 24px;
height: 24px;
line-height: 24px;
margin: 2px;
font-style: normal;
border-radius: $border-base-radius;
text-align: center;
transition: all $animation-duration-base ease-in-out;
}
}
&-header span {
line-height: 24px;
text-align: center;
margin: 2px;
color: $btn-disable-color;
}
&-cell:hover {
em {
background: $color-primary-light5;
}
}
&-focused {
em {
box-shadow: 0 0 0 1px $color-primary inset;
}
}
&-cell {
span& {
width: 28px;
height: 28px;
cursor: pointer;
}
&-prev-month, &-next-month {
em {
color: $btn-disable-color;
}
&:hover {
em {
background: transparent;
}
}
}
span&-week-label, span&-week-label:hover, span&-disabled, span&-disabled:hover {
cursor: not-allowed;
color: $btn-disable-color;
em {
color: inherit;
background: inherit;
}
}
span&-disabled, span&-disabled:hover {
background: $color-select-hover;
}
&-today {
em {
position: relative;
box-shadow: 0 0 0 1px $color-primary inset;
}
}
&-range {
position: relative;
em {
position: relative;
z-index: 1;
}
&:before {
content: '';
display: block;
background: $color-primary-light5;
border-radius: 0;
border: 0;
position: absolute;
top: 2px;
bottom: 2px;
left: 0;
right: 0;
}
}
&-selected, &-selected:hover {
em {
background: $color-primary;
color: #fff;
}
}
span&-disabled&-selected {
em {
background: $btn-disable-color;
color: $color-select-hover;
}
}
}
}
&-cells-show-week-numbers {
width: 226px;
}
&-cells-year, &-cells-month {
margin-top: 14px;
span {
width: 40px;
height: 28px;
line-height: 28px;
margin: 10px 12px;
border-radius: $border-base-radius;
em {
width: 40px;
height: 28px;
line-height: 28px;
margin: 0;
}
}
.bin-date-picker-cells-cell-focused {
background-color: $color-primary-light1
}
}
&-with-range {
.bin-picker-panel {
&-body {
min-width: (196px + 20) * 2;
}
&-content {
float: left;
}
}
.bin-picker-cells-show-week-numbers {
min-width: (226px + 20) * 2;
}
} \
&-with-week-numbers {
.bin-picker-panel {
&-body-date {
min-width: (226px + 20) * 2;
}
}
}
&-transfer {
z-index: 1060;
max-height: none;
width: auto;
}
&-focused input {
border-color: tint($color-primary, 20%);
outline: 0;
box-shadow: 0 0 0 2px $color-primary-light5
}
}
.bin-picker {
font-size: $base-font-size;
&-panel {
&-icon-btn {
display: inline-block;
width: 20px;
height: 24px;
line-height: 26px;
margin-top: 2px;
text-align: center;
cursor: pointer;
color: $btn-disable-color;
transition: color $animation-duration-base ease-in-out;
&:hover {
color: $color-primary;
}
i {
font-size: 14px;
}
}
&-body-wrapper&-with-sidebar {
padding-left: 92px;
}
&-sidebar {
width: 92px;
float: left;
margin-left: -92px;
position: absolute;
top: 0;
bottom: 0;
background: #f8f8f9;
border-right: $border-base;
border-radius: $border-base-radius 0 0 $border-base-radius;
overflow: auto;
}
&-shortcut {
padding: 6px 8px;
transition: all $animation-duration-base ease-in-out;
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: $color-text-default;
&:hover {
background: $color-primary-light5;
}
}
&-body {
float: left;
}
}
&-confirm {
border-top: $border-base;
text-align: right;
padding: 8px;
clear: both;
& > span {
color: $color-primary;
cursor: pointer;
user-select: none;
float: left;
padding: 2px 0;
transition: all $animation-duration-base ease-in-out;
&:hover {
color: tint($color-primary, 20%);
}
&:active {
color: shade($color-primary, 5%);
}
}
&-time {
float: left;
}
.bin-button + .bin-button {
margin-left: 4px;
}
}
}