@rockshin/tao-ui 0.0.57 → 0.0.59

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 (109) hide show
  1. package/dist/components/affix/affix.js +38 -4
  2. package/dist/components/app/app-modals.js +11 -6
  3. package/dist/components/app/app-notices.js +112 -47
  4. package/dist/components/auto-complete/auto-complete.js +9 -2
  5. package/dist/components/avatar/avatar.js +1 -1
  6. package/dist/components/badge/badge.js +2 -2
  7. package/dist/components/breadcrumb/breadcrumb.js +5 -1
  8. package/dist/components/calendar/calendar.js +24 -17
  9. package/dist/components/carousel/carousel.js +35 -16
  10. package/dist/components/cascader/cascader.js +17 -12
  11. package/dist/components/checkbox/checkbox.d.ts +3 -1
  12. package/dist/components/checkbox/checkbox.js +65 -58
  13. package/dist/components/collapse/collapse-panels.js +68 -67
  14. package/dist/components/color-picker/color-picker.js +383 -360
  15. package/dist/components/date-picker/calendar/calendar-grid.d.ts +5 -3
  16. package/dist/components/date-picker/calendar/calendar-grid.js +9 -4
  17. package/dist/components/date-picker/calendar/month-grid.d.ts +2 -1
  18. package/dist/components/date-picker/calendar/month-grid.js +61 -45
  19. package/dist/components/date-picker/calendar/time-panel.d.ts +8 -1
  20. package/dist/components/date-picker/calendar/time-panel.js +89 -88
  21. package/dist/components/date-picker/calendar/year-grid.d.ts +2 -1
  22. package/dist/components/date-picker/calendar/year-grid.js +60 -44
  23. package/dist/components/date-picker/date-localization.js +12 -14
  24. package/dist/components/date-picker/date-picker.css +9 -0
  25. package/dist/components/date-picker/date-picker.js +22 -13
  26. package/dist/components/date-picker/range-picker.d.ts +2 -0
  27. package/dist/components/date-picker/range-picker.js +127 -70
  28. package/dist/components/date-picker/types.js +1 -1
  29. package/dist/components/divider/divider.js +1 -1
  30. package/dist/components/drawer/drawer.d.ts +1 -1
  31. package/dist/components/drawer/drawer.js +4 -3
  32. package/dist/components/dropdown/dropdown.js +11 -9
  33. package/dist/components/float-button/float-button.js +11 -9
  34. package/dist/components/form/form-item.d.ts +1 -1
  35. package/dist/components/form/form-item.js +160 -120
  36. package/dist/components/form-field/form-field-view.d.ts +2 -1
  37. package/dist/components/form-field/form-field-view.js +173 -108
  38. package/dist/components/image/image.js +135 -143
  39. package/dist/components/input/input-shared.js +3 -2
  40. package/dist/components/input/otp.js +120 -110
  41. package/dist/components/input/password.js +55 -61
  42. package/dist/components/input/search.js +13 -7
  43. package/dist/components/list/list.js +106 -105
  44. package/dist/components/masonry/masonry.js +1 -1
  45. package/dist/components/mentions/mentions.js +1 -0
  46. package/dist/components/menu/menu-render.js +1 -0
  47. package/dist/components/modal/confirm-dialog.js +11 -4
  48. package/dist/components/modal/modal.js +320 -315
  49. package/dist/components/pagination/pagination.d.ts +3 -0
  50. package/dist/components/pagination/pagination.js +5 -0
  51. package/dist/components/popover/popover.js +325 -289
  52. package/dist/components/qr-code/qr-code.js +157 -150
  53. package/dist/components/radio/radio.d.ts +3 -1
  54. package/dist/components/radio/radio.js +73 -64
  55. package/dist/components/rate/rate.js +83 -72
  56. package/dist/components/scroll-area/scroll-area.css +1 -1
  57. package/dist/components/scroll-area/scroll-area.js +294 -222
  58. package/dist/components/select/mobile-select.js +6 -3
  59. package/dist/components/select/select-model.js +2 -2
  60. package/dist/components/select/select.js +78 -39
  61. package/dist/components/select/use-select-selection.d.ts +1 -1
  62. package/dist/components/select/use-select-selection.js +91 -84
  63. package/dist/components/slider/slider.d.ts +2 -2
  64. package/dist/components/slider/slider.js +13 -2
  65. package/dist/components/sonner/sonner.js +2 -2
  66. package/dist/components/splitter/splitter.css +1 -0
  67. package/dist/components/splitter/splitter.js +152 -126
  68. package/dist/components/statistic/statistic.js +84 -78
  69. package/dist/components/steps/steps.js +1 -1
  70. package/dist/components/switch/switch.js +45 -39
  71. package/dist/components/table/table.js +5 -1
  72. package/dist/components/table/use-table-data.js +2 -2
  73. package/dist/components/time-picker/time-picker.js +31 -1
  74. package/dist/components/tooltip/tooltip.js +237 -99
  75. package/dist/components/tree/tree.js +31 -3
  76. package/dist/components/tree-select/tree-select.js +1 -1
  77. package/dist/components/upload/upload.js +69 -42
  78. package/dist/locales/ar-EG.js +2 -0
  79. package/dist/locales/de-DE.js +2 -0
  80. package/dist/locales/en-US.js +2 -0
  81. package/dist/locales/es-ES.js +2 -0
  82. package/dist/locales/fr-FR.js +2 -0
  83. package/dist/locales/hi-IN.js +2 -0
  84. package/dist/locales/id-ID.js +2 -0
  85. package/dist/locales/it-IT.js +2 -0
  86. package/dist/locales/ja-JP.js +2 -0
  87. package/dist/locales/ko-KR.js +2 -0
  88. package/dist/locales/pt-BR.js +2 -0
  89. package/dist/locales/ru-RU.js +2 -0
  90. package/dist/locales/th-TH.js +2 -0
  91. package/dist/locales/tr-TR.js +2 -0
  92. package/dist/locales/types.d.ts +2 -0
  93. package/dist/locales/vi-VN.js +2 -0
  94. package/dist/locales/zh-CN.js +2 -0
  95. package/dist/locales/zh-TW.js +2 -0
  96. package/dist/number-input/cursor.js +20 -8
  97. package/dist/number-input/format.js +13 -5
  98. package/dist/number-input/use-number-input.js +166 -318
  99. package/dist/number-input/validate.d.ts +1 -0
  100. package/dist/number-input/validate.js +1 -1
  101. package/dist/provider/tao-provider.d.ts +2 -2
  102. package/dist/provider/tao-provider.js +49 -49
  103. package/dist/utils/composed-parent.d.ts +1 -0
  104. package/dist/utils/composed-parent.js +7 -0
  105. package/dist/utils/portal.d.ts +5 -0
  106. package/dist/utils/portal.js +7 -1
  107. package/dist/utils/refs.d.ts +3 -1
  108. package/dist/utils/refs.js +25 -1
  109. package/package.json +1 -1
