| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- @use '../helpers/baseMixin.scss';
- .vxe-calendar {
- display: inline-flex;
- flex-direction: column;
- width: 100%;
- height: 38em;
- border: 1px solid var(--vxe-ui-base-popup-border-color);
- border-radius: var(--vxe-ui-base-border-radius);
- &.type--date {
- .vxe-calendar--body {
- td {
- width: 14.28571%;
- }
- }
- }
- &.type--week {
- .vxe-calendar--body {
- td {
- width: 12%;
- &:first-child {
- width: 14%;
- }
- }
- }
- }
- &.type--quarter {
- .vxe-calendar--body {
- td {
- width: 50%;
- }
- }
- }
- &.type--month,
- &.type--year {
- .vxe-calendar--body {
- td {
- width: 25%;
- }
- }
- }
- }
- .vxe-calendar--confirm {
- outline: 0;
- border: 1px solid var(--vxe-ui-input-border-color);
- border-radius: var(--vxe-ui-base-border-radius);
- cursor: pointer;
- color: var(--vxe-ui-input-date-time-confirm-button-color);
- border-color: var(--vxe-ui-font-primary-color);
- background-color: var(--vxe-ui-font-primary-color);
- padding: 0 0.5em;
- &:hover {
- background-color: var(--vxe-ui-font-primary-lighten-color);
- border-color: var(--vxe-ui-font-primary-lighten-color);
- }
- &:active {
- background-color: var(--vxe-ui-font-primary-darken-color);
- border-color: var(--vxe-ui-font-primary-darken-color);
- }
- }
- .vxe-calendar--header {
- flex-shrink: 0;
- display: flex;
- flex-direction: row;
- padding: var(--vxe-ui-layout-padding-default);
- user-select: none;
- border-bottom: 1px solid var(--vxe-ui-input-border-color);
- .vxe-calendar--type-wrapper {
- flex-grow: 1;
- }
- .vxe-calendar--btn-wrapper {
- flex-shrink: 0;
- text-align: center;
- }
- }
- .vxe-calendar--btn-wrapper {
- display: flex;
- flex-direction: row;
- }
- .vxe-calendar--btn {
- &.is--disabled {
- color: var(--vxe-ui-font-disabled-color);
- cursor: no-drop;
- }
- &:not(.is--disabled) {
- cursor: pointer;
- &:hover {
- background-color: #fff;
- }
- &:active {
- background-color: #fff;
- }
- }
- }
- .vxe-calendar--body {
- position: relative;
- flex-grow: 1;
- overflow: hidden;
- table {
- border: 0;
- width: 100%;
- height: 100%;
- border-spacing: 0;
- border-collapse: separate;
- text-align: center;
- table-layout: fixed
- }
- }
- .vxe-calendar--view-th {
- font-weight: 700;
- }
- .vxe-calendar--view-td {
- font-weight: normal;
- user-select: none;
- @include baseMixin.createAnimationTransition(all, 0.1s);
- &.is--prev,
- &.is--next {
- color: var(--vxe-ui-font-disabled-color);
- .vxe-calendar--date-label,
- .vxe-calendar--date-festival {
- color: var(--vxe-ui-font-disabled-color);
- }
- }
- &.is--now {
- &:not(.is--selected) {
- &.is--current {
- color: var(--vxe-ui-font-primary-color);
- .vxe-calendar--date-label,
- .vxe-calendar--date-festival {
- color: var(--vxe-ui-font-primary-color);
- }
- }
- }
- }
- &.is--hover {
- background-color: var(--vxe-ui-base-hover-background-color);
- }
- &.is--selected {
- color: var(--vxe-ui-calendar-selected-color);
- background-color: var(--vxe-ui-font-primary-color);
- &.is--prev,
- &.is--next {
- background-color: var(--vxe-ui-font-primary-lighten-color);
- }
- .vxe-calendar--date-label,
- .vxe-calendar--date-festival {
- color: var(--vxe-ui-calendar-festival-selected-color);
- }
- .vxe-calendar--date-label {
- &.is-notice {
- &:before {
- background-color: var(--vxe-ui-calendar-notice-selected-background-color);
- }
- }
- }
- }
- &:not(.is--disabled) {
- cursor: pointer;
- }
- &.is--disabled {
- cursor: no-drop;
- color: var(--vxe-ui-input-disabled-color);
- background-color: var(--vxe-ui-input-disabled-background-color);
- .vxe-calendar--date-label,
- .vxe-calendar--date-festival {
- color: var(--vxe-ui-input-disabled-color);
- }
- }
- }
- .vxe-calendar--date-label,
- .vxe-calendar--date-festival {
- display: block;
- overflow: hidden;
- }
- .vxe-calendar--date-label {
- position: relative;
- &.is-notice {
- &:before {
- content: "";
- position: absolute;
- width: 4px;
- height: 4px;
- left: 0.8em;
- top: 0.1em;
- transform: translateX(-50%);
- border-radius: 100%;
- background-color: var(--vxe-ui-input-date-notice-background-color);
- }
- }
- }
- .vxe-calendar--date-label--extra {
- position: absolute;
- right: 0.1em;
- top: -0.2em;
- transform: scale(0.9);
- color: var(--vxe-ui-input-date-extra-color);
- &.is-important {
- color: var(--vxe-ui-input-date-extra-important-color);
- }
- }
- .vxe-calendar--date-festival {
- color: var(--vxe-ui-input-date-festival-color);
- height: 14px;
- line-height: 1;
- overflow: hidden;
- &.is-important {
- color: var(--vxe-ui-input-date-festival-important-color);
- }
- }
- .vxe-calendar--date-festival--label {
- display: block;
- transform: scale(0.8);
- }
- @keyframes festivalOverlap2 {
- 0%, 45%, 100% {
- transform: translateY(0);
- }
- 50%, 95% {
- transform: translateY(-14px);
- }
- }
- @keyframes festivalOverlap3 {
- 0%, 20%, 100% {
- transform: translateY(0);
- }
- 25%, 45%, 75%, 95% {
- transform: translateY(-14px);
- }
- 50%, 70% {
- transform: translateY(-28px);
- }
- }
- .vxe-calendar--date-festival--overlap {
- display: block;
- font-size: 12px;
- &.overlap--2 {
- animation: festivalOverlap2 6s infinite ease-in-out;
- }
- &.overlap--3 {
- animation: festivalOverlap3 9s infinite ease-in-out;
- }
- & > span {
- height: 14px;
- display: block;
- transform: scale(0.8);
- }
- }
- .vxe-calendar {
- font-size: var(--vxe-ui-font-size-default);
- &.size--medium {
- font-size: var(--vxe-ui-font-size-medium);
- }
- &.size--small {
- font-size: var(--vxe-ui-font-size-small);
- }
- &.size--mini {
- font-size: var(--vxe-ui-font-size-mini);
- }
- }
|