@nutui/nutui-react 2.3.12 → 2.4.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/esm/AnimatingNumbers/style/style.css +1 -1
  3. package/dist/esm/Badge/style/style.css +1 -1
  4. package/dist/esm/Checkbox/style/style.css +1 -1
  5. package/dist/esm/CheckboxGroup/style/style.css +1 -1
  6. package/dist/esm/CheckboxGroup.js +5 -2
  7. package/dist/esm/Collapse/style/style.css +1 -1
  8. package/dist/esm/CollapseItem/style/style.css +1 -1
  9. package/dist/esm/CountDown.js +1 -1
  10. package/dist/esm/DatePicker.js +1 -1
  11. package/dist/esm/Dialog/style/style.css +1 -1
  12. package/dist/esm/Dialog.js +15 -8
  13. package/dist/esm/InputNumber/style/style.css +1 -1
  14. package/dist/esm/InputNumber.js +1 -1
  15. package/dist/esm/NoticeBar/style/style.css +1 -1
  16. package/dist/esm/NoticeBar.js +12 -8
  17. package/dist/esm/Popover/style/style.css +1 -1
  18. package/dist/esm/Popover.js +4 -3
  19. package/dist/esm/Swipe/style/style.css +1 -1
  20. package/dist/esm/Swiper.js +1 -1
  21. package/dist/esm/Tabbar/style/style.css +1 -1
  22. package/dist/esm/TabbarItem/style/style.css +1 -1
  23. package/dist/esm/Table.js +8 -7
  24. package/dist/esm/Tour/style/style.css +1 -1
  25. package/dist/esm/Uploader.js +2 -2
  26. package/dist/esm/badge2.js +4 -1
  27. package/dist/esm/checkbox2.js +11 -0
  28. package/dist/esm/types/src/packages/cell/demo.d.ts +0 -1
  29. package/dist/esm/types/src/packages/cell/demo.taro.d.ts +0 -1
  30. package/dist/esm/types/src/packages/cell/demos/h5/demo1.d.ts +3 -0
  31. package/dist/esm/types/src/packages/cell/demos/h5/demo2.d.ts +3 -0
  32. package/dist/esm/types/src/packages/cell/demos/h5/demo3.d.ts +3 -0
  33. package/dist/esm/types/src/packages/cell/demos/h5/demo4.d.ts +3 -0
  34. package/dist/esm/types/src/packages/cell/demos/h5/demo5.d.ts +3 -0
  35. package/dist/esm/types/src/packages/cell/demos/h5/demo6.d.ts +3 -0
  36. package/dist/esm/types/src/packages/cell/demos/h5/demo7.d.ts +3 -0
  37. package/dist/esm/types/src/packages/cell/demos/taro/demo1.d.ts +3 -0
  38. package/dist/esm/types/src/packages/cell/demos/taro/demo2.d.ts +3 -0
  39. package/dist/esm/types/src/packages/cell/demos/taro/demo3.d.ts +3 -0
  40. package/dist/esm/types/src/packages/cell/demos/taro/demo4.d.ts +3 -0
  41. package/dist/esm/types/src/packages/cell/demos/taro/demo5.d.ts +3 -0
  42. package/dist/esm/types/src/packages/cell/demos/taro/demo6.d.ts +3 -0
  43. package/dist/esm/types/src/packages/cell/demos/taro/demo7.d.ts +3 -0
  44. package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.d.ts +1 -0
  45. package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.taro.d.ts +1 -0
  46. package/dist/esm/types/src/packages/checkboxgroup/context.d.ts +1 -0
  47. package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
  48. package/dist/esm/types/src/packages/dialog/config.d.ts +3 -3
  49. package/dist/esm/types/src/packages/dialog/index.d.ts +1 -1
  50. package/dist/esm/types/src/packages/noticebar/index.d.ts +1 -0
  51. package/dist/esm/types/src/packages/noticebar/noticebar.d.ts +2 -0
  52. package/dist/esm/types/src/packages/noticebar/noticebar.taro.d.ts +2 -0
  53. package/dist/esm/types/src/packages/noticebar/types.d.ts +1 -0
  54. package/dist/esm/types/src/packages/popover/index.d.ts +2 -1
  55. package/dist/esm/types/src/packages/popover/index.taro.d.ts +2 -1
  56. package/dist/esm/types/src/packages/popover/popover.d.ts +2 -12
  57. package/dist/esm/types/src/packages/popover/popover.taro.d.ts +2 -12
  58. package/dist/esm/types/src/packages/popover/types.d.ts +14 -0
  59. package/dist/esm/types/src/packages/table/useTableSticky.d.ts +1 -1
  60. package/dist/esm/types/src/packages/toast/toast.taro.d.ts +7 -3
  61. package/dist/esm/types/src/packages/tour/tour.d.ts +1 -1
  62. package/dist/esm/types/src/packages/tour/tour.taro.d.ts +1 -1
  63. package/dist/locales/base.js +1 -1
  64. package/dist/locales/en-US.js +1 -1
  65. package/dist/locales/id-ID.js +1 -1
  66. package/dist/locales/tr-TR.js +1 -1
  67. package/dist/locales/zh-CN.js +1 -1
  68. package/dist/locales/zh-TW.js +1 -1
  69. package/dist/locales/zh-UG.js +1 -1
  70. package/dist/nutui.react.es.js +56 -27
  71. package/dist/nutui.react.umd.js +56 -27
  72. package/dist/packages/animatingnumbers/countup.scss +1 -0
  73. package/dist/packages/badge/badge.scss +2 -0
  74. package/dist/packages/checkbox/checkbox.scss +19 -0
  75. package/dist/packages/checkboxgroup/checkboxgroup.scss +25 -0
  76. package/dist/packages/collapseitem/collapseitem.scss +1 -6
  77. package/dist/packages/dialog/dialog.scss +8 -1
  78. package/dist/packages/noticebar/noticebar.scss +19 -1
  79. package/dist/packages/popover/popover.scss +21 -0
  80. package/dist/packages/swipe/swipe.scss +2 -0
  81. package/dist/style.css +1 -1
  82. package/dist/style.mjs +1 -1
  83. package/dist/styles/variables-jmapp.scss +13 -0
  84. package/dist/styles/variables.scss +19 -12
  85. package/dist/types/index.d.ts +98 -98
  86. package/dist/types/packages/actionsheet/actionsheet.d.ts +1 -1
  87. package/dist/types/packages/actionsheet/actionsheet.taro.d.ts +1 -1
  88. package/dist/types/packages/address/address.d.ts +1 -1
  89. package/dist/types/packages/address/address.taro.d.ts +1 -1
  90. package/dist/types/packages/address/customRender.d.ts +1 -1
  91. package/dist/types/packages/address/customRender.taro.d.ts +1 -1
  92. package/dist/types/packages/avatar/avatar.d.ts +1 -1
  93. package/dist/types/packages/avatar/avatar.taro.d.ts +1 -1
  94. package/dist/types/packages/badge/badge.d.ts +1 -1
  95. package/dist/types/packages/calendaritem/calendaritem.d.ts +1 -1
  96. package/dist/types/packages/calendaritem/calendaritem.taro.d.ts +1 -1
  97. package/dist/types/packages/cascader/cascader.d.ts +1 -1
  98. package/dist/types/packages/cascader/cascader.taro.d.ts +1 -1
  99. package/dist/types/packages/cell/cell.d.ts +1 -1
  100. package/dist/types/packages/cell/cell.taro.d.ts +1 -1
  101. package/dist/types/packages/cell/demos/h5/demo1.d.ts +3 -0
  102. package/dist/types/packages/cell/demos/h5/demo2.d.ts +3 -0
  103. package/dist/types/packages/cell/demos/h5/demo3.d.ts +3 -0
  104. package/dist/types/packages/cell/demos/h5/demo4.d.ts +3 -0
  105. package/dist/types/packages/cell/demos/h5/demo5.d.ts +3 -0
  106. package/dist/types/packages/cell/demos/h5/demo6.d.ts +3 -0
  107. package/dist/types/packages/cell/demos/h5/demo7.d.ts +3 -0
  108. package/dist/types/packages/cell/demos/taro/demo1.d.ts +3 -0
  109. package/dist/types/packages/cell/demos/taro/demo2.d.ts +3 -0
  110. package/dist/types/packages/cell/demos/taro/demo3.d.ts +3 -0
  111. package/dist/types/packages/cell/demos/taro/demo4.d.ts +3 -0
  112. package/dist/types/packages/cell/demos/taro/demo5.d.ts +3 -0
  113. package/dist/types/packages/cell/demos/taro/demo6.d.ts +3 -0
  114. package/dist/types/packages/cell/demos/taro/demo7.d.ts +3 -0
  115. package/dist/types/packages/checkbox/checkbox.d.ts +2 -2
  116. package/dist/types/packages/checkbox/checkbox.taro.d.ts +2 -2
  117. package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +3 -2
  118. package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +3 -2
  119. package/dist/types/packages/checkboxgroup/context.d.ts +1 -0
  120. package/dist/types/packages/configprovider/types.d.ts +1 -1
  121. package/dist/types/packages/datepicker/datepicker.d.ts +1 -1
  122. package/dist/types/packages/datepicker/datepicker.taro.d.ts +1 -1
  123. package/dist/types/packages/dialog/config.d.ts +3 -3
  124. package/dist/types/packages/dialog/dialogwrap.d.ts +1 -1
  125. package/dist/types/packages/dialog/index.d.ts +1 -1
  126. package/dist/types/packages/empty/empty.d.ts +1 -1
  127. package/dist/types/packages/fixednav/fixednav.d.ts +1 -1
  128. package/dist/types/packages/fixednav/fixednav.taro.d.ts +1 -1
  129. package/dist/types/packages/form/form.d.ts +1 -1
  130. package/dist/types/packages/form/form.taro.d.ts +1 -1
  131. package/dist/types/packages/form/index.d.ts +1 -1
  132. package/dist/types/packages/form/index.taro.d.ts +1 -1
  133. package/dist/types/packages/menu/menu.d.ts +1 -1
  134. package/dist/types/packages/menu/menu.taro.d.ts +1 -1
  135. package/dist/types/packages/noticebar/index.d.ts +1 -0
  136. package/dist/types/packages/noticebar/noticebar.d.ts +6 -0
  137. package/dist/types/packages/noticebar/noticebar.taro.d.ts +2 -0
  138. package/dist/types/packages/noticebar/types.d.ts +1 -0
  139. package/dist/types/packages/numberkeyboard/numberkeyboard.d.ts +1 -1
  140. package/dist/types/packages/numberkeyboard/numberkeyboard.taro.d.ts +1 -1
  141. package/dist/types/packages/nutui.react.d.ts +98 -98
  142. package/dist/types/packages/nutui.react.taro.d.ts +98 -98
  143. package/dist/types/packages/nutui.taro.react.build.d.ts +98 -98
  144. package/dist/types/packages/picker/picker.d.ts +1 -1
  145. package/dist/types/packages/picker/picker.taro.d.ts +1 -1
  146. package/dist/types/packages/popover/index.d.ts +2 -1
  147. package/dist/types/packages/popover/index.taro.d.ts +2 -1
  148. package/dist/types/packages/popover/popover.d.ts +3 -13
  149. package/dist/types/packages/popover/popover.taro.d.ts +3 -13
  150. package/dist/types/packages/popover/types.d.ts +14 -0
  151. package/dist/types/packages/popup/popup.d.ts +1 -1
  152. package/dist/types/packages/popup/popup.taro.d.ts +1 -1
  153. package/dist/types/packages/radio/radio.d.ts +2 -2
  154. package/dist/types/packages/radio/radio.taro.d.ts +2 -2
  155. package/dist/types/packages/shortpassword/shortpassword.d.ts +1 -1
  156. package/dist/types/packages/shortpassword/shortpassword.taro.d.ts +1 -1
  157. package/dist/types/packages/swiper/index.d.ts +1 -1
  158. package/dist/types/packages/swiper/index.taro.d.ts +1 -1
  159. package/dist/types/packages/table/useTableSticky.d.ts +1 -1
  160. package/dist/types/packages/tabs/tabs.d.ts +1 -1
  161. package/dist/types/packages/tabs/tabs.taro.d.ts +1 -1
  162. package/dist/types/packages/timedetail/timedetail.d.ts +1 -1
  163. package/dist/types/packages/timedetail/timedetail.taro.d.ts +1 -1
  164. package/dist/types/packages/toast/toast.d.ts +2 -2
  165. package/dist/types/packages/toast/toast.taro.d.ts +7 -3
  166. package/dist/types/packages/tour/tour.d.ts +1 -1
  167. package/dist/types/packages/tour/tour.taro.d.ts +1 -1
  168. package/package.json +1 -1
