@zohodesk/components 1.0.0-alpha-258 → 1.0.0-alpha-259
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/README.md +12 -1
- package/assets/Appearance/dark/mode/darkMode.module.css +1 -0
- package/assets/Appearance/default/mode/defaultMode.module.css +1 -0
- package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +1 -0
- package/es/Avatar/Avatar.js +8 -5
- package/es/Avatar/Avatar.module.css +6 -0
- package/es/Avatar/props/defaultProps.js +3 -1
- package/es/Avatar/props/propTypes.js +4 -2
- package/es/AvatarTeam/AvatarTeam.js +8 -2
- package/es/AvatarTeam/AvatarTeam.module.css +30 -3
- package/es/AvatarTeam/props/defaultProps.js +4 -1
- package/es/AvatarTeam/props/propTypes.js +4 -1
- package/es/Provider/AvatarSize.js +1 -0
- package/es/common/avatarsizes.module.css +6 -2
- package/lib/Accordion/Accordion.js +1 -3
- package/lib/Accordion/AccordionItem.js +1 -3
- package/lib/Animation/Animation.js +1 -3
- package/lib/AppContainer/AppContainer.js +1 -3
- package/lib/Avatar/Avatar.js +10 -9
- package/lib/Avatar/Avatar.module.css +6 -0
- package/lib/Avatar/props/defaultProps.js +3 -1
- package/lib/Avatar/props/propTypes.js +4 -2
- package/lib/AvatarTeam/AvatarTeam.js +9 -5
- package/lib/AvatarTeam/AvatarTeam.module.css +30 -3
- package/lib/AvatarTeam/props/defaultProps.js +4 -1
- package/lib/AvatarTeam/props/propTypes.js +4 -1
- package/lib/Button/Button.js +1 -3
- package/lib/Buttongroup/Buttongroup.js +2 -5
- package/lib/Card/Card.js +1 -3
- package/lib/CheckBox/CheckBox.js +1 -3
- package/lib/DateTime/CalendarView.js +2 -5
- package/lib/DateTime/DateTime.js +3 -5
- package/lib/DateTime/DateTimePopupFooter.js +1 -3
- package/lib/DateTime/DateTimePopupHeader.js +1 -3
- package/lib/DateTime/DateWidget.js +1 -3
- package/lib/DateTime/DaysRow.js +1 -3
- package/lib/DateTime/Time.js +1 -3
- package/lib/DateTime/YearView.js +1 -3
- package/lib/DateTime/dateFormatUtils/timeChange.js +2 -2
- package/lib/DateTime/validator.js +3 -3
- package/lib/DropBox/DropBox.js +1 -3
- package/lib/DropDown/DropDown.js +2 -5
- package/lib/DropDown/DropDownHeading.js +1 -3
- package/lib/DropDown/DropDownItem.js +1 -3
- package/lib/DropDown/DropDownSearch.js +2 -5
- package/lib/DropDown/DropDownSeparator.js +1 -3
- package/lib/DropDown/props/propTypes.js +1 -4
- package/lib/Heading/Heading.js +2 -4
- package/lib/Label/Label.js +1 -3
- package/lib/ListItem/ListItem.js +1 -3
- package/lib/ListItem/ListItemWithAvatar.js +1 -3
- package/lib/ListItem/ListItemWithCheckBox.js +1 -3
- package/lib/ListItem/ListItemWithIcon.js +1 -3
- package/lib/ListItem/ListItemWithRadio.js +1 -3
- package/lib/ListItem/props/propTypes.js +1 -4
- package/lib/Modal/Modal.js +1 -3
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +4 -6
- package/lib/MultiSelect/AdvancedMultiSelect.js +2 -4
- package/lib/MultiSelect/EmptyState.js +1 -3
- package/lib/MultiSelect/MultiSelect.js +3 -5
- package/lib/MultiSelect/MultiSelectHeader.js +1 -3
- package/lib/MultiSelect/MultiSelectWithAvatar.js +1 -3
- package/lib/MultiSelect/SelectedOptions.js +2 -5
- package/lib/MultiSelect/Suggestions.js +2 -4
- package/lib/PopOver/PopOver.js +1 -3
- package/lib/Popup/Popup.js +2 -4
- package/lib/Popup/__tests__/Popup.spec.js +1 -3
- package/lib/Provider/AvatarSize.js +1 -0
- package/lib/Provider/LibraryContext.js +3 -5
- package/lib/Provider/NumberGenerator/NumberGenerator.js +1 -1
- package/lib/Radio/Radio.js +1 -3
- package/lib/Responsive/CustomResponsive.js +4 -6
- package/lib/Responsive/RefWrapper.js +2 -4
- package/lib/Responsive/ResizeComponent.js +4 -9
- package/lib/Responsive/ResizeObserver.js +1 -4
- package/lib/Responsive/Responsive.js +4 -6
- package/lib/Responsive/sizeObservers.js +2 -4
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +1 -3
- package/lib/Ribbon/Ribbon.js +1 -3
- package/lib/Select/GroupSelect.js +3 -5
- package/lib/Select/Select.js +1 -3
- package/lib/Select/SelectWithAvatar.js +1 -3
- package/lib/Select/SelectWithIcon.js +1 -3
- package/lib/Select/__tests__/Select.spec.js +2 -2
- package/lib/Select/props/defaultProps.js +1 -4
- package/lib/Stencils/Stencils.js +1 -3
- package/lib/Switch/Switch.js +1 -3
- package/lib/Tab/TabWrapper.js +2 -2
- package/lib/Tab/Tabs.js +2 -4
- package/lib/Tag/Tag.js +1 -3
- package/lib/TextBox/TextBox.js +1 -3
- package/lib/TextBox/props/propTypes.js +1 -4
- package/lib/TextBoxIcon/TextBoxIcon.js +2 -5
- package/lib/Textarea/Textarea.js +1 -3
- package/lib/Tooltip/Tooltip.js +1 -3
- package/lib/Tooltip/__tests__/Tooltip.spec.js +1 -3
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +1 -3
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +2 -4
- package/lib/common/avatarsizes.module.css +6 -2
- package/lib/deprecated/PortalLayer/PortalLayer.js +1 -3
- package/lib/semantic/Button/Button.js +1 -3
- package/lib/utils/constructFullName.js +2 -2
- package/lib/utils/dropDownUtils.js +3 -5
- package/package.json +1 -1
- package/css_error.log +0 -0
package/README.md
CHANGED
|
@@ -32,9 +32,20 @@ In this Package, we Provide Some Basic Components to Build Web App
|
|
|
32
32
|
- TextBoxIcon
|
|
33
33
|
- Tooltip
|
|
34
34
|
|
|
35
|
+
# 1.0.0-alpha-259
|
|
36
|
+
|
|
37
|
+
- **Avatar**
|
|
38
|
+
|
|
39
|
+
`needInnerBorder` and `needDefaultBorder` prop has been added.
|
|
40
|
+
|
|
41
|
+
`xxsmall` option added for `size` prop.
|
|
42
|
+
|
|
43
|
+
- **AvatarTeam** - `needInnerBorder`, `needBorder` and `needDefaultBorder` props has been added.
|
|
44
|
+
|
|
35
45
|
# 1.0.0-alpha-258
|
|
36
46
|
|
|
37
|
-
- **CheckBox** - dataSlector prop changed to dataSelectorId
|
|
47
|
+
- **CheckBox** - dataSlector prop changed to dataSelectorId.
|
|
48
|
+
|
|
38
49
|
- dataSelectorId prop added for all components
|
|
39
50
|
|
|
40
51
|
# 1.0.0-alpha-257
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
--zdt_avatarteam_secondary_bg: var(--dot_ebonyclay);
|
|
31
31
|
--zdt_avatarteam_nofill_border: var(--zdt_cta_grey_40_border);
|
|
32
32
|
--zdt_avatarteam_nofill_hover_border: var(--dot_oslogrey);
|
|
33
|
+
--zdt_avatarteam_innerCircle: var(--dot_ebonyclay);
|
|
33
34
|
|
|
34
35
|
/* button */
|
|
35
36
|
--zdt_button_default_text: var(--zdt_cta_alpha_text);
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
--zdt_avatarteam_secondary_bg: var(--dot_white);
|
|
31
31
|
--zdt_avatarteam_nofill_border: var(--zdt_cta_grey_40_border);
|
|
32
32
|
--zdt_avatarteam_nofill_hover_border: var(--dot_slateGrey);
|
|
33
|
+
--zdt_avatarteam_innerCircle: var(--dot_white);
|
|
33
34
|
|
|
34
35
|
/* button */
|
|
35
36
|
--zdt_button_default_text: var(--zdt_cta_alpha_text);
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
--zdt_avatarteam_secondary_bg: #212121;
|
|
31
31
|
--zdt_avatarteam_nofill_border: var(--zdt_cta_grey_40_border);
|
|
32
32
|
--zdt_avatarteam_nofill_hover_border: var(--dot_oslogrey);
|
|
33
|
+
--zdt_avatarteam_innerCircle: #212121;
|
|
33
34
|
|
|
34
35
|
/* button */
|
|
35
36
|
--zdt_button_default_text: var(--zdt_cta_alpha_text);
|
package/es/Avatar/Avatar.js
CHANGED
|
@@ -125,7 +125,9 @@ export default class Avatar extends React.Component {
|
|
|
125
125
|
alternateSrc,
|
|
126
126
|
isAnimate,
|
|
127
127
|
dataSelectorId,
|
|
128
|
-
customProps
|
|
128
|
+
customProps,
|
|
129
|
+
needInnerBorder,
|
|
130
|
+
needDefaultBorder
|
|
129
131
|
} = this.props;
|
|
130
132
|
let {
|
|
131
133
|
AvatarProps = {}
|
|
@@ -134,12 +136,13 @@ export default class Avatar extends React.Component {
|
|
|
134
136
|
let shapeStyle = shape === 'circle' ? 'circle' : `square_${size}`;
|
|
135
137
|
initial = initial || this.getInitialByFullName(name);
|
|
136
138
|
let isInvalidImageList = Avatar.invalidImageURLs.indexOf(src) !== -1;
|
|
137
|
-
let isValidImageList = Avatar.validImageURLs.indexOf(src) !== -1;
|
|
139
|
+
//let isValidImageList = Avatar.validImageURLs.indexOf(src) !== -1;
|
|
138
140
|
let showAvatar = src && !isInvalidImageList;
|
|
139
141
|
let showInitial = !showAvatar || showAvatar && isInvalidImageList;
|
|
140
142
|
const showAlternateAvatar = alternateSrc ? showInitial : false;
|
|
141
143
|
let border = borderOnHover || onClick;
|
|
142
|
-
let
|
|
144
|
+
let showDefaultBorder = src && !isInvalidImageList && needDefaultBorder;
|
|
145
|
+
let borderStyle = (showDefaultBorder || !src || !showAvatar || showInitial) && needBorder ? `${style.border} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} ` : '';
|
|
143
146
|
borderStyle = showAlternateAvatar ? '' : borderStyle;
|
|
144
147
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
145
148
|
className: `${style.avatar} ${style[size]} ${AvatarSize(size)} ${style[shapeStyle]} ${style[palette]} ${textStyle} ${borderStyle} ${customClass ? customClass : ''}`,
|
|
@@ -152,7 +155,7 @@ export default class Avatar extends React.Component {
|
|
|
152
155
|
"data-id": `${dataId}_AvatarInitial`,
|
|
153
156
|
"data-selector-id": `${dataSelectorId}_AvatarInitial`
|
|
154
157
|
}, initial), (showAvatar || showAlternateAvatar) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("img", {
|
|
155
|
-
className: `${style.image} ${isAnimate ? style.animate : ''}`,
|
|
158
|
+
className: `${style.image} ${isAnimate ? style.animate : ''} ${needInnerBorder ? style.innerBorder : ''}`,
|
|
156
159
|
"data-id": `${dataId}_AvatarImg`,
|
|
157
160
|
"data-selector-id": `${dataSelectorId}_AvatarImg`,
|
|
158
161
|
name: name,
|
|
@@ -160,7 +163,7 @@ export default class Avatar extends React.Component {
|
|
|
160
163
|
onLoad: this.putValidImageURLJSON,
|
|
161
164
|
src: showAlternateAvatar ? alternateSrc : src,
|
|
162
165
|
alt: name
|
|
163
|
-
}),
|
|
166
|
+
}), showDefaultBorder ? null : /*#__PURE__*/React.createElement("span", {
|
|
164
167
|
className: `${style.shadow} ${textStyle} `
|
|
165
168
|
})));
|
|
166
169
|
}
|
|
@@ -79,6 +79,9 @@
|
|
|
79
79
|
[dir=rtl] .animate{
|
|
80
80
|
animation-duration: var(--zd_transition2);
|
|
81
81
|
}
|
|
82
|
+
.innerBorder{
|
|
83
|
+
border: 1px solid var(--zdt_avatarteam_innerCircle);
|
|
84
|
+
}
|
|
82
85
|
.square_small {
|
|
83
86
|
--avatar_border_radius: 4px;
|
|
84
87
|
}
|
|
@@ -109,6 +112,9 @@
|
|
|
109
112
|
text-transform: var(--avatar_text_transform);
|
|
110
113
|
display: inline-block;
|
|
111
114
|
}
|
|
115
|
+
.xxsmall{
|
|
116
|
+
--avatar_font_size: var(--zd_font_size8);
|
|
117
|
+
}
|
|
112
118
|
.small {
|
|
113
119
|
--avatar_font_size: var(--zd_font_size9);
|
|
114
120
|
}
|
|
@@ -9,7 +9,7 @@ export const propTypes = {
|
|
|
9
9
|
onClick: PropTypes.func,
|
|
10
10
|
palette: PropTypes.oneOf(['primary', 'secondary', 'info', 'default']),
|
|
11
11
|
shape: PropTypes.oneOf(['circle', 'square']),
|
|
12
|
-
size: PropTypes.oneOf(['small', 'xsmall', 'medium', 'xmedium', 'large', 'xlarge']),
|
|
12
|
+
size: PropTypes.oneOf(['xxsmall', 'small', 'xsmall', 'medium', 'xmedium', 'large', 'xlarge']),
|
|
13
13
|
src: PropTypes.string,
|
|
14
14
|
textPalette: PropTypes.oneOf(['white', 'black']),
|
|
15
15
|
title: PropTypes.string,
|
|
@@ -20,5 +20,7 @@ export const propTypes = {
|
|
|
20
20
|
customProps: PropTypes.shape({
|
|
21
21
|
AvatarProps: PropTypes.object
|
|
22
22
|
}),
|
|
23
|
-
isAnimate: PropTypes.bool
|
|
23
|
+
isAnimate: PropTypes.bool,
|
|
24
|
+
needInnerBorder: PropTypes.bool,
|
|
25
|
+
needDefaultBorder: PropTypes.bool
|
|
24
26
|
};
|
|
@@ -32,7 +32,10 @@ export default class AvatarTeam extends React.Component {
|
|
|
32
32
|
borderOnActive,
|
|
33
33
|
borderOnHover,
|
|
34
34
|
dataSelectorId,
|
|
35
|
-
customProps
|
|
35
|
+
customProps,
|
|
36
|
+
needInnerBorder,
|
|
37
|
+
needBorder,
|
|
38
|
+
needDefaultBorder
|
|
36
39
|
} = this.props;
|
|
37
40
|
let {
|
|
38
41
|
AvatarTeamProps = {},
|
|
@@ -58,7 +61,10 @@ export default class AvatarTeam extends React.Component {
|
|
|
58
61
|
needTitle: needTitle,
|
|
59
62
|
customClass: customAvatar,
|
|
60
63
|
borderOnActive: borderOnActive,
|
|
61
|
-
borderOnHover: border
|
|
64
|
+
borderOnHover: border,
|
|
65
|
+
needInnerBorder: needInnerBorder,
|
|
66
|
+
needBorder: needBorder,
|
|
67
|
+
needDefaultBorder: needDefaultBorder
|
|
62
68
|
}, AvatarProps)), /*#__PURE__*/React.createElement("span", {
|
|
63
69
|
className: `${style.team} ${isFilled ? `${style[`${palette}Filled`]}` : style.nofill}
|
|
64
70
|
${style[`${size}team`]} ${customAvatarTeam}`
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
--avatarteam_border_width: var(--zd_size1);
|
|
4
4
|
--avatarteam_border_style: solid;
|
|
5
5
|
--avatarteam_border_color: var(--zdt_avatarteam_default_border);
|
|
6
|
+
--avatarteam_outline_width: var(--zd_size1);
|
|
7
|
+
--avatarteam_outline_style: solid;
|
|
8
|
+
--avatarteam_outline_color: var(--zdt_avatarteam_innerCircle);
|
|
6
9
|
--avatarteam_bg_color: var(--zdt_avatarteam_default_bg);
|
|
7
10
|
--avatarteam_width: var(--zd_size5);
|
|
8
11
|
--avatarteam_height: var(--zd_size5);
|
|
@@ -16,6 +19,7 @@
|
|
|
16
19
|
position: relative;
|
|
17
20
|
display: inline-block;
|
|
18
21
|
font-size: 0;
|
|
22
|
+
vertical-align: middle;
|
|
19
23
|
}
|
|
20
24
|
.team {
|
|
21
25
|
composes: varClass;
|
|
@@ -23,6 +27,9 @@
|
|
|
23
27
|
top: var(--avatarteam_top_top);
|
|
24
28
|
width: var(--avatarteam_width);
|
|
25
29
|
height: var(--avatarteam_height);
|
|
30
|
+
outline-width: var(--avatarteam_outline_width);
|
|
31
|
+
outline-style: var(--avatarteam_outline_style);
|
|
32
|
+
outline-color: var(--avatarteam_outline_color);
|
|
26
33
|
border-width: var(--avatarteam_border_width);
|
|
27
34
|
border-style: var(--avatarteam_border_style);
|
|
28
35
|
border-color: var(--avatarteam_border_color);
|
|
@@ -38,11 +45,11 @@
|
|
|
38
45
|
right: 50%;
|
|
39
46
|
}
|
|
40
47
|
.nofill {
|
|
41
|
-
--avatarteam_border_color: var(--
|
|
48
|
+
--avatarteam_border_color: var(--zdt_avatarteam_nofill_hover_border);
|
|
42
49
|
}
|
|
43
50
|
.primaryFilled,
|
|
44
51
|
.infoFilled {
|
|
45
|
-
--avatarteam_bg_color: var(--
|
|
52
|
+
--avatarteam_bg_color: var(--zdt_avatarteam_primary_hover_bg);
|
|
46
53
|
}
|
|
47
54
|
.secondaryFilled {
|
|
48
55
|
--avatarteam_bg_color: var(--zdt_avatarteam_secondary_bg);
|
|
@@ -64,6 +71,9 @@
|
|
|
64
71
|
height: inherit;
|
|
65
72
|
width: inherit;
|
|
66
73
|
top: var(--avatarteam_bottom_top);
|
|
74
|
+
outline-width: var(--avatarteam_outline_width);
|
|
75
|
+
outline-style: var(--avatarteam_outline_style);
|
|
76
|
+
outline-color: var( --avatarteam_outline_color);
|
|
67
77
|
}
|
|
68
78
|
.team:after, .team:before {
|
|
69
79
|
border: inherit;
|
|
@@ -80,7 +90,8 @@
|
|
|
80
90
|
left: var(--avatarteam_bottom_right);
|
|
81
91
|
}
|
|
82
92
|
.smallteam,
|
|
83
|
-
.xsmallteam
|
|
93
|
+
.xsmallteam,
|
|
94
|
+
.xxsmallteam {
|
|
84
95
|
--avatarteam_height: var(--zd_size3);
|
|
85
96
|
--avatarteam_width: var(--zd_size3);
|
|
86
97
|
}
|
|
@@ -94,6 +105,22 @@
|
|
|
94
105
|
--avatarteam_height: var(--zd_size7);
|
|
95
106
|
--avatarteam_width: var(--zd_size7);
|
|
96
107
|
}
|
|
108
|
+
|
|
109
|
+
.xxsmallteam {
|
|
110
|
+
--avatarteam_top_top: 0px;
|
|
111
|
+
}
|
|
112
|
+
.xxsmallteam::after,
|
|
113
|
+
.xxsmallteam:before {
|
|
114
|
+
--avatarteam_bottom_top: var(--zd_size13);
|
|
115
|
+
}
|
|
116
|
+
.xxsmallteam:after {
|
|
117
|
+
--avatarteam_bottom_left: calc(var(--zd_size8) * -1);
|
|
118
|
+
}
|
|
119
|
+
.xxsmallteam:before {
|
|
120
|
+
--avatarteam_bottom_right: calc(var(--zd_size8) * -1);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
|
|
97
124
|
.smallteam::after,
|
|
98
125
|
.smallteam:before {
|
|
99
126
|
--avatarteam_bottom_top: var(--zd_size17);
|
|
@@ -7,9 +7,10 @@ export const propTypes = {
|
|
|
7
7
|
needTitle: PropTypes.bool,
|
|
8
8
|
onClick: PropTypes.func,
|
|
9
9
|
palette: PropTypes.oneOf(['primary', 'secondary', 'info']),
|
|
10
|
-
size: PropTypes.oneOf(['small', 'xsmall', 'medium', 'xmedium', 'large', 'xlarge']),
|
|
10
|
+
size: PropTypes.oneOf(['xxsmall', 'small', 'xsmall', 'medium', 'xmedium', 'large', 'xlarge']),
|
|
11
11
|
src: PropTypes.string,
|
|
12
12
|
textPalette: PropTypes.oneOf(['white', 'black']),
|
|
13
|
+
needBorder: PropTypes.bool,
|
|
13
14
|
title: PropTypes.string,
|
|
14
15
|
customClass: PropTypes.shape({
|
|
15
16
|
customAvatar: PropTypes.string,
|
|
@@ -17,6 +18,8 @@ export const propTypes = {
|
|
|
17
18
|
}),
|
|
18
19
|
borderOnActive: PropTypes.bool,
|
|
19
20
|
borderOnHover: PropTypes.bool,
|
|
21
|
+
needInnerBorder: PropTypes.bool,
|
|
22
|
+
needDefaultBorder: PropTypes.bool,
|
|
20
23
|
customProps: PropTypes.shape({
|
|
21
24
|
AvatarTeamProps: PropTypes.object,
|
|
22
25
|
AvatarProps: PropTypes.object
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
.medium,
|
|
10
10
|
.xmedium,
|
|
11
11
|
.large,
|
|
12
|
-
.xlarge
|
|
12
|
+
.xlarge,
|
|
13
|
+
.xxsmall {
|
|
13
14
|
composes: varClass;
|
|
14
15
|
width: var(--avatar_width);
|
|
15
16
|
height: var(--avatar_height);
|
|
@@ -18,7 +19,10 @@
|
|
|
18
19
|
--avatar_height: var(--zd_size22);
|
|
19
20
|
--avatar_width: var(--zd_size22);
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
+
.xxsmall {
|
|
23
|
+
--avatar_height: var(--zd_size18);
|
|
24
|
+
--avatar_width: var(--zd_size18);
|
|
25
|
+
}
|
|
22
26
|
.xsmall {
|
|
23
27
|
--avatar_height: var(--zd_size30);
|
|
24
28
|
--avatar_width: var(--zd_size30);
|
|
@@ -10,10 +10,8 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
10
10
|
var _propTypes = require("./props/propTypes");
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
12
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
13
|
-
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,
|
|
13
|
+
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); } }
|
|
14
14
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
16
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
15
|
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); }
|
|
18
16
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
19
17
|
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); }; }
|
|
@@ -12,10 +12,8 @@ var _VelocityAnimation = _interopRequireDefault(require("../VelocityAnimation/Ve
|
|
|
12
12
|
var _VelocityAnimationGroup = _interopRequireDefault(require("../VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup"));
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
-
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,
|
|
15
|
+
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); } }
|
|
16
16
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
17
|
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); }
|
|
20
18
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
21
19
|
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); }; }
|
|
@@ -12,10 +12,8 @@ var _reactTransitionGroup = require("react-transition-group");
|
|
|
12
12
|
var _transitionModule = _interopRequireDefault(require("../common/transition.module.css"));
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
-
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,
|
|
15
|
+
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); } }
|
|
16
16
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
17
|
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); }
|
|
20
18
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
21
19
|
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); }; }
|
|
@@ -24,10 +24,8 @@ var _Config = require("../Provider/Config");
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
25
|
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); }
|
|
26
26
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
|
-
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,
|
|
27
|
+
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); } }
|
|
28
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
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
30
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
31
29
|
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); }
|
|
32
30
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
31
|
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); }; }
|
package/lib/Avatar/Avatar.js
CHANGED
|
@@ -18,12 +18,10 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
|
|
|
18
18
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
19
19
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
20
20
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
21
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
21
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
22
22
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
|
-
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,
|
|
23
|
+
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); } }
|
|
24
24
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
26
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
27
25
|
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); }
|
|
28
26
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
27
|
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); }; }
|
|
@@ -153,19 +151,22 @@ var Avatar = /*#__PURE__*/function (_React$Component) {
|
|
|
153
151
|
alternateSrc = _this$props2.alternateSrc,
|
|
154
152
|
isAnimate = _this$props2.isAnimate,
|
|
155
153
|
dataSelectorId = _this$props2.dataSelectorId,
|
|
156
|
-
customProps = _this$props2.customProps
|
|
154
|
+
customProps = _this$props2.customProps,
|
|
155
|
+
needInnerBorder = _this$props2.needInnerBorder,
|
|
156
|
+
needDefaultBorder = _this$props2.needDefaultBorder;
|
|
157
157
|
var _customProps$AvatarPr = customProps.AvatarProps,
|
|
158
158
|
AvatarProps = _customProps$AvatarPr === void 0 ? {} : _customProps$AvatarPr;
|
|
159
159
|
var textStyle = textPalette ? _AvatarModule["default"][textPalette] : palette === 'secondary' ? _AvatarModule["default"].white : _AvatarModule["default"].black;
|
|
160
160
|
var shapeStyle = shape === 'circle' ? 'circle' : "square_".concat(size);
|
|
161
161
|
initial = initial || this.getInitialByFullName(name);
|
|
162
162
|
var isInvalidImageList = Avatar.invalidImageURLs.indexOf(src) !== -1;
|
|
163
|
-
|
|
163
|
+
//let isValidImageList = Avatar.validImageURLs.indexOf(src) !== -1;
|
|
164
164
|
var showAvatar = src && !isInvalidImageList;
|
|
165
165
|
var showInitial = !showAvatar || showAvatar && isInvalidImageList;
|
|
166
166
|
var showAlternateAvatar = alternateSrc ? showInitial : false;
|
|
167
167
|
var border = borderOnHover || onClick;
|
|
168
|
-
var
|
|
168
|
+
var showDefaultBorder = src && !isInvalidImageList && needDefaultBorder;
|
|
169
|
+
var borderStyle = (showDefaultBorder || !src || !showAvatar || showInitial) && needBorder ? "".concat(_AvatarModule["default"].border, " ").concat(borderOnActive ? _AvatarModule["default"].borderOnActive : border ? _AvatarModule["default"].borderOnHover : '', " ") : '';
|
|
169
170
|
borderStyle = showAlternateAvatar ? '' : borderStyle;
|
|
170
171
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
171
172
|
className: "".concat(_AvatarModule["default"].avatar, " ").concat(_AvatarModule["default"][size], " ").concat((0, _AvatarSize["default"])(size), " ").concat(_AvatarModule["default"][shapeStyle], " ").concat(_AvatarModule["default"][palette], " ").concat(textStyle, " ").concat(borderStyle, " ").concat(customClass ? customClass : ''),
|
|
@@ -178,7 +179,7 @@ var Avatar = /*#__PURE__*/function (_React$Component) {
|
|
|
178
179
|
"data-id": "".concat(dataId, "_AvatarInitial"),
|
|
179
180
|
"data-selector-id": "".concat(dataSelectorId, "_AvatarInitial")
|
|
180
181
|
}, initial), (showAvatar || showAlternateAvatar) && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("img", {
|
|
181
|
-
className: "".concat(_AvatarModule["default"].image, " ").concat(isAnimate ? _AvatarModule["default"].animate : ''),
|
|
182
|
+
className: "".concat(_AvatarModule["default"].image, " ").concat(isAnimate ? _AvatarModule["default"].animate : '', " ").concat(needInnerBorder ? _AvatarModule["default"].innerBorder : ''),
|
|
182
183
|
"data-id": "".concat(dataId, "_AvatarImg"),
|
|
183
184
|
"data-selector-id": "".concat(dataSelectorId, "_AvatarImg"),
|
|
184
185
|
name: name,
|
|
@@ -186,7 +187,7 @@ var Avatar = /*#__PURE__*/function (_React$Component) {
|
|
|
186
187
|
onLoad: this.putValidImageURLJSON,
|
|
187
188
|
src: showAlternateAvatar ? alternateSrc : src,
|
|
188
189
|
alt: name
|
|
189
|
-
}),
|
|
190
|
+
}), showDefaultBorder ? null : /*#__PURE__*/_react["default"].createElement("span", {
|
|
190
191
|
className: "".concat(_AvatarModule["default"].shadow, " ").concat(textStyle, " ")
|
|
191
192
|
})));
|
|
192
193
|
}
|
|
@@ -79,6 +79,9 @@
|
|
|
79
79
|
[dir=rtl] .animate{
|
|
80
80
|
animation-duration: var(--zd_transition2);
|
|
81
81
|
}
|
|
82
|
+
.innerBorder{
|
|
83
|
+
border: 1px solid var(--zdt_avatarteam_innerCircle);
|
|
84
|
+
}
|
|
82
85
|
.square_small {
|
|
83
86
|
--avatar_border_radius: 4px;
|
|
84
87
|
}
|
|
@@ -109,6 +112,9 @@
|
|
|
109
112
|
text-transform: var(--avatar_text_transform);
|
|
110
113
|
display: inline-block;
|
|
111
114
|
}
|
|
115
|
+
.xxsmall{
|
|
116
|
+
--avatar_font_size: var(--zd_font_size8);
|
|
117
|
+
}
|
|
112
118
|
.small {
|
|
113
119
|
--avatar_font_size: var(--zd_font_size9);
|
|
114
120
|
}
|
|
@@ -16,7 +16,7 @@ var propTypes = {
|
|
|
16
16
|
onClick: _propTypes["default"].func,
|
|
17
17
|
palette: _propTypes["default"].oneOf(['primary', 'secondary', 'info', 'default']),
|
|
18
18
|
shape: _propTypes["default"].oneOf(['circle', 'square']),
|
|
19
|
-
size: _propTypes["default"].oneOf(['small', 'xsmall', 'medium', 'xmedium', 'large', 'xlarge']),
|
|
19
|
+
size: _propTypes["default"].oneOf(['xxsmall', 'small', 'xsmall', 'medium', 'xmedium', 'large', 'xlarge']),
|
|
20
20
|
src: _propTypes["default"].string,
|
|
21
21
|
textPalette: _propTypes["default"].oneOf(['white', 'black']),
|
|
22
22
|
title: _propTypes["default"].string,
|
|
@@ -27,6 +27,8 @@ var propTypes = {
|
|
|
27
27
|
customProps: _propTypes["default"].shape({
|
|
28
28
|
AvatarProps: _propTypes["default"].object
|
|
29
29
|
}),
|
|
30
|
-
isAnimate: _propTypes["default"].bool
|
|
30
|
+
isAnimate: _propTypes["default"].bool,
|
|
31
|
+
needInnerBorder: _propTypes["default"].bool,
|
|
32
|
+
needDefaultBorder: _propTypes["default"].bool
|
|
31
33
|
};
|
|
32
34
|
exports.propTypes = propTypes;
|
|
@@ -13,10 +13,8 @@ var _AvatarTeamModule = _interopRequireDefault(require("./AvatarTeam.module.css"
|
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
14
|
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); }
|
|
15
15
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
-
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,
|
|
16
|
+
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); } }
|
|
17
17
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
18
|
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); }
|
|
21
19
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
22
20
|
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); }; }
|
|
@@ -58,7 +56,10 @@ var AvatarTeam = /*#__PURE__*/function (_React$Component) {
|
|
|
58
56
|
borderOnActive = _this$props.borderOnActive,
|
|
59
57
|
borderOnHover = _this$props.borderOnHover,
|
|
60
58
|
dataSelectorId = _this$props.dataSelectorId,
|
|
61
|
-
customProps = _this$props.customProps
|
|
59
|
+
customProps = _this$props.customProps,
|
|
60
|
+
needInnerBorder = _this$props.needInnerBorder,
|
|
61
|
+
needBorder = _this$props.needBorder,
|
|
62
|
+
needDefaultBorder = _this$props.needDefaultBorder;
|
|
62
63
|
var _customProps$AvatarTe = customProps.AvatarTeamProps,
|
|
63
64
|
AvatarTeamProps = _customProps$AvatarTe === void 0 ? {} : _customProps$AvatarTe,
|
|
64
65
|
_customProps$AvatarPr = customProps.AvatarProps,
|
|
@@ -83,7 +84,10 @@ var AvatarTeam = /*#__PURE__*/function (_React$Component) {
|
|
|
83
84
|
needTitle: needTitle,
|
|
84
85
|
customClass: customAvatar,
|
|
85
86
|
borderOnActive: borderOnActive,
|
|
86
|
-
borderOnHover: border
|
|
87
|
+
borderOnHover: border,
|
|
88
|
+
needInnerBorder: needInnerBorder,
|
|
89
|
+
needBorder: needBorder,
|
|
90
|
+
needDefaultBorder: needDefaultBorder
|
|
87
91
|
}, AvatarProps)), /*#__PURE__*/_react["default"].createElement("span", {
|
|
88
92
|
className: "".concat(_AvatarTeamModule["default"].team, " ").concat(isFilled ? "".concat(_AvatarTeamModule["default"]["".concat(palette, "Filled")]) : _AvatarTeamModule["default"].nofill, " \n ").concat(_AvatarTeamModule["default"]["".concat(size, "team")], " ").concat(customAvatarTeam)
|
|
89
93
|
}));
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
--avatarteam_border_width: var(--zd_size1);
|
|
4
4
|
--avatarteam_border_style: solid;
|
|
5
5
|
--avatarteam_border_color: var(--zdt_avatarteam_default_border);
|
|
6
|
+
--avatarteam_outline_width: var(--zd_size1);
|
|
7
|
+
--avatarteam_outline_style: solid;
|
|
8
|
+
--avatarteam_outline_color: var(--zdt_avatarteam_innerCircle);
|
|
6
9
|
--avatarteam_bg_color: var(--zdt_avatarteam_default_bg);
|
|
7
10
|
--avatarteam_width: var(--zd_size5);
|
|
8
11
|
--avatarteam_height: var(--zd_size5);
|
|
@@ -16,6 +19,7 @@
|
|
|
16
19
|
position: relative;
|
|
17
20
|
display: inline-block;
|
|
18
21
|
font-size: 0;
|
|
22
|
+
vertical-align: middle;
|
|
19
23
|
}
|
|
20
24
|
.team {
|
|
21
25
|
composes: varClass;
|
|
@@ -23,6 +27,9 @@
|
|
|
23
27
|
top: var(--avatarteam_top_top);
|
|
24
28
|
width: var(--avatarteam_width);
|
|
25
29
|
height: var(--avatarteam_height);
|
|
30
|
+
outline-width: var(--avatarteam_outline_width);
|
|
31
|
+
outline-style: var(--avatarteam_outline_style);
|
|
32
|
+
outline-color: var(--avatarteam_outline_color);
|
|
26
33
|
border-width: var(--avatarteam_border_width);
|
|
27
34
|
border-style: var(--avatarteam_border_style);
|
|
28
35
|
border-color: var(--avatarteam_border_color);
|
|
@@ -38,11 +45,11 @@
|
|
|
38
45
|
right: 50%;
|
|
39
46
|
}
|
|
40
47
|
.nofill {
|
|
41
|
-
--avatarteam_border_color: var(--
|
|
48
|
+
--avatarteam_border_color: var(--zdt_avatarteam_nofill_hover_border);
|
|
42
49
|
}
|
|
43
50
|
.primaryFilled,
|
|
44
51
|
.infoFilled {
|
|
45
|
-
--avatarteam_bg_color: var(--
|
|
52
|
+
--avatarteam_bg_color: var(--zdt_avatarteam_primary_hover_bg);
|
|
46
53
|
}
|
|
47
54
|
.secondaryFilled {
|
|
48
55
|
--avatarteam_bg_color: var(--zdt_avatarteam_secondary_bg);
|
|
@@ -64,6 +71,9 @@
|
|
|
64
71
|
height: inherit;
|
|
65
72
|
width: inherit;
|
|
66
73
|
top: var(--avatarteam_bottom_top);
|
|
74
|
+
outline-width: var(--avatarteam_outline_width);
|
|
75
|
+
outline-style: var(--avatarteam_outline_style);
|
|
76
|
+
outline-color: var( --avatarteam_outline_color);
|
|
67
77
|
}
|
|
68
78
|
.team:after, .team:before {
|
|
69
79
|
border: inherit;
|
|
@@ -80,7 +90,8 @@
|
|
|
80
90
|
left: var(--avatarteam_bottom_right);
|
|
81
91
|
}
|
|
82
92
|
.smallteam,
|
|
83
|
-
.xsmallteam
|
|
93
|
+
.xsmallteam,
|
|
94
|
+
.xxsmallteam {
|
|
84
95
|
--avatarteam_height: var(--zd_size3);
|
|
85
96
|
--avatarteam_width: var(--zd_size3);
|
|
86
97
|
}
|
|
@@ -94,6 +105,22 @@
|
|
|
94
105
|
--avatarteam_height: var(--zd_size7);
|
|
95
106
|
--avatarteam_width: var(--zd_size7);
|
|
96
107
|
}
|
|
108
|
+
|
|
109
|
+
.xxsmallteam {
|
|
110
|
+
--avatarteam_top_top: 0px;
|
|
111
|
+
}
|
|
112
|
+
.xxsmallteam::after,
|
|
113
|
+
.xxsmallteam:before {
|
|
114
|
+
--avatarteam_bottom_top: var(--zd_size13);
|
|
115
|
+
}
|
|
116
|
+
.xxsmallteam:after {
|
|
117
|
+
--avatarteam_bottom_left: calc(var(--zd_size8) * -1);
|
|
118
|
+
}
|
|
119
|
+
.xxsmallteam:before {
|
|
120
|
+
--avatarteam_bottom_right: calc(var(--zd_size8) * -1);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
|
|
97
124
|
.smallteam::after,
|
|
98
125
|
.smallteam:before {
|
|
99
126
|
--avatarteam_bottom_top: var(--zd_size17);
|