@instructure/ui-tabs 8.33.1 → 8.33.2

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/Tabs/index.js CHANGED
@@ -1,8 +1,6 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  const _excluded = ["children", "elementRef", "maxWidth", "variant", "margin", "screenReaderLabel", "onRequestTabChange", "tabOverflow", "styles"];
3
-
4
3
  var _dec, _dec2, _class, _class2;
5
-
6
4
  /*
7
5
  * The MIT License (MIT)
8
6
  *
@@ -45,7 +43,6 @@ import generateComponentTheme from './theme';
45
43
  import { Tab } from './Tab';
46
44
  import { Panel } from './Panel';
47
45
  import { allowedProps, propTypes } from './props';
48
-
49
46
  /**
50
47
  ---
51
48
  category: components
@@ -61,26 +58,21 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
61
58
  this._debounced = void 0;
62
59
  this._resizeListener = void 0;
63
60
  this.ref = null;
64
-
65
61
  this.handleRef = el => {
66
62
  const elementRef = this.props.elementRef;
67
63
  this.ref = el;
68
-
69
64
  if (typeof elementRef === 'function') {
70
65
  elementRef(el);
71
66
  }
72
67
  };
73
-
74
68
  this.handleTabClick = (event, _ref) => {
75
69
  let index = _ref.index;
76
70
  const nextTab = this.getNextTab(index, 0);
77
71
  this.fireOnChange(event, nextTab);
78
72
  };
79
-
80
73
  this.handleTabKeyDown = (event, _ref2) => {
81
74
  let index = _ref2.index;
82
75
  let nextTab;
83
-
84
76
  if (event.keyCode === keycode.codes.up || event.keyCode === keycode.codes.left) {
85
77
  // Select next tab to the left
86
78
  nextTab = this.getNextTab(index, -1);
@@ -88,34 +80,28 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
88
80
  // Select next tab to the right
89
81
  nextTab = this.getNextTab(index, 1);
90
82
  }
91
-
92
83
  if (nextTab) {
93
84
  event.preventDefault();
94
85
  this.fireOnChange(event, nextTab);
95
86
  }
96
87
  };
97
-
98
88
  this.handleResize = () => {
99
89
  this.setState({
100
90
  withTabListOverflow: this._tabList.scrollWidth > this._tabList.offsetWidth
101
91
  });
102
92
  this._tabListPosition = getBoundingClientRect(this._tabList);
103
93
  };
104
-
105
94
  this.handleFocusableRef = el => {
106
95
  this._focusable = el;
107
96
  };
108
-
109
97
  this.handleTabListRef = el => {
110
98
  this._tabList = el;
111
99
  };
112
-
113
100
  this.handleScroll = event => {
114
101
  if (this.props.tabOverflow !== 'scroll' || !this.state.withTabListOverflow) {
115
102
  event.preventDefault();
116
103
  return;
117
104
  }
118
-
119
105
  const tabList = event.currentTarget;
120
106
  const scrollLeftMax = Math.round(tabList.scrollWidth - getBoundingClientRect(tabList).width);
121
107
  const scrollLeft = Math.floor(Math.abs(tabList.scrollLeft));
@@ -124,65 +110,54 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
124
110
  showEndOverLay: scrollLeft < scrollLeftMax
125
111
  });
126
112
  };
127
-
128
113
  this.state = {
129
114
  withTabListOverflow: false,
130
115
  showStartOverLay: false,
131
116
  showEndOverLay: false
132
117
  };
133
118
  }
134
-
135
119
  componentDidMount() {
136
120
  var _this$props$makeStyle, _this$props;
137
-
138
121
  if (this.props.tabOverflow === 'scroll' && this._tabList) {
139
122
  this.startScrollOverflow();
140
123
  }
141
-
142
124
  if (this.props.shouldFocusOnRender) {
143
125
  this.focus();
144
126
  }
145
-
146
127
  (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
147
128
  }
148
-
149
129
  componentDidUpdate(prevProps, prevState) {
150
130
  var _this$props$makeStyle2, _this$props2;
151
-
152
131
  if (this.props.shouldFocusOnRender && !prevProps.shouldFocusOnRender) {
153
132
  this.focus();
154
- } // start event listeners for scroll overflow
155
-
133
+ }
156
134
 
135
+ // start event listeners for scroll overflow
157
136
  if (prevProps.tabOverflow === 'stack' && this.props.tabOverflow === 'scroll') {
158
137
  this.startScrollOverflow();
159
- } // cancel event listeners for scroll overflow
160
-
138
+ }
161
139
 
140
+ // cancel event listeners for scroll overflow
162
141
  if (prevProps.tabOverflow === 'scroll' && this.props.tabOverflow === 'stack') {
163
142
  this.cancelScrollOverflow();
164
- } // we need to recalculate the scroll overflow if the style changes
165
-
143
+ }
166
144
 
145
+ // we need to recalculate the scroll overflow if the style changes
167
146
  if (this.props.tabOverflow === 'scroll' && prevProps.styles !== this.props.styles) {
168
147
  this.handleResize();
169
- } // when tabList is set as overflown,
170
- // make sure active tab is always visible
171
-
148
+ }
172
149
 
150
+ // when tabList is set as overflown,
151
+ // make sure active tab is always visible
173
152
  if (this.props.tabOverflow === 'scroll' && this._tabList && !prevState.withTabListOverflow && this.state.withTabListOverflow) {
174
153
  const activeTabEl = this._tabList.querySelector('[aria-selected="true"]');
175
-
176
154
  this.showActiveTabIfOverlayed(activeTabEl);
177
155
  }
178
-
179
156
  (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
180
157
  }
181
-
182
158
  componentWillUnmount() {
183
159
  this.cancelScrollOverflow();
184
160
  }
185
-
186
161
  startScrollOverflow() {
187
162
  this.handleResize();
188
163
  this._debounced = debounce(this.handleResize, 300, {
@@ -193,34 +168,27 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
193
168
  this._resizeListener = new ResizeObserver(entries => {
194
169
  for (const entry of entries) {
195
170
  const newWidth = entry.contentRect.width;
196
-
197
171
  if (this._tabListPosition.width !== newWidth) {
198
172
  var _this$_debounced;
199
-
200
173
  (_this$_debounced = this._debounced) === null || _this$_debounced === void 0 ? void 0 : _this$_debounced.call(this);
201
174
  }
202
175
  }
203
176
  });
204
-
205
177
  this._resizeListener.observe(this._tabList);
206
178
  }
207
-
208
179
  cancelScrollOverflow() {
209
180
  if (this._resizeListener) {
210
181
  this._resizeListener.disconnect();
211
182
  }
212
-
213
183
  if (this._debounced) {
214
184
  this._debounced.cancel();
215
185
  }
216
186
  }
217
-
218
187
  getOverlayWidth() {
219
188
  const _this$props3 = this.props,
220
- variant = _this$props3.variant,
221
- tabOverflow = _this$props3.tabOverflow,
222
- styles = _this$props3.styles;
223
-
189
+ variant = _this$props3.variant,
190
+ tabOverflow = _this$props3.tabOverflow,
191
+ styles = _this$props3.styles;
224
192
  if (styles && tabOverflow === 'scroll') {
225
193
  if (variant === 'default') {
226
194
  return px(styles === null || styles === void 0 ? void 0 : styles.scrollOverlayWidthDefault);
@@ -228,10 +196,8 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
228
196
  return px(styles === null || styles === void 0 ? void 0 : styles.scrollOverlayWidthSecondary);
229
197
  }
230
198
  }
231
-
232
199
  return 0;
233
200
  }
234
-
235
201
  showActiveTabIfOverlayed(activeTabEl) {
236
202
  if (this._tabList && this._tabListPosition && typeof this._tabList.scrollTo === 'function' // test for scrollTo support
237
203
  ) {
@@ -241,10 +207,8 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
241
207
  const tabListBoundEnd = tabListPosition.right + this.getOverlayWidth();
242
208
  const tabPositionStart = tabPosition.left;
243
209
  const tabPositionEnd = tabPosition.right;
244
-
245
210
  if (tabListBoundEnd > tabPositionEnd) {
246
211
  const offset = Math.round(tabListBoundEnd - tabPositionEnd);
247
-
248
212
  this._tabList.scrollTo({
249
213
  top: 0,
250
214
  left: this._tabList.scrollLeft + offset,
@@ -252,7 +216,6 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
252
216
  });
253
217
  } else if (tabListBoundStart > tabPositionStart) {
254
218
  const offset = Math.round(tabListBoundStart - tabPositionStart);
255
-
256
219
  this._tabList.scrollTo({
257
220
  top: 0,
258
221
  left: this._tabList.scrollLeft - offset,
@@ -261,7 +224,6 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
261
224
  }
262
225
  }
263
226
  }
264
-
265
227
  getNextTab(startIndex, step) {
266
228
  const tabs = React.Children.toArray(this.props.children).map(child => matchComponentTypes(child, [Panel]) && child);
267
229
  const count = tabs.length;
@@ -269,33 +231,27 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
269
231
  error(startIndex >= 0 && startIndex < count, `[Tabs] Invalid tab index: '${startIndex}'.`);
270
232
  let nextIndex = startIndex;
271
233
  let nextTab;
272
-
273
234
  do {
274
235
  nextIndex = (nextIndex + change) % count;
275
236
  nextTab = tabs[nextIndex];
276
237
  } while (nextTab && nextTab.props && nextTab.props.isDisabled);
277
-
278
238
  error(nextIndex >= 0 && nextIndex < count, `[Tabs] Invalid tab index: '${nextIndex}'.`);
279
239
  return {
280
240
  index: nextIndex,
281
241
  id: nextTab.props.id
282
242
  };
283
243
  }
284
-
285
244
  fireOnChange(event, _ref3) {
286
245
  let index = _ref3.index,
287
- id = _ref3.id;
288
-
246
+ id = _ref3.id;
289
247
  if (typeof this.props.onRequestTabChange === 'function') {
290
248
  this.props.onRequestTabChange(event, {
291
249
  index,
292
250
  id
293
251
  });
294
252
  }
295
-
296
253
  this.state.withTabListOverflow && this.showActiveTabIfOverlayed(this._tabList.querySelector(`#tab-${id}`));
297
254
  }
298
-
299
255
  createTab(index, generatedId, selected, panel) {
300
256
  const id = panel.props.id || generatedId;
301
257
  return /*#__PURE__*/createElement(Tab, {
@@ -311,10 +267,10 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
311
267
  onKeyDown: this.handleTabKeyDown
312
268
  });
