mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
241 lines
6.5 KiB
SCSS
241 lines
6.5 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__icon {
|
||
|
position: absolute;
|
||
|
right: 13px;
|
||
|
top: 50%;
|
||
|
transform: translateY(-50%);
|
||
|
color: rgba(221, 238, 247, 0.3);
|
||
|
height: 20px;
|
||
|
}
|
||
|
.n-date-picker__input, .n-date-picker-calendar__date-input, .n-date-picker-calendar__time-input {
|
||
|
-webkit-appearance: none;
|
||
|
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;
|
||
|
&:focus:hover {
|
||
|
box-shadow: inset 0 0 0px 1px $main-color, 0px 0px 10px 1px #366555;
|
||
|
}
|
||
|
&:hover {
|
||
|
box-shadow: inset 0 0 0px 1px $main-color;
|
||
|
}
|
||
|
&:focus {
|
||
|
box-shadow: inset 0 0 0px 1px $main-color;
|
||
|
background-color: $focus-input-background-color;
|
||
|
}
|
||
|
&::placeholder {
|
||
|
color: $input-placeholder-color;
|
||
|
opacity: 1;
|
||
|
}
|
||
|
}
|
||
|
&.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) {
|
||
|
z-index: 1;
|
||
|
position: absolute;
|
||
|
top: calc(100% + 4px);
|
||
|
left: 0;
|
||
|
width: 351px;
|
||
|
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__date-time-input-wrapper {
|
||
|
padding: 14px 24px;
|
||
|
border-bottom: 1px solid rgba(255, 255, 255, .07);
|
||
|
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 3px 8px 24px;
|
||
|
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-right: 21px;
|
||
|
margin-top: 8px;
|
||
|
margin-bottom: 8px;
|
||
|
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: 3px;
|
||
|
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 {
|
||
|
color: rgba(75, 81, 106, 1)!important;
|
||
|
background-color: $main-color!important;
|
||
|
&::after {
|
||
|
background-color: rgba(75, 81, 106, 1);
|
||
|
}
|
||
|
}
|
||
|
&:hover {
|
||
|
background-color: rgba(99, 226, 183, 0.2);
|
||
|
}
|
||
|
}
|
||
|
border-bottom: 1px solid rgba(255, 255, 255, .07);
|
||
|
}
|
||
|
.n-date-picker-calendar__divider {
|
||
|
margin: 0 24px;
|
||
|
height: 1px;
|
||
|
background-color: rgba(255, 255, 255, .07);
|
||
|
}
|
||
|
.n-date-picker-calendar__actions {
|
||
|
height: 47px;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: flex-end;
|
||
|
.n-button {
|
||
|
margin-bottom: 0;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@include b(date-picker-time-selector) {
|
||
|
z-index: 1;
|
||
|
position: absolute;
|
||
|
top: calc(100% + 4px);
|
||
|
background-color: rgba(97, 104, 132, 1);
|
||
|
box-shadow:0px 2px 20px 0px rgba(0,0,0,0.16);
|
||
|
font-size: 12px;
|
||
|
border-radius: 6px;
|
||
|
width: 180px;
|
||
|
.n-date-picker-time-selector__selection-wrapper {
|
||
|
height: 244px;
|
||
|
border-bottom: 1px solid rgba(255, 255, 255, .07);
|
||
|
display: flex;
|
||
|
}
|
||
|
.n-date-picker-time-selector__hour, .n-date-picker-time-selector__minute, .n-date-picker-time-selector__second {
|
||
|
@include scrollbar;
|
||
|
width: 60px;
|
||
|
height: 244px;
|
||
|
flex-direction: column;
|
||
|
overflow-y: scroll;
|
||
|
.n-date-picker-time-selector__item {
|
||
|
cursor: pointer;
|
||
|
height: 35px;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: center;
|
||
|
transition: background-color .2s $default-cubic-bezier, color .2s $default-cubic-bezier;
|
||
|
background: transparent;
|
||
|
&:hover {
|
||
|
background-color: rgba(99,226,183,0.12);
|
||
|
}
|
||
|
&.n-date-picker-time-selector__item--active {
|
||
|
background-color: rgba(99,226,183,0.12);
|
||
|
color: rgba(99, 226, 183, 1);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
.n-date-picker-time-selector__actions {
|
||
|
margin: 10px 15px;
|
||
|
display: flex;
|
||
|
justify-content: space-between;
|
||
|
.n-button {
|
||
|
margin: 0;
|
||
|
}
|
||
|
}
|
||
|
}
|