_ShadowCast.scss 4.2 KB

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