diff --git a/projects/components/src/overlay/sheet/sheet-overlay.component.scss b/projects/components/src/overlay/sheet/sheet-overlay.component.scss index f0301234c..716c5d678 100644 --- a/projects/components/src/overlay/sheet/sheet-overlay.component.scss +++ b/projects/components/src/overlay/sheet/sheet-overlay.component.scss @@ -1,8 +1,10 @@ @import 'color-palette'; @import 'font'; +$box-shadow: -3px 0px 24px rgba(0, 0, 0, 0.12), -1px 0px 8px rgba(0, 0, 0, 0.08); + .sheet-overlay { - box-shadow: -3px 1px 24px rgba(0, 0, 0, 0.12), -1px -1px 8px rgba(0, 0, 0, 0.08); + box-shadow: $box-shadow; border-radius: 16px 0 0 16px; height: 100%; overflow: hidden; @@ -33,6 +35,15 @@ width: 1280px; } + &.collapsed { + width: 0; + padding: 0; + } + + &.animate { + transition: width 0.75s; + } + .header { display: flex; justify-content: space-between; @@ -62,3 +73,25 @@ } } } + +.collapse-expand-trigger { + cursor: pointer; + box-shadow: $box-shadow; + background: white; + width: 200px; + height: 40px; + float: left; + position: relative; + top: -50%; + left: -20px; + border-radius: 8px 8px 0 0; + display: flex; + align-items: center; + justify-content: center; + transform: translate(-50%, -50%) rotate(270deg); + clip-path: inset(-20px -20px 0px -20px); + + &.collapsed { + left: 180px; + } +} diff --git a/projects/components/src/overlay/sheet/sheet-overlay.component.ts b/projects/components/src/overlay/sheet/sheet-overlay.component.ts index f9f2e3937..70d7ab369 100644 --- a/projects/components/src/overlay/sheet/sheet-overlay.component.ts +++ b/projects/components/src/overlay/sheet/sheet-overlay.component.ts @@ -1,6 +1,7 @@ import { ChangeDetectionStrategy, Component, HostListener, Inject, Injector, TemplateRef, Type } from '@angular/core'; import { IconType } from '@hypertrace/assets-library'; import { GLOBAL_HEADER_HEIGHT, LayoutChangeService } from '@hypertrace/common'; +import { isNil } from 'lodash-es'; import { ButtonStyle } from '../../button/button'; import { PopoverFixedPositionLocation, POPOVER_DATA } from '../../popover/popover'; import { PopoverRef } from '../../popover/popover-ref'; @@ -12,7 +13,15 @@ import { SheetOverlayConfig, SheetSize } from './sheet'; styleUrls: ['./sheet-overlay.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, template: ` -