@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/es/Switch/Switch.js
CHANGED
|
@@ -32,6 +32,7 @@ export default class Switch extends React.Component {
|
|
|
32
32
|
title,
|
|
33
33
|
disableTitle,
|
|
34
34
|
dataId,
|
|
35
|
+
dataSelectorId,
|
|
35
36
|
customClass,
|
|
36
37
|
customProps
|
|
37
38
|
} = this.props;
|
|
@@ -55,7 +56,8 @@ export default class Switch extends React.Component {
|
|
|
55
56
|
"data-title": disabled ? disableTitle : title,
|
|
56
57
|
"aria-checked": checked,
|
|
57
58
|
role: "switch",
|
|
58
|
-
tabIndex: isReadOnly || disabled ? '-1' : '0'
|
|
59
|
+
tabIndex: isReadOnly || disabled ? '-1' : '0',
|
|
60
|
+
dataSelectorId: dataSelectorId
|
|
59
61
|
}, SwitchProps), /*#__PURE__*/React.createElement(Box, {
|
|
60
62
|
className: `${style[size]} ${customSwitchSize}`
|
|
61
63
|
}, /*#__PURE__*/React.createElement("input", {
|
|
@@ -85,9 +87,10 @@ export default class Switch extends React.Component {
|
|
|
85
87
|
}
|
|
86
88
|
Switch.defaultProps = defaultProps;
|
|
87
89
|
Switch.propTypes = propTypes;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
90
|
+
|
|
91
|
+
// if (__DOCS__) {
|
|
92
|
+
// Switch.docs = {
|
|
93
|
+
// componentGroup: 'Form Elements',
|
|
94
|
+
// folderName: 'Style Guide'
|
|
95
|
+
// };
|
|
96
|
+
// }
|
package/es/Tab/Tab.js
CHANGED
|
@@ -30,6 +30,7 @@ export default function Tab(_ref) {
|
|
|
30
30
|
children,
|
|
31
31
|
className,
|
|
32
32
|
dataId,
|
|
33
|
+
dataSelectorId,
|
|
33
34
|
title,
|
|
34
35
|
titlePosition,
|
|
35
36
|
activeClass,
|
|
@@ -84,7 +85,8 @@ export default function Tab(_ref) {
|
|
|
84
85
|
"aria-controls": id,
|
|
85
86
|
"aria-selected": isActive ? true : false,
|
|
86
87
|
tabIndex: isLink ? undefined : isActive && !isDisabled ? '0' : '0',
|
|
87
|
-
"aria-label": text ? text : null
|
|
88
|
+
"aria-label": text ? text : null,
|
|
89
|
+
dataSelectorId: dataSelectorId
|
|
88
90
|
}, customProps), /*#__PURE__*/React.createElement(Container, {
|
|
89
91
|
alignBox: "row",
|
|
90
92
|
align: "both",
|
|
@@ -99,9 +101,10 @@ export default function Tab(_ref) {
|
|
|
99
101
|
}
|
|
100
102
|
Tab.defaultProps = Tab_defaultProps;
|
|
101
103
|
Tab.propTypes = Tab_propTypes;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
104
|
+
|
|
105
|
+
// if (__DOCS__) {
|
|
106
|
+
// Tab.docs = {
|
|
107
|
+
// componentGroup: 'Tab',
|
|
108
|
+
// folderName: 'Style Guide'
|
|
109
|
+
// };
|
|
110
|
+
// }
|
package/es/Tab/TabContent.js
CHANGED
|
@@ -10,7 +10,8 @@ const TabContent = _ref => {
|
|
|
10
10
|
children,
|
|
11
11
|
scroll,
|
|
12
12
|
dataId,
|
|
13
|
-
id
|
|
13
|
+
id,
|
|
14
|
+
dataSelectorId
|
|
14
15
|
} = _ref;
|
|
15
16
|
return /*#__PURE__*/React.createElement(Container, {
|
|
16
17
|
className: style.container,
|
|
@@ -19,7 +20,8 @@ const TabContent = _ref => {
|
|
|
19
20
|
isScrollAttribute: true,
|
|
20
21
|
"aria-labelledby": id,
|
|
21
22
|
tabindex: "-1",
|
|
22
|
-
role: "tabpanel"
|
|
23
|
+
role: "tabpanel",
|
|
24
|
+
dataSelectorId: dataSelectorId
|
|
23
25
|
}, children);
|
|
24
26
|
};
|
|
25
27
|
TabContent.defaultProps = TabContent_defaultProps;
|
|
@@ -10,14 +10,16 @@ const TabContentWrapper = _ref => {
|
|
|
10
10
|
children,
|
|
11
11
|
dataId,
|
|
12
12
|
selectedTab,
|
|
13
|
-
onScroll
|
|
13
|
+
onScroll,
|
|
14
|
+
dataSelectorId
|
|
14
15
|
} = _ref;
|
|
15
16
|
return /*#__PURE__*/React.createElement(Box, {
|
|
16
17
|
flexible: true,
|
|
17
18
|
style: style,
|
|
18
19
|
dataId: dataId,
|
|
19
20
|
className: className,
|
|
20
|
-
onScroll: onScroll
|
|
21
|
+
onScroll: onScroll,
|
|
22
|
+
dataSelectorId: dataSelectorId
|
|
21
23
|
}, React.Children.map(children, child => /*#__PURE__*/React.isValidElement(child) && child.props.id === selectedTab ? child : null));
|
|
22
24
|
};
|
|
23
25
|
TabContentWrapper.defaultProps = TabContentWrapper_defaultProps;
|
package/es/Tab/TabWrapper.js
CHANGED
|
@@ -16,7 +16,8 @@ function TabWrapper(_ref) {
|
|
|
16
16
|
needAppearance,
|
|
17
17
|
align,
|
|
18
18
|
dataId,
|
|
19
|
-
children
|
|
19
|
+
children,
|
|
20
|
+
dataSelectorId
|
|
20
21
|
} = _ref;
|
|
21
22
|
let [selectedTabInternal, setSelected] = useState(!hookToDisableInternalState ? defaultTab || 0 : null);
|
|
22
23
|
const setSelectedTab = useCallback(id => {
|
|
@@ -27,7 +28,8 @@ function TabWrapper(_ref) {
|
|
|
27
28
|
}, [hookToDisableInternalState, onSelect]);
|
|
28
29
|
return /*#__PURE__*/React.createElement(Container, {
|
|
29
30
|
alignBox: align === 'vertical' ? 'column' : 'row',
|
|
30
|
-
dataId: dataId
|
|
31
|
+
dataId: dataId,
|
|
32
|
+
dataSelectorId: dataSelectorId
|
|
31
33
|
}, React.Children.map(children, child => {
|
|
32
34
|
let TabsChild = child.type;
|
|
33
35
|
let selectedTab = hookToDisableInternalState ? defaultTab : selectedTabInternal;
|
package/es/Tab/Tabs.js
CHANGED
|
@@ -389,7 +389,8 @@ class Tabs extends React.Component {
|
|
|
389
389
|
getTargetRef,
|
|
390
390
|
position,
|
|
391
391
|
customProps,
|
|
392
|
-
getCustomDropBoxHeaderPlaceHolder
|
|
392
|
+
getCustomDropBoxHeaderPlaceHolder,
|
|
393
|
+
dataSelectorId
|
|
393
394
|
} = this.props;
|
|
394
395
|
let {
|
|
395
396
|
DropBoxProps = {},
|
|
@@ -423,7 +424,8 @@ class Tabs extends React.Component {
|
|
|
423
424
|
isVirtual: isVirtual
|
|
424
425
|
}, classProps));
|
|
425
426
|
}), React.Children.count(moreTabs) ? /*#__PURE__*/React.createElement(Box, {
|
|
426
|
-
className: `${tabsStyle.menu}
|
|
427
|
+
className: `${tabsStyle.menu} `,
|
|
428
|
+
dataSelectorId: `${dataSelectorId}_moreIcon`
|
|
427
429
|
}, /*#__PURE__*/React.createElement(Container, _extends({
|
|
428
430
|
className: `${btnstyle.buttonReset} ${moreButtonClass} ${isPopupOpen ? moreButtonActiveClass : ''}`,
|
|
429
431
|
align: "both",
|
|
@@ -511,7 +513,8 @@ class Tabs extends React.Component {
|
|
|
511
513
|
align,
|
|
512
514
|
needAppearance,
|
|
513
515
|
children,
|
|
514
|
-
containerClass
|
|
516
|
+
containerClass,
|
|
517
|
+
dataSelectorId
|
|
515
518
|
} = this.props;
|
|
516
519
|
let {
|
|
517
520
|
totalDimension,
|
|
@@ -527,7 +530,8 @@ class Tabs extends React.Component {
|
|
|
527
530
|
let tabsClass = cs([tabsStyle.tab, className, needAppearance && appearanceClass]);
|
|
528
531
|
let hlClass = cs([tabsStyle.highlight, highlightClass, isAnimate && tabsStyle.lineAnimate]);
|
|
529
532
|
return /*#__PURE__*/React.createElement(Box, {
|
|
530
|
-
className: containerClass
|
|
533
|
+
className: containerClass,
|
|
534
|
+
dataSelectorId: dataSelectorId
|
|
531
535
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
532
536
|
alignBox: align === 'vertical' ? 'row' : 'column',
|
|
533
537
|
className: tabsClass,
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
export const Tab_defaultProps = {
|
|
2
2
|
dataId: 'tabMenu',
|
|
3
|
-
customProps: {}
|
|
3
|
+
customProps: {},
|
|
4
|
+
dataSelectorId: 'tab'
|
|
4
5
|
};
|
|
5
6
|
export const TabContent_defaultProps = {
|
|
6
|
-
dataId: 'tabContent'
|
|
7
|
+
dataId: 'tabContent',
|
|
8
|
+
dataSelectorId: 'tabContent'
|
|
7
9
|
};
|
|
8
10
|
export const TabContentWrapper_defaultProps = {
|
|
9
|
-
children: []
|
|
11
|
+
children: [],
|
|
12
|
+
dataSelectorId: 'tabContentWrapper'
|
|
10
13
|
};
|
|
11
14
|
export const Tabs_defaultProps = {
|
|
12
15
|
isAnimate: false,
|
|
@@ -25,7 +28,8 @@ export const Tabs_defaultProps = {
|
|
|
25
28
|
iconName: 'ZD-TB-menu',
|
|
26
29
|
iconSize: '7',
|
|
27
30
|
containerClass: '',
|
|
28
|
-
customProps: {}
|
|
31
|
+
customProps: {},
|
|
32
|
+
dataSelectorId: 'tabs'
|
|
29
33
|
};
|
|
30
34
|
export const TabWrapper_defaultProps = {
|
|
31
35
|
hookToDisableInternalState: false,
|
|
@@ -35,5 +39,6 @@ export const TabWrapper_defaultProps = {
|
|
|
35
39
|
needTabBorder: false,
|
|
36
40
|
type: 'alpha',
|
|
37
41
|
align: 'vertical',
|
|
38
|
-
needAppearance: true
|
|
42
|
+
needAppearance: true,
|
|
43
|
+
dataSelectorId: 'tabWrapper'
|
|
39
44
|
};
|
|
@@ -23,13 +23,15 @@ export const Tab_propTypes = {
|
|
|
23
23
|
tourId: PropTypes.string,
|
|
24
24
|
type: PropTypes.string,
|
|
25
25
|
customProps: PropTypes.object,
|
|
26
|
-
isVirtual: PropTypes.bool
|
|
26
|
+
isVirtual: PropTypes.bool,
|
|
27
|
+
dataSelectorId: PropTypes.string
|
|
27
28
|
};
|
|
28
29
|
export const TabContent_propTypes = {
|
|
29
30
|
children: PropTypes.node,
|
|
30
31
|
dataId: PropTypes.string,
|
|
31
32
|
id: PropTypes.string,
|
|
32
|
-
scroll: PropTypes.oneOf(['vertical', 'horizontal', 'both', 'none'])
|
|
33
|
+
scroll: PropTypes.oneOf(['vertical', 'horizontal', 'both', 'none']),
|
|
34
|
+
dataSelectorId: PropTypes.string
|
|
33
35
|
};
|
|
34
36
|
export const TabContentWrapper_propTypes = {
|
|
35
37
|
children: PropTypes.node,
|
|
@@ -37,7 +39,8 @@ export const TabContentWrapper_propTypes = {
|
|
|
37
39
|
dataId: PropTypes.string,
|
|
38
40
|
onScroll: PropTypes.func,
|
|
39
41
|
selectedTab: PropTypes.string,
|
|
40
|
-
style: PropTypes.object
|
|
42
|
+
style: PropTypes.object,
|
|
43
|
+
dataSelectorId: PropTypes.string
|
|
41
44
|
};
|
|
42
45
|
export const Tabs_propTypes = {
|
|
43
46
|
align: PropTypes.oneOf(['vertical', 'horizontal']),
|
|
@@ -84,7 +87,8 @@ export const Tabs_propTypes = {
|
|
|
84
87
|
ListItemProps: PropTypes.object,
|
|
85
88
|
MoreButtonProps: PropTypes.object
|
|
86
89
|
}),
|
|
87
|
-
getCustomDropBoxHeaderPlaceHolder: PropTypes.func
|
|
90
|
+
getCustomDropBoxHeaderPlaceHolder: PropTypes.func,
|
|
91
|
+
dataSelectorId: PropTypes.string
|
|
88
92
|
};
|
|
89
93
|
export const TabWrapper_propTypes = {
|
|
90
94
|
align: PropTypes.oneOf(['vertical', 'horizontal']),
|
|
@@ -98,5 +102,6 @@ export const TabWrapper_propTypes = {
|
|
|
98
102
|
needPadding: PropTypes.bool,
|
|
99
103
|
needTabBorder: PropTypes.bool,
|
|
100
104
|
onSelect: PropTypes.func,
|
|
101
|
-
type: PropTypes.oneOf(['alpha', 'beta', 'zeta'])
|
|
105
|
+
type: PropTypes.oneOf(['alpha', 'beta', 'zeta']),
|
|
106
|
+
dataSelectorId: PropTypes.string
|
|
102
107
|
};
|
package/es/Tag/Tag.js
CHANGED
|
@@ -71,6 +71,7 @@ export default class Tag extends PureComponent {
|
|
|
71
71
|
onSelectTag,
|
|
72
72
|
closeTitle,
|
|
73
73
|
dataId,
|
|
74
|
+
dataSelectorId,
|
|
74
75
|
iconName,
|
|
75
76
|
iconSize,
|
|
76
77
|
tooltip,
|
|
@@ -99,7 +100,8 @@ export default class Tag extends PureComponent {
|
|
|
99
100
|
ref: this.getRef,
|
|
100
101
|
"data-title": tooltip ? tooltip : text,
|
|
101
102
|
tabIndex: disabled ? '-1' : '0',
|
|
102
|
-
"aria-labelledby": getAriaId
|
|
103
|
+
"aria-labelledby": getAriaId,
|
|
104
|
+
"data-selector-id": dataSelectorId
|
|
103
105
|
}, hasAvatar ? /*#__PURE__*/React.createElement("div", {
|
|
104
106
|
className: style.avatar
|
|
105
107
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
@@ -140,9 +142,9 @@ export default class Tag extends PureComponent {
|
|
|
140
142
|
}
|
|
141
143
|
Tag.defaultProps = defaultProps;
|
|
142
144
|
Tag.propTypes = propTypes;
|
|
143
|
-
if (
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
145
|
+
// if (__DOCS__) {
|
|
146
|
+
// Tag.docs = {
|
|
147
|
+
// componentGroup: 'Molecule',
|
|
148
|
+
// folderName: 'Style Guide'
|
|
149
|
+
// };
|
|
150
|
+
// }
|
package/es/TextBox/TextBox.js
CHANGED
|
@@ -86,7 +86,8 @@ export default class Textbox extends React.PureComponent {
|
|
|
86
86
|
a11y,
|
|
87
87
|
customClass,
|
|
88
88
|
isFocus,
|
|
89
|
-
customProps
|
|
89
|
+
customProps,
|
|
90
|
+
dataSelectorId
|
|
90
91
|
} = this.props;
|
|
91
92
|
let {
|
|
92
93
|
ariaLabel,
|
|
@@ -136,6 +137,7 @@ export default class Textbox extends React.PureComponent {
|
|
|
136
137
|
"aria-multiselectable": ariaMultiselectable,
|
|
137
138
|
className: `${isReadOnly && needReadOnlyStyle ? style.readonly : ''} ${isClickable ? style.pointer : ''} ${classList} ${style[`borderColor_${borderColor}`]} ${customClass ? customClass : ''}`,
|
|
138
139
|
"data-id": `${dataId}`,
|
|
140
|
+
"data-selector-id": dataSelectorId,
|
|
139
141
|
id: htmlId || id,
|
|
140
142
|
maxLength: maxLength,
|
|
141
143
|
name: name,
|
|
@@ -156,11 +158,12 @@ export default class Textbox extends React.PureComponent {
|
|
|
156
158
|
}
|
|
157
159
|
Textbox.defaultProps = defaultProps;
|
|
158
160
|
Textbox.propTypes = propTypes;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
161
|
+
|
|
162
|
+
// if (__DOCS__) {
|
|
163
|
+
// Textbox.docs = {
|
|
164
|
+
// componentGroup: 'Form Elements',
|
|
165
|
+
// folderName: 'Style Guide',
|
|
166
|
+
// external: true,
|
|
167
|
+
// description: ' '
|
|
168
|
+
// };
|
|
169
|
+
// }
|
|
@@ -63,6 +63,7 @@ export default class TextBoxIcon extends React.Component {
|
|
|
63
63
|
onChange,
|
|
64
64
|
title,
|
|
65
65
|
dataId,
|
|
66
|
+
dataSelectorId,
|
|
66
67
|
needReadOnlyStyle,
|
|
67
68
|
isClickable,
|
|
68
69
|
needEffect,
|
|
@@ -97,6 +98,7 @@ export default class TextBoxIcon extends React.Component {
|
|
|
97
98
|
alignBox: "row",
|
|
98
99
|
isCover: false,
|
|
99
100
|
className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? needEffect ? style.effect : style.readonly : style.effect} ${isActive || isFocus ? style.effectFocused : ''} ${customTBoxWrap} ${iconOnHover && (isReadOnly || isDisabled) ? style.iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? style.iconOnHoverStyle : ''}`,
|
|
101
|
+
dataSelectorId: dataSelectorId,
|
|
100
102
|
"data-title": isDisabled ? title : null
|
|
101
103
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
102
104
|
flexible: true
|
|
@@ -153,11 +155,11 @@ export default class TextBoxIcon extends React.Component {
|
|
|
153
155
|
}
|
|
154
156
|
TextBoxIcon.defaultProps = defaultProps;
|
|
155
157
|
TextBoxIcon.propTypes = propTypes;
|
|
156
|
-
if (
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
158
|
+
// if (__DOCS__) {
|
|
159
|
+
// TextBoxIcon.docs = {
|
|
160
|
+
// componentGroup: 'Form Elements',
|
|
161
|
+
// folderName: 'Style Guide',
|
|
162
|
+
// external: true,
|
|
163
|
+
// description: ' '
|
|
164
|
+
// };
|
|
165
|
+
// }
|
|
@@ -3,6 +3,7 @@ export const propTypes = {
|
|
|
3
3
|
borderColor: PropTypes.oneOf(['transparent', 'default', 'error']),
|
|
4
4
|
children: PropTypes.node,
|
|
5
5
|
dataId: PropTypes.string,
|
|
6
|
+
dataSelectorId: PropTypes.string,
|
|
6
7
|
htmlId: PropTypes.string,
|
|
7
8
|
i18nKeys: PropTypes.shape({
|
|
8
9
|
clearText: PropTypes.string
|
package/es/Textarea/Textarea.js
CHANGED
|
@@ -45,6 +45,7 @@ export default class Textarea extends React.Component {
|
|
|
45
45
|
getRef,
|
|
46
46
|
onFocus,
|
|
47
47
|
dataId,
|
|
48
|
+
dataSelectorId,
|
|
48
49
|
isReadOnly,
|
|
49
50
|
needAppearance,
|
|
50
51
|
needReadOnlyStyle,
|
|
@@ -90,17 +91,19 @@ export default class Textarea extends React.Component {
|
|
|
90
91
|
onBlur: this.onBlur,
|
|
91
92
|
ref: getRef,
|
|
92
93
|
value: text,
|
|
93
|
-
id: htmlId
|
|
94
|
+
id: htmlId,
|
|
95
|
+
"data-selector-id": dataSelectorId
|
|
94
96
|
}));
|
|
95
97
|
}
|
|
96
98
|
}
|
|
97
99
|
Textarea.defaultProps = defaultProps;
|
|
98
100
|
Textarea.propTypes = propTypes;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
101
|
+
|
|
102
|
+
// if (__DOCS__) {
|
|
103
|
+
// Textarea.docs = {
|
|
104
|
+
// componentGroup: 'Form Elements',
|
|
105
|
+
// folderName: 'Style Guide',
|
|
106
|
+
// external: true,
|
|
107
|
+
// description: ' '
|
|
108
|
+
// };
|
|
109
|
+
// }
|
package/es/Tooltip/Tooltip.js
CHANGED
|
@@ -462,11 +462,12 @@ export default class Tooltip extends React.Component {
|
|
|
462
462
|
}
|
|
463
463
|
Tooltip.propTypes = propTypes;
|
|
464
464
|
Tooltip.defaultProps = defaultProps;
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
}
|
|
465
|
+
|
|
466
|
+
// if (__DOCS__) {
|
|
467
|
+
// Tooltip.docs = {
|
|
468
|
+
// componentGroup: 'Atom',
|
|
469
|
+
// folderName: 'Style Guide',
|
|
470
|
+
// description: ' ',
|
|
471
|
+
// external: true
|
|
472
|
+
// };
|
|
473
|
+
// }
|
|
@@ -69,8 +69,8 @@ export default class VelocityAnimation extends React.Component {
|
|
|
69
69
|
VelocityAnimation.defaultProps = defaultProps;
|
|
70
70
|
VelocityAnimation.propTypes = propTypes;
|
|
71
71
|
VelocityAnimation.contextType = LibraryContext;
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
72
|
+
// if (__DOCS__) {
|
|
73
|
+
// VelocityAnimation.docs = {
|
|
74
|
+
// componentGroup: 'Animation'
|
|
75
|
+
// };
|
|
76
|
+
// }
|
|
@@ -98,8 +98,9 @@ VelocityAnimationGroup.defaultProps = {
|
|
|
98
98
|
};
|
|
99
99
|
VelocityAnimationGroup.propTypes = propTypes;
|
|
100
100
|
VelocityAnimationGroup.contextType = LibraryContext;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
101
|
+
|
|
102
|
+
// if (__DOCS__) {
|
|
103
|
+
// VelocityAnimationGroup.docs = {
|
|
104
|
+
// componentGroup: 'Animation'
|
|
105
|
+
// };
|
|
106
|
+
// }
|
|
@@ -91,9 +91,10 @@ export default class PortalLayer extends React.Component {
|
|
|
91
91
|
}
|
|
92
92
|
PortalLayer.defaultProps = defaultProps;
|
|
93
93
|
PortalLayer.propTypes = propTypes;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
94
|
+
|
|
95
|
+
// if (__DOCS__) {
|
|
96
|
+
// PortalLayer.docs = {
|
|
97
|
+
// componentGroup: 'Atom',
|
|
98
|
+
// folderName: 'Style Guide'
|
|
99
|
+
// };
|
|
100
|
+
// }
|
|
@@ -50,9 +50,9 @@ export default class Button extends React.Component {
|
|
|
50
50
|
}
|
|
51
51
|
Button.defaultProps = defaultProps;
|
|
52
52
|
Button.propTypes = propTypes;
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
53
|
+
// if (__DOCS__) {
|
|
54
|
+
// Button.docs = {
|
|
55
|
+
// componentGroup: 'semantic',
|
|
56
|
+
// folderName: 'DefaultComponents'
|
|
57
|
+
// };
|
|
58
|
+
// }
|
package/install.md
ADDED
|
@@ -10,8 +10,10 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
10
10
|
var _propTypes = require("./props/propTypes");
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
12
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
13
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
13
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
14
14
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
16
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
15
17
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
16
18
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
17
19
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -64,7 +66,9 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
|
|
|
64
66
|
unMount = _this$props2.unMount,
|
|
65
67
|
disableInternalState = _this$props2.disableInternalState,
|
|
66
68
|
propSelectedItem = _this$props2.selectedItem,
|
|
67
|
-
a11y = _this$props2.a11y
|
|
69
|
+
a11y = _this$props2.a11y,
|
|
70
|
+
dataId = _this$props2.dataId,
|
|
71
|
+
dataSelectorId = _this$props2.dataSelectorId;
|
|
68
72
|
var selectedItem = this.state.selectedItem;
|
|
69
73
|
var children = _react["default"].Children.map(this.props.children, function (child) {
|
|
70
74
|
if (child) {
|
|
@@ -85,7 +89,9 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
|
|
|
85
89
|
},
|
|
86
90
|
role: role,
|
|
87
91
|
"aria-expanded": ariaExpanded,
|
|
88
|
-
"aria-haspopup": ariaHaspopup
|
|
92
|
+
"aria-haspopup": ariaHaspopup,
|
|
93
|
+
"data-id": dataId,
|
|
94
|
+
"data-selector-id": dataSelectorId
|
|
89
95
|
}, children);
|
|
90
96
|
}
|
|
91
97
|
}]);
|
|
@@ -94,9 +100,10 @@ var Accordion = /*#__PURE__*/function (_React$Component) {
|
|
|
94
100
|
exports["default"] = Accordion;
|
|
95
101
|
Accordion.propTypes = _propTypes.Accordion_propTypes;
|
|
96
102
|
Accordion.defaultProps = _defaultProps.Accordion_defaultProps;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
+
|
|
104
|
+
// if (__DOCS__) {
|
|
105
|
+
// Accordion.docs = {
|
|
106
|
+
// componentGroup: 'Animation',
|
|
107
|
+
// folderName: 'Style Guide'
|
|
108
|
+
// };
|
|
109
|
+
// }
|