@nutui/nutui-react 2.0.0-alpha.8 → 2.0.0-alpha.9

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 (38) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/esm/Audio.js +5 -5
  3. package/dist/esm/Elevator.js +6 -5
  4. package/dist/esm/Image.js +2 -5
  5. package/dist/esm/ImagePreview.js +9 -9
  6. package/dist/esm/Indicator.js +4 -4
  7. package/dist/esm/Notify.js +35 -46
  8. package/dist/esm/NumberKeyboard.js +137 -195
  9. package/dist/esm/Price.js +22 -23
  10. package/dist/esm/PullToRefresh.js +8 -8
  11. package/dist/esm/Radio.js +2 -0
  12. package/dist/esm/RadioGroup.js +31 -51
  13. package/dist/esm/Swiper.js +100 -111
  14. package/dist/esm/SwiperItem.js +1 -1
  15. package/dist/esm/radio2.js +52 -54
  16. package/dist/locales/base.js +1 -1
  17. package/dist/locales/en-US.js +1 -1
  18. package/dist/locales/id-ID.js +1 -1
  19. package/dist/locales/zh-CN.js +1 -1
  20. package/dist/locales/zh-TW.js +1 -1
  21. package/dist/locales/zh-UG.js +1 -1
  22. package/dist/nutui.react.mjs +718 -742
  23. package/dist/nutui.react.umd.js +717 -741
  24. package/dist/packages/imagepreview/imagepreview.scss +5 -0
  25. package/dist/packages/notify/notify.scss +1 -1
  26. package/dist/packages/numberkeyboard/numberkeyboard.scss +29 -77
  27. package/dist/packages/price/price.scss +8 -0
  28. package/dist/packages/pulltorefresh/pulltorefresh.scss +0 -8
  29. package/dist/packages/radio/radio.scss +13 -32
  30. package/dist/packages/radiogroup/radiogroup.scss +17 -51
  31. package/dist/packages/swiper/swiper.scss +0 -15
  32. package/dist/style.css +1 -1
  33. package/dist/style.mjs +1 -1
  34. package/dist/styles/variables-jmapp.scss +50 -44
  35. package/dist/styles/variables.scss +50 -46
  36. package/dist/types/index.d.ts +64 -80
  37. package/package.json +1 -1
  38. /package/dist/esm/{UserContext3.js → context2.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.8 Fri May 12 2023 19:07:24 GMT+0800 (China Standard Time)
12
+ * @nutui/nutui-react v2.0.0-alpha.9 Wed May 17 2023 18:23:02 GMT+0800 (China Standard Time)
13
13
  * (c) 2023 @jdf2e.
14
14
  * Released under the MIT License.
15
15
  */
@@ -1661,7 +1661,7 @@ Check the top-level render call using <` + t + ">.");
1661
1661
  process.env.NODE_ENV === "production" ? h.exports = ur() : h.exports = sr();
1662
1662
  })(ir);
1663
1663
  const lr = D.Fragment, cr = D.jsx, vr = D.jsxs;
1664
- const a$v = {
1664
+ const a$w = {
1665
1665
  className: "",
1666
1666
  style: void 0,
1667
1667
  name: "ArrowDown2",
@@ -1669,8 +1669,8 @@ Check the top-level render call using <` + t + ">.");
1669
1669
  height: "",
1670
1670
  onClick: () => {
1671
1671
  }
1672
- }, y$8 = (h) => {
1673
- const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$v, ...h }, f = (t) => {
1672
+ }, y$9 = (h) => {
1673
+ const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$w, ...h }, f = (t) => {
1674
1674
  n && n(t);
1675
1675
  }, c = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
1676
1676
  const t = "nut-icon";
@@ -1707,8 +1707,8 @@ Check the top-level render call using <` + t + ">.");
1707
1707
  }
1708
1708
  ) });
1709
1709
  };
1710
- y$8.defaultProps = a$v;
1711
- const a$u = {
1710
+ y$9.defaultProps = a$w;
1711
+ const a$v = {
1712
1712
  className: "",
1713
1713
  style: void 0,
1714
1714
  name: "ArrowUp2",
@@ -1717,7 +1717,7 @@ Check the top-level render call using <` + t + ">.");
1717
1717
  onClick: () => {
1718
1718
  }
1719
1719
  }, x$g = (h) => {
1720
- const { className: o, style: p, name: e, color: d, width: m, height: f, onClick: n } = { ...a$u, ...h }, g = (t) => {
1720
+ const { className: o, style: p, name: e, color: d, width: m, height: f, onClick: n } = { ...a$v, ...h }, g = (t) => {
1721
1721
  n && n(t);
1722
1722
  }, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", w = () => {
1723
1723
  const t = "nut-icon";
@@ -1754,8 +1754,8 @@ Check the top-level render call using <` + t + ">.");
1754
1754
  }
1755
1755
  ) });
1756
1756
  };
1757
- x$g.defaultProps = a$u;
1758
- const a$t = {
1757
+ x$g.defaultProps = a$v;
1758
+ const a$u = {
1759
1759
  className: "",
1760
1760
  style: void 0,
1761
1761
  name: "CheckChecked",
@@ -1763,8 +1763,8 @@ Check the top-level render call using <` + t + ">.");
1763
1763
  height: "",
1764
1764
  onClick: () => {
1765
1765
  }
1766
- }, y$7 = (h) => {
1767
- const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$t, ...h }, C = (t) => {
1766
+ }, y$8 = (h) => {
1767
+ const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$u, ...h }, C = (t) => {
1768
1768
  o && o(t);
1769
1769
  }, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", k2 = () => {
1770
1770
  const t = "nut-icon";
@@ -1812,8 +1812,8 @@ Check the top-level render call using <` + t + ">.");
1812
1812
  }
1813
1813
  ) });
1814
1814
  };
1815
- y$7.defaultProps = a$t;
1816
- const a$s = {
1815
+ y$8.defaultProps = a$u;
1816
+ const a$t = {
1817
1817
  className: "",
1818
1818
  style: void 0,
1819
1819
  name: "CheckDisabled",
@@ -1822,7 +1822,7 @@ Check the top-level render call using <` + t + ">.");
1822
1822
  onClick: () => {
1823
1823
  }
1824
1824
  }, x$f = (h) => {
1825
- const { className: i, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$s, ...h }, g = (t) => {
1825
+ const { className: i, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$t, ...h }, g = (t) => {
1826
1826
  o && o(t);
1827
1827
  }, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
1828
1828
  const t = "nut-icon";
@@ -1859,8 +1859,8 @@ Check the top-level render call using <` + t + ">.");
1859
1859
  }
1860
1860
  ) });
1861
1861
  };
1862
- x$f.defaultProps = a$s;
1863
- const a$r = {
1862
+ x$f.defaultProps = a$t;
1863
+ const a$s = {
1864
1864
  className: "",
1865
1865
  style: void 0,
1866
1866
  name: "CheckNormal",
@@ -1869,7 +1869,7 @@ Check the top-level render call using <` + t + ">.");
1869
1869
  onClick: () => {
1870
1870
  }
1871
1871
  }, N = (h) => {
1872
- const { className: o, style: m, name: e, color: d, width: p, height: C, onClick: r } = { ...a$r, ...h }, f = (t) => {
1872
+ const { className: o, style: m, name: e, color: d, width: p, height: C, onClick: r } = { ...a$s, ...h }, f = (t) => {
1873
1873
  r && r(t);
1874
1874
  }, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
1875
1875
  const t = "nut-icon";
@@ -1906,8 +1906,8 @@ Check the top-level render call using <` + t + ">.");
1906
1906
  }
1907
1907
  ) });
1908
1908
  };
1909
- N.defaultProps = a$r;
1910
- const a$q = {
1909
+ N.defaultProps = a$s;
1910
+ const a$r = {
1911
1911
  className: "",
1912
1912
  style: void 0,
1913
1913
  name: "Check",
@@ -1916,7 +1916,7 @@ Check the top-level render call using <` + t + ">.");
1916
1916
  onClick: () => {
1917
1917
  }
1918
1918
  }, x$e = (h) => {
1919
- const { className: o, style: d, name: e, color: p, width: m, height: f, onClick: r } = { ...a$q, ...h }, g = (t) => {
1919
+ const { className: o, style: d, name: e, color: p, width: m, height: f, onClick: r } = { ...a$r, ...h }, g = (t) => {
1920
1920
  r && r(t);
1921
1921
  }, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
1922
1922
  const t = "nut-icon";
@@ -1953,8 +1953,8 @@ Check the top-level render call using <` + t + ">.");
1953
1953
  }
1954
1954
  ) });
1955
1955
  };
1956
- x$e.defaultProps = a$q;
1957
- const a$p = {
1956
+ x$e.defaultProps = a$r;
1957
+ const a$q = {
1958
1958
  className: "",
1959
1959
  style: void 0,
1960
1960
  name: "Checked",
@@ -1963,7 +1963,7 @@ Check the top-level render call using <` + t + ">.");
1963
1963
  onClick: () => {
1964
1964
  }
1965
1965
  }, x$d = (h) => {
1966
- const { className: o, style: d, name: e, color: m, width: p, height: C, onClick: r } = { ...a$p, ...h }, f = (t) => {
1966
+ const { className: o, style: d, name: e, color: m, width: p, height: C, onClick: r } = { ...a$q, ...h }, f = (t) => {
1967
1967
  r && r(t);
1968
1968
  }, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
1969
1969
  const t = "nut-icon";
@@ -2000,8 +2000,8 @@ Check the top-level render call using <` + t + ">.");
2000
2000
  }
2001
2001
  ) });
2002
2002
  };
2003
- x$d.defaultProps = a$p;
2004
- const a$o = {
2003
+ x$d.defaultProps = a$q;
2004
+ const a$p = {
2005
2005
  className: "",
2006
2006
  style: void 0,
2007
2007
  name: "Checklist",
@@ -2010,7 +2010,7 @@ Check the top-level render call using <` + t + ">.");
2010
2010
  onClick: () => {
2011
2011
  }
2012
2012
  }, x$c = (h) => {
2013
- const { className: i, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$o, ...h }, g = (t) => {
2013
+ const { className: i, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$p, ...h }, g = (t) => {
2014
2014
  o && o(t);
2015
2015
  }, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", k2 = () => {
2016
2016
  const t = "nut-icon";
@@ -2047,8 +2047,8 @@ Check the top-level render call using <` + t + ">.");
2047
2047
  }
2048
2048
  ) });
2049
2049
  };
2050
- x$c.defaultProps = a$o;
2051
- const a$n = {
2050
+ x$c.defaultProps = a$p;
2051
+ const a$o = {
2052
2052
  className: "",
2053
2053
  style: void 0,
2054
2054
  name: "CircleClose",
@@ -2057,7 +2057,7 @@ Check the top-level render call using <` + t + ">.");
2057
2057
  onClick: () => {
2058
2058
  }
2059
2059
  }, x$b = (h) => {
2060
- const { className: l2, style: m, name: e, color: d, width: p, height: C, onClick: o } = { ...a$n, ...h }, f = (t) => {
2060
+ const { className: l2, style: m, name: e, color: d, width: p, height: C, onClick: o } = { ...a$o, ...h }, f = (t) => {
2061
2061
  o && o(t);
2062
2062
  }, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
2063
2063
  const t = "nut-icon";
@@ -2094,8 +2094,8 @@ Check the top-level render call using <` + t + ">.");
2094
2094
  }
2095
2095
  ) });
2096
2096
  };
2097
- x$b.defaultProps = a$n;
2098
- const a$m = {
2097
+ x$b.defaultProps = a$o;
2098
+ const a$n = {
2099
2099
  className: "",
2100
2100
  style: void 0,
2101
2101
  name: "Close",
@@ -2104,7 +2104,7 @@ Check the top-level render call using <` + t + ">.");
2104
2104
  onClick: () => {
2105
2105
  }
2106
2106
  }, x$a = (h) => {
2107
- const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$m, ...h }, g = (t) => {
2107
+ const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$n, ...h }, g = (t) => {
2108
2108
  r && r(t);
2109
2109
  }, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
2110
2110
  const t = "nut-icon";
@@ -2141,8 +2141,8 @@ Check the top-level render call using <` + t + ">.");
2141
2141
  }
2142
2142
  ) });
2143
2143
  };
2144
- x$a.defaultProps = a$m;
2145
- const a$l = {
2144
+ x$a.defaultProps = a$n;
2145
+ const a$m = {
2146
2146
  className: "",
2147
2147
  style: void 0,
2148
2148
  name: "Del",
@@ -2150,8 +2150,8 @@ Check the top-level render call using <` + t + ">.");
2150
2150
  height: "",
2151
2151
  onClick: () => {
2152
2152
  }
2153
- }, y$6 = (h) => {
2154
- const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$l, ...h }, g = (t) => {
2153
+ }, y$7 = (h) => {
2154
+ const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$m, ...h }, g = (t) => {
2155
2155
  r && r(t);
2156
2156
  }, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
2157
2157
  const t = "nut-icon";
@@ -2188,8 +2188,8 @@ Check the top-level render call using <` + t + ">.");
2188
2188
  }
2189
2189
  ) });
2190
2190
  };
2191
- y$6.defaultProps = a$l;
2192
- const a$k = {
2191
+ y$7.defaultProps = a$m;
2192
+ const a$l = {
2193
2193
  className: "",
2194
2194
  style: void 0,
2195
2195
  name: "DownArrow",
@@ -2198,7 +2198,7 @@ Check the top-level render call using <` + t + ">.");
2198
2198
  onClick: () => {
2199
2199
  }
2200
2200
  }, x$9 = (h) => {
2201
- const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$k, ...h }, f = (t) => {
2201
+ const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$l, ...h }, f = (t) => {
2202
2202
  n && n(t);
2203
2203
  }, c = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
2204
2204
  const t = "nut-icon";
@@ -2235,8 +2235,8 @@ Check the top-level render call using <` + t + ">.");
2235
2235
  }
2236
2236
  ) });
2237
2237
  };
2238
- x$9.defaultProps = a$k;
2239
- const a$j = {
2238
+ x$9.defaultProps = a$l;
2239
+ const a$k = {
2240
2240
  className: "",
2241
2241
  style: void 0,
2242
2242
  name: "Failure",
@@ -2245,7 +2245,7 @@ Check the top-level render call using <` + t + ">.");
2245
2245
  onClick: () => {
2246
2246
  }
