@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.
- package/CHANGELOG.md +24 -0
- package/dist/esm/Avatar.js +30 -25
- package/dist/esm/AvatarGroup.js +10 -15
- package/dist/esm/Badge.js +4 -66
- package/dist/esm/Checkbox.js +1 -2
- package/dist/esm/CheckboxGroup.js +18 -20
- package/dist/esm/CircleProgress.js +20 -25
- package/dist/esm/Ellipsis.js +13 -12
- package/dist/esm/Empty.js +18 -26
- package/dist/esm/Input.js +87 -193
- package/dist/esm/Skeleton.js +1 -1
- package/dist/esm/Swipe.js +4 -10
- package/dist/esm/Tabbar/style/index.js +1 -1
- package/dist/esm/Tabbar.js +29 -33
- package/dist/esm/TabbarItem.js +5 -75
- package/dist/esm/badge2.js +69 -0
- package/dist/esm/cellgroup2.js +5 -4
- package/dist/esm/checkbox2.js +34 -47
- package/dist/esm/tabbaritem2.js +61 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.mjs +846 -997
- package/dist/nutui.react.umd.js +846 -997
- package/dist/packages/badge/badge.scss +0 -1
- package/dist/packages/cellgroup/cellgroup.scss +20 -16
- package/dist/packages/checkbox/checkbox.scss +8 -11
- package/dist/packages/circleprogress/circleprogress.scss +0 -9
- package/dist/packages/empty/empty.scss +0 -9
- package/dist/packages/input/input.scss +13 -180
- package/dist/packages/tabbar/tabbar.scss +16 -22
- package/dist/packages/tabbaritem/tabbaritem.scss +9 -70
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/themes/default.scss +0 -1
- package/dist/styles/variables-jmapp.scss +12 -16
- package/dist/styles/variables.scss +12 -16
- package/dist/types/index.d.ts +80 -126
- package/package.json +1 -1
- package/dist/esm/Icon.js +0 -83
- package/dist/packages/icon/icon.scss +0 -0
- /package/dist/esm/{AvatarContext.js → context.js} +0 -0
package/dist/nutui.react.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6
6
|
};
|
|
7
7
|
var _a;
|
|
8
8
|
/*!
|
|
9
|
-
* @nutui/nutui-react v2.0.0-alpha.
|
|
9
|
+
* @nutui/nutui-react v2.0.0-alpha.5 Wed May 10 2023 14:17:23 GMT+0800 (China Standard Time)
|
|
10
10
|
* (c) 2023 @jdf2e.
|
|
11
11
|
* Released under the MIT License.
|
|
12
12
|
*/
|
|
@@ -1014,7 +1014,7 @@ var D = {}, ir = {
|
|
|
1014
1014
|
set exports(h) {
|
|
1015
1015
|
D = h;
|
|
1016
1016
|
}
|
|
1017
|
-
}, k$
|
|
1017
|
+
}, k$6 = {};
|
|
1018
1018
|
/**
|
|
1019
1019
|
* @license React
|
|
1020
1020
|
* react-jsx-runtime.production.min.js
|
|
@@ -1027,7 +1027,7 @@ var D = {}, ir = {
|
|
|
1027
1027
|
var Re;
|
|
1028
1028
|
function ur() {
|
|
1029
1029
|
if (Re)
|
|
1030
|
-
return k$
|
|
1030
|
+
return k$6;
|
|
1031
1031
|
Re = 1;
|
|
1032
1032
|
var h = React__default, 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 };
|
|
1033
1033
|
function w(m, l2, T) {
|
|
@@ -1040,7 +1040,7 @@ function ur() {
|
|
|
1040
1040
|
g[d] === void 0 && (g[d] = l2[d]);
|
|
1041
1041
|
return { $$typeof: S, type: m, key: _, ref: $, props: g, _owner: A.current };
|
|
1042
1042
|
}
|
|
1043
|
-
return k$
|
|
1043
|
+
return k$6.Fragment = M, k$6.jsx = w, k$6.jsxs = w, k$6;
|
|
1044
1044
|
}
|
|
1045
1045
|
var F = {};
|
|
1046
1046
|
/**
|
|
@@ -1643,7 +1643,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
1643
1643
|
process.env.NODE_ENV === "production" ? h.exports = ur() : h.exports = sr();
|
|
1644
1644
|
})(ir);
|
|
1645
1645
|
const lr = D.Fragment, cr = D.jsx, vr = D.jsxs;
|
|
1646
|
-
const a$
|
|
1646
|
+
const a$v = {
|
|
1647
1647
|
className: "",
|
|
1648
1648
|
style: void 0,
|
|
1649
1649
|
name: "ArrowDown2",
|
|
@@ -1652,7 +1652,7 @@ const a$u = {
|
|
|
1652
1652
|
onClick: () => {
|
|
1653
1653
|
}
|
|
1654
1654
|
}, y$8 = (h) => {
|
|
1655
|
-
const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$
|
|
1655
|
+
const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$v, ...h }, f = (t) => {
|
|
1656
1656
|
n && n(t);
|
|
1657
1657
|
}, c = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
|
|
1658
1658
|
const t = "nut-icon";
|
|
@@ -1689,8 +1689,8 @@ const a$u = {
|
|
|
1689
1689
|
}
|
|
1690
1690
|
) });
|
|
1691
1691
|
};
|
|
1692
|
-
y$8.defaultProps = a$
|
|
1693
|
-
const a$
|
|
1692
|
+
y$8.defaultProps = a$v;
|
|
1693
|
+
const a$u = {
|
|
1694
1694
|
className: "",
|
|
1695
1695
|
style: void 0,
|
|
1696
1696
|
name: "ArrowUp2",
|
|
@@ -1699,7 +1699,7 @@ const a$t = {
|
|
|
1699
1699
|
onClick: () => {
|
|
1700
1700
|
}
|
|
1701
1701
|
}, x$g = (h) => {
|
|
1702
|
-
const { className: o, style: p, name: e, color: d, width: m, height: f, onClick: n } = { ...a$
|
|
1702
|
+
const { className: o, style: p, name: e, color: d, width: m, height: f, onClick: n } = { ...a$u, ...h }, g = (t) => {
|
|
1703
1703
|
n && n(t);
|
|
1704
1704
|
}, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", w = () => {
|
|
1705
1705
|
const t = "nut-icon";
|
|
@@ -1736,8 +1736,8 @@ const a$t = {
|
|
|
1736
1736
|
}
|
|
1737
1737
|
) });
|
|
1738
1738
|
};
|
|
1739
|
-
x$g.defaultProps = a$
|
|
1740
|
-
const a$
|
|
1739
|
+
x$g.defaultProps = a$u;
|
|
1740
|
+
const a$t = {
|
|
1741
1741
|
className: "",
|
|
1742
1742
|
style: void 0,
|
|
1743
1743
|
name: "CheckChecked",
|
|
@@ -1746,7 +1746,7 @@ const a$s = {
|
|
|
1746
1746
|
onClick: () => {
|
|
1747
1747
|
}
|
|
1748
1748
|
}, y$7 = (h) => {
|
|
1749
|
-
const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$
|
|
1749
|
+
const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$t, ...h }, C = (t) => {
|
|
1750
1750
|
o && o(t);
|
|
1751
1751
|
}, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", k2 = () => {
|
|
1752
1752
|
const t = "nut-icon";
|
|
@@ -1794,8 +1794,8 @@ const a$s = {
|
|
|
1794
1794
|
}
|
|
1795
1795
|
) });
|
|
1796
1796
|
};
|
|
1797
|
-
y$7.defaultProps = a$
|
|
1798
|
-
const a$
|
|
1797
|
+
y$7.defaultProps = a$t;
|
|
1798
|
+
const a$s = {
|
|
1799
1799
|
className: "",
|
|
1800
1800
|
style: void 0,
|
|
1801
1801
|
name: "CheckDisabled",
|
|
@@ -1804,7 +1804,7 @@ const a$r = {
|
|
|
1804
1804
|
onClick: () => {
|
|
1805
1805
|
}
|
|
1806
1806
|
}, x$f = (h) => {
|
|
1807
|
-
const { className: i, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$
|
|
1807
|
+
const { className: i, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$s, ...h }, g = (t) => {
|
|
1808
1808
|
o && o(t);
|
|
1809
1809
|
}, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
|
|
1810
1810
|
const t = "nut-icon";
|
|
@@ -1841,8 +1841,8 @@ const a$r = {
|
|
|
1841
1841
|
}
|
|
1842
1842
|
) });
|
|
1843
1843
|
};
|
|
1844
|
-
x$f.defaultProps = a$
|
|
1845
|
-
const a$
|
|
1844
|
+
x$f.defaultProps = a$s;
|
|
1845
|
+
const a$r = {
|
|
1846
1846
|
className: "",
|
|
1847
1847
|
style: void 0,
|
|
1848
1848
|
name: "CheckNormal",
|
|
@@ -1851,7 +1851,7 @@ const a$q = {
|
|
|
1851
1851
|
onClick: () => {
|
|
1852
1852
|
}
|
|
1853
1853
|
}, N = (h) => {
|
|
1854
|
-
const { className: o, style: m, name: e, color: d, width: p, height: C, onClick: r } = { ...a$
|
|
1854
|
+
const { className: o, style: m, name: e, color: d, width: p, height: C, onClick: r } = { ...a$r, ...h }, f = (t) => {
|
|
1855
1855
|
r && r(t);
|
|
1856
1856
|
}, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
|
|
1857
1857
|
const t = "nut-icon";
|
|
@@ -1888,8 +1888,8 @@ const a$q = {
|
|
|
1888
1888
|
}
|
|
1889
1889
|
) });
|
|
1890
1890
|
};
|
|
1891
|
-
N.defaultProps = a$
|
|
1892
|
-
const a$
|
|
1891
|
+
N.defaultProps = a$r;
|
|
1892
|
+
const a$q = {
|
|
1893
1893
|
className: "",
|
|
1894
1894
|
style: void 0,
|
|
1895
1895
|
name: "Check",
|
|
@@ -1898,7 +1898,7 @@ const a$p = {
|
|
|
1898
1898
|
onClick: () => {
|
|
1899
1899
|
}
|
|
1900
1900
|
}, x$e = (h) => {
|
|
1901
|
-
const { className: o, style: d, name: e, color: p, width: m, height: f, onClick: r } = { ...a$
|
|
1901
|
+
const { className: o, style: d, name: e, color: p, width: m, height: f, onClick: r } = { ...a$q, ...h }, g = (t) => {
|
|
1902
1902
|
r && r(t);
|
|
1903
1903
|
}, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
|
|
1904
1904
|
const t = "nut-icon";
|
|
@@ -1935,8 +1935,8 @@ const a$p = {
|
|
|
1935
1935
|
}
|
|
1936
1936
|
) });
|
|
1937
1937
|
};
|
|
1938
|
-
x$e.defaultProps = a$
|
|
1939
|
-
const a$
|
|
1938
|
+
x$e.defaultProps = a$q;
|
|
1939
|
+
const a$p = {
|
|
1940
1940
|
className: "",
|
|
1941
1941
|
style: void 0,
|
|
1942
1942
|
name: "Checked",
|
|
@@ -1945,7 +1945,7 @@ const a$o = {
|
|
|
1945
1945
|
onClick: () => {
|
|
1946
1946
|
}
|
|
1947
1947
|
}, x$d = (h) => {
|
|
1948
|
-
const { className: o, style: d, name: e, color: m, width: p, height: C, onClick: r } = { ...a$
|
|
1948
|
+
const { className: o, style: d, name: e, color: m, width: p, height: C, onClick: r } = { ...a$p, ...h }, f = (t) => {
|
|
1949
1949
|
r && r(t);
|
|
1950
1950
|
}, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
|
|
1951
1951
|
const t = "nut-icon";
|
|
@@ -1982,8 +1982,8 @@ const a$o = {
|
|
|
1982
1982
|
}
|
|
1983
1983
|
) });
|
|
1984
1984
|
};
|
|
1985
|
-
x$d.defaultProps = a$
|
|
1986
|
-
const a$
|
|
1985
|
+
x$d.defaultProps = a$p;
|
|
1986
|
+
const a$o = {
|
|
1987
1987
|
className: "",
|
|
1988
1988
|
style: void 0,
|
|
1989
1989
|
name: "Checklist",
|
|
@@ -1992,7 +1992,7 @@ const a$n = {
|
|
|
1992
1992
|
onClick: () => {
|
|
1993
1993
|
}
|
|
1994
1994
|
}, x$c = (h) => {
|
|
1995
|
-
const { className: i, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$
|
|
1995
|
+
const { className: i, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$o, ...h }, g = (t) => {
|
|
1996
1996
|
o && o(t);
|
|
1997
1997
|
}, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", k2 = () => {
|
|
1998
1998
|
const t = "nut-icon";
|
|
@@ -2029,8 +2029,8 @@ const a$n = {
|
|
|
2029
2029
|
}
|
|
2030
2030
|
) });
|
|
2031
2031
|
};
|
|
2032
|
-
x$c.defaultProps = a$
|
|
2033
|
-
const a$
|
|
2032
|
+
x$c.defaultProps = a$o;
|
|
2033
|
+
const a$n = {
|
|
2034
2034
|
className: "",
|
|
2035
2035
|
style: void 0,
|
|
2036
2036
|
name: "CircleClose",
|
|
@@ -2039,7 +2039,7 @@ const a$m = {
|
|
|
2039
2039
|
onClick: () => {
|
|
2040
2040
|
}
|
|
2041
2041
|
}, x$b = (h) => {
|
|
2042
|
-
const { className: l2, style: m, name: e, color: d, width: p, height: C, onClick: o } = { ...a$
|
|
2042
|
+
const { className: l2, style: m, name: e, color: d, width: p, height: C, onClick: o } = { ...a$n, ...h }, f = (t) => {
|
|
2043
2043
|
o && o(t);
|
|
2044
2044
|
}, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
|
|
2045
2045
|
const t = "nut-icon";
|
|
@@ -2076,8 +2076,8 @@ const a$m = {
|
|
|
2076
2076
|
}
|
|
2077
2077
|
) });
|
|
2078
2078
|
};
|
|
2079
|
-
x$b.defaultProps = a$
|
|
2080
|
-
const a$
|
|
2079
|
+
x$b.defaultProps = a$n;
|
|
2080
|
+
const a$m = {
|
|
2081
2081
|
className: "",
|
|
2082
2082
|
style: void 0,
|
|
2083
2083
|
name: "Close",
|
|
@@ -2086,7 +2086,7 @@ const a$l = {
|
|
|
2086
2086
|
onClick: () => {
|
|
2087
2087
|
}
|
|
2088
2088
|
}, x$a = (h) => {
|
|
2089
|
-
const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$
|
|
2089
|
+
const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$m, ...h }, g = (t) => {
|
|
2090
2090
|
r && r(t);
|
|
2091
2091
|
}, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
|
|
2092
2092
|
const t = "nut-icon";
|
|
@@ -2123,8 +2123,8 @@ const a$l = {
|
|
|
2123
2123
|
}
|
|
2124
2124
|
) });
|
|
2125
2125
|
};
|
|
2126
|
-
x$a.defaultProps = a$
|
|
2127
|
-
const a$
|
|
2126
|
+
x$a.defaultProps = a$m;
|
|
2127
|
+
const a$l = {
|
|
2128
2128
|
className: "",
|
|
2129
2129
|
style: void 0,
|
|
2130
2130
|
name: "Del",
|
|
@@ -2133,7 +2133,7 @@ const a$k = {
|
|
|
2133
2133
|
onClick: () => {
|
|
2134
2134
|
}
|
|
2135
2135
|
}, y$6 = (h) => {
|
|
2136
|
-
const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$
|
|
2136
|
+
const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$l, ...h }, g = (t) => {
|
|
2137
2137
|
r && r(t);
|
|
2138
2138
|
}, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
|
|
2139
2139
|
const t = "nut-icon";
|
|
@@ -2170,8 +2170,8 @@ const a$k = {
|
|
|
2170
2170
|
}
|
|
2171
2171
|
) });
|
|
2172
2172
|
};
|
|
2173
|
-
y$6.defaultProps = a$
|
|
2174
|
-
const a$
|
|
2173
|
+
y$6.defaultProps = a$l;
|
|
2174
|
+
const a$k = {
|
|
2175
2175
|
className: "",
|
|
2176
2176
|
style: void 0,
|
|
2177
2177
|
name: "DownArrow",
|
|
@@ -2180,7 +2180,7 @@ const a$j = {
|
|
|
2180
2180
|
onClick: () => {
|
|
2181
2181
|
}
|
|
2182
2182
|
}, x$9 = (h) => {
|
|
2183
|
-
const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$
|
|
2183
|
+
const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$k, ...h }, f = (t) => {
|
|
2184
2184
|
n && n(t);
|
|
2185
2185
|
}, c = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
|
|
2186
2186
|
const t = "nut-icon";
|
|
@@ -2217,8 +2217,8 @@ const a$j = {
|
|
|
2217
2217
|
}
|
|
2218
2218
|
) });
|
|
2219
2219
|
};
|
|
2220
|
-
x$9.defaultProps = a$
|
|
2221
|
-
const a$
|
|
2220
|
+
x$9.defaultProps = a$k;
|
|
2221
|
+
const a$j = {
|
|
2222
2222
|
className: "",
|
|
2223
2223
|
style: void 0,
|
|
2224
2224
|
name: "Failure",
|
|
@@ -2227,7 +2227,7 @@ const a$i = {
|
|
|
2227
2227
|
onClick: () => {
|
|
2228
2228
|
}
|
|
2229
2229
|
}, x$8 = (h) => {
|
|
2230
|
-
const { className: r, style: d, name: e, color: m, width: p, height: f, onClick: l2 } = { ...a$
|
|
2230
|
+
const { className: r, style: d, name: e, color: m, width: p, height: f, onClick: l2 } = { ...a$j, ...h }, u = (t) => {
|
|
2231
2231
|
l2 && l2(t);
|
|
2232
2232
|
}, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
|
|
2233
2233
|
const t = "nut-icon";
|
|
@@ -2264,8 +2264,8 @@ const a$i = {
|
|
|
2264
2264
|
}
|
|
2265
2265
|
) });
|
|
2266
2266
|
};
|
|
2267
|
-
x$8.defaultProps = a$
|
|
2268
|
-
const a$
|
|
2267
|
+
x$8.defaultProps = a$j;
|
|
2268
|
+
const a$i = {
|
|
2269
2269
|
className: "",
|
|
2270
2270
|
style: void 0,
|
|
2271
2271
|
name: "ImageError",
|
|
@@ -2273,8 +2273,8 @@ const a$h = {
|
|
|
2273
2273
|
height: "",
|
|
2274
2274
|
onClick: () => {
|
|
2275
2275
|
}
|
|
2276
|
-
}, k$
|
|
2277
|
-
const { className: s, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$
|
|
2276
|
+
}, k$5 = (h) => {
|
|
2277
|
+
const { className: s, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$i, ...h }, g = (t) => {
|
|
2278
2278
|
o && o(t);
|
|
2279
2279
|
}, c = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
|
|
2280
2280
|
const t = "nut-icon";
|
|
@@ -2322,8 +2322,8 @@ const a$h = {
|
|
|
2322
2322
|
}
|
|
2323
2323
|
) });
|
|
2324
2324
|
};
|
|
2325
|
-
k$
|
|
2326
|
-
const a$
|
|
2325
|
+
k$5.defaultProps = a$i;
|
|
2326
|
+
const a$h = {
|
|
2327
2327
|
className: "",
|
|
2328
2328
|
style: void 0,
|
|
2329
2329
|
name: "Image",
|
|
@@ -2331,8 +2331,8 @@ const a$g = {
|
|
|
2331
2331
|
height: "",
|
|
2332
2332
|
onClick: () => {
|
|
2333
2333
|
}
|
|
2334
|
-
}, k$
|
|
2335
|
-
const { className: l2, style: d, name: c, color: m, width: p, height: f, onClick: r } = { ...a$
|
|
2334
|
+
}, k$4 = (h) => {
|
|
2335
|
+
const { className: l2, style: d, name: c, color: m, width: p, height: f, onClick: r } = { ...a$h, ...h }, g = (t) => {
|
|
2336
2336
|
r && r(t);
|
|
2337
2337
|
}, o = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
|
|
2338
2338
|
const t = "nut-icon";
|
|
@@ -2380,8 +2380,8 @@ const a$g = {
|
|
|
2380
2380
|
}
|
|
2381
2381
|
) });
|
|
2382
2382
|
};
|
|
2383
|
-
k$
|
|
2384
|
-
const a$
|
|
2383
|
+
k$4.defaultProps = a$h;
|
|
2384
|
+
const a$g = {
|
|
2385
2385
|
className: "",
|
|
2386
2386
|
style: void 0,
|
|
2387
2387
|
name: "JoySmile",
|
|
@@ -2390,7 +2390,7 @@ const a$f = {
|
|
|
2390
2390
|
onClick: () => {
|
|
2391
2391
|
}
|
|
2392
2392
|
}, x$7 = (h) => {
|
|
2393
|
-
const { className: i, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$
|
|
2393
|
+
const { className: i, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$g, ...h }, g = (t) => {
|
|
2394
2394
|
r && r(t);
|
|
2395
2395
|
}, c = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
|
|
2396
2396
|
const t = "nut-icon";
|
|
@@ -2427,8 +2427,8 @@ const a$f = {
|
|
|
2427
2427
|
}
|
|
2428
2428
|
) });
|
|
2429
2429
|
};
|
|
2430
|
-
x$7.defaultProps = a$
|
|
2431
|
-
const a$
|
|
2430
|
+
x$7.defaultProps = a$g;
|
|
2431
|
+
const a$f = {
|
|
2432
2432
|
className: "",
|
|
2433
2433
|
style: void 0,
|
|
2434
2434
|
name: "Left",
|
|
@@ -2437,7 +2437,7 @@ const a$e = {
|
|
|
2437
2437
|
onClick: () => {
|
|
2438
2438
|
}
|
|
2439
2439
|
}, y$5 = (h) => {
|
|
2440
|
-
const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: n } = { ...a$
|
|
2440
|
+
const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: n } = { ...a$f, ...h }, g = (t) => {
|
|
2441
2441
|
n && n(t);
|
|
2442
2442
|
}, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
|
|
2443
2443
|
const t = "nut-icon";
|
|
@@ -2474,8 +2474,8 @@ const a$e = {
|
|
|
2474
2474
|
}
|
|
2475
2475
|
) });
|
|
2476
2476
|
};
|
|
2477
|
-
y$5.defaultProps = a$
|
|
2478
|
-
const a$
|
|
2477
|
+
y$5.defaultProps = a$f;
|
|
2478
|
+
const a$e = {
|
|
2479
2479
|
className: "",
|
|
2480
2480
|
style: void 0,
|
|
2481
2481
|
name: "Link",
|
|
@@ -2484,7 +2484,7 @@ const a$d = {
|
|
|
2484
2484
|
onClick: () => {
|
|
2485
2485
|
}
|
|
2486
2486
|
}, x$6 = (h) => {
|
|
2487
|
-
const { className: s, style: d, name: c, color: m, width: p, height: f, onClick: n } = { ...a$
|
|
2487
|
+
const { className: s, style: d, name: c, color: m, width: p, height: f, onClick: n } = { ...a$e, ...h }, g = (t) => {
|
|
2488
2488
|
n && n(t);
|
|
2489
2489
|
}, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", k2 = () => {
|
|
2490
2490
|
const t = "nut-icon";
|
|
@@ -2521,8 +2521,8 @@ const a$d = {
|
|
|
2521
2521
|
}
|
|
2522
2522
|
) });
|
|
2523
2523
|
};
|
|
2524
|
-
x$6.defaultProps = a$
|
|
2525
|
-
const a$
|
|
2524
|
+
x$6.defaultProps = a$e;
|
|
2525
|
+
const a$d = {
|
|
2526
2526
|
className: "",
|
|
2527
2527
|
style: void 0,
|
|
2528
2528
|
name: "Loading",
|
|
@@ -2530,8 +2530,8 @@ const a$c = {
|
|
|
2530
2530
|
height: "",
|
|
2531
2531
|
onClick: () => {
|
|
2532
2532
|
}
|
|
2533
|
-
}, k$
|
|
2534
|
-
const { className: l2, style: m, name: t, color: d, width: p, height: g, onClick: o } = { ...a$
|
|
2533
|
+
}, k$3 = (h) => {
|
|
2534
|
+
const { className: l2, style: m, name: t, color: d, width: p, height: g, onClick: o } = { ...a$d, ...h }, f = (c) => {
|
|
2535
2535
|
o && o(c);
|
|
2536
2536
|
}, n = (c) => c === "" ? "" : isNaN(Number(c)) ? String(c) : c + "px", z = () => {
|
|
2537
2537
|
const c = "nut-icon";
|
|
@@ -2568,8 +2568,8 @@ const a$c = {
|
|
|
2568
2568
|
}
|
|
2569
2569
|
) });
|
|
2570
2570
|
};
|
|
2571
|
-
k$
|
|
2572
|
-
const a$
|
|
2571
|
+
k$3.defaultProps = a$d;
|
|
2572
|
+
const a$c = {
|
|
2573
2573
|
className: "",
|
|
2574
2574
|
style: void 0,
|
|
2575
2575
|
name: "Location2",
|
|
@@ -2578,7 +2578,7 @@ const a$b = {
|
|
|
2578
2578
|
onClick: () => {
|
|
2579
2579
|
}
|
|
2580
2580
|
}, x$5 = (h) => {
|
|
2581
|
-
const { className: o, style: m, name: s, color: d, width: p, height: f, onClick: n } = { ...a$
|
|
2581
|
+
const { className: o, style: m, name: s, color: d, width: p, height: f, onClick: n } = { ...a$c, ...h }, g = (t) => {
|
|
2582
2582
|
n && n(t);
|
|
2583
2583
|
}, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
|
|
2584
2584
|
const t = "nut-icon";
|
|
@@ -2615,8 +2615,8 @@ const a$b = {
|
|
|
2615
2615
|
}
|
|
2616
2616
|
) });
|
|
2617
2617
|
};
|
|
2618
|
-
x$5.defaultProps = a$
|
|
2619
|
-
const a$
|
|
2618
|
+
x$5.defaultProps = a$c;
|
|
2619
|
+
const a$b = {
|
|
2620
2620
|
className: "",
|
|
2621
2621
|
style: void 0,
|
|
2622
2622
|
name: "MaskClose",
|
|
@@ -2625,7 +2625,7 @@ const a$a = {
|
|
|
2625
2625
|
onClick: () => {
|
|
2626
2626
|
}
|
|
2627
2627
|
}, x$4 = (h) => {
|
|
2628
|
-
const { className: c, style: d, name: s, color: m, width: p, height: f, onClick: l2 } = { ...a$
|
|
2628
|
+
const { className: c, style: d, name: s, color: m, width: p, height: f, onClick: l2 } = { ...a$b, ...h }, g = (t) => {
|
|
2629
2629
|
l2 && l2(t);
|
|
2630
2630
|
}, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
|
|
2631
2631
|
const t = "nut-icon";
|
|
@@ -2662,8 +2662,8 @@ const a$a = {
|
|
|
2662
2662
|
}
|
|
2663
2663
|
) });
|
|
2664
2664
|
};
|
|
2665
|
-
x$4.defaultProps = a$
|
|
2666
|
-
const a$
|
|
2665
|
+
x$4.defaultProps = a$b;
|
|
2666
|
+
const a$a = {
|
|
2667
2667
|
className: "",
|
|
2668
2668
|
style: void 0,
|
|
2669
2669
|
name: "Minus",
|
|
@@ -2672,7 +2672,7 @@ const a$9 = {
|
|
|
2672
2672
|
onClick: () => {
|
|
2673
2673
|
}
|
|
2674
2674
|
}, y$4 = (h) => {
|
|
2675
|
-
const { className: i, style: d, name: s, color: p, width: m, height: f, onClick: o } = { ...a$
|
|
2675
|
+
const { className: i, style: d, name: s, color: p, width: m, height: f, onClick: o } = { ...a$a, ...h }, u = (t) => {
|
|
2676
2676
|
o && o(t);
|
|
2677
2677
|
}, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
|
|
2678
2678
|
const t = "nut-icon";
|
|
@@ -2709,7 +2709,54 @@ const a$9 = {
|
|
|
2709
2709
|
}
|
|
2710
2710
|
) });
|
|
2711
2711
|
};
|
|
2712
|
-
y$4.defaultProps = a$
|
|
2712
|
+
y$4.defaultProps = a$a;
|
|
2713
|
+
const a$9 = {
|
|
2714
|
+
className: "",
|
|
2715
|
+
style: void 0,
|
|
2716
|
+
name: "My",
|
|
2717
|
+
width: "",
|
|
2718
|
+
height: "",
|
|
2719
|
+
onClick: () => {
|
|
2720
|
+
}
|
|
2721
|
+
}, k$2 = (h) => {
|
|
2722
|
+
const { className: o, style: d, name: s, color: m, width: p, height: f, onClick: r } = { ...a$9, ...h }, g = (t) => {
|
|
2723
|
+
r && r(t);
|
|
2724
|
+
}, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
|
|
2725
|
+
const t = "nut-icon";
|
|
2726
|
+
return classNames({
|
|
2727
|
+
[`${o}`]: o,
|
|
2728
|
+
[t]: true,
|
|
2729
|
+
[t + "-" + s]: s
|
|
2730
|
+
});
|
|
2731
|
+
}, e = {}, i = n(p || ""), l2 = n(f || "");
|
|
2732
|
+
i && (e.width = i), l2 && (e.height = l2);
|
|
2733
|
+
const y2 = () => ({
|
|
2734
|
+
...d,
|
|
2735
|
+
...e
|
|
2736
|
+
});
|
|
2737
|
+
return /* @__PURE__ */ cr(lr, { children: /* @__PURE__ */ cr(
|
|
2738
|
+
"svg",
|
|
2739
|
+
{
|
|
2740
|
+
className: u(),
|
|
2741
|
+
style: y2(),
|
|
2742
|
+
onClick: g,
|
|
2743
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2744
|
+
color: m,
|
|
2745
|
+
viewBox: "0 0 1024 1024",
|
|
2746
|
+
"aria-labelledby": s,
|
|
2747
|
+
role: "presentation",
|
|
2748
|
+
children: /* @__PURE__ */ cr(
|
|
2749
|
+
"path",
|
|
2750
|
+
{
|
|
2751
|
+
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",
|
|
2752
|
+
fill: "currentColor",
|
|
2753
|
+
fillOpacity: "0.9"
|
|
2754
|
+
}
|
|
2755
|
+
)
|
|
2756
|
+
}
|
|
2757
|
+
) });
|
|
2758
|
+
};
|
|
2759
|
+
k$2.defaultProps = a$9;
|
|
2713
2760
|
const a$8 = {
|
|
2714
2761
|
className: "",
|
|
2715
2762
|
style: void 0,
|
|
@@ -3265,7 +3312,7 @@ const Button = React__default.forwardRef(
|
|
|
3265
3312
|
style: { ...getStyle(), ...style },
|
|
3266
3313
|
onClick: (e) => handleClick2(e),
|
|
3267
3314
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-button__warp", children: [
|
|
3268
|
-
loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(k$
|
|
3315
|
+
loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(k$3, { className: "nut-icon-loading" }) : null,
|
|
3269
3316
|
!loading && icon ? icon : null,
|
|
3270
3317
|
children && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: icon || loading ? "nut-button-text" : "", children })
|
|
3271
3318
|
] })
|
|
@@ -3285,7 +3332,7 @@ const defaultProps$1q = {
|
|
|
3285
3332
|
onClick: (event) => {
|
|
3286
3333
|
}
|
|
3287
3334
|
};
|
|
3288
|
-
const classPrefix$
|
|
3335
|
+
const classPrefix$g = "nut-cell";
|
|
3289
3336
|
const Cell = (props) => {
|
|
3290
3337
|
const {
|
|
3291
3338
|
children,
|
|
@@ -3316,24 +3363,24 @@ const Cell = (props) => {
|
|
|
3316
3363
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3317
3364
|
"div",
|
|
3318
3365
|
{
|
|
3319
|
-
className: classNames(classPrefix$
|
|
3366
|
+
className: classNames(classPrefix$g, className),
|
|
3320
3367
|
onClick: (event) => handleClick2(event),
|
|
3321
3368
|
style: baseStyle,
|
|
3322
3369
|
...rest,
|
|
3323
3370
|
children: children || /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
3324
|
-
title || description ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix$
|
|
3325
|
-
title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$
|
|
3326
|
-
description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$
|
|
3371
|
+
title || description ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix$g}__left`, children: [
|
|
3372
|
+
title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$g}__title`, children: title }) : null,
|
|
3373
|
+
description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$g}__description`, children: description }) : null
|
|
3327
3374
|
] }) : null,
|
|
3328
3375
|
extra ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3329
3376
|
"div",
|
|
3330
3377
|
{
|
|
3331
|
-
className: `${classPrefix$
|
|
3378
|
+
className: `${classPrefix$g}__extra`,
|
|
3332
3379
|
style: styles,
|
|
3333
3380
|
children: extra
|
|
3334
3381
|
}
|
|
3335
3382
|
) : null,
|
|
3336
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$
|
|
3383
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$g}__divider` })
|
|
3337
3384
|
] })
|
|
3338
3385
|
}
|
|
3339
3386
|
);
|
|
@@ -3343,18 +3390,25 @@ Cell.displayName = "NutCell";
|
|
|
3343
3390
|
const defaultProps$1p = {
|
|
3344
3391
|
...ComponentDefaults,
|
|
3345
3392
|
title: "",
|
|
3346
|
-
description: ""
|
|
3393
|
+
description: "",
|
|
3394
|
+
divider: true
|
|
3347
3395
|
};
|
|
3348
|
-
const classPrefix$
|
|
3396
|
+
const classPrefix$f = "nut-cell-group";
|
|
3349
3397
|
const CellGroup = (props) => {
|
|
3350
|
-
const { children, className, style, title, description, ...rest } = {
|
|
3398
|
+
const { children, className, style, title, description, divider, ...rest } = {
|
|
3351
3399
|
...defaultProps$1p,
|
|
3352
3400
|
...props
|
|
3353
3401
|
};
|
|
3354
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classNames(classPrefix$
|
|
3355
|
-
title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$
|
|
3356
|
-
description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$
|
|
3357
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3402
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classNames(classPrefix$f, className), ...rest, children: [
|
|
3403
|
+
title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$f}__title`, children: title }) : null,
|
|
3404
|
+
description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$f}__description`, children: description }) : null,
|
|
3405
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3406
|
+
"div",
|
|
3407
|
+
{
|
|
3408
|
+
className: `${classPrefix$f}__wrap ${divider ? `${classPrefix$f}__wrap--divider` : ""}`,
|
|
3409
|
+
children
|
|
3410
|
+
}
|
|
3411
|
+
)
|
|
3358
3412
|
] });
|
|
3359
3413
|
};
|
|
3360
3414
|
CellGroup.defaultProps = defaultProps$1p;
|
|
@@ -3829,7 +3883,7 @@ const defaultProps$1n = {
|
|
|
3829
3883
|
loading: true,
|
|
3830
3884
|
lazy: false
|
|
3831
3885
|
};
|
|
3832
|
-
const classPrefix$
|
|
3886
|
+
const classPrefix$e = "nut-image";
|
|
3833
3887
|
const Image$1 = (props) => {
|
|
3834
3888
|
const {
|
|
3835
3889
|
className,
|
|
@@ -3924,7 +3978,7 @@ const Image$1 = (props) => {
|
|
|
3924
3978
|
if (!isError)
|
|
3925
3979
|
return null;
|
|
3926
3980
|
if (typeof error === "boolean" && error === true && !innerLoading) {
|
|
3927
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-error", children: /* @__PURE__ */ jsxRuntimeExports.jsx(k$
|
|
3981
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-error", children: /* @__PURE__ */ jsxRuntimeExports.jsx(k$5, {}) });
|
|
3928
3982
|
}
|
|
3929
3983
|
if (React__default.isValidElement(error) && !innerLoading) {
|
|
3930
3984
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-error", children: error });
|
|
@@ -3935,7 +3989,7 @@ const Image$1 = (props) => {
|
|
|
3935
3989
|
if (!loading)
|
|
3936
3990
|
return null;
|
|
3937
3991
|
if (typeof loading === "boolean" && loading === true && innerLoading) {
|
|
3938
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-loading", children: /* @__PURE__ */ jsxRuntimeExports.jsx(k$
|
|
3992
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-loading", children: /* @__PURE__ */ jsxRuntimeExports.jsx(k$4, {}) });
|
|
3939
3993
|
}
|
|
3940
3994
|
if (React__default.isValidElement(loading) && innerLoading) {
|
|
3941
3995
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-loading", children: loading });
|
|
@@ -3945,7 +3999,7 @@ const Image$1 = (props) => {
|
|
|
3945
3999
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
3946
4000
|
"div",
|
|
3947
4001
|
{
|
|
3948
|
-
className: classNames(classPrefix$
|
|
4002
|
+
className: classNames(classPrefix$e, className),
|
|
3949
4003
|
style: containerStyle,
|
|
3950
4004
|
onClick: (e) => {
|
|
3951
4005
|
imageClick(e);
|
|
@@ -4113,21 +4167,21 @@ const defaultProps$1l = {
|
|
|
4113
4167
|
contentPosition: "center",
|
|
4114
4168
|
direction: "horizontal"
|
|
4115
4169
|
};
|
|
4116
|
-
const classPrefix$
|
|
4170
|
+
const classPrefix$d = `nut-divider`;
|
|
4117
4171
|
const Divider = (props) => {
|
|
4118
4172
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
4119
4173
|
...defaultProps$1l,
|
|
4120
4174
|
...props
|
|
4121
4175
|
};
|
|
4122
4176
|
const classes = direction === "horizontal" ? classNames({
|
|
4123
|
-
[`${classPrefix$
|
|
4124
|
-
[`${classPrefix$
|
|
4125
|
-
[`${classPrefix$
|
|
4126
|
-
[`${classPrefix$
|
|
4127
|
-
[`${classPrefix$
|
|
4177
|
+
[`${classPrefix$d}`]: true,
|
|
4178
|
+
[`${classPrefix$d}__center`]: children,
|
|
4179
|
+
[`${classPrefix$d}__left`]: contentPosition === "left",
|
|
4180
|
+
[`${classPrefix$d}__right`]: contentPosition === "right",
|
|
4181
|
+
[`${classPrefix$d}__hairline`]: true
|
|
4128
4182
|
}) : classNames({
|
|
4129
|
-
[`${classPrefix$
|
|
4130
|
-
[`${classPrefix$
|
|
4183
|
+
[`${classPrefix$d}`]: true,
|
|
4184
|
+
[`${classPrefix$d}__vertical`]: direction === "vertical"
|
|
4131
4185
|
});
|
|
4132
4186
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classes} ${className || ""}`, style, ...rest, children });
|
|
4133
4187
|
};
|
|
@@ -4288,7 +4342,7 @@ const Layout = (props) => {
|
|
|
4288
4342
|
};
|
|
4289
4343
|
Layout.defaultProps = defaultProps$1i;
|
|
4290
4344
|
Layout.displayName = "NutLayout";
|
|
4291
|
-
const classPrefix$
|
|
4345
|
+
const classPrefix$c = "nut-row";
|
|
4292
4346
|
const defaultProps$1h = {
|
|
4293
4347
|
...ComponentDefaults,
|
|
4294
4348
|
type: "",
|
|
@@ -4323,7 +4377,7 @@ const Row = (props) => {
|
|
|
4323
4377
|
${getClass("justify", justify)}
|
|
4324
4378
|
${getClass("align", align)}
|
|
4325
4379
|
${getClass("flex", wrap)}
|
|
4326
|
-
${classPrefix$
|
|
4380
|
+
${classPrefix$c}
|
|
4327
4381
|
`;
|
|
4328
4382
|
};
|
|
4329
4383
|
const parentRow = {
|
|
@@ -4422,7 +4476,7 @@ const defaultProps$1g = {
|
|
|
4422
4476
|
threshold: 0,
|
|
4423
4477
|
zIndex: 2e3
|
|
4424
4478
|
};
|
|
4425
|
-
const classPrefix$
|
|
4479
|
+
const classPrefix$b = "nut-sticky";
|
|
4426
4480
|
const Sticky = (props) => {
|
|
4427
4481
|
const {
|
|
4428
4482
|
position,
|
|
@@ -4544,7 +4598,7 @@ const Sticky = (props) => {
|
|
|
4544
4598
|
{
|
|
4545
4599
|
ref: rootRef,
|
|
4546
4600
|
style: { ...style, ...rootStyle },
|
|
4547
|
-
className: classNames(classPrefix$
|
|
4601
|
+
className: classNames(classPrefix$b, className),
|
|
4548
4602
|
...rest,
|
|
4549
4603
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-sticky--box", ref: stickyRef, style: stickyStyle, children })
|
|
4550
4604
|
}
|
|
@@ -12221,280 +12275,189 @@ const SubSideNavBar = (props) => {
|
|
|
12221
12275
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-subsidenavbar__content", children })
|
|
12222
12276
|
] });
|
|
12223
12277
|
};
|
|
12224
|
-
|
|
12225
|
-
|
|
12226
|
-
|
|
12227
|
-
|
|
12228
|
-
|
|
12229
|
-
set exports(v) {
|
|
12230
|
-
classnameExports = v;
|
|
12231
|
-
}
|
|
12232
|
-
};
|
|
12233
|
-
var classname_production_min = {};
|
|
12234
|
-
var hasRequiredClassname_production_min;
|
|
12235
|
-
function requireClassname_production_min() {
|
|
12236
|
-
if (hasRequiredClassname_production_min)
|
|
12237
|
-
return classname_production_min;
|
|
12238
|
-
hasRequiredClassname_production_min = 1;
|
|
12239
|
-
function r(r2) {
|
|
12240
|
-
function t2(t3, i, a2, o) {
|
|
12241
|
-
var f = i ? e + t3 + r2.e + i : e + t3, v = f;
|
|
12242
|
-
if (a2) {
|
|
12243
|
-
var s = " " + v + r2.m;
|
|
12244
|
-
for (var u in a2)
|
|
12245
|
-
if (a2.hasOwnProperty(u)) {
|
|
12246
|
-
var p = a2[u];
|
|
12247
|
-
true === p ? v += s + u : p && (v += s + u + n + p);
|
|
12248
|
-
}
|
|
12249
|
-
}
|
|
12250
|
-
if (void 0 !== o)
|
|
12251
|
-
for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
|
|
12252
|
-
var l2 = o[y2];
|
|
12253
|
-
if (l2 && "string" == typeof l2.valueOf())
|
|
12254
|
-
for (var g = l2.valueOf().split(" "), d = 0; d < g.length; d++) {
|
|
12255
|
-
var h = g[d];
|
|
12256
|
-
h !== f && (v += " " + h);
|
|
12257
|
-
}
|
|
12258
|
-
}
|
|
12259
|
-
return v;
|
|
12260
|
-
}
|
|
12261
|
-
var e = r2.n || "", n = r2.v || r2.m;
|
|
12262
|
-
return function(r3, e2) {
|
|
12263
|
-
return function(n2, i, a2) {
|
|
12264
|
-
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);
|
|
12265
|
-
};
|
|
12266
|
-
};
|
|
12278
|
+
function usePropsValue({
|
|
12279
|
+
value,
|
|
12280
|
+
defaultValue,
|
|
12281
|
+
finalValue,
|
|
12282
|
+
onChange = (value2) => {
|
|
12267
12283
|
}
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
|
|
12275
|
-
|
|
12276
|
-
if (
|
|
12277
|
-
return
|
|
12278
|
-
hasRequiredClassname_development = 1;
|
|
12279
|
-
Object.defineProperty(classname_development, "__esModule", { value: true });
|
|
12280
|
-
function withNaming(preset) {
|
|
12281
|
-
var nameSpace = preset.n || "";
|
|
12282
|
-
var modValueDelimiter = preset.v || preset.m;
|
|
12283
|
-
function stringify(b, e, m, mix) {
|
|
12284
|
-
var entityName = e ? nameSpace + b + preset.e + e : nameSpace + b;
|
|
12285
|
-
var className = entityName;
|
|
12286
|
-
if (m) {
|
|
12287
|
-
var modPrefix = " " + className + preset.m;
|
|
12288
|
-
for (var k2 in m) {
|
|
12289
|
-
if (m.hasOwnProperty(k2)) {
|
|
12290
|
-
var modVal = m[k2];
|
|
12291
|
-
if (modVal === true) {
|
|
12292
|
-
className += modPrefix + k2;
|
|
12293
|
-
} else if (modVal) {
|
|
12294
|
-
className += modPrefix + k2 + modValueDelimiter + modVal;
|
|
12295
|
-
}
|
|
12296
|
-
}
|
|
12297
|
-
}
|
|
12298
|
-
}
|
|
12299
|
-
if (mix !== void 0) {
|
|
12300
|
-
mix = Array.isArray(mix) ? mix : [mix];
|
|
12301
|
-
for (var i = 0, len = mix.length; i < len; i++) {
|
|
12302
|
-
var value = mix[i];
|
|
12303
|
-
if (!value || typeof value.valueOf() !== "string")
|
|
12304
|
-
continue;
|
|
12305
|
-
var mixes = value.valueOf().split(" ");
|
|
12306
|
-
for (var j = 0; j < mixes.length; j++) {
|
|
12307
|
-
var val = mixes[j];
|
|
12308
|
-
if (val !== entityName) {
|
|
12309
|
-
className += " " + val;
|
|
12310
|
-
}
|
|
12311
|
-
}
|
|
12312
|
-
}
|
|
12313
|
-
}
|
|
12314
|
-
return className;
|
|
12315
|
-
}
|
|
12316
|
-
return function cnGenerator(b, e) {
|
|
12317
|
-
return function(elemOrMods, elemModsOrBlockMix, elemMix) {
|
|
12318
|
-
if (typeof elemOrMods === "string") {
|
|
12319
|
-
if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
|
|
12320
|
-
return stringify(b, elemOrMods, void 0, elemModsOrBlockMix);
|
|
12321
|
-
}
|
|
12322
|
-
return stringify(b, elemOrMods, elemModsOrBlockMix, elemMix);
|
|
12323
|
-
}
|
|
12324
|
-
return stringify(b, e, elemOrMods, elemModsOrBlockMix);
|
|
12325
|
-
};
|
|
12326
|
-
};
|
|
12284
|
+
}) {
|
|
12285
|
+
const [uncontrolled, setUncontrolled] = useState(
|
|
12286
|
+
defaultValue !== void 0 ? defaultValue : finalValue
|
|
12287
|
+
);
|
|
12288
|
+
const handleUncontrolledChange = (val) => {
|
|
12289
|
+
setUncontrolled(val);
|
|
12290
|
+
onChange == null ? void 0 : onChange(val);
|
|
12291
|
+
};
|
|
12292
|
+
if (value !== void 0) {
|
|
12293
|
+
return [value, onChange];
|
|
12327
12294
|
}
|
|
12328
|
-
|
|
12329
|
-
e: "-",
|
|
12330
|
-
m: "_"
|
|
12331
|
-
});
|
|
12332
|
-
classname_development.cn = cn2;
|
|
12333
|
-
classname_development.withNaming = withNaming;
|
|
12334
|
-
return classname_development;
|
|
12295
|
+
return [uncontrolled, handleUncontrolledChange];
|
|
12335
12296
|
}
|
|
12336
|
-
(function(module) {
|
|
12337
|
-
if (process.env.NODE_ENV === "production") {
|
|
12338
|
-
module.exports = requireClassname_production_min();
|
|
12339
|
-
} else {
|
|
12340
|
-
module.exports = requireClassname_development();
|
|
12341
|
-
}
|
|
12342
|
-
})(classname);
|
|
12343
|
-
const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
12344
12297
|
const defaultProps$18 = {
|
|
12345
|
-
|
|
12346
|
-
|
|
12347
|
-
|
|
12348
|
-
|
|
12349
|
-
|
|
12350
|
-
|
|
12351
|
-
|
|
12352
|
-
style: {},
|
|
12353
|
-
onSwitch: (child, activeVisible) => {
|
|
12354
|
-
}
|
|
12298
|
+
...ComponentDefaults,
|
|
12299
|
+
value: "",
|
|
12300
|
+
dot: false,
|
|
12301
|
+
max: 99,
|
|
12302
|
+
top: "0",
|
|
12303
|
+
right: "5",
|
|
12304
|
+
color: ""
|
|
12355
12305
|
};
|
|
12356
|
-
const
|
|
12357
|
-
const {
|
|
12358
|
-
|
|
12359
|
-
visible,
|
|
12360
|
-
activeVisible,
|
|
12361
|
-
bottom,
|
|
12362
|
-
size,
|
|
12363
|
-
activeColor,
|
|
12364
|
-
unactiveColor,
|
|
12365
|
-
safeAreaInsetBottom,
|
|
12366
|
-
className,
|
|
12367
|
-
style,
|
|
12368
|
-
onSwitch
|
|
12369
|
-
} = {
|
|
12370
|
-
...defaultProps$18,
|
|
12306
|
+
const Badge = (props) => {
|
|
12307
|
+
const { className, style, value, max, children, dot, top, right, color } = {
|
|
12308
|
+
...defaultProps$18,
|
|
12371
12309
|
...props
|
|
12372
12310
|
};
|
|
12373
|
-
const
|
|
12374
|
-
const
|
|
12375
|
-
const
|
|
12376
|
-
|
|
12377
|
-
|
|
12311
|
+
const classPrefix2 = "nut-badge";
|
|
12312
|
+
const classes = classNames(classPrefix2, className);
|
|
12313
|
+
const contentClasses = classNames(
|
|
12314
|
+
{ [`${classPrefix2}__dot`]: dot },
|
|
12315
|
+
`${classPrefix2}__content`,
|
|
12316
|
+
`${classPrefix2}__sup`
|
|
12317
|
+
);
|
|
12318
|
+
function content() {
|
|
12319
|
+
if (dot || typeof value === "object")
|
|
12320
|
+
return null;
|
|
12321
|
+
if (typeof value === "number" && typeof max === "number") {
|
|
12322
|
+
return max < value ? `${max}+` : value;
|
|
12378
12323
|
}
|
|
12324
|
+
return value;
|
|
12325
|
+
}
|
|
12326
|
+
const getStyle = () => {
|
|
12327
|
+
const style2 = {};
|
|
12328
|
+
style2.top = `${Number(top) || parseFloat(top) || 0}px`;
|
|
12329
|
+
style2.right = `${Number(right) || parseFloat(right) || 0}px`;
|
|
12330
|
+
style2.background = color;
|
|
12331
|
+
return style2;
|
|
12379
12332
|
};
|
|
12380
|
-
|
|
12381
|
-
|
|
12382
|
-
|
|
12383
|
-
}
|
|
12384
|
-
}
|
|
12385
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12386
|
-
"div",
|
|
12387
|
-
{
|
|
12388
|
-
className: [
|
|
12389
|
-
`${b()}`,
|
|
12390
|
-
bottom ? `${b("bottom")}` : "",
|
|
12391
|
-
safeAreaInsetBottom ? `${b("bottom")} ${b("safebottom")}` : "",
|
|
12392
|
-
className
|
|
12393
|
-
].join(" "),
|
|
12394
|
-
style,
|
|
12395
|
-
children: React__default.Children.map(children, (child, idx) => {
|
|
12396
|
-
if (!React__default.isValidElement(child)) {
|
|
12397
|
-
return null;
|
|
12398
|
-
}
|
|
12399
|
-
const childProps = {
|
|
12400
|
-
...child.props,
|
|
12401
|
-
active: idx === selectIndex,
|
|
12402
|
-
index: idx,
|
|
12403
|
-
unactiveColor,
|
|
12404
|
-
activeColor,
|
|
12405
|
-
size,
|
|
12406
|
-
handleClick: () => {
|
|
12407
|
-
handleClick2(idx);
|
|
12408
|
-
onSwitch(child, idx);
|
|
12409
|
-
}
|
|
12410
|
-
};
|
|
12411
|
-
return React__default.cloneElement(child, childProps);
|
|
12412
|
-
})
|
|
12413
|
-
}
|
|
12414
|
-
);
|
|
12333
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes, style, children: [
|
|
12334
|
+
typeof value === "object" && value && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__icon`, children: value }),
|
|
12335
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children }),
|
|
12336
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: contentClasses, style: getStyle(), children: content() })
|
|
12337
|
+
] });
|
|
12415
12338
|
};
|
|
12416
|
-
|
|
12417
|
-
|
|
12339
|
+
Badge.defaultProps = defaultProps$18;
|
|
12340
|
+
Badge.displayName = "NutBadge";
|
|
12418
12341
|
const defaultProps$17 = {
|
|
12419
12342
|
...ComponentDefaults,
|
|
12420
|
-
|
|
12421
|
-
className: "",
|
|
12422
|
-
tabTitle: "",
|
|
12343
|
+
title: "",
|
|
12423
12344
|
icon: null,
|
|
12424
|
-
href: "",
|
|
12425
|
-
num: "",
|
|
12426
12345
|
active: false,
|
|
12427
|
-
activeColor: "",
|
|
12428
|
-
unactiveColor: "",
|
|
12429
12346
|
index: 0,
|
|
12430
12347
|
handleClick: (idx) => {
|
|
12431
12348
|
}
|
|
12432
12349
|
};
|
|
12433
12350
|
const TabbarItem = (props) => {
|
|
12434
12351
|
const {
|
|
12435
|
-
dot,
|
|
12436
12352
|
className,
|
|
12437
12353
|
style,
|
|
12438
|
-
|
|
12354
|
+
title,
|
|
12439
12355
|
icon,
|
|
12440
|
-
href,
|
|
12441
|
-
num,
|
|
12442
12356
|
active,
|
|
12443
12357
|
activeColor,
|
|
12444
|
-
|
|
12358
|
+
inactiveColor,
|
|
12445
12359
|
index,
|
|
12446
|
-
handleClick: handleClick2
|
|
12360
|
+
handleClick: handleClick2,
|
|
12361
|
+
...rest
|
|
12447
12362
|
} = {
|
|
12448
12363
|
...defaultProps$17,
|
|
12449
12364
|
...props
|
|
12450
12365
|
};
|
|
12451
|
-
const
|
|
12452
|
-
const
|
|
12453
|
-
|
|
12454
|
-
|
|
12455
|
-
|
|
12456
|
-
|
|
12457
|
-
|
|
12458
|
-
|
|
12366
|
+
const classPrefix2 = "nut-tabbar-item";
|
|
12367
|
+
const tabbarItemClass = classNames(className, classPrefix2, {
|
|
12368
|
+
[`${classPrefix2}-active`]: active
|
|
12369
|
+
});
|
|
12370
|
+
const boxPrefix = `${classPrefix2}__icon-box`;
|
|
12371
|
+
const titleClass = classNames(boxPrefix, `${boxPrefix}-nav`, {
|
|
12372
|
+
[`${boxPrefix}-large`]: !icon
|
|
12373
|
+
});
|
|
12374
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12459
12375
|
"div",
|
|
12460
12376
|
{
|
|
12461
|
-
className:
|
|
12377
|
+
className: tabbarItemClass,
|
|
12462
12378
|
style: {
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
},
|
|
12466
|
-
onClick: () => {
|
|
12467
|
-
handleClick2(index);
|
|
12379
|
+
color: active ? activeColor : inactiveColor,
|
|
12380
|
+
...style
|
|
12468
12381
|
},
|
|
12382
|
+
onClick: () => handleClick2(index),
|
|
12383
|
+
children: icon ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
12384
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: boxPrefix, children: icon }) }),
|
|
12385
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: titleClass, children: title })
|
|
12386
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: titleClass, children: title }) })
|
|
12387
|
+
}
|
|
12388
|
+
);
|
|
12389
|
+
};
|
|
12390
|
+
const defaultProps$16 = {
|
|
12391
|
+
...ComponentDefaults,
|
|
12392
|
+
defaultValue: 0,
|
|
12393
|
+
fixed: false,
|
|
12394
|
+
inactiveColor: "",
|
|
12395
|
+
activeColor: "",
|
|
12396
|
+
safeArea: false,
|
|
12397
|
+
onSwitch: (value) => {
|
|
12398
|
+
}
|
|
12399
|
+
};
|
|
12400
|
+
const Tabbar = (props) => {
|
|
12401
|
+
const {
|
|
12402
|
+
children,
|
|
12403
|
+
defaultValue,
|
|
12404
|
+
value,
|
|
12405
|
+
fixed,
|
|
12406
|
+
activeColor,
|
|
12407
|
+
inactiveColor,
|
|
12408
|
+
safeArea,
|
|
12409
|
+
className,
|
|
12410
|
+
style,
|
|
12411
|
+
onSwitch
|
|
12412
|
+
} = {
|
|
12413
|
+
...defaultProps$16,
|
|
12414
|
+
...props
|
|
12415
|
+
};
|
|
12416
|
+
const classPrefix2 = "nut-tabbar";
|
|
12417
|
+
const [selectIndex, setSelectIndex] = usePropsValue({
|
|
12418
|
+
value,
|
|
12419
|
+
defaultValue,
|
|
12420
|
+
finalValue: 0,
|
|
12421
|
+
onChange: onSwitch
|
|
12422
|
+
});
|
|
12423
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
12424
|
+
"div",
|
|
12425
|
+
{
|
|
12426
|
+
className: classNames(classPrefix2, className, {
|
|
12427
|
+
[`${classPrefix2}__fixed`]: fixed
|
|
12428
|
+
}),
|
|
12429
|
+
style,
|
|
12469
12430
|
children: [
|
|
12470
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
12471
|
-
!
|
|
12472
|
-
|
|
12473
|
-
num && num >= 100 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${bIcon("tips", [bIcon("nums")])}`, children: "99+" })
|
|
12474
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${bIcon("tips", [bIcon("dot")])}` }),
|
|
12475
|
-
icon || null
|
|
12476
|
-
] }),
|
|
12477
|
-
tabTitle && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12478
|
-
"div",
|
|
12479
|
-
{
|
|
12480
|
-
className: bIcon({ "nav-word": true }, [
|
|
12481
|
-
bIcon({ "big-word": !icon })
|
|
12482
|
-
]),
|
|
12483
|
-
children: tabTitle
|
|
12431
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__wrap`, children: React__default.Children.map(children, (child, idx) => {
|
|
12432
|
+
if (!React__default.isValidElement(child)) {
|
|
12433
|
+
return null;
|
|
12484
12434
|
}
|
|
12485
|
-
|
|
12435
|
+
const childProps = {
|
|
12436
|
+
...child.props,
|
|
12437
|
+
active: idx === selectIndex,
|
|
12438
|
+
index: idx,
|
|
12439
|
+
inactiveColor,
|
|
12440
|
+
activeColor,
|
|
12441
|
+
handleClick: setSelectIndex
|
|
12442
|
+
};
|
|
12443
|
+
return React__default.cloneElement(child, childProps);
|
|
12444
|
+
}) }),
|
|
12445
|
+
(fixed || safeArea) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__safe-area` })
|
|
12486
12446
|
]
|
|
12487
12447
|
}
|
|
12488
12448
|
);
|
|
12489
12449
|
};
|
|
12490
|
-
|
|
12450
|
+
Tabbar.defaultProps = defaultProps$16;
|
|
12451
|
+
Tabbar.displayName = "NutTabbar";
|
|
12452
|
+
Tabbar.Item = TabbarItem;
|
|
12453
|
+
const defaultProps$15 = {
|
|
12491
12454
|
title: "",
|
|
12492
12455
|
value: "",
|
|
12493
12456
|
disabled: false
|
|
12494
12457
|
};
|
|
12495
12458
|
const TabPane = (props) => {
|
|
12496
12459
|
const { children, autoHeightClassName, className, disabled } = {
|
|
12497
|
-
...defaultProps$
|
|
12460
|
+
...defaultProps$15,
|
|
12498
12461
|
...props
|
|
12499
12462
|
};
|
|
12500
12463
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -12521,26 +12484,7 @@ function requestAniFrame() {
|
|
|
12521
12484
|
}
|
|
12522
12485
|
}
|
|
12523
12486
|
const requestAniFrame$1 = requestAniFrame();
|
|
12524
|
-
|
|
12525
|
-
value,
|
|
12526
|
-
defaultValue,
|
|
12527
|
-
finalValue,
|
|
12528
|
-
onChange = (value2) => {
|
|
12529
|
-
}
|
|
12530
|
-
}) {
|
|
12531
|
-
const [uncontrolled, setUncontrolled] = useState(
|
|
12532
|
-
defaultValue !== void 0 ? defaultValue : finalValue
|
|
12533
|
-
);
|
|
12534
|
-
const handleUncontrolledChange = (val) => {
|
|
12535
|
-
setUncontrolled(val);
|
|
12536
|
-
onChange == null ? void 0 : onChange(val);
|
|
12537
|
-
};
|
|
12538
|
-
if (value !== void 0) {
|
|
12539
|
-
return [value, onChange];
|
|
12540
|
-
}
|
|
12541
|
-
return [uncontrolled, handleUncontrolledChange];
|
|
12542
|
-
}
|
|
12543
|
-
const defaultProps$15 = {
|
|
12487
|
+
const defaultProps$14 = {
|
|
12544
12488
|
...ComponentDefaults,
|
|
12545
12489
|
tabStyle: {},
|
|
12546
12490
|
activeColor: "",
|
|
@@ -12549,7 +12493,7 @@ const defaultProps$15 = {
|
|
|
12549
12493
|
duration: 300,
|
|
12550
12494
|
autoHeight: false
|
|
12551
12495
|
};
|
|
12552
|
-
const classPrefix$
|
|
12496
|
+
const classPrefix$a = "nut-tabs";
|
|
12553
12497
|
const Tabs = (props) => {
|
|
12554
12498
|
const {
|
|
12555
12499
|
activeColor,
|
|
@@ -12566,7 +12510,7 @@ const Tabs = (props) => {
|
|
|
12566
12510
|
autoHeight,
|
|
12567
12511
|
...rest
|
|
12568
12512
|
} = {
|
|
12569
|
-
...defaultProps$
|
|
12513
|
+
...defaultProps$14,
|
|
12570
12514
|
...props
|
|
12571
12515
|
};
|
|
12572
12516
|
const [value, setValue] = usePropsValue({
|
|
@@ -12628,14 +12572,14 @@ const Tabs = (props) => {
|
|
|
12628
12572
|
};
|
|
12629
12573
|
const titles = useRef(getTitles());
|
|
12630
12574
|
const classes = classNames(
|
|
12631
|
-
classPrefix$
|
|
12632
|
-
`${classPrefix$
|
|
12575
|
+
classPrefix$a,
|
|
12576
|
+
`${classPrefix$a}--${direction}`,
|
|
12633
12577
|
className
|
|
12634
12578
|
);
|
|
12635
|
-
const classesTitle = classNames(`${classPrefix$
|
|
12636
|
-
[`${classPrefix$
|
|
12637
|
-
[`${classPrefix$
|
|
12638
|
-
[`${classPrefix$
|
|
12579
|
+
const classesTitle = classNames(`${classPrefix$a}__titles`, {
|
|
12580
|
+
[`${classPrefix$a}__titles--${activeType}`]: activeType,
|
|
12581
|
+
[`${classPrefix$a}__titles--scrollable`]: true,
|
|
12582
|
+
[`${classPrefix$a}__titles--${align}`]: align
|
|
12639
12583
|
});
|
|
12640
12584
|
const tabsActiveStyle = {
|
|
12641
12585
|
color: activeType === "smile" ? activeColor : "",
|
|
@@ -12664,7 +12608,7 @@ const Tabs = (props) => {
|
|
|
12664
12608
|
onClick: (e) => {
|
|
12665
12609
|
tabChange(item);
|
|
12666
12610
|
},
|
|
12667
|
-
className: classNames(`${classPrefix$
|
|
12611
|
+
className: classNames(`${classPrefix$a}__titles-item`, {
|
|
12668
12612
|
[`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
|
|
12669
12613
|
[`nut-tabs__titles-item--disabled`]: item.disabled,
|
|
12670
12614
|
[`nut-tabs__titles-item--${align}`]: align
|
|
@@ -12674,14 +12618,14 @@ const Tabs = (props) => {
|
|
|
12674
12618
|
activeType === "line" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12675
12619
|
"div",
|
|
12676
12620
|
{
|
|
12677
|
-
className: `${classPrefix$
|
|
12621
|
+
className: `${classPrefix$a}__titles-item__line`,
|
|
12678
12622
|
style: tabsActiveStyle
|
|
12679
12623
|
}
|
|
12680
12624
|
),
|
|
12681
12625
|
activeType === "smile" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12682
12626
|
"div",
|
|
12683
12627
|
{
|
|
12684
|
-
className: `${classPrefix$
|
|
12628
|
+
className: `${classPrefix$a}__titles-item__smile`,
|
|
12685
12629
|
style: tabsActiveStyle,
|
|
12686
12630
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(x$7, { color: activeColor, width: 40, height: 20 })
|
|
12687
12631
|
}
|
|
@@ -12693,7 +12637,7 @@ const Tabs = (props) => {
|
|
|
12693
12637
|
{
|
|
12694
12638
|
ellipsis: true
|
|
12695
12639
|
},
|
|
12696
|
-
`${classPrefix$
|
|
12640
|
+
`${classPrefix$a}__titles-item__text`
|
|
12697
12641
|
),
|
|
12698
12642
|
children: item.title
|
|
12699
12643
|
}
|
|
@@ -12703,7 +12647,7 @@ const Tabs = (props) => {
|
|
|
12703
12647
|
item.value
|
|
12704
12648
|
);
|
|
12705
12649
|
}) }),
|
|
12706
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$
|
|
12650
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$a}__content__wrap`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$a}__content`, style: contentStyle, children: React__default.Children.map(children, (child, idx) => {
|
|
12707
12651
|
if (!React__default.isValidElement(child)) {
|
|
12708
12652
|
return null;
|
|
12709
12653
|
}
|
|
@@ -12721,10 +12665,130 @@ const Tabs = (props) => {
|
|
|
12721
12665
|
}) }) })
|
|
12722
12666
|
] });
|
|
12723
12667
|
};
|
|
12724
|
-
Tabs.defaultProps = defaultProps$
|
|
12668
|
+
Tabs.defaultProps = defaultProps$14;
|
|
12725
12669
|
Tabs.displayName = "NutTabs";
|
|
12726
12670
|
Tabs.TabPane = TabPane;
|
|
12727
|
-
|
|
12671
|
+
var classnameExports = {};
|
|
12672
|
+
var classname = {
|
|
12673
|
+
get exports() {
|
|
12674
|
+
return classnameExports;
|
|
12675
|
+
},
|
|
12676
|
+
set exports(v) {
|
|
12677
|
+
classnameExports = v;
|
|
12678
|
+
}
|
|
12679
|
+
};
|
|
12680
|
+
var classname_production_min = {};
|
|
12681
|
+
var hasRequiredClassname_production_min;
|
|
12682
|
+
function requireClassname_production_min() {
|
|
12683
|
+
if (hasRequiredClassname_production_min)
|
|
12684
|
+
return classname_production_min;
|
|
12685
|
+
hasRequiredClassname_production_min = 1;
|
|
12686
|
+
function r(r2) {
|
|
12687
|
+
function t2(t3, i, a2, o) {
|
|
12688
|
+
var f = i ? e + t3 + r2.e + i : e + t3, v = f;
|
|
12689
|
+
if (a2) {
|
|
12690
|
+
var s = " " + v + r2.m;
|
|
12691
|
+
for (var u in a2)
|
|
12692
|
+
if (a2.hasOwnProperty(u)) {
|
|
12693
|
+
var p = a2[u];
|
|
12694
|
+
true === p ? v += s + u : p && (v += s + u + n + p);
|
|
12695
|
+
}
|
|
12696
|
+
}
|
|
12697
|
+
if (void 0 !== o)
|
|
12698
|
+
for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
|
|
12699
|
+
var l2 = o[y2];
|
|
12700
|
+
if (l2 && "string" == typeof l2.valueOf())
|
|
12701
|
+
for (var g = l2.valueOf().split(" "), d = 0; d < g.length; d++) {
|
|
12702
|
+
var h = g[d];
|
|
12703
|
+
h !== f && (v += " " + h);
|
|
12704
|
+
}
|
|
12705
|
+
}
|
|
12706
|
+
return v;
|
|
12707
|
+
}
|
|
12708
|
+
var e = r2.n || "", n = r2.v || r2.m;
|
|
12709
|
+
return function(r3, e2) {
|
|
12710
|
+
return function(n2, i, a2) {
|
|
12711
|
+
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);
|
|
12712
|
+
};
|
|
12713
|
+
};
|
|
12714
|
+
}
|
|
12715
|
+
Object.defineProperty(classname_production_min, "__esModule", { value: true });
|
|
12716
|
+
var t = r({ e: "-", m: "_" });
|
|
12717
|
+
classname_production_min.cn = t, classname_production_min.withNaming = r;
|
|
12718
|
+
return classname_production_min;
|
|
12719
|
+
}
|
|
12720
|
+
var classname_development = {};
|
|
12721
|
+
var hasRequiredClassname_development;
|
|
12722
|
+
function requireClassname_development() {
|
|
12723
|
+
if (hasRequiredClassname_development)
|
|
12724
|
+
return classname_development;
|
|
12725
|
+
hasRequiredClassname_development = 1;
|
|
12726
|
+
Object.defineProperty(classname_development, "__esModule", { value: true });
|
|
12727
|
+
function withNaming(preset) {
|
|
12728
|
+
var nameSpace = preset.n || "";
|
|
12729
|
+
var modValueDelimiter = preset.v || preset.m;
|
|
12730
|
+
function stringify(b, e, m, mix) {
|
|
12731
|
+
var entityName = e ? nameSpace + b + preset.e + e : nameSpace + b;
|
|
12732
|
+
var className = entityName;
|
|
12733
|
+
if (m) {
|
|
12734
|
+
var modPrefix = " " + className + preset.m;
|
|
12735
|
+
for (var k2 in m) {
|
|
12736
|
+
if (m.hasOwnProperty(k2)) {
|
|
12737
|
+
var modVal = m[k2];
|
|
12738
|
+
if (modVal === true) {
|
|
12739
|
+
className += modPrefix + k2;
|
|
12740
|
+
} else if (modVal) {
|
|
12741
|
+
className += modPrefix + k2 + modValueDelimiter + modVal;
|
|
12742
|
+
}
|
|
12743
|
+
}
|
|
12744
|
+
}
|
|
12745
|
+
}
|
|
12746
|
+
if (mix !== void 0) {
|
|
12747
|
+
mix = Array.isArray(mix) ? mix : [mix];
|
|
12748
|
+
for (var i = 0, len = mix.length; i < len; i++) {
|
|
12749
|
+
var value = mix[i];
|
|
12750
|
+
if (!value || typeof value.valueOf() !== "string")
|
|
12751
|
+
continue;
|
|
12752
|
+
var mixes = value.valueOf().split(" ");
|
|
12753
|
+
for (var j = 0; j < mixes.length; j++) {
|
|
12754
|
+
var val = mixes[j];
|
|
12755
|
+
if (val !== entityName) {
|
|
12756
|
+
className += " " + val;
|
|
12757
|
+
}
|
|
12758
|
+
}
|
|
12759
|
+
}
|
|
12760
|
+
}
|
|
12761
|
+
return className;
|
|
12762
|
+
}
|
|
12763
|
+
return function cnGenerator(b, e) {
|
|
12764
|
+
return function(elemOrMods, elemModsOrBlockMix, elemMix) {
|
|
12765
|
+
if (typeof elemOrMods === "string") {
|
|
12766
|
+
if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
|
|
12767
|
+
return stringify(b, elemOrMods, void 0, elemModsOrBlockMix);
|
|
12768
|
+
}
|
|
12769
|
+
return stringify(b, elemOrMods, elemModsOrBlockMix, elemMix);
|
|
12770
|
+
}
|
|
12771
|
+
return stringify(b, e, elemOrMods, elemModsOrBlockMix);
|
|
12772
|
+
};
|
|
12773
|
+
};
|
|
12774
|
+
}
|
|
12775
|
+
var cn2 = withNaming({
|
|
12776
|
+
e: "-",
|
|
12777
|
+
m: "_"
|
|
12778
|
+
});
|
|
12779
|
+
classname_development.cn = cn2;
|
|
12780
|
+
classname_development.withNaming = withNaming;
|
|
12781
|
+
return classname_development;
|
|
12782
|
+
}
|
|
12783
|
+
(function(module) {
|
|
12784
|
+
if (process.env.NODE_ENV === "production") {
|
|
12785
|
+
module.exports = requireClassname_production_min();
|
|
12786
|
+
} else {
|
|
12787
|
+
module.exports = requireClassname_development();
|
|
12788
|
+
}
|
|
12789
|
+
})(classname);
|
|
12790
|
+
const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
12791
|
+
const defaultProps$13 = {
|
|
12728
12792
|
type: "custom",
|
|
12729
12793
|
existAddress: [],
|
|
12730
12794
|
defaultIcon: null,
|
|
@@ -12746,7 +12810,7 @@ const ExistRender = (props) => {
|
|
|
12746
12810
|
onClose,
|
|
12747
12811
|
onSwitchModule,
|
|
12748
12812
|
...rest
|
|
12749
|
-
} = { ...defaultProps$
|
|
12813
|
+
} = { ...defaultProps$13, ...props };
|
|
12750
12814
|
const b = cn("address");
|
|
12751
12815
|
const selectedExist = (item) => {
|
|
12752
12816
|
const copyExistAdd = existAddress;
|
|
@@ -12788,7 +12852,7 @@ const ExistRender = (props) => {
|
|
|
12788
12852
|
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 }) })
|
|
12789
12853
|
] });
|
|
12790
12854
|
};
|
|
12791
|
-
const defaultProps$
|
|
12855
|
+
const defaultProps$12 = {
|
|
12792
12856
|
modelValue: [],
|
|
12793
12857
|
type: "custom",
|
|
12794
12858
|
province: [],
|
|
@@ -12813,7 +12877,7 @@ const CustomRender = (props) => {
|
|
|
12813
12877
|
onClose,
|
|
12814
12878
|
...rest
|
|
12815
12879
|
} = {
|
|
12816
|
-
...defaultProps$
|
|
12880
|
+
...defaultProps$12,
|
|
12817
12881
|
...props
|
|
12818
12882
|
};
|
|
12819
12883
|
const b = cn("address");
|
|
@@ -12982,28 +13046,28 @@ const CustomRender = (props) => {
|
|
|
12982
13046
|
nextAreaList(item);
|
|
12983
13047
|
};
|
|
12984
13048
|
useEffect(() => {
|
|
12985
|
-
const { province: province2 } = { ...defaultProps$
|
|
13049
|
+
const { province: province2 } = { ...defaultProps$12, ...props };
|
|
12986
13050
|
setRegionList({
|
|
12987
13051
|
...regionList,
|
|
12988
13052
|
province: isCustom2() ? transformData(province2) : province2
|
|
12989
13053
|
});
|
|
12990
13054
|
}, [province]);
|
|
12991
13055
|
useEffect(() => {
|
|
12992
|
-
const { city: city2 } = { ...defaultProps$
|
|
13056
|
+
const { city: city2 } = { ...defaultProps$12, ...props };
|
|
12993
13057
|
setRegionList({
|
|
12994
13058
|
...regionList,
|
|
12995
13059
|
city: isCustom2() ? transformData(city2) : city2
|
|
12996
13060
|
});
|
|
12997
13061
|
}, [city]);
|
|
12998
13062
|
useEffect(() => {
|
|
12999
|
-
const { country: country2 } = { ...defaultProps$
|
|
13063
|
+
const { country: country2 } = { ...defaultProps$12, ...props };
|
|
13000
13064
|
setRegionList({
|
|
13001
13065
|
...regionList,
|
|
13002
13066
|
country: isCustom2() ? transformData(country2) : country2
|
|
13003
13067
|
});
|
|
13004
13068
|
}, [country]);
|
|
13005
13069
|
useEffect(() => {
|
|
13006
|
-
const { town: town2 } = { ...defaultProps$
|
|
13070
|
+
const { town: town2 } = { ...defaultProps$12, ...props };
|
|
13007
13071
|
setRegionList({
|
|
13008
13072
|
...regionList,
|
|
13009
13073
|
town: isCustom2() ? transformData(town2) : town2
|
|
@@ -13078,7 +13142,7 @@ const CustomRender = (props) => {
|
|
|
13078
13142
|
) })
|
|
13079
13143
|
] });
|
|
13080
13144
|
};
|
|
13081
|
-
const defaultProps$
|
|
13145
|
+
const defaultProps$11 = {
|
|
13082
13146
|
...ComponentDefaults,
|
|
13083
13147
|
modelValue: false,
|
|
13084
13148
|
modelSelect: [],
|
|
@@ -13129,7 +13193,7 @@ const Address = (props) => {
|
|
|
13129
13193
|
className,
|
|
13130
13194
|
...rest
|
|
13131
13195
|
} = {
|
|
13132
|
-
...defaultProps$
|
|
13196
|
+
...defaultProps$11,
|
|
13133
13197
|
...props
|
|
13134
13198
|
};
|
|
13135
13199
|
const b = cn("address");
|
|
@@ -13287,7 +13351,7 @@ const Address = (props) => {
|
|
|
13287
13351
|
}
|
|
13288
13352
|
) });
|
|
13289
13353
|
};
|
|
13290
|
-
Address.defaultProps = defaultProps$
|
|
13354
|
+
Address.defaultProps = defaultProps$11;
|
|
13291
13355
|
Address.displayName = "NutAddress";
|
|
13292
13356
|
const Utils = {
|
|
13293
13357
|
/**
|
|
@@ -13407,7 +13471,7 @@ const Utils = {
|
|
|
13407
13471
|
return false;
|
|
13408
13472
|
}
|
|
13409
13473
|
};
|
|
13410
|
-
const defaultProps$
|
|
13474
|
+
const defaultProps$10 = {
|
|
13411
13475
|
type: "one",
|
|
13412
13476
|
isAutoBackFill: false,
|
|
13413
13477
|
poppable: true,
|
|
@@ -13459,7 +13523,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
13459
13523
|
onUpdate,
|
|
13460
13524
|
onSelected,
|
|
13461
13525
|
onYearMonthChange
|
|
13462
|
-
} = { ...defaultProps$
|
|
13526
|
+
} = { ...defaultProps$10, ...props };
|
|
13463
13527
|
const weeks = locale.calendaritem.weekdays;
|
|
13464
13528
|
const [yearMonthTitle, setYearMonthTitle] = useState("");
|
|
13465
13529
|
const [monthsData, setMonthsData] = useState([]);
|
|
@@ -14055,9 +14119,9 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
14055
14119
|
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 }) }) : ""
|
|
14056
14120
|
] }) });
|
|
14057
14121
|
});
|
|
14058
|
-
CalendarItem.defaultProps = defaultProps$
|
|
14122
|
+
CalendarItem.defaultProps = defaultProps$10;
|
|
14059
14123
|
CalendarItem.displayName = "NutCalendarItem";
|
|
14060
|
-
const defaultProps
|
|
14124
|
+
const defaultProps$$ = {
|
|
14061
14125
|
type: "one",
|
|
14062
14126
|
isAutoBackFill: false,
|
|
14063
14127
|
poppable: true,
|
|
@@ -14112,7 +14176,7 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
14112
14176
|
onChoose,
|
|
14113
14177
|
onSelected,
|
|
14114
14178
|
onYearMonthChange
|
|
14115
|
-
} = { ...defaultProps
|
|
14179
|
+
} = { ...defaultProps$$, ...props };
|
|
14116
14180
|
const calendarRef = useRef(null);
|
|
14117
14181
|
const close = () => {
|
|
14118
14182
|
onClose && onClose();
|
|
@@ -14182,9 +14246,9 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
14182
14246
|
}
|
|
14183
14247
|
) : renderItem() });
|
|
14184
14248
|
});
|
|
14185
|
-
Calendar.defaultProps = defaultProps
|
|
14249
|
+
Calendar.defaultProps = defaultProps$$;
|
|
14186
14250
|
Calendar.displayName = "NutCalendar";
|
|
14187
|
-
const defaultProps
|
|
14251
|
+
const defaultProps$_ = {
|
|
14188
14252
|
data: {
|
|
14189
14253
|
text: "",
|
|
14190
14254
|
value: "",
|
|
@@ -14201,7 +14265,7 @@ const defaultProps$$ = {
|
|
|
14201
14265
|
};
|
|
14202
14266
|
const InternalCascaderItem = (props, ref) => {
|
|
14203
14267
|
const { data, checked, checkedIcon, chooseItem, activeColor } = {
|
|
14204
|
-
...defaultProps
|
|
14268
|
+
...defaultProps$_,
|
|
14205
14269
|
...props
|
|
14206
14270
|
};
|
|
14207
14271
|
const b = cn("cascader-item");
|
|
@@ -14234,13 +14298,13 @@ const InternalCascaderItem = (props, ref) => {
|
|
|
14234
14298
|
},
|
|
14235
14299
|
children: [
|
|
14236
14300
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classesTitle, children: data.text }),
|
|
14237
|
-
data.loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(k$
|
|
14301
|
+
data.loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(k$3, { color: "#969799", className: "nut-cascader-item__icon-loading" }) : renderIcon()
|
|
14238
14302
|
]
|
|
14239
14303
|
}
|
|
14240
14304
|
);
|
|
14241
14305
|
};
|
|
14242
14306
|
const CascaderItem = React__default.forwardRef(InternalCascaderItem);
|
|
14243
|
-
CascaderItem.defaultProps = defaultProps
|
|
14307
|
+
CascaderItem.defaultProps = defaultProps$_;
|
|
14244
14308
|
CascaderItem.displayName = "NutCascaderItem";
|
|
14245
14309
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
14246
14310
|
const {
|
|
@@ -14378,7 +14442,7 @@ class Tree {
|
|
|
14378
14442
|
}
|
|
14379
14443
|
}
|
|
14380
14444
|
const Tree$1 = Tree;
|
|
14381
|
-
const defaultProps$
|
|
14445
|
+
const defaultProps$Z = {
|
|
14382
14446
|
className: "",
|
|
14383
14447
|
style: {},
|
|
14384
14448
|
activeColor: "",
|
|
@@ -14429,7 +14493,7 @@ const InternalCascader = (props, ref) => {
|
|
|
14429
14493
|
onClose,
|
|
14430
14494
|
onChange,
|
|
14431
14495
|
onPathChange
|
|
14432
|
-
} = { ...defaultProps$
|
|
14496
|
+
} = { ...defaultProps$Z, ...props };
|
|
14433
14497
|
const [tabvalue, setTabvalue] = useState("c1");
|
|
14434
14498
|
const [optionsData, setOptionsData] = useState([]);
|
|
14435
14499
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
|
|
@@ -14704,23 +14768,22 @@ const InternalCascader = (props, ref) => {
|
|
|
14704
14768
|
) : renderItem() });
|
|
14705
14769
|
};
|
|
14706
14770
|
const Cascader = React__default.forwardRef(InternalCascader);
|
|
14707
|
-
Cascader.defaultProps = defaultProps$
|
|
14771
|
+
Cascader.defaultProps = defaultProps$Z;
|
|
14708
14772
|
Cascader.displayName = "NutCascader";
|
|
14709
14773
|
const CheckboxGroupContext = createContext(null);
|
|
14710
14774
|
const Context = CheckboxGroupContext;
|
|
14711
|
-
const defaultProps$
|
|
14712
|
-
disabled: false,
|
|
14775
|
+
const defaultProps$Y = {
|
|
14713
14776
|
max: void 0,
|
|
14714
|
-
|
|
14777
|
+
labelPosition: "right",
|
|
14715
14778
|
direction: "vertical",
|
|
14716
14779
|
onChange: (value) => {
|
|
14717
14780
|
},
|
|
14718
14781
|
options: []
|
|
14719
14782
|
};
|
|
14783
|
+
const classPrefix$9 = "nut-checkboxgroup";
|
|
14720
14784
|
const CheckboxGroup = React__default.forwardRef(
|
|
14721
14785
|
(props, ref) => {
|
|
14722
|
-
const { children } = { ...defaultProps$
|
|
14723
|
-
const b = cn("checkboxgroup");
|
|
14786
|
+
const { children } = { ...defaultProps$Y, ...props };
|
|
14724
14787
|
const {
|
|
14725
14788
|
className,
|
|
14726
14789
|
disabled,
|
|
@@ -14728,29 +14791,29 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
14728
14791
|
value,
|
|
14729
14792
|
defaultValue,
|
|
14730
14793
|
max,
|
|
14731
|
-
|
|
14794
|
+
labelPosition,
|
|
14732
14795
|
direction,
|
|
14733
14796
|
options: options2,
|
|
14734
14797
|
...rest
|
|
14735
14798
|
} = props;
|
|
14736
14799
|
useImperativeHandle(ref, () => ({
|
|
14737
|
-
|
|
14800
|
+
toggle(state) {
|
|
14738
14801
|
if (state === false) {
|
|
14739
14802
|
setValue([]);
|
|
14740
14803
|
} else {
|
|
14741
14804
|
const childrenLabel = [];
|
|
14742
14805
|
React__default.Children.map(children, (child) => {
|
|
14743
14806
|
const childProps = child.props;
|
|
14744
|
-
childrenLabel.push(childProps.
|
|
14807
|
+
childrenLabel.push(childProps.value);
|
|
14745
14808
|
});
|
|
14746
14809
|
setValue(childrenLabel);
|
|
14747
14810
|
}
|
|
14748
14811
|
},
|
|
14749
|
-
|
|
14812
|
+
reverse() {
|
|
14750
14813
|
const childrenLabel = [];
|
|
14751
14814
|
React__default.Children.map(children, (child) => {
|
|
14752
14815
|
const childProps = child.props;
|
|
14753
|
-
childrenLabel.push(childProps.
|
|
14816
|
+
childrenLabel.push(childProps.value);
|
|
14754
14817
|
});
|
|
14755
14818
|
const reverse = childrenLabel.filter(
|
|
14756
14819
|
(c) => (_value == null ? void 0 : _value.findIndex((v) => v === c)) === -1
|
|
@@ -14769,8 +14832,9 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
14769
14832
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
14770
14833
|
Checkbox,
|
|
14771
14834
|
{
|
|
14772
|
-
|
|
14773
|
-
|
|
14835
|
+
label,
|
|
14836
|
+
disabled: disabled2,
|
|
14837
|
+
value: value2,
|
|
14774
14838
|
...rest2
|
|
14775
14839
|
},
|
|
14776
14840
|
value2 == null ? void 0 : value2.toString()
|
|
@@ -14781,25 +14845,26 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
14781
14845
|
Context.Provider,
|
|
14782
14846
|
{
|
|
14783
14847
|
value: {
|
|
14784
|
-
|
|
14848
|
+
labelPosition: labelPosition || "right",
|
|
14785
14849
|
disabled,
|
|
14786
14850
|
max,
|
|
14787
|
-
|
|
14851
|
+
value: _value,
|
|
14788
14852
|
check: (value2) => {
|
|
14789
14853
|
const combined = [..._value, value2];
|
|
14790
14854
|
setValue(combined);
|
|
14791
|
-
onChange && onChange(combined);
|
|
14792
14855
|
},
|
|
14793
14856
|
uncheck: (value2) => {
|
|
14794
14857
|
const reduced = _value.filter((item) => item !== value2);
|
|
14795
14858
|
setValue(reduced);
|
|
14796
|
-
onChange && onChange(reduced);
|
|
14797
14859
|
}
|
|
14798
14860
|
},
|
|
14799
14861
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
14800
14862
|
"div",
|
|
14801
14863
|
{
|
|
14802
|
-
className:
|
|
14864
|
+
className: classNames(classPrefix$9, {
|
|
14865
|
+
[`nut-checkboxgroup--${props.direction}`]: props.direction,
|
|
14866
|
+
className
|
|
14867
|
+
}),
|
|
14803
14868
|
...rest,
|
|
14804
14869
|
children: (options2 == null ? void 0 : options2.length) ? renderOptions() : children
|
|
14805
14870
|
}
|
|
@@ -14808,112 +14873,117 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
14808
14873
|
);
|
|
14809
14874
|
}
|
|
14810
14875
|
);
|
|
14811
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
14876
|
+
CheckboxGroup.defaultProps = defaultProps$Y;
|
|
14812
14877
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
14813
|
-
const defaultProps$
|
|
14878
|
+
const defaultProps$X = {
|
|
14814
14879
|
...ComponentDefaults,
|
|
14815
14880
|
disabled: false,
|
|
14816
|
-
|
|
14817
|
-
|
|
14818
|
-
|
|
14819
|
-
|
|
14820
|
-
|
|
14821
|
-
iconFontClassName: "nutui-iconfont",
|
|
14822
|
-
indeterminateIcon: "check-disabled",
|
|
14823
|
-
onChange: (state) => {
|
|
14881
|
+
labelPosition: "right",
|
|
14882
|
+
icon: null,
|
|
14883
|
+
activeIcon: null,
|
|
14884
|
+
indeterminateIcon: null,
|
|
14885
|
+
onChange: (value) => {
|
|
14824
14886
|
}
|
|
14825
14887
|
};
|
|
14888
|
+
const classPrefix$8 = "nut-checkbox";
|
|
14826
14889
|
const Checkbox = (props) => {
|
|
14827
14890
|
const { children } = {
|
|
14828
|
-
...defaultProps$
|
|
14891
|
+
...defaultProps$X,
|
|
14829
14892
|
...props
|
|
14830
14893
|
};
|
|
14831
|
-
const b = cn("checkbox");
|
|
14832
14894
|
const {
|
|
14833
14895
|
icon,
|
|
14834
|
-
iconSize,
|
|
14835
14896
|
label,
|
|
14836
14897
|
className,
|
|
14837
|
-
|
|
14898
|
+
activeIcon,
|
|
14838
14899
|
checked,
|
|
14900
|
+
value,
|
|
14839
14901
|
defaultChecked,
|
|
14840
14902
|
disabled,
|
|
14841
14903
|
onChange,
|
|
14842
14904
|
indeterminate,
|
|
14843
|
-
iconClassPrefix,
|
|
14844
|
-
iconFontClassName,
|
|
14845
14905
|
indeterminateIcon,
|
|
14846
14906
|
...others
|
|
14847
14907
|
} = props;
|
|
14848
|
-
let {
|
|
14908
|
+
let { labelPosition, ...rest } = others;
|
|
14849
14909
|
const ctx2 = useContext(Context);
|
|
14850
|
-
let [
|
|
14910
|
+
let [innerChecked, setChecked] = usePropsValue({
|
|
14851
14911
|
value: props.checked,
|
|
14852
14912
|
defaultValue: props.defaultChecked,
|
|
14853
14913
|
finalValue: defaultChecked,
|
|
14854
14914
|
onChange
|
|
14855
14915
|
});
|
|
14856
14916
|
let [innerDisabled, setDisabled] = useState(disabled);
|
|
14857
|
-
const [
|
|
14917
|
+
const [innerIndeterminate, setIndeterminate] = useState(indeterminate);
|
|
14858
14918
|
useEffect(() => {
|
|
14859
|
-
!ctx2 && setChecked(checked);
|
|
14860
14919
|
setDisabled(disabled);
|
|
14920
|
+
}, [disabled]);
|
|
14921
|
+
useEffect(() => {
|
|
14861
14922
|
setIndeterminate(indeterminate);
|
|
14862
|
-
}, [
|
|
14923
|
+
}, [indeterminate]);
|
|
14863
14924
|
if (ctx2) {
|
|
14864
|
-
if (ctx2.
|
|
14865
|
-
|
|
14925
|
+
if (ctx2.labelPosition !== void 0) {
|
|
14926
|
+
labelPosition = ctx2.labelPosition;
|
|
14866
14927
|
}
|
|
14867
|
-
innerDisabled = ctx2.disabled;
|
|
14868
|
-
|
|
14928
|
+
innerDisabled = ctx2.disabled !== void 0 ? ctx2.disabled : innerDisabled;
|
|
14929
|
+
innerChecked = ctx2.value.includes(value);
|
|
14869
14930
|
setChecked = (checked2) => {
|
|
14870
14931
|
if (ctx2.disabled)
|
|
14871
14932
|
return;
|
|
14872
14933
|
if (checked2)
|
|
14873
|
-
ctx2.check(
|
|
14934
|
+
ctx2.check(value);
|
|
14874
14935
|
if (!checked2)
|
|
14875
|
-
ctx2.uncheck(
|
|
14936
|
+
ctx2.uncheck(value);
|
|
14876
14937
|
};
|
|
14877
14938
|
}
|
|
14878
14939
|
const renderIcon = () => {
|
|
14879
|
-
if (!
|
|
14880
|
-
return React__default.isValidElement(icon) ? icon : /* @__PURE__ */ jsxRuntimeExports.jsx(N, {
|
|
14940
|
+
if (!innerChecked) {
|
|
14941
|
+
return React__default.isValidElement(icon) ? icon : /* @__PURE__ */ jsxRuntimeExports.jsx(N, { className: color() });
|
|
14881
14942
|
}
|
|
14882
|
-
if (
|
|
14883
|
-
return React__default.isValidElement(indeterminateIcon) ? indeterminateIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(x$f, {
|
|
14943
|
+
if (innerIndeterminate) {
|
|
14944
|
+
return React__default.isValidElement(indeterminateIcon) ? indeterminateIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(x$f, { className: color() });
|
|
14884
14945
|
}
|
|
14885
|
-
return React__default.isValidElement(
|
|
14946
|
+
return React__default.isValidElement(activeIcon) ? activeIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(x$d, { className: color() });
|
|
14886
14947
|
};
|
|
14887
14948
|
const color = () => {
|
|
14888
14949
|
if (innerDisabled) {
|
|
14889
|
-
return
|
|
14950
|
+
return `${classPrefix$8}__icon--disable`;
|
|
14890
14951
|
}
|
|
14891
|
-
if (
|
|
14892
|
-
if (
|
|
14893
|
-
return
|
|
14952
|
+
if (innerChecked) {
|
|
14953
|
+
if (innerIndeterminate) {
|
|
14954
|
+
return `${classPrefix$8}__icon--indeterminate`;
|
|
14894
14955
|
}
|
|
14895
|
-
return
|
|
14956
|
+
return `${classPrefix$8}__icon`;
|
|
14896
14957
|
}
|
|
14897
|
-
return
|
|
14958
|
+
return `${classPrefix$8}__icon--unchecked`;
|
|
14898
14959
|
};
|
|
14899
14960
|
const renderLabel = () => {
|
|
14900
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
14961
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
14962
|
+
"span",
|
|
14963
|
+
{
|
|
14964
|
+
className: classNames(`${classPrefix$8}__label `, {
|
|
14965
|
+
[`${classPrefix$8}__label--disabled`]: innerDisabled
|
|
14966
|
+
}),
|
|
14967
|
+
children: children || label
|
|
14968
|
+
}
|
|
14969
|
+
);
|
|
14901
14970
|
};
|
|
14902
14971
|
const handleClick2 = () => {
|
|
14903
14972
|
if (disabled)
|
|
14904
14973
|
return;
|
|
14905
|
-
const latestChecked = !
|
|
14974
|
+
const latestChecked = !innerChecked;
|
|
14906
14975
|
if (ctx2 && ctx2.max !== void 0) {
|
|
14907
|
-
if (latestChecked && ctx2.
|
|
14976
|
+
if (latestChecked && ctx2.value.length >= ctx2.max)
|
|
14908
14977
|
return;
|
|
14909
14978
|
}
|
|
14910
|
-
onChange && onChange(latestChecked, label || children);
|
|
14911
14979
|
setChecked(latestChecked);
|
|
14912
14980
|
};
|
|
14913
14981
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
14914
14982
|
"div",
|
|
14915
14983
|
{
|
|
14916
|
-
className:
|
|
14984
|
+
className: classNames(classPrefix$8, className, {
|
|
14985
|
+
[`${classPrefix$8}--reverse`]: labelPosition === "left"
|
|
14986
|
+
}),
|
|
14917
14987
|
...rest,
|
|
14918
14988
|
onClick: handleClick2,
|
|
14919
14989
|
children: [
|
|
@@ -14923,7 +14993,7 @@ const Checkbox = (props) => {
|
|
|
14923
14993
|
}
|
|
14924
14994
|
);
|
|
14925
14995
|
};
|
|
14926
|
-
Checkbox.defaultProps = defaultProps$
|
|
14996
|
+
Checkbox.defaultProps = defaultProps$X;
|
|
14927
14997
|
Checkbox.displayName = "NutCheckBox";
|
|
14928
14998
|
Checkbox.Group = CheckboxGroup;
|
|
14929
14999
|
const MIN_DISTANCE = 10;
|
|
@@ -15430,7 +15500,7 @@ const InternalPicker = (props, ref) => {
|
|
|
15430
15500
|
const Picker = React__default.forwardRef(InternalPicker);
|
|
15431
15501
|
const Picker$1 = Picker;
|
|
15432
15502
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
15433
|
-
const defaultProps$
|
|
15503
|
+
const defaultProps$W = {
|
|
15434
15504
|
modelValue: null,
|
|
15435
15505
|
visible: false,
|
|
15436
15506
|
title: "",
|
|
@@ -15461,7 +15531,7 @@ const DatePicker = (props) => {
|
|
|
15461
15531
|
style,
|
|
15462
15532
|
...rest
|
|
15463
15533
|
} = {
|
|
15464
|
-
...defaultProps$
|
|
15534
|
+
...defaultProps$W,
|
|
15465
15535
|
...props
|
|
15466
15536
|
};
|
|
15467
15537
|
const { locale } = useConfig();
|
|
@@ -15738,7 +15808,7 @@ const DatePicker = (props) => {
|
|
|
15738
15808
|
}
|
|
15739
15809
|
);
|
|
15740
15810
|
};
|
|
15741
|
-
DatePicker.defaultProps = defaultProps$
|
|
15811
|
+
DatePicker.defaultProps = defaultProps$W;
|
|
15742
15812
|
DatePicker.displayName = "NutDatePicker";
|
|
15743
15813
|
const FormItemContext = createContext({});
|
|
15744
15814
|
function _extends() {
|
|
@@ -16929,7 +16999,7 @@ const useForm = (form) => {
|
|
|
16929
16999
|
}
|
|
16930
17000
|
return [formRef.current];
|
|
16931
17001
|
};
|
|
16932
|
-
const defaultProps$
|
|
17002
|
+
const defaultProps$V = {
|
|
16933
17003
|
...ComponentDefaults,
|
|
16934
17004
|
name: "",
|
|
16935
17005
|
label: "",
|
|
@@ -16991,7 +17061,7 @@ class FormItem extends React__default.Component {
|
|
|
16991
17061
|
showErrorLine,
|
|
16992
17062
|
showErrorMessage
|
|
16993
17063
|
} = {
|
|
16994
|
-
...defaultProps$
|
|
17064
|
+
...defaultProps$V,
|
|
16995
17065
|
...this.props
|
|
16996
17066
|
};
|
|
16997
17067
|
const item = ((_a2 = this.context.errList) == null ? void 0 : _a2.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
@@ -17058,9 +17128,9 @@ class FormItem extends React__default.Component {
|
|
|
17058
17128
|
return this.renderLayout(returnChildNode);
|
|
17059
17129
|
}
|
|
17060
17130
|
}
|
|
17061
|
-
__publicField(FormItem, "defaultProps", defaultProps$
|
|
17131
|
+
__publicField(FormItem, "defaultProps", defaultProps$V);
|
|
17062
17132
|
__publicField(FormItem, "contextType", FormItemContext);
|
|
17063
|
-
const defaultProps$
|
|
17133
|
+
const defaultProps$U = {
|
|
17064
17134
|
...ComponentDefaults,
|
|
17065
17135
|
className: "",
|
|
17066
17136
|
style: void 0,
|
|
@@ -17088,7 +17158,7 @@ const Form = (props) => {
|
|
|
17088
17158
|
form,
|
|
17089
17159
|
...rest
|
|
17090
17160
|
} = {
|
|
17091
|
-
...defaultProps$
|
|
17161
|
+
...defaultProps$U,
|
|
17092
17162
|
...props
|
|
17093
17163
|
};
|
|
17094
17164
|
let formInstance = {};
|
|
@@ -17120,7 +17190,7 @@ const Form = (props) => {
|
|
|
17120
17190
|
}
|
|
17121
17191
|
);
|
|
17122
17192
|
};
|
|
17123
|
-
Form.defaultProps = defaultProps$
|
|
17193
|
+
Form.defaultProps = defaultProps$U;
|
|
17124
17194
|
Form.displayName = "NutForm";
|
|
17125
17195
|
Form.Item = FormItem;
|
|
17126
17196
|
Form.useForm = useForm;
|
|
@@ -17145,359 +17215,192 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
17145
17215
|
} else {
|
|
17146
17216
|
value = value.replace(/-/, "");
|
|
17147
17217
|
}
|
|
17148
|
-
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
17149
|
-
return value.replace(regExp, "");
|
|
17150
|
-
}
|
|
17151
|
-
const defaultProps$
|
|
17152
|
-
...ComponentDefaults,
|
|
17153
|
-
type: "text",
|
|
17154
|
-
name: "",
|
|
17155
|
-
|
|
17156
|
-
|
|
17157
|
-
|
|
17158
|
-
|
|
17159
|
-
|
|
17160
|
-
|
|
17161
|
-
|
|
17162
|
-
|
|
17163
|
-
|
|
17164
|
-
|
|
17165
|
-
|
|
17166
|
-
|
|
17167
|
-
|
|
17168
|
-
|
|
17169
|
-
|
|
17170
|
-
|
|
17171
|
-
|
|
17172
|
-
|
|
17173
|
-
|
|
17174
|
-
|
|
17175
|
-
|
|
17176
|
-
|
|
17177
|
-
|
|
17178
|
-
|
|
17179
|
-
|
|
17180
|
-
|
|
17181
|
-
|
|
17182
|
-
slotButton: null,
|
|
17183
|
-
slotInput: null
|
|
17184
|
-
};
|
|
17185
|
-
const Input = forwardRef((props, ref) => {
|
|
17186
|
-
const { locale } = useConfig();
|
|
17187
|
-
const {
|
|
17188
|
-
children,
|
|
17189
|
-
type: type4,
|
|
17190
|
-
name,
|
|
17191
|
-
defaultValue,
|
|
17192
|
-
placeholder,
|
|
17193
|
-
label,
|
|
17194
|
-
labelClass,
|
|
17195
|
-
labelWidth,
|
|
17196
|
-
labelAlign,
|
|
17197
|
-
colon,
|
|
17198
|
-
inputAlign,
|
|
17199
|
-
center,
|
|
17200
|
-
required: required4,
|
|
17201
|
-
disabled,
|
|
17202
|
-
readonly,
|
|
17203
|
-
error,
|
|
17204
|
-
maxlength,
|
|
17205
|
-
leftIcon,
|
|
17206
|
-
rightIcon,
|
|
17207
|
-
clearable,
|
|
17208
|
-
clearIcon,
|
|
17209
|
-
clearSize,
|
|
17210
|
-
border,
|
|
17211
|
-
formatTrigger,
|
|
17212
|
-
rules: rules2,
|
|
17213
|
-
errorMessage,
|
|
17214
|
-
errorMessageAlign,
|
|
17215
|
-
showWordLimit,
|
|
17216
|
-
autofocus,
|
|
17217
|
-
style,
|
|
17218
|
-
className,
|
|
17219
|
-
rows,
|
|
17220
|
-
slotButton,
|
|
17221
|
-
slotInput,
|
|
17222
|
-
onChange,
|
|
17223
|
-
onBlur,
|
|
17224
|
-
onFocus,
|
|
17225
|
-
onClear,
|
|
17226
|
-
formatter,
|
|
17227
|
-
keypress,
|
|
17228
|
-
onClickInput,
|
|
17229
|
-
onClickLeftIcon,
|
|
17230
|
-
onClickRightIcon,
|
|
17231
|
-
onClick,
|
|
17232
|
-
...rest
|
|
17233
|
-
} = {
|
|
17234
|
-
...defaultProps$U,
|
|
17235
|
-
...props
|
|
17236
|
-
};
|
|
17237
|
-
const inputPlaceholder = placeholder || locale.placeholder;
|
|
17238
|
-
const [inputValue, SetInputValue] = useState("");
|
|
17239
|
-
const [active, SetActive] = useState(false);
|
|
17240
|
-
const [classes, setClasses] = useState("");
|
|
17241
|
-
const getModelValue = () => String(inputValue ?? "");
|
|
17242
|
-
const inputRef = useRef(null);
|
|
17243
|
-
useEffect(() => {
|
|
17244
|
-
setClasses(inputClass);
|
|
17245
|
-
SetInputValue(defaultValue);
|
|
17246
|
-
}, [defaultValue]);
|
|
17247
|
-
useEffect(() => {
|
|
17248
|
-
if (inputValue) {
|
|
17249
|
-
updateValue(getModelValue());
|
|
17250
|
-
resetValidation();
|
|
17251
|
-
}
|
|
17252
|
-
}, [inputValue]);
|
|
17253
|
-
useImperativeHandle(ref, () => {
|
|
17254
|
-
return inputRef.current;
|
|
17255
|
-
});
|
|
17256
|
-
const inputClass = useCallback(() => {
|
|
17257
|
-
const prefixCls2 = "nut-input";
|
|
17258
|
-
return [
|
|
17259
|
-
prefixCls2,
|
|
17260
|
-
`${center ? "center" : ""}`,
|
|
17261
|
-
`${disabled ? `${prefixCls2}-disabled` : ""}`,
|
|
17262
|
-
`${required4 ? `${prefixCls2}-required` : ""}`,
|
|
17263
|
-
`${error ? `${prefixCls2}-error` : ""}`,
|
|
17264
|
-
`${border ? `${prefixCls2}-border` : ""}`,
|
|
17265
|
-
`${slotButton || rightIcon ? `${prefixCls2}-right-mark` : ""}`
|
|
17266
|
-
].filter(Boolean).join(" ");
|
|
17267
|
-
}, [disabled, required4, error, border, slotButton, rightIcon, center]);
|
|
17268
|
-
useEffect(() => {
|
|
17269
|
-
setClasses(inputClass);
|
|
17270
|
-
}, [disabled, required4, error, border, slotButton, rightIcon, center]);
|
|
17271
|
-
const updateValue = (value, trigger = "onChange", event) => {
|
|
17272
|
-
var _a2;
|
|
17273
|
-
let val = value;
|
|
17274
|
-
if (type4 === "digit" || type4 === "tel") {
|
|
17275
|
-
val = formatNumber(val, false, false);
|
|
17276
|
-
}
|
|
17277
|
-
if (type4 === "number") {
|
|
17278
|
-
val = formatNumber(val, true, true);
|
|
17279
|
-
}
|
|
17280
|
-
if (type4 === "tel" && !formatter) {
|
|
17281
|
-
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}$/;
|
|
17282
|
-
const regNumber = /[^-0-9]/g;
|
|
17283
|
-
val = !regTel.test(val) && val.length > 11 ? val.substring(0, 11) : val.replace(regNumber, "");
|
|
17284
|
-
}
|
|
17285
|
-
if (formatter && trigger === formatTrigger) {
|
|
17286
|
-
val = formatter(val);
|
|
17287
|
-
}
|
|
17288
|
-
if (((_a2 = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a2.value) !== val) {
|
|
17289
|
-
inputRef.current.value = val;
|
|
17290
|
-
}
|
|
17291
|
-
SetInputValue(val);
|
|
17292
|
-
};
|
|
17293
|
-
const handleFocus = (event) => {
|
|
17294
|
-
const val = event.target.value;
|
|
17295
|
-
SetActive(true);
|
|
17296
|
-
onFocus && onFocus(val, event);
|
|
17297
|
-
};
|
|
17298
|
-
const handleInput = (event) => {
|
|
17299
|
-
let val = event.target.value;
|
|
17300
|
-
if (maxlength && val.length > Number(maxlength)) {
|
|
17301
|
-
val = val.slice(0, Number(maxlength));
|
|
17302
|
-
}
|
|
17303
|
-
updateValue(val, "onChange");
|
|
17304
|
-
onChange && onChange(val, event);
|
|
17305
|
-
};
|
|
17306
|
-
const handleBlur = (event) => {
|
|
17307
|
-
setTimeout(() => {
|
|
17308
|
-
SetActive(false);
|
|
17309
|
-
}, 200);
|
|
17310
|
-
let val = event.target.value;
|
|
17311
|
-
if (maxlength && val.length > Number(maxlength)) {
|
|
17312
|
-
val = val.slice(0, Number(maxlength));
|
|
17313
|
-
}
|
|
17314
|
-
updateValue(val, "onBlur");
|
|
17315
|
-
onBlur && onBlur(val, event);
|
|
17316
|
-
};
|
|
17317
|
-
const handleClickInput = (event) => {
|
|
17318
|
-
onClickInput && onClickInput(event);
|
|
17319
|
-
};
|
|
17320
|
-
const handleClickLeftIcon = (event) => {
|
|
17321
|
-
onClickLeftIcon && onClickLeftIcon(event);
|
|
17322
|
-
};
|
|
17323
|
-
const handleClickRightIcon = (event) => {
|
|
17324
|
-
onClickRightIcon && onClickRightIcon(event);
|
|
17325
|
-
};
|
|
17326
|
-
const resetValidation = () => {
|
|
17327
|
-
};
|
|
17328
|
-
const inputType = (type22) => {
|
|
17329
|
-
if (type22 === "number") {
|
|
17330
|
-
return "text";
|
|
17331
|
-
}
|
|
17332
|
-
if (type22 === "digit") {
|
|
17333
|
-
return "tel";
|
|
17334
|
-
}
|
|
17335
|
-
return type22;
|
|
17336
|
-
};
|
|
17337
|
-
const handleClear = (event) => {
|
|
17338
|
-
updateValue("");
|
|
17339
|
-
onClear && onClear("", event);
|
|
17340
|
-
};
|
|
17341
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17342
|
-
"div",
|
|
17343
|
-
{
|
|
17344
|
-
className: `${classes} ${className || ""}`,
|
|
17218
|
+
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
17219
|
+
return value.replace(regExp, "");
|
|
17220
|
+
}
|
|
17221
|
+
const defaultProps$T = {
|
|
17222
|
+
...ComponentDefaults,
|
|
17223
|
+
type: "text",
|
|
17224
|
+
name: "",
|
|
17225
|
+
placeholder: "",
|
|
17226
|
+
confirmType: "done",
|
|
17227
|
+
align: "left",
|
|
17228
|
+
required: false,
|
|
17229
|
+
disabled: false,
|
|
17230
|
+
readOnly: false,
|
|
17231
|
+
maxLength: 9999,
|
|
17232
|
+
clearable: false,
|
|
17233
|
+
clearIcon: null,
|
|
17234
|
+
formatTrigger: "onChange",
|
|
17235
|
+
autoFocus: false
|
|
17236
|
+
};
|
|
17237
|
+
const Input = forwardRef(
|
|
17238
|
+
(props, ref) => {
|
|
17239
|
+
const { locale } = useConfig();
|
|
17240
|
+
const {
|
|
17241
|
+
type: type4,
|
|
17242
|
+
name,
|
|
17243
|
+
placeholder,
|
|
17244
|
+
align,
|
|
17245
|
+
disabled,
|
|
17246
|
+
readOnly,
|
|
17247
|
+
maxLength,
|
|
17248
|
+
clearable,
|
|
17249
|
+
clearIcon,
|
|
17250
|
+
formatTrigger,
|
|
17251
|
+
autoFocus,
|
|
17345
17252
|
style,
|
|
17346
|
-
|
|
17347
|
-
|
|
17348
|
-
|
|
17349
|
-
|
|
17350
|
-
|
|
17351
|
-
|
|
17352
|
-
|
|
17353
|
-
|
|
17354
|
-
|
|
17355
|
-
|
|
17356
|
-
|
|
17357
|
-
|
|
17358
|
-
|
|
17359
|
-
|
|
17360
|
-
|
|
17361
|
-
|
|
17362
|
-
|
|
17363
|
-
|
|
17364
|
-
|
|
17365
|
-
|
|
17366
|
-
|
|
17367
|
-
|
|
17368
|
-
|
|
17369
|
-
|
|
17370
|
-
|
|
17371
|
-
)
|
|
17372
|
-
|
|
17373
|
-
|
|
17374
|
-
|
|
17375
|
-
|
|
17376
|
-
|
|
17377
|
-
|
|
17378
|
-
|
|
17379
|
-
|
|
17380
|
-
|
|
17381
|
-
|
|
17382
|
-
)
|
|
17383
|
-
|
|
17384
|
-
|
|
17385
|
-
|
|
17386
|
-
|
|
17387
|
-
|
|
17388
|
-
|
|
17389
|
-
|
|
17390
|
-
|
|
17391
|
-
|
|
17392
|
-
|
|
17393
|
-
|
|
17394
|
-
|
|
17395
|
-
|
|
17396
|
-
|
|
17397
|
-
|
|
17398
|
-
|
|
17399
|
-
|
|
17400
|
-
|
|
17401
|
-
|
|
17402
|
-
|
|
17403
|
-
|
|
17404
|
-
|
|
17405
|
-
|
|
17406
|
-
|
|
17407
|
-
|
|
17408
|
-
|
|
17409
|
-
|
|
17410
|
-
|
|
17411
|
-
|
|
17412
|
-
|
|
17413
|
-
|
|
17414
|
-
|
|
17415
|
-
|
|
17416
|
-
|
|
17417
|
-
|
|
17418
|
-
|
|
17419
|
-
|
|
17420
|
-
|
|
17421
|
-
|
|
17422
|
-
|
|
17423
|
-
|
|
17424
|
-
|
|
17425
|
-
|
|
17426
|
-
|
|
17427
|
-
|
|
17428
|
-
|
|
17429
|
-
|
|
17430
|
-
|
|
17431
|
-
|
|
17432
|
-
|
|
17433
|
-
|
|
17434
|
-
|
|
17435
|
-
|
|
17436
|
-
|
|
17437
|
-
|
|
17438
|
-
|
|
17439
|
-
|
|
17440
|
-
|
|
17441
|
-
|
|
17442
|
-
|
|
17443
|
-
|
|
17444
|
-
|
|
17445
|
-
|
|
17446
|
-
|
|
17447
|
-
|
|
17448
|
-
|
|
17449
|
-
|
|
17450
|
-
|
|
17451
|
-
|
|
17452
|
-
|
|
17453
|
-
|
|
17454
|
-
|
|
17455
|
-
|
|
17456
|
-
|
|
17457
|
-
|
|
17458
|
-
|
|
17459
|
-
|
|
17460
|
-
|
|
17461
|
-
|
|
17462
|
-
|
|
17463
|
-
|
|
17464
|
-
|
|
17465
|
-
|
|
17466
|
-
|
|
17467
|
-
|
|
17468
|
-
|
|
17469
|
-
|
|
17470
|
-
|
|
17471
|
-
|
|
17472
|
-
|
|
17473
|
-
children: rightIcon
|
|
17253
|
+
className,
|
|
17254
|
+
onChange,
|
|
17255
|
+
onFocus,
|
|
17256
|
+
onClear,
|
|
17257
|
+
formatter,
|
|
17258
|
+
onClick,
|
|
17259
|
+
confirmType,
|
|
17260
|
+
defaultValue,
|
|
17261
|
+
value: _value,
|
|
17262
|
+
...rest
|
|
17263
|
+
} = {
|
|
17264
|
+
...defaultProps$T,
|
|
17265
|
+
...props
|
|
17266
|
+
};
|
|
17267
|
+
const [value, setValue] = usePropsValue({
|
|
17268
|
+
value: props.value,
|
|
17269
|
+
defaultValue: props.defaultValue,
|
|
17270
|
+
finalValue: "",
|
|
17271
|
+
onChange
|
|
17272
|
+
});
|
|
17273
|
+
const inputRef = useRef(null);
|
|
17274
|
+
const composingRef = useRef(false);
|
|
17275
|
+
const [active, setActive] = useState(false);
|
|
17276
|
+
useImperativeHandle(ref, () => {
|
|
17277
|
+
return {
|
|
17278
|
+
clear: () => {
|
|
17279
|
+
setValue("");
|
|
17280
|
+
},
|
|
17281
|
+
focus: () => {
|
|
17282
|
+
var _a2;
|
|
17283
|
+
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
17284
|
+
},
|
|
17285
|
+
blur: () => {
|
|
17286
|
+
var _a2;
|
|
17287
|
+
(_a2 = inputRef.current) == null ? void 0 : _a2.blur();
|
|
17288
|
+
},
|
|
17289
|
+
get nativeElement() {
|
|
17290
|
+
return inputRef.current;
|
|
17291
|
+
}
|
|
17292
|
+
};
|
|
17293
|
+
});
|
|
17294
|
+
const inputClass = useCallback(() => {
|
|
17295
|
+
const classPrefix2 = "nut-input";
|
|
17296
|
+
return [classPrefix2, `${disabled ? `${classPrefix2}-disabled` : ""}`].filter(Boolean).join(" ");
|
|
17297
|
+
}, [disabled]);
|
|
17298
|
+
const updateValue = (value2, trigger = "onChange") => {
|
|
17299
|
+
let val = value2;
|
|
17300
|
+
if (type4 === "number") {
|
|
17301
|
+
val = formatNumber(val, false, true);
|
|
17302
|
+
}
|
|
17303
|
+
if (type4 === "digit") {
|
|
17304
|
+
val = formatNumber(val, true, true);
|
|
17305
|
+
}
|
|
17306
|
+
if (formatter && trigger === formatTrigger) {
|
|
17307
|
+
val = formatter(val);
|
|
17308
|
+
}
|
|
17309
|
+
setValue(val);
|
|
17310
|
+
const eventHandler = props[trigger];
|
|
17311
|
+
if (eventHandler && typeof eventHandler === "function") {
|
|
17312
|
+
eventHandler(val);
|
|
17313
|
+
}
|
|
17314
|
+
};
|
|
17315
|
+
const handleFocus = (event) => {
|
|
17316
|
+
const val = event.target.value;
|
|
17317
|
+
onFocus && onFocus(val);
|
|
17318
|
+
setActive(true);
|
|
17319
|
+
};
|
|
17320
|
+
const handleInput = (value2) => {
|
|
17321
|
+
updateValue(value2, "onChange");
|
|
17322
|
+
};
|
|
17323
|
+
const handleBlur = (event) => {
|
|
17324
|
+
const val = event.target.value;
|
|
17325
|
+
updateValue(val, "onBlur");
|
|
17326
|
+
setActive(false);
|
|
17327
|
+
};
|
|
17328
|
+
const inputType = (type22) => {
|
|
17329
|
+
if (type22 === "digit") {
|
|
17330
|
+
return "text";
|
|
17331
|
+
}
|
|
17332
|
+
if (type22 === "number") {
|
|
17333
|
+
return "tel";
|
|
17334
|
+
}
|
|
17335
|
+
return type22;
|
|
17336
|
+
};
|
|
17337
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
17338
|
+
"div",
|
|
17339
|
+
{
|
|
17340
|
+
className: `${inputClass()} ${className || ""}`,
|
|
17341
|
+
style,
|
|
17342
|
+
onClick: (e) => {
|
|
17343
|
+
onClick && onClick(e);
|
|
17344
|
+
},
|
|
17345
|
+
children: [
|
|
17346
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17347
|
+
"input",
|
|
17348
|
+
{
|
|
17349
|
+
...rest,
|
|
17350
|
+
name,
|
|
17351
|
+
className: "nut-input-native",
|
|
17352
|
+
ref: inputRef,
|
|
17353
|
+
style: { textAlign: align },
|
|
17354
|
+
type: inputType(type4),
|
|
17355
|
+
maxLength,
|
|
17356
|
+
placeholder: placeholder || locale.placeholder,
|
|
17357
|
+
disabled,
|
|
17358
|
+
readOnly,
|
|
17359
|
+
value,
|
|
17360
|
+
autoFocus,
|
|
17361
|
+
enterKeyHint: confirmType,
|
|
17362
|
+
onBlur: (e) => {
|
|
17363
|
+
handleBlur(e);
|
|
17364
|
+
},
|
|
17365
|
+
onFocus: (e) => {
|
|
17366
|
+
handleFocus(e);
|
|
17367
|
+
},
|
|
17368
|
+
onChange: (e) => {
|
|
17369
|
+
handleInput(e.currentTarget.value);
|
|
17370
|
+
},
|
|
17371
|
+
onCompositionStart: (e) => {
|
|
17372
|
+
var _a2;
|
|
17373
|
+
composingRef.current = true;
|
|
17374
|
+
(_a2 = props.onCompositionStart) == null ? void 0 : _a2.call(props, e);
|
|
17375
|
+
},
|
|
17376
|
+
onCompositionEnd: (e) => {
|
|
17377
|
+
var _a2;
|
|
17378
|
+
composingRef.current = false;
|
|
17379
|
+
(_a2 = props.onCompositionEnd) == null ? void 0 : _a2.call(props, e);
|
|
17474
17380
|
}
|
|
17475
|
-
|
|
17476
|
-
|
|
17477
|
-
|
|
17478
|
-
|
|
17479
|
-
"/",
|
|
17480
|
-
maxlength
|
|
17481
|
-
] }) : null
|
|
17482
|
-
] }),
|
|
17483
|
-
errorMessage ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17484
|
-
"div",
|
|
17381
|
+
}
|
|
17382
|
+
),
|
|
17383
|
+
clearable && !readOnly && active && value.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17384
|
+
"span",
|
|
17485
17385
|
{
|
|
17486
|
-
|
|
17487
|
-
|
|
17488
|
-
|
|
17386
|
+
style: { display: "flex", alignItems: "center" },
|
|
17387
|
+
onClick: () => {
|
|
17388
|
+
if (!disabled) {
|
|
17389
|
+
setValue("");
|
|
17390
|
+
onClear && onClear("");
|
|
17391
|
+
}
|
|
17489
17392
|
},
|
|
17490
|
-
children:
|
|
17393
|
+
children: clearIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(x$4, { className: "nut-input-clear" })
|
|
17491
17394
|
}
|
|
17492
|
-
) :
|
|
17493
|
-
]
|
|
17494
|
-
|
|
17495
|
-
|
|
17496
|
-
|
|
17497
|
-
|
|
17498
|
-
Input.defaultProps = defaultProps$
|
|
17395
|
+
) : null
|
|
17396
|
+
]
|
|
17397
|
+
}
|
|
17398
|
+
);
|
|
17399
|
+
}
|
|
17400
|
+
);
|
|
17401
|
+
Input.defaultProps = defaultProps$T;
|
|
17499
17402
|
Input.displayName = "NutInput";
|
|
17500
|
-
const defaultProps$
|
|
17403
|
+
const defaultProps$S = {
|
|
17501
17404
|
...ComponentDefaults,
|
|
17502
17405
|
disabled: false,
|
|
17503
17406
|
min: 1,
|
|
@@ -17509,7 +17412,7 @@ const defaultProps$T = {
|
|
|
17509
17412
|
digits: 0,
|
|
17510
17413
|
async: false
|
|
17511
17414
|
};
|
|
17512
|
-
const classPrefix$
|
|
17415
|
+
const classPrefix$7 = `nut-inputnumber`;
|
|
17513
17416
|
const InputNumber = (props) => {
|
|
17514
17417
|
const {
|
|
17515
17418
|
children,
|
|
@@ -17534,7 +17437,7 @@ const InputNumber = (props) => {
|
|
|
17534
17437
|
onChange,
|
|
17535
17438
|
...restProps
|
|
17536
17439
|
} = {
|
|
17537
|
-
...defaultProps$
|
|
17440
|
+
...defaultProps$S,
|
|
17538
17441
|
...props
|
|
17539
17442
|
};
|
|
17540
17443
|
const inputRef = useRef("");
|
|
@@ -17552,8 +17455,8 @@ const InputNumber = (props) => {
|
|
|
17552
17455
|
}, []);
|
|
17553
17456
|
const classes = classNames(
|
|
17554
17457
|
{
|
|
17555
|
-
[`${classPrefix$
|
|
17556
|
-
[`${classPrefix$
|
|
17458
|
+
[`${classPrefix$7}`]: true,
|
|
17459
|
+
[`${classPrefix$7}--disabled`]: disabled
|
|
17557
17460
|
},
|
|
17558
17461
|
className
|
|
17559
17462
|
);
|
|
@@ -17735,9 +17638,9 @@ const InputNumber = (props) => {
|
|
|
17735
17638
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-add", children: /* @__PURE__ */ jsxRuntimeExports.jsx(y$3, { className: iconAddClasses, onClick: (e) => addNumber(e) }) })
|
|
17736
17639
|
] });
|
|
17737
17640
|
};
|
|
17738
|
-
InputNumber.defaultProps = defaultProps$
|
|
17641
|
+
InputNumber.defaultProps = defaultProps$S;
|
|
17739
17642
|
InputNumber.displayName = "NutInputNumber";
|
|
17740
|
-
const defaultProps$
|
|
17643
|
+
const defaultProps$R = {
|
|
17741
17644
|
...ComponentDefaults,
|
|
17742
17645
|
activeColor: "",
|
|
17743
17646
|
closeOnOverlayClick: true,
|
|
@@ -17756,7 +17659,7 @@ const Menu = (props) => {
|
|
|
17756
17659
|
activeColor,
|
|
17757
17660
|
...rest
|
|
17758
17661
|
} = {
|
|
17759
|
-
...defaultProps$
|
|
17662
|
+
...defaultProps$R,
|
|
17760
17663
|
...props
|
|
17761
17664
|
};
|
|
17762
17665
|
const menuRef = useRef(null);
|
|
@@ -17880,9 +17783,9 @@ const Menu = (props) => {
|
|
|
17880
17783
|
}
|
|
17881
17784
|
);
|
|
17882
17785
|
};
|
|
17883
|
-
Menu.defaultProps = defaultProps$
|
|
17786
|
+
Menu.defaultProps = defaultProps$R;
|
|
17884
17787
|
Menu.displayName = "NutMenu";
|
|
17885
|
-
const defaultProps$
|
|
17788
|
+
const defaultProps$Q = {
|
|
17886
17789
|
...ComponentDefaults,
|
|
17887
17790
|
columns: 1,
|
|
17888
17791
|
direction: "down",
|
|
@@ -17912,7 +17815,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
17912
17815
|
parent,
|
|
17913
17816
|
index
|
|
17914
17817
|
} = {
|
|
17915
|
-
...defaultProps$
|
|
17818
|
+
...defaultProps$Q,
|
|
17916
17819
|
...props
|
|
17917
17820
|
};
|
|
17918
17821
|
const [_showPopup, setShowPopup] = useState(show);
|
|
@@ -18066,9 +17969,9 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
18066
17969
|
)
|
|
18067
17970
|
] });
|
|
18068
17971
|
});
|
|
18069
|
-
MenuItem.defaultProps = defaultProps$
|
|
17972
|
+
MenuItem.defaultProps = defaultProps$Q;
|
|
18070
17973
|
MenuItem.displayName = "NutMenuItem";
|
|
18071
|
-
const defaultProps$
|
|
17974
|
+
const defaultProps$P = {
|
|
18072
17975
|
confirmText: "",
|
|
18073
17976
|
title: "",
|
|
18074
17977
|
visible: false,
|
|
@@ -18300,14 +18203,14 @@ const NumberKeyboard = (props) => {
|
|
|
18300
18203
|
}
|
|
18301
18204
|
) });
|
|
18302
18205
|
};
|
|
18303
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
18206
|
+
NumberKeyboard.defaultProps = defaultProps$P;
|
|
18304
18207
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
18305
18208
|
const radioContext = {
|
|
18306
18209
|
onChange: (val) => {
|
|
18307
18210
|
}
|
|
18308
18211
|
};
|
|
18309
18212
|
const RadioContext = React__default.createContext(radioContext);
|
|
18310
|
-
const defaultProps$
|
|
18213
|
+
const defaultProps$O = {
|
|
18311
18214
|
value: null,
|
|
18312
18215
|
textPosition: "right",
|
|
18313
18216
|
onChange: (value) => {
|
|
@@ -18317,7 +18220,7 @@ const defaultProps$P = {
|
|
|
18317
18220
|
};
|
|
18318
18221
|
const RadioGroup = React__default.forwardRef(
|
|
18319
18222
|
(props, ref) => {
|
|
18320
|
-
const { children } = { ...defaultProps$
|
|
18223
|
+
const { children } = { ...defaultProps$O, ...props };
|
|
18321
18224
|
cn("RadioGroup");
|
|
18322
18225
|
const {
|
|
18323
18226
|
className,
|
|
@@ -18394,9 +18297,9 @@ const RadioGroup = React__default.forwardRef(
|
|
|
18394
18297
|
);
|
|
18395
18298
|
}
|
|
18396
18299
|
);
|
|
18397
|
-
RadioGroup.defaultProps = defaultProps$
|
|
18300
|
+
RadioGroup.defaultProps = defaultProps$O;
|
|
18398
18301
|
RadioGroup.displayName = "NutRadioGroup";
|
|
18399
|
-
const defaultProps$
|
|
18302
|
+
const defaultProps$N = {
|
|
18400
18303
|
...ComponentDefaults,
|
|
18401
18304
|
className: "",
|
|
18402
18305
|
style: {},
|
|
@@ -18413,7 +18316,7 @@ const defaultProps$O = {
|
|
|
18413
18316
|
};
|
|
18414
18317
|
const Radio = (props) => {
|
|
18415
18318
|
const { children } = {
|
|
18416
|
-
...defaultProps$
|
|
18319
|
+
...defaultProps$N,
|
|
18417
18320
|
...props
|
|
18418
18321
|
};
|
|
18419
18322
|
const {
|
|
@@ -18513,7 +18416,7 @@ const Radio = (props) => {
|
|
|
18513
18416
|
}
|
|
18514
18417
|
);
|
|
18515
18418
|
};
|
|
18516
|
-
Radio.defaultProps = defaultProps$
|
|
18419
|
+
Radio.defaultProps = defaultProps$N;
|
|
18517
18420
|
Radio.displayName = "NutRadio";
|
|
18518
18421
|
Radio.RadioGroup = RadioGroup;
|
|
18519
18422
|
const fullClone = {
|
|
@@ -18762,7 +18665,7 @@ const Toast = {
|
|
|
18762
18665
|
},
|
|
18763
18666
|
loading(msg, option = {}) {
|
|
18764
18667
|
errorMsg$1(msg);
|
|
18765
|
-
return notice$1({ msg, icon: /* @__PURE__ */ jsxRuntimeExports.jsx(k$
|
|
18668
|
+
return notice$1({ msg, icon: /* @__PURE__ */ jsxRuntimeExports.jsx(k$3, {}), type: "loading", ...option });
|
|
18766
18669
|
},
|
|
18767
18670
|
warn(msg, option = {}) {
|
|
18768
18671
|
errorMsg$1(msg);
|
|
@@ -18779,7 +18682,7 @@ const Toast = {
|
|
|
18779
18682
|
}
|
|
18780
18683
|
}
|
|
18781
18684
|
};
|
|
18782
|
-
const defaultProps$
|
|
18685
|
+
const defaultProps$M = {
|
|
18783
18686
|
range: false,
|
|
18784
18687
|
hiddenRange: false,
|
|
18785
18688
|
hiddenTag: false,
|
|
@@ -18815,8 +18718,8 @@ const Range = (props) => {
|
|
|
18815
18718
|
minDesc,
|
|
18816
18719
|
maxDesc,
|
|
18817
18720
|
curValueDesc
|
|
18818
|
-
} = { ...defaultProps$
|
|
18819
|
-
let { min, max, step } = { ...defaultProps$
|
|
18721
|
+
} = { ...defaultProps$M, ...props };
|
|
18722
|
+
let { min, max, step } = { ...defaultProps$M, ...props };
|
|
18820
18723
|
min = Number(min);
|
|
18821
18724
|
max = Number(max);
|
|
18822
18725
|
step = Number(step);
|
|
@@ -19155,9 +19058,9 @@ const Range = (props) => {
|
|
|
19155
19058
|
!hiddenRange ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "max", children: maxDesc || +max }) : null
|
|
19156
19059
|
] });
|
|
19157
19060
|
};
|
|
19158
|
-
Range.defaultProps = defaultProps$
|
|
19061
|
+
Range.defaultProps = defaultProps$M;
|
|
19159
19062
|
Range.displayName = "NutRange";
|
|
19160
|
-
const defaultProps$
|
|
19063
|
+
const defaultProps$L = {
|
|
19161
19064
|
...ComponentDefaults,
|
|
19162
19065
|
count: 5,
|
|
19163
19066
|
min: 0,
|
|
@@ -19182,7 +19085,7 @@ const Rate = (props) => {
|
|
|
19182
19085
|
allowHalf,
|
|
19183
19086
|
onChange
|
|
19184
19087
|
} = {
|
|
19185
|
-
...defaultProps$
|
|
19088
|
+
...defaultProps$L,
|
|
19186
19089
|
...props
|
|
19187
19090
|
};
|
|
19188
19091
|
const classPrefix2 = "nut-rate";
|
|
@@ -19267,9 +19170,9 @@ const Rate = (props) => {
|
|
|
19267
19170
|
}
|
|
19268
19171
|
);
|
|
19269
19172
|
};
|
|
19270
|
-
Rate.defaultProps = defaultProps$
|
|
19173
|
+
Rate.defaultProps = defaultProps$L;
|
|
19271
19174
|
Rate.displayName = "NutRate";
|
|
19272
|
-
const defaultProps$
|
|
19175
|
+
const defaultProps$K = {
|
|
19273
19176
|
...ComponentDefaults,
|
|
19274
19177
|
placeholder: "",
|
|
19275
19178
|
shape: "square",
|
|
@@ -19317,7 +19220,7 @@ const SearchBar = (props) => {
|
|
|
19317
19220
|
onClickRightinIcon,
|
|
19318
19221
|
onClickRightoutIcon
|
|
19319
19222
|
} = {
|
|
19320
|
-
...defaultProps$
|
|
19223
|
+
...defaultProps$K,
|
|
19321
19224
|
...props
|
|
19322
19225
|
};
|
|
19323
19226
|
const alignClass = `${align}`;
|
|
@@ -19500,9 +19403,9 @@ const SearchBar = (props) => {
|
|
|
19500
19403
|
}
|
|
19501
19404
|
);
|
|
19502
19405
|
};
|
|
19503
|
-
SearchBar.defaultProps = defaultProps$
|
|
19406
|
+
SearchBar.defaultProps = defaultProps$K;
|
|
19504
19407
|
SearchBar.displayName = "NutSearchBar";
|
|
19505
|
-
const defaultProps$
|
|
19408
|
+
const defaultProps$J = {
|
|
19506
19409
|
...ComponentDefaults,
|
|
19507
19410
|
title: "",
|
|
19508
19411
|
description: "",
|
|
@@ -19666,9 +19569,9 @@ const ShortPassword = (props) => {
|
|
|
19666
19569
|
}
|
|
19667
19570
|
) });
|
|
19668
19571
|
};
|
|
19669
|
-
ShortPassword.defaultProps = defaultProps$
|
|
19572
|
+
ShortPassword.defaultProps = defaultProps$J;
|
|
19670
19573
|
ShortPassword.displayName = "NutShortPassword";
|
|
19671
|
-
const defaultProps$
|
|
19574
|
+
const defaultProps$I = {
|
|
19672
19575
|
type: "png",
|
|
19673
19576
|
lineWidth: 2,
|
|
19674
19577
|
strokeStyle: "#000",
|
|
@@ -19689,7 +19592,7 @@ const Signature = (props) => {
|
|
|
19689
19592
|
onClear,
|
|
19690
19593
|
...rest
|
|
19691
19594
|
} = {
|
|
19692
|
-
...defaultProps$
|
|
19595
|
+
...defaultProps$I,
|
|
19693
19596
|
...props
|
|
19694
19597
|
};
|
|
19695
19598
|
const b = cn("signature");
|
|
@@ -19803,9 +19706,9 @@ const Signature = (props) => {
|
|
|
19803
19706
|
)
|
|
19804
19707
|
] });
|
|
19805
19708
|
};
|
|
19806
|
-
Signature.defaultProps = defaultProps$
|
|
19709
|
+
Signature.defaultProps = defaultProps$I;
|
|
19807
19710
|
Signature.displayName = "NutSignature";
|
|
19808
|
-
const defaultProps$
|
|
19711
|
+
const defaultProps$H = {
|
|
19809
19712
|
...ComponentDefaults,
|
|
19810
19713
|
disabled: false,
|
|
19811
19714
|
activeText: "",
|
|
@@ -19822,7 +19725,7 @@ const Switch = (props) => {
|
|
|
19822
19725
|
style,
|
|
19823
19726
|
onChange
|
|
19824
19727
|
} = {
|
|
19825
|
-
...defaultProps$
|
|
19728
|
+
...defaultProps$H,
|
|
19826
19729
|
...props
|
|
19827
19730
|
};
|
|
19828
19731
|
const classPrefix2 = "nut-switch";
|
|
@@ -19844,9 +19747,9 @@ const Switch = (props) => {
|
|
|
19844
19747
|
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 }) })
|
|
19845
19748
|
] }) });
|
|
19846
19749
|
};
|
|
19847
|
-
Switch.defaultProps = defaultProps$
|
|
19750
|
+
Switch.defaultProps = defaultProps$H;
|
|
19848
19751
|
Switch.displayName = "NutSwitch";
|
|
19849
|
-
const defaultProps$
|
|
19752
|
+
const defaultProps$G = {
|
|
19850
19753
|
defaultValue: "",
|
|
19851
19754
|
textAlign: "left",
|
|
19852
19755
|
limitshow: false,
|
|
@@ -19874,7 +19777,7 @@ const TextArea = (props) => {
|
|
|
19874
19777
|
onChange,
|
|
19875
19778
|
onBlur,
|
|
19876
19779
|
onFocus
|
|
19877
|
-
} = { ...defaultProps$
|
|
19780
|
+
} = { ...defaultProps$G, ...props };
|
|
19878
19781
|
const textareaBem = cn("textarea");
|
|
19879
19782
|
const [inputValue, SetInputValue] = useState("");
|
|
19880
19783
|
const textareaRef = useRef(null);
|
|
@@ -19989,9 +19892,9 @@ const TextArea = (props) => {
|
|
|
19989
19892
|
}
|
|
19990
19893
|
);
|
|
19991
19894
|
};
|
|
19992
|
-
TextArea.defaultProps = defaultProps$
|
|
19895
|
+
TextArea.defaultProps = defaultProps$G;
|
|
19993
19896
|
TextArea.displayName = "NutTextArea";
|
|
19994
|
-
const defaultProps$
|
|
19897
|
+
const defaultProps$F = {
|
|
19995
19898
|
...ComponentDefaults,
|
|
19996
19899
|
percent: 0,
|
|
19997
19900
|
showText: false,
|
|
@@ -20010,7 +19913,7 @@ const Progress = (props) => {
|
|
|
20010
19913
|
children,
|
|
20011
19914
|
...rest
|
|
20012
19915
|
} = {
|
|
20013
|
-
...defaultProps$
|
|
19916
|
+
...defaultProps$F,
|
|
20014
19917
|
...props
|
|
20015
19918
|
};
|
|
20016
19919
|
const classPrefix2 = "nut-progress";
|
|
@@ -20047,7 +19950,7 @@ const Progress = (props) => {
|
|
|
20047
19950
|
}
|
|
20048
19951
|
) }) }) });
|
|
20049
19952
|
};
|
|
20050
|
-
Progress.defaultProps = defaultProps$
|
|
19953
|
+
Progress.defaultProps = defaultProps$F;
|
|
20051
19954
|
Progress.displayName = "NutProgress";
|
|
20052
19955
|
class UploadOptions {
|
|
20053
19956
|
constructor() {
|
|
@@ -20144,7 +20047,7 @@ const funcInterceptor = (interceptor, {
|
|
|
20144
20047
|
done();
|
|
20145
20048
|
}
|
|
20146
20049
|
};
|
|
20147
|
-
const defaultProps$
|
|
20050
|
+
const defaultProps$E = {
|
|
20148
20051
|
...ComponentDefaults,
|
|
20149
20052
|
url: "",
|
|
20150
20053
|
maxCount: 1,
|
|
@@ -20226,7 +20129,7 @@ const InternalUploader = (props, ref) => {
|
|
|
20226
20129
|
beforeXhrUpload,
|
|
20227
20130
|
beforeDelete,
|
|
20228
20131
|
...restProps
|
|
20229
|
-
} = { ...defaultProps$
|
|
20132
|
+
} = { ...defaultProps$E, ...props };
|
|
20230
20133
|
const [fileList, setFileList] = useState(defaultValue || []);
|
|
20231
20134
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
20232
20135
|
useEffect(() => {
|
|
@@ -20484,7 +20387,7 @@ const InternalUploader = (props, ref) => {
|
|
|
20484
20387
|
),
|
|
20485
20388
|
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: [
|
|
20486
20389
|
item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(x$8, { color: "#fff" }) : item.loadingIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20487
|
-
k$
|
|
20390
|
+
k$3,
|
|
20488
20391
|
{
|
|
20489
20392
|
className: "nut-icon-loading",
|
|
20490
20393
|
color: "#fff"
|
|
@@ -20597,9 +20500,9 @@ const InternalUploader = (props, ref) => {
|
|
|
20597
20500
|
] });
|
|
20598
20501
|
};
|
|
20599
20502
|
const Uploader = React__default.forwardRef(InternalUploader);
|
|
20600
|
-
Uploader.defaultProps = defaultProps$
|
|
20503
|
+
Uploader.defaultProps = defaultProps$E;
|
|
20601
20504
|
Uploader.displayName = "NutUploader";
|
|
20602
|
-
const defaultProps$
|
|
20505
|
+
const defaultProps$D = {
|
|
20603
20506
|
cancelText: "",
|
|
20604
20507
|
optionTag: "name",
|
|
20605
20508
|
optionSubTag: "subname",
|
|
@@ -20633,7 +20536,7 @@ const ActionSheet = (props) => {
|
|
|
20633
20536
|
className,
|
|
20634
20537
|
style,
|
|
20635
20538
|
...rest
|
|
20636
|
-
} = { ...defaultProps$
|
|
20539
|
+
} = { ...defaultProps$D, ...props };
|
|
20637
20540
|
const b = cn("actionsheet");
|
|
20638
20541
|
const isHighlight = (item) => {
|
|
20639
20542
|
return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "$dark1";
|
|
@@ -20678,52 +20581,8 @@ const ActionSheet = (props) => {
|
|
|
20678
20581
|
}
|
|
20679
20582
|
);
|
|
20680
20583
|
};
|
|
20681
|
-
ActionSheet.defaultProps = defaultProps$
|
|
20584
|
+
ActionSheet.defaultProps = defaultProps$D;
|
|
20682
20585
|
ActionSheet.displayName = "NutActionSheet";
|
|
20683
|
-
const defaultProps$D = {
|
|
20684
|
-
...ComponentDefaults,
|
|
20685
|
-
value: "",
|
|
20686
|
-
dot: false,
|
|
20687
|
-
max: 99,
|
|
20688
|
-
top: "0",
|
|
20689
|
-
right: "5",
|
|
20690
|
-
color: ""
|
|
20691
|
-
};
|
|
20692
|
-
const Badge = (props) => {
|
|
20693
|
-
const { className, style, value, max, children, dot, top, right, color } = {
|
|
20694
|
-
...defaultProps$D,
|
|
20695
|
-
...props
|
|
20696
|
-
};
|
|
20697
|
-
const classPrefix2 = "nut-badge";
|
|
20698
|
-
const classes = classNames(classPrefix2, className);
|
|
20699
|
-
const contentClasses = classNames(
|
|
20700
|
-
{ [`${classPrefix2}__dot`]: dot },
|
|
20701
|
-
`${classPrefix2}__content`,
|
|
20702
|
-
`${classPrefix2}__sup`
|
|
20703
|
-
);
|
|
20704
|
-
function content() {
|
|
20705
|
-
if (dot || typeof value === "object")
|
|
20706
|
-
return null;
|
|
20707
|
-
if (typeof value === "number" && typeof max === "number") {
|
|
20708
|
-
return max < value ? `${max}+` : value;
|
|
20709
|
-
}
|
|
20710
|
-
return value;
|
|
20711
|
-
}
|
|
20712
|
-
const getStyle = () => {
|
|
20713
|
-
const style2 = {};
|
|
20714
|
-
style2.top = `${Number(top) || parseFloat(top) || 0}px`;
|
|
20715
|
-
style2.right = `${Number(right) || parseFloat(right) || 0}px`;
|
|
20716
|
-
style2.background = color;
|
|
20717
|
-
return style2;
|
|
20718
|
-
};
|
|
20719
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes, style, children: [
|
|
20720
|
-
typeof value === "object" && value && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__icon`, children: value }),
|
|
20721
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children }),
|
|
20722
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: contentClasses, style: getStyle(), children: content() })
|
|
20723
|
-
] });
|
|
20724
|
-
};
|
|
20725
|
-
Badge.defaultProps = defaultProps$D;
|
|
20726
|
-
Badge.displayName = "NutBadge";
|
|
20727
20586
|
function ConfirmDialog(props) {
|
|
20728
20587
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Dialog, { ...props, children: props.content });
|
|
20729
20588
|
}
|
|
@@ -21096,25 +20955,29 @@ const defaultStatus = {
|
|
|
21096
20955
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
21097
20956
|
};
|
|
21098
20957
|
const defaultProps$A = {
|
|
20958
|
+
...ComponentDefaults,
|
|
21099
20959
|
description: "",
|
|
21100
|
-
image: "empty",
|
|
21101
20960
|
imageSize: "",
|
|
21102
|
-
|
|
20961
|
+
status: "empty"
|
|
21103
20962
|
};
|
|
20963
|
+
const classPrefix$6 = `nut-empty`;
|
|
21104
20964
|
const Empty = (props) => {
|
|
21105
20965
|
const { locale } = useConfig();
|
|
21106
|
-
const {
|
|
20966
|
+
const {
|
|
20967
|
+
image,
|
|
20968
|
+
imageSize,
|
|
20969
|
+
description,
|
|
20970
|
+
children,
|
|
20971
|
+
className,
|
|
20972
|
+
status,
|
|
20973
|
+
...rest
|
|
20974
|
+
} = {
|
|
21107
20975
|
...defaultProps$A,
|
|
21108
20976
|
...props
|
|
21109
20977
|
};
|
|
21110
20978
|
const [imgStyle, setImgStyle] = useState({});
|
|
21111
|
-
const
|
|
21112
|
-
|
|
21113
|
-
if (typeof image === "string") {
|
|
21114
|
-
const isHttpUrl = image.startsWith("https://") || image.startsWith("http://") || image.startsWith("//");
|
|
21115
|
-
const imageUrl = isHttpUrl ? image : defaultStatus[image];
|
|
21116
|
-
imageNode = /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "img", src: imageUrl, alt: "empty" });
|
|
21117
|
-
}
|
|
20979
|
+
const imageUrl = image || defaultStatus[status];
|
|
20980
|
+
const imageNode = typeof imageUrl === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "img", src: imageUrl, alt: "empty" }) : imageUrl;
|
|
21118
20981
|
useEffect(() => {
|
|
21119
20982
|
setImgStyle(() => {
|
|
21120
20983
|
if (!imageSize) {
|
|
@@ -21132,9 +20995,9 @@ const Empty = (props) => {
|
|
|
21132
20995
|
};
|
|
21133
20996
|
});
|
|
21134
20997
|
}, [imageSize]);
|
|
21135
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${
|
|
21136
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className:
|
|
21137
|
-
typeof description === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className:
|
|
20998
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$6} ${className}`, ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
20999
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$6}__image`, style: imgStyle, children: imageNode }),
|
|
21000
|
+
typeof description === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$6}__description`, children: description || locale.noData }) : description,
|
|
21138
21001
|
children
|
|
21139
21002
|
] }) });
|
|
21140
21003
|
};
|
|
@@ -22323,29 +22186,30 @@ const AvatarContext = createContext({});
|
|
|
22323
22186
|
const defaultProps$v = {
|
|
22324
22187
|
...ComponentDefaults,
|
|
22325
22188
|
size: "",
|
|
22189
|
+
shape: "round",
|
|
22326
22190
|
icon: "",
|
|
22327
|
-
|
|
22191
|
+
background: "#eee",
|
|
22328
22192
|
color: "#666",
|
|
22329
|
-
|
|
22330
|
-
|
|
22193
|
+
fit: "cover",
|
|
22194
|
+
src: "",
|
|
22331
22195
|
alt: ""
|
|
22332
22196
|
};
|
|
22197
|
+
const classPrefix$5 = `nut-avatar`;
|
|
22333
22198
|
const Avatar = (props) => {
|
|
22334
22199
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
22335
22200
|
const {
|
|
22336
22201
|
children,
|
|
22337
|
-
prefixCls: prefixCls2,
|
|
22338
22202
|
size,
|
|
22339
22203
|
shape,
|
|
22340
|
-
|
|
22204
|
+
background,
|
|
22341
22205
|
color,
|
|
22342
|
-
|
|
22206
|
+
src,
|
|
22343
22207
|
alt,
|
|
22344
22208
|
icon,
|
|
22209
|
+
fit,
|
|
22345
22210
|
className,
|
|
22346
22211
|
style,
|
|
22347
|
-
|
|
22348
|
-
onActiveAvatar,
|
|
22212
|
+
onClick,
|
|
22349
22213
|
onError,
|
|
22350
22214
|
...rest
|
|
22351
22215
|
} = {
|
|
@@ -22357,24 +22221,23 @@ const Avatar = (props) => {
|
|
|
22357
22221
|
const [avatarIndex, setAvatarIndex] = useState(1);
|
|
22358
22222
|
const avatarRef = useRef(null);
|
|
22359
22223
|
const parent = useContext(AvatarContext);
|
|
22360
|
-
const
|
|
22224
|
+
const sizeValue = ["large", "normal", "small"];
|
|
22361
22225
|
const classes = classNames({
|
|
22362
|
-
[`nut-avatar-${
|
|
22363
|
-
[`nut-avatar-${
|
|
22226
|
+
[`nut-avatar-${((_a2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a2.size) || size || "normal"}`]: true,
|
|
22227
|
+
[`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
|
|
22364
22228
|
});
|
|
22365
|
-
const cls = classNames(
|
|
22366
|
-
const sizeValue = ["large", "normal", "small"];
|
|
22229
|
+
const cls = classNames(classPrefix$5, classes, className);
|
|
22367
22230
|
const styles = {
|
|
22368
22231
|
width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
22369
22232
|
height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
22370
|
-
backgroundColor: `${
|
|
22233
|
+
backgroundColor: `${background}`,
|
|
22371
22234
|
color: `${color}`,
|
|
22372
|
-
marginLeft: avatarIndex !== 1 && ((_c = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c.
|
|
22373
|
-
zIndex: ((_e = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _e.
|
|
22235
|
+
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` : "",
|
|
22236
|
+
zIndex: ((_e = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _e.level) === "right" ? `${Math.abs(maxSum - avatarIndex)}` : "",
|
|
22374
22237
|
...style
|
|
22375
22238
|
};
|
|
22376
22239
|
const maxStyles = {
|
|
22377
|
-
backgroundColor: `${(_f = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _f.
|
|
22240
|
+
backgroundColor: `${(_f = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _f.maxBackground}`,
|
|
22378
22241
|
color: `${(_g = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _g.maxColor}`
|
|
22379
22242
|
};
|
|
22380
22243
|
useEffect(() => {
|
|
@@ -22392,23 +22255,22 @@ const Avatar = (props) => {
|
|
|
22392
22255
|
}
|
|
22393
22256
|
}
|
|
22394
22257
|
const index = Number((_b2 = (_a3 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a3.dataset) == null ? void 0 : _b2.index);
|
|
22395
|
-
const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.
|
|
22258
|
+
const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.max;
|
|
22396
22259
|
setMaxSum(children2.length);
|
|
22397
22260
|
setAvatarIndex(index);
|
|
22398
22261
|
if (index === children2.length && index !== maxCount && children2.length > maxCount) {
|
|
22399
22262
|
setShowMax(true);
|
|
22400
22263
|
}
|
|
22401
22264
|
};
|
|
22402
|
-
const errorEvent = (
|
|
22265
|
+
const errorEvent = () => {
|
|
22403
22266
|
if (props.onError) {
|
|
22404
|
-
props.onError(
|
|
22267
|
+
props.onError();
|
|
22405
22268
|
}
|
|
22406
22269
|
};
|
|
22407
22270
|
const clickAvatar = (e) => {
|
|
22408
|
-
|
|
22409
|
-
onActiveAvatar && onActiveAvatar(e);
|
|
22271
|
+
onClick && onClick(e);
|
|
22410
22272
|
};
|
|
22411
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: (showMax || !((_h = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _h.
|
|
22273
|
+
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(
|
|
22412
22274
|
"div",
|
|
22413
22275
|
{
|
|
22414
22276
|
className: cls,
|
|
@@ -22417,13 +22279,14 @@ const Avatar = (props) => {
|
|
|
22417
22279
|
onClick: clickAvatar,
|
|
22418
22280
|
ref: avatarRef,
|
|
22419
22281
|
children: [
|
|
22420
|
-
(!((_j = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _j.
|
|
22421
|
-
|
|
22422
|
-
|
|
22282
|
+
(!((_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: [
|
|
22283
|
+
src && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
22284
|
+
Image$1,
|
|
22423
22285
|
{
|
|
22424
22286
|
className: "avatar-img",
|
|
22425
|
-
src
|
|
22287
|
+
src,
|
|
22426
22288
|
alt,
|
|
22289
|
+
style: { objectFit: fit },
|
|
22427
22290
|
onError: errorEvent
|
|
22428
22291
|
}
|
|
22429
22292
|
),
|
|
@@ -22431,9 +22294,10 @@ const Avatar = (props) => {
|
|
|
22431
22294
|
...icon.props,
|
|
22432
22295
|
className: `${icon.props.className || ""} icon`
|
|
22433
22296
|
}) : null,
|
|
22434
|
-
children && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text", children })
|
|
22297
|
+
children && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text", children }),
|
|
22298
|
+
!src && !icon && !children && /* @__PURE__ */ jsxRuntimeExports.jsx(k$2, { className: "icon" })
|
|
22435
22299
|
] }),
|
|
22436
|
-
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.
|
|
22300
|
+
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)}` })
|
|
22437
22301
|
]
|
|
22438
22302
|
}
|
|
22439
22303
|
) });
|
|
@@ -22503,7 +22367,7 @@ const Skeleton = (props) => {
|
|
|
22503
22367
|
Avatar,
|
|
22504
22368
|
{
|
|
22505
22369
|
className: avatarClass,
|
|
22506
|
-
|
|
22370
|
+
background: "rgb(239, 239, 239)",
|
|
22507
22371
|
shape: avatarShape,
|
|
22508
22372
|
style: getStyle()
|
|
22509
22373
|
}
|
|
@@ -22536,9 +22400,7 @@ function preventDefault(event, isStopPropagation) {
|
|
|
22536
22400
|
}
|
|
22537
22401
|
}
|
|
22538
22402
|
const defaultProps$t = {
|
|
22539
|
-
name: ""
|
|
22540
|
-
leftWidth: 0,
|
|
22541
|
-
rightWidth: 0
|
|
22403
|
+
name: ""
|
|
22542
22404
|
};
|
|
22543
22405
|
const Swipe = forwardRef((props, instanceRef) => {
|
|
22544
22406
|
const swipeBem = cn("swipe");
|
|
@@ -22560,14 +22422,8 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
22560
22422
|
transform: `translate3d(${state.offset}px, 0, 0)`,
|
|
22561
22423
|
transitionDuration: state.dragging ? "0s" : ".6s"
|
|
22562
22424
|
};
|
|
22563
|
-
const leftWidth =
|
|
22564
|
-
|
|
22565
|
-
[props.leftWidth, actionWidth.left]
|
|
22566
|
-
);
|
|
22567
|
-
const rightWidth = useMemo(
|
|
22568
|
-
() => props.rightWidth ? props.rightWidth : actionWidth.right,
|
|
22569
|
-
[props.rightWidth, actionWidth.right]
|
|
22570
|
-
);
|
|
22425
|
+
const leftWidth = actionWidth.left;
|
|
22426
|
+
const rightWidth = actionWidth.right;
|
|
22571
22427
|
const onTouchStart = (event) => {
|
|
22572
22428
|
if (!props.disabled) {
|
|
22573
22429
|
startOffset.current = state.offset;
|
|
@@ -22731,7 +22587,7 @@ const defaultProps$s = {
|
|
|
22731
22587
|
onClick: (event) => {
|
|
22732
22588
|
}
|
|
22733
22589
|
};
|
|
22734
|
-
const classPrefix$
|
|
22590
|
+
const classPrefix$4 = `nut-animate`;
|
|
22735
22591
|
const Animate = (props) => {
|
|
22736
22592
|
const { className, type: type4, action, loop: loop2, onClick, children, ...rest } = {
|
|
22737
22593
|
...defaultProps$s,
|
|
@@ -22740,7 +22596,7 @@ const Animate = (props) => {
|
|
|
22740
22596
|
const [clicked, setClicked] = useState(false);
|
|
22741
22597
|
const classes = classNames({
|
|
22742
22598
|
"nut-ani-container": true,
|
|
22743
|
-
[`${classPrefix$
|
|
22599
|
+
[`${classPrefix$4}-${type4}`]: action === "initial" || clicked ? type4 : false,
|
|
22744
22600
|
loop: loop2
|
|
22745
22601
|
});
|
|
22746
22602
|
const cls = classNames(classes, className);
|
|
@@ -23112,22 +22968,20 @@ const Audio = (props) => {
|
|
|
23112
22968
|
Audio.defaultProps = defaultProps$p;
|
|
23113
22969
|
Audio.displayName = "NutAudio";
|
|
23114
22970
|
const defaultProps$o = {
|
|
22971
|
+
...ComponentDefaults,
|
|
23115
22972
|
maxContent: "",
|
|
23116
|
-
|
|
23117
|
-
|
|
22973
|
+
max: "",
|
|
22974
|
+
maxBackground: "#eee",
|
|
23118
22975
|
maxColor: "#666",
|
|
23119
|
-
|
|
23120
|
-
|
|
23121
|
-
span: "-8",
|
|
23122
|
-
zIndex: "left"
|
|
22976
|
+
gap: "-8",
|
|
22977
|
+
level: "left"
|
|
23123
22978
|
};
|
|
22979
|
+
const classPrefix$3 = `nut-avatar-group`;
|
|
23124
22980
|
const AvatarGroup = (props) => {
|
|
23125
|
-
useConfig();
|
|
23126
22981
|
const propAvatarGroup = { ...defaultProps$o, ...props };
|
|
23127
22982
|
const { className, style, children } = propAvatarGroup;
|
|
23128
22983
|
const avatarGroupRef = useRef(null);
|
|
23129
|
-
const
|
|
23130
|
-
const cls = classNames(b(""), className);
|
|
22984
|
+
const cls = classNames(classPrefix$3, className);
|
|
23131
22985
|
const parentAvatar = {
|
|
23132
22986
|
propAvatarGroup,
|
|
23133
22987
|
avatarGroupRef
|
|
@@ -23137,24 +22991,26 @@ const AvatarGroup = (props) => {
|
|
|
23137
22991
|
AvatarGroup.defaultProps = defaultProps$o;
|
|
23138
22992
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
23139
22993
|
const defaultProps$n = {
|
|
22994
|
+
...ComponentDefaults,
|
|
23140
22995
|
strokeWidth: 5,
|
|
23141
22996
|
radius: 50,
|
|
23142
22997
|
strokeLinecap: "round",
|
|
23143
|
-
|
|
23144
|
-
|
|
22998
|
+
color: "#fa2c19",
|
|
22999
|
+
background: "#e5e9f2",
|
|
23145
23000
|
clockwise: true
|
|
23146
23001
|
};
|
|
23002
|
+
const classPrefix$2 = `nut-circleprogress`;
|
|
23147
23003
|
const CircleProgress = (props) => {
|
|
23148
23004
|
var _a2;
|
|
23149
23005
|
const {
|
|
23150
23006
|
children,
|
|
23151
|
-
|
|
23007
|
+
percent,
|
|
23152
23008
|
className,
|
|
23153
23009
|
radius,
|
|
23154
|
-
pathColor,
|
|
23155
23010
|
clockwise,
|
|
23156
|
-
circleColor,
|
|
23157
23011
|
strokeWidth,
|
|
23012
|
+
color,
|
|
23013
|
+
background,
|
|
23158
23014
|
style,
|
|
23159
23015
|
strokeLinecap,
|
|
23160
23016
|
...restProps
|
|
@@ -23162,8 +23018,7 @@ const CircleProgress = (props) => {
|
|
|
23162
23018
|
...defaultProps$n,
|
|
23163
23019
|
...props
|
|
23164
23020
|
};
|
|
23165
|
-
const
|
|
23166
|
-
const classes = classNames(className, b(""));
|
|
23021
|
+
const classes = classNames(className, classPrefix$2);
|
|
23167
23022
|
const refRandomId = Math.random().toString(36).slice(-8);
|
|
23168
23023
|
const styles = {
|
|
23169
23024
|
height: `${Number(radius) * 2}px`,
|
|
@@ -23171,13 +23026,13 @@ const CircleProgress = (props) => {
|
|
|
23171
23026
|
...style
|
|
23172
23027
|
};
|
|
23173
23028
|
const pathStyle = {
|
|
23174
|
-
stroke:
|
|
23029
|
+
stroke: background
|
|
23175
23030
|
};
|
|
23176
23031
|
const hoverStyle = () => {
|
|
23177
23032
|
const perimeter = 283;
|
|
23178
|
-
const offset = perimeter * Number(
|
|
23033
|
+
const offset = perimeter * Number(percent) / 100;
|
|
23179
23034
|
return {
|
|
23180
|
-
stroke: isObject(
|
|
23035
|
+
stroke: isObject(color) ? `url(#${refRandomId})` : color,
|
|
23181
23036
|
strokeDasharray: `${offset}px ${perimeter}px`
|
|
23182
23037
|
};
|
|
23183
23038
|
};
|
|
@@ -23185,16 +23040,13 @@ const CircleProgress = (props) => {
|
|
|
23185
23040
|
const isWise = clockwise ? 1 : 0;
|
|
23186
23041
|
return `M 50 50 m -45 0 a 45 45 0 1 ${isWise} 90 0 a 45 45 0 1 ${isWise} -90 0`;
|
|
23187
23042
|
};
|
|
23188
|
-
const hoverColor = () => {
|
|
23189
|
-
return isObject(circleColor) ? `url(#${refRandomId})` : circleColor;
|
|
23190
|
-
};
|
|
23191
23043
|
const stop2 = () => {
|
|
23192
|
-
if (!isObject(
|
|
23044
|
+
if (!isObject(props.color)) {
|
|
23193
23045
|
return;
|
|
23194
23046
|
}
|
|
23195
|
-
const
|
|
23196
|
-
const colorArr = Object.keys(
|
|
23197
|
-
(a2,
|
|
23047
|
+
const color2 = props.color;
|
|
23048
|
+
const colorArr = Object.keys(color2).sort(
|
|
23049
|
+
(a2, b) => parseFloat(a2) - parseFloat(b)
|
|
23198
23050
|
);
|
|
23199
23051
|
const stopArr = [];
|
|
23200
23052
|
colorArr.map((item) => {
|
|
@@ -23203,7 +23055,7 @@ const CircleProgress = (props) => {
|
|
|
23203
23055
|
value: ""
|
|
23204
23056
|
};
|
|
23205
23057
|
obj.key = item;
|
|
23206
|
-
obj.value =
|
|
23058
|
+
obj.value = color2[item];
|
|
23207
23059
|
stopArr.push(obj);
|
|
23208
23060
|
});
|
|
23209
23061
|
return stopArr;
|
|
@@ -23217,8 +23069,8 @@ const CircleProgress = (props) => {
|
|
|
23217
23069
|
"path",
|
|
23218
23070
|
{
|
|
23219
23071
|
className: "nut-circleprogress-path",
|
|
23220
|
-
style: pathStyle,
|
|
23221
23072
|
d: path(),
|
|
23073
|
+
style: pathStyle,
|
|
23222
23074
|
fill: "none",
|
|
23223
23075
|
strokeWidth
|
|
23224
23076
|
}
|
|
@@ -23230,17 +23082,13 @@ const CircleProgress = (props) => {
|
|
|
23230
23082
|
style: hoverStyle(),
|
|
23231
23083
|
d: path(),
|
|
23232
23084
|
fill: "none",
|
|
23233
|
-
stroke: hoverColor(),
|
|
23234
23085
|
strokeLinecap,
|
|
23235
23086
|
transform: "rotate(90,50,50)",
|
|
23236
23087
|
strokeWidth
|
|
23237
23088
|
}
|
|
23238
23089
|
)
|
|
23239
23090
|
] }),
|
|
23240
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-circleprogress-text", children
|
|
23241
|
-
progress,
|
|
23242
|
-
"%"
|
|
23243
|
-
] }) })
|
|
23091
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-circleprogress-text", children })
|
|
23244
23092
|
] });
|
|
23245
23093
|
};
|
|
23246
23094
|
CircleProgress.defaultProps = defaultProps$n;
|
|
@@ -23641,6 +23489,7 @@ const CountDown = React__default.forwardRef(InternalCountDown);
|
|
|
23641
23489
|
CountDown.defaultProps = defaultProps$k;
|
|
23642
23490
|
CountDown.displayName = "NutCountDown";
|
|
23643
23491
|
const defaultProps$j = {
|
|
23492
|
+
...ComponentDefaults,
|
|
23644
23493
|
content: "",
|
|
23645
23494
|
direction: "end",
|
|
23646
23495
|
rows: 1,
|
|
@@ -23649,12 +23498,13 @@ const defaultProps$j = {
|
|
|
23649
23498
|
symbol: "...",
|
|
23650
23499
|
lineHeight: "20"
|
|
23651
23500
|
};
|
|
23501
|
+
const classPrefix$1 = `nut-ellipsis`;
|
|
23652
23502
|
const Ellipsis = (props) => {
|
|
23653
23503
|
var _a2, _b;
|
|
23654
|
-
useConfig();
|
|
23655
23504
|
const {
|
|
23656
23505
|
children,
|
|
23657
23506
|
content,
|
|
23507
|
+
className,
|
|
23658
23508
|
direction,
|
|
23659
23509
|
rows,
|
|
23660
23510
|
expandText,
|
|
@@ -23662,7 +23512,8 @@ const Ellipsis = (props) => {
|
|
|
23662
23512
|
symbol,
|
|
23663
23513
|
lineHeight,
|
|
23664
23514
|
onClick,
|
|
23665
|
-
onChange
|
|
23515
|
+
onChange,
|
|
23516
|
+
...rest
|
|
23666
23517
|
} = { ...defaultProps$j, ...props };
|
|
23667
23518
|
let container = null;
|
|
23668
23519
|
let maxHeight = 0;
|
|
@@ -23670,10 +23521,8 @@ const Ellipsis = (props) => {
|
|
|
23670
23521
|
const [expanded, setExpanded] = useState(false);
|
|
23671
23522
|
const ellipsis = useRef();
|
|
23672
23523
|
const root2 = useRef(null);
|
|
23524
|
+
const classes = classNames(classPrefix$1, className);
|
|
23673
23525
|
useLayoutEffect(() => {
|
|
23674
|
-
createContainer();
|
|
23675
|
-
}, []);
|
|
23676
|
-
useEffect(() => {
|
|
23677
23526
|
if (content) {
|
|
23678
23527
|
createContainer();
|
|
23679
23528
|
}
|
|
@@ -23791,7 +23640,7 @@ const Ellipsis = (props) => {
|
|
|
23791
23640
|
const handleClick2 = () => {
|
|
23792
23641
|
onClick && onClick();
|
|
23793
23642
|
};
|
|
23794
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className:
|
|
23643
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes, onClick: handleClick2, ref: root2, ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
23795
23644
|
!exceeded ? content : null,
|
|
23796
23645
|
exceeded && !expanded ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
23797
23646
|
(_a2 = ellipsis.current) == null ? void 0 : _a2.leading,
|