@nutui/nutui-react-taro 2.3.12 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/esm/Address.js +1 -1
  3. package/dist/esm/AnimatingNumbers/style/style.css +1 -1
  4. package/dist/esm/Badge/style/style.css +1 -1
  5. package/dist/esm/Badge.js +1 -1
  6. package/dist/esm/Cascader.js +1 -1
  7. package/dist/esm/Checkbox/style/style.css +1 -1
  8. package/dist/esm/Checkbox.js +1 -1
  9. package/dist/esm/CheckboxGroup/style/style.css +1 -1
  10. package/dist/esm/CheckboxGroup.js +1 -1
  11. package/dist/esm/Collapse/style/style.css +1 -1
  12. package/dist/esm/CollapseItem/style/style.css +1 -1
  13. package/dist/esm/CountDown.js +1 -1
  14. package/dist/esm/DatePicker.js +1 -1
  15. package/dist/esm/Dialog/style/style.css +1 -1
  16. package/dist/esm/Dialog.js +1 -1
  17. package/dist/esm/InputNumber/style/style.css +1 -1
  18. package/dist/esm/InputNumber.js +1 -1
  19. package/dist/esm/NoticeBar/style/style.css +1 -1
  20. package/dist/esm/NoticeBar.js +1 -1
  21. package/dist/esm/Popover/style/style.css +1 -1
  22. package/dist/esm/Popover.js +1 -1
  23. package/dist/esm/Swipe/style/style.css +1 -1
  24. package/dist/esm/Tabbar/style/style.css +1 -1
  25. package/dist/esm/Tabbar.js +1 -1
  26. package/dist/esm/TabbarItem/style/style.css +1 -1
  27. package/dist/esm/TabbarItem.js +1 -1
  28. package/dist/esm/Table.js +1 -1
  29. package/dist/esm/Tabs.js +1 -1
  30. package/dist/esm/Toast.js +1 -1
  31. package/dist/esm/Tour/style/style.css +1 -1
  32. package/dist/esm/Tour.js +1 -1
  33. package/dist/esm/Uploader.js +1 -1
  34. package/dist/esm/VirtualList.js +1 -1
  35. package/dist/esm/{address.taro-DjlXNWie.js → address.taro-CgkCHDYZ.js} +1 -1
  36. package/dist/esm/{badge.taro-CyDqBb9Z.js → badge.taro-D7Yn5zJi.js} +4 -1
  37. package/dist/esm/{cascader.taro-CpofskUL.js → cascader.taro-BMp2mI0W.js} +1 -1
  38. package/dist/esm/{checkbox.taro-D9F_HM7f.js → checkbox.taro-CUpF7Afr.js} +23 -5
  39. package/dist/esm/{countdown.taro-Dfa9kpmZ.js → countdown.taro-D-H9erkV.js} +1 -1
  40. package/dist/esm/{datepicker.taro-DshCn7Rn.js → datepicker.taro-DqR52Ivo.js} +1 -1
  41. package/dist/esm/{dialog.taro-xsQhsC1V.js → dialog.taro-Dk0QQMn_.js} +14 -6
  42. package/dist/esm/{inputnumber.taro-F3jNGr_V.js → inputnumber.taro-CQiAPZgS.js} +1 -1
  43. package/dist/esm/{noticebar.taro-CMdfOp2g.js → noticebar.taro-CRPbZenq.js} +26 -21
  44. package/dist/esm/nutui-react.es.js +18 -18
  45. package/dist/esm/{popover.taro-CcKwnX27.js → popover.taro-BsOaXoWp.js} +8 -6
  46. package/dist/esm/{tabbar.taro-8_SmJofa.js → tabbar.taro-LAPQoOva.js} +1 -1
  47. package/dist/esm/{tabbaritem.taro-Cb-yfOln.js → tabbaritem.taro-C4AZbQMG.js} +1 -1
  48. package/dist/esm/{table.taro-0BcEBB0F.js → table.taro-ClLmfqz3.js} +8 -7
  49. package/dist/esm/{tabs.taro-HgAoKBAc.js → tabs.taro-DRmZR3Xu.js} +5 -5
  50. package/dist/esm/{toast.taro-BIR_7Wgb.js → toast.taro-BVXqvjNJ.js} +3 -3
  51. package/dist/esm/{tour.taro-CMagdKcp.js → tour.taro-wfXuUebD.js} +1 -1
  52. package/dist/esm/types/src/packages/cell/demo.d.ts +0 -1
  53. package/dist/esm/types/src/packages/cell/demo.taro.d.ts +0 -1
  54. package/dist/esm/types/src/packages/cell/demos/h5/demo1.d.ts +3 -0
  55. package/dist/esm/types/src/packages/cell/demos/h5/demo2.d.ts +3 -0
  56. package/dist/esm/types/src/packages/cell/demos/h5/demo3.d.ts +3 -0
  57. package/dist/esm/types/src/packages/cell/demos/h5/demo4.d.ts +3 -0
  58. package/dist/esm/types/src/packages/cell/demos/h5/demo5.d.ts +3 -0
  59. package/dist/esm/types/src/packages/cell/demos/h5/demo6.d.ts +3 -0
  60. package/dist/esm/types/src/packages/cell/demos/h5/demo7.d.ts +3 -0
  61. package/dist/esm/types/src/packages/cell/demos/taro/demo1.d.ts +3 -0
  62. package/dist/esm/types/src/packages/cell/demos/taro/demo2.d.ts +3 -0
  63. package/dist/esm/types/src/packages/cell/demos/taro/demo3.d.ts +3 -0
  64. package/dist/esm/types/src/packages/cell/demos/taro/demo4.d.ts +3 -0
  65. package/dist/esm/types/src/packages/cell/demos/taro/demo5.d.ts +3 -0
  66. package/dist/esm/types/src/packages/cell/demos/taro/demo6.d.ts +3 -0
  67. package/dist/esm/types/src/packages/cell/demos/taro/demo7.d.ts +3 -0
  68. package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.d.ts +1 -0
  69. package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.taro.d.ts +1 -0
  70. package/dist/esm/types/src/packages/checkboxgroup/context.d.ts +1 -0
  71. package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
  72. package/dist/esm/types/src/packages/dialog/config.d.ts +3 -3
  73. package/dist/esm/types/src/packages/dialog/index.d.ts +1 -1
  74. package/dist/esm/types/src/packages/noticebar/index.d.ts +1 -0
  75. package/dist/esm/types/src/packages/noticebar/noticebar.d.ts +2 -0
  76. package/dist/esm/types/src/packages/noticebar/noticebar.taro.d.ts +2 -0
  77. package/dist/esm/types/src/packages/noticebar/types.d.ts +1 -0
  78. package/dist/esm/types/src/packages/popover/index.d.ts +2 -1
  79. package/dist/esm/types/src/packages/popover/index.taro.d.ts +2 -1
  80. package/dist/esm/types/src/packages/popover/popover.d.ts +2 -12
  81. package/dist/esm/types/src/packages/popover/popover.taro.d.ts +2 -12
  82. package/dist/esm/types/src/packages/popover/types.d.ts +14 -0
  83. package/dist/esm/types/src/packages/table/useTableSticky.d.ts +1 -1
  84. package/dist/esm/types/src/packages/toast/toast.taro.d.ts +7 -3
  85. package/dist/esm/types/src/packages/tour/tour.d.ts +1 -1
  86. package/dist/esm/types/src/packages/tour/tour.taro.d.ts +1 -1
  87. package/dist/esm/{uploader.taro-CuaIVvya.js → uploader.taro-DdJ-sOK4.js} +2 -2
  88. package/dist/esm/{virtuallist.taro-C5vZAyza.js → virtuallist.taro-Cl08vfdg.js} +5 -4
  89. package/dist/locales/base.js +1 -1
  90. package/dist/locales/en-US.js +1 -1
  91. package/dist/locales/id-ID.js +1 -1
  92. package/dist/locales/tr-TR.js +1 -1
  93. package/dist/locales/zh-CN.js +1 -1
  94. package/dist/locales/zh-TW.js +1 -1
  95. package/dist/locales/zh-UG.js +1 -1
  96. package/dist/nutui.react.es.js +99 -51
  97. package/dist/nutui.react.umd.js +99 -51
  98. package/dist/packages/animatingnumbers/countup.scss +1 -0
  99. package/dist/packages/badge/badge.scss +2 -0
  100. package/dist/packages/checkbox/checkbox.scss +19 -0
  101. package/dist/packages/checkboxgroup/checkboxgroup.scss +25 -0
  102. package/dist/packages/collapseitem/collapseitem.scss +1 -6
  103. package/dist/packages/dialog/dialog.scss +8 -1
  104. package/dist/packages/noticebar/noticebar.scss +19 -1
  105. package/dist/packages/popover/popover.scss +21 -0
  106. package/dist/packages/swipe/swipe.scss +2 -0
  107. package/dist/style.css +1 -1
  108. package/dist/style.mjs +1 -1
  109. package/dist/styles/variables-jmapp.scss +13 -0
  110. package/dist/styles/variables.scss +19 -12
  111. package/dist/types/index.d.ts +98 -98
  112. package/dist/types/packages/actionsheet/actionsheet.d.ts +1 -1
  113. package/dist/types/packages/actionsheet/actionsheet.taro.d.ts +1 -1
  114. package/dist/types/packages/address/address.d.ts +1 -1
  115. package/dist/types/packages/address/address.taro.d.ts +1 -1
  116. package/dist/types/packages/address/customRender.d.ts +1 -1
  117. package/dist/types/packages/address/customRender.taro.d.ts +1 -1
  118. package/dist/types/packages/avatar/avatar.d.ts +1 -1
  119. package/dist/types/packages/avatar/avatar.taro.d.ts +1 -1
  120. package/dist/types/packages/badge/badge.taro.d.ts +1 -1
  121. package/dist/types/packages/calendaritem/calendaritem.d.ts +1 -1
  122. package/dist/types/packages/calendaritem/calendaritem.taro.d.ts +1 -1
  123. package/dist/types/packages/cascader/cascader.d.ts +1 -1
  124. package/dist/types/packages/cascader/cascader.taro.d.ts +1 -1
  125. package/dist/types/packages/cell/cell.d.ts +1 -1
  126. package/dist/types/packages/cell/cell.taro.d.ts +1 -1
  127. package/dist/types/packages/cell/demos/h5/demo1.d.ts +3 -0
  128. package/dist/types/packages/cell/demos/h5/demo2.d.ts +3 -0
  129. package/dist/types/packages/cell/demos/h5/demo3.d.ts +3 -0
  130. package/dist/types/packages/cell/demos/h5/demo4.d.ts +3 -0
  131. package/dist/types/packages/cell/demos/h5/demo5.d.ts +3 -0
  132. package/dist/types/packages/cell/demos/h5/demo6.d.ts +3 -0
  133. package/dist/types/packages/cell/demos/h5/demo7.d.ts +3 -0
  134. package/dist/types/packages/cell/demos/taro/demo1.d.ts +3 -0
  135. package/dist/types/packages/cell/demos/taro/demo2.d.ts +3 -0
  136. package/dist/types/packages/cell/demos/taro/demo3.d.ts +3 -0
  137. package/dist/types/packages/cell/demos/taro/demo4.d.ts +3 -0
  138. package/dist/types/packages/cell/demos/taro/demo5.d.ts +3 -0
  139. package/dist/types/packages/cell/demos/taro/demo6.d.ts +3 -0
  140. package/dist/types/packages/cell/demos/taro/demo7.d.ts +3 -0
  141. package/dist/types/packages/checkbox/checkbox.d.ts +2 -2
  142. package/dist/types/packages/checkbox/checkbox.taro.d.ts +2 -2
  143. package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +3 -2
  144. package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +3 -2
  145. package/dist/types/packages/checkboxgroup/context.d.ts +1 -0
  146. package/dist/types/packages/configprovider/types.d.ts +1 -1
  147. package/dist/types/packages/datepicker/datepicker.d.ts +1 -1
  148. package/dist/types/packages/datepicker/datepicker.taro.d.ts +1 -1
  149. package/dist/types/packages/dialog/config.d.ts +3 -3
  150. package/dist/types/packages/dialog/dialogwrap.d.ts +1 -1
  151. package/dist/types/packages/dialog/index.d.ts +1 -1
  152. package/dist/types/packages/empty/empty.d.ts +1 -1
  153. package/dist/types/packages/fixednav/fixednav.d.ts +1 -1
  154. package/dist/types/packages/fixednav/fixednav.taro.d.ts +1 -1
  155. package/dist/types/packages/form/form.d.ts +1 -1
  156. package/dist/types/packages/form/form.taro.d.ts +1 -1
  157. package/dist/types/packages/form/index.d.ts +1 -1
  158. package/dist/types/packages/form/index.taro.d.ts +1 -1
  159. package/dist/types/packages/menu/menu.d.ts +1 -1
  160. package/dist/types/packages/menu/menu.taro.d.ts +1 -1
  161. package/dist/types/packages/noticebar/index.d.ts +1 -0
  162. package/dist/types/packages/noticebar/noticebar.d.ts +2 -0
  163. package/dist/types/packages/noticebar/noticebar.taro.d.ts +6 -0
  164. package/dist/types/packages/noticebar/types.d.ts +1 -0
  165. package/dist/types/packages/numberkeyboard/numberkeyboard.d.ts +1 -1
  166. package/dist/types/packages/numberkeyboard/numberkeyboard.taro.d.ts +1 -1
  167. package/dist/types/packages/nutui.react.build.d.ts +98 -98
  168. package/dist/types/packages/nutui.react.d.ts +98 -98
  169. package/dist/types/packages/nutui.react.taro.d.ts +98 -98
  170. package/dist/types/packages/picker/picker.d.ts +1 -1
  171. package/dist/types/packages/picker/picker.taro.d.ts +1 -1
  172. package/dist/types/packages/popover/index.d.ts +2 -1
  173. package/dist/types/packages/popover/index.taro.d.ts +2 -1
  174. package/dist/types/packages/popover/popover.d.ts +3 -13
  175. package/dist/types/packages/popover/popover.taro.d.ts +3 -13
  176. package/dist/types/packages/popover/types.d.ts +14 -0
  177. package/dist/types/packages/popup/popup.d.ts +1 -1
  178. package/dist/types/packages/popup/popup.taro.d.ts +1 -1
  179. package/dist/types/packages/radio/radio.d.ts +2 -2
  180. package/dist/types/packages/radio/radio.taro.d.ts +2 -2
  181. package/dist/types/packages/shortpassword/shortpassword.d.ts +1 -1
  182. package/dist/types/packages/shortpassword/shortpassword.taro.d.ts +1 -1
  183. package/dist/types/packages/swiper/index.d.ts +1 -1
  184. package/dist/types/packages/swiper/index.taro.d.ts +1 -1
  185. package/dist/types/packages/table/useTableSticky.d.ts +1 -1
  186. package/dist/types/packages/tabs/tabs.d.ts +1 -1
  187. package/dist/types/packages/tabs/tabs.taro.d.ts +1 -1
  188. package/dist/types/packages/timedetail/timedetail.d.ts +1 -1
  189. package/dist/types/packages/timedetail/timedetail.taro.d.ts +1 -1
  190. package/dist/types/packages/toast/toast.taro.d.ts +8 -4
  191. package/dist/types/packages/tour/tour.d.ts +1 -1
  192. package/dist/types/packages/tour/tour.taro.d.ts +1 -1
  193. package/package.json +1 -1
