@instructure/ui-menu 8.33.1 → 8.33.2

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/es/Menu/MenuItem/MenuItemLocator.js +2 -1
  3. package/es/Menu/MenuItem/index.js +12 -53
  4. package/es/Menu/MenuItem/locator.js +1 -0
  5. package/es/Menu/MenuItem/props.js +1 -0
  6. package/es/Menu/MenuItem/styles.js +1 -2
  7. package/es/Menu/MenuItem/theme.js +5 -5
  8. package/es/Menu/MenuItemGroup/MenuItemGroupLocator.js +2 -1
  9. package/es/Menu/MenuItemGroup/index.js +6 -29
  10. package/es/Menu/MenuItemGroup/props.js +1 -0
  11. package/es/Menu/MenuItemGroup/styles.js +0 -1
  12. package/es/Menu/MenuItemGroup/theme.js +5 -5
  13. package/es/Menu/MenuItemSeparator/index.js +0 -10
  14. package/es/Menu/MenuItemSeparator/props.js +2 -0
  15. package/es/Menu/MenuItemSeparator/styles.js +0 -1
  16. package/es/Menu/MenuItemSeparator/theme.js +4 -4
  17. package/es/Menu/MenuLocator.js +12 -9
  18. package/es/Menu/index.js +26 -85
  19. package/es/Menu/locator.js +1 -0
  20. package/es/Menu/props.js +1 -0
  21. package/es/Menu/styles.js +0 -1
  22. package/es/Menu/theme.js +4 -4
  23. package/es/MenuContext.js +1 -1
  24. package/lib/Menu/MenuItem/MenuItemLocator.js +1 -3
  25. package/lib/Menu/MenuItem/index.js +12 -70
  26. package/lib/Menu/MenuItem/locator.js +0 -2
  27. package/lib/Menu/MenuItem/props.js +1 -4
  28. package/lib/Menu/MenuItem/styles.js +1 -3
  29. package/lib/Menu/MenuItem/theme.js +5 -6
  30. package/lib/Menu/MenuItemGroup/MenuItemGroupLocator.js +1 -4
  31. package/lib/Menu/MenuItemGroup/index.js +6 -45
  32. package/lib/Menu/MenuItemGroup/locator.js +0 -2
  33. package/lib/Menu/MenuItemGroup/props.js +1 -7
  34. package/lib/Menu/MenuItemGroup/styles.js +0 -2
  35. package/lib/Menu/MenuItemGroup/theme.js +5 -6
  36. package/lib/Menu/MenuItemSeparator/index.js +0 -18
  37. package/lib/Menu/MenuItemSeparator/props.js +2 -1
  38. package/lib/Menu/MenuItemSeparator/styles.js +0 -2
  39. package/lib/Menu/MenuItemSeparator/theme.js +4 -5
  40. package/lib/Menu/MenuLocator.js +11 -14
  41. package/lib/Menu/index.js +26 -103
  42. package/lib/Menu/locator.js +0 -2
  43. package/lib/Menu/props.js +1 -6
  44. package/lib/Menu/styles.js +0 -2
  45. package/lib/Menu/theme.js +4 -5
  46. package/lib/MenuContext.js +0 -2
  47. package/lib/index.js +0 -1
  48. package/package.json +19 -19
  49. package/tsconfig.build.tsbuildinfo +1 -1
@@ -1,16 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.propTypes = exports.allowedProps = void 0;
9
-
10
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
9
  var _controllable = require("@instructure/ui-prop-types/lib/controllable.js");
13
-
14
10
  /*
15
11
  * The MIT License (MIT)
16
12
  *
@@ -34,6 +30,7 @@ var _controllable = require("@instructure/ui-prop-types/lib/controllable.js");
34
30
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
31
  * SOFTWARE.
36
32
  */
