@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
package/README.md
CHANGED
|
@@ -32,6 +32,17 @@ 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
|
+
|
|
40
|
+
# 1.0.0-alpha-257
|
|
41
|
+
|
|
42
|
+
- **Avatar** - Avatar initial render issue and image border issue solved
|
|
43
|
+
|
|
44
|
+
- **DateWidget** - `boxSize` and `onError` prop has been added.
|
|
45
|
+
|
|
35
46
|
# 1.0.0-alpha-256
|
|
36
47
|
|
|
37
48
|
- **Button** - Safari browser focus issue fix and `customProps` validation.
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
--zdt_avatar_info_bg: var(--dot_mirror);
|
|
24
24
|
|
|
25
25
|
/* avatar team */
|
|
26
|
-
--zdt_avatarteam_default_bg: var(--
|
|
26
|
+
--zdt_avatarteam_default_bg: var(--dot_ebonyclay);
|
|
27
27
|
--zdt_avatarteam_default_border: var(--dot_mirror);
|
|
28
28
|
--zdt_avatarteam_primary_bg: var(--zdt_cta_grey_40_bg);
|
|
29
29
|
--zdt_avatarteam_primary_hover_bg: var(--dot_oslogrey);
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
--zdt_avatar_info_bg: var(--dot_mirror);
|
|
24
24
|
|
|
25
25
|
/* avatar team */
|
|
26
|
-
--zdt_avatarteam_default_bg: var(--
|
|
26
|
+
--zdt_avatarteam_default_bg: var(--dot_white);
|
|
27
27
|
--zdt_avatarteam_default_border: var(--dot_mirror);
|
|
28
28
|
--zdt_avatarteam_primary_bg: var(--zdt_cta_grey_40_bg);
|
|
29
29
|
--zdt_avatarteam_primary_hover_bg: var(--dot_slateGrey);
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
--zdt_avatar_info_bg: var(--dot_mirror);
|
|
24
24
|
|
|
25
25
|
/* avatar team */
|
|
26
|
-
--zdt_avatarteam_default_bg:
|
|
26
|
+
--zdt_avatarteam_default_bg: #212121;
|
|
27
27
|
--zdt_avatarteam_default_border: var(--dot_mirror);
|
|
28
28
|
--zdt_avatarteam_primary_bg: var(--zdt_cta_grey_40_bg);
|
|
29
29
|
--zdt_avatarteam_primary_hover_bg: var(--dot_oslogrey);
|
|
@@ -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,15 +63,18 @@ 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
|
}
|
|
68
72
|
Accordion.propTypes = Accordion_propTypes;
|
|
69
73
|
Accordion.defaultProps = Accordion_defaultProps;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
74
|
+
|
|
75
|
+
// if (__DOCS__) {
|
|
76
|
+
// Accordion.docs = {
|
|
77
|
+
// componentGroup: 'Animation',
|
|
78
|
+
// folderName: 'Style Guide'
|
|
79
|
+
// };
|
|
80
|
+
// }
|
|
@@ -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)
|
|
@@ -50,9 +52,9 @@ export default class AccordionItem extends React.Component {
|
|
|
50
52
|
}
|
|
51
53
|
AccordionItem.propTypes = AccordionItem_propTypes;
|
|
52
54
|
AccordionItem.defaultProps = AccordionItem_defaultProps;
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
55
|
+
// if (__DOCS__) {
|
|
56
|
+
// AccordionItem.docs = {
|
|
57
|
+
// componentGroup: 'Animation',
|
|
58
|
+
// folderName: 'Style Guide'
|
|
59
|
+
// };
|
|
60
|
+
// }
|
|
@@ -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,
|
|
@@ -123,11 +123,12 @@ export default class Animation extends React.Component {
|
|
|
123
123
|
}
|
|
124
124
|
Animation.propTypes = propTypes;
|
|
125
125
|
Animation.defaultProps = defaultProps;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
126
|
+
|
|
127
|
+
// if (__DOCS__) {
|
|
128
|
+
// Animation.docs = {
|
|
129
|
+
// componentGroup: 'Animation',
|
|
130
|
+
// folderName: 'Style Guide',
|
|
131
|
+
// external: true,
|
|
132
|
+
// description: ' '
|
|
133
|
+
// };
|
|
134
|
+
// }
|
|
@@ -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
|
|
@@ -104,9 +107,10 @@ export default class AppContainer extends React.Component {
|
|
|
104
107
|
}
|
|
105
108
|
AppContainer.propTypes = propTypes;
|
|
106
109
|
AppContainer.defaultProps = defaultProps;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
110
|
+
|
|
111
|
+
// if (__DOCS__) {
|
|
112
|
+
// AppContainer.docs = {
|
|
113
|
+
// componentGroup: 'Template',
|
|
114
|
+
// folderName: 'Style Guide'
|
|
115
|
+
// };
|
|
116
|
+
// }
|
|
@@ -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 {
|
|
@@ -134,23 +135,26 @@ export default class Avatar extends React.Component {
|
|
|
134
135
|
initial = initial || this.getInitialByFullName(name);
|
|
135
136
|
let isInvalidImageList = Avatar.invalidImageURLs.indexOf(src) !== -1;
|
|
136
137
|
let isValidImageList = Avatar.validImageURLs.indexOf(src) !== -1;
|
|
137
|
-
let border = borderOnHover || onClick;
|
|
138
|
-
let borderStyle = (!src || src && isInvalidImageList || !isValidImageList) && needBorder ? `${style.border} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} ` : '';
|
|
139
138
|
let showAvatar = src && !isInvalidImageList;
|
|
140
|
-
let showInitial = !showAvatar || showAvatar &&
|
|
139
|
+
let showInitial = !showAvatar || showAvatar && isInvalidImageList;
|
|
141
140
|
const showAlternateAvatar = alternateSrc ? showInitial : false;
|
|
141
|
+
let border = borderOnHover || onClick;
|
|
142
|
+
let borderStyle = (!src || !showAvatar || showInitial) && needBorder ? `${style.border} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} ` : '';
|
|
142
143
|
borderStyle = showAlternateAvatar ? '' : borderStyle;
|
|
143
144
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
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,
|
|
@@ -165,9 +169,9 @@ Avatar.defaultProps = defaultProps;
|
|
|
165
169
|
Avatar.propTypes = propTypes;
|
|
166
170
|
Avatar.invalidImageURLs = [];
|
|
167
171
|
Avatar.validImageURLs = [];
|
|
168
|
-
if (
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
172
|
+
// if (__DOCS__) {
|
|
173
|
+
// Avatar.docs = {
|
|
174
|
+
// componentGroup: 'Avatar Group',
|
|
175
|
+
// folderName: 'Style Guide'
|
|
176
|
+
// };
|
|
177
|
+
// }
|
|
@@ -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,
|
|
@@ -65,10 +67,11 @@ export default class AvatarTeam extends React.Component {
|
|
|
65
67
|
}
|
|
66
68
|
AvatarTeam.defaultProps = defaultProps;
|
|
67
69
|
AvatarTeam.propTypes = propTypes;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
70
|
+
|
|
71
|
+
// if (__DOCS__) {
|
|
72
|
+
// AvatarTeam.docs = {
|
|
73
|
+
// componentGroup: 'Avatar Group',
|
|
74
|
+
// folderName: 'Style Guide',
|
|
75
|
+
// external: true
|
|
76
|
+
// };
|
|
77
|
+
// }
|
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", {
|
|
@@ -56,9 +58,10 @@ export default class Button extends React.Component {
|
|
|
56
58
|
}
|
|
57
59
|
Button.defaultProps = defaultProps;
|
|
58
60
|
Button.propTypes = propTypes;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
61
|
+
|
|
62
|
+
// if (__DOCS__) {
|
|
63
|
+
// Button.docs = {
|
|
64
|
+
// componentGroup: 'Form Elements',
|
|
65
|
+
// folderName: 'Style Guide'
|
|
66
|
+
// };
|
|
67
|
+
// }
|
|
@@ -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));
|
|
@@ -28,15 +32,18 @@ export default class Buttongroup extends React.Component {
|
|
|
28
32
|
}
|
|
29
33
|
Buttongroup.defaultProps = defaultProps;
|
|
30
34
|
Buttongroup.propTypes = propTypes;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
35
|
+
|
|
36
|
+
// if (__DOCS__) {
|
|
37
|
+
// Buttongroup.docs = {
|
|
38
|
+
// componentGroup: 'Molecule',
|
|
39
|
+
// folderName: 'Style Guide',
|
|
40
|
+
// external: false,
|
|
41
|
+
// description: ' ',
|
|
42
|
+
// images: [
|
|
43
|
+
// {
|
|
44
|
+
// view: 'http://zsupport-tech-1.tsi.zohocorpin.com:8080/ui/general/ButtonGroup/v1/ButtonGroup.png',
|
|
45
|
+
// psd: 'http://zsupport-tech-1.tsi.zohocorpin.com:8080/ui/general/ButtonGroup/v1/ButtonGroup.psd'
|
|
46
|
+
// }
|
|
47
|
+
// ]
|
|
48
|
+
// };
|
|
49
|
+
// }
|
|
@@ -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;
|
|
@@ -225,25 +231,30 @@ export default class Card extends Component {
|
|
|
225
231
|
}
|
|
226
232
|
Card.propTypes = Card_propTypes;
|
|
227
233
|
Card.defaultProps = Card_defaultProps;
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}
|
|
234
|
+
|
|
235
|
+
// if (__DOCS__) {
|
|
236
|
+
// Card.docs = {
|
|
237
|
+
// componentGroup: 'Template',
|
|
238
|
+
// folderName: 'Style Guide',
|
|
239
|
+
// external: true,
|
|
240
|
+
// description: ' '
|
|
241
|
+
// };
|
|
242
|
+
// }
|
|
243
|
+
|
|
236
244
|
export class CardFooter extends Component {
|
|
237
245
|
render() {
|
|
238
246
|
let {
|
|
239
247
|
children,
|
|
240
|
-
dataId
|
|
241
|
-
customClass
|
|
248
|
+
dataId,
|
|
249
|
+
customClass,
|
|
250
|
+
dataSelectorId
|
|
242
251
|
} = this.props;
|
|
243
252
|
return /*#__PURE__*/React.createElement(Box, {
|
|
244
253
|
className: `${customClass}`,
|
|
245
|
-
dataId: dataId
|
|
254
|
+
dataId: dataId,
|
|
255
|
+
dataSelectorId: dataSelectorId
|
|
246
256
|
}, children);
|
|
247
257
|
}
|
|
248
258
|
}
|
|
249
|
-
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", {
|
|
@@ -148,9 +149,10 @@ export default class CheckBox extends React.Component {
|
|
|
148
149
|
}
|
|
149
150
|
CheckBox.defaultProps = defaultProps;
|
|
150
151
|
CheckBox.propTypes = propTypes;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
152
|
+
|
|
153
|
+
// if (__DOCS__) {
|
|
154
|
+
// CheckBox.docs = {
|
|
155
|
+
// componentGroup: 'Form Elements',
|
|
156
|
+
// folderName: 'Style Guide'
|
|
157
|
+
// };
|
|
158
|
+
// }
|