@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
@@ -22,7 +22,7 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
22
22
  export var Progress = function(props) {
23
23
  var rtl = useRtl();
24
24
  var _ref = _object_spread({}, defaultProps, props), className = _ref.className, style = _ref.style, percent = _ref.percent, background = _ref.background, color = _ref.color, strokeWidth = _ref.strokeWidth, showText = _ref.showText, animated = _ref.animated, children = _ref.children, lazy = _ref.lazy, delay = _ref.delay, // tc
25
- showInfo = _ref.showInfo, borderRadius = _ref.borderRadius, fontSize = _ref.fontSize, activeColor = _ref.activeColor, backgroundColor = _ref.backgroundColor, active = _ref.active, activeMode = _ref.activeMode, duration = _ref.duration, ariaLabel = _ref.ariaLabel, onActiveEnd = _ref.onActiveEnd, rest = _object_without_properties(_ref, [
25
+ showInfo = _ref.showInfo, borderRadius = _ref.borderRadius, fontSize = _ref.fontSize, activeColor = _ref.activeColor, backgroundColor = _ref.backgroundColor, active = _ref.active, activeMode = _ref.activeMode, duration = _ref.duration, onActiveEnd = _ref.onActiveEnd, rest = _object_without_properties(_ref, [
26
26
  "className",
27
27
  "style",
28
28
  "percent",
@@ -42,7 +42,6 @@ export var Progress = function(props) {
42
42
  "active",
43
43
  "activeMode",
44
44
  "duration",
45
- "ariaLabel",
46
45
  "onActiveEnd"
47
46
  ]);
48
47
  var classPrefix = 'nut-progress';
@@ -209,8 +208,7 @@ export var Progress = function(props) {
209
208
  ref: progressRef,
210
209
  id: selector,
211
210
  className: classNames(classPrefix, className),
212
- style: style,
213
- "aria-label": ariaLabel
211
+ style: style
214
212
  }, rest), /*#__PURE__*/ React.createElement(View, {
215
213
  className: "".concat(classPrefix, "-outer"),
216
214
  style: stylesOuter
@@ -9,7 +9,6 @@ import Taro from "@tarojs/taro";
9
9
  import classNames from "classnames";
10
10
  import { Close } from "@nutui/icons-react-taro";
11
11
  import Popup from "../popup/index";
12
- import SafeArea from "../safearea/index";
13
12
  import { ComponentDefaults } from "../../utils/typings";
14
13
  import { usePropsValue } from "../../hooks/use-props-value";
15
14
  import Badge from "../badge/index";
@@ -17,10 +16,11 @@ import { useConfig } from "../configprovider";
17
16
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
18
17
  options: [],
19
18
  visible: false,
20
- closeOnOverlayClick: true
19
+ closeOnOverlayClick: true,
20
+ safeAreaInsetTop: true
21
21
  });
22
22
  var InternalQuickEnter = function(props, ref) {
23
- var _ref = _object_spread({}, defaultProps, props), children = _ref.children, visible = _ref.visible, title = _ref.title, _ref_options = _ref.options, options = _ref_options === void 0 ? [] : _ref_options, closeOnOverlayClick = _ref.closeOnOverlayClick, _ref_popupProps = _ref.popupProps, popupProps = _ref_popupProps === void 0 ? {} : _ref_popupProps, className = _ref.className, style = _ref.style, onClose = _ref.onClose, onChange = _ref.onChange, closeIcon = _ref.closeIcon, rest = _object_without_properties(_ref, [
23
+ var _ref = _object_spread({}, defaultProps, props), children = _ref.children, visible = _ref.visible, title = _ref.title, _ref_options = _ref.options, options = _ref_options === void 0 ? [] : _ref_options, closeOnOverlayClick = _ref.closeOnOverlayClick, _ref_popupProps = _ref.popupProps, popupProps = _ref_popupProps === void 0 ? {} : _ref_popupProps, className = _ref.className, style = _ref.style, onClose = _ref.onClose, onChange = _ref.onChange, closeIcon = _ref.closeIcon, safeAreaInsetTop = _ref.safeAreaInsetTop, rest = _object_without_properties(_ref, [
24
24
  "children",
25
25
  "visible",
26
26
  "title",
@@ -31,12 +31,15 @@ var InternalQuickEnter = function(props, ref) {
31
31
  "style",
32
32
  "onClose",
33
33
  "onChange",
34
- "closeIcon"
34
+ "closeIcon",
35
+ "safeAreaInsetTop"
35
36
  ]);
36
37
  var locale = useConfig().locale;
37
38
  var mergedTitle = title || locale.quickenter.title;
38
39
  var classPrefix = 'nut-quickenter';
39
- var classes = classNames(classPrefix, className);
40
+ var classes = classNames(classPrefix, className, {
41
+ 'safe-area-top': safeAreaInsetTop
42
+ });
40
43
  var _usePropsValue = _sliced_to_array(usePropsValue({
41
44
  value: props.visible,
42
45
  defaultValue: false,
@@ -81,7 +84,9 @@ var InternalQuickEnter = function(props, ref) {
81
84
  e.stopPropagation();
82
85
  onCancelEvent();
83
86
  }
84
- }, closeIcon || /*#__PURE__*/ React.createElement(Close, null)));
87
+ }, closeIcon || /*#__PURE__*/ React.createElement(Close, {
88
+ ariaLabel: locale.close
89
+ })));
85
90
  };
86
91
  var renderContent = function() {
87
92
  return /*#__PURE__*/ React.createElement(View, {
@@ -89,20 +94,23 @@ var InternalQuickEnter = function(props, ref) {
89
94
  }, /*#__PURE__*/ React.createElement(View, {
90
95
  className: "".concat(classPrefix, "-list")
91
96
  }, options.map(function(item, index) {
92
- var _item_badgeProps;
93
- var _item_badge;
97
+ var _item_badgeProps, _item_badgeProps1;
98
+ var _item_badge, _item_badge1;
94
99
  return /*#__PURE__*/ React.createElement(View, {
95
100
  key: index,
96
101
  className: "".concat(classPrefix, "-item"),
102
+ ariaLabel: "".concat(item.title, " ").concat((_item_badge = item.badge) !== null && _item_badge !== void 0 ? _item_badge : (_item_badgeProps = item.badgeProps) === null || _item_badgeProps === void 0 ? void 0 : _item_badgeProps.value),
97
103
  onClick: function() {
98
104
  return handleItemClick(item, index);
99
105
  }
100
106
  }, /*#__PURE__*/ React.createElement(View, {
101
- className: "".concat(classPrefix, "-item-icon")
107
+ className: "".concat(classPrefix, "-item-icon"),
108
+ ariaHidden: true
102
109
  }, /*#__PURE__*/ React.createElement(Badge, _object_spread_props(_object_spread({}, item.badgeProps), {
103
- value: (_item_badge = item.badge) !== null && _item_badge !== void 0 ? _item_badge : (_item_badgeProps = item.badgeProps) === null || _item_badgeProps === void 0 ? void 0 : _item_badgeProps.value
110
+ value: (_item_badge1 = item.badge) !== null && _item_badge1 !== void 0 ? _item_badge1 : (_item_badgeProps1 = item.badgeProps) === null || _item_badgeProps1 === void 0 ? void 0 : _item_badgeProps1.value
104
111
  }), item.icon)), /*#__PURE__*/ React.createElement(View, {
105
- className: "".concat(classPrefix, "-item-title")
112
+ className: "".concat(classPrefix, "-item-title"),
113
+ ariaHidden: true
106
114
  }, item.title));
107
115
  })));
108
116
  };
@@ -127,8 +135,6 @@ var InternalQuickEnter = function(props, ref) {
127
135
  onCancelEvent();
128
136
  },
129
137
  onClose: onCancelEvent
130
- }), /*#__PURE__*/ React.createElement(SafeArea, {
131
- position: "top"
132
138
  }), renderQuickEnterElement()));
