@nutui/nutui-react 2.0.0-alpha.4 → 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 +15 -0
- package/dist/esm/Avatar.js +30 -25
- package/dist/esm/AvatarGroup.js +10 -15
- package/dist/esm/Checkbox.js +1 -2
- package/dist/esm/CheckboxGroup.js +18 -20
- package/dist/esm/Ellipsis.js +13 -12
- package/dist/esm/Empty.js +18 -26
- 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/cellgroup2.js +5 -4
- package/dist/esm/checkbox2.js +34 -47
- 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 +306 -250
- package/dist/nutui.react.umd.js +306 -250
- package/dist/packages/cellgroup/cellgroup.scss +20 -16
- package/dist/packages/checkbox/checkbox.scss +8 -11
- package/dist/packages/empty/empty.scss +0 -9
- package/dist/packages/tabbar/tabbar.scss +1 -0
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/themes/default.scss +0 -1
- package/dist/types/index.d.ts +34 -46
- 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
|
}
|
|
@@ -12439,7 +12493,7 @@ const defaultProps$14 = {
|
|
|
12439
12493
|
duration: 300,
|
|
12440
12494
|
autoHeight: false
|
|
12441
12495
|
};
|
|
12442
|
-
const classPrefix$
|
|
12496
|
+
const classPrefix$a = "nut-tabs";
|
|
12443
12497
|
const Tabs = (props) => {
|
|
12444
12498
|
const {
|
|
12445
12499
|
activeColor,
|
|
@@ -12518,14 +12572,14 @@ const Tabs = (props) => {
|
|
|
12518
12572
|
};
|
|
12519
12573
|
const titles = useRef(getTitles());
|
|
12520
12574
|
const classes = classNames(
|
|
12521
|
-
classPrefix$
|
|
12522
|
-
`${classPrefix$
|
|
12575
|
+
classPrefix$a,
|
|
12576
|
+
`${classPrefix$a}--${direction}`,
|
|
12523
12577
|
className
|
|
12524
12578
|
);
|
|
12525
|
-
const classesTitle = classNames(`${classPrefix$
|
|
12526
|
-
[`${classPrefix$
|
|
12527
|
-
[`${classPrefix$
|
|
12528
|
-
[`${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
|
|
12529
12583
|
});
|
|
12530
12584
|
const tabsActiveStyle = {
|
|
12531
12585
|
color: activeType === "smile" ? activeColor : "",
|
|
@@ -12554,7 +12608,7 @@ const Tabs = (props) => {
|
|
|
12554
12608
|
onClick: (e) => {
|
|
12555
12609
|
tabChange(item);
|
|
12556
12610
|
},
|
|
12557
|
-
className: classNames(`${classPrefix$
|
|
12611
|
+
className: classNames(`${classPrefix$a}__titles-item`, {
|
|
12558
12612
|
[`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
|
|
12559
12613
|
[`nut-tabs__titles-item--disabled`]: item.disabled,
|
|
12560
12614
|
[`nut-tabs__titles-item--${align}`]: align
|
|
@@ -12564,14 +12618,14 @@ const Tabs = (props) => {
|
|
|
12564
12618
|
activeType === "line" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12565
12619
|
"div",
|
|
12566
12620
|
{
|
|
12567
|
-
className: `${classPrefix$
|
|
12621
|
+
className: `${classPrefix$a}__titles-item__line`,
|
|
12568
12622
|
style: tabsActiveStyle
|
|
12569
12623
|
}
|
|
12570
12624
|
),
|
|
12571
12625
|
activeType === "smile" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12572
12626
|
"div",
|
|
12573
12627
|
{
|
|
12574
|
-
className: `${classPrefix$
|
|
12628
|
+
className: `${classPrefix$a}__titles-item__smile`,
|
|
12575
12629
|
style: tabsActiveStyle,
|
|
12576
12630
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(x$7, { color: activeColor, width: 40, height: 20 })
|
|
12577
12631
|
}
|
|
@@ -12583,7 +12637,7 @@ const Tabs = (props) => {
|
|
|
12583
12637
|
{
|
|
12584
12638
|
ellipsis: true
|
|
12585
12639
|
},
|
|
12586
|
-
`${classPrefix$
|
|
12640
|
+
`${classPrefix$a}__titles-item__text`
|
|
12587
12641
|
),
|
|
12588
12642
|
children: item.title
|
|
12589
12643
|
}
|
|
@@ -12593,7 +12647,7 @@ const Tabs = (props) => {
|
|
|
12593
12647
|
item.value
|
|
12594
12648
|
);
|
|
12595
12649
|
}) }),
|
|
12596
|
-
/* @__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) => {
|
|
12597
12651
|
if (!React__default.isValidElement(child)) {
|
|
12598
12652
|
return null;
|
|
12599
12653
|
}
|
|
@@ -14244,7 +14298,7 @@ const InternalCascaderItem = (props, ref) => {
|
|
|
14244
14298
|
},
|
|
14245
14299
|
children: [
|
|
14246
14300
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classesTitle, children: data.text }),
|
|
14247
|
-
data.loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(k$
|
|
14301
|
+
data.loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(k$3, { color: "#969799", className: "nut-cascader-item__icon-loading" }) : renderIcon()
|
|
14248
14302
|
]
|
|
14249
14303
|
}
|
|
14250
14304
|
);
|
|
@@ -14719,18 +14773,17 @@ Cascader.displayName = "NutCascader";
|
|
|
14719
14773
|
const CheckboxGroupContext = createContext(null);
|
|
14720
14774
|
const Context = CheckboxGroupContext;
|
|
14721
14775
|
const defaultProps$Y = {
|
|
14722
|
-
disabled: false,
|
|
14723
14776
|
max: void 0,
|
|
14724
|
-
|
|
14777
|
+
labelPosition: "right",
|
|
14725
14778
|
direction: "vertical",
|
|
14726
14779
|
onChange: (value) => {
|
|
14727
14780
|
},
|
|
14728
14781
|
options: []
|
|
14729
14782
|
};
|
|
14783
|
+
const classPrefix$9 = "nut-checkboxgroup";
|
|
14730
14784
|
const CheckboxGroup = React__default.forwardRef(
|
|
14731
14785
|
(props, ref) => {
|
|
14732
14786
|
const { children } = { ...defaultProps$Y, ...props };
|
|
14733
|
-
const b = cn("checkboxgroup");
|
|
14734
14787
|
const {
|
|
14735
14788
|
className,
|
|
14736
14789
|
disabled,
|
|
@@ -14738,29 +14791,29 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
14738
14791
|
value,
|
|
14739
14792
|
defaultValue,
|
|
14740
14793
|
max,
|
|
14741
|
-
|
|
14794
|
+
labelPosition,
|
|
14742
14795
|
direction,
|
|
14743
14796
|
options: options2,
|
|
14744
14797
|
...rest
|
|
14745
14798
|
} = props;
|
|
14746
14799
|
useImperativeHandle(ref, () => ({
|
|
14747
|
-
|
|
14800
|
+
toggle(state) {
|
|
14748
14801
|
if (state === false) {
|
|
14749
14802
|
setValue([]);
|
|
14750
14803
|
} else {
|
|
14751
14804
|
const childrenLabel = [];
|
|
14752
14805
|
React__default.Children.map(children, (child) => {
|
|
14753
14806
|
const childProps = child.props;
|
|
14754
|
-
childrenLabel.push(childProps.
|
|
14807
|
+
childrenLabel.push(childProps.value);
|
|
14755
14808
|
});
|
|
14756
14809
|
setValue(childrenLabel);
|
|
14757
14810
|
}
|
|
14758
14811
|
},
|
|
14759
|
-
|
|
14812
|
+
reverse() {
|
|
14760
14813
|
const childrenLabel = [];
|
|
14761
14814
|
React__default.Children.map(children, (child) => {
|
|
14762
14815
|
const childProps = child.props;
|
|
14763
|
-
childrenLabel.push(childProps.
|
|
14816
|
+
childrenLabel.push(childProps.value);
|
|
14764
14817
|
});
|
|
14765
14818
|
const reverse = childrenLabel.filter(
|
|
14766
14819
|
(c) => (_value == null ? void 0 : _value.findIndex((v) => v === c)) === -1
|
|
@@ -14779,8 +14832,9 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
14779
14832
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
14780
14833
|
Checkbox,
|
|
14781
14834
|
{
|
|
14782
|
-
|
|
14783
|
-
|
|
14835
|
+
label,
|
|
14836
|
+
disabled: disabled2,
|
|
14837
|
+
value: value2,
|
|
14784
14838
|
...rest2
|
|
14785
14839
|
},
|
|
14786
14840
|
value2 == null ? void 0 : value2.toString()
|
|
@@ -14791,25 +14845,26 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
14791
14845
|
Context.Provider,
|
|
14792
14846
|
{
|
|
14793
14847
|
value: {
|
|
14794
|
-
|
|
14848
|
+
labelPosition: labelPosition || "right",
|
|
14795
14849
|
disabled,
|
|
14796
14850
|
max,
|
|
14797
|
-
|
|
14851
|
+
value: _value,
|
|
14798
14852
|
check: (value2) => {
|
|
14799
14853
|
const combined = [..._value, value2];
|
|
14800
14854
|
setValue(combined);
|
|
14801
|
-
onChange && onChange(combined);
|
|
14802
14855
|
},
|
|
14803
14856
|
uncheck: (value2) => {
|
|
14804
14857
|
const reduced = _value.filter((item) => item !== value2);
|
|
14805
14858
|
setValue(reduced);
|
|
14806
|
-
onChange && onChange(reduced);
|
|
14807
14859
|
}
|
|
14808
14860
|
},
|
|
14809
14861
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
14810
14862
|
"div",
|
|
14811
14863
|
{
|
|
14812
|
-
className:
|
|
14864
|
+
className: classNames(classPrefix$9, {
|
|
14865
|
+
[`nut-checkboxgroup--${props.direction}`]: props.direction,
|
|
14866
|
+
className
|
|
14867
|
+
}),
|
|
14813
14868
|
...rest,
|
|
14814
14869
|
children: (options2 == null ? void 0 : options2.length) ? renderOptions() : children
|
|
14815
14870
|
}
|
|
@@ -14823,107 +14878,112 @@ CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
|
14823
14878
|
const defaultProps$X = {
|
|
14824
14879
|
...ComponentDefaults,
|
|
14825
14880
|
disabled: false,
|
|
14826
|
-
|
|
14827
|
-
|
|
14828
|
-
|
|
14829
|
-
|
|
14830
|
-
|
|
14831
|
-
iconFontClassName: "nutui-iconfont",
|
|
14832
|
-
indeterminateIcon: "check-disabled",
|
|
14833
|
-
onChange: (state) => {
|
|
14881
|
+
labelPosition: "right",
|
|
14882
|
+
icon: null,
|
|
14883
|
+
activeIcon: null,
|
|
14884
|
+
indeterminateIcon: null,
|
|
14885
|
+
onChange: (value) => {
|
|
14834
14886
|
}
|
|
14835
14887
|
};
|
|
14888
|
+
const classPrefix$8 = "nut-checkbox";
|
|
14836
14889
|
const Checkbox = (props) => {
|
|
14837
14890
|
const { children } = {
|
|
14838
14891
|
...defaultProps$X,
|
|
14839
14892
|
...props
|
|
14840
14893
|
};
|
|
14841
|
-
const b = cn("checkbox");
|
|
14842
14894
|
const {
|
|
14843
14895
|
icon,
|
|
14844
|
-
iconSize,
|
|
14845
14896
|
label,
|
|
14846
14897
|
className,
|
|
14847
|
-
|
|
14898
|
+
activeIcon,
|
|
14848
14899
|
checked,
|
|
14900
|
+
value,
|
|
14849
14901
|
defaultChecked,
|
|
14850
14902
|
disabled,
|
|
14851
14903
|
onChange,
|
|
14852
14904
|
indeterminate,
|
|
14853
|
-
iconClassPrefix,
|
|
14854
|
-
iconFontClassName,
|
|
14855
14905
|
indeterminateIcon,
|
|
14856
14906
|
...others
|
|
14857
14907
|
} = props;
|
|
14858
|
-
let {
|
|
14908
|
+
let { labelPosition, ...rest } = others;
|
|
14859
14909
|
const ctx2 = useContext(Context);
|
|
14860
|
-
let [
|
|
14910
|
+
let [innerChecked, setChecked] = usePropsValue({
|
|
14861
14911
|
value: props.checked,
|
|
14862
14912
|
defaultValue: props.defaultChecked,
|
|
14863
14913
|
finalValue: defaultChecked,
|
|
14864
14914
|
onChange
|
|
14865
14915
|
});
|
|
14866
14916
|
let [innerDisabled, setDisabled] = useState(disabled);
|
|
14867
|
-
const [
|
|
14917
|
+
const [innerIndeterminate, setIndeterminate] = useState(indeterminate);
|
|
14868
14918
|
useEffect(() => {
|
|
14869
|
-
!ctx2 && setChecked(checked);
|
|
14870
14919
|
setDisabled(disabled);
|
|
14920
|
+
}, [disabled]);
|
|
14921
|
+
useEffect(() => {
|
|
14871
14922
|
setIndeterminate(indeterminate);
|
|
14872
|
-
}, [
|
|
14923
|
+
}, [indeterminate]);
|
|
14873
14924
|
if (ctx2) {
|
|
14874
|
-
if (ctx2.
|
|
14875
|
-
|
|
14925
|
+
if (ctx2.labelPosition !== void 0) {
|
|
14926
|
+
labelPosition = ctx2.labelPosition;
|
|
14876
14927
|
}
|
|
14877
|
-
innerDisabled = ctx2.disabled;
|
|
14878
|
-
|
|
14928
|
+
innerDisabled = ctx2.disabled !== void 0 ? ctx2.disabled : innerDisabled;
|
|
14929
|
+
innerChecked = ctx2.value.includes(value);
|
|
14879
14930
|
setChecked = (checked2) => {
|
|
14880
14931
|
if (ctx2.disabled)
|
|
14881
14932
|
return;
|
|
14882
14933
|
if (checked2)
|
|
14883
|
-
ctx2.check(
|
|
14934
|
+
ctx2.check(value);
|
|
14884
14935
|
if (!checked2)
|
|
14885
|
-
ctx2.uncheck(
|
|
14936
|
+
ctx2.uncheck(value);
|
|
14886
14937
|
};
|
|
14887
14938
|
}
|
|
14888
14939
|
const renderIcon = () => {
|
|
14889
|
-
if (!
|
|
14890
|
-
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() });
|
|
14891
14942
|
}
|
|
14892
|
-
if (
|
|
14893
|
-
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() });
|
|
14894
14945
|
}
|
|
14895
|
-
return React__default.isValidElement(
|
|
14946
|
+
return React__default.isValidElement(activeIcon) ? activeIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(x$d, { className: color() });
|
|
14896
14947
|
};
|
|
14897
14948
|
const color = () => {
|
|
14898
14949
|
if (innerDisabled) {
|
|
14899
|
-
return
|
|
14950
|
+
return `${classPrefix$8}__icon--disable`;
|
|
14900
14951
|
}
|
|
14901
|
-
if (
|
|
14902
|
-
if (
|
|
14903
|
-
return
|
|
14952
|
+
if (innerChecked) {
|
|
14953
|
+
if (innerIndeterminate) {
|
|
14954
|
+
return `${classPrefix$8}__icon--indeterminate`;
|
|
14904
14955
|
}
|
|
14905
|
-
return
|
|
14956
|
+
return `${classPrefix$8}__icon`;
|
|
14906
14957
|
}
|
|
14907
|
-
return
|
|
14958
|
+
return `${classPrefix$8}__icon--unchecked`;
|
|
14908
14959
|
};
|
|
14909
14960
|
const renderLabel = () => {
|
|
14910
|
-
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
|
+
);
|
|
14911
14970
|
};
|
|
14912
14971
|
const handleClick2 = () => {
|
|
14913
14972
|
if (disabled)
|
|
14914
14973
|
return;
|
|
14915
|
-
const latestChecked = !
|
|
14974
|
+
const latestChecked = !innerChecked;
|
|
14916
14975
|
if (ctx2 && ctx2.max !== void 0) {
|
|
14917
|
-
if (latestChecked && ctx2.
|
|
14976
|
+
if (latestChecked && ctx2.value.length >= ctx2.max)
|
|
14918
14977
|
return;
|
|
14919
14978
|
}
|
|
14920
|
-
onChange && onChange(latestChecked, label || children);
|
|
14921
14979
|
setChecked(latestChecked);
|
|
14922
14980
|
};
|
|
14923
14981
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
14924
14982
|
"div",
|
|
14925
14983
|
{
|
|
14926
|
-
className:
|
|
14984
|
+
className: classNames(classPrefix$8, className, {
|
|
14985
|
+
[`${classPrefix$8}--reverse`]: labelPosition === "left"
|
|
14986
|
+
}),
|
|
14927
14987
|
...rest,
|
|
14928
14988
|
onClick: handleClick2,
|
|
14929
14989
|
children: [
|
|
@@ -17352,7 +17412,7 @@ const defaultProps$S = {
|
|
|
17352
17412
|
digits: 0,
|
|
17353
17413
|
async: false
|
|
17354
17414
|
};
|
|
17355
|
-
const classPrefix$
|
|
17415
|
+
const classPrefix$7 = `nut-inputnumber`;
|
|
17356
17416
|
const InputNumber = (props) => {
|
|
17357
17417
|
const {
|
|
17358
17418
|
children,
|
|
@@ -17395,8 +17455,8 @@ const InputNumber = (props) => {
|
|
|
17395
17455
|
}, []);
|
|
17396
17456
|
const classes = classNames(
|
|
17397
17457
|
{
|
|
17398
|
-
[`${classPrefix$
|
|
17399
|
-
[`${classPrefix$
|
|
17458
|
+
[`${classPrefix$7}`]: true,
|
|
17459
|
+
[`${classPrefix$7}--disabled`]: disabled
|
|
17400
17460
|
},
|
|
17401
17461
|
className
|
|
17402
17462
|
);
|
|
@@ -18605,7 +18665,7 @@ const Toast = {
|
|
|
18605
18665
|
},
|
|
18606
18666
|
loading(msg, option = {}) {
|
|
18607
18667
|
errorMsg$1(msg);
|
|
18608
|
-
return notice$1({ msg, icon: /* @__PURE__ */ jsxRuntimeExports.jsx(k$
|
|
18668
|
+
return notice$1({ msg, icon: /* @__PURE__ */ jsxRuntimeExports.jsx(k$3, {}), type: "loading", ...option });
|
|
18609
18669
|
},
|
|
18610
18670
|
warn(msg, option = {}) {
|
|
18611
18671
|
errorMsg$1(msg);
|
|
@@ -20327,7 +20387,7 @@ const InternalUploader = (props, ref) => {
|
|
|
20327
20387
|
),
|
|
20328
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: [
|
|
20329
20389
|
item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(x$8, { color: "#fff" }) : item.loadingIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20330
|
-
k$
|
|
20390
|
+
k$3,
|
|
20331
20391
|
{
|
|
20332
20392
|
className: "nut-icon-loading",
|
|
20333
20393
|
color: "#fff"
|
|
@@ -20895,25 +20955,29 @@ const defaultStatus = {
|
|
|
20895
20955
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
20896
20956
|
};
|
|
20897
20957
|
const defaultProps$A = {
|
|
20958
|
+
...ComponentDefaults,
|
|
20898
20959
|
description: "",
|
|
20899
|
-
image: "empty",
|
|
20900
20960
|
imageSize: "",
|
|
20901
|
-
|
|
20961
|
+
status: "empty"
|
|
20902
20962
|
};
|
|
20963
|
+
const classPrefix$6 = `nut-empty`;
|
|
20903
20964
|
const Empty = (props) => {
|
|
20904
20965
|
const { locale } = useConfig();
|
|
20905
|
-
const {
|
|
20966
|
+
const {
|
|
20967
|
+
image,
|
|
20968
|
+
imageSize,
|
|
20969
|
+
description,
|
|
20970
|
+
children,
|
|
20971
|
+
className,
|
|
20972
|
+
status,
|
|
20973
|
+
...rest
|
|
20974
|
+
} = {
|
|
20906
20975
|
...defaultProps$A,
|
|
20907
20976
|
...props
|
|
20908
20977
|
};
|
|
20909
20978
|
const [imgStyle, setImgStyle] = useState({});
|
|
20910
|
-
const
|
|
20911
|
-
|
|
20912
|
-
if (typeof image === "string") {
|
|
20913
|
-
const isHttpUrl = image.startsWith("https://") || image.startsWith("http://") || image.startsWith("//");
|
|
20914
|
-
const imageUrl = isHttpUrl ? image : defaultStatus[image];
|
|
20915
|
-
imageNode = /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "img", src: imageUrl, alt: "empty" });
|
|
20916
|
-
}
|
|
20979
|
+
const imageUrl = image || defaultStatus[status];
|
|
20980
|
+
const imageNode = typeof imageUrl === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "img", src: imageUrl, alt: "empty" }) : imageUrl;
|
|
20917
20981
|
useEffect(() => {
|
|
20918
20982
|
setImgStyle(() => {
|
|
20919
20983
|
if (!imageSize) {
|
|
@@ -20931,9 +20995,9 @@ const Empty = (props) => {
|
|
|
20931
20995
|
};
|
|
20932
20996
|
});
|
|
20933
20997
|
}, [imageSize]);
|
|
20934
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${
|
|
20935
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className:
|
|
20936
|
-
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,
|
|
20937
21001
|
children
|
|
20938
21002
|
] }) });
|
|
20939
21003
|
};
|
|
@@ -22122,29 +22186,30 @@ const AvatarContext = createContext({});
|
|
|
22122
22186
|
const defaultProps$v = {
|
|
22123
22187
|
...ComponentDefaults,
|
|
22124
22188
|
size: "",
|
|
22189
|
+
shape: "round",
|
|
22125
22190
|
icon: "",
|
|
22126
|
-
|
|
22191
|
+
background: "#eee",
|
|
22127
22192
|
color: "#666",
|
|
22128
|
-
|
|
22129
|
-
|
|
22193
|
+
fit: "cover",
|
|
22194
|
+
src: "",
|
|
22130
22195
|
alt: ""
|
|
22131
22196
|
};
|
|
22197
|
+
const classPrefix$5 = `nut-avatar`;
|
|
22132
22198
|
const Avatar = (props) => {
|
|
22133
22199
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
22134
22200
|
const {
|
|
22135
22201
|
children,
|
|
22136
|
-
prefixCls: prefixCls2,
|
|
22137
22202
|
size,
|
|
22138
22203
|
shape,
|
|
22139
|
-
|
|
22204
|
+
background,
|
|
22140
22205
|
color,
|
|
22141
|
-
|
|
22206
|
+
src,
|
|
22142
22207
|
alt,
|
|
22143
22208
|
icon,
|
|
22209
|
+
fit,
|
|
22144
22210
|
className,
|
|
22145
22211
|
style,
|
|
22146
|
-
|
|
22147
|
-
onActiveAvatar,
|
|
22212
|
+
onClick,
|
|
22148
22213
|
onError,
|
|
22149
22214
|
...rest
|
|
22150
22215
|
} = {
|
|
@@ -22156,24 +22221,23 @@ const Avatar = (props) => {
|
|
|
22156
22221
|
const [avatarIndex, setAvatarIndex] = useState(1);
|
|
22157
22222
|
const avatarRef = useRef(null);
|
|
22158
22223
|
const parent = useContext(AvatarContext);
|
|
22159
|
-
const
|
|
22224
|
+
const sizeValue = ["large", "normal", "small"];
|
|
22160
22225
|
const classes = classNames({
|
|
22161
|
-
[`nut-avatar-${
|
|
22162
|
-
[`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
|
|
22163
22228
|
});
|
|
22164
|
-
const cls = classNames(
|
|
22165
|
-
const sizeValue = ["large", "normal", "small"];
|
|
22229
|
+
const cls = classNames(classPrefix$5, classes, className);
|
|
22166
22230
|
const styles = {
|
|
22167
22231
|
width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
22168
22232
|
height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
22169
|
-
backgroundColor: `${
|
|
22233
|
+
backgroundColor: `${background}`,
|
|
22170
22234
|
color: `${color}`,
|
|
22171
|
-
marginLeft: avatarIndex !== 1 && ((_c = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c.
|
|
22172
|
-
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)}` : "",
|
|
22173
22237
|
...style
|
|
22174
22238
|
};
|
|
22175
22239
|
const maxStyles = {
|
|
22176
|
-
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}`,
|
|
22177
22241
|
color: `${(_g = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _g.maxColor}`
|
|
22178
22242
|
};
|
|
22179
22243
|
useEffect(() => {
|
|
@@ -22191,23 +22255,22 @@ const Avatar = (props) => {
|
|
|
22191
22255
|
}
|
|
22192
22256
|
}
|
|
22193
22257
|
const index = Number((_b2 = (_a3 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a3.dataset) == null ? void 0 : _b2.index);
|
|
22194
|
-
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;
|
|
22195
22259
|
setMaxSum(children2.length);
|
|
22196
22260
|
setAvatarIndex(index);
|
|
22197
22261
|
if (index === children2.length && index !== maxCount && children2.length > maxCount) {
|
|
22198
22262
|
setShowMax(true);
|
|
22199
22263
|
}
|
|
22200
22264
|
};
|
|
22201
|
-
const errorEvent = (
|
|
22265
|
+
const errorEvent = () => {
|
|
22202
22266
|
if (props.onError) {
|
|
22203
|
-
props.onError(
|
|
22267
|
+
props.onError();
|
|
22204
22268
|
}
|
|
22205
22269
|
};
|
|
22206
22270
|
const clickAvatar = (e) => {
|
|
22207
|
-
|
|
22208
|
-
onActiveAvatar && onActiveAvatar(e);
|
|
22271
|
+
onClick && onClick(e);
|
|
22209
22272
|
};
|
|
22210
|
-
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(
|
|
22211
22274
|
"div",
|
|
22212
22275
|
{
|
|
22213
22276
|
className: cls,
|
|
@@ -22216,13 +22279,14 @@ const Avatar = (props) => {
|
|
|
22216
22279
|
onClick: clickAvatar,
|
|
22217
22280
|
ref: avatarRef,
|
|
22218
22281
|
children: [
|
|
22219
|
-
(!((_j = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _j.
|
|
22220
|
-
|
|
22221
|
-
|
|
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,
|
|
22222
22285
|
{
|
|
22223
22286
|
className: "avatar-img",
|
|
22224
|
-
src
|
|
22287
|
+
src,
|
|
22225
22288
|
alt,
|
|
22289
|
+
style: { objectFit: fit },
|
|
22226
22290
|
onError: errorEvent
|
|
22227
22291
|
}
|
|
22228
22292
|
),
|
|
@@ -22230,9 +22294,10 @@ const Avatar = (props) => {
|
|
|
22230
22294
|
...icon.props,
|
|
22231
22295
|
className: `${icon.props.className || ""} icon`
|
|
22232
22296
|
}) : null,
|
|
22233
|
-
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" })
|
|
22234
22299
|
] }),
|
|
22235
|
-
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)}` })
|
|
22236
22301
|
]
|
|
22237
22302
|
}
|
|
22238
22303
|
) });
|
|
@@ -22302,7 +22367,7 @@ const Skeleton = (props) => {
|
|
|
22302
22367
|
Avatar,
|
|
22303
22368
|
{
|
|
22304
22369
|
className: avatarClass,
|
|
22305
|
-
|
|
22370
|
+
background: "rgb(239, 239, 239)",
|
|
22306
22371
|
shape: avatarShape,
|
|
22307
22372
|
style: getStyle()
|
|
22308
22373
|
}
|
|
@@ -22335,9 +22400,7 @@ function preventDefault(event, isStopPropagation) {
|
|
|
22335
22400
|
}
|
|
22336
22401
|
}
|
|
22337
22402
|
const defaultProps$t = {
|
|
22338
|
-
name: ""
|
|
22339
|
-
leftWidth: 0,
|
|
22340
|
-
rightWidth: 0
|
|
22403
|
+
name: ""
|
|
22341
22404
|
};
|
|
22342
22405
|
const Swipe = forwardRef((props, instanceRef) => {
|
|
22343
22406
|
const swipeBem = cn("swipe");
|
|
@@ -22359,14 +22422,8 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
22359
22422
|
transform: `translate3d(${state.offset}px, 0, 0)`,
|
|
22360
22423
|
transitionDuration: state.dragging ? "0s" : ".6s"
|
|
22361
22424
|
};
|
|
22362
|
-
const leftWidth =
|
|
22363
|
-
|
|
22364
|
-
[props.leftWidth, actionWidth.left]
|
|
22365
|
-
);
|
|
22366
|
-
const rightWidth = useMemo(
|
|
22367
|
-
() => props.rightWidth ? props.rightWidth : actionWidth.right,
|
|
22368
|
-
[props.rightWidth, actionWidth.right]
|
|
22369
|
-
);
|
|
22425
|
+
const leftWidth = actionWidth.left;
|
|
22426
|
+
const rightWidth = actionWidth.right;
|
|
22370
22427
|
const onTouchStart = (event) => {
|
|
22371
22428
|
if (!props.disabled) {
|
|
22372
22429
|
startOffset.current = state.offset;
|
|
@@ -22530,7 +22587,7 @@ const defaultProps$s = {
|
|
|
22530
22587
|
onClick: (event) => {
|
|
22531
22588
|
}
|
|
22532
22589
|
};
|
|
22533
|
-
const classPrefix$
|
|
22590
|
+
const classPrefix$4 = `nut-animate`;
|
|
22534
22591
|
const Animate = (props) => {
|
|
22535
22592
|
const { className, type: type4, action, loop: loop2, onClick, children, ...rest } = {
|
|
22536
22593
|
...defaultProps$s,
|
|
@@ -22539,7 +22596,7 @@ const Animate = (props) => {
|
|
|
22539
22596
|
const [clicked, setClicked] = useState(false);
|
|
22540
22597
|
const classes = classNames({
|
|
22541
22598
|
"nut-ani-container": true,
|
|
22542
|
-
[`${classPrefix$
|
|
22599
|
+
[`${classPrefix$4}-${type4}`]: action === "initial" || clicked ? type4 : false,
|
|
22543
22600
|
loop: loop2
|
|
22544
22601
|
});
|
|
22545
22602
|
const cls = classNames(classes, className);
|
|
@@ -22911,22 +22968,20 @@ const Audio = (props) => {
|
|
|
22911
22968
|
Audio.defaultProps = defaultProps$p;
|
|
22912
22969
|
Audio.displayName = "NutAudio";
|
|
22913
22970
|
const defaultProps$o = {
|
|
22971
|
+
...ComponentDefaults,
|
|
22914
22972
|
maxContent: "",
|
|
22915
|
-
|
|
22916
|
-
|
|
22973
|
+
max: "",
|
|
22974
|
+
maxBackground: "#eee",
|
|
22917
22975
|
maxColor: "#666",
|
|
22918
|
-
|
|
22919
|
-
|
|
22920
|
-
span: "-8",
|
|
22921
|
-
zIndex: "left"
|
|
22976
|
+
gap: "-8",
|
|
22977
|
+
level: "left"
|
|
22922
22978
|
};
|
|
22979
|
+
const classPrefix$3 = `nut-avatar-group`;
|
|
22923
22980
|
const AvatarGroup = (props) => {
|
|
22924
|
-
useConfig();
|
|
22925
22981
|
const propAvatarGroup = { ...defaultProps$o, ...props };
|
|
22926
22982
|
const { className, style, children } = propAvatarGroup;
|
|
22927
22983
|
const avatarGroupRef = useRef(null);
|
|
22928
|
-
const
|
|
22929
|
-
const cls = classNames(b(""), className);
|
|
22984
|
+
const cls = classNames(classPrefix$3, className);
|
|
22930
22985
|
const parentAvatar = {
|
|
22931
22986
|
propAvatarGroup,
|
|
22932
22987
|
avatarGroupRef
|
|
@@ -22944,7 +22999,7 @@ const defaultProps$n = {
|
|
|
22944
22999
|
background: "#e5e9f2",
|
|
22945
23000
|
clockwise: true
|
|
22946
23001
|
};
|
|
22947
|
-
const classPrefix$
|
|
23002
|
+
const classPrefix$2 = `nut-circleprogress`;
|
|
22948
23003
|
const CircleProgress = (props) => {
|
|
22949
23004
|
var _a2;
|
|
22950
23005
|
const {
|
|
@@ -22963,7 +23018,7 @@ const CircleProgress = (props) => {
|
|
|
22963
23018
|
...defaultProps$n,
|
|
22964
23019
|
...props
|
|
22965
23020
|
};
|
|
22966
|
-
const classes = classNames(className, classPrefix$
|
|
23021
|
+
const classes = classNames(className, classPrefix$2);
|
|
22967
23022
|
const refRandomId = Math.random().toString(36).slice(-8);
|
|
22968
23023
|
const styles = {
|
|
22969
23024
|
height: `${Number(radius) * 2}px`,
|
|
@@ -23434,6 +23489,7 @@ const CountDown = React__default.forwardRef(InternalCountDown);
|
|
|
23434
23489
|
CountDown.defaultProps = defaultProps$k;
|
|
23435
23490
|
CountDown.displayName = "NutCountDown";
|
|
23436
23491
|
const defaultProps$j = {
|
|
23492
|
+
...ComponentDefaults,
|
|
23437
23493
|
content: "",
|
|
23438
23494
|
direction: "end",
|
|
23439
23495
|
rows: 1,
|
|
@@ -23442,12 +23498,13 @@ const defaultProps$j = {
|
|
|
23442
23498
|
symbol: "...",
|
|
23443
23499
|
lineHeight: "20"
|
|
23444
23500
|
};
|
|
23501
|
+
const classPrefix$1 = `nut-ellipsis`;
|
|
23445
23502
|
const Ellipsis = (props) => {
|
|
23446
23503
|
var _a2, _b;
|
|
23447
|
-
useConfig();
|
|
23448
23504
|
const {
|
|
23449
23505
|
children,
|
|
23450
23506
|
content,
|
|
23507
|
+
className,
|
|
23451
23508
|
direction,
|
|
23452
23509
|
rows,
|
|
23453
23510
|
expandText,
|
|
@@ -23455,7 +23512,8 @@ const Ellipsis = (props) => {
|
|
|
23455
23512
|
symbol,
|
|
23456
23513
|
lineHeight,
|
|
23457
23514
|
onClick,
|
|
23458
|
-
onChange
|
|
23515
|
+
onChange,
|
|
23516
|
+
...rest
|
|
23459
23517
|
} = { ...defaultProps$j, ...props };
|
|
23460
23518
|
let container = null;
|
|
23461
23519
|
let maxHeight = 0;
|
|
@@ -23463,10 +23521,8 @@ const Ellipsis = (props) => {
|
|
|
23463
23521
|
const [expanded, setExpanded] = useState(false);
|
|
23464
23522
|
const ellipsis = useRef();
|
|
23465
23523
|
const root2 = useRef(null);
|
|
23524
|
+
const classes = classNames(classPrefix$1, className);
|
|
23466
23525
|
useLayoutEffect(() => {
|
|
23467
|
-
createContainer();
|
|
23468
|
-
}, []);
|
|
23469
|
-
useEffect(() => {
|
|
23470
23526
|
if (content) {
|
|
23471
23527
|
createContainer();
|
|
23472
23528
|
}
|
|
@@ -23584,7 +23640,7 @@ const Ellipsis = (props) => {
|
|
|
23584
23640
|
const handleClick2 = () => {
|
|
23585
23641
|
onClick && onClick();
|
|
23586
23642
|
};
|
|
23587
|
-
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: [
|
|
23588
23644
|
!exceeded ? content : null,
|
|
23589
23645
|
exceeded && !expanded ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
23590
23646
|
(_a2 = ellipsis.current) == null ? void 0 : _a2.leading,
|