313
269
  }
314
-
315
270
  clonePanel(_index, generatedId, selected, panel) {
316
- const id = panel.props.id || generatedId; // fixHeight can be 0, so simply `fixheight` could return falsy value
271
+ const id = panel.props.id || generatedId;
317
272
 
273
+ // fixHeight can be 0, so simply `fixheight` could return falsy value
318
274
  const hasFixedHeight = typeof this.props.fixHeight !== 'undefined';
319
275
  return safeCloneElement(panel, {
320
276
  id: panel.props.id || `panel-${id}`,
@@ -328,27 +284,23 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
328
284
  minHeight: !hasFixedHeight ? this.props.minHeight : '100%'
329
285
  });
330
286
  }
331
-
332
287
  focus() {
333
288
  this._focusable && typeof this._focusable.focus === 'function' && this._focusable.focus();
334
289
  }
335
-
336
290
  render() {
337
291
  const panels = [];
338
292
  const tabs = [];
339
-
340
293
  const _this$props4 = this.props,
341
- children = _this$props4.children,
342
- elementRef = _this$props4.elementRef,
343
- maxWidth = _this$props4.maxWidth,
344
- variant = _this$props4.variant,
345
- margin = _this$props4.margin,
346
- screenReaderLabel = _this$props4.screenReaderLabel,
347
- onRequestTabChange = _this$props4.onRequestTabChange,
348
- tabOverflow = _this$props4.tabOverflow,
349
- styles = _this$props4.styles,
350
- props = _objectWithoutProperties(_this$props4, _excluded);
351
-
294
+ children = _this$props4.children,
295
+ elementRef = _this$props4.elementRef,
296
+ maxWidth = _this$props4.maxWidth,
297
+ variant = _this$props4.variant,
298
+ margin = _this$props4.margin,
299
+ screenReaderLabel = _this$props4.screenReaderLabel,
300
+ onRequestTabChange = _this$props4.onRequestTabChange,
301
+ tabOverflow = _this$props4.tabOverflow,
302
+ styles = _this$props4.styles,
303
+ props = _objectWithoutProperties(_this$props4, _excluded);
352
304
  const selectedChildIndex = React.Children.toArray(children).filter(child => matchComponentTypes(child, [Panel])).findIndex(child => child.props.isSelected && !child.props.isDisabled);
353
305
  let index = 0;
354
306
  const selectedIndex = selectedChildIndex >= 0 ? selectedChildIndex : 0;
@@ -363,8 +315,9 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
363
315
  panels.push(child);
364
316
  }