2247
2247
  }, x$8 = (h) => {
2248
- const { className: r, style: d, name: e, color: m, width: p, height: f, onClick: l2 } = { ...a$j, ...h }, u = (t) => {
2248
+ const { className: r, style: d, name: e, color: m, width: p, height: f, onClick: l2 } = { ...a$k, ...h }, u = (t) => {
2249
2249
  l2 && l2(t);
2250
2250
  }, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
2251
2251
  const t = "nut-icon";
@@ -2282,8 +2282,8 @@ Check the top-level render call using <` + t + ">.");
2282
2282
  }
2283
2283
  ) });
2284
2284
  };
2285
- x$8.defaultProps = a$j;
2286
- const a$i = {
2285
+ x$8.defaultProps = a$k;
2286
+ const a$j = {
2287
2287
  className: "",
2288
2288
  style: void 0,
2289
2289
  name: "ImageError",
@@ -2292,7 +2292,7 @@ Check the top-level render call using <` + t + ">.");
2292
2292
  onClick: () => {
2293
2293
  }
2294
2294
  }, k$5 = (h) => {
2295
- const { className: s, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$i, ...h }, g = (t) => {
2295
+ const { className: s, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$j, ...h }, g = (t) => {
2296
2296
  o && o(t);
2297
2297
  }, c = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
2298
2298
  const t = "nut-icon";
@@ -2340,8 +2340,8 @@ Check the top-level render call using <` + t + ">.");
2340
2340
  }
2341
2341
  ) });
2342
2342
  };
2343
- k$5.defaultProps = a$i;
2344
- const a$h = {
2343
+ k$5.defaultProps = a$j;
2344
+ const a$i = {
2345
2345
  className: "",
2346
2346
  style: void 0,
2347
2347
  name: "Image",
@@ -2350,7 +2350,7 @@ Check the top-level render call using <` + t + ">.");
2350
2350
  onClick: () => {
2351
2351
  }
2352
2352
  }, k$4 = (h) => {
2353
- const { className: l2, style: d, name: c, color: m, width: p, height: f, onClick: r } = { ...a$h, ...h }, g = (t) => {
2353
+ const { className: l2, style: d, name: c, color: m, width: p, height: f, onClick: r } = { ...a$i, ...h }, g = (t) => {
2354
2354
  r && r(t);
2355
2355
  }, o = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
2356
2356
  const t = "nut-icon";
@@ -2398,8 +2398,8 @@ Check the top-level render call using <` + t + ">.");
2398
2398
  }
2399
2399
  ) });
2400
2400
  };
2401
- k$4.defaultProps = a$h;
2402
- const a$g = {
2401
+ k$4.defaultProps = a$i;
2402
+ const a$h = {
2403
2403
  className: "",
2404
2404
  style: void 0,
2405
2405
  name: "JoySmile",
@@ -2408,7 +2408,7 @@ Check the top-level render call using <` + t + ">.");
2408
2408
  onClick: () => {
2409
2409
  }
2410
2410
  }, x$7 = (h) => {
2411
- const { className: i, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$g, ...h }, g = (t) => {
2411
+ const { className: i, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$h, ...h }, g = (t) => {
2412
2412
  r && r(t);
2413
2413
  }, c = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
2414
2414
  const t = "nut-icon";
@@ -2445,8 +2445,8 @@ Check the top-level render call using <` + t + ">.");
2445
2445
  }
2446
2446
  ) });
2447
2447
  };
2448
- x$7.defaultProps = a$g;
2449
- const a$f = {
2448
+ x$7.defaultProps = a$h;
2449
+ const a$g = {
2450
2450
  className: "",
2451
2451
  style: void 0,
2452
2452
  name: "Left",
@@ -2454,8 +2454,8 @@ Check the top-level render call using <` + t + ">.");
2454
2454
  height: "",
2455
2455
  onClick: () => {
2456
2456
  }
2457
- }, y$5 = (h) => {
2458
- const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: n } = { ...a$f, ...h }, g = (t) => {
2457
+ }, y$6 = (h) => {
2458
+ const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: n } = { ...a$g, ...h }, g = (t) => {
2459
2459
  n && n(t);
2460
2460
  }, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
2461
2461
  const t = "nut-icon";
@@ -2492,8 +2492,8 @@ Check the top-level render call using <` + t + ">.");
2492
2492
  }
2493
2493
  ) });
2494
2494
  };
2495
- y$5.defaultProps = a$f;
2496
- const a$e = {
2495
+ y$6.defaultProps = a$g;
2496
+ const a$f = {
2497
2497
  className: "",
2498
2498
  style: void 0,
2499
2499
  name: "Link",
@@ -2502,7 +2502,7 @@ Check the top-level render call using <` + t + ">.");
2502
2502
  onClick: () => {
2503
2503
  }
2504
2504
  }, x$6 = (h) => {
2505
- const { className: s, style: d, name: c, color: m, width: p, height: f, onClick: n } = { ...a$e, ...h }, g = (t) => {
2505
+ const { className: s, style: d, name: c, color: m, width: p, height: f, onClick: n } = { ...a$f, ...h }, g = (t) => {
2506
2506
  n && n(t);
2507
2507
  }, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", k2 = () => {
2508
2508
  const t = "nut-icon";
@@ -2539,8 +2539,8 @@ Check the top-level render call using <` + t + ">.");
2539
2539
  }
2540
2540
  ) });
2541
2541
  };
2542
- x$6.defaultProps = a$e;
2543
- const a$d = {
2542
+ x$6.defaultProps = a$f;
2543
+ const a$e = {
2544
2544
  className: "",
2545
2545
  style: void 0,
2546
2546
  name: "Loading",
@@ -2549,7 +2549,7 @@ Check the top-level render call using <` + t + ">.");
2549
2549
  onClick: () => {
2550
2550
  }
2551
2551
  }, k$3 = (h) => {
2552
- const { className: l2, style: m, name: t, color: d, width: p, height: g, onClick: o } = { ...a$d, ...h }, f = (c) => {
2552
+ const { className: l2, style: m, name: t, color: d, width: p, height: g, onClick: o } = { ...a$e, ...h }, f = (c) => {
2553
2553
  o && o(c);
2554
2554
  }, n = (c) => c === "" ? "" : isNaN(Number(c)) ? String(c) : c + "px", z = () => {
2555
2555
  const c = "nut-icon";
@@ -2586,8 +2586,8 @@ Check the top-level render call using <` + t + ">.");
2586
2586
  }
2587
2587
  ) });
2588
2588
  };
2589
- k$3.defaultProps = a$d;
2590
- const a$c = {
2589
+ k$3.defaultProps = a$e;
2590
+ const a$d = {
2591
2591
  className: "",
2592
2592
  style: void 0,
2593
2593
  name: "Location2",
@@ -2596,7 +2596,7 @@ Check the top-level render call using <` + t + ">.");
2596
2596
  onClick: () => {
2597
2597
  }
2598
2598
  }, x$5 = (h) => {
2599
- const { className: o, style: m, name: s, color: d, width: p, height: f, onClick: n } = { ...a$c, ...h }, g = (t) => {
2599
+ const { className: o, style: m, name: s, color: d, width: p, height: f, onClick: n } = { ...a$d, ...h }, g = (t) => {
2600
2600
  n && n(t);
2601
2601
  }, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
2602
2602
  const t = "nut-icon";
@@ -2633,8 +2633,8 @@ Check the top-level render call using <` + t + ">.");
2633
2633
  }
2634
2634
  ) });
2635
2635
  };
2636
- x$5.defaultProps = a$c;
2637
- const a$b = {
2636
+ x$5.defaultProps = a$d;
2637
+ const a$c = {
2638
2638
  className: "",
2639
2639
  style: void 0,
2640
2640
  name: "MaskClose",
@@ -2643,7 +2643,7 @@ Check the top-level render call using <` + t + ">.");
2643
2643
  onClick: () => {
2644
2644
  }
2645
2645
  }, x$4 = (h) => {
2646
- const { className: c, style: d, name: s, color: m, width: p, height: f, onClick: l2 } = { ...a$b, ...h }, g = (t) => {
2646
+ const { className: c, style: d, name: s, color: m, width: p, height: f, onClick: l2 } = { ...a$c, ...h }, g = (t) => {
2647
2647
  l2 && l2(t);
2648
2648
  }, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
2649
2649
  const t = "nut-icon";
@@ -2680,8 +2680,8 @@ Check the top-level render call using <` + t + ">.");
2680
2680
  }
2681
2681
  ) });
2682
2682
  };
2683
- x$4.defaultProps = a$b;
2684
- const a$a = {
2683
+ x$4.defaultProps = a$c;
2684
+ const a$b = {
2685
2685
  className: "",
2686
2686
  style: void 0,
2687
2687
  name: "Minus",
@@ -2689,8 +2689,8 @@ Check the top-level render call using <` + t + ">.");
2689
2689
  height: "",
2690
2690
  onClick: () => {
2691
2691
  }
2692
- }, y$4 = (h) => {
2693
- const { className: i, style: d, name: s, color: p, width: m, height: f, onClick: o } = { ...a$a, ...h }, u = (t) => {
2692
+ }, y$5 = (h) => {
2693
+ const { className: i, style: d, name: s, color: p, width: m, height: f, onClick: o } = { ...a$b, ...h }, u = (t) => {
2694
2694
  o && o(t);
2695
2695
  }, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
2696
2696
  const t = "nut-icon";
@@ -2727,8 +2727,8 @@ Check the top-level render call using <` + t + ">.");
2727
2727
  }
2728
2728
  ) });
2729
2729
  };
2730
- y$4.defaultProps = a$a;
2731
- const a$9 = {
2730
+ y$5.defaultProps = a$b;
2731
+ const a$a = {
2732
2732
  className: "",
2733
2733
  style: void 0,
2734
2734
  name: "My",
@@ -2737,7 +2737,7 @@ Check the top-level render call using <` + t + ">.");
2737
2737
  onClick: () => {
2738
2738
  }
2739
2739
  }, k$2 = (h) => {
2740
- const { className: o, style: d, name: s, color: m, width: p, height: f, onClick: r } = { ...a$9, ...h }, g = (t) => {
2740
+ const { className: o, style: d, name: s, color: m, width: p, height: f, onClick: r } = { ...a$a, ...h }, g = (t) => {
2741
2741
  r && r(t);
2742
2742
  }, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
2743
2743
  const t = "nut-icon";
@@ -2774,8 +2774,8 @@ Check the top-level render call using <` + t + ">.");
2774
2774
  }
2775
2775
  ) });
2776
2776
  };
2777
- k$2.defaultProps = a$9;
2778
- const a$8 = {
2777
+ k$2.defaultProps = a$a;
2778
+ const a$9 = {
2779
2779
  className: "",
2780
2780
  style: void 0,
2781
2781
  name: "Notice",
@@ -2784,7 +2784,7 @@ Check the top-level render call using <` + t + ">.");
2784
2784
  onClick: () => {
2785
2785
  }
2786
2786
  }, k$1 = (h) => {
2787
- const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: i } = { ...a$8, ...h }, g = (t) => {
2787
+ const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: i } = { ...a$9, ...h }, g = (t) => {
2788
2788
  i && i(t);
2789
2789
  }, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
2790
2790
  const t = "nut-icon";
@@ -2821,7 +2821,7 @@ Check the top-level render call using <` + t + ">.");
2821
2821
  }
2822
2822
  ) });
2823
2823
  };
2824
- k$1.defaultProps = a$8;
2824
+ k$1.defaultProps = a$9;
2825
2825
  const l = {
2826
2826
  className: "",
2827
2827
  style: void 0,
@@ -2869,7 +2869,7 @@ Check the top-level render call using <` + t + ">.");
2869
2869
  ) });
2870
2870
  };
2871
2871
  x$3.defaultProps = l;
2872
- const a$7 = {
2872
+ const a$8 = {
2873
2873
  className: "",
2874
2874
  style: void 0,
2875
2875
  name: "Plus",
@@ -2877,8 +2877,8 @@ Check the top-level render call using <` + t + ">.");
2877
2877
  height: "",
2878
2878
  onClick: () => {
2879
2879
  }
2880
- }, y$3 = (h) => {
2881
- const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: n } = { ...a$7, ...h }, u = (t) => {
2880
+ }, y$4 = (h) => {
2881
+ const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: n } = { ...a$8, ...h }, u = (t) => {
2882
2882
  n && n(t);
2883
2883
  }, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
2884
2884
  const t = "nut-icon";
@@ -2915,6 +2915,53 @@ Check the top-level render call using <` + t + ">.");
2915
2915
  }
2916
2916
  ) });
2917
2917
  };
2918
+ y$4.defaultProps = a$8;
2919
+ const a$7 = {
2920
+ className: "",
2921
+ style: void 0,
2922
+ name: "RectDown",
2923
+ width: "",
2924
+ height: "",
2925
+ onClick: () => {
2926
+ }
2927
+ }, y$3 = (h) => {
2928
+ const { className: o, style: d, name: e, color: p, width: m, height: f, onClick: n } = { ...a$7, ...h }, g = (t) => {
2929
+ n && n(t);
2930
+ }, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", w = () => {
2931
+ const t = "nut-icon";
2932
+ return classNames({
2933
+ [`${o}`]: o,
2934
+ [t]: true,
2935
+ [t + "-" + e]: e
2936
+ });
2937
+ }, s = {}, i = r(m || ""), l2 = r(f || "");
2938
+ i && (s.width = i), l2 && (s.height = l2);
2939
+ const u = () => ({
2940
+ ...d,
2941
+ ...s
2942
+ });
2943
+ return /* @__PURE__ */ cr(lr, { children: /* @__PURE__ */ cr(
2944
+ "svg",
2945
+ {
2946
+ className: w(),
2947
+ style: u(),
2948
+ onClick: g,
2949
+ xmlns: "http://www.w3.org/2000/svg",
2950
+ color: p,
2951
+ viewBox: "0 0 1024 1024",
2952
+ "aria-labelledby": e,
2953
+ role: "presentation",
2954
+ children: /* @__PURE__ */ cr(
2955
+ "path",
2956
+ {
2957
+ d: "M515.072 778.24c-14.336 0-28.672-5.632-39.936-16.384L69.12 356.864c-22.016-22.016-22.016-57.856 0-79.872s57.856-22.016 79.872 0L515.584 642.56 880.64 275.968c22.016-22.016 57.856-22.016 79.872 0s22.016 57.856 0 79.872L555.008 762.368c-10.752 10.752-25.6 15.872-39.936 15.872z",
2958
+ fill: "currentColor",
2959
+ fillOpacity: "0.9"
2960
+ }
2961
+ )
2962
+ }
2963
+ ) });
2964
+ };
2918
2965
  y$3.defaultProps = a$7;
2919
2966
  const a$6 = {
2920
2967
  className: "",
@@ -3350,7 +3397,7 @@ Check the top-level render call using <` + t + ">.");
3350
3397
  onClick: (event) => {
3351
3398
  }
3352
3399
  };
3353
- const classPrefix$g = "nut-cell";
3400
+ const classPrefix$i = "nut-cell";
3354
3401
  const Cell = (props) => {
3355
3402
  const {
3356
3403
  children,
@@ -3381,24 +3428,24 @@ Check the top-level render call using <` + t + ">.");
3381
3428
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
3382
3429
  "div",
