@instructure/ui-options 9.3.0 → 9.3.1-pr-snapshot-1721304755254

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,6 +3,23 @@
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.3.1-pr-snapshot-1721304755254](https://github.com/instructure/instructure-ui/compare/v9.3.0...v9.3.1-pr-snapshot-1721304755254) (2024-07-18)
7
+
8
+
9
+ ### Features
10
+
11
+ * **many:** fix tests ([dc7a0b2](https://github.com/instructure/instructure-ui/commit/dc7a0b24228f74972f5aefc69e15506baae32ce1))
12
+ * **many:** rewrite color system ([aa974cb](https://github.com/instructure/instructure-ui/commit/aa974cb7c60d1e54b7cb1801fbbb82559989fd80))
13
+
14
+
15
+ ### BREAKING CHANGES
16
+
17
+ * **many:** Breaks color overrides in certain cases
18
+
19
+
20
+
21
+
22
+
6
23
  # [9.3.0](https://github.com/instructure/instructure-ui/compare/v9.2.0...v9.3.0) (2024-07-17)
7
24
 
8
25
  **Note:** Version bump only for package @instructure/ui-options
@@ -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;
31
32
  const colors = theme.colors,
32
33
  typography = theme.typography,
33
34
  spacing = theme.spacing,
@@ -43,12 +44,12 @@ const generateComponentTheme = theme => {
43
44
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
44
45
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
45
46
  lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightCondensed,
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,
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,
52
53
  padding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`,
53
54
  iconPadding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
54
55
  nestedPadding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
@@ -58,7 +59,7 @@ const generateComponentTheme = theme => {
58
59
  descriptionFontWeight: typography.fontWeightNormal,
59
60
  descriptionLineHeight: typography.lineHeight,
60
61
  descriptionPaddingStart: '0.25em',
61
- descriptionColor: colors.textDark
62
+ descriptionColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts7 = colors.contrasts) === null || _colors$contrasts7 === void 0 ? void 0 : _colors$contrasts7.grey4570
62
63
  };
63
64
  return {
64
65
  ...componentVariables,
@@ -28,11 +28,12 @@
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 borders = theme.borders,
32
33
  colors = theme.colors,
33
34
  spacing = theme.spacing;
34
35
  const componentVariables = {
35
- background: colors === null || colors === void 0 ? void 0 : colors.backgroundMedium,
36
+ background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey1214,
36
37
  height: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
37
38
  margin: `0 ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`
38
39
  };
@@ -28,13 +28,14 @@
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;
31
32
  const colors = theme.colors,
32
33
  typography = theme.typography,
33
34
  spacing = theme.spacing;
34
35
  const componentVariables = {
35
36
  labelFontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
36
- background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
37
- labelColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
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,
38
39
  labelPadding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} 0`,
39
40
  nestedLabelPadding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`
40
41
  };
@@ -34,6 +34,7 @@ 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;
37
38
  const colors = theme.colors,
38
39
  typography = theme.typography,
39
40
  spacing = theme.spacing,
@@ -49,12 +50,12 @@ const generateComponentTheme = theme => {
49
50
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
50
51
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
51
52
  lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightCondensed,
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,
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,
58
59
  padding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`,
59
60
  iconPadding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
60
61
  nestedPadding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
@@ -64,7 +65,7 @@ const generateComponentTheme = theme => {
64
65
  descriptionFontWeight: typography.fontWeightNormal,
65
66
  descriptionLineHeight: typography.lineHeight,
66
67
  descriptionPaddingStart: '0.25em',
67
- descriptionColor: colors.textDark
68
+ descriptionColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts7 = colors.contrasts) === null || _colors$contrasts7 === void 0 ? void 0 : _colors$contrasts7.grey4570
68
69
  };
69
70
  return {
70
71
  ...componentVariables,
@@ -34,11 +34,12 @@ 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;
37
38
  const borders = theme.borders,
38
39
  colors = theme.colors,
39
40
  spacing = theme.spacing;
40
41
  const componentVariables = {
41
- background: colors === null || colors === void 0 ? void 0 : colors.backgroundMedium,
42
+ background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey1214,
42
43
  height: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
43
44
  margin: `0 ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`
44
45
  };
@@ -34,13 +34,14 @@ 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;
37
38
  const colors = theme.colors,
38
39
  typography = theme.typography,
39
40
  spacing = theme.spacing;
40
41
  const componentVariables = {
41
42
  labelFontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
42
- background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
43
- labelColor: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
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,
44
45
  labelPadding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} 0`,
45
46
  nestedLabelPadding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`
46
47
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-options",
3
- "version": "9.3.0",
3
+ "version": "9.3.1-pr-snapshot-1721304755254",
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.3.0",
27
- "@instructure/ui-color-utils": "9.3.0",
28
- "@instructure/ui-test-locator": "9.3.0",
29
- "@instructure/ui-test-utils": "9.3.0",
30
- "@instructure/ui-themes": "9.3.0"
26
+ "@instructure/ui-babel-preset": "9.3.1-pr-snapshot-1721304755254",
27
+ "@instructure/ui-color-utils": "9.3.1-pr-snapshot-1721304755254",
28
+ "@instructure/ui-test-locator": "9.3.1-pr-snapshot-1721304755254",
29
+ "@instructure/ui-test-utils": "9.3.1-pr-snapshot-1721304755254",
30
+ "@instructure/ui-themes": "9.3.1-pr-snapshot-1721304755254"
31
31
  },
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.24.5",
34
- "@instructure/emotion": "9.3.0",
35
- "@instructure/shared-types": "9.3.0",
36
- "@instructure/ui-icons": "9.3.0",
37
- "@instructure/ui-prop-types": "9.3.0",
38
- "@instructure/ui-react-utils": "9.3.0",
39
- "@instructure/ui-testable": "9.3.0",
40
- "@instructure/ui-view": "9.3.0",
34
+ "@instructure/emotion": "9.3.1-pr-snapshot-1721304755254",
35
+ "@instructure/shared-types": "9.3.1-pr-snapshot-1721304755254",
36
+ "@instructure/ui-icons": "9.3.1-pr-snapshot-1721304755254",
37
+ "@instructure/ui-prop-types": "9.3.1-pr-snapshot-1721304755254",
38
+ "@instructure/ui-react-utils": "9.3.1-pr-snapshot-1721304755254",
39
+ "@instructure/ui-testable": "9.3.1-pr-snapshot-1721304755254",
40
+ "@instructure/ui-view": "9.3.1-pr-snapshot-1721304755254",
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?.textDarkest,
50
- background: colors?.backgroundLightest,
51
- highlightedLabelColor: colors?.textLightest,
52
- highlightedBackground: colors?.backgroundBrand,
53
- selectedLabelColor: colors?.textLightest,
54
- selectedBackground: colors?.backgroundDark,
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,
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.textDark
67
+ descriptionColor: colors?.contrasts?.grey4570
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?.backgroundMedium,
37
+ background: colors?.contrasts?.grey1214,
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?.backgroundLightest,
40
- labelColor: colors?.textDarkest,
39
+ background: colors?.contrasts?.white1010,
40
+ labelColor: colors?.contrasts?.grey125125,
41
41
 
42
42
  labelPadding: `${spacing?.xSmall} 0`,
43
43
  nestedLabelPadding: `${spacing?.xSmall} ${spacing?.small}`