@oceanbase/ui 0.2.13 → 0.2.15
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/ui.min.css +1 -1
- package/dist/ui.min.js +1 -1
- package/es/Action/Item.js +6 -8
- package/es/BackgroundTaskManager/index.d.ts +5 -5
- package/es/BackgroundTaskManager/index.js +1 -1
- package/es/BasicLayout/Header.d.ts +1 -1
- package/es/BasicLayout/Header.js +4 -4
- package/es/BasicLayout/index.d.ts +3 -2
- package/es/BasicLayout/index.js +6 -7
- package/es/BasicLayout/style/index.d.ts +7 -3
- package/es/BatchOperationBar/index.d.ts +3 -3
- package/es/Boundary/constant.d.ts +4 -4
- package/es/ContentWithIcon/index.d.ts +21 -0
- package/es/ContentWithIcon/index.js +110 -0
- package/{lib/ContentWithQuestion → es/ContentWithIcon}/index.less +5 -1
- package/es/DocDialog/index.js +1 -2
- package/es/FullscreenBox/index.d.ts +1 -1
- package/es/Highlight/index.d.ts +2 -2
- package/es/LocaleDropdown/index.d.ts +1 -1
- package/es/Login/ActivateForm.d.ts +1 -1
- package/es/Login/ActivateForm.js +5 -5
- package/es/Login/LoginForm.d.ts +1 -1
- package/es/Login/RegisterForm.d.ts +1 -1
- package/es/Login/RegisterForm.js +5 -5
- package/es/Login/index.d.ts +2 -2
- package/es/Lottie/index.d.ts +2 -1
- package/es/NavMenu/index.js +5 -6
- package/es/PageContainer/ItemRender.js +3 -3
- package/es/PageContainer/index.d.ts +2 -2
- package/es/PageContainer/index.js +2 -3
- package/es/PageContainer/style/index.d.ts +6 -2
- package/es/Password/index.d.ts +2 -2
- package/es/Ranger/QuickPicker.d.ts +2 -1
- package/es/Ranger/Ranger.d.ts +3 -3
- package/es/Ranger/index.d.ts +1 -32
- package/es/SideTip/index.d.ts +4 -4
- package/es/TagSelect/Group.d.ts +23 -0
- package/es/TagSelect/Group.js +121 -0
- package/es/TagSelect/Item.d.ts +17 -0
- package/es/TagSelect/Item.js +84 -0
- package/es/TagSelect/TagSelectContext.d.ts +13 -0
- package/es/TagSelect/TagSelectContext.js +3 -0
- package/es/TagSelect/index.d.ts +6 -0
- package/es/TagSelect/index.js +6 -0
- package/es/TagSelect/style/index.d.ts +9 -0
- package/es/TagSelect/style/index.js +98 -0
- package/es/TreeSearch/index.d.ts +1 -1
- package/es/Welcome/index.d.ts +2 -2
- package/es/_util/genComponentStyleHook.d.ts +6 -2
- package/es/_util/genComponentStyleHook.js +5 -5
- package/es/_util/useNavigate.d.ts +2 -0
- package/es/_util/useNavigate.js +7 -0
- package/es/index.d.ts +2 -1
- package/es/index.js +3 -2
- package/es/interface.d.ts +1 -1
- package/es/locale/en-US.js +2 -2
- package/es/locale/index.d.ts +2 -2
- package/es/locale/zh-CN.js +2 -2
- package/es/locale/zh-TW.js +2 -2
- package/lib/Action/Item.js +5 -7
- package/lib/BackgroundTaskManager/index.d.ts +5 -5
- package/lib/BackgroundTaskManager/index.js +1 -1
- package/lib/BasicLayout/Header.d.ts +1 -1
- package/lib/BasicLayout/Header.js +4 -4
- package/lib/BasicLayout/index.d.ts +3 -2
- package/lib/BasicLayout/index.js +6 -6
- package/lib/BasicLayout/style/index.d.ts +7 -3
- package/lib/BatchOperationBar/index.d.ts +3 -3
- package/lib/Boundary/constant.d.ts +4 -4
- package/lib/ContentWithIcon/index.d.ts +21 -0
- package/lib/ContentWithIcon/index.js +130 -0
- package/{es/ContentWithQuestion → lib/ContentWithIcon}/index.less +5 -1
- package/lib/DocDialog/index.js +1 -2
- package/lib/FullscreenBox/index.d.ts +1 -1
- package/lib/Highlight/index.d.ts +2 -2
- package/lib/LocaleDropdown/index.d.ts +1 -1
- package/lib/Login/ActivateForm.d.ts +1 -1
- package/lib/Login/ActivateForm.js +5 -5
- package/lib/Login/LoginForm.d.ts +1 -1
- package/lib/Login/RegisterForm.d.ts +1 -1
- package/lib/Login/RegisterForm.js +5 -5
- package/lib/Login/index.d.ts +2 -2
- package/lib/Lottie/index.d.ts +2 -1
- package/lib/NavMenu/index.js +5 -6
- package/lib/PageContainer/ItemRender.js +3 -3
- package/lib/PageContainer/index.d.ts +2 -2
- package/lib/PageContainer/index.js +2 -3
- package/lib/PageContainer/style/index.d.ts +6 -2
- package/lib/Password/index.d.ts +2 -2
- package/lib/Ranger/QuickPicker.d.ts +2 -1
- package/lib/Ranger/Ranger.d.ts +3 -3
- package/lib/Ranger/index.d.ts +1 -32
- package/lib/SideTip/index.d.ts +4 -4
- package/lib/TagSelect/Group.d.ts +23 -0
- package/lib/TagSelect/Group.js +128 -0
- package/lib/TagSelect/Item.d.ts +17 -0
- package/lib/TagSelect/Item.js +108 -0
- package/lib/TagSelect/TagSelectContext.d.ts +13 -0
- package/lib/TagSelect/TagSelectContext.js +27 -0
- package/lib/TagSelect/index.d.ts +6 -0
- package/lib/TagSelect/index.js +37 -0
- package/lib/TagSelect/style/index.d.ts +9 -0
- package/lib/TagSelect/style/index.js +152 -0
- package/lib/TreeSearch/index.d.ts +1 -1
- package/lib/Welcome/index.d.ts +2 -2
- package/lib/_util/genComponentStyleHook.d.ts +6 -2
- package/lib/_util/genComponentStyleHook.js +3 -3
- package/lib/_util/useNavigate.d.ts +2 -0
- package/lib/_util/{useHistory.js → useNavigate.js} +10 -11
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -3
- package/lib/interface.d.ts +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/index.d.ts +2 -2
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/package.json +10 -11
- package/es/ContentWithQuestion/index.d.ts +0 -13
- package/es/ContentWithQuestion/index.js +0 -46
- package/es/_util/useHistory.d.ts +0 -4
- package/es/_util/useHistory.js +0 -13
- package/lib/ContentWithQuestion/index.d.ts +0 -13
- package/lib/ContentWithQuestion/index.js +0 -76
- package/lib/_util/useHistory.d.ts +0 -4
|
@@ -0,0 +1,152 @@
|
|
|
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/TagSelect/style/index.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
default: () => style_default,
|
|
23
|
+
genTagSelectStyle: () => genTagSelectStyle
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
|
+
var genSizeStyle = (height, fontSize) => {
|
|
28
|
+
return {
|
|
29
|
+
paddingTop: `${height}px`,
|
|
30
|
+
paddingBottom: `${height}px`,
|
|
31
|
+
fontSize
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
var genColoredStyle = (borderColor, backgroundColor, color) => {
|
|
35
|
+
return {
|
|
36
|
+
borderColor,
|
|
37
|
+
backgroundColor,
|
|
38
|
+
color
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
var genMultipleStyle = (color, token) => {
|
|
42
|
+
return {
|
|
43
|
+
position: "absolute",
|
|
44
|
+
top: "1px",
|
|
45
|
+
right: "1px",
|
|
46
|
+
borderTop: `12px solid ${color}`,
|
|
47
|
+
borderLeft: `12px solid transparent`,
|
|
48
|
+
borderTopRightRadius: token.borderRadiusSM
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
var genImgCoverStyle = (width, height) => {
|
|
52
|
+
return {
|
|
53
|
+
width,
|
|
54
|
+
height
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
var genTagSelectStyle = (token) => {
|
|
58
|
+
const {
|
|
59
|
+
componentCls
|
|
60
|
+
} = token;
|
|
61
|
+
return {
|
|
62
|
+
[`${componentCls}-title`]: {
|
|
63
|
+
fontSize: token.fontSize,
|
|
64
|
+
color: token.colorText,
|
|
65
|
+
margin: `${token.marginXXS}px 0`
|
|
66
|
+
},
|
|
67
|
+
[`${componentCls}-wrapper`]: {
|
|
68
|
+
position: "relative",
|
|
69
|
+
display: "inline-block",
|
|
70
|
+
fontSize: token.fontSize,
|
|
71
|
+
color: token.colorTextLabel,
|
|
72
|
+
background: token.colorWhite,
|
|
73
|
+
border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,
|
|
74
|
+
borderRadius: token.borderRadius,
|
|
75
|
+
marginRight: token.marginXS,
|
|
76
|
+
padding: `${token.paddingXXS}px ${token.paddingContentHorizontal}px`,
|
|
77
|
+
cursor: "pointer",
|
|
78
|
+
[`${componentCls}-input`]: {
|
|
79
|
+
width: 0,
|
|
80
|
+
height: 0,
|
|
81
|
+
opacity: 0,
|
|
82
|
+
pointerEvents: "none"
|
|
83
|
+
},
|
|
84
|
+
"&:last-child": {
|
|
85
|
+
margin: 0
|
|
86
|
+
},
|
|
87
|
+
[`&:has(${componentCls}-cover)`]: {
|
|
88
|
+
padding: 0,
|
|
89
|
+
...genImgCoverStyle("76px", "40px")
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
[`${componentCls}-cover`]: {
|
|
93
|
+
display: "inline-block",
|
|
94
|
+
width: "100%",
|
|
95
|
+
height: "100%",
|
|
96
|
+
img: {
|
|
97
|
+
height: "calc(100% - 2px)",
|
|
98
|
+
width: "calc(100% - 2px)",
|
|
99
|
+
borderRadius: token.borderRadius,
|
|
100
|
+
marginLeft: "1px",
|
|
101
|
+
marginTop: "1px"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
[`${componentCls}-large${componentCls}-img`]: {
|
|
105
|
+
...genImgCoverStyle("228px", "120px"),
|
|
106
|
+
marginRight: "16px"
|
|
107
|
+
},
|
|
108
|
+
[`${componentCls}-small${componentCls}-img`]: genImgCoverStyle("76px", "32px"),
|
|
109
|
+
[`${componentCls}-large`]: genSizeStyle(token.paddingContentVerticalSM, token.fontSize),
|
|
110
|
+
[`${componentCls}-small`]: genSizeStyle(0, token.fontSize),
|
|
111
|
+
[`${componentCls}-wrapper:not(${componentCls}-disabled):hover`]: {
|
|
112
|
+
color: token.colorPrimaryTextHover
|
|
113
|
+
},
|
|
114
|
+
[`${componentCls}-checked`]: genColoredStyle(token.blue, token.colorPrimaryBg, token.colorPrimaryText),
|
|
115
|
+
[`${componentCls}-wrapper${componentCls}-checked:not(${componentCls}-disabled):focus-within`]: {
|
|
116
|
+
boxShadow: `0 1px 3px 0px #000`,
|
|
117
|
+
borderColor: `${token.colorPrimary}`
|
|
118
|
+
},
|
|
119
|
+
[`${componentCls}-checked:not(${componentCls}-disabled)`]: {
|
|
120
|
+
"&:hover": {
|
|
121
|
+
...genColoredStyle(token.colorInfoBorder, "#EBF1FF", token.colorInfoTextHover),
|
|
122
|
+
[`${componentCls}-inner`]: {
|
|
123
|
+
borderTopColor: `${token.colorPrimaryTextHover} !important`
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
[`${componentCls}-disabled:not(${componentCls}-checked)`]: {
|
|
128
|
+
...genColoredStyle(token.colorBorder, "#F6F8FE", "#CDD5E3"),
|
|
129
|
+
cursor: "not-allowed"
|
|
130
|
+
},
|
|
131
|
+
[`${componentCls}-disabled${componentCls}-checked`]: {
|
|
132
|
+
cursor: "not-allowed",
|
|
133
|
+
...genColoredStyle(token.colorBorder, "#E2E8F3", token.colorTextTertiary)
|
|
134
|
+
},
|
|
135
|
+
[`${componentCls}-checked${componentCls}-disabled.multiple`]: {
|
|
136
|
+
[`${componentCls}-inner`]: genMultipleStyle("#CDD5E3", token)
|
|
137
|
+
},
|
|
138
|
+
[`${componentCls}-checked:not(${componentCls}-disabled).multiple`]: {
|
|
139
|
+
[`${componentCls}-inner`]: genMultipleStyle(token.colorPrimary, token)
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
var style_default = (prefixCls) => {
|
|
144
|
+
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("TagSelect", (token) => {
|
|
145
|
+
return [genTagSelectStyle(token)];
|
|
146
|
+
});
|
|
147
|
+
return useStyle(prefixCls);
|
|
148
|
+
};
|
|
149
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
150
|
+
0 && (module.exports = {
|
|
151
|
+
genTagSelectStyle
|
|
152
|
+
});
|
package/lib/Welcome/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ButtonProps } from '
|
|
1
|
+
import type { ButtonProps } from '@oceanbase/design/es/button';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import './index.less';
|
|
4
4
|
export interface IntroduceItem {
|
|
@@ -19,7 +19,7 @@ export interface WelcomeLocale {
|
|
|
19
19
|
helpTitle: string;
|
|
20
20
|
defaultOperation: string;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type StepType = 'default' | 'card';
|
|
23
23
|
export interface WelcomeProps {
|
|
24
24
|
title: string;
|
|
25
25
|
description: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ProAliasToken } from '@ant-design/pro-components';
|
|
2
|
-
import type { GenerateStyle } from '
|
|
2
|
+
import type { GenerateStyle } from '@oceanbase/design/es/theme';
|
|
3
|
+
import React from 'react';
|
|
3
4
|
export interface OBToken extends ProAliasToken {
|
|
4
5
|
/** Wrap component class with `.` prefix */
|
|
5
6
|
componentCls: string;
|
|
@@ -11,4 +12,7 @@ export interface OBToken extends ProAliasToken {
|
|
|
11
12
|
antCls: string;
|
|
12
13
|
zIndexPopup: number;
|
|
13
14
|
}
|
|
14
|
-
export declare function genComponentStyleHook(componentName: string, styleFn: GenerateStyle<OBToken>): (prefixCls: string) =>
|
|
15
|
+
export declare function genComponentStyleHook(componentName: string, styleFn: GenerateStyle<OBToken>): (prefixCls: string) => {
|
|
16
|
+
wrapSSR: (node: React.ReactElement<any, string | React.JSXElementConstructor<any>>) => React.JSX.Element;
|
|
17
|
+
hashId: string;
|
|
18
|
+
};
|
|
@@ -37,10 +37,10 @@ var import_react = __toESM(require("react"));
|
|
|
37
37
|
var import_design = require("@oceanbase/design");
|
|
38
38
|
function genComponentStyleHook(componentName, styleFn) {
|
|
39
39
|
return (prefixCls) => {
|
|
40
|
+
const { getPrefixCls, iconPrefixCls } = import_react.default.useContext(import_design.ConfigProvider.ConfigContext);
|
|
41
|
+
const rootPrefixCls = getPrefixCls();
|
|
42
|
+
const componentCls = `.${prefixCls}`;
|
|
40
43
|
return (0, import_pro_components.useStyle)(componentName, (token) => {
|
|
41
|
-
const { getPrefixCls, iconPrefixCls } = import_react.default.useContext(import_design.ConfigProvider.ConfigContext);
|
|
42
|
-
const rootPrefixCls = getPrefixCls();
|
|
43
|
-
const componentCls = `.${prefixCls}`;
|
|
44
44
|
const mergedToken = {
|
|
45
45
|
...token,
|
|
46
46
|
componentCls,
|
|
@@ -16,16 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// src/_util/
|
|
20
|
-
var
|
|
21
|
-
__export(
|
|
22
|
-
default: () =>
|
|
19
|
+
// src/_util/useNavigate.ts
|
|
20
|
+
var useNavigate_exports = {};
|
|
21
|
+
__export(useNavigate_exports, {
|
|
22
|
+
default: () => useNavigate_default
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
24
|
+
module.exports = __toCommonJS(useNavigate_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var import_design = require("@oceanbase/design");
|
|
27
|
+
var useNavigate_default = () => {
|
|
28
|
+
const { navigate } = (0, import_react.useContext)(import_design.ConfigProvider.ExtendedConfigContext);
|
|
29
|
+
return navigate;
|
|
31
30
|
};
|
package/lib/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { default as BasicLayout } from './BasicLayout';
|
|
|
8
8
|
export { default as BatchOperationBar } from './BatchOperationBar';
|
|
9
9
|
export { default as Boundary } from './Boundary';
|
|
10
10
|
export * from './constant';
|
|
11
|
-
export { default as
|
|
11
|
+
export { default as ContentWithIcon } from './ContentWithIcon';
|
|
12
12
|
export { default as Dialog } from './Dialog';
|
|
13
13
|
export { default as DocDialog } from './DocDialog';
|
|
14
14
|
export { default as FullscreenBox } from './FullscreenBox';
|
|
@@ -26,3 +26,4 @@ export { default as SideTip } from './SideTip';
|
|
|
26
26
|
export { default as TaskGraph } from './TaskGraph';
|
|
27
27
|
export { default as TreeSearch } from './TreeSearch';
|
|
28
28
|
export { default as Welcome } from './Welcome';
|
|
29
|
+
export { default as TagSelect } from './TagSelect';
|
package/lib/index.js
CHANGED
|
@@ -36,7 +36,7 @@ __export(src_exports, {
|
|
|
36
36
|
BasicLayout: () => import_BasicLayout.default,
|
|
37
37
|
BatchOperationBar: () => import_BatchOperationBar.default,
|
|
38
38
|
Boundary: () => import_Boundary.default,
|
|
39
|
-
|
|
39
|
+
ContentWithIcon: () => import_ContentWithIcon.default,
|
|
40
40
|
Dialog: () => import_Dialog.default,
|
|
41
41
|
DocDialog: () => import_DocDialog.default,
|
|
42
42
|
FullscreenBox: () => import_FullscreenBox.default,
|
|
@@ -50,6 +50,7 @@ __export(src_exports, {
|
|
|
50
50
|
Password: () => import_Password.default,
|
|
51
51
|
Ranger: () => import_Ranger.default,
|
|
52
52
|
SideTip: () => import_SideTip.default,
|
|
53
|
+
TagSelect: () => import_TagSelect.default,
|
|
53
54
|
TaskGraph: () => import_TaskGraph.default,
|
|
54
55
|
TreeSearch: () => import_TreeSearch.default,
|
|
55
56
|
Welcome: () => import_Welcome.default,
|
|
@@ -65,7 +66,7 @@ var import_BasicLayout = __toESM(require("./BasicLayout"));
|
|
|
65
66
|
var import_BatchOperationBar = __toESM(require("./BatchOperationBar"));
|
|
66
67
|
var import_Boundary = __toESM(require("./Boundary"));
|
|
67
68
|
__reExport(src_exports, require("./constant"), module.exports);
|
|
68
|
-
var
|
|
69
|
+
var import_ContentWithIcon = __toESM(require("./ContentWithIcon"));
|
|
69
70
|
var import_Dialog = __toESM(require("./Dialog"));
|
|
70
71
|
var import_DocDialog = __toESM(require("./DocDialog"));
|
|
71
72
|
var import_FullscreenBox = __toESM(require("./FullscreenBox"));
|
|
@@ -83,6 +84,7 @@ var import_SideTip = __toESM(require("./SideTip"));
|
|
|
83
84
|
var import_TaskGraph = __toESM(require("./TaskGraph"));
|
|
84
85
|
var import_TreeSearch = __toESM(require("./TreeSearch"));
|
|
85
86
|
var import_Welcome = __toESM(require("./Welcome"));
|
|
87
|
+
var import_TagSelect = __toESM(require("./TagSelect"));
|
|
86
88
|
// Annotate the CommonJS export names for ESM import in node:
|
|
87
89
|
0 && (module.exports = {
|
|
88
90
|
Action,
|
|
@@ -91,7 +93,7 @@ var import_Welcome = __toESM(require("./Welcome"));
|
|
|
91
93
|
BasicLayout,
|
|
92
94
|
BatchOperationBar,
|
|
93
95
|
Boundary,
|
|
94
|
-
|
|
96
|
+
ContentWithIcon,
|
|
95
97
|
Dialog,
|
|
96
98
|
DocDialog,
|
|
97
99
|
FullscreenBox,
|
|
@@ -105,6 +107,7 @@ var import_Welcome = __toESM(require("./Welcome"));
|
|
|
105
107
|
Password,
|
|
106
108
|
Ranger,
|
|
107
109
|
SideTip,
|
|
110
|
+
TagSelect,
|
|
108
111
|
TaskGraph,
|
|
109
112
|
TreeSearch,
|
|
110
113
|
Welcome,
|
package/lib/interface.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Locale = 'zh-TW' | 'zh-CN' | 'en-US';
|
package/lib/locale/en-US.js
CHANGED
|
@@ -32,7 +32,7 @@ __export(en_US_exports, {
|
|
|
32
32
|
default: () => en_US_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(en_US_exports);
|
|
35
|
-
var import_en_US = __toESM(require("
|
|
35
|
+
var import_en_US = __toESM(require("@oceanbase/design/es/locale/en-US"));
|
|
36
36
|
var import_en_US2 = __toESM(require("../BasicLayout/locale/en-US"));
|
|
37
37
|
var import_en_US3 = __toESM(require("../BatchOperationBar/locale/en-US"));
|
|
38
38
|
var import_en_US4 = __toESM(require("../Boundary/locale/en-US"));
|
package/lib/locale/index.d.ts
CHANGED
package/lib/locale/zh-CN.js
CHANGED
|
@@ -32,7 +32,7 @@ __export(zh_CN_exports, {
|
|
|
32
32
|
default: () => zh_CN_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(zh_CN_exports);
|
|
35
|
-
var import_zh_CN = __toESM(require("
|
|
35
|
+
var import_zh_CN = __toESM(require("@oceanbase/design/es/locale/zh-CN"));
|
|
36
36
|
var import_zh_CN2 = __toESM(require("../BasicLayout/locale/zh-CN"));
|
|
37
37
|
var import_zh_CN3 = __toESM(require("../BatchOperationBar/locale/zh-CN"));
|
|
38
38
|
var import_zh_CN4 = __toESM(require("../Dialog/locale/zh-CN"));
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -32,7 +32,7 @@ __export(zh_TW_exports, {
|
|
|
32
32
|
default: () => zh_TW_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(zh_TW_exports);
|
|
35
|
-
var import_zh_TW = __toESM(require("
|
|
35
|
+
var import_zh_TW = __toESM(require("@oceanbase/design/es/locale/zh-TW"));
|
|
36
36
|
var import_zh_TW2 = __toESM(require("../BasicLayout/locale/zh-TW"));
|
|
37
37
|
var import_zh_TW3 = __toESM(require("../BatchOperationBar/locale/zh-TW"));
|
|
38
38
|
var import_zh_TW4 = __toESM(require("../Dialog/locale/zh-TW"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
4
|
"description": "The UI library based on OceanBase Design",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"OceanBase",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"build": "father build"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ant-design/cssinjs": "^1.
|
|
39
|
-
"@ant-design/pro-components": "^2.6.
|
|
40
|
-
"@oceanbase/design": "^0.2.
|
|
41
|
-
"@oceanbase/icons": "^0.2.
|
|
42
|
-
"@oceanbase/util": "^0.2.
|
|
38
|
+
"@ant-design/cssinjs": "^1.16.2",
|
|
39
|
+
"@ant-design/pro-components": "^2.6.12",
|
|
40
|
+
"@oceanbase/design": "^0.2.14",
|
|
41
|
+
"@oceanbase/icons": "^0.2.4",
|
|
42
|
+
"@oceanbase/util": "^0.2.6",
|
|
43
43
|
"ahooks": "^2.10.14",
|
|
44
44
|
"classnames": "^2.3.2",
|
|
45
45
|
"dayjs": "^1.11.9",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"moment": "^2.29.4",
|
|
53
53
|
"path-to-regexp": "^6.2.1",
|
|
54
54
|
"randexp": "^0.5.3",
|
|
55
|
-
"rc-util": "^5.
|
|
55
|
+
"rc-util": "^5.36.0",
|
|
56
56
|
"react-copy-to-clipboard": "^5.1.0",
|
|
57
57
|
"react-json-view": "^1.21.3",
|
|
58
58
|
"react-split-pane": "^0.1.92",
|
|
59
|
-
"screenfull": "^
|
|
59
|
+
"screenfull": "^6.0.2"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@antv/g6": "3.4.10"
|
|
@@ -64,8 +64,7 @@
|
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@antv/g6": "3.4.10",
|
|
66
66
|
"react": "^16.9.0",
|
|
67
|
-
"react-dom": "^16.9.0"
|
|
68
|
-
"react-router-dom": ">=5.2.0"
|
|
67
|
+
"react-dom": "^16.9.0"
|
|
69
68
|
},
|
|
70
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "21e309021edf43301bfc7de6e93b131afc5c6f47"
|
|
71
70
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
export interface ContentWithQuestionProps {
|
|
4
|
-
content?: React.ReactNode;
|
|
5
|
-
tooltip?: any;
|
|
6
|
-
prefixIcon?: React.ReactNode | boolean;
|
|
7
|
-
suffixIcon?: React.ReactNode;
|
|
8
|
-
className?: string;
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
|
-
onClick?: (e: React.SyntheticEvent) => void;
|
|
11
|
-
}
|
|
12
|
-
declare const ContentWithQuestion: React.FC<ContentWithQuestionProps>;
|
|
13
|
-
export default ContentWithQuestion;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["content", "tooltip", "prefixIcon", "suffixIcon", "className", "children"];
|
|
3
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
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; }
|
|
8
|
-
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; }
|
|
9
|
-
import { QuestionCircleOutlined } from '@oceanbase/icons';
|
|
10
|
-
import { Space, Tooltip } from '@oceanbase/design';
|
|
11
|
-
import classNames from 'classnames';
|
|
12
|
-
import React, { isValidElement } from 'react';
|
|
13
|
-
import { getPrefix } from "../_util";
|
|
14
|
-
import "./index.less";
|
|
15
|
-
var prefix = getPrefix('content-with-question');
|
|
16
|
-
var ContentWithQuestion = function ContentWithQuestion(_ref) {
|
|
17
|
-
var _classNames;
|
|
18
|
-
var content = _ref.content,
|
|
19
|
-
tooltip = _ref.tooltip,
|
|
20
|
-
_ref$prefixIcon = _ref.prefixIcon,
|
|
21
|
-
prefixIcon = _ref$prefixIcon === void 0 ? null : _ref$prefixIcon,
|
|
22
|
-
_ref$suffixIcon = _ref.suffixIcon,
|
|
23
|
-
suffixIcon = _ref$suffixIcon === void 0 ? /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
|
|
24
|
-
className: "".concat(prefix, "-help")
|
|
25
|
-
}) : _ref$suffixIcon,
|
|
26
|
-
className = _ref.className,
|
|
27
|
-
children = _ref.children,
|
|
28
|
-
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
-
// FIXME: antd 已经废弃 icon type 的用法,该组件也需要做相应处理,后面将会是传入 Icon 的形式而非 type
|
|
30
|
-
var getIcon = function getIcon(iconConfig) {
|
|
31
|
-
return iconConfig ? /*#__PURE__*/React.createElement(Tooltip, tooltip, /*#__PURE__*/isValidElement(iconConfig) ? iconConfig : /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
|
|
32
|
-
className: "".concat(prefix, "-help")
|
|
33
|
-
})) : null;
|
|
34
|
-
};
|
|
35
|
-
return /*#__PURE__*/React.createElement("span", _extends({
|
|
36
|
-
className: classNames((_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "-item"), true), _defineProperty(_classNames, className, !!className), _classNames))
|
|
37
|
-
}, restProps), /*#__PURE__*/React.createElement(Space, null, getIcon(prefixIcon === true ? /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
|
|
38
|
-
className: "".concat(prefix, "-help"),
|
|
39
|
-
style: {
|
|
40
|
-
marginRight: 4
|
|
41
|
-
}
|
|
42
|
-
}) : prefixIcon), /*#__PURE__*/React.createElement("span", {
|
|
43
|
-
"data-testid": "content"
|
|
44
|
-
}, content !== null && content !== void 0 ? content : children), getIcon(suffixIcon)));
|
|
45
|
-
};
|
|
46
|
-
export default ContentWithQuestion;
|
package/es/_util/useHistory.d.ts
DELETED
package/es/_util/useHistory.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
// react-router-dom v5
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
|
|
5
|
-
// react-router-dom v6
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
useNavigate } from 'react-router-dom';
|
|
8
|
-
export default (function () {
|
|
9
|
-
return {
|
|
10
|
-
// push: useHistory ? useHistory().push : useNavigate ? useNavigate() : null,
|
|
11
|
-
push: useNavigate ? useNavigate() : null
|
|
12
|
-
};
|
|
13
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
export interface ContentWithQuestionProps {
|
|
4
|
-
content?: React.ReactNode;
|
|
5
|
-
tooltip?: any;
|
|
6
|
-
prefixIcon?: React.ReactNode | boolean;
|
|
7
|
-
suffixIcon?: React.ReactNode;
|
|
8
|
-
className?: string;
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
|
-
onClick?: (e: React.SyntheticEvent) => void;
|
|
11
|
-
}
|
|
12
|
-
declare const ContentWithQuestion: React.FC<ContentWithQuestionProps>;
|
|
13
|
-
export default ContentWithQuestion;
|
|
@@ -1,76 +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/ContentWithQuestion/index.tsx
|
|
30
|
-
var ContentWithQuestion_exports = {};
|
|
31
|
-
__export(ContentWithQuestion_exports, {
|
|
32
|
-
default: () => ContentWithQuestion_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(ContentWithQuestion_exports);
|
|
35
|
-
var import_icons = require("@oceanbase/icons");
|
|
36
|
-
var import_design = require("@oceanbase/design");
|
|
37
|
-
var import_classnames = __toESM(require("classnames"));
|
|
38
|
-
var import_react = __toESM(require("react"));
|
|
39
|
-
var import_util = require("../_util");
|
|
40
|
-
var import_index = require("./index.less");
|
|
41
|
-
var prefix = (0, import_util.getPrefix)("content-with-question");
|
|
42
|
-
var ContentWithQuestion = ({
|
|
43
|
-
content,
|
|
44
|
-
tooltip,
|
|
45
|
-
prefixIcon = null,
|
|
46
|
-
suffixIcon = /* @__PURE__ */ import_react.default.createElement(import_icons.QuestionCircleOutlined, { className: `${prefix}-help` }),
|
|
47
|
-
className,
|
|
48
|
-
children,
|
|
49
|
-
...restProps
|
|
50
|
-
}) => {
|
|
51
|
-
const getIcon = (iconConfig) => {
|
|
52
|
-
return iconConfig ? /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { ...tooltip }, (0, import_react.isValidElement)(iconConfig) ? iconConfig : /* @__PURE__ */ import_react.default.createElement(import_icons.QuestionCircleOutlined, { className: `${prefix}-help` })) : null;
|
|
53
|
-
};
|
|
54
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
55
|
-
"span",
|
|
56
|
-
{
|
|
57
|
-
className: (0, import_classnames.default)({
|
|
58
|
-
[`${prefix}-item`]: true,
|
|
59
|
-
[className]: !!className
|
|
60
|
-
}),
|
|
61
|
-
...restProps
|
|
62
|
-
},
|
|
63
|
-
/* @__PURE__ */ import_react.default.createElement(import_design.Space, null, getIcon(
|
|
64
|
-
prefixIcon === true ? /* @__PURE__ */ import_react.default.createElement(
|
|
65
|
-
import_icons.QuestionCircleOutlined,
|
|
66
|
-
{
|
|
67
|
-
className: `${prefix}-help`,
|
|
68
|
-
style: {
|
|
69
|
-
marginRight: 4
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
) : prefixIcon
|
|
73
|
-
), /* @__PURE__ */ import_react.default.createElement("span", { "data-testid": "content" }, content ?? children), getIcon(suffixIcon))
|
|
74
|
-
);
|
|
75
|
-
};
|
|
76
|
-
var ContentWithQuestion_default = ContentWithQuestion;
|