@nutui/nutui-react 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 (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
@@ -2,7 +2,7 @@
2
2
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory((global2.nutui = global2.nutui || {}, global2.nutui.react = {}), global2.React, global2.ReactDOM));
3
3
  })(this, function(exports2, React, ReactDOM) {
4
4
  "use strict";/*!
5
- * @nutui/nutui-react v2.3.12 Fri Mar 01 2024 16:09:25 GMT+0800 (China Standard Time)
5
+ * @nutui/nutui-react v2.4.0 Fri Mar 08 2024 14:22:38 GMT+0800 (China Standard Time)
6
6
  * (c) 2023 @jdf2e.
7
7
  * Released under the MIT License.
8
8
  */
@@ -11135,6 +11135,7 @@ Please add \`${key}Action\` when creating your handler.`);
11135
11135
  };
11136
11136
  const Badge = (props) => {
11137
11137
  var _a;
11138
+ const rtl = useRtl();
11138
11139
  const { className, style, value, max, children, dot, top, right, color } = {
11139
11140
  ...defaultProps$1b,
11140
11141
  ...props
@@ -11172,7 +11173,8 @@ Please add \`${key}Action\` when creating your handler.`);
11172
11173
  const getStyle = () => {
11173
11174
  const style2 = {};
11174
11175
  style2.top = `${Number(top) || parseFloat(String(top)) || 0}px`;
11175
- style2.right = `${Number(right) || parseFloat(String(right)) || 0}px`;
11176
+ const dir = rtl ? "left" : "right";
11177
+ style2[dir] = `${Number(right) || parseFloat(String(right)) || 0}px`;
11176
11178
  style2.background = color;
11177
11179
  return style2;
11178
11180
  };
@@ -13681,6 +13683,7 @@ Please add \`${key}Action\` when creating your handler.`);
13681
13683
  const defaultProps$$ = {
13682
13684
  max: void 0,
13683
13685
  min: void 0,
13686
+ list: false,
13684
13687
  labelPosition: "right",
13685
13688
  direction: "vertical",
13686
13689
  onChange: (value) => {
@@ -13696,6 +13699,7 @@ Please add \`${key}Action\` when creating your handler.`);
13696
13699
  children,
13697
13700
  className,
13698
13701
  disabled,
13702
+ list,
13699
13703
  onChange,
13700
13704
  value,
13701
13705
  defaultValue,
@@ -13759,6 +13763,7 @@ Please add \`${key}Action\` when creating your handler.`);
13759
13763
  labelPosition: labelPosition || "right",
13760
13764
  disabled,
13761
13765
  max,
13766
+ list,
13762
13767
  onLimit,
13763
13768
  value: _value,
13764
13769
  check: (value2) => {
@@ -13785,7 +13790,8 @@ Please add \`${key}Action\` when creating your handler.`);
13785
13790
  className: classNames(
13786
13791
  classPrefix$i,
13787
13792
  {
13788
- [`nut-checkboxgroup-${props.direction}`]: props.direction
13793
+ [`nut-checkboxgroup-${props.direction}`]: props.direction,
13794
+ [`nut-checkboxgroup-list`]: list
13789
13795
  },
13790
13796
  className
13791
13797
  ),
@@ -13928,7 +13934,13 @@ Please add \`${key}Action\` when creating your handler.`);
13928
13934
  innerChecked && activeIcon ? /* @__PURE__ */ React.createElement("div", { className: classNames(`${classPrefix$h}-button-icon`) }, activeIcon) : null
13929
13935
  );
13930
13936
  };
13937
+ const renderListItem = () => {
13938
+ return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$h}-list-item` }, renderLabel(), renderIcon());
13939
+ };
13931
13940
  const renderCheckboxItem = () => {
13941
+ if (ctx2 == null ? void 0 : ctx2.list) {
13942
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, renderListItem());
13943
+ }
13932
13944
  if (shape === "button") {
13933
13945
  return renderButton();
13934
13946
  }
@@ -14685,7 +14697,7 @@ Please add \`${key}Action\` when creating your handler.`);
14685
14697
  } else {
14686
14698
  cmin++;
14687
14699
  }
