@nutui/nutui-react 3.0.0-beta.1 → 3.0.0-beta.2

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.
@@ -843,7 +843,7 @@ Check the top-level render call using <` + t + ">.");
843
843
  }
844
844
  ) });
845
845
  };
846
- const p$5 = (o) => {
846
+ const p$6 = (o) => {
847
847
  const r = { ...dr, ...o };
848
848
  return /* @__PURE__ */ gr(mr, { ...r, name: r.name || "CheckChecked", viewBox: "0 0 1024 1024", children: [
849
849
  /* @__PURE__ */ xe(
@@ -931,7 +931,7 @@ Check the top-level render call using <` + t + ">.");
931
931
  }
932
932
  ) });
933
933
  };
934
- const p$4 = (r) => {
934
+ const p$5 = (r) => {
935
935
  const a = { ...dr, ...r };
936
936
  return /* @__PURE__ */ gr(mr, { ...a, name: a.name || "Del", viewBox: "0 0 1024 1024", children: [
937
937
  /* @__PURE__ */ xe(
@@ -953,7 +953,7 @@ Check the top-level render call using <` + t + ">.");
953
953
  )
954
954
  ] });
955
955
  };
956
- const p$3 = (a) => {
956
+ const p$4 = (a) => {
957
957
  const l = { ...dr, ...a };
958
958
  return /* @__PURE__ */ gr(mr, { ...l, name: l.name || "Failure", viewBox: "0 0 1024 1024", children: [
959
959
  /* @__PURE__ */ xe(
@@ -975,7 +975,7 @@ Check the top-level render call using <` + t + ">.");
975
975
  )
976
976
  ] });
977
977
  };
978
- const p$2 = (a) => {
978
+ const p$3 = (a) => {
979
979
  const l = { ...dr, ...a };
980
980
  return /* @__PURE__ */ gr(mr, { ...l, name: l.name || "ImageError", viewBox: "0 0 1024 1024", children: [
981
981
  /* @__PURE__ */ xe(
@@ -997,7 +997,7 @@ Check the top-level render call using <` + t + ">.");
997
997
  )
998
998
  ] });
999
999
  };
1000
- const p$1 = (o) => {
1000
+ const p$2 = (o) => {
1001
1001
  const a = { ...dr, ...o };
1002
1002
  return /* @__PURE__ */ gr(mr, { ...a, name: a.name || "Image", viewBox: "0 0 1024 1024", children: [
1003
1003
  /* @__PURE__ */ xe(
@@ -1195,6 +1195,28 @@ Check the top-level render call using <` + t + ">.");
1195
1195
  }
1196
1196
  ) });
1197
1197
  };
