UNPKG

3.37 kBSCSSView Raw
1// Copyright 2016 Palantir Technologies, Inc. All rights reserved.
2// Licensed under the Apache License, Version 2.0.
3
4@import "./common";
5
6// react-day-picker does not conform to our naming scheme
7
8/* stylelint-disable selector-class-pattern */
9.#{$ns}-daterangepicker {
10 display: flex;
11 white-space: nowrap;
12
13 .DayPicker-NavButton--interactionDisabled {
14 display: none;
15 }
16
17 .#{$ns}-daterangepicker-timepickers {
18 display: flex;
19 justify-content: space-around;
20 }
21
22 // ensure min-widths are set correctly for variants of contiguous months, single month, and shortcuts
23 &.#{$ns}-daterangepicker-contiguous .DayPicker {
24 min-width: $datepicker-min-width + $pt-grid-size;
25 }
26
27 &.#{$ns}-daterangepicker-single-month .DayPicker {
28 min-width: $datepicker-min-width;
29 }
30
31 .DayPicker-Day {
32 // we only want outside days to be shown when displaying one month at a time
33 // https://github.com/palantir/blueprint/pull/586/files#r98813760
34 &--outside {
35 visibility: hidden;
36 }
37
38 &--hovered-range {
39 border-radius: 0;
40 color: $blue2;
41
42 // need to disable hover styles for all variants of selected dates
43
44 /* stylelint-disable max-line-length */
45 &:not(.DayPicker-Day--selected):not(.DayPicker-Day--selected-range):not(.DayPicker-Day--selected-range-start):not(.DayPicker-Day--selected-range-end) {
46 background-color: $daterangepicker-range-background-color;
47 }
48 /* stylelint-enable max-line-length */
49 }
50
51 &--selected-range {
52 background-color: $daterangepicker-range-background-color-selected;
53 border-radius: 0;
54 color: $blue2;
55
56 &:hover {
57 background-color: $daterangepicker-range-background-color-selected-hover;
58 color: $blue2;
59 }
60 }
61
62 // need to set rounded corners
63
64 /* stylelint-disable max-line-length */
65 &--selected-range-start:not(.DayPicker-Day--selected-range-end):not(.DayPicker-Day--hovered-range-end) {
66 border-bottom-right-radius: 0;
67 border-top-right-radius: 0;
68 }
69
70 &--selected-range-end:not(.DayPicker-Day--selected-range-start):not(.DayPicker-Day--hovered-range-start) {
71 border-bottom-left-radius: 0;
72 border-top-left-radius: 0;
73 }
74 /* stylelint-enable max-line-length */
75
76 &--hovered-range-start:not(.DayPicker-Day--hovered-range-end) {
77 border-bottom-right-radius: 0;
78 border-top-right-radius: 0;
79 }
80
81 &--hovered-range-end:not(.DayPicker-Day--hovered-range-start) {
82 border-bottom-left-radius: 0;
83 border-top-left-radius: 0;
84 }
85 }
86
87 .#{$ns}-dark & {
88 .DayPicker-Day {
89 &--hovered-range {
90 color: $light-gray5;
91
92 /* stylelint-disable max-line-length */
93 &:not(.DayPicker-Day--selected):not(.DayPicker-Day--selected-range):not(.DayPicker-Day--selected-range-start):not(.DayPicker-Day--selected-range-end) {
94 background-color: $dark-daterangepicker-range-background-color;
95 }
96 /* stylelint-enable max-line-length */
97 }
98
99 &--selected-range {
100 background-color: $dark-daterangepicker-range-background-color-selected;
101 color: $light-gray5;
102
103 &:hover {
104 background-color: $dark-daterangepicker-range-background-color-selected-hover;
105 }
106 }
107 }
108 }
109}
110
111.#{$ns}-menu.#{$ns}-daterangepicker-shortcuts {
112 min-width: $pt-grid-size * 12;
113 padding: 0;
114}