@zohodesk/dot 1.0.0-temp-159 → 1.0.0-temp-160

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 (158) hide show
  1. package/.cli/PropLessFiles.html +1 -1
  2. package/.cli/propValidation_report.html +1 -1
  3. package/README.md +3 -2
  4. package/assets/Appearance/dark/themes/blue/blue_DotTheme_DarkTheme.module.css +1 -1
  5. package/assets/Appearance/dark/themes/green/green_DotTheme_DarkTheme.module.css +1 -1
  6. package/assets/Appearance/dark/themes/orange/orange_DotTheme_DarkTheme.module.css +1 -1
  7. package/assets/Appearance/dark/themes/red/red_DotTheme_DarkTheme.module.css +1 -1
  8. package/assets/Appearance/dark/themes/yellow/yellow_DotTheme_DarkTheme.module.css +1 -1
  9. package/assets/Appearance/light/themes/blue/blue_DotTheme_LightTheme.module.css +1 -1
  10. package/assets/Appearance/light/themes/green/green_DotTheme_LightTheme.module.css +1 -1
  11. package/assets/Appearance/light/themes/orange/orange_DotTheme_LightTheme.module.css +1 -1
  12. package/assets/Appearance/light/themes/red/red_DotTheme_LightTheme.module.css +1 -1
  13. package/assets/Appearance/light/themes/yellow/yellow_DotTheme_LightTheme.module.css +1 -1
  14. package/assets/Appearance/pureDark/themes/blue/blue_DotTheme_PureDarkTheme.module.css +1 -1
  15. package/assets/Appearance/pureDark/themes/green/green_DotTheme_PureDarkTheme.module.css +1 -1
  16. package/assets/Appearance/pureDark/themes/orange/orange_DotTheme_PureDarkTheme.module.css +1 -1
  17. package/assets/Appearance/pureDark/themes/red/red_DotTheme_PureDarkTheme.module.css +1 -1
  18. package/assets/Appearance/pureDark/themes/yellow/yellow_DotTheme_PureDarkTheme.module.css +1 -1
  19. package/coverage/ExternalLink/ExternalLink.js.html +1 -1
  20. package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
  21. package/coverage/ExternalLink/index.html +1 -1
  22. package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
  23. package/coverage/ExternalLink/props/index.html +1 -1
  24. package/coverage/ExternalLink/props/propTypes.js.html +1 -1
  25. package/coverage/IconButton/IconButton.js.html +7 -7
  26. package/coverage/IconButton/IconButton.module.css.html +1 -1
  27. package/coverage/IconButton/index.html +11 -11
  28. package/coverage/IconButton/props/defaultProps.js.html +1 -1
  29. package/coverage/IconButton/props/index.html +1 -1
  30. package/coverage/IconButton/props/propTypes.js.html +1 -1
  31. package/coverage/Image/Image.js.html +1 -1
  32. package/coverage/Image/Image.module.css.html +1 -1
  33. package/coverage/Image/index.html +1 -1
  34. package/coverage/Image/props/defaultProps.js.html +1 -1
  35. package/coverage/Image/props/index.html +1 -1
  36. package/coverage/Image/props/propTypes.js.html +1 -1
  37. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
  38. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
  39. package/coverage/avatar/AvatarWithTeam/index.html +1 -1
  40. package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
  41. package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
  42. package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
  43. package/coverage/coverage-final.json +16 -16
  44. package/coverage/coverage-summary.json +17 -17
  45. package/coverage/index.html +11 -11
  46. package/es/Attachment/Attachment.module.css +2 -2
  47. package/es/AttachmentViewer/AttachmentViewer.module.css +1 -1
  48. package/es/Drawer/Drawer.js +1 -1
  49. package/es/IconButton/IconButton.js +2 -2
  50. package/es/ImportantNotes/ImportantNotes.module.css +1 -1
  51. package/es/ToastMessage/ToastMessage.module.css +2 -2
  52. package/es/Upload/Upload.module.css +1 -1
  53. package/es/alert/AlertLookup/AlertLookup.module.css +1 -1
  54. package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +1 -1
  55. package/es/errorstate/EmptyStates.module.css +3 -3
  56. package/es/errorstate/PermissionPlay/PermissionPlay.module.css +1 -1
  57. package/es/form/fields/Fields.module.css +2 -2
  58. package/es/layout/SetupDetailLayout/SetupDetailLayout.module.css +4 -4
  59. package/es/list/status/StatusDropdown/StatusDropdown.js +1 -2
  60. package/es/list/status/StatusListItem/StatusListItem.js +1 -1
  61. package/es/list/status/StatusListItem/StatusListItem.module.css +1 -1
  62. package/es/lookup/Lookup/Lookup.js +1 -1
  63. package/es/lookup/header/Close/LookupClose.module.css +1 -1
  64. package/es/lookup/header/ViewDropDown/ViewDropDown.module.css +1 -1
  65. package/es/setup/helptips/Description/HelpTipsDescription.module.css +1 -1
  66. package/es/v1/Image/Image.js +26 -33
  67. package/es/v1/Message/Message.js +16 -42
  68. package/es/v1/PlusIcon/PlusIcon.js +25 -37
  69. package/es/v1/Separator/Separator.js +40 -47
  70. package/es/v1/avatar/AvatarClose/AvatarClose.js +32 -43
  71. package/es/v1/avatar/AvatarCollision/AvatarCollision.js +41 -52
  72. package/es/v1/avatar/AvatarIcon/AvatarIcon.js +38 -43
  73. package/es/v1/avatar/AvatarStatus/AvatarStatus.js +52 -63
  74. package/es/v1/avatar/AvatarThread/AvatarThread.js +62 -69
  75. package/es/v1/avatar/AvatarUser/AvatarUser.js +93 -100
  76. package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +81 -88
  77. package/es/v1/layout/SetupDetailLayout/SetupDetailLayout.js +154 -197
  78. package/es/v1/layout/SubtabLayout/SubtabLayout.js +108 -124
  79. package/es/v1/list/SecondaryText/AccountName.js +61 -69
  80. package/es/v1/list/SecondaryText/ContactName.js +66 -74
  81. package/es/v1/list/SecondaryText/DepartmentText.js +15 -27
  82. package/es/v1/list/SecondaryText/Email.js +32 -40
  83. package/es/v1/list/SecondaryText/HappinessRating.js +17 -25
  84. package/es/v1/list/SecondaryText/PhoneNumber.js +36 -44
  85. package/es/v1/list/SecondaryText/PriorityText.js +16 -28
  86. package/es/v1/list/SecondaryText/SecondaryText.js +21 -33
  87. package/es/v1/list/SecondaryText/StatusText.js +17 -29
  88. package/es/v1/list/SecondaryText/TicketId.js +33 -45
  89. package/es/v1/list/SecondaryText/Website.js +22 -30
  90. package/es/v1/list/SecondryPanel/SecondryPanel.js +66 -83
  91. package/es/v1/list/SentimentStatus/SentimentStatus.js +18 -29
  92. package/es/v1/list/status/StatusListItem/StatusListItem.js +75 -100
  93. package/es/v1/lookup/EmptyPage/EmptyPage.js +15 -26
  94. package/es/v1/lookup/Section/Section.js +14 -20
  95. package/es/version2/GlobalNotification/GlobalNotification.module.css +1 -1
  96. package/es/version2/errorstate/V2_ErrorStates.module.css +1 -1
  97. package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +1 -1
  98. package/es/version2/lookup/AlertLookup/AlertLookupNew.module.css +1 -1
  99. package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +2 -2
  100. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +4 -4
  101. package/lib/Attachment/Attachment.module.css +2 -2
  102. package/lib/AttachmentViewer/AttachmentViewer.module.css +1 -1
  103. package/lib/Drawer/Drawer.js +1 -1
  104. package/lib/IconButton/IconButton.js +2 -2
  105. package/lib/ImportantNotes/ImportantNotes.module.css +1 -1
  106. package/lib/ToastMessage/ToastMessage.module.css +2 -2
  107. package/lib/Upload/Upload.module.css +1 -1
  108. package/lib/alert/AlertLookup/AlertLookup.module.css +1 -1
  109. package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +1 -1
  110. package/lib/errorstate/EmptyStates.module.css +3 -3
  111. package/lib/errorstate/PermissionPlay/PermissionPlay.module.css +1 -1
  112. package/lib/form/fields/Fields.module.css +2 -2
  113. package/lib/layout/SetupDetailLayout/SetupDetailLayout.module.css +4 -4
  114. package/lib/list/status/StatusDropdown/StatusDropdown.js +1 -2
  115. package/lib/list/status/StatusListItem/StatusListItem.js +1 -1
  116. package/lib/list/status/StatusListItem/StatusListItem.module.css +1 -1
  117. package/lib/lookup/Lookup/Lookup.js +1 -1
  118. package/lib/lookup/header/Close/LookupClose.module.css +1 -1
  119. package/lib/lookup/header/ViewDropDown/ViewDropDown.module.css +1 -1
  120. package/lib/setup/helptips/Description/HelpTipsDescription.module.css +1 -1
  121. package/lib/v1/Image/Image.js +26 -71
  122. package/lib/v1/Message/Message.js +23 -80
  123. package/lib/v1/PlusIcon/PlusIcon.js +25 -71
  124. package/lib/v1/Separator/Separator.js +44 -85
  125. package/lib/v1/avatar/AvatarClose/AvatarClose.js +32 -77
  126. package/lib/v1/avatar/AvatarCollision/AvatarCollision.js +41 -86
  127. package/lib/v1/avatar/AvatarIcon/AvatarIcon.js +37 -80
  128. package/lib/v1/avatar/AvatarStatus/AvatarStatus.js +52 -97
  129. package/lib/v1/avatar/AvatarThread/AvatarThread.js +61 -106
  130. package/lib/v1/avatar/AvatarUser/AvatarUser.js +95 -140
  131. package/lib/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +85 -130
  132. package/lib/v1/layout/SetupDetailLayout/SetupDetailLayout.js +160 -253
  133. package/lib/v1/layout/SubtabLayout/SubtabLayout.js +107 -206
  134. package/lib/v1/list/SecondaryText/AccountName.js +63 -113
  135. package/lib/v1/list/SecondaryText/ContactName.js +67 -117
  136. package/lib/v1/list/SecondaryText/DepartmentText.js +16 -66
  137. package/lib/v1/list/SecondaryText/Email.js +32 -82
  138. package/lib/v1/list/SecondaryText/HappinessRating.js +21 -68
  139. package/lib/v1/list/SecondaryText/PhoneNumber.js +36 -86
  140. package/lib/v1/list/SecondaryText/PriorityText.js +16 -66
  141. package/lib/v1/list/SecondaryText/SecondaryText.js +19 -69
  142. package/lib/v1/list/SecondaryText/StatusText.js +17 -67
  143. package/lib/v1/list/SecondaryText/TicketId.js +33 -83
  144. package/lib/v1/list/SecondaryText/Website.js +29 -72
  145. package/lib/v1/list/SecondryPanel/SecondryPanel.js +69 -168
  146. package/lib/v1/list/SentimentStatus/SentimentStatus.js +19 -64
  147. package/lib/v1/list/status/StatusListItem/StatusListItem.js +81 -137
  148. package/lib/v1/lookup/EmptyPage/EmptyPage.js +43 -93
  149. package/lib/v1/lookup/Section/Section.js +14 -58
  150. package/lib/version2/GlobalNotification/GlobalNotification.module.css +1 -1
  151. package/lib/version2/errorstate/V2_ErrorStates.module.css +1 -1
  152. package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +1 -1
  153. package/lib/version2/lookup/AlertLookup/AlertLookupNew.module.css +1 -1
  154. package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +2 -2
  155. package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +4 -4
  156. package/package.json +7 -7
  157. package/result.json +1 -1
  158. package/unittest/index.html +1 -1
