_TimeSlider.scss 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. @mixin timeSlider() {
  2. $widget-min-width: 375px;
  3. $primary-color: $border-color--contrast;
  4. $highlight-color: $button-color;
  5. $invalid-color: #d83020;
  6. .esri-time-slider {
  7. cursor: default;
  8. min-width: $widget-min-width;
  9. @include defaultBoxShadow();
  10. &__layout {
  11. &--wide {
  12. .esri-time-slider {
  13. &__row {
  14. height: 88px;
  15. overflow: hidden;
  16. }
  17. &__playback-controls {
  18. direction: ltr;
  19. display: flex;
  20. flex: auto;
  21. }
  22. &__animation {
  23. width: 64px;
  24. }
  25. &__time-extent {
  26. align-items: center;
  27. display: flex;
  28. flex-flow: column nowrap;
  29. justify-content: center;
  30. width: 110px;
  31. }
  32. &__time-extent,
  33. &__min,
  34. &__previous,
  35. &__actions {
  36. border: {
  37. left: 1px solid $border-color;
  38. }
  39. }
  40. &__min,
  41. &__max {
  42. align-items: center;
  43. width: 110px;
  44. }
  45. &__slider {
  46. flex: auto;
  47. }
  48. &__previous,
  49. &__next {
  50. width: 42px;
  51. }
  52. &__warning {
  53. font-size: $font-size__h1;
  54. margin-bottom: 4px;
  55. &-text {
  56. margin-inline: 3px;
  57. text-align: center;
  58. }
  59. }
  60. &__actions {
  61. &-button {
  62. height: 88px;
  63. }
  64. }
  65. }
  66. }
  67. &--compact {
  68. &.esri-time-slider {
  69. &--has-actions {
  70. .esri-time-slider {
  71. &__time-extent {
  72. padding-inline-start: 48px;
  73. }
  74. }
  75. }
  76. }
  77. .esri-time-slider {
  78. &__row {
  79. &:nth-child(1),
  80. &:nth-child(3) {
  81. height: 36px;
  82. }
  83. &:nth-child(2) {
  84. height: 88px;
  85. overflow: hidden;
  86. }
  87. }
  88. &__animation {
  89. width: 35px;
  90. }
  91. &__time-extent {
  92. align-items: center;
  93. display: flex;
  94. flex: auto;
  95. flex-flow: row nowrap;
  96. justify-content: center;
  97. &-separator {
  98. margin-inline: 7px;
  99. }
  100. }
  101. &__slider {
  102. flex: auto;
  103. }
  104. &__min,
  105. &__max {
  106. flex: auto;
  107. }
  108. &__min {
  109. align-items: flex-start;
  110. margin-inline-start: 35px;
  111. }
  112. &__max {
  113. align-items: flex-end;
  114. margin-inline-end: 35px;
  115. }
  116. &__previous,
  117. &__next {
  118. width: 35px;
  119. }
  120. &__warning {
  121. line-height: $font-size__body;
  122. margin-inline-end: 4px;
  123. }
  124. &__actions {
  125. align-items: flex-end;
  126. &-button {
  127. height: 36px;
  128. }
  129. }
  130. }
  131. }
  132. }
  133. &__row {
  134. display: flex;
  135. }
  136. &__mode {
  137. &--instant {
  138. .esri-slider {
  139. &__segment-0,
  140. &__segment-1 {
  141. background-color: $primary-color;
  142. }
  143. }
  144. }
  145. &--time-window {
  146. .esri-slider {
  147. &__segment-1 {
  148. background-color: $highlight-color;
  149. height: 6px;
  150. margin-top: -1px;
  151. }
  152. &__segment-0,
  153. &__segment-2 {
  154. background-color: $primary-color;
  155. }
  156. }
  157. &.esri-time-slider {
  158. &--out-of-bounds {
  159. .esri-slider {
  160. &__segment-1 {
  161. background-color: $invalid-color;
  162. }
  163. }
  164. }
  165. }
  166. }
  167. &--cumulative-from-start {
  168. .esri-slider {
  169. &__segment-0 {
  170. background-color: $highlight-color;
  171. height: 6px;
  172. margin-top: -1px;
  173. }
  174. &__segment-1 {
  175. background-color: $primary-color;
  176. }
  177. }
  178. &.esri-time-slider {
  179. &--out-of-bounds {
  180. .esri-slider {
  181. &__segment-0 {
  182. background-color: $invalid-color;
  183. }
  184. }
  185. }
  186. }
  187. }
  188. &--cumulative-from-end {
  189. .esri-slider {
  190. &__segment-0 {
  191. background-color: $primary-color;
  192. }
  193. &__segment-1 {
  194. background-color: $highlight-color;
  195. height: 6px;
  196. margin-top: -1px;
  197. }
  198. }
  199. &.esri-time-slider {
  200. &--out-of-bounds {
  201. .esri-slider {
  202. &__segment-1 {
  203. background-color: $invalid-color;
  204. }
  205. }
  206. }
  207. }
  208. }
  209. }
  210. &__time-extent {
  211. font-size: $font-size__body;
  212. line-height: $font-size__body;
  213. color: $highlight-color;
  214. &-group {
  215. display: flex;
  216. flex-flow: column nowrap;
  217. align-items: center;
  218. }
  219. &-date,
  220. &-separator {
  221. font-weight: $font-weight--bold;
  222. }
  223. }
  224. &__min,
  225. &__max {
  226. display: flex;
  227. flex-flow: column nowrap;
  228. font-size: $font-size__body;
  229. justify-content: center;
  230. line-height: $font-size__body;
  231. &-date {
  232. font-weight: $font-weight--bold;
  233. }
  234. }
  235. &__slider {
  236. background-color: $background-color--offset;
  237. padding: 0 40px 0 40px;
  238. .esri-slider {
  239. margin-top: -19px;
  240. background-color: $background-color--offset;
  241. // This is a fix specifically for IE11. Without it ticks and tick labels are severely displaced.
  242. &__content {
  243. height: 2px;
  244. }
  245. &__thumb {
  246. border-width: 3px;
  247. top: -6px;
  248. }
  249. &__tick-label {
  250. font-size: $font-size__body;
  251. margin-top: 23px;
  252. white-space: nowrap;
  253. }
  254. &__tick {
  255. background: $primary-color;
  256. width: 1px;
  257. &.minorTick {
  258. height: 4px;
  259. }
  260. &.majorTick {
  261. height: 8px;
  262. }
  263. }
  264. &__ticks {
  265. margin-top: 16px;
  266. }
  267. &__track {
  268. height: 4px;
  269. }
  270. }
  271. }
  272. &__animation,
  273. &__previous,
  274. &__next {
  275. &-button {
  276. border: none;
  277. height: 100%;
  278. width: 100%;
  279. }
  280. }
  281. .esri-icon-play,
  282. .esri-icon-pause,
  283. .esri-icon-reverse,
  284. .esri-icon-forward {
  285. font-size: 24px;
  286. }
  287. &--out-of-bounds {
  288. .esri-slider {
  289. &__thumb {
  290. border-color: $invalid-color;
  291. }
  292. }
  293. .esri-time-slider {
  294. &__time-extent {
  295. color: $invalid-color;
  296. }
  297. }
  298. }
  299. }
  300. [dir="rtl"] .esri-time-slider {
  301. &__layout {
  302. &--compact {
  303. .esri-time-slider {
  304. &__row {
  305. &:nth-child(3) {
  306. direction: ltr;
  307. }
  308. }
  309. &__min,
  310. &__max {
  311. &-date,
  312. &-time {
  313. direction: rtl;
  314. }
  315. }
  316. }
  317. }
  318. &--wide {
  319. .esri-time-slider {
  320. &__playback-controls {
  321. direction: ltr;
  322. }
  323. &__min,
  324. &__max,
  325. &__time-extent {
  326. &-date,
  327. &-time {
  328. direction: rtl;
  329. }
  330. }
  331. }
  332. &.esri-time-slider {
  333. &--has-actions {
  334. .esri-time-slider {
  335. &__actions {
  336. border: {
  337. left: none;
  338. }
  339. }
  340. &__animation {
  341. border: {
  342. left: 1px solid $border-color;
  343. }
  344. }
  345. }
  346. }
  347. }
  348. }
  349. }
  350. }
  351. }
  352. @if $include_TimeSlider == true {
  353. @include timeSlider();
  354. }