1198
+ const p$1 = (l) => {
1199
+ const r = { ...dr, ...l };
1200
+ return /* @__PURE__ */ gr(mr, { ...r, name: r.name || "Success", viewBox: "0 0 1024 1024", children: [
1201
+ /* @__PURE__ */ xe(
1202
+ "path",
1203
+ {
1204
+ d: "M743 405.33 682.67 345 448 579.67l-128-128L259.67 512 448 700.33z",
1205
+ fill: "currentColor",
1206
+ fillOpacity: "0.9"
1207
+ }
1208
+ ),
1209
+ ",",
1210
+ /* @__PURE__ */ xe(
1211
+ "path",
1212
+ {
1213
+ 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",
1214
+ fill: "currentColor",
1215
+ fillOpacity: "0.9"
1216
+ }
1217
+ )
1218
+ ] });
1219
+ };
1198
1220
  const c = (r) => {
1199
1221
  const a = { ...dr, ...r };
1200
1222
  return /* @__PURE__ */ gr(mr, { ...a, name: a.name || "Tips", viewBox: "0 0 1024 1024", children: [
@@ -2779,7 +2801,7 @@ Check the top-level render call using <` + t + ">.");
2779
2801
  if (typeof error === "boolean" && error === true && !innerLoading) {
2780
2802
  return /* @__PURE__ */ React.createElement("div", {
2781
2803
  className: "".concat(classPrefix$r, "-error")
2782
- }, /* @__PURE__ */ React.createElement(p$2, null));
2804
+ }, /* @__PURE__ */ React.createElement(p$3, null));
2783
2805
  }
2784
2806
  if (/* @__PURE__ */ React.isValidElement(error) && !innerLoading) {
2785
2807
  return /* @__PURE__ */ React.createElement("div", {
@@ -2796,7 +2818,7 @@ Check the top-level render call using <` + t + ">.");
2796
2818
  if (typeof loading === "boolean" && loading === true && innerLoading) {
2797
2819
  return /* @__PURE__ */ React.createElement("div", {
2798
2820
  className: "".concat(classPrefix$r, "-loading")
2799
- }, /* @__PURE__ */ React.createElement(p$1, null));
2821
+ }, /* @__PURE__ */ React.createElement(p$2, null));
2800
2822
  }
2801
2823
  if (/* @__PURE__ */ React.isValidElement(loading) && innerLoading) {
2802
2824
  return /* @__PURE__ */ React.createElement("div", {
@@ -17824,7 +17846,7 @@ Please add \`${key}Action\` when creating your handler.`);
17824
17846
  if (checkedStatement) {
17825
17847
  return /* @__PURE__ */ React.isValidElement(activeIcon) ? /* @__PURE__ */ React.cloneElement(activeIcon, _object_spread_props(_object_spread({}, activeIcon.props), {
17826
17848
  className: classNames(color())
17827
- })) : /* @__PURE__ */ React.createElement(p$5, {
17849
+ })) : /* @__PURE__ */ React.createElement(p$6, {
17828
17850
  className: classNames(color())
17829
17851
  });
17830
17852
  }
@@ -19348,7 +19370,7 @@ Please add \`${key}Action\` when creating your handler.`);
19348
19370
  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;
19349
19371
  var renderIcon = function(item) {
19350
19372
  if (item.status === ERROR) {
19351
- return item.failIcon || /* @__PURE__ */ React.createElement(p$3, {
19373
+ return item.failIcon || /* @__PURE__ */ React.createElement(p$4, {
19352
19374
  color: "#fff"
19353
19375
  });
19354
19376
  }
@@ -19412,7 +19434,7 @@ Please add \`${key}Action\` when creating your handler.`);
19412
19434
  onClick: function() {
19413
19435
  return handleItemClick(item, index);
19414
19436
  }
19415
- }, /* @__PURE__ */ React.createElement(s$3, null), /* @__PURE__ */ React.createElement("span", null, " ", item.name)), deletable && /* @__PURE__ */ React.createElement(p$4, {
19437
+ }, /* @__PURE__ */ React.createElement(s$3, null), /* @__PURE__ */ React.createElement("span", null, " ", item.name)), deletable && /* @__PURE__ */ React.createElement(p$5, {
19416
19438
  color: "#808080",
19417
19439
  className: "nut-uploader-preview-img-file-del",
19418
19440
  onClick: function() {
@@ -19466,7 +19488,7 @@ Please add \`${key}Action\` when creating your handler.`);
19466
19488
  height: "20px",
19467
19489
  color: "#808080"
19468
19490
  }),
19469
- deleteIcon: /* @__PURE__ */ React.createElement(p$3, {
19491
+ deleteIcon: /* @__PURE__ */ React.createElement(p$4, {
19470
19492
  color: "rgba(0,0,0,0.6)"
19471
19493
  }),
19472
19494
  beforeDelete: function(file, files) {
@@ -22408,23 +22430,14 @@ Please add \`${key}Action\` when creating your handler.`);
22408
22430
  value: function renderIcon() {
22409
22431
  var icon = this.props.icon;
22410
22432
  if (typeof icon === "string") {
22411
- var iconNode = null;
22412
- switch (icon) {
22413
- case "success":
22414
- iconNode = /* @__PURE__ */ React__namespace.createElement(i$5, null);
22415
- break;
22416
- case "loading":
22417
- iconNode = /* @__PURE__ */ React__namespace.createElement(n$4, {
22418
- className: "nut-icon-loading"
22419
- });
22420
- break;
22421
- case "fail":
22422
- iconNode = /* @__PURE__ */ React__namespace.createElement(p$3, null);
22423
- break;
22424
- case "warn":
22425
- iconNode = /* @__PURE__ */ React__namespace.createElement(c, null);
22426
- break;
22427
- }
22433
+ var iconNode = {
22434
+ success: /* @__PURE__ */ React__namespace.createElement(p$1, null),
22435
+ fail: /* @__PURE__ */ React__namespace.createElement(p$4, null),
22436
+ warn: /* @__PURE__ */ React__namespace.createElement(c, null),
22437
+ loading: /* @__PURE__ */ React__namespace.createElement(n$4, {
22438
+ className: "nut-icon-loading"
22439
+ })
22440
+ }[icon];
22428
22441
  return /* @__PURE__ */ React__namespace.createElement("p", {
22429
22442
  className: "".concat(classPrefix$8, "-icon-wrapper")
22430
22443
  }, iconNode);
@@ -22450,9 +22463,9 @@ Please add \`${key}Action\` when creating your handler.`);
22450
22463
  var _this = this;
22451
22464
  var _this_props = this.props, id = _this_props.id, icon = _this_props.icon, title = _this_props.title, content = _this_props.content, position = _this_props.position, size = _this_props.size, closeOnOverlayClick = _this_props.closeOnOverlayClick, lockScroll = _this_props.lockScroll, style = _this_props.style, className = _this_props.className, contentClassName = _this_props.contentClassName, contentStyle = _this_props.contentStyle, wordBreak = _this_props.wordBreak;
22452
22465
  var show2 = this.state.show;
22453
- var classes = classNames(_define_property({
22466
+ var classes = classNames({
22454
22467
  "nut-toast-has-icon": icon
22455
- }, "nut-toast-".concat(size), true));
22468
+ });
22456
22469
  return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(Overlay, {
22457
22470
  visible: show2,
22458
22471
  style,
@@ -22466,12 +22479,12 @@ Please add \`${key}Action\` when creating your handler.`);
22466
22479
  className: "".concat(classPrefix$8, " ").concat(classes),
22467
22480
  id: "toast-".concat(id)
22468
22481
  }, /* @__PURE__ */ React__namespace.createElement("div", {
22469
- className: "".concat(classPrefix$8, "-inner ").concat(classPrefix$8, "-").concat(position, " ").concat(contentClassName, " ").concat(wordBreak),
22470
- style: contentStyle
22482
+ className: "".concat(classPrefix$8, "-inner ").concat(classPrefix$8, "-").concat(position, " ").concat(contentClassName, " ").concat(classPrefix$8, "-inner-").concat(size, " ").concat(classPrefix$8, "-inner-").concat(wordBreak),
22483
+ style: _object_spread({}, contentStyle)
22471
22484
  }, this.renderIcon(), title ? /* @__PURE__ */ React__namespace.createElement("div", {
22472
22485
  className: "".concat(classPrefix$8, "-title")
22473
22486
  }, title) : null, /* @__PURE__ */ React__namespace.createElement("span", {
22474
- className: "".concat(classPrefix$8, "-text")
22487
+ className: "".concat(classPrefix$8, "-text ").concat(content ? "" : "".concat(classPrefix$8, "-text-empty"))
22475
22488
  }, content)))));
22476
22489
  }
22477
22490
  }
@@ -22511,12 +22524,12 @@ Please add \`${key}Action\` when creating your handler.`);
22511
22524
  title: "",
22512
22525
  size: "base",
22513
22526
  icon: null,
22514
- onClose: function() {
22515
- },
22516
22527
  closeOnOverlayClick: false,
22517
22528
  lockScroll: false,
22518
22529
  contentClassName: "",
22519
- wordBreak: "break-all"
22530
+ wordBreak: "break-all",
22531
+ onClose: function() {
22532
+ }
22520
22533
  });
22521
22534
  function getInstance(props, callback) {
22522
22535
  if (messageInstance) {