@instructure/ui-navigation 9.5.2-snapshot-1 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,9 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [9.5.2-snapshot-1](https://github.com/instructure/instructure-ui/compare/v9.5.1...v9.5.2-snapshot-1) (2024-07-31)
6
+ # [10.0.0](https://github.com/instructure/instructure-ui/compare/v9.5.1...v10.0.0) (2024-07-31)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-navigation
8
+
9
+ ### Features
10
+
11
+ * **many:** rewrite color system ([1e5809e](https://github.com/instructure/instructure-ui/commit/1e5809e28dee8c2a71703a429609b8d2f95d76e6))
12
+
13
+
14
+ ### BREAKING CHANGES
15
+
16
+ * **many:** Breaks color overrides in certain cases
9
17
 
10
18
 
11
19
 
@@ -28,6 +28,7 @@
28
28
  * @return {Object} The final theme object with the overrides and component variables
29
29
  */
30
30
  const generateComponentTheme = theme => {
31
+ var _colors$contrasts, _colors$contrasts2, _colors$contrasts3;
31
32
  const colors = theme.colors,
32
33
  spacing = theme.spacing,
33
34
  typography = theme.typography;
@@ -35,11 +36,11 @@ const generateComponentTheme = theme => {
35
36
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
36
37
  fontSize: '1.125rem',
37
38
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
38
- textColor: colors === null || colors === void 0 ? void 0 : colors.textLink,
39
- textColorSelected: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
39
+ textColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.blue4570,
40
+ textColorSelected: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey125125,
40
41
  height: '2.25rem',
41
42
  padding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
42
- backgroundColor: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest
43
+ backgroundColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.white1010
43
44
  };
44
45
  return {
45
46
  ...componentVariables
@@ -28,6 +28,7 @@
28
28
  * @return {Object} The final theme object with the overrides and component variables
29
29
  */
30
30
  const generateComponentTheme = theme => {
31
+ var _colors$contrasts;
31
32
  const colors = theme.colors,
32
33
  borders = theme.borders,
33
34
  spacing = theme.spacing,
@@ -36,7 +37,7 @@ const generateComponentTheme = theme => {
36
37
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
37
38
  height: '3.75rem',
38
39
  // 60px per product design
39
- borderColor: colors === null || colors === void 0 ? void 0 : colors.borderMedium,
40
+ borderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey1214,
40
41
  borderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
41
42
  borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
42
43
  horizontalMargin: spacing === null || spacing === void 0 ? void 0 : spacing.xxSmall,
@@ -34,6 +34,7 @@ exports.default = void 0;
34
34
  * @return {Object} The final theme object with the overrides and component variables
35
35
  */
36
36
  const generateComponentTheme = theme => {
37
+ var _colors$contrasts, _colors$contrasts2, _colors$contrasts3;
37
38
  const colors = theme.colors,
38
39
  spacing = theme.spacing,
39
40
  typography = theme.typography;
@@ -41,11 +42,11 @@ const generateComponentTheme = theme => {
41
42
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
42
43
  fontSize: '1.125rem',
43
44
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
44
- textColor: colors === null || colors === void 0 ? void 0 : colors.textLink,
45
- textColorSelected: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
45
+ textColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.blue4570,
46
+ textColorSelected: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey125125,
46
47
  height: '2.25rem',
47
48
  padding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
48
- backgroundColor: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest
49
+ backgroundColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.white1010
49
50
  };
50
51
  return {
51
52
  ...componentVariables
@@ -34,6 +34,7 @@ exports.default = void 0;
34
34
  * @return {Object} The final theme object with the overrides and component variables
35
35
  */
36
36
  const generateComponentTheme = theme => {
37
+ var _colors$contrasts;
37
38
  const colors = theme.colors,
38
39
  borders = theme.borders,
39
40
  spacing = theme.spacing,
@@ -42,7 +43,7 @@ const generateComponentTheme = theme => {
42
43
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
43
44
  height: '3.75rem',
44
45
  // 60px per product design
45
- borderColor: colors === null || colors === void 0 ? void 0 : colors.borderMedium,
46
+ borderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey1214,
46
47
  borderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
47
48
  borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
48
49
  horizontalMargin: spacing === null || spacing === void 0 ? void 0 : spacing.xxSmall,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-navigation",
3
- "version": "9.5.2-snapshot-1",
3
+ "version": "10.0.0",
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,12 +23,12 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-axe-check": "9.5.2-snapshot-1",
27
- "@instructure/ui-babel-preset": "9.5.2-snapshot-1",
28
- "@instructure/ui-color-utils": "9.5.2-snapshot-1",
29
- "@instructure/ui-scripts": "9.5.2-snapshot-1",
30
- "@instructure/ui-test-utils": "9.5.2-snapshot-1",
31
- "@instructure/ui-themes": "9.5.2-snapshot-1",
26
+ "@instructure/ui-axe-check": "10.0.0",
27
+ "@instructure/ui-babel-preset": "10.0.0",
28
+ "@instructure/ui-color-utils": "10.0.0",
29
+ "@instructure/ui-scripts": "10.0.0",
30
+ "@instructure/ui-test-utils": "10.0.0",
31
+ "@instructure/ui-themes": "10.0.0",
32
32
  "@testing-library/jest-dom": "^6.4.6",
33
33
  "@testing-library/react": "^15.0.7",
34
34
  "@testing-library/user-event": "^14.5.2",
@@ -36,24 +36,24 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@babel/runtime": "^7.24.5",
39
- "@instructure/console": "9.5.2-snapshot-1",
40
- "@instructure/debounce": "9.5.2-snapshot-1",
41
- "@instructure/emotion": "9.5.2-snapshot-1",
42
- "@instructure/shared-types": "9.5.2-snapshot-1",
43
- "@instructure/ui-a11y-content": "9.5.2-snapshot-1",
44
- "@instructure/ui-a11y-utils": "9.5.2-snapshot-1",
45
- "@instructure/ui-badge": "9.5.2-snapshot-1",
46
- "@instructure/ui-dom-utils": "9.5.2-snapshot-1",
47
- "@instructure/ui-focusable": "9.5.2-snapshot-1",
48
- "@instructure/ui-icons": "9.5.2-snapshot-1",
49
- "@instructure/ui-menu": "9.5.2-snapshot-1",
50
- "@instructure/ui-prop-types": "9.5.2-snapshot-1",
51
- "@instructure/ui-react-utils": "9.5.2-snapshot-1",
52
- "@instructure/ui-testable": "9.5.2-snapshot-1",
53
- "@instructure/ui-tooltip": "9.5.2-snapshot-1",
54
- "@instructure/ui-truncate-list": "9.5.2-snapshot-1",
55
- "@instructure/ui-utils": "9.5.2-snapshot-1",
56
- "@instructure/ui-view": "9.5.2-snapshot-1",
39
+ "@instructure/console": "10.0.0",
40
+ "@instructure/debounce": "10.0.0",
41
+ "@instructure/emotion": "10.0.0",
42
+ "@instructure/shared-types": "10.0.0",
43
+ "@instructure/ui-a11y-content": "10.0.0",
44
+ "@instructure/ui-a11y-utils": "10.0.0",
45
+ "@instructure/ui-badge": "10.0.0",
46
+ "@instructure/ui-dom-utils": "10.0.0",
47
+ "@instructure/ui-focusable": "10.0.0",
48
+ "@instructure/ui-icons": "10.0.0",
49
+ "@instructure/ui-menu": "10.0.0",
50
+ "@instructure/ui-prop-types": "10.0.0",
51
+ "@instructure/ui-react-utils": "10.0.0",
52
+ "@instructure/ui-testable": "10.0.0",
53
+ "@instructure/ui-tooltip": "10.0.0",
54
+ "@instructure/ui-truncate-list": "10.0.0",
55
+ "@instructure/ui-utils": "10.0.0",
56
+ "@instructure/ui-view": "10.0.0",
57
57
  "prop-types": "^15.8.1"
58
58
  },
59
59
  "peerDependencies": {
@@ -37,11 +37,11 @@ const generateComponentTheme = (theme: Theme): AppNavItemTheme => {
37
37
  fontFamily: typography?.fontFamily,
38
38
  fontSize: '1.125rem',
39
39
  fontWeight: typography?.fontWeightBold,
40
- textColor: colors?.textLink,
41
- textColorSelected: colors?.textDarkest,
40
+ textColor: colors?.contrasts?.blue4570,
41
+ textColorSelected: colors?.contrasts?.grey125125,
42
42
  height: '2.25rem',
43
43
  padding: spacing?.small,
44
- backgroundColor: colors?.backgroundLightest
44
+ backgroundColor: colors?.contrasts?.white1010
45
45
  }
46
46
 
47
47
  return {
@@ -36,7 +36,7 @@ const generateComponentTheme = (theme: Theme): AppNavTheme => {
36
36
  const componentVariables: AppNavTheme = {
37
37
  fontFamily: typography?.fontFamily,
38
38
  height: '3.75rem', // 60px per product design
39
- borderColor: colors?.borderMedium,
39
+ borderColor: colors?.contrasts?.grey1214,
40
40
  borderStyle: borders?.style,
41
41
  borderWidth: borders?.widthSmall,
42
42
  horizontalMargin: spacing?.xxSmall,