@zohodesk/dot 1.3.0-temp-158 → 1.3.1

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.
Files changed (92) hide show
  1. package/.cli/PropLessFiles.html +1 -1
  2. package/.cli/propValidation_report.html +1 -1
  3. package/README.md +3 -1
  4. package/coverage/ExternalLink/ExternalLink.js.html +1 -1
  5. package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
  6. package/coverage/ExternalLink/index.html +1 -1
  7. package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
  8. package/coverage/ExternalLink/props/index.html +1 -1
  9. package/coverage/ExternalLink/props/propTypes.js.html +1 -1
  10. package/coverage/IconButton/IconButton.js.html +1 -1
  11. package/coverage/IconButton/IconButton.module.css.html +1 -1
  12. package/coverage/IconButton/index.html +1 -1
  13. package/coverage/IconButton/props/defaultProps.js.html +1 -1
  14. package/coverage/IconButton/props/index.html +1 -1
  15. package/coverage/IconButton/props/propTypes.js.html +1 -1
  16. package/coverage/Image/Image.js.html +1 -1
  17. package/coverage/Image/Image.module.css.html +1 -1
  18. package/coverage/Image/index.html +1 -1
  19. package/coverage/Image/props/defaultProps.js.html +1 -1
  20. package/coverage/Image/props/index.html +1 -1
  21. package/coverage/Image/props/propTypes.js.html +1 -1
  22. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
  23. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
  24. package/coverage/avatar/AvatarWithTeam/index.html +1 -1
  25. package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
  26. package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
  27. package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
  28. package/coverage/coverage-final.json +16 -16
  29. package/coverage/coverage-summary.json +16 -16
  30. package/coverage/index.html +1 -1
  31. package/es/v1/ActionButton/ActionButton.js +2 -2
  32. package/es/v1/Message/Message.js +16 -42
  33. package/es/v1/PlusIcon/PlusIcon.js +25 -37
  34. package/es/v1/alert/AlertHeader/AlertHeader.js +5 -4
  35. package/es/v1/alert/AlertHeader/props/defaultProps.js +12 -0
  36. package/es/v1/alert/AlertHeader/props/propTypes.js +20 -0
  37. package/es/v1/alert/AlertLookup/AlertLookup.js +6 -4
  38. package/es/v1/alert/AlertLookup/props/defaultProps.js +13 -0
  39. package/es/v1/alert/AlertLookup/props/propTypes.js +36 -0
  40. package/es/v1/avatar/AvatarClose/AvatarClose.js +32 -43
  41. package/es/v1/avatar/AvatarCollision/AvatarCollision.js +41 -52
  42. package/es/v1/avatar/AvatarIcon/AvatarIcon.js +38 -43
  43. package/es/v1/avatar/AvatarStatus/AvatarStatus.js +52 -63
  44. package/es/v1/avatar/AvatarThread/AvatarThread.js +62 -69
  45. package/es/v1/avatar/AvatarUser/AvatarUser.js +93 -100
  46. package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +81 -88
  47. package/es/v1/list/SecondaryText/AccountName.js +61 -69
  48. package/es/v1/list/SecondaryText/ContactName.js +66 -74
  49. package/es/v1/list/SecondaryText/DepartmentText.js +15 -27
  50. package/es/v1/list/SecondaryText/Email.js +32 -40
  51. package/es/v1/list/SecondaryText/HappinessRating.js +17 -25
  52. package/es/v1/list/SecondaryText/PhoneNumber.js +36 -44
  53. package/es/v1/list/SecondaryText/PriorityText.js +16 -28
  54. package/es/v1/list/SecondaryText/SecondaryText.js +21 -33
  55. package/es/v1/list/SecondaryText/StatusText.js +17 -29
  56. package/es/v1/list/SecondaryText/TicketId.js +33 -45
  57. package/es/v1/list/SecondaryText/Website.js +22 -30
  58. package/es/v1/list/SecondryPanel/SecondryPanel.js +66 -83
  59. package/es/v1/list/SentimentStatus/SentimentStatus.js +18 -29
  60. package/es/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
  61. package/lib/v1/ActionButton/ActionButton.js +2 -2
  62. package/lib/v1/Message/Message.js +23 -80
  63. package/lib/v1/PlusIcon/PlusIcon.js +25 -71
  64. package/lib/v1/alert/AlertHeader/AlertHeader.js +5 -4
  65. package/lib/v1/alert/AlertHeader/props/defaultProps.js +19 -0
  66. package/lib/v1/alert/AlertHeader/props/propTypes.js +31 -0
  67. package/lib/v1/alert/AlertLookup/AlertLookup.js +6 -4
  68. package/lib/v1/alert/AlertLookup/props/defaultProps.js +20 -0
  69. package/lib/v1/alert/AlertLookup/props/propTypes.js +47 -0
  70. package/lib/v1/avatar/AvatarClose/AvatarClose.js +32 -77
  71. package/lib/v1/avatar/AvatarCollision/AvatarCollision.js +41 -86
  72. package/lib/v1/avatar/AvatarIcon/AvatarIcon.js +37 -80
  73. package/lib/v1/avatar/AvatarStatus/AvatarStatus.js +52 -97
  74. package/lib/v1/avatar/AvatarThread/AvatarThread.js +61 -106
  75. package/lib/v1/avatar/AvatarUser/AvatarUser.js +95 -140
  76. package/lib/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +85 -130
  77. package/lib/v1/list/SecondaryText/AccountName.js +63 -113
  78. package/lib/v1/list/SecondaryText/ContactName.js +67 -117
  79. package/lib/v1/list/SecondaryText/DepartmentText.js +16 -66
  80. package/lib/v1/list/SecondaryText/Email.js +32 -82
  81. package/lib/v1/list/SecondaryText/HappinessRating.js +21 -68
  82. package/lib/v1/list/SecondaryText/PhoneNumber.js +36 -86
  83. package/lib/v1/list/SecondaryText/PriorityText.js +16 -66
  84. package/lib/v1/list/SecondaryText/SecondaryText.js +19 -69
  85. package/lib/v1/list/SecondaryText/StatusText.js +17 -67
  86. package/lib/v1/list/SecondaryText/TicketId.js +33 -83
  87. package/lib/v1/list/SecondaryText/Website.js +29 -72
  88. package/lib/v1/list/SecondryPanel/SecondryPanel.js +69 -168
  89. package/lib/v1/list/SentimentStatus/SentimentStatus.js +19 -64
  90. package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
  91. package/package.json +2 -2
  92. package/result.json +1 -1
