@nutui/nutui-react 2.0.0-alpha.3 → 2.0.0-alpha.5

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 (45) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/esm/Avatar.js +30 -25
  3. package/dist/esm/AvatarGroup.js +10 -15
  4. package/dist/esm/Badge.js +4 -66
  5. package/dist/esm/Checkbox.js +1 -2
  6. package/dist/esm/CheckboxGroup.js +18 -20
  7. package/dist/esm/CircleProgress.js +20 -25
  8. package/dist/esm/Ellipsis.js +13 -12
  9. package/dist/esm/Empty.js +18 -26
  10. package/dist/esm/Input.js +87 -193
  11. package/dist/esm/Skeleton.js +1 -1
  12. package/dist/esm/Swipe.js +4 -10
  13. package/dist/esm/Tabbar/style/index.js +1 -1
  14. package/dist/esm/Tabbar.js +29 -33
  15. package/dist/esm/TabbarItem.js +5 -75
  16. package/dist/esm/badge2.js +69 -0
  17. package/dist/esm/cellgroup2.js +5 -4
  18. package/dist/esm/checkbox2.js +34 -47
  19. package/dist/esm/tabbaritem2.js +61 -0
  20. package/dist/locales/base.js +1 -1
  21. package/dist/locales/en-US.js +1 -1
  22. package/dist/locales/id-ID.js +1 -1
  23. package/dist/locales/zh-CN.js +1 -1
  24. package/dist/locales/zh-TW.js +1 -1
  25. package/dist/locales/zh-UG.js +1 -1
  26. package/dist/nutui.react.mjs +846 -997
  27. package/dist/nutui.react.umd.js +846 -997
  28. package/dist/packages/badge/badge.scss +0 -1
  29. package/dist/packages/cellgroup/cellgroup.scss +20 -16
  30. package/dist/packages/checkbox/checkbox.scss +8 -11
  31. package/dist/packages/circleprogress/circleprogress.scss +0 -9
  32. package/dist/packages/empty/empty.scss +0 -9
  33. package/dist/packages/input/input.scss +13 -180
  34. package/dist/packages/tabbar/tabbar.scss +16 -22
  35. package/dist/packages/tabbaritem/tabbaritem.scss +9 -70
  36. package/dist/style.css +1 -1
  37. package/dist/style.mjs +1 -1
  38. package/dist/styles/themes/default.scss +0 -1
  39. package/dist/styles/variables-jmapp.scss +12 -16
  40. package/dist/styles/variables.scss +12 -16
  41. package/dist/types/index.d.ts +80 -126
  42. package/package.json +1 -1
  43. package/dist/esm/Icon.js +0 -83
  44. package/dist/packages/icon/icon.scss +0 -0
  45. /package/dist/esm/{AvatarContext.js → context.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.3 Fri Apr 28 2023 15:57:49 GMT+0800 (China Standard Time)
12
+ * @nutui/nutui-react v2.0.0-alpha.5 Wed May 10 2023 14:17:23 GMT+0800 (China Standard Time)
13
13
  * (c) 2023 @jdf2e.
14
14
  * Released under the MIT License.
15
15
  */
@@ -1032,7 +1032,7 @@ var __publicField = (obj, key, value) => {
1032
1032
  set exports(h) {
1033
1033
  D = h;
1034
1034
  }
1035
- }, k$5 = {};
1035
+ }, k$6 = {};
1036
1036
  /**
1037
1037
  * @license React
1038
1038
  * react-jsx-runtime.production.min.js
@@ -1045,7 +1045,7 @@ var __publicField = (obj, key, value) => {
1045
1045
  var Re;
1046
1046
  function ur() {
1047
1047
  if (Re)
1048
- return k$5;
1048
+ return k$6;
1049
1049
  Re = 1;
1050
1050
  var h = React, S = Symbol.for("react.element"), M = Symbol.for("react.fragment"), R = Object.prototype.hasOwnProperty, A = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, I = { key: true, ref: true, __self: true, __source: true };
1051
1051
  function w(m, l2, T) {
@@ -1058,7 +1058,7 @@ var __publicField = (obj, key, value) => {
1058
1058
  g[d] === void 0 && (g[d] = l2[d]);
1059
1059
  return { $$typeof: S, type: m, key: _, ref: $, props: g, _owner: A.current };
1060
1060
  }
1061
- return k$5.Fragment = M, k$5.jsx = w, k$5.jsxs = w, k$5;
1061
+ return k$6.Fragment = M, k$6.jsx = w, k$6.jsxs = w, k$6;
1062
1062
  }
1063
1063
  var F = {};
1064
1064
  /**
@@ -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$u = {
1664
+ const a$v = {
1665
1665
  className: "",
1666
1666
  style: void 0,
1667
1667
  name: "ArrowDown2",
@@ -1670,7 +1670,7 @@ Check the top-level render call using <` + t + ">.");
1670
1670
  onClick: () => {
1671
1671
  }
1672
1672
  }, y$8 = (h) => {
1673
- const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$u, ...h }, f = (t) => {
1673
+ const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$v, ...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$u;
1711
- const a$t = {
1710
+ y$8.defaultProps = a$v;
1711
+ const a$u = {
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$t, ...h }, g = (t) => {
1720
+ const { className: o, style: p, name: e, color: d, width: m, height: f, onClick: n } = { ...a$u, ...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$t;
1758
- const a$s = {
1757
+ x$g.defaultProps = a$u;
1758
+ const a$t = {
1759
1759
  className: "",
1760
1760
  style: void 0,
1761
1761
  name: "CheckChecked",
@@ -1764,7 +1764,7 @@ Check the top-level render call using <` + t + ">.");
1764
1764
  onClick: () => {
1765
1765
  }
1766
1766
  }, y$7 = (h) => {
1767
- const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$s, ...h }, C = (t) => {
1767
+ const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$t, ...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$s;
1816
- const a$r = {
1815
+ y$7.defaultProps = a$t;
1816
+ const a$s = {
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$r, ...h }, g = (t) => {
1825
+ const { className: i, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$s, ...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$r;
1863
- const a$q = {
1862
+ x$f.defaultProps = a$s;
1863
+ const a$r = {
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$q, ...h }, f = (t) => {
1872
+ const { className: o, style: m, name: e, color: d, width: p, height: C, onClick: r } = { ...a$r, ...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$q;
1910
- const a$p = {
1909
+ N.defaultProps = a$r;
1910
+ const a$q = {
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$p, ...h }, g = (t) => {
1919
+ const { className: o, style: d, name: e, color: p, width: m, height: f, onClick: r } = { ...a$q, ...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$p;
1957
- const a$o = {
1956
+ x$e.defaultProps = a$q;
1957
+ const a$p = {
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$o, ...h }, f = (t) => {
1966
+ const { className: o, style: d, name: e, color: m, width: p, height: C, onClick: r } = { ...a$p, ...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$o;
2004
- const a$n = {
2003
+ x$d.defaultProps = a$p;
2004
+ const a$o = {
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$n, ...h }, g = (t) => {
2013
+ const { className: i, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$o, ...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$n;
2051
- const a$m = {
2050
+ x$c.defaultProps = a$o;
2051
+ const a$n = {
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$m, ...h }, f = (t) => {
2060
+ const { className: l2, style: m, name: e, color: d, width: p, height: C, onClick: o } = { ...a$n, ...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$m;
2098
- const a$l = {
2097
+ x$b.defaultProps = a$n;
2098
+ const a$m = {
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$l, ...h }, g = (t) => {
2107
+ const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$m, ...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$l;
2145
- const a$k = {
2144
+ x$a.defaultProps = a$m;
2145
+ const a$l = {
2146
2146
  className: "",
2147
2147
  style: void 0,
2148
2148
  name: "Del",
@@ -2151,7 +2151,7 @@ Check the top-level render call using <` + t + ">.");
2151
2151
  onClick: () => {
2152
2152
  }
2153
2153
  }, y$6 = (h) => {
2154
- const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$k, ...h }, g = (t) => {
2154
+ const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$l, ...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$k;
2192
- const a$j = {
2191
+ y$6.defaultProps = a$l;
2192
+ const a$k = {
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$j, ...h }, f = (t) => {
2201
+ const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$k, ...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$j;
2239
- const a$i = {
2238
+ x$9.defaultProps = a$k;
2239
+ const a$j = {
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$i, ...h }, u = (t) => {
2248
+ const { className: r, style: d, name: e, color: m, width: p, height: f, onClick: l2 } = { ...a$j, ...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$i;
2286
- const a$h = {
2285
+ x$8.defaultProps = a$j;
2286
+ const a$i = {
2287
2287
  className: "",
2288
2288
  style: void 0,
2289
2289
  name: "ImageError",
@@ -2291,8 +2291,8 @@ Check the top-level render call using <` + t + ">.");
2291
2291
  height: "",
2292
2292
  onClick: () => {
2293
2293
  }
2294
- }, k$4 = (h) => {
2295
- const { className: s, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$h, ...h }, g = (t) => {
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) => {
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$4.defaultProps = a$h;
2344
- const a$g = {
2343
+ k$5.defaultProps = a$i;
2344
+ const a$h = {
2345
2345
  className: "",
2346
2346
  style: void 0,
2347
2347
  name: "Image",
@@ -2349,8 +2349,8 @@ Check the top-level render call using <` + t + ">.");
2349
2349
  height: "",
2350
2350
  onClick: () => {
2351
2351
  }
2352
- }, k$3 = (h) => {
2353
- const { className: l2, style: d, name: c, color: m, width: p, height: f, onClick: r } = { ...a$g, ...h }, g = (t) => {
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) => {
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$3.defaultProps = a$g;
2402
- const a$f = {
2401
+ k$4.defaultProps = a$h;
2402
+ const a$g = {
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$f, ...h }, g = (t) => {
2411
+ const { className: i, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$g, ...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$f;
2449
- const a$e = {
2448
+ x$7.defaultProps = a$g;
2449
+ const a$f = {
2450
2450
  className: "",
2451
2451
  style: void 0,
2452
2452
  name: "Left",
@@ -2455,7 +2455,7 @@ Check the top-level render call using <` + t + ">.");
2455
2455
  onClick: () => {
2456
2456
  }
2457
2457
  }, y$5 = (h) => {
2458
- const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: n } = { ...a$e, ...h }, g = (t) => {
2458
+ const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: n } = { ...a$f, ...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$e;
2496
- const a$d = {
2495
+ y$5.defaultProps = a$f;
2496
+ const a$e = {
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$d, ...h }, g = (t) => {
2505
+ const { className: s, style: d, name: c, color: m, width: p, height: f, onClick: n } = { ...a$e, ...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$d;
2543
- const a$c = {
2542
+ x$6.defaultProps = a$e;
2543
+ const a$d = {
2544
2544
  className: "",
2545
2545
  style: void 0,
2546
2546
  name: "Loading",
@@ -2548,8 +2548,8 @@ Check the top-level render call using <` + t + ">.");
2548
2548
  height: "",
2549
2549
  onClick: () => {
2550
2550
  }
2551
- }, k$2 = (h) => {
2552
- const { className: l2, style: m, name: t, color: d, width: p, height: g, onClick: o } = { ...a$c, ...h }, f = (c) => {
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) => {
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$2.defaultProps = a$c;
2590
- const a$b = {
2589
+ k$3.defaultProps = a$d;
2590
+ const a$c = {
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$b, ...h }, g = (t) => {
2599
+ const { className: o, style: m, name: s, color: d, width: p, height: f, onClick: n } = { ...a$c, ...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$b;
2637
- const a$a = {
2636
+ x$5.defaultProps = a$c;
2637
+ const a$b = {
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$a, ...h }, g = (t) => {
2646
+ const { className: c, style: d, name: s, color: m, width: p, height: f, onClick: l2 } = { ...a$b, ...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$a;
2684
- const a$9 = {
2683
+ x$4.defaultProps = a$b;
2684
+ const a$a = {
2685
2685
  className: "",
2686
2686
  style: void 0,
2687
2687
  name: "Minus",
@@ -2690,7 +2690,7 @@ Check the top-level render call using <` + t + ">.");
2690
2690
  onClick: () => {
2691
2691
  }
2692
2692
  }, y$4 = (h) => {
2693
- const { className: i, style: d, name: s, color: p, width: m, height: f, onClick: o } = { ...a$9, ...h }, u = (t) => {
2693
+ const { className: i, style: d, name: s, color: p, width: m, height: f, onClick: o } = { ...a$a, ...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,7 +2727,54 @@ Check the top-level render call using <` + t + ">.");
2727
2727
  }
2728
2728
  ) });
2729
2729
  };
2730
- y$4.defaultProps = a$9;
2730
+ y$4.defaultProps = a$a;
2731
+ const a$9 = {
2732
+ className: "",
2733
+ style: void 0,
2734
+ name: "My",
2735
+ width: "",
2736
+ height: "",
2737
+ onClick: () => {
2738
+ }
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) => {
2741
+ r && r(t);
2742
+ }, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
2743
+ const t = "nut-icon";
2744
+ return classNames({
2745
+ [`${o}`]: o,
2746
+ [t]: true,
2747
+ [t + "-" + s]: s
2748
+ });
2749
+ }, e = {}, i = n(p || ""), l2 = n(f || "");
2750
+ i && (e.width = i), l2 && (e.height = l2);
2751
+ const y2 = () => ({
2752
+ ...d,
2753
+ ...e
2754
+ });
2755
+ return /* @__PURE__ */ cr(lr, { children: /* @__PURE__ */ cr(
2756
+ "svg",
2757
+ {
2758
+ className: u(),
2759
+ style: y2(),
2760
+ onClick: g,
2761
+ xmlns: "http://www.w3.org/2000/svg",
2762
+ color: m,
2763
+ viewBox: "0 0 1024 1024",
2764
+ "aria-labelledby": s,
2765
+ role: "presentation",
2766
+ children: /* @__PURE__ */ cr(
2767
+ "path",
2768
+ {
2769
+ d: "M512 813.949c-225.805 0-406.974-183.795-406.974-406.975S286.195 0 512 0s406.974 181.17 406.974 406.974S735.18 813.95 512 813.95zm0-735.18c-181.17 0-328.205 147.036-328.205 328.205S330.83 735.18 512 735.18s328.205-147.035 328.205-328.205S693.17 78.77 512 78.77zm202.174 939.98c-21.005 0-39.384-18.38-39.384-39.385 0-89.272-73.518-162.79-162.79-162.79-89.272 0-162.79 73.518-162.79 162.79 0 21.005-18.38 39.385-39.384 39.385s-39.385-18.38-39.385-39.385c0-133.908 107.651-241.559 241.559-241.559s241.559 107.651 241.559 241.56c0 21.004-15.754 39.384-39.385 39.384zM512 525.129c-39.385 0-78.77-13.129-105.026-36.76-15.753-13.128-18.38-39.384-2.625-55.138 13.128-15.754 39.384-18.38 55.138-2.626 23.63 21.005 81.395 21.005 105.026 0 15.754-13.128 42.01-13.128 55.138 5.251 13.128 15.754 13.128 42.01-5.251 55.139C590.77 512 551.385 525.128 512 525.128z",
2770
+ fill: "currentColor",
2771
+ fillOpacity: "0.9"
2772
+ }
2773
+ )
2774
+ }
2775
+ ) });
2776
+ };
2777
+ k$2.defaultProps = a$9;
2731
2778
  const a$8 = {
2732
2779
  className: "",
2733
2780
  style: void 0,
@@ -3283,7 +3330,7 @@ Check the top-level render call using <` + t + ">.");
3283
3330
  style: { ...getStyle(), ...style },
3284
3331
  onClick: (e) => handleClick2(e),
3285
3332
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-button__warp", children: [
3286
- loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(k$2, { className: "nut-icon-loading" }) : null,
3333
+ loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(k$3, { className: "nut-icon-loading" }) : null,
3287
3334
  !loading && icon ? icon : null,
3288
3335
  children && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: icon || loading ? "nut-button-text" : "", children })
3289
3336
  ] })
@@ -3303,7 +3350,7 @@ Check the top-level render call using <` + t + ">.");
3303
3350
  onClick: (event) => {
3304
3351
  }
3305
3352
  };
