@instructure/ui-tray 11.7.8 → 11.7.9-pr-snapshot-1792147648392

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 CHANGED
@@ -3,6 +3,19 @@
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.9-pr-snapshot-1792147648392](https://github.com/instructure/instructure-ui/compare/v11.7.8...v11.7.9-pr-snapshot-1792147648392) (2026-10-16)
7
+
8
+ ### Build System
9
+
10
+ * **many:** replace babel with swc ([7e36c54](https://github.com/instructure/instructure-ui/commit/7e36c54d240b4fa483801c03ab18e7f860f561e2))
11
+
12
+ ### BREAKING CHANGES
13
+
14
+ * **many:** `@instructure/ui-babel-preset` and
15
+ `@instructure/browserslist-config-instui` are removed and will no longer be
16
+ published. Packages depend on `@swc/helpers` instead of `@babel/runtime`.
17
+
18
+
6
19
  ## [11.7.8](https://github.com/instructure/instructure-ui/compare/v11.7.7...v11.7.8) (2026-10-02)
7
20
 
8
21
  **Note:** Version bump only for package @instructure/ui-tray
@@ -1,28 +1,5 @@
1
- var _dec, _dec2, _class;
2
- /*
3
- * The MIT License (MIT)
4
- *
5
- * Copyright (c) 2015 - present Instructure, Inc.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
-
1
+ import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate";
2
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
26
3
  import { Component, createRef } from 'react';
27
4
  import { Dialog } from '@instructure/ui-dialog';
28
5
  import { omitProps } from '@instructure/ui-react-utils';
@@ -36,186 +13,147 @@ import generateStyle from './styles.js';
36
13
  import generateComponentTheme from './theme.js';
37
14
  import { allowedProps } from './props.js';
38
15
  import { Mask } from '@instructure/ui-overlays/v11_6';
39
-
40
- /**
41
- ---
42
- category: components
43
- ---
44
- **/
45
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
46
- let Tray = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = textDirectionContextConsumer(), _dec(_class = _dec2(_class = class Tray extends Component {
47
- static displayName = 'Tray';
48
- static componentId = 'Tray';
49
- static allowedProps = allowedProps;
50
- static defaultProps = {
51
- defaultFocusElement: null,
52
- open: false,
53
- insertAt: 'bottom',
54
- shouldCloseOnDocumentClick: false,
55
- shouldContainFocus: true,
56
- shouldReturnFocus: true,
57
- size: 'small',
58
- placement: 'start',
59
- transitionOnMount: true,
60
- transitionEnter: true,
61
- transitionExit: true,
62
- shadow: true,
63
- border: false,
64
- enableMask: false
65
- };
66
- ref = null;
67
- dialogRef = /*#__PURE__*/createRef();
68
- state;
69
- constructor(props) {
70
- super(props);
71
- this.state = {
72
- transitioning: false,
73
- open: props.open ?? false
74
- };
75
- }
76
- componentDidMount() {
77
- this.props.makeStyles?.();
78
- }
79
- componentDidUpdate(prevProps, _prevState) {
80
- if (this.props.open !== prevProps.open) {
81
- if (!this.props.open) {
82
- // calling Dialog.close() to remove focusregion immediately when transition starts
83
- // so if a new Tray is opened (during transition) the new focusregion won't get treated as a child of this one
84
- this.dialogRef.current?.close();
85
- }
86
- this.setState({
87
- transitioning: true,
88
- open: this.props.open
89
- });
16
+ class Tray extends Component {
17
+ static{
18
+ this.displayName = 'Tray';
19
+ }
20
+ static{
21
+ this.componentId = 'Tray';
22
+ }
23
+ static{
24
+ this.allowedProps = allowedProps;
25
+ }
26
+ static{
27
+ this.defaultProps = {
28
+ defaultFocusElement: null,
29
+ open: false,
30
+ insertAt: 'bottom',
31
+ shouldCloseOnDocumentClick: false,
32
+ shouldContainFocus: true,
33
+ shouldReturnFocus: true,
34
+ size: 'small',
35
+ placement: 'start',
36
+ transitionOnMount: true,
37
+ transitionEnter: true,
38
+ transitionExit: true,
39
+ shadow: true,
40
+ border: false,
41
+ enableMask: false
42
+ };
43
+ }
44
+ constructor(props){
45
+ super(props), this.ref = null, this.dialogRef = /*#__PURE__*/ createRef(), this.handleTransitionComplete = (_type)=>{
46
+ this.setState({
47
+ transitioning: false
48
+ });
49
+ }, this.handlePortalOpen = (DOMNode)=>{
50
+ if (DOMNode) {
51
+ this.DOMNode = DOMNode;
52
+ }
53
+ };
54
+ this.state = {
55
+ transitioning: false,
56
+ open: props.open ?? false
57
+ };
58
+ }
59
+ componentDidMount() {
60
+ this.props.makeStyles?.();
61
+ }
62
+ componentDidUpdate(prevProps, _prevState) {
63
+ if (this.props.open !== prevProps.open) {
64
+ if (!this.props.open) {
65
+ this.dialogRef.current?.close();
66
+ }
67
+ this.setState({
68
+ transitioning: true,
69
+ open: this.props.open
70
+ });
71
+ }
72
+ this.props.makeStyles?.();
73
+ }
74
+ get placement() {
75
+ const { placement, dir } = this.props;
76
+ const isRtl = dir === textDirectionContextConsumer.DIRECTION.rtl;
77
+ return isRtl ? mirrorHorizontalPlacement(placement, ' ') : placement;
78
+ }
79
+ get direction() {
80
+ switch(this.placement){
81
+ case 'top':
82
+ return 'up';
83
+ case 'bottom':
84
+ return 'down';
85
+ case 'end':
86
+ return 'right';
87
+ default:
88
+ return 'left';
89
+ }
90
+ }
91
+ get transition() {
92
+ return `slide-${this.direction}`;
93
+ }
94
+ get DOMNode() {
95
+ return this.ref;
90
96
  }
91
- this.props.makeStyles?.();
92
- }
93
- get placement() {
94
- const {
95
- placement,
96
- dir
97
- } = this.props;
98
- const isRtl = dir === textDirectionContextConsumer.DIRECTION.rtl;
99
- return isRtl ? mirrorHorizontalPlacement(placement, ' ') : placement;
100
- }
101
- get direction() {
102
- switch (this.placement) {
103
- case 'top':
104
- return 'up';
105
- case 'bottom':
106
- return 'down';
107
- case 'end':
108
- return 'right';
109
- default:
110
- // start
111
- return 'left';
97
+ set DOMNode(el) {
98
+ this.ref = el ? el : null;
112
99
  }
113
- }
114
- get transition() {
115
- return `slide-${this.direction}`;
116
- }
117
- handleTransitionComplete = _type => {
118
- this.setState({
119
- transitioning: false
120
- });
121
- };
122
- get DOMNode() {
123
- // The DOMNode property is needed for Portal type components
124
- return this.ref;
125
- }
126
- set DOMNode(el) {
127
- this.ref = el ? el : null;
128
- }
129
- handlePortalOpen = DOMNode => {
130
- if (DOMNode) {
131
- this.DOMNode = DOMNode;
100
+ render() {
101
+ const { label, children, size, placement, open, defaultFocusElement, contentRef, shouldContainFocus, shouldReturnFocus, shouldCloseOnDocumentClick, onOpen, onClose, onDismiss, mountNode, insertAt, liveRegion, onEnter, onEntering, onEntered, onExit, onExiting, onExited, onTransition, transitionOnMount, transitionEnter, transitionExit, border, shadow, role, enableMask, ...props } = this.props;
102
+ const portalIsOpen = this.state.open || this.state.transitioning;
103
+ const content = /*#__PURE__*/ _jsx(Transition, {
104
+ in: open,
105
+ type: this.transition,
106
+ onTransition: onTransition,
107
+ onEnter: onEnter,
108
+ onEntering: onEntering,
109
+ onEntered: createChainedFunction(this.handleTransitionComplete, onEntered, onOpen),
110
+ onExit: onExit,
111
+ onExiting: onExiting,
112
+ onExited: createChainedFunction(this.handleTransitionComplete, onExited, onClose),
113
+ transitionOnMount: transitionOnMount,
114
+ transitionEnter: transitionEnter,
115
+ transitionExit: transitionExit,
116
+ children: /*#__PURE__*/ _jsx("span", {
117
+ ...omitProps(props, Tray.allowedProps),
118
+ css: this.props.styles?.tray,
119
+ ref: contentRef,
120
+ children: /*#__PURE__*/ _jsx(Dialog, {
121
+ ref: this.dialogRef,
122
+ as: "div",
123
+ label: label,
124
+ defaultFocusElement: defaultFocusElement,
125
+ open: true,
126
+ shouldContainFocus: shouldContainFocus,
127
+ shouldReturnFocus: shouldReturnFocus,
128
+ shouldCloseOnDocumentClick: shouldCloseOnDocumentClick,
129
+ shouldCloseOnEscape: true,
130
+ liveRegion: liveRegion,
131
+ onDismiss: onDismiss,
132
+ role: role,
133
+ children: /*#__PURE__*/ _jsx("div", {
134
+ css: this.props.styles?.content,
135
+ children: children
136
+ })
137
+ })
138
+ })
139
+ });
140
+ return /*#__PURE__*/ _jsx(Portal, {
141
+ open: portalIsOpen,
142
+ onOpen: this.handlePortalOpen,
143
+ insertAt: insertAt,
144
+ mountNode: mountNode,
145
+ "data-cid": "Tray",
146
+ children: enableMask ? /*#__PURE__*/ _jsx(Mask, {
147
+ placement: 'center',
148
+ fullscreen: true,
149
+ children: content
150
+ }) : content
151
+ });
132
152
  }
133
- };
134
- render() {
135
- const {
136
- label,
137
- children,
138
- size,
139
- placement,
140
- open,
141
- defaultFocusElement,
142
- contentRef,
143
- shouldContainFocus,
144
- shouldReturnFocus,
145
- shouldCloseOnDocumentClick,
146
- onOpen,
147
- onClose,
148
- onDismiss,
149
- mountNode,
150
- insertAt,
151
- liveRegion,
152
- onEnter,
153
- onEntering,
154
- onEntered,
155
- onExit,
156
- onExiting,
157
- onExited,
158
- onTransition,
159
- transitionOnMount,
160
- transitionEnter,
161
- transitionExit,
162
- border,
163
- shadow,
164
- role,
165
- enableMask,
166
- ...props
167
- } = this.props;
168
- const portalIsOpen = this.state.open || this.state.transitioning;
169
- const content = _jsx(Transition, {
170
- in: open,
171
- type: this.transition,
172
- onTransition: onTransition,
173
- onEnter: onEnter,
174
- onEntering: onEntering,
175
- onEntered: createChainedFunction(this.handleTransitionComplete, onEntered, onOpen),
176
- onExit: onExit,
177
- onExiting: onExiting,
178
- onExited: createChainedFunction(this.handleTransitionComplete, onExited, onClose),
179
- transitionOnMount: transitionOnMount,
180
- transitionEnter: transitionEnter,
181
- transitionExit: transitionExit,
182
- children: _jsx("span", {
183
- ...omitProps(props, Tray.allowedProps),
184
- css: this.props.styles?.tray,
185
- ref: contentRef,
186
- children: _jsx(Dialog, {
187
- ref: this.dialogRef,
188
- as: "div",
189
- label: label,
190
- defaultFocusElement: defaultFocusElement,
191
- open: true,
192
- shouldContainFocus: shouldContainFocus,
193
- shouldReturnFocus: shouldReturnFocus,
194
- shouldCloseOnDocumentClick: shouldCloseOnDocumentClick,
195
- shouldCloseOnEscape: true,
196
- liveRegion: liveRegion,
197
- onDismiss: onDismiss,
198
- role: role,
199
- children: _jsx("div", {
200
- css: this.props.styles?.content,
201
- children: children
202
- })
203
- })
204
- })
205
- });
206
- return _jsx(Portal, {
207
- open: portalIsOpen,
208
- onOpen: this.handlePortalOpen,
209
- insertAt: insertAt,
210
- mountNode: mountNode,
211
- "data-cid": "Tray",
212
- children: enableMask ? _jsx(Mask, {
213
- placement: 'center',
214
- fullscreen: true,
215
- children: content
216
- }) : content
217
- });
218
- }
219
- }) || _class) || _class);
153
+ }
154
+ Tray = _ts_decorate([
155
+ withStyle(generateStyle, generateComponentTheme),
156
+ textDirectionContextConsumer()
157
+ ], Tray);
220
158
  export default Tray;
221
- export { Tray };
159
+ export { Tray };
@@ -1,26 +1,32 @@
1
- /*
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) 2015 - present Instructure, Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- const allowedProps = ['label', 'children', 'size', 'placement', 'open', 'defaultFocusElement', 'contentRef', 'shouldContainFocus', 'shouldReturnFocus', 'shouldCloseOnDocumentClick', 'onOpen', 'onClose', 'onDismiss', 'mountNode', 'insertAt', 'liveRegion', 'onTransition', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited', 'transitionOnMount', 'transitionEnter', 'transitionExit', 'border', 'shadow', 'enableMask'];
26
- export { allowedProps };
1
+ const allowedProps = [
2
+ 'label',
3
+ 'children',
4
+ 'size',
5
+ 'placement',
6
+ 'open',
7
+ 'defaultFocusElement',
8
+ 'contentRef',
9
+ 'shouldContainFocus',
10
+ 'shouldReturnFocus',
11
+ 'shouldCloseOnDocumentClick',
12
+ 'onOpen',
13
+ 'onClose',
14
+ 'onDismiss',
15
+ 'mountNode',
16
+ 'insertAt',
17
+ 'liveRegion',
18
+ 'onTransition',
19
+ 'onEnter',
20
+ 'onEntering',
21
+ 'onEntered',
22
+ 'onExit',
23
+ 'onExiting',
24
+ 'onExited',
25
+ 'transitionOnMount',
26
+ 'transitionEnter',
27
+ 'transitionExit',
28
+ 'border',
29
+ 'shadow',
30
+ 'enableMask'
31
+ ];
32
+ export { allowedProps };
@@ -1,132 +1,93 @@
1
- /*
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) 2015 - present Instructure, Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- /**
26
- * ---
27
- * private: true
28
- * ---
29
- * Generates the style object from the theme and provided additional information
30
- * @param {Object} componentTheme The theme variable object.
31
- * @param {Object} props the props of the component, the style is applied to
32
- * @param {Object} state the state of the component, the style is applied to
33
- * @return {Object} The final style object, which will be used in the component
34
- */
35
- const generateStyle = (componentTheme, props) => {
36
- const {
37
- border,
38
- shadow,
39
- size,
40
- placement
41
- } = props;
42
- const borderStyle = {
43
- borderWidth: 0,
44
- borderColor: componentTheme.borderColor,
45
- borderStyle: componentTheme.borderStyle
46
- };
47
- const shadowStyle = shadow ? {
48
- boxShadow: componentTheme.boxShadow
49
- } : {};
50
- const contentStyle = placement === 'start' || placement === 'end' || placement === 'center' ? {
51
- label: 'tray__content',
52
- minHeight: '100vh'
53
- } : {};
54
- const placementStyles = {
55
- top: {
56
- insetInlineStart: 0,
57
- insetInlineEnd: 0,
58
- top: 0
59
- },
60
- bottom: {
61
- insetInlineStart: 0,
62
- insetInlineEnd: 0,
63
- bottom: 0
64
- },
65
- start: {
66
- top: 0,
67
- bottom: 0,
68
- insetInlineStart: 0,
69
- insetInlineEnd: 'auto'
70
- },
71
- end: {
72
- top: 0,
73
- bottom: 0,
74
- insetInlineEnd: 0,
75
- insetInlineStart: 'auto'
76
- },
77
- center: {
78
- left: 0,
79
- right: 0,
80
- top: 0,
81
- bottom: 0
82
- }
83
- };
84
- const borderPlacementStyle = border ? {
85
- start: {
86
- borderInlineEndWidth: componentTheme.borderWidth
87
- },
88
- end: {
89
- borderInlineStartWidth: componentTheme.borderWidth
90
- },
91
- top: {
92
- borderBottomWidth: componentTheme.borderWidth
93
- },
94
- bottom: {
95
- borderTopWidth: componentTheme.borderWidth
96
- },
97
- center: {}
98
- } : {};
99
- const sizeVariants = {
100
- 'x-small': componentTheme.xSmallWidth,
101
- small: componentTheme.smallWidth,
102
- regular: componentTheme.regularWidth,
103
- medium: componentTheme.mediumWidth,
104
- large: componentTheme.largeWidth
105
- };
106
- const sizeStyle = placement === 'start' || placement === 'end' ? {
107
- width: sizeVariants[size]
108
- } : {};
109
- return {
110
- tray: {
111
- label: 'tray',
112
- backgroundColor: componentTheme.background,
113
- position: componentTheme.position,
114
- overflowY: 'auto',
115
- overflowX: 'hidden',
116
- boxSizing: 'border-box',
117
- zIndex: componentTheme.zIndex,
118
- maxWidth: '100vw',
119
- maxHeight: '100vh',
120
- ...shadowStyle,
121
- ...placementStyles[placement],
122
- ...(border && borderStyle),
123
- ...(border && borderPlacementStyle[placement]),
124
- ...sizeStyle
125
- },
126
- content: {
127
- label: 'tray__content',
128
- ...contentStyle
129
- }
130
- };
1
+ const generateStyle = (componentTheme, props)=>{
2
+ const { border, shadow, size, placement } = props;
3
+ const borderStyle = {
4
+ borderWidth: 0,
5
+ borderColor: componentTheme.borderColor,
6
+ borderStyle: componentTheme.borderStyle
7
+ };
8
+ const shadowStyle = shadow ? {
9
+ boxShadow: componentTheme.boxShadow
10
+ } : {};
11
+ const contentStyle = placement === 'start' || placement === 'end' || placement === 'center' ? {
12
+ label: 'tray__content',
13
+ minHeight: '100vh'
14
+ } : {};
15
+ const placementStyles = {
16
+ top: {
17
+ insetInlineStart: 0,
18
+ insetInlineEnd: 0,
19
+ top: 0
20
+ },
21
+ bottom: {
22
+ insetInlineStart: 0,
23
+ insetInlineEnd: 0,
24
+ bottom: 0
25
+ },
26
+ start: {
27
+ top: 0,
28
+ bottom: 0,
29
+ insetInlineStart: 0,
30
+ insetInlineEnd: 'auto'
31
+ },
32
+ end: {
33
+ top: 0,
34
+ bottom: 0,
35
+ insetInlineEnd: 0,
36
+ insetInlineStart: 'auto'
37
+ },
38
+ center: {
39
+ left: 0,
40
+ right: 0,
41
+ top: 0,
42
+ bottom: 0
43
+ }
44
+ };
45
+ const borderPlacementStyle = border ? {
46
+ start: {
47
+ borderInlineEndWidth: componentTheme.borderWidth
48
+ },
49
+ end: {
50
+ borderInlineStartWidth: componentTheme.borderWidth
51
+ },
52
+ top: {
53
+ borderBottomWidth: componentTheme.borderWidth
54
+ },
55
+ bottom: {
56
+ borderTopWidth: componentTheme.borderWidth
57
+ },
58
+ center: {}
59
+ } : {};
60
+ const sizeVariants = {
61
+ 'x-small': componentTheme.xSmallWidth,
62
+ small: componentTheme.smallWidth,
63
+ regular: componentTheme.regularWidth,
64
+ medium: componentTheme.mediumWidth,
65
+ large: componentTheme.largeWidth
66
+ };
67
+ const sizeStyle = placement === 'start' || placement === 'end' ? {
68
+ width: sizeVariants[size]
69
+ } : {};
70
+ return {
71
+ tray: {
72
+ label: 'tray',
73
+ backgroundColor: componentTheme.background,
74
+ position: componentTheme.position,
75
+ overflowY: 'auto',
76
+ overflowX: 'hidden',
77
+ boxSizing: 'border-box',
78
+ zIndex: componentTheme.zIndex,
79
+ maxWidth: '100vw',
80
+ maxHeight: '100vh',
81
+ ...shadowStyle,
82
+ ...placementStyles[placement],
83
+ ...border && borderStyle,
84
+ ...border && borderPlacementStyle[placement],
85
+ ...sizeStyle
86
+ },
87
+ content: {
88
+ label: 'tray__content',
89
+ ...contentStyle
90
+ }
91
+ };
131
92
  };
132
- export default generateStyle;
93
+ export default generateStyle;