@@ -1,59 +1,33 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
- import React from 'react';
3
+ import React, { useState, useEffect } from 'react';
4
4
  import { defaultProps } from '../../Message/props/defaultProps';
5
5
  import { propTypes, MessageUI_propTypes, MessageNew_propTypes } from '../../Message/props/propTypes';
6
6
  import { Icon } from '@zohodesk/icons';
7
7
  import AutoClose from '../actions/AutoClose';
8
8
  import style from '../../Message/Message.module.css';
9
- export default class Message extends React.Component {
10
- constructor(props) {
11
- super(props);
12
- this.state = {
13
- hideMessage: false
14
- };
15
- }
16
-
17
- UNSAFE_componentWillReceiveProps(nextProps) {
18
- let {
19
- showMessage,
20
- hideMessage
21
- } = this.props;
22
-
23
- if (showMessage !== nextProps.showMessage) {
24
- if (nextProps.type != 'alert') {
25
- setTimeout(() => {
26
- hideMessage();
27
- }, 3000);
28
- }
29
- }
30
- }
31
-
32
- componentDidMount() {
33
- let {
34
- type,
35
- hideMessage
36
- } = this.props;
37
-
9
+ export default function Message(props) {
10
+ // constructor(props) {
11
+ // super(props);
12
+ // this.state = { hideMessage: false };
13
+ // }
14
+ // const [hideMessage,setHideMessage] = useState(false)
15
+ let {
16
+ showMessage,
17
+ hideMessage,
18
+ type
19
+ } = props;
20
+ useEffect(() => {
38
21
  if (type != 'alert') {
39
22
  setTimeout(() => {
40
23
  hideMessage();
41
24
  }, 3000);
42
25
  }
43
- }
44
-
45
- render() {
46
- return /*#__PURE__*/React.createElement(MessageUI, this.props);
47
- }
48
-
26
+ }, [showMessage]);
27
+ return /*#__PURE__*/React.createElement(MessageUI, props);
49
28
  }
50
29
  Message.propTypes = propTypes;
51
- Message.defaultProps = defaultProps; // if (__DOCS__) {
52
- // Message.docs = {
53
- // componentGroup: 'Atom'
54
- // };
55
- // }
56
-
30
+ Message.defaultProps = defaultProps;
57
31
  export function MessageUI(props) {
58
32
  function onClose(e) {
59
33
  let {
@@ -3,42 +3,30 @@ import { defaultProps } from '../../PlusIcon/props/defaultProps';
3
3
  import { propTypes } from '../../PlusIcon/props/propTypes';
4
4
  import style from '../../PlusIcon/PlusIcon.module.css';
5
5
  import AvatarIcon from '../avatar/AvatarIcon/AvatarIcon';
6
- export default class PlusIcon extends React.Component {
7
- constructor(props) {
8
- super(props);
9
- }
10
-
11
- render() {
12
- let {
13
- dataId,
14
- iconName,
15
- iconClass,
16
- iconSize,
17
- size,
18
- onClick,
19
- title,
20
- customClass
21
- } = this.props;
22
- return /*#__PURE__*/React.createElement("span", {
23
- className: style.container,
24
- onClick: onClick,
25
- "data-id": dataId,
26
- "data-test-id": dataId,
27
- "data-title": title
28
- }, /*#__PURE__*/React.createElement(AvatarIcon, {
29
- name: iconName,
30
- iconClass: `${iconClass} ${style.icon}`,
31
- iconSize: iconSize,
32
- size: size,
33
- className: `${customClass} ${style.plusIcon}`
34
- }));
35
- }
36
-
6
+ export default function PlusIcon(props) {
7
+ let {
8
+ dataId,
9
+ iconName,
10
+ iconClass,
11
+ iconSize,
12
+ size,
13
+ onClick,
14
+ title,
15
+ customClass
16
+ } = props;
17
+ return /*#__PURE__*/React.createElement("span", {
18
+ className: style.container,
19
+ onClick: onClick,
20
+ "data-id": dataId,
21
+ "data-test-id": dataId,
22
+ "data-title": title
23
+ }, /*#__PURE__*/React.createElement(AvatarIcon, {
24
+ name: iconName,
25
+ iconClass: `${iconClass} ${style.icon}`,
26
+ iconSize: iconSize,
27
+ size: size,
28
+ className: `${customClass} ${style.plusIcon}`
29
+ }));
37
30
  }
38
31
  PlusIcon.defaultProps = defaultProps;
39
- PlusIcon.propTypes = propTypes; // if (__DOCS__) {
40
- // PlusIcon.docs = {
41
- // componentGroup: 'Common',
42
- // folderName: 'Ticket DetailView'
43
- // };
44
- // }
32
+ PlusIcon.propTypes = propTypes;
@@ -10,8 +10,8 @@ import { mergeStyle } from '@zohodesk/utils'; //customHooks
10
10
 
11
11
  import useDragger from '../../../Hooks/Dragger/useDragger'; //Props
12
12
 
13
- import defaultProps from '../../../version2/lookup/AlertHeader/props/defaultProps';
14
- import propTypes from '../../../version2/lookup/AlertHeader/props/propTypes';
13
+ import defaultProps from './props/defaultProps';
14
+ import propTypes from './props/propTypes';
15
15
  export default function AlertHeader(props) {
16
16
  const {
17
17
  title,
@@ -24,7 +24,8 @@ export default function AlertHeader(props) {
24
24
  type,
25
25
  htmlId,
26
26
  customStyle,
27
- dragBoundaryLimit
27
+ dragBoundaryLimit,
28
+ renderAlertIcon
28
29
  } = props;
29
30
  const finalStyle = mergeStyle(style, customStyle);
30
31
  const {
@@ -51,7 +52,7 @@ export default function AlertHeader(props) {
51
52
  eleRef: dragRef
52
53
  }, needIcon && /*#__PURE__*/React.createElement("div", {
53
54
  className: finalStyle.iconContainer
54
- }, /*#__PURE__*/React.createElement(AlertIcons, {
55
+ }, renderAlertIcon ? renderAlertIcon() : /*#__PURE__*/React.createElement(AlertIcons, {
55
56
  type: type
56
57
  })), (title || children) && /*#__PURE__*/React.createElement(Box, {
57
58
  flexible: true
@@ -0,0 +1,12 @@
1
+ export default {
2
+ needIcon: true,
3
+ type: 'danger',
4
+ breakChildren: false,
5
+ dataId: 'alertHeader',
6
+ dragBoundaryLimit: {
7
+ top: 0,
8
+ left: 50,
9
+ right: 50,
10
+ bottom: 50
11
+ }
12
+ };
@@ -0,0 +1,20 @@
1
+ import PropTypes from 'prop-types';
2
+ export default {
3
+ breakChildren: PropTypes.bool,
4
+ children: PropTypes.node,
5
+ closeTitle: PropTypes.string,
6
+ dataId: PropTypes.string,
7
+ needIcon: PropTypes.bool,
8
+ onClose: PropTypes.func,
9
+ title: PropTypes.string,
10
+ type: PropTypes.oneOf(['success', 'error', 'danger', 'warning', 'info', 'notification']),
11
+ htmlId: PropTypes.string,
12
+ customStyle: PropTypes.object,
13
+ dragBoundaryLimit: PropTypes.shape({
14
+ top: PropTypes.number,
15
+ left: PropTypes.number,
16
+ right: PropTypes.number,
17
+ bottom: PropTypes.number
18
+ }),
19
+ renderAlertIcon: PropTypes.func
20
+ };
@@ -2,8 +2,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
2
2
 
3
3
  /**** Libraries ****/
4
4
  import React from 'react';
5
- import { defaultProps } from '../../../version2/lookup/AlertLookup/props/defaultProps';
6
- import { propTypes } from '../../../version2/lookup/AlertLookup/props/propTypes';
5
+ import { defaultProps } from './props/defaultProps';
6
+ import { propTypes } from './props/propTypes';
7
7
  /**** Components ****/
8
8
 
9
9
  import { useUniqueId } from '@zohodesk/components/es/v1/Provider/IdProvider';
@@ -65,7 +65,8 @@ export default function AlertLookup(props) {
65
65
  isHtmlContent,
66
66
  scroll,
67
67
  isDefaultFocus,
68
- onEsc
68
+ onEsc,
69
+ renderAlertIcon
69
70
  } = props;
70
71
  const {
71
72
  LookupProps = {},
@@ -115,7 +116,8 @@ export default function AlertLookup(props) {
115
116
  type: type,
116
117
  needIcon: needIcon,
117
118
  onClose: onClose,
118
- breakChildren: wrapHeader
119
+ breakChildren: wrapHeader,
120
+ renderAlertIcon: renderAlertIcon
119
121
  }, AlertHeaderProps), headerChildren ? headerChildren() : null)), /*#__PURE__*/React.createElement(Box, {
120
122
  flexible: true
121
123
  }, /*#__PURE__*/React.createElement("div", {
@@ -0,0 +1,13 @@
1
+ export const defaultProps = {
2
+ isActive: false,
3
+ size: 'small',
4
+ wrapHeader: false,
5
+ dataId: 'alertPopup',
6
+ isDefaultFocus: true,
7
+ customProps: {},
8
+ align: 'top',
9
+ childAnimationName: 'flyDown',
10
+ isHtmlContent: false,
11
+ scroll: '',
12
+ onEsc: 'cancel'
13
+ };
@@ -0,0 +1,36 @@
1
+ import PropTypes from 'prop-types';
2
+ export const propTypes = {
3
+ cancelText: PropTypes.string,
4
+ children: PropTypes.node,
5
+ confirmationMessage: PropTypes.string,
6
+ customClass: PropTypes.object,
7
+ dataId: PropTypes.string,
8
+ forwardRef: PropTypes.object,
9
+ headerChildren: PropTypes.func,
10
+ isActive: PropTypes.bool,
11
+ isDefaultFocus: PropTypes.bool,
12
+ message: PropTypes.node,
13
+ needIcon: PropTypes.bool,
14
+ onCancelClick: PropTypes.func,
15
+ onClose: PropTypes.func,
16
+ onLookupClick: PropTypes.func,
17
+ onSubmitClick: PropTypes.func,
18
+ size: PropTypes.oneOf(['small', 'xmedium', 'medium']),
19
+ submitText: PropTypes.string,
20
+ title: PropTypes.string,
21
+ type: PropTypes.oneOf(['success', 'error', 'danger', 'warning', 'info', 'notification']),
22
+ wrapHeader: PropTypes.bool,
23
+ a11y: PropTypes.object,
24
+ customProps: PropTypes.shape({
25
+ LookupProps: PropTypes.object,
26
+ AlertHeaderProps: PropTypes.object,
27
+ PrimaryButtonProps: PropTypes.object,
28
+ SecondaryButtonProps: PropTypes.object
29
+ }),
30
+ align: PropTypes.oneOf(['top', 'vertical']),
31
+ childAnimationName: PropTypes.oneOf(['expand', 'flyDown']),
32
+ isHtmlContent: PropTypes.bool,
33
+ scroll: PropTypes.oneOf(['horizontal', 'vertical', 'both']),
34
+ onEsc: PropTypes.oneOf(['close', 'cancel']),
35
+ renderAlertIcon: PropTypes.func
36
+ };
@@ -6,48 +6,37 @@ import { propTypes } from '../../../avatar/AvatarClose/props/propTypes';
6
6
  import Avatar from '@zohodesk/components/es/v1/Avatar/Avatar';
7
7
  import { Icon } from '@zohodesk/icons';
8
8
  import style from '../../../avatar/AvatarClose/AvatarClose.module.css';
9
- export default class AvatarClose extends React.Component {
10
- constructor(props) {
11
- super(props);
12
- }
13
-
14
- render() {
15
- let {
16
- title,
17
- src,
18
- name,
19
- size,
20
- isClose,
21
- onClick,
22
- customProps,
23
- dataSelectorId
24
- } = this.props;
25
- let {
26
- AvatarCloseProps = {},
27
- AvatarProps = {}
28
- } = customProps;
29
- return /*#__PURE__*/React.createElement("div", _extends({
30
- className: style.container,
31
- "data-selector-id": dataSelectorId
32
- }, AvatarCloseProps), /*#__PURE__*/React.createElement(Avatar, _extends({
33
- src: src,
34
- name: name,
35
- title: title,
36
- size: size
37
- }, AvatarProps)), isClose && /*#__PURE__*/React.createElement("span", {
38
- className: style.pop,
39
- onClick: onClick
40
- }, /*#__PURE__*/React.createElement("span", {
41
- className: style.icon
42
- }, /*#__PURE__*/React.createElement(Icon, {
43
- name: "ZD-plus"
44
- }))));
45
- }
46
-
9
+ export default function AvatarClose(props) {
10
+ let {
11
+ title,
12
+ src,
13
+ name,
14
+ size,
15
+ isClose,
16
+ onClick,
17
+ customProps,
18
+ dataSelectorId
19
+ } = props;
20
+ let {
21
+ AvatarCloseProps = {},
22
+ AvatarProps = {}
23
+ } = customProps;
24
+ return /*#__PURE__*/React.createElement("div", _extends({
25
+ className: style.container,
26
+ "data-selector-id": dataSelectorId
27
+ }, AvatarCloseProps), /*#__PURE__*/React.createElement(Avatar, _extends({
28
+ src: src,
29
+ name: name,
30
+ title: title,
31
+ size: size
32
+ }, AvatarProps)), isClose && /*#__PURE__*/React.createElement("span", {
33
+ className: style.pop,
34
+ onClick: onClick
35
+ }, /*#__PURE__*/React.createElement("span", {
36
+ className: style.icon
37
+ }, /*#__PURE__*/React.createElement(Icon, {
38
+ name: "ZD-plus"
39
+ }))));
47
40
  }
48
41
  AvatarClose.propTypes = propTypes;
49
- AvatarClose.defaultProps = defaultProps; // if (__DOCS__) {
50
- // AvatarClose.docs = {
51
- // componentGroup: 'Avatar Group'
52
- // };
53
- // }
42
+ AvatarClose.defaultProps = defaultProps;
@@ -6,57 +6,46 @@ import { propTypes } from '../../../avatar/AvatarCollision/props/propTypes';
6
6
  import Avatar from '@zohodesk/components/es/v1/Avatar/Avatar';
7
7
  import { Icon } from '@zohodesk/icons';
8
8
  import style from '../../../avatar/AvatarCollision/AvatarCollision.module.css';
9
- export default class AvatarCollision extends React.Component {
10
- constructor(props) {
11
- super(props);
12
- }
13
-
14
- render() {
15
- let {
16
- title,
17
- src,
18
- name,
19
- size,
20
- onClick,
21
- needCreateChat,
22
- isLeft,
23
- isIdle,
24
- initial,
25
- customProps,
26
- dataSelectorId
27
- } = this.props;
28
- let {
29
- AvatarCollisionProps = {},
30
- AvatarProps = {}
31
- } = customProps;
32
- return /*#__PURE__*/React.createElement("div", _extends({
33
- className: `${style.container} ${isLeft ? style.off : isIdle ? style.idle : style.on}`,
34
- onClick: onClick,
35
- "data-id": "collsionPop",
36
- "data-test-id": "collsionPop",
37
- "data-title": title,
38
- "data-selector-id": dataSelectorId
39
- }, AvatarCollisionProps), /*#__PURE__*/React.createElement(Avatar, _extends({
40
- src: src,
41
- name: name,
42
- size: size,
43
- palette: "default",
44
- needTitle: false,
45
- initial: initial
46
- }, AvatarProps)), needCreateChat && !isLeft && /*#__PURE__*/React.createElement("span", {
47
- className: style.pop,
48
- "data-title": title
49
- }, /*#__PURE__*/React.createElement("span", {
50
- className: style.icon
51
- }, /*#__PURE__*/React.createElement(Icon, {
52
- name: "ZD-livechat3"
53
- }))));
54
- }
55
-
9
+ export default function AvatarCollision(props) {
10
+ let {
11
+ title,
12
+ src,
13
+ name,
14
+ size,
15
+ onClick,
16
+ needCreateChat,
17
+ isLeft,
18
+ isIdle,
19
+ initial,
20
+ customProps,
21
+ dataSelectorId
22
+ } = props;
23
+ let {
24
+ AvatarCollisionProps = {},
25
+ AvatarProps = {}
26
+ } = customProps;
27
+ return /*#__PURE__*/React.createElement("div", _extends({
28
+ className: `${style.container} ${isLeft ? style.off : isIdle ? style.idle : style.on}`,
29
+ onClick: onClick,
30
+ "data-id": "collsionPop",
31
+ "data-test-id": "collsionPop",
32
+ "data-title": title,
33
+ "data-selector-id": dataSelectorId
34
+ }, AvatarCollisionProps), /*#__PURE__*/React.createElement(Avatar, _extends({
35
+ src: src,
36
+ name: name,
37
+ size: size,
38
+ palette: "default",
39
+ needTitle: false,
40
+ initial: initial
41
+ }, AvatarProps)), needCreateChat && !isLeft && /*#__PURE__*/React.createElement("span", {
42
+ className: style.pop,
43
+ "data-title": title
44
+ }, /*#__PURE__*/React.createElement("span", {
45
+ className: style.icon
46
+ }, /*#__PURE__*/React.createElement(Icon, {
47
+ name: "ZD-livechat3"
48
+ }))));
56
49
  }
57
50
  AvatarCollision.propTypes = propTypes;
58
- AvatarCollision.defaultProps = defaultProps; // if (__DOCS__) {
59
- // AvatarCollision.docs = {
60
- // componentGroup: 'Avatar Group'
61
- // };
62
- // }
51
+ AvatarCollision.defaultProps = defaultProps;
@@ -7,48 +7,43 @@ import { Icon } from '@zohodesk/icons';
7
7
  import { Container } from '@zohodesk/components/es/v1/Layout';
8
8
  import AvatarSize from '@zohodesk/components/es/v1/Provider/AvatarSize';
9
9
  import style from '../../../avatar/AvatarIcon/AvatarIcon.module.css';
10
- export default class AvatarIcon extends React.Component {
11
- render() {
12
- let {
13
- name,
14
- size,
15
- iconSize,
16
- iconClass,
17
- iconColor,
18
- onClick,
19
- palette,
20
- dataId,
21
- className,
22
- isIconBold,
23
- title,
24
- borderOnActive,
25
- borderOnHover,
26
- customProps,
27
- dataSelectorId
28
- } = this.props;
29
- let {
30
- AvatarIconProps = {}
31
- } = customProps;
32
- let border = borderOnHover || onClick;
33
- return /*#__PURE__*/React.createElement(Container, _extends({
34
- className: `${style.container} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} ${AvatarSize(size)} ${style[palette]} ${className}`,
35
- onClick: onClick,
36
- dataId: dataId,
37
- "data-title": title,
38
- isInline: true,
39
- align: "both",
40
- isCover: false,
41
- dataSelectorId: dataSelectorId
42
- }, AvatarIconProps), /*#__PURE__*/React.createElement(Icon, {
43
- name: name,
44
- size: iconSize,
45
- iconClass: ` ${iconClass} ${style.iconColor} ${iconColor ? ` ${style[`icon_${iconColor}`]}` : ''} `,
46
- isBold: isIconBold
47
- }));
48
- }
49
-
10
+ export default function AvatarIcon(props) {
11
+ let {
12
+ name,
13
+ size,
14
+ iconSize,
15
+ iconClass,
16
+ iconColor,
17
+ onClick,
18
+ palette,
19
+ dataId,
20
+ className,
21
+ isIconBold,
22
+ title,
23
+ borderOnActive,
24
+ borderOnHover,
25
+ customProps,
26
+ dataSelectorId
27
+ } = props;
28
+ let {
29
+ AvatarIconProps = {}
30
+ } = customProps;
31
+ let border = borderOnHover || onClick;
32
+ return /*#__PURE__*/React.createElement(Container, _extends({
33
+ className: `${style.container} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} ${AvatarSize(size)} ${style[palette]} ${className}`,
34
+ onClick: onClick,
35
+ dataId: dataId,
36
+ "data-title": title,
37
+ isInline: true,
38
+ align: "both",
39
+ isCover: false,
40
+ dataSelectorId: dataSelectorId
41
+ }, AvatarIconProps), /*#__PURE__*/React.createElement(Icon, {
42
+ name: name,
43
+ size: iconSize,
44
+ iconClass: ` ${iconClass} ${style.iconColor} ${iconColor ? ` ${style[`icon_${iconColor}`]}` : ''} `,
45
+ isBold: isIconBold
46
+ }));
50
47
  }
51
48
  AvatarIcon.defaultProps = defaultProps;
52
- AvatarIcon.propTypes = propTypes; // if (__DOCS__) {
53
- // AvatarIcon.docs = { componentGroup: 'Avatar Group' };
54
- // }
49
+ AvatarIcon.propTypes = propTypes;