_DatePicker.scss 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. @mixin date-picker() {
  2. $section_margin: $cap-spacing--half;
  3. $cell_border: 1px solid $border-color;
  4. .esri-date-picker {
  5. display: inline-flex;
  6. border: 1px solid $border-color;
  7. background-color: $background-color;
  8. }
  9. .esri-date-picker__calendar {
  10. @include defaultBoxShadow();
  11. padding: $section_margin;
  12. .esri-widget--button {
  13. // Prevent scroll/zoom which can happen when quickly tapping button.
  14. // https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action
  15. touch-action: none;
  16. }
  17. }
  18. .esri-date-picker__day-picker,
  19. .esri-date-picker__month-picker,
  20. .esri-date-picker__year-picker {
  21. display: flex;
  22. justify-content: center;
  23. align-items: center;
  24. }
  25. .esri-date-picker__day-picker {
  26. flex-wrap: wrap;
  27. flex-direction: column;
  28. }
  29. .esri-date-picker__day-picker,
  30. .esri-date-picker__month-picker {
  31. margin-bottom: $section_margin;
  32. }
  33. .esri-date-picker__date {
  34. margin: 0 $cap-spacing--double 0 0;
  35. }
  36. .esri-date-picker__calendar-toggle {
  37. border: none;
  38. font-size: $font-size;
  39. width: 100%;
  40. margin: 0;
  41. padding: 0 0.5em;
  42. height: $button-height;
  43. color: $font-color;
  44. }
  45. .esri-date-picker .esri-date-picker__month-dropdown {
  46. border: none;
  47. font-weight: $font-weight__heading;
  48. padding-right: 2.3em;
  49. }
  50. .esri-date-picker__week-item {
  51. display: flex;
  52. justify-content: center;
  53. }
  54. .esri-date-picker__day-item--header {
  55. background: $background-color--offset;
  56. font-weight: $font-weight__heading;
  57. cursor: auto;
  58. }
  59. .esri-date-picker__day-item {
  60. display: flex;
  61. justify-content: center;
  62. align-items: center;
  63. width: 30px;
  64. height: 30px;
  65. border-bottom: $cell_border;
  66. border-right: $cell_border;
  67. cursor: pointer;
  68. }
  69. .esri-date-picker__day-item--header {
  70. border-top: $cell_border;
  71. }
  72. .esri-date-picker__day-item:first-child {
  73. border-left: $cell_border;
  74. }
  75. .esri-date-picker__day-item--nearby-month {
  76. color: $interactive-font-color--disabled;
  77. }
  78. .esri-date-picker__day-item--today {
  79. color: $button-color;
  80. }
  81. .esri-date-picker__day-item--active {
  82. background: $border-color;
  83. }
  84. .esri-date-picker__month-picker {
  85. font-weight: $font-weight__heading;
  86. justify-content: space-between;
  87. }
  88. .esri-date-picker__year-picker-item {
  89. color: $font-color;
  90. padding: $section_margin;
  91. margin: 0 4px;
  92. cursor: pointer;
  93. }
  94. .esri-date-picker__day-item--selected,
  95. .esri-date-picker__year-picker-item--selected {
  96. color: $button-color--inverse;
  97. background-color: $button-color;
  98. cursor: auto;
  99. }
  100. .esri-date-picker__input {
  101. position: relative;
  102. display: flex;
  103. align-items: center;
  104. }
  105. .esri-date-picker__text-input.esri-input {
  106. margin: 0;
  107. padding-left: $side-spacing--double;
  108. border: none;
  109. }
  110. .esri-date-picker__icon--leading {
  111. position: absolute;
  112. left: $side-spacing--half;
  113. }
  114. [dir="rtl"] {
  115. .esri-date-picker__calendar {
  116. right: 0;
  117. }
  118. .esri-date-picker__date {
  119. margin: 0 0 0 $cap-spacing--double;
  120. }
  121. .esri-date-picker__day-item:first-child {
  122. border-left: none;
  123. }
  124. .esri-date-picker__day-item:last-child {
  125. border-left: $cell_border;
  126. }
  127. .esri-date-picker__text-input.esri-input {
  128. padding-left: unset;
  129. padding-right: $side-spacing--double;
  130. }
  131. .esri-date-picker__icon--leading {
  132. left: unset;
  133. right: $side-spacing--half;
  134. }
  135. }
  136. }
  137. @if $include_DatePicker == true {
  138. @include date-picker();
  139. }