@zohodesk/dot 1.3.0 → 1.3.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.
Files changed (164) hide show
  1. package/.cli/PropLessFiles.html +1 -1
  2. package/.cli/PropValidationExcludeFilesArray.js +1 -1
  3. package/.cli/propValidation_report.html +1 -1
  4. package/README.md +21 -12
  5. package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +163 -553
  6. package/assets/Appearance/dark/themes/blue/blue_DotTheme_DarkTheme.module.css +3 -12
  7. package/assets/Appearance/dark/themes/green/green_DotTheme_DarkTheme.module.css +3 -12
  8. package/assets/Appearance/dark/themes/orange/orange_DotTheme_DarkTheme.module.css +3 -12
  9. package/assets/Appearance/dark/themes/red/red_DotTheme_DarkTheme.module.css +3 -12
  10. package/assets/Appearance/dark/themes/yellow/yellow_DotTheme_DarkTheme.module.css +3 -12
  11. package/assets/Appearance/light/mode/Dot_LightMode.module.css +163 -553
  12. package/assets/Appearance/light/themes/blue/blue_DotTheme_LightTheme.module.css +3 -12
  13. package/assets/Appearance/light/themes/green/green_DotTheme_LightTheme.module.css +3 -12
  14. package/assets/Appearance/light/themes/orange/orange_DotTheme_LightTheme.module.css +3 -12
  15. package/assets/Appearance/light/themes/red/red_DotTheme_LightTheme.module.css +3 -12
  16. package/assets/Appearance/light/themes/yellow/yellow_DotTheme_LightTheme.module.css +3 -12
  17. package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +163 -553
  18. package/assets/Appearance/pureDark/themes/blue/blue_DotTheme_PureDarkTheme.module.css +3 -12
  19. package/assets/Appearance/pureDark/themes/green/green_DotTheme_PureDarkTheme.module.css +3 -12
  20. package/assets/Appearance/pureDark/themes/orange/orange_DotTheme_PureDarkTheme.module.css +3 -12
  21. package/assets/Appearance/pureDark/themes/red/red_DotTheme_PureDarkTheme.module.css +3 -12
  22. package/assets/Appearance/pureDark/themes/yellow/yellow_DotTheme_PureDarkTheme.module.css +3 -12
  23. package/coverage/ExternalLink/ExternalLink.js.html +1 -1
  24. package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
  25. package/coverage/ExternalLink/index.html +1 -1
  26. package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
  27. package/coverage/ExternalLink/props/index.html +1 -1
  28. package/coverage/ExternalLink/props/propTypes.js.html +1 -1
  29. package/coverage/IconButton/IconButton.js.html +466 -0
  30. package/coverage/IconButton/IconButton.module.css.html +151 -0
  31. package/coverage/IconButton/index.html +131 -0
  32. package/coverage/IconButton/props/defaultProps.js.html +136 -0
  33. package/coverage/IconButton/props/index.html +131 -0
  34. package/coverage/IconButton/props/propTypes.js.html +187 -0
  35. package/coverage/Image/Image.js.html +1 -1
  36. package/coverage/Image/Image.module.css.html +1 -1
  37. package/coverage/Image/index.html +1 -1
  38. package/coverage/Image/props/defaultProps.js.html +1 -1
  39. package/coverage/Image/props/index.html +1 -1
  40. package/coverage/Image/props/propTypes.js.html +1 -1
  41. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
  42. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
  43. package/coverage/avatar/AvatarWithTeam/index.html +1 -1
  44. package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
  45. package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
  46. package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
  47. package/coverage/coverage-final.json +4 -0
  48. package/coverage/coverage-summary.json +5 -1
  49. package/coverage/index.html +40 -10
  50. package/es/IconButton/__tests__/IconButton.spec.js +148 -0
  51. package/es/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +316 -0
  52. package/es/form/fields/FieldContainer/props/propTypes.js +1 -1
  53. package/es/v1/ActionButton/ActionButton.js +2 -2
  54. package/es/v1/AlphabeticList/AlphabeticList.js +6 -2
  55. package/es/v1/Attachment/Attachment.js +78 -75
  56. package/es/v1/AttachmentViewer/AttachmentImage.js +44 -63
  57. package/es/v1/Image/Image.js +26 -33
  58. package/es/v1/Loader/Loader.js +12 -18
  59. package/es/v1/Message/Message.js +16 -42
  60. package/es/v1/PlusIcon/PlusIcon.js +25 -37
  61. package/es/v1/Separator/Separator.js +40 -47
  62. package/es/v1/Upload/Upload.js +59 -66
  63. package/es/v1/alert/AlertHeader/AlertHeader.js +5 -4
  64. package/es/v1/alert/AlertHeader/props/defaultProps.js +12 -0
  65. package/es/v1/alert/AlertHeader/props/propTypes.js +20 -0
  66. package/es/v1/alert/AlertLookup/AlertLookup.js +6 -4
  67. package/es/v1/alert/AlertLookup/props/defaultProps.js +13 -0
  68. package/es/v1/alert/AlertLookup/props/propTypes.js +36 -0
  69. package/es/v1/avatar/AvatarClose/AvatarClose.js +32 -43
  70. package/es/v1/avatar/AvatarCollision/AvatarCollision.js +41 -52
  71. package/es/v1/avatar/AvatarIcon/AvatarIcon.js +38 -43
  72. package/es/v1/avatar/AvatarStatus/AvatarStatus.js +52 -63
  73. package/es/v1/avatar/AvatarThread/AvatarThread.js +62 -69
  74. package/es/v1/avatar/AvatarUser/AvatarUser.js +93 -100
  75. package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +81 -88
  76. package/es/v1/form/fields/CheckBoxField/CheckBoxField.js +6 -6
  77. package/es/v1/form/fields/CurrencyField/CurrencyField.js +6 -6
  78. package/es/v1/form/fields/DateField/DateField.js +6 -6
  79. package/es/v1/form/fields/FieldContainer/FieldContainer.js +6 -6
  80. package/es/v1/form/fields/MultiSelectField/MultiSelectField.js +6 -6
  81. package/es/v1/form/fields/PhoneField/PhoneField.js +6 -6
  82. package/es/v1/form/fields/RadioField/RadioField.js +89 -97
  83. package/es/v1/form/fields/SelectField/SelectField.js +139 -154
  84. package/es/v1/layout/SetupDetailLayout/SetupDetailLayout.js +154 -197
  85. package/es/v1/layout/SubtabLayout/SubtabLayout.js +108 -124
  86. package/es/v1/list/SecondaryText/AccountName.js +61 -69
  87. package/es/v1/list/SecondaryText/ContactName.js +66 -74
  88. package/es/v1/list/SecondaryText/DepartmentText.js +15 -27
  89. package/es/v1/list/SecondaryText/Email.js +32 -40
  90. package/es/v1/list/SecondaryText/HappinessRating.js +17 -25
  91. package/es/v1/list/SecondaryText/PhoneNumber.js +36 -44
  92. package/es/v1/list/SecondaryText/PriorityText.js +16 -28
  93. package/es/v1/list/SecondaryText/SecondaryText.js +21 -33
  94. package/es/v1/list/SecondaryText/StatusText.js +17 -29
  95. package/es/v1/list/SecondaryText/TicketId.js +33 -45
  96. package/es/v1/list/SecondaryText/Website.js +22 -30
  97. package/es/v1/list/SecondryPanel/SecondryPanel.js +66 -83
  98. package/es/v1/list/SentimentStatus/SentimentStatus.js +18 -29
  99. package/es/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
  100. package/es/v1/list/status/StatusListItem/StatusListItem.js +75 -100
  101. package/es/v1/lookup/EmptyPage/EmptyPage.js +15 -26
  102. package/es/v1/lookup/Section/Section.js +14 -20
  103. package/es/v1/svg/PlusIcon.js +20 -27
  104. package/es/v1/svg/SnippetIcon.js +22 -29
  105. package/es/v1/svg/TemplateIcon.js +23 -30
  106. package/lib/IconButton/__tests__/IconButton.spec.js +156 -0
  107. package/lib/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +316 -0
  108. package/lib/form/fields/FieldContainer/props/propTypes.js +1 -1
  109. package/lib/v1/ActionButton/ActionButton.js +2 -2
  110. package/lib/v1/AlphabeticList/AlphabeticList.js +7 -3
  111. package/lib/v1/Attachment/Attachment.js +77 -112
  112. package/lib/v1/AttachmentViewer/AttachmentImage.js +61 -96
  113. package/lib/v1/Image/Image.js +26 -71
  114. package/lib/v1/Loader/Loader.js +12 -55
  115. package/lib/v1/Message/Message.js +23 -80
  116. package/lib/v1/PlusIcon/PlusIcon.js +25 -71
  117. package/lib/v1/Separator/Separator.js +44 -85
  118. package/lib/v1/Upload/Upload.js +58 -103
  119. package/lib/v1/alert/AlertHeader/AlertHeader.js +5 -4
  120. package/lib/v1/alert/AlertHeader/props/defaultProps.js +19 -0
  121. package/lib/v1/alert/AlertHeader/props/propTypes.js +31 -0
  122. package/lib/v1/alert/AlertLookup/AlertLookup.js +6 -4
  123. package/lib/v1/alert/AlertLookup/props/defaultProps.js +20 -0
  124. package/lib/v1/alert/AlertLookup/props/propTypes.js +47 -0
  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/form/fields/CheckBoxField/CheckBoxField.js +6 -6
  133. package/lib/v1/form/fields/CurrencyField/CurrencyField.js +6 -6
  134. package/lib/v1/form/fields/DateField/DateField.js +6 -6
  135. package/lib/v1/form/fields/FieldContainer/FieldContainer.js +6 -6
  136. package/lib/v1/form/fields/MultiSelectField/MultiSelectField.js +6 -6
  137. package/lib/v1/form/fields/PhoneField/PhoneField.js +6 -6
  138. package/lib/v1/form/fields/RadioField/RadioField.js +91 -137
  139. package/lib/v1/form/fields/SelectField/SelectField.js +149 -200
  140. package/lib/v1/layout/SetupDetailLayout/SetupDetailLayout.js +160 -253
  141. package/lib/v1/layout/SubtabLayout/SubtabLayout.js +107 -206
  142. package/lib/v1/list/SecondaryText/AccountName.js +63 -113
  143. package/lib/v1/list/SecondaryText/ContactName.js +67 -117
  144. package/lib/v1/list/SecondaryText/DepartmentText.js +16 -66
  145. package/lib/v1/list/SecondaryText/Email.js +32 -82
  146. package/lib/v1/list/SecondaryText/HappinessRating.js +21 -68
  147. package/lib/v1/list/SecondaryText/PhoneNumber.js +36 -86
  148. package/lib/v1/list/SecondaryText/PriorityText.js +16 -66
  149. package/lib/v1/list/SecondaryText/SecondaryText.js +19 -69
  150. package/lib/v1/list/SecondaryText/StatusText.js +17 -67
  151. package/lib/v1/list/SecondaryText/TicketId.js +33 -83
  152. package/lib/v1/list/SecondaryText/Website.js +29 -72
  153. package/lib/v1/list/SecondryPanel/SecondryPanel.js +69 -168
  154. package/lib/v1/list/SentimentStatus/SentimentStatus.js +19 -64
  155. package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
  156. package/lib/v1/list/status/StatusListItem/StatusListItem.js +81 -137
  157. package/lib/v1/lookup/EmptyPage/EmptyPage.js +43 -93
  158. package/lib/v1/lookup/Section/Section.js +14 -58
  159. package/lib/v1/svg/PlusIcon.js +20 -65
  160. package/lib/v1/svg/SnippetIcon.js +22 -67
  161. package/lib/v1/svg/TemplateIcon.js +23 -68
  162. package/package.json +12 -12
  163. package/result.json +1 -1
  164. package/unittest/index.html +1 -1
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
- exports["default"] = void 0;
6
+ exports["default"] = AvatarCollision;
9
7
 
