@oceanbase/design 0.4.17 → 0.4.19
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/button/index.d.ts +1 -1
- package/es/descriptions/hooks/useItems.d.ts +6 -6
- package/es/form/FormItem.d.ts +1 -1
- 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/segmented/index.d.ts +1 -0
- package/es/segmented/index.js +15 -7
- package/es/segmented/style/index.js +1 -0
- package/es/typography/style/index.js +3 -0
- package/lib/alert/index.js +7 -6
- package/lib/badge/index.js +21 -18
- package/lib/button/index.d.ts +1 -1
- package/lib/button/index.js +2 -1
- package/lib/card/index.js +9 -5
- 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.d.ts +6 -6
- 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 -1
- package/lib/form/FormItem.js +9 -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.d.ts +1 -0
- package/lib/segmented/index.js +16 -5
- package/lib/segmented/style/index.js +1 -0
- 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.js +44 -31
- package/lib/tabs/index.js +10 -5
- 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 +3 -0
- package/package.json +6 -6
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.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { SegmentedRawOption } from 'rc-segmented';
|
|
|
6
6
|
export * from 'antd/es/segmented';
|
|
7
7
|
type BadgeType = BadgeProps | BadgeProps['count'];
|
|
8
8
|
export type SegmentedLabeledOption = AntSegmentedLabeledOption & {
|
|
9
|
+
icon?: React.ReactNode;
|
|
9
10
|
ellipsis?: EllipsisConfig;
|
|
10
11
|
badge?: BadgeType;
|
|
11
12
|
};
|
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,31 @@ 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
|
-
const {
|
|
60
|
+
const {
|
|
61
|
+
label,
|
|
62
|
+
icon,
|
|
63
|
+
badge,
|
|
64
|
+
ellipsis = { tooltip: true },
|
|
65
|
+
...restItem
|
|
66
|
+
} = item;
|
|
60
67
|
return {
|
|
61
68
|
...restItem,
|
|
62
|
-
label: /* @__PURE__ */
|
|
69
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Flex, { align: "center", justify: "center", children: [
|
|
70
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-item-icon`, children: icon }),
|
|
71
|
+
ellipsis ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_typography.default.Text, { ellipsis, children: label }) : label,
|
|
72
|
+
badge && renderBadge(badge)
|
|
73
|
+
] })
|
|
63
74
|
};
|
|
64
75
|
}
|
|
65
76
|
return item;
|
|
66
77
|
});
|
|
67
|
-
return wrapSSR(/* @__PURE__ */
|
|
78
|
+
return wrapSSR(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Segmented, { ref, options: newOptions, ...restProps }));
|
|
68
79
|
}
|
|
69
80
|
);
|
|
70
81
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -45,6 +45,7 @@ var genSegmentedStyle = (token) => {
|
|
|
45
45
|
[`>${componentCls}-item`]: {
|
|
46
46
|
[`>${componentCls}-item-label`]: {
|
|
47
47
|
[`${antCls}-badge >${antCls}-badge-count`]: {
|
|
48
|
+
marginInlineStart: 4,
|
|
48
49
|
backgroundColor: colorFillSecondary,
|
|
49
50
|
color: "inherit",
|
|
50
51
|
boxShadow: "none"
|
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.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/tabs/index.js
CHANGED
|
@@ -43,6 +43,7 @@ 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
|
};
|
|
@@ -68,9 +69,9 @@ var Tabs = import_react.default.forwardRef(
|
|
|
68
69
|
const renderBadge = (0, import_react.useCallback)(
|
|
69
70
|
(badge) => {
|
|
70
71
|
if (typeof badge === "object" && !isReactNode(badge)) {
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.default, { ...badge, className: (0, import_classnames.default)(`${prefixCls}-tab-badge`, badge.className) });
|
|
72
73
|
}
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.default, { className: `${prefixCls}-tab-badge`, count: badge });
|
|
74
75
|
},
|
|
75
76
|
[prefixCls]
|
|
76
77
|
);
|
|
@@ -80,7 +81,7 @@ var Tabs = import_react.default.forwardRef(
|
|
|
80
81
|
return {
|
|
81
82
|
...item,
|
|
82
83
|
key: `divider-${dividerList == null ? void 0 : dividerList.indexOf(item)}`,
|
|
83
|
-
label: /* @__PURE__ */
|
|
84
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
84
85
|
import_antd.Divider,
|
|
85
86
|
{
|
|
86
87
|
type: isHorizontal ? "vertical" : "horizontal",
|
|
@@ -92,13 +93,17 @@ var Tabs = import_react.default.forwardRef(
|
|
|
92
93
|
} else if (!(0, import_util.isNullValue)(item.tag) || !(0, import_util.isNullValue)(item.badge)) {
|
|
93
94
|
return {
|
|
94
95
|
...item,
|
|
95
|
-
label: /* @__PURE__ */
|
|
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
|
+
] })
|
|
96
101
|
};
|
|
97
102
|
}
|
|
98
103
|
return item;
|
|
99
104
|
});
|
|
100
105
|
return wrapSSR(
|
|
101
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
102
107
|
import_antd.Tabs,
|
|
103
108
|
{
|
|
104
109
|
ref,
|
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
|
}
|
|
@@ -33,9 +33,10 @@ __export(MouseTooltip_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(MouseTooltip_exports);
|
|
35
35
|
var import_ahooks = require("ahooks");
|
|
36
|
-
var import_react =
|
|
36
|
+
var import_react = require("react");
|
|
37
37
|
var import_ReactStickyMouseTooltip = __toESM(require("./ReactStickyMouseTooltip"));
|
|
38
38
|
var import_theme = __toESM(require("../theme"));
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
40
|
var MouseTooltip = ({
|
|
40
41
|
children,
|
|
41
42
|
title,
|
|
@@ -70,47 +71,50 @@ var MouseTooltip = ({
|
|
|
70
71
|
const isOverWidth = clientX + tooltipWidth + 8 > pageWidth;
|
|
71
72
|
const isOverHeight = clientY + tooltipHeight + 8 > pageHeight;
|
|
72
73
|
const offset = 8;
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
75
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
76
|
+
"span",
|
|
77
|
+
{
|
|
78
|
+
onMouseEnter: () => {
|
|
79
|
+
if (outerOpen || outerVisible) {
|
|
80
|
+
setTimeout(() => {
|
|
81
|
+
handleVisibleChange(true);
|
|
82
|
+
}, mouseEnterDelay * 1e3);
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
onMouseLeave: () => {
|
|
78
86
|
setTimeout(() => {
|
|
79
|
-
handleVisibleChange(
|
|
80
|
-
},
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
onMouseLeave: () => {
|
|
84
|
-
setTimeout(() => {
|
|
85
|
-
handleVisibleChange(false);
|
|
86
|
-
}, mouseLeaveDelay * 1e3);
|
|
87
|
+
handleVisibleChange(false);
|
|
88
|
+
}, mouseLeaveDelay * 1e3);
|
|
89
|
+
},
|
|
90
|
+
children
|
|
87
91
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
borderRadius: token.borderRadius,
|
|
100
|
-
// @ts-ignore
|
|
101
|
-
color: textColor || ((_a = token.Tooltip) == null ? void 0 : _a.colorTextLightSolid) || token.colorTextLightSolid,
|
|
102
|
-
backgroundColor: (
|
|
92
|
+
),
|
|
93
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
94
|
+
import_ReactStickyMouseTooltip.default,
|
|
95
|
+
{
|
|
96
|
+
visible,
|
|
97
|
+
style: {
|
|
98
|
+
// 需要大于 Popover 的 1030 zIndex 值,否则会被遮挡
|
|
99
|
+
zIndex: 1100,
|
|
100
|
+
padding: "6px 8px",
|
|
101
|
+
boxShadow: token.boxShadowSecondary,
|
|
102
|
+
borderRadius: token.borderRadius,
|
|
103
103
|
// @ts-ignore
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
104
|
+
color: textColor || ((_a = token.Tooltip) == null ? void 0 : _a.colorTextLightSolid) || token.colorTextLightSolid,
|
|
105
|
+
backgroundColor: (
|
|
106
|
+
// @ts-ignore
|
|
107
|
+
backgroundColor || ((_b = token.Tooltip) == null ? void 0 : _b.colorBgSpotlight) || token.colorBgSpotlight
|
|
108
|
+
),
|
|
109
|
+
left: isOverWidth ? clientX - tooltipWidth - offset : clientX + offset,
|
|
110
|
+
top: isOverHeight ? clientY - tooltipHeight - offset : clientY + offset,
|
|
111
|
+
...restOverlayInnerStyle
|
|
112
|
+
},
|
|
113
|
+
...restProps,
|
|
114
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, children: typeof title === "function" ? title() : title })
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
] });
|
|
114
118
|
};
|
|
115
119
|
if (process.env.NODE_ENV !== "production") {
|
|
116
120
|
MouseTooltip.displayName = "MouseTooltip";
|
|
@@ -33,6 +33,7 @@ __export(ReactStickyMouseTooltip_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(ReactStickyMouseTooltip_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
37
|
var ReactStickyMouseTooltip = class extends import_react.default.PureComponent {
|
|
37
38
|
constructor() {
|
|
38
39
|
super(...arguments);
|
|
@@ -76,7 +77,7 @@ var ReactStickyMouseTooltip = class extends import_react.default.PureComponent {
|
|
|
76
77
|
this.removeListener();
|
|
77
78
|
}
|
|
78
79
|
render() {
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
80
81
|
"div",
|
|
81
82
|
{
|
|
82
83
|
className: this.props.className,
|
|
@@ -86,9 +87,9 @@ var ReactStickyMouseTooltip = class extends import_react.default.PureComponent {
|
|
|
86
87
|
top: this.state.yPosition + this.props.offsetY,
|
|
87
88
|
left: this.state.xPosition + this.props.offsetX,
|
|
88
89
|
...this.props.style
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
},
|
|
91
|
+
children: this.props.children
|
|
92
|
+
}
|
|
92
93
|
);
|
|
93
94
|
}
|
|
94
95
|
};
|
package/lib/tooltip/index.js
CHANGED
|
@@ -42,6 +42,7 @@ var import_config_provider = __toESM(require("../config-provider"));
|
|
|
42
42
|
var import_style = __toESM(require("./style"));
|
|
43
43
|
var import_useTooltipTypeList = require("./hooks/useTooltipTypeList");
|
|
44
44
|
__reExport(tooltip_exports, require("antd/es/tooltip"), module.exports);
|
|
45
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
46
|
var Tooltip = import_react.default.forwardRef(
|
|
46
47
|
({
|
|
47
48
|
children,
|
|
@@ -79,13 +80,16 @@ var Tooltip = import_react.default.forwardRef(
|
|
|
79
80
|
}
|
|
80
81
|
setInnerOpen(false);
|
|
81
82
|
};
|
|
82
|
-
const closeIconNode = closeIcon ? closeIcon === true ? /* @__PURE__ */
|
|
83
|
+
const closeIconNode = closeIcon ? closeIcon === true ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseOutlined, { className: `${prefixCls}-close-icon`, onClick: handleCloseClick }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-close-icon`, onClick: handleCloseClick, children: closeIcon }) : null;
|
|
83
84
|
const titleNode = typeof title === "function" ? title() : title;
|
|
84
|
-
const newTitle = closeIcon ? /* @__PURE__ */
|
|
85
|
+
const newTitle = closeIcon ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { className: `${prefixCls}-close-icon-wrap`, children: [
|
|
86
|
+
titleNode,
|
|
87
|
+
closeIconNode
|
|
88
|
+
] }) : titleNode;
|
|
85
89
|
const typeList = (0, import_useTooltipTypeList.useTooltipTypeList)();
|
|
86
90
|
const typeItem = typeList.find((item) => item.type === type);
|
|
87
91
|
return wrapSSR(
|
|
88
|
-
mouseFollow ? /* @__PURE__ */
|
|
92
|
+
mouseFollow ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
89
93
|
import_MouseTooltip.default,
|
|
90
94
|
{
|
|
91
95
|
title,
|
|
@@ -96,10 +100,10 @@ var Tooltip = import_react.default.forwardRef(
|
|
|
96
100
|
},
|
|
97
101
|
className: mouseTooltipCls,
|
|
98
102
|
overlay,
|
|
99
|
-
...restProps
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
) : /* @__PURE__ */
|
|
103
|
+
...restProps,
|
|
104
|
+
children
|
|
105
|
+
}
|
|
106
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
103
107
|
import_antd.Tooltip,
|
|
104
108
|
{
|
|
105
109
|
ref,
|
|
@@ -118,9 +122,9 @@ var Tooltip = import_react.default.forwardRef(
|
|
|
118
122
|
},
|
|
119
123
|
className: tooltipCls,
|
|
120
124
|
overlay,
|
|
121
|
-
...restProps
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
...restProps,
|
|
126
|
+
children
|
|
127
|
+
}
|
|
124
128
|
)
|
|
125
129
|
);
|
|
126
130
|
}
|
package/lib/tree-select/index.js
CHANGED
|
@@ -41,6 +41,7 @@ var import_config_provider = __toESM(require("../config-provider"));
|
|
|
41
41
|
var import_en_US = __toESM(require("../locale/en-US"));
|
|
42
42
|
var import_style = __toESM(require("./style"));
|
|
43
43
|
__reExport(tree_select_exports, require("antd/es/tree-select"), module.exports);
|
|
44
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
45
|
var InternalTreeSelect = import_react.default.forwardRef(
|
|
45
46
|
({ locale: customLocale, prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
|
|
46
47
|
const { locale: contextLocale, getPrefixCls } = (0, import_react.useContext)(
|
|
@@ -57,7 +58,7 @@ var InternalTreeSelect = import_react.default.forwardRef(
|
|
|
57
58
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
58
59
|
const treeSelectCls = (0, import_classnames.default)(className);
|
|
59
60
|
return wrapSSR(
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
61
62
|
import_antd.TreeSelect,
|
|
62
63
|
{
|
|
63
64
|
ref,
|