@instructure/ui-drawer-layout 8.12.1-snapshot.7 → 8.13.0
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 +4 -0
- package/es/DrawerLayout/DrawerContent/index.js +2 -2
- package/es/DrawerLayout/DrawerLayoutLocator.js +9 -2
- package/es/DrawerLayout/DrawerTray/index.js +2 -2
- package/es/DrawerLayout/index.js +4 -6
- package/lib/DrawerLayout/DrawerContent/index.js +3 -3
- package/lib/DrawerLayout/DrawerContent/props.js +1 -1
- package/lib/DrawerLayout/DrawerLayoutLocator.js +10 -3
- package/lib/DrawerLayout/DrawerTray/index.js +3 -3
- package/lib/DrawerLayout/DrawerTray/props.js +1 -1
- package/lib/DrawerLayout/index.js +6 -7
- package/lib/DrawerLayout/locator.js +4 -4
- package/lib/DrawerLayout/props.js +1 -1
- package/lib/index.js +4 -4
- package/package.json +22 -23
- package/LICENSE.md +0 -27
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(
|
|
46
|
-
super(...
|
|
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: (
|
|
31
|
-
|
|
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(
|
|
54
|
-
super(...
|
|
53
|
+
constructor() {
|
|
54
|
+
super(...arguments);
|
|
55
55
|
this.state = {
|
|
56
56
|
transitioning: false,
|
|
57
57
|
portalOpen: false
|
package/es/DrawerLayout/index.js
CHANGED
|
@@ -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.
|
|
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(
|
|
38
|
-
super(...
|
|
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.
|
|
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: (
|
|
53
|
-
|
|
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.
|
|
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(
|
|
52
|
-
super(...
|
|
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.
|
|
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.
|
|
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, "
|
|
6
|
+
Object.defineProperty(exports, "DrawerContentLocator", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return _DrawerLayoutLocator.
|
|
9
|
+
return _DrawerLayoutLocator.DrawerContentLocator;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "DrawerLayoutLocator", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return _DrawerLayoutLocator.
|
|
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.
|
|
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, "
|
|
6
|
+
Object.defineProperty(exports, "DrawerContent", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return _DrawerLayout.
|
|
9
|
+
return _DrawerLayout.DrawerContent;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "DrawerLayout", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return _DrawerLayout.
|
|
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.
|
|
3
|
+
"version": "8.13.0",
|
|
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.
|
|
29
|
-
"@instructure/debounce": "8.
|
|
30
|
-
"@instructure/emotion": "8.
|
|
31
|
-
"@instructure/shared-types": "8.
|
|
32
|
-
"@instructure/ui-dialog": "8.
|
|
33
|
-
"@instructure/ui-dom-utils": "8.
|
|
34
|
-
"@instructure/ui-i18n": "8.
|
|
35
|
-
"@instructure/ui-motion": "8.
|
|
36
|
-
"@instructure/ui-portal": "8.
|
|
37
|
-
"@instructure/ui-position": "8.
|
|
38
|
-
"@instructure/ui-prop-types": "8.
|
|
39
|
-
"@instructure/ui-react-utils": "8.
|
|
40
|
-
"@instructure/ui-test-utils": "8.
|
|
41
|
-
"@instructure/ui-testable": "8.
|
|
42
|
-
"@instructure/ui-utils": "8.
|
|
43
|
-
"@instructure/ui-view": "8.
|
|
44
|
-
"@instructure/uid": "8.
|
|
28
|
+
"@instructure/console": "8.13.0",
|
|
29
|
+
"@instructure/debounce": "8.13.0",
|
|
30
|
+
"@instructure/emotion": "8.13.0",
|
|
31
|
+
"@instructure/shared-types": "8.13.0",
|
|
32
|
+
"@instructure/ui-dialog": "8.13.0",
|
|
33
|
+
"@instructure/ui-dom-utils": "8.13.0",
|
|
34
|
+
"@instructure/ui-i18n": "8.13.0",
|
|
35
|
+
"@instructure/ui-motion": "8.13.0",
|
|
36
|
+
"@instructure/ui-portal": "8.13.0",
|
|
37
|
+
"@instructure/ui-position": "8.13.0",
|
|
38
|
+
"@instructure/ui-prop-types": "8.13.0",
|
|
39
|
+
"@instructure/ui-react-utils": "8.13.0",
|
|
40
|
+
"@instructure/ui-test-utils": "8.13.0",
|
|
41
|
+
"@instructure/ui-testable": "8.13.0",
|
|
42
|
+
"@instructure/ui-utils": "8.13.0",
|
|
43
|
+
"@instructure/ui-view": "8.13.0",
|
|
44
|
+
"@instructure/uid": "8.13.0",
|
|
45
45
|
"prop-types": "^15"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@instructure/ui-babel-preset": "8.
|
|
49
|
-
"@instructure/ui-test-locator": "8.
|
|
50
|
-
"@instructure/ui-themes": "8.
|
|
48
|
+
"@instructure/ui-babel-preset": "8.13.0",
|
|
49
|
+
"@instructure/ui-test-locator": "8.13.0",
|
|
50
|
+
"@instructure/ui-themes": "8.13.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"react": ">=16.8 <=17"
|
|
@@ -55,6 +55,5 @@
|
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"sideEffects": false
|
|
59
|
-
"gitHead": "1e7ac821932a91fe9ef761c96f747c7ea1f3925a"
|
|
58
|
+
"sideEffects": false
|
|
60
59
|
}
|
package/LICENSE.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: The MIT License (MIT)
|
|
3
|
-
category: Getting Started
|
|
4
|
-
order: 9
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# The MIT License (MIT)
|
|
8
|
-
|
|
9
|
-
Copyright (c) 2015 Instructure, Inc.
|
|
10
|
-
|
|
11
|
-
**Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
-
in the Software without restriction, including without limitation the rights
|
|
14
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
-
furnished to do so, subject to the following conditions.**
|
|
17
|
-
|
|
18
|
-
The above copyright notice and this permission notice shall be included in all
|
|
19
|
-
copies or substantial portions of the Software.
|
|
20
|
-
|
|
21
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
-
SOFTWARE.
|