@@ -2,38 +2,31 @@ import React from 'react';
2
2
  import { defaultProps } from '../../Image/props/defaultProps';
3
3
  import { propTypes } from '../../Image/props/propTypes';
4
4
  import style from '../../Image/Image.module.css';
5
- export default class Image extends React.Component {
6
- render() {
7
- let {
8
- alt,
9
- src,
10
- className,
11
- isCover,
12
- title,
13
- onClick,
14
- dataId,
15
- htmlId,
16
- eleRef,
17
- original
18
- } = this.props;
19
- return /*#__PURE__*/React.createElement("img", {
20
- src: src,
21
- alt: alt,
22
- "data-title": title,
23
- "data-id": dataId,
24
- "data-test-id": dataId,
25
- className: ` ${className} ${isCover ? style.imgFullSize : style.imgMaxFullSize} `,
26
- onClick: onClick,
27
- id: htmlId,
28
- ref: eleRef,
29
- "data-original": original
30
- });
31
- }
32
-
5
+ export default function Image(props) {
6
+ let {
7
+ alt,
8
+ src,
9
+ className,
10
+ isCover,
11
+ title,
12
+ onClick,
13
+ dataId,
14
+ htmlId,
15
+ eleRef,
16
+ original
17
+ } = props;
18
+ return /*#__PURE__*/React.createElement("img", {
19
+ src: src,
20
+ alt: alt,
21
+ "data-title": title,
22
+ "data-id": dataId,
23
+ "data-test-id": dataId,
24
+ className: ` ${className} ${isCover ? style.imgFullSize : style.imgMaxFullSize} `,
25
+ onClick: onClick,
26
+ id: htmlId,
27
+ ref: eleRef,
28
+ "data-original": original
29
+ });
33
30
  }
34
31
  Image.propTypes = propTypes;
35
- Image.defaultProps = defaultProps; // if (__DOCS__) {
36
- // Image.docs = {
37
- // componentGroup: 'Atom'
38
- // };
39
- // }
32
+ Image.defaultProps = defaultProps;
@@ -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;
@@ -3,58 +3,51 @@ import { Container, Box } from '@zohodesk/components/es/v1/Layout';
3
3
  import { defaultProps } from '../../Separator/props/defaultProps';
4
4
  import { propTypes } from '../../Separator/props/propTypes';
5
5
  import style from '../../Separator/Separator.module.css';
6
- export default class Separator extends React.Component {
7
- constructor(props) {
8
- super(props);
9
- }
10
-
11
- render() {
12
- const {
13
- children,
14
- type,
15
- customSeparatorType,
16
- palette,
17
- wrap,
18
- shrink,
19
- aligndirection,
20
- customClass
21
- } = this.props;
22
- const {
23
- customWrapper,
24
- customSeparator,
25
- customChildren
26
- } = customClass;
27
- const data = children.filter(el => el !== null && el !== undefined && el !== false);
28
- return /*#__PURE__*/React.createElement(Container, {
29
- alignBox: aligndirection,
30
- align: aligndirection === 'row' ? 'vertical' : '',
31
- wrap: wrap,
32
- isCover: false,
33
- className: `${style.varClass} ${customWrapper}`
34
- }, data.map((child, i) => {
35
- if (child) {
36
- if (data.length - 1 == i || aligndirection == 'column') {
37
- return child && /*#__PURE__*/React.createElement(Box, {
38
- shrink: shrink,
39
- key: i,
40
- className: customChildren
41
- }, child);
42
- }
43
-
44
- return child && /*#__PURE__*/React.createElement(React.Fragment, {
45
- key: i
46
- }, /*#__PURE__*/React.createElement(Box, {
6
+ export default function Separator(props) {
7
+ const {
8
+ children,
9
+ type,
10
+ customSeparatorType,
11
+ palette,
12
+ wrap,
13
+ shrink,
14
+ aligndirection,
15
+ customClass
16
+ } = props;
17
+ const {
18
+ customWrapper,
19
+ customSeparator,
20
+ customChildren
21
+ } = customClass;
22
+ const data = children.filter(el => el !== null && el !== undefined && el !== false);
23
+ return /*#__PURE__*/React.createElement(Container, {
24
+ alignBox: aligndirection,
25
+ align: aligndirection === 'row' ? 'vertical' : '',
26
+ wrap: wrap,
27
+ isCover: false,
28
+ className: `${style.varClass} ${customWrapper}`
29
+ }, data.map((child, i) => {
30
+ if (child) {
31
+ if (data.length - 1 == i || aligndirection == 'column') {
32
+ return child && /*#__PURE__*/React.createElement(Box, {
47
33
  shrink: shrink,
48
34
  key: i,
49
35
  className: customChildren
50
- }, child), /*#__PURE__*/React.createElement(Box, {
51
- className: `${style.separator} ${style[palette]} ${customSeparatorType ? '' : style[type]} ${customSeparator} `,
52
- key: i
53
- }, customSeparatorType ? customSeparatorType : type == 'slash' ? '/' : type == 'arrow' ? '>' : type == 'comma' ? ',' : '\u2022'));
36
+ }, child);
54
37
  }
55
- }));
56
- }
57
38
 
39
+ return child && /*#__PURE__*/React.createElement(React.Fragment, {
40
+ key: i
41
+ }, /*#__PURE__*/React.createElement(Box, {
42
+ shrink: shrink,
43
+ key: i,
44
+ className: customChildren
45
+ }, child), /*#__PURE__*/React.createElement(Box, {
46
+ className: `${style.separator} ${style[palette]} ${customSeparatorType ? '' : style[type]} ${customSeparator} `,
47
+ key: i
48
+ }, customSeparatorType ? customSeparatorType : type == 'slash' ? '/' : type == 'arrow' ? '>' : type == 'comma' ? ',' : '\u2022'));
49
+ }
50
+ }));
58
51
  }
59
52
  Separator.defaultProps = defaultProps;
60
53
  Separator.propTypes = propTypes;
@@ -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;