@nutui/nutui-react-taro 2.6.15 → 2.6.17

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 (106) hide show
  1. package/CHANGELOG.md +45 -14
  2. package/README.md +2 -2
  3. package/dist/esm/ActionSheet.js +1 -1
  4. package/dist/esm/Address.js +1 -1
  5. package/dist/esm/Calendar.js +1 -1
  6. package/dist/esm/Cascader.js +1 -1
  7. package/dist/esm/Cell/style/style.css +1 -1
  8. package/dist/esm/Cell.js +1 -1
  9. package/dist/esm/DatePicker.js +1 -1
  10. package/dist/esm/Dialog.js +1 -1
  11. package/dist/esm/Drag.js +1 -1
  12. package/dist/esm/Ellipsis.js +1 -1
  13. package/dist/esm/FixedNav.js +1 -1
  14. package/dist/esm/Form/style/style.css +1 -1
  15. package/dist/esm/Form.js +2 -2
  16. package/dist/esm/FormItem.js +1 -1
  17. package/dist/esm/ImagePreview.js +1 -1
  18. package/dist/esm/InputNumber.js +1 -1
  19. package/dist/esm/Menu.js +1 -1
  20. package/dist/esm/MenuItem.js +1 -1
  21. package/dist/esm/NumberKeyboard.js +1 -1
  22. package/dist/esm/Overlay.js +1 -1
  23. package/dist/esm/Picker.js +1 -1
  24. package/dist/esm/Popover.js +1 -1
  25. package/dist/esm/Popup.js +1 -1
  26. package/dist/esm/PullToRefresh.js +1 -1
  27. package/dist/esm/ShortPassword.js +1 -1
  28. package/dist/esm/SideNavBar.js +1 -1
  29. package/dist/esm/Sticky.js +1 -1
  30. package/dist/esm/Tabs.js +1 -1
  31. package/dist/esm/TimeSelect.js +1 -1
  32. package/dist/esm/Toast.js +1 -1
  33. package/dist/esm/Tour.js +1 -1
  34. package/dist/esm/Uploader.js +1 -1
  35. package/dist/esm/{actionsheet.taro-CJjNsNrH.js → actionsheet.taro-CQ3sJY3B.js} +1 -1
  36. package/dist/esm/{address.taro-BYzOGUEN.js → address.taro-Old6uBAn.js} +2 -2
  37. package/dist/esm/{calendar.taro-BXrHr8bg.js → calendar.taro-C4UvVkgw.js} +1 -1
  38. package/dist/esm/{cascader.taro-jxe42b68.js → cascader.taro-BNw6H5ue.js} +2 -2
  39. package/dist/esm/{cell.taro-CVFlcls2.js → cell.taro-DWLhb5m6.js} +3 -3
  40. package/dist/esm/{datepicker.taro-BxaZ3Fjv.js → datepicker.taro-C1wMTysn.js} +1 -1
  41. package/dist/esm/{dialog.taro-BW9D2Gsr.js → dialog.taro-BY2KfQh1.js} +1 -1
  42. package/dist/esm/{drag.taro-B_TO4Nnu.js → drag.taro-B_sfzmtW.js} +2 -2
  43. package/dist/esm/{ellipsis.taro-cMTr1Wcw.js → ellipsis.taro-Ck2rumQ6.js} +3 -3
  44. package/dist/esm/{fixednav.taro-D3KnhYoI.js → fixednav.taro-C3iUeag8.js} +1 -1
  45. package/dist/esm/{formitem.taro-Dmt5-wxG.js → formitem.taro-CEWRz5EJ.js} +6 -6
  46. package/dist/esm/{get-scroll-parent-DB1VRg11.js → get-scroll-parent-9ZDWApX2.js} +0 -1
  47. package/dist/esm/{imagepreview.taro-CF-CCJ1Q.js → imagepreview.taro-CJDHziHn.js} +27 -18
  48. package/dist/esm/{inputnumber.taro-WN5Drnyz.js → inputnumber.taro-D9mteLSI.js} +26 -9
  49. package/dist/esm/{menu.taro-BeuoJcj7.js → menu.taro-Cw_lCHDb.js} +10 -3
  50. package/dist/esm/{menuitem.taro-DMV3j4DK.js → menuitem.taro-DqLGsBUc.js} +2 -2
  51. package/dist/esm/{numberkeyboard.taro-BA0iCeGP.js → numberkeyboard.taro-B-FEM91t.js} +39 -28
  52. package/dist/esm/nutui-react.es.js +29 -29
  53. package/dist/esm/{overlay.taro-C2t82CZz.js → overlay.taro-B5s6rmEf.js} +2 -16
  54. package/dist/esm/{picker.taro-CafNRRO5.js → picker.taro-Cu8B-fNC.js} +2 -3
  55. package/dist/esm/{popover.taro-B_FJgU0z.js → popover.taro-DrC9HQ1E.js} +1 -1
  56. package/dist/esm/{popup.taro-CR3JyuJV.js → popup.taro-_E52-0su.js} +1 -1
  57. package/dist/esm/{pulltorefresh.taro-BScP6uPx.js → pulltorefresh.taro-DSr2dBjM.js} +5 -1
  58. package/dist/esm/{shortpassword.taro-DpdtRsQ-.js → shortpassword.taro-CmPaHe0E.js} +1 -1
  59. package/dist/esm/{sidenavbar.taro-5BmrYFtP.js → sidenavbar.taro-BWB1yd3c.js} +1 -1
  60. package/dist/esm/{sticky.taro-Zbz7wQH8.js → sticky.taro-2Vup8HR8.js} +1 -1
  61. package/dist/esm/{tabs.taro-B2D3AtVV.js → tabs.taro-8X51sTol.js} +2 -0
  62. package/dist/esm/{timeselect.taro-DncKbp3l.js → timeselect.taro-CgcPLf0z.js} +1 -1
  63. package/dist/esm/{toast.taro-CYk6UERn.js → toast.taro-3B6uFLDu.js} +1 -1
  64. package/dist/esm/{tour.taro-SPMrhDA9.js → tour.taro-D88VKjAl.js} +1 -1
  65. package/dist/esm/{uploader.taro-DfO2HWvy.js → uploader.taro-0QYFT-E8.js} +5 -3
  66. package/dist/locales/base.js +1 -1
  67. package/dist/locales/en-US.js +1 -1
  68. package/dist/locales/id-ID.js +1 -1
  69. package/dist/locales/tr-TR.js +1 -1
  70. package/dist/locales/zh-CN.js +1 -1
  71. package/dist/locales/zh-TW.js +1 -1
  72. package/dist/locales/zh-UG.js +1 -1
  73. package/dist/nutui.react.es.js +231 -141
  74. package/dist/nutui.react.umd.js +231 -141
  75. package/dist/packages/cell/cell.scss +20 -0
  76. package/dist/style.css +1 -1
  77. package/dist/types/packages/avatargroup/context.d.ts +0 -1
  78. package/dist/types/packages/cascader/cascader.d.ts +1 -1
  79. package/dist/types/packages/cascader/cascader.taro.d.ts +1 -1
  80. package/dist/types/packages/cell/cell.d.ts +2 -1
  81. package/dist/types/packages/cell/cell.taro.d.ts +7 -2
  82. package/dist/types/packages/cellgroup/context.d.ts +0 -1
  83. package/dist/types/packages/checkboxgroup/context.d.ts +0 -1
  84. package/dist/types/packages/collapse/context.d.ts +0 -1
  85. package/dist/types/packages/form/context.d.ts +0 -1
  86. package/dist/types/packages/formitem/formitem.d.ts +1 -0
  87. package/dist/types/packages/formitem/formitem.taro.d.ts +5 -0
  88. package/dist/types/packages/imagepreview/imagepreview.d.ts +15 -0
  89. package/dist/types/packages/imagepreview/imagepreview.taro.d.ts +17 -13
  90. package/dist/types/packages/inputnumber/inputnumber.d.ts +1 -1
  91. package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +1 -1
  92. package/dist/types/packages/menuitem/menuitem.d.ts +1 -0
  93. package/dist/types/packages/menuitem/menuitem.taro.d.ts +5 -0
  94. package/dist/types/packages/popover/types.d.ts +0 -1
  95. package/dist/types/packages/radiogroup/context.d.ts +1 -1
  96. package/dist/types/packages/row/UserContext.d.ts +0 -1
  97. package/dist/types/packages/sidenavbar/context.d.ts +0 -1
  98. package/dist/types/packages/steps/context.d.ts +0 -1
  99. package/dist/types/packages/swiper/context.d.ts +0 -1
  100. package/dist/types/packages/swiper/swiper.taro.d.ts +2 -1
  101. package/dist/types/packages/uploader/uploader.d.ts +1 -1
  102. package/dist/types/packages/uploader/uploader.taro.d.ts +1 -1
  103. package/dist/types/packages/virtuallist/utils.d.ts +2 -2
  104. package/dist/types/utils/index.d.ts +0 -1
  105. package/dist/types/utils/use-lock-scoll-taro.d.ts +0 -1
  106. package/package.json +1 -1
