@zohodesk/dot 1.3.0-temp-158 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cli/PropLessFiles.html +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/README.md +3 -1
- package/coverage/ExternalLink/ExternalLink.js.html +1 -1
- package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
- package/coverage/ExternalLink/index.html +1 -1
- package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
- package/coverage/ExternalLink/props/index.html +1 -1
- package/coverage/ExternalLink/props/propTypes.js.html +1 -1
- package/coverage/IconButton/IconButton.js.html +1 -1
- package/coverage/IconButton/IconButton.module.css.html +1 -1
- package/coverage/IconButton/index.html +1 -1
- package/coverage/IconButton/props/defaultProps.js.html +1 -1
- package/coverage/IconButton/props/index.html +1 -1
- package/coverage/IconButton/props/propTypes.js.html +1 -1
- package/coverage/Image/Image.js.html +1 -1
- package/coverage/Image/Image.module.css.html +1 -1
- package/coverage/Image/index.html +1 -1
- package/coverage/Image/props/defaultProps.js.html +1 -1
- package/coverage/Image/props/index.html +1 -1
- package/coverage/Image/props/propTypes.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
- package/coverage/avatar/AvatarWithTeam/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
- package/coverage/coverage-final.json +16 -16
- package/coverage/coverage-summary.json +16 -16
- package/coverage/index.html +1 -1
- package/es/v1/ActionButton/ActionButton.js +2 -2
- package/es/v1/Message/Message.js +16 -42
- package/es/v1/PlusIcon/PlusIcon.js +25 -37
- package/es/v1/alert/AlertHeader/AlertHeader.js +5 -4
- package/es/v1/alert/AlertHeader/props/defaultProps.js +12 -0
- package/es/v1/alert/AlertHeader/props/propTypes.js +20 -0
- package/es/v1/alert/AlertLookup/AlertLookup.js +6 -4
- package/es/v1/alert/AlertLookup/props/defaultProps.js +13 -0
- package/es/v1/alert/AlertLookup/props/propTypes.js +36 -0
- package/es/v1/avatar/AvatarClose/AvatarClose.js +32 -43
- package/es/v1/avatar/AvatarCollision/AvatarCollision.js +41 -52
- package/es/v1/avatar/AvatarIcon/AvatarIcon.js +38 -43
- package/es/v1/avatar/AvatarStatus/AvatarStatus.js +52 -63
- package/es/v1/avatar/AvatarThread/AvatarThread.js +62 -69
- package/es/v1/avatar/AvatarUser/AvatarUser.js +93 -100
- package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +81 -88
- package/es/v1/list/SecondaryText/AccountName.js +61 -69
- package/es/v1/list/SecondaryText/ContactName.js +66 -74
- package/es/v1/list/SecondaryText/DepartmentText.js +15 -27
- package/es/v1/list/SecondaryText/Email.js +32 -40
- package/es/v1/list/SecondaryText/HappinessRating.js +17 -25
- package/es/v1/list/SecondaryText/PhoneNumber.js +36 -44
- package/es/v1/list/SecondaryText/PriorityText.js +16 -28
- package/es/v1/list/SecondaryText/SecondaryText.js +21 -33
- package/es/v1/list/SecondaryText/StatusText.js +17 -29
- package/es/v1/list/SecondaryText/TicketId.js +33 -45
- package/es/v1/list/SecondaryText/Website.js +22 -30
- package/es/v1/list/SecondryPanel/SecondryPanel.js +66 -83
- package/es/v1/list/SentimentStatus/SentimentStatus.js +18 -29
- package/es/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
- package/lib/v1/ActionButton/ActionButton.js +2 -2
- package/lib/v1/Message/Message.js +23 -80
- package/lib/v1/PlusIcon/PlusIcon.js +25 -71
- package/lib/v1/alert/AlertHeader/AlertHeader.js +5 -4
- package/lib/v1/alert/AlertHeader/props/defaultProps.js +19 -0
- package/lib/v1/alert/AlertHeader/props/propTypes.js +31 -0
- package/lib/v1/alert/AlertLookup/AlertLookup.js +6 -4
- package/lib/v1/alert/AlertLookup/props/defaultProps.js +20 -0
- package/lib/v1/alert/AlertLookup/props/propTypes.js +47 -0
- package/lib/v1/avatar/AvatarClose/AvatarClose.js +32 -77
- package/lib/v1/avatar/AvatarCollision/AvatarCollision.js +41 -86
- package/lib/v1/avatar/AvatarIcon/AvatarIcon.js +37 -80
- package/lib/v1/avatar/AvatarStatus/AvatarStatus.js +52 -97
- package/lib/v1/avatar/AvatarThread/AvatarThread.js +61 -106
- package/lib/v1/avatar/AvatarUser/AvatarUser.js +95 -140
- package/lib/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +85 -130
- package/lib/v1/list/SecondaryText/AccountName.js +63 -113
- package/lib/v1/list/SecondaryText/ContactName.js +67 -117
- package/lib/v1/list/SecondaryText/DepartmentText.js +16 -66
- package/lib/v1/list/SecondaryText/Email.js +32 -82
- package/lib/v1/list/SecondaryText/HappinessRating.js +21 -68
- package/lib/v1/list/SecondaryText/PhoneNumber.js +36 -86
- package/lib/v1/list/SecondaryText/PriorityText.js +16 -66
- package/lib/v1/list/SecondaryText/SecondaryText.js +19 -69
- package/lib/v1/list/SecondaryText/StatusText.js +17 -67
- package/lib/v1/list/SecondaryText/TicketId.js +33 -83
- package/lib/v1/list/SecondaryText/Website.js +29 -72
- package/lib/v1/list/SecondryPanel/SecondryPanel.js +69 -168
- package/lib/v1/list/SentimentStatus/SentimentStatus.js +19 -64
- package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
- package/package.json +2 -2
- package/result.json +1 -1
package/es/v1/Message/Message.js
CHANGED
|
@@ -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
|
|
10
|
-
constructor(props) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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;
|
|
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
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
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;
|
|
40
|
-
// PlusIcon.docs = {
|
|
41
|
-
// componentGroup: 'Common',
|
|
42
|
-
// folderName: 'Ticket DetailView'
|
|
43
|
-
// };
|
|
44
|
-
// }
|
|
32
|
+
PlusIcon.propTypes = propTypes;
|
|
@@ -10,8 +10,8 @@ import { mergeStyle } from '@zohodesk/utils'; //customHooks
|
|
|
10
10
|
|
|
11
11
|
import useDragger from '../../../Hooks/Dragger/useDragger'; //Props
|
|
12
12
|
|
|
13
|
-
import defaultProps from '
|
|
14
|
-
import propTypes from '
|
|
13
|
+
import defaultProps from './props/defaultProps';
|
|
14
|
+
import propTypes from './props/propTypes';
|
|
15
15
|
export default function AlertHeader(props) {
|
|
16
16
|
const {
|
|
17
17
|
title,
|
|
@@ -24,7 +24,8 @@ export default function AlertHeader(props) {
|
|
|
24
24
|
type,
|
|
25
25
|
htmlId,
|
|
26
26
|
customStyle,
|
|
27
|
-
dragBoundaryLimit
|
|
27
|
+
dragBoundaryLimit,
|
|
28
|
+
renderAlertIcon
|
|
28
29
|
} = props;
|
|
29
30
|
const finalStyle = mergeStyle(style, customStyle);
|
|
30
31
|
const {
|
|
@@ -51,7 +52,7 @@ export default function AlertHeader(props) {
|
|
|
51
52
|
eleRef: dragRef
|
|
52
53
|
}, needIcon && /*#__PURE__*/React.createElement("div", {
|
|
53
54
|
className: finalStyle.iconContainer
|
|
54
|
-
}, /*#__PURE__*/React.createElement(AlertIcons, {
|
|
55
|
+
}, renderAlertIcon ? renderAlertIcon() : /*#__PURE__*/React.createElement(AlertIcons, {
|
|
55
56
|
type: type
|
|
56
57
|
})), (title || children) && /*#__PURE__*/React.createElement(Box, {
|
|
57
58
|
flexible: true
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export default {
|
|
3
|
+
breakChildren: PropTypes.bool,
|
|
4
|
+
children: PropTypes.node,
|
|
5
|
+
closeTitle: PropTypes.string,
|
|
6
|
+
dataId: PropTypes.string,
|
|
7
|
+
needIcon: PropTypes.bool,
|
|
8
|
+
onClose: PropTypes.func,
|
|
9
|
+
title: PropTypes.string,
|
|
10
|
+
type: PropTypes.oneOf(['success', 'error', 'danger', 'warning', 'info', 'notification']),
|
|
11
|
+
htmlId: PropTypes.string,
|
|
12
|
+
customStyle: PropTypes.object,
|
|
13
|
+
dragBoundaryLimit: PropTypes.shape({
|
|
14
|
+
top: PropTypes.number,
|
|
15
|
+
left: PropTypes.number,
|
|
16
|
+
right: PropTypes.number,
|
|
17
|
+
bottom: PropTypes.number
|
|
18
|
+
}),
|
|
19
|
+
renderAlertIcon: PropTypes.func
|
|
20
|
+
};
|
|
@@ -2,8 +2,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
2
2
|
|
|
3
3
|
/**** Libraries ****/
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { defaultProps } from '
|
|
6
|
-
import { propTypes } from '
|
|
5
|
+
import { defaultProps } from './props/defaultProps';
|
|
6
|
+
import { propTypes } from './props/propTypes';
|
|
7
7
|
/**** Components ****/
|
|
8
8
|
|
|
9
9
|
import { useUniqueId } from '@zohodesk/components/es/v1/Provider/IdProvider';
|
|
@@ -65,7 +65,8 @@ export default function AlertLookup(props) {
|
|
|
65
65
|
isHtmlContent,
|
|
66
66
|
scroll,
|
|
67
67
|
isDefaultFocus,
|
|
68
|
-
onEsc
|
|
68
|
+
onEsc,
|
|
69
|
+
renderAlertIcon
|
|
69
70
|
} = props;
|
|
70
71
|
const {
|
|
71
72
|
LookupProps = {},
|
|
@@ -115,7 +116,8 @@ export default function AlertLookup(props) {
|
|
|
115
116
|
type: type,
|
|
116
117
|
needIcon: needIcon,
|
|
117
118
|
onClose: onClose,
|
|
118
|
-
breakChildren: wrapHeader
|
|
119
|
+
breakChildren: wrapHeader,
|
|
120
|
+
renderAlertIcon: renderAlertIcon
|
|
119
121
|
}, AlertHeaderProps), headerChildren ? headerChildren() : null)), /*#__PURE__*/React.createElement(Box, {
|
|
120
122
|
flexible: true
|
|
121
123
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const defaultProps = {
|
|
2
|
+
isActive: false,
|
|
3
|
+
size: 'small',
|
|
4
|
+
wrapHeader: false,
|
|
5
|
+
dataId: 'alertPopup',
|
|
6
|
+
isDefaultFocus: true,
|
|
7
|
+
customProps: {},
|
|
8
|
+
align: 'top',
|
|
9
|
+
childAnimationName: 'flyDown',
|
|
10
|
+
isHtmlContent: false,
|
|
11
|
+
scroll: '',
|
|
12
|
+
onEsc: 'cancel'
|
|
13
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export const propTypes = {
|
|
3
|
+
cancelText: PropTypes.string,
|
|
4
|
+
children: PropTypes.node,
|
|
5
|
+
confirmationMessage: PropTypes.string,
|
|
6
|
+
customClass: PropTypes.object,
|
|
7
|
+
dataId: PropTypes.string,
|
|
8
|
+
forwardRef: PropTypes.object,
|
|
9
|
+
headerChildren: PropTypes.func,
|
|
10
|
+
isActive: PropTypes.bool,
|
|
11
|
+
isDefaultFocus: PropTypes.bool,
|
|
12
|
+
message: PropTypes.node,
|
|
13
|
+
needIcon: PropTypes.bool,
|
|
14
|
+
onCancelClick: PropTypes.func,
|
|
15
|
+
onClose: PropTypes.func,
|
|
16
|
+
onLookupClick: PropTypes.func,
|
|
17
|
+
onSubmitClick: PropTypes.func,
|
|
18
|
+
size: PropTypes.oneOf(['small', 'xmedium', 'medium']),
|
|
19
|
+
submitText: PropTypes.string,
|
|
20
|
+
title: PropTypes.string,
|
|
21
|
+
type: PropTypes.oneOf(['success', 'error', 'danger', 'warning', 'info', 'notification']),
|
|
22
|
+
wrapHeader: PropTypes.bool,
|
|
23
|
+
a11y: PropTypes.object,
|
|
24
|
+
customProps: PropTypes.shape({
|
|
25
|
+
LookupProps: PropTypes.object,
|
|
26
|
+
AlertHeaderProps: PropTypes.object,
|
|
27
|
+
PrimaryButtonProps: PropTypes.object,
|
|
28
|
+
SecondaryButtonProps: PropTypes.object
|
|
29
|
+
}),
|
|
30
|
+
align: PropTypes.oneOf(['top', 'vertical']),
|
|
31
|
+
childAnimationName: PropTypes.oneOf(['expand', 'flyDown']),
|
|
32
|
+
isHtmlContent: PropTypes.bool,
|
|
33
|
+
scroll: PropTypes.oneOf(['horizontal', 'vertical', 'both']),
|
|
34
|
+
onEsc: PropTypes.oneOf(['close', 'cancel']),
|
|
35
|
+
renderAlertIcon: PropTypes.func
|
|
36
|
+
};
|
|
@@ -6,48 +6,37 @@ import { propTypes } from '../../../avatar/AvatarClose/props/propTypes';
|
|
|
6
6
|
import Avatar from '@zohodesk/components/es/v1/Avatar/Avatar';
|
|
7
7
|
import { Icon } from '@zohodesk/icons';
|
|
8
8
|
import style from '../../../avatar/AvatarClose/AvatarClose.module.css';
|
|
9
|
-
export default
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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;
|
|
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
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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;
|
|
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
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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;
|
|
53
|
-
// AvatarIcon.docs = { componentGroup: 'Avatar Group' };
|
|
54
|
-
// }
|
|
49
|
+
AvatarIcon.propTypes = propTypes;
|