@@ -322,7 +322,7 @@ function gridVariables(grid) {
322
322
  return result;
323
323
  }
324
324
  function ListRoot(t0, ref) {
325
- const $ = c(105);
325
+ const $ = c(106);
326
326
  let children;
327
327
  let className;
328
328
  let classNames;
@@ -425,27 +425,28 @@ function ListRoot(t0, ref) {
425
425
  if (pagination && void 0 === paging.current && page !== current) setPage(current);
426
426
  const start = (current - 1) * resolvedPageSize;
427
427
  let t9;
428
- if ($[28] !== dataSource || $[29] !== pagination || $[30] !== resolvedPageSize || $[31] !== start) {
429
- t9 = pagination && dataSource.length > start ? dataSource.slice(start, start + resolvedPageSize) : dataSource;
428
+ if ($[28] !== dataSource || $[29] !== pagination || $[30] !== resolvedPageSize || $[31] !== start || $[32] !== total) {
429
+ t9 = pagination && total <= dataSource.length ? dataSource.slice(start, start + resolvedPageSize) : dataSource;
430
430
  $[28] = dataSource;
431
431
  $[29] = pagination;
432
432
  $[30] = resolvedPageSize;
433
433
  $[31] = start;
434
- $[32] = t9;
435
- } else t9 = $[32];
434
+ $[32] = total;
435
+ $[33] = t9;
436
+ } else t9 = $[33];
436
437
  const data = t9;
437
438
  let t10;
438
- if ($[33] !== loading) {
439
+ if ($[34] !== loading) {
439
440
  t10 = "boolean" == typeof loading ? {
440
441
  spinning: loading
441
442
  } : loading;
442
- $[33] = loading;
443
- $[34] = t10;
444
- } else t10 = $[34];
443
+ $[34] = loading;
444
+ $[35] = t10;
445
+ } else t10 = $[35];
445
446
  const spinner = t10;
446
447
  const isLoading = spinner.spinning ?? "object" == typeof loading;
447
448
  let t11;
448
- if ($[35] !== classNames?.pagination || $[36] !== current || $[37] !== pagination || $[38] !== paging || $[39] !== resolvedPageSize || $[40] !== styles?.pagination || $[41] !== total) {
449
+ if ($[36] !== classNames?.pagination || $[37] !== current || $[38] !== pagination || $[39] !== paging || $[40] !== resolvedPageSize || $[41] !== styles?.pagination || $[42] !== total) {
449
450
  t11 = pagination && !(paging.hideOnSinglePage && total <= resolvedPageSize) ? /*#__PURE__*/ jsx("div", {
450
451
  "data-tao-list-pagination": "",
451
452
  "data-tao-align": paging.align ?? "end",
@@ -464,18 +465,18 @@ function ListRoot(t0, ref) {
464
465
  }
465
466
  })
466
467
  }) : null;
467
- $[35] = classNames?.pagination;
468
- $[36] = current;
469
- $[37] = pagination;
470
- $[38] = paging;
471
- $[39] = resolvedPageSize;
472
- $[40] = styles?.pagination;
473
- $[41] = total;
474
- $[42] = t11;
475
- } else t11 = $[42];
468
+ $[36] = classNames?.pagination;
469
+ $[37] = current;
470
+ $[38] = pagination;
471
+ $[39] = paging;
472
+ $[40] = resolvedPageSize;
473
+ $[41] = styles?.pagination;
474
+ $[42] = total;
475
+ $[43] = t11;
476
+ } else t11 = $[43];
476
477
  const paginationNode = t11;
