@instructure/ui-tree-browser 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-tree-browser
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, _colors$contrasts4, _colors$contrasts5, _colors$contrasts6, _colors$contrasts7, _colors$contrasts8, _colors$contrasts9;
31
32
  const colors = theme.colors,
32
33
  borders = theme.borders,
33
34
  typography = theme.typography,
@@ -43,19 +44,19 @@ const generateComponentTheme = theme => {
43
44
  }
44
45
  };
45
46
  const componentVariables = {
46
- hoverBackgroundColor: colors === null || colors === void 0 ? void 0 : colors.backgroundBrand,
47
- hoverTextColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
47
+ hoverBackgroundColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.blue4570,
48
+ hoverTextColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.white1010,
48
49
  focusOutlineWidth: borders === null || borders === void 0 ? void 0 : borders.widthMedium,
49
- focusOutlineColor: colors === null || colors === void 0 ? void 0 : colors.borderBrand,
50
+ focusOutlineColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.blue4570,
50
51
  focusOutlineStyle: borders === null || borders === void 0 ? void 0 : borders.style,
51
- iconColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
52
+ iconColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.grey125125,
52
53
  iconsMarginRight: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall,
53
54
  descriptorMarginTop: spacing === null || spacing === void 0 ? void 0 : spacing.xxxSmall,
54
- descriptorTextColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
55
+ descriptorTextColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.grey125125,
55
56
  descriptorFontSizeSmall: typography === null || typography === void 0 ? void 0 : typography.fontSizeXSmall,
56
57
  descriptorFontSizeMedium: typography === null || typography === void 0 ? void 0 : typography.fontSizeXSmall,
57
58
  descriptorFontSizeLarge: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
58
- nameTextColor: colors === null || colors === void 0 ? void 0 : colors.textBrand,
59
+ nameTextColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.blue4570,
59
60
  nameFontSizeSmall: typography === null || typography === void 0 ? void 0 : typography.fontSizeXSmall,
60
61
  nameFontSizeMedium: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
61
62
  nameFontSizeLarge: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
@@ -64,10 +65,10 @@ const generateComponentTheme = theme => {
64
65
  baseSpacingLarge: '1rem',
65
66
  borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
66
67
  borderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
67
- borderColor: colors === null || colors === void 0 ? void 0 : colors.borderDark,
68
+ borderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts7 = colors.contrasts) === null || _colors$contrasts7 === void 0 ? void 0 : _colors$contrasts7.grey4570,
68
69
  textLineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightCondensed,
69
- selectedTextColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
70
- selectedBackgroundColor: colors === null || colors === void 0 ? void 0 : colors.backgroundDark,
70
+ selectedTextColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts8 = colors.contrasts) === null || _colors$contrasts8 === void 0 ? void 0 : _colors$contrasts8.white1010,
71
+ selectedBackgroundColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts9 = colors.contrasts) === null || _colors$contrasts9 === void 0 ? void 0 : _colors$contrasts9.grey4570,
71
72
  selectedOutlineWidth: borders === null || borders === void 0 ? void 0 : borders.widthLarge
72
73
  };
