|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368 |
- import { css } from '@tesseract-design/css-utils';
- import {LayoutArgs} from '../common';
-
- export const ContentBase = () => css.cx(
- css`
- box-sizing: border-box;
- padding-bottom: var(--size-menu, 4rem);
- `,
- css.media('(min-width: 1080px)')(
- css`
- padding-left: calc(50% - var(--base-width) * 0.5);
- padding-bottom: 0;
- `,
- ),
- )
-
- export const SidebarBase = () => css.cx(
- css`
- box-sizing: border-box;
- overflow: hidden;
- display: contents;
- left: calc(var(--base-width) * -1);
- `,
- css.media('(min-width: 1080px)')(
- css`
- position: fixed;
- top: 0;
- left: 0;
- width: calc(50% - var(--base-width) * 0.5);
- height: 100%;
- display: block;
- `,
- ),
- )
-
- export const SidebarMain = ({
- mainSidebarOpen,
- }: LayoutArgs) => css.cx(
- css`
- box-sizing: border-box;
- position: fixed;
- top: 0;
- width: 100%;
- height: 100%;
- padding-top: inherit;
- padding-bottom: var(--size-menu, 4rem);
- z-index: 2;
- > * {
- display: block;
- width: 100%;
- height: 100%;
- background-color: white;
- }
- `,
- css.media('(min-width: 1080px)')(
- css`
- position: absolute;
- right: 0;
- width: calc(var(--base-width) - var(--size-menu, 4rem));
- margin-left: 0;
- padding-bottom: 0;
- `,
- ),
- css.dynamic({
- right: mainSidebarOpen ? 0 : '100%',
- }),
- )
-
- export const SidebarMainOverflow = () => css.cx(
- css`
- width: 100%;
- height: 100%;
- overflow: auto; /* overflow: overlay */
- scrollbar-width: none;
- position: relative;
- z-index: 1;
- ::-webkit-scrollbar {
- display: none;
- }
- `
- )
-
- export const SidebarMenu = () => css.cx(
- css`
- box-sizing: border-box;
- overflow: auto; /* overflow: overlay */
- scrollbar-width: none;
- ::-webkit-scrollbar {
- display: none;
- }
- position: fixed;
- bottom: 0;
- left: 0;
- width: 100%;
- height: var(--size-menu, 4rem);
- z-index: 1;
- > * {
- display: block;
- width: 100%;
- height: 100%;
- background-color: white;
- }
- `,
- css.media('(min-width: 1080px)')(
- css`
- top: 0;
- margin-left: auto;
- position: absolute;
- height: 100%;
- padding-top: inherit;
- overflow: auto;
- z-index: auto;
- `,
- ),
- );
-
- export const SidebarMenuSize = () => css.cx(
- css`
- display: flex;
- width: 100%;
- height: 100%;
- max-width: calc(var(--base-width) * 2);
- margin: 0 auto;
- position: relative;
- z-index: 1;
- `,
- css.media('(min-width: 1080px)')(
- css`
- max-width: none;
- margin-right: 0;
- flex-direction: column;
- justify-content: space-between;
- align-items: flex-end;
- `,
- ),
- );
-
- export const SidebarMenuGroup = () => css.cx(
- css`
- display: contents;
- `,
- css.media('(min-width: 1080px)')(
- css`
- width: 100%;
- display: block;
- `,
- ),
- );
-
- export const MoreItems = ({
- mainSidebarOpen,
- }: LayoutArgs) => css.cx(
- css`
- position: fixed;
- top: 0;
- width: 100%;
- height: 100%;
- padding-top: var(--height-topbar, 4rem);
- padding-bottom: var(--size-menu, 4rem);
- z-index: -1;
- box-sizing: border-box;
- `,
- css.media('(min-width: 1080px)')(
- css`
- display: contents;
- `,
- ),
- css.dynamic({
- left: mainSidebarOpen ? 0 : '-100%',
- }),
- );
-
- export const MoreItemsScroll = () => css.cx(
- css`
- width: 100%;
- height: 100%;
- overflow: auto;
- `,
- css.media('(min-width: 1080px)')(
- css`
- display: contents;
- `,
- ),
- );
-
- export const MorePrimarySidebarMenuGroup = () => css.cx(
- css.media('(min-width: 1080px)')(
- css`
- flex: auto;
- `,
- ),
- );
-
- export const MoreSecondarySidebarMenuGroup = () => css.cx(
- css.media('(min-width: 1080px)')(
- css`
- order: 4;
- `,
- ),
- );
-
- export const SidebarMenuItem = () => css.cx(
- css`
- width: 0;
- flex: auto;
- height: var(--size-menu, 4rem);
- > * {
- height: 100%;
- display: flex;
- align-items: center;
- text-decoration: none;
- width: 100%;
- }
- `,
- css.media('(min-width: 1080px)')(
- css`
- width: auto !important;
- flex: 0 1 auto;
- > * {
- height: auto;
- }
- `
- ),
- );
-
- export const MoreSidebarMenuItem = () => css.cx(
- css`
- width: 0;
- flex: auto;
- height: var(--size-menu, 4rem);
- > * {
- height: 100%;
- display: flex;
- align-items: center;
- text-decoration: none;
- width: 100%;
- }
- `,
- css.media('(min-width: 1080px)')(
- css`
- width: auto !important;
- flex: 0 1 auto;
- `,
- ),
- );
-
- export const MoreToggleSidebarMenuItem = () => css.cx(
- css`
- width: 0;
- flex: auto;
- height: var(--size-menu, 4rem);
- > * {
- height: 100%;
- display: flex;
- align-items: center;
- text-decoration: none;
- width: 100%;
- }
- `,
- css.media('(min-width: 1080px)')(
- css`
- display: none;
- `,
- ),
- );
-
- export const SidebarMenuItemIcon = () => css.cx(
- css`
- display: block;
- `,
- css.media('(min-width: 1080px)')(
- css`
- width: var(--size-menu, 4rem);
- height: var(--size-menu, 4rem);
- display: grid;
- place-content: center;
- `,
- ),
- );
-
- export const MoreSidebarMenuItemItem = () => css.cx(
- css`
- margin-right: 1rem;
- display: block;
- `,
- css.media('(min-width: 1080px)')(
- css`
- width: var(--size-menu, 4rem);
- height: var(--size-menu, 4rem);
- display: grid;
- place-content: center;
- margin-right: 0;
- `,
- ),
- );
-
- export const SidebarMenuContainer = () => css.cx(
- css`
- box-sizing: border-box;
- display: grid;
- place-content: center;
- width: 100%;
- text-align: center;
- `,
- css.media('(min-width: 1080px)')(
- css`
- display: flex;
- justify-content: flex-start;
- align-items: center;
- margin-left: auto;
- padding-right: 1rem;
- text-align: left;
- box-sizing: border-box;
- width: var(--base-width);
- `,
- ),
- )
-
- export const MoreSidebarMenuContainer = () => css.cx(
- css`
- display: flex;
- justify-content: flex-start;
- align-items: center;
- width: calc(var(--base-width) * 2);
- margin: 0 auto;
- padding: 0 1rem;
- text-align: left;
- box-sizing: border-box;
- `,
- css.media('(min-width: 1080px)')(
- css`
- margin-right: 0;
- width: var(--base-width);
- padding-left: 0;
- `,
- ),
- );
-
- export const ContentContainer = () => css.cx(
- css`
- padding: 0 1rem;
- box-sizing: border-box;
- width: 100%;
- max-width: calc(var(--base-width) * 2);
- margin-right: auto;
- margin-left: auto;
- `,
- css.media('(min-width: 1080px)')(
- css`
- margin-left: 0;
- `,
- ),
- );
-
- export const SidebarMainContainer = () => css.cx(
- css`
- padding: 0 1rem;
- box-sizing: border-box;
- width: 100%;
- max-width: calc(var(--base-width) * 2);
- margin: 0 auto;
- `,
- css.media('(min-width: 1080px)')(
- css`
- max-width: none;
- `,
- ),
- );
|