@oceanbase/design 0.4.16 → 0.4.18
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/card/style/index.js +4 -2
- package/es/form/FormItem.d.ts +1 -0
- package/es/form/FormItem.js +1 -0
- package/es/input-number/index.d.ts +2 -1
- package/es/locale/ja-JP.d.ts +3 -0
- package/es/locale/ja-JP.js +28 -0
- package/es/table/index.d.ts +2 -2
- package/es/table/style/index.js +1 -3
- 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/typography/style/index.js +2 -6
- package/lib/alert/index.js +7 -6
- package/lib/badge/index.js +21 -18
- package/lib/button/index.js +2 -1
- package/lib/card/index.js +9 -5
- package/lib/card/style/index.js +9 -1
- package/lib/checkbox/index.js +2 -1
- package/lib/config-provider/DefaultRenderEmpty.js +4 -3
- package/lib/config-provider/index.js +20 -16
- package/lib/descriptions/hooks/useItems.js +5 -4
- package/lib/descriptions/index.js +3 -2
- package/lib/drawer/index.js +38 -29
- package/lib/dropdown/dropdown-button.js +3 -13
- package/lib/dropdown/index.js +2 -2
- package/lib/empty/colored.js +413 -327
- package/lib/empty/database.js +267 -222
- package/lib/empty/default.js +16 -21
- package/lib/empty/guide.js +201 -184
- package/lib/empty/index.js +23 -17
- package/lib/form/FormItem.d.ts +1 -0
- package/lib/form/FormItem.js +15 -5
- package/lib/form/index.js +6 -3
- package/lib/grid/col.js +2 -1
- package/lib/grid/row.js +2 -1
- package/lib/input/Input.js +3 -2
- package/lib/input/Password.js +3 -2
- package/lib/input/Search.js +3 -2
- package/lib/input/TextArea.js +3 -2
- package/lib/input-number/index.d.ts +2 -1
- package/lib/input-number/index.js +2 -1
- package/lib/list/index.js +3 -2
- package/lib/locale/ja-JP.d.ts +3 -0
- package/lib/locale/ja-JP.js +60 -0
- package/lib/lottie/index.js +2 -1
- package/lib/modal/Modal.js +7 -3
- package/lib/modal/Progress.js +9 -5
- package/lib/radio/index.js +2 -1
- package/lib/result/403.js +156 -121
- package/lib/result/404.js +328 -267
- package/lib/result/500.js +295 -257
- package/lib/result/Error.js +127 -99
- package/lib/result/Processing.js +246 -213
- package/lib/result/Success.js +233 -169
- package/lib/result/Warning.js +611 -515
- package/lib/result/index.js +10 -9
- package/lib/segmented/index.js +8 -4
- package/lib/select/index.js +2 -1
- package/lib/slider/index.js +2 -1
- package/lib/space/index.js +2 -1
- package/lib/spin/index.js +5 -4
- package/lib/switch/index.js +2 -1
- package/lib/table/index.d.ts +2 -2
- package/lib/table/index.js +44 -31
- package/lib/table/style/index.js +2 -4
- package/lib/tabs/index.d.ts +8 -6
- package/lib/tabs/index.js +73 -62
- package/lib/tabs/style/index.js +6 -4
- package/lib/tag/index.js +9 -5
- package/lib/tooltip/MouseTooltip.js +43 -39
- package/lib/tooltip/ReactStickyMouseTooltip.js +5 -4
- package/lib/tooltip/index.js +14 -10
- package/lib/tree-select/index.js +2 -1
- package/lib/typography/Link.js +5 -4
- package/lib/typography/Paragraph.js +5 -4
- package/lib/typography/Text.js +5 -4
- package/lib/typography/Title.js +5 -4
- package/lib/typography/style/index.js +2 -9
- package/package.json +8 -8
package/lib/result/index.js
CHANGED
|
@@ -33,7 +33,7 @@ __export(result_exports, {
|
|
|
33
33
|
default: () => result_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(result_exports);
|
|
36
|
-
var import_react =
|
|
36
|
+
var import_react = require("react");
|
|
37
37
|
var import_antd = require("antd");
|
|
38
38
|
var import_classnames = __toESM(require("classnames"));
|
|
39
39
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
@@ -46,22 +46,23 @@ var import__2 = __toESM(require("./404"));
|
|
|
46
46
|
var import__3 = __toESM(require("./500"));
|
|
47
47
|
var import_style = __toESM(require("./style"));
|
|
48
48
|
__reExport(result_exports, require("antd/es/result"), module.exports);
|
|
49
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
49
50
|
var Result = ({ status, prefixCls: customizePrefixCls, ...restProps }) => {
|
|
50
51
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
51
52
|
const prefixCls = getPrefixCls("result", customizePrefixCls);
|
|
52
53
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
53
54
|
const resultCls = (0, import_classnames.default)(prefixCls);
|
|
54
55
|
const statusMap = {
|
|
55
|
-
success: /* @__PURE__ */
|
|
56
|
-
error: /* @__PURE__ */
|
|
57
|
-
warning: /* @__PURE__ */
|
|
58
|
-
processing: /* @__PURE__ */
|
|
59
|
-
403: /* @__PURE__ */
|
|
60
|
-
404: /* @__PURE__ */
|
|
61
|
-
500: /* @__PURE__ */
|
|
56
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Success.default, {}),
|
|
57
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Error.default, {}),
|
|
58
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Warning.default, {}),
|
|
59
|
+
processing: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Processing.default, {}),
|
|
60
|
+
403: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, {}),
|
|
61
|
+
404: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.default, {}),
|
|
62
|
+
500: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__3.default, {})
|
|
62
63
|
};
|
|
63
64
|
return wrapSSR(
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
65
66
|
import_antd.Result,
|
|
66
67
|
{
|
|
67
68
|
icon: statusMap[status],
|
package/lib/segmented/index.js
CHANGED
|
@@ -40,6 +40,7 @@ var import_typography = __toESM(require("../typography"));
|
|
|
40
40
|
var import_badge = __toESM(require("../badge"));
|
|
41
41
|
var import_style = __toESM(require("./style"));
|
|
42
42
|
__reExport(segmented_exports, require("antd/es/segmented"), module.exports);
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
44
|
var isReactNode = (item) => {
|
|
44
45
|
return import_react.default.isValidElement(item);
|
|
45
46
|
};
|
|
@@ -50,21 +51,24 @@ var Segmented = import_react.default.forwardRef(
|
|
|
50
51
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
51
52
|
const renderBadge = (0, import_react.useCallback)((badge) => {
|
|
52
53
|
if (typeof badge === "object" && !isReactNode(badge)) {
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.default, { ...badge });
|
|
54
55
|
}
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.default, { count: badge });
|
|
56
57
|
}, []);
|
|
57
58
|
const newOptions = options == null ? void 0 : options.map((item) => {
|
|
58
59
|
if (typeof item === "object") {
|
|
59
60
|
const { label, badge, ...restItem } = item;
|
|
60
61
|
return {
|
|
61
62
|
...restItem,
|
|
62
|
-
label: /* @__PURE__ */
|
|
63
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Flex, { gap: 4, align: "center", justify: "center", children: [
|
|
64
|
+
(item == null ? void 0 : item.ellipsis) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_typography.default.Text, { ellipsis: item.ellipsis, children: label }) : label,
|
|
65
|
+
badge && renderBadge(badge)
|
|
66
|
+
] })
|
|
63
67
|
};
|
|
64
68
|
}
|
|
65
69
|
return item;
|
|
66
70
|
});
|
|
67
|
-
return wrapSSR(/* @__PURE__ */
|
|
71
|
+
return wrapSSR(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Segmented, { ref, options: newOptions, ...restProps }));
|
|
68
72
|
}
|
|
69
73
|
);
|
|
70
74
|
if (process.env.NODE_ENV !== "production") {
|
package/lib/select/index.js
CHANGED
|
@@ -40,6 +40,7 @@ var import_config_provider = __toESM(require("../config-provider"));
|
|
|
40
40
|
var import_en_US = __toESM(require("../locale/en-US"));
|
|
41
41
|
var import_style = __toESM(require("./style"));
|
|
42
42
|
__reExport(select_exports, require("antd/es/select"), module.exports);
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
44
|
var InternalSelect = import_react.default.forwardRef(
|
|
44
45
|
({ locale: customLocale, prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
|
|
45
46
|
const { locale: contextLocale, getPrefixCls } = (0, import_react.useContext)(
|
|
@@ -56,7 +57,7 @@ var InternalSelect = import_react.default.forwardRef(
|
|
|
56
57
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
57
58
|
const selectCls = (0, import_classnames.default)(className);
|
|
58
59
|
return wrapSSR(
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
61
|
import_antd.Select,
|
|
61
62
|
{
|
|
62
63
|
ref,
|
package/lib/slider/index.js
CHANGED
|
@@ -39,6 +39,7 @@ var import_react = __toESM(require("react"));
|
|
|
39
39
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
40
40
|
var import_style = __toESM(require("./style"));
|
|
41
41
|
__reExport(slider_exports, require("antd/es/slider"), module.exports);
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
43
|
var Slider = import_react.default.forwardRef(
|
|
43
44
|
({ prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
|
|
44
45
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
@@ -46,7 +47,7 @@ var Slider = import_react.default.forwardRef(
|
|
|
46
47
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
47
48
|
const sliderCls = (0, import_classnames.default)(className);
|
|
48
49
|
return wrapSSR(
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Slider, { ref, prefixCls: customizePrefixCls, className: sliderCls, ...restProps })
|
|
50
51
|
);
|
|
51
52
|
}
|
|
52
53
|
);
|
package/lib/space/index.js
CHANGED
|
@@ -43,6 +43,7 @@ var import_antd = require("antd");
|
|
|
43
43
|
var import_style = __toESM(require("./style"));
|
|
44
44
|
__reExport(space_exports, require("antd/es/space"), module.exports);
|
|
45
45
|
var import_context = require("antd/es/space/context");
|
|
46
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
46
47
|
var Space = React.forwardRef(
|
|
47
48
|
({ prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
|
|
48
49
|
const { getPrefixCls } = React.useContext(import_config_provider.ConfigContext);
|
|
@@ -56,7 +57,7 @@ var Space = React.forwardRef(
|
|
|
56
57
|
},
|
|
57
58
|
className
|
|
58
59
|
);
|
|
59
|
-
return wrapSSR(/* @__PURE__ */
|
|
60
|
+
return wrapSSR(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Space, { ref, className: spaceCls, ...restProps }));
|
|
60
61
|
}
|
|
61
62
|
);
|
|
62
63
|
if (process.env.NODE_ENV !== "production") {
|
package/lib/spin/index.js
CHANGED
|
@@ -35,13 +35,14 @@ __export(spin_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(spin_exports);
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
|
-
var import_react =
|
|
38
|
+
var import_react = require("react");
|
|
39
39
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
40
40
|
var import_lottie = __toESM(require("../lottie"));
|
|
41
41
|
var import_spin = __toESM(require("./assets/spin.json"));
|
|
42
42
|
var import_spin_gray = __toESM(require("./assets/spin-gray.json"));
|
|
43
43
|
var import_style = __toESM(require("./style"));
|
|
44
44
|
__reExport(spin_exports, require("antd/es/spin"), module.exports);
|
|
45
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
46
|
var Spin = ({
|
|
46
47
|
prefixCls: customizePrefixCls,
|
|
47
48
|
className,
|
|
@@ -50,7 +51,7 @@ var Spin = ({
|
|
|
50
51
|
...restProps
|
|
51
52
|
}) => {
|
|
52
53
|
const { getPrefixCls, spin } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
53
|
-
const indicator = customizeIndicator || (spin == null ? void 0 : spin.indicator) || (gray ? /* @__PURE__ */
|
|
54
|
+
const indicator = customizeIndicator || (spin == null ? void 0 : spin.indicator) || (gray ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lottie.default, { animationData: import_spin_gray.default }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lottie.default, { animationData: import_spin.default }));
|
|
54
55
|
const isDefaultIndicator = !(customizeIndicator || (spin == null ? void 0 : spin.indicator));
|
|
55
56
|
const isGrayIndicator = isDefaultIndicator && gray;
|
|
56
57
|
const prefixCls = getPrefixCls("spin", customizePrefixCls);
|
|
@@ -63,7 +64,7 @@ var Spin = ({
|
|
|
63
64
|
className
|
|
64
65
|
);
|
|
65
66
|
return wrapSSR(
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
68
|
import_antd.Spin,
|
|
68
69
|
{
|
|
69
70
|
prefixCls: customizePrefixCls,
|
|
@@ -75,7 +76,7 @@ var Spin = ({
|
|
|
75
76
|
);
|
|
76
77
|
};
|
|
77
78
|
Spin.setDefaultIndicator = import_antd.Spin.setDefaultIndicator;
|
|
78
|
-
Spin.setDefaultIndicator(/* @__PURE__ */
|
|
79
|
+
Spin.setDefaultIndicator(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spin, {}));
|
|
79
80
|
if (process.env.NODE_ENV !== "production") {
|
|
80
81
|
Spin.displayName = import_antd.Spin.displayName;
|
|
81
82
|
}
|
package/lib/switch/index.js
CHANGED
|
@@ -39,6 +39,7 @@ var import_react = __toESM(require("react"));
|
|
|
39
39
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
40
40
|
var import_style = __toESM(require("./style"));
|
|
41
41
|
__reExport(switch_exports, require("antd/es/switch"), module.exports);
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
43
|
var InternalSwitch = import_react.default.forwardRef(
|
|
43
44
|
({ prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
|
|
44
45
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
@@ -46,7 +47,7 @@ var InternalSwitch = import_react.default.forwardRef(
|
|
|
46
47
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
47
48
|
const switchCls = (0, import_classnames.default)(className);
|
|
48
49
|
return wrapSSR(
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Switch, { ref, prefixCls: customizePrefixCls, className: switchCls, ...restProps })
|
|
50
51
|
);
|
|
51
52
|
}
|
|
52
53
|
);
|
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_1 extends import("antd/es/_util/type").AnyObject>(_: import("antd").TableColumnProps<RecordType_1>) => null;
|
|
42
|
+
ColumnGroup: <RecordType_2 extends import("antd/es/_util/type").AnyObject>(_: import("antd/es/table/ColumnGroup").ColumnGroupProps<RecordType_2>) => null;
|
|
43
43
|
Summary: typeof Summary;
|
|
44
44
|
useStyle: (prefixCls: string) => {
|
|
45
45
|
wrapSSR: (node: ReactNode) => ReactElement<any, string | React.JSXElementConstructor<any>>;
|
package/lib/table/index.js
CHANGED
|
@@ -45,6 +45,7 @@ var import_useDefaultPagination = __toESM(require("./hooks/useDefaultPagination"
|
|
|
45
45
|
var import_useMergedState = __toESM(require("rc-util/lib/hooks/useMergedState"));
|
|
46
46
|
var import_en_US = __toESM(require("../locale/en-US"));
|
|
47
47
|
__reExport(table_exports, require("antd/es/table"), module.exports);
|
|
48
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
48
49
|
function Table(props, ref) {
|
|
49
50
|
var _a, _b;
|
|
50
51
|
const {
|
|
@@ -73,7 +74,7 @@ function Table(props, ref) {
|
|
|
73
74
|
const { getPrefixCls, locale, table } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
74
75
|
const {
|
|
75
76
|
batchOperationBar,
|
|
76
|
-
emptyText = /* @__PURE__ */
|
|
77
|
+
emptyText = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_empty.default, { image: import_empty.default.PRESENTED_IMAGE_SIMPLE }),
|
|
77
78
|
...restLocale
|
|
78
79
|
} = {
|
|
79
80
|
...customLocale,
|
|
@@ -112,7 +113,7 @@ function Table(props, ref) {
|
|
|
112
113
|
render: (text, record, index) => {
|
|
113
114
|
const element = item.render ? item.render(text, record, index) : record[item.dataIndex];
|
|
114
115
|
const elementType = element == null ? void 0 : element.type;
|
|
115
|
-
return (elementType == null ? void 0 : elementType.__ANT_TOOLTIP) === true ? element : /* @__PURE__ */
|
|
116
|
+
return (elementType == null ? void 0 : elementType.__ANT_TOOLTIP) === true ? element : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
116
117
|
import_typography.default.Text,
|
|
117
118
|
{
|
|
118
119
|
ellipsis: {
|
|
@@ -120,9 +121,9 @@ function Table(props, ref) {
|
|
|
120
121
|
placement: "topLeft",
|
|
121
122
|
title: element
|
|
122
123
|
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
},
|
|
125
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: element })
|
|
126
|
+
}
|
|
126
127
|
);
|
|
127
128
|
}
|
|
128
129
|
};
|
|
@@ -148,35 +149,47 @@ function Table(props, ref) {
|
|
|
148
149
|
if ((0, import_lodash.isEmpty)(rowSelection) || (0, import_lodash.isEmpty)(currentSelectedRowKeys)) {
|
|
149
150
|
return (
|
|
150
151
|
// @ts-ignore
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: pagination && (pagination == null ? void 0 : pagination.showTotal) && (pagination == null ? void 0 : pagination.showTotal(total, range)) })
|
|
152
153
|
);
|
|
153
154
|
}
|
|
154
|
-
return /* @__PURE__ */
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
156
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-batch-operation-bar`, children: [
|
|
157
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
158
|
+
import_antd.Space,
|
|
159
|
+
{
|
|
160
|
+
size: 8,
|
|
161
|
+
style: {
|
|
162
|
+
marginRight: 24
|
|
163
|
+
},
|
|
164
|
+
children: [
|
|
165
|
+
toolAlertRender && toolAlertRender(currentSelectedRowKeys, currentSelectedRows),
|
|
166
|
+
!toolAlertRender && toolAlertRender !== false && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `${prefixCls}-batch-operation-selection`, children: [
|
|
167
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: batchOperationBar == null ? void 0 : batchOperationBar.selected }),
|
|
168
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-batch-operation-selection-count`, children: (currentSelectedRowKeys == null ? void 0 : currentSelectedRowKeys.length) || 0 }),
|
|
169
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: batchOperationBar == null ? void 0 : batchOperationBar.object })
|
|
170
|
+
] }),
|
|
171
|
+
!hiddenCancelBtn && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { onClick: handleOptionsCancel, children: cancelText ?? (batchOperationBar == null ? void 0 : batchOperationBar.cancel) }),
|
|
172
|
+
toolSelectedContent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
173
|
+
import_antd.Popover,
|
|
174
|
+
{
|
|
175
|
+
placement: "top",
|
|
176
|
+
overlayClassName: `${prefixCls}-batch-operation-selection-popover`,
|
|
177
|
+
content: toolSelectedContent == null ? void 0 : toolSelectedContent(currentSelectedRowKeys, currentSelectedRows),
|
|
178
|
+
trigger: "click",
|
|
179
|
+
open: openPopover,
|
|
180
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { onClick: () => setOpenPopover(!openPopover), children: openPopover ? collapseText ?? (batchOperationBar == null ? void 0 : batchOperationBar.collapse) : openText ?? (batchOperationBar == null ? void 0 : batchOperationBar.open) })
|
|
181
|
+
}
|
|
182
|
+
)
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
),
|
|
186
|
+
toolOptionsRender && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Space, { size: 8, children: toolOptionsRender == null ? void 0 : toolOptionsRender(currentSelectedRowKeys, currentSelectedRows) })
|
|
187
|
+
] }),
|
|
188
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: pagination && (pagination == null ? void 0 : pagination.showTotal) && (pagination == null ? void 0 : pagination.showTotal(total, range)) })
|
|
189
|
+
] });
|
|
177
190
|
};
|
|
178
191
|
return wrapSSR(
|
|
179
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
180
193
|
import_antd.Table,
|
|
181
194
|
{
|
|
182
195
|
...props,
|
|
@@ -185,7 +198,7 @@ function Table(props, ref) {
|
|
|
185
198
|
className: tableCls,
|
|
186
199
|
locale: {
|
|
187
200
|
...restLocale,
|
|
188
|
-
emptyText: /* @__PURE__ */
|
|
201
|
+
emptyText: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-empty-wrapper`, children: typeof emptyText === "function" ? emptyText() : emptyText })
|
|
189
202
|
},
|
|
190
203
|
size,
|
|
191
204
|
bordered: bordered || innerBordered,
|
package/lib/table/style/index.js
CHANGED
|
@@ -106,9 +106,7 @@ var genTableStyle = (token) => {
|
|
|
106
106
|
transition: `background ${token.motionDurationMid}`
|
|
107
107
|
},
|
|
108
108
|
// empty style
|
|
109
|
-
[`${componentCls}-placeholder td`]: {
|
|
110
|
-
borderBottom: "none"
|
|
111
|
-
},
|
|
109
|
+
[`${componentCls}-placeholder td`]: {},
|
|
112
110
|
[`${componentCls}-empty-wrapper`]: {
|
|
113
111
|
minHeight: 360 - token.paddingSM * 2,
|
|
114
112
|
display: "flex",
|
|
@@ -178,7 +176,7 @@ var genTableStyle = (token) => {
|
|
|
178
176
|
borderRadius: `0px 0px ${token.borderRadiusLG}px ${token.borderRadiusLG}px`
|
|
179
177
|
}
|
|
180
178
|
},
|
|
181
|
-
//
|
|
179
|
+
// 带内部边框的表格样式
|
|
182
180
|
[`${componentCls}-wrapper${componentCls}-inner-bordered ${componentCls}-bordered`]: {
|
|
183
181
|
[`${componentCls}-container`]: {
|
|
184
182
|
borderInlineStart: "none",
|
package/lib/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/lib/tabs/index.js
CHANGED
|
@@ -33,9 +33,9 @@ __export(tabs_exports, {
|
|
|
33
33
|
default: () => tabs_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(tabs_exports);
|
|
36
|
-
var import_util = require("@oceanbase/util");
|
|
37
|
-
var import_antd = require("antd");
|
|
38
36
|
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import_util = require("@oceanbase/util");
|
|
39
39
|
var import_classnames = __toESM(require("classnames"));
|
|
40
40
|
var import_badge = __toESM(require("../badge"));
|
|
41
41
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
@@ -43,70 +43,81 @@ var import_useLegacyItems = __toESM(require("./hooks/useLegacyItems"));
|
|
|
43
43
|
var import_style = __toESM(require("./style"));
|
|
44
44
|
var import_TabPane = __toESM(require("./TabPane"));
|
|
45
45
|
__reExport(tabs_exports, require("antd/es/tabs"), module.exports);
|
|
46
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
46
47
|
var isReactNode = (item) => {
|
|
47
48
|
return import_react.default.isValidElement(item);
|
|
48
49
|
};
|
|
49
|
-
var Tabs = (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
50
|
+
var Tabs = import_react.default.forwardRef(
|
|
51
|
+
({
|
|
52
|
+
children,
|
|
53
|
+
divider = false,
|
|
54
|
+
items,
|
|
55
|
+
type,
|
|
56
|
+
tabPosition,
|
|
57
|
+
prefixCls: customizePrefixCls,
|
|
58
|
+
className,
|
|
59
|
+
...restProps
|
|
60
|
+
}, ref) => {
|
|
61
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
62
|
+
const prefixCls = getPrefixCls("tabs", customizePrefixCls);
|
|
63
|
+
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
64
|
+
const tabsCls = (0, import_classnames.default)(className, {
|
|
65
|
+
[`${prefixCls}-no-divider`]: !divider
|
|
66
|
+
});
|
|
67
|
+
const isHorizontal = !tabPosition || tabPosition === "top" || tabPosition === "bottom";
|
|
68
|
+
const dividerList = (items == null ? void 0 : items.filter((item) => item.divider)) || [];
|
|
69
|
+
const renderBadge = (0, import_react.useCallback)(
|
|
70
|
+
(badge) => {
|
|
71
|
+
if (typeof badge === "object" && !isReactNode(badge)) {
|
|
72
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.default, { ...badge, className: (0, import_classnames.default)(`${prefixCls}-tab-badge`, badge.className) });
|
|
73
|
+
}
|
|
74
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.default, { className: `${prefixCls}-tab-badge`, count: badge });
|
|
75
|
+
},
|
|
76
|
+
[prefixCls]
|
|
77
|
+
);
|
|
78
|
+
let newItems = (0, import_useLegacyItems.default)(items, children);
|
|
79
|
+
newItems = newItems == null ? void 0 : newItems.map((item) => {
|
|
80
|
+
if (!(0, import_util.isNullValue)(item.divider)) {
|
|
81
|
+
return {
|
|
82
|
+
...item,
|
|
83
|
+
key: `divider-${dividerList == null ? void 0 : dividerList.indexOf(item)}`,
|
|
84
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
|
+
import_antd.Divider,
|
|
86
|
+
{
|
|
87
|
+
type: isHorizontal ? "vertical" : "horizontal",
|
|
88
|
+
className: `${prefixCls}-divider`
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
disabled: true
|
|
92
|
+
};
|
|
93
|
+
} else if (!(0, import_util.isNullValue)(item.tag) || !(0, import_util.isNullValue)(item.badge)) {
|
|
94
|
+
return {
|
|
95
|
+
...item,
|
|
96
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: 4, children: [
|
|
97
|
+
item.label,
|
|
98
|
+
item.badge && renderBadge(item.badge),
|
|
99
|
+
!(0, import_util.isNullValue)(item.tag) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Tag, { bordered: false, className: `${prefixCls}-tab-tag`, children: item.tag })
|
|
100
|
+
] })
|
|
101
|
+
};
|
|
68
102
|
}
|
|
69
|
-
return
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
};
|
|
88
|
-
} else if (!(0, import_util.isNullValue)(item.tag) || !(0, import_util.isNullValue)(item.badge)) {
|
|
89
|
-
return {
|
|
90
|
-
...item,
|
|
91
|
-
label: /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 4 }, item.label, item.badge && renderBadge(item.badge), !(0, import_util.isNullValue)(item.tag) && /* @__PURE__ */ import_react.default.createElement(import_antd.Tag, { bordered: false, className: `${prefixCls}-tab-tag` }, item.tag))
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
return item;
|
|
95
|
-
});
|
|
96
|
-
return wrapSSR(
|
|
97
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
98
|
-
import_antd.Tabs,
|
|
99
|
-
{
|
|
100
|
-
items: newItems,
|
|
101
|
-
type,
|
|
102
|
-
tabPosition,
|
|
103
|
-
prefixCls: customizePrefixCls,
|
|
104
|
-
className: tabsCls,
|
|
105
|
-
...restProps
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
);
|
|
109
|
-
};
|
|
103
|
+
return item;
|
|
104
|
+
});
|
|
105
|
+
return wrapSSR(
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
107
|
+
import_antd.Tabs,
|
|
108
|
+
{
|
|
109
|
+
ref,
|
|
110
|
+
items: newItems,
|
|
111
|
+
type,
|
|
112
|
+
tabPosition,
|
|
113
|
+
prefixCls: customizePrefixCls,
|
|
114
|
+
className: tabsCls,
|
|
115
|
+
...restProps
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
);
|
|
110
121
|
Tabs.TabPane = import_TabPane.default;
|
|
111
122
|
Tabs.genTabsStyle = import_style.genTabsStyle;
|
|
112
123
|
if (process.env.NODE_ENV !== "production") {
|
package/lib/tabs/style/index.js
CHANGED
|
@@ -28,10 +28,12 @@ var genTabsStyle = (token) => {
|
|
|
28
28
|
const { antCls, componentCls, colorInfo, colorInfoBg, colorTextSecondary, colorFillQuaternary } = token;
|
|
29
29
|
return {
|
|
30
30
|
[componentCls]: {
|
|
31
|
-
[`&${componentCls}-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
[`&${componentCls}-no-divider`]: {
|
|
32
|
+
// divider prop work for top and bottom tabs
|
|
33
|
+
[`&${componentCls}-top, &${componentCls}-bottom`]: {
|
|
34
|
+
[`${componentCls}-nav::before`]: {
|
|
35
|
+
border: "none"
|
|
36
|
+
}
|
|
35
37
|
}
|
|
36
38
|
},
|
|
37
39
|
[`${componentCls}-tab`]: {
|
package/lib/tag/index.js
CHANGED
|
@@ -41,6 +41,7 @@ var import_typography = __toESM(require("../typography"));
|
|
|
41
41
|
var import_style = __toESM(require("./style"));
|
|
42
42
|
var import_getEllipsisConfig = require("../_util/getEllipsisConfig");
|
|
43
43
|
__reExport(tag_exports, require("antd/es/tag"), module.exports);
|
|
44
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
45
|
var Tag = import_react.default.forwardRef(
|
|
45
46
|
({
|
|
46
47
|
children,
|
|
@@ -64,18 +65,21 @@ var Tag = import_react.default.forwardRef(
|
|
|
64
65
|
},
|
|
65
66
|
className
|
|
66
67
|
);
|
|
67
|
-
const realIcon = icon ? /* @__PURE__ */
|
|
68
|
+
const realIcon = icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-icon`, children: icon }) : null;
|
|
68
69
|
return wrapSSR(
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
71
|
import_antd.Tag,
|
|
71
72
|
{
|
|
72
73
|
ref,
|
|
73
74
|
prefixCls: customizePrefixCls,
|
|
74
75
|
className: tagCls,
|
|
75
76
|
icon: ellipsisConfig ? null : icon,
|
|
76
|
-
...restProps
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
...restProps,
|
|
78
|
+
children: ellipsisConfig ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_typography.default.Text, { ellipsis: ellipsisConfig, children: [
|
|
79
|
+
realIcon,
|
|
80
|
+
children
|
|
81
|
+
] }) : children
|
|
82
|
+
}
|
|
79
83
|
)
|
|
80
84
|
);
|
|
81
85
|
}
|