3383
3430
  {
3384
- className: classNames(classPrefix$g, className),
3431
+ className: classNames(classPrefix$i, className),
3385
3432
  onClick: (event) => handleClick2(event),
3386
3433
  style: baseStyle,
3387
3434
  ...rest,
3388
3435
  children: children || /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
3389
- title || description ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix$g}__left`, children: [
3390
- title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$g}__title`, children: title }) : null,
3391
- description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$g}__description`, children: description }) : null
3436
+ title || description ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix$i}__left`, children: [
3437
+ title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$i}__title`, children: title }) : null,
3438
+ description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$i}__description`, children: description }) : null
3392
3439
  ] }) : null,
3393
3440
  extra ? /* @__PURE__ */ jsxRuntimeExports.jsx(
3394
3441
  "div",
3395
3442
  {
3396
- className: `${classPrefix$g}__extra`,
3443
+ className: `${classPrefix$i}__extra`,
3397
3444
  style: styles,
3398
3445
  children: extra
3399
3446
  }
3400
3447
  ) : null,
3401
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$g}__divider` })
3448
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$i}__divider` })
3402
3449
  ] })
3403
3450
  }
3404
3451
  );
@@ -3411,19 +3458,19 @@ Check the top-level render call using <` + t + ">.");
3411
3458
  description: "",
3412
3459
  divider: true
3413
3460
  };
3414
- const classPrefix$f = "nut-cell-group";
3461
+ const classPrefix$h = "nut-cell-group";
3415
3462
  const CellGroup = (props) => {
3416
3463
  const { children, className, style, title, description, divider, ...rest } = {
3417
3464
  ...defaultProps$1q,
3418
3465
  ...props
3419
3466
  };
3420
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classNames(classPrefix$f, className), ...rest, children: [
3421
- title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$f}__title`, children: title }) : null,
3422
- description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$f}__description`, children: description }) : null,
3467
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classNames(classPrefix$h, className), ...rest, children: [
3468
+ title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$h}__title`, children: title }) : null,
3469
+ description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$h}__description`, children: description }) : null,
3423
3470
  /* @__PURE__ */ jsxRuntimeExports.jsx(
3424
3471
  "div",
3425
3472
  {
3426
- className: `${classPrefix$f}__wrap ${divider ? `${classPrefix$f}__wrap--divider` : ""}`,
3473
+ className: `${classPrefix$h}__wrap ${divider ? `${classPrefix$h}__wrap--divider` : ""}`,
3427
3474
  children
3428
3475
  }
3429
3476
  )
@@ -3901,7 +3948,7 @@ Check the top-level render call using <` + t + ">.");
3901
3948
  loading: true,
3902
3949
  lazy: false
3903
3950
  };
3904
- const classPrefix$e = "nut-image";
3951
+ const classPrefix$g = "nut-image";
3905
3952
  const Image$1 = (props) => {
3906
3953
  const {
3907
3954
  className,
@@ -3953,7 +4000,6 @@ Check the top-level render call using <` + t + ">.");
3953
4000
  };
3954
4001
  const observer = React.useRef(null);
3955
4002
  const initObserver = () => {
3956
- const images = document.querySelectorAll(".nut-img.lazyload");
3957
4003
  const options2 = {
3958
4004
  threshold: [0],
3959
4005
  // 交会处
@@ -3969,14 +4015,12 @@ Check the top-level render call using <` + t + ">.");
3969
4015
  img.src = img.dataset.src;
3970
4016
  img.removeAttribute("data-src");
3971
4017
  }
3972
- observer.current.unobserve(item.target);
4018
+ resetObserver();
3973
4019
  }, 300);
3974
4020
  }
3975
4021
  });
3976
4022
  }, options2);
3977
- images.forEach((item) => {
3978
- observer.current.observe(item);
3979
- });
4023
+ observer.current.observe(imgRef.current);
3980
4024
  };
3981
4025
  const resetObserver = () => {
3982
4026
  observer.current.disconnect && observer.current.disconnect();
@@ -4015,7 +4059,7 @@ Check the top-level render call using <` + t + ">.");
4015
4059
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
4016
4060
  "div",
4017
4061
  {
4018
- className: classNames(classPrefix$e, className),
4062
+ className: classNames(classPrefix$g, className),
4019
4063
  style: containerStyle,
4020
4064
  onClick: (e) => {
4021
4065
  imageClick(e);
@@ -4183,21 +4227,21 @@ Check the top-level render call using <` + t + ">.");
4183
4227
  contentPosition: "center",
4184
4228
  direction: "horizontal"
4185
4229
  };
4186
- const classPrefix$d = `nut-divider`;
4230
+ const classPrefix$f = `nut-divider`;
4187
4231
  const Divider = (props) => {
4188
4232
  const { children, contentPosition, style, className, direction, ...rest } = {
4189
4233
  ...defaultProps$1m,
4190
4234
  ...props
4191
4235
  };
4192
4236
  const classes = direction === "horizontal" ? classNames({
4193
- [`${classPrefix$d}`]: true,
4194
- [`${classPrefix$d}__center`]: children,
4195
- [`${classPrefix$d}__left`]: contentPosition === "left",
4196
- [`${classPrefix$d}__right`]: contentPosition === "right",
4197
- [`${classPrefix$d}__hairline`]: true
4237
+ [`${classPrefix$f}`]: true,
4238
+ [`${classPrefix$f}__center`]: children,
4239
+ [`${classPrefix$f}__left`]: contentPosition === "left",
4240
+ [`${classPrefix$f}__right`]: contentPosition === "right",
4241
+ [`${classPrefix$f}__hairline`]: true
4198
4242
  }) : classNames({
4199
- [`${classPrefix$d}`]: true,
4200
- [`${classPrefix$d}__vertical`]: direction === "vertical"
4243
+ [`${classPrefix$f}`]: true,
4244
+ [`${classPrefix$f}__vertical`]: direction === "vertical"
4201
4245
  });
4202
4246
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classes} ${className || ""}`, style, ...rest, children });
4203
4247
  };
@@ -4358,7 +4402,7 @@ Check the top-level render call using <` + t + ">.");
4358
4402
  };
4359
4403
  Layout.defaultProps = defaultProps$1j;
4360
4404
  Layout.displayName = "NutLayout";
4361
- const classPrefix$c = "nut-row";
4405
+ const classPrefix$e = "nut-row";
4362
4406
  const defaultProps$1i = {
4363
4407
  ...ComponentDefaults,
4364
4408
  type: "",
@@ -4393,7 +4437,7 @@ Check the top-level render call using <` + t + ">.");
4393
4437
  ${getClass("justify", justify)}
4394
4438
  ${getClass("align", align)}
4395
4439
  ${getClass("flex", wrap)}
4396
- ${classPrefix$c}
4440
+ ${classPrefix$e}
4397
4441
  `;
4398
4442
  };
4399
4443
  const parentRow = {
@@ -4492,7 +4536,7 @@ Check the top-level render call using <` + t + ">.");
4492
4536
  threshold: 0,
4493
4537
  zIndex: 2e3
4494
4538
  };
4495
- const classPrefix$b = "nut-sticky";
4539
+ const classPrefix$d = "nut-sticky";
4496
4540
  const Sticky = (props) => {
4497
4541
  const {
4498
4542
  position,
@@ -4614,7 +4658,7 @@ Check the top-level render call using <` + t + ">.");
4614
4658
  {
4615
4659
  ref: rootRef,
4616
4660
  style: { ...style, ...rootStyle },
4617
- className: classNames(classPrefix$b, className),
4661
+ className: classNames(classPrefix$d, className),
4618
4662
  ...rest,
4619
4663
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-sticky--box", ref: stickyRef, style: stickyStyle, children })
4620
4664
  }
@@ -9863,7 +9907,8 @@ Please add \`${key}Action\` when creating your handler.`);
9863
9907
  list: [],
9864
9908
  sticky: false,
9865
9909
  spaceHeight: 23,
9866
- titleHeight: 35
9910
+ titleHeight: 35,
9911
+ showKeys: true
9867
9912
  };
9868
9913
  const Elevator = (props) => {
9869
9914
  const {
@@ -9873,6 +9918,7 @@ Please add \`${key}Action\` when creating your handler.`);
9873
9918
  sticky,
9874
9919
  spaceHeight,
9875
9920
  titleHeight,
9921
+ showKeys,
9876
9922
  className,
9877
9923
  style,
9878
9924
  onClickItem,
@@ -10028,39 +10074,41 @@ Please add \`${key}Action\` when creating your handler.`);
10028
10074
  }) })
10029
10075
  }
10030
10076
  ),
10031
- list.length && scrollStart ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10032
- "div",
10033
- {
10034
- className: classNames({
10035
- [`${classPrefix2}__code--current`]: true,
10036
- [`${classPrefix2}__code--current--current`]: true
10037
- }),
10038
- children: list[codeIndex][floorKey]
10039
- }
10040
- ) : null,
10041
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__bars`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
10042
- animated.div,
10043
- {
10044
- className: `${classPrefix2}__bars__inner`,
10045
- ...bind(),
10046
- style: { touchAction: "pan-y" },
10047
- children: list.map((item, index) => {
10048
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
10049
- "div",
10050
- {
10051
- className: classNames({
10052
- [`${classPrefix2}__bars__inner__item`]: true,
10053
- [`${classPrefix2}__bars__inner__item--active`]: item[floorKey] === list[currentIndex][floorKey]
10054
- }),
10055
- "data-index": index,
10056
- onClick: () => handleClickIndex(item[floorKey]),
10057
- children: item[floorKey]
10058
- },
10059
- index
10060
- );
10061
- })
10062
- }
10063
- ) })
10077
+ showKeys ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
10078
+ list.length && scrollStart ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10079
+ "div",
10080
+ {
10081
+ className: classNames({
10082
+ [`${classPrefix2}__code--current`]: true,
10083
+ [`${classPrefix2}__code--current--current`]: true
10084
+ }),
10085
+ children: list[codeIndex][floorKey]
10086
+ }
10087
+ ) : null,
10088
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__bars`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
10089
+ animated.div,
10090
+ {
10091
+ className: `${classPrefix2}__bars__inner`,
10092
+ ...bind(),
10093
+ style: { touchAction: "pan-y" },
10094
+ children: list.map((item, index) => {
10095
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
10096
+ "div",
10097
+ {
10098
+ className: classNames({
10099
+ [`${classPrefix2}__bars__inner__item`]: true,
10100
+ [`${classPrefix2}__bars__inner__item--active`]: item[floorKey] === list[currentIndex][floorKey]
10101
+ }),
10102
+ "data-index": index,
10103
+ onClick: () => handleClickIndex(item[floorKey]),
10104
+ children: item[floorKey]
10105
+ },
10106
+ index
10107
+ );
10108
+ })
10109
+ }
10110
+ ) })
10111
+ ] }) : null
10064
10112
  ] });
10065
10113
  };
10066
10114
  Elevator.defaultProps = defaultProps$1f;
@@ -10146,7 +10194,7 @@ Please add \`${key}Action\` when creating your handler.`);
10146
10194
  );
10147
10195
  }) }) }),
10148
10196
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__btn`, onClick: () => onUpdateValue(), children: content || /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
10149
- /* @__PURE__ */ jsxRuntimeExports.jsx(y$5, { color: "#fff" }),
10197
+ /* @__PURE__ */ jsxRuntimeExports.jsx(y$6, { color: "#fff" }),
10150
10198
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text", children: visible ? activeText || locale.fixednav.activeText : inactiveText || locale.fixednav.inactiveText })
10151
10199
  ] }) })
10152
10200
  ]
@@ -12513,7 +12561,7 @@ Please add \`${key}Action\` when creating your handler.`);
12513
12561
  duration: 300,
12514
12562
  autoHeight: false
12515
12563
  };
12516
- const classPrefix$a = "nut-tabs";
12564
+ const classPrefix$c = "nut-tabs";
12517
12565
  const Tabs = (props) => {
12518
12566
  const {
12519
12567
  activeColor,
@@ -12607,14 +12655,14 @@ Please add \`${key}Action\` when creating your handler.`);
12607
12655
  }
12608
12656
  }, [children]);
12609
12657
  const classes = classNames(
12610
- classPrefix$a,
12611
- `${classPrefix$a}--${direction}`,
12658
+ classPrefix$c,
12659
+ `${classPrefix$c}--${direction}`,
12612
12660
  className
12613
12661
  );
12614
- const classesTitle = classNames(`${classPrefix$a}__titles`, {
12615
- [`${classPrefix$a}__titles--${activeType}`]: activeType,
12616
- [`${classPrefix$a}__titles--scrollable`]: true,
12617
- [`${classPrefix$a}__titles--${align}`]: align
12662
+ const classesTitle = classNames(`${classPrefix$c}__titles`, {
12663
+ [`${classPrefix$c}__titles--${activeType}`]: activeType,
12664
+ [`${classPrefix$c}__titles--scrollable`]: true,
12665
+ [`${classPrefix$c}__titles--${align}`]: align
12618
12666
  });
12619
12667
  const tabsActiveStyle = {
12620
12668
  color: activeType === "smile" ? activeColor : "",
@@ -12645,7 +12693,7 @@ Please add \`${key}Action\` when creating your handler.`);
12645
12693
  onClick: () => {
12646
12694
  tabChange(item);
12647
12695
  },
12648
- className: classNames(`${classPrefix$a}__titles-item`, {
12696
+ className: classNames(`${classPrefix$c}__titles-item`, {
12649
12697
  [`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
12650
12698
  [`nut-tabs__titles-item--disabled`]: item.disabled,
12651
12699
  [`nut-tabs__titles-item--${align}`]: align
@@ -12655,14 +12703,14 @@ Please add \`${key}Action\` when creating your handler.`);
12655
12703
  activeType === "line" && /* @__PURE__ */ jsxRuntimeExports.jsx(
12656
12704
  "div",
12657
12705
  {
12658
- className: `${classPrefix$a}__titles-item__line`,
12706
+ className: `${classPrefix$c}__titles-item__line`,
12659
12707
  style: tabsActiveStyle
12660
12708
  }
12661
12709
  ),
12662
12710
  activeType === "smile" && /* @__PURE__ */ jsxRuntimeExports.jsx(
12663
12711
  "div",
12664
12712
  {
12665
- className: `${classPrefix$a}__titles-item__smile`,
12713
+ className: `${classPrefix$c}__titles-item__smile`,
12666
12714
  style: tabsActiveStyle,
12667
12715
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(x$7, { color: activeColor, width: 40, height: 20 })
12668
12716
  }
@@ -12674,7 +12722,7 @@ Please add \`${key}Action\` when creating your handler.`);
12674
12722
  {
12675
12723
  ellipsis: true
12676
12724
  },
12677
- `${classPrefix$a}__titles-item__text`
12725
+ `${classPrefix$c}__titles-item__text`
12678
12726
  ),
12679
12727
  children: item.title
12680
12728
  }
@@ -12684,7 +12732,7 @@ Please add \`${key}Action\` when creating your handler.`);
12684
12732
  item.value
12685
12733
  );
12686
12734
  }) }),
