@synerise/ds-layout 0.12.13 → 0.13.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,7 +3,7 @@
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
- ## [0.12.13](https://github.com/synerise/synerise-design/compare/@synerise/ds-layout@0.12.12...@synerise/ds-layout@0.12.13) (2022-08-04)
6
+ ## [0.13.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-layout@0.13.0...@synerise/ds-layout@0.13.1) (2022-08-25)
7
7
 
8
8
  **Note:** Version bump only for package @synerise/ds-layout
9
9
 
@@ -11,17 +11,12 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
- ## [0.12.12](https://github.com/synerise/synerise-design/compare/@synerise/ds-layout@0.12.10...@synerise/ds-layout@0.12.12) (2022-08-04)
15
-
16
- **Note:** Version bump only for package @synerise/ds-layout
17
-
18
-
14
+ # [0.13.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-layout@0.12.10...@synerise/ds-layout@0.13.0) (2022-08-11)
19
15
 
20
16
 
17
+ ### Features
21
18
 
22
- ## [0.12.11](https://github.com/synerise/synerise-design/compare/@synerise/ds-layout@0.12.10...@synerise/ds-layout@0.12.11) (2022-08-04)
23
-
24
- **Note:** Version bump only for package @synerise/ds-layout
19
+ * **scrollbar:** creates common interface for old and new scrollbars ([ba9956f](https://github.com/synerise/synerise-design/commit/ba9956f2a89ff9133da6b4c5a931142865e750e8))
25
20
 
26
21
 
27
22
 
package/README.md CHANGED
@@ -32,21 +32,24 @@ import Layout from '@synerise/ds-layout'
32
32
 
33
33
  ## API
34
34
 
35
- | Property | Description | Type | Default |
36
- | --------- | ---------------------------------------- | --------------- | ------- |
37
- | header | Set top header content page | React.ReactNode | |
38
- | subheader | Set subheader content page | React.ReactNode | |
39
- | left | Configuration of left sidebar | SidebarProps | |
40
- | right | Configuration of right sidebar | SidebarProps | |
41
- | children | The layout elements passed to the parent | React.ReactNode | |
42
- | className | Layout's className | string | |
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
- | renderLeftSidebarControls | Left sidebar visibility. Accepts function returning `ReactNode`. | boolean or function | false |
49
- | renderRightSidebarControls| Right sidebar visibility. Accepts function returning `ReactNode`.| boolean or function | false |
35
+ | Property | Description | Type | Default |
36
+ |----------------------------|-------------------------------------------------------------------|---------------------| ------- |
37
+ | header | Set top header content page | React.ReactNode | |
38
+ | subheader | Set subheader content page | React.ReactNode | |
39
+ | left | Configuration of left sidebar | SidebarProps | |
40
+ | right | Configuration of right sidebar | SidebarProps | |
41
+ | children | The layout elements passed to the parent | React.ReactNode | |
42
+ | className | Layout's className | string | |
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
+ | renderLeftSidebarControls | Left sidebar visibility. Accepts function returning `ReactNode`. | boolean or function | false |
49
+ | renderRightSidebarControls | Right sidebar visibility. Accepts function returning `ReactNode`. | boolean or function | false |
50
+ | leftSidebarWithDnd | Set withDnd in left sidebar scrollbar | boolean | false |
51
+ | mainSidebarWithDnd | Set withDnd in main sidebar scrollbar | boolean | false |
52
+ | rightSidebarWithDnd | Set withDnd in right sidebar scrollbar | boolean | false |
50
53
 
51
54
  ### SidebarProps
52
55
 
package/dist/Layout.js CHANGED
@@ -19,7 +19,13 @@ var Layout = function Layout(_ref) {
19
19
  _ref$renderLeftSideba = _ref.renderLeftSidebarControls,
20
20
  renderLeftSidebarControls = _ref$renderLeftSideba === void 0 ? false : _ref$renderLeftSideba,
21
21
  _ref$renderRightSideb = _ref.renderRightSidebarControls,
22
- renderRightSidebarControls = _ref$renderRightSideb === void 0 ? false : _ref$renderRightSideb;
22
+ renderRightSidebarControls = _ref$renderRightSideb === void 0 ? false : _ref$renderRightSideb,
23
+ _ref$leftSidebarWithD = _ref.leftSidebarWithDnd,
24
+ leftSidebarWithDnd = _ref$leftSidebarWithD === void 0 ? false : _ref$leftSidebarWithD,
25
+ _ref$rightSidebarWith = _ref.rightSidebarWithDnd,
26
+ rightSidebarWithDnd = _ref$rightSidebarWith === void 0 ? false : _ref$rightSidebarWith,
27
+ _ref$mainSidebarWithD = _ref.mainSidebarWithDnd,
28
+ mainSidebarWithDnd = _ref$mainSidebarWithD === void 0 ? false : _ref$mainSidebarWithD;
23
29
  var leftSidebarWidth = React.useMemo(function () {
24
30
  return (left == null ? void 0 : left.width) || DEFAULT_SIDEBAR_WIDTH;
25
31
  }, [left]);
@@ -47,7 +53,8 @@ var Layout = function Layout(_ref) {
47
53
  openedWidth: leftSidebarWidth,
48
54
  animationDisabled: !!sidebarAnimationDisabled
49
55
  }, /*#__PURE__*/React.createElement(Scrollbar, {
50
- absolute: true
56
+ absolute: true,
57
+ withDnd: leftSidebarWithDnd
51
58
  }, /*#__PURE__*/React.createElement(S.LayoutSidebarInner, {
52
59
  style: styles && styles.leftInner
53
60
  }, left == null ? void 0 : left.content))), typeof renderLeftSidebarControls === 'function' && renderLeftSidebarControls() || renderLeftSidebarControls === true && /*#__PURE__*/React.createElement(S.SidebarButton, {
@@ -72,7 +79,8 @@ var Layout = function Layout(_ref) {
72
79
  leftSidebarWidth: leftSidebarWidth,
73
80
  rightSidebarWidth: rightSidebarWidth
74
81
  }, /*#__PURE__*/React.createElement(S.LayoutSubheader, null, subheader), /*#__PURE__*/React.createElement(Scrollbar, {
75
- absolute: true
82
+ absolute: true,
83
+ withDnd: mainSidebarWithDnd
76
84
  }, /*#__PURE__*/React.createElement(S.LayoutMainInner, {
77
85
  fullPage: fullPage,
78
86
  style: styles && styles.mainInner
@@ -88,7 +96,8 @@ var Layout = function Layout(_ref) {
88
96
  openedWidth: rightSidebarWidth,
89
97
  animationDisabled: !!sidebarAnimationDisabled
90
98
  }, /*#__PURE__*/React.createElement(Scrollbar, {
91
- absolute: true
99
+ absolute: true,
100
+ withDnd: rightSidebarWithDnd
92
101
  }, /*#__PURE__*/React.createElement(S.LayoutSidebarInner, {
93
102
  style: styles && styles.rightInner
94
103
  }, right == null ? void 0 : right.content))), typeof renderRightSidebarControls === 'function' && renderRightSidebarControls() || renderRightSidebarControls === true && /*#__PURE__*/React.createElement(S.SidebarButton, {
@@ -31,4 +31,7 @@ export declare type LayoutProps = {
31
31
  * Right sidebar: render visibility of show/hide button. Accepts function returning `ReactNode` (see source code).
32
32
  */
33
33
  renderRightSidebarControls?: boolean | (() => React.ReactNode);
34
+ leftSidebarWithDnd?: boolean;
35
+ rightSidebarWithDnd?: boolean;
36
+ mainSidebarWithDnd?: boolean;
34
37
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-layout",
3
- "version": "0.12.13",
3
+ "version": "0.13.1",
4
4
  "description": "Layout UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -32,13 +32,13 @@
32
32
  ],
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
- "@synerise/ds-icon": "^0.49.3",
36
- "@synerise/ds-scrollbar": "^0.4.10",
37
- "@synerise/ds-utils": "^0.22.6"
35
+ "@synerise/ds-icon": "^0.50.0",
36
+ "@synerise/ds-scrollbar": "^0.5.1",
37
+ "@synerise/ds-utils": "^0.22.8"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@synerise/ds-core": "*",
41
41
  "react": ">=16.9.0 < 17.0.0"
42
42
  },
43
- "gitHead": "28486eab4b37b485cbe2a383e3ae9b8e9d789862"
43
+ "gitHead": "c9530f0548fa244796b0c6b1ea5fa3d6330e84ea"
44
44
  }