@oceanbase/design 0.4.8 → 0.4.10
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/_util/index.d.ts +1 -0
- package/es/_util/index.js +25 -0
- package/es/alert/index.d.ts +2 -2
- package/es/alert/index.js +13 -3
- package/es/card/index.js +5 -4
- package/es/card/style/index.js +9 -7
- package/es/config-provider/index.d.ts +1 -1
- package/es/config-provider/index.js +7 -6
- package/es/descriptions/hooks/useItems.d.ts +6 -6
- package/es/descriptions/hooks/useItems.js +9 -1
- package/es/descriptions/index.js +3 -2
- package/es/descriptions/style/index.d.ts +3 -0
- package/es/descriptions/style/index.js +30 -3
- package/es/dropdown/dropdown-button.d.ts +8 -0
- package/es/dropdown/dropdown-button.js +23 -0
- package/es/dropdown/index.d.ts +10 -0
- package/es/dropdown/index.js +17 -1
- package/es/empty/colored.js +7 -4
- package/es/empty/database.js +7 -4
- package/es/empty/guide.js +7 -4
- package/es/form/FormItem.d.ts +13 -8
- package/es/form/FormItem.js +34 -8
- package/es/form/index.js +22 -12
- package/es/form/style/index.d.ts +9 -0
- package/es/form/style/index.js +20 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +1 -0
- package/es/list/index.d.ts +1 -1
- package/es/modal/Progress.d.ts +1 -1
- package/es/result/404.js +14 -8
- package/es/result/500.js +7 -4
- package/es/result/Error.js +9 -5
- package/es/result/Processing.js +9 -5
- package/es/result/Success.js +39 -24
- package/es/result/Warning.js +9 -5
- package/es/table/index.d.ts +1 -0
- package/es/table/index.js +7 -2
- package/es/table/style/index.js +17 -6
- package/es/tooltip/ReactStickyMouseTooltip.d.ts +1 -1
- package/es/tree-select/index.d.ts +1 -1
- package/lib/_util/index.d.ts +1 -0
- package/lib/_util/index.js +49 -0
- package/lib/alert/index.d.ts +2 -2
- package/lib/alert/index.js +21 -2
- package/lib/card/index.js +3 -3
- package/lib/card/style/index.js +15 -16
- package/lib/config-provider/index.d.ts +1 -1
- package/lib/config-provider/index.js +6 -4
- package/lib/descriptions/hooks/useItems.d.ts +6 -6
- package/lib/descriptions/hooks/useItems.js +18 -2
- package/lib/descriptions/index.js +5 -2
- package/lib/descriptions/style/index.d.ts +3 -0
- package/lib/descriptions/style/index.js +47 -4
- package/lib/dropdown/dropdown-button.d.ts +8 -0
- package/lib/dropdown/dropdown-button.js +42 -0
- package/lib/dropdown/index.d.ts +10 -0
- package/lib/dropdown/index.js +27 -1
- package/lib/form/FormItem.d.ts +13 -8
- package/lib/form/FormItem.js +34 -12
- package/lib/form/index.js +15 -3
- package/lib/form/style/index.d.ts +9 -0
- package/lib/form/style/index.js +52 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +3 -0
- package/lib/list/index.d.ts +1 -1
- package/lib/modal/Progress.d.ts +1 -1
- package/lib/table/index.d.ts +3 -2
- package/lib/table/index.js +8 -2
- package/lib/table/style/index.js +26 -3
- package/lib/tooltip/ReactStickyMouseTooltip.d.ts +1 -1
- package/lib/tree-select/index.d.ts +1 -1
- package/package.json +8 -7
package/lib/dropdown/index.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
5
11
|
var __copyProps = (to, from, except, desc) => {
|
|
6
12
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
13
|
for (let key of __getOwnPropNames(from))
|
|
@@ -11,12 +17,32 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
11
17
|
return to;
|
|
12
18
|
};
|
|
13
19
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
14
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
29
|
|
|
16
|
-
// src/dropdown/index.
|
|
30
|
+
// src/dropdown/index.tsx
|
|
17
31
|
var dropdown_exports = {};
|
|
32
|
+
__export(dropdown_exports, {
|
|
33
|
+
default: () => dropdown_default
|
|
34
|
+
});
|
|
18
35
|
module.exports = __toCommonJS(dropdown_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import_dropdown_button = __toESM(require("./dropdown-button"));
|
|
19
39
|
__reExport(dropdown_exports, require("antd/es/dropdown"), module.exports);
|
|
40
|
+
var Dropdown = (props) => {
|
|
41
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Dropdown, { ...props });
|
|
42
|
+
};
|
|
43
|
+
Dropdown._InternalPanelDoNotUseOrYouWillBeFired = import_antd.Dropdown._InternalPanelDoNotUseOrYouWillBeFired;
|
|
44
|
+
Dropdown.Button = import_dropdown_button.default;
|
|
45
|
+
var dropdown_default = Dropdown;
|
|
20
46
|
// Annotate the CommonJS export names for ESM import in node:
|
|
21
47
|
0 && (module.exports = {
|
|
22
48
|
...require("antd/es/dropdown")
|
package/lib/form/FormItem.d.ts
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
import type { FormItemProps as AntFormItemProps } from 'antd/es/form';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
1
|
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { FormItemProps as AntFormItemProps } from 'antd/es/form';
|
|
4
4
|
import type { TooltipProps } from '../tooltip';
|
|
5
|
+
declare const AntFormItem: (<Values = any>(props: AntFormItemProps<Values>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
|
|
6
|
+
useStatus: () => {
|
|
7
|
+
status?: "" | "success" | "error" | "warning" | "validating";
|
|
8
|
+
errors: React.ReactNode[];
|
|
9
|
+
warnings: React.ReactNode[];
|
|
10
|
+
};
|
|
11
|
+
};
|
|
5
12
|
export type WrapperTooltipProps = Omit<TooltipProps, 'mouseFollow'> & {
|
|
6
13
|
icon?: React.ReactElement;
|
|
7
14
|
};
|
|
8
15
|
export type LabelTooltipType = WrapperTooltipProps | React.ReactNode;
|
|
9
16
|
export interface FormItemProps extends AntFormItemProps {
|
|
10
17
|
tooltip?: WrapperTooltipProps | ReactNode;
|
|
18
|
+
action?: ReactNode;
|
|
11
19
|
}
|
|
12
|
-
|
|
13
|
-
useStatus:
|
|
14
|
-
status?: "" | "success" | "error" | "warning" | "validating";
|
|
15
|
-
errors: ReactNode[];
|
|
16
|
-
warnings: ReactNode[];
|
|
17
|
-
};
|
|
20
|
+
type CompoundedComponent = React.FC<FormItemProps> & {
|
|
21
|
+
useStatus: typeof AntFormItem.useStatus;
|
|
18
22
|
};
|
|
23
|
+
declare const FormItem: CompoundedComponent;
|
|
19
24
|
export default FormItem;
|
package/lib/form/FormItem.js
CHANGED
|
@@ -32,13 +32,31 @@ __export(FormItem_exports, {
|
|
|
32
32
|
default: () => FormItem_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(FormItem_exports);
|
|
35
|
-
var import_antd = require("antd");
|
|
36
35
|
var import_react = __toESM(require("react"));
|
|
37
|
-
var
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_context = require("antd/es/form/context");
|
|
38
38
|
var import_lodash = require("lodash");
|
|
39
|
+
var import_classnames = __toESM(require("classnames"));
|
|
40
|
+
var import_config_provider = __toESM(require("../config-provider"));
|
|
41
|
+
var import_useTooltipTypeList = require("../tooltip/hooks/useTooltipTypeList");
|
|
42
|
+
var import_style = __toESM(require("./style"));
|
|
39
43
|
var AntFormItem = import_antd.Form.Item;
|
|
40
|
-
var
|
|
44
|
+
var FormItem = ({
|
|
45
|
+
children,
|
|
46
|
+
label,
|
|
47
|
+
tooltip,
|
|
48
|
+
action,
|
|
49
|
+
layout,
|
|
50
|
+
prefixCls: customizePrefixCls,
|
|
51
|
+
className,
|
|
52
|
+
...restProps
|
|
53
|
+
}) => {
|
|
41
54
|
var _a;
|
|
55
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
56
|
+
const prefixCls = getPrefixCls("form", customizePrefixCls);
|
|
57
|
+
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
58
|
+
const formItemCls = (0, import_classnames.default)(className);
|
|
59
|
+
const { vertical } = (0, import_react.useContext)(import_context.FormContext);
|
|
42
60
|
const typeList = (0, import_useTooltipTypeList.useTooltipTypeList)();
|
|
43
61
|
if (typeof tooltip === "object" && !import_react.default.isValidElement(tooltip)) {
|
|
44
62
|
const { icon, type, overlayInnerStyle, ...restTooltipProps } = tooltip;
|
|
@@ -52,16 +70,20 @@ var Item = ({ children, tooltip, ...restProps }) => {
|
|
|
52
70
|
...restTooltipProps
|
|
53
71
|
};
|
|
54
72
|
}
|
|
55
|
-
return
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
73
|
+
return wrapSSR(
|
|
74
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
75
|
+
AntFormItem,
|
|
76
|
+
{
|
|
77
|
+
label: action && (vertical || layout === "vertical") ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, label, action && /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-item-action` }, action)) : label,
|
|
78
|
+
tooltip,
|
|
79
|
+
required: (0, import_lodash.isPlainObject)(children) && ((_a = children.type) == null ? void 0 : _a.__ANT_SWITCH) ? true : void 0,
|
|
80
|
+
prefixCls: customizePrefixCls,
|
|
81
|
+
className: formItemCls,
|
|
82
|
+
...restProps
|
|
83
|
+
},
|
|
84
|
+
children
|
|
85
|
+
)
|
|
63
86
|
);
|
|
64
87
|
};
|
|
65
|
-
var FormItem = Item;
|
|
66
88
|
FormItem.useStatus = AntFormItem.useStatus;
|
|
67
89
|
var FormItem_default = FormItem;
|
package/lib/form/index.js
CHANGED
|
@@ -35,12 +35,22 @@ __export(form_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(form_exports);
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var import_antd = require("antd");
|
|
38
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
39
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
39
40
|
var import_FormItem = __toESM(require("./FormItem"));
|
|
41
|
+
var import_style = __toESM(require("./style"));
|
|
40
42
|
__reExport(form_exports, require("antd/es/form"), module.exports);
|
|
41
|
-
var Form = ({
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
var Form = ({
|
|
44
|
+
hideRequiredMark,
|
|
45
|
+
prefixCls: customizePrefixCls,
|
|
46
|
+
className,
|
|
47
|
+
...restProps
|
|
48
|
+
}) => {
|
|
49
|
+
const { getPrefixCls, form: contextForm } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
50
|
+
const prefixCls = getPrefixCls("form", customizePrefixCls);
|
|
51
|
+
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
52
|
+
const formCls = (0, import_classnames.default)(className);
|
|
53
|
+
return wrapSSR(
|
|
44
54
|
// @ts-ignore to ignore children type error
|
|
45
55
|
/* @__PURE__ */ import_react.default.createElement(
|
|
46
56
|
import_antd.Form,
|
|
@@ -51,6 +61,8 @@ var Form = ({ hideRequiredMark, ...restProps }) => {
|
|
|
51
61
|
),
|
|
52
62
|
hideRequiredMark,
|
|
53
63
|
preserve: false,
|
|
64
|
+
prefixCls: customizePrefixCls,
|
|
65
|
+
className: formCls,
|
|
54
66
|
...restProps
|
|
55
67
|
}
|
|
56
68
|
)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
3
|
+
export type FormToken = FullToken<'Form'>;
|
|
4
|
+
export declare const genFormStyle: GenerateStyle<FormToken>;
|
|
5
|
+
declare const _default: (prefixCls: string) => {
|
|
6
|
+
wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
7
|
+
hashId: string;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/form/style/index.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
default: () => style_default,
|
|
23
|
+
genFormStyle: () => genFormStyle
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
|
+
var genFormStyle = (token) => {
|
|
28
|
+
const { componentCls } = token;
|
|
29
|
+
return {
|
|
30
|
+
[`${componentCls}${componentCls}-vertical`]: {
|
|
31
|
+
[`${componentCls}-item:not(${componentCls}-item-horizontal)`]: {
|
|
32
|
+
[`${componentCls}-item-label > label`]: {
|
|
33
|
+
width: "100%",
|
|
34
|
+
[`${componentCls}-item-action`]: {
|
|
35
|
+
position: "absolute",
|
|
36
|
+
right: 0
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
var style_default = (prefixCls) => {
|
|
44
|
+
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Form", (token) => {
|
|
45
|
+
return [genFormStyle(token)];
|
|
46
|
+
});
|
|
47
|
+
return useStyle(prefixCls);
|
|
48
|
+
};
|
|
49
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
50
|
+
0 && (module.exports = {
|
|
51
|
+
genFormStyle
|
|
52
|
+
});
|
package/lib/index.d.ts
CHANGED
|
@@ -56,6 +56,8 @@ export { default as Segmented } from './segmented';
|
|
|
56
56
|
export type { SegmentedProps } from './segmented';
|
|
57
57
|
export { default as Breadcrumb } from './breadcrumb';
|
|
58
58
|
export type { BreadcrumbProps, BreadcrumbItemProps } from './breadcrumb';
|
|
59
|
+
export { default as Dropdown } from './dropdown';
|
|
60
|
+
export type { DropdownProps, DropdownButtonProps, DropdownButtonType } from './dropdown';
|
|
59
61
|
export { default as Result } from './result';
|
|
60
62
|
export type { ResultProps, ResultType, ResultStatusType } from './result';
|
|
61
63
|
export { default as Spin } from './spin';
|
package/lib/index.js
CHANGED
|
@@ -40,6 +40,7 @@ __export(src_exports, {
|
|
|
40
40
|
ConfigProvider: () => import_config_provider.default,
|
|
41
41
|
Descriptions: () => import_descriptions.default,
|
|
42
42
|
Drawer: () => import_drawer.default,
|
|
43
|
+
Dropdown: () => import_dropdown.default,
|
|
43
44
|
Empty: () => import_empty.default,
|
|
44
45
|
Form: () => import_form.default,
|
|
45
46
|
Input: () => import_input.default,
|
|
@@ -102,6 +103,7 @@ var import_slider = __toESM(require("./slider"));
|
|
|
102
103
|
var import_tooltip = __toESM(require("./tooltip"));
|
|
103
104
|
var import_segmented = __toESM(require("./segmented"));
|
|
104
105
|
var import_breadcrumb = __toESM(require("./breadcrumb"));
|
|
106
|
+
var import_dropdown = __toESM(require("./dropdown"));
|
|
105
107
|
var import_result = __toESM(require("./result"));
|
|
106
108
|
var import_spin = __toESM(require("./spin"));
|
|
107
109
|
var import_badge = __toESM(require("./badge"));
|
|
@@ -122,6 +124,7 @@ var { useToken } = import_theme2.default;
|
|
|
122
124
|
ConfigProvider,
|
|
123
125
|
Descriptions,
|
|
124
126
|
Drawer,
|
|
127
|
+
Dropdown,
|
|
125
128
|
Empty,
|
|
126
129
|
Form,
|
|
127
130
|
Input,
|
package/lib/list/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ListProps } from 'antd/es/list';
|
|
2
2
|
export * from 'antd/es/list';
|
|
3
3
|
export * from 'antd/es/list/Item';
|
|
4
|
-
declare function List<T>({ pagination, ...restProps }: ListProps<T>): import("@emotion/react/
|
|
4
|
+
declare function List<T>({ pagination, ...restProps }: ListProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare namespace List {
|
|
6
6
|
var Item: import("antd/es/list/Item").ListItemTypeProps;
|
|
7
7
|
var displayName: string;
|
package/lib/modal/Progress.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export interface ModalProgressProps extends ModalProps {
|
|
|
6
6
|
progress?: ProgressProps;
|
|
7
7
|
description?: React.ReactNode;
|
|
8
8
|
}
|
|
9
|
-
declare const Progress: ({ prefixCls: customizePrefixCls, className, width, maskClosable, loading, progress, description, footer, ...restProps }: ModalProgressProps) => import("@emotion/react/
|
|
9
|
+
declare const Progress: ({ prefixCls: customizePrefixCls, className, width, maskClosable, loading, progress, description, footer, ...restProps }: ModalProgressProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default Progress;
|
package/lib/table/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export interface TableLocale extends AntTableLocale {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
export interface TableProps<T> extends AntTableProps<T> {
|
|
20
|
+
innerBordered?: boolean;
|
|
20
21
|
columns?: ColumnsType<T>;
|
|
21
22
|
cancelText?: string;
|
|
22
23
|
collapseText?: string;
|
|
@@ -37,8 +38,8 @@ declare const _default: (<RecordType extends AnyObject = AnyObject>(props: Table
|
|
|
37
38
|
SELECTION_ALL: "SELECT_ALL";
|
|
38
39
|
SELECTION_INVERT: "SELECT_INVERT";
|
|
39
40
|
SELECTION_NONE: "SELECT_NONE";
|
|
40
|
-
Column: <
|
|
41
|
-
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;
|
|
42
43
|
Summary: typeof Summary;
|
|
43
44
|
useStyle: (prefixCls: string) => {
|
|
44
45
|
wrapSSR: (node: ReactNode) => ReactElement<any, string | React.JSXElementConstructor<any>>;
|
package/lib/table/index.js
CHANGED
|
@@ -49,6 +49,9 @@ function Table(props, ref) {
|
|
|
49
49
|
var _a, _b;
|
|
50
50
|
const {
|
|
51
51
|
locale: customLocale,
|
|
52
|
+
size,
|
|
53
|
+
bordered,
|
|
54
|
+
innerBordered,
|
|
52
55
|
columns,
|
|
53
56
|
footer,
|
|
54
57
|
pagination: customPagination,
|
|
@@ -86,7 +89,8 @@ function Table(props, ref) {
|
|
|
86
89
|
{
|
|
87
90
|
[`${prefixCls}-expandable`]: !(0, import_lodash.isEmpty)(expandable),
|
|
88
91
|
[`${prefixCls}-selectable`]: !!rowSelection,
|
|
89
|
-
[`${prefixCls}-has-footer`]: !!footer
|
|
92
|
+
[`${prefixCls}-has-footer`]: !!footer,
|
|
93
|
+
[`${prefixCls}-inner-bordered`]: innerBordered
|
|
90
94
|
},
|
|
91
95
|
className
|
|
92
96
|
);
|
|
@@ -183,6 +187,8 @@ function Table(props, ref) {
|
|
|
183
187
|
...restLocale,
|
|
184
188
|
emptyText: /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-empty-wrapper` }, typeof emptyText === "function" ? emptyText() : emptyText)
|
|
185
189
|
},
|
|
190
|
+
size,
|
|
191
|
+
bordered: bordered || innerBordered,
|
|
186
192
|
columns: newColumns,
|
|
187
193
|
rowClassName: (...args) => {
|
|
188
194
|
return (0, import_classnames.default)(
|
|
@@ -193,7 +199,7 @@ function Table(props, ref) {
|
|
|
193
199
|
);
|
|
194
200
|
},
|
|
195
201
|
expandable: expandable ? {
|
|
196
|
-
columnWidth: 32,
|
|
202
|
+
columnWidth: !size || size === "large" ? 40 : 32,
|
|
197
203
|
...expandable
|
|
198
204
|
} : void 0,
|
|
199
205
|
rowSelection: rowSelection ? {
|
package/lib/table/style/index.js
CHANGED
|
@@ -165,10 +165,27 @@ var genTableStyle = (token) => {
|
|
|
165
165
|
},
|
|
166
166
|
// 带边框的表格样式
|
|
167
167
|
[`${componentCls}-wrapper ${componentCls}${componentCls}-bordered`]: {
|
|
168
|
+
[`${componentCls}-thead > tr`]: {
|
|
169
|
+
["th"]: {
|
|
170
|
+
backgroundColor: colorFillQuaternary
|
|
171
|
+
}
|
|
172
|
+
},
|
|
168
173
|
[`${componentCls}-footer`]: {
|
|
169
174
|
borderRadius: `0px 0px ${token.borderRadiusLG}px ${token.borderRadiusLG}px`
|
|
170
175
|
}
|
|
171
176
|
},
|
|
177
|
+
// 带边框的表格样式
|
|
178
|
+
[`${componentCls}-wrapper${componentCls}-inner-bordered ${componentCls}-bordered`]: {
|
|
179
|
+
[`${componentCls}-container`]: {
|
|
180
|
+
borderInlineStart: "none",
|
|
181
|
+
borderTop: "none",
|
|
182
|
+
[`${componentCls}-thead > tr > th, ${componentCls}-tbody > tr > td`]: {
|
|
183
|
+
["&:last-child"]: {
|
|
184
|
+
borderInlineEnd: "none"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
172
189
|
// 不带边框的表格样式
|
|
173
190
|
[`${componentCls}-wrapper ${componentCls}:not(${componentCls}-bordered)`]: {
|
|
174
191
|
// 单元格通用样式
|
|
@@ -227,7 +244,7 @@ var genTableStyle = (token) => {
|
|
|
227
244
|
[`${componentCls}`]: {
|
|
228
245
|
[`${componentCls}-tbody`]: {
|
|
229
246
|
// 去掉斑马纹
|
|
230
|
-
[`tr:nth-child(
|
|
247
|
+
[`tr:nth-child(n):not(${componentCls}-placeholder):not(${componentCls}-row-selected):not(${componentCls}-expanded-row)`]: {
|
|
231
248
|
["& > td"]: {
|
|
232
249
|
backgroundColor: colorBgBase
|
|
233
250
|
},
|
|
@@ -239,8 +256,11 @@ var genTableStyle = (token) => {
|
|
|
239
256
|
},
|
|
240
257
|
[`${componentCls}-expanded-row > td`]: {
|
|
241
258
|
// 除内嵌子表格外,设置其他内嵌元素样式
|
|
242
|
-
[`& > *:not(${componentCls}-wrapper)`]: {
|
|
259
|
+
[`& > *:not(${componentCls}-wrapper):not(${componentCls}-expanded-row-fixed)`]: {
|
|
243
260
|
marginLeft: token.marginXL + token.lineWidth * 2
|
|
261
|
+
},
|
|
262
|
+
[`& > *${componentCls}-expanded-row-fixed`]: {
|
|
263
|
+
paddingLeft: token.marginXL + token.lineWidth * 2 + token.padding
|
|
244
264
|
}
|
|
245
265
|
},
|
|
246
266
|
// 嵌套子表格和父表格第一列对齐
|
|
@@ -264,8 +284,11 @@ var genTableStyle = (token) => {
|
|
|
264
284
|
[`${componentCls}-tbody`]: {
|
|
265
285
|
[`${componentCls}-expanded-row > td`]: {
|
|
266
286
|
// 除内嵌子表格外,设置其他内嵌元素样式
|
|
267
|
-
[`& > *:not(${componentCls}-wrapper)`]: {
|
|
287
|
+
[`& > *:not(${componentCls}-wrapper):not(${componentCls}-expanded-row-fixed)`]: {
|
|
268
288
|
marginLeft: token.marginXL + token.marginXL + token.lineWidth * 2
|
|
289
|
+
},
|
|
290
|
+
[`& > *${componentCls}-expanded-row-fixed`]: {
|
|
291
|
+
paddingLeft: token.marginXL + token.marginXL + token.lineWidth * 2 + token.padding
|
|
269
292
|
}
|
|
270
293
|
},
|
|
271
294
|
// 嵌套子表格和父表格第一列对齐
|
|
@@ -35,6 +35,6 @@ declare class ReactStickyMouseTooltip extends React.PureComponent<ReactStickyMou
|
|
|
35
35
|
addListener: () => void;
|
|
36
36
|
removeListener: () => void;
|
|
37
37
|
updateListener: () => void;
|
|
38
|
-
render(): import("@emotion/react/
|
|
38
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
39
39
|
}
|
|
40
40
|
export default ReactStickyMouseTooltip;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TreeSelect as AntTreeSelect } from 'antd';
|
|
2
2
|
import type { TreeSelectProps as AntTreeSelectProps } from 'antd/es/tree-select';
|
|
3
|
-
import { TreeNode as AntTreeNode } from 'rc-tree-select';
|
|
3
|
+
import type { TreeNode as AntTreeNode } from 'rc-tree-select';
|
|
4
4
|
import type { BaseSelectRef } from 'rc-select';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
export * from 'antd/es/tree-select';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/design",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.10",
|
|
4
4
|
"description": "The Design System of OceanBase",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oceanbase",
|
|
@@ -41,11 +41,12 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@ant-design/cssinjs": "^1.23.0",
|
|
43
43
|
"@ctrl/tinycolor": "^4.1.0",
|
|
44
|
+
"@inline-svg-unique-id/react": "^1.2.3",
|
|
44
45
|
"@oceanbase/aliyun-theme": "^0.1.6",
|
|
45
|
-
"@oceanbase/icons": "^0.4.
|
|
46
|
+
"@oceanbase/icons": "^0.4.6",
|
|
46
47
|
"@oceanbase/util": "^0.4.2",
|
|
47
48
|
"ahooks": "^2.10.14",
|
|
48
|
-
"antd": "^5.24.
|
|
49
|
+
"antd": "^5.24.7",
|
|
49
50
|
"classnames": "^2.5.1",
|
|
50
51
|
"lodash": "^4.17.21",
|
|
51
52
|
"lottie-web": "^5.12.2",
|
|
@@ -53,17 +54,17 @@
|
|
|
53
54
|
"rc-util": "^5.44.4"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
|
-
"@babel/cli": "^7.
|
|
57
|
-
"@babel/preset-env": "^7.26.
|
|
57
|
+
"@babel/cli": "^7.27.0",
|
|
58
|
+
"@babel/preset-env": "^7.26.9",
|
|
58
59
|
"antd-token-previewer": "^2.0.8",
|
|
59
60
|
"rc-select": "^14.16.6",
|
|
60
61
|
"rc-slider": "^11.1.8",
|
|
61
|
-
"rc-table": "^7.50.
|
|
62
|
+
"rc-table": "^7.50.4",
|
|
62
63
|
"rc-tree-select": "^5.27.0"
|
|
63
64
|
},
|
|
64
65
|
"peerDependencies": {
|
|
65
66
|
"react": ">=16.9.0",
|
|
66
67
|
"react-dom": ">=16.9.0"
|
|
67
68
|
},
|
|
68
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "db83d4b1d50b50813d9751f4e8c1189badf67820"
|
|
69
70
|
}
|