@instructure/ui-options 10.17.1-snapshot-3 → 10.17.1-snapshot-5
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 +1 -1
- package/es/Options/Item/props.js +1 -1
- package/es/Options/Item/styles.js +5 -1
- package/es/Options/Item/theme.js +3 -2
- package/lib/Options/Item/props.js +1 -1
- package/lib/Options/Item/styles.js +5 -1
- package/lib/Options/Item/theme.js +3 -2
- package/package.json +14 -14
- package/src/Options/Item/props.ts +3 -1
- package/src/Options/Item/styles.ts +5 -1
- package/src/Options/Item/theme.ts +1 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Options/Item/props.d.ts +1 -1
- package/types/Options/Item/props.d.ts.map +1 -1
- package/types/Options/Item/styles.d.ts.map +1 -1
- package/types/Options/Item/theme.d.ts.map +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
|
-
## [10.17.1-snapshot-
|
|
6
|
+
## [10.17.1-snapshot-5](https://github.com/instructure/instructure-ui/compare/v10.17.0...v10.17.1-snapshot-5) (2025-05-26)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-options
|
|
9
9
|
|
package/es/Options/Item/props.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
import PropTypes from 'prop-types';
|
|
26
26
|
const propTypes = {
|
|
27
27
|
as: PropTypes.elementType,
|
|
28
|
-
variant: PropTypes.oneOf(['default', 'highlighted', 'selected', 'disabled', 'highlighted-disabled']),
|
|
28
|
+
variant: PropTypes.oneOf(['default', 'highlighted', 'selected', 'disabled', 'highlighted-disabled', 'selected-highlighted']),
|
|
29
29
|
role: PropTypes.string,
|
|
30
30
|
renderBeforeLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
31
31
|
renderAfterLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
@@ -57,12 +57,16 @@ const generateStyle = (componentTheme, props) => {
|
|
|
57
57
|
cursor: 'not-allowed',
|
|
58
58
|
opacity: 0.5
|
|
59
59
|
},
|
|
60
|
-
|
|
60
|
+
'highlighted-disabled': {
|
|
61
61
|
background: componentTheme.highlightedBackground,
|
|
62
62
|
color: componentTheme.highlightedLabelColor,
|
|
63
63
|
cursor: 'not-allowed',
|
|
64
64
|
opacity: 0.5
|
|
65
65
|
},
|
|
66
|
+
'selected-highlighted': {
|
|
67
|
+
background: componentTheme.selectedHighlightedBackground,
|
|
68
|
+
color: componentTheme.highlightedLabelColor
|
|
69
|
+
},
|
|
66
70
|
default: {
|
|
67
71
|
transition: 'background 200ms'
|
|
68
72
|
}
|
package/es/Options/Item/theme.js
CHANGED
|
@@ -28,7 +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
|
+
var _colors$contrasts, _colors$contrasts2, _colors$contrasts3, _colors$contrasts4, _colors$contrasts5, _colors$contrasts6, _colors$contrasts7, _colors$contrasts8;
|
|
32
32
|
const colors = theme.colors,
|
|
33
33
|
typography = theme.typography,
|
|
34
34
|
spacing = theme.spacing,
|
|
@@ -51,6 +51,7 @@ const generateComponentTheme = theme => {
|
|
|
51
51
|
highlightedBackground: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.blue4570,
|
|
52
52
|
selectedLabelColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.white1010,
|
|
53
53
|
selectedBackground: colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.grey4570,
|
|
54
|
+
selectedHighlightedBackground: colors === null || colors === void 0 ? void 0 : (_colors$contrasts7 = colors.contrasts) === null || _colors$contrasts7 === void 0 ? void 0 : _colors$contrasts7.blue5782,
|
|
54
55
|
padding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`,
|
|
55
56
|
iconPadding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
|
|
56
57
|
nestedPadding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
|
|
@@ -60,7 +61,7 @@ const generateComponentTheme = theme => {
|
|
|
60
61
|
descriptionFontWeight: typography.fontWeightNormal,
|
|
61
62
|
descriptionLineHeight: typography.lineHeight,
|
|
62
63
|
descriptionPaddingStart: '0.25em',
|
|
63
|
-
descriptionColor: colors === null || colors === void 0 ? void 0 : (_colors$
|
|
64
|
+
descriptionColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts8 = colors.contrasts) === null || _colors$contrasts8 === void 0 ? void 0 : _colors$contrasts8.grey5782
|
|
64
65
|
};
|
|
65
66
|
return {
|
|
66
67
|
...componentVariables,
|
|
@@ -32,7 +32,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
32
32
|
|
|
33
33
|
const propTypes = exports.propTypes = {
|
|
34
34
|
as: _propTypes.default.elementType,
|
|
35
|
-
variant: _propTypes.default.oneOf(['default', 'highlighted', 'selected', 'disabled', 'highlighted-disabled']),
|
|
35
|
+
variant: _propTypes.default.oneOf(['default', 'highlighted', 'selected', 'disabled', 'highlighted-disabled', 'selected-highlighted']),
|
|
36
36
|
role: _propTypes.default.string,
|
|
37
37
|
renderBeforeLabel: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
|
|
38
38
|
renderAfterLabel: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
|
|
@@ -63,12 +63,16 @@ const generateStyle = (componentTheme, props) => {
|
|
|
63
63
|
cursor: 'not-allowed',
|
|
64
64
|
opacity: 0.5
|
|
65
65
|
},
|
|
66
|
-
|
|
66
|
+
'highlighted-disabled': {
|
|
67
67
|
background: componentTheme.highlightedBackground,
|
|
68
68
|
color: componentTheme.highlightedLabelColor,
|
|
69
69
|
cursor: 'not-allowed',
|
|
70
70
|
opacity: 0.5
|
|
71
71
|
},
|
|
72
|
+
'selected-highlighted': {
|
|
73
|
+
background: componentTheme.selectedHighlightedBackground,
|
|
74
|
+
color: componentTheme.highlightedLabelColor
|
|
75
|
+
},
|
|
72
76
|
default: {
|
|
73
77
|
transition: 'background 200ms'
|
|
74
78
|
}
|
|
@@ -34,7 +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
|
+
var _colors$contrasts, _colors$contrasts2, _colors$contrasts3, _colors$contrasts4, _colors$contrasts5, _colors$contrasts6, _colors$contrasts7, _colors$contrasts8;
|
|
38
38
|
const colors = theme.colors,
|
|
39
39
|
typography = theme.typography,
|
|
40
40
|
spacing = theme.spacing,
|
|
@@ -57,6 +57,7 @@ const generateComponentTheme = theme => {
|
|
|
57
57
|
highlightedBackground: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.blue4570,
|
|
58
58
|
selectedLabelColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.white1010,
|
|
59
59
|
selectedBackground: colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.grey4570,
|
|
60
|
+
selectedHighlightedBackground: colors === null || colors === void 0 ? void 0 : (_colors$contrasts7 = colors.contrasts) === null || _colors$contrasts7 === void 0 ? void 0 : _colors$contrasts7.blue5782,
|
|
60
61
|
padding: `${spacing === null || spacing === void 0 ? void 0 : spacing.xSmall} ${spacing === null || spacing === void 0 ? void 0 : spacing.small}`,
|
|
61
62
|
iconPadding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
|
|
62
63
|
nestedPadding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
|
|
@@ -66,7 +67,7 @@ const generateComponentTheme = theme => {
|
|
|
66
67
|
descriptionFontWeight: typography.fontWeightNormal,
|
|
67
68
|
descriptionLineHeight: typography.lineHeight,
|
|
68
69
|
descriptionPaddingStart: '0.25em',
|
|
69
|
-
descriptionColor: colors === null || colors === void 0 ? void 0 : (_colors$
|
|
70
|
+
descriptionColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts8 = colors.contrasts) === null || _colors$contrasts8 === void 0 ? void 0 : _colors$contrasts8.grey5782
|
|
70
71
|
};
|
|
71
72
|
return {
|
|
72
73
|
...componentVariables,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-options",
|
|
3
|
-
"version": "10.17.1-snapshot-
|
|
3
|
+
"version": "10.17.1-snapshot-5",
|
|
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,11 +23,11 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-axe-check": "10.17.1-snapshot-
|
|
27
|
-
"@instructure/ui-babel-preset": "10.17.1-snapshot-
|
|
28
|
-
"@instructure/ui-color-utils": "10.17.1-snapshot-
|
|
29
|
-
"@instructure/ui-test-utils": "10.17.1-snapshot-
|
|
30
|
-
"@instructure/ui-themes": "10.17.1-snapshot-
|
|
26
|
+
"@instructure/ui-axe-check": "10.17.1-snapshot-5",
|
|
27
|
+
"@instructure/ui-babel-preset": "10.17.1-snapshot-5",
|
|
28
|
+
"@instructure/ui-color-utils": "10.17.1-snapshot-5",
|
|
29
|
+
"@instructure/ui-test-utils": "10.17.1-snapshot-5",
|
|
30
|
+
"@instructure/ui-themes": "10.17.1-snapshot-5",
|
|
31
31
|
"@testing-library/jest-dom": "^6.6.3",
|
|
32
32
|
"@testing-library/react": "^16.0.1",
|
|
33
33
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@babel/runtime": "^7.26.0",
|
|
38
|
-
"@instructure/emotion": "10.17.1-snapshot-
|
|
39
|
-
"@instructure/shared-types": "10.17.1-snapshot-
|
|
40
|
-
"@instructure/ui-icons": "10.17.1-snapshot-
|
|
41
|
-
"@instructure/ui-prop-types": "10.17.1-snapshot-
|
|
42
|
-
"@instructure/ui-react-utils": "10.17.1-snapshot-
|
|
43
|
-
"@instructure/ui-testable": "10.17.1-snapshot-
|
|
44
|
-
"@instructure/ui-utils": "10.17.1-snapshot-
|
|
45
|
-
"@instructure/ui-view": "10.17.1-snapshot-
|
|
38
|
+
"@instructure/emotion": "10.17.1-snapshot-5",
|
|
39
|
+
"@instructure/shared-types": "10.17.1-snapshot-5",
|
|
40
|
+
"@instructure/ui-icons": "10.17.1-snapshot-5",
|
|
41
|
+
"@instructure/ui-prop-types": "10.17.1-snapshot-5",
|
|
42
|
+
"@instructure/ui-react-utils": "10.17.1-snapshot-5",
|
|
43
|
+
"@instructure/ui-testable": "10.17.1-snapshot-5",
|
|
44
|
+
"@instructure/ui-utils": "10.17.1-snapshot-5",
|
|
45
|
+
"@instructure/ui-view": "10.17.1-snapshot-5",
|
|
46
46
|
"prop-types": "^15.8.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
@@ -49,6 +49,7 @@ type OptionsItemRenderProps = {
|
|
|
49
49
|
| 'selected'
|
|
50
50
|
| 'disabled'
|
|
51
51
|
| 'highlighted-disabled'
|
|
52
|
+
| 'selected-highlighted'
|
|
52
53
|
/**
|
|
53
54
|
* The ARIA role of the element
|
|
54
55
|
*/
|
|
@@ -125,7 +126,8 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
125
126
|
'highlighted',
|
|
126
127
|
'selected',
|
|
127
128
|
'disabled',
|
|
128
|
-
'highlighted-disabled'
|
|
129
|
+
'highlighted-disabled',
|
|
130
|
+
'selected-highlighted'
|
|
129
131
|
]),
|
|
130
132
|
role: PropTypes.string,
|
|
131
133
|
renderBeforeLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
@@ -64,12 +64,16 @@ const generateStyle = (
|
|
|
64
64
|
color: componentTheme.highlightedLabelColor
|
|
65
65
|
},
|
|
66
66
|
disabled: { cursor: 'not-allowed', opacity: 0.5 },
|
|
67
|
-
|
|
67
|
+
'highlighted-disabled': {
|
|
68
68
|
background: componentTheme.highlightedBackground,
|
|
69
69
|
color: componentTheme.highlightedLabelColor,
|
|
70
70
|
cursor: 'not-allowed',
|
|
71
71
|
opacity: 0.5
|
|
72
72
|
},
|
|
73
|
+
'selected-highlighted': {
|
|
74
|
+
background: componentTheme.selectedHighlightedBackground,
|
|
75
|
+
color: componentTheme.highlightedLabelColor
|
|
76
|
+
},
|
|
73
77
|
default: {
|
|
74
78
|
transition: 'background 200ms'
|
|
75
79
|
}
|
|
@@ -53,6 +53,7 @@ const generateComponentTheme = (theme: Theme): OptionsItemTheme => {
|
|
|
53
53
|
highlightedBackground: colors?.contrasts?.blue4570,
|
|
54
54
|
selectedLabelColor: colors?.contrasts?.white1010,
|
|
55
55
|
selectedBackground: colors?.contrasts?.grey4570,
|
|
56
|
+
selectedHighlightedBackground: colors?.contrasts?.blue5782,
|
|
56
57
|
|
|
57
58
|
padding: `${spacing?.xSmall} ${spacing?.small}`,
|
|
58
59
|
iconPadding: spacing?.small,
|