@instructure/ui-options 8.17.1-snapshot.21 → 8.17.1-snapshot.71
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/es/Options/Item/index.js +22 -26
- package/es/Options/Item/theme.js +13 -13
- package/es/Options/Separator/index.js +8 -12
- package/es/Options/Separator/theme.js +3 -3
- package/es/Options/index.js +15 -19
- package/es/Options/theme.js +5 -5
- package/lib/Options/Item/index.js +22 -26
- package/lib/Options/Item/theme.js +13 -13
- package/lib/Options/Separator/index.js +8 -12
- package/lib/Options/Separator/theme.js +3 -3
- package/lib/Options/index.js +15 -19
- package/lib/Options/theme.js +5 -5
- package/package.json +14 -14
- package/tsconfig.build.tsbuildinfo +1 -1
package/es/Options/Item/index.js
CHANGED
|
@@ -47,26 +47,22 @@ let Item = (_dec = withStyle(generateStyles, generateComponentTheme), _dec2 = te
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
componentDidMount() {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
50
|
+
this.props.makeStyles?.();
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
componentDidUpdate() {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
54
|
+
this.props.makeStyles?.();
|
|
59
55
|
}
|
|
60
56
|
|
|
61
57
|
renderContent(renderLabel, contentVariant) {
|
|
62
|
-
const _this$
|
|
63
|
-
styles = _this$
|
|
64
|
-
variant = _this$
|
|
65
|
-
as = _this$
|
|
66
|
-
role = _this$
|
|
67
|
-
children = _this$
|
|
58
|
+
const _this$props = this.props,
|
|
59
|
+
styles = _this$props.styles,
|
|
60
|
+
variant = _this$props.variant,
|
|
61
|
+
as = _this$props.as,
|
|
62
|
+
role = _this$props.role,
|
|
63
|
+
children = _this$props.children;
|
|
68
64
|
return jsx("span", {
|
|
69
|
-
css: [styles
|
|
65
|
+
css: [styles?.content, contentVariant],
|
|
70
66
|
role: "presentation",
|
|
71
67
|
"aria-hidden": "true"
|
|
72
68
|
}, callRenderProp(renderLabel, {
|
|
@@ -78,32 +74,32 @@ let Item = (_dec = withStyle(generateStyles, generateComponentTheme), _dec2 = te
|
|
|
78
74
|
}
|
|
79
75
|
|
|
80
76
|
render() {
|
|
81
|
-
const _this$
|
|
82
|
-
as = _this$
|
|
83
|
-
role = _this$
|
|
84
|
-
styles = _this$
|
|
85
|
-
description = _this$
|
|
86
|
-
descriptionRole = _this$
|
|
87
|
-
renderBeforeLabel = _this$
|
|
88
|
-
renderAfterLabel = _this$
|
|
89
|
-
children = _this$
|
|
77
|
+
const _this$props2 = this.props,
|
|
78
|
+
as = _this$props2.as,
|
|
79
|
+
role = _this$props2.role,
|
|
80
|
+
styles = _this$props2.styles,
|
|
81
|
+
description = _this$props2.description,
|
|
82
|
+
descriptionRole = _this$props2.descriptionRole,
|
|
83
|
+
renderBeforeLabel = _this$props2.renderBeforeLabel,
|
|
84
|
+
renderAfterLabel = _this$props2.renderAfterLabel,
|
|
85
|
+
children = _this$props2.children;
|
|
90
86
|
const ElementType = getElementType(Item, this.props, () => as);
|
|
91
87
|
const passthroughProps = omitProps(this.props, Item.allowedProps);
|
|
92
88
|
const childrenContent = callRenderProp(children);
|
|
93
89
|
const descriptionContent = callRenderProp(description);
|
|
94
90
|
return jsx(ElementType, {
|
|
95
91
|
role: "none",
|
|
96
|
-
css: styles
|
|
92
|
+
css: styles?.item,
|
|
97
93
|
ref: element => {
|
|
98
94
|
this.ref = element;
|
|
99
95
|
}
|
|
100
96
|
}, jsx("span", Object.assign({}, passthroughProps, {
|
|
101
|
-
css: styles
|
|
97
|
+
css: styles?.container,
|
|
102
98
|
role: role
|
|
103
99
|
}), childrenContent, descriptionContent && jsx("span", {
|
|
104
|
-
css: styles
|
|
100
|
+
css: styles?.description,
|
|
105
101
|
role: descriptionRole
|
|
106
|
-
}, descriptionContent)), renderBeforeLabel && this.renderContent(renderBeforeLabel, styles
|
|
102
|
+
}, descriptionContent)), renderBeforeLabel && this.renderContent(renderBeforeLabel, styles?.contentBefore), renderAfterLabel && this.renderContent(renderAfterLabel, styles?.contentAfter));
|
|
107
103
|
}
|
|
108
104
|
|
|
109
105
|
}, _class2.displayName = "Item", _class2.componentId = 'Options.Item', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
|
package/es/Options/Item/theme.js
CHANGED
|
@@ -39,19 +39,19 @@ const generateComponentTheme = theme => {
|
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
const componentVariables = {
|
|
42
|
-
fontSize: typography
|
|
43
|
-
fontFamily: typography
|
|
44
|
-
fontWeight: typography
|
|
45
|
-
lineHeight: typography
|
|
46
|
-
color: colors
|
|
47
|
-
background: colors
|
|
48
|
-
highlightedLabelColor: colors
|
|
49
|
-
highlightedBackground: colors
|
|
50
|
-
selectedLabelColor: colors
|
|
51
|
-
selectedBackground: colors
|
|
52
|
-
padding: `${spacing
|
|
53
|
-
iconPadding: spacing
|
|
54
|
-
nestedPadding: spacing
|
|
42
|
+
fontSize: typography?.fontSizeMedium,
|
|
43
|
+
fontFamily: typography?.fontFamily,
|
|
44
|
+
fontWeight: typography?.fontWeightNormal,
|
|
45
|
+
lineHeight: typography?.lineHeightCondensed,
|
|
46
|
+
color: colors?.textDarkest,
|
|
47
|
+
background: colors?.backgroundLightest,
|
|
48
|
+
highlightedLabelColor: colors?.textLightest,
|
|
49
|
+
highlightedBackground: colors?.backgroundBrand,
|
|
50
|
+
selectedLabelColor: colors?.textLightest,
|
|
51
|
+
selectedBackground: colors?.backgroundDark,
|
|
52
|
+
padding: `${spacing?.xSmall} ${spacing?.small}`,
|
|
53
|
+
iconPadding: spacing?.small,
|
|
54
|
+
nestedPadding: spacing?.medium,
|
|
55
55
|
beforeLabelContentVOffset: '0.625rem',
|
|
56
56
|
afterLabelContentVOffset: '0.625rem',
|
|
57
57
|
descriptionFontSize: typography.fontSizeSmall,
|
|
@@ -45,29 +45,25 @@ id: Options.Separator
|
|
|
45
45
|
|
|
46
46
|
let Separator = (_dec = withStyle(generateStyles, generateComponentTheme), _dec(_class = (_temp = _class2 = class Separator extends Component {
|
|
47
47
|
componentDidMount() {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
48
|
+
this.props.makeStyles?.();
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
componentDidUpdate() {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
52
|
+
this.props.makeStyles?.();
|
|
57
53
|
}
|
|
58
54
|
|
|
59
55
|
render() {
|
|
60
|
-
const _this$
|
|
61
|
-
as = _this$
|
|
62
|
-
styles = _this$
|
|
63
|
-
makeStyles = _this$
|
|
64
|
-
rest = _objectWithoutProperties(_this$
|
|
56
|
+
const _this$props = this.props,
|
|
57
|
+
as = _this$props.as,
|
|
58
|
+
styles = _this$props.styles,
|
|
59
|
+
makeStyles = _this$props.makeStyles,
|
|
60
|
+
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
65
61
|
|
|
66
62
|
const ElementType = getElementType(Separator, this.props, () => as);
|
|
67
63
|
return jsx(ElementType, {
|
|
68
64
|
role: "none"
|
|
69
65
|
}, jsx("div", Object.assign({}, rest, {
|
|
70
|
-
css: styles
|
|
66
|
+
css: styles?.separator,
|
|
71
67
|
role: "presentation"
|
|
72
68
|
})));
|
|
73
69
|
}
|
|
@@ -32,9 +32,9 @@ const generateComponentTheme = theme => {
|
|
|
32
32
|
colors = theme.colors,
|
|
33
33
|
spacing = theme.spacing;
|
|
34
34
|
const componentVariables = {
|
|
35
|
-
background: colors
|
|
36
|
-
height: borders
|
|
37
|
-
margin: `0 ${spacing
|
|
35
|
+
background: colors?.backgroundMedium,
|
|
36
|
+
height: borders?.widthSmall,
|
|
37
|
+
margin: `0 ${spacing?.small}`
|
|
38
38
|
};
|
|
39
39
|
return { ...componentVariables
|
|
40
40
|
};
|
package/es/Options/index.js
CHANGED
|
@@ -55,15 +55,11 @@ let Options = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyles, g
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
componentDidMount() {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
58
|
+
this.props.makeStyles?.();
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
componentDidUpdate() {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
62
|
+
this.props.makeStyles?.();
|
|
67
63
|
}
|
|
68
64
|
|
|
69
65
|
get childAs() {
|
|
@@ -77,14 +73,14 @@ let Options = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyles, g
|
|
|
77
73
|
}
|
|
78
74
|
|
|
79
75
|
renderLabel() {
|
|
80
|
-
const _this$
|
|
81
|
-
renderLabel = _this$
|
|
82
|
-
styles = _this$
|
|
76
|
+
const _this$props = this.props,
|
|
77
|
+
renderLabel = _this$props.renderLabel,
|
|
78
|
+
styles = _this$props.styles;
|
|
83
79
|
return jsx("span", {
|
|
84
80
|
id: this._labelId,
|
|
85
81
|
role: "presentation",
|
|
86
82
|
"aria-hidden": "true",
|
|
87
|
-
css: styles
|
|
83
|
+
css: styles?.label
|
|
88
84
|
}, callRenderProp(renderLabel));
|
|
89
85
|
}
|
|
90
86
|
|
|
@@ -93,7 +89,7 @@ let Options = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyles, g
|
|
|
93
89
|
return jsx(Item, {
|
|
94
90
|
as: this.childAs,
|
|
95
91
|
role: "presentation",
|
|
96
|
-
css: styles
|
|
92
|
+
css: styles?.label
|
|
97
93
|
}, subOptions);
|
|
98
94
|
}
|
|
99
95
|
|
|
@@ -116,19 +112,19 @@ let Options = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyles, g
|
|
|
116
112
|
|
|
117
113
|
render() {
|
|
118
114
|
const passthroughProps = View.omitViewProps(omitProps(this.props, Options.allowedProps), Options);
|
|
119
|
-
const _this$
|
|
120
|
-
as = _this$
|
|
121
|
-
role = _this$
|
|
122
|
-
renderLabel = _this$
|
|
123
|
-
elementRef = _this$
|
|
124
|
-
styles = _this$
|
|
115
|
+
const _this$props2 = this.props,
|
|
116
|
+
as = _this$props2.as,
|
|
117
|
+
role = _this$props2.role,
|
|
118
|
+
renderLabel = _this$props2.renderLabel,
|
|
119
|
+
elementRef = _this$props2.elementRef,
|
|
120
|
+
styles = _this$props2.styles;
|
|
125
121
|
return jsx("div", {
|
|
126
|
-
css: styles
|
|
122
|
+
css: styles?.options,
|
|
127
123
|
role: "presentation",
|
|
128
124
|
ref: this.handleRef
|
|
129
125
|
}, renderLabel && this.renderLabel(), jsx(View, Object.assign({}, passthroughProps, {
|
|
130
126
|
elementRef: elementRef,
|
|
131
|
-
css: styles
|
|
127
|
+
css: styles?.list,
|
|
132
128
|
as: as,
|
|
133
129
|
role: role,
|
|
134
130
|
display: "block",
|
package/es/Options/theme.js
CHANGED
|
@@ -32,11 +32,11 @@ const generateComponentTheme = theme => {
|
|
|
32
32
|
typography = theme.typography,
|
|
33
33
|
spacing = theme.spacing;
|
|
34
34
|
const componentVariables = {
|
|
35
|
-
labelFontWeight: typography
|
|
36
|
-
background: colors
|
|
37
|
-
labelColor: colors
|
|
38
|
-
labelPadding: `${spacing
|
|
39
|
-
nestedLabelPadding: `${spacing
|
|
35
|
+
labelFontWeight: typography?.fontWeightBold,
|
|
36
|
+
background: colors?.backgroundLightest,
|
|
37
|
+
labelColor: colors?.textDarkest,
|
|
38
|
+
labelPadding: `${spacing?.xSmall} 0`,
|
|
39
|
+
nestedLabelPadding: `${spacing?.xSmall} ${spacing?.small}`
|
|
40
40
|
};
|
|
41
41
|
return { ...componentVariables
|
|
42
42
|
};
|
|
@@ -37,26 +37,22 @@ let Item = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
componentDidMount() {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
40
|
+
this.props.makeStyles?.();
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
componentDidUpdate() {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
44
|
+
this.props.makeStyles?.();
|
|
49
45
|
}
|
|
50
46
|
|
|
51
47
|
renderContent(renderLabel, contentVariant) {
|
|
52
|
-
const _this$
|
|
53
|
-
styles = _this$
|
|
54
|
-
variant = _this$
|
|
55
|
-
as = _this$
|
|
56
|
-
role = _this$
|
|
57
|
-
children = _this$
|
|
48
|
+
const _this$props = this.props,
|
|
49
|
+
styles = _this$props.styles,
|
|
50
|
+
variant = _this$props.variant,
|
|
51
|
+
as = _this$props.as,
|
|
52
|
+
role = _this$props.role,
|
|
53
|
+
children = _this$props.children;
|
|
58
54
|
return (0, _emotion.jsx)("span", {
|
|
59
|
-
css: [styles
|
|
55
|
+
css: [styles?.content, contentVariant],
|
|
60
56
|
role: "presentation",
|
|
61
57
|
"aria-hidden": "true"
|
|
62
58
|
}, (0, _uiReactUtils.callRenderProp)(renderLabel, {
|
|
@@ -68,32 +64,32 @@ let Item = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
|
|
|
68
64
|
}
|
|
69
65
|
|
|
70
66
|
render() {
|
|
71
|
-
const _this$
|
|
72
|
-
as = _this$
|
|
73
|
-
role = _this$
|
|
74
|
-
styles = _this$
|
|
75
|
-
description = _this$
|
|
76
|
-
descriptionRole = _this$
|
|
77
|
-
renderBeforeLabel = _this$
|
|
78
|
-
renderAfterLabel = _this$
|
|
79
|
-
children = _this$
|
|
67
|
+
const _this$props2 = this.props,
|
|
68
|
+
as = _this$props2.as,
|
|
69
|
+
role = _this$props2.role,
|
|
70
|
+
styles = _this$props2.styles,
|
|
71
|
+
description = _this$props2.description,
|
|
72
|
+
descriptionRole = _this$props2.descriptionRole,
|
|
73
|
+
renderBeforeLabel = _this$props2.renderBeforeLabel,
|
|
74
|
+
renderAfterLabel = _this$props2.renderAfterLabel,
|
|
75
|
+
children = _this$props2.children;
|
|
80
76
|
const ElementType = (0, _uiReactUtils.getElementType)(Item, this.props, () => as);
|
|
81
77
|
const passthroughProps = (0, _uiReactUtils.omitProps)(this.props, Item.allowedProps);
|
|
82
78
|
const childrenContent = (0, _uiReactUtils.callRenderProp)(children);
|
|
83
79
|
const descriptionContent = (0, _uiReactUtils.callRenderProp)(description);
|
|
84
80
|
return (0, _emotion.jsx)(ElementType, {
|
|
85
81
|
role: "none",
|
|
86
|
-
css: styles
|
|
82
|
+
css: styles?.item,
|
|
87
83
|
ref: element => {
|
|
88
84
|
this.ref = element;
|
|
89
85
|
}
|
|
90
86
|
}, (0, _emotion.jsx)("span", Object.assign({}, passthroughProps, {
|
|
91
|
-
css: styles
|
|
87
|
+
css: styles?.container,
|
|
92
88
|
role: role
|
|
93
89
|
}), childrenContent, descriptionContent && (0, _emotion.jsx)("span", {
|
|
94
|
-
css: styles
|
|
90
|
+
css: styles?.description,
|
|
95
91
|
role: descriptionRole
|
|
96
|
-
}, descriptionContent)), renderBeforeLabel && this.renderContent(renderBeforeLabel, styles
|
|
92
|
+
}, descriptionContent)), renderBeforeLabel && this.renderContent(renderBeforeLabel, styles?.contentBefore), renderAfterLabel && this.renderContent(renderAfterLabel, styles?.contentAfter));
|
|
97
93
|
}
|
|
98
94
|
|
|
99
95
|
}, _class2.displayName = "Item", _class2.componentId = 'Options.Item', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
|
|
@@ -46,19 +46,19 @@ const generateComponentTheme = theme => {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
const componentVariables = {
|
|
49
|
-
fontSize: typography
|
|
50
|
-
fontFamily: typography
|
|
51
|
-
fontWeight: typography
|
|
52
|
-
lineHeight: typography
|
|
53
|
-
color: colors
|
|
54
|
-
background: colors
|
|
55
|
-
highlightedLabelColor: colors
|
|
56
|
-
highlightedBackground: colors
|
|
57
|
-
selectedLabelColor: colors
|
|
58
|
-
selectedBackground: colors
|
|
59
|
-
padding: `${spacing
|
|
60
|
-
iconPadding: spacing
|
|
61
|
-
nestedPadding: spacing
|
|
49
|
+
fontSize: typography?.fontSizeMedium,
|
|
50
|
+
fontFamily: typography?.fontFamily,
|
|
51
|
+
fontWeight: typography?.fontWeightNormal,
|
|
52
|
+
lineHeight: typography?.lineHeightCondensed,
|
|
53
|
+
color: colors?.textDarkest,
|
|
54
|
+
background: colors?.backgroundLightest,
|
|
55
|
+
highlightedLabelColor: colors?.textLightest,
|
|
56
|
+
highlightedBackground: colors?.backgroundBrand,
|
|
57
|
+
selectedLabelColor: colors?.textLightest,
|
|
58
|
+
selectedBackground: colors?.backgroundDark,
|
|
59
|
+
padding: `${spacing?.xSmall} ${spacing?.small}`,
|
|
60
|
+
iconPadding: spacing?.small,
|
|
61
|
+
nestedPadding: spacing?.medium,
|
|
62
62
|
beforeLabelContentVOffset: '0.625rem',
|
|
63
63
|
afterLabelContentVOffset: '0.625rem',
|
|
64
64
|
descriptionFontSize: typography.fontSizeSmall,
|
|
@@ -35,28 +35,24 @@ id: Options.Separator
|
|
|
35
35
|
**/
|
|
36
36
|
let Separator = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = class Separator extends _react.Component {
|
|
37
37
|
componentDidMount() {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
38
|
+
this.props.makeStyles?.();
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
componentDidUpdate() {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
42
|
+
this.props.makeStyles?.();
|
|
47
43
|
}
|
|
48
44
|
|
|
49
45
|
render() {
|
|
50
|
-
const _this$
|
|
51
|
-
as = _this$
|
|
52
|
-
styles = _this$
|
|
53
|
-
makeStyles = _this$
|
|
54
|
-
rest = (0, _objectWithoutProperties2.default)(_this$
|
|
46
|
+
const _this$props = this.props,
|
|
47
|
+
as = _this$props.as,
|
|
48
|
+
styles = _this$props.styles,
|
|
49
|
+
makeStyles = _this$props.makeStyles,
|
|
50
|
+
rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
55
51
|
const ElementType = (0, _uiReactUtils.getElementType)(Separator, this.props, () => as);
|
|
56
52
|
return (0, _emotion.jsx)(ElementType, {
|
|
57
53
|
role: "none"
|
|
58
54
|
}, (0, _emotion.jsx)("div", Object.assign({}, rest, {
|
|
59
|
-
css: styles
|
|
55
|
+
css: styles?.separator,
|
|
60
56
|
role: "presentation"
|
|
61
57
|
})));
|
|
62
58
|
}
|
|
@@ -39,9 +39,9 @@ const generateComponentTheme = theme => {
|
|
|
39
39
|
colors = theme.colors,
|
|
40
40
|
spacing = theme.spacing;
|
|
41
41
|
const componentVariables = {
|
|
42
|
-
background: colors
|
|
43
|
-
height: borders
|
|
44
|
-
margin: `0 ${spacing
|
|
42
|
+
background: colors?.backgroundMedium,
|
|
43
|
+
height: borders?.widthSmall,
|
|
44
|
+
margin: `0 ${spacing?.small}`
|
|
45
45
|
};
|
|
46
46
|
return { ...componentVariables
|
|
47
47
|
};
|
package/lib/Options/index.js
CHANGED
|
@@ -50,15 +50,11 @@ let Options = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emo
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
componentDidMount() {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
53
|
+
this.props.makeStyles?.();
|
|
56
54
|
}
|
|
57
55
|
|
|
58
56
|
componentDidUpdate() {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
57
|
+
this.props.makeStyles?.();
|
|
62
58
|
}
|
|
63
59
|
|
|
64
60
|
get childAs() {
|
|
@@ -72,14 +68,14 @@ let Options = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emo
|
|
|
72
68
|
}
|
|
73
69
|
|
|
74
70
|
renderLabel() {
|
|
75
|
-
const _this$
|
|
76
|
-
renderLabel = _this$
|
|
77
|
-
styles = _this$
|
|
71
|
+
const _this$props = this.props,
|
|
72
|
+
renderLabel = _this$props.renderLabel,
|
|
73
|
+
styles = _this$props.styles;
|
|
78
74
|
return (0, _emotion.jsx)("span", {
|
|
79
75
|
id: this._labelId,
|
|
80
76
|
role: "presentation",
|
|
81
77
|
"aria-hidden": "true",
|
|
82
|
-
css: styles
|
|
78
|
+
css: styles?.label
|
|
83
79
|
}, (0, _uiReactUtils.callRenderProp)(renderLabel));
|
|
84
80
|
}
|
|
85
81
|
|
|
@@ -88,7 +84,7 @@ let Options = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emo
|
|
|
88
84
|
return (0, _emotion.jsx)(_Item.Item, {
|
|
89
85
|
as: this.childAs,
|
|
90
86
|
role: "presentation",
|
|
91
|
-
css: styles
|
|
87
|
+
css: styles?.label
|
|
92
88
|
}, subOptions);
|
|
93
89
|
}
|
|
94
90
|
|
|
@@ -112,19 +108,19 @@ let Options = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emo
|
|
|
112
108
|
render() {
|
|
113
109
|
const passthroughProps = _uiView.View.omitViewProps((0, _uiReactUtils.omitProps)(this.props, Options.allowedProps), Options);
|
|
114
110
|
|
|
115
|
-
const _this$
|
|
116
|
-
as = _this$
|
|
117
|
-
role = _this$
|
|
118
|
-
renderLabel = _this$
|
|
119
|
-
elementRef = _this$
|
|
120
|
-
styles = _this$
|
|
111
|
+
const _this$props2 = this.props,
|
|
112
|
+
as = _this$props2.as,
|
|
113
|
+
role = _this$props2.role,
|
|
114
|
+
renderLabel = _this$props2.renderLabel,
|
|
115
|
+
elementRef = _this$props2.elementRef,
|
|
116
|
+
styles = _this$props2.styles;
|
|
121
117
|
return (0, _emotion.jsx)("div", {
|
|
122
|
-
css: styles
|
|
118
|
+
css: styles?.options,
|
|
123
119
|
role: "presentation",
|
|
124
120
|
ref: this.handleRef
|
|
125
121
|
}, renderLabel && this.renderLabel(), (0, _emotion.jsx)(_uiView.View, Object.assign({}, passthroughProps, {
|
|
126
122
|
elementRef: elementRef,
|
|
127
|
-
css: styles
|
|
123
|
+
css: styles?.list,
|
|
128
124
|
as: as,
|
|
129
125
|
role: role,
|
|
130
126
|
display: "block",
|
package/lib/Options/theme.js
CHANGED
|
@@ -39,11 +39,11 @@ const generateComponentTheme = theme => {
|
|
|
39
39
|
typography = theme.typography,
|
|
40
40
|
spacing = theme.spacing;
|
|
41
41
|
const componentVariables = {
|
|
42
|
-
labelFontWeight: typography
|
|
43
|
-
background: colors
|
|
44
|
-
labelColor: colors
|
|
45
|
-
labelPadding: `${spacing
|
|
46
|
-
nestedLabelPadding: `${spacing
|
|
42
|
+
labelFontWeight: typography?.fontWeightBold,
|
|
43
|
+
background: colors?.backgroundLightest,
|
|
44
|
+
labelColor: colors?.textDarkest,
|
|
45
|
+
labelPadding: `${spacing?.xSmall} 0`,
|
|
46
|
+
nestedLabelPadding: `${spacing?.xSmall} ${spacing?.small}`
|
|
47
47
|
};
|
|
48
48
|
return { ...componentVariables
|
|
49
49
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-options",
|
|
3
|
-
"version": "8.17.1-snapshot.
|
|
3
|
+
"version": "8.17.1-snapshot.71+34dfb2442",
|
|
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": "8.17.1-snapshot.
|
|
27
|
-
"@instructure/ui-color-utils": "8.17.1-snapshot.
|
|
28
|
-
"@instructure/ui-test-locator": "8.17.1-snapshot.
|
|
29
|
-
"@instructure/ui-test-utils": "8.17.1-snapshot.
|
|
30
|
-
"@instructure/ui-themes": "8.17.1-snapshot.
|
|
26
|
+
"@instructure/ui-babel-preset": "8.17.1-snapshot.71+34dfb2442",
|
|
27
|
+
"@instructure/ui-color-utils": "8.17.1-snapshot.71+34dfb2442",
|
|
28
|
+
"@instructure/ui-test-locator": "8.17.1-snapshot.71+34dfb2442",
|
|
29
|
+
"@instructure/ui-test-utils": "8.17.1-snapshot.71+34dfb2442",
|
|
30
|
+
"@instructure/ui-themes": "8.17.1-snapshot.71+34dfb2442"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.13.10",
|
|
34
|
-
"@instructure/emotion": "8.17.1-snapshot.
|
|
35
|
-
"@instructure/shared-types": "8.17.1-snapshot.
|
|
36
|
-
"@instructure/ui-icons": "8.17.1-snapshot.
|
|
37
|
-
"@instructure/ui-prop-types": "8.17.1-snapshot.
|
|
38
|
-
"@instructure/ui-react-utils": "8.17.1-snapshot.
|
|
39
|
-
"@instructure/ui-testable": "8.17.1-snapshot.
|
|
40
|
-
"@instructure/ui-view": "8.17.1-snapshot.
|
|
34
|
+
"@instructure/emotion": "8.17.1-snapshot.71+34dfb2442",
|
|
35
|
+
"@instructure/shared-types": "8.17.1-snapshot.71+34dfb2442",
|
|
36
|
+
"@instructure/ui-icons": "8.17.1-snapshot.71+34dfb2442",
|
|
37
|
+
"@instructure/ui-prop-types": "8.17.1-snapshot.71+34dfb2442",
|
|
38
|
+
"@instructure/ui-react-utils": "8.17.1-snapshot.71+34dfb2442",
|
|
39
|
+
"@instructure/ui-testable": "8.17.1-snapshot.71+34dfb2442",
|
|
40
|
+
"@instructure/ui-view": "8.17.1-snapshot.71+34dfb2442",
|
|
41
41
|
"prop-types": "^15"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"sideEffects": false,
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "34dfb2442c7ddce048d78ab1ecd5f3cbb78ee8d6"
|
|
51
51
|
}
|