@instructure/ui-pagination 8.17.1-snapshot.1 → 8.17.1-snapshot.18
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/Pagination/index.js +5 -6
- package/lib/Pagination/index.js +5 -5
- package/package.json +22 -22
- package/src/Pagination/index.tsx +3 -3
- package/src/Pagination/props.ts +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Pagination/index.d.ts.map +1 -1
- package/types/Pagination/props.d.ts +2 -1
- package/types/Pagination/props.d.ts.map +1 -1
package/es/Pagination/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec, _dec2, _class, _class2, _temp, _span, _span2;
|
|
1
|
+
var _dec, _dec2, _dec3, _class, _class2, _temp, _span, _span2;
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
* The MIT License (MIT)
|
|
@@ -28,8 +28,7 @@ var _dec, _dec2, _class, _class2, _temp, _span, _span2;
|
|
|
28
28
|
import React, { Component } from 'react';
|
|
29
29
|
import { View } from '@instructure/ui-view';
|
|
30
30
|
import { testable } from '@instructure/ui-testable';
|
|
31
|
-
import { omitProps } from '@instructure/ui-react-utils';
|
|
32
|
-
import { uid } from '@instructure/uid';
|
|
31
|
+
import { omitProps, withDeterministicId } from '@instructure/ui-react-utils';
|
|
33
32
|
import { hasVisibleChildren } from '@instructure/ui-a11y-utils';
|
|
34
33
|
import { findTabbable, getActiveElement } from '@instructure/ui-dom-utils';
|
|
35
34
|
import { withStyle, jsx } from '@instructure/emotion';
|
|
@@ -62,7 +61,7 @@ category: components
|
|
|
62
61
|
---
|
|
63
62
|
@tsProps
|
|
64
63
|
**/
|
|
65
|
-
let Pagination = (_dec = withStyle(generateStyle, null),
|
|
64
|
+
let Pagination = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, null), _dec3 = testable(), _dec(_class = _dec2(_class = _dec3(_class = (_temp = _class2 = class Pagination extends Component {
|
|
66
65
|
constructor(props) {
|
|
67
66
|
super(props);
|
|
68
67
|
this._labelId = void 0;
|
|
@@ -86,7 +85,7 @@ let Pagination = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _de
|
|
|
86
85
|
}
|
|
87
86
|
};
|
|
88
87
|
|
|
89
|
-
this._labelId =
|
|
88
|
+
this._labelId = props.deterministicId();
|
|
90
89
|
}
|
|
91
90
|
|
|
92
91
|
get _root() {
|
|
@@ -338,6 +337,6 @@ let Pagination = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _de
|
|
|
338
337
|
labelNumberInput: numberOfPages => `of ${numberOfPages}`,
|
|
339
338
|
screenReaderLabelNumberInput: (currentPage, numberOfPages) => `Select page (${currentPage} of ${numberOfPages})`,
|
|
340
339
|
shouldHandleFocus: true
|
|
341
|
-
}, _class2.Page = PaginationButton, _class2.Navigation = PaginationArrowButton, _temp)) || _class) || _class);
|
|
340
|
+
}, _class2.Page = PaginationButton, _class2.Navigation = PaginationArrowButton, _temp)) || _class) || _class) || _class);
|
|
342
341
|
export default Pagination;
|
|
343
342
|
export { Pagination, PaginationButton };
|
package/lib/Pagination/index.js
CHANGED
|
@@ -24,7 +24,7 @@ var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
|
24
24
|
|
|
25
25
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
|
|
28
28
|
|
|
29
29
|
var _hasVisibleChildren = require("@instructure/ui-a11y-utils/lib/hasVisibleChildren.js");
|
|
30
30
|
|
|
@@ -44,7 +44,7 @@ var _styles = _interopRequireDefault(require("./styles"));
|
|
|
44
44
|
|
|
45
45
|
var _props = require("./props");
|
|
46
46
|
|
|
47
|
-
var _dec, _dec2, _class, _class2, _temp, _span, _span2;
|
|
47
|
+
var _dec, _dec2, _dec3, _class, _class2, _temp, _span, _span2;
|
|
48
48
|
|
|
49
49
|
/** This is an [].findIndex optimized to work on really big, but sparse, arrays */
|
|
50
50
|
const fastFindIndex = (arr, fn) => Number(Object.keys(arr).find(k => fn(arr[Number(k)])));
|
|
@@ -69,7 +69,7 @@ category: components
|
|
|
69
69
|
---
|
|
70
70
|
@tsProps
|
|
71
71
|
**/
|
|
72
|
-
let Pagination = (_dec = (0, _emotion.withStyle)(_styles.default, null),
|
|
72
|
+
let Pagination = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, null), _dec3 = (0, _testable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_temp = _class2 = class Pagination extends _react.Component {
|
|
73
73
|
constructor(props) {
|
|
74
74
|
super(props);
|
|
75
75
|
this._labelId = void 0;
|
|
@@ -93,7 +93,7 @@ let Pagination = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
this._labelId =
|
|
96
|
+
this._labelId = props.deterministicId();
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
get _root() {
|
|
@@ -347,7 +347,7 @@ let Pagination = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
347
347
|
labelNumberInput: numberOfPages => `of ${numberOfPages}`,
|
|
348
348
|
screenReaderLabelNumberInput: (currentPage, numberOfPages) => `Select page (${currentPage} of ${numberOfPages})`,
|
|
349
349
|
shouldHandleFocus: true
|
|
350
|
-
}, _class2.Page = _PaginationButton.PaginationButton, _class2.Navigation = _PaginationArrowButton.PaginationArrowButton, _temp)) || _class) || _class);
|
|
350
|
+
}, _class2.Page = _PaginationButton.PaginationButton, _class2.Navigation = _PaginationArrowButton.PaginationArrowButton, _temp)) || _class) || _class) || _class);
|
|
351
351
|
exports.Pagination = Pagination;
|
|
352
352
|
var _default = Pagination;
|
|
353
353
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-pagination",
|
|
3
|
-
"version": "8.17.1-snapshot.
|
|
3
|
+
"version": "8.17.1-snapshot.18+9f145a7d2",
|
|
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,29 +23,29 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "8.17.1-snapshot.
|
|
27
|
-
"@instructure/ui-test-locator": "8.17.1-snapshot.
|
|
28
|
-
"@instructure/ui-test-queries": "8.17.1-snapshot.
|
|
29
|
-
"@instructure/ui-test-utils": "8.17.1-snapshot.
|
|
26
|
+
"@instructure/ui-babel-preset": "8.17.1-snapshot.18+9f145a7d2",
|
|
27
|
+
"@instructure/ui-test-locator": "8.17.1-snapshot.18+9f145a7d2",
|
|
28
|
+
"@instructure/ui-test-queries": "8.17.1-snapshot.18+9f145a7d2",
|
|
29
|
+
"@instructure/ui-test-utils": "8.17.1-snapshot.18+9f145a7d2"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/runtime": "^7.13.10",
|
|
33
|
-
"@instructure/emotion": "8.17.1-snapshot.
|
|
34
|
-
"@instructure/shared-types": "8.17.1-snapshot.
|
|
35
|
-
"@instructure/ui-a11y-content": "8.17.1-snapshot.
|
|
36
|
-
"@instructure/ui-a11y-utils": "8.17.1-snapshot.
|
|
37
|
-
"@instructure/ui-buttons": "8.17.1-snapshot.
|
|
38
|
-
"@instructure/ui-dom-utils": "8.17.1-snapshot.
|
|
39
|
-
"@instructure/ui-icons": "8.17.1-snapshot.
|
|
40
|
-
"@instructure/ui-number-input": "8.17.1-snapshot.
|
|
41
|
-
"@instructure/ui-portal": "8.17.1-snapshot.
|
|
42
|
-
"@instructure/ui-prop-types": "8.17.1-snapshot.
|
|
43
|
-
"@instructure/ui-react-utils": "8.17.1-snapshot.
|
|
44
|
-
"@instructure/ui-testable": "8.17.1-snapshot.
|
|
45
|
-
"@instructure/ui-tooltip": "8.17.1-snapshot.
|
|
46
|
-
"@instructure/ui-utils": "8.17.1-snapshot.
|
|
47
|
-
"@instructure/ui-view": "8.17.1-snapshot.
|
|
48
|
-
"@instructure/uid": "8.17.1-snapshot.
|
|
33
|
+
"@instructure/emotion": "8.17.1-snapshot.18+9f145a7d2",
|
|
34
|
+
"@instructure/shared-types": "8.17.1-snapshot.18+9f145a7d2",
|
|
35
|
+
"@instructure/ui-a11y-content": "8.17.1-snapshot.18+9f145a7d2",
|
|
36
|
+
"@instructure/ui-a11y-utils": "8.17.1-snapshot.18+9f145a7d2",
|
|
37
|
+
"@instructure/ui-buttons": "8.17.1-snapshot.18+9f145a7d2",
|
|
38
|
+
"@instructure/ui-dom-utils": "8.17.1-snapshot.18+9f145a7d2",
|
|
39
|
+
"@instructure/ui-icons": "8.17.1-snapshot.18+9f145a7d2",
|
|
40
|
+
"@instructure/ui-number-input": "8.17.1-snapshot.18+9f145a7d2",
|
|
41
|
+
"@instructure/ui-portal": "8.17.1-snapshot.18+9f145a7d2",
|
|
42
|
+
"@instructure/ui-prop-types": "8.17.1-snapshot.18+9f145a7d2",
|
|
43
|
+
"@instructure/ui-react-utils": "8.17.1-snapshot.18+9f145a7d2",
|
|
44
|
+
"@instructure/ui-testable": "8.17.1-snapshot.18+9f145a7d2",
|
|
45
|
+
"@instructure/ui-tooltip": "8.17.1-snapshot.18+9f145a7d2",
|
|
46
|
+
"@instructure/ui-utils": "8.17.1-snapshot.18+9f145a7d2",
|
|
47
|
+
"@instructure/ui-view": "8.17.1-snapshot.18+9f145a7d2",
|
|
48
|
+
"@instructure/uid": "8.17.1-snapshot.18+9f145a7d2",
|
|
49
49
|
"keycode": "^2",
|
|
50
50
|
"prop-types": "^15"
|
|
51
51
|
},
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
58
|
"sideEffects": false,
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "9f145a7d2f84eda965b570fa5702e1fda0c92e58"
|
|
60
60
|
}
|
package/src/Pagination/index.tsx
CHANGED
|
@@ -26,8 +26,7 @@ import React, { Component } from 'react'
|
|
|
26
26
|
|
|
27
27
|
import { View } from '@instructure/ui-view'
|
|
28
28
|
import { testable } from '@instructure/ui-testable'
|
|
29
|
-
import { omitProps } from '@instructure/ui-react-utils'
|
|
30
|
-
import { uid } from '@instructure/uid'
|
|
29
|
+
import { omitProps, withDeterministicId } from '@instructure/ui-react-utils'
|
|
31
30
|
import { hasVisibleChildren } from '@instructure/ui-a11y-utils'
|
|
32
31
|
import { findTabbable, getActiveElement } from '@instructure/ui-dom-utils'
|
|
33
32
|
import { withStyle, jsx } from '@instructure/emotion'
|
|
@@ -79,6 +78,7 @@ category: components
|
|
|
79
78
|
---
|
|
80
79
|
@tsProps
|
|
81
80
|
**/
|
|
81
|
+
@withDeterministicId()
|
|
82
82
|
@withStyle(generateStyle, null)
|
|
83
83
|
@testable()
|
|
84
84
|
class Pagination extends Component<PaginationProps> {
|
|
@@ -115,7 +115,7 @@ class Pagination extends Component<PaginationProps> {
|
|
|
115
115
|
constructor(props: PaginationProps) {
|
|
116
116
|
super(props)
|
|
117
117
|
|
|
118
|
-
this._labelId =
|
|
118
|
+
this._labelId = props.deterministicId!()
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
get _root() {
|
package/src/Pagination/props.ts
CHANGED
|
@@ -41,7 +41,7 @@ import type {
|
|
|
41
41
|
PropValidators
|
|
42
42
|
} from '@instructure/shared-types'
|
|
43
43
|
import type { PaginationPageProps } from './PaginationButton/props'
|
|
44
|
-
|
|
44
|
+
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
|
|
45
45
|
type ChildPage = React.ReactElement<PaginationPageProps>
|
|
46
46
|
|
|
47
47
|
type PaginationOwnProps = {
|
|
@@ -154,7 +154,7 @@ type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
|
154
154
|
|
|
155
155
|
type PaginationProps = PaginationOwnProps &
|
|
156
156
|
WithStyleProps<null, PaginationStyle> &
|
|
157
|
-
OtherHTMLAttributes<PaginationOwnProps>
|
|
157
|
+
OtherHTMLAttributes<PaginationOwnProps> & WithDeterministicIdProps
|
|
158
158
|
|
|
159
159
|
type PaginationStyle = ComponentStyle<'pagination' | 'pages'>
|
|
160
160
|
|