3306
- const classPrefix$9 = "nut-cell";
3353
+ const classPrefix$g = "nut-cell";
3307
3354
  const Cell = (props) => {
3308
3355
  const {
3309
3356
  children,
@@ -3334,24 +3381,24 @@ Check the top-level render call using <` + t + ">.");
3334
3381
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
3335
3382
  "div",
3336
3383
  {
3337
- className: classNames(classPrefix$9, className),
3384
+ className: classNames(classPrefix$g, className),
3338
3385
  onClick: (event) => handleClick2(event),
3339
3386
  style: baseStyle,
3340
3387
  ...rest,
3341
3388
  children: children || /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
3342
- title || description ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix$9}__left`, children: [
3343
- title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$9}__title`, children: title }) : null,
3344
- description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$9}__description`, children: description }) : null
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
3345
3392
  ] }) : null,
3346
3393
  extra ? /* @__PURE__ */ jsxRuntimeExports.jsx(
3347
3394
  "div",
3348
3395
  {
3349
- className: `${classPrefix$9}__extra`,
3396
+ className: `${classPrefix$g}__extra`,
3350
3397
  style: styles,
3351
3398
  children: extra
3352
3399
  }
3353
3400
  ) : null,
3354
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$9}__divider` })
3401
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$g}__divider` })
3355
3402
  ] })
3356
3403
  }
3357
3404
  );
@@ -3361,18 +3408,25 @@ Check the top-level render call using <` + t + ">.");
3361
3408
  const defaultProps$1p = {
3362
3409
  ...ComponentDefaults,
3363
3410
  title: "",
3364
- description: ""
3411
+ description: "",
3412
+ divider: true
3365
3413
  };
3366
- const classPrefix$8 = "nut-cell-group";
3414
+ const classPrefix$f = "nut-cell-group";
3367
3415
  const CellGroup = (props) => {
3368
- const { children, className, style, title, description, ...rest } = {
3416
+ const { children, className, style, title, description, divider, ...rest } = {
3369
3417
  ...defaultProps$1p,
3370
3418
  ...props
3371
3419
  };
3372
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classNames(classPrefix$8, className), ...rest, children: [
3373
- title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$8}__title`, children: title }) : null,
3374
- description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$8}__description`, children: description }) : null,
3375
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$8}__wrap`, children })
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,
3423
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
3424
+ "div",
3425
+ {
3426
+ className: `${classPrefix$f}__wrap ${divider ? `${classPrefix$f}__wrap--divider` : ""}`,
3427
+ children
3428
+ }
3429
+ )
3376
3430
  ] });
3377
3431
  };
3378
3432
  CellGroup.defaultProps = defaultProps$1p;
@@ -3847,7 +3901,7 @@ Check the top-level render call using <` + t + ">.");
3847
3901
  loading: true,
3848
3902
  lazy: false
3849
3903
  };
3850
- const classPrefix$7 = "nut-image";
3904
+ const classPrefix$e = "nut-image";
3851
3905
  const Image$1 = (props) => {
3852
3906
  const {
3853
3907
  className,
@@ -3942,7 +3996,7 @@ Check the top-level render call using <` + t + ">.");
3942
3996
  if (!isError)
3943
3997
  return null;
3944
3998
  if (typeof error === "boolean" && error === true && !innerLoading) {
3945
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-error", children: /* @__PURE__ */ jsxRuntimeExports.jsx(k$4, {}) });
3999
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-error", children: /* @__PURE__ */ jsxRuntimeExports.jsx(k$5, {}) });
3946
4000
  }
3947
4001
  if (React.isValidElement(error) && !innerLoading) {
3948
4002
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-error", children: error });
@@ -3953,7 +4007,7 @@ Check the top-level render call using <` + t + ">.");
3953
4007
  if (!loading)
3954
4008
  return null;
3955
4009
  if (typeof loading === "boolean" && loading === true && innerLoading) {
3956
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-loading", children: /* @__PURE__ */ jsxRuntimeExports.jsx(k$3, {}) });
4010
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-loading", children: /* @__PURE__ */ jsxRuntimeExports.jsx(k$4, {}) });
3957
4011
  }
3958
4012
  if (React.isValidElement(loading) && innerLoading) {
3959
4013
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-loading", children: loading });
@@ -3963,7 +4017,7 @@ Check the top-level render call using <` + t + ">.");
3963
4017
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
3964
4018
  "div",
3965
4019
  {
3966
- className: classNames(classPrefix$7, className),
4020
+ className: classNames(classPrefix$e, className),
3967
4021
  style: containerStyle,
3968
4022
  onClick: (e) => {
3969
4023
  imageClick(e);
@@ -4131,21 +4185,21 @@ Check the top-level render call using <` + t + ">.");
4131
4185
  contentPosition: "center",
4132
4186
  direction: "horizontal"
4133
4187
  };
4134
- const classPrefix$6 = `nut-divider`;
4188
+ const classPrefix$d = `nut-divider`;
4135
4189
  const Divider = (props) => {
4136
4190
  const { children, contentPosition, style, className, direction, ...rest } = {
4137
4191
  ...defaultProps$1l,
4138
4192
  ...props
4139
4193
  };
4140
4194
  const classes = direction === "horizontal" ? classNames({
4141
- [`${classPrefix$6}`]: true,
4142
- [`${classPrefix$6}__center`]: children,
4143
- [`${classPrefix$6}__left`]: contentPosition === "left",
4144
- [`${classPrefix$6}__right`]: contentPosition === "right",
4145
- [`${classPrefix$6}__hairline`]: true
4195
+ [`${classPrefix$d}`]: true,
4196
+ [`${classPrefix$d}__center`]: children,
4197
+ [`${classPrefix$d}__left`]: contentPosition === "left",
4198
+ [`${classPrefix$d}__right`]: contentPosition === "right",
4199
+ [`${classPrefix$d}__hairline`]: true
4146
4200
  }) : classNames({
4147
- [`${classPrefix$6}`]: true,
4148
- [`${classPrefix$6}__vertical`]: direction === "vertical"
4201
+ [`${classPrefix$d}`]: true,
4202
+ [`${classPrefix$d}__vertical`]: direction === "vertical"
4149
4203
  });
4150
4204
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classes} ${className || ""}`, style, ...rest, children });
4151
4205
  };
@@ -4306,7 +4360,7 @@ Check the top-level render call using <` + t + ">.");
4306
4360
  };
4307
4361
  Layout.defaultProps = defaultProps$1i;
4308
4362
  Layout.displayName = "NutLayout";
4309
- const classPrefix$5 = "nut-row";
4363
+ const classPrefix$c = "nut-row";
4310
4364
  const defaultProps$1h = {
4311
4365
  ...ComponentDefaults,
4312
4366
  type: "",
@@ -4341,7 +4395,7 @@ Check the top-level render call using <` + t + ">.");
4341
4395
  ${getClass("justify", justify)}
4342
4396
  ${getClass("align", align)}
4343
4397
  ${getClass("flex", wrap)}
4344
- ${classPrefix$5}
4398
+ ${classPrefix$c}
4345
4399
  `;
4346
4400
  };
4347
4401
  const parentRow = {
@@ -4440,7 +4494,7 @@ Check the top-level render call using <` + t + ">.");
4440
4494
  threshold: 0,
4441
4495
  zIndex: 2e3
4442
4496
  };
4443
- const classPrefix$4 = "nut-sticky";
4497
+ const classPrefix$b = "nut-sticky";
4444
4498
  const Sticky = (props) => {
4445
4499
  const {
4446
4500
  position,
@@ -4562,7 +4616,7 @@ Check the top-level render call using <` + t + ">.");
4562
4616
  {
4563
4617
  ref: rootRef,
4564
4618
  style: { ...style, ...rootStyle },
4565
- className: classNames(classPrefix$4, className),
4619
+ className: classNames(classPrefix$b, className),
4566
4620
  ...rest,
4567
4621
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-sticky--box", ref: stickyRef, style: stickyStyle, children })
4568
4622
  }
@@ -12239,280 +12293,189 @@ Please add \`${key}Action\` when creating your handler.`);
12239
12293
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-subsidenavbar__content", children })
12240
12294
  ] });
12241
12295
  };
12242
- var classnameExports = {};
12243
- var classname = {
12244
- get exports() {
12245
- return classnameExports;
12246
- },
12247
- set exports(v) {
12248
- classnameExports = v;
12249
- }
12250
- };
12251
- var classname_production_min = {};
12252
- var hasRequiredClassname_production_min;
12253
- function requireClassname_production_min() {
12254
- if (hasRequiredClassname_production_min)
12255
- return classname_production_min;
12256
- hasRequiredClassname_production_min = 1;
12257
- function r(r2) {
12258
- function t2(t3, i, a2, o) {
12259
- var f = i ? e + t3 + r2.e + i : e + t3, v = f;
12260
- if (a2) {
12261
- var s = " " + v + r2.m;
12262
- for (var u in a2)
12263
- if (a2.hasOwnProperty(u)) {
12264
- var p = a2[u];
12265
- true === p ? v += s + u : p && (v += s + u + n + p);
12266
- }
12267
- }
12268
- if (void 0 !== o)
12269
- for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
12270
- var l2 = o[y2];
12271
- if (l2 && "string" == typeof l2.valueOf())
12272
- for (var g = l2.valueOf().split(" "), d = 0; d < g.length; d++) {
12273
- var h = g[d];
12274
- h !== f && (v += " " + h);
12275
- }
12276
- }
12277
- return v;
12278
- }
12279
- var e = r2.n || "", n = r2.v || r2.m;
12280
- return function(r3, e2) {
12281
- return function(n2, i, a2) {
12282
- return "string" == typeof n2 ? "string" == typeof i || Array.isArray(i) ? t2(r3, n2, void 0, i) : t2(r3, n2, i, a2) : t2(r3, e2, n2, i);
12283
- };
12284
- };
12296
+ function usePropsValue({
12297
+ value,
12298
+ defaultValue,
12299
+ finalValue,
12300
+ onChange = (value2) => {
12285
12301
  }
12286
- Object.defineProperty(classname_production_min, "__esModule", { value: true });
12287
- var t = r({ e: "-", m: "_" });
12288
- classname_production_min.cn = t, classname_production_min.withNaming = r;
12289
- return classname_production_min;
12290
- }
12291
- var classname_development = {};
12292
- var hasRequiredClassname_development;
12293
- function requireClassname_development() {
12294
- if (hasRequiredClassname_development)
12295
- return classname_development;
12296
- hasRequiredClassname_development = 1;
12297
- Object.defineProperty(classname_development, "__esModule", { value: true });
12298
- function withNaming(preset) {
12299
- var nameSpace = preset.n || "";
12300
- var modValueDelimiter = preset.v || preset.m;
12301
- function stringify(b, e, m, mix) {
12302
- var entityName = e ? nameSpace + b + preset.e + e : nameSpace + b;
12303
- var className = entityName;
12304
- if (m) {
12305
- var modPrefix = " " + className + preset.m;
12306
- for (var k2 in m) {
12307
- if (m.hasOwnProperty(k2)) {
12308
- var modVal = m[k2];
12309
- if (modVal === true) {
12310
- className += modPrefix + k2;
12311
- } else if (modVal) {
12312
- className += modPrefix + k2 + modValueDelimiter + modVal;
12313
- }
12314
- }
12315
- }
12316
- }
12317
- if (mix !== void 0) {
12318
- mix = Array.isArray(mix) ? mix : [mix];
12319
- for (var i = 0, len = mix.length; i < len; i++) {
12320
- var value = mix[i];
12321
- if (!value || typeof value.valueOf() !== "string")
12322
- continue;
12323
- var mixes = value.valueOf().split(" ");
12324
- for (var j = 0; j < mixes.length; j++) {
12325
- var val = mixes[j];
12326
- if (val !== entityName) {
12327
- className += " " + val;
12328
- }
12329
- }
12330
- }
12331
- }
12332
- return className;
12333
- }
12334
- return function cnGenerator(b, e) {
12335
- return function(elemOrMods, elemModsOrBlockMix, elemMix) {
12336
- if (typeof elemOrMods === "string") {
12337
- if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
12338
- return stringify(b, elemOrMods, void 0, elemModsOrBlockMix);
12339
- }
12340
- return stringify(b, elemOrMods, elemModsOrBlockMix, elemMix);
12341
- }
12342
- return stringify(b, e, elemOrMods, elemModsOrBlockMix);
12343
- };
12344
- };
12302
+ }) {
12303
+ const [uncontrolled, setUncontrolled] = React.useState(
12304
+ defaultValue !== void 0 ? defaultValue : finalValue
12305
+ );
12306
+ const handleUncontrolledChange = (val) => {
12307
+ setUncontrolled(val);
12308
+ onChange == null ? void 0 : onChange(val);
12309
+ };
12310
+ if (value !== void 0) {
12311
+ return [value, onChange];
12345
12312
  }
12346
- var cn2 = withNaming({
12347
- e: "-",
12348
- m: "_"
12349
- });
12350
- classname_development.cn = cn2;
12351
- classname_development.withNaming = withNaming;
12352
- return classname_development;
12313
+ return [uncontrolled, handleUncontrolledChange];
12353
12314
  }
12354
- (function(module2) {
12355
- if (process.env.NODE_ENV === "production") {
12356
- module2.exports = requireClassname_production_min();
12357
- } else {
12358
- module2.exports = requireClassname_development();
12359
- }
12360
- })(classname);
12361
- const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
12362
12315
  const defaultProps$18 = {
12363
- visible: 0,
12364
- bottom: false,
12365
- size: 20,
12366
- unactiveColor: "",
12367
- activeColor: "",
12368
- safeAreaInsetBottom: false,
12369
- className: "",
12370
- style: {},
12371
- onSwitch: (child, activeVisible) => {
12372
- }
12316
+ ...ComponentDefaults,
12317
+ value: "",
12318
+ dot: false,
12319
+ max: 99,
12320
+ top: "0",
12321
+ right: "5",
12322
+ color: ""
12373
12323
  };
12374
- const Tabbar = (props) => {
12375
- const {
12376
- children,
12377
- visible,
12378
- activeVisible,
12379
- bottom,
12380
- size,
12381
- activeColor,
12382
- unactiveColor,
12383
- safeAreaInsetBottom,
12384
- className,
12385
- style,
12386
- onSwitch
12387
- } = {
12388
- ...defaultProps$18,
12324
+ const Badge = (props) => {
12325
+ const { className, style, value, max, children, dot, top, right, color } = {
12326
+ ...defaultProps$18,
12389
12327
  ...props
12390
12328
  };
12391
- const b = cn("tabbar");
12392
- const [selectIndex, setSelectIndex] = React.useState(activeVisible || visible);
12393
- const handleClick2 = (idx) => {
12394
- if (!("activeVisible" in props)) {
12395
- setSelectIndex(idx);
12329
+ const classPrefix2 = "nut-badge";
12330
+ const classes = classNames(classPrefix2, className);
12331
+ const contentClasses = classNames(
12332
+ { [`${classPrefix2}__dot`]: dot },
12333
+ `${classPrefix2}__content`,
12334
+ `${classPrefix2}__sup`
12335
+ );
12336
+ function content() {
12337
+ if (dot || typeof value === "object")
12338
+ return null;
12339
+ if (typeof value === "number" && typeof max === "number") {
12340
+ return max < value ? `${max}+` : value;
12396
12341
  }
12342
+ return value;
12343
+ }
12344
+ const getStyle = () => {
12345
+ const style2 = {};
12346
+ style2.top = `${Number(top) || parseFloat(top) || 0}px`;
12347
+ style2.right = `${Number(right) || parseFloat(right) || 0}px`;
12348
+ style2.background = color;
12349
+ return style2;
12397
12350
  };
12398
- React.useEffect(() => {
12399
- if (activeVisible !== void 0) {
12400
- setSelectIndex(activeVisible);
12401
- }
12402
- }, [activeVisible]);
12403
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
12404
- "div",
12405
- {
12406
- className: [
12407
- `${b()}`,
12408
- bottom ? `${b("bottom")}` : "",
12409
- safeAreaInsetBottom ? `${b("bottom")} ${b("safebottom")}` : "",
12410
- className
12411
- ].join(" "),
12412
- style,
12413
- children: React.Children.map(children, (child, idx) => {
12414
- if (!React.isValidElement(child)) {
12415
- return null;
12416
- }
12417
- const childProps = {
12418
- ...child.props,
12419
- active: idx === selectIndex,
12420
- index: idx,
12421
- unactiveColor,
12422
- activeColor,
12423
- size,
12424
- handleClick: () => {
12425
- handleClick2(idx);
12426
- onSwitch(child, idx);
12427
- }
12428
- };
12429
- return React.cloneElement(child, childProps);
12430
- })
12431
- }
12432
- );
12351
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes, style, children: [
12352
+ typeof value === "object" && value && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__icon`, children: value }),
12353
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children }),
12354
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: contentClasses, style: getStyle(), children: content() })
12355
+ ] });
12433
12356
  };
12434
- Tabbar.defaultProps = defaultProps$18;
12435
- Tabbar.displayName = "NutTabbar";
12357
+ Badge.defaultProps = defaultProps$18;
12358
+ Badge.displayName = "NutBadge";
12436
12359
  const defaultProps$17 = {
12437
12360
  ...ComponentDefaults,
12438
- dot: false,
12439
- className: "",
12440
- tabTitle: "",
12361
+ title: "",
12441
12362
  icon: null,
12442
- href: "",
12443
- num: "",
12444
12363
  active: false,
12445
- activeColor: "",
12446
- unactiveColor: "",
12447
12364
  index: 0,
12448
12365
  handleClick: (idx) => {
12449
12366
  }
12450
12367
  };
12451
12368
  const TabbarItem = (props) => {
12452
12369
  const {
12453
- dot,
12454
12370
  className,
12455
12371
  style,
12456
- tabTitle,
12372
+ title,
12457
12373
  icon,
12458
- href,
12459
- num,
12460
12374
  active,
12461
12375
  activeColor,
12462
- unactiveColor,
12376
+ inactiveColor,
12463
12377
  index,
12464
- handleClick: handleClick2
12378
+ handleClick: handleClick2,
12379
+ ...rest
12465
12380
  } = {
12466
12381
  ...defaultProps$17,
12467
12382
  ...props
12468
12383
  };
12469
- const b = cn("tabbar-item");
12470
- const bIcon = cn("tabbar-item__icon-box");
12471
- React.useEffect(() => {
12472
- if (active && href) {
12473
- window.location.href = href;
12474
- }
12475
- }, [active, href]);
12476
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
12384
+ const classPrefix2 = "nut-tabbar-item";
12385
+ const tabbarItemClass = classNames(className, classPrefix2, {
12386
+ [`${classPrefix2}-active`]: active
12387
+ });
12388
+ const boxPrefix = `${classPrefix2}__icon-box`;
12389
+ const titleClass = classNames(boxPrefix, `${boxPrefix}-nav`, {
12390
+ [`${boxPrefix}-large`]: !icon
12391
+ });
12392
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
12477
12393
  "div",
12478
12394
  {
12479
- className: `${b({ active })} ${className}`,
12395
+ className: tabbarItemClass,
12480
12396
  style: {
12481
- ...style,
12482
- color: active ? activeColor : unactiveColor
12483
- },
12484
- onClick: () => {
12485
- handleClick2(index);
12397
+ color: active ? activeColor : inactiveColor,
12398
+ ...style
12486
12399
  },
12400
+ onClick: () => handleClick2(index),
12401
+ children: icon ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
12402
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: boxPrefix, children: icon }) }),
12403
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: titleClass, children: title })
12404
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: titleClass, children: title }) })
12405
+ }
12406
+ );
12407
+ };
12408
+ const defaultProps$16 = {
12409
+ ...ComponentDefaults,
12410
+ defaultValue: 0,
12411
+ fixed: false,
12412
+ inactiveColor: "",
12413
+ activeColor: "",
12414
+ safeArea: false,
12415
+ onSwitch: (value) => {
12416
+ }
12417
+ };
12418
+ const Tabbar = (props) => {
12419
+ const {
12420
+ children,
12421
+ defaultValue,
12422
+ value,
12423
+ fixed,
12424
+ activeColor,
12425
+ inactiveColor,
12426
+ safeArea,
12427
+ className,
12428
+ style,
12429
+ onSwitch
12430
+ } = {
12431
+ ...defaultProps$16,
12432
+ ...props
12433
+ };
12434
+ const classPrefix2 = "nut-tabbar";
12435
+ const [selectIndex, setSelectIndex] = usePropsValue({
12436
+ value,
12437
+ defaultValue,
12438
+ finalValue: 0,
12439
+ onChange: onSwitch
12440
+ });
12441
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
12442
+ "div",
12443
+ {
12444
+ className: classNames(classPrefix2, className, {
12445
+ [`${classPrefix2}__fixed`]: fixed
12446
+ }),
12447
+ style,
12487
12448
  children: [
12488
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${bIcon()}`, children: [
12489
- !dot ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
12490
- num && num <= 99 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${bIcon("tips", [bIcon("num")])}`, children: num }),
12491
- num && num >= 100 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${bIcon("tips", [bIcon("nums")])}`, children: "99+" })
12492
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${bIcon("tips", [bIcon("dot")])}` }),
12493
- icon || null
12494
- ] }),
12495
- tabTitle && /* @__PURE__ */ jsxRuntimeExports.jsx(
12496
- "div",
12497
- {
12498
- className: bIcon({ "nav-word": true }, [
12499
- bIcon({ "big-word": !icon })
12500
- ]),
12501
- children: tabTitle
12449
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__wrap`, children: React.Children.map(children, (child, idx) => {
12450
+ if (!React.isValidElement(child)) {
12451
+ return null;
12502
12452
  }
12503
- )
12453
+ const childProps = {
12454
+ ...child.props,
12455
+ active: idx === selectIndex,
12456
+ index: idx,
12457
+ inactiveColor,
12458
+ activeColor,
12459
+ handleClick: setSelectIndex
12460
+ };
12461
+ return React.cloneElement(child, childProps);
12462
+ }) }),
12463
+ (fixed || safeArea) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__safe-area` })
12504
12464
  ]
12505
12465
  }
12506
12466
  );
12507
12467
  };
12508
- const defaultProps$16 = {
12468
+ Tabbar.defaultProps = defaultProps$16;
12469
+ Tabbar.displayName = "NutTabbar";
12470
+ Tabbar.Item = TabbarItem;
12471
+ const defaultProps$15 = {
12509
12472
  title: "",
12510
12473
  value: "",
12511
12474
  disabled: false
12512
12475
  };
12513
12476
  const TabPane = (props) => {
12514
12477
  const { children, autoHeightClassName, className, disabled } = {
12515
- ...defaultProps$16,
12478
+ ...defaultProps$15,
12516
12479
  ...props
12517
12480
  };
12518
12481
  const classPrefix2 = "nut-tabpane";
@@ -12539,26 +12502,7 @@ Please add \`${key}Action\` when creating your handler.`);
12539
12502
  }