14688
- if (cmin <= val) {
14700
+ if (cmin <= Number(val)) {
14689
14701
  index++;
14690
14702
  }
14691
14703
  }
@@ -16553,7 +16565,7 @@ Please add \`${key}Action\` when creating your handler.`);
16553
16565
  );
16554
16566
  const nextValue = bound2(shouldOverBoundary, Number(min), Number(max));
16555
16567
  setShadowValue(nextValue);
16556
- if (negative ? shouldOverBoundary < min : shouldOverBoundary > max) {
16568
+ if (negative ? shouldOverBoundary < Number(min) : shouldOverBoundary > Number(max)) {
16557
16569
  onOverlimit == null ? void 0 : onOverlimit(e2);
16558
16570
  } else {
16559
16571
  onChange == null ? void 0 : onChange(nextValue, e2);
@@ -19068,7 +19080,7 @@ Please add \`${key}Action\` when creating your handler.`);
19068
19080
  const handleItemClick = (file, index) => {
19069
19081
  onFileItemClick == null ? void 0 : onFileItemClick(file, index);
19070
19082
  };
19071
- return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps }, (children || previewType === "list") && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-slot" }, children || /* @__PURE__ */ React.createElement(Button, { size: "small", type: "primary" }, "上传文件"), maxCount > fileList.length && /* @__PURE__ */ React.createElement(
19083
+ return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps }, (children || previewType === "list") && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-slot" }, children || /* @__PURE__ */ React.createElement(Button, { size: "small", type: "primary" }, "上传文件"), Number(maxCount) > fileList.length && /* @__PURE__ */ React.createElement(
19072
19084
  "input",
19073
19085
  {
19074
19086
  className: "nut-uploader-input",
@@ -19093,7 +19105,7 @@ Please add \`${key}Action\` when creating your handler.`);
19093
19105
  children
19094
19106
  }
19095
19107
  }
19096
- ), maxCount > fileList.length && previewType === "picture" && !children && /* @__PURE__ */ React.createElement(
19108
+ ), Number(maxCount) > fileList.length && previewType === "picture" && !children && /* @__PURE__ */ React.createElement(
19097
19109
  "div",
19098
19110
  {
19099
19111
  className: classNames("nut-uploader-upload", previewType, {
@@ -19278,7 +19290,7 @@ Please add \`${key}Action\` when creating your handler.`);
19278
19290
  const ret = _onConfirm == null ? void 0 : _onConfirm();
19279
19291
  if (ret && ret.then) {
19280
19292
  renderFunction(dialogConfig);
19281
- ret.then(
19293
+ return ret.then(
19282
19294
  () => {
19283
19295
  onCancel(true);
19284
19296
  },
@@ -19479,6 +19491,7 @@ Please add \`${key}Action\` when creating your handler.`);
19479
19491
  ...restProps
19480
19492
  } = props;
19481
19493
  const classPrefix2 = "nut-dialog";
19494
+ const [loading, setLoading] = React.useState(false);
19482
19495
  const renderFooter = () => {
19483
19496
  if (footer === null)
19484
19497
  return "";
@@ -19491,10 +19504,16 @@ Please add \`${key}Action\` when creating your handler.`);
19491
19504
  onClose == null ? void 0 : onClose();
19492
19505
  onCancel == null ? void 0 : onCancel();
19493
19506
  };
19494
- const handleOk = (e2) => {
19507
+ const handleOk = async (e2) => {
19495
19508
  e2.stopPropagation();
19496
- onClose == null ? void 0 : onClose();
19497
- onConfirm == null ? void 0 : onConfirm(e2);
19509
+ setLoading(true);
19510
+ try {
19511
+ await (onConfirm == null ? void 0 : onConfirm(e2));
19512
+ setLoading(false);
19513
+ onClose == null ? void 0 : onClose();
19514
+ } catch {
19515
+ setLoading(false);
19516
+ }
19498
19517
  };
19499
19518
  return footer || /* @__PURE__ */ React.createElement(React.Fragment, null, !hideCancelButton && /* @__PURE__ */ React.createElement(
19500
19519
  Button,
@@ -19512,7 +19531,8 @@ Please add \`${key}Action\` when creating your handler.`);
19512
19531
  disabled: disableConfirmButton
19513
19532
  }),
19514
19533
  disabled: disableConfirmButton,
19515
- onClick: (e2) => handleOk(e2)
19534
+ onClick: (e2) => handleOk(e2),
19535
+ loading
19516
19536
  },
19517
19537
  confirmText || locale.confirm
19518
19538
  ));
