@zohodesk/components 1.0.0-alpha-257 → 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 +16 -0
- 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/Accordion/Accordion.js +6 -2
- package/es/Accordion/AccordionItem.js +3 -1
- package/es/Accordion/props/defaultProps.js +6 -2
- package/es/Accordion/props/propTypes.js +3 -0
- package/es/AppContainer/AppContainer.js +4 -1
- package/es/AppContainer/props/defaultProps.js +2 -1
- package/es/AppContainer/props/propTypes.js +1 -0
- package/es/Avatar/Avatar.js +14 -7
- package/es/Avatar/Avatar.module.css +6 -0
- package/es/Avatar/props/defaultProps.js +4 -1
- package/es/Avatar/props/propTypes.js +5 -2
- package/es/AvatarTeam/AvatarTeam.js +11 -3
- package/es/AvatarTeam/AvatarTeam.module.css +30 -3
- package/es/AvatarTeam/props/defaultProps.js +5 -1
- package/es/AvatarTeam/props/propTypes.js +5 -1
- package/es/Button/Button.js +3 -1
- package/es/Button/props/defaultProps.js +1 -0
- package/es/Button/props/propTypes.js +1 -0
- package/es/Buttongroup/Buttongroup.js +6 -2
- package/es/Buttongroup/props/defaultProps.js +3 -1
- package/es/Buttongroup/props/propTypes.js +3 -1
- package/es/Card/Card.js +19 -10
- package/es/Card/props/defaultProps.js +12 -1
- package/es/CheckBox/CheckBox.js +3 -2
- package/es/CheckBox/props/propTypes.js +1 -0
- package/es/DropBox/DropBox.js +5 -1
- package/es/DropBox/props/defaultProps.js +1 -0
- package/es/DropBox/props/propTypes.js +1 -0
- package/es/DropDown/DropDownHeading.js +6 -2
- package/es/DropDown/props/defaultProps.js +3 -1
- package/es/Label/Label.js +2 -0
- package/es/Label/props/defaultProps.js +2 -1
- package/es/Label/props/propTypes.js +1 -0
- package/es/Layout/Box.js +2 -1
- package/es/Layout/Container.js +2 -1
- package/es/Layout/props/defaultProps.js +4 -2
- package/es/Layout/props/propTypes.js +2 -0
- package/es/ListItem/ListContainer.js +2 -0
- package/es/ListItem/ListItem.js +4 -1
- package/es/ListItem/ListItemWithAvatar.js +4 -1
- package/es/ListItem/ListItemWithCheckBox.js +2 -0
- package/es/ListItem/ListItemWithIcon.js +4 -1
- package/es/ListItem/ListItemWithRadio.js +2 -0
- package/es/ListItem/props/defaultProps.js +12 -6
- package/es/ListItem/props/propTypes.js +6 -0
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +3 -1
- package/es/MultiSelect/AdvancedMultiSelect.js +4 -2
- package/es/MultiSelect/MultiSelect.js +3 -1
- package/es/MultiSelect/MultiSelectWithAvatar.js +3 -1
- package/es/MultiSelect/props/defaultProps.js +8 -4
- package/es/MultiSelect/props/propTypes.js +8 -4
- package/es/Provider/AvatarSize.js +1 -0
- package/es/Ribbon/Ribbon.js +4 -2
- package/es/Ribbon/props/defaultProps.js +2 -1
- package/es/Ribbon/props/propTypes.js +2 -1
- package/es/Select/GroupSelect.js +4 -2
- package/es/Select/Select.js +4 -2
- package/es/Select/SelectWithAvatar.js +4 -2
- package/es/Select/SelectWithIcon.js +4 -2
- package/es/Select/props/defaultProps.js +4 -0
- package/es/Select/props/propTypes.js +8 -4
- package/es/Switch/Switch.js +3 -1
- package/es/Switch/props/defaultProps.js +2 -1
- package/es/Switch/props/propTypes.js +1 -0
- package/es/Tab/Tab.js +3 -1
- package/es/Tab/TabContent.js +4 -2
- package/es/Tab/TabContentWrapper.js +4 -2
- package/es/Tab/TabWrapper.js +4 -2
- package/es/Tab/Tabs.js +8 -4
- package/es/Tab/props/defaultProps.js +10 -5
- package/es/Tab/props/propTypes.js +10 -5
- package/es/Tag/Tag.js +3 -1
- package/es/Tag/props/defaultProps.js +2 -1
- package/es/Tag/props/propTypes.js +2 -1
- package/es/TextBox/TextBox.js +3 -1
- package/es/TextBox/props/defaultProps.js +2 -1
- package/es/TextBox/props/propTypes.js +2 -1
- package/es/TextBoxIcon/TextBoxIcon.js +2 -0
- package/es/TextBoxIcon/props/defaultProps.js +2 -1
- package/es/TextBoxIcon/props/propTypes.js +1 -0
- package/es/Textarea/Textarea.js +3 -1
- package/es/Textarea/props/defaultProps.js +2 -1
- package/es/Textarea/props/propTypes.js +1 -0
- package/es/common/avatarsizes.module.css +6 -2
- package/lib/Accordion/Accordion.js +6 -2
- package/lib/Accordion/AccordionItem.js +3 -1
- package/lib/Accordion/props/defaultProps.js +6 -2
- package/lib/Accordion/props/propTypes.js +3 -0
- package/lib/AppContainer/AppContainer.js +4 -1
- package/lib/AppContainer/props/defaultProps.js +2 -1
- package/lib/AppContainer/props/propTypes.js +1 -0
- package/lib/Avatar/Avatar.js +14 -7
- package/lib/Avatar/Avatar.module.css +6 -0
- package/lib/Avatar/props/defaultProps.js +4 -1
- package/lib/Avatar/props/propTypes.js +5 -2
- package/lib/AvatarTeam/AvatarTeam.js +11 -3
- package/lib/AvatarTeam/AvatarTeam.module.css +30 -3
- package/lib/AvatarTeam/props/defaultProps.js +5 -1
- package/lib/AvatarTeam/props/propTypes.js +5 -1
- package/lib/Button/Button.js +3 -1
- package/lib/Button/props/defaultProps.js +1 -0
- package/lib/Button/props/propTypes.js +1 -0
- package/lib/Buttongroup/Buttongroup.js +6 -2
- package/lib/Buttongroup/props/defaultProps.js +3 -1
- package/lib/Buttongroup/props/propTypes.js +3 -1
- package/lib/Card/Card.js +18 -13
- package/lib/Card/props/defaultProps.js +16 -3
- package/lib/CheckBox/CheckBox.js +3 -2
- package/lib/CheckBox/props/propTypes.js +1 -0
- package/lib/DropBox/DropBox.js +5 -1
- package/lib/DropBox/props/defaultProps.js +1 -0
- package/lib/DropBox/props/propTypes.js +1 -0
- package/lib/DropDown/DropDownHeading.js +6 -2
- package/lib/DropDown/props/defaultProps.js +3 -1
- package/lib/Label/Label.js +2 -0
- package/lib/Label/props/defaultProps.js +2 -1
- package/lib/Label/props/propTypes.js +1 -0
- package/lib/Layout/Box.js +2 -1
- package/lib/Layout/Container.js +2 -1
- package/lib/Layout/props/defaultProps.js +4 -2
- package/lib/Layout/props/propTypes.js +2 -0
- package/lib/ListItem/ListContainer.js +2 -0
- package/lib/ListItem/ListItem.js +4 -1
- package/lib/ListItem/ListItemWithAvatar.js +4 -1
- package/lib/ListItem/ListItemWithCheckBox.js +2 -0
- package/lib/ListItem/ListItemWithIcon.js +4 -1
- package/lib/ListItem/ListItemWithRadio.js +2 -0
- package/lib/ListItem/props/defaultProps.js +12 -6
- package/lib/ListItem/props/propTypes.js +6 -1
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +3 -1
- package/lib/MultiSelect/AdvancedMultiSelect.js +4 -2
- package/lib/MultiSelect/MultiSelect.js +3 -1
- package/lib/MultiSelect/MultiSelectWithAvatar.js +3 -1
- package/lib/MultiSelect/props/defaultProps.js +8 -4
- package/lib/MultiSelect/props/propTypes.js +8 -4
- package/lib/Provider/AvatarSize.js +1 -0
- package/lib/Ribbon/Ribbon.js +4 -2
- package/lib/Ribbon/props/defaultProps.js +2 -1
- package/lib/Ribbon/props/propTypes.js +2 -1
- package/lib/Select/GroupSelect.js +4 -2
- package/lib/Select/Select.js +4 -2
- package/lib/Select/SelectWithAvatar.js +4 -2
- package/lib/Select/SelectWithIcon.js +4 -2
- package/lib/Select/props/defaultProps.js +4 -1
- package/lib/Select/props/propTypes.js +8 -4
- package/lib/Switch/Switch.js +3 -1
- package/lib/Switch/props/defaultProps.js +2 -1
- package/lib/Switch/props/propTypes.js +1 -0
- package/lib/Tab/Tab.js +3 -1
- package/lib/Tab/TabContent.js +4 -2
- package/lib/Tab/TabContentWrapper.js +4 -2
- package/lib/Tab/TabWrapper.js +4 -2
- package/lib/Tab/Tabs.js +8 -4
- package/lib/Tab/props/defaultProps.js +10 -5
- package/lib/Tab/props/propTypes.js +10 -5
- package/lib/Tag/Tag.js +3 -1
- package/lib/Tag/props/defaultProps.js +2 -1
- package/lib/Tag/props/propTypes.js +2 -1
- package/lib/TextBox/TextBox.js +3 -1
- package/lib/TextBox/props/defaultProps.js +2 -1
- package/lib/TextBox/props/propTypes.js +1 -1
- package/lib/TextBoxIcon/TextBoxIcon.js +2 -0
- package/lib/TextBoxIcon/props/defaultProps.js +2 -1
- package/lib/TextBoxIcon/props/propTypes.js +1 -0
- package/lib/Textarea/Textarea.js +3 -1
- package/lib/Textarea/props/defaultProps.js +2 -1
- package/lib/Textarea/props/propTypes.js +1 -0
- package/lib/common/avatarsizes.module.css +6 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -32,6 +32,22 @@ 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
|
+
|
|
45
|
+
# 1.0.0-alpha-258
|
|
46
|
+
|
|
47
|
+
- **CheckBox** - dataSlector prop changed to dataSelectorId.
|
|
48
|
+
|
|
49
|
+
- dataSelectorId prop added for all components
|
|
50
|
+
|
|
35
51
|
# 1.0.0-alpha-257
|
|
36
52
|
|
|
37
53
|
- **Avatar** - Avatar initial render issue and image border issue solved
|
|
@@ -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);
|
|
@@ -35,7 +35,9 @@ export default class Accordion extends React.Component {
|
|
|
35
35
|
unMount,
|
|
36
36
|
disableInternalState,
|
|
37
37
|
selectedItem: propSelectedItem,
|
|
38
|
-
a11y
|
|
38
|
+
a11y,
|
|
39
|
+
dataId,
|
|
40
|
+
dataSelectorId
|
|
39
41
|
} = this.props;
|
|
40
42
|
let {
|
|
41
43
|
selectedItem
|
|
@@ -61,7 +63,9 @@ export default class Accordion extends React.Component {
|
|
|
61
63
|
},
|
|
62
64
|
role: role,
|
|
63
65
|
"aria-expanded": ariaExpanded,
|
|
64
|
-
"aria-haspopup": ariaHaspopup
|
|
66
|
+
"aria-haspopup": ariaHaspopup,
|
|
67
|
+
"data-id": dataId,
|
|
68
|
+
"data-selector-id": dataSelectorId
|
|
65
69
|
}, children);
|
|
66
70
|
}
|
|
67
71
|
}
|
|
@@ -23,6 +23,7 @@ export default class AccordionItem extends React.Component {
|
|
|
23
23
|
className,
|
|
24
24
|
children,
|
|
25
25
|
dataId,
|
|
26
|
+
dataSelectorId,
|
|
26
27
|
unMount,
|
|
27
28
|
unMountItem,
|
|
28
29
|
a11y,
|
|
@@ -35,7 +36,8 @@ export default class AccordionItem extends React.Component {
|
|
|
35
36
|
return /*#__PURE__*/React.createElement("div", {
|
|
36
37
|
className: className ? className : '',
|
|
37
38
|
"data-id": dataId,
|
|
38
|
-
role: role
|
|
39
|
+
role: role,
|
|
40
|
+
"data-selector-id": dataSelectorId
|
|
39
41
|
}, /*#__PURE__*/React.createElement("div", {
|
|
40
42
|
className: innerClass ? innerClass : '',
|
|
41
43
|
onClick: selectMenu.bind(this, id)
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export const Accordion_defaultProps = {
|
|
2
2
|
unMount: true,
|
|
3
3
|
disableInternalState: false,
|
|
4
|
-
a11y: {}
|
|
4
|
+
a11y: {},
|
|
5
|
+
dataId: 'Accordion',
|
|
6
|
+
dataSelectorId: 'accordion'
|
|
5
7
|
};
|
|
6
8
|
export const AccordionItem_defaultProps = {
|
|
7
|
-
a11y: {}
|
|
9
|
+
a11y: {},
|
|
10
|
+
dataId: 'AccordionItem',
|
|
11
|
+
dataSelectorId: 'accordionItem'
|
|
8
12
|
};
|
|
@@ -2,6 +2,8 @@ import PropTypes from 'prop-types';
|
|
|
2
2
|
export const Accordion_propTypes = {
|
|
3
3
|
children: PropTypes.node,
|
|
4
4
|
className: PropTypes.string,
|
|
5
|
+
dataId: PropTypes.string,
|
|
6
|
+
dataSelectorId: PropTypes.string,
|
|
5
7
|
disableInternalState: PropTypes.bool,
|
|
6
8
|
height: PropTypes.string,
|
|
7
9
|
onSelect: PropTypes.func,
|
|
@@ -17,6 +19,7 @@ export const AccordionItem_propTypes = {
|
|
|
17
19
|
children: PropTypes.node,
|
|
18
20
|
className: PropTypes.string,
|
|
19
21
|
dataId: PropTypes.string,
|
|
22
|
+
dataSelectorId: PropTypes.string,
|
|
20
23
|
equalityCheck: PropTypes.func,
|
|
21
24
|
id: PropTypes.string,
|
|
22
25
|
selectMenu: PropTypes.func,
|
|
@@ -75,6 +75,7 @@ export default class AppContainer extends React.Component {
|
|
|
75
75
|
children,
|
|
76
76
|
tagName,
|
|
77
77
|
dataId,
|
|
78
|
+
dataSelectorId,
|
|
78
79
|
tooltipClass,
|
|
79
80
|
tooltipParentClass,
|
|
80
81
|
customProps
|
|
@@ -89,13 +90,15 @@ export default class AppContainer extends React.Component {
|
|
|
89
90
|
//onMouseOver={this.handleOver}
|
|
90
91
|
,
|
|
91
92
|
dataId: dataId,
|
|
93
|
+
dataSelectorId: dataSelectorId,
|
|
92
94
|
tagName: tagName,
|
|
93
95
|
eleRef: this.getContainerRef
|
|
94
96
|
}, ContainerProps, ExtraProps), /*#__PURE__*/React.createElement(Box, {
|
|
95
97
|
flexible: true
|
|
96
98
|
}, children)), /*#__PURE__*/React.createElement("div", _extends({}, ExtraProps, {
|
|
97
99
|
className: `${style.container} ${style.tooltip} ${tooltipParentClass}`,
|
|
98
|
-
"data-id": `${dataId}_tooltip
|
|
100
|
+
"data-id": `${dataId}_tooltip`,
|
|
101
|
+
"data-selector-id": `${dataSelectorId}_tooltip`
|
|
99
102
|
}), /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
100
103
|
ref: this.setTooltipRef,
|
|
101
104
|
customClass: tooltipClass
|
|
@@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
|
|
|
2
2
|
export const propTypes = {
|
|
3
3
|
children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]),
|
|
4
4
|
dataId: PropTypes.string,
|
|
5
|
+
dataSelectorId: PropTypes.string,
|
|
5
6
|
eleRef: PropTypes.func,
|
|
6
7
|
tagName: PropTypes.string,
|
|
7
8
|
className: PropTypes.string,
|
package/es/Avatar/Avatar.js
CHANGED
|
@@ -124,7 +124,10 @@ export default class Avatar extends React.Component {
|
|
|
124
124
|
customClass,
|
|
125
125
|
alternateSrc,
|
|
126
126
|
isAnimate,
|
|
127
|
-
|
|
127
|
+
dataSelectorId,
|
|
128
|
+
customProps,
|
|
129
|
+
needInnerBorder,
|
|
130
|
+
needDefaultBorder
|
|
128
131
|
} = this.props;
|
|
129
132
|
let {
|
|
130
133
|
AvatarProps = {}
|
|
@@ -133,30 +136,34 @@ export default class Avatar extends React.Component {
|
|
|
133
136
|
let shapeStyle = shape === 'circle' ? 'circle' : `square_${size}`;
|
|
134
137
|
initial = initial || this.getInitialByFullName(name);
|
|
135
138
|
let isInvalidImageList = Avatar.invalidImageURLs.indexOf(src) !== -1;
|
|
136
|
-
let isValidImageList = Avatar.validImageURLs.indexOf(src) !== -1;
|
|
139
|
+
//let isValidImageList = Avatar.validImageURLs.indexOf(src) !== -1;
|
|
137
140
|
let showAvatar = src && !isInvalidImageList;
|
|
138
141
|
let showInitial = !showAvatar || showAvatar && isInvalidImageList;
|
|
139
142
|
const showAlternateAvatar = alternateSrc ? showInitial : false;
|
|
140
143
|
let border = borderOnHover || onClick;
|
|
141
|
-
let
|
|
144
|
+
let showDefaultBorder = src && !isInvalidImageList && needDefaultBorder;
|
|
145
|
+
let borderStyle = (showDefaultBorder || !src || !showAvatar || showInitial) && needBorder ? `${style.border} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} ` : '';
|
|
142
146
|
borderStyle = showAlternateAvatar ? '' : borderStyle;
|
|
143
147
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
144
148
|
className: `${style.avatar} ${style[size]} ${AvatarSize(size)} ${style[shapeStyle]} ${style[palette]} ${textStyle} ${borderStyle} ${customClass ? customClass : ''}`,
|
|
145
149
|
"data-title": needTitle ? title ? title : name : null,
|
|
146
150
|
"data-id": dataId,
|
|
147
|
-
onClick: onClick
|
|
151
|
+
onClick: onClick,
|
|
152
|
+
"data-selector-id": dataSelectorId
|
|
148
153
|
}, AvatarProps), showInitial && !showAlternateAvatar && /*#__PURE__*/React.createElement("span", {
|
|
149
154
|
className: `${style.initial}`,
|
|
150
|
-
"data-id": `${dataId}_AvatarInitial
|
|
155
|
+
"data-id": `${dataId}_AvatarInitial`,
|
|
156
|
+
"data-selector-id": `${dataSelectorId}_AvatarInitial`
|
|
151
157
|
}, initial), (showAvatar || showAlternateAvatar) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("img", {
|
|
152
|
-
className: `${style.image} ${isAnimate ? style.animate : ''}`,
|
|
158
|
+
className: `${style.image} ${isAnimate ? style.animate : ''} ${needInnerBorder ? style.innerBorder : ''}`,
|
|
153
159
|
"data-id": `${dataId}_AvatarImg`,
|
|
160
|
+
"data-selector-id": `${dataSelectorId}_AvatarImg`,
|
|
154
161
|
name: name,
|
|
155
162
|
onError: this.putInvalidImageURLJSON,
|
|
156
163
|
onLoad: this.putValidImageURLJSON,
|
|
157
164
|
src: showAlternateAvatar ? alternateSrc : src,
|
|
158
165
|
alt: name
|
|
159
|
-
}),
|
|
166
|
+
}), showDefaultBorder ? null : /*#__PURE__*/React.createElement("span", {
|
|
160
167
|
className: `${style.shadow} ${textStyle} `
|
|
161
168
|
})));
|
|
162
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
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
export const propTypes = {
|
|
3
3
|
dataId: PropTypes.string,
|
|
4
|
+
dataSelectorId: PropTypes.string,
|
|
4
5
|
initial: PropTypes.string,
|
|
5
6
|
name: PropTypes.string.isRequired,
|
|
6
7
|
needBorder: PropTypes.bool,
|
|
@@ -8,7 +9,7 @@ export const propTypes = {
|
|
|
8
9
|
onClick: PropTypes.func,
|
|
9
10
|
palette: PropTypes.oneOf(['primary', 'secondary', 'info', 'default']),
|
|
10
11
|
shape: PropTypes.oneOf(['circle', 'square']),
|
|
11
|
-
size: PropTypes.oneOf(['small', 'xsmall', 'medium', 'xmedium', 'large', 'xlarge']),
|
|
12
|
+
size: PropTypes.oneOf(['xxsmall', 'small', 'xsmall', 'medium', 'xmedium', 'large', 'xlarge']),
|
|
12
13
|
src: PropTypes.string,
|
|
13
14
|
textPalette: PropTypes.oneOf(['white', 'black']),
|
|
14
15
|
title: PropTypes.string,
|
|
@@ -19,5 +20,7 @@ export const propTypes = {
|
|
|
19
20
|
customProps: PropTypes.shape({
|
|
20
21
|
AvatarProps: PropTypes.object
|
|
21
22
|
}),
|
|
22
|
-
isAnimate: PropTypes.bool
|
|
23
|
+
isAnimate: PropTypes.bool,
|
|
24
|
+
needInnerBorder: PropTypes.bool,
|
|
25
|
+
needDefaultBorder: PropTypes.bool
|
|
23
26
|
};
|
|
@@ -31,7 +31,11 @@ export default class AvatarTeam extends React.Component {
|
|
|
31
31
|
customClass,
|
|
32
32
|
borderOnActive,
|
|
33
33
|
borderOnHover,
|
|
34
|
-
|
|
34
|
+
dataSelectorId,
|
|
35
|
+
customProps,
|
|
36
|
+
needInnerBorder,
|
|
37
|
+
needBorder,
|
|
38
|
+
needDefaultBorder
|
|
35
39
|
} = this.props;
|
|
36
40
|
let {
|
|
37
41
|
AvatarTeamProps = {},
|
|
@@ -44,7 +48,8 @@ export default class AvatarTeam extends React.Component {
|
|
|
44
48
|
let border = borderOnHover || onClick;
|
|
45
49
|
return /*#__PURE__*/React.createElement("span", _extends({
|
|
46
50
|
className: `${style.container} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} `,
|
|
47
|
-
"data-id": dataId
|
|
51
|
+
"data-id": dataId,
|
|
52
|
+
"data-selector-id": dataSelectorId
|
|
48
53
|
}, AvatarTeamProps), /*#__PURE__*/React.createElement(Avatar, _extends({
|
|
49
54
|
name: name,
|
|
50
55
|
onClick: onClick,
|
|
@@ -56,7 +61,10 @@ export default class AvatarTeam extends React.Component {
|
|
|
56
61
|
needTitle: needTitle,
|
|
57
62
|
customClass: customAvatar,
|
|
58
63
|
borderOnActive: borderOnActive,
|
|
59
|
-
borderOnHover: border
|
|
64
|
+
borderOnHover: border,
|
|
65
|
+
needInnerBorder: needInnerBorder,
|
|
66
|
+
needBorder: needBorder,
|
|
67
|
+
needDefaultBorder: needDefaultBorder
|
|
60
68
|
}, AvatarProps)), /*#__PURE__*/React.createElement("span", {
|
|
61
69
|
className: `${style.team} ${isFilled ? `${style[`${palette}Filled`]}` : style.nofill}
|
|
62
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);
|
|
@@ -5,9 +5,13 @@ export const defaultProps = {
|
|
|
5
5
|
src: null,
|
|
6
6
|
title: null,
|
|
7
7
|
dataId: 'avatarTeamComp',
|
|
8
|
+
dataSelectorId: 'avatarTeam',
|
|
8
9
|
needTitle: true,
|
|
9
10
|
customClass: {},
|
|
10
11
|
borderOnActive: false,
|
|
11
12
|
borderOnHover: false,
|
|
12
|
-
customProps: {}
|
|
13
|
+
customProps: {},
|
|
14
|
+
needInnerBorder: true,
|
|
15
|
+
needBorder: true,
|
|
16
|
+
needDefaultBorder: true
|
|
13
17
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
export const propTypes = {
|
|
3
3
|
dataId: PropTypes.string,
|
|
4
|
+
dataSelectorId: PropTypes.string,
|
|
4
5
|
isFilled: PropTypes.bool,
|
|
5
6
|
name: PropTypes.string.isRequired,
|
|
6
7
|
needTitle: PropTypes.bool,
|
|
7
8
|
onClick: PropTypes.func,
|
|
8
9
|
palette: PropTypes.oneOf(['primary', 'secondary', 'info']),
|
|
9
|
-
size: PropTypes.oneOf(['small', 'xsmall', 'medium', 'xmedium', 'large', 'xlarge']),
|
|
10
|
+
size: PropTypes.oneOf(['xxsmall', 'small', 'xsmall', 'medium', 'xmedium', 'large', 'xlarge']),
|
|
10
11
|
src: PropTypes.string,
|
|
11
12
|
textPalette: PropTypes.oneOf(['white', 'black']),
|
|
13
|
+
needBorder: PropTypes.bool,
|
|
12
14
|
title: PropTypes.string,
|
|
13
15
|
customClass: PropTypes.shape({
|
|
14
16
|
customAvatar: PropTypes.string,
|
|
@@ -16,6 +18,8 @@ export const propTypes = {
|
|
|
16
18
|
}),
|
|
17
19
|
borderOnActive: PropTypes.bool,
|
|
18
20
|
borderOnHover: PropTypes.bool,
|
|
21
|
+
needInnerBorder: PropTypes.bool,
|
|
22
|
+
needDefaultBorder: PropTypes.bool,
|
|
19
23
|
customProps: PropTypes.shape({
|
|
20
24
|
AvatarTeamProps: PropTypes.object,
|
|
21
25
|
AvatarProps: PropTypes.object
|
package/es/Button/Button.js
CHANGED
|
@@ -25,6 +25,7 @@ export default class Button extends React.Component {
|
|
|
25
25
|
needAppearance,
|
|
26
26
|
getRef,
|
|
27
27
|
title,
|
|
28
|
+
dataSelectorId,
|
|
28
29
|
customClass,
|
|
29
30
|
customProps
|
|
30
31
|
} = this.props;
|
|
@@ -44,7 +45,8 @@ export default class Button extends React.Component {
|
|
|
44
45
|
onClick: onClick,
|
|
45
46
|
"data-title": title,
|
|
46
47
|
type: "button",
|
|
47
|
-
ref: getRef
|
|
48
|
+
ref: getRef,
|
|
49
|
+
"data-selector-id": dataSelectorId
|
|
48
50
|
}, customProps), children ? children : text, statusLower !== 'none' && needAppearance && /*#__PURE__*/React.createElement("div", {
|
|
49
51
|
className: style.overlay
|
|
50
52
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -10,7 +10,9 @@ export default class Buttongroup extends React.Component {
|
|
|
10
10
|
children,
|
|
11
11
|
type,
|
|
12
12
|
buttonPosition,
|
|
13
|
-
customClass
|
|
13
|
+
customClass,
|
|
14
|
+
dataId,
|
|
15
|
+
dataSelectorId
|
|
14
16
|
} = this.props;
|
|
15
17
|
let btnGroup = [];
|
|
16
18
|
children.forEach(child => {
|
|
@@ -20,7 +22,9 @@ export default class Buttongroup extends React.Component {
|
|
|
20
22
|
btnGroup.push(btnRight);
|
|
21
23
|
});
|
|
22
24
|
return /*#__PURE__*/React.createElement("div", {
|
|
23
|
-
className: `${style.buttonGroup} ${style[type]} ${customClass ? customClass : ''}
|
|
25
|
+
className: `${style.buttonGroup} ${style[type]} ${customClass ? customClass : ''}`,
|
|
26
|
+
"data-id": dataId,
|
|
27
|
+
"data-selector-id": dataSelectorId
|
|
24
28
|
}, /*#__PURE__*/React.createElement("div", {
|
|
25
29
|
className: style[`align${buttonPosition}`]
|
|
26
30
|
}, children));
|
|
@@ -3,5 +3,7 @@ export const propTypes = {
|
|
|
3
3
|
buttonPosition: PropTypes.oneOf(['left', 'right', 'center']),
|
|
4
4
|
children: PropTypes.node,
|
|
5
5
|
type: PropTypes.string.isRequired,
|
|
6
|
-
customClass: PropTypes.string
|
|
6
|
+
customClass: PropTypes.string,
|
|
7
|
+
dataId: PropTypes.string,
|
|
8
|
+
dataSelectorId: PropTypes.string
|
|
7
9
|
};
|
package/es/Card/Card.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { CardHeader_propTypes, CardContent_propTypes, Card_propTypes, CardFooter_propTypes } from './props/propTypes';
|
|
3
|
-
import { Card_defaultProps, CardContent_defaultProps } from './props/defaultProps';
|
|
3
|
+
import { Card_defaultProps, CardHeader_defaultProps, CardContent_defaultProps, CardFooter_defaultProps } from './props/defaultProps';
|
|
4
4
|
import { Container, Box } from '../Layout';
|
|
5
5
|
import { getLibraryConfig } from '../Provider/Config';
|
|
6
6
|
import style from './Card.module.css';
|
|
@@ -32,17 +32,20 @@ export class CardHeader extends Component {
|
|
|
32
32
|
let {
|
|
33
33
|
isScroll,
|
|
34
34
|
children,
|
|
35
|
-
dataId
|
|
36
|
-
|
|
35
|
+
dataId,
|
|
36
|
+
dataSelectorId,
|
|
37
|
+
customClass
|
|
37
38
|
} = this.props;
|
|
38
39
|
return /*#__PURE__*/React.createElement(Box, {
|
|
39
40
|
className: `${isScroll ? style.scroll : style.notScroll} ${customClass}`,
|
|
40
41
|
eleRef: this.getCardHeaderDom,
|
|
41
|
-
dataId: dataId
|
|
42
|
+
dataId: dataId,
|
|
43
|
+
dataSelectorId: dataSelectorId
|
|
42
44
|
}, children);
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
CardHeader.propTypes = CardHeader_propTypes;
|
|
48
|
+
CardHeader.defaultProps = CardHeader_defaultProps;
|
|
46
49
|
export class CardContent extends Component {
|
|
47
50
|
render() {
|
|
48
51
|
let {
|
|
@@ -52,6 +55,7 @@ export class CardContent extends Component {
|
|
|
52
55
|
scroll,
|
|
53
56
|
isScrollAttribute,
|
|
54
57
|
dataId,
|
|
58
|
+
dataSelectorId,
|
|
55
59
|
shrink,
|
|
56
60
|
customClass,
|
|
57
61
|
preventParentScroll
|
|
@@ -65,7 +69,8 @@ export class CardContent extends Component {
|
|
|
65
69
|
isScrollAttribute: isScrollAttribute,
|
|
66
70
|
dataId: dataId,
|
|
67
71
|
shrink: shrink,
|
|
68
|
-
className: customClass
|
|
72
|
+
className: customClass,
|
|
73
|
+
dataSelectorId: dataSelectorId
|
|
69
74
|
}, children);
|
|
70
75
|
}
|
|
71
76
|
}
|
|
@@ -216,7 +221,8 @@ export default class Card extends Component {
|
|
|
216
221
|
isScrollAttribute: child.props.isScrollAttribute,
|
|
217
222
|
dataId: child.props.dataId,
|
|
218
223
|
shrink: child.props.shrink,
|
|
219
|
-
className: child.props.customClass
|
|
224
|
+
className: child.props.customClass,
|
|
225
|
+
dataSelectorId: child.props.dataSelectorId
|
|
220
226
|
}, child.props.children);
|
|
221
227
|
}
|
|
222
228
|
return child;
|
|
@@ -239,13 +245,16 @@ export class CardFooter extends Component {
|
|
|
239
245
|
render() {
|
|
240
246
|
let {
|
|
241
247
|
children,
|
|
242
|
-
dataId
|
|
243
|
-
customClass
|
|
248
|
+
dataId,
|
|
249
|
+
customClass,
|
|
250
|
+
dataSelectorId
|
|
244
251
|
} = this.props;
|
|
245
252
|
return /*#__PURE__*/React.createElement(Box, {
|
|
246
253
|
className: `${customClass}`,
|
|
247
|
-
dataId: dataId
|
|
254
|
+
dataId: dataId,
|
|
255
|
+
dataSelectorId: dataSelectorId
|
|
248
256
|
}, children);
|
|
249
257
|
}
|
|
250
258
|
}
|
|
251
|
-
CardFooter.propTypes = CardFooter_propTypes;
|
|
259
|
+
CardFooter.propTypes = CardFooter_propTypes;
|
|
260
|
+
CardFooter.defaultProps = CardFooter_defaultProps;
|
|
@@ -6,9 +6,20 @@ export const Card_defaultProps = {
|
|
|
6
6
|
a11y: {},
|
|
7
7
|
isPercentageScroll: false
|
|
8
8
|
};
|
|
9
|
+
export const CardHeader_defaultProps = {
|
|
10
|
+
dataId: 'CardHeader',
|
|
11
|
+
customClass: '',
|
|
12
|
+
dataSelectorId: 'cardHeader'
|
|
13
|
+
};
|
|
9
14
|
export const CardContent_defaultProps = {
|
|
10
15
|
isScrollAttribute: false,
|
|
11
16
|
scroll: 'vertical',
|
|
12
17
|
dataId: 'CardContent',
|
|
13
|
-
customClass: ''
|
|
18
|
+
customClass: '',
|
|
19
|
+
dataSelectorId: 'cardContent'
|
|
20
|
+
};
|
|
21
|
+
export const CardFooter_defaultProps = {
|
|
22
|
+
dataId: 'CardFooter',
|
|
23
|
+
customClass: '',
|
|
24
|
+
dataSelectorId: 'cardFooter'
|
|
14
25
|
};
|
package/es/CheckBox/CheckBox.js
CHANGED
|
@@ -41,7 +41,8 @@ export default class CheckBox extends React.Component {
|
|
|
41
41
|
activeStyle,
|
|
42
42
|
a11y,
|
|
43
43
|
customClass,
|
|
44
|
-
customProps
|
|
44
|
+
customProps,
|
|
45
|
+
dataSelectorId
|
|
45
46
|
} = this.props;
|
|
46
47
|
let {
|
|
47
48
|
CheckBoxProps = {},
|
|
@@ -78,7 +79,7 @@ export default class CheckBox extends React.Component {
|
|
|
78
79
|
"aria-label": ariaLabel,
|
|
79
80
|
"aria-labelledby": ariaLabelledby,
|
|
80
81
|
"aria-hidden": ariaHidden,
|
|
81
|
-
"data-selector": id
|
|
82
|
+
"data-selector-id": dataSelectorId || id
|
|
82
83
|
}, CheckBoxProps), /*#__PURE__*/React.createElement(Box, {
|
|
83
84
|
className: `${style.boxContainer} ${style[size]} ${customCBoxSize} ${isFilled ? style.filled : ''}`
|
|
84
85
|
}, /*#__PURE__*/React.createElement("input", {
|