@nutui/nutui-react-taro 2.6.22 → 2.7.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 (58) hide show
  1. package/CHANGELOG.md +37 -14
  2. package/dist/esm/ActionSheet/style/style.css +1 -1
  3. package/dist/esm/Address/style/style.css +1 -1
  4. package/dist/esm/Address.js +1 -1
  5. package/dist/esm/AvatarCropper/style/style.css +1 -1
  6. package/dist/esm/Calendar/style/style.css +1 -1
  7. package/dist/esm/Calendar.js +1 -1
  8. package/dist/esm/CalendarItem.js +1 -1
  9. package/dist/esm/Cascader/style/style.css +1 -1
  10. package/dist/esm/Cascader.js +1 -1
  11. package/dist/esm/DatePicker/style/style.css +1 -1
  12. package/dist/esm/Dialog/style/style.css +1 -1
  13. package/dist/esm/Divider/style/style.css +1 -1
  14. package/dist/esm/FixedNav/style/style.css +1 -1
  15. package/dist/esm/ImagePreview/style/style.css +1 -1
  16. package/dist/esm/InputNumber.js +1 -1
  17. package/dist/esm/Menu/style/style.css +1 -1
  18. package/dist/esm/MenuItem/style/style.css +1 -1
  19. package/dist/esm/NumberKeyboard/style/style.css +1 -1
  20. package/dist/esm/Overlay/style/style.css +1 -1
  21. package/dist/esm/Picker/style/style.css +1 -1
  22. package/dist/esm/Popover/style/style.css +1 -1
  23. package/dist/esm/Popup/style/style.css +1 -1
  24. package/dist/esm/ShortPassword/style/style.css +1 -1
  25. package/dist/esm/SideNavBar/style/style.css +1 -1
  26. package/dist/esm/Tabs.js +1 -1
  27. package/dist/esm/TimeSelect/style/style.css +1 -1
  28. package/dist/esm/Tour/style/style.css +1 -1
  29. package/dist/esm/{address.taro-Ai6DQF3D.js → address.taro-CAikNvuu.js} +1 -1
  30. package/dist/esm/{calendar.taro-C52T1TFf.js → calendar.taro-MkErd99P.js} +4 -4
  31. package/dist/esm/{calendaritem.taro-CHdJXKkc.js → calendaritem.taro-BGbbuJOS.js} +2 -2
  32. package/dist/esm/{cascader.taro-CMOCzo0m.js → cascader.taro-DEApf0aF.js} +1 -1
  33. package/dist/esm/{inputnumber.taro-DPRZtV42.js → inputnumber.taro-CZourWz-.js} +4 -4
  34. package/dist/esm/nutui-react.es.js +6 -6
  35. package/dist/esm/{tabs.taro-D8bDfm4x.js → tabs.taro-CY1VxgF-.js} +1 -4
  36. package/dist/locales/base.js +1 -1
  37. package/dist/locales/en-US.js +1 -1
  38. package/dist/locales/id-ID.js +1 -1
  39. package/dist/locales/tr-TR.js +1 -1
  40. package/dist/locales/zh-CN.js +1 -1
  41. package/dist/locales/zh-TW.js +1 -1
  42. package/dist/locales/zh-UG.js +1 -1
  43. package/dist/nutui.react.es.js +14 -9
  44. package/dist/nutui.react.umd.js +14 -9
  45. package/dist/packages/avatarcropper/avatarcropper.scss +1 -1
  46. package/dist/packages/divider/divider.scss +1 -2
  47. package/dist/packages/overlay/overlay.scss +0 -4
  48. package/dist/style.css +1 -1
  49. package/dist/styles/variables-jmapp.scss +0 -1
  50. package/dist/styles/variables.scss +0 -1
  51. package/dist/types/packages/calendar/calendar.d.ts +2 -0
  52. package/dist/types/packages/calendar/calendar.taro.d.ts +10 -0
  53. package/dist/types/packages/calendaritem/calendaritem.d.ts +1 -0
  54. package/dist/types/packages/calendaritem/calendaritem.taro.d.ts +1 -0
  55. package/dist/types/packages/configprovider/types.d.ts +1 -1
  56. package/dist/types/packages/inputnumber/inputnumber.d.ts +1 -0
  57. package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +1 -0
  58. package/package.json +2 -1
@@ -1,6 +1,6 @@
1
1
  import React__default, { useRef } from "react";
2
2
  import { P as Popup } from "./popup.taro-DV32k5dP.js";
