@nutui/nutui-react 1.1.3-beta.1 → 1.1.3-beta.2

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.
@@ -34,7 +34,7 @@ var __publicField = (obj, key, value) => {
34
34
  return value;
35
35
  };
36
36
  /*!
37
- * @nutui/nutui-react v1.1.3-beta.1 Wed Apr 13 2022 09:44:32 GMT+0800 (China Standard Time)
37
+ * @nutui/nutui-react v1.1.3-beta.2 Mon Apr 18 2022 14:01:38 GMT+0800 (China Standard Time)
38
38
  * (c) 2021 @jdf2e.
39
39
  * Released under the MIT License.
40
40
  */
@@ -80,7 +80,7 @@ classname_production_min.cn = e$1, classname_production_min.withNaming = r$1;
80
80
  classname.exports = classname_production_min;
81
81
  }
82
82
  const cn = classname.exports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
83
- const defaultProps$W = {
83
+ const defaultProps$X = {
84
84
  name: "",
85
85
  size: "",
86
86
  classPrefix: "nutui-iconfont",
@@ -94,7 +94,7 @@ function pxCheck$2(value) {
94
94
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
95
95
  }
96
96
  const Icon = (props) => {
97
- const _a = __spreadValues(__spreadValues({}, defaultProps$W), props), { name, size, classPrefix, color, tag, children, className, style, click } = _a, rest = __objRest(_a, ["name", "size", "classPrefix", "color", "tag", "children", "className", "style", "click"]);
97
+ const _a = __spreadValues(__spreadValues({}, defaultProps$X), props), { name, size, classPrefix, color, tag, children, className, style, click } = _a, rest = __objRest(_a, ["name", "size", "classPrefix", "color", "tag", "children", "className", "style", "click"]);
98
98
  const isImage = name ? name.indexOf("/") !== -1 : false;
99
99
  const type = isImage ? "img" : tag;
100
100
  const b2 = cn("icon");
@@ -120,9 +120,9 @@ const Icon = (props) => {
120
120
  onClick: handleClick
121
121
  }), hasSrc()), children);
122
122
  };
123
- Icon.defaultProps = defaultProps$W;
123
+ Icon.defaultProps = defaultProps$X;
124
124
  Icon.displayName = "NutIcon";
125
- const defaultProps$V = {
125
+ const defaultProps$W = {
126
126
  className: "",
127
127
  color: "",
128
128
  shape: "round",
@@ -139,7 +139,7 @@ const defaultProps$V = {
139
139
  }
140
140
  };
141
141
  const Button = (props) => {
142
- const _a = __spreadValues(__spreadValues({}, defaultProps$V), props), {
142
+ const _a = __spreadValues(__spreadValues({}, defaultProps$W), props), {
143
143
  color,
144
144
  shape,
145
145
  plain,
@@ -233,7 +233,7 @@ const Button = (props) => {
233
233
  name: icon
234
234
  }) : "", children));
235
235
  };
236
- Button.defaultProps = defaultProps$V;
236
+ Button.defaultProps = defaultProps$W;
237
237
  Button.displayName = "NutButton";
