@oceanbase/design 0.4.15 → 1.0.0-alpha.0
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/design.min.css +1 -1
- package/dist/design.min.js +1 -1
- package/es/_util/genStyle.d.ts +0 -2
- package/es/_util/genStyle.js +0 -77
- package/es/badge/style/index.js +0 -1
- package/es/button/style/index.js +1 -30
- package/es/card/style/index.js +4 -2
- package/es/config-provider/index.js +1 -5
- package/es/descriptions/hooks/useItems.js +3 -2
- package/es/descriptions/style/index.js +1 -3
- package/es/empty/style/index.js +2 -7
- package/es/form/FormItem.d.ts +2 -1
- package/es/form/FormItem.js +1 -0
- package/es/global.css +7 -7
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -2
- package/es/result/style/index.js +2 -5
- package/es/table/index.d.ts +2 -2
- package/es/table/style/index.js +8 -31
- package/es/tabs/index.d.ts +8 -6
- package/es/tabs/index.js +10 -7
- package/es/tabs/style/index.js +2 -3
- package/es/theme/default.js +62 -39
- package/es/theme/style/aliyun.less +125 -125
- package/es/theme/style/compact.less +135 -135
- package/es/theme/style/dark.less +136 -136
- package/es/theme/style/default.less +135 -135
- package/es/typography/Link.d.ts +5 -1
- package/es/typography/Link.js +1 -0
- package/es/typography/Paragraph.d.ts +5 -1
- package/es/typography/Paragraph.js +1 -0
- package/es/typography/Text.d.ts +5 -1
- package/es/typography/Text.js +1 -0
- package/es/typography/Title.d.ts +5 -1
- package/es/typography/Title.js +1 -0
- package/es/typography/style/index.js +2 -6
- package/lib/_util/genStyle.d.ts +0 -2
- package/lib/_util/genStyle.js +2 -118
- package/lib/badge/style/index.js +0 -1
- package/lib/button/style/index.js +1 -37
- package/lib/card/style/index.js +9 -1
- package/lib/config-provider/index.js +1 -8
- package/lib/descriptions/hooks/useItems.js +3 -2
- package/lib/descriptions/style/index.js +0 -2
- package/lib/empty/style/index.js +0 -5
- package/lib/form/FormItem.d.ts +2 -1
- package/lib/form/FormItem.js +6 -0
- package/lib/global.css +7 -7
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -3
- package/lib/result/style/index.js +0 -4
- package/lib/table/index.d.ts +2 -2
- package/lib/table/style/index.js +1 -58
- package/lib/tabs/index.d.ts +8 -6
- package/lib/tabs/index.js +68 -62
- package/lib/tabs/style/index.js +6 -4
- package/lib/theme/default.js +62 -38
- package/lib/theme/style/aliyun.less +125 -125
- package/lib/theme/style/compact.less +135 -135
- package/lib/theme/style/dark.less +136 -136
- package/lib/theme/style/default.less +135 -135
- package/lib/typography/Link.d.ts +5 -1
- package/lib/typography/Link.js +1 -0
- package/lib/typography/Paragraph.d.ts +5 -1
- package/lib/typography/Paragraph.js +1 -0
- package/lib/typography/Text.d.ts +5 -1
- package/lib/typography/Text.js +1 -0
- package/lib/typography/Title.d.ts +5 -1
- package/lib/typography/Title.js +1 -0
- package/lib/typography/style/index.js +2 -9
- package/package.json +5 -6
package/es/_util/genStyle.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import type { CSSObject } from '@ant-design/cssinjs';
|
|
2
|
-
import type { FullToken } from 'antd/es/theme/internal';
|
|
3
2
|
export declare const genCompactStyle: (componentCls: string, subComponentCls?: string) => CSSObject;
|
|
4
|
-
export declare const genLargeStyle: (token: FullToken<any>) => CSSObject;
|
package/es/_util/genStyle.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
4
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
@@ -15,79 +13,4 @@ export var genCompactStyle = function genCompactStyle(componentCls) {
|
|
|
15
13
|
borderStartStartRadius: 0,
|
|
16
14
|
borderEndStartRadius: 0
|
|
17
15
|
});
|
|
18
|
-
};
|
|
19
|
-
export var genLargeStyle = function genLargeStyle(token) {
|
|
20
|
-
var antCls = token.antCls,
|
|
21
|
-
iconCls = token.iconCls,
|
|
22
|
-
fontSize = token.fontSize,
|
|
23
|
-
lineWidth = token.lineWidth,
|
|
24
|
-
borderRadiusLG = token.borderRadiusLG,
|
|
25
|
-
controlHeight = token.controlHeight,
|
|
26
|
-
controlHeightSM = token.controlHeightSM,
|
|
27
|
-
controlHeightLG = token.controlHeightLG;
|
|
28
|
-
var height = controlHeightLG;
|
|
29
|
-
var lineHeight = "".concat(controlHeightLG, "px");
|
|
30
|
-
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(antCls, "-btn"), _objectSpread({
|
|
31
|
-
// limit min width for icon button
|
|
32
|
-
minWidth: controlHeightLG,
|
|
33
|
-
height: height,
|
|
34
|
-
fontSize: fontSize,
|
|
35
|
-
borderRadius: borderRadiusLG
|
|
36
|
-
}, genCompactStyle("".concat(antCls, "-btn")))), "".concat(antCls, "-radio-group"), _defineProperty({}, "".concat(antCls, "-radio-button-wrapper"), _defineProperty(_defineProperty({
|
|
37
|
-
height: height,
|
|
38
|
-
lineHeight: "".concat(height - lineWidth * 2, "px"),
|
|
39
|
-
fontSize: fontSize
|
|
40
|
-
}, "&:first-child", {
|
|
41
|
-
borderStartStartRadius: borderRadiusLG,
|
|
42
|
-
borderEndStartRadius: borderRadiusLG
|
|
43
|
-
}), "&:last-child", {
|
|
44
|
-
borderStartEndRadius: borderRadiusLG,
|
|
45
|
-
borderEndEndRadius: borderRadiusLG
|
|
46
|
-
}))), "".concat(antCls, "-select"), _objectSpread(_objectSpread({
|
|
47
|
-
height: height,
|
|
48
|
-
fontSize: fontSize
|
|
49
|
-
}, genCompactStyle("".concat(antCls, "-select"), "".concat(antCls, "-select-selector"))), {}, _defineProperty(_defineProperty({}, "".concat(antCls, "-select-selector"), {
|
|
50
|
-
borderRadius: borderRadiusLG
|
|
51
|
-
}), "".concat(antCls, "-select-selection-item"), {
|
|
52
|
-
fontSize: fontSize
|
|
53
|
-
}))), "".concat(antCls, "-select-multiple ").concat(antCls, "-select-selection-wrap"), {
|
|
54
|
-
// ref: https://github.com/oceanbase/oceanbase-design/pull/881
|
|
55
|
-
height: '100%'
|
|
56
|
-
}), "".concat(antCls, "-input-wrapper"), _defineProperty(_defineProperty({
|
|
57
|
-
fontSize: fontSize
|
|
58
|
-
}, "".concat(iconCls), {
|
|
59
|
-
fontSize: fontSize
|
|
60
|
-
}), "".concat(antCls, "-input-affix-wrapper"), {
|
|
61
|
-
borderStartEndRadius: 0,
|
|
62
|
-
borderEndEndRadius: 0
|
|
63
|
-
})), "".concat(antCls, "-input-affix-wrapper"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
64
|
-
height: height,
|
|
65
|
-
borderRadius: borderRadiusLG
|
|
66
|
-
}, "&:not(".concat(antCls, "-input-affix-wrapper-lg)"), {
|
|
67
|
-
lineHeight: "".concat(controlHeight - lineWidth * 2, "px")
|
|
68
|
-
}), "".concat(antCls, "-input"), {
|
|
69
|
-
height: "".concat(controlHeight - lineWidth * 2, "px")
|
|
70
|
-
}), "".concat(antCls, "-input-lg"), {
|
|
71
|
-
height: controlHeightSM
|
|
72
|
-
}), "".concat(antCls, "-input-sm"), {
|
|
73
|
-
height: "".concat(controlHeightLG - lineWidth * 2, "px")
|
|
74
|
-
})), "".concat(antCls, "-input"), _objectSpread({
|
|
75
|
-
height: height,
|
|
76
|
-
fontSize: fontSize,
|
|
77
|
-
borderRadius: borderRadiusLG
|
|
78
|
-
}, genCompactStyle("".concat(antCls, "-input")))), "".concat(antCls, "-input-search-button"), {
|
|
79
|
-
height: height,
|
|
80
|
-
lineHeight: lineHeight,
|
|
81
|
-
borderStartEndRadius: borderRadiusLG,
|
|
82
|
-
borderEndEndRadius: borderRadiusLG
|
|
83
|
-
}), "".concat(antCls, "-input-group-addon"), {
|
|
84
|
-
fontSize: fontSize,
|
|
85
|
-
borderStartEndRadius: borderRadiusLG,
|
|
86
|
-
borderEndEndRadius: borderRadiusLG
|
|
87
|
-
}), "".concat(antCls, "-picker"), _objectSpread(_objectSpread({
|
|
88
|
-
height: height,
|
|
89
|
-
borderRadius: borderRadiusLG
|
|
90
|
-
}, genCompactStyle("".concat(antCls, "-picker"))), {}, _defineProperty({}, "".concat(antCls, "-picker-input>input"), {
|
|
91
|
-
fontSize: fontSize
|
|
92
|
-
})));
|
|
93
16
|
};
|
package/es/badge/style/index.js
CHANGED
|
@@ -16,7 +16,6 @@ export var genBadgeStyle = function genBadgeStyle(token) {
|
|
|
16
16
|
}, "&".concat(componentCls, "-status-default"), {
|
|
17
17
|
backgroundColor: token.colorFill
|
|
18
18
|
})), "".concat(componentCls, "-status-icon"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
19
|
-
fontSize: token.fontSizeSM,
|
|
20
19
|
// remove dot style
|
|
21
20
|
backgroundColor: 'transparent'
|
|
22
21
|
}, '&::after', {
|
package/es/button/style/index.js
CHANGED
|
@@ -1,35 +1,6 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
1
|
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
6
2
|
export var genButtonStyle = function genButtonStyle(token) {
|
|
7
|
-
|
|
8
|
-
// primary button className
|
|
9
|
-
var primaryBtnCls = "".concat(componentCls).concat(componentCls, "-primary:not([disabled]):not(").concat(componentCls, "-disabled):not(").concat(componentCls, "-dangerous):not(").concat(componentCls, "-background-ghost)");
|
|
10
|
-
var primaryAndCompactItemBtnCls = "".concat(componentCls, "-compact-item").concat(primaryBtnCls);
|
|
11
|
-
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), {
|
|
12
|
-
// remove box-shadow for button
|
|
13
|
-
boxShadow: 'none !important'
|
|
14
|
-
}), "".concat(primaryBtnCls), _defineProperty(_defineProperty({
|
|
15
|
-
background: 'linear-gradient(-59deg, #002BFF 0%, #0080FF 100%)',
|
|
16
|
-
border: 'none'
|
|
17
|
-
}, '&:hover', {
|
|
18
|
-
background: 'linear-gradient(120deg, #1AA0FF 0%, #1A53FF 100%)'
|
|
19
|
-
}), '&:active', {
|
|
20
|
-
background: 'linear-gradient(120deg, #0060E6 0%, #0013E6 100%)'
|
|
21
|
-
})), "".concat(primaryBtnCls).concat(componentCls, "-compact-last-item"), _defineProperty(_defineProperty({
|
|
22
|
-
background: 'linear-gradient(-59deg, #002BFF 0%, #002BFF 100%)'
|
|
23
|
-
}, '&:hover', {
|
|
24
|
-
background: 'linear-gradient(120deg, #1AA0FF 0%, #1A53FF 100%)'
|
|
25
|
-
}), '&:active', {
|
|
26
|
-
background: 'linear-gradient(120deg, #0060E6 0%, #0013E6 100%)'
|
|
27
|
-
})), "".concat(primaryAndCompactItemBtnCls, "+").concat(primaryAndCompactItemBtnCls, ":before"), {
|
|
28
|
-
height: '100%',
|
|
29
|
-
top: 0
|
|
30
|
-
}), "".concat(primaryAndCompactItemBtnCls, ":hover"), {
|
|
31
|
-
zIndex: 0
|
|
32
|
-
});
|
|
3
|
+
return {};
|
|
33
4
|
};
|
|
34
5
|
export default (function (prefixCls, isAliyun) {
|
|
35
6
|
var useStyle = genComponentStyleHook('Button', function (token) {
|
package/es/card/style/index.js
CHANGED
|
@@ -30,10 +30,12 @@ export var genCardStyle = function genCardStyle(token) {
|
|
|
30
30
|
var tableComponentCls = "".concat(antCls, "-table");
|
|
31
31
|
return _ref2 = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref2, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-bordered):not(").concat(componentCls, "-type-inner)"), {
|
|
32
32
|
boxShadow: 'none'
|
|
33
|
-
})), "".concat(componentCls).concat(componentCls, "-no-divider"), _defineProperty({}, "".concat(componentCls, "-head"), {
|
|
33
|
+
})), "".concat(componentCls).concat(componentCls, "-no-divider"), _defineProperty({}, "".concat(componentCls, "-head"), _defineProperty({
|
|
34
34
|
// should not remove border-bottom to avoid tabs inkbar display correctly
|
|
35
35
|
borderBottomColor: 'transparent'
|
|
36
|
-
}
|
|
36
|
+
}, tabsComponentCls, _defineProperty({}, "&".concat(tabsComponentCls, "-top, &").concat(tabsComponentCls, "-bottom"), _defineProperty({}, "".concat(tabsComponentCls, "-nav::before"), {
|
|
37
|
+
border: 'none'
|
|
38
|
+
}))))), "".concat(componentCls).concat(componentCls, "-no-divider:not(").concat(componentCls, "-contain-tabs)"), _defineProperty({}, "".concat(componentCls, "-body"), {
|
|
37
39
|
padding: "0 ".concat(paddingLG, "px ").concat(paddingLG, "px ").concat(paddingLG, "px")
|
|
38
40
|
})), "".concat(componentCls, "-small").concat(componentCls, "-no-divider:not(").concat(componentCls, "-contain-tabs)"), _defineProperty({}, "".concat(componentCls, "-body"), {
|
|
39
41
|
padding: "0 ".concat(paddingSM, "px ").concat(paddingSM, "px ").concat(paddingSM, "px")
|
|
@@ -79,11 +79,7 @@ var ConfigProvider = function ConfigProvider(_ref) {
|
|
|
79
79
|
}, parentContext.form, form),
|
|
80
80
|
spin: merge({}, parentContext.spin, spin),
|
|
81
81
|
table: merge({}, parentContext.table, table),
|
|
82
|
-
tabs: merge({},
|
|
83
|
-
indicatorSize: function indicatorSize(origin) {
|
|
84
|
-
return origin >= 24 ? origin - 16 : origin;
|
|
85
|
-
}
|
|
86
|
-
}, parentContext.tabs, tabs),
|
|
82
|
+
tabs: merge({}, parentContext.tabs, tabs),
|
|
87
83
|
theme: merge({}, mergedTheme, {
|
|
88
84
|
token:
|
|
89
85
|
// custom fontFamily
|
|
@@ -35,6 +35,7 @@ function convertItem(props, bordered) {
|
|
|
35
35
|
var itemChildren = props.children,
|
|
36
36
|
contentProps = props.contentProps,
|
|
37
37
|
restItemProps = _objectWithoutProperties(props, _excluded);
|
|
38
|
+
var itemChildrenType = itemChildren === null || itemChildren === void 0 ? void 0 : itemChildren.type;
|
|
38
39
|
var defaultEllipsis = {
|
|
39
40
|
tooltip: {
|
|
40
41
|
placement: 'topLeft',
|
|
@@ -47,8 +48,8 @@ function convertItem(props, bordered) {
|
|
|
47
48
|
editable = _ref.editable,
|
|
48
49
|
restContentProps = _objectWithoutProperties(_ref, _excluded2);
|
|
49
50
|
return _objectSpread(_objectSpread({}, restItemProps), {}, {
|
|
50
|
-
//
|
|
51
|
-
children: bordered ? itemChildren : /*#__PURE__*/_jsx(Typography.Text, _objectSpread(_objectSpread({}, restContentProps), {}, {
|
|
51
|
+
// 无边框并且子元素非 Typography 时外面包一层 Typography.Text,以实现自动省略
|
|
52
|
+
children: bordered || itemChildrenType !== null && itemChildrenType !== void 0 && itemChildrenType.__ANT_TYPOGRAPHY ? itemChildren : /*#__PURE__*/_jsx(Typography.Text, _objectSpread(_objectSpread({}, restContentProps), {}, {
|
|
52
53
|
ellipsis: getEllipsisConfig(ellipsis, itemChildren),
|
|
53
54
|
editable:
|
|
54
55
|
// disable autoSize by default to avoid over height
|
|
@@ -32,9 +32,7 @@ export var genDescriptionsStyle = function genDescriptionsStyle(token) {
|
|
|
32
32
|
var componentCls = token.componentCls,
|
|
33
33
|
typographyComponentCls = token.typographyComponentCls;
|
|
34
34
|
return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _objectSpread(_objectSpread({}, genVerticalStyle('default', token)), {}, _defineProperty(_defineProperty({}, "".concat(componentCls, "-item-container"), _defineProperty({}, "".concat(componentCls, "-item-content"), _defineProperty({
|
|
35
|
-
paddingRight: 12
|
|
36
|
-
// 为了保证内部的 Text ellipsis 生效
|
|
37
|
-
overflow: 'hidden'
|
|
35
|
+
paddingRight: 12
|
|
38
36
|
}, "".concat(typographyComponentCls, "-edit-content"), {
|
|
39
37
|
insetInlineStart: 0,
|
|
40
38
|
marginTop: 0,
|
package/es/empty/style/index.js
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
4
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
5
|
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
8
|
-
import { genLargeStyle } from "../../_util/genStyle";
|
|
9
6
|
export var genEmptyStyle = function genEmptyStyle(token) {
|
|
10
7
|
var antCls = token.antCls,
|
|
11
8
|
componentCls = token.componentCls,
|
|
12
9
|
colorTextTertiary = token.colorTextTertiary,
|
|
13
10
|
colorText = token.colorText,
|
|
14
11
|
colorTextSecondary = token.colorTextSecondary;
|
|
15
|
-
return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty(
|
|
12
|
+
return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty({}, "".concat(componentCls, "-image"), {
|
|
16
13
|
height: 160,
|
|
17
14
|
marginBottom: 0
|
|
18
15
|
}), "".concat(componentCls, "-description"), _defineProperty(_defineProperty(_defineProperty({
|
|
@@ -58,9 +55,7 @@ export var genEmptyStyle = function genEmptyStyle(token) {
|
|
|
58
55
|
color: colorTextTertiary,
|
|
59
56
|
fontSize: token.fontSizeSM,
|
|
60
57
|
marginTop: token.marginXS
|
|
61
|
-
}))))), "".concat(componentCls, "-
|
|
62
|
-
marginTop: token.marginLG
|
|
63
|
-
}, genLargeStyle(token)))), "".concat(componentCls, "-horizontal"), _defineProperty({
|
|
58
|
+
})))))), "".concat(componentCls, "-horizontal"), _defineProperty({
|
|
64
59
|
display: 'flex',
|
|
65
60
|
justifyContent: 'center',
|
|
66
61
|
alignItems: 'center'
|
package/es/form/FormItem.d.ts
CHANGED
|
@@ -4,11 +4,12 @@ import type { FormItemProps as AntFormItemProps } from 'antd/es/form';
|
|
|
4
4
|
import type { TooltipProps } from '../tooltip';
|
|
5
5
|
declare const AntFormItem: (<Values = any>(props: AntFormItemProps<Values>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
|
|
6
6
|
useStatus: () => {
|
|
7
|
-
status?: "" | "
|
|
7
|
+
status?: "" | "warning" | "error" | "success" | "validating";
|
|
8
8
|
errors: React.ReactNode[];
|
|
9
9
|
warnings: React.ReactNode[];
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
+
export * from 'antd/es/form/FormItem';
|
|
12
13
|
export type WrapperTooltipProps = Omit<TooltipProps, 'mouseFollow'> & {
|
|
13
14
|
icon?: React.ReactElement;
|
|
14
15
|
};
|
package/es/form/FormItem.js
CHANGED
|
@@ -20,6 +20,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
20
20
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
21
21
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
var AntFormItem = AntForm.Item;
|
|
23
|
+
export * from 'antd/es/form/FormItem';
|
|
23
24
|
var FormItem = function FormItem(_ref) {
|
|
24
25
|
var _children$type;
|
|
25
26
|
var children = _ref.children,
|
package/es/global.css
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
@font-face {
|
|
4
4
|
font-family: 'Inter';
|
|
5
|
-
/* load priority: local font >
|
|
5
|
+
/* load priority: local font > self-hosting font > remote font */
|
|
6
6
|
src:
|
|
7
7
|
local('Inter'),
|
|
8
|
+
url('./fonts/Inter.woff2') format('woff2'),
|
|
8
9
|
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2')
|
|
9
|
-
format('woff2')
|
|
10
|
-
url('./fonts/Inter.woff2') format('woff2');
|
|
10
|
+
format('woff2');
|
|
11
11
|
/* load strategy: use default font as fallback */
|
|
12
12
|
font-display: swap;
|
|
13
13
|
}
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
font-family: 'Consolas';
|
|
17
17
|
src:
|
|
18
18
|
local('Consolas'),
|
|
19
|
+
url('./fonts/Consolas.woff2') format('woff2'),
|
|
19
20
|
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*R8bMTqAdGWgAAAAAAAAAAAAADmfOAQ/Consolas.woff2')
|
|
20
|
-
format('woff2')
|
|
21
|
-
url('./fonts/Consolas.woff2') format('woff2');
|
|
21
|
+
format('woff2');
|
|
22
22
|
font-display: swap;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
font-family: 'Helvetica Neue';
|
|
27
27
|
src:
|
|
28
28
|
local('Helvetica Neue'),
|
|
29
|
+
url('./fonts/HelveticaNeue.woff2') format('woff2'),
|
|
29
30
|
url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*3EzqR6aYJMkAAAAAAAAAAAAADmfOAQ/HelveticaNeue.woff2')
|
|
30
|
-
format('woff2')
|
|
31
|
-
url('./fonts/HelveticaNeue.woff2') format('woff2');
|
|
31
|
+
format('woff2');
|
|
32
32
|
font-display: swap;
|
|
33
33
|
}
|
|
34
34
|
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
package/es/result/style/index.js
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
2
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
4
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
5
|
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
8
|
-
import { genLargeStyle } from "../../_util/genStyle";
|
|
9
6
|
export var genResultStyle = function genResultStyle(token) {
|
|
10
7
|
var componentCls = token.componentCls;
|
|
11
|
-
return _defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty(
|
|
8
|
+
return _defineProperty({}, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-title"), {
|
|
12
9
|
fontWeight: token.fontWeightStrong,
|
|
13
10
|
fontSize: token.fontSizeHeading4,
|
|
14
11
|
lineHeight: token.lineHeightHeading4
|
|
15
12
|
}), "".concat(componentCls, "-subtitle"), {
|
|
16
13
|
maxWidth: 600,
|
|
17
14
|
margin: '0px auto'
|
|
18
|
-
}), "".concat(componentCls, "-
|
|
15
|
+
}), "".concat(componentCls, "-content"), {
|
|
19
16
|
maxWidth: 1000,
|
|
20
17
|
margin: '0px auto',
|
|
21
18
|
marginTop: token.marginLG,
|
package/es/table/index.d.ts
CHANGED
|
@@ -38,8 +38,8 @@ declare const _default: (<RecordType extends AnyObject = AnyObject>(props: Table
|
|
|
38
38
|
SELECTION_ALL: "SELECT_ALL";
|
|
39
39
|
SELECTION_INVERT: "SELECT_INVERT";
|
|
40
40
|
SELECTION_NONE: "SELECT_NONE";
|
|
41
|
-
Column: <
|
|
42
|
-
ColumnGroup: <
|
|
41
|
+
Column: <RecordType extends import("antd/es/_util/type").AnyObject>(_: import("antd").TableColumnProps<RecordType>) => null;
|
|
42
|
+
ColumnGroup: <RecordType_1 extends import("antd/es/_util/type").AnyObject>(_: import("antd/es/table/ColumnGroup").ColumnGroupProps<RecordType_1>) => null;
|
|
43
43
|
Summary: typeof Summary;
|
|
44
44
|
useStyle: (prefixCls: string) => {
|
|
45
45
|
wrapSSR: (node: ReactNode) => ReactElement<any, string | React.JSXElementConstructor<any>>;
|
package/es/table/style/index.js
CHANGED
|
@@ -4,7 +4,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
4
4
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
5
|
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
6
6
|
export var genTableStyle = function genTableStyle(token) {
|
|
7
|
-
var
|
|
7
|
+
var _ref;
|
|
8
8
|
var antCls = token.antCls,
|
|
9
9
|
componentCls = token.componentCls,
|
|
10
10
|
colorText = token.colorText,
|
|
@@ -36,15 +36,7 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
36
36
|
backgroundColor: "".concat(colorBorderSecondary, " !important")
|
|
37
37
|
}), "".concat(componentCls, "-cell-scrollbar"), {
|
|
38
38
|
boxShadow: "0 1px 0 1px ".concat(colorBgBase)
|
|
39
|
-
})), "".concat(componentCls, "-tbody"),
|
|
40
|
-
backgroundColor: colorBgBase
|
|
41
|
-
}), "tr:nth-child(2n):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(componentCls, "-expanded-row):not(").concat(antCls, "-descriptions-row) > td"), {
|
|
42
|
-
backgroundColor: colorFillQuaternary
|
|
43
|
-
}), "tr:not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-expanded-row):not(").concat(antCls, "-descriptions-row):hover > td"), {
|
|
44
|
-
backgroundColor: "".concat(colorPrimaryBg, " !important")
|
|
45
|
-
}), "tr".concat(componentCls, "-row-selected > td"), {
|
|
46
|
-
backgroundColor: "".concat(colorPrimaryBg, " !important")
|
|
47
|
-
}), "".concat(componentCls, "-tbody-virtual-scrollbar ").concat(componentCls, "-tbody-virtual-scrollbar-thumb"), {
|
|
39
|
+
})), "".concat(componentCls, "-tbody"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-tbody-virtual-scrollbar ").concat(componentCls, "-tbody-virtual-scrollbar-thumb"), {
|
|
48
40
|
background: "".concat(token.colorFillSecondary, " !important")
|
|
49
41
|
}), "tr".concat(componentCls, "-expand-row-by-click"), {
|
|
50
42
|
cursor: 'pointer'
|
|
@@ -61,7 +53,7 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
61
53
|
display: 'flex',
|
|
62
54
|
justifyContent: 'center',
|
|
63
55
|
alignItems: 'center'
|
|
64
|
-
}),
|
|
56
|
+
}), "tr > td > ".concat(componentCls, "-wrapper:only-child ").concat(componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
65
57
|
borderBottom: 'none'
|
|
66
58
|
}, "".concat(componentCls, "-thead > tr > th"), {
|
|
67
59
|
backgroundColor: token.colorFillQuaternary
|
|
@@ -71,17 +63,11 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
71
63
|
borderRadius: 0
|
|
72
64
|
}), "".concat(componentCls, "-empty-wrapper"), {
|
|
73
65
|
minHeight: 'auto'
|
|
74
|
-
}))))
|
|
66
|
+
})))), "".concat(componentCls, "-wrapper ").concat(componentCls).concat(componentCls, "-middle"), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "".concat(componentCls, "-empty-wrapper"), {
|
|
75
67
|
minHeight: 260 - token.paddingXS * 2
|
|
76
68
|
}))), "".concat(componentCls, "-wrapper ").concat(componentCls).concat(componentCls, "-small"), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "".concat(componentCls, "-empty-wrapper"), {
|
|
77
69
|
minHeight: 160 - token.paddingXXS * 2
|
|
78
|
-
}))), "".concat(componentCls, "-wrapper ").concat(componentCls).concat(componentCls, "-
|
|
79
|
-
backgroundColor: colorFillQuaternary
|
|
80
|
-
}), "tr:nth-child(2n):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(componentCls, "-expanded-row):not(").concat(antCls, "-descriptions-row) > td"), {
|
|
81
|
-
backgroundColor: colorBgBase
|
|
82
|
-
}))), "".concat(componentCls, "-wrapper ").concat(componentCls).concat(componentCls, "-bordered"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-thead > tr"), _defineProperty({}, 'th', {
|
|
83
|
-
backgroundColor: colorFillQuaternary
|
|
84
|
-
})), "".concat(componentCls, "-footer"), {
|
|
70
|
+
}))), "".concat(componentCls, "-wrapper ").concat(componentCls).concat(componentCls, "-bordered"), _defineProperty({}, "".concat(componentCls, "-footer"), {
|
|
85
71
|
borderRadius: "0px 0px ".concat(token.borderRadiusLG, "px ").concat(token.borderRadiusLG, "px")
|
|
86
72
|
})), "".concat(componentCls, "-wrapper").concat(componentCls, "-inner-bordered ").concat(componentCls, "-bordered"), _defineProperty({}, "".concat(componentCls, "-container"), _defineProperty({
|
|
87
73
|
borderInlineStart: 'none',
|
|
@@ -95,18 +81,9 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
95
81
|
}), "&".concat(componentCls, "-selection-column, &").concat(componentCls, "-row-expand-icon-cell"), _defineProperty({}, "& + td, & + th", {
|
|
96
82
|
paddingLeft: token.paddingXS
|
|
97
83
|
}))))), "".concat(componentCls, "-wrapper:not(").concat(componentCls, "-expandable):not(").concat(componentCls, "-has-footer) ").concat(componentCls, ":not(").concat(componentCls, "-bordered):not(").concat(componentCls, "-empty)"), {
|
|
98
|
-
borderBottom: "1px solid ".concat(colorBorderSecondary),
|
|
99
84
|
borderBottomLeftRadius: 0,
|
|
100
85
|
borderBottomRightRadius: 0
|
|
101
|
-
}), "".concat(componentCls, "-wrapper
|
|
102
|
-
border: 'none'
|
|
103
|
-
})))), "".concat(componentCls, "-wrapper").concat(componentCls, "-expandable"), _defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty(_defineProperty(_defineProperty({}, "tr:nth-child(n):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(componentCls, "-expanded-row)"), _defineProperty(_defineProperty({}, '& > td', {
|
|
104
|
-
backgroundColor: colorBgBase
|
|
105
|
-
}), '&:hover', {
|
|
106
|
-
td: {
|
|
107
|
-
backgroundColor: colorPrimaryBg
|
|
108
|
-
}
|
|
109
|
-
})), "".concat(componentCls, "-expanded-row > td"), _defineProperty(_defineProperty({}, "& > *:not(".concat(componentCls, "-wrapper):not(").concat(componentCls, "-expanded-row-fixed)"), {
|
|
86
|
+
}), "".concat(componentCls, "-wrapper").concat(componentCls, "-expandable"), _defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-expanded-row > td"), _defineProperty(_defineProperty({}, "& > *:not(".concat(componentCls, "-wrapper):not(").concat(componentCls, "-expanded-row-fixed)"), {
|
|
110
87
|
marginLeft: token.marginXL + token.lineWidth * 2
|
|
111
88
|
}), "& > *".concat(componentCls, "-expanded-row-fixed"), {
|
|
112
89
|
paddingLeft: token.marginXL + token.lineWidth * 2 + token.padding
|
|
@@ -114,7 +91,7 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
114
91
|
marginLeft: token.margin + token.lineWidth * 2
|
|
115
92
|
}))), "".concat(componentCls, "-middle, ").concat(componentCls, "-small"), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "tr > td > ".concat(componentCls, "-wrapper:only-child ").concat(componentCls), {
|
|
116
93
|
marginLeft: token.margin + token.lineWidth * 2 + token.margin
|
|
117
|
-
})))),
|
|
94
|
+
})))), "".concat(componentCls, "-wrapper").concat(componentCls, "-expandable").concat(componentCls, "-selectable"), _defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-expanded-row > td"), _defineProperty(_defineProperty({}, "& > *:not(".concat(componentCls, "-wrapper):not(").concat(componentCls, "-expanded-row-fixed)"), {
|
|
118
95
|
marginLeft: token.marginXL + token.marginXL + token.lineWidth * 2
|
|
119
96
|
}), "& > *".concat(componentCls, "-expanded-row-fixed"), {
|
|
120
97
|
paddingLeft: token.marginXL + token.marginXL + token.lineWidth * 2 + token.padding
|
|
@@ -125,7 +102,7 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
125
102
|
})))), "".concat(componentCls, "-wrapper ").concat(antCls, "-spin-blur"), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "".concat(componentCls, "-placeholder"), {
|
|
126
103
|
// hide empty when Table loading
|
|
127
104
|
visibility: 'hidden'
|
|
128
|
-
}))), "".concat(componentCls, "-wrapper"), _defineProperty({}, "".concat(componentCls, "-pagination"), _defineProperty(_defineProperty({}, "&".concat(antCls, "-pagination"), {
|
|
105
|
+
}))), _defineProperty(_defineProperty(_defineProperty(_ref, "".concat(componentCls, "-wrapper"), _defineProperty({}, "".concat(componentCls, "-pagination"), _defineProperty(_defineProperty({}, "&".concat(antCls, "-pagination"), {
|
|
129
106
|
padding: "".concat(padding, "px 0"),
|
|
130
107
|
margin: '0 !important'
|
|
131
108
|
}), "".concat(componentCls, "-batch-operation-bar"), _defineProperty({
|
package/es/tabs/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { TabsProps as AntTabsProps, TabsPosition as AntTabsPosition } from 'antd/es/tabs';
|
|
2
|
+
import type { TabsProps as AntTabsProps, TabsPosition as AntTabsPosition, TabsRef } from 'antd/es/tabs';
|
|
3
3
|
import type { Tab as AntTab } from 'rc-tabs/es/interface';
|
|
4
|
+
import { genTabsStyle } from './style';
|
|
5
|
+
import TabPane from './TabPane';
|
|
4
6
|
import type { TabPaneProps } from './TabPane';
|
|
5
7
|
import type { BadgeProps } from '../badge';
|
|
6
8
|
export * from 'antd/es/tabs';
|
|
@@ -17,13 +19,13 @@ export type Tab = {
|
|
|
17
19
|
badge?: BadgeType;
|
|
18
20
|
} & (AntTab | AntTabOptional);
|
|
19
21
|
export interface TabsProps extends Omit<AntTabsProps, 'items'> {
|
|
22
|
+
divider?: boolean;
|
|
20
23
|
items?: Tab[];
|
|
21
24
|
}
|
|
22
25
|
export type TabsPosition = AntTabsPosition;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
genTabsStyle: (token: Partial<import("./style").TabsToken>) => import("@ant-design/cssinjs").CSSObject;
|
|
27
|
-
displayName: string;
|
|
26
|
+
type CompoundedComponent = React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<TabsRef>> & {
|
|
27
|
+
TabPane: typeof TabPane;
|
|
28
|
+
genTabsStyle: typeof genTabsStyle;
|
|
28
29
|
};
|
|
30
|
+
declare const Tabs: CompoundedComponent;
|
|
29
31
|
export default Tabs;
|
package/es/tabs/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var _excluded = ["children", "items", "type", "tabPosition", "prefixCls", "className"];
|
|
1
|
+
var _excluded = ["children", "divider", "items", "type", "tabPosition", "prefixCls", "className"];
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
7
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
-
import { isNullValue } from '@oceanbase/util';
|
|
11
|
-
import { Divider, Space, Tabs as AntTabs, Tag } from 'antd';
|
|
12
10
|
import React, { useCallback, useContext } from 'react';
|
|
11
|
+
import { Divider, Space, Tabs as AntTabs, Tag } from 'antd';
|
|
12
|
+
import { isNullValue } from '@oceanbase/util';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import Badge from "../badge";
|
|
15
15
|
import ConfigProvider from "../config-provider";
|
|
@@ -22,9 +22,11 @@ export * from 'antd/es/tabs';
|
|
|
22
22
|
var isReactNode = function isReactNode(item) {
|
|
23
23
|
return /*#__PURE__*/React.isValidElement(item);
|
|
24
24
|
};
|
|
25
|
-
var Tabs = function
|
|
25
|
+
var Tabs = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
26
26
|
var _newItems;
|
|
27
27
|
var children = _ref.children,
|
|
28
|
+
_ref$divider = _ref.divider,
|
|
29
|
+
divider = _ref$divider === void 0 ? false : _ref$divider,
|
|
28
30
|
items = _ref.items,
|
|
29
31
|
type = _ref.type,
|
|
30
32
|
tabPosition = _ref.tabPosition,
|
|
@@ -36,7 +38,7 @@ var Tabs = function Tabs(_ref) {
|
|
|
36
38
|
var prefixCls = getPrefixCls('tabs', customizePrefixCls);
|
|
37
39
|
var _useStyle = useStyle(prefixCls),
|
|
38
40
|
wrapSSR = _useStyle.wrapSSR;
|
|
39
|
-
var tabsCls = classNames(className);
|
|
41
|
+
var tabsCls = classNames(className, _defineProperty({}, "".concat(prefixCls, "-no-divider"), !divider));
|
|
40
42
|
var isHorizontal = !tabPosition || tabPosition === 'top' || tabPosition === 'bottom';
|
|
41
43
|
var dividerList = (items === null || items === void 0 ? void 0 : items.filter(function (item) {
|
|
42
44
|
return item.divider;
|
|
@@ -80,13 +82,14 @@ var Tabs = function Tabs(_ref) {
|
|
|
80
82
|
return item;
|
|
81
83
|
});
|
|
82
84
|
return wrapSSR( /*#__PURE__*/_jsx(AntTabs, _objectSpread({
|
|
85
|
+
ref: ref,
|
|
83
86
|
items: newItems,
|
|
84
87
|
type: type,
|
|
85
88
|
tabPosition: tabPosition,
|
|
86
89
|
prefixCls: customizePrefixCls,
|
|
87
90
|
className: tabsCls
|
|
88
91
|
}, restProps)));
|
|
89
|
-
};
|
|
92
|
+
});
|
|
90
93
|
Tabs.TabPane = TabPane;
|
|
91
94
|
Tabs.genTabsStyle = genTabsStyle;
|
|
92
95
|
if (process.env.NODE_ENV !== 'production') {
|
package/es/tabs/style/index.js
CHANGED
|
@@ -10,10 +10,9 @@ export var genTabsStyle = function genTabsStyle(token) {
|
|
|
10
10
|
colorInfoBg = token.colorInfoBg,
|
|
11
11
|
colorTextSecondary = token.colorTextSecondary,
|
|
12
12
|
colorFillQuaternary = token.colorFillQuaternary;
|
|
13
|
-
return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "&".concat(componentCls, "-top, &").concat(componentCls, "-bottom"), _defineProperty({}, "".concat(componentCls, "-nav::before"), {
|
|
14
|
-
// 页签位置为 top 和 bottom 时,去掉分割线
|
|
13
|
+
return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "&".concat(componentCls, "-no-divider"), _defineProperty({}, "&".concat(componentCls, "-top, &").concat(componentCls, "-bottom"), _defineProperty({}, "".concat(componentCls, "-nav::before"), {
|
|
15
14
|
border: 'none'
|
|
16
|
-
})), "".concat(componentCls, "-tab"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-tab-tag"), {
|
|
15
|
+
}))), "".concat(componentCls, "-tab"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-tab-tag"), {
|
|
17
16
|
color: colorTextSecondary,
|
|
18
17
|
fontFamily: 'PingFangSC',
|
|
19
18
|
fontSize: 12,
|