12540
12503
  }
12541
12504
  const requestAniFrame$1 = requestAniFrame();
12542
- function usePropsValue({
12543
- value,
12544
- defaultValue,
12545
- finalValue,
12546
- onChange = (value2) => {
12547
- }
12548
- }) {
12549
- const [uncontrolled, setUncontrolled] = React.useState(
12550
- defaultValue !== void 0 ? defaultValue : finalValue
12551
- );
12552
- const handleUncontrolledChange = (val) => {
12553
- setUncontrolled(val);
12554
- onChange == null ? void 0 : onChange(val);
12555
- };
12556
- if (value !== void 0) {
12557
- return [value, onChange];
12558
- }
12559
- return [uncontrolled, handleUncontrolledChange];
12560
- }
12561
- const defaultProps$15 = {
12505
+ const defaultProps$14 = {
12562
12506
  ...ComponentDefaults,
12563
12507
  tabStyle: {},
12564
12508
  activeColor: "",
@@ -12567,7 +12511,7 @@ Please add \`${key}Action\` when creating your handler.`);
12567
12511
  duration: 300,
12568
12512
  autoHeight: false
12569
12513
  };
12570
- const classPrefix$3 = "nut-tabs";
12514
+ const classPrefix$a = "nut-tabs";
12571
12515
  const Tabs = (props) => {
12572
12516
  const {
12573
12517
  activeColor,
@@ -12584,7 +12528,7 @@ Please add \`${key}Action\` when creating your handler.`);
12584
12528
  autoHeight,
12585
12529
  ...rest
12586
12530
  } = {
12587
- ...defaultProps$15,
12531
+ ...defaultProps$14,
12588
12532
  ...props
12589
12533
  };
12590
12534
  const [value, setValue] = usePropsValue({
@@ -12646,14 +12590,14 @@ Please add \`${key}Action\` when creating your handler.`);
12646
12590
  };
12647
12591
  const titles = React.useRef(getTitles());
12648
12592
  const classes = classNames(
12649
- classPrefix$3,
12650
- `${classPrefix$3}--${direction}`,
12593
+ classPrefix$a,
12594
+ `${classPrefix$a}--${direction}`,
12651
12595
  className
12652
12596
  );
12653
- const classesTitle = classNames(`${classPrefix$3}__titles`, {
12654
- [`${classPrefix$3}__titles--${activeType}`]: activeType,
12655
- [`${classPrefix$3}__titles--scrollable`]: true,
12656
- [`${classPrefix$3}__titles--${align}`]: align
12597
+ const classesTitle = classNames(`${classPrefix$a}__titles`, {
12598
+ [`${classPrefix$a}__titles--${activeType}`]: activeType,
12599
+ [`${classPrefix$a}__titles--scrollable`]: true,
12600
+ [`${classPrefix$a}__titles--${align}`]: align
12657
12601
  });
12658
12602
  const tabsActiveStyle = {
12659
12603
  color: activeType === "smile" ? activeColor : "",
@@ -12682,7 +12626,7 @@ Please add \`${key}Action\` when creating your handler.`);
12682
12626
  onClick: (e) => {
12683
12627
  tabChange(item);
12684
12628
  },
12685
- className: classNames(`${classPrefix$3}__titles-item`, {
12629
+ className: classNames(`${classPrefix$a}__titles-item`, {
12686
12630
  [`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
12687
12631
  [`nut-tabs__titles-item--disabled`]: item.disabled,
12688
12632
  [`nut-tabs__titles-item--${align}`]: align
@@ -12692,14 +12636,14 @@ Please add \`${key}Action\` when creating your handler.`);
12692
12636
  activeType === "line" && /* @__PURE__ */ jsxRuntimeExports.jsx(
12693
12637
  "div",
12694
12638
  {
12695
- className: `${classPrefix$3}__titles-item__line`,
12639
+ className: `${classPrefix$a}__titles-item__line`,
12696
12640
  style: tabsActiveStyle
12697
12641
  }
12698
12642
  ),
12699
12643
  activeType === "smile" && /* @__PURE__ */ jsxRuntimeExports.jsx(
12700
12644
  "div",
12701
12645
  {
12702
- className: `${classPrefix$3}__titles-item__smile`,
12646
+ className: `${classPrefix$a}__titles-item__smile`,
12703
12647
  style: tabsActiveStyle,
12704
12648
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(x$7, { color: activeColor, width: 40, height: 20 })
12705
12649
  }
@@ -12711,7 +12655,7 @@ Please add \`${key}Action\` when creating your handler.`);
12711
12655
  {
12712
12656
  ellipsis: true
12713
12657
  },
12714
- `${classPrefix$3}__titles-item__text`
12658
+ `${classPrefix$a}__titles-item__text`
12715
12659
  ),
12716
12660
  children: item.title
12717
12661
  }
@@ -12721,7 +12665,7 @@ Please add \`${key}Action\` when creating your handler.`);
12721
12665
  item.value
12722
12666
  );
12723
12667
  }) }),
