@instructure/ui-top-nav-bar 10.26.1-snapshot-2 → 10.26.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.
- package/CHANGELOG.md +5 -18
- package/es/TopNavBar/TopNavBarActionItems/index.js +5 -5
- package/es/TopNavBar/TopNavBarActionItems/props.js +12 -1
- package/es/TopNavBar/TopNavBarBrand/index.js +5 -5
- package/es/TopNavBar/TopNavBarBrand/props.js +11 -1
- package/es/TopNavBar/TopNavBarBreadcrumb/index.js +5 -6
- package/es/TopNavBar/TopNavBarBreadcrumb/props.js +9 -1
- package/es/TopNavBar/TopNavBarItem/index.js +6 -6
- package/es/TopNavBar/TopNavBarItem/props.js +44 -1
- package/es/TopNavBar/TopNavBarLayout/DesktopLayout/index.js +5 -5
- package/es/TopNavBar/TopNavBarLayout/DesktopLayout/props.js +7 -2
- package/es/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.js +5 -5
- package/es/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.js +7 -2
- package/es/TopNavBar/TopNavBarLayout/index.js +6 -5
- package/es/TopNavBar/TopNavBarLayout/props.js +45 -1
- package/es/TopNavBar/TopNavBarMenuItems/index.js +7 -8
- package/es/TopNavBar/TopNavBarMenuItems/props.js +11 -1
- package/es/TopNavBar/TopNavBarUser/index.js +5 -5
- package/es/TopNavBar/TopNavBarUser/props.js +8 -1
- package/es/TopNavBar/index.js +6 -18
- package/es/TopNavBar/props.js +9 -1
- package/es/TopNavBar/utils/mapItemsForDrilldown.js +1 -2
- package/lib/TopNavBar/TopNavBarActionItems/index.js +4 -4
- package/lib/TopNavBar/TopNavBarActionItems/props.js +13 -1
- package/lib/TopNavBar/TopNavBarBrand/index.js +4 -4
- package/lib/TopNavBar/TopNavBarBrand/props.js +12 -1
- package/lib/TopNavBar/TopNavBarBreadcrumb/index.js +4 -5
- package/lib/TopNavBar/TopNavBarBreadcrumb/props.js +10 -1
- package/lib/TopNavBar/TopNavBarItem/index.js +5 -5
- package/lib/TopNavBar/TopNavBarItem/props.js +45 -1
- package/lib/TopNavBar/TopNavBarLayout/DesktopLayout/index.js +4 -4
- package/lib/TopNavBar/TopNavBarLayout/DesktopLayout/props.js +6 -1
- package/lib/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.js +4 -4
- package/lib/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.js +6 -1
- package/lib/TopNavBar/TopNavBarLayout/index.js +5 -4
- package/lib/TopNavBar/TopNavBarLayout/props.js +47 -1
- package/lib/TopNavBar/TopNavBarMenuItems/index.js +6 -7
- package/lib/TopNavBar/TopNavBarMenuItems/props.js +12 -1
- package/lib/TopNavBar/TopNavBarUser/index.js +4 -4
- package/lib/TopNavBar/TopNavBarUser/props.js +9 -1
- package/lib/TopNavBar/index.js +5 -19
- package/lib/TopNavBar/props.js +10 -1
- package/lib/TopNavBar/utils/mapItemsForDrilldown.js +1 -2
- package/package.json +31 -28
- package/src/TopNavBar/TopNavBarActionItems/index.tsx +8 -2
- package/src/TopNavBar/TopNavBarActionItems/props.ts +22 -1
- package/src/TopNavBar/TopNavBarBrand/index.tsx +5 -6
- package/src/TopNavBar/TopNavBarBrand/props.ts +16 -1
- package/src/TopNavBar/TopNavBarBreadcrumb/index.tsx +9 -13
- package/src/TopNavBar/TopNavBarBreadcrumb/props.ts +15 -3
- package/src/TopNavBar/TopNavBarItem/index.tsx +5 -6
- package/src/TopNavBar/TopNavBarItem/props.ts +51 -1
- package/src/TopNavBar/TopNavBarLayout/DesktopLayout/index.tsx +4 -2
- package/src/TopNavBar/TopNavBarLayout/DesktopLayout/props.ts +19 -3
- package/src/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.tsx +4 -2
- package/src/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.ts +18 -3
- package/src/TopNavBar/TopNavBarLayout/index.tsx +5 -1
- package/src/TopNavBar/TopNavBarLayout/props.ts +60 -1
- package/src/TopNavBar/TopNavBarMenuItems/index.tsx +5 -10
- package/src/TopNavBar/TopNavBarMenuItems/props.ts +19 -1
- package/src/TopNavBar/TopNavBarUser/index.tsx +4 -2
- package/src/TopNavBar/TopNavBarUser/props.ts +14 -1
- package/src/TopNavBar/index.tsx +4 -2
- package/src/TopNavBar/props.ts +17 -2
- package/src/TopNavBar/utils/mapItemsForDrilldown.tsx +1 -1
- package/tsconfig.build.json +3 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/TopNavBar/TopNavBarActionItems/index.d.ts +1 -0
- package/types/TopNavBar/TopNavBarActionItems/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarActionItems/props.d.ts +3 -2
- package/types/TopNavBar/TopNavBarActionItems/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarBrand/index.d.ts +1 -0
- package/types/TopNavBar/TopNavBarBrand/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarBrand/props.d.ts +3 -2
- package/types/TopNavBar/TopNavBarBrand/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarBreadcrumb/index.d.ts +5 -0
- package/types/TopNavBar/TopNavBarBreadcrumb/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarBreadcrumb/props.d.ts +3 -2
- package/types/TopNavBar/TopNavBarBreadcrumb/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarItem/index.d.ts +1 -0
- package/types/TopNavBar/TopNavBarItem/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarItem/props.d.ts +13 -2
- package/types/TopNavBar/TopNavBarItem/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarLayout/DesktopLayout/index.d.ts +1 -0
- package/types/TopNavBar/TopNavBarLayout/DesktopLayout/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarLayout/DesktopLayout/props.d.ts +3 -2
- package/types/TopNavBar/TopNavBarLayout/DesktopLayout/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.d.ts +1 -0
- package/types/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.d.ts +3 -2
- package/types/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarLayout/index.d.ts +1 -0
- package/types/TopNavBar/TopNavBarLayout/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarLayout/props.d.ts +6 -2
- package/types/TopNavBar/TopNavBarLayout/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarMenuItems/index.d.ts +1 -0
- package/types/TopNavBar/TopNavBarMenuItems/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarMenuItems/props.d.ts +3 -2
- package/types/TopNavBar/TopNavBarMenuItems/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarUser/index.d.ts +1 -0
- package/types/TopNavBar/TopNavBarUser/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarUser/props.d.ts +3 -2
- package/types/TopNavBar/TopNavBarUser/props.d.ts.map +1 -1
- package/types/TopNavBar/index.d.ts +1 -0
- package/types/TopNavBar/index.d.ts.map +1 -1
- package/types/TopNavBar/props.d.ts +3 -2
- package/types/TopNavBar/props.d.ts.map +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec, _class, _TopNavBarUser;
|
|
1
|
+
var _dec, _dec2, _class, _TopNavBarUser;
|
|
2
2
|
/*
|
|
3
3
|
* The MIT License (MIT)
|
|
4
4
|
*
|
|
@@ -26,10 +26,11 @@ var _dec, _class, _TopNavBarUser;
|
|
|
26
26
|
import { Component, Children } from 'react';
|
|
27
27
|
import { error } from '@instructure/console';
|
|
28
28
|
import { omitProps } from '@instructure/ui-react-utils';
|
|
29
|
+
import { testable } from '@instructure/ui-testable';
|
|
29
30
|
import { withStyle } from '@instructure/emotion';
|
|
30
31
|
import { TopNavBarContext } from '../TopNavBarContext';
|
|
31
32
|
import generateStyle from './styles';
|
|
32
|
-
import { allowedProps } from './props';
|
|
33
|
+
import { propTypes, allowedProps } from './props';
|
|
33
34
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
34
35
|
/**
|
|
35
36
|
---
|
|
@@ -38,7 +39,7 @@ id: TopNavBar.User
|
|
|
38
39
|
---
|
|
39
40
|
@module TopNavBarUser
|
|
40
41
|
**/
|
|
41
|
-
let TopNavBarUser = (_dec = withStyle(generateStyle, null), _dec(_class = (_TopNavBarUser = class TopNavBarUser extends Component {
|
|
42
|
+
let TopNavBarUser = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec(_class = _dec2(_class = (_TopNavBarUser = class TopNavBarUser extends Component {
|
|
42
43
|
constructor(...args) {
|
|
43
44
|
super(...args);
|
|
44
45
|
this.ref = null;
|
|
@@ -85,10 +86,9 @@ let TopNavBarUser = (_dec = withStyle(generateStyle, null), _dec(_class = (_TopN
|
|
|
85
86
|
...omitProps(this.props, allowedProps),
|
|
86
87
|
ref: this.handleRef,
|
|
87
88
|
css: styles === null || styles === void 0 ? void 0 : styles.topNavBarUser,
|
|
88
|
-
"data-cid": "TopNavBarUser",
|
|
89
89
|
children: this.content
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
}, _TopNavBarUser.displayName = "TopNavBarUser", _TopNavBarUser.componentId = 'TopNavBar.User', _TopNavBarUser.allowedProps = allowedProps, _TopNavBarUser.defaultProps = {}, _TopNavBarUser.contextType = TopNavBarContext, _TopNavBarUser)) || _class);
|
|
92
|
+
}, _TopNavBarUser.displayName = "TopNavBarUser", _TopNavBarUser.componentId = 'TopNavBar.User', _TopNavBarUser.propTypes = propTypes, _TopNavBarUser.allowedProps = allowedProps, _TopNavBarUser.defaultProps = {}, _TopNavBarUser.contextType = TopNavBarContext, _TopNavBarUser)) || _class) || _class);
|
|
93
93
|
export { TopNavBarUser };
|
|
94
94
|
export default TopNavBarUser;
|
|
@@ -22,5 +22,12 @@
|
|
|
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]).isRequired,
|
|
30
|
+
elementRef: PropTypes.func
|
|
31
|
+
};
|
|
25
32
|
const allowedProps = ['children', 'elementRef'];
|
|
26
|
-
export { allowedProps };
|
|
33
|
+
export { propTypes, allowedProps };
|
package/es/TopNavBar/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
var _dec, _class, _TopNavBar;
|
|
1
2
|
/*
|
|
2
3
|
* The MIT License (MIT)
|
|
3
4
|
*
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
|
|
25
26
|
import { Component } from 'react';
|
|
26
27
|
import { error } from '@instructure/console';
|
|
28
|
+
import { testable } from '@instructure/ui-testable';
|
|
27
29
|
import { px } from '@instructure/ui-utils';
|
|
28
30
|
import { matchComponentTypes } from '@instructure/ui-react-utils';
|
|
29
31
|
import { Responsive } from '@instructure/ui-responsive';
|
|
@@ -35,14 +37,14 @@ import { TopNavBarMenuItems } from './TopNavBarMenuItems';
|
|
|
35
37
|
import { TopNavBarUser } from './TopNavBarUser';
|
|
36
38
|
import { TopNavBarBreadcrumb } from './TopNavBarBreadcrumb';
|
|
37
39
|
import { TopNavBarContext } from './TopNavBarContext';
|
|
38
|
-
import { allowedProps } from './props';
|
|
40
|
+
import { propTypes, allowedProps } from './props';
|
|
39
41
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
40
42
|
/**
|
|
41
43
|
---
|
|
42
44
|
category: components
|
|
43
45
|
---
|
|
44
46
|
**/
|
|
45
|
-
class TopNavBar extends Component {
|
|
47
|
+
let TopNavBar = (_dec = testable(), _dec(_class = (_TopNavBar = class TopNavBar extends Component {
|
|
46
48
|
constructor(...args) {
|
|
47
49
|
super(...args);
|
|
48
50
|
this.ref = null;
|
|
@@ -63,7 +65,6 @@ class TopNavBar extends Component {
|
|
|
63
65
|
mediaQueryMatch = _this$props.mediaQueryMatch,
|
|
64
66
|
inverseColor = _this$props.inverseColor;
|
|
65
67
|
return _jsx(Responsive, {
|
|
66
|
-
"data-cid": "TopNavBar",
|
|
67
68
|
elementRef: this.handleRef,
|
|
68
69
|
match: mediaQueryMatch,
|
|
69
70
|
query: {
|
|
@@ -94,23 +95,10 @@ class TopNavBar extends Component {
|
|
|
94
95
|
}
|
|
95
96
|
});
|
|
96
97
|
}
|
|
97
|
-
}
|
|
98
|
-
TopNavBar.displayName = "TopNavBar";
|
|
99
|
-
TopNavBar.componentId = 'TopNavBar';
|
|
100
|
-
// TODO: mention subcomponent registration in "new component" docs
|
|
101
|
-
TopNavBar.ActionItems = TopNavBarActionItems;
|
|
102
|
-
TopNavBar.Brand = TopNavBarBrand;
|
|
103
|
-
TopNavBar.Item = TopNavBarItem;
|
|
104
|
-
TopNavBar.Layout = TopNavBarLayout;
|
|
105
|
-
TopNavBar.MenuItems = TopNavBarMenuItems;
|
|
106
|
-
TopNavBar.User = TopNavBarUser;
|
|
107
|
-
TopNavBar.Breadcrumb = TopNavBarBreadcrumb;
|
|
108
|
-
TopNavBar.contextType = TopNavBarContext;
|
|
109
|
-
TopNavBar.allowedProps = allowedProps;
|
|
110
|
-
TopNavBar.defaultProps = {
|
|
98
|
+
}, _TopNavBar.displayName = "TopNavBar", _TopNavBar.componentId = 'TopNavBar', _TopNavBar.ActionItems = TopNavBarActionItems, _TopNavBar.Brand = TopNavBarBrand, _TopNavBar.Item = TopNavBarItem, _TopNavBar.Layout = TopNavBarLayout, _TopNavBar.MenuItems = TopNavBarMenuItems, _TopNavBar.User = TopNavBarUser, _TopNavBar.Breadcrumb = TopNavBarBreadcrumb, _TopNavBar.contextType = TopNavBarContext, _TopNavBar.propTypes = propTypes, _TopNavBar.allowedProps = allowedProps, _TopNavBar.defaultProps = {
|
|
111
99
|
breakpoint: 1024,
|
|
112
100
|
mediaQueryMatch: 'media',
|
|
113
101
|
inverseColor: false
|
|
114
|
-
};
|
|
102
|
+
}, _TopNavBar)) || _class);
|
|
115
103
|
export { TopNavBar };
|
|
116
104
|
export default TopNavBar;
|
package/es/TopNavBar/props.js
CHANGED
|
@@ -22,5 +22,13 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
import PropTypes from 'prop-types';
|
|
26
|
+
const propTypes = {
|
|
27
|
+
children: PropTypes.func,
|
|
28
|
+
breakpoint: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
29
|
+
mediaQueryMatch: PropTypes.oneOf(['element', 'media']),
|
|
30
|
+
inverseColor: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
|
|
31
|
+
elementRef: PropTypes.func
|
|
32
|
+
};
|
|
25
33
|
const allowedProps = ['children', 'breakpoint', 'mediaQueryMatch', 'inverseColor', 'elementRef'];
|
|
26
|
-
export { allowedProps };
|
|
34
|
+
export { propTypes, allowedProps };
|
|
@@ -43,8 +43,7 @@ const mapItemsForDrilldown = (itemList, options = {}) => {
|
|
|
43
43
|
id = _item$props.id,
|
|
44
44
|
children = _item$props.children,
|
|
45
45
|
status = _item$props.status,
|
|
46
|
-
|
|
47
|
-
variant = _item$props$variant === void 0 ? 'default' : _item$props$variant,
|
|
46
|
+
variant = _item$props.variant,
|
|
48
47
|
href = _item$props.href,
|
|
49
48
|
onClick = _item$props.onClick,
|
|
50
49
|
shouldCloseOnClick = _item$props.shouldCloseOnClick;
|
|
@@ -10,6 +10,7 @@ var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
|
10
10
|
var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
|
|
11
11
|
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
12
12
|
var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
|
|
13
|
+
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
13
14
|
var _console = require("@instructure/console");
|
|
14
15
|
var _emotion = require("@instructure/emotion");
|
|
15
16
|
var _Drilldown = require("@instructure/ui-drilldown/lib/Drilldown");
|
|
@@ -23,7 +24,7 @@ var _theme = _interopRequireDefault(require("./theme"));
|
|
|
23
24
|
var _props = require("./props");
|
|
24
25
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
25
26
|
var _react2 = require("@emotion/react");
|
|
26
|
-
var _dec, _dec2, _class, _TopNavBarActionItems;
|
|
27
|
+
var _dec, _dec2, _dec3, _class, _TopNavBarActionItems;
|
|
27
28
|
/*
|
|
28
29
|
* The MIT License (MIT)
|
|
29
30
|
*
|
|
@@ -54,7 +55,7 @@ id: TopNavBar.ActionItems
|
|
|
54
55
|
---
|
|
55
56
|
@module TopNavBarActionItems
|
|
56
57
|
**/
|
|
57
|
-
let TopNavBarActionItems = exports.TopNavBarActionItems = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = (_TopNavBarActionItems = class TopNavBarActionItems extends _react.Component {
|
|
58
|
+
let TopNavBarActionItems = exports.TopNavBarActionItems = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _testable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_TopNavBarActionItems = class TopNavBarActionItems extends _react.Component {
|
|
58
59
|
constructor(props) {
|
|
59
60
|
super(props);
|
|
60
61
|
this.ref = null;
|
|
@@ -195,12 +196,11 @@ let TopNavBarActionItems = exports.TopNavBarActionItems = (_dec = (0, _withDeter
|
|
|
195
196
|
ref: this.handleRef,
|
|
196
197
|
css: styles === null || styles === void 0 ? void 0 : styles.topNavBarActionItems,
|
|
197
198
|
"aria-label": listLabel,
|
|
198
|
-
"data-cid": "TopNavBarActionItems",
|
|
199
199
|
children: this.childrenArray.map(item => (0, _jsxRuntime.jsx)("li", {
|
|
200
200
|
css: styles === null || styles === void 0 ? void 0 : styles.listItem,
|
|
201
201
|
children: item
|
|
202
202
|
}, item.props.id))
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
|
-
}, _TopNavBarActionItems.displayName = "TopNavBarActionItems", _TopNavBarActionItems.componentId = 'TopNavBar.ActionItems', _TopNavBarActionItems.allowedProps = _props.allowedProps, _TopNavBarActionItems.defaultProps = {}, _TopNavBarActionItems.contextType = _TopNavBarContext.TopNavBarContext, _TopNavBarActionItems)) || _class) || _class);
|
|
205
|
+
}, _TopNavBarActionItems.displayName = "TopNavBarActionItems", _TopNavBarActionItems.componentId = 'TopNavBar.ActionItems', _TopNavBarActionItems.propTypes = _props.propTypes, _TopNavBarActionItems.allowedProps = _props.allowedProps, _TopNavBarActionItems.defaultProps = {}, _TopNavBarActionItems.contextType = _TopNavBarContext.TopNavBarContext, _TopNavBarActionItems)) || _class) || _class) || _class);
|
|
206
206
|
var _default = exports.default = TopNavBarActionItems;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.allowedProps = void 0;
|
|
7
|
+
exports.propTypes = exports.allowedProps = void 0;
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _Children = require("@instructure/ui-prop-types/lib/Children.js");
|
|
10
|
+
var _TopNavBarItem = require("../TopNavBarItem");
|
|
11
|
+
var _props = require("../TopNavBarItem/props");
|
|
7
12
|
/*
|
|
8
13
|
* The MIT License (MIT)
|
|
9
14
|
*
|
|
@@ -28,4 +33,11 @@ exports.allowedProps = void 0;
|
|
|
28
33
|
* SOFTWARE.
|
|
29
34
|
*/
|
|
30
35
|
|
|
36
|
+
const propTypes = exports.propTypes = {
|
|
37
|
+
children: _Children.Children.oneOf([_TopNavBarItem.TopNavBarItem]),
|
|
38
|
+
listLabel: _propTypes.default.string,
|
|
39
|
+
renderHiddenItemsMenuTriggerLabel: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.func]).isRequired,
|
|
40
|
+
renderHiddenItemsMenuTriggerTooltip: _propTypes.default.oneOfType([_props.topNavBarItemTooltipPropType, _propTypes.default.func]),
|
|
41
|
+
elementRef: _propTypes.default.func
|
|
42
|
+
};
|
|
31
43
|
const allowedProps = exports.allowedProps = ['children', 'listLabel', 'renderHiddenItemsMenuTriggerLabel', 'renderHiddenItemsMenuTriggerTooltip', 'elementRef'];
|
|
@@ -8,6 +8,7 @@ exports.default = exports.TopNavBarBrand = void 0;
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _getElementType = require("@instructure/ui-react-utils/lib/getElementType.js");
|
|
10
10
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
11
|
+
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
11
12
|
var _emotion = require("@instructure/emotion");
|
|
12
13
|
var _ScreenReaderContent = require("@instructure/ui-a11y-content/lib/ScreenReaderContent");
|
|
13
14
|
var _View = require("@instructure/ui-view/lib/View");
|
|
@@ -16,7 +17,7 @@ var _styles = _interopRequireDefault(require("./styles"));
|
|
|
16
17
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
17
18
|
var _props = require("./props");
|
|
18
19
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
19
|
-
var _dec, _class, _TopNavBarBrand;
|
|
20
|
+
var _dec, _dec2, _class, _TopNavBarBrand;
|
|
20
21
|
/*
|
|
21
22
|
* The MIT License (MIT)
|
|
22
23
|
*
|
|
@@ -47,7 +48,7 @@ id: TopNavBar.Brand
|
|
|
47
48
|
---
|
|
48
49
|
@module TopNavBarBrand
|
|
49
50
|
**/
|
|
50
|
-
let TopNavBarBrand = exports.TopNavBarBrand = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_TopNavBarBrand = class TopNavBarBrand extends _react.Component {
|
|
51
|
+
let TopNavBarBrand = exports.TopNavBarBrand = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_TopNavBarBrand = class TopNavBarBrand extends _react.Component {
|
|
51
52
|
constructor(...args) {
|
|
52
53
|
super(...args);
|
|
53
54
|
this.ref = null;
|
|
@@ -88,7 +89,6 @@ let TopNavBarBrand = exports.TopNavBarBrand = (_dec = (0, _emotion.withStyle)(_s
|
|
|
88
89
|
return (0, _jsxRuntime.jsx)("div", {
|
|
89
90
|
ref: this.handleRef,
|
|
90
91
|
css: styles === null || styles === void 0 ? void 0 : styles.topNavBarBrand,
|
|
91
|
-
"data-cid": "TopNavBarBrand",
|
|
92
92
|
children: renderIcon && (0, _jsxRuntime.jsxs)(_View.View, {
|
|
93
93
|
...(0, _omitProps.omitProps)(this.props, _props.allowedProps),
|
|
94
94
|
css: styles === null || styles === void 0 ? void 0 : styles.container,
|
|
@@ -113,5 +113,5 @@ let TopNavBarBrand = exports.TopNavBarBrand = (_dec = (0, _emotion.withStyle)(_s
|
|
|
113
113
|
})
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
-
}, _TopNavBarBrand.displayName = "TopNavBarBrand", _TopNavBarBrand.componentId = 'TopNavBar.Brand', _TopNavBarBrand.allowedProps = _props.allowedProps, _TopNavBarBrand.defaultProps = {}, _TopNavBarBrand.contextType = _TopNavBarContext.TopNavBarContext, _TopNavBarBrand)) || _class);
|
|
116
|
+
}, _TopNavBarBrand.displayName = "TopNavBarBrand", _TopNavBarBrand.componentId = 'TopNavBar.Brand', _TopNavBarBrand.propTypes = _props.propTypes, _TopNavBarBrand.allowedProps = _props.allowedProps, _TopNavBarBrand.defaultProps = {}, _TopNavBarBrand.contextType = _TopNavBarContext.TopNavBarContext, _TopNavBarBrand)) || _class) || _class);
|
|
117
117
|
var _default = exports.default = TopNavBarBrand;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.allowedProps = void 0;
|
|
7
|
+
exports.propTypes = exports.allowedProps = void 0;
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
9
|
/*
|
|
8
10
|
* The MIT License (MIT)
|
|
9
11
|
*
|
|
@@ -28,4 +30,13 @@ exports.allowedProps = void 0;
|
|
|
28
30
|
* SOFTWARE.
|
|
29
31
|
*/
|
|
30
32
|
|
|
33
|
+
const propTypes = exports.propTypes = {
|
|
34
|
+
screenReaderLabel: _propTypes.default.string.isRequired,
|
|
35
|
+
renderIcon: _propTypes.default.node,
|
|
36
|
+
iconBackground: _propTypes.default.string,
|
|
37
|
+
href: _propTypes.default.string,
|
|
38
|
+
onClick: _propTypes.default.func,
|
|
39
|
+
as: _propTypes.default.elementType,
|
|
40
|
+
elementRef: _propTypes.default.func
|
|
41
|
+
};
|
|
31
42
|
const allowedProps = exports.allowedProps = ['screenReaderLabel', 'renderIcon', 'iconBackground', 'href', 'onClick', 'as', 'elementRef'];
|
|
@@ -10,13 +10,14 @@ var _props = require("./props");
|
|
|
10
10
|
var _index = _interopRequireDefault(require("../index"));
|
|
11
11
|
var _emotion = require("@instructure/emotion");
|
|
12
12
|
var _styles = _interopRequireDefault(require("../TopNavBarBreadcrumb/styles"));
|
|
13
|
+
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
13
14
|
var _IconArrowOpenStartLine = require("@instructure/ui-icons/lib/IconArrowOpenStartLine.js");
|
|
14
15
|
var _IconHamburgerLine2 = require("@instructure/ui-icons/lib/IconHamburgerLine.js");
|
|
15
16
|
var _TopNavBarContext = _interopRequireDefault(require("../TopNavBarContext"));
|
|
16
17
|
var _console = require("@instructure/console");
|
|
17
18
|
var _Link = require("@instructure/ui-link/lib/Link");
|
|
18
19
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
19
|
-
var _dec, _class, _TopNavBarBreadcrumb, _IconHamburgerLine;
|
|
20
|
+
var _dec, _dec2, _class, _TopNavBarBreadcrumb, _IconHamburgerLine;
|
|
20
21
|
/*
|
|
21
22
|
* The MIT License (MIT)
|
|
22
23
|
*
|
|
@@ -47,7 +48,7 @@ id: TopNavBar.Breadcrumb
|
|
|
47
48
|
---
|
|
48
49
|
@module TopNavBarBreadcrumb
|
|
49
50
|
**/
|
|
50
|
-
let TopNavBarBreadcrumb = exports.TopNavBarBreadcrumb = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec(_class = (_TopNavBarBreadcrumb = class TopNavBarBreadcrumb extends _react.Component {
|
|
51
|
+
let TopNavBarBreadcrumb = exports.TopNavBarBreadcrumb = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_TopNavBarBreadcrumb = class TopNavBarBreadcrumb extends _react.Component {
|
|
51
52
|
constructor(...args) {
|
|
52
53
|
super(...args);
|
|
53
54
|
this.ref = null;
|
|
@@ -98,7 +99,6 @@ let TopNavBarBreadcrumb = exports.TopNavBarBreadcrumb = (_dec = (0, _emotion.wit
|
|
|
98
99
|
return this.context.inverseColor && (this.context.layout === 'desktop' ? (0, _jsxRuntime.jsxs)("div", {
|
|
99
100
|
ref: this.handleRef,
|
|
100
101
|
css: styles === null || styles === void 0 ? void 0 : styles.topNavBarBreadcrumb,
|
|
101
|
-
"data-cid": "TopNavBarBreadcrumb",
|
|
102
102
|
children: [(0, _jsxRuntime.jsx)("div", {
|
|
103
103
|
css: styles === null || styles === void 0 ? void 0 : styles.iconContainer,
|
|
104
104
|
children: this.renderMenu()
|
|
@@ -109,7 +109,6 @@ let TopNavBarBreadcrumb = exports.TopNavBarBreadcrumb = (_dec = (0, _emotion.wit
|
|
|
109
109
|
}) : (0, _jsxRuntime.jsx)("div", {
|
|
110
110
|
ref: this.handleRef,
|
|
111
111
|
css: styles === null || styles === void 0 ? void 0 : styles.topNavBarBreadcrumb,
|
|
112
|
-
"data-cid": "TopNavBarBreadcrumb",
|
|
113
112
|
children: (0, _jsxRuntime.jsx)("div", {
|
|
114
113
|
css: styles === null || styles === void 0 ? void 0 : styles.linkContainer,
|
|
115
114
|
children: lastButOneLink && (0, _jsxRuntime.jsx)(_Link.Link, {
|
|
@@ -121,5 +120,5 @@ let TopNavBarBreadcrumb = exports.TopNavBarBreadcrumb = (_dec = (0, _emotion.wit
|
|
|
121
120
|
})
|
|
122
121
|
}));
|
|
123
122
|
}
|
|
124
|
-
}, _TopNavBarBreadcrumb.displayName = "TopNavBarBreadcrumb", _TopNavBarBreadcrumb.allowedProps = _props.allowedProps, _TopNavBarBreadcrumb.defaultProps = {}, _TopNavBarBreadcrumb.contextType = _TopNavBarContext.default, _TopNavBarBreadcrumb)) || _class);
|
|
123
|
+
}, _TopNavBarBreadcrumb.displayName = "TopNavBarBreadcrumb", _TopNavBarBreadcrumb.propTypes = _props.propTypes, _TopNavBarBreadcrumb.allowedProps = _props.allowedProps, _TopNavBarBreadcrumb.defaultProps = {}, _TopNavBarBreadcrumb.contextType = _TopNavBarContext.default, _TopNavBarBreadcrumb)) || _class) || _class);
|
|
125
124
|
var _default = exports.default = TopNavBarBreadcrumb;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.allowedProps = void 0;
|
|
7
|
+
exports.propTypes = exports.allowedProps = void 0;
|
|
8
|
+
var _Children = require("@instructure/ui-prop-types/lib/Children.js");
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _Breadcrumb = require("@instructure/ui-breadcrumb/lib/Breadcrumb");
|
|
7
11
|
/*
|
|
8
12
|
* The MIT License (MIT)
|
|
9
13
|
*
|
|
@@ -28,4 +32,9 @@ exports.allowedProps = void 0;
|
|
|
28
32
|
* SOFTWARE.
|
|
29
33
|
*/
|
|
30
34
|
|
|
35
|
+
const propTypes = exports.propTypes = {
|
|
36
|
+
onClick: _propTypes.default.func,
|
|
37
|
+
elementRef: _propTypes.default.func,
|
|
38
|
+
children: _Children.Children.oneOf([_Breadcrumb.Breadcrumb])
|
|
39
|
+
};
|
|
31
40
|
const allowedProps = exports.allowedProps = ['children', 'onClick', 'elementRef'];
|
|
@@ -13,6 +13,7 @@ var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProp
|
|
|
13
13
|
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
14
14
|
var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
|
|
15
15
|
var _createChainedFunction = require("@instructure/ui-utils/lib/createChainedFunction.js");
|
|
16
|
+
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
16
17
|
var _console = require("@instructure/console");
|
|
17
18
|
var _emotion = require("@instructure/emotion");
|
|
18
19
|
var _IconArrowOpenDownSolid = require("@instructure/ui-icons/lib/IconArrowOpenDownSolid.js");
|
|
@@ -28,7 +29,7 @@ var _styles = _interopRequireDefault(require("./styles"));
|
|
|
28
29
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
29
30
|
var _props = require("./props");
|
|
30
31
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
31
|
-
var _dec, _dec2, _class, _TopNavBarItem, _IconArrowOpenUpSolid, _IconArrowOpenDownSol;
|
|
32
|
+
var _dec, _dec2, _dec3, _class, _TopNavBarItem, _IconArrowOpenUpSolid, _IconArrowOpenDownSol;
|
|
32
33
|
/*
|
|
33
34
|
* The MIT License (MIT)
|
|
34
35
|
*
|
|
@@ -63,7 +64,7 @@ id: TopNavBar.Item
|
|
|
63
64
|
---
|
|
64
65
|
@module TopNavBarItem
|
|
65
66
|
**/
|
|
66
|
-
let TopNavBarItem = exports.TopNavBarItem = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = (_TopNavBarItem = class TopNavBarItem extends _react.Component {
|
|
67
|
+
let TopNavBarItem = exports.TopNavBarItem = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _testable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_TopNavBarItem = class TopNavBarItem extends _react.Component {
|
|
67
68
|
constructor(props) {
|
|
68
69
|
super(props);
|
|
69
70
|
this.ref = null;
|
|
@@ -577,14 +578,13 @@ let TopNavBarItem = exports.TopNavBarItem = (_dec = (0, _withDeterministicId.wit
|
|
|
577
578
|
return (0, _jsxRuntime.jsx)("div", {
|
|
578
579
|
ref: this.handleRef,
|
|
579
580
|
css: styles === null || styles === void 0 ? void 0 : styles.topNavBarItem,
|
|
580
|
-
"data-cid": "TopNavBarItem",
|
|
581
581
|
children: content
|
|
582
582
|
});
|
|
583
583
|
}
|
|
584
|
-
}, _TopNavBarItem.displayName = "TopNavBarItem", _TopNavBarItem.componentId = 'TopNavBar.Item', _TopNavBarItem.allowedProps = _props.allowedProps, _TopNavBarItem.defaultProps = {
|
|
584
|
+
}, _TopNavBarItem.displayName = "TopNavBarItem", _TopNavBarItem.componentId = 'TopNavBar.Item', _TopNavBarItem.propTypes = _props.propTypes, _TopNavBarItem.allowedProps = _props.allowedProps, _TopNavBarItem.defaultProps = {
|
|
585
585
|
status: 'default',
|
|
586
586
|
variant: 'default',
|
|
587
587
|
showSubmenuChevron: true,
|
|
588
588
|
shouldCloseOnClick: 'auto'
|
|
589
|
-
}, _TopNavBarItem.contextType = _TopNavBarContext.TopNavBarContext, _TopNavBarItem)) || _class) || _class);
|
|
589
|
+
}, _TopNavBarItem.contextType = _TopNavBarContext.TopNavBarContext, _TopNavBarItem)) || _class) || _class) || _class);
|
|
590
590
|
var _default = exports.default = TopNavBarItem;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.allowedProps = void 0;
|
|
7
|
+
exports.topNavBarItemTooltipPropType = exports.propTypes = exports.allowedProps = void 0;
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _Children = require("@instructure/ui-prop-types/lib/Children.js");
|
|
10
|
+
var _Drilldown = require("@instructure/ui-drilldown/lib/Drilldown");
|
|
7
11
|
/*
|
|
8
12
|
* The MIT License (MIT)
|
|
9
13
|
*
|
|
@@ -28,4 +32,44 @@ exports.allowedProps = void 0;
|
|
|
28
32
|
* SOFTWARE.
|
|
29
33
|
*/
|
|
30
34
|
|
|
35
|
+
const topNavBarItemTooltipPropType = exports.topNavBarItemTooltipPropType = _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({
|
|
36
|
+
renderTip: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]).isRequired,
|
|
37
|
+
color: _propTypes.default.oneOf(['primary', 'primary-inverse']),
|
|
38
|
+
placement: _propTypes.default.string,
|
|
39
|
+
offsetX: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
40
|
+
offsetY: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
41
|
+
onShowContent: _propTypes.default.func,
|
|
42
|
+
onHideContent: _propTypes.default.func
|
|
43
|
+
})]);
|
|
44
|
+
const propTypes = exports.propTypes = {
|
|
45
|
+
id: _propTypes.default.string.isRequired,
|
|
46
|
+
as: _propTypes.default.elementType,
|
|
47
|
+
children: _propTypes.default.node.isRequired,
|
|
48
|
+
variant: _propTypes.default.oneOf(['default', 'button', 'icon', 'avatar']),
|
|
49
|
+
status: _propTypes.default.oneOf(['default', 'active', 'disabled']),
|
|
50
|
+
renderSubmenu: _Children.Children.oneOf([_Drilldown.Drilldown]),
|
|
51
|
+
showSubmenuChevron: _propTypes.default.bool,
|
|
52
|
+
customPopoverConfig: _propTypes.default.object,
|
|
53
|
+
tooltip: topNavBarItemTooltipPropType,
|
|
54
|
+
renderAvatar: _propTypes.default.shape({
|
|
55
|
+
avatarName: _propTypes.default.string.isRequired,
|
|
56
|
+
avatarSrc: _propTypes.default.string,
|
|
57
|
+
avatarAlt: _propTypes.default.string
|
|
58
|
+
}),
|
|
59
|
+
renderIcon: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
|
|
60
|
+
href: _propTypes.default.string,
|
|
61
|
+
onClick: _propTypes.default.func,
|
|
62
|
+
onHiddenClick: _propTypes.default.func,
|
|
63
|
+
onSubmenuToggle: _propTypes.default.func,
|
|
64
|
+
onMouseOver: _propTypes.default.func,
|
|
65
|
+
onMouseOut: _propTypes.default.func,
|
|
66
|
+
onFocus: _propTypes.default.func,
|
|
67
|
+
onBlur: _propTypes.default.func,
|
|
68
|
+
onKeyDown: _propTypes.default.func,
|
|
69
|
+
onKeyUp: _propTypes.default.func,
|
|
70
|
+
elementRef: _propTypes.default.func,
|
|
71
|
+
itemRef: _propTypes.default.func,
|
|
72
|
+
shouldCloseOnClick: _propTypes.default.oneOf(['auto', 'always', 'never']),
|
|
73
|
+
withFocusOutline: _propTypes.default.bool
|
|
74
|
+
};
|
|
31
75
|
const allowedProps = exports.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'];
|
|
@@ -7,13 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.TopNavBarDesktopLayout = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
10
|
+
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
10
11
|
var _emotion = require("@instructure/emotion");
|
|
11
12
|
var _TopNavBarContext = require("../../TopNavBarContext");
|
|
12
13
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
13
14
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
14
15
|
var _props = require("./props");
|
|
15
16
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
16
|
-
var _dec, _class, _TopNavBarDesktopLayout;
|
|
17
|
+
var _dec, _dec2, _class, _TopNavBarDesktopLayout;
|
|
17
18
|
/*
|
|
18
19
|
* The MIT License (MIT)
|
|
19
20
|
*
|
|
@@ -42,7 +43,7 @@ var _dec, _class, _TopNavBarDesktopLayout;
|
|
|
42
43
|
private: true
|
|
43
44
|
---
|
|
44
45
|
**/
|
|
45
|
-
let TopNavBarDesktopLayout = exports.TopNavBarDesktopLayout = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_TopNavBarDesktopLayout = class TopNavBarDesktopLayout extends _react.Component {
|
|
46
|
+
let TopNavBarDesktopLayout = exports.TopNavBarDesktopLayout = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_TopNavBarDesktopLayout = class TopNavBarDesktopLayout extends _react.Component {
|
|
46
47
|
constructor(...args) {
|
|
47
48
|
super(...args);
|
|
48
49
|
this.ref = null;
|
|
@@ -107,7 +108,6 @@ let TopNavBarDesktopLayout = exports.TopNavBarDesktopLayout = (_dec = (0, _emoti
|
|
|
107
108
|
ref: this.handleRef,
|
|
108
109
|
css: styles === null || styles === void 0 ? void 0 : styles.topNavBarDesktopLayout,
|
|
109
110
|
"aria-label": navLabel,
|
|
110
|
-
"data-cid": "TopNavBarDesktopLayout",
|
|
111
111
|
children: [this.hasBrandBlock && (0, _jsxRuntime.jsx)("div", {
|
|
112
112
|
css: styles === null || styles === void 0 ? void 0 : styles.brandContainer,
|
|
113
113
|
children: renderBrand
|
|
@@ -125,5 +125,5 @@ let TopNavBarDesktopLayout = exports.TopNavBarDesktopLayout = (_dec = (0, _emoti
|
|
|
125
125
|
})]
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
}, _TopNavBarDesktopLayout.displayName = "TopNavBarDesktopLayout", _TopNavBarDesktopLayout.componentId = 'TopNavBar.DesktopLayout', _TopNavBarDesktopLayout.allowedProps = _props.allowedProps, _TopNavBarDesktopLayout.defaultProps = {}, _TopNavBarDesktopLayout.contextType = _TopNavBarContext.TopNavBarContext, _TopNavBarDesktopLayout)) || _class);
|
|
128
|
+
}, _TopNavBarDesktopLayout.displayName = "TopNavBarDesktopLayout", _TopNavBarDesktopLayout.componentId = 'TopNavBar.DesktopLayout', _TopNavBarDesktopLayout.propTypes = _props.propTypes, _TopNavBarDesktopLayout.allowedProps = _props.allowedProps, _TopNavBarDesktopLayout.defaultProps = {}, _TopNavBarDesktopLayout.contextType = _TopNavBarContext.TopNavBarContext, _TopNavBarDesktopLayout)) || _class) || _class);
|
|
129
129
|
var _default = exports.default = TopNavBarDesktopLayout;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.allowedProps = void 0;
|
|
6
|
+
exports.propTypes = exports.allowedProps = void 0;
|
|
7
7
|
var _props = require("../props");
|
|
8
8
|
/*
|
|
9
9
|
* The MIT License (MIT)
|
|
@@ -29,6 +29,11 @@ var _props = require("../props");
|
|
|
29
29
|
* SOFTWARE.
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
|
+
const propTypes = exports.propTypes = {
|
|
33
|
+
// Edit PropTypes in TopNabBarLayout/props.ts
|
|
34
|
+
..._props.commonPropTypes,
|
|
35
|
+
..._props.desktopPropTypes
|
|
36
|
+
};
|
|
32
37
|
const allowedProps = exports.allowedProps = [
|
|
33
38
|
// Edit allowed props in TopNabBarLayout/props.ts
|
|
34
39
|
..._props.commonAllowedProps, ..._props.desktopAllowedProps];
|
|
@@ -11,6 +11,7 @@ var _withDeterministicId = require("@instructure/ui-react-utils/lib/Deterministi
|
|
|
11
11
|
var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
|
|
12
12
|
var _px = require("@instructure/ui-utils/lib/px.js");
|
|
13
13
|
var _console = require("@instructure/console");
|
|
14
|
+
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
14
15
|
var _getBoundingClientRect = require("@instructure/ui-dom-utils/lib/getBoundingClientRect.js");
|
|
15
16
|
var _requestAnimationFrame = require("@instructure/ui-dom-utils/lib/requestAnimationFrame.js");
|
|
16
17
|
var _emotion = require("@instructure/emotion");
|
|
@@ -29,7 +30,7 @@ var _styles = _interopRequireDefault(require("./styles"));
|
|
|
29
30
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
30
31
|
var _props = require("./props");
|
|
31
32
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
32
|
-
var _dec, _dec2, _class, _TopNavBarSmallViewportLayout, _IconXLine, _IconHamburgerLine;
|
|
33
|
+
var _dec, _dec2, _dec3, _class, _TopNavBarSmallViewportLayout, _IconXLine, _IconHamburgerLine;
|
|
33
34
|
/*
|
|
34
35
|
* The MIT License (MIT)
|
|
35
36
|
*
|
|
@@ -58,7 +59,7 @@ var _dec, _dec2, _class, _TopNavBarSmallViewportLayout, _IconXLine, _IconHamburg
|
|
|
58
59
|
private: true
|
|
59
60
|
---
|
|
60
61
|
**/
|
|
61
|
-
let TopNavBarSmallViewportLayout = exports.TopNavBarSmallViewportLayout = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = (_TopNavBarSmallViewportLayout = class TopNavBarSmallViewportLayout extends _react.Component {
|
|
62
|
+
let TopNavBarSmallViewportLayout = exports.TopNavBarSmallViewportLayout = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _testable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_TopNavBarSmallViewportLayout = class TopNavBarSmallViewportLayout extends _react.Component {
|
|
62
63
|
constructor(props) {
|
|
63
64
|
var _props$styles;
|
|
64
65
|
super(props);
|
|
@@ -456,7 +457,6 @@ let TopNavBarSmallViewportLayout = exports.TopNavBarSmallViewportLayout = (_dec
|
|
|
456
457
|
...(0, _omitProps.omitProps)(this.props, _props.allowedProps),
|
|
457
458
|
ref: this.handleRef,
|
|
458
459
|
"aria-label": navLabel,
|
|
459
|
-
"data-cid": "TopNavBarSmallViewportLayout",
|
|
460
460
|
children: [(0, _jsxRuntime.jsx)(_emotion.Global, {
|
|
461
461
|
styles: styles === null || styles === void 0 ? void 0 : styles.globalStyles
|
|
462
462
|
}), this.hasBreadcrumbBlock && (0, _jsxRuntime.jsx)("div", {
|
|
@@ -468,5 +468,5 @@ let TopNavBarSmallViewportLayout = exports.TopNavBarSmallViewportLayout = (_dec
|
|
|
468
468
|
}), !this.hasBreadcrumbBlock && this.renderInPlaceDialog(), !this.hasBreadcrumbBlock && this.renderDropdownMenuTray()]
|
|
469
469
|
});
|
|
470
470
|
}
|
|
471
|
-
}, _TopNavBarSmallViewportLayout.displayName = "TopNavBarSmallViewportLayout", _TopNavBarSmallViewportLayout.componentId = 'TopNavBar.SmallViewportLayout', _TopNavBarSmallViewportLayout.allowedProps = _props.allowedProps, _TopNavBarSmallViewportLayout.defaultProps = {}, _TopNavBarSmallViewportLayout.contextType = _TopNavBarContext.TopNavBarContext, _TopNavBarSmallViewportLayout)) || _class) || _class);
|
|
471
|
+
}, _TopNavBarSmallViewportLayout.displayName = "TopNavBarSmallViewportLayout", _TopNavBarSmallViewportLayout.componentId = 'TopNavBar.SmallViewportLayout', _TopNavBarSmallViewportLayout.propTypes = _props.propTypes, _TopNavBarSmallViewportLayout.allowedProps = _props.allowedProps, _TopNavBarSmallViewportLayout.defaultProps = {}, _TopNavBarSmallViewportLayout.contextType = _TopNavBarContext.TopNavBarContext, _TopNavBarSmallViewportLayout)) || _class) || _class) || _class);
|
|
472
472
|
var _default = exports.default = TopNavBarSmallViewportLayout;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.allowedProps = void 0;
|
|
6
|
+
exports.propTypes = exports.allowedProps = void 0;
|
|
7
7
|
var _props = require("../props");
|
|
8
8
|
/*
|
|
9
9
|
* The MIT License (MIT)
|
|
@@ -29,6 +29,11 @@ var _props = require("../props");
|
|
|
29
29
|
* SOFTWARE.
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
|
+
const propTypes = exports.propTypes = {
|
|
33
|
+
// Edit PropTypes in TopNavBarLayout/props.ts
|
|
34
|
+
..._props.commonPropTypes,
|
|
35
|
+
..._props.smallViewportPropTypes
|
|
36
|
+
};
|
|
32
37
|
const allowedProps = exports.allowedProps = [
|
|
33
38
|
// Edit allowed props in TopNavBarLayout/props.ts
|
|
34
39
|
..._props.commonAllowedProps, ..._props.smallViewportAllowedProps];
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.TopNavBarLayout = void 0;
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
9
|
var _react = require("react");
|
|
10
|
+
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
10
11
|
var _emotion = require("@instructure/emotion");
|
|
11
12
|
var _TopNavBarContext = require("../TopNavBarContext");
|
|
12
13
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -15,7 +16,7 @@ var _DesktopLayout = require("./DesktopLayout");
|
|
|
15
16
|
var _props = require("./props");
|
|
16
17
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
17
18
|
const _excluded = ["smallViewportConfig", "styles", "makeStyles"];
|
|
18
|
-
var _dec, _class, _TopNavBarLayout;
|
|
19
|
+
var _dec, _dec2, _class, _TopNavBarLayout;
|
|
19
20
|
/*
|
|
20
21
|
* The MIT License (MIT)
|
|
21
22
|
*
|
|
@@ -46,7 +47,7 @@ id: TopNavBar.Layout
|
|
|
46
47
|
---
|
|
47
48
|
@module TopNavBarLayout
|
|
48
49
|
**/
|
|
49
|
-
let TopNavBarLayout = exports.TopNavBarLayout = (_dec = (0, _emotion.withStyle)(null, _theme.default), _dec(_class = (_TopNavBarLayout = class TopNavBarLayout extends _react.Component {
|
|
50
|
+
let TopNavBarLayout = exports.TopNavBarLayout = (_dec = (0, _emotion.withStyle)(null, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_TopNavBarLayout = class TopNavBarLayout extends _react.Component {
|
|
50
51
|
constructor(...args) {
|
|
51
52
|
super(...args);
|
|
52
53
|
this.ref = null;
|
|
@@ -109,7 +110,7 @@ let TopNavBarLayout = exports.TopNavBarLayout = (_dec = (0, _emotion.withStyle)(
|
|
|
109
110
|
elementRef: this.handleRef
|
|
110
111
|
});
|
|
111
112
|
}
|
|
112
|
-
}, _TopNavBarLayout.displayName = "TopNavBarLayout", _TopNavBarLayout.componentId = 'TopNavBar.Layout', _TopNavBarLayout.allowedProps = _props.allowedProps, _TopNavBarLayout.defaultProps = {
|
|
113
|
+
}, _TopNavBarLayout.displayName = "TopNavBarLayout", _TopNavBarLayout.componentId = 'TopNavBar.Layout', _TopNavBarLayout.propTypes = _props.propTypes, _TopNavBarLayout.allowedProps = _props.allowedProps, _TopNavBarLayout.defaultProps = {
|
|
113
114
|
smallViewportConfig: {}
|
|
114
|
-
}, _TopNavBarLayout.contextType = _TopNavBarContext.TopNavBarContext, _TopNavBarLayout)) || _class);
|
|
115
|
+
}, _TopNavBarLayout.contextType = _TopNavBarContext.TopNavBarContext, _TopNavBarLayout)) || _class) || _class);
|
|
115
116
|
var _default = exports.default = TopNavBarLayout;
|