@nutui/nutui-react 2.0.0-alpha.14 → 2.0.0-alpha.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/esm/Card/style/style.css +1 -1
  3. package/dist/esm/Card.js +35 -22
  4. package/dist/esm/ConfigProvider.js +1 -1
  5. package/dist/esm/InfiniteLoading/style/style.css +1 -0
  6. package/dist/esm/{Infiniteloading.js → InfiniteLoading.js} +25 -37
  7. package/dist/esm/Signature/style/index.js +1 -1
  8. package/dist/esm/Signature/style/style.css +1 -1
  9. package/dist/esm/Signature.js +27 -35
  10. package/dist/esm/Tag/style/style.css +1 -1
  11. package/dist/esm/Tag.js +26 -30
  12. package/dist/esm/TimeDetail/style/style.css +1 -1
  13. package/dist/esm/TimeDetail.js +39 -41
  14. package/dist/esm/TimeSelect/style/index.js +0 -1
  15. package/dist/esm/TimeSelect/style/style.css +1 -1
  16. package/dist/esm/TimeSelect.js +91 -114
  17. package/dist/esm/nutui-react.es.js +8 -10
  18. package/dist/esm/types/src/locales/base.d.ts +1 -1
  19. package/dist/esm/types/src/packages/card/card.d.ts +8 -9
  20. package/dist/esm/types/src/packages/card/card.taro.d.ts +8 -9
  21. package/dist/esm/types/src/packages/card/index.d.ts +1 -0
  22. package/dist/esm/types/src/packages/card/index.taro.d.ts +1 -0
  23. package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
  24. package/dist/esm/types/src/packages/imagepreview/imagepreview.taro.d.ts +1 -0
  25. package/dist/esm/types/src/packages/infiniteloading/demo.taro.d.ts +2 -2
  26. package/dist/esm/types/src/packages/infiniteloading/index.d.ts +3 -2
  27. package/dist/esm/types/src/packages/infiniteloading/index.taro.d.ts +3 -2
  28. package/dist/esm/types/src/packages/infiniteloading/infiniteloading.d.ts +9 -14
  29. package/dist/esm/types/src/packages/infiniteloading/infiniteloading.taro.d.ts +8 -12
  30. package/dist/esm/types/src/packages/nutui.react.build.d.ts +2 -3
  31. package/dist/esm/types/src/packages/nutui.react.d.ts +2 -4
  32. package/dist/esm/types/src/packages/nutui.react.scss.d.ts +0 -1
  33. package/dist/esm/types/src/packages/nutui.react.taro.d.ts +1 -3
  34. package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +0 -1
  35. package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +1 -2
  36. package/dist/esm/types/src/packages/signature/index.d.ts +1 -0
  37. package/dist/esm/types/src/packages/signature/index.taro.d.ts +1 -0
  38. package/dist/esm/types/src/packages/signature/signature.d.ts +10 -8
  39. package/dist/esm/types/src/packages/signature/signature.taro.d.ts +7 -12
  40. package/dist/esm/types/src/packages/tag/index.d.ts +1 -0
  41. package/dist/esm/types/src/packages/tag/index.taro.d.ts +1 -0
  42. package/dist/esm/types/src/packages/tag/tag.d.ts +4 -6
  43. package/dist/esm/types/src/packages/tag/tag.taro.d.ts +4 -6
  44. package/dist/esm/types/src/packages/timedetail/index.d.ts +1 -2
  45. package/dist/esm/types/src/packages/timedetail/timedetail.d.ts +9 -11
  46. package/dist/esm/types/src/packages/timedetail/timedetail.taro.d.ts +9 -11
  47. package/dist/esm/types/src/packages/timeselect/demo.taro.d.ts +0 -4
  48. package/dist/esm/types/src/packages/timeselect/index.d.ts +1 -0
  49. package/dist/esm/types/src/packages/timeselect/index.taro.d.ts +1 -0
  50. package/dist/esm/types/src/packages/timeselect/timeselect.d.ts +25 -20
  51. package/dist/esm/types/src/packages/timeselect/timeselect.taro.d.ts +25 -20
  52. package/dist/locales/base.d.ts +1 -1
  53. package/dist/locales/base.js +1 -1
  54. package/dist/locales/en-US.js +2 -2
  55. package/dist/locales/id-ID.js +2 -2
  56. package/dist/locales/tr-TR.js +2 -2
  57. package/dist/locales/zh-CN.js +2 -2
  58. package/dist/locales/zh-TW.js +2 -2
  59. package/dist/locales/zh-UG.js +2 -2
  60. package/dist/nutui.react.es.js +556 -605
  61. package/dist/nutui.react.umd.js +556 -605
  62. package/dist/packages/card/card.scss +8 -14
  63. package/dist/packages/infiniteloading/infiniteloading.scss +2 -25
  64. package/dist/packages/signature/signature.scss +1 -18
  65. package/dist/packages/tag/tag.scss +10 -17
  66. package/dist/packages/timedetail/timedetail.scss +12 -37
  67. package/dist/packages/timeselect/timeselect.scss +15 -44
  68. package/dist/style.css +1 -1
  69. package/dist/style.mjs +1 -1
  70. package/dist/styles/themes/default.scss +0 -1
  71. package/dist/styles/variables-jmapp.scss +50 -97
  72. package/dist/styles/variables.scss +51 -98
  73. package/dist/types/index.d.ts +2 -3
  74. package/dist/types/locales/base.d.ts +1 -1
  75. package/dist/types/packages/card/card.d.ts +57 -14
  76. package/dist/types/packages/card/index.d.ts +1 -0
  77. package/dist/types/packages/configprovider/types.d.ts +1 -1
  78. package/dist/types/packages/infiniteloading/index.d.ts +3 -2
  79. package/dist/types/packages/infiniteloading/infiniteloading.d.ts +57 -18
  80. package/dist/types/packages/signature/index.d.ts +1 -0
  81. package/dist/types/packages/signature/signature.d.ts +38 -12
  82. package/dist/types/packages/tag/index.d.ts +1 -0
  83. package/dist/types/packages/tag/tag.d.ts +52 -14
  84. package/dist/types/packages/timedetail/index.d.ts +1 -2
  85. package/dist/types/packages/timedetail/timedetail.d.ts +9 -11
  86. package/dist/types/packages/timeselect/index.d.ts +1 -0
  87. package/dist/types/packages/timeselect/timeselect.d.ts +62 -21
  88. package/package.json +1 -1
  89. package/dist/esm/Infiniteloading/style/style.css +0 -1
  90. package/dist/esm/TimePannel/style/css.js +0 -1
  91. package/dist/esm/TimePannel/style/index.js +0 -2
  92. package/dist/esm/TimePannel/style/style.css +0 -1
  93. package/dist/esm/TimePannel.js +0 -47
  94. package/dist/esm/types/src/packages/timedetail/demo.d.ts +0 -3
  95. package/dist/esm/types/src/packages/timedetail/demo.taro.d.ts +0 -3
  96. package/dist/esm/types/src/packages/timepannel/demo.d.ts +0 -3
  97. package/dist/esm/types/src/packages/timepannel/demo.taro.d.ts +0 -3
  98. package/dist/esm/types/src/packages/timepannel/index.d.ts +0 -2
  99. package/dist/esm/types/src/packages/timepannel/index.taro.d.ts +0 -2
  100. package/dist/esm/types/src/packages/timepannel/timepannel.d.ts +0 -8
  101. package/dist/esm/types/src/packages/timepannel/timepannel.taro.d.ts +0 -8
  102. package/dist/packages/timepannel/timepannel.scss +0 -17
  103. package/dist/types/packages/timepannel/index.d.ts +0 -2
  104. package/dist/types/packages/timepannel/timepannel.d.ts +0 -8
  105. /package/dist/esm/{Infiniteloading → InfiniteLoading}/style/css.js +0 -0
  106. /package/dist/esm/{Infiniteloading → InfiniteLoading}/style/index.js +0 -0
@@ -9,7 +9,7 @@ var __publicField = (obj, key, value) => {
9
9
  return value;
10
10
  };
11
11
  /*!
12
- * @nutui/nutui-react v2.0.0-alpha.14 Fri Jun 02 2023 17:08:20 GMT+0800 (China Standard Time)
12
+ * @nutui/nutui-react v2.0.0-alpha.15 Wed Jun 07 2023 16:11:56 GMT+0800 (China Standard Time)
13
13
  * (c) 2023 @jdf2e.
14
14
  * Released under the MIT License.
15
15
  */
@@ -2409,7 +2409,7 @@ Check the top-level render call using <` + t + ">.");
2409
2409
  style: {}
2410
2410
  };
2411
2411
  const prefixCls = "nut-button";
2412
- const defaultProps$1s = {
2412
+ const defaultProps$1r = {
2413
2413
  ...ComponentDefaults,
2414
2414
  color: "",
2415
2415
  type: "default",
@@ -2441,7 +2441,7 @@ Check the top-level render call using <` + t + ">.");
2441
2441
  style,
2442
2442
  ...rest
2443
2443
  } = {
2444
- ...defaultProps$1s,
2444
+ ...defaultProps$1r,
2445
2445
  ...props
2446
2446
  };
2447
2447
  const getStyle = React.useCallback(() => {
@@ -2494,7 +2494,7 @@ Check the top-level render call using <` + t + ">.");
2494
2494
  }
2495
2495
  );
2496
2496
  Button.displayName = "NutButton";
2497
- const defaultProps$1r = {
2497
+ const defaultProps$1q = {
2498
2498
  ...ComponentDefaults,
2499
2499
  title: null,
2500
2500
  description: null,
@@ -2504,7 +2504,7 @@ Check the top-level render call using <` + t + ">.");
2504
2504
  onClick: (event) => {
2505
2505
  }
2506
2506
  };
2507
- const classPrefix$m = "nut-cell";
2507
+ const classPrefix$n = "nut-cell";
2508
2508
  const Cell = (props) => {
2509
2509
  const {
2510
2510
  children,
@@ -2518,7 +2518,7 @@ Check the top-level render call using <` + t + ">.");
2518
2518
  style,
2519
2519
  ...rest
2520
2520
  } = {
2521
- ...defaultProps$1r,
2521
+ ...defaultProps$1q,
2522
2522
  ...props
2523
2523
  };
2524
2524
  const handleClick2 = (event) => {
@@ -2535,44 +2535,44 @@ Check the top-level render call using <` + t + ">.");
2535
2535
  return /* @__PURE__ */ React.createElement(
2536
2536
  "div",
2537
2537
  {
2538
- className: classNames(classPrefix$m, className),
2538
+ className: classNames(classPrefix$n, className),
2539
2539
  onClick: (event) => handleClick2(event),
2540
2540
  style: baseStyle,
2541
2541
  ...rest
2542
2542
  },
2543
- children || /* @__PURE__ */ React.createElement(React.Fragment, null, title || description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$m}__left` }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$m}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$m}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React.createElement(
2543
+ children || /* @__PURE__ */ React.createElement(React.Fragment, null, title || description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$n}__left` }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$n}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$n}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React.createElement(
2544
2544
  "div",
2545
2545
  {
2546
- className: `${classPrefix$m}__extra`,
2546
+ className: `${classPrefix$n}__extra`,
2547
2547
  style: styles
2548
2548
  },
2549
2549
  extra
2550
- ) : null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$m}__divider` }))
2550
+ ) : null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$n}__divider` }))
2551
2551
  );
2552
2552
  };
2553
- Cell.defaultProps = defaultProps$1r;
2553
+ Cell.defaultProps = defaultProps$1q;
2554
2554
  Cell.displayName = "NutCell";
2555
- const defaultProps$1q = {
2555
+ const defaultProps$1p = {
2556
2556
  ...ComponentDefaults,
2557
2557
  title: "",
2558
2558
  description: "",
2559
2559
  divider: true
2560
2560
  };
2561
- const classPrefix$l = "nut-cell-group";
2561
+ const classPrefix$m = "nut-cell-group";
2562
2562
  const CellGroup = (props) => {
2563
2563
  const { children, className, style, title, description, divider, ...rest } = {
2564
- ...defaultProps$1q,
2564
+ ...defaultProps$1p,
2565
2565
  ...props
2566
2566
  };
2567
- return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$l, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$l}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$l}__description` }, description) : null, /* @__PURE__ */ React.createElement(
2567
+ return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$m, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$m}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$m}__description` }, description) : null, /* @__PURE__ */ React.createElement(
2568
2568
  "div",
2569
2569
  {
2570
- className: `${classPrefix$l}__wrap ${divider ? `${classPrefix$l}__wrap--divider` : ""}`
2570
+ className: `${classPrefix$m}__wrap ${divider ? `${classPrefix$m}__wrap--divider` : ""}`
2571
2571
  },
2572
2572
  children
2573
2573
  ));
2574
2574
  };
2575
- CellGroup.defaultProps = defaultProps$1q;
2575
+ CellGroup.defaultProps = defaultProps$1p;
2576
2576
  CellGroup.displayName = "NutCellGroup";
2577
2577
  var INFINITY = 1 / 0;
2578
2578
  var symbolTag = "[object Symbol]";
@@ -2924,7 +2924,7 @@ Check the top-level render call using <` + t + ">.");
2924
2924
  },
2925
2925
  signature: {
2926
2926
  reSign: "重签",
2927
- unSupportTpl: "对不起,当前浏览器不支持Canvas,无法使用本控件!"
2927
+ unsupported: "对不起,当前浏览器不支持Canvas,无法使用本控件!"
2928
2928
  },
2929
2929
  ecard: {
2930
2930
  chooseText: "请选择电子卡面值",
@@ -2987,7 +2987,7 @@ Check the top-level render call using <` + t + ">.");
2987
2987
  errorCanvasTips: "当前环境不支持Canvas"
2988
2988
  }
2989
2989
  };
2990
- const defaultProps$1p = {
2990
+ const defaultProps$1o = {
2991
2991
  locale: zhCN
2992
2992
  };
2993
2993
  const defaultConfigRef = {
@@ -3010,7 +3010,7 @@ Check the top-level render call using <` + t + ">.");
3010
3010
  return cssVars;
3011
3011
  }
3012
3012
  const ConfigProvider = (props) => {
3013
- const { children, ...config2 } = { ...defaultProps$1p, ...props };
3013
+ const { children, ...config2 } = { ...defaultProps$1o, ...props };
3014
3014
  const parentConfig = useConfig();
3015
3015
  const theme = config2.theme || {};
3016
3016
  const style = React.useMemo(
@@ -3028,12 +3028,12 @@ Check the top-level render call using <` + t + ">.");
3028
3028
  /* @__PURE__ */ React.createElement("div", { style }, children)
3029
3029
  );
3030
3030
  };
3031
- ConfigProvider.defaultProps = defaultProps$1p;
3031
+ ConfigProvider.defaultProps = defaultProps$1o;
3032
3032
  ConfigProvider.displayName = "NutConfigProvider";
3033
3033
  const pxCheck = (value) => {
3034
3034
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
3035
3035
  };
3036
- const defaultProps$1o = {
3036
+ const defaultProps$1n = {
3037
3037
  ...ComponentDefaults,
3038
3038
  fit: "fill",
3039
3039
  position: "center",
@@ -3044,7 +3044,7 @@ Check the top-level render call using <` + t + ">.");
3044
3044
  loading: true,
3045
3045
  lazy: false
3046
3046
  };
3047
- const classPrefix$k = "nut-image";
3047
+ const classPrefix$l = "nut-image";
3048
3048
  const Image$1 = (props) => {
3049
3049
  const {
3050
3050
  className,
@@ -3062,7 +3062,7 @@ Check the top-level render call using <` + t + ">.");
3062
3062
  onClick,
3063
3063
  onLoad,
3064
3064
  onError
3065
- } = { ...defaultProps$1o, ...props };
3065
+ } = { ...defaultProps$1n, ...props };
3066
3066
  const [innerLoading, setInnerLoading] = React.useState(true);
3067
3067
  const [isError, setIsError] = React.useState(false);
3068
3068
  const imgRef = React.useRef(null);
@@ -3155,7 +3155,7 @@ Check the top-level render call using <` + t + ">.");
3155
3155
  return /* @__PURE__ */ React.createElement(
3156
3156
  "div",
3157
3157
  {
3158
- className: classNames(classPrefix$k, className),
3158
+ className: classNames(classPrefix$l, className),
3159
3159
  style: containerStyle,
3160
3160
  onClick: (e) => {
3161
3161
  imageClick(e);
@@ -3189,7 +3189,7 @@ Check the top-level render call using <` + t + ">.");
3189
3189
  renderErrorImg()
3190
3190
  );
3191
3191
  };
3192
- Image$1.defaultProps = defaultProps$1o;
3192
+ Image$1.defaultProps = defaultProps$1n;
3193
3193
  Image$1.displayName = "NutImage";
3194
3194
  const defaultOverlayProps = {
3195
3195
  ...ComponentDefaults,
@@ -3274,7 +3274,7 @@ Check the top-level render call using <` + t + ">.");
3274
3274
  Overlay.defaultProps = defaultOverlayProps;
3275
3275
  Overlay.displayName = "NutOverlay";
3276
3276
  const DataContext$2 = React.createContext({});
3277
- const defaultProps$1n = {
3277
+ const defaultProps$1m = {
3278
3278
  ...ComponentDefaults,
3279
3279
  span: "24",
3280
3280
  offset: "0",
@@ -3282,7 +3282,7 @@ Check the top-level render call using <` + t + ">.");
3282
3282
  };