477
478
  let t12;
478
- if ($[43] !== children || $[44] !== data || $[45] !== renderItem || $[46] !== rowKey) {
479
+ if ($[44] !== children || $[45] !== data || $[46] !== renderItem || $[47] !== rowKey) {
479
480
  t12 = data.length ? data.map((value, index)=>{
480
481
  const rendered = renderItem?.(value, index);
481
482
  const configuredKey = "function" == typeof rowKey ? rowKey(value) : null != rowKey ? value[rowKey] : void 0;
@@ -484,74 +485,74 @@ function ListRoot(t0, ref) {
484
485
  children: rendered
485
486
  }, key);
486
487
  }) : children;
487
- $[43] = children;
488
- $[44] = data;
489
- $[45] = renderItem;
490
- $[46] = rowKey;
491
- $[47] = t12;
492
- } else t12 = $[47];
488
+ $[44] = children;
489
+ $[45] = data;
490
+ $[46] = renderItem;
491
+ $[47] = rowKey;
492
+ $[48] = t12;
493
+ } else t12 = $[48];
493
494
  const content = t12;
494
495
  let t13;
495
- if ($[48] !== grid || $[49] !== itemLayout) {
496
+ if ($[49] !== grid || $[50] !== itemLayout) {
496
497
  t13 = {
497
498
  grid,
498
499
  itemLayout
499
500
  };
500
- $[48] = grid;
501
- $[49] = itemLayout;
502
- $[50] = t13;
503
- } else t13 = $[50];
501
+ $[49] = grid;
502
+ $[50] = itemLayout;
503
+ $[51] = t13;
504
+ } else t13 = $[51];
504
505
  const t14 = "default" === size ? "medium" : size ?? config.size;
505
506
  const t15 = bordered ? "" : void 0;
506
507
  const t16 = split ? "" : void 0;
507
508
  const t17 = grid ? "" : void 0;
508
509
  const t18 = classNames?.root;
509
510
  let t19;
510
- if ($[51] !== className || $[52] !== prefixCls || $[53] !== rootClassName || $[54] !== t18) {
511
+ if ($[52] !== className || $[53] !== prefixCls || $[54] !== rootClassName || $[55] !== t18) {
511
512
  t19 = cx(prefixCls, t18, rootClassName, className);
512
- $[51] = className;
513
- $[52] = prefixCls;
514
- $[53] = rootClassName;
515
- $[54] = t18;
516
- $[55] = t19;
517
- } else t19 = $[55];
513
+ $[52] = className;
514
+ $[53] = prefixCls;
515
+ $[54] = rootClassName;
516
+ $[55] = t18;
517
+ $[56] = t19;
518
+ } else t19 = $[56];
518
519
  let t20;
519
- if ($[56] !== grid) {
520
+ if ($[57] !== grid) {
520
521
  t20 = gridVariables(grid);
521
- $[56] = grid;
522
- $[57] = t20;
523
- } else t20 = $[57];
522
+ $[57] = grid;
523
+ $[58] = t20;
524
+ } else t20 = $[58];
524
525
  const t21 = styles?.root;
