@oceanbase/design 0.4.17 → 0.4.19
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/button/index.d.ts +1 -1
- package/es/descriptions/hooks/useItems.d.ts +6 -6
- package/es/form/FormItem.d.ts +1 -1
- 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/segmented/index.d.ts +1 -0
- package/es/segmented/index.js +15 -7
- package/es/segmented/style/index.js +1 -0
- package/es/typography/style/index.js +3 -0
- package/lib/alert/index.js +7 -6
- package/lib/badge/index.js +21 -18
- package/lib/button/index.d.ts +1 -1
- package/lib/button/index.js +2 -1
- package/lib/card/index.js +9 -5
- 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.d.ts +6 -6
- 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 -1
- package/lib/form/FormItem.js +9 -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.d.ts +1 -0
- package/lib/segmented/index.js +16 -5
- package/lib/segmented/style/index.js +1 -0
- 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.js +44 -31
- package/lib/tabs/index.js +10 -5
- 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 +3 -0
- package/package.json +6 -6
package/es/button/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { ButtonProps as AntButtonProps } from 'antd/es/button';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export * from 'antd/es/button';
|
|
4
4
|
export type ButtonProps = AntButtonProps;
|
|
5
|
-
declare const _default: React.ForwardRefExoticComponent<AntButtonProps & React.RefAttributes<
|
|
5
|
+
declare const _default: React.ForwardRefExoticComponent<AntButtonProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>> & {
|
|
6
6
|
Group: React.FC<import("antd/es/button").ButtonGroupProps>;
|
|
7
7
|
__ANT_BUTTON: boolean;
|
|
8
8
|
};
|
|
@@ -5,17 +5,17 @@ export default function useItems(items?: DescriptionsItemType[], children?: Reac
|
|
|
5
5
|
key?: React.Key;
|
|
6
6
|
label?: React.ReactNode;
|
|
7
7
|
span?: number | "filled" | {
|
|
8
|
-
xxl?: number;
|
|
9
|
-
xl?: number;
|
|
10
|
-
lg?: number;
|
|
11
|
-
md?: number;
|
|
12
|
-
sm?: number;
|
|
13
8
|
xs?: number;
|
|
9
|
+
sm?: number;
|
|
10
|
+
md?: number;
|
|
11
|
+
lg?: number;
|
|
12
|
+
xl?: number;
|
|
13
|
+
xxl?: number;
|
|
14
14
|
};
|
|
15
15
|
style?: React.CSSProperties;
|
|
16
|
-
className?: string;
|
|
17
16
|
classNames?: Partial<Record<"label" | "content", string>>;
|
|
18
17
|
styles?: Partial<Record<"label" | "content", React.CSSProperties>>;
|
|
18
|
+
className?: string;
|
|
19
19
|
labelStyle?: React.CSSProperties;
|
|
20
20
|
contentStyle?: React.CSSProperties;
|
|
21
21
|
}[];
|
package/es/form/FormItem.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { FormItemProps as AntFormItemProps } from 'antd/es/form';
|
|
|
4
4
|
import type { TooltipProps } from '../tooltip';
|
|
5
5
|
declare const AntFormItem: (<Values = any>(props: AntFormItemProps<Values>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
|
|
6
6
|
useStatus: () => {
|
|
7
|
-
status?: "" | "
|
|
7
|
+
status?: "" | "success" | "warning" | "error" | "validating";
|
|
8
8
|
errors: React.ReactNode[];
|
|
9
9
|
warnings: React.ReactNode[];
|
|
10
10
|
};
|
|
@@ -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: 'OK',
|
|
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/segmented/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { SegmentedRawOption } from 'rc-segmented';
|
|
|
6
6
|
export * from 'antd/es/segmented';
|
|
7
7
|
type BadgeType = BadgeProps | BadgeProps['count'];
|
|
8
8
|
export type SegmentedLabeledOption = AntSegmentedLabeledOption & {
|
|
9
|
+
icon?: React.ReactNode;
|
|
9
10
|
ellipsis?: EllipsisConfig;
|
|
10
11
|
badge?: BadgeType;
|
|
11
12
|
};
|
package/es/segmented/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var _excluded = ["prefixCls", "options"],
|
|
2
|
-
_excluded2 = ["label", "badge"];
|
|
2
|
+
_excluded2 = ["label", "icon", "badge", "ellipsis"];
|
|
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; }
|
|
@@ -39,16 +39,24 @@ var Segmented = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
39
39
|
}, []);
|
|
40
40
|
var newOptions = options === null || options === void 0 ? void 0 : options.map(function (item) {
|
|
41
41
|
if (_typeof(item) === 'object') {
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
var _ref2 = item,
|
|
43
|
+
label = _ref2.label,
|
|
44
|
+
icon = _ref2.icon,
|
|
45
|
+
badge = _ref2.badge,
|
|
46
|
+
_ref2$ellipsis = _ref2.ellipsis,
|
|
47
|
+
ellipsis = _ref2$ellipsis === void 0 ? {
|
|
48
|
+
tooltip: true
|
|
49
|
+
} : _ref2$ellipsis,
|
|
50
|
+
restItem = _objectWithoutProperties(_ref2, _excluded2);
|
|
45
51
|
return _objectSpread(_objectSpread({}, restItem), {}, {
|
|
46
52
|
label: /*#__PURE__*/_jsxs(Flex, {
|
|
47
|
-
gap: 4,
|
|
48
53
|
align: "center",
|
|
49
54
|
justify: "center",
|
|
50
|
-
children: [
|
|
51
|
-
|
|
55
|
+
children: [icon && /*#__PURE__*/_jsx("span", {
|
|
56
|
+
className: "".concat(prefixCls, "-item-icon"),
|
|
57
|
+
children: icon
|
|
58
|
+
}), ellipsis ? /*#__PURE__*/_jsx(Typography.Text, {
|
|
59
|
+
ellipsis: ellipsis,
|
|
52
60
|
children: label
|
|
53
61
|
}) : label, badge && renderBadge(badge)]
|
|
54
62
|
})
|
|
@@ -13,6 +13,7 @@ export var genSegmentedStyle = function genSegmentedStyle(token) {
|
|
|
13
13
|
})), '&:active', _defineProperty({}, "".concat(antCls, "-badge >").concat(antCls, "-badge-count"), {
|
|
14
14
|
backgroundColor: colorFillSecondary
|
|
15
15
|
})))), ">".concat(componentCls, "-item"), _defineProperty({}, ">".concat(componentCls, "-item-label"), _defineProperty({}, "".concat(antCls, "-badge >").concat(antCls, "-badge-count"), {
|
|
16
|
+
marginInlineStart: 4,
|
|
16
17
|
backgroundColor: colorFillSecondary,
|
|
17
18
|
color: 'inherit',
|
|
18
19
|
boxShadow: 'none'
|
|
@@ -41,14 +41,17 @@ export var genTypographyStyle = function genTypographyStyle(token) {
|
|
|
41
41
|
}
|
|
42
42
|
}), "".concat(componentCls).concat(componentCls, "-edit-content"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-div&"), {
|
|
43
43
|
insetInlineStart: -token.paddingSM,
|
|
44
|
+
insetBlockStart: 0,
|
|
44
45
|
marginTop: -marginOffset,
|
|
45
46
|
marginBottom: "calc(1em - ".concat(marginOffset, "px)")
|
|
46
47
|
}), "".concat(componentCls, "-span&"), {
|
|
47
48
|
insetInlineStart: -token.paddingSM,
|
|
49
|
+
insetBlockStart: 0,
|
|
48
50
|
marginTop: -marginOffset,
|
|
49
51
|
marginBottom: -marginOffset
|
|
50
52
|
}), "".concat(componentCls, "-h1&, ").concat(componentCls, "-h2&, ").concat(componentCls, "-h3&, ").concat(componentCls, "-h4&, ").concat(componentCls, "-h5&"), {
|
|
51
53
|
insetInlineStart: -token.paddingSM,
|
|
54
|
+
insetBlockStart: 0,
|
|
52
55
|
marginTop: "".concat(-marginOffset, "px !important"),
|
|
53
56
|
marginBottom: "".concat(-marginOffset, "px !important")
|
|
54
57
|
}));
|
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.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { ButtonProps as AntButtonProps } from 'antd/es/button';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export * from 'antd/es/button';
|
|
4
4
|
export type ButtonProps = AntButtonProps;
|
|
5
|
-
declare const _default: React.ForwardRefExoticComponent<AntButtonProps & React.RefAttributes<
|
|
5
|
+
declare const _default: React.ForwardRefExoticComponent<AntButtonProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>> & {
|
|
6
6
|
Group: React.FC<import("antd/es/button").ButtonGroupProps>;
|
|
7
7
|
__ANT_BUTTON: boolean;
|
|
8
8
|
};
|
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/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;
|
|
@@ -5,17 +5,17 @@ export default function useItems(items?: DescriptionsItemType[], children?: Reac
|
|
|
5
5
|
key?: React.Key;
|
|
6
6
|
label?: React.ReactNode;
|
|
7
7
|
span?: number | "filled" | {
|
|
8
|
-
xxl?: number;
|
|
9
|
-
xl?: number;
|
|
10
|
-
lg?: number;
|
|
11
|
-
md?: number;
|
|
12
|
-
sm?: number;
|
|
13
8
|
xs?: number;
|
|
9
|
+
sm?: number;
|
|
10
|
+
md?: number;
|
|
11
|
+
lg?: number;
|
|
12
|
+
xl?: number;
|
|
13
|
+
xxl?: number;
|
|
14
14
|
};
|
|
15
15
|
style?: React.CSSProperties;
|
|
16
|
-
className?: string;
|
|
17
16
|
classNames?: Partial<Record<"label" | "content", string>>;
|
|
18
17
|
styles?: Partial<Record<"label" | "content", React.CSSProperties>>;
|
|
18
|
+
className?: string;
|
|
19
19
|
labelStyle?: React.CSSProperties;
|
|
20
20
|
contentStyle?: React.CSSProperties;
|
|
21
21
|
}[];
|
|
@@ -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,
|
package/lib/drawer/index.js
CHANGED
|
@@ -43,6 +43,7 @@ var import_button = __toESM(require("../button"));
|
|
|
43
43
|
var import_en_US = __toESM(require("../locale/en-US"));
|
|
44
44
|
var import_style = __toESM(require("./style"));
|
|
45
45
|
__reExport(drawer_exports, require("antd/es/drawer"), module.exports);
|
|
46
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
46
47
|
var Drawer = ({
|
|
47
48
|
locale: customLocale,
|
|
48
49
|
children,
|
|
@@ -90,7 +91,7 @@ var Drawer = ({
|
|
|
90
91
|
rootClassName
|
|
91
92
|
);
|
|
92
93
|
return wrapSSR(
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
94
95
|
import_antd.Drawer,
|
|
95
96
|
{
|
|
96
97
|
destroyOnClose: true,
|
|
@@ -103,34 +104,42 @@ var Drawer = ({
|
|
|
103
104
|
})
|
|
104
105
|
},
|
|
105
106
|
styles: (0, import_lodash.omit)(styles, ["body", "footer"]),
|
|
106
|
-
...restProps
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
107
|
+
...restProps,
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
ref: (element) => {
|
|
113
|
+
setContentElement(element);
|
|
114
|
+
},
|
|
115
|
+
className: `${prefixCls}-body-content`,
|
|
116
|
+
style: {
|
|
117
|
+
...bodyStyle,
|
|
118
|
+
...styles == null ? void 0 : styles.body
|
|
119
|
+
},
|
|
120
|
+
children
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
showFooter && // footer className should not be `${prefixCls}-footer` to avoid conflicts with antd
|
|
124
|
+
// ref: https://github.com/ant-design/ant-design/blob/master/components/drawer/style/index.ts#L214
|
|
125
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
126
|
+
"div",
|
|
127
|
+
{
|
|
128
|
+
className: (0, import_classnames.default)(`${prefixCls}-footer-container`, {
|
|
129
|
+
[`${prefixCls}-footer-container-shadow`]: isScroll && !isTotalScroll
|
|
130
|
+
}),
|
|
131
|
+
style: styles == null ? void 0 : styles.footer,
|
|
132
|
+
children: (0, import_react.isValidElement)(footer) ? footer : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-footer-content`, children: [
|
|
133
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { children: [
|
|
134
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, { onClick: onOk, type: "primary", loading: confirmLoading, ...okButtonProps, children: okText || (drawerLocale == null ? void 0 : drawerLocale.okText) }),
|
|
135
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, { onClick: handleCancel, children: cancelText || (drawerLocale == null ? void 0 : drawerLocale.cancelText) })
|
|
136
|
+
] }),
|
|
137
|
+
footerExtra
|
|
138
|
+
] })
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
]
|
|
142
|
+
}
|
|
134
143
|
)
|
|
135
144
|
);
|
|
136
145
|
};
|