@instructure/ui-tag 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/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
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
+ ## [8.33.2](https://github.com/instructure/instructure-ui/compare/v8.33.1...v8.33.2) (2023-01-25)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-tag
9
+
6
10
  ## [8.33.1](https://github.com/instructure/instructure-ui/compare/v8.33.0...v8.33.1) (2023-01-06)
7
11
 
8
12
  **Note:** Version bump only for package @instructure/ui-tag
@@ -22,6 +22,7 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
  import { locator } from '@instructure/ui-test-locator';
25
- import { Tag } from './index'; // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
25
+ import { Tag } from './index';
26
26
 
27
+ // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
27
28
  export const TagLocator = locator(Tag.selector);
@@ -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
  export default {
25
26
  sectionProp: 'variant',
26
27
  propValues: {
package/es/Tag/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  var _dec, _dec2, _class, _class2;
2
-
3
2
  /*
4
3
  * The MIT License (MIT)
5
4
  *
@@ -23,7 +22,6 @@ var _dec, _dec2, _class, _class2;
23
22
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
23
  * SOFTWARE.
25
24
  */
26
-
27
25
  /** @jsx jsx */
28
26
  import React, { Component } from 'react';
29
27
  import { IconXLine } from '@instructure/ui-icons';
@@ -35,28 +33,25 @@ import { withStyle, jsx } from '@instructure/emotion';
35
33
  import generateStyle from './styles';
36
34
  import generateComponentTheme from './theme';
37
35
  import { allowedProps, propTypes } from './props';
36
+
38
37
  /**
39
38
  ---
40
39
  category: components
41
40
  ---
42
41
  @tsProps
43
42
  **/
44
-
45
43
  let Tag = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class Tag extends Component {
46
44
  constructor() {
47
45
  super(...arguments);
48
46
  this.ref = null;
49
-
50
47
  this.focus = () => {
51
48
  this.ref && this.ref.focus();
52
49
  };
53
-
54
50
  this.handleClick = e => {
55
51
  const _this$props = this.props,
56
- disabled = _this$props.disabled,
57
- readOnly = _this$props.readOnly,
58
- onClick = _this$props.onClick;
59
-
52
+ disabled = _this$props.disabled,
53
+ readOnly = _this$props.readOnly,
54
+ onClick = _this$props.onClick;
60
55
  if (disabled || readOnly) {
61
56
  e.preventDefault();
62
57
  e.stopPropagation();
@@ -64,43 +59,35 @@ let Tag = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = test
64
59
  onClick(e);
65
60
  }
66
61
  };
67
-
68
62
  this.handleRef = element => {
69
63
  this.ref = element;
70
-
71
64
  if (typeof this.props.elementRef === 'function') {
72
65
  this.props.elementRef(element);
73
66
  }
74
67
  };
75
68
  }
76
-
77
69
  componentDidMount() {
78
70
  var _this$props$makeStyle, _this$props2;
79
-
80
71
  (_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
81
72
  }
82
-
83
73
  componentDidUpdate() {
84
74
  var _this$props$makeStyle2, _this$props3;
85
-
86
75
  (_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
87
76
  }
88
-
89
77
  get focused() {
90
78
  return isActiveElement(this.ref);
91
79
  }
92
-
93
80
  render() {
94
81
  const _this$props4 = this.props,
95
- className = _this$props4.className,
96
- dismissible = _this$props4.dismissible,
97
- disabled = _this$props4.disabled,
98
- readOnly = _this$props4.readOnly,
99
- text = _this$props4.text,
100
- title = _this$props4.title,
101
- onClick = _this$props4.onClick,
102
- margin = _this$props4.margin,
103
- styles = _this$props4.styles;
82
+ className = _this$props4.className,
83
+ dismissible = _this$props4.dismissible,
84
+ disabled = _this$props4.disabled,
85
+ readOnly = _this$props4.readOnly,
86
+ text = _this$props4.text,
87
+ title = _this$props4.title,
88
+ onClick = _this$props4.onClick,
89
+ margin = _this$props4.margin,
90
+ styles = _this$props4.styles;
104
91
  const passthroughProps = View.omitViewProps(omitProps(this.props, Tag.allowedProps), Tag);
105
92
  return jsx(View, Object.assign({}, passthroughProps, {
106
93
  elementRef: this.handleRef,
@@ -119,7 +106,6 @@ let Tag = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = test
119
106
  css: styles === null || styles === void 0 ? void 0 : styles.icon
120
107
  }) : null);
121
108
  }
122
-
123
109
  }, _class2.displayName = "Tag", _class2.componentId = 'Tag', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
124
110
  size: 'medium',
125
111
  dismissible: false,
package/es/Tag/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 { ThemeablePropTypes } from '@instructure/emotion';
26
27
  const propTypes = {
package/es/Tag/styles.js CHANGED
@@ -34,10 +34,10 @@
34
34
  */
35
35
  const generateStyle = (componentTheme, props) => {
36
36
  const variant = props.variant,
37
- size = props.size,
38
- dismissible = props.dismissible,
39
- onClick = props.onClick,
40
- disabled = props.disabled;
37
+ size = props.size,
38
+ dismissible = props.dismissible,
39
+ onClick = props.onClick,
40
+ disabled = props.disabled;
41
41
  const isButton = !!onClick;
42
42
  const sizeVariants = {
43
43
  small: {
@@ -127,7 +127,8 @@ const generateStyle = (componentTheme, props) => {
127
127
  }
128
128
  })
129
129
  },
130
- tagBefore: { ...(isButton && {
130
+ tagBefore: {
131
+ ...(isButton && {
131
132
  borderRadius: componentTheme.defaultBorderRadius
132
133
  })
133
134
  }
@@ -146,21 +147,24 @@ const generateStyle = (componentTheme, props) => {
146
147
  }
147
148
  })
148
149
  },
149
- tagBefore: { ...(isButton && {
150
+ tagBefore: {
151
+ ...(isButton && {
150
152
  borderRadius: `calc(${componentTheme.inlineBorderRadius} * 1.5)`
151
153
  })
152
154
  }
153
155
  }
154
156
  };
155
157
  const iconVariantVariants = {
156
- default: { ...(dismissible && {
158
+ default: {
159
+ ...(dismissible && {
157
160
  color: componentTheme.defaultIconColor,
158
161
  '[class$="-tag"]:hover > &': {
159
162
  color: componentTheme.defaultIconHoverColor
160
163
  }
161
164
  })
162
165
  },
163
- inline: { ...(dismissible && {
166
+ inline: {
167
+ ...(dismissible && {
164
168
  backgroundColor: componentTheme.inlineIconColor,
165
169
  borderRadius: '50%',
166
170
  color: componentTheme.inlineBackground,
@@ -193,7 +197,8 @@ const generateStyle = (componentTheme, props) => {
193
197
  ...sizeVariants[size].tag,
194
198
  ...buttonVariant.tag,
195
199
  ...tagVariantVariants[variant].tag,
196
- '&::before': { ...buttonVariant.tagBefore,
200
+ '&::before': {
201
+ ...buttonVariant.tagBefore,
197
202
  ...tagVariantVariants[variant].tagBefore
198
203
  }
199
204
  },
@@ -216,5 +221,4 @@ const generateStyle = (componentTheme, props) => {
216
221
  }
217
222
  };
218
223
  };
219
-
220
224
  export default generateStyle;
package/es/Tag/theme.js CHANGED
@@ -21,8 +21,8 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- import { darken } from '@instructure/ui-color-utils';
25
24
 
25
+ import { darken } from '@instructure/ui-color-utils';
26
26
  /**
27
27
  * Generates the theme object for the component from the theme and provided additional information
28
28
  * @param {Object} theme The actual theme object.
@@ -30,11 +30,11 @@ import { darken } from '@instructure/ui-color-utils';
30
30
  */
31
31
  const generateComponentTheme = theme => {
32
32
  const borders = theme.borders,
33
- colors = theme.colors,
34
- forms = theme.forms,
35
- spacing = theme.spacing,
36
- typography = theme.typography,
37
- themeName = theme.key;
33
+ colors = theme.colors,
34
+ forms = theme.forms,
35
+ spacing = theme.spacing,
36
+ typography = theme.typography,
37
+ themeName = theme.key;
38
38
  const themeSpecificStyle = {
39
39
  'canvas-high-contrast': {
40
40
  defaultBackground: colors.backgroundLightest,
@@ -47,17 +47,16 @@ const generateComponentTheme = theme => {
47
47
  defaultColor: theme['ic-brand-font-color-dark']
48
48
  }
49
49
  };
50
-
51
50
  const tagVariant = function (style, _ref) {
52
51
  let borderColor = _ref.borderColor,
53
- borderRadius = _ref.borderRadius,
54
- borderStyle = _ref.borderStyle,
55
- borderWidth = _ref.borderWidth,
56
- hoverColor = _ref.hoverColor,
57
- iconColor = _ref.iconColor,
58
- iconHoverColor = _ref.iconHoverColor,
59
- mainColor = _ref.mainColor,
60
- textColor = _ref.textColor;
52
+ borderRadius = _ref.borderRadius,
53
+ borderStyle = _ref.borderStyle,
54
+ borderWidth = _ref.borderWidth,
55
+ hoverColor = _ref.hoverColor,
56
+ iconColor = _ref.iconColor,
57
+ iconHoverColor = _ref.iconHoverColor,
58
+ mainColor = _ref.mainColor,
59
+ textColor = _ref.textColor;
61
60
  return {
62
61
  [`${style}BackgroundHover`]: hoverColor || darken(mainColor, 5),
63
62
  [`${style}Background`]: mainColor,
@@ -72,7 +71,6 @@ const generateComponentTheme = theme => {
72
71
  [`${style}IconHoverColor`]: iconHoverColor || iconColor || textColor
73
72
  };
74
73
  };
75
-
76
74
  const componentVariables = {
77
75
  fontFamily: typography.fontFamily,
78
76
  heightSmall: '1.3125rem',
@@ -106,9 +104,9 @@ const generateComponentTheme = theme => {
106
104
  textColor: colors.textDarkest
107
105
  })
108
106
  };
109
- return { ...componentVariables,
107
+ return {
108
+ ...componentVariables,
110
109
  ...themeSpecificStyle[themeName]
111
110
  };
112
111
  };
113
-
114
112
  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 { Tag } from './Tag';
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.TagLocator = void 0;
7
-
8
7
  var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
9
-
10
8
  var _index = require("./index");
11
-
12
9
  /*
13
10
  * The MIT License (MIT)
14
11
  *
@@ -32,6 +29,7 @@ var _index = require("./index");
32
29
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
30
  * SOFTWARE.
34
31
  */
32
+
35
33
  // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
36
34
  const TagLocator = (0, _locator.locator)(_index.Tag.selector);
37
35
  exports.TagLocator = TagLocator;
@@ -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
  *
package/lib/Tag/index.js CHANGED
@@ -1,36 +1,22 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
-
5
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
8
  exports.default = exports.Tag = void 0;
11
-
12
9
  var _react = _interopRequireWildcard(require("react"));
13
-
14
10
  var _IconXLine = require("@instructure/ui-icons/lib/IconXLine.js");
15
-
16
11
  var _View = require("@instructure/ui-view/lib/View");
17
-
18
12
  var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
19
-
20
13
  var _isActiveElement = require("@instructure/ui-dom-utils/lib/isActiveElement.js");
21
-
22
14
  var _testable = require("@instructure/ui-testable/lib/testable.js");
23
-
24
15
  var _emotion = require("@instructure/emotion");
25
-
26
16
  var _styles = _interopRequireDefault(require("./styles"));
27
-
28
17
  var _theme = _interopRequireDefault(require("./theme"));
29
-
30
18
  var _props = require("./props");
31
-
32
19
  var _dec, _dec2, _class, _class2;
33
-
34
20
  /**
35
21
  ---
36
22
  category: components
@@ -41,17 +27,14 @@ let Tag = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec
41
27
  constructor() {
42
28
  super(...arguments);
43
29
  this.ref = null;
44
-
45
30
  this.focus = () => {
46
31
  this.ref && this.ref.focus();
47
32
  };
48
-
49
33
  this.handleClick = e => {
50
34
  const _this$props = this.props,
51
- disabled = _this$props.disabled,
52
- readOnly = _this$props.readOnly,
53
- onClick = _this$props.onClick;
54
-
35
+ disabled = _this$props.disabled,
36
+ readOnly = _this$props.readOnly,
37
+ onClick = _this$props.onClick;
55
38
  if (disabled || readOnly) {
56
39
  e.preventDefault();
57
40
  e.stopPropagation();
@@ -59,46 +42,36 @@ let Tag = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec
59
42
  onClick(e);
60
43
  }
61
44
  };
62
-
63
45
  this.handleRef = element => {
64
46
  this.ref = element;
65
-
66
47
  if (typeof this.props.elementRef === 'function') {
67
48
  this.props.elementRef(element);
68
49
  }
69
50
  };
70
51
  }
71
-
72
52
  componentDidMount() {
73
53
  var _this$props$makeStyle, _this$props2;
74
-
75
54
  (_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
76
55
  }
77
-
78
56
  componentDidUpdate() {
79
57
  var _this$props$makeStyle2, _this$props3;
80
-
81
58
  (_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
82
59
  }
83
-
84
60
  get focused() {
85
61
  return (0, _isActiveElement.isActiveElement)(this.ref);
86
62
  }
87
-
88
63
  render() {
89
64
  const _this$props4 = this.props,
90
- className = _this$props4.className,
91
- dismissible = _this$props4.dismissible,
92
- disabled = _this$props4.disabled,
93
- readOnly = _this$props4.readOnly,
94
- text = _this$props4.text,
95
- title = _this$props4.title,
96
- onClick = _this$props4.onClick,
97
- margin = _this$props4.margin,
98
- styles = _this$props4.styles;
99
-
65
+ className = _this$props4.className,
66
+ dismissible = _this$props4.dismissible,
67
+ disabled = _this$props4.disabled,
68
+ readOnly = _this$props4.readOnly,
69
+ text = _this$props4.text,
70
+ title = _this$props4.title,
71
+ onClick = _this$props4.onClick,
72
+ margin = _this$props4.margin,
73
+ styles = _this$props4.styles;
100
74
  const passthroughProps = _View.View.omitViewProps((0, _omitProps.omitProps)(this.props, Tag.allowedProps), Tag);
101
-
102
75
  return (0, _emotion.jsx)(_View.View, Object.assign({}, passthroughProps, {
103
76
  elementRef: this.handleRef,
104
77
  css: styles === null || styles === void 0 ? void 0 : styles.tag,
@@ -116,7 +89,6 @@ let Tag = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec
116
89
  css: styles === null || styles === void 0 ? void 0 : styles.icon
117
90
  }) : null);
118
91
  }
119
-
120
92
  }, _class2.displayName = "Tag", _class2.componentId = 'Tag', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
121
93
  size: 'medium',
122
94
  dismissible: false,
@@ -10,9 +10,7 @@ Object.defineProperty(exports, "TagLocator", {
10
10
  }
11
11
  });
12
12
  exports.default = void 0;
13
-
14
13
  var _TagLocator = require("./TagLocator");
15
-
16
14
  /*
17
15
  * The MIT License (MIT)
18
16
  *
package/lib/Tag/props.js CHANGED
@@ -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
  className: _propTypes.default.string,
39
36
  text: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]).isRequired,
package/lib/Tag/styles.js CHANGED
@@ -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,10 +40,10 @@ exports.default = void 0;
41
40
  */
42
41
  const generateStyle = (componentTheme, props) => {
43
42
  const variant = props.variant,
44
- size = props.size,
45
- dismissible = props.dismissible,
46
- onClick = props.onClick,
47
- disabled = props.disabled;
43
+ size = props.size,
44
+ dismissible = props.dismissible,
45
+ onClick = props.onClick,
46
+ disabled = props.disabled;
48
47
  const isButton = !!onClick;
49
48
  const sizeVariants = {
50
49
  small: {
@@ -134,7 +133,8 @@ const generateStyle = (componentTheme, props) => {
134
133
  }
135
134
  })
136
135
  },
137
- tagBefore: { ...(isButton && {
136
+ tagBefore: {
137
+ ...(isButton && {
138
138
  borderRadius: componentTheme.defaultBorderRadius
139
139
  })
140
140
  }
@@ -153,21 +153,24 @@ const generateStyle = (componentTheme, props) => {
153
153
  }
154
154
  })
155
155
  },
156
- tagBefore: { ...(isButton && {
156
+ tagBefore: {
157
+ ...(isButton && {
157
158
  borderRadius: `calc(${componentTheme.inlineBorderRadius} * 1.5)`
158
159
  })
159
160
  }
160
161
  }
161
162
  };
162
163
  const iconVariantVariants = {
163
- default: { ...(dismissible && {
164
+ default: {
165
+ ...(dismissible && {
164
166
  color: componentTheme.defaultIconColor,
165
167
  '[class$="-tag"]:hover > &': {
166
168
  color: componentTheme.defaultIconHoverColor
167
169
  }
168
170
  })
169
171
  },
170
- inline: { ...(dismissible && {
172
+ inline: {
173
+ ...(dismissible && {
171
174
  backgroundColor: componentTheme.inlineIconColor,
172
175
  borderRadius: '50%',
173
176
  color: componentTheme.inlineBackground,
@@ -200,7 +203,8 @@ const generateStyle = (componentTheme, props) => {
200
203
  ...sizeVariants[size].tag,
201
204
  ...buttonVariant.tag,
202
205
  ...tagVariantVariants[variant].tag,
203
- '&::before': { ...buttonVariant.tagBefore,
206
+ '&::before': {
207
+ ...buttonVariant.tagBefore,
204
208
  ...tagVariantVariants[variant].tagBefore
205
209
  }
206
210
  },
@@ -223,6 +227,5 @@ const generateStyle = (componentTheme, props) => {
223
227
  }
224
228
  };
225
229
  };
226
-
227
230
  var _default = generateStyle;
228
231
  exports.default = _default;
package/lib/Tag/theme.js CHANGED
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _darken = require("@instructure/ui-color-utils/lib/darken.js");
9
-
10
8
  /*
11
9
  * The MIT License (MIT)
12
10
  *
@@ -38,11 +36,11 @@ var _darken = require("@instructure/ui-color-utils/lib/darken.js");
38
36
  */
39
37
  const generateComponentTheme = theme => {
40
38
  const borders = theme.borders,
41
- colors = theme.colors,
42
- forms = theme.forms,
43
- spacing = theme.spacing,
44
- typography = theme.typography,
45
- themeName = theme.key;
39
+ colors = theme.colors,
40
+ forms = theme.forms,
41
+ spacing = theme.spacing,
42
+ typography = theme.typography,
43
+ themeName = theme.key;
46
44
  const themeSpecificStyle = {
47
45
  'canvas-high-contrast': {
48
46
  defaultBackground: colors.backgroundLightest,
@@ -55,17 +53,16 @@ const generateComponentTheme = theme => {
55
53
  defaultColor: theme['ic-brand-font-color-dark']
56
54
  }
57
55
  };
58
-
59
56
  const tagVariant = function (style, _ref) {
60
57
  let borderColor = _ref.borderColor,
61
- borderRadius = _ref.borderRadius,
62
- borderStyle = _ref.borderStyle,
63
- borderWidth = _ref.borderWidth,
64
- hoverColor = _ref.hoverColor,
65
- iconColor = _ref.iconColor,
66
- iconHoverColor = _ref.iconHoverColor,
67
- mainColor = _ref.mainColor,
68
- textColor = _ref.textColor;
58
+ borderRadius = _ref.borderRadius,
59
+ borderStyle = _ref.borderStyle,
60
+ borderWidth = _ref.borderWidth,
61
+ hoverColor = _ref.hoverColor,
62
+ iconColor = _ref.iconColor,
63
+ iconHoverColor = _ref.iconHoverColor,
64
+ mainColor = _ref.mainColor,
65
+ textColor = _ref.textColor;
69
66
  return {
70
67
  [`${style}BackgroundHover`]: hoverColor || (0, _darken.darken)(mainColor, 5),
71
68
  [`${style}Background`]: mainColor,
@@ -80,7 +77,6 @@ const generateComponentTheme = theme => {
80
77
  [`${style}IconHoverColor`]: iconHoverColor || iconColor || textColor
81
78
  };
82
79
  };
83
-
84
80
  const componentVariables = {
85
81
  fontFamily: typography.fontFamily,
86
82
  heightSmall: '1.3125rem',
@@ -114,10 +110,10 @@ const generateComponentTheme = theme => {
114
110
  textColor: colors.textDarkest
115
111
  })
116
112
  };
117
- return { ...componentVariables,
113
+ return {
114
+ ...componentVariables,
118
115
  ...themeSpecificStyle[themeName]
119
116
  };
120
117
  };
121
-
122
118
  var _default = generateComponentTheme;
123
119
  exports.default = _default;
package/lib/index.js CHANGED
@@ -9,5 +9,4 @@ Object.defineProperty(exports, "Tag", {
9
9
  return _Tag.Tag;
10
10
  }
11
11
  });
12
-
13
12
  var _Tag = require("./Tag");