@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 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 | SidebarProps | |
40
- | right | Configuration of right sidebar | SidebarProps | |
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
- | nativeScroll | Set main column to use native browser scroll | boolean | false |
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
- | fillViewport | sets layout to absolute with calc(100vh - viewportTopOffset) height | boolean | false |
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 React from 'react';
2
- import Scrollbar from '@synerise/ds-scrollbar';
3
- import * as S from './Layout.styles';
4
- import { Sidebar } from './Sidebar/Sidebar';
5
- var DEFAULT_SIDEBAR_WIDTH = 320;
6
- var Layout = function Layout(_ref) {
7
- var header = _ref.header,
8
- left = _ref.left,
9
- right = _ref.right,
10
- children = _ref.children,
11
- className = _ref.className,
12
- styles = _ref.styles,
13
- subheader = _ref.subheader,
14
- _ref$fullPage = _ref.fullPage,
15
- fullPage = _ref$fullPage === void 0 ? false : _ref$fullPage,
16
- nativeScroll = _ref.nativeScroll,
17
- nativeScrollRef = _ref.nativeScrollRef,
18
- fillViewport = _ref.fillViewport,
19
- viewportTopOffset = _ref.viewportTopOffset,
20
- sidebarAnimationDisabled = _ref.sidebarAnimationDisabled,
21
- _ref$renderLeftSideba = _ref.renderLeftSidebarControls,
22
- renderLeftSidebarControls = _ref$renderLeftSideba === void 0 ? false : _ref$renderLeftSideba,
23
- _ref$renderRightSideb = _ref.renderRightSidebarControls,
24
- renderRightSidebarControls = _ref$renderRightSideb === void 0 ? false : _ref$renderRightSideb,
25
- _ref$leftSidebarWithD = _ref.leftSidebarWithDnd,
26
- leftSidebarWithDnd = _ref$leftSidebarWithD === void 0 ? false : _ref$leftSidebarWithD,
27
- _ref$rightSidebarWith = _ref.rightSidebarWithDnd,
28
- rightSidebarWithDnd = _ref$rightSidebarWith === void 0 ? false : _ref$rightSidebarWith,
29
- _ref$leftSidebarWithS = _ref.leftSidebarWithScrollbar,
30
- leftSidebarWithScrollbar = _ref$leftSidebarWithS === void 0 ? true : _ref$leftSidebarWithS,
31
- _ref$rightSidebarWith2 = _ref.rightSidebarWithScrollbar,
32
- rightSidebarWithScrollbar = _ref$rightSidebarWith2 === void 0 ? true : _ref$rightSidebarWith2,
33
- _ref$mainSidebarWithD = _ref.mainSidebarWithDnd,
34
- mainSidebarWithDnd = _ref$mainSidebarWithD === void 0 ? false : _ref$mainSidebarWithD;
35
- var leftSidebarWidth = (left == null ? void 0 : left.width) || DEFAULT_SIDEBAR_WIDTH;
36
- var rightSidebarWidth = (right == null ? void 0 : right.width) || DEFAULT_SIDEBAR_WIDTH;
37
- var showLeftSidebar = (left == null ? void 0 : left.opened) || !renderLeftSidebarControls;
38
- var showRightSidebar = (right == null ? void 0 : right.opened) || !renderRightSidebarControls;
39
- var mainColumnInner = nativeScroll ? /*#__PURE__*/React.createElement(S.LayoutMainInner, {
40
- fullPage: fullPage,
41
- style: styles && styles.mainInner,
42
- ref: nativeScrollRef
43
- }, children) : /*#__PURE__*/React.createElement(Scrollbar, {
44
- absolute: true,
45
- withDnd: mainSidebarWithDnd
46
- }, /*#__PURE__*/React.createElement(S.LayoutMainInner, {
47
- fullPage: fullPage,
48
- style: styles && styles.mainInner
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;
@@ -1,16 +1,16 @@
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, {
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("styled-components").StyledComponent<"div", any, {}, never>;
10
- export declare const LayoutMainInner: import("styled-components").StyledComponent<"div", any, {
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("styled-components").StyledComponent<"div", any, {
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("styled-components").StyledComponent<"button", any, SidebarButtonProps, never>;
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("styled-components").StyledComponent<"div", any, LayoutSidebarProps, never>;
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("styled-components").StyledComponent<"div", any, LayoutSidebarWrapperProps, never>;
39
- export declare const LayoutSidebarInner: import("styled-components").StyledComponent<"div", any, {}, never>;
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 {};
@@ -1,122 +1,105 @@
1
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21;
2
- function _taggedTemplateLiteralLoose(e, t) { return t || (t = e.slice(0)), e.raw = t, e; }
3
- import styled, { css } from 'styled-components';
4
- import { mediaQuery } from '@synerise/ds-core';
5
- import Icon from '@synerise/ds-icon';
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
- export var CloseIcon = styled(Icon).withConfig({
9
+ const CloseIcon = /* @__PURE__ */ styled(Icon).withConfig({
12
10
  displayName: "Layoutstyles__CloseIcon",
13
11
  componentId: "sc-i053aj-1"
14
12
  })(["&&{display:none;}"]);
15
- export var LayoutContent = styled.div.withConfig({
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(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["overflow-x: auto;"]))));
19
- export var LayoutHeader = styled.div.withConfig({
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
- export var LayoutSubheader = styled.div.withConfig({
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
- export var LayoutBody = styled.div.withConfig({
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(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["min-width: 704px;}"]))), function (props) {
31
- return props.allowOverflow && mediaQuery.to.small(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["overflow-x: auto;"])));
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(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["min-width: 704px;"]))), mediaQuery.to.medium(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["height: 100%;"]))));
37
- export var LayoutMainInner = styled.div.withConfig({
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(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["padding: 24px;"]))), function (props) {
41
- return props.fullPage ? '0' : '24px';
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:", ";", ";}"], function (props) {
47
- return props.fillViewport && css(["position:absolute;width:100%;height:calc( 100vh - ", "px );"], props.viewportTopOffset !== undefined ? props.viewportTopOffset : DEFAULT_TOP_OFFSET);
48
- }, LayoutMain, function (props) {
49
- return props.nativeScroll && css(["display:flex;flex-direction:column;overflow:hidden;"]);
50
- }, LayoutMainInner, function (props) {
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;}", ";", ";", ";", " ", ";"], function (props) {
59
- return props.theme.palette['grey-500'];
60
- }, function (props) {
61
- return props.right ? '3px 0 0 3px' : '0 3px 3px 0';
62
- }, function (props) {
63
- return props.right ? 'auto' : '-32px';
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%;", ";", ";", ";", ";}"], function (props) {
85
- return !props.animationDisabled && css(["will-change:width;transform-style:preserve-3d;transition:max-width 0.3s ease;"]);
86
- }, function (props) {
87
- return props.openedWidth + "px";
88
- }, mediaQuery.to.medium(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["flex: 0 0 auto;"]))), function (props) {
89
- return mediaQuery.from.medium(_templateObject16 || (_templateObject16 = _taggedTemplateLiteralLoose(["\n flex: 0 1 ", "px;\n width: ", "px;"])), props.openedWidth, props.openedWidth);
90
- }, function (props) {
91
- return mediaQuery.from.medium(_templateObject17 || (_templateObject17 = _taggedTemplateLiteralLoose(["\n max-width: ", "px"])), props.opened ? props.openedWidth : 0);
92
- }, function (props) {
93
- return mediaQuery.from.medium(_templateObject18 || (_templateObject18 = _taggedTemplateLiteralLoose(["\n &.slide-enter {\n max-width: 0;\n }\n &.slide-enter.slide-enter-active {\n max-width: ", "px;\n }\n &.slide-leave {\n max-width: ", "px;\n }\n &.slide-leave.slide-leave-active {\n max-width: 0;\n }\n "])), props.openedWidth, props.openedWidth);
94
- });
95
- export var LayoutSidebarWrapper = styled.div.withConfig({
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;height:100%;left:", ";right:", ";z-index:10;", ";&:hover{", "{background-color:", ";left:", ";right:", ";", ";", ";}}", ";", ";)"], function (props) {
99
- return props.right ? 'auto' : '0';
100
- }, function (props) {
101
- return props.right ? '0' : 'auto';
102
- }, function (props) {
103
- return !props.animationDisabled && css(["will-change:width,transform;transform-style:preserve-3d;transition:width 0.3s ease,transform 0.3s ease;"]);
104
- }, SidebarButton, function (props) {
105
- return props.theme.palette['grey-600'];
106
- }, function (props) {
107
- return props.right ? '-32px' : 'auto';
108
- }, function (props) {
109
- return props.right ? 'auto' : '-32px';
110
- }, function (props) {
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
+ };
@@ -1,4 +1,4 @@
1
- import { type CSSProperties, type ReactNode, type Ref } from 'react';
1
+ import { CSSProperties, ReactNode, Ref } from 'react';
2
2
  export interface ColumnProps<T> {
3
3
  left?: T;
4
4
  leftInner?: T;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React, { type ReactElement, type ReactNode } from 'react';
1
+ import { default as React, ReactElement, ReactNode } from 'react';
2
2
  type PageProps = {
3
3
  navBar?: ReactNode;
4
4
  appMenu?: ReactElement;
package/dist/Page/Page.js CHANGED
@@ -1,26 +1,28 @@
1
- import React, { useMemo } from 'react';
2
- import * as S from './Page.styles';
3
- var Page = function Page(_ref) {
4
- var navBar = _ref.navBar,
5
- appMenu = _ref.appMenu,
6
- children = _ref.children,
7
- className = _ref.className;
8
- var renderAppMenu = useMemo(function () {
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 /*#__PURE__*/React.cloneElement(appMenu, {
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 /*#__PURE__*/React.createElement(S.PageContainer, {
17
- className: className
18
- }, navBar, /*#__PURE__*/React.createElement(S.ContentWrapper, {
19
- withNavBar: Boolean(navBar)
20
- }, /*#__PURE__*/React.createElement(S.MenuWrapper, {
21
- withAppMenu: Boolean(appMenu)
22
- }, renderAppMenu), /*#__PURE__*/React.createElement(S.LayoutWrapper, {
23
- withAppMenu: Boolean(appMenu)
24
- }, children)));
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("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const ContentWrapper: import("styled-components").StyledComponent<"div", any, {
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("styled-components").StyledComponent<"div", any, {
5
+ export declare const MenuWrapper: import('styled-components').StyledComponent<"div", any, {
6
6
  withAppMenu: boolean;
7
7
  }, never>;
8
- export declare const LayoutWrapper: import("styled-components").StyledComponent<"div", any, {
8
+ export declare const LayoutWrapper: import('styled-components').StyledComponent<"div", any, {
9
9
  withAppMenu: boolean;
10
10
  }, never>;
@@ -1,25 +1,23 @@
1
- import styled from 'styled-components';
2
- export var PageContainer = styled.div.withConfig({
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
- export var ContentWrapper = styled.div.withConfig({
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:", ";"], function (props) {
10
- return props.withNavBar ? '56px' : '0';
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%;"], function (props) {
18
- return props.withAppMenu ? '64px' : '0';
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%;"], function (props) {
24
- return props.withAppMenu ? 'calc(100% - 64px)' : '100%';
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
+ };
@@ -1,4 +1,4 @@
1
- import React, { type CSSProperties, type ReactNode } from 'react';
1
+ import { default as React, CSSProperties, ReactNode } from 'react';
2
2
  type SidebarProps = {
3
3
  opened: boolean;
4
4
  bothOpened: boolean;
@@ -1,59 +1,39 @@
1
- import React, { useMemo } from 'react';
2
- import { useTheme } from '@synerise/ds-core';
3
- import { AngleLeftS, AngleRightS, CloseS } from '@synerise/ds-icon';
4
- import Scrollbar from '@synerise/ds-scrollbar';
5
- import * as S from '../Layout.styles';
6
- export var Sidebar = function Sidebar(_ref) {
7
- var opened = _ref.opened,
8
- openedWidth = _ref.openedWidth,
9
- animationDisabled = _ref.animationDisabled,
10
- withControlButton = _ref.withControlButton,
11
- innerStyles = _ref.innerStyles,
12
- outerStyles = _ref.outerStyles,
13
- scrollWithDnd = _ref.scrollWithDnd,
14
- children = _ref.children,
15
- withScrollbar = _ref.withScrollbar,
16
- renderControls = _ref.renderControls,
17
- withSubheader = _ref.withSubheader,
18
- side = _ref.side,
19
- bothOpened = _ref.bothOpened,
20
- onChange = _ref.onChange;
21
- var theme = useTheme();
22
- var contentWithScrollbar = useMemo(function () {
23
- var content = /*#__PURE__*/React.createElement(S.LayoutSidebarInner, {
24
- style: innerStyles
25
- }, children);
26
- return withScrollbar ? /*#__PURE__*/React.createElement(Scrollbar, {
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
- var handleChange = function handleChange() {
32
- return onChange == null ? void 0 : onChange(!opened);
33
- };
34
- return /*#__PURE__*/React.createElement(S.LayoutSidebarWrapper, {
35
- opened: opened,
36
- right: side === 'right',
37
- openedWidth: openedWidth,
38
- animationDisabled: animationDisabled,
39
- hasControlButton: withControlButton
40
- }, /*#__PURE__*/React.createElement(S.LayoutSidebar, {
41
- className: "ds-layout__sidebar " + (side === 'right' && 'ds-layout__sidebar--right'),
42
- style: outerStyles,
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
- export * from './Layout.types';
2
- export { default } from './Layout';
3
- export { default as Page } from './Page/Page';
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 '@testing-library/jest-dom';
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.15",
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": "pnpm run build:js && pnpm run build:css && pnpm run defs",
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": "pnpm run build:js -- --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.14.1",
39
- "@synerise/ds-scrollbar": "^1.2.15",
40
- "@synerise/ds-utils": "^1.6.0"
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": "8dfafc5d7278f09d430f1e7499782d05c76b47c0"
47
+ "gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
48
48
  }