238
238
  function _setPrototypeOf(o, p2) {
239
239
  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p3) {
@@ -1442,7 +1442,7 @@ var useContext = React__default.useContext;
1442
1442
  function useHistory() {
1443
1443
  return useContext(historyContext);
1444
1444
  }
1445
- const defaultProps$U = {
1445
+ const defaultProps$V = {
1446
1446
  title: "",
1447
1447
  subTitle: "",
1448
1448
  desc: "",
@@ -1458,7 +1458,7 @@ const defaultProps$U = {
1458
1458
  }
1459
1459
  };
1460
1460
  const Cell = (props) => {
1461
- const _a = __spreadValues(__spreadValues({}, defaultProps$U), props), {
1461
+ const _a = __spreadValues(__spreadValues({}, defaultProps$V), props), {
1462
1462
  children,
1463
1463
  click,
1464
1464
  isLink,
@@ -1521,11 +1521,11 @@ const Cell = (props) => {
1521
1521
  className: b2("link")
1522
1522
  }) : null);
1523
1523
  };
1524
- Cell.defaultProps = defaultProps$U;
1524
+ Cell.defaultProps = defaultProps$V;
1525
1525
  Cell.displayName = "NutCell";
1526
- const defaultProps$T = { title: "", classPrefix: "nutui-cell-group" };
1526
+ const defaultProps$U = { title: "", classPrefix: "nutui-cell-group" };
1527
1527
  const CellGroup = (props) => {
1528
- const { children, classPrefix, title } = __spreadValues(__spreadValues({}, defaultProps$T), props);
1528
+ const { children, classPrefix, title } = __spreadValues(__spreadValues({}, defaultProps$U), props);
1529
1529
  const b2 = cn("cell-group");
1530
1530
  return /* @__PURE__ */ React__default.createElement("div", {
1531
1531
  className: b2(null, [classPrefix])
@@ -1535,7 +1535,7 @@ const CellGroup = (props) => {
1535
1535
  className: b2("wrap")
1536
1536
  }, children));
1537
1537
  };
1538
- CellGroup.defaultProps = defaultProps$T;
1538
+ CellGroup.defaultProps = defaultProps$U;
1539
1539
  CellGroup.displayName = "NutCellGroup";
1540
1540
  var classnames = { exports: {} };
1541
1541
  /*!
@@ -2079,7 +2079,7 @@ CSSTransition.defaultProps = {
2079
2079
  };
2080
2080
  CSSTransition.propTypes = {};
2081
2081
  var CSSTransition$1 = CSSTransition;
2082
- const defaultProps$S = __spreadValues({
2082
+ const defaultProps$T = __spreadValues({
2083
2083
  position: "center",
2084
2084
  transition: "",
2085
2085
  style: {},
@@ -2228,25 +2228,25 @@ const Popup = (props) => {
2228
2228
  size: "12px"
2229
2229
  })) : "")));
2230
2230
  };
2231
- Popup.defaultProps = defaultProps$S;
2231
+ Popup.defaultProps = defaultProps$T;
2232
2232
  Popup.displayName = "NutPopup";
2233
- const defaultProps$R = {};
2233
+ const defaultProps$S = {};
2234
2234
  const Layout = (props) => {
2235
- __spreadValues(__spreadValues({}, defaultProps$R), props);
2235
+ __spreadValues(__spreadValues({}, defaultProps$S), props);
2236
2236
  return /* @__PURE__ */ React__default.createElement("div", {
2237
2237
  className: "nut-layout"
2238
2238
  }, "Layout");
2239
2239
  };
2240
- Layout.defaultProps = defaultProps$R;
2240
+ Layout.defaultProps = defaultProps$S;
2241
2241
  Layout.displayName = "NutLayout";
2242
2242
  const DataContext$2 = createContext({});
2243
- const defaultProps$Q = {
2243
+ const defaultProps$R = {
2244
2244
  span: "24",
2245
2245
  offset: "0",
2246
2246
  gutter: "0"
2247
2247
  };
2248
2248
  const Col = (props) => {
2249
- const { span, offset, children } = __spreadValues(__spreadValues({}, defaultProps$Q), props);
2249
+ const { span, offset, children } = __spreadValues(__spreadValues({}, defaultProps$R), props);
2250
2250
  const [colName, setColName] = useState("");
2251
2251
  const [colStyle, setColStyle] = useState({});
2252
2252
  const { gutter } = useContext$1(DataContext$2);
@@ -2269,9 +2269,9 @@ const Col = (props) => {
2269
2269
  style: __spreadValues({}, colStyle)
2270
2270
  }, children);
2271
2271
  };
2272
- Col.defaultProps = defaultProps$Q;
2272
+ Col.defaultProps = defaultProps$R;
2273
2273
  Col.displayName = "NutCol";
2274
- const defaultProps$P = {
2274
+ const defaultProps$Q = {
2275
2275
  type: "",
2276
2276
  justify: "start",
2277
2277
  align: "flex-start",
@@ -2279,7 +2279,7 @@ const defaultProps$P = {
2279
2279
  gutter: "0"
2280
2280
  };
2281
2281
  const Row = (props) => {
2282
- const { children, type, justify, align, wrap, gutter } = __spreadValues(__spreadValues({}, defaultProps$P), props);
2282
+ const { children, type, justify, align, wrap, gutter } = __spreadValues(__spreadValues({}, defaultProps$Q), props);
2283
2283
  const prefixCls = "nut-row";
2284
2284
  const getClass = (prefix2, type2) => {
2285
2285
  return prefix2 ? type2 ? `nut-row-${prefix2}-${type2}` : "" : `nut-row-${type2}`;
@@ -2302,15 +2302,15 @@ const Row = (props) => {
2302
2302
  className: getClasses()
2303
2303
  }, children));
2304
2304
  };
2305
- Row.defaultProps = defaultProps$P;
2305
+ Row.defaultProps = defaultProps$Q;
2306
2306
  Row.displayName = "NutRow";
2307
- const defaultProps$O = {
2307
+ const defaultProps$P = {
2308
2308
  contentPosition: "center",
2309
2309
  dashed: false,
2310
2310
  hairline: true
2311
2311
  };
2312
2312
  const Divider = (props) => {
2313
- const { children, contentPosition, dashed, hairline, styles, className } = __spreadValues(__spreadValues({}, defaultProps$O), props);
2313
+ const { children, contentPosition, dashed, hairline, styles, className } = __spreadValues(__spreadValues({}, defaultProps$P), props);
2314
2314
  const dividerBem = cn("divider");
2315
2315
  const classes = classNames({
2316
2316
  [dividerBem()]: true,
@@ -2325,9 +2325,9 @@ const Divider = (props) => {
2325
2325
  style: styles
2326
2326
  }, children);
2327
2327
  };
2328
- Divider.defaultProps = defaultProps$O;
2328
+ Divider.defaultProps = defaultProps$P;
2329
2329
  Divider.displayName = "NutDivider";
2330
- const defaultProps$N = {
2330
+ const defaultProps$O = {
2331
2331
  title: "",
2332
2332
  desc: "",
2333
2333
  leftShow: false,
@@ -2348,7 +2348,7 @@ const NavBar = (props) => {
2348
2348
  onClickIcon,
2349
2349
  onClickBack,
2350
2350
  onClickClear
2351
- } = __spreadValues(__spreadValues({}, defaultProps$N), props);
2351
+ } = __spreadValues(__spreadValues({}, defaultProps$O), props);
2352
2352
  const b2 = cn("navbar");
2353
2353
  return /* @__PURE__ */ React__default.createElement("div", {
2354
2354
  className: `nut-navbar ${className}`,
@@ -2371,9 +2371,9 @@ const NavBar = (props) => {
2371
2371
  name: icon
2372
2372
  })));
2373
2373
  };
2374
- NavBar.defaultProps = defaultProps$N;
2374
+ NavBar.defaultProps = defaultProps$O;
2375
2375
  NavBar.displayName = "NutNavBar";
2376
- const defaultProps$M = {
2376
+ const defaultProps$N = {
2377
2377
  fixednavClass: "nut-fixednav",
2378
2378
  activeText: "\u6536\u8D77\u5BFC\u822A",
2379
2379
  unActiveText: "\u5FEB\u901F\u5BFC\u822A",
@@ -2384,7 +2384,7 @@ const defaultProps$M = {
2384
2384
  }
2385
2385
  };
2386
2386
  const FixedNav = (props) => {
2387
- const _a = __spreadValues(__spreadValues({}, defaultProps$M), props), {
2387
+ const _a = __spreadValues(__spreadValues({}, defaultProps$N), props), {
2388
2388
  fixednavClass,
2389
2389
  overlay,
2390
2390
  visible,
@@ -2454,9 +2454,9 @@ const FixedNav = (props) => {
2454
2454
  className: "text"
2455
2455
  }, visible ? activeText : unActiveText))));
2456
2456
  };
2457
- FixedNav.defaultProps = defaultProps$M;
2457
+ FixedNav.defaultProps = defaultProps$N;
2458
2458
  FixedNav.displayName = "NutFixedNav";
2459
- const defaultProps$L = {
2459
+ const defaultProps$M = {
2460
2460
  visible: 0,
2461
2461
  bottom: false,
2462
2462
  type: "",
@@ -2469,7 +2469,7 @@ const defaultProps$L = {
2469
2469
  }
2470
2470
  };
2471
2471
  const Tabbar = (props) => {
2472
- const { children, visible, bottom, activeColor, unactiveColor, className, style, tabSwitch } = __spreadValues(__spreadValues({}, defaultProps$L), props);
2472
+ const { children, visible, bottom, activeColor, unactiveColor, className, style, tabSwitch } = __spreadValues(__spreadValues({}, defaultProps$M), props);
2473
2473
  const b2 = cn("tabbar");
2474
2474
  const [selectIndex, setSelectIndex] = useState(visible);
2475
2475
  const handleClick = (idx) => {
@@ -2495,9 +2495,9 @@ const Tabbar = (props) => {
2495
2495
  return React__default.cloneElement(child, childProps);
2496
2496
  }));
2497
2497
  };
2498
- Tabbar.defaultProps = defaultProps$L;
2498
+ Tabbar.defaultProps = defaultProps$M;
2499
2499
  Tabbar.displayName = "NutTabbar";
2500
- const defaultProps$K = {
2500
+ const defaultProps$L = {
2501
2501
  tabTitle: "",
2502
2502
  icon: "",
2503
2503
  href: "",
@@ -2510,7 +2510,7 @@ const defaultProps$K = {
2510
2510
  }
2511
2511
  };
2512
2512
  const TabbarItem = (props) => {
2513
- const { tabTitle, icon, href, num, active, activeColor, unactiveColor, index: index2, handleClick } = __spreadValues(__spreadValues({}, defaultProps$K), props);
2513
+ const { tabTitle, icon, href, num, active, activeColor, unactiveColor, index: index2, handleClick } = __spreadValues(__spreadValues({}, defaultProps$L), props);
2514
2514
  const b2 = cn("tabbar-item");
2515
2515
  const bIcon = cn("tabbar-item__icon-box");
2516
2516
  useEffect(() => {
@@ -2539,14 +2539,14 @@ const TabbarItem = (props) => {
2539
2539
  className: bIcon({ "nav-word": true }, [bIcon({ "big-word": !icon })])
2540
2540
  }, tabTitle)));
2541
2541
  };
2542
- const defaultProps$J = {
2542
+ const defaultProps$K = {
2543
2543
  height: "200px",
2544
2544
  acceptKey: "title",
2545
2545
  indexList: [],
2546
2546
  className: ""
2547
2547
  };
2548
2548
  const Elevator = (props) => {
2549
- const _a = __spreadValues(__spreadValues({}, defaultProps$J), props), { height, acceptKey, indexList, className, clickItem, clickIndex } = _a, rest = __objRest(_a, ["height", "acceptKey", "indexList", "className", "clickItem", "clickIndex"]);
2549
+ const _a = __spreadValues(__spreadValues({}, defaultProps$K), props), { height, acceptKey, indexList, className, clickItem, clickIndex } = _a, rest = __objRest(_a, ["height", "acceptKey", "indexList", "className", "clickItem", "clickIndex"]);
2550
2550
  const b2 = cn("elevator");
2551
2551
  const spaceHeight = 23;
2552
2552
  const listview = useRef(null);
@@ -2680,9 +2680,9 @@ const Elevator = (props) => {
2680
2680
  }, item[acceptKey]);
2681
2681
  }))));
2682
2682
  };
2683
- Elevator.defaultProps = defaultProps$J;
2683
+ Elevator.defaultProps = defaultProps$K;
2684
2684
  Elevator.displayName = "NutElevator";
2685
- const defaultProps$I = {
2685
+ const defaultProps$J = {
2686
2686
  defaultValue: 1,
2687
2687
  mode: "multi",
2688
2688
  prevText: "\u4E0A\u4E00\u9875",
@@ -2698,7 +2698,7 @@ const defaultProps$I = {
2698
2698
  }
2699
2699
  };
2700
2700
  const Pagination = (props) => {
2701
- __spreadValues(__spreadValues({}, defaultProps$I), props);
2701
+ __spreadValues(__spreadValues({}, defaultProps$J), props);
2702
2702
  const _a = props, {
2703
2703
  modelValue,
2704
2704
  mode,
@@ -2828,7 +2828,7 @@ const Pagination = (props) => {
2828
2828
  onClick: (e2) => selectPage(Number(currentPage) + 1, true)
2829
2829
  }, nextText));
2830
2830
  };
2831
- Pagination.defaultProps = defaultProps$I;
2831
+ Pagination.defaultProps = defaultProps$J;
2832
2832
  Pagination.displayName = "NutPagination";