12687
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$a}__content__wrap`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$a}__content`, style: contentStyle, children: React.Children.map(children, (child, idx) => {
12735
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$c}__content__wrap`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$c}__content`, style: contentStyle, children: React.Children.map(children, (child, idx) => {
12688
12736
  if (!React.isValidElement(child)) {
12689
12737
  return null;
12690
12738
  }
@@ -13320,7 +13368,7 @@ Please add \`${key}Action\` when creating your handler.`);
13320
13368
  };
13321
13369
  const headerRender = () => {
13322
13370
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: b("header"), children: [
13323
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "arrow-back", onClick: onSwitchModule, children: privateType === "custom" && (React.isValidElement(backBtnIcon) ? backBtnIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(y$5, { color: "#cccccc" })) }),
13371
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "arrow-back", onClick: onSwitchModule, children: privateType === "custom" && (React.isValidElement(backBtnIcon) ? backBtnIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(y$6, { color: "#cccccc" })) }),
13324
13372
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b("header__title"), children: privateType === "custom" ? customAddressTitle || locale.address.selectRegion : existAddressTitle || locale.address.deliveryTo }),
13325
13373
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { onClick: () => handClose(), children: React.isValidElement(closeBtnIcon) ? closeBtnIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(x$b, { width: 18, height: 18, color: "#ccc" }) })
13326
13374
  ] });
@@ -14810,7 +14858,7 @@ Please add \`${key}Action\` when creating your handler.`);
14810
14858
  },
14811
14859
  options: []
14812
14860
  };
14813
- const classPrefix$9 = "nut-checkboxgroup";
14861
+ const classPrefix$b = "nut-checkboxgroup";
14814
14862
  const CheckboxGroup = React.forwardRef(
14815
14863
  (props, ref) => {
14816
14864
  const { children } = { ...defaultProps$Z, ...props };
@@ -14891,7 +14939,7 @@ Please add \`${key}Action\` when creating your handler.`);
14891
14939
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
14892
14940
  "div",
14893
14941
  {
14894
- className: classNames(classPrefix$9, {
14942
+ className: classNames(classPrefix$b, {
14895
14943
  [`nut-checkboxgroup--${props.direction}`]: props.direction,
14896
14944
  className
14897
14945
  }),
@@ -14915,7 +14963,7 @@ Please add \`${key}Action\` when creating your handler.`);
14915
14963
  onChange: (value) => {
14916
14964
  }
14917
14965
  };
14918
- const classPrefix$8 = "nut-checkbox";
14966
+ const classPrefix$a = "nut-checkbox";
14919
14967
  const Checkbox = (props) => {
14920
14968
  const { children } = {
14921
14969
  ...defaultProps$Y,
@@ -14977,22 +15025,22 @@ Please add \`${key}Action\` when creating your handler.`);
14977
15025
  };
14978
15026
  const color = () => {
14979
15027
  if (innerDisabled) {
14980
- return `${classPrefix$8}__icon--disable`;
15028
+ return `${classPrefix$a}__icon--disable`;
14981
15029
  }
14982
15030
  if (innerChecked) {
14983
15031
  if (innerIndeterminate) {
14984
- return `${classPrefix$8}__icon--indeterminate`;
15032
+ return `${classPrefix$a}__icon--indeterminate`;
14985
15033
  }
14986
- return `${classPrefix$8}__icon`;
15034
+ return `${classPrefix$a}__icon`;
14987
15035
  }
14988
- return `${classPrefix$8}__icon--unchecked`;
15036
+ return `${classPrefix$a}__icon--unchecked`;
14989
15037
  };
14990
15038
  const renderLabel = () => {
14991
15039
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
14992
15040
  "span",
14993
15041
  {
14994
- className: classNames(`${classPrefix$8}__label `, {
14995
- [`${classPrefix$8}__label--disabled`]: innerDisabled
15042
+ className: classNames(`${classPrefix$a}__label `, {
15043
+ [`${classPrefix$a}__label--disabled`]: innerDisabled
14996
15044
  }),
14997
15045
  children: children || label
14998
15046
  }
@@ -15011,8 +15059,8 @@ Please add \`${key}Action\` when creating your handler.`);
15011
15059
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
15012
15060
  "div",
15013
15061
  {
15014
- className: classNames(classPrefix$8, className, {
15015
- [`${classPrefix$8}--reverse`]: labelPosition === "left"
15062
+ className: classNames(classPrefix$a, className, {
15063
+ [`${classPrefix$a}--reverse`]: labelPosition === "left"
15016
15064
  }),
15017
15065
  ...rest,
15018
15066
  onClick: handleClick2,
@@ -17463,7 +17511,7 @@ Please add \`${key}Action\` when creating your handler.`);
17463
17511
  digits: 0,
17464
17512
  async: false
17465
17513
  };
17466
- const classPrefix$7 = `nut-inputnumber`;
17514
+ const classPrefix$9 = `nut-inputnumber`;
17467
17515
  const InputNumber = (props) => {
17468
17516
  const {
17469
17517
  children,
@@ -17492,7 +17540,7 @@ Please add \`${key}Action\` when creating your handler.`);
17492
17540
  ...props
17493
17541
  };
17494
17542
  const inputRef = React.useRef("");
17495
- let [_checked, setChecked] = usePropsValue({
17543
+ const [_checked, setChecked] = usePropsValue({
17496
17544
  value,
17497
17545
  defaultValue
17498
17546
  });
@@ -17506,8 +17554,8 @@ Please add \`${key}Action\` when creating your handler.`);
17506
17554
  }, []);
17507
17555
  const classes = classNames(
17508
17556
  {
17509
- [`${classPrefix$7}`]: true,
17510
- [`${classPrefix$7}--disabled`]: disabled
17557
+ [`${classPrefix$9}`]: true,
17558
+ [`${classPrefix$9}--disabled`]: disabled
17511
17559
  },
17512
17560
  className
17513
17561
  );
@@ -17653,7 +17701,7 @@ Please add \`${key}Action\` when creating your handler.`);
17653
17701
  };
17654
17702
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes, style: styles, ...restProps, children: [
17655
17703
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-minus", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
17656
- y$4,
17704
+ y$5,
17657
17705
  {
17658
17706
  className: iconMinusClasses,
17659
17707
  onClick: (e) => reduceNumber(e)
@@ -17686,7 +17734,7 @@ Please add \`${key}Action\` when creating your handler.`);
17686
17734
  onFocus: focusValue
17687
17735
  }
17688
17736
  ) }),
17689
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-add", children: /* @__PURE__ */ jsxRuntimeExports.jsx(y$3, { className: iconAddClasses, onClick: (e) => addNumber(e) }) })
17737
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-add", children: /* @__PURE__ */ jsxRuntimeExports.jsx(y$4, { className: iconAddClasses, onClick: (e) => addNumber(e) }) })
17690
17738
  ] });
17691
17739
  };
17692
17740
  InputNumber.defaultProps = defaultProps$S;
@@ -17800,7 +17848,7 @@ Please add \`${key}Action\` when creating your handler.`);
17800
17848
  }),
17801
17849
  children: [
17802
17850
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-menu__title-text", children: finallyTitle() }),
17803
- icon || (direction === "up" ? /* @__PURE__ */ jsxRuntimeExports.jsx(x$g, { className: "nut-menu__title-icon" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(y$8, { className: "nut-menu__title-icon" }))
17851
+ icon || (direction === "up" ? /* @__PURE__ */ jsxRuntimeExports.jsx(x$g, { className: "nut-menu__title-icon" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(y$9, { className: "nut-menu__title-icon" }))
17804
17852
  ]
17805
17853
  }
17806
17854
  )
@@ -18023,15 +18071,11 @@ Please add \`${key}Action\` when creating your handler.`);
18023
18071
  MenuItem.defaultProps = defaultProps$Q;
18024
18072
  MenuItem.displayName = "NutMenuItem";
18025
18073
  const defaultProps$P = {
18026
- confirmText: "",
18027
- title: "",
18074
+ ...ComponentDefaults,
18028
18075
  visible: false,
18029
- overlay: true,
18030
18076
  type: "default",
18031
- customKey: [],
18032
- className: "",
18033
- randomKeys: false,
18034
- popClass: "",
18077
+ custom: [],
18078
+ random: false,
18035
18079
  onClose: () => {
18036
18080
  }
18037
18081
  };
@@ -18041,307 +18085,229 @@ Please add \`${key}Action\` when creating your handler.`);
18041
18085
  title,
18042
18086
  confirmText,
18043
18087
  visible,
18044
- overlay,
18045
18088
  type: type2,
18046
- customKey,
18047
- randomKeys,
18048
- popClass,
18089
+ custom,
18090
+ random,
18049
18091
  style,
18050
18092
  className,
18051
18093
  onChange,
18052
18094
  onDelete,
18053
- onClose
18095
+ onClose,
18096
+ onConfirm,
18097
+ ...rest
18054
18098
  } = props;
18055
- const b = cn("numberkeyboard");
18056
- const [show, setShow] = React.useState(visible);
18057
- const [clickKeyIndex, setClickKeyIndex] = React.useState(void 0);
18058
- const [keysList, setKeysList] = React.useState([]);
18059
- React.useEffect(() => {
18060
- setShow(visible);
18061
- }, [visible]);
18062
- const defaultKey = () => {
18063
- let leftBottomKey = {
18064
- id: "lock",
18065
- type: "lock"
18066
- };
18067
- if (customKey) {
18068
- const customKeys = Array.isArray(customKey) ? customKey : [customKey];
18069
- if (customKeys.length > 0) {
18070
- const newCustomKey = customKeys[0];
18071
- leftBottomKey = {
18072
- id: newCustomKey,
18073
- type: "custom"
18074
- };
18075
- }
18076
- }
18077
- return [
18078
- ...getBasicKeys(),
18079
- leftBottomKey,
18080
- { id: 0, type: "number" },
18081
- { id: "delete", type: "delete" }
18082
- ];
18083
- };
18099
+ const classPrefix2 = "nut-numberkeyboard";
18084
18100
  const getBasicKeys = () => {
18085
- const keys = [];
18086
- for (let i = 1; i <= 9; i++) {
18087
- keys.push({ id: i, type: "number" });
18088
- }
18089
- if (randomKeys) {
18090
- return keys.sort(() => Math.random() > 0.5 ? 1 : -1);
18091
- }
18092
- return keys;
18093
- };
18094
- const genCustomKeys = () => {
18095
- const keys = getBasicKeys();
18096
- if (!customKey)
18097
- return [];
18098
- let customKeys = Array.isArray(customKey) ? customKey : [customKey];
18099
- if (customKeys.length > 2) {
18100
- customKeys = [customKeys[0], customKeys[1]];
18101
- }
18102
- if (customKeys.length === 2 && props.title && props.type !== "rightColumn") {
18103
- customKeys = [customKeys[0]];
18104
- }
18105
- if (customKeys.length === 1) {
18106
- if (props.title && props.type !== "rightColumn") {
18107
- keys.push(
18108
- { id: customKeys[0], type: "custom" },
18109
- { id: 0, type: "number" },
18110
- { id: "delete", type: "delete" }
18111
- );
18112
- } else {
18113
- keys.push(
18114
- { id: 0, type: "number" },
18115
- { id: customKeys[0], type: "custom" }
18116
- );
18117
- }
18118
- } else if (customKeys.length === 2) {
18119
- keys.push(
18120
- { id: customKeys[0], type: "custom" },
18121
- { id: 0, type: "number" },
18122
- { id: customKeys[1], type: "custom" }
18123
- );
18124
- }
18125
- return keys;
18101
+ const keys = new Array(9).fill(0).map((_, index) => {
18102
+ return {
18103
+ id: String(index + 1),
18104
+ type: "num"
18105
+ };
18106
+ });
18107
+ return random ? keys.sort(() => Math.random() > 0.5 ? 1 : -1) : keys;
18126
18108
  };
18127
- React.useEffect(() => {
18128
- if (props.type === "rightColumn" || props.title !== "") {
18129
- setKeysList(genCustomKeys());
18130
- } else {
18131
- setKeysList(defaultKey());
18132
- }
18133
- }, []);
18134
- const onTouchstart = (item, event) => {
18135
- event.stopPropagation();
18136
- setClickKeyIndex(item.id);
18137
- if (item.type === "number" || item.type === "custom") {
18138
- onChange && onChange(item.id);
18139
- }
18140
- if (item.type === "lock") {
18141
- onClose && onClose();
18109
+ const getCustomKeys = () => {
18110
+ const customKeys = [
18111
+ { id: "close", type: "close" },
18112
+ { id: "0", type: "num" },
18113
+ { id: "delete", type: "delete" }
18114
+ ];
18115
+ if (!custom)
18116
+ return customKeys;
18117
+ if (custom.length > 0) {
18118
+ customKeys[0] = { id: custom[0], type: "custom" };
18142
18119
  }
18143
- if (item.type === "delete") {
18144
- onDelete && onDelete();
18120
+ if (custom.length > 1) {
18121
+ customKeys[2] = { id: custom[1], type: "custom" };
18145
18122
  }
18123
+ return customKeys;
18146
18124
  };
18147
- const onTouchMove = (event) => {
18148
- event.stopPropagation();
18125
+ const keysList = React.useMemo(() => {
18126
+ return [...getBasicKeys(), ...getCustomKeys()];
18127
+ }, [type2, random, custom]);
18128
+ const DeleteIcon = () => {
18129
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 1024 1024", width: "36", height: "36", children: [
18130
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
18131
+ "path",
18132
+ {
18133
+ d: "M875.594 186.122H390.803a51.162 51.162 0 0 0-36.18 14.986L79.91 475.821a51.166 51.166 0 0 0 0 72.358l274.714 274.712a51.164 51.164 0 0 0 36.179 14.986h484.791c46.033 0 83.484-37.45 83.484-83.483V269.606c.001-46.033-37.45-83.484-83.483-83.484zm32.32 568.274c0 17.85-14.473 32.318-32.32 32.318H390.803L116.089 512l274.714-274.714h484.791c17.849 0 32.32 14.47 32.32 32.32v484.789z",
18134
+ fill: "currentColor"
18135
+ }
18136
+ ),
18137
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
18138
+ "path",
18139
+ {
18140
+ d: "M753.945 360.214l-121.43 121.429-121.43-121.429s-16.062-8.224-30.356 6.072c-14.295 14.295-6.073 30.357-6.073 30.357l121.43 121.428L486.8 627.357s-8.222 16.062 6.072 30.357c14.297 14.296 30.358 6.072 30.358 6.072l109.286-109.285 109.286 109.285s16.062 8.224 30.357-6.072c14.295-14.295 6.07-30.357 6.07-30.357L668.944 518.072l121.431-121.43s8.22-16.061-6.074-30.356c-14.294-14.296-30.356-6.072-30.356-6.072z",
18141
+ fill: "currentColor"
18142
+ }
18143
+ )
18144
+ ] });
18149
18145
  };
