@nutui/nutui-react 1.2.3-beta.0 → 1.2.3-beta.3

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 (89) hide show
  1. package/dist/esm/Address.js +76 -28
  2. package/dist/esm/Badge.js +4 -4
  3. package/dist/esm/Col.js +6 -2
  4. package/dist/esm/Collapse.js +1 -0
  5. package/dist/esm/CollapseItem.js +15 -14
  6. package/dist/esm/Empty.js +2 -2
  7. package/dist/esm/FixedNav.js +3 -3
  8. package/dist/esm/Picker.js +4 -4
  9. package/dist/esm/Popover.js +19 -35
  10. package/dist/esm/Popup.js +54 -30
  11. package/dist/esm/Row.js +9 -3
  12. package/dist/esm/SideNavBar/style/index.js +2 -0
  13. package/dist/esm/SideNavBar.js +65 -0
  14. package/dist/esm/SideNavBarItem/style/index.js +2 -0
  15. package/dist/esm/SideNavBarItem.js +32 -0
  16. package/dist/esm/SubSideNavBar/style/index.js +2 -0
  17. package/dist/esm/SubSideNavBar.js +94 -0
  18. package/dist/esm/Swiper.js +36 -11
  19. package/dist/esm/SwiperItem.js +1 -15
  20. package/dist/esm/Table/style/index.js +2 -0
  21. package/dist/esm/Table.js +154 -0
  22. package/dist/esm/nutui-react.es.js +4 -0
  23. package/dist/esm/offsetContext-0e3d04b3.js +19 -0
  24. package/dist/locales/base.js +1 -1
  25. package/dist/locales/en-US.js +1 -1
  26. package/dist/locales/id-ID.js +1 -1
  27. package/dist/locales/zh-CN.js +1 -1
  28. package/dist/locales/zh-TW.js +1 -1
  29. package/dist/nutui.react.es.js +1235 -679
  30. package/dist/nutui.react.umd.js +15 -15
  31. package/dist/packages/address/address.scss +9 -2
  32. package/dist/packages/sidenavbar/sidenavbar.scss +69 -0
  33. package/dist/packages/sidenavbaritem/sidenavbaritem.scss +8 -0
  34. package/dist/packages/subsidenavbar/subsidenavbar.scss +23 -0
  35. package/dist/packages/swiper/swiper.scss +3 -0
  36. package/dist/packages/table/table.scss +81 -0
  37. package/dist/style.css +1 -1
  38. package/dist/style.es.js +1 -1
  39. package/dist/styles/themes/default.scss +4 -0
  40. package/dist/styles/variables.scss +12 -3
  41. package/dist/types/address/__test__/address.spec.d.ts +1 -0
  42. package/dist/types/address/address.d.ts +4 -27
  43. package/dist/types/address/customRender.d.ts +3 -7
  44. package/dist/types/address/existRender.d.ts +1 -1
  45. package/dist/types/address/type.d.ts +40 -0
  46. package/dist/types/badge/badge.d.ts +2 -1
  47. package/dist/types/card/card.d.ts +4 -4
  48. package/dist/types/cellgroup/cellgroup.d.ts +1 -0
  49. package/dist/types/col/col.d.ts +4 -1
  50. package/dist/types/collapse/collapse.d.ts +2 -1
  51. package/dist/types/fixednav/__tests__/fixednav.spec.d.ts +1 -0
  52. package/dist/types/fixednav/fixednav.d.ts +5 -5
  53. package/dist/types/input/input.d.ts +3 -3
  54. package/dist/types/layout/__tests__/layout.spec.d.ts +1 -0
  55. package/dist/types/navbar/navbar.d.ts +1 -0
  56. package/dist/types/nutui.react.d.ts +5 -1
  57. package/dist/types/picker/__tests__/picker.spec.d.ts +1 -0
  58. package/dist/types/popover/Trigger.d.ts +2 -4
  59. package/dist/types/popover/popover.d.ts +1 -0
  60. package/dist/types/popup/__tests__/popup.spec.d.ts +1 -0
  61. package/dist/types/popup/popup.d.ts +2 -0
  62. package/dist/types/row/row.d.ts +4 -1
  63. package/dist/types/sidenavbar/__test__/sidenavbar.spec.d.ts +1 -0
  64. package/dist/types/sidenavbar/demo.d.ts +3 -0
  65. package/dist/types/sidenavbar/index.d.ts +2 -0
  66. package/dist/types/sidenavbar/offsetContext.d.ts +2 -0
  67. package/dist/types/sidenavbar/sidenavbar.d.ts +3 -0
  68. package/dist/types/sidenavbar/type.d.ts +34 -0
  69. package/dist/types/sidenavbar/utils.d.ts +3 -0
  70. package/dist/types/sidenavbaritem/__test__/sidenavbaritem.spec.d.ts +1 -0
  71. package/dist/types/sidenavbaritem/index.d.ts +2 -0
  72. package/dist/types/sidenavbaritem/sidenavbaritem.d.ts +3 -0
  73. package/dist/types/skeleton/skeleton.d.ts +1 -0
  74. package/dist/types/subsidenavbar/__test__/subsidenavbar.spec.d.ts +1 -0
  75. package/dist/types/subsidenavbar/index.d.ts +2 -0
  76. package/dist/types/subsidenavbar/subsidenavbar.d.ts +3 -0
  77. package/dist/types/swiper/__tests__/swiper.spec.d.ts +1 -0
  78. package/dist/types/swiper/swiper.d.ts +1 -0
  79. package/dist/types/tabbar/tabbar.d.ts +1 -0
  80. package/dist/types/table/__test__/table.spec.d.ts +1 -0
  81. package/dist/types/table/demo.d.ts +3 -0
  82. package/dist/types/table/index.d.ts +2 -0
  83. package/dist/types/table/table.d.ts +3 -0
  84. package/dist/types/table/types.d.ts +19 -0
  85. package/dist/types/tabpane/tabpane.d.ts +2 -1
  86. package/dist/types/tabs/tabs.d.ts +1 -0
  87. package/dist/types/tag/tag.d.ts +2 -1
  88. package/dist/types/timeselect/__test__/timeselect.spec.d.ts +1 -0
  89. package/package.json +14 -7
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.2.2 Thu Aug 11 2022 14:28:42 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.2.3-beta.3 Wed Aug 17 2022 10:06:12 GMT+0800 (China Standard Time)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import * as React from "react";
7
- import React__default, { useCallback, useState, useEffect, Component, useRef, createContext, useContext as useContext$1, useImperativeHandle, useLayoutEffect as useLayoutEffect$1, forwardRef, useMemo, memo } from "react";
7
+ import React__default, { useCallback, useState, useEffect, Component, useRef, createContext, useContext as useContext$1, useImperativeHandle, useLayoutEffect, forwardRef, useMemo, memo } from "react";
8
8
  import * as ReactDOM from "react-dom";
9
- import ReactDOM__default, { unstable_batchedUpdates } from "react-dom";
9
+ import ReactDOM__default, { createPortal, unstable_batchedUpdates } from "react-dom";
10
10
  var classname = { exports: {} };
11
11
  var classname_production_min = {};
12
12
  function r$1(r2) {
@@ -45,7 +45,7 @@ classname_production_min.cn = e$1, classname_production_min.withNaming = r$1;
45
45
  classname.exports = classname_production_min;
46
46
  }
47
47
  const cn = classname.exports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