2833
2833
  class Title {
2834
2834
  constructor() {
@@ -2838,7 +2838,7 @@ class Title {
2838
2838
  __publicField(this, "index", 0);
2839
2839
  }
2840
2840
  }
2841
- const defaultProps$H = {
2841
+ const defaultProps$I = {
2842
2842
  value: 0,
2843
2843
  color: "",
2844
2844
  background: "",
@@ -2854,7 +2854,7 @@ const pxCheck$1 = (value) => {
2854
2854
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
2855
2855
  };
2856
2856
  const Tabs = (props) => {
2857
- const _a = __spreadValues(__spreadValues({}, defaultProps$H), props), {
2857
+ const _a = __spreadValues(__spreadValues({}, defaultProps$I), props), {
2858
2858
  value,
2859
2859
  color,
2860
2860
  background,
@@ -2975,16 +2975,16 @@ const Tabs = (props) => {
2975
2975
  return React__default.cloneElement(child, childProps);
2976
2976
  })));
2977
2977
  };
2978
- Tabs.defaultProps = defaultProps$H;
2978
+ Tabs.defaultProps = defaultProps$I;
2979
2979
  Tabs.displayName = "NutTabs";
2980
- const defaultProps$G = {
2980
+ const defaultProps$H = {
2981
2981
  title: "",
2982
2982
  paneKey: "",
2983
2983
  activeKey: "",
2984
2984
  disabled: false
2985
2985
  };
2986
2986
  const TabPane = (props) => {
2987
- const { children, paneKey, activeKey } = __spreadValues(__spreadValues({}, defaultProps$G), props);
2987
+ const { children, paneKey, activeKey } = __spreadValues(__spreadValues({}, defaultProps$H), props);
2988
2988
  const b2 = cn("tabpane");
2989
2989
  const classes = classNames({
2990
2990
  active: paneKey === activeKey
@@ -3277,7 +3277,7 @@ var Toast = {
3277
3277
  }
3278
3278
  }
3279
3279
  };
3280
- const defaultProps$F = {
3280
+ const defaultProps$G = {
3281
3281
  range: false,
3282
3282
  hiddenRange: false,
3283
3283
  hiddenTag: false,
@@ -3306,7 +3306,7 @@ const Range = (props) => {
3306
3306
  change,
3307
3307
  dragStart,
3308
3308
  dragEnd
3309
- } = __spreadValues(__spreadValues({}, defaultProps$F), props);
3309
+ } = __spreadValues(__spreadValues({}, defaultProps$G), props);
3310
3310
  const [buttonIndex, SetButtonIndex] = useState(0);
3311
3311
  const [initValue, SetInitValue] = useState();
3312
3312
  const [dragStatus, SetDragStatus] = useState("start");
@@ -3515,7 +3515,7 @@ const Range = (props) => {
3515
3515
  className: "max"
3516
3516
  }, +max) : null);
3517
3517
  };
3518
- Range.defaultProps = defaultProps$F;
3518
+ Range.defaultProps = defaultProps$G;
3519
3519
  Range.displayName = "NutRange";
3520
3520
  const Utils = {
3521
3521
  isLeapYear(y2) {
@@ -3601,7 +3601,7 @@ function requestAniFrame() {
3601
3601
  };
3602
3602
  }
3603
3603
  var requestAniFrame$1 = requestAniFrame();
3604
- const defaultProps$E = {
3604
+ const defaultProps$F = {
3605
3605
  type: "one",
3606
3606
  isAutoBackFill: false,
3607
3607
  poppable: true,
@@ -3631,7 +3631,7 @@ const CalendarItem = (props) => {
3631
3631
  onChoose,
3632
3632
  onUpdate,
3633
3633
  onClose
3634
- } = __spreadValues(__spreadValues({}, defaultProps$E), props);
3634
+ } = __spreadValues(__spreadValues({}, defaultProps$F), props);
3635
3635
  const weeks = ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
3636
3636
  const [yearMonthTitle, setYearMonthTitle] = useState("");
3637
3637
  const [unLoadPrev, setUnLoadPrev] = useState(false);
@@ -4017,9 +4017,9 @@ const CalendarItem = (props) => {
4017
4017
  onClick: confirm2
4018
4018
  }, "\u786E\u5B9A")) : ""));
4019
4019
  };
4020
- CalendarItem.defaultProps = defaultProps$E;
4020
+ CalendarItem.defaultProps = defaultProps$F;
4021
4021
  CalendarItem.displayName = "NutCalendarItem";
4022
- const defaultProps$D = {
4022
+ const defaultProps$E = {
4023
4023
  type: "one",
4024
4024
  isAutoBackFill: false,
4025
4025
  poppable: true,
@@ -4046,7 +4046,7 @@ const Calendar = (props) => {
4046
4046
  endDate,
4047
4047
  onClose,
4048
4048
  onChoose
4049
- } = __spreadValues(__spreadValues({}, defaultProps$D), props);
4049
+ } = __spreadValues(__spreadValues({}, defaultProps$E), props);
4050
4050
  const close = () => {
4051
4051
  onClose && onClose();
4052
4052
  };
@@ -4089,16 +4089,16 @@ const Calendar = (props) => {
4089
4089
  onChoose: choose
4090
4090
  }));
4091
4091
  };
4092
- Calendar.defaultProps = defaultProps$D;
4092
+ Calendar.defaultProps = defaultProps$E;
4093
4093
  Calendar.displayName = "NutCalendar";
4094
- const defaultProps$C = {
4094
+ const defaultProps$D = {
4095
4095
  disabled: false,
4096
4096
  checkedValue: [],
4097
4097
  onChange: (value) => {
4098
4098
  }
4099
4099
  };
4100
4100
  const CheckboxGroup = React__default.forwardRef((props, ref) => {
4101
- const { children } = __spreadValues(__spreadValues({}, defaultProps$C), props);
4101
+ const { children } = __spreadValues(__spreadValues({}, defaultProps$D), props);
4102
4102
  const b2 = cn("checkboxgroup");
4103
4103
  const _a = props, { className, disabled, onChange, checkedValue } = _a, rest = __objRest(_a, ["className", "disabled", "onChange", "checkedValue"]);
4104
4104
  const [innerDisabled, setInnerDisabled] = useState(disabled);
@@ -4157,9 +4157,9 @@ const CheckboxGroup = React__default.forwardRef((props, ref) => {
4157
4157
  className: `${b2()} ${className || ""}`
4158
4158
  }, rest), cloneChildren());
4159
4159
  });
4160
- CheckboxGroup.defaultProps = defaultProps$C;
4160
+ CheckboxGroup.defaultProps = defaultProps$D;
4161
4161
  CheckboxGroup.displayName = "NutCheckboxGroup";
4162
- const defaultProps$B = {
4162
+ const defaultProps$C = {
4163
4163
  checked: false,
4164
4164
  disabled: false,
4165
4165
  textPosition: "right",
@@ -4170,7 +4170,7 @@ const defaultProps$B = {
4170
4170
  }
4171
4171
  };
4172
4172
  const Checkbox = (props) => {
4173
- const { children } = __spreadValues(__spreadValues({}, defaultProps$B), props);
4173
+ const { children } = __spreadValues(__spreadValues({}, defaultProps$C), props);
4174
4174
  const b2 = cn("checkbox");
4175
4175
  const _a = props, {
4176
4176
  iconName,
@@ -4226,7 +4226,7 @@ const Checkbox = (props) => {
4226
4226
  onClick: handleClick
4227
4227
  }), renderIcon(), renderLabel());
4228
4228
  };
4229
- Checkbox.defaultProps = defaultProps$B;
4229
+ Checkbox.defaultProps = defaultProps$C;
4230
4230
  Checkbox.displayName = "NutCheckBox";
4231
4231
  Checkbox.Group = CheckboxGroup;
