Merge branch 'feature/sidebar-overlay'

This commit is contained in:
a.bouhuolia
2021-08-02 11:22:19 +02:00
15 changed files with 533 additions and 78 deletions

View File

@@ -48,7 +48,7 @@ function App({ locale }) {
<div className="App"> <div className="App">
<Router history={history}> <Router history={history}>
<Switch> <Switch>
<Route path={'/auth'} component={Authentication} /> {/* <Route path={'/auth'} component={Authentication} /> */}
<Route path={'/'}> <Route path={'/'}>
<PrivateRoute component={DashboardPrivatePages} /> <PrivateRoute component={DashboardPrivatePages} />
</Route> </Route>

View File

@@ -17,6 +17,8 @@ import DrawersContainer from 'components/DrawersContainer';
* Dashboard page. * Dashboard page.
*/ */
export default function Dashboard() { export default function Dashboard() {
const dashboardContentRef = React.createRef();
return ( return (
<DashboardProvider> <DashboardProvider>
<Switch> <Switch>
@@ -29,8 +31,8 @@ export default function Dashboard() {
<Route path="/"> <Route path="/">
<DashboardSplitPane> <DashboardSplitPane>
<Sidebar /> <Sidebar dashboardContentRef={dashboardContentRef} />
<DashboardContent /> <DashboardContent ref={dashboardContentRef} />
</DashboardSplitPane> </DashboardSplitPane>
</Route> </Route>
</Switch> </Switch>

View File

@@ -5,14 +5,14 @@ import DashboardContentRoute from 'components/Dashboard/DashboardContentRoute';
import DashboardFooter from 'components/Dashboard/DashboardFooter'; import DashboardFooter from 'components/Dashboard/DashboardFooter';
import DashboardErrorBoundary from './DashboardErrorBoundary'; import DashboardErrorBoundary from './DashboardErrorBoundary';
export default function () { export default React.forwardRef(({}, ref) => {
return ( return (
<ErrorBoundary FallbackComponent={DashboardErrorBoundary}> <ErrorBoundary FallbackComponent={DashboardErrorBoundary}>
<div className="dashboard-content" id="dashboard"> <div className="dashboard-content" id="dashboard" ref={ref}>
<DashboardTopbar /> <DashboardTopbar />
<DashboardContentRoute /> <DashboardContentRoute />
<DashboardFooter /> <DashboardFooter />
</div> </div>
</ErrorBoundary> </ErrorBoundary>
); );
} });

View File

@@ -17,16 +17,16 @@ export default function DashboardPrivatePages() {
return ( return (
<PrivatePagesProvider> <PrivatePagesProvider>
<Switch> <Switch>
<Route path={'/setup'}> {/* <Route path={'/setup'}>
<EnsureOrganizationIsNotReady> <EnsureOrganizationIsNotReady>
<SetupWizardPage /> <SetupWizardPage />
</EnsureOrganizationIsNotReady> </EnsureOrganizationIsNotReady>
</Route> </Route> */}
<Route path='/'> <Route path='/'>
<EnsureOrganizationIsReady> {/* <EnsureOrganizationIsReady> */}
<Dashboard /> <Dashboard />
</EnsureOrganizationIsReady> {/* </EnsureOrganizationIsReady> */}
</Route> </Route>
</Switch> </Switch>
</PrivatePagesProvider> </PrivatePagesProvider>

View File

@@ -7,10 +7,10 @@ import { useCurrentOrganization } from '../../hooks/query/organization';
*/ */
export function PrivatePagesProvider({ children }) { export function PrivatePagesProvider({ children }) {
// Fetches the current user's organization. // Fetches the current user's organization.
const { isLoading } = useCurrentOrganization(); // const { isLoading } = useCurrentOrganization();
return ( return (
<DashboardLoadingIndicator isLoading={isLoading}> <DashboardLoadingIndicator isLoading={false}>
{children} {children}
</DashboardLoadingIndicator> </DashboardLoadingIndicator>
) )

View File

@@ -145,9 +145,10 @@ export default class MenuItem extends AbstractPureComponent2 {
tagName = "a", tagName = "a",
dropdownType, dropdownType,
caretIconSize = 16, caretIconSize = 16,
hasSubmenu,
...htmlProps ...htmlProps
} = this.props; } = this.props;
const hasSubmenu = children != null;
const intentClass = Classes.intentClass(intent); const intentClass = Classes.intentClass(intent);
const anchorClasses = classNames( const anchorClasses = classNames(

View File

@@ -1,12 +1,12 @@
import React from 'react'; import React from 'react';
import { Menu, MenuItem } from '@blueprintjs/core';
import SidebarContainer from 'components/Sidebar/SidebarContainer'; import SidebarContainer from 'components/Sidebar/SidebarContainer';
import SidebarHead from 'components/Sidebar/SidebarHead'; import SidebarHead from 'components/Sidebar/SidebarHead';
import SidebarMenu from 'components/Sidebar/SidebarMenu'; import SidebarMenu from 'components/Sidebar/SidebarMenu';
import SidebarOverlay from 'components/SidebarOverlay';
import 'style/containers/Dashboard/Sidebar.scss'; import 'style/containers/Dashboard/Sidebar.scss';
export default function Sidebar() { export default function Sidebar({ dashboardContentRef }) {
return ( return (
<SidebarContainer> <SidebarContainer>
<SidebarHead /> <SidebarHead />
@@ -15,9 +15,7 @@ export default function Sidebar() {
<SidebarMenu /> <SidebarMenu />
</div> </div>
<div class="sidebar__version"> <div class="sidebar__version">0.0.1-beta version.</div>
0.0.1-beta version.
</div>
</SidebarContainer> </SidebarContainer>
) );
} }

View File

@@ -6,31 +6,43 @@ import Icon from 'components/Icon';
import MenuItem from 'components/MenuItem'; import MenuItem from 'components/MenuItem';
import { MenuItemLabel } from 'components'; import { MenuItemLabel } from 'components';
import classNames from 'classnames'; import classNames from 'classnames';
import SidebarOverlay from 'components/SidebarOverlay';
const DEFAULT_ITEM = {
text: '',
href: '',
}
export default function SidebarMenu() { export default function SidebarMenu() {
const history = useHistory(); const history = useHistory();
const location = useLocation(); const location = useLocation();
const [isOpen, setIsOpen] = React.useState(false);
const [currentItem, setCurrentItem] = React.useState(null);
const menuItemsMapper = (list) => { const menuItemsMapper = (list) => {
return list.map((item, index) => { return list.map((item, index) => {
const children = Array.isArray(item.children) const hasChildren = Array.isArray(item.children);
? menuItemsMapper(item.children)
: null;
const matchPath = (pathname, path) => { const matchPath = (pathname, path) => {
return item.matchExact ? pathname === path : pathname.indexOf(path) !== -1; return item.matchExact
? pathname === path
: pathname.indexOf(path) !== -1;
}; };
const isActive = (item.children) ? const isActive = (item.children
item.children.some((c) => matchPath(location.pathname, c.href)) : ? item.children.some((c) => matchPath(location.pathname, c.href))
(item.href && matchPath(location.pathname, item.href)); : item.href && matchPath(location.pathname, item.href)) || currentItem ===item;
const handleItemClick = () => { const handleItemClick = () => {
if (item.href) { if (item.href) {
history.push(item.href); history.push(item.href);
} }
setIsOpen(true);
setCurrentItem(item);
}; };
const maybeRenderLabel = (item) => item.newTabHref ? ( const maybeRenderLabel = (item) =>
item.newTabHref ? (
<Button <Button
className="menu-item__add-btn" className="menu-item__add-btn"
icon={<Icon icon={'plus'} iconSize={16} />} icon={<Icon icon={'plus'} iconSize={16} />}
@@ -42,9 +54,12 @@ export default function SidebarMenu() {
) : null; ) : null;
return item.spacer ? ( return item.spacer ? (
<div class="bp3-menu-spacer" style={{ <div
'height': `${item.spacer}px`, class="bp3-menu-spacer"
}}></div> style={{
height: `${item.spacer}px`,
}}
></div>
) : item.divider ? ( ) : item.divider ? (
<MenuDivider key={index} title={item.title} /> <MenuDivider key={index} title={item.title} />
) : item.label ? ( ) : item.label ? (
@@ -57,20 +72,35 @@ export default function SidebarMenu() {
text={item.text} text={item.text}
label={maybeRenderLabel(item)} label={maybeRenderLabel(item)}
disabled={item.disabled} disabled={item.disabled}
children={children}
dropdownType={item.dropdownType || 'collapse'} dropdownType={item.dropdownType || 'collapse'}
caretIconSize={16} caretIconSize={16}
onClick={handleItemClick} onClick={handleItemClick}
callapseActive={!!isActive} callapseActive={!!isActive}
itemClassName={classNames({ itemClassName={classNames({
'is-active': isActive, 'is-active': isActive,
'has-icon': !children && item.icon, 'has-icon': !hasChildren && item.icon,
})} })}
hasSubmenu={hasChildren}
/> />
); );
}); });
}; };
const items = menuItemsMapper(sidebarMenuList); const items = menuItemsMapper(sidebarMenuList);
return <Menu className="sidebar-menu">{items}</Menu>; const handleSidebarOverlayClose = () => {
setIsOpen(false);
}
return (
<div>
<Menu className="sidebar-menu">{items}</Menu>{' '}
<SidebarOverlay
isOpen={isOpen}
label={currentItem?.text || ''}
items={currentItem?.children || []}
onClose={handleSidebarOverlayClose}
/>
</div>
);
} }

View File

@@ -0,0 +1,19 @@
import React from 'react';
import { Scrollbar } from 'react-scrollbars-custom';
interface ISidebarOverlayContainerProps {
children: JSX.Element | JSX.Element[],
}
/**
* Sidebar overlay container.
*/
export default function SidebarOverlayContainer({ children }: ISidebarOverlayContainerProps) {
return (
<div className={'sidebar-overlay__scroll-wrapper'}>
<Scrollbar noDefaultStyles={true}>
<div className="sidebar-overlay__inner">{children}</div>
</Scrollbar>
</div>
);
}

View File

@@ -0,0 +1,140 @@
import React from 'react';
import { Overlay } from '@blueprintjs/core';
import { Link } from 'react-router-dom';
import SidebarOverlayContainer from './SidebarOverlayContainer';
interface ISidebarOverlayItem {
text: string;
href: string;
divider?: boolean;
label?: boolean;
}
interface ISidebarOverlayProps {
isOpen: boolean;
items: ISidebarOverlayItem[];
label: string;
onClose: Function;
}
interface ISidebarOverlayItemProps {
text: string;
href: string;
onLinkClick: Function;
}
interface ISidebarOverlayItemDivider {
divider: boolean;
}
/**
* Sidebar overlay item.
*/
function SidebarOverlayItem({
text,
href,
onLinkClick,
}: ISidebarOverlayItemProps) {
const handleLinkClick = () => {
onLinkClick && onLinkClick();
};
return (
<div className="sidebar-overlay__item">
<Link onClick={handleLinkClick} to={href}>
{text}
</Link>
</div>
);
}
interface ISidebarOverlayItemLabel {
text: string;
}
function SidebarOverlayLabel({ text }: ISidebarOverlayItemLabel) {
return <div className="sidebar-overlay__label">{text}</div>;
}
function SidebarOverlayDivider() {
return <div className={'sidebar-overlay__divider'}></div>;
}
/**
* Sidebar overlay component.
*/
export default function SidebarOverlay({
label,
isOpen: controllerdIsOpen,
onClose,
items,
}: ISidebarOverlayProps) {
const [isEverOpened, setEverOpened] = React.useState(false);
const [isOpen, setIsOpen] = React.useState(controllerdIsOpen);
React.useEffect(() => {
if (controllerdIsOpen && isOpen !== controllerdIsOpen) {
setIsOpen(controllerdIsOpen);
}
}, [controllerdIsOpen, setIsOpen, isOpen]);
React.useEffect(() => {
if (isOpen && !isEverOpened) {
setEverOpened(true);
}
}, [isEverOpened, isOpen]);
if (!isEverOpened) {
return '';
}
// Handle overlay close event.
const handleOverlayClose = () => {
setIsOpen(false);
onClose && onClose();
};
// Handle overlay open event.
const handleOverlayOpen = () => {
setIsOpen(true);
};
// Handle sidebar item link click.
const handleItemClick = () => {
setIsOpen(false);
onClose && onClose();
};
return (
<Overlay
isOpen={isOpen}
portalContainer={document.getElementById('dashboard') || document.body}
onClose={handleOverlayClose}
onOpening={handleOverlayOpen}
transitionDuration={100}
backdropClassName={'sidebar-overlay-backdrop'}
>
<div className="sidebar-overlay sidebar-overlay-transition">
<SidebarOverlayContainer>
<div className="sidebar-overlay__menu">
{label && (
<>
<SidebarOverlayLabel text={label} />
<SidebarOverlayDivider />
</>
)}
{items.map((item) =>
item.divider ? (
<SidebarOverlayDivider />
) : item.label ? (
<SidebarOverlayLabel text={item.text} />
) : (
<SidebarOverlayItem
onLinkClick={handleItemClick}
text={item.text}
href={item.href}
/>
),
)}
</div>
</SidebarOverlayContainer>
</div>
</Overlay>
);
}

View File

@@ -27,6 +27,28 @@ export default [
text: <T id={'category_list'} />, text: <T id={'category_list'} />,
href: '/items/categories', href: '/items/categories',
}, },
{
text: 'New tasks',
label: true,
},
{
divider: true,
},
{
text: <T id={'New inventory item'} />,
href: '/items/new',
},
{
text: <T id={'New service'} />,
href: '/items/new',
},
{
text: <T id={'New item category'} />,
href: '/items/categories/new',
},
{
text: 'New inventory adjustment',
},
], ],
}, },
{ {
@@ -48,14 +70,34 @@ export default [
href: '/payment-receives', href: '/payment-receives',
newTabHref: '/payment-receives/new', newTabHref: '/payment-receives/new',
}, },
{
divider: true,
},
{ {
text: <T id={'receipts'} />, text: <T id={'receipts'} />,
href: '/receipts', href: '/receipts',
newTabHref: '/receipts/new', newTabHref: '/receipts/new',
}, },
{
text: 'New tasks',
label: true,
},
{
divider: true,
},
{
text: <T id={'new_estimate'} />,
href: '/estimates/new',
},
{
text: <T id={'new_invoice'} />,
href: '/invoices/new',
},
{
text: <T id={'new_receipt'} />,
href: '/receipts/new',
},
{
text: <T id={'new_payment_receive'} />,
href: '/payment-receives/new',
},
], ],
}, },
{ {
@@ -71,6 +113,21 @@ export default [
href: '/payment-mades', href: '/payment-mades',
newTabHref: '/payment-mades/new', newTabHref: '/payment-mades/new',
}, },
{
text: 'New tasks',
label: true,
},
{
divider: true,
},
{
text: <T id={'New purchase invoice'} />,
href: '/bills/new',
},
{
text: <T id={'new_payment_made'} />,
href: '/payment-mades/new',
},
], ],
}, },
{ {
@@ -86,6 +143,21 @@ export default [
href: '/vendors', href: '/vendors',
newTabHref: '/vendors/new', newTabHref: '/vendors/new',
}, },
{
text: 'New tasks',
label: true,
},
{
divider: true,
},
{
text: <T id={'new_customer'} />,
href: '/customers/new',
},
{
text: <T id={'new_vendor'} />,
href: '/vendors/new',
},
], ],
}, },
{ {
@@ -103,14 +175,21 @@ export default [
text: <T id={'manual_journals'} />, text: <T id={'manual_journals'} />,
href: '/manual-journals', href: '/manual-journals',
}, },
{
text: <T id={'make_journal_entry'} />,
href: '/make-journal-entry',
},
{ {
text: <T id={'exchange_rate'} />, text: <T id={'exchange_rate'} />,
href: '/exchange-rates', href: '/exchange-rates',
}, },
{
text: 'New tasks',
label: true,
},
{
divider: true,
},
{
text: <T id={'make_journal_entry'} />,
href: '/make-journal-entry',
},
], ],
}, },
{ {
@@ -124,6 +203,13 @@ export default [
text: <T id={'expenses'} />, text: <T id={'expenses'} />,
href: '/expenses', href: '/expenses',
}, },
{
text: 'New tasks',
label: true,
},
{
divider: true,
},
{ {
text: <T id={'new_expense'} />, text: <T id={'new_expense'} />,
href: '/expenses/new', href: '/expenses/new',
@@ -133,14 +219,6 @@ export default [
{ {
text: <T id={'financial_reports'} />, text: <T id={'financial_reports'} />,
children: [ children: [
{
text: <T id={'all_reports'} />,
href: '/financial-reports',
matchExact: true,
},
{
divider: true,
},
{ {
text: <T id={'balance_sheet'} />, text: <T id={'balance_sheet'} />,
href: '/financial-reports/balance-sheet', href: '/financial-reports/balance-sheet',
@@ -161,6 +239,10 @@ export default [
text: <T id={'profit_loss_sheet'} />, text: <T id={'profit_loss_sheet'} />,
href: '/financial-reports/profit-loss-sheet', href: '/financial-reports/profit-loss-sheet',
}, },
{
text: <T id={'cash_flow_statement'} />,
href: '/financial-reports/cash-flow',
},
{ {
text: <T id={'AR_Aging_Summary'} />, text: <T id={'AR_Aging_Summary'} />,
href: '/financial-reports/receivable-aging-summary', href: '/financial-reports/receivable-aging-summary',
@@ -169,6 +251,52 @@ export default [
text: <T id={'AP_Aging_Summary'} />, text: <T id={'AP_Aging_Summary'} />,
href: '/financial-reports/payable-aging-summary', href: '/financial-reports/payable-aging-summary',
}, },
{
text: <T id={'Sales/Purchases'} />,
label: true,
},
{
divider: true,
},
{
text: <T id={'purchases_by_items'} />,
href: '/financial-reports/purchases-by-items',
},
{
text: <T id={'sales_by_items'} />,
href: '/financial-reports/sales-by-items',
},
{
text: <T id={'customers_transactions'} />,
href: '/financial-reports/transactions-by-customers',
},
{
text: <T id={'vendors_transactions'} />,
href: '/financial-reports/transactions-by-vendors',
},
{
text: <T id={'customers_balance_summary'} />,
href: '/financial-reports/customers-balance-summary',
},
{
text: <T id={'vendors_balance_summary'} />,
href: '/financial-reports/vendors-balance-summary',
},
{
text: <T id={'inventory'} />,
label: true,
},
{
divider: true,
},
{
text: <T id={'inventory_item_details'} />,
href: '/financial-reports/inventory-item-details',
},
{
text: <T id={'inventory_valuation'} />,
href: '/financial-reports/inventory-valuation',
},
], ],
}, },
{ {

View File

@@ -1172,5 +1172,10 @@
"invoice_details":"Invoice details", "invoice_details":"Invoice details",
"receipt_details":"Receipt details", "receipt_details":"Receipt details",
"payment_receive_details":"Payment receive details", "payment_receive_details":"Payment receive details",
"payment_made_details":"Payment made details" "payment_made_details":"Payment made details",
"New item category": "New item category",
"New service": "New service",
"New inventory item": "New inventory item",
"New purchase invoice": "New purchase invoice",
"Sales/Purchases": "Sales/Purchases"
} }

View File

@@ -47,11 +47,13 @@ body.hide-scrollbar .Pane2 {
} }
.bp3-fill { .bp3-fill {
.bp3-popover-wrapper, .bp3-popover-wrapper,
.bp3-popover-target { .bp3-popover-target {
display: block; display: block;
width: 100%; width: 100%;
} }
.bp3-button { .bp3-button {
width: 100%; width: 100%;
justify-content: start; justify-content: start;
@@ -61,6 +63,7 @@ body.hide-scrollbar .Pane2 {
.bp3-datepicker-caption .bp3-html-select::after { .bp3-datepicker-caption .bp3-html-select::after {
margin-right: 6px; margin-right: 6px;
} }
.bp3-select-popover .bp3-menu { .bp3-select-popover .bp3-menu {
max-height: 300px; max-height: 300px;
max-width: 400px; max-width: 400px;
@@ -100,27 +103,21 @@ body.hide-scrollbar .Pane2 {
background-color: rgba(0, 10, 30, 0.7); background-color: rgba(0, 10, 30, 0.7);
} }
.ReactVirtualized__Collection { .ReactVirtualized__Collection {}
}
.ReactVirtualized__Collection__innerScrollContainer { .ReactVirtualized__Collection__innerScrollContainer {}
}
/* Grid default theme */ /* Grid default theme */
.ReactVirtualized__Grid { .ReactVirtualized__Grid {}
}
.ReactVirtualized__Grid__innerScrollContainer { .ReactVirtualized__Grid__innerScrollContainer {}
}
/* Table default theme */ /* Table default theme */
.ReactVirtualized__Table { .ReactVirtualized__Table {}
}
.ReactVirtualized__Table__Grid { .ReactVirtualized__Table__Grid {}
}
.ReactVirtualized__Table__headerRow { .ReactVirtualized__Table__headerRow {
font-weight: 700; font-weight: 700;
@@ -129,6 +126,7 @@ body.hide-scrollbar .Pane2 {
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
} }
.ReactVirtualized__Table__row { .ReactVirtualized__Table__row {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@@ -148,6 +146,7 @@ body.hide-scrollbar .Pane2 {
margin-right: 10px; margin-right: 10px;
min-width: 0px; min-width: 0px;
} }
.ReactVirtualized__Table__rowColumn { .ReactVirtualized__Table__rowColumn {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
@@ -157,6 +156,7 @@ body.hide-scrollbar .Pane2 {
.ReactVirtualized__Table__rowColumn:first-of-type { .ReactVirtualized__Table__rowColumn:first-of-type {
margin-left: 10px; margin-left: 10px;
} }
.ReactVirtualized__Table__sortableHeaderColumn { .ReactVirtualized__Table__sortableHeaderColumn {
cursor: pointer; cursor: pointer;
} }
@@ -165,32 +165,157 @@ body.hide-scrollbar .Pane2 {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.ReactVirtualized__Table__sortableHeaderIcon { .ReactVirtualized__Table__sortableHeaderIcon {
flex: 0 0 24px; flex: 0 0 24px;
height: 1em; height: 1em;
width: 1em; width: 1em;
fill: currentColor; fill: currentColor;
} }
.ReactVirtualized__Grid, .ReactVirtualized__List { direction: inherit !important; }
/* List default theme */
.ReactVirtualized__Grid,
.ReactVirtualized__List { .ReactVirtualized__List {
direction: inherit !important;
} }
/* List default theme */
.bp3-drawer{ .ReactVirtualized__List {}
.bp3-drawer {
box-shadow: 0 0 0; box-shadow: 0 0 0;
} }
// RTL Icons. // RTL Icons.
html[dir="rtl"] { html[dir="rtl"] {
.bp3-icon-caret-right{ .bp3-icon-caret-right {
transform: scaleX(-1); transform: scaleX(-1);
} }
} }
html[lang^="ar"] { html[lang^="ar"] {
body{ body {
letter-spacing: -0.01rem; letter-spacing: -0.01rem;
} }
} }
.sidebar-overlay {
background: #fff;
height: 100%;
width: 225px;
outline: 0;
&__scroll-wrapper {
height: 100%
}
.ScrollbarsCustom-Track {
&.ScrollbarsCustom-TrackY,
&.ScrollbarsCustom-TrackX {
background: rgba(0, 0, 0, 0);
}
}
.ScrollbarsCustom-Thumb {
&.ScrollbarsCustom-ThumbX,
&.ScrollbarsCustom-ThumbY {
background: rgba(0, 0, 0, 0);
}
}
.ScrollbarsCustom-Content {
display: flex;
flex-direction: column;
height: 100%;
}
&:hover {
.ScrollbarsCustom-Thumb {
&.ScrollbarsCustom-ThumbX,
&.ScrollbarsCustom-ThumbY {
background: rgba(0, 0, 0, 0.5);
}
}
}
&__menu {
margin: 16px 0;
}
&__item {
font-size: 15px;
color: #00102b;
a {
color: inherit;
display: block;
padding: 10px 22px;
text-decoration: none;
&:hover,
&:focus{
background: #f3f3f3;
}
}
}
&__divider {
height: 1px;
margin: 6px 0;
background: #e2e5ec;
}
&__label{
text-transform: uppercase;
font-size: 12px;
padding: 14px 20px 10px;
letter-spacing: 1px;
color: #707a85;
}
&__label + .sidebar-overlay__divider{
margin-top: 0;
}
}
.sidebar-overlay-transition {
transform: translateX(-100%);
&.bp3-overlay{
&-appear,
&-enter {
transform: translateX(-100%)
}
&-appear-active,
&-enter-active {
transform: translateX(0) !important;
transition: all 100ms ease-in-out;
}
&-appear-done,
&-enter-done {
transform: translateX(0) !important;
}
&-exit {
transform: translateX(0) !important;
}
&-exit-active {
transform: translateX(-100%) !important;
transition: all 100ms ease-in-out;
}
&-exit-done{
transform: translateX(-100%) !important;
}
}
}
.sidebar-overlay-backdrop{
background-color: rgba(0, 10, 30, 0.15);
}

View File

@@ -6,6 +6,7 @@
color: $sidebar-text-color; color: $sidebar-text-color;
height: 100%; height: 100%;
z-index: $sidebar-zindex; z-index: $sidebar-zindex;
position: relative;
.ScrollbarsCustom-Track { .ScrollbarsCustom-Track {
@@ -347,5 +348,11 @@
margin-left: 12px; margin-left: 12px;
font-weight: 600; font-weight: 600;
} }
&__divider{
margin: 4px 0;
height: 1px;
background: #ebebeb;
}
} }
} }

View File

@@ -15,7 +15,7 @@ $menu-item-color-active: $light-gray3;
$breadcrumbs-collapsed-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#6B8193' enable-background='new 0 0 16 16' xml:space='preserve'><g><circle cx='2' cy='8.03' r='2'/><circle cx='14' cy='8.03' r='2'/><circle cx='8' cy='8.03' r='2'/></g></svg>"); $breadcrumbs-collapsed-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#6B8193' enable-background='new 0 0 16 16' xml:space='preserve'><g><circle cx='2' cy='8.03' r='2'/><circle cx='14' cy='8.03' r='2'/><circle cx='8' cy='8.03' r='2'/></g></svg>");
$sidebar-zindex: 15; $sidebar-zindex: 21;
$pt-font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, $pt-font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont,
Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Open Sans, Helvetica Neue, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Open Sans, Helvetica Neue,
Icons16, sans-serif; Icons16, sans-serif;