12724
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$3}__content__wrap`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$3}__content`, style: contentStyle, children: React.Children.map(children, (child, idx) => {
12668
+ /* @__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) => {
12725
12669
  if (!React.isValidElement(child)) {
12726
12670
  return null;
12727
12671
  }
@@ -12739,10 +12683,130 @@ Please add \`${key}Action\` when creating your handler.`);
12739
12683
  }) }) })
12740
12684
  ] });
12741
12685
  };
12742
- Tabs.defaultProps = defaultProps$15;
12686
+ Tabs.defaultProps = defaultProps$14;
12743
12687
  Tabs.displayName = "NutTabs";
12744
12688
  Tabs.TabPane = TabPane;
12745
- const defaultProps$14 = {
12689
+ var classnameExports = {};
12690
+ var classname = {
12691
+ get exports() {
12692
+ return classnameExports;
12693
+ },
12694
+ set exports(v) {
12695
+ classnameExports = v;
12696
+ }
12697
+ };
12698
+ var classname_production_min = {};
12699
+ var hasRequiredClassname_production_min;
12700
+ function requireClassname_production_min() {
12701
+ if (hasRequiredClassname_production_min)
12702
+ return classname_production_min;
12703
+ hasRequiredClassname_production_min = 1;
12704
+ function r(r2) {
12705
+ function t2(t3, i, a2, o) {
12706
+ var f = i ? e + t3 + r2.e + i : e + t3, v = f;
12707
+ if (a2) {
12708
+ var s = " " + v + r2.m;
12709
+ for (var u in a2)
12710
+ if (a2.hasOwnProperty(u)) {
12711
+ var p = a2[u];
12712
+ true === p ? v += s + u : p && (v += s + u + n + p);
12713
+ }
12714
+ }
12715
+ if (void 0 !== o)
12716
+ for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
12717
+ var l2 = o[y2];
12718
+ if (l2 && "string" == typeof l2.valueOf())
12719
+ for (var g = l2.valueOf().split(" "), d = 0; d < g.length; d++) {
12720
+ var h = g[d];
12721
+ h !== f && (v += " " + h);
12722
+ }
12723
+ }
12724
+ return v;
12725
+ }
12726
+ var e = r2.n || "", n = r2.v || r2.m;
12727
+ return function(r3, e2) {
12728
+ return function(n2, i, a2) {
12729
+ return "string" == typeof n2 ? "string" == typeof i || Array.isArray(i) ? t2(r3, n2, void 0, i) : t2(r3, n2, i, a2) : t2(r3, e2, n2, i);
12730
+ };
12731
+ };
12732
+ }
12733
+ Object.defineProperty(classname_production_min, "__esModule", { value: true });
12734
+ var t = r({ e: "-", m: "_" });
12735
+ classname_production_min.cn = t, classname_production_min.withNaming = r;
12736
+ return classname_production_min;
12737
+ }
12738
+ var classname_development = {};
12739
+ var hasRequiredClassname_development;
12740
+ function requireClassname_development() {
12741
+ if (hasRequiredClassname_development)
12742
+ return classname_development;
12743
+ hasRequiredClassname_development = 1;
12744
+ Object.defineProperty(classname_development, "__esModule", { value: true });
12745
+ function withNaming(preset) {
12746
+ var nameSpace = preset.n || "";
12747
+ var modValueDelimiter = preset.v || preset.m;
12748
+ function stringify(b, e, m, mix) {
12749
+ var entityName = e ? nameSpace + b + preset.e + e : nameSpace + b;
12750
+ var className = entityName;
12751
+ if (m) {
12752
+ var modPrefix = " " + className + preset.m;
12753
+ for (var k2 in m) {
12754
+ if (m.hasOwnProperty(k2)) {
12755
+ var modVal = m[k2];
12756
+ if (modVal === true) {
12757
+ className += modPrefix + k2;
12758
+ } else if (modVal) {
12759
+ className += modPrefix + k2 + modValueDelimiter + modVal;
12760
+ }
12761
+ }
12762
+ }
12763
+ }
12764
+ if (mix !== void 0) {
12765
+ mix = Array.isArray(mix) ? mix : [mix];
12766
+ for (var i = 0, len = mix.length; i < len; i++) {
12767
+ var value = mix[i];
12768
+ if (!value || typeof value.valueOf() !== "string")
12769
+ continue;
12770
+ var mixes = value.valueOf().split(" ");
12771
+ for (var j = 0; j < mixes.length; j++) {
12772
+ var val = mixes[j];
12773
+ if (val !== entityName) {
12774
+ className += " " + val;
12775
+ }
12776
+ }
12777
+ }
12778
+ }
12779
+ return className;
12780
+ }
12781
+ return function cnGenerator(b, e) {
12782
+ return function(elemOrMods, elemModsOrBlockMix, elemMix) {
12783
+ if (typeof elemOrMods === "string") {
12784
+ if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
12785
+ return stringify(b, elemOrMods, void 0, elemModsOrBlockMix);
12786
+ }
12787
+ return stringify(b, elemOrMods, elemModsOrBlockMix, elemMix);
12788
+ }
12789
+ return stringify(b, e, elemOrMods, elemModsOrBlockMix);
12790
+ };
12791
+ };
12792
+ }
12793
+ var cn2 = withNaming({
12794
+ e: "-",
12795
+ m: "_"
12796
+ });
12797
+ classname_development.cn = cn2;
12798
+ classname_development.withNaming = withNaming;
12799
+ return classname_development;
12800
+ }
12801
+ (function(module2) {
12802
+ if (process.env.NODE_ENV === "production") {
12803
+ module2.exports = requireClassname_production_min();
12804
+ } else {
12805
+ module2.exports = requireClassname_development();
12806
+ }
12807
+ })(classname);
12808
+ const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
12809
+ const defaultProps$13 = {
12746
12810
  type: "custom",
12747
12811
  existAddress: [],
12748
12812
  defaultIcon: null,
@@ -12764,7 +12828,7 @@ Please add \`${key}Action\` when creating your handler.`);
12764
12828
  onClose,
12765
12829
  onSwitchModule,
12766
12830
  ...rest
12767
- } = { ...defaultProps$14, ...props };
12831
+ } = { ...defaultProps$13, ...props };
12768
12832
  const b = cn("address");
12769
12833
  const selectedExist = (item) => {
12770
12834
  const copyExistAdd = existAddress;
@@ -12806,7 +12870,7 @@ Please add \`${key}Action\` when creating your handler.`);
12806
12870
  isShowCustomAddress && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b("choose-other"), onClick: onSwitch, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b("choose-other-btn"), children: customAndExistTitle || locale.address.chooseAnotherAddress }) })
12807
12871
  ] });
12808
12872
  };
12809
- const defaultProps$13 = {
12873
+ const defaultProps$12 = {
12810
12874
  modelValue: [],
12811
12875
  type: "custom",
12812
12876
  province: [],
@@ -12831,7 +12895,7 @@ Please add \`${key}Action\` when creating your handler.`);
12831
12895
  onClose,
12832
12896
  ...rest
12833
12897
  } = {
12834
- ...defaultProps$13,
12898
+ ...defaultProps$12,
12835
12899
  ...props
12836
12900
  };
12837
12901
  const b = cn("address");
@@ -13000,28 +13064,28 @@ Please add \`${key}Action\` when creating your handler.`);
13000
13064
  nextAreaList(item);
13001
13065
  };
13002
13066
  React.useEffect(() => {
13003
- const { province: province2 } = { ...defaultProps$13, ...props };
13067
+ const { province: province2 } = { ...defaultProps$12, ...props };
13004
13068
  setRegionList({
13005
13069
  ...regionList,
13006
13070
  province: isCustom2() ? transformData(province2) : province2
13007
13071
  });
13008
13072
  }, [province]);
13009
13073
  React.useEffect(() => {
13010
- const { city: city2 } = { ...defaultProps$13, ...props };
13074
+ const { city: city2 } = { ...defaultProps$12, ...props };
13011
13075
  setRegionList({
13012
13076
  ...regionList,
13013
13077
  city: isCustom2() ? transformData(city2) : city2
13014
13078
  });
13015
13079
  }, [city]);
13016
13080
  React.useEffect(() => {
13017
- const { country: country2 } = { ...defaultProps$13, ...props };
13081
+ const { country: country2 } = { ...defaultProps$12, ...props };
13018
13082
  setRegionList({
13019
13083
  ...regionList,
13020
13084
  country: isCustom2() ? transformData(country2) : country2
13021
13085
  });
13022
13086
  }, [country]);
13023
13087
  React.useEffect(() => {
13024
- const { town: town2 } = { ...defaultProps$13, ...props };
13088
+ const { town: town2 } = { ...defaultProps$12, ...props };
13025
13089
  setRegionList({
13026
13090
  ...regionList,
13027
13091
  town: isCustom2() ? transformData(town2) : town2
@@ -13096,7 +13160,7 @@ Please add \`${key}Action\` when creating your handler.`);
13096
13160
  ) })
13097
13161
  ] });
13098
13162
  };
13099
- const defaultProps$12 = {
13163
+ const defaultProps$11 = {
13100
13164
  ...ComponentDefaults,
13101
13165
  modelValue: false,
13102
13166
  modelSelect: [],
@@ -13147,7 +13211,7 @@ Please add \`${key}Action\` when creating your handler.`);
13147
13211
  className,
13148
13212
  ...rest
13149
13213
  } = {
13150
- ...defaultProps$12,
13214
+ ...defaultProps$11,
13151
13215
  ...props
13152
13216
  };
13153
13217
  const b = cn("address");
@@ -13305,7 +13369,7 @@ Please add \`${key}Action\` when creating your handler.`);
13305
13369
  }
13306
13370
  ) });
13307
13371
  };
13308
- Address.defaultProps = defaultProps$12;
13372
+ Address.defaultProps = defaultProps$11;
13309
13373
  Address.displayName = "NutAddress";
13310
13374
  const Utils = {
13311
13375
  /**
@@ -13425,7 +13489,7 @@ Please add \`${key}Action\` when creating your handler.`);
13425
13489
  return false;
13426
13490
  }
13427
13491
  };
13428
- const defaultProps$11 = {
13492
+ const defaultProps$10 = {
13429
13493
  type: "one",
13430
13494
  isAutoBackFill: false,
13431
13495
  poppable: true,
@@ -13477,7 +13541,7 @@ Please add \`${key}Action\` when creating your handler.`);
13477
13541
  onUpdate,
13478
13542
  onSelected,
13479
13543
  onYearMonthChange
13480
- } = { ...defaultProps$11, ...props };
13544
+ } = { ...defaultProps$10, ...props };
13481
13545
  const weeks = locale.calendaritem.weekdays;
13482
13546
  const [yearMonthTitle, setYearMonthTitle] = React.useState("");
13483
13547
  const [monthsData, setMonthsData] = React.useState([]);
@@ -14073,9 +14137,9 @@ Please add \`${key}Action\` when creating your handler.`);
14073
14137
  poppable && !isAutoBackFill ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-calendar-footer", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "calendar-confirm-btn", onClick: confirm2, children: confirmText || locale.confirm }) }) : ""
14074
14138
  ] }) });
14075
14139
  });
14076
- CalendarItem.defaultProps = defaultProps$11;
14140
+ CalendarItem.defaultProps = defaultProps$10;
14077
14141
  CalendarItem.displayName = "NutCalendarItem";
14078
- const defaultProps$10 = {
14142
+ const defaultProps$$ = {
14079
14143
  type: "one",
14080
14144
  isAutoBackFill: false,
14081
14145
  poppable: true,
@@ -14130,7 +14194,7 @@ Please add \`${key}Action\` when creating your handler.`);
14130
14194
  onChoose,
14131
14195
  onSelected,
14132
14196
  onYearMonthChange
14133
- } = { ...defaultProps$10, ...props };
14197
+ } = { ...defaultProps$$, ...props };
14134
14198
  const calendarRef = React.useRef(null);
14135
14199
  const close = () => {
14136
14200
  onClose && onClose();
@@ -14200,9 +14264,9 @@ Please add \`${key}Action\` when creating your handler.`);
14200
14264
  }
14201
14265
  ) : renderItem() });
14202
14266
  });
14203
- Calendar.defaultProps = defaultProps$10;
14267
+ Calendar.defaultProps = defaultProps$$;
14204
14268
  Calendar.displayName = "NutCalendar";
14205
- const defaultProps$$ = {
14269
+ const defaultProps$_ = {
14206
14270
  data: {
14207
14271
  text: "",
14208
14272
  value: "",
@@ -14219,7 +14283,7 @@ Please add \`${key}Action\` when creating your handler.`);
14219
14283
  };
14220
14284
  const InternalCascaderItem = (props, ref) => {
14221
14285
  const { data, checked, checkedIcon, chooseItem, activeColor } = {
14222
- ...defaultProps$$,
14286
+ ...defaultProps$_,
14223
14287
  ...props
14224
14288
  };
14225
14289
  const b = cn("cascader-item");
@@ -14252,13 +14316,13 @@ Please add \`${key}Action\` when creating your handler.`);
14252
14316
  },
14253
14317
  children: [
14254
14318
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classesTitle, children: data.text }),
14255
- data.loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(k$2, { color: "#969799", className: "nut-cascader-item__icon-loading" }) : renderIcon()
14319
+ data.loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(k$3, { color: "#969799", className: "nut-cascader-item__icon-loading" }) : renderIcon()
14256
14320
  ]
14257
14321
  }
14258
14322
  );
14259
14323
  };
14260
14324
  const CascaderItem = React.forwardRef(InternalCascaderItem);
14261
- CascaderItem.defaultProps = defaultProps$$;
14325
+ CascaderItem.defaultProps = defaultProps$_;
14262
14326
  CascaderItem.displayName = "NutCascaderItem";
14263
14327
  const formatTree = (tree, parent, config2) => tree.map((node) => {
14264
14328
  const {
@@ -14396,7 +14460,7 @@ Please add \`${key}Action\` when creating your handler.`);
14396
14460
  }
14397
14461
  }
14398
14462
  const Tree$1 = Tree;
14399
- const defaultProps$_ = {
14463
+ const defaultProps$Z = {
14400
14464
  className: "",
14401
14465
  style: {},
14402
14466
  activeColor: "",
@@ -14447,7 +14511,7 @@ Please add \`${key}Action\` when creating your handler.`);
14447
14511
  onClose,
14448
14512
  onChange,
14449
14513
  onPathChange
14450
- } = { ...defaultProps$_, ...props };
14514
+ } = { ...defaultProps$Z, ...props };
14451
14515
  const [tabvalue, setTabvalue] = React.useState("c1");
14452
14516
  const [optionsData, setOptionsData] = React.useState([]);
14453
14517
  const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
@@ -14722,23 +14786,22 @@ Please add \`${key}Action\` when creating your handler.`);
14722
14786
  ) : renderItem() });
14723
14787
  };
14724
14788
  const Cascader = React.forwardRef(InternalCascader);
14725
- Cascader.defaultProps = defaultProps$_;
14789
+ Cascader.defaultProps = defaultProps$Z;
14726
14790
  Cascader.displayName = "NutCascader";
14727
14791
  const CheckboxGroupContext = React.createContext(null);
14728
14792
  const Context = CheckboxGroupContext;
14729
- const defaultProps$Z = {
14730
- disabled: false,
14793
+ const defaultProps$Y = {
14731
14794
  max: void 0,
14732
- textPosition: "right",
14795
+ labelPosition: "right",
14733
14796
  direction: "vertical",
14734
14797
  onChange: (value) => {
14735
14798
  },
14736
14799
  options: []
14737
14800
  };
14801
+ const classPrefix$9 = "nut-checkboxgroup";
14738
14802
  const CheckboxGroup = React.forwardRef(
14739
14803
  (props, ref) => {
14740
- const { children } = { ...defaultProps$Z, ...props };
14741
- const b = cn("checkboxgroup");
14804
+ const { children } = { ...defaultProps$Y, ...props };
14742
14805
  const {
14743
14806
  className,
14744
14807
  disabled,
@@ -14746,29 +14809,29 @@ Please add \`${key}Action\` when creating your handler.`);
14746
14809
  value,
14747
14810
  defaultValue,
14748
14811
  max,
14749
- textPosition,
14812
+ labelPosition,
14750
14813
  direction,
14751
14814
  options: options2,
14752
14815
  ...rest
14753
14816
  } = props;
14754
14817
  React.useImperativeHandle(ref, () => ({
14755
- toggleAll(state) {
14818
+ toggle(state) {
14756
14819
  if (state === false) {
14757
14820
  setValue([]);
14758
14821
  } else {
14759
14822
  const childrenLabel = [];
14760
14823
  React.Children.map(children, (child) => {
14761
14824
  const childProps = child.props;
14762
- childrenLabel.push(childProps.label || child.children);
14825
+ childrenLabel.push(childProps.value);
14763
14826
  });
14764
14827
  setValue(childrenLabel);
14765
14828
  }
14766
14829
  },
14767
- toggleReverse() {
14830
+ reverse() {
14768
14831
  const childrenLabel = [];
14769
14832
  React.Children.map(children, (child) => {
14770
14833
  const childProps = child.props;
14771
- childrenLabel.push(childProps.label || child.children);
14834
+ childrenLabel.push(childProps.value);
14772
14835
  });
14773
14836
  const reverse = childrenLabel.filter(
14774
14837
  (c) => (_value == null ? void 0 : _value.findIndex((v) => v === c)) === -1
@@ -14787,8 +14850,9 @@ Please add \`${key}Action\` when creating your handler.`);
14787
14850
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
14788
14851
  Checkbox,
14789
14852
  {
14790
- children: label,
14791
- label: value2,
14853
+ label,
14854
+ disabled: disabled2,
14855
+ value: value2,
14792
14856
  ...rest2
14793
14857
  },
14794
14858
  value2 == null ? void 0 : value2.toString()
@@ -14799,25 +14863,26 @@ Please add \`${key}Action\` when creating your handler.`);
14799
14863
  Context.Provider,
14800
14864
  {
14801
14865
  value: {
14802
- textPosition: textPosition || "left",
14866
+ labelPosition: labelPosition || "right",
14803
14867
  disabled,
14804
14868
  max,
14805
- checkedValue: _value,
14869
+ value: _value,
14806
14870
  check: (value2) => {
14807
14871
  const combined = [..._value, value2];
14808
14872
  setValue(combined);
14809
- onChange && onChange(combined);
14810
14873
  },
14811
14874
  uncheck: (value2) => {
14812
14875
  const reduced = _value.filter((item) => item !== value2);
14813
14876
  setValue(reduced);
14814
- onChange && onChange(reduced);
14815
14877
  }
14816
14878
  },
14817
14879
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
14818
14880
  "div",
14819
14881
  {
14820
- className: `${b()} nut-checkboxgroup--${props.direction} ${className || ""}`,
14882
+ className: classNames(classPrefix$9, {
14883
+ [`nut-checkboxgroup--${props.direction}`]: props.direction,
14884
+ className
14885
+ }),
14821
14886
  ...rest,
14822
14887
  children: (options2 == null ? void 0 : options2.length) ? renderOptions() : children
14823
14888
  }
@@ -14826,112 +14891,117 @@ Please add \`${key}Action\` when creating your handler.`);
14826
14891
  );
14827
14892
  }
14828
14893
  );
14829
- CheckboxGroup.defaultProps = defaultProps$Z;
14894
+ CheckboxGroup.defaultProps = defaultProps$Y;
14830
14895
  CheckboxGroup.displayName = "NutCheckboxGroup";
14831
- const defaultProps$Y = {
14896
+ const defaultProps$X = {
14832
14897
  ...ComponentDefaults,
14833
14898
  disabled: false,
14834
- textPosition: "right",
14835
- iconSize: 18,
14836
- icon: "check-normal",
14837
- checkedIcon: "checked",
14838
- iconClassPrefix: "nut-icon",
14839
- iconFontClassName: "nutui-iconfont",
14840
- indeterminateIcon: "check-disabled",
14841
- onChange: (state) => {
14899
+ labelPosition: "right",
14900
+ icon: null,
14901
+ activeIcon: null,
14902
+ indeterminateIcon: null,
14903
+ onChange: (value) => {
14842
14904
  }
14843
14905
  };
14906
+ const classPrefix$8 = "nut-checkbox";
14844
14907
  const Checkbox = (props) => {
14845
14908
  const { children } = {
14846
- ...defaultProps$Y,
14909
+ ...defaultProps$X,
14847
14910
  ...props
14848
14911
  };
14849
- const b = cn("checkbox");
14850
14912
  const {
14851
14913
  icon,
14852
- iconSize,
14853
14914
  label,
14854
14915
  className,
14855
- checkedIcon,
14916
+ activeIcon,
14856
14917
  checked,
14918
+ value,
14857
14919
  defaultChecked,
14858
14920
  disabled,
14859
14921
  onChange,
14860
14922
  indeterminate,
14861
- iconClassPrefix,
14862
- iconFontClassName,
14863
14923
  indeterminateIcon,
14864
14924
  ...others
14865
14925
  } = props;
14866
- let { textPosition, ...rest } = others;
14926
+ let { labelPosition, ...rest } = others;
14867
14927
  const ctx2 = React.useContext(Context);
14868
- let [_checked, setChecked] = usePropsValue({
14928
+ let [innerChecked, setChecked] = usePropsValue({
14869
14929
  value: props.checked,
14870
14930
  defaultValue: props.defaultChecked,
14871
14931
  finalValue: defaultChecked,
14872
14932
  onChange
14873
14933
  });
14874
14934
  let [innerDisabled, setDisabled] = React.useState(disabled);
14875
- const [_indeterminate, setIndeterminate] = React.useState(indeterminate);
14935
+ const [innerIndeterminate, setIndeterminate] = React.useState(indeterminate);
14876
14936
  React.useEffect(() => {
14877
- !ctx2 && setChecked(checked);
14878
14937
  setDisabled(disabled);
14938
+ }, [disabled]);
14939
+ React.useEffect(() => {
14879
14940
  setIndeterminate(indeterminate);
14880
- }, [disabled, indeterminate]);
14941
+ }, [indeterminate]);
14881
14942
  if (ctx2) {
14882
- if (ctx2.textPosition !== void 0) {
14883
- textPosition = ctx2.textPosition;
14943
+ if (ctx2.labelPosition !== void 0) {
14944
+ labelPosition = ctx2.labelPosition;
14884
14945
  }
14885
- innerDisabled = ctx2.disabled;
14886
- _checked = ctx2.checkedValue.includes(label);
14946
+ innerDisabled = ctx2.disabled !== void 0 ? ctx2.disabled : innerDisabled;
14947
+ innerChecked = ctx2.value.includes(value);
14887
14948
  setChecked = (checked2) => {
14888
14949
  if (ctx2.disabled)
14889
14950
  return;
14890
14951
  if (checked2)
14891
- ctx2.check(label);
14952
+ ctx2.check(value);
14892
14953
  if (!checked2)
14893
- ctx2.uncheck(label);
14954
+ ctx2.uncheck(value);
14894
14955
  };
14895
14956
  }
14896
14957
  const renderIcon = () => {
14897
- if (!_checked) {
14898
- return React.isValidElement(icon) ? icon : /* @__PURE__ */ jsxRuntimeExports.jsx(N, { width: iconSize, height: iconSize, className: color() });
14958
+ if (!innerChecked) {
14959
+ return React.isValidElement(icon) ? icon : /* @__PURE__ */ jsxRuntimeExports.jsx(N, { className: color() });
14899
14960
  }
14900
- if (_indeterminate) {
14901
- return React.isValidElement(indeterminateIcon) ? indeterminateIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(x$f, { width: iconSize, height: iconSize, className: color() });
14961
+ if (innerIndeterminate) {
14962
+ return React.isValidElement(indeterminateIcon) ? indeterminateIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(x$f, { className: color() });
14902
14963
  }
14903
- return React.isValidElement(checkedIcon) ? checkedIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(x$d, { width: iconSize, height: iconSize, className: color() });
14964
+ return React.isValidElement(activeIcon) ? activeIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(x$d, { className: color() });
14904
14965
  };
14905
14966
  const color = () => {
14906
14967
  if (innerDisabled) {
14907
- return "nut-checkbox__icon--disable";
14968
+ return `${classPrefix$8}__icon--disable`;
14908
14969
  }
14909
- if (_checked) {
14910
- if (_indeterminate) {
14911
- return "nut-checkbox__icon--indeterminate";
14970
+ if (innerChecked) {
14971
+ if (innerIndeterminate) {
14972
+ return `${classPrefix$8}__icon--indeterminate`;
14912
14973
  }
14913
- return "nut-checkbox__icon";
14974
+ return `${classPrefix$8}__icon`;
14914
14975
  }
14915
- return "nut-checkbox__icon--unchecked";
14976
+ return `${classPrefix$8}__icon--unchecked`;
14916
14977
  };
14917
14978
  const renderLabel = () => {
14918
- return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `${b("label", { disabled: innerDisabled })} `, children: children || label });
14979
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
14980
+ "span",
14981
+ {
14982
+ className: classNames(`${classPrefix$8}__label `, {
14983
+ [`${classPrefix$8}__label--disabled`]: innerDisabled
14984
+ }),
14985
+ children: children || label
14986
+ }
14987
+ );
14919
14988
  };
14920
14989
  const handleClick2 = () => {
14921
14990
  if (disabled)
14922
14991
  return;
14923
- const latestChecked = !_checked;
14992
+ const latestChecked = !innerChecked;
14924
14993
  if (ctx2 && ctx2.max !== void 0) {
14925
- if (latestChecked && ctx2.checkedValue.length >= ctx2.max)
14994
+ if (latestChecked && ctx2.value.length >= ctx2.max)
14926
14995
  return;
14927
14996
  }
14928
- onChange && onChange(latestChecked, label || children);
14929
14997
  setChecked(latestChecked);
14930
14998
  };
14931
14999
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
14932
15000
  "div",
14933
15001
  {
14934
- className: `${b({ reverse: textPosition === "left" })} ${className || ""}`,
15002
+ className: classNames(classPrefix$8, className, {
15003
+ [`${classPrefix$8}--reverse`]: labelPosition === "left"
15004
+ }),
14935
15005
  ...rest,
14936
15006
  onClick: handleClick2,
14937
15007
  children: [
@@ -14941,7 +15011,7 @@ Please add \`${key}Action\` when creating your handler.`);
14941
15011
  }
14942
15012
  );