10
8
  var _react = _interopRequireDefault(require("react"));
11
9
 
@@ -23,88 +21,45 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
23
21
 
24
22
  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); }
25
23
 
26
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
27
-
28
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
29
-
30
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
31
-
32
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
33
-
34
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
-
36
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
37
-
38
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
39
-
40
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
24
+ function AvatarCollision(props) {
25
+ var title = props.title,
26
+ src = props.src,
27
+ name = props.name,
28
+ size = props.size,
29
+ onClick = props.onClick,
30
+ needCreateChat = props.needCreateChat,
31
+ isLeft = props.isLeft,
32
+ isIdle = props.isIdle,
33
+ initial = props.initial,
34
+ customProps = props.customProps,
35
+ dataSelectorId = props.dataSelectorId;
36
+ var _customProps$AvatarCo = customProps.AvatarCollisionProps,
37
+ AvatarCollisionProps = _customProps$AvatarCo === void 0 ? {} : _customProps$AvatarCo,
38
+ _customProps$AvatarPr = customProps.AvatarProps,
39
+ AvatarProps = _customProps$AvatarPr === void 0 ? {} : _customProps$AvatarPr;
40
+ return /*#__PURE__*/_react["default"].createElement("div", _extends({
41
+ className: "".concat(_AvatarCollisionModule["default"].container, " ").concat(isLeft ? _AvatarCollisionModule["default"].off : isIdle ? _AvatarCollisionModule["default"].idle : _AvatarCollisionModule["default"].on),
42
+ onClick: onClick,
43
+ "data-id": "collsionPop",
44
+ "data-test-id": "collsionPop",
45
+ "data-title": title,
46
+ "data-selector-id": dataSelectorId
47
+ }, AvatarCollisionProps), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], _extends({
48
+ src: src,
49
+ name: name,
50
+ size: size,
51
+ palette: "default",
52
+ needTitle: false,
53
+ initial: initial
54
+ }, AvatarProps)), needCreateChat && !isLeft && /*#__PURE__*/_react["default"].createElement("span", {
55
+ className: _AvatarCollisionModule["default"].pop,
56
+ "data-title": title
57
+ }, /*#__PURE__*/_react["default"].createElement("span", {
58
+ className: _AvatarCollisionModule["default"].icon
59
+ }, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
60
+ name: "ZD-livechat3"
61
+ }))));
62
+ }
41
63
 
