@instructure/ui-menu 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 +10 -2
- package/es/Menu/MenuItem/theme.js +7 -6
- package/es/Menu/MenuItemGroup/theme.js +3 -2
- package/es/Menu/MenuItemSeparator/theme.js +2 -1
- package/es/Menu/theme.js +3 -2
- package/lib/Menu/MenuItem/theme.js +7 -6
- package/lib/Menu/MenuItemGroup/theme.js +3 -2
- package/lib/Menu/MenuItemSeparator/theme.js +2 -1
- package/lib/Menu/theme.js +3 -2
- package/package.json +19 -19
- package/src/Menu/MenuItem/theme.ts +6 -6
- package/src/Menu/MenuItemGroup/theme.ts +2 -2
- package/src/Menu/MenuItemSeparator/theme.ts +1 -1
- package/src/Menu/theme.ts +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
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
|
-
|
|
6
|
+
# [10.0.0](https://github.com/instructure/instructure-ui/compare/v9.5.1...v10.0.0) (2024-07-31)
|
|
7
7
|
|
|
8
|
-
|
|
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;
|
|
31
32
|
const colors = theme.colors,
|
|
32
33
|
typography = theme.typography,
|
|
33
34
|
spacing = theme.spacing,
|
|
@@ -46,13 +47,13 @@ const generateComponentTheme = theme => {
|
|
|
46
47
|
lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightCondensed,
|
|
47
48
|
fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
|
|
48
49
|
labelPadding: spacing === null || spacing === void 0 ? void 0 : spacing.large,
|
|
49
|
-
labelColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
50
|
-
background: colors === null || colors === void 0 ? void 0 : colors.
|
|
51
|
-
iconColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
50
|
+
labelColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
|
|
51
|
+
background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.white1010,
|
|
52
|
+
iconColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.grey125125,
|
|
52
53
|
iconPadding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
|
|
53
|
-
activeBackground: colors === null || colors === void 0 ? void 0 : colors.
|
|
54
|
-
activeLabelColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
55
|
-
activeIconColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
54
|
+
activeBackground: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.blue4570,
|
|
55
|
+
activeLabelColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.white1010,
|
|
56
|
+
activeIconColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.white1010
|
|
56
57
|
};
|
|
57
58
|
return {
|
|
58
59
|
...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, _colors$contrasts2;
|
|
31
32
|
const colors = theme.colors,
|
|
32
33
|
spacing = theme.spacing,
|
|
33
34
|
typography = theme.typography,
|
|
@@ -42,8 +43,8 @@ const generateComponentTheme = theme => {
|
|
|
42
43
|
fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
43
44
|
fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
|
|
44
45
|
padding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`,
|
|
45
|
-
color: colors === null || colors === void 0 ? void 0 : colors.
|
|
46
|
-
background: colors === null || colors === void 0 ? void 0 : colors.
|
|
46
|
+
color: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
|
|
47
|
+
background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.white1010
|
|
47
48
|
};
|
|
48
49
|
return {
|
|
49
50
|
...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 colors = theme.colors,
|
|
32
33
|
spacing = theme.spacing,
|
|
33
34
|
borders = theme.borders;
|
|
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/Menu/theme.js
CHANGED
|
@@ -28,17 +28,18 @@
|
|
|
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
|
breakpoints = theme.breakpoints,
|
|
33
34
|
borders = theme.borders;
|
|
34
35
|
const componentVariables = {
|
|
35
36
|
minWidth: breakpoints === null || breakpoints === void 0 ? void 0 : breakpoints.xxSmall,
|
|
36
37
|
maxWidth: breakpoints === null || breakpoints === void 0 ? void 0 : breakpoints.xSmall,
|
|
37
|
-
background: colors === null || colors === void 0 ? void 0 : colors.
|
|
38
|
+
background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.white1010,
|
|
38
39
|
borderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
|
|
39
40
|
focusBorderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
|
|
40
41
|
focusBorderWidth: borders === null || borders === void 0 ? void 0 : borders.widthMedium,
|
|
41
|
-
focusBorderColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
42
|
+
focusBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.blue4570,
|
|
42
43
|
focusBorderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium
|
|
43
44
|
};
|
|
44
45
|
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;
|
|
37
38
|
const colors = theme.colors,
|
|
38
39
|
typography = theme.typography,
|
|
39
40
|
spacing = theme.spacing,
|
|
@@ -52,13 +53,13 @@ const generateComponentTheme = theme => {
|
|
|
52
53
|
lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightCondensed,
|
|
53
54
|
fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
|
|
54
55
|
labelPadding: spacing === null || spacing === void 0 ? void 0 : spacing.large,
|
|
55
|
-
labelColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
56
|
-
background: colors === null || colors === void 0 ? void 0 : colors.
|
|
57
|
-
iconColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
56
|
+
labelColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
|
|
57
|
+
background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.white1010,
|
|
58
|
+
iconColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.grey125125,
|
|
58
59
|
iconPadding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
|
|
59
|
-
activeBackground: colors === null || colors === void 0 ? void 0 : colors.
|
|
60
|
-
activeLabelColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
61
|
-
activeIconColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
60
|
+
activeBackground: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.blue4570,
|
|
61
|
+
activeLabelColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.white1010,
|
|
62
|
+
activeIconColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.white1010
|
|
62
63
|
};
|
|
63
64
|
return {
|
|
64
65
|
...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, _colors$contrasts2;
|
|
37
38
|
const colors = theme.colors,
|
|
38
39
|
spacing = theme.spacing,
|
|
39
40
|
typography = theme.typography,
|
|
@@ -48,8 +49,8 @@ const generateComponentTheme = theme => {
|
|
|
48
49
|
fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
49
50
|
fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
|
|
50
51
|
padding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`,
|
|
51
|
-
color: colors === null || colors === void 0 ? void 0 : colors.
|
|
52
|
-
background: colors === null || colors === void 0 ? void 0 : colors.
|
|
52
|
+
color: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
|
|
53
|
+
background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.white1010
|
|
53
54
|
};
|
|
54
55
|
return {
|
|
55
56
|
...componentVariables,
|
|
@@ -34,11 +34,12 @@ 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
|
borders = theme.borders;
|
|
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/Menu/theme.js
CHANGED
|
@@ -34,17 +34,18 @@ 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
|
breakpoints = theme.breakpoints,
|
|
39
40
|
borders = theme.borders;
|
|
40
41
|
const componentVariables = {
|
|
41
42
|
minWidth: breakpoints === null || breakpoints === void 0 ? void 0 : breakpoints.xxSmall,
|
|
42
43
|
maxWidth: breakpoints === null || breakpoints === void 0 ? void 0 : breakpoints.xSmall,
|
|
43
|
-
background: colors === null || colors === void 0 ? void 0 : colors.
|
|
44
|
+
background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.white1010,
|
|
44
45
|
borderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
|
|
45
46
|
focusBorderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
|
|
46
47
|
focusBorderWidth: borders === null || borders === void 0 ? void 0 : borders.widthMedium,
|
|
47
|
-
focusBorderColor: colors === null || colors === void 0 ? void 0 : colors.
|
|
48
|
+
focusBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.blue4570,
|
|
48
49
|
focusBorderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium
|
|
49
50
|
};
|
|
50
51
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-menu",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "A dropdown menu component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-axe-check": "
|
|
27
|
-
"@instructure/ui-babel-preset": "
|
|
28
|
-
"@instructure/ui-color-utils": "
|
|
29
|
-
"@instructure/ui-test-utils": "
|
|
30
|
-
"@instructure/ui-themes": "
|
|
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-test-utils": "10.0.0",
|
|
30
|
+
"@instructure/ui-themes": "10.0.0",
|
|
31
31
|
"@testing-library/jest-dom": "^6.4.6",
|
|
32
32
|
"@testing-library/react": "^15.0.7",
|
|
33
33
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@babel/runtime": "^7.24.5",
|
|
38
|
-
"@instructure/console": "
|
|
39
|
-
"@instructure/emotion": "
|
|
40
|
-
"@instructure/shared-types": "
|
|
41
|
-
"@instructure/ui-a11y-utils": "
|
|
42
|
-
"@instructure/ui-dom-utils": "
|
|
43
|
-
"@instructure/ui-icons": "
|
|
44
|
-
"@instructure/ui-popover": "
|
|
45
|
-
"@instructure/ui-position": "
|
|
46
|
-
"@instructure/ui-prop-types": "
|
|
47
|
-
"@instructure/ui-react-utils": "
|
|
48
|
-
"@instructure/ui-testable": "
|
|
49
|
-
"@instructure/ui-utils": "
|
|
50
|
-
"@instructure/ui-view": "
|
|
38
|
+
"@instructure/console": "10.0.0",
|
|
39
|
+
"@instructure/emotion": "10.0.0",
|
|
40
|
+
"@instructure/shared-types": "10.0.0",
|
|
41
|
+
"@instructure/ui-a11y-utils": "10.0.0",
|
|
42
|
+
"@instructure/ui-dom-utils": "10.0.0",
|
|
43
|
+
"@instructure/ui-icons": "10.0.0",
|
|
44
|
+
"@instructure/ui-popover": "10.0.0",
|
|
45
|
+
"@instructure/ui-position": "10.0.0",
|
|
46
|
+
"@instructure/ui-prop-types": "10.0.0",
|
|
47
|
+
"@instructure/ui-react-utils": "10.0.0",
|
|
48
|
+
"@instructure/ui-testable": "10.0.0",
|
|
49
|
+
"@instructure/ui-utils": "10.0.0",
|
|
50
|
+
"@instructure/ui-view": "10.0.0",
|
|
51
51
|
"keycode": "^2",
|
|
52
52
|
"prop-types": "^15.8.1"
|
|
53
53
|
},
|
|
@@ -50,15 +50,15 @@ const generateComponentTheme = (theme: Theme): MenuItemTheme => {
|
|
|
50
50
|
fontSize: typography?.fontSizeMedium,
|
|
51
51
|
labelPadding: spacing?.large,
|
|
52
52
|
|
|
53
|
-
labelColor: colors?.
|
|
54
|
-
background: colors?.
|
|
53
|
+
labelColor: colors?.contrasts?.grey125125,
|
|
54
|
+
background: colors?.contrasts?.white1010,
|
|
55
55
|
|
|
56
|
-
iconColor: colors?.
|
|
56
|
+
iconColor: colors?.contrasts?.grey125125,
|
|
57
57
|
iconPadding: spacing?.small,
|
|
58
58
|
|
|
59
|
-
activeBackground: colors?.
|
|
60
|
-
activeLabelColor: colors?.
|
|
61
|
-
activeIconColor: colors?.
|
|
59
|
+
activeBackground: colors?.contrasts?.blue4570,
|
|
60
|
+
activeLabelColor: colors?.contrasts?.white1010,
|
|
61
|
+
activeIconColor: colors?.contrasts?.white1010
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
return {
|
|
@@ -43,8 +43,8 @@ const generateComponentTheme = (theme: Theme): MenuGroupTheme => {
|
|
|
43
43
|
fontFamily: typography?.fontFamily,
|
|
44
44
|
fontWeight: typography?.fontWeightBold,
|
|
45
45
|
padding: `${spacing?.xSmall} ${spacing?.small}`,
|
|
46
|
-
color: colors?.
|
|
47
|
-
background: colors?.
|
|
46
|
+
color: colors?.contrasts?.grey125125,
|
|
47
|
+
background: colors?.contrasts?.white1010
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
return {
|
|
@@ -34,7 +34,7 @@ const generateComponentTheme = (theme: Theme): MenuSeparatorTheme => {
|
|
|
34
34
|
const { colors, spacing, borders } = theme
|
|
35
35
|
|
|
36
36
|
const componentVariables: MenuSeparatorTheme = {
|
|
37
|
-
background: colors?.
|
|
37
|
+
background: colors?.contrasts?.grey1214,
|
|
38
38
|
height: borders?.widthSmall,
|
|
39
39
|
margin: `0 ${spacing?.small}`
|
|
40
40
|
}
|
package/src/Menu/theme.ts
CHANGED
|
@@ -36,11 +36,11 @@ const generateComponentTheme = (theme: Theme): MenuTheme => {
|
|
|
36
36
|
const componentVariables: MenuTheme = {
|
|
37
37
|
minWidth: breakpoints?.xxSmall,
|
|
38
38
|
maxWidth: breakpoints?.xSmall,
|
|
39
|
-
background: colors?.
|
|
39
|
+
background: colors?.contrasts?.white1010,
|
|
40
40
|
borderRadius: borders?.radiusMedium,
|
|
41
41
|
focusBorderStyle: borders?.style,
|
|
42
42
|
focusBorderWidth: borders?.widthMedium,
|
|
43
|
-
focusBorderColor: colors?.
|
|
43
|
+
focusBorderColor: colors?.contrasts?.blue4570,
|
|
44
44
|
focusBorderRadius: borders?.radiusMedium
|
|
45
45
|
}
|
|
46
46
|
|