@@ -19917,6 +19937,7 @@ Please add \`${key}Action\` when creating your handler.`);
19917
19937
  Loading.displayName = "NutLoading";
19918
19938
  const defaultProps$z = {
19919
19939
  ...ComponentDefaults,
19940
+ align: "left",
19920
19941
  direction: "horizontal",
19921
19942
  list: [],
19922
19943
  duration: 1e3,
@@ -19931,10 +19952,12 @@ Please add \`${key}Action\` when creating your handler.`);
19931
19952
  speed: 50
19932
19953
  };
19933
19954
  const NoticeBar = (props) => {
19955
+ const rtl = useRtl();
19934
19956
  const {
19935
19957
  children,
19936
19958
  className,
19937
19959
  style,
19960
+ align,
19938
19961
  direction,
19939
19962
  list,
19940
19963
  duration,
@@ -20039,7 +20062,7 @@ Please add \`${key}Action\` when creating your handler.`);
20039
20062
  }
20040
20063
  const wrapW = getRect(wrapRef.current).width;
20041
20064
  const offsetW = getRect(contentRef.current).width;
20042
- const canScroll = scrollable == null ? offsetW > wrapW : scrollable;
20065
+ const canScroll = align === "left" && scrollable == null ? offsetW > wrapW : scrollable;
20043
20066
  SetIsCanScroll(canScroll);
20044
20067
  if (canScroll) {
20045
20068
  SetWrapWidth(wrapW);
@@ -20089,7 +20112,7 @@ Please add \`${key}Action\` when creating your handler.`);
20089
20112
  onClose && onClose(event);
20090
20113
  };
20091
20114
  const isEllipsis = () => {
20092
- if (isCanScroll == null) {
20115
+ if (isCanScroll == null && align === "left") {
20093
20116
  return wrap;
20094
20117
  }
20095
20118
  return !isCanScroll && !wrap;
@@ -20097,7 +20120,7 @@ Please add \`${key}Action\` when creating your handler.`);
20097
20120
  const contentStyle = {
20098
20121
  animationDelay: `${firstRound ? delay : 0}s`,
20099
20122
  animationDuration: `${animationDuration}s`,
20100
- transform: `translateX(${firstRound ? 0 : `${wrapWidth}px`})`
20123
+ transform: `translateX(${firstRound ? 0 : `${rtl ? -wrapWidth : wrapWidth}px`})`
20101
20124
  };
20102
20125
  const barStyle = {
20103
20126
  height: isVertical ? `${height}px` : ""
@@ -20239,15 +20262,17 @@ Please add \`${key}Action\` when creating your handler.`);
20239
20262
  }
20240
20263
  };
20241
20264
  const noticebarClass = classNames({
20242
- "nut-noticebar-box": true,
20243
- [`nut-noticebar-box-wrapable`]: wrap
20265
+ [`${classPrefix2}-box`]: true,
20266
+ [`${classPrefix2}-box-wrapable`]: wrap,
20267
+ [`${classPrefix2}-box-${align}`]: true
20244
20268
  });
20269
+ const cls = classNames(classPrefix2, className);
20245
20270
  React.useEffect(() => {
20246
20271
  return () => {
20247
20272
  stopAutoPlay();
20248
20273
  };
20249
20274
  }, []);