3283
3283
  const Col = (props) => {
3284
3284
  const { className, style, span, offset, children, onClick } = {
3285
- ...defaultProps$1n,
3285
+ ...defaultProps$1m,
3286
3286
  ...props
3287
3287
  };
3288
3288
  const [colName, setColName] = React.useState("");
@@ -3314,39 +3314,39 @@ Check the top-level render call using <` + t + ">.");
3314
3314
  children
3315
3315
  );
3316
3316
  };
3317
- Col.defaultProps = defaultProps$1n;
3317
+ Col.defaultProps = defaultProps$1m;
3318
3318
  Col.displayName = "NutCol";
3319
- const defaultProps$1m = {
3319
+ const defaultProps$1l = {
3320
3320
  ...ComponentDefaults,
3321
3321
  contentPosition: "center",
3322
3322
  direction: "horizontal"
3323
3323
  };
3324
- const classPrefix$j = `nut-divider`;
3324
+ const classPrefix$k = `nut-divider`;
3325
3325
  const Divider = (props) => {
3326
3326
  const { children, contentPosition, style, className, direction, ...rest } = {
3327
- ...defaultProps$1m,
3327
+ ...defaultProps$1l,
3328
3328
  ...props
3329
3329
  };
3330
3330
  const classes = direction === "horizontal" ? classNames({
3331
- [`${classPrefix$j}`]: true,
3332
- [`${classPrefix$j}__center`]: children,
3333
- [`${classPrefix$j}__left`]: contentPosition === "left",
3334
- [`${classPrefix$j}__right`]: contentPosition === "right",
3335
- [`${classPrefix$j}__hairline`]: true
3331
+ [`${classPrefix$k}`]: true,
3332
+ [`${classPrefix$k}__center`]: children,
3333
+ [`${classPrefix$k}__left`]: contentPosition === "left",
3334
+ [`${classPrefix$k}__right`]: contentPosition === "right",
3335
+ [`${classPrefix$k}__hairline`]: true
3336
3336
  }) : classNames({
3337
- [`${classPrefix$j}`]: true,
3338
- [`${classPrefix$j}__vertical`]: direction === "vertical"
3337
+ [`${classPrefix$k}`]: true,
3338
+ [`${classPrefix$k}__vertical`]: direction === "vertical"
3339
3339
  });
3340
3340
  return /* @__PURE__ */ React.createElement("div", { className: `${classes} ${className || ""}`, style, ...rest }, children);
3341
3341
  };
3342
- Divider.defaultProps = defaultProps$1m;
3342
+ Divider.defaultProps = defaultProps$1l;
3343
3343
  Divider.displayName = "NutDivider";
3344
3344
  const gridContext = {
3345
3345
  onClick: (item, index) => {
3346
3346
  }
3347
3347
  };
3348
3348
  const GridContext = React.createContext(gridContext);
3349
- const defaultProps$1l = {
3349
+ const defaultProps$1k = {
3350
3350
  text: "",
3351
3351
  columns: 4,
3352
3352
  gap: 0,
@@ -3372,7 +3372,7 @@ Check the top-level render call using <` + t + ">.");
3372
3372
  onClick,
3373
3373
  ...rest
3374
3374
  } = {
3375
- ...defaultProps$1l,
3375
+ ...defaultProps$1k,
3376
3376
  ...props
3377
3377
  };
3378
3378
  const classPrefix2 = "nut-grid-item";
@@ -3430,9 +3430,9 @@ Check the top-level render call using <` + t + ">.");
3430
3430
  /* @__PURE__ */ React.createElement("div", { className: contentClass() }, children && /* @__PURE__ */ React.createElement(React.Fragment, null, children), text && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__text` }, text))
3431
3431
  );
3432
3432
  };
3433
- GridItem.defaultProps = defaultProps$1l;
3433
+ GridItem.defaultProps = defaultProps$1k;
3434
3434
  GridItem.displayName = "NutGridItem";
3435
- const defaultProps$1k = {
3435
+ const defaultProps$1j = {
3436
3436
  columns: 4,
3437
3437
  gap: 0,
3438
3438
  center: true,
@@ -3453,7 +3453,7 @@ Check the top-level render call using <` + t + ">.");
3453
3453
  className,
3454
3454
  onClick,
3455
3455
  ...rest
3456
- } = { ...defaultProps$1k, ...props };
3456
+ } = { ...defaultProps$1j, ...props };
3457
3457
  const childrenDom = React.Children.toArray(children);
3458
3458
  const classPrefix2 = "nut-grid";
3459
3459
  const rootClass = () => {
@@ -3483,18 +3483,18 @@ Check the top-level render call using <` + t + ">.");
3483
3483
  });
3484
3484
  })));
3485
3485
  };
3486
- Grid.defaultProps = defaultProps$1k;
3486
+ Grid.defaultProps = defaultProps$1j;
3487
3487
  Grid.displayName = "NutGrid";
3488
3488
  Grid.Item = GridItem;
3489
- const defaultProps$1j = {};
3489
+ const defaultProps$1i = {};
3490
3490
  const Layout = (props) => {
3491
- ({ ...defaultProps$1j, ...props });
3491
+ ({ ...defaultProps$1i, ...props });
3492
3492
  return /* @__PURE__ */ React.createElement("div", { className: "nut-layout" }, "Layout");
3493
3493
  };
3494
- Layout.defaultProps = defaultProps$1j;
3494
+ Layout.defaultProps = defaultProps$1i;
3495
3495
  Layout.displayName = "NutLayout";
3496
- const classPrefix$i = "nut-row";
3497
- const defaultProps$1i = {
3496
+ const classPrefix$j = "nut-row";
3497
+ const defaultProps$1h = {
3498
3498
  ...ComponentDefaults,
3499
3499
  type: "",
3500
3500
  justify: "start",
@@ -3514,7 +3514,7 @@ Check the top-level render call using <` + t + ">.");
3514
3514
  gutter,
3515
3515
  onClick
3516
3516
  } = {
3517
- ...defaultProps$1i,
3517
+ ...defaultProps$1h,
3518
3518
  ...props
3519
3519
  };
3520
3520
  const getClass = (prefix2, type22) => {
@@ -3528,7 +3528,7 @@ Check the top-level render call using <` + t + ">.");
3528
3528
  ${getClass("justify", justify)}
3529
3529
  ${getClass("align", align)}
3530
3530
  ${getClass("flex", wrap)}
3531
- ${classPrefix$i}
3531
+ ${classPrefix$j}
3532
3532
  `;
3533
3533
  };
3534
3534
  const parentRow = {
@@ -3546,7 +3546,7 @@ Check the top-level render call using <` + t + ">.");
3546
3546
  children
3547
3547
  ));
3548
3548
  };
3549
- Row.defaultProps = defaultProps$1i;
3549
+ Row.defaultProps = defaultProps$1h;
3550
3550
  Row.displayName = "NutRow";
3551
3551
  const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
3552
3552
  const defaultRoot = canUseDom ? window : void 0;
@@ -3621,13 +3621,13 @@ Check the top-level render call using <` + t + ">.");
3621
3621
  stop2.current = true;
3622
3622
  };
3623
3623
  }
3624
- const defaultProps$1h = {
3624
+ const defaultProps$1g = {
3625
3625
  ...ComponentDefaults,
3626
3626
  position: "top",
3627
3627
  threshold: 0,
3628
3628
  zIndex: 2e3
3629
3629
  };
3630
- const classPrefix$h = "nut-sticky";
3630
+ const classPrefix$i = "nut-sticky";
3631
3631
  const Sticky = (props) => {
3632
3632
  const {
3633
3633
  position,
@@ -3639,7 +3639,7 @@ Check the top-level render call using <` + t + ">.");
3639
3639
  threshold,
3640
3640
  onChange,
3641
3641
  ...rest
3642
- } = { ...defaultProps$1h, ...props };
3642
+ } = { ...defaultProps$1g, ...props };
3643
3643
  const stickyRef = React.useRef(null);
3644
3644
  const rootRef = React.useRef(null);
3645
3645
  const [isFixed, setIsFixed] = React.useState(false);
@@ -3749,15 +3749,15 @@ Check the top-level render call using <` + t + ">.");
3749
3749
  {
3750
3750
  ref: rootRef,
3751
3751
  style: { ...style, ...rootStyle },
3752
- className: classNames(classPrefix$h, className),
3752
+ className: classNames(classPrefix$i, className),
3753
3753
  ...rest
3754
3754
  },
3755
3755
  /* @__PURE__ */ React.createElement("div", { className: "nut-sticky--box", ref: stickyRef, style: stickyStyle }, children)
3756
3756
  );
3757
3757
  };
3758
- Sticky.defaultProps = defaultProps$1h;
3758
+ Sticky.defaultProps = defaultProps$1g;
3759
3759
  Sticky.displayName = "NutSticky";
3760
- const defaultProps$1g = {
3760
+ const defaultProps$1f = {
3761
3761
  ...ComponentDefaults,
3762
3762
  target: "",
3763
3763
  threshold: 200,
@@ -3775,7 +3775,7 @@ Check the top-level render call using <` + t + ">.");
3775
3775
  style,
3776
3776
  onClick
3777
3777
  } = {
3778
- ...defaultProps$1g,
3778
+ ...defaultProps$1f,
3779
3779
  ...props
3780
3780
  };
3781
3781
  const classPrefix2 = "nut-backtop";
@@ -3873,7 +3873,7 @@ Check the top-level render call using <` + t + ">.");
3873
3873
  children || /* @__PURE__ */ React.createElement(y$2, { width: 19, height: 19, className: "nut-backtop-main" })
3874
3874
  );
3875
3875
  };
3876
- BackTop.defaultProps = defaultProps$1g;
3876
+ BackTop.defaultProps = defaultProps$1f;
3877
3877
  BackTop.displayName = "NutBackTop";
3878
3878
  function clamp$1(v, min, max) {
3879
3879
  return Math.max(min, Math.min(v, max));
@@ -8991,7 +8991,7 @@ Please add \`${key}Action\` when creating your handler.`);
8991
8991
  });
8992
8992
  const animated = host.animated;
8993
8993
  const elevatorContext = React.createContext({});
8994
- const defaultProps$1f = {
8994
+ const defaultProps$1e = {
8995
8995
  ...ComponentDefaults,
8996
8996
  height: "200px",
8997
8997
  floorKey: "title",
@@ -9017,7 +9017,7 @@ Please add \`${key}Action\` when creating your handler.`);
9017
9017
  children,
9018
9018
  ...rest
9019
9019
  } = {
9020
- ...defaultProps$1f,
9020
+ ...defaultProps$1e,
9021
9021
  ...props
9022
9022
  };
9023
9023
  const classPrefix2 = "nut-elevator";
@@ -9192,10 +9192,10 @@ Please add \`${key}Action\` when creating your handler.`);
9192
9192
  })
9193
9193
  ))) : null);
9194
9194
  };
9195
- Elevator.defaultProps = defaultProps$1f;
9195
+ Elevator.defaultProps = defaultProps$1e;
9196
9196
  Elevator.displayName = "NutElevator";
9197
9197
  Elevator.Context = elevatorContext;
9198
- const defaultProps$1e = {
9198
+ const defaultProps$1d = {
9199
9199
  ...ComponentDefaults,
9200
9200
  activeText: "",
9201
9201
  inactiveText: "",
@@ -9223,7 +9223,7 @@ Please add \`${key}Action\` when creating your handler.`);
9223
9223
  content,
9224
9224
  ...rest
9225
9225
  } = {
9226
- ...defaultProps$1e,
9226
+ ...defaultProps$1d,
9227
9227
  ...props
9228
9228
  };
9229
9229
  const classPrefix2 = "nut-fixednav";
@@ -9275,9 +9275,9 @@ Please add \`${key}Action\` when creating your handler.`);
9275
9275
  /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__btn`, onClick: () => onUpdateValue() }, content || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(y$6, { color: "#fff" }), /* @__PURE__ */ React.createElement("div", { className: "text" }, visible ? activeText || locale.fixednav.activeText : inactiveText || locale.fixednav.inactiveText)))
9276
9276
  );
9277
9277
  };
9278
- FixedNav.defaultProps = defaultProps$1e;
9278
+ FixedNav.defaultProps = defaultProps$1d;
9279
9279
  FixedNav.displayName = "NutFixedNav";
9280
- const defaultProps$1d = {
9280
+ const defaultProps$1c = {
9281
9281
  ...ComponentDefaults,
9282
9282
  left: "",
9283
9283
  right: "",
@@ -9300,7 +9300,7 @@ Please add \`${key}Action\` when creating your handler.`);
9300
9300
  zIndex,
9301
9301
  onClickBack
9302
9302
  } = {
9303
- ...defaultProps$1d,
9303
+ ...defaultProps$1c,
9304
9304
  ...props
9305
9305
  };
9306
9306
  const classPrefix2 = "nut-navbar";
@@ -9337,7 +9337,7 @@ Please add \`${key}Action\` when creating your handler.`);
9337
9337
  const cls = classNames(classPrefix2, classes, className);
9338
9338
  return /* @__PURE__ */ React.createElement(React.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}--placeholder` }, renderWrapper()) : renderWrapper());
9339
9339
  };
9340
- NavBar.defaultProps = defaultProps$1d;
9340
+ NavBar.defaultProps = defaultProps$1c;
9341
9341
  NavBar.displayName = "NutNavBar";
9342
9342
  function _extends$1() {
9343
9343
  _extends$1 = Object.assign ? Object.assign.bind() : function(target) {
@@ -11080,7 +11080,7 @@ Please add \`${key}Action\` when creating your handler.`);
11080
11080
  onExited: propTypesExports.func
11081
11081
  }) : {};
11082
11082
  const CSSTransition$1 = CSSTransition;
11083
- const defaultProps$1c = {
11083
+ const defaultProps$1b = {
11084
11084
  ...ComponentDefaults,
11085
11085
  position: "center",
11086
11086
  transition: "",
@@ -11253,7 +11253,7 @@ Please add \`${key}Action\` when creating your handler.`);
11253
11253
  }, [position, transition]);
11254
11254
  return /* @__PURE__ */ React.createElement(React.Fragment, null, renderToContainer(portal, renderNode()));
11255
11255
  };
11256
- Popup.defaultProps = defaultProps$1c;
11256
+ Popup.defaultProps = defaultProps$1b;
11257
11257
  Popup.displayName = "NutPopup";
11258
11258
  const handleClick = (e) => {
11259
11259
  e.stopPropagation();
@@ -11269,7 +11269,7 @@ Please add \`${key}Action\` when creating your handler.`);
11269
11269
  }
11270
11270
  };
11271
11271
  const OffsetContext = React.createContext(20);
11272
- const defaultProps$1b = {
11272
+ const defaultProps$1a = {
11273
11273
  ...ComponentDefaults,
11274
11274
  position: "left",
11275
11275
  width: "80%"
@@ -11286,7 +11286,7 @@ Please add \`${key}Action\` when creating your handler.`);
11286
11286
  onClose,
11287
11287
  ...rest
11288
11288
  } = {
11289
- ...defaultProps$1b,
11289
+ ...defaultProps$1a,
11290
11290
  ...props
11291
11291
  };
11292
11292
  const indent = props.indent ? Number(props.indent) : 20;
@@ -11318,7 +11318,7 @@ Please add \`${key}Action\` when creating your handler.`);
11318
11318
  )))
11319
11319
  );
11320
11320
  };
11321
- SideNavBar.defaultProps = defaultProps$1b;
11321
+ SideNavBar.defaultProps = defaultProps$1a;
11322
11322
  SideNavBar.displayName = "NutSideNavBar";
11323
11323
  const SideNavBarItem = (props) => {
11324
11324
  const classPrefix2 = "nut-subsidenavbar";
@@ -11337,13 +11337,13 @@ Please add \`${key}Action\` when creating your handler.`);
11337
11337
  title
11338
11338
  );
11339
11339
  };
11340
- const defaultProps$1a = {
11340
+ const defaultProps$19 = {
11341
11341
  open: true
11342
11342
  };
11343
11343
  const SubSideNavBar = (props) => {
11344
11344
  const classPrefix2 = "nut-subsidenavbar";
11345
11345
  const { title, value, children, onClick, open, ...rest } = {
11346
- ...defaultProps$1a,
11346
+ ...defaultProps$19,
11347
11347
  ...props
11348
11348
  };
11349
11349
  const offset = React.useContext(OffsetContext);
@@ -11409,7 +11409,7 @@ Please add \`${key}Action\` when creating your handler.`);
11409
11409
  }
11410
11410
  return [uncontrolled, handleUncontrolledChange];
11411
11411
  }
11412
- const defaultProps$19 = {
11412
+ const defaultProps$18 = {
11413
11413
  ...ComponentDefaults,
11414
11414
  value: "",
11415
11415
  dot: false,
@@ -11420,7 +11420,7 @@ Please add \`${key}Action\` when creating your handler.`);
11420
11420
  };
11421
11421
  const Badge = (props) => {
11422
11422
  const { className, style, value, max, children, dot, top, right, color } = {
11423
- ...defaultProps$19,
11423
+ ...defaultProps$18,
11424
11424
  ...props
11425
11425
  };
11426
11426
  const classPrefix2 = "nut-badge";
@@ -11447,9 +11447,9 @@ Please add \`${key}Action\` when creating your handler.`);
11447
11447
  };
11448
11448
  return /* @__PURE__ */ React.createElement("div", { className: classes, style }, typeof value === "object" && value && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__icon` }, value), /* @__PURE__ */ React.createElement("div", null, children), /* @__PURE__ */ React.createElement("div", { className: contentClasses, style: getStyle() }, content()));
11449
11449
  };
11450
- Badge.defaultProps = defaultProps$19;
11450
+ Badge.defaultProps = defaultProps$18;
11451
11451
  Badge.displayName = "NutBadge";
11452
- const defaultProps$18 = {
11452
+ const defaultProps$17 = {
11453
11453
  ...ComponentDefaults,
11454
11454
  title: "",
11455
11455
  icon: null,
@@ -11471,7 +11471,7 @@ Please add \`${key}Action\` when creating your handler.`);
11471
11471
  handleClick: handleClick2,
11472
11472
  ...rest
11473
11473
  } = {
11474
- ...defaultProps$18,
11474
+ ...defaultProps$17,
11475
11475
  ...props
11476
11476
  };
11477
11477
  const classPrefix2 = "nut-tabbar-item";
@@ -11495,7 +11495,7 @@ Please add \`${key}Action\` when creating your handler.`);
11495
11495
  icon ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Badge, { ...rest }, /* @__PURE__ */ React.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React.createElement(Badge, { ...rest }, /* @__PURE__ */ React.createElement("div", { className: titleClass }, title))
11496
11496
  );
11497
11497
  };
11498
- const defaultProps$17 = {
11498
+ const defaultProps$16 = {
11499
11499
  ...ComponentDefaults,
11500
11500
  defaultValue: 0,
11501
11501
  fixed: false,
@@ -11518,7 +11518,7 @@ Please add \`${key}Action\` when creating your handler.`);
11518
11518
  style,
11519
11519
  onSwitch
11520
11520
  } = {
11521
- ...defaultProps$17,
11521
+ ...defaultProps$16,
11522
11522
  ...props
11523
11523
  };
11524
11524
  const classPrefix2 = "nut-tabbar";
@@ -11553,17 +11553,17 @@ Please add \`${key}Action\` when creating your handler.`);
11553
11553
  (fixed || safeArea) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__safe-area` })
11554
11554
  );
11555
11555
  };
11556
- Tabbar.defaultProps = defaultProps$17;
11556
+ Tabbar.defaultProps = defaultProps$16;
11557
11557
  Tabbar.displayName = "NutTabbar";
11558
11558
  Tabbar.Item = TabbarItem;
11559
- const defaultProps$16 = {
11559
+ const defaultProps$15 = {
11560
11560
  title: "",
11561
11561
  value: "",
11562
11562
  disabled: false
11563
11563
  };
11564
11564
  const TabPane = (props) => {
11565
11565
  const { children, autoHeightClassName, className, disabled } = {
11566
- ...defaultProps$16,
11566
+ ...defaultProps$15,
11567
11567
  ...props
11568
11568
  };
11569
11569
  const classPrefix2 = "nut-tabpane";
@@ -11594,7 +11594,7 @@ Please add \`${key}Action\` when creating your handler.`);
11594
11594
  const [, updateState] = React.useState();