@@ -1,9 +1,11 @@
1
1
  import React__default from "react";
2
2
  import classNames from "classnames";
3
3
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
4
+ import { a as useRtl } from "./configprovider.taro-CyU_tvNJ.js";
4
5
  const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { value: "", dot: false, max: 99, top: "4", right: "8", color: "" });
5
6
  const Badge = (props) => {
6
7
  var _a;
8
+ const rtl = useRtl();
7
9
  const { className, style, value, max, children, dot, top, right, color } = Object.assign(Object.assign({}, defaultProps), props);
8
10
  const classPrefix = "nut-badge";
9
11
  const classes = classNames(classPrefix, className);
@@ -33,7 +35,8 @@ const Badge = (props) => {
33
35
  const getStyle = () => {
34
36
  const style2 = {};
35
37
  style2.top = `${Number(top) || parseFloat(String(top)) || 0}px`;
36
- style2.right = `${Number(right) || parseFloat(String(right)) || 0}px`;
38
+ const dir = rtl ? "left" : "right";
39
+ style2[dir] = `${Number(right) || parseFloat(String(right)) || 0}px`;
37
40
  style2.background = color;
38
41
  return style2;
39
42
  };
@@ -4,7 +4,7 @@ import classNames from "classnames";
4
4
  import { Loading, Checklist } from "@nutui/icons-react-taro";
5
5
  import { ScrollView } from "@tarojs/components";
6
6
  import { P as Popup } from "./popup.taro-Iy_WQZ-m.js";
7
- import { T as Tabs } from "./tabs.taro-HgAoKBAc.js";
7
+ import { T as Tabs } from "./tabs.taro-DRmZR3Xu.js";
8
8
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
9
9
  import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
10
10
  const formatTree = (tree, parent, config) => tree.map((node) => {
@@ -2,6 +2,7 @@ import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
2
2
  import React__default, { createContext, useImperativeHandle, useCallback, useContext, useState, useEffect } from "react";
3
3
  import { CheckDisabled, Checked, CheckNormal } from "@nutui/icons-react-taro";
4
4
  import classNames from "classnames";
5
+ import { View } from "@tarojs/components";
5
6
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
6
7
  import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
7
8
  const CheckboxGroupContext = createContext(null);
@@ -9,6 +10,7 @@ const Context = CheckboxGroupContext;
9
10
  const defaultProps$1 = {
10
11
  max: void 0,
11
12
  min: void 0,
13
+ list: false,
12
14
  labelPosition: "right",
13
15
  direction: "vertical",
14
16
  onChange: (value) => {
@@ -19,7 +21,7 @@ const defaultProps$1 = {
19
21
  };
20
22
  const classPrefix$1 = "nut-checkboxgroup";
21
23
  const CheckboxGroup = React__default.forwardRef((props, ref) => {
22
- const _a = Object.assign(Object.assign({}, defaultProps$1), props), { children, className, disabled, onChange, value, defaultValue, max, min, onLimit, labelPosition, direction, options } = _a, rest = __rest(_a, ["children", "className", "disabled", "onChange", "value", "defaultValue", "max", "min", "onLimit", "labelPosition", "direction", "options"]);
24
+ const _a = Object.assign(Object.assign({}, defaultProps$1), props), { children, className, disabled, list, onChange, value, defaultValue, max, min, onLimit, labelPosition, direction, options } = _a, rest = __rest(_a, ["children", "className", "disabled", "list", "onChange", "value", "defaultValue", "max", "min", "onLimit", "labelPosition", "direction", "options"]);
23
25
  useImperativeHandle(ref, () => ({
24
26
  toggle(state) {
25
27
  if (state === false) {
@@ -61,6 +63,7 @@ const CheckboxGroup = React__default.forwardRef((props, ref) => {
61
63
  labelPosition: labelPosition || "right",
62
64
  disabled,
63
65
  max,
66
+ list,
64
67
  onLimit,
65
68
  value: _value,
66
69
  check: (value2) => {
@@ -81,7 +84,8 @@ const CheckboxGroup = React__default.forwardRef((props, ref) => {
81
84
  }
82
85
  } },
83
86
  React__default.createElement("div", Object.assign({ className: classNames(classPrefix$1, {
84
- [`nut-checkboxgroup-${props.direction}`]: props.direction
87
+ [`nut-checkboxgroup-${props.direction}`]: props.direction,
88
+ [`nut-checkboxgroup-list`]: list
85
89
  }, className) }, rest), (options === null || options === void 0 ? void 0 : options.length) ? renderOptions() : children)
86
90
  );
87
91
  });
@@ -148,6 +152,9 @@ const Checkbox = (props) => {
148
152
  if (innerChecked && !innerIndeterminate) {
149
153
  return `${cls}${classPrefix}-icon-checked ${classPrefix}-icon-disabled`;
150
154
  }
155
+ if (innerChecked && innerIndeterminate) {
156
+ return `${cls}${classPrefix}-icon-indeterminate ${classPrefix}-icon-disabled`;
157
+ }
151
158
  return `${cls}${classPrefix}-icon-disabled`;
152
159
  }
153
160
  if (innerChecked) {
@@ -171,16 +178,27 @@ const Checkbox = (props) => {
171
178
  };
172
179
  const renderButton = () => {
173
180
  return React__default.createElement(
174
- "div",
181
+ View,
175
182
  { className: classNames(`${classPrefix}-button`, {
176
183
  [`${classPrefix}-button-active`]: innerChecked,
177
184
  [`${classPrefix}-button-disabled`]: disabled
178
185
  }) },
179
186
  children || label,
180
- innerChecked && activeIcon ? React__default.createElement("div", { className: classNames(`${classPrefix}-button-icon`) }, activeIcon) : null
187
+ innerChecked && activeIcon ? React__default.createElement(View, { className: classNames(`${classPrefix}-button-icon`) }, activeIcon) : null
188
+ );
189
+ };
190
+ const renderListItem = () => {
191
+ return React__default.createElement(
192
+ View,
193
+ { className: "nut-checkbox-list-item" },
194
+ renderLabel(),
195
+ renderIcon()
181
196
  );
182
197
  };
183
198
  const renderCheckboxItem = () => {
199
+ if (ctx === null || ctx === void 0 ? void 0 : ctx.list) {
200
+ return React__default.createElement(React__default.Fragment, null, renderListItem());
201
+ }
184
202
  if (shape === "button") {
185
203
  return renderButton();
186
204
  }
@@ -191,7 +209,7 @@ const Checkbox = (props) => {
191
209
  renderLabel()
192
210
  );
193
211
  };
194
- return React__default.createElement("div", Object.assign({ className: classNames(classPrefix, {
212
+ return React__default.createElement(View, Object.assign({ className: classNames(classPrefix, {
195
213
  [`${classPrefix}-reverse`]: labelPosition === "left"
196
214
  }, className) }, rest, { onClick: handleClick }), renderCheckboxItem());
197
215
  };
@@ -25,7 +25,7 @@ const InternalCountDown = (props, ref) => {
25
25
  if (!timeStr)
26
26
  return Date.now();
27
27
  let t = timeStr;
28
- t = t > 0 ? +t : t.toString().replace(/-/g, "/");
28
+ t = Number(t) > 0 ? +t : t.toString().replace(/-/g, "/");
29
29
  return new Date(t).getTime();
30
30
  };
31
31
  const initTime = () => {
@@ -178,7 +178,7 @@ const DatePicker = (props) => {
178
178
  } else {
179
179
  cmin++;
180
180
  }
181
- if (cmin <= val) {
181
+ if (cmin <= Number(val)) {
182
182
  index++;
183
183
  }
184
184
  }
@@ -1,4 +1,5 @@
1
- import React__default from "react";
1
+ import { a as __awaiter } from "./tslib.es6-BZ8i9Q6l.js";
2
+ import React__default, { useState } from "react";
2
3
  import classNames from "classnames";
3
4
  import { CSSTransition } from "react-transition-group";
4
5
  import { View } from "@tarojs/components";
@@ -63,6 +64,7 @@ const defaultProps = {
63
64
  const BaseDialog = (props) => {
64
65
  const classPrefix = "nut-dialog";
65
66
  const { locale } = useConfig();
67
+ const [loading, setLoading] = useState(false);
66
68
  const { params: { id, className, style, visible, footer, title, header, content, children, footerDirection, hideConfirmButton, hideCancelButton, lockScroll, disableConfirmButton, closeOnOverlayClick, onOverlayClick, confirmText, cancelText, overlay, closeIconPosition, closeIcon, onClose, onCancel, onConfirm, beforeCancel, beforeClose }, setParams } = useParams(Object.assign(Object.assign({}, defaultProps), props));
67
69
  useCustomEvent(id, ({ status, options }) => {
68
70
  if (status) {
@@ -84,18 +86,24 @@ const BaseDialog = (props) => {
84
86
  onClose === null || onClose === void 0 ? void 0 : onClose();
85
87
  onCancel === null || onCancel === void 0 ? void 0 : onCancel();
86
88
  };
87
- const handleOk = (e) => {
89
+ const handleOk = (e) => __awaiter(void 0, void 0, void 0, function* () {
88
90
  e.stopPropagation();
89
- onClose === null || onClose === void 0 ? void 0 : onClose();
90
- onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(e);
91
- };
91
+ setLoading(true);
92
+ try {
93
+ yield onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(e);
94
+ setLoading(false);
95
+ onClose === null || onClose === void 0 ? void 0 : onClose();
96
+ } catch (_a) {
97
+ setLoading(false);
98
+ }
99
+ });
92
100
  return footer || React__default.createElement(
93
101
  React__default.Fragment,
94
102
  null,
95
103
  !hideCancelButton && React__default.createElement(Button, { type: "default", className: `${classPrefix}-footer-cancel`, onClick: (e) => handleCancel(e) }, cancelText || locale.cancel),
96
104
  !hideConfirmButton && React__default.createElement(Button, { type: "primary", className: classNames(`${classPrefix}-footer-ok`, {
97
105
  disabled: disableConfirmButton
98
- }), disabled: disableConfirmButton, onClick: (e) => handleOk(e) }, confirmText || locale.confirm)
106
+ }), disabled: disableConfirmButton, onClick: (e) => handleOk(e), loading }, confirmText || locale.confirm)
99
107
  );
100
108
  };
101
109
  const renderCloseIcon = () => {
@@ -72,7 +72,7 @@ const InputNumber = (props) => {
72
72
  const shouldOverBoundary = calcNextValue(shadowValue, step, negative ? -1 : 1);
73
73
  const nextValue = bound(shouldOverBoundary, Number(min), Number(max));
74
74
  setShadowValue(nextValue);
75
- if (negative ? shouldOverBoundary < min : shouldOverBoundary > max) {
75
+ if (negative ? shouldOverBoundary < Number(min) : shouldOverBoundary > Number(max)) {
76
76
  onOverlimit === null || onOverlimit === void 0 ? void 0 : onOverlimit(e);
77
77
  } else {
78
78
  onChange === null || onChange === void 0 ? void 0 : onChange(nextValue, e);
@@ -1,12 +1,15 @@
1
1
  import { a as __awaiter } from "./tslib.es6-BZ8i9Q6l.js";
2
2
  import React__default, { useRef, useState, useMemo, useEffect } from "react";
3
+ import { View } from "@tarojs/components";
3
4
  import { Notice, Close } from "@nutui/icons-react-taro";
4
5
  import classNames from "classnames";
5
6
  import { g as getRectByTaro } from "./get-rect-by-taro-CSN0TGnD.js";
6
7
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
7
- const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { direction: "horizontal", list: [], duration: 1e3, height: 40, content: "", closeable: false, wrap: false, leftIcon: React__default.createElement(Notice, { size: 16 }), rightIcon: null, delay: 1, scrollable: null, speed: 50 });
8
+ import { a as useRtl } from "./configprovider.taro-CyU_tvNJ.js";
9
+ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { align: "left", direction: "horizontal", list: [], duration: 1e3, height: 40, content: "", closeable: false, wrap: false, leftIcon: React__default.createElement(Notice, { size: 16 }), rightIcon: null, delay: 1, scrollable: null, speed: 50 });
8
10
  const NoticeBar = (props) => {
9
- const { children, className, style, direction, list, duration, height, content, closeable, wrap, leftIcon, rightIcon, delay, scrollable, speed, close, click, onClose, onClick, onItemClick } = Object.assign(Object.assign({}, defaultProps), props);
11
+ const rtl = useRtl();
12
+ const { children, className, style, align, direction, list, duration, height, content, closeable, wrap, leftIcon, rightIcon, delay, scrollable, speed, close, click, onClose, onClick, onItemClick } = Object.assign(Object.assign({}, defaultProps), props);
10
13
  const classPrefix = "nut-noticebar";
11
14
  const wrapRef = useRef(null);
12
15
  const contentRef = useRef(null);
@@ -92,7 +95,7 @@ const NoticeBar = (props) => {
92
95
  const contentRes = yield getRectByTaro(contentRef.current);
93
96
  const wrapW = warpRes.width;
94
97
  const offsetW = contentRes.width;
95
- const canScroll = scrollable == null ? offsetW > wrapW : scrollable;
98
+ const canScroll = align === "left" && scrollable == null ? offsetW > wrapW : scrollable;
96
99
  SetIsCanScroll(canScroll);
97
100
  if (canScroll) {
98
101
  SetWrapWidth(wrapW);
@@ -143,7 +146,7 @@ const NoticeBar = (props) => {
143
146
  onClose && onClose(event);
144
147
  };
145
148
  const isEllipsis = () => {
146
- if (isCanScroll == null) {
149
+ if (isCanScroll == null && align === "left") {
147
150
  return wrap;
148
151
  }
149
152
  return !isCanScroll && !wrap;
@@ -151,7 +154,7 @@ const NoticeBar = (props) => {
151
154
  const contentStyle = {
152
155
  animationDelay: `${firstRound ? delay : 0}s`,
153
156
  animationDuration: `${animationDuration}s`,
154
- transform: `translateX(${firstRound ? 0 : `${wrapWidth}px`})`
157
+ transform: `translateX(${firstRound ? 0 : `${rtl ? -wrapWidth : wrapWidth}px`})`
155
158
  };
156
159
  const barStyle = {
157
160
  height: isVertical ? `${height}px` : ""
@@ -294,50 +297,52 @@ const NoticeBar = (props) => {
294
297
  }
295
298
  };
296
299
  const noticebarClass = classNames({
297
- "nut-noticebar-box": true,
298
- [`nut-noticebar-box-wrapable`]: wrap
300
+ [`${classPrefix}-box`]: true,
301
+ [`${classPrefix}-box-wrapable`]: wrap,
302
+ [`${classPrefix}-box-${align}`]: true
299
303
  });
304
+ const cls = classNames(classPrefix, className);
300
305
  useEffect(() => {
301
306
  return () => {
302
307
  stopAutoPlay();
303
308
  };
304
309
  }, []);
305
310
  return React__default.createElement(
306
- "div",
307
- { className: `${classPrefix} ${className || ""}`, style },
311
+ View,
312
+ { className: cls, style },
308
313
  showNoticeBar && direction === "horizontal" ? React__default.createElement(
309
- "div",
314
+ View,
310
315
  { className: noticebarClass, style: barStyle, onClick: handleClick },
311
- leftIcon ? React__default.createElement("div", { className: "nut-noticebar-box-left-icon" }, leftIcon) : null,
316
+ leftIcon ? React__default.createElement(View, { className: "nut-noticebar-box-left-icon" }, leftIcon) : null,
312
317
  React__default.createElement(
313
- "div",
318
+ View,
314
319
  { ref: wrapRef, className: "nut-noticebar-box-wrap" },
315
320
  React__default.createElement(
316
- "div",
321
+ View,
317
322
  { ref: contentRef, className: `nut-noticebar-box-wrap-content ${animationClass} ${isEllipsis() ? "nut-ellipsis" : ""}`, style: contentStyle, onAnimationEnd },
318
323
  children,
319
324
  content
320
325
  )
321
326
  ),
322
- closeable || rightIcon ? React__default.createElement("div", { className: "nut-noticebar-box-right-icon", onClick: onClickIcon }, rightIcon || React__default.createElement(Close, { size: 12 })) : null
327
+ closeable || rightIcon ? React__default.createElement(View, { className: "nut-noticebar-box-right-icon", onClick: onClickIcon }, rightIcon || React__default.createElement(Close, { size: 12 })) : null
323
328
  ) : null,
324
329
  showNoticeBar && scrollList.current.length > 0 && isVertical ? React__default.createElement(
325
- "div",
330
+ View,
326
331
  { className: "nut-noticebar-vertical", style: barStyle, ref: container, onClick: handleClick },
327
- leftIcon ? React__default.createElement("div", { className: "nut-noticebar-box-left-icon" }, leftIcon) : null,
328
- children ? React__default.createElement("div", { className: "nut-noticebar-box-wrap", ref: innerRef }, scrollList.current.map((item, index) => {
329
- return React__default.createElement("div", { style: itemStyle(index), key: index, onClick: (e) => {
332
+ leftIcon ? React__default.createElement(View, { className: "nut-noticebar-box-left-icon" }, leftIcon) : null,
333
+ children ? React__default.createElement(View, { className: "nut-noticebar-box-wrap", ref: innerRef }, scrollList.current.map((item, index) => {
334
+ return React__default.createElement(View, { style: itemStyle(index), key: index, onClick: (e) => {
330
335
  handleItemClick(e, item);
331
336
  } }, item);
332
- })) : React__default.createElement("div", { className: "nut-noticebar-box-horseLamp-list", style: horseLampStyle }, scrollList.current.map((item, index) => {
337
+ })) : React__default.createElement(View, { className: "nut-noticebar-box-horseLamp-list", style: horseLampStyle }, scrollList.current.map((item, index) => {
333
338
  return (
334
339
  // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
335
- React__default.createElement("div", { className: "nut-noticebar-box-horseLamp-list-item", style: { height }, key: index, onClick: (e) => {
340
+ React__default.createElement(View, { className: "nut-noticebar-box-horseLamp-list-item", style: { height }, key: index, onClick: (e) => {
336
341
  handleItemClick(e, item);
337
342
  } }, item)
338
343
  );
339
344
  })),
340
- React__default.createElement("div", { className: "nut-noticebar-box-right-icon", onClick: (e) => {
345
+ React__default.createElement(View, { className: "nut-noticebar-box-right-icon", onClick: (e) => {
341
346
  handleClickIcon(e);
342
347
  } }, rightIcon || (closeable ? React__default.createElement(Close, { size: 12 }) : null))
343
348
  ) : null
@@ -20,21 +20,21 @@ import { N } from "./navbar.taro-B8u3DOE4.js";
20
20
  import { S as S4 } from "./sidenavbar.taro-eK5vaZPR.js";
21
21
  import { S as S5 } from "./sidenavbaritem.taro-L7HbsCLn.js";
22
22
  import { S as S6 } from "./subsidenavbar.taro-ByxYpgfP.js";
23
- import { T } from "./tabbar.taro-8_SmJofa.js";
24
- import { T as T2 } from "./tabbaritem.taro-Cb-yfOln.js";
23
+ import { T } from "./tabbar.taro-LAPQoOva.js";
24
+ import { T as T2 } from "./tabbaritem.taro-C4AZbQMG.js";
25
25
  import { T as T3 } from "./tabpane.taro-BAe86j3t.js";
26
- import { T as T4 } from "./tabs.taro-HgAoKBAc.js";
27
- import { A } from "./address.taro-DjlXNWie.js";
26
+ import { T as T4 } from "./tabs.taro-DRmZR3Xu.js";
27
+ import { A } from "./address.taro-CgkCHDYZ.js";
28
28
  import { C as C5 } from "./calendar.taro-DbHJEx4G.js";
29
29
  import { C as C6 } from "./calendaritem.taro-B8tN2DYa.js";
30
30
  import { C as C7 } from "./calendarcard.taro-BHGCq5zX.js";
31
- import { C as C8 } from "./cascader.taro-CpofskUL.js";
32
- import { C as C9, a } from "./checkbox.taro-D9F_HM7f.js";
33
- import { D as D2 } from "./datepicker.taro-DshCn7Rn.js";
31
+ import { C as C8 } from "./cascader.taro-BMp2mI0W.js";
32
+ import { C as C9, a } from "./checkbox.taro-CUpF7Afr.js";
33
+ import { D as D2 } from "./datepicker.taro-DqR52Ivo.js";
34
34
  import { default as default2 } from "./Form.js";
35
35
  import { F as F2 } from "./formitem.taro-Brz5dj_8.js";
36
36
  import { I as I2 } from "./input.taro-BVC8gEuk.js";
37
- import { I as I3 } from "./inputnumber.taro-F3jNGr_V.js";
37
+ import { I as I3 } from "./inputnumber.taro-CQiAPZgS.js";
38
38
  import { M } from "./menu.taro-BAiJPGR7.js";
39
39
  import { M as M2 } from "./menuitem.taro-oLv6ZYC5.js";
40
40
  import { N as N2 } from "./numberkeyboard.taro-B9rMgy7D.js";
@@ -47,22 +47,22 @@ import { S as S8 } from "./shortpassword.taro-BXsxku33.js";
47
47
  import { S as S9 } from "./signature.taro-KPm_xs66.js";
48
48
  import { S as S10 } from "./switch.taro-D1HgJoJz.js";
49
49
  import { T as T5 } from "./textarea.taro-BJIFCpKb.js";
50
- import { U } from "./uploader.taro-CuaIVvya.js";
50
+ import { U } from "./uploader.taro-DdJ-sOK4.js";
51
51
  import { A as A2 } from "./actionsheet.taro-C5BqWoML.js";
52
- import { B as B3 } from "./badge.taro-CyDqBb9Z.js";
53
- import { B as B4 } from "./dialog.taro-xsQhsC1V.js";
52
+ import { B as B3 } from "./badge.taro-D7Yn5zJi.js";
53
+ import { B as B4 } from "./dialog.taro-Dk0QQMn_.js";
54
54
  import { D as D3 } from "./drag.taro-CcHIO07Y.js";
55
55
  import { E as E2 } from "./empty.taro-Brkv6B2Z.js";
56
56
  import { I as I4 } from "./infiniteloading.taro-Ccq4bEzk.js";
57
57
  import { L as L2 } from "./loading.taro-CRF1z5wQ.js";
58
- import { N as N3 } from "./noticebar.taro-CMdfOp2g.js";
58
+ import { N as N3 } from "./noticebar.taro-CRPbZenq.js";
59
59
  import { N as N4 } from "./notify.taro-jP7y9zMU.js";
60
- import { P as P2 } from "./popover.taro-CcKwnX27.js";
60
+ import { P as P2 } from "./popover.taro-BsOaXoWp.js";
61
61
  import { P as P3 } from "./popup.taro-Iy_WQZ-m.js";
62
62
  import { P as P4 } from "./pulltorefresh.taro-BJdQj5sL.js";
63
63
  import { S as S11 } from "./skeleton.taro-BwIDIf2p.js";
64
64
  import { S as S12 } from "./swipe.taro-wm7YWwaj.js";
65
- import { T as T6 } from "./toast.taro-BIR_7Wgb.js";
65
+ import { T as T6 } from "./toast.taro-BVXqvjNJ.js";
66
66
  import { A as A3 } from "./animate.taro-Dg9jxZEu.js";
67
67
  import { default as default3 } from "./AnimatingNumbers.js";
68
68
  import { A as A4 } from "./audio.taro-DXxWGngO.js";
@@ -71,7 +71,7 @@ import { A as A6 } from "./avatargroup.taro-bpT5kPbf.js";
71
71
  import { C as C10 } from "./circleprogress.taro-CKSrzt8Q.js";
72
72
  import { C as C11 } from "./collapse.taro-BM0BsN30.js";
73
73
  import { C as C12 } from "./collapseitem.taro-D_m4VEdG.js";
74
- import { C as C13 } from "./countdown.taro-Dfa9kpmZ.js";
74
+ import { C as C13 } from "./countdown.taro-D-H9erkV.js";
75
75
  import { E as E3 } from "./ellipsis.taro-B_mTyNyk.js";
76
76
  import { I as I5 } from "./imagepreview.taro-Bb1TkBCV.js";
77
77
  import { I as I6 } from "./indicator.taro-CpHZtD9p.js";
@@ -82,11 +82,11 @@ import { S as S13 } from "./step.taro-DLr2GzYk.js";
82
82
  import { S as S14 } from "./steps.taro-C8Yg1Sns.js";
83
83
  import { default as default4 } from "./Swiper.js";
84
84
  import { S as S15 } from "./swiperitem.taro-8JXI24f0.js";
85
- import { T as T7 } from "./table.taro-0BcEBB0F.js";
85
+ import { T as T7 } from "./table.taro-ClLmfqz3.js";
86
86
  import { T as T8 } from "./tag.taro-BsmY5QfN.js";
87
- import { T as T9 } from "./tour.taro-CMagdKcp.js";
87
+ import { T as T9 } from "./tour.taro-wfXuUebD.js";
88
88
  import { V } from "./video.taro-CEMVfhCS.js";
89
- import { V as V2 } from "./virtuallist.taro-C5vZAyza.js";
89
+ import { V as V2 } from "./virtuallist.taro-Cl08vfdg.js";
90
90
  import { B as B5 } from "./barrage.taro-BNOcZsJ1.js";
91
91
  import { C as C14 } from "./card.taro-uLorQW97.js";
92
92
  import { T as T10 } from "./timedetail.taro-x6Zey1xi.js";
@@ -5,13 +5,13 @@ import Taro, { createSelectorQuery } from "@tarojs/taro";
5
5
  import { P as Popup } from "./popup.taro-Iy_WQZ-m.js";
6
6
  import { a as getRect, g as getRectByTaro } from "./get-rect-by-taro-CSN0TGnD.js";
7
7
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
8
- const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { list: [], location: "bottom", visible: false, offset: [0, 12], arrowOffset: 0, targetId: "", className: "", showArrow: true, overlay: false, closeOnOutsideClick: true, closeOnActionClick: true, onClick: () => {
8
+ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { list: [], theme: "light", location: "bottom", visible: false, offset: [0, 12], arrowOffset: 0, targetId: "", className: "", showArrow: true, closeOnOutsideClick: true, closeOnActionClick: true, overlay: false, onClick: () => {
9
9
  }, onOpen: () => {
10
10
  }, onClose: () => {
11
11
  } });
12
12
  const classPrefix = `nut-popover`;
13
13
  const Popover = (props) => {
14
- const _a = Object.assign(Object.assign({}, defaultProps), props), { children, list, location, visible, offset, targetId, overlay, closeOnOutsideClick, closeOnActionClick, className, showArrow, arrowOffset, style, onClick, onOpen, onClose, onSelect } = _a, rest = __rest(_a, ["children", "list", "location", "visible", "offset", "targetId", "overlay", "closeOnOutsideClick", "closeOnActionClick", "className", "showArrow", "arrowOffset", "style", "onClick", "onOpen", "onClose", "onSelect"]);
14
+ const _a = Object.assign(Object.assign({}, defaultProps), props), { children, list, theme, location, visible, offset, arrowOffset, targetId, overlay, closeOnOutsideClick, closeOnActionClick, className, showArrow, style, onClick, onOpen, onClose, onSelect } = _a, rest = __rest(_a, ["children", "list", "theme", "location", "visible", "offset", "arrowOffset", "targetId", "overlay", "closeOnOutsideClick", "closeOnActionClick", "className", "showArrow", "style", "onClick", "onOpen", "onClose", "onSelect"]);
15
15
  const popoverRef = useRef(null);
16
16
  const popoverContentRef = useRef(null);
17
17
  const [showPopup, setShowPopup] = useState(false);
@@ -72,7 +72,8 @@ const Popover = (props) => {
72
72
  }
73
73
  };
74
74
  const classes = classNames({
75
- [`${classPrefix}`]: true
75
+ [`${classPrefix}`]: true,
76
+ [`${classPrefix}-${theme}`]: theme === "dark"
76
77
  }, className);
77
78
  const popoverArrow = () => {
78
79
  const prefixCls = "nut-popover-arrow";
@@ -176,11 +177,12 @@ const Popover = (props) => {
176
177
  React__default.Fragment,
177
178
  null,
178
179
  !targetId && React__default.createElement("div", { className: "nut-popover-wrapper", ref: popoverRef, onClick: () => {
179
- props.onClick && props.onClick();
180
+ var _a2;
181
+ (_a2 = props === null || props === void 0 ? void 0 : props.onClick) === null || _a2 === void 0 ? void 0 : _a2.call(props);
180
182
  if (!visible) {
181
- onOpen && onOpen();
183
+ onOpen === null || onOpen === void 0 ? void 0 : onOpen();
182
184
  } else {
183
- onClose && onClose();
185
+ onClose === null || onClose === void 0 ? void 0 : onClose();
184
186
  }
185
187
  }, style }, Array.isArray(children) ? children[0] : children),
186
188
  React__default.createElement(
@@ -2,7 +2,7 @@ import React__default from "react";
2
2
  import classNames from "classnames";
3
3
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
4
4
  import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
5
- import { a as TabbarContext, T as TabbarItem } from "./tabbaritem.taro-Cb-yfOln.js";
5
+ import { a as TabbarContext, T as TabbarItem } from "./tabbaritem.taro-C4AZbQMG.js";
6
6
  const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { defaultValue: 0, fixed: false, inactiveColor: "", activeColor: "", safeArea: false, onSwitch: (value) => {
7
7
  } });
8
8
  const Tabbar = (props) => {
@@ -2,7 +2,7 @@ import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
2
2
  import React__default, { useContext } from "react";
3
3
  import classNames from "classnames";
4
4
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
5
- import { B as Badge } from "./badge.taro-CyDqBb9Z.js";
5
+ import { B as Badge } from "./badge.taro-D7Yn5zJi.js";
6
6
  const TabbarContext = React__default.createContext(null);
7
7
  const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { title: "", icon: null, value: "", dot: false, max: 99, top: "0", right: "5" });
8
8
  const TabbarItem = (props) => {
@@ -2,10 +2,10 @@ import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
2
2
  import React__default, { useState, useEffect, useCallback, useRef } from "react";
3
3
  import classNames from "classnames";
4
4
  import { ArrowDown } from "@nutui/icons-react-taro";
5
- import { u as useConfig } from "./configprovider.taro-CyU_tvNJ.js";
5
+ import { u as useConfig, a as useRtl } from "./configprovider.taro-CyU_tvNJ.js";
6
6
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
7
7
  import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
8
- function useTableSticky(columns) {
8
+ function useTableSticky(columns, rtl = false) {
9
9
  const [isSticky, setIsSticky] = useState(false);
10
10
  const [stickyColumnStyleMap, setStickyColumnStyleMap] = useState({});
11
11
  const [stickyColumnClassMap, setStickyColumnClassMap] = useState({});
@@ -20,9 +20,9 @@ function useTableSticky(columns) {
20
20
  let _stickyLeftWidth = 0;
21
21
  let _stickyRightWidth = 0;
22
22
  leftColumns.forEach((curr, index) => {
23
- leftColumns[index - 1] || {};
23
+ const dir = rtl ? "right" : "left";
24
24
  _columnStyleMap[curr.key] = {
25
- left: _stickyLeftWidth || 0,
25
+ [dir]: _stickyLeftWidth || 0,
26
26
  width: curr.width || "auto"
27
27
  };
28
28
  _columnClassMap[curr.key] = {
@@ -38,9 +38,9 @@ function useTableSticky(columns) {
38
38
  });
39
39
  for (let i = rightColumns.length - 1; i >= 0; i--) {
40
40
  const curr = rightColumns[i];
41
- rightColumns[i + 1] || {};
41
+ const dir = rtl ? "left" : "right";
42
42
  _columnStyleMap[curr.key] = {
43
- right: _stickyRightWidth || 0,
43
+ [dir]: _stickyRightWidth || 0,
44
44
  width: curr.width || "auto"
45
45
  };
46
46
  _columnClassMap[curr.key] = {
@@ -72,6 +72,7 @@ function useTableSticky(columns) {
72
72
  const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { columns: [], data: [], bordered: true, striped: false, noData: "", sorterIcon: null, showHeader: true });
73
73
  const Table = (props) => {
74
74
  const { locale } = useConfig();
75
+ const rtl = useRtl();
75
76
  defaultProps.noData = locale.noData;
76
77
  const _a = Object.assign(Object.assign({}, defaultProps), props), { children, className, style, columns, data, bordered, summary, striped, noData, sorterIcon, showHeader, onSort } = _a, rest = __rest(_a, ["children", "className", "style", "columns", "data", "bordered", "summary", "striped", "noData", "sorterIcon", "showHeader", "onSort"]);
77
78
  const sortedMapping = useRef({});
@@ -79,7 +80,7 @@ const Table = (props) => {
79
80
  defaultValue: data,
80
81
  finalValue: []
81
82
  });
82
- const { isSticky, stickyLeftWidth, stickyRightWidth, getStickyClass, getStickyStyle } = useTableSticky(columns);
83
+ const { isSticky, stickyLeftWidth, stickyRightWidth, getStickyClass, getStickyStyle } = useTableSticky(columns, rtl);
83
84
  useEffect(() => {
84
85
  setValue(data);
85
86
  }, [data]);
@@ -114,7 +114,7 @@ const Tabs = (props) => {
114
114
  }
115
115
  animate();
116
116
  };
117
- const scrollIntoView = () => {
117
+ const scrollIntoView = (index) => {
118
118
  requestAniFrame(() => {
119
119
  Promise.all([
120
120
  getRect(`#nut-tabs-titles-${name || uuid} .nut-tabs-list`),
@@ -122,17 +122,17 @@ const Tabs = (props) => {
122
122
  ]).then(([navRect, titleRects]) => {
123
123
  navRectRef.current = navRect;
124
124
  titleRectRef.current = titleRects;
125
- const titleRect = titleRectRef.current[value];
125
+ const titleRect = titleRectRef.current[index];
126
126
  if (!titleRect)
127
127
  return;
128
128
  let to = 0;
129
129
  if (props.direction === "vertical") {
130
130
  const DEFAULT_PADDING = 11;
131
- const top = titleRects.slice(0, value).reduce((prev, curr) => prev + curr.height, DEFAULT_PADDING);
131
+ const top = titleRects.slice(0, index).reduce((prev, curr) => prev + curr.height, DEFAULT_PADDING);
132
132
  to = top - (navRectRef.current.height - titleRect.height) / 2;
133
133
  } else {
134
134
  const DEFAULT_PADDING = 20;
135
- const left = titleRects.slice(0, value).reduce((prev, curr) => prev + curr.width, DEFAULT_PADDING);
135
+ const left = titleRects.slice(0, index).reduce((prev, curr) => prev + curr.width, DEFAULT_PADDING);
136
136
  to = left - (navRectRef.current.width - titleRect.width) / 2;
137
137
  }
138
138
  nextTick(() => {
@@ -148,7 +148,7 @@ const Tabs = (props) => {
148
148
  transform: direction === "horizontal" ? `translate3d(-${index * 100}%, 0, 0)` : `translate3d( 0,-${index * 100}%, 0)`,
149
149
  transitionDuration: `${duration}ms`
150
150
  });
151
- scrollIntoView();
151
+ scrollIntoView(index);
152
152
  }, [value]);
153
153
  const tabChange = (item, index) => {
154
154
  onClick && onClick(item.value);
@@ -5,11 +5,11 @@ import { O as Overlay } from "./overlay.taro-BaBu-3-F.js";
5
5
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
6
6
  import { b as useParams, u as useCustomEvent, a as useCustomEventsPath, c as customEvents } from "./use-custom-event-DuP4onEm.js";
7
7
  import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
8
- const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { id: "", icon: null, iconSize: "20", msg: "", duration: 2, position: "center", type: "text", title: "", closeOnOverlayClick: false, lockScroll: false, contentClassName: "", size: "base", visible: false, wordBreak: "break-all", onClose: () => {
8
+ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { id: "", icon: null, iconSize: "20", content: "", msg: "", duration: 2, position: "center", type: "text", title: "", closeOnOverlayClick: false, lockScroll: false, contentClassName: "", size: "base", visible: false, wordBreak: "break-all", onClose: () => {
9
9
  } });
10
10
  const classPrefix = "nut-toast";
11
11
  const Toast = (props) => {
12
- const { params: { id, position, contentStyle, icon, iconSize, msg, duration, type, title, closeOnOverlayClick, lockScroll, contentClassName, visible, size, className, style, onClose, wordBreak }, setParams } = useParams(Object.assign(Object.assign({}, defaultProps), props));
12
+ const { params: { id, position, contentStyle, icon, iconSize, content, msg, duration, type, title, closeOnOverlayClick, lockScroll, contentClassName, visible, size, className, style, onClose, wordBreak }, setParams } = useParams(Object.assign(Object.assign({}, defaultProps), props));
13
13
  const timer = useRef(-1);
14
14
  const [innerVisible, setInnerVisible] = usePropsValue({
15
15
  value: visible,
@@ -95,7 +95,7 @@ const Toast = (props) => {
95
95
  { className: `${classPrefix}-inner ${classPrefix}-${position} ${contentClassName} ${wordBreak}`, style: contentStyle },
96
96
  hasIcon() ? React__default.createElement("p", { className: `${classPrefix}-icon-wrapper` }, iconName()) : null,
97
97
  title ? React__default.createElement("div", { className: `${classPrefix}-title` }, title) : null,
98
- React__default.createElement("span", { className: `${classPrefix}-text` }, msg)
98
+ React__default.createElement("span", { className: `${classPrefix}-text` }, content || msg)
99
99
  )
100
100
  )
101
101
  ) : null);
@@ -2,7 +2,7 @@ import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
2
2
  import React__default, { useState, useEffect } from "react";
3
3
  import { Close } from "@nutui/icons-react-taro";
4
4
  import classNames from "classnames";
5
- import { P as Popover } from "./popover.taro-CcKwnX27.js";
5
+ import { P as Popover } from "./popover.taro-BsOaXoWp.js";
6
6
  import Taro, { createSelectorQuery } from "@tarojs/taro";
7
7
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
8
8
  import { useConfig } from "./ConfigProvider.js";
@@ -1,4 +1,3 @@
1
1
  import React from 'react';
2
- import './demo.scss';
3
2
  declare const CellDemo: () => React.JSX.Element;
4
3
  export default CellDemo;
@@ -1,4 +1,3 @@
1
1
  import React from 'react';
2
- import '@/packages/cell/demo.scss';
3
2
  declare const CellDemo: () => React.JSX.Element;
4
3
  export default CellDemo;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Demo1: () => React.JSX.Element;
3
+ export default Demo1;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Demo2: () => React.JSX.Element;
3
+ export default Demo2;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Demo3: () => React.JSX.Element;
3
+ export default Demo3;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const App: () => React.JSX.Element;
3
+ export default App;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Demo5: () => React.JSX.Element;
3
+ export default Demo5;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Demo6: () => React.JSX.Element;
3
+ export default Demo6;