14943
15013
  };
14944
- Checkbox.defaultProps = defaultProps$Y;
15014
+ Checkbox.defaultProps = defaultProps$X;
14945
15015
  Checkbox.displayName = "NutCheckBox";
14946
15016
  Checkbox.Group = CheckboxGroup;
14947
15017
  const MIN_DISTANCE = 10;
@@ -15448,7 +15518,7 @@ Please add \`${key}Action\` when creating your handler.`);
15448
15518
  const Picker = React.forwardRef(InternalPicker);
15449
15519
  const Picker$1 = Picker;
15450
15520
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
15451
- const defaultProps$X = {
15521
+ const defaultProps$W = {
15452
15522
  modelValue: null,
15453
15523
  visible: false,
15454
15524
  title: "",
@@ -15479,7 +15549,7 @@ Please add \`${key}Action\` when creating your handler.`);
15479
15549
  style,
15480
15550
  ...rest
15481
15551
  } = {
15482
- ...defaultProps$X,
15552
+ ...defaultProps$W,
15483
15553
  ...props
15484
15554
  };
15485
15555
  const { locale } = useConfig();
@@ -15756,7 +15826,7 @@ Please add \`${key}Action\` when creating your handler.`);
15756
15826
  }
15757
15827
  );
15758
15828
  };
15759
- DatePicker.defaultProps = defaultProps$X;
15829
+ DatePicker.defaultProps = defaultProps$W;
15760
15830
  DatePicker.displayName = "NutDatePicker";
15761
15831
  const FormItemContext = React.createContext({});
15762
15832
  function _extends() {
@@ -16947,7 +17017,7 @@ Please add \`${key}Action\` when creating your handler.`);
16947
17017
  }
16948
17018
  return [formRef.current];
16949
17019
  };
16950
- const defaultProps$W = {
17020
+ const defaultProps$V = {
16951
17021
  ...ComponentDefaults,
16952
17022
  name: "",
16953
17023
  label: "",
@@ -17009,7 +17079,7 @@ Please add \`${key}Action\` when creating your handler.`);
17009
17079
  showErrorLine,
17010
17080
  showErrorMessage
17011
17081
  } = {
17012
- ...defaultProps$W,
17082
+ ...defaultProps$V,
17013
17083
  ...this.props
17014
17084
  };
17015
17085
  const item = ((_a2 = this.context.errList) == null ? void 0 : _a2.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
@@ -17076,9 +17146,9 @@ Please add \`${key}Action\` when creating your handler.`);
17076
17146
  return this.renderLayout(returnChildNode);
17077
17147
  }
17078
17148
  }
17079
- __publicField(FormItem, "defaultProps", defaultProps$W);
17149
+ __publicField(FormItem, "defaultProps", defaultProps$V);
17080
17150
  __publicField(FormItem, "contextType", FormItemContext);
17081
- const defaultProps$V = {
17151
+ const defaultProps$U = {
17082
17152
  ...ComponentDefaults,
17083
17153
  className: "",
17084
17154
  style: void 0,
@@ -17106,7 +17176,7 @@ Please add \`${key}Action\` when creating your handler.`);
17106
17176
  form,
17107
17177
  ...rest
17108
17178
  } = {
17109
- ...defaultProps$V,
17179
+ ...defaultProps$U,
17110
17180
  ...props
17111
17181
  };
17112
17182
  let formInstance = {};
@@ -17138,7 +17208,7 @@ Please add \`${key}Action\` when creating your handler.`);
17138
17208
  }
17139
17209
  );
17140
17210
  };
17141
- Form.defaultProps = defaultProps$V;
17211
+ Form.defaultProps = defaultProps$U;
17142
17212
  Form.displayName = "NutForm";
17143
17213
  Form.Item = FormItem;
17144
17214
  Form.useForm = useForm;
@@ -17163,359 +17233,192 @@ Please add \`${key}Action\` when creating your handler.`);
17163
17233
  } else {
17164
17234
  value = value.replace(/-/, "");
17165
17235
  }