20250
- return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2} ${className || ""}`, style }, showNoticeBar && direction === "horizontal" ? /* @__PURE__ */ React.createElement("div", { className: noticebarClass, style: barStyle, onClick: handleClick2 }, leftIcon ? /* @__PURE__ */ React.createElement("div", { className: "nut-noticebar-box-left-icon" }, leftIcon) : null, /* @__PURE__ */ React.createElement("div", { ref: wrapRef, className: "nut-noticebar-box-wrap" }, /* @__PURE__ */ React.createElement(
20275
+ return /* @__PURE__ */ React.createElement("div", { className: cls, style }, showNoticeBar && direction === "horizontal" ? /* @__PURE__ */ React.createElement("div", { className: noticebarClass, style: barStyle, onClick: handleClick2 }, leftIcon ? /* @__PURE__ */ React.createElement("div", { className: "nut-noticebar-box-left-icon" }, leftIcon) : null, /* @__PURE__ */ React.createElement("div", { ref: wrapRef, className: "nut-noticebar-box-wrap" }, /* @__PURE__ */ React.createElement(
20251
20276
  "div",
20252
20277
  {
20253
20278
  ref: contentRef,
@@ -20481,6 +20506,7 @@ Please add \`${key}Action\` when creating your handler.`);
20481
20506
  const defaultProps$y = {
20482
20507
  ...ComponentDefaults,
20483
20508
  list: [],
20509
+ theme: "light",
20484
20510
  location: "bottom",
20485
20511
  visible: false,
20486
20512
  offset: [0, 12],
@@ -20502,6 +20528,7 @@ Please add \`${key}Action\` when creating your handler.`);
20502
20528
  const {
20503
20529
  children,
20504
20530
  list,
20531
+ theme,
20505
20532
  location,
20506
20533
  visible,
20507
20534
  offset,
@@ -20585,7 +20612,8 @@ Please add \`${key}Action\` when creating your handler.`);
20585
20612
  };
20586
20613
  const classes = classNames(
20587
20614
  {
20588
- [`${classPrefix$b}`]: true
20615
+ [`${classPrefix$b}`]: true,
20616
+ [`${classPrefix$b}-${theme}`]: theme === "dark"
20589
20617
  },
20590
20618
  className
20591
20619
  );
@@ -22267,7 +22295,7 @@ Please add \`${key}Action\` when creating your handler.`);
22267
22295
  if (!timeStr)
22268
22296
  return Date.now();
22269
22297
  let t2 = timeStr;
22270
- t2 = t2 > 0 ? +t2 : t2.toString().replace(/-/g, "/");
22298
+ t2 = Number(t2) > 0 ? +t2 : t2.toString().replace(/-/g, "/");
22271
22299
  return new Date(t2).getTime();
22272
22300
  };
22273
22301
  const initTime = () => {
@@ -22823,7 +22851,7 @@ Please add \`${key}Action\` when creating your handler.`);
22823
22851
  swiperRef.current.autoplayTimer = null;
22824
22852
  };
22825
22853
  const startPlay = () => {
22826
- if (mergedProps.autoPlay <= 0 || swiperItemCount <= 1)
22854
+ if (Number(mergedProps.autoPlay) <= 0 || swiperItemCount <= 1)
22827
22855
  return;
22828
22856
  stopAutoPlay();
22829
22857
  swiperRef.current.autoplayTimer = setTimeout(() => {
@@ -23664,7 +23692,7 @@ Please add \`${key}Action\` when creating your handler.`);
23664
23692
  };
23665
23693
  Steps.defaultProps = defaultProps$b;
23666
23694
  Steps.displayName = "NutSteps";
23667
- function useTableSticky(columns) {
23695
+ function useTableSticky(columns, rtl = false) {
23668
23696
  const [isSticky, setIsSticky] = React.useState(false);
23669
23697
  const [stickyColumnStyleMap, setStickyColumnStyleMap] = React.useState({});
23670
23698
  const [stickyColumnClassMap, setStickyColumnClassMap] = React.useState({});
@@ -23679,9 +23707,9 @@ Please add \`${key}Action\` when creating your handler.`);
23679
23707
  let _stickyLeftWidth = 0;
23680
23708
  let _stickyRightWidth = 0;
23681
23709
  leftColumns.forEach((curr, index) => {
23682
- leftColumns[index - 1] || {};
23710
+ const dir = rtl ? "right" : "left";
23683
23711
  _columnStyleMap[curr.key] = {
23684
- left: _stickyLeftWidth || 0,
23712
+ [dir]: _stickyLeftWidth || 0,
23685
23713
  width: curr.width || "auto"
23686
23714
  };
23687
23715
  _columnClassMap[curr.key] = {
@@ -23697,9 +23725,9 @@ Please add \`${key}Action\` when creating your handler.`);
23697
23725
  });
23698
23726
  for (let i = rightColumns.length - 1; i >= 0; i--) {
23699
23727
  const curr = rightColumns[i];
23700
- rightColumns[i + 1] || {};
23728
+ const dir = rtl ? "left" : "right";
23701
23729
  _columnStyleMap[curr.key] = {
23702
- right: _stickyRightWidth || 0,
23730
+ [dir]: _stickyRightWidth || 0,
23703
23731
  width: curr.width || "auto"
23704
23732
  };
23705
23733
  _columnClassMap[curr.key] = {
@@ -23746,6 +23774,7 @@ Please add \`${key}Action\` when creating your handler.`);
23746
23774
  };
23747
23775
  const Table = (props) => {
23748
23776
  const { locale } = useConfig();
23777
+ const rtl = useRtl();
23749
23778
  defaultProps$a.noData = locale.noData;
23750
23779
  const {
23751
23780
  children,
@@ -23776,7 +23805,7 @@ Please add \`${key}Action\` when creating your handler.`);
23776
23805
  stickyRightWidth,
23777
23806
  getStickyClass,
23778
23807
  getStickyStyle
23779
- } = useTableSticky(columns);
23808
+ } = useTableSticky(columns, rtl);
23780
23809
  React.useEffect(() => {
23781
23810
  setValue(data);
23782
23811
  }, [data]);
@@ -3,6 +3,7 @@
3
3
  display: inline-flex;
4
4
  height: $countup-height;
5
5
  overflow: hidden;
6
+ direction: ltr;
6
7
  }
