@instructure/ui-pages 11.7.9-snapshot-0 → 11.7.9-snapshot-1
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/lib/Pages/v1/Page/index.js +3 -4
- package/lib/Pages/v1/index.js +6 -8
- package/package.json +11 -11
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
|
-
## [11.7.9-snapshot-
|
|
6
|
+
## [11.7.9-snapshot-1](https://github.com/instructure/instructure-ui/compare/v11.7.8...v11.7.9-snapshot-1) (2026-10-06)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-pages
|
|
9
9
|
|
|
@@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.Page = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var
|
|
9
|
-
var _findTabbable = require("@instructure/ui-dom-utils/lib/findTabbable.js");
|
|
8
|
+
var _uiDomUtils = require("@instructure/ui-dom-utils");
|
|
10
9
|
var _console = require("@instructure/console");
|
|
11
10
|
var _v11_ = require("@instructure/ui-view/v11_6");
|
|
12
11
|
var _PagesContext = require("../PagesContext.js");
|
|
@@ -67,10 +66,10 @@ class Page extends _react.Component {
|
|
|
67
66
|
defaultFocusElement = defaultFocusElement();
|
|
68
67
|
}
|
|
69
68
|
if (defaultFocusElement) {
|
|
70
|
-
defaultFocusElement = (0,
|
|
69
|
+
defaultFocusElement = (0, _uiDomUtils.findDOMNode)(defaultFocusElement);
|
|
71
70
|
}
|
|
72
71
|
if (!defaultFocusElement) {
|
|
73
|
-
const tabbable = (0,
|
|
72
|
+
const tabbable = (0, _uiDomUtils.findTabbable)(this.ref);
|
|
74
73
|
defaultFocusElement = tabbable && tabbable[0];
|
|
75
74
|
}
|
|
76
75
|
(0, _console.logError)(defaultFocusElement && !!defaultFocusElement.focus, '[Page] A default focusable element is required or focus will be lost.');
|
package/lib/Pages/v1/index.js
CHANGED
|
@@ -13,10 +13,8 @@ Object.defineProperty(exports, "Page", {
|
|
|
13
13
|
exports.default = exports.Pages = void 0;
|
|
14
14
|
var _react = require("react");
|
|
15
15
|
var _v11_ = require("@instructure/ui-view/v11_6");
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
19
|
-
var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
|
|
16
|
+
var _uiDomUtils = require("@instructure/ui-dom-utils");
|
|
17
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
20
18
|
var _console = require("@instructure/console");
|
|
21
19
|
var _index = require("./Page/index.js");
|
|
22
20
|
var _emotion = require("@instructure/emotion");
|
|
@@ -54,7 +52,7 @@ var _dec, _dec2, _class;
|
|
|
54
52
|
category: components
|
|
55
53
|
---
|
|
56
54
|
**/
|
|
57
|
-
let Pages = exports.Pages = (_dec = (0,
|
|
55
|
+
let Pages = exports.Pages = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = class Pages extends _react.Component {
|
|
58
56
|
static displayName = 'Pages';
|
|
59
57
|
static componentId = 'Pages';
|
|
60
58
|
static allowedProps = _props.allowedProps;
|
|
@@ -112,7 +110,7 @@ let Pages = exports.Pages = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
112
110
|
this._timeouts.forEach(clearTimeout);
|
|
113
111
|
}
|
|
114
112
|
get focused() {
|
|
115
|
-
return (0,
|
|
113
|
+
return (0, _uiDomUtils.containsActiveElement)(this.ref);
|
|
116
114
|
}
|
|
117
115
|
focus() {
|
|
118
116
|
this._timeouts.push(setTimeout(() => {
|
|
@@ -123,7 +121,7 @@ let Pages = exports.Pages = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
123
121
|
activePage.focus();
|
|
124
122
|
} else {
|
|
125
123
|
// Use first tabbable as last ditch effort
|
|
126
|
-
const tabbable = (0,
|
|
124
|
+
const tabbable = (0, _uiDomUtils.findTabbable)(this.ref);
|
|
127
125
|
const element = tabbable && tabbable[0];
|
|
128
126
|
element && element.focus();
|
|
129
127
|
}
|
|
@@ -137,7 +135,7 @@ let Pages = exports.Pages = (_dec = (0, _withDeterministicId.withDeterministicId
|
|
|
137
135
|
const pages = _react.Children.toArray(children);
|
|
138
136
|
const activePage = activePageIndex < pages.length ? pages[activePageIndex] : null;
|
|
139
137
|
(0, _console.logError)(!!activePage, '[Pages] Invalid `activePageIndex`.');
|
|
140
|
-
return activePage ? (0,
|
|
138
|
+
return activePage ? (0, _uiReactUtils.safeCloneElement)(activePage, {
|
|
141
139
|
ref: el => {
|
|
142
140
|
this._activePage = el;
|
|
143
141
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-pages",
|
|
3
|
-
"version": "11.7.9-snapshot-
|
|
3
|
+
"version": "11.7.9-snapshot-1",
|
|
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",
|
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.29.7",
|
|
18
|
-
"@instructure/
|
|
19
|
-
"@instructure/
|
|
20
|
-
"@instructure/
|
|
21
|
-
"@instructure/ui-
|
|
22
|
-
"@instructure/
|
|
23
|
-
"@instructure/ui-themes": "11.7.9-snapshot-
|
|
24
|
-
"@instructure/ui-utils": "11.7.9-snapshot-
|
|
25
|
-
"@instructure/ui-view": "11.7.9-snapshot-
|
|
18
|
+
"@instructure/console": "11.7.9-snapshot-1",
|
|
19
|
+
"@instructure/emotion": "11.7.9-snapshot-1",
|
|
20
|
+
"@instructure/shared-types": "11.7.9-snapshot-1",
|
|
21
|
+
"@instructure/ui-dom-utils": "11.7.9-snapshot-1",
|
|
22
|
+
"@instructure/ui-react-utils": "11.7.9-snapshot-1",
|
|
23
|
+
"@instructure/ui-themes": "11.7.9-snapshot-1",
|
|
24
|
+
"@instructure/ui-utils": "11.7.9-snapshot-1",
|
|
25
|
+
"@instructure/ui-view": "11.7.9-snapshot-1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"vitest": "^5.0.0",
|
|
29
|
-
"@instructure/ui-
|
|
30
|
-
"@instructure/ui-
|
|
29
|
+
"@instructure/ui-babel-preset": "11.7.9-snapshot-1",
|
|
30
|
+
"@instructure/ui-color-utils": "11.7.9-snapshot-1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": ">=18 <=19"
|