17166
- const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
17167
- return value.replace(regExp, "");
17168
- }
17169
- const defaultProps$U = {
17170
- ...ComponentDefaults,
17171
- type: "text",
17172
- name: "",
17173
- defaultValue: "",
17174
- placeholder: "",
17175
- label: "",
17176
- labelClass: "",
17177
- labelWidth: "80",
17178
- labelAlign: "left",
17179
- colon: false,
17180
- inputAlign: "left",
17181
- center: false,
17182
- required: false,
17183
- disabled: false,
17184
- readonly: false,
17185
- error: false,
17186
- maxlength: "9999",
17187
- leftIcon: null,
17188
- rightIcon: null,
17189
- clearable: false,
17190
- clearIcon: null,
17191
- clearSize: "14",
17192
- border: true,
17193
- formatTrigger: "onChange",
17194
- rules: [],
17195
- rows: null,
17196
- errorMessage: "",
17197
- errorMessageAlign: "",
17198
- showWordLimit: false,
17199
- autofocus: false,
17200
- slotButton: null,
17201
- slotInput: null
17202
- };
17203
- const Input = React.forwardRef((props, ref) => {
17204
- const { locale } = useConfig();
17205
- const {
17206
- children,
17207
- type: type2,
17208
- name,
17209
- defaultValue,
17210
- placeholder,
17211
- label,
17212
- labelClass,
17213
- labelWidth,
17214
- labelAlign,
17215
- colon,
17216
- inputAlign,
17217
- center,
17218
- required: required2,
17219
- disabled,
17220
- readonly,
17221
- error,
17222
- maxlength,
17223
- leftIcon,
17224
- rightIcon,
17225
- clearable,
17226
- clearIcon,
17227
- clearSize,
17228
- border,
17229
- formatTrigger,
17230
- rules: rules2,
17231
- errorMessage,
17232
- errorMessageAlign,
17233
- showWordLimit,
17234
- autofocus,
17235
- style,
17236
- className,
17237
- rows,
17238
- slotButton,
17239
- slotInput,
17240
- onChange,
17241
- onBlur,
17242
- onFocus,
17243
- onClear,
17244
- formatter,
17245
- keypress,
17246
- onClickInput,
17247
- onClickLeftIcon,
17248
- onClickRightIcon,
17249
- onClick,
17250
- ...rest
17251
- } = {
17252
- ...defaultProps$U,
17253
- ...props
17254
- };
17255
- const inputPlaceholder = placeholder || locale.placeholder;
17256
- const [inputValue, SetInputValue] = React.useState("");
17257
- const [active, SetActive] = React.useState(false);
17258
- const [classes, setClasses] = React.useState("");
17259
- const getModelValue = () => String(inputValue ?? "");
17260
- const inputRef = React.useRef(null);
17261
- React.useEffect(() => {
17262
- setClasses(inputClass);
17263
- SetInputValue(defaultValue);
17264
- }, [defaultValue]);
17265
- React.useEffect(() => {
17266
- if (inputValue) {
17267
- updateValue(getModelValue());
17268
- resetValidation();
17269
- }
17270
- }, [inputValue]);
17271
- React.useImperativeHandle(ref, () => {
17272
- return inputRef.current;
17273
- });
17274
- const inputClass = React.useCallback(() => {
17275
- const prefixCls2 = "nut-input";
17276
- return [
17277
- prefixCls2,
17278
- `${center ? "center" : ""}`,
17279
- `${disabled ? `${prefixCls2}-disabled` : ""}`,
17280
- `${required2 ? `${prefixCls2}-required` : ""}`,
17281
- `${error ? `${prefixCls2}-error` : ""}`,
17282
- `${border ? `${prefixCls2}-border` : ""}`,
17283
- `${slotButton || rightIcon ? `${prefixCls2}-right-mark` : ""}`
17284
- ].filter(Boolean).join(" ");
17285
- }, [disabled, required2, error, border, slotButton, rightIcon, center]);
17286
- React.useEffect(() => {
17287
- setClasses(inputClass);
17288
- }, [disabled, required2, error, border, slotButton, rightIcon, center]);
17289
- const updateValue = (value, trigger = "onChange", event) => {
17290
- var _a2;
17291
- let val = value;
17292
- if (type2 === "digit" || type2 === "tel") {
17293
- val = formatNumber(val, false, false);
17294
- }
17295
- if (type2 === "number") {
17296
- val = formatNumber(val, true, true);
17297
- }
17298
- if (type2 === "tel" && !formatter) {
17299
- const regTel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
17300
- const regNumber = /[^-0-9]/g;
17301
- val = !regTel.test(val) && val.length > 11 ? val.substring(0, 11) : val.replace(regNumber, "");
17302
- }
17303
- if (formatter && trigger === formatTrigger) {
17304
- val = formatter(val);
17305
- }
17306
- if (((_a2 = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a2.value) !== val) {
17307
- inputRef.current.value = val;
17308
- }
17309
- SetInputValue(val);
17310
- };
17311
- const handleFocus = (event) => {
17312
- const val = event.target.value;
17313
- SetActive(true);
17314
- onFocus && onFocus(val, event);
17315
- };
17316
- const handleInput = (event) => {
17317
- let val = event.target.value;
17318
- if (maxlength && val.length > Number(maxlength)) {
17319
- val = val.slice(0, Number(maxlength));
17320
- }
17321
- updateValue(val, "onChange");
17322
- onChange && onChange(val, event);
17323
- };
17324
- const handleBlur = (event) => {
17325
- setTimeout(() => {
17326
- SetActive(false);
17327
- }, 200);
17328
- let val = event.target.value;
17329
- if (maxlength && val.length > Number(maxlength)) {
17330
- val = val.slice(0, Number(maxlength));
17331
- }
17332
- updateValue(val, "onBlur");
17333
- onBlur && onBlur(val, event);
17334
- };
17335
- const handleClickInput = (event) => {
17336
- onClickInput && onClickInput(event);
17337
- };
17338
- const handleClickLeftIcon = (event) => {
17339
- onClickLeftIcon && onClickLeftIcon(event);
17340
- };
17341
- const handleClickRightIcon = (event) => {
17342
- onClickRightIcon && onClickRightIcon(event);
17343
- };
17344
- const resetValidation = () => {
17345
- };
17346
- const inputType = (type22) => {
17347
- if (type22 === "number") {
17348
- return "text";
17349
- }
17350
- if (type22 === "digit") {
17351
- return "tel";
17352
- }
17353
- return type22;
17354
- };
17355
- const handleClear = (event) => {
17356
- updateValue("");
17357
- onClear && onClear("", event);
17358
- };
17359
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
17360
- "div",
17361
- {
17362
- className: `${classes} ${className || ""}`,
17236
+ const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
17237
+ return value.replace(regExp, "");
17238
+ }
17239
+ const defaultProps$T = {
17240
+ ...ComponentDefaults,
17241
+ type: "text",
17242
+ name: "",
17243
+ placeholder: "",
17244
+ confirmType: "done",
17245
+ align: "left",
17246
+ required: false,
17247
+ disabled: false,
17248
+ readOnly: false,
17249
+ maxLength: 9999,
17250
+ clearable: false,
17251
+ clearIcon: null,
17252
+ formatTrigger: "onChange",
17253
+ autoFocus: false
17254
+ };
17255
+ const Input = React.forwardRef(
17256
+ (props, ref) => {
17257
+ const { locale } = useConfig();
17258
+ const {
17259
+ type: type2,
17260
+ name,
17261
+ placeholder,
17262
+ align,
17263
+ disabled,
17264
+ readOnly,
17265
+ maxLength,
17266
+ clearable,
17267
+ clearIcon,
17268
+ formatTrigger,
17269
+ autoFocus,
17363
17270
  style,
17364
- ...rest,
17365
- onClick: (e) => {
17366
- onClick && onClick(e);
17367
- },
17368
- children: slotInput ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
17369
- label ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17370
- "div",
17371
- {
17372
- className: `nut-input-label ${labelClass}`,
17373
- style: { width: `${labelWidth}px`, textAlign: labelAlign },
17374
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "label-string", children: [
17375
- label,
17376
- colon ? ":" : ""
17377
- ] })
17378
- }
17379
- ) : null,
17380
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-value", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
17381
- "div",
17382
- {
17383
- className: "nut-input-inner",
17384
- onClick: (e) => {
17385
- handleClickInput(e);
17386
- },
17387
- children: slotInput
17388
- }
17389
- ) })
17390
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
17391
- React.isValidElement(leftIcon) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17392
- "div",
17393
- {
17394
- className: "nut-input-left-icon",
17395
- onClick: (e) => {
17396
- handleClickLeftIcon(e);
17397
- },
17398
- children: leftIcon
17399
- }
17400
- ) : null,
17401
- label ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17402
- "div",
17403
- {
17404
- className: `nut-input-label ${labelClass}`,
17405
- style: { width: `${labelWidth}px`, textAlign: labelAlign },
17406
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "label-string", children: [
17407
- label,
17408
- colon ? ":" : ""
17409
- ] })
17410
- }
17411
- ) : null,
17412
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-input-value", children: [
17413
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-input-main-con", children: [
17414
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
17415
- "div",
17416
- {
17417
- className: "nut-input-inner",
17418
- onClick: (e) => {
17419
- handleClickInput(e);
17420
- },
17421
- children: [
17422
- type2 === "textarea" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17423
- "textarea",
17424
- {
17425
- name,
17426
- className: "input-text",
17427
- ref: inputRef,
17428
- style: {
17429
- textAlign: inputAlign,
17430
- height: `${Number(rows) * 24}px`
17431
- },
17432
- maxLength: maxlength,
17433
- placeholder: inputPlaceholder,
17434
- disabled,
17435
- readOnly: readonly,
17436
- value: inputValue,
17437
- autoFocus: autofocus,
17438
- onBlur: (e) => {
17439
- handleBlur(e);
17440
- },
17441
- onFocus: (e) => {
17442
- handleFocus(e);
17443
- },
17444
- onInput: (e) => {
17445
- handleInput(e);
17446
- }
17447
- }
17448
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
17449
- "input",
17450
- {
17451
- name,
17452
- className: "input-text",
17453
- ref: inputRef,
17454
- style: { textAlign: inputAlign },
17455
- type: inputType(type2),
17456
- maxLength: maxlength,
17457
- placeholder: inputPlaceholder,
17458
- disabled,
17459
- readOnly: readonly,
17460
- value: inputValue,
17461
- autoFocus: autofocus,
17462
- onBlur: (e) => {
17463
- handleBlur(e);
17464
- },
17465
- onFocus: (e) => {
17466
- handleFocus(e);
17467
- },
17468
- onInput: (e) => {
17469
- handleInput(e);
17470
- }
17471
- }
17472
- ),
17473
- clearable && !readonly && active && inputValue.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17474
- "span",
17475
- {
17476
- className: "nut-input-clear-wrap",
17477
- onClick: (e) => handleClear(e),
17478
- children: clearIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(x$4, { className: "nut-input-clear" })
17479
- }
17480
- ) : null
17481
- ]
17482
- }
17483
- ),
17484
- React.isValidElement(rightIcon) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17485
- "div",
17486
- {
17487
- className: "nut-input-right-icon",
17488
- onClick: (e) => {
17489
- handleClickRightIcon(e);
17490
- },
17491
- children: rightIcon
17271
+ className,
17272
+ onChange,
17273
+ onFocus,
17274
+ onClear,
17275
+ formatter,
17276
+ onClick,
17277
+ confirmType,
17278
+ defaultValue,
17279
+ value: _value,
17280
+ ...rest
17281
+ } = {
17282
+ ...defaultProps$T,
17283
+ ...props
17284
+ };
17285
+ const [value, setValue] = usePropsValue({
17286
+ value: props.value,
17287
+ defaultValue: props.defaultValue,
17288
+ finalValue: "",
17289
+ onChange
17290
+ });
17291
+ const inputRef = React.useRef(null);
17292
+ const composingRef = React.useRef(false);
17293
+ const [active, setActive] = React.useState(false);
17294
+ React.useImperativeHandle(ref, () => {
17295
+ return {
17296
+ clear: () => {
17297
+ setValue("");
17298
+ },
17299
+ focus: () => {
17300
+ var _a2;
17301
+ (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
17302
+ },
17303
+ blur: () => {
17304
+ var _a2;
17305
+ (_a2 = inputRef.current) == null ? void 0 : _a2.blur();
17306
+ },
17307
+ get nativeElement() {
17308
+ return inputRef.current;
17309
+ }
17310
+ };
17311
+ });
17312
+ const inputClass = React.useCallback(() => {
17313
+ const classPrefix2 = "nut-input";
17314
+ return [classPrefix2, `${disabled ? `${classPrefix2}-disabled` : ""}`].filter(Boolean).join(" ");
17315
+ }, [disabled]);
17316
+ const updateValue = (value2, trigger = "onChange") => {
17317
+ let val = value2;
17318
+ if (type2 === "number") {
17319
+ val = formatNumber(val, false, true);
17320
+ }
17321
+ if (type2 === "digit") {
17322
+ val = formatNumber(val, true, true);
17323
+ }
17324
+ if (formatter && trigger === formatTrigger) {
17325
+ val = formatter(val);
17326
+ }
17327
+ setValue(val);
17328
+ const eventHandler = props[trigger];
17329
+ if (eventHandler && typeof eventHandler === "function") {
17330
+ eventHandler(val);
17331
+ }
17332
+ };
17333
+ const handleFocus = (event) => {
17334
+ const val = event.target.value;
17335
+ onFocus && onFocus(val);
17336
+ setActive(true);
17337
+ };
17338
+ const handleInput = (value2) => {
17339
+ updateValue(value2, "onChange");
17340
+ };
17341
+ const handleBlur = (event) => {
17342
+ const val = event.target.value;
17343
+ updateValue(val, "onBlur");
17344
+ setActive(false);
17345
+ };
17346
+ const inputType = (type22) => {
17347
+ if (type22 === "digit") {
17348
+ return "text";
17349
+ }
17350
+ if (type22 === "number") {
17351
+ return "tel";
17352
+ }
17353
+ return type22;
17354
+ };
17355
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
17356
+ "div",
17357
+ {
17358
+ className: `${inputClass()} ${className || ""}`,
17359
+ style,
17360
+ onClick: (e) => {
17361
+ onClick && onClick(e);
17362
+ },
17363
+ children: [
17364
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
17365
+ "input",
17366
+ {
17367
+ ...rest,
17368
+ name,
17369
+ className: "nut-input-native",
17370
+ ref: inputRef,
17371
+ style: { textAlign: align },
17372
+ type: inputType(type2),
17373
+ maxLength,
17374
+ placeholder: placeholder || locale.placeholder,
17375
+ disabled,
17376
+ readOnly,
17377
+ value,
17378
+ autoFocus,
17379
+ enterKeyHint: confirmType,
17380
+ onBlur: (e) => {
17381
+ handleBlur(e);
17382
+ },
17383
+ onFocus: (e) => {
17384
+ handleFocus(e);
17385
+ },
17386
+ onChange: (e) => {
17387
+ handleInput(e.currentTarget.value);
17388
+ },
17389
+ onCompositionStart: (e) => {
17390
+ var _a2;
17391
+ composingRef.current = true;
17392
+ (_a2 = props.onCompositionStart) == null ? void 0 : _a2.call(props, e);
17393
+ },
17394
+ onCompositionEnd: (e) => {
17395
+ var _a2;
17396
+ composingRef.current = false;
17397
+ (_a2 = props.onCompositionEnd) == null ? void 0 : _a2.call(props, e);
17492
17398
  }
17493
- ) : null,
17494
- slotButton ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-button", children: slotButton }) : null,
17495
- showWordLimit && maxlength ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-input-word-limit", children: [
17496
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "nut-input-word-num", children: inputValue ? inputValue.length : 0 }),
17497
- "/",
17498
- maxlength
17499
- ] }) : null
17500
- ] }),
17501
- errorMessage ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17502
- "div",
17399
+ }
17400
+ ),
17401
+ clearable && !readOnly && active && value.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
17402
+ "span",
17503
17403
  {
17504
- className: "nut-input-error-message",
17505
- style: {
17506
- textAlign: errorMessageAlign
17404
+ style: { display: "flex", alignItems: "center" },
17405
+ onClick: () => {
17406
+ if (!disabled) {
17407
+ setValue("");
17408
+ onClear && onClear("");
17409
+ }
17507
17410
  },
17508
- children: errorMessage
17411
+ children: clearIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(x$4, { className: "nut-input-clear" })
17509
17412
  }
17510
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {})
17511
- ] })
17512
- ] })
17513
- }
17514
- );
17515
- });
17516
- Input.defaultProps = defaultProps$U;
17413
+ ) : null
17414
+ ]
17415
+ }
17416
+ );
17417
+ }
17418
+ );
17419
+ Input.defaultProps = defaultProps$T;
17517
17420
  Input.displayName = "NutInput";
17518
- const defaultProps$T = {
17421
+ const defaultProps$S = {
17519
17422
  ...ComponentDefaults,
17520
17423
  disabled: false,
17521
17424
  min: 1,
@@ -17527,7 +17430,7 @@ Please add \`${key}Action\` when creating your handler.`);
17527
17430
  digits: 0,
17528
17431
  async: false
17529
17432
  };
17530
- const classPrefix$2 = `nut-inputnumber`;
17433
+ const classPrefix$7 = `nut-inputnumber`;
17531
17434
  const InputNumber = (props) => {
17532
17435
  const {
17533
17436
  children,
@@ -17552,7 +17455,7 @@ Please add \`${key}Action\` when creating your handler.`);
17552
17455
  onChange,
17553
17456
  ...restProps
17554
17457
  } = {
17555
- ...defaultProps$T,
17458
+ ...defaultProps$S,
17556
17459
  ...props
17557
17460
  };
17558
17461
  const inputRef = React.useRef("");
@@ -17570,8 +17473,8 @@ Please add \`${key}Action\` when creating your handler.`);
17570
17473
  }, []);
17571
17474
  const classes = classNames(
17572
17475
  {
17573
- [`${classPrefix$2}`]: true,
17574
- [`${classPrefix$2}--disabled`]: disabled
17476
+ [`${classPrefix$7}`]: true,
17477
+ [`${classPrefix$7}--disabled`]: disabled
17575
17478
  },
17576
17479
  className
17577
17480
  );
@@ -17753,9 +17656,9 @@ Please add \`${key}Action\` when creating your handler.`);
17753
17656
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-add", children: /* @__PURE__ */ jsxRuntimeExports.jsx(y$3, { className: iconAddClasses, onClick: (e) => addNumber(e) }) })
17754
17657
  ] });
17755
17658
  };
17756
- InputNumber.defaultProps = defaultProps$T;
17659
+ InputNumber.defaultProps = defaultProps$S;
17757
17660
  InputNumber.displayName = "NutInputNumber";
17758
- const defaultProps$S = {
17661
+ const defaultProps$R = {
17759
17662
  ...ComponentDefaults,
17760
17663
  activeColor: "",
17761
17664
  closeOnOverlayClick: true,
@@ -17774,7 +17677,7 @@ Please add \`${key}Action\` when creating your handler.`);
17774
17677
  activeColor,
17775
17678
  ...rest
17776
17679
  } = {
17777
- ...defaultProps$S,
17680
+ ...defaultProps$R,
17778
17681
  ...props
17779
17682
  };
17780
17683
  const menuRef = React.useRef(null);
@@ -17898,9 +17801,9 @@ Please add \`${key}Action\` when creating your handler.`);
17898
17801
  }
17899
17802
  );
17900
17803
  };
17901
- Menu.defaultProps = defaultProps$S;
17804
+ Menu.defaultProps = defaultProps$R;
17902
17805
  Menu.displayName = "NutMenu";
17903
- const defaultProps$R = {
17806
+ const defaultProps$Q = {
17904
17807
  ...ComponentDefaults,
17905
17808
  columns: 1,
17906
17809
  direction: "down",
@@ -17930,7 +17833,7 @@ Please add \`${key}Action\` when creating your handler.`);
17930
17833
  parent,
17931
17834
  index
17932
17835
  } = {
17933
- ...defaultProps$R,
17836
+ ...defaultProps$Q,
17934
17837
  ...props
17935
17838
  };
17936
17839
  const [_showPopup, setShowPopup] = React.useState(show);
@@ -18084,9 +17987,9 @@ Please add \`${key}Action\` when creating your handler.`);
18084
17987
  )
18085
17988
  ] });
18086
17989
  });
18087
- MenuItem.defaultProps = defaultProps$R;
17990
+ MenuItem.defaultProps = defaultProps$Q;
18088
17991
  MenuItem.displayName = "NutMenuItem";
18089
- const defaultProps$Q = {
17992
+ const defaultProps$P = {
18090
17993
  confirmText: "",
18091
17994
  title: "",
18092
17995
  visible: false,
@@ -18318,14 +18221,14 @@ Please add \`${key}Action\` when creating your handler.`);
18318
18221
  }
18319
18222
  ) });
18320
18223
  };
18321
- NumberKeyboard.defaultProps = defaultProps$Q;
18224
+ NumberKeyboard.defaultProps = defaultProps$P;
18322
18225
  NumberKeyboard.displayName = "NutNumberKeyboard";
18323
18226
  const radioContext = {
18324
18227
  onChange: (val) => {
18325
18228
  }
18326
18229
  };
18327
18230
  const RadioContext = React.createContext(radioContext);
18328
- const defaultProps$P = {
18231
+ const defaultProps$O = {
18329
18232
  value: null,
18330
18233
  textPosition: "right",
18331
18234
  onChange: (value) => {
@@ -18335,7 +18238,7 @@ Please add \`${key}Action\` when creating your handler.`);
18335
18238
  };
18336
18239
  const RadioGroup = React.forwardRef(
18337
18240
  (props, ref) => {
18338
- const { children } = { ...defaultProps$P, ...props };
18241
+ const { children } = { ...defaultProps$O, ...props };
18339
18242
  cn("RadioGroup");
18340
18243
  const {
18341
18244
  className,
@@ -18412,9 +18315,9 @@ Please add \`${key}Action\` when creating your handler.`);
18412
18315
  );
18413
18316
  }
18414
18317
  );
18415
- RadioGroup.defaultProps = defaultProps$P;
18318
+ RadioGroup.defaultProps = defaultProps$O;
18416
18319
  RadioGroup.displayName = "NutRadioGroup";
18417
- const defaultProps$O = {
18320
+ const defaultProps$N = {
18418
18321
  ...ComponentDefaults,
18419
18322
  className: "",
18420
18323
  style: {},
@@ -18431,7 +18334,7 @@ Please add \`${key}Action\` when creating your handler.`);
18431
18334
  };
18432
18335
  const Radio = (props) => {
18433
18336
  const { children } = {
18434
- ...defaultProps$O,
18337
+ ...defaultProps$N,
18435
18338
  ...props
18436
18339
  };
18437
18340
  const {
@@ -18531,7 +18434,7 @@ Please add \`${key}Action\` when creating your handler.`);
18531
18434
  }
18532
18435
  );
18533
18436
  };
18534
- Radio.defaultProps = defaultProps$O;
18437
+ Radio.defaultProps = defaultProps$N;
18535
18438
  Radio.displayName = "NutRadio";
18536
18439
  Radio.RadioGroup = RadioGroup;
18537
18440
  const fullClone = {
@@ -18780,7 +18683,7 @@ Please add \`${key}Action\` when creating your handler.`);
18780
18683
  },
