@nutui/nutui-react-taro 3.0.19-cpp.26-beta.4 → 3.0.19-cpp.27

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 (127) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/locales/base.d.ts +5 -0
  3. package/dist/cjs/locales/en-US.js +5 -0
  4. package/dist/cjs/locales/id-ID.js +5 -0
  5. package/dist/cjs/locales/ja-JP.js +6 -1
  6. package/dist/cjs/locales/tr-TR.js +5 -0
  7. package/dist/cjs/locales/zh-CN.js +5 -0
  8. package/dist/cjs/locales/zh-TW.js +5 -0
  9. package/dist/cjs/locales/zh-UG.js +5 -0
  10. package/dist/cjs/packages/actionsheet/style/style.harmony.css +7 -7
  11. package/dist/cjs/packages/address/address.d.ts +1 -1
  12. package/dist/cjs/packages/address/style/style.harmony.css +7 -7
  13. package/dist/cjs/packages/animatingnumbers/countup.js +3 -1
  14. package/dist/cjs/packages/avatar/avatar.js +32 -6
  15. package/dist/cjs/packages/badge/badge.js +16 -3
  16. package/dist/cjs/packages/button/button.d.ts +2 -21
  17. package/dist/cjs/packages/button/button.js +2 -3
  18. package/dist/cjs/packages/button/index.d.ts +0 -1
  19. package/dist/cjs/packages/calendar/style/style.harmony.css +7 -7
  20. package/dist/cjs/packages/cascader/style/style.harmony.css +7 -7
  21. package/dist/cjs/packages/datepicker/style/style.harmony.css +7 -7
  22. package/dist/cjs/packages/dialog/dialog.js +6 -2
  23. package/dist/cjs/packages/divider/divider.js +2 -2
  24. package/dist/cjs/packages/empty/empty.d.ts +4 -4
  25. package/dist/cjs/packages/image/image.js +11 -3
  26. package/dist/cjs/packages/imagepreview/style/style.harmony.css +7 -7
  27. package/dist/cjs/packages/input/input.js +10 -3
  28. package/dist/cjs/packages/numberkeyboard/style/style.harmony.css +7 -7
  29. package/dist/cjs/packages/picker/style/style.harmony.css +7 -7
  30. package/dist/cjs/packages/popover/style/style.harmony.css +7 -7
  31. package/dist/cjs/packages/popup/style/popup.scss +8 -7
  32. package/dist/cjs/packages/popup/style/style.css +7 -7
  33. package/dist/cjs/packages/popup/style/style.harmony.css +7 -7
  34. package/dist/cjs/packages/popup/style-jmapp/popup.scss +8 -7
  35. package/dist/cjs/packages/popup/style-jmapp/style.css +7 -7
  36. package/dist/cjs/packages/popup/style-jrkf/popup.scss +8 -7
  37. package/dist/cjs/packages/popup/style-jrkf/style.css +7 -7
  38. package/dist/cjs/packages/progress/progress.js +2 -4
  39. package/dist/cjs/packages/quickenter/quickenter.js +21 -15
  40. package/dist/cjs/packages/quickenter/style/quickenter.scss +10 -2
  41. package/dist/cjs/packages/quickenter/style/style.css +7 -1
  42. package/dist/cjs/packages/quickenter/style/style.harmony.css +13 -8
  43. package/dist/cjs/packages/quickenter/style-jmapp/quickenter.scss +10 -2
  44. package/dist/cjs/packages/quickenter/style-jmapp/style.css +7 -1
  45. package/dist/cjs/packages/quickenter/style-jrkf/quickenter.scss +10 -2
  46. package/dist/cjs/packages/quickenter/style-jrkf/style.css +7 -1
  47. package/dist/cjs/packages/resultpage/resultpage.js +2 -1
  48. package/dist/cjs/packages/searchbar/searchbar.js +23 -9
  49. package/dist/cjs/packages/shortpassword/style/style.harmony.css +7 -7
  50. package/dist/cjs/packages/swipe/swipe.d.ts +1 -1
  51. package/dist/cjs/packages/tabs/tabs.js +12 -5
  52. package/dist/cjs/packages/timeselect/style/style.harmony.css +7 -7
  53. package/dist/cjs/packages/tour/style/style.harmony.css +7 -7
  54. package/dist/cjs/types/spec/button/base.d.ts +2 -1
  55. package/dist/cjs/types/spec/button/taro.d.ts +5 -1
  56. package/dist/cjs/types/spec/quickenter/base.d.ts +1 -0
  57. package/dist/cjs/utils/taro/get-rect.js +4 -2
  58. package/dist/es/locales/base.d.ts +5 -0
  59. package/dist/es/locales/en-US.js +5 -0
  60. package/dist/es/locales/id-ID.js +5 -0
  61. package/dist/es/locales/ja-JP.js +6 -1
  62. package/dist/es/locales/tr-TR.js +5 -0
  63. package/dist/es/locales/zh-CN.js +5 -0
  64. package/dist/es/locales/zh-TW.js +5 -0
  65. package/dist/es/locales/zh-UG.js +5 -0
  66. package/dist/es/packages/actionsheet/style/style.harmony.css +7 -7
  67. package/dist/es/packages/address/address.d.ts +1 -1
  68. package/dist/es/packages/address/style/style.harmony.css +7 -7
  69. package/dist/es/packages/animatingnumbers/countup.js +3 -1
  70. package/dist/es/packages/avatar/avatar.js +32 -6
  71. package/dist/es/packages/badge/badge.js +16 -3
  72. package/dist/es/packages/button/button.d.ts +2 -21
  73. package/dist/es/packages/button/button.js +2 -4
  74. package/dist/es/packages/button/index.d.ts +0 -1
  75. package/dist/es/packages/calendar/style/style.harmony.css +7 -7
  76. package/dist/es/packages/cascader/style/style.harmony.css +7 -7
  77. package/dist/es/packages/datepicker/style/style.harmony.css +7 -7
  78. package/dist/es/packages/dialog/dialog.js +6 -2
  79. package/dist/es/packages/divider/divider.js +1 -1
  80. package/dist/es/packages/empty/empty.d.ts +4 -4
  81. package/dist/es/packages/image/image.js +11 -3
  82. package/dist/es/packages/imagepreview/style/style.harmony.css +7 -7
  83. package/dist/es/packages/input/input.js +10 -3
  84. package/dist/es/packages/numberkeyboard/style/style.harmony.css +7 -7
  85. package/dist/es/packages/picker/style/style.harmony.css +7 -7
  86. package/dist/es/packages/popover/style/style.harmony.css +7 -7
  87. package/dist/es/packages/popup/popup.js +1 -2
  88. package/dist/es/packages/popup/style/popup.scss +8 -7
  89. package/dist/es/packages/popup/style/style.css +7 -7
  90. package/dist/es/packages/popup/style/style.harmony.css +7 -7
  91. package/dist/es/packages/popup/style-jmapp/popup.scss +8 -7
  92. package/dist/es/packages/popup/style-jmapp/style.css +7 -7
  93. package/dist/es/packages/popup/style-jrkf/popup.scss +8 -7
  94. package/dist/es/packages/popup/style-jrkf/style.css +7 -7
  95. package/dist/es/packages/progress/progress.js +2 -4
  96. package/dist/es/packages/quickenter/quickenter.js +19 -13
  97. package/dist/es/packages/quickenter/style/quickenter.scss +10 -2
  98. package/dist/es/packages/quickenter/style/style.css +7 -1
  99. package/dist/es/packages/quickenter/style/style.harmony.css +13 -8
  100. package/dist/es/packages/quickenter/style-jmapp/quickenter.scss +10 -2
  101. package/dist/es/packages/quickenter/style-jmapp/style.css +7 -1
  102. package/dist/es/packages/quickenter/style-jrkf/quickenter.scss +10 -2
  103. package/dist/es/packages/quickenter/style-jrkf/style.css +7 -1
  104. package/dist/es/packages/resultpage/resultpage.js +2 -1
  105. package/dist/es/packages/searchbar/searchbar.js +23 -9
  106. package/dist/es/packages/shortpassword/style/style.harmony.css +7 -7
  107. package/dist/es/packages/swipe/swipe.d.ts +1 -1
  108. package/dist/es/packages/tabs/tabs.js +12 -5
  109. package/dist/es/packages/timeselect/style/style.harmony.css +7 -7
  110. package/dist/es/packages/tour/style/style.harmony.css +7 -7
  111. package/dist/es/types/spec/button/base.d.ts +2 -1
  112. package/dist/es/types/spec/button/taro.d.ts +5 -1
  113. package/dist/es/types/spec/quickenter/base.d.ts +1 -0
  114. package/dist/es/utils/taro/get-rect.js +4 -2
  115. package/dist/nutui.react.umd.js +1127 -102
  116. package/dist/style-jmapp.css +1 -1
  117. package/dist/style-jmapp.scss +34 -34
  118. package/dist/style-jrkf.css +1 -1
  119. package/dist/style-jrkf.scss +42 -42
  120. package/dist/style.css +1 -1
  121. package/dist/style.scss +36 -36
  122. package/dist/styles/jd-font.scss +2 -2
  123. package/dist/styles/themes/daojia.css +1 -1
  124. package/dist/styles/themes/dark-daojia.css +1 -1
  125. package/dist/styles/themes/dark.css +1 -1
  126. package/dist/styles/themes/default.css +1 -1
  127. package/package.json +1 -1
