@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.
- package/.cli/PropLessFiles.html +1 -1
- package/.cli/PropValidationExcludeFilesArray.js +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/README.md +21 -12
- package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +163 -553
- package/assets/Appearance/dark/themes/blue/blue_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/green/green_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/orange/orange_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/red/red_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/yellow/yellow_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +163 -553
- package/assets/Appearance/light/themes/blue/blue_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/green/green_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/orange/orange_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/red/red_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/yellow/yellow_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +163 -553
- package/assets/Appearance/pureDark/themes/blue/blue_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/green/green_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/orange/orange_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/red/red_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/yellow/yellow_DotTheme_PureDarkTheme.module.css +3 -12
- 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 +466 -0
- package/coverage/IconButton/IconButton.module.css.html +151 -0
- package/coverage/IconButton/index.html +131 -0
- package/coverage/IconButton/props/defaultProps.js.html +136 -0
- package/coverage/IconButton/props/index.html +131 -0
- package/coverage/IconButton/props/propTypes.js.html +187 -0
- 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 +4 -0
- package/coverage/coverage-summary.json +5 -1
- package/coverage/index.html +40 -10
- package/es/IconButton/__tests__/IconButton.spec.js +148 -0
- package/es/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +316 -0
- package/es/form/fields/FieldContainer/props/propTypes.js +1 -1
- package/es/v1/ActionButton/ActionButton.js +2 -2
- package/es/v1/AlphabeticList/AlphabeticList.js +6 -2
- package/es/v1/Attachment/Attachment.js +78 -75
- package/es/v1/AttachmentViewer/AttachmentImage.js +44 -63
- package/es/v1/Image/Image.js +26 -33
- package/es/v1/Loader/Loader.js +12 -18
- package/es/v1/Message/Message.js +16 -42
- package/es/v1/PlusIcon/PlusIcon.js +25 -37
- package/es/v1/Separator/Separator.js +40 -47
- package/es/v1/Upload/Upload.js +59 -66
- 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/form/fields/CheckBoxField/CheckBoxField.js +6 -6
- package/es/v1/form/fields/CurrencyField/CurrencyField.js +6 -6
- package/es/v1/form/fields/DateField/DateField.js +6 -6
- package/es/v1/form/fields/FieldContainer/FieldContainer.js +6 -6
- package/es/v1/form/fields/MultiSelectField/MultiSelectField.js +6 -6
- package/es/v1/form/fields/PhoneField/PhoneField.js +6 -6
- package/es/v1/form/fields/RadioField/RadioField.js +89 -97
- package/es/v1/form/fields/SelectField/SelectField.js +139 -154
- package/es/v1/layout/SetupDetailLayout/SetupDetailLayout.js +154 -197
- package/es/v1/layout/SubtabLayout/SubtabLayout.js +108 -124
- 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/es/v1/list/status/StatusListItem/StatusListItem.js +75 -100
- package/es/v1/lookup/EmptyPage/EmptyPage.js +15 -26
- package/es/v1/lookup/Section/Section.js +14 -20
- package/es/v1/svg/PlusIcon.js +20 -27
- package/es/v1/svg/SnippetIcon.js +22 -29
- package/es/v1/svg/TemplateIcon.js +23 -30
- package/lib/IconButton/__tests__/IconButton.spec.js +156 -0
- package/lib/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +316 -0
- package/lib/form/fields/FieldContainer/props/propTypes.js +1 -1
- package/lib/v1/ActionButton/ActionButton.js +2 -2
- package/lib/v1/AlphabeticList/AlphabeticList.js +7 -3
- package/lib/v1/Attachment/Attachment.js +77 -112
- package/lib/v1/AttachmentViewer/AttachmentImage.js +61 -96
- package/lib/v1/Image/Image.js +26 -71
- package/lib/v1/Loader/Loader.js +12 -55
- package/lib/v1/Message/Message.js +23 -80
- package/lib/v1/PlusIcon/PlusIcon.js +25 -71
- package/lib/v1/Separator/Separator.js +44 -85
- package/lib/v1/Upload/Upload.js +58 -103
- 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/form/fields/CheckBoxField/CheckBoxField.js +6 -6
- package/lib/v1/form/fields/CurrencyField/CurrencyField.js +6 -6
- package/lib/v1/form/fields/DateField/DateField.js +6 -6
- package/lib/v1/form/fields/FieldContainer/FieldContainer.js +6 -6
- package/lib/v1/form/fields/MultiSelectField/MultiSelectField.js +6 -6
- package/lib/v1/form/fields/PhoneField/PhoneField.js +6 -6
- package/lib/v1/form/fields/RadioField/RadioField.js +91 -137
- package/lib/v1/form/fields/SelectField/SelectField.js +149 -200
- package/lib/v1/layout/SetupDetailLayout/SetupDetailLayout.js +160 -253
- package/lib/v1/layout/SubtabLayout/SubtabLayout.js +107 -206
- 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/lib/v1/list/status/StatusListItem/StatusListItem.js +81 -137
- package/lib/v1/lookup/EmptyPage/EmptyPage.js +43 -93
- package/lib/v1/lookup/Section/Section.js +14 -58
- package/lib/v1/svg/PlusIcon.js +20 -65
- package/lib/v1/svg/SnippetIcon.js +22 -67
- package/lib/v1/svg/TemplateIcon.js +23 -68
- package/package.json +12 -12
- package/result.json +1 -1
- package/unittest/index.html +1 -1
|
@@ -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;
|
|
@@ -5,68 +5,57 @@ import { defaultProps } from '../../../avatar/AvatarStatus/props/defaultProps';
|
|
|
5
5
|
import { propTypes } from '../../../avatar/AvatarStatus/props/propTypes';
|
|
6
6
|
import Avatar from '@zohodesk/components/es/v1/Avatar/Avatar';
|
|
7
7
|
import style from '../../../avatar/AvatarStatus/AvatarStatus.module.css';
|
|
8
|
-
export default
|
|
9
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
needBorder: needBorder
|
|
60
|
-
}, AvatarProps)), /*#__PURE__*/React.createElement("span", {
|
|
61
|
-
"data-title": statusTitle,
|
|
62
|
-
className: `${style.state} ${style[state]} ${style[size]} ${style[shape]}`
|
|
63
|
-
}));
|
|
64
|
-
}
|
|
65
|
-
|
|
8
|
+
export default function AvatarStatus(props) {
|
|
9
|
+
let {
|
|
10
|
+
src,
|
|
11
|
+
name,
|
|
12
|
+
size,
|
|
13
|
+
onClick,
|
|
14
|
+
title,
|
|
15
|
+
state,
|
|
16
|
+
dataId,
|
|
17
|
+
initial,
|
|
18
|
+
shape,
|
|
19
|
+
needTitle,
|
|
20
|
+
className,
|
|
21
|
+
needBorder,
|
|
22
|
+
palette,
|
|
23
|
+
textPalette,
|
|
24
|
+
customTextClass,
|
|
25
|
+
statusTitle,
|
|
26
|
+
customProps,
|
|
27
|
+
dataSelectorId,
|
|
28
|
+
needDefaultBorder
|
|
29
|
+
} = props;
|
|
30
|
+
let {
|
|
31
|
+
AvatarStatusProps = {},
|
|
32
|
+
AvatarProps = {}
|
|
33
|
+
} = customProps;
|
|
34
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
35
|
+
className: `${style.container} ${className} `
|
|
36
|
+
}, AvatarStatusProps, {
|
|
37
|
+
tabIndex: "0",
|
|
38
|
+
"aria-label": `${title}, ${name}, ${statusTitle}`,
|
|
39
|
+
"data-selector-id": dataSelectorId
|
|
40
|
+
}), /*#__PURE__*/React.createElement(Avatar, _extends({
|
|
41
|
+
src: src,
|
|
42
|
+
name: name,
|
|
43
|
+
palette: palette,
|
|
44
|
+
textPalette: textPalette,
|
|
45
|
+
customClass: customTextClass,
|
|
46
|
+
title: title,
|
|
47
|
+
onClick: onClick,
|
|
48
|
+
size: size,
|
|
49
|
+
dataId: dataId,
|
|
50
|
+
initial: initial,
|
|
51
|
+
shape: shape,
|
|
52
|
+
needTitle: needTitle,
|
|
53
|
+
needDefaultBorder: needDefaultBorder,
|
|
54
|
+
needBorder: needBorder
|
|
55
|
+
}, AvatarProps)), /*#__PURE__*/React.createElement("span", {
|
|
56
|
+
"data-title": statusTitle,
|
|
57
|
+
className: `${style.state} ${style[state]} ${style[size]} ${style[shape]}`
|
|
58
|
+
}));
|
|
66
59
|
}
|
|
67
60
|
AvatarStatus.defaultProps = defaultProps;
|
|
68
|
-
AvatarStatus.propTypes = propTypes;
|
|
69
|
-
// AvatarStatus.docs = {
|
|
70
|
-
// componentGroup: 'Avatar Group'
|
|
71
|
-
// };
|
|
72
|
-
// }
|
|
61
|
+
AvatarStatus.propTypes = propTypes;
|
|
@@ -6,74 +6,67 @@ import { propTypes } from '../../../avatar/AvatarThread/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/AvatarThread/AvatarThread.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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
})), getCustomThread && getCustomThread()));
|
|
71
|
-
}
|
|
72
|
-
|
|
9
|
+
export default function AvatarThread(props) {
|
|
10
|
+
let {
|
|
11
|
+
src,
|
|
12
|
+
name,
|
|
13
|
+
size,
|
|
14
|
+
iconColor,
|
|
15
|
+
iconName,
|
|
16
|
+
iconSize,
|
|
17
|
+
borderPalette,
|
|
18
|
+
onClick,
|
|
19
|
+
title,
|
|
20
|
+
iconTitle,
|
|
21
|
+
onIconClick,
|
|
22
|
+
showOnHover,
|
|
23
|
+
dataId,
|
|
24
|
+
initial,
|
|
25
|
+
needBorder,
|
|
26
|
+
needBackground,
|
|
27
|
+
palette,
|
|
28
|
+
textPalette,
|
|
29
|
+
customTextClass,
|
|
30
|
+
needTitle,
|
|
31
|
+
customProps,
|
|
32
|
+
iconClass,
|
|
33
|
+
getCustomThread,
|
|
34
|
+
dataSelectorId
|
|
35
|
+
} = props;
|
|
36
|
+
let {
|
|
37
|
+
AvatarThreadProps = {},
|
|
38
|
+
AvatarProps = {}
|
|
39
|
+
} = customProps;
|
|
40
|
+
let hoverEffect = showOnHover ? style.hover : '';
|
|
41
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
42
|
+
className: `${style.container} ${onClick ? style.pointer : ''} ${hoverEffect}`,
|
|
43
|
+
"data-selector-id": dataSelectorId
|
|
44
|
+
}, AvatarThreadProps), /*#__PURE__*/React.createElement(Avatar, _extends({
|
|
45
|
+
initial: initial,
|
|
46
|
+
src: src,
|
|
47
|
+
name: name,
|
|
48
|
+
title: title,
|
|
49
|
+
size: size,
|
|
50
|
+
onClick: onClick,
|
|
51
|
+
dataId: dataId,
|
|
52
|
+
palette: palette,
|
|
53
|
+
textPalette: textPalette,
|
|
54
|
+
customClass: customTextClass,
|
|
55
|
+
needTitle: needTitle
|
|
56
|
+
}, AvatarProps)), (iconName || getCustomThread) && /*#__PURE__*/React.createElement("span", {
|
|
57
|
+
className: `${style.thread} ${onIconClick ? style.pointer : style.defaultCursor} ${needBackground ? style.threadBg : ''} ${style[`thread_${size}_pos`]} ${needBorder ? style[`border_${borderPalette}`] : ''}`,
|
|
58
|
+
"data-title": iconTitle,
|
|
59
|
+
"data-id": iconTitle === 'Remove Follower' && 'removeFollower',
|
|
60
|
+
"data-test-id": iconTitle === 'Remove Follower' && 'removeFollower',
|
|
61
|
+
onClick: onIconClick
|
|
62
|
+
}, iconName && /*#__PURE__*/React.createElement("span", {
|
|
63
|
+
className: style.icon
|
|
64
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
65
|
+
name: iconName,
|
|
66
|
+
size: iconSize,
|
|
67
|
+
iconClass: `${iconClass}
|
|
68
|
+
${style[`text_${iconColor}`] ? style[`text_${iconColor}`] : iconColor}`
|
|
69
|
+
})), getCustomThread && getCustomThread()));
|
|
73
70
|
}
|
|
74
71
|
AvatarThread.defaultProps = defaultProps;
|
|
75
|
-
AvatarThread.propTypes = propTypes;
|
|
76
|
-
// AvatarThread.docs = {
|
|
77
|
-
// componentGroup: 'Avatar Group'
|
|
78
|
-
// };
|
|
79
|
-
// }
|
|
72
|
+
AvatarThread.propTypes = propTypes;
|