4232
4232
  const InternalPickerSlot = (props, ref) => {
@@ -4541,7 +4541,7 @@ const InternalPicker = (props, ref) => {
4541
4541
  };
4542
4542
  const Picker = React__default.forwardRef(InternalPicker);
4543
4543
  const currentYear = new Date().getFullYear();
4544
- const defaultProps$A = {
4544
+ const defaultProps$B = {
4545
4545
  modelValue: new Date(),
4546
4546
  visible: false,
4547
4547
  title: "",
@@ -4553,7 +4553,7 @@ const defaultProps$A = {
4553
4553
  onCloseDatePicker: () => void 0
4554
4554
  };
4555
4555
  const DatePicker = (props) => {
4556
- const _a = __spreadValues(__spreadValues({}, defaultProps$A), props), {
4556
+ const _a = __spreadValues(__spreadValues({}, defaultProps$B), props), {
4557
4557
  minDate,
4558
4558
  maxDate,
4559
4559
  type,
@@ -4807,9 +4807,9 @@ const DatePicker = (props) => {
4807
4807
  ref: pickerRef
4808
4808
  }));
4809
4809
  };
4810
- DatePicker.defaultProps = defaultProps$A;
4810
+ DatePicker.defaultProps = defaultProps$B;
4811
4811
  DatePicker.displayName = "NutDatePicker";
4812
- const defaultProps$z = {
4812
+ const defaultProps$A = {
4813
4813
  disabled: false,
4814
4814
  buttonSize: "",
4815
4815
  min: 1,
@@ -4825,7 +4825,7 @@ function pxCheck(value) {
4825
4825
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
4826
4826
  }
4827
4827
  const InputNumber = (props) => {
4828
- const _a = __spreadValues(__spreadValues({}, defaultProps$z), props), {
4828
+ const _a = __spreadValues(__spreadValues({}, defaultProps$A), props), {
4829
4829
  children,
4830
4830
  disabled,
4831
4831
  buttonSize,
@@ -4982,7 +4982,7 @@ const InputNumber = (props) => {
4982
4982
  click: addNumber
4983
4983
  }));
4984
4984
  };
4985
- InputNumber.defaultProps = defaultProps$z;
4985
+ InputNumber.defaultProps = defaultProps$A;
4986
4986
  InputNumber.displayName = "NutInputNumber";
4987
4987
  function trimExtraChar(value, char, regExp) {
4988
4988
  const index2 = value.indexOf(char);
@@ -5008,7 +5008,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
5008
5008
  const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
5009
5009
  return value.replace(regExp, "");
5010
5010
  }
5011
- const defaultProps$y = {
5011
+ const defaultProps$z = {
5012
5012
  type: "text",
5013
5013
  defaultValue: "",
5014
5014
  placeholder: "\u8BF7\u8F93\u5165\u4FE1\u606F",
@@ -5038,7 +5038,7 @@ const Input = (props) => {
5038
5038
  blur,
5039
5039
  focus,
5040
5040
  clear
5041
- } = __spreadValues(__spreadValues({}, defaultProps$y), props);
5041
+ } = __spreadValues(__spreadValues({}, defaultProps$z), props);
5042
5042
  const inputBem = cn("input");
5043
5043
  const [inputValue, SetInputValue] = useState("");
5044
5044
  const [active, SetActive] = useState(false);
@@ -5122,14 +5122,14 @@ const Input = (props) => {
5122
5122
  size: "12px"
5123
5123
  }) : null) : null);
5124
5124
  };
5125
- Input.defaultProps = defaultProps$y;
5125
+ Input.defaultProps = defaultProps$z;
5126
5126
  Input.displayName = "NutInput";
5127
5127
  const radioContext = {
5128
5128
  onChange: (val) => {
5129
5129
  }
5130
5130
  };
5131
5131
  var RadioContext = React__default.createContext(radioContext);
5132
- const defaultProps$x = {
5132
+ const defaultProps$y = {
5133
5133
  value: null,
5134
5134
  textPosition: "right",
5135
5135
  onChange: (value) => {
@@ -5137,7 +5137,7 @@ const defaultProps$x = {
5137
5137
  direction: "vertical"
5138
5138
  };
5139
5139
  const RadioGroup = React__default.forwardRef((props, ref) => {
5140
- const { children } = __spreadValues(__spreadValues({}, defaultProps$x), props);
5140
+ const { children } = __spreadValues(__spreadValues({}, defaultProps$y), props);
5141
5141
  cn("RadioGroup");
5142
5142
  const _a = props, { className, value, onChange, textPosition, direction } = _a, rest = __objRest(_a, ["className", "value", "onChange", "textPosition", "direction"]);
5143
5143
  const [val2State, setVal2State] = useState(value);
@@ -5172,9 +5172,9 @@ const RadioGroup = React__default.forwardRef((props, ref) => {
5172
5172
  className: `nut-radiogroup nut-radiogroup--${props.direction}`
5173
5173
  }, rest), cloneChildren()));
5174
5174
  });
5175
- RadioGroup.defaultProps = defaultProps$x;
5175
+ RadioGroup.defaultProps = defaultProps$y;
5176
5176
  RadioGroup.displayName = "NutRadioGroup";
5177
- const defaultProps$w = {
5177
+ const defaultProps$x = {
5178
5178
  disabled: false,
5179
5179
  checked: false,
5180
5180
  shape: "round",
@@ -5187,7 +5187,7 @@ const defaultProps$w = {
5187
5187
  }
5188
5188
  };
5189
5189
  const Radio = (props) => {
5190
- const { children } = __spreadValues(__spreadValues({}, defaultProps$w), props);
5190
+ const { children } = __spreadValues(__spreadValues({}, defaultProps$x), props);
5191
5191
  const _a = props, {
5192
5192
  className,
5193
5193
  disabled,
@@ -5255,10 +5255,10 @@ const Radio = (props) => {
5255
5255
  onClick: handleClick
5256
5256
  }, rest), props.shape == "button" ? renderButton() : reverseState ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()]);
5257
5257
  };
5258
- Radio.defaultProps = defaultProps$w;
5258
+ Radio.defaultProps = defaultProps$x;
5259
5259
  Radio.displayName = "NutRadio";
5260
5260
  Radio.RadioGroup = RadioGroup;
5261
- const defaultProps$v = {
5261
+ const defaultProps$w = {
5262
5262
  count: 5,
5263
5263
  modelValue: 0,
5264
5264
  iconSize: 18,
@@ -5285,7 +5285,7 @@ const Rate = (props) => {
5285
5285
  allowHalf,
5286
5286
  spacing,
5287
5287
  change
5288
- } = __spreadValues(__spreadValues({}, defaultProps$v), props);
5288
+ } = __spreadValues(__spreadValues({}, defaultProps$w), props);
5289
5289
  const b2 = cn("rate");
5290
5290
  const bi = cn("rate-item");
5291
5291
  const [countArray, setCountArray] = useState([1, 2, 3, 4, 5]);
@@ -5348,9 +5348,9 @@ const Rate = (props) => {
5348
5348
  }));
5349
5349
  }));
5350
5350
  };
5351
- Rate.defaultProps = defaultProps$v;
5351
+ Rate.defaultProps = defaultProps$w;
5352
5352
  Rate.displayName = "NutRate";
5353
- const defaultProps$u = {
5353
+ const defaultProps$v = {
5354
5354
  title: "\u8BF7\u8F93\u5165\u5BC6\u7801",
5355
5355
  desc: "\u60A8\u4F7F\u7528\u4E86\u865A\u62DF\u8D44\u4EA7\uFF0C\u8BF7\u8FDB\u884C\u9A8C\u8BC1",
5356
5356
  tips: "\u5FD8\u8BB0\u5BC6\u7801",
@@ -5525,9 +5525,9 @@ const ShortPassword = (props) => {
5525
5525
  onClick: () => sure()
5526
5526
  }, "\u786E\u8BA4")) : null)));
5527
5527
  };
5528
- ShortPassword.defaultProps = defaultProps$u;
5528
+ ShortPassword.defaultProps = defaultProps$v;
5529
5529
  ShortPassword.displayName = "NutShortPassword";
5530
- const defaultProps$t = {
5530
+ const defaultProps$u = {
5531
5531
  defaultValue: "",
5532
5532
  textAlign: "left",
5533
5533
  limitshow: false,
@@ -5554,7 +5554,7 @@ const TextArea = (props) => {
5554
5554
  change,
5555
5555
  blur,
5556
5556
  focus
5557
- } = __spreadValues(__spreadValues({}, defaultProps$t), props);
5557
+ } = __spreadValues(__spreadValues({}, defaultProps$u), props);
5558
5558
  const textareaBem = cn("textarea");
5559
5559
  const [inputValue, SetInputValue] = useState("");
5560
5560
  useEffect(() => {
@@ -5625,7 +5625,7 @@ const TextArea = (props) => {
5625
5625
  className: textareaBem("limit")
5626
5626
  }, inputValue.length, "/", maxlength < 0 ? 0 : maxlength) : null);
5627
5627
  };
5628
- TextArea.defaultProps = defaultProps$t;
5628
+ TextArea.defaultProps = defaultProps$u;
5629
5629
  TextArea.displayName = "NutTextArea";
5630
5630
  class UploadOptions {
5631
5631
  constructor() {
@@ -5681,7 +5681,7 @@ class Upload {
5681
5681
  }
5682
5682
  }
5683
5683
  }
