@instructure/ui-navigation 8.18.0 → 8.18.1-snapshot.12
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/LICENSE.md +27 -0
- package/es/AppNav/Item/index.js +17 -11
- package/es/AppNav/Item/theme.js +6 -6
- package/es/AppNav/index.js +21 -11
- package/es/AppNav/theme.js +5 -5
- package/es/Navigation/NavigationItem/index.js +19 -13
- package/es/Navigation/NavigationItem/theme.js +15 -15
- package/es/Navigation/index.js +15 -7
- package/es/Navigation/theme.js +9 -9
- package/lib/AppNav/Item/index.js +17 -11
- package/lib/AppNav/Item/theme.js +6 -6
- package/lib/AppNav/index.js +21 -11
- package/lib/AppNav/theme.js +5 -5
- package/lib/Navigation/NavigationItem/index.js +19 -13
- package/lib/Navigation/NavigationItem/theme.js +15 -15
- package/lib/Navigation/index.js +15 -7
- package/lib/Navigation/theme.js +9 -9
- package/package.json +25 -24
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -53,24 +53,24 @@ const generateComponentTheme = theme => {
|
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
const componentVariables = {
|
|
56
|
-
fontSize: typography
|
|
57
|
-
fontFamily: typography
|
|
58
|
-
fontWeight: typography
|
|
59
|
-
fontColor: colors
|
|
56
|
+
fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
|
|
57
|
+
fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
58
|
+
fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightLight,
|
|
59
|
+
fontColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
|
|
60
60
|
iconSize: '1.625rem',
|
|
61
|
-
iconColor: colors
|
|
62
|
-
lineHeight: typography
|
|
61
|
+
iconColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
|
|
62
|
+
lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeight,
|
|
63
63
|
backgroundColor: 'transparent',
|
|
64
64
|
linkTextDecoration: 'none',
|
|
65
|
-
hoverBackgroundColor: colors
|
|
66
|
-
outerFocusOutline: `inset 0 0 0 0.125rem ${colors
|
|
67
|
-
innerFocusOutline: `inset 0 0 0 0.25rem ${colors
|
|
68
|
-
selectedFontColor: colors
|
|
69
|
-
selectedIconColor: colors
|
|
70
|
-
selectedBackgroundColor: colors
|
|
71
|
-
selectedOuterFocusOutline: `inset 0 0 0 0.125rem ${colors
|
|
72
|
-
selectedInnerFocusOutline: `inset 0 0 0 0.25rem ${colors
|
|
73
|
-
contentPadding: spacing
|
|
65
|
+
hoverBackgroundColor: colors === null || colors === void 0 ? void 0 : colors.backgroundDarkest,
|
|
66
|
+
outerFocusOutline: `inset 0 0 0 0.125rem ${colors === null || colors === void 0 ? void 0 : colors.borderDarkest}`,
|
|
67
|
+
innerFocusOutline: `inset 0 0 0 0.25rem ${colors === null || colors === void 0 ? void 0 : colors.borderLightest}`,
|
|
68
|
+
selectedFontColor: colors === null || colors === void 0 ? void 0 : colors.textBrand,
|
|
69
|
+
selectedIconColor: colors === null || colors === void 0 ? void 0 : colors.textBrand,
|
|
70
|
+
selectedBackgroundColor: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
|
|
71
|
+
selectedOuterFocusOutline: `inset 0 0 0 0.125rem ${colors === null || colors === void 0 ? void 0 : colors.borderLightest}`,
|
|
72
|
+
selectedInnerFocusOutline: `inset 0 0 0 0.25rem ${colors === null || colors === void 0 ? void 0 : colors.borderBrand}`,
|
|
73
|
+
contentPadding: spacing === null || spacing === void 0 ? void 0 : spacing.xxSmall
|
|
74
74
|
};
|
|
75
75
|
return { ...componentVariables,
|
|
76
76
|
...themeSpecificStyle[themeName]
|
package/lib/Navigation/index.js
CHANGED
|
@@ -72,13 +72,17 @@ let Navigation = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
componentDidMount() {
|
|
75
|
-
|
|
75
|
+
var _this$props$makeStyle, _this$props;
|
|
76
|
+
|
|
77
|
+
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props, {
|
|
76
78
|
minimized: this.minimized
|
|
77
79
|
});
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
componentDidUpdate() {
|
|
81
|
-
|
|
83
|
+
var _this$props$makeStyle2, _this$props2;
|
|
84
|
+
|
|
85
|
+
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2, {
|
|
82
86
|
minimized: this.minimized
|
|
83
87
|
});
|
|
84
88
|
}
|
|
@@ -98,11 +102,13 @@ let Navigation = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default
|
|
|
98
102
|
|
|
99
103
|
renderChildren() {
|
|
100
104
|
return _react.Children.map(this.props.children, child => {
|
|
105
|
+
var _this$props$styles;
|
|
106
|
+
|
|
101
107
|
const navItem = (0, _safeCloneElement.safeCloneElement)(child, {
|
|
102
108
|
minimized: this.state.minimized
|
|
103
109
|
});
|
|
104
110
|
return (0, _emotion.jsx)("li", {
|
|
105
|
-
css: this.props.styles
|
|
111
|
+
css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.list
|
|
106
112
|
}, navItem);
|
|
107
113
|
});
|
|
108
114
|
}
|
|
@@ -112,23 +118,25 @@ let Navigation = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default
|
|
|
112
118
|
}
|
|
113
119
|
|
|
114
120
|
render() {
|
|
121
|
+
var _this$props$styles2, _this$props$styles3, _this$props$styles4, _this$props$styles5;
|
|
122
|
+
|
|
115
123
|
const label = this.props.label;
|
|
116
124
|
const props = (0, _omitProps.omitProps)(this.props, Navigation.allowedProps, ['minimized']);
|
|
117
125
|
return (0, _emotion.jsx)("nav", Object.assign({}, props, {
|
|
118
|
-
css: this.props.styles
|
|
126
|
+
css: (_this$props$styles2 = this.props.styles) === null || _this$props$styles2 === void 0 ? void 0 : _this$props$styles2.navigation,
|
|
119
127
|
"aria-label": label,
|
|
120
128
|
ref: element => {
|
|
121
129
|
this.ref = element;
|
|
122
130
|
}
|
|
123
131
|
}), (0, _emotion.jsx)("ul", {
|
|
124
|
-
css: this.props.styles
|
|
132
|
+
css: (_this$props$styles3 = this.props.styles) === null || _this$props$styles3 === void 0 ? void 0 : _this$props$styles3.content
|
|
125
133
|
}, this.renderChildren()), (0, _emotion.jsx)("div", {
|
|
126
|
-
css: this.props.styles
|
|
134
|
+
css: (_this$props$styles4 = this.props.styles) === null || _this$props$styles4 === void 0 ? void 0 : _this$props$styles4.toggle
|
|
127
135
|
}, (0, _emotion.jsx)(_NavigationItem.NavigationItem, {
|
|
128
136
|
"aria-expanded": !this.minimized,
|
|
129
137
|
onClick: this.handleNavToggle,
|
|
130
138
|
icon: (0, _emotion.jsx)(_IconMoveStartLine.IconMoveStartLine, {
|
|
131
|
-
css: this.props.styles
|
|
139
|
+
css: (_this$props$styles5 = this.props.styles) === null || _this$props$styles5 === void 0 ? void 0 : _this$props$styles5.toggleIcon,
|
|
132
140
|
inline: false
|
|
133
141
|
}),
|
|
134
142
|
label: (0, _emotion.jsx)(_ScreenReaderContent.ScreenReaderContent, null, this.toggleMessage())
|
package/lib/Navigation/theme.js
CHANGED
|
@@ -48,17 +48,17 @@ const generateComponentTheme = theme => {
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
const componentVariables = {
|
|
51
|
-
fontColor: colors
|
|
52
|
-
backgroundColor: colors
|
|
51
|
+
fontColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
|
|
52
|
+
backgroundColor: colors === null || colors === void 0 ? void 0 : colors.backgroundBrandSecondary,
|
|
53
53
|
width: '5.25rem',
|
|
54
54
|
minimizedWidth: '3.375rem',
|
|
55
|
-
fill: colors
|
|
56
|
-
focusOutlineInnerWidth: borders
|
|
57
|
-
focusOutlineOuterWidth: borders
|
|
58
|
-
focusOutlineInnerColor: colors
|
|
59
|
-
focusOutlineOuterColor: colors
|
|
60
|
-
marginBottom: spacing
|
|
61
|
-
toggleTransition: transitions
|
|
55
|
+
fill: colors === null || colors === void 0 ? void 0 : colors.textLightest,
|
|
56
|
+
focusOutlineInnerWidth: borders === null || borders === void 0 ? void 0 : borders.widthMedium,
|
|
57
|
+
focusOutlineOuterWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
|
|
58
|
+
focusOutlineInnerColor: colors === null || colors === void 0 ? void 0 : colors.borderBrand,
|
|
59
|
+
focusOutlineOuterColor: colors === null || colors === void 0 ? void 0 : colors.borderLightest,
|
|
60
|
+
marginBottom: spacing === null || spacing === void 0 ? void 0 : spacing.small,
|
|
61
|
+
toggleTransition: transitions === null || transitions === void 0 ? void 0 : transitions.duration
|
|
62
62
|
};
|
|
63
63
|
return { ...componentVariables,
|
|
64
64
|
...themeSpecificStyle[themeName]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-navigation",
|
|
3
|
-
"version": "8.18.
|
|
3
|
+
"version": "8.18.1-snapshot.12+ca14b3dc8",
|
|
4
4
|
"description": "Main and application level navigational components",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,31 +23,31 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "8.18.
|
|
27
|
-
"@instructure/ui-color-utils": "8.18.
|
|
28
|
-
"@instructure/ui-test-locator": "8.18.
|
|
29
|
-
"@instructure/ui-test-utils": "8.18.
|
|
30
|
-
"@instructure/ui-themes": "8.18.
|
|
26
|
+
"@instructure/ui-babel-preset": "8.18.1-snapshot.12+ca14b3dc8",
|
|
27
|
+
"@instructure/ui-color-utils": "8.18.1-snapshot.12+ca14b3dc8",
|
|
28
|
+
"@instructure/ui-test-locator": "8.18.1-snapshot.12+ca14b3dc8",
|
|
29
|
+
"@instructure/ui-test-utils": "8.18.1-snapshot.12+ca14b3dc8",
|
|
30
|
+
"@instructure/ui-themes": "8.18.1-snapshot.12+ca14b3dc8"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.13.10",
|
|
34
|
-
"@instructure/console": "8.18.
|
|
35
|
-
"@instructure/debounce": "8.18.
|
|
36
|
-
"@instructure/emotion": "8.18.
|
|
37
|
-
"@instructure/shared-types": "8.18.
|
|
38
|
-
"@instructure/ui-a11y-content": "8.18.
|
|
39
|
-
"@instructure/ui-a11y-utils": "8.18.
|
|
40
|
-
"@instructure/ui-badge": "8.18.
|
|
41
|
-
"@instructure/ui-dom-utils": "8.18.
|
|
42
|
-
"@instructure/ui-focusable": "8.18.
|
|
43
|
-
"@instructure/ui-icons": "8.18.
|
|
44
|
-
"@instructure/ui-menu": "8.18.
|
|
45
|
-
"@instructure/ui-prop-types": "8.18.
|
|
46
|
-
"@instructure/ui-react-utils": "8.18.
|
|
47
|
-
"@instructure/ui-testable": "8.18.
|
|
48
|
-
"@instructure/ui-tooltip": "8.18.
|
|
49
|
-
"@instructure/ui-utils": "8.18.
|
|
50
|
-
"@instructure/ui-view": "8.18.
|
|
34
|
+
"@instructure/console": "8.18.1-snapshot.12+ca14b3dc8",
|
|
35
|
+
"@instructure/debounce": "8.18.1-snapshot.12+ca14b3dc8",
|
|
36
|
+
"@instructure/emotion": "8.18.1-snapshot.12+ca14b3dc8",
|
|
37
|
+
"@instructure/shared-types": "8.18.1-snapshot.12+ca14b3dc8",
|
|
38
|
+
"@instructure/ui-a11y-content": "8.18.1-snapshot.12+ca14b3dc8",
|
|
39
|
+
"@instructure/ui-a11y-utils": "8.18.1-snapshot.12+ca14b3dc8",
|
|
40
|
+
"@instructure/ui-badge": "8.18.1-snapshot.12+ca14b3dc8",
|
|
41
|
+
"@instructure/ui-dom-utils": "8.18.1-snapshot.12+ca14b3dc8",
|
|
42
|
+
"@instructure/ui-focusable": "8.18.1-snapshot.12+ca14b3dc8",
|
|
43
|
+
"@instructure/ui-icons": "8.18.1-snapshot.12+ca14b3dc8",
|
|
44
|
+
"@instructure/ui-menu": "8.18.1-snapshot.12+ca14b3dc8",
|
|
45
|
+
"@instructure/ui-prop-types": "8.18.1-snapshot.12+ca14b3dc8",
|
|
46
|
+
"@instructure/ui-react-utils": "8.18.1-snapshot.12+ca14b3dc8",
|
|
47
|
+
"@instructure/ui-testable": "8.18.1-snapshot.12+ca14b3dc8",
|
|
48
|
+
"@instructure/ui-tooltip": "8.18.1-snapshot.12+ca14b3dc8",
|
|
49
|
+
"@instructure/ui-utils": "8.18.1-snapshot.12+ca14b3dc8",
|
|
50
|
+
"@instructure/ui-view": "8.18.1-snapshot.12+ca14b3dc8",
|
|
51
51
|
"prop-types": "^15"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
@@ -56,5 +56,6 @@
|
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
|
-
"sideEffects": false
|
|
59
|
+
"sideEffects": false,
|
|
60
|
+
"gitHead": "ca14b3dc8f0315daef7b86aa05f711e6d6684c58"
|
|
60
61
|
}
|