7
8
 
8
9
  &-listitem {
@@ -38,6 +38,8 @@
38
38
  border: $badge-border;
39
39
  border-radius: $badge-border-radius;
40
40
  min-width: $badge-min-width;
41
+ white-space: nowrap;
42
+ z-index: 1;
41
43
  }
42
44
 
43
45
  &-one {
@@ -118,6 +118,23 @@
118
118
  color: $white;
119
119
  border: 1px solid $color-text-disabled;
120
120
  }
121
+
122
+ &-list-item {
123
+ width: 100%;
124
+ display: flex;
125
+ justify-content: flex-start;
126
+ align-items: center;
127
+ padding: $checkbox-list-item-padding;
128
+ border-top: $checkbox-list-item-border;
129
+
130
+ .nut-checkbox-label {
131
+ flex: auto;
132
+ }
133
+
134
+ .nut-icon {
135
+ flex: none;
136
+ }
137
+ }
121
138
  }
122
139
 
123
140
  [dir='rtl'] .nut-checkbox,
@@ -140,11 +157,13 @@
140
157
  left: 0;
141
158
  border-right: 10px solid transparent;
142
159
  border-left: 10px solid $color-primary;
160
+
143
161
  &-checked {
144
162
  left: auto;
145
163
  right: 50%;
146
164
  transform: translate(3px, -3px);
147
165
  }