5684
- const defaultProps$s = {
5684
+ const defaultProps$t = {
5685
5685
  url: "",
5686
5686
  maximum: 1,
5687
5687
  uploadIcon: "photograph",
@@ -5717,7 +5717,7 @@ class FileItem {
5717
5717
  }
5718
5718
  }
5719
5719
  const InternalUploader = (props, ref) => {
5720
- const _a = __spreadValues(__spreadValues({}, defaultProps$s), props), {
5720
+ const _a = __spreadValues(__spreadValues({}, defaultProps$t), props), {
5721
5721
  children,
5722
5722
  uploadIcon,
5723
5723
  name,
@@ -6022,9 +6022,9 @@ const InternalUploader = (props, ref) => {
6022
6022
  }))));
6023
6023
  };
6024
6024
  const Uploader = React__default.forwardRef(InternalUploader);
6025
- Uploader.defaultProps = defaultProps$s;
6025
+ Uploader.defaultProps = defaultProps$t;
6026
6026
  Uploader.displayName = "NutUploader";
6027
- const defaultProps$r = {
6027
+ const defaultProps$s = {
6028
6028
  cancelTxt: "",
6029
6029
  optionTag: "name",
6030
6030
  optionSubTag: "subname",
@@ -6042,7 +6042,7 @@ const defaultProps$r = {
6042
6042
  style: {}
6043
6043
  };
6044
6044
  const ActionSheet = (props) => {
6045
- const _a = __spreadValues(__spreadValues({}, defaultProps$r), props), {
6045
+ const _a = __spreadValues(__spreadValues({}, defaultProps$s), props), {
6046
6046
  cancelTxt,
6047
6047
  optionTag,
6048
6048
  optionSubTag,
@@ -6113,9 +6113,9 @@ const ActionSheet = (props) => {
6113
6113
  onClick: () => cancelActionSheet()
6114
6114
  }, cancelTxt)));
6115
6115
  };
6116
- ActionSheet.defaultProps = defaultProps$r;
6116
+ ActionSheet.defaultProps = defaultProps$s;
6117
6117
  ActionSheet.displayName = "NutActionSheet";
6118
- const defaultProps$q = {
6118
+ const defaultProps$r = {
6119
6119
  bottom: 20,
6120
6120
  right: 10,
6121
6121
  elId: "",
@@ -6137,7 +6137,7 @@ const BackTop = (props) => {
6137
6137
  duration,
6138
6138
  style,
6139
6139
  backTopClick
6140
- } = __spreadValues(__spreadValues({}, defaultProps$q), props);
6140
+ } = __spreadValues(__spreadValues({}, defaultProps$r), props);
6141
6141
  const [backTop, SetBackTop] = useState(false);
6142
6142
  const [scrollTop, SetScrollTop] = useState(0);
6143
6143
  let startTime = 0;
@@ -6220,7 +6220,7 @@ const BackTop = (props) => {
6220
6220
  name: "top"
6221
6221
  }));
6222
6222
  };
6223
- BackTop.defaultProps = defaultProps$q;
6223
+ BackTop.defaultProps = defaultProps$r;
6224
6224
  BackTop.displayName = "NutBackTop";
6225
6225
  function clamp(v2, min, max) {
6226
6226
  return Math.max(min, Math.min(v2, max));
@@ -10622,7 +10622,7 @@ const host = createHost(primitives, {
10622
10622
  }
10623
10623
  });
10624
10624
  const animated = host.animated;
10625
- const defaultProps$p = {
10625
+ const defaultProps$q = {
10626
10626
  attract: false,
10627
10627
  direction: void 0,
10628
10628
  boundary: {
@@ -10634,7 +10634,7 @@ const defaultProps$p = {
10634
10634
  className: ""
10635
10635
  };
10636
10636
  const Drag = (props) => {
10637
- const _a = __spreadValues(__spreadValues({}, defaultProps$p), props), { attract, direction, boundary, children, className, style } = _a, reset = __objRest(_a, ["attract", "direction", "boundary", "children", "className", "style"]);
10637
+ const _a = __spreadValues(__spreadValues({}, defaultProps$q), props), { attract, direction, boundary, children, className, style } = _a, reset = __objRest(_a, ["attract", "direction", "boundary", "children", "className", "style"]);
10638
10638
  const b2 = cn("drag");
10639
10639
  const [boundaryState, setBoundaryState] = useState(boundary);
10640
10640
  const myDrag = useRef(null);
@@ -10690,7 +10690,7 @@ const Drag = (props) => {
10690
10690
  style: currstyle
10691
10691
  }, bind()), children));
10692
10692
  };
10693
- Drag.defaultProps = defaultProps$p;
10693
+ Drag.defaultProps = defaultProps$q;
10694
10694
  Drag.displayName = "NutDrag";