11595
11595
  return React.useCallback(() => updateState({}), []);
11596
11596
  }
11597
- const defaultProps$15 = {
11597
+ const defaultProps$14 = {
11598
11598
  ...ComponentDefaults,
11599
11599
  tabStyle: {},
11600
11600
  activeColor: "",
@@ -11603,7 +11603,7 @@ Please add \`${key}Action\` when creating your handler.`);
11603
11603
  duration: 300,
11604
11604
  autoHeight: false
11605
11605
  };
11606
- const classPrefix$g = "nut-tabs";
11606
+ const classPrefix$h = "nut-tabs";
11607
11607
  const Tabs = (props) => {
11608
11608
  const {
11609
11609
  activeColor,
@@ -11620,7 +11620,7 @@ Please add \`${key}Action\` when creating your handler.`);
11620
11620
  autoHeight,
11621
11621
  ...rest
11622
11622
  } = {
11623
- ...defaultProps$15,
11623
+ ...defaultProps$14,
11624
11624
  ...props
11625
11625
  };
11626
11626
  const [value, setValue] = usePropsValue({
@@ -11697,14 +11697,14 @@ Please add \`${key}Action\` when creating your handler.`);
11697
11697
  }
11698
11698
  }, [children]);
11699
11699
  const classes = classNames(
11700
- classPrefix$g,
11701
- `${classPrefix$g}--${direction}`,
11700
+ classPrefix$h,
11701
+ `${classPrefix$h}--${direction}`,
11702
11702
  className
11703
11703
  );
11704
- const classesTitle = classNames(`${classPrefix$g}__titles`, {
11705
- [`${classPrefix$g}__titles--${activeType}`]: activeType,
11706
- [`${classPrefix$g}__titles--scrollable`]: true,
11707
- [`${classPrefix$g}__titles--${align}`]: align
11704
+ const classesTitle = classNames(`${classPrefix$h}__titles`, {
11705
+ [`${classPrefix$h}__titles--${activeType}`]: activeType,
11706
+ [`${classPrefix$h}__titles--scrollable`]: true,
11707
+ [`${classPrefix$h}__titles--${align}`]: align
11708
11708
  });
11709
11709
  const tabsActiveStyle = {
11710
11710
  color: activeType === "smile" ? activeColor : "",
@@ -11734,7 +11734,7 @@ Please add \`${key}Action\` when creating your handler.`);
11734
11734
  onClick: () => {
11735
11735
  tabChange(item);
11736
11736
  },
11737
- className: classNames(`${classPrefix$g}__titles-item`, {
11737
+ className: classNames(`${classPrefix$h}__titles-item`, {
11738
11738
  [`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
11739
11739
  [`nut-tabs__titles-item--disabled`]: item.disabled,
11740
11740
  [`nut-tabs__titles-item--${align}`]: align
@@ -11745,14 +11745,14 @@ Please add \`${key}Action\` when creating your handler.`);
11745
11745
  activeType === "line" && /* @__PURE__ */ React.createElement(
11746
11746
  "div",
11747
11747
  {
11748
- className: `${classPrefix$g}__titles-item__line`,
11748
+ className: `${classPrefix$h}__titles-item__line`,
11749
11749
  style: tabsActiveStyle
11750
11750
  }
11751
11751
  ),
11752
11752
  activeType === "smile" && /* @__PURE__ */ React.createElement(
11753
11753
  "div",
11754
11754
  {
11755
- className: `${classPrefix$g}__titles-item__smile`,
11755
+ className: `${classPrefix$h}__titles-item__smile`,
11756
11756
  style: tabsActiveStyle
11757
11757
  },
11758
11758
  /* @__PURE__ */ React.createElement(x$7, { color: activeColor, width: 40, height: 20 })
@@ -11764,13 +11764,13 @@ Please add \`${key}Action\` when creating your handler.`);
11764
11764
  {
11765
11765
  ellipsis: true
11766
11766
  },
11767
- `${classPrefix$g}__titles-item__text`
11767
+ `${classPrefix$h}__titles-item__text`
11768
11768
  )
11769
11769
  },
11770
11770
  item.title
11771
11771
  )
11772
11772
  );
11773
- })), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$g}__content__wrap` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$g}__content`, style: contentStyle }, React.Children.map(children, (child, idx) => {
11773
+ })), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$h}__content__wrap` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$h}__content`, style: contentStyle }, React.Children.map(children, (child, idx) => {
11774
11774
  if (!React.isValidElement(child)) {
11775
11775
  return null;
11776
11776
  }
@@ -11787,7 +11787,7 @@ Please add \`${key}Action\` when creating your handler.`);
11787
11787
  return React.cloneElement(child, childProps);
11788
11788
  }))));
11789
11789
  };
11790
- Tabs.defaultProps = defaultProps$15;
11790
+ Tabs.defaultProps = defaultProps$14;
11791
11791
  Tabs.displayName = "NutTabs";
11792
11792
  Tabs.TabPane = TabPane;
11793
11793
  var classnameExports = {};
@@ -11910,7 +11910,7 @@ Please add \`${key}Action\` when creating your handler.`);
11910
11910
  }
11911
11911
  })(classname);
11912
11912
  const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
11913
- const defaultProps$14 = {
11913
+ const defaultProps$13 = {
11914
11914
  type: "custom",
11915
11915
  existAddress: [],
11916
11916
  defaultIcon: null,
@@ -11932,7 +11932,7 @@ Please add \`${key}Action\` when creating your handler.`);
11932
11932
  onClose,
11933
11933
  onSwitchModule,
11934
11934
  ...rest
11935
- } = { ...defaultProps$14, ...props };
11935
+ } = { ...defaultProps$13, ...props };
11936
11936
  const b = cn("address");
11937
11937
  const selectedExist = (item) => {
11938
11938
  const copyExistAdd = existAddress;
@@ -11962,7 +11962,7 @@ Please add \`${key}Action\` when creating your handler.`);
11962
11962
  return /* @__PURE__ */ React.createElement("li", { className: b("exist-item"), key: index }, /* @__PURE__ */ React.createElement("div", { onClick: () => selectedExist(item) }, item.selectedAddress ? selectedIcon : defaultIcon, /* @__PURE__ */ React.createElement("div", { className: b("exist-item-info") }, item.name && item.phone && /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-top" }, /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-name" }, item.name), /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-phone" }, item.phone)), /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-bottom" }, /* @__PURE__ */ React.createElement("div", null, item.provinceName + item.cityName + item.countyName + item.townName + item.addressDetail)))));
11963
11963
  }))), isShowCustomAddress && /* @__PURE__ */ React.createElement("div", { className: b("choose-other"), onClick: onSwitch }, /* @__PURE__ */ React.createElement("div", { className: b("choose-other-btn") }, customAndExistTitle || locale.address.chooseAnotherAddress)));
11964
11964
  };
11965
- const defaultProps$13 = {
11965
+ const defaultProps$12 = {
11966
11966
  modelValue: [],
11967
11967
  type: "custom",
11968
11968
  province: [],
@@ -11987,7 +11987,7 @@ Please add \`${key}Action\` when creating your handler.`);
11987
11987
  onClose,
11988
11988
  ...rest
11989
11989
  } = {
11990
- ...defaultProps$13,
11990
+ ...defaultProps$12,
11991
11991
  ...props
11992
11992
  };
11993
11993
  const b = cn("address");
@@ -12156,28 +12156,28 @@ Please add \`${key}Action\` when creating your handler.`);
12156
12156
  nextAreaList(item);
12157
12157
  };
12158
12158
  React.useEffect(() => {
12159
- const { province: province2 } = { ...defaultProps$13, ...props };
12159
+ const { province: province2 } = { ...defaultProps$12, ...props };
12160
12160
  setRegionList({
12161
12161
  ...regionList,
12162
12162
  province: isCustom2() ? transformData(province2) : province2
12163
12163
  });
12164
12164
  }, [province]);
12165
12165
  React.useEffect(() => {
12166
- const { city: city2 } = { ...defaultProps$13, ...props };
12166
+ const { city: city2 } = { ...defaultProps$12, ...props };
12167
12167
  setRegionList({
12168
12168
  ...regionList,
12169
12169
  city: isCustom2() ? transformData(city2) : city2
12170
12170
  });
12171
12171
  }, [city]);
12172
12172
  React.useEffect(() => {
12173
- const { country: country2 } = { ...defaultProps$13, ...props };
12173
+ const { country: country2 } = { ...defaultProps$12, ...props };
12174
12174
  setRegionList({
12175
12175
  ...regionList,
12176
12176
  country: isCustom2() ? transformData(country2) : country2
12177
12177
  });
12178
12178
  }, [country]);
12179
12179
  React.useEffect(() => {
12180
- const { town: town2 } = { ...defaultProps$13, ...props };
12180
+ const { town: town2 } = { ...defaultProps$12, ...props };
12181
12181
  setRegionList({
12182
12182
  ...regionList,
12183
12183
  town: isCustom2() ? transformData(town2) : town2
@@ -12243,7 +12243,7 @@ Please add \`${key}Action\` when creating your handler.`);
12243
12243
  }
12244
12244
  )));
12245
12245
  };
12246
- const defaultProps$12 = {
12246
+ const defaultProps$11 = {
12247
12247
  ...ComponentDefaults,
12248
12248
  modelValue: false,
12249
12249
  modelSelect: [],
@@ -12294,7 +12294,7 @@ Please add \`${key}Action\` when creating your handler.`);
12294
12294
  className,
12295
12295
  ...rest
12296
12296
  } = {
12297
- ...defaultProps$12,
12297
+ ...defaultProps$11,
12298
12298
  ...props
12299
12299
  };
12300
12300
  const b = cn("address");
@@ -12446,7 +12446,7 @@ Please add \`${key}Action\` when creating your handler.`);
12446
12446
  )
12447
12447
  ));
12448
12448
  };
12449
- Address.defaultProps = defaultProps$12;
12449
+ Address.defaultProps = defaultProps$11;
12450
12450
  Address.displayName = "NutAddress";
12451
12451
  const Utils = {
12452
12452
  /**
@@ -12566,7 +12566,7 @@ Please add \`${key}Action\` when creating your handler.`);
12566
12566
  return false;
12567
12567
  }
12568
12568
  };
12569
- const defaultProps$11 = {
12569
+ const defaultProps$10 = {
12570
12570
  type: "one",
12571
12571
  isAutoBackFill: false,
12572
12572
  poppable: true,
@@ -12618,7 +12618,7 @@ Please add \`${key}Action\` when creating your handler.`);
12618
12618
  onUpdate,
12619
12619
  onSelected,
12620
12620
  onYearMonthChange
12621
- } = { ...defaultProps$11, ...props };
12621
+ } = { ...defaultProps$10, ...props };
12622
12622
  const weeks = locale.calendaritem.weekdays;
12623
12623
  const [yearMonthTitle, setYearMonthTitle] = React.useState("");
12624
12624
  const [monthsData, setMonthsData] = React.useState([]);
@@ -13200,9 +13200,9 @@ Please add \`${key}Action\` when creating your handler.`);
13200
13200
  ))
13201
13201
  ), poppable && !isAutoBackFill ? /* @__PURE__ */ React.createElement("div", { className: "nut-calendar-footer" }, /* @__PURE__ */ React.createElement("div", { className: "calendar-confirm-btn", onClick: confirm2 }, confirmText || locale.confirm)) : ""));
13202
13202
  });
13203
- CalendarItem.defaultProps = defaultProps$11;
13203
+ CalendarItem.defaultProps = defaultProps$10;
13204
13204
  CalendarItem.displayName = "NutCalendarItem";
13205
- const defaultProps$10 = {
13205
+ const defaultProps$$ = {
13206
13206
  type: "one",
13207
13207
  isAutoBackFill: false,
13208
13208
  poppable: true,
@@ -13257,7 +13257,7 @@ Please add \`${key}Action\` when creating your handler.`);
13257
13257
  onChoose,
13258
13258
  onSelected,
13259
13259
  onYearMonthChange
13260
- } = { ...defaultProps$10, ...props };
13260
+ } = { ...defaultProps$$, ...props };
13261
13261
  const calendarRef = React.useRef(null);
13262
13262
  const close = () => {
13263
13263
  onClose && onClose();
@@ -13327,9 +13327,9 @@ Please add \`${key}Action\` when creating your handler.`);
13327
13327
  renderItem()
13328
13328
  ) : renderItem());
13329
13329
  });
13330
- Calendar.defaultProps = defaultProps$10;
13330
+ Calendar.defaultProps = defaultProps$$;
13331
13331
  Calendar.displayName = "NutCalendar";
13332
- const defaultProps$$ = {
13332
+ const defaultProps$_ = {
13333
13333
  data: {
13334
13334
  text: "",
13335
13335
  value: "",
@@ -13346,7 +13346,7 @@ Please add \`${key}Action\` when creating your handler.`);
13346
13346
  };
13347
13347
  const InternalCascaderItem = (props, ref) => {
13348
13348
  const { data, checked, activeIcon, chooseItem, activeColor } = {
13349
- ...defaultProps$$,
13349
+ ...defaultProps$_,
13350
13350
  ...props
13351
13351
  };
13352
13352
  const classPrefix2 = "nut-cascader-item";
@@ -13388,7 +13388,7 @@ Please add \`${key}Action\` when creating your handler.`);
13388
13388
  );
13389
13389
  };
13390
13390
  const CascaderItem = React.forwardRef(InternalCascaderItem);
13391
- CascaderItem.defaultProps = defaultProps$$;
13391
+ CascaderItem.defaultProps = defaultProps$_;
13392
13392
  CascaderItem.displayName = "NutCascaderItem";
13393
13393
  const formatTree = (tree, parent, config2) => tree.map((node) => {
13394
13394
  const {
@@ -13526,7 +13526,7 @@ Please add \`${key}Action\` when creating your handler.`);
13526
13526
  }
13527
13527
  }
13528
13528
  const Tree$1 = Tree;
13529
- const defaultProps$_ = {
13529
+ const defaultProps$Z = {
13530
13530
  ...ComponentDefaults,
13531
13531
  activeColor: "",
13532
13532
  activeIcon: "checklist",
@@ -13569,7 +13569,7 @@ Please add \`${key}Action\` when creating your handler.`);
13569
13569
  onClose,
13570
13570
  onChange,
13571
13571
  onPathChange
13572
- } = { ...defaultProps$_, ...props };
13572
+ } = { ...defaultProps$Z, ...props };
13573
13573
  const [tabvalue, setTabvalue] = React.useState("c1");
13574
13574
  const [optionsData, setOptionsData] = React.useState([]);
13575
13575
  const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
@@ -13831,11 +13831,11 @@ Please add \`${key}Action\` when creating your handler.`);
13831
13831
  ) : renderItem());
13832
13832
  };
13833
13833
  const Cascader = React.forwardRef(InternalCascader);
13834
- Cascader.defaultProps = defaultProps$_;
13834
+ Cascader.defaultProps = defaultProps$Z;
13835
13835
  Cascader.displayName = "NutCascader";
13836
13836
  const CheckboxGroupContext = React.createContext(null);
13837
13837
  const Context = CheckboxGroupContext;
13838
- const defaultProps$Z = {
13838
+ const defaultProps$Y = {
13839
13839
  max: void 0,
13840
13840
  labelPosition: "right",
13841
13841
  direction: "vertical",
@@ -13843,10 +13843,10 @@ Please add \`${key}Action\` when creating your handler.`);
13843
13843
  },
13844
13844
  options: []
13845
13845
  };
13846
- const classPrefix$f = "nut-checkboxgroup";
13846
+ const classPrefix$g = "nut-checkboxgroup";
13847
13847
  const CheckboxGroup = React.forwardRef(
13848
13848
  (props, ref) => {
13849
- const { children } = { ...defaultProps$Z, ...props };
13849
+ const { children } = { ...defaultProps$Y, ...props };
13850
13850
  const {
13851
13851
  className,
13852
13852
  disabled,
@@ -13925,7 +13925,7 @@ Please add \`${key}Action\` when creating your handler.`);
13925
13925
  /* @__PURE__ */ React.createElement(
13926
13926
  "div",
13927
13927
  {
13928
- className: classNames(classPrefix$f, className, {
13928
+ className: classNames(classPrefix$g, className, {
13929
13929
  [`nut-checkboxgroup--${props.direction}`]: props.direction
13930
13930
  }),
13931
13931
  ...rest
@@ -13935,9 +13935,9 @@ Please add \`${key}Action\` when creating your handler.`);
13935
13935
  );
13936
13936
  }
13937
13937
  );
13938
- CheckboxGroup.defaultProps = defaultProps$Z;
13938
+ CheckboxGroup.defaultProps = defaultProps$Y;
13939
13939
  CheckboxGroup.displayName = "NutCheckboxGroup";
13940
- const defaultProps$Y = {
13940
+ const defaultProps$X = {
13941
13941
  ...ComponentDefaults,
13942
13942
  disabled: false,
13943
13943
  labelPosition: "right",
@@ -13947,10 +13947,10 @@ Please add \`${key}Action\` when creating your handler.`);
13947
13947
  onChange: (value) => {
13948
13948
  }
13949
13949
  };
13950
- const classPrefix$e = "nut-checkbox";
13950
+ const classPrefix$f = "nut-checkbox";
13951
13951
  const Checkbox = (props) => {
13952
13952
  const { children } = {
13953
- ...defaultProps$Y,
13953
+ ...defaultProps$X,
13954
13954
  ...props
13955
13955
  };
13956
13956
  const {
@@ -14009,22 +14009,22 @@ Please add \`${key}Action\` when creating your handler.`);
14009
14009
  };
14010
14010
  const color = () => {
14011
14011
  if (innerDisabled) {
14012
- return `${classPrefix$e}__icon--disable`;
14012
+ return `${classPrefix$f}__icon--disable`;
14013
14013
  }
14014
14014
  if (innerChecked) {
14015
14015
  if (innerIndeterminate) {
14016
- return `${classPrefix$e}__icon--indeterminate`;
14016
+ return `${classPrefix$f}__icon--indeterminate`;
14017
14017
  }
14018
- return `${classPrefix$e}__icon`;
14018
+ return `${classPrefix$f}__icon`;
14019
14019
  }
14020
- return `${classPrefix$e}__icon--unchecked`;
14020
+ return `${classPrefix$f}__icon--unchecked`;
14021
14021
  };
14022
14022
  const renderLabel = () => {
14023
14023
  return /* @__PURE__ */ React.createElement(
14024
14024
  "span",
14025
14025
  {
14026
- className: classNames(`${classPrefix$e}__label `, {
14027
- [`${classPrefix$e}__label--disabled`]: innerDisabled
14026
+ className: classNames(`${classPrefix$f}__label `, {
14027
+ [`${classPrefix$f}__label--disabled`]: innerDisabled
14028
14028
  })
14029
14029
  },
14030
14030
  children || label
@@ -14043,8 +14043,8 @@ Please add \`${key}Action\` when creating your handler.`);
14043
14043
  return /* @__PURE__ */ React.createElement(
14044
14044
  "div",
14045
14045
  {
14046
- className: classNames(classPrefix$e, className, {
14047
- [`${classPrefix$e}--reverse`]: labelPosition === "left"
14046
+ className: classNames(classPrefix$f, className, {
14047
+ [`${classPrefix$f}--reverse`]: labelPosition === "left"
14048
14048
  }),
14049
14049
  ...rest,
14050
14050
  onClick: handleClick2
@@ -14053,7 +14053,7 @@ Please add \`${key}Action\` when creating your handler.`);
14053
14053
  renderLabel()
14054
14054
  );
14055
14055
  };
14056
- Checkbox.defaultProps = defaultProps$Y;
14056
+ Checkbox.defaultProps = defaultProps$X;
14057
14057
  Checkbox.displayName = "NutCheckBox";
14058
14058
  Checkbox.Group = CheckboxGroup;
14059
14059
  const MIN_DISTANCE = 10;
@@ -14347,7 +14347,7 @@ Please add \`${key}Action\` when creating your handler.`);
14347
14347
  }, []);
14348
14348
  return [refs.current, setRefs, reset];
14349
14349
  }
14350
- const defaultProps$X = {
14350
+ const defaultProps$W = {
14351
14351
  ...ComponentDefaults,
14352
14352
  visible: false,
14353
14353
  title: "",
@@ -14374,7 +14374,7 @@ Please add \`${key}Action\` when creating your handler.`);
14374
14374
  afterClose,
14375
14375
  onChange,
14376
14376
  ...rest
14377
- } = { ...defaultProps$X, ...props };
14377
+ } = { ...defaultProps$W, ...props };
14378
14378
  const classPrefix2 = "nut-picker";
14379
14379
  const classes = classNames(classPrefix2, className);
14380
14380
  const [selectedValue, setSelectedValue] = usePropsValue({
@@ -14573,7 +14573,7 @@ Please add \`${key}Action\` when creating your handler.`);
14573
14573
  const Picker = React.forwardRef(InternalPicker);
14574
14574
  const Picker$1 = Picker;
14575
14575
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
14576
- const defaultProps$W = {
14576
+ const defaultProps$V = {
14577
14577
  modelValue: null,
14578
14578
  visible: false,
14579
14579
  title: "",
@@ -14604,7 +14604,7 @@ Please add \`${key}Action\` when creating your handler.`);
14604
14604
  style,
14605
14605
  ...rest
14606
14606
  } = {
14607
- ...defaultProps$W,
14607
+ ...defaultProps$V,
14608
14608
  ...props
14609
14609
  };
14610
14610
  const { locale } = useConfig();
@@ -14881,7 +14881,7 @@ Please add \`${key}Action\` when creating your handler.`);
14881
14881
  )