73
74
  return {
@@ -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
  spacing = theme.spacing,
33
34
  typography = theme.typography,
@@ -38,7 +39,7 @@ const generateComponentTheme = theme => {
38
39
  baseSpacingMedium: spacing === null || spacing === void 0 ? void 0 : spacing.small,
39
40
  baseSpacingLarge: '1rem',
40
41
  borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
41
- borderColor: colors === null || colors === void 0 ? void 0 : colors.borderDark
42
+ borderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey4570
42
43
  };
43
44
  return {
44
45
  ...componentVariables
@@ -28,12 +28,13 @@
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
  const componentVariables = {
34
35
  borderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
35
36
  focusOutlineWidth: borders === null || borders === void 0 ? void 0 : borders.widthMedium,
36
- focusOutlineColor: colors === null || colors === void 0 ? void 0 : colors.borderBrand,
37
+ focusOutlineColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.blue4570,
37
38
  focusOutlineStyle: borders === null || borders === void 0 ? void 0 : borders.style
38
39
  };
39
40
  return {
@@ -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, _colors$contrasts4, _colors$contrasts5, _colors$contrasts6, _colors$contrasts7, _colors$contrasts8, _colors$contrasts9;
37
38
  const colors = theme.colors,
38
39
  borders = theme.borders,
39
40
  typography = theme.typography,
@@ -49,19 +50,19 @@ const generateComponentTheme = theme => {
49
50
  }
50
51
  };
51
52
  const componentVariables = {
52
- hoverBackgroundColor: colors === null || colors === void 0 ? void 0 : colors.backgroundBrand,
53
- hoverTextColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
53
+ hoverBackgroundColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.blue4570,
54
+ hoverTextColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.white1010,
54
55
  focusOutlineWidth: borders === null || borders === void 0 ? void 0 : borders.widthMedium,
55
- focusOutlineColor: colors === null || colors === void 0 ? void 0 : colors.borderBrand,
56
+ focusOutlineColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.blue4570,
56
57
  focusOutlineStyle: borders === null || borders === void 0 ? void 0 : borders.style,
57
- iconColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
58
+ iconColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.grey125125,
58
59
  iconsMarginRight: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall,
59
60
  descriptorMarginTop: spacing === null || spacing === void 0 ? void 0 : spacing.xxxSmall,
60
- descriptorTextColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
61
+ descriptorTextColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.grey125125,
61
62
  descriptorFontSizeSmall: typography === null || typography === void 0 ? void 0 : typography.fontSizeXSmall,
62
63
  descriptorFontSizeMedium: typography === null || typography === void 0 ? void 0 : typography.fontSizeXSmall,
63
64
  descriptorFontSizeLarge: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
64
- nameTextColor: colors === null || colors === void 0 ? void 0 : colors.textBrand,
65
+ nameTextColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.blue4570,
65
66
  nameFontSizeSmall: typography === null || typography === void 0 ? void 0 : typography.fontSizeXSmall,
66
67
  nameFontSizeMedium: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
67
68
  nameFontSizeLarge: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
@@ -70,10 +71,10 @@ const generateComponentTheme = theme => {
70
71
  baseSpacingLarge: '1rem',
71
72
  borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
72
73
  borderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
73
- borderColor: colors === null || colors === void 0 ? void 0 : colors.borderDark,
74
+ borderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts7 = colors.contrasts) === null || _colors$contrasts7 === void 0 ? void 0 : _colors$contrasts7.grey4570,
74
75
  textLineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightCondensed,
75
- selectedTextColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
76
- selectedBackgroundColor: colors === null || colors === void 0 ? void 0 : colors.backgroundDark,
76
+ selectedTextColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts8 = colors.contrasts) === null || _colors$contrasts8 === void 0 ? void 0 : _colors$contrasts8.white1010,
77
+ selectedBackgroundColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts9 = colors.contrasts) === null || _colors$contrasts9 === void 0 ? void 0 : _colors$contrasts9.grey4570,
77
78
  selectedOutlineWidth: borders === null || borders === void 0 ? void 0 : borders.widthLarge
78
79
  };
79
80
  return {
@@ -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
  spacing = theme.spacing,
39
40
  typography = theme.typography,
@@ -44,7 +45,7 @@ const generateComponentTheme = theme => {
44
45
  baseSpacingMedium: spacing === null || spacing === void 0 ? void 0 : spacing.small,
45
46
  baseSpacingLarge: '1rem',
46
47
  borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
47
- borderColor: colors === null || colors === void 0 ? void 0 : colors.borderDark
48
+ borderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey4570
48
49
  };
49
50
  return {
50
51
  ...componentVariables
@@ -34,12 +34,13 @@ 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
  const componentVariables = {
40
41
  borderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
41
42
  focusOutlineWidth: borders === null || borders === void 0 ? void 0 : borders.widthMedium,
42
- focusOutlineColor: colors === null || colors === void 0 ? void 0 : colors.borderBrand,
43
+ focusOutlineColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.blue4570,
43
44
  focusOutlineStyle: borders === null || borders === void 0 ? void 0 : borders.style
44
45
  };
45
46
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-tree-browser",
3
- "version": "9.5.2-snapshot-1",
3
+ "version": "10.0.0",
4
4
  "description": "A component for displaying a hierarchical view of information",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,22 +23,22 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "9.5.2-snapshot-1",
27
- "@instructure/ui-color-utils": "9.5.2-snapshot-1",
28
- "@instructure/ui-test-locator": "9.5.2-snapshot-1",
29
- "@instructure/ui-test-utils": "9.5.2-snapshot-1",
30
- "@instructure/ui-themes": "9.5.2-snapshot-1"
26
+ "@instructure/ui-babel-preset": "10.0.0",
27
+ "@instructure/ui-color-utils": "10.0.0",
28
+ "@instructure/ui-test-locator": "10.0.0",
29
+ "@instructure/ui-test-utils": "10.0.0",
30
+ "@instructure/ui-themes": "10.0.0"
31
31
  },
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.24.5",
34
- "@instructure/emotion": "9.5.2-snapshot-1",
35
- "@instructure/shared-types": "9.5.2-snapshot-1",
36
- "@instructure/ui-icons": "9.5.2-snapshot-1",
37
- "@instructure/ui-img": "9.5.2-snapshot-1",
38
- "@instructure/ui-prop-types": "9.5.2-snapshot-1",
39
- "@instructure/ui-react-utils": "9.5.2-snapshot-1",
40
- "@instructure/ui-testable": "9.5.2-snapshot-1",
41
- "@instructure/ui-utils": "9.5.2-snapshot-1",
34
+ "@instructure/emotion": "10.0.0",
35
+ "@instructure/shared-types": "10.0.0",
36
+ "@instructure/ui-icons": "10.0.0",
37
+ "@instructure/ui-img": "10.0.0",
38
+ "@instructure/ui-prop-types": "10.0.0",
39
+ "@instructure/ui-react-utils": "10.0.0",
40
+ "@instructure/ui-testable": "10.0.0",
41
+ "@instructure/ui-utils": "10.0.0",
42
42
  "keycode": "^2",
43
43
  "prop-types": "^15.8.1"
44
44
  },
