@instructure/ui-top-nav-bar 10.26.1 → 11.0.1-snapshot-0
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 +30 -1
- package/es/TopNavBar/TopNavBarActionItems/index.js +5 -5
- package/es/TopNavBar/TopNavBarActionItems/props.js +1 -12
- package/es/TopNavBar/TopNavBarBrand/index.js +5 -5
- package/es/TopNavBar/TopNavBarBrand/props.js +1 -11
- package/es/TopNavBar/TopNavBarBreadcrumb/index.js +6 -5
- package/es/TopNavBar/TopNavBarBreadcrumb/props.js +1 -9
- package/es/TopNavBar/TopNavBarItem/index.js +6 -6
- package/es/TopNavBar/TopNavBarItem/props.js +1 -44
- package/es/TopNavBar/TopNavBarLayout/DesktopLayout/index.js +5 -5
- package/es/TopNavBar/TopNavBarLayout/DesktopLayout/props.js +2 -7
- package/es/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.js +5 -5
- package/es/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.js +2 -7
- package/es/TopNavBar/TopNavBarLayout/index.js +5 -6
- package/es/TopNavBar/TopNavBarLayout/props.js +1 -45
- package/es/TopNavBar/TopNavBarMenuItems/index.js +8 -7
- package/es/TopNavBar/TopNavBarMenuItems/props.js +1 -11
- package/es/TopNavBar/TopNavBarUser/index.js +5 -5
- package/es/TopNavBar/TopNavBarUser/props.js +1 -8
- package/es/TopNavBar/index.js +18 -6
- package/es/TopNavBar/props.js +1 -9
- package/es/TopNavBar/utils/mapItemsForDrilldown.js +2 -1
- package/lib/TopNavBar/TopNavBarActionItems/index.js +4 -4
- package/lib/TopNavBar/TopNavBarActionItems/props.js +1 -13
- package/lib/TopNavBar/TopNavBarBrand/index.js +4 -4
- package/lib/TopNavBar/TopNavBarBrand/props.js +1 -12
- package/lib/TopNavBar/TopNavBarBreadcrumb/index.js +5 -4
- package/lib/TopNavBar/TopNavBarBreadcrumb/props.js +1 -10
- package/lib/TopNavBar/TopNavBarItem/index.js +5 -5
- package/lib/TopNavBar/TopNavBarItem/props.js +1 -45
- package/lib/TopNavBar/TopNavBarLayout/DesktopLayout/index.js +4 -4
- package/lib/TopNavBar/TopNavBarLayout/DesktopLayout/props.js +1 -6
- package/lib/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.js +4 -4
- package/lib/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.js +1 -6
- package/lib/TopNavBar/TopNavBarLayout/index.js +4 -5
- package/lib/TopNavBar/TopNavBarLayout/props.js +1 -47
- package/lib/TopNavBar/TopNavBarMenuItems/index.js +7 -6
- package/lib/TopNavBar/TopNavBarMenuItems/props.js +1 -12
- package/lib/TopNavBar/TopNavBarUser/index.js +4 -4
- package/lib/TopNavBar/TopNavBarUser/props.js +1 -9
- package/lib/TopNavBar/index.js +19 -5
- package/lib/TopNavBar/props.js +1 -10
- package/lib/TopNavBar/utils/mapItemsForDrilldown.js +2 -1
- package/package.json +28 -31
- package/src/TopNavBar/TopNavBarActionItems/index.tsx +2 -8
- package/src/TopNavBar/TopNavBarActionItems/props.ts +1 -22
- package/src/TopNavBar/TopNavBarBrand/index.tsx +6 -5
- package/src/TopNavBar/TopNavBarBrand/props.ts +1 -16
- package/src/TopNavBar/TopNavBarBreadcrumb/index.tsx +13 -9
- package/src/TopNavBar/TopNavBarBreadcrumb/props.ts +3 -15
- package/src/TopNavBar/TopNavBarItem/index.tsx +6 -5
- package/src/TopNavBar/TopNavBarItem/props.ts +1 -51
- package/src/TopNavBar/TopNavBarLayout/DesktopLayout/index.tsx +2 -4
- package/src/TopNavBar/TopNavBarLayout/DesktopLayout/props.ts +3 -19
- package/src/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.tsx +2 -4
- package/src/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.ts +3 -18
- package/src/TopNavBar/TopNavBarLayout/index.tsx +1 -5
- package/src/TopNavBar/TopNavBarLayout/props.ts +1 -60
- package/src/TopNavBar/TopNavBarMenuItems/index.tsx +10 -5
- package/src/TopNavBar/TopNavBarMenuItems/props.ts +1 -19
- package/src/TopNavBar/TopNavBarUser/index.tsx +2 -4
- package/src/TopNavBar/TopNavBarUser/props.ts +1 -14
- package/src/TopNavBar/index.tsx +2 -4
- package/src/TopNavBar/props.ts +2 -17
- package/src/TopNavBar/utils/mapItemsForDrilldown.tsx +1 -1
- package/tsconfig.build.json +1 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/TopNavBar/TopNavBarActionItems/index.d.ts +0 -1
- package/types/TopNavBar/TopNavBarActionItems/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarActionItems/props.d.ts +2 -3
- package/types/TopNavBar/TopNavBarActionItems/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarBrand/index.d.ts +0 -1
- package/types/TopNavBar/TopNavBarBrand/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarBrand/props.d.ts +2 -3
- package/types/TopNavBar/TopNavBarBrand/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarBreadcrumb/index.d.ts +0 -5
- package/types/TopNavBar/TopNavBarBreadcrumb/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarBreadcrumb/props.d.ts +2 -3
- package/types/TopNavBar/TopNavBarBreadcrumb/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarItem/index.d.ts +0 -1
- package/types/TopNavBar/TopNavBarItem/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarItem/props.d.ts +2 -13
- package/types/TopNavBar/TopNavBarItem/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarLayout/DesktopLayout/index.d.ts +0 -1
- package/types/TopNavBar/TopNavBarLayout/DesktopLayout/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarLayout/DesktopLayout/props.d.ts +2 -3
- package/types/TopNavBar/TopNavBarLayout/DesktopLayout/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.d.ts +0 -1
- package/types/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.d.ts +2 -3
- package/types/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarLayout/index.d.ts +0 -1
- package/types/TopNavBar/TopNavBarLayout/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarLayout/props.d.ts +2 -6
- package/types/TopNavBar/TopNavBarLayout/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarMenuItems/index.d.ts +0 -1
- package/types/TopNavBar/TopNavBarMenuItems/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarMenuItems/props.d.ts +2 -3
- package/types/TopNavBar/TopNavBarMenuItems/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarUser/index.d.ts +0 -1
- package/types/TopNavBar/TopNavBarUser/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarUser/props.d.ts +2 -3
- package/types/TopNavBar/TopNavBarUser/props.d.ts.map +1 -1
- package/types/TopNavBar/index.d.ts +0 -1
- package/types/TopNavBar/index.d.ts.map +1 -1
- package/types/TopNavBar/props.d.ts +2 -3
- package/types/TopNavBar/props.d.ts.map +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
|
-
## [
|
|
6
|
+
## [11.0.1-snapshot-0](https://github.com/instructure/instructure-ui/compare/v11.0.0...v11.0.1-snapshot-0) (2025-10-07)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-top-nav-bar
|
|
9
9
|
|
|
@@ -11,6 +11,35 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
# [11.0.0](https://github.com/instructure/instructure-ui/compare/v10.26.0...v11.0.0) (2025-10-06)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **many:** instUI v11 release ([36f5438](https://github.com/instructure/instructure-ui/commit/36f54382669186227ba24798bbf7201ef2f5cd4c))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### BREAKING CHANGES
|
|
23
|
+
|
|
24
|
+
* **many:** InstUI v11 contains the following breaking changes:
|
|
25
|
+
- React 16 and 17 are no longer supported
|
|
26
|
+
- remove `PropTypes` from all packages
|
|
27
|
+
- remove `CodeEditor` component
|
|
28
|
+
- remove `@instui/theme-registry` package
|
|
29
|
+
- remove `@testable`, `@experimental`, `@hack` decorators
|
|
30
|
+
- InstUISettingsProvider's `as` prop is removed
|
|
31
|
+
- `canvas.use()`, `canvasHighContrast.use()` functions are removed
|
|
32
|
+
- `canvasThemeLocal`, `canvasHighContrastThemeLocal` are removed
|
|
33
|
+
- `variables` field on theme objects are removed
|
|
34
|
+
- remove deprecated props from Table: Row's `isStacked`, Body's
|
|
35
|
+
`isStacked`, `hover`, and `headers`
|
|
36
|
+
- `Table`'s `caption` prop is now required
|
|
37
|
+
- `ui-dom-utils`'s `getComputedStyle` can now return `undefined`
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
14
43
|
# [10.26.0](https://github.com/instructure/instructure-ui/compare/v10.25.0...v10.26.0) (2025-10-01)
|
|
15
44
|
|
|
16
45
|
**Note:** Version bump only for package @instructure/ui-top-nav-bar
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec, _dec2,
|
|
1
|
+
var _dec, _dec2, _class, _TopNavBarActionItems;
|
|
2
2
|
/*
|
|
3
3
|
* The MIT License (MIT)
|
|
4
4
|
*
|
|
@@ -25,7 +25,6 @@ var _dec, _dec2, _dec3, _class, _TopNavBarActionItems;
|
|
|
25
25
|
|
|
26
26
|
import { Children, Component } from 'react';
|
|
27
27
|
import { omitProps, passthroughProps, safeCloneElement, withDeterministicId } from '@instructure/ui-react-utils';
|
|
28
|
-
import { testable } from '@instructure/ui-testable';
|
|
29
28
|
import { warn, error } from '@instructure/console';
|
|
30
29
|
import { withStyle } from '@instructure/emotion';
|
|
31
30
|
import { Drilldown } from '@instructure/ui-drilldown';
|
|
@@ -36,7 +35,7 @@ import { mapItemsForDrilldown, renderMappedItemDrilldownSubpages, renderMappedIt
|
|
|
36
35
|
import { TopNavBarContext } from '../TopNavBarContext';
|
|
37
36
|
import generateStyle from './styles';
|
|
38
37
|
import generateComponentTheme from './theme';
|
|
39
|
-
import {
|
|
38
|
+
import { allowedProps } from './props';
|
|
40
39
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
41
40
|
import { createElement as _createElement } from "@emotion/react";
|
|
42
41
|
/**
|
|
@@ -46,7 +45,7 @@ id: TopNavBar.ActionItems
|
|
|
46
45
|
---
|
|
47
46
|
@module TopNavBarActionItems
|
|
48
47
|
**/
|
|
49
|
-
let TopNavBarActionItems = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme),
|
|
48
|
+
let TopNavBarActionItems = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = (_TopNavBarActionItems = class TopNavBarActionItems extends Component {
|
|
50
49
|
constructor(props) {
|
|
51
50
|
super(props);
|
|
52
51
|
this.ref = null;
|
|
@@ -187,12 +186,13 @@ let TopNavBarActionItems = (_dec = withDeterministicId(), _dec2 = withStyle(gene
|
|
|
187
186
|
ref: this.handleRef,
|
|
188
187
|
css: styles === null || styles === void 0 ? void 0 : styles.topNavBarActionItems,
|
|
189
188
|
"aria-label": listLabel,
|
|
189
|
+
"data-cid": "TopNavBarActionItems",
|
|
190
190
|
children: this.childrenArray.map(item => _jsx("li", {
|
|
191
191
|
css: styles === null || styles === void 0 ? void 0 : styles.listItem,
|
|
192
192
|
children: item
|
|
193
193
|
}, item.props.id))
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
|
-
}, _TopNavBarActionItems.displayName = "TopNavBarActionItems", _TopNavBarActionItems.componentId = 'TopNavBar.ActionItems', _TopNavBarActionItems.
|
|
196
|
+
}, _TopNavBarActionItems.displayName = "TopNavBarActionItems", _TopNavBarActionItems.componentId = 'TopNavBar.ActionItems', _TopNavBarActionItems.allowedProps = allowedProps, _TopNavBarActionItems.defaultProps = {}, _TopNavBarActionItems.contextType = TopNavBarContext, _TopNavBarActionItems)) || _class) || _class);
|
|
197
197
|
export { TopNavBarActionItems };
|
|
198
198
|
export default TopNavBarActionItems;
|
|
@@ -22,16 +22,5 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import PropTypes from 'prop-types';
|
|
26
|
-
import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types';
|
|
27
|
-
import { TopNavBarItem } from '../TopNavBarItem';
|
|
28
|
-
import { topNavBarItemTooltipPropType } from '../TopNavBarItem/props';
|
|
29
|
-
const propTypes = {
|
|
30
|
-
children: ChildrenPropTypes.oneOf([TopNavBarItem]),
|
|
31
|
-
listLabel: PropTypes.string,
|
|
32
|
-
renderHiddenItemsMenuTriggerLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired,
|
|
33
|
-
renderHiddenItemsMenuTriggerTooltip: PropTypes.oneOfType([topNavBarItemTooltipPropType, PropTypes.func]),
|
|
34
|
-
elementRef: PropTypes.func
|
|
35
|
-
};
|
|
36
25
|
const allowedProps = ['children', 'listLabel', 'renderHiddenItemsMenuTriggerLabel', 'renderHiddenItemsMenuTriggerTooltip', 'elementRef'];
|
|
37
|
-
export {
|
|
26
|
+
export { allowedProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec,
|
|
1
|
+
var _dec, _class, _TopNavBarBrand;
|
|
2
2
|
/*
|
|
3
3
|
* The MIT License (MIT)
|
|
4
4
|
*
|
|
@@ -25,14 +25,13 @@ var _dec, _dec2, _class, _TopNavBarBrand;
|
|
|
25
25
|
|
|
26
26
|
import { Component } from 'react';
|
|
27
27
|
import { getElementType, omitProps } from '@instructure/ui-react-utils';
|
|
28
|
-
import { testable } from '@instructure/ui-testable';
|
|
29
28
|
import { withStyle } from '@instructure/emotion';
|
|
30
29
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
31
30
|
import { View } from '@instructure/ui-view';
|
|
32
31
|
import { TopNavBarContext } from '../TopNavBarContext';
|
|
33
32
|
import generateStyle from './styles';
|
|
34
33
|
import generateComponentTheme from './theme';
|
|
35
|
-
import {
|
|
34
|
+
import { allowedProps } from './props';
|
|
36
35
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
37
36
|
/**
|
|
38
37
|
---
|
|
@@ -41,7 +40,7 @@ id: TopNavBar.Brand
|
|
|
41
40
|
---
|
|
42
41
|
@module TopNavBarBrand
|
|
43
42
|
**/
|
|
44
|
-
let TopNavBarBrand = (_dec = withStyle(generateStyle, generateComponentTheme),
|
|
43
|
+
let TopNavBarBrand = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_TopNavBarBrand = class TopNavBarBrand extends Component {
|
|
45
44
|
constructor(...args) {
|
|
46
45
|
super(...args);
|
|
47
46
|
this.ref = null;
|
|
@@ -82,6 +81,7 @@ let TopNavBarBrand = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
82
81
|
return _jsx("div", {
|
|
83
82
|
ref: this.handleRef,
|
|
84
83
|
css: styles === null || styles === void 0 ? void 0 : styles.topNavBarBrand,
|
|
84
|
+
"data-cid": "TopNavBarBrand",
|
|
85
85
|
children: renderIcon && _jsxs(View, {
|
|
86
86
|
...omitProps(this.props, allowedProps),
|
|
87
87
|
css: styles === null || styles === void 0 ? void 0 : styles.container,
|
|
@@ -106,6 +106,6 @@ let TopNavBarBrand = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
106
106
|
})
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
}, _TopNavBarBrand.displayName = "TopNavBarBrand", _TopNavBarBrand.componentId = 'TopNavBar.Brand', _TopNavBarBrand.
|
|
109
|
+
}, _TopNavBarBrand.displayName = "TopNavBarBrand", _TopNavBarBrand.componentId = 'TopNavBar.Brand', _TopNavBarBrand.allowedProps = allowedProps, _TopNavBarBrand.defaultProps = {}, _TopNavBarBrand.contextType = TopNavBarContext, _TopNavBarBrand)) || _class);
|
|
110
110
|
export { TopNavBarBrand };
|
|
111
111
|
export default TopNavBarBrand;
|
|
@@ -22,15 +22,5 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import PropTypes from 'prop-types';
|
|
26
|
-
const propTypes = {
|
|
27
|
-
screenReaderLabel: PropTypes.string.isRequired,
|
|
28
|
-
renderIcon: PropTypes.node,
|
|
29
|
-
iconBackground: PropTypes.string,
|
|
30
|
-
href: PropTypes.string,
|
|
31
|
-
onClick: PropTypes.func,
|
|
32
|
-
as: PropTypes.elementType,
|
|
33
|
-
elementRef: PropTypes.func
|
|
34
|
-
};
|
|
35
25
|
const allowedProps = ['screenReaderLabel', 'renderIcon', 'iconBackground', 'href', 'onClick', 'as', 'elementRef'];
|
|
36
|
-
export {
|
|
26
|
+
export { allowedProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec,
|
|
1
|
+
var _dec, _class, _TopNavBarBreadcrumb, _IconHamburgerLine;
|
|
2
2
|
/*
|
|
3
3
|
* The MIT License (MIT)
|
|
4
4
|
*
|
|
@@ -24,11 +24,10 @@ var _dec, _dec2, _class, _TopNavBarBreadcrumb, _IconHamburgerLine;
|
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
import { Children, Component } from 'react';
|
|
27
|
-
import { allowedProps
|
|
27
|
+
import { allowedProps } from './props';
|
|
28
28
|
import TopNavBar from '../index';
|
|
29
29
|
import { withStyle } from '@instructure/emotion';
|
|
30
30
|
import generateStyle from '../TopNavBarBreadcrumb/styles';
|
|
31
|
-
import { testable } from '@instructure/ui-testable';
|
|
32
31
|
import { IconArrowOpenStartLine, IconHamburgerLine } from '@instructure/ui-icons';
|
|
33
32
|
import TopNavBarContext from '../TopNavBarContext';
|
|
34
33
|
import { error } from '@instructure/console';
|
|
@@ -42,7 +41,7 @@ id: TopNavBar.Breadcrumb
|
|
|
42
41
|
@module TopNavBarBreadcrumb
|
|
43
42
|
**/
|
|
44
43
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
45
|
-
let TopNavBarBreadcrumb = (_dec = withStyle(generateStyle, null),
|
|
44
|
+
let TopNavBarBreadcrumb = (_dec = withStyle(generateStyle, null), _dec(_class = (_TopNavBarBreadcrumb = class TopNavBarBreadcrumb extends Component {
|
|
46
45
|
constructor(...args) {
|
|
47
46
|
super(...args);
|
|
48
47
|
this.ref = null;
|
|
@@ -93,6 +92,7 @@ let TopNavBarBreadcrumb = (_dec = withStyle(generateStyle, null), _dec2 = testab
|
|
|
93
92
|
return this.context.inverseColor && (this.context.layout === 'desktop' ? _jsxs("div", {
|
|
94
93
|
ref: this.handleRef,
|
|
95
94
|
css: styles === null || styles === void 0 ? void 0 : styles.topNavBarBreadcrumb,
|
|
95
|
+
"data-cid": "TopNavBarBreadcrumb",
|
|
96
96
|
children: [_jsx("div", {
|
|
97
97
|
css: styles === null || styles === void 0 ? void 0 : styles.iconContainer,
|
|
98
98
|
children: this.renderMenu()
|
|
@@ -103,6 +103,7 @@ let TopNavBarBreadcrumb = (_dec = withStyle(generateStyle, null), _dec2 = testab
|
|
|
103
103
|
}) : _jsx("div", {
|
|
104
104
|
ref: this.handleRef,
|
|
105
105
|
css: styles === null || styles === void 0 ? void 0 : styles.topNavBarBreadcrumb,
|
|
106
|
+
"data-cid": "TopNavBarBreadcrumb",
|
|
106
107
|
children: _jsx("div", {
|
|
107
108
|
css: styles === null || styles === void 0 ? void 0 : styles.linkContainer,
|
|
108
109
|
children: lastButOneLink && _jsx(Link, {
|
|
@@ -114,6 +115,6 @@ let TopNavBarBreadcrumb = (_dec = withStyle(generateStyle, null), _dec2 = testab
|
|
|
114
115
|
})
|
|
115
116
|
}));
|
|
116
117
|
}
|
|
117
|
-
}, _TopNavBarBreadcrumb.displayName = "TopNavBarBreadcrumb", _TopNavBarBreadcrumb.
|
|
118
|
+
}, _TopNavBarBreadcrumb.displayName = "TopNavBarBreadcrumb", _TopNavBarBreadcrumb.allowedProps = allowedProps, _TopNavBarBreadcrumb.defaultProps = {}, _TopNavBarBreadcrumb.contextType = TopNavBarContext, _TopNavBarBreadcrumb)) || _class);
|
|
118
119
|
export { TopNavBarBreadcrumb };
|
|
119
120
|
export default TopNavBarBreadcrumb;
|
|
@@ -22,13 +22,5 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types';
|
|
26
|
-
import PropTypes from 'prop-types';
|
|
27
|
-
import { Breadcrumb } from '@instructure/ui-breadcrumb';
|
|
28
|
-
const propTypes = {
|
|
29
|
-
onClick: PropTypes.func,
|
|
30
|
-
elementRef: PropTypes.func,
|
|
31
|
-
children: ChildrenPropTypes.oneOf([Breadcrumb])
|
|
32
|
-
};
|
|
33
25
|
const allowedProps = ['children', 'onClick', 'elementRef'];
|
|
34
|
-
export {
|
|
26
|
+
export { allowedProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec, _dec2,
|
|
1
|
+
var _dec, _dec2, _class, _TopNavBarItem, _IconArrowOpenUpSolid, _IconArrowOpenDownSol;
|
|
2
2
|
/*
|
|
3
3
|
* The MIT License (MIT)
|
|
4
4
|
*
|
|
@@ -26,7 +26,6 @@ var _dec, _dec2, _dec3, _class, _TopNavBarItem, _IconArrowOpenUpSolid, _IconArro
|
|
|
26
26
|
import { Component } from 'react';
|
|
27
27
|
import { callRenderProp, matchComponentTypes, omitProps, passthroughProps, safeCloneElement, withDeterministicId } from '@instructure/ui-react-utils';
|
|
28
28
|
import { createChainedFunction } from '@instructure/ui-utils';
|
|
29
|
-
import { testable } from '@instructure/ui-testable';
|
|
30
29
|
import { warn, error } from '@instructure/console';
|
|
31
30
|
import { withStyle, InstUISettingsProvider } from '@instructure/emotion';
|
|
32
31
|
import { IconArrowOpenDownSolid, IconArrowOpenUpSolid } from '@instructure/ui-icons';
|
|
@@ -39,7 +38,7 @@ import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
|
39
38
|
import { TopNavBarContext } from '../TopNavBarContext';
|
|
40
39
|
import generateStyle from './styles';
|
|
41
40
|
import generateComponentTheme from './theme';
|
|
42
|
-
import {
|
|
41
|
+
import { allowedProps } from './props';
|
|
43
42
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
44
43
|
const navbarStackingDefault = 10000;
|
|
45
44
|
const submenuStacking = navbarStackingDefault + 1;
|
|
@@ -52,7 +51,7 @@ id: TopNavBar.Item
|
|
|
52
51
|
---
|
|
53
52
|
@module TopNavBarItem
|
|
54
53
|
**/
|
|
55
|
-
let TopNavBarItem = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme),
|
|
54
|
+
let TopNavBarItem = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = (_TopNavBarItem = class TopNavBarItem extends Component {
|
|
56
55
|
constructor(props) {
|
|
57
56
|
super(props);
|
|
58
57
|
this.ref = null;
|
|
@@ -566,14 +565,15 @@ let TopNavBarItem = (_dec = withDeterministicId(), _dec2 = withStyle(generateSty
|
|
|
566
565
|
return _jsx("div", {
|
|
567
566
|
ref: this.handleRef,
|
|
568
567
|
css: styles === null || styles === void 0 ? void 0 : styles.topNavBarItem,
|
|
568
|
+
"data-cid": "TopNavBarItem",
|
|
569
569
|
children: content
|
|
570
570
|
});
|
|
571
571
|
}
|
|
572
|
-
}, _TopNavBarItem.displayName = "TopNavBarItem", _TopNavBarItem.componentId = 'TopNavBar.Item', _TopNavBarItem.
|
|
572
|
+
}, _TopNavBarItem.displayName = "TopNavBarItem", _TopNavBarItem.componentId = 'TopNavBar.Item', _TopNavBarItem.allowedProps = allowedProps, _TopNavBarItem.defaultProps = {
|
|
573
573
|
status: 'default',
|
|
574
574
|
variant: 'default',
|
|
575
575
|
showSubmenuChevron: true,
|
|
576
576
|
shouldCloseOnClick: 'auto'
|
|
577
|
-
}, _TopNavBarItem.contextType = TopNavBarContext, _TopNavBarItem)) || _class) || _class)
|
|
577
|
+
}, _TopNavBarItem.contextType = TopNavBarContext, _TopNavBarItem)) || _class) || _class);
|
|
578
578
|
export { TopNavBarItem };
|
|
579
579
|
export default TopNavBarItem;
|
|
@@ -22,48 +22,5 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import PropTypes from 'prop-types';
|
|
26
|
-
import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types';
|
|
27
|
-
import { Drilldown } from '@instructure/ui-drilldown';
|
|
28
|
-
const topNavBarItemTooltipPropType = PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
|
|
29
|
-
renderTip: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
|
|
30
|
-
color: PropTypes.oneOf(['primary', 'primary-inverse']),
|
|
31
|
-
placement: PropTypes.string,
|
|
32
|
-
offsetX: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
33
|
-
offsetY: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
34
|
-
onShowContent: PropTypes.func,
|
|
35
|
-
onHideContent: PropTypes.func
|
|
36
|
-
})]);
|
|
37
|
-
const propTypes = {
|
|
38
|
-
id: PropTypes.string.isRequired,
|
|
39
|
-
as: PropTypes.elementType,
|
|
40
|
-
children: PropTypes.node.isRequired,
|
|
41
|
-
variant: PropTypes.oneOf(['default', 'button', 'icon', 'avatar']),
|
|
42
|
-
status: PropTypes.oneOf(['default', 'active', 'disabled']),
|
|
43
|
-
renderSubmenu: ChildrenPropTypes.oneOf([Drilldown]),
|
|
44
|
-
showSubmenuChevron: PropTypes.bool,
|
|
45
|
-
customPopoverConfig: PropTypes.object,
|
|
46
|
-
tooltip: topNavBarItemTooltipPropType,
|
|
47
|
-
renderAvatar: PropTypes.shape({
|
|
48
|
-
avatarName: PropTypes.string.isRequired,
|
|
49
|
-
avatarSrc: PropTypes.string,
|
|
50
|
-
avatarAlt: PropTypes.string
|
|
51
|
-
}),
|
|
52
|
-
renderIcon: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
53
|
-
href: PropTypes.string,
|
|
54
|
-
onClick: PropTypes.func,
|
|
55
|
-
onHiddenClick: PropTypes.func,
|
|
56
|
-
onSubmenuToggle: PropTypes.func,
|
|
57
|
-
onMouseOver: PropTypes.func,
|
|
58
|
-
onMouseOut: PropTypes.func,
|
|
59
|
-
onFocus: PropTypes.func,
|
|
60
|
-
onBlur: PropTypes.func,
|
|
61
|
-
onKeyDown: PropTypes.func,
|
|
62
|
-
onKeyUp: PropTypes.func,
|
|
63
|
-
elementRef: PropTypes.func,
|
|
64
|
-
itemRef: PropTypes.func,
|
|
65
|
-
shouldCloseOnClick: PropTypes.oneOf(['auto', 'always', 'never']),
|
|
66
|
-
withFocusOutline: PropTypes.bool
|
|
67
|
-
};
|
|
68
25
|
const allowedProps = ['id', 'as', 'children', 'variant', 'status', 'renderSubmenu', 'showSubmenuChevron', 'customPopoverConfig', 'tooltip', 'renderAvatar', 'renderIcon', 'href', 'onClick', 'onHiddenClick', 'onSubmenuToggle', 'onMouseOver', 'onMouseOut', 'onFocus', 'onBlur', 'onKeyDown', 'onKeyUp', 'elementRef', 'itemRef', 'shouldCloseOnClick', 'withFocusOutline'];
|
|
69
|
-
export {
|
|
26
|
+
export { allowedProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec,
|
|
1
|
+
var _dec, _class, _TopNavBarDesktopLayout;
|
|
2
2
|
/*
|
|
3
3
|
* The MIT License (MIT)
|
|
4
4
|
*
|
|
@@ -25,19 +25,18 @@ var _dec, _dec2, _class, _TopNavBarDesktopLayout;
|
|
|
25
25
|
|
|
26
26
|
import { Children, Component } from 'react';
|
|
27
27
|
import { omitProps } from '@instructure/ui-react-utils';
|
|
28
|
-
import { testable } from '@instructure/ui-testable';
|
|
29
28
|
import { withStyle } from '@instructure/emotion';
|
|
30
29
|
import { TopNavBarContext } from '../../TopNavBarContext';
|
|
31
30
|
import generateStyle from './styles';
|
|
32
31
|
import generateComponentTheme from './theme';
|
|
33
|
-
import {
|
|
32
|
+
import { allowedProps } from './props';
|
|
34
33
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
35
34
|
/**
|
|
36
35
|
---
|
|
37
36
|
private: true
|
|
38
37
|
---
|
|
39
38
|
**/
|
|
40
|
-
let TopNavBarDesktopLayout = (_dec = withStyle(generateStyle, generateComponentTheme),
|
|
39
|
+
let TopNavBarDesktopLayout = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_TopNavBarDesktopLayout = class TopNavBarDesktopLayout extends Component {
|
|
41
40
|
constructor(...args) {
|
|
42
41
|
super(...args);
|
|
43
42
|
this.ref = null;
|
|
@@ -102,6 +101,7 @@ let TopNavBarDesktopLayout = (_dec = withStyle(generateStyle, generateComponentT
|
|
|
102
101
|
ref: this.handleRef,
|
|
103
102
|
css: styles === null || styles === void 0 ? void 0 : styles.topNavBarDesktopLayout,
|
|
104
103
|
"aria-label": navLabel,
|
|
104
|
+
"data-cid": "TopNavBarDesktopLayout",
|
|
105
105
|
children: [this.hasBrandBlock && _jsx("div", {
|
|
106
106
|
css: styles === null || styles === void 0 ? void 0 : styles.brandContainer,
|
|
107
107
|
children: renderBrand
|
|
@@ -119,6 +119,6 @@ let TopNavBarDesktopLayout = (_dec = withStyle(generateStyle, generateComponentT
|
|
|
119
119
|
})]
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
|
-
}, _TopNavBarDesktopLayout.displayName = "TopNavBarDesktopLayout", _TopNavBarDesktopLayout.componentId = 'TopNavBar.DesktopLayout', _TopNavBarDesktopLayout.
|
|
122
|
+
}, _TopNavBarDesktopLayout.displayName = "TopNavBarDesktopLayout", _TopNavBarDesktopLayout.componentId = 'TopNavBar.DesktopLayout', _TopNavBarDesktopLayout.allowedProps = allowedProps, _TopNavBarDesktopLayout.defaultProps = {}, _TopNavBarDesktopLayout.contextType = TopNavBarContext, _TopNavBarDesktopLayout)) || _class);
|
|
123
123
|
export { TopNavBarDesktopLayout };
|
|
124
124
|
export default TopNavBarDesktopLayout;
|
|
@@ -22,13 +22,8 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import {
|
|
26
|
-
const propTypes = {
|
|
27
|
-
// Edit PropTypes in TopNabBarLayout/props.ts
|
|
28
|
-
...commonPropTypes,
|
|
29
|
-
...desktopPropTypes
|
|
30
|
-
};
|
|
25
|
+
import { commonAllowedProps, desktopAllowedProps } from '../props';
|
|
31
26
|
const allowedProps = [
|
|
32
27
|
// Edit allowed props in TopNabBarLayout/props.ts
|
|
33
28
|
...commonAllowedProps, ...desktopAllowedProps];
|
|
34
|
-
export {
|
|
29
|
+
export { allowedProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec, _dec2,
|
|
1
|
+
var _dec, _dec2, _class, _TopNavBarSmallViewportLayout, _IconXLine, _IconHamburgerLine;
|
|
2
2
|
/*
|
|
3
3
|
* The MIT License (MIT)
|
|
4
4
|
*
|
|
@@ -27,7 +27,6 @@ import { Fragment, Children, Component } from 'react';
|
|
|
27
27
|
import { omitProps, withDeterministicId, callRenderProp } from '@instructure/ui-react-utils';
|
|
28
28
|
import { px } from '@instructure/ui-utils';
|
|
29
29
|
import { warn } from '@instructure/console';
|
|
30
|
-
import { testable } from '@instructure/ui-testable';
|
|
31
30
|
import { getBoundingClientRect, requestAnimationFrame } from '@instructure/ui-dom-utils';
|
|
32
31
|
import { withStyle, Global } from '@instructure/emotion';
|
|
33
32
|
import { Tray } from '@instructure/ui-tray';
|
|
@@ -40,14 +39,14 @@ import { mapItemsForDrilldown, renderMappedItemDrilldownSubpages, renderMappedIt
|
|
|
40
39
|
import { TopNavBarContext } from '../../TopNavBarContext';
|
|
41
40
|
import generateStyle from './styles';
|
|
42
41
|
import generateComponentTheme from './theme';
|
|
43
|
-
import {
|
|
42
|
+
import { allowedProps } from './props';
|
|
44
43
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
45
44
|
/**
|
|
46
45
|
---
|
|
47
46
|
private: true
|
|
48
47
|
---
|
|
49
48
|
**/
|
|
50
|
-
let TopNavBarSmallViewportLayout = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme),
|
|
49
|
+
let TopNavBarSmallViewportLayout = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = (_TopNavBarSmallViewportLayout = class TopNavBarSmallViewportLayout extends Component {
|
|
51
50
|
constructor(props) {
|
|
52
51
|
var _props$styles;
|
|
53
52
|
super(props);
|
|
@@ -445,6 +444,7 @@ let TopNavBarSmallViewportLayout = (_dec = withDeterministicId(), _dec2 = withSt
|
|
|
445
444
|
...omitProps(this.props, allowedProps),
|
|
446
445
|
ref: this.handleRef,
|
|
447
446
|
"aria-label": navLabel,
|
|
447
|
+
"data-cid": "TopNavBarSmallViewportLayout",
|
|
448
448
|
children: [_jsx(Global, {
|
|
449
449
|
styles: styles === null || styles === void 0 ? void 0 : styles.globalStyles
|
|
450
450
|
}), this.hasBreadcrumbBlock && _jsx("div", {
|
|
@@ -456,6 +456,6 @@ let TopNavBarSmallViewportLayout = (_dec = withDeterministicId(), _dec2 = withSt
|
|
|
456
456
|
}), !this.hasBreadcrumbBlock && this.renderInPlaceDialog(), !this.hasBreadcrumbBlock && this.renderDropdownMenuTray()]
|
|
457
457
|
});
|
|
458
458
|
}
|
|
459
|
-
}, _TopNavBarSmallViewportLayout.displayName = "TopNavBarSmallViewportLayout", _TopNavBarSmallViewportLayout.componentId = 'TopNavBar.SmallViewportLayout', _TopNavBarSmallViewportLayout.
|
|
459
|
+
}, _TopNavBarSmallViewportLayout.displayName = "TopNavBarSmallViewportLayout", _TopNavBarSmallViewportLayout.componentId = 'TopNavBar.SmallViewportLayout', _TopNavBarSmallViewportLayout.allowedProps = allowedProps, _TopNavBarSmallViewportLayout.defaultProps = {}, _TopNavBarSmallViewportLayout.contextType = TopNavBarContext, _TopNavBarSmallViewportLayout)) || _class) || _class);
|
|
460
460
|
export { TopNavBarSmallViewportLayout };
|
|
461
461
|
export default TopNavBarSmallViewportLayout;
|
|
@@ -22,13 +22,8 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import { commonAllowedProps,
|
|
26
|
-
const propTypes = {
|
|
27
|
-
// Edit PropTypes in TopNavBarLayout/props.ts
|
|
28
|
-
...commonPropTypes,
|
|
29
|
-
...smallViewportPropTypes
|
|
30
|
-
};
|
|
25
|
+
import { commonAllowedProps, smallViewportAllowedProps } from '../props';
|
|
31
26
|
const allowedProps = [
|
|
32
27
|
// Edit allowed props in TopNavBarLayout/props.ts
|
|
33
28
|
...commonAllowedProps, ...smallViewportAllowedProps];
|
|
34
|
-
export {
|
|
29
|
+
export { allowedProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
2
|
const _excluded = ["smallViewportConfig", "styles", "makeStyles"];
|
|
3
|
-
var _dec,
|
|
3
|
+
var _dec, _class, _TopNavBarLayout;
|
|
4
4
|
/*
|
|
5
5
|
* The MIT License (MIT)
|
|
6
6
|
*
|
|
@@ -26,13 +26,12 @@ var _dec, _dec2, _class, _TopNavBarLayout;
|
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
28
|
import { Component } from 'react';
|
|
29
|
-
import { testable } from '@instructure/ui-testable';
|
|
30
29
|
import { withStyle } from '@instructure/emotion';
|
|
31
30
|
import { TopNavBarContext } from '../TopNavBarContext';
|
|
32
31
|
import generateComponentTheme from './theme';
|
|
33
32
|
import { TopNavBarSmallViewportLayout } from './SmallViewportLayout';
|
|
34
33
|
import { TopNavBarDesktopLayout } from './DesktopLayout';
|
|
35
|
-
import {
|
|
34
|
+
import { allowedProps } from './props';
|
|
36
35
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
37
36
|
/**
|
|
38
37
|
---
|
|
@@ -41,7 +40,7 @@ id: TopNavBar.Layout
|
|
|
41
40
|
---
|
|
42
41
|
@module TopNavBarLayout
|
|
43
42
|
**/
|
|
44
|
-
let TopNavBarLayout = (_dec = withStyle(null, generateComponentTheme),
|
|
43
|
+
let TopNavBarLayout = (_dec = withStyle(null, generateComponentTheme), _dec(_class = (_TopNavBarLayout = class TopNavBarLayout extends Component {
|
|
45
44
|
constructor(...args) {
|
|
46
45
|
super(...args);
|
|
47
46
|
this.ref = null;
|
|
@@ -104,8 +103,8 @@ let TopNavBarLayout = (_dec = withStyle(null, generateComponentTheme), _dec2 = t
|
|
|
104
103
|
elementRef: this.handleRef
|
|
105
104
|
});
|
|
106
105
|
}
|
|
107
|
-
}, _TopNavBarLayout.displayName = "TopNavBarLayout", _TopNavBarLayout.componentId = 'TopNavBar.Layout', _TopNavBarLayout.
|
|
106
|
+
}, _TopNavBarLayout.displayName = "TopNavBarLayout", _TopNavBarLayout.componentId = 'TopNavBar.Layout', _TopNavBarLayout.allowedProps = allowedProps, _TopNavBarLayout.defaultProps = {
|
|
108
107
|
smallViewportConfig: {}
|
|
109
|
-
}, _TopNavBarLayout.contextType = TopNavBarContext, _TopNavBarLayout)) || _class)
|
|
108
|
+
}, _TopNavBarLayout.contextType = TopNavBarContext, _TopNavBarLayout)) || _class);
|
|
110
109
|
export { TopNavBarLayout };
|
|
111
110
|
export default TopNavBarLayout;
|
|
@@ -22,52 +22,8 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import PropTypes from 'prop-types';
|
|
26
|
-
import { Children as ChildrenPropTypes, element } from '@instructure/ui-prop-types';
|
|
27
|
-
import { TopNavBarActionItems } from '../TopNavBarActionItems';
|
|
28
|
-
import { TopNavBarBrand } from '../TopNavBarBrand';
|
|
29
|
-
import { TopNavBarMenuItems } from '../TopNavBarMenuItems';
|
|
30
|
-
import { TopNavBarUser } from '../TopNavBarUser';
|
|
31
|
-
import { topNavBarItemTooltipPropType } from '../TopNavBarItem/props';
|
|
32
|
-
import { TopNavBarBreadcrumb } from '../TopNavBarBreadcrumb';
|
|
33
|
-
const commonPropTypes = {
|
|
34
|
-
renderBrand: ChildrenPropTypes.oneOf([TopNavBarBrand]),
|
|
35
|
-
renderMenuItems: ChildrenPropTypes.oneOf([TopNavBarMenuItems]),
|
|
36
|
-
renderActionItems: ChildrenPropTypes.oneOf([TopNavBarActionItems]),
|
|
37
|
-
renderUser: ChildrenPropTypes.oneOf([TopNavBarUser]),
|
|
38
|
-
renderBreadcrumb: ChildrenPropTypes.oneOf([TopNavBarBreadcrumb]),
|
|
39
|
-
navLabel: PropTypes.string,
|
|
40
|
-
elementRef: PropTypes.func
|
|
41
|
-
};
|
|
42
|
-
const desktopPropTypes = {
|
|
43
|
-
hideActionsUserSeparator: PropTypes.bool
|
|
44
|
-
};
|
|
45
|
-
const smallViewportPropTypes = {
|
|
46
|
-
dropdownMenuToggleButtonLabel: PropTypes.string.isRequired,
|
|
47
|
-
dropdownMenuToggleButtonTooltip: topNavBarItemTooltipPropType,
|
|
48
|
-
dropdownMenuLabel: PropTypes.string,
|
|
49
|
-
alternativeTitle: PropTypes.node,
|
|
50
|
-
renderInPlaceDialogConfig: PropTypes.shape({
|
|
51
|
-
open: PropTypes.bool.isRequired,
|
|
52
|
-
onClose: PropTypes.func.isRequired,
|
|
53
|
-
closeButtonLabel: PropTypes.string.isRequired,
|
|
54
|
-
content: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
55
|
-
returnFocusElement: PropTypes.func,
|
|
56
|
-
shouldContainFocus: PropTypes.bool,
|
|
57
|
-
shouldCloseOnDocumentClick: PropTypes.bool,
|
|
58
|
-
shouldCloseOnEscape: PropTypes.bool
|
|
59
|
-
}),
|
|
60
|
-
trayMountNode: PropTypes.oneOfType([element, PropTypes.func]),
|
|
61
|
-
onDropdownMenuToggle: PropTypes.func,
|
|
62
|
-
onDropdownMenuSelect: PropTypes.func,
|
|
63
|
-
renderNavbarStartDangerousHack: PropTypes.node
|
|
64
|
-
};
|
|
65
|
-
const propTypes = {
|
|
66
|
-
...commonPropTypes,
|
|
67
|
-
smallViewportConfig: PropTypes.shape(smallViewportPropTypes).isRequired
|
|
68
|
-
};
|
|
69
25
|
const commonAllowedProps = ['renderBrand', 'renderMenuItems', 'renderActionItems', 'renderUser', 'renderBreadcrumb', 'navLabel', 'elementRef'];
|
|
70
26
|
const desktopAllowedProps = ['hideActionsUserSeparator'];
|
|
71
27
|
const smallViewportAllowedProps = ['dropdownMenuToggleButtonLabel', 'dropdownMenuToggleButtonTooltip', 'dropdownMenuLabel', 'alternativeTitle', 'renderInPlaceDialogConfig', 'trayMountNode', 'onDropdownMenuToggle', 'onDropdownMenuSelect'];
|
|
72
28
|
const allowedProps = [...commonAllowedProps, 'smallViewportConfig'];
|
|
73
|
-
export {
|
|
29
|
+
export { allowedProps, commonAllowedProps, desktopAllowedProps, smallViewportAllowedProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec, _dec2,
|
|
1
|
+
var _dec, _dec2, _class, _TopNavBarMenuItems, _span;
|
|
2
2
|
/*
|
|
3
3
|
* The MIT License (MIT)
|
|
4
4
|
*
|
|
@@ -26,7 +26,6 @@ var _dec, _dec2, _dec3, _class, _TopNavBarMenuItems, _span;
|
|
|
26
26
|
import { Children, Component } from 'react';
|
|
27
27
|
import { omitProps, safeCloneElement, withDeterministicId } from '@instructure/ui-react-utils';
|
|
28
28
|
import { warn, error } from '@instructure/console';
|
|
29
|
-
import { testable } from '@instructure/ui-testable';
|
|
30
29
|
import { withStyle } from '@instructure/emotion';
|
|
31
30
|
import { Drilldown } from '@instructure/ui-drilldown';
|
|
32
31
|
import { TruncateList } from '@instructure/ui-truncate-list';
|
|
@@ -35,7 +34,7 @@ import { TopNavBarItem } from '../TopNavBarItem';
|
|
|
35
34
|
import { mapItemsForDrilldown, renderMappedItemDrilldownSubpages, renderMappedItemsAsDrilldownOptions } from '../utils/mapItemsForDrilldown';
|
|
36
35
|
import generateStyle from './styles';
|
|
37
36
|
import generateComponentTheme from './theme';
|
|
38
|
-
import {
|
|
37
|
+
import { allowedProps } from './props';
|
|
39
38
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
40
39
|
import { createElement as _createElement } from "@emotion/react";
|
|
41
40
|
/**
|
|
@@ -45,7 +44,7 @@ id: TopNavBar.MenuItems
|
|
|
45
44
|
---
|
|
46
45
|
@module TopNavBarMenuItems
|
|
47
46
|
**/
|
|
48
|
-
let TopNavBarMenuItems = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme),
|
|
47
|
+
let TopNavBarMenuItems = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = (_TopNavBarMenuItems = class TopNavBarMenuItems extends Component {
|
|
49
48
|
constructor(props) {
|
|
50
49
|
super(props);
|
|
51
50
|
this._hiddenMenuItemsMenuTriggerId = void 0;
|
|
@@ -125,7 +124,8 @@ let TopNavBarMenuItems = (_dec = withDeterministicId(), _dec2 = withStyle(genera
|
|
|
125
124
|
const _child$props = child.props,
|
|
126
125
|
id = _child$props.id,
|
|
127
126
|
status = _child$props.status,
|
|
128
|
-
variant = _child$props.variant,
|
|
127
|
+
_child$props$variant = _child$props.variant,
|
|
128
|
+
variant = _child$props$variant === void 0 ? 'default' : _child$props$variant,
|
|
129
129
|
renderSubmenu = _child$props.renderSubmenu,
|
|
130
130
|
renderAvatar = _child$props.renderAvatar;
|
|
131
131
|
const isCurrentPage = currentPageId === id;
|
|
@@ -182,9 +182,10 @@ let TopNavBarMenuItems = (_dec = withDeterministicId(), _dec2 = withStyle(genera
|
|
|
182
182
|
...((styles === null || styles === void 0 ? void 0 : styles.itemSpacing) && {
|
|
183
183
|
itemSpacing: styles.itemSpacing
|
|
184
184
|
}),
|
|
185
|
-
"aria-label": listLabel
|
|
185
|
+
"aria-label": listLabel,
|
|
186
|
+
"data-cid": "TopNavBarMenuItems"
|
|
186
187
|
}, this.renderChildren());
|
|
187
188
|
}
|
|
188
|
-
}, _TopNavBarMenuItems.displayName = "TopNavBarMenuItems", _TopNavBarMenuItems.componentId = 'TopNavBar.MenuItems', _TopNavBarMenuItems.
|
|
189
|
+
}, _TopNavBarMenuItems.displayName = "TopNavBarMenuItems", _TopNavBarMenuItems.componentId = 'TopNavBar.MenuItems', _TopNavBarMenuItems.allowedProps = allowedProps, _TopNavBarMenuItems.defaultProps = {}, _TopNavBarMenuItems.contextType = TopNavBarContext, _TopNavBarMenuItems)) || _class) || _class);
|
|
189
190
|
export { TopNavBarMenuItems };
|
|
190
191
|
export default TopNavBarMenuItems;
|
|
@@ -22,15 +22,5 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import PropTypes from 'prop-types';
|
|
26
|
-
import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types';
|
|
27
|
-
import { TopNavBarItem } from '../TopNavBarItem';
|
|
28
|
-
const propTypes = {
|
|
29
|
-
children: ChildrenPropTypes.oneOf([TopNavBarItem]),
|
|
30
|
-
currentPageId: PropTypes.string,
|
|
31
|
-
renderHiddenItemsMenuTriggerLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.string]).isRequired,
|
|
32
|
-
listLabel: PropTypes.string,
|
|
33
|
-
elementRef: PropTypes.func
|
|
34
|
-
};
|
|
35
25
|
const allowedProps = ['children', 'currentPageId', 'renderHiddenItemsMenuTriggerLabel', 'listLabel', 'elementRef'];
|
|
36
|
-
export {
|
|
26
|
+
export { allowedProps };
|