@zohodesk/components 1.0.0-alpha-256 → 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 +11 -0
- package/assets/Appearance/dark/mode/darkMode.module.css +1 -1
- package/assets/Appearance/default/mode/defaultMode.module.css +1 -1
- package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +1 -1
- package/es/Accordion/Accordion.js +13 -8
- package/es/Accordion/AccordionItem.js +9 -7
- package/es/Accordion/props/defaultProps.js +6 -2
- package/es/Accordion/props/propTypes.js +3 -0
- package/es/Animation/Animation.js +9 -8
- package/es/AppContainer/AppContainer.js +11 -7
- package/es/AppContainer/props/defaultProps.js +2 -1
- package/es/AppContainer/props/propTypes.js +1 -0
- package/es/Avatar/Avatar.js +15 -11
- package/es/Avatar/props/defaultProps.js +2 -1
- package/es/Avatar/props/propTypes.js +1 -0
- package/es/AvatarTeam/AvatarTeam.js +11 -8
- package/es/AvatarTeam/props/defaultProps.js +1 -0
- package/es/AvatarTeam/props/propTypes.js +1 -0
- package/es/Button/Button.js +10 -7
- package/es/Button/props/defaultProps.js +1 -0
- package/es/Button/props/propTypes.js +1 -0
- package/es/Buttongroup/Buttongroup.js +21 -14
- package/es/Buttongroup/props/defaultProps.js +3 -1
- package/es/Buttongroup/props/propTypes.js +3 -1
- package/es/Card/Card.js +29 -18
- package/es/Card/props/defaultProps.js +12 -1
- package/es/CheckBox/CheckBox.js +10 -8
- package/es/CheckBox/props/propTypes.js +1 -0
- package/es/DateTime/DateWidget.js +17 -12
- package/es/DateTime/props/propTypes.js +3 -1
- package/es/DropBox/DropBox.js +13 -9
- package/es/DropBox/props/defaultProps.js +1 -0
- package/es/DropBox/props/propTypes.js +1 -0
- package/es/DropDown/DropDown.js +8 -6
- package/es/DropDown/DropDownHeading.js +13 -8
- package/es/DropDown/props/defaultProps.js +3 -1
- package/es/Heading/Heading.js +7 -6
- package/es/Label/Label.js +9 -6
- 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 +9 -6
- package/es/ListItem/ListItem.js +11 -7
- package/es/ListItem/ListItemWithAvatar.js +10 -7
- package/es/ListItem/ListItemWithCheckBox.js +8 -6
- package/es/ListItem/ListItemWithIcon.js +11 -7
- package/es/ListItem/ListItemWithRadio.js +9 -6
- package/es/ListItem/props/defaultProps.js +12 -6
- package/es/ListItem/props/propTypes.js +6 -0
- package/es/Modal/Modal.js +9 -8
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +10 -7
- package/es/MultiSelect/AdvancedMultiSelect.js +14 -10
- package/es/MultiSelect/MultiSelect.js +10 -7
- package/es/MultiSelect/MultiSelectWithAvatar.js +13 -9
- package/es/MultiSelect/props/defaultProps.js +8 -4
- package/es/MultiSelect/props/propTypes.js +8 -4
- package/es/PopOver/PopOver.js +8 -8
- package/es/Radio/Radio.js +6 -6
- package/es/Ribbon/Ribbon.js +18 -14
- package/es/Ribbon/props/defaultProps.js +2 -1
- package/es/Ribbon/props/propTypes.js +2 -1
- package/es/RippleEffect/RippleEffect.js +7 -6
- package/es/Select/GroupSelect.js +13 -10
- package/es/Select/Select.js +15 -12
- package/es/Select/SelectWithAvatar.js +14 -10
- package/es/Select/SelectWithIcon.js +11 -8
- package/es/Select/props/defaultProps.js +4 -0
- package/es/Select/props/propTypes.js +8 -4
- package/es/Stencils/Stencils.js +9 -8
- package/es/Switch/Switch.js +10 -7
- package/es/Switch/props/defaultProps.js +2 -1
- package/es/Switch/props/propTypes.js +1 -0
- package/es/Tab/Tab.js +10 -7
- 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 +9 -7
- package/es/Tag/props/defaultProps.js +2 -1
- package/es/Tag/props/propTypes.js +2 -1
- package/es/TextBox/TextBox.js +12 -9
- package/es/TextBox/props/defaultProps.js +2 -1
- package/es/TextBox/props/propTypes.js +2 -1
- package/es/TextBoxIcon/TextBoxIcon.js +10 -8
- package/es/TextBoxIcon/props/defaultProps.js +2 -1
- package/es/TextBoxIcon/props/propTypes.js +1 -0
- package/es/Textarea/Textarea.js +12 -9
- package/es/Textarea/props/defaultProps.js +2 -1
- package/es/Textarea/props/propTypes.js +1 -0
- package/es/Tooltip/Tooltip.js +9 -8
- package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +5 -5
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +6 -5
- package/es/deprecated/PortalLayer/PortalLayer.js +7 -6
- package/es/semantic/Button/Button.js +6 -6
- package/install.md +10 -0
- package/lib/Accordion/Accordion.js +16 -9
- package/lib/Accordion/AccordionItem.js +12 -8
- package/lib/Accordion/props/defaultProps.js +6 -2
- package/lib/Accordion/props/propTypes.js +3 -0
- package/lib/Animation/Animation.js +12 -9
- package/lib/AppContainer/AppContainer.js +14 -8
- package/lib/AppContainer/props/defaultProps.js +2 -1
- package/lib/AppContainer/props/propTypes.js +1 -0
- package/lib/Avatar/Avatar.js +19 -13
- package/lib/Avatar/props/defaultProps.js +2 -1
- package/lib/Avatar/props/propTypes.js +1 -0
- package/lib/AvatarTeam/AvatarTeam.js +14 -9
- package/lib/AvatarTeam/props/defaultProps.js +1 -0
- package/lib/AvatarTeam/props/propTypes.js +1 -0
- package/lib/Button/Button.js +13 -8
- package/lib/Button/props/defaultProps.js +1 -0
- package/lib/Button/props/propTypes.js +1 -0
- package/lib/Buttongroup/Buttongroup.js +26 -16
- package/lib/Buttongroup/props/defaultProps.js +3 -1
- package/lib/Buttongroup/props/propTypes.js +3 -1
- package/lib/Card/Card.js +30 -22
- package/lib/Card/props/defaultProps.js +16 -3
- package/lib/CheckBox/CheckBox.js +13 -9
- 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 +19 -13
- 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/props/propTypes.js +3 -1
- package/lib/DateTime/validator.js +3 -3
- package/lib/DropBox/DropBox.js +16 -10
- package/lib/DropBox/props/defaultProps.js +1 -0
- package/lib/DropBox/props/propTypes.js +1 -0
- package/lib/DropDown/DropDown.js +12 -8
- package/lib/DropDown/DropDownHeading.js +16 -9
- 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 +11 -8
- package/lib/Label/Label.js +12 -7
- 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 +9 -8
- package/lib/ListItem/ListItem.js +14 -8
- package/lib/ListItem/ListItemWithAvatar.js +13 -8
- package/lib/ListItem/ListItemWithCheckBox.js +11 -7
- package/lib/ListItem/ListItemWithIcon.js +14 -8
- package/lib/ListItem/ListItemWithRadio.js +12 -7
- package/lib/ListItem/props/defaultProps.js +12 -6
- package/lib/ListItem/props/propTypes.js +10 -2
- package/lib/Modal/Modal.js +12 -9
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +15 -11
- package/lib/MultiSelect/AdvancedMultiSelect.js +17 -12
- package/lib/MultiSelect/EmptyState.js +3 -1
- package/lib/MultiSelect/MultiSelect.js +15 -10
- package/lib/MultiSelect/MultiSelectHeader.js +3 -1
- package/lib/MultiSelect/MultiSelectWithAvatar.js +15 -10
- 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 +11 -9
- 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 +9 -7
- 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 +21 -15
- package/lib/Ribbon/props/defaultProps.js +2 -1
- package/lib/Ribbon/props/propTypes.js +2 -1
- package/lib/RippleEffect/RippleEffect.js +7 -6
- package/lib/Select/GroupSelect.js +18 -15
- package/lib/Select/Select.js +18 -15
- package/lib/Select/SelectWithAvatar.js +16 -11
- package/lib/Select/SelectWithIcon.js +14 -9
- 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 +12 -9
- package/lib/Switch/Switch.js +13 -8
- package/lib/Switch/props/defaultProps.js +2 -1
- package/lib/Switch/props/propTypes.js +1 -0
- package/lib/Tab/Tab.js +10 -7
- 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 +12 -8
- package/lib/Tag/props/defaultProps.js +2 -1
- package/lib/Tag/props/propTypes.js +2 -1
- package/lib/TextBox/TextBox.js +15 -10
- package/lib/TextBox/props/defaultProps.js +2 -1
- package/lib/TextBox/props/propTypes.js +5 -2
- package/lib/TextBoxIcon/TextBoxIcon.js +15 -10
- package/lib/TextBoxIcon/props/defaultProps.js +2 -1
- package/lib/TextBoxIcon/props/propTypes.js +1 -0
- package/lib/Textarea/Textarea.js +15 -10
- package/lib/Textarea/props/defaultProps.js +2 -1
- package/lib/Textarea/props/propTypes.js +1 -0
- package/lib/Tooltip/Tooltip.js +12 -9
- package/lib/Tooltip/__tests__/Tooltip.spec.js +3 -1
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +8 -6
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +10 -7
- package/lib/deprecated/PortalLayer/PortalLayer.js +10 -7
- package/lib/semantic/Button/Button.js +9 -7
- package/lib/utils/constructFullName.js +2 -2
- package/lib/utils/dropDownUtils.js +5 -3
- package/package.json +11 -6
|
@@ -920,7 +920,9 @@ class DateWidgetComponent extends React.Component {
|
|
|
920
920
|
targetOffset,
|
|
921
921
|
isRestrictScroll,
|
|
922
922
|
dropBoxPortalId,
|
|
923
|
-
a11y
|
|
923
|
+
a11y,
|
|
924
|
+
boxSize,
|
|
925
|
+
onError
|
|
924
926
|
} = this.props;
|
|
925
927
|
const {
|
|
926
928
|
selected: value = '',
|
|
@@ -1006,7 +1008,9 @@ class DateWidgetComponent extends React.Component {
|
|
|
1006
1008
|
positionsOffset: positionsOffset,
|
|
1007
1009
|
targetOffset: targetOffset,
|
|
1008
1010
|
isRestrictScroll: isRestrictScroll,
|
|
1009
|
-
dropBoxPortalId: dropBoxPortalId
|
|
1011
|
+
dropBoxPortalId: dropBoxPortalId,
|
|
1012
|
+
boxSize: boxSize,
|
|
1013
|
+
onError: onError
|
|
1010
1014
|
}));
|
|
1011
1015
|
}
|
|
1012
1016
|
}
|
|
@@ -1016,14 +1020,15 @@ const DateWidget = Popup(DateWidgetComponent);
|
|
|
1016
1020
|
DateWidget.defaultProps = DateWidgetComponent.defaultProps;
|
|
1017
1021
|
|
|
1018
1022
|
// eslint-disable-next-line no-undef
|
|
1019
|
-
if (
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
}
|
|
1023
|
+
// if (__DOCS__) {
|
|
1024
|
+
// DateWidgetComponent.docs = {
|
|
1025
|
+
// componentGroup: 'Form Elements',
|
|
1026
|
+
// folderName: 'Style Guide',
|
|
1027
|
+
// external: true,
|
|
1028
|
+
// description: ' '
|
|
1029
|
+
// };
|
|
1030
|
+
// // eslint-disable-next-line react/forbid-foreign-prop-types
|
|
1031
|
+
// DateWidget.propTypes = DateWidgetComponent.propTypes;
|
|
1032
|
+
// }
|
|
1033
|
+
|
|
1029
1034
|
export default DateWidget;
|
|
@@ -121,7 +121,9 @@ export const DateWidget_propTypes = {
|
|
|
121
121
|
is24Hour: PropTypes.bool,
|
|
122
122
|
isHideCurrentYear: PropTypes.bool,
|
|
123
123
|
onFocus: PropTypes.func,
|
|
124
|
-
onBlur: PropTypes.func
|
|
124
|
+
onBlur: PropTypes.func,
|
|
125
|
+
boxSize: PropTypes.string,
|
|
126
|
+
onError: PropTypes.func
|
|
125
127
|
};
|
|
126
128
|
export const YearView_propTypes = {
|
|
127
129
|
dataId: PropTypes.string,
|
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));
|
|
@@ -237,11 +241,11 @@ export default class DropBox extends React.Component {
|
|
|
237
241
|
DropBox.propTypes = propTypes;
|
|
238
242
|
DropBox.contextType = LibraryContext;
|
|
239
243
|
DropBox.defaultProps = defaultProps;
|
|
240
|
-
if (
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
244
|
+
// if (__DOCS__) {
|
|
245
|
+
// DropBox.docs = {
|
|
246
|
+
// componentGroup: 'Atom',
|
|
247
|
+
// folderName: 'Style Guide',
|
|
248
|
+
// external: true,
|
|
249
|
+
// description: ' '
|
|
250
|
+
// };
|
|
251
|
+
// }
|
|
@@ -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,
|
package/es/DropDown/DropDown.js
CHANGED
|
@@ -15,12 +15,14 @@ export default class DropDown extends React.Component {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
DropDown.propTypes = DropDown_propTypes;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
18
|
+
|
|
19
|
+
// if (__DOCS__) {
|
|
20
|
+
// DropDown.docs = {
|
|
21
|
+
// componentGroup: 'Form Elements',
|
|
22
|
+
// folderName: 'Style Guide'
|
|
23
|
+
// };
|
|
24
|
+
// }
|
|
25
|
+
|
|
24
26
|
export class DropDownTarget extends React.Component {
|
|
25
27
|
render() {
|
|
26
28
|
let {
|
|
@@ -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,16 +26,19 @@ 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
|
}
|
|
31
35
|
}
|
|
32
36
|
DropDownHeading.propTypes = DropDownHeading_propTypes;
|
|
33
37
|
DropDownHeading.defaultProps = DropDownHeading_defaultProps;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
38
|
+
|
|
39
|
+
// if (__DOCS__) {
|
|
40
|
+
// DropDownHeading.docs = {
|
|
41
|
+
// componentGroup: 'Form Elements',
|
|
42
|
+
// folderName: 'Style Guide'
|
|
43
|
+
// };
|
|
44
|
+
// }
|
package/es/Heading/Heading.js
CHANGED
|
@@ -26,9 +26,10 @@ export default class Heading extends React.Component {
|
|
|
26
26
|
}
|
|
27
27
|
Heading.propTypes = propTypes;
|
|
28
28
|
Heading.defaultProps = defaultProps;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
29
|
+
|
|
30
|
+
// if (__DOCS__) {
|
|
31
|
+
// Heading.docs = {
|
|
32
|
+
// folderName: 'Style Guide',
|
|
33
|
+
// componentGroup: 'Accessibility'
|
|
34
|
+
// };
|
|
35
|
+
// }
|
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);
|
|
@@ -35,9 +37,10 @@ export default class Label extends React.Component {
|
|
|
35
37
|
}
|
|
36
38
|
Label.defaultProps = defaultProps;
|
|
37
39
|
Label.propTypes = propTypes;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
40
|
+
|
|
41
|
+
// if (__DOCS__) {
|
|
42
|
+
// Label.docs = {
|
|
43
|
+
// componentGroup: 'Form Elements',
|
|
44
|
+
// folderName: 'Style Guide'
|
|
45
|
+
// };
|
|
46
|
+
// }
|
|
@@ -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,
|
|
@@ -85,9 +87,10 @@ const ListContainer = props => {
|
|
|
85
87
|
ListContainer.defaultProps = ListContainerDefaultProps;
|
|
86
88
|
ListContainer.propTypes = ListContainer_Props;
|
|
87
89
|
export default ListContainer;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
90
|
+
|
|
91
|
+
// if (__DOCS__) {
|
|
92
|
+
// ListContainer.docs = {
|
|
93
|
+
// componentGroup: 'Molecule',
|
|
94
|
+
// folderName: 'Style Guide'
|
|
95
|
+
// };
|
|
96
|
+
// }
|
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"
|
|
@@ -119,9 +122,10 @@ export default class ListItem extends React.Component {
|
|
|
119
122
|
}
|
|
120
123
|
ListItem.defaultProps = ListItemDefaultProps;
|
|
121
124
|
ListItem.propTypes = ListItem_Props;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
125
|
+
|
|
126
|
+
// if (__DOCS__) {
|
|
127
|
+
// ListItem.docs = {
|
|
128
|
+
// componentGroup: 'Molecule',
|
|
129
|
+
// folderName: 'Style Guide'
|
|
130
|
+
// };
|
|
131
|
+
// }
|
|
@@ -60,6 +60,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
60
60
|
title,
|
|
61
61
|
needTick,
|
|
62
62
|
dataId,
|
|
63
|
+
dataSelectorId,
|
|
63
64
|
initial,
|
|
64
65
|
isDisabled,
|
|
65
66
|
needBorder,
|
|
@@ -96,6 +97,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
96
97
|
needBorder: needBorder,
|
|
97
98
|
customClass: customListItem,
|
|
98
99
|
dataId: `${dataIdString}_ListItemWithAvatar`,
|
|
100
|
+
dataSelectorId: `${dataSelectorId}`,
|
|
99
101
|
onClick: this.handleClick,
|
|
100
102
|
onMouseEnter: this.handleMouseEnter,
|
|
101
103
|
eleRef: this.getRef,
|
|
@@ -132,7 +134,8 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
132
134
|
}, value) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
133
135
|
className: style.tickIcon,
|
|
134
136
|
"aria-hidden": ariaHidden,
|
|
135
|
-
dataId: `${dataIdString}_tickIcon
|
|
137
|
+
dataId: `${dataIdString}_tickIcon`,
|
|
138
|
+
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
136
139
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
137
140
|
name: "ZD-ticknew",
|
|
138
141
|
size: "8"
|
|
@@ -141,9 +144,9 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
141
144
|
}
|
|
142
145
|
ListItemWithAvatar.defaultProps = ListItemWithAvatarDefaultProps;
|
|
143
146
|
ListItemWithAvatar.propTypes = ListItemWithAvatar_Props;
|
|
144
|
-
if (
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
147
|
+
// if (__DOCS__) {
|
|
148
|
+
// ListItemWithAvatar.docs = {
|
|
149
|
+
// componentGroup: 'Molecule',
|
|
150
|
+
// folderName: 'Style Guide'
|
|
151
|
+
// };
|
|
152
|
+
// }
|
|
@@ -49,6 +49,7 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
49
49
|
autoHover,
|
|
50
50
|
palette,
|
|
51
51
|
dataId,
|
|
52
|
+
dataSelectorId,
|
|
52
53
|
title,
|
|
53
54
|
isDisabled,
|
|
54
55
|
disableTitle,
|
|
@@ -75,6 +76,7 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
75
76
|
autoHover: autoHover,
|
|
76
77
|
customClass: customListItem,
|
|
77
78
|
dataId: `${dataId ? dataId : value}_ListItemWithCheckBox`,
|
|
79
|
+
dataSelectorId: dataSelectorId,
|
|
78
80
|
onClick: this.onClick,
|
|
79
81
|
onMouseOver: this.onHover,
|
|
80
82
|
eleRef: this.getRef,
|
|
@@ -102,9 +104,9 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
102
104
|
}
|
|
103
105
|
ListItemWithCheckBox.defaultProps = ListItemWithCheckBoxDefaultProps;
|
|
104
106
|
ListItemWithCheckBox.propTypes = ListItemWithCheckBox_Props;
|
|
105
|
-
if (
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
107
|
+
// if (__DOCS__) {
|
|
108
|
+
// ListItemWithCheckBox.docs = {
|
|
109
|
+
// componentGroup: 'Molecule',
|
|
110
|
+
// folderName: 'Style Guide'
|
|
111
|
+
// };
|
|
112
|
+
// }
|
|
@@ -54,6 +54,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
54
54
|
palette,
|
|
55
55
|
iconClass,
|
|
56
56
|
dataId,
|
|
57
|
+
dataSelectorId,
|
|
57
58
|
title,
|
|
58
59
|
needTick,
|
|
59
60
|
isLink,
|
|
@@ -86,6 +87,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
86
87
|
needBorder: needBorder,
|
|
87
88
|
customClass: customClass,
|
|
88
89
|
dataId: dataIdString,
|
|
90
|
+
dataSelectorId: dataSelectorId,
|
|
89
91
|
isLink: isLink,
|
|
90
92
|
href: href,
|
|
91
93
|
target: target,
|
|
@@ -114,7 +116,8 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
114
116
|
}, value), needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
115
117
|
className: style.tickIcon,
|
|
116
118
|
"aria-hidden": ariaHidden,
|
|
117
|
-
dataId: `${dataIdString}_tickIcon
|
|
119
|
+
dataId: `${dataIdString}_tickIcon`,
|
|
120
|
+
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
118
121
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
119
122
|
name: "ZD-ticknew",
|
|
120
123
|
size: "8"
|
|
@@ -123,9 +126,10 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
123
126
|
}
|
|
124
127
|
ListItemWithIcon.defaultProps = ListItemWithIconDefaultProps;
|
|
125
128
|
ListItemWithIcon.propTypes = ListItemWithIcon_Props;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
129
|
+
|
|
130
|
+
// if (__DOCS__) {
|
|
131
|
+
// ListItemWithIcon.docs = {
|
|
132
|
+
// componentGroup: 'Molecule',
|
|
133
|
+
// folderName: 'Style Guide'
|
|
134
|
+
// };
|
|
135
|
+
// }
|
|
@@ -50,6 +50,7 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
50
50
|
palette,
|
|
51
51
|
id,
|
|
52
52
|
dataId,
|
|
53
|
+
dataSelectorId,
|
|
53
54
|
title,
|
|
54
55
|
isDisabled,
|
|
55
56
|
disableTitle,
|
|
@@ -76,6 +77,7 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
76
77
|
autoHover: autoHover,
|
|
77
78
|
customClass: customListItem,
|
|
78
79
|
dataId: dataId,
|
|
80
|
+
dataSelectorId: dataSelectorId,
|
|
79
81
|
onClick: this.onClick,
|
|
80
82
|
onMouseOver: this.onHover,
|
|
81
83
|
eleRef: this.getRef,
|
|
@@ -104,9 +106,10 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
104
106
|
}
|
|
105
107
|
ListItemWithRadio.defaultProps = ListItemWithRadioDefaultProps;
|
|
106
108
|
ListItemWithRadio.propTypes = ListItemWithRadio_Props;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
109
|
+
|
|
110
|
+
// if (__DOCS__) {
|
|
111
|
+
// ListItemWithRadio.docs = {
|
|
112
|
+
// componentGroup: 'Molecule',
|
|
113
|
+
// folderName: 'Style Guide'
|
|
114
|
+
// };
|
|
115
|
+
// }
|
|
@@ -10,7 +10,8 @@ export const ListContainerDefaultProps = {
|
|
|
10
10
|
needBorder: true,
|
|
11
11
|
a11y: {},
|
|
12
12
|
customClass: '',
|
|
13
|
-
customProps: {}
|
|
13
|
+
customProps: {},
|
|
14
|
+
dataSelectorId: 'listContainer'
|
|
14
15
|
};
|
|
15
16
|
export const ListItemDefaultProps = {
|
|
16
17
|
active: false,
|
|
@@ -25,7 +26,8 @@ export const ListItemDefaultProps = {
|
|
|
25
26
|
needBorder: true,
|
|
26
27
|
a11y: {},
|
|
27
28
|
customClass: {},
|
|
28
|
-
customProps: {}
|
|
29
|
+
customProps: {},
|
|
30
|
+
dataSelectorId: 'listItem'
|
|
29
31
|
};
|
|
30
32
|
export const ListItemWithAvatarDefaultProps = {
|
|
31
33
|
active: false,
|
|
@@ -41,7 +43,8 @@ export const ListItemWithAvatarDefaultProps = {
|
|
|
41
43
|
needAvatarTitle: true,
|
|
42
44
|
a11y: {},
|
|
43
45
|
customClass: {},
|
|
44
|
-
customProps: {}
|
|
46
|
+
customProps: {},
|
|
47
|
+
dataSelectorId: 'listItemWithAvatar'
|
|
45
48
|
};
|
|
46
49
|
export const ListItemWithCheckBoxDefaultProps = {
|
|
47
50
|
active: false,
|
|
@@ -53,7 +56,8 @@ export const ListItemWithCheckBoxDefaultProps = {
|
|
|
53
56
|
value: 'List',
|
|
54
57
|
a11y: {},
|
|
55
58
|
customClass: {},
|
|
56
|
-
customProps: {}
|
|
59
|
+
customProps: {},
|
|
60
|
+
dataSelectorId: 'listItemWithCheckBox'
|
|
57
61
|
};
|
|
58
62
|
export const ListItemWithIconDefaultProps = {
|
|
59
63
|
active: false,
|
|
@@ -68,7 +72,8 @@ export const ListItemWithIconDefaultProps = {
|
|
|
68
72
|
needBorder: true,
|
|
69
73
|
a11y: {},
|
|
70
74
|
customClass: '',
|
|
71
|
-
customProps: {}
|
|
75
|
+
customProps: {},
|
|
76
|
+
dataSelectorId: 'listItemWithIcon'
|
|
72
77
|
};
|
|
73
78
|
export const ListItemWithRadioDefaultProps = {
|
|
74
79
|
active: false,
|
|
@@ -81,5 +86,6 @@ export const ListItemWithRadioDefaultProps = {
|
|
|
81
86
|
dataId: 'listItemWithRadioComp',
|
|
82
87
|
a11y: {},
|
|
83
88
|
customClass: {},
|
|
84
|
-
customProps: {}
|
|
89
|
+
customProps: {},
|
|
90
|
+
dataSelectorId: 'listItemWithRadio'
|
|
85
91
|
};
|
|
@@ -4,6 +4,7 @@ export const ListContainer_Props = {
|
|
|
4
4
|
autoHover: PropTypes.bool,
|
|
5
5
|
children: PropTypes.node,
|
|
6
6
|
dataId: PropTypes.string,
|
|
7
|
+
dataSelectorId: PropTypes.string,
|
|
7
8
|
disableTitle: PropTypes.string,
|
|
8
9
|
highlight: PropTypes.bool,
|
|
9
10
|
href: PropTypes.string,
|
|
@@ -30,6 +31,7 @@ export const ListItem_Props = {
|
|
|
30
31
|
autoHover: PropTypes.bool,
|
|
31
32
|
children: PropTypes.node,
|
|
32
33
|
dataId: PropTypes.string,
|
|
34
|
+
dataSelectorId: PropTypes.string,
|
|
33
35
|
disableTitle: PropTypes.string,
|
|
34
36
|
getRef: PropTypes.func,
|
|
35
37
|
highlight: PropTypes.bool,
|
|
@@ -65,6 +67,7 @@ export const ListItemWithAvatar_Props = {
|
|
|
65
67
|
avatarPalette: PropTypes.string,
|
|
66
68
|
avatarPalette: PropTypes.string,
|
|
67
69
|
dataId: PropTypes.string,
|
|
70
|
+
dataSelectorId: PropTypes.string,
|
|
68
71
|
disableTitle: PropTypes.string,
|
|
69
72
|
getRef: PropTypes.func,
|
|
70
73
|
highlight: PropTypes.bool,
|
|
@@ -103,6 +106,7 @@ export const ListItemWithCheckBox_Props = {
|
|
|
103
106
|
autoHover: PropTypes.bool,
|
|
104
107
|
checked: PropTypes.bool,
|
|
105
108
|
dataId: PropTypes.string,
|
|
109
|
+
dataSelectorId: PropTypes.string,
|
|
106
110
|
disableTitle: PropTypes.string,
|
|
107
111
|
getRef: PropTypes.func,
|
|
108
112
|
highlight: PropTypes.bool,
|
|
@@ -129,6 +133,7 @@ export const ListItemWithIcon_Props = {
|
|
|
129
133
|
active: PropTypes.bool,
|
|
130
134
|
autoHover: PropTypes.bool,
|
|
131
135
|
dataId: PropTypes.string,
|
|
136
|
+
dataSelectorId: PropTypes.string,
|
|
132
137
|
disableTitle: PropTypes.string,
|
|
133
138
|
getRef: PropTypes.func,
|
|
134
139
|
highlight: PropTypes.bool,
|
|
@@ -161,6 +166,7 @@ export const ListItemWithRadio_Props = {
|
|
|
161
166
|
autoHover: PropTypes.bool,
|
|
162
167
|
checked: PropTypes.bool,
|
|
163
168
|
dataId: PropTypes.string,
|
|
169
|
+
dataSelectorId: PropTypes.string,
|
|
164
170
|
disableTitle: PropTypes.string,
|
|
165
171
|
getRef: PropTypes.func,
|
|
166
172
|
highlight: PropTypes.bool,
|