@zohodesk/components 1.0.0-alpha-257 → 1.0.0-alpha-258
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 +5 -0
- package/css_error.log +0 -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 +6 -2
- package/es/Avatar/props/defaultProps.js +2 -1
- package/es/Avatar/props/propTypes.js +1 -0
- package/es/AvatarTeam/AvatarTeam.js +3 -1
- package/es/AvatarTeam/props/defaultProps.js +1 -0
- package/es/AvatarTeam/props/propTypes.js +1 -0
- 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/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/lib/Accordion/Accordion.js +9 -3
- package/lib/Accordion/AccordionItem.js +6 -2
- package/lib/Accordion/props/defaultProps.js +6 -2
- package/lib/Accordion/props/propTypes.js +3 -0
- package/lib/Animation/Animation.js +3 -1
- package/lib/AppContainer/AppContainer.js +7 -2
- package/lib/AppContainer/props/defaultProps.js +2 -1
- package/lib/AppContainer/props/propTypes.js +1 -0
- package/lib/Avatar/Avatar.js +10 -4
- package/lib/Avatar/props/defaultProps.js +2 -1
- package/lib/Avatar/props/propTypes.js +1 -0
- package/lib/AvatarTeam/AvatarTeam.js +6 -2
- package/lib/AvatarTeam/props/defaultProps.js +1 -0
- package/lib/AvatarTeam/props/propTypes.js +1 -0
- package/lib/Button/Button.js +6 -2
- package/lib/Button/props/defaultProps.js +1 -0
- package/lib/Button/props/propTypes.js +1 -0
- package/lib/Buttongroup/Buttongroup.js +11 -4
- package/lib/Buttongroup/props/defaultProps.js +3 -1
- package/lib/Buttongroup/props/propTypes.js +3 -1
- package/lib/Card/Card.js +21 -14
- package/lib/Card/props/defaultProps.js +16 -3
- package/lib/CheckBox/CheckBox.js +6 -3
- package/lib/CheckBox/props/propTypes.js +1 -0
- package/lib/DateTime/CalendarView.js +5 -2
- package/lib/DateTime/DateTime.js +5 -3
- package/lib/DateTime/DateTimePopupFooter.js +3 -1
- package/lib/DateTime/DateTimePopupHeader.js +3 -1
- package/lib/DateTime/DateWidget.js +3 -1
- package/lib/DateTime/DaysRow.js +3 -1
- package/lib/DateTime/Time.js +3 -1
- package/lib/DateTime/YearView.js +3 -1
- package/lib/DateTime/dateFormatUtils/timeChange.js +2 -2
- package/lib/DateTime/validator.js +3 -3
- package/lib/DropBox/DropBox.js +8 -2
- package/lib/DropBox/props/defaultProps.js +1 -0
- package/lib/DropBox/props/propTypes.js +1 -0
- package/lib/DropDown/DropDown.js +5 -2
- package/lib/DropDown/DropDownHeading.js +9 -3
- package/lib/DropDown/DropDownItem.js +3 -1
- package/lib/DropDown/DropDownSearch.js +5 -2
- package/lib/DropDown/DropDownSeparator.js +3 -1
- package/lib/DropDown/props/defaultProps.js +3 -1
- package/lib/DropDown/props/propTypes.js +4 -1
- package/lib/Heading/Heading.js +4 -2
- package/lib/Label/Label.js +5 -1
- 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 +7 -2
- package/lib/ListItem/ListItemWithAvatar.js +7 -2
- package/lib/ListItem/ListItemWithCheckBox.js +5 -1
- package/lib/ListItem/ListItemWithIcon.js +7 -2
- package/lib/ListItem/ListItemWithRadio.js +5 -1
- package/lib/ListItem/props/defaultProps.js +12 -6
- package/lib/ListItem/props/propTypes.js +10 -2
- package/lib/Modal/Modal.js +3 -1
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +9 -5
- package/lib/MultiSelect/AdvancedMultiSelect.js +8 -4
- package/lib/MultiSelect/EmptyState.js +3 -1
- package/lib/MultiSelect/MultiSelect.js +8 -4
- package/lib/MultiSelect/MultiSelectHeader.js +3 -1
- package/lib/MultiSelect/MultiSelectWithAvatar.js +6 -2
- package/lib/MultiSelect/SelectedOptions.js +5 -2
- package/lib/MultiSelect/Suggestions.js +4 -2
- package/lib/MultiSelect/props/defaultProps.js +8 -4
- package/lib/MultiSelect/props/propTypes.js +8 -4
- package/lib/PopOver/PopOver.js +3 -1
- package/lib/Popup/Popup.js +4 -2
- package/lib/Popup/__tests__/Popup.spec.js +3 -1
- package/lib/Provider/LibraryContext.js +5 -3
- package/lib/Provider/NumberGenerator/NumberGenerator.js +1 -1
- package/lib/Radio/Radio.js +3 -1
- package/lib/Responsive/CustomResponsive.js +6 -4
- package/lib/Responsive/RefWrapper.js +4 -2
- package/lib/Responsive/ResizeComponent.js +9 -4
- package/lib/Responsive/ResizeObserver.js +4 -1
- package/lib/Responsive/Responsive.js +6 -4
- package/lib/Responsive/sizeObservers.js +4 -2
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +3 -1
- package/lib/Ribbon/Ribbon.js +7 -3
- package/lib/Ribbon/props/defaultProps.js +2 -1
- package/lib/Ribbon/props/propTypes.js +2 -1
- package/lib/Select/GroupSelect.js +9 -5
- package/lib/Select/Select.js +7 -3
- package/lib/Select/SelectWithAvatar.js +7 -3
- package/lib/Select/SelectWithIcon.js +7 -3
- package/lib/Select/__tests__/Select.spec.js +2 -2
- package/lib/Select/props/defaultProps.js +8 -2
- package/lib/Select/props/propTypes.js +8 -4
- package/lib/Stencils/Stencils.js +3 -1
- package/lib/Switch/Switch.js +6 -2
- 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 +6 -4
- package/lib/Tab/Tabs.js +12 -6
- package/lib/Tab/props/defaultProps.js +10 -5
- package/lib/Tab/props/propTypes.js +10 -5
- package/lib/Tag/Tag.js +6 -2
- package/lib/Tag/props/defaultProps.js +2 -1
- package/lib/Tag/props/propTypes.js +2 -1
- package/lib/TextBox/TextBox.js +6 -2
- package/lib/TextBox/props/defaultProps.js +2 -1
- package/lib/TextBox/props/propTypes.js +5 -2
- package/lib/TextBoxIcon/TextBoxIcon.js +7 -2
- package/lib/TextBoxIcon/props/defaultProps.js +2 -1
- package/lib/TextBoxIcon/props/propTypes.js +1 -0
- package/lib/Textarea/Textarea.js +6 -2
- package/lib/Textarea/props/defaultProps.js +2 -1
- package/lib/Textarea/props/propTypes.js +1 -0
- package/lib/Tooltip/Tooltip.js +3 -1
- package/lib/Tooltip/__tests__/Tooltip.spec.js +3 -1
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -1
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -2
- package/lib/deprecated/PortalLayer/PortalLayer.js +3 -1
- package/lib/semantic/Button/Button.js +3 -1
- package/lib/utils/constructFullName.js +2 -2
- package/lib/utils/dropDownUtils.js +5 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -32,6 +32,11 @@ 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-258
|
|
36
|
+
|
|
37
|
+
- **CheckBox** - dataSlector prop changed to dataSelectorId
|
|
38
|
+
- dataSelectorId prop added for all components
|
|
39
|
+
|
|
35
40
|
# 1.0.0-alpha-257
|
|
36
41
|
|
|
37
42
|
- **Avatar** - Avatar initial render issue and image border issue solved
|
package/css_error.log
ADDED
|
File without changes
|
|
@@ -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,6 +124,7 @@ export default class Avatar extends React.Component {
|
|
|
124
124
|
customClass,
|
|
125
125
|
alternateSrc,
|
|
126
126
|
isAnimate,
|
|
127
|
+
dataSelectorId,
|
|
127
128
|
customProps
|
|
128
129
|
} = this.props;
|
|
129
130
|
let {
|
|
@@ -144,13 +145,16 @@ export default class Avatar extends React.Component {
|
|
|
144
145
|
className: `${style.avatar} ${style[size]} ${AvatarSize(size)} ${style[shapeStyle]} ${style[palette]} ${textStyle} ${borderStyle} ${customClass ? customClass : ''}`,
|
|
145
146
|
"data-title": needTitle ? title ? title : name : null,
|
|
146
147
|
"data-id": dataId,
|
|
147
|
-
onClick: onClick
|
|
148
|
+
onClick: onClick,
|
|
149
|
+
"data-selector-id": dataSelectorId
|
|
148
150
|
}, AvatarProps), showInitial && !showAlternateAvatar && /*#__PURE__*/React.createElement("span", {
|
|
149
151
|
className: `${style.initial}`,
|
|
150
|
-
"data-id": `${dataId}_AvatarInitial
|
|
152
|
+
"data-id": `${dataId}_AvatarInitial`,
|
|
153
|
+
"data-selector-id": `${dataSelectorId}_AvatarInitial`
|
|
151
154
|
}, initial), (showAvatar || showAlternateAvatar) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("img", {
|
|
152
155
|
className: `${style.image} ${isAnimate ? style.animate : ''}`,
|
|
153
156
|
"data-id": `${dataId}_AvatarImg`,
|
|
157
|
+
"data-selector-id": `${dataSelectorId}_AvatarImg`,
|
|
154
158
|
name: name,
|
|
155
159
|
onError: this.putInvalidImageURLJSON,
|
|
156
160
|
onLoad: this.putValidImageURLJSON,
|
|
@@ -31,6 +31,7 @@ export default class AvatarTeam extends React.Component {
|
|
|
31
31
|
customClass,
|
|
32
32
|
borderOnActive,
|
|
33
33
|
borderOnHover,
|
|
34
|
+
dataSelectorId,
|
|
34
35
|
customProps
|
|
35
36
|
} = this.props;
|
|
36
37
|
let {
|
|
@@ -44,7 +45,8 @@ export default class AvatarTeam extends React.Component {
|
|
|
44
45
|
let border = borderOnHover || onClick;
|
|
45
46
|
return /*#__PURE__*/React.createElement("span", _extends({
|
|
46
47
|
className: `${style.container} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} `,
|
|
47
|
-
"data-id": dataId
|
|
48
|
+
"data-id": dataId,
|
|
49
|
+
"data-selector-id": dataSelectorId
|
|
48
50
|
}, AvatarTeamProps), /*#__PURE__*/React.createElement(Avatar, _extends({
|
|
49
51
|
name: name,
|
|
50
52
|
onClick: onClick,
|
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", {
|
package/es/DropBox/DropBox.js
CHANGED
|
@@ -46,6 +46,7 @@ export class DropBoxElement extends React.Component {
|
|
|
46
46
|
animationStyle,
|
|
47
47
|
isActive,
|
|
48
48
|
dataId,
|
|
49
|
+
dataSelectorId,
|
|
49
50
|
isModel,
|
|
50
51
|
isAbsolutePositioningNeeded,
|
|
51
52
|
tourId,
|
|
@@ -138,6 +139,7 @@ export class DropBoxElement extends React.Component {
|
|
|
138
139
|
return /*#__PURE__*/React.createElement("div", {
|
|
139
140
|
className: boxClassName,
|
|
140
141
|
"data-id": `${dataId}`,
|
|
142
|
+
"data-selector-id": dataSelectorId,
|
|
141
143
|
ref: this.getRef,
|
|
142
144
|
style: inlineStyle,
|
|
143
145
|
"data-tour": tourId,
|
|
@@ -152,13 +154,15 @@ export class DropBoxElement extends React.Component {
|
|
|
152
154
|
className: `${subContainerClass} ${style[`${palette}Palette`]}`,
|
|
153
155
|
onClick: onClick,
|
|
154
156
|
"data-id": `${dataId}_subcontainer`,
|
|
157
|
+
"data-selector-id": `${dataSelectorId}_subcontainer`,
|
|
155
158
|
ref: subContainerRef
|
|
156
159
|
}, isModel ? /*#__PURE__*/React.createElement("div", {
|
|
157
160
|
className: style.closeBar
|
|
158
161
|
}) : null, isArrow && !isModel && /*#__PURE__*/React.createElement("div", {
|
|
159
162
|
className: style[arrowPosition],
|
|
160
163
|
style: needArrowStyle && arrowstyle,
|
|
161
|
-
"data-id": `${dataId}_arrow
|
|
164
|
+
"data-id": `${dataId}_arrow`,
|
|
165
|
+
"data-selector-id": `${dataSelectorId}_arrow`
|
|
162
166
|
}, /*#__PURE__*/React.createElement("div", {
|
|
163
167
|
className: style.arrowShape
|
|
164
168
|
})), children));
|
|
@@ -10,6 +10,7 @@ export const propTypes = {
|
|
|
10
10
|
boxPosition: PropTypes.oneOf(['bottomRight', 'bottomLeft', 'bottomCenter', 'topRight', 'topLeft', 'topCenter', 'rightTop', 'rightBottom', 'rightCenter', 'leftTop', 'leftBottom', 'leftCenter']),
|
|
11
11
|
children: PropTypes.element,
|
|
12
12
|
dataId: PropTypes.string,
|
|
13
|
+
dataSelectorId: PropTypes.string,
|
|
13
14
|
forwardRef: PropTypes.object,
|
|
14
15
|
getRef: PropTypes.func,
|
|
15
16
|
isAbsolutePositioningNeeded: PropTypes.bool,
|
|
@@ -11,7 +11,9 @@ export default class DropDownHeading extends React.Component {
|
|
|
11
11
|
customClass,
|
|
12
12
|
palette,
|
|
13
13
|
htmlId,
|
|
14
|
-
a11y
|
|
14
|
+
a11y,
|
|
15
|
+
dataId,
|
|
16
|
+
dataSelectorId
|
|
15
17
|
} = this.props;
|
|
16
18
|
let {
|
|
17
19
|
role,
|
|
@@ -24,7 +26,9 @@ export default class DropDownHeading extends React.Component {
|
|
|
24
26
|
role: role,
|
|
25
27
|
"aria-labelledby": ariaLabelledby,
|
|
26
28
|
"aria-label": ariaLabel,
|
|
27
|
-
id: htmlId
|
|
29
|
+
id: htmlId,
|
|
30
|
+
"data-id": dataId,
|
|
31
|
+
"data-selector-id": dataSelectorId
|
|
28
32
|
// tabindex='0'
|
|
29
33
|
}, text, children);
|
|
30
34
|
}
|
package/es/Label/Label.js
CHANGED
|
@@ -18,6 +18,7 @@ export default class Label extends React.Component {
|
|
|
18
18
|
title,
|
|
19
19
|
onClick,
|
|
20
20
|
dataId,
|
|
21
|
+
dataSelectorId,
|
|
21
22
|
variant,
|
|
22
23
|
customClass,
|
|
23
24
|
id
|
|
@@ -28,6 +29,7 @@ export default class Label extends React.Component {
|
|
|
28
29
|
htmlFor: htmlFor,
|
|
29
30
|
"data-title": title,
|
|
30
31
|
"data-id": dataId,
|
|
32
|
+
"data-selector-id": dataSelectorId,
|
|
31
33
|
onClick: onClick,
|
|
32
34
|
id: id
|
|
33
35
|
}, text);
|
|
@@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
|
|
|
2
2
|
export const propTypes = {
|
|
3
3
|
clipped: PropTypes.bool,
|
|
4
4
|
dataId: PropTypes.string,
|
|
5
|
+
dataSelectorId: PropTypes.string,
|
|
5
6
|
htmlFor: PropTypes.string,
|
|
6
7
|
onClick: PropTypes.func,
|
|
7
8
|
palette: PropTypes.oneOf(['default', 'primary', 'secondary', 'danger', 'mandatory', 'disable', 'dark']),
|
package/es/Layout/Box.js
CHANGED
|
@@ -91,7 +91,8 @@ export default function Box(props) {
|
|
|
91
91
|
isScrollAttribute: 'data-scroll',
|
|
92
92
|
eleRef: 'ref',
|
|
93
93
|
dataId: 'data-id',
|
|
94
|
-
tourId: 'data-tour'
|
|
94
|
+
tourId: 'data-tour',
|
|
95
|
+
dataSelectorId: 'data-selector-id'
|
|
95
96
|
});
|
|
96
97
|
return /*#__PURE__*/React.createElement(tagName, childProps);
|
|
97
98
|
}
|
package/es/Layout/Container.js
CHANGED
|
@@ -110,7 +110,8 @@ export default function Container(props) {
|
|
|
110
110
|
isScrollAttribute: 'data-scroll',
|
|
111
111
|
eleRef: 'ref',
|
|
112
112
|
dataId: 'data-id',
|
|
113
|
-
tourId: 'data-tour'
|
|
113
|
+
tourId: 'data-tour',
|
|
114
|
+
dataSelectorId: 'data-selector-id'
|
|
114
115
|
});
|
|
115
116
|
return /*#__PURE__*/React.createElement(tagName, childProps);
|
|
116
117
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export const BoxDefaultProps = {
|
|
2
2
|
dataId: 'boxComponent',
|
|
3
3
|
isScrollAttribute: false,
|
|
4
|
-
tagName: 'div'
|
|
4
|
+
tagName: 'div',
|
|
5
|
+
dataSelectorId: 'box'
|
|
5
6
|
};
|
|
6
7
|
export const ContainerDefaultProps = {
|
|
7
8
|
dataId: 'containerComponent',
|
|
8
9
|
isScrollAttribute: false,
|
|
9
10
|
isCover: true,
|
|
10
11
|
alignBox: 'column',
|
|
11
|
-
tagName: 'div'
|
|
12
|
+
tagName: 'div',
|
|
13
|
+
dataSelectorId: 'container'
|
|
12
14
|
};
|
|
@@ -6,6 +6,7 @@ export const BoxProps = {
|
|
|
6
6
|
className: PropTypes.string,
|
|
7
7
|
column: PropTypes.oneOf(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']),
|
|
8
8
|
dataId: PropTypes.string,
|
|
9
|
+
dataSelectorId: PropTypes.string,
|
|
9
10
|
eleRef: PropTypes.func,
|
|
10
11
|
flexible: PropTypes.bool,
|
|
11
12
|
hidden: PropTypes.arrayOf((propValue, key, componentName, location, propFullName) => {
|
|
@@ -29,6 +30,7 @@ export const ContainerProps = {
|
|
|
29
30
|
children: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
|
|
30
31
|
className: PropTypes.string,
|
|
31
32
|
dataId: PropTypes.string,
|
|
33
|
+
dataSelectorId: PropTypes.string,
|
|
32
34
|
eleRef: PropTypes.func,
|
|
33
35
|
hidden: PropTypes.array,
|
|
34
36
|
isCover: PropTypes.bool,
|
|
@@ -24,6 +24,7 @@ const ListContainer = props => {
|
|
|
24
24
|
isDisabled,
|
|
25
25
|
children,
|
|
26
26
|
dataId,
|
|
27
|
+
dataSelectorId,
|
|
27
28
|
a11y,
|
|
28
29
|
customClass,
|
|
29
30
|
customProps,
|
|
@@ -74,6 +75,7 @@ const ListContainer = props => {
|
|
|
74
75
|
alignBox: "row",
|
|
75
76
|
className: `${style.list} ${style[size]} ${mobileToTab && isTouchDevice ? style.responsiveHeight : ''} ${style[palette]} ${active ? style[`active${palette}`] : highlight && !isDisabled ? style[`${palette}Hover`] : ''} ${autoHover && !isDisabled ? style[`${palette}Effect`] : ''} ${needTick ? style[`${size}withTick`] : ''} ${isDisabled ? CssProvider('isDisable') : ''} ${needBorder ? active ? style.activewithBorder : style.withBorder : ''} ${customClass}`,
|
|
76
77
|
dataId: dataId,
|
|
78
|
+
dataSelectorId: dataSelectorId,
|
|
77
79
|
onClick: !isDisabled && onClick,
|
|
78
80
|
onMouseEnter: onMouseEnter,
|
|
79
81
|
onMouseOver: onMouseOver,
|
package/es/ListItem/ListItem.js
CHANGED
|
@@ -61,6 +61,7 @@ export default class ListItem extends React.Component {
|
|
|
61
61
|
isDisabled,
|
|
62
62
|
children,
|
|
63
63
|
dataId,
|
|
64
|
+
dataSelectorId,
|
|
64
65
|
a11y,
|
|
65
66
|
customClass,
|
|
66
67
|
customProps
|
|
@@ -90,6 +91,7 @@ export default class ListItem extends React.Component {
|
|
|
90
91
|
needBorder: needBorder,
|
|
91
92
|
customClass: customListItem,
|
|
92
93
|
dataId: dataIdString,
|
|
94
|
+
dataSelectorId: `${dataSelectorId}`,
|
|
93
95
|
isLink: isLink,
|
|
94
96
|
href: href,
|
|
95
97
|
target: target,
|
|
@@ -110,7 +112,8 @@ export default class ListItem extends React.Component {
|
|
|
110
112
|
}, children) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
111
113
|
className: `${style.tickIcon} ${tickIconPalette} ${customTickIcon}`,
|
|
112
114
|
"aria-hidden": ariaHidden,
|
|
113
|
-
dataId: `${dataIdString}_tickIcon
|
|
115
|
+
dataId: `${dataIdString}_tickIcon`,
|
|
116
|
+
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
114
117
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
115
118
|
name: "ZD-ticknew",
|
|
116
119
|
size: "8"
|