@oceanbase/design 0.2.5 → 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.
Files changed (58) hide show
  1. package/dist/design.min.js +1 -1
  2. package/es/card/index.js +2 -1
  3. package/es/index.d.ts +21 -0
  4. package/es/modal/index.d.ts +1 -1
  5. package/es/modal/index.js +4 -2
  6. package/es/{tabs → modal}/style/index.d.ts +2 -2
  7. package/es/modal/style/index.js +4 -4
  8. package/es/style/reset.css +1 -0
  9. package/es/table/index.js +22 -17
  10. package/{lib/tabs → es/table}/style/index.d.ts +2 -2
  11. package/es/table/style/index.js +11 -19
  12. package/es/tabs/index.js +2 -2
  13. package/es/theme/index.d.ts +1 -1
  14. package/es/theme/index.js +5 -5
  15. package/lib/card/index.js +2 -1
  16. package/lib/index.d.ts +21 -0
  17. package/lib/modal/index.d.ts +1 -1
  18. package/lib/modal/index.js +17 -2
  19. package/lib/{card → modal}/style/index.d.ts +3 -6
  20. package/lib/modal/style/index.js +2 -4
  21. package/lib/style/reset.css +1 -0
  22. package/lib/table/index.js +14 -9
  23. package/{es/card → lib/table}/style/index.d.ts +3 -6
  24. package/lib/table/style/index.js +7 -13
  25. package/lib/tabs/index.js +2 -1
  26. package/lib/theme/index.d.ts +1 -1
  27. package/lib/theme/index.js +5 -5
  28. package/package.json +4 -3
  29. package/es/alert/index.d.ts +0 -13
  30. package/es/button/index.d.ts +0 -11
  31. package/es/descriptions/index.d.ts +0 -11
  32. package/es/form/FormItem.d.ts +0 -16
  33. package/es/form/index.d.ts +0 -3
  34. package/es/form/interface.d.ts +0 -1
  35. package/es/locale/index.d.ts +0 -5
  36. package/es/message/interface.d.ts +0 -1
  37. package/es/modal/interface.d.ts +0 -1
  38. package/es/notification/interface.d.ts +0 -1
  39. package/es/table/interface.d.ts +0 -1
  40. package/es/tabs/hooks/useInkBar.d.ts +0 -12
  41. package/es/tabs/hooks/useLegacyItems.d.ts +0 -3
  42. package/es/tooltip/MouseTooltip.d.ts +0 -9
  43. package/es/tooltip/index.d.ts +0 -19
  44. package/lib/alert/index.d.ts +0 -13
  45. package/lib/button/index.d.ts +0 -11
  46. package/lib/descriptions/index.d.ts +0 -11
  47. package/lib/form/FormItem.d.ts +0 -16
  48. package/lib/form/index.d.ts +0 -3
  49. package/lib/form/interface.d.ts +0 -1
  50. package/lib/locale/index.d.ts +0 -5
  51. package/lib/message/interface.d.ts +0 -1
  52. package/lib/modal/interface.d.ts +0 -1
  53. package/lib/notification/interface.d.ts +0 -1
  54. package/lib/table/interface.d.ts +0 -1
  55. package/lib/tabs/hooks/useInkBar.d.ts +0 -12
  56. package/lib/tabs/hooks/useLegacyItems.d.ts +0 -3
  57. package/lib/tooltip/MouseTooltip.d.ts +0 -9
  58. 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].key)),
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/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 };
@@ -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 TabsToken = FullToken<'Tabs'>;
3
- export declare const genTagStyle: GenerateStyle<TabsToken>;
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;
@@ -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 _ref;
7
+ var _$concat$concat;
8
8
  var componentCls = token.componentCls,
9
9
  marginLG = token.marginLG;
