mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
279 lines
7.4 KiB
SCSS
279 lines
7.4 KiB
SCSS
@import './mixins/mixins.scss';
|
|
@import './theme/default.scss';
|
|
|
|
@include b(date-picker) {
|
|
position: relative;
|
|
width: 240px;
|
|
@include fade-up-transition(date-picker-calendar);
|
|
@include fade-up-transition(date-picker-time-selector);
|
|
&.n-date-picker--disabled {
|
|
cursor: not-allowed;
|
|
.n-date-picker__icon {
|
|
color: rgba(255, 255, 255, .2);
|
|
}
|
|
.n-date-picker__editor {
|
|
cursor: not-allowed;
|
|
background-color: rgba(255, 255, 255, .08);
|
|
.n-date-picker__input {
|
|
cursor: not-allowed;
|
|
color: rgba(255, 255, 255, .2);
|
|
&::placeholder {
|
|
color: rgba(255, 255, 255, .2);
|
|
}
|
|
}
|
|
&:hover {
|
|
box-shadow: none;
|
|
}
|
|
}
|
|
}
|
|
&.n-date-picker--range {
|
|
width: 382px;
|
|
}
|
|
.n-date-picker__icon {
|
|
position: absolute;
|
|
right: 13px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
color: rgba(221, 238, 247, 0.3);
|
|
height: 20px;
|
|
transition: color .3s $default-cubic-bezier;
|
|
}
|
|
.n-date-picker__editor {
|
|
box-sizing: border-box;
|
|
border: none;
|
|
border-radius: $input-border-radius;
|
|
outline: none;
|
|
color: #fff;
|
|
font-family: $default-font-family;
|
|
background-color: $input-background-color;
|
|
height: 34px;
|
|
width: 100%;
|
|
caret-color: $input-caret-color;
|
|
box-shadow: none;
|
|
transition: box-shadow .3s $default-cubic-bezier, background-color .3s $default-cubic-bezier;
|
|
padding: 0 14px;
|
|
font-size: 14px;
|
|
position: relative;
|
|
display: flex;
|
|
.n-date-picker__input {
|
|
width: 100%;
|
|
-webkit-appearance: none;
|
|
outline: none;
|
|
background: none;
|
|
color: #fff;
|
|
border: none;
|
|
padding: 0;
|
|
transition: color .3s $default-cubic-bezier;
|
|
&::placeholder {
|
|
transition: color .3s $default-cubic-bezier;
|
|
color: $input-placeholder-color;
|
|
opacity: 1;
|
|
}
|
|
&.n-date-picker__input--start {
|
|
width: 160px;
|
|
text-align: center;
|
|
}
|
|
&.n-date-picker__input--splitor {
|
|
width: 18px;
|
|
text-align: center;
|
|
}
|
|
&.n-date-picker__input--end {
|
|
width: 160px;
|
|
text-align: center;
|
|
}
|
|
}
|
|
&.n-date-picker__editor--focus {
|
|
&:hover {
|
|
box-shadow: inset 0 0 0px 1px $main-color, 0px 0px 10px 1px #366555;
|
|
}
|
|
box-shadow: inset 0 0 0px 1px $main-color;
|
|
background-color: $focus-input-background-color;
|
|
}
|
|
&:hover {
|
|
box-shadow: inset 0 0 0px 1px $main-color;
|
|
}
|
|
}
|
|
&.n-date-picker--small-size {
|
|
.n-date-picker__input {
|
|
height: $small-height;
|
|
line-height: $small-height;
|
|
font-size: $small-input-font-size;
|
|
}
|
|
}
|
|
&.n-date-picker--default-size, &.n-date-picker--medium-size {
|
|
.n-date-picker__input {
|
|
height: $default-height;
|
|
line-height: $default-height;
|
|
font-size: $default-input-font-size;
|
|
}
|
|
}
|
|
&.n-date-picker--large-size {
|
|
.n-date-picker__input {
|
|
height: $large-height;
|
|
line-height: $large-height;
|
|
font-size: $large-input-font-size;
|
|
}
|
|
}
|
|
}
|
|
|
|
@include b(date-picker-calendar) {
|
|
@include fade-in-transition(date-picker-calendar);
|
|
margin-top: 4px;
|
|
margin-bottom: 4px;
|
|
width: 350px;
|
|
background:rgba(75,81,106,1);
|
|
box-shadow:0px 2px 20px 0px rgba(0,0,0,0.16);
|
|
border-radius: 6px;
|
|
color:rgba(233,233,236,1);
|
|
&.n-date-picker-calendar--datetimerange, &.n-date-picker-calendar--daterange {
|
|
width: 701px;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
.n-date-picker-calendar__range-wrapper {
|
|
width: 350px;
|
|
.n-date-picker-calendar__month-modifier {
|
|
margin-top: 12px;
|
|
}
|
|
}
|
|
.n-date-picker-calendar__vertical-divider {
|
|
width: 1px;
|
|
height: calc(100% - 62px);
|
|
background: rgba(255, 255, 255, .1);
|
|
margin-top: 62px;
|
|
}
|
|
&.n-date-picker-calendar--daterange {
|
|
.n-date-picker-calendar__vertical-divider {
|
|
height:100%;
|
|
margin-top: 0;
|
|
}
|
|
}
|
|
.n-date-picker-calendar__actions {
|
|
flex: 1;
|
|
}
|
|
}
|
|
.n-date-picker-calendar__date-time-input-wrapper {
|
|
padding: 14px 24px;
|
|
border-bottom: 1px solid rgba(255, 255, 255, .1);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
.n-date-picker-calendar__time-input-wrapper {
|
|
position: relative;
|
|
}
|
|
.n-date-picker-calendar__date-input, .n-date-picker-calendar__time-input {
|
|
width: 145px;
|
|
}
|
|
}
|
|
.n-date-picker-calendar__month-modifier {
|
|
display: flex;
|
|
height: 41px;
|
|
align-items: center;
|
|
padding-left: 24px;
|
|
padding-right: 24px;
|
|
.n-date-picker-calendar__prev, .n-date-picker-calendar__next, .n-date-picker-calendar__fast-prev, .n-date-picker-calendar__fast-next {
|
|
cursor: pointer;
|
|
display: flex;
|
|
.n-icon {
|
|
width: 5px;
|
|
&::before {
|
|
width: 5px;
|
|
color: rgba(255, 255, 255, .3);
|
|
}
|
|
}
|
|
}
|
|
.n-date-picker-calendar__fast-prev, .n-date-picker-calendar__next {
|
|
margin-right: 10px;
|
|
}
|
|
.n-date-picker-calendar__month-year {
|
|
font-size: 14px;
|
|
font-weight: 700;
|
|
line-height: 17px;
|
|
flex-grow: 1;
|
|
text-align: center;
|
|
}
|
|
}
|
|
.n-date-picker-calendar__weekdays {
|
|
padding: 8px 24px 14px 24px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
.n-date-picker-calendar__weekday {
|
|
line-height: 15px;
|
|
width: 30px;
|
|
text-align: center;
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
.n-date-picker-calendar__dates {
|
|
padding: 8px 14px 8px 14px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
flex-wrap: wrap;
|
|
.n-date-picker-calendar__date {
|
|
position: relative;
|
|
width: 24px;
|
|
height: 24px;
|
|
line-height: 24px;
|
|
text-align: center;
|
|
font-size: 12px;
|
|
margin: 8px 11px;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
transition: background-color .2s $default-cubic-bezier, color .2s $default-cubic-bezier;
|
|
&:not(.n-date-picker-calendar__date--in-display-month) {
|
|
color: rgba(233, 233, 236, 0.4);
|
|
}
|
|
&.n-date-picker-calendar__date--current {
|
|
color: $main-color;
|
|
&::after {
|
|
position: absolute;
|
|
top: 3px;
|
|
right: 2px;
|
|
content: "";
|
|
height: 4px;
|
|
width: 4px;
|
|
border-radius: 2px;
|
|
background-color: $main-color;
|
|
transition: background-color .2s $default-cubic-bezier;
|
|
}
|
|
}
|
|
&.n-date-picker-calendar__date--selected.n-date-picker-calendar__date--in-display-month {
|
|
border-radius: 3px;
|
|
color: rgba(75, 81, 106, 1)!important;
|
|
background-color: $main-color!important;
|
|
width: 24px;
|
|
margin: 8px 11px;
|
|
&::after {
|
|
background-color: rgba(75, 81, 106, 1);
|
|
}
|
|
}
|
|
&.n-date-picker-calendar__date--in-span.n-date-picker-calendar__date--in-display-month:not(.n-date-picker-calendar__date--selected) {
|
|
background: rgba(99,226,183,0.15);
|
|
width: 46px;
|
|
margin-left: 0;
|
|
margin-right: 0;
|
|
border-radius: 0;
|
|
transition: none;
|
|
&::after {
|
|
right: 13px;
|
|
}
|
|
}
|
|
&:hover {
|
|
background-color: rgba(99, 226, 183, 0.2);
|
|
}
|
|
}
|
|
border-bottom: 1px solid rgba(255, 255, 255, .1);
|
|
}
|
|
.n-date-picker-calendar__divider {
|
|
margin: 0 24px;
|
|
height: 1px;
|
|
background-color: rgba(255, 255, 255, .1);
|
|
}
|
|
.n-date-picker-calendar__actions {
|
|
height: 47px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
.n-button {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
} |