@instructure/ui-pagination 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/Pagination/v1/PaginationArrowButton/index.js +7 -10
- package/lib/Pagination/v1/PaginationButton/index.js +2 -2
- package/lib/Pagination/v1/PaginationPageInput/index.js +2 -2
- package/lib/Pagination/v1/index.js +8 -10
- package/lib/Pagination/v2/PaginationArrowButton/index.js +2 -2
- package/lib/Pagination/v2/PaginationButton/index.js +2 -2
- package/lib/Pagination/v2/PaginationPageInput/index.js +2 -2
- package/lib/Pagination/v2/index.js +8 -10
- package/package.json +20 -20
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-pagination
|
|
9
9
|
|
|
@@ -6,12 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.PaginationArrowButton = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _v11_ = require("@instructure/ui-buttons/v11_6");
|
|
9
|
-
var
|
|
9
|
+
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
10
10
|
var _v11_2 = require("@instructure/ui-tooltip/v11_6");
|
|
11
|
-
var
|
|
12
|
-
var _IconArrowOpenEndSolid = require("@instructure/ui-icons/lib/generated/IconArrowOpenEndSolid.js");
|
|
13
|
-
var _IconArrowDoubleStartSolid = require("@instructure/ui-icons/lib/generated/IconArrowDoubleStartSolid.js");
|
|
14
|
-
var _IconArrowDoubleEndSolid = require("@instructure/ui-icons/lib/generated/IconArrowDoubleEndSolid.js");
|
|
11
|
+
var _uiIcons = require("@instructure/ui-icons");
|
|
15
12
|
var _props = require("./props.js");
|
|
16
13
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
17
14
|
/*
|
|
@@ -65,13 +62,13 @@ id: Pagination.Navigation
|
|
|
65
62
|
get Icon() {
|
|
66
63
|
switch (this.props.direction) {
|
|
67
64
|
case 'first':
|
|
68
|
-
return
|
|
65
|
+
return _uiIcons.IconArrowDoubleStartSolid;
|
|
69
66
|
case 'prev':
|
|
70
|
-
return
|
|
67
|
+
return _uiIcons.IconArrowOpenStartSolid;
|
|
71
68
|
case 'next':
|
|
72
|
-
return
|
|
69
|
+
return _uiIcons.IconArrowOpenEndSolid;
|
|
73
70
|
case 'last':
|
|
74
|
-
return
|
|
71
|
+
return _uiIcons.IconArrowDoubleEndSolid;
|
|
75
72
|
default:
|
|
76
73
|
return null;
|
|
77
74
|
}
|
|
@@ -86,7 +83,7 @@ id: Pagination.Navigation
|
|
|
86
83
|
return (0, _jsxRuntime.jsx)(_v11_2.Tooltip, {
|
|
87
84
|
elementRef: this.handleRef,
|
|
88
85
|
on: ['hover', 'focus'],
|
|
89
|
-
renderTip: (0, _jsxRuntime.jsx)(
|
|
86
|
+
renderTip: (0, _jsxRuntime.jsx)(_uiA11yContent.PresentationContent, {
|
|
90
87
|
children: label
|
|
91
88
|
}),
|
|
92
89
|
children: (0, _jsxRuntime.jsx)(_v11_.IconButton, {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.PaginationButton = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _v11_ = require("@instructure/ui-buttons/v11_6");
|
|
9
|
-
var
|
|
9
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
10
10
|
var _props = require("./props.js");
|
|
11
11
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
12
12
|
/*
|
|
@@ -53,7 +53,7 @@ class PaginationButton extends _react.Component {
|
|
|
53
53
|
};
|
|
54
54
|
render() {
|
|
55
55
|
const exclude = this.props.current ? ['onClick', 'href'] : [];
|
|
56
|
-
const props = (0,
|
|
56
|
+
const props = (0, _uiReactUtils.omitProps)(this.props, PaginationButton.allowedProps, exclude);
|
|
57
57
|
|
|
58
58
|
// wrapped in an unstyled <li> for better a11y
|
|
59
59
|
return (0, _jsxRuntime.jsx)("li", {
|
|
@@ -8,7 +8,7 @@ exports.default = exports.PaginationPageInput = void 0;
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _emotion = require("@instructure/emotion");
|
|
10
10
|
var _v11_ = require("@instructure/ui-number-input/v11_6");
|
|
11
|
-
var
|
|
11
|
+
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
12
12
|
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
13
13
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
14
14
|
var _props = require("./props.js");
|
|
@@ -163,7 +163,7 @@ let PaginationPageInput = exports.PaginationPageInput = (_dec = (0, _emotion.wit
|
|
|
163
163
|
screenReaderLabel,
|
|
164
164
|
numberOfPages
|
|
165
165
|
} = this.props;
|
|
166
|
-
return (0, _jsxRuntime.jsx)(
|
|
166
|
+
return (0, _jsxRuntime.jsx)(_uiA11yContent.ScreenReaderContent, {
|
|
167
167
|
children: screenReaderLabel(this.currentPage, numberOfPages)
|
|
168
168
|
});
|
|
169
169
|
}
|
|
@@ -14,11 +14,9 @@ Object.defineProperty(exports, "PaginationButton", {
|
|
|
14
14
|
exports.default = void 0;
|
|
15
15
|
var _react = require("react");
|
|
16
16
|
var _v11_ = require("@instructure/ui-view/v11_6");
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var _findTabbable = require("@instructure/ui-dom-utils/lib/findTabbable.js");
|
|
21
|
-
var _getActiveElement = require("@instructure/ui-dom-utils/lib/getActiveElement.js");
|
|
17
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
18
|
+
var _uiA11yUtils = require("@instructure/ui-a11y-utils");
|
|
19
|
+
var _uiDomUtils = require("@instructure/ui-dom-utils");
|
|
22
20
|
var _emotion = require("@instructure/emotion");
|
|
23
21
|
var _index = require("./PaginationButton/index.js");
|
|
24
22
|
var _index2 = require("./PaginationArrowButton/index.js");
|
|
@@ -71,7 +69,7 @@ function propsHaveCompactView(props) {
|
|
|
71
69
|
category: components
|
|
72
70
|
---
|
|
73
71
|
**/
|
|
74
|
-
let Pagination = exports.Pagination = (_dec = (0,
|
|
72
|
+
let Pagination = exports.Pagination = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = class Pagination extends _react.Component {
|
|
75
73
|
static displayName = 'Pagination';
|
|
76
74
|
static componentId = 'Pagination';
|
|
77
75
|
static allowedProps = _props.allowedProps;
|
|
@@ -122,7 +120,7 @@ let Pagination = exports.Pagination = (_dec = (0, _withDeterministicId.withDeter
|
|
|
122
120
|
return this.inputMode || this.props.showDisabledButtons;
|
|
123
121
|
}
|
|
124
122
|
getSnapshotBeforeUpdate() {
|
|
125
|
-
const activeElement = (0,
|
|
123
|
+
const activeElement = (0, _uiDomUtils.getActiveElement)();
|
|
126
124
|
if (activeElement === this._firstButton || activeElement === this._prevButton || activeElement === this._nextButton || activeElement === this._lastButton) {
|
|
127
125
|
return {
|
|
128
126
|
lastFocusedButton: activeElement
|
|
@@ -155,7 +153,7 @@ let Pagination = exports.Pagination = (_dec = (0, _withDeterministicId.withDeter
|
|
|
155
153
|
lastFocusedButton
|
|
156
154
|
} = snapshot;
|
|
157
155
|
if (lastFocusedButton) {
|
|
158
|
-
const focusable = (0,
|
|
156
|
+
const focusable = (0, _uiDomUtils.findTabbable)(this.ref);
|
|
159
157
|
const direction = lastFocusedButton.dataset.direction;
|
|
160
158
|
|
|
161
159
|
// By default we want to focus the previously focused button
|
|
@@ -196,7 +194,7 @@ let Pagination = exports.Pagination = (_dec = (0, _withDeterministicId.withDeter
|
|
|
196
194
|
};
|
|
197
195
|
renderLabel() {
|
|
198
196
|
const display = this.props.variant === 'full' ? 'inline-block' : 'block';
|
|
199
|
-
const visibleLabel = (0,
|
|
197
|
+
const visibleLabel = (0, _uiA11yUtils.hasVisibleChildren)(this.props.label);
|
|
200
198
|
return (0, _jsxRuntime.jsx)(_v11_.View, {
|
|
201
199
|
as: "span",
|
|
202
200
|
padding: visibleLabel ? 'small' : '0',
|
|
@@ -471,7 +469,7 @@ let Pagination = exports.Pagination = (_dec = (0, _withDeterministicId.withDeter
|
|
|
471
469
|
};
|
|
472
470
|
render() {
|
|
473
471
|
const currentPageIndex = fastFindIndex(this.childPages, p => p && p.props && p.props.current);
|
|
474
|
-
const passthroughProps = _v11_.View.omitViewProps((0,
|
|
472
|
+
const passthroughProps = _v11_.View.omitViewProps((0, _uiReactUtils.omitProps)(this.props, Pagination.allowedProps), Pagination);
|
|
475
473
|
return (0, _jsxRuntime.jsxs)(_v11_.View, {
|
|
476
474
|
...passthroughProps,
|
|
477
475
|
role: "navigation",
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.PaginationArrowButton = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _latest = require("@instructure/ui-buttons/latest");
|
|
9
|
-
var
|
|
9
|
+
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
10
10
|
var _latest2 = require("@instructure/ui-tooltip/latest");
|
|
11
11
|
var _uiIcons = require("@instructure/ui-icons");
|
|
12
12
|
var _props = require("./props.js");
|
|
@@ -88,7 +88,7 @@ id: Pagination.Navigation
|
|
|
88
88
|
return (0, _jsxRuntime.jsx)(_latest2.Tooltip, {
|
|
89
89
|
elementRef: this.handleRef,
|
|
90
90
|
on: ['hover', 'focus'],
|
|
91
|
-
renderTip: (0, _jsxRuntime.jsx)(
|
|
91
|
+
renderTip: (0, _jsxRuntime.jsx)(_uiA11yContent.PresentationContent, {
|
|
92
92
|
children: label
|
|
93
93
|
}),
|
|
94
94
|
children: (0, _jsxRuntime.jsx)(_latest.IconButton, {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.PaginationButton = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _latest = require("@instructure/ui-buttons/latest");
|
|
9
|
-
var
|
|
9
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
10
10
|
var _props = require("./props.js");
|
|
11
11
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
12
12
|
/*
|
|
@@ -53,7 +53,7 @@ class PaginationButton extends _react.Component {
|
|
|
53
53
|
};
|
|
54
54
|
render() {
|
|
55
55
|
const exclude = this.props.current ? ['onClick', 'href'] : [];
|
|
56
|
-
const props = (0,
|
|
56
|
+
const props = (0, _uiReactUtils.omitProps)(this.props, PaginationButton.allowedProps, exclude);
|
|
57
57
|
|
|
58
58
|
// wrapped in an unstyled <li> for better a11y
|
|
59
59
|
return (0, _jsxRuntime.jsx)("li", {
|
|
@@ -9,7 +9,7 @@ var _react = require("react");
|
|
|
9
9
|
var _emotion = require("@instructure/emotion");
|
|
10
10
|
var _latest = require("@instructure/ui-text/latest");
|
|
11
11
|
var _latest2 = require("@instructure/ui-number-input/latest");
|
|
12
|
-
var
|
|
12
|
+
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
13
13
|
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
14
14
|
var _props = require("./props.js");
|
|
15
15
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
@@ -167,7 +167,7 @@ let PaginationPageInput = exports.PaginationPageInput = (_dec = (0, _emotion.wit
|
|
|
167
167
|
screenReaderLabel,
|
|
168
168
|
numberOfPages
|
|
169
169
|
} = this.props;
|
|
170
|
-
return (0, _jsxRuntime.jsx)(
|
|
170
|
+
return (0, _jsxRuntime.jsx)(_uiA11yContent.ScreenReaderContent, {
|
|
171
171
|
children: screenReaderLabel(this.currentPage, numberOfPages)
|
|
172
172
|
});
|
|
173
173
|
}
|
|
@@ -15,11 +15,9 @@ exports.default = void 0;
|
|
|
15
15
|
var _react = require("react");
|
|
16
16
|
var _latest = require("@instructure/ui-text/latest");
|
|
17
17
|
var _latest2 = require("@instructure/ui-view/latest");
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var _findTabbable = require("@instructure/ui-dom-utils/lib/findTabbable.js");
|
|
22
|
-
var _getActiveElement = require("@instructure/ui-dom-utils/lib/getActiveElement.js");
|
|
18
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
19
|
+
var _uiA11yUtils = require("@instructure/ui-a11y-utils");
|
|
20
|
+
var _uiDomUtils = require("@instructure/ui-dom-utils");
|
|
23
21
|
var _emotion = require("@instructure/emotion");
|
|
24
22
|
var _index = require("./PaginationButton/index.js");
|
|
25
23
|
var _index2 = require("./PaginationArrowButton/index.js");
|
|
@@ -71,7 +69,7 @@ function propsHaveCompactView(props) {
|
|
|
71
69
|
category: components
|
|
72
70
|
---
|
|
73
71
|
**/
|
|
74
|
-
let Pagination = exports.Pagination = (_dec = (0,
|
|
72
|
+
let Pagination = exports.Pagination = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyleNew)(_styles.default), _dec(_class = _dec2(_class = class Pagination extends _react.Component {
|
|
75
73
|
static displayName = 'Pagination';
|
|
76
74
|
static componentId = 'Pagination';
|
|
77
75
|
static allowedProps = _props.allowedProps;
|
|
@@ -119,7 +117,7 @@ let Pagination = exports.Pagination = (_dec = (0, _withDeterministicId.withDeter
|
|
|
119
117
|
return this.inputMode || this.props.showDisabledButtons;
|
|
120
118
|
}
|
|
121
119
|
getSnapshotBeforeUpdate() {
|
|
122
|
-
const activeElement = (0,
|
|
120
|
+
const activeElement = (0, _uiDomUtils.getActiveElement)();
|
|
123
121
|
if (activeElement === this._firstButton || activeElement === this._prevButton || activeElement === this._nextButton || activeElement === this._lastButton) {
|
|
124
122
|
return {
|
|
125
123
|
lastFocusedButton: activeElement
|
|
@@ -152,7 +150,7 @@ let Pagination = exports.Pagination = (_dec = (0, _withDeterministicId.withDeter
|
|
|
152
150
|
lastFocusedButton
|
|
153
151
|
} = snapshot;
|
|
154
152
|
if (lastFocusedButton) {
|
|
155
|
-
const focusable = (0,
|
|
153
|
+
const focusable = (0, _uiDomUtils.findTabbable)(this.ref);
|
|
156
154
|
const direction = lastFocusedButton.dataset.direction;
|
|
157
155
|
|
|
158
156
|
// By default we want to focus the previously focused button
|
|
@@ -193,7 +191,7 @@ let Pagination = exports.Pagination = (_dec = (0, _withDeterministicId.withDeter
|
|
|
193
191
|
};
|
|
194
192
|
renderLabel() {
|
|
195
193
|
const display = this.props.variant === 'full' ? 'inline-block' : 'block';
|
|
196
|
-
const visibleLabel = (0,
|
|
194
|
+
const visibleLabel = (0, _uiA11yUtils.hasVisibleChildren)(this.props.label);
|
|
197
195
|
return (0, _jsxRuntime.jsx)(_latest2.View, {
|
|
198
196
|
padding: visibleLabel ? 'small' : '0',
|
|
199
197
|
display: visibleLabel ? display : 'auto',
|
|
@@ -478,7 +476,7 @@ let Pagination = exports.Pagination = (_dec = (0, _withDeterministicId.withDeter
|
|
|
478
476
|
};
|
|
479
477
|
render() {
|
|
480
478
|
const currentPageIndex = fastFindIndex(this.childPages, p => p && p.props && p.props.current);
|
|
481
|
-
const passthroughProps = _latest2.View.omitViewProps((0,
|
|
479
|
+
const passthroughProps = _latest2.View.omitViewProps((0, _uiReactUtils.omitProps)(this.props, Pagination.allowedProps), Pagination);
|
|
482
480
|
return (0, _jsxRuntime.jsxs)(_latest2.View, {
|
|
483
481
|
...passthroughProps,
|
|
484
482
|
role: "navigation",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-pagination",
|
|
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,28 +15,28 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.29.7",
|
|
18
|
-
"@instructure/
|
|
19
|
-
"@instructure/ui-a11y-content": "11.7.9-snapshot-
|
|
20
|
-
"@instructure/ui-a11y-utils": "11.7.9-snapshot-
|
|
21
|
-
"@instructure/
|
|
22
|
-
"@instructure/
|
|
23
|
-
"@instructure/ui-
|
|
24
|
-
"@instructure/ui-number-input": "11.7.9-snapshot-
|
|
25
|
-
"@instructure/ui-
|
|
26
|
-
"@instructure/ui-
|
|
27
|
-
"@instructure/ui-
|
|
28
|
-
"@instructure/ui-utils": "11.7.9-snapshot-
|
|
29
|
-
"@instructure/
|
|
30
|
-
"@instructure/ui-
|
|
31
|
-
"@instructure/ui-
|
|
32
|
-
"@instructure/
|
|
33
|
-
"@instructure/ui-
|
|
18
|
+
"@instructure/shared-types": "11.7.9-snapshot-1",
|
|
19
|
+
"@instructure/ui-a11y-content": "11.7.9-snapshot-1",
|
|
20
|
+
"@instructure/ui-a11y-utils": "11.7.9-snapshot-1",
|
|
21
|
+
"@instructure/ui-buttons": "11.7.9-snapshot-1",
|
|
22
|
+
"@instructure/emotion": "11.7.9-snapshot-1",
|
|
23
|
+
"@instructure/ui-dom-utils": "11.7.9-snapshot-1",
|
|
24
|
+
"@instructure/ui-number-input": "11.7.9-snapshot-1",
|
|
25
|
+
"@instructure/ui-icons": "11.7.9-snapshot-1",
|
|
26
|
+
"@instructure/ui-text": "11.7.9-snapshot-1",
|
|
27
|
+
"@instructure/ui-portal": "11.7.9-snapshot-1",
|
|
28
|
+
"@instructure/ui-react-utils": "11.7.9-snapshot-1",
|
|
29
|
+
"@instructure/ui-tooltip": "11.7.9-snapshot-1",
|
|
30
|
+
"@instructure/ui-utils": "11.7.9-snapshot-1",
|
|
31
|
+
"@instructure/ui-view": "11.7.9-snapshot-1",
|
|
32
|
+
"@instructure/uid": "11.7.9-snapshot-1",
|
|
33
|
+
"@instructure/ui-themes": "11.7.9-snapshot-1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"vitest": "^5.0.0",
|
|
37
|
-
"@instructure/ui-a11y-content": "11.7.9-snapshot-
|
|
38
|
-
"@instructure/ui-axe-check": "11.7.9-snapshot-
|
|
39
|
-
"@instructure/ui-babel-preset": "11.7.9-snapshot-
|
|
37
|
+
"@instructure/ui-a11y-content": "11.7.9-snapshot-1",
|
|
38
|
+
"@instructure/ui-axe-check": "11.7.9-snapshot-1",
|
|
39
|
+
"@instructure/ui-babel-preset": "11.7.9-snapshot-1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": ">=18 <=19"
|