10695
10695
  const Content = (props) => {
10696
10696
  const { visible, title, footer, textAlign, footerDirection, children } = props;
@@ -10753,7 +10753,10 @@ const DialogWrap = (props) => {
10753
10753
  };
10754
10754
  DialogWrap.displayName = "NutDialogWrap";
10755
10755
  const DialogWrapper = (props) => {
10756
- const { visible } = props;
10756
+ const { visible, lockScroll } = props;
10757
+ if (lockScroll && !visible && document.body.classList.value.includes("nut-overflow-hidden")) {
10758
+ document.body.classList.remove("nut-overflow-hidden");
10759
+ }
10757
10760
  return /* @__PURE__ */ React__default.createElement("div", {
10758
10761
  style: { display: visible ? "block" : "none" }
10759
10762
  }, /* @__PURE__ */ React__default.createElement(DialogWrap, __spreadValues({}, props)));
@@ -10846,7 +10849,7 @@ function confirm(config2, renderFunc) {
10846
10849
  update: update2
10847
10850
  };
10848
10851
  }
10849
- const defaultProps$o = {
10852
+ const defaultProps$p = {
10850
10853
  okText: "\u786E\u5B9A",
10851
10854
  cancelText: "\u53D6\u6D88",
10852
10855
  mask: true,
@@ -10861,10 +10864,35 @@ const defaultProps$o = {
10861
10864
  lockScroll: false
10862
10865
  };
10863
10866
  const BaseDialog = (props, ref) => {
10864
- const _a = props, { visible, footer, noOkBtn, noCancelBtn, okBtnDisabled, cancelAutoClose } = _a, restProps = __objRest(_a, ["visible", "footer", "noOkBtn", "noCancelBtn", "okBtnDisabled", "cancelAutoClose"]);
10867
+ const _a = props, {
10868
+ visible,
10869
+ footer,
10870
+ noOkBtn,
10871
+ noCancelBtn,
10872
+ lockScroll,
10873
+ okBtnDisabled,
10874
+ cancelAutoClose,
10875
+ okText,
10876
+ cancelText,
10877
+ onClosed,
10878
+ onCancel,
10879
+ onOk
10880
+ } = _a, restProps = __objRest(_a, [
10881
+ "visible",
10882
+ "footer",
10883
+ "noOkBtn",
10884
+ "noCancelBtn",
10885
+ "lockScroll",
10886
+ "okBtnDisabled",
10887
+ "cancelAutoClose",
10888
+ "okText",
10889
+ "cancelText",
10890
+ "onClosed",
10891
+ "onCancel",
10892
+ "onOk"
10893
+ ]);
10865
10894
  const renderFooter = () => {
10866
- const { okText, cancelText, footer: footer2, lockScroll, onClosed, onCancel, onOk } = props;
10867
- if (footer2 === null)
10895
+ if (footer === null)
10868
10896
  return;
10869
10897
  const handleCancel = (e2) => {
10870
10898
  if (!cancelAutoClose)
@@ -10882,7 +10910,7 @@ const BaseDialog = (props, ref) => {
10882
10910
  document.body.classList.remove("nut-overflow-hidden");
10883
10911
  }
10884
10912
  };
10885
- const footerContent = footer2 || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, !noCancelBtn && /* @__PURE__ */ React__default.createElement(Button, {
10913
+ const footerContent = footer || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, !noCancelBtn && /* @__PURE__ */ React__default.createElement(Button, {
10886
10914
  size: "small",
10887
10915
  plain: true,
10888
10916
  type: "primary",
@@ -10899,7 +10927,10 @@ const BaseDialog = (props, ref) => {
10899
10927
  };
10900
10928
  return /* @__PURE__ */ React__default.createElement(DialogWrapper, __spreadProps(__spreadValues({}, restProps), {
10901
10929
  visible,
10902
- footer: renderFooter()
10930
+ lockScroll,
10931
+ footer: renderFooter(),
10932
+ onClosed,
10933
+ onCancel
10903
10934
  }));
10904
10935
  };
10905
10936
  const Dialog = forwardRef(BaseDialog);
@@ -10914,9 +10945,9 @@ Dialog.confirm = (props) => {
10914
10945
  }));
10915
10946
  };
10916
10947
  });
10917
- Dialog.defaultProps = defaultProps$o;
10948
+ Dialog.defaultProps = defaultProps$p;
10918
10949
  Dialog.displayName = "NutDialog";
10919
- const defaultProps$n = {
10950
+ const defaultProps$o = {
10920
10951
  hasMore: true,
10921
10952
  threshold: 200,
10922
10953
  containerId: "",
@@ -10930,7 +10961,7 @@ const defaultProps$n = {
10930
10961
  loadMoreTxt: "\u54CE\u5440\uFF0C\u8FD9\u91CC\u662F\u5E95\u90E8\u4E86\u5566"
10931
10962
  };
10932
10963
  const Infiniteloading = (props) => {
10933
- const _a = __spreadValues(__spreadValues({}, defaultProps$n), props), {
10964
+ const _a = __spreadValues(__spreadValues({}, defaultProps$o), props), {
10934
10965
  children,
10935
10966
  hasMore,
10936
10967
  threshold,
@@ -11118,7 +11149,7 @@ const Infiniteloading = (props) => {
11118
11149
  className: "tips"
11119
11150
  }, loadMoreTxt)));
11120
11151
  };
11121
- Infiniteloading.defaultProps = defaultProps$n;
11152
+ Infiniteloading.defaultProps = defaultProps$o;
11122
11153
  Infiniteloading.displayName = "NutInfiniteloading";
11123
11154
  class Notification extends React.PureComponent {
11124
11155
  constructor(props) {
@@ -11275,7 +11306,7 @@ var Notify = {
11275
11306
  }
11276
11307
  }
11277
11308
  };
11278
- const defaultProps$m = {
11309
+ const defaultProps$n = {
11279
11310
  isAsync: false,
11280
11311
  checked: false,
11281
11312
  disable: false,
@@ -11297,7 +11328,7 @@ const Switch = (props) => {
11297
11328
  change,
11298
11329
  className,
11299
11330
  style
11300
- } = __spreadValues(__spreadValues({}, defaultProps$m), props);
11331
+ } = __spreadValues(__spreadValues({}, defaultProps$n), props);
11301
11332
  const [value, setValue] = useState(false);
11302
11333
  const b2 = cn("switch");
11303
11334
  useEffect(() => {
@@ -11334,16 +11365,16 @@ const Switch = (props) => {
11334
11365
  className: `${b2("label")} close`
11335
11366
  }, inactiveText))));
11336
11367
  };
11337
- Switch.defaultProps = defaultProps$m;
11368
+ Switch.defaultProps = defaultProps$n;
11338
11369
  Switch.displayName = "NutSwitch";
11339
- const defaultProps$l = {
11370
+ const defaultProps$m = {
11340
11371
  strokeInnerWidth: 10,
11341
11372
  progress: 10,
11342
11373
  isAuto: false,
11343
11374
  progressOption: {}
11344
11375
  };
11345
11376
  const CircleProgress = (props) => {
11346
- const _a = __spreadValues(__spreadValues({}, defaultProps$l), props), {
11377
+ const _a = __spreadValues(__spreadValues({}, defaultProps$m), props), {
11347
11378
  children,
11348
11379
  strokeInnerWidth,
11349
11380
  progress,
@@ -11417,9 +11448,9 @@ const CircleProgress = (props) => {
11417
11448
  className: "nut-circleprogress-content"
11418
11449
  }, !isAuto ? `${progress}%` : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children)));
11419
11450
  };
11420
- CircleProgress.defaultProps = defaultProps$l;
11451
+ CircleProgress.defaultProps = defaultProps$m;
11421
11452
  CircleProgress.displayName = "NutCircleProgress";
11422
- const defaultProps$k = {
11453
+ const defaultProps$l = {
11423
11454
  direction: "across",
11424
11455
  list: [],
11425
11456
  standTime: 1e3,
@@ -11457,7 +11488,7 @@ const NoticeBar = (props) => {
11457
11488
  rightIcon,
11458
11489
  close,
11459
11490
  click
11460
- } = __spreadValues(__spreadValues({}, defaultProps$k), props);
11491
+ } = __spreadValues(__spreadValues({}, defaultProps$l), props);
11461
11492
  const wrap = useRef(null);
11462
11493
  const content = useRef(null);
11463
11494
  const [showNoticeBar, SetShowNoticeBar] = useState(true);
@@ -11670,16 +11701,16 @@ const NoticeBar = (props) => {
11670
11701
  size: "11px"
11671
11702
  }) : null))) : null);
11672
11703
  };
11673
- NoticeBar.defaultProps = defaultProps$k;
11704
+ NoticeBar.defaultProps = defaultProps$l;
11674
11705
  NoticeBar.displayName = "NutNoticeBar";
11675
11706
  const DataContext$1 = createContext({});
11676
- const defaultProps$j = {
11707
+ const defaultProps$k = {
11677
11708
  current: 0,
11678
11709
  direction: "horizontal",
11679
11710
  progressDot: false
11680
11711
  };
11681
11712
  const Steps = (props) => {
11682
- const propSteps = __spreadValues(__spreadValues({}, defaultProps$j), props);
11713
+ const propSteps = __spreadValues(__spreadValues({}, defaultProps$k), props);
11683
11714
  const _a = propSteps, { children, direction, className } = _a, restProps = __objRest(_a, ["children", "direction", "className"]);
11684
11715
  const parentSteps = {
11685
11716
  propSteps
@@ -11695,9 +11726,9 @@ const Steps = (props) => {
11695
11726
  className: classes
11696
11727
  }, restProps), children));
11697
11728
  };
11698
- Steps.defaultProps = defaultProps$j;
11729
+ Steps.defaultProps = defaultProps$k;
11699
11730
  Steps.displayName = "NutSteps";
11700
- const defaultProps$i = {
11731
+ const defaultProps$j = {
11701
11732
  title: "",
11702
11733
  content: "",
11703
11734
  activeIndex: 0,
@@ -11705,7 +11736,7 @@ const defaultProps$i = {
11705
11736
  size: "12px"
11706
11737
  };
11707
11738
  const Step = (props) => {
11708
- const _a = __spreadValues(__spreadValues({}, defaultProps$i), props), {
11739
+ const _a = __spreadValues(__spreadValues({}, defaultProps$j), props), {
11709
11740
  children,
11710
11741
  title,
11711
11742
  content,
@@ -11760,10 +11791,10 @@ const Step = (props) => {
11760
11791
  className: "nut-step-content"
11761
11792
  }, renderContent())));
11762
11793
  };
11763
- Step.defaultProps = defaultProps$i;
11794
+ Step.defaultProps = defaultProps$j;
11764
11795
  Step.displayName = "NutStep";
11765
11796
  const DataContext = createContext({});
11766
- const defaultProps$h = {
11797
+ const defaultProps$i = {
11767
11798
  width: window.innerWidth,
11768
11799
  height: 0,
11769
11800
  duration: 500,
@@ -11780,7 +11811,7 @@ const defaultProps$h = {
11780
11811
  };
11781
11812
  const DISTANCE = 5;
11782
11813
  const Swiper = React__default.forwardRef((props, ref) => {
11783
- const propSwiper = __spreadValues(__spreadValues({}, defaultProps$h), props);
11814
+ const propSwiper = __spreadValues(__spreadValues({}, defaultProps$i), props);
11784
11815
  const _a = propSwiper, {
11785
11816
  children,
11786
11817
  direction,
@@ -12156,13 +12187,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
12156
12187
  });
12157
12188
  })) : /* @__PURE__ */ React__default.createElement("div", null, pageContent)));
12158
12189
  });
12159
- Swiper.defaultProps = defaultProps$h;
12190
+ Swiper.defaultProps = defaultProps$i;
12160
12191
  Swiper.displayName = "NutSwiper";
12161
- const defaultProps$g = {
12192
+ const defaultProps$h = {
12162
12193
  direction: "horizontal"
12163
12194
  };
12164
12195
  const SwiperItem = React__default.forwardRef((props, ref) => {
12165
- const _props = __spreadValues(__spreadValues({}, defaultProps$g), props);
12196
+ const _props = __spreadValues(__spreadValues({}, defaultProps$h), props);
12166
12197
  const { children, direction, size } = _props;
12167
12198
  const parent = useContext$1(DataContext);
12168
12199
  const [offset, setOffset] = useState(0);
@@ -12190,9 +12221,9 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
12190
12221
  style: style()
12191
12222
  }, children);
12192
12223
  });
