@oceanbase/design 0.2.17 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/design.min.js +1 -1
- package/es/alert/index.js +4 -2
- package/es/badge/index.d.ts +2 -3
- package/es/badge/index.js +47 -16
- package/es/badge/style/index.js +15 -13
- package/es/button/index.js +8 -2
- package/es/card/Card.d.ts +1 -0
- package/es/card/Card.js +1 -0
- package/es/card/index.d.ts +1 -0
- package/es/card/index.js +15 -9
- package/es/collapse/index.d.ts +1 -0
- package/es/collapse/index.js +1 -0
- package/es/config-provider/SizeContext.d.ts +1 -0
- package/es/config-provider/SizeContext.js +1 -0
- package/es/config-provider/index.d.ts +4 -1
- package/es/config-provider/index.js +25 -18
- package/es/config-provider/navigate.d.ts +2 -2
- package/es/descriptions/Item.d.ts +1 -1
- package/es/descriptions/index.d.ts +2 -1
- package/es/descriptions/index.js +9 -6
- package/es/form/FormItem.js +5 -3
- package/es/index.d.ts +2 -0
- package/es/lottie/index.js +2 -1
- package/es/modal/Modal.js +8 -2
- package/es/modal/Progress.d.ts +1 -1
- package/es/modal/Progress.js +23 -10
- package/es/spin/assets/spin-gray.json +1031 -1
- package/es/spin/assets/spin.json +1031 -1
- package/es/spin/index.js +6 -4
- package/es/table/index.js +54 -32
- package/es/tabs/TabPane.d.ts +1 -1
- package/es/tabs/hooks/useLegacyItems.js +10 -6
- package/es/tabs/index.d.ts +1 -1
- package/es/tabs/index.js +12 -9
- package/es/tooltip/MouseTooltip.js +37 -29
- package/es/tooltip/index.js +21 -14
- package/lib/badge/index.d.ts +2 -3
- package/lib/badge/index.js +33 -17
- package/lib/badge/style/index.js +25 -22
- package/lib/card/Card.d.ts +1 -0
- package/lib/{statistic/interface.js → card/Card.js} +5 -5
- package/lib/card/index.d.ts +1 -0
- package/lib/card/index.js +2 -0
- package/lib/collapse/index.d.ts +1 -0
- package/lib/{callapse → collapse}/index.js +5 -5
- package/lib/config-provider/SizeContext.d.ts +1 -0
- package/lib/config-provider/SizeContext.js +23 -0
- package/lib/config-provider/index.d.ts +4 -1
- package/lib/config-provider/index.js +30 -24
- package/lib/config-provider/navigate.d.ts +2 -2
- package/lib/descriptions/Item.d.ts +1 -1
- package/lib/descriptions/index.d.ts +2 -1
- package/lib/index.d.ts +2 -0
- package/lib/modal/Progress.d.ts +1 -1
- package/lib/spin/assets/spin-gray.json +1031 -1
- package/lib/spin/assets/spin.json +1031 -1
- package/lib/tabs/TabPane.d.ts +1 -1
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tooltip/index.js +32 -30
- package/lib/tooltip/style/index.js +10 -6
- package/package.json +6 -5
- package/es/badge/IconBadge.d.ts +0 -10
- package/es/badge/IconBadge.js +0 -37
- package/es/badge/style/waiting.png +0 -0
- package/es/callapse/index.d.ts +0 -1
- package/es/callapse/index.js +0 -1
- package/es/statistic/interface.js +0 -1
- package/lib/badge/IconBadge.d.ts +0 -10
- package/lib/badge/IconBadge.js +0 -53
- package/lib/badge/style/waiting.png +0 -0
- package/lib/callapse/index.d.ts +0 -1
package/lib/tabs/TabPane.d.ts
CHANGED
package/lib/tabs/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface TabsProps extends AntTabsProps {
|
|
|
12
12
|
export type TabsPosition = AntTabsPosition;
|
|
13
13
|
declare const Tabs: {
|
|
14
14
|
({ children, items, defaultActiveKey, activeKey: activeKeyProp, onChange, size, type, tabPosition, prefixCls: customizePrefixCls, className, ...restProps }: TabsProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
15
|
-
TabPane: React.FC<import("
|
|
15
|
+
TabPane: React.FC<import("./TabPane").TabPaneProps>;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
export default Tabs;
|
package/lib/tooltip/index.js
CHANGED
|
@@ -48,7 +48,7 @@ var getTooltipTypeList = () => [
|
|
|
48
48
|
{
|
|
49
49
|
type: "light",
|
|
50
50
|
color: import_static_function.token.colorText,
|
|
51
|
-
backgroundColor:
|
|
51
|
+
backgroundColor: import_static_function.token.colorBgElevated
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
type: "success",
|
|
@@ -110,37 +110,39 @@ var Tooltip = ({
|
|
|
110
110
|
const titleWithCloseIcon = /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { className: `${prefixCls}-close-icon-wrap` }, titleNode, CloseIconNode);
|
|
111
111
|
const typeList = getTooltipTypeList();
|
|
112
112
|
const typeItem = typeList.find((item) => item.type === type);
|
|
113
|
-
return wrapSSR(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
113
|
+
return wrapSSR(
|
|
114
|
+
mouseFollow ? /* @__PURE__ */ import_react.default.createElement(
|
|
115
|
+
import_MouseTooltip.default,
|
|
116
|
+
{
|
|
117
|
+
title,
|
|
118
|
+
color: color || (typeItem == null ? void 0 : typeItem.backgroundColor),
|
|
119
|
+
overlayInnerStyle: {
|
|
120
|
+
color: typeItem == null ? void 0 : typeItem.color,
|
|
121
|
+
...overlayInnerStyle
|
|
122
|
+
},
|
|
123
|
+
className: tooltipCls,
|
|
124
|
+
...restProps
|
|
121
125
|
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
126
|
+
children
|
|
127
|
+
) : /* @__PURE__ */ import_react.default.createElement(
|
|
128
|
+
import_antd.Tooltip,
|
|
129
|
+
{
|
|
130
|
+
title: hasCloseIcon ? titleWithCloseIcon : title,
|
|
131
|
+
color: color || (typeItem == null ? void 0 : typeItem.backgroundColor),
|
|
132
|
+
open,
|
|
133
|
+
onOpenChange: (newOpen) => {
|
|
134
|
+
setInnerOpen(newOpen);
|
|
135
|
+
},
|
|
136
|
+
overlayInnerStyle: {
|
|
137
|
+
color: typeItem == null ? void 0 : typeItem.color,
|
|
138
|
+
...overlayInnerStyle
|
|
139
|
+
},
|
|
140
|
+
className: tooltipCls,
|
|
141
|
+
...restProps
|
|
134
142
|
},
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
},
|
|
139
|
-
className: tooltipCls,
|
|
140
|
-
...restProps
|
|
141
|
-
},
|
|
142
|
-
children
|
|
143
|
-
));
|
|
143
|
+
children
|
|
144
|
+
)
|
|
145
|
+
);
|
|
144
146
|
};
|
|
145
147
|
if (process.env.NODE_ENV !== "production") {
|
|
146
148
|
Tooltip.displayName = import_antd.Tooltip.displayName;
|
|
@@ -41,12 +41,16 @@ var genTooltipStyle = (token) => {
|
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
var style_default = (prefixCls) => {
|
|
44
|
-
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)(
|
|
45
|
+
"Tooltip",
|
|
46
|
+
(token) => {
|
|
47
|
+
return [genTooltipStyle(token)];
|
|
48
|
+
},
|
|
49
|
+
({ zIndexPopupBase, colorBgSpotlight }) => ({
|
|
50
|
+
zIndexPopup: zIndexPopupBase + 70,
|
|
51
|
+
colorBgDefault: colorBgSpotlight
|
|
52
|
+
})
|
|
53
|
+
);
|
|
50
54
|
return useStyle(prefixCls);
|
|
51
55
|
};
|
|
52
56
|
// Annotate the CommonJS export names for ESM import in node:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/design",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.19",
|
|
4
4
|
"description": "The Design System of OceanBase",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oceanbase",
|
|
@@ -36,13 +36,14 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@ant-design/cssinjs": "^1.17.0",
|
|
39
|
-
"@oceanbase/icons": "^0.2.
|
|
39
|
+
"@oceanbase/icons": "^0.2.7",
|
|
40
40
|
"@oceanbase/util": "^0.2.8",
|
|
41
41
|
"ahooks": "^2.10.14",
|
|
42
42
|
"antd": "^5.9.0",
|
|
43
43
|
"classnames": "^2.3.2",
|
|
44
44
|
"lodash": "^4.17.21",
|
|
45
45
|
"lottie-web": "^5.12.2",
|
|
46
|
+
"prop-types": "^15.8.1",
|
|
46
47
|
"rc-util": "^5.37.0",
|
|
47
48
|
"react-sticky-mouse-tooltip": "^0.0.1"
|
|
48
49
|
},
|
|
@@ -52,8 +53,8 @@
|
|
|
52
53
|
"antd-token-previewer": "^1.1.0"
|
|
53
54
|
},
|
|
54
55
|
"peerDependencies": {
|
|
55
|
-
"react": "
|
|
56
|
-
"react-dom": "
|
|
56
|
+
"react": ">=16.9.0",
|
|
57
|
+
"react-dom": ">=16.9.0"
|
|
57
58
|
},
|
|
58
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "3d55f9a8967c0b20491eb7d154f53db8943c1522"
|
|
59
60
|
}
|
package/es/badge/IconBadge.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface IconBadgeProps {
|
|
3
|
-
prefixCls: any;
|
|
4
|
-
className?: string;
|
|
5
|
-
status?: string;
|
|
6
|
-
text?: React.ReactNode;
|
|
7
|
-
icon?: boolean | React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
declare const IconBadge: ({ icon, status, text, className, ...restProps }: IconBadgeProps) => React.JSX.Element;
|
|
10
|
-
export default IconBadge;
|
package/es/badge/IconBadge.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
var _excluded = ["icon", "status", "text", "className"];
|
|
2
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
3
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { Space } from 'antd';
|
|
6
|
-
import { CloseCircleFilled, CheckCircleFilled, Loading3QuartersOutlined, StopFilled, ClockCircleFilled } from '@ant-design/icons';
|
|
7
|
-
// @ts-ignore
|
|
8
|
-
// import waitingIcon from './style/waiting.png';
|
|
9
|
-
var IconBadge = function IconBadge(_ref) {
|
|
10
|
-
var icon = _ref.icon,
|
|
11
|
-
status = _ref.status,
|
|
12
|
-
text = _ref.text,
|
|
13
|
-
className = _ref.className,
|
|
14
|
-
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
15
|
-
var classNameIcon = "".concat(className, "-status-icon ").concat(className, "-status-").concat(status);
|
|
16
|
-
var statusTextNode = !text ? /*#__PURE__*/React.createElement(React.Fragment, null) : /*#__PURE__*/React.createElement("span", {
|
|
17
|
-
className: "".concat(className, "-status-text")
|
|
18
|
-
}, text);
|
|
19
|
-
var iconMap = {
|
|
20
|
-
default: /*#__PURE__*/React.createElement(StopFilled, null),
|
|
21
|
-
processing: /*#__PURE__*/React.createElement(Loading3QuartersOutlined, {
|
|
22
|
-
style: {
|
|
23
|
-
display: 'inline-block',
|
|
24
|
-
animation: 'loadingCircle 1s infinite linear'
|
|
25
|
-
}
|
|
26
|
-
}),
|
|
27
|
-
success: /*#__PURE__*/React.createElement(CheckCircleFilled, null),
|
|
28
|
-
error: /*#__PURE__*/React.createElement(CloseCircleFilled, null),
|
|
29
|
-
warning: /*#__PURE__*/React.createElement(ClockCircleFilled, null)
|
|
30
|
-
};
|
|
31
|
-
return /*#__PURE__*/React.createElement(Space, {
|
|
32
|
-
className: "".concat(className)
|
|
33
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
34
|
-
className: classNameIcon
|
|
35
|
-
}, /*#__PURE__*/React.isValidElement(icon) ? icon : iconMap === null || iconMap === void 0 ? void 0 : iconMap[status]), statusTextNode);
|
|
36
|
-
};
|
|
37
|
-
export default IconBadge;
|
|
Binary file
|
package/es/callapse/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from 'antd/es/callapse';
|
package/es/callapse/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from 'antd/es/callapse';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from 'antd/es/statistic/interface';
|
package/lib/badge/IconBadge.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface IconBadgeProps {
|
|
3
|
-
prefixCls: any;
|
|
4
|
-
className?: string;
|
|
5
|
-
status?: string;
|
|
6
|
-
text?: React.ReactNode;
|
|
7
|
-
icon?: boolean | React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
declare const IconBadge: ({ icon, status, text, className, ...restProps }: IconBadgeProps) => React.JSX.Element;
|
|
10
|
-
export default IconBadge;
|
package/lib/badge/IconBadge.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
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
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
|
|
29
|
-
// src/badge/IconBadge.tsx
|
|
30
|
-
var IconBadge_exports = {};
|
|
31
|
-
__export(IconBadge_exports, {
|
|
32
|
-
default: () => IconBadge_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(IconBadge_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_antd = require("antd");
|
|
37
|
-
var import_icons = require("@ant-design/icons");
|
|
38
|
-
var IconBadge = ({ icon, status, text, className, ...restProps }) => {
|
|
39
|
-
const classNameIcon = `${className}-status-icon ${className}-status-${status}`;
|
|
40
|
-
const statusTextNode = !text ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null) : /* @__PURE__ */ import_react.default.createElement("span", { className: `${className}-status-text` }, text);
|
|
41
|
-
const iconMap = {
|
|
42
|
-
default: /* @__PURE__ */ import_react.default.createElement(import_icons.StopFilled, null),
|
|
43
|
-
processing: /* @__PURE__ */ import_react.default.createElement(import_icons.Loading3QuartersOutlined, { style: {
|
|
44
|
-
display: "inline-block",
|
|
45
|
-
animation: "loadingCircle 1s infinite linear"
|
|
46
|
-
} }),
|
|
47
|
-
success: /* @__PURE__ */ import_react.default.createElement(import_icons.CheckCircleFilled, null),
|
|
48
|
-
error: /* @__PURE__ */ import_react.default.createElement(import_icons.CloseCircleFilled, null),
|
|
49
|
-
warning: /* @__PURE__ */ import_react.default.createElement(import_icons.ClockCircleFilled, null)
|
|
50
|
-
};
|
|
51
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { className: `${className}` }, /* @__PURE__ */ import_react.default.createElement("span", { className: classNameIcon }, import_react.default.isValidElement(icon) ? icon : iconMap == null ? void 0 : iconMap[status]), statusTextNode);
|
|
52
|
-
};
|
|
53
|
-
var IconBadge_default = IconBadge;
|
|
Binary file
|
package/lib/callapse/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from 'antd/es/callapse';
|