@zohodesk/components 1.2.10 → 1.2.11

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 (63) hide show
  1. package/.cli/PropLessFiles.html +1 -1
  2. package/.cli/PropValidationExcludeFilesArray.js +7 -10
  3. package/.cli/propValidation_report.html +1 -1
  4. package/README.md +6 -0
  5. package/coverage/Button/Button.js.html +1 -1
  6. package/coverage/Button/css/Button.module.css.html +1 -1
  7. package/coverage/Button/css/cssJSLogic.js.html +1 -1
  8. package/coverage/Button/css/index.html +1 -1
  9. package/coverage/Button/index.html +1 -1
  10. package/coverage/Button/props/defaultProps.js.html +1 -1
  11. package/coverage/Button/props/index.html +1 -1
  12. package/coverage/Button/props/propTypes.js.html +1 -1
  13. package/coverage/Buttongroup/Buttongroup.js.html +1 -1
  14. package/coverage/Buttongroup/Buttongroup.module.css.html +1 -1
  15. package/coverage/Buttongroup/index.html +1 -1
  16. package/coverage/Buttongroup/props/defaultProps.js.html +1 -1
  17. package/coverage/Buttongroup/props/index.html +1 -1
  18. package/coverage/Buttongroup/props/propTypes.js.html +1 -1
  19. package/coverage/coverage-final.json +10 -10
  20. package/coverage/coverage-summary.json +10 -10
  21. package/coverage/index.html +1 -1
  22. package/coverage/utils/dummyFunction.js.html +1 -1
  23. package/coverage/utils/index.html +1 -1
  24. package/es/MultiSelect/props/propTypes.js +140 -138
  25. package/es/Select/props/propTypes.js +3 -1
  26. package/es/v1/Accordion/Accordion.js +3 -2
  27. package/es/v1/AppContainer/AppContainer.js +75 -92
  28. package/es/v1/Avatar/Avatar.js +84 -134
  29. package/es/v1/Card/Card.js +143 -177
  30. package/es/v1/MultiSelect/MultiSelect.js +1 -0
  31. package/es/v1/MultiSelect/MultiSelectWithAvatar.js +1 -0
  32. package/es/v1/PopOver/PopOver.js +125 -160
  33. package/es/v1/Popup/Popup.js +1 -1
  34. package/es/v1/Provider/AvatarSize.js +13 -0
  35. package/es/v1/Provider/Config.js +18 -0
  36. package/es/v1/Provider/CssProvider.js +16 -0
  37. package/es/v1/Provider/IdProvider.js +66 -0
  38. package/es/v1/Provider/LibraryContext.js +37 -0
  39. package/es/v1/Provider/LibraryContextInit.js +3 -0
  40. package/es/v1/Provider/NumberGenerator/NumberGenerator.js +136 -0
  41. package/es/v1/Provider/ZindexProvider.js +57 -0
  42. package/es/v1/Provider/index.js +4 -0
  43. package/lib/MultiSelect/props/propTypes.js +146 -141
  44. package/lib/Select/props/propTypes.js +12 -2
  45. package/lib/v1/Accordion/Accordion.js +3 -1
  46. package/lib/v1/AppContainer/AppContainer.js +87 -138
  47. package/lib/v1/Avatar/Avatar.js +130 -186
  48. package/lib/v1/Card/Card.js +190 -286
  49. package/lib/v1/MultiSelect/MultiSelect.js +3 -1
  50. package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +3 -1
  51. package/lib/v1/PopOver/PopOver.js +160 -256
  52. package/lib/v1/Popup/Popup.js +1 -1
  53. package/lib/v1/Provider/AvatarSize.js +24 -0
  54. package/lib/v1/Provider/Config.js +27 -0
  55. package/lib/v1/Provider/CssProvider.js +27 -0
  56. package/lib/v1/Provider/IdProvider.js +79 -0
  57. package/lib/v1/Provider/LibraryContext.js +76 -0
  58. package/lib/v1/Provider/LibraryContextInit.js +15 -0
  59. package/lib/v1/Provider/NumberGenerator/NumberGenerator.js +174 -0
  60. package/lib/v1/Provider/ZindexProvider.js +69 -0
  61. package/lib/v1/Provider/index.js +81 -0
  62. package/package.json +4 -4
  63. package/result.json +1 -1