42
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
43
-
44
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
45
-
46
- var AvatarCollision = /*#__PURE__*/function (_React$Component) {
47
- _inherits(AvatarCollision, _React$Component);
48
-
49
- var _super = _createSuper(AvatarCollision);
50
-
51
- function AvatarCollision(props) {
52
- _classCallCheck(this, AvatarCollision);
53
-
54
- return _super.call(this, props);
55
- }
56
-
57
- _createClass(AvatarCollision, [{
58
- key: "render",
59
- value: function render() {
60
- var _this$props = this.props,
61
- title = _this$props.title,
62
- src = _this$props.src,
63
- name = _this$props.name,
64
- size = _this$props.size,
65
- onClick = _this$props.onClick,
66
- needCreateChat = _this$props.needCreateChat,
67
- isLeft = _this$props.isLeft,
68
- isIdle = _this$props.isIdle,
69
- initial = _this$props.initial,
70
- customProps = _this$props.customProps,
71
- dataSelectorId = _this$props.dataSelectorId;
72
- var _customProps$AvatarCo = customProps.AvatarCollisionProps,
73
- AvatarCollisionProps = _customProps$AvatarCo === void 0 ? {} : _customProps$AvatarCo,
74
- _customProps$AvatarPr = customProps.AvatarProps,
75
- AvatarProps = _customProps$AvatarPr === void 0 ? {} : _customProps$AvatarPr;
76
- return /*#__PURE__*/_react["default"].createElement("div", _extends({
77
- className: "".concat(_AvatarCollisionModule["default"].container, " ").concat(isLeft ? _AvatarCollisionModule["default"].off : isIdle ? _AvatarCollisionModule["default"].idle : _AvatarCollisionModule["default"].on),
78
- onClick: onClick,
79
- "data-id": "collsionPop",
80
- "data-test-id": "collsionPop",
81
- "data-title": title,
82
- "data-selector-id": dataSelectorId
83
- }, AvatarCollisionProps), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], _extends({
84
- src: src,
85
- name: name,
86
- size: size,
87
- palette: "default",
88
- needTitle: false,
89
- initial: initial
90
- }, AvatarProps)), needCreateChat && !isLeft && /*#__PURE__*/_react["default"].createElement("span", {
91
- className: _AvatarCollisionModule["default"].pop,
92
- "data-title": title
93
- }, /*#__PURE__*/_react["default"].createElement("span", {
94
- className: _AvatarCollisionModule["default"].icon
95
- }, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
96
- name: "ZD-livechat3"
97
- }))));
98
- }
99
- }]);
100
-
101
- return AvatarCollision;
102
- }(_react["default"].Component);
103
-
104
- exports["default"] = AvatarCollision;
105
64
  AvatarCollision.propTypes = _propTypes.propTypes;