14882
14882
  );
14883
14883
  };
14884
- DatePicker.defaultProps = defaultProps$W;
14884
+ DatePicker.defaultProps = defaultProps$V;
14885
14885
  DatePicker.displayName = "NutDatePicker";
14886
14886
  const FormItemContext = React.createContext({});
14887
14887
  function _extends() {
@@ -16072,7 +16072,7 @@ Please add \`${key}Action\` when creating your handler.`);
16072
16072
  }
16073
16073
  return [formRef.current];
16074
16074
  };
16075
- const defaultProps$V = {
16075
+ const defaultProps$U = {
16076
16076
  ...ComponentDefaults,
16077
16077
  name: "",
16078
16078
  label: "",
@@ -16134,7 +16134,7 @@ Please add \`${key}Action\` when creating your handler.`);
16134
16134
  showErrorLine,
16135
16135
  showErrorMessage
16136
16136
  } = {
16137
- ...defaultProps$V,
16137
+ ...defaultProps$U,
16138
16138
  ...this.props
16139
16139
  };
16140
16140
  const item = ((_a2 = this.context.errList) == null ? void 0 : _a2.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
@@ -16189,9 +16189,9 @@ Please add \`${key}Action\` when creating your handler.`);
16189
16189
  return this.renderLayout(returnChildNode);
16190
16190
  }
16191
16191
  }
16192
- __publicField(FormItem, "defaultProps", defaultProps$V);
16192
+ __publicField(FormItem, "defaultProps", defaultProps$U);
16193
16193
  __publicField(FormItem, "contextType", FormItemContext);
16194
- const defaultProps$U = {
16194
+ const defaultProps$T = {
16195
16195
  ...ComponentDefaults,
16196
16196
  className: "",
16197
16197
  style: void 0,
@@ -16219,7 +16219,7 @@ Please add \`${key}Action\` when creating your handler.`);
16219
16219
  form,
16220
16220
  ...rest
16221
16221
  } = {
16222
- ...defaultProps$U,
16222
+ ...defaultProps$T,
16223
16223
  ...props
16224
16224
  };
16225
16225
  let formInstance = {};
@@ -16251,7 +16251,7 @@ Please add \`${key}Action\` when creating your handler.`);
16251
16251
  /* @__PURE__ */ React.createElement(CellGroup, null, /* @__PURE__ */ React.createElement(FormItemContext.Provider, { value: formInstance }, children))
16252
16252
  );
16253
16253
  };
16254
- Form.defaultProps = defaultProps$U;
16254
+ Form.defaultProps = defaultProps$T;
16255
16255
  Form.displayName = "NutForm";
16256
16256
  Form.Item = FormItem;
16257
16257
  Form.useForm = useForm;
@@ -16279,7 +16279,7 @@ Please add \`${key}Action\` when creating your handler.`);
16279
16279
  const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
16280
16280
  return value.replace(regExp, "");
16281
16281
  }
16282
- const defaultProps$T = {
16282
+ const defaultProps$S = {
16283
16283
  ...ComponentDefaults,
16284
16284
  type: "text",
16285
16285
  name: "",
@@ -16322,7 +16322,7 @@ Please add \`${key}Action\` when creating your handler.`);
16322
16322
  value: _value,
16323
16323
  ...rest
16324
16324
  } = {
16325
- ...defaultProps$T,
16325
+ ...defaultProps$S,
16326
16326
  ...props
16327
16327
  };
16328
16328
  const [value, setValue] = usePropsValue({
@@ -16457,9 +16457,9 @@ Please add \`${key}Action\` when creating your handler.`);
16457
16457
  );
16458
16458
  }
16459
16459
  );
16460
- Input.defaultProps = defaultProps$T;
16460
+ Input.defaultProps = defaultProps$S;
16461
16461
  Input.displayName = "NutInput";
16462
- const defaultProps$S = {
16462
+ const defaultProps$R = {
16463
16463
  ...ComponentDefaults,
16464
16464
  disabled: false,
16465
16465
  min: 1,
@@ -16471,7 +16471,7 @@ Please add \`${key}Action\` when creating your handler.`);
16471
16471
  digits: 0,
16472
16472
  async: false
16473
16473
  };
16474
- const classPrefix$d = `nut-inputnumber`;
16474
+ const classPrefix$e = `nut-inputnumber`;
16475
16475
  const InputNumber = (props) => {
16476
16476
  const {
16477
16477
  children,
@@ -16496,7 +16496,7 @@ Please add \`${key}Action\` when creating your handler.`);
16496
16496
  onChange,
16497
16497
  ...restProps
16498
16498
  } = {
16499
- ...defaultProps$S,
16499
+ ...defaultProps$R,
16500
16500
  ...props
16501
16501
  };
16502
16502
  const inputRef = React.useRef("");
@@ -16514,8 +16514,8 @@ Please add \`${key}Action\` when creating your handler.`);
16514
16514
  }, []);
16515
16515
  const classes = classNames(
16516
16516
  {
16517
- [`${classPrefix$d}`]: true,
16518
- [`${classPrefix$d}--disabled`]: disabled
16517
+ [`${classPrefix$e}`]: true,
16518
+ [`${classPrefix$e}--disabled`]: disabled
16519
16519
  },
16520
16520
  className
16521
16521
  );
@@ -16693,9 +16693,9 @@ Please add \`${key}Action\` when creating your handler.`);
16693
16693
  }
16694
16694
  )), /* @__PURE__ */ React.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React.createElement(y$4, { className: iconAddClasses, onClick: (e) => addNumber(e) })));
16695
16695
  };
16696
- InputNumber.defaultProps = defaultProps$S;
16696
+ InputNumber.defaultProps = defaultProps$R;
16697
16697
  InputNumber.displayName = "NutInputNumber";
16698
- const defaultProps$R = {
16698
+ const defaultProps$Q = {
16699
16699
  ...ComponentDefaults,
16700
16700
  activeColor: "",
16701
16701
  closeOnOverlayClick: true,
@@ -16714,7 +16714,7 @@ Please add \`${key}Action\` when creating your handler.`);
16714
16714
  activeColor,
16715
16715
  ...rest
16716
16716
  } = {
16717
- ...defaultProps$R,
16717
+ ...defaultProps$Q,
16718
16718
  ...props
16719
16719
  };
16720
16720
  const menuRef = React.useRef(null);
@@ -16833,9 +16833,9 @@ Please add \`${key}Action\` when creating your handler.`);
16833
16833
  ), cloneChildren())
16834
16834
  );
16835
16835
  };
16836
- Menu.defaultProps = defaultProps$R;
16836
+ Menu.defaultProps = defaultProps$Q;
16837
16837
  Menu.displayName = "NutMenu";
16838
- const defaultProps$Q = {
16838
+ const defaultProps$P = {
16839
16839
  ...ComponentDefaults,
16840
16840
  columns: 1,
16841
16841
  direction: "down",
@@ -16865,7 +16865,7 @@ Please add \`${key}Action\` when creating your handler.`);
16865
16865
  parent,
16866
16866
  index
16867
16867
  } = {
16868
- ...defaultProps$Q,
16868
+ ...defaultProps$P,
16869
16869
  ...props
16870
16870
  };
16871
16871
  const [_showPopup, setShowPopup] = React.useState(show2);
@@ -17010,9 +17010,9 @@ Please add \`${key}Action\` when creating your handler.`);
17010
17010
  )
17011
17011
  ));
17012
17012
  });
17013
- MenuItem.defaultProps = defaultProps$Q;
17013
+ MenuItem.defaultProps = defaultProps$P;
17014
17014
  MenuItem.displayName = "NutMenuItem";
17015
- const defaultProps$P = {
17015
+ const defaultProps$O = {
17016
17016
  ...ComponentDefaults,
17017
17017
  visible: false,
17018
17018
  type: "default",
@@ -17163,17 +17163,17 @@ Please add \`${key}Action\` when creating your handler.`);
17163
17163
  ))))
17164
17164
  );
17165
17165
  };
17166
- NumberKeyboard.defaultProps = defaultProps$P;
17166
+ NumberKeyboard.defaultProps = defaultProps$O;
17167
17167
  NumberKeyboard.displayName = "NutNumberKeyboard";
17168
17168
  const RadioContext = React.createContext(null);
17169
- const defaultProps$O = {
17169
+ const defaultProps$N = {
17170
17170
  labelPosition: "right",
17171
17171
  onChange: (value) => {
17172
17172
  },
17173
17173
  direction: "vertical",
17174
17174
  options: []
17175
17175
  };
17176
- const classPrefix$c = "nut-radiogroup";
17176
+ const classPrefix$d = "nut-radiogroup";
17177
17177
  const RadioGroup = React.forwardRef(
17178
17178
  (props, ref) => {
17179
17179
  const {
@@ -17187,7 +17187,7 @@ Please add \`${key}Action\` when creating your handler.`);
17187
17187
  options: options2,
17188
17188
  disabled,
17189
17189
  ...rest
17190
- } = { ...defaultProps$O, ...props };
17190
+ } = { ...defaultProps$N, ...props };
17191
17191
  const [val2State, setVal2State] = usePropsValue({
17192
17192
  defaultValue: props.defaultValue,
17193
17193
  value: props.value,
@@ -17229,8 +17229,8 @@ Please add \`${key}Action\` when creating your handler.`);
17229
17229
  /* @__PURE__ */ React.createElement(
17230
17230
  "div",
17231
17231
  {
17232
- className: classNames(classPrefix$c, className, {
17233
- [`${classPrefix$c}--${props.direction}`]: props.direction
17232
+ className: classNames(classPrefix$d, className, {
17233
+ [`${classPrefix$d}--${props.direction}`]: props.direction
17234
17234
  }),
17235
17235
  ...rest
17236
17236
  },
@@ -17239,9 +17239,9 @@ Please add \`${key}Action\` when creating your handler.`);
17239
17239
  );
17240
17240
  }
17241
17241
  );
17242
- RadioGroup.defaultProps = defaultProps$O;
17242
+ RadioGroup.defaultProps = defaultProps$N;
17243
17243
  RadioGroup.displayName = "NutRadioGroup";
17244
- const defaultProps$N = {
17244
+ const defaultProps$M = {
17245
17245
  ...ComponentDefaults,
17246
17246
  disabled: false,
17247
17247
  shape: "round",
@@ -17267,7 +17267,7 @@ Please add \`${key}Action\` when creating your handler.`);
17267
17267
  onChange,
17268
17268
  ...others
17269
17269
  } = {
17270
- ...defaultProps$N,
17270
+ ...defaultProps$M,
17271
17271
  ...props
17272
17272
  };
17273
17273
  let { labelPosition, disabled, ...rest } = others;
@@ -17363,10 +17363,10 @@ Please add \`${key}Action\` when creating your handler.`);
17363
17363
  renderRadioItem()
17364
17364
  );
17365
17365
  };
17366
- Radio.defaultProps = defaultProps$N;
17366
+ Radio.defaultProps = defaultProps$M;
17367
17367
  Radio.displayName = "NutRadio";
17368
17368
  Radio.Group = RadioGroup;
17369
- const defaultProps$M = {
17369
+ const defaultProps$L = {
17370
17370
  ...ComponentDefaults,
17371
17371
  range: false,
17372
17372
  min: 0,
@@ -17394,7 +17394,7 @@ Please add \`${key}Action\` when creating your handler.`);
17394
17394
  step,
17395
17395
  value,
17396
17396
  defaultValue
17397
- } = { ...defaultProps$M, ...props };
17397
+ } = { ...defaultProps$L, ...props };
17398
17398
  const classPrefix2 = "nut-range";
17399
17399
  const [buttonIndex, setButtonIndex] = React.useState(0);
17400
17400
  const [dragStatus, setDragStatus] = React.useState("start");
@@ -17658,9 +17658,9 @@ Please add \`${key}Action\` when creating your handler.`);
17658
17658
  renderButton()
17659
17659
  ))), maxDescription !== null && /* @__PURE__ */ React.createElement("div", { className: "max" }, maxDescription || max));
17660
17660
  };
17661
- Range.defaultProps = defaultProps$M;
17661
+ Range.defaultProps = defaultProps$L;
17662
17662
  Range.displayName = "NutRange";
17663
- const defaultProps$L = {
17663
+ const defaultProps$K = {
17664
17664
  ...ComponentDefaults,
17665
17665
  count: 5,
17666
17666
  min: 0,
@@ -17685,7 +17685,7 @@ Please add \`${key}Action\` when creating your handler.`);
17685
17685
  allowHalf,
17686
17686
  onChange
17687
17687
  } = {
17688
- ...defaultProps$L,
17688
+ ...defaultProps$K,
17689
17689
  ...props
17690
17690
  };
17691
17691
  const classPrefix2 = "nut-rate";
@@ -17768,9 +17768,9 @@ Please add \`${key}Action\` when creating your handler.`);
17768
17768
  })
17769
17769
  );
17770
17770
  };
17771
- Rate.defaultProps = defaultProps$L;
17771
+ Rate.defaultProps = defaultProps$K;
17772
17772
  Rate.displayName = "NutRate";
17773
- const defaultProps$K = {
17773
+ const defaultProps$J = {
17774
17774
  ...ComponentDefaults,
17775
17775
  placeholder: "",
17776
17776
  shape: "square",
@@ -17809,7 +17809,7 @@ Please add \`${key}Action\` when creating your handler.`);
17809
17809
  onSearch,
17810
17810
  onClickInput
17811
17811
  } = {
17812
- ...defaultProps$K,
17812
+ ...defaultProps$J,
17813
17813
  ...props
17814
17814
  };
17815
17815
  const forceFocus = () => {
@@ -17918,9 +17918,9 @@ Please add \`${key}Action\` when creating your handler.`);
17918
17918
  renderRight()
17919
17919
  );
17920
17920
  };
17921
- SearchBar.defaultProps = defaultProps$K;
17921
+ SearchBar.defaultProps = defaultProps$J;
17922
17922
  SearchBar.displayName = "NutSearchBar";
17923
- const defaultProps$J = {
17923
+ const defaultProps$I = {
17924
17924
  ...ComponentDefaults,
17925
17925
  value: "",
17926
17926
  visible: false,
@@ -17957,7 +17957,7 @@ Please add \`${key}Action\` when creating your handler.`);
17957
17957
  onClickCloseIcon,
17958
17958
  ...rest
17959
17959
  } = {
17960
- ...defaultProps$J,
17960
+ ...defaultProps$I,
17961
17961
  ...props
17962
17962
  };
17963
17963
  const classPrefix2 = "nut-shortpassword";
@@ -18014,33 +18014,32 @@ Please add \`${key}Action\` when creating your handler.`);
18014
18014
  ), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__footer__sure`, onClick: sure }, locale.confirm)))
18015
18015
  );
18016
18016
  };
18017
- ShortPassword.defaultProps = defaultProps$J;
18017
+ ShortPassword.defaultProps = defaultProps$I;
18018
18018
  ShortPassword.displayName = "NutShortPassword";
18019
- const defaultProps$I = {
18019
+ const defaultProps$H = {
18020
+ ...ComponentDefaults,
18020
18021
  type: "png",
18021
18022
  lineWidth: 2,
18022
18023
  strokeStyle: "#000",
18023
- unSupportTpl: "对不起,当前浏览器不支持Canvas,无法使用本控件!",
18024
- className: ""
18024
+ unsupported: ""
18025
18025
  };
18026
- const Signature = (props) => {
18026
+ const InternalSignature = (props, ref) => {
18027
18027
  const { locale } = useConfig();
18028
18028
  const {
18029
18029
  type: type2,
18030
18030
  lineWidth,
18031
18031
  strokeStyle,
18032
- unSupportTpl,
18032
+ unsupported,
18033
18033
  className,
18034
- confirm: confirm2,
18035
- clear,
18034
+ style,
18036
18035
  onConfirm,
18037
18036
  onClear,
18038
18037
  ...rest
18039
18038
  } = {
18040
- ...defaultProps$I,
18039
+ ...defaultProps$H,
18041
18040
  ...props
18042
18041
  };
18043
- const b = cn("signature");
18042
+ const classPrefix2 = `nut-signature`;
18044
18043
  const canvasRef = React.useRef(null);
18045
18044
  const wrapRef = React.useRef(null);
18046
18045
  const [canvasHeight, setCanvasHeight] = React.useState(0);
@@ -18107,12 +18106,8 @@ Please add \`${key}Action\` when creating your handler.`);
18107
18106
  ctx2.current.clearRect(0, 0, canvasWidth, canvasHeight);
