@oceanbase/design 0.2.5 → 0.2.7
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/index.js +2 -1
- package/es/card/style/index.js +5 -8
- package/es/index.d.ts +21 -0
- package/es/modal/index.d.ts +1 -1
- package/es/modal/index.js +4 -2
- package/{lib/tabs → es/modal}/style/index.d.ts +2 -2
- package/es/modal/style/index.js +4 -4
- package/es/style/reset.css +1 -0
- package/es/table/index.js +22 -17
- package/es/{tabs → table}/style/index.d.ts +2 -2
- package/es/table/style/index.js +11 -19
- package/es/tabs/index.js +2 -2
- package/es/theme/index.d.ts +1 -1
- package/es/theme/index.js +5 -5
- package/es/tooltip/MouseTooltip.js +9 -8
- package/lib/card/index.js +2 -1
- package/lib/card/style/index.js +4 -4
- package/lib/index.d.ts +21 -0
- package/lib/modal/index.d.ts +1 -1
- package/lib/modal/index.js +17 -2
- package/lib/modal/style/index.d.ts +8 -0
- package/lib/modal/style/index.js +2 -4
- package/lib/style/reset.css +1 -0
- package/lib/table/index.js +14 -9
- package/lib/table/style/index.d.ts +8 -0
- package/lib/table/style/index.js +7 -13
- package/lib/tabs/index.js +2 -1
- package/lib/theme/index.d.ts +1 -1
- package/lib/theme/index.js +5 -5
- package/lib/tooltip/MouseTooltip.js +8 -7
- package/package.json +4 -3
- package/es/alert/index.d.ts +0 -13
- package/es/button/index.d.ts +0 -11
- package/es/descriptions/index.d.ts +0 -11
- package/es/form/FormItem.d.ts +0 -16
- package/es/form/index.d.ts +0 -3
- package/es/form/interface.d.ts +0 -1
- package/es/locale/index.d.ts +0 -5
- package/es/message/interface.d.ts +0 -1
- package/es/modal/interface.d.ts +0 -1
- package/es/notification/interface.d.ts +0 -1
- package/es/table/interface.d.ts +0 -1
- package/es/tabs/hooks/useInkBar.d.ts +0 -12
- package/es/tabs/hooks/useLegacyItems.d.ts +0 -3
- package/es/tooltip/index.d.ts +0 -19
- package/lib/alert/index.d.ts +0 -13
- package/lib/button/index.d.ts +0 -11
- package/lib/descriptions/index.d.ts +0 -11
- package/lib/form/FormItem.d.ts +0 -16
- package/lib/form/index.d.ts +0 -3
- package/lib/form/interface.d.ts +0 -1
- package/lib/locale/index.d.ts +0 -5
- package/lib/message/interface.d.ts +0 -1
- package/lib/modal/interface.d.ts +0 -1
- package/lib/notification/interface.d.ts +0 -1
- package/lib/table/interface.d.ts +0 -1
- package/lib/tabs/hooks/useInkBar.d.ts +0 -12
- package/lib/tabs/hooks/useLegacyItems.d.ts +0 -3
- package/lib/tooltip/index.d.ts +0 -19
package/es/card/index.js
CHANGED
|
@@ -23,6 +23,7 @@ import useInkBar from "../tabs/hooks/useInkBar";
|
|
|
23
23
|
import useStyle from "./style";
|
|
24
24
|
export * from 'antd/es/card';
|
|
25
25
|
var Card = function Card(_ref) {
|
|
26
|
+
var _newTabList$;
|
|
26
27
|
var children = _ref.children,
|
|
27
28
|
_ref$divided = _ref.divided,
|
|
28
29
|
divided = _ref$divided === void 0 ? true : _ref$divided,
|
|
@@ -56,7 +57,7 @@ var Card = function Card(_ref) {
|
|
|
56
57
|
}
|
|
57
58
|
return item;
|
|
58
59
|
});
|
|
59
|
-
var _useState = useState(activeTabKey || defaultActiveTabKey || (newTabList === null || newTabList === void 0 ? void 0 : newTabList[0]
|
|
60
|
+
var _useState = useState(activeTabKey || defaultActiveTabKey || (newTabList === null || newTabList === void 0 ? void 0 : (_newTabList$ = newTabList[0]) === null || _newTabList$ === void 0 ? void 0 : _newTabList$.key)),
|
|
60
61
|
_useState2 = _slicedToArray(_useState, 2),
|
|
61
62
|
activeKey = _useState2[0],
|
|
62
63
|
setActiveKey = _useState2[1];
|
package/es/card/style/index.js
CHANGED
|
@@ -7,23 +7,20 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
7
7
|
import { genTagStyle } from "../../tabs/style";
|
|
8
8
|
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
9
9
|
export var genCardStyle = function genCardStyle(token) {
|
|
10
|
-
var
|
|
10
|
+
var _ref;
|
|
11
11
|
var componentCls = token.componentCls,
|
|
12
12
|
tabsComponentCls = token.tabsComponentCls,
|
|
13
13
|
tabsPrefixCls = token.tabsPrefixCls,
|
|
14
14
|
padding = token.padding,
|
|
15
15
|
paddingSM = token.paddingSM,
|
|
16
16
|
paddingLG = token.paddingLG;
|
|
17
|
-
return _ref = {}, _defineProperty(_ref, "".concat(componentCls).concat(componentCls, "-no-divider"), (
|
|
17
|
+
return _ref = {}, _defineProperty(_ref, "".concat(componentCls).concat(componentCls, "-no-divider"), _defineProperty({}, "".concat(componentCls, "-head"), {
|
|
18
18
|
borderBottom: 'none'
|
|
19
|
-
}), _defineProperty(
|
|
19
|
+
})), _defineProperty(_ref, "".concat(componentCls).concat(componentCls, "-no-divider:not(").concat(componentCls, "-contain-tabs)"), _defineProperty({}, "".concat(componentCls, "-body"), {
|
|
20
20
|
padding: "0 ".concat(paddingLG, "px ").concat(padding, "px ").concat(paddingLG, "px")
|
|
21
|
-
})
|
|
21
|
+
})), _defineProperty(_ref, "".concat(componentCls, "-small").concat(componentCls, "-no-divider:not(").concat(componentCls, "-contain-tabs)"), _defineProperty({}, "".concat(componentCls, "-body"), {
|
|
22
22
|
padding: "0 ".concat(paddingSM, "px 12px ").concat(paddingSM, "px")
|
|
23
|
-
})), _defineProperty(_ref, "".concat(componentCls).concat(componentCls, "-contain-tabs"), _defineProperty({}, "".concat(componentCls, "-head"), _objectSpread({
|
|
24
|
-
// 包含页签时,去掉 head 的底部分割线
|
|
25
|
-
borderBottom: 'none'
|
|
26
|
-
}, genTagStyle(_objectSpread(_objectSpread({}, token), {}, {
|
|
23
|
+
})), _defineProperty(_ref, "".concat(componentCls).concat(componentCls, "-contain-tabs"), _defineProperty({}, "".concat(componentCls, "-head"), _objectSpread({}, genTagStyle(_objectSpread(_objectSpread({}, token), {}, {
|
|
27
24
|
componentCls: tabsComponentCls,
|
|
28
25
|
prefixCls: tabsPrefixCls
|
|
29
26
|
}))))), _ref;
|
package/es/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import 'antd/dist/reset.css';
|
|
2
|
+
export * from 'antd';
|
|
3
|
+
export { version } from '../package.json';
|
|
4
|
+
export { default as Alert } from './alert';
|
|
5
|
+
export { default as Button } from './button';
|
|
6
|
+
export { default as Card } from './card';
|
|
7
|
+
export { default as ConfigProvider } from './config-provider';
|
|
8
|
+
export { default as Descriptions } from './descriptions';
|
|
9
|
+
export { default as Form } from './form';
|
|
10
|
+
export { default as Modal } from './modal';
|
|
11
|
+
export { message, notification, token } from './static-function';
|
|
12
|
+
export { default as Table } from './table';
|
|
13
|
+
export { default as Tabs } from './tabs';
|
|
14
|
+
export { default as theme } from './theme';
|
|
15
|
+
export { default as Tooltip } from './tooltip';
|
|
16
|
+
declare const useToken: () => {
|
|
17
|
+
theme: import("@ant-design/cssinjs").Theme<import("antd/es/theme/internal").SeedToken, import("antd/es/theme/interface").MapToken>;
|
|
18
|
+
token: import("antd").GlobalToken;
|
|
19
|
+
hashId: string;
|
|
20
|
+
};
|
|
21
|
+
export { useToken };
|
package/es/modal/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
export * from 'antd/es/modal';
|
|
4
4
|
export declare type ModalProps = AntModalProps;
|
|
5
5
|
declare const Modal: {
|
|
6
|
-
({ prefixCls: customizePrefixCls, className, ...restProps }: ModalProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
6
|
+
({ prefixCls: customizePrefixCls, className, rootClassName, ...restProps }: ModalProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
7
7
|
info(props: any): {
|
|
8
8
|
destroy: () => void;
|
|
9
9
|
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
package/es/modal/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["prefixCls", "className"];
|
|
1
|
+
var _excluded = ["prefixCls", "className", "rootClassName"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
@@ -12,6 +12,7 @@ export * from 'antd/es/modal';
|
|
|
12
12
|
var Modal = function Modal(_ref) {
|
|
13
13
|
var customizePrefixCls = _ref.prefixCls,
|
|
14
14
|
className = _ref.className,
|
|
15
|
+
rootClassName = _ref.rootClassName,
|
|
15
16
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
16
17
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
17
18
|
getPrefixCls = _useContext.getPrefixCls;
|
|
@@ -22,7 +23,8 @@ var Modal = function Modal(_ref) {
|
|
|
22
23
|
var modalCls = classNames(className, hashId);
|
|
23
24
|
return wrapSSR( /*#__PURE__*/React.createElement(AntModal, _extends({
|
|
24
25
|
prefixCls: customizePrefixCls,
|
|
25
|
-
className: modalCls
|
|
26
|
+
className: modalCls,
|
|
27
|
+
rootClassName: classNames(rootClassName, hashId)
|
|
26
28
|
}, restProps)));
|
|
27
29
|
};
|
|
28
30
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
2
|
-
export declare type
|
|
3
|
-
export declare const
|
|
2
|
+
export declare type ModalToken = FullToken<'Modal'>;
|
|
3
|
+
export declare const genModalStyle: GenerateStyle<ModalToken>;
|
|
4
4
|
declare const _default: (prefixCls: string) => {
|
|
5
5
|
wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
6
6
|
hashId: string;
|
package/es/modal/style/index.js
CHANGED
|
@@ -4,14 +4,14 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
4
4
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
5
5
|
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
6
6
|
export var genModalStyle = function genModalStyle(token) {
|
|
7
|
-
var
|
|
7
|
+
var _$concat$concat;
|
|
8
8
|
var componentCls = token.componentCls,
|
|
9
9
|
marginLG = token.marginLG;
|
|
10
|
-
return
|
|
10
|
+
return _defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-confirm)"), (_$concat$concat = {}, _defineProperty(_$concat$concat, "".concat(componentCls, "-header"), {
|
|
11
11
|
marginBottom: marginLG
|
|
12
|
-
})
|
|
12
|
+
}), _defineProperty(_$concat$concat, "".concat(componentCls, "-footer"), {
|
|
13
13
|
marginTop: marginLG
|
|
14
|
-
})
|
|
14
|
+
}), _$concat$concat));
|
|
15
15
|
};
|
|
16
16
|
export default (function (prefixCls) {
|
|
17
17
|
var useStyle = genComponentStyleHook('Modal', function (token) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '~antd/dist/reset.css';
|
package/es/table/index.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _excluded = ["batchOperationBar"];
|
|
2
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
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; }
|
|
6
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
5
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
6
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
7
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
8
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
13
9
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
|
+
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; }
|
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
14
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
14
17
|
import { Popover, Space, Table as AntTable, Typography } from 'antd';
|
|
15
|
-
import { useLocale } from 'antd/es/locale';
|
|
16
18
|
import classNames from 'classnames';
|
|
17
19
|
import { isEmpty } from 'lodash';
|
|
18
20
|
import React, { useContext, useEffect, useState } from 'react';
|
|
@@ -21,6 +23,7 @@ import enUS from "../locale/en-US";
|
|
|
21
23
|
import useStyle from "./style";
|
|
22
24
|
export * from 'antd/es/table';
|
|
23
25
|
function Table(props) {
|
|
26
|
+
var _enUS$Table;
|
|
24
27
|
var customLocale = props.locale,
|
|
25
28
|
columns = props.columns,
|
|
26
29
|
pagination = props.pagination,
|
|
@@ -33,10 +36,11 @@ function Table(props) {
|
|
|
33
36
|
hiddenCancelBtn = _props$hiddenCancelBt === void 0 ? false : _props$hiddenCancelBt,
|
|
34
37
|
customizePrefixCls = props.prefixCls,
|
|
35
38
|
className = props.className;
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
var _customLocale$batchOp = _objectSpread(_objectSpread({}, customLocale), {}, {
|
|
40
|
+
batchOperationBar: _objectSpread(_objectSpread({}, (_enUS$Table = enUS.Table) === null || _enUS$Table === void 0 ? void 0 : _enUS$Table.batchOperationBar), customLocale === null || customLocale === void 0 ? void 0 : customLocale.batchOperationBar)
|
|
41
|
+
}),
|
|
42
|
+
batchOperationBar = _customLocale$batchOp.batchOperationBar,
|
|
43
|
+
restLocale = _objectWithoutProperties(_customLocale$batchOp, _excluded);
|
|
40
44
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
41
45
|
getPrefixCls = _useContext.getPrefixCls;
|
|
42
46
|
var prefixCls = getPrefixCls('table', customizePrefixCls);
|
|
@@ -93,10 +97,11 @@ function Table(props) {
|
|
|
93
97
|
handleSelectedData([], [], currentSelectedInfo);
|
|
94
98
|
};
|
|
95
99
|
useEffect(function () {
|
|
96
|
-
if (isEmpty(currentSelectedRows) && toolSelectedContent)
|
|
100
|
+
if (isEmpty(currentSelectedRows) && toolSelectedContent) {
|
|
101
|
+
setOpenPopver(false);
|
|
102
|
+
}
|
|
97
103
|
}, [currentSelectedRows]);
|
|
98
104
|
var renderOptionsBar = function renderOptionsBar(total, range) {
|
|
99
|
-
var _locale$batchOperatio, _locale$batchOperatio2, _locale$batchOperatio3;
|
|
100
105
|
if (isEmpty(rowSelection) || isEmpty(currentSelectedRowKeys)) {
|
|
101
106
|
return /*#__PURE__*/React.createElement("span", null, pagination && (pagination === null || pagination === void 0 ? void 0 : pagination.showTotal) && (pagination === null || pagination === void 0 ? void 0 : pagination.showTotal(total, range)));
|
|
102
107
|
}
|
|
@@ -109,11 +114,11 @@ function Table(props) {
|
|
|
109
114
|
}
|
|
110
115
|
}, toolAlertRender && toolAlertRender(currentSelectedRowKeys, currentSelectedRows), !toolAlertRender && toolAlertRender !== false && /*#__PURE__*/React.createElement("span", {
|
|
111
116
|
className: "".concat(prefixCls, "-batch-operation-selection")
|
|
112
|
-
}, /*#__PURE__*/React.createElement("span", null,
|
|
117
|
+
}, /*#__PURE__*/React.createElement("span", null, batchOperationBar === null || batchOperationBar === void 0 ? void 0 : batchOperationBar.selected), /*#__PURE__*/React.createElement("span", {
|
|
113
118
|
className: "".concat(prefixCls, "-batch-operation-selection-count")
|
|
114
|
-
}, (currentSelectedRowKeys === null || currentSelectedRowKeys === void 0 ? void 0 : currentSelectedRowKeys.length) || 0), /*#__PURE__*/React.createElement("span", null,
|
|
119
|
+
}, (currentSelectedRowKeys === null || currentSelectedRowKeys === void 0 ? void 0 : currentSelectedRowKeys.length) || 0), /*#__PURE__*/React.createElement("span", null, batchOperationBar === null || batchOperationBar === void 0 ? void 0 : batchOperationBar.object)), !hiddenCancelBtn && /*#__PURE__*/React.createElement("a", {
|
|
115
120
|
onClick: handleOptionsCancel
|
|
116
|
-
},
|
|
121
|
+
}, batchOperationBar === null || batchOperationBar === void 0 ? void 0 : batchOperationBar.cancel), toolSelectedContent && /*#__PURE__*/React.createElement(Popover, {
|
|
117
122
|
placement: "top",
|
|
118
123
|
overlayClassName: "".concat(prefixCls, "-batch-operation-selection-popover"),
|
|
119
124
|
content: toolSelectedContent === null || toolSelectedContent === void 0 ? void 0 : toolSelectedContent(currentSelectedRowKeys, currentSelectedRows),
|
|
@@ -123,14 +128,14 @@ function Table(props) {
|
|
|
123
128
|
onClick: function onClick() {
|
|
124
129
|
return setOpenPopver(!openPopver);
|
|
125
130
|
}
|
|
126
|
-
}, openPopver ?
|
|
131
|
+
}, openPopver ? batchOperationBar === null || batchOperationBar === void 0 ? void 0 : batchOperationBar.collapse : batchOperationBar === null || batchOperationBar === void 0 ? void 0 : batchOperationBar.open))), toolOptionsRender && /*#__PURE__*/React.createElement(Space, {
|
|
127
132
|
size: 8
|
|
128
133
|
}, toolOptionsRender === null || toolOptionsRender === void 0 ? void 0 : toolOptionsRender(currentSelectedRowKeys, currentSelectedRows))), /*#__PURE__*/React.createElement("span", null, pagination && (pagination === null || pagination === void 0 ? void 0 : pagination.showTotal) && (pagination === null || pagination === void 0 ? void 0 : pagination.showTotal(total, range))));
|
|
129
134
|
};
|
|
130
135
|
return wrapSSR( /*#__PURE__*/React.createElement(AntTable, _extends({}, props, {
|
|
131
136
|
prefixCls: customizePrefixCls,
|
|
132
137
|
className: tableCls,
|
|
133
|
-
locale:
|
|
138
|
+
locale: restLocale,
|
|
134
139
|
columns: newColumns,
|
|
135
140
|
rowSelection: rowSelection ? _objectSpread(_objectSpread({}, rowSelection), {}, {
|
|
136
141
|
onChange: function onChange(selectedRowKeys, selectedRows, info) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
2
|
-
export declare type
|
|
3
|
-
export declare const
|
|
2
|
+
export declare type TableToken = FullToken<'Table'>;
|
|
3
|
+
export declare const genTableStyle: GenerateStyle<TableToken>;
|
|
4
4
|
declare const _default: (prefixCls: string) => {
|
|
5
5
|
wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
6
6
|
hashId: string;
|
package/es/table/style/index.js
CHANGED
|
@@ -4,7 +4,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
4
4
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
5
5
|
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
6
6
|
export var genTableStyle = function genTableStyle(token) {
|
|
7
|
-
var _$concat, _trTd$concat$co, _$concat4, _$concat$concat, _$concat7, _$concat$concat4, _$concat14, _ref;
|
|
7
|
+
var _$concat, _trTd$concat$co, _$concat4, _$concat$concat, _$concat7, _trNthChild2nNot, _$concat$concat4, _$concat14, _ref;
|
|
8
8
|
var antCls = token.antCls,
|
|
9
9
|
componentCls = token.componentCls,
|
|
10
10
|
colorTextBase = token.colorTextBase,
|
|
@@ -39,18 +39,12 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
39
39
|
backgroundColor: colorBgBase
|
|
40
40
|
}), _defineProperty(_$concat, "".concat(componentCls, "-cell-scrollbar"), {
|
|
41
41
|
boxShadow: "0 1px 0 1px ".concat(colorBgBase)
|
|
42
|
-
}), _$concat)), _defineProperty(_$concat$concat, "".concat(componentCls, "-tbody"), (_$concat4 = {}, _defineProperty(_$concat4, "tr:nth-child(2n + 1):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected)"), {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}), _defineProperty(_$concat4, "tr:
|
|
47
|
-
|
|
48
|
-
backgroundColor: colorFillQuaternary
|
|
49
|
-
}
|
|
50
|
-
}), _defineProperty(_$concat4, "tr:not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-expanded-row):hover"), {
|
|
51
|
-
td: {
|
|
52
|
-
backgroundColor: "".concat(colorPrimaryBgHover, " !important")
|
|
53
|
-
}
|
|
42
|
+
}), _$concat)), _defineProperty(_$concat$concat, "".concat(componentCls, "-tbody"), (_$concat4 = {}, _defineProperty(_$concat4, "tr:nth-child(2n + 1):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected) > td"), {
|
|
43
|
+
backgroundColor: colorBgBase
|
|
44
|
+
}), _defineProperty(_$concat4, "tr:nth-child(2n):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(componentCls, "-expanded-row) > td"), {
|
|
45
|
+
backgroundColor: colorFillQuaternary
|
|
46
|
+
}), _defineProperty(_$concat4, "tr:not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-expanded-row):hover > td"), {
|
|
47
|
+
backgroundColor: "".concat(colorPrimaryBgHover, " !important")
|
|
54
48
|
}), _defineProperty(_$concat4, "tr".concat(componentCls, "-row-selected > td"), {
|
|
55
49
|
backgroundColor: colorPrimaryBg
|
|
56
50
|
}), _defineProperty(_$concat4, "".concat(componentCls, "-expanded-row > td"), _defineProperty({
|
|
@@ -77,15 +71,13 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
77
71
|
padding: largeCellPadding
|
|
78
72
|
})), _$concat7)), _defineProperty(_ref, "".concat(componentCls, "-wrapper:not(").concat(componentCls, "-expandable)"), _defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-bordered)"), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "tr:not(".concat(componentCls, "-measure-row) > td"), {
|
|
79
73
|
border: 'none'
|
|
80
|
-
})))), _defineProperty(_ref, "".concat(componentCls, "-wrapper").concat(componentCls, "-expandable"), (_$concat$concat4 = {}, _defineProperty(_$concat$concat4, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "tr:nth-child(2n):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(componentCls, "-expanded-row)"), _defineProperty({
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
}, '&:hover', {
|
|
74
|
+
})))), _defineProperty(_ref, "".concat(componentCls, "-wrapper").concat(componentCls, "-expandable"), (_$concat$concat4 = {}, _defineProperty(_$concat$concat4, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "tr:nth-child(2n):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(componentCls, "-expanded-row)"), (_trNthChild2nNot = {}, _defineProperty(_trNthChild2nNot, '& > td', {
|
|
75
|
+
backgroundColor: colorBgBase
|
|
76
|
+
}), _defineProperty(_trNthChild2nNot, '&:hover', {
|
|
85
77
|
td: {
|
|
86
78
|
backgroundColor: colorPrimaryBgHover
|
|
87
79
|
}
|
|
88
|
-
})))), _defineProperty(_$concat$concat4, "".concat(componentCls, "-pagination"), _defineProperty({}, "&".concat(antCls, "-pagination"), {
|
|
80
|
+
}), _trNthChild2nNot)))), _defineProperty(_$concat$concat4, "".concat(componentCls, "-pagination"), _defineProperty({}, "&".concat(antCls, "-pagination"), {
|
|
89
81
|
borderTop: 'none'
|
|
90
82
|
})), _$concat$concat4)), _defineProperty(_ref, "".concat(componentCls, "-wrapper"), _defineProperty({}, "".concat(componentCls, "-pagination"), (_$concat14 = {}, _defineProperty(_$concat14, "&".concat(antCls, "-pagination"), {
|
|
91
83
|
padding: "".concat(padding, "px 0"),
|
package/es/tabs/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import useStyle from "./style";
|
|
|
25
25
|
import TabPane from "./TabPane";
|
|
26
26
|
export * from 'antd/es/tabs';
|
|
27
27
|
var Tabs = function Tabs(_ref) {
|
|
28
|
-
var _newItems
|
|
28
|
+
var _newItems, _newItems$;
|
|
29
29
|
var children = _ref.children,
|
|
30
30
|
items = _ref.items,
|
|
31
31
|
defaultActiveKey = _ref.defaultActiveKey,
|
|
@@ -60,7 +60,7 @@ var Tabs = function Tabs(_ref) {
|
|
|
60
60
|
return item;
|
|
61
61
|
});
|
|
62
62
|
newItems = useLegacyItems(newItems, children, prefixCls);
|
|
63
|
-
var _useState = useState(activeKeyProp || defaultActiveKey || ((_newItems = newItems) === null || _newItems === void 0 ? void 0 : _newItems[0]
|
|
63
|
+
var _useState = useState(activeKeyProp || defaultActiveKey || ((_newItems = newItems) === null || _newItems === void 0 ? void 0 : (_newItems$ = _newItems[0]) === null || _newItems$ === void 0 ? void 0 : _newItems$.key)),
|
|
64
64
|
_useState2 = _slicedToArray(_useState, 2),
|
|
65
65
|
activeKey = _useState2[0],
|
|
66
66
|
setActiveKey = _useState2[1];
|
package/es/theme/index.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ export * from 'antd/es/theme';
|
|
|
2
2
|
declare const _default: {
|
|
3
3
|
defaultSeed: {
|
|
4
4
|
colorPrimary: string;
|
|
5
|
+
colorInfo: string;
|
|
5
6
|
colorSuccess: string;
|
|
6
7
|
colorWarning: string;
|
|
7
8
|
colorError: string;
|
|
8
|
-
colorInfo: string;
|
|
9
9
|
borderRadius: number;
|
|
10
10
|
blue: string;
|
|
11
11
|
green: string;
|
package/es/theme/index.js
CHANGED
|
@@ -8,16 +8,16 @@ import { theme } from 'antd';
|
|
|
8
8
|
export * from 'antd/es/theme';
|
|
9
9
|
var defaultSeed = _objectSpread(_objectSpread({}, theme.defaultSeed), {}, {
|
|
10
10
|
colorPrimary: '#006AFF',
|
|
11
|
+
colorInfo: '#006aff',
|
|
11
12
|
colorSuccess: '#0ac185',
|
|
12
13
|
colorWarning: '#ffac33',
|
|
13
14
|
colorError: '#ff4b4b',
|
|
14
|
-
colorInfo: '#006aff',
|
|
15
15
|
borderRadius: 6,
|
|
16
16
|
// 以下四种预设颜色和语义色保持一致
|
|
17
|
-
blue: '#
|
|
18
|
-
green: '#
|
|
19
|
-
yellow: '#
|
|
20
|
-
red: '#
|
|
17
|
+
blue: '#006aff',
|
|
18
|
+
green: '#0ac185',
|
|
19
|
+
yellow: '#ffac33',
|
|
20
|
+
red: '#ff4b4b'
|
|
21
21
|
});
|
|
22
22
|
export default _objectSpread(_objectSpread({}, theme), {}, {
|
|
23
23
|
defaultSeed: defaultSeed,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["children", "title", "visible", "open", "onOpenChange", "onVisibleChange", "overlayInnerStyle", "mouseEnterDelay", "mouseLeaveDelay"],
|
|
2
|
+
var _excluded = ["children", "title", "color", "visible", "open", "onOpenChange", "onVisibleChange", "overlayInnerStyle", "mouseEnterDelay", "mouseLeaveDelay"],
|
|
3
3
|
_excluded2 = ["color"];
|
|
4
4
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -22,6 +22,7 @@ import { token } from "../static-function";
|
|
|
22
22
|
var MouseTooltip = function MouseTooltip(_ref) {
|
|
23
23
|
var children = _ref.children,
|
|
24
24
|
title = _ref.title,
|
|
25
|
+
backgroundColor = _ref.color,
|
|
25
26
|
_ref$visible = _ref.visible,
|
|
26
27
|
outerVisible = _ref$visible === void 0 ? true : _ref$visible,
|
|
27
28
|
_ref$open = _ref.open,
|
|
@@ -39,12 +40,12 @@ var MouseTooltip = function MouseTooltip(_ref) {
|
|
|
39
40
|
visible = _useState2[0],
|
|
40
41
|
setVisible = _useState2[1];
|
|
41
42
|
var _ref2 = overlayInnerStyle || {},
|
|
42
|
-
|
|
43
|
+
textColor = _ref2.color,
|
|
43
44
|
restOverlayInnerStyle = _objectWithoutProperties(_ref2, _excluded2);
|
|
44
45
|
var handleVisibleChange = function handleVisibleChange(value) {
|
|
45
46
|
setVisible(value);
|
|
46
|
-
onOpenChange(value);
|
|
47
|
-
onVisibleChange(value);
|
|
47
|
+
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(value);
|
|
48
|
+
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(value);
|
|
48
49
|
};
|
|
49
50
|
|
|
50
51
|
// 获取鼠标位置
|
|
@@ -76,9 +77,9 @@ var MouseTooltip = function MouseTooltip(_ref) {
|
|
|
76
77
|
onMouseLeave: function onMouseLeave() {
|
|
77
78
|
setTimeout(function () {
|
|
78
79
|
handleVisibleChange(false);
|
|
79
|
-
}, mouseLeaveDelay);
|
|
80
|
+
}, mouseLeaveDelay * 1000);
|
|
80
81
|
}
|
|
81
|
-
}, children), /*#__PURE__*/React.createElement(ReactStickyMouseTooltip, _extends({
|
|
82
|
+
}, children), title && /*#__PURE__*/React.createElement(ReactStickyMouseTooltip, _extends({
|
|
82
83
|
visible: visible,
|
|
83
84
|
style: _objectSpread({
|
|
84
85
|
// 需要大于 Popover 的 1030 zIndex 值,否则会被遮挡
|
|
@@ -86,8 +87,8 @@ var MouseTooltip = function MouseTooltip(_ref) {
|
|
|
86
87
|
padding: '6px 8px',
|
|
87
88
|
boxShadow: token.boxShadowSecondary,
|
|
88
89
|
borderRadius: token.borderRadius,
|
|
89
|
-
color:
|
|
90
|
-
backgroundColor: token.colorBgSpotlight,
|
|
90
|
+
color: textColor || token.colorTextLightSolid,
|
|
91
|
+
backgroundColor: backgroundColor || token.colorBgSpotlight,
|
|
91
92
|
left: isOverWidth ? mouse.clientX - tooltipWidth - offset : mouse.clientX + offset,
|
|
92
93
|
top: isOverHeight ? mouse.clientY - tooltipHeight - offset : mouse.clientY + offset
|
|
93
94
|
}, restOverlayInnerStyle)
|
package/lib/card/index.js
CHANGED
|
@@ -53,6 +53,7 @@ var Card = ({
|
|
|
53
53
|
className,
|
|
54
54
|
...restProps
|
|
55
55
|
}) => {
|
|
56
|
+
var _a;
|
|
56
57
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
57
58
|
const prefixCls = getPrefixCls("card", customizePrefixCls);
|
|
58
59
|
const tabsPrefixCls = getPrefixCls("tabs", customizePrefixCls);
|
|
@@ -75,7 +76,7 @@ var Card = ({
|
|
|
75
76
|
return item;
|
|
76
77
|
});
|
|
77
78
|
const [activeKey, setActiveKey] = (0, import_react.useState)(
|
|
78
|
-
activeTabKey || defaultActiveTabKey || (newTabList == null ? void 0 : newTabList[0].key)
|
|
79
|
+
activeTabKey || defaultActiveTabKey || ((_a = newTabList == null ? void 0 : newTabList[0]) == null ? void 0 : _a.key)
|
|
79
80
|
);
|
|
80
81
|
(0, import_useInkBar.default)({
|
|
81
82
|
prefixCls: tabsPrefixCls,
|
package/lib/card/style/index.js
CHANGED
|
@@ -31,20 +31,20 @@ var genCardStyle = (token) => {
|
|
|
31
31
|
[`${componentCls}${componentCls}-no-divider`]: {
|
|
32
32
|
[`${componentCls}-head`]: {
|
|
33
33
|
borderBottom: "none"
|
|
34
|
-
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
[`${componentCls}${componentCls}-no-divider:not(${componentCls}-contain-tabs)`]: {
|
|
35
37
|
[`${componentCls}-body`]: {
|
|
36
38
|
padding: `0 ${paddingLG}px ${padding}px ${paddingLG}px`
|
|
37
39
|
}
|
|
38
40
|
},
|
|
39
|
-
[`${componentCls}-small${componentCls}-no-divider`]: {
|
|
41
|
+
[`${componentCls}-small${componentCls}-no-divider:not(${componentCls}-contain-tabs)`]: {
|
|
40
42
|
[`${componentCls}-body`]: {
|
|
41
43
|
padding: `0 ${paddingSM}px 12px ${paddingSM}px`
|
|
42
44
|
}
|
|
43
45
|
},
|
|
44
46
|
[`${componentCls}${componentCls}-contain-tabs`]: {
|
|
45
47
|
[`${componentCls}-head`]: {
|
|
46
|
-
// 包含页签时,去掉 head 的底部分割线
|
|
47
|
-
borderBottom: "none",
|
|
48
48
|
...(0, import_style.genTagStyle)({
|
|
49
49
|
...token,
|
|
50
50
|
componentCls: tabsComponentCls,
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import 'antd/dist/reset.css';
|
|
2
|
+
export * from 'antd';
|
|
3
|
+
export { version } from '../package.json';
|
|
4
|
+
export { default as Alert } from './alert';
|
|
5
|
+
export { default as Button } from './button';
|
|
6
|
+
export { default as Card } from './card';
|
|
7
|
+
export { default as ConfigProvider } from './config-provider';
|
|
8
|
+
export { default as Descriptions } from './descriptions';
|
|
9
|
+
export { default as Form } from './form';
|
|
10
|
+
export { default as Modal } from './modal';
|
|
11
|
+
export { message, notification, token } from './static-function';
|
|
12
|
+
export { default as Table } from './table';
|
|
13
|
+
export { default as Tabs } from './tabs';
|
|
14
|
+
export { default as theme } from './theme';
|
|
15
|
+
export { default as Tooltip } from './tooltip';
|
|
16
|
+
declare const useToken: () => {
|
|
17
|
+
theme: import("@ant-design/cssinjs").Theme<import("antd/es/theme/internal").SeedToken, import("antd/es/theme/interface").MapToken>;
|
|
18
|
+
token: import("antd").GlobalToken;
|
|
19
|
+
hashId: string;
|
|
20
|
+
};
|
|
21
|
+
export { useToken };
|
package/lib/modal/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
export * from 'antd/es/modal';
|
|
4
4
|
export declare type ModalProps = AntModalProps;
|
|
5
5
|
declare const Modal: {
|
|
6
|
-
({ prefixCls: customizePrefixCls, className, ...restProps }: ModalProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
6
|
+
({ prefixCls: customizePrefixCls, className, rootClassName, ...restProps }: ModalProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
7
7
|
info(props: any): {
|
|
8
8
|
destroy: () => void;
|
|
9
9
|
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
package/lib/modal/index.js
CHANGED
|
@@ -40,12 +40,27 @@ var import_config_provider = __toESM(require("../config-provider"));
|
|
|
40
40
|
var import_static_function = require("../static-function");
|
|
41
41
|
var import_style = __toESM(require("./style"));
|
|
42
42
|
__reExport(modal_exports, require("antd/es/modal"), module.exports);
|
|
43
|
-
var Modal = ({
|
|
43
|
+
var Modal = ({
|
|
44
|
+
prefixCls: customizePrefixCls,
|
|
45
|
+
className,
|
|
46
|
+
rootClassName,
|
|
47
|
+
...restProps
|
|
48
|
+
}) => {
|
|
44
49
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
45
50
|
const prefixCls = getPrefixCls("modal", customizePrefixCls);
|
|
46
51
|
const { wrapSSR, hashId } = (0, import_style.default)(prefixCls);
|
|
47
52
|
const modalCls = (0, import_classnames.default)(className, hashId);
|
|
48
|
-
return wrapSSR(
|
|
53
|
+
return wrapSSR(
|
|
54
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
55
|
+
import_antd.Modal,
|
|
56
|
+
{
|
|
57
|
+
prefixCls: customizePrefixCls,
|
|
58
|
+
className: modalCls,
|
|
59
|
+
rootClassName: (0, import_classnames.default)(rootClassName, hashId),
|
|
60
|
+
...restProps
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
);
|
|
49
64
|
};
|
|
50
65
|
Modal.info = (props) => import_static_function.modal.info(props);
|
|
51
66
|
Modal.success = (props) => import_static_function.modal.success(props);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
2
|
+
export declare type ModalToken = FullToken<'Modal'>;
|
|
3
|
+
export declare const genModalStyle: GenerateStyle<ModalToken>;
|
|
4
|
+
declare const _default: (prefixCls: string) => {
|
|
5
|
+
wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
6
|
+
hashId: string;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
package/lib/modal/style/index.js
CHANGED
|
@@ -27,12 +27,10 @@ var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
|
27
27
|
var genModalStyle = (token) => {
|
|
28
28
|
const { componentCls, marginLG } = token;
|
|
29
29
|
return {
|
|
30
|
-
[`${componentCls}:not(${componentCls}-confirm`]: {
|
|
30
|
+
[`${componentCls}:not(${componentCls}-confirm)`]: {
|
|
31
31
|
[`${componentCls}-header`]: {
|
|
32
32
|
marginBottom: marginLG
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
[`${componentCls}:not(${componentCls}-confirm`]: {
|
|
33
|
+
},
|
|
36
34
|
[`${componentCls}-footer`]: {
|
|
37
35
|
marginTop: marginLG
|
|
38
36
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '~antd/dist/reset.css';
|