3
- import { C as CalendarItem } from "./calendaritem.taro-CHdJXKkc.js";
3
+ import { C as CalendarItem } from "./calendaritem.taro-BGbbuJOS.js";
4
4
  import { U as Utils } from "./date-CYwRNlGq.js";
5
5
  import { u as useConfig } from "./configprovider.taro-C3WyeHSO.js";
6
6
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
@@ -11,7 +11,7 @@ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { type:
11
11
  } });
12
12
  const Calendar = React__default.forwardRef((props, ref) => {
13
13
  const { locale } = useConfig();
14
- const { style, className, children, popup, visible, type, autoBackfill, title, defaultValue, startDate, endDate, showToday, startText, endText, confirmText, showTitle, showSubTitle, scrollAnimation, firstDayOfWeek, disableDate, renderHeaderButtons, renderDay, renderDayTop, renderDayBottom, onClose, onConfirm, onDayClick, onPageChange } = Object.assign(Object.assign({}, defaultProps), props);
14
+ const { style, className, children, popup, visible, type, autoBackfill, title, defaultValue, startDate, endDate, showToday, startText, endText, confirmText, showTitle, showSubTitle, scrollAnimation, firstDayOfWeek, closeIcon, disableDate, renderHeaderButtons, renderBottomButton, renderDay, renderDayTop, renderDayBottom, onClose, onConfirm, onDayClick, onPageChange } = Object.assign(Object.assign({}, defaultProps), props);
15
15
  const calendarRef = useRef(null);
16
16
  const close = () => {
17
17
  onClose && onClose();
@@ -37,9 +37,9 @@ const Calendar = React__default.forwardRef((props, ref) => {
37
37
  scrollToDate
38
38
  }));
39
39
  const renderItem = () => {
40
- return React__default.createElement(CalendarItem, { ref: calendarRef, style, className, children, type, autoBackfill, popup, title: title || locale.calendaritem.title, defaultValue, startDate, endDate, showToday, startText: startText || locale.calendaritem.start, endText: endText || locale.calendaritem.end, confirmText: confirmText || locale.calendaritem.confirm, showTitle, showSubTitle, scrollAnimation, firstDayOfWeek, disableDate, renderHeaderButtons, renderDay, renderDayTop, renderDayBottom, onConfirm: choose, onDayClick: select, onPageChange: yearMonthChange });
40
+ return React__default.createElement(CalendarItem, { ref: calendarRef, style, className, children, type, autoBackfill, popup, title: title || locale.calendaritem.title, defaultValue, startDate, endDate, showToday, startText: startText || locale.calendaritem.start, endText: endText || locale.calendaritem.end, confirmText: confirmText || locale.calendaritem.confirm, showTitle, showSubTitle, scrollAnimation, firstDayOfWeek, disableDate, renderHeaderButtons, renderBottomButton, renderDay, renderDayTop, renderDayBottom, onConfirm: choose, onDayClick: select, onPageChange: yearMonthChange });
41
41
  };
42
- return React__default.createElement(React__default.Fragment, null, popup ? React__default.createElement(Popup, { className: "nut-calendar-popup", visible, position: "bottom", round: true, closeable: true, destroyOnClose: true, onOverlayClick: closePopup, onCloseIconClick: closePopup, style: { height: "83%" } }, renderItem()) : renderItem());
42
+ return React__default.createElement(React__default.Fragment, null, popup ? React__default.createElement(Popup, { className: "nut-calendar-popup", visible, position: "bottom", round: true, closeable: true, destroyOnClose: true, onOverlayClick: closePopup, onCloseIconClick: closePopup, style: { height: "83%" }, closeIcon }, renderItem()) : renderItem());
43
43
  });
44
44
  Calendar.displayName = "NutCalendar";
45
45
  export {
@@ -42,7 +42,7 @@ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { type:
42
42
  } });
