@oceanbase/ui 0.4.14 → 0.4.16
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/Boundary/index.d.ts +1 -1
- package/es/DateRanger/index.less +2 -1
- package/es/Highlight/index.d.ts +1 -1
- package/es/Login/index.less +1 -0
- package/es/ProCard/index.js +18 -2
- package/lib/Boundary/index.d.ts +1 -1
- package/lib/DateRanger/index.less +2 -1
- package/lib/Highlight/index.d.ts +1 -1
- package/lib/Login/index.less +1 -0
- package/lib/ProCard/index.js +17 -1
- package/package.json +8 -8
package/es/Boundary/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import './index.less';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
Code: any;
|
|
5
|
-
Function: import("react").FC<import("./Components").IBoundaryFunction>;
|
|
5
|
+
Function: import("react").FC<import("./Components/Function").IBoundaryFunction>;
|
|
6
6
|
Exception: any;
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
package/es/DateRanger/index.less
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
cursor: pointer;
|
|
7
7
|
|
|
8
8
|
.@{prefix}-wrapper {
|
|
9
|
+
background-color: @colorBgContainer;
|
|
9
10
|
border: 1px solid @colorBorder;
|
|
10
11
|
box-sizing: border-box;
|
|
11
12
|
display: flex;
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
display: flex;
|
|
72
73
|
padding: 4px;
|
|
73
74
|
gap: 4px;
|
|
74
|
-
background-color:
|
|
75
|
+
background-color: @colorBgContainer;
|
|
75
76
|
background-clip: padding-box;
|
|
76
77
|
border-radius: 8px;
|
|
77
78
|
outline: none;
|
package/es/Highlight/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const THEME_DARK = "dark";
|
|
|
29
29
|
export declare const THEME_LIGHT = "light";
|
|
30
30
|
declare const ThemeTypes: ["dark", "light"];
|
|
31
31
|
export type ThemeType = (typeof ThemeTypes)[number];
|
|
32
|
-
declare const supportedLanguages: ("ruby" | "css" | "
|
|
32
|
+
declare const supportedLanguages: ("ruby" | "css" | "json" | "jsx" | "tsx" | "javascript" | "typescript" | "groovy" | "java" | "python" | "bash" | "cpp" | "http" | "markdown" | "nginx" | "sql" | "xml" | "dockerfile" | "go" | "yaml" | "solidity")[];
|
|
33
33
|
export type LanguageType = (typeof supportedLanguages)[number] | 'html';
|
|
34
34
|
export interface HighlightProps extends LocaleWrapperProps {
|
|
35
35
|
/**
|
package/es/Login/index.less
CHANGED
package/es/ProCard/index.js
CHANGED
|
@@ -11,8 +11,10 @@ import React, { useContext } from 'react';
|
|
|
11
11
|
import { ProCard as AntProCard } from '@ant-design/pro-components';
|
|
12
12
|
import { ConfigProvider } from '@oceanbase/design';
|
|
13
13
|
import { isHorizontalPaddingZero } from '@oceanbase/design/es/_util';
|
|
14
|
+
import { theme } from '@oceanbase/design';
|
|
14
15
|
import classNames from 'classnames';
|
|
15
16
|
import useStyle from "./style";
|
|
17
|
+
import { CaretRightFilled } from '@oceanbase/icons';
|
|
16
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
19
|
// @ts-ignore
|
|
18
20
|
var ProCard = function ProCard(_ref) {
|
|
@@ -25,10 +27,13 @@ var ProCard = function ProCard(_ref) {
|
|
|
25
27
|
className = _ref.className,
|
|
26
28
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
27
29
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
28
|
-
getPrefixCls = _useContext.getPrefixCls
|
|
30
|
+
getPrefixCls = _useContext.getPrefixCls,
|
|
31
|
+
iconPrefixCls = _useContext.iconPrefixCls;
|
|
29
32
|
var prefixCls = getPrefixCls('pro-card', customizePrefixCls);
|
|
30
33
|
var _useStyle = useStyle(prefixCls),
|
|
31
34
|
wrapSSR = _useStyle.wrapSSR;
|
|
35
|
+
var _theme$useToken = theme.useToken(),
|
|
36
|
+
token = _theme$useToken.token;
|
|
32
37
|
|
|
33
38
|
// ProCard body no horizontal padding
|
|
34
39
|
var noBodyHorizontalPadding = isHorizontalPaddingZero(bodyStyle === null || bodyStyle === void 0 ? void 0 : bodyStyle.padding) || ghost;
|
|
@@ -42,7 +47,18 @@ var ProCard = function ProCard(_ref) {
|
|
|
42
47
|
}, tabs) : tabs,
|
|
43
48
|
headerBordered: headerBordered,
|
|
44
49
|
bodyStyle: bodyStyle,
|
|
45
|
-
className: proCardCls
|
|
50
|
+
className: proCardCls,
|
|
51
|
+
collapsibleIconRender: function collapsibleIconRender(_ref2) {
|
|
52
|
+
var collapsed = _ref2.collapsed;
|
|
53
|
+
return /*#__PURE__*/_jsx(CaretRightFilled, {
|
|
54
|
+
className: "".concat(iconPrefixCls, " ").concat(iconPrefixCls, "-right ").concat(prefixCls, "-collapsible-icon"),
|
|
55
|
+
style: {
|
|
56
|
+
transition: 'transform 0.2s',
|
|
57
|
+
transform: collapsed ? undefined : 'rotate(90deg)',
|
|
58
|
+
color: token.colorTextSecondary
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
46
62
|
}, restProps)));
|
|
47
63
|
};
|
|
48
64
|
if (process.env.NODE_ENV !== 'production') {
|
package/lib/Boundary/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import './index.less';
|
|
3
3
|
declare const _default: {
|
|
4
4
|
Code: any;
|
|
5
|
-
Function: import("react").FC<import("./Components").IBoundaryFunction>;
|
|
5
|
+
Function: import("react").FC<import("./Components/Function").IBoundaryFunction>;
|
|
6
6
|
Exception: any;
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
cursor: pointer;
|
|
7
7
|
|
|
8
8
|
.@{prefix}-wrapper {
|
|
9
|
+
background-color: @colorBgContainer;
|
|
9
10
|
border: 1px solid @colorBorder;
|
|
10
11
|
box-sizing: border-box;
|
|
11
12
|
display: flex;
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
display: flex;
|
|
72
73
|
padding: 4px;
|
|
73
74
|
gap: 4px;
|
|
74
|
-
background-color:
|
|
75
|
+
background-color: @colorBgContainer;
|
|
75
76
|
background-clip: padding-box;
|
|
76
77
|
border-radius: 8px;
|
|
77
78
|
outline: none;
|
package/lib/Highlight/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const THEME_DARK = "dark";
|
|
|
29
29
|
export declare const THEME_LIGHT = "light";
|
|
30
30
|
declare const ThemeTypes: ["dark", "light"];
|
|
31
31
|
export type ThemeType = (typeof ThemeTypes)[number];
|
|
32
|
-
declare const supportedLanguages: ("ruby" | "css" | "
|
|
32
|
+
declare const supportedLanguages: ("ruby" | "css" | "json" | "jsx" | "tsx" | "javascript" | "typescript" | "groovy" | "java" | "python" | "bash" | "cpp" | "http" | "markdown" | "nginx" | "sql" | "xml" | "dockerfile" | "go" | "yaml" | "solidity")[];
|
|
33
33
|
export type LanguageType = (typeof supportedLanguages)[number] | 'html';
|
|
34
34
|
export interface HighlightProps extends LocaleWrapperProps {
|
|
35
35
|
/**
|
package/lib/Login/index.less
CHANGED
package/lib/ProCard/index.js
CHANGED
|
@@ -36,8 +36,10 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_pro_components = require("@ant-design/pro-components");
|
|
37
37
|
var import_design = require("@oceanbase/design");
|
|
38
38
|
var import_util = require("@oceanbase/design/es/_util");
|
|
39
|
+
var import_design2 = require("@oceanbase/design");
|
|
39
40
|
var import_classnames = __toESM(require("classnames"));
|
|
40
41
|
var import_style = __toESM(require("./style"));
|
|
42
|
+
var import_icons = require("@oceanbase/icons");
|
|
41
43
|
var ProCard = ({
|
|
42
44
|
ghost,
|
|
43
45
|
title,
|
|
@@ -48,9 +50,10 @@ var ProCard = ({
|
|
|
48
50
|
className,
|
|
49
51
|
...restProps
|
|
50
52
|
}) => {
|
|
51
|
-
const { getPrefixCls } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
|
|
53
|
+
const { getPrefixCls, iconPrefixCls } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
|
|
52
54
|
const prefixCls = getPrefixCls("pro-card", customizePrefixCls);
|
|
53
55
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
56
|
+
const { token } = import_design2.theme.useToken();
|
|
54
57
|
const noBodyHorizontalPadding = (0, import_util.isHorizontalPaddingZero)(bodyStyle == null ? void 0 : bodyStyle.padding) || ghost;
|
|
55
58
|
const proCardCls = (0, import_classnames.default)(
|
|
56
59
|
{
|
|
@@ -75,6 +78,19 @@ var ProCard = ({
|
|
|
75
78
|
headerBordered,
|
|
76
79
|
bodyStyle,
|
|
77
80
|
className: proCardCls,
|
|
81
|
+
collapsibleIconRender: ({ collapsed }) => {
|
|
82
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
83
|
+
import_icons.CaretRightFilled,
|
|
84
|
+
{
|
|
85
|
+
className: `${iconPrefixCls} ${iconPrefixCls}-right ${prefixCls}-collapsible-icon`,
|
|
86
|
+
style: {
|
|
87
|
+
transition: "transform 0.2s",
|
|
88
|
+
transform: collapsed ? void 0 : "rotate(90deg)",
|
|
89
|
+
color: token.colorTextSecondary
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
},
|
|
78
94
|
...restProps
|
|
79
95
|
}
|
|
80
96
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.16",
|
|
4
4
|
"description": "The UI library based on OceanBase Design",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oceanbase",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@ant-design/cssinjs": "^1.23.0",
|
|
43
|
-
"@ant-design/pro-components": "^2.8.
|
|
43
|
+
"@ant-design/pro-components": "^2.8.9",
|
|
44
44
|
"@antv/g6": "3.4.10",
|
|
45
|
-
"@oceanbase/design": "^0.4.
|
|
46
|
-
"@oceanbase/icons": "^0.4.
|
|
47
|
-
"@oceanbase/util": "^0.4.
|
|
45
|
+
"@oceanbase/design": "^0.4.13",
|
|
46
|
+
"@oceanbase/icons": "^0.4.7",
|
|
47
|
+
"@oceanbase/util": "^0.4.4",
|
|
48
48
|
"ahooks": "^2.10.14",
|
|
49
49
|
"classnames": "^2.5.1",
|
|
50
50
|
"dayjs": "^1.11.13",
|
|
@@ -64,12 +64,12 @@
|
|
|
64
64
|
"screenfull": "^6.0.2"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@ant-design/pro-form": "^2.31.
|
|
68
|
-
"@ant-design/pro-layout": "^7.22.
|
|
67
|
+
"@ant-design/pro-form": "^2.31.9",
|
|
68
|
+
"@ant-design/pro-layout": "^7.22.6"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"react": ">=16.9.0",
|
|
72
72
|
"react-dom": ">=16.9.0"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "2d9213d7c374b9dc207ebd40663f1c50828e72b7"
|
|
75
75
|
}
|