@instructure/ui-top-nav-bar 8.33.1 → 8.33.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/es/TopNavBar/TopNavBarActionItems/TopNavBarActionItemsLocator.js +4 -2
- package/es/TopNavBar/TopNavBarActionItems/index.js +10 -35
- package/es/TopNavBar/TopNavBarActionItems/props.js +1 -0
- package/es/TopNavBar/TopNavBarActionItems/styles.js +0 -1
- package/es/TopNavBar/TopNavBarActionItems/theme.js +4 -4
- package/es/TopNavBar/TopNavBarBrand/TopNavBarBrandLocator.js +3 -5
- package/es/TopNavBar/TopNavBarBrand/index.js +6 -17
- package/es/TopNavBar/TopNavBarBrand/props.js +1 -0
- package/es/TopNavBar/TopNavBarBrand/styles.js +1 -2
- package/es/TopNavBar/TopNavBarBrand/theme.js +2 -2
- package/es/TopNavBar/TopNavBarContext.js +1 -1
- package/es/TopNavBar/TopNavBarItem/TopNavBarItemLocator.js +12 -15
- package/es/TopNavBar/TopNavBarItem/index.js +49 -136
- package/es/TopNavBar/TopNavBarItem/props.js +1 -0
- package/es/TopNavBar/TopNavBarItem/styles.js +5 -6
- package/es/TopNavBar/TopNavBarItem/theme.js +5 -5
- package/es/TopNavBar/TopNavBarLayout/DesktopLayout/TopNavBarDesktopLayoutLocator.js +3 -6
- package/es/TopNavBar/TopNavBarLayout/DesktopLayout/index.js +6 -20
- package/es/TopNavBar/TopNavBarLayout/DesktopLayout/props.js +5 -2
- package/es/TopNavBar/TopNavBarLayout/DesktopLayout/styles.js +3 -4
- package/es/TopNavBar/TopNavBarLayout/DesktopLayout/theme.js +6 -6
- package/es/TopNavBar/TopNavBarLayout/SmallViewportLayout/TopNavBarSmallViewportLayoutLocator.js +8 -16
- package/es/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.js +25 -83
- package/es/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.js +5 -2
- package/es/TopNavBar/TopNavBarLayout/SmallViewportLayout/styles.js +4 -5
- package/es/TopNavBar/TopNavBarLayout/SmallViewportLayout/theme.js +6 -6
- package/es/TopNavBar/TopNavBarLayout/TopNavBarLayoutLocator.js +3 -1
- package/es/TopNavBar/TopNavBarLayout/index.js +8 -19
- package/es/TopNavBar/TopNavBarLayout/props.js +3 -1
- package/es/TopNavBar/TopNavBarLayout/theme.js +6 -4
- package/es/TopNavBar/TopNavBarLocator.js +2 -1
- package/es/TopNavBar/TopNavBarMenuItems/TopNavBarMenuItemsLocator.js +4 -4
- package/es/TopNavBar/TopNavBarMenuItems/index.js +9 -35
- package/es/TopNavBar/TopNavBarMenuItems/props.js +1 -0
- package/es/TopNavBar/TopNavBarMenuItems/styles.js +0 -1
- package/es/TopNavBar/TopNavBarMenuItems/theme.js +3 -3
- package/es/TopNavBar/TopNavBarUser/TopNavBarUserLocator.js +3 -1
- package/es/TopNavBar/TopNavBarUser/index.js +2 -18
- package/es/TopNavBar/TopNavBarUser/props.js +1 -0
- package/es/TopNavBar/TopNavBarUser/styles.js +0 -1
- package/es/TopNavBar/index.js +4 -12
- package/es/TopNavBar/props.js +1 -0
- package/es/TopNavBar/utils/exampleHelpers.js +9 -17
- package/es/TopNavBar/utils/exampleSvgFiles.js +1 -4
- package/es/TopNavBar/utils/mapItemsForDrilldown.js +16 -25
- package/es/index.js +1 -0
- package/lib/TopNavBar/TopNavBarActionItems/TopNavBarActionItemsLocator.js +3 -6
- package/lib/TopNavBar/TopNavBarActionItems/index.js +10 -55
- package/lib/TopNavBar/TopNavBarActionItems/props.js +1 -6
- package/lib/TopNavBar/TopNavBarActionItems/styles.js +0 -2
- package/lib/TopNavBar/TopNavBarActionItems/theme.js +4 -5
- package/lib/TopNavBar/TopNavBarBrand/TopNavBarBrandLocator.js +1 -8
- package/lib/TopNavBar/TopNavBarBrand/index.js +6 -30
- package/lib/TopNavBar/TopNavBarBrand/props.js +1 -3
- package/lib/TopNavBar/TopNavBarBrand/styles.js +1 -3
- package/lib/TopNavBar/TopNavBarBrand/theme.js +2 -3
- package/lib/TopNavBar/TopNavBarContext.js +0 -2
- package/lib/TopNavBar/TopNavBarItem/TopNavBarItemLocator.js +5 -15
- package/lib/TopNavBar/TopNavBarItem/index.js +49 -162
- package/lib/TopNavBar/TopNavBarItem/props.js +1 -6
- package/lib/TopNavBar/TopNavBarItem/styles.js +5 -7
- package/lib/TopNavBar/TopNavBarItem/theme.js +5 -6
- package/lib/TopNavBar/TopNavBarLayout/DesktopLayout/TopNavBarDesktopLayoutLocator.js +3 -15
- package/lib/TopNavBar/TopNavBarLayout/DesktopLayout/index.js +6 -30
- package/lib/TopNavBar/TopNavBarLayout/DesktopLayout/props.js +5 -4
- package/lib/TopNavBar/TopNavBarLayout/DesktopLayout/styles.js +3 -5
- package/lib/TopNavBar/TopNavBarLayout/DesktopLayout/theme.js +6 -7
- package/lib/TopNavBar/TopNavBarLayout/SmallViewportLayout/TopNavBarSmallViewportLayoutLocator.js +5 -21
- package/lib/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.js +25 -111
- package/lib/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.js +5 -4
- package/lib/TopNavBar/TopNavBarLayout/SmallViewportLayout/styles.js +4 -6
- package/lib/TopNavBar/TopNavBarLayout/SmallViewportLayout/theme.js +6 -7
- package/lib/TopNavBar/TopNavBarLayout/TopNavBarLayoutLocator.js +1 -5
- package/lib/TopNavBar/TopNavBarLayout/index.js +8 -30
- package/lib/TopNavBar/TopNavBarLayout/props.js +3 -11
- package/lib/TopNavBar/TopNavBarLayout/theme.js +4 -7
- package/lib/TopNavBar/TopNavBarLocator.js +1 -3
- package/lib/TopNavBar/TopNavBarMenuItems/TopNavBarMenuItemsLocator.js +1 -7
- package/lib/TopNavBar/TopNavBarMenuItems/index.js +9 -52
- package/lib/TopNavBar/TopNavBarMenuItems/props.js +1 -5
- package/lib/TopNavBar/TopNavBarMenuItems/styles.js +0 -2
- package/lib/TopNavBar/TopNavBarMenuItems/theme.js +3 -4
- package/lib/TopNavBar/TopNavBarUser/TopNavBarUserLocator.js +1 -3
- package/lib/TopNavBar/TopNavBarUser/index.js +2 -29
- package/lib/TopNavBar/TopNavBarUser/props.js +1 -5
- package/lib/TopNavBar/TopNavBarUser/styles.js +0 -2
- package/lib/TopNavBar/index.js +3 -27
- package/lib/TopNavBar/props.js +1 -3
- package/lib/TopNavBar/utils/exampleHelpers.js +9 -39
- package/lib/TopNavBar/utils/exampleSvgFiles.js +0 -6
- package/lib/TopNavBar/utils/mapItemsForDrilldown.js +16 -37
- package/lib/index.js +0 -1
- package/package.json +27 -27
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
/*
|
|
9
8
|
* The MIT License (MIT)
|
|
10
9
|
*
|
|
@@ -36,9 +35,9 @@ exports.default = void 0;
|
|
|
36
35
|
*/
|
|
37
36
|
const generateComponentTheme = theme => {
|
|
38
37
|
const colors = theme.colors,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
spacing = theme.spacing,
|
|
39
|
+
typography = theme.typography,
|
|
40
|
+
borders = theme.borders;
|
|
42
41
|
const componentVariables = {
|
|
43
42
|
fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
|
|
44
43
|
fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
@@ -54,9 +53,9 @@ const generateComponentTheme = theme => {
|
|
|
54
53
|
activeIndicatorColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
|
|
55
54
|
activeIndicatorColorInverse: colors.textDarkest
|
|
56
55
|
};
|
|
57
|
-
return {
|
|
56
|
+
return {
|
|
57
|
+
...componentVariables
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
|
-
|
|
61
60
|
var _default = generateComponentTheme;
|
|
62
61
|
exports.default = _default;
|
|
@@ -4,23 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.TopNavBarDesktopLayoutLocator = void 0;
|
|
7
|
-
|
|
8
7
|
var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
|
|
9
|
-
|
|
10
8
|
var _uiTestUtils = require("@instructure/ui-test-utils");
|
|
11
|
-
|
|
12
9
|
var _getComputedStyle = require("@instructure/ui-dom-utils/lib/getComputedStyle.js");
|
|
13
|
-
|
|
14
10
|
var _TopNavBarBrandLocator = require("../../TopNavBarBrand/TopNavBarBrandLocator");
|
|
15
|
-
|
|
16
11
|
var _TopNavBarMenuItemsLocator = require("../../TopNavBarMenuItems/TopNavBarMenuItemsLocator");
|
|
17
|
-
|
|
18
12
|
var _TopNavBarActionItemsLocator = require("../../TopNavBarActionItems/TopNavBarActionItemsLocator");
|
|
19
|
-
|
|
20
13
|
var _TopNavBarUserLocator = require("../../TopNavBarUser/TopNavBarUserLocator");
|
|
21
|
-
|
|
22
14
|
var _index = require("./index");
|
|
23
|
-
|
|
24
15
|
/*
|
|
25
16
|
* The MIT License (MIT)
|
|
26
17
|
*
|
|
@@ -44,34 +35,32 @@ var _index = require("./index");
|
|
|
44
35
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
45
36
|
* SOFTWARE.
|
|
46
37
|
*/
|
|
47
|
-
|
|
38
|
+
|
|
39
|
+
const TopNavBarDesktopLayoutLocator = (0, _locator.locator)(
|
|
40
|
+
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
48
41
|
_index.TopNavBarDesktopLayout.selector, {
|
|
49
42
|
findBrandContainer: function () {
|
|
50
43
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
51
44
|
args[_key] = arguments[_key];
|
|
52
45
|
}
|
|
53
|
-
|
|
54
46
|
return (0, _uiTestUtils.find)('[class$=-topNavBarDesktopLayout__brandContainer]', ...args);
|
|
55
47
|
},
|
|
56
48
|
findMenuItemsContainer: function () {
|
|
57
49
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
58
50
|
args[_key2] = arguments[_key2];
|
|
59
51
|
}
|
|
60
|
-
|
|
61
52
|
return (0, _uiTestUtils.find)('[class$=-topNavBarDesktopLayout__menuItemsContainer]', ...args);
|
|
62
53
|
},
|
|
63
54
|
findActionItemsContainer: function () {
|
|
64
55
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
65
56
|
args[_key3] = arguments[_key3];
|
|
66
57
|
}
|
|
67
|
-
|
|
68
58
|
return (0, _uiTestUtils.find)('[class$=-topNavBarDesktopLayout__actionItemsContainer]', ...args);
|
|
69
59
|
},
|
|
70
60
|
findUserContainer: function () {
|
|
71
61
|
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
72
62
|
args[_key4] = arguments[_key4];
|
|
73
63
|
}
|
|
74
|
-
|
|
75
64
|
return (0, _uiTestUtils.find)('[class$=-topNavBarDesktopLayout__userContainer]', ...args);
|
|
76
65
|
},
|
|
77
66
|
findBrand: function () {
|
|
@@ -91,7 +80,6 @@ _index.TopNavBarDesktopLayout.selector, {
|
|
|
91
80
|
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
92
81
|
args[_key5] = arguments[_key5];
|
|
93
82
|
}
|
|
94
|
-
|
|
95
83
|
const user = await (0, _uiTestUtils.find)('[class$=-topNavBarDesktopLayout__userContainer]', ...args);
|
|
96
84
|
return user ? (0, _getComputedStyle.getComputedStyle)(user.getDOMNode(), '::before').backgroundColor : 'rgba(0, 0, 0, 0)';
|
|
97
85
|
} catch {
|
|
@@ -1,32 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.default = exports.TopNavBarDesktopLayout = void 0;
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
15
|
-
|
|
16
11
|
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
17
|
-
|
|
18
12
|
var _emotion = require("@instructure/emotion");
|
|
19
|
-
|
|
20
13
|
var _TopNavBarContext = require("../../TopNavBarContext");
|
|
21
|
-
|
|
22
14
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
23
|
-
|
|
24
15
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
25
|
-
|
|
26
16
|
var _props = require("./props");
|
|
27
|
-
|
|
28
17
|
var _dec, _dec2, _class, _class2;
|
|
29
|
-
|
|
30
18
|
/**
|
|
31
19
|
---
|
|
32
20
|
private: true
|
|
@@ -37,29 +25,22 @@ let TopNavBarDesktopLayout = (_dec = (0, _emotion.withStyle)(_styles.default, _t
|
|
|
37
25
|
constructor() {
|
|
38
26
|
super(...arguments);
|
|
39
27
|
this.ref = null;
|
|
40
|
-
|
|
41
28
|
this.handleRef = el => {
|
|
42
29
|
const elementRef = this.props.elementRef;
|
|
43
30
|
this.ref = el;
|
|
44
|
-
|
|
45
31
|
if (typeof elementRef === 'function') {
|
|
46
32
|
elementRef(el);
|
|
47
33
|
}
|
|
48
34
|
};
|
|
49
35
|
}
|
|
50
|
-
|
|
51
36
|
componentDidMount() {
|
|
52
37
|
var _this$props$makeStyle, _this$props;
|
|
53
|
-
|
|
54
38
|
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props, this.makeStylesVariables);
|
|
55
39
|
}
|
|
56
|
-
|
|
57
40
|
componentDidUpdate() {
|
|
58
41
|
var _this$props$makeStyle2, _this$props2;
|
|
59
|
-
|
|
60
42
|
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2, this.makeStylesVariables);
|
|
61
43
|
}
|
|
62
|
-
|
|
63
44
|
get makeStylesVariables() {
|
|
64
45
|
return {
|
|
65
46
|
inverseColor: this.context.inverseColor,
|
|
@@ -68,30 +49,26 @@ let TopNavBarDesktopLayout = (_dec = (0, _emotion.withStyle)(_styles.default, _t
|
|
|
68
49
|
hasUserBlock: this.hasUserBlock
|
|
69
50
|
};
|
|
70
51
|
}
|
|
71
|
-
|
|
72
52
|
get hasBrandBlock() {
|
|
73
53
|
const renderBrand = this.props.renderBrand;
|
|
74
54
|
return !!renderBrand && (!!renderBrand.props.renderName || !!renderBrand.props.renderIcon);
|
|
75
55
|
}
|
|
76
|
-
|
|
77
56
|
get hasActionItemsBlock() {
|
|
78
57
|
const renderActionItems = this.props.renderActionItems;
|
|
79
58
|
return !!renderActionItems && _react.default.Children.count(renderActionItems.props.children) > 0;
|
|
80
59
|
}
|
|
81
|
-
|
|
82
60
|
get hasUserBlock() {
|
|
83
61
|
const renderUser = this.props.renderUser;
|
|
84
62
|
return !!renderUser && _react.default.Children.count(renderUser.props.children) > 0;
|
|
85
63
|
}
|
|
86
|
-
|
|
87
64
|
render() {
|
|
88
65
|
const _this$props3 = this.props,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
66
|
+
renderBrand = _this$props3.renderBrand,
|
|
67
|
+
renderMenuItems = _this$props3.renderMenuItems,
|
|
68
|
+
renderActionItems = _this$props3.renderActionItems,
|
|
69
|
+
renderUser = _this$props3.renderUser,
|
|
70
|
+
navLabel = _this$props3.navLabel,
|
|
71
|
+
styles = _this$props3.styles;
|
|
95
72
|
return (0, _emotion.jsx)("nav", Object.assign({}, (0, _omitProps.omitProps)(this.props, _props.allowedProps), {
|
|
96
73
|
ref: this.handleRef,
|
|
97
74
|
css: styles === null || styles === void 0 ? void 0 : styles.topNavBarDesktopLayout,
|
|
@@ -106,7 +83,6 @@ let TopNavBarDesktopLayout = (_dec = (0, _emotion.withStyle)(_styles.default, _t
|
|
|
106
83
|
css: styles === null || styles === void 0 ? void 0 : styles.userContainer
|
|
107
84
|
}, renderUser));
|
|
108
85
|
}
|
|
109
|
-
|
|
110
86
|
}, _class2.displayName = "TopNavBarDesktopLayout", _class2.componentId = 'TopNavBar.DesktopLayout', _class2.propTypes = _props.propTypes, _class2.allowedProps = _props.allowedProps, _class2.defaultProps = {}, _class2.contextType = _TopNavBarContext.TopNavBarContext, _class2)) || _class) || _class);
|
|
111
87
|
exports.TopNavBarDesktopLayout = TopNavBarDesktopLayout;
|
|
112
88
|
var _default = TopNavBarDesktopLayout;
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.propTypes = exports.allowedProps = void 0;
|
|
7
|
-
|
|
8
7
|
var _props = require("../props");
|
|
9
|
-
|
|
10
8
|
/*
|
|
11
9
|
* The MIT License (MIT)
|
|
12
10
|
*
|
|
@@ -30,11 +28,14 @@ var _props = require("../props");
|
|
|
30
28
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
31
29
|
* SOFTWARE.
|
|
32
30
|
*/
|
|
33
|
-
|
|
31
|
+
|
|
32
|
+
const propTypes = {
|
|
33
|
+
// Edit PropTypes in TopNabBarLayout/props.ts
|
|
34
34
|
..._props.commonPropTypes,
|
|
35
35
|
..._props.desktopPropTypes
|
|
36
36
|
};
|
|
37
37
|
exports.propTypes = propTypes;
|
|
38
|
-
const allowedProps = [
|
|
38
|
+
const allowedProps = [
|
|
39
|
+
// Edit allowed props in TopNabBarLayout/props.ts
|
|
39
40
|
..._props.commonAllowedProps, ..._props.desktopAllowedProps];
|
|
40
41
|
exports.allowedProps = allowedProps;
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
/*
|
|
9
8
|
* The MIT License (MIT)
|
|
10
9
|
*
|
|
@@ -42,9 +41,9 @@ exports.default = void 0;
|
|
|
42
41
|
const generateStyle = (componentTheme, props, state) => {
|
|
43
42
|
const hideActionsUserSeparator = props.hideActionsUserSeparator;
|
|
44
43
|
const inverseColor = state.inverseColor,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
hasBrandBlock = state.hasBrandBlock,
|
|
45
|
+
hasActionItemsBlock = state.hasActionItemsBlock,
|
|
46
|
+
hasUserBlock = state.hasUserBlock;
|
|
48
47
|
const hasUserSeparator = hasActionItemsBlock && hasUserBlock && !hideActionsUserSeparator;
|
|
49
48
|
return {
|
|
50
49
|
topNavBarDesktopLayout: {
|
|
@@ -118,6 +117,5 @@ const generateStyle = (componentTheme, props, state) => {
|
|
|
118
117
|
}
|
|
119
118
|
};
|
|
120
119
|
};
|
|
121
|
-
|
|
122
120
|
var _default = generateStyle;
|
|
123
121
|
exports.default = _default;
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
/*
|
|
9
8
|
* The MIT License (MIT)
|
|
10
9
|
*
|
|
@@ -36,10 +35,10 @@ exports.default = void 0;
|
|
|
36
35
|
*/
|
|
37
36
|
const generateComponentTheme = theme => {
|
|
38
37
|
const colors = theme.colors,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
stacking = theme.stacking,
|
|
39
|
+
typography = theme.typography,
|
|
40
|
+
spacing = theme.spacing,
|
|
41
|
+
borders = theme.borders;
|
|
43
42
|
const componentVariables = {
|
|
44
43
|
desktopFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
|
|
45
44
|
desktopFontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
@@ -61,9 +60,9 @@ const generateComponentTheme = theme => {
|
|
|
61
60
|
desktopUserSeparatorColor: colors.borderMedium,
|
|
62
61
|
desktopUserSeparatorColorInverse: colors.borderMedium
|
|
63
62
|
};
|
|
64
|
-
return {
|
|
63
|
+
return {
|
|
64
|
+
...componentVariables
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
|
-
|
|
68
67
|
var _default = generateComponentTheme;
|
|
69
68
|
exports.default = _default;
|
package/lib/TopNavBar/TopNavBarLayout/SmallViewportLayout/TopNavBarSmallViewportLayoutLocator.js
CHANGED
|
@@ -4,25 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.TopNavBarSmallViewportLayoutLocator = void 0;
|
|
7
|
-
|
|
8
7
|
var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
|
|
9
|
-
|
|
10
8
|
var _uiTestUtils = require("@instructure/ui-test-utils");
|
|
11
|
-
|
|
12
9
|
var _DrilldownLocator = require("@instructure/ui-drilldown/lib/Drilldown/DrilldownLocator");
|
|
13
|
-
|
|
14
10
|
var _TrayLocator = require("@instructure/ui-tray/lib/Tray/TrayLocator");
|
|
15
|
-
|
|
16
11
|
var _TruncateListLocator = require("@instructure/ui-truncate-list/lib/TruncateList/TruncateListLocator");
|
|
17
|
-
|
|
18
12
|
var _TopNavBarItemLocator = require("../../TopNavBarItem/TopNavBarItemLocator");
|
|
19
|
-
|
|
20
13
|
var _TopNavBarBrandLocator = require("../../TopNavBarBrand/TopNavBarBrandLocator");
|
|
21
|
-
|
|
22
14
|
var _TopNavBarActionItemsLocator = require("../../TopNavBarActionItems/TopNavBarActionItemsLocator");
|
|
23
|
-
|
|
24
15
|
var _index = require("./index");
|
|
25
|
-
|
|
26
16
|
/*
|
|
27
17
|
* The MIT License (MIT)
|
|
28
18
|
*
|
|
@@ -49,40 +39,39 @@ var _index = require("./index");
|
|
|
49
39
|
|
|
50
40
|
/* eslint-disable no-restricted-imports */
|
|
51
41
|
// @ts-expect-error bypass no type definition found error
|
|
42
|
+
|
|
52
43
|
// @ts-expect-error bypass no type definition found error
|
|
44
|
+
|
|
53
45
|
// @ts-expect-error bypass no type definition found error
|
|
54
46
|
|
|
55
47
|
/* eslint-enable no-restricted-imports */
|
|
56
|
-
|
|
48
|
+
|
|
49
|
+
const TopNavBarSmallViewportLayoutLocator = (0, _locator.locator)(
|
|
50
|
+
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
57
51
|
_index.TopNavBarSmallViewportLayout.selector, {
|
|
58
52
|
findNavBar: function () {
|
|
59
53
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
60
54
|
args[_key] = arguments[_key];
|
|
61
55
|
}
|
|
62
|
-
|
|
63
56
|
return (0, _uiTestUtils.find)('[class$=-topNavBarSmallViewportLayout__navbar]', ...args);
|
|
64
57
|
},
|
|
65
58
|
findDropdownMenuTriggerWrapper: function () {
|
|
66
59
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
67
60
|
args[_key2] = arguments[_key2];
|
|
68
61
|
}
|
|
69
|
-
|
|
70
62
|
return (0, _uiTestUtils.find)('[class*=-topNavBarSmallViewportLayout__menuTrigger]', ...args);
|
|
71
63
|
},
|
|
72
64
|
findAlternativeTitleContainer: function () {
|
|
73
65
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
74
66
|
args[_key3] = arguments[_key3];
|
|
75
67
|
}
|
|
76
|
-
|
|
77
68
|
return (0, _uiTestUtils.find)('[class*=-topNavBarSmallViewportLayout__alternativeTitleContainer]', ...args);
|
|
78
69
|
},
|
|
79
70
|
findDropdownMenuTriggerItem: async function () {
|
|
80
71
|
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
81
72
|
args[_key4] = arguments[_key4];
|
|
82
73
|
}
|
|
83
|
-
|
|
84
74
|
const triggerExists = await (0, _uiTestUtils.find)('[id^=TopNavBarSmallViewportLayout-menuTrigger_]', ...args);
|
|
85
|
-
|
|
86
75
|
if (triggerExists) {
|
|
87
76
|
return _TopNavBarItemLocator.TopNavBarItemLocator.find('[id^=TopNavBarSmallViewportLayout-menuTrigger_]');
|
|
88
77
|
} else {
|
|
@@ -93,9 +82,7 @@ _index.TopNavBarSmallViewportLayout.selector, {
|
|
|
93
82
|
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
94
83
|
args[_key5] = arguments[_key5];
|
|
95
84
|
}
|
|
96
|
-
|
|
97
85
|
const triggerExists = await (0, _uiTestUtils.find)('[id^=TopNavBarSmallViewportLayout-menuTrigger_]', ...args);
|
|
98
|
-
|
|
99
86
|
if (triggerExists) {
|
|
100
87
|
const menuItem = await _TopNavBarItemLocator.TopNavBarItemLocator.find('[id^=TopNavBarSmallViewportLayout-menuTrigger_]');
|
|
101
88
|
return menuItem.findButton();
|
|
@@ -107,7 +94,6 @@ _index.TopNavBarSmallViewportLayout.selector, {
|
|
|
107
94
|
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
108
95
|
args[_key6] = arguments[_key6];
|
|
109
96
|
}
|
|
110
|
-
|
|
111
97
|
return (0, _uiTestUtils.find)('[class$=-topNavBarSmallViewportLayout__brandContainer]', ...args);
|
|
112
98
|
},
|
|
113
99
|
findBrand: function () {
|
|
@@ -129,14 +115,12 @@ _index.TopNavBarSmallViewportLayout.selector, {
|
|
|
129
115
|
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|
130
116
|
args[_key7] = arguments[_key7];
|
|
131
117
|
}
|
|
132
|
-
|
|
133
118
|
return (0, _uiTestUtils.find)('[class$=-topNavBarSmallViewportLayout__inPlaceDialogContainer]', ...args);
|
|
134
119
|
},
|
|
135
120
|
findInPlaceDialogCloseButton: function () {
|
|
136
121
|
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
|
137
122
|
args[_key8] = arguments[_key8];
|
|
138
123
|
}
|
|
139
|
-
|
|
140
124
|
return (0, _uiTestUtils.find)('[id^=TopNavBarSmallViewportLayout-inPlaceDialogCloseButton_]', ...args);
|
|
141
125
|
}
|
|
142
126
|
});
|