@synerise/ds-layout 0.8.1 → 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 CHANGED
@@ -3,6 +3,14 @@
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
+
6
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)
7
15
 
8
16
  **Note:** Version bump only for package @synerise/ds-layout
package/dist/Layout.js CHANGED
@@ -1,15 +1,3 @@
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(o); 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) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_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
3
  import { AngleLeftS, AngleRightS, CloseS } from '@synerise/ds-icon';
@@ -30,17 +18,15 @@ 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
- _React$useState2 = _slicedToArray(_React$useState, 2),
34
- leftSidebarOpened = _React$useState2[0],
35
- setLeftSidebarOpened = _React$useState2[1];
21
+ leftSidebarOpened = _React$useState[0],
22
+ setLeftSidebarOpened = _React$useState[1];
36
23
 
37
- var _React$useState3 = React.useState(Boolean(rightOpened)),
38
- _React$useState4 = _slicedToArray(_React$useState3, 2),
39
- rightSidebarOpened = _React$useState4[0],
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
28
  return /*#__PURE__*/React.createElement(S.LayoutContainer, {
43
- className: "ds-layout ".concat(className || '')
29
+ className: "ds-layout " + (className || '')
44
30
  }, header ? /*#__PURE__*/React.createElement(S.LayoutHeader, {
45
31
  className: "ds-layout__header"
46
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, {
@@ -1,6 +1,6 @@
1
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;
2
2
 
3
- 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; }
4
4
 
5
5
  import styled, { css } from 'styled-components';
6
6
  import { hexToRgba } from '@synerise/ds-utils';
@@ -21,7 +21,7 @@ export var LayoutContainer = styled.div.withConfig({
21
21
  export var LayoutContent = styled.div.withConfig({
22
22
  displayName: "Layoutstyles__LayoutContent",
23
23
  componentId: "i053aj-3"
24
- })(["overflow:hidden;width:100%;height:100%;", ";"], mediaQuery.to.small(_templateObject || (_templateObject = _taggedTemplateLiteral(["overflow-x: auto;"]))));
24
+ })(["overflow:hidden;width:100%;height:100%;", ";"], mediaQuery.to.small(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["overflow-x: auto;"]))));
25
25
  export var LayoutHeader = styled.div.withConfig({
26
26
  displayName: "Layoutstyles__LayoutHeader",
27
27
  componentId: "i053aj-4"
@@ -37,15 +37,15 @@ export var LayoutSubheader = styled.div.withConfig({
37
37
  export var LayoutBody = styled.div.withConfig({
38
38
  displayName: "Layoutstyles__LayoutBody",
39
39
  componentId: "i053aj-6"
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 = _taggedTemplateLiteral(["flex-direction: row;"]))), mediaQuery.to.small(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["min-width: 704px;"]))));
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;"]))));
41
41
  export var LayoutMain = styled.div.withConfig({
42
42
  displayName: "Layoutstyles__LayoutMain",
43
43
  componentId: "i053aj-7"
44
- })(["flex:1;position:relative;", ";"], mediaQuery.to.small(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["min-width: 704px;"]))));
44
+ })(["flex:1;position:relative;", ";"], mediaQuery.to.small(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["min-width: 704px;"]))));
45
45
  export var LayoutMainInner = styled.div.withConfig({
46
46
  displayName: "Layoutstyles__LayoutMainInner",
47
47
  componentId: "i053aj-8"
48
- })(["", ";", ";&&{padding:", ";}"], mediaQuery.to.medium(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["flex: 0 0 auto;"]))), mediaQuery.from.medium(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["padding: 24px;"]))), function (props) {
48
+ })(["", ";", ";&&{padding:", ";}"], mediaQuery.to.medium(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["flex: 0 0 auto;"]))), mediaQuery.from.medium(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["padding: 24px;"]))), function (props) {
49
49
  return props.fullPage ? '0' : '24px';
50
50
  });
