@nutui/nutui-react 3.0.0-beta.4 → 3.0.0-beta.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/dist/cjs/packages/card/style/card.scss +3 -18
- package/dist/cjs/packages/card/style/style.css +3 -13
- package/dist/cjs/packages/configprovider/types.d.ts +1 -1
- package/dist/cjs/packages/grid/grid.js +2 -6
- package/dist/cjs/packages/grid/style/grid.scss +2 -2
- package/dist/cjs/packages/grid/style/style.css +8 -6
- package/dist/cjs/packages/griditem/griditem.js +12 -6
- package/dist/cjs/packages/griditem/style/griditem.scss +6 -4
- package/dist/cjs/packages/griditem/style/style.css +6 -4
- package/dist/cjs/packages/imagepreview/style/imagepreview.scss +4 -0
- package/dist/cjs/packages/imagepreview/style/style.css +3 -0
- package/dist/cjs/packages/resultpage/resultpage.js +23 -17
- package/dist/cjs/packages/resultpage/style/resultpage.scss +5 -3
- package/dist/cjs/packages/resultpage/style/style.css +10 -8
- package/dist/cjs/packages/resultpage/types.d.ts +1 -1
- package/dist/es/packages/card/card.d.ts +11 -55
- package/dist/es/packages/card/style/card.scss +3 -18
- package/dist/es/packages/card/style/style.css +3 -13
- package/dist/es/packages/configprovider/types.d.ts +1 -1
- package/dist/es/packages/grid/grid.js +2 -6
- package/dist/es/packages/grid/style/grid.scss +2 -2
- package/dist/es/packages/grid/style/style.css +8 -6
- package/dist/es/packages/griditem/griditem.js +12 -6
- package/dist/es/packages/griditem/style/griditem.scss +6 -4
- package/dist/es/packages/griditem/style/style.css +6 -4
- package/dist/es/packages/imagepreview/imagepreview.d.ts +14 -70
- package/dist/es/packages/imagepreview/style/imagepreview.scss +4 -0
- package/dist/es/packages/imagepreview/style/style.css +3 -0
- package/dist/es/packages/resultpage/resultpage.js +23 -16
- package/dist/es/packages/resultpage/style/resultpage.scss +5 -3
- package/dist/es/packages/resultpage/style/style.css +10 -8
- package/dist/es/packages/resultpage/types.d.ts +1 -1
- package/dist/nutui.react.umd.js +95 -41
- package/dist/style.css +1 -1
- package/dist/styles/jd-font.scss +8 -0
- package/dist/styles/themes/default.scss +2 -105
- package/dist/styles/variables.scss +10 -5
- package/package.json +1 -1
package/dist/nutui.react.umd.js
CHANGED
|
@@ -843,7 +843,29 @@ Check the top-level render call using <` + t + ">.");
|
|
|
843
843
|
}
|
|
844
844
|
) });
|
|
845
845
|
};
|
|
846
|
-
const p$
|
|
846
|
+
const p$8 = (o) => {
|
|
847
|
+
const a = { ...dr, ...o };
|
|
848
|
+
return /* @__PURE__ */ gr(mr, { ...a, name: a.name || "Ask", viewBox: "0 0 1024 1024", children: [
|
|
849
|
+
/* @__PURE__ */ xe(
|
|
850
|
+
"path",
|
|
851
|
+
{
|
|
852
|
+
d: "M512 341.33a64 64 0 0 0-64 64h-85.33a149.33 149.33 0 1 1 192 143.15v48.85h-85.34v-128H512a64 64 0 1 0 0-128M576 704a64 64 0 1 1-128 0 64 64 0 0 1 128 0",
|
|
853
|
+
fill: "currentColor",
|
|
854
|
+
fillOpacity: "0.9"
|
|
855
|
+
}
|
|
856
|
+
),
|
|
857
|
+
",",
|
|
858
|
+
/* @__PURE__ */ xe(
|
|
859
|
+
"path",
|
|
860
|
+
{
|
|
861
|
+
d: "M1024 512c0 282.77-229.23 512-512 512S0 794.77 0 512 229.23 0 512 0s512 229.23 512 512m-85.33 0c0-235.65-191.02-426.67-426.67-426.67S85.33 276.35 85.33 512 276.35 938.67 512 938.67 938.67 747.65 938.67 512",
|
|
862
|
+
fill: "currentColor",
|
|
863
|
+
fillOpacity: "0.9"
|
|
864
|
+
}
|
|
865
|
+
)
|
|
866
|
+
] });
|
|
867
|
+
};
|
|
868
|
+
const p$7 = (o) => {
|
|
847
869
|
const r = { ...dr, ...o };
|
|
848
870
|
return /* @__PURE__ */ gr(mr, { ...r, name: r.name || "CheckChecked", viewBox: "0 0 1024 1024", children: [
|
|
849
871
|
/* @__PURE__ */ xe(
|
|
@@ -931,7 +953,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
931
953
|
}
|
|
932
954
|
) });
|
|
933
955
|
};
|
|
934
|
-
const p$
|
|
956
|
+
const p$6 = (r) => {
|
|
935
957
|
const a = { ...dr, ...r };
|
|
936
958
|
return /* @__PURE__ */ gr(mr, { ...a, name: a.name || "Del", viewBox: "0 0 1024 1024", children: [
|
|
937
959
|
/* @__PURE__ */ xe(
|
|
@@ -953,7 +975,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
953
975
|
)
|
|
954
976
|
] });
|
|
955
977
|
};
|
|
956
|
-
const p$
|
|
978
|
+
const p$5 = (a) => {
|
|
957
979
|
const l = { ...dr, ...a };
|
|
958
980
|
return /* @__PURE__ */ gr(mr, { ...l, name: l.name || "Failure", viewBox: "0 0 1024 1024", children: [
|
|
959
981
|
/* @__PURE__ */ xe(
|
|
@@ -975,7 +997,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
975
997
|
)
|
|
976
998
|
] });
|
|
977
999
|
};
|
|
978
|
-
const p$
|
|
1000
|
+
const p$4 = (a) => {
|
|
979
1001
|
const l = { ...dr, ...a };
|
|
980
1002
|
return /* @__PURE__ */ gr(mr, { ...l, name: l.name || "ImageError", viewBox: "0 0 1024 1024", children: [
|
|
981
1003
|
/* @__PURE__ */ xe(
|
|
@@ -997,7 +1019,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
997
1019
|
)
|
|
998
1020
|
] });
|
|
999
1021
|
};
|
|
1000
|
-
const p$
|
|
1022
|
+
const p$3 = (o) => {
|
|
1001
1023
|
const a = { ...dr, ...o };
|
|
1002
1024
|
return /* @__PURE__ */ gr(mr, { ...a, name: a.name || "Image", viewBox: "0 0 1024 1024", children: [
|
|
1003
1025
|
/* @__PURE__ */ xe(
|
|
@@ -1195,7 +1217,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
1195
1217
|
}
|
|
1196
1218
|
) });
|
|
1197
1219
|
};
|
|
1198
|
-
const p$
|
|
1220
|
+
const p$2 = (l) => {
|
|
1199
1221
|
const r = { ...dr, ...l };
|
|
1200
1222
|
return /* @__PURE__ */ gr(mr, { ...r, name: r.name || "Success", viewBox: "0 0 1024 1024", children: [
|
|
1201
1223
|
/* @__PURE__ */ xe(
|
|
@@ -1261,7 +1283,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
1261
1283
|
}
|
|
1262
1284
|
) });
|
|
1263
1285
|
};
|
|
1264
|
-
const p = (o) => {
|
|
1286
|
+
const p$1 = (o) => {
|
|
1265
1287
|
const r = { ...dr, ...o };
|
|
1266
1288
|
return /* @__PURE__ */ xe(mr, { ...r, name: r.name || "TriangleUp", viewBox: "0 0 1024 1024", children: /* @__PURE__ */ xe(
|
|
1267
1289
|
"path",
|
|
@@ -1283,6 +1305,28 @@ Check the top-level render call using <` + t + ">.");
|
|
|
1283
1305
|
}
|
|
1284
1306
|
) });
|
|
1285
1307
|
};
|
|
1308
|
+
const p = (o) => {
|
|
1309
|
+
const r = { ...dr, ...o };
|
|
1310
|
+
return /* @__PURE__ */ gr(mr, { ...r, name: r.name || "Warning", viewBox: "0 0 1024 1024", children: [
|
|
1311
|
+
/* @__PURE__ */ xe(
|
|
1312
|
+
"path",
|
|
1313
|
+
{
|
|
1314
|
+
d: "M469.33 554.67V256h85.34v298.67zM512 640a64 64 0 1 0 0 128 64 64 0 0 0 0-128",
|
|
1315
|
+
fill: "currentColor",
|
|
1316
|
+
fillOpacity: "0.9"
|
|
1317
|
+
}
|
|
1318
|
+
),
|
|
1319
|
+
",",
|
|
1320
|
+
/* @__PURE__ */ xe(
|
|
1321
|
+
"path",
|
|
1322
|
+
{
|
|
1323
|
+
d: "M512 1024c282.77 0 512-229.23 512-512S794.77 0 512 0 0 229.23 0 512s229.23 512 512 512m0-85.33C276.35 938.67 85.33 747.65 85.33 512S276.35 85.33 512 85.33 938.67 276.35 938.67 512 747.65 938.67 512 938.67",
|
|
1324
|
+
fill: "currentColor",
|
|
1325
|
+
fillOpacity: "0.9"
|
|
1326
|
+
}
|
|
1327
|
+
)
|
|
1328
|
+
] });
|
|
1329
|
+
};
|
|
1286
1330
|
var ComponentDefaults = {
|
|
1287
1331
|
className: "",
|
|
1288
1332
|
style: {}
|
|
@@ -2801,7 +2845,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2801
2845
|
if (typeof error === "boolean" && error === true && !innerLoading) {
|
|
2802
2846
|
return /* @__PURE__ */ React.createElement("div", {
|
|
2803
2847
|
className: "".concat(classPrefix$r, "-error")
|
|
2804
|
-
}, /* @__PURE__ */ React.createElement(p$
|
|
2848
|
+
}, /* @__PURE__ */ React.createElement(p$4, null));
|
|
2805
2849
|
}
|
|
2806
2850
|
if (/* @__PURE__ */ React.isValidElement(error) && !innerLoading) {
|
|
2807
2851
|
return /* @__PURE__ */ React.createElement("div", {
|
|
@@ -2818,7 +2862,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2818
2862
|
if (typeof loading === "boolean" && loading === true && innerLoading) {
|
|
2819
2863
|
return /* @__PURE__ */ React.createElement("div", {
|
|
2820
2864
|
className: "".concat(classPrefix$r, "-loading")
|
|
2821
|
-
}, /* @__PURE__ */ React.createElement(p$
|
|
2865
|
+
}, /* @__PURE__ */ React.createElement(p$3, null));
|
|
2822
2866
|
}
|
|
2823
2867
|
if (/* @__PURE__ */ React.isValidElement(loading) && innerLoading) {
|
|
2824
2868
|
return /* @__PURE__ */ React.createElement("div", {
|
|
@@ -4928,9 +4972,9 @@ Check the top-level render call using <` + t + ">.");
|
|
|
4928
4972
|
var defaultProps$1q = {
|
|
4929
4973
|
text: "",
|
|
4930
4974
|
columns: 4,
|
|
4931
|
-
gap:
|
|
4975
|
+
gap: 9,
|
|
4932
4976
|
center: true,
|
|
4933
|
-
square:
|
|
4977
|
+
square: true,
|
|
4934
4978
|
reverse: false,
|
|
4935
4979
|
direction: "vertical"
|
|
4936
4980
|
};
|
|
@@ -4953,16 +4997,22 @@ Check the top-level render call using <` + t + ">.");
|
|
|
4953
4997
|
var classes = classNames(classPrefix2, className);
|
|
4954
4998
|
var context2 = React.useContext(GridContext);
|
|
4955
4999
|
var rootStyle = function() {
|
|
5000
|
+
var width = "calc((100% - ".concat(Number(gap) * (Number(columns) - 1), "px) / ").concat(Number(columns), ")");
|
|
4956
5001
|
var styles = _object_spread({
|
|
4957
|
-
flexBasis:
|
|
5002
|
+
flexBasis: width
|
|
4958
5003
|
}, style);
|
|
4959
5004
|
if (square) {
|
|
4960
|
-
styles.paddingTop =
|
|
4961
|
-
}
|
|
4962
|
-
|
|
5005
|
+
styles.paddingTop = width;
|
|
5006
|
+
}
|
|
5007
|
+
if (gap) {
|
|
5008
|
+
if ((index + 1) % Number(columns)) {
|
|
5009
|
+
styles.marginRight = pxCheck(gap);
|
|
5010
|
+
}
|
|
4963
5011
|
if (index >= Number(columns)) {
|
|
4964
5012
|
styles.marginTop = pxCheck(gap);
|
|
4965
5013
|
}
|
|
5014
|
+
} else {
|
|
5015
|
+
styles.borderRadius = 0;
|
|
4966
5016
|
}
|
|
4967
5017
|
return styles;
|
|
4968
5018
|
};
|
|
@@ -5001,9 +5051,9 @@ Check the top-level render call using <` + t + ">.");
|
|
|
5001
5051
|
GridItem.displayName = "NutGridItem";
|
|
5002
5052
|
var defaultProps$1p = {
|
|
5003
5053
|
columns: 4,
|
|
5004
|
-
gap:
|
|
5054
|
+
gap: 9,
|
|
5005
5055
|
center: true,
|
|
5006
|
-
square:
|
|
5056
|
+
square: true,
|
|
5007
5057
|
reverse: false,
|
|
5008
5058
|
direction: "vertical"
|
|
5009
5059
|
};
|
|
@@ -5030,9 +5080,6 @@ Check the top-level render call using <` + t + ">.");
|
|
|
5030
5080
|
if (style) {
|
|
5031
5081
|
styleSelf = style;
|
|
5032
5082
|
}
|
|
5033
|
-
if (gap) {
|
|
5034
|
-
styleSelf.paddingLeft = pxCheck(gap);
|
|
5035
|
-
}
|
|
5036
5083
|
return styleSelf;
|
|
5037
5084
|
};
|
|
5038
5085
|
return /* @__PURE__ */ React.createElement("div", _object_spread({
|
|
@@ -17784,7 +17831,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17784
17831
|
if (checkedStatement) {
|
|
17785
17832
|
return /* @__PURE__ */ React.isValidElement(activeIcon) ? /* @__PURE__ */ React.cloneElement(activeIcon, _object_spread_props(_object_spread({}, activeIcon.props), {
|
|
17786
17833
|
className: classNames(color())
|
|
17787
|
-
})) : /* @__PURE__ */ React.createElement(p$
|
|
17834
|
+
})) : /* @__PURE__ */ React.createElement(p$7, {
|
|
17788
17835
|
className: classNames(color())
|
|
17789
17836
|
});
|
|
17790
17837
|
}
|
|
@@ -19381,7 +19428,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19381
19428
|
var fileList = param.fileList, previewType = param.previewType, deletable = param.deletable, onDeleteItem = param.onDeleteItem, handleItemClick = param.handleItemClick, previewUrl = param.previewUrl, deleteIcon = param.deleteIcon, children = param.children;
|
|
19382
19429
|
var renderIcon = function(item) {
|
|
19383
19430
|
if (item.status === ERROR) {
|
|
19384
|
-
return item.failIcon || /* @__PURE__ */ React.createElement(p$
|
|
19431
|
+
return item.failIcon || /* @__PURE__ */ React.createElement(p$5, {
|
|
19385
19432
|
color: "#fff"
|
|
19386
19433
|
});
|
|
19387
19434
|
}
|
|
@@ -19445,7 +19492,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19445
19492
|
onClick: function() {
|
|
19446
19493
|
return handleItemClick(item, index);
|
|
19447
19494
|
}
|
|
19448
|
-
}, /* @__PURE__ */ React.createElement(s$3, null), /* @__PURE__ */ React.createElement("span", null, " ", item.name)), deletable && /* @__PURE__ */ React.createElement(p$
|
|
19495
|
+
}, /* @__PURE__ */ React.createElement(s$3, null), /* @__PURE__ */ React.createElement("span", null, " ", item.name)), deletable && /* @__PURE__ */ React.createElement(p$6, {
|
|
19449
19496
|
color: "#808080",
|
|
19450
19497
|
className: "nut-uploader-preview-img-file-del",
|
|
19451
19498
|
onClick: function() {
|
|
@@ -19499,7 +19546,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19499
19546
|
height: "20px",
|
|
19500
19547
|
color: "#808080"
|
|
19501
19548
|
}),
|
|
19502
|
-
deleteIcon: /* @__PURE__ */ React.createElement(p$
|
|
19549
|
+
deleteIcon: /* @__PURE__ */ React.createElement(p$5, {
|
|
19503
19550
|
color: "rgba(0,0,0,0.6)"
|
|
19504
19551
|
}),
|
|
19505
19552
|
beforeDelete: function(file, files) {
|
|
@@ -20509,23 +20556,28 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20509
20556
|
var classPrefix2 = "nut-resultpage";
|
|
20510
20557
|
var cls = classNames(classPrefix2, className);
|
|
20511
20558
|
var defaultStatus2 = {
|
|
20512
|
-
success:
|
|
20513
|
-
|
|
20514
|
-
|
|
20515
|
-
|
|
20516
|
-
|
|
20559
|
+
success: /* @__PURE__ */ React.createElement(p$2, {
|
|
20560
|
+
color: "#00D900"
|
|
20561
|
+
}),
|
|
20562
|
+
error: /* @__PURE__ */ React.createElement(p$5, {
|
|
20563
|
+
color: "#FF0F23"
|
|
20564
|
+
}),
|
|
20565
|
+
warning: /* @__PURE__ */ React.createElement(p, {
|
|
20566
|
+
color: "#FFBF00"
|
|
20567
|
+
}),
|
|
20568
|
+
info: /* @__PURE__ */ React.createElement(c, {
|
|
20569
|
+
color: "#0073FF"
|
|
20570
|
+
}),
|
|
20571
|
+
waiting: /* @__PURE__ */ React.createElement(p$8, {
|
|
20572
|
+
color: "#0073FF"
|
|
20573
|
+
})
|
|
20517
20574
|
};
|
|
20518
|
-
var _useState = _sliced_to_array(React.useState({
|
|
20519
|
-
backgroundImage: "url(".concat(typeof icon === "string" && icon ? icon : defaultStatus2[status], ")"),
|
|
20520
|
-
backgroundSize: "100% 100%"
|
|
20521
|
-
}), 1), imgStyle = _useState[0];
|
|
20522
20575
|
return /* @__PURE__ */ React.createElement("div", {
|
|
20523
20576
|
className: cls,
|
|
20524
20577
|
style
|
|
20525
|
-
},
|
|
20526
|
-
className: "".concat(classPrefix2, "-icon")
|
|
20527
|
-
|
|
20528
|
-
}) : icon, typeof title === "string" && title ? /* @__PURE__ */ React.createElement("div", {
|
|
20578
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
20579
|
+
className: "".concat(classPrefix2, "-icon")
|
|
20580
|
+
}, icon || defaultStatus2[status]), typeof title === "string" && title ? /* @__PURE__ */ React.createElement("div", {
|
|
20529
20581
|
className: "".concat(classPrefix2, "-title")
|
|
20530
20582
|
}, title) : title, typeof description === "string" && description ? /* @__PURE__ */ React.createElement("div", {
|
|
20531
20583
|
className: "".concat(classPrefix2, "-description")
|
|
@@ -20539,7 +20591,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20539
20591
|
return /* @__PURE__ */ React.createElement("div", {
|
|
20540
20592
|
className: "".concat(classPrefix2, "-action"),
|
|
20541
20593
|
key: index
|
|
20542
|
-
}, /* @__PURE__ */ React.createElement(Button, rest,
|
|
20594
|
+
}, /* @__PURE__ */ React.createElement(Button, _object_spread_props(_object_spread({}, rest), {
|
|
20595
|
+
size: "large"
|
|
20596
|
+
}), action === null || action === void 0 ? void 0 : action.text));
|
|
20543
20597
|
})) : null, children);
|
|
20544
20598
|
};
|
|
20545
20599
|
ResultPage.displayName = "NutResultPage";
|
|
@@ -22442,8 +22496,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22442
22496
|
var icon = this.props.icon;
|
|
22443
22497
|
if (typeof icon === "string") {
|
|
22444
22498
|
var iconNode = {
|
|
22445
|
-
success: /* @__PURE__ */ React__namespace.createElement(p$
|
|
22446
|
-
fail: /* @__PURE__ */ React__namespace.createElement(p$
|
|
22499
|
+
success: /* @__PURE__ */ React__namespace.createElement(p$2, null),
|
|
22500
|
+
fail: /* @__PURE__ */ React__namespace.createElement(p$5, null),
|
|
22447
22501
|
warn: /* @__PURE__ */ React__namespace.createElement(c, null),
|
|
22448
22502
|
loading: /* @__PURE__ */ React__namespace.createElement(n$4, {
|
|
22449
22503
|
className: "nut-icon-loading"
|
|
@@ -25896,7 +25950,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
25896
25950
|
return /* @__PURE__ */ React.createElement("div", _object_spread({
|
|
25897
25951
|
className: "".concat(classPrefix2, " ").concat(className),
|
|
25898
25952
|
style
|
|
25899
|
-
}, rest), !left && renderContent(!left), Number(value) !== 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, rateTrend.current ? /* @__PURE__ */ React.createElement(React.Fragment, null, riseIcon || /* @__PURE__ */ React.createElement(p, {
|
|
25953
|
+
}, rest), !left && renderContent(!left), Number(value) !== 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, rateTrend.current ? /* @__PURE__ */ React.createElement(React.Fragment, null, riseIcon || /* @__PURE__ */ React.createElement(p$1, {
|
|
25900
25954
|
color: calcIconProps.color
|
|
25901
25955
|
})) : /* @__PURE__ */ React.createElement(React.Fragment, null, dropIcon || /* @__PURE__ */ React.createElement(s, {
|
|
25902
25956
|
color: calcIconProps.color
|