_Expand.scss 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. @mixin expand() {
  2. .esri-expand {
  3. overflow: visible;
  4. min-height: $button-height;
  5. min-width: $button-width;
  6. }
  7. .esri-expand__container {
  8. position: relative;
  9. transition: 300ms;
  10. }
  11. .esri-expand__content {
  12. opacity: 0;
  13. width: 0;
  14. height: 0;
  15. z-index: 1;
  16. margin: 0 $side-spacing--quarter;
  17. @include defaultBoxShadow();
  18. transition: opacity 250ms ease-in-out, margin 250ms ease-in-out;
  19. overflow: hidden;
  20. visibility: hidden;
  21. }
  22. .esri-ui-top-left .esri-expand__content,
  23. .esri-ui-bottom-left .esri-expand__content {
  24. left: 100%;
  25. }
  26. .esri-ui-top-right .esri-expand__content,
  27. .esri-ui-bottom-right .esri-expand__content {
  28. right: 100%;
  29. }
  30. .esri-ui-top-left .esri-expand__content,
  31. .esri-ui-top-right .esri-expand__content {
  32. top: 0;
  33. }
  34. .esri-ui-bottom-left .esri-expand__content,
  35. .esri-ui-bottom-right .esri-expand__content {
  36. bottom: 0;
  37. }
  38. .esri-ui-top-left .esri-icon-expand,
  39. .esri-ui-bottom-left .esri-icon-expand,
  40. .esri-ui-top-left .esri-icon-collapse,
  41. .esri-ui-bottom-left .esri-icon-collapse {
  42. transform: rotate(180deg);
  43. }
  44. .esri-expand__content--expanded {
  45. opacity: 1;
  46. width: auto;
  47. height: auto;
  48. overflow: visible;
  49. margin-left: $side-spacing--half;
  50. margin-right: $side-spacing--half;
  51. visibility: visible;
  52. }
  53. .esri-expand__content .esri-widget {
  54. box-shadow: none;
  55. }
  56. .esri-expand__icon-number {
  57. position: absolute;
  58. top: $button-height--fifth * -1;
  59. display: flex;
  60. align-items: center;
  61. justify-content: center;
  62. font-size: $font-size--small;
  63. line-height: 1em;
  64. padding: 0.125em 0.333em;
  65. height: $button-height--half;
  66. border-radius: $button-height--half;
  67. background-color: $interactive-font-color;
  68. color: $background-color;
  69. transform-origin: 50%;
  70. animation: expand-number-intro-ani 1000ms ease-in-out;
  71. }
  72. .esri-ui-top-left .esri-expand__icon-number,
  73. .esri-ui-bottom-left .esri-expand__icon-number {
  74. right: $button-width--fifth * -1;
  75. }
  76. .esri-ui-top-right .esri-expand__icon-number,
  77. .esri-ui-bottom-right .esri-expand__icon-number {
  78. left: $button-width--fifth * -1;
  79. }
  80. .esri-ui-bottom-right .esri-expand__icon-number--expanded,
  81. .esri-ui-top-right .esri-expand__icon-number--expanded,
  82. .esri-ui-bottom-left .esri-expand__icon-number--expanded,
  83. .esri-ui-top-left .esri-expand__icon-number--expanded {
  84. position: static;
  85. top: auto;
  86. left: auto;
  87. right: auto;
  88. }
  89. .esri-expand__icon-number--expanded {
  90. display: none;
  91. }
  92. // Max heights
  93. .esri-view-height-greater-than-medium {
  94. .esri-ui-corner .esri-component .esri-expand__content {
  95. max-height: $view-height--gt-medium__component-max-height;
  96. }
  97. }
  98. .esri-view-height-medium {
  99. .esri-ui-corner .esri-component .esri-expand__content {
  100. max-height: $view-height--medium__component-max-height;
  101. }
  102. }
  103. .esri-view-height-small {
  104. .esri-ui-corner .esri-component .esri-expand__content {
  105. max-height: $view-height--small__component-max-height;
  106. }
  107. }
  108. .esri-view-height-xsmall {
  109. .esri-ui-corner .esri-component .esri-expand__content {
  110. max-height: $view-height--xsmall__component-max-height;
  111. }
  112. }
  113. @include expandPanelOpen("esri-expand--drawer");
  114. .esri-view-width-xsmall {
  115. @include expandPanelOpen("esri-expand--auto");
  116. }
  117. @include expandPanelClosed("esri-expand--floating");
  118. .esri-view-width-greater-than-xsmall {
  119. @include expandPanelClosed("esri-expand--auto");
  120. }
  121. @keyframes expand-slide-rtl-ani {
  122. from {
  123. right: -600px;
  124. }
  125. to {
  126. right: 0;
  127. }
  128. }
  129. @keyframes expand-slide-ltr-ani {
  130. from {
  131. left: -600px;
  132. }
  133. to {
  134. left: 0;
  135. }
  136. }
  137. @keyframes expand-number-intro-ani {
  138. 0% {
  139. transform: scale(1);
  140. }
  141. 50% {
  142. transform: scale(1);
  143. }
  144. 75% {
  145. transform: scale(1.25);
  146. }
  147. 100% {
  148. transform: scale(1);
  149. }
  150. }
  151. }
  152. @mixin expandPanelOpen($modeClass) {
  153. .#{$modeClass} {
  154. .esri-widget {
  155. max-width: 100%;
  156. width: 100%;
  157. }
  158. .esri-expand__container--expanded {
  159. position: fixed;
  160. top: 0;
  161. bottom: 0;
  162. margin: 0;
  163. height: 100%;
  164. background: $background-color;
  165. z-index: 1;
  166. overflow: auto;
  167. .esri-expand__panel {
  168. display: flex;
  169. justify-content: space-between;
  170. padding: 1.023rem;
  171. align-items: center;
  172. .esri-expand__icon-number--expanded {
  173. display: block;
  174. }
  175. }
  176. }
  177. .esri-expand__mask--expanded {
  178. background-color: #000;
  179. position: fixed;
  180. right: 0;
  181. top: 0;
  182. left: 0;
  183. width: 100%;
  184. height: 100%;
  185. bottom: 0;
  186. opacity: 0.8;
  187. z-index: 1;
  188. }
  189. }
  190. .esri-ui-top-right,
  191. .esri-ui-bottom-right {
  192. .#{$modeClass} {
  193. .esri-expand__panel {
  194. flex-flow: row nowrap;
  195. }
  196. .esri-expand__container--expanded {
  197. width: 75%;
  198. max-width: $panel-width;
  199. animation: expand-slide-rtl-ani 300ms forwards;
  200. }
  201. }
  202. }
  203. .esri-ui-top-left,
  204. .esri-ui-bottom-left {
  205. #{$modeClass} {
  206. .esri-expand__panel {
  207. flex-flow: row-reverse nowrap;
  208. }
  209. .esri-expand__container--expanded {
  210. width: 75%;
  211. max-width: $panel-width;
  212. animation: expand-slide-ltr-ani 300ms forwards;
  213. }
  214. }
  215. }
  216. }
  217. @mixin expandPanelClosed($modeClass) {
  218. .#{$modeClass} {
  219. .esri-expand__content {
  220. position: absolute;
  221. }
  222. .esri-expand__mask,
  223. .esri-expand__content-panel {
  224. display: none;
  225. }
  226. }
  227. }
  228. @if $include_Expand==true {
  229. @include expand();
  230. }