106
- AvatarCollision.defaultProps = _defaultProps.defaultProps; // if (__DOCS__) {
107
- // AvatarCollision.docs = {
108
- // componentGroup: 'Avatar Group'
109
- // };
110
- // }
65
+ AvatarCollision.defaultProps = _defaultProps.defaultProps;
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
- exports["default"] = void 0;
6
+ exports["default"] = AvatarIcon;
9
7
 
10
8
  var _react = _interopRequireDefault(require("react"));
11
9
 
@@ -25,82 +23,41 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
25
23
 
26
24
  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); }
27
25
 
28
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
29
-
30
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
31
-
32
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
33
-
34
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
35
-
36
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
37
-
38
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
39
-
40
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
41
-
42
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
26
+ function AvatarIcon(props) {
27
+ var name = props.name,
28
+ size = props.size,
29
+ iconSize = props.iconSize,
30
+ iconClass = props.iconClass,
31
+ iconColor = props.iconColor,
32
+ onClick = props.onClick,
33
+ palette = props.palette,
34
+ dataId = props.dataId,
35
+ className = props.className,
36
+ isIconBold = props.isIconBold,
37
+ title = props.title,
38
+ borderOnActive = props.borderOnActive,
39
+ borderOnHover = props.borderOnHover,
40
+ customProps = props.customProps,
41
+ dataSelectorId = props.dataSelectorId;
42
+ var _customProps$AvatarIc = customProps.AvatarIconProps,
43
+ AvatarIconProps = _customProps$AvatarIc === void 0 ? {} : _customProps$AvatarIc;
44
+ var border = borderOnHover || onClick;
45
+ return /*#__PURE__*/_react["default"].createElement(_Layout.Container, _extends({
46
+ className: "".concat(_AvatarIconModule["default"].container, " ").concat(borderOnActive ? _AvatarIconModule["default"].borderOnActive : border ? _AvatarIconModule["default"].borderOnHover : '', " ").concat((0, _AvatarSize["default"])(size), " ").concat(_AvatarIconModule["default"][palette], " ").concat(className),
47
+ onClick: onClick,
48
+ dataId: dataId,
49
+ "data-title": title,
50
+ isInline: true,
51
+ align: "both",
52
+ isCover: false,
53
+ dataSelectorId: dataSelectorId
54
+ }, AvatarIconProps), /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
55
+ name: name,
56
+ size: iconSize,
57
+ iconClass: " ".concat(iconClass, " ").concat(_AvatarIconModule["default"].iconColor, " ").concat(iconColor ? " ".concat(_AvatarIconModule["default"]["icon_".concat(iconColor)]) : '', " "),
58
+ isBold: isIconBold
59
+ }));
60
+ }
43
61
 