18781
18684
  loading(msg, option = {}) {
18782
18685
  errorMsg$1(msg);
18783
- return notice$1({ msg, icon: /* @__PURE__ */ jsxRuntimeExports.jsx(k$2, {}), type: "loading", ...option });
18686
+ return notice$1({ msg, icon: /* @__PURE__ */ jsxRuntimeExports.jsx(k$3, {}), type: "loading", ...option });
18784
18687
  },
18785
18688
  warn(msg, option = {}) {
18786
18689
  errorMsg$1(msg);
@@ -18797,7 +18700,7 @@ Please add \`${key}Action\` when creating your handler.`);
18797
18700
  }
18798
18701
  }
18799
18702
  };
18800
- const defaultProps$N = {
18703
+ const defaultProps$M = {
18801
18704
  range: false,
18802
18705
  hiddenRange: false,
18803
18706
  hiddenTag: false,
@@ -18833,8 +18736,8 @@ Please add \`${key}Action\` when creating your handler.`);
18833
18736
  minDesc,
18834
18737
  maxDesc,
18835
18738
  curValueDesc
18836
- } = { ...defaultProps$N, ...props };
18837
- let { min, max, step } = { ...defaultProps$N, ...props };
18739
+ } = { ...defaultProps$M, ...props };
18740
+ let { min, max, step } = { ...defaultProps$M, ...props };
18838
18741
  min = Number(min);
18839
18742
  max = Number(max);
18840
18743
  step = Number(step);
@@ -19173,9 +19076,9 @@ Please add \`${key}Action\` when creating your handler.`);
19173
19076
  !hiddenRange ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "max", children: maxDesc || +max }) : null
19174
19077
  ] });
19175
19078
  };
19176
- Range.defaultProps = defaultProps$N;
19079
+ Range.defaultProps = defaultProps$M;
19177
19080
  Range.displayName = "NutRange";
19178
- const defaultProps$M = {
19081
+ const defaultProps$L = {
19179
19082
  ...ComponentDefaults,
19180
19083
  count: 5,
19181
19084
  min: 0,
@@ -19200,7 +19103,7 @@ Please add \`${key}Action\` when creating your handler.`);
19200
19103
  allowHalf,
19201
19104
  onChange
19202
19105
  } = {
19203
- ...defaultProps$M,
19106
+ ...defaultProps$L,
19204
19107
  ...props
19205
19108
  };
19206
19109
  const classPrefix2 = "nut-rate";
@@ -19285,9 +19188,9 @@ Please add \`${key}Action\` when creating your handler.`);
19285
19188
  }
19286
19189
  );
19287
19190
  };
19288
- Rate.defaultProps = defaultProps$M;
19191
+ Rate.defaultProps = defaultProps$L;
19289
19192
  Rate.displayName = "NutRate";
19290
- const defaultProps$L = {
19193
+ const defaultProps$K = {
19291
19194
  ...ComponentDefaults,
19292
19195
  placeholder: "",
19293
19196
  shape: "square",
@@ -19335,7 +19238,7 @@ Please add \`${key}Action\` when creating your handler.`);
19335
19238
  onClickRightinIcon,
19336
19239
  onClickRightoutIcon
19337
19240
  } = {
19338
- ...defaultProps$L,
19241
+ ...defaultProps$K,
19339
19242
  ...props
19340
19243
  };
19341
19244
  const alignClass = `${align}`;
@@ -19518,9 +19421,9 @@ Please add \`${key}Action\` when creating your handler.`);
19518
19421
  }
19519
19422
  );
19520
19423
  };
19521
- SearchBar.defaultProps = defaultProps$L;
19424
+ SearchBar.defaultProps = defaultProps$K;
19522
19425
  SearchBar.displayName = "NutSearchBar";
19523
- const defaultProps$K = {
19426
+ const defaultProps$J = {
19524
19427
  ...ComponentDefaults,
19525
19428
  title: "",
19526
19429
  description: "",
@@ -19684,9 +19587,9 @@ Please add \`${key}Action\` when creating your handler.`);
19684
19587
  }
19685
19588
  ) });
19686
19589
  };
19687
- ShortPassword.defaultProps = defaultProps$K;
19590
+ ShortPassword.defaultProps = defaultProps$J;
19688
19591
  ShortPassword.displayName = "NutShortPassword";
19689
- const defaultProps$J = {
19592
+ const defaultProps$I = {
19690
19593
  type: "png",
19691
19594
  lineWidth: 2,
19692
19595
  strokeStyle: "#000",
@@ -19707,7 +19610,7 @@ Please add \`${key}Action\` when creating your handler.`);
19707
19610
  onClear,
19708
19611
  ...rest
19709
19612
  } = {
19710
- ...defaultProps$J,
19613
+ ...defaultProps$I,
19711
19614
  ...props
19712
19615
  };
19713
19616
  const b = cn("signature");
@@ -19821,9 +19724,9 @@ Please add \`${key}Action\` when creating your handler.`);
19821
19724
  )
19822
19725
  ] });
19823
19726
  };
19824
- Signature.defaultProps = defaultProps$J;
19727
+ Signature.defaultProps = defaultProps$I;
19825
19728
  Signature.displayName = "NutSignature";
19826
- const defaultProps$I = {
19729
+ const defaultProps$H = {
19827
19730
  ...ComponentDefaults,
19828
19731
  disabled: false,
19829
19732
  activeText: "",
@@ -19840,7 +19743,7 @@ Please add \`${key}Action\` when creating your handler.`);
19840
19743
  style,
19841
19744
  onChange
19842
19745
  } = {
19843
- ...defaultProps$I,
19746
+ ...defaultProps$H,
19844
19747
  ...props
19845
19748
  };
19846
19749
  const classPrefix2 = "nut-switch";
@@ -19862,9 +19765,9 @@ Please add \`${key}Action\` when creating your handler.`);
19862
19765
  activeText && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: value ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__label open`, children: activeText }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__label close`, children: inactiveText }) })
19863
19766
  ] }) });
19864
19767
  };
19865
- Switch.defaultProps = defaultProps$I;
19768
+ Switch.defaultProps = defaultProps$H;
19866
19769
  Switch.displayName = "NutSwitch";
19867
- const defaultProps$H = {
19770
+ const defaultProps$G = {
19868
19771
  defaultValue: "",
19869
19772
  textAlign: "left",
19870
19773
  limitshow: false,
@@ -19892,7 +19795,7 @@ Please add \`${key}Action\` when creating your handler.`);
19892
19795
  onChange,
19893
19796
  onBlur,
19894
19797
  onFocus
19895
- } = { ...defaultProps$H, ...props };
19798
+ } = { ...defaultProps$G, ...props };
19896
19799
  const textareaBem = cn("textarea");
19897
19800
  const [inputValue, SetInputValue] = React.useState("");
19898
19801
  const textareaRef = React.useRef(null);
@@ -20007,9 +19910,9 @@ Please add \`${key}Action\` when creating your handler.`);
20007
19910
  }
20008
19911
  );
20009
19912
  };
20010
- TextArea.defaultProps = defaultProps$H;
19913
+ TextArea.defaultProps = defaultProps$G;
20011
19914
  TextArea.displayName = "NutTextArea";
20012
- const defaultProps$G = {
19915
+ const defaultProps$F = {
20013
19916
  ...ComponentDefaults,
20014
19917
  percent: 0,
20015
19918
  showText: false,
@@ -20028,7 +19931,7 @@ Please add \`${key}Action\` when creating your handler.`);
20028
19931
  children,
20029
19932
  ...rest
20030
19933
  } = {
20031
- ...defaultProps$G,
19934
+ ...defaultProps$F,
20032
19935
  ...props
20033
19936
  };
20034
19937
  const classPrefix2 = "nut-progress";
@@ -20065,7 +19968,7 @@ Please add \`${key}Action\` when creating your handler.`);
20065
19968
  }
20066
19969
  ) }) }) });
20067
19970
  };
20068
- Progress.defaultProps = defaultProps$G;
19971
+ Progress.defaultProps = defaultProps$F;
20069
19972
  Progress.displayName = "NutProgress";
20070
19973
  class UploadOptions {
20071
19974
  constructor() {
@@ -20162,7 +20065,7 @@ Please add \`${key}Action\` when creating your handler.`);
20162
20065
  done();
20163
20066
  }
20164
20067
  };
20165
- const defaultProps$F = {
20068
+ const defaultProps$E = {
20166
20069
  ...ComponentDefaults,
20167
20070
  url: "",
20168
20071
  maxCount: 1,
@@ -20244,7 +20147,7 @@ Please add \`${key}Action\` when creating your handler.`);
20244
20147
  beforeXhrUpload,
20245
20148
  beforeDelete,
20246
20149
  ...restProps
20247
- } = { ...defaultProps$F, ...props };
20150
+ } = { ...defaultProps$E, ...props };
20248
20151
  const [fileList, setFileList] = React.useState(defaultValue || []);
20249
20152
  const [uploadQueue, setUploadQueue] = React.useState([]);
20250
20153
  React.useEffect(() => {
@@ -20502,7 +20405,7 @@ Please add \`${key}Action\` when creating your handler.`);
20502
20405
  ),
20503
20406
  item.status === "ready" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-uploader__preview__progress", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-uploader__preview__progress__msg", children: item.message }) }) : item.status !== "success" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-uploader__preview__progress", children: [
20504
20407
  item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(x$8, { color: "#fff" }) : item.loadingIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(
20505
- k$2,
20408
+ k$3,
20506
20409
  {
20507
20410
  className: "nut-icon-loading",
20508
20411
  color: "#fff"
@@ -20615,9 +20518,9 @@ Please add \`${key}Action\` when creating your handler.`);
20615
20518
  ] });
20616
20519
  };
20617
20520
  const Uploader = React.forwardRef(InternalUploader);
20618
- Uploader.defaultProps = defaultProps$F;
20521
+ Uploader.defaultProps = defaultProps$E;
20619
20522
  Uploader.displayName = "NutUploader";
20620
- const defaultProps$E = {
20523
+ const defaultProps$D = {
20621
20524
  cancelText: "",
20622
20525
  optionTag: "name",
20623
20526
  optionSubTag: "subname",
@@ -20651,7 +20554,7 @@ Please add \`${key}Action\` when creating your handler.`);
20651
20554
  className,
20652
20555
  style,
20653
20556
  ...rest
20654
- } = { ...defaultProps$E, ...props };
20557
+ } = { ...defaultProps$D, ...props };
20655
20558
  const b = cn("actionsheet");
20656
20559
  const isHighlight = (item) => {
20657
20560
  return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "$dark1";
@@ -20696,52 +20599,8 @@ Please add \`${key}Action\` when creating your handler.`);
20696
20599
  }
20697
20600
  );
20698
20601
  };
20699
- ActionSheet.defaultProps = defaultProps$E;
20602
+ ActionSheet.defaultProps = defaultProps$D;
20700
20603
  ActionSheet.displayName = "NutActionSheet";
20701
- const defaultProps$D = {
20702
- ...ComponentDefaults,
20703
- value: "",
20704
- dot: false,
20705
- max: 99,
20706
- top: "0",
20707
- right: "5",
20708
- color: ""
20709
- };
20710
- const Badge = (props) => {
20711
- const { className, style, value, max, children, dot, top, right, color } = {
20712
- ...defaultProps$D,
20713
- ...props
20714
- };
20715
- const classPrefix2 = "nut-badge";
20716
- const classes = classNames(classPrefix2, className);
20717
- const contentClasses = classNames(
20718
- { [`${classPrefix2}__dot`]: dot },
20719
- `${classPrefix2}__content`,
20720
- `${classPrefix2}__sup`
20721
- );
20722
- function content() {
20723
- if (dot || typeof value === "object")
20724
- return null;
20725
- if (typeof value === "number" && typeof max === "number") {
20726
- return max < value ? `${max}+` : value;
20727
- }
20728
- return value;
20729
- }
20730
- const getStyle = () => {
20731
- const style2 = {};
20732
- style2.top = `${Number(top) || parseFloat(top) || 0}px`;
20733
- style2.right = `${Number(right) || parseFloat(right) || 0}px`;
20734
- style2.background = color;
20735
- return style2;
20736
- };
20737
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes, style, children: [
20738
- typeof value === "object" && value && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__icon`, children: value }),
20739
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children }),
20740
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: contentClasses, style: getStyle(), children: content() })
20741
- ] });
20742
- };
20743
- Badge.defaultProps = defaultProps$D;
20744
- Badge.displayName = "NutBadge";
20745
20604
  function ConfirmDialog(props) {
20746
20605
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { ...props, children: props.content });
20747
20606
  }
@@ -21114,25 +20973,29 @@ Please add \`${key}Action\` when creating your handler.`);
21114
20973
  network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
21115
20974
  };
21116
20975
  const defaultProps$A = {
20976
+ ...ComponentDefaults,
21117
20977
  description: "",
21118
- image: "empty",
21119
20978
  imageSize: "",
21120
- className: ""
20979
+ status: "empty"
21121
20980
  };
20981
+ const classPrefix$6 = `nut-empty`;
21122
20982
  const Empty = (props) => {
21123
20983
  const { locale } = useConfig();
21124
- const { image, imageSize, description, children, className, ...rest } = {
20984
+ const {
20985
+ image,
20986
+ imageSize,
20987
+ description,
20988
+ children,
20989
+ className,
20990
+ status,
20991
+ ...rest
20992
+ } = {
21125
20993
  ...defaultProps$A,
21126
20994
  ...props
21127
20995
  };
21128
20996
  const [imgStyle, setImgStyle] = React.useState({});
21129
- const b = cn("empty");
21130
- let imageNode = image;
21131
- if (typeof image === "string") {
21132
- const isHttpUrl = image.startsWith("https://") || image.startsWith("http://") || image.startsWith("//");
21133
- const imageUrl = isHttpUrl ? image : defaultStatus[image];
21134
- imageNode = /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "img", src: imageUrl, alt: "empty" });
21135
- }
20997
+ const imageUrl = image || defaultStatus[status];
20998
+ const imageNode = typeof imageUrl === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "img", src: imageUrl, alt: "empty" }) : imageUrl;
21136
20999
  React.useEffect(() => {
21137
21000
  setImgStyle(() => {
21138
21001
  if (!imageSize) {
@@ -21150,9 +21013,9 @@ Please add \`${key}Action\` when creating your handler.`);
21150
21013
  };
21151
21014
  });
21152
21015
  }, [imageSize]);
21153
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${b()} ${className}`, ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
21154
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b("image"), style: imgStyle, children: imageNode }),
21155
- typeof description === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b("description"), children: description || locale.noData }) : { description },
21016
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$6} ${className}`, ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
21017
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$6}__image`, style: imgStyle, children: imageNode }),
21018
+ typeof description === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$6}__description`, children: description || locale.noData }) : description,
21156
21019
  children
21157
21020
  ] }) });
21158
21021
  };
@@ -22341,29 +22204,30 @@ Please add \`${key}Action\` when creating your handler.`);
22341
22204
  const defaultProps$v = {
22342
22205
  ...ComponentDefaults,
22343
22206
  size: "",
22207
+ shape: "round",
22344
22208
  icon: "",
22345
- bgColor: "#eee",
22209
+ background: "#eee",
22346
22210
  color: "#666",
22347
- prefixCls: "nut-avatar",
22348
- url: "",
22211
+ fit: "cover",
22212
+ src: "",
22349
22213
  alt: ""
22350
22214
  };
