@douyinfe/semi-ui 2.29.0 → 2.30.0-beta.0

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 (71) hide show
  1. package/dist/css/semi.css +9 -2
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +170 -81
  4. package/dist/umd/semi-ui.js.map +1 -1
  5. package/dist/umd/semi-ui.min.js +1 -1
  6. package/dist/umd/semi-ui.min.js.map +1 -1
  7. package/lib/cjs/cascader/index.d.ts +2 -0
  8. package/lib/cjs/cascader/index.js +8 -0
  9. package/lib/cjs/locale/source/ar.js +5 -5
  10. package/lib/cjs/locale/source/de.js +5 -5
  11. package/lib/cjs/locale/source/en_GB.js +5 -5
  12. package/lib/cjs/locale/source/en_US.js +4 -4
  13. package/lib/cjs/locale/source/es.js +5 -5
  14. package/lib/cjs/locale/source/fr.js +5 -5
  15. package/lib/cjs/locale/source/id_ID.js +4 -4
  16. package/lib/cjs/locale/source/it.js +5 -5
  17. package/lib/cjs/locale/source/ja_JP.js +5 -5
  18. package/lib/cjs/locale/source/ko_KR.js +4 -4
  19. package/lib/cjs/locale/source/ms_MY.js +4 -4
  20. package/lib/cjs/locale/source/nl_NL.d.ts +1 -1
  21. package/lib/cjs/locale/source/nl_NL.js +6 -6
  22. package/lib/cjs/locale/source/pl_PL.js +4 -4
  23. package/lib/cjs/locale/source/pt_BR.js +5 -5
  24. package/lib/cjs/locale/source/ro.d.ts +13 -0
  25. package/lib/cjs/locale/source/ro.js +17 -4
  26. package/lib/cjs/locale/source/ru_RU.js +4 -4
  27. package/lib/cjs/locale/source/sv_SE.js +4 -4
  28. package/lib/cjs/locale/source/th_TH.js +5 -5
  29. package/lib/cjs/locale/source/tr_TR.js +5 -5
  30. package/lib/cjs/locale/source/vi_VN.js +5 -5
  31. package/lib/cjs/locale/source/zh_CN.js +4 -4
  32. package/lib/cjs/locale/source/zh_TW.js +4 -4
  33. package/lib/cjs/popconfirm/index.d.ts +11 -7
  34. package/lib/cjs/popconfirm/index.js +97 -60
  35. package/lib/cjs/popover/index.d.ts +7 -1
  36. package/lib/cjs/popover/index.js +15 -3
  37. package/lib/cjs/tooltip/index.d.ts +7 -3
  38. package/lib/cjs/tooltip/index.js +10 -0
  39. package/lib/es/cascader/index.d.ts +2 -0
  40. package/lib/es/cascader/index.js +8 -0
  41. package/lib/es/locale/source/ar.js +5 -5
  42. package/lib/es/locale/source/de.js +5 -5
  43. package/lib/es/locale/source/en_GB.js +5 -5
  44. package/lib/es/locale/source/en_US.js +4 -4
  45. package/lib/es/locale/source/es.js +5 -5
  46. package/lib/es/locale/source/fr.js +5 -5
  47. package/lib/es/locale/source/id_ID.js +4 -4
  48. package/lib/es/locale/source/it.js +5 -5
  49. package/lib/es/locale/source/ja_JP.js +5 -5
  50. package/lib/es/locale/source/ko_KR.js +4 -4
  51. package/lib/es/locale/source/ms_MY.js +4 -4
  52. package/lib/es/locale/source/nl_NL.d.ts +1 -1
  53. package/lib/es/locale/source/nl_NL.js +6 -6
  54. package/lib/es/locale/source/pl_PL.js +4 -4
  55. package/lib/es/locale/source/pt_BR.js +5 -5
  56. package/lib/es/locale/source/ro.d.ts +13 -0
  57. package/lib/es/locale/source/ro.js +17 -4
  58. package/lib/es/locale/source/ru_RU.js +4 -4
  59. package/lib/es/locale/source/sv_SE.js +4 -4
  60. package/lib/es/locale/source/th_TH.js +5 -5
  61. package/lib/es/locale/source/tr_TR.js +5 -5
  62. package/lib/es/locale/source/vi_VN.js +5 -5
  63. package/lib/es/locale/source/zh_CN.js +4 -4
  64. package/lib/es/locale/source/zh_TW.js +4 -4
  65. package/lib/es/popconfirm/index.d.ts +11 -7
  66. package/lib/es/popconfirm/index.js +95 -60
  67. package/lib/es/popover/index.d.ts +7 -1
  68. package/lib/es/popover/index.js +15 -3
  69. package/lib/es/tooltip/index.d.ts +7 -3
  70. package/lib/es/tooltip/index.js +10 -0
  71. package/package.json +9 -9