166
+
148
167
  .nut-icon {
149
168
  &:before {
150
169
  margin-left: 0;
@@ -8,6 +8,7 @@
8
8
  &-vertical {
9
9
  .nut-checkbox {
10
10
  margin-bottom: 5px;
11
+
11
12
  &.nut-checkbox-reverse {
12
13
  width: 100%;
13
14
  justify-content: space-between;
@@ -31,7 +32,31 @@
31
32
  }
32
33
  }
33
34
  }
35
+
36
+ &-list {
37
+ width: 100%;
38
+ border-bottom: $checkbox-list-item-border;
39
+ border-top: $checkbox-list-item-border;
40
+ padding: $checkbox-list-padding;
41
+ background: $checkbox-list-background-color;
42
+
43
+ .nut-checkbox {
44
+ margin-bottom: 5px;
45
+
46
+ &:first-child {
47
+ .nut-checkbox-list-item {
48
+ border-top: none;
49
+ }
50
+ }
51
+
52
+ &.nut-checkbox-reverse {
53
+ width: 100%;
54
+ justify-content: space-between;
55
+ }
56
+ }
57
+ }
34
58
  }
59
+
35
60
  [dir='rtl'] .nut-checkboxgroup,
36
61
  .nut-rtl .nut-checkboxgroup {
37
62
  .nut-checkbox {
@@ -62,7 +62,7 @@
62
62
 
63
63
  &-icon-box {
64
64
  display: flex;
65
- padding-right: 40px;
65
+ width: 24px;
66
66
  position: relative;
67
67
  color: $color-text;
68
68
  }
@@ -107,11 +107,6 @@
107
107
  }
108
108
  [dir='rtl'] .nut-collapse-item,
109
109
  .nut-rtl .nut-collapse-item {
110
- &-icon-box {
111
- padding-right: 0;
112
- padding-left: 40px;
113
- }
114
-
115
110
  &-icon {
116
111
  left: auto;
117
112
  right: 5px;
@@ -17,7 +17,6 @@
17
17
  &-outer {
18
18
  position: fixed;
19
19
  max-height: 100%;
20
- overflow-y: auto;
21
20
  background-color: $white;
22
21
  transition:
23
22
  transform 0.2s,
@@ -52,6 +51,13 @@
52
51
  left: $dialog-close-left;
53
52
  }
54
53
 
54
+ &-bottom {
55
+ top: initial;
56
+ bottom: -56px;
57
+ left: 50%;
58
+ transform: translate(-50%);
59
+ }
60
+
55
61
  &:active {
56
62
  opacity: 0.7;
57
63
  }
@@ -77,6 +83,7 @@
77
83
  word-break: break-all;
78
84
  white-space: pre-wrap;
79
85
  text-align: $dialog-content-text-align;
86
+ overflow-y: auto;
80
87
  }
81
88
 
82
89
  &-footer {
@@ -12,13 +12,18 @@
12
12
  color: $noticebar-color;
13
13
  border-radius: $noticebar-border-radius;
14
14
 
15
- &-wrapable {
15
+ &-wrapable,
16
+ &-center {
16
17
  height: auto;
17
18
  padding: $noticebar-wrap-padding;
18
19
 
19
20
  .nut-noticebar-box-wrap {
20
21
  height: auto;
22
+ }
23
+ }
21
24
 
25
+ &-wrapable {
26
+ .nut-noticebar-box-wrap {
22
27
  .nut-noticebar-box-wrap-content {
23
28
  position: relative;
24
29
  white-space: normal;
@@ -27,6 +32,19 @@
27
32
  }
28
33
  }
29
34
 
35
+ &-center {
36
+ justify-content: center;
37
+
38
+ .nut-noticebar-box-wrap {
39
+ flex: initial;
40
+
41
+ .nut-noticebar-box-wrap-content {
42
+ position: relative;
43
+ display: initial;
44
+ }
45
+ }
46
+ }
47
+
30
48
  &-left-icon {
31
49
  display: flex;
32
50
  height: $noticebar-left-icon-width;
@@ -218,6 +218,27 @@
218
218
  }
219
219
  }
220
220
 
221
+ .nut-popover-dark {
222
+ background: $popover-text-color;
223
+ color: $popover-content-background-color;
224
+
225
+ .nut-popover-arrow {
226
+ border-bottom-color: $popover-text-color;
227
+ }
228
+
229
+ .nut-popover-content {
230
+ background: $popover-text-color !important;
231
+ color: $popover-content-background-color !important;
232
+ .nut-popover-menu-item {
233
+ border-bottom-color: $popover-content-background-color;
234
+ &:hover {
235
+ color: $popover-content-background-color;
236
+ background-color: $popover-text-color;
237
+ }
238
+ }
239
+ }
240
+ }
241
+
221
242
  [dir='rtl'] .nut-popover,
222
243
  .nut-rtl .nut-popover {
223
244
  &-arrow {
@@ -5,6 +5,7 @@
5
5
  background-color: $white;
6
6
 
7
7
  &-wrapper {
8
+ height: inherit;
8
9
  transition-timing-function: cubic-bezier(0.18, 0.89, 0.32, 1);
9
10
  transition-property: transform;
10
11
 
@@ -14,6 +15,7 @@
14
15
 
15
16
  .nut-cell {
16
17
  margin: 0;
18
+ height: 100%;
17
19
  }
18
20
  }
19
21