@synerise/ds-layout 1.1.15 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +8 -8
- package/dist/Layout.d.ts +1 -1
- package/dist/Layout.js +48 -93
- package/dist/Layout.styles.d.ts +13 -13
- package/dist/Layout.styles.js +75 -92
- package/dist/Layout.types.d.ts +1 -1
- package/dist/Layout.types.js +1 -1
- package/dist/Page/Page.d.ts +1 -1
- package/dist/Page/Page.js +21 -19
- package/dist/Page/Page.styles.d.ts +4 -4
- package/dist/Page/Page.styles.js +14 -16
- package/dist/Sidebar/Sidebar.d.ts +1 -1
- package/dist/Sidebar/Sidebar.js +38 -58
- package/dist/index.js +6 -3
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.2.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-layout@1.2.0...@synerise/ds-layout@1.2.1) (2026-03-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-layout
|
|
9
|
+
|
|
10
|
+
# [1.2.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-layout@1.1.15...@synerise/ds-layout@1.2.0) (2026-03-20)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **modal:** disableScrollbar prop ([d6a80ec](https://github.com/synerise/synerise-design/commit/d6a80ec2a5394703974d2b369f25a13fc4e5eeb0))
|
|
15
|
+
|
|
6
16
|
## [1.1.15](https://github.com/synerise/synerise-design/compare/@synerise/ds-layout@1.1.14...@synerise/ds-layout@1.1.15) (2026-03-09)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @synerise/ds-layout
|
package/README.md
CHANGED
|
@@ -36,23 +36,23 @@ import Layout from '@synerise/ds-layout'
|
|
|
36
36
|
| -------------------------- | ------------------------------------------------------------------- | ------------------------- | ------- |
|
|
37
37
|
| header | Set top header content page | React.ReactNode | |
|
|
38
38
|
| subheader | Set subheader content page | React.ReactNode | |
|
|
39
|
-
| left | Configuration of left sidebar
|
|
40
|
-
| right | Configuration of right sidebar
|
|
39
|
+
| left | Configuration of left sidebar (includes opened, onChange, width) | SidebarProps | |
|
|
40
|
+
| right | Configuration of right sidebar (includes opened, onChange, width) | SidebarProps | |
|
|
41
41
|
| children | The layout elements passed to the parent | React.ReactNode | |
|
|
42
42
|
| className | Layout's className | string | |
|
|
43
43
|
| styles | Custom layout styles | LayoutStyles | |
|
|
44
|
-
| leftOpened | Whether left sidebar is opened | boolean | false |
|
|
45
|
-
| rightOpened | Whether right sidebar is opened | boolean | false |
|
|
46
|
-
| leftOpenedWidth | Width of opened left sidebar | number | 320 |
|
|
47
|
-
| rightOpenedWidth | Width of opened right sidebar | number | 320 |
|
|
48
44
|
| renderLeftSidebarControls | Left sidebar visibility. Accepts function returning `ReactNode`. | boolean or function | false |
|
|
49
45
|
| renderRightSidebarControls | Right sidebar visibility. Accepts function returning `ReactNode`. | boolean or function | false |
|
|
50
46
|
| leftSidebarWithDnd | Set withDnd in left sidebar scrollbar | boolean | false |
|
|
51
47
|
| mainSidebarWithDnd | Set withDnd in main sidebar scrollbar | boolean | false |
|
|
52
48
|
| rightSidebarWithDnd | Set withDnd in right sidebar scrollbar | boolean | false |
|
|
53
|
-
|
|
|
49
|
+
| leftSidebarWithScrollbar | Wrap left sidebar content in ds-scrollbar | boolean | true |
|
|
50
|
+
| rightSidebarWithScrollbar | Wrap right sidebar content in ds-scrollbar | boolean | true |
|
|
51
|
+
| sidebarAnimationDisabled | Disable CSS transition on sidebar width | boolean | |
|
|
52
|
+
| nativeScroll | Set main column to use native browser scroll | boolean | |
|
|
54
53
|
| nativeScrollRef | ref to pass to scrollable element | Ref<HTMLDivElement> | - |
|
|
55
|
-
|
|
|
54
|
+
| fullPage | Remove 24 px padding from main content inner wrapper | boolean | false |
|
|
55
|
+
| fillViewport | sets layout to absolute with calc(100vh - viewportTopOffset) height | boolean | |
|
|
56
56
|
| viewportTopOffset | top viewport offset (if fillViewport is true) | number | 55 |
|
|
57
57
|
|
|
58
58
|
### SidebarProps
|
package/dist/Layout.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
import type * as T from './Layout.types';
|
|
3
3
|
declare const Layout: ({ header, left, right, children, className, styles, subheader, fullPage, nativeScroll, nativeScrollRef, fillViewport, viewportTopOffset, sidebarAnimationDisabled, renderLeftSidebarControls, renderRightSidebarControls, leftSidebarWithDnd, rightSidebarWithDnd, leftSidebarWithScrollbar, rightSidebarWithScrollbar, mainSidebarWithDnd, }: T.LayoutProps) => React.JSX.Element;
|
|
4
4
|
export default Layout;
|
package/dist/Layout.js
CHANGED
|
@@ -1,94 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Scrollbar from
|
|
3
|
-
import
|
|
4
|
-
import { Sidebar } from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, children));
|
|
50
|
-
var leftSidebarHasControls = left && renderLeftSidebarControls;
|
|
51
|
-
var rightSidebarHasControls = right && renderRightSidebarControls;
|
|
52
|
-
return /*#__PURE__*/React.createElement(S.LayoutContainer, {
|
|
53
|
-
fillViewport: fillViewport,
|
|
54
|
-
viewportTopOffset: viewportTopOffset,
|
|
55
|
-
nativeScroll: nativeScroll,
|
|
56
|
-
className: "ds-layout " + (className || '')
|
|
57
|
-
}, header ? /*#__PURE__*/React.createElement(S.LayoutHeader, {
|
|
58
|
-
className: "ds-layout__header"
|
|
59
|
-
}, header) : null, /*#__PURE__*/React.createElement(S.LayoutContent, null, /*#__PURE__*/React.createElement(S.LayoutBody, {
|
|
60
|
-
allowOverflow: !leftSidebarHasControls || !rightSidebarHasControls
|
|
61
|
-
}, left && /*#__PURE__*/React.createElement(Sidebar, {
|
|
62
|
-
opened: showLeftSidebar,
|
|
63
|
-
bothOpened: Boolean((left == null ? void 0 : left.opened) && (right == null ? void 0 : right.opened)),
|
|
64
|
-
openedWidth: leftSidebarWidth,
|
|
65
|
-
animationDisabled: !!sidebarAnimationDisabled,
|
|
66
|
-
withControlButton: !!leftSidebarHasControls,
|
|
67
|
-
outerStyles: styles == null ? void 0 : styles.left,
|
|
68
|
-
innerStyles: styles == null ? void 0 : styles.leftInner,
|
|
69
|
-
withScrollbar: leftSidebarWithScrollbar,
|
|
70
|
-
scrollWithDnd: leftSidebarWithDnd,
|
|
71
|
-
renderControls: renderLeftSidebarControls,
|
|
72
|
-
withSubheader: Boolean(subheader),
|
|
73
|
-
onChange: left == null ? void 0 : left.onChange
|
|
74
|
-
}, left.content), /*#__PURE__*/React.createElement(S.LayoutMain, {
|
|
75
|
-
className: "ds-layout__main",
|
|
76
|
-
"data-popup-container": true,
|
|
77
|
-
style: styles && styles.main
|
|
78
|
-
}, /*#__PURE__*/React.createElement(S.LayoutSubheader, null, subheader), mainColumnInner), right && /*#__PURE__*/React.createElement(Sidebar, {
|
|
79
|
-
opened: showRightSidebar,
|
|
80
|
-
side: "right",
|
|
81
|
-
bothOpened: Boolean((left == null ? void 0 : left.opened) && (right == null ? void 0 : right.opened)),
|
|
82
|
-
openedWidth: rightSidebarWidth,
|
|
83
|
-
animationDisabled: !!sidebarAnimationDisabled,
|
|
84
|
-
withControlButton: !!rightSidebarHasControls,
|
|
85
|
-
outerStyles: styles == null ? void 0 : styles.right,
|
|
86
|
-
innerStyles: styles == null ? void 0 : styles.rightInner,
|
|
87
|
-
withScrollbar: rightSidebarWithScrollbar,
|
|
88
|
-
scrollWithDnd: rightSidebarWithDnd,
|
|
89
|
-
renderControls: renderRightSidebarControls,
|
|
90
|
-
withSubheader: Boolean(subheader),
|
|
91
|
-
onChange: right == null ? void 0 : right.onChange
|
|
92
|
-
}, right.content))));
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Scrollbar from "@synerise/ds-scrollbar";
|
|
3
|
+
import { LayoutMainInner, LayoutContainer, LayoutHeader, LayoutContent, LayoutBody, LayoutMain, LayoutSubheader } from "./Layout.styles.js";
|
|
4
|
+
import { Sidebar } from "./Sidebar/Sidebar.js";
|
|
5
|
+
const DEFAULT_SIDEBAR_WIDTH = 320;
|
|
6
|
+
const Layout = ({
|
|
7
|
+
header,
|
|
8
|
+
left,
|
|
9
|
+
right,
|
|
10
|
+
children,
|
|
11
|
+
className,
|
|
12
|
+
styles,
|
|
13
|
+
subheader,
|
|
14
|
+
fullPage = false,
|
|
15
|
+
nativeScroll,
|
|
16
|
+
nativeScrollRef,
|
|
17
|
+
fillViewport,
|
|
18
|
+
viewportTopOffset,
|
|
19
|
+
sidebarAnimationDisabled,
|
|
20
|
+
renderLeftSidebarControls = false,
|
|
21
|
+
renderRightSidebarControls = false,
|
|
22
|
+
leftSidebarWithDnd = false,
|
|
23
|
+
rightSidebarWithDnd = false,
|
|
24
|
+
leftSidebarWithScrollbar = true,
|
|
25
|
+
rightSidebarWithScrollbar = true,
|
|
26
|
+
mainSidebarWithDnd = false
|
|
27
|
+
}) => {
|
|
28
|
+
const leftSidebarWidth = left?.width || DEFAULT_SIDEBAR_WIDTH;
|
|
29
|
+
const rightSidebarWidth = right?.width || DEFAULT_SIDEBAR_WIDTH;
|
|
30
|
+
const showLeftSidebar = left?.opened || !renderLeftSidebarControls;
|
|
31
|
+
const showRightSidebar = right?.opened || !renderRightSidebarControls;
|
|
32
|
+
const mainColumnInner = nativeScroll ? /* @__PURE__ */ jsx(LayoutMainInner, { fullPage, style: styles && styles.mainInner, ref: nativeScrollRef, children }) : /* @__PURE__ */ jsx(Scrollbar, { absolute: true, withDnd: mainSidebarWithDnd, children: /* @__PURE__ */ jsx(LayoutMainInner, { fullPage, style: styles && styles.mainInner, children }) });
|
|
33
|
+
const leftSidebarHasControls = left && renderLeftSidebarControls;
|
|
34
|
+
const rightSidebarHasControls = right && renderRightSidebarControls;
|
|
35
|
+
return /* @__PURE__ */ jsxs(LayoutContainer, { fillViewport, viewportTopOffset, nativeScroll, className: `ds-layout ${className || ""}`, children: [
|
|
36
|
+
header ? /* @__PURE__ */ jsx(LayoutHeader, { className: "ds-layout__header", children: header }) : null,
|
|
37
|
+
/* @__PURE__ */ jsx(LayoutContent, { children: /* @__PURE__ */ jsxs(LayoutBody, { allowOverflow: !leftSidebarHasControls || !rightSidebarHasControls, children: [
|
|
38
|
+
left && /* @__PURE__ */ jsx(Sidebar, { opened: showLeftSidebar, bothOpened: Boolean(left?.opened && right?.opened), openedWidth: leftSidebarWidth, animationDisabled: !!sidebarAnimationDisabled, withControlButton: !!leftSidebarHasControls, outerStyles: styles?.left, innerStyles: styles?.leftInner, withScrollbar: leftSidebarWithScrollbar, scrollWithDnd: leftSidebarWithDnd, renderControls: renderLeftSidebarControls, withSubheader: Boolean(subheader), onChange: left?.onChange, children: left.content }),
|
|
39
|
+
/* @__PURE__ */ jsxs(LayoutMain, { className: "ds-layout__main", "data-popup-container": true, style: styles && styles.main, children: [
|
|
40
|
+
/* @__PURE__ */ jsx(LayoutSubheader, { children: subheader }),
|
|
41
|
+
mainColumnInner
|
|
42
|
+
] }),
|
|
43
|
+
right && /* @__PURE__ */ jsx(Sidebar, { opened: showRightSidebar, side: "right", bothOpened: Boolean(left?.opened && right?.opened), openedWidth: rightSidebarWidth, animationDisabled: !!sidebarAnimationDisabled, withControlButton: !!rightSidebarHasControls, outerStyles: styles?.right, innerStyles: styles?.rightInner, withScrollbar: rightSidebarWithScrollbar, scrollWithDnd: rightSidebarWithDnd, renderControls: renderRightSidebarControls, withSubheader: Boolean(subheader), onChange: right?.onChange, children: right.content })
|
|
44
|
+
] }) })
|
|
45
|
+
] });
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
Layout as default
|
|
93
49
|
};
|
|
94
|
-
export default Layout;
|
package/dist/Layout.styles.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export declare const ArrowIcon: import(
|
|
2
|
-
export declare const CloseIcon: import(
|
|
3
|
-
export declare const LayoutContent: import(
|
|
4
|
-
export declare const LayoutHeader: import(
|
|
5
|
-
export declare const LayoutSubheader: import(
|
|
6
|
-
export declare const LayoutBody: import(
|
|
1
|
+
export declare const ArrowIcon: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<import('@synerise/ds-icon').BaseIconProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, keyof import('@synerise/ds-icon').BaseIconProps> & import('@synerise/ds-utils').DataAttributes & import('react').RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
2
|
+
export declare const CloseIcon: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<import('@synerise/ds-icon').BaseIconProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, keyof import('@synerise/ds-icon').BaseIconProps> & import('@synerise/ds-utils').DataAttributes & import('react').RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
3
|
+
export declare const LayoutContent: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const LayoutHeader: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const LayoutSubheader: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const LayoutBody: import('styled-components').StyledComponent<"div", any, {
|
|
7
7
|
allowOverflow?: boolean;
|
|
8
8
|
}, never>;
|
|
9
|
-
export declare const LayoutMain: import(
|
|
10
|
-
export declare const LayoutMainInner: import(
|
|
9
|
+
export declare const LayoutMain: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
10
|
+
export declare const LayoutMainInner: import('styled-components').StyledComponent<"div", any, {
|
|
11
11
|
fullPage: boolean;
|
|
12
12
|
}, never>;
|
|
13
|
-
export declare const LayoutContainer: import(
|
|
13
|
+
export declare const LayoutContainer: import('styled-components').StyledComponent<"div", any, {
|
|
14
14
|
nativeScroll?: boolean;
|
|
15
15
|
fillViewport?: boolean;
|
|
16
16
|
viewportTopOffset?: number;
|
|
@@ -21,13 +21,13 @@ type SidebarButtonProps = {
|
|
|
21
21
|
withSubheader?: boolean;
|
|
22
22
|
bothOpened?: boolean;
|
|
23
23
|
};
|
|
24
|
-
export declare const SidebarButton: import(
|
|
24
|
+
export declare const SidebarButton: import('styled-components').StyledComponent<"button", any, SidebarButtonProps, never>;
|
|
25
25
|
type LayoutSidebarProps = {
|
|
26
26
|
opened: boolean;
|
|
27
27
|
openedWidth: number;
|
|
28
28
|
animationDisabled: boolean;
|
|
29
29
|
};
|
|
30
|
-
export declare const LayoutSidebar: import(
|
|
30
|
+
export declare const LayoutSidebar: import('styled-components').StyledComponent<"div", any, LayoutSidebarProps, never>;
|
|
31
31
|
type LayoutSidebarWrapperProps = {
|
|
32
32
|
hasControlButton: boolean;
|
|
33
33
|
opened: boolean;
|
|
@@ -35,6 +35,6 @@ type LayoutSidebarWrapperProps = {
|
|
|
35
35
|
openedWidth: number;
|
|
36
36
|
animationDisabled: boolean;
|
|
37
37
|
};
|
|
38
|
-
export declare const LayoutSidebarWrapper: import(
|
|
39
|
-
export declare const LayoutSidebarInner: import(
|
|
38
|
+
export declare const LayoutSidebarWrapper: import('styled-components').StyledComponent<"div", any, LayoutSidebarWrapperProps, never>;
|
|
39
|
+
export declare const LayoutSidebarInner: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
40
40
|
export {};
|
package/dist/Layout.styles.js
CHANGED
|
@@ -1,122 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var DEFAULT_TOP_OFFSET = 55;
|
|
7
|
-
export var ArrowIcon = styled(Icon).withConfig({
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
import { mediaQuery } from "@synerise/ds-core";
|
|
3
|
+
import Icon from "@synerise/ds-icon";
|
|
4
|
+
const DEFAULT_TOP_OFFSET = 55;
|
|
5
|
+
const ArrowIcon = /* @__PURE__ */ styled(Icon).withConfig({
|
|
8
6
|
displayName: "Layoutstyles__ArrowIcon",
|
|
9
7
|
componentId: "sc-i053aj-0"
|
|
10
8
|
})([""]);
|
|
11
|
-
|
|
9
|
+
const CloseIcon = /* @__PURE__ */ styled(Icon).withConfig({
|
|
12
10
|
displayName: "Layoutstyles__CloseIcon",
|
|
13
11
|
componentId: "sc-i053aj-1"
|
|
14
12
|
})(["&&{display:none;}"]);
|
|
15
|
-
|
|
13
|
+
const LayoutContent = /* @__PURE__ */ styled.div.withConfig({
|
|
16
14
|
displayName: "Layoutstyles__LayoutContent",
|
|
17
15
|
componentId: "sc-i053aj-2"
|
|
18
|
-
})(["overflow:hidden;width:100%;height:100%;", ";"], mediaQuery.to.small
|
|
19
|
-
|
|
16
|
+
})(["overflow:hidden;width:100%;height:100%;display:flex;flex-direction:column;", ";"], mediaQuery.to.small`overflow-x: auto;`);
|
|
17
|
+
const LayoutHeader = /* @__PURE__ */ styled.div.withConfig({
|
|
20
18
|
displayName: "Layoutstyles__LayoutHeader",
|
|
21
19
|
componentId: "sc-i053aj-3"
|
|
22
20
|
})(["&&&{margin:0;display:block;width:100%;}z-index:1;"]);
|
|
23
|
-
|
|
21
|
+
const LayoutSubheader = /* @__PURE__ */ styled.div.withConfig({
|
|
24
22
|
displayName: "Layoutstyles__LayoutSubheader",
|
|
25
23
|
componentId: "sc-i053aj-4"
|
|
26
24
|
})(["position:relative;max-width:100%;top:0;z-index:1;box-shadow:0 4px 12px 0 rgba(35,41,54,0.04);"]);
|
|
27
|
-
|
|
25
|
+
const LayoutBody = /* @__PURE__ */ styled.div.withConfig({
|
|
28
26
|
displayName: "Layoutstyles__LayoutBody",
|
|
29
27
|
componentId: "sc-i053aj-5"
|
|
30
|
-
})(["flex:1;display:flex;flex-direction:row;min-height:0;min-width:0;position:relative;overflow:hidden;height:100%;", ";", ";"], mediaQuery.to.small
|
|
31
|
-
|
|
32
|
-
});
|
|
33
|
-
export var LayoutMain = styled.div.withConfig({
|
|
28
|
+
})(["flex:1 1 auto;display:flex;flex-direction:row;min-height:0;min-width:0;position:relative;overflow:hidden;height:100%;", ";", ";"], mediaQuery.to.small`min-width: 704px;}`, (props) => props.allowOverflow && mediaQuery.to.small`overflow-x: auto;`);
|
|
29
|
+
const LayoutMain = /* @__PURE__ */ styled.div.withConfig({
|
|
34
30
|
displayName: "Layoutstyles__LayoutMain",
|
|
35
31
|
componentId: "sc-i053aj-6"
|
|
36
|
-
})(["position:relative;max-width:100%;width:100%;", ";", ";"], mediaQuery.to.small
|
|
37
|
-
|
|
32
|
+
})(["position:relative;max-width:100%;width:100%;", ";", ";"], mediaQuery.to.small`min-width: 704px;`, mediaQuery.to.medium`height: 100%;`);
|
|
33
|
+
const LayoutMainInner = /* @__PURE__ */ styled.div.withConfig({
|
|
38
34
|
displayName: "Layoutstyles__LayoutMainInner",
|
|
39
35
|
componentId: "sc-i053aj-7"
|
|
40
|
-
})(["", ";&&{padding:", ";}"], mediaQuery.from.medium
|
|
41
|
-
|
|
42
|
-
});
|
|
43
|
-
export var LayoutContainer = styled.div.withConfig({
|
|
36
|
+
})(["", ";&&{padding:", ";}"], mediaQuery.from.medium`padding: 24px;`, (props) => props.fullPage ? "0" : "24px");
|
|
37
|
+
const LayoutContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
44
38
|
displayName: "Layoutstyles__LayoutContainer",
|
|
45
39
|
componentId: "sc-i053aj-8"
|
|
46
|
-
})(["height:100%;display:flex;flex-direction:column;overflow:hidden;", ";", "{", ";}", "{overflow:", ";", ";}"],
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return props.nativeScroll ? 'auto' : 'hidden';
|
|
52
|
-
}, function (props) {
|
|
53
|
-
return props.nativeScroll ? "\n flex-grow: 1;\n position: relative;\n " : mediaQuery.to.medium(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["flex: 0 0 auto;"]))) + ";";
|
|
54
|
-
});
|
|
55
|
-
export var SidebarButton = styled.button.withConfig({
|
|
40
|
+
})(["height:100%;display:flex;flex-direction:column;overflow:hidden;", ";", "{", ";}", "{overflow:", ";", ";}"], (props) => props.fillViewport && css(["position:absolute;width:100%;height:calc( 100vh - ", "px );"], props.viewportTopOffset !== void 0 ? props.viewportTopOffset : DEFAULT_TOP_OFFSET), LayoutMain, (props) => props.nativeScroll && css(["display:flex;flex-direction:column;overflow:hidden;"]), LayoutMainInner, (props) => props.nativeScroll ? "auto" : "hidden", (props) => props.nativeScroll ? `
|
|
41
|
+
flex-grow: 1;
|
|
42
|
+
position: relative;
|
|
43
|
+
` : `${mediaQuery.to.medium`flex: 0 0 auto;`};`);
|
|
44
|
+
const SidebarButton = /* @__PURE__ */ styled.button.withConfig({
|
|
56
45
|
displayName: "Layoutstyles__SidebarButton",
|
|
57
46
|
componentId: "sc-i053aj-9"
|
|
58
|
-
})(["width:36px;height:44px;background-color:", ";align-items:center;justify-content:center;position:absolute;cursor:pointer;border-radius:", ";right:", ";left:", ";top:", ";outline:0;border:0;display:flex;opacity:1;visibility:visible;transition:all 0.3s ease;z-index:1;", ";", "{transition:transform 0.3s ease;}", ";", ";", ";", " ", ";"],
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}, function (props) {
|
|
65
|
-
return !props.right ? 'auto' : '-32px';
|
|
66
|
-
}, function (props) {
|
|
67
|
-
return props.withSubheader ? '170px' : '48px';
|
|
68
|
-
}, function (props) {
|
|
69
|
-
return mediaQuery.to.medium(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["display: flex; ", " opacity: 1; visibility: visible"])), props.theme.palette.white);
|
|
70
|
-
}, ArrowIcon, function (props) {
|
|
71
|
-
return mediaQuery.to.medium(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n ", "\n "])), props.right && props.opened && 'left: -44px');
|
|
72
|
-
}, function (props) {
|
|
73
|
-
return props.right && props.opened && mediaQuery.to.medium(_templateObject0 || (_templateObject0 = _taggedTemplateLiteralLoose(["\n 'left: -44px'}\n "])));
|
|
74
|
-
}, function (props) {
|
|
75
|
-
return !props.right && props.opened && mediaQuery.to.medium(_templateObject1 || (_templateObject1 = _taggedTemplateLiteralLoose(["right: -44px"])));
|
|
76
|
-
}, function (props) {
|
|
77
|
-
return props.right && props.bothOpened && mediaQuery.to.small(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["transform: translateY(56px)"])));
|
|
78
|
-
}, function (props) {
|
|
79
|
-
return props.opened && css(["right:", ";left:", ";", ";", ";", "", "{transform:rotateZ(180deg);", ";}", "", "{", ";}"], props.right ? 'auto' : '-4px', !props.right ? 'auto' : '-4px', mediaQuery.to.medium(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["width: 44px;"]))), mediaQuery.to.medium(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["background-color: ", ";"])), props.theme.palette['grey-600']), ArrowIcon, ArrowIcon, mediaQuery.to.medium(_templateObject13 || (_templateObject13 = _taggedTemplateLiteralLoose(["display: none;"]))), CloseIcon, CloseIcon, mediaQuery.to.medium(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["display: flex;"]))));
|
|
80
|
-
});
|
|
81
|
-
export var LayoutSidebar = styled.div.withConfig({
|
|
47
|
+
})(["width:36px;height:44px;background-color:", ";align-items:center;justify-content:center;position:absolute;cursor:pointer;border-radius:", ";right:", ";left:", ";top:", ";outline:0;border:0;display:flex;opacity:1;visibility:visible;transition:all 0.3s ease;z-index:1;", ";", "{transition:transform 0.3s ease;}", ";", ";", ";", " ", ";"], (props) => props.theme.palette["grey-500"], (props) => props.right ? "3px 0 0 3px" : "0 3px 3px 0", (props) => props.right ? "auto" : "-32px", (props) => !props.right ? "auto" : "-32px", (props) => props.withSubheader ? "170px" : "48px", (props) => mediaQuery.to.medium`display: flex; ${props.theme.palette.white} opacity: 1; visibility: visible`, ArrowIcon, (props) => mediaQuery.to.medium`
|
|
48
|
+
${props.right && props.opened && "left: -44px"}
|
|
49
|
+
`, (props) => props.right && props.opened && mediaQuery.to.medium`
|
|
50
|
+
'left: -44px'}
|
|
51
|
+
`, (props) => !props.right && props.opened && mediaQuery.to.medium`right: -44px`, (props) => props.right && props.bothOpened && mediaQuery.to.small`transform: translateY(56px)`, (props) => props.opened && css(["right:", ";left:", ";", ";", ";", "", "{transform:rotateZ(180deg);", ";}", "", "{", ";}"], props.right ? "auto" : "-4px", !props.right ? "auto" : "-4px", mediaQuery.to.medium`width: 44px;`, mediaQuery.to.medium`background-color: ${props.theme.palette["grey-600"]};`, ArrowIcon, ArrowIcon, mediaQuery.to.medium`display: none;`, CloseIcon, CloseIcon, mediaQuery.to.medium`display: flex;`));
|
|
52
|
+
const LayoutSidebar = /* @__PURE__ */ styled.div.withConfig({
|
|
82
53
|
displayName: "Layoutstyles__LayoutSidebar",
|
|
83
54
|
componentId: "sc-i053aj-10"
|
|
84
|
-
})(["", ";position:relative;z-index:10;overflow-y:auto;overflow-x:hidden;background-color:#fff;height:100%;box-shadow:0 4px 12px 0 rgba(35,41,54,0.04);width:", ";max-width:100%;", ";", ";", ";", ";}"],
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
55
|
+
})(["", ";position:relative;z-index:10;overflow-y:auto;overflow-x:hidden;background-color:#fff;height:100%;box-shadow:0 4px 12px 0 rgba(35,41,54,0.04);width:", ";max-width:100%;", ";", ";", ";", ";}"], (props) => !props.animationDisabled && css(["will-change:width;transform-style:preserve-3d;transition:max-width 0.3s ease;"]), (props) => `${props.openedWidth}px`, mediaQuery.to.medium`flex: 0 0 auto;`, (props) => mediaQuery.from.medium`
|
|
56
|
+
flex: 0 1 ${props.openedWidth}px;
|
|
57
|
+
width: ${props.openedWidth}px;`, (props) => mediaQuery.from.medium`
|
|
58
|
+
max-width: ${props.opened ? props.openedWidth : 0}px`, (props) => mediaQuery.from.medium`
|
|
59
|
+
&.slide-enter {
|
|
60
|
+
max-width: 0;
|
|
61
|
+
}
|
|
62
|
+
&.slide-enter.slide-enter-active {
|
|
63
|
+
max-width: ${props.openedWidth}px;
|
|
64
|
+
}
|
|
65
|
+
&.slide-leave {
|
|
66
|
+
max-width: ${props.openedWidth}px;
|
|
67
|
+
}
|
|
68
|
+
&.slide-leave.slide-leave-active {
|
|
69
|
+
max-width: 0;
|
|
70
|
+
}
|
|
71
|
+
`);
|
|
72
|
+
const LayoutSidebarWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
96
73
|
displayName: "Layoutstyles__LayoutSidebarWrapper",
|
|
97
74
|
componentId: "sc-i053aj-11"
|
|
98
|
-
})(["position:relative;overflow:visible;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
return mediaQuery.to.medium(_templateObject19 || (_templateObject19 = _taggedTemplateLiteralLoose(["", ""])), props.right && props.opened && 'left: -44px');
|
|
112
|
-
}, function (props) {
|
|
113
|
-
return mediaQuery.to.medium(_templateObject20 || (_templateObject20 = _taggedTemplateLiteralLoose(["", ""])), !props.right && props.opened && 'right: -44px');
|
|
114
|
-
}, function (props) {
|
|
115
|
-
return props.hasControlButton && css(["", ";"], mediaQuery.to.medium(_templateObject21 || (_templateObject21 = _taggedTemplateLiteralLoose(["\n position: absolute;\n width: ", "px;\n transform: ", ";\n\n ", " {\n position: absolute;\n top: 0;\n left: 0;\n width: ", "px;\n }\n "])), props.openedWidth, props.right ? "translateX(" + props.openedWidth + "px)" : "translateX(-" + props.openedWidth + "px)", LayoutSidebar, props.openedWidth));
|
|
116
|
-
}, function (props) {
|
|
117
|
-
return props.opened && css(["&&{margin:", ";transform:translateX(0);}"], props.right ? '0 0 0 1px' : '0 1px 0 0');
|
|
118
|
-
});
|
|
119
|
-
export var LayoutSidebarInner = styled.div.withConfig({
|
|
75
|
+
})(["position:relative;overflow:visible;left:", ";right:", ";z-index:10;", ";&:hover{", "{background-color:", ";left:", ";right:", ";", ";", ";}}", ";", ";)"], (props) => props.right ? "auto" : "0", (props) => props.right ? "0" : "auto", (props) => !props.animationDisabled && css(["will-change:width,transform;transform-style:preserve-3d;transition:width 0.3s ease,transform 0.3s ease;"]), SidebarButton, (props) => props.theme.palette["grey-600"], (props) => props.right ? "-32px" : "auto", (props) => props.right ? "auto" : "-32px", (props) => mediaQuery.to.medium`${props.right && props.opened && "left: -44px"}`, (props) => mediaQuery.to.medium`${!props.right && props.opened && "right: -44px"}`, (props) => props.hasControlButton && css(["", ";"], mediaQuery.to.medium`
|
|
76
|
+
position: absolute;
|
|
77
|
+
width: ${props.openedWidth}px;
|
|
78
|
+
transform: ${props.right ? `translateX(${props.openedWidth}px)` : `translateX(-${props.openedWidth}px)`};
|
|
79
|
+
|
|
80
|
+
${LayoutSidebar} {
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: 0;
|
|
83
|
+
left: 0;
|
|
84
|
+
width: ${props.openedWidth}px;
|
|
85
|
+
}
|
|
86
|
+
`), (props) => props.opened && css(["&&{margin:", ";transform:translateX(0);}"], props.right ? "0 0 0 1px" : "0 1px 0 0"));
|
|
87
|
+
const LayoutSidebarInner = /* @__PURE__ */ styled.div.withConfig({
|
|
120
88
|
displayName: "Layoutstyles__LayoutSidebarInner",
|
|
121
89
|
componentId: "sc-i053aj-12"
|
|
122
|
-
})(["padding:24px 0;display:flex;flex-flow:column;height:100%;overflow-y:auto;overflow-x:hidden;"]);
|
|
90
|
+
})(["padding:24px 0;display:flex;flex-flow:column;height:100%;overflow-y:auto;overflow-x:hidden;"]);
|
|
91
|
+
export {
|
|
92
|
+
ArrowIcon,
|
|
93
|
+
CloseIcon,
|
|
94
|
+
LayoutBody,
|
|
95
|
+
LayoutContainer,
|
|
96
|
+
LayoutContent,
|
|
97
|
+
LayoutHeader,
|
|
98
|
+
LayoutMain,
|
|
99
|
+
LayoutMainInner,
|
|
100
|
+
LayoutSidebar,
|
|
101
|
+
LayoutSidebarInner,
|
|
102
|
+
LayoutSidebarWrapper,
|
|
103
|
+
LayoutSubheader,
|
|
104
|
+
SidebarButton
|
|
105
|
+
};
|
package/dist/Layout.types.d.ts
CHANGED
package/dist/Layout.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/dist/Page/Page.d.ts
CHANGED
package/dist/Page/Page.js
CHANGED
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React, { useMemo } from "react";
|
|
3
|
+
import { PageContainer, ContentWrapper, MenuWrapper, LayoutWrapper } from "./Page.styles.js";
|
|
4
|
+
const Page = ({
|
|
5
|
+
navBar,
|
|
6
|
+
appMenu,
|
|
7
|
+
children,
|
|
8
|
+
className
|
|
9
|
+
}) => {
|
|
10
|
+
const renderAppMenu = useMemo(() => {
|
|
9
11
|
if (appMenu) {
|
|
10
|
-
return
|
|
12
|
+
return React.cloneElement(appMenu, {
|
|
11
13
|
top: navBar ? 56 : 0
|
|
12
14
|
});
|
|
13
15
|
}
|
|
14
16
|
return null;
|
|
15
17
|
}, [appMenu, navBar]);
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
return /* @__PURE__ */ jsxs(PageContainer, { className, children: [
|
|
19
|
+
navBar,
|
|
20
|
+
/* @__PURE__ */ jsxs(ContentWrapper, { withNavBar: Boolean(navBar), children: [
|
|
21
|
+
/* @__PURE__ */ jsx(MenuWrapper, { withAppMenu: Boolean(appMenu), children: renderAppMenu }),
|
|
22
|
+
/* @__PURE__ */ jsx(LayoutWrapper, { withAppMenu: Boolean(appMenu), children })
|
|
23
|
+
] })
|
|
24
|
+
] });
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
Page as default
|
|
25
28
|
};
|
|
26
|
-
export default Page;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare const PageContainer: import(
|
|
2
|
-
export declare const ContentWrapper: import(
|
|
1
|
+
export declare const PageContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const ContentWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
3
3
|
withNavBar: boolean;
|
|
4
4
|
}, never>;
|
|
5
|
-
export declare const MenuWrapper: import(
|
|
5
|
+
export declare const MenuWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
6
6
|
withAppMenu: boolean;
|
|
7
7
|
}, never>;
|
|
8
|
-
export declare const LayoutWrapper: import(
|
|
8
|
+
export declare const LayoutWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
9
9
|
withAppMenu: boolean;
|
|
10
10
|
}, never>;
|
package/dist/Page/Page.styles.js
CHANGED
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const PageContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "Pagestyles__PageContainer",
|
|
4
4
|
componentId: "sc-1pbe558-0"
|
|
5
5
|
})(["position:fixed;top:0;left:0;width:100%;display:flex;flex-wrap:wrap;height:100vh;background-color:rgb(243,245,246);overflow:hidden;"]);
|
|
6
|
-
|
|
6
|
+
const ContentWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
7
7
|
displayName: "Pagestyles__ContentWrapper",
|
|
8
8
|
componentId: "sc-1pbe558-1"
|
|
9
|
-
})(["display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;width:100%;position:absolute;top:", ";height:", ";"],
|
|
10
|
-
|
|
11
|
-
}, function (props) {
|
|
12
|
-
return props.withNavBar ? 'calc(100% - 56px)' : '100%';
|
|
13
|
-
});
|
|
14
|
-
export var MenuWrapper = styled.div.withConfig({
|
|
9
|
+
})(["display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;width:100%;position:absolute;top:", ";height:", ";"], (props) => props.withNavBar ? "56px" : "0", (props) => props.withNavBar ? "calc(100% - 56px)" : "100%");
|
|
10
|
+
const MenuWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
15
11
|
displayName: "Pagestyles__MenuWrapper",
|
|
16
12
|
componentId: "sc-1pbe558-2"
|
|
17
|
-
})(["width:", ";position:relative;z-index:1200;height:100%;"],
|
|
18
|
-
|
|
19
|
-
});
|
|
20
|
-
export var LayoutWrapper = styled.div.withConfig({
|
|
13
|
+
})(["width:", ";position:relative;z-index:1200;height:100%;"], (props) => props.withAppMenu ? "64px" : "0");
|
|
14
|
+
const LayoutWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
21
15
|
displayName: "Pagestyles__LayoutWrapper",
|
|
22
16
|
componentId: "sc-1pbe558-3"
|
|
23
|
-
})(["width:", ";display:flex;flex-direction:column;height:100%;"],
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
})(["width:", ";display:flex;flex-direction:column;height:100%;"], (props) => props.withAppMenu ? "calc(100% - 64px)" : "100%");
|
|
18
|
+
export {
|
|
19
|
+
ContentWrapper,
|
|
20
|
+
LayoutWrapper,
|
|
21
|
+
MenuWrapper,
|
|
22
|
+
PageContainer
|
|
23
|
+
};
|
package/dist/Sidebar/Sidebar.js
CHANGED
|
@@ -1,59 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return withScrollbar ?
|
|
27
|
-
absolute: true,
|
|
28
|
-
withDnd: scrollWithDnd
|
|
29
|
-
}, content) : content;
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { useTheme } from "@synerise/ds-core";
|
|
4
|
+
import { AngleLeftS, AngleRightS, CloseS } from "@synerise/ds-icon";
|
|
5
|
+
import Scrollbar from "@synerise/ds-scrollbar";
|
|
6
|
+
import { LayoutSidebarWrapper, LayoutSidebar, SidebarButton, ArrowIcon, CloseIcon, LayoutSidebarInner } from "../Layout.styles.js";
|
|
7
|
+
const Sidebar = ({
|
|
8
|
+
opened,
|
|
9
|
+
openedWidth,
|
|
10
|
+
animationDisabled,
|
|
11
|
+
withControlButton,
|
|
12
|
+
innerStyles,
|
|
13
|
+
outerStyles,
|
|
14
|
+
scrollWithDnd,
|
|
15
|
+
children,
|
|
16
|
+
withScrollbar,
|
|
17
|
+
renderControls,
|
|
18
|
+
withSubheader,
|
|
19
|
+
side,
|
|
20
|
+
bothOpened,
|
|
21
|
+
onChange
|
|
22
|
+
}) => {
|
|
23
|
+
const theme = useTheme();
|
|
24
|
+
const contentWithScrollbar = useMemo(() => {
|
|
25
|
+
const content = /* @__PURE__ */ jsx(LayoutSidebarInner, { style: innerStyles, children });
|
|
26
|
+
return withScrollbar ? /* @__PURE__ */ jsx(Scrollbar, { absolute: true, withDnd: scrollWithDnd, children: content }) : content;
|
|
30
27
|
}, [children, scrollWithDnd, innerStyles, withScrollbar]);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
opened: opened,
|
|
44
|
-
openedWidth: openedWidth,
|
|
45
|
-
animationDisabled: animationDisabled
|
|
46
|
-
}, contentWithScrollbar), typeof renderControls === 'function' && renderControls() || renderControls === true && /*#__PURE__*/React.createElement(S.SidebarButton, {
|
|
47
|
-
withSubheader: withSubheader,
|
|
48
|
-
onClick: handleChange,
|
|
49
|
-
opened: opened,
|
|
50
|
-
right: side === 'right',
|
|
51
|
-
bothOpened: bothOpened
|
|
52
|
-
}, /*#__PURE__*/React.createElement(S.ArrowIcon, {
|
|
53
|
-
component: side === 'right' ? /*#__PURE__*/React.createElement(AngleLeftS, null) : /*#__PURE__*/React.createElement(AngleRightS, null),
|
|
54
|
-
color: theme.palette.white
|
|
55
|
-
}), /*#__PURE__*/React.createElement(S.CloseIcon, {
|
|
56
|
-
component: /*#__PURE__*/React.createElement(CloseS, null),
|
|
57
|
-
color: theme.palette.white
|
|
58
|
-
})));
|
|
59
|
-
};
|
|
28
|
+
const handleChange = () => onChange?.(!opened);
|
|
29
|
+
return /* @__PURE__ */ jsxs(LayoutSidebarWrapper, { opened, right: side === "right", openedWidth, animationDisabled, hasControlButton: withControlButton, children: [
|
|
30
|
+
/* @__PURE__ */ jsx(LayoutSidebar, { className: `ds-layout__sidebar ${side === "right" && "ds-layout__sidebar--right"}`, style: outerStyles, opened, openedWidth, animationDisabled, children: contentWithScrollbar }),
|
|
31
|
+
typeof renderControls === "function" && renderControls() || renderControls === true && /* @__PURE__ */ jsxs(SidebarButton, { withSubheader, onClick: handleChange, opened, right: side === "right", bothOpened, children: [
|
|
32
|
+
/* @__PURE__ */ jsx(ArrowIcon, { component: side === "right" ? /* @__PURE__ */ jsx(AngleLeftS, {}) : /* @__PURE__ */ jsx(AngleRightS, {}), color: theme.palette.white }),
|
|
33
|
+
/* @__PURE__ */ jsx(CloseIcon, { component: /* @__PURE__ */ jsx(CloseS, {}), color: theme.palette.white })
|
|
34
|
+
] })
|
|
35
|
+
] });
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
Sidebar
|
|
39
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export {
|
|
1
|
+
import { default as default2 } from "./Layout.js";
|
|
2
|
+
import { default as default3 } from "./Page/Page.js";
|
|
3
|
+
export {
|
|
4
|
+
default3 as Page,
|
|
5
|
+
default2 as default
|
|
6
|
+
};
|
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-layout",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Layout UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "
|
|
19
|
+
"build": "vite build",
|
|
20
20
|
"build:css": "node ../../../scripts/style/less.js",
|
|
21
21
|
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
|
-
"build:watch": "
|
|
22
|
+
"build:watch": "vite build --watch",
|
|
23
23
|
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
24
|
"pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
|
|
25
25
|
"prepublish": "pnpm run build",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-icon": "^1.
|
|
39
|
-
"@synerise/ds-scrollbar": "^1.2.
|
|
40
|
-
"@synerise/ds-utils": "^1.
|
|
38
|
+
"@synerise/ds-icon": "^1.15.1",
|
|
39
|
+
"@synerise/ds-scrollbar": "^1.2.17",
|
|
40
|
+
"@synerise/ds-utils": "^1.7.1"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@synerise/ds-core": "*",
|
|
44
44
|
"react": ">=16.9.0 <= 18.3.1",
|
|
45
45
|
"styled-components": "^5.3.3"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
48
48
|
}
|