@instructure/ui-pagination 8.17.0 → 8.17.1-snapshot.17
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/LICENSE.md +27 -0
- package/es/Pagination/index.js +5 -6
- package/lib/Pagination/index.js +5 -5
- package/package.json +23 -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/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/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.
|
|
3
|
+
"version": "8.17.1-snapshot.17+8e38d5a2e",
|
|
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.
|
|
27
|
-
"@instructure/ui-test-locator": "8.17.
|
|
28
|
-
"@instructure/ui-test-queries": "8.17.
|
|
29
|
-
"@instructure/ui-test-utils": "8.17.
|
|
26
|
+
"@instructure/ui-babel-preset": "8.17.1-snapshot.17+8e38d5a2e",
|
|
27
|
+
"@instructure/ui-test-locator": "8.17.1-snapshot.17+8e38d5a2e",
|
|
28
|
+
"@instructure/ui-test-queries": "8.17.1-snapshot.17+8e38d5a2e",
|
|
29
|
+
"@instructure/ui-test-utils": "8.17.1-snapshot.17+8e38d5a2e"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/runtime": "^7.13.10",
|
|
33
|
-
"@instructure/emotion": "8.17.
|
|
34
|
-
"@instructure/shared-types": "8.17.
|
|
35
|
-
"@instructure/ui-a11y-content": "8.17.
|
|
36
|
-
"@instructure/ui-a11y-utils": "8.17.
|
|
37
|
-
"@instructure/ui-buttons": "8.17.
|
|
38
|
-
"@instructure/ui-dom-utils": "8.17.
|
|
39
|
-
"@instructure/ui-icons": "8.17.
|
|
40
|
-
"@instructure/ui-number-input": "8.17.
|
|
41
|
-
"@instructure/ui-portal": "8.17.
|
|
42
|
-
"@instructure/ui-prop-types": "8.17.
|
|
43
|
-
"@instructure/ui-react-utils": "8.17.
|
|
44
|
-
"@instructure/ui-testable": "8.17.
|
|
45
|
-
"@instructure/ui-tooltip": "8.17.
|
|
46
|
-
"@instructure/ui-utils": "8.17.
|
|
47
|
-
"@instructure/ui-view": "8.17.
|
|
48
|
-
"@instructure/uid": "8.17.
|
|
33
|
+
"@instructure/emotion": "8.17.1-snapshot.17+8e38d5a2e",
|
|
34
|
+
"@instructure/shared-types": "8.17.1-snapshot.17+8e38d5a2e",
|
|
35
|
+
"@instructure/ui-a11y-content": "8.17.1-snapshot.17+8e38d5a2e",
|
|
36
|
+
"@instructure/ui-a11y-utils": "8.17.1-snapshot.17+8e38d5a2e",
|
|
37
|
+
"@instructure/ui-buttons": "8.17.1-snapshot.17+8e38d5a2e",
|
|
38
|
+
"@instructure/ui-dom-utils": "8.17.1-snapshot.17+8e38d5a2e",
|
|
39
|
+
"@instructure/ui-icons": "8.17.1-snapshot.17+8e38d5a2e",
|
|
40
|
+
"@instructure/ui-number-input": "8.17.1-snapshot.17+8e38d5a2e",
|
|
41
|
+
"@instructure/ui-portal": "8.17.1-snapshot.17+8e38d5a2e",
|
|
42
|
+
"@instructure/ui-prop-types": "8.17.1-snapshot.17+8e38d5a2e",
|
|
43
|
+
"@instructure/ui-react-utils": "8.17.1-snapshot.17+8e38d5a2e",
|
|
44
|
+
"@instructure/ui-testable": "8.17.1-snapshot.17+8e38d5a2e",
|
|
45
|
+
"@instructure/ui-tooltip": "8.17.1-snapshot.17+8e38d5a2e",
|
|
46
|
+
"@instructure/ui-utils": "8.17.1-snapshot.17+8e38d5a2e",
|
|
47
|
+
"@instructure/ui-view": "8.17.1-snapshot.17+8e38d5a2e",
|
|
48
|
+
"@instructure/uid": "8.17.1-snapshot.17+8e38d5a2e",
|
|
49
49
|
"keycode": "^2",
|
|
50
50
|
"prop-types": "^15"
|
|
51
51
|
},
|
|
@@ -55,5 +55,6 @@
|
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"sideEffects": false
|
|
58
|
+
"sideEffects": false,
|
|
59
|
+
"gitHead": "8e38d5a2e11e842eafa2fa270e47a261c6ebb626"
|
|
59
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
|
|