51
51
  export var SidebarButton = styled.button.withConfig({
@@ -61,21 +61,21 @@ export var SidebarButton = styled.button.withConfig({
61
61
  return !props.right ? 'auto' : '-32px';
62
62
  }, function (props) {
63
63
  return props.withSubheader ? '170px' : '48px';
64
- }, mediaQuery.to.medium(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["display: flex; opacity: 1; visibility: visible"]))), ArrowIcon, mediaQuery.to.medium(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["", ""])), function (props) {
64
+ }, mediaQuery.to.medium(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["display: flex; opacity: 1; visibility: visible"]))), ArrowIcon, mediaQuery.to.medium(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["", ""])), function (props) {
65
65
  return props.right && props.opened && 'left: -44px';
66
- }), mediaQuery.to.medium(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["", ""])), function (props) {
66
+ }), mediaQuery.to.medium(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["", ""])), function (props) {
67
67
  return !props.right && props.opened && 'right: -44px';
68
- }), mediaQuery.to.small(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["", ""])), function (props) {
68
+ }), mediaQuery.to.small(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["", ""])), function (props) {
69
69
  return props.right && props.bothOpened && 'transform: translateY(56px)';
70
70
  }), function (props) {
71
- return props.opened && css(["right:", ";left:", ";", ";", ";", "{transform:rotateZ(180deg);", ";}", "{", ";}"], props.right ? 'auto' : '-4px', !props.right ? 'auto' : '-4px', mediaQuery.to.medium(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["width: 44px;"]))), mediaQuery.to.medium(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["background-color: ", ";"])), props.theme.palette['grey-600']), ArrowIcon, mediaQuery.to.medium(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["display: none;"]))), CloseIcon, mediaQuery.to.medium(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["display: flex;"]))));
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;"]))));
72
72
  });
73
73
  export var LayoutSidebar = styled.div.withConfig({
74
74
  displayName: "Layoutstyles__LayoutSidebar",
75
75
  componentId: "i053aj-10"
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 = _taggedTemplateLiteral(["flex: 0 0 auto;"]))), mediaQuery.from.medium(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["flex: 0 1 320px; width: 320px;"]))), mediaQuery.from.medium(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["max-width: ", ";"])), 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) {
77
77
  return props.opened ? '320px' : '0px';
78
- }), mediaQuery.from.medium(_templateObject18 || (_templateObject18 = _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 "]))), mediaQuery.to.medium(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 320px\n "]))));
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 "]))));
79
79
  export var LayoutSidebarWrapper = styled.div.withConfig({
80
80
  displayName: "Layoutstyles__LayoutSidebarWrapper",
81
81
  componentId: "i053aj-11"
@@ -89,11 +89,11 @@ export var LayoutSidebarWrapper = styled.div.withConfig({
89
89
  return props.right ? '-32px' : 'auto';
90
90
  }, function (props) {
91
91
  return props.right ? 'auto' : '-32px';
92
- }, mediaQuery.to.medium(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["", ""])), function (props) {
92
+ }, mediaQuery.to.medium(_templateObject20 || (_templateObject20 = _taggedTemplateLiteralLoose(["", ""])), function (props) {
93
93
  return props.right && props.opened && 'left: -44px';
94
- }), mediaQuery.to.medium(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["", ""])), function (props) {
94
+ }), mediaQuery.to.medium(_templateObject21 || (_templateObject21 = _taggedTemplateLiteralLoose(["", ""])), function (props) {
95
95
  return !props.right && props.opened && 'right: -44px';
96
- }), mediaQuery.to.medium(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["position: absolute;"]))), mediaQuery.to.medium(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["width: 320px;"]))), mediaQuery.to.medium(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["transform: ", ""])), 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) {
97
97
  return props.right ? 'translateX(320px)' : 'translateX(-320px)';
98
98
  }), function (props) {
99
99
  return props.opened && css(["&&{margin:", ";transform:translateX(0);}"], props.right ? '0 0 0 1px' : '0 1px 0 0');
package/dist/Page/Page.js CHANGED
@@ -9,7 +9,7 @@ var Page = function Page(_ref) {
9
9
  if (appMenu) {
10
10
  // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
11
11
  // @ts-ignore
12
- return /*#__PURE__*/React.cloneElement(appMenu, {
12
+ return React.cloneElement(appMenu, {
13
13
  top: navBar ? 56 : 0
14
14
  });
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-layout",
3
- "version": "0.8.1",
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.4.1",
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": "14733fd96fcf0727a2baf45444e54e9a490d64f4"
42
+ "gitHead": "2468359677783819939fb9f1ef5acc36667ecd1a"
43
43
  }