@zendeskgarden/react-tags 8.47.2 → 8.48.0

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/dist/index.cjs.js CHANGED
@@ -102,7 +102,7 @@ var StyledAvatar = styled__default["default"](function (_ref) {
102
102
  return React__default["default"].cloneElement(React.Children.only(children), props);
103
103
  }).attrs({
104
104
  'data-garden-id': COMPONENT_ID$2,
105
- 'data-garden-version': '8.47.2'
105
+ 'data-garden-version': '8.48.0'
106
106
  }).withConfig({
107
107
  displayName: "StyledAvatar",
108
108
  componentId: "sc-3kdmgt-0"
@@ -116,7 +116,7 @@ StyledAvatar.defaultProps = {
116
116
  var COMPONENT_ID$1 = 'tags.close';
117
117
  var StyledClose = styled__default["default"].div.attrs({
118
118
  'data-garden-id': COMPONENT_ID$1,
119
- 'data-garden-version': '8.47.2',
119
+ 'data-garden-version': '8.48.0',
120
120
  'aria-label': 'Press delete to remove'
121
121
  }).withConfig({
122
122
  displayName: "StyledClose",
@@ -201,7 +201,7 @@ var sizeStyles = function sizeStyles(props) {
201
201
  };
202
202
  var StyledTag = styled__default["default"].div.attrs({
203
203
  'data-garden-id': COMPONENT_ID,
204
- 'data-garden-version': '8.47.2'
204
+ 'data-garden-version': '8.48.0'
205
205
  }).withConfig({
206
206
  displayName: "StyledTag",
207
207
  componentId: "sc-1jvbe03-0"
@@ -248,15 +248,22 @@ var SvgXStroke = function SvgXStroke(props) {
248
248
  })));
249
249
  };
250
250
 
251
- var Close = React__default["default"].forwardRef(function (props, ref) {
251
+ var CloseComponent = React.forwardRef(function (props, ref) {
252
252
  return React__default["default"].createElement(StyledClose, _extends$1({
253
253
  ref: ref
254
254
  }, props), React__default["default"].createElement(SvgXStroke, null));
255
255
  });
256
- Close.displayName = 'Close';
256
+ CloseComponent.displayName = 'Tag.Close';
257
+ var Close = CloseComponent;
258
+
259
+ var AvatarComponent = function AvatarComponent(props) {
260
+ return React__default["default"].createElement(StyledAvatar, props);
261
+ };
262
+ AvatarComponent.displayName = 'Tag.Avatar';
263
+ var Avatar = AvatarComponent;
257
264
 
258
265
  var _excluded = ["size", "hue"];
259
- var Tag = React__default["default"].forwardRef(function (_ref, ref) {
266
+ var TagComponent = React.forwardRef(function (_ref, ref) {
260
267
  var size = _ref.size,
261
268
  hue = _ref.hue,
262
269
  otherProps = _objectWithoutProperties(_ref, _excluded);
@@ -266,18 +273,19 @@ var Tag = React__default["default"].forwardRef(function (_ref, ref) {
266
273
  hue: hue
267
274
  }, otherProps));
268
275
  });
269
- Tag.displayName = 'Tag';
270
- Tag.propTypes = {
276
+ TagComponent.displayName = 'Tag';
277
+ TagComponent.propTypes = {
271
278
  size: PropTypes__default["default"].oneOf(['small', 'medium', 'large']),
272
279
  hue: PropTypes__default["default"].string,
273
280
  isPill: PropTypes__default["default"].bool,
274
281
  isRound: PropTypes__default["default"].bool,
275
282
  isRegular: PropTypes__default["default"].bool
276
283
  };
277
- Tag.defaultProps = {
284
+ TagComponent.defaultProps = {
278
285
  size: 'medium'
279
286
  };
280
- Tag.Avatar = StyledAvatar;
287
+ var Tag = TagComponent;
288
+ Tag.Avatar = Avatar;
281
289
  Tag.Close = Close;
282
290
 
283
291
  exports.Tag = Tag;
package/dist/index.esm.js CHANGED
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import * as React from 'react';
9
- import React__default, { Children } from 'react';
9
+ import React__default, { Children, forwardRef } from 'react';
10
10
  import PropTypes from 'prop-types';
11
11
  import styled, { css } from 'styled-components';
12
12
  import { readableColor, math } from 'polished';
@@ -74,7 +74,7 @@ var StyledAvatar = styled(function (_ref) {
74
74
  return React__default.cloneElement(Children.only(children), props);
75
75
  }).attrs({
76
76
  'data-garden-id': COMPONENT_ID$2,
77
- 'data-garden-version': '8.47.2'
77
+ 'data-garden-version': '8.48.0'
78
78
  }).withConfig({
79
79
  displayName: "StyledAvatar",
80
80
  componentId: "sc-3kdmgt-0"
@@ -88,7 +88,7 @@ StyledAvatar.defaultProps = {
88
88
  var COMPONENT_ID$1 = 'tags.close';
89
89
  var StyledClose = styled.div.attrs({
90
90
  'data-garden-id': COMPONENT_ID$1,
91
- 'data-garden-version': '8.47.2',
91
+ 'data-garden-version': '8.48.0',
92
92
  'aria-label': 'Press delete to remove'
93
93
  }).withConfig({
94
94
  displayName: "StyledClose",
@@ -173,7 +173,7 @@ var sizeStyles = function sizeStyles(props) {
173
173
  };
174
174
  var StyledTag = styled.div.attrs({
175
175
  'data-garden-id': COMPONENT_ID,
176
- 'data-garden-version': '8.47.2'
176
+ 'data-garden-version': '8.48.0'
177
177
  }).withConfig({
178
178
  displayName: "StyledTag",
179
179
  componentId: "sc-1jvbe03-0"
@@ -220,15 +220,22 @@ var SvgXStroke = function SvgXStroke(props) {
220
220
  })));
221
221
  };
222
222
 
223
- var Close = React__default.forwardRef(function (props, ref) {
223
+ var CloseComponent = forwardRef(function (props, ref) {
224
224
  return React__default.createElement(StyledClose, _extends$1({
225
225
  ref: ref
226
226
  }, props), React__default.createElement(SvgXStroke, null));
227
227
  });
228
- Close.displayName = 'Close';
228
+ CloseComponent.displayName = 'Tag.Close';
229
+ var Close = CloseComponent;
230
+
231
+ var AvatarComponent = function AvatarComponent(props) {
232
+ return React__default.createElement(StyledAvatar, props);
233
+ };
234
+ AvatarComponent.displayName = 'Tag.Avatar';
235
+ var Avatar = AvatarComponent;
229
236
 
230
237
  var _excluded = ["size", "hue"];
231
- var Tag = React__default.forwardRef(function (_ref, ref) {
238
+ var TagComponent = forwardRef(function (_ref, ref) {
232
239
  var size = _ref.size,
233
240
  hue = _ref.hue,
234
241
  otherProps = _objectWithoutProperties(_ref, _excluded);
@@ -238,18 +245,19 @@ var Tag = React__default.forwardRef(function (_ref, ref) {
238
245
  hue: hue
239
246
  }, otherProps));
240
247
  });
241
- Tag.displayName = 'Tag';
242
- Tag.propTypes = {
248
+ TagComponent.displayName = 'Tag';
249
+ TagComponent.propTypes = {
243
250
  size: PropTypes.oneOf(['small', 'medium', 'large']),
244
251
  hue: PropTypes.string,
245
252
  isPill: PropTypes.bool,
246
253
  isRound: PropTypes.bool,
247
254
  isRegular: PropTypes.bool
248
255
  };
249
- Tag.defaultProps = {
256
+ TagComponent.defaultProps = {
250
257
  size: 'medium'
251
258
  };
252
- Tag.Avatar = StyledAvatar;
259
+ var Tag = TagComponent;
260
+ Tag.Avatar = Avatar;
253
261
  Tag.Close = Close;
254
262
 
255
263
  export { Tag };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import { HTMLAttributes } from 'react';
8
+ /**
9
+ * @extends HTMLAttributes<HTMLElement>
10
+ */
11
+ export declare const Avatar: {
12
+ (props: HTMLAttributes<HTMLElement>): JSX.Element;
13
+ displayName: string;
14
+ };
@@ -8,5 +8,4 @@ import React from 'react';
8
8
  /**
9
9
  * @extends HTMLAttributes<HTMLDivElement>
10
10
  */
11
- declare const Close: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
12
- export default Close;
11
+ export declare const Close: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -5,8 +5,8 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import React, { HTMLAttributes } from 'react';
8
- import { StyledAvatar } from '../styled';
9
- import Close from './Close';
8
+ import { Close } from './Close';
9
+ import { Avatar } from './Avatar';
10
10
  export interface ITagProps extends HTMLAttributes<HTMLDivElement> {
11
11
  /** Adjusts font size and padding */
12
12
  size?: 'small' | 'medium' | 'large';
@@ -23,8 +23,10 @@ export interface ITagProps extends HTMLAttributes<HTMLDivElement> {
23
23
  /** Applies regular (non-bold) font weight */
24
24
  isRegular?: boolean;
25
25
  }
26
- declare const _default: React.ForwardRefExoticComponent<ITagProps & React.RefAttributes<HTMLDivElement>> & {
27
- Avatar: typeof StyledAvatar;
26
+ /**
27
+ * @extends HTMLAttributes<HTMLDivElement>
28
+ */
29
+ export declare const Tag: React.ForwardRefExoticComponent<ITagProps & React.RefAttributes<HTMLDivElement>> & {
30
+ Avatar: typeof Avatar;
28
31
  Close: typeof Close;
29
32
  };
30
- export default _default;
@@ -4,5 +4,5 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- export { default as Tag } from './elements/Tag';
7
+ export { Tag } from './elements/Tag';
8
8
  export type { ITagProps } from './elements/Tag';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-tags",
3
- "version": "8.47.2",
3
+ "version": "8.48.0",
4
4
  "description": "Components relating to tags in the Garden Design System",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zendesk Garden <garden@zendesk.com>",
@@ -32,7 +32,7 @@
32
32
  "styled-components": "^4.2.0 || ^5.0.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@zendeskgarden/react-theming": "^8.47.2",
35
+ "@zendeskgarden/react-theming": "^8.48.0",
36
36
  "@zendeskgarden/svg-icons": "6.30.2"
37
37
  },
38
38
  "keywords": [
@@ -45,5 +45,5 @@
45
45
  "access": "public"
46
46
  },
47
47
  "zendeskgarden:src": "src/index.ts",
48
- "gitHead": "41cb43f285760417ae2145e47eca0e4a600455ab"
48
+ "gitHead": "75f36aee62043004650c3eb2e1583b98a87d71f8"
49
49
  }