@instructure/ui-pages 8.10.1 → 8.10.3-snapshot.3
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/LICENSE.md +27 -0
- package/es/Pages/Page/index.js +8 -1
- package/es/Pages/index.js +4 -1
- package/lib/Pages/Page/index.js +8 -1
- package/lib/Pages/index.js +4 -1
- package/package.json +17 -16
- package/src/Pages/Page/index.tsx +5 -3
- package/src/Pages/index.tsx +3 -1
- package/types/Pages/Page/index.d.ts +1 -0
- package/types/Pages/Page/index.d.ts.map +1 -1
- package/types/Pages/index.d.ts +1 -0
- package/types/Pages/index.d.ts.map +1 -1
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.10.2](https://github.com/instructure/instructure-ui/compare/v8.10.1...v8.10.2) (2021-10-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-pages
|
|
9
|
+
|
|
6
10
|
## [8.10.1](https://github.com/instructure/instructure-ui/compare/v8.10.0...v8.10.1) (2021-10-01)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @instructure/ui-pages
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
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.
|
package/es/Pages/Page/index.js
CHANGED
|
@@ -39,6 +39,11 @@ id: Pages.Page
|
|
|
39
39
|
**/
|
|
40
40
|
|
|
41
41
|
class Page extends Component {
|
|
42
|
+
constructor(...args) {
|
|
43
|
+
super(...args);
|
|
44
|
+
this.ref = null;
|
|
45
|
+
}
|
|
46
|
+
|
|
42
47
|
get defaultFocusElement() {
|
|
43
48
|
let defaultFocusElement = this.props.defaultFocusElement;
|
|
44
49
|
|
|
@@ -83,7 +88,9 @@ class Page extends Component {
|
|
|
83
88
|
padding: props.padding,
|
|
84
89
|
textAlign: props.textAlign,
|
|
85
90
|
elementRef: el => {
|
|
86
|
-
this._content = el;
|
|
91
|
+
this._content = el; // TODO remove and keep 'ref' in v9
|
|
92
|
+
|
|
93
|
+
this.ref = el;
|
|
87
94
|
}
|
|
88
95
|
}, children && typeof children === 'function' ? children(history, navigateToPreviousPage) : children));
|
|
89
96
|
}
|
package/es/Pages/index.js
CHANGED
|
@@ -50,6 +50,7 @@ let Pages = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_clas
|
|
|
50
50
|
constructor(props) {
|
|
51
51
|
super(props);
|
|
52
52
|
this._timeouts = [];
|
|
53
|
+
this.ref = null;
|
|
53
54
|
|
|
54
55
|
this.handleBackButtonClick = () => {
|
|
55
56
|
const oldPageIndex = this._history.pop();
|
|
@@ -138,7 +139,9 @@ let Pages = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_clas
|
|
|
138
139
|
margin: this.props.margin,
|
|
139
140
|
role: "region",
|
|
140
141
|
elementRef: el => {
|
|
141
|
-
this._contentElement = el;
|
|
142
|
+
this._contentElement = el; // TODO remove with v9 and keep ref
|
|
143
|
+
|
|
144
|
+
this.ref = el;
|
|
142
145
|
}
|
|
143
146
|
}, this.activePage)) : null;
|
|
144
147
|
}
|
package/lib/Pages/Page/index.js
CHANGED
|
@@ -36,6 +36,11 @@ id: Pages.Page
|
|
|
36
36
|
---
|
|
37
37
|
**/
|
|
38
38
|
class Page extends _react.Component {
|
|
39
|
+
constructor(...args) {
|
|
40
|
+
super(...args);
|
|
41
|
+
this.ref = null;
|
|
42
|
+
}
|
|
43
|
+
|
|
39
44
|
get defaultFocusElement() {
|
|
40
45
|
let defaultFocusElement = this.props.defaultFocusElement;
|
|
41
46
|
|
|
@@ -79,7 +84,9 @@ class Page extends _react.Component {
|
|
|
79
84
|
padding: props.padding,
|
|
80
85
|
textAlign: props.textAlign,
|
|
81
86
|
elementRef: el => {
|
|
82
|
-
this._content = el;
|
|
87
|
+
this._content = el; // TODO remove and keep 'ref' in v9
|
|
88
|
+
|
|
89
|
+
this.ref = el;
|
|
83
90
|
}
|
|
84
91
|
}, children && typeof children === 'function' ? children(history, navigateToPreviousPage) : children));
|
|
85
92
|
}
|
package/lib/Pages/index.js
CHANGED
|
@@ -56,6 +56,7 @@ let Pages = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
|
|
|
56
56
|
constructor(props) {
|
|
57
57
|
super(props);
|
|
58
58
|
this._timeouts = [];
|
|
59
|
+
this.ref = null;
|
|
59
60
|
|
|
60
61
|
this.handleBackButtonClick = () => {
|
|
61
62
|
const oldPageIndex = this._history.pop();
|
|
@@ -146,7 +147,9 @@ let Pages = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
|
|
|
146
147
|
margin: this.props.margin,
|
|
147
148
|
role: "region",
|
|
148
149
|
elementRef: el => {
|
|
149
|
-
this._contentElement = el;
|
|
150
|
+
this._contentElement = el; // TODO remove with v9 and keep ref
|
|
151
|
+
|
|
152
|
+
this.ref = el;
|
|
150
153
|
}
|
|
151
154
|
}, this.activePage)) : null;
|
|
152
155
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-pages",
|
|
3
|
-
"version": "8.10.
|
|
3
|
+
"version": "8.10.3-snapshot.3+2ee813492",
|
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -24,23 +24,23 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@instructure/ui-babel-preset": "8.10.
|
|
28
|
-
"@instructure/ui-color-utils": "8.10.
|
|
29
|
-
"@instructure/ui-test-utils": "8.10.
|
|
30
|
-
"@instructure/ui-themes": "8.10.
|
|
27
|
+
"@instructure/ui-babel-preset": "8.10.3-snapshot.3+2ee813492",
|
|
28
|
+
"@instructure/ui-color-utils": "8.10.3-snapshot.3+2ee813492",
|
|
29
|
+
"@instructure/ui-test-utils": "8.10.3-snapshot.3+2ee813492",
|
|
30
|
+
"@instructure/ui-themes": "8.10.3-snapshot.3+2ee813492"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.13.10",
|
|
34
|
-
"@instructure/console": "8.10.
|
|
35
|
-
"@instructure/emotion": "8.10.
|
|
36
|
-
"@instructure/shared-types": "8.10.
|
|
37
|
-
"@instructure/ui-a11y-utils": "8.10.
|
|
38
|
-
"@instructure/ui-dom-utils": "8.10.
|
|
39
|
-
"@instructure/ui-prop-types": "8.10.
|
|
40
|
-
"@instructure/ui-react-utils": "8.10.
|
|
41
|
-
"@instructure/ui-utils": "8.10.
|
|
42
|
-
"@instructure/ui-view": "8.10.
|
|
43
|
-
"@instructure/uid": "8.10.
|
|
34
|
+
"@instructure/console": "8.10.3-snapshot.3+2ee813492",
|
|
35
|
+
"@instructure/emotion": "8.10.3-snapshot.3+2ee813492",
|
|
36
|
+
"@instructure/shared-types": "8.10.3-snapshot.3+2ee813492",
|
|
37
|
+
"@instructure/ui-a11y-utils": "8.10.3-snapshot.3+2ee813492",
|
|
38
|
+
"@instructure/ui-dom-utils": "8.10.3-snapshot.3+2ee813492",
|
|
39
|
+
"@instructure/ui-prop-types": "8.10.3-snapshot.3+2ee813492",
|
|
40
|
+
"@instructure/ui-react-utils": "8.10.3-snapshot.3+2ee813492",
|
|
41
|
+
"@instructure/ui-utils": "8.10.3-snapshot.3+2ee813492",
|
|
42
|
+
"@instructure/ui-view": "8.10.3-snapshot.3+2ee813492",
|
|
43
|
+
"@instructure/uid": "8.10.3-snapshot.3+2ee813492",
|
|
44
44
|
"prop-types": "^15"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
@@ -49,5 +49,6 @@
|
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"sideEffects": false
|
|
52
|
+
"sideEffects": false,
|
|
53
|
+
"gitHead": "2ee8134925b02efbc5d39662a8b1edb2c83a420d"
|
|
53
54
|
}
|
package/src/Pages/Page/index.tsx
CHANGED
|
@@ -56,6 +56,8 @@ class Page extends Component<PagesPageProps> {
|
|
|
56
56
|
navigateToPreviousPage: PropTypes.func
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
ref: Element | null = null
|
|
60
|
+
|
|
59
61
|
get defaultFocusElement() {
|
|
60
62
|
let { defaultFocusElement } = this.props
|
|
61
63
|
|
|
@@ -109,12 +111,12 @@ class Page extends Component<PagesPageProps> {
|
|
|
109
111
|
textAlign={props.textAlign}
|
|
110
112
|
elementRef={(el) => {
|
|
111
113
|
// @ts-expect-error ts-migrate(2551) FIXME: Property '_content' does not exist on type 'Page'.... Remove this comment to see the full error message
|
|
112
|
-
this._content = el
|
|
114
|
+
this._content = el // TODO remove and keep 'ref' in v9
|
|
115
|
+
this.ref = el
|
|
113
116
|
}}
|
|
114
117
|
>
|
|
115
118
|
{children && typeof children === 'function'
|
|
116
|
-
?
|
|
117
|
-
children(history, navigateToPreviousPage)
|
|
119
|
+
? children(history, navigateToPreviousPage)
|
|
118
120
|
: children}
|
|
119
121
|
</View>
|
|
120
122
|
)}
|
package/src/Pages/index.tsx
CHANGED
|
@@ -66,6 +66,7 @@ class Pages extends Component<PagesProps> {
|
|
|
66
66
|
static Page = Page
|
|
67
67
|
|
|
68
68
|
_timeouts = []
|
|
69
|
+
ref: Element | null = null
|
|
69
70
|
|
|
70
71
|
// @ts-expect-error ts-migrate(7006) FIXME: Parameter 'props' implicitly has an 'any' type.
|
|
71
72
|
constructor(props) {
|
|
@@ -192,7 +193,8 @@ class Pages extends Component<PagesProps> {
|
|
|
192
193
|
role="region"
|
|
193
194
|
elementRef={(el) => {
|
|
194
195
|
// @ts-expect-error ts-migrate(2339) FIXME: Property '_contentElement' does not exist on type ... Remove this comment to see the full error message
|
|
195
|
-
this._contentElement = el
|
|
196
|
+
this._contentElement = el // TODO remove with v9 and keep ref
|
|
197
|
+
this.ref = el
|
|
196
198
|
}}
|
|
197
199
|
>
|
|
198
200
|
{this.activePage}
|
|
@@ -31,6 +31,7 @@ declare class Page extends Component<PagesPageProps> {
|
|
|
31
31
|
history: PropTypes.Requireable<any[]>;
|
|
32
32
|
navigateToPreviousPage: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
33
|
};
|
|
34
|
+
ref: Element | null;
|
|
34
35
|
get defaultFocusElement(): React.ReactElement<any, string | React.JSXElementConstructor<any>> | ((...args: any[]) => any) | undefined;
|
|
35
36
|
get focusable(): boolean | undefined;
|
|
36
37
|
focus(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Pages/Page/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,SAAS,MAAM,YAAY,CAAA;AAMlC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAG7C;;;;;GAKG;AACH,cAAM,IAAK,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC1C,MAAM,CAAC,QAAQ,CAAC,WAAW,gBAAe;IAE1C,MAAM,CAAC,YAAY;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;MAKlB;IAED,MAAM,CAAC,YAAY;;;MAGlB;IAED,IAAI,mBAAmB,+GAyBtB;IAED,IAAI,SAAS,wBAKZ;IAED,KAAK;IAOL,MAAM;CAwBP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Pages/Page/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,SAAS,MAAM,YAAY,CAAA;AAMlC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAG7C;;;;;GAKG;AACH,cAAM,IAAK,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC1C,MAAM,CAAC,QAAQ,CAAC,WAAW,gBAAe;IAE1C,MAAM,CAAC,YAAY;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;MAKlB;IAED,MAAM,CAAC,YAAY;;;MAGlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,IAAI,mBAAmB,+GAyBtB;IAED,IAAI,SAAS,wBAKZ;IAED,KAAK;IAOL,MAAM;CAwBP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
package/types/Pages/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Pages/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAA;AAQrE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAGrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGzC,eAAO,MAAM,YAAY;;;EAGvB,CAAA;AAEF;;;;GAIG;AACH,cACM,KAAM,SAAQ,SAAS,CAAC,UAAU,CAAC;IACvC,MAAM,CAAC,QAAQ,CAAC,WAAW,WAAU;IAErC,MAAM,CAAC,YAAY;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;MAKlB;IAED,MAAM,CAAC,IAAI,cAAO;IAElB,SAAS,UAAK;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Pages/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAA;AAQrE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAGrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGzC,eAAO,MAAM,YAAY;;;EAGvB,CAAA;AAEF;;;;GAIG;AACH,cACM,KAAM,SAAQ,SAAS,CAAC,UAAU,CAAC;IACvC,MAAM,CAAC,QAAQ,CAAC,WAAW,WAAU;IAErC,MAAM,CAAC,YAAY;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;MAKlB;IAED,MAAM,CAAC,IAAI,cAAO;IAElB,SAAS,UAAK;IACd,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;gBAGd,KAAK,KAAA;IAcjB,iBAAiB;IAIjB,qBAAqB,aAOpB;IAGD,yBAAyB,CAAC,SAAS,KAAA,EAAE,WAAW,KAAA;IAchD,kBAAkB;IAUlB,oBAAoB;IAIpB,IAAI,OAAO,YAGV;IAED,KAAK;IAuBL,IAAI,UAAU,8EAkBb;IAED,MAAM;CA6BP;AAED,eAAe,KAAK,CAAA;AACpB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA"}
|