2019-07-05 19:57:05 +08:00
|
|
|
@import './mixins/mixins.scss';
|
2020-02-11 14:44:29 +08:00
|
|
|
|
2019-10-17 22:16:30 +08:00
|
|
|
@include themes-mixin {
|
2020-03-04 18:24:02 +08:00
|
|
|
$calendar-width: 288px;
|
2019-10-17 22:16:30 +08:00
|
|
|
@include once {
|
|
|
|
@include b(date-picker) {
|
|
|
|
position: relative;
|
2019-12-27 22:41:24 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(date-picker) {
|
|
|
|
@include m(invalid) {
|
2019-12-30 19:37:55 +08:00
|
|
|
input {
|
|
|
|
text-decoration: line-through;
|
|
|
|
text-decoration-color: $--date-picker-text-decoration-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include m(start-invalid) {
|
|
|
|
input:nth-of-type(1) {
|
|
|
|
text-decoration: line-through;
|
|
|
|
text-decoration-color: $--date-picker-text-decoration-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include m(end-invalid) {
|
|
|
|
input:nth-of-type(2) {
|
|
|
|
text-decoration: line-through;
|
|
|
|
text-decoration-color: $--date-picker-text-decoration-color;
|
2019-12-16 18:21:29 +08:00
|
|
|
}
|
2019-12-27 22:41:24 +08:00
|
|
|
}
|
|
|
|
}
|
2019-12-30 19:37:55 +08:00
|
|
|
@include b(date-panel) {
|
2019-10-17 22:16:30 +08:00
|
|
|
@include once {
|
2019-10-30 16:22:17 +08:00
|
|
|
outline: none;
|
2019-12-30 19:37:55 +08:00
|
|
|
@include fade-in-scale-up-transition(date-panel);
|
2020-02-28 20:31:06 +08:00
|
|
|
transform: $--n-transform-debounce-scale;
|
2019-10-17 22:16:30 +08:00
|
|
|
margin-top: 4px;
|
|
|
|
margin-bottom: 4px;
|
2020-03-04 18:24:02 +08:00
|
|
|
width: 288px;
|
2020-02-28 22:57:10 +08:00
|
|
|
border-radius: $--n-date-picker-border-radius;
|
2019-10-19 20:26:30 +08:00
|
|
|
@include b(time-picker) {
|
|
|
|
z-index: 1;
|
|
|
|
}
|
2019-12-30 19:37:55 +08:00
|
|
|
@include b(date-panel-calendar) {
|
2020-03-04 18:24:02 +08:00
|
|
|
width: $calendar-width;
|
2019-07-25 15:18:42 +08:00
|
|
|
}
|
2019-10-17 22:16:30 +08:00
|
|
|
}
|
|
|
|
background: $--date-picker-background-color;
|
|
|
|
box-shadow: $--date-picker-box-shadow;
|
|
|
|
color: $--date-picker-text-color;
|
|
|
|
@include m(datetimerange, daterange) {
|
|
|
|
@include once {
|
2020-03-04 18:24:02 +08:00
|
|
|
width: $calendar-width * 2 + 1;
|
2019-10-17 22:16:30 +08:00
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
@include m(daterange) {
|
|
|
|
@include e(vertical-divider) {
|
|
|
|
height: 100%;
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
}
|
2019-07-25 19:53:31 +08:00
|
|
|
}
|
2019-12-30 19:37:55 +08:00
|
|
|
@include b(date-panel-input-wrapper) {
|
2019-10-17 22:16:30 +08:00
|
|
|
@include once {
|
2020-03-04 18:24:02 +08:00
|
|
|
width: 100%;
|
2019-10-17 22:16:30 +08:00
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
@include e(arrow) {
|
|
|
|
@include once {
|
2020-03-04 18:24:02 +08:00
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
margin: 0 8px;
|
2019-10-17 22:16:30 +08:00
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
@include b(base-icon) {
|
|
|
|
@include once {
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
}
|
2019-12-30 19:37:55 +08:00
|
|
|
fill: $--date-picker-icon-color;
|
2019-10-17 22:16:30 +08:00
|
|
|
}
|
|
|
|
}
|
2019-07-25 19:53:31 +08:00
|
|
|
}
|
2019-10-17 22:16:30 +08:00
|
|
|
@include e(vertical-divider) {
|
|
|
|
@include once {
|
|
|
|
width: 1px;
|
2020-03-04 18:24:02 +08:00
|
|
|
height: calc(100% - 64px);
|
|
|
|
margin-top: 64px;
|
2019-10-17 22:16:30 +08:00
|
|
|
}
|
|
|
|
background: $--date-picker-divider-color;
|
2019-07-25 19:53:31 +08:00
|
|
|
}
|
2019-07-05 19:57:05 +08:00
|
|
|
}
|
2019-12-30 19:37:55 +08:00
|
|
|
@include b(date-panel-input-wrapper) {
|
2019-10-17 22:16:30 +08:00
|
|
|
@include once {
|
2020-03-04 19:25:07 +08:00
|
|
|
padding: 8px 14px;
|
2019-10-17 22:16:30 +08:00
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
@include b(input) {
|
2020-03-04 18:24:02 +08:00
|
|
|
margin-right: 10px;
|
|
|
|
flex: 1;
|
2019-10-17 22:16:30 +08:00
|
|
|
}
|
2019-10-17 23:16:38 +08:00
|
|
|
@include b(time-picker) {
|
2020-03-04 18:24:02 +08:00
|
|
|
flex: 1;
|
2019-10-17 23:16:38 +08:00
|
|
|
}
|
2019-12-27 22:41:24 +08:00
|
|
|
}
|
2019-12-30 19:37:55 +08:00
|
|
|
@include b(date-panel-date-input) {
|
|
|
|
@include m(invalid) {
|
|
|
|
input {
|
2019-12-27 22:41:24 +08:00
|
|
|
text-decoration: line-through;
|
|
|
|
text-decoration-color: $--date-picker-text-decoration-color;
|
2019-12-16 18:21:29 +08:00
|
|
|
}
|
|
|
|
}
|
2019-07-25 15:18:42 +08:00
|
|
|
}
|
2019-10-17 22:16:30 +08:00
|
|
|
border-bottom: 1px solid $--date-picker-divider-color;
|
2019-07-05 19:57:05 +08:00
|
|
|
}
|
2019-12-30 19:37:55 +08:00
|
|
|
@include b(date-panel-month) {
|
2019-10-17 22:16:30 +08:00
|
|
|
@include once {
|
2019-07-26 17:15:59 +08:00
|
|
|
display: flex;
|
2020-03-04 18:24:02 +08:00
|
|
|
box-sizing: border-box;
|
|
|
|
height: 30px;
|
2019-10-17 22:16:30 +08:00
|
|
|
align-items: center;
|
2020-03-04 18:24:02 +08:00
|
|
|
padding-top: 8px;
|
|
|
|
padding-left: 14px;
|
|
|
|
padding-right: 14px;
|
2019-10-17 22:16:30 +08:00
|
|
|
@include e(prev, next, fast-prev, fast-next) {
|
|
|
|
cursor: pointer;
|
|
|
|
width: 14px;
|
|
|
|
height: 14px;
|
|
|
|
}
|
|
|
|
@include e(fast-prev, next) {
|
|
|
|
margin-right: 10px;
|
|
|
|
}
|
2019-07-26 17:15:59 +08:00
|
|
|
}
|
2019-10-17 22:16:30 +08:00
|
|
|
@include e(prev, next, fast-prev, fast-next) {
|
2019-12-30 19:37:55 +08:00
|
|
|
fill: $--date-picker-icon-color;
|
2019-07-26 14:09:59 +08:00
|
|
|
}
|
2019-10-17 22:16:30 +08:00
|
|
|
@include e(month-year) {
|
2019-10-17 23:16:38 +08:00
|
|
|
@include once {
|
|
|
|
font-size: 14px;
|
2020-02-27 23:02:58 +08:00
|
|
|
font-weight: $--n-strong-weight;
|
2019-10-17 23:16:38 +08:00
|
|
|
line-height: 17px;
|
|
|
|
flex-grow: 1;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
color: $--date-picker-month-text-color;
|
2019-07-26 14:09:59 +08:00
|
|
|
}
|
|
|
|
}
|
2019-12-30 19:37:55 +08:00
|
|
|
@include b(date-panel-weekdays) {
|
2019-10-17 23:16:38 +08:00
|
|
|
@include once {
|
2020-03-04 18:24:02 +08:00
|
|
|
padding: 9px 18px 10px 18px;
|
2019-10-17 23:16:38 +08:00
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
2019-10-17 22:16:30 +08:00
|
|
|
@include e(day) {
|
2019-10-17 23:16:38 +08:00
|
|
|
@include once {
|
|
|
|
line-height: 15px;
|
2020-03-04 18:24:02 +08:00
|
|
|
width: 24px;
|
2019-10-17 23:16:38 +08:00
|
|
|
text-align: center;
|
|
|
|
font-size: 12px;
|
|
|
|
}
|
|
|
|
color: $--date-picker-text-color;
|
2019-07-05 19:57:05 +08:00
|
|
|
}
|
|
|
|
}
|
2019-12-30 19:37:55 +08:00
|
|
|
@include b(date-panel-dates) {
|
2019-10-17 23:16:38 +08:00
|
|
|
@include once {
|
2020-03-04 18:24:02 +08:00
|
|
|
padding: 2px 11px 3px 11px;
|
2019-10-17 23:16:38 +08:00
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
}
|
2019-12-30 19:37:55 +08:00
|
|
|
@include b(date-panel-date) {
|
2019-10-17 23:16:38 +08:00
|
|
|
@include once {
|
|
|
|
position: relative;
|
|
|
|
width: 24px;
|
|
|
|
height: 24px;
|
|
|
|
line-height: 24px;
|
|
|
|
text-align: center;
|
2020-03-04 18:24:02 +08:00
|
|
|
font-size: 13px;
|
|
|
|
margin: 4px 7px;
|
2019-10-17 23:16:38 +08:00
|
|
|
border-radius: 3px;
|
|
|
|
z-index: 0;
|
|
|
|
cursor: pointer;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: background-color .2s $--n-ease-in-out-cubic-bezier, color .2s $--n-ease-in-out-cubic-bezier;
|
2019-12-30 19:37:55 +08:00
|
|
|
@include m(transition-disabled) {
|
2019-10-17 23:16:38 +08:00
|
|
|
transition: none!important;
|
|
|
|
}
|
2019-07-05 19:57:05 +08:00
|
|
|
}
|
2019-12-30 19:37:55 +08:00
|
|
|
@include not-m(disabled) {
|
|
|
|
@include not-m(selected) {
|
|
|
|
&:hover {
|
|
|
|
background-color: map-get($--date-picker-item-background-color, 'hover');
|
|
|
|
}
|
|
|
|
}
|
2019-10-30 16:22:17 +08:00
|
|
|
}
|
2019-10-17 22:16:30 +08:00
|
|
|
@include m(current) {
|
|
|
|
&::after {
|
2019-10-17 23:16:38 +08:00
|
|
|
@include once {
|
|
|
|
position: absolute;
|
|
|
|
top: 3px;
|
|
|
|
right: 2px;
|
|
|
|
content: "";
|
|
|
|
height: 4px;
|
|
|
|
width: 4px;
|
|
|
|
border-radius: 2px;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: background-color .2s $--n-ease-in-out-cubic-bezier;
|
2019-10-17 23:16:38 +08:00
|
|
|
}
|
2019-10-17 22:16:30 +08:00
|
|
|
background-color: map-get($--date-picker-item-background-color, 'active');
|
|
|
|
}
|
|
|
|
}
|
2019-12-30 19:37:55 +08:00
|
|
|
@include m(covered) {
|
|
|
|
@include not-m(selected) {
|
|
|
|
&::before {
|
|
|
|
@include once {
|
|
|
|
content: "";
|
|
|
|
z-index: -1;
|
|
|
|
position: absolute;
|
2020-03-04 18:24:02 +08:00
|
|
|
left: -7px;
|
|
|
|
right: -7px;
|
2019-12-30 19:37:55 +08:00
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
2019-10-17 23:16:38 +08:00
|
|
|
}
|
2019-12-30 19:37:55 +08:00
|
|
|
background: map-get($--date-picker-item-background-color, 'hover');
|
2019-10-17 23:16:38 +08:00
|
|
|
}
|
2019-10-17 22:16:30 +08:00
|
|
|
}
|
|
|
|
}
|
2019-10-30 16:22:17 +08:00
|
|
|
@include m(selected) {
|
|
|
|
@include once {
|
|
|
|
border-radius: 3px;
|
|
|
|
width: 24px;
|
2020-03-04 18:24:02 +08:00
|
|
|
margin: 4px 7px;
|
2019-10-30 16:22:17 +08:00
|
|
|
}
|
|
|
|
color: map-get($--date-picker-item-text-color, 'active');
|
|
|
|
background-color: map-get($--date-picker-item-background-color, 'active');
|
|
|
|
&::after {
|
|
|
|
background-color: map-get($--date-picker-item-sup-color, 'active');
|
|
|
|
}
|
2019-10-17 22:16:30 +08:00
|
|
|
}
|
2019-12-30 19:37:55 +08:00
|
|
|
@include m(excluded) {
|
|
|
|
@include once {
|
|
|
|
opacity: 0.45;
|
|
|
|
}
|
|
|
|
}
|
2019-11-29 11:07:24 +08:00
|
|
|
@include m(disabled) {
|
2019-12-30 19:37:55 +08:00
|
|
|
@include once {
|
|
|
|
cursor: not-allowed;
|
2020-02-20 13:22:48 +08:00
|
|
|
opacity: $--n-disabled-opacity !important;
|
2019-12-30 19:37:55 +08:00
|
|
|
}
|
2019-11-29 11:07:24 +08:00
|
|
|
}
|
2019-07-05 19:57:05 +08:00
|
|
|
}
|
|
|
|
}
|
2019-10-17 22:16:30 +08:00
|
|
|
@include e(divider) {
|
2019-10-17 23:16:38 +08:00
|
|
|
@include once {
|
2020-03-04 18:24:02 +08:00
|
|
|
margin: 0 14px;
|
2019-10-17 23:16:38 +08:00
|
|
|
height: 1px;
|
|
|
|
}
|
2020-02-20 13:22:48 +08:00
|
|
|
background-color: $--date-picker-divider-color;
|
2019-10-17 22:16:30 +08:00
|
|
|
}
|
2019-12-30 19:37:55 +08:00
|
|
|
@include b(date-panel-actions) {
|
2019-10-17 23:16:38 +08:00
|
|
|
@include once {
|
|
|
|
flex: 1;
|
2020-03-04 19:25:07 +08:00
|
|
|
height: 38px;
|
2019-10-17 23:16:38 +08:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: flex-end;
|
|
|
|
@include b(button) {
|
|
|
|
margin-bottom: 0;
|
|
|
|
margin-right: 12px;
|
|
|
|
}
|
2019-10-17 22:16:30 +08:00
|
|
|
}
|
2019-10-17 23:16:38 +08:00
|
|
|
border-top: 1px solid $--date-picker-divider-color;
|
2019-07-05 19:57:05 +08:00
|
|
|
}
|
|
|
|
}
|
2019-10-17 22:16:30 +08:00
|
|
|
}
|