48
- const defaultProps$17 = {
48
+ const defaultProps$1a = {
49
49
  name: "",
50
50
  size: "",
51
51
  classPrefix: "nutui-icon",
@@ -73,13 +73,13 @@ const Icon = (props) => {
73
73
  click,
74
74
  ...rest
75
75
  } = {
76
- ...defaultProps$17,
76
+ ...defaultProps$1a,
77
77
  ...props
78
78
  };
79
79
  const isImage = name ? name.indexOf("/") !== -1 : false;
80
80
  const type = isImage ? "img" : tag;
81
81
  const b2 = cn("icon");
82
- const handleClick = (e2) => {
82
+ const handleClick2 = (e2) => {
83
83
  if (props.click) {
84
84
  props.click(e2);
85
85
  }
@@ -89,25 +89,29 @@ const Icon = (props) => {
89
89
  return { src: name };
90
90
  return {};
91
91
  };
92
- return React__default.createElement(type, {
93
- className: isImage ? `${className || ""} ${b2("img")}` : `${className || ""} ${fontClassName} ${b2(null, [
94
- classPrefix
95
- ])} nut-icon-${name} `,
96
- style: {
97
- color,
98
- fontSize: pxCheck$2(size),
99
- width: pxCheck$2(size),
100
- height: pxCheck$2(size),
101
- ...style
92
+ return React__default.createElement(
93
+ type,
94
+ {
95
+ className: isImage ? `${className || ""} ${b2("img")}` : `${className || ""} ${fontClassName} ${b2(null, [
96
+ classPrefix
97
+ ])} nut-icon-${name} `,
98
+ style: {
99
+ color,
100
+ fontSize: pxCheck$2(size),
101
+ width: pxCheck$2(size),
102
+ height: pxCheck$2(size),
103
+ ...style
104
+ },
105
+ ...rest,
106
+ onClick: handleClick2,
107
+ ...hasSrc()
102
108
  },
103
- ...rest,
104
- onClick: handleClick,
105
- ...hasSrc()
106
- }, children);
109
+ children
110
+ );
107
111
  };
108
- Icon.defaultProps = defaultProps$17;
112
+ Icon.defaultProps = defaultProps$1a;
109
113
  Icon.displayName = "NutIcon";
110
- const defaultProps$16 = {
114
+ const defaultProps$19 = {
111
115
  className: "",
112
116
  color: "",
113
117
  shape: "round",
@@ -140,7 +144,7 @@ const Button = (props) => {
140
144
  style,
141
145
  ...rest
142
146
  } = {
143
- ...defaultProps$16,
147
+ ...defaultProps$19,
144
148
  ...props
145
149
  };
146
150
  const getStyle = useCallback(() => {
@@ -194,7 +198,7 @@ const Button = (props) => {
194
198
  classes,
195
199
  getStyle
196
200
  ]);
197
- const handleClick = (e2) => {
201
+ const handleClick2 = (e2) => {
198
202
  if (!loading && !disabled && onClick) {
199
203
  onClick(e2);
200
204
  }
@@ -203,7 +207,7 @@ const Button = (props) => {
203
207
  className: `${btnName} ${className}`,
204
208
  style: { ...btnStyle, ...style },
205
209
  ...rest,
206
- onClick: (e2) => handleClick(e2)
210
+ onClick: (e2) => handleClick2(e2)
207
211
  }, /* @__PURE__ */ React__default.createElement("div", {
208
212
  className: "nut-button__warp",
209
213
  style: getStyle()
@@ -213,7 +217,7 @@ const Button = (props) => {
213
217
  name: icon
214
218
  }) : "", children));
215
219
  };
216
- Button.defaultProps = defaultProps$16;
220
+ Button.defaultProps = defaultProps$19;
217
221
  Button.displayName = "NutButton";
218
222
  function _setPrototypeOf(o, p2) {
219
223
  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p3) {
@@ -241,7 +245,9 @@ var factoryWithThrowingShims = function() {
241
245
  if (secret === ReactPropTypesSecret) {
242
246
  return;
243
247
  }
244
- var err = new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
248
+ var err = new Error(
249
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
250
+ );
245
251
  err.name = "Invariant Violation";
246
252
  throw err;
247
253
  }
@@ -1429,7 +1435,7 @@ var useContext = React__default.useContext;
1429
1435
  function useHistory() {
1430
1436
  return useContext(historyContext);
1431
1437
  }
1432
- const defaultProps$15 = {
1438
+ const defaultProps$18 = {
1433
1439
  title: null,
1434
1440
  subTitle: null,
1435
1441
  desc: "",
@@ -1469,12 +1475,12 @@ const Cell = (props) => {
1469
1475
  linkSlot,
1470
1476
  ...rest
1471
1477
  } = {
1472
- ...defaultProps$15,
1478
+ ...defaultProps$18,
1473
1479
  ...props
1474
1480
  };
1475
1481
  const b2 = cn("cell");
1476
1482
  const history = useHistory();
1477
- const handleClick = (event) => {
1483
+ const handleClick2 = (event) => {
1478
1484
  click(event);
1479
1485
  if (to2 && history) {
1480
1486
  history[replace ? "replace" : "push"](to2);
@@ -1490,8 +1496,11 @@ const Cell = (props) => {
1490
1496
  flex: 1
1491
1497
  };
1492
1498
  return /* @__PURE__ */ React__default.createElement("div", {
1493
- className: `${b2({ clickable: !!(isLink || to2), center, large: size === "large" }, [className])} `,
1494
- onClick: (event) => handleClick(event),
1499
+ className: `${b2(
1500
+ { clickable: !!(isLink || to2), center, large: size === "large" },
1501
+ [className]
1502
+ )} `,
1503
+ onClick: (event) => handleClick2(event),
1495
1504
  style: baseStyle,
1496
1505
  ...rest
1497
1506
  }, children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, icon || iconSlot ? /* @__PURE__ */ React__default.createElement("div", {
@@ -1515,9 +1524,9 @@ const Cell = (props) => {
1515
1524
  className: b2("link")
1516
1525
  }) : linkSlot));
1517
1526
  };
1518
- Cell.defaultProps = defaultProps$15;
1527
+ Cell.defaultProps = defaultProps$18;
1519
1528
  Cell.displayName = "NutCell";
1520
- const defaultProps$14 = {
1529
+ const defaultProps$17 = {
1521
1530
  title: "",
1522
1531
  desc: "",
1523
1532
  titleSlot: null,
@@ -1526,7 +1535,7 @@ const defaultProps$14 = {
1526
1535
  };
1527
1536
  const CellGroup = (props) => {
1528
1537
  const { children, classPrefix, title, desc, titleSlot, descSlot } = {
1529
- ...defaultProps$14,
1538
+ ...defaultProps$17,
1530
1539
  ...props
1531
1540
  };
1532
1541
  const b2 = cn("cell-group");
@@ -1540,7 +1549,7 @@ const CellGroup = (props) => {
1540
1549
  className: b2("wrap")
1541
1550
  }, children));
1542
1551
  };
1543
- CellGroup.defaultProps = defaultProps$14;
1552
+ CellGroup.defaultProps = defaultProps$17;
1544
1553
  CellGroup.displayName = "NutCellGroup";
1545
1554
  var classnames = { exports: {} };
1546
1555
  /*!
@@ -1628,12 +1637,16 @@ const Overlay = (props) => {
1628
1637
  };
1629
1638
  }, []);
1630
1639
  const b2 = cn("overlay");
1631
- const classes = classNames({
1632
- "overlay-fade-leave-active": !renderRef.current && !visible,
1633
- "overlay-fade-enter-active": visible,
1634
- "first-render": renderRef.current && !visible,
1635
- "hidden-render": !visible
1636
- }, overlayClass, b2(""));
1640
+ const classes = classNames(
1641
+ {
1642
+ "overlay-fade-leave-active": !renderRef.current && !visible,
1643
+ "overlay-fade-enter-active": visible,
1644
+ "first-render": renderRef.current && !visible,
1645
+ "hidden-render": !visible
1646
+ },
1647
+ overlayClass,
1648
+ b2("")
1649
+ );
1637
1650
  const styles = {
1638
1651
  zIndex,
1639
1652
  animationDuration: `${props.duration}s`,
@@ -1646,7 +1659,7 @@ const Overlay = (props) => {
1646
1659
  document.body.classList.remove("nut-overflow-hidden");
1647
1660
  }
1648
1661
  };
1649
- const handleClick = (e2) => {
1662
+ const handleClick2 = (e2) => {
1650
1663
  if (closeOnClickOverlay) {
1651
1664
  props.onClick && props.onClick(e2);
1652
1665
  renderRef.current = false;
@@ -1660,7 +1673,7 @@ const Overlay = (props) => {
1660
1673
  className: classes,
1661
1674
  style: styles,
1662
1675
  ...rest,
1663
- onClick: handleClick
1676
+ onClick: handleClick2
1664
1677
  }, children));
1665
1678
  };
1666
1679
  Overlay.defaultProps = defaultOverlayProps;
@@ -1695,6 +1708,9 @@ var config$1 = {
1695
1708
  disabled: false
1696
1709
  };
1697
1710
  var TransitionGroupContext = React__default.createContext(null);
1711
+ var forceReflow = function forceReflow2(node) {
1712
+ return node.scrollTop;
1713
+ };
1698
1714
  var UNMOUNTED = "unmounted";
1699
1715
  var EXITED = "exited";
1700
1716
  var ENTERING = "entering";
@@ -1783,6 +1799,11 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
1783
1799
  if (nextStatus !== null) {
1784
1800
  this.cancelNextCallback();
1785
1801
  if (nextStatus === ENTERING) {
1802
+ if (this.props.unmountOnExit || this.props.mountOnEnter) {
1803
+ var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM__default.findDOMNode(this);
1804
+ if (node)
1805
+ forceReflow(node);
1806
+ }
1786
1807
  this.performEnter(mounting);
1787
1808
  } else {
1788
1809
  this.performExit();
@@ -2040,7 +2061,8 @@ var CSSTransition = /* @__PURE__ */ function(_React$Component) {
2040
2061
  className += " " + doneClassName;
2041
2062
  }
2042
2063
  if (phase === "active") {
2043
- node && node.scrollTop;
2064
+ if (node)
2065
+ forceReflow(node);
2044
2066
  }
2045
2067
  if (className) {
2046
2068
  this.appliedClasses[type][phase] = className;
@@ -2080,7 +2102,7 @@ CSSTransition.defaultProps = {
2080
2102
  };
2081
2103
  CSSTransition.propTypes = {};
2082
2104
  var CSSTransition$1 = CSSTransition;
2083
- const defaultProps$13 = {
2105
+ const defaultProps$16 = {
2084
2106
  position: "center",
2085
2107
  transition: "",
2086
2108
  style: {},
@@ -2089,6 +2111,7 @@ const defaultProps$13 = {
2089
2111
  closeIconPosition: "top-right",
2090
2112
  closeIcon: "close",
2091
2113
  destroyOnClose: true,
2114
+ teleport: null,
2092
2115
  overlay: true,
2093
2116
  round: false,
2094
2117
  onOpen: () => {
@@ -2112,8 +2135,10 @@ const Popup = (props) => {
2112
2135
  const {
2113
2136
  children,
2114
2137
  visible,
2138
+ overlay,
2115
2139
  closeOnClickOverlay,
2116
2140
  overlayStyle,
2141
+ overlayClass,
2117
2142
  zIndex,
2118
2143
  lockScroll,
2119
2144
  duration,
@@ -2127,6 +2152,7 @@ const Popup = (props) => {
2127
2152
  popClass,
2128
2153
  className,
2129
2154
  destroyOnClose,
2155
+ teleport,
2130
2156
  onOpen,
2131
2157
  onClose,
2132
2158
  onClickOverlay,
@@ -2152,12 +2178,15 @@ const Popup = (props) => {
2152
2178
  ...style,
2153
2179
  ...baseStyle
2154
2180
  };
2155
- const classes = classNames({
2156
- round,
2157
- [`popup-${position}`]: true,
2158
- [`${popClass}`]: true,
2159
- [`${className}`]: true
2160
- }, b2(""));
2181
+ const classes = classNames(
2182
+ {
2183
+ round,
2184
+ [`popup-${position}`]: true,
2185
+ [`${popClass}`]: true,
2186
+ [`${className}`]: true
2187
+ },
2188
+ b2("")
2189
+ );
2161
2190
  const closeClasses = classNames({
2162
2191
  "nutui-popup__close-icon": true,
2163
2192
  [`nutui-popup__close-icon--${closeIconPosition}`]: true
@@ -2202,6 +2231,49 @@ const Popup = (props) => {
2202
2231
  const onHandleClosed = (e2) => {
2203
2232
  onClosed && onClosed(e2);
2204
2233
  };
2234
+ const resolveContainer = (getContainer) => {
2235
+ const container = typeof getContainer === "function" ? getContainer() : getContainer;
2236
+ return container || document.body;
2237
+ };
2238
+ const renderToContainer = (getContainer, node) => {
2239
+ if (getContainer) {
2240
+ const container = resolveContainer(getContainer);
2241
+ return createPortal(node, container);
2242
+ }
2243
+ return node;
2244
+ };
2245
+ const renderPop = () => {
2246
+ return /* @__PURE__ */ React__default.createElement(CSSTransition$1, {
2247
+ classNames: transitionName,
2248
+ unmountOnExit: true,
2249
+ timeout: 500,
2250
+ in: innerVisible,
2251
+ onEntered: onHandleOpened,
2252
+ onExited: onHandleClosed
2253
+ }, /* @__PURE__ */ React__default.createElement("div", {
2254
+ style: popStyles,
2255
+ className: classes,
2256
+ onClick: onHandleClick
2257
+ }, showChildren ? children : "", closeable ? /* @__PURE__ */ React__default.createElement("div", {
2258
+ className: closeClasses,
2259
+ onClick: onHandleClickCloseIcon
2260
+ }, /* @__PURE__ */ React__default.createElement(Icon, {
2261
+ name: closeIcon,
2262
+ size: "12px"
2263
+ })) : ""));
2264
+ };
2265
+ const renderNode = () => {
2266
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, overlay ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Overlay, {
2267
+ style: overlayStyles,
2268
+ overlayClass,
2269
+ visible: innerVisible,
2270
+ closeOnClickOverlay,
2271
+ zIndex,
2272
+ lockScroll,
2273
+ duration,
2274
+ onClick: onHandleClickOverlay
2275
+ }), renderPop()) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderPop()));
2276
+ };
2205
2277
  useEffect(() => {
2206
2278
  visible && open();
2207
2279
  !visible && close();
@@ -2209,34 +2281,9 @@ const Popup = (props) => {
2209
2281
  useEffect(() => {
2210
2282
  setTransitionName(transition || `popup-slide-${position}`);
2211
2283
  }, [position]);
2212
- return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Overlay, {
2213
- style: overlayStyles,
2214
- visible: innerVisible,
2215
- closeOnClickOverlay,
2216
- zIndex,
2217
- lockScroll,
2218
- duration,
2219
- onClick: onHandleClickOverlay
2220
- }), /* @__PURE__ */ React__default.createElement(CSSTransition$1, {
2221
- classNames: transitionName,
2222
- unmountOnExit: true,
2223
- timeout: 500,
2224
- in: innerVisible,
2225
- onEntered: onHandleOpened,
2226
- onExited: onHandleClosed
2227
- }, /* @__PURE__ */ React__default.createElement("div", {
2228
- style: popStyles,
2229
- className: classes,
2230
- onClick: onHandleClick
2231
- }, showChildren ? children : "", closeable ? /* @__PURE__ */ React__default.createElement("div", {
2232
- className: closeClasses,
2233
- onClick: onHandleClickCloseIcon
2234
- }, /* @__PURE__ */ React__default.createElement(Icon, {
2235
- name: closeIcon,
2236
- size: "12px"
2237
- })) : "")));
2284
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderToContainer(teleport, renderNode()));
2238
2285
  };
2239
- Popup.defaultProps = defaultProps$13;
2286
+ Popup.defaultProps = defaultProps$16;
2240
2287
  Popup.displayName = "NutPopup";
2241
2288
  const zhCN = {
2242
2289
  save: "\u4FDD\u5B58",
@@ -2341,7 +2388,7 @@ const zhCN = {
2341
2388
  title6: "\u6570\u636E\u6539\u53D8\u76D1\u542C"
2342
2389
  }
2343
2390
  };
2344
- const defaultProps$12 = {
2391
+ const defaultProps$15 = {
2345
2392
  locale: zhCN
2346
2393
  };
2347
2394
  const defaultConfigRef = {
@@ -2358,7 +2405,7 @@ const useConfig = () => {
2358
2405
  };
2359
2406
  const ConfigContext = createContext(null);
2360
2407
  const ConfigProvider = (props) => {
2361
- const { children, ...config2 } = { ...defaultProps$12, ...props };
2408
+ const { children, ...config2 } = { ...defaultProps$15, ...props };
2362
2409
  const parentConfig = useConfig();
2363
2410
  return /* @__PURE__ */ React__default.createElement(ConfigContext.Provider, {
2364
2411
  value: {
@@ -2367,25 +2414,25 @@ const ConfigProvider = (props) => {
2367
2414
  }
2368
2415
  }, children);
2369
2416
  };
2370
- ConfigProvider.defaultProps = defaultProps$12;
2417
+ ConfigProvider.defaultProps = defaultProps$15;
2371
2418
  ConfigProvider.displayName = "NutConfigProvider";
2372
- const defaultProps$11 = {};
2419
+ const defaultProps$14 = {};
2373
2420
  const Layout = (props) => {
2374
- ({ ...defaultProps$11, ...props });
2421
+ ({ ...defaultProps$14, ...props });
2375
2422
  return /* @__PURE__ */ React__default.createElement("div", {
2376
2423
  className: "nut-layout"
2377
2424
  }, "Layout");
2378
2425
  };
2379
- Layout.defaultProps = defaultProps$11;
2426
+ Layout.defaultProps = defaultProps$14;
2380
2427
  Layout.displayName = "NutLayout";
2381
2428
  const DataContext$2 = createContext({});
2382
- const defaultProps$10 = {
2429
+ const defaultProps$13 = {
2383
2430
  span: "24",
2384
2431
  offset: "0",
2385
2432
  gutter: "0"
2386
2433
  };
2387
2434
  const Col = (props) => {
2388
- const { span, offset, children } = { ...defaultProps$10, ...props };
2435
+ const { span, offset, children, onClick } = { ...defaultProps$13, ...props };
2389
2436
  const [colName, setColName] = useState("");
2390
2437
  const [colStyle, setColStyle] = useState({});
2391
2438
  const { gutter } = useContext$1(DataContext$2);
@@ -2405,12 +2452,15 @@ const Col = (props) => {
2405
2452
  }, [span, offset, gutter]);
2406
2453
  return /* @__PURE__ */ React__default.createElement("div", {
2407
2454
  className: `${colName}`,
2408
- style: { ...colStyle }
2455
+ style: { ...colStyle },
2456
+ onClick: (e2) => {
2457
+ onClick && onClick(e2, "col");
2458
+ }
2409
2459
  }, children);
2410
2460
  };
2411
- Col.defaultProps = defaultProps$10;
2461
+ Col.defaultProps = defaultProps$13;
2412
2462
  Col.displayName = "NutCol";
2413
- const defaultProps$$ = {
2463
+ const defaultProps$12 = {
2414
2464
  type: "",
2415
2465
  justify: "start",
2416
2466
  align: "flex-start",
@@ -2418,13 +2468,15 @@ const defaultProps$$ = {
2418
2468
  gutter: "0"
2419
2469
  };
2420
2470
  const Row = (props) => {
2421
- const { children, type, justify, align, wrap, gutter } = {
2422
- ...defaultProps$$,
2471
+ const { children, type, justify, align, wrap, gutter, onClick } = {
2472
+ ...defaultProps$12,
2423
2473
  ...props
2424
2474
  };
2425
2475
  const prefixCls = "nut-row";
2426
2476
  const getClass = (prefix2, type2) => {
2427
- return prefix2 ? type2 ? `nut-row-${prefix2}-${type2}` : "" : `nut-row-${type2}`;
2477
+ const classType = type2 ? `nut-row-${prefix2}-${type2}` : "";
2478
+ const className = prefix2 ? classType : `nut-row-${type2}`;
2479
+ return className;
2428
2480
  };
2429
2481
  const getClasses = () => {
2430
2482
  return `
@@ -2440,13 +2492,20 @@ const Row = (props) => {
2440
2492
  };
2441
2493
  return /* @__PURE__ */ React__default.createElement(DataContext$2.Provider, {
2442
2494
  value: parentRow
2443
- }, React__default.createElement("div", {
2444
- className: getClasses()
2445
- }, children));
2495
+ }, React__default.createElement(
2496
+ "div",
2497
+ {
2498
+ className: getClasses(),
2499
+ onClick: (e2) => {
2500
+ onClick && onClick(e2, "row");
2501
+ }
2502
+ },
2503
+ children
2504
+ ));
2446
2505
  };
2447
- Row.defaultProps = defaultProps$$;
2506
+ Row.defaultProps = defaultProps$12;
2448
2507
  Row.displayName = "NutRow";
2449
- const defaultProps$_ = {
2508
+ const defaultProps$11 = {
2450
2509
  contentPosition: "center",
2451
2510
  dashed: false,
2452
2511
  hairline: true,
@@ -2463,7 +2522,7 @@ const Divider = (props) => {
2463
2522
  direction,
2464
2523
  ...rest
2465
2524
  } = {
2466
- ...defaultProps$_,
2525
+ ...defaultProps$11,
2467
2526
  ...props
2468
2527
  };
2469
2528
  const dividerBem = cn("divider");
@@ -2484,9 +2543,9 @@ const Divider = (props) => {
2484
2543
  ...rest
2485
2544
  }, children);
2486
2545
  };
2487
- Divider.defaultProps = defaultProps$_;
2546
+ Divider.defaultProps = defaultProps$11;
2488
2547
  Divider.displayName = "NutDivider";
2489
- const defaultProps$Z = {
2548
+ const defaultProps$10 = {
2490
2549
  title: "",
2491
2550
  desc: "",
2492
2551
  leftShow: true,
@@ -2519,7 +2578,7 @@ const NavBar = (props) => {
2519
2578
  onClickBack,
2520
2579
  onClickRight
2521
2580
  } = {
2522
- ...defaultProps$Z,
2581
+ ...defaultProps$10,
2523
2582
  ...props
2524
2583
  };
2525
2584
  const b2 = cn("navbar");
@@ -2584,12 +2643,12 @@ const NavBar = (props) => {
2584
2643
  className: `${b2("")}--placeholder`
2585
2644
  }, renderWrapper()) : renderWrapper());
2586
2645
  };
2587
- NavBar.defaultProps = defaultProps$Z;
2646
+ NavBar.defaultProps = defaultProps$10;
2588
2647
  NavBar.displayName = "NutNavBar";
2589
- const defaultProps$Y = {
2648
+ const defaultProps$$ = {
2590
2649
  fixednavClass: "nut-fixednav",
2591
- activeText: "\u6536\u8D77\u5BFC\u822A",
2592
- unActiveText: "\u5FEB\u901F\u5BFC\u822A",
2650
+ activeText: "",
2651
+ unActiveText: "",
2593
2652
  type: "right",
2594
2653
  position: {
2595
2654
  top: "auto",
@@ -2612,11 +2671,16 @@ const FixedNav = (props) => {
2612
2671
  slotList,
2613
2672
  slotBtn,
2614
2673
  ...rest
2615
- } = { ...defaultProps$Y, ...props };
2674
+ } = { ...defaultProps$$, ...props };
2616
2675
  const b2 = cn("fixednav");
2617
- const classes = classNames({
2618
- active: visible
2619
- }, type, fixednavClass, b2(""));
2676
+ const classes = classNames(
2677
+ {
2678
+ active: visible
2679
+ },
2680
+ type,
2681
+ fixednavClass,
2682
+ b2("")
2683
+ );
2620
2684
  const onSelectCb = (event, item) => {
2621
2685
  onSelected(item, event);
2622
2686
  };
@@ -2656,11 +2720,11 @@ const FixedNav = (props) => {
2656
2720
  color: "#fff"
2657
2721
  }), /* @__PURE__ */ React__default.createElement("div", {
2658
2722
  className: "text"
2659
- }, visible ? locale.fixednav.activeText || activeText : locale.fixednav.unActiveText || unActiveText))));
2723
+ }, visible ? activeText || locale.fixednav.activeText : unActiveText || locale.fixednav.unActiveText))));
2660
2724
  };
2661
- FixedNav.defaultProps = defaultProps$Y;
2725
+ FixedNav.defaultProps = defaultProps$$;
2662
2726
  FixedNav.displayName = "NutFixedNav";
2663
- const defaultProps$X = {
2727
+ const defaultProps$_ = {
2664
2728
  visible: 0,
2665
2729
  bottom: false,
2666
2730
  size: 20,
@@ -2685,12 +2749,12 @@ const Tabbar = (props) => {
2685
2749
  style,
2686
2750
  tabSwitch
2687
2751
  } = {
2688
- ...defaultProps$X,
2752
+ ...defaultProps$_,
2689
2753
  ...props
2690
2754
  };
2691
2755
  const b2 = cn("tabbar");
2692
2756
  const [selectIndex, setSelectIndex] = useState(visible);
2693
- const handleClick = (idx) => {
2757
+ const handleClick2 = (idx) => {
2694
2758
  setSelectIndex(idx);
2695
2759
  };
2696
2760
  return /* @__PURE__ */ React__default.createElement("div", {
@@ -2713,16 +2777,16 @@ const Tabbar = (props) => {
2713
2777
  activeColor,
2714
2778
  size,
2715
2779
  handleClick: () => {
2716
- handleClick(idx);
2780
+ handleClick2(idx);
2717
2781
  tabSwitch(child, idx);
2718
2782
  }
2719
2783
  };
2720
2784
  return React__default.cloneElement(child, childProps);
2721
2785
  }));
2722
2786
  };
2723
- Tabbar.defaultProps = defaultProps$X;
2787
+ Tabbar.defaultProps = defaultProps$_;
2724
2788
  Tabbar.displayName = "NutTabbar";
2725
- const defaultProps$W = {
2789
+ const defaultProps$Z = {
2726
2790
  dot: false,
2727
2791
  size: "",
2728
2792
  classPrefix: "nutui-iconfont",
@@ -2752,9 +2816,9 @@ const TabbarItem = (props) => {
2752
2816
  activeColor,
2753
2817
  unactiveColor,
2754
2818
  index: index2,
2755
- handleClick
2819
+ handleClick: handleClick2
2756
2820
  } = {
2757
- ...defaultProps$W,
2821
+ ...defaultProps$Z,
2758
2822
  ...props
2759
2823
  };
2760
2824
  const b2 = cn("tabbar-item");
@@ -2775,7 +2839,7 @@ const TabbarItem = (props) => {
2775
2839
  color: active ? activeColor : unactiveColor
2776
2840
  },
2777
2841
  onClick: () => {
2778
- handleClick(index2);
2842
+ handleClick2(index2);
2779
2843
  }
2780
2844
  }, /* @__PURE__ */ React__default.createElement("div", {
2781
2845
  className: `${bIcon()}`
@@ -2796,7 +2860,7 @@ const TabbarItem = (props) => {
2796
2860
  }, tabTitle)));
2797
2861
  };
2798
2862
  const elevatorContext = createContext({});
2799
- const defaultProps$V = {
2863
+ const defaultProps$Y = {
2800
2864
  height: "200px",
2801
2865
  acceptKey: "title",
2802
2866
  indexList: [],
@@ -2819,7 +2883,7 @@ const Elevator = (props) => {
2819
2883
  children,
2820
2884
  ...rest
2821
2885
  } = {
2822
- ...defaultProps$V,
2886
+ ...defaultProps$Y,
2823
2887
  ...props
2824
2888
  };
2825
2889
  const b2 = cn("elevator");
@@ -2837,7 +2901,9 @@ const Elevator = (props) => {
2837
2901
  y2: 0
2838
2902
  });
2839
2903
  const [scrollY, setScrollY] = useState(0);
2840
- const [currentData, setCurrentData] = useState({});
2904
+ const [currentData, setCurrentData] = useState(
2905
+ {}
2906
+ );
2841
2907
  const [currentKey, setCurrentKey] = useState("");
2842
2908
  const [currentIndex, setCurrentIndex] = useState(0);
2843
2909
  const [codeIndex, setCodeIndex] = useState(0);
@@ -3009,9 +3075,9 @@ const Elevator = (props) => {
3009
3075
  }, item[acceptKey]);
3010
3076
  }))));
3011
3077
  };
3012
- Elevator.defaultProps = defaultProps$V;
3078
+ Elevator.defaultProps = defaultProps$Y;
3013
3079
  Elevator.displayName = "NutElevator";
3014
- const defaultProps$U = {
3080
+ const defaultProps$X = {
3015
3081
  defaultValue: 1,
3016
3082
  mode: "multi",
3017
3083
  prevText: "",
@@ -3028,7 +3094,7 @@ const defaultProps$U = {
3028
3094
  };
3029
3095
  const Pagination = (props) => {
3030
3096
  const { locale } = useConfig();
3031
- ({ ...defaultProps$U, ...props });
3097
+ ({ ...defaultProps$X, ...props });
3032
3098
  const {
3033
3099
  modelValue,
3034
3100
  mode,
@@ -3145,7 +3211,7 @@ const Pagination = (props) => {
3145
3211
  onClick: (e2) => selectPage(Number(currentPage) + 1, true)
3146
3212
  }, nextText || locale.pagination.next));
3147
3213
  };
3148
- Pagination.defaultProps = defaultProps$U;
3214
+ Pagination.defaultProps = defaultProps$X;
3149
3215
  Pagination.displayName = "NutPagination";
3150
3216
  class Title {
3151
3217
  constructor() {
@@ -3155,7 +3221,7 @@ class Title {
3155
3221
  this.index = 0;
3156
3222
  }
3157
3223
  }
3158
- const defaultProps$T = {
3224
+ const defaultProps$W = {
3159
3225
  value: 0,
3160
3226
  color: "",
3161
3227
  background: "",
@@ -3190,7 +3256,7 @@ const Tabs = (props) => {
3190
3256
  className,
3191
3257
  autoHeight,
3192
3258
  ...rest
3193
- } = { ...defaultProps$T, ...props };
3259
+ } = { ...defaultProps$W, ...props };
3194
3260
  const [currentItem, setCurrentItem] = useState({ index: 0 });
3195
3261
  const titles = useRef([]);
3196
3262
  useEffect(() => {
@@ -3217,11 +3283,14 @@ const Tabs = (props) => {
3217
3283
  }, [children]);
3218
3284
  const b2 = cn("tabs");
3219
3285
  const classes = classNames(direction, b2(""), className);
3220
- const classesTitle = classNames({
3221
- [type]: type,
3222
- scrollable: titleScroll,
3223
- [size]: size
3224
- }, `${b2("")}__titles`);
3286
+ const classesTitle = classNames(
3287
+ {
3288
+ [type]: type,
3289
+ scrollable: titleScroll,
3290
+ [size]: size
3291
+ },
3292
+ `${b2("")}__titles`
3293
+ );
3225
3294
  const titleStyle = {
3226
3295
  marginLeft: pxCheck$1(titleGutter),
3227
3296
  marginRight: pxCheck$1(titleGutter)
@@ -3253,10 +3322,13 @@ const Tabs = (props) => {
3253
3322
  return /* @__PURE__ */ React__default.createElement("div", {
3254
3323
  style: titleStyle,
3255
3324
  onClick: (e2) => tabChange(item),
3256
- className: classNames({
3257
- active: String(item.paneKey) === String(value),
3258
- disabled: item.disabled
3259
- }, `${b2("")}__titles-item`),
3325
+ className: classNames(
3326
+ {
3327
+ active: String(item.paneKey) === String(value),
3328
+ disabled: item.disabled
3329
+ },
3330
+ `${b2("")}__titles-item`
3331
+ ),
3260
3332
  key: item.paneKey
3261
3333
  }, type === "line" && /* @__PURE__ */ React__default.createElement("div", {
3262
3334
  className: `${b2("")}__titles-item__line`,
@@ -3268,9 +3340,12 @@ const Tabs = (props) => {
3268
3340
  color,
3269
3341
  name: "joy-smile"
3270
3342
  })), /* @__PURE__ */ React__default.createElement("div", {
3271
- className: classNames({
3272
- ellipsis: ellipsis && !titleScroll && direction === "horizontal"
3273
- }, `${b2("")}__titles-item__text`)
3343
+ className: classNames(
3344
+ {
3345
+ ellipsis: ellipsis && !titleScroll && direction === "horizontal"
3346
+ },
3347
+ `${b2("")}__titles-item__text`
3348
+ )
3274
3349
  }, item.title));
3275
3350
  })), /* @__PURE__ */ React__default.createElement("div", {
3276
3351
  className: `${b2("")}__content`,
@@ -3293,9 +3368,9 @@ const Tabs = (props) => {
3293
3368
  return React__default.cloneElement(child, childProps);
3294
3369
  })));
3295
3370
  };
3296
- Tabs.defaultProps = defaultProps$T;
3371
+ Tabs.defaultProps = defaultProps$W;
3297
3372
  Tabs.displayName = "NutTabs";
3298
- const defaultProps$S = {
3373
+ const defaultProps$V = {
3299
3374
  title: "",
3300
3375
  paneKey: "",
3301
3376
  activeKey: "",
@@ -3303,18 +3378,22 @@ const defaultProps$S = {
3303
3378
  };
3304
3379
  const TabPane = (props) => {
3305
3380
  const { children, paneKey, activeKey, autoHeightClassName } = {
3306
- ...defaultProps$S,
3381
+ ...defaultProps$V,
3307
3382
  ...props
3308
3383
  };
3309
3384
  const b2 = cn("tabpane");
3310
- const classes = classNames({
3311
- active: paneKey === activeKey
3312
- }, b2(""), autoHeightClassName);
3385
+ const classes = classNames(
3386
+ {
3387
+ active: paneKey === activeKey
3388
+ },
3389
+ b2(""),
3390
+ autoHeightClassName
3391
+ );
3313
3392
  return /* @__PURE__ */ React__default.createElement("div", {
3314
3393
  className: classes
3315
3394
  }, children);
3316
3395
  };
3317
- const defaultProps$R = {
3396
+ const defaultProps$U = {
3318
3397
  size: 3,
3319
3398
  current: 1,
3320
3399
  block: false,
@@ -3334,25 +3413,30 @@ const Indicator = (props) => {
3334
3413
  vertical,
3335
3414
  ...rest
3336
3415
  } = {
3337
- ...defaultProps$R,
3416
+ ...defaultProps$U,
3338
3417
  ...props
3339
3418
  };
3340
3419
  const b2 = cn("indicator");
3341
- const classes = classNames({
3342
- [`${b2("block")}`]: block,
3343
- [`${b2("align")}__${align}`]: block && align,
3344
- [`${b2("vertical")}`]: vertical
3345
- }, b2(""));
3420
+ const classes = classNames(
3421
+ {
3422
+ [`${b2("block")}`]: block,
3423
+ [`${b2("align")}__${align}`]: block && align,
3424
+ [`${b2("vertical")}`]: vertical
3425
+ },
3426
+ b2("")
3427
+ );
3346
3428
  const renderEles = () => {
3347
3429
  const childs = [];
3348
3430
  for (let item = 1; item <= size; item++) {
3349
- childs.push(item === current ? /* @__PURE__ */ React__default.createElement("div", {
3350
- key: item,
3351
- className: b2("number")
3352
- }, fillZero && item < 10 ? `0${item}` : item) : /* @__PURE__ */ React__default.createElement("div", {
3353
- key: item,
3354
- className: b2("dot")
3355
- }));
3431
+ childs.push(
3432
+ item === current ? /* @__PURE__ */ React__default.createElement("div", {
3433
+ key: item,
3434
+ className: b2("number")
3435
+ }, fillZero && item < 10 ? `0${item}` : item) : /* @__PURE__ */ React__default.createElement("div", {
3436
+ key: item,
3437
+ className: b2("dot")
3438
+ })
3439
+ );
3356
3440
  }
3357
3441
  return childs;
3358
3442
  };
@@ -3363,8 +3447,146 @@ const Indicator = (props) => {
3363
3447
  ...rest
3364
3448
  }, renderEles());
3365
3449
  };
3366
- Indicator.defaultProps = defaultProps$R;
3450
+ Indicator.defaultProps = defaultProps$U;
3367
3451
  Indicator.displayName = "NutIndicator";
3452
+ const handleClick = (e2) => {
3453
+ e2.stopPropagation();
3454
+ const isIcon = e2.target.className.includes("arrow-icon");
3455
+ const isTitle = e2.target.className.includes("__title") || isIcon;
3456
+ const currentClass = e2.currentTarget.className;
3457
+ const isShow = currentClass.includes("nutShow");
3458
+ const arrowIcon = e2.currentTarget.querySelector(".arrow-icon");
3459
+ const iconClass = arrowIcon.className;
3460
+ if (isTitle) {
3461
+ e2.currentTarget.className = isShow ? currentClass.replace("nutShow", "nutHide") : currentClass.replace("nutHide", "nutShow");
3462
+ arrowIcon.className = isShow ? iconClass.replace("arrow-down", "arrow-up") : iconClass.replace("arrow-up", "arrow-down");
3463
+ }
3464
+ };
3465
+ const OffsetContext = createContext(20);
3466
+ const defaultProps$T = {
3467
+ showhead: false,
3468
+ position: "left",
3469
+ width: "80%"
3470
+ };
3471
+ const SideNavBar = (props) => {
3472
+ useConfig();
3473
+ const {
3474
+ title,
3475
+ visible,
3476
+ width,
3477
+ position,
3478
+ children,
3479
+ className,
3480
+ showhead,
3481
+ handleClose,
3482
+ ...rest
3483
+ } = {
3484
+ ...defaultProps$T,
3485
+ ...props
3486
+ };
3487
+ const offset = props.offset ? Number(props.offset) : 20;
3488
+ return /* @__PURE__ */ React__default.createElement(Popup, {
3489
+ visible,
3490
+ style: { width, height: "100%" },
3491
+ position,
3492
+ onClose: handleClose
3493
+ }, /* @__PURE__ */ React__default.createElement("div", {
3494
+ className: className ? `${className} nut-sidenavbar` : "nut-sidenavbar",
3495
+ ...rest
3496
+ }, /* @__PURE__ */ React__default.createElement("div", {
3497
+ className: "nut-sidenavbar__content"
3498
+ }, /* @__PURE__ */ React__default.createElement("div", {
3499
+ className: "nut-sidenavbar__list nutShow",
3500
+ onClick: handleClick
3501
+ }, /* @__PURE__ */ React__default.createElement("div", {
3502
+ className: "nut-sidenavbar__title border-bt ",
3503
+ style: { paddingLeft: `${offset}px` }
3504
+ }, title, " ", /* @__PURE__ */ React__default.createElement("i", {
3505
+ className: "arrow-icon arrow-down"
3506
+ })), /* @__PURE__ */ React__default.createElement(OffsetContext.Provider, {
3507
+ value: offset
3508
+ }, /* @__PURE__ */ React__default.createElement("div", {
3509
+ className: "nut-sidenavbar__content"
3510
+ }, children))))));
3511
+ };
3512
+ SideNavBar.defaultProps = defaultProps$T;
3513
+ SideNavBar.displayName = "NutSideNavBar";
3514
+ const defaultProps$S = {
3515
+ open: true
3516
+ };
3517
+ const SubSideNavBar = (props) => {
3518
+ const { title, ikey, children, titleClick, open, ...rest } = {
3519
+ ...defaultProps$S,
3520
+ ...props
3521
+ };
3522
+ const offset = useContext$1(OffsetContext);
3523
+ console.log("offset>>>>>>>", offset);
3524
+ const listRef = useRef(null);
3525
+ const setListLevel = useCallback(
3526
+ (nodeList, level = 1) => {
3527
+ const titleClass = nodeList[0].className;
3528
+ if (titleClass.includes("nut-subsidenavbar__title")) {
3529
+ const left = offset * (level + 1);
3530
+ nodeList[0].style.paddingLeft = `${left}px`;
3531
+ }
3532
+ const childNodes = nodeList[1] && nodeList[1].children && Array.from(nodeList[1].children).filter(
3533
+ (item) => item.nodeType !== 3 && item.nodeType !== 8
3534
+ );
3535
+ childNodes.forEach((item) => {
3536
+ const itemClass = item.className;
3537
+ if (itemClass.includes("nut-subsidenavbar__item")) {
3538
+ const left = offset * (level + 2);
3539
+ item.style.paddingLeft = `${left}px`;
3540
+ }
3541
+ if (itemClass.includes("nut-subsidenavbar__list")) {
3542
+ let level2 = item.getAttribute("level") ? Number(item.getAttribute("level")) : 1;
3543
+ level2 += 1;
3544
+ item.setAttribute("level", level2.toString());
3545
+ item.children && setListLevel(item.children, level2);
3546
+ }
3547
+ });
3548
+ },
3549
+ [offset]
3550
+ );
3551
+ const clickFn = (e2) => {
3552
+ handleClick(e2);
3553
+ const currentClass = e2.currentTarget.className;
3554
+ const isShow = currentClass.includes("nutShow");
3555
+ titleClick && titleClick({ title, ikey, isShow });
3556
+ };
3557
+ useEffect(() => {
3558
+ var _a, _b;
3559
+ const childNodes = (_a = listRef.current) == null ? void 0 : _a.children;
3560
+ (_b = listRef.current) == null ? void 0 : _b.setAttribute("level", "1");
3561
+ childNodes && setListLevel(childNodes);
3562
+ }, [setListLevel]);
3563
+ const divClass = open ? "nut-subsidenavbar__list nutShow" : "nut-subsidenavbar__list nutHide";
3564
+ const iconClass = open ? "arrow-icon arrow-down" : "arrow-icon arrow-up";
3565
+ return /* @__PURE__ */ React__default.createElement("div", {
3566
+ className: divClass,
3567
+ ref: listRef,
3568
+ onClick: clickFn,
3569
+ ...rest
3570
+ }, /* @__PURE__ */ React__default.createElement("div", {
3571
+ className: "nut-subsidenavbar__title border-bt"
3572
+ }, title, " ", /* @__PURE__ */ React__default.createElement("i", {
3573
+ className: iconClass
3574
+ })), /* @__PURE__ */ React__default.createElement("div", {
3575
+ className: "nut-subsidenavbar__content"
3576
+ }, children));
3577
+ };
3578
+ const SideNavBarItem = (props) => {
3579
+ const { title, ikey, children, click, ...rest } = props;
3580
+ const clickFn = (e2) => {
3581
+ e2.stopPropagation();
3582
+ click && click({ title, ikey });
3583
+ };
3584
+ return /* @__PURE__ */ React__default.createElement("div", {
3585
+ className: "nut-subsidenavbar__item border-bt",
3586
+ onClick: clickFn,
3587
+ ...rest
3588
+ }, title);
3589
+ };
3368
3590
  const MIN_DISTANCE = 10;
3369
3591
  function getDirection(x2, y2) {
3370
3592
  if (x2 > y2 && x2 > MIN_DISTANCE) {
@@ -3650,7 +3872,7 @@ var Toast = {
3650
3872
  }
3651
3873
  }
3652
3874
  };
3653
- const defaultProps$Q = {
3875
+ const defaultProps$R = {
3654
3876
  range: false,
3655
3877
  hiddenRange: false,
3656
3878
  hiddenTag: false,
@@ -3684,7 +3906,7 @@ const Range = (props) => {
3684
3906
  change,
3685
3907
  dragStart,
3686
3908
  dragEnd
3687
- } = { ...defaultProps$Q, ...props };
3909
+ } = { ...defaultProps$R, ...props };
3688
3910
  const [buttonIndex, SetButtonIndex] = useState(0);
3689
3911
  const [initValue, SetInitValue] = useState();
3690
3912
  const [dragStatus, SetDragStatus] = useState("start");
@@ -3724,23 +3946,26 @@ const Range = (props) => {
3724
3946
  const prefixCls = "nut-range-container";
3725
3947
  return [prefixCls, `${vertical ? `${prefixCls}-vertical` : ""}`, className].filter(Boolean).join(" ");
3726
3948
  }, [vertical, className]);
3727
- const markClassName = useCallback((mark) => {
3728
- const classPrefix = "nut-range-mark";
3729
- let lowerBound = Number(min);
3730
- let upperBound = Number(max);
3731
- if (range) {
3732
- const [left, right] = modelValue;
3733
- lowerBound = left;
3734
- upperBound = right;
3735
- } else {
3736
- upperBound = modelValue;
3737
- }
3738
- const isActive = mark <= upperBound && mark >= lowerBound;
3739
- return [
3740
- `${classPrefix}-text`,
3741
- `${isActive ? `${classPrefix}-text-active` : ""}`
3742
- ].filter(Boolean).join(" ");
3743
- }, [range, modelValue, min, max]);
3949
+ const markClassName = useCallback(
3950
+ (mark) => {
3951
+ const classPrefix = "nut-range-mark";
3952
+ let lowerBound = Number(min);
3953
+ let upperBound = Number(max);
3954
+ if (range) {
3955
+ const [left, right] = modelValue;
3956
+ lowerBound = left;
3957
+ upperBound = right;
3958
+ } else {
3959
+ upperBound = modelValue;
3960
+ }
3961
+ const isActive = mark <= upperBound && mark >= lowerBound;
3962
+ return [
3963
+ `${classPrefix}-text`,
3964
+ `${isActive ? `${classPrefix}-text-active` : ""}`
3965
+ ].filter(Boolean).join(" ");
3966
+ },
3967
+ [range, modelValue, min, max]
3968
+ );
3744
3969
  const [rangeName, setRangeName] = useState(classes());
3745
3970
  const [containerName, setContainerName] = useState(containerClasses());
3746
3971
  useEffect(() => {
@@ -4013,7 +4238,7 @@ const Range = (props) => {
4013
4238
  className: "max"
4014
4239
  }, +max) : null);
4015
4240
  };
4016
- Range.defaultProps = defaultProps$Q;
4241
+ Range.defaultProps = defaultProps$R;
4017
4242
  Range.displayName = "NutRange";
4018
4243
  const Utils = {
4019
4244
  isLeapYear(y2) {
@@ -4107,7 +4332,7 @@ function requestAniFrame() {
4107
4332
  };
4108
4333
  }
4109
4334
  var requestAniFrame$1 = requestAniFrame();
4110
- const defaultProps$P = {
4335
+ const defaultProps$Q = {
4111
4336
  type: "one",
4112
4337
  isAutoBackFill: false,
4113
4338
  poppable: true,
@@ -4136,7 +4361,7 @@ const CalendarItem = (props) => {
4136
4361
  onChoose,
4137
4362
  onUpdate,
4138
4363
  onClose
4139
- } = { ...defaultProps$P, ...props };
4364
+ } = { ...defaultProps$Q, ...props };
4140
4365
  const weeks = locale.calendaritem.weekdays;
4141
4366
  const [yearMonthTitle, setYearMonthTitle] = useState("");
4142
4367
  const [unLoadPrev, setUnLoadPrev] = useState(false);
@@ -4167,10 +4392,13 @@ const CalendarItem = (props) => {
4167
4392
  const months = useRef(null);
4168
4393
  const monthsPanel = useRef(null);
4169
4394
  const b2 = cn("calendar");
4170
- const classes = classNames({
4171
- [`${b2("")}-tile`]: !poppable,
4172
- [`${b2("")}-nofooter`]: !!isAutoBackFill
4173
- }, b2(""));
4395
+ const classes = classNames(
4396
+ {
4397
+ [`${b2("")}-tile`]: !poppable,
4398
+ [`${b2("")}-nofooter`]: !!isAutoBackFill
4399
+ },
4400
+ b2("")
4401
+ );
4174
4402
  const headerClasses = classNames({
4175
4403
  [`${b2("")}-header`]: true,
4176
4404
  [`${b2("")}-header-tile`]: !poppable
@@ -4189,7 +4417,11 @@ const CalendarItem = (props) => {
4189
4417
  return Utils.isEqual(state.currDate[1], currDate);
4190
4418
  };
4191
4419
  const getCurrDate = (day, month, isRange) => {
4192
- return isRange ? `${month.curData[3]}-${month.curData[4]}-${Utils.getNumTwoBit(+day.day)}` : `${month.curData[0]}-${month.curData[1]}-${Utils.getNumTwoBit(+day.day)}`;
4420
+ return isRange ? `${month.curData[3]}-${month.curData[4]}-${Utils.getNumTwoBit(
4421
+ +day.day
4422
+ )}` : `${month.curData[0]}-${month.curData[1]}-${Utils.getNumTwoBit(
4423
+ +day.day
4424
+ )}`;
4193
4425
  };
4194
4426
  const getClass = (day, month, isRange) => {
4195
4427
  const currDate = getCurrDate(day, month, isRange);
@@ -4310,10 +4542,19 @@ const CalendarItem = (props) => {
4310
4542
  ]
4311
4543
  };
4312
4544
  if (type2 == "next") {
4313
- if (!state.endData || !Utils.compareDate(`${state.endData[0]}-${state.endData[1]}-${Utils.getMonthDays(state.endData[0], state.endData[1])}`, `${curData[0]}-${curData[1]}-${curData[2]}`)) {
4545
+ if (!state.endData || !Utils.compareDate(
4546
+ `${state.endData[0]}-${state.endData[1]}-${Utils.getMonthDays(
4547
+ state.endData[0],
4548
+ state.endData[1]
4549
+ )}`,
4550
+ `${curData[0]}-${curData[1]}-${curData[2]}`
4551
+ )) {
4314
4552
  state.monthsData.push(monthInfo);
4315
4553
  }
4316
- } else if (!state.startData || !Utils.compareDate(`${curData[0]}-${curData[1]}-${curData[2]}`, `${state.startData[0]}-${state.startData[1]}-01`)) {
4554
+ } else if (!state.startData || !Utils.compareDate(
4555
+ `${curData[0]}-${curData[1]}-${curData[2]}`,
4556
+ `${state.startData[0]}-${state.startData[1]}-01`
4557
+ )) {
4317
4558
  state.monthsData.unshift(monthInfo);
4318
4559
  } else {
4319
4560
  setUnLoadPrev(true);
@@ -4465,10 +4706,23 @@ const CalendarItem = (props) => {
4465
4706
  getMonth(getCurrData("next"), "next");
4466
4707
  } while (i++ < 4);
4467
4708
  if (state.isRange) {
4468
- chooseDay({ day: state.defaultData[2], type: "curr" }, state.monthsData[0], true);
4469
- chooseDay({ day: state.defaultData[5], type: "curr" }, state.monthsData[0], true, true);
4709
+ chooseDay(
4710
+ { day: state.defaultData[2], type: "curr" },
4711
+ state.monthsData[0],
4712
+ true
4713
+ );
4714
+ chooseDay(
4715
+ { day: state.defaultData[5], type: "curr" },
4716
+ state.monthsData[0],
4717
+ true,
4718
+ true
4719
+ );
4470
4720
  } else {
4471
- chooseDay({ day: state.defaultData[2], type: "curr" }, state.monthsData[0], true);
4721
+ chooseDay(
4722
+ { day: state.defaultData[2], type: "curr" },
4723
+ state.monthsData[0],
4724
+ true
4725
+ );
4472
4726
  }
4473
4727
  };
4474
4728
  useEffect(() => {
@@ -4532,9 +4786,9 @@ const CalendarItem = (props) => {
4532
4786
  onClick: confirm2
4533
4787
  }, locale.confirm)) : ""));
4534
4788
  };
4535
- CalendarItem.defaultProps = defaultProps$P;
4789
+ CalendarItem.defaultProps = defaultProps$Q;
4536
4790
  CalendarItem.displayName = "NutCalendarItem";
4537
- const defaultProps$O = {
4791
+ const defaultProps$P = {
4538
4792
  type: "one",
4539
4793
  isAutoBackFill: false,
4540
4794
  poppable: true,
@@ -4562,7 +4816,7 @@ const Calendar = (props) => {
4562
4816
  endDate,
4563
4817
  onClose,
4564
4818
  onChoose
4565
- } = { ...defaultProps$O, ...props };
4819
+ } = { ...defaultProps$P, ...props };
4566
4820
  const close = () => {
4567
4821
  onClose && onClose();
4568
4822
  };
@@ -4605,95 +4859,99 @@ const Calendar = (props) => {
4605
4859
  onChoose: choose
4606
4860
  }));
4607
4861
  };
4608
- Calendar.defaultProps = defaultProps$O;
4862
+ Calendar.defaultProps = defaultProps$P;
4609
4863
  Calendar.displayName = "NutCalendar";
4610
- const defaultProps$N = {
4864
+ const defaultProps$O = {
4611
4865
  disabled: false,
4612
4866
  checkedValue: [],
4613
4867
  max: void 0,
4614
4868
  onChange: (value) => {
4615
4869
  }
4616
4870
  };
4617
- const CheckboxGroup = React__default.forwardRef((props, ref) => {
4618
- const { children } = { ...defaultProps$N, ...props };
4619
- const b2 = cn("checkboxgroup");
4620
- const { className, disabled, onChange, checkedValue, max, ...rest } = props;
4621
- const [innerDisabled, setInnerDisabled] = useState(disabled);
4622
- const [innerValue, setInnerValue] = useState(checkedValue);
4623
- useImperativeHandle(ref, () => ({
4624
- toggleAll(state) {
4625
- if (state === false) {
4626
- setInnerValue([]);
4627
- } else {
4871
+ const CheckboxGroup = React__default.forwardRef(
4872
+ (props, ref) => {
4873
+ const { children } = { ...defaultProps$O, ...props };
4874
+ const b2 = cn("checkboxgroup");
4875
+ const { className, disabled, onChange, checkedValue, max, ...rest } = props;
4876
+ const [innerDisabled, setInnerDisabled] = useState(disabled);
4877
+ const [innerValue, setInnerValue] = useState(checkedValue);
4878
+ useImperativeHandle(ref, () => ({
4879
+ toggleAll(state) {
4880
+ if (state === false) {
4881
+ setInnerValue([]);
4882
+ } else {
4883
+ const childrenLabel = [];
4884
+ React__default.Children.map(children, (child) => {
4885
+ const childProps = child.props;
4886
+ console.log(child);
4887
+ childrenLabel.push(childProps.label || child.children);
4888
+ });
4889
+ setInnerValue(childrenLabel);
4890
+ }
4891
+ },
4892
+ toggleReverse() {
4628
4893
  const childrenLabel = [];
4629
4894
  React__default.Children.map(children, (child) => {
4630
4895
  const childProps = child.props;
4631
- console.log(child);
4632
4896
  childrenLabel.push(childProps.label || child.children);
4633
4897
  });
4634
- setInnerValue(childrenLabel);
4898
+ const reverse = childrenLabel.filter(
4899
+ (c6) => (innerValue == null ? void 0 : innerValue.findIndex((v2) => v2 === c6)) === -1
4900
+ );
4901
+ setInnerValue(reverse);
4635
4902
  }
4636
- },
4637
- toggleReverse() {
4638
- const childrenLabel = [];
4639
- React__default.Children.map(children, (child) => {
4640
- const childProps = child.props;
4641
- childrenLabel.push(childProps.label || child.children);
4642
- });
4643
- const reverse = childrenLabel.filter((c6) => (innerValue == null ? void 0 : innerValue.findIndex((v2) => v2 === c6)) === -1);
4644
- setInnerValue(reverse);
4645
- }
4646
- }));
4647
- useEffect(() => {
4648
- setInnerDisabled(disabled);
4649
- setInnerValue(checkedValue);
4650
- }, [disabled, checkedValue]);
4651
- function handleChildChange(state, label) {
4652
- if (max !== void 0 && innerValue && innerValue.length > max)
4653
- return;
4654
- if (innerValue) {
4655
- let clippedValue = [];
4656
- if (state) {
4657
- clippedValue = [...innerValue, label];
4658
- } else {
4659
- innerValue == null ? void 0 : innerValue.splice(innerValue == null ? void 0 : innerValue.indexOf(label), 1);
4660
- clippedValue = [...innerValue];
4903
+ }));
4904
+ useEffect(() => {
4905
+ setInnerDisabled(disabled);
4906
+ setInnerValue(checkedValue);
4907
+ }, [disabled, checkedValue]);
4908
+ function handleChildChange(state, label) {
4909
+ if (max !== void 0 && innerValue && innerValue.length > max)
4910
+ return;
4911
+ if (innerValue) {
4912
+ let clippedValue = [];
4913
+ if (state) {
4914
+ clippedValue = [...innerValue, label];
4915
+ } else {
4916
+ innerValue == null ? void 0 : innerValue.splice(innerValue == null ? void 0 : innerValue.indexOf(label), 1);
4917
+ clippedValue = [...innerValue];
4918
+ }
4919
+ setInnerValue(clippedValue);
4920
+ onChange && onChange(clippedValue);
4661
4921
  }
4662
- setInnerValue(clippedValue);
4663
- onChange && onChange(clippedValue);
4664
4922
  }
4665
- }
4666
- function validateChildChecked(child) {
4667
- if (!innerValue)
4668
- return false;
4669
- return (innerValue == null ? void 0 : innerValue.indexOf(child.props.label || child.children)) > -1;
4670
- }
4671
- function getParentVals() {
4672
- return innerValue;
4673
- }
4674
- function cloneChildren() {
4675
- return React__default.Children.map(children, (child) => {
4676
- const childChecked = validateChildChecked(child);
4677
- if (child.type.displayName !== "NutCheckBox") {
4678
- return React__default.cloneElement(child);
4679
- }
4680
- return React__default.cloneElement(child, {
4681
- disabled: innerDisabled,
4682
- checked: childChecked,
4683
- onChange: handleChildChange,
4684
- getParentVals,
4685
- max
4923
+ function validateChildChecked(child) {
4924
+ if (!innerValue)
4925
+ return false;
4926
+ return (innerValue == null ? void 0 : innerValue.indexOf(child.props.label || child.children)) > -1;
4927
+ }
4928
+ function getParentVals() {
4929
+ return innerValue;
4930
+ }
4931
+ function cloneChildren() {
4932
+ return React__default.Children.map(children, (child) => {
4933
+ const childChecked = validateChildChecked(child);
4934
+ if (child.type.displayName !== "NutCheckBox") {
4935
+ return React__default.cloneElement(child);
4936
+ }
4937
+ return React__default.cloneElement(child, {
4938
+ disabled: innerDisabled,
4939
+ checked: childChecked,
4940
+ onChange: handleChildChange,
4941
+ getParentVals,
4942
+ max
4943
+ });
4686
4944
  });
4687
- });
4945
+ }
4946
+ return /* @__PURE__ */ React__default.createElement("div", {
4947
+ className: `${b2()} ${className || ""}`,
4948
+ ...rest
4949
+ }, cloneChildren());
4688
4950
  }
4689
- return /* @__PURE__ */ React__default.createElement("div", {
4690
- className: `${b2()} ${className || ""}`,
4691
- ...rest
4692
- }, cloneChildren());
4693
- });
4694
- CheckboxGroup.defaultProps = defaultProps$N;
4951
+ );
4952
+ CheckboxGroup.defaultProps = defaultProps$O;
4695
4953
  CheckboxGroup.displayName = "NutCheckboxGroup";
4696
- const defaultProps$M = {
4954
+ const defaultProps$N = {
4697
4955
  checked: false,
4698
4956
  disabled: false,
4699
4957
  textPosition: "right",
@@ -4707,7 +4965,7 @@ const defaultProps$M = {
4707
4965
  }
4708
4966
  };
4709
4967
  const Checkbox = (props) => {
4710
- const { children } = { ...defaultProps$M, ...props };
4968
+ const { children } = { ...defaultProps$N, ...props };
4711
4969
  const b2 = cn("checkbox");
4712
4970
  const {
4713
4971
  iconName,
@@ -4772,7 +5030,7 @@ const Checkbox = (props) => {
4772
5030
  className: `${b2("label", { disabled: innerDisabled })} `
4773
5031
  }, children || label);
4774
5032
  };
4775
- const handleClick = () => {
5033
+ const handleClick2 = () => {
4776
5034
  if (!disabled) {
4777
5035
  const latest = !innerChecked;
4778
5036
  if (max !== void 0 && latest && getParentVals().length >= max)
@@ -4784,10 +5042,10 @@ const Checkbox = (props) => {
4784
5042
  return /* @__PURE__ */ React__default.createElement("div", {
4785
5043
  className: `${b2({ reverse: textPosition === "left" })} ${className || ""}`,
4786
5044
  ...rest,
4787
- onClick: handleClick
5045
+ onClick: handleClick2
4788
5046
  }, renderIcon(), renderLabel());
4789
5047
  };
4790
- Checkbox.defaultProps = defaultProps$M;
5048
+ Checkbox.defaultProps = defaultProps$N;
4791
5049
  Checkbox.displayName = "NutCheckBox";
4792
5050
  Checkbox.Group = CheckboxGroup;
4793
5051
  const InternalPickerSlot = (props, ref) => {
@@ -4951,12 +5209,12 @@ const InternalPickerSlot = (props, ref) => {
4951
5209
  transform: `rotate3d(1, 0, 0, ${-rotation * (index2 + 1)}deg) translate3d(0px, 0px, 104px)`
4952
5210
  },
4953
5211
  key: item.value ? item.value : index2
4954
- }, item.text ? item.text : item);
5212
+ }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, item.text ? item.text : item));
4955
5213
  }), !threeDimensional && listData.map((item, index2) => {
4956
5214
  return /* @__PURE__ */ React__default.createElement("div", {
4957
5215
  className: "nut-picker-roller-item-tile",
4958
5216
  key: item.value ? item.value : index2
4959
- }, item.text ? item.text : item);
5217
+ }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, item.text ? item.text : item));
4960
5218
  })), /* @__PURE__ */ React__default.createElement("div", {
4961
5219
  className: "nut-picker-mask"
4962
5220
  }), /* @__PURE__ */ React__default.createElement("div", {
@@ -5010,7 +5268,9 @@ const InternalPicker = (props, ref) => {
5010
5268
  const optins = [];
5011
5269
  columnsList.map((column, index2) => {
5012
5270
  let currOptions = [];
5013
- currOptions = column.filter((item) => item.value === chooseValueData[index2]);
5271
+ currOptions = column.filter(
5272
+ (item) => item.value === chooseValueData[index2]
5273
+ );
5014
5274
  if (currOptions[0]) {
5015
5275
  optins.push(currOptions[0]);
5016
5276
  } else {
@@ -5043,7 +5303,10 @@ const InternalPicker = (props, ref) => {
5043
5303
  } else {
5044
5304
  setchooseValueData((data) => {
5045
5305
  const cdata = [...data];
5046
- cdata[columnIndex2] = Object.prototype.hasOwnProperty.call(option, "value") ? option.value : "";
5306
+ cdata[columnIndex2] = Object.prototype.hasOwnProperty.call(
5307
+ option,
5308
+ "value"
5309
+ ) ? option.value : "";
5047
5310
  return cdata;
5048
5311
  });
5049
5312
  }
@@ -5085,7 +5348,9 @@ const InternalPicker = (props, ref) => {
5085
5348
  while (cursor && cursor.children) {
5086
5349
  const options2 = cursor.children;
5087
5350
  const value = defaultValues[columnIndex2];
5088
- let index2 = options2.findIndex((columnItem) => columnItem.value === value);
5351
+ let index2 = options2.findIndex(
5352
+ (columnItem) => columnItem.value === value
5353
+ );
5089
5354
  if (index2 === -1)
5090
5355
  index2 = 0;
5091
5356
  cursor = cursor.children[index2];
@@ -5098,8 +5363,8 @@ const InternalPicker = (props, ref) => {
5098
5363
  const data = [];
5099
5364
  const normalData = normalListData();
5100
5365
  setColumnsList(normalData);
5101
- normalData.map((item) => {
5102
- data.push(item[0].value);
5366
+ normalData.length > 0 && normalData.map((item) => {
5367
+ item[0] && data.push(item[0].value);
5103
5368
  return item;
5104
5369
  });
5105
5370
  if (!defaultValueData && chooseValueData.length === 0) {
@@ -5142,7 +5407,7 @@ const InternalPicker = (props, ref) => {
5142
5407
  };
5143
5408
  const Picker = React__default.forwardRef(InternalPicker);
5144
5409
  const currentYear = new Date().getFullYear();
5145
- const defaultProps$L = {
5410
+ const defaultProps$M = {
5146
5411
  modelValue: null,
5147
5412
  visible: false,
5148
5413
  title: "",
@@ -5172,7 +5437,7 @@ const DatePicker = (props) => {
5172
5437
  style,
5173
5438
  ...rest
5174
5439
  } = {
5175
- ...defaultProps$L,
5440
+ ...defaultProps$M,
5176
5441
  ...props
5177
5442
  };
5178
5443
  const [show, setShow] = useState(false);
@@ -5294,25 +5559,38 @@ const DatePicker = (props) => {
5294
5559
  return result;
5295
5560
  };
5296
5561
  const updateChooseValueCustmer = (index2, selectedValue, cacheValueData) => {
5297
- if (["date", "datetime", "datehour", "month-day", "year-month"].includes(type.toLocaleLowerCase())) {
5562
+ if (["date", "datetime", "datehour", "month-day", "year-month"].includes(
5563
+ type.toLocaleLowerCase()
5564
+ )) {
5298
5565
  const formatDate = [];
5299
5566
  selectedValue.forEach((item) => {
5300
5567
  formatDate.push(item);
5301
5568
  });
5302
5569
  if (type.toLocaleLowerCase() === "month-day" && formatDate.length < 3) {
5303
- formatDate.unshift(new Date(modelValue || minDate || maxDate).getFullYear());
5570
+ formatDate.unshift(
5571
+ new Date(modelValue || minDate || maxDate).getFullYear()
5572
+ );
5304
5573
  }
5305
5574
  if (type.toLocaleLowerCase() === "year-month" && formatDate.length < 3) {
5306
5575
  formatDate.push(new Date(modelValue || minDate || maxDate).getDate());
5307
5576
  }
5308
5577
  const year = Number(formatDate[0]);
5309
5578
  const month = Number(formatDate[1]) - 1;
5310
- const day = Math.min(Number(formatDate[2]), getMonthEndDay(Number(formatDate[0]), Number(formatDate[1])));
5579
+ const day = Math.min(
5580
+ Number(formatDate[2]),
5581
+ getMonthEndDay(Number(formatDate[0]), Number(formatDate[1]))
5582
+ );
5311
5583
  let date = null;
5312
5584
  if (type.toLocaleLowerCase() === "date" || type.toLocaleLowerCase() === "month-day" || type.toLocaleLowerCase() === "year-month") {
5313
5585
  date = new Date(year, month, day);
5314
5586
  } else if (type.toLocaleLowerCase() === "datetime") {
5315
- date = new Date(year, month, day, Number(formatDate[3]), Number(formatDate[4]));
5587
+ date = new Date(
5588
+ year,
5589
+ month,
5590
+ day,
5591
+ Number(formatDate[3]),
5592
+ Number(formatDate[4])
5593
+ );
5316
5594
  } else if (type.toLocaleLowerCase() === "datehour") {
5317
5595
  date = new Date(year, month, day, Number(formatDate[3]));
5318
5596
  }
@@ -5385,7 +5663,13 @@ const DatePicker = (props) => {
5385
5663
  };
5386
5664
  const columns = (date) => {
5387
5665
  const val = ranges(date).map((res, columnIndex) => {
5388
- return generateValue(res.range[0], res.range[1], getDateIndex(res.type), res.type, columnIndex);
5666
+ return generateValue(
5667
+ res.range[0],
5668
+ res.range[1],
5669
+ getDateIndex(res.type),
5670
+ res.type,
5671
+ columnIndex
5672
+ );
5389
5673
  });
5390
5674
  return val || [];
5391
5675
  };
@@ -5418,9 +5702,9 @@ const DatePicker = (props) => {
5418
5702
  ref: pickerRef
5419
5703
  }));
5420
5704
  };
5421
- DatePicker.defaultProps = defaultProps$L;
5705
+ DatePicker.defaultProps = defaultProps$M;
5422
5706
  DatePicker.displayName = "NutDatePicker";
5423
- const defaultProps$K = {
5707
+ const defaultProps$L = {
5424
5708
  disabled: false,
5425
5709
  buttonSize: "",
5426
5710
  min: 1,
@@ -5458,7 +5742,7 @@ const InputNumber = (props) => {
5458
5742
  focus,
5459
5743
  ...restProps
5460
5744
  } = {
5461
- ...defaultProps$K,
5745
+ ...defaultProps$L,
5462
5746
  ...props
5463
5747
  };
5464
5748
  const [inputValue, setInputValue] = useState(modelValue);
@@ -5466,9 +5750,13 @@ const InputNumber = (props) => {
5466
5750
  setInputValue(modelValue);
5467
5751
  }, [modelValue]);
5468
5752
  const b2 = cn("inputnumber");
5469
- const classes = classNames({
5470
- [`${b2("")}--disabled`]: disabled
5471
- }, className, b2(""));
5753
+ const classes = classNames(
5754
+ {
5755
+ [`${b2("")}--disabled`]: disabled
5756
+ },
5757
+ className,
5758
+ b2("")
5759
+ );
5472
5760
  const styles = {
5473
5761
  height: pxCheck(buttonSize),
5474
5762
  ...style
@@ -5579,7 +5867,7 @@ const InputNumber = (props) => {
5579
5867
  click: addNumber
5580
5868
  }));
5581
5869
  };
5582
- InputNumber.defaultProps = defaultProps$K;
5870
+ InputNumber.defaultProps = defaultProps$L;
5583
5871
  InputNumber.displayName = "NutInputNumber";
5584
5872
  function trimExtraChar(value, char, regExp) {
5585
5873
  const index2 = value.indexOf(char);
@@ -5605,7 +5893,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
5605
5893
  const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
5606
5894
  return value.replace(regExp, "");
5607
5895
  }
5608
- const defaultProps$J = {
5896
+ const defaultProps$K = {
5609
5897
  type: "text",
5610
5898
  defaultValue: "",
5611
5899
  placeholder: "",
@@ -5688,14 +5976,14 @@ const Input = (props) => {
5688
5976
  clickRightIcon,
5689
5977
  click,
5690
5978
  ...rest
5691
- } = { ...defaultProps$J, ...props };
5979
+ } = { ...defaultProps$K, ...props };
5692
5980
  locale.placeholder = placeholder || locale.placeholder;
5693
5981
  const [inputValue, SetInputValue] = useState("");
5694
5982
  const [active, SetActive] = useState(false);
5695
5983
  const [classes, setClasses] = useState("");
5696
5984
  const getModelValue = () => String(inputValue != null ? inputValue : "");
5697
5985
  const inputRef = useRef(null);
5698
- useLayoutEffect$1(() => {
5986
+ useLayoutEffect(() => {
5699
5987
  updateValue(getModelValue(), formatTrigger);
5700
5988
  });
5701
5989
  useEffect(() => {
@@ -5895,60 +6183,62 @@ const Input = (props) => {
5895
6183
  }
5896
6184
  }, errorMessage) : null)));
5897
6185
  };
5898
- Input.defaultProps = defaultProps$J;
6186
+ Input.defaultProps = defaultProps$K;
5899
6187
  Input.displayName = "NutInput";
5900
6188
  const radioContext = {
5901
6189
  onChange: (val) => {
5902
6190
  }
5903
6191
  };
5904
6192
  var RadioContext = React__default.createContext(radioContext);
5905
- const defaultProps$I = {
6193
+ const defaultProps$J = {
5906
6194
  value: null,
5907
6195
  textPosition: "right",
5908
6196
  onChange: (value) => {
5909
6197
  },
5910
6198
  direction: "vertical"
5911
6199
  };
5912
- const RadioGroup = React__default.forwardRef((props, ref) => {
5913
- const { children } = { ...defaultProps$I, ...props };
5914
- cn("RadioGroup");
5915
- const { className, value, onChange, textPosition, direction, ...rest } = props;
5916
- const [val2State, setVal2State] = useState(value);
5917
- useEffect(() => {
5918
- setVal2State(value);
5919
- }, [value]);
5920
- function validateChildChecked(child) {
5921
- if (val2State === null)
5922
- return false;
5923
- return val2State === child.props.value;
5924
- }
5925
- function cloneChildren() {
5926
- return React__default.Children.map(children, (child, index2) => {
5927
- const childChecked = validateChildChecked(child);
5928
- if (child.type.displayName !== "NutRadio") {
5929
- return React__default.cloneElement(child);
5930
- }
5931
- return React__default.cloneElement(child, {
5932
- textPosition,
5933
- checked: childChecked
6200
+ const RadioGroup = React__default.forwardRef(
6201
+ (props, ref) => {
6202
+ const { children } = { ...defaultProps$J, ...props };
6203
+ cn("RadioGroup");
6204
+ const { className, value, onChange, textPosition, direction, ...rest } = props;
6205
+ const [val2State, setVal2State] = useState(value);
6206
+ useEffect(() => {
6207
+ setVal2State(value);
6208
+ }, [value]);
6209
+ function validateChildChecked(child) {
6210
+ if (val2State === null)
6211
+ return false;
6212
+ return val2State === child.props.value;
6213
+ }
6214
+ function cloneChildren() {
6215
+ return React__default.Children.map(children, (child, index2) => {
6216
+ const childChecked = validateChildChecked(child);
6217
+ if (child.type.displayName !== "NutRadio") {
6218
+ return React__default.cloneElement(child);
6219
+ }
6220
+ return React__default.cloneElement(child, {
6221
+ textPosition,
6222
+ checked: childChecked
6223
+ });
5934
6224
  });
5935
- });
5936
- }
5937
- return /* @__PURE__ */ React__default.createElement(RadioContext.Provider, {
5938
- value: {
5939
- onChange: (val) => {
5940
- setVal2State(val);
5941
- onChange && onChange(val);
5942
- }
5943
6225
  }
5944
- }, /* @__PURE__ */ React__default.createElement("div", {
5945
- className: `nut-radiogroup nut-radiogroup--${props.direction}`,
5946
- ...rest
5947
- }, cloneChildren()));
5948
- });
5949
- RadioGroup.defaultProps = defaultProps$I;
6226
+ return /* @__PURE__ */ React__default.createElement(RadioContext.Provider, {
6227
+ value: {
6228
+ onChange: (val) => {
6229
+ setVal2State(val);
6230
+ onChange && onChange(val);
6231
+ }
6232
+ }
6233
+ }, /* @__PURE__ */ React__default.createElement("div", {
6234
+ className: `nut-radiogroup nut-radiogroup--${props.direction}`,
6235
+ ...rest
6236
+ }, cloneChildren()));
6237
+ }
6238
+ );
6239
+ RadioGroup.defaultProps = defaultProps$J;
5950
6240
  RadioGroup.displayName = "NutRadioGroup";
5951
- const defaultProps$H = {
6241
+ const defaultProps$I = {
5952
6242
  disabled: false,
5953
6243
  checked: false,
5954
6244
  shape: "round",
@@ -5961,7 +6251,7 @@ const defaultProps$H = {
5961
6251
  }
5962
6252
  };
5963
6253
  const Radio = (props) => {
5964
- const { children } = { ...defaultProps$H, ...props };
6254
+ const { children } = { ...defaultProps$I, ...props };
5965
6255
  const {
5966
6256
  className,
5967
6257
  disabled,
@@ -6021,7 +6311,7 @@ const Radio = (props) => {
6021
6311
  }
6022
6312
  return [renderIcon(), renderLabel()];
6023
6313
  };
6024
- const handleClick = (e2) => {
6314
+ const handleClick2 = (e2) => {
6025
6315
  if (disabledStatement || checkedStatement)
6026
6316
  return;
6027
6317
  setCheckedStatement(!checkedStatement);
@@ -6031,14 +6321,14 @@ const Radio = (props) => {
6031
6321
  const reverseState = textPosition === "left";
6032
6322
  return /* @__PURE__ */ React__default.createElement("div", {
6033
6323
  className: `nut-radio ${className}`,
6034
- onClick: handleClick,
6324
+ onClick: handleClick2,
6035
6325
  ...rest
6036
6326
  }, renderRadioItem());
6037
6327
  };
6038
- Radio.defaultProps = defaultProps$H;
6328
+ Radio.defaultProps = defaultProps$I;
6039
6329
  Radio.displayName = "NutRadio";
6040
6330
  Radio.RadioGroup = RadioGroup;
6041
- const defaultProps$G = {
6331
+ const defaultProps$H = {
6042
6332
  count: 5,
6043
6333
  modelValue: 0,
6044
6334
  minimizeValue: 0,
@@ -6067,7 +6357,7 @@ const Rate = (props) => {
6067
6357
  allowHalf,
6068
6358
  spacing,
6069
6359
  change
6070
- } = { ...defaultProps$G, ...props };
6360
+ } = { ...defaultProps$H, ...props };
6071
6361
  const b2 = cn("rate");
6072
6362
  const bi = cn("rate-item");
6073
6363
  const [countArray, setCountArray] = useState([1, 2, 3, 4, 5]);
@@ -6124,16 +6414,18 @@ const Rate = (props) => {
6124
6414
  size: iconSize,
6125
6415
  name: checkedIcon
6126
6416
  }), allowHalf && score < n2 - 1 && /* @__PURE__ */ React__default.createElement(Icon, {
6127
- className: `${bi("icon")} ${bi("icon--disabled")} ${bi("icon--half")}`,
6417
+ className: `${bi("icon")} ${bi("icon--disabled")} ${bi(
6418
+ "icon--half"
6419
+ )}`,
6128
6420
  color: voidColor,
6129
6421
  size: iconSize,
6130
6422
  name: uncheckedIcon
6131
6423
  }));
6132
6424
  }));
6133
6425
  };
6134
- Rate.defaultProps = defaultProps$G;
6426
+ Rate.defaultProps = defaultProps$H;
6135
6427
  Rate.displayName = "NutRate";
6136
- const defaultProps$F = {
6428
+ const defaultProps$G = {
6137
6429
  title: "\u8BF7\u8F93\u5165\u5BC6\u7801",
6138
6430
  desc: "\u60A8\u4F7F\u7528\u4E86\u865A\u62DF\u8D44\u4EA7\uFF0C\u8BF7\u8FDB\u884C\u9A8C\u8BC1",
6139
6431
  tips: "\u5FD8\u8BB0\u5BC6\u7801",
@@ -6293,9 +6585,9 @@ const ShortPassword = (props) => {
6293
6585
  onClick: () => sure()
6294
6586
  }, locale.confirm)) : null)));
6295
6587
  };
6296
- ShortPassword.defaultProps = defaultProps$F;
6588
+ ShortPassword.defaultProps = defaultProps$G;
6297
6589
  ShortPassword.displayName = "NutShortPassword";
6298
- const defaultProps$E = {
6590
+ const defaultProps$F = {
6299
6591
  defaultValue: "",
6300
6592
  textAlign: "left",
6301
6593
  limitshow: false,
@@ -6323,7 +6615,7 @@ const TextArea = (props) => {
6323
6615
  onChange,
6324
6616
  onBlur,
6325
6617
  onFocus
6326
- } = { ...defaultProps$E, ...props };
6618
+ } = { ...defaultProps$F, ...props };
6327
6619
  const textareaBem = cn("textarea");
6328
6620
  const [inputValue, SetInputValue] = useState("");
6329
6621
  useEffect(() => {
@@ -6387,7 +6679,7 @@ const TextArea = (props) => {
6387
6679
  className: textareaBem("limit")
6388
6680
  }, inputValue.length, "/", maxlength < 0 ? 0 : maxlength) : null);
6389
6681
  };
6390
- TextArea.defaultProps = defaultProps$E;
6682
+ TextArea.defaultProps = defaultProps$F;
6391
6683
  TextArea.displayName = "NutTextArea";
6392
6684
  class UploadOptions {
6393
6685
  constructor() {
@@ -6410,10 +6702,14 @@ class Upload {
6410
6702
  const xhr = new XMLHttpRequest();
6411
6703
  xhr.timeout = options2.timeout;
6412
6704
  if (xhr.upload) {
6413
- xhr.upload.addEventListener("progress", (e2) => {
6414
- var _a2;
6415
- (_a2 = options2.onProgress) == null ? void 0 : _a2.call(options2, e2, options2);
6416
- }, false);
6705
+ xhr.upload.addEventListener(
6706
+ "progress",
6707
+ (e2) => {
6708
+ var _a2;
6709
+ (_a2 = options2.onProgress) == null ? void 0 : _a2.call(options2, e2, options2);
6710
+ },
6711
+ false
6712
+ );
6417
6713
  xhr.onreadystatechange = () => {
6418
6714
  var _a2, _b;
6419
6715
  if (xhr.readyState === 4) {
@@ -6436,7 +6732,7 @@ class Upload {
6436
6732
  }
6437
6733
  }
6438
6734
  }
6439
- const defaultProps$D = {
6735
+ const defaultProps$E = {
6440
6736
  url: "",
6441
6737
  maximum: 1,
6442
6738
  uploadIcon: "photograph",
@@ -6511,7 +6807,7 @@ const InternalUploader = (props, ref) => {
6511
6807
  beforeUpload,
6512
6808
  beforeDelete,
6513
6809
  ...restProps
6514
- } = { ...defaultProps$D, ...props };
6810
+ } = { ...defaultProps$E, ...props };
6515
6811
  const [fileList, setFileList] = useState([]);
6516
6812
  const [uploadQueue, setUploadQueue] = useState([]);
6517
6813
  useEffect(() => {
@@ -6612,9 +6908,11 @@ const InternalUploader = (props, ref) => {
6612
6908
  if (props.autoUpload) {
6613
6909
  task.upload();
6614
6910
  } else {
6615
- uploadQueue.push(new Promise((resolve, reject) => {
6616
- resolve(task);
6617
- }));
6911
+ uploadQueue.push(
6912
+ new Promise((resolve, reject) => {
6913
+ resolve(task);
6914
+ })
6915
+ );
6618
6916
  setUploadQueue(uploadQueue);
6619
6917
  }
6620
6918
  };
@@ -6683,10 +6981,12 @@ const InternalUploader = (props, ref) => {
6683
6981
  const $el = event.target;
6684
6982
  const { files } = $el;
6685
6983
  if (beforeUpload) {
6686
- beforeUpload(new Array().slice.call(files)).then((f2) => {
6687
- const _files = filterFiles(new Array().slice.call(f2));
6688
- readFile(_files);
6689
- });
6984
+ beforeUpload(new Array().slice.call(files)).then(
6985
+ (f2) => {
6986
+ const _files = filterFiles(new Array().slice.call(f2));
6987
+ readFile(_files);
6988
+ }
6989
+ );
6690
6990
  } else {
6691
6991
  const _files = filterFiles(new Array().slice.call(files));
6692
6992
  readFile(_files);
@@ -6800,9 +7100,9 @@ const InternalUploader = (props, ref) => {
6800
7100
  })));
6801
7101
  };
6802
7102
  const Uploader = React__default.forwardRef(InternalUploader);
6803
- Uploader.defaultProps = defaultProps$D;
7103
+ Uploader.defaultProps = defaultProps$E;
6804
7104
  Uploader.displayName = "NutUploader";
6805
- const defaultProps$C = {
7105
+ const defaultProps$D = {
6806
7106
  placeholder: "",
6807
7107
  shape: "square",
6808
7108
  disabled: false,
@@ -6849,7 +7149,7 @@ const SearchBar = (props) => {
6849
7149
  onClickRightinIcon,
6850
7150
  onClickRightoutIcon
6851
7151
  } = {
6852
- ...defaultProps$C,
7152
+ ...defaultProps$D,
6853
7153
  ...props
6854
7154
  };
6855
7155
  const alignClass = `${align}`;
@@ -6986,9 +7286,9 @@ const SearchBar = (props) => {
6986
7286
  className: `${searchbarBem("content")}`
6987
7287
  }, renderLeftinIcon(), renderField(), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
6988
7288
  };
6989
- SearchBar.defaultProps = defaultProps$C;
7289
+ SearchBar.defaultProps = defaultProps$D;
6990
7290
  SearchBar.displayName = "NutSearchBar";
6991
- const defaultProps$B = {
7291
+ const defaultProps$C = {
6992
7292
  confirmText: "",
6993
7293
  title: "",
6994
7294
  visible: false,
@@ -7068,12 +7368,23 @@ const NumberKeyboard = (props) => {
7068
7368
  }
7069
7369
  if (customKeys.length === 1) {
7070
7370
  if (props.title && props.type !== "rightColumn") {
7071
- keys.push({ id: customKeys[0], type: "custom" }, { id: 0, type: "number" }, { id: "delete", type: "delete" });
7371
+ keys.push(
7372
+ { id: customKeys[0], type: "custom" },
7373
+ { id: 0, type: "number" },
7374
+ { id: "delete", type: "delete" }
7375
+ );
7072
7376
  } else {
7073
- keys.push({ id: 0, type: "number" }, { id: customKeys[0], type: "custom" });
7377
+ keys.push(
7378
+ { id: 0, type: "number" },
7379
+ { id: customKeys[0], type: "custom" }
7380
+ );
7074
7381
  }
7075
7382
  } else if (customKeys.length === 2) {
7076
- keys.push({ id: customKeys[0], type: "custom" }, { id: 0, type: "number" }, { id: customKeys[1], type: "custom" });
7383
+ keys.push(
7384
+ { id: customKeys[0], type: "custom" },
7385
+ { id: 0, type: "number" },
7386
+ { id: customKeys[1], type: "custom" }
7387
+ );
7077
7388
  }
7078
7389
  return keys;
7079
7390
  };
@@ -7175,9 +7486,9 @@ const NumberKeyboard = (props) => {
7175
7486
  })
7176
7487
  }, confirmText || locale.done))) : null))));
7177
7488
  };
7178
- NumberKeyboard.defaultProps = defaultProps$B;
7489
+ NumberKeyboard.defaultProps = defaultProps$C;
7179
7490
  NumberKeyboard.displayName = "NutNumberKeyboard";
7180
- const defaultProps$A = {
7491
+ const defaultProps$B = {
7181
7492
  cancelTxt: "",
7182
7493
  optionTag: "name",
7183
7494
  optionSubTag: "subname",
@@ -7210,7 +7521,7 @@ const ActionSheet = (props) => {
7210
7521
  className,
7211
7522
  style,
7212
7523
  ...rest
7213
- } = { ...defaultProps$A, ...props };
7524
+ } = { ...defaultProps$B, ...props };
7214
7525
  const b2 = cn("actionsheet");
7215
7526
  const isHighlight = (item) => {
7216
7527
  return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "#1a1a1a";
@@ -7254,9 +7565,9 @@ const ActionSheet = (props) => {
7254
7565
  onClick: () => cancelActionSheet()
7255
7566
  }, cancelTxt)));
7256
7567
  };
7257
- ActionSheet.defaultProps = defaultProps$A;
7568
+ ActionSheet.defaultProps = defaultProps$B;
7258
7569
  ActionSheet.displayName = "NutActionSheet";
7259
- const defaultProps$z = {
7570
+ const defaultProps$A = {
7260
7571
  bottom: 20,
7261
7572
  right: 10,
7262
7573
  elId: "body",
@@ -7279,7 +7590,7 @@ const BackTop = (props) => {
7279
7590
  style,
7280
7591
  onClick
7281
7592
  } = {
7282
- ...defaultProps$z,
7593
+ ...defaultProps$A,
7283
7594
  ...props
7284
7595
  };
7285
7596
  const [backTop, SetBackTop] = useState(false);
@@ -7368,7 +7679,7 @@ const BackTop = (props) => {
7368
7679
  name: "top"
7369
7680
  }));
7370
7681
  };
7371
- BackTop.defaultProps = defaultProps$z;
7682
+ BackTop.defaultProps = defaultProps$A;
7372
7683
  BackTop.displayName = "NutBackTop";
7373
7684
  function clamp(v2, min, max) {
7374
7685
  return Math.max(min, Math.min(v2, max));
@@ -8632,9 +8943,9 @@ let findTimeout = (time) => ~(~timeouts.findIndex((t2) => t2.time > time) || ~ti
8632
8943
  raf.cancel = (fn) => {
8633
8944
  onStartQueue.delete(fn);
8634
8945
  onFrameQueue.delete(fn);
8946
+ onFinishQueue.delete(fn);
8635
8947
  updateQueue.delete(fn);
8636
8948
  writeQueue.delete(fn);
8637
- onFinishQueue.delete(fn);
8638
8949
  };
8639
8950
  raf.sync = (fn) => {
8640
8951
  sync = true;
@@ -8712,14 +9023,15 @@ function update() {
8712
9023
  eachSafely(timeouts.splice(0, count), (t2) => t2.handler());
8713
9024
  pendingCount -= count;
8714
9025
  }
9026
+ if (!pendingCount) {
9027
+ stop();
9028
+ return;
9029
+ }
8715
9030
  onStartQueue.flush();
8716
9031
  updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667);
8717
9032
  onFrameQueue.flush();
8718
9033
  writeQueue.flush();
8719
9034
  onFinishQueue.flush();
8720
- if (!pendingCount) {
8721
- stop();
8722
- }
8723
9035
  }
8724
9036
  function makeQueue() {
8725
9037
  let next = /* @__PURE__ */ new Set();
@@ -9401,10 +9713,10 @@ function deprecateDirectCall() {
9401
9713
  function isAnimatedString(value) {
9402
9714
  return is.str(value) && (value[0] == "#" || /\d/.test(value) || !isSSR() && cssVariableRegex.test(value) || value in (colors$1 || {}));
9403
9715
  }
9404
- const useLayoutEffect = typeof window !== "undefined" && window.document && window.document.createElement ? React.useLayoutEffect : React.useEffect;
9716
+ const useIsomorphicLayoutEffect = isSSR() ? useEffect : useLayoutEffect;
9405
9717
  const useIsMounted = () => {
9406
9718
  const isMounted = useRef(false);
9407
- useLayoutEffect(() => {
9719
+ useIsomorphicLayoutEffect(() => {
9408
9720
  isMounted.current = true;
9409
9721
  return () => {
9410
9722
  isMounted.current = false;
@@ -9686,7 +9998,7 @@ const withAnimated = (Component2, host2) => {
9686
9998
  };
9687
9999
  const observer = new PropsObserver(callback, deps);
9688
10000
  const observerRef = useRef();
9689
- useLayoutEffect(() => {
10001
+ useIsomorphicLayoutEffect(() => {
9690
10002
  observerRef.current = observer;
9691
10003
  each(deps, (dep) => addFluidObserver(dep, observer));
9692
10004
  return () => {
@@ -11422,7 +11734,7 @@ function useSprings(length, props, deps) {
11422
11734
  const context2 = useContext$1(SpringContext);
11423
11735
  const prevContext = usePrev(context2);
11424
11736
  const hasContext = context2 !== prevContext && hasProps(context2);
11425
- useLayoutEffect(() => {
11737
+ useIsomorphicLayoutEffect(() => {
11426
11738
  layoutId.current++;
11427
11739
  state.ctrls = ctrls.current;
11428
11740
  const {
@@ -11771,7 +12083,7 @@ const host = createHost(primitives, {
11771
12083
  }
11772
12084
  });
11773
12085
  const animated = host.animated;
11774
- const defaultProps$y = {
12086
+ const defaultProps$z = {
11775
12087
  attract: false,
11776
12088
  direction: void 0,
11777
12089
  boundary: {
@@ -11784,7 +12096,7 @@ const defaultProps$y = {
11784
12096
  };
11785
12097
  const Drag = (props) => {
11786
12098
  const { attract, direction, boundary, children, className, style, ...reset } = {
11787
- ...defaultProps$y,
12099
+ ...defaultProps$z,
11788
12100
  ...props
11789
12101
  };
11790
12102
  const b2 = cn("drag");
@@ -11810,26 +12122,29 @@ const Drag = (props) => {
11810
12122
  middleLine.current = clientWidth - offsetWidth - offsetLeft - (clientWidth - offsetWidth) / 2;
11811
12123
  }
11812
12124
  };
11813
- const bind = useDrag(({ down, last, offset: [x2, y2] }) => {
11814
- api.start({ x: x2, y: y2, immediate: down });
11815
- if (last) {
11816
- if (props.direction != "y" && props.attract) {
11817
- if (x2 < middleLine.current) {
11818
- api.start({ x: boundaryState.left, y: y2, immediate: down });
11819
- } else {
11820
- api.start({
11821
- x: boundaryState.right,
11822
- y: y2,
11823
- immediate: down
11824
- });
12125
+ const bind = useDrag(
12126
+ ({ down, last, offset: [x2, y2] }) => {
12127
+ api.start({ x: x2, y: y2, immediate: down });
12128
+ if (last) {
12129
+ if (props.direction != "y" && props.attract) {
12130
+ if (x2 < middleLine.current) {
12131
+ api.start({ x: boundaryState.left, y: y2, immediate: down });
12132
+ } else {
12133
+ api.start({
12134
+ x: boundaryState.right,
12135
+ y: y2,
12136
+ immediate: down
12137
+ });
12138
+ }
11825
12139
  }
11826
12140
  }
12141
+ },
12142
+ {
12143
+ from: () => [currstyle.x.get(), currstyle.y.get()],
12144
+ axis: direction,
12145
+ bounds: boundaryState
11827
12146
  }
11828
- }, {
11829
- from: () => [currstyle.x.get(), currstyle.y.get()],
11830
- axis: direction,
11831
- bounds: boundaryState
11832
- });
12147
+ );
11833
12148
  useEffect(() => {
11834
12149
  getInfo();
11835
12150
  }, [myDrag]);
@@ -11843,7 +12158,7 @@ const Drag = (props) => {
11843
12158
  ...bind()
11844
12159
  }, children));
11845
12160
  };
11846
- Drag.defaultProps = defaultProps$y;
12161
+ Drag.defaultProps = defaultProps$z;
11847
12162
  Drag.displayName = "NutDrag";
11848
12163
  const Content = (props) => {
11849
12164
  const {
@@ -11869,12 +12184,12 @@ const Content = (props) => {
11869
12184
  })
11870
12185
  }, footer);
11871
12186
  }
11872
- const handleClick = () => {
12187
+ const handleClick2 = () => {
11873
12188
  onClickSelf && onClickSelf();
11874
12189
  };
11875
12190
  return /* @__PURE__ */ React__default.createElement("div", {
11876
12191
  className: "nut-dialog__outer",
11877
- onClick: handleClick
12192
+ onClick: handleClick2
11878
12193
  }, /* @__PURE__ */ React__default.createElement("div", {
11879
12194
  className: "nut-dialog",
11880
12195
  style: { display: visible ? "flex" : "none" }
@@ -11900,7 +12215,7 @@ const DialogWrap = (props) => {
11900
12215
  onClosed,
11901
12216
  onCancel
11902
12217
  } = props;
11903
- const handleClick = (e2) => {
12218
+ const handleClick2 = (e2) => {
11904
12219
  if (closeOnClickOverlay && visible && e2.target === e2.currentTarget) {
11905
12220
  onClosed == null ? void 0 : onClosed();
11906
12221
  onCancel == null ? void 0 : onCancel();
@@ -11922,7 +12237,7 @@ const DialogWrap = (props) => {
11922
12237
  appear: true
11923
12238
  }, /* @__PURE__ */ React__default.createElement(Mask, null)) : null, /* @__PURE__ */ React__default.createElement("div", {
11924
12239
  className: classNames("nut-dialog__wrap", className),
11925
- onClick: handleClick,
12240
+ onClick: handleClick2,
11926
12241
  style: wrapStyle
11927
12242
  }, /* @__PURE__ */ React__default.createElement(Content, {
11928
12243
  ...props,
@@ -11983,12 +12298,15 @@ function confirm(config2, renderFunc) {
11983
12298
  }
11984
12299
  if (ret && ret.then) {
11985
12300
  renderFunction(dialogConfig);
11986
- ret.then(() => {
11987
- onCancel(true);
11988
- }, (e2) => {
11989
- console.error(e2);
11990
- renderFunction(dialogConfig);
11991
- });
12301
+ ret.then(
12302
+ () => {
12303
+ onCancel(true);
12304
+ },
12305
+ (e2) => {
12306
+ console.error(e2);
12307
+ renderFunction(dialogConfig);
12308
+ }
12309
+ );
11992
12310
  }
11993
12311
  if (!ret) {
11994
12312
  onCancel(true);
@@ -12035,7 +12353,7 @@ function confirm(config2, renderFunc) {
12035
12353
  update: update2
12036
12354
  };
12037
12355
  }
12038
- const defaultProps$x = {
12356
+ const defaultProps$y = {
12039
12357
  okText: "",
12040
12358
  cancelText: "",
12041
12359
  mask: true,
@@ -12126,9 +12444,9 @@ Dialog.confirm = (props) => {
12126
12444
  });
12127
12445
  };
12128
12446
  });
12129
- Dialog.defaultProps = defaultProps$x;
12447
+ Dialog.defaultProps = defaultProps$y;
12130
12448
  Dialog.displayName = "NutDialog";
12131
- const defaultProps$w = {
12449
+ const defaultProps$x = {
12132
12450
  hasMore: true,
12133
12451
  threshold: 200,
12134
12452
  containerId: "",
@@ -12162,7 +12480,7 @@ const Infiniteloading = (props) => {
12162
12480
  scrollChange,
12163
12481
  ...restProps
12164
12482
  } = {
12165
- ...defaultProps$w,
12483
+ ...defaultProps$x,
12166
12484
  ...props
12167
12485
  };
12168
12486
  const [isInfiniting, setIsInfiniting] = useState(false);
@@ -12177,7 +12495,9 @@ const Infiniteloading = (props) => {
12177
12495
  const b2 = cn("infiniteloading");
12178
12496
  const classes = classNames(className, b2());
12179
12497
  useEffect(() => {
12180
- const parentElement = getParentElement(scroller.current);
12498
+ const parentElement = getParentElement(
12499
+ scroller.current
12500
+ );
12181
12501
  scrollEl.current = useWindow ? window : parentElement;
12182
12502
  scrollEl.current.addEventListener("scroll", handleScroll, useCapture);
12183
12503
  return () => {
@@ -12319,7 +12639,7 @@ const Infiniteloading = (props) => {
12319
12639
  className: "tips"
12320
12640
  }, locale.infiniteloading.loadMoreText || loadMoreTxt)));
12321
12641
  };
12322
- Infiniteloading.defaultProps = defaultProps$w;
12642
+ Infiniteloading.defaultProps = defaultProps$x;
12323
12643
  Infiniteloading.displayName = "NutInfiniteloading";
12324
12644
  class Notification extends React.PureComponent {
12325
12645
  constructor(props) {
@@ -12478,7 +12798,7 @@ var Notify = {
12478
12798
  }
12479
12799
  }
12480
12800
  };
12481
- const defaultProps$v = {
12801
+ const defaultProps$w = {
12482
12802
  isAsync: false,
12483
12803
  checked: false,
12484
12804
  disable: false,
@@ -12501,7 +12821,7 @@ const Switch = (props) => {
12501
12821
  className,
12502
12822
  style
12503
12823
  } = {
12504
- ...defaultProps$v,
12824
+ ...defaultProps$w,
12505
12825
  ...props
12506
12826
  };
12507
12827
  const [value, setValue] = useState(false);
@@ -12541,10 +12861,10 @@ const Switch = (props) => {
12541
12861
  className: `${b2("label")} close`
12542
12862
  }, inactiveText))));
12543
12863
  };
12544
- Switch.defaultProps = defaultProps$v;
12864
+ Switch.defaultProps = defaultProps$w;
12545
12865
  Switch.displayName = "NutSwitch";
12546
12866
  const isObject = (val) => val !== null && typeof val === "object";
12547
- const defaultProps$u = {
12867
+ const defaultProps$v = {
12548
12868
  strokeWidth: 5,
12549
12869
  radius: 50,
12550
12870
  strokeLinecap: "round",
@@ -12567,7 +12887,7 @@ const CircleProgress = (props) => {
12567
12887
  strokeLinecap,
12568
12888
  ...restProps
12569
12889
  } = {
12570
- ...defaultProps$u,
12890
+ ...defaultProps$v,
12571
12891
  ...props
12572
12892
  };
12573
12893
  const b2 = cn("circleprogress");
@@ -12601,7 +12921,9 @@ const CircleProgress = (props) => {
12601
12921
  return;
12602
12922
  }
12603
12923
  const color = circleColor;
12604
- const colorArr = Object.keys(color).sort((a, b22) => parseFloat(a) - parseFloat(b22));
12924
+ const colorArr = Object.keys(color).sort(
12925
+ (a, b22) => parseFloat(a) - parseFloat(b22)
12926
+ );
12605
12927
  const stopArr = [];
12606
12928
  colorArr.map((item) => {
12607
12929
  const obj = {
@@ -12651,9 +12973,9 @@ const CircleProgress = (props) => {
12651
12973
  className: "nut-circleprogress-text"
12652
12974
  }, children || /* @__PURE__ */ React__default.createElement("div", null, progress, "%")));
12653
12975
  };
12654
- CircleProgress.defaultProps = defaultProps$u;
12976
+ CircleProgress.defaultProps = defaultProps$v;
12655
12977
  CircleProgress.displayName = "NutCircleProgress";
12656
- const defaultProps$t = {
12978
+ const defaultProps$u = {
12657
12979
  direction: "across",
12658
12980
  list: [],
12659
12981
  standTime: 1e3,
@@ -12691,7 +13013,7 @@ const NoticeBar = (props) => {
12691
13013
  rightIcon,
12692
13014
  close,
12693
13015
  click
12694
- } = { ...defaultProps$t, ...props };
13016
+ } = { ...defaultProps$u, ...props };
12695
13017
  const wrap = useRef(null);
12696
13018
  const content = useRef(null);
12697
13019
  const [showNoticeBar, SetShowNoticeBar] = useState(true);
@@ -12766,7 +13088,7 @@ const NoticeBar = (props) => {
12766
13088
  }
12767
13089
  });
12768
13090
  };
12769
- const handleClick = (event) => {
13091
+ const handleClick2 = (event) => {
12770
13092
  click && click(event);
12771
13093
  };
12772
13094
  const onClickIcon = (event) => {
@@ -12783,7 +13105,10 @@ const NoticeBar = (props) => {
12783
13105
  };
12784
13106
  const startRollEasy = () => {
12785
13107
  showhorseLamp();
12786
- const timerCurr = window.setInterval(showhorseLamp, ~~(height / speed / 4) * 1e3 + Number(standTime));
13108
+ const timerCurr = window.setInterval(
13109
+ showhorseLamp,
13110
+ ~~(height / speed / 4) * 1e3 + Number(standTime)
13111
+ );
12787
13112
  SetTimer(timerCurr);
12788
13113
  };
12789
13114
  const showhorseLamp = () => {
@@ -12851,7 +13176,7 @@ const NoticeBar = (props) => {
12851
13176
  }, showNoticeBar && direction == "across" ? /* @__PURE__ */ React__default.createElement("div", {
12852
13177
  className: noticebarClass,
12853
13178
  style: barStyle,
12854
- onClick: handleClick
13179
+ onClick: handleClick2
12855
13180
  }, /* @__PURE__ */ React__default.createElement("div", {
12856
13181
  className: "left-icon",
12857
13182
  style: { backgroundImage: `url(${leftIcon || ""})` }
@@ -12904,16 +13229,16 @@ const NoticeBar = (props) => {
12904
13229
  size: "11px"
12905
13230
  }) : null))) : null);
12906
13231
  };
12907
- NoticeBar.defaultProps = defaultProps$t;
13232
+ NoticeBar.defaultProps = defaultProps$u;
12908
13233
  NoticeBar.displayName = "NutNoticeBar";
12909
13234
  const DataContext$1 = createContext({});
12910
- const defaultProps$s = {
13235
+ const defaultProps$t = {
12911
13236
  current: 0,
12912
13237
  direction: "horizontal",
12913
13238
  progressDot: false
12914
13239
  };
12915
13240
  const Steps = (props) => {
12916
- const propSteps = { ...defaultProps$s, ...props };
13241
+ const propSteps = { ...defaultProps$t, ...props };
12917
13242
  const {
12918
13243
  children,
12919
13244
  current,
@@ -12927,20 +13252,28 @@ const Steps = (props) => {
12927
13252
  propSteps
12928
13253
  };
12929
13254
  const b2 = cn("steps");
12930
- const classes = classNames({
12931
- [`${b2("")}-${direction}`]: true,
12932
- [`${b2("")}-dot`]: !!props.progressDot
12933
- }, className, b2(""));
13255
+ const classes = classNames(
13256
+ {
13257
+ [`${b2("")}-${direction}`]: true,
13258
+ [`${b2("")}-dot`]: !!props.progressDot
13259
+ },
13260
+ className,
13261
+ b2("")
13262
+ );
12934
13263
  return /* @__PURE__ */ React__default.createElement(DataContext$1.Provider, {
12935
13264
  value: parentSteps
12936
- }, React__default.createElement("div", {
12937
- className: classes,
12938
- ...restProps
12939
- }, children));
13265
+ }, React__default.createElement(
13266
+ "div",
13267
+ {
13268
+ className: classes,
13269
+ ...restProps
13270
+ },
13271
+ children
13272
+ ));
12940
13273
  };
12941
- Steps.defaultProps = defaultProps$s;
13274
+ Steps.defaultProps = defaultProps$t;
12942
13275
  Steps.displayName = "NutSteps";
12943
- const defaultProps$r = {
13276
+ const defaultProps$s = {
12944
13277
  title: "",
12945
13278
  content: "",
12946
13279
  activeIndex: 0,
@@ -12961,7 +13294,7 @@ const Step = (props) => {
12961
13294
  renderContent,
12962
13295
  ...restProps
12963
13296
  } = {
12964
- ...defaultProps$r,
13297
+ ...defaultProps$s,
12965
13298
  ...props
12966
13299
  };
12967
13300
  const parent = useContext$1(DataContext$1);
@@ -12979,9 +13312,13 @@ const Step = (props) => {
12979
13312
  }
12980
13313
  };
12981
13314
  const b2 = cn("step");
12982
- const classes = classNames({
12983
- [`${b2("")}-${getCurrentStatus()}`]: true
12984
- }, className, b2(""));
13315
+ const classes = classNames(
13316
+ {
13317
+ [`${b2("")}-${getCurrentStatus()}`]: true
13318
+ },
13319
+ className,
13320
+ b2("")
13321
+ );
12985
13322
  const renderIconClass = () => {
12986
13323
  if (!dot && icon) {
12987
13324
  return "nut-step-icon is-icon";
@@ -13018,10 +13355,10 @@ const Step = (props) => {
13018
13355
  className: "nut-step-content"
13019
13356
  }, renderContent())));
13020
13357
  };
13021
- Step.defaultProps = defaultProps$r;
13358
+ Step.defaultProps = defaultProps$s;
13022
13359
  Step.displayName = "NutStep";
13023
13360
  const DataContext = createContext({});
13024
- const defaultProps$q = {
13361
+ const defaultProps$r = {
13025
13362
  width: typeof window === "object" ? window.innerWidth : 375,
13026
13363
  height: 0,
13027
13364
  duration: 500,
@@ -13034,11 +13371,12 @@ const defaultProps$q = {
13034
13371
  touchable: true,
13035
13372
  isPreventDefault: true,
13036
13373
  isStopPropagation: true,
13374
+ isCenter: false,
13037
13375
  className: ""
13038
13376
  };
13039
13377
  const DISTANCE = 5;
13040
13378
  const Swiper = React__default.forwardRef((props, ref) => {
13041
- const propSwiper = { ...defaultProps$q, ...props };
13379
+ const propSwiper = { ...defaultProps$r, ...props };
13042
13380
  const {
13043
13381
  children,
13044
13382
  direction,
@@ -13052,6 +13390,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
13052
13390
  isPreventDefault,
13053
13391
  isStopPropagation,
13054
13392
  autoPlay,
13393
+ isCenter,
13055
13394
  ...rest
13056
13395
  } = propSwiper;
13057
13396
  const container = useRef(null);
@@ -13201,7 +13540,6 @@ const Swiper = React__default.forwardRef((props, ref) => {
13201
13540
  props.onChange && props.onChange((targetActive + childCount) % childCount);
13202
13541
  }
13203
13542
  active = targetActive;
13204
- offset2 = targetOffset;
13205
13543
  setActive(targetActive);
13206
13544
  setOffset(targetOffset);
13207
13545
  getStyle(targetOffset);
@@ -13274,7 +13612,15 @@ const Swiper = React__default.forwardRef((props, ref) => {
13274
13612
  });
13275
13613
  const getStyle = (moveOffset = offset) => {
13276
13614
  const target = innerRef.current;
13277
- target.style.transform = `translate3D${!isVertical ? `(${moveOffset}px,0,0)` : `(0,${moveOffset}px,0)`}`;
13615
+ let _offset = 0;
13616
+ if (!isCenter) {
13617
+ _offset = moveOffset;
13618
+ } else {
13619
+ const _size = isVertical ? height : width;
13620
+ const val = isVertical ? rect.height - _size : rect.width - _size;
13621
+ _offset = moveOffset + (active === childCount - 1 && !props.loop ? -val / 2 : val / 2);
13622
+ }
13623
+ target.style.transform = `translate3D${!isVertical ? `(${_offset}px,0,0)` : `(0,${_offset}px,0)`}`;
13278
13624
  target.style.transitionDuration = `${_swiper.current.moving ? 0 : props.duration}ms`;
13279
13625
  target.style[isVertical ? "height" : "width"] = `${Number(size) * childCount}px`;
13280
13626
  target.style[isVertical ? "width" : "height"] = `${isVertical ? width : height}px`;
@@ -13311,7 +13657,11 @@ const Swiper = React__default.forwardRef((props, ref) => {
13311
13657
  if (isShouldMove && touch.stateDirection === props.direction) {
13312
13658
  const offset2 = isVertical ? touch.offsetY : touch.offsetX;
13313
13659
  if (props.loop) {
13314
- pace = offset2 > 0 ? touch.delta > 0 ? -1 : 1 : 0;
13660
+ if (offset2 > 0) {
13661
+ pace = touch.delta > 0 ? -1 : 1;
13662
+ } else {
13663
+ pace = 0;
13664
+ }
13315
13665
  } else {
13316
13666
  pace = -Math[touch.delta > 0 ? "ceil" : "floor"](touch.delta / size);
13317
13667
  }
@@ -13380,18 +13730,23 @@ const Swiper = React__default.forwardRef((props, ref) => {
13380
13730
  target.removeEventListener("touchend", onTouchEnd, false);
13381
13731
  };
13382
13732
  });
13383
- const style = (index2) => {
13384
- const style2 = {};
13733
+ useEffect(() => {
13734
+ return () => {
13735
+ stopAutoPlay();
13736
+ };
13737
+ }, []);
13738
+ const itemStyle = (index2) => {
13739
+ const style = {};
13385
13740
  const _direction = propSwiper.direction || direction;
13386
13741
  const _size = size;
13387
13742
  if (_size) {
13388
- style2[_direction === "horizontal" ? "width" : "height"] = `${_size}px`;
13743
+ style[_direction === "horizontal" ? "width" : "height"] = `${_size}px`;
13389
13744
  }
13390
13745
  const offset2 = childOffset[index2];
13391
13746
  if (offset2) {
13392
- style2.transform = `translate3D${_direction === "horizontal" ? `(${offset2}px,0,0)` : `(0,${offset2}px,0)`}`;
13747
+ style.transform = `translate3D${_direction === "horizontal" ? `(${offset2}px,0,0)` : `(0,${offset2}px,0)`}`;
13393
13748
  }
13394
- return style2;
13749
+ return style;
13395
13750
  };
13396
13751
  React__default.useImperativeHandle(ref, () => ({
13397
13752
  to: to2,
@@ -13410,7 +13765,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
13410
13765
  }, React__default.Children.map(childs, (child, index2) => {
13411
13766
  return /* @__PURE__ */ React__default.createElement("div", {
13412
13767
  className: b2("item-wrapper"),
13413
- style: style(index2),
13768
+ style: itemStyle(index2),
13414
13769
  key: index2
13415
13770
  }, child);
13416
13771
  })), propSwiper.paginationVisible && !("pageContent" in propSwiper) ? /* @__PURE__ */ React__default.createElement("div", {
@@ -13420,30 +13775,28 @@ const Swiper = React__default.forwardRef((props, ref) => {
13420
13775
  })
13421
13776
  }, React__default.Children.map(childs, (item, index2) => {
13422
13777
  return /* @__PURE__ */ React__default.createElement("i", {
13423
- style: {
13424
- backgroundColor: (active + childCount) % childCount === index2 ? propSwiper.paginationColor : "#ddd"
13425
- },
13778
+ style: (active + childCount) % childCount === index2 ? {
13779
+ backgroundColor: propSwiper.paginationColor
13780
+ } : void 0,
13781
+ className: classNames({
13782
+ [`${b2("pagination-item")}`]: true,
13783
+ active: (active + childCount) % childCount === index2
13784
+ }),
13426
13785
  key: index2
13427
13786
  });
13428
13787
  })) : /* @__PURE__ */ React__default.createElement("div", null, pageContent)));
13429
13788
  });
13430
- Swiper.defaultProps = defaultProps$q;
13789
+ Swiper.defaultProps = defaultProps$r;
13431
13790
  Swiper.displayName = "NutSwiper";
13432
- const defaultProps$p = {
13791
+ const defaultProps$q = {
13433
13792
  direction: "horizontal"
13434
13793
  };
13435
13794
  const SwiperItem = React__default.forwardRef((props, ref) => {
13436
- const _props = { ...defaultProps$p, ...props };
13795
+ const _props = { ...defaultProps$q, ...props };
13437
13796
  const { children, direction, size } = _props;
13438
13797
  const parent = useContext$1(DataContext);
13439
- const [offset, setOffset] = useState(0);
13440
13798
  const b2 = cn("swiper-item");
13441
13799
  const classes = classNames(b2(""));
13442
- useImperativeHandle(ref, () => ({
13443
- changeOffset: (num) => {
13444
- setOffset(num);
13445
- }
13446
- }));
13447
13800
  const style = () => {
13448
13801
  const style2 = {};
13449
13802
  const _direction = (parent == null ? void 0 : parent.propSwiper.direction) || direction;
@@ -13458,10 +13811,10 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
13458
13811
  style: style()
13459
13812
  }, children);
13460
13813
  });
13461
- SwiperItem.defaultProps = defaultProps$p;
13814
+ SwiperItem.defaultProps = defaultProps$q;
13462
13815
  SwiperItem.displayName = "NutSwiperItem";
13463
13816
  const AvatarContext = createContext({});
13464
- const defaultProps$o = {
13817
+ const defaultProps$p = {
13465
13818
  size: "",
13466
13819
  icon: "",
13467
13820
  bgColor: "#eee",
@@ -13488,7 +13841,7 @@ const Avatar = (props) => {
13488
13841
  onError,
13489
13842
  ...rest
13490
13843
  } = {
13491
- ...defaultProps$o,
13844
+ ...defaultProps$p,
13492
13845
  ...props
13493
13846
  };
13494
13847
  const [maxSum, setMaxSum] = useState(0);
@@ -13568,9 +13921,9 @@ const Avatar = (props) => {
13568
13921
  className: "text"
13569
13922
  }, ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxContent) ? (_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent : `+ ${avatarIndex - ((_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.maxCount)}`)));
13570
13923
  };
13571
- Avatar.defaultProps = defaultProps$o;
13924
+ Avatar.defaultProps = defaultProps$p;
13572
13925
  Avatar.displayName = "NutAvatar";
13573
- const defaultProps$n = {
13926
+ const defaultProps$o = {
13574
13927
  maxContent: "",
13575
13928
  maxCount: "",
13576
13929
  maxBgColor: "#eee",
@@ -13582,7 +13935,7 @@ const defaultProps$n = {
13582
13935
  };
13583
13936
  const AvatarGroup = (props) => {
13584
13937
  useConfig();
13585
- const propAvatarGroup = { ...defaultProps$n, ...props };
13938
+ const propAvatarGroup = { ...defaultProps$o, ...props };
13586
13939
  const { className, style, children } = propAvatarGroup;
13587
13940
  const avatarGroupRef = useRef(null);
13588
13941
  const b2 = cn("avatar-group");
@@ -13599,9 +13952,9 @@ const AvatarGroup = (props) => {
13599
13952
  ref: avatarGroupRef
13600
13953
  }, children));
13601
13954
  };
13602
- AvatarGroup.defaultProps = defaultProps$n;
13955
+ AvatarGroup.defaultProps = defaultProps$o;
13603
13956
  AvatarGroup.displayName = "NutAvatarGroup";
13604
- const defaultProps$m = {
13957
+ const defaultProps$n = {
13605
13958
  price: 0,
13606
13959
  needSymbol: true,
13607
13960
  symbol: "&yen;",
@@ -13619,7 +13972,7 @@ const Price = (props) => {
13619
13972
  className,
13620
13973
  ...rest
13621
13974
  } = {
13622
- ...defaultProps$m,
13975
+ ...defaultProps$n,
13623
13976
  ...props
13624
13977
  };
13625
13978
  const b2 = cn("price");
@@ -13672,9 +14025,9 @@ const Price = (props) => {
13672
14025
  className: `${b2("small")}`
13673
14026
  }, formatDecimal(price)));
13674
14027
  };
13675
- Price.defaultProps = defaultProps$m;
14028
+ Price.defaultProps = defaultProps$n;
13676
14029
  Price.displayName = "NutPrice";
13677
- const defaultProps$l = {
14030
+ const defaultProps$m = {
13678
14031
  value: "",
13679
14032
  dot: false,
13680
14033
  max: 1e4,
@@ -13686,19 +14039,19 @@ const defaultProps$l = {
13686
14039
  };
13687
14040
  const Badge = (props) => {
13688
14041
  const { children, dot, top, right, zIndex, color, icons } = {
13689
- ...defaultProps$l,
14042
+ ...defaultProps$m,
13690
14043
  ...props
13691
14044
  };
13692
- const content = () => {
14045
+ function content() {
13693
14046
  if (dot)
13694
- return;
14047
+ return void 0;
13695
14048
  const { value } = props;
13696
14049
  const { max } = props;
13697
14050
  if (typeof value === "number" && typeof max === "number") {
13698
14051
  return max < value ? `${max}+` : value;
13699
14052
  }
13700
14053
  return value;
13701
- };
14054
+ }
13702
14055
  const getStyle = () => {
13703
14056
  const style = {};
13704
14057
  style.top = `${top}px`;
@@ -13709,7 +14062,7 @@ const Badge = (props) => {
13709
14062
  };
13710
14063
  return /* @__PURE__ */ React__default.createElement("div", {
13711
14064
  className: "nut-badge"
13712
- }, icons != "" && /* @__PURE__ */ React__default.createElement("div", {
14065
+ }, icons !== "" && /* @__PURE__ */ React__default.createElement("div", {
13713
14066
  className: "slot-icons"
13714
14067
  }, /* @__PURE__ */ React__default.createElement(Icon, {
13715
14068
  className: "_icon",
@@ -13721,9 +14074,9 @@ const Badge = (props) => {
13721
14074
  style: getStyle()
13722
14075
  }, content()));
13723
14076
  };
13724
- Badge.defaultProps = defaultProps$l;
14077
+ Badge.defaultProps = defaultProps$m;
13725
14078
  Badge.displayName = "NutBadge";
13726
- const defaultProps$k = {
14079
+ const defaultProps$l = {
13727
14080
  type: "default",
13728
14081
  color: "",
13729
14082
  textColor: "",
@@ -13751,7 +14104,7 @@ const Tag = (props) => {
13751
14104
  onClick,
13752
14105
  onClose
13753
14106
  } = {
13754
- ...defaultProps$k,
14107
+ ...defaultProps$l,
13755
14108
  ...props
13756
14109
  };
13757
14110
  const [btnName, setBtnName] = useState("");
@@ -13779,7 +14132,7 @@ const Tag = (props) => {
13779
14132
  ${mark ? `${prefixCls2}--mark` : ""}
13780
14133
  ${closeable ? `${prefixCls2}--close` : ""}`;
13781
14134
  };
13782
- const handleClick = (e2) => {
14135
+ const handleClick2 = (e2) => {
13783
14136
  if (props.onClick) {
13784
14137
  props.onClick(e2);
13785
14138
  }
@@ -13802,7 +14155,7 @@ const Tag = (props) => {
13802
14155
  return /* @__PURE__ */ React__default.createElement("div", null, closeable ? isTagShow && /* @__PURE__ */ React__default.createElement("div", {
13803
14156
  className: `${btnName}`,
13804
14157
  style: getStyle(),
13805
- onClick: (e2) => handleClick(e2)
14158
+ onClick: (e2) => handleClick2(e2)
13806
14159
  }, children && /* @__PURE__ */ React__default.createElement("span", {
13807
14160
  className: "text"
13808
14161
  }, children), /* @__PURE__ */ React__default.createElement(Icon, {
@@ -13818,12 +14171,12 @@ const Tag = (props) => {
13818
14171
  })) : /* @__PURE__ */ React__default.createElement("div", {
13819
14172
  className: `${btnName}`,
13820
14173
  style: getStyle(),
13821
- onClick: (e2) => handleClick(e2)
14174
+ onClick: (e2) => handleClick2(e2)
13822
14175
  }, children && /* @__PURE__ */ React__default.createElement("span", {
13823
14176
  className: "text"
13824
14177
  }, children)));
13825
14178
  };
13826
- Tag.defaultProps = defaultProps$k;
14179
+ Tag.defaultProps = defaultProps$l;
13827
14180
  Tag.displayName = "NutTag";
13828
14181
  function fillRef(ref, node) {
13829
14182
  if (typeof ref === "function") {
@@ -13840,9 +14193,6 @@ function composeRef(...refs) {
13840
14193
  };
13841
14194
  }
13842
14195
  class Trigger extends React__default.Component {
13843
- constructor(props) {
13844
- super(props);
13845
- }
13846
14196
  fireEvents(type, e2) {
13847
14197
  const childCallback = this.props.children.props[type];
13848
14198
  if (childCallback) {
@@ -13882,7 +14232,7 @@ const getEleAttr = (ele) => {
13882
14232
  }
13883
14233
  return null;
13884
14234
  };
13885
- const defaultProps$j = {
14235
+ const defaultProps$k = {
13886
14236
  list: [],
13887
14237
  theme: "light",
13888
14238
  location: "bottom",
@@ -13903,7 +14253,7 @@ const Popover = (props) => {
13903
14253
  onClick,
13904
14254
  ...reset
13905
14255
  } = {
13906
- ...defaultProps$j,
14256
+ ...defaultProps$k,
13907
14257
  ...props
13908
14258
  };
13909
14259
  const goodItem = useRef(null);
@@ -13920,19 +14270,19 @@ const Popover = (props) => {
13920
14270
  const [popoverContent, setPopoverContent] = useState("");
13921
14271
  const [popoverArrow, setPopoverArrow] = useState("");
13922
14272
  useEffect(() => {
13923
- setClasses(classes_self());
13924
- setPopoverContent(popoverContent_self());
13925
- setPopoverArrow(popoverArrow_self());
14273
+ setClasses(classesSelf());
14274
+ setPopoverContent(popoverContentSelf());
14275
+ setPopoverArrow(popoverArrowSelf());
13926
14276
  }, [list, theme]);
13927
14277
  const getStyle = () => {
13928
14278
  const style2 = {};
13929
- if (location == "top") {
14279
+ if (location === "top") {
13930
14280
  style2.bottom = elHeight + 20;
13931
14281
  style2.left = 0;
13932
- } else if (location == "right") {
14282
+ } else if (location === "right") {
13933
14283
  style2.top = 0;
13934
14284
  style2.right = -elWidth - 20;
13935
- } else if (location == "left") {
14285
+ } else if (location === "left") {
13936
14286
  style2.top = 0;
13937
14287
  style2.left = -elWidth - 20;
13938
14288
  } else {
@@ -13947,13 +14297,13 @@ const Popover = (props) => {
13947
14297
  };
13948
14298
  const getArrowStyle = () => {
13949
14299
  const style2 = {};
13950
- if (location == "top") {
14300
+ if (location === "top") {
13951
14301
  style2.bottom = -20;
13952
14302
  style2.left = elWidth / 2;
13953
- } else if (location == "right") {
14303
+ } else if (location === "right") {
13954
14304
  style2.top = 20;
13955
14305
  style2.left = -20;
13956
- } else if (location == "left") {
14306
+ } else if (location === "left") {
13957
14307
  style2.top = 20;
13958
14308
  style2.right = -20;
13959
14309
  } else {
@@ -13966,22 +14316,22 @@ const Popover = (props) => {
13966
14316
  style2.right += "px";
13967
14317
  return style2;
13968
14318
  };
13969
- const classes_self = () => {
14319
+ const classesSelf = () => {
13970
14320
  const prefixCls = "nut-popover";
13971
14321
  return `${prefixCls}
13972
14322
  ${theme ? `${prefixCls}--${theme}` : ""}`;
13973
14323
  };
13974
- const popoverContent_self = () => {
14324
+ const popoverContentSelf = () => {
13975
14325
  const prefixCls = "popoverContent";
13976
14326
  return `${prefixCls}
13977
14327
  ${location ? `${prefixCls}--${location}` : ""}`;
13978
14328
  };
13979
- const popoverArrow_self = () => {
14329
+ const popoverArrowSelf = () => {
13980
14330
  const prefixCls = "popoverArrow";
13981
14331
  return `${prefixCls}
13982
14332
  ${location ? `${prefixCls}--${location}` : ""}`;
13983
14333
  };
13984
- const handleClick = (e2) => {
14334
+ const handleClick2 = (e2) => {
13985
14335
  if (props.onClick) {
13986
14336
  props.onClick(e2);
13987
14337
  }
@@ -13993,7 +14343,7 @@ const Popover = (props) => {
13993
14343
  }, /* @__PURE__ */ React__default.createElement(Trigger, {
13994
14344
  forwardedRef: goodItem
13995
14345
  }, /* @__PURE__ */ React__default.createElement("div", {
13996
- onClick: (e2) => handleClick(e2)
14346
+ onClick: (e2) => handleClick2(e2)
13997
14347
  }, Array.isArray(children) ? children[0] : children, visible ? /* @__PURE__ */ React__default.createElement("div", {
13998
14348
  className: `${popoverContent}`,
13999
14349
  style: getStyle()
@@ -14012,9 +14362,9 @@ const Popover = (props) => {
14012
14362
  }, item.name));
14013
14363
  })) : null)));
14014
14364
  };
14015
- Popover.defaultProps = defaultProps$j;
14365
+ Popover.defaultProps = defaultProps$k;
14016
14366
  Popover.displayName = "NutPopover";
14017
- const defaultProps$i = {
14367
+ const defaultProps$j = {
14018
14368
  width: "100px",
14019
14369
  height: "100px",
14020
14370
  row: 1,
@@ -14042,7 +14392,7 @@ const Skeleton = (props) => {
14042
14392
  avatarShape,
14043
14393
  ...restProps
14044
14394
  } = {
14045
- ...defaultProps$i,
14395
+ ...defaultProps$j,
14046
14396
  ...props
14047
14397
  };
14048
14398
  const b2 = cn("skeleton");
@@ -14097,9 +14447,9 @@ const Skeleton = (props) => {
14097
14447
  });
14098
14448
  })))));
14099
14449
  };
14100
- Skeleton.defaultProps = defaultProps$i;
14450
+ Skeleton.defaultProps = defaultProps$j;
14101
14451
  Skeleton.displayName = "NutSkeleton";
14102
- const defaultProps$h = {
14452
+ const defaultProps$i = {
14103
14453
  showPlainText: false,
14104
14454
  showDays: false,
14105
14455
  paused: false,
@@ -14122,7 +14472,7 @@ const CountDown = (props) => {
14122
14472
  onUpdate,
14123
14473
  children,
14124
14474
  ...rest
14125
- } = { ...defaultProps$h, ...props };
14475
+ } = { ...defaultProps$i, ...props };
14126
14476
  const b2 = cn("countdown");
14127
14477
  const [restTimeStamp, setRestTime] = useState(0);
14128
14478
  const stateRef = useRef({
@@ -14269,9 +14619,9 @@ const CountDown = (props) => {
14269
14619
  className: b2("block")
14270
14620
  }, resttime.s))));
14271
14621
  };
14272
- CountDown.defaultProps = defaultProps$h;
14622
+ CountDown.defaultProps = defaultProps$i;
14273
14623
  CountDown.displayName = "NutCountDown";
14274
- const defaultProps$g = {
14624
+ const defaultProps$h = {
14275
14625
  activeName: ["0"],
14276
14626
  accordion: false,
14277
14627
  icon: "",
@@ -14282,75 +14632,78 @@ const defaultProps$g = {
14282
14632
  function areEqual(prevProps, nextProps) {
14283
14633
  return JSON.stringify(prevProps.activeName) === JSON.stringify(nextProps.activeName);
14284
14634
  }
14285
- const Collapse = memo((props) => {
14286
- const {
14287
- children,
14288
- activeName,
14289
- accordion,
14290
- icon,
14291
- rotate,
14292
- iconSize,
14293
- iconColor,
14294
- change
14295
- } = {
14296
- ...defaultProps$g,
14297
- ...props
14298
- };
14299
- const childrenDom = React__default.Children.toArray(children);
14300
- const [defaultOpenIndex, setDefaultOpenIndex] = useState([]);
14301
- const handleActiveName = () => {
14302
- let activeArr = [];
14303
- if (!Array.isArray(activeName)) {
14304
- activeArr.push(activeName.toString());
14305
- } else {
14306
- if (accordion && activeName.length > 1) {
14307
- console.warn("\u624B\u98CE\u7434\u6A21\u5F0F\u4E0D\u652F\u6301\u4F20\u9012\u591A\u4E2A\u6253\u5F00\u9875\u7B7E");
14308
- }
14309
- const activeNameStr = activeName.map((item) => {
14310
- return item.toString();
14311
- });
14312
- activeArr = [...activeNameStr];
14313
- }
14314
- return activeArr;
14315
- };
14316
- const colBem = cn("collapse");
14317
- useEffect(() => {
14318
- const activeArr = handleActiveName();
14319
- setDefaultOpenIndex(activeArr);
14320
- }, [activeName]);
14321
- const onToggle = (isOpen, name) => {
14322
- let newOpenIndex = [...defaultOpenIndex];
14323
- if (isOpen) {
14324
- const removeIndex = newOpenIndex.findIndex((value) => {
14325
- return value === name;
14326
- });
14327
- newOpenIndex.splice(removeIndex, 1);
14328
- } else {
14329
- if (accordion) {
14330
- newOpenIndex = [name];
14331
- } else {
14332
- newOpenIndex.push(name);
14333
- }
14334
- }
14335
- setDefaultOpenIndex(newOpenIndex);
14336
- change && change(!isOpen, name);
14337
- };
14338
- return /* @__PURE__ */ React__default.createElement("div", {
14339
- className: colBem()
14340
- }, childrenDom.map((item) => {
14341
- return React__default.cloneElement(item, {
14342
- isOpen: defaultOpenIndex.includes(item.props.name),
14343
- onToggle: (isOpen, name) => onToggle(isOpen, name),
14635
+ const Collapse = memo(
14636
+ (props) => {
14637
+ const {
14638
+ children,
14639
+ activeName,
14640
+ accordion,
14344
14641
  icon,
14345
14642
  rotate,
14346
14643
  iconSize,
14347
- iconColor
14348
- });
14349
- }));
14350
- }, areEqual);
14351
- Collapse.defaultProps = defaultProps$g;
14644
+ iconColor,
14645
+ change
14646
+ } = {
14647
+ ...defaultProps$h,
14648
+ ...props
14649
+ };
14650
+ const childrenDom = React__default.Children.toArray(children);
14651
+ const [defaultOpenIndex, setDefaultOpenIndex] = useState([]);
14652
+ const handleActiveName = () => {
14653
+ let activeArr = [];
14654
+ if (!Array.isArray(activeName)) {
14655
+ activeArr.push(activeName.toString());
14656
+ } else {
14657
+ if (accordion && activeName.length > 1) {
14658
+ console.warn("\u624B\u98CE\u7434\u6A21\u5F0F\u4E0D\u652F\u6301\u4F20\u9012\u591A\u4E2A\u6253\u5F00\u9875\u7B7E");
14659
+ }
14660
+ const activeNameStr = activeName.map((item) => {
14661
+ return item.toString();
14662
+ });
14663
+ activeArr = [...activeNameStr];
14664
+ }
14665
+ return activeArr;
14666
+ };
14667
+ const colBem = cn("collapse");
14668
+ useEffect(() => {
14669
+ const activeArr = handleActiveName();
14670
+ setDefaultOpenIndex(activeArr);
14671
+ }, [activeName]);
14672
+ const onToggle = (isOpen, name) => {
14673
+ let newOpenIndex = [...defaultOpenIndex];
14674
+ if (isOpen) {
14675
+ const removeIndex = newOpenIndex.findIndex((value) => {
14676
+ return value === name;
14677
+ });
14678
+ newOpenIndex.splice(removeIndex, 1);
14679
+ } else {
14680
+ if (accordion) {
14681
+ newOpenIndex = [name];
14682
+ } else {
14683
+ newOpenIndex.push(name);
14684
+ }
14685
+ }
14686
+ setDefaultOpenIndex(newOpenIndex);
14687
+ change && change(!isOpen, name);
14688
+ };
14689
+ return /* @__PURE__ */ React__default.createElement("div", {
14690
+ className: colBem()
14691
+ }, childrenDom.map((item) => {
14692
+ return React__default.cloneElement(item, {
14693
+ isOpen: defaultOpenIndex.includes(item.props.name),
14694
+ onToggle: (isOpen, name) => onToggle(isOpen, name),
14695
+ icon,
14696
+ rotate,
14697
+ iconSize,
14698
+ iconColor
14699
+ });
14700
+ }));
14701
+ },
14702
+ areEqual
14703
+ );
14704
+ Collapse.defaultProps = defaultProps$h;
14352
14705
  Collapse.displayName = "NutCollapse";
14353
- const defaultProps$f = {
14706
+ const defaultProps$g = {
14354
14707
  title: "",
14355
14708
  name: "",
14356
14709
  isOpen: false,
@@ -14384,7 +14737,7 @@ const CollapseItem = (props) => {
14384
14737
  iconColor,
14385
14738
  ...rest
14386
14739
  } = {
14387
- ...defaultProps$f,
14740
+ ...defaultProps$g,
14388
14741
  ...props
14389
14742
  };
14390
14743
  const [domHeight, setDomHeight] = useState(-1);
@@ -14398,18 +14751,23 @@ const CollapseItem = (props) => {
14398
14751
  setCurrHeight("auto");
14399
14752
  setUpdate(!update2);
14400
14753
  }, [children]);
14401
- const measuredRef = useCallback((node) => {
14402
- if (node !== null) {
14403
- setDomHeight(node.getBoundingClientRect().height);
14404
- }
14405
- }, [children, update2]);
14754
+ const measuredRef = useCallback(
14755
+ (node) => {
14756
+ if (node !== null) {
14757
+ setDomHeight(node.getBoundingClientRect().height);
14758
+ }
14759
+ },
14760
+ [update2]
14761
+ );
14406
14762
  useEffect(() => {
14407
- if (domHeight !== -1) {
14408
- isOpen ? setCurrHeight(`${domHeight}px`) : setCurrHeight("0px");
14409
- }
14410
- const newIconStyle = isOpen ? { transform: `translateY(-50%) rotate(${rotate}deg)` } : { transform: "translateY(-50%)" };
14411
- setIconStyle(newIconStyle);
14412
- }, [isOpen, domHeight]);
14763
+ setTimeout(() => {
14764
+ if (domHeight !== -1) {
14765
+ isOpen ? setCurrHeight(`${domHeight}px`) : setCurrHeight("0px");
14766
+ }
14767
+ const newIconStyle = isOpen ? { transform: `translateY(-50%) rotate(${rotate}deg)` } : { transform: "translateY(-50%)" };
14768
+ setIconStyle(newIconStyle);
14769
+ }, 10);
14770
+ }, [isOpen, domHeight, rotate]);
14413
14771
  return /* @__PURE__ */ React__default.createElement("div", {
14414
14772
  className: colBem(),
14415
14773
  ...rest
@@ -14422,13 +14780,13 @@ const CollapseItem = (props) => {
14422
14780
  }
14423
14781
  }, /* @__PURE__ */ React__default.createElement("div", {
14424
14782
  className: colBem("title")
14425
- }, titleIcon && titleIconPosition == "left" && /* @__PURE__ */ React__default.createElement("b", {
14783
+ }, titleIcon && titleIconPosition === "left" && /* @__PURE__ */ React__default.createElement("b", {
14426
14784
  className: colBem("title-icon-left")
14427
14785
  }, /* @__PURE__ */ React__default.createElement(Icon, {
14428
14786
  name: titleIcon,
14429
14787
  size: titleIconSize,
14430
14788
  color: disabled ? "#C2C2C2" : titleIconColor
14431
- })), title, titleIcon && titleIconPosition == "right" && /* @__PURE__ */ React__default.createElement("b", {
14789
+ })), title, titleIcon && titleIconPosition === "right" && /* @__PURE__ */ React__default.createElement("b", {
14432
14790
  className: colBem("title-icon-right")
14433
14791
  }, /* @__PURE__ */ React__default.createElement(Icon, {
14434
14792
  name: titleIcon,
@@ -14453,9 +14811,9 @@ const CollapseItem = (props) => {
14453
14811
  className: colBem("content-text")
14454
14812
  }, children)));
14455
14813
  };
14456
- CollapseItem.defaultProps = defaultProps$f;
14814
+ CollapseItem.defaultProps = defaultProps$g;
14457
14815
  CollapseItem.displayName = "NutCollapseItem";
14458
- const defaultProps$e = {
14816
+ const defaultProps$f = {
14459
14817
  maxLen: 0,
14460
14818
  endNumber: "",
14461
14819
  delaySpeed: 300,
@@ -14473,7 +14831,7 @@ const CountUp = (props) => {
14473
14831
  thousands,
14474
14832
  ...reset
14475
14833
  } = {
14476
- ...defaultProps$e,
14834
+ ...defaultProps$f,
14477
14835
  ...props
14478
14836
  };
14479
14837
  const b2 = cn("countup");
@@ -14489,8 +14847,12 @@ const CountUp = (props) => {
14489
14847
  const numerArr = getShowNumber();
14490
14848
  const setNumberTransform = () => {
14491
14849
  if (countupRef.current) {
14492
- const numberItems = countupRef.current.querySelectorAll(".nut-countup__number");
14493
- const numberFilterArr = numerArr.filter((item) => !Number.isNaN(Number(item)));
14850
+ const numberItems = countupRef.current.querySelectorAll(
14851
+ ".nut-countup__number"
14852
+ );
14853
+ const numberFilterArr = numerArr.filter(
14854
+ (item) => !Number.isNaN(Number(item))
14855
+ );
14494
14856
  Object.keys(numberItems).forEach((key) => {
14495
14857
  const elem = numberItems[Number(key)];
14496
14858
  const idx = Number(numberFilterArr[Number(key)]);
@@ -14539,9 +14901,9 @@ const CountUp = (props) => {
14539
14901
  }, item));
14540
14902
  })));
14541
14903
  };
14542
- CountUp.defaultProps = defaultProps$e;
14904
+ CountUp.defaultProps = defaultProps$f;
14543
14905
  CountUp.displayName = "NutCountUp";
14544
- const defaultProps$d = {};
14906
+ const defaultProps$e = {};
14545
14907
  class AnimatingNumbers extends Component {
14546
14908
  constructor(props) {
14547
14909
  super(props);
@@ -14553,7 +14915,7 @@ class AnimatingNumbers extends Component {
14553
14915
  });
14554
14916
  }
14555
14917
  }
14556
- AnimatingNumbers.defaultProps = defaultProps$d;
14918
+ AnimatingNumbers.defaultProps = defaultProps$e;
14557
14919
  AnimatingNumbers.displayName = "NutAnimatingNumbers";
14558
14920
  AnimatingNumbers.CountUp = CountUp;
14559
14921
  AnimatingNumbers.CountUp = CountUp;
@@ -14562,7 +14924,7 @@ const defaultStatus = {
14562
14924
  error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
14563
14925
  network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
14564
14926
  };
14565
- const defaultProps$c = {
14927
+ const defaultProps$d = {
14566
14928
  description: "\u65E0\u5185\u5BB9",
14567
14929
  image: "empty",
14568
14930
  imageSize: "",
@@ -14570,9 +14932,9 @@ const defaultProps$c = {
14570
14932
  };
14571
14933
  const Empty = (props) => {
14572
14934
  const { locale } = useConfig();
14573
- defaultProps$c.description = locale.noData || defaultProps$c.description;
14935
+ defaultProps$d.description = locale.noData || defaultProps$d.description;
14574
14936
  const { image, imageSize, description, children, className, ...rest } = {
14575
- ...defaultProps$c,
14937
+ ...defaultProps$d,
14576
14938
  ...props
14577
14939
  };
14578
14940
  const [imgStyle, setImgStyle] = useState({});
@@ -14607,14 +14969,14 @@ const Empty = (props) => {
14607
14969
  return /* @__PURE__ */ React__default.createElement("div", {
14608
14970
  className: `${b2()} ${className}`,
14609
14971
  ...rest
14610
- }, /* @__PURE__ */ React__default.createElement("div", {
14972
+ }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", {
14611
14973
  className: b2("image"),
14612
14974
  style: imgStyle
14613
14975
  }, imageNode), typeof description === "string" ? /* @__PURE__ */ React__default.createElement("div", {
14614
14976
  className: b2("description")
14615
- }, description) : { description }, children);
14977
+ }, description) : { description }, children));
14616
14978
  };
14617
- Empty.defaultProps = defaultProps$c;
14979
+ Empty.defaultProps = defaultProps$d;
14618
14980
  Empty.displayName = "NutEmpty";
14619
14981
  const initPositinoCache = (reaItemSize, length = 0) => {
14620
14982
  let index2 = 0;
@@ -14727,7 +15089,7 @@ const updateItemSize = (positions, items, sizeKey) => {
14727
15089
  }
14728
15090
  });
14729
15091
  };
14730
- const defaultProps$b = {};
15092
+ const defaultProps$c = {};
14731
15093
  const VirtualList = (props) => {
14732
15094
  const {
14733
15095
  sourceData = [],
@@ -14886,8 +15248,131 @@ const VirtualList = (props) => {
14886
15248
  }) : data);
14887
15249
  }))));
14888
15250
  };
14889
- VirtualList.defaultProps = defaultProps$b;
15251
+ VirtualList.defaultProps = defaultProps$c;
14890
15252
  VirtualList.displayName = "NutVirtualList";
15253
+ const defaultProps$b = {
15254
+ className: "",
15255
+ style: {},
15256
+ columns: [],
15257
+ data: [],
15258
+ bordered: true,
15259
+ striped: false,
15260
+ noData: "\u65E0\u6570\u636E"
15261
+ };
15262
+ const Table = (props) => {
15263
+ const { locale } = useConfig();
15264
+ defaultProps$b.noData = locale.noData;
15265
+ const {
15266
+ children,
15267
+ className,
15268
+ style,
15269
+ columns,
15270
+ data,
15271
+ bordered,
15272
+ summary,
15273
+ striped,
15274
+ noData,
15275
+ onSorter,
15276
+ ...rest
15277
+ } = {
15278
+ ...defaultProps$b,
15279
+ ...props
15280
+ };
15281
+ const [curData, setCurData] = useState(data);
15282
+ useEffect(() => {
15283
+ if (data && String(data) !== String(curData)) {
15284
+ setCurData(data);
15285
+ }
15286
+ }, [data]);
15287
+ const b2 = cn("table");
15288
+ const classes = classNames({});
15289
+ const cls = classNames(b2(), classes, className);
15290
+ const handleSorterClick = (item) => {
15291
+ if (item.sorter) {
15292
+ onSorter && onSorter(item, curData);
15293
+ if (typeof item.sorter === "function") {
15294
+ setCurData(curData.sort(item.sorter));
15295
+ } else {
15296
+ setCurData(item.sorter === "default" ? curData.sort() : curData);
15297
+ }
15298
+ }
15299
+ };
15300
+ const cellClasses = (item) => {
15301
+ return {
15302
+ "nut-table__main__head__tr--border": props.bordered,
15303
+ [`nut-table__main__head__tr--align${item.align ? item.align : ""}`]: true
15304
+ };
15305
+ };
15306
+ const getColumnItem = (value) => {
15307
+ return columns.filter((item) => item.key === value)[0];
15308
+ };
15309
+ const renderHeadCells = () => {
15310
+ return columns.map((item, index2) => {
15311
+ return /* @__PURE__ */ React__default.createElement("span", {
15312
+ className: classNames(
15313
+ "nut-table__main__head__tr__th",
15314
+ cellClasses(item)
15315
+ ),
15316
+ key: item.key,
15317
+ onClick: () => handleSorterClick(item)
15318
+ }, item.title, item.sorter && /* @__PURE__ */ React__default.createElement(Icon, {
15319
+ name: "down-arrow",
15320
+ size: "12px"
15321
+ }));
15322
+ });
15323
+ };
15324
+ const sortDataItem = () => {
15325
+ return columns.map((columns2) => {
15326
+ return [columns2.key, columns2.render];
15327
+ });
15328
+ };
15329
+ const renderBodyTds = (item) => {
15330
+ return sortDataItem().map(([value, render], index2) => {
15331
+ return /* @__PURE__ */ React__default.createElement("span", {
15332
+ className: classNames(
15333
+ "nut-table__main__body__tr__td",
15334
+ cellClasses(getColumnItem(value))
15335
+ ),
15336
+ key: value
15337
+ }, typeof item[value] === "function" || typeof render === "function" ? /* @__PURE__ */ React__default.createElement("div", null, render ? render(item) : item[value](item)) : item[value]);
15338
+ });
15339
+ };
15340
+ const renderBoyTrs = () => {
15341
+ return curData.map((item, index2) => {
15342
+ return /* @__PURE__ */ React__default.createElement("div", {
15343
+ className: "nut-table__main__body__tr",
15344
+ key: index2
15345
+ }, renderBodyTds(item));
15346
+ });
15347
+ };
15348
+ return /* @__PURE__ */ React__default.createElement("div", {
15349
+ className: cls,
15350
+ style,
15351
+ ...rest
15352
+ }, /* @__PURE__ */ React__default.createElement("div", {
15353
+ className: classNames("nut-table__main", {
15354
+ "nut-table__main--striped": striped
15355
+ })
15356
+ }, /* @__PURE__ */ React__default.createElement("div", {
15357
+ className: "nut-table__main__head"
15358
+ }, /* @__PURE__ */ React__default.createElement("div", {
15359
+ className: "nut-table__main__head__tr"
15360
+ }, renderHeadCells())), /* @__PURE__ */ React__default.createElement("div", {
15361
+ className: "nut-table__main__body"
15362
+ }, renderBoyTrs())), summary && /* @__PURE__ */ React__default.createElement("div", {
15363
+ className: "nut-table__summary"
15364
+ }, /* @__PURE__ */ React__default.createElement("span", {
15365
+ className: "nut-table__summary__text"
15366
+ }, summary)), curData.length === 0 && /* @__PURE__ */ React__default.createElement("div", {
15367
+ className: "nut-table__nodata"
15368
+ }, /* @__PURE__ */ React__default.createElement("div", {
15369
+ className: "nut-table__nodata"
15370
+ }, /* @__PURE__ */ React__default.createElement("div", {
15371
+ className: "nut-table__nodata__text"
15372
+ }, noData))));
15373
+ };
15374
+ Table.defaultProps = defaultProps$b;
15375
+ Table.displayName = "NutTable";
14891
15376
  const defaultProps$a = {
14892
15377
  source: {
14893
15378
  type: {},
@@ -15146,7 +15631,8 @@ const ExistRender = (props) => {
15146
15631
  }, existAddress.map((item, index2) => {
15147
15632
  return /* @__PURE__ */ React__default.createElement("li", {
15148
15633
  className: b2("exist-item"),
15149
- key: index2,
15634
+ key: index2
15635
+ }, /* @__PURE__ */ React__default.createElement("div", {
15150
15636
  onClick: () => selectedExist(item)
15151
15637
  }, /* @__PURE__ */ React__default.createElement(Icon, {
15152
15638
  className: b2("exist-item-icon"),
@@ -15163,7 +15649,7 @@ const ExistRender = (props) => {
15163
15649
  className: "exist-item-info-phone"
15164
15650
  }, item.phone)), /* @__PURE__ */ React__default.createElement("div", {
15165
15651
  className: "exist-item-info-bottom"
15166
- }, /* @__PURE__ */ React__default.createElement("div", null, item.provinceName + item.cityName + item.countyName + item.townName + item.addressDetail))));
15652
+ }, /* @__PURE__ */ React__default.createElement("div", null, item.provinceName + item.cityName + item.countyName + item.townName + item.addressDetail)))));
15167
15653
  }))), isShowCustomAddress && /* @__PURE__ */ React__default.createElement("div", {
15168
15654
  className: b2("choose-other"),
15169
15655
  onClick: switchModule
@@ -15172,6 +15658,7 @@ const ExistRender = (props) => {
15172
15658
  }, locale.address.chooseAnotherAddress || customAndExistTitle)));
15173
15659
  };
15174
15660
  const defaultProps$7 = {
15661
+ modelValue: [],
15175
15662
  type: "custom",
15176
15663
  province: [],
15177
15664
  city: [],
@@ -15184,6 +15671,7 @@ const CustomRender = (props) => {
15184
15671
  const {
15185
15672
  children,
15186
15673
  type,
15674
+ modelValue,
15187
15675
  height,
15188
15676
  province,
15189
15677
  city,
@@ -15216,7 +15704,9 @@ const CustomRender = (props) => {
15216
15704
  return [];
15217
15705
  data.forEach((item) => {
15218
15706
  if (!item.title) {
15219
- console.error("[NutUI] <Address> \u8BF7\u68C0\u67E5\u6570\u7EC4\u9009\u9879\u7684 title \u503C\u662F\u5426\u6709\u8BBE\u7F6E ,title \u4E3A\u5FC5\u586B\u9879 .");
15707
+ console.error(
15708
+ "[NutUI] <Address> \u8BF7\u68C0\u67E5\u6570\u7EC4\u9009\u9879\u7684 title \u503C\u662F\u5426\u6709\u8BBE\u7F6E ,title \u4E3A\u5FC5\u586B\u9879 ."
15709
+ );
15220
15710
  }
15221
15711
  });
15222
15712
  const newData = [];
@@ -15224,7 +15714,9 @@ const CustomRender = (props) => {
15224
15714
  return a.title.localeCompare(b22.title);
15225
15715
  });
15226
15716
  data.forEach((item) => {
15227
- const index2 = newData.findIndex((value) => value.title === item.title);
15717
+ const index2 = newData.findIndex(
15718
+ (value) => value.title === item.title
15719
+ );
15228
15720
  if (index2 <= -1) {
15229
15721
  newData.push({
15230
15722
  title: item.title,
@@ -15246,9 +15738,7 @@ const CustomRender = (props) => {
15246
15738
  town: isCustom2() ? transformData(town) : town
15247
15739
  });
15248
15740
  const [selectedRegion, setSelectedRegion] = useState({
15249
- province: {
15250
- name: ""
15251
- },
15741
+ province: { name: "" },
15252
15742
  city: { name: "" },
15253
15743
  country: { name: "" },
15254
15744
  town: { name: "" }
@@ -15280,26 +15770,28 @@ const CustomRender = (props) => {
15280
15770
  const calBack = {
15281
15771
  next: "",
15282
15772
  value: "",
15283
- custom: tabName[tabIndex],
15284
- selectedRegion: {}
15285
- };
15286
- setSelectedRegion({
15287
- ...selectedRegion,
15288
- [tabName[tabIndex]]: item
15289
- });
15290
- calBack.selectedRegion = {
15291
- ...selectedRegion,
15292
- [tabName[tabIndex]]: item
15773
+ custom: tabName[tabIndex]
15293
15774
  };
15294
- for (let i = tabIndex; i < tabIndex - 1; i++) {
15295
- setSelectedRegion(() => ({
15296
- ...selectedRegion,
15297
- [tabName[i + 1]]: {}
15298
- }));
15775
+ const bbselectedRegion = selectedRegion ? { ...selectedRegion } : null;
15776
+ if (bbselectedRegion) {
15777
+ setSelectedRegion({
15778
+ ...bbselectedRegion,
15779
+ [tabName[tabIndex]]: item
15780
+ });
15299
15781
  calBack.selectedRegion = {
15300
- ...selectedRegion,
15301
- [tabName[i + 1]]: {}
15782
+ ...bbselectedRegion,
15783
+ [tabName[tabIndex]]: item
15302
15784
  };
15785
+ for (let i = tabIndex; i < tabIndex - 1; i++) {
15786
+ setSelectedRegion({
15787
+ ...bbselectedRegion,
15788
+ [tabName[i + 1]]: null
15789
+ });
15790
+ calBack.selectedRegion = {
15791
+ ...bbselectedRegion,
15792
+ [tabName[i + 1]]: {}
15793
+ };
15794
+ }
15303
15795
  }
15304
15796
  if (tabIndex < 4) {
15305
15797
  if (tabIndex === 3) {
@@ -15322,6 +15814,39 @@ const CustomRender = (props) => {
15322
15814
  }
15323
15815
  onTabClick && onTabClick(key);
15324
15816
  };
15817
+ const initCustomSelected = () => {
15818
+ if (modelValue.length > 0) {
15819
+ let tagIndex = 0;
15820
+ const selectedRegionC = selectedRegion && Object.assign(selectedRegion);
15821
+ for (let index2 = 0; index2 < modelValue.length; index2++) {
15822
+ if (regionList[tabName[index2]].length === 0) {
15823
+ tagIndex = index2 - 1;
15824
+ setTabIndex(index2 - 1);
15825
+ break;
15826
+ } else {
15827
+ const val = modelValue[index2];
15828
+ const arr = regionList[tabName[index2]];
15829
+ if (privateType === "custom") {
15830
+ selectedRegionC[[tabName[index2]]] = arr.filter(
15831
+ (item) => item.id === val
15832
+ )[0];
15833
+ } else if (privateType === "custom2") {
15834
+ const sumArr = [];
15835
+ arr.forEach((item) => {
15836
+ sumArr.push(...item.list);
15837
+ });
15838
+ selectedRegionC[[tabName[index2]]] = sumArr.filter(
15839
+ (item) => item.id === val
15840
+ )[0];
15841
+ }
15842
+ tagIndex = index2;
15843
+ setSelectedRegion(selectedRegionC);
15844
+ }
15845
+ }
15846
+ setTabIndex(tagIndex);
15847
+ lineAnimation(tagIndex);
15848
+ }
15849
+ };
15325
15850
  const handleElevatorItem = (key, item) => {
15326
15851
  nextAreaList(item);
15327
15852
  };
@@ -15353,18 +15878,30 @@ const CustomRender = (props) => {
15353
15878
  town: isCustom2() ? transformData(town2) : town2
15354
15879
  });
15355
15880
  }, [town]);
15881
+ useEffect(() => {
15882
+ initCustomSelected();
15883
+ }, [modelValue]);
15356
15884
  return /* @__PURE__ */ React__default.createElement("div", {
15357
15885
  className: b2("custom")
15358
15886
  }, /* @__PURE__ */ React__default.createElement("div", {
15359
15887
  className: b2("region-tab")
15360
- }, Object.keys(selectedRegion).map((key, index2) => {
15361
- return /* @__PURE__ */ React__default.createElement("div", {
15362
- className: `${b2("tab-item")} ${index2 === tabIndex ? "active" : ""}`,
15363
- key: index2,
15364
- ref: mapRef[key],
15365
- onClick: () => changeRegionTab(selectedRegion[key], index2, key)
15366
- }, index2 <= tabIndex && /* @__PURE__ */ React__default.createElement("div", null, getTabName(selectedRegion[key], index2)));
15367
- }), /* @__PURE__ */ React__default.createElement("div", {
15888
+ }, selectedRegion && Object.keys(selectedRegion).map(
15889
+ (key, index2) => {
15890
+ return /* @__PURE__ */ React__default.createElement("div", {
15891
+ className: `${b2("tab-item")} ${index2 === tabIndex ? "active" : ""}`,
15892
+ key: index2,
15893
+ ref: mapRef[key],
15894
+ onClick: () => changeRegionTab(
15895
+ selectedRegion[key],
15896
+ index2,
15897
+ key
15898
+ )
15899
+ }, index2 <= tabIndex && /* @__PURE__ */ React__default.createElement("div", null, getTabName(
15900
+ selectedRegion[key],
15901
+ index2
15902
+ )));
15903
+ }
15904
+ ), /* @__PURE__ */ React__default.createElement("div", {
15368
15905
  className: b2("tab-line"),
15369
15906
  ref: regionLine,
15370
15907
  style: { left: `${lineDistance}px` }
@@ -15372,18 +15909,23 @@ const CustomRender = (props) => {
15372
15909
  className: b2("region-con")
15373
15910
  }, /* @__PURE__ */ React__default.createElement("ul", {
15374
15911
  className: b2("region-group")
15375
- }, regionList[tabName[tabIndex]].map((item, index2) => {
15376
- return /* @__PURE__ */ React__default.createElement("li", {
15377
- key: index2,
15378
- className: b2("region-item"),
15379
- onClick: (e2) => nextAreaList(item)
15380
- }, selectedRegion[tabName[tabIndex]].id === item.id && /* @__PURE__ */ React__default.createElement(Icon, {
15381
- className: b2("region-item--icon"),
15382
- name: "Check",
15383
- color: "#FA2C19",
15384
- size: "13px"
15385
- }), item.name);
15386
- }))), privateType === "custom2" && /* @__PURE__ */ React__default.createElement("div", {
15912
+ }, regionList[tabName[tabIndex]].map(
15913
+ (item, index2) => {
15914
+ return /* @__PURE__ */ React__default.createElement("li", {
15915
+ key: index2,
15916
+ className: b2("region-item")
15917
+ }, /* @__PURE__ */ React__default.createElement("div", {
15918
+ onClick: () => {
15919
+ nextAreaList(item);
15920
+ }
15921
+ }, selectedRegion && selectedRegion[tabName[tabIndex]].id === item.id && /* @__PURE__ */ React__default.createElement(Icon, {
15922
+ className: b2("region-item--icon"),
15923
+ name: "Check",
15924
+ color: "#FA2C19",
15925
+ size: "13px"
15926
+ }), item.name));
15927
+ }
15928
+ ))), privateType === "custom2" && /* @__PURE__ */ React__default.createElement("div", {
15387
15929
  className: b2("elevator-group")
15388
15930
  }, /* @__PURE__ */ React__default.createElement(Elevator, {
15389
15931
  height,
@@ -15393,6 +15935,7 @@ const CustomRender = (props) => {
15393
15935
  };
15394
15936
  const defaultProps$6 = {
15395
15937
  modelValue: false,
15938
+ modelSelect: [],
15396
15939
  type: "custom",
15397
15940
  customAddressTitle: "\u8BF7\u9009\u62E9\u6240\u5728\u5730\u533A",
15398
15941
  province: [],
@@ -15413,6 +15956,7 @@ const Address = (props) => {
15413
15956
  const { locale } = useConfig();
15414
15957
  const {
15415
15958
  modelValue,
15959
+ modelSelect,
15416
15960
  children,
15417
15961
  type,
15418
15962
  height,
@@ -15460,8 +16004,7 @@ const Address = (props) => {
15460
16004
  const callbackParams = {
15461
16005
  next: item.next,
15462
16006
  value: item.value,
15463
- custom: item.custom,
15464
- selectedRegion: {}
16007
+ custom: item.custom
15465
16008
  };
15466
16009
  setSelectedRegion({
15467
16010
  ...item.selectedRegion
@@ -15469,7 +16012,6 @@ const Address = (props) => {
15469
16012
  onChange && onChange(callbackParams);
15470
16013
  };
15471
16014
  const selectedExist = (prevExistAdd, item, copyExistAdd) => {
15472
- console.log(prevExistAdd, item, copyExistAdd);
15473
16015
  setSelectedExistAddress(item);
15474
16016
  onSelected && onSelected(prevExistAdd, item, copyExistAdd);
15475
16017
  handClose();
@@ -15481,7 +16023,6 @@ const Address = (props) => {
15481
16023
  [tabName[i]]: {}
15482
16024
  });
15483
16025
  }
15484
- console.log(selectedRegion);
15485
16026
  };
15486
16027
  const closeFun = () => {
15487
16028
  const resCopy = {
@@ -15490,7 +16031,11 @@ const Address = (props) => {
15490
16031
  ...selectedRegion
15491
16032
  };
15492
16033
  const res = {
15493
- data: {},
16034
+ data: {
16035
+ addressIdStr: "",
16036
+ addressStr: "",
16037
+ ...selectedRegion
16038
+ },
15494
16039
  type: privateType
15495
16040
  };
15496
16041
  if (privateType === "custom" || privateType === "custom2") {
@@ -15562,6 +16107,7 @@ const Address = (props) => {
15562
16107
  style: { ...style },
15563
16108
  ...rest
15564
16109
  }, headerRender(), (privateType === "custom" || privateType === "custom2") && /* @__PURE__ */ React__default.createElement(CustomRender, {
16110
+ modelValue: modelSelect,
15565
16111
  type: privateType,
15566
16112
  province,
15567
16113
  city,
@@ -15885,7 +16431,9 @@ const TimeDetail = (props) => {
15885
16431
  const b2 = cn("timedetail");
15886
16432
  const [renderData, setRenderData] = useState([]);
15887
16433
  useEffect(() => {
15888
- const currentData = times.find((timesItem) => String(timesItem.key) === String(currentKey));
16434
+ const currentData = times.find(
16435
+ (timesItem) => String(timesItem.key) === String(currentKey)
16436
+ );
15889
16437
  const renderData2 = currentData ? currentData.list : [];
15890
16438
  setRenderData(renderData2);
15891
16439
  }, [times, currentKey]);
@@ -15894,7 +16442,9 @@ const TimeDetail = (props) => {
15894
16442
  };
15895
16443
  const getDetailClass = (item) => {
15896
16444
  let initClass = "nut-timedetail__item";
15897
- const curTimeData = currentTime.find((item2) => String(item2.key) === String(currentKey));
16445
+ const curTimeData = currentTime.find(
16446
+ (item2) => String(item2.key) === String(currentKey)
16447
+ );
15898
16448
  if (curTimeData && curTimeData.list && curTimeData.list.includes(item)) {
15899
16449
  initClass += " nut-timedetail__item-active";
15900
16450
  }
@@ -15942,12 +16492,14 @@ const TimeSelect = (props) => {
15942
16492
  ...props
15943
16493
  };
15944
16494
  const [activeKey, setActiveKey] = useState(currentKey);
15945
- const [activeTime, setActiveTime] = useState(currentTime.length ? currentTime : [
15946
- {
15947
- key: currentKey,
15948
- list: []
15949
- }
15950
- ]);
16495
+ const [activeTime, setActiveTime] = useState(
16496
+ currentTime.length ? currentTime : [
16497
+ {
16498
+ key: currentKey,
16499
+ list: []
16500
+ }
16501
+ ]
16502
+ );
15951
16503
  const [popVisible, setPopVisible] = useState(visible);
15952
16504
  const popStyle = {
15953
16505
  width: "100%",
@@ -15967,7 +16519,9 @@ const TimeSelect = (props) => {
15967
16519
  break;
15968
16520
  }
15969
16521
  }
15970
- const curTimeIndex = curTimeData.list.findIndex((item) => String(item) === String(time));
16522
+ const curTimeIndex = curTimeData.list.findIndex(
16523
+ (item) => String(item) === String(time)
16524
+ );
15971
16525
  if (curTimeIndex === -1) {
15972
16526
  curTimeData.list.push(time);
15973
16527
  } else {
@@ -15983,7 +16537,9 @@ const TimeSelect = (props) => {
15983
16537
  if (String(pannelKey) !== String(activeKey)) {
15984
16538
  setActiveKey == null ? void 0 : setActiveKey(pannelKey);
15985
16539
  if (multiple) {
15986
- const curTimeDataIndex = activeTime.findIndex((item) => String(item.key) === String(pannelKey));
16540
+ const curTimeDataIndex = activeTime.findIndex(
16541
+ (item) => String(item.key) === String(pannelKey)
16542
+ );
15987
16543
  if (curTimeDataIndex === -1) {
15988
16544
  resultTimeData.push({
15989
16545
  key: pannelKey,
@@ -16043,4 +16599,4 @@ const TimeSelect = (props) => {
16043
16599
  };
16044
16600
  TimeSelect.defaultProps = defaultProps;
16045
16601
  TimeSelect.displayName = "NutTimeSelect";
16046
- export { ActionSheet, Address, AnimatingNumbers, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, ConfigProvider, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, Empty, FixedNav, Icon, Indicator, Infiniteloading, Input, InputNumber, Layout, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, Picker, Popover, Popup, Price, Progress, Radio, RadioGroup, Range, Rate, Row, SearchBar, ShortPassword, Signature, Skeleton, Step, Steps, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Tabs, Tag, TextArea, TimeDetail, TimePannel, TimeSelect, Toast, Uploader, Video, VirtualList };
16602
+ export { ActionSheet, Address, AnimatingNumbers, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, ConfigProvider, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, Empty, FixedNav, Icon, Indicator, Infiniteloading, Input, InputNumber, Layout, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, Picker, Popover, Popup, Price, Progress, Radio, RadioGroup, Range, Rate, Row, SearchBar, ShortPassword, SideNavBar, SideNavBarItem, Signature, Skeleton, Step, Steps, SubSideNavBar, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Table, Tabs, Tag, TextArea, TimeDetail, TimePannel, TimeSelect, Toast, Uploader, Video, VirtualList };