44
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
45
-
46
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
47
-
48
- var AvatarIcon = /*#__PURE__*/function (_React$Component) {
49
- _inherits(AvatarIcon, _React$Component);
50
-
51
- var _super = _createSuper(AvatarIcon);
52
-
53
- function AvatarIcon() {
54
- _classCallCheck(this, AvatarIcon);
55
-
56
- return _super.apply(this, arguments);
57
- }
58
-
59
- _createClass(AvatarIcon, [{
60
- key: "render",
61
- value: function render() {
62
- var _this$props = this.props,
63
- name = _this$props.name,
64
- size = _this$props.size,
65
- iconSize = _this$props.iconSize,
66
- iconClass = _this$props.iconClass,
67
- iconColor = _this$props.iconColor,
68
- onClick = _this$props.onClick,
69
- palette = _this$props.palette,
70
- dataId = _this$props.dataId,
71
- className = _this$props.className,
72
- isIconBold = _this$props.isIconBold,
73
- title = _this$props.title,
74
- borderOnActive = _this$props.borderOnActive,
75
- borderOnHover = _this$props.borderOnHover,
76
- customProps = _this$props.customProps,
77
- dataSelectorId = _this$props.dataSelectorId;
78
- var _customProps$AvatarIc = customProps.AvatarIconProps,
79
- AvatarIconProps = _customProps$AvatarIc === void 0 ? {} : _customProps$AvatarIc;
80
- var border = borderOnHover || onClick;
81
- return /*#__PURE__*/_react["default"].createElement(_Layout.Container, _extends({
82
- className: "".concat(_AvatarIconModule["default"].container, " ").concat(borderOnActive ? _AvatarIconModule["default"].borderOnActive : border ? _AvatarIconModule["default"].borderOnHover : '', " ").concat((0, _AvatarSize["default"])(size), " ").concat(_AvatarIconModule["default"][palette], " ").concat(className),
83
- onClick: onClick,
84
- dataId: dataId,
85
- "data-title": title,
86
- isInline: true,
87
- align: "both",
88
- isCover: false,
89
- dataSelectorId: dataSelectorId
90
- }, AvatarIconProps), /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
91
- name: name,
92
- size: iconSize,
93
- iconClass: " ".concat(iconClass, " ").concat(_AvatarIconModule["default"].iconColor, " ").concat(iconColor ? " ".concat(_AvatarIconModule["default"]["icon_".concat(iconColor)]) : '', " "),
94
- isBold: isIconBold
95
- }));
96
- }
97
- }]);
98
-
99
- return AvatarIcon;
100
- }(_react["default"].Component);
101
-
102
- exports["default"] = AvatarIcon;
103
62
  AvatarIcon.defaultProps = _defaultProps.defaultProps;
104
- AvatarIcon.propTypes = _propTypes.propTypes; // if (__DOCS__) {
105
- // AvatarIcon.docs = { componentGroup: 'Avatar Group' };
106
- // }
63
+ AvatarIcon.propTypes = _propTypes.propTypes;
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
- exports["default"] = void 0;
6
+ exports["default"] = AvatarStatus;
9
7
 
10
8
  var _react = _interopRequireDefault(require("react"));
11
9
 
@@ -21,99 +19,56 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
21
19
 
22
20
  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); }
23
21
 