@@ -8,9 +8,9 @@ export interface ToastProps extends BasicComponent {
8
8
  maskClassName?: string;
9
9
  contentClassName?: string;
10
10
  contentStyle?: React.CSSProperties;
11
- icon: string | React.ReactNode;
11
+ icon: React.ReactNode;
12
12
  iconSize: string;
13
- msg: string | React.ReactNode;
13
+ content: React.ReactNode;
14
14
  duration: number;
15
15
  position?: ToastPositionType;
16
16
  type: string;
@@ -21,8 +21,12 @@ export interface ToastProps extends BasicComponent {
21
21
  visible: boolean;
22
22
  wordBreak?: ToastWordBreakType;
23
23
  onClose: () => void;
24
+ /**
25
+ * @deprecated Please use `content` prop instead.
26
+ */
27
+ msg: React.ReactNode;
24
28
  }
25
- export declare const Toast: FunctionComponent<Partial<ToastProps> & React.HTMLAttributes<HTMLDivElement>> & {
29
+ export declare const Toast: FunctionComponent<Partial<ToastProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'content'>> & {
26
30
  show: typeof show;
27
31
  hide: typeof hide;
28
32
  };
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode, FunctionComponent } from 'react';
2
2
  import type { MouseEvent } from 'react';
3
- import { PopoverLocation } from '@/packages/popover/popover';
3
+ import { PopoverLocation } from '@/packages/popover/types';
4
4
  import { BasicComponent } from '@/utils/typings';
5
5
  export interface ListOptions {
6
6
  target: Element | string;
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode, FunctionComponent } from 'react';
2
2
  import type { MouseEvent } from 'react';
3
- import { PopoverLocation } from '@/packages/popover/index.taro';
3
+ import { PopoverLocation } from '@/packages/popover/types';
4
4
  import { BasicComponent } from '@/utils/typings';
5
5
  export interface ListOptions {
6
6
  target: Element | string;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.3.12 Fri Mar 01 2024 16:09:55 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.4.0-beta.0 Fri Mar 08 2024 14:12:31 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.3.12 Fri Mar 01 2024 16:09:55 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.4.0-beta.0 Fri Mar 08 2024 14:12:31 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.3.12 Fri Mar 01 2024 16:09:55 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.4.0-beta.0 Fri Mar 08 2024 14:12:31 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.3.12 Fri Mar 01 2024 16:09:55 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.4.0-beta.0 Fri Mar 08 2024 14:12:31 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.3.12 Fri Mar 01 2024 16:09:55 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.4.0-beta.0 Fri Mar 08 2024 14:12:31 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.3.12 Fri Mar 01 2024 16:09:55 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.4.0-beta.0 Fri Mar 08 2024 14:12:31 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.3.12 Fri Mar 01 2024 16:09:55 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.4.0-beta.0 Fri Mar 08 2024 14:12:31 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.3.12 Fri Mar 01 2024 16:09:25 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.4.0-beta.0 Fri Mar 08 2024 14:11:47 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -11117,6 +11117,7 @@ const defaultProps$1b = {
11117
11117
  };
11118
11118
  const Badge = (props) => {
11119
11119
  var _a;
11120
+ const rtl = useRtl();
11120
11121
  const { className, style, value, max, children, dot, top, right, color } = {
11121
11122
  ...defaultProps$1b,
11122
11123
  ...props
@@ -11154,7 +11155,8 @@ const Badge = (props) => {
11154
11155
  const getStyle = () => {
11155
11156
  const style2 = {};
11156
11157
  style2.top = `${Number(top) || parseFloat(String(top)) || 0}px`;
11157
- style2.right = `${Number(right) || parseFloat(String(right)) || 0}px`;
11158
+ const dir = rtl ? "left" : "right";
11159
+ style2[dir] = `${Number(right) || parseFloat(String(right)) || 0}px`;
11158
11160
  style2.background = color;
11159
11161
  return style2;
11160
11162
  };
@@ -13663,6 +13665,7 @@ const Context$1 = CheckboxGroupContext;
13663
13665
  const defaultProps$$ = {
13664
13666
  max: void 0,
13665
13667
  min: void 0,
13668
+ list: false,
13666
13669
  labelPosition: "right",
13667
13670
  direction: "vertical",
13668
13671
  onChange: (value) => {
@@ -13678,6 +13681,7 @@ const CheckboxGroup = React__default.forwardRef(
13678
13681
  children,
13679
13682
  className,
13680
13683
  disabled,
13684
+ list,
13681
13685
  onChange,
13682
13686
  value,
13683
13687
  defaultValue,
@@ -13741,6 +13745,7 @@ const CheckboxGroup = React__default.forwardRef(
13741
13745
  labelPosition: labelPosition || "right",
13742
13746
  disabled,
13743
13747
  max,
13748
+ list,
13744
13749
  onLimit,
13745
13750
  value: _value,
13746
13751
  check: (value2) => {
@@ -13767,7 +13772,8 @@ const CheckboxGroup = React__default.forwardRef(
13767
13772
  className: classNames(
13768
13773
  classPrefix$i,
13769
13774
  {
13770
- [`nut-checkboxgroup-${props.direction}`]: props.direction
13775
+ [`nut-checkboxgroup-${props.direction}`]: props.direction,
13776
+ [`nut-checkboxgroup-list`]: list
13771
13777
  },
13772
13778
  className
13773
13779
  ),
@@ -13910,7 +13916,13 @@ const Checkbox = (props) => {
13910
13916
  innerChecked && activeIcon ? /* @__PURE__ */ React__default.createElement("div", { className: classNames(`${classPrefix$h}-button-icon`) }, activeIcon) : null
13911
13917
  );
13912
13918
  };
13919
+ const renderListItem = () => {
13920
+ return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$h}-list-item` }, renderLabel(), renderIcon());
13921
+ };
13913
13922
  const renderCheckboxItem = () => {
13923
+ if (ctx2 == null ? void 0 : ctx2.list) {
13924
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderListItem());
13925
+ }
13914
13926
  if (shape === "button") {
13915
13927
  return renderButton();
13916
13928
  }
@@ -14667,7 +14679,7 @@ const DatePicker = (props) => {
14667
14679
  } else {
14668
14680
  cmin++;
14669
14681
  }
14670
- if (cmin <= val) {
14682
+ if (cmin <= Number(val)) {
14671
14683
  index++;
14672
14684
  }
14673
14685
  }
@@ -16535,7 +16547,7 @@ const InputNumber = (props) => {
16535
16547
  );
16536
16548
  const nextValue = bound2(shouldOverBoundary, Number(min), Number(max));
16537
16549
  setShadowValue(nextValue);
16538
- if (negative ? shouldOverBoundary < min : shouldOverBoundary > max) {
16550
+ if (negative ? shouldOverBoundary < Number(min) : shouldOverBoundary > Number(max)) {
16539
16551
  onOverlimit == null ? void 0 : onOverlimit(e2);
16540
16552
  } else {
16541
16553
  onChange == null ? void 0 : onChange(nextValue, e2);
@@ -19050,7 +19062,7 @@ const InternalUploader = (props, ref) => {
19050
19062
  const handleItemClick = (file, index) => {
19051
19063
  onFileItemClick == null ? void 0 : onFileItemClick(file, index);
19052
19064
  };
19053
- return /* @__PURE__ */ React__default.createElement("div", { className: classes, ...restProps }, (children || previewType === "list") && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-slot" }, children || /* @__PURE__ */ React__default.createElement(Button, { size: "small", type: "primary" }, "上传文件"), maxCount > fileList.length && /* @__PURE__ */ React__default.createElement(
19065
+ return /* @__PURE__ */ React__default.createElement("div", { className: classes, ...restProps }, (children || previewType === "list") && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-slot" }, children || /* @__PURE__ */ React__default.createElement(Button, { size: "small", type: "primary" }, "上传文件"), Number(maxCount) > fileList.length && /* @__PURE__ */ React__default.createElement(
19054
19066
  "input",
19055
19067
  {
19056
19068
  className: "nut-uploader-input",
@@ -19075,7 +19087,7 @@ const InternalUploader = (props, ref) => {
19075
19087
  children
19076
19088
  }
19077
19089
  }
19078
- ), maxCount > fileList.length && previewType === "picture" && !children && /* @__PURE__ */ React__default.createElement(
19090
+ ), Number(maxCount) > fileList.length && previewType === "picture" && !children && /* @__PURE__ */ React__default.createElement(
19079
19091
  "div",
19080
19092
  {
19081
19093
  className: classNames("nut-uploader-upload", previewType, {
@@ -19260,7 +19272,7 @@ const confirm = (config2, renderFunc) => {
19260
19272
  const ret = _onConfirm == null ? void 0 : _onConfirm();
19261
19273
  if (ret && ret.then) {
19262
19274
  renderFunction(dialogConfig);
19263
- ret.then(
19275
+ return ret.then(
19264
19276
  () => {
19265
19277
  onCancel(true);
19266
19278
  },
@@ -19461,6 +19473,7 @@ const BaseDialog = (props, ref) => {
19461
19473
  ...restProps
19462
19474
  } = props;
19463
19475
  const classPrefix2 = "nut-dialog";
19476
+ const [loading, setLoading] = useState(false);
19464
19477
  const renderFooter = () => {
19465
19478
  if (footer === null)
19466
19479
  return "";
@@ -19473,10 +19486,16 @@ const BaseDialog = (props, ref) => {
19473
19486
  onClose == null ? void 0 : onClose();
19474
19487
  onCancel == null ? void 0 : onCancel();
19475
19488
  };
19476
- const handleOk = (e2) => {
19489
+ const handleOk = async (e2) => {
19477
19490
  e2.stopPropagation();
19478
- onClose == null ? void 0 : onClose();
19479
- onConfirm == null ? void 0 : onConfirm(e2);
19491
+ setLoading(true);
19492
+ try {
19493
+ await (onConfirm == null ? void 0 : onConfirm(e2));
19494
+ setLoading(false);
19495
+ onClose == null ? void 0 : onClose();
19496
+ } catch {
19497
+ setLoading(false);
19498
+ }
19480
19499
  };
19481
19500
  return footer || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, !hideCancelButton && /* @__PURE__ */ React__default.createElement(
19482
19501
  Button,
@@ -19494,7 +19513,8 @@ const BaseDialog = (props, ref) => {
19494
19513
  disabled: disableConfirmButton
19495
19514
  }),
19496
19515
  disabled: disableConfirmButton,
19497
- onClick: (e2) => handleOk(e2)
19516
+ onClick: (e2) => handleOk(e2),
19517
+ loading
19498
19518
  },
19499
19519
  confirmText || locale.confirm
19500
19520
  ));
@@ -19899,6 +19919,7 @@ Loading.defaultProps = defaultProps$A;
19899
19919
  Loading.displayName = "NutLoading";
19900
19920
  const defaultProps$z = {
19901
19921
  ...ComponentDefaults,
19922
+ align: "left",
19902
19923
  direction: "horizontal",
19903
19924
  list: [],
19904
19925
  duration: 1e3,
@@ -19913,10 +19934,12 @@ const defaultProps$z = {
19913
19934
  speed: 50
19914
19935
  };
19915
19936
  const NoticeBar = (props) => {
19937
+ const rtl = useRtl();
19916
19938
  const {
19917
19939
  children,
19918
19940
  className,
19919
19941
  style,
19942
+ align,
19920
19943
  direction,
19921
19944
  list,
19922
19945
  duration,
@@ -20021,7 +20044,7 @@ const NoticeBar = (props) => {
20021
20044
  }
20022
20045
  const wrapW = getRect(wrapRef.current).width;
20023
20046
  const offsetW = getRect(contentRef.current).width;
20024
- const canScroll = scrollable == null ? offsetW > wrapW : scrollable;
20047
+ const canScroll = align === "left" && scrollable == null ? offsetW > wrapW : scrollable;
20025
20048
  SetIsCanScroll(canScroll);
20026
20049
  if (canScroll) {
20027
20050
  SetWrapWidth(wrapW);
@@ -20071,7 +20094,7 @@ const NoticeBar = (props) => {
20071
20094
  onClose && onClose(event);
20072
20095
  };
20073
20096
  const isEllipsis = () => {
20074
- if (isCanScroll == null) {
20097
+ if (isCanScroll == null && align === "left") {
20075
20098
  return wrap;
20076
20099
  }
20077
20100
  return !isCanScroll && !wrap;
@@ -20079,7 +20102,7 @@ const NoticeBar = (props) => {
20079
20102
  const contentStyle = {
20080
20103
  animationDelay: `${firstRound ? delay : 0}s`,
20081
20104
  animationDuration: `${animationDuration}s`,
20082
- transform: `translateX(${firstRound ? 0 : `${wrapWidth}px`})`
20105
+ transform: `translateX(${firstRound ? 0 : `${rtl ? -wrapWidth : wrapWidth}px`})`
20083
20106
  };
20084
20107
  const barStyle = {
20085
20108
  height: isVertical ? `${height}px` : ""
@@ -20221,15 +20244,17 @@ const NoticeBar = (props) => {
20221
20244
  }
20222
20245
  };
20223
20246
  const noticebarClass = classNames({
20224
- "nut-noticebar-box": true,
20225
- [`nut-noticebar-box-wrapable`]: wrap
20247
+ [`${classPrefix2}-box`]: true,
20248
+ [`${classPrefix2}-box-wrapable`]: wrap,
20249
+ [`${classPrefix2}-box-${align}`]: true
20226
20250
  });
20251
+ const cls = classNames(classPrefix2, className);
20227
20252
  useEffect(() => {
20228
20253
  return () => {
20229
20254
  stopAutoPlay();
20230
20255
  };
20231
20256
  }, []);
20232
- return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2} ${className || ""}`, style }, showNoticeBar && direction === "horizontal" ? /* @__PURE__ */ React__default.createElement("div", { className: noticebarClass, style: barStyle, onClick: handleClick2 }, leftIcon ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-noticebar-box-left-icon" }, leftIcon) : null, /* @__PURE__ */ React__default.createElement("div", { ref: wrapRef, className: "nut-noticebar-box-wrap" }, /* @__PURE__ */ React__default.createElement(
20257
+ return /* @__PURE__ */ React__default.createElement("div", { className: cls, style }, showNoticeBar && direction === "horizontal" ? /* @__PURE__ */ React__default.createElement("div", { className: noticebarClass, style: barStyle, onClick: handleClick2 }, leftIcon ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-noticebar-box-left-icon" }, leftIcon) : null, /* @__PURE__ */ React__default.createElement("div", { ref: wrapRef, className: "nut-noticebar-box-wrap" }, /* @__PURE__ */ React__default.createElement(
20233
20258
  "div",
20234
20259
  {
20235
20260
  ref: contentRef,
@@ -20463,6 +20488,7 @@ const Notify = {
20463
20488
  const defaultProps$y = {
20464
20489
  ...ComponentDefaults,
20465
20490
  list: [],
20491
+ theme: "light",
20466
20492
  location: "bottom",
20467
20493
  visible: false,
20468
20494
  offset: [0, 12],
@@ -20484,6 +20510,7 @@ const Popover = (props) => {
20484
20510
  const {
20485
20511
  children,
20486
20512
  list,
20513
+ theme,
20487
20514
  location,
20488
20515
  visible,
20489
20516
  offset,
@@ -20567,7 +20594,8 @@ const Popover = (props) => {
20567
20594
  };
20568
20595
  const classes = classNames(
20569
20596
  {
20570
- [`${classPrefix$b}`]: true
20597
+ [`${classPrefix$b}`]: true,
20598
+ [`${classPrefix$b}-${theme}`]: theme === "dark"
20571
20599
  },
20572
20600
  className
20573
20601
  );
@@ -22249,7 +22277,7 @@ const InternalCountDown = (props, ref) => {
22249
22277
  if (!timeStr)
22250
22278
  return Date.now();
22251
22279
  let t2 = timeStr;
22252
- t2 = t2 > 0 ? +t2 : t2.toString().replace(/-/g, "/");
22280
+ t2 = Number(t2) > 0 ? +t2 : t2.toString().replace(/-/g, "/");
22253
22281
  return new Date(t2).getTime();
22254
22282
  };
22255
22283
  const initTime = () => {
@@ -22805,7 +22833,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
22805
22833
  swiperRef.current.autoplayTimer = null;
22806
22834
  };
22807
22835
  const startPlay = () => {
22808
- if (mergedProps.autoPlay <= 0 || swiperItemCount <= 1)
22836
+ if (Number(mergedProps.autoPlay) <= 0 || swiperItemCount <= 1)
22809
22837
  return;
22810
22838
  stopAutoPlay();
22811
22839
  swiperRef.current.autoplayTimer = setTimeout(() => {
@@ -23646,7 +23674,7 @@ const Steps = (props) => {
23646
23674
  };
23647
23675
  Steps.defaultProps = defaultProps$b;
23648
23676
  Steps.displayName = "NutSteps";
23649
- function useTableSticky(columns) {
23677
+ function useTableSticky(columns, rtl = false) {
23650
23678
  const [isSticky, setIsSticky] = useState(false);
23651
23679
  const [stickyColumnStyleMap, setStickyColumnStyleMap] = useState({});
23652
23680
  const [stickyColumnClassMap, setStickyColumnClassMap] = useState({});
@@ -23661,9 +23689,9 @@ function useTableSticky(columns) {
23661
23689
  let _stickyLeftWidth = 0;
23662
23690
  let _stickyRightWidth = 0;
23663
23691
  leftColumns.forEach((curr, index) => {
23664
- leftColumns[index - 1] || {};
23692
+ const dir = rtl ? "right" : "left";
23665
23693
  _columnStyleMap[curr.key] = {
23666
- left: _stickyLeftWidth || 0,
23694
+ [dir]: _stickyLeftWidth || 0,
23667
23695
  width: curr.width || "auto"
23668
23696
  };
23669
23697
  _columnClassMap[curr.key] = {
@@ -23679,9 +23707,9 @@ function useTableSticky(columns) {
23679
23707
  });
23680
23708
  for (let i = rightColumns.length - 1; i >= 0; i--) {
23681
23709
  const curr = rightColumns[i];
23682
- rightColumns[i + 1] || {};
23710
+ const dir = rtl ? "left" : "right";
23683
23711
  _columnStyleMap[curr.key] = {
23684
- right: _stickyRightWidth || 0,
23712
+ [dir]: _stickyRightWidth || 0,
23685
23713
  width: curr.width || "auto"
23686
23714
  };
23687
23715
  _columnClassMap[curr.key] = {
@@ -23728,6 +23756,7 @@ const defaultProps$a = {
23728
23756
  };
23729
23757
  const Table = (props) => {
23730
23758
  const { locale } = useConfig();
23759
+ const rtl = useRtl();
23731
23760
  defaultProps$a.noData = locale.noData;
23732
23761
  const {
23733
23762
  children,
@@ -23758,7 +23787,7 @@ const Table = (props) => {
23758
23787
  stickyRightWidth,
23759
23788
  getStickyClass,
23760
23789
  getStickyStyle
23761
- } = useTableSticky(columns);
23790
+ } = useTableSticky(columns, rtl);
23762
23791
  useEffect(() => {
23763
23792
  setValue(data);
23764
23793
  }, [data]);