@instructure/ui-popover 8.12.1-snapshot.45 → 8.12.1-snapshot.51

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.
@@ -27,9 +27,15 @@ import { PositionLocator } from '@instructure/ui-position/es/Position/PositionLo
27
27
  import { Popover } from './index';
28
28
  import { PopoverTriggerLocator } from './PopoverTriggerLocator';
29
29
  export const customMethods = {
30
- findContent: (...args) => PositionLocator.findContent(...args),
31
- findPositionTarget: (...args) => PositionLocator.findTarget(...args),
32
- findTrigger: (...args) => PopoverTriggerLocator.find(...args)
30
+ findContent: function () {
31
+ return PositionLocator.findContent(...arguments);
32
+ },
33
+ findPositionTarget: function () {
34
+ return PositionLocator.findTarget(...arguments);
35
+ },
36
+ findTrigger: function () {
37
+ return PopoverTriggerLocator.find(...arguments);
38
+ }
33
39
  };
34
40
  export { PopoverTriggerLocator };
35
41
  export const PopoverLocator = locator(Popover.selector, customMethods);
@@ -46,7 +46,10 @@ tags: overlay, portal, dialog
46
46
 
47
47
  let Popover = (_dec = textDirectionContextConsumer(), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class Popover extends Component {
48
48
  constructor(props) {
49
+ var _this;
50
+
49
51
  super(props);
52
+ _this = this;
50
53
  this._handleMouseOver = void 0;
51
54
  this._handleMouseOut = void 0;
52
55
  this._raf = [];
@@ -71,16 +74,17 @@ let Popover = (_dec = textDirectionContextConsumer(), _dec2 = testable(), _dec(_
71
74
  this.props.onShowContent(event);
72
75
  };
73
76
 
74
- this.hide = (event, documentClick = false) => {
75
- const _this$props = this.props,
77
+ this.hide = function (event) {
78
+ let documentClick = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
79
+ const _this$props = _this.props,
76
80
  onHideContent = _this$props.onHideContent,
77
81
  isShowingContent = _this$props.isShowingContent;
78
82
 
79
83
  if (typeof isShowingContent === 'undefined') {
80
84
  // uncontrolled, set state, fire callbacks
81
- this.setState(({
82
- isShowingContent
83
- }) => {
85
+ _this.setState(_ref => {
86
+ let isShowingContent = _ref.isShowingContent;
87
+
84
88
  if (isShowingContent) {
85
89
  onHideContent(event, {
86
90
  documentClick
@@ -107,16 +111,16 @@ let Popover = (_dec = textDirectionContextConsumer(), _dec2 = testable(), _dec(_
107
111
  }
108
112
  };
109
113
 
110
- this.handleDialogDismiss = (...args) => {
111
- if (!this.props.shouldReturnFocus && this.props.shouldFocusContentOnTriggerBlur) {
112
- const trigger = findDOMNode(this._trigger);
114
+ this.handleDialogDismiss = function () {
115
+ if (!_this.props.shouldReturnFocus && _this.props.shouldFocusContentOnTriggerBlur) {
116
+ const trigger = findDOMNode(_this._trigger);
113
117
 
114
118
  if (trigger && typeof trigger.focus === 'function') {
115
119
  trigger.focus();
116
120
  }
117
121
  }
118
122
 
119
- this.hide(...args);
123
+ _this.hide(...arguments);
120
124
  };
121
125
 
122
126
  this.handleDialogBlur = event => {
@@ -498,9 +502,9 @@ let Popover = (_dec = textDirectionContextConsumer(), _dec2 = testable(), _dec(_
498
502
  shouldFocusContentOnTriggerBlur: false,
499
503
  shouldCloseOnEscape: true,
500
504
  onShowContent: event => {},
501
- onHideContent: (event, {
502
- documentClick
503
- }) => {},
505
+ onHideContent: (event, _ref2) => {
506
+ let documentClick = _ref2.documentClick;
507
+ },
504
508
  onClick: event => {},
505
509
  onFocus: event => {},
506
510
  onBlur: event => {},
@@ -3,13 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.PopoverLocator = void 0;
6
7
  Object.defineProperty(exports, "PopoverTriggerLocator", {
7
8
  enumerable: true,
8
9
  get: function () {
9
10
  return _PopoverTriggerLocator.PopoverTriggerLocator;
10
11
  }
11
12
  });
12
- exports.PopoverLocator = exports.customMethods = void 0;
13
+ exports.customMethods = void 0;
13
14
 
14
15
  var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
15
16
 
@@ -44,9 +45,15 @@ var _PopoverTriggerLocator = require("./PopoverTriggerLocator");
44
45
  */
45
46
  // eslint-disable-next-line no-restricted-imports
46
47
  const customMethods = {
47
- findContent: (...args) => _PositionLocator.PositionLocator.findContent(...args),
48
- findPositionTarget: (...args) => _PositionLocator.PositionLocator.findTarget(...args),
49
- findTrigger: (...args) => _PopoverTriggerLocator.PopoverTriggerLocator.find(...args)
48
+ findContent: function () {
49
+ return _PositionLocator.PositionLocator.findContent(...arguments);
50
+ },
51
+ findPositionTarget: function () {
52
+ return _PositionLocator.PositionLocator.findTarget(...arguments);
53
+ },
54
+ findTrigger: function () {
55
+ return _PopoverTriggerLocator.PopoverTriggerLocator.find(...arguments);
56
+ }
50
57
  };
51
58
  exports.customMethods = customMethods;
52
59
  const PopoverLocator = (0, _locator.locator)(_index.Popover.selector, customMethods);
@@ -7,7 +7,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.Popover = exports.default = void 0;
10
+ exports.default = exports.Popover = void 0;
11
11
 
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
 
@@ -65,7 +65,10 @@ tags: overlay, portal, dialog
65
65
  **/
66
66
  let Popover = (_dec = (0, _textDirectionContextConsumer.textDirectionContextConsumer)(), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class Popover extends _react.Component {
67
67
  constructor(props) {
68
+ var _this;
69
+
68
70
  super(props);
71
+ _this = this;
69
72
  this._handleMouseOver = void 0;
70
73
  this._handleMouseOut = void 0;
71
74
  this._raf = [];
@@ -90,16 +93,17 @@ let Popover = (_dec = (0, _textDirectionContextConsumer.textDirectionContextCons
90
93
  this.props.onShowContent(event);
91
94
  };
92
95
 
93
- this.hide = (event, documentClick = false) => {
94
- const _this$props = this.props,
96
+ this.hide = function (event) {
97
+ let documentClick = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
98
+ const _this$props = _this.props,
95
99
  onHideContent = _this$props.onHideContent,
96
100
  isShowingContent = _this$props.isShowingContent;
97
101
 
98
102
  if (typeof isShowingContent === 'undefined') {
99
103
  // uncontrolled, set state, fire callbacks
100
- this.setState(({
101
- isShowingContent
102
- }) => {
104
+ _this.setState(_ref => {
105
+ let isShowingContent = _ref.isShowingContent;
106
+
103
107
  if (isShowingContent) {
104
108
  onHideContent(event, {
105
109
  documentClick
@@ -126,16 +130,16 @@ let Popover = (_dec = (0, _textDirectionContextConsumer.textDirectionContextCons
126
130
  }
127
131
  };
128
132
 
129
- this.handleDialogDismiss = (...args) => {
130
- if (!this.props.shouldReturnFocus && this.props.shouldFocusContentOnTriggerBlur) {
131
- const trigger = (0, _findDOMNode.findDOMNode)(this._trigger);
133
+ this.handleDialogDismiss = function () {
134
+ if (!_this.props.shouldReturnFocus && _this.props.shouldFocusContentOnTriggerBlur) {
135
+ const trigger = (0, _findDOMNode.findDOMNode)(_this._trigger);
132
136
 
133
137
  if (trigger && typeof trigger.focus === 'function') {
134
138
  trigger.focus();
135
139
  }
136
140
  }
137
141
 
138
- this.hide(...args);
142
+ _this.hide(...arguments);
139
143
  };
140
144
 
141
145
  this.handleDialogBlur = event => {
@@ -517,9 +521,9 @@ let Popover = (_dec = (0, _textDirectionContextConsumer.textDirectionContextCons
517
521
  shouldFocusContentOnTriggerBlur: false,
518
522
  shouldCloseOnEscape: true,
519
523
  onShowContent: event => {},
520
- onHideContent: (event, {
521
- documentClick
522
- }) => {},
524
+ onHideContent: (event, _ref2) => {
525
+ let documentClick = _ref2.documentClick;
526
+ },
523
527
  onClick: event => {},
524
528
  onFocus: event => {},
525
529
  onBlur: event => {},
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.allowedProps = exports.propTypes = void 0;
8
+ exports.propTypes = exports.allowedProps = void 0;
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-popover",
3
- "version": "8.12.1-snapshot.45+9f4d9f91f",
3
+ "version": "8.12.1-snapshot.51+4d3697334",
4
4
  "description": "A component for hiding or showing content based on user interaction.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -25,28 +25,28 @@
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "@babel/runtime": "^7.13.10",
28
- "@instructure/console": "8.12.1-snapshot.45+9f4d9f91f",
29
- "@instructure/emotion": "8.12.1-snapshot.45+9f4d9f91f",
30
- "@instructure/ui-a11y-utils": "8.12.1-snapshot.45+9f4d9f91f",
31
- "@instructure/ui-dialog": "8.12.1-snapshot.45+9f4d9f91f",
32
- "@instructure/ui-dom-utils": "8.12.1-snapshot.45+9f4d9f91f",
33
- "@instructure/ui-i18n": "8.12.1-snapshot.45+9f4d9f91f",
34
- "@instructure/ui-position": "8.12.1-snapshot.45+9f4d9f91f",
35
- "@instructure/ui-prop-types": "8.12.1-snapshot.45+9f4d9f91f",
36
- "@instructure/ui-react-utils": "8.12.1-snapshot.45+9f4d9f91f",
37
- "@instructure/ui-testable": "8.12.1-snapshot.45+9f4d9f91f",
38
- "@instructure/ui-utils": "8.12.1-snapshot.45+9f4d9f91f",
39
- "@instructure/ui-view": "8.12.1-snapshot.45+9f4d9f91f",
40
- "@instructure/uid": "8.12.1-snapshot.45+9f4d9f91f",
28
+ "@instructure/console": "8.12.1-snapshot.51+4d3697334",
29
+ "@instructure/emotion": "8.12.1-snapshot.51+4d3697334",
30
+ "@instructure/ui-a11y-utils": "8.12.1-snapshot.51+4d3697334",
31
+ "@instructure/ui-dialog": "8.12.1-snapshot.51+4d3697334",
32
+ "@instructure/ui-dom-utils": "8.12.1-snapshot.51+4d3697334",
33
+ "@instructure/ui-i18n": "8.12.1-snapshot.51+4d3697334",
34
+ "@instructure/ui-position": "8.12.1-snapshot.51+4d3697334",
35
+ "@instructure/ui-prop-types": "8.12.1-snapshot.51+4d3697334",
36
+ "@instructure/ui-react-utils": "8.12.1-snapshot.51+4d3697334",
37
+ "@instructure/ui-testable": "8.12.1-snapshot.51+4d3697334",
38
+ "@instructure/ui-utils": "8.12.1-snapshot.51+4d3697334",
39
+ "@instructure/ui-view": "8.12.1-snapshot.51+4d3697334",
40
+ "@instructure/uid": "8.12.1-snapshot.51+4d3697334",
41
41
  "keycode": "^2",
42
42
  "prop-types": "^15"
43
43
  },
44
44
  "devDependencies": {
45
- "@instructure/ui-babel-preset": "8.12.1-snapshot.45+9f4d9f91f",
46
- "@instructure/ui-color-utils": "8.12.1-snapshot.45+9f4d9f91f",
47
- "@instructure/ui-test-locator": "8.12.1-snapshot.45+9f4d9f91f",
48
- "@instructure/ui-test-queries": "8.12.1-snapshot.45+9f4d9f91f",
49
- "@instructure/ui-test-utils": "8.12.1-snapshot.45+9f4d9f91f"
45
+ "@instructure/ui-babel-preset": "8.12.1-snapshot.51+4d3697334",
46
+ "@instructure/ui-color-utils": "8.12.1-snapshot.51+4d3697334",
47
+ "@instructure/ui-test-locator": "8.12.1-snapshot.51+4d3697334",
48
+ "@instructure/ui-test-queries": "8.12.1-snapshot.51+4d3697334",
49
+ "@instructure/ui-test-utils": "8.12.1-snapshot.51+4d3697334"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "react": ">=16.8 <=17"
@@ -55,5 +55,5 @@
55
55
  "access": "public"
56
56
  },
57
57
  "sideEffects": false,
58
- "gitHead": "9f4d9f91f603496ac87a04d953afe7fe9004874d"
58
+ "gitHead": "4d369733414715a70bae0628378e8d82214eab3e"
59
59
  }