|
@@ -1,307 +0,0 @@
|
|
|
-$arrowPointerEvents: null;
|
|
|
|
|
-$color: inherit;
|
|
|
|
|
-$useDropShadow: false;
|
|
|
|
|
-$arrowSize: 1rem;
|
|
|
|
|
-$backgroundColor: $btn-secondary-bg;
|
|
|
|
|
-$color: $text-color;
|
|
|
|
|
-$useDropShadow: false;
|
|
|
|
|
-$attachmentOffset: $arrowSize;
|
|
|
|
|
-$easing: cubic-bezier(0, 0, 0.265, 1.55);
|
|
|
|
|
-
|
|
|
|
|
-.drop-element {
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- display: none;
|
|
|
|
|
-
|
|
|
|
|
- &.drop-open {
|
|
|
|
|
- display: block;
|
|
|
|
|
- // hide when out of bounds
|
|
|
|
|
- &.drop-out-of-bounds {
|
|
|
|
|
- display: none;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- ul {
|
|
|
|
|
- margin: 0 0 1rem 1rem;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.drop-element, .drop-element * {
|
|
|
|
|
- box-sizing: border-box;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.drop-element.drop-popover {
|
|
|
|
|
- max-width: 100%;
|
|
|
|
|
- max-height: 100%;
|
|
|
|
|
-
|
|
|
|
|
- .drop-content {
|
|
|
|
|
- border-radius: $border-radius-lg;
|
|
|
|
|
- position: relative;
|
|
|
|
|
- font-family: inherit;
|
|
|
|
|
- background: $backgroundColor;
|
|
|
|
|
- color: $color;
|
|
|
|
|
- padding: 1em;
|
|
|
|
|
- font-size: $font-size-sm;
|
|
|
|
|
- max-width: 20rem;
|
|
|
|
|
-
|
|
|
|
|
- @if $useDropShadow {
|
|
|
|
|
- transform: translateZ(0);
|
|
|
|
|
- filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .2));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- content: "";
|
|
|
|
|
- display: block;
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- width: 0;
|
|
|
|
|
- height: 0;
|
|
|
|
|
- border-color: transparent;
|
|
|
|
|
- border-width: $arrowSize;
|
|
|
|
|
- border-style: solid;
|
|
|
|
|
- pointer-events: $arrowPointerEvents;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // Centers and middles
|
|
|
|
|
-
|
|
|
|
|
- &.drop-element-attached-bottom.drop-element-attached-center .drop-content {
|
|
|
|
|
- margin-bottom: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- top: 100%;
|
|
|
|
|
- left: 50%;
|
|
|
|
|
- margin-left: - $arrowSize;
|
|
|
|
|
- border-top-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.drop-element-attached-top.drop-element-attached-center .drop-content {
|
|
|
|
|
- margin-top: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- bottom: 100%;
|
|
|
|
|
- left: 50%;
|
|
|
|
|
- margin-left: - $arrowSize;
|
|
|
|
|
- border-bottom-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.drop-element-attached-right.drop-element-attached-middle .drop-content {
|
|
|
|
|
- margin-right: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- left: 100%;
|
|
|
|
|
- top: 50%;
|
|
|
|
|
- margin-top: - $arrowSize;
|
|
|
|
|
- border-left-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.drop-element-attached-left.drop-element-attached-middle .drop-content {
|
|
|
|
|
- margin-left: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- right: 100%;
|
|
|
|
|
- top: 50%;
|
|
|
|
|
- margin-top: - $arrowSize;
|
|
|
|
|
- border-right-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // Target middle/center, element corner
|
|
|
|
|
- &.drop-element-attached-left.drop-target-attached-center .drop-content {
|
|
|
|
|
- left: - $arrowSize * 2;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.drop-element-attached-right.drop-target-attached-center .drop-content {
|
|
|
|
|
- left: $arrowSize * 2;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.drop-element-attached-top.drop-element-attached-left.drop-target-attached-middle .drop-content {
|
|
|
|
|
- margin-top: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- bottom: 100%;
|
|
|
|
|
- left: $arrowSize;
|
|
|
|
|
- border-bottom-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.drop-element-attached-top.drop-element-attached-right.drop-target-attached-middle .drop-content {
|
|
|
|
|
- margin-top: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- bottom: 100%;
|
|
|
|
|
- right: $arrowSize;
|
|
|
|
|
- border-bottom-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-middle .drop-content {
|
|
|
|
|
- margin-bottom: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- top: 100%;
|
|
|
|
|
- left: $arrowSize;
|
|
|
|
|
- border-top-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-middle .drop-content {
|
|
|
|
|
- margin-bottom: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- top: 100%;
|
|
|
|
|
- right: $arrowSize;
|
|
|
|
|
- border-top-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // Top and bottom corners
|
|
|
|
|
- &.drop-element-attached-top.drop-element-attached-left.drop-target-attached-bottom .drop-content {
|
|
|
|
|
- margin-top: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- bottom: 100%;
|
|
|
|
|
- left: $arrowSize;
|
|
|
|
|
- border-bottom-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.drop-element-attached-top.drop-element-attached-right.drop-target-attached-bottom .drop-content {
|
|
|
|
|
- margin-top: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- bottom: 100%;
|
|
|
|
|
- right: $arrowSize;
|
|
|
|
|
- border-bottom-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-top .drop-content {
|
|
|
|
|
- margin-bottom: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- top: 100%;
|
|
|
|
|
- left: $arrowSize;
|
|
|
|
|
- border-top-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-top .drop-content {
|
|
|
|
|
- margin-bottom: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- top: 100%;
|
|
|
|
|
- right: $arrowSize;
|
|
|
|
|
- border-top-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // Side corners
|
|
|
|
|
- &.drop-element-attached-top.drop-element-attached-right.drop-target-attached-left .drop-content {
|
|
|
|
|
- margin-right: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- top: $arrowSize;
|
|
|
|
|
- left: 100%;
|
|
|
|
|
- border-left-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.drop-element-attached-top.drop-element-attached-left.drop-target-attached-right .drop-content {
|
|
|
|
|
- margin-left: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- top: $arrowSize;
|
|
|
|
|
- right: 100%;
|
|
|
|
|
- border-right-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.drop-element-attached-bottom.drop-element-attached-right.drop-target-attached-left .drop-content {
|
|
|
|
|
- margin-right: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- bottom: $arrowSize;
|
|
|
|
|
- left: 100%;
|
|
|
|
|
- border-left-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- &.drop-element-attached-bottom.drop-element-attached-left.drop-target-attached-right .drop-content {
|
|
|
|
|
- margin-left: $arrowSize;
|
|
|
|
|
-
|
|
|
|
|
- &:before {
|
|
|
|
|
- bottom: $arrowSize;
|
|
|
|
|
- right: 100%;
|
|
|
|
|
- border-right-color: $backgroundColor;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-@mixin drop-animation-scale($themePrefix: "drop", $themeName: "default", $attachmentOffset: 0, $easing: "linear") {
|
|
|
|
|
- .#{$themePrefix}-element.#{$themePrefix}-#{$themeName} {
|
|
|
|
|
- transform: translateZ(0);
|
|
|
|
|
- transition: opacity 100ms;
|
|
|
|
|
- opacity: 0;
|
|
|
|
|
- .#{$themePrefix}-content {
|
|
|
|
|
- transition: transform 0.2s $easing;
|
|
|
|
|
- transform: scale(0) translateZ(0);
|
|
|
|
|
- }
|
|
|
|
|
- &.#{$themePrefix}-open {
|
|
|
|
|
- display: none;
|
|
|
|
|
- }
|
|
|
|
|
- &.#{$themePrefix}-open-transitionend {
|
|
|
|
|
- display: block;
|
|
|
|
|
- }
|
|
|
|
|
- &.#{$themePrefix}-after-open {
|
|
|
|
|
- transition: none;
|
|
|
|
|
- opacity: 1;
|
|
|
|
|
- .#{$themePrefix}-content {
|
|
|
|
|
- transform: scale(1) translateZ(0);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- // Centers and middles
|
|
|
|
|
- &.#{$themePrefix}-element-attached-bottom.#{$themePrefix}-element-attached-center .#{$themePrefix}-content {
|
|
|
|
|
- transform-origin: 50% calc(100% + #{$attachmentOffset});
|
|
|
|
|
- }
|
|
|
|
|
- &.#{$themePrefix}-element-attached-top.#{$themePrefix}-element-attached-center .#{$themePrefix}-content {
|
|
|
|
|
- transform-origin: 50% (-$attachmentOffset);
|
|
|
|
|
- }
|
|
|
|
|
- &.#{$themePrefix}-element-attached-right.#{$themePrefix}-element-attached-middle .#{$themePrefix}-content {
|
|
|
|
|
- transform-origin: calc(100% + #{$attachmentOffset}) 50%;
|
|
|
|
|
- }
|
|
|
|
|
- &.#{$themePrefix}-element-attached-left.#{$themePrefix}-element-attached-middle .#{$themePrefix}-content {
|
|
|
|
|
- transform-origin: -($attachmentOffset 50%);
|
|
|
|
|
- }
|
|
|
|
|
- // Top and bottom corners
|
|
|
|
|
- &.#{$themePrefix}-element-attached-top.#{$themePrefix}-element-attached-left.#{$themePrefix}-target-attached-bottom .#{$themePrefix}-content {
|
|
|
|
|
- transform-origin: 0 (-$attachmentOffset);
|
|
|
|
|
- }
|
|
|
|
|
- &.#{$themePrefix}-element-attached-top.#{$themePrefix}-element-attached-right.#{$themePrefix}-target-attached-bottom .#{$themePrefix}-content {
|
|
|
|
|
- transform-origin: 100% (-$attachmentOffset);
|
|
|
|
|
- }
|
|
|
|
|
- &.#{$themePrefix}-element-attached-bottom.#{$themePrefix}-element-attached-left.#{$themePrefix}-target-attached-top .#{$themePrefix}-content {
|
|
|
|
|
- transform-origin: 0 calc(100% + #{$attachmentOffset});
|
|
|
|
|
- }
|
|
|
|
|
- &.#{$themePrefix}-element-attached-bottom.#{$themePrefix}-element-attached-right.#{$themePrefix}-target-attached-top .#{$themePrefix}-content {
|
|
|
|
|
- transform-origin: 100% calc(100% + #{$attachmentOffset});
|
|
|
|
|
- }
|
|
|
|
|
- // Side corners
|
|
|
|
|
- &.#{$themePrefix}-element-attached-top.#{$themePrefix}-element-attached-right.#{$themePrefix}-target-attached-left .#{$themePrefix}-content {
|
|
|
|
|
- transform-origin: calc(100% + #{$attachmentOffset}) 0;
|
|
|
|
|
- }
|
|
|
|
|
- &.#{$themePrefix}-element-attached-top.#{$themePrefix}-element-attached-left.#{$themePrefix}-target-attached-right .#{$themePrefix}-content {
|
|
|
|
|
- transform-origin: (-$attachmentOffset) 0;
|
|
|
|
|
- }
|
|
|
|
|
- &.#{$themePrefix}-element-attached-bottom.#{$themePrefix}-element-attached-right.#{$themePrefix}-target-attached-left .#{$themePrefix}-content {
|
|
|
|
|
- transform-origin: calc(100% + #{$attachmentOffset}) 100%;
|
|
|
|
|
- }
|
|
|
|
|
- &.#{$themePrefix}-element-attached-bottom.#{$themePrefix}-element-attached-left.#{$themePrefix}-target-attached-right .#{$themePrefix}-content {
|
|
|
|
|
- transform-origin: (-$attachmentOffset) 100%;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-@include drop-animation-scale("drop", "popover", $attachmentOffset: $attachmentOffset, $easing: $easing);
|
|
|