@@ -171,7 +171,9 @@ export const GroupSelect_propTypes = {
171
171
  dataSelectorId: PropTypes.string,
172
172
  isDefaultSelectValue: PropTypes.bool
173
173
  };
174
- export const SelectWithAvatar_propTypes = {
174
+ export const SelectWithAvatar_propTypes = { ...Select_propTypes,
175
+ textBoxClass: PropTypes.string,
176
+ imageField: PropTypes.string,
175
177
  animationStyle: PropTypes.string,
176
178
  avatarPalette: PropTypes.string,
177
179
  borderColor: PropTypes.oneOf(['transparent', 'default']),
@@ -1,4 +1,5 @@
1
- import React, { useState, useEffect } from 'react';
1
+ import React, { useState } from 'react';
2
+ import { useEffectCallOnlyAfterState } from '@zohodesk/hooks';
2
3
  import { Accordion_defaultProps } from '../../Accordion/props/defaultProps';
3
4
  import { Accordion_propTypes } from '../../Accordion/props/propTypes';
4
5
  export default function Accordion(props) {
@@ -29,7 +30,7 @@ export default function Accordion(props) {
29
30
  !disableInternalState && setSelectedItem(selectedItem);
30
31
  }
31
32
 
32
- useEffect(() => {
33
+ useEffectCallOnlyAfterState(() => {
33
34
  if (!disableInternalState) {
34
35
  setSelectedItem(propSelectedItem);
35
36
  }
@@ -1,6 +1,6 @@
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, { useEffect, useRef, useLayoutEffect } from 'react';
4
4
  import { defaultProps } from '../../AppContainer/props/defaultProps';
5
5
  import { propTypes } from '../../AppContainer/props/propTypes';
6
6
  import { Container, Box } from '../Layout';
@@ -17,116 +17,99 @@ import '../../common/a11y.module.css';
17
17
  import '../../common/boxShadow.module.css';
18
18
  import style from '../../AppContainer/AppContainer.module.css';
19
19
  import { getLibraryConfig, setLibraryConfig } from '../../Provider/Config';
20
- export default class AppContainer extends React.Component {
21
- constructor(props) {
22
- super(props);
23
- this.setTooltipRef = this.setTooltipRef.bind(this);
24
- this.handleOver = this.handleOver.bind(this);
25
- this.mouseOverDispatch = this.mouseOverDispatch.bind(this);
26
- this.removeTimeout = this.removeTimeout.bind(this);
27
- this.getContainerRef = this.getContainerRef.bind(this);
28
- this.timer = null;
29
- this.tooltipDebounce = getLibraryConfig('tooltipDebounce');
20
+ export default function AppContainer(props) {
21
+ let {
22
+ className,
23
+ children,
24
+ tagName,
25
+ dataId,
26
+ dataSelectorId,
27
+ tooltipClass,
28
+ tooltipParentClass,
29
+ needTooltip,
30
+ customProps,
31
+ eleRef
32
+ } = props;
33
+ let {
34
+ ContainerProps = {},
35
+ TooltipProps = {},
36
+ ExtraProps = {}
37
+ } = customProps;
38
+ const tooltipRef = useRef(null);
39
+ const containerElement = useRef(null);
40
+ const timer = useRef(null);
41
+ const tooltipDebounce = useRef(getLibraryConfig('tooltipDebounce'));
42
+ useLayoutEffect(() => {
30
43
  setLibraryConfig({
31
- getTooltipContainer: () => this.containerElement
44
+ getTooltipContainer: () => containerElement.current
32
45
  });
33
- }
46
+ }, []);
34
47
 
35
- mouseOverDispatch(e) {
36
- if (this.tooltipRef) {
37
- this.tooltipRef.handleOver(e, this.containerElement);
48
+ function mouseOverDispatch(e) {
49
+ if (tooltipRef.current) {
50
+ tooltipRef.current.handleOver(e, containerElement.current);
38
51
  }
39
52
  }
40
53
 
41
- removeTimeout() {
42
- if (this.timer) {
43
- this.timer = clearTimeout(this.timer);
54
+ function removeTimeout() {
55
+ if (timer.current) {
56
+ timer.current = clearTimeout(timer.current);
44
57
  }
45
58
  }
46
59
 
47
- handleOver(e) {
48
- if (this.timer) {
49
- this.timer = clearTimeout(this.timer);
60
+ function handleOver(e) {
61
+ if (timer.current) {
62
+ timer.current = clearTimeout(timer.current);
50
63
  }
51
64
 
52
- this.timer = setTimeout(() => this.mouseOverDispatch(e), this.tooltipDebounce);
65
+ timer.current = setTimeout(() => mouseOverDispatch(e), tooltipDebounce.current);
53
66
  }
54
67
 
55
- getContainerRef(ref) {
56
- let {
57
- eleRef
58
- } = this.props;
59
- this.containerElement = ref;
68
+ function getContainerRef(ref) {
69
+ containerElement.current = ref;
60
70
  eleRef && eleRef(ref);
61
71
  }
62
72
 
63
- setTooltipRef(ref) {
64
- this.tooltipRef = ref;
65
- }
66
-
67
- componentDidMount() {
68
- let {
69
- needTooltip
70
- } = this.props;
71
-
72
- if (this.containerElement && needTooltip) {
73
- this.containerElement.addEventListener('mouseover', this.handleOver, false);
74
- this.containerElement.addEventListener('mouseout', this.removeTimeout, false);
75
- this.tooltipRef.observeElement();
76
- }
73
+ function setTooltipRef(ref) {
74
+ tooltipRef.current = ref;
77
75
  }
78
76
 
79
- componentWillUnmount() {
80
- let {
81
- needTooltip
82
- } = this.props;
83
-
84
- if (this.containerElement && needTooltip) {
85
- this.containerElement.removeEventListener('mouseover', this.handleOver, false);
86
- this.containerElement.addEventListener('mouseout', this.removeTimeout, false);
87
- this.tooltipRef.unObserveElement();
88
- setLibraryConfig({
89
- getTooltipContainer: () => null
90
- });
77
+ useEffect(() => {
78
+ if (containerElement.current && needTooltip) {
79
+ containerElement.current.addEventListener('mouseover', handleOver, false);
80
+ containerElement.current.addEventListener('mouseout', removeTimeout, false);
81
+ tooltipRef.current.observeElement();
91
82
  }
92
- }
93
-
94
- render() {
95
- let {
96
- className,
97
- children,
98
- tagName,
99
- dataId,
100
- dataSelectorId,
101
- tooltipClass,
102
- tooltipParentClass,
103
- needTooltip,
104
- customProps
105
- } = this.props;
106
- let {
107
- ContainerProps = {},
108
- TooltipProps = {},
109
- ExtraProps = {}
110
- } = customProps;
111
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container, _extends({
112
- className: `${style.container} ${className}`,
113
- dataId: dataId,
114
- dataSelectorId: dataSelectorId,
115
- tagName: tagName,
116
- eleRef: this.getContainerRef
117
- }, ContainerProps, ExtraProps), /*#__PURE__*/React.createElement(Box, {
118
- flexible: true
119
- }, children)), needTooltip ? /*#__PURE__*/React.createElement("div", _extends({}, ExtraProps, {
120
- className: `${style.container} ${style.tooltip} ${tooltipParentClass}`,
121
- "data-id": `${dataId}_tooltip`,
122
- "data-test-id": `${dataId}_tooltip`,
123
- "data-selector-id": `${dataSelectorId}_tooltip`
124
- }), /*#__PURE__*/React.createElement(Tooltip, _extends({
125
- ref: this.setTooltipRef,
126
- customClass: tooltipClass
127
- }, TooltipProps))) : null);
128
- }
129
-
83
+ }, []);
84
+ useEffect(() => {
85
+ return () => {
86
+ if (containerElement.current && needTooltip) {
87
+ containerElement.current.removeEventListener('mouseover', handleOver, false);
88
+ containerElement.current.addEventListener('mouseout', removeTimeout, false);
89
+ tooltipRef.current.unObserveElement();
90
+ setLibraryConfig({
91
+ getTooltipContainer: () => null
92
+ });
93
+ }
94
+ };
95
+ }, []);
96
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container, _extends({
97
+ className: `${style.container} ${className}`,
98
+ dataId: dataId,
99
+ dataSelectorId: dataSelectorId,
100
+ tagName: tagName,
101
+ eleRef: getContainerRef
102
+ }, ContainerProps, ExtraProps), /*#__PURE__*/React.createElement(Box, {
103
+ flexible: true
104
+ }, children)), needTooltip ? /*#__PURE__*/React.createElement("div", _extends({}, ExtraProps, {
105
+ className: `${style.container} ${style.tooltip} ${tooltipParentClass}`,
106
+ "data-id": `${dataId}_tooltip`,
107
+ "data-test-id": `${dataId}_tooltip`,
108
+ "data-selector-id": `${dataSelectorId}_tooltip`
109
+ }), /*#__PURE__*/React.createElement(Tooltip, _extends({
110
+ ref: setTooltipRef,
111
+ customClass: tooltipClass
112
+ }, TooltipProps))) : null);
130
113
  }
131
114
  AppContainer.propTypes = propTypes;
132
115
  AppContainer.defaultProps = defaultProps; // if (__DOCS__) {
@@ -1,6 +1,7 @@
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 } from 'react';
4
+ import { useEffectCallOnlyAfterState } from '@zohodesk/hooks';
4
5
  import { defaultProps } from '../../Avatar/props/defaultProps';
5
6
  import { propTypes } from '../../Avatar/props/propTypes';
6
7
  import { getInitial } from '../../utils/getInitial';
@@ -13,40 +14,36 @@ import style from '../../Avatar/Avatar.module.css';
13
14
  4. team pass name as lastName and pass pattern via prop
14
15
  */
15
16
 
16
- export default class Avatar extends React.Component {
17
- constructor(props) {
18
- super(props);
19
- this.state = {
20
- isLoaded: false
21
- };
22
- this.putInvalidImageURLJSON = this.putInvalidImageURLJSON.bind(this);
23
- this.putValidImageURLJSON = this.putValidImageURLJSON.bind(this);
24
- this.getInitialByFullName = this.getInitialByFullName.bind(this);
25
- }
26
-
27
- componentDidUpdate(prevProps, prevState) {
28
- let {
29
- src
30
- } = this.props;
31
- let {
32
- isLoaded
33
- } = this.state;
34
-
35
- if (prevProps.src !== src) {
36
- this.setState({
37
- isLoaded: !isLoaded
38
- });
39
- }
40
- }
41
-
42
- putInvalidImageURLJSON() {
43
- const {
44
- src,
45
- alternateSrc
46
- } = this.props;
47
- let {
48
- isLoaded
49
- } = this.state;
17
+ function Avatar(props) {
18
+ let {
19
+ src,
20
+ name,
21
+ size,
22
+ palette,
23
+ onClick,
24
+ title,
25
+ shape,
26
+ needTitle,
27
+ dataId,
28
+ initial,
29
+ needBorder,
30
+ borderOnActive,
31
+ borderOnHover,
32
+ textPalette,
33
+ customClass,
34
+ alternateSrc,
35
+ isAnimate,
36
+ dataSelectorId,
37
+ customProps,
38
+ needInnerBorder,
39
+ needDefaultBorder
40
+ } = props;
41
+ let {
42
+ AvatarProps = {}
43
+ } = customProps;
44
+ const [isLoaded, setLoaded] = useState(false);
45
+
46
+ const putInvalidImageURLJSON = () => {
50
47
  let _validImgArr = [...Avatar.validImageURLs];
51
48
  let _invalidImgArr = [...Avatar.invalidImageURLs]; // if (alternateSrc) {
52
49
  // _validImgArr.push(alternateSrc);
@@ -62,18 +59,10 @@ export default class Avatar extends React.Component {
62
59
 
63
60
  Avatar.invalidImageURLs = _invalidImgArr;
64
61
  Avatar.validImageURLs = _validImgArr;
65
- this.setState({
66
- isLoaded: !isLoaded
67
- });
68
- }
69
-
70
- putValidImageURLJSON() {
71
- const {
72
- src
73
- } = this.props;
74
- let {
75
- isLoaded
76
- } = this.state;
62
+ setLoaded(isLoaded => !isLoaded);
63
+ };
64
+
65
+ const putValidImageURLJSON = () => {
77
66
  const validImgArr = Avatar.validImageURLs;
78
67
  const invalidImgArr = Avatar.invalidImageURLs;
79
68
 
@@ -83,15 +72,13 @@ export default class Avatar extends React.Component {
83
72
  _validImgArr.push(src);
84
73
 
85
74
  Avatar.validImageURLs = _validImgArr;
86
- this.setState({
87
- isLoaded: !isLoaded
88
- });
75
+ setLoaded(isLoaded => !isLoaded);
89
76
  }
90
- }
77
+ };
91
78
  /* this will cause error if user name already have some space need to move firstName lastName user preference pattern*/
92
79
 
93
80
 
94
- getInitialByFullName() {
81
+ const getInitialByFullName = function () {
95
82
  let fullName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
96
83
  fullName = (fullName || '').trim();
97
84
  let nameList = fullName.split(' ');
@@ -101,89 +88,52 @@ export default class Avatar extends React.Component {
101
88
  }
102
89
 
103
90
  return getInitial(nameList[0], nameList[1]);
104
- } // componentDidMount() {
105
- // const { src } = this.props;
106
- // const validImgArr = Avatar.validImageURLs;
107
- // if (validImgArr.indexOf(src) === -1) {
108
- // let _validImgArr = [...validImgArr];
109
- // _validImgArr.push(src);
110
- // }
111
- // }
112
-
113
-
114
- render() {
115
- let {
116
- src,
117
- name,
118
- size,
119
- palette,
120
- onClick,
121
- title,
122
- shape,
123
- needTitle,
124
- dataId,
125
- initial,
126
- needBorder,
127
- borderOnActive,
128
- borderOnHover,
129
- textPalette,
130
- customClass,
131
- alternateSrc,
132
- isAnimate,
133
- dataSelectorId,
134
- customProps,
135
- needInnerBorder,
136
- needDefaultBorder
137
- } = this.props;
138
- let {
139
- AvatarProps = {}
140
- } = customProps;
141
- let textStyle = textPalette ? style[textPalette] : palette === 'secondary' ? style.white : style.black;
142
- let shapeStyle = shape === 'circle' ? 'circle' : `square_${size}`;
143
- initial = initial || this.getInitialByFullName(name);
144
- let isInvalidImageList = Avatar.invalidImageURLs.indexOf(src) !== -1; //let isValidImageList = Avatar.validImageURLs.indexOf(src) !== -1;
145
-
146
- let showAvatar = src && !isInvalidImageList;
147
- let showInitial = !showAvatar || showAvatar && isInvalidImageList;
148
- const showAlternateAvatar = alternateSrc ? showInitial : false;
149
- let border = borderOnHover || onClick;
150
- let showDefaultBorder = src && !isInvalidImageList && needDefaultBorder;
151
- let borderStyle = (showDefaultBorder || !src || !showAvatar || showInitial) && needBorder ? `${style.border} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} ` : '';
152
- borderStyle = showAlternateAvatar ? '' : borderStyle;
153
- return /*#__PURE__*/React.createElement("div", _extends({
154
- className: `${style.avatar} ${style[size]} ${AvatarSize(size)} ${style[shapeStyle]} ${style[palette]} ${textStyle} ${borderStyle} ${customClass ? customClass : ''}`,
155
- "data-title": needTitle ? title ? title : name : null,
156
- "data-id": dataId,
157
- "data-test-id": dataId,
158
- onClick: onClick,
159
- "data-selector-id": dataSelectorId
160
- }, AvatarProps), showInitial && !showAlternateAvatar && /*#__PURE__*/React.createElement("span", {
161
- className: `${style.initial}`,
162
- "data-id": `${dataId}_AvatarInitial`,
163
- "data-test-id": `${dataId}_AvatarInitial`,
164
- "data-selector-id": `${dataSelectorId}_AvatarInitial`
165
- }, initial), (showAvatar || showAlternateAvatar) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("img", {
166
- className: `${style.image} ${isAnimate ? style.animate : ''} ${needInnerBorder ? style.innerBorder : ''}`,
167
- "data-id": `${dataId}_AvatarImg`,
168
- "data-test-id": `${dataId}_AvatarImg`,
169
- "data-selector-id": `${dataSelectorId}_AvatarImg`,
170
- name: name,
171
- onError: this.putInvalidImageURLJSON,
172
- onLoad: this.putValidImageURLJSON,
173
- src: showAlternateAvatar ? alternateSrc : src,
174
- alt: name
175
- }), showDefaultBorder ? null : /*#__PURE__*/React.createElement("span", {
176
- className: `${style.shadow} ${textStyle} `
177
- })));
178
- }
179
-
91
+ };
92
+
93
+ useEffectCallOnlyAfterState(() => {
94
+ setLoaded(isLoaded => !isLoaded);
95
+ }, [src]);
96
+ let textStyle = textPalette ? style[textPalette] : palette === 'secondary' ? style.white : style.black;
97
+ let shapeStyle = shape === 'circle' ? 'circle' : `square_${size}`;
98
+ initial = initial || getInitialByFullName(name);
99
+ let isInvalidImageList = Avatar.invalidImageURLs.indexOf(src) !== -1; //let isValidImageList = Avatar.validImageURLs.indexOf(src) !== -1;
100
+
101
+ let showAvatar = src && !isInvalidImageList;
102
+ let showInitial = !showAvatar || showAvatar && isInvalidImageList;
103
+ const showAlternateAvatar = alternateSrc ? showInitial : false;
104
+ let border = borderOnHover || onClick;
105
+ let showDefaultBorder = src && !isInvalidImageList && needDefaultBorder;
106
+ let borderStyle = (showDefaultBorder || !src || !showAvatar || showInitial) && needBorder ? `${style.border} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} ` : '';
107
+ borderStyle = showAlternateAvatar ? '' : borderStyle;
108
+ return /*#__PURE__*/React.createElement("div", _extends({
109
+ className: `${style.avatar} ${style[size]} ${AvatarSize(size)} ${style[shapeStyle]} ${style[palette]} ${textStyle} ${borderStyle} ${customClass ? customClass : ''}`,
110
+ "data-title": needTitle ? title ? title : name : null,
111
+ "data-id": dataId,
112
+ "data-test-id": dataId,
113
+ onClick: onClick,
114
+ "data-selector-id": dataSelectorId
115
+ }, AvatarProps), showInitial && !showAlternateAvatar && /*#__PURE__*/React.createElement("span", {
116
+ className: `${style.initial}`,
117
+ "data-id": `${dataId}_AvatarInitial`,
118
+ "data-test-id": `${dataId}_AvatarInitial`,
119
+ "data-selector-id": `${dataSelectorId}_AvatarInitial`
120
+ }, initial), (showAvatar || showAlternateAvatar) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("img", {
121
+ className: `${style.image} ${isAnimate ? style.animate : ''} ${needInnerBorder ? style.innerBorder : ''}`,
122
+ "data-id": `${dataId}_AvatarImg`,
123
+ "data-test-id": `${dataId}_AvatarImg`,
124
+ "data-selector-id": `${dataSelectorId}_AvatarImg`,
125
+ name: name,
126
+ onError: putInvalidImageURLJSON,
127
+ onLoad: putValidImageURLJSON,
128
+ src: showAlternateAvatar ? alternateSrc : src,
129
+ alt: name
130
+ }), showDefaultBorder ? null : /*#__PURE__*/React.createElement("span", {
131
+ className: `${style.shadow} ${textStyle} `
132
+ })));
180
133
  }
134
+
135
+ export default Avatar;
181
136
  Avatar.defaultProps = defaultProps;
182
137
  Avatar.propTypes = propTypes;
183
138
  Avatar.invalidImageURLs = [];
184
- Avatar.validImageURLs = []; // if (__DOCS__) {
185
- // Avatar.docs = {
186
- // componentGroup: 'Avatar Group',
187
- // folderName: 'Style Guide'
188
- // };
189
- // }
139
+ Avatar.validImageURLs = [];