43
43
  const CalendarItem = React__default.forwardRef((props, ref) => {
44
44
  const { locale } = useConfig();
45
- const { style, className, children, popup, type, autoBackfill, title, defaultValue, startDate, endDate, showToday, startText, endText, confirmText, showTitle, showSubTitle, scrollAnimation, firstDayOfWeek, disableDate, renderHeaderButtons, renderDay, renderDayTop, renderDayBottom, value, onConfirm, onUpdate, onDayClick, onPageChange } = Object.assign(Object.assign({}, defaultProps), props);
45
+ const { style, className, children, popup, type, autoBackfill, title, defaultValue, startDate, endDate, showToday, startText, endText, confirmText, showTitle, showSubTitle, scrollAnimation, firstDayOfWeek, disableDate, renderHeaderButtons, renderDay, renderDayTop, renderDayBottom, renderBottomButton, value, onConfirm, onUpdate, onDayClick, onPageChange } = Object.assign(Object.assign({}, defaultProps), props);
46
46
  const weekdays = locale.calendaritem.weekdays;
47
47
  const weeks = [
48
48
  ...weekdays.slice(firstDayOfWeek, 7),
@@ -554,7 +554,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
554
554
  "div",
555
555
  { className: "nut-calendar-footer" },
556
556
  children,
557
- React__default.createElement("div", { className: "calendar-confirm-btn", onClick: confirm }, confirmText || locale.confirm)
557
+ React__default.createElement("div", { onClick: confirm }, renderBottomButton ? renderBottomButton() : React__default.createElement("div", { className: "calendar-confirm-btn" }, confirmText || locale.confirm))
558
558
  );
559
559
  };
560
560
  return React__default.createElement(
@@ -4,7 +4,7 @@ import classNames from "classnames";
4
4
  import { Loading, Checklist } from "@nutui/icons-react-taro";
5
5
  import { ScrollView } from "@tarojs/components";
6
6
  import { P as Popup } from "./popup.taro-DV32k5dP.js";
7
- import { T as Tabs } from "./tabs.taro-D8bDfm4x.js";
7
+ import { T as Tabs } from "./tabs.taro-CY1VxgF-.js";
8
8
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
9
9
  import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
10
10
  import { u as useConfig } from "./configprovider.taro-C3WyeHSO.js";
@@ -4,10 +4,10 @@ import { Minus, Plus } from "@nutui/icons-react-taro";
4
4
  import classNames from "classnames";
5
5
  import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
6
6
  import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
7
- const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { disabled: false, readOnly: false, allowEmpty: false, min: 1, max: 9999, type: "digit", step: 1, digits: 0, async: false });
7
+ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { disabled: false, readOnly: false, allowEmpty: false, min: 1, max: 9999, type: "digit", step: 1, digits: 0, async: false, select: true });
8
8
  const classPrefix = `nut-inputnumber`;