22215
+ const classPrefix$5 = `nut-avatar`;
22351
22216
  const Avatar = (props) => {
22352
22217
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
22353
22218
  const {
22354
22219
  children,
22355
- prefixCls: prefixCls2,
22356
22220
  size,
22357
22221
  shape,
22358
- bgColor,
22222
+ background,
22359
22223
  color,
22360
- url,
22224
+ src,
22361
22225
  alt,
22362
22226
  icon,
22227
+ fit,
22363
22228
  className,
22364
22229
  style,
22365
- activeAvatar,
22366
- onActiveAvatar,
22230
+ onClick,
22367
22231
  onError,
22368
22232
  ...rest
22369
22233
  } = {
@@ -22375,24 +22239,23 @@ Please add \`${key}Action\` when creating your handler.`);
22375
22239
  const [avatarIndex, setAvatarIndex] = React.useState(1);
22376
22240
  const avatarRef = React.useRef(null);
22377
22241
  const parent = React.useContext(AvatarContext);
22378
- const b = cn("avatar");
22242
+ const sizeValue = ["large", "normal", "small"];
22379
22243
  const classes = classNames({
22380
- [`nut-avatar-${size || ((_a2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a2.size) || "normal"}`]: true,
22381
- [`nut-avatar-${shape || ((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || "round"}`]: true
22244
+ [`nut-avatar-${((_a2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a2.size) || size || "normal"}`]: true,
22245
+ [`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
22382
22246
  });
22383
- const cls = classNames(b(""), classes, className);
22384
- const sizeValue = ["large", "normal", "small"];
22247
+ const cls = classNames(classPrefix$5, classes, className);
22385
22248
  const styles = {
22386
22249
  width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
22387
22250
  height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
22388
- backgroundColor: `${bgColor}`,
22251
+ backgroundColor: `${background}`,
22389
22252
  color: `${color}`,
22390
- marginLeft: avatarIndex !== 1 && ((_c = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c.span) ? `${(_d = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _d.span}px` : "",
22391
- zIndex: ((_e = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _e.zIndex) === "right" ? `${Math.abs(maxSum - avatarIndex)}` : "",
22253
+ marginLeft: avatarIndex !== 1 && ((_c = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c.gap) ? `${(_d = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _d.gap}px` : "",
22254
+ zIndex: ((_e = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _e.level) === "right" ? `${Math.abs(maxSum - avatarIndex)}` : "",
22392
22255
  ...style
22393
22256
  };
22394
22257
  const maxStyles = {
22395
- backgroundColor: `${(_f = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _f.maxBgColor}`,
22258
+ backgroundColor: `${(_f = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _f.maxBackground}`,
22396
22259
  color: `${(_g = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _g.maxColor}`
22397
22260
  };
22398
22261
  React.useEffect(() => {
@@ -22410,23 +22273,22 @@ Please add \`${key}Action\` when creating your handler.`);
22410
22273
  }
22411
22274
  }
22412
22275
  const index = Number((_b2 = (_a3 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a3.dataset) == null ? void 0 : _b2.index);
22413
- const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.maxCount;
22276
+ const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.max;
22414
22277
  setMaxSum(children2.length);
22415
22278
  setAvatarIndex(index);
22416
22279
  if (index === children2.length && index !== maxCount && children2.length > maxCount) {
22417
22280
  setShowMax(true);
22418
22281
  }
22419
22282
  };
22420
- const errorEvent = (e) => {
22283
+ const errorEvent = () => {
22421
22284
  if (props.onError) {
22422
- props.onError(e);
22285
+ props.onError();
22423
22286
  }
22424
22287
  };
22425
22288
  const clickAvatar = (e) => {
22426
- activeAvatar && activeAvatar(e);
22427
- onActiveAvatar && onActiveAvatar(e);
22289
+ onClick && onClick(e);
22428
22290
  };
22429
- return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: (showMax || !((_h = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _h.maxCount) || avatarIndex <= ((_i = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _i.maxCount)) && /* @__PURE__ */ jsxRuntimeExports.jsxs(
22291
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: (showMax || !((_h = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _h.max) || avatarIndex <= ((_i = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _i.max)) && /* @__PURE__ */ jsxRuntimeExports.jsxs(
22430
22292
  "div",
22431
22293
  {
22432
22294
  className: cls,
@@ -22435,13 +22297,14 @@ Please add \`${key}Action\` when creating your handler.`);
22435
22297
  onClick: clickAvatar,
22436
22298
  ref: avatarRef,
22437
22299
  children: [
22438
- (!((_j = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _j.maxCount) || avatarIndex <= ((_k = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _k.maxCount)) && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
22439
- url && /* @__PURE__ */ jsxRuntimeExports.jsx(
22440
- "img",
22300
+ (!((_j = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _j.max) || avatarIndex <= ((_k = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _k.max)) && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
22301
+ src && /* @__PURE__ */ jsxRuntimeExports.jsx(
22302
+ Image$1,
22441
22303
  {
22442
22304
  className: "avatar-img",
22443
- src: url,
22305
+ src,
22444
22306
  alt,
22307
+ style: { objectFit: fit },
22445
22308
  onError: errorEvent
22446
22309
  }
22447
22310
  ),
@@ -22449,9 +22312,10 @@ Please add \`${key}Action\` when creating your handler.`);
22449
22312
  ...icon.props,
22450
22313
  className: `${icon.props.className || ""} icon`
22451
22314
  }) : null,
22452
- children && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text", children })
22315
+ children && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text", children }),
22316
+ !src && !icon && !children && /* @__PURE__ */ jsxRuntimeExports.jsx(k$2, { className: "icon" })
22453
22317
  ] }),
22454
- showMax && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text", children: ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxContent) ? (_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent : `+ ${avatarIndex - ((_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.maxCount)}` })
22318
+ showMax && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text", children: ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxContent) ? (_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent : `+ ${avatarIndex - ((_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.max)}` })
22455
22319
  ]
22456
22320
  }
22457
22321
  ) });
@@ -22521,7 +22385,7 @@ Please add \`${key}Action\` when creating your handler.`);
22521
22385
  Avatar,
22522
22386
  {
22523
22387
  className: avatarClass,
22524
- bgColor: "rgb(239, 239, 239)",
22388
+ background: "rgb(239, 239, 239)",
22525
22389
  shape: avatarShape,
22526
22390
  style: getStyle()
22527
22391
  }
@@ -22554,9 +22418,7 @@ Please add \`${key}Action\` when creating your handler.`);
22554
22418
  }
22555
22419
  }
22556
22420
  const defaultProps$t = {
22557
- name: "",
22558
- leftWidth: 0,
22559
- rightWidth: 0
22421
+ name: ""
22560
22422
  };
22561
22423
  const Swipe = React.forwardRef((props, instanceRef) => {
22562
22424
  const swipeBem = cn("swipe");
@@ -22578,14 +22440,8 @@ Please add \`${key}Action\` when creating your handler.`);
22578
22440
  transform: `translate3d(${state.offset}px, 0, 0)`,
22579
22441
  transitionDuration: state.dragging ? "0s" : ".6s"
22580
22442
  };
22581
- const leftWidth = React.useMemo(
22582
- () => props.leftWidth ? props.leftWidth : actionWidth.left,
22583
- [props.leftWidth, actionWidth.left]
22584
- );
22585
- const rightWidth = React.useMemo(
22586
- () => props.rightWidth ? props.rightWidth : actionWidth.right,
22587
- [props.rightWidth, actionWidth.right]
22588
- );
22443
+ const leftWidth = actionWidth.left;
22444
+ const rightWidth = actionWidth.right;
22589
22445
  const onTouchStart = (event) => {
22590
22446
  if (!props.disabled) {
22591
22447
  startOffset.current = state.offset;
@@ -22749,7 +22605,7 @@ Please add \`${key}Action\` when creating your handler.`);
22749
22605
  onClick: (event) => {
22750
22606
  }
22751
22607
  };
22752
- const classPrefix$1 = `nut-animate`;
22608
+ const classPrefix$4 = `nut-animate`;
22753
22609
  const Animate = (props) => {
22754
22610
  const { className, type: type2, action, loop: loop2, onClick, children, ...rest } = {
22755
22611
  ...defaultProps$s,
@@ -22758,7 +22614,7 @@ Please add \`${key}Action\` when creating your handler.`);
22758
22614
  const [clicked, setClicked] = React.useState(false);
22759
22615
  const classes = classNames({
22760
22616
  "nut-ani-container": true,
22761
- [`${classPrefix$1}-${type2}`]: action === "initial" || clicked ? type2 : false,
22617
+ [`${classPrefix$4}-${type2}`]: action === "initial" || clicked ? type2 : false,
22762
22618
  loop: loop2
22763
22619
  });
22764
22620
  const cls = classNames(classes, className);
@@ -23130,22 +22986,20 @@ Please add \`${key}Action\` when creating your handler.`);
23130
22986
  Audio.defaultProps = defaultProps$p;
23131
22987
  Audio.displayName = "NutAudio";
23132
22988
  const defaultProps$o = {
22989
+ ...ComponentDefaults,
23133
22990
  maxContent: "",
23134
- maxCount: "",
23135
- maxBgColor: "#eee",
22991
+ max: "",
22992
+ maxBackground: "#eee",
23136
22993
  maxColor: "#666",
23137
- size: "",
23138
- shape: "",
23139
- span: "-8",
23140
- zIndex: "left"
22994
+ gap: "-8",
22995
+ level: "left"
23141
22996
  };
22997
+ const classPrefix$3 = `nut-avatar-group`;
23142
22998
  const AvatarGroup = (props) => {
23143
- useConfig();
23144
22999
  const propAvatarGroup = { ...defaultProps$o, ...props };
23145
23000
  const { className, style, children } = propAvatarGroup;
23146
23001
  const avatarGroupRef = React.useRef(null);
23147
- const b = cn("avatar-group");
23148
- const cls = classNames(b(""), className);
23002
+ const cls = classNames(classPrefix$3, className);
23149
23003
  const parentAvatar = {
23150
23004
  propAvatarGroup,
23151
23005
  avatarGroupRef
@@ -23155,24 +23009,26 @@ Please add \`${key}Action\` when creating your handler.`);
23155
23009
  AvatarGroup.defaultProps = defaultProps$o;
23156
23010
  AvatarGroup.displayName = "NutAvatarGroup";
23157
23011
  const defaultProps$n = {
23012
+ ...ComponentDefaults,
23158
23013
  strokeWidth: 5,
23159
23014
  radius: 50,
23160
23015
  strokeLinecap: "round",
23161
- circleColor: "",
23162
- pathColor: "",
23016
+ color: "#fa2c19",
23017
+ background: "#e5e9f2",
23163
23018
  clockwise: true
23164
23019
  };
23020
+ const classPrefix$2 = `nut-circleprogress`;
23165
23021
  const CircleProgress = (props) => {
23166
23022
  var _a2;
23167
23023
  const {
23168
23024
  children,
23169
- progress,
23025
+ percent,
23170
23026
  className,
23171
23027
  radius,
23172
- pathColor,
23173
23028
  clockwise,
23174
- circleColor,
23175
23029
  strokeWidth,
23030
+ color,
23031
+ background,
23176
23032
  style,
23177
23033
  strokeLinecap,
23178
23034
  ...restProps
@@ -23180,8 +23036,7 @@ Please add \`${key}Action\` when creating your handler.`);
23180
23036
  ...defaultProps$n,
23181
23037
  ...props
23182
23038
  };
23183
- const b = cn("circleprogress");
23184
- const classes = classNames(className, b(""));
23039
+ const classes = classNames(className, classPrefix$2);
23185
23040
  const refRandomId = Math.random().toString(36).slice(-8);
23186
23041
  const styles = {
23187
23042
  height: `${Number(radius) * 2}px`,
@@ -23189,13 +23044,13 @@ Please add \`${key}Action\` when creating your handler.`);
23189
23044
  ...style
23190
23045
  };
23191
23046
  const pathStyle = {
23192
- stroke: pathColor
23047
+ stroke: background
23193
23048
  };
23194
23049
  const hoverStyle = () => {
23195
23050
  const perimeter = 283;
23196
- const offset = perimeter * Number(progress) / 100;
23051
+ const offset = perimeter * Number(percent) / 100;
23197
23052
  return {
23198
- stroke: isObject(circleColor) ? `url(#${refRandomId})` : circleColor,
23053
+ stroke: isObject(color) ? `url(#${refRandomId})` : color,
23199
23054
  strokeDasharray: `${offset}px ${perimeter}px`
23200
23055
  };
23201
23056
  };
@@ -23203,16 +23058,13 @@ Please add \`${key}Action\` when creating your handler.`);
23203
23058
  const isWise = clockwise ? 1 : 0;
23204
23059
  return `M 50 50 m -45 0 a 45 45 0 1 ${isWise} 90 0 a 45 45 0 1 ${isWise} -90 0`;
23205
23060
  };
23206
- const hoverColor = () => {
23207
- return isObject(circleColor) ? `url(#${refRandomId})` : circleColor;
23208
- };
23209
23061
  const stop2 = () => {
23210
- if (!isObject(circleColor)) {
23062
+ if (!isObject(props.color)) {
23211
23063
  return;
23212
23064
  }
23213
- const color = circleColor;
23214
- const colorArr = Object.keys(color).sort(
23215
- (a2, b2) => parseFloat(a2) - parseFloat(b2)
23065
+ const color2 = props.color;
23066
+ const colorArr = Object.keys(color2).sort(
23067
+ (a2, b) => parseFloat(a2) - parseFloat(b)
23216
23068
  );
23217
23069
  const stopArr = [];
23218
23070
  colorArr.map((item) => {
@@ -23221,7 +23073,7 @@ Please add \`${key}Action\` when creating your handler.`);
23221
23073
  value: ""
23222
23074
  };
23223
23075
  obj.key = item;
23224
- obj.value = color[item];
23076
+ obj.value = color2[item];
23225
23077
  stopArr.push(obj);
23226
23078
  });
23227
23079
  return stopArr;
@@ -23235,8 +23087,8 @@ Please add \`${key}Action\` when creating your handler.`);
23235
23087
  "path",
23236
23088
  {
23237
23089
  className: "nut-circleprogress-path",
23238
- style: pathStyle,
23239
23090
  d: path(),
23091
+ style: pathStyle,
23240
23092
  fill: "none",
23241
23093
  strokeWidth
23242
23094
  }
@@ -23248,17 +23100,13 @@ Please add \`${key}Action\` when creating your handler.`);
23248
23100
  style: hoverStyle(),
23249
23101
  d: path(),
23250
23102
  fill: "none",
23251
- stroke: hoverColor(),
23252
23103
  strokeLinecap,
23253
23104
  transform: "rotate(90,50,50)",
23254
23105
  strokeWidth
23255
23106
  }
23256
23107
  )
23257
23108
  ] }),
23258
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-circleprogress-text", children: children || /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
23259
- progress,
23260
- "%"
23261
- ] }) })
23109
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-circleprogress-text", children })
23262
23110
  ] });
23263
23111
  };
23264
23112
  CircleProgress.defaultProps = defaultProps$n;
@@ -23659,6 +23507,7 @@ Please add \`${key}Action\` when creating your handler.`);
23659
23507
  CountDown.defaultProps = defaultProps$k;
23660
23508
  CountDown.displayName = "NutCountDown";
23661
23509
  const defaultProps$j = {
23510
+ ...ComponentDefaults,
23662
23511
  content: "",
23663
23512
  direction: "end",
23664
23513
  rows: 1,
@@ -23667,12 +23516,13 @@ Please add \`${key}Action\` when creating your handler.`);
23667
23516
  symbol: "...",
23668
23517
  lineHeight: "20"
23669
23518
  };
23519
+ const classPrefix$1 = `nut-ellipsis`;
23670
23520
  const Ellipsis = (props) => {
23671
23521
  var _a2, _b;
23672
- useConfig();
23673
23522
  const {
23674
23523
  children,
23675
23524
  content,
23525
+ className,
23676
23526
  direction,
23677
23527
  rows,
23678
23528
  expandText,
@@ -23680,7 +23530,8 @@ Please add \`${key}Action\` when creating your handler.`);
23680
23530
  symbol,
23681
23531
  lineHeight,
23682
23532
  onClick,
23683
- onChange
23533
+ onChange,
23534
+ ...rest
23684
23535
  } = { ...defaultProps$j, ...props };
23685
23536
  let container = null;
23686
23537
  let maxHeight = 0;
@@ -23688,10 +23539,8 @@ Please add \`${key}Action\` when creating your handler.`);
23688
23539
  const [expanded, setExpanded] = React.useState(false);
23689
23540
  const ellipsis = React.useRef();
23690
23541
  const root2 = React.useRef(null);
23542
+ const classes = classNames(classPrefix$1, className);
23691
23543
  React.useLayoutEffect(() => {
23692
- createContainer();
23693
- }, []);
23694
- React.useEffect(() => {
23695
23544
  if (content) {
23696
23545
  createContainer();
23697
23546
  }
@@ -23809,7 +23658,7 @@ Please add \`${key}Action\` when creating your handler.`);
23809
23658
  const handleClick2 = () => {
23810
23659
  onClick && onClick();
23811
23660
  };
23812
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-ellipsis", onClick: handleClick2, ref: root2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
23661
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes, onClick: handleClick2, ref: root2, ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
23813
23662
  !exceeded ? content : null,
23814
23663
  exceeded && !expanded ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
23815
23664
  (_a2 = ellipsis.current) == null ? void 0 : _a2.leading,