18108
18107
  ctx2.current.closePath();
18109
18108
  }
18110
- clear && clear();
18111
18109
  onClear && onClear();
18112
18110
  };
18113
- const handleConfirmBtn = () => {
18114
- onSave(canvasRef.current);
18115
- };
18116
18111
  const onSave = (canvas) => {
18117
18112
  let dataurl;
18118
18113
  switch (type2) {
@@ -18126,30 +18121,22 @@ Please add \`${key}Action\` when creating your handler.`);
18126
18121
  dataurl = canvas.toDataURL("image/png");
18127
18122
  }
18128
18123
  handleClearBtn();
18129
- confirm2 && confirm2(canvas, dataurl);
18130
18124
  onConfirm && onConfirm(canvas, dataurl);
18131
18125
  };
18132
- return /* @__PURE__ */ React.createElement("div", { className: `${b()} ${className}`, ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${b("inner")}`, ref: wrapRef }, isCanvasSupported() ? /* @__PURE__ */ React.createElement("canvas", { ref: canvasRef, height: canvasHeight, width: canvasWidth }) : /* @__PURE__ */ React.createElement("p", { className: `${b("unsopport")}` }, locale.signature.unSupportTpl || unSupportTpl)), /* @__PURE__ */ React.createElement(
18133
- Button,
18134
- {
18135
- className: `${b("btn")}`,
18136
- type: "default",
18137
- onClick: () => handleClearBtn()
18138
- },
18139
- locale.signature.reSign
18140
- ), /* @__PURE__ */ React.createElement(
18141
- Button,
18142
- {
18143
- className: `${b("btn")}`,
18144
- type: "primary",
18145
- onClick: () => handleConfirmBtn()
18126
+ React.useImperativeHandle(ref, () => ({
18127
+ confirm: () => {
18128
+ onSave(canvasRef.current);
18146
18129
  },
18147
- locale.confirm
18148
- ));
18130
+ clear: () => {
18131
+ handleClearBtn();
18132
+ }
18133
+ }));
18134
+ return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__inner`, ref: wrapRef }, isCanvasSupported() ? /* @__PURE__ */ React.createElement("canvas", { ref: canvasRef, height: canvasHeight, width: canvasWidth }) : /* @__PURE__ */ React.createElement(React.Fragment, null, unsupported || /* @__PURE__ */ React.createElement("p", { className: `${classPrefix2}__unsupport` }, locale.signature.unsupported))));
18149
18135
  };
18150
- Signature.defaultProps = defaultProps$I;
18136
+ const Signature = React.forwardRef(InternalSignature);
18137
+ Signature.defaultProps = defaultProps$H;
18151
18138
  Signature.displayName = "NutSignature";
18152
- const defaultProps$H = {
18139
+ const defaultProps$G = {
18153
18140
  ...ComponentDefaults,
18154
18141
  disabled: false,
18155
18142
  activeText: "",
@@ -18166,7 +18153,7 @@ Please add \`${key}Action\` when creating your handler.`);
18166
18153
  style,
18167
18154
  onChange
18168
18155
  } = {
18169
- ...defaultProps$H,
18156
+ ...defaultProps$G,
18170
18157
  ...props
18171
18158
  };
18172
18159
  const classPrefix2 = "nut-switch";
@@ -18185,9 +18172,9 @@ Please add \`${key}Action\` when creating your handler.`);
18185
18172
  };
18186
18173
  return /* @__PURE__ */ React.createElement("div", { className: classes(), onClick: (e) => onClick(e), style }, /* @__PURE__ */ React.createElement("div", { className: "switch-button" }, !value && /* @__PURE__ */ React.createElement("div", { className: "close-line" }), activeText && /* @__PURE__ */ React.createElement(React.Fragment, null, value ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__label open` }, activeText) : /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__label close` }, inactiveText))));
18187
18174
  };
18188
- Switch.defaultProps = defaultProps$H;
18175
+ Switch.defaultProps = defaultProps$G;
18189
18176
  Switch.displayName = "NutSwitch";
18190
- const defaultProps$G = {
18177
+ const defaultProps$F = {
18191
18178
  ...ComponentDefaults,
18192
18179
  defaultValue: "",
18193
18180
  showCount: false,
@@ -18216,7 +18203,7 @@ Please add \`${key}Action\` when creating your handler.`);
18216
18203
  onBlur,
18217
18204
  onFocus,
18218
18205
  ...rest
18219
- } = { ...defaultProps$G, ...props };
18206
+ } = { ...defaultProps$F, ...props };
18220
18207
  const classPrefix2 = "nut-textarea";
18221
18208
  const textareaRef = React.useRef(null);
18222
18209
  const compositionRef = React.useRef(false);
@@ -18300,9 +18287,9 @@ Please add \`${key}Action\` when creating your handler.`);
18300
18287
  showCount && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__limit` }, inputValue.length, "/", maxLength < 0 ? 0 : maxLength)
18301
18288
  );
18302
18289
  };
18303
- TextArea.defaultProps = defaultProps$G;
18290
+ TextArea.defaultProps = defaultProps$F;
18304
18291
  TextArea.displayName = "NutTextArea";
18305
- const defaultProps$F = {
18292
+ const defaultProps$E = {
18306
18293
  ...ComponentDefaults,
18307
18294
  percent: 0,
18308
18295
  showText: false,
@@ -18325,7 +18312,7 @@ Please add \`${key}Action\` when creating your handler.`);
18325
18312
  delay,
18326
18313
  ...rest
18327
18314
  } = {
18328
- ...defaultProps$F,
18315
+ ...defaultProps$E,
18329
18316
  ...props
18330
18317
  };
18331
18318
  const classPrefix2 = "nut-progress";
@@ -18420,7 +18407,7 @@ Please add \`${key}Action\` when creating your handler.`);
18420
18407
  )))
18421
18408
  );
18422
18409
  };
18423
- Progress.defaultProps = defaultProps$F;
18410
+ Progress.defaultProps = defaultProps$E;
18424
18411
  Progress.displayName = "NutProgress";
18425
18412
  class UploadOptions {
18426
18413
  constructor() {
@@ -18525,7 +18512,7 @@ Please add \`${key}Action\` when creating your handler.`);
18525
18512
  done();
18526
18513
  }
18527
18514
  };
18528
- const defaultProps$E = {
18515
+ const defaultProps$D = {
18529
18516
  ...ComponentDefaults,
18530
18517
  url: "",
18531
18518
  maxCount: 1,
@@ -18607,7 +18594,7 @@ Please add \`${key}Action\` when creating your handler.`);
18607
18594
  beforeXhrUpload,
18608
18595
  beforeDelete,
18609
18596
  ...restProps
18610
- } = { ...defaultProps$E, ...props };
18597
+ } = { ...defaultProps$D, ...props };
18611
18598
  const [fileList, setFileList] = React.useState(defaultValue || []);
18612
18599
  const [uploadQueue, setUploadQueue] = React.useState([]);
18613
18600
  React.useEffect(() => {
@@ -18948,9 +18935,9 @@ Please add \`${key}Action\` when creating your handler.`);
18948
18935
  ));
18949
18936
  };
18950
18937
  const Uploader = React.forwardRef(InternalUploader);
18951
- Uploader.defaultProps = defaultProps$E;
18938
+ Uploader.defaultProps = defaultProps$D;
18952
18939
  Uploader.displayName = "NutUploader";
18953
- const defaultProps$D = {
18940
+ const defaultProps$C = {
18954
18941
  ...ComponentDefaults,
18955
18942
  visible: false,
18956
18943
  title: "",
@@ -18977,7 +18964,7 @@ Please add \`${key}Action\` when creating your handler.`);
18977
18964
  className,
18978
18965
  style,
18979
18966
  ...rest
18980
- } = { ...defaultProps$D, ...props };
18967
+ } = { ...defaultProps$C, ...props };
18981
18968
  const classPrefix2 = "nut-actionsheet";
18982
18969
  const cancelActionSheet = () => {
18983
18970
  onCancel && onCancel();
@@ -19018,7 +19005,7 @@ Please add \`${key}Action\` when creating your handler.`);
19018
19005
  ))
19019
19006
  );
19020
19007
  };
19021
- ActionSheet.defaultProps = defaultProps$D;
19008
+ ActionSheet.defaultProps = defaultProps$C;
19022
19009
  ActionSheet.displayName = "NutActionSheet";
19023
19010
  const fullClone = {
19024
19011
  ...ReactDOM__namespace
@@ -19251,7 +19238,7 @@ Please add \`${key}Action\` when creating your handler.`);
19251
19238
  };
19252
19239
  DialogWrap.defaultProps = defaultDialogProps;
19253
19240
  DialogWrap.displayName = "NutDialogWrap";
19254
- const defaultProps$C = {
19241
+ const defaultProps$B = {
19255
19242
  confirmText: "",
19256
19243
  cancelText: "",
19257
19244
  overlay: true,
@@ -19350,9 +19337,9 @@ Please add \`${key}Action\` when creating your handler.`);
19350
19337
  });
19351
19338
  };
19352
19339
  });
19353
- Dialog.defaultProps = defaultProps$C;
19340
+ Dialog.defaultProps = defaultProps$B;
19354
19341
  Dialog.displayName = "NutDialog";
19355
- const defaultProps$B = {
19342
+ const defaultProps$A = {
19356
19343
  ...ComponentDefaults,
19357
19344
  attract: false,
19358
19345
  direction: void 0,
@@ -19365,7 +19352,7 @@ Please add \`${key}Action\` when creating your handler.`);
19365
19352
  };
19366
19353
  const Drag = (props) => {
19367
19354
  const { attract, direction, boundary, children, className, style, ...reset } = {
19368
- ...defaultProps$B,
19355
+ ...defaultProps$A,
19369
19356
  ...props
19370
19357
  };
19371
19358
  const classPrefix2 = "nut-drag";
@@ -19428,20 +19415,20 @@ Please add \`${key}Action\` when creating your handler.`);
19428
19415
  /* @__PURE__ */ React.createElement(animated.div, { style: currstyle, ...bind() }, children)
19429
19416
  );
19430
19417
  };
19431
- Drag.defaultProps = defaultProps$B;
19418
+ Drag.defaultProps = defaultProps$A;
19432
19419
  Drag.displayName = "NutDrag";
19433
19420
  const defaultStatus = {
19434
19421
  empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
19435
19422
  error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
19436
19423
  network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
19437
19424
  };
19438
- const defaultProps$A = {
19425
+ const defaultProps$z = {
19439
19426
  ...ComponentDefaults,
19440
19427
  description: "",
19441
19428
  imageSize: "",
19442
19429
  status: "empty"
19443
19430
  };
19444
- const classPrefix$b = `nut-empty`;
19431
+ const classPrefix$c = `nut-empty`;
19445
19432
  const Empty = (props) => {
19446
19433
  const { locale } = useConfig();
19447
19434
  const {
@@ -19453,7 +19440,7 @@ Please add \`${key}Action\` when creating your handler.`);
19453
19440
  status,
19454
19441
  ...rest
19455
19442
  } = {
19456
- ...defaultProps$A,
19443
+ ...defaultProps$z,
19457
19444
  ...props
19458
19445
  };
19459
19446
  const [imgStyle, setImgStyle] = React.useState({});
@@ -19476,46 +19463,38 @@ Please add \`${key}Action\` when creating your handler.`);
19476
19463
  };
19477
19464
  });
19478
19465
  }, [imageSize]);
19479
- return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$b} ${className}`, ...rest }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$b}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$b}__description` }, description || locale.noData) : description, children));
19466
+ return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$c} ${className}`, ...rest }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$c}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$c}__description` }, description || locale.noData) : description, children));
19480
19467
  };
19481
- Empty.defaultProps = defaultProps$A;
19468
+ Empty.defaultProps = defaultProps$z;
19482
19469
  Empty.displayName = "NutEmpty";
19483
- const defaultProps$z = {
19470
+ const defaultProps$y = {
19484
19471
  ...ComponentDefaults,
19485
19472
  hasMore: true,
19486
19473
  threshold: 200,
19487
- containerId: "",
19488
- useWindow: true,
19489
- useCapture: false,
19490
- isOpenRefresh: false,
19491
- pullIcon: null,
19492
- pullText: "松开刷新",
19493
- loadIcon: null,
19494
- loadingText: "加载中···",
19495
- loadMoreText: "哎呀,这里是底部了啦"
19496
- };
19497
- const Infiniteloading = (props) => {
19474
+ target: "",
19475
+ capture: false,
19476
+ pullRefresh: false
19477
+ };
19478
+ const classPrefix$b = `nut-infiniteloading`;
19479
+ const InfiniteLoading = (props) => {
19498
19480
  const { locale } = useConfig();
19499
19481
  const {
19500
19482
  children,
19501
19483
  hasMore,
19502
19484
  threshold,
19503
- containerId,
19504
- useWindow,
19505
- useCapture,
19506
- isOpenRefresh,
19507
- pullIcon,
19508
- pullText,
19509
- loadIcon,
19485
+ target,
19486
+ capture,
19487
+ pullRefresh,
19488
+ pullingText,
19510
19489
  loadingText,
19511
19490
  loadMoreText,
19512
19491
  className,
19513
19492
  onRefresh,
19514
19493
  onLoadMore,
19515
- onScrollChange,
19494
+ onScroll,
19516
19495
  ...restProps
19517
19496
  } = {
19518
- ...defaultProps$z,
19497
+ ...defaultProps$y,
19519
19498
  ...props
19520
19499
  };
19521
19500
  const [isInfiniting, setIsInfiniting] = React.useState(false);
@@ -19527,16 +19506,16 @@ Please add \`${key}Action\` when creating your handler.`);
19527
19506
  const refreshMaxH = React.useRef(0);
19528
19507
  const y2 = React.useRef(0);
19529
19508
  const distance = React.useRef(0);
19530
- const b = cn("infiniteloading");
19531
- const classes = classNames(className, b());
19509
+ const classes = classNames(className, classPrefix$b);
19532
19510
  React.useEffect(() => {
19533
- const parentElement = getParentElement(
19534
- scroller.current
19535
- );
19536
- scrollEl.current = useWindow ? window : parentElement;
19537
- scrollEl.current.addEventListener("scroll", handleScroll, useCapture);
19511
+ if (target && document.getElementById(target)) {
19512
+ scrollEl.current = document.getElementById(target);
19513
+ } else {
19514
+ scrollEl.current = window;
19515
+ }
19516
+ scrollEl.current.addEventListener("scroll", handleScroll, capture);
19538
19517
  return () => {
19539
- scrollEl.current.removeEventListener("scroll", handleScroll, useCapture);
19518
+ scrollEl.current.removeEventListener("scroll", handleScroll, capture);
19540
19519
  };
19541
19520
  }, [hasMore, isInfiniting]);
19542
19521
  React.useEffect(() => {
@@ -19554,9 +19533,6 @@ Please add \`${key}Action\` when creating your handler.`);
19554
19533
  transition: isTouching.current ? `height 0s cubic-bezier(0.25,0.1,0.25,1)` : `height 0.2s cubic-bezier(0.25,0.1,0.25,1)`
19555
19534
  };
19556
19535
  };
19557
- const getParentElement = (el) => {
19558
- return containerId ? document.querySelector(`#${containerId}`) : el && el.parentNode;
19559
- };
19560
19536
  const handleScroll = () => {
19561
19537
  requestAniFrame2()(() => {
19562
19538
  if (!isScrollAtBottom() || !hasMore || isInfiniting) {
@@ -19576,7 +19552,7 @@ Please add \`${key}Action\` when creating your handler.`);
19576
19552
  isTouching.current = false;
19577
19553
  };
19578
19554
  const touchStart = (event) => {
19579
- if (beforeScrollTop.current === 0 && !isTouching.current && isOpenRefresh) {
19555
+ if (beforeScrollTop.current === 0 && !isTouching.current && pullRefresh) {
19580
19556
  y2.current = event.touches[0].pageY;
19581
19557
  isTouching.current = true;
19582
19558
  const childHeight = refreshTop.current.firstElementChild.offsetHeight;
@@ -19608,12 +19584,12 @@ Please add \`${key}Action\` when creating your handler.`);
19608
19584
  }
19609
19585
  };
19610
19586
  const requestAniFrame2 = () => {
19611
- return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function fn(callback) {
19587
+ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function fn(callback) {
19612
19588
  window.setTimeout(callback, 1e3 / 60);
19613
19589
  };
19614
19590
  };
19615
19591
  const getWindowScrollTop = () => {
19616
- return window.pageYOffset !== void 0 ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
19592
+ return window.scrollY !== void 0 ? window.scrollY : (document.documentElement || document.body.parentNode || document.body).scrollTop;
19617
19593
  };
19618
19594
  const calculateTopPosition = (el) => {
19619
19595
  return !el ? 0 : el.offsetTop + calculateTopPosition(el.offsetParent);
@@ -19623,7 +19599,7 @@ Please add \`${key}Action\` when creating your handler.`);
19623
19599
  let resScrollTop = 0;
19624
19600
  let direction = "down";
19625
19601
  const windowScrollTop = getWindowScrollTop();
19626
- if (useWindow) {
19602
+ if (!target || !document.getElementById(target)) {
19627
19603
  if (scroller.current) {
19628
19604
  offsetDistance = calculateTopPosition(scroller.current) + scroller.current.offsetHeight - windowScrollTop - window.innerHeight;
19629
19605
  }
@@ -19639,7 +19615,7 @@ Please add \`${key}Action\` when creating your handler.`);
19639
19615
  direction = "down";
19640
19616
  }
19641
19617
  beforeScrollTop.current = resScrollTop;
19642
- onScrollChange && onScrollChange(resScrollTop);
19618
+ onScroll && onScroll(resScrollTop);
19643
19619
  return offsetDistance <= threshold && direction === "down";
19644
19620
  };
19645
19621
  return /* @__PURE__ */ React.createElement(
@@ -19651,14 +19627,14 @@ Please add \`${key}Action\` when creating your handler.`);
19651
19627
  onTouchEnd: touchEnd,
19652
19628
  ...restProps
19653
19629
  },
19654
- /* @__PURE__ */ React.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React.createElement("div", { className: "top-box" }, pullIcon && /* @__PURE__ */ React.createElement(React.Fragment, null, pullIcon), /* @__PURE__ */ React.createElement("span", { className: "top-text" }, pullText || locale.infiniteloading.pullRefreshText))),
19630
+ /* @__PURE__ */ React.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React.createElement("div", { className: "top-box" }, pullingText || locale.infiniteloading.pullRefreshText)),
19655
19631
  /* @__PURE__ */ React.createElement("div", { className: "nut-infinite-container" }, children),