133
139
  };
134
140
  var QuickEnter = /*#__PURE__*/ React.forwardRef(InternalQuickEnter);
@@ -1,6 +1,7 @@
1
1
  .nut-quickenter {
2
2
  width: 100%;
3
- max-height: $quickenter-max-height; // Limit height for scrolling
3
+ /* 限制弹层最大高度,包含安全区 */
4
+ max-height: calc(#{$quickenter-max-height} + env(safe-area-inset-top, 0));
4
5
  background: $quickenter-bg-color;
5
6
  border-radius: 0 0 12px 12px;
6
7
  overflow: hidden;
@@ -10,6 +11,13 @@
10
11
  box-shadow: $quickenter-box-shadow;
11
12
  // backdrop-filter: $quickenter-backdrop-filter;
12
13
 
14
+ &.safe-area-top {
15
+ /* 使用 env fallback,确保旧浏览器返回 0 */
16
+ padding-top: calc(
17
+ env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1)
18
+ );
19
+ }
20
+
13
21
  &-control {
14
22
  display: flex;
15
23
  align-items: center;
@@ -44,7 +52,7 @@
44
52
  &-content {
45
53
  flex: 1;
46
54
  padding: 10px 28px;
47
- overflow-y: hidden; // Default: no scrolling
55
+ overflow-y: hidden; // 始终可滚动,防止内容被遮挡
48
56
  box-sizing: border-box;
49
57
 
50
58
  &-scrollable {
@@ -1,10 +1,12 @@
1
+ @charset "UTF-8";
1
2
  /* #ifdef harmony */
2
3
  /* #endif */
3
4
  /* #ifndef harmony */
4
5
  /* #endif */
5
6
  .nut-quickenter {
6
7
  width: 100%;
7
- max-height: var(--nutui-quickenter-max-height, 256px);
8
+ /* 限制弹层最大高度,包含安全区 */
9
+ max-height: calc(var(--nutui-quickenter-max-height, 256px) + env(safe-area-inset-top, 0));
8
10
  background: var(--nutui-quickenter-bg-color, #f5f5f5);
9
11
  border-radius: 0 0 12px 12px;
10
12
  overflow: hidden;
@@ -13,6 +15,10 @@
13
15
  flex-direction: column;
14
16
  box-shadow: var(--nutui-quickenter-box-shadow, 0px 8px 16px rgba(141, 153, 167, 0.2), 0px -0.5px 0px rgba(0, 0, 0, 0.05) inset);
15
17
  }
18
+ .nut-quickenter.safe-area-top {
19
+ /* 使用 env fallback,确保旧浏览器返回 0 */
20
+ padding-top: calc(env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1));
21
+ }
16
22
  .nut-quickenter-control {
17
23
  display: flex;
18
24
  align-items: center;
@@ -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);
@@ -405,7 +405,8 @@
405
405
 
406
406
  .nut-quickenter {
407
407
  width: 100%;
408
- max-height: var(--nutui-quickenter-max-height, 256px);
408
+ /* 限制弹层最大高度,包含安全区 */
409
+ max-height: calc(var(--nutui-quickenter-max-height, 256px) + env(safe-area-inset-top, 0));
409
410
  background: var(--nutui-quickenter-bg-color, #f5f5f5);
410
411
  border-radius: 0 0 12px 12px;
411
412
  overflow: hidden;
@@ -414,6 +415,10 @@
414
415
  flex-direction: column;
415
416
  box-shadow: var(--nutui-quickenter-box-shadow, 0px 8px 16px rgba(141, 153, 167, 0.2), 0px -0.5px 0px rgba(0, 0, 0, 0.05) inset);
416
417
  }
418
+ .nut-quickenter.safe-area-top {
419
+ /* 使用 env fallback,确保旧浏览器返回 0 */
420
+ padding-top: calc(env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1));
421
+ }
417
422
  .nut-quickenter-control {
418
423
  display: flex;
419
424
  align-items: center;
@@ -1,6 +1,7 @@
1
1
  .nut-quickenter {
2
2
  width: 100%;
3
- max-height: $quickenter-max-height; // Limit height for scrolling
3
+ /* 限制弹层最大高度,包含安全区 */
4
+ max-height: calc(#{$quickenter-max-height} + env(safe-area-inset-top, 0));
4
5
  background: $quickenter-bg-color;
5
6
  border-radius: 0 0 12px 12px;
6
7
  overflow: hidden;
@@ -10,6 +11,13 @@
10
11
  box-shadow: $quickenter-box-shadow;
11
12
  // backdrop-filter: $quickenter-backdrop-filter;
12
13
 
14
+ &.safe-area-top {
15
+ /* 使用 env fallback,确保旧浏览器返回 0 */
16
+ padding-top: calc(
17
+ env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1)
18
+ );
19
+ }
20
+
13
21
  &-control {
14
22
  display: flex;
15
23
  align-items: center;
@@ -44,7 +52,7 @@
44
52
  &-content {
45
53
  flex: 1;
46
54
  padding: 10px 28px;
47
- overflow-y: hidden; // Default: no scrolling
55
+ overflow-y: hidden; // 始终可滚动,防止内容被遮挡
48
56
  box-sizing: border-box;
49
57
 
50
58
  &-scrollable {
@@ -1,10 +1,12 @@
1
+ @charset "UTF-8";
1
2
  /* #ifdef harmony */
2
3
  /* #endif */
3
4
  /* #ifndef harmony */
4
5
  /* #endif */
5
6
  .nut-quickenter {
6
7
  width: 100%;
7
- max-height: var(--nutui-quickenter-max-height, 256px);
8
+ /* 限制弹层最大高度,包含安全区 */
9
+ max-height: calc(var(--nutui-quickenter-max-height, 256px) + env(safe-area-inset-top, 0));
8
10
  background: var(--nutui-quickenter-bg-color, #f5f5f5);
9
11
  border-radius: 0 0 12px 12px;
10
12
  overflow: hidden;
@@ -13,6 +15,10 @@
13
15
  flex-direction: column;
14
16
  box-shadow: var(--nutui-quickenter-box-shadow, 0px 8px 16px rgba(141, 153, 167, 0.2), 0px -0.5px 0px rgba(0, 0, 0, 0.05) inset);
15
17
  }
18
+ .nut-quickenter.safe-area-top {
19
+ /* 使用 env fallback,确保旧浏览器返回 0 */
20
+ padding-top: calc(env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1));
21
+ }
16
22
  .nut-quickenter-control {
17
23
  display: flex;
18
24
  align-items: center;
@@ -1,6 +1,7 @@
1
1
  .nut-quickenter {
2
2
  width: 100%;
3
- max-height: $quickenter-max-height; // Limit height for scrolling
3
+ /* 限制弹层最大高度,包含安全区 */
4
+ max-height: calc(#{$quickenter-max-height} + env(safe-area-inset-top, 0));
4
5
  background: $quickenter-bg-color;
5
6
  border-radius: 0 0 12px 12px;
6
7
  overflow: hidden;
@@ -10,6 +11,13 @@
10
11
  box-shadow: $quickenter-box-shadow;
11
12
  // backdrop-filter: $quickenter-backdrop-filter;
12
13
 
14
+ &.safe-area-top {
15
+ /* 使用 env fallback,确保旧浏览器返回 0 */
16
+ padding-top: calc(
17
+ env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1)
18
+ );
19
+ }
20
+
13
21
  &-control {
14
22
  display: flex;
15
23
  align-items: center;
@@ -44,7 +52,7 @@
44
52
  &-content {
45
53
  flex: 1;
46
54
  padding: 10px 28px;
47
- overflow-y: hidden; // Default: no scrolling
55
+ overflow-y: hidden; // 始终可滚动,防止内容被遮挡
48
56
  box-sizing: border-box;
49
57
 
50
58
  &-scrollable {
@@ -1,10 +1,12 @@
1
+ @charset "UTF-8";
1
2
  /* #ifdef harmony */
2
3
  /* #endif */
3
4
  /* #ifndef harmony */
4
5
  /* #endif */
5
6
  .nut-quickenter {
6
7
  width: 100%;
7
- max-height: var(--nutui-quickenter-max-height, 256px);
8
+ /* 限制弹层最大高度,包含安全区 */
9
+ max-height: calc(var(--nutui-quickenter-max-height, 256px) + env(safe-area-inset-top, 0));
8
10
  background: var(--nutui-quickenter-bg-color, #f5f5f5);
9
11
  border-radius: 0 0 12px 12px;
10
12
  overflow: hidden;
@@ -13,6 +15,10 @@
13
15
  flex-direction: column;
14
16
  box-shadow: var(--nutui-quickenter-box-shadow, 0px 8px 16px rgba(141, 153, 167, 0.2), 0px -0.5px 0px rgba(0, 0, 0, 0.05) inset);
15
17
  }
18
+ .nut-quickenter.safe-area-top {
19
+ /* 使用 env fallback,确保旧浏览器返回 0 */
20
+ padding-top: calc(env(safe-area-inset-top, 0) * var(--nutui-safe-area-multiple, 1));
21
+ }
16
22
  .nut-quickenter-control {
17
23
  display: flex;
18
24
  align-items: center;
@@ -39,7 +39,8 @@ export var ResultPage = function(props) {
39
39
  className: cls,
40
40
  style: style
41
41
  }, /*#__PURE__*/ React.createElement(View, {
42
- className: "".concat(classPrefix, "-icon")
42
+ className: "".concat(classPrefix, "-icon"),
43
+ ariaHidden: true
43
44
  }, icon || defaultStatus[status]), typeof title === 'string' && title ? /*#__PURE__*/ React.createElement(View, {
44
45
  className: "".concat(classPrefix, "-title")
45
46
  }, title) : title, typeof description === 'string' && description ? /*#__PURE__*/ React.createElement(Text, {
@@ -22,7 +22,9 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
22
22
  left: '',
23
23
  right: '',
24
24
  rightIn: '',
25
- leftIn: /*#__PURE__*/ React.createElement(Search, null),
25
+ leftIn: /*#__PURE__*/ React.createElement(Search, {
26
+ ariaHidden: true
27
+ }),
26
28
  tag: false
27
29
  });
28
30
  export var SearchBar = function(props) {
@@ -177,12 +179,15 @@ export var SearchBar = function(props) {
177
179
  onClick: function(e) {
178
180
  return onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item, e);
179
181
  }
180
- }, item, /*#__PURE__*/ React.createElement(Close, null));
182
+ }, item, /*#__PURE__*/ React.createElement(Close, {
183
+ ariaLabel: locale.close
184
+ }));
181
185
  }));
182
186
  }, [
183
187
  value,
184
188
  onItemClick,
185
- innerTag
189
+ innerTag,
190
+ locale.close
186
191
  ]);
187
192
  var renderLeftIn = useCallback(function() {
188
193
  if (!leftIn) return null;
@@ -195,11 +200,16 @@ export var SearchBar = function(props) {
195
200
  var renderLeft = useCallback(function() {
196
201
  if (!backable && !left) return null;
197
202
  return /*#__PURE__*/ React.createElement(View, {
198
- className: "".concat(classPrefix, "-left")
199
- }, backable ? /*#__PURE__*/ React.createElement(ArrowLeft, null) : left);
203
+ className: "".concat(classPrefix, "-left"),
204
+ ariaRole: backable ? 'button' : undefined,
205
+ ariaLabel: backable ? locale.back : undefined
206
+ }, backable ? /*#__PURE__*/ React.createElement(ArrowLeft, {
207
+ ariaHidden: true
208
+ }) : left);
200
209
  }, [
201
210
  backable,
202
- left
211
+ left,
212
+ locale
203
213
  ]);
204
214
  var renderRightIn = useCallback(function() {
205
215
  if (!rightIn) return null;
@@ -226,13 +236,17 @@ export var SearchBar = function(props) {
226
236
  visibility: "".concat(!innerTag && value && clearable ? 'visible' : 'hidden')
227
237
  },
228
238
  onClick: clearaVal,
229
- "aria-label": "清除"
230
- }, /*#__PURE__*/ React.createElement(MaskClose, null));
239
+ ariaRole: "button",
240
+ ariaLabel: locale.clear
241
+ }, /*#__PURE__*/ React.createElement(MaskClose, {
242
+ ariaHidden: true
243
+ }));
231
244
  }, [
232
245
  value,
233
246
  clearable,
234
247
  clearaVal,
235
- innerTag
248
+ innerTag,
249
+ locale
236
250
  ]);
237
251
  var onConfirm = function() {
238
252
  onSearch && onSearch(value);
@@ -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 { SwipeRef, TaroSwipeProps } from "../../types";
3
- export declare const Swipe: React.ForwardRefExoticComponent<Partial<TaroSwipeProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onTouchEnd" | "onTouchMove" | "onTouchStart"> & React.RefAttributes<SwipeRef>>;
3
+ export declare const Swipe: React.ForwardRefExoticComponent<Partial<TaroSwipeProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onTouchStart" | "onTouchMove" | "onTouchEnd"> & React.RefAttributes<SwipeRef>>;
@@ -51,6 +51,7 @@ export var Tabs = function(props) {
51
51
  onChange: onChange
52
52
  }), 2), value = _usePropsValue[0], setValue = _usePropsValue[1];
53
53
  var titleItemsRef = useRef([]);
54
+ var tabsRef = useRef(null);
54
55
  var getTitles = function() {
55
56
  var titles = [];
56
57
  React.Children.forEach(children, function(child, idx) {
@@ -90,7 +91,8 @@ export var Tabs = function(props) {
90
91
  var classesTitle = classNames("".concat(classPrefix, "-titles"), (_obj = {}, _define_property(_obj, "".concat(classPrefix, "-titles-").concat(activeType), activeType), _define_property(_obj, "".concat(classPrefix, "-titles-").concat(align), align), _obj));
91
92
  var getRect = function(selector) {
92
93
  return new Promise(function(resolve) {
93
- createSelectorQuery().select(selector).boundingClientRect().exec(function() {
94
+ var _tabsRef_current;
95
+ createSelectorQuery().in(((_tabsRef_current = tabsRef.current) === null || _tabsRef_current === void 0 ? void 0 : _tabsRef_current._scope) || tabsRef.current).select(selector).boundingClientRect().exec(function() {
94
96
  var rect = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
95
97
  resolve(rect[0]);
96
98
  });
@@ -98,7 +100,8 @@ export var Tabs = function(props) {
98
100
  };
99
101
  var getAllRect = function(selector) {
100
102
  return new Promise(function(resolve) {
101
- createSelectorQuery().selectAll(selector).boundingClientRect().exec(function() {
103
+ var _tabsRef_current;
104
+ createSelectorQuery().in(((_tabsRef_current = tabsRef.current) === null || _tabsRef_current === void 0 ? void 0 : _tabsRef_current._scope) || tabsRef.current).selectAll(selector).boundingClientRect().exec(function() {
102
105
  var rect = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
103
106
  resolve(rect[0]);
104
107
  });
@@ -178,9 +181,11 @@ export var Tabs = function(props) {
178
181
  setValue(item.value);
179
182
  }
180
183
  };
181
- return /*#__PURE__*/ React.createElement(View, _object_spread({
184
+ return /*#__PURE__*/ React.createElement(View, _object_spread_props(_object_spread({
182
185
  className: classes
183
- }, rest), /*#__PURE__*/ React.createElement(ScrollView, {
186
+ }, rest), {
187
+ ref: tabsRef
188
+ }), /*#__PURE__*/ React.createElement(ScrollView, {
184
189
  enableFlex: true,
185
190
  scrollX: direction === 'horizontal',
186
191
  scrollY: direction === 'vertical',
@@ -212,7 +217,9 @@ export var Tabs = function(props) {
212
217
  background: activeColor
213
218
  }
214
219
  }), activeType === 'smile' && /*#__PURE__*/ React.createElement(View, {
215
- className: "".concat(classPrefix, "-titles-item-smile")
220
+ className: "".concat(classPrefix, "-titles-item-smile"),
221
+ // @ts-ignore
222
+ ariaHidden: true
216
223
  }, /*#__PURE__*/ React.createElement(JoySmile, {
217
224
  color: activeColor
218
225
  })), /*#__PURE__*/ React.createElement(View, {
@@ -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);
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import type { MouseEvent } from 'react';
2
3
  import { BaseProps } from '../../base/props';
3
4
  import { UIFill, UIRound, UISize, UIType } from '../../base/atoms';
4
5
  export interface BaseButton extends BaseProps {
@@ -50,5 +51,5 @@ export interface BaseButton extends BaseProps {
50
51
  /**
51
52
  * 点击按钮时触发
52
53
  */
53
- onClick: (e: any) => void
54
+ onClick: (e: MouseEvent<HTMLButtonElement>) => void
54
55
  }