@@ -2,7 +2,7 @@
2
2
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("@tarojs/taro"), require("@tarojs/components"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "@tarojs/taro", "@tarojs/components", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory((global2.nutui = global2.nutui || {}, global2.nutui.react = {}), global2.React, global2.Taro, global2.components, global2.ReactDOM));
3
3
  })(this, function(exports2, React, Taro, components, ReactDOM) {
4
4
  "use strict";/*!
5
- * @nutui/nutui-react-taro v2.6.15 Fri Jul 26 2024 15:18:34 GMT+0800 (China Standard Time)
5
+ * @nutui/nutui-react-taro v2.6.17 Fri Aug 30 2024 14:09:01 GMT+0800 (China Standard Time)
6
6
  * (c) 2023 @jdf2e.
7
7
  * Released under the MIT License.
8
8
  */
@@ -143,6 +143,7 @@
143
143
  const g$6 = (M) => /* @__PURE__ */ React.createElement(S, { ...M, name: M.name || "ArrowDown", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0xNTguMTcgMjg5LjgzYTQyLjY3IDQyLjY3IDAgMSAwLTYwLjM0IDYwLjM0bDM4NCAzODRhNDIuNjcgNDIuNjcgMCAwIDAgNjAuMzYgMGwzODQtMzg0YTQyLjY3IDQyLjY3IDAgMSAwLTYwLjM2LTYwLjM0TDUxMiA2NDMuNjd6Ii8+PC9zdmc+" });
144
144
  g$6.defaultProps = k;
145
145
  const g$5 = (M) => /* @__PURE__ */ React.createElement(S, { ...M, name: M.name || "ArrowLeft", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik03MTIuODMgMTU4LjE3YTQyLjY3IDQyLjY3IDAgMSAwLTYwLjMzLTYwLjM0bC0zODQgMzg0YTQyLjY3IDQyLjY3IDAgMCAwIDAgNjAuMzZsMzg0IDM4NGE0Mi42NyA0Mi42NyAwIDEgMCA2MC4zMy02MC4zNkwzNTkgNTEyeiIvPjwvc3ZnPg==" });
146
+ g$5.defaultProps = k;
146
147
  const a$2 = (M) => /* @__PURE__ */ React.createElement(S, { ...M, name: M.name || "ArrowUp", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0xNTguMTcgNzM0LjE3YTQyLjY3IDQyLjY3IDAgMSAxLTYwLjM0LTYwLjM0bDM4NC0zODRhNDIuNjcgNDIuNjcgMCAwIDEgNjAuMzYgMGwzODQgMzg0YTQyLjY3IDQyLjY3IDAgMSAxLTYwLjM2IDYwLjM0TDUxMiAzODAuMzN6Ii8+PC9zdmc+" });
147
148
  a$2.defaultProps = k;
148
149
  const g$4 = (M) => /* @__PURE__ */ React.createElement(S, { ...M, name: M.name || "CheckChecked", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMzMzMiIGQ9Ik01MDYuNjUgMi44MkMyMjguMDEgMi44Mi4wMyAyMzAuOC4wMyA1MDkuNDRzMjI3Ljk4IDUwNi42MiA1MDYuNjIgNTA2LjYyIDUwNi42Mi0yMjcuOTggNTA2LjYzLTUwNi42MlM3ODguMTEgMi44MiA1MDYuNjUgMi44Mm0wIDc4OC4wOGMtMTU0LjggMC0yODEuNDYtMTI2LjY2LTI4MS40NS0yODEuNDZzMTI2LjY2LTI4MS40NiAyODEuNDUtMjgxLjQ2IDI4MS40NiAxMjYuNjYgMjgxLjQ2IDI4MS40NlM2NjEuNDUgNzkwLjkgNTA2LjY1IDc5MC45Ii8+PHBhdGggZmlsbD0iIzMzMyIgZD0iTTM4MCA1MDkuNDRhMTI2LjY2IDEyNi42NiAwIDEgMCAyNTMuMzEgMCAxMjYuNjYgMTI2LjY2IDAgMSAwLTI1My4zMSAwIi8+PC9zdmc+" });
@@ -212,7 +213,7 @@
212
213
  style: {}
213
214
  };
214
215
  const prefixCls$2 = "nut-button";
215
- const defaultProps$1u = {
216
+ const defaultProps$1v = {
216
217
  ...ComponentDefaults,
217
218
  color: "",
218
219
  type: "default",
@@ -247,7 +248,7 @@
247
248
  onClick,
248
249
  ...rest
249
250
  } = {
250
- ...defaultProps$1u,
251
+ ...defaultProps$1v,
251
252
  ...props
252
253
  };
253
254
  const getStyle = React.useCallback(() => {
@@ -314,7 +315,7 @@
314
315
  );
315
316
  Button.displayName = "NutButton";
316
317
  const CellGroupContext = React.createContext(null);
317
- const defaultProps$1t = {
318
+ const defaultProps$1u = {
318
319
  ...ComponentDefaults,
319
320
  title: "",
320
321
  description: "",
@@ -323,7 +324,7 @@
323
324
  const classPrefix$r = "nut-cell-group";
324
325
  const CellGroup = (props) => {
325
326
  const { children, className, title, description, divider, ...rest } = {
326
- ...defaultProps$1t,
327
+ ...defaultProps$1u,
327
328
  ...props
328
329
  };
329
330
  return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$r, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$r}-title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$r}-description` }, description) : null, /* @__PURE__ */ React.createElement(
@@ -335,13 +336,14 @@
335
336
  ));
336
337
  };
337
338
  CellGroup.displayName = "NutCellGroup";
338
- const defaultProps$1s = {
339
+ const defaultProps$1t = {
339
340
  ...ComponentDefaults,
340
341
  title: null,
341
342
  description: null,
342
343
  extra: null,
343
344
  radius: "6px",
344
345
  align: "flex-start",
346
+ clickable: false,
345
347
  onClick: (event) => {
346
348
  }
347
349
  };
@@ -358,9 +360,10 @@
358
360
  align,
359
361
  className,
360
362
  style,
363
+ clickable,
361
364
  ...rest
362
365
  } = {
363
- ...defaultProps$1s,
366
+ ...defaultProps$1t,
364
367
  ...props
365
368
  };
366
369
  const handleClick = (event) => {
@@ -377,7 +380,7 @@
377
380
  return /* @__PURE__ */ React.createElement(
378
381
  "div",
379
382
  {
380
- className: classNames(classPrefix$q, className),
383
+ className: `${classNames(classPrefix$q, className, clickable ? `${classPrefix$q}-clickable` : "")}`,
381
384
  onClick: (event) => handleClick(event),
382
385
  style: baseStyle,
383
386
  ...rest
@@ -1535,7 +1538,7 @@
1535
1538
  const pxCheck = (value) => {
1536
1539
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
1537
1540
  };
1538
- const defaultProps$1r = {
1541
+ const defaultProps$1s = {
1539
1542
  src: "",
1540
1543
  error: true,
1541
1544
  loading: true
@@ -1554,7 +1557,7 @@
1554
1557
  onLoad,
1555
1558
  onError,
1556
1559
  ...rest
1557
- } = { ...defaultProps$1r, ...props };
1560
+ } = { ...defaultProps$1s, ...props };
1558
1561
  const [innerLoading, setInnerLoading] = React.useState(true);
1559
1562
  const [isError, setIsError] = React.useState(false);
1560
1563
  const handleLoad = (e2) => {
@@ -1626,7 +1629,7 @@
1626
1629
  if (null == r) return {};
1627
1630
  var t = {};
1628
1631
  for (var n2 in r) if ({}.hasOwnProperty.call(r, n2)) {
1629
- if (e2.indexOf(n2) >= 0) continue;
1632
+ if (e2.includes(n2)) continue;
1630
1633
  t[n2] = r[n2];
1631
1634
  }
1632
1635
  return t;
@@ -3573,7 +3576,7 @@
3573
3576
  };
3574
3577
  Overlay.displayName = "NutOverlay";
3575
3578
  const DataContext$1 = React.createContext({});
3576
- const defaultProps$1q = {
3579
+ const defaultProps$1r = {
3577
3580
  ...ComponentDefaults,
3578
3581
  span: "24",
3579
3582
  offset: "0",
@@ -3581,7 +3584,7 @@
3581
3584
  };
3582
3585
  const Col = (props) => {
3583
3586
  const { className, style, span, offset, children, onClick } = {
3584
- ...defaultProps$1q,
3587
+ ...defaultProps$1r,
3585
3588
  ...props
3586
3589
  };
3587
3590
  const [colName, setColName] = React.useState("");
@@ -3614,7 +3617,7 @@
3614
3617
  );
3615
3618
  };
3616
3619
  Col.displayName = "NutCol";
3617
- const defaultProps$1p = {
3620
+ const defaultProps$1q = {
3618
3621
  ...ComponentDefaults,
3619
3622
  contentPosition: "center",
3620
3623
  direction: "horizontal"
@@ -3622,7 +3625,7 @@
3622
3625
  const classPrefix$o = `nut-divider`;
3623
3626
  const Divider = (props) => {
3624
3627
  const { children, contentPosition, style, className, direction, ...rest } = {
3625
- ...defaultProps$1p,
3628
+ ...defaultProps$1q,
3626
3629
  ...props
3627
3630
  };
3628
3631
  const classes = direction === "horizontal" ? classNames({
@@ -3643,7 +3646,7 @@
3643
3646
  }
3644
3647
  };
3645
3648
  const GridContext = React.createContext(gridContext);
3646
- const defaultProps$1o = {
3649
+ const defaultProps$1p = {
3647
3650
  text: "",
3648
3651
  columns: 4,
3649
3652
  gap: 0,
@@ -3669,7 +3672,7 @@
3669
3672
  onClick,
3670
3673
  ...rest
3671
3674
  } = {
3672
- ...defaultProps$1o,
3675
+ ...defaultProps$1p,
3673
3676
  ...props
3674
3677
  };
3675
3678
  const classPrefix2 = "nut-grid-item";
@@ -3728,7 +3731,7 @@
3728
3731
  );
3729
3732
  };
3730
3733
  GridItem.displayName = "NutGridItem";
3731
- const defaultProps$1n = {
3734
+ const defaultProps$1o = {
3732
3735
  columns: 4,
3733
3736
  gap: 0,
3734
3737
  center: true,
@@ -3749,7 +3752,7 @@
3749
3752
  className,
3750
3753
  onClick,
3751
3754
  ...rest
3752
- } = { ...defaultProps$1n, ...props };
3755
+ } = { ...defaultProps$1o, ...props };
3753
3756
  const childrenDom = React.Children.toArray(children);
3754
3757
  const classPrefix2 = "nut-grid";
3755
3758
  const rootClass = () => {
@@ -3785,14 +3788,14 @@
3785
3788
  };
3786
3789
  Grid.displayName = "NutGrid";
3787
3790
  Grid.Item = GridItem;
3788
- const defaultProps$1m = {};
3791
+ const defaultProps$1n = {};
3789
3792
  const Layout = (props) => {
3790
- ({ ...defaultProps$1m, ...props });
3793
+ ({ ...defaultProps$1n, ...props });
3791
3794
  return /* @__PURE__ */ React.createElement("div", { className: "nut-layout" }, "Layout");
3792
3795
  };
3793
3796
  Layout.displayName = "NutLayout";
3794
3797
  const classPrefix$n = "nut-row";
3795
- const defaultProps$1l = {
3798
+ const defaultProps$1m = {
3796
3799
  ...ComponentDefaults,
3797
3800
  type: "",
3798
3801
  justify: "start",
@@ -3812,7 +3815,7 @@
3812
3815
  gutter,
3813
3816
  onClick
3814
3817
  } = {
3815
- ...defaultProps$1l,
3818
+ ...defaultProps$1m,
3816
3819
  ...props
3817
3820
  };
3818
3821
  const getClass = (prefix, type22) => {
@@ -3846,12 +3849,12 @@
3846
3849
  };
3847
3850
  Row.displayName = "NutRow";
3848
3851
  const prefixCls$1 = "nut-space";
3849
- const defaultProps$1k = {
3852
+ const defaultProps$1l = {
3850
3853
  direction: "horizontal"
3851
3854
  };
3852
3855
  const Space = (props) => {
3853
3856
  const { className, style, children, wrap, align, direction, justify } = {
3854
- ...defaultProps$1k,
3857
+ ...defaultProps$1l,
3855
3858
  ...props
3856
3859
  };
3857
3860
  const cls = classNames(
@@ -3943,7 +3946,7 @@
3943
3946
  }
3944
3947
  return Promise.resolve(makeRect(0, 0));
3945
3948
  };
3946
- const defaultProps$1j = {
3949
+ const defaultProps$1k = {
3947
3950
  ...ComponentDefaults,
3948
3951
  position: "top",
3949
3952
  zIndex: 900
@@ -3960,7 +3963,7 @@
3960
3963
  className,
3961
3964
  onChange,
3962
3965
  ...rest
3963
- } = { ...defaultProps$1j, ...props };
3966
+ } = { ...defaultProps$1k, ...props };
3964
3967
  const stickyRef = React.useRef(null);
3965
3968
  const rootRef = React.useRef(null);
3966
3969
  const [rootRect, setRootRect] = React.useState({});
@@ -4076,7 +4079,7 @@
4076
4079
  );
4077
4080
  };
4078
4081
  SafeArea.displayName = "NutSafeArea";
4079
- const defaultProps$1i = {
4082
+ const defaultProps$1j = {
4080
4083
  ...ComponentDefaults,
4081
4084
  threshold: 200,
4082
4085
  zIndex: 900,
@@ -4085,7 +4088,7 @@
4085
4088
  const BackTop = (props) => {
4086
4089
  const rtl = useRtl();
4087
4090
  const { children, threshold, zIndex, className, duration, style, onClick } = {
4088
- ...defaultProps$1i,
4091
+ ...defaultProps$1j,
4089
4092
  ...props
4090
4093
  };
4091
4094
  const classPrefix2 = "nut-backtop";
@@ -4129,7 +4132,7 @@
4129
4132
  };
4130
4133
  BackTop.displayName = "NutBackTop";
4131
4134
  const elevatorContext = React.createContext({});
4132
- const defaultProps$1h = {
4135
+ const defaultProps$1i = {
4133
4136
  ...ComponentDefaults,
4134
4137
  height: "200px",
4135
4138
  floorKey: "title",
@@ -4156,7 +4159,7 @@
4156
4159
  children,
4157
4160
  ...rest
4158
4161
  } = {
4159
- ...defaultProps$1h,
4162
+ ...defaultProps$1i,
4160
4163
  ...props
4161
4164
  };
4162
4165
  const classPrefix2 = "nut-elevator";
@@ -4371,7 +4374,7 @@
4371
4374
  };
4372
4375
  Elevator.displayName = "NutElevator";
4373
4376
  Elevator.Context = elevatorContext;
4374
- const defaultProps$1g = {
4377
+ const defaultProps$1h = {
4375
4378
  ...ComponentDefaults,
4376
4379
  activeText: "",
4377
4380
  inactiveText: "",
@@ -4399,7 +4402,7 @@
4399
4402
  content,
4400
4403
  ...rest
4401
4404
  } = {
4402
- ...defaultProps$1g,
4405
+ ...defaultProps$1h,
4403
4406
  ...props
4404
4407
  };
4405
4408
  const classPrefix2 = "nut-fixednav";
@@ -4452,7 +4455,7 @@
4452
4455
  );
4453
4456
  };
4454
4457
  FixedNav.displayName = "NutFixedNav";
4455
- const defaultProps$1f = {
4458
+ const defaultProps$1g = {
4456
4459
  ...ComponentDefaults,
4457
4460
  left: "",
4458
4461
  right: "",
@@ -4477,7 +4480,7 @@
4477
4480
  zIndex,
4478
4481
  onBackClick
4479
4482
  } = {
4480
- ...defaultProps$1f,
4483
+ ...defaultProps$1g,
4481
4484
  ...props
4482
4485
  };
4483
4486
  const classPrefix2 = "nut-navbar";
@@ -4556,7 +4559,7 @@
4556
4559
  return /* @__PURE__ */ React.createElement(React.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix2}-placeholder` }, renderWrapper()) : renderWrapper());
4557
4560
  };
4558
4561
  NavBar.displayName = "NutNavBar";
4559
- const defaultProps$1e = {
4562
+ const defaultProps$1f = {
4560
4563
  ...ComponentDefaults,
4561
4564
  position: "center",
4562
4565
  transition: "",
@@ -4609,7 +4612,7 @@
4609
4612
  afterShow,
4610
4613
  afterClose,
4611
4614
  onClick
4612
- } = { ...defaultProps$1e, ...props };
4615
+ } = { ...defaultProps$1f, ...props };
4613
4616
  let innerIndex = zIndex || _zIndex;
4614
4617
  const [index, setIndex] = React.useState(innerIndex);
4615
4618
  const [innerVisible, setInnerVisible] = React.useState(visible);
@@ -4751,7 +4754,7 @@
4751
4754
  };
4752
4755
  Popup.displayName = "NutPopup";
4753
4756
  const OffsetContext = React.createContext(20);
4754
- const defaultProps$1d = {
4757
+ const defaultProps$1e = {
4755
4758
  ...ComponentDefaults,
4756
4759
  position: "left",
4757
4760
  width: "80%"
@@ -4769,7 +4772,7 @@
4769
4772
  indent,
4770
4773
  ...rest
4771
4774
  } = {
4772
- ...defaultProps$1d,
4775
+ ...defaultProps$1e,
4773
4776
  ...props
4774
4777
  };
4775
4778
  const innerIndent = indent ? Number(indent) : 20;
@@ -4827,13 +4830,13 @@
4827
4830
  title
4828
4831
  );
4829
4832
  };
4830
- const defaultProps$1c = {
4833
+ const defaultProps$1d = {
4831
4834
  open: true
4832
4835
  };
4833
4836
  const SubSideNavBar = (props) => {
4834
4837
  const classPrefix2 = "nut-subsidenavbar";
4835
4838
  const { title, value, children, onClick, open: open2, ...rest } = {
4836
- ...defaultProps$1c,
4839
+ ...defaultProps$1d,
4837
4840
  ...props
4838
4841
  };
4839
4842
  const [subShow, setSubShow] = React.useState(open2);
@@ -4911,7 +4914,7 @@
4911
4914
  );
4912
4915
  return [stateRef.current, setState];
4913
4916
  }
4914
- const defaultProps$1b = {
4917
+ const defaultProps$1c = {
4915
4918
  ...ComponentDefaults,
4916
4919
  value: "",
4917
4920
  dot: false,
@@ -4936,7 +4939,7 @@
4936
4939
  color,
4937
4940
  fill
4938
4941
  } = {
4939
- ...defaultProps$1b,
4942
+ ...defaultProps$1c,
4940
4943
  ...props
4941
4944
  };
4942
4945
  const classPrefix2 = "nut-badge";
@@ -4990,7 +4993,7 @@
4990
4993
  };
4991
4994
  Badge.displayName = "NutBadge";
4992
4995
  const TabbarContext = React.createContext(null);
4993
- const defaultProps$1a = {
4996
+ const defaultProps$1b = {
4994
4997
  ...ComponentDefaults,
4995
4998
  title: "",
4996
4999
  icon: null,
@@ -5016,7 +5019,7 @@
5016
5019
  index,
5017
5020
  ...rest
5018
5021
  } = {
5019
- ...defaultProps$1a,
5022
+ ...defaultProps$1b,
5020
5023
  ...props
5021
5024
  };
5022
5025
  const active = index === (ctx == null ? void 0 : ctx.selectIndex);
@@ -5054,7 +5057,7 @@
5054
5057
  icon ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React.createElement("div", { className: titleClass }, title))
5055
5058
  );
5056
5059
  };
5057
- const defaultProps$19 = {
5060
+ const defaultProps$1a = {
5058
5061
  ...ComponentDefaults,
5059
5062
  defaultValue: 0,
5060
5063
  fixed: false,
@@ -5077,7 +5080,7 @@
5077
5080
  style,
5078
5081
  onSwitch
5079
5082
  } = {
5080
- ...defaultProps$19,
5083
+ ...defaultProps$1a,
5081
5084
  ...props
5082
5085
  };
5083
5086
  const classPrefix2 = "nut-tabbar";
@@ -5119,14 +5122,14 @@
5119
5122
  };
5120
5123
  Tabbar.displayName = "NutTabbar";
5121
5124
  Tabbar.Item = TabbarItem;
5122
- const defaultProps$18 = {
5125
+ const defaultProps$19 = {
5123
5126
  title: "",
5124
5127
  value: "",
5125
5128
  disabled: false
5126
5129
  };
5127
5130
  const TabPane = (props) => {
5128
5131
  const { children, autoHeightClassName, className, disabled } = {
5129
- ...defaultProps$18,
5132
+ ...defaultProps$19,
5130
5133
  ...props
5131
5134
  };
5132
5135
  const classPrefix2 = "nut-tabpane";
@@ -5167,7 +5170,7 @@
5167
5170
  const idRef = React.useRef(uniqueId());
5168
5171
  return idRef.current;
5169
5172
  }
5170
- const defaultProps$17 = {
5173
+ const defaultProps$18 = {
5171
5174
  ...ComponentDefaults,
5172
5175
  tabStyle: {},
5173
5176
  activeColor: "",
@@ -5197,7 +5200,7 @@
5197
5200
  defaultValue: outerDefaultValue,
5198
5201
  ...rest
5199
5202
  } = {
5200
- ...defaultProps$17,
5203
+ ...defaultProps$18,
5201
5204
  ...props
5202
5205
  };
5203
5206
  const uuid = useUuid();
@@ -5306,6 +5309,7 @@
5306
5309
  } else {
5307
5310
  const left2 = titleRects.slice(0, index).reduce((prev, curr) => prev + curr.width, 0);
5308
5311
  to = left2 - (navRectRef.current.width - titleRect.width) / 2;
5312
+ if (to < 0) return;
5309
5313
  to = rtl ? -to : to;
5310
5314
  }
5311
5315
  Taro.nextTick(() => {
@@ -5420,7 +5424,7 @@
5420
5424
  };
5421
5425
  Tabs.displayName = "NutTabs";
5422
5426
  Tabs.TabPane = TabPane;
5423
- const defaultProps$16 = {
5427
+ const defaultProps$17 = {
5424
5428
  type: "custom",
5425
5429
  existList: [],
5426
5430
  defaultIcon: null,
@@ -5439,7 +5443,7 @@
5439
5443
  onSelect,
5440
5444
  onSwitch,
5441
5445
  ...rest
5442
- } = { ...defaultProps$16, ...props };
5446
+ } = { ...defaultProps$17, ...props };
5443
5447
  const classPrefix2 = "nut-address";
5444
5448
  const selectedExist = (item) => {
5445
5449
  existList.forEach((list, index) => {
@@ -5601,7 +5605,7 @@
5601
5605
  return pathNodes;
5602
5606
  }
5603
5607
  }
5604
- const defaultProps$15 = {
5608
+ const defaultProps$16 = {
5605
5609
  ...ComponentDefaults,
5606
5610
  activeColor: "",
5607
5611
  activeIcon: "checklist",
@@ -5646,7 +5650,7 @@
5646
5650
  onClose,
5647
5651
  onChange,
5648
5652
  onPathChange
5649
- } = { ...defaultProps$15, ...props };
5653
+ } = { ...defaultProps$16, ...props };
5650
5654
  const [tabvalue, setTabvalue] = React.useState("c1");
5651
5655
  const [optionsData, setOptionsData] = React.useState([]);
5652
5656
  const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
@@ -5954,7 +5958,7 @@
5954
5958
  };
5955
5959
  const Cascader = React.forwardRef(InternalCascader);
5956
5960
  Cascader.displayName = "NutCascader";
5957
- const defaultProps$14 = {
5961
+ const defaultProps$15 = {
5958
5962
  ...ComponentDefaults,
5959
5963
  visible: false,
5960
5964
  type: "custom",
@@ -5981,7 +5985,7 @@
5981
5985
  onPathChange,
5982
5986
  ...rest
5983
5987
  } = {
5984
- ...defaultProps$14,
5988
+ ...defaultProps$15,
5985
5989
  ...props
5986
5990
  };
5987
5991
  return /* @__PURE__ */ React.createElement(React.Fragment, null, type2 === "custom" && /* @__PURE__ */ React.createElement(
@@ -6006,7 +6010,7 @@
6006
6010
  }
6007
6011
  ));
6008
6012
  };
6009
- const defaultProps$13 = {
6013
+ const defaultProps$14 = {
6010
6014
  ...ComponentDefaults,
6011
6015
  defaultValue: [],
6012
6016
  type: "custom",
@@ -6048,7 +6052,7 @@
6048
6052
  onSwitch,
6049
6053
  ...rest
6050
6054
  } = {
6051
- ...defaultProps$13,
6055
+ ...defaultProps$14,
6052
6056
  ...props
6053
6057
  };
6054
6058
  const classPrefix2 = "nut-address";
@@ -6386,7 +6390,7 @@
6386
6390
  const isStartAndEnd = (days) => {
6387
6391
  return days.length >= 2 && Utils.isEqual(days[0], days[1]);
6388
6392
  };
6389
- const defaultProps$12 = {
6393
+ const defaultProps$13 = {
6390
6394
  ...ComponentDefaults,
6391
6395
  type: "single",
6392
6396
  autoBackfill: false,
@@ -6447,7 +6451,7 @@
6447
6451
  onUpdate,
6448
6452
  onDayClick,
6449
6453
  onPageChange
6450
- } = { ...defaultProps$12, ...props };
6454
+ } = { ...defaultProps$13, ...props };
6451
6455
  const weekdays = locale.calendaritem.weekdays;
6452
6456
  const weeks = [
6453
6457
  ...weekdays.slice(firstDayOfWeek, 7),
@@ -6997,7 +7001,7 @@
6997
7001
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
6998
7002
  });
6999
7003
  CalendarItem.displayName = "NutCalendarItem";
7000
- const defaultProps$11 = {
7004
+ const defaultProps$12 = {
7001
7005
  ...ComponentDefaults,
7002
7006
  type: "single",
7003
7007
  autoBackfill: false,
@@ -7060,7 +7064,7 @@
7060
7064
  onConfirm,
7061
7065
  onDayClick,
7062
7066
  onPageChange
7063
- } = { ...defaultProps$11, ...props };
7067
+ } = { ...defaultProps$12, ...props };
7064
7068
  const calendarRef = React.useRef(null);
7065
7069
  const close2 = () => {
7066
7070
  onClose && onClose();
@@ -7209,7 +7213,7 @@
7209
7213
  )
7210
7214
  ];
7211
7215
  };
7212
- const defaultProps$10 = {
7216
+ const defaultProps$11 = {
7213
7217
  ...ComponentDefaults,
7214
7218
  type: "single",
7215
7219
  firstDayOfWeek: 0
@@ -7233,7 +7237,7 @@
7233
7237
  onDayClick,
7234
7238
  onPageChange,
7235
7239
  onChange
7236
- } = { ...defaultProps$10, ...props };
7240
+ } = { ...defaultProps$11, ...props };
7237
7241
  const [month, setMonth] = React.useState(() => {
7238
7242
  let date2 = new Date(Date.now());
7239
7243
  const val = value || defaultValue;
@@ -7537,7 +7541,7 @@
7537
7541
  });
7538
7542
  CalendarCard.displayName = "NutCalendarCard";
7539
7543
  const CheckboxGroupContext = React.createContext(null);
7540
- const defaultProps$$ = {
7544
+ const defaultProps$10 = {
7541
7545
  max: void 0,
7542
7546
  min: void 0,
7543
7547
  list: false,
@@ -7567,7 +7571,7 @@
7567
7571
  onChange,
7568
7572
  onLimit,
7569
7573
  ...rest
7570
- } = { ...defaultProps$$, ...props };
7574
+ } = { ...defaultProps$10, ...props };
7571
7575
  React.useImperativeHandle(ref, () => ({
7572
7576
  toggle(state) {
7573
7577
  if (state === false) {
@@ -7660,7 +7664,7 @@
7660
7664
  }
7661
7665
  );
7662
7666
  CheckboxGroup.displayName = "NutCheckboxGroup";
7663
- const defaultProps$_ = {
7667
+ const defaultProps$$ = {
7664
7668
  ...ComponentDefaults,
7665
7669
  disabled: false,
7666
7670
  shape: "round",
@@ -7674,7 +7678,7 @@
7674
7678
  const classPrefix$i = "nut-checkbox";
7675
7679
  const Checkbox = (props) => {
7676
7680
  const { children } = {
7677
- ...defaultProps$_,
7681
+ ...defaultProps$$,
7678
7682
  ...props
7679
7683
  };
7680
7684
  const {
@@ -8055,7 +8059,7 @@
8055
8059
  }, []);
8056
8060
  return [refs.current, setRefs, reset];
8057
8061
  }
8058
- const defaultProps$Z = {
8062
+ const defaultProps$_ = {
8059
8063
  ...ComponentDefaults,
8060
8064
  visible: false,
8061
8065
  title: "",
@@ -8086,7 +8090,7 @@
8086
8090
  afterClose,
8087
8091
  onChange,
8088
8092
  ...rest
8089
- } = { ...defaultProps$Z, ...props };
8093
+ } = { ...defaultProps$_, ...props };
8090
8094
  const classPrefix2 = "nut-picker";
8091
8095
  const classes = classNames(classPrefix2, className);
8092
8096
  const [selectedValue, setSelectedValue] = usePropsValue({
@@ -8398,7 +8402,7 @@
8398
8402
  return str;
8399
8403
  };
8400
8404
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
8401
- const defaultProps$Y = {
8405
+ const defaultProps$Z = {
8402
8406
  ...ComponentDefaults,
8403
8407
  visible: false,
8404
8408
  title: "",
@@ -8431,7 +8435,7 @@
8431
8435
  style,
8432
8436
  ...rest
8433
8437
  } = {
8434
- ...defaultProps$Y,
8438
+ ...defaultProps$Z,
8435
8439
  ...props
8436
8440
  };
8437
8441
  const { locale } = useConfig$1();
@@ -9956,7 +9960,7 @@
9956
9960
  }
9957
9961
  return [formRef.current];
9958
9962
  };
9959
- const defaultProps$X = {
9963
+ const defaultProps$Y = {
9960
9964
  ...ComponentDefaults,
9961
9965
  labelPosition: "right",
9962
9966
  starPosition: "left",
@@ -9987,7 +9991,7 @@
9987
9991
  starPosition,
9988
9992
  form
9989
9993
  } = {
9990
- ...defaultProps$X,
9994
+ ...defaultProps$Y,
9991
9995
  ...props
9992
9996
  };
9993
9997
  let formInstance;
@@ -10043,7 +10047,7 @@
10043
10047
  }
10044
10048
  ).$$typeof === component.type.$$typeof;
10045
10049
  }
10046
- const defaultProps$W = {
10050
+ const defaultProps$X = {
10047
10051
  ...ComponentDefaults,
10048
10052
  required: false,
10049
10053
  name: "",
@@ -10137,9 +10141,10 @@
10137
10141
  rules: rules2,
10138
10142
  className,
10139
10143
  style,
10144
+ align,
10140
10145
  errorMessageAlign
10141
10146
  } = {
10142
- ...defaultProps$W,
10147
+ ...defaultProps$X,
10143
10148
  ...this.props
10144
10149
  };
10145
10150
  const requiredInRules = rules2 == null ? void 0 : rules2.some((rule) => rule.required);
@@ -10152,6 +10157,7 @@
10152
10157
  {
10153
10158
  className: `nut-form-item ${className}`,
10154
10159
  style,
10160
+ align,
10155
10161
  onClick: (e2) => this.props.onClick && this.props.onClick(e2, this.componentRef)
10156
10162
  },
10157
10163
  label ? /* @__PURE__ */ React.createElement("div", { className: "nut-cell-title nut-form-item-label" }, renderLabel) : null,
@@ -10208,7 +10214,7 @@
10208
10214
  return /* @__PURE__ */ React.createElement(React.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
10209
10215
  }
10210
10216
  };
10211
- _FormItem.defaultProps = defaultProps$W;
10217
+ _FormItem.defaultProps = defaultProps$X;
10212
10218
  _FormItem.contextType = Context;
10213
10219
  let FormItem = _FormItem;
10214
10220
  const InnerForm = Form;
@@ -10238,7 +10244,7 @@
10238
10244
  const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
10239
10245
  return value.replace(regExp, "");
10240
10246
  }
10241
- const defaultProps$V = {
10247
+ const defaultProps$W = {
10242
10248
  ...ComponentDefaults,
10243
10249
  type: "text",
10244
10250
  name: "",
@@ -10283,7 +10289,7 @@
10283
10289
  value: _value,
10284
10290
  ...rest
10285
10291
  } = {
10286
- ...defaultProps$V,
10292
+ ...defaultProps$W,
10287
10293
  ...props
10288
10294
  };
10289
10295
  const [value, setValue] = usePropsValue({
@@ -10434,7 +10440,7 @@
10434
10440
  }
10435
10441
  );
10436
10442
  Input.displayName = "NutInput";
10437
- const defaultProps$U = {
10443
+ const defaultProps$V = {
10438
10444
  ...ComponentDefaults,
10439
10445
  disabled: false,
10440
10446
  readOnly: false,
@@ -10472,7 +10478,7 @@
10472
10478
  onChange,
10473
10479
  ...restProps
10474
10480
  } = {
10475
- ...defaultProps$U,
10481
+ ...defaultProps$V,
10476
10482
  ...props
10477
10483
  };
10478
10484
  const classes = classNames(classPrefix$h, className, {
@@ -10563,6 +10569,17 @@
10563
10569
  if (text === "-") return null;
10564
10570
  return text;
10565
10571
  };
10572
+ const clampValue = (valueStr) => {
10573
+ if (valueStr === null) return defaultValue;
10574
+ const val = Number(parseFloat(valueStr || "0").toFixed(digits));
10575
+ return Math.max(Number(min), Math.min(Number(max), val));
10576
+ };
10577
+ const handleValueChange = (valueStr, e2) => {
10578
+ const val = clampValue(valueStr);
10579
+ if (val !== Number(shadowValue)) {
10580
+ onChange == null ? void 0 : onChange(val, e2);
10581
+ }
10582
+ };
10566
10583
  const handleInputChange = (e2) => {
10567
10584
  setInputValue(e2.target.value);
10568
10585
  const valueStr = parseValue(e2.target.value);
@@ -10573,26 +10590,31 @@
10573
10590
  setShadowValue(defaultValue);
10574
10591
  }
10575
10592
  } else {
10576
- setShadowValue(valueStr);
10577
- }
10578
- if (!async) {
10579
- onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
10593
+ setShadowValue(clampValue(valueStr));
10580
10594
  }
10595
+ !async && handleValueChange(valueStr, e2);
10581
10596
  };
10582
10597
  const handleFocus = (e2) => {
10583
10598
  setFocused(true);
10584
10599
  setInputValue(
10585
10600
  shadowValue !== void 0 && shadowValue !== null ? bound2(Number(shadowValue), Number(min), Number(max)).toString() : ""
10586
10601
  );
10587
- onFocus && onFocus(e2);
10602
+ onFocus == null ? void 0 : onFocus(e2);
10588
10603
  };
10589
10604
  const handleBlur = (e2) => {
10590
10605
  setFocused(false);
10591
- onBlur && onBlur(e2);
10592
- if (async) {
10593
- const valueStr = parseValue(e2.target.value);
10594
- onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
10606
+ onBlur == null ? void 0 : onBlur(e2);
10607
+ const valueStr = parseValue(e2.target.value);
10608
+ if (valueStr === null) {
10609
+ if (allowEmpty) {
10610
+ setShadowValue(null);
10611
+ } else {
10612
+ setShadowValue(defaultValue);
10613
+ }
10614
+ } else {
10615
+ setShadowValue(clampValue(valueStr));
10595
10616
  }
10617
+ async && handleValueChange(valueStr, e2);
10596
10618
  };
10597
10619
  return /* @__PURE__ */ React.createElement("div", { className: classes, style, ...restProps }, /* @__PURE__ */ React.createElement("div", { className: "nut-input-minus", onClick: handleReduce }, /* @__PURE__ */ React.createElement(
10598
10620
  a$1,
@@ -10625,8 +10647,9 @@
10625
10647
  )));
10626
10648
  };
10627
10649
  InputNumber.displayName = "NutInputNumber";
10628
- const defaultProps$T = {
10650
+ const defaultProps$U = {
10629
10651
  ...ComponentDefaults,
10652
+ titleIcon: null,
10630
10653
  columns: 1,
10631
10654
  direction: "down",
10632
10655
  icon: null,
@@ -10656,7 +10679,7 @@
10656
10679
  parent,
10657
10680
  index
10658
10681
  } = {
10659
- ...defaultProps$T,
10682
+ ...defaultProps$U,
10660
10683
  ...props
10661
10684
  };
10662
10685
  const [showPopup, setShowPopup] = React.useState(show2);
@@ -10837,7 +10860,7 @@
10837
10860
  ));
10838
10861
  });
10839
10862
  MenuItem.displayName = "NutMenuItem";
10840
- const defaultProps$S = {
10863
+ const defaultProps$T = {
10841
10864
  ...ComponentDefaults,
10842
10865
  activeColor: "",
10843
10866
  closeOnOverlayClick: true,
@@ -10864,7 +10887,7 @@
10864
10887
  onOpen,
10865
10888
  ...rest
10866
10889
  } = {
10867
- ...defaultProps$S,
10890
+ ...defaultProps$T,
10868
10891
  ...props
10869
10892
  };
10870
10893
  const menuRef = React.useRef(null);
@@ -10929,7 +10952,15 @@
10929
10952
  const menuTitle = () => {
10930
10953
  return React.Children.map(children, (child, index) => {
10931
10954
  if (React.isValidElement(child)) {
10932
- const { title, options, value, defaultValue, disabled, direction } = child.props;
10955
+ const {
10956
+ title,
10957
+ titleIcon,
10958
+ options,
10959
+ value,
10960
+ defaultValue,
10961
+ disabled,
10962
+ direction
10963
+ } = child.props;
10933
10964
  const selected = options == null ? void 0 : options.filter(
10934
10965
  (option) => option.value === (value !== void 0 ? value : defaultValue)
10935
10966
  );
@@ -10940,6 +10971,25 @@
10940
10971
  return selected[0].text;
10941
10972
  return "";
10942
10973
  };
10974
+ const finallyIcon = () => {
10975
+ if (titleIcon) return titleIcon;
10976
+ if (icon) return icon;
10977
+ return direction === "up" ? /* @__PURE__ */ React.createElement(
10978
+ a$2,
10979
+ {
10980
+ className: "nut-menu-title-icon",
10981
+ width: "12px",
10982
+ height: "12px"
10983
+ }
10984
+ ) : /* @__PURE__ */ React.createElement(
10985
+ g$6,
10986
+ {
10987
+ className: "nut-menu-title-icon",
10988
+ width: "12px",
10989
+ height: "12px"
10990
+ }
10991
+ );
10992
+ };
10943
10993
  return /* @__PURE__ */ React.createElement(
10944
10994
  "div",
10945
10995
  {
@@ -10955,7 +11005,7 @@
10955
11005
  }
10956
11006
  },
10957
11007
  /* @__PURE__ */ React.createElement("div", { className: "nut-menu-title-text" }, finallyTitle()),
10958
- icon || (direction === "up" ? /* @__PURE__ */ React.createElement(a$2, { className: "nut-menu-title-icon", size: "12px" }) : /* @__PURE__ */ React.createElement(g$6, { className: "nut-menu-title-icon", size: "12px" }))
11008
+ finallyIcon()
10959
11009
  );
10960
11010
  }
10961
11011
  return null;
@@ -10984,6 +11034,16 @@
10984
11034
  };
10985
11035
  Menu.displayName = "NutMenu";
10986
11036
  Menu.Item = MenuItem;
11037
+ const defaultProps$S = {
11038
+ ...ComponentDefaults,
11039
+ visible: false,
11040
+ rightActions: "",
11041
+ type: "default",
11042
+ custom: [],
11043
+ random: false,
11044
+ onClose: () => {
11045
+ }
11046
+ };
10987
11047
  const NumberKeyboard = (props) => {
10988
11048
  const { locale } = useConfig$1();
10989
11049
  const {
@@ -11001,7 +11061,7 @@
11001
11061
  onClose,
11002
11062
  onConfirm,
11003
11063
  ...rest
11004
- } = props;
11064
+ } = { ...defaultProps$S, ...props };
11005
11065
  const classPrefix2 = "nut-numberkeyboard";
11006
11066
  const getBasicKeys = () => {
11007
11067
  const keys = new Array(9).fill(0).map((_, index) => {
@@ -11047,17 +11107,35 @@
11047
11107
  };
11048
11108
  const onTouchEnd = (item2) => {
11049
11109
  setActive(false);
11050
- if (item2.type === "num" || item2.type === "custom") {
11051
- onChange && onChange(item2.id);
11052
- }
11053
- if (item2.type === "close") {
11054
- onClose && onClose();
11055
- }
11056
- if (item2.type === "delete") {
11057
- onDelete && onDelete();
11110
+ switch (item2.type) {
11111
+ case "num":
11112
+ case "custom":
11113
+ onChange == null ? void 0 : onChange(item2.id);
11114
+ break;
11115
+ case "close":
11116
+ onClose == null ? void 0 : onClose();
11117
+ break;
11118
+ case "delete":
11119
+ onDelete == null ? void 0 : onDelete();
11120
+ break;
11121
+ case "confirm":
11122
+ onConfirm == null ? void 0 : onConfirm();
11123
+ break;
11058
11124
  }
11059
- if (item2.type === "confirm") {
11060
- onConfirm && onConfirm();
11125
+ };
11126
+ const renderContent = (item2) => {
11127
+ switch (item2.type) {
11128
+ case "num":
11129
+ case "custom":
11130
+ return /* @__PURE__ */ React.createElement("div", null, item2.id);
11131
+ case "delete":
11132
+ return /* @__PURE__ */ React.createElement(DeleteIcon, null);
11133
+ case "close":
11134
+ return /* @__PURE__ */ React.createElement(g$6, { size: 18 });
11135
+ case "confirm":
11136
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, confirmText || locale.done);
11137
+ default:
11138
+ return null;
11061
11139
  }
11062
11140
  };
11063
11141
  return /* @__PURE__ */ React.createElement("div", { key: item.id, className: `${classPrefix2}-body-wrapper` }, /* @__PURE__ */ React.createElement(
@@ -11074,22 +11152,19 @@
11074
11152
  onTouchEnd: () => onTouchEnd(item),
11075
11153
  onTouchCancel: () => onTouchEnd(item)
11076
11154
  },
11077
- (item.type === "num" || item.type === "custom") && /* @__PURE__ */ React.createElement("div", null, item.id),
11078
- item.type === "delete" && /* @__PURE__ */ React.createElement(DeleteIcon, null),
11079
- item.type === "close" && /* @__PURE__ */ React.createElement(g$6, { size: 18 }),
11080
- item.type === "confirm" && /* @__PURE__ */ React.createElement(React.Fragment, null, confirmText || locale.done)
11155
+ renderContent(item)
11081
11156
  ));
11082
11157
  };
11083
11158
  return /* @__PURE__ */ React.createElement(
11084
11159
  Popup,
11085
11160
  {
11161
+ ...rest,
11086
11162
  visible,
11087
11163
  position: "bottom",
11088
11164
  onOverlayClick: onClose,
11089
11165
  onCloseIconClick: onClose,
11090
11166
  zIndex: 9999,
11091
- overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" },
11092
- ...rest
11167
+ overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
11093
11168
  },
11094
11169
  /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style }, title && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-header` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-header-title` }, title), type2 === "default" && /* @__PURE__ */ React.createElement(
11095
11170
  "span",
@@ -12476,10 +12551,12 @@
12476
12551
  uploadTaro(uploadFile, env) {
12477
12552
  var _a;
12478
12553
  const options = this.options;
12554
+ if (options.beforeXhrUpload) {
12555
+ options.beforeXhrUpload(uploadFile, options);
12556
+ return;
12557
+ }
12479
12558
  if (env === "WEB") {
12480
12559
  this.upload();
12481
- } else if (options.beforeXhrUpload) {
12482
- options.beforeXhrUpload(uploadFile, options);
12483
12560
  } else {
12484
12561
  const uploadTask = uploadFile({
12485
12562
  url: options.url,
@@ -12936,7 +13013,7 @@
12936
13013
  /** 拍摄视频最长拍摄时间,单位秒。时间范围为 3s 至 30s 之间 */
12937
13014
  maxDuration,
12938
13015
  /** 仅对 mediaType 为 image 时有效,是否压缩所选文件 */
12939
- sizeType: [],
13016
+ sizeType,
12940
13017
  /** 仅在 sourceType 为 camera 时生效,使用前置或后置摄像头 */
12941
13018
  camera,
12942
13019
  /** 接口调用失败的回调函数 */
@@ -14767,10 +14844,11 @@
14767
14844
  return "";
14768
14845
  };
14769
14846
  const handleTouchStart = (e2) => {
14847
+ if (props.disabled) return;
14770
14848
  touch.start(e2);
14771
14849
  };
14772
14850
  const handleTouchMove = (e2) => {
14773
- if (props.scrollTop > 0) {
14851
+ if (props.scrollTop > 0 || props.disabled) {
14774
14852
  return;
14775
14853
  }
14776
14854
  if (status === "refreshing" || status === "complete") return;
@@ -14810,6 +14888,7 @@
14810
14888
  setStatus("pulling");
14811
14889
  }
14812
14890
  const handleTouchEnd = () => {
14891
+ if (props.disabled) return;
14813
14892
  pullingRef.current = false;
14814
14893
  if (status === "canRelease") {
14815
14894
  doRefresh();
@@ -17031,27 +17110,37 @@
17031
17110
  defaultValue: innerNo && (innerNo > maxNo ? maxNo - 1 : innerNo - 1),
17032
17111
  indicator
17033
17112
  },
17034
- (videos && videos.length > 0 ? videos.map((item, index) => {
17035
- return /* @__PURE__ */ React.createElement(
17036
- SwiperItem,
17037
- {
17038
- key: index,
17039
- className: "nut-imagepreview-swiper-item"
17040
- },
17041
- /* @__PURE__ */ React.createElement(
17042
- components.Video,
17113
+ (videos ?? []).map(
17114
+ (item) => ({ type: "video", data: item })
17115
+ ).concat(
17116
+ (images ?? []).map((item) => ({ type: "image", data: item }))
17117
+ ).sort((a2, b) => {
17118
+ var _a, _b;
17119
+ return (((_a = a2.data) == null ? void 0 : _a.index) ?? 0) - (((_b = b.data) == null ? void 0 : _b.index) ?? 0);
17120
+ }).map((item, index) => {
17121
+ if (item.type === "video") {
17122
+ const { source, options } = item.data;
17123
+ return /* @__PURE__ */ React.createElement(
17124
+ SwiperItem,
17043
17125
  {
17044
- src: item.source.src,
17045
- onClick: closeOnImg,
17046
- controls: item.options.controls,
17047
- autoplay: false,
17048
- loop: false,
17049
- muted: item.options.muted
17050
- }
17051
- )
17052
- );
17053
- }) : []).concat(
17054
- images && images.length > 0 ? images.map((item, index) => {
17126
+ key: index,
17127
+ className: "nut-imagepreview-swiper-item"
17128
+ },
17129
+ /* @__PURE__ */ React.createElement(
17130
+ components.Video,
17131
+ {
17132
+ src: source.src,
17133
+ onClick: closeOnImg,
17134
+ controls: options.controls,
17135
+ autoplay: false,
17136
+ loop: false,
17137
+ muted: options.muted
17138
+ }
17139
+ )
17140
+ );
17141
+ }
17142
+ if (item.type === "image") {
17143
+ const { src } = item.data;
17055
17144
  return /* @__PURE__ */ React.createElement(
17056
17145
  SwiperItem,
17057
17146
  {
@@ -17062,7 +17151,7 @@
17062
17151
  /* @__PURE__ */ React.createElement(
17063
17152
  components.Image,
17064
17153
  {
17065
- src: item.src,
17154
+ src,
17066
17155
  mode: "widthFix",
17067
17156
  onClick: closeOnImg,
17068
17157
  style: { width: "100%" },
@@ -17073,8 +17162,9 @@
17073
17162
  ),
17074
17163
  ")"
17075
17164
  );
17076
- }) : []
17077
- )
17165
+ }
17166
+ return null;
17167
+ })
17078
17168
  )
17079
17169
  ),
17080
17170
  pagination ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0)) : null,