@nulogy/components 6.1.6 → 6.1.7
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/dist/main.js
CHANGED
|
@@ -27921,36 +27921,39 @@
|
|
|
27921
27921
|
children = _this$props.children,
|
|
27922
27922
|
onTabClick = _this$props.onTabClick;
|
|
27923
27923
|
var selectedIndex = this.getSelectedIndex();
|
|
27924
|
-
|
|
27925
|
-
|
|
27926
|
-
|
|
27927
|
-
|
|
27924
|
+
return React__default['default'].Children.map(children, function (tab, index) {
|
|
27925
|
+
if (tab) {
|
|
27926
|
+
return /*#__PURE__*/React__default['default'].cloneElement(tab, {
|
|
27927
|
+
onClick: function onClick(e) {
|
|
27928
|
+
var _a, _b;
|
|
27928
27929
|
|
|
27929
|
-
|
|
27930
|
-
tab.props.onClick(e);
|
|
27931
|
-
}
|
|
27930
|
+
setFocusToTab(index);
|
|
27932
27931
|
|
|
27933
|
-
|
|
27934
|
-
|
|
27935
|
-
|
|
27936
|
-
|
|
27932
|
+
if ((_a = tab === null || tab === void 0 ? void 0 : tab.props) === null || _a === void 0 ? void 0 : _a.onClick) {
|
|
27933
|
+
(_b = tab === null || tab === void 0 ? void 0 : tab.props) === null || _b === void 0 ? void 0 : _b.onClick(e);
|
|
27934
|
+
}
|
|
27935
|
+
|
|
27936
|
+
if (onTabClick) {
|
|
27937
|
+
onTabClick(e, index);
|
|
27938
|
+
} else {
|
|
27939
|
+
_this2.handleTabClick(index);
|
|
27940
|
+
}
|
|
27941
|
+
},
|
|
27942
|
+
onFocus: function onFocus(e) {
|
|
27943
|
+
e.stopPropagation();
|
|
27944
|
+
},
|
|
27945
|
+
onKeyDown: handleArrowNavigation,
|
|
27946
|
+
index: index,
|
|
27947
|
+
tabIndex: index === focusedIndex ? 0 : -1,
|
|
27948
|
+
selected: index === selectedIndex,
|
|
27949
|
+
"aria-selected": index === selectedIndex,
|
|
27950
|
+
fullWidth: fitted,
|
|
27951
|
+
ref: function ref(_ref2) {
|
|
27952
|
+
_this2.tabRefs[index] = _ref2;
|
|
27937
27953
|
}
|
|
27938
|
-
}
|
|
27939
|
-
|
|
27940
|
-
e.stopPropagation();
|
|
27941
|
-
},
|
|
27942
|
-
onKeyDown: handleArrowNavigation,
|
|
27943
|
-
index: index,
|
|
27944
|
-
tabIndex: index === focusedIndex ? 0 : -1,
|
|
27945
|
-
selected: index === selectedIndex,
|
|
27946
|
-
"aria-selected": index === selectedIndex,
|
|
27947
|
-
fullWidth: fitted,
|
|
27948
|
-
ref: function ref(_ref2) {
|
|
27949
|
-
_this2.tabRefs[index] = _ref2;
|
|
27950
|
-
}
|
|
27951
|
-
});
|
|
27954
|
+
});
|
|
27955
|
+
}
|
|
27952
27956
|
});
|
|
27953
|
-
return tabs;
|
|
27954
27957
|
};
|
|
27955
27958
|
|
|
27956
27959
|
_proto.getTabContent = function getTabContent() {
|
|
@@ -27959,6 +27962,8 @@
|
|
|
27959
27962
|
renderTabContentOnlyWhenSelected = _this$props2.renderTabContentOnlyWhenSelected;
|
|
27960
27963
|
var selectedIndex = this.getSelectedIndex();
|
|
27961
27964
|
var tabContent = React__default['default'].Children.map(children, function (tab, index) {
|
|
27965
|
+
var _a;
|
|
27966
|
+
|
|
27962
27967
|
var selected = index === selectedIndex;
|
|
27963
27968
|
|
|
27964
27969
|
if (renderTabContentOnlyWhenSelected && !selected) {
|
|
@@ -27968,7 +27973,7 @@
|
|
|
27968
27973
|
"aria-hidden": !selected,
|
|
27969
27974
|
hidden: !selected,
|
|
27970
27975
|
selected: selected
|
|
27971
|
-
}, tab.props.children);
|
|
27976
|
+
}, (_a = tab === null || tab === void 0 ? void 0 : tab.props) === null || _a === void 0 ? void 0 : _a.children);
|
|
27972
27977
|
}
|
|
27973
27978
|
});
|
|
27974
27979
|
return tabContent;
|
package/dist/main.module.js
CHANGED
|
@@ -27895,36 +27895,39 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
27895
27895
|
children = _this$props.children,
|
|
27896
27896
|
onTabClick = _this$props.onTabClick;
|
|
27897
27897
|
var selectedIndex = this.getSelectedIndex();
|
|
27898
|
-
|
|
27899
|
-
|
|
27900
|
-
|
|
27901
|
-
|
|
27898
|
+
return React__default.Children.map(children, function (tab, index) {
|
|
27899
|
+
if (tab) {
|
|
27900
|
+
return /*#__PURE__*/React__default.cloneElement(tab, {
|
|
27901
|
+
onClick: function onClick(e) {
|
|
27902
|
+
var _a, _b;
|
|
27902
27903
|
|
|
27903
|
-
|
|
27904
|
-
tab.props.onClick(e);
|
|
27905
|
-
}
|
|
27904
|
+
setFocusToTab(index);
|
|
27906
27905
|
|
|
27907
|
-
|
|
27908
|
-
|
|
27909
|
-
|
|
27910
|
-
|
|
27906
|
+
if ((_a = tab === null || tab === void 0 ? void 0 : tab.props) === null || _a === void 0 ? void 0 : _a.onClick) {
|
|
27907
|
+
(_b = tab === null || tab === void 0 ? void 0 : tab.props) === null || _b === void 0 ? void 0 : _b.onClick(e);
|
|
27908
|
+
}
|
|
27909
|
+
|
|
27910
|
+
if (onTabClick) {
|
|
27911
|
+
onTabClick(e, index);
|
|
27912
|
+
} else {
|
|
27913
|
+
_this2.handleTabClick(index);
|
|
27914
|
+
}
|
|
27915
|
+
},
|
|
27916
|
+
onFocus: function onFocus(e) {
|
|
27917
|
+
e.stopPropagation();
|
|
27918
|
+
},
|
|
27919
|
+
onKeyDown: handleArrowNavigation,
|
|
27920
|
+
index: index,
|
|
27921
|
+
tabIndex: index === focusedIndex ? 0 : -1,
|
|
27922
|
+
selected: index === selectedIndex,
|
|
27923
|
+
"aria-selected": index === selectedIndex,
|
|
27924
|
+
fullWidth: fitted,
|
|
27925
|
+
ref: function ref(_ref2) {
|
|
27926
|
+
_this2.tabRefs[index] = _ref2;
|
|
27911
27927
|
}
|
|
27912
|
-
}
|
|
27913
|
-
|
|
27914
|
-
e.stopPropagation();
|
|
27915
|
-
},
|
|
27916
|
-
onKeyDown: handleArrowNavigation,
|
|
27917
|
-
index: index,
|
|
27918
|
-
tabIndex: index === focusedIndex ? 0 : -1,
|
|
27919
|
-
selected: index === selectedIndex,
|
|
27920
|
-
"aria-selected": index === selectedIndex,
|
|
27921
|
-
fullWidth: fitted,
|
|
27922
|
-
ref: function ref(_ref2) {
|
|
27923
|
-
_this2.tabRefs[index] = _ref2;
|
|
27924
|
-
}
|
|
27925
|
-
});
|
|
27928
|
+
});
|
|
27929
|
+
}
|
|
27926
27930
|
});
|
|
27927
|
-
return tabs;
|
|
27928
27931
|
};
|
|
27929
27932
|
|
|
27930
27933
|
_proto.getTabContent = function getTabContent() {
|
|
@@ -27933,6 +27936,8 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
27933
27936
|
renderTabContentOnlyWhenSelected = _this$props2.renderTabContentOnlyWhenSelected;
|
|
27934
27937
|
var selectedIndex = this.getSelectedIndex();
|
|
27935
27938
|
var tabContent = React__default.Children.map(children, function (tab, index) {
|
|
27939
|
+
var _a;
|
|
27940
|
+
|
|
27936
27941
|
var selected = index === selectedIndex;
|
|
27937
27942
|
|
|
27938
27943
|
if (renderTabContentOnlyWhenSelected && !selected) {
|
|
@@ -27942,7 +27947,7 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
27942
27947
|
"aria-hidden": !selected,
|
|
27943
27948
|
hidden: !selected,
|
|
27944
27949
|
selected: selected
|
|
27945
|
-
}, tab.props.children);
|
|
27950
|
+
}, (_a = tab === null || tab === void 0 ? void 0 : tab.props) === null || _a === void 0 ? void 0 : _a.children);
|
|
27946
27951
|
}
|
|
27947
27952
|
});
|
|
27948
27953
|
return tabContent;
|
|
@@ -11,10 +11,6 @@ declare type TabScrollIndicatorsProps = {
|
|
|
11
11
|
declare type TabScrollIndicatorsState = {
|
|
12
12
|
contentHiddenLeft: boolean;
|
|
13
13
|
contentHiddenRight: boolean;
|
|
14
|
-
contentHiddenLeft: boolean;
|
|
15
|
-
contentHiddenRight: boolean;
|
|
16
|
-
contentHiddenLeft: boolean;
|
|
17
|
-
contentHiddenRight: boolean;
|
|
18
14
|
};
|
|
19
15
|
declare class TabScrollIndicators extends React.Component<TabScrollIndicatorsProps, TabScrollIndicatorsState> {
|
|
20
16
|
constructor(props: any);
|
package/dist/src/Tabs/Tabs.d.ts
CHANGED