| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577 | ////////////////////////////////////////// Widget Common Mixins@use "sass:math";@mixin boxShadow($arguments) {  box-shadow: #{$arguments};}@mixin defaultBoxShadow() {  @include boxShadow("0 1px 2px rgba(0, 0, 0, 0.3)");}@mixin borderBoxShadow($color: $border-color) {  box-shadow: 0 0 0 1px $color;}@mixin cardBoxShadow($color: $border-color) {  box-shadow: 0 1px 0 $color;}@mixin pointerStyle($width, $height) {  content: "";  position: absolute;  width: $width + px;  height: $height + px;}@mixin outlineStyle() {  outline: 2px solid $interactive-font-color;  outline-offset: 2px;  z-index: 1;}@function sqrt($r) {  $x0: 1;  $x1: $x0;  @for $i from 1 through 10 {    $x1: $x0 - math.div($x0 * $x0 - abs($r), 2 * $x0);    $x0: $x1;  }  @return $x1;}@mixin contentMaxHeightDockedSide($contentHeight) {  $pageMenuHeight: $contentHeight - 60;  .esri-popup--is-docked {    &-top-left,    &-top-right,    &-bottom-left,    &-bottom-right {      .esri-popup__content {        max-height: #{$contentHeight}px;      }    }  }}@mixin popupHeight_BasedOnViewSize($height) {  $pageMenuHeight: $height - 50;  .esri-popup__main-container {    max-height: $height;  }  &.esri-popup--feature-menu-open {    .esri-popup__feature-menu-viewport {      max-height: $pageMenuHeight;    }  }}@mixin wordbreak() {  /* For Firefox */  white-space: pre-wrap;  word-break: break-all;  /**  * IE should ignore these.  * Modern browsers should override break-all.  */  word-wrap: break-word;  word-break: break-word;}@mixin measurementWidgetStyles($selector) {  .#{$selector} {    &__container {      position: relative;      padding: $cap-spacing 0;      overflow-y: auto;      a {        text-decoration: none;      }    }    &__header {      position: relative;      font-size: $font-size__body;      align-items: flex-start;      justify-content: space-between;      display: flex;      flex: 0 0 auto;    }    &__header-title,    h1 &__header-title {      font: {        size: $font-size__header-text;        weight: $font-weight--bold;      }      padding: 8px 0;      margin: 0;      display: block;      flex: 1;      word-break: break-word;      text-align: left;    }    &__panel--error {      color: $font-color--error;      padding: 0 $side-spacing;      animation: esri-fade-in 250ms ease-in-out;    }    &__hint {      padding: 0 $side-spacing;      animation: esri-fade-in 250ms ease-in-out;      &-text {        margin: $cap-spacing 0;        padding: 0;      }    }    &__measurement {      padding: $cap-spacing $side-spacing;      margin: $cap-spacing 0;      background-color: $background-color--offset;      animation: esri-fade-in 250ms ease-in-out;      &-item {        display: flex;        padding-bottom: $cap-spacing;        flex-flow: column;        &--disabled {          display: flex;          color: rgba($font-color, $opacity--disabled);        }        &-title {          padding-bottom: $cap-spacing--quarter;        }        &-value {          font-weight: $font-weight--bold;        }      }    }    &__settings {      display: flex;      justify-content: space-between;      padding: $cap-spacing--half $side-spacing;    }    &__units {      display: flex;      flex: 0 1 48%;      flex-flow: column;      padding: 0;      animation: esri-fade-in 250ms ease-in-out;      &:only-child {        flex: 1 0 100%;      }    }    &__units-select {      width: 100%;      padding: {        left: 0.5em;        right: 2.7em;      }      &-wrapper {        width: 100%;      }    }    &__actions {      display: flex;      flex-flow: column;      justify-content: center;      padding: 0 $side-spacing;    }  }  [dir="rtl"] {    .#{$selector}__units-select {      padding: {        left: 2.7em;        right: 0.5em;      }    }  }}// Smart Mapping Sliders@mixin smartMappingSlider($class) {  .#{$class} {    direction: ltr;    min-width: $smartmapping-slider__width;    .esri-slider {      font-size: $font-size--small;      position: relative;      z-index: 1;      .esri-slider__content {        flex-direction: row;        height: $smartmapping-slider__base-height;        margin: 0 auto 0 40%;      }      .esri-slider__track {        background-color: transparent;        display: flex;        flex: 0 0 auto;      }      .esri-slider__anchor {        border-bottom: 1px solid $interactive-font-color;        border-top: 1px solid $background-color;        width: $smartmapping-slider__ramp-width;        &:hover,        &:focus {          .esri-slider__label {            text-decoration: underline;          }          .esri-slider__thumb {            background-color: $interactive-font-color--hover;            border: none;            transform: none;            &:after {              border-left-color: $interactive-font-color--hover;            }            &:before {              background-color: $button-color--bright;              transform: translate3d(-$smartmapping-slider__thumb-size--offset * 0.25, 0, 0);            }          }        }      }      .esri-slider__thumb {        background-color: $smartmapping-slider__thumb-background-color;        border-radius: 0;        border: none;        height: $smartmapping-slider__thumb-size;        left: -$smartmapping-slider__thumb-size;        top: -$smartmapping-slider__thumb-size--offset;        width: $smartmapping-slider__thumb-size--offset;        &:before {          position: absolute;          top: 0;          left: -$smartmapping-slider__thumb-size--offset * 0.25;          width: $smartmapping-slider__thumb-size--offset * 0.5;          content: "";          height: $smartmapping-slider__thumb-size;          background-color: $interactive-font-color;          transition: transform 125ms ease-in-out, background-color 125ms ease-in-out;        }        &:after {          position: absolute;          top: 0;          left: $smartmapping-slider__thumb-size--offset;          content: "";          border-bottom: $smartmapping-slider__thumb-pointer-size solid #0000;          border-left: $smartmapping-slider__thumb-pointer-size solid $interactive-font-color;          border-top: $smartmapping-slider__thumb-pointer-size solid #0000;          height: 0;          width: 0;        }      }      .esri-slider__label {        left: auto;        line-height: 20px;        min-width: 50px;        right: 50px;        text-align: right;        &:hover {          background-color: $background-color--hover;        }      }      .esri-slider__segment {        &:hover {          cursor: default;        }      }      .esri-slider__range-input {        margin: auto;        text-align: center;        width: 50%;      }      .esri-slider__label-input {        text-align: right;        width: 70px;      }      .esri-slider__max,      .esri-slider__min {        flex: none;        margin: $cap-spacing--three-quarters auto;        padding: $cap-spacing--three-quarters $cap-spacing;        position: relative;        width: auto;        z-index: 0;        &:before {          content: "";          position: absolute;          left: 0;          top: 0;          height: 100%;          width: 100%;          z-index: -1;        }        &.esri-slider__range--active {          background-color: $background-color;        }        .esri-slider__range-input {          margin: 0 auto;        }      }      .esri-slider__extra-content {        display: flex;        height: 100%;      }      .esri-histogram__svg {        overflow: visible;      }      .esri-histogram__label {        fill: $font-color;        stroke-width: 2;      }      .esri-histogram__average-line,      .esri-histogram__label {        paint-order: stroke;        stroke: $background-color;      }      .zoom-cap--max {        position: absolute;        top: 0;      }      .zoom-cap--min {        position: absolute;        bottom: 0;      }      .zoom-cap {        height: 11px;        width: $smartmapping-slider__ramp-width;        stroke-width: 0;        .zoom-cap--mask {          fill: #fff;        }        .zoom-cap--line {          fill: #fff;        }        .zoom-cap--underline {          fill: #323232;        }        &:hover {          cursor: pointer;          .zoom-cap--mask {            fill: #fff;          }          .zoom-cap--line {            fill: #0079c1;          }          .zoom-cap--underline {            fill: #fff;          }        }      }    }  }  .#{$class}__ramp {    display: flex;    height: 100%;    width: $smartmapping-slider__ramp-width;    position: relative;    svg {      height: 100%;      width: 100%;      position: absolute;      stroke: $smartmapping-slider__ramp-stroke-color;      stroke-width: $smartmapping-slider__ramp-stroke-width;      left: 0;      rect {        height: 100%;        width: 100%;      }      path {        stroke-width: $smartmapping-slider__ramp-path-stroke-width;      }    }  }  .#{$class}__histogram-container {    display: flex;    flex: 1 1 0;    height: 100%;    width: $smartmapping-slider__histogram-width;  }  .#{$class}.#{$class}--interactive-track {    .esri-slider {      .esri-slider__content {        margin: 0 auto 0 35%;      }      .esri-slider__track {        background-color: transparent;        width: 12px;      }    }    .esri-slider__anchor--active {      .esri-slider__label {        text-decoration: underline;      }      .esri-slider__thumb {        background-color: $interactive-font-color--hover;        border: none;        transform: none;        &:after {          border-left-color: $interactive-font-color--hover;        }        &:before {          background-color: $button-color--bright;          transform: translate3d(-$smartmapping-slider__thumb-size--offset * 0.25, 0, 0);        }      }    }    .esri-slider__segment--interactive {      background-size: 12px 100%;      background-repeat: no-repeat;      background-position: 50% 50%;      background-image: url(../base/images/SM-Slider_TrackBackground_idle.svg);      &.esri-slider__segment--active {        background-color: #eee;        background-image: url(../base/images/SM-Slider_TrackBackground_hover.svg);      }      &:hover,      &:focus {        cursor: pointer;        background-color: #eee;        background-image: url(../base/images/SM-Slider_TrackBackground_hover.svg);      }    }  }}@mixin loopingProgressBar($selector) {  #{$selector}:before,  #{$selector}:after {    content: "";    opacity: 1;    position: absolute;    height: 1px;    top: 0;    transition: opacity 500ms ease-in-out;  }  #{$selector}:before {    background-color: $border-color;    width: 100%;    z-index: 0;  }  #{$selector}:after {    background-color: $interactive-font-color;    width: $looping-progress-bar-width;    z-index: 0;    animation: looping-progresss-bar-ani $looping-progress-bar-params;  }}/** * Adds the base styles for an arrow facing down. */@mixin arrowButton() {  $size: 18px;  $icon-size: 10px;  $padding: ($size - $icon-size) * 0.5;  font-size: $icon-size;  line-height: $icon-size;  width: $size;  height: $size;  padding: $padding;  cursor: pointer;  transition: all 0.1s ease-in-out;  text-align: center;  border: none;  background: none;  appearance: none;  @each $icomoon-selector in $icomoon-selectors {    @extend #{$icomoon-selector};  }  @extend .esri-icon-left;  &:hover:not(:disabled) {    background: $background-color--hover;  }  &:disabled {    opacity: 0.4;    cursor: default;  }  &.esri-arrow-down {    transform: rotate(-90deg);  }  &.esri-arrow-up {    transform: rotate(90deg);  }  &.esri-arrow-left {    transform: rotate(0deg);  }  &.esri-arrow-right {    transform: rotate(180deg);  }}/*** Styles for Sortable*/@mixin sortableChosen($selector) {  transition: background-color 125ms ease-in-out;  &.#{$selector} {    background-color: $background-color--active;    opacity: $opacity--sortable;  }}
 |