@oceanbase/ui 0.2.36 → 0.2.37
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.js +1 -1
- package/es/FooterToolbar/index.js +21 -4
- package/es/FooterToolbar/style/index.js +3 -18
- package/es/Highlight/index.d.ts +1 -1
- package/es/PageContainer/index.js +38 -3
- package/es/PageContainer/style/index.js +10 -7
- package/lib/FooterToolbar/index.js +14 -1
- package/lib/FooterToolbar/style/index.js +6 -24
- package/lib/Highlight/index.d.ts +1 -1
- package/lib/PageContainer/index.js +28 -1
- package/lib/PageContainer/style/index.js +6 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["portalDom", "prefixCls"];
|
|
2
|
+
var _excluded = ["portalDom", "prefixCls", "children"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
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; }
|
|
@@ -9,22 +9,39 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
9
9
|
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; }
|
|
10
10
|
import React, { useContext } from 'react';
|
|
11
11
|
import { FooterToolbar as AntFooterToolbar } from '@ant-design/pro-components';
|
|
12
|
-
import { ConfigProvider } from '@oceanbase/design';
|
|
12
|
+
import { ConfigProvider, theme } from '@oceanbase/design';
|
|
13
13
|
import useStyle from "./style";
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
var FooterToolbar = function FooterToolbar(_ref) {
|
|
16
16
|
var _ref$portalDom = _ref.portalDom,
|
|
17
17
|
portalDom = _ref$portalDom === void 0 ? false : _ref$portalDom,
|
|
18
18
|
customizePrefixCls = _ref.prefixCls,
|
|
19
|
+
children = _ref.children,
|
|
19
20
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
20
21
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
21
22
|
getPrefixCls = _useContext.getPrefixCls;
|
|
22
23
|
var prefixCls = getPrefixCls('pro-footer-bar', customizePrefixCls);
|
|
23
24
|
var _useStyle = useStyle(prefixCls),
|
|
24
25
|
wrapSSR = _useStyle.wrapSSR;
|
|
25
|
-
|
|
26
|
+
var _theme$useToken = theme.useToken(),
|
|
27
|
+
token = _theme$useToken.token;
|
|
28
|
+
return wrapSSR( /*#__PURE__*/_jsx(AntFooterToolbar, _objectSpread(_objectSpread({
|
|
26
29
|
portalDom: portalDom,
|
|
27
30
|
prefixCls: customizePrefixCls
|
|
28
|
-
}, restProps)
|
|
31
|
+
}, restProps), {}, {
|
|
32
|
+
children: /*#__PURE__*/_jsx(ConfigProvider
|
|
33
|
+
// large size component
|
|
34
|
+
, {
|
|
35
|
+
componentSize: "large"
|
|
36
|
+
// middle font size
|
|
37
|
+
,
|
|
38
|
+
theme: {
|
|
39
|
+
token: {
|
|
40
|
+
fontSizeLG: token.fontSize
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
children: children
|
|
44
|
+
})
|
|
45
|
+
})));
|
|
29
46
|
};
|
|
30
47
|
export default FooterToolbar;
|
|
@@ -8,26 +8,11 @@ import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
|
8
8
|
export var genOperationStyle = function genOperationStyle(token) {
|
|
9
9
|
var _ref;
|
|
10
10
|
var antCls = token.antCls,
|
|
11
|
-
fontSize = token.fontSize,
|
|
12
11
|
controlHeightLG = token.controlHeightLG;
|
|
13
|
-
var height = controlHeightLG;
|
|
14
|
-
var lineHeight = "".concat(controlHeightLG, "px");
|
|
15
12
|
return _ref = {}, _defineProperty(_ref, "".concat(antCls, "-btn"), {
|
|
16
|
-
minWidth: controlHeightLG
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}), _defineProperty(_ref, "".concat(antCls, "-radio-button-wrapper"), {
|
|
20
|
-
height: height,
|
|
21
|
-
lineHeight: lineHeight,
|
|
22
|
-
fontSize: fontSize
|
|
23
|
-
}), _defineProperty(_ref, "".concat(antCls, "-input-wrapper"), {
|
|
24
|
-
lineHeight: lineHeight
|
|
25
|
-
}), _defineProperty(_ref, "".concat(antCls, "-input"), {
|
|
26
|
-
height: height,
|
|
27
|
-
fontSize: fontSize
|
|
28
|
-
}), _defineProperty(_ref, "".concat(antCls, "-input-search-button"), {
|
|
29
|
-
height: height,
|
|
30
|
-
lineHeight: lineHeight
|
|
13
|
+
minWidth: controlHeightLG
|
|
14
|
+
}), _defineProperty(_ref, "".concat(antCls, "-picker-large"), {
|
|
15
|
+
height: controlHeightLG
|
|
31
16
|
}), _ref;
|
|
32
17
|
};
|
|
33
18
|
export var genFooterToolbarStyle = function genFooterToolbarStyle(token) {
|
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" | "bash" | "json" | "java" | "javascript" | "typescript" | "groovy" | "python" | "cpp" | "http" | "markdown" | "nginx" | "sql" | "xml" | "dockerfile" | "go" | "yaml" | "solidity" | "tsx" | "jsx")[];
|
|
33
33
|
export type LanguageType = (typeof supportedLanguages)[number] | 'html';
|
|
34
34
|
export interface HighlightProps extends LocaleWrapperProps {
|
|
35
35
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["prefixCls", "className", "header", "content", "extraContent", "tabList", "tabBarExtraContent", "footerToolBarProps", "locale"];
|
|
2
|
+
var _excluded = ["prefixCls", "className", "header", "content", "extraContent", "tabList", "tabBarExtraContent", "footer", "footerToolBarProps", "locale"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
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; }
|
|
@@ -12,7 +12,7 @@ import { PageContainer as AntPageContainer } from '@ant-design/pro-components';
|
|
|
12
12
|
import classNames from 'classnames';
|
|
13
13
|
import { isObject } from 'lodash';
|
|
14
14
|
import React, { useContext } from 'react';
|
|
15
|
-
import { ConfigProvider, Space, Tooltip } from '@oceanbase/design';
|
|
15
|
+
import { ConfigProvider, Space, Tooltip, theme } from '@oceanbase/design';
|
|
16
16
|
import LocaleWrapper from "../locale/LocaleWrapper";
|
|
17
17
|
import ItemRender from "./ItemRender";
|
|
18
18
|
import zhCN from "./locale/zh-CN";
|
|
@@ -27,6 +27,7 @@ var PageContainer = function PageContainer(_ref) {
|
|
|
27
27
|
extraContent = _ref.extraContent,
|
|
28
28
|
tabList = _ref.tabList,
|
|
29
29
|
tabBarExtraContent = _ref.tabBarExtraContent,
|
|
30
|
+
footer = _ref.footer,
|
|
30
31
|
footerToolBarProps = _ref.footerToolBarProps,
|
|
31
32
|
locale = _ref.locale,
|
|
32
33
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -36,10 +37,13 @@ var PageContainer = function PageContainer(_ref) {
|
|
|
36
37
|
var prefixCls = getPrefixCls('pro-page-container', customizePrefixCls);
|
|
37
38
|
var _useStyle = useStyle(prefixCls),
|
|
38
39
|
wrapSSR = _useStyle.wrapSSR;
|
|
40
|
+
var _theme$useToken = theme.useToken(),
|
|
41
|
+
token = _theme$useToken.token;
|
|
39
42
|
var _ref2 = header || {},
|
|
40
43
|
reload = _ref2.reload,
|
|
41
44
|
subTitle = _ref2.subTitle,
|
|
42
|
-
breadcrumb = _ref2.breadcrumb
|
|
45
|
+
breadcrumb = _ref2.breadcrumb,
|
|
46
|
+
extra = _ref2.extra;
|
|
43
47
|
var reloadProps = isObject(reload) && ! /*#__PURE__*/React.isValidElement(reload) ? reload : {};
|
|
44
48
|
var reloadCls = classNames("".concat(rootPrefixCls, "-page-header-heading-reload"), reloadProps.className);
|
|
45
49
|
var newSubTitle = (reload || subTitle) && /*#__PURE__*/_jsxs(Space, {
|
|
@@ -51,7 +55,23 @@ var PageContainer = function PageContainer(_ref) {
|
|
|
51
55
|
}))
|
|
52
56
|
}), subTitle]
|
|
53
57
|
});
|
|
58
|
+
var newExtra = React.Children.map(extra, function (item) {
|
|
59
|
+
return /*#__PURE__*/_jsx(ConfigProvider
|
|
60
|
+
// large size component
|
|
61
|
+
, {
|
|
62
|
+
componentSize: "large"
|
|
63
|
+
// middle font size
|
|
64
|
+
,
|
|
65
|
+
theme: {
|
|
66
|
+
token: {
|
|
67
|
+
fontSizeLG: token.fontSize
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
children: item
|
|
71
|
+
});
|
|
72
|
+
});
|
|
54
73
|
var newHeader = header && _objectSpread(_objectSpread({}, header), {}, {
|
|
74
|
+
extra: newExtra,
|
|
55
75
|
subTitle: newSubTitle,
|
|
56
76
|
breadcrumb: breadcrumb && _objectSpread({
|
|
57
77
|
itemRender: function itemRender(route, params, routes, paths) {
|
|
@@ -76,6 +96,21 @@ var PageContainer = function PageContainer(_ref) {
|
|
|
76
96
|
extraContent: extraContent,
|
|
77
97
|
tabList: tabList,
|
|
78
98
|
tabBarExtraContent: tabBarExtraContent,
|
|
99
|
+
footer: React.Children.map(footer, function (item) {
|
|
100
|
+
return /*#__PURE__*/_jsx(ConfigProvider
|
|
101
|
+
// large size component
|
|
102
|
+
, {
|
|
103
|
+
componentSize: "large"
|
|
104
|
+
// middle font size
|
|
105
|
+
,
|
|
106
|
+
theme: {
|
|
107
|
+
token: {
|
|
108
|
+
fontSizeLG: token.fontSize
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
children: item
|
|
112
|
+
});
|
|
113
|
+
}),
|
|
79
114
|
footerToolBarProps: _objectSpread({
|
|
80
115
|
// render footer under parent instead of body by default
|
|
81
116
|
portalDom: false
|
|
@@ -7,7 +7,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
7
7
|
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
8
8
|
import { genOperationStyle, genFooterToolbarStyle } from "../../FooterToolbar/style";
|
|
9
9
|
export var genPageContainerStyle = function genPageContainerStyle(token) {
|
|
10
|
-
var _$concat$concat, _$
|
|
10
|
+
var _$concat$concat, _$concat2, _objectSpread2;
|
|
11
11
|
var antCls = token.antCls,
|
|
12
12
|
proComponentsCls = token.proComponentsCls,
|
|
13
13
|
componentCls = token.componentCls,
|
|
@@ -18,12 +18,12 @@ export var genPageContainerStyle = function genPageContainerStyle(token) {
|
|
|
18
18
|
paddingLG = token.paddingLG;
|
|
19
19
|
var height = controlHeightLG;
|
|
20
20
|
var lineHeight = "".concat(controlHeightLG, "px");
|
|
21
|
-
return _objectSpread((_objectSpread2 = {}, _defineProperty(_objectSpread2, "".concat(componentCls), (_$
|
|
21
|
+
return _objectSpread((_objectSpread2 = {}, _defineProperty(_objectSpread2, "".concat(componentCls), (_$concat2 = {
|
|
22
22
|
minHeight: '100vh',
|
|
23
23
|
backgroundColor: colorBgLayout
|
|
24
|
-
}, _defineProperty(_$
|
|
24
|
+
}, _defineProperty(_$concat2, "".concat(proComponentsCls, "-grid-content"), {
|
|
25
25
|
minHeight: 'auto'
|
|
26
|
-
}), _defineProperty(_$
|
|
26
|
+
}), _defineProperty(_$concat2, "".concat(componentCls, "-warp-page-header,").concat(componentCls, "-wrap-page-header"), (_$concat$concat = {
|
|
27
27
|
// 减小内容区左右两侧间距
|
|
28
28
|
paddingInlineStart: "".concat(paddingLG, "px !important"),
|
|
29
29
|
paddingInlineEnd: "".concat(paddingLG, "px !important"),
|
|
@@ -42,13 +42,16 @@ export var genPageContainerStyle = function genPageContainerStyle(token) {
|
|
|
42
42
|
marginBlock: 0
|
|
43
43
|
}, genOperationStyle(token))), _defineProperty(_$concat$concat, "".concat(antCls, "-page-header-footer"), {
|
|
44
44
|
marginBlockStart: 0
|
|
45
|
-
}), _$concat$concat)), _defineProperty(_$
|
|
45
|
+
}), _$concat$concat)), _defineProperty(_$concat2, "".concat(componentCls, "-children-container"), _defineProperty({
|
|
46
46
|
paddingInline: paddingLG,
|
|
47
47
|
paddingBlockStart: 0,
|
|
48
48
|
paddingBlockEnd: paddingLG
|
|
49
|
-
}
|
|
49
|
+
}, "& > ".concat(antCls, "-tabs-top:not(").concat(antCls, "-tabs-card):first-child"), {
|
|
50
|
+
// equal to page header paddingBlockEnd
|
|
51
|
+
marginTop: -padding
|
|
52
|
+
})), _defineProperty(_$concat2, "".concat(antCls, "-page-header:not(").concat(antCls, "-page-header-has-breadcrumb)"), _defineProperty({}, "".concat(antCls, "-page-header-heading"), {
|
|
50
53
|
paddingBlockStart: 0
|
|
51
|
-
})), _$
|
|
54
|
+
})), _$concat2)), _defineProperty(_objectSpread2, "".concat(componentCls, "-no-page-header"), _defineProperty({}, "".concat(componentCls, "-children-container"), {
|
|
52
55
|
paddingBlockStart: paddingLG
|
|
53
56
|
})), _defineProperty(_objectSpread2, "".concat(componentCls, "-with-footer "), {
|
|
54
57
|
paddingBottom: 64
|
|
@@ -40,13 +40,26 @@ var FooterToolbar = ({
|
|
|
40
40
|
// render footer under parent instead of body by default
|
|
41
41
|
portalDom = false,
|
|
42
42
|
prefixCls: customizePrefixCls,
|
|
43
|
+
children,
|
|
43
44
|
...restProps
|
|
44
45
|
}) => {
|
|
45
46
|
const { getPrefixCls } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
|
|
46
47
|
const prefixCls = getPrefixCls("pro-footer-bar", customizePrefixCls);
|
|
47
48
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
49
|
+
const { token } = import_design.theme.useToken();
|
|
48
50
|
return wrapSSR(
|
|
49
|
-
/* @__PURE__ */ import_react.default.createElement(import_pro_components.FooterToolbar, { portalDom, prefixCls: customizePrefixCls, ...restProps }
|
|
51
|
+
/* @__PURE__ */ import_react.default.createElement(import_pro_components.FooterToolbar, { portalDom, prefixCls: customizePrefixCls, ...restProps }, /* @__PURE__ */ import_react.default.createElement(
|
|
52
|
+
import_design.ConfigProvider,
|
|
53
|
+
{
|
|
54
|
+
componentSize: "large",
|
|
55
|
+
theme: {
|
|
56
|
+
token: {
|
|
57
|
+
fontSizeLG: token.fontSize
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
children
|
|
62
|
+
))
|
|
50
63
|
);
|
|
51
64
|
};
|
|
52
65
|
var FooterToolbar_default = FooterToolbar;
|
|
@@ -26,33 +26,15 @@ __export(style_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(style_exports);
|
|
27
27
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
28
28
|
var genOperationStyle = (token) => {
|
|
29
|
-
const { antCls,
|
|
30
|
-
const height = controlHeightLG;
|
|
31
|
-
const lineHeight = `${controlHeightLG}px`;
|
|
29
|
+
const { antCls, controlHeightLG } = token;
|
|
32
30
|
return {
|
|
33
|
-
//
|
|
31
|
+
// limit min width for icon button
|
|
34
32
|
[`${antCls}-btn`]: {
|
|
35
|
-
minWidth: controlHeightLG
|
|
36
|
-
height,
|
|
37
|
-
fontSize
|
|
33
|
+
minWidth: controlHeightLG
|
|
38
34
|
},
|
|
39
|
-
//
|
|
40
|
-
[`${antCls}-
|
|
41
|
-
height
|
|
42
|
-
lineHeight,
|
|
43
|
-
fontSize
|
|
44
|
-
},
|
|
45
|
-
// Input
|
|
46
|
-
[`${antCls}-input-wrapper`]: {
|
|
47
|
-
lineHeight
|
|
48
|
-
},
|
|
49
|
-
[`${antCls}-input`]: {
|
|
50
|
-
height,
|
|
51
|
-
fontSize
|
|
52
|
-
},
|
|
53
|
-
[`${antCls}-input-search-button`]: {
|
|
54
|
-
height,
|
|
55
|
-
lineHeight
|
|
35
|
+
// set large DatePicker, TimePicker and RangePicker height when font-size is 14px
|
|
36
|
+
[`${antCls}-picker-large`]: {
|
|
37
|
+
height: controlHeightLG
|
|
56
38
|
}
|
|
57
39
|
};
|
|
58
40
|
};
|
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" | "bash" | "json" | "java" | "javascript" | "typescript" | "groovy" | "python" | "cpp" | "http" | "markdown" | "nginx" | "sql" | "xml" | "dockerfile" | "go" | "yaml" | "solidity" | "tsx" | "jsx")[];
|
|
33
33
|
export type LanguageType = (typeof supportedLanguages)[number] | 'html';
|
|
34
34
|
export interface HighlightProps extends LocaleWrapperProps {
|
|
35
35
|
/**
|
|
@@ -50,6 +50,7 @@ var PageContainer = ({
|
|
|
50
50
|
extraContent,
|
|
51
51
|
tabList,
|
|
52
52
|
tabBarExtraContent,
|
|
53
|
+
footer,
|
|
53
54
|
footerToolBarProps,
|
|
54
55
|
locale,
|
|
55
56
|
...restProps
|
|
@@ -58,15 +59,29 @@ var PageContainer = ({
|
|
|
58
59
|
const rootPrefixCls = getPrefixCls();
|
|
59
60
|
const prefixCls = getPrefixCls("pro-page-container", customizePrefixCls);
|
|
60
61
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
61
|
-
const {
|
|
62
|
+
const { token } = import_design.theme.useToken();
|
|
63
|
+
const { reload, subTitle, breadcrumb, extra } = header || {};
|
|
62
64
|
const reloadProps = (0, import_lodash.isObject)(reload) && !import_react.default.isValidElement(reload) ? reload : {};
|
|
63
65
|
const reloadCls = (0, import_classnames.default)(
|
|
64
66
|
`${rootPrefixCls}-page-header-heading-reload`,
|
|
65
67
|
reloadProps.className
|
|
66
68
|
);
|
|
67
69
|
const newSubTitle = (reload || subTitle) && /* @__PURE__ */ import_react.default.createElement(import_design.Space, { size: 12 }, reload && /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { title: locale.reload }, (0, import_lodash.isObject)(reload) && import_react.default.isValidElement(reload) ? reload : /* @__PURE__ */ import_react.default.createElement(import_icons.SyncOutlined, { ...reloadProps, className: reloadCls })), subTitle);
|
|
70
|
+
const newExtra = import_react.default.Children.map(extra, (item) => /* @__PURE__ */ import_react.default.createElement(
|
|
71
|
+
import_design.ConfigProvider,
|
|
72
|
+
{
|
|
73
|
+
componentSize: "large",
|
|
74
|
+
theme: {
|
|
75
|
+
token: {
|
|
76
|
+
fontSizeLG: token.fontSize
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
item
|
|
81
|
+
));
|
|
68
82
|
const newHeader = header && {
|
|
69
83
|
...header,
|
|
84
|
+
extra: newExtra,
|
|
70
85
|
subTitle: newSubTitle,
|
|
71
86
|
breadcrumb: breadcrumb && {
|
|
72
87
|
itemRender: (route, params, routes, paths) => /* @__PURE__ */ import_react.default.createElement(import_ItemRender.default, { route, params, routes, paths }),
|
|
@@ -93,6 +108,18 @@ var PageContainer = ({
|
|
|
93
108
|
extraContent,
|
|
94
109
|
tabList,
|
|
95
110
|
tabBarExtraContent,
|
|
111
|
+
footer: import_react.default.Children.map(footer, (item) => /* @__PURE__ */ import_react.default.createElement(
|
|
112
|
+
import_design.ConfigProvider,
|
|
113
|
+
{
|
|
114
|
+
componentSize: "large",
|
|
115
|
+
theme: {
|
|
116
|
+
token: {
|
|
117
|
+
fontSizeLG: token.fontSize
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
item
|
|
122
|
+
)),
|
|
96
123
|
footerToolBarProps: {
|
|
97
124
|
// render footer under parent instead of body by default
|
|
98
125
|
portalDom: false,
|
|
@@ -75,7 +75,12 @@ var genPageContainerStyle = (token) => {
|
|
|
75
75
|
[`${componentCls}-children-container`]: {
|
|
76
76
|
paddingInline: paddingLG,
|
|
77
77
|
paddingBlockStart: 0,
|
|
78
|
-
paddingBlockEnd: paddingLG
|
|
78
|
+
paddingBlockEnd: paddingLG,
|
|
79
|
+
// set top tabs style when it is PageContainer's first child
|
|
80
|
+
[`& > ${antCls}-tabs-top:not(${antCls}-tabs-card):first-child`]: {
|
|
81
|
+
// equal to page header paddingBlockEnd
|
|
82
|
+
marginTop: -padding
|
|
83
|
+
}
|
|
79
84
|
},
|
|
80
85
|
// remove paddingBlockStart for page header without breadcrumb
|
|
81
86
|
[`${antCls}-page-header:not(${antCls}-page-header-has-breadcrumb)`]: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.37",
|
|
4
4
|
"description": "The UI library based on OceanBase Design",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oceanbase",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@ant-design/cssinjs": "^1.17.2",
|
|
38
38
|
"@ant-design/pro-components": "^2.6.43",
|
|
39
39
|
"@ant-design/pro-layout": "^7.17.16",
|
|
40
|
-
"@oceanbase/design": "^0.2.
|
|
40
|
+
"@oceanbase/design": "^0.2.36",
|
|
41
41
|
"@oceanbase/icons": "^0.2.10",
|
|
42
42
|
"@oceanbase/util": "^0.2.13",
|
|
43
43
|
"ahooks": "^2.10.14",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"react": ">=16.9.0",
|
|
66
66
|
"react-dom": ">=16.9.0"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "2ed9cad13223ef74655f023d1478032a1441da8d"
|
|
69
69
|
}
|