@instructure/ui-top-nav-bar 8.38.2-snapshot-5 → 8.38.2-snapshot-7

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 (35) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/es/TopNavBar/TopNavBarActionItems/TopNavBarActionItemsLocator.js +7 -7
  3. package/es/TopNavBar/TopNavBarActionItems/index.js +3 -2
  4. package/es/TopNavBar/TopNavBarBrand/TopNavBarBrandLocator.js +4 -16
  5. package/es/TopNavBar/TopNavBarBrand/index.js +2 -2
  6. package/es/TopNavBar/TopNavBarItem/TopNavBarItemLocator.js +14 -26
  7. package/es/TopNavBar/TopNavBarLayout/DesktopLayout/TopNavBarDesktopLayoutLocator.js +13 -28
  8. package/es/TopNavBar/TopNavBarLayout/DesktopLayout/index.js +2 -2
  9. package/es/TopNavBar/TopNavBarLayout/SmallViewportLayout/TopNavBarSmallViewportLayoutLocator.js +18 -42
  10. package/es/TopNavBar/TopNavBarLayout/TopNavBarLayoutLocator.js +4 -4
  11. package/es/TopNavBar/TopNavBarLayout/index.js +2 -2
  12. package/es/TopNavBar/TopNavBarMenuItems/TopNavBarMenuItemsLocator.js +5 -8
  13. package/es/TopNavBar/TopNavBarMenuItems/index.js +3 -2
  14. package/es/TopNavBar/TopNavBarUser/index.js +2 -2
  15. package/es/TopNavBar/index.js +2 -2
  16. package/es/TopNavBar/utils/exampleHelpers.js +23 -34
  17. package/es/TopNavBar/utils/mapItemsForDrilldown.js +1 -2
  18. package/lib/TopNavBar/TopNavBarActionItems/TopNavBarActionItemsLocator.js +7 -7
  19. package/lib/TopNavBar/TopNavBarActionItems/index.js +3 -2
  20. package/lib/TopNavBar/TopNavBarBrand/TopNavBarBrandLocator.js +4 -16
  21. package/lib/TopNavBar/TopNavBarBrand/index.js +2 -2
  22. package/lib/TopNavBar/TopNavBarItem/TopNavBarItemLocator.js +14 -26
  23. package/lib/TopNavBar/TopNavBarLayout/DesktopLayout/TopNavBarDesktopLayoutLocator.js +13 -28
  24. package/lib/TopNavBar/TopNavBarLayout/DesktopLayout/index.js +2 -2
  25. package/lib/TopNavBar/TopNavBarLayout/SmallViewportLayout/TopNavBarSmallViewportLayoutLocator.js +18 -42
  26. package/lib/TopNavBar/TopNavBarLayout/TopNavBarLayoutLocator.js +4 -4
  27. package/lib/TopNavBar/TopNavBarLayout/index.js +2 -2
  28. package/lib/TopNavBar/TopNavBarMenuItems/TopNavBarMenuItemsLocator.js +5 -8
  29. package/lib/TopNavBar/TopNavBarMenuItems/index.js +3 -2
  30. package/lib/TopNavBar/TopNavBarUser/index.js +2 -2
  31. package/lib/TopNavBar/index.js +2 -2
  32. package/lib/TopNavBar/utils/exampleHelpers.js +23 -34
  33. package/lib/TopNavBar/utils/mapItemsForDrilldown.js +1 -2
  34. package/package.json +28 -28
  35. package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
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.38.2-snapshot-5](https://github.com/instructure/instructure-ui/compare/v8.38.1...v8.38.2-snapshot-5) (2023-07-14)
6
+ ## [8.38.2-snapshot-7](https://github.com/instructure/instructure-ui/compare/v8.38.1...v8.38.2-snapshot-7) (2023-07-21)
7
7
 
8
8
  **Note:** Version bump only for package @instructure/ui-top-nav-bar
9
9
 
@@ -34,16 +34,16 @@ import { TopNavBarActionItems } from './index';
34
34
  export const TopNavBarActionItemsLocator = locator(
35
35
  // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
36
36
  TopNavBarActionItems.selector, {
37
- findAllActionItems: function () {
38
- return TopNavBarItemLocator.findAll(...arguments);
37
+ findAllActionItems: (...args) => {
38
+ return TopNavBarItemLocator.findAll(...args);
39
39
  },
40
- findTruncateList: function () {
41
- return TruncateListLocator.find(...arguments);
40
+ findTruncateList: (...args) => {
41
+ return TruncateListLocator.find(...args);
42
42
  },
43
- findTruncateListTriggerItem: async function () {
44
- const truncateList = await TruncateListLocator.find(...arguments);
43
+ findTruncateListTriggerItem: async (...args) => {
44
+ const truncateList = await TruncateListLocator.find(...args);
45
45
  if (!truncateList) return void 0;
46
- const allItems = await TopNavBarItemLocator.findAll(...arguments);
46
+ const allItems = await TopNavBarItemLocator.findAll(...args);
47
47
  return allItems[allItems.length - 1];
48
48
  }
49
49
  });
@@ -156,8 +156,9 @@ let TopNavBarActionItems = (_dec = withDeterministicId(), _dec2 = withStyle(gene
156
156
  elementRef: this.handleRef,
157
157
  css: styles === null || styles === void 0 ? void 0 : styles.topNavBarActionItems,
158
158
  visibleItemsCount: this.state.visibleActionItemsCount,
159
- onUpdate: _ref => {
160
- let visibleItemsCount = _ref.visibleItemsCount;
159
+ onUpdate: ({
160
+ visibleItemsCount
161
+ }) => {
161
162
  this.setState({
162
163
  visibleActionItemsCount: visibleItemsCount
163
164
  });
@@ -28,28 +28,16 @@ import { TopNavBarBrand } from './index';
28
28
 
29
29
  // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
30
30
  export const TopNavBarBrandLocator = locator(TopNavBarBrand.selector, {
31
- findContainer: function () {
32
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
33
- args[_key] = arguments[_key];
34
- }
31
+ findContainer: (...args) => {
35
32
  return find('[class$="-topNavBarBrand__container"]', ...args);
36
33
  },
37
- findBrandNameContainer: function () {
38
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
39
- args[_key2] = arguments[_key2];
40
- }
34
+ findBrandNameContainer: (...args) => {
41
35
  return find('[class$="-topNavBarBrand__nameContainer"]', ...args);
42
36
  },
43
- findBrandIconContainer: function () {
44
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
45
- args[_key3] = arguments[_key3];
46
- }
37
+ findBrandIconContainer: (...args) => {
47
38
  return find('[class$="-topNavBarBrand__iconContainer"]', ...args);
48
39
  },
49
- findScreenReaderLabel: function () {
50
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
51
- args[_key4] = arguments[_key4];
52
- }
40
+ findScreenReaderLabel: (...args) => {
53
41
  return find('[class$="-screenReaderContent"]', ...args);
54
42
  }
55
43
  });
@@ -43,8 +43,8 @@ id: TopNavBar.Brand
43
43
  @tsProps
44
44
  **/
45
45
  let TopNavBarBrand = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class TopNavBarBrand extends Component {
46
- constructor() {
47
- super(...arguments);
46
+ constructor(...args) {
47
+ super(...args);
48
48
  this.ref = null;
49
49
  this.handleRef = el => {
50
50
  const elementRef = this.props.elementRef;
@@ -43,8 +43,8 @@ import { TopNavBarItem } from './index';
43
43
 
44
44
  // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
45
45
  export const TopNavBarItemLocator = locator(TopNavBarItem.selector, {
46
- findButton: function () {
47
- return BaseButtonLocator.find(...arguments);
46
+ findButton: (...args) => {
47
+ return BaseButtonLocator.find(...args);
48
48
  },
49
49
  getButtonBackground: async () => {
50
50
  const buttonContent = await find('[class$="-baseButton__content"]');
@@ -66,17 +66,14 @@ export const TopNavBarItemLocator = locator(TopNavBarItem.selector, {
66
66
  const container = await find('[class$="-topNavBarItem__container"]');
67
67
  return getComputedStyle(container.getDOMNode(), '::after');
68
68
  },
69
- findContent: function () {
70
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
71
- args[_key] = arguments[_key];
72
- }
69
+ findContent: (...args) => {
73
70
  return find('[class$="-topNavBarItem__content"]', ...args);
74
71
  },
75
- findSubmenu: function () {
76
- return DrilldownLocator.find(...arguments);
72
+ findSubmenu: (...args) => {
73
+ return DrilldownLocator.find(...args);
77
74
  },
78
- findCustomPopover: async function () {
79
- const popover = await PopoverLocator.find(...arguments);
75
+ findCustomPopover: async (...args) => {
76
+ const popover = await PopoverLocator.find(...args);
80
77
  if (popover) {
81
78
  const isDrilldown = popover.getAttribute('data-cid').includes('Drilldown');
82
79
  return isDrilldown ? null : popover;
@@ -84,28 +81,19 @@ export const TopNavBarItemLocator = locator(TopNavBarItem.selector, {
84
81
  return popover;
85
82
  }
86
83
  },
87
- findTooltip: function () {
88
- return TooltipLocator.find(...arguments);
84
+ findTooltip: (...args) => {
85
+ return TooltipLocator.find(...args);
89
86
  },
90
- findIcon: function () {
91
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
92
- args[_key2] = arguments[_key2];
93
- }
87
+ findIcon: (...args) => {
94
88
  return find('[class*="-baseButton__icon"] [class$="-svgIcon"]', ...args);
95
89
  },
96
- findSubmenuChevron: function () {
97
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
98
- args[_key3] = arguments[_key3];
99
- }
90
+ findSubmenuChevron: (...args) => {
100
91
  return find('[class$="-topNavBarItem__submenuIcon"] [class$="-svgIcon"]', ...args);
101
92
  },
102
- findAvatar: function () {
103
- return AvatarLocator.find(...arguments);
93
+ findAvatar: (...args) => {
94
+ return AvatarLocator.find(...args);
104
95
  },
105
- findScreenReaderLabel: function () {
106
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
107
- args[_key4] = arguments[_key4];
108
- }
96
+ findScreenReaderLabel: (...args) => {
109
97
  return find('[class$="-screenReaderContent"]', ...args);
110
98
  }
111
99
  });
@@ -33,47 +33,32 @@ import { TopNavBarDesktopLayout } from './index';
33
33
  export const TopNavBarDesktopLayoutLocator = locator(
34
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
35
35
  TopNavBarDesktopLayout.selector, {
36
- findBrandContainer: function () {
37
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
38
- args[_key] = arguments[_key];
39
- }
36
+ findBrandContainer: (...args) => {
40
37
  return find('[class$=-topNavBarDesktopLayout__brandContainer]', ...args);
41
38
  },
42
- findMenuItemsContainer: function () {
43
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
44
- args[_key2] = arguments[_key2];
45
- }
39
+ findMenuItemsContainer: (...args) => {
46
40
  return find('[class$=-topNavBarDesktopLayout__menuItemsContainer]', ...args);
47
41
  },
48
- findActionItemsContainer: function () {
49
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
50
- args[_key3] = arguments[_key3];
51
- }
42
+ findActionItemsContainer: (...args) => {
52
43
  return find('[class$=-topNavBarDesktopLayout__actionItemsContainer]', ...args);
53
44
  },
54
- findUserContainer: function () {
55
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
56
- args[_key4] = arguments[_key4];
57
- }
45
+ findUserContainer: (...args) => {
58
46
  return find('[class$=-topNavBarDesktopLayout__userContainer]', ...args);
59
47
  },
60
- findBrand: function () {
61
- return TopNavBarBrandLocator.find(...arguments);
48
+ findBrand: (...args) => {
49
+ return TopNavBarBrandLocator.find(...args);
62
50
  },
63
- findMenuItems: function () {
64
- return TopNavBarMenuItemsLocator.find(...arguments);
51
+ findMenuItems: (...args) => {
52
+ return TopNavBarMenuItemsLocator.find(...args);
65
53
  },
66
- findActionItems: function () {
67
- return TopNavBarActionItemsLocator.find(...arguments);
54
+ findActionItems: (...args) => {
55
+ return TopNavBarActionItemsLocator.find(...args);
68
56
  },
69
- findUser: function () {
70
- return TopNavBarUserLocator.find(...arguments);
57
+ findUser: (...args) => {
58
+ return TopNavBarUserLocator.find(...args);
71
59
  },
72
- getActionsUserSeparatorBackground: async function () {
60
+ getActionsUserSeparatorBackground: async (...args) => {
73
61
  try {
74
- for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
75
- args[_key5] = arguments[_key5];
76
- }
77
62
  const user = await find('[class$=-topNavBarDesktopLayout__userContainer]', ...args);
78
63
  return user ? getComputedStyle(user.getDOMNode(), '::before').backgroundColor : 'rgba(0, 0, 0, 0)';
79
64
  } catch {
@@ -39,8 +39,8 @@ private: true
39
39
  @tsProps
40
40
  **/
41
41
  let TopNavBarDesktopLayout = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class TopNavBarDesktopLayout extends Component {
42
- constructor() {
43
- super(...arguments);
42
+ constructor(...args) {
43
+ super(...args);
44
44
  this.ref = null;
45
45
  this.handleRef = el => {
46
46
  const elementRef = this.props.elementRef;
@@ -41,28 +41,16 @@ import { TopNavBarSmallViewportLayout } from './index';
41
41
  export const TopNavBarSmallViewportLayoutLocator = locator(
42
42
  // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
43
43
  TopNavBarSmallViewportLayout.selector, {
44
- findNavBar: function () {
45
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
46
- args[_key] = arguments[_key];
47
- }
44
+ findNavBar: (...args) => {
48
45
  return find('[class$=-topNavBarSmallViewportLayout__navbar]', ...args);
49
46
  },
50
- findDropdownMenuTriggerWrapper: function () {
51
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
52
- args[_key2] = arguments[_key2];
53
- }
47
+ findDropdownMenuTriggerWrapper: (...args) => {
54
48
  return find('[class*=-topNavBarSmallViewportLayout__menuTrigger]', ...args);
55
49
  },
56
- findAlternativeTitleContainer: function () {
57
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
58
- args[_key3] = arguments[_key3];
59
- }
50
+ findAlternativeTitleContainer: (...args) => {
60
51
  return find('[class*=-topNavBarSmallViewportLayout__alternativeTitleContainer]', ...args);
61
52
  },
62
- findDropdownMenuTriggerItem: async function () {
63
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
64
- args[_key4] = arguments[_key4];
65
- }
53
+ findDropdownMenuTriggerItem: async (...args) => {
66
54
  const triggerExists = await find('[id^=TopNavBarSmallViewportLayout-menuTrigger_]', ...args);
67
55
  if (triggerExists) {
68
56
  return TopNavBarItemLocator.find('[id^=TopNavBarSmallViewportLayout-menuTrigger_]');
@@ -70,10 +58,7 @@ TopNavBarSmallViewportLayout.selector, {
70
58
  return triggerExists;
71
59
  }
72
60
  },
73
- findDropdownMenuTriggerButton: async function () {
74
- for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
75
- args[_key5] = arguments[_key5];
76
- }
61
+ findDropdownMenuTriggerButton: async (...args) => {
77
62
  const triggerExists = await find('[id^=TopNavBarSmallViewportLayout-menuTrigger_]', ...args);
78
63
  if (triggerExists) {
79
64
  const menuItem = await TopNavBarItemLocator.find('[id^=TopNavBarSmallViewportLayout-menuTrigger_]');
@@ -82,37 +67,28 @@ TopNavBarSmallViewportLayout.selector, {
82
67
  return triggerExists;
83
68
  }
84
69
  },
85
- findBrandContainer: function () {
86
- for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
87
- args[_key6] = arguments[_key6];
88
- }
70
+ findBrandContainer: (...args) => {
89
71
  return find('[class$=-topNavBarSmallViewportLayout__brandContainer]', ...args);
90
72
  },
91
- findBrand: function () {
92
- return TopNavBarBrandLocator.find(...arguments);
73
+ findBrand: (...args) => {
74
+ return TopNavBarBrandLocator.find(...args);
93
75
  },
94
- findActionItems: function () {
95
- return TopNavBarActionItemsLocator.find(...arguments);
76
+ findActionItems: (...args) => {
77
+ return TopNavBarActionItemsLocator.find(...args);
96
78
  },
97
- findTruncateList: function () {
98
- return TruncateListLocator.find(...arguments);
79
+ findTruncateList: (...args) => {
80
+ return TruncateListLocator.find(...args);
99
81
  },
100
- findDropdownMenuTray: function () {
101
- return TrayLocator.find(...arguments);
82
+ findDropdownMenuTray: (...args) => {
83
+ return TrayLocator.find(...args);
102
84
  },
103
- findDropdownMenu: function () {
104
- return DrilldownLocator.find(...arguments);
85
+ findDropdownMenu: (...args) => {
86
+ return DrilldownLocator.find(...args);
105
87
  },
106
- findInPlaceDialog: function () {
107
- for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
108
- args[_key7] = arguments[_key7];
109
- }
88
+ findInPlaceDialog: (...args) => {
110
89
  return find('[class$=-topNavBarSmallViewportLayout__inPlaceDialogContainer]', ...args);
111
90
  },
112
- findInPlaceDialogCloseButton: function () {
113
- for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
114
- args[_key8] = arguments[_key8];
115
- }
91
+ findInPlaceDialogCloseButton: (...args) => {
116
92
  return find('[id^=TopNavBarSmallViewportLayout-inPlaceDialogCloseButton_]', ...args);
117
93
  }
118
94
  });
@@ -29,10 +29,10 @@ import { TopNavBarLayout } from './index';
29
29
 
30
30
  // TODO: this type seems to be too complex, try to fix it later
31
31
  export const TopNavBarLayoutLocator = locator(TopNavBarLayout.selector, {
32
- findDesktopLayout: function () {
33
- return TopNavBarDesktopLayoutLocator.find(...arguments);
32
+ findDesktopLayout: (...args) => {
33
+ return TopNavBarDesktopLayoutLocator.find(...args);
34
34
  },
35
- findSmallViewportLayout: function () {
36
- return TopNavBarSmallViewportLayoutLocator.find(...arguments);
35
+ findSmallViewportLayout: (...args) => {
36
+ return TopNavBarSmallViewportLayoutLocator.find(...args);
37
37
  }
38
38
  });
@@ -43,8 +43,8 @@ id: TopNavBar.Layout
43
43
  @tsProps
44
44
  **/
45
45
  let TopNavBarLayout = (_dec = withStyle(null, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class TopNavBarLayout extends Component {
46
- constructor() {
47
- super(...arguments);
46
+ constructor(...args) {
47
+ super(...args);
48
48
  this.ref = null;
49
49
  this.handleRef = el => {
50
50
  const elementRef = this.props.elementRef;
@@ -34,16 +34,13 @@ import { TopNavBarMenuItems } from './index';
34
34
 
35
35
  // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
36
36
  export const TopNavBarMenuItemsLocator = locator(TopNavBarMenuItems.selector, {
37
- findAllMenuItems: function () {
38
- return TopNavBarItemLocator.findAll(...arguments);
37
+ findAllMenuItems: (...args) => {
38
+ return TopNavBarItemLocator.findAll(...args);
39
39
  },
40
- findTruncateList: function () {
41
- return TruncateListLocator.find(...arguments);
40
+ findTruncateList: (...args) => {
41
+ return TruncateListLocator.find(...args);
42
42
  },
43
- findTruncateListTriggerItem: async function () {
44
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
45
- args[_key] = arguments[_key];
46
- }
43
+ findTruncateListTriggerItem: async (...args) => {
47
44
  const truncateList = await TruncateListLocator.find(...args);
48
45
  if (truncateList) {
49
46
  return TopNavBarItemLocator.find('[id^=TopNavBarMenuItems-hiddenMenuItemsMenuTrigger_]', ...args);
@@ -166,8 +166,9 @@ let TopNavBarMenuItems = (_dec = withDeterministicId(), _dec2 = withStyle(genera
166
166
  elementRef: this.handleRef,
167
167
  css: styles === null || styles === void 0 ? void 0 : styles.topNavBarMenuItems,
168
168
  visibleItemsCount: this.state.visibleItemsCount,
169
- onUpdate: _ref => {
170
- let visibleItemsCount = _ref.visibleItemsCount;
169
+ onUpdate: ({
170
+ visibleItemsCount
171
+ }) => {
171
172
  this.setState({
172
173
  visibleItemsCount
173
174
  });
@@ -41,8 +41,8 @@ id: TopNavBar.User
41
41
  @tsProps
42
42
  **/
43
43
  let TopNavBarUser = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class TopNavBarUser extends Component {
44
- constructor() {
45
- super(...arguments);
44
+ constructor(...args) {
45
+ super(...args);
46
46
  this.ref = null;
47
47
  this.handleRef = el => {
48
48
  const elementRef = this.props.elementRef;
@@ -44,8 +44,8 @@ category: components
44
44
  @tsProps
45
45
  **/
46
46
  let TopNavBar = (_dec = testable(), _dec(_class = (_class2 = class TopNavBar extends Component {
47
- constructor() {
48
- super(...arguments);
47
+ constructor(...args) {
48
+ super(...args);
49
49
  this.ref = null;
50
50
  this.handleRef = el => {
51
51
  const elementRef = this.props.elementRef;
@@ -46,36 +46,30 @@ const itemSubmenuExample = /*#__PURE__*/React.createElement(Drilldown, {
46
46
  id: "linkExampleOption3",
47
47
  href: "/#Three"
48
48
  }, "Link Three")));
49
- const getCustomPopoverConfig = function (inverseColor) {
50
- let extraProps = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
51
- return {
52
- children: getCustomPopoverContent(!inverseColor),
53
- color: inverseColor ? 'primary-inverse' : 'primary',
54
- isShowingContent: true,
55
- placement: 'bottom center',
56
- ...extraProps
57
- };
58
- };
49
+ const getCustomPopoverConfig = (inverseColor, extraProps = {}) => ({
50
+ children: getCustomPopoverContent(!inverseColor),
51
+ color: inverseColor ? 'primary-inverse' : 'primary',
52
+ isShowingContent: true,
53
+ placement: 'bottom center',
54
+ ...extraProps
55
+ });
59
56
  const getCustomPopoverContent = inverseColor => /*#__PURE__*/React.createElement("div", {
60
57
  style: {
61
58
  color: inverseColor ? 'black' : 'white',
62
59
  padding: '0 0.5rem'
63
60
  }
64
61
  }, "dialog content");
65
- const getInPlaceDialogConfig = function (inverseColor) {
66
- let extraProps = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
67
- return {
68
- open: true,
69
- onClose: () => {},
70
- closeButtonLabel: 'Close Search and return to Navigation',
71
- returnFocusElement: () => document.getElementById('Search'),
72
- shouldCloseOnEscape: true,
73
- shouldCloseOnDocumentClick: false,
74
- shouldContainFocus: false,
75
- content: () => getCustomPopoverContent(inverseColor),
76
- ...extraProps
77
- };
78
- };
62
+ const getInPlaceDialogConfig = (inverseColor, extraProps = {}) => ({
63
+ open: true,
64
+ onClose: () => {},
65
+ closeButtonLabel: 'Close Search and return to Navigation',
66
+ returnFocusElement: () => document.getElementById('Search'),
67
+ shouldCloseOnEscape: true,
68
+ shouldCloseOnDocumentClick: false,
69
+ shouldContainFocus: false,
70
+ content: () => getCustomPopoverContent(inverseColor),
71
+ ...extraProps
72
+ });
79
73
  const SmallViewportModeWrapper = props => {
80
74
  return /*#__PURE__*/React.createElement(TopNavBarContext.Provider, {
81
75
  value: {
@@ -88,8 +82,7 @@ SmallViewportModeWrapper.defaultProps = {
88
82
  layout: 'smallViewport',
89
83
  inverseColor: false
90
84
  };
91
- const getBrand = function () {
92
- let config = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
85
+ const getBrand = (config = {}) => {
93
86
  const logo = config.inverseColor ? elevateLogoInverse : elevateLogo;
94
87
  const nameBackground = !config.hasBrandNameBackground ? void 0 : config.inverseColor ? '#F5F5F5' : '#2D3B45';
95
88
  return /*#__PURE__*/React.createElement(TopNavBar.Brand, Object.assign({
@@ -101,8 +94,7 @@ const getBrand = function () {
101
94
  href: "/#TopNavBar"
102
95
  }, config.brandProps));
103
96
  };
104
- const getMenuItems = function () {
105
- let config = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
97
+ const getMenuItems = (config = {}) => {
106
98
  const items = config.menuItemsCustomIdList || ['Overview', 'Admin', 'Settings', 'Maps', 'Assessments', 'Community'];
107
99
  const count = typeof config.menuItemsCount !== 'undefined' ? config.menuItemsCount : 6;
108
100
  const itemsSubset = items.slice(0, count);
@@ -120,9 +112,8 @@ const getMenuItems = function () {
120
112
  }, itemProps), (itemProps === null || itemProps === void 0 ? void 0 : itemProps.children) || item);
121
113
  }));
122
114
  };
123
- const getActionItems = function () {
115
+ const getActionItems = (config = {}) => {
124
116
  var _config$actionItemsPr, _config$actionItemsPr2;
125
- let config = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
126
117
  const items = [{
127
118
  label: 'Search',
128
119
  icon: IconSearchLine
@@ -159,9 +150,8 @@ const getActionItems = function () {
159
150
  }, itemProps), (itemProps === null || itemProps === void 0 ? void 0 : itemProps.children) || item.label);
160
151
  }));
161
152
  };
162
- const getUser = function () {
153
+ const getUser = (config = {}) => {
163
154
  var _config$userProps, _config$userItemProps;
164
- let config = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
165
155
  return /*#__PURE__*/React.createElement(TopNavBar.User, config.userProps, config.userProps && 'children' in config.userProps ? (_config$userProps = config.userProps) === null || _config$userProps === void 0 ? void 0 : _config$userProps.children : /*#__PURE__*/React.createElement(TopNavBar.Item, Object.assign({
166
156
  id: config.userId || 'User',
167
157
  href: config.userWithSubmenu ? void 0 : '/#TopNavBar',
@@ -170,8 +160,7 @@ const getUser = function () {
170
160
  renderSubmenu: config.userWithSubmenu ? itemSubmenuExample : void 0
171
161
  }, config.userItemProps), ((_config$userItemProps = config.userItemProps) === null || _config$userItemProps === void 0 ? void 0 : _config$userItemProps.children) || (config.userVariant === 'button' ? 'Log In/Register' : 'User Name')));
172
162
  };
173
- const getLayoutProps = function (props) {
174
- let config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
163
+ const getLayoutProps = (props, config = {}) => {
175
164
  return {
176
165
  desktopConfig: {
177
166
  hideActionsUserSeparator: config.hideActionsUserSeparator
@@ -28,8 +28,7 @@ import { generateId } from '@instructure/ui-utils';
28
28
  import { matchComponentTypes, generateInstanceCounterMap } from '@instructure/ui-react-utils';
29
29
  import { Drilldown } from '@instructure/ui-drilldown';
30
30
  import { TopNavBarItem } from '../TopNavBarItem';
31
- const mapItemsForDrilldown = function (itemList) {
32
- let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
31
+ const mapItemsForDrilldown = (itemList, options = {}) => {
33
32
  const submenus = [];
34
33
  const currentPageId = options.currentPageId,
35
34
  renderOptionContent = options.renderOptionContent;
@@ -40,16 +40,16 @@ var _index = require("./index");
40
40
  const TopNavBarActionItemsLocator = (0, _locator.locator)(
41
41
  // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
42
42
  _index.TopNavBarActionItems.selector, {
43
- findAllActionItems: function () {
44
- return _TopNavBarItemLocator.TopNavBarItemLocator.findAll(...arguments);
43
+ findAllActionItems: (...args) => {
44
+ return _TopNavBarItemLocator.TopNavBarItemLocator.findAll(...args);
45
45
  },
46
- findTruncateList: function () {
47
- return _TruncateListLocator.TruncateListLocator.find(...arguments);
46
+ findTruncateList: (...args) => {
47
+ return _TruncateListLocator.TruncateListLocator.find(...args);
48
48
  },
49
- findTruncateListTriggerItem: async function () {
50
- const truncateList = await _TruncateListLocator.TruncateListLocator.find(...arguments);
49
+ findTruncateListTriggerItem: async (...args) => {
50
+ const truncateList = await _TruncateListLocator.TruncateListLocator.find(...args);
51
51
  if (!truncateList) return void 0;
52
- const allItems = await _TopNavBarItemLocator.TopNavBarItemLocator.findAll(...arguments);
52
+ const allItems = await _TopNavBarItemLocator.TopNavBarItemLocator.findAll(...args);
53
53
  return allItems[allItems.length - 1];
54
54
  }
55
55
  });
@@ -166,8 +166,9 @@ let TopNavBarActionItems = (_dec = (0, _withDeterministicId.withDeterministicId)
166
166
  elementRef: this.handleRef,
167
167
  css: styles === null || styles === void 0 ? void 0 : styles.topNavBarActionItems,
168
168
  visibleItemsCount: this.state.visibleActionItemsCount,
169
- onUpdate: _ref => {
170
- let visibleItemsCount = _ref.visibleItemsCount;
169
+ onUpdate: ({
170
+ visibleItemsCount
171
+ }) => {
171
172
  this.setState({
172
173
  visibleActionItemsCount: visibleItemsCount
173
174
  });
@@ -33,28 +33,16 @@ var _index = require("./index");
33
33
 
34
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
35
35
  const TopNavBarBrandLocator = (0, _locator.locator)(_index.TopNavBarBrand.selector, {
36
- findContainer: function () {
37
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
38
- args[_key] = arguments[_key];
39
- }
36
+ findContainer: (...args) => {
40
37
  return (0, _uiTestUtils.find)('[class$="-topNavBarBrand__container"]', ...args);
41
38
  },
42
- findBrandNameContainer: function () {
43
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
44
- args[_key2] = arguments[_key2];
45
- }
39
+ findBrandNameContainer: (...args) => {
46
40
  return (0, _uiTestUtils.find)('[class$="-topNavBarBrand__nameContainer"]', ...args);
47
41
  },
48
- findBrandIconContainer: function () {
49
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
50
- args[_key3] = arguments[_key3];
51
- }
42
+ findBrandIconContainer: (...args) => {
52
43
  return (0, _uiTestUtils.find)('[class$="-topNavBarBrand__iconContainer"]', ...args);
53
44
  },
54
- findScreenReaderLabel: function () {
55
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
56
- args[_key4] = arguments[_key4];
57
- }
45
+ findScreenReaderLabel: (...args) => {
58
46
  return (0, _uiTestUtils.find)('[class$="-screenReaderContent"]', ...args);
59
47
  }
60
48
  });
@@ -51,8 +51,8 @@ id: TopNavBar.Brand
51
51
  @tsProps
52
52
  **/
53
53
  let TopNavBarBrand = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class TopNavBarBrand extends _react.Component {
54
- constructor() {
55
- super(...arguments);
54
+ constructor(...args) {
55
+ super(...args);
56
56
  this.ref = null;
57
57
  this.handleRef = el => {
58
58
  const elementRef = this.props.elementRef;