18150
- const onTouchEnd = (event) => {
18151
- event.preventDefault();
18152
- setClickKeyIndex(void 0);
18146
+ const NumberKeyboardKey = (props2) => {
18147
+ const { item } = props2;
18148
+ const [active, setActive] = React.useState(false);
18149
+ const onTouchStart = () => {
18150
+ setActive(true);
18151
+ };
18152
+ const onTouchEnd = (item2) => {
18153
+ setActive(false);
18154
+ if (item2.type === "num" || item2.type === "custom") {
18155
+ onChange && onChange(item2.id);
18156
+ }
18157
+ if (item2.type === "close") {
18158
+ onClose && onClose();
18159
+ }
18160
+ if (item2.type === "delete") {
18161
+ onDelete && onDelete();
18162
+ }
18163
+ if (item2.type === "confirm") {
18164
+ onConfirm && onConfirm();
18165
+ }
18166
+ };
18167
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__body__wrapper`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
18168
+ "div",
18169
+ {
18170
+ className: classNames({
18171
+ key: true,
18172
+ active,
18173
+ close: item.type === "close",
18174
+ delete: item.type === "delete",
18175
+ confirm: item.type === "confirm"
18176
+ }),
18177
+ onTouchStart: () => onTouchStart(),
18178
+ onTouchEnd: () => onTouchEnd(item),
18179
+ onTouchCancel: () => onTouchEnd(item),
18180
+ children: [
18181
+ (item.type === "num" || item.type === "custom") && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: item.id }),
18182
+ item.type === "delete" && /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, {}),
18183
+ item.type === "close" && /* @__PURE__ */ jsxRuntimeExports.jsx(y$3, { width: 25, height: 25 }),
18184
+ item.type === "confirm" && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: confirmText || locale.done })
18185
+ ]
18186
+ }
18187
+ ) }, item.id);
18153
18188
  };
18154
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18189
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
18155
18190
  Popup,
18156
18191
  {
18157
- visible: show,
18192
+ visible,
18158
18193
  position: "bottom",
18159
- className: popClass,
18160
18194
  onClickOverlay: onClose,
18161
- overlay,
18162
18195
  onClickCloseIcon: onClose,
18163
18196
  overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" },
18164
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${b()} ${className}`, style: { ...style }, children: [
18165
- title ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: b("header"), children: [
18166
- /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: b("header__tit"), children: title }),
18167
- type2 === "default" ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: b("header__close"), onClick: onClose, children: locale.done }) : null
18168
- ] }) : null,
18169
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: b("body"), children: [
18170
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b("body__keys"), children: keysList == null ? void 0 : keysList.map((item, index) => {
18171
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
18172
- "div",
18173
- {
18174
- className: classNames({
18175
- "key-board-wrapper": true,
18176
- "key-board-wrapper-large": item.id === 0 && type2 === "rightColumn" && Array.isArray(customKey) && customKey.length === 1
18177
- }),
18178
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
18179
- "div",
18180
- {
18181
- className: classNames({
18182
- key: true,
18183
- active: item.id === clickKeyIndex,
18184
- lock: item.type === "lock",
18185
- delete: item.type === "delete"
18186
- }),
18187
- onTouchStart: (event) => onTouchstart(item, event),
18188
- onTouchMove,
18189
- onTouchEnd,
18190
- children: [
18191
- item.type === "number" || item.type === "custom" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: item.id }) : null,
18192
- item.type === "lock" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
18193
- "img",
18194
- {
18195
- src: "https://img11.360buyimg.com/imagetools/jfs/t1/146371/38/8485/738/5f606425Eca239740/14f4b4f5f20d8a68.png",
18196
- alt: ""
18197
- }
18198
- ) : null,
18199
- item.type === "delete" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
18200
- "img",
18201
- {
18202
- src: "https://img11.360buyimg.com/imagetools/jfs/t1/129395/8/12735/2030/5f61ac37E70cab338/fb477dc11f46056c.png",
18203
- alt: ""
18204
- }
18205
- ) : null
18206
- ]
18207
- }
18208
- )
18209
- },
18210
- index
18211
- );
18197
+ ...rest,
18198
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classNames(classPrefix2, className), style, children: [
18199
+ title && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix2}__header`, children: [
18200
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: `${classPrefix2}__header__title`, children: title }),
18201
+ type2 === "default" && /* @__PURE__ */ jsxRuntimeExports.jsx(
18202
+ "span",
18203
+ {
18204
+ className: `${classPrefix2}__header__close`,
18205
+ onClick: onClose,
18206
+ children: locale.done
18207
+ }
18208
+ )
18209
+ ] }),
18210
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix2}__body`, children: [
18211
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__body__keys`, children: keysList == null ? void 0 : keysList.map((item) => {
18212
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(NumberKeyboardKey, { item }, item.id);
18212
18213
  }) }),
18213
- type2 === "rightColumn" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: b("sidebar"), children: [
18214
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "key-board-wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18215
- "div",
18214
+ type2 === "rightColumn" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix2}__sidebar`, children: [
18215
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
18216
+ NumberKeyboardKey,
18216
18217
  {
18217
- className: classNames({
18218
- key: true,
18219
- active: clickKeyIndex === "delete"
18220
- }),
18221
- onTouchStart: (event) => onTouchstart({ id: "delete", type: "delete" }, event),
18222
- onTouchMove,
18223
- onTouchEnd,
18224
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18225
- "img",
18226
- {
18227
- src: "https://img11.360buyimg.com/imagetools/jfs/t1/129395/8/12735/2030/5f61ac37E70cab338/fb477dc11f46056c.png",
18228
- alt: ""
18229
- }
18230
- )
18231
- }
18232
- ) }),
18218
+ item: {
18219
+ id: "delete",
18220
+ type: "delete"
18221
+ }
18222
+ },
18223
+ "delete"
18224
+ ),
18233
18225
  /* @__PURE__ */ jsxRuntimeExports.jsx(
18234
- "div",
18226
+ NumberKeyboardKey,
18235
18227
  {
18236
- className: "key-board-wrapper key-board-finish",
18237
- onClick: onClose,
18238
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18239
- "div",
18240
- {
18241
- className: classNames({
18242
- key: true,
18243
- finish: true,
18244
- activeFinsh: clickKeyIndex === "finish"
18245
- }),
18246
- children: confirmText || locale.done
18247
- }
18248
- )
18249
- }
18228
+ item: {
18229
+ id: "confirm",
18230
+ type: "confirm"
18231
+ }
18232
+ },
18233
+ "confirm"
18250
18234
  )
18251
- ] }) : null
18235
+ ] })
18252
18236
  ] })
18253
18237
  ] })
18254
18238
  }
18255
- ) });
18239
+ );
18256
18240
  };
18257
18241
  NumberKeyboard.defaultProps = defaultProps$P;
18258
18242
  NumberKeyboard.displayName = "NutNumberKeyboard";
18259
- const radioContext = {
18260
- onChange: (val) => {
18261
- }
18262
- };
18263
- const RadioContext = React.createContext(radioContext);
18243
+ const RadioContext = React.createContext(null);
18264
18244
  const defaultProps$O = {
18265
- value: null,
18266
- textPosition: "right",
18245
+ labelPosition: "right",
18267
18246
  onChange: (value) => {
18268
18247
  },
18269
18248
  direction: "vertical",
18270
18249
  options: []
18271
18250
  };
18251
+ const classPrefix$8 = "nut-radiogroup";
18272
18252
  const RadioGroup = React.forwardRef(
18273
18253
  (props, ref) => {
18274
- const { children } = { ...defaultProps$O, ...props };
18275
- cn("RadioGroup");
18276
18254
  const {
18255
+ children,
18277
18256
  className,
18278
18257
  value,
18258
+ defaultValue,
18279
18259
  onChange,
18280
- textPosition,
18260
+ labelPosition,
18281
18261
  direction,
18282
18262
  options: options2,
18263
+ disabled,
18283
18264
  ...rest
18284
- } = props;
18285
- const [val2State, setVal2State] = React.useState(value);
18286
- React.useEffect(() => {
18287
- setVal2State(value);
18288
- }, [value]);
18289
- function validateChildChecked(child) {
18290
- if (val2State === null)
18291
- return false;
18292
- return val2State === child.props.value;
18293
- }
18294
- function validateChecked(value2) {
18295
- if (val2State === null)
18296
- return false;
18297
- return val2State === value2;
18298
- }
18299
- function cloneChildren() {
18300
- return React.Children.map(children, (child, index) => {
18301
- const childChecked = validateChildChecked(child);
18302
- if (child.type.displayName !== "NutRadio") {
18303
- return React.cloneElement(child);
18304
- }
18305
- return React.cloneElement(child, {
18306
- textPosition,
18307
- checked: childChecked
18308
- // onChange: handleChildChange,
18309
- });
18310
- });
18311
- }
18265
+ } = { ...defaultProps$O, ...props };
18266
+ const [val2State, setVal2State] = usePropsValue({
18267
+ defaultValue: props.defaultValue,
18268
+ value: props.value,
18269
+ finalValue: "",
18270
+ onChange
18271
+ });
18312
18272
  const renderOptionsChildren = React.useCallback(() => {
18313
- return options2 == null ? void 0 : options2.map(({ label, value: value2, disabled, onChange: onChange2, ...rest2 }) => {
18314
- const childChecked = validateChecked(value2);
18315
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
18273
+ return options2 == null ? void 0 : options2.map(({ label, value: value2, disabled: disabled2, onChange: onChange2, ...rest2 }) => {
18274
+ return /* @__PURE__ */ React.createElement(
18316
18275
  Radio,
18317
18276
  {
18277
+ ...rest2,
18278
+ key: value2 == null ? void 0 : value2.toString(),
18318
18279
  children: label,
18319
18280
  value: value2,
18320
- disabled,
18281
+ disabled: disabled2,
18321
18282
  onChange: onChange2,
18322
- ...rest2,
18323
- textPosition,
18324
- checked: childChecked
18325
- },
18326
- value2 == null ? void 0 : value2.toString()
18283
+ labelPosition,
18284
+ checked: value2 === val2State
18285
+ }
18327
18286
  );
18328
18287
  });
18329
- }, [val2State, options2]);
18288
+ }, [options2]);
18330
18289
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
18331
18290
  RadioContext.Provider,
18332
18291
  {
18333
18292
  value: {
18334
- onChange: (val) => {
18335
- setVal2State(val);
18336
- onChange && onChange(val);
18293
+ labelPosition: labelPosition || "right",
18294
+ disabled,
18295
+ value: val2State,
18296
+ check: (value2) => {
18297
+ setVal2State(value2);
18298
+ },
18299
+ uncheck: () => {
18300
+ setVal2State("");
18337
18301
  }
18338
18302
  },
18339
18303
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
18340
18304
  "div",
18341
18305
  {
18342
- className: `nut-radiogroup nut-radiogroup--${props.direction} ${className || ""}`,
18306
+ className: classNames(classPrefix$8, className, {
18307
+ [`${classPrefix$8}--${props.direction}`]: props.direction
18308
+ }),
18343
18309
  ...rest,
18344
- children: (options2 == null ? void 0 : options2.length) ? renderOptionsChildren() : cloneChildren()
18310
+ children: (options2 == null ? void 0 : options2.length) ? renderOptionsChildren() : children
18345
18311
  }
18346
18312
  )
18347
18313
  }
@@ -18352,52 +18318,64 @@ Please add \`${key}Action\` when creating your handler.`);
18352
18318
  RadioGroup.displayName = "NutRadioGroup";
18353
18319
  const defaultProps$N = {
18354
18320
  ...ComponentDefaults,
18355
- className: "",
18356
- style: {},
18357
18321
  disabled: false,
18358
- checked: false,
18359
18322
  shape: "round",
18360
18323
  value: "",
18361
- textPosition: "right",
18362
- icon: "check-normal",
18363
- checkedIcon: "check-checked",
18364
- iconSize: 18,
18365
- onChange: (e) => {
18324
+ labelPosition: "right",
18325
+ icon: null,
18326
+ activeIcon: null,
18327
+ onChange: (checked) => {
18366
18328
  }
18367
18329
  };
18368
18330
  const Radio = (props) => {
18369
- const { children } = {
18370
- ...defaultProps$N,
18371
- ...props
18372
- };
18331
+ const classPrefix2 = "nut-radio";
18373
18332
  const {
18333
+ children,
18374
18334
  className,
18375
- disabled,
18335
+ style,
18376
18336
  checked,
18337
+ defaultChecked,
18377
18338
  shape,
18378
- textPosition,
18379
18339
  value,
18380
18340
  icon,
18381
- checkedIcon,
18382
- iconSize,
18341
+ activeIcon,
18383
18342
  onChange,
18384
- ...rest
18385
- } = props;
18386
- const componentName = "nut-radio";
18387
- const [checkedStatement, setCheckedStatement] = React.useState(checked);
18388
- const [valueStatement, setValueStatement] = React.useState(value);
18389
- const [disabledStatement, setDisabledStatement] = React.useState(disabled);
18343
+ ...others
18344
+ } = {
18345
+ ...defaultProps$N,
18346
+ ...props
18347
+ };
18348
+ let { labelPosition, disabled, ...rest } = others;
18349
+ let [checkedStatement, setCheckedStatement] = usePropsValue({
18350
+ value: checked,
18351
+ defaultValue: defaultChecked,
18352
+ finalValue: false,
18353
+ onChange
18354
+ });
18390
18355
  const context = React.useContext(RadioContext);
18391
- React.useEffect(() => {
18392
- setDisabledStatement(disabled);
18393
- setValueStatement(value);
18394
- setCheckedStatement(checked);
18395
- }, [disabled, value, checked]);
18356
+ if (context) {
18357
+ checkedStatement = context.value === value;
18358
+ if (context.labelPosition !== void 0) {
18359
+ labelPosition = context.labelPosition;
18360
+ }
18361
+ if (context.disabled !== void 0) {
18362
+ disabled = context.disabled;
18363
+ }
18364
+ setCheckedStatement = (value2) => {
18365
+ if (value2) {
18366
+ context.check(props.value === void 0 ? "" : props.value);
18367
+ } else {
18368
+ context.uncheck();
18369
+ }
18370
+ };
18371
+ }
18396
18372
  const renderLabel = () => {
18397
18373
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
18398
18374
  "div",
18399
18375
  {
18400
- className: `${componentName}__label ${disabledStatement ? `${componentName}__label--disabled` : ""}`,
18376
+ className: classNames(`${classPrefix2}__label`, {
18377
+ [`${classPrefix2}__label--disabled`]: disabled
18378
+ }),
18401
18379
  children
18402
18380
  }
18403
18381
  );
@@ -18406,40 +18384,40 @@ Please add \`${key}Action\` when creating your handler.`);
18406
18384
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
18407
18385
  "div",