24
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
25
-
26
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
27
-
28
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
29
-
30
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
-
32
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
-
34
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
35
-
36
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
37
-
38
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
22
+ function AvatarStatus(props) {
23
+ var src = props.src,
24
+ name = props.name,
25
+ size = props.size,
26
+ onClick = props.onClick,
27
+ title = props.title,
28
+ state = props.state,
29
+ dataId = props.dataId,
30
+ initial = props.initial,
31
+ shape = props.shape,
32
+ needTitle = props.needTitle,
33
+ className = props.className,
34
+ needBorder = props.needBorder,
35
+ palette = props.palette,
36
+ textPalette = props.textPalette,
37
+ customTextClass = props.customTextClass,
38
+ statusTitle = props.statusTitle,
39
+ customProps = props.customProps,
40
+ dataSelectorId = props.dataSelectorId,
41
+ needDefaultBorder = props.needDefaultBorder;
42
+ var _customProps$AvatarSt = customProps.AvatarStatusProps,
43
+ AvatarStatusProps = _customProps$AvatarSt === void 0 ? {} : _customProps$AvatarSt,
44
+ _customProps$AvatarPr = customProps.AvatarProps,
45
+ AvatarProps = _customProps$AvatarPr === void 0 ? {} : _customProps$AvatarPr;
46
+ return /*#__PURE__*/_react["default"].createElement("div", _extends({
47
+ className: "".concat(_AvatarStatusModule["default"].container, " ").concat(className, " ")
48
+ }, AvatarStatusProps, {
49
+ tabIndex: "0",
50
+ "aria-label": "".concat(title, ", ").concat(name, ", ").concat(statusTitle),
51
+ "data-selector-id": dataSelectorId
52
+ }), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], _extends({
53
+ src: src,
54
+ name: name,
55
+ palette: palette,
56
+ textPalette: textPalette,
57
+ customClass: customTextClass,
58
+ title: title,
59
+ onClick: onClick,
60
+ size: size,
61
+ dataId: dataId,
62
+ initial: initial,
63
+ shape: shape,
64
+ needTitle: needTitle,
65
+ needDefaultBorder: needDefaultBorder,
66
+ needBorder: needBorder
67
+ }, AvatarProps)), /*#__PURE__*/_react["default"].createElement("span", {
68
+ "data-title": statusTitle,
69
+ className: "".concat(_AvatarStatusModule["default"].state, " ").concat(_AvatarStatusModule["default"][state], " ").concat(_AvatarStatusModule["default"][size], " ").concat(_AvatarStatusModule["default"][shape])
70
+ }));
71
+ }
39
72
 
40
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
41
-
42
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
43
-
44
- var AvatarStatus = /*#__PURE__*/function (_React$Component) {
45
- _inherits(AvatarStatus, _React$Component);
46
-
47
- var _super = _createSuper(AvatarStatus);
48
-
49
- function AvatarStatus(props) {
50
- _classCallCheck(this, AvatarStatus);
51
-
52
- return _super.call(this, props);
53
- }
54
-
55
- _createClass(AvatarStatus, [{
56
- key: "render",
57
- value: function render() {
58
- var _this$props = this.props,
59
- src = _this$props.src,
60
- name = _this$props.name,
61
- size = _this$props.size,
62
- onClick = _this$props.onClick,
63
- title = _this$props.title,
64
- state = _this$props.state,
65
- dataId = _this$props.dataId,
66
- initial = _this$props.initial,
67
- shape = _this$props.shape,
68
- needTitle = _this$props.needTitle,
69
- className = _this$props.className,
70
- needBorder = _this$props.needBorder,
71
- palette = _this$props.palette,
72
- textPalette = _this$props.textPalette,
73
- customTextClass = _this$props.customTextClass,
74
- statusTitle = _this$props.statusTitle,
75
- customProps = _this$props.customProps,
76
- dataSelectorId = _this$props.dataSelectorId,
77
- needDefaultBorder = _this$props.needDefaultBorder;
78
- var _customProps$AvatarSt = customProps.AvatarStatusProps,
79
- AvatarStatusProps = _customProps$AvatarSt === void 0 ? {} : _customProps$AvatarSt,
80
- _customProps$AvatarPr = customProps.AvatarProps,
81
- AvatarProps = _customProps$AvatarPr === void 0 ? {} : _customProps$AvatarPr;
82
- return /*#__PURE__*/_react["default"].createElement("div", _extends({
83
- className: "".concat(_AvatarStatusModule["default"].container, " ").concat(className, " ")
84
- }, AvatarStatusProps, {
85
- tabIndex: "0",
86
- "aria-label": "".concat(title, ", ").concat(name, ", ").concat(statusTitle),
87
- "data-selector-id": dataSelectorId
88
- }), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], _extends({
89
- src: src,
90
- name: name,
91
- palette: palette,
92
- textPalette: textPalette,
93
- customClass: customTextClass,
94
- title: title,
95
- onClick: onClick,
96
- size: size,
97
- dataId: dataId,
98
- initial: initial,
99
- shape: shape,
100
- needTitle: needTitle,
101
- needDefaultBorder: needDefaultBorder,
102
- needBorder: needBorder
103
- }, AvatarProps)), /*#__PURE__*/_react["default"].createElement("span", {
104
- "data-title": statusTitle,
105
- className: "".concat(_AvatarStatusModule["default"].state, " ").concat(_AvatarStatusModule["default"][state], " ").concat(_AvatarStatusModule["default"][size], " ").concat(_AvatarStatusModule["default"][shape])
106
- }));
107
- }
108
- }]);
109
-
110
- return AvatarStatus;
111
- }(_react["default"].Component);
112
-
113
- exports["default"] = AvatarStatus;
114
73
  AvatarStatus.defaultProps = _defaultProps.defaultProps;