19656
- /* @__PURE__ */ React.createElement("div", { className: "nut-infinite-bottom" }, isInfiniting ? /* @__PURE__ */ React.createElement("div", { className: "bottom-box" }, loadIcon && /* @__PURE__ */ React.createElement(React.Fragment, null, loadIcon), /* @__PURE__ */ React.createElement("div", { className: "bottom-text" }, loadingText || locale.infiniteloading.loadText)) : !hasMore && /* @__PURE__ */ React.createElement("div", { className: "tips" }, loadMoreText || locale.infiniteloading.loadMoreText))
19632
+ /* @__PURE__ */ React.createElement("div", { className: "nut-infinite-bottom" }, isInfiniting ? /* @__PURE__ */ React.createElement("div", { className: "bottom-box" }, loadingText || locale.infiniteloading.loadText) : !hasMore && /* @__PURE__ */ React.createElement("div", { className: "tips" }, loadMoreText || locale.infiniteloading.loadMoreText))
19657
19633
  );
19658
19634
  };
19659
- Infiniteloading.defaultProps = defaultProps$z;
19660
- Infiniteloading.displayName = "NutInfiniteloading";
19661
- const defaultProps$y = {
19635
+ InfiniteLoading.defaultProps = defaultProps$y;
19636
+ InfiniteLoading.displayName = "NutInfiniteLoading";
19637
+ const defaultProps$x = {
19662
19638
  ...ComponentDefaults,
19663
19639
  direction: "horizontal",
19664
19640
  list: [],
@@ -19696,7 +19672,7 @@ Please add \`${key}Action\` when creating your handler.`);
19696
19672
  onClick,
19697
19673
  onClickItem
19698
19674
  } = {
19699
- ...defaultProps$y,
19675
+ ...defaultProps$x,
19700
19676
  ...props
19701
19677
  };
19702
19678
  const classPrefix2 = "nut-noticebar";
@@ -20047,7 +20023,7 @@ Please add \`${key}Action\` when creating your handler.`);
20047
20023
  )
20048
20024
  ) : null);
20049
20025
  };
20050
- NoticeBar.defaultProps = defaultProps$y;
20026
+ NoticeBar.defaultProps = defaultProps$x;
20051
20027
  NoticeBar.displayName = "NutNoticeBar";
20052
20028
  const classPrefix$a = "nut-notify";
20053
20029
  let Notification$1 = (_a = class extends React__namespace.PureComponent {
@@ -20247,7 +20223,7 @@ Please add \`${key}Action\` when creating your handler.`);
20247
20223
  };
20248
20224
  }, [target]);
20249
20225
  }
20250
- const defaultProps$x = {
20226
+ const defaultProps$w = {
20251
20227
  ...ComponentDefaults,
20252
20228
  list: [],
20253
20229
  location: "bottom",
@@ -20300,7 +20276,7 @@ Please add \`${key}Action\` when creating your handler.`);
20300
20276
  onSelect,
20301
20277
  ...reset
20302
20278
  } = {
20303
- ...defaultProps$x,
20279
+ ...defaultProps$w,
20304
20280
  ...props
20305
20281
  };
20306
20282
  const popoverRef = React.useRef(null);
@@ -20495,7 +20471,7 @@ Please add \`${key}Action\` when creating your handler.`);
20495
20471
  }))
20496
20472
  )));
20497
20473
  };
20498
- Popover.defaultProps = defaultProps$x;
20474
+ Popover.defaultProps = defaultProps$w;
20499
20475
  Popover.displayName = "NutPopover";
20500
20476
  function bound(position, min, max) {
20501
20477
  let ret = position;
@@ -20533,7 +20509,7 @@ Please add \`${key}Action\` when creating your handler.`);
20533
20509
  console.log(e);
20534
20510
  }
20535
20511
  }
20536
- const defaultProps$w = {
20512
+ const defaultProps$v = {
20537
20513
  ...ComponentDefaults,
20538
20514
  pullingText: "",
20539
20515
  canReleaseText: "",
@@ -20550,7 +20526,7 @@ Please add \`${key}Action\` when creating your handler.`);
20550
20526
  const classPrefix2 = "nut-pulltorefresh";
20551
20527
  const { locale } = useConfig();
20552
20528
  const props = {
20553
- ...defaultProps$w,
20529
+ ...defaultProps$v,
20554
20530
  ...p,
20555
20531
  ...{
20556
20532
  pullingText: p.pullingText || locale.pullToRefresh.pullingText,
@@ -20693,10 +20669,10 @@ Please add \`${key}Action\` when creating your handler.`);
20693
20669
  /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, props.children)
20694
20670
  );
20695
20671
  };
20696
- PullToRefresh.defaultProps = defaultProps$w;
20672
+ PullToRefresh.defaultProps = defaultProps$v;
20697
20673
  PullToRefresh.displayName = "NutPullToRefresh";
20698
20674
  const AvatarContext = React.createContext({});
20699
- const defaultProps$v = {
20675
+ const defaultProps$u = {
20700
20676
  ...ComponentDefaults,
20701
20677
  size: "",
20702
20678
  shape: "round",
@@ -20726,7 +20702,7 @@ Please add \`${key}Action\` when creating your handler.`);
20726
20702
  onError,
20727
20703
  ...rest
20728
20704
  } = {
20729
- ...defaultProps$v,
20705
+ ...defaultProps$u,
20730
20706
  ...props
20731
20707
  };
20732
20708
  const [maxSum, setMaxSum] = React.useState(0);
@@ -20808,9 +20784,9 @@ Please add \`${key}Action\` when creating your handler.`);
20808
20784
  showMax && /* @__PURE__ */ React.createElement("div", { className: "text" }, ((_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.max)}`)
20809
20785
  ));
20810
20786
  };
20811
- Avatar.defaultProps = defaultProps$v;
20787
+ Avatar.defaultProps = defaultProps$u;
20812
20788
  Avatar.displayName = "NutAvatar";
20813
- const defaultProps$u = {
20789
+ const defaultProps$t = {
20814
20790
  ...ComponentDefaults,
20815
20791
  rows: 1,
20816
20792
  animated: false,
@@ -20833,7 +20809,7 @@ Please add \`${key}Action\` when creating your handler.`);
20833
20809
  avatarShape,
20834
20810
  ...rest
20835
20811
  } = {
20836
- ...defaultProps$u,
20812
+ ...defaultProps$t,
20837
20813
  ...props
20838
20814
  };
20839
20815
  const classPrefix2 = "nut-skeleton";
@@ -20869,7 +20845,7 @@ Please add \`${key}Action\` when creating your handler.`);
20869
20845
  return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__block`, key: index });
20870
20846
  })))));
20871
20847
  };
20872
- Skeleton.defaultProps = defaultProps$u;
20848
+ Skeleton.defaultProps = defaultProps$t;
20873
20849
  Skeleton.displayName = "NutSkeleton";
20874
20850
  function preventDefault(event, isStopPropagation) {
20875
20851
  if (typeof event.cancelable !== "boolean" || event.cancelable) {
@@ -20879,13 +20855,13 @@ Please add \`${key}Action\` when creating your handler.`);
20879
20855
  event.stopPropagation();
20880
20856
  }
20881
20857
  }
20882
- const defaultProps$t = {
20858
+ const defaultProps$s = {
20883
20859
  name: ""
20884
20860
  };
20885
20861
  const Swipe = React.forwardRef((props, instanceRef) => {
20886
20862
  const swipeBem = cn("swipe");
20887
20863
  const touch = useTouch();
20888
- const { children, className, style } = { ...defaultProps$t, ...props };
20864
+ const { children, className, style } = { ...defaultProps$s, ...props };
20889
20865
  const root2 = React.useRef();
20890
20866
  const opened = React.useRef(false);
20891
20867
  const lockClick = React.useRef(false);
@@ -21053,7 +21029,7 @@ Please add \`${key}Action\` when creating your handler.`);
21053
21029
  /* @__PURE__ */ React.createElement("div", { className: `${swipeBem("wrapper")}`, style: wrapperStyle }, renderActionContent("left", leftRef), children, renderActionContent("right", rightRef))
21054
21030
  );
21055
21031
  });
21056
- Swipe.defaultProps = defaultProps$t;
21032
+ Swipe.defaultProps = defaultProps$s;
21057
21033
  Swipe.displayName = "NutSwipe";
21058
21034
  const classPrefix$7 = "nut-toast";
21059
21035
  class Notification extends React__namespace.PureComponent {
@@ -21259,7 +21235,7 @@ Please add \`${key}Action\` when creating your handler.`);
21259
21235
  }
21260
21236
  }
21261
21237
  };
21262
- const defaultProps$s = {
21238
+ const defaultProps$r = {
21263
21239
  ...ComponentDefaults,
21264
21240
  type: "shake",
21265
21241
  action: "initial",
@@ -21270,7 +21246,7 @@ Please add \`${key}Action\` when creating your handler.`);
21270
21246
  const classPrefix$6 = `nut-animate`;
21271
21247
  const Animate = (props) => {
21272
21248
  const { className, type: type2, action, loop: loop2, onClick, children, ...rest } = {
21273
- ...defaultProps$s,
21249
+ ...defaultProps$r,
21274
21250
  ...props
21275
21251
  };
21276
21252
  const [clicked, setClicked] = React.useState(false);
@@ -21291,9 +21267,9 @@ Please add \`${key}Action\` when creating your handler.`);
21291
21267
  };
21292
21268
  return /* @__PURE__ */ React.createElement("div", { className: "nut-animate" }, /* @__PURE__ */ React.createElement("div", { className: cls, onClick: handleClick2, ...rest }, children));
21293
21269
  };
21294
- Animate.defaultProps = defaultProps$s;
21270
+ Animate.defaultProps = defaultProps$r;
21295
21271
  Animate.displayName = "NutAnimate";
21296
- const defaultProps$r = {
21272
+ const defaultProps$q = {
21297
21273
  ...ComponentDefaults,
21298
21274
  length: 0,
21299
21275
  value: "",
@@ -21312,7 +21288,7 @@ Please add \`${key}Action\` when creating your handler.`);
21312
21288
  style,
21313
21289
  ...reset
21314
21290
  } = {
21315
- ...defaultProps$r,
21291
+ ...defaultProps$q,
21316
21292
  ...props
21317
21293
  };
21318
21294
  const classPrefix2 = "nut-countup";
@@ -21376,9 +21352,9 @@ Please add \`${key}Action\` when creating your handler.`);
21376
21352
  );
21377
21353
  })));
21378
21354
  };
21379
- CountUp.defaultProps = defaultProps$r;
21355
+ CountUp.defaultProps = defaultProps$q;
21380
21356
  CountUp.displayName = "NutCountUp";
21381
- const defaultProps$q = {};
21357
+ const defaultProps$p = {};
21382
21358
  class AnimatingNumbers extends React.Component {
21383
21359
  constructor(props) {
21384
21360
  super(props);
@@ -21388,11 +21364,11 @@ Please add \`${key}Action\` when creating your handler.`);
21388
21364
  return /* @__PURE__ */ React.createElement("div", { className: "nut-animatingnumbers" });
21389
21365
  }
21390
21366
  }
21391
- __publicField(AnimatingNumbers, "defaultProps", defaultProps$q);
21367
+ __publicField(AnimatingNumbers, "defaultProps", defaultProps$p);
21392
21368
  __publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
21393
21369
  __publicField(AnimatingNumbers, "CountUp", CountUp);
21394
21370
  AnimatingNumbers.CountUp = CountUp;
21395
- const defaultProps$p = {
21371
+ const defaultProps$o = {
21396
21372
  ...ComponentDefaults,
21397
21373
  src: "",
21398
21374
  muted: false,
@@ -21435,7 +21411,7 @@ Please add \`${key}Action\` when creating your handler.`);
21435
21411
  children,
21436
21412
  ...rest
21437
21413
  } = {
21438
- ...defaultProps$p,
21414
+ ...defaultProps$o,
21439
21415
  ...props
21440
21416
  };
21441
21417
  const [playing, setPlaying] = React.useState(false);
@@ -21641,9 +21617,9 @@ Please add \`${key}Action\` when creating your handler.`);
21641
21617
  /* @__PURE__ */ React.createElement("track", { kind: "captions" })
21642
21618
  ));
21643
21619
  };
21644
- Audio.defaultProps = defaultProps$p;
21620
+ Audio.defaultProps = defaultProps$o;
21645
21621
  Audio.displayName = "NutAudio";
21646
- const defaultProps$o = {
21622
+ const defaultProps$n = {
21647
21623
  ...ComponentDefaults,
21648
21624
  maxContent: "",
21649
21625
  max: "",
@@ -21654,7 +21630,7 @@ Please add \`${key}Action\` when creating your handler.`);
21654
21630
  };
21655
21631
  const classPrefix$5 = `nut-avatar-group`;
21656
21632
  const AvatarGroup = (props) => {
21657
- const propAvatarGroup = { ...defaultProps$o, ...props };
21633
+ const propAvatarGroup = { ...defaultProps$n, ...props };
21658
21634
  const { className, style, children } = propAvatarGroup;
21659
21635
  const avatarGroupRef = React.useRef(null);
21660
21636
  const cls = classNames(classPrefix$5, className);
@@ -21664,9 +21640,9 @@ Please add \`${key}Action\` when creating your handler.`);
21664
21640
  };
21665
21641
  return /* @__PURE__ */ React.createElement(AvatarContext.Provider, { value: parentAvatar }, /* @__PURE__ */ React.createElement("div", { className: cls, style, ref: avatarGroupRef }, children));
21666
21642
  };
21667
- AvatarGroup.defaultProps = defaultProps$o;
21643
+ AvatarGroup.defaultProps = defaultProps$n;
21668
21644
  AvatarGroup.displayName = "NutAvatarGroup";
21669
- const defaultProps$n = {
21645
+ const defaultProps$m = {
21670
21646
  ...ComponentDefaults,
21671
21647
  strokeWidth: 5,
21672
21648
  radius: 50,
@@ -21691,7 +21667,7 @@ Please add \`${key}Action\` when creating your handler.`);
21691
21667
  strokeLinecap,
21692
21668
  ...restProps
21693
21669
  } = {
21694
- ...defaultProps$n,
21670
+ ...defaultProps$m,
21695
21671
  ...props
21696
21672
  };
21697
21673
  const classes = classNames(className, classPrefix$4);
@@ -21760,7 +21736,7 @@ Please add \`${key}Action\` when creating your handler.`);
21760
21736
  }
21761
21737
  )), /* @__PURE__ */ React.createElement("div", { className: "nut-circleprogress-text" }, children));
21762
21738
  };
21763
- CircleProgress.defaultProps = defaultProps$n;
21739
+ CircleProgress.defaultProps = defaultProps$m;
21764
21740
  CircleProgress.displayName = "NutCircleProgress";
21765
21741
  const collapseContext = {
21766
21742
  isOpen: (name) => {
@@ -21772,7 +21748,7 @@ Please add \`${key}Action\` when creating your handler.`);
21772
21748
  rotate: 180
21773
21749
  };
21774
21750
  const CollapseContext = React.createContext(collapseContext);
21775
- const defaultProps$m = {
21751
+ const defaultProps$l = {
21776
21752
  ...ComponentDefaults,
21777
21753
  title: null,
21778
21754
  name: "",
@@ -21794,7 +21770,7 @@ Please add \`${key}Action\` when creating your handler.`);
21794
21770
  extra,
21795
21771
  ...rest
21796
21772
  } = {
21797
- ...defaultProps$m,
21773
+ ...defaultProps$l,
21798
21774
  ...props
21799
21775
  };
21800
21776
  const classPrefix2 = "nut-collapse-item";
@@ -21861,9 +21837,9 @@ Please add \`${key}Action\` when creating your handler.`);
21861
21837
  /* @__PURE__ */ React.createElement("div", { ref: contentRef, className: `${classPrefix2}__content-text` }, children)
21862
21838
  ));
21863
21839
  };
21864
- CollapseItem.defaultProps = defaultProps$m;
21840
+ CollapseItem.defaultProps = defaultProps$l;
21865
21841
  CollapseItem.displayName = "NutCollapseItem";
21866
- const defaultProps$l = {
21842
+ const defaultProps$k = {
21867
21843
  ...ComponentDefaults,
21868
21844
  defaultActiveName: [],
21869
21845
  accordion: false,
@@ -21882,7 +21858,7 @@ Please add \`${key}Action\` when creating your handler.`);
21882
21858
  rotate,
21883
21859
  onChange
21884
21860
  } = {
21885
- ...defaultProps$l,
21861
+ ...defaultProps$k,
21886
21862
  ...props
21887
21863
  };
21888
21864
  const classPrefix2 = "nut-collapse";
@@ -21939,10 +21915,10 @@ Please add \`${key}Action\` when creating your handler.`);
21939
21915
  /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style }, children)
21940
21916
  );
21941
21917
  };
21942
- Collapse.defaultProps = defaultProps$l;
21918
+ Collapse.defaultProps = defaultProps$k;
21943
21919
  Collapse.displayName = "NutCollapse";
21944
21920
  Collapse.Item = CollapseItem;
21945
- const defaultProps$k = {
21921
+ const defaultProps$j = {
21946
21922
  ...ComponentDefaults,
21947
21923
  paused: false,
21948
21924
  startTime: Date.now(),
@@ -21974,7 +21950,7 @@ Please add \`${key}Action\` when creating your handler.`);
21974
21950
  onUpdate,
21975
21951
  children,
21976
21952
  ...rest
21977
- } = { ...defaultProps$k, ...props };
21953
+ } = { ...defaultProps$j, ...props };
21978
21954
  const classPrefix2 = "nut-countdown";
21979
21955
  const [restTimeStamp, setRestTime] = React.useState(0);
21980
21956
  const stateRef = React.useRef({
@@ -22185,9 +22161,9 @@ Please add \`${key}Action\` when creating your handler.`);
22185
22161
  );
22186
22162
  };
22187
22163
  const CountDown = React.forwardRef(InternalCountDown);
22188
- CountDown.defaultProps = defaultProps$k;
22164
+ CountDown.defaultProps = defaultProps$j;
22189
22165
  CountDown.displayName = "NutCountDown";
22190
- const defaultProps$j = {
22166
+ const defaultProps$i = {
22191
22167
  ...ComponentDefaults,
22192
22168
  content: "",
22193
22169
  direction: "end",
@@ -22213,7 +22189,7 @@ Please add \`${key}Action\` when creating your handler.`);
22213
22189
  onClick,
22214
22190
  onChange,
22215
22191
  ...rest
22216
- } = { ...defaultProps$j, ...props };
22192
+ } = { ...defaultProps$i, ...props };
22217
22193
  let container = null;
