@oceanbase/design 0.4.16 → 0.4.18
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/card/style/index.js +4 -2
- package/es/form/FormItem.d.ts +1 -0
- package/es/form/FormItem.js +1 -0
- package/es/input-number/index.d.ts +2 -1
- package/es/locale/ja-JP.d.ts +3 -0
- package/es/locale/ja-JP.js +28 -0
- package/es/table/index.d.ts +2 -2
- package/es/table/style/index.js +1 -3
- package/es/tabs/index.d.ts +8 -6
- package/es/tabs/index.js +10 -7
- package/es/tabs/style/index.js +2 -3
- package/es/typography/style/index.js +2 -6
- package/lib/alert/index.js +7 -6
- package/lib/badge/index.js +21 -18
- package/lib/button/index.js +2 -1
- package/lib/card/index.js +9 -5
- package/lib/card/style/index.js +9 -1
- package/lib/checkbox/index.js +2 -1
- package/lib/config-provider/DefaultRenderEmpty.js +4 -3
- package/lib/config-provider/index.js +20 -16
- package/lib/descriptions/hooks/useItems.js +5 -4
- package/lib/descriptions/index.js +3 -2
- package/lib/drawer/index.js +38 -29
- package/lib/dropdown/dropdown-button.js +3 -13
- package/lib/dropdown/index.js +2 -2
- package/lib/empty/colored.js +413 -327
- package/lib/empty/database.js +267 -222
- package/lib/empty/default.js +16 -21
- package/lib/empty/guide.js +201 -184
- package/lib/empty/index.js +23 -17
- package/lib/form/FormItem.d.ts +1 -0
- package/lib/form/FormItem.js +15 -5
- package/lib/form/index.js +6 -3
- package/lib/grid/col.js +2 -1
- package/lib/grid/row.js +2 -1
- package/lib/input/Input.js +3 -2
- package/lib/input/Password.js +3 -2
- package/lib/input/Search.js +3 -2
- package/lib/input/TextArea.js +3 -2
- package/lib/input-number/index.d.ts +2 -1
- package/lib/input-number/index.js +2 -1
- package/lib/list/index.js +3 -2
- package/lib/locale/ja-JP.d.ts +3 -0
- package/lib/locale/ja-JP.js +60 -0
- package/lib/lottie/index.js +2 -1
- package/lib/modal/Modal.js +7 -3
- package/lib/modal/Progress.js +9 -5
- package/lib/radio/index.js +2 -1
- package/lib/result/403.js +156 -121
- package/lib/result/404.js +328 -267
- package/lib/result/500.js +295 -257
- package/lib/result/Error.js +127 -99
- package/lib/result/Processing.js +246 -213
- package/lib/result/Success.js +233 -169
- package/lib/result/Warning.js +611 -515
- package/lib/result/index.js +10 -9
- package/lib/segmented/index.js +8 -4
- package/lib/select/index.js +2 -1
- package/lib/slider/index.js +2 -1
- package/lib/space/index.js +2 -1
- package/lib/spin/index.js +5 -4
- package/lib/switch/index.js +2 -1
- package/lib/table/index.d.ts +2 -2
- package/lib/table/index.js +44 -31
- package/lib/table/style/index.js +2 -4
- package/lib/tabs/index.d.ts +8 -6
- package/lib/tabs/index.js +73 -62
- package/lib/tabs/style/index.js +6 -4
- package/lib/tag/index.js +9 -5
- package/lib/tooltip/MouseTooltip.js +43 -39
- package/lib/tooltip/ReactStickyMouseTooltip.js +5 -4
- package/lib/tooltip/index.js +14 -10
- package/lib/tree-select/index.js +2 -1
- package/lib/typography/Link.js +5 -4
- package/lib/typography/Paragraph.js +5 -4
- package/lib/typography/Text.js +5 -4
- package/lib/typography/Title.js +5 -4
- package/lib/typography/style/index.js +2 -9
- package/package.json +8 -8
package/es/card/style/index.js
CHANGED
|
@@ -30,10 +30,12 @@ export var genCardStyle = function genCardStyle(token) {
|
|
|
30
30
|
var tableComponentCls = "".concat(antCls, "-table");
|
|
31
31
|
return _ref2 = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref2, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-bordered):not(").concat(componentCls, "-type-inner)"), {
|
|
32
32
|
boxShadow: 'none'
|
|
33
|
-
})), "".concat(componentCls).concat(componentCls, "-no-divider"), _defineProperty({}, "".concat(componentCls, "-head"), {
|
|
33
|
+
})), "".concat(componentCls).concat(componentCls, "-no-divider"), _defineProperty({}, "".concat(componentCls, "-head"), _defineProperty({
|
|
34
34
|
// should not remove border-bottom to avoid tabs inkbar display correctly
|
|
35
35
|
borderBottomColor: 'transparent'
|
|
36
|
-
}
|
|
36
|
+
}, tabsComponentCls, _defineProperty({}, "&".concat(tabsComponentCls, "-top, &").concat(tabsComponentCls, "-bottom"), _defineProperty({}, "".concat(tabsComponentCls, "-nav::before"), {
|
|
37
|
+
border: 'none'
|
|
38
|
+
}))))), "".concat(componentCls).concat(componentCls, "-no-divider:not(").concat(componentCls, "-contain-tabs)"), _defineProperty({}, "".concat(componentCls, "-body"), {
|
|
37
39
|
padding: "0 ".concat(paddingLG, "px ").concat(paddingLG, "px ").concat(paddingLG, "px")
|
|
38
40
|
})), "".concat(componentCls, "-small").concat(componentCls, "-no-divider:not(").concat(componentCls, "-contain-tabs)"), _defineProperty({}, "".concat(componentCls, "-body"), {
|
|
39
41
|
padding: "0 ".concat(paddingSM, "px ").concat(paddingSM, "px ").concat(paddingSM, "px")
|
package/es/form/FormItem.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ declare const AntFormItem: (<Values = any>(props: AntFormItemProps<Values>) => R
|
|
|
9
9
|
warnings: React.ReactNode[];
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
+
export * from 'antd/es/form/FormItem';
|
|
12
13
|
export type WrapperTooltipProps = Omit<TooltipProps, 'mouseFollow'> & {
|
|
13
14
|
icon?: React.ReactElement;
|
|
14
15
|
};
|
package/es/form/FormItem.js
CHANGED
|
@@ -20,6 +20,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
20
20
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
21
21
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
var AntFormItem = AntForm.Item;
|
|
23
|
+
export * from 'antd/es/form/FormItem';
|
|
23
24
|
var FormItem = function FormItem(_ref) {
|
|
24
25
|
var _children$type;
|
|
25
26
|
var children = _ref.children,
|
|
@@ -8,7 +8,8 @@ export interface InputNumberLocale {
|
|
|
8
8
|
export interface InputNumberProps extends AntInputNumberProps {
|
|
9
9
|
locale?: InputNumberLocale;
|
|
10
10
|
}
|
|
11
|
-
type
|
|
11
|
+
type InputNumberRef = React.ComponentRef<typeof AntInputNumber>;
|
|
12
|
+
type CompoundedComponent = React.ForwardRefExoticComponent<InputNumberProps & React.RefAttributes<InputNumberRef>> & {
|
|
12
13
|
_InternalPanelDoNotUseOrYouWillBeFired: typeof AntInputNumber._InternalPanelDoNotUseOrYouWillBeFired;
|
|
13
14
|
};
|
|
14
15
|
declare const InputNumber: CompoundedComponent;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
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(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import jaJP from 'antd/es/locale/ja_JP';
|
|
8
|
+
export default _objectSpread(_objectSpread({}, jaJP), {}, {
|
|
9
|
+
global: _objectSpread(_objectSpread({}, jaJP.global), {}, {
|
|
10
|
+
inputPlaceholder: '入力してください'
|
|
11
|
+
}),
|
|
12
|
+
Pagination: _objectSpread(_objectSpread({}, jaJP.Pagination), {}, {
|
|
13
|
+
total: '合計 ${total} 件'
|
|
14
|
+
}),
|
|
15
|
+
Drawer: {
|
|
16
|
+
okText: '確定',
|
|
17
|
+
cancelText: 'キャンセル'
|
|
18
|
+
},
|
|
19
|
+
Table: _objectSpread(_objectSpread({}, jaJP.Table), {}, {
|
|
20
|
+
batchOperationBar: {
|
|
21
|
+
selected: '選択済み',
|
|
22
|
+
object: '件',
|
|
23
|
+
cancel: 'キャンセル',
|
|
24
|
+
collapse: '折りたたむ',
|
|
25
|
+
open: '展開'
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
});
|
package/es/table/index.d.ts
CHANGED
|
@@ -38,8 +38,8 @@ declare const _default: (<RecordType extends AnyObject = AnyObject>(props: Table
|
|
|
38
38
|
SELECTION_ALL: "SELECT_ALL";
|
|
39
39
|
SELECTION_INVERT: "SELECT_INVERT";
|
|
40
40
|
SELECTION_NONE: "SELECT_NONE";
|
|
41
|
-
Column: <
|
|
42
|
-
ColumnGroup: <
|
|
41
|
+
Column: <RecordType_1 extends import("antd/es/_util/type").AnyObject>(_: import("antd").TableColumnProps<RecordType_1>) => null;
|
|
42
|
+
ColumnGroup: <RecordType_2 extends import("antd/es/_util/type").AnyObject>(_: import("antd/es/table/ColumnGroup").ColumnGroupProps<RecordType_2>) => null;
|
|
43
43
|
Summary: typeof Summary;
|
|
44
44
|
useStyle: (prefixCls: string) => {
|
|
45
45
|
wrapSSR: (node: ReactNode) => ReactElement<any, string | React.JSXElementConstructor<any>>;
|
package/es/table/style/index.js
CHANGED
|
@@ -54,9 +54,7 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
54
54
|
borderBottom: 'none'
|
|
55
55
|
})), "tr > td", {
|
|
56
56
|
transition: "background ".concat(token.motionDurationMid)
|
|
57
|
-
}), "".concat(componentCls, "-placeholder td"), {
|
|
58
|
-
borderBottom: 'none'
|
|
59
|
-
}), "".concat(componentCls, "-empty-wrapper"), {
|
|
57
|
+
}), "".concat(componentCls, "-placeholder td"), {}), "".concat(componentCls, "-empty-wrapper"), {
|
|
60
58
|
minHeight: 360 - token.paddingSM * 2,
|
|
61
59
|
display: 'flex',
|
|
62
60
|
justifyContent: 'center',
|
package/es/tabs/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { TabsProps as AntTabsProps, TabsPosition as AntTabsPosition } from 'antd/es/tabs';
|
|
2
|
+
import type { TabsProps as AntTabsProps, TabsPosition as AntTabsPosition, TabsRef } from 'antd/es/tabs';
|
|
3
3
|
import type { Tab as AntTab } from 'rc-tabs/es/interface';
|
|
4
|
+
import { genTabsStyle } from './style';
|
|
5
|
+
import TabPane from './TabPane';
|
|
4
6
|
import type { TabPaneProps } from './TabPane';
|
|
5
7
|
import type { BadgeProps } from '../badge';
|
|
6
8
|
export * from 'antd/es/tabs';
|
|
@@ -17,13 +19,13 @@ export type Tab = {
|
|
|
17
19
|
badge?: BadgeType;
|
|
18
20
|
} & (AntTab | AntTabOptional);
|
|
19
21
|
export interface TabsProps extends Omit<AntTabsProps, 'items'> {
|
|
22
|
+
divider?: boolean;
|
|
20
23
|
items?: Tab[];
|
|
21
24
|
}
|
|
22
25
|
export type TabsPosition = AntTabsPosition;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
genTabsStyle: (token: Partial<import("./style").TabsToken>) => import("@ant-design/cssinjs").CSSObject;
|
|
27
|
-
displayName: string;
|
|
26
|
+
type CompoundedComponent = React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<TabsRef>> & {
|
|
27
|
+
TabPane: typeof TabPane;
|
|
28
|
+
genTabsStyle: typeof genTabsStyle;
|
|
28
29
|
};
|
|
30
|
+
declare const Tabs: CompoundedComponent;
|
|
29
31
|
export default Tabs;
|
package/es/tabs/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var _excluded = ["children", "items", "type", "tabPosition", "prefixCls", "className"];
|
|
1
|
+
var _excluded = ["children", "divider", "items", "type", "tabPosition", "prefixCls", "className"];
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
|
+
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); }
|
|
4
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; }
|
|
5
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
7
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
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); }
|
|
8
8
|
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; }
|
|
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
|
-
import { isNullValue } from '@oceanbase/util';
|
|
11
|
-
import { Divider, Space, Tabs as AntTabs, Tag } from 'antd';
|
|
12
10
|
import React, { useCallback, useContext } from 'react';
|
|
11
|
+
import { Divider, Space, Tabs as AntTabs, Tag } from 'antd';
|
|
12
|
+
import { isNullValue } from '@oceanbase/util';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import Badge from "../badge";
|
|
15
15
|
import ConfigProvider from "../config-provider";
|
|
@@ -22,9 +22,11 @@ export * from 'antd/es/tabs';
|
|
|
22
22
|
var isReactNode = function isReactNode(item) {
|
|
23
23
|
return /*#__PURE__*/React.isValidElement(item);
|
|
24
24
|
};
|
|
25
|
-
var Tabs = function
|
|
25
|
+
var Tabs = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
26
26
|
var _newItems;
|
|
27
27
|
var children = _ref.children,
|
|
28
|
+
_ref$divider = _ref.divider,
|
|
29
|
+
divider = _ref$divider === void 0 ? false : _ref$divider,
|
|
28
30
|
items = _ref.items,
|
|
29
31
|
type = _ref.type,
|
|
30
32
|
tabPosition = _ref.tabPosition,
|
|
@@ -36,7 +38,7 @@ var Tabs = function Tabs(_ref) {
|
|
|
36
38
|
var prefixCls = getPrefixCls('tabs', customizePrefixCls);
|
|
37
39
|
var _useStyle = useStyle(prefixCls),
|
|
38
40
|
wrapSSR = _useStyle.wrapSSR;
|
|
39
|
-
var tabsCls = classNames(className);
|
|
41
|
+
var tabsCls = classNames(className, _defineProperty({}, "".concat(prefixCls, "-no-divider"), !divider));
|
|
40
42
|
var isHorizontal = !tabPosition || tabPosition === 'top' || tabPosition === 'bottom';
|
|
41
43
|
var dividerList = (items === null || items === void 0 ? void 0 : items.filter(function (item) {
|
|
42
44
|
return item.divider;
|
|
@@ -80,13 +82,14 @@ var Tabs = function Tabs(_ref) {
|
|
|
80
82
|
return item;
|
|
81
83
|
});
|
|
82
84
|
return wrapSSR( /*#__PURE__*/_jsx(AntTabs, _objectSpread({
|
|
85
|
+
ref: ref,
|
|
83
86
|
items: newItems,
|
|
84
87
|
type: type,
|
|
85
88
|
tabPosition: tabPosition,
|
|
86
89
|
prefixCls: customizePrefixCls,
|
|
87
90
|
className: tabsCls
|
|
88
91
|
}, restProps)));
|
|
89
|
-
};
|
|
92
|
+
});
|
|
90
93
|
Tabs.TabPane = TabPane;
|
|
91
94
|
Tabs.genTabsStyle = genTabsStyle;
|
|
92
95
|
if (process.env.NODE_ENV !== 'production') {
|
package/es/tabs/style/index.js
CHANGED
|
@@ -10,10 +10,9 @@ export var genTabsStyle = function genTabsStyle(token) {
|
|
|
10
10
|
colorInfoBg = token.colorInfoBg,
|
|
11
11
|
colorTextSecondary = token.colorTextSecondary,
|
|
12
12
|
colorFillQuaternary = token.colorFillQuaternary;
|
|
13
|
-
return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "&".concat(componentCls, "-top, &").concat(componentCls, "-bottom"), _defineProperty({}, "".concat(componentCls, "-nav::before"), {
|
|
14
|
-
// 页签位置为 top 和 bottom 时,去掉分割线
|
|
13
|
+
return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "&".concat(componentCls, "-no-divider"), _defineProperty({}, "&".concat(componentCls, "-top, &").concat(componentCls, "-bottom"), _defineProperty({}, "".concat(componentCls, "-nav::before"), {
|
|
15
14
|
border: 'none'
|
|
16
|
-
})), "".concat(componentCls, "-tab"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-tab-tag"), {
|
|
15
|
+
}))), "".concat(componentCls, "-tab"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-tab-tag"), {
|
|
17
16
|
color: colorTextSecondary,
|
|
18
17
|
fontFamily: 'PingFangSC',
|
|
19
18
|
fontSize: 12,
|
|
@@ -9,15 +9,11 @@ export var genTypographyStyle = function genTypographyStyle(token) {
|
|
|
9
9
|
fontSize = token.fontSize,
|
|
10
10
|
lineHeight = token.lineHeight;
|
|
11
11
|
var marginOffset = (controlHeight - fontSize * lineHeight) / 2;
|
|
12
|
-
return _defineProperty(_defineProperty(_defineProperty(
|
|
12
|
+
return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty({
|
|
13
13
|
lineHeight: 'inherit',
|
|
14
14
|
color: 'inherit',
|
|
15
15
|
fontSize: 'inherit'
|
|
16
|
-
}
|
|
17
|
-
lineHeight: 'inherit',
|
|
18
|
-
color: 'inherit',
|
|
19
|
-
fontSize: 'inherit'
|
|
20
|
-
}), "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-edit"), {
|
|
16
|
+
}, "".concat(componentCls, "-edit"), {
|
|
21
17
|
fontSize: token.fontSize
|
|
22
18
|
})), "".concat(componentCls).concat(componentCls, "-editable-text:not(").concat(componentCls, "-edit-content)"), {
|
|
23
19
|
'&:hover': {
|
package/lib/alert/index.js
CHANGED
|
@@ -33,18 +33,19 @@ __export(alert_exports, {
|
|
|
33
33
|
default: () => alert_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(alert_exports);
|
|
36
|
-
var import_react =
|
|
36
|
+
var import_react = require("react");
|
|
37
37
|
var import_antd = require("antd");
|
|
38
38
|
var import_icons = require("@oceanbase/icons");
|
|
39
39
|
var import_classnames = __toESM(require("classnames"));
|
|
40
40
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
41
41
|
var import_style = __toESM(require("./style"));
|
|
42
42
|
__reExport(alert_exports, require("antd/es/alert"), module.exports);
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
44
|
var iconMapOutlined = {
|
|
44
|
-
success: /* @__PURE__ */
|
|
45
|
-
info: /* @__PURE__ */
|
|
46
|
-
error: /* @__PURE__ */
|
|
47
|
-
warning: /* @__PURE__ */
|
|
45
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CheckCircleOutlined, {}),
|
|
46
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.InfoCircleOutlined, {}),
|
|
47
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseCircleOutlined, {}),
|
|
48
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ExclamationCircleOutlined, {})
|
|
48
49
|
};
|
|
49
50
|
var Alert = ({
|
|
50
51
|
type,
|
|
@@ -65,7 +66,7 @@ var Alert = ({
|
|
|
65
66
|
className
|
|
66
67
|
);
|
|
67
68
|
return wrapSSR(
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
69
70
|
import_antd.Alert,
|
|
70
71
|
{
|
|
71
72
|
type,
|
package/lib/badge/index.js
CHANGED
|
@@ -40,14 +40,15 @@ var import_classnames = __toESM(require("classnames"));
|
|
|
40
40
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
41
41
|
var import_style = __toESM(require("./style"));
|
|
42
42
|
__reExport(badge_exports, require("antd/es/badge"), module.exports);
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
44
|
var Badge = import_react.default.forwardRef(
|
|
44
45
|
({ prefixCls: customizePrefixCls, className, status, text, icon, ...restProps }, ref) => {
|
|
45
46
|
const { getPrefixCls, iconPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
46
47
|
const prefixCls = getPrefixCls("badge", customizePrefixCls);
|
|
47
48
|
const { wrapSSR, hashId } = (0, import_style.default)(prefixCls);
|
|
48
49
|
const iconMap = {
|
|
49
|
-
default: /* @__PURE__ */
|
|
50
|
-
processing: /* @__PURE__ */
|
|
50
|
+
default: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.MinusCircleFilled, { rotate: 45 }),
|
|
51
|
+
processing: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
52
|
import_icons.Loading3QuartersOutlined,
|
|
52
53
|
{
|
|
53
54
|
style: {
|
|
@@ -56,12 +57,12 @@ var Badge = import_react.default.forwardRef(
|
|
|
56
57
|
className: `${iconPrefixCls}-spin`
|
|
57
58
|
}
|
|
58
59
|
),
|
|
59
|
-
success: /* @__PURE__ */
|
|
60
|
-
error: /* @__PURE__ */
|
|
61
|
-
warning: /* @__PURE__ */
|
|
60
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CheckCircleFilled, {}),
|
|
61
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseCircleFilled, {}),
|
|
62
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.EllipsisCircleFilled, {})
|
|
62
63
|
};
|
|
63
64
|
return wrapSSR(
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: status && icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
65
66
|
"span",
|
|
66
67
|
{
|
|
67
68
|
ref,
|
|
@@ -69,17 +70,19 @@ var Badge = import_react.default.forwardRef(
|
|
|
69
70
|
style: {
|
|
70
71
|
display: "inline-block"
|
|
71
72
|
},
|
|
72
|
-
...restProps
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
73
|
+
...restProps,
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
76
|
+
"span",
|
|
77
|
+
{
|
|
78
|
+
className: (0, import_classnames.default)(`${prefixCls}-status-icon`, `${prefixCls}-status-${status}`),
|
|
79
|
+
children: import_react.default.isValidElement(icon) ? icon : iconMap[status]
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
text && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-status-text`, children: text })
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
83
86
|
import_antd.Badge,
|
|
84
87
|
{
|
|
85
88
|
ref,
|
|
@@ -89,7 +92,7 @@ var Badge = import_react.default.forwardRef(
|
|
|
89
92
|
text,
|
|
90
93
|
...restProps
|
|
91
94
|
}
|
|
92
|
-
))
|
|
95
|
+
) })
|
|
93
96
|
);
|
|
94
97
|
}
|
|
95
98
|
);
|
package/lib/button/index.js
CHANGED
|
@@ -39,6 +39,7 @@ var import_react = __toESM(require("react"));
|
|
|
39
39
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
40
40
|
var import_style = __toESM(require("./style"));
|
|
41
41
|
__reExport(button_exports, require("antd/es/button"), module.exports);
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
43
|
var Button = import_react.default.forwardRef(
|
|
43
44
|
({ prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
|
|
44
45
|
const { theme, getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
@@ -46,7 +47,7 @@ var Button = import_react.default.forwardRef(
|
|
|
46
47
|
const { wrapSSR } = (0, import_style.default)(prefixCls, theme == null ? void 0 : theme.isAliyun);
|
|
47
48
|
const buttonCls = (0, import_classnames.default)(className);
|
|
48
49
|
return wrapSSR(
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Button, { ref, prefixCls: customizePrefixCls, className: buttonCls, ...restProps })
|
|
50
51
|
);
|
|
51
52
|
}
|
|
52
53
|
);
|
package/lib/card/index.js
CHANGED
|
@@ -42,6 +42,7 @@ var import_util2 = require("../_util");
|
|
|
42
42
|
var import_style = __toESM(require("./style"));
|
|
43
43
|
__reExport(card_exports, require("antd/es/card/Card"), module.exports);
|
|
44
44
|
__reExport(card_exports, require("antd/es/card"), module.exports);
|
|
45
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
46
|
var Card = import_react.default.forwardRef(
|
|
46
47
|
({
|
|
47
48
|
children,
|
|
@@ -74,13 +75,16 @@ var Card = import_react.default.forwardRef(
|
|
|
74
75
|
if (!(0, import_util.isNullValue)(item.tag)) {
|
|
75
76
|
return {
|
|
76
77
|
...item,
|
|
77
|
-
tab: /* @__PURE__ */
|
|
78
|
+
tab: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: 4, children: [
|
|
79
|
+
item.tab,
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Tag, { bordered: false, className: `${tabsPrefixCls}-tab-tag`, children: item.tag })
|
|
81
|
+
] })
|
|
78
82
|
};
|
|
79
83
|
}
|
|
80
84
|
return item;
|
|
81
85
|
});
|
|
82
86
|
return wrapSSR(
|
|
83
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
84
88
|
import_antd.Card,
|
|
85
89
|
{
|
|
86
90
|
ref,
|
|
@@ -91,9 +95,9 @@ var Card = import_react.default.forwardRef(
|
|
|
91
95
|
bodyStyle,
|
|
92
96
|
styles,
|
|
93
97
|
className: cardCls,
|
|
94
|
-
...restProps
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
...restProps,
|
|
99
|
+
children
|
|
100
|
+
}
|
|
97
101
|
)
|
|
98
102
|
);
|
|
99
103
|
}
|
package/lib/card/style/index.js
CHANGED
|
@@ -67,7 +67,15 @@ var genCardStyle = (token) => {
|
|
|
67
67
|
[`${componentCls}${componentCls}-no-divider`]: {
|
|
68
68
|
[`${componentCls}-head`]: {
|
|
69
69
|
// should not remove border-bottom to avoid tabs inkbar display correctly
|
|
70
|
-
borderBottomColor: "transparent"
|
|
70
|
+
borderBottomColor: "transparent",
|
|
71
|
+
// remove divider for top and bottom tabs
|
|
72
|
+
[tabsComponentCls]: {
|
|
73
|
+
[`&${tabsComponentCls}-top, &${tabsComponentCls}-bottom`]: {
|
|
74
|
+
[`${tabsComponentCls}-nav::before`]: {
|
|
75
|
+
border: "none"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
71
79
|
}
|
|
72
80
|
},
|
|
73
81
|
[`${componentCls}${componentCls}-no-divider:not(${componentCls}-contain-tabs)`]: {
|
package/lib/checkbox/index.js
CHANGED
|
@@ -39,6 +39,7 @@ var import_react = __toESM(require("react"));
|
|
|
39
39
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
40
40
|
var import_style = __toESM(require("./style"));
|
|
41
41
|
__reExport(checkbox_exports, require("antd/es/checkbox"), module.exports);
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
43
|
var InternalCheckbox = import_react.default.forwardRef(
|
|
43
44
|
({ prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
|
|
44
45
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
@@ -46,7 +47,7 @@ var InternalCheckbox = import_react.default.forwardRef(
|
|
|
46
47
|
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
47
48
|
const checkboxCls = (0, import_classnames.default)(className);
|
|
48
49
|
return wrapSSR(
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
50
51
|
import_antd.Checkbox,
|
|
51
52
|
{
|
|
52
53
|
ref,
|
|
@@ -32,9 +32,10 @@ __export(DefaultRenderEmpty_exports, {
|
|
|
32
32
|
default: () => DefaultRenderEmpty_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(DefaultRenderEmpty_exports);
|
|
35
|
-
var import_react =
|
|
35
|
+
var import_react = require("react");
|
|
36
36
|
var import__ = require(".");
|
|
37
37
|
var import_empty = __toESM(require("../empty"));
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
39
|
var DefaultRenderEmpty = (props) => {
|
|
39
40
|
const { componentName } = props;
|
|
40
41
|
const { getPrefixCls } = (0, import_react.useContext)(import__.ConfigContext);
|
|
@@ -45,9 +46,9 @@ var DefaultRenderEmpty = (props) => {
|
|
|
45
46
|
case "Cascader":
|
|
46
47
|
case "Transfer":
|
|
47
48
|
case "Mentions":
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_empty.default, { image: import_empty.default.PRESENTED_IMAGE_SIMPLE, className: `${prefix}-small` });
|
|
49
50
|
default:
|
|
50
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_empty.default, { image: import_empty.default.PRESENTED_IMAGE_SIMPLE });
|
|
51
52
|
}
|
|
52
53
|
};
|
|
53
54
|
var DefaultRenderEmpty_default = DefaultRenderEmpty;
|
|
@@ -50,6 +50,7 @@ __reExport(config_provider_exports, require("antd/es/config-provider/context"),
|
|
|
50
50
|
__reExport(config_provider_exports, require("antd/es/config-provider/SizeContext"), module.exports);
|
|
51
51
|
__reExport(config_provider_exports, require("antd/es/config-provider/DisabledContext"), module.exports);
|
|
52
52
|
__reExport(config_provider_exports, require("antd/es/config-provider"), module.exports);
|
|
53
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
53
54
|
var ExtendedConfigContext = import_react.default.createContext({
|
|
54
55
|
navigate: void 0,
|
|
55
56
|
hideOnSinglePage: false,
|
|
@@ -88,7 +89,7 @@ var ConfigProvider = ({
|
|
|
88
89
|
const parentStyleContext = import_react.default.useContext(import_StyleContext.default);
|
|
89
90
|
const mergedStyleProviderProps = (0, import_lodash.merge)({}, parentStyleContext, styleProviderProps);
|
|
90
91
|
const mergedLocale = (0, import_lodash.merge)({}, parentContext.locale, locale);
|
|
91
|
-
return /* @__PURE__ */
|
|
92
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
92
93
|
import_antd.ConfigProvider,
|
|
93
94
|
{
|
|
94
95
|
locale: mergedLocale,
|
|
@@ -96,7 +97,7 @@ var ConfigProvider = ({
|
|
|
96
97
|
collapse: (0, import_lodash.merge)(
|
|
97
98
|
{},
|
|
98
99
|
{
|
|
99
|
-
expandIcon: ({ isActive }) => /* @__PURE__ */
|
|
100
|
+
expandIcon: ({ isActive }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CaretRightOutlined, { rotate: isActive ? 90 : 0 })
|
|
100
101
|
},
|
|
101
102
|
parentContext.collapse,
|
|
102
103
|
collapse
|
|
@@ -130,21 +131,24 @@ var ConfigProvider = ({
|
|
|
130
131
|
)
|
|
131
132
|
)
|
|
132
133
|
}),
|
|
133
|
-
renderEmpty: parentContext.renderEmpty || ((componentName) => /* @__PURE__ */
|
|
134
|
-
...restProps
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
134
|
+
renderEmpty: parentContext.renderEmpty || ((componentName) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DefaultRenderEmpty.default, { componentName })),
|
|
135
|
+
...restProps,
|
|
136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
137
|
+
ExtendedConfigContext.Provider,
|
|
138
|
+
{
|
|
139
|
+
value: {
|
|
140
|
+
navigate: navigate === void 0 ? parentExtendedContext.navigate : navigate,
|
|
141
|
+
hideOnSinglePage: ((_b = parentContext.pagination) == null ? void 0 : _b.showSizeChanger) ? false : hideOnSinglePage !== void 0 ? hideOnSinglePage : parentExtendedContext.hideOnSinglePage,
|
|
142
|
+
// inject static function to outermost ConfigProvider only
|
|
143
|
+
injectStaticFunction: false
|
|
144
|
+
},
|
|
145
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_cssinjs.StyleProvider, { ...mergedStyleProviderProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.App, { component: false, ...appProps, children: [
|
|
146
|
+
children,
|
|
147
|
+
parentExtendedContext.injectStaticFunction && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_static_function.default, {})
|
|
148
|
+
] }) })
|
|
144
149
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
)
|
|
150
|
+
)
|
|
151
|
+
}
|
|
148
152
|
);
|
|
149
153
|
};
|
|
150
154
|
ConfigProvider.ConfigContext = import_antd.ConfigProvider.ConfigContext;
|
|
@@ -37,6 +37,7 @@ var import_warning = __toESM(require("antd/es/_util/warning"));
|
|
|
37
37
|
var import_toArray = __toESM(require("rc-util/lib/Children/toArray"));
|
|
38
38
|
var import_typography = __toESM(require("../../typography"));
|
|
39
39
|
var import_getEllipsisConfig = require("../../_util/getEllipsisConfig");
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
41
|
var children2Items = (children) => {
|
|
41
42
|
const childrenItems = (0, import_toArray.default)(children).map((node) => {
|
|
42
43
|
if (import_react.default.isValidElement(node)) {
|
|
@@ -63,7 +64,7 @@ function convertItem(props, bordered) {
|
|
|
63
64
|
return {
|
|
64
65
|
...restItemProps,
|
|
65
66
|
// 无边框并且子元素非 Typography 时外面包一层 Typography.Text,以实现自动省略
|
|
66
|
-
children: bordered || (itemChildrenType == null ? void 0 : itemChildrenType.__ANT_TYPOGRAPHY) ? itemChildren : /* @__PURE__ */
|
|
67
|
+
children: bordered || (itemChildrenType == null ? void 0 : itemChildrenType.__ANT_TYPOGRAPHY) ? itemChildren : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
68
|
import_typography.default.Text,
|
|
68
69
|
{
|
|
69
70
|
...restContentProps,
|
|
@@ -76,9 +77,9 @@ function convertItem(props, bordered) {
|
|
|
76
77
|
} : editable === true ? {
|
|
77
78
|
autoSize: false
|
|
78
79
|
} : editable
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
),
|
|
81
|
+
children: itemChildren
|
|
82
|
+
}
|
|
82
83
|
)
|
|
83
84
|
};
|
|
84
85
|
}
|
|
@@ -35,12 +35,13 @@ __export(descriptions_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(descriptions_exports);
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
|
-
var import_react =
|
|
38
|
+
var import_react = require("react");
|
|
39
39
|
var import_config_provider = __toESM(require("../config-provider"));
|
|
40
40
|
var import_Item = __toESM(require("./Item"));
|
|
41
41
|
var import_useItems = __toESM(require("./hooks/useItems"));
|
|
42
42
|
var import_style = __toESM(require("./style"));
|
|
43
43
|
__reExport(descriptions_exports, require("antd/es/descriptions"), module.exports);
|
|
44
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
45
|
var Descriptions = ({
|
|
45
46
|
children,
|
|
46
47
|
bordered,
|
|
@@ -61,7 +62,7 @@ var Descriptions = ({
|
|
|
61
62
|
});
|
|
62
63
|
const newItems = (0, import_useItems.default)(items, children, bordered);
|
|
63
64
|
return wrapSSR(
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
65
66
|
import_antd.Descriptions,
|
|
66
67
|
{
|
|
67
68
|
layout,
|