@oceanbase/design 0.4.9 → 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/button/index.d.ts +1 -1
- package/es/card/index.js +5 -4
- package/es/card/style/index.js +9 -7
- package/es/descriptions/hooks/useItems.d.ts +2 -2
- 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/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/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 +4 -1
- package/es/table/style/index.js +11 -4
- 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/button/index.d.ts +1 -1
- package/lib/card/index.js +3 -3
- package/lib/card/style/index.js +15 -16
- package/lib/descriptions/hooks/useItems.d.ts +2 -2
- 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/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/table/index.d.ts +1 -0
- package/lib/table/index.js +5 -1
- package/lib/table/style/index.js +17 -0
- package/lib/tree-select/index.d.ts +1 -1
- package/package.json +8 -7
package/lib/card/style/index.js
CHANGED
|
@@ -27,7 +27,7 @@ module.exports = __toCommonJS(style_exports);
|
|
|
27
27
|
var import_style = require("../../tabs/style");
|
|
28
28
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
29
29
|
var genTableStyle = (padding, token) => {
|
|
30
|
-
const {
|
|
30
|
+
const { antCls } = token;
|
|
31
31
|
const tableComponentCls = `${antCls}-table`;
|
|
32
32
|
return {
|
|
33
33
|
[`${tableComponentCls}-wrapper`]: {
|
|
@@ -51,18 +51,12 @@ var genTableStyle = (padding, token) => {
|
|
|
51
51
|
marginRight: padding
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
},
|
|
55
|
-
[`&${componentCls}-has-title${componentCls}-no-divider:not(${componentCls}-contain-tabs)`]: {
|
|
56
|
-
[`${componentCls}-body`]: {
|
|
57
|
-
[`& > ${tableComponentCls}-wrapper ${tableComponentCls}:not(${tableComponentCls}-bordered):first-child`]: {
|
|
58
|
-
marginTop: -token.marginSM
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
54
|
}
|
|
62
55
|
};
|
|
63
56
|
};
|
|
64
57
|
var genCardStyle = (token) => {
|
|
65
|
-
const { componentCls, tabsComponentCls, tabsPrefixCls, paddingSM, paddingLG } = token;
|
|
58
|
+
const { componentCls, antCls, tabsComponentCls, tabsPrefixCls, paddingSM, paddingLG } = token;
|
|
59
|
+
const tableComponentCls = `${antCls}-table`;
|
|
66
60
|
return {
|
|
67
61
|
[`${componentCls}`]: {
|
|
68
62
|
// nested Card style
|
|
@@ -110,13 +104,18 @@ var genCardStyle = (token) => {
|
|
|
110
104
|
marginBottom: 0
|
|
111
105
|
}
|
|
112
106
|
},
|
|
113
|
-
//
|
|
114
|
-
[
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
107
|
+
// reduce margin between card title and table
|
|
108
|
+
[`&${componentCls}-has-title${componentCls}-no-divider:not(${componentCls}-contain-tabs)`]: {
|
|
109
|
+
[`${componentCls}-body`]: {
|
|
110
|
+
[`& > ${tableComponentCls}-wrapper ${tableComponentCls}:not(${tableComponentCls}-bordered):first-child`]: {
|
|
111
|
+
marginTop: -token.marginSM
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
// no body horizontal padding card
|
|
116
|
+
[`${componentCls}${componentCls}-no-body-horizontal-padding`]: genTableStyle(paddingLG, token),
|
|
117
|
+
// no body horizontal padding small card
|
|
118
|
+
[`${componentCls}${componentCls}-no-body-horizontal-padding${componentCls}-small`]: genTableStyle(paddingSM, token)
|
|
120
119
|
};
|
|
121
120
|
};
|
|
122
121
|
var style_default = (prefixCls, tabsPrefixCls) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DescriptionsItemType } from '..';
|
|
3
3
|
export default function useItems(items?: DescriptionsItemType[], children?: React.ReactNode, bordered?: boolean): {
|
|
4
|
-
children: string | number | boolean | import("@emotion/react/jsx-runtime").JSX.Element
|
|
4
|
+
children: string | number | boolean | Iterable<React.ReactNode> | import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
5
|
span?: number | "filled" | {
|
|
6
6
|
xxl?: number;
|
|
7
7
|
xl?: number;
|
|
@@ -12,9 +12,9 @@ export default function useItems(items?: DescriptionsItemType[], children?: Reac
|
|
|
12
12
|
};
|
|
13
13
|
label?: React.ReactNode;
|
|
14
14
|
style?: React.CSSProperties;
|
|
15
|
+
key?: React.Key;
|
|
15
16
|
className?: string;
|
|
16
17
|
prefixCls?: string;
|
|
17
|
-
key?: React.Key;
|
|
18
18
|
classNames?: Partial<Record<"label" | "content", string>>;
|
|
19
19
|
styles?: Partial<Record<"label" | "content", React.CSSProperties>>;
|
|
20
20
|
labelStyle?: React.CSSProperties;
|
|
@@ -58,11 +58,27 @@ function convertItem(props, bordered) {
|
|
|
58
58
|
title: itemChildren
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
-
const { ellipsis = defaultEllipsis, ...restContentProps } = contentProps || {};
|
|
61
|
+
const { ellipsis = defaultEllipsis, editable, ...restContentProps } = contentProps || {};
|
|
62
62
|
return {
|
|
63
63
|
...restItemProps,
|
|
64
64
|
// 仅无边框时定制 children
|
|
65
|
-
children: bordered ? itemChildren : /* @__PURE__ */ import_react.default.createElement(
|
|
65
|
+
children: bordered ? itemChildren : /* @__PURE__ */ import_react.default.createElement(
|
|
66
|
+
import_typography.default.Text,
|
|
67
|
+
{
|
|
68
|
+
...restContentProps,
|
|
69
|
+
ellipsis: (0, import_getEllipsisConfig.getEllipsisConfig)(ellipsis, itemChildren),
|
|
70
|
+
editable: (
|
|
71
|
+
// disable autoSize by default to avoid over height
|
|
72
|
+
typeof editable === "object" ? {
|
|
73
|
+
autoSize: false,
|
|
74
|
+
...editable
|
|
75
|
+
} : editable === true ? {
|
|
76
|
+
autoSize: false
|
|
77
|
+
} : editable
|
|
78
|
+
)
|
|
79
|
+
},
|
|
80
|
+
itemChildren
|
|
81
|
+
)
|
|
66
82
|
};
|
|
67
83
|
}
|
|
68
84
|
function useItems(items, children, bordered) {
|
|
@@ -44,7 +44,7 @@ __reExport(descriptions_exports, require("antd/es/descriptions"), module.exports
|
|
|
44
44
|
var Descriptions = ({
|
|
45
45
|
children,
|
|
46
46
|
bordered,
|
|
47
|
-
layout,
|
|
47
|
+
layout = "horizontal",
|
|
48
48
|
colon = layout === "vertical" ? false : void 0,
|
|
49
49
|
items,
|
|
50
50
|
prefixCls: customizePrefixCls,
|
|
@@ -55,7 +55,10 @@ var Descriptions = ({
|
|
|
55
55
|
const prefixCls = getPrefixCls("descriptions", customizePrefixCls);
|
|
56
56
|
const typographyPrefixCls = getPrefixCls("typography", customizePrefixCls);
|
|
57
57
|
const { wrapSSR } = (0, import_style.default)(prefixCls, typographyPrefixCls);
|
|
58
|
-
const descriptionsCls = (0, import_classnames.default)(className
|
|
58
|
+
const descriptionsCls = (0, import_classnames.default)(className, {
|
|
59
|
+
[`${prefixCls}-vertical`]: layout === "vertical",
|
|
60
|
+
[`${prefixCls}-horizontal`]: layout === "horizontal"
|
|
61
|
+
});
|
|
59
62
|
const newItems = (0, import_useItems.default)(items, children, bordered);
|
|
60
63
|
return wrapSSR(
|
|
61
64
|
/* @__PURE__ */ import_react.default.createElement(
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import type { CSSObject } from '@ant-design/cssinjs';
|
|
2
3
|
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
4
|
+
import type { DescriptionsProps } from '..';
|
|
3
5
|
export type DescriptionsToken = FullToken<'Alert'> & {
|
|
4
6
|
typographyPrefixCls: string;
|
|
5
7
|
typographyComponentCls: string;
|
|
6
8
|
};
|
|
9
|
+
export declare const genVerticalStyle: (size: DescriptionsProps['size'], token: Partial<DescriptionsToken>) => CSSObject;
|
|
7
10
|
export declare const genDescriptionsStyle: GenerateStyle<DescriptionsToken>;
|
|
8
11
|
declare const _default: (prefixCls: string, typographyPrefixCls: string) => {
|
|
9
12
|
wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -20,14 +20,49 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var style_exports = {};
|
|
21
21
|
__export(style_exports, {
|
|
22
22
|
default: () => style_default,
|
|
23
|
-
genDescriptionsStyle: () => genDescriptionsStyle
|
|
23
|
+
genDescriptionsStyle: () => genDescriptionsStyle,
|
|
24
|
+
genVerticalStyle: () => genVerticalStyle
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(style_exports);
|
|
26
27
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
28
|
+
var genVerticalStyle = (size, token) => {
|
|
29
|
+
const { componentCls } = token;
|
|
30
|
+
const paddingMap = {
|
|
31
|
+
default: {
|
|
32
|
+
paddingIn: token.paddingXS,
|
|
33
|
+
paddingOut: token.paddingLG
|
|
34
|
+
},
|
|
35
|
+
middle: {
|
|
36
|
+
paddingIn: token.paddingXXS,
|
|
37
|
+
paddingOut: token.padding
|
|
38
|
+
},
|
|
39
|
+
small: {
|
|
40
|
+
paddingIn: token.paddingXXS,
|
|
41
|
+
paddingOut: token.paddingSM
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const paddingConfig = paddingMap[size];
|
|
45
|
+
return {
|
|
46
|
+
// vertical Descriptions without border
|
|
47
|
+
[`&${componentCls}${componentCls}-vertical:not(${componentCls}-bordered)`]: {
|
|
48
|
+
[`${componentCls}-row:nth-child(2n + 1)`]: {
|
|
49
|
+
[`& > th, & > td`]: {
|
|
50
|
+
paddingBottom: paddingConfig.paddingIn
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
[`${componentCls}-row:nth-child(2n)`]: {
|
|
54
|
+
[`& > th, & > td`]: {
|
|
55
|
+
paddingBottom: paddingConfig.paddingOut
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
};
|
|
27
61
|
var genDescriptionsStyle = (token) => {
|
|
28
62
|
const { componentCls, typographyComponentCls } = token;
|
|
29
63
|
return {
|
|
30
64
|
[`${componentCls}`]: {
|
|
65
|
+
...genVerticalStyle("default", token),
|
|
31
66
|
[`${componentCls}-item-container`]: {
|
|
32
67
|
[`${componentCls}-item-content`]: {
|
|
33
68
|
paddingRight: 12,
|
|
@@ -35,11 +70,18 @@ var genDescriptionsStyle = (token) => {
|
|
|
35
70
|
overflow: "hidden",
|
|
36
71
|
[`${typographyComponentCls}-edit-content`]: {
|
|
37
72
|
insetInlineStart: 0,
|
|
38
|
-
marginTop: 0
|
|
73
|
+
marginTop: 0,
|
|
74
|
+
marginBottom: 0
|
|
39
75
|
}
|
|
40
76
|
}
|
|
77
|
+
},
|
|
78
|
+
[`${componentCls}-item-container:has(${`${typographyComponentCls}-edit-content`})`]: {
|
|
79
|
+
alignItems: "center",
|
|
80
|
+
height: token.fontSize * token.lineHeight
|
|
41
81
|
}
|
|
42
|
-
}
|
|
82
|
+
},
|
|
83
|
+
[`${componentCls}${componentCls}-middle`]: genVerticalStyle("middle", token),
|
|
84
|
+
[`${componentCls}${componentCls}-small`]: genVerticalStyle("small", token)
|
|
43
85
|
};
|
|
44
86
|
};
|
|
45
87
|
var style_default = (prefixCls, typographyPrefixCls) => {
|
|
@@ -56,5 +98,6 @@ var style_default = (prefixCls, typographyPrefixCls) => {
|
|
|
56
98
|
};
|
|
57
99
|
// Annotate the CommonJS export names for ESM import in node:
|
|
58
100
|
0 && (module.exports = {
|
|
59
|
-
genDescriptionsStyle
|
|
101
|
+
genDescriptionsStyle,
|
|
102
|
+
genVerticalStyle
|
|
60
103
|
});
|
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" | "warning" | "error" | "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/table/index.d.ts
CHANGED
package/lib/table/index.js
CHANGED
|
@@ -50,6 +50,8 @@ function Table(props, ref) {
|
|
|
50
50
|
const {
|
|
51
51
|
locale: customLocale,
|
|
52
52
|
size,
|
|
53
|
+
bordered,
|
|
54
|
+
innerBordered,
|
|
53
55
|
columns,
|
|
54
56
|
footer,
|
|
55
57
|
pagination: customPagination,
|
|
@@ -87,7 +89,8 @@ function Table(props, ref) {
|
|
|
87
89
|
{
|
|
88
90
|
[`${prefixCls}-expandable`]: !(0, import_lodash.isEmpty)(expandable),
|
|
89
91
|
[`${prefixCls}-selectable`]: !!rowSelection,
|
|
90
|
-
[`${prefixCls}-has-footer`]: !!footer
|
|
92
|
+
[`${prefixCls}-has-footer`]: !!footer,
|
|
93
|
+
[`${prefixCls}-inner-bordered`]: innerBordered
|
|
91
94
|
},
|
|
92
95
|
className
|
|
93
96
|
);
|
|
@@ -185,6 +188,7 @@ function Table(props, ref) {
|
|
|
185
188
|
emptyText: /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-empty-wrapper` }, typeof emptyText === "function" ? emptyText() : emptyText)
|
|
186
189
|
},
|
|
187
190
|
size,
|
|
191
|
+
bordered: bordered || innerBordered,
|
|
188
192
|
columns: newColumns,
|
|
189
193
|
rowClassName: (...args) => {
|
|
190
194
|
return (0, import_classnames.default)(
|
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
|
// 单元格通用样式
|
|
@@ -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
|
}
|