22218
22194
  let maxHeight = 0;
22219
22195
  const [exceeded, setExceeded] = React.useState(false);
@@ -22361,9 +22337,9 @@ Please add \`${key}Action\` when creating your handler.`);
22361
22337
  collapseText
22362
22338
  ) : null) : null));
22363
22339
  };
22364
- Ellipsis.defaultProps = defaultProps$j;
22340
+ Ellipsis.defaultProps = defaultProps$i;
22365
22341
  Ellipsis.displayName = "NutEllipsis";
22366
- const defaultProps$i = {
22342
+ const defaultProps$h = {
22367
22343
  ...ComponentDefaults,
22368
22344
  source: {
22369
22345
  type: {},
@@ -22391,7 +22367,7 @@ Please add \`${key}Action\` when creating your handler.`);
22391
22367
  onPlayEnd,
22392
22368
  ...restProps
22393
22369
  } = {
22394
- ...defaultProps$i,
22370
+ ...defaultProps$h,
22395
22371
  ...props
22396
22372
  };
22397
22373
  const rootRef = React.useRef(null);
@@ -22441,10 +22417,10 @@ Please add \`${key}Action\` when creating your handler.`);
22441
22417
  /* @__PURE__ */ React.createElement("track", { kind: "captions" })
22442
22418
  ));
22443
22419
  };
22444
- Video.defaultProps = defaultProps$i;
22420
+ Video.defaultProps = defaultProps$h;
22445
22421
  Video.displayName = "NutVideo";
22446
22422
  const DataContext$1 = React.createContext({});
22447
- const defaultProps$h = {
22423
+ const defaultProps$g = {
22448
22424
  total: 3,
22449
22425
  current: 0,
22450
22426
  direction: "horizontal"
@@ -22452,7 +22428,7 @@ Please add \`${key}Action\` when creating your handler.`);
22452
22428
  const classPrefix$1 = `nut-indicator`;
22453
22429
  const Indicator = (props) => {
22454
22430
  const { total, current, children, className, direction, ...rest } = {
22455
- ...defaultProps$h,
22431
+ ...defaultProps$g,
22456
22432
  ...props
22457
22433
  };
22458
22434
  const classes = classNames({
@@ -22475,9 +22451,9 @@ Please add \`${key}Action\` when creating your handler.`);
22475
22451
  };
22476
22452
  return /* @__PURE__ */ React.createElement("div", { className: classNames(classes, className), ...rest }, renderElement());
22477
22453
  };
22478
- Indicator.defaultProps = defaultProps$h;
22454
+ Indicator.defaultProps = defaultProps$g;
22479
22455
  Indicator.displayName = "NutIndicator";
22480
- const defaultProps$g = {
22456
+ const defaultProps$f = {
22481
22457
  width: typeof window === "object" ? window.innerWidth : 375,
22482
22458
  height: 0,
22483
22459
  duration: 500,
@@ -22494,7 +22470,7 @@ Please add \`${key}Action\` when creating your handler.`);
22494
22470
  };
22495
22471
  const DISTANCE = 5;
22496
22472
  const Swiper = React.forwardRef((props, ref) => {
22497
- const propSwiper = { ...defaultProps$g, ...props };
22473
+ const propSwiper = { ...defaultProps$f, ...props };
22498
22474
  const {
22499
22475
  children,
22500
22476
  direction,
@@ -22907,13 +22883,13 @@ Please add \`${key}Action\` when creating your handler.`);
22907
22883
  renderIndicator()
22908
22884
  ));
22909
22885
  });
22910
- Swiper.defaultProps = defaultProps$g;
22886
+ Swiper.defaultProps = defaultProps$f;
22911
22887
  Swiper.displayName = "NutSwiper";
22912
- const defaultProps$f = {
22888
+ const defaultProps$e = {
22913
22889
  direction: "horizontal"
22914
22890
  };
22915
22891
  const SwiperItem = React.forwardRef((props, ref) => {
22916
- const _props = { ...defaultProps$f, ...props };
22892
+ const _props = { ...defaultProps$e, ...props };
22917
22893
  const { className, style, children, direction, size } = _props;
22918
22894
  const parent = React.useContext(DataContext$1);
22919
22895
  const b = cn("swiper-item");
@@ -22929,9 +22905,9 @@ Please add \`${key}Action\` when creating your handler.`);
22929
22905
  };
22930
22906
  return /* @__PURE__ */ React.createElement("div", { className: classes, style: { ...style, ...getStyle() } }, children);
22931
22907
  });
22932
- SwiperItem.defaultProps = defaultProps$f;
22908
+ SwiperItem.defaultProps = defaultProps$e;
22933
22909
  SwiperItem.displayName = "NutSwiperItem";
22934
- const defaultProps$e = {
22910
+ const defaultProps$d = {
22935
22911
  ...ComponentDefaults,
22936
22912
  images: [],
22937
22913
  videos: [],
@@ -23133,7 +23109,7 @@ Please add \`${key}Action\` when creating your handler.`);
23133
23109
  /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0))
23134
23110
  );
23135
23111
  };
23136
- ImagePreview.defaultProps = defaultProps$e;
23112
+ ImagePreview.defaultProps = defaultProps$d;
23137
23113
  ImagePreview.displayName = "NutImagePreview";
23138
23114
  const initPositinoCache = (reaItemSize, length = 0) => {
23139
23115
  let index = 0;
@@ -23246,7 +23222,7 @@ Please add \`${key}Action\` when creating your handler.`);
23246
23222
  }
23247
23223
  });
23248
23224
  };
23249
- const defaultProps$d = {
23225
+ const defaultProps$c = {
23250
23226
  ...ComponentDefaults,
23251
23227
  list: [],
23252
23228
  itemHeight: 66,
@@ -23268,7 +23244,7 @@ Please add \`${key}Action\` when creating your handler.`);
23268
23244
  containerHeight,
23269
23245
  ...rest
23270
23246
  } = {
23271
- ...defaultProps$d,
23247
+ ...defaultProps$c,
23272
23248
  ...props
23273
23249
  };
23274
23250
  const horizontal = direction === "horizontal";
@@ -23432,9 +23408,9 @@ Please add \`${key}Action\` when creating your handler.`);
23432
23408
  )
23433
23409
  );
23434
23410
  };
23435
- VirtualList.defaultProps = defaultProps$d;
23411
+ VirtualList.defaultProps = defaultProps$c;
23436
23412
  VirtualList.displayName = "NutVirtualList";
23437
- const defaultProps$c = {
23413
+ const defaultProps$b = {
23438
23414
  ...ComponentDefaults,
23439
23415
  defaultValue: 1,
23440
23416
  mode: "multi",
@@ -23462,7 +23438,7 @@ Please add \`${key}Action\` when creating your handler.`);
23462
23438
  className,
23463
23439
  ...rest
23464
23440
  } = {
23465
- ...defaultProps$c,
23441
+ ...defaultProps$b,
23466
23442
  ...props
23467
23443
  };
23468
23444
  const classPrefix2 = "nut-pagination";
@@ -23544,9 +23520,9 @@ Please add \`${key}Action\` when creating your handler.`);
23544
23520
  next || locale.pagination.next
23545
23521
  ));
23546
23522
  };
23547
- Pagination.defaultProps = defaultProps$c;
23523
+ Pagination.defaultProps = defaultProps$b;
23548
23524
  Pagination.displayName = "NutPagination";
23549
- const defaultProps$b = {
23525
+ const defaultProps$a = {
23550
23526
  ...ComponentDefaults,
23551
23527
  price: 0,
23552
23528
  symbol: "&yen;",
@@ -23569,7 +23545,7 @@ Please add \`${key}Action\` when creating your handler.`);
23569
23545
  style,
23570
23546
  ...rest
23571
23547
  } = {
23572
- ...defaultProps$b,
23548
+ ...defaultProps$a,
23573
23549
  ...props
23574
23550
  };
23575
23551
  const classPrefix2 = "nut-price";
@@ -23649,10 +23625,10 @@ Please add \`${key}Action\` when creating your handler.`);
23649
23625
  symbol && position === "after" ? renderSymbol() : null
23650
23626
  );
23651
23627
  };
23652
- Price.defaultProps = defaultProps$b;
23628
+ Price.defaultProps = defaultProps$a;
23653
23629
  Price.displayName = "NutPrice";
23654
23630
  const DataContext = React.createContext({});
23655
- const defaultProps$a = {
23631
+ const defaultProps$9 = {
23656
23632
  ...ComponentDefaults,
23657
23633
  title: "",
23658
23634
  description: "",
@@ -23661,7 +23637,7 @@ Please add \`${key}Action\` when creating your handler.`);
23661
23637
  };
23662
23638
  const Step = (props) => {
23663
23639
  const { children, title, description, value, icon, className, ...restProps } = {
23664
- ...defaultProps$a,
23640
+ ...defaultProps$9,
23665
23641
  ...props
23666
23642
  };
23667
23643
  const parent = React.useContext(DataContext);
@@ -23695,16 +23671,16 @@ Please add \`${key}Action\` when creating your handler.`);
23695
23671
  };
23696
23672
  return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps, onClick: handleClickStep }, /* @__PURE__ */ React.createElement("div", { className: "nut-step-head" }, /* @__PURE__ */ React.createElement("div", { className: "nut-step-line" }), /* @__PURE__ */ React.createElement("div", { className: renderIconClass() }, icon || !dot && /* @__PURE__ */ React.createElement("span", { className: "nut-step-inner" }, value))), /* @__PURE__ */ React.createElement("div", { className: "nut-step-main" }, /* @__PURE__ */ React.createElement("span", { className: "nut-step-title" }, title), description && /* @__PURE__ */ React.createElement("span", { className: "nut-step-description" }, description)));
23697
23673
  };
23698
- Step.defaultProps = defaultProps$a;
23674
+ Step.defaultProps = defaultProps$9;
23699
23675
  Step.displayName = "NutStep";
23700
- const defaultProps$9 = {
23676
+ const defaultProps$8 = {
23701
23677
  ...ComponentDefaults,
23702
23678
  value: 0,
23703
23679
  direction: "horizontal",
23704
23680
  dot: false
23705
23681
  };
23706
23682
  const Steps = (props) => {
23707
- const propSteps = { ...defaultProps$9, ...props };
23683
+ const propSteps = { ...defaultProps$8, ...props };
23708
23684
  const {
23709
23685
  children,
23710
23686
  value,
@@ -23735,9 +23711,9 @@ Please add \`${key}Action\` when creating your handler.`);
23735
23711
  children
23736
23712
  ));
23737
23713
  };
23738
- Steps.defaultProps = defaultProps$9;
23714
+ Steps.defaultProps = defaultProps$8;
23739
23715
  Steps.displayName = "NutSteps";
23740
- const defaultProps$8 = {
23716
+ const defaultProps$7 = {
23741
23717
  ...ComponentDefaults,
23742
23718
  columns: [],
23743
23719
  data: [],
@@ -23749,7 +23725,7 @@ Please add \`${key}Action\` when creating your handler.`);
23749
23725
  };
23750
23726
  const Table = (props) => {
23751
23727
  const { locale } = useConfig();
23752
- defaultProps$8.noData = locale.noData;
23728
+ defaultProps$7.noData = locale.noData;
23753
23729
  const {
23754
23730
  children,
23755
23731
  className,
@@ -23765,7 +23741,7 @@ Please add \`${key}Action\` when creating your handler.`);
23765
23741
  onSort,
23766
23742
  ...rest
23767
23743
  } = {
23768
- ...defaultProps$8,
23744
+ ...defaultProps$7,
23769
23745
  ...props
23770
23746
  };
23771
23747
  const [curData, setCurData] = React.useState(data);
@@ -23848,19 +23824,18 @@ Please add \`${key}Action\` when creating your handler.`);
23848
23824
  /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__main__body` }, renderBoyTrs())
23849
23825
  ), (summary || curData.length === 0) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__summary` }, summary || noData));
23850
23826
  };
23851
- Table.defaultProps = defaultProps$8;
23827
+ Table.defaultProps = defaultProps$7;
23852
23828
  Table.displayName = "NutTable";
23853
- const defaultProps$7 = {
23829
+ const defaultProps$6 = {
23854
23830
  ...ComponentDefaults,
23855
23831
  type: "default",
23832
+ background: "",
23856
23833
  color: "",
23857
- textColor: "",
23858
23834
  plain: false,
23859
23835
  round: false,
23860
23836
  mark: false,
23861
23837
  closeable: false,
23862
23838
  closeIcon: null,
23863
- prefixCls: "nut-tag",
23864
23839
  onClose: (e) => {
23865
23840
  },
23866
23841
  onClick: (e) => {
@@ -23870,86 +23845,70 @@ Please add \`${key}Action\` when creating your handler.`);
23870
23845
  const {
23871
23846
  className,
23872
23847
  style,
23873
- color,
23848
+ background,
23874
23849
  plain,
23875
23850
  type: type2,
23876
23851
  round,
23877
- prefixCls: prefixCls2,
23878
23852
  children,
23879
23853
  mark,
23880
23854
  closeable,
23881
23855
  closeIcon,
23882
- textColor,
23856
+ color,
23883
23857
  onClick,
23884
23858
  onClose
23885
23859
  } = {
23886
- ...defaultProps$7,
23860
+ ...defaultProps$6,
23887
23861
  ...props
23888
23862
  };
23889
- const [btnName, setBtnName] = React.useState("");
23890
- const [isTagShow, setIsTagShow] = React.useState(true);
23891
- React.useEffect(() => {
23892
- setBtnName(classes());
23893
- }, [
23894
- type2,
23895
- color,
23896
- textColor,
23897
- plain,
23898
- round,
23899
- mark,
23900
- closeable,
23901
- prefixCls2,
23902
- onClick,
23903
- onClose,
23904
- className
23905
- ]);
23863
+ const [tagClass, setTagClass] = React.useState("");
23864
+ const [visible, setVisible] = React.useState(true);
23865
+ const classPrefix2 = "nut-tag";
23906
23866
  const classes = () => {
23907
- const prefixCls22 = "nut-tag";
23908
23867
  return classNames({
23909
- [prefixCls22]: true,
23910
- [`${prefixCls22}--${type2}`]: type2,
23911
- [`${prefixCls22}--plain`]: plain,
23912
- [`${prefixCls22}--round`]: round,
23913
- [`${prefixCls22}--mark`]: mark,
23914
- [`${prefixCls22}--close`]: closeable,
23868
+ [classPrefix2]: true,
23869
+ [`${classPrefix2}--${type2}`]: type2,
23870
+ [`${classPrefix2}--plain`]: plain,
23871
+ [`${classPrefix2}--round`]: round,
23872
+ [`${classPrefix2}--mark`]: mark,
23873
+ [`${classPrefix2}--close`]: closeable,
23915
23874
  [`${className}`]: className
23916
23875
  });
23917
23876
  };
23877
+ React.useEffect(() => {
23878
+ setTagClass(classes());
23879
+ }, [type2, background, color, plain, round, mark, closeable, className]);
23918
23880
  const handleClick2 = (e) => {
23919
- if (props.onClick) {
23920
- props.onClick(e);
23921
- }
23881
+ onClick && onClick(e);
23922
23882
  };
23923
23883
  const getStyle = () => {
23924
23884
  const style2 = {};
23925
- if (textColor) {
23926
- style2.color = textColor;
23927
- } else if (color && plain) {
23885
+ if (color) {
23928
23886
  style2.color = color;
23887
+ } else if (background && plain) {
23888
+ style2.color = background;
23929
23889
  }
23930
23890
  if (plain) {
23931
- style2.background = "#fff";
23932
- style2.borderColor = color;
23933
- } else if (color) {
23934
- style2.background = color;
23891
+ style2.borderColor = background;
23892
+ } else if (background) {
23893
+ style2.background = background;
23935
23894
  }
23936
23895
  return style2;
23937
23896
  };
23938
- return /* @__PURE__ */ React.createElement(React.Fragment, null, closeable ? isTagShow && /* @__PURE__ */ React.createElement(
23897
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, closeable ? visible && /* @__PURE__ */ React.createElement(
23939
23898
  "div",
23940
23899
  {
23941
- className: btnName,
23900
+ className: tagClass,
23942
23901
  style: { ...style, ...getStyle() },
23943
23902
  onClick: (e) => handleClick2(e)
23944
23903
  },
23945
- children && /* @__PURE__ */ React.createElement("span", { className: "nut-tag-text" }, children),
23904
+ children && /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}-text` }, children),
23946
23905
  React.isValidElement(closeIcon) ? /* @__PURE__ */ React.createElement(
23947
23906
  "i",
23948
23907
  {
23949
- className: "nut-tag-custom-icon",
23908
+ className: `${classPrefix2}-custom-icon`,
23950
23909
  onClick: (e) => {
23951
- setIsTagShow(false);
23952
- props.onClose && props.onClose(e);
23910
+ setVisible(false);
23911
+ onClose && onClose(e);
23953
23912
  }
23954
23913
  },
23955
23914
  closeIcon
@@ -23959,24 +23918,24 @@ Please add \`${key}Action\` when creating your handler.`);
23959
23918
  width: 12,
23960
23919
  height: 12,
23961
23920
  onClick: (e) => {
23962
- setIsTagShow(false);
23963
- props.onClose && props.onClose(e);
23921
+ setVisible(false);
23922
+ onClose && onClose(e);
23964
23923
  }
23965
23924
  }
23966
23925
  )
23967
23926
  ) : /* @__PURE__ */ React.createElement(
23968
23927
  "div",
23969
23928
  {
23970
- className: btnName,
23929
+ className: tagClass,
23971
23930
  style: { ...style, ...getStyle() },
23972
23931
  onClick: (e) => handleClick2(e)
23973
23932
  },
23974
- children && /* @__PURE__ */ React.createElement("span", { className: "nut-tag-text" }, children)
23933
+ children && /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}-text` }, children)
23975
23934
  ));
23976
23935
  };
23977
- Tag.defaultProps = defaultProps$7;
23936
+ Tag.defaultProps = defaultProps$6;
23978
23937
  Tag.displayName = "NutTag";
23979
- const defaultProps$6 = {
23938
+ const defaultProps$5 = {
23980
23939
  ...ComponentDefaults,
23981
23940
  list: [],
23982
23941
  interval: 500,
@@ -23997,7 +23956,7 @@ Please add \`${key}Action\` when creating your handler.`);
23997
23956
  gapY,
23998
23957
  ...restProps
23999
23958
  } = {
24000
- ...defaultProps$6,
23959
+ ...defaultProps$5,
24001
23960
  ...props
24002
23961
  };
24003
23962
  const barrageBody = React.useRef(null);
