@synerise/ds-layout 0.7.43 → 0.8.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 +32 -0
- package/dist/Layout.js +30 -44
- package/dist/Layout.styles.d.ts +2 -2
- package/dist/Layout.styles.js +15 -253
- package/dist/Layout.types.js +1 -0
- package/dist/Page/Page.js +3 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
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.8.2](https://github.com/synerise/synerise-design/compare/@synerise/ds-layout@0.8.1...@synerise/ds-layout@0.8.2) (2021-11-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-layout
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.8.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-layout@0.7.44...@synerise/ds-layout@0.8.1) (2021-11-09)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @synerise/ds-layout
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [0.8.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-layout@0.7.44...@synerise/ds-layout@0.8.0) (2021-11-09)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @synerise/ds-layout
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [0.7.44](https://github.com/synerise/synerise-design/compare/@synerise/ds-layout@0.7.42...@synerise/ds-layout@0.7.44) (2021-10-26)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @synerise/ds-layout
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
## [0.7.43](https://github.com/synerise/synerise-design/compare/@synerise/ds-layout@0.7.42...@synerise/ds-layout@0.7.43) (2021-10-19)
|
|
7
39
|
|
|
8
40
|
**Note:** Version bump only for package @synerise/ds-layout
|
package/dist/Layout.js
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
|
|
5
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
|
|
7
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8
|
-
|
|
9
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
-
|
|
11
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
1
|
import * as React from 'react';
|
|
14
2
|
import Scrollbar from '@synerise/ds-scrollbar';
|
|
15
|
-
import { AngleLeftS, AngleRightS, CloseS } from '@synerise/ds-icon
|
|
3
|
+
import { AngleLeftS, AngleRightS, CloseS } from '@synerise/ds-icon';
|
|
16
4
|
import theme from '@synerise/ds-core/dist/js/DSProvider/ThemeProvider/theme';
|
|
17
5
|
import * as S from './Layout.styles';
|
|
18
6
|
|
|
@@ -30,63 +18,61 @@ var Layout = function Layout(_ref) {
|
|
|
30
18
|
fullPage = _ref$fullPage === void 0 ? false : _ref$fullPage;
|
|
31
19
|
|
|
32
20
|
var _React$useState = React.useState(Boolean(leftOpened)),
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
setLeftSidebarOpened = _React$useState2[1];
|
|
21
|
+
leftSidebarOpened = _React$useState[0],
|
|
22
|
+
setLeftSidebarOpened = _React$useState[1];
|
|
36
23
|
|
|
37
|
-
var _React$
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
setRightSidebarOpened = _React$useState4[1];
|
|
24
|
+
var _React$useState2 = React.useState(Boolean(rightOpened)),
|
|
25
|
+
rightSidebarOpened = _React$useState2[0],
|
|
26
|
+
setRightSidebarOpened = _React$useState2[1];
|
|
41
27
|
|
|
42
|
-
return React.createElement(S.LayoutContainer, {
|
|
43
|
-
className: "ds-layout "
|
|
44
|
-
}, header ? React.createElement(S.LayoutHeader, {
|
|
28
|
+
return /*#__PURE__*/React.createElement(S.LayoutContainer, {
|
|
29
|
+
className: "ds-layout " + (className || '')
|
|
30
|
+
}, header ? /*#__PURE__*/React.createElement(S.LayoutHeader, {
|
|
45
31
|
className: "ds-layout__header"
|
|
46
|
-
}, header) : null, React.createElement(S.LayoutContent, null, React.createElement(S.LayoutBody, null, React.createElement(React.Fragment, null, left ? React.createElement(S.LayoutSidebarWrapper, {
|
|
32
|
+
}, header) : null, /*#__PURE__*/React.createElement(S.LayoutContent, null, /*#__PURE__*/React.createElement(S.LayoutBody, null, /*#__PURE__*/React.createElement(React.Fragment, null, left ? /*#__PURE__*/React.createElement(S.LayoutSidebarWrapper, {
|
|
47
33
|
opened: leftSidebarOpened
|
|
48
|
-
}, React.createElement(S.LayoutSidebar, {
|
|
34
|
+
}, /*#__PURE__*/React.createElement(S.LayoutSidebar, {
|
|
49
35
|
className: "ds-layout__sidebar",
|
|
50
36
|
style: styles && styles.left,
|
|
51
37
|
opened: leftSidebarOpened
|
|
52
|
-
}, React.createElement(Scrollbar, {
|
|
38
|
+
}, /*#__PURE__*/React.createElement(Scrollbar, {
|
|
53
39
|
absolute: true
|
|
54
|
-
}, React.createElement(S.LayoutSidebarInner, {
|
|
40
|
+
}, /*#__PURE__*/React.createElement(S.LayoutSidebarInner, {
|
|
55
41
|
style: styles && styles.leftInner
|
|
56
|
-
}, left))), React.createElement(S.SidebarButton, {
|
|
42
|
+
}, left))), /*#__PURE__*/React.createElement(S.SidebarButton, {
|
|
57
43
|
withSubheader: Boolean(subheader),
|
|
58
44
|
onClick: function onClick() {
|
|
59
45
|
return setLeftSidebarOpened(!leftSidebarOpened);
|
|
60
46
|
},
|
|
61
47
|
opened: leftSidebarOpened,
|
|
62
48
|
bothOpened: leftSidebarOpened && rightSidebarOpened
|
|
63
|
-
}, React.createElement(S.ArrowIcon, {
|
|
64
|
-
component: React.createElement(AngleRightS, null),
|
|
49
|
+
}, /*#__PURE__*/React.createElement(S.ArrowIcon, {
|
|
50
|
+
component: /*#__PURE__*/React.createElement(AngleRightS, null),
|
|
65
51
|
color: theme.palette.white
|
|
66
|
-
}), React.createElement(S.CloseIcon, {
|
|
67
|
-
component: React.createElement(CloseS, null),
|
|
52
|
+
}), /*#__PURE__*/React.createElement(S.CloseIcon, {
|
|
53
|
+
component: /*#__PURE__*/React.createElement(CloseS, null),
|
|
68
54
|
color: theme.palette.white
|
|
69
|
-
}))) : null), React.createElement(S.LayoutMain, {
|
|
55
|
+
}))) : null), /*#__PURE__*/React.createElement(S.LayoutMain, {
|
|
70
56
|
className: "ds-layout__main",
|
|
71
57
|
"data-popup-container": true,
|
|
72
58
|
style: styles && styles.main
|
|
73
|
-
}, React.createElement(S.LayoutSubheader, null, subheader), React.createElement(Scrollbar, {
|
|
59
|
+
}, /*#__PURE__*/React.createElement(S.LayoutSubheader, null, subheader), /*#__PURE__*/React.createElement(Scrollbar, {
|
|
74
60
|
absolute: true
|
|
75
|
-
}, React.createElement(S.LayoutMainInner, {
|
|
61
|
+
}, /*#__PURE__*/React.createElement(S.LayoutMainInner, {
|
|
76
62
|
fullPage: fullPage,
|
|
77
63
|
style: styles && styles.mainInner
|
|
78
|
-
}, children))), React.createElement(React.Fragment, null, right ? React.createElement(S.LayoutSidebarWrapper, {
|
|
64
|
+
}, children))), /*#__PURE__*/React.createElement(React.Fragment, null, right ? /*#__PURE__*/React.createElement(S.LayoutSidebarWrapper, {
|
|
79
65
|
opened: rightSidebarOpened,
|
|
80
66
|
right: true
|
|
81
|
-
}, React.createElement(S.LayoutSidebar, {
|
|
67
|
+
}, /*#__PURE__*/React.createElement(S.LayoutSidebar, {
|
|
82
68
|
className: "ds-layout__sidebar ds-layout__sidebar--right",
|
|
83
69
|
style: styles && styles.right,
|
|
84
70
|
opened: rightSidebarOpened
|
|
85
|
-
}, React.createElement(Scrollbar, {
|
|
71
|
+
}, /*#__PURE__*/React.createElement(Scrollbar, {
|
|
86
72
|
absolute: true
|
|
87
|
-
}, React.createElement(S.LayoutSidebarInner, {
|
|
73
|
+
}, /*#__PURE__*/React.createElement(S.LayoutSidebarInner, {
|
|
88
74
|
style: styles && styles.rightInner
|
|
89
|
-
}, right))), React.createElement(S.SidebarButton, {
|
|
75
|
+
}, right))), /*#__PURE__*/React.createElement(S.SidebarButton, {
|
|
90
76
|
withSubheader: Boolean(subheader),
|
|
91
77
|
onClick: function onClick() {
|
|
92
78
|
return setRightSidebarOpened(!rightSidebarOpened);
|
|
@@ -94,11 +80,11 @@ var Layout = function Layout(_ref) {
|
|
|
94
80
|
right: true,
|
|
95
81
|
opened: rightSidebarOpened,
|
|
96
82
|
bothOpened: leftSidebarOpened && rightSidebarOpened
|
|
97
|
-
}, React.createElement(S.ArrowIcon, {
|
|
98
|
-
component: React.createElement(AngleLeftS, null),
|
|
83
|
+
}, /*#__PURE__*/React.createElement(S.ArrowIcon, {
|
|
84
|
+
component: /*#__PURE__*/React.createElement(AngleLeftS, null),
|
|
99
85
|
color: theme.palette.white
|
|
100
|
-
}), React.createElement(S.CloseIcon, {
|
|
101
|
-
component: React.createElement(CloseS, null),
|
|
86
|
+
}), /*#__PURE__*/React.createElement(S.CloseIcon, {
|
|
87
|
+
component: /*#__PURE__*/React.createElement(CloseS, null),
|
|
102
88
|
color: theme.palette.white
|
|
103
89
|
}))) : null))));
|
|
104
90
|
};
|
package/dist/Layout.styles.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const ArrowIcon: import("styled-components").StyledComponent<import("react").FC<import("@synerise/ds-icon
|
|
3
|
-
export declare const CloseIcon: import("styled-components").StyledComponent<import("react").FC<import("@synerise/ds-icon
|
|
2
|
+
export declare const ArrowIcon: import("styled-components").StyledComponent<import("react").FC<import("@synerise/ds-icon").IconProps>, any, {}, never>;
|
|
3
|
+
export declare const CloseIcon: import("styled-components").StyledComponent<import("react").FC<import("@synerise/ds-icon").IconProps>, any, {}, never>;
|
|
4
4
|
export declare const LayoutContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
5
|
export declare const LayoutContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
6
|
export declare const LayoutHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
package/dist/Layout.styles.js
CHANGED
|
@@ -1,244 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
var data = _taggedTemplateLiteral(["transform: ", ""]);
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24;
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
return data;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
return data;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function _templateObject23() {
|
|
12
|
-
var data = _taggedTemplateLiteral(["width: 320px;"]);
|
|
13
|
-
|
|
14
|
-
_templateObject23 = function _templateObject23() {
|
|
15
|
-
return data;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
return data;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function _templateObject22() {
|
|
22
|
-
var data = _taggedTemplateLiteral(["position: absolute;"]);
|
|
23
|
-
|
|
24
|
-
_templateObject22 = function _templateObject22() {
|
|
25
|
-
return data;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
return data;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function _templateObject21() {
|
|
32
|
-
var data = _taggedTemplateLiteral(["", ""]);
|
|
33
|
-
|
|
34
|
-
_templateObject21 = function _templateObject21() {
|
|
35
|
-
return data;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
return data;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function _templateObject20() {
|
|
42
|
-
var data = _taggedTemplateLiteral(["", ""]);
|
|
43
|
-
|
|
44
|
-
_templateObject20 = function _templateObject20() {
|
|
45
|
-
return data;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
return data;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function _templateObject19() {
|
|
52
|
-
var data = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 320px\n "]);
|
|
53
|
-
|
|
54
|
-
_templateObject19 = function _templateObject19() {
|
|
55
|
-
return data;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
return data;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function _templateObject18() {
|
|
62
|
-
var data = _taggedTemplateLiteral(["\n &.slide-enter {\n max-width: 0;\n }\n &.slide-enter.slide-enter-active {\n max-width: 320px;\n }\n &.slide-leave {\n max-width: 320px;\n }\n &.slide-leave.slide-leave-active {\n max-width: 0;\n }\n "]);
|
|
63
|
-
|
|
64
|
-
_templateObject18 = function _templateObject18() {
|
|
65
|
-
return data;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
return data;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function _templateObject17() {
|
|
72
|
-
var data = _taggedTemplateLiteral(["max-width: ", ";"]);
|
|
73
|
-
|
|
74
|
-
_templateObject17 = function _templateObject17() {
|
|
75
|
-
return data;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
return data;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function _templateObject16() {
|
|
82
|
-
var data = _taggedTemplateLiteral(["flex: 0 1 320px; width: 320px;"]);
|
|
83
|
-
|
|
84
|
-
_templateObject16 = function _templateObject16() {
|
|
85
|
-
return data;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
return data;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function _templateObject15() {
|
|
92
|
-
var data = _taggedTemplateLiteral(["flex: 0 0 auto;"]);
|
|
93
|
-
|
|
94
|
-
_templateObject15 = function _templateObject15() {
|
|
95
|
-
return data;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
return data;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function _templateObject14() {
|
|
102
|
-
var data = _taggedTemplateLiteral(["display: flex;"]);
|
|
103
|
-
|
|
104
|
-
_templateObject14 = function _templateObject14() {
|
|
105
|
-
return data;
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
return data;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function _templateObject13() {
|
|
112
|
-
var data = _taggedTemplateLiteral(["display: none;"]);
|
|
113
|
-
|
|
114
|
-
_templateObject13 = function _templateObject13() {
|
|
115
|
-
return data;
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
return data;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function _templateObject12() {
|
|
122
|
-
var data = _taggedTemplateLiteral(["background-color: ", ";"]);
|
|
123
|
-
|
|
124
|
-
_templateObject12 = function _templateObject12() {
|
|
125
|
-
return data;
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
return data;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
function _templateObject11() {
|
|
132
|
-
var data = _taggedTemplateLiteral(["width: 44px;"]);
|
|
133
|
-
|
|
134
|
-
_templateObject11 = function _templateObject11() {
|
|
135
|
-
return data;
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
return data;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
function _templateObject10() {
|
|
142
|
-
var data = _taggedTemplateLiteral(["", ""]);
|
|
143
|
-
|
|
144
|
-
_templateObject10 = function _templateObject10() {
|
|
145
|
-
return data;
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
return data;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function _templateObject9() {
|
|
152
|
-
var data = _taggedTemplateLiteral(["", ""]);
|
|
153
|
-
|
|
154
|
-
_templateObject9 = function _templateObject9() {
|
|
155
|
-
return data;
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
return data;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
function _templateObject8() {
|
|
162
|
-
var data = _taggedTemplateLiteral(["", ""]);
|
|
163
|
-
|
|
164
|
-
_templateObject8 = function _templateObject8() {
|
|
165
|
-
return data;
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
return data;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
function _templateObject7() {
|
|
172
|
-
var data = _taggedTemplateLiteral(["display: flex; opacity: 1; visibility: visible"]);
|
|
173
|
-
|
|
174
|
-
_templateObject7 = function _templateObject7() {
|
|
175
|
-
return data;
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
return data;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
function _templateObject6() {
|
|
182
|
-
var data = _taggedTemplateLiteral(["padding: 24px;"]);
|
|
183
|
-
|
|
184
|
-
_templateObject6 = function _templateObject6() {
|
|
185
|
-
return data;
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
return data;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function _templateObject5() {
|
|
192
|
-
var data = _taggedTemplateLiteral(["flex: 0 0 auto;"]);
|
|
193
|
-
|
|
194
|
-
_templateObject5 = function _templateObject5() {
|
|
195
|
-
return data;
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
return data;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
function _templateObject4() {
|
|
202
|
-
var data = _taggedTemplateLiteral(["min-width: 704px;"]);
|
|
203
|
-
|
|
204
|
-
_templateObject4 = function _templateObject4() {
|
|
205
|
-
return data;
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
return data;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
function _templateObject3() {
|
|
212
|
-
var data = _taggedTemplateLiteral(["min-width: 704px;"]);
|
|
213
|
-
|
|
214
|
-
_templateObject3 = function _templateObject3() {
|
|
215
|
-
return data;
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
return data;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
function _templateObject2() {
|
|
222
|
-
var data = _taggedTemplateLiteral(["flex-direction: row;"]);
|
|
223
|
-
|
|
224
|
-
_templateObject2 = function _templateObject2() {
|
|
225
|
-
return data;
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
return data;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
function _templateObject() {
|
|
232
|
-
var data = _taggedTemplateLiteral(["overflow-x: auto;"]);
|
|
233
|
-
|
|
234
|
-
_templateObject = function _templateObject() {
|
|
235
|
-
return data;
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
return data;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
+
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
242
4
|
|
|
243
5
|
import styled, { css } from 'styled-components';
|
|
244
6
|
import { hexToRgba } from '@synerise/ds-utils';
|
|
@@ -259,7 +21,7 @@ export var LayoutContainer = styled.div.withConfig({
|
|
|
259
21
|
export var LayoutContent = styled.div.withConfig({
|
|
260
22
|
displayName: "Layoutstyles__LayoutContent",
|
|
261
23
|
componentId: "i053aj-3"
|
|
262
|
-
})(["overflow:hidden;width:100%;height:100%;", ";"], mediaQuery.to.small(_templateObject()));
|
|
24
|
+
})(["overflow:hidden;width:100%;height:100%;", ";"], mediaQuery.to.small(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["overflow-x: auto;"]))));
|
|
263
25
|
export var LayoutHeader = styled.div.withConfig({
|
|
264
26
|
displayName: "Layoutstyles__LayoutHeader",
|
|
265
27
|
componentId: "i053aj-4"
|
|
@@ -275,15 +37,15 @@ export var LayoutSubheader = styled.div.withConfig({
|
|
|
275
37
|
export var LayoutBody = styled.div.withConfig({
|
|
276
38
|
displayName: "Layoutstyles__LayoutBody",
|
|
277
39
|
componentId: "i053aj-6"
|
|
278
|
-
})(["flex:1;display:flex;flex-direction:column;min-height:0;min-width:0;position:relative;overflow:hidden;height:100%;", ";", ";"], mediaQuery.from.medium(_templateObject2()), mediaQuery.to.small(_templateObject3()));
|
|
40
|
+
})(["flex:1;display:flex;flex-direction:column;min-height:0;min-width:0;position:relative;overflow:hidden;height:100%;", ";", ";"], mediaQuery.from.medium(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["flex-direction: row;"]))), mediaQuery.to.small(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["min-width: 704px;"]))));
|
|
279
41
|
export var LayoutMain = styled.div.withConfig({
|
|
280
42
|
displayName: "Layoutstyles__LayoutMain",
|
|
281
43
|
componentId: "i053aj-7"
|
|
282
|
-
})(["flex:1;position:relative;", ";"], mediaQuery.to.small(_templateObject4()));
|
|
44
|
+
})(["flex:1;position:relative;", ";"], mediaQuery.to.small(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["min-width: 704px;"]))));
|
|
283
45
|
export var LayoutMainInner = styled.div.withConfig({
|
|
284
46
|
displayName: "Layoutstyles__LayoutMainInner",
|
|
285
47
|
componentId: "i053aj-8"
|
|
286
|
-
})(["", ";", ";&&{padding:", ";}"], mediaQuery.to.medium(_templateObject5()), mediaQuery.from.medium(_templateObject6()), function (props) {
|
|
48
|
+
})(["", ";", ";&&{padding:", ";}"], mediaQuery.to.medium(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["flex: 0 0 auto;"]))), mediaQuery.from.medium(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["padding: 24px;"]))), function (props) {
|
|
287
49
|
return props.fullPage ? '0' : '24px';
|
|
288
50
|
});
|
|
289
51
|
export var SidebarButton = styled.button.withConfig({
|
|
@@ -299,21 +61,21 @@ export var SidebarButton = styled.button.withConfig({
|
|
|
299
61
|
return !props.right ? 'auto' : '-32px';
|
|
300
62
|
}, function (props) {
|
|
301
63
|
return props.withSubheader ? '170px' : '48px';
|
|
302
|
-
}, mediaQuery.to.medium(_templateObject7()), ArrowIcon, mediaQuery.to.medium(_templateObject8(), function (props) {
|
|
64
|
+
}, mediaQuery.to.medium(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["display: flex; opacity: 1; visibility: visible"]))), ArrowIcon, mediaQuery.to.medium(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["", ""])), function (props) {
|
|
303
65
|
return props.right && props.opened && 'left: -44px';
|
|
304
|
-
}), mediaQuery.to.medium(_templateObject9(), function (props) {
|
|
66
|
+
}), mediaQuery.to.medium(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["", ""])), function (props) {
|
|
305
67
|
return !props.right && props.opened && 'right: -44px';
|
|
306
|
-
}), mediaQuery.to.small(_templateObject10(), function (props) {
|
|
68
|
+
}), mediaQuery.to.small(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["", ""])), function (props) {
|
|
307
69
|
return props.right && props.bothOpened && 'transform: translateY(56px)';
|
|
308
70
|
}), function (props) {
|
|
309
|
-
return props.opened && css(["right:", ";left:", ";", ";", ";", "{transform:rotateZ(180deg);", ";}", "{", ";}"], props.right ? 'auto' : '-4px', !props.right ? 'auto' : '-4px', mediaQuery.to.medium(_templateObject11()), mediaQuery.to.medium(_templateObject12(), props.theme.palette['grey-600']), ArrowIcon, mediaQuery.to.medium(_templateObject13()), CloseIcon, mediaQuery.to.medium(_templateObject14()));
|
|
71
|
+
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, mediaQuery.to.medium(_templateObject13 || (_templateObject13 = _taggedTemplateLiteralLoose(["display: none;"]))), CloseIcon, mediaQuery.to.medium(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["display: flex;"]))));
|
|
310
72
|
});
|
|
311
73
|
export var LayoutSidebar = styled.div.withConfig({
|
|
312
74
|
displayName: "Layoutstyles__LayoutSidebar",
|
|
313
75
|
componentId: "i053aj-10"
|
|
314
|
-
})(["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);transition:all 0.3s ease-in-out;width:320px;max-width:100%;", ";", ";", " ", ";", "}"], mediaQuery.to.medium(_templateObject15()), mediaQuery.from.medium(_templateObject16()), mediaQuery.from.medium(_templateObject17(), function (props) {
|
|
76
|
+
})(["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);transition:all 0.3s ease-in-out;width:320px;max-width:100%;", ";", ";", " ", ";", "}"], mediaQuery.to.medium(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["flex: 0 0 auto;"]))), mediaQuery.from.medium(_templateObject16 || (_templateObject16 = _taggedTemplateLiteralLoose(["flex: 0 1 320px; width: 320px;"]))), mediaQuery.from.medium(_templateObject17 || (_templateObject17 = _taggedTemplateLiteralLoose(["max-width: ", ";"])), function (props) {
|
|
315
77
|
return props.opened ? '320px' : '0px';
|
|
316
|
-
}), mediaQuery.from.medium(_templateObject18()), mediaQuery.to.medium(_templateObject19()));
|
|
78
|
+
}), mediaQuery.from.medium(_templateObject18 || (_templateObject18 = _taggedTemplateLiteralLoose(["\n &.slide-enter {\n max-width: 0;\n }\n &.slide-enter.slide-enter-active {\n max-width: 320px;\n }\n &.slide-leave {\n max-width: 320px;\n }\n &.slide-leave.slide-leave-active {\n max-width: 0;\n }\n "]))), mediaQuery.to.medium(_templateObject19 || (_templateObject19 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n left: 0;\n width: 320px\n "]))));
|
|
317
79
|
export var LayoutSidebarWrapper = styled.div.withConfig({
|
|
318
80
|
displayName: "Layoutstyles__LayoutSidebarWrapper",
|
|
319
81
|
componentId: "i053aj-11"
|
|
@@ -327,11 +89,11 @@ export var LayoutSidebarWrapper = styled.div.withConfig({
|
|
|
327
89
|
return props.right ? '-32px' : 'auto';
|
|
328
90
|
}, function (props) {
|
|
329
91
|
return props.right ? 'auto' : '-32px';
|
|
330
|
-
}, mediaQuery.to.medium(_templateObject20(), function (props) {
|
|
92
|
+
}, mediaQuery.to.medium(_templateObject20 || (_templateObject20 = _taggedTemplateLiteralLoose(["", ""])), function (props) {
|
|
331
93
|
return props.right && props.opened && 'left: -44px';
|
|
332
|
-
}), mediaQuery.to.medium(_templateObject21(), function (props) {
|
|
94
|
+
}), mediaQuery.to.medium(_templateObject21 || (_templateObject21 = _taggedTemplateLiteralLoose(["", ""])), function (props) {
|
|
333
95
|
return !props.right && props.opened && 'right: -44px';
|
|
334
|
-
}), mediaQuery.to.medium(_templateObject22()), mediaQuery.to.medium(_templateObject23()), mediaQuery.to.medium(_templateObject24(), function (props) {
|
|
96
|
+
}), mediaQuery.to.medium(_templateObject22 || (_templateObject22 = _taggedTemplateLiteralLoose(["position: absolute;"]))), mediaQuery.to.medium(_templateObject23 || (_templateObject23 = _taggedTemplateLiteralLoose(["width: 320px;"]))), mediaQuery.to.medium(_templateObject24 || (_templateObject24 = _taggedTemplateLiteralLoose(["transform: ", ""])), function (props) {
|
|
335
97
|
return props.right ? 'translateX(320px)' : 'translateX(-320px)';
|
|
336
98
|
}), function (props) {
|
|
337
99
|
return props.opened && css(["&&{margin:", ";transform:translateX(0);}"], props.right ? '0 0 0 1px' : '0 1px 0 0');
|
package/dist/Layout.types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/Page/Page.js
CHANGED
|
@@ -16,11 +16,11 @@ var Page = function Page(_ref) {
|
|
|
16
16
|
|
|
17
17
|
return null;
|
|
18
18
|
}, [appMenu, navBar]);
|
|
19
|
-
return React.createElement(S.PageContainer, null, navBar, React.createElement(S.ContentWrapper, {
|
|
19
|
+
return /*#__PURE__*/React.createElement(S.PageContainer, null, navBar, /*#__PURE__*/React.createElement(S.ContentWrapper, {
|
|
20
20
|
withNavBar: Boolean(navBar)
|
|
21
|
-
}, React.createElement(S.MenuWrapper, {
|
|
21
|
+
}, /*#__PURE__*/React.createElement(S.MenuWrapper, {
|
|
22
22
|
withAppMenu: Boolean(appMenu)
|
|
23
|
-
}, renderAppMenu), React.createElement(S.LayoutWrapper, {
|
|
23
|
+
}, renderAppMenu), /*#__PURE__*/React.createElement(S.LayoutWrapper, {
|
|
24
24
|
withAppMenu: Boolean(appMenu)
|
|
25
25
|
}, children)));
|
|
26
26
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-layout",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Layout UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
],
|
|
33
33
|
"types": "dist/index.d.ts",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@synerise/ds-scrollbar": "^0.
|
|
35
|
+
"@synerise/ds-scrollbar": "^0.4.2",
|
|
36
36
|
"@synerise/ds-utils": "^0.19.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@synerise/ds-core": "*",
|
|
40
40
|
"react": ">=16.9.0 < 17.0.0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "2468359677783819939fb9f1ef5acc36667ecd1a"
|
|
43
43
|
}
|