@@ -55,7 +55,8 @@ var getRectInMultiPlatform = function getRectInMultiPlatform(element) {
55
55
  resolve(lru.get(element));
56
56
  return;
57
57
  }
58
- (0, _taro.createSelectorQuery)().select("#".concat(harmonyId || element.uid)).boundingClientRect().exec(function(param) {
58
+ (0, _taro.createSelectorQuery)() // https://taro.jd.com/docs/reference/config/page/
59
+ .in((element === null || element === void 0 ? void 0 : element._scope) || element).select("#".concat(harmonyId || element.uid)).boundingClientRect().exec(function(param) {
59
60
  var _param = (0, _sliced_to_array._)(param, 1), rects = _param[0];
60
61
  if (rects) {
61
62
  lru.set(element, rects);
@@ -86,7 +87,8 @@ var getRectInMultiPlatformWithoutCache = function getRectInMultiPlatformWithoutC
86
87
  return [
87
88
  2,
88
89
  new Promise(function(resolve, reject) {
89
- (0, _taro.createSelectorQuery)().select("#".concat(harmonyId || element.uid)).boundingClientRect().exec(function(param) {
90
+ (0, _taro.createSelectorQuery)() // https://taro.jd.com/docs/reference/config/page/
91
+ .in((element === null || element === void 0 ? void 0 : element._scope) || element).select("#".concat(harmonyId || element.uid)).boundingClientRect().exec(function(param) {
90
92
  var _param = (0, _sliced_to_array._)(param, 1), rects = _param[0];
91
93
  resolve(rects);
92
94
  });
@@ -9,6 +9,11 @@ export interface BaseLang {
9
9
  edit: string;
10
10
  reset: string;
11
11
  close: string;
12
+ back: string;
13
+ clear: string;
14
+ image: {
15
+ errorTip: string;
16
+ };
12
17
  video: {
13
18
  errorTip: string;
14
19
  clickRetry: string;
@@ -9,6 +9,11 @@ var enUS = {
9
9
  edit: 'Edit',
10
10
  reset: 'Reset',
11
11
  close: 'Close',
12
+ back: 'Back',
13
+ clear: 'Clear',
14
+ image: {
15
+ errorTip: 'Image failed to load'
16
+ },
12
17
  video: {
13
18
  errorTip: 'Error Tip',
14
19
  clickRetry: 'Click Retry'
@@ -9,6 +9,11 @@ var idID = {
9
9
  edit: 'Sunting',
10
10
  reset: 'Mengatur Ulang',
11
11
  close: 'Tutup',
12
+ back: 'Kembali',
13
+ clear: 'Bersihkan',
14
+ image: {
15
+ errorTip: 'Gambar gagal dimuat'
16
+ },
12
17
  video: {
13
18
  errorTip: 'Terjadi Kesalahan',
14
19
  clickRetry: 'Coba Lagi'
@@ -8,6 +8,12 @@ var jaJP = {
8
8
  select: '選択してください',
9
9
  edit: '編集',
10
10
  reset: 'リセット',
11
+ close: '閉じる',
12
+ back: '戻る',
13
+ clear: 'クリア',
14
+ image: {
15
+ errorTip: '画像の読み込みに失敗しました'
16
+ },
11
17
  video: {
12
18
  errorTip: '動画の読み込みに失敗しました',
13
19
  clickRetry: 'クリックして再試行'
@@ -155,7 +161,6 @@ var jaJP = {
155
161
  errorCanvasTips: '現在の環境はCanvasをサポートしていません'
156
162
  },
157
163
  mask: 'マスク',
158
- close: '閉じる',
159
164
  quickenter: {
160
165
  title: 'クイックアクセス'
161
166
  }
@@ -9,6 +9,11 @@ var trTR = {
9
9
  edit: 'düzenlemek',
10
10
  reset: 'sıfırlama',
11
11
  close: 'Kapat',
12
+ back: 'Geri',
13
+ clear: 'Temizle',
14
+ image: {
15
+ errorTip: 'Resim yüklenemedi'
16
+ },
12
17
  video: {
13
18
  errorTip: 'Video yüklenemedi',
14
19
  clickRetry: 'Yeniden Tıklayın'
@@ -9,6 +9,11 @@ var zhCN = {
9
9
  edit: '编辑',
10
10
  reset: '重置',
11
11
  close: '关闭',
12
+ back: '返回',
13
+ clear: '清除',
14
+ image: {
15
+ errorTip: '图片加载失败'
16
+ },
12
17
  video: {
13
18
  errorTip: '视频加载失败',
14
19
  clickRetry: '点击重试'
@@ -9,6 +9,11 @@ var zhCN = {
9
9
  edit: '編輯',
10
10
  reset: '重置',
11
11
  close: '關閉',
12
+ back: '返回',
13
+ clear: '清除',
14
+ image: {
15
+ errorTip: '圖片加載失敗'
16
+ },
12
17
  video: {
13
18
  errorTip: '視頻加載失敗',
14
19
  clickRetry: '點擊重試'
@@ -9,6 +9,11 @@ var zhUG = {
9
9
  edit: 'يحرر',
10
10
  reset: 'إعادة ضبط',
11
11
  close: 'تاقاش',
12
+ back: 'قايتىش',
13
+ clear: 'تاقاش',
14
+ image: {
15
+ errorTip: 'رەسىم يۈكلەش مەغلۇپ بولدى'
16
+ },
12
17
  video: {
13
18
  errorTip: 'فىلىمنى قويۇش مەغلۇپ بولدى',
14
19
  clickRetry: 'قايتا سىناش'
@@ -291,7 +291,7 @@
291
291
  animation-name: popup-slide-right-enter;
292
292
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
293
293
  }
294
- .nut-popup-slide-right-exit-active {
294
+ .nut-popup-slide-right-exit {
295
295
  animation-fill-mode: both;
296
296
  animation-name: popup-slide-right-exit;
297
297
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
@@ -304,7 +304,7 @@
304
304
  transform: translate3d(0, 0%, 0);
305
305
  }
306
306
  }
307
- @keyframes popup-slide-bottom-exit {
307
+ @keyframes slide-bottom-exit {
308
308
  from {
309
309
  transform: translate3d(0, 0%, 0);
310
310
  }
@@ -313,14 +313,14 @@
313
313
  }
314
314
  }
315
315
  .nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
316
- transform: translate3d(0, 0, 0);
316
+ transform: translate(0, 0);
317
317
  animation-fill-mode: both;
318
318
  animation-name: popup-slide-bottom-enter;
319
319
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
320
320
  }
321
- .nut-popup-slide-bottom-exit-active {
321
+ .nut-popup-slide-bottom-exit {
322
322
  animation-fill-mode: both;
323
- animation-name: popup-slide-bottom-exit;
323
+ animation-name: slide-bottom-exit;
324
324
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
325
325
  }
326
326
  @keyframes popup-slide-left-enter {
@@ -340,12 +340,12 @@
340
340
  }
341
341
  }
342
342
  .nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
343
- transform: translate3d(0, 0, 0);
343
+ transform: translate(0, 0);
344
344
  animation-fill-mode: both;
345
345
  animation-name: popup-slide-left-enter;
346
346
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
347
347
  }
348
- .nut-popup-slide-left-exit-active {
348
+ .nut-popup-slide-left-exit-active, .nut-popup-slide-left-exit-done {
349
349
  animation-fill-mode: both;
350
350
  animation-name: popup-slide-left-exit;
351
351
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { AddressRef, TaroAddressProps } from "../../types";
3
- export declare const Address: React.ForwardRefExoticComponent<Partial<TaroAddressProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "onClick" | "title" | "onLoad"> & React.RefAttributes<AddressRef>>;
3
+ export declare const Address: React.ForwardRefExoticComponent<Partial<TaroAddressProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "title" | "onClick" | "onLoad"> & React.RefAttributes<AddressRef>>;
@@ -441,7 +441,7 @@
441
441
  animation-name: popup-slide-right-enter;
442
442
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
443
443
  }
444
- .nut-popup-slide-right-exit-active {
444
+ .nut-popup-slide-right-exit {
445
445
  animation-fill-mode: both;
446
446
  animation-name: popup-slide-right-exit;
447
447
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
@@ -454,7 +454,7 @@
454
454
  transform: translate3d(0, 0%, 0);
455
455
  }
456
456
  }
457
- @keyframes popup-slide-bottom-exit {
457
+ @keyframes slide-bottom-exit {
458
458
  from {
459
459
  transform: translate3d(0, 0%, 0);
460
460
  }
@@ -463,14 +463,14 @@
463
463
  }
464
464
  }
465
465
  .nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
466
- transform: translate3d(0, 0, 0);
466
+ transform: translate(0, 0);
467
467
  animation-fill-mode: both;
468
468
  animation-name: popup-slide-bottom-enter;
469
469
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
470
470
  }
471
- .nut-popup-slide-bottom-exit-active {
471
+ .nut-popup-slide-bottom-exit {
472
472
  animation-fill-mode: both;
473
- animation-name: popup-slide-bottom-exit;
473
+ animation-name: slide-bottom-exit;
474
474
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
475
475
  }
476
476
  @keyframes popup-slide-left-enter {
@@ -490,12 +490,12 @@
490
490
  }
491
491
  }
492
492
  .nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
493
- transform: translate3d(0, 0, 0);
493
+ transform: translate(0, 0);
494
494
  animation-fill-mode: both;
495
495
  animation-name: popup-slide-left-enter;
496
496
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
497
497
  }
498
- .nut-popup-slide-left-exit-active {
498
+ .nut-popup-slide-left-exit-active, .nut-popup-slide-left-exit-done {
499
499
  animation-fill-mode: both;
500
500
  animation-name: popup-slide-left-exit;
501
501
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
@@ -48,7 +48,9 @@ export var CountUp = function(props) {
48
48
  var isLoaded = useRef(false);
49
49
  var setNumberTransform = useCallback(function() {
50
50
  if (countupRef.current && numberArr.length) {
51
- createSelectorQuery().selectAll('.nut-countup-listitem').node(function(numberItems) {
51
+ var _countupRef_current;
52
+ createSelectorQuery()// @ts-ignore
53
+ .in(((_countupRef_current = countupRef.current) === null || _countupRef_current === void 0 ? void 0 : _countupRef_current._scope) || countupRef.current).selectAll('.nut-countup-listitem').node(function(numberItems) {
52
54
  var transformArrCache = [];
53
55
  Object.keys(numberItems).forEach(function(key) {
54
56
  var elem = numberItems[Number(key)];
@@ -1,6 +1,7 @@
1
1
  import { _ as _define_property } from "@swc/helpers/_/_define_property";
2
2
  import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
3
3
  import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
4
+ import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
4
5
  import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
5
6
  import React, { useContext, useEffect, useRef, useState } from "react";
6
7
  import { Image, View } from "@tarojs/components";
@@ -25,7 +26,23 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
25
26
  });
26
27
  var classPrefix = "nut-avatar";
27
28
  export var Avatar = function(props) {
28
- var _$_object_spread = _object_spread({}, defaultProps, props), children = _$_object_spread.children, size = _$_object_spread.size, shape = _$_object_spread.shape, background = _$_object_spread.background, color = _$_object_spread.color, src = _$_object_spread.src, icon = _$_object_spread.icon, mode = _$_object_spread.mode, fit = _$_object_spread.fit, avatarIndex = _$_object_spread.avatarIndex, className = _$_object_spread.className, style = _$_object_spread.style, onClick = _$_object_spread.onClick, onError = _$_object_spread.onError;
29
+ var _ref = _object_spread({}, defaultProps, props), children = _ref.children, size = _ref.size, shape = _ref.shape, background = _ref.background, color = _ref.color, src = _ref.src, alt = _ref.alt, icon = _ref.icon, mode = _ref.mode, fit = _ref.fit, avatarIndex = _ref.avatarIndex, className = _ref.className, style = _ref.style, onClick = _ref.onClick, onError = _ref.onError, rest = _object_without_properties(_ref, [
30
+ "children",
31
+ "size",
32
+ "shape",
33
+ "background",
34
+ "color",
35
+ "src",
36
+ "alt",
37
+ "icon",
38
+ "mode",
39
+ "fit",
40
+ "avatarIndex",
41
+ "className",
42
+ "style",
43
+ "onClick",
44
+ "onError"
45
+ ]);
29
46
  var _useState // 是否显示的最大头像个数
30
47
  = _sliced_to_array(useState(false), 2), showMax = _useState[0], setShowMax = _useState[1];
31
48
  var avatarRef = useRef(null);
@@ -62,7 +79,8 @@ export var Avatar = function(props) {
62
79
  }
63
80
  }, [
64
81
  avatarIndex,
65
- groupCount
82
+ groupCount,
83
+ groupMax
66
84
  ]);
67
85
  var errorEvent = function() {
68
86
  onError && onError();
@@ -70,19 +88,26 @@ export var Avatar = function(props) {
70
88
  var clickAvatar = function(e) {
71
89
  onClick && onClick(e);
72
90
  };
73
- return /*#__PURE__*/ React.createElement(React.Fragment, null, (showMax || !groupMax || avatarIndex <= groupMax) && /*#__PURE__*/ React.createElement(View, {
91
+ return /*#__PURE__*/ React.createElement(React.Fragment, null, (showMax || !groupMax || avatarIndex <= groupMax) && /*#__PURE__*/ React.createElement(View, _object_spread({
74
92
  className: cls,
75
93
  style: !showMax ? styles : maxStyles,
76
94
  onClick: clickAvatar,
77
- ref: avatarRef
78
- }, (!groupMax || avatarIndex <= groupMax) && /*#__PURE__*/ React.createElement(React.Fragment, null, src && /*#__PURE__*/ React.createElement(Image, {
95
+ ref: avatarRef,
96
+ // @ts-ignore
97
+ ariaRole: onClick ? 'button' : undefined
98
+ }, rest), (!groupMax || avatarIndex <= groupMax) && /*#__PURE__*/ React.createElement(React.Fragment, null, src && /*#__PURE__*/ React.createElement(Image, {
79
99
  className: "nut-avatar-img nut-avatar-".concat(groupSize || size || 'normal', "-img"),
80
100
  src: src,
101
+ nativeProps: {
102
+ alt: alt
103
+ },
81
104
  style: {
82
105
  objectFit: fit
83
106
  },
84
107
  mode: mode,
85
- onError: errorEvent
108
+ onError: errorEvent,
109
+ // @ts-ignore
110
+ ariaHidden: true
86
111
  }), /*#__PURE__*/ React.isValidElement(icon) ? /*#__PURE__*/ React.createElement(View, {
87
112
  className: "nut-avatar-text"
88
113
  }, /*#__PURE__*/ React.cloneElement(icon, _object_spread_props(_object_spread({}, icon.props), {
@@ -96,6 +121,7 @@ export var Avatar = function(props) {
96
121
  }, children), !src && !icon && !children && /*#__PURE__*/ React.createElement(View, {
97
122
  className: "nut-avatar-text"
98
123
  }, /*#__PURE__*/ React.createElement(User, {
124
+ ariaHidden: true,
99
125
  style: {
100
126
  color: color
101
127
  },
@@ -2,6 +2,7 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
2
  import { _ as _define_property } from "@swc/helpers/_/_define_property";
3
3
  import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
4
4
  import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
5
+ import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
5
6
  import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
6
7
  import { _ as _type_of } from "@swc/helpers/_/_type_of";
7
8
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
@@ -41,7 +42,19 @@ export var Badge = function(props) {
41
42
  };
42
43
  var _this;
43
44
  var rtl = useRtl();
44
- var _$_object_spread = _object_spread({}, defaultProps, props), className = _$_object_spread.className, style = _$_object_spread.style, value = _$_object_spread.value, max = _$_object_spread.max, children = _$_object_spread.children, dot = _$_object_spread.dot, top = _$_object_spread.top, right = _$_object_spread.right, fill = _$_object_spread.fill, size = _$_object_spread.size, disabled = _$_object_spread.disabled;
45
+ var _ref = _object_spread({}, defaultProps, props), className = _ref.className, style = _ref.style, value = _ref.value, max = _ref.max, children = _ref.children, dot = _ref.dot, top = _ref.top, right = _ref.right, fill = _ref.fill, size = _ref.size, disabled = _ref.disabled, rest = _object_without_properties(_ref, [
46
+ "className",
47
+ "style",
48
+ "value",
49
+ "max",
50
+ "children",
51
+ "dot",
52
+ "top",
53
+ "right",
54
+ "fill",
55
+ "size",
56
+ "disabled"
57
+ ]);
45
58
  var classPrefix = 'nut-badge';
46
59
  var isHarmony = harmony();
47
60
  var classes = classNames(classPrefix, className);
@@ -69,11 +82,11 @@ export var Badge = function(props) {
69
82
  })();
70
83
  };
71
84
  var _obj1;
72
- return /*#__PURE__*/ React.createElement(View, {
85
+ return /*#__PURE__*/ React.createElement(View, _object_spread({
73
86
  className: classes,
74
87
  style: style,
75
88
  ref: badgeRef
76
- }, isIcon() && /*#__PURE__*/ React.createElement(View, {
89
+ }, rest), isIcon() && /*#__PURE__*/ React.createElement(View, {
77
90
  className: classNames("".concat(classPrefix, "-content"), (_obj1 = {}, _define_property(_obj1, "".concat(classPrefix, "-icon"), true), _define_property(_obj1, "".concat(classPrefix, "-icon-rtl"), rtl), _obj1)),
78
91
  style: contentStyle
79
92
  }, value), children, !isIcon() && (getContent() || dot) && /*#__PURE__*/ React.createElement(View, {
@@ -1,22 +1,3 @@
1
1
  import React from 'react';
2
- import type { MouseEvent } from 'react';
3
- import { BasicComponent } from "../../utils/typings";
4
- export type ButtonType = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
5
- export type ButtonSize = 'xlarge' | 'large' | 'normal' | 'small' | 'mini';
6
- export type ButtonShape = 'square' | 'round';
7
- export type ButtonFill = 'solid' | 'outline' | 'dashed' | 'none';
8
- export interface ButtonProps extends BasicComponent {
9
- color: string;
10
- shape: ButtonShape;
11
- type: ButtonType;
12
- size: ButtonSize;
13
- fill: ButtonFill;
14
- block: boolean;
15
- loading: boolean;
16
- disabled: boolean;
17
- icon: React.ReactNode;
18
- rightIcon: React.ReactNode;
19
- nativeType: 'submit' | 'reset';
20
- onClick: (e: MouseEvent<HTMLButtonElement>) => void;
21
- }
22
- export declare const Button: React.ForwardRefExoticComponent<Partial<ButtonProps> & React.RefAttributes<HTMLButtonElement>>;
2
+ import { TaroButtonProps } from "../../types";
3
+ export declare const Button: React.ForwardRefExoticComponent<Omit<Partial<TaroButtonProps>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -4,8 +4,7 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
4
4
  import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
5
5
  import React, { useCallback, useMemo } from "react";
6
6
  import classNames from "classnames";
7
- import { // ButtonProps as MiniProgramButtonProps,
8
- View } from "@tarojs/components";
7
+ import { View } from "@tarojs/components";
9
8
  import { Loading } from "@nutui/icons-react-taro";
10
9
  import { ComponentDefaults } from "../../utils/typings";
11
10
  import { harmony } from "../../utils/taro/platform";
@@ -96,9 +95,7 @@ export var Button = /*#__PURE__*/ React.forwardRef(function(props, ref) {
96
95
  // ;(rest as any).type = formType
97
96
  // }
98
97
  return (
99
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
100
98
  // @ts-ignore
101
- // eslint-disable-next-line react/button-has-type
102
99
  // <TaroButton
103
100
  /*#__PURE__*/ (React.createElement(View, _object_spread_props(_object_spread({}, rest), {
104
101
  ref: ref,
@@ -111,6 +108,7 @@ export var Button = /*#__PURE__*/ React.forwardRef(function(props, ref) {
111
108
  }), /*#__PURE__*/ React.createElement(View, {
112
109
  className: "nut-button-wrap"
113
110
  }, loading && /*#__PURE__*/ React.createElement(Loading, {
111
+ ariaHidden: true,
114
112
  className: "nut-icon-loading"
115
113
  }), !loading && icon, children && /*#__PURE__*/ React.createElement(View, {
116
114
  className: "nut-button-children nut-button-".concat(size, "-children nut-button-").concat(type, "-children ").concat(!(props.fill || disabled || loading) ? '' : "nut-button-".concat(type).concat(props.fill ? "-".concat(fill) : '').concat(disabled || loading ? '-disabled' : '')).concat(icon || loading ? " nut-button-text" : '').concat(rightIcon ? ' nut-button-text-right' : ''),
@@ -1,3 +1,2 @@
1
1
  import { Button } from "./button";
2
- export type { ButtonType, ButtonProps, ButtonSize, ButtonShape, ButtonFill, } from "./button";
3
2
  export default Button;
@@ -291,7 +291,7 @@
291
291
  animation-name: popup-slide-right-enter;
292
292
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
293
293
  }
294
- .nut-popup-slide-right-exit-active {
294
+ .nut-popup-slide-right-exit {
295
295
  animation-fill-mode: both;
296
296
  animation-name: popup-slide-right-exit;
297
297
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
@@ -304,7 +304,7 @@
304
304
  transform: translate3d(0, 0%, 0);
305
305
  }
306
306
  }
307
- @keyframes popup-slide-bottom-exit {
307
+ @keyframes slide-bottom-exit {
308
308
  from {
309
309
  transform: translate3d(0, 0%, 0);
310
310
  }
@@ -313,14 +313,14 @@
313
313
  }
314
314
  }
315
315
  .nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
316
- transform: translate3d(0, 0, 0);
316
+ transform: translate(0, 0);
317
317
  animation-fill-mode: both;
318
318
  animation-name: popup-slide-bottom-enter;
319
319
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
320
320
  }
321
- .nut-popup-slide-bottom-exit-active {
321
+ .nut-popup-slide-bottom-exit {
322
322
  animation-fill-mode: both;
323
- animation-name: popup-slide-bottom-exit;
323
+ animation-name: slide-bottom-exit;
324
324
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
325
325
  }
326
326
  @keyframes popup-slide-left-enter {
@@ -340,12 +340,12 @@
340
340
  }
341
341
  }
342
342
  .nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
343
- transform: translate3d(0, 0, 0);
343
+ transform: translate(0, 0);
344
344
  animation-fill-mode: both;
345
345
  animation-name: popup-slide-left-enter;
346
346
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
347
347
  }
348
- .nut-popup-slide-left-exit-active {
348
+ .nut-popup-slide-left-exit-active, .nut-popup-slide-left-exit-done {
349
349
  animation-fill-mode: both;
350
350
  animation-name: popup-slide-left-exit;
351
351
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
@@ -291,7 +291,7 @@
291
291
  animation-name: popup-slide-right-enter;
292
292
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
293
293
  }
294
- .nut-popup-slide-right-exit-active {
294
+ .nut-popup-slide-right-exit {
295
295
  animation-fill-mode: both;
296
296
  animation-name: popup-slide-right-exit;
297
297
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
@@ -304,7 +304,7 @@
304
304
  transform: translate3d(0, 0%, 0);
305
305
  }
306
306
  }
307
- @keyframes popup-slide-bottom-exit {
307
+ @keyframes slide-bottom-exit {
308
308
  from {
309
309
  transform: translate3d(0, 0%, 0);
310
310
  }
@@ -313,14 +313,14 @@
313
313
  }
314
314
  }
315
315
  .nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
316
- transform: translate3d(0, 0, 0);
316
+ transform: translate(0, 0);
317
317
  animation-fill-mode: both;
318
318
  animation-name: popup-slide-bottom-enter;
319
319
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
320
320
  }
321
- .nut-popup-slide-bottom-exit-active {
321
+ .nut-popup-slide-bottom-exit {
322
322
  animation-fill-mode: both;
323
- animation-name: popup-slide-bottom-exit;
323
+ animation-name: slide-bottom-exit;
324
324
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
325
325
  }
326
326
  @keyframes popup-slide-left-enter {
@@ -340,12 +340,12 @@
340
340
  }
341
341
  }
342
342
  .nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
343
- transform: translate3d(0, 0, 0);
343
+ transform: translate(0, 0);
344
344
  animation-fill-mode: both;
345
345
  animation-name: popup-slide-left-enter;
346
346
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
347
347
  }
348
- .nut-popup-slide-left-exit-active {
348
+ .nut-popup-slide-left-exit-active, .nut-popup-slide-left-exit-done {
349
349
  animation-fill-mode: both;
350
350
  animation-name: popup-slide-left-exit;
351
351
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
@@ -291,7 +291,7 @@
291
291
  animation-name: popup-slide-right-enter;
292
292
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
293
293
  }
294
- .nut-popup-slide-right-exit-active {
294
+ .nut-popup-slide-right-exit {
295
295
  animation-fill-mode: both;
296
296
  animation-name: popup-slide-right-exit;
297
297
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
@@ -304,7 +304,7 @@
304
304
  transform: translate3d(0, 0%, 0);
305
305
  }
306
306
  }
307
- @keyframes popup-slide-bottom-exit {
307
+ @keyframes slide-bottom-exit {
308
308
  from {
309
309
  transform: translate3d(0, 0%, 0);
310
310
  }
@@ -313,14 +313,14 @@
313
313
  }
314
314
  }
315
315
  .nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
316
- transform: translate3d(0, 0, 0);
316
+ transform: translate(0, 0);
317
317
  animation-fill-mode: both;
318
318
  animation-name: popup-slide-bottom-enter;
319
319
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
320
320
  }
321
- .nut-popup-slide-bottom-exit-active {
321
+ .nut-popup-slide-bottom-exit {
322
322
  animation-fill-mode: both;
323
- animation-name: popup-slide-bottom-exit;
323
+ animation-name: slide-bottom-exit;
324
324
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
325
325
  }
326
326
  @keyframes popup-slide-left-enter {
@@ -340,12 +340,12 @@
340
340
  }
341
341
  }
342
342
  .nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
343
- transform: translate3d(0, 0, 0);
343
+ transform: translate(0, 0);
344
344
  animation-fill-mode: both;
345
345
  animation-name: popup-slide-left-enter;
346
346
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
347
347
  }
348
- .nut-popup-slide-left-exit-active {
348
+ .nut-popup-slide-left-exit-active, .nut-popup-slide-left-exit-done {
349
349
  animation-fill-mode: both;
350
350
  animation-name: popup-slide-left-exit;
351
351
  animation-duration: var(--nutui-popup-animation-duration, 0.3s);
@@ -180,7 +180,11 @@ export var BaseDialog = function(props) {
180
180
  };
181
181
  var _obj;
182
182
  var closeClasses = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix, "-close"), true), _define_property(_obj, "".concat(classPrefix, "-close-").concat(closeIconPosition), true), _obj));
183
- var systomIcon = closeIconPosition !== 'bottom' ? /*#__PURE__*/ React.createElement(Close, null) : /*#__PURE__*/ React.createElement(Failure, null);
183
+ var systemIcon = closeIconPosition !== 'bottom' ? /*#__PURE__*/ React.createElement(Close, {
184
+ ariaHidden: true
185
+ }) : /*#__PURE__*/ React.createElement(Failure, {
186
+ ariaHidden: true
187
+ });
184
188
  return /*#__PURE__*/ React.createElement(View, {
185
189
  className: closeClasses,
186
190
  onClick: handleClose,
@@ -188,7 +192,7 @@ export var BaseDialog = function(props) {
188
192
  ariaLabel: locale.close,
189
193
  // @ts-ignore
190
194
  tabIndex: 0
191
- }, /*#__PURE__*/ React.isValidElement(closeIcon) ? closeIcon : systomIcon);
195
+ }, /*#__PURE__*/ React.isValidElement(closeIcon) ? closeIcon : systemIcon);
192
196
  };
193
197
  var onHandleClickOverlay = function(e) {
194
198
  if (closeOnOverlayClick && visible && e.target === e.currentTarget) {
@@ -6,7 +6,7 @@ import React from "react";
6
6
  import classNames from "classnames";
7
7
  import { View } from "@tarojs/components";
8
8
  import { ComponentDefaults } from "../../utils/typings";
9
- import { useRtl } from "../configprovider/configprovider";
9
+ import { useRtl } from "../configprovider/index";
10
10
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
11
11
  contentPosition: 'center',
12
12
  direction: 'horizontal'
@@ -1,11 +1,11 @@
1
1
  import React, { FunctionComponent, ReactNode } from 'react';
2
2
  import { BasicComponent } from "../../utils/typings";
3
- import { ButtonFill, ButtonSize, ButtonType } from "../button/button";
3
+ import { UIFill, UISize, UIType } from "../../types/base/atoms";
4
4
  export interface EmptyAction {
5
5
  text: React.ReactNode;
6
- type?: ButtonType;
7
- size?: ButtonSize;
8
- fill?: ButtonFill;
6
+ type?: UIType;
7
+ size?: UISize;
8
+ fill?: UIFill;
9
9
  disabled?: boolean;
10
10
  onClick?: () => () => void;
11
11
  }