@instructure/ui-drawer-layout 8.12.1-snapshot.7 → 8.13.1-snapshot.9

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,10 @@
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
+ # [8.13.0](https://github.com/instructure/instructure-ui/compare/v8.12.0...v8.13.0) (2021-12-01)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-drawer-layout
9
+
6
10
  # [8.12.0](https://github.com/instructure/instructure-ui/compare/v8.11.1...v8.12.0) (2021-11-17)
7
11
 
8
12
  ### Bug Fixes
@@ -42,8 +42,8 @@ id: DrawerLayout.Content
42
42
  ---
43
43
  **/
44
44
  let DrawerContent = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class DrawerContent extends Component {
45
- constructor(...args) {
46
- super(...args);
45
+ constructor() {
46
+ super(...arguments);
47
47
  this.state = {
48
48
  shouldTransition: false
49
49
  };
@@ -27,10 +27,17 @@ import { DrawerContentLocator } from './DrawerContent/DrawerContentLocator';
27
27
  import { DrawerTrayLocator } from './DrawerTray/DrawerTrayLocator';
28
28
  export { DrawerContentLocator, DrawerTrayLocator };
29
29
  export const DrawerLayoutLocator = locator(DrawerLayout.selector, {
30
- findContent: (...args) => DrawerContentLocator.find(...args),
31
- findTray: (element, ...args) => {
30
+ findContent: function () {
31
+ return DrawerContentLocator.find(...arguments);
32
+ },
33
+ findTray: function (element) {
32
34
  if (element && element.getAttribute) {
33
35
  const id = element.getAttribute(DrawerLayout.locatorAttribute);
36
+
37
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
38
+ args[_key - 1] = arguments[_key];
39
+ }
40
+
34
41
  return locator(`[${DrawerLayout.Tray.locatorAttribute}="${id}"]`).find(...args);
35
42
  } else {
36
43
  return null;
@@ -50,8 +50,8 @@ id: DrawerLayout.Tray
50
50
  ---
51
51
  **/
52
52
  let DrawerTray = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = textDirectionContextConsumer(), _dec3 = testable(), _dec(_class = _dec2(_class = _dec3(_class = (_temp = _class2 = class DrawerTray extends Component {
53
- constructor(...args) {
54
- super(...args);
53
+ constructor() {
54
+ super(...arguments);
55
55
  this.state = {
56
56
  transitioning: false,
57
57
  portalOpen: false
@@ -59,9 +59,8 @@ let DrawerLayout = (_dec = withStyle(generateStyle, null), _dec2 = textDirection
59
59
  this._tray = el;
60
60
  };
61
61
 
62
- this.handleContentSizeChange = ({
63
- width
64
- }) => {
62
+ this.handleContentSizeChange = _ref => {
63
+ let width = _ref.width;
65
64
  this.setState((state, props) => {
66
65
  const nextState = this.getNextState(props.minWidth, state.trayWidth, width, state.shouldOverlayTray);
67
66
 
@@ -73,9 +72,8 @@ let DrawerLayout = (_dec = withStyle(generateStyle, null), _dec2 = textDirection
73
72
  });
74
73
  };
75
74
 
76
- this.handleTraySizeChange = ({
77
- width
78
- }) => {
75
+ this.handleTraySizeChange = _ref2 => {
76
+ let width = _ref2.width;
79
77
  this.setState((state, props) => {
80
78
  const nextState = this.getNextState(props.minWidth, width, state.contentWidth, true);
81
79
 
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.DrawerContent = exports.default = void 0;
8
+ exports.default = exports.DrawerContent = void 0;
9
9
 
10
10
  var _react = require("react");
11
11
 
@@ -34,8 +34,8 @@ id: DrawerLayout.Content
34
34
  ---
35
35
  **/
36
36
  let DrawerContent = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class DrawerContent extends _react.Component {
37
- constructor(...args) {
38
- super(...args);
37
+ constructor() {
38
+ super(...arguments);
39
39
  this.state = {
40
40
  shouldTransition: false
41
41
  };
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.allowedProps = exports.propTypes = void 0;
8
+ exports.propTypes = exports.allowedProps = void 0;
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
@@ -9,13 +9,13 @@ Object.defineProperty(exports, "DrawerContentLocator", {
9
9
  return _DrawerContentLocator.DrawerContentLocator;
10
10
  }
11
11
  });
12
+ exports.DrawerLayoutLocator = void 0;
12
13
  Object.defineProperty(exports, "DrawerTrayLocator", {
13
14
  enumerable: true,
14
15
  get: function () {
15
16
  return _DrawerTrayLocator.DrawerTrayLocator;
16
17
  }
17
18
  });
18
- exports.DrawerLayoutLocator = void 0;
19
19
 
20
20
  var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
21
21
 
@@ -49,10 +49,17 @@ var _DrawerTrayLocator = require("./DrawerTray/DrawerTrayLocator");
49
49
  * SOFTWARE.
50
50
  */
51
51
  const DrawerLayoutLocator = (0, _locator.locator)(_index.DrawerLayout.selector, {
52
- findContent: (...args) => _DrawerContentLocator.DrawerContentLocator.find(...args),
53
- findTray: (element, ...args) => {
52
+ findContent: function () {
53
+ return _DrawerContentLocator.DrawerContentLocator.find(...arguments);
54
+ },
55
+ findTray: function (element) {
54
56
  if (element && element.getAttribute) {
55
57
  const id = element.getAttribute(_index.DrawerLayout.locatorAttribute);
58
+
59
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
60
+ args[_key - 1] = arguments[_key];
61
+ }
62
+
56
63
  return (0, _locator.locator)(`[${_index.DrawerLayout.Tray.locatorAttribute}="${id}"]`).find(...args);
57
64
  } else {
58
65
  return null;
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.DrawerTray = exports.default = void 0;
8
+ exports.default = exports.DrawerTray = void 0;
9
9
 
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
 
@@ -48,8 +48,8 @@ id: DrawerLayout.Tray
48
48
  ---
49
49
  **/
50
50
  let DrawerTray = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _textDirectionContextConsumer.textDirectionContextConsumer)(), _dec3 = (0, _testable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_temp = _class2 = class DrawerTray extends _react.Component {
51
- constructor(...args) {
52
- super(...args);
51
+ constructor() {
52
+ super(...arguments);
53
53
  this.state = {
54
54
  transitioning: false,
55
55
  portalOpen: false
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.allowedProps = exports.propTypes = void 0;
8
+ exports.propTypes = exports.allowedProps = void 0;
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
@@ -11,13 +11,14 @@ Object.defineProperty(exports, "DrawerContent", {
11
11
  return _DrawerContent.DrawerContent;
12
12
  }
13
13
  });
14
+ exports.DrawerLayoutContext = exports.DrawerLayout = void 0;
14
15
  Object.defineProperty(exports, "DrawerTray", {
15
16
  enumerable: true,
16
17
  get: function () {
17
18
  return _DrawerTray.DrawerTray;
18
19
  }
19
20
  });
20
- exports.DrawerLayoutContext = exports.DrawerLayout = exports.default = void 0;
21
+ exports.default = void 0;
21
22
 
22
23
  var _react = require("react");
23
24
 
@@ -72,9 +73,8 @@ let DrawerLayout = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2
72
73
  this._tray = el;
73
74
  };
74
75
 
75
- this.handleContentSizeChange = ({
76
- width
77
- }) => {
76
+ this.handleContentSizeChange = _ref => {
77
+ let width = _ref.width;
78
78
  this.setState((state, props) => {
79
79
  const nextState = this.getNextState(props.minWidth, state.trayWidth, width, state.shouldOverlayTray);
80
80
 
@@ -86,9 +86,8 @@ let DrawerLayout = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2
86
86
  });
87
87
  };
88
88
 
89
- this.handleTraySizeChange = ({
90
- width
91
- }) => {
89
+ this.handleTraySizeChange = _ref2 => {
90
+ let width = _ref2.width;
92
91
  this.setState((state, props) => {
93
92
  const nextState = this.getNextState(props.minWidth, width, state.contentWidth, true);
94
93
 
@@ -3,16 +3,16 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "DrawerLayoutLocator", {
6
+ Object.defineProperty(exports, "DrawerContentLocator", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _DrawerLayoutLocator.DrawerLayoutLocator;
9
+ return _DrawerLayoutLocator.DrawerContentLocator;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "DrawerContentLocator", {
12
+ Object.defineProperty(exports, "DrawerLayoutLocator", {
13
13
  enumerable: true,
14
14
  get: function () {
15
- return _DrawerLayoutLocator.DrawerContentLocator;
15
+ return _DrawerLayoutLocator.DrawerLayoutLocator;
16
16
  }
17
17
  });
18
18
  Object.defineProperty(exports, "DrawerTrayLocator", {
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.allowedProps = exports.propTypes = void 0;
8
+ exports.propTypes = exports.allowedProps = void 0;
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
package/lib/index.js CHANGED
@@ -3,16 +3,16 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "DrawerLayout", {
6
+ Object.defineProperty(exports, "DrawerContent", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _DrawerLayout.DrawerLayout;
9
+ return _DrawerLayout.DrawerContent;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "DrawerContent", {
12
+ Object.defineProperty(exports, "DrawerLayout", {
13
13
  enumerable: true,
14
14
  get: function () {
15
- return _DrawerLayout.DrawerContent;
15
+ return _DrawerLayout.DrawerLayout;
16
16
  }
17
17
  });
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-drawer-layout",
3
- "version": "8.12.1-snapshot.7+1e7ac8219",
3
+ "version": "8.13.1-snapshot.9+f32ba918e",
4
4
  "description": "A main-content-plus-tray layout component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -25,29 +25,29 @@
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "@babel/runtime": "^7.13.10",
28
- "@instructure/console": "8.12.1-snapshot.7+1e7ac8219",
29
- "@instructure/debounce": "8.12.1-snapshot.7+1e7ac8219",
30
- "@instructure/emotion": "8.12.1-snapshot.7+1e7ac8219",
31
- "@instructure/shared-types": "8.12.1-snapshot.7+1e7ac8219",
32
- "@instructure/ui-dialog": "8.12.1-snapshot.7+1e7ac8219",
33
- "@instructure/ui-dom-utils": "8.12.1-snapshot.7+1e7ac8219",
34
- "@instructure/ui-i18n": "8.12.1-snapshot.7+1e7ac8219",
35
- "@instructure/ui-motion": "8.12.1-snapshot.7+1e7ac8219",
36
- "@instructure/ui-portal": "8.12.1-snapshot.7+1e7ac8219",
37
- "@instructure/ui-position": "8.12.1-snapshot.7+1e7ac8219",
38
- "@instructure/ui-prop-types": "8.12.1-snapshot.7+1e7ac8219",
39
- "@instructure/ui-react-utils": "8.12.1-snapshot.7+1e7ac8219",
40
- "@instructure/ui-test-utils": "8.12.1-snapshot.7+1e7ac8219",
41
- "@instructure/ui-testable": "8.12.1-snapshot.7+1e7ac8219",
42
- "@instructure/ui-utils": "8.12.1-snapshot.7+1e7ac8219",
43
- "@instructure/ui-view": "8.12.1-snapshot.7+1e7ac8219",
44
- "@instructure/uid": "8.12.1-snapshot.7+1e7ac8219",
28
+ "@instructure/console": "8.13.1-snapshot.9+f32ba918e",
29
+ "@instructure/debounce": "8.13.1-snapshot.9+f32ba918e",
30
+ "@instructure/emotion": "8.13.1-snapshot.9+f32ba918e",
31
+ "@instructure/shared-types": "8.13.1-snapshot.9+f32ba918e",
32
+ "@instructure/ui-dialog": "8.13.1-snapshot.9+f32ba918e",
33
+ "@instructure/ui-dom-utils": "8.13.1-snapshot.9+f32ba918e",
34
+ "@instructure/ui-i18n": "8.13.1-snapshot.9+f32ba918e",
35
+ "@instructure/ui-motion": "8.13.1-snapshot.9+f32ba918e",
36
+ "@instructure/ui-portal": "8.13.1-snapshot.9+f32ba918e",
37
+ "@instructure/ui-position": "8.13.1-snapshot.9+f32ba918e",
38
+ "@instructure/ui-prop-types": "8.13.1-snapshot.9+f32ba918e",
39
+ "@instructure/ui-react-utils": "8.13.1-snapshot.9+f32ba918e",
40
+ "@instructure/ui-test-utils": "8.13.1-snapshot.9+f32ba918e",
41
+ "@instructure/ui-testable": "8.13.1-snapshot.9+f32ba918e",
42
+ "@instructure/ui-utils": "8.13.1-snapshot.9+f32ba918e",
43
+ "@instructure/ui-view": "8.13.1-snapshot.9+f32ba918e",
44
+ "@instructure/uid": "8.13.1-snapshot.9+f32ba918e",
45
45
  "prop-types": "^15"
46
46
  },
47
47
  "devDependencies": {
48
- "@instructure/ui-babel-preset": "8.12.1-snapshot.7+1e7ac8219",
49
- "@instructure/ui-test-locator": "8.12.1-snapshot.7+1e7ac8219",
50
- "@instructure/ui-themes": "8.12.1-snapshot.7+1e7ac8219"
48
+ "@instructure/ui-babel-preset": "8.13.1-snapshot.9+f32ba918e",
49
+ "@instructure/ui-test-locator": "8.13.1-snapshot.9+f32ba918e",
50
+ "@instructure/ui-themes": "8.13.1-snapshot.9+f32ba918e"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "react": ">=16.8 <=17"
@@ -56,5 +56,5 @@
56
56
  "access": "public"
57
57
  },
58
58
  "sideEffects": false,
59
- "gitHead": "1e7ac821932a91fe9ef761c96f747c7ea1f3925a"
59
+ "gitHead": "f32ba918e4d3ce76c6ee95c856584d00a9d80958"
60
60
  }