10
- return _ref = {}, _defineProperty(_ref, "".concat(componentCls, ":not(").concat(componentCls, "-confirm"), _defineProperty({}, "".concat(componentCls, "-header"), {
10
+ return _defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-confirm)"), (_$concat$concat = {}, _defineProperty(_$concat$concat, "".concat(componentCls, "-header"), {
11
11
  marginBottom: marginLG
12
- })), _defineProperty(_ref, "".concat(componentCls, ":not(").concat(componentCls, "-confirm"), _defineProperty({}, "".concat(componentCls, "-footer"), {
12
+ }), _defineProperty(_$concat$concat, "".concat(componentCls, "-footer"), {
13
13
  marginTop: marginLG
14
- })), _ref;
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 _useLocale = useLocale('Table', enUS.Table),
37
- _useLocale2 = _slicedToArray(_useLocale, 1),
38
- contextLocale = _useLocale2[0];
39
- var locale = _objectSpread(_objectSpread({}, contextLocale), customLocale);
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) setOpenPopver(false);
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, (_locale$batchOperatio = locale.batchOperationBar) === null || _locale$batchOperatio === void 0 ? void 0 : _locale$batchOperatio.selected), /*#__PURE__*/React.createElement("span", {
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, (_locale$batchOperatio2 = locale.batchOperationBar) === null || _locale$batchOperatio2 === void 0 ? void 0 : _locale$batchOperatio2.object)), !hiddenCancelBtn && /*#__PURE__*/React.createElement("a", {
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
- }, locale.batchOperationBar.cancel), toolSelectedContent && /*#__PURE__*/React.createElement(Popover, {
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 ? (_locale$batchOperatio3 = locale.batchOperationBar) === null || _locale$batchOperatio3 === void 0 ? void 0 : _locale$batchOperatio3.collapse : locale.batchOperationBar.open))), toolOptionsRender && /*#__PURE__*/React.createElement(Space, {
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: 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 TabsToken = FullToken<'Tabs'>;
3
- export declare const genTagStyle: GenerateStyle<TabsToken>;
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;
@@ -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
- td: {
44
- backgroundColor: colorBgBase
45
- }
46
- }), _defineProperty(_$concat4, "tr:nth-child(2n):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(componentCls, "-expanded-row)"), {
47
- td: {
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
- td: {
82
- backgroundColor: colorBgBase
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].key)),
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];
@@ -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: '#0ac185',
18
- green: '#ffac33',
19
- yellow: '#ff4b4b',
20
- red: '#006aff'
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,
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 };
@@ -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;
@@ -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 = ({ prefixCls: customizePrefixCls, className, ...restProps }) => {
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(/* @__PURE__ */ import_react.default.createElement(import_antd.Modal, { prefixCls: customizePrefixCls, className: modalCls, ...restProps }));
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);
@@ -1,10 +1,7 @@
1
1
  import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
2
- export declare type CardToken = FullToken<'Card'> & {
3
- tabsComponentCls: string;
4
- tabsPrefixCls: string;
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
  };
@@ -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';
@@ -34,7 +34,6 @@ __export(table_exports, {
34
34
  });
35
35
  module.exports = __toCommonJS(table_exports);
36
36
  var import_antd = require("antd");
37
- var import_locale = require("antd/es/locale");
38
37
  var import_classnames = __toESM(require("classnames"));
39
38
  var import_lodash = require("lodash");
40
39
  var import_react = __toESM(require("react"));
@@ -43,6 +42,7 @@ var import_en_US = __toESM(require("../locale/en-US"));
43
42
  var import_style = __toESM(require("./style"));
44
43
  __reExport(table_exports, require("antd/es/table"), module.exports);