9
9
  const InputNumber = (props) => {
10
- const _a = Object.assign(Object.assign({}, defaultProps), props), { children, disabled, min, max, type, readOnly, value, defaultValue, allowEmpty, digits, step, async, className, style, formatter, onPlus, onMinus, onOverlimit, onBlur, onFocus, onChange } = _a, restProps = __rest(_a, ["children", "disabled", "min", "max", "type", "readOnly", "value", "defaultValue", "allowEmpty", "digits", "step", "async", "className", "style", "formatter", "onPlus", "onMinus", "onOverlimit", "onBlur", "onFocus", "onChange"]);
10
+ const _a = Object.assign(Object.assign({}, defaultProps), props), { children, disabled, min, max, type, readOnly, value, defaultValue, allowEmpty, digits, step, async, select, className, style, formatter, onPlus, onMinus, onOverlimit, onBlur, onFocus, onChange } = _a, restProps = __rest(_a, ["children", "disabled", "min", "max", "type", "readOnly", "value", "defaultValue", "allowEmpty", "digits", "step", "async", "select", "className", "style", "formatter", "onPlus", "onMinus", "onOverlimit", "onBlur", "onFocus", "onChange"]);
11
11
  const classes = classNames(classPrefix, className, {
12
12
  [`${classPrefix}-disabled`]: disabled
13
13
  });
@@ -15,10 +15,10 @@ const InputNumber = (props) => {
15
15
  const inputRef = useRef(null);
16
16
  useEffect(() => {
17
17
  var _a2, _b;
18
- if (focused) {
18
+ if (select && focused) {
19
19
  (_b = (_a2 = inputRef.current) === null || _a2 === void 0 ? void 0 : _a2.select) === null || _b === void 0 ? void 0 : _b.call(_a2);
20
20
  }
21
- }, [focused]);
21
+ }, [select, focused]);
22
22
  const [shadowValue, setShadowValue] = usePropsValue({
23
23
  value: typeof value === "string" ? parseFloat(value) : value,
24
24
  defaultValue: typeof defaultValue === "string" ? parseFloat(defaultValue) : defaultValue,
@@ -23,18 +23,18 @@ import { S as S6 } from "./subsidenavbar.taro-CSU3DhNq.js";
23
23
  import { T } from "./tabbar.taro-BiQDgZQF.js";
24
24
  import { T as T2 } from "./tabbaritem.taro-BiIVucQz.js";
25
25
  import { T as T3 } from "./tabpane.taro-BAe86j3t.js";
26
- import { T as T4 } from "./tabs.taro-D8bDfm4x.js";
27
- import { A } from "./address.taro-Ai6DQF3D.js";
28
- import { C as C5 } from "./calendar.taro-C52T1TFf.js";
29
- import { C as C6 } from "./calendaritem.taro-CHdJXKkc.js";
26
+ import { T as T4 } from "./tabs.taro-CY1VxgF-.js";
27
+ import { A } from "./address.taro-CAikNvuu.js";
28
+ import { C as C5 } from "./calendar.taro-MkErd99P.js";
29
+ import { C as C6 } from "./calendaritem.taro-BGbbuJOS.js";
30
30
  import { C as C7 } from "./calendarcard.taro-CvWyBqnr.js";
31
- import { C as C8 } from "./cascader.taro-CMOCzo0m.js";
31
+ import { C as C8 } from "./cascader.taro-DEApf0aF.js";
32
32
  import { C as C9, a as a2 } from "./checkbox.taro-CgqJyhrh.js";
33
33
  import { D as D2 } from "./datepicker.taro-DibmSueg.js";
34
34
  import { default as default2 } from "./Form.js";
35
35
  import { F as F2 } from "./formitem.taro-CEWRz5EJ.js";
36
36
  import { I as I2 } from "./input.taro-CA9ZpM9a.js";
37
- import { I as I3 } from "./inputnumber.taro-DPRZtV42.js";
37
+ import { I as I3 } from "./inputnumber.taro-CZourWz-.js";
38
38
  import { M } from "./menu.taro-BmjnA_YM.js";
39
39
  import { M as M2 } from "./menuitem.taro-DCqPC4Nu.js";
40
40
  import { N as N2 } from "./numberkeyboard.taro-CIlStObb.js";
@@ -118,10 +118,7 @@ const Tabs = (props) => {
118
118
  to = top - (navRectRef.current.height - titleRect.height) / 2;
119
119
  } else {
120
120
  const left = titleRects.slice(0, index).reduce((prev, curr) => prev + curr.width, 0);
121
- to = left - (navRectRef.current.width - titleRect.width) / 2;
122
- if (to < 0)
123
- return;
124
- to = rtl ? -to : to;
121
+ to = rtl ? -left : left;
125
122
  }
126
123
  nextTick(() => {
127
124
  scrollWithAnimation.current = true;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.6.22 Sat Oct 12 2024 15:01:55 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:05:04 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-taro v2.6.22 Sat Oct 12 2024 15:01:55 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:05:04 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-taro v2.6.22 Sat Oct 12 2024 15:01:55 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:05:04 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-taro v2.6.22 Sat Oct 12 2024 15:01:55 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:05:04 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-taro v2.6.22 Sat Oct 12 2024 15:01:55 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:05:04 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-taro v2.6.22 Sat Oct 12 2024 15:01:55 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:05:04 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-taro v2.6.22 Sat Oct 12 2024 15:01:55 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:05:04 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-taro v2.6.22 Sat Oct 12 2024 15:01:29 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:04:37 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -5358,9 +5358,7 @@ const Tabs = (props) => {
5358
5358
  to = top - (navRectRef.current.height - titleRect.height) / 2;
5359
5359
  } else {
5360
5360
  const left2 = titleRects.slice(0, index).reduce((prev, curr) => prev + curr.width, 0);
5361
- to = left2 - (navRectRef.current.width - titleRect.width) / 2;
5362
- if (to < 0) return;
5363
- to = rtl ? -to : to;
5361
+ to = rtl ? -left2 : left2;
5364
5362
  }
5365
5363
  nextTick(() => {
5366
5364
  scrollWithAnimation.current = true;
@@ -6500,6 +6498,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
6500
6498
  renderDay,
6501
6499
  renderDayTop,
6502
6500
  renderDayBottom,
6501
+ renderBottomButton,
6503
6502
  value,
6504
6503
  onConfirm,
6505
6504
  onUpdate,
@@ -7050,7 +7049,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
7050
7049
  );
7051
7050
  };
7052
7051
  const renderFooter = () => {
7053
- return /* @__PURE__ */ React__default.createElement("div", { className: "nut-calendar-footer" }, children, /* @__PURE__ */ React__default.createElement("div", { className: "calendar-confirm-btn", onClick: confirm }, confirmText || locale.confirm));
7052
+ return /* @__PURE__ */ React__default.createElement("div", { className: "nut-calendar-footer" }, children, /* @__PURE__ */ React__default.createElement("div", { onClick: confirm }, renderBottomButton ? renderBottomButton() : /* @__PURE__ */ React__default.createElement("div", { className: "calendar-confirm-btn" }, confirmText || locale.confirm)));
7054
7053
  };
7055
7054
  return /* @__PURE__ */ React__default.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : "");
7056
7055
  });
@@ -7109,8 +7108,10 @@ const Calendar = React__default.forwardRef((props, ref) => {
7109
7108
  showSubTitle,
7110
7109
  scrollAnimation,
7111
7110
  firstDayOfWeek,
7111
+ closeIcon,
7112
7112
  disableDate,
7113
7113
  renderHeaderButtons,
7114
+ renderBottomButton,
7114
7115
  renderDay,
7115
7116
  renderDayTop,
7116
7117
  renderDayBottom,
@@ -7168,6 +7169,7 @@ const Calendar = React__default.forwardRef((props, ref) => {
7168
7169
  firstDayOfWeek,
7169
7170
  disableDate,
7170
7171
  renderHeaderButtons,
7172
+ renderBottomButton,
7171
7173
  renderDay,
7172
7174
  renderDayTop,
7173
7175
  renderDayBottom,
@@ -7188,7 +7190,8 @@ const Calendar = React__default.forwardRef((props, ref) => {
7188
7190
  destroyOnClose: true,
7189
7191
  onOverlayClick: closePopup,
7190
7192
  onCloseIconClick: closePopup,
7191
- style: { height: "83%" }
7193
+ style: { height: "83%" },
7194
+ closeIcon
7192
7195
  },
7193
7196
  renderItem()
7194
7197
  ) : renderItem());
@@ -10502,7 +10505,8 @@ const defaultProps$V = {
10502
10505
  type: "digit",
10503
10506
  step: 1,
10504
10507
  digits: 0,
10505
- async: false
10508
+ async: false,
10509
+ select: true
10506
10510
  };
10507
10511
  const classPrefix$h = `nut-inputnumber`;
10508
10512
  const InputNumber = (props) => {
@@ -10519,6 +10523,7 @@ const InputNumber = (props) => {
10519
10523
  digits,
10520
10524
  step,
10521
10525
  async,
10526
+ select,
10522
10527
  className,
10523
10528
  style,
10524
10529
  formatter,
@@ -10540,10 +10545,10 @@ const InputNumber = (props) => {
10540
10545
  const inputRef = useRef(null);
10541
10546
  useEffect(() => {
10542
10547
  var _a, _b;
10543
- if (focused) {
10548
+ if (select && focused) {
10544
10549
  (_b = (_a = inputRef.current) == null ? void 0 : _a.select) == null ? void 0 : _b.call(_a);
10545
10550
  }
10546
- }, [focused]);
10551
+ }, [select, focused]);
10547
10552
  const [shadowValue, setShadowValue] = usePropsValue({
10548
10553
  value: typeof value === "string" ? parseFloat(value) : value,
10549
10554
  defaultValue: typeof defaultValue === "string" ? parseFloat(defaultValue) : defaultValue,
@@ -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.22 Sat Oct 12 2024 15:01:29 GMT+0800 (China Standard Time)
5
+ * @nutui/nutui-react-taro v2.7.0 Fri Nov 01 2024 16:04:37 GMT+0800 (China Standard Time)
6
6
  * (c) 2023 @jdf2e.
7
7
  * Released under the MIT License.
8
8
  */
@@ -5374,9 +5374,7 @@
5374
5374
  to = top - (navRectRef.current.height - titleRect.height) / 2;
5375
5375
  } else {
5376
5376
  const left2 = titleRects.slice(0, index).reduce((prev, curr) => prev + curr.width, 0);
5377
- to = left2 - (navRectRef.current.width - titleRect.width) / 2;
5378
- if (to < 0) return;
5379
- to = rtl ? -to : to;
5377
+ to = rtl ? -left2 : left2;
5380
5378
  }
5381
5379
  Taro.nextTick(() => {
5382
5380
  scrollWithAnimation.current = true;
@@ -6516,6 +6514,7 @@
6516
6514
  renderDay,
6517
6515
  renderDayTop,
6518
6516
  renderDayBottom,
6517
+ renderBottomButton,
6519
6518
  value,
6520
6519
  onConfirm,
6521
6520
  onUpdate,
@@ -7066,7 +7065,7 @@
7066
7065
  );
7067
7066
  };
7068
7067
  const renderFooter = () => {
7069
- return /* @__PURE__ */ React.createElement("div", { className: "nut-calendar-footer" }, children, /* @__PURE__ */ React.createElement("div", { className: "calendar-confirm-btn", onClick: confirm }, confirmText || locale.confirm));
7068
+ return /* @__PURE__ */ React.createElement("div", { className: "nut-calendar-footer" }, children, /* @__PURE__ */ React.createElement("div", { onClick: confirm }, renderBottomButton ? renderBottomButton() : /* @__PURE__ */ React.createElement("div", { className: "calendar-confirm-btn" }, confirmText || locale.confirm)));
7070
7069
  };
7071
7070
  return /* @__PURE__ */ React.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : "");
7072
7071
  });
@@ -7125,8 +7124,10 @@
7125
7124
  showSubTitle,
7126
7125
  scrollAnimation,
7127
7126
  firstDayOfWeek,
7127
+ closeIcon,
7128
7128
  disableDate,
7129
7129
  renderHeaderButtons,
7130
+ renderBottomButton,
7130
7131
  renderDay,
7131
7132
  renderDayTop,
7132
7133
  renderDayBottom,
@@ -7184,6 +7185,7 @@
7184
7185
  firstDayOfWeek,
7185
7186
  disableDate,
7186
7187
  renderHeaderButtons,
7188
+ renderBottomButton,
7187
7189
  renderDay,
7188
7190
  renderDayTop,
7189
7191
  renderDayBottom,
@@ -7204,7 +7206,8 @@
7204
7206
  destroyOnClose: true,
7205
7207
  onOverlayClick: closePopup,
7206
7208
  onCloseIconClick: closePopup,
7207
- style: { height: "83%" }
7209
+ style: { height: "83%" },
7210
+ closeIcon
7208
7211
  },
7209
7212
  renderItem()
7210
7213
  ) : renderItem());
@@ -10518,7 +10521,8 @@
10518
10521
  type: "digit",
10519
10522
  step: 1,
10520
10523
  digits: 0,
10521
- async: false
10524
+ async: false,
10525
+ select: true
10522
10526
  };
10523
10527
  const classPrefix$h = `nut-inputnumber`;
10524
10528
  const InputNumber = (props) => {
@@ -10535,6 +10539,7 @@
10535
10539
  digits,
10536
10540
  step,
10537
10541
  async,
10542
+ select,
10538
10543
  className,
10539
10544
  style,
10540
10545
  formatter,
@@ -10556,10 +10561,10 @@
10556
10561
  const inputRef = React.useRef(null);
10557
10562
  React.useEffect(() => {
10558
10563
  var _a, _b;
10559
- if (focused) {
10564
+ if (select && focused) {
10560
10565
  (_b = (_a = inputRef.current) == null ? void 0 : _a.select) == null ? void 0 : _b.call(_a);
10561
10566
  }
10562
- }, [focused]);
10567
+ }, [select, focused]);
10563
10568
  const [shadowValue, setShadowValue] = usePropsValue({
10564
10569
  value: typeof value === "string" ? parseFloat(value) : value,
10565
10570
  defaultValue: typeof defaultValue === "string" ? parseFloat(defaultValue) : defaultValue,
@@ -66,11 +66,11 @@
66
66
  width: 100%;
67
67
  display: flex;
68
68
  justify-content: space-between;
69
+ padding: 15px 15px;
69
70
  }
70
71
 
71
72
  &-item {
72
73
  color: #fff;
73
- padding: 15px;
74
74
  cursor: pointer;
75
75
  display: flex;
76
76
  align-items: center;
@@ -49,13 +49,12 @@
49
49
  }
50
50
 
51
51
  &-vertical {
52
- position: relative;
53
- top: $divider-vertical-top;
54
52
  display: inline-block;
55
53
  width: auto;
56
54
  height: $divider-vertical-height;
57
55
  border-left: 1px solid $divider-border-color;
58
56
  margin: $divider-vertical-margin;
57
+ vertical-align: middle;
59
58
  }
60
59
  }
61
60
 
@@ -23,10 +23,6 @@
23
23
 
24
24
  .nut-overflow-hidden {
25
25
  overflow: hidden !important;
26
-
27
- .taro_page {
28
- overflow: hidden !important;
29
- }
30
26
  }
31
27
 
32
28
  .nut-overlay-slide {