@@ -24063,250 +24022,243 @@ Please add \`${key}Action\` when creating your handler.`);
24063
24022
  return /* @__PURE__ */ React.createElement("div", { className: classes, ref: barrageBody, ...restProps }, /* @__PURE__ */ React.createElement("div", { ref: barrageContainer, className: "bContainer" }));
24064
24023
  };
24065
24024
  const Barrage = React.forwardRef(InternalBarrage);
24066
- Barrage.defaultProps = defaultProps$6;
24025
+ Barrage.defaultProps = defaultProps$5;
24067
24026
  Barrage.displayName = "NutBarrage";
24068
- const defaultProps$5 = {};
24027
+ const defaultProps$4 = {
24028
+ ...ComponentDefaults,
24029
+ src: "",
24030
+ title: "",
24031
+ price: "",
24032
+ vipPrice: "",
24033
+ shopDescription: "",
24034
+ delivery: "",
24035
+ shopName: "",
24036
+ description: "",
24037
+ tag: "",
24038
+ priceTag: "",
24039
+ extra: ""
24040
+ };
24069
24041
  const Card = (props) => {
24070
24042
  const {
24071
24043
  className,
24072
24044
  style,
24073
- imgUrl,
24045
+ src,
24074
24046
  title,
24075
24047
  price,
24076
24048
  vipPrice,
24077
- shopDesc,
24049
+ shopDescription,
24078
24050
  delivery,
24079
24051
  shopName,
24080
- shopTagTpl,
24081
- originTpl,
24082
- prolistTpl,
24083
- footerTpl,
24052
+ tag,
24053
+ priceTag,
24054
+ description,
24055
+ extra,
24084
24056
  ...rest
24085
24057
  } = {
24086
- ...defaultProps$5,
24058
+ ...defaultProps$4,
24087
24059
  ...props
24088
24060
  };
24089
- const b = cn("card");
24090
- return /* @__PURE__ */ React.createElement("div", { className: classNames(b(), className), style, ...rest }, /* @__PURE__ */ React.createElement("div", { className: b("left") }, /* @__PURE__ */ React.createElement("img", { src: imgUrl, alt: "" })), /* @__PURE__ */ React.createElement("div", { className: b("right") }, /* @__PURE__ */ React.createElement("div", { className: b("right__title") }, title), prolistTpl, /* @__PURE__ */ React.createElement("div", { className: b("right__price") }, /* @__PURE__ */ React.createElement(Price, { price }), originTpl || /* @__PURE__ */ React.createElement(Price, { className: b("right__price__origin"), price: vipPrice })), /* @__PURE__ */ React.createElement("div", { className: b("right__other") }, shopTagTpl || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Tag, { type: "danger" }, shopDesc), /* @__PURE__ */ React.createElement(Tag, { plain: true }, delivery))), /* @__PURE__ */ React.createElement("div", { className: b("right__shop") }, /* @__PURE__ */ React.createElement("div", { className: b("right__shop__name") }, shopName), footerTpl)));
24061
+ const classPrefix2 = "nut-card";
24062
+ return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style, ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__left` }, /* @__PURE__ */ React.createElement("img", { src, alt: "" })), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__right` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__right-title` }, title), description, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-price` }, /* @__PURE__ */ React.createElement(Price, { size: "normal", price }), priceTag || /* @__PURE__ */ React.createElement(
24063
+ Price,
24064
+ {
24065
+ size: "normal",
24066
+ className: `${classPrefix2}right-price-origin`,
24067
+ price: vipPrice
24068
+ }
24069
+ )), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-other` }, tag || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Tag, { type: "danger" }, shopDescription), /* @__PURE__ */ React.createElement(Tag, { plain: true }, delivery))), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-shop` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-shop-name` }, shopName), extra)));
24091
24070
  };
24092
- Card.defaultProps = defaultProps$5;
24071
+ Card.defaultProps = defaultProps$4;
24093
24072
  Card.displayName = "NutCard";
24094
- const defaultProps$4 = {
24095
- className: "",
24096
- currentKey: 0,
24097
- currentTime: [],
24098
- times: [],
24099
- select: () => null
24073
+ const defaultProps$3 = {
24074
+ ...ComponentDefaults,
24075
+ activeDate: "",
24076
+ activeTime: [],
24077
+ options: [],
24078
+ optionKey: {
24079
+ valueKey: "value",
24080
+ textKey: "text",
24081
+ childrenKey: "children"
24082
+ },
24083
+ onSelect: () => {
24084
+ }
24100
24085
  };
24101
24086
  const TimeDetail = (props) => {
24102
- useConfig();
24103
- const { children, times, className, currentKey, currentTime, select } = {
24104
- ...defaultProps$4,
24087
+ const { options: options2, optionKey, className, activeDate, activeTime, onSelect } = {
24088
+ ...defaultProps$3,
24105
24089
  ...props
24106
24090
  };
24107
- const b = cn("timedetail");
24108
- const [renderData, setRenderData] = React.useState([]);
24109
- React.useEffect(() => {
24110
- const currentData = times.find(
24111
- (timesItem) => String(timesItem.key) === String(currentKey)
24112
- );
24113
- const renderData2 = currentData ? currentData.list : [];
24114
- setRenderData(renderData2);
24115
- }, [times, currentKey]);
24116
- const handleTime = (time) => {
24117
- select(time);
24118
- };
24119
- const getDetailClass = (item) => {
24120
- let initClass = "nut-timedetail__item";
24121
- const curTimeData = currentTime.find(
24122
- (item2) => String(item2.key) === String(currentKey)
24123
- );
24124
- if (curTimeData && curTimeData.list && curTimeData.list.includes(item)) {
24125
- initClass += " nut-timedetail__item-active";
24126
- }
24127
- return initClass;
24128
- };
24129
- return /* @__PURE__ */ React.createElement("div", { className: `${b()} ${className || ""}` }, renderData.map((item, index) => /* @__PURE__ */ React.createElement(
24091
+ const classPrefix2 = "nut-timedetail";
24092
+ const timeList = React.useMemo(() => {
24093
+ return (options2 == null ? void 0 : options2.find(
24094
+ (item) => item[optionKey.valueKey] === activeDate
24095
+ )) || {
24096
+ [optionKey.childrenKey]: []
24097
+ };
24098
+ }, [options2, optionKey, activeDate]);
24099
+ const isActive = React.useCallback(
24100
+ (timeKey) => {
24101
+ const date2 = activeTime.find((item) => {
24102
+ return item[optionKey.valueKey] === activeDate;
24103
+ });
24104
+ if (date2 == null ? void 0 : date2[optionKey.childrenKey]) {
24105
+ const time = date2 == null ? void 0 : date2[optionKey.childrenKey].find((time2) => {
24106
+ return time2[optionKey.valueKey] === timeKey;
24107
+ });
24108
+ return time;
24109
+ }
24110
+ return false;
24111
+ },
24112
+ [activeTime, optionKey, activeDate]
24113
+ );
24114
+ return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className) }, timeList[optionKey.childrenKey].map((item) => /* @__PURE__ */ React.createElement(
24130
24115
  "span",
24131
24116
  {
24132
- className: getDetailClass(item),
24133
- key: item,
24134
- onClick: () => handleTime(item)
24117
+ className: classNames(`${classPrefix2}__item`, {
24118
+ active: isActive(item[optionKey.valueKey])
24119
+ }),
24120
+ key: item[optionKey.valueKey],
24121
+ onClick: () => onSelect(item)
24135
24122
  },
24136
- item
24123
+ item[optionKey.textKey]
24137
24124
  )));
24138
24125
  };
24139
- TimeDetail.defaultProps = defaultProps$4;
24126
+ TimeDetail.defaultProps = defaultProps$3;
24140
24127
  TimeDetail.displayName = "NutTimeDetail";
24141
- const defaultProps$3 = {
24142
- className: "",
24143
- date: "",
24144
- curKey: 0
24145
- };
24146
- const TimePannel = (props) => {
24147
- useConfig();
24148
- const { children, className, date: date2, curKey, change } = {
24149
- ...defaultProps$3,
24150
- ...props
24151
- };
24152
- const b = cn("timepannel");
24153
- return /* @__PURE__ */ React.createElement("div", { className: `${b()} ${className || ""}`, onClick: () => change(curKey) }, date2);
24154
- };
24155
- TimePannel.defaultProps = defaultProps$3;
24156
- TimePannel.displayName = "NutTimePannel";
24157
24128
  const defaultProps$2 = {
24158
- className: "",
24159
- style: {},
24129
+ ...ComponentDefaults,
24160
24130
  visible: false,
24161
- height: "20%",
24162
24131
  multiple: false,
24163
- currentKey: 0,
24164
- currentTime: [],
24165
- title: "取件时间",
24166
- dates: [],
24167
- times: []
24132
+ defaultValue: [],
24133
+ options: [],
24134
+ optionKey: {
24135
+ valueKey: "value",
24136
+ textKey: "text",
24137
+ childrenKey: "children"
24138
+ }
24168
24139
  };
24169
24140
  const TimeSelect = (props) => {
24170
- useConfig();
24141
+ const { locale } = useConfig();
24171
24142
  const {
24172
24143
  visible,
24173
24144
  className,
24174
- height,
24145
+ style,
24175
24146
  title,
24176
- currentKey,
24177
- currentTime,
24178
- dates,
24179
- times,
24147
+ defaultValue,
24148
+ options: options2,
24149
+ optionKey,
24180
24150
  multiple,
24181
- select,
24182
- pannelChange,
24183
- timeChange,
24184
24151
  onSelect,
24185
- onPannelChange,
24186
- onTimeChange
24152
+ onDateChange,
24153
+ onTimeChange,
24154
+ ...rest
24187
24155
  } = {
24188
24156
  ...defaultProps$2,
24189
24157
  ...props
24190
24158
  };
24191
- const [activeKey, setActiveKey] = React.useState(currentKey);
24159
+ const [activeDate, setActiveDate] = React.useState(() => {
24160
+ if (defaultValue == null ? void 0 : defaultValue.length) {
24161
+ return defaultValue[0][optionKey.valueKey];
24162
+ }
24163
+ if (options2 == null ? void 0 : options2.length) {
24164
+ return options2[0][optionKey.valueKey];
24165
+ }
24166
+ return "";
24167
+ });
24192
24168
  const [activeTime, setActiveTime] = React.useState(
24193
- currentTime.length ? currentTime : [
24194
- {
24195
- key: currentKey,
24196
- list: []
24197
- }
24198
- ]
24169
+ () => defaultValue || []
24199
24170
  );
24200
- const [popVisible, setPopVisible] = React.useState(visible);
24201
- const popStyle = {
24202
- width: "100%",
24203
- height
24204
- };
24205
- const b = cn("timeselect");
24171
+ const classPrefix2 = "nut-timeselect";
24206
24172
  const closeFun = () => {
24207
- if (onSelect) {
24208
- onSelect(activeTime);
24209
- } else if (select) {
24210
- select(activeTime);
24211
- }
24212
- };
24213
- const handleSelectTime = (time) => {
24214
- let curTimeData = {};
24215
- let curIndex = -1;
24216
- for (let i = 0; i < activeTime.length; i++) {
24217
- if (String(activeTime[i].key) === String(activeKey)) {
24218
- curTimeData = activeTime[i];
24219
- curIndex = i;
24220
- break;
24221
- }
24222
- }
24223
- const curTimeIndex = curTimeData.list.findIndex(
24224
- (item) => String(item) === String(time)
24225
- );
24226
- if (curTimeIndex === -1) {
24227
- curTimeData.list.push(time);
24228
- } else {
24229
- curTimeData.list.splice(curTimeIndex, 1);
24230
- }
24231
- const resultTimeData = [...activeTime];
24232
- resultTimeData.splice(curIndex, 1, curTimeData);
24233
- setActiveTime(resultTimeData);
24234
- if (onTimeChange) {
24235
- onTimeChange(time, resultTimeData);
24236
- } else if (timeChange) {
24237
- timeChange(time, resultTimeData);
24238
- }
24239
- };
24240
- const handleChange = (pannelKey) => {
24241
- const resultTimeData = [...activeTime];
24242
- if (String(pannelKey) !== String(activeKey)) {
24243
- setActiveKey == null ? void 0 : setActiveKey(pannelKey);
24244
- if (multiple) {
24245
- const curTimeDataIndex = activeTime.findIndex(
24246
- (item) => String(item.key) === String(pannelKey)
24247
- );
24248
- if (curTimeDataIndex === -1) {
24249
- resultTimeData.push({
24250
- key: pannelKey,
24251
- list: []
24252
- });
24253
- setActiveTime(resultTimeData);
24173
+ onSelect && onSelect(activeTime);
24174
+ };
24175
+ const handleSelectTime = (selectTime) => {
24176
+ let newActiveTime = [...activeTime];
24177
+ const date2 = newActiveTime.find((item) => {
24178
+ return item[optionKey.valueKey] === activeDate;
24179
+ });
24180
+ if (date2) {
24181
+ const timeIndex = date2[optionKey.childrenKey].findIndex(
24182
+ (time) => {
24183
+ return time[optionKey.valueKey] === selectTime[optionKey.valueKey];
24184
+ }
24185
+ );
24186
+ if (timeIndex > -1) {
24187
+ if (multiple) {
24188
+ date2[optionKey.childrenKey].splice(timeIndex, 1);
24189
+ } else {
24190
+ newActiveTime = [];
24254
24191
  }
24192
+ } else if (multiple) {
24193
+ date2[optionKey.childrenKey].push({ ...selectTime });
24255
24194
  } else {
24256
- setActiveTime([
24195
+ newActiveTime = [
24257
24196
  {
24258
- key: pannelKey,
24259
- list: []
24197
+ [optionKey.valueKey]: activeDate,
24198
+ [optionKey.childrenKey]: [{ ...selectTime }]
24260
24199
  }
24261
- ]);
24200
+ ];
24262
24201
  }
24202
+ } else if (multiple) {
24203
+ newActiveTime.push({
24204
+ [optionKey.valueKey]: activeDate,
24205
+ [optionKey.childrenKey]: [{ ...selectTime }]
24206
+ });
24207
+ } else {
24208
+ newActiveTime = [
24209
+ {
24210
+ [optionKey.valueKey]: activeDate,
24211
+ [optionKey.childrenKey]: [{ ...selectTime }]
24212
+ }
24213
+ ];
24263
24214
  }
24264
- if (onPannelChange) {
24265
- onPannelChange(pannelKey, resultTimeData);
24266
- } else if (pannelChange) {
24267
- pannelChange(pannelKey, resultTimeData);
24268
- }
24215
+ newActiveTime = newActiveTime.filter((item) => {
24216
+ var _a2;
24217
+ return ((_a2 = item[optionKey.childrenKey]) == null ? void 0 : _a2.length) > 0;
24218
+ });
24219
+ setActiveTime(newActiveTime);
24220
+ onTimeChange && onTimeChange(selectTime, newActiveTime);
24269
24221
  };
24270
- const getTimePannelClass = (dataItem) => {
24271
- if (String(dataItem["paneKey"]) === String(activeKey)) {
24272
- return "nut-timepannel-active";
24273
- }
24274
- return "";
24222
+ const handleChange = (date2) => {
24223
+ setActiveDate(date2[optionKey.valueKey]);
24224
+ onDateChange && onDateChange(date2, activeTime);
24275
24225
  };
24276
- React.useEffect(() => {
24277
- setPopVisible(visible);
24278
- }, [visible]);
24279
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
24226
+ return /* @__PURE__ */ React.createElement(
24280
24227
  Popup,
24281
24228
  {
24282
24229
  closeable: true,
24283
24230
  round: true,
24284
- visible: popVisible,
24231
+ visible,
24285
24232
  position: "bottom",
24286
- style: popStyle,
24287
- onClose: () => {
24288
- closeFun();
24289
- }
24233
+ style: {
24234
+ width: "100%",
24235
+ height: "20%",
24236
+ ...style
24237
+ },
24238
+ onClose: closeFun,
24239
+ ...rest
24290
24240
  },
24291
- /* @__PURE__ */ React.createElement("div", { className: `${b()} ${className || ""}` }, /* @__PURE__ */ React.createElement("div", { className: "nut-timeselect__title" }, title), /* @__PURE__ */ React.createElement("div", { className: "nut-timeselect__content" }, /* @__PURE__ */ React.createElement("div", { className: "nut-timeselect__content-left" }, dates.map((dataItem, index) => /* @__PURE__ */ React.createElement(
24292
- TimePannel,
24241
+ /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className) }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__title` }, title || locale.timeselect.pickupTime), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content-left` }, options2.map((item) => /* @__PURE__ */ React.createElement(
24242
+ "div",
24293
24243
  {
24294
- date: dataItem.date,
24295
- className: getTimePannelClass(dataItem),
24296
- key: String(dataItem["paneKey"] || index),
24297
- curKey: String(dataItem["paneKey"] || index),
24298
- change: handleChange
24299
- }
24244
+ key: item[optionKey.valueKey],
24245
+ className: classNames("nut-timepannel", {
24246
+ active: item[optionKey.valueKey] === activeDate
24247
+ }),
24248
+ onClick: () => handleChange(item)
24249
+ },
24250
+ item[optionKey.textKey]
24300
24251
  ))), /* @__PURE__ */ React.createElement(
24301
24252
  TimeDetail,
24302
24253
  {
24303
- times,
24304
- currentKey: String(activeKey),
24305
- currentTime: activeTime,
24306
- select: handleSelectTime
24254
+ options: options2,
24255
+ optionKey,
24256
+ activeDate,
24257
+ activeTime,
24258
+ onSelect: handleSelectTime
24307
24259
  }
24308
24260
  )))
24309
- ));
24261
+ );
24310
24262
  };
24311
24263
  TimeSelect.defaultProps = defaultProps$2;
24312
24264
  TimeSelect.displayName = "NutTimeSelect";
@@ -24543,7 +24495,7 @@ Please add \`${key}Action\` when creating your handler.`);
24543
24495
  exports2.Image = Image$1;
24544
24496
  exports2.ImagePreview = ImagePreview;
24545
24497
  exports2.Indicator = Indicator;
24546
- exports2.Infiniteloading = Infiniteloading;
24498
+ exports2.InfiniteLoading = InfiniteLoading;
24547
24499
  exports2.Input = Input;
24548
24500
  exports2.InputNumber = InputNumber;
24549
24501
  exports2.Layout = Layout;
@@ -24588,7 +24540,6 @@ Please add \`${key}Action\` when creating your handler.`);
24588
24540
  exports2.Tag = Tag;
24589
24541
  exports2.TextArea = TextArea;
24590
24542
  exports2.TimeDetail = TimeDetail;
24591
- exports2.TimePannel = TimePannel;
24592
24543
  exports2.TimeSelect = TimeSelect;
24593
24544
  exports2.Toast = Toast;
24594
24545
  exports2.TrendArrow = TrendArrow;