115
- AvatarStatus.propTypes = _propTypes.propTypes; // if (__DOCS__) {
116
- // AvatarStatus.docs = {
117
- // componentGroup: 'Avatar Group'
118
- // };
119
- // }
74
+ AvatarStatus.propTypes = _propTypes.propTypes;
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
- exports["default"] = void 0;
6
+ exports["default"] = AvatarThread;
9
7
 
10
8
  var _react = _interopRequireDefault(require("react"));
11
9
 
@@ -23,108 +21,65 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
23
21
 
24
22
  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); }
25
23
 
26
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
27
-
28
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
29
-
30
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
31
-
32
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
33
-
34
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
-
36
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
37
-
38
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
39
-
40
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
24
+ function AvatarThread(props) {
25
+ var src = props.src,
26
+ name = props.name,
27
+ size = props.size,
28
+ iconColor = props.iconColor,
29
+ iconName = props.iconName,
30
+ iconSize = props.iconSize,
31
+ borderPalette = props.borderPalette,
32
+ onClick = props.onClick,
33
+ title = props.title,
34
+ iconTitle = props.iconTitle,
35
+ onIconClick = props.onIconClick,
36
+ showOnHover = props.showOnHover,
37
+ dataId = props.dataId,
38
+ initial = props.initial,
39
+ needBorder = props.needBorder,
40
+ needBackground = props.needBackground,
41
+ palette = props.palette,
42
+ textPalette = props.textPalette,
43
+ customTextClass = props.customTextClass,
44
+ needTitle = props.needTitle,
45
+ customProps = props.customProps,
46
+ iconClass = props.iconClass,
47
+ getCustomThread = props.getCustomThread,
48
+ dataSelectorId = props.dataSelectorId;
49
+ var _customProps$AvatarTh = customProps.AvatarThreadProps,
50
+ AvatarThreadProps = _customProps$AvatarTh === void 0 ? {} : _customProps$AvatarTh,
51
+ _customProps$AvatarPr = customProps.AvatarProps,
52
+ AvatarProps = _customProps$AvatarPr === void 0 ? {} : _customProps$AvatarPr;
53
+ var hoverEffect = showOnHover ? _AvatarThreadModule["default"].hover : '';
54
+ return /*#__PURE__*/_react["default"].createElement("div", _extends({
55
+ className: "".concat(_AvatarThreadModule["default"].container, " ").concat(onClick ? _AvatarThreadModule["default"].pointer : '', " ").concat(hoverEffect),
56
+ "data-selector-id": dataSelectorId
57
+ }, AvatarThreadProps), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], _extends({
58
+ initial: initial,
59
+ src: src,
60
+ name: name,
61
+ title: title,
62
+ size: size,
63
+ onClick: onClick,
64
+ dataId: dataId,
65
+ palette: palette,
66
+ textPalette: textPalette,
67
+ customClass: customTextClass,
68
+ needTitle: needTitle
69
+ }, AvatarProps)), (iconName || getCustomThread) && /*#__PURE__*/_react["default"].createElement("span", {
70
+ className: "".concat(_AvatarThreadModule["default"].thread, " ").concat(onIconClick ? _AvatarThreadModule["default"].pointer : _AvatarThreadModule["default"].defaultCursor, " ").concat(needBackground ? _AvatarThreadModule["default"].threadBg : '', " ").concat(_AvatarThreadModule["default"]["thread_".concat(size, "_pos")], " ").concat(needBorder ? _AvatarThreadModule["default"]["border_".concat(borderPalette)] : ''),
71
+ "data-title": iconTitle,
72
+ "data-id": iconTitle === 'Remove Follower' && 'removeFollower',
73
+ "data-test-id": iconTitle === 'Remove Follower' && 'removeFollower',
74
+ onClick: onIconClick
75
+ }, iconName && /*#__PURE__*/_react["default"].createElement("span", {
76
+ className: _AvatarThreadModule["default"].icon
77
+ }, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
78
+ name: iconName,
79
+ size: iconSize,
80
+ iconClass: "".concat(iconClass, "\n ").concat(_AvatarThreadModule["default"]["text_".concat(iconColor)] ? _AvatarThreadModule["default"]["text_".concat(iconColor)] : iconColor)
81
+ })), getCustomThread && getCustomThread()));
82
+ }
41
83
 
