@instructure/ui-tray 11.6.0 → 11.6.1-pr-snapshot-1779894247159

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,14 @@
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.6.1-pr-snapshot-1779894247159](https://github.com/instructure/instructure-ui/compare/v11.6.0...v11.6.1-pr-snapshot-1779894247159) (2026-05-27)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-tray
9
+
10
+
11
+
12
+
13
+
6
14
  # [11.6.0](https://github.com/instructure/instructure-ui/compare/v11.5.0...v11.6.0) (2026-02-18)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-tray
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.allowedProps = void 0;
7
1
  /*
8
2
  * The MIT License (MIT)
9
3
  *
@@ -28,4 +22,16 @@ exports.allowedProps = void 0;
28
22
  * SOFTWARE.
29
23
  */
30
24
 
31
- const allowedProps = exports.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'];
25
+ module.exports = {
26
+ presets: [
27
+ [
28
+ require('@instructure/ui-babel-preset'),
29
+ {
30
+ coverage: Boolean(process.env.COVERAGE),
31
+ esModules: Boolean(process.env.ES_MODULES),
32
+ removeConsole: process.env.NODE_ENV === 'production',
33
+ transformImports: Boolean(process.env.TRANSFORM_IMPORTS)
34
+ }
35
+ ]
36
+ ]
37
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@instructure/ui-tray",
3
- "version": "11.6.0",
3
+ "version": "11.6.1-pr-snapshot-1779894247159",
4
+ "type": "module",
4
5
  "description": "Tray component for secondary/menu content",
5
6
  "author": "Instructure, Inc. Engineering and Product Design",
6
7
  "module": "./es/index.js",
7
- "main": "./lib/index.js",
8
8
  "types": "./types/index.d.ts",
9
9
  "repository": {
10
10
  "type": "git",
@@ -15,25 +15,25 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.27.6",
18
- "@instructure/console": "11.6.0",
19
- "@instructure/ui-dialog": "11.6.0",
20
- "@instructure/emotion": "11.6.0",
21
- "@instructure/ui-i18n": "11.6.0",
22
- "@instructure/shared-types": "11.6.0",
23
- "@instructure/ui-motion": "11.6.0",
24
- "@instructure/ui-overlays": "11.6.0",
25
- "@instructure/ui-portal": "11.6.0",
26
- "@instructure/ui-utils": "11.6.0",
27
- "@instructure/ui-react-utils": "11.6.0",
28
- "@instructure/ui-position": "11.6.0"
18
+ "@instructure/console": "11.6.1-pr-snapshot-1779894247159",
19
+ "@instructure/emotion": "11.6.1-pr-snapshot-1779894247159",
20
+ "@instructure/ui-dialog": "11.6.1-pr-snapshot-1779894247159",
21
+ "@instructure/shared-types": "11.6.1-pr-snapshot-1779894247159",
22
+ "@instructure/ui-i18n": "11.6.1-pr-snapshot-1779894247159",
23
+ "@instructure/ui-motion": "11.6.1-pr-snapshot-1779894247159",
24
+ "@instructure/ui-portal": "11.6.1-pr-snapshot-1779894247159",
25
+ "@instructure/ui-position": "11.6.1-pr-snapshot-1779894247159",
26
+ "@instructure/ui-react-utils": "11.6.1-pr-snapshot-1779894247159",
27
+ "@instructure/ui-utils": "11.6.1-pr-snapshot-1779894247159",
28
+ "@instructure/ui-overlays": "11.6.1-pr-snapshot-1779894247159"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@testing-library/jest-dom": "^6.6.3",
32
32
  "@testing-library/react": "15.0.7",
33
33
  "@testing-library/user-event": "^14.6.1",
34
34
  "vitest": "^3.2.2",
35
- "@instructure/ui-themes": "11.6.0",
36
- "@instructure/ui-babel-preset": "11.6.0"
35
+ "@instructure/ui-themes": "11.6.1-pr-snapshot-1779894247159",
36
+ "@instructure/ui-babel-preset": "11.6.1-pr-snapshot-1779894247159"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": ">=18 <=19"
@@ -46,10 +46,8 @@
46
46
  ".": {
47
47
  "types": "./types/index.d.ts",
48
48
  "import": "./es/index.js",
49
- "require": "./lib/index.js",
50
49
  "default": "./es/index.js"
51
50
  },
52
- "./lib/*": "./lib/*",
53
51
  "./es/*": "./es/*",
54
52
  "./types/*": "./types/*",
55
53
  "./package.json": "./package.json",
@@ -59,7 +57,7 @@
59
57
  "lint": "ui-scripts lint",
60
58
  "lint:fix": "ui-scripts lint --fix",
61
59
  "clean": "ui-scripts clean",
62
- "build": "ui-scripts build --modules es,cjs",
60
+ "build": "ui-scripts build",
63
61
  "build:watch": "pnpm run ts:check -- --watch & ui-scripts build --watch",
64
62
  "build:types": "tsc -p tsconfig.build.json",
65
63
  "ts:check": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
package/lib/Tray/index.js DELETED
@@ -1,226 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.Tray = void 0;
8
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
- var _react = require("react");
10
- var _Dialog = require("@instructure/ui-dialog/lib/Dialog");
11
- var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
12
- var _createChainedFunction = require("@instructure/ui-utils/lib/createChainedFunction.js");
13
- var _textDirectionContextConsumer = require("@instructure/ui-i18n/lib/textDirectionContextConsumer.js");
14
- var _Portal = require("@instructure/ui-portal/lib/Portal");
15
- var _mirrorHorizontalPlacement = require("@instructure/ui-position/lib/mirrorHorizontalPlacement.js");
16
- var _Transition = require("@instructure/ui-motion/lib/Transition");
17
- var _emotion = require("@instructure/emotion");
18
- var _styles = _interopRequireDefault(require("./styles"));
19
- var _theme = _interopRequireDefault(require("./theme"));
20
- var _props = require("./props");
21
- var _Mask = require("@instructure/ui-overlays/lib/Mask");
22
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
23
- const _excluded = ["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"];
24
- var _dec, _dec2, _class, _Tray;
25
- /*
26
- * The MIT License (MIT)
27
- *
28
- * Copyright (c) 2015 - present Instructure, Inc.
29
- *
30
- * Permission is hereby granted, free of charge, to any person obtaining a copy
31
- * of this software and associated documentation files (the "Software"), to deal
32
- * in the Software without restriction, including without limitation the rights
33
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34
- * copies of the Software, and to permit persons to whom the Software is
35
- * furnished to do so, subject to the following conditions:
36
- *
37
- * The above copyright notice and this permission notice shall be included in all
38
- * copies or substantial portions of the Software.
39
- *
40
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
43
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
46
- * SOFTWARE.
47
- */
48
- /**
49
- ---
50
- category: components
51
- ---
52
- **/
53
- let Tray = exports.Tray = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _textDirectionContextConsumer.textDirectionContextConsumer)(), _dec(_class = _dec2(_class = (_Tray = class Tray extends _react.Component {
54
- constructor(props) {
55
- var _props$open;
56
- super(props);
57
- this.ref = null;
58
- this.dialogRef = /*#__PURE__*/(0, _react.createRef)();
59
- this.state = void 0;
60
- this.handleTransitionComplete = _type => {
61
- this.setState({
62
- transitioning: false
63
- });
64
- };
65
- this.handlePortalOpen = DOMNode => {
66
- if (DOMNode) {
67
- this.DOMNode = DOMNode;
68
- }
69
- };
70
- this.state = {
71
- transitioning: false,
72
- open: (_props$open = props.open) !== null && _props$open !== void 0 ? _props$open : false
73
- };
74
- }
75
- componentDidMount() {
76
- var _this$props$makeStyle, _this$props;
77
- (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
78
- }
79
- componentDidUpdate(prevProps, _prevState) {
80
- var _this$props$makeStyle2, _this$props2;
81
- if (this.props.open !== prevProps.open) {
82
- if (!this.props.open) {
83
- var _this$dialogRef$curre;
84
- // calling Dialog.close() to remove focusregion immediately when transition starts
85
- // so if a new Tray is opened (during transition) the new focusregion won't get treated as a child of this one
86
- (_this$dialogRef$curre = this.dialogRef.current) === null || _this$dialogRef$curre === void 0 ? void 0 : _this$dialogRef$curre.close();
87
- }
88
- this.setState({
89
- transitioning: true,
90
- open: this.props.open
91
- });
92
- }
93
- (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
94
- }
95
- get placement() {
96
- const _this$props3 = this.props,
97
- placement = _this$props3.placement,
98
- dir = _this$props3.dir;
99
- const isRtl = dir === _textDirectionContextConsumer.textDirectionContextConsumer.DIRECTION.rtl;
100
- return isRtl ? (0, _mirrorHorizontalPlacement.mirrorHorizontalPlacement)(placement, ' ') : placement;
101
- }
102
- get direction() {
103
- switch (this.placement) {
104
- case 'top':
105
- return 'up';
106
- case 'bottom':
107
- return 'down';
108
- case 'end':
109
- return 'right';
110
- default:
111
- // start
112
- return 'left';
113
- }
114
- }
115
- get transition() {
116
- return `slide-${this.direction}`;
117
- }
118
- get DOMNode() {
119
- // The DOMNode property is needed for Portal type components
120
- return this.ref;
121
- }
122
- set DOMNode(el) {
123
- this.ref = el ? el : null;
124
- }
125
- render() {
126
- var _this$props$styles, _this$props$styles2;
127
- const _this$props4 = this.props,
128
- label = _this$props4.label,
129
- children = _this$props4.children,
130
- size = _this$props4.size,
131
- placement = _this$props4.placement,
132
- open = _this$props4.open,
133
- defaultFocusElement = _this$props4.defaultFocusElement,
134
- contentRef = _this$props4.contentRef,
135
- shouldContainFocus = _this$props4.shouldContainFocus,
136
- shouldReturnFocus = _this$props4.shouldReturnFocus,
137
- shouldCloseOnDocumentClick = _this$props4.shouldCloseOnDocumentClick,
138
- onOpen = _this$props4.onOpen,
139
- onClose = _this$props4.onClose,
140
- onDismiss = _this$props4.onDismiss,
141
- mountNode = _this$props4.mountNode,
142
- insertAt = _this$props4.insertAt,
143
- liveRegion = _this$props4.liveRegion,
144
- onEnter = _this$props4.onEnter,
145
- onEntering = _this$props4.onEntering,
146
- onEntered = _this$props4.onEntered,
147
- onExit = _this$props4.onExit,
148
- onExiting = _this$props4.onExiting,
149
- onExited = _this$props4.onExited,
150
- onTransition = _this$props4.onTransition,
151
- transitionOnMount = _this$props4.transitionOnMount,
152
- transitionEnter = _this$props4.transitionEnter,
153
- transitionExit = _this$props4.transitionExit,
154
- border = _this$props4.border,
155
- shadow = _this$props4.shadow,
156
- role = _this$props4.role,
157
- enableMask = _this$props4.enableMask,
158
- props = (0, _objectWithoutProperties2.default)(_this$props4, _excluded);
159
- const portalIsOpen = this.state.open || this.state.transitioning;
160
- const content = (0, _jsxRuntime.jsx)(_Transition.Transition, {
161
- in: open,
162
- type: this.transition,
163
- onTransition: onTransition,
164
- onEnter: onEnter,
165
- onEntering: onEntering,
166
- onEntered: (0, _createChainedFunction.createChainedFunction)(this.handleTransitionComplete, onEntered, onOpen),
167
- onExit: onExit,
168
- onExiting: onExiting,
169
- onExited: (0, _createChainedFunction.createChainedFunction)(this.handleTransitionComplete, onExited, onClose),
170
- transitionOnMount: transitionOnMount,
171
- transitionEnter: transitionEnter,
172
- transitionExit: transitionExit,
173
- children: (0, _jsxRuntime.jsx)("span", {
174
- ...(0, _omitProps.omitProps)(props, Tray.allowedProps),
175
- css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.tray,
176
- ref: contentRef,
177
- children: (0, _jsxRuntime.jsx)(_Dialog.Dialog, {
178
- ref: this.dialogRef,
179
- as: "div",
180
- label: label,
181
- defaultFocusElement: defaultFocusElement,
182
- open: true,
183
- shouldContainFocus: shouldContainFocus,
184
- shouldReturnFocus: shouldReturnFocus,
185
- shouldCloseOnDocumentClick: shouldCloseOnDocumentClick,
186
- shouldCloseOnEscape: true,
187
- liveRegion: liveRegion,
188
- onDismiss: onDismiss,
189
- role: role,
190
- children: (0, _jsxRuntime.jsx)("div", {
191
- css: (_this$props$styles2 = this.props.styles) === null || _this$props$styles2 === void 0 ? void 0 : _this$props$styles2.content,
192
- children: children
193
- })
194
- })
195
- })
196
- });
197
- return (0, _jsxRuntime.jsx)(_Portal.Portal, {
198
- open: portalIsOpen,
199
- onOpen: this.handlePortalOpen,
200
- insertAt: insertAt,
201
- mountNode: mountNode,
202
- "data-cid": "Tray",
203
- children: enableMask ? (0, _jsxRuntime.jsx)(_Mask.Mask, {
204
- placement: 'center',
205
- fullscreen: true,
206
- children: content
207
- }) : content
208
- });
209
- }
210
- }, _Tray.displayName = "Tray", _Tray.componentId = 'Tray', _Tray.allowedProps = _props.allowedProps, _Tray.defaultProps = {
211
- defaultFocusElement: null,
212
- open: false,
213
- insertAt: 'bottom',
214
- shouldCloseOnDocumentClick: false,
215
- shouldContainFocus: true,
216
- shouldReturnFocus: true,
217
- size: 'small',
218
- placement: 'start',
219
- transitionOnMount: true,
220
- transitionEnter: true,
221
- transitionExit: true,
222
- shadow: true,
223
- border: false,
224
- enableMask: false
225
- }, _Tray)) || _class) || _class);
226
- var _default = exports.default = Tray;
@@ -1,136 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- /**
32
- * ---
33
- * private: true
34
- * ---
35
- * Generates the style object from the theme and provided additional information
36
- * @param {Object} componentTheme The theme variable object.
37
- * @param {Object} props the props of the component, the style is applied to
38
- * @param {Object} state the state of the component, the style is applied to
39
- * @return {Object} The final style object, which will be used in the component
40
- */
41
- const generateStyle = (componentTheme, props) => {
42
- const border = props.border,
43
- shadow = props.shadow,
44
- size = props.size,
45
- placement = props.placement;
46
- const borderStyle = {
47
- borderWidth: 0,
48
- borderColor: componentTheme.borderColor,
49
- borderStyle: componentTheme.borderStyle
50
- };
51
- const shadowStyle = shadow ? {
52
- boxShadow: componentTheme.boxShadow
53
- } : {};
54
- const contentStyle = placement === 'start' || placement === 'end' || placement === 'center' ? {
55
- label: 'tray__content',
56
- minHeight: '100vh'
57
- } : {};
58
- const placementStyles = {
59
- top: {
60
- insetInlineStart: 0,
61
- insetInlineEnd: 0,
62
- top: 0
63
- },
64
- bottom: {
65
- insetInlineStart: 0,
66
- insetInlineEnd: 0,
67
- bottom: 0
68
- },
69
- start: {
70
- top: 0,
71
- bottom: 0,
72
- insetInlineStart: 0,
73
- insetInlineEnd: 'auto'
74
- },
75
- end: {
76
- top: 0,
77
- bottom: 0,
78
- insetInlineEnd: 0,
79
- insetInlineStart: 'auto'
80
- },
81
- center: {
82
- left: 0,
83
- right: 0,
84
- top: 0,
85
- bottom: 0
86
- }
87
- };
88
- const borderPlacementStyle = border ? {
89
- start: {
90
- borderInlineEndWidth: componentTheme.borderWidth
91
- },
92
- end: {
93
- borderInlineStartWidth: componentTheme.borderWidth
94
- },
95
- top: {
96
- borderBottomWidth: componentTheme.borderWidth
97
- },
98
- bottom: {
99
- borderTopWidth: componentTheme.borderWidth
100
- },
101
- center: {}
102
- } : {};
103
- const sizeVariants = {
104
- 'x-small': componentTheme.xSmallWidth,
105
- small: componentTheme.smallWidth,
106
- regular: componentTheme.regularWidth,
107
- medium: componentTheme.mediumWidth,
108
- large: componentTheme.largeWidth
109
- };
110
- const sizeStyle = placement === 'start' || placement === 'end' ? {
111
- width: sizeVariants[size]
112
- } : {};
113
- return {
114
- tray: {
115
- label: 'tray',
116
- backgroundColor: componentTheme.background,
117
- position: componentTheme.position,
118
- overflowY: 'auto',
119
- overflowX: 'hidden',
120
- boxSizing: 'border-box',
121
- zIndex: componentTheme.zIndex,
122
- maxWidth: '100vw',
123
- maxHeight: '100vh',
124
- ...shadowStyle,
125
- ...placementStyles[placement],
126
- ...(border && borderStyle),
127
- ...(border && borderPlacementStyle[placement]),
128
- ...sizeStyle
129
- },
130
- content: {
131
- label: 'tray__content',
132
- ...contentStyle
133
- }
134
- };
135
- };
136
- var _default = exports.default = generateStyle;
package/lib/Tray/theme.js DELETED
@@ -1,62 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- /**
32
- * Generates the theme object for the component from the theme and provided additional information
33
- * @param {Object} theme The actual theme object.
34
- * @return {Object} The final theme object with the overrides and component variables
35
- */
36
- const generateComponentTheme = theme => {
37
- var _colors$contrasts, _colors$contrasts2;
38
- const colors = theme.colors,
39
- borders = theme.borders,
40
- shadows = theme.shadows,
41
- breakpoints = theme.breakpoints,
42
- stacking = theme.stacking;
43
- const componentVariables = {
44
- background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.white1010,
45
- borderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey1424,
46
- borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
47
- borderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
48
- boxShadow: shadows === null || shadows === void 0 ? void 0 : shadows.depth3,
49
- xSmallWidth: breakpoints === null || breakpoints === void 0 ? void 0 : breakpoints.xSmall,
50
- smallWidth: '20em',
51
- // 368px
52
- regularWidth: breakpoints === null || breakpoints === void 0 ? void 0 : breakpoints.small,
53
- mediumWidth: breakpoints === null || breakpoints === void 0 ? void 0 : breakpoints.medium,
54
- largeWidth: breakpoints === null || breakpoints === void 0 ? void 0 : breakpoints.large,
55
- zIndex: stacking === null || stacking === void 0 ? void 0 : stacking.topmost,
56
- position: 'fixed'
57
- };
58
- return {
59
- ...componentVariables
60
- };
61
- };
62
- var _default = exports.default = generateComponentTheme;
package/lib/index.js DELETED
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Tray", {
7
- enumerable: true,
8
- get: function () {
9
- return _Tray.Tray;
10
- }
11
- });
12
- var _Tray = require("./Tray");
package/lib/package.json DELETED
@@ -1 +0,0 @@
1
- {"type":"commonjs"}