12193
- SwiperItem.defaultProps = defaultProps$g;
12224
+ SwiperItem.defaultProps = defaultProps$h;
12194
12225
  SwiperItem.displayName = "NutSwiperItem";
12195
- const defaultProps$f = {
12226
+ const defaultProps$g = {
12196
12227
  size: "normal",
12197
12228
  icon: "",
12198
12229
  shape: "round",
@@ -12201,7 +12232,7 @@ const defaultProps$f = {
12201
12232
  src: ""
12202
12233
  };
12203
12234
  const Avatar = (props) => {
12204
- const _a = __spreadValues(__spreadValues({}, defaultProps$f), props), { children, prefixCls, size, shape, bgColor, src, icon, className, style } = _a, rest = __objRest(_a, ["children", "prefixCls", "size", "shape", "bgColor", "src", "icon", "className", "style"]);
12235
+ const _a = __spreadValues(__spreadValues({}, defaultProps$g), props), { children, prefixCls, size, shape, bgColor, src, icon, className, style } = _a, rest = __objRest(_a, ["children", "prefixCls", "size", "shape", "bgColor", "src", "icon", "className", "style"]);
12205
12236
  const sizeValue = ["large", "normal", "small"];
12206
12237
  const classes = classNames({
12207
12238
  [`${prefixCls}`]: true,
@@ -12233,9 +12264,9 @@ const Avatar = (props) => {
12233
12264
  className: "text"
12234
12265
  }, children));
12235
12266
  };
12236
- Avatar.defaultProps = defaultProps$f;
12267
+ Avatar.defaultProps = defaultProps$g;
12237
12268
  Avatar.displayName = "NutAvatar";
12238
- const defaultProps$e = {
12269
+ const defaultProps$f = {
12239
12270
  price: 0,
12240
12271
  needSymbol: true,
12241
12272
  symbol: "&yen;",
@@ -12244,7 +12275,7 @@ const defaultProps$e = {
12244
12275
  className: ""
12245
12276
  };
12246
12277
  const Price = (props) => {
12247
- const _a = __spreadValues(__spreadValues({}, defaultProps$e), props), { price, needSymbol, symbol, decimalDigits, thousands, className } = _a, rest = __objRest(_a, ["price", "needSymbol", "symbol", "decimalDigits", "thousands", "className"]);
12278
+ const _a = __spreadValues(__spreadValues({}, defaultProps$f), props), { price, needSymbol, symbol, decimalDigits, thousands, className } = _a, rest = __objRest(_a, ["price", "needSymbol", "symbol", "decimalDigits", "thousands", "className"]);
12248
12279
  const b2 = cn("price");
12249
12280
  const showSymbol = () => {
12250
12281
  return { __html: (needSymbol ? symbol : "") || "" };
@@ -12294,9 +12325,9 @@ const Price = (props) => {
12294
12325
  className: `${b2("small")}`
12295
12326
  }, formatDecimal(price)));
12296
12327
  };
12297
- Price.defaultProps = defaultProps$e;
12328
+ Price.defaultProps = defaultProps$f;
12298
12329
  Price.displayName = "NutPrice";
12299
- const defaultProps$d = {
12330
+ const defaultProps$e = {
12300
12331
  value: "",
12301
12332
  dot: false,
12302
12333
  max: 1e4,
@@ -12307,7 +12338,7 @@ const defaultProps$d = {
12307
12338
  icons: ""
12308
12339
  };
12309
12340
  const Badge = (props) => {
12310
- const { value, children, dot, max, top, right, zIndex, color, icons } = __spreadValues(__spreadValues({}, defaultProps$d), props);
12341
+ const { value, children, dot, max, top, right, zIndex, color, icons } = __spreadValues(__spreadValues({}, defaultProps$e), props);
12311
12342
  const content = () => {
12312
12343
  if (dot)
12313
12344
  return;
@@ -12340,9 +12371,9 @@ const Badge = (props) => {
12340
12371
  style: getStyle()
12341
12372
  }, content()));
12342
12373
  };
12343
- Badge.defaultProps = defaultProps$d;
12374
+ Badge.defaultProps = defaultProps$e;
12344
12375
  Badge.displayName = "NutBadge";
12345
- const defaultProps$c = {
12376
+ const defaultProps$d = {
12346
12377
  type: "default",
12347
12378
  color: "",
12348
12379
  textColor: "",
@@ -12368,7 +12399,7 @@ const Tag = (props) => {
12368
12399
  textColor,
12369
12400
  isShow,
12370
12401
  onClick
12371
- } = __spreadValues(__spreadValues({}, defaultProps$c), props);
12402
+ } = __spreadValues(__spreadValues({}, defaultProps$d), props);
12372
12403
  const [btnName, setBtnName] = useState("");
12373
12404
  useEffect(() => {
12374
12405
  setBtnName(classes());
@@ -12421,7 +12452,7 @@ const Tag = (props) => {
12421
12452
  className: "text"
12422
12453
  }, children)));
12423
12454
  };
12424
- Tag.defaultProps = defaultProps$c;
12455
+ Tag.defaultProps = defaultProps$d;
12425
12456
  Tag.displayName = "NutTag";
12426
12457
  function fillRef(ref, node) {
12427
12458
  if (typeof ref === "function") {
@@ -12478,7 +12509,7 @@ const getEleAttr = (ele) => {
12478
12509
  }
12479
12510
  return null;
12480
12511
  };
12481
- const defaultProps$b = {
12512
+ const defaultProps$c = {
12482
12513
  list: [],
12483
12514
  theme: "light",
12484
12515
  location: "bottom",
@@ -12488,7 +12519,7 @@ const defaultProps$b = {
12488
12519
  }
12489
12520
  };
12490
12521
  const Popover = (props) => {
12491
- const _a = __spreadValues(__spreadValues({}, defaultProps$b), props), { children, list, theme, location: location2, visible, className, style, onClick } = _a, reset = __objRest(_a, ["children", "list", "theme", "location", "visible", "className", "style", "onClick"]);
12522
+ const _a = __spreadValues(__spreadValues({}, defaultProps$c), props), { children, list, theme, location: location2, visible, className, style, onClick } = _a, reset = __objRest(_a, ["children", "list", "theme", "location", "visible", "className", "style", "onClick"]);
12492
12523
  const goodItem = useRef(null);
12493
12524
  const aa = goodItem.current && findDOMNode(goodItem.current);
12494
12525
  setTimeout(() => {
@@ -12594,9 +12625,9 @@ const Popover = (props) => {
12594
12625
  }, item.name));
12595
12626
  })) : null)));
12596
12627
  };
12597
- Popover.defaultProps = defaultProps$b;
12628
+ Popover.defaultProps = defaultProps$c;
12598
12629
  Popover.displayName = "NutPopover";
12599
- const defaultProps$a = {
12630
+ const defaultProps$b = {
12600
12631
  width: 100,
12601
12632
  height: 100,
12602
12633
  row: 1,
@@ -12609,7 +12640,7 @@ const defaultProps$a = {
12609
12640
  avatarShape: "round"
12610
12641
  };
12611
12642
  const Skeleton = (props) => {
12612
- const _a = __spreadValues(__spreadValues({}, defaultProps$a), props), {
12643
+ const _a = __spreadValues(__spreadValues({}, defaultProps$b), props), {
12613
12644
  className,
12614
12645
  width,
12615
12646
  height,
@@ -12680,8 +12711,190 @@ const Skeleton = (props) => {
12680
12711
  });
12681
12712
  })))));
12682
12713
  };
12683
- Skeleton.defaultProps = defaultProps$a;
12714
+ Skeleton.defaultProps = defaultProps$b;
12684
12715
  Skeleton.displayName = "NutSkeleton";
