@instructure/ui-pagination 8.9.2-snapshot.4 → 8.10.1-snapshot.4

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 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.0](https://github.com/instructure/instructure-ui/compare/v8.9.1...v8.10.0) (2021-09-28)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-pagination
9
+
6
10
  ## [8.9.1](https://github.com/instructure/instructure-ui/compare/v8.9.0...v8.9.1) (2021-09-16)
7
11
 
8
12
  **Note:** Version bump only for package @instructure/ui-pagination
@@ -38,7 +38,7 @@ id: Pagination.Page
38
38
  let PaginationButton = (_dec = testable(), _dec(_class = (_temp = _class2 = class PaginationButton extends Component {
39
39
  render() {
40
40
  const exclude = this.props.current ? ['onClick', 'href'] : [];
41
- const props = omitProps(this.props, PaginationButton.propTypes, exclude);
41
+ const props = omitProps(this.props, PaginationButton.allowedProps, exclude);
42
42
  return /*#__PURE__*/React.createElement(BaseButton, Object.assign({
43
43
  color: "primary",
44
44
  withBackground: this.props.current ? true : false,
@@ -188,7 +188,7 @@ let Pagination = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _de
188
188
 
189
189
  if (!this.props.children) return null;
190
190
  const currentPageIndex = fastFindIndex(this.props.children, p => p && p.props && p.props.current);
191
- const passthroughProps = View.omitViewProps(omitProps(this.props, Pagination.propTypes), Pagination);
191
+ const passthroughProps = View.omitViewProps(omitProps(this.props, Pagination.allowedProps), Pagination);
192
192
  return jsx(View, Object.assign({}, passthroughProps, {
193
193
  role: "navigation",
194
194
  as: this.props.as,
@@ -28,7 +28,7 @@ id: Pagination.Page
28
28
  let PaginationButton = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _class2 = class PaginationButton extends _react.Component {
29
29
  render() {
30
30
  const exclude = this.props.current ? ['onClick', 'href'] : [];
31
- const props = (0, _omitProps.omitProps)(this.props, PaginationButton.propTypes, exclude);
31
+ const props = (0, _omitProps.omitProps)(this.props, PaginationButton.allowedProps, exclude);
32
32
  return /*#__PURE__*/_react.default.createElement(_BaseButton.BaseButton, Object.assign({
33
33
  color: "primary",
34
34
  withBackground: this.props.current ? true : false,
@@ -194,7 +194,7 @@ let Pagination = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
194
194
  if (!this.props.children) return null;
195
195
  const currentPageIndex = fastFindIndex(this.props.children, p => p && p.props && p.props.current);
196
196
 
197
- const passthroughProps = _View.View.omitViewProps((0, _omitProps.omitProps)(this.props, Pagination.propTypes), Pagination);
197
+ const passthroughProps = _View.View.omitViewProps((0, _omitProps.omitProps)(this.props, Pagination.allowedProps), Pagination);
198
198
 
199
199
  return (0, _emotion.jsx)(_View.View, Object.assign({}, passthroughProps, {
200
200
  role: "navigation",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-pagination",
3
- "version": "8.9.2-snapshot.4+bf1e82efc",
3
+ "version": "8.10.1-snapshot.4+6c5c9e653",
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,28 +24,28 @@
24
24
  },
25
25
  "license": "MIT",
26
26
  "devDependencies": {
27
- "@instructure/ui-babel-preset": "8.9.2-snapshot.4+bf1e82efc",
28
- "@instructure/ui-test-locator": "8.9.2-snapshot.4+bf1e82efc",
29
- "@instructure/ui-test-queries": "8.9.2-snapshot.4+bf1e82efc",
30
- "@instructure/ui-test-utils": "8.9.2-snapshot.4+bf1e82efc"
27
+ "@instructure/ui-babel-preset": "8.10.1-snapshot.4+6c5c9e653",
28
+ "@instructure/ui-test-locator": "8.10.1-snapshot.4+6c5c9e653",
29
+ "@instructure/ui-test-queries": "8.10.1-snapshot.4+6c5c9e653",
30
+ "@instructure/ui-test-utils": "8.10.1-snapshot.4+6c5c9e653"
31
31
  },
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.13.10",
34
- "@instructure/emotion": "8.9.2-snapshot.4+bf1e82efc",
35
- "@instructure/shared-types": "8.9.2-snapshot.4+bf1e82efc",
36
- "@instructure/ui-a11y-content": "8.9.2-snapshot.4+bf1e82efc",
37
- "@instructure/ui-a11y-utils": "8.9.2-snapshot.4+bf1e82efc",
38
- "@instructure/ui-buttons": "8.9.2-snapshot.4+bf1e82efc",
39
- "@instructure/ui-dom-utils": "8.9.2-snapshot.4+bf1e82efc",
40
- "@instructure/ui-icons": "8.9.2-snapshot.4+bf1e82efc",
41
- "@instructure/ui-portal": "8.9.2-snapshot.4+bf1e82efc",
42
- "@instructure/ui-prop-types": "8.9.2-snapshot.4+bf1e82efc",
43
- "@instructure/ui-react-utils": "8.9.2-snapshot.4+bf1e82efc",
44
- "@instructure/ui-testable": "8.9.2-snapshot.4+bf1e82efc",
45
- "@instructure/ui-tooltip": "8.9.2-snapshot.4+bf1e82efc",
46
- "@instructure/ui-utils": "8.9.2-snapshot.4+bf1e82efc",
47
- "@instructure/ui-view": "8.9.2-snapshot.4+bf1e82efc",
48
- "@instructure/uid": "8.9.2-snapshot.4+bf1e82efc",
34
+ "@instructure/emotion": "8.10.1-snapshot.4+6c5c9e653",
35
+ "@instructure/shared-types": "8.10.1-snapshot.4+6c5c9e653",
36
+ "@instructure/ui-a11y-content": "8.10.1-snapshot.4+6c5c9e653",
37
+ "@instructure/ui-a11y-utils": "8.10.1-snapshot.4+6c5c9e653",
38
+ "@instructure/ui-buttons": "8.10.1-snapshot.4+6c5c9e653",
39
+ "@instructure/ui-dom-utils": "8.10.1-snapshot.4+6c5c9e653",
40
+ "@instructure/ui-icons": "8.10.1-snapshot.4+6c5c9e653",
41
+ "@instructure/ui-portal": "8.10.1-snapshot.4+6c5c9e653",
42
+ "@instructure/ui-prop-types": "8.10.1-snapshot.4+6c5c9e653",
43
+ "@instructure/ui-react-utils": "8.10.1-snapshot.4+6c5c9e653",
44
+ "@instructure/ui-testable": "8.10.1-snapshot.4+6c5c9e653",
45
+ "@instructure/ui-tooltip": "8.10.1-snapshot.4+6c5c9e653",
46
+ "@instructure/ui-utils": "8.10.1-snapshot.4+6c5c9e653",
47
+ "@instructure/ui-view": "8.10.1-snapshot.4+6c5c9e653",
48
+ "@instructure/uid": "8.10.1-snapshot.4+6c5c9e653",
49
49
  "prop-types": "^15"
50
50
  },
51
51
  "peerDependencies": {
@@ -55,5 +55,5 @@
55
55
  "access": "public"
56
56
  },
57
57
  "sideEffects": false,
58
- "gitHead": "bf1e82efccb682510708448efd369eddaa24f74b"
58
+ "gitHead": "6c5c9e653f7ce3d239296f4ed19c5679fdddcd5b"
59
59
  }
@@ -50,7 +50,7 @@ class PaginationButton extends Component<PaginationPageProps> {
50
50
 
51
51
  render() {
52
52
  const exclude = this.props.current ? ['onClick', 'href'] : []
53
- const props = omitProps(this.props, PaginationButton.propTypes, exclude)
53
+ const props = omitProps(this.props, PaginationButton.allowedProps, exclude)
54
54
  return (
55
55
  <BaseButton
56
56
  color="primary"
@@ -272,7 +272,7 @@ class Pagination extends Component<PaginationProps> {
272
272
  )
273
273
 
274
274
  const passthroughProps = View.omitViewProps(
275
- omitProps(this.props, Pagination.propTypes),
275
+ omitProps(this.props, Pagination.allowedProps),
276
276
  Pagination
277
277
  )
278
278
 
@@ -30,7 +30,11 @@ import { ThemeablePropTypes } from '@instructure/emotion'
30
30
 
31
31
  import { PaginationButton } from './PaginationButton'
32
32
 
33
- import type { Spacing, WithStyleProps } from '@instructure/emotion'
33
+ import type {
34
+ Spacing,
35
+ WithStyleProps,
36
+ ComponentStyle
37
+ } from '@instructure/emotion'
34
38
  import type { AsElementType, PropValidators } from '@instructure/shared-types'
35
39
 
36
40
  type PaginationOwnProps = {
@@ -50,7 +54,10 @@ type PropKeys = keyof PaginationOwnProps
50
54
 
51
55
  type AllowedPropKeys = Readonly<Array<PropKeys>>
52
56
 
53
- type PaginationProps = PaginationOwnProps & WithStyleProps
57
+ type PaginationProps = PaginationOwnProps &
58
+ WithStyleProps<null, PaginationStyle>
59
+
60
+ type PaginationStyle = ComponentStyle<'pagination' | 'pages'>
54
61
 
55
62
  const propTypes: PropValidators<PropKeys> = {
56
63
  /**
@@ -114,5 +121,5 @@ const allowedProps: AllowedPropKeys = [
114
121
  'shouldHandleFocus'
115
122
  ]
116
123
 
117
- export type { PaginationProps }
124
+ export type { PaginationProps, PaginationStyle }
118
125
  export { propTypes, allowedProps }
@@ -22,6 +22,8 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
+ import type { PaginationStyle } from './props'
26
+
25
27
  /**
26
28
  * ---
27
29
  * private: true
@@ -32,7 +34,7 @@
32
34
  * @param {Object} state the state of the component, the style is applied to
33
35
  * @return {Object} The final style object, which will be used in the component
34
36
  */
35
- const generateStyle = () => {
37
+ const generateStyle = (): PaginationStyle => {
36
38
  return {
37
39
  pagination: {
38
40
  label: 'pagination',
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Spacing, WithStyleProps } from '@instructure/emotion';
2
+ import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
3
3
  import type { AsElementType, PropValidators } from '@instructure/shared-types';
4
4
  declare type PaginationOwnProps = {
5
5
  children?: React.ReactNode;
@@ -15,9 +15,10 @@ declare type PaginationOwnProps = {
15
15
  };
16
16
  declare type PropKeys = keyof PaginationOwnProps;
17
17
  declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
18
- declare type PaginationProps = PaginationOwnProps & WithStyleProps;
18
+ declare type PaginationProps = PaginationOwnProps & WithStyleProps<null, PaginationStyle>;
19
+ declare type PaginationStyle = ComponentStyle<'pagination' | 'pages'>;
19
20
  declare const propTypes: PropValidators<PropKeys>;
20
21
  declare const allowedProps: AllowedPropKeys;
21
- export type { PaginationProps };
22
+ export type { PaginationProps, PaginationStyle };
22
23
  export { propTypes, allowedProps };
23
24
  //# sourceMappingURL=props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Pagination/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE9E,aAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,kBAAkB,CAAA;AAExC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,eAAe,GAAG,kBAAkB,GAAG,cAAc,CAAA;AAE1D,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA+CvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAWnB,CAAA;AAED,YAAY,EAAE,eAAe,EAAE,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Pagination/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE9E,aAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,kBAAkB,CAAA;AAExC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,eAAe,GAAG,kBAAkB,GACvC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,CAAA;AAEvC,aAAK,eAAe,GAAG,cAAc,CAAC,YAAY,GAAG,OAAO,CAAC,CAAA;AAE7D,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CA+CvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAWnB,CAAA;AAED,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -1,3 +1,4 @@
1
+ import type { PaginationStyle } from './props';
1
2
  /**
2
3
  * ---
3
4
  * private: true
@@ -8,16 +9,6 @@
8
9
  * @param {Object} state the state of the component, the style is applied to
9
10
  * @return {Object} The final style object, which will be used in the component
10
11
  */
11
- declare const generateStyle: () => {
12
- pagination: {
13
- label: string;
14
- textAlign: string;
15
- };
16
- pages: {
17
- label: string;
18
- display: string;
19
- alignItems: string;
20
- };
21
- };
12
+ declare const generateStyle: () => PaginationStyle;
22
13
  export default generateStyle;
23
14
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Pagination/styles.ts"],"names":[],"mappings":"AAwBA;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa;;;;;;;;;;CAYlB,CAAA;AAED,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Pagination/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,QAAO,eAYzB,CAAA;AAED,eAAe,aAAa,CAAA"}