@oceanbase/design 0.4.0 → 0.4.1
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/button/style/index.js +17 -3
- package/es/card/style/index.js +5 -3
- package/es/checkbox/index.d.ts +2 -0
- package/es/checkbox/index.js +40 -1
- package/es/checkbox/style/index.d.ts +9 -0
- package/es/checkbox/style/index.js +22 -0
- package/es/config-provider/index.d.ts +2 -0
- package/es/config-provider/index.js +6 -4
- package/es/descriptions/hooks/useItems.d.ts +3 -3
- package/es/empty/default.js +34 -55
- package/es/index.d.ts +6 -0
- package/es/index.js +3 -0
- package/es/radio/index.d.ts +2 -0
- package/es/radio/index.js +41 -1
- package/es/radio/style/index.d.ts +9 -0
- package/es/radio/style/index.js +23 -0
- package/es/slider/index.d.ts +5 -0
- package/es/slider/index.js +36 -1
- package/es/slider/style/index.d.ts +9 -0
- package/es/slider/style/index.js +21 -0
- package/es/table/index.js +15 -3
- package/es/table/style/index.js +22 -15
- package/es/theme/default.js +10 -11
- package/es/theme/style/aliyun.less +5 -1
- package/es/theme/style/compact.less +7 -3
- package/es/theme/style/dark.less +5 -1
- package/es/theme/style/default.less +15 -11
- package/lib/button/index.d.ts +1 -1
- package/lib/button/style/index.js +21 -1
- package/lib/card/style/index.js +7 -2
- package/lib/checkbox/index.d.ts +2 -0
- package/lib/checkbox/index.js +49 -1
- package/lib/checkbox/style/index.d.ts +9 -0
- package/lib/checkbox/style/index.js +49 -0
- package/lib/config-provider/index.d.ts +2 -0
- package/lib/config-provider/index.js +2 -1
- package/lib/descriptions/hooks/useItems.d.ts +3 -3
- package/lib/empty/default.js +8 -39
- package/lib/index.d.ts +6 -0
- package/lib/index.js +9 -0
- package/lib/radio/index.d.ts +2 -0
- package/lib/radio/index.js +42 -1
- package/lib/radio/style/index.d.ts +9 -0
- package/lib/radio/style/index.js +49 -0
- package/lib/slider/index.d.ts +5 -0
- package/lib/slider/index.js +38 -1
- package/lib/slider/style/index.d.ts +9 -0
- package/lib/slider/style/index.js +51 -0
- package/lib/table/index.js +14 -3
- package/lib/table/style/index.js +20 -16
- package/lib/theme/default.js +10 -11
- package/lib/theme/style/aliyun.less +5 -1
- package/lib/theme/style/compact.less +7 -3
- package/lib/theme/style/dark.less +5 -1
- package/lib/theme/style/default.less +15 -11
- package/package.json +11 -10
package/lib/index.js
CHANGED
|
@@ -35,6 +35,7 @@ __export(src_exports, {
|
|
|
35
35
|
Breadcrumb: () => import_breadcrumb.default,
|
|
36
36
|
Button: () => import_button.default,
|
|
37
37
|
Card: () => import_card.default,
|
|
38
|
+
Checkbox: () => import_checkbox.default,
|
|
38
39
|
Col: () => import_grid.Col,
|
|
39
40
|
ConfigProvider: () => import_config_provider.default,
|
|
40
41
|
Descriptions: () => import_descriptions.default,
|
|
@@ -46,10 +47,12 @@ __export(src_exports, {
|
|
|
46
47
|
List: () => import_list.default,
|
|
47
48
|
Lottie: () => import_lottie.default,
|
|
48
49
|
Modal: () => import_modal.default,
|
|
50
|
+
Radio: () => import_radio.default,
|
|
49
51
|
Result: () => import_result.default,
|
|
50
52
|
Row: () => import_grid.Row,
|
|
51
53
|
Segmented: () => import_segmented.default,
|
|
52
54
|
Select: () => import_select.default,
|
|
55
|
+
Slider: () => import_slider.default,
|
|
53
56
|
Space: () => import_space.default,
|
|
54
57
|
Spin: () => import_spin.default,
|
|
55
58
|
Table: () => import_table.default,
|
|
@@ -89,8 +92,11 @@ var import_tabs = __toESM(require("./tabs"));
|
|
|
89
92
|
var import_tag = __toESM(require("./tag"));
|
|
90
93
|
var import_input = __toESM(require("./input"));
|
|
91
94
|
var import_input_number = __toESM(require("./input-number"));
|
|
95
|
+
var import_radio = __toESM(require("./radio"));
|
|
96
|
+
var import_checkbox = __toESM(require("./checkbox"));
|
|
92
97
|
var import_select = __toESM(require("./select"));
|
|
93
98
|
var import_tree_select = __toESM(require("./tree-select"));
|
|
99
|
+
var import_slider = __toESM(require("./slider"));
|
|
94
100
|
var import_tooltip = __toESM(require("./tooltip"));
|
|
95
101
|
var import_segmented = __toESM(require("./segmented"));
|
|
96
102
|
var import_breadcrumb = __toESM(require("./breadcrumb"));
|
|
@@ -109,6 +115,7 @@ var { useToken } = import_theme2.default;
|
|
|
109
115
|
Breadcrumb,
|
|
110
116
|
Button,
|
|
111
117
|
Card,
|
|
118
|
+
Checkbox,
|
|
112
119
|
Col,
|
|
113
120
|
ConfigProvider,
|
|
114
121
|
Descriptions,
|
|
@@ -120,10 +127,12 @@ var { useToken } = import_theme2.default;
|
|
|
120
127
|
List,
|
|
121
128
|
Lottie,
|
|
122
129
|
Modal,
|
|
130
|
+
Radio,
|
|
123
131
|
Result,
|
|
124
132
|
Row,
|
|
125
133
|
Segmented,
|
|
126
134
|
Select,
|
|
135
|
+
Slider,
|
|
127
136
|
Space,
|
|
128
137
|
Spin,
|
|
129
138
|
Table,
|
package/lib/radio/index.d.ts
CHANGED
package/lib/radio/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,47 @@ 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/radio/index.
|
|
30
|
+
// src/radio/index.tsx
|
|
17
31
|
var radio_exports = {};
|
|
32
|
+
__export(radio_exports, {
|
|
33
|
+
default: () => radio_default
|
|
34
|
+
});
|
|
18
35
|
module.exports = __toCommonJS(radio_exports);
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_config_provider = __toESM(require("../config-provider"));
|
|
40
|
+
var import_style = __toESM(require("./style"));
|
|
19
41
|
__reExport(radio_exports, require("antd/es/radio"), module.exports);
|
|
42
|
+
var InternalRadio = import_react.default.forwardRef(
|
|
43
|
+
({ prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
|
|
44
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
45
|
+
const prefixCls = getPrefixCls("radio", customizePrefixCls);
|
|
46
|
+
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
47
|
+
const radioCls = (0, import_classnames.default)(className);
|
|
48
|
+
return wrapSSR(
|
|
49
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Radio, { ref, prefixCls: customizePrefixCls, className: radioCls, ...restProps })
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
var Radio = InternalRadio;
|
|
54
|
+
Radio.Button = import_antd.Radio.Button;
|
|
55
|
+
Radio.Group = import_antd.Radio.Group;
|
|
56
|
+
Radio.__ANT_RADIO = import_antd.Radio.__ANT_RADIO;
|
|
57
|
+
if (process.env.NODE_ENV !== "production") {
|
|
58
|
+
Radio.displayName = import_antd.Radio.displayName;
|
|
59
|
+
}
|
|
60
|
+
var radio_default = Radio;
|
|
20
61
|
// Annotate the CommonJS export names for ESM import in node:
|
|
21
62
|
0 && (module.exports = {
|
|
22
63
|
...require("antd/es/radio")
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
3
|
+
export type RadioToken = FullToken<'Radio'>;
|
|
4
|
+
export declare const genRadioStyle: GenerateStyle<RadioToken>;
|
|
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,49 @@
|
|
|
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/radio/style/index.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
default: () => style_default,
|
|
23
|
+
genRadioStyle: () => genRadioStyle
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
|
+
var genRadioStyle = (token) => {
|
|
28
|
+
const { componentCls, radioSize, fontSize, fontSizeLG, lineHeight } = token;
|
|
29
|
+
return {
|
|
30
|
+
[`${componentCls}-wrapper`]: {
|
|
31
|
+
[`${componentCls}`]: {
|
|
32
|
+
alignSelf: "baseline",
|
|
33
|
+
[`${componentCls}-inner`]: {
|
|
34
|
+
marginBottom: -(fontSize * lineHeight - (radioSize || fontSizeLG)) / 2
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
var style_default = (prefixCls) => {
|
|
41
|
+
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Radio", (token) => {
|
|
42
|
+
return [genRadioStyle(token)];
|
|
43
|
+
});
|
|
44
|
+
return useStyle(prefixCls);
|
|
45
|
+
};
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
genRadioStyle
|
|
49
|
+
});
|
package/lib/slider/index.d.ts
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
+
import type { SliderSingleProps as AntSliderSingleProps, SliderRangeProps as AntSliderRangeProps } from 'antd/es/slider';
|
|
2
|
+
import type { SliderRef } from 'rc-slider/lib/Slider';
|
|
3
|
+
import React from 'react';
|
|
1
4
|
export * from 'antd/es/slider';
|
|
5
|
+
declare const Slider: React.ForwardRefExoticComponent<(AntSliderSingleProps | AntSliderRangeProps) & React.RefAttributes<SliderRef>>;
|
|
6
|
+
export default Slider;
|
package/lib/slider/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,43 @@ 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/slider/index.
|
|
30
|
+
// src/slider/index.tsx
|
|
17
31
|
var slider_exports = {};
|
|
32
|
+
__export(slider_exports, {
|
|
33
|
+
default: () => slider_default
|
|
34
|
+
});
|
|
18
35
|
module.exports = __toCommonJS(slider_exports);
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_config_provider = __toESM(require("../config-provider"));
|
|
40
|
+
var import_style = __toESM(require("./style"));
|
|
19
41
|
__reExport(slider_exports, require("antd/es/slider"), module.exports);
|
|
42
|
+
var Slider = import_react.default.forwardRef(
|
|
43
|
+
({ prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
|
|
44
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
45
|
+
const prefixCls = getPrefixCls("slider", customizePrefixCls);
|
|
46
|
+
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
47
|
+
const sliderCls = (0, import_classnames.default)(className);
|
|
48
|
+
return wrapSSR(
|
|
49
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Slider, { ref, prefixCls: customizePrefixCls, className: sliderCls, ...restProps })
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
if (process.env.NODE_ENV !== "production") {
|
|
54
|
+
Slider.displayName = import_antd.Slider.displayName;
|
|
55
|
+
}
|
|
56
|
+
var slider_default = Slider;
|
|
20
57
|
// Annotate the CommonJS export names for ESM import in node:
|
|
21
58
|
0 && (module.exports = {
|
|
22
59
|
...require("antd/es/slider")
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
3
|
+
export type SliderToken = FullToken<'Slider'>;
|
|
4
|
+
export declare const genSliderStyle: GenerateStyle<SliderToken>;
|
|
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,51 @@
|
|
|
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/slider/style/index.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
default: () => style_default,
|
|
23
|
+
genSliderStyle: () => genSliderStyle
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
|
+
var genSliderStyle = (token) => {
|
|
28
|
+
const { componentCls, dotSize = 8 } = token;
|
|
29
|
+
return {
|
|
30
|
+
[`${componentCls}${componentCls}-horizontal`]: {
|
|
31
|
+
[`${componentCls}-mark`]: {
|
|
32
|
+
[`${componentCls}-mark-text[style^="left: 0%; transform: translateX(-50%);"]`]: {
|
|
33
|
+
transform: `translateX(calc(0% - ${dotSize / 2}px)) !important`
|
|
34
|
+
},
|
|
35
|
+
[`${componentCls}-mark-text[style^="left: 100%; transform: translateX(-50%);"]`]: {
|
|
36
|
+
transform: `translateX(calc(-100% + ${dotSize / 2}px)) !important`
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
var style_default = (prefixCls) => {
|
|
43
|
+
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Slider", (token) => {
|
|
44
|
+
return [genSliderStyle(token)];
|
|
45
|
+
});
|
|
46
|
+
return useStyle(prefixCls);
|
|
47
|
+
};
|
|
48
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
+
0 && (module.exports = {
|
|
50
|
+
genSliderStyle
|
|
51
|
+
});
|
package/lib/table/index.js
CHANGED
|
@@ -39,6 +39,7 @@ var import_lodash = require("lodash");
|
|
|
39
39
|
var import_react = __toESM(require("react"));
|
|
40
40
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
41
41
|
var import_typography = __toESM(require("../typography"));
|
|
42
|
+
var import_empty = __toESM(require("../empty"));
|
|
42
43
|
var import_style = __toESM(require("./style"));
|
|
43
44
|
var import_useDefaultPagination = __toESM(require("./hooks/useDefaultPagination"));
|
|
44
45
|
var import_useMergedState = __toESM(require("rc-util/lib/hooks/useMergedState"));
|
|
@@ -49,6 +50,7 @@ function Table(props, ref) {
|
|
|
49
50
|
const {
|
|
50
51
|
locale: customLocale,
|
|
51
52
|
columns,
|
|
53
|
+
footer,
|
|
52
54
|
pagination: customPagination,
|
|
53
55
|
rowSelection,
|
|
54
56
|
toolAlertRender,
|
|
@@ -65,7 +67,11 @@ function Table(props, ref) {
|
|
|
65
67
|
const extendedContext = (0, import_react.useContext)(import_config_provider.default.ExtendedConfigContext);
|
|
66
68
|
const pagination = (0, import_useDefaultPagination.default)(customPagination);
|
|
67
69
|
const { getPrefixCls, locale, table } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
68
|
-
const {
|
|
70
|
+
const {
|
|
71
|
+
batchOperationBar,
|
|
72
|
+
emptyText = /* @__PURE__ */ import_react.default.createElement(import_empty.default, { image: import_empty.default.PRESENTED_IMAGE_SIMPLE }),
|
|
73
|
+
...restLocale
|
|
74
|
+
} = {
|
|
69
75
|
...customLocale,
|
|
70
76
|
batchOperationBar: {
|
|
71
77
|
...(_a = import_en_US.default.Table) == null ? void 0 : _a.batchOperationBar,
|
|
@@ -77,7 +83,8 @@ function Table(props, ref) {
|
|
|
77
83
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
78
84
|
const tableCls = (0, import_classnames.default)(
|
|
79
85
|
{
|
|
80
|
-
[`${prefixCls}-expandable`]: !(0, import_lodash.isEmpty)(expandable)
|
|
86
|
+
[`${prefixCls}-expandable`]: !(0, import_lodash.isEmpty)(expandable),
|
|
87
|
+
[`${prefixCls}-has-footer`]: !!footer
|
|
81
88
|
},
|
|
82
89
|
className
|
|
83
90
|
);
|
|
@@ -170,7 +177,10 @@ function Table(props, ref) {
|
|
|
170
177
|
ref,
|
|
171
178
|
prefixCls: customizePrefixCls,
|
|
172
179
|
className: tableCls,
|
|
173
|
-
locale:
|
|
180
|
+
locale: {
|
|
181
|
+
...restLocale,
|
|
182
|
+
emptyText: /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-empty-wrapper` }, typeof emptyText === "function" ? emptyText() : emptyText)
|
|
183
|
+
},
|
|
174
184
|
columns: newColumns,
|
|
175
185
|
rowSelection: rowSelection ? {
|
|
176
186
|
columnWidth: table == null ? void 0 : table.selectionColumnWidth,
|
|
@@ -181,6 +191,7 @@ function Table(props, ref) {
|
|
|
181
191
|
(_a2 = rowSelection == null ? void 0 : rowSelection.onChange) == null ? void 0 : _a2.call(rowSelection, selectedRowKeys, selectedRows, info);
|
|
182
192
|
}
|
|
183
193
|
} : void 0,
|
|
194
|
+
footer,
|
|
184
195
|
pagination: pagination === false ? false : {
|
|
185
196
|
...pagination,
|
|
186
197
|
hideOnSinglePage: toolAlertRender || toolOptionsRender || toolSelectedContent || (pagination == null ? void 0 : pagination.showSizeChanger) ? false : (pagination == null ? void 0 : pagination.hideOnSinglePage) !== void 0 ? pagination == null ? void 0 : pagination.hideOnSinglePage : extendedContext.hideOnSinglePage,
|
package/lib/table/style/index.js
CHANGED
|
@@ -49,6 +49,9 @@ var genTableStyle = (token) => {
|
|
|
49
49
|
color: colorText,
|
|
50
50
|
backgroundColor: colorBgBase,
|
|
51
51
|
borderRadius: borderRadiusLG,
|
|
52
|
+
[`${componentCls}-footer`]: {
|
|
53
|
+
borderBottom: `1px solid ${colorBorderSecondary}`
|
|
54
|
+
},
|
|
52
55
|
// head 样式
|
|
53
56
|
[`${componentCls}-thead > tr`]: {
|
|
54
57
|
["td, th"]: {
|
|
@@ -97,6 +100,13 @@ var genTableStyle = (token) => {
|
|
|
97
100
|
borderRadius: borderRadiusLG
|
|
98
101
|
}
|
|
99
102
|
},
|
|
103
|
+
// empty wrapper style
|
|
104
|
+
[`${componentCls}-empty-wrapper`]: {
|
|
105
|
+
minHeight: 360,
|
|
106
|
+
display: "flex",
|
|
107
|
+
justifyContent: "center",
|
|
108
|
+
alignItems: "center"
|
|
109
|
+
},
|
|
100
110
|
// 嵌套子表格样式
|
|
101
111
|
[`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: {
|
|
102
112
|
// 调整嵌套子表格的间距
|
|
@@ -114,10 +124,19 @@ var genTableStyle = (token) => {
|
|
|
114
124
|
["td:first-child, td:last-child"]: {
|
|
115
125
|
borderRadius: borderRadiusLG
|
|
116
126
|
}
|
|
127
|
+
},
|
|
128
|
+
// empty wrapper style
|
|
129
|
+
[`${componentCls}-empty-wrapper`]: {
|
|
130
|
+
minHeight: "auto"
|
|
117
131
|
}
|
|
118
132
|
}
|
|
119
133
|
}
|
|
120
134
|
},
|
|
135
|
+
// 非可展开表格、带 footer 表格、空表格、带边框表格: 底部添加分隔线
|
|
136
|
+
[`${componentCls}-wrapper:not(${componentCls}-expandable):not(${componentCls}-has-footer) ${componentCls}:not(${componentCls}-bordered):not(${componentCls}-empty)`]: {
|
|
137
|
+
borderBottom: `1px solid ${colorBorderSecondary}`,
|
|
138
|
+
borderRadius: 0
|
|
139
|
+
},
|
|
121
140
|
// 滚动表格样式
|
|
122
141
|
// 由于滚动表格会在 tbody 下最前面多一个 tr 元素,因此需要设置相反的斑马条样式
|
|
123
142
|
// .ant-table-scroll-horizontal: 水平滚动
|
|
@@ -159,12 +178,6 @@ var genTableStyle = (token) => {
|
|
|
159
178
|
}
|
|
160
179
|
}
|
|
161
180
|
}
|
|
162
|
-
},
|
|
163
|
-
// Remove pagination borderTop for expandable Table
|
|
164
|
-
[`${componentCls}-pagination`]: {
|
|
165
|
-
[`&${antCls}-pagination`]: {
|
|
166
|
-
borderTop: "none"
|
|
167
|
-
}
|
|
168
181
|
}
|
|
169
182
|
},
|
|
170
183
|
// loading style
|
|
@@ -181,8 +194,7 @@ var genTableStyle = (token) => {
|
|
|
181
194
|
[`${componentCls}-pagination`]: {
|
|
182
195
|
[`&${antCls}-pagination`]: {
|
|
183
196
|
padding: `${padding}px 0`,
|
|
184
|
-
margin: "0 !important"
|
|
185
|
-
borderTop: `1px solid ${colorBorderSecondary}`
|
|
197
|
+
margin: "0 !important"
|
|
186
198
|
},
|
|
187
199
|
// 批量操作栏样式
|
|
188
200
|
[`${componentCls}-batch-operation-bar`]: {
|
|
@@ -199,14 +211,6 @@ var genTableStyle = (token) => {
|
|
|
199
211
|
}
|
|
200
212
|
}
|
|
201
213
|
}
|
|
202
|
-
},
|
|
203
|
-
// Remove pagination borderTop for bordered Table
|
|
204
|
-
[`${componentCls}${componentCls}-bordered`]: {
|
|
205
|
-
[`&+${componentCls}-pagination`]: {
|
|
206
|
-
[`&${antCls}-pagination`]: {
|
|
207
|
-
borderTop: "none"
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
214
|
}
|
|
211
215
|
},
|
|
212
216
|
// 批量操作栏中的弹出层样式
|
package/lib/theme/default.js
CHANGED
|
@@ -30,16 +30,6 @@ var defaultTheme = {
|
|
|
30
30
|
token: {
|
|
31
31
|
fontFamily: `-apple-system, 'Noto Sans', BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'`,
|
|
32
32
|
fontFamilyCode: `Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace`,
|
|
33
|
-
fontSizeHeading1: 32,
|
|
34
|
-
fontSizeHeading2: 24,
|
|
35
|
-
fontSizeHeading3: 20,
|
|
36
|
-
fontSizeHeading4: 16,
|
|
37
|
-
fontSizeHeading5: 14,
|
|
38
|
-
lineHeightHeading1: 40 / 32,
|
|
39
|
-
lineHeightHeading2: 32 / 24,
|
|
40
|
-
lineHeightHeading3: 28 / 20,
|
|
41
|
-
lineHeightHeading4: 24 / 16,
|
|
42
|
-
lineHeightHeading5: 22 / 14,
|
|
43
33
|
colorPrimaryBg: "#EAF1FF",
|
|
44
34
|
colorPrimary: "#006AFF",
|
|
45
35
|
colorPrimaryBgHover: "#EAF1FF",
|
|
@@ -117,7 +107,8 @@ var defaultTheme = {
|
|
|
117
107
|
fontSize: 12,
|
|
118
108
|
// @ts-ignore
|
|
119
109
|
// fontHeight is internal token
|
|
120
|
-
fontHeight: 20
|
|
110
|
+
fontHeight: 20,
|
|
111
|
+
lastItemColor: "#5c6b8a"
|
|
121
112
|
},
|
|
122
113
|
InputNumber: {
|
|
123
114
|
handleVisible: true
|
|
@@ -132,6 +123,14 @@ var defaultTheme = {
|
|
|
132
123
|
multipleItemBorderColor: tagColorBorder,
|
|
133
124
|
multipleItemBorderColorDisabled: tagColorBorder
|
|
134
125
|
},
|
|
126
|
+
Slider: {
|
|
127
|
+
trackBg: "#006AFF",
|
|
128
|
+
trackHoverBg: "#5189fb",
|
|
129
|
+
trackBgDisabled: "#b3ccff",
|
|
130
|
+
handleColor: "#006AFF",
|
|
131
|
+
handleActiveColor: "#5189fb",
|
|
132
|
+
handleColorDisabled: "#b3ccff"
|
|
133
|
+
},
|
|
135
134
|
Tag: {
|
|
136
135
|
defaultColor: "#5c6b8a",
|
|
137
136
|
colorBorder: tagColorBorder
|
|
@@ -312,6 +312,9 @@
|
|
|
312
312
|
@colorFillSecondary: rgba(0, 0, 0, 0.06);
|
|
313
313
|
@colorFillTertiary: rgba(0, 0, 0, 0.04);
|
|
314
314
|
@colorFillQuaternary: rgba(0, 0, 0, 0.02);
|
|
315
|
+
@colorBgSolid: rgb(0, 0, 0);
|
|
316
|
+
@colorBgSolidHover: rgba(0, 0, 0, 0.75);
|
|
317
|
+
@colorBgSolidActive: rgba(0, 0, 0, 0.95);
|
|
315
318
|
@colorBgLayout: #f2f3f5;
|
|
316
319
|
@colorBgContainer: #ffffff;
|
|
317
320
|
@colorBgElevated: #ffffff;
|
|
@@ -339,6 +342,7 @@
|
|
|
339
342
|
@colorSuccessTextActive: #009c6d;
|
|
340
343
|
@colorErrorBg: #fff2f0;
|
|
341
344
|
@colorErrorBgHover: #ffe2de;
|
|
345
|
+
@colorErrorBgFilledHover: #ffd7d3;
|
|
342
346
|
@colorErrorBgActive: #ffbcb5;
|
|
343
347
|
@colorErrorBorder: #ffbcb5;
|
|
344
348
|
@colorErrorBorderHover: #ff948c;
|
|
@@ -430,7 +434,7 @@
|
|
|
430
434
|
@colorErrorOutline: rgba(255, 38, 5, 0.06);
|
|
431
435
|
@colorWarningOutline: rgba(255, 195, 5, 0.1);
|
|
432
436
|
@fontSizeIcon: 12;
|
|
433
|
-
@lineWidthFocus:
|
|
437
|
+
@lineWidthFocus: 3;
|
|
434
438
|
@controlInteractiveSize: 16;
|
|
435
439
|
@controlItemBgHover: rgba(0, 0, 0, 0.04);
|
|
436
440
|
@controlItemBgActive: #e6f4ff;
|
|
@@ -312,6 +312,9 @@
|
|
|
312
312
|
@colorFillSecondary: #e2e8f3;
|
|
313
313
|
@colorFillTertiary: #f3f6fc;
|
|
314
314
|
@colorFillQuaternary: #f8fafe;
|
|
315
|
+
@colorBgSolid: rgb(0, 0, 0);
|
|
316
|
+
@colorBgSolidHover: rgba(0, 0, 0, 0.75);
|
|
317
|
+
@colorBgSolidActive: rgba(0, 0, 0, 0.95);
|
|
315
318
|
@colorBgLayout: #f3f6fc;
|
|
316
319
|
@colorBgContainer: #ffffff;
|
|
317
320
|
@colorBgElevated: #ffffff;
|
|
@@ -339,6 +342,7 @@
|
|
|
339
342
|
@colorSuccessTextActive: #00b378;
|
|
340
343
|
@colorErrorBg: #ffebeb;
|
|
341
344
|
@colorErrorBgHover: #ffd6d6;
|
|
345
|
+
@colorErrorBgFilledHover: #ffd7d3;
|
|
342
346
|
@colorErrorBgActive: #ffbcb5;
|
|
343
347
|
@colorErrorBorder: #ffb3b3;
|
|
344
348
|
@colorErrorBorderHover: #ff7575;
|
|
@@ -373,7 +377,7 @@
|
|
|
373
377
|
@fontSizeLG: 14;
|
|
374
378
|
@fontSizeXL: 16;
|
|
375
379
|
@fontSizeHeading1: 32;
|
|
376
|
-
@fontSizeHeading2:
|
|
380
|
+
@fontSizeHeading2: 26;
|
|
377
381
|
@fontSizeHeading3: 20;
|
|
378
382
|
@fontSizeHeading4: 16;
|
|
379
383
|
@fontSizeHeading5: 14;
|
|
@@ -384,7 +388,7 @@
|
|
|
384
388
|
@fontHeightLG: 22;
|
|
385
389
|
@fontHeightSM: 18;
|
|
386
390
|
@lineHeightHeading1: 1.25;
|
|
387
|
-
@lineHeightHeading2: 1.
|
|
391
|
+
@lineHeightHeading2: 1.3076923076923077;
|
|
388
392
|
@lineHeightHeading3: 1.4;
|
|
389
393
|
@lineHeightHeading4: 1.5;
|
|
390
394
|
@lineHeightHeading5: 1.5714285714285714;
|
|
@@ -430,7 +434,7 @@
|
|
|
430
434
|
@colorErrorOutline: rgba(255, 5, 5, 0.08);
|
|
431
435
|
@colorWarningOutline: rgba(255, 164, 19, 0.11);
|
|
432
436
|
@fontSizeIcon: 10;
|
|
433
|
-
@lineWidthFocus:
|
|
437
|
+
@lineWidthFocus: 3;
|
|
434
438
|
@controlOutlineWidth: 2;
|
|
435
439
|
@controlInteractiveSize: 14;
|
|
436
440
|
@controlItemBgHover: #f3f6fc;
|
|
@@ -312,6 +312,9 @@
|
|
|
312
312
|
@colorFillSecondary: rgba(255, 255, 255, 0.12);
|
|
313
313
|
@colorFillTertiary: rgba(255, 255, 255, 0.08);
|
|
314
314
|
@colorFillQuaternary: rgba(255, 255, 255, 0.04);
|
|
315
|
+
@colorBgSolid: rgba(255, 255, 255, 0.95);
|
|
316
|
+
@colorBgSolidHover: rgb(255, 255, 255);
|
|
317
|
+
@colorBgSolidActive: rgba(255, 255, 255, 0.9);
|
|
315
318
|
@colorBgLayout: #000000;
|
|
316
319
|
@colorBgContainer: #141414;
|
|
317
320
|
@colorBgElevated: #1f1f1f;
|
|
@@ -339,6 +342,7 @@
|
|
|
339
342
|
@colorSuccessTextActive: #0e845d;
|
|
340
343
|
@colorErrorBg: #2b1416;
|
|
341
344
|
@colorErrorBgHover: #44191a;
|
|
345
|
+
@colorErrorBgFilledHover: #421a1b;
|
|
342
346
|
@colorErrorBgActive: #591f1f;
|
|
343
347
|
@colorErrorBorder: #591f1f;
|
|
344
348
|
@colorErrorBorderHover: #7b2525;
|
|
@@ -428,7 +432,7 @@
|
|
|
428
432
|
@colorErrorOutline: rgba(250, 20, 40, 0.1);
|
|
429
433
|
@colorWarningOutline: rgba(180, 93, 0, 0.15);
|
|
430
434
|
@fontSizeIcon: 12;
|
|
431
|
-
@lineWidthFocus:
|
|
435
|
+
@lineWidthFocus: 3;
|
|
432
436
|
@controlOutlineWidth: 2;
|
|
433
437
|
@controlInteractiveSize: 16;
|
|
434
438
|
@controlItemBgHover: rgba(255, 255, 255, 0.08);
|
|
@@ -312,6 +312,9 @@
|
|
|
312
312
|
@colorFillSecondary: #e2e8f3;
|
|
313
313
|
@colorFillTertiary: #f3f6fc;
|
|
314
314
|
@colorFillQuaternary: #f8fafe;
|
|
315
|
+
@colorBgSolid: rgb(0, 0, 0);
|
|
316
|
+
@colorBgSolidHover: rgba(0, 0, 0, 0.75);
|
|
317
|
+
@colorBgSolidActive: rgba(0, 0, 0, 0.95);
|
|
315
318
|
@colorBgLayout: #f3f6fc;
|
|
316
319
|
@colorBgContainer: #ffffff;
|
|
317
320
|
@colorBgElevated: #ffffff;
|
|
@@ -339,6 +342,7 @@
|
|
|
339
342
|
@colorSuccessTextActive: #00b378;
|
|
340
343
|
@colorErrorBg: #ffebeb;
|
|
341
344
|
@colorErrorBgHover: #ffd6d6;
|
|
345
|
+
@colorErrorBgFilledHover: #ffd7d3;
|
|
342
346
|
@colorErrorBgActive: #ffbcb5;
|
|
343
347
|
@colorErrorBorder: #ffb3b3;
|
|
344
348
|
@colorErrorBorderHover: #ff7575;
|
|
@@ -372,22 +376,22 @@
|
|
|
372
376
|
@fontSizeSM: 12;
|
|
373
377
|
@fontSizeLG: 16;
|
|
374
378
|
@fontSizeXL: 20;
|
|
375
|
-
@fontSizeHeading1:
|
|
376
|
-
@fontSizeHeading2:
|
|
377
|
-
@fontSizeHeading3:
|
|
378
|
-
@fontSizeHeading4:
|
|
379
|
-
@fontSizeHeading5:
|
|
379
|
+
@fontSizeHeading1: 38;
|
|
380
|
+
@fontSizeHeading2: 30;
|
|
381
|
+
@fontSizeHeading3: 24;
|
|
382
|
+
@fontSizeHeading4: 20;
|
|
383
|
+
@fontSizeHeading5: 16;
|
|
380
384
|
@lineHeight: 1.5714285714285714;
|
|
381
385
|
@lineHeightLG: 1.5;
|
|
382
386
|
@lineHeightSM: 1.6666666666666667;
|
|
383
387
|
@fontHeight: 22;
|
|
384
388
|
@fontHeightLG: 24;
|
|
385
389
|
@fontHeightSM: 20;
|
|
386
|
-
@lineHeightHeading1: 1.
|
|
387
|
-
@lineHeightHeading2: 1.
|
|
388
|
-
@lineHeightHeading3: 1.
|
|
389
|
-
@lineHeightHeading4: 1.
|
|
390
|
-
@lineHeightHeading5: 1.
|
|
390
|
+
@lineHeightHeading1: 1.2105263157894737;
|
|
391
|
+
@lineHeightHeading2: 1.2666666666666666;
|
|
392
|
+
@lineHeightHeading3: 1.3333333333333333;
|
|
393
|
+
@lineHeightHeading4: 1.4;
|
|
394
|
+
@lineHeightHeading5: 1.5;
|
|
391
395
|
@sizeXXL: 48;
|
|
392
396
|
@sizeXL: 32;
|
|
393
397
|
@sizeLG: 24;
|
|
@@ -430,7 +434,7 @@
|
|
|
430
434
|
@colorErrorOutline: rgba(255, 5, 5, 0.08);
|
|
431
435
|
@colorWarningOutline: rgba(255, 164, 19, 0.11);
|
|
432
436
|
@fontSizeIcon: 12;
|
|
433
|
-
@lineWidthFocus:
|
|
437
|
+
@lineWidthFocus: 3;
|
|
434
438
|
@controlOutlineWidth: 2;
|
|
435
439
|
@controlInteractiveSize: 16;
|
|
436
440
|
@controlItemBgHover: #f3f6fc;
|