42
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
43
-
44
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
45
-
46
- var AvatarThread = /*#__PURE__*/function (_React$Component) {
47
- _inherits(AvatarThread, _React$Component);
48
-
49
- var _super = _createSuper(AvatarThread);
50
-
51
- function AvatarThread() {
52
- _classCallCheck(this, AvatarThread);
53
-
54
- return _super.apply(this, arguments);
55
- }
56
-
57
- _createClass(AvatarThread, [{
58
- key: "render",
59
- value: function render() {
60
- var _this$props = this.props,
61
- src = _this$props.src,
62
- name = _this$props.name,
63
- size = _this$props.size,
64
- iconColor = _this$props.iconColor,
65
- iconName = _this$props.iconName,
66
- iconSize = _this$props.iconSize,
67
- borderPalette = _this$props.borderPalette,
68
- onClick = _this$props.onClick,
69
- title = _this$props.title,
70
- iconTitle = _this$props.iconTitle,
71
- onIconClick = _this$props.onIconClick,
72
- showOnHover = _this$props.showOnHover,
73
- dataId = _this$props.dataId,
74
- initial = _this$props.initial,
75
- needBorder = _this$props.needBorder,
76
- needBackground = _this$props.needBackground,
77
- palette = _this$props.palette,
78
- textPalette = _this$props.textPalette,
79
- customTextClass = _this$props.customTextClass,
80
- needTitle = _this$props.needTitle,
81
- customProps = _this$props.customProps,
82
- iconClass = _this$props.iconClass,
83
- getCustomThread = _this$props.getCustomThread,
84
- dataSelectorId = _this$props.dataSelectorId;
85
- var _customProps$AvatarTh = customProps.AvatarThreadProps,
86
- AvatarThreadProps = _customProps$AvatarTh === void 0 ? {} : _customProps$AvatarTh,
87
- _customProps$AvatarPr = customProps.AvatarProps,
88
- AvatarProps = _customProps$AvatarPr === void 0 ? {} : _customProps$AvatarPr;
89
- var hoverEffect = showOnHover ? _AvatarThreadModule["default"].hover : '';
90
- return /*#__PURE__*/_react["default"].createElement("div", _extends({
91
- className: "".concat(_AvatarThreadModule["default"].container, " ").concat(onClick ? _AvatarThreadModule["default"].pointer : '', " ").concat(hoverEffect),
92
- "data-selector-id": dataSelectorId
93
- }, AvatarThreadProps), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], _extends({
94
- initial: initial,
95
- src: src,
96
- name: name,
97
- title: title,
98
- size: size,
99
- onClick: onClick,
100
- dataId: dataId,
101
- palette: palette,
102
- textPalette: textPalette,
103
- customClass: customTextClass,
104
- needTitle: needTitle
105
- }, AvatarProps)), (iconName || getCustomThread) && /*#__PURE__*/_react["default"].createElement("span", {
106
- className: "".concat(_AvatarThreadModule["default"].thread, " ").concat(onIconClick ? _AvatarThreadModule["default"].pointer : _AvatarThreadModule["default"].defaultCursor, " ").concat(needBackground ? _AvatarThreadModule["default"].threadBg : '', " ").concat(_AvatarThreadModule["default"]["thread_".concat(size, "_pos")], " ").concat(needBorder ? _AvatarThreadModule["default"]["border_".concat(borderPalette)] : ''),
107
- "data-title": iconTitle,
108
- "data-id": iconTitle === 'Remove Follower' && 'removeFollower',
109
- "data-test-id": iconTitle === 'Remove Follower' && 'removeFollower',
110
- onClick: onIconClick
111
- }, iconName && /*#__PURE__*/_react["default"].createElement("span", {
112
- className: _AvatarThreadModule["default"].icon
113
- }, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
114
- name: iconName,
115
- size: iconSize,
116
- iconClass: "".concat(iconClass, "\n ").concat(_AvatarThreadModule["default"]["text_".concat(iconColor)] ? _AvatarThreadModule["default"]["text_".concat(iconColor)] : iconColor)
117
- })), getCustomThread && getCustomThread()));
118
- }
119
- }]);
120
-
121
- return AvatarThread;
122
- }(_react["default"].Component);
123
-
124
- exports["default"] = AvatarThread;
125
84
  AvatarThread.defaultProps = _defaultProps.defaultProps;
126
- AvatarThread.propTypes = _propTypes.propTypes; // if (__DOCS__) {
127
- // AvatarThread.docs = {
128
- // componentGroup: 'Avatar Group'
129
- // };
130
- // }
85
+ AvatarThread.propTypes = _propTypes.propTypes;