2021-07-10 00:45:44 +00:00
|
|
|
import { css } from 'lit';
|
2022-03-23 13:30:39 +00:00
|
|
|
import componentStyles from '../../styles/component.styles';
|
2021-07-10 00:45:44 +00:00
|
|
|
|
|
|
|
export default css`
|
|
|
|
${componentStyles}
|
|
|
|
|
|
|
|
:host {
|
|
|
|
--size: 25rem;
|
|
|
|
--header-spacing: var(--sl-spacing-large);
|
|
|
|
--body-spacing: var(--sl-spacing-large);
|
|
|
|
--footer-spacing: var(--sl-spacing-large);
|
|
|
|
|
|
|
|
display: contents;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer {
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
pointer-events: none;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer--contained {
|
|
|
|
position: absolute;
|
|
|
|
z-index: initial;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer--fixed {
|
|
|
|
position: fixed;
|
|
|
|
z-index: var(--sl-z-index-drawer);
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer__panel {
|
|
|
|
position: absolute;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
z-index: 2;
|
|
|
|
max-width: 100%;
|
|
|
|
max-height: 100%;
|
2021-11-18 22:41:03 +00:00
|
|
|
background-color: var(--sl-panel-background-color);
|
2021-07-10 00:45:44 +00:00
|
|
|
box-shadow: var(--sl-shadow-x-large);
|
|
|
|
transition: var(--sl-transition-medium) transform;
|
|
|
|
overflow: auto;
|
|
|
|
pointer-events: all;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer__panel:focus {
|
|
|
|
outline: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer--top .drawer__panel {
|
|
|
|
top: 0;
|
|
|
|
right: auto;
|
|
|
|
bottom: auto;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: var(--size);
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer--end .drawer__panel {
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: auto;
|
|
|
|
left: auto;
|
|
|
|
width: var(--size);
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer--bottom .drawer__panel {
|
|
|
|
top: auto;
|
|
|
|
right: auto;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: var(--size);
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer--start .drawer__panel {
|
|
|
|
top: 0;
|
|
|
|
right: auto;
|
|
|
|
bottom: auto;
|
|
|
|
left: 0;
|
|
|
|
width: var(--size);
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer__header {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer__title {
|
|
|
|
flex: 1 1 auto;
|
2022-01-24 22:27:24 +00:00
|
|
|
font: inherit;
|
2021-07-10 00:45:44 +00:00
|
|
|
font-size: var(--sl-font-size-large);
|
|
|
|
line-height: var(--sl-line-height-dense);
|
|
|
|
padding: var(--header-spacing);
|
2022-01-24 22:27:24 +00:00
|
|
|
margin: 0;
|
2021-07-10 00:45:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.drawer__close {
|
|
|
|
flex: 0 0 auto;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
font-size: var(--sl-font-size-x-large);
|
|
|
|
padding: 0 var(--header-spacing);
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer__body {
|
|
|
|
flex: 1 1 auto;
|
|
|
|
padding: var(--body-spacing);
|
|
|
|
overflow: auto;
|
|
|
|
-webkit-overflow-scrolling: touch;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer__footer {
|
|
|
|
text-align: right;
|
|
|
|
padding: var(--footer-spacing);
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer__footer ::slotted(sl-button:not(:last-of-type)) {
|
|
|
|
margin-right: var(--sl-spacing-x-small);
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer:not(.drawer--has-footer) .drawer__footer {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer__overlay {
|
|
|
|
display: block;
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
2021-11-18 22:41:03 +00:00
|
|
|
background-color: var(--sl-overlay-background-color);
|
2021-07-10 00:45:44 +00:00
|
|
|
pointer-events: all;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drawer--contained .drawer__overlay {
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
`;
|