18408
18386
  {
18409
- className: `${componentName}__button ${!disabledStatement && checkedStatement && `${componentName}__button--active`} ${disabledStatement ? `${componentName}__button--disabled` : ""}`,
18387
+ className: classNames(`${classPrefix2}__button`, {
18388
+ [`${classPrefix2}__button--active`]: checkedStatement,
18389
+ [`${classPrefix2}__button--disabled`]: disabled
18390
+ }),
18410
18391
  children
18411
18392
  }
18412
18393
  );
18413
18394
  };
18414
18395
  const color = () => {
18415
- if (disabledStatement) {
18416
- return "nut-radio__icon--disable";
18417
- }
18418
- if (checkedStatement) {
18419
- return "nut-radio__icon";
18420
- }
18421
- return "nut-radio__icon--unchecked";
18396
+ return {
18397
+ [`${classPrefix2}__icon--disable`]: disabled,
18398
+ [`${classPrefix2}__icon`]: checkedStatement,
18399
+ [`${classPrefix2}__icon--unchecked`]: !checkedStatement
18400
+ };
18422
18401
  };
18423
18402
  const renderIcon = () => {
18424
- const { icon: icon2, iconSize: iconSize2, checkedIcon: checkedIcon2 } = props;
18425
- if (!disabledStatement && checkedStatement) {
18426
- return React.isValidElement(checkedIcon2) ? React.cloneElement(checkedIcon2, {
18427
- ...checkedIcon2.props,
18428
- className: color()
18429
- }) : /* @__PURE__ */ jsxRuntimeExports.jsx(y$7, { width: iconSize2, height: iconSize2, className: color() });
18403
+ const { icon: icon2, activeIcon: activeIcon2 } = props;
18404
+ if (checkedStatement) {
18405
+ return React.isValidElement(activeIcon2) ? React.cloneElement(activeIcon2, {
18406
+ ...activeIcon2.props,
18407
+ className: classNames(color())
18408
+ }) : /* @__PURE__ */ jsxRuntimeExports.jsx(y$8, { className: classNames(color()) });
18430
18409
  }
18431
18410
  return React.isValidElement(icon2) ? React.cloneElement(icon2, {
18432
18411
  ...icon2.props,
18433
- size: iconSize2,
18434
- className: color()
18435
- }) : /* @__PURE__ */ jsxRuntimeExports.jsx(N, { width: iconSize2, height: iconSize2, className: color() });
18412
+ className: classNames(color())
18413
+ }) : /* @__PURE__ */ jsxRuntimeExports.jsx(N, { className: classNames(color()) });
18436
18414
  };
18437
- const reverseState = textPosition === "left";
18415
+ const reverse = labelPosition === "left";
18438
18416
  const renderRadioItem = () => {
18439
18417
  if (shape === "button") {
18440
18418
  return renderButton();
18441
18419
  }
18442
- if (reverseState) {
18420
+ if (reverse) {
18443
18421
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
18444
18422
  renderLabel(),
18445
18423
  renderIcon()
@@ -18451,16 +18429,15 @@ Please add \`${key}Action\` when creating your handler.`);
18451
18429
  ] });
18452
18430
  };
18453
18431
  const handleClick2 = (e) => {
18454
- if (disabledStatement || checkedStatement)
18432
+ if (disabled || checkedStatement)
18455
18433
  return;
18456
18434
  setCheckedStatement(!checkedStatement);
18457
- onChange && onChange(e);
18458
- context && context.onChange(valueStatement);
18459
18435
  };
18460
18436
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
18461
18437
  "div",
18462
18438
  {
18463
- className: `nut-radio ${className} ${reverseState ? `${componentName}--reverse` : ""}`,
18439
+ className: `${classPrefix2} ${className} ${reverse ? `${classPrefix2}--reverse` : ""}`,
18440
+ style,
18464
18441
  onClick: handleClick2,
18465
18442
  ...rest,
18466
18443
  children: renderRadioItem()
@@ -18469,7 +18446,7 @@ Please add \`${key}Action\` when creating your handler.`);
18469
18446
  };
18470
18447
  Radio.defaultProps = defaultProps$N;
18471
18448
  Radio.displayName = "NutRadio";
18472
- Radio.RadioGroup = RadioGroup;
18449
+ Radio.Group = RadioGroup;
18473
18450
  const defaultProps$M = {
18474
18451
  ...ComponentDefaults,
18475
18452
  range: false,
@@ -20129,7 +20106,7 @@ Please add \`${key}Action\` when creating your handler.`);
20129
20106
  }
20130
20107
  ),
20131
20108
  deletable && /* @__PURE__ */ jsxRuntimeExports.jsx(
20132
- y$6,
20109
+ y$7,
20133
20110
  {
20134
20111
  color: "#808080",
20135
20112
  className: "nut-uploader__preview-img__file__del",
@@ -20701,7 +20678,7 @@ Please add \`${key}Action\` when creating your handler.`);
20701
20678
  imageSize: "",
20702
20679
  status: "empty"
20703
20680
  };
20704
- const classPrefix$6 = `nut-empty`;
20681
+ const classPrefix$7 = `nut-empty`;
20705
20682
  const Empty = (props) => {
20706
20683
  const { locale } = useConfig();
20707
20684
  const {
@@ -20736,9 +20713,9 @@ Please add \`${key}Action\` when creating your handler.`);
20736
20713
  };
20737
20714
  });
20738
20715
  }, [imageSize]);
20739
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$6} ${className}`, ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
20740
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$6}__image`, style: imgStyle, children: imageNode }),
20741
- typeof description === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$6}__description`, children: description || locale.noData }) : description,
20716
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$7} ${className}`, ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
20717
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$7}__image`, style: imgStyle, children: imageNode }),
20718
+ typeof description === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$7}__description`, children: description || locale.noData }) : description,
20742
20719
  children
20743
20720
  ] }) });
20744
20721
  };
@@ -21370,6 +21347,7 @@ Please add \`${key}Action\` when creating your handler.`);
21370
21347
  };
21371
21348
  NoticeBar.defaultProps = defaultProps$y;
21372
21349
  NoticeBar.displayName = "NutNoticeBar";
21350
+ const classPrefix$6 = "nut-notify";
21373
21351
  let Notification$1 = (_a = class extends React__namespace.PureComponent {
21374
21352
  constructor(props) {
21375
21353
  super(props);
@@ -21391,7 +21369,7 @@ Please add \`${key}Action\` when creating your handler.`);
21391
21369
  const element = document.getElementById(this.props.id);
21392
21370
  element && element.parentNode && element.parentNode.removeChild(element);
21393
21371
  }
21394
- this.props.onClosed();
21372
+ this.props.onClose();
21395
21373
  }
21396
21374
  startCloseTimer() {
21397
21375
  const { duration } = this.props;
@@ -21417,45 +21395,30 @@ Please add \`${key}Action\` when creating your handler.`);
21417
21395
  this.clearCloseTimer();
21418
21396
  }
21419
21397
  render() {
21420
- const {
21421
- children,
21422
- style,
21423
- msg,
21424
- color,
21425
- background,
21426
- type: type2,
21427
- className,
21428
- position,
21429
- isWrapTeleport
21430
- } = this.props;
21431
- this.state;
21432
- cn("notify");
21398
+ const { style, message, type: type2, className, position } = this.props;
21399
+ const { show } = this.state;
21433
21400
  const classes = classNames({
21434
- "nut-notify--popup-top": position === "top",
21435
- "nut-notify--popup-bottom": position === "bottom",
21436
- "nut-notify": true,
21437
- [`nut-notify--${type2}`]: true
21401
+ [`${classPrefix$6}--popup-top`]: position === "top",
21402
+ [`${classPrefix$6}--popup-bottom`]: position === "bottom",
21403
+ [`${classPrefix$6}`]: true,
21404
+ [`${classPrefix$6}--${type2}`]: true
21438
21405
  });
21439
21406
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
21440
21407
  CSSTransition$1,
21441
21408
  {
21442
- in: this.state.show,
21409
+ in: show,
21443
21410
  timeout: 300,
21444
21411
  classNames: "fade",
21445
21412
  unmountOnExit: true,
21446
21413
  appear: true,
21447
21414
  position,
21448
- isWrapTeleport,
21449
21415
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
21450
21416
  "div",
21451
21417
  {
21452
21418
  className: `${classes} ${className}`,
21453
- style: {
21454
- color: `${color || ""}`,
21455
- background: `${background || ""}`
21456
- },
21419
+ style,
21457
21420
  onClick: this.clickCover,
21458
- children: children || msg
21421
+ children: message
21459
21422
  }
21460
21423
  )
21461
21424
  }
@@ -21478,7 +21441,7 @@ Please add \`${key}Action\` when creating your handler.`);
21478
21441
  component: instance,
21479
21442
  destroy() {
21480
21443
  setTimeout(() => {
21481
- ReactDOM__namespace.unmountComponentAtNode(element);
21444
+ unmount(element);
21482
21445
  element && element.parentNode && element.parentNode.removeChild(element);
21483
21446
  }, 300);
21484
21447
  }
@@ -21488,15 +21451,13 @@ Please add \`${key}Action\` when creating your handler.`);
21488
21451
  };
21489
21452
  let messageInstance$1 = null;
21490
21453
  const options$1 = {
21491
- msg: "",
21454
+ ...ComponentDefaults,
21492
21455
  id: "",
21493
21456
  duration: 3e3,
21494
21457
  // 时长
21495
- color: "",
21496
21458
  type: "danger",
21497
- className: "",
21498
21459
  position: "top",
21499
- onClosed: () => {
21460
+ onClose: () => {
21500
21461
  },
21501
21462
  onClick: () => {
21502
21463
  }
@@ -21516,31 +21477,31 @@ Please add \`${key}Action\` when creating your handler.`);
21516
21477
  messageInstance$1 = notification;
21517
21478
  });
21518
21479
  }