45
44
  function Table(props) {
45
+ var _a;
46
46
  const {
47
47
  locale: customLocale,
48
48
  columns,
@@ -56,8 +56,13 @@ function Table(props) {
56
56
  prefixCls: customizePrefixCls,
57
57
  className
58
58
  } = props;
59
- const [contextLocale] = (0, import_locale.useLocale)("Table", import_en_US.default.Table);
60
- const locale = { ...contextLocale, ...customLocale };
59
+ const { batchOperationBar, ...restLocale } = {
60
+ ...customLocale,
61
+ batchOperationBar: {
62
+ ...(_a = import_en_US.default.Table) == null ? void 0 : _a.batchOperationBar,
63
+ ...customLocale == null ? void 0 : customLocale.batchOperationBar
64
+ }
65
+ };
61
66
  const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
62
67
  const prefixCls = getPrefixCls("table", customizePrefixCls);
63
68
  const { wrapSSR, hashId } = (0, import_style.default)(prefixCls);
@@ -110,11 +115,11 @@ function Table(props) {
110
115
  handleSelectedData([], [], currentSelectedInfo);
111
116
  };
112
117
  (0, import_react.useEffect)(() => {
113
- if ((0, import_lodash.isEmpty)(currentSelectedRows) && toolSelectedContent)
118
+ if ((0, import_lodash.isEmpty)(currentSelectedRows) && toolSelectedContent) {
114
119
  setOpenPopver(false);
120
+ }
115
121
  }, [currentSelectedRows]);
116
122
  const renderOptionsBar = (total, range) => {
117
- var _a, _b, _c;
118
123
  if ((0, import_lodash.isEmpty)(rowSelection) || (0, import_lodash.isEmpty)(currentSelectedRowKeys)) {
119
124
  return /* @__PURE__ */ import_react.default.createElement("span", null, pagination && (pagination == null ? void 0 : pagination.showTotal) && (pagination == null ? void 0 : pagination.showTotal(total, range)));
120
125
  }
@@ -127,8 +132,8 @@ function Table(props) {
127
132
  }
128
133
  },
129
134
  toolAlertRender && toolAlertRender(currentSelectedRowKeys, currentSelectedRows),
130
- !toolAlertRender && toolAlertRender !== false && /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-batch-operation-selection` }, /* @__PURE__ */ import_react.default.createElement("span", null, (_a = locale.batchOperationBar) == null ? void 0 : _a.selected), /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-batch-operation-selection-count` }, (currentSelectedRowKeys == null ? void 0 : currentSelectedRowKeys.length) || 0), /* @__PURE__ */ import_react.default.createElement("span", null, (_b = locale.batchOperationBar) == null ? void 0 : _b.object)),
131
- !hiddenCancelBtn && /* @__PURE__ */ import_react.default.createElement("a", { onClick: handleOptionsCancel }, locale.batchOperationBar.cancel),
135
+ !toolAlertRender && toolAlertRender !== false && /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-batch-operation-selection` }, /* @__PURE__ */ import_react.default.createElement("span", null, batchOperationBar == null ? void 0 : batchOperationBar.selected), /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-batch-operation-selection-count` }, (currentSelectedRowKeys == null ? void 0 : currentSelectedRowKeys.length) || 0), /* @__PURE__ */ import_react.default.createElement("span", null, batchOperationBar == null ? void 0 : batchOperationBar.object)),
136
+ !hiddenCancelBtn && /* @__PURE__ */ import_react.default.createElement("a", { onClick: handleOptionsCancel }, batchOperationBar == null ? void 0 : batchOperationBar.cancel),
132
137
  toolSelectedContent && /* @__PURE__ */ import_react.default.createElement(
133
138
  import_antd.Popover,
134
139
  {
@@ -138,7 +143,7 @@ function Table(props) {
138
143
  trigger: "click",
139
144
  open: openPopver
140
145
  },
141
- /* @__PURE__ */ import_react.default.createElement("a", { onClick: () => setOpenPopver(!openPopver) }, openPopver ? (_c = locale.batchOperationBar) == null ? void 0 : _c.collapse : locale.batchOperationBar.open)
146
+ /* @__PURE__ */ import_react.default.createElement("a", { onClick: () => setOpenPopver(!openPopver) }, openPopver ? batchOperationBar == null ? void 0 : batchOperationBar.collapse : batchOperationBar == null ? void 0 : batchOperationBar.open)
142
147
  )
143
148
  ), toolOptionsRender && /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 8 }, toolOptionsRender == null ? void 0 : toolOptionsRender(currentSelectedRowKeys, currentSelectedRows))), /* @__PURE__ */ import_react.default.createElement("span", null, pagination && (pagination == null ? void 0 : pagination.showTotal) && (pagination == null ? void 0 : pagination.showTotal(total, range))));
