@aloudata/aloudata-design 0.4.8-beta.12 → 0.4.8-beta.13
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/Tabs/index.js +12 -3
- package/dist/Tabs/style/index.less +8 -4
- package/package.json +1 -1
package/dist/Tabs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["size", "className", "popupClassName", "adaptHeight", "style", "monospace", "
|
|
1
|
+
var _excluded = ["size", "className", "popupClassName", "adaptHeight", "style", "monospace", "tabPosition", "padding"];
|
|
2
2
|
|
|
3
3
|
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); }
|
|
4
4
|
|
|
@@ -26,13 +26,14 @@ export default function Tabs(props) {
|
|
|
26
26
|
_props$style = props.style,
|
|
27
27
|
style = _props$style === void 0 ? {} : _props$style,
|
|
28
28
|
monospace = props.monospace,
|
|
29
|
-
headerBackgroundColor = props.headerBackgroundColor,
|
|
30
29
|
_props$tabPosition = props.tabPosition,
|
|
31
30
|
tabPosition = _props$tabPosition === void 0 ? 'top' : _props$tabPosition,
|
|
32
31
|
_props$padding = props.padding,
|
|
33
32
|
padding = _props$padding === void 0 ? false : _props$padding,
|
|
34
33
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
35
34
|
|
|
35
|
+
var headerBackgroundColor = props.headerBackgroundColor;
|
|
36
|
+
|
|
36
37
|
var tabsProps = _objectSpread({}, otherProps);
|
|
37
38
|
|
|
38
39
|
if (size === 'large') {
|
|
@@ -55,6 +56,14 @@ export default function Tabs(props) {
|
|
|
55
56
|
return 0;
|
|
56
57
|
}, [padding, tabPosition]);
|
|
57
58
|
|
|
59
|
+
var getTabBarGutter = function getTabBarGutter() {
|
|
60
|
+
if (tabPosition === 'top' && !_monospace) {
|
|
61
|
+
return 24;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return 0;
|
|
65
|
+
};
|
|
66
|
+
|
|
58
67
|
return /*#__PURE__*/React.createElement(AntdTabs, _extends({
|
|
59
68
|
moreIcon: /*#__PURE__*/React.createElement("div", {
|
|
60
69
|
className: "ald-tabs-more-icon"
|
|
@@ -66,7 +75,7 @@ export default function Tabs(props) {
|
|
|
66
75
|
'--tabs-padding': "".concat(_padding, "px")
|
|
67
76
|
}),
|
|
68
77
|
tabPosition: tabPosition,
|
|
69
|
-
tabBarGutter:
|
|
78
|
+
tabBarGutter: getTabBarGutter(),
|
|
70
79
|
popupClassName: classNames(popupClassName, 'ald-tabs-dropdown'),
|
|
71
80
|
className: classNames('ald-tabs', className, {
|
|
72
81
|
'ald-adapt-height': adaptHeight,
|
|
@@ -137,8 +137,12 @@
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
&.ant-tabs-left {
|
|
140
|
-
.ant-tabs-nav-list{
|
|
141
|
-
|
|
140
|
+
.ant-tabs-nav-list {
|
|
141
|
+
padding-right: 24px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.ant-tabs-tab {
|
|
145
|
+
padding: 8px 0;
|
|
142
146
|
}
|
|
143
147
|
}
|
|
144
148
|
}
|
|
@@ -194,12 +198,12 @@
|
|
|
194
198
|
|
|
195
199
|
.ald-tabs-padding {
|
|
196
200
|
.ant-tabs-nav {
|
|
197
|
-
.ant-tabs-nav-wrap{
|
|
201
|
+
.ant-tabs-nav-wrap {
|
|
198
202
|
margin: 0 var(--tabs-padding);
|
|
199
203
|
}
|
|
200
204
|
}
|
|
201
205
|
|
|
202
|
-
.ant-tabs-content-holder{
|
|
206
|
+
.ant-tabs-content-holder {
|
|
203
207
|
padding: 0 var(--tabs-padding) var(--tabs-padding);
|
|
204
208
|
}
|
|
205
209
|
}
|