@@ -19401,7 +19401,7 @@ class foundation_Tooltip extends foundation {
19401
19401
  */
19402
19402
 
19403
19403
 
19404
- _focusTrigger() {
19404
+ focusTrigger() {
19405
19405
  const {
19406
19406
  trigger,
19407
19407
  returnFocusOnClose,
@@ -19427,8 +19427,7 @@ class foundation_Tooltip extends foundation {
19427
19427
  if (trigger !== 'custom') {
19428
19428
  // Move the focus into the trigger first and then close the pop-up layer
19429
19429
  // to avoid the problem of opening the pop-up layer again when the focus returns to the trigger in the case of hover and focus
19430
- this._focusTrigger();
19431
-
19430
+ this.focusTrigger();
19432
19431
  this.hide();
19433
19432
  }
19434
19433
 
@@ -20147,6 +20146,8 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
20147
20146
  zIndex
20148
20147
  }
20149
20148
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
20149
+ // listen keyboard event, don't move tabIndex -1
20150
+ tabIndex: -1,
20150
20151
  className: `${BASE_CLASS_PREFIX}-portal-inner`,
20151
20152
  style: portalInnerStyle,
20152
20153
  ref: this.setContainerEl,
@@ -20500,6 +20501,14 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
20500
20501
  this.mounted = false;
20501
20502
  this.foundation.destroy();
20502
20503
  }
20504
+ /**
20505
+ * focus on tooltip trigger
20506
+ */
20507
+
20508
+
20509
+ focusTrigger() {
20510
+ this.foundation.focusTrigger();
20511
+ }
20503
20512
  /** for transition - end */
20504
20513
 
20505
20514
 
@@ -21332,8 +21341,8 @@ const local = {
21332
21341
  code: 'zh-CN',
21333
21342
  dateFnsLocale: zh_CN,
21334
21343
  Pagination: {
21335
- pageSize: '${pageSize} 条/页',
21336
- total: '共 ${total}',
21344
+ pageSize: '每页条数:${pageSize}',
21345
+ total: '总页数:${total}',
21337
21346
  jumpTo: '跳至',
21338
21347
  page: '页'
21339
21348
  },
@@ -21474,8 +21483,8 @@ const local = {
21474
21483
  clear: '清空',
21475
21484
  selectAll: '全选',
21476
21485
  clearSelectAll: '取消全选',
21477
- total: '共 ${total}',
21478
- selected: '已选 ${total}'
21486
+ total: '总个数:${total}',
21487
+ selected: '已选个数:${total}'
21479
21488
  },
21480
21489
  Form: {
21481
21490
  optional: '(可选)'
@@ -23986,8 +23995,17 @@ const popover_positionSet = popover_constants_strings.POSITION_SET;
23986
23995
  const popover_triggerSet = popover_constants_strings.TRIGGER_SET;
23987
23996
 
23988
23997
  class popover_Popover extends external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.PureComponent {
23989
- constructor() {
23990
- super(...arguments);
23998
+ constructor(props) {
23999
+ super(props);
24000
+ /**
24001
+ * focus on tooltip trigger
24002
+ */
24003
+
24004
+ this.focusTrigger = () => {
24005
+ var _a;
24006
+
24007
+ (_a = this.tooltipRef.current) === null || _a === void 0 ? void 0 : _a.focusTrigger();
24008
+ };
23991
24009
 
23992
24010
  this.renderPopCard = _ref => {
23993
24011
  let {
@@ -24025,6 +24043,8 @@ class popover_Popover extends external_root_React_commonjs2_react_commonjs_react
24025
24043
  };
24026
24044
  return !isFunction_default()(content) ? content : content(contentProps);
24027
24045
  };
24046
+
24047
+ this.tooltipRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
24028
24048
  }
24029
24049
 
24030
24050
  render() {
@@ -24058,7 +24078,8 @@ class popover_Popover extends external_root_React_commonjs2_react_commonjs_react
24058
24078
 
24059
24079
  const role = trigger === 'click' || trigger === 'custom' ? 'dialog' : 'tooltip';
24060
24080
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(tooltip_Tooltip, Object.assign({
24061
- guardFocus: true
24081
+ guardFocus: true,
24082
+ ref: this.tooltipRef
24062
24083
  }, attr, {
24063
24084
  trigger: trigger,
24064
24085
  position: position,
@@ -25132,13 +25153,8 @@ class FormatNumeral {
25132
25153
  return `${this.truncatePrecision(value)} ${units[i]}`;
25133
25154
  },
25134
25155
  percentages: value => {
25135
- const cArr = value.toString().split('.');
25136
-
25137
- if (Number(cArr[0]) === 0) {
25138
- return `${this.truncatePrecision(value * 100)}%`;
25139
- }
25140
-
25141
- return `${this.truncatePrecision(value)}%`;
25156
+ // The rules here have been modified in version v2.30.0
25157
+ return `${this.truncatePrecision(value * 100)}%`;
25142
25158
  },
25143
25159
  exponential: value => {
25144
25160
  const vExponential = value.toExponential(this.precision + 2);
@@ -45197,6 +45213,14 @@ class cascader_Cascader extends baseComponent_BaseComponent {
45197
45213
  }, inputProps)));
45198
45214
  }
45199
45215
 
45216
+ close() {
45217
+ this.foundation.close();
45218
+ }
45219
+
45220
+ open() {
45221
+ this.foundation.open();
45222
+ }
45223
+
45200
45224
  render() {
45201
45225
  const {
45202
45226
  zIndex,
@@ -53574,14 +53598,20 @@ class monthsGridFoundation_MonthsGridFoundation extends foundation {
53574
53598
 
53575
53599
  _initDatePickerFromValue(values) {
53576
53600
  let refreshPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
53577
- const monthLeft = this.getState('monthLeft');
53601
+
53602
+ const {
53603
+ monthLeft
53604
+ } = this._adapter.getStates();
53605
+
53578
53606
  const newMonthLeft = Object.assign({}, monthLeft); // REMOVE:
53579
53607
 
53580
53608
  this._adapter.updateMonthOnLeft(newMonthLeft);
53581
53609
 
53582
53610
  const newSelected = new Set();
53583
53611
 
53584
- if (!this._isMultiple()) {
53612
+ const isMultiple = this._isMultiple();
53613
+
53614
+ if (!isMultiple) {
53585
53615
  values[0] && newSelected.add(format_format(values[0], datePicker_constants_strings.FORMAT_FULL_DATE));
53586
53616
  } else {
53587
53617
  values.forEach(date => {
@@ -53590,7 +53620,12 @@ class monthsGridFoundation_MonthsGridFoundation extends foundation {
53590
53620
  }
53591
53621
 
53592
53622
  if (refreshPicker) {
53593
- this.handleShowDateAndTime(datePicker_constants_strings.PANEL_TYPE_LEFT, values[0] || newMonthLeft.pickerDate);
53623
+ if (isMultiple) {
53624
+ const leftPickerDateInSelected = values === null || values === void 0 ? void 0 : values.some(item => item && differenceInCalendarMonths(item, monthLeft.pickerDate) === 0);
53625
+ !leftPickerDateInSelected && this.handleShowDateAndTime(datePicker_constants_strings.PANEL_TYPE_LEFT, values[0] || newMonthLeft.pickerDate);
53626
+ } else {
53627
+ this.handleShowDateAndTime(datePicker_constants_strings.PANEL_TYPE_LEFT, values[0] || newMonthLeft.pickerDate);
53628
+ }
53594
53629
  } else {
53595
53630
  // FIXME:
53596
53631
  this.handleShowDateAndTime(datePicker_constants_strings.PANEL_TYPE_LEFT, newMonthLeft.pickerDate);
@@ -74113,7 +74148,7 @@ const popconfirm_constants_numbers = {
74113
74148
  };
74114
74149
 
74115
74150
  // CONCATENATED MODULE: ../semi-foundation/popconfirm/popconfirmFoundation.ts
74116
- /* eslint-disable @typescript-eslint/no-empty-function */
74151
+
74117
74152
 
74118
74153
 
74119
74154
  class popconfirmFoundation_PopConfirmFoundation extends foundation {
@@ -74166,9 +74201,28 @@ class popconfirmFoundation_PopConfirmFoundation extends foundation {
74166
74201
  this._adapter.setVisible(visible);
74167
74202
  }
74168
74203
 
74204
+ if (visible) {
74205
+ this.handleFocusOperateButton();
74206
+ } else {
74207
+ this._adapter.focusPrevFocusElement();
74208
+ }
74209
+
74169
74210
  this._adapter.notifyVisibleChange(visible);
74170
74211
  }
74171
74212
 
74213
+ handleFocusOperateButton() {
74214
+ const {
74215
+ cancelButtonProps,
74216
+ okButtonProps
74217
+ } = this._adapter.getProps();
74218
+
74219
+ if (get_default()(cancelButtonProps, 'autoFocus') && !get_default()(cancelButtonProps, 'disabled')) {
74220
+ this._adapter.focusCancelButton();
74221
+ } else if (get_default()(okButtonProps, 'autoFocus') && !get_default()(okButtonProps, 'disabled')) {
74222
+ this._adapter.focusOkButton();
74223
+ }
74224
+ }
74225
+
74172
74226
  }
74173
74227
  // EXTERNAL MODULE: ../semi-foundation/popconfirm/popconfirm.scss
74174
74228
  var popconfirm = __webpack_require__("s0u6");
@@ -74177,6 +74231,8 @@ var popconfirm = __webpack_require__("s0u6");
74177
74231
 
74178
74232
 
74179
74233
 
74234
+
74235
+
74180
74236
  var popconfirm_rest = undefined && undefined.__rest || function (s, e) {
74181
74237
  var t = {};
74182
74238
 
@@ -74216,12 +74272,74 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
74216
74272
 
74217
74273
  this.stopImmediatePropagation = e => e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation();
74218
74274
 
74275
+ this.renderConfirmPopCard = _ref => {
74276
+ let {
74277
+ initialFocusRef
74278
+ } = _ref;
74279
+ const {
74280
+ content,
74281
+ title,
74282
+ className,
74283
+ style,
74284
+ cancelType,
74285
+ icon,
74286
+ prefixCls
74287
+ } = this.props;
74288
+ const {
74289
+ direction
74290
+ } = this.context;
74291
+ const popCardCls = classnames_default()(prefixCls, className, {
74292
+ [`${prefixCls}-rtl`]: direction === 'rtl'
74293
+ });
74294
+ const showTitle = title !== null && typeof title !== 'undefined';
74295
+ const showContent = !(content === null || typeof content === 'undefined');
74296
+ return (
74297
+ /*#__PURE__*/
74298
+
74299
+ /* eslint-disable-next-line jsx-a11y/no-static-element-interactions */
74300
+ external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
74301
+ className: popCardCls,
74302
+ onClick: this.stopImmediatePropagation,
74303
+ style: style
74304
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
74305
+ className: `${prefixCls}-inner`
74306
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
74307
+ className: `${prefixCls}-header`
74308
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("i", {
74309
+ className: `${prefixCls}-header-icon`,
74310
+ "x-semi-prop": "icon"
74311
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement(icon) ? icon : null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
74312
+ className: `${prefixCls}-header-body`
74313
+ }, showTitle ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
74314
+ className: `${prefixCls}-header-title`,
74315
+ "x-semi-prop": "title"
74316
+ }, title) : null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, {
74317
+ className: `${prefixCls}-btn-close`,
74318
+ icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, null),
74319
+ size: "small",
74320
+ theme: 'borderless',
74321
+ type: cancelType,
74322
+ onClick: this.handleCancel
74323
+ })), showContent ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
74324
+ className: `${prefixCls}-body`,
74325
+ "x-semi-prop": "content"
74326
+ }, isFunction_default()(content) ? content({
74327
+ initialFocusRef
74328
+ }) : content) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
74329
+ className: `${prefixCls}-footer`,
74330
+ ref: this.footerRef
74331
+ }, this.renderControls())))
74332
+ );
74333
+ };
74334
+
74219
74335
  this.state = {
74220
74336
  cancelLoading: false,
74221
74337
  confirmLoading: false,
74222
74338
  visible: props.defaultVisible || false
74223
74339
  };
74224
74340
  this.foundation = new popconfirmFoundation_PopConfirmFoundation(this.adapter);
74341
+ this.footerRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
74342
+ this.popoverRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
74225
74343
  }
74226
74344
 
74227
74345
  static getDerivedStateFromProps(props, state) {
@@ -74251,7 +74369,28 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
74251
74369
  notifyConfirm: e => this.props.onConfirm(e),
74252
74370
  notifyCancel: e => this.props.onCancel(e),
74253
74371
  notifyVisibleChange: visible => this.props.onVisibleChange(visible),
74254
- notifyClickOutSide: e => this.props.onClickOutSide(e)
74372
+ notifyClickOutSide: e => this.props.onClickOutSide(e),
74373
+ focusCancelButton: () => {
74374
+ var _a, _b;
74375
+
74376
+ const buttonNode = (_b = (_a = this.footerRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.querySelector('[data-type=cancel]');
74377
+ buttonNode === null || buttonNode === void 0 ? void 0 : buttonNode.focus({
74378
+ preventScroll: true
74379
+ });
74380
+ },
74381
+ focusOkButton: () => {
74382
+ var _a, _b;
74383
+
74384
+ const buttonNode = (_b = (_a = this.footerRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.querySelector('[data-type=ok]');
74385
+ buttonNode === null || buttonNode === void 0 ? void 0 : buttonNode.focus({
74386
+ preventScroll: true
74387
+ });
74388
+ },
74389
+ focusPrevFocusElement: () => {
74390
+ var _a;
74391
+
74392
+ (_a = this.popoverRef.current) === null || _a === void 0 ? void 0 : _a.focusTrigger();
74393
+ }
74255
74394
  });
74256
74395
  }
74257
74396
 
@@ -74271,68 +74410,17 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
74271
74410
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
74272
74411
  componentName: "Popconfirm"
74273
74412
  }, (locale, localeCode) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, Object.assign({
74413
+ "data-type": "cancel",
74274
74414
  type: cancelType,
74275
74415
  onClick: this.handleCancel,
74276
74416
  loading: cancelLoading
74277
- }, cancelButtonProps), cancelText || get_default()(locale, 'cancel')), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, Object.assign({
74417
+ }, omit_default()(cancelButtonProps, 'autoFocus')), cancelText || get_default()(locale, 'cancel')), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, Object.assign({
74418
+ "data-type": "ok",
74278
74419
  type: okType,
74279
74420
  theme: "solid",
74280
74421
  onClick: this.handleConfirm,
74281
74422
  loading: confirmLoading
74282
- }, okButtonProps), okText || get_default()(locale, 'confirm'))));
74283
- }
74284
-
74285
- renderConfirmPopCard() {
74286
- const {
74287
- content,
74288
- title,
74289
- className,
74290
- style,
74291
- cancelType,
74292
- icon,
74293
- prefixCls
74294
- } = this.props;
74295
- const {
74296
- direction
74297
- } = this.context;
74298
- const popCardCls = classnames_default()(prefixCls, className, {
74299
- [`${prefixCls}-rtl`]: direction === 'rtl'
74300
- });
74301
- const showTitle = title !== null && typeof title !== 'undefined';
74302
- const showContent = !(content === null || typeof content === 'undefined');
74303
- return (
74304
- /*#__PURE__*/
74305
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
74306
- external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
74307
- className: popCardCls,
74308
- onClick: this.stopImmediatePropagation,
74309
- style: style
74310
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
74311
- className: `${prefixCls}-inner`
74312
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
74313
- className: `${prefixCls}-header`
74314
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("i", {
74315
- className: `${prefixCls}-header-icon`,
74316
- "x-semi-prop": "icon"
74317
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement(icon) ? icon : null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
74318
- className: `${prefixCls}-header-body`
74319
- }, showTitle ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
74320
- className: `${prefixCls}-header-title`,
74321
- "x-semi-prop": "title"
74322
- }, title) : null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, {
74323
- className: `${prefixCls}-btn-close`,
74324
- icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, null),
74325
- size: "small",
74326
- theme: 'borderless',
74327
- type: cancelType,
74328
- onClick: this.handleCancel
74329
- })), showContent ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
74330
- className: `${prefixCls}-body`,
74331
- "x-semi-prop": "content"
74332
- }, content) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
74333
- className: `${prefixCls}-footer`
74334
- }, this.renderControls())))
74335
- );
74423
+ }, omit_default()(okButtonProps, 'autoFocus')), okText || get_default()(locale, 'confirm'))));
74336
74424
  }