@@ -44,23 +44,23 @@ const generateComponentTheme = (theme: Theme): TreeBrowserButtonTheme => {
44
44
  }
45
45
 
46
46
  const componentVariables: TreeBrowserButtonTheme = {
47
- hoverBackgroundColor: colors?.backgroundBrand,
48
- hoverTextColor: colors?.textLightest,
47
+ hoverBackgroundColor: colors?.contrasts?.blue4570,
48
+ hoverTextColor: colors?.contrasts?.white1010,
49
49
 
50
50
  focusOutlineWidth: borders?.widthMedium,
51
- focusOutlineColor: colors?.borderBrand,
51
+ focusOutlineColor: colors?.contrasts?.blue4570,
52
52
  focusOutlineStyle: borders?.style,
53
53
 
54
- iconColor: colors?.textDarkest,
54
+ iconColor: colors?.contrasts?.grey125125,
55
55
  iconsMarginRight: spacing?.xSmall,
56
56
 
57
57
  descriptorMarginTop: spacing?.xxxSmall,
58
- descriptorTextColor: colors?.textDarkest,
58
+ descriptorTextColor: colors?.contrasts?.grey125125,
59
59
  descriptorFontSizeSmall: typography?.fontSizeXSmall,
60
60
  descriptorFontSizeMedium: typography?.fontSizeXSmall,
61
61
  descriptorFontSizeLarge: typography?.fontSizeSmall,
62
62
 
63
- nameTextColor: colors?.textBrand,
63
+ nameTextColor: colors?.contrasts?.blue4570,
64
64
  nameFontSizeSmall: typography?.fontSizeXSmall,
65
65
  nameFontSizeMedium: typography?.fontSizeSmall,
66
66
  nameFontSizeLarge: typography?.fontSizeMedium,
@@ -71,12 +71,12 @@ const generateComponentTheme = (theme: Theme): TreeBrowserButtonTheme => {
71
71
 
72
72
  borderWidth: borders?.widthSmall,
73
73
  borderRadius: borders?.radiusMedium,
74
- borderColor: colors?.borderDark,
74
+ borderColor: colors?.contrasts?.grey4570,
75
75
 
76
76
  textLineHeight: typography?.lineHeightCondensed,
77
77
 
78
- selectedTextColor: colors?.textLightest,
79
- selectedBackgroundColor: colors?.backgroundDark,
78
+ selectedTextColor: colors?.contrasts?.white1010,
79
+ selectedBackgroundColor: colors?.contrasts?.grey4570,
80
80
  selectedOutlineWidth: borders?.widthLarge
81
81
  }
82
82
 
@@ -39,7 +39,7 @@ const generateComponentTheme = (theme: Theme): TreeBrowserCollectionTheme => {
39
39
  baseSpacingMedium: spacing?.small,
40
40
  baseSpacingLarge: '1rem',
41
41
  borderWidth: borders?.widthSmall,
42
- borderColor: colors?.borderDark
42
+ borderColor: colors?.contrasts?.grey4570
43
43
  }
44
44
 
45
45
  return {
@@ -36,7 +36,7 @@ const generateComponentTheme = (theme: Theme): TreeBrowserTheme => {
36
36
  const componentVariables: TreeBrowserTheme = {
37
37
  borderRadius: borders?.radiusMedium,
38
38
  focusOutlineWidth: borders?.widthMedium,
39
- focusOutlineColor: colors?.borderBrand,
39
+ focusOutlineColor: colors?.contrasts?.blue4570,
40
40
  focusOutlineStyle: borders?.style
41
41
  }
42
42