525
526
  let t22;
526
- if ($[58] !== style || $[59] !== t20 || $[60] !== t21) {
527
+ if ($[59] !== style || $[60] !== t20 || $[61] !== t21) {
527
528
  t22 = {
528
529
  ...t20,
529
530
  ...t21,
530
531
  ...style
531
532
  };
532
- $[58] = style;
533
- $[59] = t20;
534
- $[60] = t21;
535
- $[61] = t22;
536
- } else t22 = $[61];
533
+ $[59] = style;
534
+ $[60] = t20;
535
+ $[61] = t21;
536
+ $[62] = t22;
537
+ } else t22 = $[62];
537
538
  const t23 = ("top" === paging.position || "both" === paging.position) && paginationNode;
538
539
  let t24;
539
- if ($[62] !== classNames?.header || $[63] !== header || $[64] !== styles?.header) {
540
+ if ($[63] !== classNames?.header || $[64] !== header || $[65] !== styles?.header) {
540
541
  t24 = null != header && /*#__PURE__*/ jsx("div", {
541
542
  "data-tao-list-header": "",
542
543
  className: classNames?.header,
543
544
  style: styles?.header,
544
545
  children: header
545
546
  });
546
- $[62] = classNames?.header;
547
- $[63] = header;
548
- $[64] = styles?.header;
549
- $[65] = t24;
550
- } else t24 = $[65];
547
+ $[63] = classNames?.header;
548
+ $[64] = header;
549
+ $[65] = styles?.header;
550
+ $[66] = t24;
551
+ } else t24 = $[66];
551
552
  const t25 = classNames?.items;
552
553
  const t26 = styles?.items;
553
554
  let t27;
554
- if ($[66] !== children || $[67] !== classNames?.empty || $[68] !== content || $[69] !== data.length || $[70] !== isLoading || $[71] !== locale?.emptyText || $[72] !== styles?.empty) {
555
+ if ($[67] !== children || $[68] !== classNames?.empty || $[69] !== content || $[70] !== data.length || $[71] !== isLoading || $[72] !== locale?.emptyText || $[73] !== styles?.empty) {
555
556
  t27 = data.length || Children.toArray(children).length ? content : isLoading ? /*#__PURE__*/ jsx("li", {
556
557
  "data-tao-list-loading": ""
557
558
  }) : /*#__PURE__*/ jsx("li", {
@@ -562,56 +563,56 @@ function ListRoot(t0, ref) {
562
563
  image: Empty.PRESENTED_IMAGE_SIMPLE
563
564
  })
564
565
  });
565
- $[66] = children;
566
- $[67] = classNames?.empty;
567
- $[68] = content;
568
- $[69] = data.length;
569
- $[70] = isLoading;
570
- $[71] = locale?.emptyText;
571
- $[72] = styles?.empty;
572
- $[73] = t27;
573
- } else t27 = $[73];
566
+ $[67] = children;
567
+ $[68] = classNames?.empty;
568
+ $[69] = content;
569
+ $[70] = data.length;
570
+ $[71] = isLoading;
571
+ $[72] = locale?.emptyText;
572
+ $[73] = styles?.empty;
573
+ $[74] = t27;
574
+ } else t27 = $[74];
574
575
  let t28;
575
- if ($[74] !== t25 || $[75] !== t26 || $[76] !== t27) {
576
+ if ($[75] !== t25 || $[76] !== t26 || $[77] !== t27) {
576
577
  t28 = /*#__PURE__*/ jsx("ul", {
577
578
  "data-tao-list-items": "",
578
579
  className: t25,
579
580
  style: t26,
580
581
  children: t27
581
582
  });
582
- $[74] = t25;
583
- $[75] = t26;
584
- $[76] = t27;
585
- $[77] = t28;
586
- } else t28 = $[77];
583
+ $[75] = t25;
584
+ $[76] = t26;
585
+ $[77] = t27;
586
+ $[78] = t28;
587
+ } else t28 = $[78];
587
588
  let t29;
588
- if ($[78] !== isLoading || $[79] !== spinner || $[80] !== t28) {
589
+ if ($[79] !== isLoading || $[80] !== spinner || $[81] !== t28) {
589
590
  t29 = /*#__PURE__*/ jsx(Spinner, {
590
591
  ...spinner,
591
592
  spinning: isLoading,
592
593
  children: t28
593
594
  });
594
- $[78] = isLoading;
595
- $[79] = spinner;
596
- $[80] = t28;
597
- $[81] = t29;
598
- } else t29 = $[81];
595
+ $[79] = isLoading;
596
+ $[80] = spinner;
597
+ $[81] = t28;
598
+ $[82] = t29;
599
+ } else t29 = $[82];
599
600
  let t30;