74337
74425
 
74338
74426
  render() {
@@ -74360,7 +74448,6 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
74360
74448
  const {
74361
74449
  visible
74362
74450
  } = this.state;
74363
- const popContent = this.renderConfirmPopCard();
74364
74451
  const popProps = {
74365
74452
  onVisibleChange: this.handleVisibleChange,
74366
74453
  className: popconfirm_constants_cssClasses.POPOVER,
@@ -74371,8 +74458,10 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
74371
74458
  popProps.trigger = 'custom';
74372
74459
  }
74373
74460
 
74374
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(popover_0, Object.assign({}, attrs, {
74375
- content: popContent,
74461
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(popover_0, Object.assign({
74462
+ ref: this.popoverRef
74463
+ }, attrs, {
74464
+ content: this.renderConfirmPopCard,
74376
74465
  visible: visible,
74377
74466
  position: position
74378
74467
  }, popProps), children);
@@ -74383,7 +74472,7 @@ popconfirm_Popconfirm.contextType = configProvider_context;
74383
74472
  popconfirm_Popconfirm.propTypes = {
74384
74473
  motion: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.func, prop_types_default.a.object]),
74385
74474
  disabled: prop_types_default.a.bool,
74386
- content: prop_types_default.a.any,
74475
+ content: prop_types_default.a.oneOfType([prop_types_default.a.node, prop_types_default.a.func]),
74387
74476
  title: prop_types_default.a.any,
74388
74477
  prefixCls: prop_types_default.a.string,
74389
74478
  className: prop_types_default.a.string,