12716
+ const defaultProps$a = {
12717
+ showPlainText: false,
12718
+ showDays: false,
12719
+ paused: false,
12720
+ startTime: Date.now(),
12721
+ endTime: Date.now()
12722
+ };
12723
+ const CountDown = (props) => {
12724
+ const _a = __spreadValues(__spreadValues({}, defaultProps$a), props), {
12725
+ showPlainText,
12726
+ showDays,
12727
+ paused,
12728
+ startTime,
12729
+ endTime,
12730
+ className,
12731
+ style,
12732
+ onEnd,
12733
+ onPaused,
12734
+ onRestart,
12735
+ onUpdate,
12736
+ children
12737
+ } = _a, rest = __objRest(_a, [
12738
+ "showPlainText",
12739
+ "showDays",
12740
+ "paused",
12741
+ "startTime",
12742
+ "endTime",
12743
+ "className",
12744
+ "style",
12745
+ "onEnd",
12746
+ "onPaused",
12747
+ "onRestart",
12748
+ "onUpdate",
12749
+ "children"
12750
+ ]);
12751
+ const b2 = cn("countdown");
12752
+ const [restTimeStamp, setRestTime] = useState(0);
12753
+ const stateRef = useRef({
12754
+ pauseTime: 0,
12755
+ curr: 0,
12756
+ timer: 0,
12757
+ isPaused: paused,
12758
+ isIninted: false
12759
+ });
12760
+ const fill2 = (v2) => {
12761
+ v2 += "";
12762
+ while (v2.length < 2) {
12763
+ v2 = "0" + v2;
12764
+ }
12765
+ return v2;
12766
+ };
12767
+ const restTime = (t2) => {
12768
+ const ts2 = t2;
12769
+ let rest2 = {
12770
+ d: "-",
12771
+ h: "--",
12772
+ m: "--",
12773
+ s: "--"
12774
+ };
12775
+ if (ts2 === 0) {
12776
+ rest2 = {
12777
+ d: "0",
12778
+ h: "00",
12779
+ m: "00",
12780
+ s: "00"
12781
+ };
12782
+ }
12783
+ if (ts2) {
12784
+ const ds = 24 * 60 * 60 * 1e3;
12785
+ const hs = 60 * 60 * 1e3;
12786
+ const ms = 60 * 1e3;
12787
+ const d2 = ts2 >= ds ? parseInt(String(ts2 / ds)) : 0;
12788
+ const h2 = ts2 - d2 * ds >= hs ? parseInt(String((ts2 - d2 * ds) / hs)) : 0;
12789
+ const m2 = ts2 - d2 * ds - h2 * hs >= ms ? parseInt(String((ts2 - d2 * ds - h2 * hs) / ms)) : 0;
12790
+ const s = Math.round((ts2 - d2 * ds - h2 * hs - m2 * ms) / 1e3);
12791
+ if (d2 >= 0)
12792
+ rest2.d = d2 + "";
12793
+ if (h2 >= 0)
12794
+ rest2.h = fill2(h2);
12795
+ if (m2 >= 0)
12796
+ rest2.m = fill2(m2);
12797
+ if (s >= 0)
12798
+ rest2.s = fill2(s);
12799
+ }
12800
+ return rest2;
12801
+ };
12802
+ const resttime = (() => {
12803
+ const rest2 = restTime(restTimeStamp);
12804
+ const { d: d2 } = rest2;
12805
+ if (!showDays && Number(d2) > 0) {
12806
+ rest2.h = fill2(Number(rest2.h) + Number(d2) * 24);
12807
+ rest2.d = "0";
12808
+ }
12809
+ return rest2;
12810
+ })();
12811
+ const getTimeStamp = (timeStr) => {
12812
+ if (!timeStr)
12813
+ return Date.now();
12814
+ let t2 = timeStr;
12815
+ t2 = t2 > 0 ? +t2 : t2.toString().replace(/\-/g, "/");
12816
+ return new Date(t2).getTime();
12817
+ };
12818
+ const plainText = (() => {
12819
+ const { d: d2, h: h2, m: m2, s } = resttime;
12820
+ const showDayshours = Number(d2) > 0 && showDays ? `${d2}\u5929${h2}` : h2;
12821
+ return `${showDayshours}\u5C0F\u65F6${m2}\u5206${s}\u79D2`;
12822
+ })();
12823
+ const initTimer = () => {
12824
+ if (!stateRef.current.isIninted) {
12825
+ stateRef.current.isIninted = true;
12826
+ }
12827
+ const delay = 1e3;
12828
+ const curr = Date.now();
12829
+ const start2 = getTimeStamp(startTime || curr);
12830
+ const end = getTimeStamp(endTime || curr);
12831
+ const diffTime = curr - start2;
12832
+ setRestTime(end - (start2 + diffTime));
12833
+ stateRef.current.timer = setInterval(() => {
12834
+ if (!stateRef.current.isPaused) {
12835
+ const restTime2 = end - (Date.now() - stateRef.current.pauseTime + diffTime);
12836
+ setRestTime(restTime2);
12837
+ if (restTime2 < 0) {
12838
+ setRestTime(0);
12839
+ onEnd && onEnd();
12840
+ clearInterval(stateRef.current.timer);
12841
+ }
12842
+ }
12843
+ }, delay);
12844
+ };
12845
+ useEffect(() => {
12846
+ if (onUpdate) {
12847
+ const tranTime = restTime(restTimeStamp);
12848
+ onUpdate(tranTime);
12849
+ }
12850
+ }, [restTimeStamp]);
12851
+ useEffect(() => {
12852
+ if (stateRef.current.isIninted) {
12853
+ stateRef.current.isPaused = paused;
12854
+ if (paused) {
12855
+ stateRef.current.curr = getTimeStamp();
12856
+ onPaused && onPaused(restTimeStamp);
12857
+ } else {
12858
+ stateRef.current.pauseTime += getTimeStamp() - stateRef.current.curr;
12859
+ onRestart && onRestart(restTimeStamp);
12860
+ }
12861
+ }
12862
+ }, [paused]);
12863
+ useEffect(() => {
12864
+ if (stateRef.current.isIninted) {
12865
+ initTimer();
12866
+ }
12867
+ }, [endTime, startTime]);
12868
+ useEffect(() => {
12869
+ initTimer();
12870
+ return componentWillUnmount;
12871
+ }, []);
12872
+ const componentWillUnmount = () => {
12873
+ clearInterval(stateRef.current.timer);
12874
+ };
12875
+ return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
12876
+ className: `${b2()} ${className || ""}`,
12877
+ style: __spreadValues({}, style)
12878
+ }, rest), children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, showPlainText ? /* @__PURE__ */ React__default.createElement("div", {
12879
+ className: b2("block")
12880
+ }, " ", plainText, " ") : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, Number(resttime.d) >= 0 && showDays ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", {
12881
+ className: b2("block")
12882
+ }, resttime.d), /* @__PURE__ */ React__default.createElement("div", {
12883
+ className: b2("dot")
12884
+ }, "\u5929")) : null, /* @__PURE__ */ React__default.createElement("div", {
12885
+ className: b2("block")
12886
+ }, resttime.h), /* @__PURE__ */ React__default.createElement("div", {
12887
+ className: b2("dot")
12888
+ }, ":"), /* @__PURE__ */ React__default.createElement("div", {
12889
+ className: b2("block")
12890
+ }, resttime.m), /* @__PURE__ */ React__default.createElement("div", {
12891
+ className: b2("dot")
12892
+ }, ":"), /* @__PURE__ */ React__default.createElement("div", {
12893
+ className: b2("block")
12894
+ }, resttime.s))));
12895
+ };
12896
+ CountDown.defaultProps = defaultProps$a;
12897
+ CountDown.displayName = "NutCountDown";
12685
12898
  const defaultProps$9 = {
12686
12899
  activeName: ["0"],
12687
12900
  accordion: false,
@@ -13693,4 +13906,4 @@ const Card = (props) => {
13693
13906
  };
13694
13907
  Card.defaultProps = defaultProps;
13695
13908
  Card.displayName = "NutCard";
13696
- export { ActionSheet, Address, AnimatingNumbers, Avatar, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, DatePicker, Dialog, Divider, Drag, Elevator, FixedNav, Icon, Infiniteloading, Input, InputNumber, Layout, NavBar, NoticeBar, Notify, Overlay, Pagination, Picker, Popover, Popup, Price, Radio, RadioGroup, Range, Rate, Row, ShortPassword, Signature, Skeleton, Step, Steps, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Tabs, Tag, TextArea, Toast, Uploader };
13909
+ export { ActionSheet, Address, AnimatingNumbers, Avatar, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, FixedNav, Icon, Infiniteloading, Input, InputNumber, Layout, NavBar, NoticeBar, Notify, Overlay, Pagination, Picker, Popover, Popup, Price, Radio, RadioGroup, Range, Rate, Row, ShortPassword, Signature, Skeleton, Step, Steps, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Tabs, Tag, TextArea, Toast, Uploader };