365
317
  });
366
- const withScrollFade = tabOverflow === 'scroll' && this.state.withTabListOverflow; // suppress overlay whenever final Tab is active, or Firefox will cover it
318
+ const withScrollFade = tabOverflow === 'scroll' && this.state.withTabListOverflow;
367
319
 
320
+ // suppress overlay whenever final Tab is active, or Firefox will cover it
368
321
  const startScrollOverlay = this.state.showStartOverLay ? jsx("span", {
369
322
  key: "start-overlay",
370
323
  css: styles === null || styles === void 0 ? void 0 : styles.startScrollOverlay
@@ -398,7 +351,6 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tes
398
351
  css: styles === null || styles === void 0 ? void 0 : styles.panelsContainer
399
352
  }, panels));
400
353
  }
401
-
402
354
  }, _class2.displayName = "Tabs", _class2.componentId = 'Tabs', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
403
355
  variant: 'default',
404
356
  shouldFocusOnRender: false,
package/es/Tabs/props.js CHANGED
@@ -21,6 +21,7 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
+
24
25
  import PropTypes from 'prop-types';
25
26
  import { Children } from '@instructure/ui-prop-types';
26
27
  import { ThemeablePropTypes } from '@instructure/emotion';
package/es/Tabs/styles.js CHANGED
@@ -34,9 +34,10 @@
34
34
  */
