@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.
@@ -53,24 +53,24 @@ const generateComponentTheme = theme => {
53
53
  }
54
54
  };
55
55
  const componentVariables = {
56
- fontSize: typography?.fontSizeSmall,
57
- fontFamily: typography?.fontFamily,
58
- fontWeight: typography?.fontWeightLight,
59
- fontColor: colors?.textLightest,
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?.textLightest,
62
- lineHeight: typography?.lineHeight,
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?.backgroundDarkest,
66
- outerFocusOutline: `inset 0 0 0 0.125rem ${colors?.borderDarkest}`,
67
- innerFocusOutline: `inset 0 0 0 0.25rem ${colors?.borderLightest}`,
68
- selectedFontColor: colors?.textBrand,
69
- selectedIconColor: colors?.textBrand,
70
- selectedBackgroundColor: colors?.backgroundLightest,
71
- selectedOuterFocusOutline: `inset 0 0 0 0.125rem ${colors?.borderLightest}`,
72
- selectedInnerFocusOutline: `inset 0 0 0 0.25rem ${colors?.borderBrand}`,
73
- contentPadding: spacing?.xxSmall
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]
@@ -72,13 +72,17 @@ let Navigation = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default
72
72
  }
73
73
 
74
74
  componentDidMount() {
75
- this.props.makeStyles?.({
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
- this.props.makeStyles?.({
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?.list
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?.navigation,
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?.content
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?.toggle
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?.toggleIcon,
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())
@@ -48,17 +48,17 @@ const generateComponentTheme = theme => {
48
48
  }
49
49
  };
50
50
  const componentVariables = {
51
- fontColor: colors?.textLightest,
52
- backgroundColor: colors?.backgroundBrandSecondary,
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?.textLightest,
56
- focusOutlineInnerWidth: borders?.widthMedium,
57
- focusOutlineOuterWidth: borders?.widthSmall,
58
- focusOutlineInnerColor: colors?.borderBrand,
59
- focusOutlineOuterColor: colors?.borderLightest,
60
- marginBottom: spacing?.small,
61
- toggleTransition: transitions?.duration
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.0",
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.0",
27
- "@instructure/ui-color-utils": "8.18.0",
28
- "@instructure/ui-test-locator": "8.18.0",
29
- "@instructure/ui-test-utils": "8.18.0",
30
- "@instructure/ui-themes": "8.18.0"
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.0",
35
- "@instructure/debounce": "8.18.0",
36
- "@instructure/emotion": "8.18.0",
37
- "@instructure/shared-types": "8.18.0",
38
- "@instructure/ui-a11y-content": "8.18.0",
39
- "@instructure/ui-a11y-utils": "8.18.0",
40
- "@instructure/ui-badge": "8.18.0",
41
- "@instructure/ui-dom-utils": "8.18.0",
42
- "@instructure/ui-focusable": "8.18.0",
43
- "@instructure/ui-icons": "8.18.0",
44
- "@instructure/ui-menu": "8.18.0",
45
- "@instructure/ui-prop-types": "8.18.0",
46
- "@instructure/ui-react-utils": "8.18.0",
47
- "@instructure/ui-testable": "8.18.0",
48
- "@instructure/ui-tooltip": "8.18.0",
49
- "@instructure/ui-utils": "8.18.0",
50
- "@instructure/ui-view": "8.18.0",
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
  }