600
- if ($[82] !== classNames?.footer || $[83] !== footer || $[84] !== styles?.footer) {
601
+ if ($[83] !== classNames?.footer || $[84] !== footer || $[85] !== styles?.footer) {
601
602
  t30 = null != footer && /*#__PURE__*/ jsx("div", {
602
603
  "data-tao-list-footer": "",
603
604
  className: classNames?.footer,
604
605
  style: styles?.footer,
605
606
  children: footer
606
607
  });
607
- $[82] = classNames?.footer;
608
- $[83] = footer;
609
- $[84] = styles?.footer;
610
- $[85] = t30;
611
- } else t30 = $[85];
608
+ $[83] = classNames?.footer;
609
+ $[84] = footer;
610
+ $[85] = styles?.footer;
611
+ $[86] = t30;
612
+ } else t30 = $[86];
612
613
  const t31 = "top" !== paging.position && paginationNode;
613
614
  let t32;
614
- if ($[86] !== extra || $[87] !== loadMore || $[88] !== ref || $[89] !== rest || $[90] !== t14 || $[91] !== t15 || $[92] !== t16 || $[93] !== t17 || $[94] !== t19 || $[95] !== t22 || $[96] !== t23 || $[97] !== t24 || $[98] !== t29 || $[99] !== t30 || $[100] !== t31) {
615
+ if ($[87] !== extra || $[88] !== loadMore || $[89] !== ref || $[90] !== rest || $[91] !== t14 || $[92] !== t15 || $[93] !== t16 || $[94] !== t17 || $[95] !== t19 || $[96] !== t22 || $[97] !== t23 || $[98] !== t24 || $[99] !== t29 || $[100] !== t30 || $[101] !== t31) {
615
616
  t32 = /*#__PURE__*/ jsxs("div", {
616
617
  ...rest,
617
618
  ref: ref,
@@ -632,33 +633,33 @@ function ListRoot(t0, ref) {
632
633
  t31
633
634
  ]
634
635
  });
635
- $[86] = extra;
636
- $[87] = loadMore;
637
- $[88] = ref;
638
- $[89] = rest;
639
- $[90] = t14;
640
- $[91] = t15;
641
- $[92] = t16;
642
- $[93] = t17;
643
- $[94] = t19;
644
- $[95] = t22;
645
- $[96] = t23;
646
- $[97] = t24;
647
- $[98] = t29;
648
- $[99] = t30;
649
- $[100] = t31;
650
- $[101] = t32;
651
- } else t32 = $[101];
636
+ $[87] = extra;
637
+ $[88] = loadMore;
638
+ $[89] = ref;
639
+ $[90] = rest;
640
+ $[91] = t14;
641
+ $[92] = t15;
642
+ $[93] = t16;
643
+ $[94] = t17;
644
+ $[95] = t19;
645
+ $[96] = t22;
646
+ $[97] = t23;
647
+ $[98] = t24;
648
+ $[99] = t29;
649
+ $[100] = t30;
650
+ $[101] = t31;
651
+ $[102] = t32;
652
+ } else t32 = $[102];
652
653
  let t33;
653
- if ($[102] !== t13 || $[103] !== t32) {
654
+ if ($[103] !== t13 || $[104] !== t32) {
654
655
  t33 = /*#__PURE__*/ jsx(ListContext.Provider, {
655
656
  value: t13,
656
657
  children: t32
657
658
  });
658
- $[102] = t13;
659
- $[103] = t32;
660
- $[104] = t33;
661
- } else t33 = $[104];
659
+ $[103] = t13;
660
+ $[104] = t32;
661
+ $[105] = t33;
662
+ } else t33 = $[105];
662
663
  return t33;
663
664
  }
