@oceanbase/design 0.2.13 → 0.2.14
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/genComponentStyleHook.d.ts +3 -1
- package/es/_util/genComponentStyleHook.js +2 -2
- package/es/alert/index.js +2 -3
- package/es/alert/style/index.js +21 -4
- package/es/button/index.d.ts +1 -1
- package/es/button/index.js +2 -3
- package/es/card/index.js +2 -3
- package/es/card/style/index.js +2 -2
- package/es/config-provider/index.d.ts +12 -3
- package/es/config-provider/index.js +3 -1
- package/es/descriptions/index.js +5 -7
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/lottie/index.d.ts +16 -0
- package/es/lottie/index.js +65 -0
- package/es/modal/index.d.ts +1 -1
- package/es/modal/index.js +8 -5
- package/es/modal/style/index.js +21 -4
- package/es/spin/assets/spin-gray.json +1 -0
- package/es/spin/assets/spin.json +1 -0
- package/es/spin/index.d.ts +11 -0
- package/es/spin/index.js +49 -1
- package/es/spin/style/index.d.ts +13 -0
- package/es/spin/style/index.js +70 -0
- package/es/table/index.d.ts +2 -2
- package/es/table/index.js +8 -4
- package/es/tabs/index.js +5 -4
- package/es/tabs/style/index.d.ts +2 -1
- package/es/theme/index.d.ts +0 -48
- package/es/theme/index.js +5 -3
- package/es/theme/internal.d.ts +1 -0
- package/es/theme/internal.js +1 -0
- package/es/tooltip/MouseTooltip.js +1 -1
- package/lib/_util/genComponentStyleHook.d.ts +3 -1
- package/lib/_util/genComponentStyleHook.js +8 -4
- package/lib/alert/index.js +2 -3
- package/lib/alert/style/index.js +20 -1
- package/lib/button/index.d.ts +1 -1
- package/lib/button/index.js +2 -2
- package/lib/card/index.js +2 -3
- package/lib/card/style/index.js +5 -7
- package/lib/config-provider/index.d.ts +12 -3
- package/lib/config-provider/index.js +2 -1
- package/lib/descriptions/index.js +4 -5
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/lottie/index.d.ts +16 -0
- package/lib/lottie/index.js +79 -0
- package/lib/modal/index.d.ts +1 -1
- package/lib/modal/index.js +7 -3
- package/lib/modal/style/index.js +26 -1
- package/lib/spin/assets/spin-gray.json +1 -0
- package/lib/spin/assets/spin.json +1 -0
- package/lib/spin/index.d.ts +11 -0
- package/lib/spin/index.js +63 -1
- package/lib/spin/style/index.d.ts +13 -0
- package/lib/spin/style/index.js +105 -0
- package/lib/table/index.d.ts +2 -2
- package/lib/table/index.js +7 -4
- package/lib/tabs/index.js +2 -2
- package/lib/tabs/style/index.d.ts +2 -1
- package/lib/theme/index.d.ts +0 -48
- package/lib/theme/index.js +3 -4
- package/lib/theme/internal.d.ts +1 -0
- package/lib/theme/internal.js +23 -0
- package/lib/tooltip/MouseTooltip.js +1 -1
- package/package.json +10 -9
package/lib/table/index.d.ts
CHANGED
|
@@ -24,12 +24,12 @@ export interface TableProps<T> extends AntTableProps<T> {
|
|
|
24
24
|
declare function Table<T>(props: TableProps<T>): ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
25
25
|
declare namespace Table {
|
|
26
26
|
var SELECTION_COLUMN: {};
|
|
27
|
-
var EXPAND_COLUMN:
|
|
27
|
+
var EXPAND_COLUMN: {};
|
|
28
28
|
var SELECTION_ALL: "SELECT_ALL";
|
|
29
29
|
var SELECTION_INVERT: "SELECT_INVERT";
|
|
30
30
|
var SELECTION_NONE: "SELECT_NONE";
|
|
31
31
|
var Column: typeof import("antd/es/table/Column").default;
|
|
32
32
|
var ColumnGroup: typeof import("antd/es/table/ColumnGroup").default;
|
|
33
|
-
var Summary
|
|
33
|
+
var Summary;
|
|
34
34
|
}
|
|
35
35
|
export default Table;
|
package/lib/table/index.js
CHANGED
|
@@ -65,13 +65,12 @@ function Table(props) {
|
|
|
65
65
|
};
|
|
66
66
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
67
67
|
const prefixCls = getPrefixCls("table", customizePrefixCls);
|
|
68
|
-
const { wrapSSR
|
|
68
|
+
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
69
69
|
const tableCls = (0, import_classnames.default)(
|
|
70
70
|
{
|
|
71
71
|
[`${prefixCls}-expandable`]: !(0, import_lodash.isEmpty)(expandable)
|
|
72
72
|
},
|
|
73
|
-
className
|
|
74
|
-
hashId
|
|
73
|
+
className
|
|
75
74
|
);
|
|
76
75
|
const [openPopver, setOpenPopver] = (0, import_react.useState)(false);
|
|
77
76
|
const [currentSelectedRowKeys, setCurrentSelectedRowKeys] = (0, import_react.useState)();
|
|
@@ -121,7 +120,10 @@ function Table(props) {
|
|
|
121
120
|
}, [currentSelectedRows]);
|
|
122
121
|
const renderOptionsBar = (total, range) => {
|
|
123
122
|
if ((0, import_lodash.isEmpty)(rowSelection) || (0, import_lodash.isEmpty)(currentSelectedRowKeys)) {
|
|
124
|
-
return
|
|
123
|
+
return (
|
|
124
|
+
// @ts-ignore
|
|
125
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, pagination && (pagination == null ? void 0 : pagination.showTotal) && (pagination == null ? void 0 : pagination.showTotal(total, range)))
|
|
126
|
+
);
|
|
125
127
|
}
|
|
126
128
|
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-batch-operation-bar` }, /* @__PURE__ */ import_react.default.createElement(
|
|
127
129
|
import_antd.Space,
|
|
@@ -165,6 +167,7 @@ function Table(props) {
|
|
|
165
167
|
} : void 0,
|
|
166
168
|
pagination: pagination === false ? false : {
|
|
167
169
|
...pagination,
|
|
170
|
+
// @ts-ignore
|
|
168
171
|
showTotal: renderOptionsBar
|
|
169
172
|
}
|
|
170
173
|
}
|
package/lib/tabs/index.js
CHANGED
|
@@ -60,8 +60,8 @@ var Tabs = ({
|
|
|
60
60
|
var _a;
|
|
61
61
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
62
62
|
const prefixCls = getPrefixCls("tabs", customizePrefixCls);
|
|
63
|
-
const { wrapSSR
|
|
64
|
-
const tabsCls = (0, import_classnames.default)(className
|
|
63
|
+
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
64
|
+
const tabsCls = (0, import_classnames.default)(className);
|
|
65
65
|
const ref = (0, import_react.useRef)();
|
|
66
66
|
const isHorizontal = !tabPosition || tabPosition === "top" || tabPosition === "bottom";
|
|
67
67
|
let newItems = items == null ? void 0 : items.map((item) => {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
3
3
|
export type TabsToken = FullToken<'Tabs'>;
|
|
4
|
-
export
|
|
4
|
+
export type CardToken = FullToken<'Card'>;
|
|
5
|
+
export declare const genTagStyle: GenerateStyle<TabsToken | CardToken>;
|
|
5
6
|
declare const _default: (prefixCls: string) => {
|
|
6
7
|
wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
7
8
|
hashId: string;
|
package/lib/theme/index.d.ts
CHANGED
|
@@ -50,54 +50,6 @@ declare const _default: {
|
|
|
50
50
|
gold: string;
|
|
51
51
|
};
|
|
52
52
|
defaultConfig: {
|
|
53
|
-
defaultSeed: {
|
|
54
|
-
colorPrimary: string;
|
|
55
|
-
colorInfo: string;
|
|
56
|
-
colorSuccess: string;
|
|
57
|
-
colorWarning: string;
|
|
58
|
-
colorError: string;
|
|
59
|
-
borderRadius: number;
|
|
60
|
-
blue: string;
|
|
61
|
-
green: string;
|
|
62
|
-
yellow: string;
|
|
63
|
-
red: string;
|
|
64
|
-
colorTextBase: string;
|
|
65
|
-
colorBgBase: string;
|
|
66
|
-
colorLink: string;
|
|
67
|
-
fontFamily: string;
|
|
68
|
-
fontFamilyCode: string;
|
|
69
|
-
fontSize: number;
|
|
70
|
-
lineWidth: number;
|
|
71
|
-
lineType: string;
|
|
72
|
-
sizeUnit: number;
|
|
73
|
-
sizeStep: number;
|
|
74
|
-
sizePopupArrow: number;
|
|
75
|
-
controlHeight: number;
|
|
76
|
-
zIndexBase: number;
|
|
77
|
-
zIndexPopupBase: number;
|
|
78
|
-
opacityImage: number;
|
|
79
|
-
motionUnit: number;
|
|
80
|
-
motionBase: number;
|
|
81
|
-
motionEaseOutCirc: string;
|
|
82
|
-
motionEaseInOutCirc: string;
|
|
83
|
-
motionEaseInOut: string;
|
|
84
|
-
motionEaseOutBack: string;
|
|
85
|
-
motionEaseInBack: string;
|
|
86
|
-
motionEaseInQuint: string;
|
|
87
|
-
motionEaseOutQuint: string;
|
|
88
|
-
motionEaseOut: string;
|
|
89
|
-
wireframe: boolean;
|
|
90
|
-
motion: boolean;
|
|
91
|
-
purple: string;
|
|
92
|
-
cyan: string;
|
|
93
|
-
magenta: string;
|
|
94
|
-
pink: string;
|
|
95
|
-
orange: string;
|
|
96
|
-
volcano: string;
|
|
97
|
-
geekblue: string;
|
|
98
|
-
lime: string;
|
|
99
|
-
gold: string;
|
|
100
|
-
};
|
|
101
53
|
token: import("antd/es/theme/internal").SeedToken;
|
|
102
54
|
hashed: boolean;
|
|
103
55
|
};
|
package/lib/theme/index.js
CHANGED
|
@@ -40,13 +40,12 @@ var defaultSeed = {
|
|
|
40
40
|
yellow: "#ffac33",
|
|
41
41
|
red: "#ff4b4b"
|
|
42
42
|
};
|
|
43
|
+
var defaultConfig = import_antd.theme.defaultConfig;
|
|
44
|
+
defaultConfig.token = defaultSeed;
|
|
43
45
|
var theme_default = {
|
|
44
46
|
...import_antd.theme,
|
|
45
47
|
defaultSeed,
|
|
46
|
-
defaultConfig
|
|
47
|
-
...import_antd.theme.defaultConfig,
|
|
48
|
-
defaultSeed
|
|
49
|
-
},
|
|
48
|
+
defaultConfig,
|
|
50
49
|
components: {
|
|
51
50
|
InputNumber: {
|
|
52
51
|
handleVisible: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/theme/internal';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/theme/internal.ts
|
|
17
|
+
var internal_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(internal_exports);
|
|
19
|
+
__reExport(internal_exports, require("antd/es/theme/internal"), module.exports);
|
|
20
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
21
|
+
0 && (module.exports = {
|
|
22
|
+
...require("antd/es/theme/internal")
|
|
23
|
+
});
|
|
@@ -101,7 +101,7 @@ var MouseTooltip = ({
|
|
|
101
101
|
},
|
|
102
102
|
...restProps
|
|
103
103
|
},
|
|
104
|
-
/* @__PURE__ */ import_react.default.createElement("div", { ref }, title)
|
|
104
|
+
/* @__PURE__ */ import_react.default.createElement("div", { ref }, typeof title === "function" ? title() : title)
|
|
105
105
|
));
|
|
106
106
|
};
|
|
107
107
|
if (process.env.NODE_ENV !== "production") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/design",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "The Design System of OceanBase",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"OceanBase",
|
|
@@ -36,24 +36,25 @@
|
|
|
36
36
|
"postbuild": "cp src/style/reset.css dist/"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@ant-design/cssinjs": "^1.16.
|
|
40
|
-
"@oceanbase/icons": "^0.2.
|
|
41
|
-
"@oceanbase/util": "^0.2.
|
|
39
|
+
"@ant-design/cssinjs": "^1.16.2",
|
|
40
|
+
"@oceanbase/icons": "^0.2.4",
|
|
41
|
+
"@oceanbase/util": "^0.2.6",
|
|
42
42
|
"ahooks": "^2.10.14",
|
|
43
|
-
"antd": "^5.8.
|
|
43
|
+
"antd": "^5.8.3",
|
|
44
44
|
"classnames": "^2.3.2",
|
|
45
45
|
"lodash": "^4.17.21",
|
|
46
|
-
"
|
|
46
|
+
"lottie-web": "^5.12.2",
|
|
47
|
+
"rc-util": "^5.36.0",
|
|
47
48
|
"react-sticky-mouse-tooltip": "^0.0.1"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
|
-
"@babel/cli": "^7.22.
|
|
51
|
-
"@babel/preset-env": "^7.22.
|
|
51
|
+
"@babel/cli": "^7.22.10",
|
|
52
|
+
"@babel/preset-env": "^7.22.10",
|
|
52
53
|
"antd-token-previewer": "^1.1.0"
|
|
53
54
|
},
|
|
54
55
|
"peerDependencies": {
|
|
55
56
|
"react": "^16.9.0",
|
|
56
57
|
"react-dom": "^16.9.0"
|
|
57
58
|
},
|
|
58
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "21e309021edf43301bfc7de6e93b131afc5c6f47"
|
|
59
60
|
}
|