35
35
  const generateStyle = (componentTheme, props) => {
36
36
  const variant = props.variant,
37
- tabOverflow = props.tabOverflow,
38
- fixHeight = props.fixHeight; // fixHeight can be 0, so simply `fixheight` could return falsy value
37
+ tabOverflow = props.tabOverflow,
38
+ fixHeight = props.fixHeight;
39
39
 
40
+ // fixHeight can be 0, so simply `fixheight` could return falsy value
40
41
  const hasFixedHeight = typeof fixHeight !== 'undefined';
41
42
  const variants = {
42
43
  default: {
@@ -138,5 +139,4 @@ const generateStyle = (componentTheme, props) => {
138
139
  scrollOverlayWidthSecondary: componentTheme.scrollOverlayWidthSecondary
139
140
  };
140
141
  };
141
-
142
142
  export default generateStyle;
package/es/Tabs/theme.js CHANGED
@@ -29,8 +29,8 @@
29
29
  */
30
30
  const generateComponentTheme = theme => {
31
31
  const borders = theme.borders,
32
- colors = theme.colors,
33
- stacking = theme.stacking;
32
+ colors = theme.colors,
33
+ stacking = theme.stacking;
34
34
  const componentVariables = {
35
35
  defaultBackground: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
36
36
  scrollFadeColor: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
@@ -40,10 +40,10 @@ const generateComponentTheme = theme => {
40
40
  scrollOverlayWidthDefault: '5rem',
41
41
  // has to be 4 times the horizontal padding of the default style tab
42
42
  scrollOverlayWidthSecondary: '3rem' // has to be 3 times the horizontal padding of the secondary style tab
43
-
44
43
  };
45
- return { ...componentVariables
44
+
45
+ return {
46
+ ...componentVariables
46
47
  };
47
48
  };
48
-
49
49
  export default generateComponentTheme;
package/es/index.js CHANGED
@@ -21,4 +21,5 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
+
24
25
  export { Tabs } from './Tabs';
@@ -1,34 +1,21 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = exports.Panel = void 0;
9
-
10
8
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
-
12
9
  var _react = require("react");
13
-
14
10
  var _View = require("@instructure/ui-view/lib/View");
15
-
16
11
  var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
17
-
18
12
  var _Transition = require("@instructure/ui-motion/lib/Transition");
19
-
20
13
  var _emotion = require("@instructure/emotion");
21
-
22
14
  var _styles = _interopRequireDefault(require("./styles"));
23
-
24
15
  var _theme = _interopRequireDefault(require("./theme"));
25
-
26
16
  var _props = require("./props");
27
-
28
17
  const _excluded = ["labelledBy", "variant", "id", "maxHeight", "minHeight", "padding", "textAlign", "children", "elementRef", "isDisabled", "isSelected", "styles"];
29
-
30
18
  var _dec, _class, _class2;
31
-
32
19
  /**
33
20
  ---
34
21
  parent: Tabs
@@ -40,44 +27,37 @@ let Panel = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
40
27
  constructor() {
41
28
  super(...arguments);
42
29
  this.ref = null;
43
-
44
30
  this.handleRef = el => {
45
31
  const elementRef = this.props.elementRef;
46
32
  this.ref = el;
47
-
48
33
  if (typeof elementRef === 'function') {
49
34
  elementRef(el);
50
35
  }
51
36
  };
52
37
  }
53
-
54
38
  componentDidMount() {
55
39
  var _this$props$makeStyle, _this$props;
56
-
57
40
  (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
58
41
  }
59
-
60
42
  componentDidUpdate() {
61
43
  var _this$props$makeStyle2, _this$props2;
62
-
63
44
  (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
64
45
  }
65
-
66
46
  render() {
67
47
  const _this$props3 = this.props,
68
- labelledBy = _this$props3.labelledBy,
69
- variant = _this$props3.variant,
70
- id = _this$props3.id,
71
- maxHeight = _this$props3.maxHeight,
72
- minHeight = _this$props3.minHeight,
73
- padding = _this$props3.padding,
74
- textAlign = _this$props3.textAlign,
75
- children = _this$props3.children,
76
- elementRef = _this$props3.elementRef,
77
- isDisabled = _this$props3.isDisabled,
78
- isSelected = _this$props3.isSelected,
79
- styles = _this$props3.styles,
80
- props = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
48
+ labelledBy = _this$props3.labelledBy,
49
+ variant = _this$props3.variant,
50
+ id = _this$props3.id,
51
+ maxHeight = _this$props3.maxHeight,
52
+ minHeight = _this$props3.minHeight,
53
+ padding = _this$props3.padding,
54
+ textAlign = _this$props3.textAlign,
55
+ children = _this$props3.children,
56
+ elementRef = _this$props3.elementRef,
57
+ isDisabled = _this$props3.isDisabled,
58
+ isSelected = _this$props3.isSelected,
59
+ styles = _this$props3.styles,
60
+ props = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
81
61
  const isHidden = !isSelected || !!isDisabled;
82
62
  return (0, _emotion.jsx)("div", Object.assign({}, (0, _passthroughProps.passthroughProps)(props), {
83
63
  css: styles === null || styles === void 0 ? void 0 : styles.panel,
@@ -100,7 +80,6 @@ let Panel = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
100
80
  textAlign: textAlign
101
81
  }, children)));
102
82
  }
103
-
104
83
  }, _class2.displayName = "Panel", _class2.componentId = 'Tabs.Panel', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
105
84
  isDisabled: false,
106
85
  textAlign: 'start',
@@ -1,16 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.propTypes = exports.allowedProps = void 0;
9
-
10
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
9
  var _emotion = require("@instructure/emotion");
13
-
14
10
  /*
15
11
  * The MIT License (MIT)
16
12
  *
@@ -34,6 +30,7 @@ var _emotion = require("@instructure/emotion");
34
30
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
31
  * SOFTWARE.
36
32
  */
33
+
37
34
  const propTypes = {
38
35
  renderTitle: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]).isRequired,
39
36
  children: _propTypes.default.node,
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  /*
9
8
  * The MIT License (MIT)
10
9
  *
@@ -41,7 +40,7 @@ exports.default = void 0;
41
40
  */
42
41
  const generateStyle = (componentTheme, props) => {
43
42
  const maxHeight = props.maxHeight,
44
- isSelected = props.isSelected;
43
+ isSelected = props.isSelected;
45
44
  return {
46
45
  panel: {
47
46
  label: 'panel',
@@ -79,6 +78,5 @@ const generateStyle = (componentTheme, props) => {
79
78
  }
80
79
  };
81
80
  };
82
-
83
81
  var _default = generateStyle;
84
82
  exports.default = _default;
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  /*
9
8
  * The MIT License (MIT)
10
9
  *
@@ -36,9 +35,9 @@ exports.default = void 0;
36
35
  */
37
36
  const generateComponentTheme = theme => {
38
37
  const typography = theme.typography,
39
- colors = theme.colors,
40
- borders = theme.borders,
41
- themeName = theme.key;
38
+ colors = theme.colors,
39
+ borders = theme.borders,
40
+ themeName = theme.key;
42
41
  const themeSpecificStyle = {
43
42
  canvas: {
44
43
  color: theme['ic-brand-font-color-dark']
@@ -56,10 +55,10 @@ const generateComponentTheme = theme => {
56
55
  borderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
57
56
  defaultOverflowY: 'auto'
58
57
  };
59
- return { ...componentVariables,
58
+ return {
59
+ ...componentVariables,
60
60
  ...themeSpecificStyle[themeName]
61
61
  };
62
62
  };
63
-
64
63
  var _default = generateComponentTheme;
65
64
  exports.default = _default;