@oceanbase/design 0.1.0 → 0.1.2
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.css +1 -1
- package/dist/design.min.js +1 -1
- package/es/BasicLayout/Header.d.ts +2 -2
- package/es/BasicLayout/Header.js +7 -8
- package/es/BasicLayout/index.d.ts +2 -2
- package/es/BasicLayout/index.js +9 -9
- package/es/BatchOperationBar/index.d.ts +1 -1
- package/es/Boundary/Components/Code.d.ts +1 -1
- package/es/Boundary/Components/Exception.d.ts +1 -1
- package/es/Boundary/index.d.ts +2 -2
- package/es/Dialog/index.d.ts +1 -1
- package/es/DocDialog/index.d.ts +2 -1
- package/es/DocDialog/index.js +2 -2
- package/es/FullscreenBox/index.d.ts +1 -1
- package/es/GraphToolbar/index.d.ts +2 -1
- package/es/Highlight/index.d.ts +1 -1
- package/es/Login/index.d.ts +1 -1
- package/es/NavMenu/index.js +4 -3
- package/es/PageContainer/ItemRender.d.ts +8 -0
- package/es/PageContainer/ItemRender.js +21 -0
- package/es/PageContainer/index.d.ts +2 -2
- package/es/PageContainer/index.js +14 -7
- package/es/PageContainer/index.less +4 -4
- package/es/Password/index.d.ts +2 -1
- package/es/Ranger/Ranger.d.ts +2 -1
- package/es/SideTip/index.d.ts +1 -1
- package/es/Table/index.d.ts +2 -1
- package/es/Table/style/index.js +1 -1
- package/es/TaskGraph/Graph.d.ts +2 -1
- package/es/TaskGraph/index.d.ts +2 -1
- package/es/Welcome/index.d.ts +1 -1
- package/es/Welcome/step.d.ts +2 -1
- package/es/_util/useHistory.d.ts +4 -0
- package/es/_util/useHistory.js +9 -0
- package/es/locale/LocaleWrapper.d.ts +2 -1
- package/lib/Action/Group.js +0 -2
- package/lib/Action/index.js +0 -2
- package/lib/Alert/index.js +0 -2
- package/lib/BasicLayout/Header.d.ts +2 -2
- package/lib/BasicLayout/Header.js +8 -11
- package/lib/BasicLayout/index.d.ts +2 -2
- package/lib/BasicLayout/index.js +8 -10
- package/lib/BasicLayout/locale/en-US.js +0 -2
- package/lib/BasicLayout/locale/zh-CN.js +0 -2
- package/lib/BasicLayout/locale/zh-TW.js +0 -2
- package/lib/BatchOperationBar/index.d.ts +1 -1
- package/lib/BatchOperationBar/index.js +0 -2
- package/lib/BatchOperationBar/locale/en-US.js +0 -2
- package/lib/BatchOperationBar/locale/zh-CN.js +0 -2
- package/lib/BatchOperationBar/locale/zh-TW.js +0 -2
- package/lib/Boundary/Components/Code.d.ts +1 -1
- package/lib/Boundary/Components/Exception.d.ts +1 -1
- package/lib/Boundary/Components/index.js +6 -0
- package/lib/Boundary/index.d.ts +2 -2
- package/lib/Boundary/index.js +0 -2
- package/lib/Boundary/locale/en-US.js +0 -2
- package/lib/Boundary/locale/zh-CN.js +0 -2
- package/lib/Boundary/locale/zh-TW.js +0 -2
- package/lib/Button/index.js +0 -2
- package/lib/Card/index.js +0 -2
- package/lib/ContentWithQuestion/index.js +0 -2
- package/lib/Descriptions/Item.js +0 -2
- package/lib/Descriptions/index.js +0 -2
- package/lib/Dialog/index.d.ts +1 -1
- package/lib/Dialog/index.js +0 -2
- package/lib/Dialog/locale/en-US.js +0 -2
- package/lib/Dialog/locale/zh-CN.js +0 -2
- package/lib/Dialog/locale/zh-TW.js +0 -2
- package/lib/DocDialog/index.d.ts +2 -1
- package/lib/DocDialog/index.js +3 -5
- package/lib/DocDialog/locale/en-US.js +0 -2
- package/lib/DocDialog/locale/zh-CN.js +0 -2
- package/lib/DocDialog/locale/zh-TW.js +0 -2
- package/lib/Form/FormItem.js +0 -2
- package/lib/Form/index.js +0 -2
- package/lib/FullscreenBox/index.d.ts +1 -1
- package/lib/FullscreenBox/index.js +0 -2
- package/lib/FullscreenBox/locale/en-US.js +0 -2
- package/lib/FullscreenBox/locale/zh-CN.js +0 -2
- package/lib/FullscreenBox/locale/zh-TW.js +0 -2
- package/lib/GraphToolbar/index.d.ts +2 -1
- package/lib/GraphToolbar/locale/en-US.js +0 -2
- package/lib/GraphToolbar/locale/zh-CN.js +0 -2
- package/lib/GraphToolbar/locale/zh-TW.js +0 -2
- package/lib/Highlight/DiffView/DiffCells.js +0 -2
- package/lib/Highlight/DiffView/index.js +0 -2
- package/lib/Highlight/HighlightCell.js +0 -2
- package/lib/Highlight/JsonView.js +0 -2
- package/lib/Highlight/index.d.ts +1 -1
- package/lib/Highlight/languages/bash.js +0 -2
- package/lib/Highlight/languages/cpp.js +0 -2
- package/lib/Highlight/languages/css.js +0 -2
- package/lib/Highlight/languages/dockerfile.js +0 -2
- package/lib/Highlight/languages/go.js +0 -2
- package/lib/Highlight/languages/groovy.js +0 -2
- package/lib/Highlight/languages/http.js +0 -2
- package/lib/Highlight/languages/java.js +0 -2
- package/lib/Highlight/languages/javascript.js +0 -2
- package/lib/Highlight/languages/json.js +0 -2
- package/lib/Highlight/languages/markdown.js +0 -2
- package/lib/Highlight/languages/nginx.js +0 -2
- package/lib/Highlight/languages/python.js +0 -2
- package/lib/Highlight/languages/ruby.js +0 -2
- package/lib/Highlight/languages/solidity.js +0 -2
- package/lib/Highlight/languages/sql.js +0 -2
- package/lib/Highlight/languages/typescript.js +0 -2
- package/lib/Highlight/languages/xml.js +0 -2
- package/lib/Highlight/languages/yaml.js +0 -2
- package/lib/Highlight/locale/en-US.js +0 -2
- package/lib/Highlight/locale/zh-CN.js +0 -2
- package/lib/Highlight/locale/zh-TW.js +0 -2
- package/lib/IconFont/index.js +0 -2
- package/lib/LocaleDropdown/index.js +0 -2
- package/lib/Login/ActivateForm.js +0 -2
- package/lib/Login/LoginForm.js +0 -2
- package/lib/Login/index.d.ts +1 -1
- package/lib/Login/index.js +0 -2
- package/lib/Login/locale/en-US.js +0 -2
- package/lib/Login/locale/zh-CN.js +0 -2
- package/lib/Login/locale/zh-TW.js +0 -2
- package/lib/Lottie/index.js +0 -2
- package/lib/Modal/index.js +0 -2
- package/lib/NavMenu/index.js +4 -5
- package/lib/PageContainer/ItemRender.d.ts +8 -0
- package/lib/{_util/itemRender.js → PageContainer/ItemRender.js} +21 -14
- package/lib/PageContainer/index.d.ts +2 -2
- package/lib/PageContainer/index.js +7 -9
- package/lib/PageContainer/index.less +4 -4
- package/lib/PageContainer/locale/en-US.js +0 -2
- package/lib/PageContainer/locale/zh-CN.js +0 -2
- package/lib/PageContainer/locale/zh-TW.js +0 -2
- package/lib/Password/Content.js +0 -2
- package/lib/Password/index.d.ts +2 -1
- package/lib/Password/index.js +0 -2
- package/lib/Password/locale/en-US.js +0 -2
- package/lib/Password/locale/zh-CN.js +0 -2
- package/lib/Password/locale/zh-TW.js +0 -2
- package/lib/Ranger/QuickPicker.js +0 -2
- package/lib/Ranger/Ranger.d.ts +2 -1
- package/lib/Ranger/Ranger.js +0 -2
- package/lib/Ranger/index.js +0 -2
- package/lib/Ranger/locale/en-US.js +0 -2
- package/lib/Ranger/locale/zh-CN.js +0 -2
- package/lib/Ranger/locale/zh-TW.js +0 -2
- package/lib/SideTip/Dragger.js +2 -4
- package/lib/SideTip/IconLoading.js +0 -2
- package/lib/SideTip/index.d.ts +1 -1
- package/lib/SideTip/index.js +0 -2
- package/lib/SideTip/locale/en-US.js +0 -2
- package/lib/SideTip/locale/zh-CN.js +0 -2
- package/lib/SideTip/locale/zh-TW.js +0 -2
- package/lib/Table/index.d.ts +2 -1
- package/lib/Table/index.js +0 -2
- package/lib/Table/locale/en-US.js +0 -2
- package/lib/Table/locale/zh-CN.js +0 -2
- package/lib/Table/locale/zh-TW.js +0 -2
- package/lib/Table/style/index.js +1 -1
- package/lib/Tabs/TabPane.js +0 -2
- package/lib/Tabs/hooks/useInkBar.js +0 -2
- package/lib/Tabs/hooks/useLegacyItems.js +0 -2
- package/lib/Tabs/index.js +0 -2
- package/lib/TaskGraph/Graph.d.ts +2 -1
- package/lib/TaskGraph/Graph.js +0 -2
- package/lib/TaskGraph/index.d.ts +2 -1
- package/lib/TaskGraph/index.js +0 -2
- package/lib/TaskGraph/locale/en-US.js +0 -2
- package/lib/TaskGraph/locale/zh-CN.js +0 -2
- package/lib/TaskGraph/locale/zh-TW.js +0 -2
- package/lib/TaskGraph/register.js +0 -2
- package/lib/Tooltip/MouseTooltip.js +0 -2
- package/lib/TreeSearch/index.js +0 -2
- package/lib/Welcome/index.d.ts +1 -1
- package/lib/Welcome/index.js +0 -2
- package/lib/Welcome/locale/en-US.js +0 -2
- package/lib/Welcome/locale/zh-CN.js +0 -2
- package/lib/Welcome/locale/zh-TW.js +0 -2
- package/lib/Welcome/step.d.ts +2 -1
- package/lib/Welcome/step.js +0 -2
- package/lib/_util/useHistory.d.ts +4 -0
- package/lib/_util/useHistory.js +30 -0
- package/lib/index.js +5 -1
- package/lib/locale/LocaleWrapper.d.ts +2 -1
- package/lib/locale/LocaleWrapper.js +0 -2
- package/lib/locale/en-US.js +0 -2
- package/lib/locale/zh-CN.js +0 -2
- package/lib/locale/zh-TW.js +0 -2
- package/lib/theme/index.js +0 -2
- package/package.json +11 -8
- package/README.md +0 -22
- package/es/_util/itemRender.d.ts +0 -2
- package/es/_util/itemRender.js +0 -12
- package/lib/_util/itemRender.d.ts +0 -2
package/lib/Welcome/step.js
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
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/_util/useHistory.ts
|
|
20
|
+
var useHistory_exports = {};
|
|
21
|
+
__export(useHistory_exports, {
|
|
22
|
+
default: () => useHistory_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(useHistory_exports);
|
|
25
|
+
var import_react_router_dom = require("react-router-dom");
|
|
26
|
+
var useHistory_default = () => {
|
|
27
|
+
return {
|
|
28
|
+
push: import_react_router_dom.useHistory ? (0, import_react_router_dom.useHistory)().push : import_react_router_dom.useNavigate ? (0, import_react_router_dom.useNavigate)() : null
|
|
29
|
+
};
|
|
30
|
+
};
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import hoistNonReactStatic from 'hoist-non-react-statics';
|
|
2
3
|
export interface LocaleWrapperProps {
|
|
3
4
|
locale?: any;
|
|
4
5
|
}
|
|
@@ -6,5 +7,5 @@ export interface LocaleWrapperInput {
|
|
|
6
7
|
componentName: string;
|
|
7
8
|
defaultLocale: any;
|
|
8
9
|
}
|
|
9
|
-
declare const _default: ({ componentName, defaultLocale }: LocaleWrapperInput) => <BaseProps extends LocaleWrapperProps>(BaseComponent: React.ComponentType<BaseProps>) =>
|
|
10
|
+
declare const _default: ({ componentName, defaultLocale }: LocaleWrapperInput) => <BaseProps extends LocaleWrapperProps>(BaseComponent: React.ComponentType<BaseProps>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<BaseProps> & React.RefAttributes<React.ComponentType<BaseProps>>> & hoistNonReactStatic.NonReactStatics<React.ComponentType<BaseProps>, {}>;
|
|
10
11
|
export default _default;
|
|
@@ -67,5 +67,3 @@ var LocaleWrapper_default = ({ componentName, defaultLocale }) => (BaseComponent
|
|
|
67
67
|
);
|
|
68
68
|
return (0, import_hoist_non_react_statics.default)(ForwardComponent, BaseComponent);
|
|
69
69
|
};
|
|
70
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
71
|
-
0 && (module.exports = {});
|
package/lib/locale/en-US.js
CHANGED
package/lib/locale/zh-CN.js
CHANGED
package/lib/locale/zh-TW.js
CHANGED
package/lib/theme/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/design",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "The Design System for OceanBase",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"OceanBase",
|
|
@@ -30,13 +30,14 @@
|
|
|
30
30
|
"build": "father build",
|
|
31
31
|
"build:watch": "father build --watch",
|
|
32
32
|
"ci": "npm run build",
|
|
33
|
-
"deploy": "npm run
|
|
34
|
-
"dev": "npx babel --presets @babel/preset-env ./src/theme/index.ts --out-file
|
|
35
|
-
"
|
|
36
|
-
"docs:deploy": "gh-pages -d docs-dist",
|
|
33
|
+
"deploy": "npm run site:build && npm run site:deploy",
|
|
34
|
+
"dev": "npx babel --presets @babel/preset-env ./src/theme/index.ts --out-file ./.dumi/tmp/plugin-theme-less/theme.js && UMI_ENV=theme dumi dev",
|
|
35
|
+
"prepare": "dumi setup",
|
|
37
36
|
"prepublishOnly": "npm run build",
|
|
38
37
|
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
|
|
39
38
|
"publish": "npm publish --access public",
|
|
39
|
+
"site:build": "dumi build",
|
|
40
|
+
"site:deploy": "gh-pages -d site-dist",
|
|
40
41
|
"start": "npm run dev",
|
|
41
42
|
"test": "umi-test",
|
|
42
43
|
"test:coverage": "umi-test --coverage",
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
"classnames": "^2.2.6",
|
|
60
61
|
"dayjs": "^1.11.6",
|
|
61
62
|
"diff": "^5.1.0",
|
|
63
|
+
"dumi-theme-antd": "^0.2.5",
|
|
62
64
|
"highlight.js": "^11.7.0",
|
|
63
65
|
"highlightjs-solidity": "^2.0.6",
|
|
64
66
|
"hoist-non-react-statics": "^3.3.2",
|
|
@@ -69,7 +71,6 @@
|
|
|
69
71
|
"randexp": "^0.5.3",
|
|
70
72
|
"react-copy-to-clipboard": "^5.0.4",
|
|
71
73
|
"react-json-view": "^1.21.3",
|
|
72
|
-
"react-router-dom": "^5.2.0",
|
|
73
74
|
"react-split-pane": "^0.1.91",
|
|
74
75
|
"react-sticky-mouse-tooltip": "^0.0.1",
|
|
75
76
|
"screenfull": "^5.0.0"
|
|
@@ -85,7 +86,7 @@
|
|
|
85
86
|
"@umijs/test": "^3.0.5",
|
|
86
87
|
"antd": "^5.0.0",
|
|
87
88
|
"antd-token-previewer": "^1.1.0-22",
|
|
88
|
-
"dumi": "^
|
|
89
|
+
"dumi": "^2.0.0",
|
|
89
90
|
"father": "^4.0.0-rc.2",
|
|
90
91
|
"gh-pages": "^3.0.0",
|
|
91
92
|
"lint-staged": "^10.0.7",
|
|
@@ -95,13 +96,15 @@
|
|
|
95
96
|
"react-color": "^2.19.3",
|
|
96
97
|
"react-dom": "^16.9.0",
|
|
97
98
|
"react-fast-marquee": "^1.5.2",
|
|
99
|
+
"react-router-dom": "^5.2.0",
|
|
98
100
|
"yorkie": "^2.0.0"
|
|
99
101
|
},
|
|
100
102
|
"peerDependencies": {
|
|
101
103
|
"@antv/g6": "3.4.10",
|
|
102
104
|
"antd": "^5.0.0",
|
|
103
105
|
"react": "^16.9.0",
|
|
104
|
-
"react-dom": "^16.9.0"
|
|
106
|
+
"react-dom": "^16.9.0",
|
|
107
|
+
"react-router-dom": ">=5.2.0"
|
|
105
108
|
},
|
|
106
109
|
"gitHooks": {
|
|
107
110
|
"pre-commit": "lint-staged"
|
package/README.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# OceanBase 组件库
|
|
2
|
-
|
|
3
|
-
## 准备工作
|
|
4
|
-
|
|
5
|
-
- 安装 [Node.js](https://nodejs.org/en/)
|
|
6
|
-
|
|
7
|
-
## 开发
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
# 安装依赖
|
|
11
|
-
$ npm install
|
|
12
|
-
|
|
13
|
-
# 开发 library
|
|
14
|
-
$ npm run dev
|
|
15
|
-
|
|
16
|
-
# 打包 library
|
|
17
|
-
$ npm run build
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## 参考
|
|
21
|
-
|
|
22
|
-
- [Dumi 组件库文档工具](https://v1.d.umijs.org/)
|
package/es/_util/itemRender.d.ts
DELETED
package/es/_util/itemRender.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Link } from 'react-router-dom';
|
|
3
|
-
export default function itemRender(route, params, routes, paths) {
|
|
4
|
-
var last = routes.indexOf(route) === routes.length - 1;
|
|
5
|
-
// title > breadcrumbName
|
|
6
|
-
var title = route.title || route.breadcrumbName;
|
|
7
|
-
// href > path
|
|
8
|
-
var path = route.href || route.path;
|
|
9
|
-
return last ? /*#__PURE__*/React.createElement("span", null, title) : /*#__PURE__*/React.createElement(Link, {
|
|
10
|
-
to: path
|
|
11
|
-
}, title);
|
|
12
|
-
}
|