@oceanbase/design 0.4.12 → 0.4.14
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.js +1 -1
- package/es/anchor/index.d.ts +1 -0
- package/es/anchor/index.js +1 -0
- package/es/avatar/index.d.ts +1 -0
- package/es/avatar/index.js +1 -0
- package/es/modal/Modal.d.ts +5 -2
- package/es/modal/Modal.js +16 -3
- package/es/modal/style/index.js +10 -2
- package/es/segmented/index.d.ts +3 -0
- package/es/segmented/index.js +26 -7
- package/es/segmented/style/index.js +13 -2
- package/es/slider/style/index.js +9 -2
- package/es/table/index.d.ts +2 -2
- package/es/tabs/TabPane.d.ts +4 -0
- package/es/tabs/index.d.ts +4 -0
- package/es/tabs/index.js +19 -4
- package/es/tabs/style/index.js +10 -3
- package/es/tag/style/index.js +1 -3
- package/lib/anchor/index.d.ts +1 -0
- package/lib/anchor/index.js +2 -0
- package/lib/avatar/index.d.ts +1 -0
- package/lib/avatar/index.js +2 -0
- package/lib/modal/Modal.d.ts +5 -2
- package/lib/modal/Modal.js +9 -2
- package/lib/modal/style/index.js +11 -1
- package/lib/segmented/index.d.ts +3 -0
- package/lib/segmented/index.js +13 -3
- package/lib/segmented/style/index.js +26 -2
- package/lib/slider/style/index.js +5 -1
- package/lib/table/index.d.ts +2 -2
- package/lib/tabs/TabPane.d.ts +4 -0
- package/lib/tabs/index.d.ts +4 -0
- package/lib/tabs/index.js +15 -2
- package/lib/tabs/style/index.js +14 -1
- package/lib/tag/style/index.js +0 -1
- package/package.json +4 -4
package/es/anchor/index.d.ts
CHANGED
package/es/anchor/index.js
CHANGED
package/es/avatar/index.d.ts
CHANGED
package/es/avatar/index.js
CHANGED
package/es/modal/Modal.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import type { ModalFuncProps, ModalProps } from 'antd/es/modal';
|
|
1
|
+
import type { ModalFuncProps, ModalProps as AntModalProps } from 'antd/es/modal';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
export interface ModalProps extends AntModalProps {
|
|
4
|
+
extra?: React.ReactNode;
|
|
5
|
+
}
|
|
3
6
|
declare const Modal: {
|
|
4
|
-
({ footer, prefixCls: customizePrefixCls, className, ...restProps }: ModalProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
7
|
+
({ extra, footer, prefixCls: customizePrefixCls, className, ...restProps }: ModalProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
5
8
|
info(props: ModalFuncProps): {
|
|
6
9
|
destroy: () => void;
|
|
7
10
|
update: (configUpdate: import("antd/es/modal/confirm").ConfigUpdate) => void;
|
package/es/modal/Modal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
-
var _excluded = ["footer", "prefixCls", "className"];
|
|
2
|
+
var _excluded = ["extra", "footer", "prefixCls", "className"];
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
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; }
|
|
@@ -11,11 +11,14 @@ import { Modal as AntModal } from 'antd';
|
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
import React, { useContext } from 'react';
|
|
13
13
|
import ConfigProvider from "../config-provider";
|
|
14
|
+
import Space from "../space";
|
|
14
15
|
import { modal } from "../static-function";
|
|
15
16
|
import useStyle from "./style";
|
|
16
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
19
|
var Modal = function Modal(_ref) {
|
|
18
|
-
var
|
|
20
|
+
var extra = _ref.extra,
|
|
21
|
+
footer = _ref.footer,
|
|
19
22
|
customizePrefixCls = _ref.prefixCls,
|
|
20
23
|
className = _ref.className,
|
|
21
24
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -30,7 +33,17 @@ var Modal = function Modal(_ref) {
|
|
|
30
33
|
// convert false to null to hide .ant-modal-footer dom
|
|
31
34
|
// ref: https://github.com/ant-design/ant-design/blob/master/components/modal/Modal.tsx#L105
|
|
32
35
|
,
|
|
33
|
-
footer: footer === false ? null :
|
|
36
|
+
footer: footer === false ? null : extra ? function (originNode) {
|
|
37
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
38
|
+
className: "".concat(prefixCls, "-footer-content"),
|
|
39
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
40
|
+
className: "".concat(prefixCls, "-footer-extra"),
|
|
41
|
+
children: extra
|
|
42
|
+
}), /*#__PURE__*/_jsx(Space, {
|
|
43
|
+
children: originNode
|
|
44
|
+
})]
|
|
45
|
+
});
|
|
46
|
+
} : footer,
|
|
34
47
|
prefixCls: customizePrefixCls,
|
|
35
48
|
className: modalCls
|
|
36
49
|
}, restProps)));
|
package/es/modal/style/index.js
CHANGED
|
@@ -18,9 +18,17 @@ export var genModalStyle = function genModalStyle(token) {
|
|
|
18
18
|
var titleHeight = fontSizeHeading5 * lineHeightHeading5;
|
|
19
19
|
return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-confirm)"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-header"), {
|
|
20
20
|
marginBottom: marginLG
|
|
21
|
-
}), "".concat(componentCls, "-footer"), {
|
|
21
|
+
}), "".concat(componentCls, "-footer"), _defineProperty({
|
|
22
22
|
marginTop: marginLG
|
|
23
|
-
}
|
|
23
|
+
}, "".concat(componentCls, "-footer-content"), _defineProperty({
|
|
24
|
+
display: 'flex',
|
|
25
|
+
justifyContent: 'space-between',
|
|
26
|
+
alignItems: 'center'
|
|
27
|
+
}, "".concat(componentCls, "-footer-extra"), {
|
|
28
|
+
marginInlineEnd: token.margin,
|
|
29
|
+
// make extra align to start
|
|
30
|
+
textAlign: 'start'
|
|
31
|
+
})))), "".concat(componentCls).concat(componentCls, "-progress"), _defineProperty({}, "".concat(componentCls, "-content"), _defineProperty(_defineProperty(_defineProperty({
|
|
24
32
|
padding: "".concat(token.paddingXL + token.padding, "px ").concat(token.paddingLG + token.padding, "px")
|
|
25
33
|
}, "".concat(componentCls, "-header"), _defineProperty({
|
|
26
34
|
textAlign: 'center',
|
package/es/segmented/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SegmentedProps as AntSegmentedProps, SegmentedLabeledOption as AntSegmentedLabeledOption } from 'antd/es/segmented';
|
|
3
3
|
import type { EllipsisConfig } from '../typography';
|
|
4
|
+
import type { BadgeProps } from '../badge';
|
|
4
5
|
import type { SegmentedRawOption } from 'rc-segmented';
|
|
5
6
|
export * from 'antd/es/segmented';
|
|
7
|
+
type BadgeType = BadgeProps | BadgeProps['count'];
|
|
6
8
|
export type SegmentedLabeledOption = AntSegmentedLabeledOption & {
|
|
7
9
|
ellipsis?: EllipsisConfig;
|
|
10
|
+
badge?: BadgeType;
|
|
8
11
|
};
|
|
9
12
|
export interface SegmentedProps extends Omit<AntSegmentedProps, 'ref'> {
|
|
10
13
|
options: (SegmentedRawOption | SegmentedLabeledOption)[];
|
package/es/segmented/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var _excluded = ["prefixCls", "options"],
|
|
2
|
-
_excluded2 = ["label"];
|
|
2
|
+
_excluded2 = ["label", "badge"];
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
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; }
|
|
@@ -8,13 +8,18 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
8
8
|
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); }
|
|
9
9
|
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; }
|
|
10
10
|
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; }
|
|
11
|
-
import React, { useContext } from 'react';
|
|
12
|
-
import { Segmented as AntSegmented } from 'antd';
|
|
11
|
+
import React, { useCallback, useContext } from 'react';
|
|
12
|
+
import { Segmented as AntSegmented, Flex } from 'antd';
|
|
13
13
|
import ConfigProvider from "../config-provider";
|
|
14
14
|
import Typography from "../typography";
|
|
15
|
+
import Badge from "../badge";
|
|
15
16
|
import useStyle from "./style";
|
|
16
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
19
|
export * from 'antd/es/segmented';
|
|
20
|
+
var isReactNode = function isReactNode(item) {
|
|
21
|
+
return /*#__PURE__*/React.isValidElement(item);
|
|
22
|
+
};
|
|
18
23
|
var Segmented = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
19
24
|
var customizePrefixCls = _ref.prefixCls,
|
|
20
25
|
options = _ref.options,
|
|
@@ -24,14 +29,28 @@ var Segmented = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24
29
|
var prefixCls = getPrefixCls('segmented', customizePrefixCls);
|
|
25
30
|
var _useStyle = useStyle(prefixCls),
|
|
26
31
|
wrapSSR = _useStyle.wrapSSR;
|
|
32
|
+
var renderBadge = useCallback(function (badge) {
|
|
33
|
+
if (_typeof(badge) === 'object' && !isReactNode(badge)) {
|
|
34
|
+
return /*#__PURE__*/_jsx(Badge, _objectSpread({}, badge));
|
|
35
|
+
}
|
|
36
|
+
return /*#__PURE__*/_jsx(Badge, {
|
|
37
|
+
count: badge
|
|
38
|
+
});
|
|
39
|
+
}, []);
|
|
27
40
|
var newOptions = options === null || options === void 0 ? void 0 : options.map(function (item) {
|
|
28
|
-
if (_typeof(item) === 'object'
|
|
41
|
+
if (_typeof(item) === 'object') {
|
|
29
42
|
var label = item.label,
|
|
43
|
+
badge = item.badge,
|
|
30
44
|
restItem = _objectWithoutProperties(item, _excluded2);
|
|
31
45
|
return _objectSpread(_objectSpread({}, restItem), {}, {
|
|
32
|
-
label: /*#__PURE__*/
|
|
33
|
-
|
|
34
|
-
|
|
46
|
+
label: /*#__PURE__*/_jsxs(Flex, {
|
|
47
|
+
gap: 4,
|
|
48
|
+
align: "center",
|
|
49
|
+
justify: "center",
|
|
50
|
+
children: [item !== null && item !== void 0 && item.ellipsis ? /*#__PURE__*/_jsx(Typography.Text, {
|
|
51
|
+
ellipsis: item.ellipsis,
|
|
52
|
+
children: label
|
|
53
|
+
}) : label, badge && renderBadge(badge)]
|
|
35
54
|
})
|
|
36
55
|
});
|
|
37
56
|
}
|
|
@@ -4,8 +4,19 @@ 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 genSegmentedStyle = function genSegmentedStyle(token) {
|
|
7
|
-
var componentCls = token.componentCls
|
|
8
|
-
|
|
7
|
+
var componentCls = token.componentCls,
|
|
8
|
+
antCls = token.antCls,
|
|
9
|
+
colorFill = token.colorFill,
|
|
10
|
+
colorFillSecondary = token.colorFillSecondary;
|
|
11
|
+
return _defineProperty({}, "".concat(componentCls, " >").concat(componentCls, "-group"), _defineProperty(_defineProperty({}, "&:not(:has(".concat(componentCls, "-thumb)) >").concat(componentCls, "-item"), _defineProperty({}, "&:not(.ant-segmented-item-selected) >".concat(componentCls, "-item-label"), _defineProperty(_defineProperty({}, '&:hover', _defineProperty({}, "".concat(antCls, "-badge >").concat(antCls, "-badge-count"), {
|
|
12
|
+
backgroundColor: colorFill
|
|
13
|
+
})), '&:active', _defineProperty({}, "".concat(antCls, "-badge >").concat(antCls, "-badge-count"), {
|
|
14
|
+
backgroundColor: colorFillSecondary
|
|
15
|
+
})))), ">".concat(componentCls, "-item"), _defineProperty({}, ">".concat(componentCls, "-item-label"), _defineProperty({}, "".concat(antCls, "-badge >").concat(antCls, "-badge-count"), {
|
|
16
|
+
backgroundColor: colorFillSecondary,
|
|
17
|
+
color: 'inherit',
|
|
18
|
+
boxShadow: 'none'
|
|
19
|
+
}))));
|
|
9
20
|
};
|
|
10
21
|
export default (function (prefixCls) {
|
|
11
22
|
var useStyle = genComponentStyleHook('Segmented', function (token) {
|
package/es/slider/style/index.js
CHANGED
|
@@ -2,15 +2,22 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
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
3
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
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
|
+
import { toNumber } from 'lodash';
|
|
5
6
|
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
6
7
|
export var genSliderStyle = function genSliderStyle(token) {
|
|
7
8
|
var componentCls = token.componentCls,
|
|
8
9
|
_token$dotSize = token.dotSize,
|
|
9
|
-
dotSize = _token$dotSize === void 0 ? 8 : _token$dotSize
|
|
10
|
-
|
|
10
|
+
dotSize = _token$dotSize === void 0 ? 8 : _token$dotSize,
|
|
11
|
+
_token$handleSize = token.handleSize,
|
|
12
|
+
handleSize = _token$handleSize === void 0 ? 10 : _token$handleSize,
|
|
13
|
+
_token$handleLineWidt = token.handleLineWidth,
|
|
14
|
+
handleLineWidth = _token$handleLineWidt === void 0 ? 2 : _token$handleLineWidt;
|
|
15
|
+
return _defineProperty({}, "".concat(componentCls).concat(componentCls, "-horizontal"), _defineProperty({}, "".concat(componentCls, "-mark"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-mark-text[style*=\"left: 0%;\"]"), {
|
|
11
16
|
transform: "translateX(calc(0% - ".concat(dotSize / 2, "px)) !important")
|
|
12
17
|
}), "".concat(componentCls, "-mark-text[style*=\"left: 100%;\"]"), {
|
|
13
18
|
transform: "translateX(calc(-100% + ".concat(dotSize / 2, "px)) !important")
|
|
19
|
+
}), "".concat(componentCls, "-mark-text[style=\"transform: translateX(-50%);\"]"), {
|
|
20
|
+
transform: "translateX(calc(0% - ".concat((handleSize + toNumber(handleLineWidth) * 2) / 2, "px)) !important")
|
|
14
21
|
})));
|
|
15
22
|
};
|
|
16
23
|
export default (function (prefixCls) {
|
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/tabs/TabPane.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { TabPaneProps as AntTabPaneProps } from 'antd/es/tabs/TabPane';
|
|
2
2
|
import type React from 'react';
|
|
3
|
+
import type { BadgeProps } from '../badge';
|
|
4
|
+
type BadgeType = BadgeProps | BadgeProps['count'];
|
|
3
5
|
export interface TabPaneProps extends AntTabPaneProps {
|
|
6
|
+
/** @deprecated please use `badge` instead */
|
|
4
7
|
tag?: React.ReactNode;
|
|
5
8
|
divider?: boolean;
|
|
9
|
+
badge?: BadgeType;
|
|
6
10
|
}
|
|
7
11
|
declare const _default: React.FC<TabPaneProps>;
|
|
8
12
|
export default _default;
|
package/es/tabs/index.d.ts
CHANGED
|
@@ -2,15 +2,19 @@ import React from 'react';
|
|
|
2
2
|
import type { TabsProps as AntTabsProps, TabsPosition as AntTabsPosition } from 'antd/es/tabs';
|
|
3
3
|
import type { Tab as AntTab } from 'rc-tabs/es/interface';
|
|
4
4
|
import type { TabPaneProps } from './TabPane';
|
|
5
|
+
import type { BadgeProps } from '../badge';
|
|
5
6
|
export * from 'antd/es/tabs';
|
|
6
7
|
export type { TabPaneProps };
|
|
8
|
+
type BadgeType = BadgeProps | BadgeProps['count'];
|
|
7
9
|
export interface AntTabOptional extends Omit<AntTab, 'key' | 'label'> {
|
|
8
10
|
key?: string;
|
|
9
11
|
label?: React.ReactNode;
|
|
10
12
|
}
|
|
11
13
|
export type Tab = {
|
|
14
|
+
/** @deprecated please use `badge` instead */
|
|
12
15
|
tag?: React.ReactNode;
|
|
13
16
|
divider?: boolean;
|
|
17
|
+
badge?: BadgeType;
|
|
14
18
|
} & (AntTab | AntTabOptional);
|
|
15
19
|
export interface TabsProps extends Omit<AntTabsProps, 'items'> {
|
|
16
20
|
items?: Tab[];
|
package/es/tabs/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
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
1
|
var _excluded = ["children", "items", "type", "tabPosition", "prefixCls", "className"];
|
|
3
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; }
|
|
4
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; }
|
|
5
4
|
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; }
|
|
6
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
6
|
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
10
|
import { isNullValue } from '@oceanbase/util';
|
|
11
11
|
import { Divider, Space, Tabs as AntTabs, Tag } from 'antd';
|
|
12
|
-
import React, { useContext } from 'react';
|
|
12
|
+
import React, { useCallback, useContext } from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
+
import Badge from "../badge";
|
|
14
15
|
import ConfigProvider from "../config-provider";
|
|
15
16
|
import useLegacyItems from "./hooks/useLegacyItems";
|
|
16
17
|
import useStyle, { genTabsStyle } from "./style";
|
|
@@ -18,6 +19,9 @@ import TabPane from "./TabPane";
|
|
|
18
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
21
|
export * from 'antd/es/tabs';
|
|
22
|
+
var isReactNode = function isReactNode(item) {
|
|
23
|
+
return /*#__PURE__*/React.isValidElement(item);
|
|
24
|
+
};
|
|
21
25
|
var Tabs = function Tabs(_ref) {
|
|
22
26
|
var _newItems;
|
|
23
27
|
var children = _ref.children,
|
|
@@ -37,6 +41,17 @@ var Tabs = function Tabs(_ref) {
|
|
|
37
41
|
var dividerList = (items === null || items === void 0 ? void 0 : items.filter(function (item) {
|
|
38
42
|
return item.divider;
|
|
39
43
|
})) || [];
|
|
44
|
+
var renderBadge = useCallback(function (badge) {
|
|
45
|
+
if (_typeof(badge) === 'object' && !isReactNode(badge)) {
|
|
46
|
+
return /*#__PURE__*/_jsx(Badge, _objectSpread(_objectSpread({}, badge), {}, {
|
|
47
|
+
className: classNames("".concat(prefixCls, "-tab-badge"), badge.className)
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
return /*#__PURE__*/_jsx(Badge, {
|
|
51
|
+
className: "".concat(prefixCls, "-tab-badge"),
|
|
52
|
+
count: badge
|
|
53
|
+
});
|
|
54
|
+
}, [prefixCls]);
|
|
40
55
|
var newItems = useLegacyItems(items, children);
|
|
41
56
|
newItems = (_newItems = newItems) === null || _newItems === void 0 ? void 0 : _newItems.map(function (item) {
|
|
42
57
|
if (!isNullValue(item.divider)) {
|
|
@@ -50,11 +65,11 @@ var Tabs = function Tabs(_ref) {
|
|
|
50
65
|
}),
|
|
51
66
|
disabled: true
|
|
52
67
|
});
|
|
53
|
-
} else if (!isNullValue(item.tag)) {
|
|
68
|
+
} else if (!isNullValue(item.tag) || !isNullValue(item.badge)) {
|
|
54
69
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
55
70
|
label: /*#__PURE__*/_jsxs(Space, {
|
|
56
71
|
size: 4,
|
|
57
|
-
children: [item.label, /*#__PURE__*/_jsx(Tag, {
|
|
72
|
+
children: [item.label, item.badge && renderBadge(item.badge), !isNullValue(item.tag) && /*#__PURE__*/_jsx(Tag, {
|
|
58
73
|
bordered: false,
|
|
59
74
|
className: "".concat(prefixCls, "-tab-tag"),
|
|
60
75
|
children: item.tag
|
package/es/tabs/style/index.js
CHANGED
|
@@ -8,18 +8,25 @@ export var genTabsStyle = function genTabsStyle(token) {
|
|
|
8
8
|
componentCls = token.componentCls,
|
|
9
9
|
colorInfo = token.colorInfo,
|
|
10
10
|
colorInfoBg = token.colorInfoBg,
|
|
11
|
-
colorTextSecondary = token.colorTextSecondary
|
|
11
|
+
colorTextSecondary = token.colorTextSecondary,
|
|
12
|
+
colorFillQuaternary = token.colorFillQuaternary;
|
|
12
13
|
return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "&".concat(componentCls, "-top, &").concat(componentCls, "-bottom"), _defineProperty({}, "".concat(componentCls, "-nav::before"), {
|
|
13
14
|
// 页签位置为 top 和 bottom 时,去掉分割线
|
|
14
15
|
border: 'none'
|
|
15
|
-
})), "".concat(componentCls, "-tab"), _defineProperty({}, "".concat(componentCls, "-tab-tag"), {
|
|
16
|
+
})), "".concat(componentCls, "-tab"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-tab-tag"), {
|
|
16
17
|
color: colorTextSecondary,
|
|
17
18
|
fontFamily: 'PingFangSC',
|
|
18
19
|
fontSize: 12,
|
|
19
20
|
borderRadius: 12,
|
|
20
21
|
marginInlineEnd: 0,
|
|
21
22
|
height: 20
|
|
22
|
-
})
|
|
23
|
+
}), "".concat(componentCls, "-tab-badge"), _defineProperty(_defineProperty({}, ">".concat(antCls, "-badge-count"), {
|
|
24
|
+
color: colorTextSecondary,
|
|
25
|
+
backgroundColor: colorFillQuaternary
|
|
26
|
+
}), "borderRadius", 12))), "".concat(componentCls, "-tab-active"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-tab-tag"), {
|
|
27
|
+
color: colorInfo,
|
|
28
|
+
backgroundColor: colorInfoBg
|
|
29
|
+
}), "".concat(componentCls, "-tab-badge >").concat(antCls, "-badge-count"), {
|
|
23
30
|
color: colorInfo,
|
|
24
31
|
backgroundColor: colorInfoBg
|
|
25
32
|
})), "".concat(componentCls, "-tab[data-node-key^=divider-]"), _defineProperty({
|
package/es/tag/style/index.js
CHANGED
|
@@ -39,9 +39,7 @@ export var genTagStyle = function genTagStyle(token) {
|
|
|
39
39
|
paddingInline: token.paddingXS,
|
|
40
40
|
borderColor: getTagBorderColor(token.colorBorder),
|
|
41
41
|
fontSize: token.fontSizeSM
|
|
42
|
-
}, "".concat(antCls, "-typography"), _defineProperty({
|
|
43
|
-
fontSize: token.fontSizeSM
|
|
44
|
-
}, "".concat(componentCls, "-icon"), {
|
|
42
|
+
}, "".concat(antCls, "-typography"), _defineProperty({}, "".concat(componentCls, "-icon"), {
|
|
45
43
|
marginInlineEnd: paddingInline
|
|
46
44
|
})), '&-ellipsis', {
|
|
47
45
|
maxWidth: '100%',
|
package/lib/anchor/index.d.ts
CHANGED
package/lib/anchor/index.js
CHANGED
|
@@ -16,8 +16,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// src/anchor/index.ts
|
|
17
17
|
var anchor_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(anchor_exports);
|
|
19
|
+
__reExport(anchor_exports, require("antd/es/anchor/Anchor"), module.exports);
|
|
19
20
|
__reExport(anchor_exports, require("antd/es/anchor"), module.exports);
|
|
20
21
|
// Annotate the CommonJS export names for ESM import in node:
|
|
21
22
|
0 && (module.exports = {
|
|
23
|
+
...require("antd/es/anchor/Anchor"),
|
|
22
24
|
...require("antd/es/anchor")
|
|
23
25
|
});
|
package/lib/avatar/index.d.ts
CHANGED
package/lib/avatar/index.js
CHANGED
|
@@ -16,8 +16,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
// src/avatar/index.ts
|
|
17
17
|
var avatar_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(avatar_exports);
|
|
19
|
+
__reExport(avatar_exports, require("antd/es/avatar/AvatarContext"), module.exports);
|
|
19
20
|
__reExport(avatar_exports, require("antd/es/avatar"), module.exports);
|
|
20
21
|
// Annotate the CommonJS export names for ESM import in node:
|
|
21
22
|
0 && (module.exports = {
|
|
23
|
+
...require("antd/es/avatar/AvatarContext"),
|
|
22
24
|
...require("antd/es/avatar")
|
|
23
25
|
});
|
package/lib/modal/Modal.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import type { ModalFuncProps, ModalProps } from 'antd/es/modal';
|
|
1
|
+
import type { ModalFuncProps, ModalProps as AntModalProps } from 'antd/es/modal';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
export interface ModalProps extends AntModalProps {
|
|
4
|
+
extra?: React.ReactNode;
|
|
5
|
+
}
|
|
3
6
|
declare const Modal: {
|
|
4
|
-
({ footer, prefixCls: customizePrefixCls, className, ...restProps }: ModalProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
7
|
+
({ extra, footer, prefixCls: customizePrefixCls, className, ...restProps }: ModalProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
5
8
|
info(props: ModalFuncProps): {
|
|
6
9
|
destroy: () => void;
|
|
7
10
|
update: (configUpdate: import("antd/es/modal/confirm").ConfigUpdate) => void;
|
package/lib/modal/Modal.js
CHANGED
|
@@ -36,9 +36,16 @@ var import_antd = require("antd");
|
|
|
36
36
|
var import_classnames = __toESM(require("classnames"));
|
|
37
37
|
var import_react = __toESM(require("react"));
|
|
38
38
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
39
|
+
var import_space = __toESM(require("../space"));
|
|
39
40
|
var import_static_function = require("../static-function");
|
|
40
41
|
var import_style = __toESM(require("./style"));
|
|
41
|
-
var Modal = ({
|
|
42
|
+
var Modal = ({
|
|
43
|
+
extra,
|
|
44
|
+
footer,
|
|
45
|
+
prefixCls: customizePrefixCls,
|
|
46
|
+
className,
|
|
47
|
+
...restProps
|
|
48
|
+
}) => {
|
|
42
49
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
43
50
|
const prefixCls = getPrefixCls("modal", customizePrefixCls);
|
|
44
51
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
@@ -48,7 +55,7 @@ var Modal = ({ footer, prefixCls: customizePrefixCls, className, ...restProps })
|
|
|
48
55
|
import_antd.Modal,
|
|
49
56
|
{
|
|
50
57
|
destroyOnClose: true,
|
|
51
|
-
footer: footer === false ? null : footer,
|
|
58
|
+
footer: footer === false ? null : extra ? (originNode) => /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-footer-content` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-footer-extra` }, extra), /* @__PURE__ */ import_react.default.createElement(import_space.default, null, originNode)) : footer,
|
|
52
59
|
prefixCls: customizePrefixCls,
|
|
53
60
|
className: modalCls,
|
|
54
61
|
...restProps
|
package/lib/modal/style/index.js
CHANGED
|
@@ -46,7 +46,17 @@ var genModalStyle = (token) => {
|
|
|
46
46
|
marginBottom: marginLG
|
|
47
47
|
},
|
|
48
48
|
[`${componentCls}-footer`]: {
|
|
49
|
-
marginTop: marginLG
|
|
49
|
+
marginTop: marginLG,
|
|
50
|
+
[`${componentCls}-footer-content`]: {
|
|
51
|
+
display: "flex",
|
|
52
|
+
justifyContent: "space-between",
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
[`${componentCls}-footer-extra`]: {
|
|
55
|
+
marginInlineEnd: token.margin,
|
|
56
|
+
// make extra align to start
|
|
57
|
+
textAlign: "start"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
50
60
|
}
|
|
51
61
|
},
|
|
52
62
|
/* Modal.Progress */
|
package/lib/segmented/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SegmentedProps as AntSegmentedProps, SegmentedLabeledOption as AntSegmentedLabeledOption } from 'antd/es/segmented';
|
|
3
3
|
import type { EllipsisConfig } from '../typography';
|
|
4
|
+
import type { BadgeProps } from '../badge';
|
|
4
5
|
import type { SegmentedRawOption } from 'rc-segmented';
|
|
5
6
|
export * from 'antd/es/segmented';
|
|
7
|
+
type BadgeType = BadgeProps | BadgeProps['count'];
|
|
6
8
|
export type SegmentedLabeledOption = AntSegmentedLabeledOption & {
|
|
7
9
|
ellipsis?: EllipsisConfig;
|
|
10
|
+
badge?: BadgeType;
|
|
8
11
|
};
|
|
9
12
|
export interface SegmentedProps extends Omit<AntSegmentedProps, 'ref'> {
|
|
10
13
|
options: (SegmentedRawOption | SegmentedLabeledOption)[];
|
package/lib/segmented/index.js
CHANGED
|
@@ -37,19 +37,29 @@ var import_react = __toESM(require("react"));
|
|
|
37
37
|
var import_antd = require("antd");
|
|
38
38
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
39
39
|
var import_typography = __toESM(require("../typography"));
|
|
40
|
+
var import_badge = __toESM(require("../badge"));
|
|
40
41
|
var import_style = __toESM(require("./style"));
|
|
41
42
|
__reExport(segmented_exports, require("antd/es/segmented"), module.exports);
|
|
43
|
+
var isReactNode = (item) => {
|
|
44
|
+
return import_react.default.isValidElement(item);
|
|
45
|
+
};
|
|
42
46
|
var Segmented = import_react.default.forwardRef(
|
|
43
47
|
({ prefixCls: customizePrefixCls, options, ...restProps }, ref) => {
|
|
44
48
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
45
49
|
const prefixCls = getPrefixCls("segmented", customizePrefixCls);
|
|
46
50
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
51
|
+
const renderBadge = (0, import_react.useCallback)((badge) => {
|
|
52
|
+
if (typeof badge === "object" && !isReactNode(badge)) {
|
|
53
|
+
return /* @__PURE__ */ import_react.default.createElement(import_badge.default, { ...badge });
|
|
54
|
+
}
|
|
55
|
+
return /* @__PURE__ */ import_react.default.createElement(import_badge.default, { count: badge });
|
|
56
|
+
}, []);
|
|
47
57
|
const newOptions = options == null ? void 0 : options.map((item) => {
|
|
48
|
-
if (typeof item === "object"
|
|
49
|
-
const { label, ...restItem } = item;
|
|
58
|
+
if (typeof item === "object") {
|
|
59
|
+
const { label, badge, ...restItem } = item;
|
|
50
60
|
return {
|
|
51
61
|
...restItem,
|
|
52
|
-
label: /* @__PURE__ */ import_react.default.createElement(import_typography.default.Text, { ellipsis: item.ellipsis }, label)
|
|
62
|
+
label: /* @__PURE__ */ import_react.default.createElement(import_antd.Flex, { gap: 4, align: "center", justify: "center" }, (item == null ? void 0 : item.ellipsis) ? /* @__PURE__ */ import_react.default.createElement(import_typography.default.Text, { ellipsis: item.ellipsis }, label) : label, badge && renderBadge(badge))
|
|
53
63
|
};
|
|
54
64
|
}
|
|
55
65
|
return item;
|
|
@@ -25,9 +25,33 @@ __export(style_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
26
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
27
|
var genSegmentedStyle = (token) => {
|
|
28
|
-
const { componentCls } = token;
|
|
28
|
+
const { componentCls, antCls, colorFill, colorFillSecondary } = token;
|
|
29
29
|
return {
|
|
30
|
-
[`${componentCls}`]: {
|
|
30
|
+
[`${componentCls} >${componentCls}-group`]: {
|
|
31
|
+
[`&:not(:has(${componentCls}-thumb)) >${componentCls}-item`]: {
|
|
32
|
+
[`&:not(.ant-segmented-item-selected) >${componentCls}-item-label`]: {
|
|
33
|
+
["&:hover"]: {
|
|
34
|
+
[`${antCls}-badge >${antCls}-badge-count`]: {
|
|
35
|
+
backgroundColor: colorFill
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
["&:active"]: {
|
|
39
|
+
[`${antCls}-badge >${antCls}-badge-count`]: {
|
|
40
|
+
backgroundColor: colorFillSecondary
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
[`>${componentCls}-item`]: {
|
|
46
|
+
[`>${componentCls}-item-label`]: {
|
|
47
|
+
[`${antCls}-badge >${antCls}-badge-count`]: {
|
|
48
|
+
backgroundColor: colorFillSecondary,
|
|
49
|
+
color: "inherit",
|
|
50
|
+
boxShadow: "none"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
31
55
|
};
|
|
32
56
|
};
|
|
33
57
|
var style_default = (prefixCls) => {
|
|
@@ -23,9 +23,10 @@ __export(style_exports, {
|
|
|
23
23
|
genSliderStyle: () => genSliderStyle
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_lodash = require("lodash");
|
|
26
27
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
28
|
var genSliderStyle = (token) => {
|
|
28
|
-
const { componentCls, dotSize = 8 } = token;
|
|
29
|
+
const { componentCls, dotSize = 8, handleSize = 10, handleLineWidth = 2 } = token;
|
|
29
30
|
return {
|
|
30
31
|
[`${componentCls}${componentCls}-horizontal`]: {
|
|
31
32
|
[`${componentCls}-mark`]: {
|
|
@@ -34,6 +35,9 @@ var genSliderStyle = (token) => {
|
|
|
34
35
|
},
|
|
35
36
|
[`${componentCls}-mark-text[style*="left: 100%;"]`]: {
|
|
36
37
|
transform: `translateX(calc(-100% + ${dotSize / 2}px)) !important`
|
|
38
|
+
},
|
|
39
|
+
[`${componentCls}-mark-text[style="transform: translateX(-50%);"]`]: {
|
|
40
|
+
transform: `translateX(calc(0% - ${(handleSize + (0, import_lodash.toNumber)(handleLineWidth) * 2) / 2}px)) !important`
|
|
37
41
|
}
|
|
38
42
|
}
|
|
39
43
|
}
|
package/lib/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/lib/tabs/TabPane.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { TabPaneProps as AntTabPaneProps } from 'antd/es/tabs/TabPane';
|
|
2
2
|
import type React from 'react';
|
|
3
|
+
import type { BadgeProps } from '../badge';
|
|
4
|
+
type BadgeType = BadgeProps | BadgeProps['count'];
|
|
3
5
|
export interface TabPaneProps extends AntTabPaneProps {
|
|
6
|
+
/** @deprecated please use `badge` instead */
|
|
4
7
|
tag?: React.ReactNode;
|
|
5
8
|
divider?: boolean;
|
|
9
|
+
badge?: BadgeType;
|
|
6
10
|
}
|
|
7
11
|
declare const _default: React.FC<TabPaneProps>;
|
|
8
12
|
export default _default;
|