21519
- const errorMsg$1 = (msg) => {
21520
- if (!msg) {
21521
- console.warn("[NutUI Notify]: msg不能为空");
21480
+ const errorMsg$1 = (message) => {
21481
+ if (!message) {
21482
+ console.warn("[NutUI Notify]: message不能为空");
21522
21483
  }
21523
21484
  };
21524
21485
  const Notify = {
21525
- text(msg, option = {}) {
21526
- errorMsg$1(msg);
21527
- return notice$1({ msg, type: "base", ...option });
21486
+ text(message, option = {}) {
21487
+ errorMsg$1(message);
21488
+ return notice$1({ message, type: "base", ...option });
21528
21489
  },
21529
- success(msg, option = {}) {
21530
- errorMsg$1(msg);
21531
- return notice$1({ msg, type: "success", ...option });
21490
+ success(message, option = {}) {
21491
+ errorMsg$1(message);
21492
+ return notice$1({ message, type: "success", ...option });
21532
21493
  },
21533
- primary(msg, option = {}) {
21534
- errorMsg$1(msg);
21535
- return notice$1({ msg, type: "primary", ...option });
21494
+ primary(message, option = {}) {
21495
+ errorMsg$1(message);
21496
+ return notice$1({ message, type: "primary", ...option });
21536
21497
  },
21537
- danger(msg, option = {}) {
21538
- errorMsg$1(msg);
21539
- return notice$1({ msg, type: "danger", ...option });
21498
+ danger(message, option = {}) {
21499
+ errorMsg$1(message);
21500
+ return notice$1({ message, type: "danger", ...option });
21540
21501
  },
21541
- warn(msg, option = {}) {
21542
- errorMsg$1(msg);
21543
- return notice$1({ msg, type: "warning", ...option });
21502
+ warn(message, option = {}) {
21503
+ errorMsg$1(message);
21504
+ return notice$1({ message, type: "warning", ...option });
21544
21505
  },
21545
21506
  hide() {
21546
21507
  if (messageInstance$1) {
@@ -21759,8 +21720,7 @@ Please add \`${key}Action\` when creating your handler.`);
21759
21720
  }
21760
21721
  }
21761
21722
  const defaultProps$w = {
21762
- className: "",
21763
- style: {},
21723
+ ...ComponentDefaults,
21764
21724
  pullingText: "",
21765
21725
  canReleaseText: "",
21766
21726
  refreshingText: "",
@@ -21773,6 +21733,7 @@ Please add \`${key}Action\` when creating your handler.`);
21773
21733
  }
21774
21734
  };
21775
21735
  const PullToRefresh = (p) => {
21736
+ const classPrefix2 = "nut-pulltorefresh";
21776
21737
  const { locale } = useConfig();
21777
21738
  const props = {
21778
21739
  ...defaultProps$w,
@@ -21904,18 +21865,18 @@ Please add \`${key}Action\` when creating your handler.`);
21904
21865
  animated.div,
21905
21866
  {
21906
21867
  ref: elementRef,
21907
- className: `nut-pulltorefresh ${props.className}`,
21868
+ className: `${classPrefix2} ${props.className}`,
21908
21869
  style: props.style,
21909
21870
  children: [
21910
- /* @__PURE__ */ jsxRuntimeExports.jsx(animated.div, { style: springStyles, className: "nut-pulltorefresh-head", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
21871
+ /* @__PURE__ */ jsxRuntimeExports.jsx(animated.div, { style: springStyles, className: `${classPrefix2}-head`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
21911
21872
  "div",
21912
21873
  {
21913
- className: "nut-pulltorefresh-head-content",
21874
+ className: `${classPrefix2}-head-content`,
21914
21875
  style: { height: headHeight },
21915
21876
  children: renderStatusText()
21916
21877
  }
21917
21878
  ) }),
21918
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-pulltorefresh-content", children: props.children })
21879
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}-content`, children: props.children })
21919
21880
  ]
21920
21881
  }
21921
21882
  );
@@ -22662,7 +22623,7 @@ Please add \`${key}Action\` when creating your handler.`);
22662
22623
  ...ComponentDefaults,
22663
22624
  src: "",
22664
22625
  muted: false,
22665
- autoplay: false,
22626
+ autoPlay: false,
22666
22627
  loop: false,
22667
22628
  preload: "auto",
22668
22629
  type: "progress",
@@ -22688,7 +22649,7 @@ Please add \`${key}Action\` when creating your handler.`);
22688
22649
  src,
22689
22650
  style,
22690
22651
  muted,
22691
- autoplay,
22652
+ autoPlay,
22692
22653
  loop: loop2,
22693
22654
  preload,
22694
22655
  type: type2,
@@ -22716,7 +22677,7 @@ Please add \`${key}Action\` when creating your handler.`);
22716
22677
  duration: "00:00:00",
22717
22678
  second: 0,
22718
22679
  hanMuted: props.muted,
22719
- playing: props.autoplay,
22680
+ playing: props.autoPlay,
22720
22681
  handPlaying: false
22721
22682
  });
22722
22683
  const classPrefix2 = "nut-audio";
@@ -22882,7 +22843,7 @@ Please add \`${key}Action\` when creating your handler.`);
22882
22843
  };
22883
22844
  const handleCanplay = (e) => {
22884
22845
  setIsCanPlay(true);
22885
- if (props.autoplay && !playing) {
22846
+ if (props.autoPlay && !playing) {
22886
22847
  AudioRef && AudioRef.current && AudioRef.current.play();
22887
22848
  }
22888
22849
  if (AudioRef.current) {
@@ -23718,45 +23679,73 @@ Please add \`${key}Action\` when creating your handler.`);
23718
23679
  Video.displayName = "NutVideo";
23719
23680
  const DataContext$1 = React.createContext({});
23720
23681
  const defaultProps$h = {
23682
+ total: 3,
23683
+ current: 0,
23684
+ direction: "horizontal"
23685
+ };
23686
+ const classPrefix = `nut-indicator`;
23687
+ const Indicator = (props) => {
23688
+ const { total, current, children, className, direction, ...rest } = {
23689
+ ...defaultProps$h,
23690
+ ...props
23691
+ };
23692
+ const classes = classNames({
23693
+ [`${classPrefix}__vertical`]: direction === "vertical"
23694
+ });
23695
+ const renderElement = () => {
23696
+ const childs = [];
23697
+ for (let item = 0; item < total; item++) {
23698
+ childs.push(
23699
+ item === current ? children || /* @__PURE__ */ jsxRuntimeExports.jsx(
23700
+ "div",
23701
+ {
23702
+ className: `${classPrefix}__dot ${classPrefix}__active`
23703
+ },
23704
+ item
23705
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix}__dot` }, item)
23706
+ );
23707
+ }
23708
+ return childs;
23709
+ };
23710
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classNames(classes, className), ...rest, children: renderElement() });
23711
+ };
23712
+ Indicator.defaultProps = defaultProps$h;
23713
+ Indicator.displayName = "NutIndicator";
23714
+ const defaultProps$g = {
23721
23715
  width: typeof window === "object" ? window.innerWidth : 375,
23722
23716
  height: 0,
23723
23717
  duration: 500,
23724
- initPage: 0,
23718
+ defaultValue: 0,
23725
23719
  autoPlay: 0,
23726
23720
  direction: "horizontal",
23727
- paginationColor: "#fff",
23728
- paginationBgColor: "#ddd",
23729
- paginationVisible: false,
23721
+ indicator: false,
23730
23722
  loop: true,
23731
23723
  touchable: true,
23732
- isPreventDefault: true,
23733
- isStopPropagation: true,
23734
- isCenter: false,
23724
+ preventDefault: true,
23725
+ stopPropagation: true,
23726
+ center: false,
23735
23727
  className: ""
23736
23728
  };
23737
23729
  const DISTANCE = 5;
23738
23730
  const Swiper = React.forwardRef((props, ref) => {
23739
- const propSwiper = { ...defaultProps$h, ...props };
23731
+ const propSwiper = { ...defaultProps$g, ...props };
23740
23732
  const {
23741
23733
  children,
23742
23734
  direction,
23743
23735
  className,
23744
- pageContent,
23745
23736
  onChange,
23746
- initPage,
23747
- paginationColor,
23748
- paginationVisible,
23737
+ defaultValue,
23738
+ indicator,
23749
23739
  touchable,
23750
- isPreventDefault,
23751
- isStopPropagation,
23740
+ preventDefault: preventDefault2,
23741
+ stopPropagation,
23752
23742
  autoPlay,
23753
- isCenter,
23754
- paginationBgColor,
23743
+ center,
23755
23744
  ...rest
23756
23745
  } = propSwiper;
23757
23746
  const container = React.useRef(null);
23758
23747
  const innerRef = React.useRef(null);
23759
- const _swiper = React.useRef({
23748
+ const swiperRef = React.useRef({
23760
23749
  moving: false,
23761
23750
  autoplayTimer: null,
23762
23751
  width: 0,
@@ -23773,7 +23762,7 @@ Please add \`${key}Action\` when creating your handler.`);
23773
23762
  const [childOffset, setChildOffset] = React.useState([]);
23774
23763
  const [ready, setReady] = React.useState(false);
23775
23764
  let size = isVertical ? height : width;
23776
- const [touch, setTouch] = React.useState({
23765
+ const [touch] = React.useState({
23777
23766
  startX: 0,
23778
23767
  startY: 0,
23779
23768
  deltaX: 0,
@@ -23810,20 +23799,20 @@ Please add \`${key}Action\` when creating your handler.`);
23810
23799
  return 0;
23811
23800
  })();
23812
23801
  const stopAutoPlay = () => {
23813
- clearTimeout(_swiper.current.autoplayTimer);
23814
- _swiper.current.autoplayTimer = null;
23802
+ clearTimeout(swiperRef.current.autoplayTimer);
23803
+ swiperRef.current.autoplayTimer = null;
23815
23804
  };
23816
- const autoplay = () => {
23805
+ const startPlay = () => {
23817
23806
  if (propSwiper.autoPlay <= 0 || childCount <= 1)
23818
23807
  return;
23819
23808
  stopAutoPlay();
23820
- _swiper.current.autoplayTimer = setTimeout(() => {
23809
+ swiperRef.current.autoplayTimer = setTimeout(() => {
23821
23810
  next();
23822
- autoplay();
23811
+ startPlay();
23823
23812
  }, Number(propSwiper.autoPlay));
23824
23813
  };
23825
- const resettPosition = () => {
23826
- _swiper.current.moving = true;
23814
+ const resetPosition = () => {
23815
+ swiperRef.current.moving = true;
23827
23816
  if (active <= -1) {
23828
23817
  move({ pace: childCount });
23829
23818
  }
@@ -23832,47 +23821,41 @@ Please add \`${key}Action\` when creating your handler.`);
23832
23821
  }
23833
23822
  };
23834
23823
  const prev = () => {
23835
- resettPosition();
23836
- touchReset();
23824
+ resetPosition();
23825
+ resetTouchDetails();
23837
23826
  requestFrame(() => {
23838
- requestFrame(() => {
23839
- _swiper.current.moving = false;
23840
- move({
23841
- pace: -1,
23842
- isEmit: true
23843
- });
23827
+ swiperRef.current.moving = false;
23828
+ move({
23829
+ pace: -1,
23830
+ isEmit: true
23844
23831
  });
23845
23832
  });
23846
23833
  };
23847
23834
  const next = () => {
23848
- resettPosition();
23849
- touchReset();
23835
+ resetPosition();
23836
+ resetTouchDetails();
23850
23837
  requestFrame(() => {
23851
- requestFrame(() => {
23852
- _swiper.current.moving = false;
23853
- move({
23854
- pace: 1,
23855
- isEmit: true
23856
- });
23838
+ swiperRef.current.moving = false;
23839
+ move({
23840
+ pace: 1,
23841
+ isEmit: true
23857
23842
  });
23858
23843
  });
23859
23844
  };
23860
23845
  const to2 = (index) => {
23861
- resettPosition();
23862
- touchReset();
23846
+ resetPosition();
23847
+ resetTouchDetails();
23863
23848
  requestFrame(() => {
23864
- requestFrame(() => {
23865
- _swiper.current.moving = false;
23866
- let targetIndex;
23867
- if (props.loop && childCount === index) {
23868
- targetIndex = active === 0 ? 0 : index;
23869
- } else {
23870
- targetIndex = index % childCount;
23871
- }
23872
- move({
23873
- pace: targetIndex - active,
23874
- isEmit: true
23875
- });
23849
+ swiperRef.current.moving = false;
23850
+ let targetIndex;
23851
+ if (props.loop && childCount === index) {
23852
+ targetIndex = active === 0 ? 0 : index;
23853
+ } else {
23854
+ targetIndex = index % childCount;
23855
+ }
23856
+ move({
23857
+ pace: targetIndex - active,
23858
+ isEmit: true
23876
23859
  });
23877
23860
  });
23878
23861
  };
@@ -23942,7 +23925,7 @@ Please add \`${key}Action\` when creating your handler.`);
23942
23925
  return "vertical";
23943
23926
  return "";
23944
23927
  };
23945
- const touchReset = () => {
23928
+ const resetTouchDetails = () => {
23946
23929
  touch.startX = 0;
23947
23930
  touch.startY = 0;
23948
23931
  touch.deltaX = 0;
@@ -23954,11 +23937,11 @@ Please add \`${key}Action\` when creating your handler.`);
23954
23937
  touch.touchTime = 0;
23955
23938
  };
23956
23939
  const touchStart = (e) => {
23957
- touchReset();
23940
+ resetTouchDetails();
23958
23941
  touch.startX = e.touches[0].clientX;
23959
23942
  touch.startY = e.touches[0].clientY;
23960
23943
  };
23961
- const touchMove = (e) => {
23944
+ const handleTouchMove = (e) => {
23962
23945
  touch.deltaX = e.touches[0].clientX - touch.startX;
23963
23946
  touch.deltaY = e.touches[0].clientY - touch.startY;
23964
23947
  touch.offsetX = Math.abs(touch.deltaX);
@@ -23968,42 +23951,41 @@ Please add \`${key}Action\` when creating your handler.`);
23968
23951
  touch.stateDirection = getDirection2(touch.offsetX, touch.offsetY);
23969
23952
  }
23970
23953
  };
23971
- const b = cn("swiper");
23972
- const classes = classNames(b(""));
23954
+ const classPrefix2 = "nut-swiper";
23973
23955
  const contentClass = classNames({
23974
- [`${b("inner")}`]: true,
23975
- [`${b("vertical")}`]: isVertical
23956
+ [`${classPrefix2}__inner`]: true,
23957
+ [`${classPrefix2}__vertical`]: isVertical
23976
23958
  });
23977
23959
  const getStyle = (moveOffset = offset) => {
23978
23960
  const target = innerRef.current;
23979
23961
  let _offset = 0;
23980
- if (!isCenter) {
23962
+ if (!center) {
23981
23963
  _offset = moveOffset;
23982
23964
  } else {
23983
23965
  const _size = isVertical ? height : width;
23984
23966
  const val = isVertical ? rect.height - _size : rect.width - _size;
23985
23967
  _offset = moveOffset + (active === childCount - 1 && !props.loop ? -val / 2 : val / 2);
23986
23968
  }
23987
- target.style.transitionDuration = `${_swiper.current.moving ? 0 : props.duration}ms`;
23969
+ target.style.transitionDuration = `${swiperRef.current.moving ? 0 : props.duration}ms`;
23988
23970
  target.style[isVertical ? "height" : "width"] = `${Number(size) * childCount}px`;
23989
23971
  target.style[isVertical ? "width" : "height"] = `${isVertical ? width : height}px`;
23990
23972
  target.style.transform = `translate3D${!isVertical ? `(${_offset}px,0,0)` : `(0,${_offset}px,0)`}`;
23991
23973
  };
23992
23974
  const onTouchStart = (e) => {
23993
- if (props.isPreventDefault)
23975
+ if (props.preventDefault)
23994
23976
  e.preventDefault();
23995
- if (props.isStopPropagation)
23977
+ if (props.stopPropagation)
23996
23978
  e.stopPropagation();
23997
23979
  if (!props.touchable)
23998
23980
  return;
23999
23981
  touchStart(e);
24000
23982
  touch.touchTime = Date.now();
24001
23983
  stopAutoPlay();
24002
- resettPosition();
23984
+ resetPosition();
24003
23985
  };
24004
23986
  const onTouchMove = (e) => {
24005
- if (props.touchable && _swiper.current.moving) {
24006
- touchMove(e);
23987
+ if (props.touchable && swiperRef.current.moving) {
23988
+ handleTouchMove(e);
24007
23989
  if (touch.stateDirection === props.direction) {
24008
23990
  move({
24009
23991
  offset: touch.delta
@@ -24012,12 +23994,12 @@ Please add \`${key}Action\` when creating your handler.`);
24012
23994
  }
24013
23995
  };
24014
23996
  const onTouchEnd = (e) => {
24015
- if (!props.touchable || !_swiper.current.moving)
23997
+ if (!props.touchable || !swiperRef.current.moving)
24016
23998
  return;
24017
23999
  const speed = touch.delta / (Date.now() - touch.touchTime);
24018
- const isShouldMove = Math.abs(speed) > 0.3 || Math.abs(touch.delta) > +(size / 2).toFixed(2);
24000
+ const isShouldMove = Math.abs(speed) > 0.3 || Math.abs(touch.delta) > Number((size / 2).toFixed(2));
24019
24001
  let pace = 0;
24020
- _swiper.current.moving = false;
24002
+ swiperRef.current.moving = false;
24021
24003
  if (isShouldMove && touch.stateDirection === props.direction) {
24022
24004
  const offset2 = isVertical ? touch.offsetY : touch.offsetX;
24023
24005
  if (props.loop) {
@@ -24038,27 +24020,27 @@ Please add \`${key}Action\` when creating your handler.`);
24038
24020
  } else {
24039
24021
  getStyle();
24040
24022
  }
24041
- autoplay();
24023
+ startPlay();
24042
24024
  };
24043
24025
  React.useEffect(() => {
24044
- _swiper.current.activePagination = (active + childCount) % childCount;
24026
+ swiperRef.current.activePagination = (active + childCount) % childCount;
24045
24027
  }, [active]);
24046
- const init = (active2 = +propSwiper.initPage) => {
24028
+ const init = (active2 = +propSwiper.defaultValue) => {
24047
24029
  const rect2 = getRect(container == null ? void 0 : container.current);
24048
- const _active = Math.max(Math.min(childCount - 1, active2), 0);
24049
- const _width = propSwiper.width ? +propSwiper.width : rect2.width;
24050
- const _height = propSwiper.height ? +propSwiper.height : rect2.height;
24051
- size = isVertical ? _height : _width;
24030
+ const currentIndex = Math.max(Math.min(childCount - 1, active2), 0);
24031
+ const width2 = +propSwiper.width || rect2.width;
24032
+ const height2 = +propSwiper.height || rect2.height;
24033
+ size = isVertical ? height2 : width2;
24052
24034
  trackSize = childCount * Number(size);
24053
- const targetOffset = getOffset(_active);
24054
- _swiper.current.moving = true;
24035
+ const targetOffset = getOffset(currentIndex);
24036
+ swiperRef.current.moving = true;
24055
24037
  if (ready) {
24056
- _swiper.current.moving = false;
24038
+ swiperRef.current.moving = false;
24057
24039
  }
24058
24040
  setRect(rect2);
24059
- setActive(_active);
24060
- setWidth(_width);
24061
- setHeight(_height);
24041
+ setActive(currentIndex);
24042
+ setWidth(width2);
24043
+ setHeight(height2);
24062
24044
  setOffset(targetOffset);
24063
24045
  setReady(true);
24064
24046
  };
@@ -24070,19 +24052,15 @@ Please add \`${key}Action\` when creating your handler.`);
24070
24052
  React.useEffect(() => {
24071
24053
  if (ready) {
24072
24054
  stopAutoPlay();
24073
- autoplay();
24055
+ startPlay();
24074
24056
  }
24075
- return () => {
24076
- setReady(false);
24077
- };
24057
+ return () => setReady(false);
24078
24058
  }, [ready]);
24079
24059
  React.useEffect(() => {
24080
24060
  stopAutoPlay();
24081
- autoplay();
24061
+ startPlay();
24082
24062
  }, [children]);
24083
- React.useEffect(() => {
24084
- init();
24085
- }, [propSwiper.initPage]);
24063
+ React.useEffect(() => init(), [propSwiper.defaultValue]);
24086
24064
  React.useEffect(() => {
24087
24065
  const target = container.current;
24088
24066
  target.addEventListener("touchstart", onTouchStart, false);
@@ -24095,20 +24073,16 @@ Please add \`${key}Action\` when creating your handler.`);
24095
24073
  };
24096
24074
  });
24097
24075
  React.useEffect(() => {
24098
- return () => {
24099
- stopAutoPlay();
24100
- };
24076
+ return () => stopAutoPlay();
24101
24077
  }, []);
24102
- const itemStyle = (index) => {
24078
+ const getItemStyle = (index) => {
24103
24079
  const style = {};
24104
- const _direction = propSwiper.direction || direction;
24105
- const _size = size;
24106
- if (_size) {
24107
- style[_direction === "horizontal" ? "width" : "height"] = `${_size}px`;
24080
+ if (size) {
24081
+ style[direction === "horizontal" ? "width" : "height"] = `${size}px`;
24108
24082
  }
24109
24083
  const offset2 = childOffset[index];
24110
24084
  if (offset2) {
24111
- style.transform = `translate3D${_direction === "horizontal" ? `(${offset2}px,0,0)` : `(0,${offset2}px,0)`}`;
24085
+ style.transform = `translate3D${direction === "horizontal" ? `(${offset2}px,0,0)` : `(0,${offset2}px,0)`}`;
24112
24086
  }
24113
24087
  return style;
24114
24088
  };
@@ -24118,52 +24092,58 @@ Please add \`${key}Action\` when creating your handler.`);
24118
24092
  prev,
24119
24093
  resize
24120
24094
  }));
24121
- return /* @__PURE__ */ jsxRuntimeExports.jsx(DataContext$1.Provider, { value: parent, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classes} ${className}`, ref: container, ...rest, children: [
24122
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: contentClass, ref: innerRef, children: React.Children.map(childs, (child, index) => {
24095
+ const renderIndicator = () => {
24096
+ if (React.isValidElement(indicator))
24097
+ return indicator;
24098
+ if (indicator === true) {
24123
24099
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
24124
24100
  "div",
24125
24101
  {
24126
- className: b("item-wrapper"),
24127
- style: itemStyle(index),
24128
- children: child
24129
- },
24130
- index
24131
- );
24132
- }) }),
24133
- propSwiper.paginationVisible && !("pageContent" in propSwiper) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
24134
- "div",
24135
- {
24136
- className: classNames({
24137
- [`${b("pagination")}`]: true,
24138
- [`${b("pagination-vertical")}`]: isVertical
24139
- }),
24140
- children: React.Children.map(childs, (item, index) => {
24141
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
24142
- "i",
24102
+ className: classNames({
24103
+ [`${classPrefix2}__pagination`]: true,
24104
+ [`${classPrefix2}__pagination-vertical`]: isVertical
24105
+ }),
24106
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
24107
+ Indicator,
24143
24108
  {
24144
- style: (active + childCount) % childCount === index ? {
24145
- backgroundColor: propSwiper.paginationColor
24146
- } : {
24147
- backgroundColor: propSwiper.paginationBgColor
24148
- },
24149
- className: classNames({
24150
- active: (active + childCount) % childCount === index
24151
- })
24152
- },
24153
- index
24154
- );
24155
- })
24156
- }
24157
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: pageContent })
24158
- ] }) });
24109
+ current: (active + childCount) % childCount,
24110
+ total: childs == null ? void 0 : childs.length,
24111
+ direction
24112
+ }
24113
+ )
24114
+ }
24115
+ );
24116
+ }
24117
+ return null;
24118
+ };
24119
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(DataContext$1.Provider, { value: parent, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
24120
+ "div",
24121
+ {
24122
+ className: classNames(classPrefix2, className),
24123
+ ref: container,
24124
+ ...rest,
24125
+ children: [
24126
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: contentClass, ref: innerRef, children: React.Children.map(childs, (child, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
24127
+ "div",
24128
+ {
24129
+ className: `${classPrefix2}__item-wrapper`,
24130
+ style: getItemStyle(index),
24131
+ children: child
24132
+ },
24133
+ index
24134
+ )) }),
24135
+ renderIndicator()
24136
+ ]
24137
+ }
24138
+ ) });
24159
24139
  });
24160
- Swiper.defaultProps = defaultProps$h;
24140
+ Swiper.defaultProps = defaultProps$g;
24161
24141
  Swiper.displayName = "NutSwiper";
24162
- const defaultProps$g = {
24142
+ const defaultProps$f = {
24163
24143
  direction: "horizontal"
24164
24144
  };
24165
24145
  const SwiperItem = React.forwardRef((props, ref) => {
24166
- const _props = { ...defaultProps$g, ...props };
24146
+ const _props = { ...defaultProps$f, ...props };
24167
24147
  const { className, style, children, direction, size } = _props;
24168
24148
  const parent = React.useContext(DataContext$1);
24169
24149
  const b = cn("swiper-item");
@@ -24179,16 +24159,16 @@ Please add \`${key}Action\` when creating your handler.`);
24179
24159
  };
24180
24160
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes, style: { ...style, ...getStyle() }, children });
24181
24161
  });
24182
- SwiperItem.defaultProps = defaultProps$g;
24162
+ SwiperItem.defaultProps = defaultProps$f;
24183
24163
  SwiperItem.displayName = "NutSwiperItem";
24184
- const defaultProps$f = {
24164
+ const defaultProps$e = {
24185
24165
  images: [],
24186
24166
  videos: [],
24187
24167
  show: false,
24188
- autoplay: 3e3,
24168
+ autoPlay: 3e3,
24189
24169
  initNo: 1,
24190
24170
  contentClose: false,
24191
- paginationVisible: false,
24171
+ indicator: false,
24192
24172
  paginationColor: "#fff",
24193
24173
  onClose: () => {
24194
24174
  }
@@ -24200,8 +24180,8 @@ Please add \`${key}Action\` when creating your handler.`);
24200
24180
  show,
24201
24181
  initNo,
24202
24182
  paginationColor,
24203
- paginationVisible,
24204
- autoplay,
24183
+ indicator,
24184
+ autoPlay,
24205
24185
  contentClose,
24206
24186
  onClose
24207
24187
  } = props;
@@ -24350,16 +24330,18 @@ Please add \`${key}Action\` when creating your handler.`);
24350
24330
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
24351
24331
  Swiper,
24352
24332
  {
24353
- autoPlay: autoplay,
24333
+ autoPlay,
24354
24334
  className: "nut-imagepreview-swiper",
24355
24335
  loop: true,
24356
- isPreventDefault: false,
24357
- style: { display: showPop ? "block" : "none" },
24336
+ preventDefault: false,
24337
+ style: {
24338
+ display: showPop ? "block" : "none",
24339
+ "--nutui-indicator-color": paginationColor
24340
+ },
24358
24341
  direction: "horizontal",
24359
24342
  onChange: slideChangeEnd,
24360
- initPage: innerNo && (innerNo > maxNo ? maxNo - 1 : innerNo - 1),
24361
- paginationColor,
24362
- paginationVisible,
24343
+ defaultValue: innerNo && (innerNo > maxNo ? maxNo - 1 : innerNo - 1),
24344
+ indicator,
24363
24345
  children: (videos && videos.length > 0 ? videos.map((item, index) => {
24364
24346
  return /* @__PURE__ */ jsxRuntimeExports.jsx(SwiperItem, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Video, { source: item.source, options: item.options }) }, index);
24365
24347
  }) : []).concat(
@@ -24387,41 +24369,8 @@ Please add \`${key}Action\` when creating your handler.`);
24387
24369
  }
24388
24370
  );
24389
24371
  };
24390
- ImagePreview.defaultProps = defaultProps$f;
24372
+ ImagePreview.defaultProps = defaultProps$e;
24391
24373
  ImagePreview.displayName = "NutImagePreview";
24392
- const defaultProps$e = {
24393
- total: 3,
24394
- current: 1,
24395
- direction: "horizontal"
24396
- };
24397
- const classPrefix = `nut-indicator`;
24398
- const Indicator = (props) => {
24399
- const { total, current, children, className, direction, ...rest } = {
24400
- ...defaultProps$e,
24401
- ...props
24402
- };
24403
- const classes = classNames({
24404
- [`${classPrefix}__vertical`]: direction === "vertical"
24405
- });
24406
- const renderElement = () => {
24407
- const childs = [];
24408
- for (let item = 1; item <= total; item++) {
24409
- childs.push(
24410
- item === current ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: children || /* @__PURE__ */ jsxRuntimeExports.jsx(
24411
- "div",
24412
- {
24413
- className: `${classPrefix}__dot ${classPrefix}__active`
24414
- },
24415
- item
24416
- ) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix}__dot` }, item)
24417
- );
24418
- }
24419
- return childs;
24420
- };
24421
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classNames(classes, className), ...rest, children: renderElement() });
24422
- };
24423
- Indicator.defaultProps = defaultProps$e;
24424
- Indicator.displayName = "NutIndicator";
24425
24374
  const initPositinoCache = (reaItemSize, length = 0) => {
24426
24375
  let index = 0;
24427
24376
  const positions = Array(length);
@@ -24837,33 +24786,34 @@ Please add \`${key}Action\` when creating your handler.`);
24837
24786
  Pagination.defaultProps = defaultProps$c;
24838
24787
  Pagination.displayName = "NutPagination";
24839
24788
  const defaultProps$b = {
24789
+ ...ComponentDefaults,
24840
24790
  price: 0,
24841
- needSymbol: true,
24842
24791
  symbol: "&yen;",
24843
- decimalDigits: 2,
24792
+ digits: 2,
24844
24793
  thousands: false,
24845
24794
  position: "before",
24846
24795
  size: "large",
24847
- className: ""
24796
+ line: false
24848
24797
  };
24849
24798
  const Price = (props) => {
24850
24799
  const {
24851
24800
  price,
24852
- needSymbol,
24853
24801
  symbol,
24854
- decimalDigits,
24802
+ digits,
24855
24803
  thousands,
24856
24804
  position,
24857
24805
  size,
24806
+ line,
24858
24807
  className,
24808
+ style,
24859
24809
  ...rest
24860
24810
  } = {
24861
24811
  ...defaultProps$b,
24862
24812
  ...props
24863
24813
  };
24864
- const b = cn("price");
24814
+ const classPrefix2 = "nut-price";
24865
24815
  const showSymbol = () => {
24866
- return { __html: needSymbol ? symbol : "" };
24816
+ return { __html: symbol || "" };
24867
24817
  };
24868
24818
  const checkPoint = (price2) => {
24869
24819
  return String(price2).indexOf(".") > 0;
@@ -24873,7 +24823,7 @@ Please add \`${key}Action\` when creating your handler.`);
24873
24823
  num = 0;
24874
24824
  }
24875
24825
  if (checkPoint(num)) {
24876
- num = Number(num).toFixed(decimalDigits);
24826
+ num = Number(num).toFixed(digits);
24877
24827
  num = typeof num.split(".") === "string" ? num.split(".") : num.split(".")[0];
24878
24828
  } else {
24879
24829
  num = num.toString();
@@ -24888,31 +24838,57 @@ Please add \`${key}Action\` when creating your handler.`);
24888
24838
  decimalNum = 0;
24889
24839
  }
24890
24840
  if (checkPoint(decimalNum)) {
24891
- decimalNum = Number(decimalNum).toFixed(decimalDigits);
24841
+ decimalNum = Number(decimalNum).toFixed(digits);
24892
24842
  decimalNum = typeof decimalNum.split(".") === "string" ? 0 : decimalNum.split(".")[1] || 0;
24893
24843
  } else {
24894
24844
  decimalNum = 0;
24895
24845
  }
24896
24846
  const result = `0.${decimalNum}`;
24897
- const resultFixed = Number(result).toFixed(decimalDigits);
24847
+ const resultFixed = Number(result).toFixed(digits);
24898
24848
  return String(resultFixed).substring(2, resultFixed.length);
24899
24849
  };
24900
24850
  const renderSymbol = () => {
24901
24851
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
24902
24852
  "div",
24903
24853
  {
24904
- className: `${b("symbol")} ${b(`symbol-${size}`)}`,
24854
+ className: `${classPrefix2}__symbol ${classPrefix2}__symbol-${size}`,
24905
24855
  dangerouslySetInnerHTML: showSymbol()
24906
24856
  }
24907
24857
  );
24908
24858
  };
24909
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${b()} ${className}`, ...rest, children: [
24910
- needSymbol && position === "before" ? renderSymbol() : null,
24911
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${b("integer")} ${b(`integer-${size}`)}`, children: formatThousands(price) }),
24912
- decimalDigits !== 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${b("decimal")} ${b(`decimal-${size}`)}`, children: "." }) : null,
24913
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${b("decimal")} ${b(`decimal-${size}`)}`, children: formatDecimal(price) }),
24914
- needSymbol && position === "after" ? renderSymbol() : null
24915
- ] });
24859
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
24860
+ "div",
24861
+ {
24862
+ className: `${classPrefix2} ${className} ${line ? `${classPrefix2}--line` : ""}`,
24863
+ style,
24864
+ ...rest,
24865
+ children: [
24866
+ symbol && position === "before" ? renderSymbol() : null,
24867
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24868
+ "div",
24869
+ {
24870
+ className: `${classPrefix2}__integer ${classPrefix2}__integer-${size}`,
24871
+ children: formatThousands(price)
24872
+ }
24873
+ ),
24874
+ digits !== 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
24875
+ "div",
24876
+ {
24877
+ className: `${classPrefix2}__decimal ${classPrefix2}__decimal-${size}`,
24878
+ children: "."
24879
+ }
24880
+ ) : null,
24881
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24882
+ "div",
24883
+ {
24884
+ className: `${classPrefix2}__decimal ${classPrefix2}__decimal-${size}`,
24885
+ children: formatDecimal(price)
24886
+ }
24887
+ ),
24888
+ symbol && position === "after" ? renderSymbol() : null
24889
+ ]
24890
+ }
24891
+ );
24916
24892
  };
24917
24893
  Price.defaultProps = defaultProps$b;
24918
24894
  Price.displayName = "NutPrice";