@oceanbase/design 0.2.4 → 0.2.6
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 +5 -5
- package/es/card/style/index.js +5 -7
- package/es/modal/index.d.ts +1 -1
- package/es/modal/index.js +4 -2
- package/{lib/card → es/modal}/style/index.d.ts +3 -6
- package/es/modal/style/index.js +4 -4
- package/es/style/reset.css +1 -0
- package/es/table/index.js +22 -17
- package/es/{card → table}/style/index.d.ts +3 -6
- package/es/table/style/index.js +11 -19
- package/es/tabs/hooks/useInkBar.js +2 -2
- package/es/tabs/index.js +5 -6
- package/es/tabs/style/index.js +6 -6
- package/es/theme/index.d.ts +1 -1
- package/es/theme/index.js +5 -5
- package/lib/card/index.js +5 -3
- package/lib/card/style/index.js +6 -14
- 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/hooks/useInkBar.js +1 -1
- package/lib/tabs/index.js +5 -3
- package/lib/tabs/style/index.js +6 -8
- package/lib/theme/index.d.ts +1 -1
- package/lib/theme/index.js +5 -5
- package/package.json +4 -3
- package/es/_util/genComponentStyleHook.d.ts +0 -9
- 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/useLegacyItems.d.ts +0 -3
- package/es/tooltip/MouseTooltip.d.ts +0 -9
- package/es/tooltip/index.d.ts +0 -19
- package/lib/_util/genComponentStyleHook.d.ts +0 -9
- 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/useLegacyItems.d.ts +0 -3
- package/lib/tooltip/MouseTooltip.d.ts +0 -9
- 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];
|
|
@@ -68,9 +69,8 @@ var Card = function Card(_ref) {
|
|
|
68
69
|
tabPosition: tabProps === null || tabProps === void 0 ? void 0 : tabProps.tabPosition,
|
|
69
70
|
containerRef: ref
|
|
70
71
|
});
|
|
71
|
-
return wrapSSR( /*#__PURE__*/React.createElement(
|
|
72
|
-
ref: ref
|
|
73
|
-
}, /*#__PURE__*/React.createElement(AntCard, _extends({
|
|
72
|
+
return wrapSSR( /*#__PURE__*/React.createElement(AntCard, _extends({
|
|
73
|
+
ref: ref,
|
|
74
74
|
tabList: newTabList,
|
|
75
75
|
defaultActiveTabKey: defaultActiveTabKey,
|
|
76
76
|
activeTabKey: activeTabKey,
|
|
@@ -81,7 +81,7 @@ var Card = function Card(_ref) {
|
|
|
81
81
|
tabProps: tabProps,
|
|
82
82
|
prefixCls: customizePrefixCls,
|
|
83
83
|
className: cardCls
|
|
84
|
-
}, restProps), children))
|
|
84
|
+
}, restProps), children));
|
|
85
85
|
};
|
|
86
86
|
Card.Grid = AntCard.Grid;
|
|
87
87
|
Card.Meta = AntCard.Meta;
|
package/es/card/style/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export var genCardStyle = function genCardStyle(token) {
|
|
|
10
10
|
var _$concat$concat, _ref;
|
|
11
11
|
var componentCls = token.componentCls,
|
|
12
12
|
tabsComponentCls = token.tabsComponentCls,
|
|
13
|
+
tabsPrefixCls = token.tabsPrefixCls,
|
|
13
14
|
padding = token.padding,
|
|
14
15
|
paddingSM = token.paddingSM,
|
|
15
16
|
paddingLG = token.paddingLG;
|
|
@@ -19,12 +20,12 @@ export var genCardStyle = function genCardStyle(token) {
|
|
|
19
20
|
padding: "0 ".concat(paddingLG, "px ").concat(padding, "px ").concat(paddingLG, "px")
|
|
20
21
|
}), _$concat$concat)), _defineProperty(_ref, "".concat(componentCls, "-small").concat(componentCls, "-no-divider"), _defineProperty({}, "".concat(componentCls, "-body"), {
|
|
21
22
|
padding: "0 ".concat(paddingSM, "px 12px ").concat(paddingSM, "px")
|
|
22
|
-
})), _defineProperty(_ref, "".concat(componentCls).concat(componentCls, "-contain-tabs"), _defineProperty({}, "".concat(componentCls, "-head"),
|
|
23
|
+
})), _defineProperty(_ref, "".concat(componentCls).concat(componentCls, "-contain-tabs"), _defineProperty({}, "".concat(componentCls, "-head"), _objectSpread({
|
|
23
24
|
// 包含页签时,去掉 head 的底部分割线
|
|
24
25
|
borderBottom: 'none'
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
}, genTagStyle(_objectSpread(_objectSpread({}, token), {}, {
|
|
27
|
+
componentCls: tabsComponentCls,
|
|
28
|
+
prefixCls: tabsPrefixCls
|
|
28
29
|
}))))), _ref;
|
|
29
30
|
};
|
|
30
31
|
export default (function (prefixCls, tabsPrefixCls) {
|
|
@@ -32,9 +33,6 @@ export default (function (prefixCls, tabsPrefixCls) {
|
|
|
32
33
|
return [genCardStyle(_objectSpread(_objectSpread({}, token), {}, {
|
|
33
34
|
tabsComponentCls: ".".concat(tabsPrefixCls),
|
|
34
35
|
tabsPrefixCls: tabsPrefixCls
|
|
35
|
-
})), genTagStyle(_objectSpread(_objectSpread({}, token), {}, {
|
|
36
|
-
componentCls: ".".concat(tabsPrefixCls),
|
|
37
|
-
prefixCls: tabsPrefixCls
|
|
38
36
|
}))];
|
|
39
37
|
});
|
|
40
38
|
return useStyle(prefixCls);
|
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,10 +1,7 @@
|
|
|
1
1
|
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
2
|
-
export declare type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
export declare const genCardStyle: GenerateStyle<CardToken>;
|
|
7
|
-
declare const _default: (prefixCls: string, tabsPrefixCls: string) => {
|
|
2
|
+
export declare type ModalToken = FullToken<'Modal'>;
|
|
3
|
+
export declare const genModalStyle: GenerateStyle<ModalToken>;
|
|
4
|
+
declare const _default: (prefixCls: string) => {
|
|
8
5
|
wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
9
6
|
hashId: string;
|
|
10
7
|
};
|
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,10 +1,7 @@
|
|
|
1
1
|
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
2
|
-
export declare type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
export declare const genCardStyle: GenerateStyle<CardToken>;
|
|
7
|
-
declare const _default: (prefixCls: string, tabsPrefixCls: string) => {
|
|
2
|
+
export declare type TableToken = FullToken<'Table'>;
|
|
3
|
+
export declare const genTableStyle: GenerateStyle<TableToken>;
|
|
4
|
+
declare const _default: (prefixCls: string) => {
|
|
8
5
|
wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
9
6
|
hashId: string;
|
|
10
7
|
};
|
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"),
|
|
@@ -23,8 +23,8 @@ export default (function (_ref) {
|
|
|
23
23
|
var horizontalOffset = 8;
|
|
24
24
|
setTimeout(function () {
|
|
25
25
|
if ((!type || type === 'line') && inkBarNode) {
|
|
26
|
-
// 水平布局,如果 inkbar 宽度
|
|
27
|
-
if (isHorizontal && (activeTabNode === null || activeTabNode === void 0 ? void 0 : activeTabNode.offsetWidth)
|
|
26
|
+
// 水平布局,如果 inkbar 宽度 >= 24,则两侧各减去 8px,并保持水平居中
|
|
27
|
+
if (isHorizontal && (activeTabNode === null || activeTabNode === void 0 ? void 0 : activeTabNode.offsetWidth) >= 24) {
|
|
28
28
|
inkBarNode.style.width = "".concat((activeTabNode === null || activeTabNode === void 0 ? void 0 : activeTabNode.offsetWidth) - horizontalOffset * 2, "px");
|
|
29
29
|
inkBarNode.style.marginLeft = "".concat(horizontalOffset, "px");
|
|
30
30
|
inkBarNode.style.marginTop = '0px';
|
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];
|
|
@@ -72,9 +72,8 @@ var Tabs = function Tabs(_ref) {
|
|
|
72
72
|
tabPosition: tabPosition,
|
|
73
73
|
containerRef: ref
|
|
74
74
|
});
|
|
75
|
-
return wrapSSR( /*#__PURE__*/React.createElement(
|
|
76
|
-
ref: ref
|
|
77
|
-
}, /*#__PURE__*/React.createElement(AntTabs, _extends({
|
|
75
|
+
return wrapSSR( /*#__PURE__*/React.createElement(AntTabs, _extends({
|
|
76
|
+
ref: ref,
|
|
78
77
|
items: newItems,
|
|
79
78
|
defaultActiveKey: defaultActiveKey,
|
|
80
79
|
activeKey: activeKey,
|
|
@@ -88,7 +87,7 @@ var Tabs = function Tabs(_ref) {
|
|
|
88
87
|
tabBarGutter: !type || type === 'line' ? isHorizontal ? 24 : 0 : undefined,
|
|
89
88
|
prefixCls: customizePrefixCls,
|
|
90
89
|
className: tabsCls
|
|
91
|
-
}, restProps)))
|
|
90
|
+
}, restProps)));
|
|
92
91
|
};
|
|
93
92
|
Tabs.TabPane = TabPane;
|
|
94
93
|
if (process.env.NODE_ENV !== 'production') {
|
package/es/tabs/style/index.js
CHANGED
|
@@ -4,12 +4,15 @@ 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 genTagStyle = function genTagStyle(token) {
|
|
7
|
-
var _componentCls
|
|
7
|
+
var _componentCls;
|
|
8
8
|
var componentCls = token.componentCls,
|
|
9
9
|
colorInfo = token.colorInfo,
|
|
10
10
|
colorInfoBg = token.colorInfoBg,
|
|
11
11
|
colorTextSecondary = token.colorTextSecondary;
|
|
12
|
-
return
|
|
12
|
+
return _defineProperty({}, componentCls, (_componentCls = {}, _defineProperty(_componentCls, "&".concat(componentCls, "-top, &").concat(componentCls, "-bottom"), _defineProperty({}, "".concat(componentCls, "-nav::before"), {
|
|
13
|
+
// 页签位置为 top 和 bottom 时,去掉分割线
|
|
14
|
+
border: 'none'
|
|
15
|
+
})), _defineProperty(_componentCls, "".concat(componentCls, "-tab"), _defineProperty({}, "".concat(componentCls, "-tab-tag"), {
|
|
13
16
|
color: colorTextSecondary,
|
|
14
17
|
fontFamily: 'PingFangSC',
|
|
15
18
|
fontSize: 12,
|
|
@@ -22,10 +25,7 @@ export var genTagStyle = function genTagStyle(token) {
|
|
|
22
25
|
})), _defineProperty(_componentCls, "".concat(componentCls, "-ink-bar"), {
|
|
23
26
|
// inkbar 带圆角
|
|
24
27
|
borderRadius: '1px'
|
|
25
|
-
}), _componentCls))
|
|
26
|
-
// 页签位置为 top 和 bottom 时,去掉分割线
|
|
27
|
-
border: 'none'
|
|
28
|
-
}))), _ref;
|
|
28
|
+
}), _componentCls));
|
|
29
29
|
};
|
|
30
30
|
export default (function (prefixCls) {
|
|
31
31
|
var useStyle = genComponentStyleHook('Tabs', function (token) {
|
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,
|
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,
|
|
@@ -86,9 +87,10 @@ var Card = ({
|
|
|
86
87
|
containerRef: ref
|
|
87
88
|
});
|
|
88
89
|
return wrapSSR(
|
|
89
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
90
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
90
91
|
import_antd.Card,
|
|
91
92
|
{
|
|
93
|
+
ref,
|
|
92
94
|
tabList: newTabList,
|
|
93
95
|
defaultActiveTabKey,
|
|
94
96
|
activeTabKey,
|
|
@@ -102,7 +104,7 @@ var Card = ({
|
|
|
102
104
|
...restProps
|
|
103
105
|
},
|
|
104
106
|
children
|
|
105
|
-
)
|
|
107
|
+
)
|
|
106
108
|
);
|
|
107
109
|
};
|
|
108
110
|
Card.Grid = import_antd.Card.Grid;
|
package/lib/card/style/index.js
CHANGED
|
@@ -26,7 +26,7 @@ module.exports = __toCommonJS(style_exports);
|
|
|
26
26
|
var import_style = require("../../tabs/style");
|
|
27
27
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
28
28
|
var genCardStyle = (token) => {
|
|
29
|
-
const { componentCls, tabsComponentCls, padding, paddingSM, paddingLG } = token;
|
|
29
|
+
const { componentCls, tabsComponentCls, tabsPrefixCls, padding, paddingSM, paddingLG } = token;
|
|
30
30
|
return {
|
|
31
31
|
[`${componentCls}${componentCls}-no-divider`]: {
|
|
32
32
|
[`${componentCls}-head`]: {
|
|
@@ -45,14 +45,11 @@ var genCardStyle = (token) => {
|
|
|
45
45
|
[`${componentCls}-head`]: {
|
|
46
46
|
// 包含页签时,去掉 head 的底部分割线
|
|
47
47
|
borderBottom: "none",
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
48
|
+
...(0, import_style.genTagStyle)({
|
|
49
|
+
...token,
|
|
50
|
+
componentCls: tabsComponentCls,
|
|
51
|
+
prefixCls: tabsPrefixCls
|
|
52
|
+
})
|
|
56
53
|
}
|
|
57
54
|
}
|
|
58
55
|
};
|
|
@@ -64,11 +61,6 @@ var style_default = (prefixCls, tabsPrefixCls) => {
|
|
|
64
61
|
...token,
|
|
65
62
|
tabsComponentCls: `.${tabsPrefixCls}`,
|
|
66
63
|
tabsPrefixCls
|
|
67
|
-
}),
|
|
68
|
-
(0, import_style.genTagStyle)({
|
|
69
|
-
...token,
|
|
70
|
-
componentCls: `.${tabsPrefixCls}`,
|
|
71
|
-
prefixCls: tabsPrefixCls
|
|
72
64
|
})
|
|
73
65
|
];
|
|
74
66
|
});
|
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';
|