@instructure/ui-options 9.5.2-snapshot-7 → 9.6.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,17 +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-7](https://github.com/instructure/instructure-ui/compare/v9.5.1...v9.5.2-snapshot-7) (2024-07-31)
6
+ # [9.6.0](https://github.com/instructure/instructure-ui/compare/v9.5.2...v9.6.0) (2024-08-14)
7
7
 
8
+ **Note:** Version bump only for package @instructure/ui-options
8
9
 
9
- ### Features
10
10
 
11
- * **many:** rewrite color system ([1e5809e](https://github.com/instructure/instructure-ui/commit/1e5809e28dee8c2a71703a429609b8d2f95d76e6))
12
11
 
13
12
 
14
- ### BREAKING CHANGES
15
13
 
16
- * **many:** Breaks color overrides in certain cases
14
+ ## [9.5.2](https://github.com/instructure/instructure-ui/compare/v9.5.1...v9.5.2) (2024-08-05)
15
+
16
+ **Note:** Version bump only for package @instructure/ui-options
17
17
 
18
18
 
19
19
 
@@ -28,7 +28,6 @@
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;
32
31
  const colors = theme.colors,
33
32
  typography = theme.typography,
34
33
  spacing = theme.spacing,
@@ -44,12 +43,12 @@ const generateComponentTheme = theme => {
44
43
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
45
44
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
46
45
  lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightCondensed,
47
- color: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
48
- background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.white1010,
49
- highlightedLabelColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.white1010,
50
- highlightedBackground: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.blue4570,
51
- selectedLabelColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.white1010,
52
- selectedBackground: colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.grey4570,
46
+ color: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
47
+ background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
48
+ highlightedLabelColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
49
+ highlightedBackground: colors === null || colors === void 0 ? void 0 : colors.backgroundBrand,
50
+ selectedLabelColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
51
+ selectedBackground: colors === null || colors === void 0 ? void 0 : colors.backgroundDark,
53
52
  padding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`,
54
53
  iconPadding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
55
54
  nestedPadding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
@@ -59,7 +58,7 @@ const generateComponentTheme = theme => {
59
58
  descriptionFontWeight: typography.fontWeightNormal,
60
59
  descriptionLineHeight: typography.lineHeight,
61
60
  descriptionPaddingStart: '0.25em',
62
- descriptionColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts7 = colors.contrasts) === null || _colors$contrasts7 === void 0 ? void 0 : _colors$contrasts7.grey4570
61
+ descriptionColor: colors.textDark
63
62
  };
64
63
  return {
65
64
  ...componentVariables,
@@ -28,12 +28,11 @@
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;
32
31
  const borders = theme.borders,
33
32
  colors = theme.colors,
34
33
  spacing = theme.spacing;
35
34
  const componentVariables = {
36
- background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey1214,
35
+ background: colors === null || colors === void 0 ? void 0 : colors.backgroundMedium,
37
36
  height: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
38
37
  margin: `0 ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`
39
38
  };
@@ -28,14 +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, _colors$contrasts2;
32
31
  const colors = theme.colors,
33
32
  typography = theme.typography,
34
33
  spacing = theme.spacing;
35
34
  const componentVariables = {
36
35
  labelFontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
37
- background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.white1010,
38
- labelColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey125125,
36
+ background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
37
+ labelColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
39
38
  labelPadding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} 0`,
40
39
  nestedLabelPadding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`
41
40
  };
@@ -34,7 +34,6 @@ exports.optionsItemThemeGenerator = 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;
38
37
  const colors = theme.colors,
39
38
  typography = theme.typography,
40
39
  spacing = theme.spacing,
@@ -50,12 +49,12 @@ const generateComponentTheme = theme => {
50
49
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
51
50
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
52
51
  lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightCondensed,
53
- color: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
54
- background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.white1010,
55
- highlightedLabelColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.white1010,
56
- highlightedBackground: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.blue4570,
57
- selectedLabelColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.white1010,
58
- selectedBackground: colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.grey4570,
52
+ color: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
53
+ background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
54
+ highlightedLabelColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
55
+ highlightedBackground: colors === null || colors === void 0 ? void 0 : colors.backgroundBrand,
56
+ selectedLabelColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
57
+ selectedBackground: colors === null || colors === void 0 ? void 0 : colors.backgroundDark,
59
58
  padding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`,
60
59
  iconPadding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
61
60
  nestedPadding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
@@ -65,7 +64,7 @@ const generateComponentTheme = theme => {
65
64
  descriptionFontWeight: typography.fontWeightNormal,
66
65
  descriptionLineHeight: typography.lineHeight,
67
66
  descriptionPaddingStart: '0.25em',
68
- descriptionColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts7 = colors.contrasts) === null || _colors$contrasts7 === void 0 ? void 0 : _colors$contrasts7.grey4570
67
+ descriptionColor: colors.textDark
69
68
  };
70
69
  return {
71
70
  ...componentVariables,
@@ -34,12 +34,11 @@ exports.optionsSeparatorThemeGenerator = 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;
38
37
  const borders = theme.borders,
39
38
  colors = theme.colors,
40
39
  spacing = theme.spacing;
41
40
  const componentVariables = {
42
- background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey1214,
41
+ background: colors === null || colors === void 0 ? void 0 : colors.backgroundMedium,
43
42
  height: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
44
43
  margin: `0 ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`
45
44
  };
@@ -34,14 +34,13 @@ exports.optionsThemeGenerator = 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;
38
37
  const colors = theme.colors,
39
38
  typography = theme.typography,
40
39
  spacing = theme.spacing;
41
40
  const componentVariables = {
42
41
  labelFontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
43
- background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.white1010,
44
- labelColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey125125,
42
+ background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
43
+ labelColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
45
44
  labelPadding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} 0`,
46
45
  nestedLabelPadding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`
47
46
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-options",
3
- "version": "9.5.2-snapshot-7",
3
+ "version": "9.6.0",
4
4
  "description": "A view-only component for composing interactive lists and menus.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,21 +23,21 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "9.5.2-snapshot-7",
27
- "@instructure/ui-color-utils": "9.5.2-snapshot-7",
28
- "@instructure/ui-test-locator": "9.5.2-snapshot-7",
29
- "@instructure/ui-test-utils": "9.5.2-snapshot-7",
30
- "@instructure/ui-themes": "9.5.2-snapshot-7"
26
+ "@instructure/ui-babel-preset": "9.6.0",
27
+ "@instructure/ui-color-utils": "9.6.0",
28
+ "@instructure/ui-test-locator": "9.6.0",
29
+ "@instructure/ui-test-utils": "9.6.0",
30
+ "@instructure/ui-themes": "9.6.0"
31
31
  },
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.24.5",
34
- "@instructure/emotion": "9.5.2-snapshot-7",
35
- "@instructure/shared-types": "9.5.2-snapshot-7",
36
- "@instructure/ui-icons": "9.5.2-snapshot-7",
37
- "@instructure/ui-prop-types": "9.5.2-snapshot-7",
38
- "@instructure/ui-react-utils": "9.5.2-snapshot-7",
39
- "@instructure/ui-testable": "9.5.2-snapshot-7",
40
- "@instructure/ui-view": "9.5.2-snapshot-7",
34
+ "@instructure/emotion": "9.6.0",
35
+ "@instructure/shared-types": "9.6.0",
36
+ "@instructure/ui-icons": "9.6.0",
37
+ "@instructure/ui-prop-types": "9.6.0",
38
+ "@instructure/ui-react-utils": "9.6.0",
39
+ "@instructure/ui-testable": "9.6.0",
40
+ "@instructure/ui-view": "9.6.0",
41
41
  "prop-types": "^15.8.1"
42
42
  },
43
43
  "peerDependencies": {
@@ -46,12 +46,12 @@ const generateComponentTheme = (theme: Theme): OptionsItemTheme => {
46
46
  fontWeight: typography?.fontWeightNormal,
47
47
  lineHeight: typography?.lineHeightCondensed,
48
48
 
49
- color: colors?.contrasts?.grey125125,
50
- background: colors?.contrasts?.white1010,
51
- highlightedLabelColor: colors?.contrasts?.white1010,
52
- highlightedBackground: colors?.contrasts?.blue4570,
53
- selectedLabelColor: colors?.contrasts?.white1010,
54
- selectedBackground: colors?.contrasts?.grey4570,
49
+ color: colors?.textDarkest,
50
+ background: colors?.backgroundLightest,
51
+ highlightedLabelColor: colors?.textLightest,
52
+ highlightedBackground: colors?.backgroundBrand,
53
+ selectedLabelColor: colors?.textLightest,
54
+ selectedBackground: colors?.backgroundDark,
55
55
 
56
56
  padding: `${spacing?.xSmall} ${spacing?.small}`,
57
57
  iconPadding: spacing?.small,
@@ -64,7 +64,7 @@ const generateComponentTheme = (theme: Theme): OptionsItemTheme => {
64
64
  descriptionFontWeight: typography.fontWeightNormal,
65
65
  descriptionLineHeight: typography.lineHeight,
66
66
  descriptionPaddingStart: '0.25em',
67
- descriptionColor: colors?.contrasts?.grey4570
67
+ descriptionColor: colors.textDark
68
68
  }
69
69
 
70
70
  return {
@@ -34,7 +34,7 @@ const generateComponentTheme = (theme: Theme): OptionsSeparatorTheme => {
34
34
  const { borders, colors, spacing } = theme
35
35
 
36
36
  const componentVariables: OptionsSeparatorTheme = {
37
- background: colors?.contrasts?.grey1214,
37
+ background: colors?.backgroundMedium,
38
38
  height: borders?.widthSmall,
39
39
  margin: `0 ${spacing?.small}`
40
40
  }
@@ -36,8 +36,8 @@ const generateComponentTheme = (theme: Theme): OptionsTheme => {
36
36
  const componentVariables: OptionsTheme = {
37
37
  labelFontWeight: typography?.fontWeightBold,
38
38
 
39
- background: colors?.contrasts?.white1010,
40
- labelColor: colors?.contrasts?.grey125125,
39
+ background: colors?.backgroundLightest,
40
+ labelColor: colors?.textDarkest,
41
41
 
42
42
  labelPadding: `${spacing?.xSmall} 0`,
43
43
  nestedLabelPadding: `${spacing?.xSmall} ${spacing?.small}`