@instructure/ui-drawer-layout 8.12.1-snapshot.44 → 8.12.1-snapshot.50
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/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 -22
|
@@ -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.12.1-snapshot.
|
|
3
|
+
"version": "8.12.1-snapshot.50+3786369ec",
|
|
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.
|
|
29
|
-
"@instructure/debounce": "8.12.1-snapshot.
|
|
30
|
-
"@instructure/emotion": "8.12.1-snapshot.
|
|
31
|
-
"@instructure/shared-types": "8.12.1-snapshot.
|
|
32
|
-
"@instructure/ui-dialog": "8.12.1-snapshot.
|
|
33
|
-
"@instructure/ui-dom-utils": "8.12.1-snapshot.
|
|
34
|
-
"@instructure/ui-i18n": "8.12.1-snapshot.
|
|
35
|
-
"@instructure/ui-motion": "8.12.1-snapshot.
|
|
36
|
-
"@instructure/ui-portal": "8.12.1-snapshot.
|
|
37
|
-
"@instructure/ui-position": "8.12.1-snapshot.
|
|
38
|
-
"@instructure/ui-prop-types": "8.12.1-snapshot.
|
|
39
|
-
"@instructure/ui-react-utils": "8.12.1-snapshot.
|
|
40
|
-
"@instructure/ui-test-utils": "8.12.1-snapshot.
|
|
41
|
-
"@instructure/ui-testable": "8.12.1-snapshot.
|
|
42
|
-
"@instructure/ui-utils": "8.12.1-snapshot.
|
|
43
|
-
"@instructure/ui-view": "8.12.1-snapshot.
|
|
44
|
-
"@instructure/uid": "8.12.1-snapshot.
|
|
28
|
+
"@instructure/console": "8.12.1-snapshot.50+3786369ec",
|
|
29
|
+
"@instructure/debounce": "8.12.1-snapshot.50+3786369ec",
|
|
30
|
+
"@instructure/emotion": "8.12.1-snapshot.50+3786369ec",
|
|
31
|
+
"@instructure/shared-types": "8.12.1-snapshot.50+3786369ec",
|
|
32
|
+
"@instructure/ui-dialog": "8.12.1-snapshot.50+3786369ec",
|
|
33
|
+
"@instructure/ui-dom-utils": "8.12.1-snapshot.50+3786369ec",
|
|
34
|
+
"@instructure/ui-i18n": "8.12.1-snapshot.50+3786369ec",
|
|
35
|
+
"@instructure/ui-motion": "8.12.1-snapshot.50+3786369ec",
|
|
36
|
+
"@instructure/ui-portal": "8.12.1-snapshot.50+3786369ec",
|
|
37
|
+
"@instructure/ui-position": "8.12.1-snapshot.50+3786369ec",
|
|
38
|
+
"@instructure/ui-prop-types": "8.12.1-snapshot.50+3786369ec",
|
|
39
|
+
"@instructure/ui-react-utils": "8.12.1-snapshot.50+3786369ec",
|
|
40
|
+
"@instructure/ui-test-utils": "8.12.1-snapshot.50+3786369ec",
|
|
41
|
+
"@instructure/ui-testable": "8.12.1-snapshot.50+3786369ec",
|
|
42
|
+
"@instructure/ui-utils": "8.12.1-snapshot.50+3786369ec",
|
|
43
|
+
"@instructure/ui-view": "8.12.1-snapshot.50+3786369ec",
|
|
44
|
+
"@instructure/uid": "8.12.1-snapshot.50+3786369ec",
|
|
45
45
|
"prop-types": "^15"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@instructure/ui-babel-preset": "8.12.1-snapshot.
|
|
49
|
-
"@instructure/ui-test-locator": "8.12.1-snapshot.
|
|
50
|
-
"@instructure/ui-themes": "8.12.1-snapshot.
|
|
48
|
+
"@instructure/ui-babel-preset": "8.12.1-snapshot.50+3786369ec",
|
|
49
|
+
"@instructure/ui-test-locator": "8.12.1-snapshot.50+3786369ec",
|
|
50
|
+
"@instructure/ui-themes": "8.12.1-snapshot.50+3786369ec"
|
|
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": "
|
|
59
|
+
"gitHead": "3786369ec892bc0f716844828cc2729447adb8be"
|
|
60
60
|
}
|