144
149
  };
@@ -149,7 +154,7 @@ function Table(props) {
149
154
  ...props,
150
155
  prefixCls: customizePrefixCls,
151
156
  className: tableCls,
152
- locale,
157
+ locale: restLocale,
153
158
  columns: newColumns,
154
159
  rowSelection: rowSelection ? {
155
160
  ...rowSelection,
@@ -1,10 +1,7 @@
1
1
  import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
2
- export declare type CardToken = FullToken<'Card'> & {
3
- tabsComponentCls: string;
4
- tabsPrefixCls: string;
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
  };
@@ -74,21 +74,15 @@ var genTableStyle = (token) => {
74
74
  // body 样式
75
75
  [`${componentCls}-tbody`]: {
76
76
  // 斑马纹样式
77
- [`tr:nth-child(2n + 1):not(${componentCls}-placeholder):not(${componentCls}-row-selected)`]: {
78
- td: {
79
- backgroundColor: colorBgBase
80
- }
77
+ [`tr:nth-child(2n + 1):not(${componentCls}-placeholder):not(${componentCls}-row-selected) > td`]: {
78
+ backgroundColor: colorBgBase
81
79
  },
82
- [`tr:nth-child(2n):not(${componentCls}-placeholder):not(${componentCls}-row-selected):not(${componentCls}-expanded-row)`]: {
83
- td: {
84
- backgroundColor: colorFillQuaternary
85
- }
80
+ [`tr:nth-child(2n):not(${componentCls}-placeholder):not(${componentCls}-row-selected):not(${componentCls}-expanded-row) > td`]: {
81
+ backgroundColor: colorFillQuaternary
86
82
  },
87
83
  // hover 行样式
88
- [`tr:not(${componentCls}-placeholder):not(${componentCls}-expanded-row):hover`]: {
89
- td: {
90
- backgroundColor: `${colorPrimaryBgHover} !important`
91
- }
84
+ [`tr:not(${componentCls}-placeholder):not(${componentCls}-expanded-row):hover > td`]: {
85
+ backgroundColor: `${colorPrimaryBgHover} !important`
92
86
  },
93
87
  // 选中行样式
94
88
  [`tr${componentCls}-row-selected > td`]: {
@@ -158,7 +152,7 @@ var genTableStyle = (token) => {
158
152
  [`${componentCls}-tbody`]: {
159
153
  // 去掉斑马纹
160
154
  [`tr:nth-child(2n):not(${componentCls}-placeholder):not(${componentCls}-row-selected):not(${componentCls}-expanded-row)`]: {
161
- td: {
155
+ ["& > td"]: {
162
156
  backgroundColor: colorBgBase
163
157
  },
164
158
  ["&:hover"]: {
package/lib/tabs/index.js CHANGED
@@ -56,6 +56,7 @@ var Tabs = ({
56
56
  className,
57
57
  ...restProps
58
58
  }) => {
59
+ var _a;
59
60
  const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
60
61
  const prefixCls = getPrefixCls("tabs", customizePrefixCls);
61
62
  const { wrapSSR, hashId } = (0, import_style.default)(prefixCls);
@@ -73,7 +74,7 @@ var Tabs = ({
73
74
  });
74
75
  newItems = (0, import_useLegacyItems.default)(newItems, children, prefixCls);
75
76
  const [activeKey, setActiveKey] = (0, import_react.useState)(
76
- activeKeyProp || defaultActiveKey || (newItems == null ? void 0 : newItems[0].key)
77
+ activeKeyProp || defaultActiveKey || ((_a = newItems == null ? void 0 : newItems[0]) == null ? void 0 : _a.key)
77
78
  );
78
79
  (0, import_useInkBar.default)({
79
80
  prefixCls,
@@ -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;