@instructure/ui-modal 11.7.3-snapshot-25 → 11.7.3-snapshot-26
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 +5 -2
- package/es/Modal/v1/ModalBody/index.js +53 -54
- package/es/Modal/v1/ModalBody/styles.js +3 -1
- package/es/Modal/v1/ModalBody/theme.js +4 -3
- package/es/Modal/v1/ModalContext.js +1 -1
- package/es/Modal/v1/ModalFooter/index.js +20 -23
- package/es/Modal/v1/ModalFooter/styles.js +3 -1
- package/es/Modal/v1/ModalFooter/theme.js +12 -11
- package/es/Modal/v1/ModalHeader/index.js +47 -50
- package/es/Modal/v1/ModalHeader/styles.js +7 -3
- package/es/Modal/v1/ModalHeader/theme.js +10 -9
- package/es/Modal/v1/index.js +88 -84
- package/es/Modal/v1/styles.js +5 -3
- package/es/Modal/v1/theme.js +19 -18
- package/es/Modal/v2/ModalBody/index.js +54 -55
- package/es/Modal/v2/ModalBody/styles.js +4 -2
- package/es/Modal/v2/ModalContext.js +1 -1
- package/es/Modal/v2/ModalFooter/index.js +20 -23
- package/es/Modal/v2/ModalFooter/styles.js +4 -2
- package/es/Modal/v2/ModalHeader/index.js +47 -50
- package/es/Modal/v2/ModalHeader/styles.js +7 -3
- package/es/Modal/v2/index.js +88 -84
- package/es/Modal/v2/styles.js +5 -3
- package/lib/Modal/v1/ModalBody/index.js +53 -54
- package/lib/Modal/v1/ModalBody/styles.js +3 -1
- package/lib/Modal/v1/ModalBody/theme.js +4 -3
- package/lib/Modal/v1/ModalContext.js +1 -1
- package/lib/Modal/v1/ModalFooter/index.js +20 -23
- package/lib/Modal/v1/ModalFooter/styles.js +3 -1
- package/lib/Modal/v1/ModalFooter/theme.js +12 -11
- package/lib/Modal/v1/ModalHeader/index.js +47 -50
- package/lib/Modal/v1/ModalHeader/styles.js +7 -3
- package/lib/Modal/v1/ModalHeader/theme.js +10 -9
- package/lib/Modal/v1/index.js +88 -84
- package/lib/Modal/v1/styles.js +5 -3
- package/lib/Modal/v1/theme.js +19 -18
- package/lib/Modal/v2/ModalBody/index.js +54 -55
- package/lib/Modal/v2/ModalBody/styles.js +4 -2
- package/lib/Modal/v2/ModalContext.js +1 -1
- package/lib/Modal/v2/ModalFooter/index.js +20 -23
- package/lib/Modal/v2/ModalFooter/styles.js +4 -2
- package/lib/Modal/v2/ModalHeader/index.js +47 -50
- package/lib/Modal/v2/ModalHeader/styles.js +7 -3
- package/lib/Modal/v2/index.js +88 -84
- package/lib/Modal/v2/styles.js +5 -3
- package/package.json +18 -18
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,12 @@
|
|
|
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
|
-
## [11.7.3-snapshot-
|
|
6
|
+
## [11.7.3-snapshot-26](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3-snapshot-26) (2026-05-05)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **many:** update dependencies, remove lots of Babel plugins, remove Webpack 4 support ([f916fca](https://github.com/instructure/instructure-ui/commit/f916fcafdddcb2d7de401f93e8ff92cfdfa47bba))
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const _excluded = ["as", "elementRef", "overflow", "variant", "padding", "children"];
|
|
3
|
-
var _dec, _class, _ModalBody;
|
|
1
|
+
var _dec, _class;
|
|
4
2
|
/*
|
|
5
3
|
* The MIT License (MIT)
|
|
6
4
|
*
|
|
@@ -41,21 +39,30 @@ id: Modal.Body
|
|
|
41
39
|
---
|
|
42
40
|
**/
|
|
43
41
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
44
|
-
let ModalBody = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class =
|
|
42
|
+
let ModalBody = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class ModalBody extends Component {
|
|
43
|
+
static displayName = "ModalBody";
|
|
44
|
+
static componentId = 'Modal.Body';
|
|
45
|
+
static allowedProps = allowedProps;
|
|
46
|
+
static defaultProps = {
|
|
47
|
+
padding: 'medium',
|
|
48
|
+
as: 'div',
|
|
49
|
+
variant: 'default'
|
|
50
|
+
};
|
|
51
|
+
ref = null;
|
|
52
|
+
handleRef = el => {
|
|
53
|
+
const {
|
|
54
|
+
elementRef
|
|
55
|
+
} = this.props;
|
|
56
|
+
this.ref = el;
|
|
57
|
+
if (typeof elementRef === 'function') {
|
|
58
|
+
elementRef(el);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
45
61
|
constructor(props) {
|
|
46
62
|
super(props);
|
|
47
|
-
this.ref = null;
|
|
48
|
-
this.handleRef = el => {
|
|
49
|
-
const elementRef = this.props.elementRef;
|
|
50
|
-
this.ref = el;
|
|
51
|
-
if (typeof elementRef === 'function') {
|
|
52
|
-
elementRef(el);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
63
|
}
|
|
56
64
|
componentDidMount() {
|
|
57
|
-
|
|
58
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
65
|
+
this.props.makeStyles?.();
|
|
59
66
|
|
|
60
67
|
// We detect if -moz- prefixed style is present to identify whether we are in Firefox browser
|
|
61
68
|
const style = this.ref && getCSSStyleDeclaration(this.ref);
|
|
@@ -67,12 +74,11 @@ let ModalBody = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_
|
|
|
67
74
|
}
|
|
68
75
|
}
|
|
69
76
|
componentDidUpdate() {
|
|
70
|
-
|
|
71
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
77
|
+
this.props.makeStyles?.();
|
|
72
78
|
}
|
|
73
79
|
getFinalRef(el) {
|
|
74
80
|
if (!el) {
|
|
75
|
-
return
|
|
81
|
+
return undefined;
|
|
76
82
|
}
|
|
77
83
|
if (el instanceof Element) {
|
|
78
84
|
return el;
|
|
@@ -80,53 +86,46 @@ let ModalBody = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_
|
|
|
80
86
|
if (el.ref) {
|
|
81
87
|
return this.getFinalRef(el.ref);
|
|
82
88
|
}
|
|
83
|
-
return
|
|
89
|
+
return undefined;
|
|
84
90
|
}
|
|
85
91
|
render() {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
const {
|
|
93
|
+
as,
|
|
94
|
+
elementRef,
|
|
95
|
+
overflow,
|
|
96
|
+
variant,
|
|
97
|
+
padding,
|
|
98
|
+
children,
|
|
99
|
+
...rest
|
|
100
|
+
} = this.props;
|
|
95
101
|
const passthroughProps = View.omitViewProps(omitProps(rest, ModalBody.allowedProps), ModalBody);
|
|
96
102
|
const isFit = overflow === 'fit';
|
|
97
103
|
// this recursive function is needed because `ref` can be a React component.
|
|
98
104
|
// TODO rethink, the 'as' prop, likely its not a good idea to allow React
|
|
99
105
|
// components. See INSTUI-4674
|
|
100
106
|
const finalRef = this.getFinalRef(this.ref);
|
|
101
|
-
const hasScrollbar = finalRef && Math.abs((
|
|
107
|
+
const hasScrollbar = finalRef && Math.abs((finalRef.scrollHeight ?? 0) - (finalRef.getBoundingClientRect()?.height ?? 0)) > 1;
|
|
102
108
|
return _jsx(ModalContext.Consumer, {
|
|
103
|
-
children: value => {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
children: children
|
|
122
|
-
});
|
|
123
|
-
}
|
|
109
|
+
children: value => _jsx(View, {
|
|
110
|
+
...passthroughProps,
|
|
111
|
+
display: "block",
|
|
112
|
+
"data-cid": "ModalBody",
|
|
113
|
+
width: isFit ? '100%' : undefined,
|
|
114
|
+
height: isFit ? '100%' : undefined,
|
|
115
|
+
elementRef: this.handleRef,
|
|
116
|
+
as: as,
|
|
117
|
+
css: this.props.styles?.modalBody,
|
|
118
|
+
padding: padding
|
|
119
|
+
// check if there is a scrollbar, if so, the element has to be tabbable
|
|
120
|
+
,
|
|
121
|
+
...(hasScrollbar ? {
|
|
122
|
+
tabIndex: 0,
|
|
123
|
+
'aria-label': value.bodyScrollAriaLabel
|
|
124
|
+
} : {}),
|
|
125
|
+
children: children
|
|
126
|
+
})
|
|
124
127
|
});
|
|
125
128
|
}
|
|
126
|
-
}
|
|
127
|
-
padding: 'medium',
|
|
128
|
-
as: 'div',
|
|
129
|
-
variant: 'default'
|
|
130
|
-
}, _ModalBody)) || _class);
|
|
129
|
+
}) || _class);
|
|
131
130
|
export default ModalBody;
|
|
132
131
|
export { ModalBody };
|
|
@@ -33,7 +33,9 @@
|
|
|
33
33
|
* @return {Object} The final style object, which will be used in the component
|
|
34
34
|
*/
|
|
35
35
|
const generateStyle = (componentTheme, props) => {
|
|
36
|
-
const
|
|
36
|
+
const {
|
|
37
|
+
variant
|
|
38
|
+
} = props;
|
|
37
39
|
const backgroundStyle = variant === 'inverse' ? {
|
|
38
40
|
background: componentTheme.inverseBackground
|
|
39
41
|
} : {};
|
|
@@ -28,10 +28,11 @@
|
|
|
28
28
|
* @return {Object} The final theme object with the overrides and component variables
|
|
29
29
|
*/
|
|
30
30
|
const generateComponentTheme = theme => {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
const {
|
|
32
|
+
colors
|
|
33
|
+
} = theme;
|
|
33
34
|
return {
|
|
34
|
-
inverseBackground: colors
|
|
35
|
+
inverseBackground: colors?.contrasts?.grey100100
|
|
35
36
|
};
|
|
36
37
|
};
|
|
37
38
|
export default generateComponentTheme;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const _excluded = ["children"];
|
|
3
|
-
var _dec, _class, _ModalFooter;
|
|
1
|
+
var _dec, _class;
|
|
4
2
|
/*
|
|
5
3
|
* The MIT License (MIT)
|
|
6
4
|
*
|
|
@@ -38,37 +36,36 @@ parent: Modal
|
|
|
38
36
|
id: Modal.Footer
|
|
39
37
|
---
|
|
40
38
|
**/
|
|
41
|
-
let ModalFooter = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
let ModalFooter = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class ModalFooter extends Component {
|
|
40
|
+
static displayName = "ModalFooter";
|
|
41
|
+
static componentId = 'Modal.Footer';
|
|
42
|
+
static allowedProps = allowedProps;
|
|
43
|
+
static defaultProps = {
|
|
44
|
+
variant: 'default'
|
|
45
|
+
};
|
|
46
|
+
ref = null;
|
|
47
|
+
handleRef = el => {
|
|
48
|
+
this.ref = el;
|
|
49
|
+
};
|
|
49
50
|
componentDidMount() {
|
|
50
|
-
|
|
51
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
51
|
+
this.props.makeStyles?.();
|
|
52
52
|
}
|
|
53
53
|
componentDidUpdate() {
|
|
54
|
-
|
|
55
|
-
(_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?.();
|
|
56
55
|
}
|
|
57
56
|
render() {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
const {
|
|
58
|
+
children,
|
|
59
|
+
...rest
|
|
60
|
+
} = this.props;
|
|
62
61
|
return _jsx("div", {
|
|
63
|
-
css:
|
|
62
|
+
css: this.props.styles?.modalFooter,
|
|
64
63
|
...passthroughProps(rest),
|
|
65
64
|
ref: this.handleRef,
|
|
66
65
|
"data-cid": "ModalFooter",
|
|
67
66
|
children: children
|
|
68
67
|
});
|
|
69
68
|
}
|
|
70
|
-
}
|
|
71
|
-
variant: 'default'
|
|
72
|
-
}, _ModalFooter)) || _class);
|
|
69
|
+
}) || _class);
|
|
73
70
|
export default ModalFooter;
|
|
74
71
|
export { ModalFooter };
|
|
@@ -33,7 +33,9 @@
|
|
|
33
33
|
* @return {Object} The final style object, which will be used in the component
|
|
34
34
|
*/
|
|
35
35
|
const generateStyle = (componentTheme, props) => {
|
|
36
|
-
const
|
|
36
|
+
const {
|
|
37
|
+
variant
|
|
38
|
+
} = props;
|
|
37
39
|
const backgroundStyle = variant === 'inverse' ? {
|
|
38
40
|
background: componentTheme.inverseBackground,
|
|
39
41
|
borderTop: `${componentTheme.borderWidth} solid ${componentTheme.inverseBorderColor}`
|
|
@@ -28,18 +28,19 @@
|
|
|
28
28
|
* @return {Object} The final theme object with the overrides and component variables
|
|
29
29
|
*/
|
|
30
30
|
const generateComponentTheme = theme => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
spacing
|
|
34
|
-
borders
|
|
31
|
+
const {
|
|
32
|
+
colors,
|
|
33
|
+
spacing,
|
|
34
|
+
borders
|
|
35
|
+
} = theme;
|
|
35
36
|
const componentVariables = {
|
|
36
|
-
background: colors
|
|
37
|
-
borderColor: colors
|
|
38
|
-
borderWidth: borders
|
|
39
|
-
borderRadius: borders
|
|
40
|
-
padding: spacing
|
|
41
|
-
inverseBackground: colors
|
|
42
|
-
inverseBorderColor: colors
|
|
37
|
+
background: colors?.contrasts?.grey1111,
|
|
38
|
+
borderColor: colors?.contrasts?.grey1424,
|
|
39
|
+
borderWidth: borders?.widthSmall,
|
|
40
|
+
borderRadius: borders?.radiusMedium,
|
|
41
|
+
padding: spacing?.small,
|
|
42
|
+
inverseBackground: colors?.contrasts?.grey100100,
|
|
43
|
+
inverseBorderColor: colors?.contrasts?.grey100100
|
|
43
44
|
};
|
|
44
45
|
return {
|
|
45
46
|
...componentVariables
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const _excluded = ["children"];
|
|
3
|
-
var _dec, _class, _ModalHeader;
|
|
1
|
+
var _dec, _class;
|
|
4
2
|
/*
|
|
5
3
|
* The MIT License (MIT)
|
|
6
4
|
*
|
|
@@ -40,49 +38,51 @@ parent: Modal
|
|
|
40
38
|
id: Modal.Header
|
|
41
39
|
---
|
|
42
40
|
**/
|
|
43
|
-
let ModalHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
return text;
|
|
63
|
-
};
|
|
64
|
-
this.handleRef = el => {
|
|
65
|
-
this.ref = el;
|
|
66
|
-
if (el) {
|
|
67
|
-
var _this$context$setBody, _this$context;
|
|
68
|
-
const txt = this.getTextExcludingButtons(el);
|
|
69
|
-
(_this$context$setBody = (_this$context = this.context).setBodyScrollAriaLabel) === null || _this$context$setBody === void 0 ? void 0 : _this$context$setBody.call(_this$context, txt);
|
|
41
|
+
let ModalHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class ModalHeader extends Component {
|
|
42
|
+
static displayName = "ModalHeader";
|
|
43
|
+
static componentId = 'Modal.Header';
|
|
44
|
+
static allowedProps = allowedProps;
|
|
45
|
+
static defaultProps = {
|
|
46
|
+
variant: 'default',
|
|
47
|
+
spacing: 'default'
|
|
48
|
+
};
|
|
49
|
+
ref = null;
|
|
50
|
+
static contextType = ModalContext;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Gets all text in a DOM subtree, text under <button> nodes is excluded
|
|
54
|
+
*/
|
|
55
|
+
getTextExcludingButtons = root => {
|
|
56
|
+
const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT, {
|
|
57
|
+
acceptNode(node) {
|
|
58
|
+
return node.parentElement?.closest('button') ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
70
59
|
}
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
60
|
+
});
|
|
61
|
+
let text = '';
|
|
62
|
+
let current;
|
|
63
|
+
while (current = walker.nextNode()) {
|
|
64
|
+
text += current.nodeValue;
|
|
65
|
+
}
|
|
66
|
+
return text;
|
|
67
|
+
};
|
|
68
|
+
handleRef = el => {
|
|
69
|
+
this.ref = el;
|
|
70
|
+
if (el) {
|
|
71
|
+
const txt = this.getTextExcludingButtons(el);
|
|
72
|
+
this.context.setBodyScrollAriaLabel?.(txt);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
78
75
|
componentDidMount() {
|
|
79
|
-
|
|
80
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props, this.makeStyleProps());
|
|
76
|
+
this.props.makeStyles?.(this.makeStyleProps());
|
|
81
77
|
}
|
|
82
78
|
componentDidUpdate() {
|
|
83
|
-
|
|
84
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2, this.makeStyleProps());
|
|
79
|
+
this.props.makeStyles?.(this.makeStyleProps());
|
|
85
80
|
}
|
|
81
|
+
makeStyleProps = () => {
|
|
82
|
+
return {
|
|
83
|
+
withCloseButton: this.usesCloseButton
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
86
|
get usesCloseButton() {
|
|
87
87
|
let hasCloseButton = false;
|
|
88
88
|
Children.forEach(this.props.children, child => {
|
|
@@ -93,21 +93,18 @@ let ModalHeader = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
|
|
|
93
93
|
return hasCloseButton;
|
|
94
94
|
}
|
|
95
95
|
render() {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
const {
|
|
97
|
+
children,
|
|
98
|
+
...rest
|
|
99
|
+
} = this.props;
|
|
100
100
|
return _jsx("div", {
|
|
101
|
-
css:
|
|
101
|
+
css: this.props.styles?.modalHeader,
|
|
102
102
|
...passthroughProps(rest),
|
|
103
103
|
ref: this.handleRef,
|
|
104
104
|
"data-cid": "ModalHeader",
|
|
105
105
|
children: children
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
|
-
}
|
|
109
|
-
variant: 'default',
|
|
110
|
-
spacing: 'default'
|
|
111
|
-
}, _ModalHeader.contextType = ModalContext, _ModalHeader)) || _class);
|
|
108
|
+
}) || _class);
|
|
112
109
|
export default ModalHeader;
|
|
113
110
|
export { ModalHeader };
|
|
@@ -33,9 +33,13 @@
|
|
|
33
33
|
* @return {Object} The final style object, which will be used in the component
|
|
34
34
|
*/
|
|
35
35
|
const generateStyle = (componentTheme, props, state) => {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
const {
|
|
37
|
+
variant,
|
|
38
|
+
spacing
|
|
39
|
+
} = props;
|
|
40
|
+
const {
|
|
41
|
+
withCloseButton
|
|
42
|
+
} = state;
|
|
39
43
|
const sizeVariants = {
|
|
40
44
|
default: {
|
|
41
45
|
padding: componentTheme.padding,
|
|
@@ -28,16 +28,17 @@
|
|
|
28
28
|
* @return {Object} The final theme object with the overrides and component variables
|
|
29
29
|
*/
|
|
30
30
|
const generateComponentTheme = theme => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
spacing
|
|
31
|
+
const {
|
|
32
|
+
colors,
|
|
33
|
+
spacing
|
|
34
|
+
} = theme;
|
|
34
35
|
const componentVariables = {
|
|
35
|
-
background: colors
|
|
36
|
-
borderColor: colors
|
|
37
|
-
padding: spacing
|
|
38
|
-
paddingCompact: spacing
|
|
39
|
-
inverseBackground: colors
|
|
40
|
-
inverseBorderColor: colors
|
|
36
|
+
background: colors?.contrasts?.white1010,
|
|
37
|
+
borderColor: colors?.contrasts?.grey1424,
|
|
38
|
+
padding: spacing?.medium,
|
|
39
|
+
paddingCompact: spacing?.small,
|
|
40
|
+
inverseBackground: colors?.contrasts?.grey100100,
|
|
41
|
+
inverseBorderColor: colors?.contrasts?.grey125125
|
|
41
42
|
};
|
|
42
43
|
return {
|
|
43
44
|
...componentVariables
|