664
665
  const List = Object.assign(/*#__PURE__*/ forwardRef(ListRoot), {
@@ -286,7 +286,7 @@ function MasonryInner(props, ref) {
286
286
  ...slots?.item,
287
287
  position: "absolute",
288
288
  width,
289
- height: item_1.height,
289
+ height: item_1.height ?? slots?.item?.height,
290
290
  insetInlineStart: `calc((${width} + ${gap_0}) * ${column_1})`,
291
291
  top: position_0?.top ?? 0
292
292
  },
@@ -75,6 +75,7 @@ const MentionsComponent = /*#__PURE__*/ forwardRef((props, ref)=>{
75
75
  ref: ref,
76
76
  prefixCls: prefixCls,
77
77
  disabled: disabled,
78
+ "aria-invalid": 'error' === status ? true : props['aria-invalid'],
78
79
  onKeyDownCapture: (event)=>{
79
80
  props.onKeyDownCapture?.(event);
80
81
  if (!event.isPropagationStopped() && 'Enter' === event.key && (event.nativeEvent.isComposing || 229 === event.keyCode)) {
@@ -245,6 +245,7 @@ function renderMenuItems(items, ctx) {
245
245
  disabled: item.disabled,
246
246
  textValue: textValue,
247
247
  checked: ctx.selectedKeys.includes(item.key),
248
+ onSelect: (event)=>event.preventDefault(),
248
249
  onCheckedChange: ()=>{
249
250
  ctx.onToggle(item.key);
250
251
  ctx.onAction(item);
@@ -1,6 +1,6 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
- import { useLayoutEffect, useRef, useState } from "react";
3
+ import { useId, useLayoutEffect, useRef, useState } from "react";
4
4
  import { cx } from "../../utils/semantic.js";
5
5
  import { Button } from "../button/button.js";
6
6
  import { StatusIcon } from "../status-icon/status-icon.js";
@@ -9,8 +9,10 @@ import { useTaoConfig } from "../../provider/tao-provider.js";
9
9
  function isPromise(v) {
10
10
  return !!v && 'function' == typeof v.then;
11
11
  }
12
- function ConfirmDialog({ onMount, open, close, type = 'confirm', icon, title, content, okText, cancelText, okCancel, okButtonProps, cancelButtonProps, onOk, onCancel, afterClose, centered = true, width = 416, maskClosable = false, closable = false, keyboard = true, className, classNames, styles }) {
13
- const { locale } = useTaoConfig();
12
+ function ConfirmDialog({ onMount, open, close, type = 'confirm', icon, title, content, okText, cancelText, okCancel, okButtonProps, cancelButtonProps, onOk, onCancel, afterClose, centered = true, width = 416, maskClosable = false, closable, keyboard = true, className, classNames, styles }) {
13
+ const { locale, disabled } = useTaoConfig();
14
+ const titleId = useId();
15
+ const contentId = useId();
14
16
  const [loading, setLoading] = useState(false);
15
17
  const [cancelLoading, setCancelLoading] = useState(false);
16
18
  const cancelPending = useRef(false);
@@ -55,11 +57,13 @@ function ConfirmDialog({ onMount, open, close, type = 'confirm', icon, title, co
55
57
  return /*#__PURE__*/ jsx(Modal, {
56
58
  open: open,
57
59
  title: null,
60
+ "aria-labelledby": null != title ? titleId : void 0,
61
+ "aria-describedby": null != content ? contentId : void 0,
58
62
  onClose: handleCancel,
59
63
  afterClose: afterClose,
60
64
  width: width,
61
65
  centered: centered,
62
- closable: closable,
66
+ closable: closable ?? (!!(okButtonProps?.disabled ?? disabled) && (!showCancel || !!cancelButtonProps?.disabled)),
63
67
  maskClosable: maskClosable,
64
68
  keyboard: keyboard,
65
69
  classNames: mergedClassNames,
@@ -69,6 +73,7 @@ function ConfirmDialog({ onMount, open, close, type = 'confirm', icon, title, co
69
73
  showCancel && /*#__PURE__*/ jsx(Button, {
70
74
  variant: "secondary",
71
75
  ...cancelButtonProps,
76
+ disabled: cancelButtonProps?.disabled ?? false,
72
77
  loading: cancelLoading || cancelButtonProps?.loading,
73
78
  onClick: (event)=>{
74
79
  cancelButtonProps?.onClick?.(event);
@@ -101,10 +106,12 @@ function ConfirmDialog({ onMount, open, close, type = 'confirm', icon, title, co
101
106
  "data-tao-modal-confirm-main": "",
102
107
  children: [
103
108
  null != title && /*#__PURE__*/ jsx("div", {
109
+ id: titleId,
104
110
  "data-tao-modal-confirm-title": "",
105
111
  children: title
106
112
  }),
107
113
  null != content && /*#__PURE__*/ jsx("div", {
114
+ id: contentId,
108
115
  "data-tao-modal-confirm-content": "",
109
116
  children: content
110
117
  })