33
+
37
34
  const propTypes = {
38
35
  children: _propTypes.default.node.isRequired,
39
36
  defaultSelected: _propTypes.default.bool,
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  /*
9
8
  * The MIT License (MIT)
10
9
  *
@@ -41,7 +40,7 @@ exports.default = void 0;
41
40
  */
42
41
  const generateStyle = (componentTheme, props) => {
43
42
  const type = props.type,
44
- disabled = props.disabled;
43
+ disabled = props.disabled;
45
44
  const isRadioOrCheckbox = type === 'checkbox' || type === 'radio';
46
45
  const flyoutIconStyles = type === 'flyout' ? {
47
46
  insetInlineStart: 'auto',
@@ -131,6 +130,5 @@ const generateStyle = (componentTheme, props) => {
131
130
  }
132
131
  };
133
132
  };
134
-
135
133
  var _default = generateStyle;
136
134
  exports.default = _default;
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  /*
9
8
  * The MIT License (MIT)
10
9
  *
@@ -36,9 +35,9 @@ exports.default = void 0;
36
35
  */
37
36
  const generateComponentTheme = theme => {
38
37
  const colors = theme.colors,
39
- typography = theme.typography,
40
- spacing = theme.spacing,
41
- themeName = theme.key;
38
+ typography = theme.typography,
39
+ spacing = theme.spacing,
40
+ themeName = theme.key;
42
41
  const themeSpecificStyle = {
43
42
  canvas: {
44
43
  labelColor: theme['ic-brand-font-color-dark'],
@@ -61,10 +60,10 @@ const generateComponentTheme = theme => {
61
60
  activeLabelColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
62
61
  activeIconColor: colors === null || colors === void 0 ? void 0 : colors.textLightest
63
62
  };
64
- return { ...componentVariables,
63
+ return {
64
+ ...componentVariables,
65
65
  ...themeSpecificStyle[themeName]
66
66
  };
67
67
  };
68
-
69
68
  var _default = generateComponentTheme;
70
69
  exports.default = _default;
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.MenuItemGroupLocator = void 0;
7
-
8
7
  var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
9
-
10
8
  var _index = require("./index");
11
-
12
9
  var _MenuItemLocator = require("../MenuItem/MenuItemLocator");
13
-
14
10
  /*
15
11
  * The MIT License (MIT)
16
12
  *
@@ -34,6 +30,7 @@ var _MenuItemLocator = require("../MenuItem/MenuItemLocator");
34
30
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
31
  * SOFTWARE.
36
32
  */
33
+
37
34
  // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
38
35
  const MenuItemGroupLocator = (0, _locator.locator)(_index.MenuItemGroup.selector, {
39
36
  findAllItems: function () {
@@ -1,40 +1,24 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
-
5
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
8
  exports.default = exports.MenuItemGroup = void 0;
11
-
12
9
  var _react = _interopRequireWildcard(require("react"));
13
-
14
10
  var _emotion = require("@instructure/emotion");
15
-
16
11
  var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
17
-
18
12
  var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
19
-
20
13
  var _matchComponentTypes = require("@instructure/ui-react-utils/lib/matchComponentTypes.js");
21
-
22
14
  var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
23
-
24
15
  var _hasVisibleChildren = require("@instructure/ui-a11y-utils/lib/hasVisibleChildren.js");
25
-
26
16
  var _testable = require("@instructure/ui-testable/lib/testable.js");
27
-
28
17
  var _MenuItem = require("../MenuItem");
29
-
30
18
  var _styles = _interopRequireDefault(require("./styles"));
31
-
32
19
  var _theme = _interopRequireDefault(require("./theme"));
33
-
34
20
  var _props = require("./props");
35
-
36
21
  var _dec, _dec2, _dec3, _class, _class2;
37
-
38
22
  /**
39
23
  ---
40
24
  parent: Menu
@@ -47,17 +31,14 @@ let MenuItemGroup = (_dec = (0, _withDeterministicId.withDeterministicId)(), _de
47
31
  super(props);
48
32
  this._labelId = void 0;
49
33
  this.ref = null;
50
-
51
34
  this.handleRef = el => {
52
35
  this.ref = el;
53
36
  };
54
-
55
37
  this.handleSelect = (e, value, selected, item) => {
56
38
  if (this.props.disabled) {
57
39
  e.preventDefault();
58
40
  return;
59
41
  }
60
-
61
42
  if (this.props.selected) {
62
43
  this.updateSelected(e, value, this.props.selected, selected, item);
63
44
  } else {
@@ -68,12 +49,10 @@ let MenuItemGroup = (_dec = (0, _withDeterministicId.withDeterministicId)(), _de
68
49
  });
69
50
  }
70
51
  };
71
-
72
52
  this.updateSelected = (e, value, items, selected, item) => {
73
53
  const allowMultiple = this.props.allowMultiple;
74
54
  let updated = allowMultiple ? [...items] : [];
75
55
  const location = updated.indexOf(value);
76
-
77
56
  if (selected === true && location < 0) {
78
57
  updated.push(value);
79
58
  } else if (selected === false && location !== -1) {
@@ -82,44 +61,33 @@ let MenuItemGroup = (_dec = (0, _withDeterministicId.withDeterministicId)(), _de
82
61
  // don't allow nothing selected if it's not allowMultiple/checkbox
83
62
  updated = [...items];
84
63
  }
85
-
86
64
  if (typeof this.props.onSelect === 'function') {
87
65
  this.props.onSelect(e, updated, selected, item);
88
66
  }
89
-
90
67
  return updated;
91
68
  };
92
-
93
69
  if (typeof props.selected === 'undefined') {
94
70
  this.state = {
95
71
  selected: this.selectedFromChildren(props) || props.defaultSelected
96
72
  };
97
73
  }
98
-
99
74
  this._labelId = props.deterministicId('MenuItemGroup');
100
75
  }
101
-
102
76
  componentDidMount() {
103
77
  var _this$props$makeStyle, _this$props;
104
-
105
78
  (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
106
79
  }
107
-
108
80
  componentDidUpdate() {
109
81
  var _this$props$makeStyle2, _this$props2;
110
-
111
82
  (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
112
83
  }
113
-
114
84
  selectedFromChildren(props) {
115
85
  const children = props.children,
116
- allowMultiple = props.allowMultiple;
86
+ allowMultiple = props.allowMultiple;
117
87
  const selected = [];
118
-
119
88
  const items = _react.Children.toArray(children).filter(child => {
120
89
  return (0, _matchComponentTypes.matchComponentTypes)(child, [_MenuItem.MenuItem]);
121
90
  });
122
-
123
91
  items.forEach((item, index) => {
124
92
  if ((selected.length === 0 || allowMultiple) && (item.props.selected || item.props.defaultSelected)) {
125
93
  selected.push(item.props.value || index);
@@ -127,7 +95,6 @@ let MenuItemGroup = (_dec = (0, _withDeterministicId.withDeterministicId)(), _de
127
95
  });
128
96
  return selected.length > 0 ? selected : null;
129
97
  }
130
-
131
98
  get selected() {
132
99
  if (typeof this.props.selected === 'undefined' && typeof this.state.selected === 'undefined') {
133
100
  return [];
@@ -135,23 +102,20 @@ let MenuItemGroup = (_dec = (0, _withDeterministicId.withDeterministicId)(), _de
135
102
  return typeof this.props.selected === 'undefined' ? [...this.state.selected] : [...this.props.selected];
136
103
  }
137
104
  }
138
-
139
105
  renderLabel() {
140
106
  var _this$props$styles;
141
-
142
107
  const label = this.props.label;
143
108
  return (0, _hasVisibleChildren.hasVisibleChildren)(label) ? (0, _emotion.jsx)("span", {
144
109
  css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.label
145
110
  }, label) : label;
146
111
  }
147
-
148
112
  renderChildren() {
149
113
  const _this$props3 = this.props,
150
- disabled = _this$props3.disabled,
151
- controls = _this$props3.controls,
152
- allowMultiple = _this$props3.allowMultiple,
153
- isTabbable = _this$props3.isTabbable,
154
- onMouseOver = _this$props3.onMouseOver;
114
+ disabled = _this$props3.disabled,
115
+ controls = _this$props3.controls,
116
+ allowMultiple = _this$props3.allowMultiple,
117
+ isTabbable = _this$props3.isTabbable,
118
+ onMouseOver = _this$props3.onMouseOver;
155
119
  const children = this.props.children;
156
120
  let index = -1;
157
121
  return _react.Children.map(children, child => {
@@ -177,10 +141,8 @@ let MenuItemGroup = (_dec = (0, _withDeterministicId.withDeterministicId)(), _de
177
141
  }
178
142
  });
179
143
  }
180
-
181
144
  render() {
182
145
  var _this$props$styles2, _this$props$styles3;
183
-
184
146
  const props = (0, _omitProps.omitProps)(this.props, MenuItemGroup.allowedProps);
185
147
  return (0, _emotion.jsx)("span", Object.assign({}, props, {
186
148
  css: (_this$props$styles2 = this.props.styles) === null || _this$props$styles2 === void 0 ? void 0 : _this$props$styles2.menuItemGroup,
@@ -195,7 +157,6 @@ let MenuItemGroup = (_dec = (0, _withDeterministicId.withDeterministicId)(), _de
195
157
  "aria-labelledby": this._labelId
196
158
  }, this.renderChildren()));
197
159
  }
198
-
199
160
  }, _class2.displayName = "MenuItemGroup", _class2.componentId = 'Menu.Group', _class2.propTypes = _props.propTypes, _class2.allowedProps = _props.allowedProps, _class2.defaultProps = {
200
161
  disabled: false,
201
162
  children: null,
@@ -10,9 +10,7 @@ Object.defineProperty(exports, "MenuItemGroupLocator", {
10
10
  }
11
11
  });
12
12
  exports.default = void 0;
13
-
14
13
  var _MenuItemGroupLocator = require("./MenuItemGroupLocator");
15
-
16
14
  /*
17
15
  * The MIT License (MIT)
18
16
  *
@@ -1,22 +1,15 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.propTypes = exports.allowedProps = void 0;
9
-
10
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
9
  var _controllable = require("@instructure/ui-prop-types/lib/controllable.js");
13
-
14
10
  var _Children = require("@instructure/ui-prop-types/lib/Children.js");
15
-
16
11
  var _MenuItem = require("../MenuItem");
17
-
18
12
  var _MenuItemSeparator = require("../MenuItemSeparator");
19
-
20
13
  /*
21
14
  * The MIT License (MIT)
22
15
  *
@@ -40,6 +33,7 @@ var _MenuItemSeparator = require("../MenuItemSeparator");
40
33
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
41
34
  * SOFTWARE.
42
35
  */
36
+
43
37
  const propTypes = {
44
38
  label: _propTypes.default.node.isRequired,
45
39
  allowMultiple: _propTypes.default.bool,
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  /*
9
8
  * The MIT License (MIT)
10
9
  *
@@ -64,6 +63,5 @@ const generateStyle = componentTheme => {
64
63
  }
65
64
  };
66
65
  };
67
-
68
66
  var _default = generateStyle;
69
67
  exports.default = _default;
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  /*
9
8
  * The MIT License (MIT)
10
9
  *
@@ -36,9 +35,9 @@ exports.default = void 0;
36
35
  */
37
36
  const generateComponentTheme = theme => {
38
37
  const colors = theme.colors,
39
- spacing = theme.spacing,
40
- typography = theme.typography,
41
- themeName = theme.key;
38
+ spacing = theme.spacing,
39
+ typography = theme.typography,
40
+ themeName = theme.key;
42
41
  const themeSpecificStyle = {
43
42
  canvas: {
44
43
  color: theme['ic-brand-font-color-dark']
@@ -52,10 +51,10 @@ const generateComponentTheme = theme => {
52
51
  color: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
53
52
  background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest
54
53
  };
55
- return { ...componentVariables,
54
+ return {
55
+ ...componentVariables,
56
56
  ...themeSpecificStyle[themeName]
57
57
  };
58
58
  };
59
-
60
59
  var _default = generateComponentTheme;
61
60
  exports.default = _default;
@@ -1,28 +1,18 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = exports.MenuItemSeparator = void 0;
9
-
10
8
  var _react = require("react");
11
-
12
9
  var _emotion = require("@instructure/emotion");
13
-
14
10
  var _testable = require("@instructure/ui-testable/lib/testable.js");
15
-
16
11
  var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
17
-
18
12
  var _styles = _interopRequireDefault(require("./styles"));
19
-
20
13
  var _theme = _interopRequireDefault(require("./theme"));
21
-
22
14
  var _props = require("./props");
23
-
24
15
  var _dec, _dec2, _class, _class2;
25
-
26
16
  /**
27
17
  ---
28
18
  parent: Menu
@@ -34,27 +24,20 @@ let MenuItemSeparator = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
34
24
  constructor() {
35
25
  super(...arguments);
36
26
  this.ref = null;
37
-
38
27
  this.handleRef = el => {
39
28
  this.ref = el;
40
29
  };
41
30
  }
42
-
43
31
  componentDidMount() {
44
32
  var _this$props$makeStyle, _this$props;
45
-
46
33
  (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
47
34
  }
48
-
49
35
  componentDidUpdate() {
50
36
  var _this$props$makeStyle2, _this$props2;
51
-
52
37
  (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
53
38
  }
54
-
55
39
  render() {
56
40
  var _this$props$styles;
57
-
58
41
  const props = (0, _omitProps.omitProps)(this.props, MenuItemSeparator.allowedProps);
59
42
  return (0, _emotion.jsx)("div", Object.assign({}, props, {
60
43
  role: "presentation",
@@ -62,7 +45,6 @@ let MenuItemSeparator = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
62
45
  ref: this.handleRef
63
46
  }));
64
47
  }
65
-
66
48
  }, _class2.displayName = "MenuItemSeparator", _class2.componentId = 'Menu.Separator', _class2.propTypes = _props.propTypes, _class2.allowedProps = _props.allowedProps, _class2)) || _class) || _class);
67
49
  exports.MenuItemSeparator = MenuItemSeparator;
68
50
  var _default = MenuItemSeparator;
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.propTypes = exports.allowedProps = void 0;
7
-
8
7
  /*
9
8
  * The MIT License (MIT)
10
9
  *
@@ -28,8 +27,10 @@ exports.propTypes = exports.allowedProps = void 0;
28
27
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
28
  * SOFTWARE.
30
29
  */
30
+
31
31
  // keeping here to keep the structure of props.ts
32
32
  // eslint-disable-next-line
33
+
33
34
  const propTypes = {};
34
35
  exports.propTypes = propTypes;
35
36
  const allowedProps = [];
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  /*
9
8
  * The MIT License (MIT)
10
9
  *
@@ -50,6 +49,5 @@ const generateStyle = componentTheme => {
50
49
  }
51
50
  };
52
51
  };
53
-
54
52
  var _default = generateStyle;
55
53
  exports.default = _default;
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  /*
9
8
  * The MIT License (MIT)
10
9
  *
@@ -36,16 +35,16 @@ exports.default = void 0;
36
35
  */
37
36
  const generateComponentTheme = theme => {
38
37
  const colors = theme.colors,
39
- spacing = theme.spacing,
40
- borders = theme.borders;
38
+ spacing = theme.spacing,
39
+ borders = theme.borders;
41
40
  const componentVariables = {
42
41
  background: colors === null || colors === void 0 ? void 0 : colors.backgroundMedium,
43
42
  height: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
44
43
  margin: `0 ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`
45
44
  };
46
- return { ...componentVariables
45
+ return {
46
+ ...componentVariables
47
47
  };
48
48
  };
49
-
50
49
  var _default = generateComponentTheme;
51
50
  exports.default = _default;
@@ -16,19 +16,12 @@ Object.defineProperty(exports, "MenuItemLocator", {
16
16
  }
17
17
  });
18
18
  exports.MenuLocator = void 0;
19
-
20
19
  var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
21
-
22
20
  var _uiTestQueries = require("@instructure/ui-test-queries");
23
-
24
21
  var _PopoverLocator = require("@instructure/ui-popover/lib/Popover/PopoverLocator");
25
-
26
22
  var _index = require("./index");
27
-
28
23
  var _MenuItemLocator = require("./MenuItem/MenuItemLocator");
29
-
30
24
  var _MenuItemGroupLocator = require("./MenuItemGroup/MenuItemGroupLocator");
31
-
32
25
  /*
33
26
  * The MIT License (MIT)
34
27
  *
@@ -52,8 +45,10 @@ var _MenuItemGroupLocator = require("./MenuItemGroup/MenuItemGroupLocator");
52
45
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53
46
  * SOFTWARE.
54
47
  */
48
+
55
49
  // @ts-expect-error ts-migrate(7016) FIXME: Could not find a declaration file for module '@ins... Remove this comment to see the full error message
56
50
  // eslint-disable-next-line no-restricted-imports
51
+
57
52
  const customMethods = {
58
53
  findAllItems: function () {
59
54
  return _MenuItemLocator.MenuItemLocator.findAll(...arguments);
@@ -72,17 +67,19 @@ const customMethods = {
72
67
  },
73
68
  findPopoverContent: function () {
74
69
  const _parseQueryArguments = (0, _uiTestQueries.parseQueryArguments)(...arguments),
75
- element = _parseQueryArguments.element,
76
- selector = _parseQueryArguments.selector,
77
- options = _parseQueryArguments.options;
78
-
79
- return _PopoverLocator.PopoverLocator.findContent(element, selector, { ...options,
80
- customMethods: { ...options.customMethods,
70
+ element = _parseQueryArguments.element,
71
+ selector = _parseQueryArguments.selector,
72
+ options = _parseQueryArguments.options;
73
+ return _PopoverLocator.PopoverLocator.findContent(element, selector, {
74
+ ...options,
75
+ customMethods: {
76
+ ...options.customMethods,
81
77
  ...customMethods
82
78
  }
83
79
  });
84
80
  }
85
- }; // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
81
+ };
86
82
 
83
+ // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
87
84
  const MenuLocator = (0, _locator.locator)(_index.Menu.selector, customMethods);
88
85
  exports.MenuLocator = MenuLocator;