@zohodesk/components 1.2.4 → 1.2.6
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 +8 -0
- package/coverage/Button/Button.js.html +1 -1
- package/coverage/Button/css/Button.module.css.html +1 -1
- package/coverage/Button/css/cssJSLogic.js.html +1 -1
- package/coverage/Button/css/index.html +1 -1
- package/coverage/Button/index.html +1 -1
- package/coverage/Button/props/defaultProps.js.html +1 -1
- package/coverage/Button/props/index.html +1 -1
- package/coverage/Button/props/propTypes.js.html +1 -1
- package/coverage/Buttongroup/Buttongroup.js.html +1 -1
- package/coverage/Buttongroup/Buttongroup.module.css.html +1 -1
- package/coverage/Buttongroup/index.html +1 -1
- package/coverage/Buttongroup/props/defaultProps.js.html +1 -1
- package/coverage/Buttongroup/props/index.html +1 -1
- package/coverage/Buttongroup/props/propTypes.js.html +1 -1
- package/coverage/index.html +1 -1
- package/coverage/utils/dummyFunction.js.html +1 -1
- package/coverage/utils/index.html +1 -1
- package/es/AppContainer/AppContainer.js +3 -0
- package/es/v1/Accordion/Accordion.js +65 -0
- package/es/v1/Accordion/AccordionItem.js +57 -0
- package/es/v1/Accordion/index.js +2 -0
- package/es/v1/Animation/Animation.js +127 -0
- package/es/v1/AppContainer/AppContainer.js +137 -0
- package/es/v1/Avatar/Avatar.js +189 -0
- package/es/v1/AvatarTeam/AvatarTeam.js +70 -0
- package/es/v1/Button/Button.js +68 -0
- package/es/v1/Buttongroup/Buttongroup.js +31 -0
- package/es/v1/Card/Card.js +271 -0
- package/es/v1/CheckBox/CheckBox.js +155 -0
- package/es/v1/DateTime/CalendarView.js +218 -0
- package/es/v1/DateTime/DateTime.js +783 -0
- package/es/v1/DateTime/DateTimePopupFooter.js +47 -0
- package/es/v1/DateTime/DateTimePopupHeader.js +105 -0
- package/es/v1/DateTime/DateWidget.js +1098 -0
- package/es/v1/DateTime/DaysRow.js +31 -0
- package/es/v1/DateTime/Time.js +166 -0
- package/es/v1/DateTime/YearView.js +264 -0
- package/es/v1/DateTime/index.js +1 -0
- package/es/v1/DropBox/DropBox.js +91 -0
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +132 -0
- package/es/v1/DropDown/DropDown.js +73 -0
- package/es/v1/DropDown/DropDownHeading.js +44 -0
- package/es/v1/DropDown/DropDownItem.js +76 -0
- package/es/v1/DropDown/DropDownSearch.js +63 -0
- package/es/v1/DropDown/DropDownSeparator.js +15 -0
- package/es/v1/Heading/Heading.js +32 -0
- package/es/v1/Label/Label.js +40 -0
- package/es/v1/Layout/Box.js +115 -0
- package/es/v1/Layout/Container.js +132 -0
- package/es/v1/Layout/index.js +2 -0
- package/es/v1/ListItem/ListContainer.js +102 -0
- package/es/v1/ListItem/ListItem.js +124 -0
- package/es/v1/ListItem/ListItemWithAvatar.js +145 -0
- package/es/v1/ListItem/ListItemWithCheckBox.js +104 -0
- package/es/v1/ListItem/ListItemWithIcon.js +127 -0
- package/es/v1/ListItem/ListItemWithRadio.js +105 -0
- package/es/v1/ListItem/index.js +6 -0
- package/es/v1/Modal/Modal.js +154 -0
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +1079 -0
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +568 -0
- package/es/v1/MultiSelect/EmptyState.js +64 -0
- package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +50 -0
- package/es/v1/MultiSelect/MultiSelect.js +1120 -0
- package/es/v1/MultiSelect/MultiSelectHeader.js +32 -0
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +216 -0
- package/es/v1/MultiSelect/SelectedOptions.js +82 -0
- package/es/v1/MultiSelect/Suggestions.js +142 -0
- package/es/v1/MultiSelect/index.js +4 -0
- package/es/v1/PopOver/PopOver.js +211 -0
- package/es/v1/Popup/Popup.js +645 -0
- package/es/v1/Radio/Radio.js +115 -0
- package/es/v1/Responsive/CustomResponsive.js +195 -0
- package/es/v1/Responsive/RefWrapper.js +39 -0
- package/es/v1/Responsive/ResizeComponent.js +197 -0
- package/es/v1/Responsive/ResizeObserver.js +140 -0
- package/es/v1/Responsive/Responsive.js +194 -0
- package/es/v1/Responsive/index.js +9 -0
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +58 -0
- package/es/v1/Ribbon/Ribbon.js +33 -0
- package/es/v1/RippleEffect/RippleEffect.js +24 -0
- package/es/v1/Select/GroupSelect.js +803 -0
- package/es/v1/Select/Select.js +969 -0
- package/es/v1/Select/SelectWithAvatar.js +344 -0
- package/es/v1/Select/SelectWithIcon.js +535 -0
- package/es/v1/Select/index.js +4 -0
- package/es/v1/Stencils/Stencils.js +26 -0
- package/es/v1/Switch/Switch.js +94 -0
- package/es/v1/Tab/Tab.js +108 -0
- package/es/v1/Tab/TabContent.js +30 -0
- package/es/v1/Tab/TabContentWrapper.js +29 -0
- package/es/v1/Tab/TabWrapper.js +57 -0
- package/es/v1/Tab/Tabs.js +612 -0
- package/es/v1/Tab/index.js +5 -0
- package/es/v1/Tag/Tag.js +134 -0
- package/es/v1/TextBox/TextBox.js +154 -0
- package/es/v1/TextBoxIcon/TextBoxIcon.js +158 -0
- package/es/v1/Textarea/Textarea.js +102 -0
- package/es/v1/Tooltip/Tooltip.js +518 -0
- package/es/v1/Typography/Typography.js +38 -0
- package/es/v1/Typography/css/Typography.module.css +376 -0
- package/es/v1/Typography/css/cssJSLogic.js +46 -0
- package/es/v1/Typography/css/letterSpacingMap.js +12 -0
- package/es/v1/Typography/props/defaultProps.js +8 -0
- package/es/v1/Typography/props/propTypes.js +24 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +69 -0
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +100 -0
- package/es/v1/semantic/Button/Button.js +53 -0
- package/es/v1/semantic/index.js +1 -0
- package/lib/AppContainer/AppContainer.js +5 -0
- package/lib/v1/Accordion/Accordion.js +96 -0
- package/lib/v1/Accordion/AccordionItem.js +68 -0
- package/lib/v1/Accordion/index.js +23 -0
- package/lib/v1/Animation/Animation.js +143 -0
- package/lib/v1/AppContainer/AppContainer.js +209 -0
- package/lib/v1/Avatar/Avatar.js +246 -0
- package/lib/v1/AvatarTeam/AvatarTeam.js +81 -0
- package/lib/v1/Button/Button.js +82 -0
- package/lib/v1/Buttongroup/Buttongroup.js +44 -0
- package/lib/v1/Card/Card.js +365 -0
- package/lib/v1/CheckBox/CheckBox.js +166 -0
- package/lib/v1/DateTime/CalendarView.js +285 -0
- package/lib/v1/DateTime/DateTime.js +872 -0
- package/lib/v1/DateTime/DateTimePopupFooter.js +96 -0
- package/lib/v1/DateTime/DateTimePopupHeader.js +166 -0
- package/lib/v1/DateTime/DateWidget.js +1125 -0
- package/lib/v1/DateTime/DaysRow.js +80 -0
- package/lib/v1/DateTime/Time.js +254 -0
- package/lib/v1/DateTime/YearView.js +325 -0
- package/lib/v1/DateTime/index.js +15 -0
- package/lib/v1/DropBox/DropBox.js +119 -0
- package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +145 -0
- package/lib/v1/DropDown/DropDown.js +170 -0
- package/lib/v1/DropDown/DropDownHeading.js +93 -0
- package/lib/v1/DropDown/DropDownItem.js +127 -0
- package/lib/v1/DropDown/DropDownSearch.js +113 -0
- package/lib/v1/DropDown/DropDownSeparator.js +64 -0
- package/lib/v1/Heading/Heading.js +49 -0
- package/lib/v1/Label/Label.js +51 -0
- package/lib/v1/Layout/Box.js +128 -0
- package/lib/v1/Layout/Container.js +145 -0
- package/lib/v1/Layout/index.js +23 -0
- package/lib/v1/ListItem/ListContainer.js +120 -0
- package/lib/v1/ListItem/ListItem.js +138 -0
- package/lib/v1/ListItem/ListItemWithAvatar.js +162 -0
- package/lib/v1/ListItem/ListItemWithCheckBox.js +125 -0
- package/lib/v1/ListItem/ListItemWithIcon.js +143 -0
- package/lib/v1/ListItem/ListItemWithRadio.js +126 -0
- package/lib/v1/ListItem/index.js +55 -0
- package/lib/v1/Modal/Modal.js +212 -0
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +1167 -0
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +634 -0
- package/lib/v1/MultiSelect/EmptyState.js +112 -0
- package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +62 -0
- package/lib/v1/MultiSelect/MultiSelect.js +1201 -0
- package/lib/v1/MultiSelect/MultiSelectHeader.js +78 -0
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +270 -0
- package/lib/v1/MultiSelect/SelectedOptions.js +126 -0
- package/lib/v1/MultiSelect/Suggestions.js +195 -0
- package/lib/v1/MultiSelect/index.js +39 -0
- package/lib/v1/PopOver/PopOver.js +293 -0
- package/lib/v1/Popup/Popup.js +715 -0
- package/lib/v1/Radio/Radio.js +126 -0
- package/lib/v1/Responsive/CustomResponsive.js +242 -0
- package/lib/v1/Responsive/RefWrapper.js +57 -0
- package/lib/v1/Responsive/ResizeComponent.js +268 -0
- package/lib/v1/Responsive/ResizeObserver.js +168 -0
- package/lib/v1/Responsive/Responsive.js +274 -0
- package/lib/v1/Responsive/index.js +55 -0
- package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +79 -0
- package/lib/v1/Ribbon/Ribbon.js +44 -0
- package/lib/v1/RippleEffect/RippleEffect.js +39 -0
- package/lib/v1/Select/GroupSelect.js +877 -0
- package/lib/v1/Select/Select.js +1013 -0
- package/lib/v1/Select/SelectWithAvatar.js +394 -0
- package/lib/v1/Select/SelectWithIcon.js +597 -0
- package/lib/v1/Select/index.js +39 -0
- package/lib/v1/Stencils/Stencils.js +43 -0
- package/lib/v1/Switch/Switch.js +108 -0
- package/lib/v1/Tab/Tab.js +132 -0
- package/lib/v1/Tab/TabContent.js +42 -0
- package/lib/v1/Tab/TabContentWrapper.js +42 -0
- package/lib/v1/Tab/TabWrapper.js +89 -0
- package/lib/v1/Tab/Tabs.js +680 -0
- package/lib/v1/Tab/index.js +47 -0
- package/lib/v1/Tag/Tag.js +154 -0
- package/lib/v1/TextBox/TextBox.js +168 -0
- package/lib/v1/TextBoxIcon/TextBoxIcon.js +196 -0
- package/lib/v1/Textarea/Textarea.js +118 -0
- package/lib/v1/Tooltip/Tooltip.js +586 -0
- package/lib/v1/Typography/Typography.js +56 -0
- package/lib/v1/Typography/css/Typography.module.css +376 -0
- package/lib/v1/Typography/css/cssJSLogic.js +41 -0
- package/lib/v1/Typography/css/letterSpacingMap.js +20 -0
- package/lib/v1/Typography/props/defaultProps.js +15 -0
- package/lib/v1/Typography/props/propTypes.js +35 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +90 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +126 -0
- package/lib/v1/semantic/Button/Button.js +63 -0
- package/lib/v1/semantic/index.js +15 -0
- package/package.json +1 -1
- package/result.json +1 -1
package/es/v1/Tab/Tab.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
/* eslint-disable react/forbid-component-props */
|
|
4
|
+
import React, { useMemo, useCallback } from 'react';
|
|
5
|
+
import { Tab_defaultProps } from '../../Tab/props/defaultProps';
|
|
6
|
+
import { Tab_propTypes } from '../../Tab/props/propTypes';
|
|
7
|
+
import { Box, Container } from '../Layout';
|
|
8
|
+
import { cs } from '../../utils/Common';
|
|
9
|
+
import styles from '../../Tab/Tab.module.css';
|
|
10
|
+
const tabTypes = {
|
|
11
|
+
alpha: {
|
|
12
|
+
active: 'alphaActive',
|
|
13
|
+
tab: 'tabAlpha'
|
|
14
|
+
},
|
|
15
|
+
beta: {
|
|
16
|
+
active: 'betaActive',
|
|
17
|
+
tab: 'tabBeta'
|
|
18
|
+
},
|
|
19
|
+
delta: {
|
|
20
|
+
active: 'deltaActive',
|
|
21
|
+
tab: 'tabDelta'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export default function Tab(_ref) {
|
|
25
|
+
let {
|
|
26
|
+
id,
|
|
27
|
+
style,
|
|
28
|
+
text,
|
|
29
|
+
children,
|
|
30
|
+
className,
|
|
31
|
+
dataId,
|
|
32
|
+
dataSelectorId,
|
|
33
|
+
title,
|
|
34
|
+
titlePosition,
|
|
35
|
+
activeClass,
|
|
36
|
+
href,
|
|
37
|
+
isLink,
|
|
38
|
+
isDisabled,
|
|
39
|
+
tourId,
|
|
40
|
+
onClick,
|
|
41
|
+
isActive,
|
|
42
|
+
getTabRef,
|
|
43
|
+
onSelect,
|
|
44
|
+
type,
|
|
45
|
+
isAnimate,
|
|
46
|
+
needBorder,
|
|
47
|
+
needAppearance,
|
|
48
|
+
align,
|
|
49
|
+
isVirtual,
|
|
50
|
+
customProps
|
|
51
|
+
} = _ref;
|
|
52
|
+
let clickListener = useCallback(event => {
|
|
53
|
+
if (isLink && event && (event.metaKey || event.altKey || event.ctrlKey || event.shiftKey)) {
|
|
54
|
+
event && event.stopPropagation();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
event && event.preventDefault();
|
|
59
|
+
onSelect(id);
|
|
60
|
+
onClick && onClick(event);
|
|
61
|
+
}, [id, isLink, onSelect, onClick]);
|
|
62
|
+
let styleContent = useMemo(() => tabTypes[type] || {
|
|
63
|
+
active: 'active',
|
|
64
|
+
tab: 'tab'
|
|
65
|
+
}, [type]);
|
|
66
|
+
let getTab = useCallback(ref => getTabRef && getTabRef(id, ref, isVirtual), [id, isVirtual]);
|
|
67
|
+
let activeWithAppearance = cs([styles[styleContent.active], needBorder && !isAnimate && styles[`${styleContent.active}_border`]]);
|
|
68
|
+
let activeClasses = cs([needAppearance && activeWithAppearance, activeClass]);
|
|
69
|
+
let inActiveClasses = needAppearance && cs([styles[styleContent.tab], tabTypes[type] && styles[`${`${type}Hover`}`]]);
|
|
70
|
+
let tabClass = cs([styles.tab, align === 'vertical' ? styles.vertical : styles.horizontal, isDisabled && styles.disabled, needBorder && !isAnimate && needAppearance && styles.border, isActive ? activeClasses : inActiveClasses, className]);
|
|
71
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
72
|
+
tourId: tourId,
|
|
73
|
+
tagName: isLink ? 'a' : 'div',
|
|
74
|
+
className: tabClass,
|
|
75
|
+
dataId: `${dataId}_Tab`,
|
|
76
|
+
onClick: !isDisabled ? clickListener : undefined,
|
|
77
|
+
style: style,
|
|
78
|
+
eleRef: getTab,
|
|
79
|
+
"data-title": title,
|
|
80
|
+
"data-title-position": titlePosition,
|
|
81
|
+
adjust: true,
|
|
82
|
+
href: isLink ? href : undefined,
|
|
83
|
+
"data-key": id,
|
|
84
|
+
role: "link",
|
|
85
|
+
"aria-controls": id,
|
|
86
|
+
"aria-selected": isActive ? true : false,
|
|
87
|
+
tabIndex: isLink ? undefined : isActive && !isDisabled ? '0' : '0',
|
|
88
|
+
"aria-label": text ? text : null,
|
|
89
|
+
dataSelectorId: dataSelectorId
|
|
90
|
+
}, customProps), /*#__PURE__*/React.createElement(Container, {
|
|
91
|
+
alignBox: "row",
|
|
92
|
+
align: "both",
|
|
93
|
+
className: styles.textContainer
|
|
94
|
+
}, text && /*#__PURE__*/React.createElement(Box, {
|
|
95
|
+
flexible: true,
|
|
96
|
+
adjust: true,
|
|
97
|
+
className: styles.tabText
|
|
98
|
+
}, text), children ? /*#__PURE__*/React.createElement(Box, {
|
|
99
|
+
shrink: true
|
|
100
|
+
}, children) : null));
|
|
101
|
+
}
|
|
102
|
+
Tab.defaultProps = Tab_defaultProps;
|
|
103
|
+
Tab.propTypes = Tab_propTypes; // if (__DOCS__) {
|
|
104
|
+
// Tab.docs = {
|
|
105
|
+
// componentGroup: 'Tab',
|
|
106
|
+
// folderName: 'Style Guide'
|
|
107
|
+
// };
|
|
108
|
+
// }
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TabContent_defaultProps } from '../../Tab/props/defaultProps';
|
|
3
|
+
import { TabContent_propTypes } from '../../Tab/props/propTypes';
|
|
4
|
+
import { Container } from '../Layout';
|
|
5
|
+
import style from '../../Tab/TabContent.module.css';
|
|
6
|
+
/* eslint-disable react/forbid-component-props */
|
|
7
|
+
|
|
8
|
+
const TabContent = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
children,
|
|
11
|
+
scroll,
|
|
12
|
+
dataId,
|
|
13
|
+
id,
|
|
14
|
+
dataSelectorId
|
|
15
|
+
} = _ref;
|
|
16
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
17
|
+
className: style.container,
|
|
18
|
+
scroll: scroll,
|
|
19
|
+
dataId: `${dataId}_TabContent`,
|
|
20
|
+
isScrollAttribute: true,
|
|
21
|
+
"aria-labelledby": id,
|
|
22
|
+
tabindex: "-1",
|
|
23
|
+
role: "tabpanel",
|
|
24
|
+
dataSelectorId: dataSelectorId
|
|
25
|
+
}, children);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
TabContent.defaultProps = TabContent_defaultProps;
|
|
29
|
+
TabContent.propTypes = TabContent_propTypes;
|
|
30
|
+
export default TabContent;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TabContentWrapper_defaultProps } from '../../Tab/props/defaultProps';
|
|
3
|
+
import { TabContentWrapper_propTypes } from '../../Tab/props/propTypes';
|
|
4
|
+
import { Box } from '../Layout';
|
|
5
|
+
/* eslint-disable react/forbid-component-props */
|
|
6
|
+
|
|
7
|
+
const TabContentWrapper = _ref => {
|
|
8
|
+
let {
|
|
9
|
+
style,
|
|
10
|
+
className,
|
|
11
|
+
children,
|
|
12
|
+
dataId,
|
|
13
|
+
selectedTab,
|
|
14
|
+
onScroll,
|
|
15
|
+
dataSelectorId
|
|
16
|
+
} = _ref;
|
|
17
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
18
|
+
flexible: true,
|
|
19
|
+
style: style,
|
|
20
|
+
dataId: dataId,
|
|
21
|
+
className: className,
|
|
22
|
+
onScroll: onScroll,
|
|
23
|
+
dataSelectorId: dataSelectorId
|
|
24
|
+
}, React.Children.map(children, child => /*#__PURE__*/React.isValidElement(child) && child.props.id === selectedTab ? child : null));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
TabContentWrapper.defaultProps = TabContentWrapper_defaultProps;
|
|
28
|
+
TabContentWrapper.propTypes = TabContentWrapper_propTypes;
|
|
29
|
+
export default TabContentWrapper;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import React, { useState, useCallback } from 'react';
|
|
4
|
+
import { TabWrapper_defaultProps } from '../../Tab/props/defaultProps';
|
|
5
|
+
import { TabWrapper_propTypes } from '../../Tab/props/propTypes';
|
|
6
|
+
import { Container } from '../Layout';
|
|
7
|
+
|
|
8
|
+
function TabWrapper(_ref) {
|
|
9
|
+
let {
|
|
10
|
+
defaultTab,
|
|
11
|
+
hookToDisableInternalState,
|
|
12
|
+
onSelect,
|
|
13
|
+
type,
|
|
14
|
+
isAnimate,
|
|
15
|
+
needTabBorder,
|
|
16
|
+
needBorder,
|
|
17
|
+
needPadding,
|
|
18
|
+
needAppearance,
|
|
19
|
+
align,
|
|
20
|
+
dataId,
|
|
21
|
+
children,
|
|
22
|
+
dataSelectorId
|
|
23
|
+
} = _ref;
|
|
24
|
+
let [selectedTabInternal, setSelected] = useState(!hookToDisableInternalState ? defaultTab || 0 : null);
|
|
25
|
+
const setSelectedTab = useCallback(id => {
|
|
26
|
+
if (!hookToDisableInternalState) {
|
|
27
|
+
setSelected(id);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
onSelect && onSelect(id);
|
|
31
|
+
}, [hookToDisableInternalState, onSelect]);
|
|
32
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
33
|
+
alignBox: align === 'vertical' ? 'column' : 'row',
|
|
34
|
+
dataId: dataId,
|
|
35
|
+
dataSelectorId: dataSelectorId
|
|
36
|
+
}, React.Children.map(children, child => {
|
|
37
|
+
let TabsChild = child.type;
|
|
38
|
+
let selectedTab = hookToDisableInternalState ? defaultTab : selectedTabInternal;
|
|
39
|
+
return /*#__PURE__*/React.createElement(TabsChild // eslint-disable-next-line react/no-array-index-key
|
|
40
|
+
, _extends({}, child.props, {
|
|
41
|
+
selectedTab: selectedTab,
|
|
42
|
+
onSelect: setSelectedTab,
|
|
43
|
+
type: type,
|
|
44
|
+
isAnimate: isAnimate,
|
|
45
|
+
needTabBorder: needTabBorder,
|
|
46
|
+
needBorder: needBorder,
|
|
47
|
+
needPadding: needPadding,
|
|
48
|
+
needAppearance: needAppearance,
|
|
49
|
+
hookToDisableInternalState: hookToDisableInternalState,
|
|
50
|
+
align: align
|
|
51
|
+
}));
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
TabWrapper.propTypes = TabWrapper_propTypes;
|
|
56
|
+
TabWrapper.defaultProps = TabWrapper_defaultProps;
|
|
57
|
+
export default TabWrapper;
|