_ShadowCast.scss 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. @mixin shadowCast() {
  2. $width: 200;
  3. $slider-thumb-size: 8px;
  4. $tooltip-arrow-size: 8px;
  5. .esri-shadow-cast {
  6. position: relative;
  7. overflow: hidden;
  8. display: flex;
  9. flex-direction: column;
  10. width: $width;
  11. padding: $cap-spacing $side-spacing;
  12. gap: $cap-spacing;
  13. &__time-range {
  14. display: flex;
  15. flex-direction: column;
  16. font-size: $font-size--tiny-time-slider;
  17. @include timeSlider();
  18. .esri-slider.esri-slider--horizontal {
  19. padding-top: $slider-thumb-size;
  20. padding-bottom: 42px;
  21. }
  22. &__indicator {
  23. display: flex;
  24. justify-content: center;
  25. align-items: center;
  26. gap: $side-spacing--half;
  27. margin-bottom: $cap-spacing--half;
  28. }
  29. }
  30. &__tz-picker {
  31. position: relative;
  32. display: flex;
  33. align-items: center;
  34. &__select {
  35. display: flex;
  36. align-items: center;
  37. flex-shrink: 0;
  38. z-index: 0;
  39. font-size: $font-size--tiny;
  40. font-weight: $font-weight--medium;
  41. gap: $side-spacing--eighth;
  42. padding: $cap-spacing--eighth $side-spacing--eighth;
  43. padding-inline-start: $cap-spacing--half; // More padding at the start because at the end we already have the chevron icon
  44. border: solid 1px var(--calcite-ui-border-1);
  45. calcite-icon {
  46. vertical-align: text-top;
  47. }
  48. }
  49. &__hidden-select:focus ~ &__select {
  50. outline: 2px solid var(--calcite-ui-brand);
  51. outline-offset: -2px;
  52. }
  53. // Hidden and focusable select above the one where we display the short
  54. // timezone name.
  55. // TBD: should be replaced once we can use the a calcite-dropdown
  56. &__hidden-select {
  57. position: absolute;
  58. opacity: 0;
  59. width: 100%;
  60. height: 100%;
  61. z-index: 1;
  62. cursor: pointer;
  63. }
  64. }
  65. &__date-picker-container:not(:first-of-type) {
  66. margin-top: $cap-spacing;
  67. }
  68. &__date-picker-container .esri-date-picker {
  69. display: block;
  70. flex-grow: 1;
  71. }
  72. &__visualization {
  73. display: flex;
  74. flex-direction: column;
  75. margin-top: $cap-spacing;
  76. &__select {
  77. margin-bottom: $cap-spacing;
  78. }
  79. &__config--hidden {
  80. display: none;
  81. }
  82. }
  83. &__threshold-config,
  84. &__duration-config,
  85. &__discrete-config {
  86. display: flex;
  87. flex-direction: column;
  88. gap: $cap-spacing;
  89. calcite-label {
  90. // Don't make the labels full width so that one can't click in white space to focus elements.
  91. width: max-content;
  92. max-width: 100%;
  93. display: block;
  94. // Labels shouldn't really be focusable, but we had to make the color
  95. // picker label focusable with tabindex=-1 (not tabbable). Without it,
  96. // Safari does not include the label in FocusEvent.relatedTarget which
  97. // we use to determine whether the color picker popover should be closed
  98. // right away or not.
  99. &:focus,
  100. &:focus-visible {
  101. outline: none;
  102. }
  103. }
  104. }
  105. &__threshold-config {
  106. .esri-slider {
  107. // Fit slider content since default API slider doesn't do it for us.
  108. padding-top: $slider-thumb-size;
  109. padding-inline: $slider-thumb-size;
  110. padding-bottom: 25px;
  111. .esri-slider__label,
  112. .esri-slider__tick-label {
  113. font-size: $font-size--tiny;
  114. }
  115. // Move labels and ticks up to make slider more compact.
  116. .esri-slider__tick-label {
  117. margin-top: 12px;
  118. }
  119. .esri-slider__tick {
  120. top: -4px;
  121. }
  122. // Mark slider area above the threshold
  123. .esri-slider__segment-1 {
  124. background: $button-color;
  125. }
  126. }
  127. }
  128. &__duration-config {
  129. &__radio-group {
  130. display: flex;
  131. flex-direction: row;
  132. align-items: center;
  133. calcite-button {
  134. height: 35px; // Match height of `<calcite-select>`
  135. }
  136. }
  137. }
  138. &__tooltip {
  139. font-size: $font-size--small;
  140. color: $font-color;
  141. &__content {
  142. position: absolute;
  143. width: max-content;
  144. padding: $cap-spacing--half $side-spacing--half;
  145. background: $background-color;
  146. // center horizontally and place it above the mouse pointer
  147. transform: translate(-50%, -100%);
  148. margin-top: -$tooltip-arrow-size - $cap-spacing--third;
  149. // Tooltip arrow
  150. &:after {
  151. position: absolute;
  152. content: "";
  153. display: block;
  154. width: 0;
  155. height: 0;
  156. border-top: $tooltip-arrow-size solid $background-color;
  157. border-bottom: $tooltip-arrow-size solid transparent;
  158. border-right: $tooltip-arrow-size solid transparent;
  159. border-left: $tooltip-arrow-size solid transparent;
  160. // Place arrow below the tooltip
  161. bottom: 1px; // make the arrow overlap so the "seam" isn't noticeable
  162. left: 50%;
  163. transform: translate(-50%, 100%);
  164. }
  165. }
  166. }
  167. }
  168. }
  169. @if $include_ShadowCast==true {
  170. @include shadowCast();
  171. }