@instructure/ui-pagination 8.10.3-snapshot.22 → 8.10.3-snapshot.23

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.
@@ -44,6 +44,10 @@ let PaginationArrowButton = (_dec = testable(), _dec(_class = (_temp = _class2 =
44
44
  constructor(...args) {
45
45
  super(...args);
46
46
  this.ref = null;
47
+
48
+ this.handleRef = el => {
49
+ this.ref = el;
50
+ };
47
51
  }
48
52
 
49
53
  render() {
@@ -57,9 +61,7 @@ let PaginationArrowButton = (_dec = testable(), _dec(_class = (_temp = _class2 =
57
61
  return /*#__PURE__*/React.createElement(Tooltip, {
58
62
  on: ['hover', 'focus'],
59
63
  renderTip: /*#__PURE__*/React.createElement(PresentationContent, {
60
- elementRef: element => {
61
- this.ref = element;
62
- }
64
+ elementRef: this.handleRef
63
65
  }, label)
64
66
  }, /*#__PURE__*/React.createElement(IconButton, Object.assign({}, props, {
65
67
  size: "small",
@@ -39,6 +39,10 @@ let PaginationButton = (_dec = testable(), _dec(_class = (_temp = _class2 = clas
39
39
  constructor(...args) {
40
40
  super(...args);
41
41
  this.ref = null;
42
+
43
+ this.handleRef = el => {
44
+ this.ref = el;
45
+ };
42
46
  }
43
47
 
44
48
  render() {
@@ -50,9 +54,7 @@ let PaginationButton = (_dec = testable(), _dec(_class = (_temp = _class2 = clas
50
54
  withBorder: this.props.current ? true : false
51
55
  }, props, {
52
56
  "aria-current": this.props.current ? 'page' : void 0,
53
- elementRef: element => {
54
- this.ref = element;
55
- }
57
+ elementRef: this.handleRef
56
58
  }), this.props.children);
57
59
  }
58
60
 
@@ -41,6 +41,10 @@ let PaginationArrowButton = (_dec = (0, _testable.testable)(), _dec(_class = (_t
41
41
  constructor(...args) {
42
42
  super(...args);
43
43
  this.ref = null;
44
+
45
+ this.handleRef = el => {
46
+ this.ref = el;
47
+ };
44
48
  }
45
49
 
46
50
  render() {
@@ -53,9 +57,7 @@ let PaginationArrowButton = (_dec = (0, _testable.testable)(), _dec(_class = (_t
53
57
  return /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
54
58
  on: ['hover', 'focus'],
55
59
  renderTip: /*#__PURE__*/_react.default.createElement(_PresentationContent.PresentationContent, {
56
- elementRef: element => {
57
- this.ref = element;
58
- }
60
+ elementRef: this.handleRef
59
61
  }, label)
60
62
  }, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, Object.assign({}, props, {
61
63
  size: "small",
@@ -29,6 +29,10 @@ let PaginationButton = (_dec = (0, _testable.testable)(), _dec(_class = (_temp =
29
29
  constructor(...args) {
30
30
  super(...args);
31
31
  this.ref = null;
32
+
33
+ this.handleRef = el => {
34
+ this.ref = el;
35
+ };
32
36
  }
33
37
 
34
38
  render() {
@@ -40,9 +44,7 @@ let PaginationButton = (_dec = (0, _testable.testable)(), _dec(_class = (_temp =
40
44
  withBorder: this.props.current ? true : false
41
45
  }, props, {
42
46
  "aria-current": this.props.current ? 'page' : void 0,
43
- elementRef: element => {
44
- this.ref = element;
45
- }
47
+ elementRef: this.handleRef
46
48
  }), this.props.children);
47
49
  }
48
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-pagination",
3
- "version": "8.10.3-snapshot.22+f96f8c48e",
3
+ "version": "8.10.3-snapshot.23+5aaa29662",
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.10.3-snapshot.22+f96f8c48e",
28
- "@instructure/ui-test-locator": "8.10.3-snapshot.22+f96f8c48e",
29
- "@instructure/ui-test-queries": "8.10.3-snapshot.22+f96f8c48e",
30
- "@instructure/ui-test-utils": "8.10.3-snapshot.22+f96f8c48e"
27
+ "@instructure/ui-babel-preset": "8.10.3-snapshot.23+5aaa29662",
28
+ "@instructure/ui-test-locator": "8.10.3-snapshot.23+5aaa29662",
29
+ "@instructure/ui-test-queries": "8.10.3-snapshot.23+5aaa29662",
30
+ "@instructure/ui-test-utils": "8.10.3-snapshot.23+5aaa29662"
31
31
  },
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.13.10",
34
- "@instructure/emotion": "8.10.3-snapshot.22+f96f8c48e",
35
- "@instructure/shared-types": "8.10.3-snapshot.22+f96f8c48e",
36
- "@instructure/ui-a11y-content": "8.10.3-snapshot.22+f96f8c48e",
37
- "@instructure/ui-a11y-utils": "8.10.3-snapshot.22+f96f8c48e",
38
- "@instructure/ui-buttons": "8.10.3-snapshot.22+f96f8c48e",
39
- "@instructure/ui-dom-utils": "8.10.3-snapshot.22+f96f8c48e",
40
- "@instructure/ui-icons": "8.10.3-snapshot.22+f96f8c48e",
41
- "@instructure/ui-portal": "8.10.3-snapshot.22+f96f8c48e",
42
- "@instructure/ui-prop-types": "8.10.3-snapshot.22+f96f8c48e",
43
- "@instructure/ui-react-utils": "8.10.3-snapshot.22+f96f8c48e",
44
- "@instructure/ui-testable": "8.10.3-snapshot.22+f96f8c48e",
45
- "@instructure/ui-tooltip": "8.10.3-snapshot.22+f96f8c48e",
46
- "@instructure/ui-utils": "8.10.3-snapshot.22+f96f8c48e",
47
- "@instructure/ui-view": "8.10.3-snapshot.22+f96f8c48e",
48
- "@instructure/uid": "8.10.3-snapshot.22+f96f8c48e",
34
+ "@instructure/emotion": "8.10.3-snapshot.23+5aaa29662",
35
+ "@instructure/shared-types": "8.10.3-snapshot.23+5aaa29662",
36
+ "@instructure/ui-a11y-content": "8.10.3-snapshot.23+5aaa29662",
37
+ "@instructure/ui-a11y-utils": "8.10.3-snapshot.23+5aaa29662",
38
+ "@instructure/ui-buttons": "8.10.3-snapshot.23+5aaa29662",
39
+ "@instructure/ui-dom-utils": "8.10.3-snapshot.23+5aaa29662",
40
+ "@instructure/ui-icons": "8.10.3-snapshot.23+5aaa29662",
41
+ "@instructure/ui-portal": "8.10.3-snapshot.23+5aaa29662",
42
+ "@instructure/ui-prop-types": "8.10.3-snapshot.23+5aaa29662",
43
+ "@instructure/ui-react-utils": "8.10.3-snapshot.23+5aaa29662",
44
+ "@instructure/ui-testable": "8.10.3-snapshot.23+5aaa29662",
45
+ "@instructure/ui-tooltip": "8.10.3-snapshot.23+5aaa29662",
46
+ "@instructure/ui-utils": "8.10.3-snapshot.23+5aaa29662",
47
+ "@instructure/ui-view": "8.10.3-snapshot.23+5aaa29662",
48
+ "@instructure/uid": "8.10.3-snapshot.23+5aaa29662",
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": "f96f8c48efab7806609098e1f00a6953b2884601"
58
+ "gitHead": "5aaa296621d72faebe1a809a8895a8185587008d"
59
59
  }
@@ -55,6 +55,10 @@ class PaginationArrowButton extends Component<PaginationNavigationProps> {
55
55
 
56
56
  ref: Element | null = null
57
57
 
58
+ handleRef = (el: Element | null) => {
59
+ this.ref = el
60
+ }
61
+
58
62
  render() {
59
63
  const { label, direction, buttonRef, ...props } = this.props
60
64
  const Icon =
@@ -63,11 +67,7 @@ class PaginationArrowButton extends Component<PaginationNavigationProps> {
63
67
  <Tooltip
64
68
  on={['hover', 'focus']}
65
69
  renderTip={
66
- <PresentationContent
67
- elementRef={(element) => {
68
- this.ref = element
69
- }}
70
- >
70
+ <PresentationContent elementRef={this.handleRef}>
71
71
  {label}
72
72
  </PresentationContent>
73
73
  }
@@ -50,6 +50,10 @@ class PaginationButton extends Component<PaginationPageProps> {
50
50
 
51
51
  ref: Element | null = null
52
52
 
53
+ handleRef = (el: Element | null) => {
54
+ this.ref = el
55
+ }
56
+
53
57
  render() {
54
58
  const exclude = this.props.current ? ['onClick', 'href'] : []
55
59
  const props = omitProps(this.props, PaginationButton.allowedProps, exclude)
@@ -60,9 +64,7 @@ class PaginationButton extends Component<PaginationPageProps> {
60
64
  withBorder={this.props.current ? true : false}
61
65
  {...props}
62
66
  aria-current={this.props.current ? 'page' : undefined}
63
- elementRef={(element) => {
64
- this.ref = element
65
- }}
67
+ elementRef={this.handleRef}
66
68
  >
67
69
  {this.props.children}
68
70
  </BaseButton>
@@ -22,6 +22,7 @@ declare class PaginationArrowButton extends Component<PaginationNavigationProps>
22
22
  buttonRef: (el: any) => void;
23
23
  };
24
24
  ref: Element | null;
25
+ handleRef: (el: Element | null) => void;
25
26
  render(): JSX.Element;
26
27
  }
27
28
  export default PaginationArrowButton;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Pagination/PaginationArrowButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUxC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAGxD;;;;;GAKG;AACH,cACM,qBAAsB,SAAQ,SAAS,CAAC,yBAAyB,CAAC;IACtE,MAAM,CAAC,QAAQ,CAAC,WAAW,2BAA0B;IAErD,MAAM,CAAC,YAAY;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;MAGlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,MAAM;CAiCP;AAED,eAAe,qBAAqB,CAAA;AACpC,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Pagination/PaginationArrowButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUxC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAGxD;;;;;GAKG;AACH,cACM,qBAAsB,SAAQ,SAAS,CAAC,yBAAyB,CAAC;IACtE,MAAM,CAAC,QAAQ,CAAC,WAAW,2BAA0B;IAErD,MAAM,CAAC,YAAY;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;MAGlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAE9B;IAED,MAAM;CA6BP;AAED,eAAe,qBAAqB,CAAA;AACpC,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
@@ -20,6 +20,7 @@ declare class PaginationButton extends Component<PaginationPageProps> {
20
20
  current: boolean;
21
21
  };
22
22
  ref: Element | null;
23
+ handleRef: (el: Element | null) => void;
23
24
  render(): JSX.Element;
24
25
  }
25
26
  export default PaginationButton;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Pagination/PaginationButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOxC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElD;;;;;GAKG;AAEH,cACM,gBAAiB,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,WAAW,qBAAoB;IAE/C,MAAM,CAAC,SAAS;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;SAAe;IAClC,MAAM,CAAC,YAAY;;MAElB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,MAAM;CAkBP;AAED,eAAe,gBAAgB,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Pagination/PaginationButton/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOxC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElD;;;;;GAKG;AAEH,cACM,gBAAiB,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,WAAW,qBAAoB;IAE/C,MAAM,CAAC,SAAS;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;SAAe;IAClC,MAAM,CAAC,YAAY;;MAElB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAE9B;IAED,MAAM;CAgBP;AAED,eAAe,gBAAgB,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,CAAA"}