@instructure/ui-pages 8.25.1-snapshot-10 → 8.25.1-snapshot-13
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 +1 -1
- package/es/Pages/Page/index.js +22 -19
- package/es/Pages/index.js +28 -33
- package/lib/Pages/Page/index.js +22 -19
- package/lib/Pages/index.js +28 -33
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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.25.1-snapshot-
|
|
6
|
+
## [8.25.1-snapshot-13](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-13) (2022-06-22)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-pages
|
|
9
9
|
|
package/es/Pages/Page/index.js
CHANGED
|
@@ -40,30 +40,19 @@ id: Pages.Page
|
|
|
40
40
|
@tsProps
|
|
41
41
|
**/
|
|
42
42
|
class Page extends Component {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
children: null
|
|
52
|
-
};
|
|
53
|
-
static contextTypes = {
|
|
54
|
-
history: PropTypes.array,
|
|
55
|
-
navigateToPreviousPage: PropTypes.func
|
|
56
|
-
};
|
|
43
|
+
constructor() {
|
|
44
|
+
super(...arguments);
|
|
45
|
+
this.ref = null;
|
|
46
|
+
|
|
47
|
+
this.handleRef = el => {
|
|
48
|
+
this.ref = el;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
57
51
|
|
|
58
52
|
get _content() {
|
|
59
53
|
return this.ref;
|
|
60
54
|
}
|
|
61
55
|
|
|
62
|
-
ref = null;
|
|
63
|
-
handleRef = el => {
|
|
64
|
-
this.ref = el;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
56
|
get defaultFocusElement() {
|
|
68
57
|
let defaultFocusElement = this.props.defaultFocusElement;
|
|
69
58
|
|
|
@@ -115,5 +104,19 @@ class Page extends Component {
|
|
|
115
104
|
|
|
116
105
|
}
|
|
117
106
|
|
|
107
|
+
Page.displayName = "Page";
|
|
108
|
+
Page.componentId = 'Pages.Page';
|
|
109
|
+
Page.allowedProps = allowedProps;
|
|
110
|
+
Page.propTypes = propTypes;
|
|
111
|
+
Page.defaultProps = {
|
|
112
|
+
defaultFocusElement: null,
|
|
113
|
+
padding: 'small',
|
|
114
|
+
textAlign: 'start',
|
|
115
|
+
children: null
|
|
116
|
+
};
|
|
117
|
+
Page.contextTypes = {
|
|
118
|
+
history: PropTypes.array,
|
|
119
|
+
navigateToPreviousPage: PropTypes.func
|
|
120
|
+
};
|
|
118
121
|
export default Page;
|
|
119
122
|
export { Page };
|
package/es/Pages/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec, _dec2, _class;
|
|
1
|
+
var _dec, _dec2, _class, _class2;
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
* The MIT License (MIT)
|
|
@@ -43,29 +43,34 @@ category: components
|
|
|
43
43
|
---
|
|
44
44
|
@tsProps
|
|
45
45
|
**/
|
|
46
|
-
let Pages = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = class Pages extends Component {
|
|
47
|
-
static displayName = "Pages";
|
|
48
|
-
static componentId = 'Pages';
|
|
49
|
-
static allowedProps = allowedProps;
|
|
50
|
-
static propTypes = propTypes;
|
|
51
|
-
static defaultProps = {
|
|
52
|
-
activePageIndex: 0
|
|
53
|
-
};
|
|
54
|
-
static Page = Page;
|
|
55
|
-
_timeouts = [];
|
|
56
|
-
_activePage = null;
|
|
57
|
-
_contentId;
|
|
58
|
-
ref = null;
|
|
59
|
-
handleRef = el => {
|
|
60
|
-
this.ref = el;
|
|
61
|
-
};
|
|
62
|
-
|
|
46
|
+
let Pages = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = (_class2 = class Pages extends Component {
|
|
63
47
|
get _contentElement() {
|
|
64
48
|
return this.ref;
|
|
65
49
|
}
|
|
66
50
|
|
|
67
51
|
constructor(props) {
|
|
68
52
|
super(props);
|
|
53
|
+
this._timeouts = [];
|
|
54
|
+
this._activePage = null;
|
|
55
|
+
this._contentId = void 0;
|
|
56
|
+
this.ref = null;
|
|
57
|
+
|
|
58
|
+
this.handleRef = el => {
|
|
59
|
+
this.ref = el;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
this.handleBackButtonClick = () => {
|
|
63
|
+
var _this$props$onPageInd, _this$props;
|
|
64
|
+
|
|
65
|
+
const history = [...this.state.history];
|
|
66
|
+
const oldPageIndex = history.pop();
|
|
67
|
+
const newPageIndex = history[history.length - 1];
|
|
68
|
+
this.setState({
|
|
69
|
+
history
|
|
70
|
+
});
|
|
71
|
+
(_this$props$onPageInd = (_this$props = this.props).onPageIndexChange) === null || _this$props$onPageInd === void 0 ? void 0 : _this$props$onPageInd.call(_this$props, newPageIndex || 0, oldPageIndex);
|
|
72
|
+
};
|
|
73
|
+
|
|
69
74
|
this.state = {
|
|
70
75
|
history: [typeof props.defaultPageIndex === 'number' ? props.defaultPageIndex : props.activePageIndex]
|
|
71
76
|
};
|
|
@@ -73,23 +78,11 @@ let Pages = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, gene
|
|
|
73
78
|
}
|
|
74
79
|
|
|
75
80
|
componentDidMount() {
|
|
76
|
-
var _this$props$makeStyle, _this$
|
|
81
|
+
var _this$props$makeStyle, _this$props2;
|
|
77
82
|
|
|
78
|
-
(_this$props$makeStyle = (_this$
|
|
83
|
+
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
|
79
84
|
}
|
|
80
85
|
|
|
81
|
-
handleBackButtonClick = () => {
|
|
82
|
-
var _this$props$onPageInd, _this$props2;
|
|
83
|
-
|
|
84
|
-
const history = [...this.state.history];
|
|
85
|
-
const oldPageIndex = history.pop();
|
|
86
|
-
const newPageIndex = history[history.length - 1];
|
|
87
|
-
this.setState({
|
|
88
|
-
history
|
|
89
|
-
});
|
|
90
|
-
(_this$props$onPageInd = (_this$props2 = this.props).onPageIndexChange) === null || _this$props$onPageInd === void 0 ? void 0 : _this$props$onPageInd.call(_this$props2, newPageIndex || 0, oldPageIndex);
|
|
91
|
-
};
|
|
92
|
-
|
|
93
86
|
componentDidUpdate() {
|
|
94
87
|
var _this$props$makeStyle2, _this$props3;
|
|
95
88
|
|
|
@@ -167,6 +160,8 @@ let Pages = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, gene
|
|
|
167
160
|
}, activePage)) : null;
|
|
168
161
|
}
|
|
169
162
|
|
|
170
|
-
}
|
|
163
|
+
}, _class2.displayName = "Pages", _class2.componentId = 'Pages', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
|
|
164
|
+
activePageIndex: 0
|
|
165
|
+
}, _class2.Page = Page, _class2)) || _class) || _class);
|
|
171
166
|
export default Pages;
|
|
172
167
|
export { Pages, Page };
|
package/lib/Pages/Page/index.js
CHANGED
|
@@ -37,30 +37,19 @@ id: Pages.Page
|
|
|
37
37
|
@tsProps
|
|
38
38
|
**/
|
|
39
39
|
class Page extends _react.Component {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
children: null
|
|
49
|
-
};
|
|
50
|
-
static contextTypes = {
|
|
51
|
-
history: _propTypes.default.array,
|
|
52
|
-
navigateToPreviousPage: _propTypes.default.func
|
|
53
|
-
};
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments);
|
|
42
|
+
this.ref = null;
|
|
43
|
+
|
|
44
|
+
this.handleRef = el => {
|
|
45
|
+
this.ref = el;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
54
48
|
|
|
55
49
|
get _content() {
|
|
56
50
|
return this.ref;
|
|
57
51
|
}
|
|
58
52
|
|
|
59
|
-
ref = null;
|
|
60
|
-
handleRef = el => {
|
|
61
|
-
this.ref = el;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
53
|
get defaultFocusElement() {
|
|
65
54
|
let defaultFocusElement = this.props.defaultFocusElement;
|
|
66
55
|
|
|
@@ -112,5 +101,19 @@ class Page extends _react.Component {
|
|
|
112
101
|
}
|
|
113
102
|
|
|
114
103
|
exports.Page = Page;
|
|
104
|
+
Page.displayName = "Page";
|
|
105
|
+
Page.componentId = 'Pages.Page';
|
|
106
|
+
Page.allowedProps = _props.allowedProps;
|
|
107
|
+
Page.propTypes = _props.propTypes;
|
|
108
|
+
Page.defaultProps = {
|
|
109
|
+
defaultFocusElement: null,
|
|
110
|
+
padding: 'small',
|
|
111
|
+
textAlign: 'start',
|
|
112
|
+
children: null
|
|
113
|
+
};
|
|
114
|
+
Page.contextTypes = {
|
|
115
|
+
history: _propTypes.default.array,
|
|
116
|
+
navigateToPreviousPage: _propTypes.default.func
|
|
117
|
+
};
|
|
115
118
|
var _default = Page;
|
|
116
119
|
exports.default = _default;
|
package/lib/Pages/index.js
CHANGED
|
@@ -41,7 +41,7 @@ var _PagesContext = require("./PagesContext");
|
|
|
41
41
|
|
|
42
42
|
var _props = require("./props");
|
|
43
43
|
|
|
44
|
-
var _dec, _dec2, _class;
|
|
44
|
+
var _dec, _dec2, _class, _class2;
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
---
|
|
@@ -49,29 +49,34 @@ category: components
|
|
|
49
49
|
---
|
|
50
50
|
@tsProps
|
|
51
51
|
**/
|
|
52
|
-
let Pages = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = class Pages extends _react.Component {
|
|
53
|
-
static displayName = "Pages";
|
|
54
|
-
static componentId = 'Pages';
|
|
55
|
-
static allowedProps = _props.allowedProps;
|
|
56
|
-
static propTypes = _props.propTypes;
|
|
57
|
-
static defaultProps = {
|
|
58
|
-
activePageIndex: 0
|
|
59
|
-
};
|
|
60
|
-
static Page = _Page.Page;
|
|
61
|
-
_timeouts = [];
|
|
62
|
-
_activePage = null;
|
|
63
|
-
_contentId;
|
|
64
|
-
ref = null;
|
|
65
|
-
handleRef = el => {
|
|
66
|
-
this.ref = el;
|
|
67
|
-
};
|
|
68
|
-
|
|
52
|
+
let Pages = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = (_class2 = class Pages extends _react.Component {
|
|
69
53
|
get _contentElement() {
|
|
70
54
|
return this.ref;
|
|
71
55
|
}
|
|
72
56
|
|
|
73
57
|
constructor(props) {
|
|
74
58
|
super(props);
|
|
59
|
+
this._timeouts = [];
|
|
60
|
+
this._activePage = null;
|
|
61
|
+
this._contentId = void 0;
|
|
62
|
+
this.ref = null;
|
|
63
|
+
|
|
64
|
+
this.handleRef = el => {
|
|
65
|
+
this.ref = el;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
this.handleBackButtonClick = () => {
|
|
69
|
+
var _this$props$onPageInd, _this$props;
|
|
70
|
+
|
|
71
|
+
const history = [...this.state.history];
|
|
72
|
+
const oldPageIndex = history.pop();
|
|
73
|
+
const newPageIndex = history[history.length - 1];
|
|
74
|
+
this.setState({
|
|
75
|
+
history
|
|
76
|
+
});
|
|
77
|
+
(_this$props$onPageInd = (_this$props = this.props).onPageIndexChange) === null || _this$props$onPageInd === void 0 ? void 0 : _this$props$onPageInd.call(_this$props, newPageIndex || 0, oldPageIndex);
|
|
78
|
+
};
|
|
79
|
+
|
|
75
80
|
this.state = {
|
|
76
81
|
history: [typeof props.defaultPageIndex === 'number' ? props.defaultPageIndex : props.activePageIndex]
|
|
77
82
|
};
|
|
@@ -79,23 +84,11 @@ let Pages = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0,
|
|
|
79
84
|
}
|
|
80
85
|
|
|
81
86
|
componentDidMount() {
|
|
82
|
-
var _this$props$makeStyle, _this$
|
|
87
|
+
var _this$props$makeStyle, _this$props2;
|
|
83
88
|
|
|
84
|
-
(_this$props$makeStyle = (_this$
|
|
89
|
+
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
|
85
90
|
}
|
|
86
91
|
|
|
87
|
-
handleBackButtonClick = () => {
|
|
88
|
-
var _this$props$onPageInd, _this$props2;
|
|
89
|
-
|
|
90
|
-
const history = [...this.state.history];
|
|
91
|
-
const oldPageIndex = history.pop();
|
|
92
|
-
const newPageIndex = history[history.length - 1];
|
|
93
|
-
this.setState({
|
|
94
|
-
history
|
|
95
|
-
});
|
|
96
|
-
(_this$props$onPageInd = (_this$props2 = this.props).onPageIndexChange) === null || _this$props$onPageInd === void 0 ? void 0 : _this$props$onPageInd.call(_this$props2, newPageIndex || 0, oldPageIndex);
|
|
97
|
-
};
|
|
98
|
-
|
|
99
92
|
componentDidUpdate() {
|
|
100
93
|
var _this$props$makeStyle2, _this$props3;
|
|
101
94
|
|
|
@@ -175,7 +168,9 @@ let Pages = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0,
|
|
|
175
168
|
}, activePage)) : null;
|
|
176
169
|
}
|
|
177
170
|
|
|
178
|
-
}
|
|
171
|
+
}, _class2.displayName = "Pages", _class2.componentId = 'Pages', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
|
|
172
|
+
activePageIndex: 0
|
|
173
|
+
}, _class2.Page = _Page.Page, _class2)) || _class) || _class);
|
|
179
174
|
exports.Pages = Pages;
|
|
180
175
|
var _default = Pages;
|
|
181
176
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-pages",
|
|
3
|
-
"version": "8.25.1-snapshot-
|
|
3
|
+
"version": "8.25.1-snapshot-13",
|
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,21 +23,21 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "8.25.1-snapshot-
|
|
27
|
-
"@instructure/ui-color-utils": "8.25.1-snapshot-
|
|
28
|
-
"@instructure/ui-test-utils": "8.25.1-snapshot-
|
|
29
|
-
"@instructure/ui-themes": "8.25.1-snapshot-
|
|
26
|
+
"@instructure/ui-babel-preset": "8.25.1-snapshot-13",
|
|
27
|
+
"@instructure/ui-color-utils": "8.25.1-snapshot-13",
|
|
28
|
+
"@instructure/ui-test-utils": "8.25.1-snapshot-13",
|
|
29
|
+
"@instructure/ui-themes": "8.25.1-snapshot-13"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/runtime": "^7.13.10",
|
|
33
|
-
"@instructure/console": "8.25.1-snapshot-
|
|
34
|
-
"@instructure/emotion": "8.25.1-snapshot-
|
|
35
|
-
"@instructure/shared-types": "8.25.1-snapshot-
|
|
36
|
-
"@instructure/ui-dom-utils": "8.25.1-snapshot-
|
|
37
|
-
"@instructure/ui-prop-types": "8.25.1-snapshot-
|
|
38
|
-
"@instructure/ui-react-utils": "8.25.1-snapshot-
|
|
39
|
-
"@instructure/ui-utils": "8.25.1-snapshot-
|
|
40
|
-
"@instructure/ui-view": "8.25.1-snapshot-
|
|
33
|
+
"@instructure/console": "8.25.1-snapshot-13",
|
|
34
|
+
"@instructure/emotion": "8.25.1-snapshot-13",
|
|
35
|
+
"@instructure/shared-types": "8.25.1-snapshot-13",
|
|
36
|
+
"@instructure/ui-dom-utils": "8.25.1-snapshot-13",
|
|
37
|
+
"@instructure/ui-prop-types": "8.25.1-snapshot-13",
|
|
38
|
+
"@instructure/ui-react-utils": "8.25.1-snapshot-13",
|
|
39
|
+
"@instructure/ui-utils": "8.25.1-snapshot-13",
|
|
40
|
+
"@instructure/ui-view": "8.25.1-snapshot-13",
|
|
41
41
|
"prop-types": "^15"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|