@instructure/ui-options 9.6.0 → 10.0.1-pr-snapshot-1723800180253
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 +11 -3
- package/es/Options/Item/theme.js +8 -7
- package/es/Options/Separator/theme.js +2 -1
- package/es/Options/theme.js +3 -2
- package/lib/Options/Item/theme.js +8 -7
- package/lib/Options/Separator/theme.js +2 -1
- package/lib/Options/theme.js +3 -2
- package/package.json +13 -13
- package/src/Options/Item/theme.ts +7 -7
- package/src/Options/Separator/theme.ts +1 -1
- package/src/Options/theme.ts +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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
|
-
|
|
6
|
+
## [10.0.1-pr-snapshot-1723800180253](https://github.com/instructure/instructure-ui/compare/v10.0.0...v10.0.1-pr-snapshot-1723800180253) (2024-08-16)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-options
|
|
9
9
|
|
|
@@ -11,9 +11,17 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
# [10.0.0](https://github.com/instructure/instructure-ui/compare/v9.5.1...v10.0.0) (2024-07-31)
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **many:** rewrite color system ([1e5809e](https://github.com/instructure/instructure-ui/commit/1e5809e28dee8c2a71703a429609b8d2f95d76e6))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### BREAKING CHANGES
|
|
23
|
+
|
|
24
|
+
* **many:** Breaks color overrides in certain cases
|
|
17
25
|
|
|
18
26
|
|
|
19
27
|
|
package/es/Options/Item/theme.js
CHANGED
|
@@ -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.
|
|
47
|
-
background: colors === null || colors === void 0 ? void 0 : colors.
|
|
48
|
-
highlightedLabelColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
49
|
-
highlightedBackground: colors === null || colors === void 0 ? void 0 : colors.
|
|
50
|
-
selectedLabelColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
51
|
-
selectedBackground: colors === null || colors === void 0 ? void 0 : colors.
|
|
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.
|
|
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.
|
|
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
|
};
|
package/es/Options/theme.js
CHANGED
|
@@ -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.
|
|
37
|
-
labelColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
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.
|
|
53
|
-
background: colors === null || colors === void 0 ? void 0 : colors.
|
|
54
|
-
highlightedLabelColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
55
|
-
highlightedBackground: colors === null || colors === void 0 ? void 0 : colors.
|
|
56
|
-
selectedLabelColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
57
|
-
selectedBackground: colors === null || colors === void 0 ? void 0 : colors.
|
|
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.
|
|
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.
|
|
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
|
};
|
package/lib/Options/theme.js
CHANGED
|
@@ -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.
|
|
43
|
-
labelColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
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": "
|
|
3
|
+
"version": "10.0.1-pr-snapshot-1723800180253",
|
|
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": "
|
|
27
|
-
"@instructure/ui-color-utils": "
|
|
28
|
-
"@instructure/ui-test-locator": "
|
|
29
|
-
"@instructure/ui-test-utils": "
|
|
30
|
-
"@instructure/ui-themes": "
|
|
26
|
+
"@instructure/ui-babel-preset": "10.0.1-pr-snapshot-1723800180253",
|
|
27
|
+
"@instructure/ui-color-utils": "10.0.1-pr-snapshot-1723800180253",
|
|
28
|
+
"@instructure/ui-test-locator": "10.0.1-pr-snapshot-1723800180253",
|
|
29
|
+
"@instructure/ui-test-utils": "10.0.1-pr-snapshot-1723800180253",
|
|
30
|
+
"@instructure/ui-themes": "10.0.1-pr-snapshot-1723800180253"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.24.5",
|
|
34
|
-
"@instructure/emotion": "
|
|
35
|
-
"@instructure/shared-types": "
|
|
36
|
-
"@instructure/ui-icons": "
|
|
37
|
-
"@instructure/ui-prop-types": "
|
|
38
|
-
"@instructure/ui-react-utils": "
|
|
39
|
-
"@instructure/ui-testable": "
|
|
40
|
-
"@instructure/ui-view": "
|
|
34
|
+
"@instructure/emotion": "10.0.1-pr-snapshot-1723800180253",
|
|
35
|
+
"@instructure/shared-types": "10.0.1-pr-snapshot-1723800180253",
|
|
36
|
+
"@instructure/ui-icons": "10.0.1-pr-snapshot-1723800180253",
|
|
37
|
+
"@instructure/ui-prop-types": "10.0.1-pr-snapshot-1723800180253",
|
|
38
|
+
"@instructure/ui-react-utils": "10.0.1-pr-snapshot-1723800180253",
|
|
39
|
+
"@instructure/ui-testable": "10.0.1-pr-snapshot-1723800180253",
|
|
40
|
+
"@instructure/ui-view": "10.0.1-pr-snapshot-1723800180253",
|
|
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?.
|
|
50
|
-
background: colors?.
|
|
51
|
-
highlightedLabelColor: colors?.
|
|
52
|
-
highlightedBackground: colors?.
|
|
53
|
-
selectedLabelColor: colors?.
|
|
54
|
-
selectedBackground: colors?.
|
|
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
|
|
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?.
|
|
37
|
+
background: colors?.contrasts?.grey1214,
|
|
38
38
|
height: borders?.widthSmall,
|
|
39
39
|
margin: `0 ${spacing?.small}`
|
|
40
40
|
}
|
package/src/Options/theme.ts
CHANGED
|
@@ -36,8 +36,8 @@ const generateComponentTheme = (theme: Theme): OptionsTheme => {
|
|
|
36
36
|
const componentVariables: OptionsTheme = {
|
|
37
37
|
labelFontWeight: typography?.fontWeightBold,
|
|
38
38
|
|
|
39
|
-
background: colors?.
|
|
40
|
-
labelColor: colors?.
|
|
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}`
|