_Search.scss 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. $search_width: 240px !default;
  2. @mixin clearBorders($exception-side: "", $exception-value: "") {
  3. $border-sides: top, right, bottom, left;
  4. @each $border-side in $border-sides {
  5. @if $border-side == $exception-side {
  6. border-#{$exception-side}: $exception-value;
  7. } @else {
  8. border-#{$border-side}: none;
  9. }
  10. }
  11. }
  12. @mixin search() {
  13. .esri-search {
  14. width: $search_width;
  15. display: flex;
  16. flex-flow: row nowrap;
  17. justify-content: center;
  18. align-items: center;
  19. overflow: visible;
  20. .esri-widget--button {
  21. box-shadow: none;
  22. }
  23. .esri-icon-notice-triangle {
  24. font-size: 16px;
  25. line-height: 16px;
  26. margin: 0 5px 0 0;
  27. vertical-align: text-bottom;
  28. }
  29. .esri-widget__loader {
  30. align-items: center;
  31. display: flex;
  32. justify-content: center;
  33. min-height: $button-height;
  34. }
  35. .esri-widget__loader-text {
  36. margin: 0 $side-spacing--third;
  37. }
  38. }
  39. .esri-search__container,
  40. .esri-search__input-container,
  41. .esri-search__form {
  42. display: flex;
  43. flex-flow: row nowrap;
  44. }
  45. .esri-search__container {
  46. position: relative;
  47. align-items: stretch;
  48. flex: 1 0 100%;
  49. .esri-search__input,
  50. .esri-widget--button {
  51. z-index: 0;
  52. }
  53. .esri-search__input:focus,
  54. .esri-widget--button:focus {
  55. z-index: 1;
  56. }
  57. }
  58. @include loopingProgressBar(".esri-search--searching");
  59. .esri-search__input-container {
  60. align-items: stretch;
  61. flex: 2 0;
  62. }
  63. .esri-search__form {
  64. padding: 0;
  65. margin: 0;
  66. align-items: stretch;
  67. flex: 1 0;
  68. }
  69. .esri-search__input {
  70. display: block;
  71. width: 100%;
  72. margin: 0;
  73. border: none;
  74. box-shadow: none;
  75. }
  76. .esri-search__input::-ms-clear {
  77. display: none;
  78. }
  79. .esri-search__input::-moz-placeholder {
  80. color: $font-color--placeholder;
  81. opacity: 1;
  82. }
  83. .esri-search__input:-ms-input-placeholder {
  84. color: $font-color--placeholder;
  85. }
  86. .esri-search__input::-webkit-input-placeholder {
  87. color: $font-color--placeholder;
  88. }
  89. .esri-search__submit-button,
  90. .esri-search__sources-button {
  91. cursor: pointer;
  92. align-self: flex-end;
  93. }
  94. .esri-search__submit-button {
  95. @include clearBorders(left, solid 1px $border-color);
  96. }
  97. .esri-search__sources-button {
  98. @include clearBorders(right, solid 1px $border-color);
  99. }
  100. .esri-search__sources-button--up {
  101. display: none;
  102. }
  103. .esri-search__clear-button {
  104. @include clearBorders();
  105. align-self: flex-end;
  106. display: flex;
  107. }
  108. .esri-search__source-name {
  109. clip: rect(0 0 0 0);
  110. overflow: hidden;
  111. position: absolute;
  112. height: 1px;
  113. width: 1px;
  114. }
  115. .esri-search__suggestions-menu [class^="esri-icon"] {
  116. vertical-align: middle;
  117. }
  118. .esri-search__suggestions-menu .esri-menu__header:first-child,
  119. .esri-search__suggestions-menu ul:first-child {
  120. border: none;
  121. }
  122. .esri-search--show-suggestions .esri-search__suggestions-menu,
  123. .esri-search--sources .esri-search__sources-menu {
  124. overflow: auto;
  125. visibility: visible;
  126. max-height: 300px;
  127. animation: esri-fade-in 250ms ease-out;
  128. }
  129. .esri-search__source--active {
  130. background-color: $background-color--active;
  131. }
  132. .esri-search--warning .esri-search__warning-menu {
  133. transition: opacity 125ms ease-in-out;
  134. visibility: visible;
  135. opacity: 1;
  136. max-height: inherit;
  137. }
  138. .esri-search__sources-button {
  139. display: flex;
  140. }
  141. .esri-search--multiple-sources .esri-search__input {
  142. border-left: 0;
  143. }
  144. .esri-search__warning-menu {
  145. z-index: 1;
  146. font-size: 14px;
  147. opacity: 0;
  148. }
  149. .esri-search__warning-body {
  150. padding: 0.8em 1em;
  151. }
  152. .esri-search__warning-header {
  153. font-weight: $font-weight--bold;
  154. margin-bottom: 5px;
  155. }
  156. .esri-ui-bottom-left,
  157. .esri-ui-bottom-right {
  158. .esri-search__sources-button--up {
  159. display: flex;
  160. }
  161. .esri-search__sources-button--down {
  162. display: none;
  163. }
  164. }
  165. .esri-view-width-less-than-small .esri-search__input {
  166. font-size: 16px;
  167. }
  168. html[dir="rtl"] {
  169. .esri-search__submit-button {
  170. border-left: none;
  171. border-right: solid 1px $border-color;
  172. }
  173. .esri-search__sources-button {
  174. border-right: none;
  175. border-left: solid 1px $border-color;
  176. }
  177. .esri-search__container:after {
  178. animation: looping-progresss-bar-ani $looping-progress-bar-params reverse;
  179. }
  180. }
  181. }
  182. @if $include_Search == true {
  183. @include search();
  184. }