@synerise/ds-layout 0.12.14 → 0.13.2
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 +27 -0
- package/README.md +18 -15
- package/dist/Layout.js +13 -4
- package/dist/Layout.types.d.ts +3 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
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.13.2](https://github.com/synerise/synerise-design/compare/@synerise/ds-layout@0.13.1...@synerise/ds-layout@0.13.2) (2022-08-31)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-layout
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [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)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @synerise/ds-layout
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [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)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **scrollbar:** creates common interface for old and new scrollbars ([ba9956f](https://github.com/synerise/synerise-design/commit/ba9956f2a89ff9133da6b4c5a931142865e750e8))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [0.12.10](https://github.com/synerise/synerise-design/compare/@synerise/ds-layout@0.12.9...@synerise/ds-layout@0.12.10) (2022-07-17)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @synerise/ds-layout
|
package/README.md
CHANGED
|
@@ -32,21 +32,24 @@ import Layout from '@synerise/ds-layout'
|
|
|
32
32
|
|
|
33
33
|
## API
|
|
34
34
|
|
|
35
|
-
| Property
|
|
36
|
-
|
|
37
|
-
| header
|
|
38
|
-
| subheader
|
|
39
|
-
| left
|
|
40
|
-
| right
|
|
41
|
-
| children
|
|
42
|
-
| className
|
|
43
|
-
| styles
|
|
44
|
-
| leftOpened
|
|
45
|
-
| rightOpened
|
|
46
|
-
| leftOpenedWidth
|
|
47
|
-
| rightOpenedWidth
|
|
48
|
-
| renderLeftSidebarControls
|
|
49
|
-
| renderRightSidebarControls| Right sidebar visibility. Accepts function returning `ReactNode
|
|
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, {
|
package/dist/Layout.types.d.ts
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "0.13.2",
|
|
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.
|
|
36
|
-
"@synerise/ds-scrollbar": "^0.
|
|
37
|
-
"@synerise/ds-utils": "^0.22.
|
|
35
|
+
"@synerise/ds-icon": "^0.51.0",
|
|
36
|
+
"@synerise/ds-scrollbar": "^0.5.2",
|
|
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": "
|
|
43
|
+
"gitHead": "ef480757296035e4ba2928cd169a98458477b8d1"
|
|
44
44
|
}
|