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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/esm/Address.js +3 -5
  3. package/dist/esm/Audio.js +3 -4
  4. package/dist/esm/Avatar.js +6 -5
  5. package/dist/esm/AvatarGroup.js +3 -7
  6. package/dist/esm/Calendar.js +3 -4
  7. package/dist/esm/CalendarItem.js +2 -3
  8. package/dist/esm/CellGroup.js +1 -1
  9. package/dist/esm/Checkbox.js +3 -3
  10. package/dist/esm/CheckboxGroup.js +3 -3
  11. package/dist/esm/CircleProgress.js +2 -3
  12. package/dist/esm/ConfigProvider.js +2 -3
  13. package/dist/esm/CountDown.js +2 -3
  14. package/dist/esm/DatePicker.js +3 -4
  15. package/dist/esm/Dialog.js +2 -3
  16. package/dist/esm/Elevator.js +1 -1
  17. package/dist/esm/Ellipsis.js +3 -4
  18. package/dist/esm/Empty.js +3 -5
  19. package/dist/esm/FixedNav.js +2 -3
  20. package/dist/esm/Form.js +2 -2
  21. package/dist/esm/Grid.js +3 -4
  22. package/dist/esm/GridItem.js +2 -3
  23. package/dist/esm/Image.js +2 -3
  24. package/dist/esm/Infiniteloading.js +2 -3
  25. package/dist/esm/Input.js +5 -3
  26. package/dist/esm/NumberKeyboard.js +2 -3
  27. package/dist/esm/Pagination.js +2 -3
  28. package/dist/esm/Picker.js +2 -3
  29. package/dist/esm/PullToRefresh.js +2 -3
  30. package/dist/esm/Range.js +2 -3
  31. package/dist/esm/SearchBar.js +2 -3
  32. package/dist/esm/ShortPassword.js +2 -3
  33. package/dist/esm/Signature.js +2 -3
  34. package/dist/esm/Skeleton.js +8 -5
  35. package/dist/esm/Swipe.js +1 -1
  36. package/dist/esm/Tabbar/style/index.js +1 -1
  37. package/dist/esm/Tabbar.js +6 -3
  38. package/dist/esm/TabbarItem.js +3 -4
  39. package/dist/esm/Table.js +2 -3
  40. package/dist/esm/TextArea.js +2 -3
  41. package/dist/esm/TimeDetail.js +2 -3
  42. package/dist/esm/TimePannel.js +2 -3
  43. package/dist/esm/TimeSelect.js +4 -5
  44. package/dist/esm/Uploader.js +2 -3
  45. package/dist/esm/VirtualList.js +2 -3
  46. package/dist/esm/WaterMark.js +2 -3
  47. package/dist/esm/{address.taro-67e32c33.js → address.taro-cab0ea22.js} +18 -4
  48. package/dist/esm/{audio.taro-51eafc9d.js → audio.taro-ff280f5e.js} +2 -2
  49. package/dist/esm/{avatar.taro-a840f345.js → avatar.taro-6e8f1f5c.js} +31 -29
  50. package/dist/esm/{avatargroup-0eadb514.js → avatargroup-f4375806.js} +9 -12
  51. package/dist/esm/{calendar.taro-b3ebdc35.js → calendar.taro-2fc9b899.js} +2 -2
  52. package/dist/esm/{calendaritem.taro-ab1ec154.js → calendaritem.taro-2d4a8c34.js} +1 -1
  53. package/dist/esm/{cellgroup.taro-660faffc.js → cellgroup.taro-e05ea802.js} +3 -2
  54. package/dist/esm/checkbox.taro-9d02f86c.js +175 -0
  55. package/dist/esm/{circleprogress.taro-d8973ae9.js → circleprogress.taro-d4943109.js} +21 -27
  56. package/dist/esm/{zh-CN-b4f493ba.js → configprovider.taro-ce34d482.js} +44 -1
  57. package/dist/esm/{countdown.taro-c14b5c1f.js → countdown.taro-3118ba23.js} +1 -1
  58. package/dist/esm/{datepicker.taro-7d522ff8.js → datepicker.taro-2e3e955b.js} +2 -2
  59. package/dist/esm/{dialog.taro-f9ca73a2.js → dialog.taro-eab19eab.js} +1 -1
  60. package/dist/esm/{elevator.taro-360a831f.js → elevator.taro-1a4e3356.js} +16 -8
  61. package/dist/esm/{ellipsis.taro-79044d54.js → ellipsis.taro-e1ac99a1.js} +7 -4
  62. package/dist/esm/{empty.taro-f8585835.js → empty.taro-26363c66.js} +12 -18
  63. package/dist/esm/{fixednav.taro-cca9a6df.js → fixednav.taro-ddb21e87.js} +1 -1
  64. package/dist/esm/{form.taro-7413d868.js → form.taro-423b0f0a.js} +1 -1
  65. package/dist/esm/{grid.taro-10eb7716.js → grid.taro-883a9c35.js} +1 -1
  66. package/dist/esm/{griditem.taro-fb15eeec.js → griditem.taro-16c7055b.js} +1 -1
  67. package/dist/esm/{image.taro-b897a058.js → image.taro-3025e659.js} +1 -1
  68. package/dist/esm/{infiniteloading.taro-cce53c60.js → infiniteloading.taro-721bca1f.js} +1 -1
  69. package/dist/esm/input.taro-06c1e4d5.js +167 -0
  70. package/dist/esm/{numberkeyboard.taro-10ab54d6.js → numberkeyboard.taro-d9b1721b.js} +1 -1
  71. package/dist/esm/nutui-react.es.js +45 -47
  72. package/dist/esm/{pagination.taro-df441058.js → pagination.taro-94f9be5e.js} +1 -1
  73. package/dist/esm/{picker.taro-9f1bb6a4.js → picker.taro-e16b4312.js} +1 -1
  74. package/dist/esm/{pulltorefresh.taro-37dadbc5.js → pulltorefresh.taro-016d0079.js} +1 -1
  75. package/dist/esm/{range.taro-432d20d7.js → range.taro-8953e8c3.js} +1 -1
  76. package/dist/esm/{searchbar.taro-4aa300df.js → searchbar.taro-4467040f.js} +1 -1
  77. package/dist/esm/{shortpassword.taro-99645f99.js → shortpassword.taro-433b86a4.js} +1 -1
  78. package/dist/esm/{signature.taro-e5ede25a.js → signature.taro-a4d9b5c9.js} +1 -1
  79. package/dist/esm/{skeleton.taro-fabd423a.js → skeleton.taro-8ec11af9.js} +2 -2
  80. package/dist/esm/{swipe.taro-b18a73ff.js → swipe.taro-0b8cc872.js} +3 -5
  81. package/dist/esm/tabbar.taro-48413fb8.js +51 -0
  82. package/dist/esm/tabbaritem.taro-5afa3562.js +37 -0
  83. package/dist/esm/{table.taro-eca757f3.js → table.taro-327b4248.js} +1 -1
  84. package/dist/esm/{textarea.taro-e256e741.js → textarea.taro-add72cf3.js} +1 -1
  85. package/dist/esm/{timedetail.taro-cae362b9.js → timedetail.taro-82a2900b.js} +1 -1
  86. package/dist/esm/{timepannel.taro-d6f4cf80.js → timepannel.taro-0573bb65.js} +1 -1
  87. package/dist/esm/{timeselect.taro-804199f9.js → timeselect.taro-29124a34.js} +3 -3
  88. package/dist/esm/{uploader.taro-716f9a50.js → uploader.taro-c70d00de.js} +1 -1
  89. package/dist/esm/{virtuallist.taro-0bd611cb.js → virtuallist.taro-ba8e1f21.js} +1 -1
  90. package/dist/esm/{watermark.taro-8966896a.js → watermark.taro-168cdac5.js} +1 -1
  91. package/dist/locales/base.js +1 -1
  92. package/dist/locales/en-US.js +1 -1
  93. package/dist/locales/id-ID.js +1 -1
  94. package/dist/locales/zh-CN.js +1 -1
  95. package/dist/locales/zh-TW.js +1 -1
  96. package/dist/locales/zh-UG.js +1 -1
  97. package/dist/nutui.react.mjs +975 -1094
  98. package/dist/nutui.react.umd.js +973 -1092
  99. package/dist/packages/badge/badge.scss +0 -1
  100. package/dist/packages/cellgroup/cellgroup.scss +20 -16
  101. package/dist/packages/checkbox/checkbox.scss +8 -11
  102. package/dist/packages/circleprogress/circleprogress.scss +0 -9
  103. package/dist/packages/empty/empty.scss +0 -9
  104. package/dist/packages/input/input.scss +13 -180
  105. package/dist/packages/tabbar/tabbar.scss +16 -22
  106. package/dist/packages/tabbaritem/tabbaritem.scss +9 -70
  107. package/dist/style.css +1 -1
  108. package/dist/style.mjs +1 -1
  109. package/dist/styles/themes/default.scss +0 -1
  110. package/dist/styles/variables-jmapp.scss +12 -16
  111. package/dist/styles/variables.scss +12 -16
  112. package/dist/types/index.d.ts +86 -129
  113. package/package.json +1 -1
  114. package/dist/esm/Icon.js +0 -64
  115. package/dist/esm/checkbox.taro-ae460d3a.js +0 -168
  116. package/dist/esm/configprovider-9960f0fb.js +0 -19
  117. package/dist/esm/configprovider.taro-43a3c646.js +0 -45
  118. package/dist/esm/input.taro-f4e067f7.js +0 -237
  119. package/dist/esm/tabbar.taro-eefd0f8e.js +0 -59
  120. package/dist/esm/tabbaritem.taro-7a97e645.js +0 -55
  121. package/dist/packages/icon/icon.scss +0 -0
  122. /package/dist/esm/{AvatarContext-c96afdcc.js → context-c96afdcc.js} +0 -0
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
8
8
  return value;
9
9
  };
10
10
  /*!
11
- * @nutui/nutui-react-taro v2.0.0-alpha.3 Fri Apr 28 2023 15:56:12 GMT+0800 (China Standard Time)
11
+ * @nutui/nutui-react-taro v2.0.0-alpha.5 Wed May 10 2023 15:25:20 GMT+0800 (China Standard Time)
12
12
  * (c) 2023 @jdf2e.
13
13
  * Released under the MIT License.
14
14
  */
@@ -1023,7 +1023,7 @@ var __publicField = (obj, key, value) => {
1023
1023
  })();
1024
1024
  })(classnames);
1025
1025
  const classNames = classnamesExports;
1026
- const r$w = {
1026
+ const r$x = {
1027
1027
  name: "arrow-down2",
1028
1028
  size: "",
1029
1029
  classPrefix: "nut-icon",
@@ -1037,7 +1037,7 @@ var __publicField = (obj, key, value) => {
1037
1037
  function w$1(n) {
1038
1038
  return n === "" ? "" : Number.isNaN(Number(n)) ? String(n) : `${n}px`;
1039
1039
  }
1040
- function a$w(n) {
1040
+ function a$x(n) {
1041
1041
  const {
1042
1042
  name: e,
1043
1043
  size: l,
@@ -1051,7 +1051,7 @@ var __publicField = (obj, key, value) => {
1051
1051
  onClick: i,
1052
1052
  ...h
1053
1053
  } = {
1054
- ...r$w,
1054
+ ...r$x,
1055
1055
  ...n
1056
1056
  }, s = e ? e.indexOf("/") !== -1 : false, g = s ? "img" : u, C = (x) => {
1057
1057
  i && i(x);
@@ -1072,9 +1072,9 @@ var __publicField = (obj, key, value) => {
1072
1072
  d
1073
1073
  );
1074
1074
  }
1075
- a$w.defaultProps = r$w;
1076
- a$w.displayName = "NutIconarrow-down2";
1077
- const r$v = {
1075
+ a$x.defaultProps = r$x;
1076
+ a$x.displayName = "NutIconarrow-down2";
1077
+ const r$w = {
1078
1078
  name: "arrow-up2",
1079
1079
  size: "",
1080
1080
  classPrefix: "nut-icon",
@@ -1088,7 +1088,7 @@ var __publicField = (obj, key, value) => {
1088
1088
  function y$t(e) {
1089
1089
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
1090
1090
  }
1091
- function a$v(e) {
1091
+ function a$w(e) {
1092
1092
  const {
1093
1093
  name: t,
1094
1094
  size: l,
@@ -1102,7 +1102,7 @@ var __publicField = (obj, key, value) => {
1102
1102
  onClick: i,
1103
1103
  ...h
1104
1104
  } = {
1105
- ...r$v,
1105
+ ...r$w,
1106
1106
  ...e
1107
1107
  }, c = t ? t.indexOf("/") !== -1 : false, g = c ? "img" : m, C = (x) => {
1108
1108
  i && i(x);
@@ -1123,9 +1123,9 @@ var __publicField = (obj, key, value) => {
1123
1123
  p
1124
1124
  );
1125
1125
  }
1126
- a$v.defaultProps = r$v;
1127
- a$v.displayName = "NutIconarrow-up2";
1128
- const r$u = {
1126
+ a$w.defaultProps = r$w;
1127
+ a$w.displayName = "NutIconarrow-up2";
1128
+ const r$v = {
1129
1129
  name: "check-checked",
1130
1130
  size: "",
1131
1131
  classPrefix: "nut-icon",
@@ -1139,7 +1139,7 @@ var __publicField = (obj, key, value) => {
1139
1139
  function y$s(e) {
1140
1140
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
1141
1141
  }
1142
- function a$u(e) {
1142
+ function a$v(e) {
1143
1143
  const {
1144
1144
  name: c,
1145
1145
  size: l,
@@ -1153,7 +1153,7 @@ var __publicField = (obj, key, value) => {
1153
1153
  onClick: o,
1154
1154
  ...k
1155
1155
  } = {
1156
- ...r$u,
1156
+ ...r$v,
1157
1157
  ...e
1158
1158
  }, s = c ? c.indexOf("/") !== -1 : false, p = s ? "img" : u, g = (x) => {
1159
1159
  o && o(x);
@@ -1174,9 +1174,9 @@ var __publicField = (obj, key, value) => {
1174
1174
  h
1175
1175
  );
1176
1176
  }
1177
- a$u.defaultProps = r$u;
1178
- a$u.displayName = "NutIconcheck-checked";
1179
- const a$t = {
1177
+ a$v.defaultProps = r$v;
1178
+ a$v.displayName = "NutIconcheck-checked";
1179
+ const a$u = {
1180
1180
  name: "check-disabled",
1181
1181
  size: "",
1182
1182
  classPrefix: "nut-icon",
@@ -1190,7 +1190,7 @@ var __publicField = (obj, key, value) => {
1190
1190
  function y$r(e) {
1191
1191
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
1192
1192
  }
1193
- function r$t(e) {
1193
+ function r$u(e) {
1194
1194
  const {
1195
1195
  name: t,
1196
1196
  size: l,
@@ -1204,7 +1204,7 @@ var __publicField = (obj, key, value) => {
1204
1204
  onClick: o,
1205
1205
  ...p
1206
1206
  } = {
1207
- ...a$t,
1207
+ ...a$u,
1208
1208
  ...e
1209
1209
  }, s = t ? t.indexOf("/") !== -1 : false, k = s ? "img" : u, g = (x) => {
1210
1210
  o && o(x);
@@ -1225,9 +1225,9 @@ var __publicField = (obj, key, value) => {
1225
1225
  d
1226
1226
  );
1227
1227
  }
1228
- r$t.defaultProps = a$t;
1229
- r$t.displayName = "NutIconcheck-disabled";
1230
- const r$s = {
1228
+ r$u.defaultProps = a$u;
1229
+ r$u.displayName = "NutIconcheck-disabled";
1230
+ const r$t = {
1231
1231
  name: "check-normal",
1232
1232
  size: "",
1233
1233
  classPrefix: "nut-icon",
@@ -1241,7 +1241,7 @@ var __publicField = (obj, key, value) => {
1241
1241
  function y$q(e) {
1242
1242
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
1243
1243
  }
1244
- function a$s(e) {
1244
+ function a$t(e) {
1245
1245
  const {
1246
1246
  name: n,
1247
1247
  size: l,
@@ -1255,7 +1255,7 @@ var __publicField = (obj, key, value) => {
1255
1255
  onClick: i,
1256
1256
  ...d
1257
1257
  } = {
1258
- ...r$s,
1258
+ ...r$t,
1259
1259
  ...e
1260
1260
  }, s = n ? n.indexOf("/") !== -1 : false, k = s ? "img" : u, g = (x) => {
1261
1261
  i && i(x);
@@ -1276,9 +1276,9 @@ var __publicField = (obj, key, value) => {
1276
1276
  N
1277
1277
  );
1278
1278
  }
1279
- a$s.defaultProps = r$s;
1280
- a$s.displayName = "NutIconcheck-normal";
1281
- const r$r = {
1279
+ a$t.defaultProps = r$t;
1280
+ a$t.displayName = "NutIconcheck-normal";
1281
+ const r$s = {
1282
1282
  name: "Check",
1283
1283
  size: "",
1284
1284
  classPrefix: "nut-icon",
@@ -1292,7 +1292,7 @@ var __publicField = (obj, key, value) => {
1292
1292
  function y$p(e) {
1293
1293
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
1294
1294
  }
1295
- function a$r(e) {
1295
+ function a$s(e) {
1296
1296
  const {
1297
1297
  name: t,
1298
1298
  size: l,
@@ -1306,7 +1306,7 @@ var __publicField = (obj, key, value) => {
1306
1306
  onClick: o,
1307
1307
  ...d
1308
1308
  } = {
1309
- ...r$r,
1309
+ ...r$s,
1310
1310
  ...e
1311
1311
  }, s = t ? t.indexOf("/") !== -1 : false, C = s ? "img" : u, k = (x) => {
1312
1312
  o && o(x);
@@ -1327,9 +1327,9 @@ var __publicField = (obj, key, value) => {
1327
1327
  N
1328
1328
  );
1329
1329
  }
1330
- a$r.defaultProps = r$r;
1331
- a$r.displayName = "NutIconCheck";
1332
- const r$q = {
1330
+ a$s.defaultProps = r$s;
1331
+ a$s.displayName = "NutIconCheck";
1332
+ const r$r = {
1333
1333
  name: "checked",
1334
1334
  size: "",
1335
1335
  classPrefix: "nut-icon",
@@ -1343,7 +1343,7 @@ var __publicField = (obj, key, value) => {
1343
1343
  function y$o(e) {
1344
1344
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
1345
1345
  }
1346
- function a$q(e) {
1346
+ function a$r(e) {
1347
1347
  const {
1348
1348
  name: t,
1349
1349
  size: l,
@@ -1357,7 +1357,7 @@ var __publicField = (obj, key, value) => {
1357
1357
  onClick: o,
1358
1358
  ...p
1359
1359
  } = {
1360
- ...r$q,
1360
+ ...r$r,
1361
1361
  ...e
1362
1362
  }, s = t ? t.indexOf("/") !== -1 : false, k = s ? "img" : u, g = (x) => {
1363
1363
  o && o(x);
@@ -1378,9 +1378,9 @@ var __publicField = (obj, key, value) => {
1378
1378
  d
1379
1379
  );
1380
1380
  }
1381
- a$q.defaultProps = r$q;
1382
- a$q.displayName = "NutIconchecked";
1383
- const r$p = {
1381
+ a$r.defaultProps = r$r;
1382
+ a$r.displayName = "NutIconchecked";
1383
+ const r$q = {
1384
1384
  name: "checklist",
1385
1385
  size: "",
1386
1386
  classPrefix: "nut-icon",
@@ -1394,7 +1394,7 @@ var __publicField = (obj, key, value) => {
1394
1394
  function y$n(e) {
1395
1395
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
1396
1396
  }
1397
- function a$p(e) {
1397
+ function a$q(e) {
1398
1398
  const {
1399
1399
  name: t,
1400
1400
  size: l,
@@ -1408,7 +1408,7 @@ var __publicField = (obj, key, value) => {
1408
1408
  onClick: o,
1409
1409
  ...d
1410
1410
  } = {
1411
- ...r$p,
1411
+ ...r$q,
1412
1412
  ...e
1413
1413
  }, s = t ? t.indexOf("/") !== -1 : false, k = s ? "img" : u, g = (x) => {
1414
1414
  o && o(x);
@@ -1429,9 +1429,9 @@ var __publicField = (obj, key, value) => {
1429
1429
  N
1430
1430
  );
1431
1431
  }
1432
- a$p.defaultProps = r$p;
1433
- a$p.displayName = "NutIconchecklist";
1434
- const r$o = {
1432
+ a$q.defaultProps = r$q;
1433
+ a$q.displayName = "NutIconchecklist";
1434
+ const r$p = {
1435
1435
  name: "circle-close",
1436
1436
  size: "",
1437
1437
  classPrefix: "nut-icon",
@@ -1445,7 +1445,7 @@ var __publicField = (obj, key, value) => {
1445
1445
  function y$m(e) {
1446
1446
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
1447
1447
  }
1448
- function a$o(e) {
1448
+ function a$p(e) {
1449
1449
  const {
1450
1450
  name: t,
1451
1451
  size: l,
@@ -1459,7 +1459,7 @@ var __publicField = (obj, key, value) => {
1459
1459
  onClick: o,
1460
1460
  ...h
1461
1461
  } = {
1462
- ...r$o,
1462
+ ...r$p,
1463
1463
  ...e
1464
1464
  }, s = t ? t.indexOf("/") !== -1 : false, g = s ? "img" : u, C = (x) => {
1465
1465
  o && o(x);
@@ -1480,9 +1480,9 @@ var __publicField = (obj, key, value) => {
1480
1480
  N
1481
1481
  );
1482
1482
  }
1483
- a$o.defaultProps = r$o;
1484
- a$o.displayName = "NutIconcircle-close";
1485
- const r$n = {
1483
+ a$p.defaultProps = r$p;
1484
+ a$p.displayName = "NutIconcircle-close";
1485
+ const r$o = {
1486
1486
  name: "close",
1487
1487
  size: "",
1488
1488
  classPrefix: "nut-icon",
@@ -1496,7 +1496,7 @@ var __publicField = (obj, key, value) => {
1496
1496
  function y$l(e) {
1497
1497
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
1498
1498
  }
1499
- function a$n(e) {
1499
+ function a$o(e) {
1500
1500
  const {
1501
1501
  name: t,
1502
1502
  size: l,
@@ -1510,7 +1510,7 @@ var __publicField = (obj, key, value) => {
1510
1510
  onClick: i,
1511
1511
  ...h
1512
1512
  } = {
1513
- ...r$n,
1513
+ ...r$o,
1514
1514
  ...e
1515
1515
  }, c = t ? t.indexOf("/") !== -1 : false, g = c ? "img" : u, C = (x) => {
1516
1516
  i && i(x);
@@ -1531,9 +1531,9 @@ var __publicField = (obj, key, value) => {
1531
1531
  N
1532
1532
  );
1533
1533
  }
1534
- a$n.defaultProps = r$n;
1535
- a$n.displayName = "NutIconclose";
1536
- const r$m = {
1534
+ a$o.defaultProps = r$o;
1535
+ a$o.displayName = "NutIconclose";
1536
+ const r$n = {
1537
1537
  name: "del",
1538
1538
  size: "",
1539
1539
  classPrefix: "nut-icon",
@@ -1547,7 +1547,7 @@ var __publicField = (obj, key, value) => {
1547
1547
  function y$k(e) {
1548
1548
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
1549
1549
  }
1550
- function a$m(e) {
1550
+ function a$n(e) {
1551
1551
  const {
1552
1552
  name: t,
1553
1553
  size: l,
@@ -1561,7 +1561,7 @@ var __publicField = (obj, key, value) => {
1561
1561
  onClick: o,
1562
1562
  ...h
1563
1563
  } = {
1564
- ...r$m,
1564
+ ...r$n,
1565
1565
  ...e
1566
1566
  }, c = t ? t.indexOf("/") !== -1 : false, g = c ? "img" : u, C = (x) => {
1567
1567
  o && o(x);
@@ -1582,9 +1582,9 @@ var __publicField = (obj, key, value) => {
1582
1582
  d
1583
1583
  );
1584
1584
  }
1585
- a$m.defaultProps = r$m;
1586
- a$m.displayName = "NutIcondel";
1587
- const r$l = {
1585
+ a$n.defaultProps = r$n;
1586
+ a$n.displayName = "NutIcondel";
1587
+ const r$m = {
1588
1588
  name: "down-arrow",
1589
1589
  size: "",
1590
1590
  classPrefix: "nut-icon",
@@ -1598,7 +1598,7 @@ var __publicField = (obj, key, value) => {
1598
1598
  function w(n) {
1599
1599
  return n === "" ? "" : Number.isNaN(Number(n)) ? String(n) : `${n}px`;
1600
1600
  }
1601
- function a$l(n) {
1601
+ function a$m(n) {
1602
1602
  const {
1603
1603
  name: e,
1604
1604
  size: l,
@@ -1612,7 +1612,7 @@ var __publicField = (obj, key, value) => {
1612
1612
  onClick: i,
1613
1613
  ...h
1614
1614
  } = {
1615
- ...r$l,
1615
+ ...r$m,
1616
1616
  ...n
1617
1617
  }, s = e ? e.indexOf("/") !== -1 : false, g = s ? "img" : u, C = (x) => {
1618
1618
  i && i(x);
@@ -1633,9 +1633,9 @@ var __publicField = (obj, key, value) => {
1633
1633
  d
1634
1634
  );
1635
1635
  }
1636
- a$l.defaultProps = r$l;
1637
- a$l.displayName = "NutIcondown-arrow";
1638
- const r$k = {
1636
+ a$m.defaultProps = r$m;
1637
+ a$m.displayName = "NutIcondown-arrow";
1638
+ const r$l = {
1639
1639
  name: "failure",
1640
1640
  size: "",
1641
1641
  classPrefix: "nut-icon",
@@ -1649,7 +1649,7 @@ var __publicField = (obj, key, value) => {
1649
1649
  function y$j(e) {
1650
1650
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
1651
1651
  }
1652
- function a$k(e) {
1652
+ function a$l(e) {
1653
1653
  const {
1654
1654
  name: t,
1655
1655
  size: l,
@@ -1663,7 +1663,7 @@ var __publicField = (obj, key, value) => {
1663
1663
  onClick: o,
1664
1664
  ...h
1665
1665
  } = {
1666
- ...r$k,
1666
+ ...r$l,
1667
1667
  ...e
1668
1668
  }, c = t ? t.indexOf("/") !== -1 : false, g = c ? "img" : m, C = (x) => {
1669
1669
  o && o(x);
@@ -1684,9 +1684,9 @@ var __publicField = (obj, key, value) => {
1684
1684
  N
1685
1685
  );
1686
1686
  }
1687
- a$k.defaultProps = r$k;
1688
- a$k.displayName = "NutIconfailure";
1689
- const r$j = {
1687
+ a$l.defaultProps = r$l;
1688
+ a$l.displayName = "NutIconfailure";
1689
+ const r$k = {
1690
1690
  name: "image-error",
1691
1691
  size: "",
1692
1692
  classPrefix: "nut-icon",
@@ -1700,7 +1700,7 @@ var __publicField = (obj, key, value) => {
1700
1700
  function y$i(e) {
1701
1701
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
1702
1702
  }
1703
- function a$j(e) {
1703
+ function a$k(e) {
1704
1704
  const {
1705
1705
  name: t,
1706
1706
  size: l,
@@ -1714,7 +1714,7 @@ var __publicField = (obj, key, value) => {
1714
1714
  onClick: o,
1715
1715
  ...g
1716
1716
  } = {
1717
- ...r$j,
1717
+ ...r$k,
1718
1718
  ...e
1719
1719
  }, c = t ? t.indexOf("/") !== -1 : false, h = c ? "img" : u, C = (x) => {
1720
1720
  o && o(x);
@@ -1735,9 +1735,9 @@ var __publicField = (obj, key, value) => {
1735
1735
  N
1736
1736
  );
1737
1737
  }
1738
- a$j.defaultProps = r$j;
1739
- a$j.displayName = "NutIconimage-error";
1740
- const a$i = {
1738
+ a$k.defaultProps = r$k;
1739
+ a$k.displayName = "NutIconimage-error";
1740
+ const a$j = {
1741
1741
  name: "image",
1742
1742
  size: "",
1743
1743
  classPrefix: "nut-icon",
@@ -1751,7 +1751,7 @@ var __publicField = (obj, key, value) => {
1751
1751
  function y$h(e) {
1752
1752
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
1753
1753
  }
1754
- function r$i(e) {
1754
+ function r$j(e) {
1755
1755
  const {
1756
1756
  name: t,
1757
1757
  size: l,
@@ -1765,7 +1765,7 @@ var __publicField = (obj, key, value) => {
1765
1765
  onClick: o,
1766
1766
  ...g
1767
1767
  } = {
1768
- ...a$i,
1768
+ ...a$j,
1769
1769
  ...e
1770
1770
  }, c = t ? t.indexOf("/") !== -1 : false, h = c ? "img" : u, C = (x) => {
1771
1771
  o && o(x);
@@ -1786,9 +1786,9 @@ var __publicField = (obj, key, value) => {
1786
1786
  N
1787
1787
  );
1788
1788
  }
1789
- r$i.defaultProps = a$i;
1790
- r$i.displayName = "NutIconimage";
1791
- const r$h = {
1789
+ r$j.defaultProps = a$j;
1790
+ r$j.displayName = "NutIconimage";
1791
+ const r$i = {
1792
1792
  name: "joy-smile",
1793
1793
  size: "",
1794
1794
  classPrefix: "nut-icon",
@@ -1799,10 +1799,10 @@ var __publicField = (obj, key, value) => {
1799
1799
  },
1800
1800
  className: ""
1801
1801
  };
1802
- function $(e) {
1802
+ function $$1(e) {
1803
1803
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
1804
1804
  }
1805
- function a$h(e) {
1805
+ function a$i(e) {
1806
1806
  const {
1807
1807
  name: t,
1808
1808
  size: l,
@@ -1816,11 +1816,11 @@ var __publicField = (obj, key, value) => {
1816
1816
  onClick: o,
1817
1817
  ...h
1818
1818
  } = {
1819
- ...r$h,
1819
+ ...r$i,
1820
1820
  ...e
1821
1821
  }, c = t ? t.indexOf("/") !== -1 : false, g = c ? "img" : u, y2 = (k) => {
1822
1822
  o && o(k);
1823
- }, C = () => c ? { src: t } : {}, n = {}, s = $(l);
1823
+ }, C = () => c ? { src: t } : {}, n = {}, s = $$1(l);
1824
1824
  return s && (n.fontSize = s, n.width = s, n.height = s), React.createElement(
1825
1825
  g,
1826
1826
  {
@@ -1837,9 +1837,9 @@ var __publicField = (obj, key, value) => {
1837
1837
  N
1838
1838
  );
1839
1839
  }
1840
- a$h.defaultProps = r$h;
1841
- a$h.displayName = "NutIconjoy-smile";
1842
- const r$g = {
1840
+ a$i.defaultProps = r$i;
1841
+ a$i.displayName = "NutIconjoy-smile";
1842
+ const r$h = {
1843
1843
  name: "left",
1844
1844
  size: "",
1845
1845
  classPrefix: "nut-icon",
@@ -1853,7 +1853,7 @@ var __publicField = (obj, key, value) => {
1853
1853
  function y$g(e) {
1854
1854
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
1855
1855
  }
1856
- function a$g(e) {
1856
+ function a$h(e) {
1857
1857
  const {
1858
1858
  name: t,
1859
1859
  size: l,
@@ -1867,7 +1867,7 @@ var __publicField = (obj, key, value) => {
1867
1867
  onClick: o,
1868
1868
  ...h
1869
1869
  } = {
1870
- ...r$g,
1870
+ ...r$h,
1871
1871
  ...e
1872
1872
  }, c = t ? t.indexOf("/") !== -1 : false, g = c ? "img" : u, C = (x) => {
1873
1873
  o && o(x);
@@ -1888,9 +1888,9 @@ var __publicField = (obj, key, value) => {
1888
1888
  N
1889
1889
  );
1890
1890
  }
1891
- a$g.defaultProps = r$g;
1892
- a$g.displayName = "NutIconleft";
1893
- const r$f = {
1891
+ a$h.defaultProps = r$h;
1892
+ a$h.displayName = "NutIconleft";
1893
+ const r$g = {
1894
1894
  name: "link",
1895
1895
  size: "",
1896
1896
  classPrefix: "nut-icon",
@@ -1904,7 +1904,7 @@ var __publicField = (obj, key, value) => {
1904
1904
  function y$f(n) {
1905
1905
  return n === "" ? "" : Number.isNaN(Number(n)) ? String(n) : `${n}px`;
1906
1906
  }
1907
- function a$f(n) {
1907
+ function a$g(n) {
1908
1908
  const {
1909
1909
  name: e,
1910
1910
  size: l,
@@ -1918,7 +1918,7 @@ var __publicField = (obj, key, value) => {
1918
1918
  onClick: o,
1919
1919
  ...h
1920
1920
  } = {
1921
- ...r$f,
1921
+ ...r$g,
1922
1922
  ...n
1923
1923
  }, c = e ? e.indexOf("/") !== -1 : false, k = c ? "img" : u, g = (x) => {
1924
1924
  o && o(x);
@@ -1939,9 +1939,9 @@ var __publicField = (obj, key, value) => {
1939
1939
  N
1940
1940
  );
1941
1941
  }
1942
- a$f.defaultProps = r$f;
1943
- a$f.displayName = "NutIconlink";
1944
- const a$e = {
1942
+ a$g.defaultProps = r$g;
1943
+ a$g.displayName = "NutIconlink";
1944
+ const a$f = {
1945
1945
  name: "loading",
1946
1946
  size: "",
1947
1947
  classPrefix: "nut-icon",
@@ -1955,7 +1955,7 @@ var __publicField = (obj, key, value) => {
1955
1955
  function y$e(n) {
1956
1956
  return n === "" ? "" : Number.isNaN(Number(n)) ? String(n) : `${n}px`;
1957
1957
  }
1958
- function r$e(n) {
1958
+ function r$f(n) {
1959
1959
  const {
1960
1960
  name: e,
1961
1961
  size: l,
@@ -1969,7 +1969,7 @@ var __publicField = (obj, key, value) => {
1969
1969
  onClick: o,
1970
1970
  ...g
1971
1971
  } = {
1972
- ...a$e,
1972
+ ...a$f,
1973
1973
  ...n
1974
1974
  }, c = e ? e.indexOf("/") !== -1 : false, h = c ? "img" : u, C = (x) => {
1975
1975
  o && o(x);
@@ -1990,9 +1990,9 @@ var __publicField = (obj, key, value) => {
1990
1990
  d
1991
1991
  );
1992
1992
  }
1993
- r$e.defaultProps = a$e;
1994
- r$e.displayName = "NutIconloading";
1995
- const a$d = {
1993
+ r$f.defaultProps = a$f;
1994
+ r$f.displayName = "NutIconloading";
1995
+ const a$e = {
1996
1996
  name: "location2",
1997
1997
  size: "",
1998
1998
  classPrefix: "nut-icon",
@@ -2006,7 +2006,7 @@ var __publicField = (obj, key, value) => {
2006
2006
  function y$d(t) {
2007
2007
  return t === "" ? "" : Number.isNaN(Number(t)) ? String(t) : `${t}px`;
2008
2008
  }
2009
- function r$d(t) {
2009
+ function r$e(t) {
2010
2010
  const {
2011
2011
  name: n,
2012
2012
  size: l,
@@ -2020,7 +2020,7 @@ var __publicField = (obj, key, value) => {
2020
2020
  onClick: i,
2021
2021
  ...h
2022
2022
  } = {
2023
- ...a$d,
2023
+ ...a$e,
2024
2024
  ...t
2025
2025
  }, o = n ? n.indexOf("/") !== -1 : false, g = o ? "img" : u, C = (x) => {
2026
2026
  i && i(x);
@@ -2041,9 +2041,9 @@ var __publicField = (obj, key, value) => {
2041
2041
  N
2042
2042
  );
2043
2043
  }
2044
- r$d.defaultProps = a$d;
2045
- r$d.displayName = "NutIconlocation2";
2046
- const a$c = {
2044
+ r$e.defaultProps = a$e;
2045
+ r$e.displayName = "NutIconlocation2";
2046
+ const a$d = {
2047
2047
  name: "mask-close",
2048
2048
  size: "",
2049
2049
  classPrefix: "nut-icon",
@@ -2057,7 +2057,7 @@ var __publicField = (obj, key, value) => {
2057
2057
  function y$c(e) {
2058
2058
  return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
2059
2059
  }
2060
- function r$c(e) {
2060
+ function r$d(e) {
2061
2061
  const {
2062
2062
  name: t,
2063
2063
  size: l,
@@ -2071,7 +2071,7 @@ var __publicField = (obj, key, value) => {
2071
2071
  onClick: i,
2072
2072
  ...h
2073
2073
  } = {
2074
- ...a$c,
2074
+ ...a$d,
2075
2075
  ...e
2076
2076
  }, c = t ? t.indexOf("/") !== -1 : false, k = c ? "img" : u, g = (x) => {
2077
2077
  i && i(x);
@@ -2092,9 +2092,9 @@ var __publicField = (obj, key, value) => {
2092
2092
  N
2093
2093
  );
2094
2094
  }
2095
- r$c.defaultProps = a$c;
2096
- r$c.displayName = "NutIconmask-close";
2097
- const r$b = {
2095
+ r$d.defaultProps = a$d;
2096
+ r$d.displayName = "NutIconmask-close";
2097
+ const r$c = {
2098
2098
  name: "minus",
2099
2099
  size: "",
2100
2100
  classPrefix: "nut-icon",
@@ -2108,7 +2108,7 @@ var __publicField = (obj, key, value) => {
2108
2108
  function y$b(n) {
2109
2109
  return n === "" ? "" : Number.isNaN(Number(n)) ? String(n) : `${n}px`;
2110
2110
  }
2111
- function a$b(n) {
2111
+ function a$c(n) {
2112
2112
  const {
2113
2113
  name: e,
2114
2114
  size: l,
@@ -2122,7 +2122,7 @@ var __publicField = (obj, key, value) => {
2122
2122
  onClick: o,
2123
2123
  ...h
2124
2124
  } = {
2125
- ...r$b,
2125
+ ...r$c,
2126
2126
  ...n
2127
2127
  }, c = e ? e.indexOf("/") !== -1 : false, g = c ? "img" : u, C = (x) => {
2128
2128
  o && o(x);
@@ -2143,8 +2143,59 @@ var __publicField = (obj, key, value) => {
2143
2143
  N
2144
2144
  );
2145
2145
  }
2146
+ a$c.defaultProps = r$c;
2147
+ a$c.displayName = "NutIconminus";
2148
+ const r$b = {
2149
+ name: "my",
2150
+ size: "",
2151
+ classPrefix: "nut-icon",
2152
+ fontClassName: "nutui-iconfont",
2153
+ color: "",
2154
+ tag: "i",
2155
+ onClick: (e) => {
2156
+ },
2157
+ className: ""
2158
+ };
2159
+ function $(e) {
2160
+ return e === "" ? "" : Number.isNaN(Number(e)) ? String(e) : `${e}px`;
2161
+ }
2162
+ function a$b(e) {
2163
+ const {
2164
+ name: t,
2165
+ size: l,
2166
+ classPrefix: f,
2167
+ color: m,
2168
+ tag: u,
2169
+ children: N,
2170
+ className: i,
2171
+ fontClassName: p,
2172
+ style: d,
2173
+ onClick: o,
2174
+ ...h
2175
+ } = {
2176
+ ...r$b,
2177
+ ...e
2178
+ }, c = t ? t.indexOf("/") !== -1 : false, g = c ? "img" : u, y2 = (k) => {
2179
+ o && o(k);
2180
+ }, C = () => c ? { src: t } : {}, n = {}, s = $(l);
2181
+ return s && (n.fontSize = s, n.width = s, n.height = s), React.createElement(
2182
+ g,
2183
+ {
2184
+ className: c ? `nut-icon__img ${i || ""} ` : `${p} nut-icon ${f}-${t} ${i || ""}`,
2185
+ style: {
2186
+ color: m,
2187
+ ...n,
2188
+ ...d
2189
+ },
2190
+ ...h,
2191
+ onClick: y2,
2192
+ ...C()
2193
+ },
2194
+ N
2195
+ );
2196
+ }
2146
2197
  a$b.defaultProps = r$b;
2147
- a$b.displayName = "NutIconminus";
2198
+ a$b.displayName = "NutIconmy";
2148
2199
  const r$a = {
2149
2200
  name: "notice",
2150
2201
  size: "",
@@ -2793,7 +2844,7 @@ var __publicField = (obj, key, value) => {
2793
2844
  style: { ...getStyle(), ...style },
2794
2845
  onClick: (e) => handleClick(e),
2795
2846
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-button__warp", children: [
2796
- loading && /* @__PURE__ */ jsxRuntimeExports.jsx(r$e, { className: "nut-icon-loading" }),
2847
+ loading && /* @__PURE__ */ jsxRuntimeExports.jsx(r$f, { className: "nut-icon-loading" }),
2797
2848
  !loading && icon ? icon : null,
2798
2849
  children && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: icon || loading ? "nut-button-text" : "", children })
2799
2850
  ] })
@@ -2813,7 +2864,7 @@ var __publicField = (obj, key, value) => {
2813
2864
  onClick: (event) => {
2814
2865
  }
2815
2866
  };
2816
- const classPrefix$8 = "nut-cell";
2867
+ const classPrefix$f = "nut-cell";
2817
2868
  const Cell = (props) => {
2818
2869
  const {
2819
2870
  children,
@@ -2844,24 +2895,24 @@ var __publicField = (obj, key, value) => {
2844
2895
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
2845
2896
  "div",
2846
2897
  {
2847
- className: classNames(classPrefix$8, className),
2898
+ className: classNames(classPrefix$f, className),
2848
2899
  onClick: (event) => handleClick(event),
2849
2900
  style: baseStyle,
2850
2901
  ...rest,
2851
2902
  children: children || /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
2852
- title || description ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix$8}__left`, children: [
2853
- title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$8}__title`, children: title }) : null,
2854
- description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$8}__description`, children: description }) : null
2903
+ title || description ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix$f}__left`, children: [
2904
+ title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$f}__title`, children: title }) : null,
2905
+ description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$f}__description`, children: description }) : null
2855
2906
  ] }) : null,
2856
2907
  extra ? /* @__PURE__ */ jsxRuntimeExports.jsx(
2857
2908
  "div",
2858
2909
  {
2859
- className: `${classPrefix$8}__extra`,
2910
+ className: `${classPrefix$f}__extra`,
2860
2911
  style: styles,
2861
2912
  children: extra
2862
2913
  }
2863
2914
  ) : null,
2864
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$8}__divider` })
2915
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$f}__divider` })
2865
2916
  ] })
2866
2917
  }
2867
2918
  );
@@ -2871,18 +2922,25 @@ var __publicField = (obj, key, value) => {
2871
2922
  const defaultProps$1r = {
2872
2923
  ...ComponentDefaults,
2873
2924
  title: "",
2874
- description: ""
2925
+ description: "",
2926
+ divider: true
2875
2927
  };
2876
- const classPrefix$7 = "nut-cell-group";
2928
+ const classPrefix$e = "nut-cell-group";
2877
2929
  const CellGroup = (props) => {
2878
- const { children, className, style, title, description, ...rest } = {
2930
+ const { children, className, style, title, description, divider, ...rest } = {
2879
2931
  ...defaultProps$1r,
2880
2932
  ...props
2881
2933
  };
2882
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classNames(classPrefix$7, className), ...rest, children: [
2883
- title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$7}__title`, children: title }) : null,
2884
- description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$7}__description`, children: description }) : null,
2885
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$7}__wrap`, children })
2934
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classNames(classPrefix$e, className), ...rest, children: [
2935
+ title ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$e}__title`, children: title }) : null,
2936
+ description ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$e}__description`, children: description }) : null,
2937
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
2938
+ "div",
2939
+ {
2940
+ className: `${classPrefix$e}__wrap ${divider ? `${classPrefix$e}__wrap--divider` : ""}`,
2941
+ children
2942
+ }
2943
+ )
2886
2944
  ] });
2887
2945
  };
2888
2946
  CellGroup.defaultProps = defaultProps$1r;
@@ -3429,8 +3487,8 @@ var __publicField = (obj, key, value) => {
3429
3487
  onError: error
3430
3488
  }
3431
3489
  ),
3432
- showLoading && loading ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-loading", children: slotLoding || children || /* @__PURE__ */ jsxRuntimeExports.jsx(r$i, {}) }) : null,
3433
- showError && isError && !loading ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-error", children: slotError || children || /* @__PURE__ */ jsxRuntimeExports.jsx(a$j, {}) }) : null
3490
+ showLoading && loading ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-loading", children: slotLoding || children || /* @__PURE__ */ jsxRuntimeExports.jsx(r$j, {}) }) : null,
3491
+ showError && isError && !loading ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-img-error", children: slotError || children || /* @__PURE__ */ jsxRuntimeExports.jsx(a$k, {}) }) : null
3434
3492
  ]
3435
3493
  }
3436
3494
  );
@@ -3577,21 +3635,21 @@ var __publicField = (obj, key, value) => {
3577
3635
  contentPosition: "center",
3578
3636
  direction: "horizontal"
3579
3637
  };
3580
- const classPrefix$6 = `nut-divider`;
3638
+ const classPrefix$d = `nut-divider`;
3581
3639
  const Divider = (props) => {
3582
3640
  const { children, contentPosition, style, className, direction, ...rest } = {
3583
3641
  ...defaultProps$1n,
3584
3642
  ...props
3585
3643
  };
3586
3644
  const classes = direction === "horizontal" ? classNames({
3587
- [`${classPrefix$6}`]: true,
3588
- [`${classPrefix$6}__center`]: children,
3589
- [`${classPrefix$6}__left`]: contentPosition === "left",
3590
- [`${classPrefix$6}__right`]: contentPosition === "right",
3591
- [`${classPrefix$6}__hairline`]: true
3645
+ [`${classPrefix$d}`]: true,
3646
+ [`${classPrefix$d}__center`]: children,
3647
+ [`${classPrefix$d}__left`]: contentPosition === "left",
3648
+ [`${classPrefix$d}__right`]: contentPosition === "right",
3649
+ [`${classPrefix$d}__hairline`]: true
3592
3650
  }) : classNames({
3593
- [`${classPrefix$6}`]: true,
3594
- [`${classPrefix$6}__vertical`]: direction === "vertical"
3651
+ [`${classPrefix$d}`]: true,
3652
+ [`${classPrefix$d}__vertical`]: direction === "vertical"
3595
3653
  });
3596
3654
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classes} ${className || ""}`, style, ...rest, children });
3597
3655
  };
@@ -3755,7 +3813,7 @@ var __publicField = (obj, key, value) => {
3755
3813
  };
3756
3814
  Layout.defaultProps = defaultProps$1k;
3757
3815
  Layout.displayName = "NutLayout";
3758
- const classPrefix$5 = "nut-row";
3816
+ const classPrefix$c = "nut-row";
3759
3817
  const defaultProps$1j = {
3760
3818
  ...ComponentDefaults,
3761
3819
  type: "",
@@ -3790,7 +3848,7 @@ var __publicField = (obj, key, value) => {
3790
3848
  ${getClass("justify", justify)}
3791
3849
  ${getClass("align", align)}
3792
3850
  ${getClass("flex", wrap)}
3793
- ${classPrefix$5}
3851
+ ${classPrefix$c}
3794
3852
  `;
3795
3853
  };
3796
3854
  const parentRow = {
@@ -3866,7 +3924,7 @@ var __publicField = (obj, key, value) => {
3866
3924
  position: "top",
3867
3925
  zIndex: 2e3
3868
3926
  };
3869
- const classPrefix$4 = "nut-sticky";
3927
+ const classPrefix$b = "nut-sticky";
3870
3928
  const Sticky = (props) => {
3871
3929
  const {
3872
3930
  position,
@@ -3968,7 +4026,7 @@ var __publicField = (obj, key, value) => {
3968
4026
  {
3969
4027
  ref: rootRef,
3970
4028
  style: rootStyle,
3971
- className: classNames(classPrefix$4, className),
4029
+ className: classNames(classPrefix$b, className),
3972
4030
  ...rest,
3973
4031
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
3974
4032
  "div",
@@ -4084,6 +4142,7 @@ var __publicField = (obj, key, value) => {
4084
4142
  const [scrollStart, setScrollStart] = React.useState(false);
4085
4143
  const state = React.useRef(initData);
4086
4144
  const [scrollTop, setScrollTop] = React.useState(0);
4145
+ const [scrollY, setScrollY] = React.useState(0);
4087
4146
  const resetScrollState = () => {
4088
4147
  setScrollStart(false);
4089
4148
  };
@@ -4121,7 +4180,11 @@ var __publicField = (obj, key, value) => {
4121
4180
  cacheIndex = state.current.listHeight.length - 2;
4122
4181
  }
4123
4182
  setCodeIndex(cacheIndex);
4124
- setScrollTop(state.current.listHeight[cacheIndex]);
4183
+ const scrollTop2 = state.current.listHeight[cacheIndex];
4184
+ setScrollTop(scrollTop2);
4185
+ if (sticky && scrollY !== scrollTop2) {
4186
+ setScrollY(Math.floor(scrollTop2) > 0 ? 1 : 0);
4187
+ }
4125
4188
  };
4126
4189
  const touchMove = (e) => {
4127
4190
  const firstTouch = e.touches[0];
@@ -4169,7 +4232,10 @@ var __publicField = (obj, key, value) => {
4169
4232
  const target = e.target;
4170
4233
  const { scrollTop: scrollTop2 } = target;
4171
4234
  state.current.scrollY = Math.floor(scrollTop2);
4172
- setScrollTop(scrollTop2);
4235
+ Taro.getEnv() === "WEB" && setScrollTop(scrollTop2);
4236
+ if (sticky && scrollTop2 !== scrollY) {
4237
+ setScrollY(Math.floor(scrollTop2) > 0 ? 1 : 0);
4238
+ }
4173
4239
  for (let i = 0; i < listHeight.length - 1; i++) {
4174
4240
  const height1 = listHeight[i];
4175
4241
  const height2 = listHeight[i + 1];
@@ -4178,7 +4244,6 @@ var __publicField = (obj, key, value) => {
4178
4244
  return;
4179
4245
  }
4180
4246
  }
4181
- setCurrentIndex(listHeight.length - 2);
4182
4247
  };
4183
4248
  React.useEffect(() => {
4184
4249
  if (listview.current) {
@@ -4188,7 +4253,6 @@ var __publicField = (obj, key, value) => {
4188
4253
  }
4189
4254
  }, [listview]);
4190
4255
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix2} ${className}`, style, ...rest, children: [
4191
- sticky && scrollTop > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__list__fixed`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `${classPrefix2}__list__fixed__title`, children: list[currentIndex][floorKey] }) }) : null,
4192
4256
  /* @__PURE__ */ jsxRuntimeExports.jsx(
4193
4257
  "div",
4194
4258
  {
@@ -4199,6 +4263,8 @@ var __publicField = (obj, key, value) => {
4199
4263
  {
4200
4264
  scrollTop,
4201
4265
  scrollY: true,
4266
+ scrollWithAnimation: true,
4267
+ scrollAnchoring: true,
4202
4268
  className: `${classPrefix2}__list__inner`,
4203
4269
  type: "list",
4204
4270
  ref: listview,
@@ -4267,7 +4333,8 @@ var __publicField = (obj, key, value) => {
4267
4333
  );
4268
4334
  })
4269
4335
  }
4270
- ) })
4336
+ ) }),
4337
+ sticky && scrollY > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__list__fixed`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `${classPrefix2}__list__fixed__title`, children: list[currentIndex][floorKey] }) }) : null
4271
4338
  ] });
4272
4339
  };
4273
4340
  Elevator.defaultProps = defaultProps$1g;
@@ -4353,7 +4420,7 @@ var __publicField = (obj, key, value) => {
4353
4420
  );
4354
4421
  }) }) }),
4355
4422
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__btn`, onClick: () => onUpdateValue(), children: content || /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
4356
- /* @__PURE__ */ jsxRuntimeExports.jsx(a$g, { color: "#fff" }),
4423
+ /* @__PURE__ */ jsxRuntimeExports.jsx(a$h, { color: "#fff" }),
4357
4424
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text", children: visible ? activeText || locale.fixednav.activeText : inactiveText || locale.fixednav.inactiveText })
4358
4425
  ] }) })
4359
4426
  ]
@@ -6303,7 +6370,7 @@ var __publicField = (obj, key, value) => {
6303
6370
  };
6304
6371
  const renderIcon = () => {
6305
6372
  if (closeable) {
6306
- return /* @__PURE__ */ jsxRuntimeExports.jsx(components.View, { className: closeClasses, onClick: onHandleClickCloseIcon, children: React.isValidElement(closeIcon) ? closeIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$n, { width: 12, height: 12 }) });
6373
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(components.View, { className: closeClasses, onClick: onHandleClickCloseIcon, children: React.isValidElement(closeIcon) ? closeIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$o, { width: 12, height: 12 }) });
6307
6374
  }
6308
6375
  return null;
6309
6376
  };
@@ -6508,288 +6575,189 @@ var __publicField = (obj, key, value) => {
6508
6575
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-subsidenavbar__content", children })
6509
6576
  ] });
6510
6577
  };
6511
- var classnameExports = {};
6512
- var classname = {
6513
- get exports() {
6514
- return classnameExports;
6515
- },
6516
- set exports(v) {
6517
- classnameExports = v;
6578
+ function usePropsValue({
6579
+ value,
6580
+ defaultValue,
6581
+ finalValue,
6582
+ onChange = (value2) => {
6583
+ }
6584
+ }) {
6585
+ const [uncontrolled, setUncontrolled] = React.useState(
6586
+ defaultValue !== void 0 ? defaultValue : finalValue
6587
+ );
6588
+ const handleUncontrolledChange = (val) => {
6589
+ setUncontrolled(val);
6590
+ onChange == null ? void 0 : onChange(val);
6591
+ };
6592
+ if (value !== void 0) {
6593
+ return [value, onChange];
6518
6594
  }
6595
+ return [uncontrolled, handleUncontrolledChange];
6596
+ }
6597
+ const defaultProps$1a = {
6598
+ ...ComponentDefaults,
6599
+ value: "",
6600
+ dot: false,
6601
+ max: 99,
6602
+ top: "0",
6603
+ right: "5",
6604
+ color: ""
6519
6605
  };
6520
- var classname_production_min = {};
6521
- var hasRequiredClassname_production_min;
6522
- function requireClassname_production_min() {
6523
- if (hasRequiredClassname_production_min)
6524
- return classname_production_min;
6525
- hasRequiredClassname_production_min = 1;
6526
- function r2(r3) {
6527
- function t2(t3, i, a2, o) {
6528
- var f = i ? e + t3 + r3.e + i : e + t3, v = f;
6529
- if (a2) {
6530
- var s = " " + v + r3.m;
6531
- for (var u in a2)
6532
- if (a2.hasOwnProperty(u)) {
6533
- var p = a2[u];
6534
- true === p ? v += s + u : p && (v += s + u + n + p);
6535
- }
6536
- }
6537
- if (void 0 !== o)
6538
- for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
6539
- var l = o[y2];
6540
- if (l && "string" == typeof l.valueOf())
6541
- for (var g = l.valueOf().split(" "), d = 0; d < g.length; d++) {
6542
- var h = g[d];
6543
- h !== f && (v += " " + h);
6544
- }
6545
- }
6546
- return v;
6606
+ const Badge = (props) => {
6607
+ const { className, style, value, max, children, dot, top, right, color } = {
6608
+ ...defaultProps$1a,
6609
+ ...props
6610
+ };
6611
+ const classPrefix2 = "nut-badge";
6612
+ const classes = classNames(classPrefix2, className);
6613
+ const contentClasses = classNames(
6614
+ { [`${classPrefix2}__dot`]: dot },
6615
+ `${classPrefix2}__content`,
6616
+ `${classPrefix2}__sup`
6617
+ );
6618
+ function content() {
6619
+ if (dot || typeof value === "object")
6620
+ return null;
6621
+ if (typeof value === "number" && typeof max === "number") {
6622
+ return max < value ? `${max}+` : value;
6547
6623
  }
6548
- var e = r3.n || "", n = r3.v || r3.m;
6549
- return function(r4, e2) {
6550
- return function(n2, i, a2) {
6551
- return "string" == typeof n2 ? "string" == typeof i || Array.isArray(i) ? t2(r4, n2, void 0, i) : t2(r4, n2, i, a2) : t2(r4, e2, n2, i);
6552
- };
6553
- };
6624
+ return value;
6554
6625
  }
6555
- Object.defineProperty(classname_production_min, "__esModule", { value: true });
6556
- var t = r2({ e: "-", m: "_" });
6557
- classname_production_min.cn = t, classname_production_min.withNaming = r2;
6558
- return classname_production_min;
6559
- }
6560
- var classname_development = {};
6561
- var hasRequiredClassname_development;
6562
- function requireClassname_development() {
6563
- if (hasRequiredClassname_development)
6564
- return classname_development;
6565
- hasRequiredClassname_development = 1;
6566
- Object.defineProperty(classname_development, "__esModule", { value: true });
6567
- function withNaming(preset) {
6568
- var nameSpace = preset.n || "";
6569
- var modValueDelimiter = preset.v || preset.m;
6570
- function stringify(b2, e, m, mix) {
6571
- var entityName = e ? nameSpace + b2 + preset.e + e : nameSpace + b2;
6572
- var className = entityName;
6573
- if (m) {
6574
- var modPrefix = " " + className + preset.m;
6575
- for (var k in m) {
6576
- if (m.hasOwnProperty(k)) {
6577
- var modVal = m[k];
6578
- if (modVal === true) {
6579
- className += modPrefix + k;
6580
- } else if (modVal) {
6581
- className += modPrefix + k + modValueDelimiter + modVal;
6582
- }
6583
- }
6584
- }
6585
- }
6586
- if (mix !== void 0) {
6587
- mix = Array.isArray(mix) ? mix : [mix];
6588
- for (var i = 0, len = mix.length; i < len; i++) {
6589
- var value = mix[i];
6590
- if (!value || typeof value.valueOf() !== "string")
6591
- continue;
6592
- var mixes = value.valueOf().split(" ");
6593
- for (var j = 0; j < mixes.length; j++) {
6594
- var val = mixes[j];
6595
- if (val !== entityName) {
6596
- className += " " + val;
6597
- }
6598
- }
6599
- }
6600
- }
6601
- return className;
6602
- }
6603
- return function cnGenerator(b2, e) {
6604
- return function(elemOrMods, elemModsOrBlockMix, elemMix) {
6605
- if (typeof elemOrMods === "string") {
6606
- if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
6607
- return stringify(b2, elemOrMods, void 0, elemModsOrBlockMix);
6608
- }
6609
- return stringify(b2, elemOrMods, elemModsOrBlockMix, elemMix);
6610
- }
6611
- return stringify(b2, e, elemOrMods, elemModsOrBlockMix);
6612
- };
6613
- };
6614
- }
6615
- var cn2 = withNaming({
6616
- e: "-",
6617
- m: "_"
6618
- });
6619
- classname_development.cn = cn2;
6620
- classname_development.withNaming = withNaming;
6621
- return classname_development;
6622
- }
6623
- (function(module2) {
6624
- if (process.env.NODE_ENV === "production") {
6625
- module2.exports = requireClassname_production_min();
6626
- } else {
6627
- module2.exports = requireClassname_development();
6628
- }
6629
- })(classname);
6630
- const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
6631
- const defaultProps$1a = {
6632
- visible: 0,
6633
- bottom: false,
6634
- size: 20,
6635
- unactiveColor: "",
6636
- activeColor: "",
6637
- safeAreaInsetBottom: false,
6638
- className: "",
6639
- style: {},
6640
- onSwitch: (child, activeVisible) => {
6626
+ const getStyle = () => {
6627
+ const style2 = {};
6628
+ style2.top = `${Number(top) || parseFloat(top) || 0}px`;
6629
+ style2.right = `${Number(right) || parseFloat(right) || 0}px`;
6630
+ style2.background = color;
6631
+ return style2;
6632
+ };
6633
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes, style, children: [
6634
+ typeof value === "object" && value && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__icon`, children: value }),
6635
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children }),
6636
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: contentClasses, style: getStyle(), children: content() })
6637
+ ] });
6638
+ };
6639
+ Badge.defaultProps = defaultProps$1a;
6640
+ Badge.displayName = "NutBadge";
6641
+ const defaultProps$19 = {
6642
+ ...ComponentDefaults,
6643
+ title: "",
6644
+ icon: null,
6645
+ active: false,
6646
+ index: 0,
6647
+ handleClick: (idx) => {
6641
6648
  }
6642
6649
  };
6643
- const Tabbar = (props) => {
6650
+ const TabbarItem = (props) => {
6644
6651
  const {
6645
- children,
6646
- visible,
6647
- activeVisible,
6648
- bottom,
6649
- size,
6650
- activeColor,
6651
- unactiveColor,
6652
- safeAreaInsetBottom,
6653
6652
  className,
6654
6653
  style,
6655
- onSwitch
6654
+ title,
6655
+ icon,
6656
+ active,
6657
+ activeColor,
6658
+ inactiveColor,
6659
+ index,
6660
+ handleClick,
6661
+ ...rest
6656
6662
  } = {
6657
- ...defaultProps$1a,
6663
+ ...defaultProps$19,
6658
6664
  ...props
6659
6665
  };
6660
- const b2 = cn("tabbar");
6661
- const [selectIndex, setSelectIndex] = React.useState(activeVisible || visible);
6662
- const handleClick = (idx) => {
6663
- if (!("activeVisible" in props)) {
6664
- setSelectIndex(idx);
6665
- }
6666
- };
6667
- React.useEffect(() => {
6668
- if (activeVisible !== void 0) {
6669
- setSelectIndex(activeVisible);
6670
- }
6671
- }, [activeVisible]);
6666
+ const classPrefix2 = "nut-tabbar-item";
6667
+ const tabbarItemClass = classNames(className, classPrefix2, {
6668
+ [`${classPrefix2}-active`]: active
6669
+ });
6670
+ const boxPrefix = `${classPrefix2}__icon-box`;
6671
+ const titleClass = classNames(boxPrefix, `${boxPrefix}-nav`, {
6672
+ [`${boxPrefix}-large`]: !icon
6673
+ });
6672
6674
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
6673
6675
  "div",
6674
6676
  {
6675
- className: [
6676
- `${b2()}`,
6677
- bottom ? `${b2("bottom")}` : "",
6678
- safeAreaInsetBottom ? `${b2("bottom")} ${b2("safebottom")}` : "",
6679
- className
6680
- ].join(" "),
6681
- style,
6682
- children: React.Children.map(children, (child, idx) => {
6683
- if (!React.isValidElement(child)) {
6684
- return null;
6685
- }
6686
- const childProps = {
6687
- ...child.props,
6688
- active: idx === selectIndex,
6689
- index: idx,
6690
- unactiveColor,
6691
- activeColor,
6692
- size,
6693
- handleClick: () => {
6694
- handleClick(idx);
6695
- onSwitch(child, idx);
6696
- }
6697
- };
6698
- return React.cloneElement(child, childProps);
6699
- })
6677
+ className: tabbarItemClass,
6678
+ style: {
6679
+ color: active ? activeColor : inactiveColor,
6680
+ ...style
6681
+ },
6682
+ onClick: () => handleClick(index),
6683
+ children: icon ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
6684
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: boxPrefix, children: icon }) }),
6685
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: titleClass, children: title })
6686
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: titleClass, children: title }) })
6700
6687
  }
6701
6688
  );
6702
6689
  };
6703
- Tabbar.defaultProps = defaultProps$1a;
6704
- Tabbar.displayName = "NutTabbar";
6705
- const defaultProps$19 = {
6690
+ const defaultProps$18 = {
6706
6691
  ...ComponentDefaults,
6707
- dot: false,
6708
- className: "",
6709
- tabTitle: "",
6710
- icon: null,
6711
- href: "",
6712
- to: "",
6713
- num: "",
6714
- active: false,
6692
+ defaultValue: 0,
6693
+ fixed: false,
6694
+ inactiveColor: "",
6715
6695
  activeColor: "",
6716
- unactiveColor: "",
6717
- index: 0,
6718
- handleClick: (idx) => {
6696
+ safeArea: false,
6697
+ onSwitch: (value) => {
6719
6698
  }
6720
6699
  };
6721
- const TabbarItem = (props) => {
6700
+ const Tabbar = (props) => {
6722
6701
  const {
6723
- dot,
6702
+ children,
6703
+ defaultValue,
6704
+ value,
6705
+ fixed,
6706
+ activeColor,
6707
+ inactiveColor,
6708
+ safeArea,
6724
6709
  className,
6725
6710
  style,
6726
- tabTitle,
6727
- icon,
6728
- href,
6729
- to: to2,
6730
- num,
6731
- active,
6732
- activeColor,
6733
- unactiveColor,
6734
- index,
6735
- handleClick
6711
+ onSwitch
6736
6712
  } = {
6737
- ...defaultProps$19,
6713
+ ...defaultProps$18,
6738
6714
  ...props
6739
6715
  };
6740
- const b2 = cn("tabbar-item");
6741
- const bIcon = cn("tabbar-item__icon-box");
6742
- React.useEffect(() => {
6743
- if (active && href) {
6744
- window.location.href = href;
6745
- return;
6746
- }
6747
- if (active && to2) {
6748
- Taro.navigateTo({
6749
- url: to2
6750
- });
6751
- }
6752
- }, [active, href, to2]);
6716
+ const classPrefix2 = "nut-tabbar";
6717
+ const [selectIndex, setSelectIndex] = usePropsValue({
6718
+ value,
6719
+ defaultValue,
6720
+ finalValue: 0,
6721
+ onChange: onSwitch
6722
+ });
6753
6723
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
6754
6724
  "div",
6755
6725
  {
6756
- className: `${b2({ active })} ${className}`,
6757
- style: {
6758
- ...style,
6759
- color: active ? activeColor : unactiveColor
6760
- },
6761
- onClick: () => {
6762
- handleClick(index);
6763
- },
6726
+ className: classNames(classPrefix2, className, {
6727
+ [`${classPrefix2}__fixed`]: fixed
6728
+ }),
6729
+ style,
6764
6730
  children: [
6765
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${bIcon()}`, children: [
6766
- !dot ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
6767
- num && num <= 99 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${bIcon("tips", [bIcon("num")])}`, children: num }),
6768
- num && num >= 100 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${bIcon("tips", [bIcon("nums")])}`, children: "99+" })
6769
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${bIcon("tips", [bIcon("dot")])}` }),
6770
- icon || null
6771
- ] }),
6772
- tabTitle && /* @__PURE__ */ jsxRuntimeExports.jsx(
6773
- "div",
6774
- {
6775
- className: bIcon({ "nav-word": true }, [
6776
- bIcon({ "big-word": !icon })
6777
- ]),
6778
- children: tabTitle
6731
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__wrap`, children: React.Children.map(children, (child, idx) => {
6732
+ if (!React.isValidElement(child)) {
6733
+ return null;
6779
6734
  }
6780
- )
6735
+ const childProps = {
6736
+ ...child.props,
6737
+ active: idx === selectIndex,
6738
+ index: idx,
6739
+ inactiveColor,
6740
+ activeColor,
6741
+ handleClick: setSelectIndex
6742
+ };
6743
+ return React.cloneElement(child, childProps);
6744
+ }) }),
6745
+ (fixed || safeArea) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__safe-area` })
6781
6746
  ]
6782
6747
  }
6783
6748
  );
6784
6749
  };
6785
- const defaultProps$18 = {
6750
+ Tabbar.defaultProps = defaultProps$18;
6751
+ Tabbar.displayName = "NutTabbar";
6752
+ Tabbar.Item = TabbarItem;
6753
+ const defaultProps$17 = {
6786
6754
  title: "",
6787
6755
  value: "",
6788
6756
  disabled: false
6789
6757
  };
6790
6758
  const TabPane = (props) => {
6791
6759
  const { children, autoHeightClassName, className, disabled } = {
6792
- ...defaultProps$18,
6760
+ ...defaultProps$17,
6793
6761
  ...props
6794
6762
  };
6795
6763
  const classPrefix2 = "nut-tabpane";
@@ -6803,26 +6771,7 @@ var __publicField = (obj, key, value) => {
6803
6771
  );
6804
6772
  return children ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes, children: !disabled && children }) : null;
6805
6773
  };
6806
- function usePropsValue({
6807
- value,
6808
- defaultValue,
6809
- finalValue,
6810
- onChange = (value2) => {
6811
- }
6812
- }) {
6813
- const [uncontrolled, setUncontrolled] = React.useState(
6814
- defaultValue !== void 0 ? defaultValue : finalValue
6815
- );
6816
- const handleUncontrolledChange = (val) => {
6817
- setUncontrolled(val);
6818
- onChange == null ? void 0 : onChange(val);
6819
- };
6820
- if (value !== void 0) {
6821
- return [value, onChange];
6822
- }
6823
- return [uncontrolled, handleUncontrolledChange];
6824
- }
6825
- const defaultProps$17 = {
6774
+ const defaultProps$16 = {
6826
6775
  ...ComponentDefaults,
6827
6776
  tabStyle: {},
6828
6777
  activeColor: "",
@@ -6831,7 +6780,7 @@ var __publicField = (obj, key, value) => {
6831
6780
  duration: 300,
6832
6781
  autoHeight: false
6833
6782
  };
6834
- const classPrefix$3 = "nut-tabs";
6783
+ const classPrefix$a = "nut-tabs";
6835
6784
  const Tabs = (props) => {
6836
6785
  const {
6837
6786
  activeColor,
@@ -6848,7 +6797,7 @@ var __publicField = (obj, key, value) => {
6848
6797
  autoHeight,
6849
6798
  ...rest
6850
6799
  } = {
6851
- ...defaultProps$17,
6800
+ ...defaultProps$16,
6852
6801
  ...props
6853
6802
  };
6854
6803
  const [value, setValue] = usePropsValue({
@@ -6878,14 +6827,14 @@ var __publicField = (obj, key, value) => {
6878
6827
  };
6879
6828
  const titles = React.useRef(getTitles());
6880
6829
  const classes = classNames(
6881
- classPrefix$3,
6882
- `${classPrefix$3}--${direction}`,
6830
+ classPrefix$a,
6831
+ `${classPrefix$a}--${direction}`,
6883
6832
  className
6884
6833
  );
6885
- const classesTitle = classNames(`${classPrefix$3}__titles`, {
6886
- [`${classPrefix$3}__titles--${activeType}`]: activeType,
6887
- [`${classPrefix$3}__titles--scrollable`]: true,
6888
- [`${classPrefix$3}__titles--${align}`]: align
6834
+ const classesTitle = classNames(`${classPrefix$a}__titles`, {
6835
+ [`${classPrefix$a}__titles--${activeType}`]: activeType,
6836
+ [`${classPrefix$a}__titles--scrollable`]: true,
6837
+ [`${classPrefix$a}__titles--${align}`]: align
6889
6838
  });
6890
6839
  const tabsActiveStyle = {
6891
6840
  color: activeType === "smile" ? activeColor : "",
@@ -6931,7 +6880,7 @@ var __publicField = (obj, key, value) => {
6931
6880
  onClick: (e) => {
6932
6881
  tabChange(item);
6933
6882
  },
6934
- className: classNames(`${classPrefix$3}__titles-item`, {
6883
+ className: classNames(`${classPrefix$a}__titles-item`, {
6935
6884
  [`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
6936
6885
  [`nut-tabs__titles-item--disabled`]: item.disabled,
6937
6886
  [`nut-tabs__titles-item--${align}`]: align
@@ -6940,16 +6889,16 @@ var __publicField = (obj, key, value) => {
6940
6889
  activeType === "line" && /* @__PURE__ */ jsxRuntimeExports.jsx(
6941
6890
  components.View,
6942
6891
  {
6943
- className: `${classPrefix$3}__titles-item__line`,
6892
+ className: `${classPrefix$a}__titles-item__line`,
6944
6893
  style: tabsActiveStyle
6945
6894
  }
6946
6895
  ),
6947
6896
  activeType === "smile" && /* @__PURE__ */ jsxRuntimeExports.jsx(
6948
6897
  components.View,
6949
6898
  {
6950
- className: `${classPrefix$3}__titles-item__smile`,
6899
+ className: `${classPrefix$a}__titles-item__smile`,
6951
6900
  style: tabsActiveStyle,
6952
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(a$h, { color: activeColor, width: 40, height: 20 })
6901
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(a$i, { color: activeColor, width: 40, height: 20 })
6953
6902
  }
6954
6903
  ),
6955
6904
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -6959,7 +6908,7 @@ var __publicField = (obj, key, value) => {
6959
6908
  {
6960
6909
  ellipsis: true
6961
6910
  },
6962
- `${classPrefix$3}__titles-item__text`
6911
+ `${classPrefix$a}__titles-item__text`
6963
6912
  ),
6964
6913
  children: item.title
6965
6914
  }
@@ -6971,7 +6920,7 @@ var __publicField = (obj, key, value) => {
6971
6920
  })
6972
6921
  }
6973
6922
  ),
6974
- /* @__PURE__ */ jsxRuntimeExports.jsx(components.View, { className: `${classPrefix$3}__content__wrap`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(components.View, { className: `${classPrefix$3}__content`, style: contentStyle, children: React.Children.map(children, (child, idx) => {
6923
+ /* @__PURE__ */ jsxRuntimeExports.jsx(components.View, { className: `${classPrefix$a}__content__wrap`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(components.View, { className: `${classPrefix$a}__content`, style: contentStyle, children: React.Children.map(children, (child, idx) => {
6975
6924
  if (!React.isValidElement(child)) {
6976
6925
  return null;
6977
6926
  }
@@ -6989,9 +6938,129 @@ var __publicField = (obj, key, value) => {
6989
6938
  }) }) })
6990
6939
  ] });
6991
6940
  };
6992
- Tabs.defaultProps = defaultProps$17;
6941
+ Tabs.defaultProps = defaultProps$16;
6993
6942
  Tabs.displayName = "NutTabs";
6994
6943
  Tabs.TabPane = TabPane;
6944
+ var classnameExports = {};
6945
+ var classname = {
6946
+ get exports() {
6947
+ return classnameExports;
6948
+ },
6949
+ set exports(v) {
6950
+ classnameExports = v;
6951
+ }
6952
+ };
6953
+ var classname_production_min = {};
6954
+ var hasRequiredClassname_production_min;
6955
+ function requireClassname_production_min() {
6956
+ if (hasRequiredClassname_production_min)
6957
+ return classname_production_min;
6958
+ hasRequiredClassname_production_min = 1;
6959
+ function r2(r3) {
6960
+ function t2(t3, i, a2, o) {
6961
+ var f = i ? e + t3 + r3.e + i : e + t3, v = f;
6962
+ if (a2) {
6963
+ var s = " " + v + r3.m;
6964
+ for (var u in a2)
6965
+ if (a2.hasOwnProperty(u)) {
6966
+ var p = a2[u];
6967
+ true === p ? v += s + u : p && (v += s + u + n + p);
6968
+ }
6969
+ }
6970
+ if (void 0 !== o)
6971
+ for (var y2 = 0, c = (o = Array.isArray(o) ? o : [o]).length; y2 < c; y2++) {
6972
+ var l = o[y2];
6973
+ if (l && "string" == typeof l.valueOf())
6974
+ for (var g = l.valueOf().split(" "), d = 0; d < g.length; d++) {
6975
+ var h = g[d];
6976
+ h !== f && (v += " " + h);
6977
+ }
6978
+ }
6979
+ return v;
6980
+ }
6981
+ var e = r3.n || "", n = r3.v || r3.m;
6982
+ return function(r4, e2) {
6983
+ return function(n2, i, a2) {
6984
+ return "string" == typeof n2 ? "string" == typeof i || Array.isArray(i) ? t2(r4, n2, void 0, i) : t2(r4, n2, i, a2) : t2(r4, e2, n2, i);
6985
+ };
6986
+ };
6987
+ }
6988
+ Object.defineProperty(classname_production_min, "__esModule", { value: true });
6989
+ var t = r2({ e: "-", m: "_" });
6990
+ classname_production_min.cn = t, classname_production_min.withNaming = r2;
6991
+ return classname_production_min;
6992
+ }
6993
+ var classname_development = {};
6994
+ var hasRequiredClassname_development;
6995
+ function requireClassname_development() {
6996
+ if (hasRequiredClassname_development)
6997
+ return classname_development;
6998
+ hasRequiredClassname_development = 1;
6999
+ Object.defineProperty(classname_development, "__esModule", { value: true });
7000
+ function withNaming(preset) {
7001
+ var nameSpace = preset.n || "";
7002
+ var modValueDelimiter = preset.v || preset.m;
7003
+ function stringify(b2, e, m, mix) {
7004
+ var entityName = e ? nameSpace + b2 + preset.e + e : nameSpace + b2;
7005
+ var className = entityName;
7006
+ if (m) {
7007
+ var modPrefix = " " + className + preset.m;
7008
+ for (var k in m) {
7009
+ if (m.hasOwnProperty(k)) {
7010
+ var modVal = m[k];
7011
+ if (modVal === true) {
7012
+ className += modPrefix + k;
7013
+ } else if (modVal) {
7014
+ className += modPrefix + k + modValueDelimiter + modVal;
7015
+ }
7016
+ }
7017
+ }
7018
+ }
7019
+ if (mix !== void 0) {
7020
+ mix = Array.isArray(mix) ? mix : [mix];
7021
+ for (var i = 0, len = mix.length; i < len; i++) {
7022
+ var value = mix[i];
7023
+ if (!value || typeof value.valueOf() !== "string")
7024
+ continue;
7025
+ var mixes = value.valueOf().split(" ");
7026
+ for (var j = 0; j < mixes.length; j++) {
7027
+ var val = mixes[j];
7028
+ if (val !== entityName) {
7029
+ className += " " + val;
7030
+ }
7031
+ }
7032
+ }
7033
+ }
7034
+ return className;
7035
+ }
7036
+ return function cnGenerator(b2, e) {
7037
+ return function(elemOrMods, elemModsOrBlockMix, elemMix) {
7038
+ if (typeof elemOrMods === "string") {
7039
+ if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
7040
+ return stringify(b2, elemOrMods, void 0, elemModsOrBlockMix);
7041
+ }
7042
+ return stringify(b2, elemOrMods, elemModsOrBlockMix, elemMix);
7043
+ }
7044
+ return stringify(b2, e, elemOrMods, elemModsOrBlockMix);
7045
+ };
7046
+ };
7047
+ }
7048
+ var cn2 = withNaming({
7049
+ e: "-",
7050
+ m: "_"
7051
+ });
7052
+ classname_development.cn = cn2;
7053
+ classname_development.withNaming = withNaming;
7054
+ return classname_development;
7055
+ }
7056
+ (function(module2) {
7057
+ if (process.env.NODE_ENV === "production") {
7058
+ module2.exports = requireClassname_production_min();
7059
+ } else {
7060
+ module2.exports = requireClassname_development();
7061
+ }
7062
+ })(classname);
7063
+ const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
6995
7064
  const defaultConfigRef = {
6996
7065
  current: {
6997
7066
  locale: zhCN
@@ -7004,7 +7073,7 @@ var __publicField = (obj, key, value) => {
7004
7073
  const useConfig = () => {
7005
7074
  return React.useContext(ConfigContext) ?? getDefaultConfig();
7006
7075
  };
7007
- const defaultProps$16 = {
7076
+ const defaultProps$15 = {
7008
7077
  type: "custom",
7009
7078
  existAddress: [],
7010
7079
  defaultIcon: null,
@@ -7026,7 +7095,7 @@ var __publicField = (obj, key, value) => {
7026
7095
  onClose,
7027
7096
  onSwitchModule,
7028
7097
  ...rest
7029
- } = { ...defaultProps$16, ...props };
7098
+ } = { ...defaultProps$15, ...props };
7030
7099
  const b2 = cn("address");
7031
7100
  const selectedExist = (item) => {
7032
7101
  const copyExistAdd = existAddress;
@@ -7068,7 +7137,7 @@ var __publicField = (obj, key, value) => {
7068
7137
  isShowCustomAddress && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b2("choose-other"), onClick: onSwitch, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b2("choose-other-btn"), children: customAndExistTitle || locale.address.chooseAnotherAddress }) })
7069
7138
  ] });
7070
7139
  };
7071
- const defaultProps$15 = {
7140
+ const defaultProps$14 = {
7072
7141
  modelValue: [],
7073
7142
  type: "custom",
7074
7143
  province: [],
@@ -7093,7 +7162,7 @@ var __publicField = (obj, key, value) => {
7093
7162
  onClose,
7094
7163
  ...rest
7095
7164
  } = {
7096
- ...defaultProps$15,
7165
+ ...defaultProps$14,
7097
7166
  ...props
7098
7167
  };
7099
7168
  const b2 = cn("address");
@@ -7257,28 +7326,28 @@ var __publicField = (obj, key, value) => {
7257
7326
  nextAreaList(item);
7258
7327
  };
7259
7328
  React.useEffect(() => {
7260
- const { province: province2 } = { ...defaultProps$15, ...props };
7329
+ const { province: province2 } = { ...defaultProps$14, ...props };
7261
7330
  setRegionList({
7262
7331
  ...regionList,
7263
7332
  province: isCustom2() ? transformData(province2) : province2
7264
7333
  });
7265
7334
  }, [province]);
7266
7335
  React.useEffect(() => {
7267
- const { city: city2 } = { ...defaultProps$15, ...props };
7336
+ const { city: city2 } = { ...defaultProps$14, ...props };
7268
7337
  setRegionList({
7269
7338
  ...regionList,
7270
7339
  city: isCustom2() ? transformData(city2) : city2
7271
7340
  });
7272
7341
  }, [city]);
7273
7342
  React.useEffect(() => {
7274
- const { country: country2 } = { ...defaultProps$15, ...props };
7343
+ const { country: country2 } = { ...defaultProps$14, ...props };
7275
7344
  setRegionList({
7276
7345
  ...regionList,
7277
7346
  country: isCustom2() ? transformData(country2) : country2
7278
7347
  });
7279
7348
  }, [country]);
7280
7349
  React.useEffect(() => {
7281
- const { town: town2 } = { ...defaultProps$15, ...props };
7350
+ const { town: town2 } = { ...defaultProps$14, ...props };
7282
7351
  setRegionList({
7283
7352
  ...regionList,
7284
7353
  town: isCustom2() ? transformData(town2) : town2
@@ -7328,7 +7397,7 @@ var __publicField = (obj, key, value) => {
7328
7397
  },
7329
7398
  children: [
7330
7399
  selectedRegion && selectedRegion[tabName[tabIndex]].id === item.id && /* @__PURE__ */ jsxRuntimeExports.jsx(
7331
- a$r,
7400
+ a$s,
7332
7401
  {
7333
7402
  className: b2("region-item--icon"),
7334
7403
  color: "#FA2C19",
@@ -7351,7 +7420,7 @@ var __publicField = (obj, key, value) => {
7351
7420
  ) })
7352
7421
  ] });
7353
7422
  };
7354
- const defaultProps$14 = {
7423
+ const defaultProps$13 = {
7355
7424
  ...ComponentDefaults,
7356
7425
  modelValue: false,
7357
7426
  modelSelect: [],
@@ -7402,7 +7471,7 @@ var __publicField = (obj, key, value) => {
7402
7471
  className,
7403
7472
  ...rest
7404
7473
  } = {
7405
- ...defaultProps$14,
7474
+ ...defaultProps$13,
7406
7475
  ...props
7407
7476
  };
7408
7477
  const b2 = cn("address");
@@ -7492,9 +7561,9 @@ var __publicField = (obj, key, value) => {
7492
7561
  };
7493
7562
  const headerRender = () => {
7494
7563
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: b2("header"), children: [
7495
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "arrow-back", onClick: onSwitchModule, children: privateType === "custom" && (React.isValidElement(backBtnIcon) ? backBtnIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$g, { color: "#cccccc" })) }),
7564
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "arrow-back", onClick: onSwitchModule, children: privateType === "custom" && (React.isValidElement(backBtnIcon) ? backBtnIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$h, { color: "#cccccc" })) }),
7496
7565
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b2("header__title"), children: privateType === "custom" ? customAddressTitle || locale.address.selectRegion : existAddressTitle || locale.address.deliveryTo }),
7497
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { onClick: () => handClose(), children: React.isValidElement(closeBtnIcon) ? closeBtnIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$o, { size: 18, color: "#ccc" }) })
7566
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { onClick: () => handClose(), children: React.isValidElement(closeBtnIcon) ? closeBtnIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$p, { size: 18, color: "#ccc" }) })
7498
7567
  ] });
7499
7568
  };
7500
7569
  React.useEffect(() => {
@@ -7546,8 +7615,8 @@ var __publicField = (obj, key, value) => {
7546
7615
  {
7547
7616
  type: privateType,
7548
7617
  existAddress,
7549
- selectedIcon: React.isValidElement(selectedIcon) ? selectedIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$r, { color: "#FA2C19" }),
7550
- defaultIcon: React.isValidElement(defaultIcon) ? defaultIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(r$d, {}),
7618
+ selectedIcon: React.isValidElement(selectedIcon) ? selectedIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$s, { color: "#FA2C19" }),
7619
+ defaultIcon: React.isValidElement(defaultIcon) ? defaultIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(r$e, {}),
7551
7620
  isShowCustomAddress,
7552
7621
  customAndExistTitle: customAndExistTitle || locale.address.chooseAnotherAddress,
7553
7622
  onSelected: selectedExist,
@@ -7560,7 +7629,7 @@ var __publicField = (obj, key, value) => {
7560
7629
  }
7561
7630
  ) });
7562
7631
  };
7563
- Address.defaultProps = defaultProps$14;
7632
+ Address.defaultProps = defaultProps$13;
7564
7633
  Address.displayName = "NutAddress";
7565
7634
  const Utils = {
7566
7635
  /**
@@ -7693,7 +7762,7 @@ var __publicField = (obj, key, value) => {
7693
7762
  }
7694
7763
  }
7695
7764
  const requestAniFrame$1 = requestAniFrame();
7696
- const defaultProps$13 = {
7765
+ const defaultProps$12 = {
7697
7766
  type: "one",
7698
7767
  isAutoBackFill: false,
7699
7768
  poppable: true,
@@ -7745,7 +7814,7 @@ var __publicField = (obj, key, value) => {
7745
7814
  onUpdate,
7746
7815
  onSelected,
7747
7816
  onYearMonthChange
7748
- } = { ...defaultProps$13, ...props };
7817
+ } = { ...defaultProps$12, ...props };
7749
7818
  const weeks = locale.calendaritem.weekdays;
7750
7819
  const [yearMonthTitle, setYearMonthTitle] = React.useState("");
7751
7820
  const [monthsData, setMonthsData] = React.useState([]);
@@ -8350,9 +8419,9 @@ var __publicField = (obj, key, value) => {
8350
8419
  poppable && !isAutoBackFill ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-calendar-footer", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "calendar-confirm-btn", onClick: confirm, children: confirmText || locale.confirm }) }) : ""
8351
8420
  ] }) });
8352
8421
  });
8353
- CalendarItem.defaultProps = defaultProps$13;
8422
+ CalendarItem.defaultProps = defaultProps$12;
8354
8423
  CalendarItem.displayName = "NutCalendarItem";
8355
- const defaultProps$12 = {
8424
+ const defaultProps$11 = {
8356
8425
  type: "one",
8357
8426
  isAutoBackFill: false,
8358
8427
  poppable: true,
@@ -8408,7 +8477,7 @@ var __publicField = (obj, key, value) => {
8408
8477
  onChoose,
8409
8478
  onSelected,
8410
8479
  onYearMonthChange
8411
- } = { ...defaultProps$12, ...props };
8480
+ } = { ...defaultProps$11, ...props };
8412
8481
  const calendarRef = React.useRef(null);
8413
8482
  const close = () => {
8414
8483
  onClose && onClose();
@@ -8478,9 +8547,9 @@ var __publicField = (obj, key, value) => {
8478
8547
  }
8479
8548
  ) : renderItem() });
8480
8549
  });
8481
- Calendar.defaultProps = defaultProps$12;
8550
+ Calendar.defaultProps = defaultProps$11;
8482
8551
  Calendar.displayName = "NutCalendar";
8483
- const defaultProps$11 = {
8552
+ const defaultProps$10 = {
8484
8553
  data: {
8485
8554
  text: "",
8486
8555
  value: "",
@@ -8497,7 +8566,7 @@ var __publicField = (obj, key, value) => {
8497
8566
  };
8498
8567
  const InternalCascaderItem = (props, ref) => {
8499
8568
  const { data, checked, checkedIcon, chooseItem, activeColor } = {
8500
- ...defaultProps$11,
8569
+ ...defaultProps$10,
8501
8570
  ...props
8502
8571
  };
8503
8572
  const b2 = cn("cascader-item");
@@ -8516,7 +8585,7 @@ var __publicField = (obj, key, value) => {
8516
8585
  if (React.isValidElement(checkedIcon)) {
8517
8586
  return checkedIcon;
8518
8587
  }
8519
- return /* @__PURE__ */ jsxRuntimeExports.jsx(a$p, { className: `${checked ? b2("icon-check") : ""}` });
8588
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(a$q, { className: `${checked ? b2("icon-check") : ""}` });
8520
8589
  }
8521
8590
  return null;
8522
8591
  };
@@ -8530,13 +8599,13 @@ var __publicField = (obj, key, value) => {
8530
8599
  },
8531
8600
  children: [
8532
8601
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classesTitle, children: data.text }),
8533
- data.loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(r$e, { color: "#969799", className: "nut-cascader-item__icon-loading" }) : renderIcon()
8602
+ data.loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(r$f, { color: "#969799", className: "nut-cascader-item__icon-loading" }) : renderIcon()
8534
8603
  ]
8535
8604
  }
8536
8605
  );
8537
8606
  };
8538
8607
  const CascaderItem = React.forwardRef(InternalCascaderItem);
8539
- CascaderItem.defaultProps = defaultProps$11;
8608
+ CascaderItem.defaultProps = defaultProps$10;
8540
8609
  CascaderItem.displayName = "NutCascaderItem";
8541
8610
  const formatTree = (tree, parent, config2) => tree.map((node) => {
8542
8611
  const {
@@ -8674,7 +8743,7 @@ var __publicField = (obj, key, value) => {
8674
8743
  }
8675
8744
  }
8676
8745
  const Tree$1 = Tree;
8677
- const defaultProps$10 = {
8746
+ const defaultProps$$ = {
8678
8747
  className: "",
8679
8748
  style: {},
8680
8749
  activeColor: "",
@@ -8725,7 +8794,7 @@ var __publicField = (obj, key, value) => {
8725
8794
  onClose,
8726
8795
  onChange,
8727
8796
  onPathChange
8728
- } = { ...defaultProps$10, ...props };
8797
+ } = { ...defaultProps$$, ...props };
8729
8798
  const [tabvalue, setTabvalue] = React.useState("c1");
8730
8799
  const [optionsData, setOptionsData] = React.useState([]);
8731
8800
  const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
@@ -8999,74 +9068,76 @@ var __publicField = (obj, key, value) => {
8999
9068
  ) : renderItem() });
9000
9069
  };
9001
9070
  const Cascader = React.forwardRef(InternalCascader);
9002
- Cascader.defaultProps = defaultProps$10;
9071
+ Cascader.defaultProps = defaultProps$$;
9003
9072
  Cascader.displayName = "NutCascader";
9004
9073
  const CheckboxGroupContext = React.createContext(null);
9005
9074
  const Context = CheckboxGroupContext;
9006
- const defaultProps$$ = {
9007
- disabled: false,
9008
- checkedValue: [],
9075
+ const defaultProps$_ = {
9009
9076
  max: void 0,
9010
- textPosition: "right",
9077
+ labelPosition: "right",
9011
9078
  direction: "vertical",
9012
9079
  onChange: (value) => {
9013
9080
  },
9014
9081
  options: []
9015
9082
  };
9083
+ const classPrefix$9 = "nut-checkboxgroup";
9016
9084
  const CheckboxGroup = React.forwardRef(
9017
9085
  (props, ref) => {
9018
- const { children } = { ...defaultProps$$, ...props };
9019
- const b2 = cn("checkboxgroup");
9086
+ const { children } = { ...defaultProps$_, ...props };
9020
9087
  const {
9021
9088
  className,
9022
9089
  disabled,
9023
9090
  onChange,
9024
- checkedValue,
9091
+ value,
9092
+ defaultValue,
9025
9093
  max,
9026
- textPosition,
9094
+ labelPosition,
9027
9095
  direction,
9028
9096
  options,
9029
9097
  ...rest
9030
9098
  } = props;
9031
9099
  React.useImperativeHandle(ref, () => ({
9032
- toggleAll(state) {
9100
+ toggle(state) {
9033
9101
  if (state === false) {
9034
- setInnerValue([]);
9102
+ setValue([]);
9035
9103
  } else {
9036
9104
  const childrenLabel = [];
9037
9105
  React.Children.map(children, (child) => {
9038
9106
  const childProps = child.props;
9039
- childrenLabel.push(childProps.label || child.children);
9107
+ childrenLabel.push(childProps.value);
9040
9108
  });
9041
- setInnerValue(childrenLabel);
9109
+ setValue(childrenLabel);
9042
9110
  }
9043
9111
  },
9044
- toggleReverse() {
9112
+ reverse() {
9045
9113
  const childrenLabel = [];
9046
9114
  React.Children.map(children, (child) => {
9047
9115
  const childProps = child.props;
9048
- childrenLabel.push(childProps.label || child.children);
9116
+ childrenLabel.push(childProps.value);
9049
9117
  });
9050
9118
  const reverse = childrenLabel.filter(
9051
- (c) => (innerValue == null ? void 0 : innerValue.findIndex((v) => v === c)) === -1
9119
+ (c) => (_value == null ? void 0 : _value.findIndex((v) => v === c)) === -1
9052
9120
  );
9053
- setInnerValue(reverse);
9121
+ setValue(reverse);
9054
9122
  }
9055
9123
  }));
9056
- const [innerValue, setInnerValue] = React.useState(checkedValue || []);
9057
- React.useEffect(() => {
9058
- setInnerValue(checkedValue || []);
9059
- }, [checkedValue]);
9124
+ const [_value, setValue] = usePropsValue({
9125
+ value: props.value,
9126
+ defaultValue: props.defaultValue,
9127
+ finalValue: [],
9128
+ onChange
9129
+ });
9060
9130
  const renderOptions = React.useCallback(() => {
9061
- return options == null ? void 0 : options.map(({ label, value, disabled: disabled2, onChange: onChange2, ...rest2 }) => {
9131
+ return options == null ? void 0 : options.map(({ label, value: value2, disabled: disabled2, onChange: onChange2, ...rest2 }) => {
9062
9132
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
9063
9133
  Checkbox,
9064
9134
  {
9065
- children: label,
9066
- label: value,
9135
+ label,
9136
+ disabled: disabled2,
9137
+ value: value2,
9067
9138
  ...rest2
9068
9139
  },
9069
- value == null ? void 0 : value.toString()
9140
+ value2 == null ? void 0 : value2.toString()
9070
9141
  );
9071
9142
  });
9072
9143
  }, [options, max]);
@@ -9074,25 +9145,26 @@ var __publicField = (obj, key, value) => {
9074
9145
  Context.Provider,
9075
9146
  {
9076
9147
  value: {
9077
- textPosition: textPosition || "left",
9148
+ labelPosition: labelPosition || "right",
9078
9149
  disabled,
9079
9150
  max,
9080
- checkedValue: innerValue || [],
9081
- check: (value) => {
9082
- const combined = [...innerValue, value];
9083
- setInnerValue(combined);
9084
- onChange && onChange(combined);
9151
+ value: _value,
9152
+ check: (value2) => {
9153
+ const combined = [..._value, value2];
9154
+ setValue(combined);
9085
9155
  },
9086
- uncheck: (value) => {
9087
- const reduced = innerValue.filter((item) => item !== value);
9088
- setInnerValue(reduced);
9089
- onChange && onChange(reduced);
9156
+ uncheck: (value2) => {
9157
+ const reduced = _value.filter((item) => item !== value2);
9158
+ setValue(reduced);
9090
9159
  }
9091
9160
  },
9092
9161
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
9093
9162
  "div",
9094
9163
  {
9095
- className: `${b2()} nut-checkboxgroup--${props.direction} ${className || ""}`,
9164
+ className: classNames(classPrefix$9, {
9165
+ [`nut-checkboxgroup--${props.direction}`]: props.direction,
9166
+ className
9167
+ }),
9096
9168
  ...rest,
9097
9169
  children: (options == null ? void 0 : options.length) ? renderOptions() : children
9098
9170
  }
@@ -9101,107 +9173,117 @@ var __publicField = (obj, key, value) => {
9101
9173
  );
9102
9174
  }
9103
9175
  );
9104
- CheckboxGroup.defaultProps = defaultProps$$;
9176
+ CheckboxGroup.defaultProps = defaultProps$_;
9105
9177
  CheckboxGroup.displayName = "NutCheckboxGroup";
9106
- const defaultProps$_ = {
9178
+ const defaultProps$Z = {
9107
9179
  ...ComponentDefaults,
9108
- checked: false,
9109
9180
  disabled: false,
9110
- textPosition: "right",
9111
- iconSize: 18,
9112
- icon: "check-normal",
9113
- checkedIcon: "checked",
9114
- iconClassPrefix: "nut-icon",
9115
- iconFontClassName: "nutui-iconfont",
9116
- indeterminateIcon: "check-disabled",
9117
- onChange: (state, label) => {
9181
+ labelPosition: "right",
9182
+ icon: null,
9183
+ activeIcon: null,
9184
+ indeterminateIcon: null,
9185
+ onChange: (value) => {
9118
9186
  }
9119
9187
  };
9188
+ const classPrefix$8 = "nut-checkbox";
9120
9189
  const Checkbox = (props) => {
9121
9190
  const { children } = {
9122
- ...defaultProps$_,
9191
+ ...defaultProps$Z,
9123
9192
  ...props
9124
9193
  };
9125
- const b2 = cn("checkbox");
9126
9194
  const {
9127
9195
  icon,
9128
- iconSize,
9129
9196
  label,
9130
9197
  className,
9131
- checkedIcon,
9198
+ activeIcon,
9132
9199
  checked,
9200
+ value,
9201
+ defaultChecked,
9133
9202
  disabled,
9134
9203
  onChange,
9135
9204
  indeterminate,
9136
- iconClassPrefix,
9137
- iconFontClassName,
9138
9205
  indeterminateIcon,
9139
9206
  ...others
9140
9207
  } = props;
9141
- let { textPosition, ...rest } = others;
9208
+ let { labelPosition, ...rest } = others;
9142
9209
  const ctx2 = React.useContext(Context);
9143
- let [innerChecked, setInnerChecked] = React.useState(checked);
9210
+ let [innerChecked, setChecked] = usePropsValue({
9211
+ value: props.checked,
9212
+ defaultValue: props.defaultChecked,
9213
+ finalValue: defaultChecked,
9214
+ onChange
9215
+ });
9144
9216
  let [innerDisabled, setDisabled] = React.useState(disabled);
9145
- const [_indeterminate, setIndeterminate] = React.useState(indeterminate);
9217
+ const [innerIndeterminate, setIndeterminate] = React.useState(indeterminate);
9146
9218
  React.useEffect(() => {
9147
- !ctx2 && setInnerChecked(checked);
9148
9219
  setDisabled(disabled);
9220
+ }, [disabled]);
9221
+ React.useEffect(() => {
9149
9222
  setIndeterminate(indeterminate);
9150
- }, [disabled, checked, indeterminate]);
9223
+ }, [indeterminate]);
9151
9224
  if (ctx2) {
9152
- if (ctx2.textPosition !== void 0) {
9153
- textPosition = ctx2.textPosition;
9225
+ if (ctx2.labelPosition !== void 0) {
9226
+ labelPosition = ctx2.labelPosition;
9154
9227
  }
9155
- innerDisabled = ctx2.disabled;
9156
- innerChecked = ctx2.checkedValue.includes(label);
9157
- setInnerChecked = (checked2) => {
9228
+ innerDisabled = ctx2.disabled !== void 0 ? ctx2.disabled : innerDisabled;
9229
+ innerChecked = ctx2.value.includes(value);
9230
+ setChecked = (checked2) => {
9158
9231
  if (ctx2.disabled)
9159
9232
  return;
9160
9233
  if (checked2)
9161
- ctx2.check(label);
9234
+ ctx2.check(value);
9162
9235
  if (!checked2)
9163
- ctx2.uncheck(label);
9236
+ ctx2.uncheck(value);
9164
9237
  };
9165
9238
  }
9166
9239
  const renderIcon = () => {
9167
9240
  if (!innerChecked) {
9168
- return React.isValidElement(icon) ? icon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$s, { size: iconSize, className: color() });
9241
+ return React.isValidElement(icon) ? icon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$t, { className: color() });
9169
9242
  }
9170
- if (_indeterminate) {
9171
- return React.isValidElement(indeterminateIcon) ? indeterminateIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(r$t, { size: iconSize, className: color() });
9243
+ if (innerIndeterminate) {
9244
+ return React.isValidElement(indeterminateIcon) ? indeterminateIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(r$u, { className: color() });
9172
9245
  }
9173
- return React.isValidElement(checkedIcon) ? checkedIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$q, { size: iconSize, className: color() });
9246
+ return React.isValidElement(activeIcon) ? activeIcon : /* @__PURE__ */ jsxRuntimeExports.jsx(a$r, { className: color() });
9174
9247
  };
9175
9248
  const color = () => {
9176
9249
  if (innerDisabled) {
9177
- return "nut-checkbox__icon--disable";
9250
+ return `${classPrefix$8}__icon--disable`;
9178
9251
  }
9179
9252
  if (innerChecked) {
9180
- if (_indeterminate) {
9181
- return "nut-checkbox__icon--indeterminate";
9253
+ if (innerIndeterminate) {
9254
+ return `${classPrefix$8}__icon--indeterminate`;
9182
9255
  }
9183
- return "nut-checkbox__icon";
9256
+ return `${classPrefix$8}__icon`;
9184
9257
  }
9185
- return "nut-checkbox__icon--unchecked";
9258
+ return `${classPrefix$8}__icon--unchecked`;
9186
9259
  };
9187
9260
  const renderLabel = () => {
9188
- return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `${b2("label", { disabled: innerDisabled })} `, children: children || label });
9261
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
9262
+ "span",
9263
+ {
9264
+ className: classNames(`${classPrefix$8}__label `, {
9265
+ [`${classPrefix$8}__label--disabled`]: innerDisabled
9266
+ }),
9267
+ children: children || label
9268
+ }
9269
+ );
9189
9270
  };
9190
9271
  const handleClick = () => {
9191
9272
  if (disabled)
9192
9273
  return;
9193
9274
  const latestChecked = !innerChecked;
9194
9275
  if (ctx2 && ctx2.max !== void 0) {
9195
- if (latestChecked && ctx2.checkedValue.length >= ctx2.max)
9276
+ if (latestChecked && ctx2.value.length >= ctx2.max)
9196
9277
  return;
9197
9278
  }
9198
- onChange && onChange(latestChecked, label || children);
9199
- setInnerChecked(latestChecked);
9279
+ setChecked(latestChecked);
9200
9280
  };
9201
9281
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
9202
9282
  "div",
9203
9283
  {
9204
- className: `${b2({ reverse: textPosition === "left" })} ${className || ""}`,
9284
+ className: classNames(classPrefix$8, className, {
9285
+ [`${classPrefix$8}--reverse`]: labelPosition === "left"
9286
+ }),
9205
9287
  ...rest,
9206
9288
  onClick: handleClick,
9207
9289
  children: [
@@ -9211,7 +9293,7 @@ var __publicField = (obj, key, value) => {
9211
9293
  }
9212
9294
  );
9213
9295
  };
9214
- Checkbox.defaultProps = defaultProps$_;
9296
+ Checkbox.defaultProps = defaultProps$Z;
9215
9297
  Checkbox.displayName = "NutCheckBox";
9216
9298
  Checkbox.Group = CheckboxGroup;
9217
9299
  const MIN_DISTANCE = 10;
@@ -9760,7 +9842,7 @@ var __publicField = (obj, key, value) => {
9760
9842
  const Picker = React.forwardRef(InternalPicker);
9761
9843
  const Picker$1 = Picker;
9762
9844
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
9763
- const defaultProps$Z = {
9845
+ const defaultProps$Y = {
9764
9846
  modelValue: null,
9765
9847
  visible: false,
9766
9848
  title: "",
@@ -9791,7 +9873,7 @@ var __publicField = (obj, key, value) => {
9791
9873
  style,
9792
9874
  ...rest
9793
9875
  } = {
9794
- ...defaultProps$Z,
9876
+ ...defaultProps$Y,
9795
9877
  ...props
9796
9878
  };
9797
9879
  const { locale } = useConfig$1();
@@ -10069,10 +10151,10 @@ var __publicField = (obj, key, value) => {
10069
10151
  }
10070
10152
  );
10071
10153
  };
10072
- DatePicker.defaultProps = defaultProps$Z;
10154
+ DatePicker.defaultProps = defaultProps$Y;
10073
10155
  DatePicker.displayName = "NutDatePicker";
10074
10156
  const FormItemContext = React.createContext({});
10075
- const defaultProps$Y = {
10157
+ const defaultProps$X = {
10076
10158
  ...ComponentDefaults,
10077
10159
  name: "",
10078
10160
  label: "",
@@ -10121,7 +10203,7 @@ var __publicField = (obj, key, value) => {
10121
10203
  showErrorLine,
10122
10204
  showErrorMessage
10123
10205
  } = {
10124
- ...defaultProps$Y,
10206
+ ...defaultProps$X,
10125
10207
  ...this.props
10126
10208
  };
10127
10209
  const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
@@ -10182,7 +10264,7 @@ var __publicField = (obj, key, value) => {
10182
10264
  return this.renderLayout(returnChildNode);
10183
10265
  }
10184
10266
  }
10185
- __publicField(FormItem, "defaultProps", defaultProps$Y);
10267
+ __publicField(FormItem, "defaultProps", defaultProps$X);
10186
10268
  __publicField(FormItem, "contextType", FormItemContext);
10187
10269
  class FormStore {
10188
10270
  constructor() {
@@ -10306,7 +10388,7 @@ var __publicField = (obj, key, value) => {
10306
10388
  }
10307
10389
  return [formRef.current];
10308
10390
  };
10309
- const defaultProps$X = {
10391
+ const defaultProps$W = {
10310
10392
  ...ComponentDefaults,
10311
10393
  className: "",
10312
10394
  style: void 0,
@@ -10333,7 +10415,7 @@ var __publicField = (obj, key, value) => {
10333
10415
  starPositon,
10334
10416
  ...rest
10335
10417
  } = {
10336
- ...defaultProps$X,
10418
+ ...defaultProps$W,
10337
10419
  ...props
10338
10420
  };
10339
10421
  console.log("46 dddd");
@@ -10357,7 +10439,7 @@ var __publicField = (obj, key, value) => {
10357
10439
  }
10358
10440
  );
10359
10441
  };
10360
- Form.defaultProps = defaultProps$X;
10442
+ Form.defaultProps = defaultProps$W;
10361
10443
  Form.displayName = "NutForm";
10362
10444
  Form.Item = FormItem;
10363
10445
  function trimExtraChar(value, char, regExp) {
@@ -10384,356 +10466,196 @@ var __publicField = (obj, key, value) => {
10384
10466
  const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
10385
10467
  return value.replace(regExp, "");
10386
10468
  }
10387
- const defaultProps$W = {
10469
+ const defaultProps$V = {
10388
10470
  ...ComponentDefaults,
10389
10471
  type: "text",
10390
10472
  name: "",
10391
- defaultValue: "",
10392
10473
  placeholder: "",
10393
- label: "",
10394
- labelClass: "",
10395
- labelWidth: "80",
10396
- labelAlign: "left",
10397
- colon: false,
10398
- inputAlign: "left",
10399
- center: false,
10474
+ confirmType: "done",
10475
+ align: "left",
10400
10476
  required: false,
10401
10477
  disabled: false,
10402
- readonly: false,
10403
- error: false,
10404
- maxlength: "9999",
10405
- leftIcon: null,
10406
- rightIcon: null,
10478
+ readOnly: false,
10479
+ maxLength: 9999,
10407
10480
  clearable: false,
10408
10481
  clearIcon: null,
10409
- clearSize: "14",
10410
- border: true,
10411
10482
  formatTrigger: "onChange",
10412
- rules: [],
10413
- rows: null,
10414
- errorMessage: "",
10415
- errorMessageAlign: "",
10416
- showWordLimit: false,
10417
- autofocus: false,
10418
- slotButton: null,
10419
- slotInput: null
10420
- };
10421
- const Input = React.forwardRef((props, ref) => {
10422
- const { locale } = useConfig$1();
10423
- const {
10424
- children,
10425
- type,
10426
- name,
10427
- defaultValue,
10428
- placeholder,
10429
- label,
10430
- labelClass,
10431
- labelWidth,
10432
- labelAlign,
10433
- colon,
10434
- inputAlign,
10435
- center,
10436
- required,
10437
- disabled,
10438
- readonly,
10439
- error,
10440
- maxlength,
10441
- leftIcon,
10442
- rightIcon,
10443
- clearable,
10444
- clearIcon,
10445
- clearSize,
10446
- border,
10447
- formatTrigger,
10448
- rules,
10449
- errorMessage,
10450
- errorMessageAlign,
10451
- showWordLimit,
10452
- autofocus,
10453
- style,
10454
- className,
10455
- rows,
10456
- slotButton,
10457
- slotInput,
10458
- onChange,
10459
- onBlur,
10460
- onFocus,
10461
- onClear,
10462
- formatter,
10463
- keypress,
10464
- onClickInput,
10465
- onClickLeftIcon,
10466
- onClickRightIcon,
10467
- onClick,
10468
- ...rest
10469
- } = {
10470
- ...defaultProps$W,
10471
- ...props
10472
- };
10473
- const inputPlaceholder = placeholder || locale.placeholder;
10474
- const [inputValue, SetInputValue] = React.useState("");
10475
- const [active, SetActive] = React.useState(false);
10476
- const [classes, setClasses] = React.useState("");
10477
- const getModelValue = () => String(inputValue ?? "");
10478
- const inputRef = React.useRef(null);
10479
- React.useEffect(() => {
10480
- setClasses(inputClass);
10481
- SetInputValue(defaultValue);
10482
- }, [defaultValue]);
10483
- React.useEffect(() => {
10484
- if (inputValue) {
10485
- updateValue(getModelValue());
10486
- resetValidation();
10487
- }
10488
- }, [inputValue]);
10489
- React.useImperativeHandle(ref, () => {
10490
- return inputRef.current;
10491
- });
10492
- const inputClass = React.useCallback(() => {
10493
- const prefixCls2 = "nut-input";
10494
- return [
10495
- prefixCls2,
10496
- `${center ? "center" : ""}`,
10497
- `${disabled ? `${prefixCls2}-disabled` : ""}`,
10498
- `${required ? `${prefixCls2}-required` : ""}`,
10499
- `${error ? `${prefixCls2}-error` : ""}`,
10500
- `${border ? `${prefixCls2}-border` : ""}`,
10501
- `${slotButton || rightIcon ? `${prefixCls2}-right-mark` : ""}`
10502
- ].filter(Boolean).join(" ");
10503
- }, [disabled, required, error, border, slotButton, rightIcon, center]);
10504
- React.useEffect(() => {
10505
- setClasses(inputClass);
10506
- }, [disabled, required, error, border, slotButton, rightIcon, center]);
10507
- const updateValue = (value, trigger = "onChange") => {
10508
- var _a;
10509
- let val = value;
10510
- if (type === "digit" || type === "tel") {
10511
- val = formatNumber(val, false, false);
10512
- }
10513
- if (type === "number") {
10514
- val = formatNumber(val, true, true);
10515
- }
10516
- if (type === "tel" && !formatter) {
10517
- const regTel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
10518
- const regNumber = /[^-0-9]/g;
10519
- val = !regTel.test(val) && val.length > 11 ? val.substring(0, 11) : val.replace(regNumber, "");
10520
- }
10521
- if (formatter && trigger === formatTrigger) {
10522
- val = formatter(val);
10523
- }
10524
- if (((_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.value) !== val) {
10525
- inputRef.current.value = val;
10526
- }
10527
- SetInputValue(val);
10528
- };
10529
- const handleFocus = (event) => {
10530
- const val = event.target.value;
10531
- SetActive(true);
10532
- onFocus && onFocus(val, event);
10533
- };
10534
- const handleInput = (event) => {
10535
- let val = event.target.value;
10536
- if (maxlength && val.length > Number(maxlength)) {
10537
- val = val.slice(0, Number(maxlength));
10538
- }
10539
- updateValue(val, "onChange");
10540
- onChange && onChange(val, event);
10541
- };
10542
- const handleBlur = (event) => {
10543
- setTimeout(() => {
10544
- SetActive(false);
10545
- }, 200);
10546
- let val = event.target.value;
10547
- if (maxlength && val.length > Number(maxlength)) {
10548
- val = val.slice(0, Number(maxlength));
10549
- }
10550
- updateValue(val, "onBlur");
10551
- onBlur && onBlur(val, event);
10552
- };
10553
- const handleClickInput = (event) => {
10554
- onClickInput && onClickInput(event);
10555
- };
10556
- const handleClickLeftIcon = (event) => {
10557
- onClickLeftIcon && onClickLeftIcon(event);
10558
- };
10559
- const handleClickRightIcon = (event) => {
10560
- onClickRightIcon && onClickRightIcon(event);
10561
- };
10562
- const resetValidation = () => {
10563
- };
10564
- const inputType = (type2) => {
10565
- if (type2 === "number") {
10566
- return "text";
10567
- }
10568
- if (type2 === "digit") {
10569
- return "tel";
10570
- }
10571
- return type2;
10572
- };
10573
- const handleClear = (event) => {
10574
- updateValue("");
10575
- onClear && onClear("", event);
10576
- };
10577
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
10578
- "div",
10579
- {
10580
- className: `${classes} ${className || ""}`,
10483
+ autoFocus: false
10484
+ };
10485
+ const Input = React.forwardRef(
10486
+ (props, ref) => {
10487
+ const { locale } = useConfig$1();
10488
+ const {
10489
+ type,
10490
+ name,
10491
+ placeholder,
10492
+ align,
10493
+ disabled,
10494
+ readOnly,
10495
+ maxLength,
10496
+ clearable,
10497
+ clearIcon,
10498
+ formatTrigger,
10499
+ autoFocus,
10581
10500
  style,
10582
- onClick: (e) => {
10583
- onClick && onClick(e);
10584
- },
10585
- children: slotInput ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
10586
- label ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10587
- "div",
10588
- {
10589
- className: `nut-input-label ${labelClass}`,
10590
- style: { width: `${labelWidth}px`, textAlign: labelAlign },
10591
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "label-string", children: [
10592
- label,
10593
- colon ? ":" : ""
10594
- ] })
10595
- }
10596
- ) : null,
10597
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-value", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
10598
- "div",
10599
- {
10600
- className: "nut-input-inner",
10601
- onClick: (e) => {
10602
- handleClickInput(e);
10603
- },
10604
- children: slotInput
10605
- }
10606
- ) })
10607
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
10608
- React.isValidElement(leftIcon) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10609
- "div",
10610
- {
10611
- className: "nut-input-left-icon",
10612
- onClick: (e) => {
10613
- handleClickLeftIcon(e);
10614
- },
10615
- children: leftIcon
10616
- }
10617
- ) : null,
10618
- label ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10619
- "div",
10620
- {
10621
- className: `nut-input-label ${labelClass}`,
10622
- style: { width: `${labelWidth}px`, textAlign: labelAlign },
10623
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "label-string", children: [
10624
- label,
10625
- colon ? ":" : ""
10626
- ] })
10627
- }
10628
- ) : null,
10629
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-input-value", children: [
10630
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-input-main-con", children: [
10631
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
10632
- "div",
10633
- {
10634
- className: "nut-input-inner",
10635
- onClick: (e) => {
10636
- handleClickInput(e);
10637
- },
10638
- children: [
10639
- type === "textarea" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10640
- "textarea",
10641
- {
10642
- name,
10643
- className: "input-text",
10644
- ref: inputRef,
10645
- style: {
10646
- textAlign: inputAlign,
10647
- height: `${Number(rows) * 24}px`
10648
- },
10649
- maxLength: maxlength,
10650
- placeholder: inputPlaceholder,
10651
- disabled,
10652
- readOnly: readonly,
10653
- value: inputValue,
10654
- autoFocus: autofocus,
10655
- onBlur: (e) => {
10656
- handleBlur(e);
10657
- },
10658
- onFocus: (e) => {
10659
- handleFocus(e);
10660
- },
10661
- onInput: (e) => {
10662
- handleInput(e);
10663
- }
10664
- }
10665
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
10666
- "input",
10667
- {
10668
- ...rest,
10669
- name,
10670
- className: "input-text",
10671
- ref: inputRef,
10672
- style: { textAlign: inputAlign },
10673
- type: inputType(type),
10674
- maxLength: maxlength,
10675
- placeholder: inputPlaceholder,
10676
- disabled,
10677
- readOnly: readonly,
10678
- value: inputValue,
10679
- autoFocus: autofocus,
10680
- onBlur: (e) => {
10681
- handleBlur(e);
10682
- },
10683
- onFocus: (e) => {
10684
- handleFocus(e);
10685
- },
10686
- onInput: (e) => {
10687
- handleInput(e);
10688
- }
10689
- }
10690
- ),
10691
- clearable && !readonly && active && inputValue.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10692
- "span",
10693
- {
10694
- className: "nut-input-clear-wrap",
10695
- onClick: (e) => handleClear(e),
10696
- children: clearIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(r$c, { className: "nut-input-clear" })
10697
- }
10698
- ) : null
10699
- ]
10700
- }
10701
- ),
10702
- React.isValidElement(rightIcon) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10703
- "div",
10704
- {
10705
- className: "nut-input-right-icon",
10706
- onClick: (e) => {
10707
- handleClickRightIcon(e);
10708
- },
10709
- children: rightIcon
10501
+ className,
10502
+ onChange,
10503
+ onFocus,
10504
+ onBlur,
10505
+ onClear,
10506
+ formatter,
10507
+ onClick,
10508
+ confirmType,
10509
+ defaultValue,
10510
+ value: _value,
10511
+ ...rest
10512
+ } = {
10513
+ ...defaultProps$V,
10514
+ ...props
10515
+ };
10516
+ const [value, setValue] = usePropsValue({
10517
+ value: props.value,
10518
+ defaultValue: props.defaultValue,
10519
+ finalValue: "",
10520
+ onChange
10521
+ });
10522
+ const inputRef = React.useRef(null);
10523
+ const [active, setActive] = React.useState(false);
10524
+ React.useImperativeHandle(ref, () => {
10525
+ return {
10526
+ clear: () => {
10527
+ setValue("");
10528
+ },
10529
+ focus: () => {
10530
+ var _a;
10531
+ (_a = inputRef.current) == null ? void 0 : _a.focus();
10532
+ },
10533
+ blur: () => {
10534
+ var _a;
10535
+ (_a = inputRef.current) == null ? void 0 : _a.blur();
10536
+ },
10537
+ get nativeElement() {
10538
+ return inputRef.current;
10539
+ }
10540
+ };
10541
+ });
10542
+ const inputClass = React.useCallback(() => {
10543
+ const classPrefix2 = "nut-input";
10544
+ return [classPrefix2, `${disabled ? `${classPrefix2}-disabled` : ""}`].filter(Boolean).join(" ");
10545
+ }, [disabled]);
10546
+ const [, updateState] = React.useState();
10547
+ const forceUpdate = React.useCallback(() => updateState({}), []);
10548
+ const updateValue = (value2, trigger = "onChange") => {
10549
+ let val = value2;
10550
+ if (Taro.getEnv() === Taro.ENV_TYPE.WEB) {
10551
+ if (type === "number") {
10552
+ val = formatNumber(val, false, true);
10553
+ }
10554
+ if (type === "digit") {
10555
+ val = formatNumber(val, true, true);
10556
+ }
10557
+ }
10558
+ if (formatter && trigger === formatTrigger) {
10559
+ val = formatter(val);
10560
+ }
10561
+ setValue(val);
10562
+ const eventHandler = props[trigger];
10563
+ if (eventHandler && typeof eventHandler === "function") {
10564
+ eventHandler(val);
10565
+ }
10566
+ forceUpdate();
10567
+ };
10568
+ const handleFocus = (event) => {
10569
+ const val = event.target.value;
10570
+ onFocus && onFocus(val);
10571
+ setActive(true);
10572
+ };
10573
+ const handleInput = (value2) => {
10574
+ updateValue(value2, "onChange");
10575
+ };
10576
+ const handleBlur = (event) => {
10577
+ const val = event.target.value;
10578
+ updateValue(val, "onBlur");
10579
+ setTimeout(() => {
10580
+ setActive(false);
10581
+ }, 50);
10582
+ };
10583
+ const inputType = (type2) => {
10584
+ if (Taro.getEnv() === Taro.ENV_TYPE.WEB) {
10585
+ if (type2 === "digit") {
10586
+ return "text";
10587
+ }
10588
+ if (type2 === "number") {
10589
+ return "tel";
10590
+ }
10591
+ } else if (type2 === "password") {
10592
+ return "text";
10593
+ }
10594
+ return type2;
10595
+ };
10596
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
10597
+ components.View,
10598
+ {
10599
+ className: `${inputClass()} ${className || ""}`,
10600
+ style,
10601
+ onClick: (e) => {
10602
+ onClick && onClick(e);
10603
+ },
10604
+ children: [
10605
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
10606
+ components.Input,
10607
+ {
10608
+ ...rest,
10609
+ name,
10610
+ className: "nut-input-native",
10611
+ ref: inputRef,
10612
+ style: { textAlign: align },
10613
+ type: inputType(type),
10614
+ password: type === "password",
10615
+ maxlength: maxLength,
10616
+ placeholder: placeholder || locale.placeholder,
10617
+ disabled: disabled || readOnly,
10618
+ value,
10619
+ focus: autoFocus,
10620
+ confirmType,
10621
+ onBlur: (e) => {
10622
+ handleBlur(e);
10623
+ },
10624
+ onFocus: (e) => {
10625
+ handleFocus(e);
10626
+ },
10627
+ onInput: (e) => {
10628
+ handleInput(e.currentTarget.value);
10710
10629
  }
10711
- ) : null,
10712
- slotButton ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-button", children: slotButton }) : null,
10713
- showWordLimit && maxlength ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-input-word-limit", children: [
10714
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "nut-input-word-num", children: inputValue ? inputValue.length : 0 }),
10715
- "/",
10716
- maxlength
10717
- ] }) : null
10718
- ] }),
10719
- errorMessage ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10720
- "div",
10630
+ }
10631
+ ),
10632
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
10633
+ components.View,
10721
10634
  {
10722
- className: "nut-input-error-message",
10723
10635
  style: {
10724
- textAlign: errorMessageAlign
10636
+ display: clearable && !readOnly && active && value.length > 0 ? "flex" : "none",
10637
+ alignItems: "center"
10638
+ },
10639
+ onClick: (e) => {
10640
+ e.stopPropagation();
10641
+ if (!disabled) {
10642
+ setTimeout(() => {
10643
+ setValue("");
10644
+ onClear && onClear("");
10645
+ }, 50);
10646
+ }
10725
10647
  },
10726
- children: errorMessage
10648
+ children: clearIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(r$d, { className: "nut-input-clear" })
10727
10649
  }
10728
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", {})
10729
- ] })
10730
- ] })
10731
- }
10732
- );
10733
- });
10734
- Input.defaultProps = defaultProps$W;
10650
+ )
10651
+ ]
10652
+ }
10653
+ );
10654
+ }
10655
+ );
10656
+ Input.defaultProps = defaultProps$V;
10735
10657
  Input.displayName = "NutInput";
10736
- const defaultProps$V = {
10658
+ const defaultProps$U = {
10737
10659
  ...ComponentDefaults,
10738
10660
  disabled: false,
10739
10661
  min: 1,
@@ -10745,7 +10667,7 @@ var __publicField = (obj, key, value) => {
10745
10667
  digits: 0,
10746
10668
  async: false
10747
10669
  };
10748
- const classPrefix$2 = `nut-inputnumber`;
10670
+ const classPrefix$7 = `nut-inputnumber`;
10749
10671
  const InputNumber = (props) => {
10750
10672
  const {
10751
10673
  children,
@@ -10770,7 +10692,7 @@ var __publicField = (obj, key, value) => {
10770
10692
  onChange,
10771
10693
  ...restProps
10772
10694
  } = {
10773
- ...defaultProps$V,
10695
+ ...defaultProps$U,
10774
10696
  ...props
10775
10697
  };
10776
10698
  const inputRef = React.useRef("");
@@ -10788,8 +10710,8 @@ var __publicField = (obj, key, value) => {
10788
10710
  }, []);
10789
10711
  const classes = classNames(
10790
10712
  {
10791
- [`${classPrefix$2}`]: true,
10792
- [`${classPrefix$2}--disabled`]: disabled
10713
+ [`${classPrefix$7}`]: true,
10714
+ [`${classPrefix$7}--disabled`]: disabled
10793
10715
  },
10794
10716
  className
10795
10717
  );
@@ -10930,7 +10852,7 @@ var __publicField = (obj, key, value) => {
10930
10852
  onBlur && onBlur(e);
10931
10853
  };
10932
10854
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes, style: styles, ...restProps, children: [
10933
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-minus", children: /* @__PURE__ */ jsxRuntimeExports.jsx(a$b, { className: iconMinusClasses, onClick: reduceNumber }) }),
10855
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-minus", children: /* @__PURE__ */ jsxRuntimeExports.jsx(a$c, { className: iconMinusClasses, onClick: reduceNumber }) }),
10934
10856
  /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: formatter ? /* @__PURE__ */ jsxRuntimeExports.jsx(
10935
10857
  "input",
10936
10858
  {
@@ -10961,9 +10883,9 @@ var __publicField = (obj, key, value) => {
10961
10883
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-input-add", children: /* @__PURE__ */ jsxRuntimeExports.jsx(a$8, { className: iconAddClasses, onClick: addNumber }) })
10962
10884
  ] });
10963
10885
  };
10964
- InputNumber.defaultProps = defaultProps$V;
10886
+ InputNumber.defaultProps = defaultProps$U;
10965
10887
  InputNumber.displayName = "NutInputNumber";
10966
- const defaultProps$U = {
10888
+ const defaultProps$T = {
10967
10889
  ...ComponentDefaults,
10968
10890
  activeColor: "",
10969
10891
  closeOnClickOverlay: true,
@@ -10982,7 +10904,7 @@ var __publicField = (obj, key, value) => {
10982
10904
  activeColor,
10983
10905
  ...rest
10984
10906
  } = {
10985
- ...defaultProps$U,
10907
+ ...defaultProps$T,
10986
10908
  ...props
10987
10909
  };
10988
10910
  const menuRef = React.useRef(null);
@@ -11072,7 +10994,7 @@ var __publicField = (obj, key, value) => {
11072
10994
  }),
11073
10995
  children: [
11074
10996
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-menu__title-text", children: finallyTitle() }),
11075
- icon || (direction === "up" ? /* @__PURE__ */ jsxRuntimeExports.jsx(a$v, { className: "nut-menu__title-icon", size: 10 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(a$w, { className: "nut-menu__title-icon", size: 10 }))
10997
+ icon || (direction === "up" ? /* @__PURE__ */ jsxRuntimeExports.jsx(a$w, { className: "nut-menu__title-icon", size: 10 }) : /* @__PURE__ */ jsxRuntimeExports.jsx(a$x, { className: "nut-menu__title-icon", size: 10 }))
11076
10998
  ]
11077
10999
  }
11078
11000
  )
@@ -11106,9 +11028,9 @@ var __publicField = (obj, key, value) => {
11106
11028
  }
11107
11029
  );
11108
11030
  };
11109
- Menu.defaultProps = defaultProps$U;
11031
+ Menu.defaultProps = defaultProps$T;
11110
11032
  Menu.displayName = "NutMenu";
11111
- const defaultProps$T = {
11033
+ const defaultProps$S = {
11112
11034
  ...ComponentDefaults,
11113
11035
  columns: 1,
11114
11036
  direction: "down",
@@ -11138,7 +11060,7 @@ var __publicField = (obj, key, value) => {
11138
11060
  parent,
11139
11061
  index
11140
11062
  } = {
11141
- ...defaultProps$T,
11063
+ ...defaultProps$S,
11142
11064
  ...props
11143
11065
  };
11144
11066
  const [_showPopup, setShowPopup] = React.useState(show);
@@ -11266,7 +11188,7 @@ var __publicField = (obj, key, value) => {
11266
11188
  },
11267
11189
  children: [
11268
11190
  item.value === _value ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: icon || /* @__PURE__ */ jsxRuntimeExports.jsx(
11269
- a$r,
11191
+ a$s,
11270
11192
  {
11271
11193
  color: activeColor,
11272
11194
  size: 10,
@@ -11296,9 +11218,9 @@ var __publicField = (obj, key, value) => {
11296
11218
  )
11297
11219
  ] });
11298
11220
  });
11299
- MenuItem.defaultProps = defaultProps$T;
11221
+ MenuItem.defaultProps = defaultProps$S;
11300
11222
  MenuItem.displayName = "NutMenuItem";
11301
- const defaultProps$S = {
11223
+ const defaultProps$R = {
11302
11224
  confirmText: "",
11303
11225
  title: "",
11304
11226
  visible: false,
@@ -11530,14 +11452,14 @@ var __publicField = (obj, key, value) => {
11530
11452
  }
11531
11453
  ) });
11532
11454
  };
11533
- NumberKeyboard.defaultProps = defaultProps$S;
11455
+ NumberKeyboard.defaultProps = defaultProps$R;
11534
11456
  NumberKeyboard.displayName = "NutNumberKeyboard";
11535
11457
  const radioContext = {
11536
11458
  onChange: (val) => {
11537
11459
  }
11538
11460
  };
11539
11461
  const RadioContext = React.createContext(radioContext);
11540
- const defaultProps$R = {
11462
+ const defaultProps$Q = {
11541
11463
  value: null,
11542
11464
  textPosition: "right",
11543
11465
  onChange: (value) => {
@@ -11547,7 +11469,7 @@ var __publicField = (obj, key, value) => {
11547
11469
  };
11548
11470
  const RadioGroup = React.forwardRef(
11549
11471
  (props, ref) => {
11550
- const { children } = { ...defaultProps$R, ...props };
11472
+ const { children } = { ...defaultProps$Q, ...props };
11551
11473
  cn("RadioGroup");
11552
11474
  const {
11553
11475
  className,
@@ -11624,9 +11546,9 @@ var __publicField = (obj, key, value) => {
11624
11546
  );
11625
11547
  }
11626
11548
  );
11627
- RadioGroup.defaultProps = defaultProps$R;
11549
+ RadioGroup.defaultProps = defaultProps$Q;
11628
11550
  RadioGroup.displayName = "NutRadioGroup";
11629
- const defaultProps$Q = {
11551
+ const defaultProps$P = {
11630
11552
  ...ComponentDefaults,
11631
11553
  className: "",
11632
11554
  style: {},
@@ -11643,7 +11565,7 @@ var __publicField = (obj, key, value) => {
11643
11565
  };
11644
11566
  const Radio = (props) => {
11645
11567
  const { children } = {
11646
- ...defaultProps$Q,
11568
+ ...defaultProps$P,
11647
11569
  ...props
11648
11570
  };
11649
11571
  const {
@@ -11702,12 +11624,12 @@ var __publicField = (obj, key, value) => {
11702
11624
  return React.isValidElement(checkedIcon2) ? React.cloneElement(checkedIcon2, {
11703
11625
  ...checkedIcon2.props,
11704
11626
  className: color()
11705
- }) : /* @__PURE__ */ jsxRuntimeExports.jsx(a$u, { size: iconSize2, className: color() });
11627
+ }) : /* @__PURE__ */ jsxRuntimeExports.jsx(a$v, { size: iconSize2, className: color() });
11706
11628
  }
11707
11629
  return React.isValidElement(icon2) ? React.cloneElement(icon2, {
11708
11630
  ...icon2.props,
11709
11631
  className: color()
11710
- }) : /* @__PURE__ */ jsxRuntimeExports.jsx(a$s, { size: iconSize2, className: color() });
11632
+ }) : /* @__PURE__ */ jsxRuntimeExports.jsx(a$t, { size: iconSize2, className: color() });
11711
11633
  };
11712
11634
  const reverseState = textPosition === "left";
11713
11635
  const renderRadioItem = () => {
@@ -11736,10 +11658,10 @@ var __publicField = (obj, key, value) => {
11736
11658
  }
11737
11659
  );
11738
11660
  };
11739
- Radio.defaultProps = defaultProps$Q;
11661
+ Radio.defaultProps = defaultProps$P;
11740
11662
  Radio.displayName = "NutRadio";
11741
11663
  Radio.RadioGroup = RadioGroup;
11742
- const defaultProps$P = {
11664
+ const defaultProps$O = {
11743
11665
  id: "",
11744
11666
  style: {},
11745
11667
  icon: null,
@@ -11794,7 +11716,7 @@ var __publicField = (obj, key, value) => {
11794
11716
  visible,
11795
11717
  onClose,
11796
11718
  ...rest
11797
- } = { ...defaultProps$P, ...props };
11719
+ } = { ...defaultProps$O, ...props };
11798
11720
  let timer;
11799
11721
  const [openState, SetOpenState] = React.useState(false);
11800
11722
  React.useEffect(() => {
@@ -11841,9 +11763,9 @@ var __publicField = (obj, key, value) => {
11841
11763
  }
11842
11764
  return {
11843
11765
  success: /* @__PURE__ */ jsxRuntimeExports.jsx(a$4, { color: "#ffffff", width: iconSize, height: iconSize }),
11844
- fail: /* @__PURE__ */ jsxRuntimeExports.jsx(a$k, { color: "#ffffff", width: iconSize, height: iconSize }),
11766
+ fail: /* @__PURE__ */ jsxRuntimeExports.jsx(a$l, { color: "#ffffff", width: iconSize, height: iconSize }),
11845
11767
  warn: /* @__PURE__ */ jsxRuntimeExports.jsx(a$3, { color: "#ffffff", width: iconSize, height: iconSize }),
11846
- loading: /* @__PURE__ */ jsxRuntimeExports.jsx(r$e, { color: "#ffffff", width: iconSize, height: iconSize })
11768
+ loading: /* @__PURE__ */ jsxRuntimeExports.jsx(r$f, { color: "#ffffff", width: iconSize, height: iconSize })
11847
11769
  }[type];
11848
11770
  };
11849
11771
  const classes = classNames({
@@ -11885,9 +11807,9 @@ var __publicField = (obj, key, value) => {
11885
11807
  }
11886
11808
  ) : null });
11887
11809
  };
11888
- Toast.defaultProps = defaultProps$P;
11810
+ Toast.defaultProps = defaultProps$O;
11889
11811
  Toast.displayName = "NutToast";
11890
- const defaultProps$O = {
11812
+ const defaultProps$N = {
11891
11813
  range: false,
11892
11814
  hiddenRange: false,
11893
11815
  hiddenTag: false,
@@ -11923,8 +11845,8 @@ var __publicField = (obj, key, value) => {
11923
11845
  minDesc,
11924
11846
  maxDesc,
11925
11847
  curValueDesc
11926
- } = { ...defaultProps$O, ...props };
11927
- let { min, max, step } = { ...defaultProps$O, ...props };
11848
+ } = { ...defaultProps$N, ...props };
11849
+ let { min, max, step } = { ...defaultProps$N, ...props };
11928
11850
  min = Number(min);
11929
11851
  max = Number(max);
11930
11852
  step = Number(step);
@@ -12280,9 +12202,9 @@ var __publicField = (obj, key, value) => {
12280
12202
  )
12281
12203
  ] });
12282
12204
  };
12283
- Range.defaultProps = defaultProps$O;
12205
+ Range.defaultProps = defaultProps$N;
12284
12206
  Range.displayName = "NutRange";
12285
- const defaultProps$N = {
12207
+ const defaultProps$M = {
12286
12208
  ...ComponentDefaults,
12287
12209
  count: 5,
12288
12210
  min: 0,
@@ -12307,7 +12229,7 @@ var __publicField = (obj, key, value) => {
12307
12229
  allowHalf,
12308
12230
  onChange
12309
12231
  } = {
12310
- ...defaultProps$N,
12232
+ ...defaultProps$M,
12311
12233
  ...props
12312
12234
  };
12313
12235
  const classPrefix2 = "nut-rate";
@@ -12392,9 +12314,9 @@ var __publicField = (obj, key, value) => {
12392
12314
  }
12393
12315
  );
12394
12316
  };
12395
- Rate.defaultProps = defaultProps$N;
12317
+ Rate.defaultProps = defaultProps$M;
12396
12318
  Rate.displayName = "NutRate";
12397
- const defaultProps$M = {
12319
+ const defaultProps$L = {
12398
12320
  ...ComponentDefaults,
12399
12321
  placeholder: "",
12400
12322
  shape: "square",
@@ -12442,7 +12364,7 @@ var __publicField = (obj, key, value) => {
12442
12364
  onClickRightinIcon,
12443
12365
  onClickRightoutIcon
12444
12366
  } = {
12445
- ...defaultProps$M,
12367
+ ...defaultProps$L,
12446
12368
  ...props
12447
12369
  };
12448
12370
  const alignClass = `${align}`;
@@ -12563,7 +12485,7 @@ var __publicField = (obj, key, value) => {
12563
12485
  {
12564
12486
  className: `${searchbarBem("clear")} ${rightinIcon ? "pos-right" : ""}`,
12565
12487
  onClick: (e) => clearaVal(e),
12566
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(a$o, { size: clearSize, color: "#555" })
12488
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(a$p, { size: clearSize, color: "#555" })
12567
12489
  }
12568
12490
  );
12569
12491
  };
@@ -12628,9 +12550,9 @@ var __publicField = (obj, key, value) => {
12628
12550
  }
12629
12551
  );
12630
12552
  };
12631
- SearchBar.defaultProps = defaultProps$M;
12553
+ SearchBar.defaultProps = defaultProps$L;
12632
12554
  SearchBar.displayName = "NutSearchBar";
12633
- const defaultProps$L = {
12555
+ const defaultProps$K = {
12634
12556
  ...ComponentDefaults,
12635
12557
  title: "",
12636
12558
  description: "",
@@ -12793,9 +12715,9 @@ var __publicField = (obj, key, value) => {
12793
12715
  }
12794
12716
  ) });
12795
12717
  };
12796
- ShortPassword.defaultProps = defaultProps$L;
12718
+ ShortPassword.defaultProps = defaultProps$K;
12797
12719
  ShortPassword.displayName = "NutShortPassword";
12798
- const defaultProps$K = {
12720
+ const defaultProps$J = {
12799
12721
  canvasId: "spcanvas",
12800
12722
  type: "png",
12801
12723
  lineWidth: 2,
@@ -12817,7 +12739,7 @@ var __publicField = (obj, key, value) => {
12817
12739
  onClear,
12818
12740
  ...rest
12819
12741
  } = {
12820
- ...defaultProps$K,
12742
+ ...defaultProps$J,
12821
12743
  ...props
12822
12744
  };
12823
12745
  const b2 = cn("signature");
@@ -12981,9 +12903,9 @@ var __publicField = (obj, key, value) => {
12981
12903
  )
12982
12904
  ] });
12983
12905
  };
12984
- Signature.defaultProps = defaultProps$K;
12906
+ Signature.defaultProps = defaultProps$J;
12985
12907
  Signature.displayName = "NutSignature";
12986
- const defaultProps$J = {
12908
+ const defaultProps$I = {
12987
12909
  ...ComponentDefaults,
12988
12910
  disabled: false,
12989
12911
  activeText: "",
@@ -13000,7 +12922,7 @@ var __publicField = (obj, key, value) => {
13000
12922
  style,
13001
12923
  onChange
13002
12924
  } = {
13003
- ...defaultProps$J,
12925
+ ...defaultProps$I,
13004
12926
  ...props
13005
12927
  };
13006
12928
  const classPrefix2 = "nut-switch";
@@ -13022,9 +12944,9 @@ var __publicField = (obj, key, value) => {
13022
12944
  activeText && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: value ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__label open`, children: activeText }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__label close`, children: inactiveText }) })
13023
12945
  ] }) });
13024
12946
  };
13025
- Switch.defaultProps = defaultProps$J;
12947
+ Switch.defaultProps = defaultProps$I;
13026
12948
  Switch.displayName = "NutSwitch";
13027
- const defaultProps$I = {
12949
+ const defaultProps$H = {
13028
12950
  defaultValue: "",
13029
12951
  textAlign: "left",
13030
12952
  limitshow: false,
@@ -13052,7 +12974,7 @@ var __publicField = (obj, key, value) => {
13052
12974
  onChange,
13053
12975
  onBlur,
13054
12976
  onFocus
13055
- } = { ...defaultProps$I, ...props };
12977
+ } = { ...defaultProps$H, ...props };
13056
12978
  const textareaBem = cn("textarea");
13057
12979
  const [inputValue, SetInputValue] = React.useState("");
13058
12980
  const compositingRef = React.useRef(false);
@@ -13147,9 +13069,9 @@ var __publicField = (obj, key, value) => {
13147
13069
  }
13148
13070
  );
13149
13071
  };
13150
- TextArea.defaultProps = defaultProps$I;
13072
+ TextArea.defaultProps = defaultProps$H;
13151
13073
  TextArea.displayName = "NutTextArea";
13152
- const defaultProps$H = {
13074
+ const defaultProps$G = {
13153
13075
  ...ComponentDefaults,
13154
13076
  percent: 0,
13155
13077
  showText: false,
@@ -13168,7 +13090,7 @@ var __publicField = (obj, key, value) => {
13168
13090
  children,
13169
13091
  ...rest
13170
13092
  } = {
13171
- ...defaultProps$H,
13093
+ ...defaultProps$G,
13172
13094
  ...props
13173
13095
  };
13174
13096
  const classPrefix2 = "nut-progress";
@@ -13205,7 +13127,7 @@ var __publicField = (obj, key, value) => {
13205
13127
  }
13206
13128
  ) }) }) });
13207
13129
  };
13208
- Progress.defaultProps = defaultProps$H;
13130
+ Progress.defaultProps = defaultProps$G;
13209
13131
  Progress.displayName = "NutProgress";
13210
13132
  class UploadOptions {
13211
13133
  constructor() {
@@ -13350,7 +13272,7 @@ var __publicField = (obj, key, value) => {
13350
13272
  done();
13351
13273
  }
13352
13274
  };
13353
- const defaultProps$G = {
13275
+ const defaultProps$F = {
13354
13276
  ...ComponentDefaults,
13355
13277
  url: "",
13356
13278
  maxCount: 1,
@@ -13438,7 +13360,7 @@ var __publicField = (obj, key, value) => {
13438
13360
  beforeXhrUpload,
13439
13361
  beforeDelete,
13440
13362
  ...restProps
13441
- } = { ...defaultProps$G, ...props };
13363
+ } = { ...defaultProps$F, ...props };
13442
13364
  const [fileList, setFileList] = React.useState(defaultValue || []);
13443
13365
  const [uploadQueue, setUploadQueue] = React.useState([]);
13444
13366
  React.useEffect(() => {
@@ -13708,7 +13630,7 @@ var __publicField = (obj, key, value) => {
13708
13630
  children: [
13709
13631
  previewType === "picture" && !children && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-uploader__preview-img", children: [
13710
13632
  deletable && /* @__PURE__ */ jsxRuntimeExports.jsx(
13711
- a$k,
13633
+ a$l,
13712
13634
  {
13713
13635
  color: "rgba(0,0,0,0.6)",
13714
13636
  className: "close",
@@ -13716,7 +13638,7 @@ var __publicField = (obj, key, value) => {
13716
13638
  }
13717
13639
  ),
13718
13640
  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: [
13719
- item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(a$k, { color: "#fff" }) : item.loadingIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(r$e, { color: "#fff" })),
13641
+ item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(a$l, { color: "#fff" }) : item.loadingIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(r$f, { color: "#fff" })),
13720
13642
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-uploader__preview__progress__msg", children: item.message })
13721
13643
  ] }),
13722
13644
  item.type.includes("image") ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: item.url && /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -13742,7 +13664,7 @@ var __publicField = (obj, key, value) => {
13742
13664
  onClick: () => handleItemClick(item),
13743
13665
  className: "nut-uploader__preview-img__file__name",
13744
13666
  children: [
13745
- /* @__PURE__ */ jsxRuntimeExports.jsx(a$f, { color: "#808080" }),
13667
+ /* @__PURE__ */ jsxRuntimeExports.jsx(a$g, { color: "#808080" }),
13746
13668
  " ",
13747
13669
  item.name
13748
13670
  ]
@@ -13757,14 +13679,14 @@ var __publicField = (obj, key, value) => {
13757
13679
  className: `nut-uploader__preview-img__file__name ${item.status}`,
13758
13680
  onClick: () => handleItemClick(item),
13759
13681
  children: [
13760
- /* @__PURE__ */ jsxRuntimeExports.jsx(a$f, {}),
13682
+ /* @__PURE__ */ jsxRuntimeExports.jsx(a$g, {}),
13761
13683
  " ",
13762
13684
  item.name
13763
13685
  ]
13764
13686
  }
13765
13687
  ),
13766
13688
  deletable && /* @__PURE__ */ jsxRuntimeExports.jsx(
13767
- a$m,
13689
+ a$n,
13768
13690
  {
13769
13691
  color: "#808080",
13770
13692
  className: "nut-uploader__preview-img__file__del",
@@ -13801,9 +13723,9 @@ var __publicField = (obj, key, value) => {
13801
13723
  ] });
13802
13724
  };
13803
13725
  const Uploader = React.forwardRef(InternalUploader);
13804
- Uploader.defaultProps = defaultProps$G;
13726
+ Uploader.defaultProps = defaultProps$F;
13805
13727
  Uploader.displayName = "NutUploader";
13806
- const defaultProps$F = {
13728
+ const defaultProps$E = {
13807
13729
  cancelText: "",
13808
13730
  optionTag: "name",
13809
13731
  optionSubTag: "subname",
@@ -13837,7 +13759,7 @@ var __publicField = (obj, key, value) => {
13837
13759
  className,
13838
13760
  style,
13839
13761
  ...rest
13840
- } = { ...defaultProps$F, ...props };
13762
+ } = { ...defaultProps$E, ...props };
13841
13763
  const b2 = cn("actionsheet");
13842
13764
  const isHighlight = (item) => {
13843
13765
  return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "#1a1a1a";
@@ -13882,52 +13804,8 @@ var __publicField = (obj, key, value) => {
13882
13804
  }
13883
13805
  );
13884
13806
  };
13885
- ActionSheet.defaultProps = defaultProps$F;
13807
+ ActionSheet.defaultProps = defaultProps$E;
13886
13808
  ActionSheet.displayName = "NutActionSheet";
13887
- const defaultProps$E = {
13888
- ...ComponentDefaults,
13889
- value: "",
13890
- dot: false,
13891
- max: 99,
13892
- top: "0",
13893
- right: "5",
13894
- color: ""
13895
- };
13896
- const Badge = (props) => {
13897
- const { className, style, value, max, children, dot, top, right, color } = {
13898
- ...defaultProps$E,
13899
- ...props
13900
- };
13901
- const classPrefix2 = "nut-badge";
13902
- const classes = classNames(classPrefix2, className);
13903
- const contentClasses = classNames(
13904
- { [`${classPrefix2}__dot`]: dot },
13905
- `${classPrefix2}__content`,
13906
- `${classPrefix2}__sup`
13907
- );
13908
- function content() {
13909
- if (dot || typeof value === "object")
13910
- return null;
13911
- if (typeof value === "number" && typeof max === "number") {
13912
- return max < value ? `${max}+` : value;
13913
- }
13914
- return value;
13915
- }
13916
- const getStyle = () => {
13917
- const style2 = {};
13918
- style2.top = `${Number(top) || parseFloat(top) || 0}px`;
13919
- style2.right = `${Number(right) || parseFloat(right) || 0}px`;
13920
- style2.background = color;
13921
- return style2;
13922
- };
13923
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes, style, children: [
13924
- typeof value === "object" && value && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__icon`, children: value }),
13925
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children }),
13926
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: contentClasses, style: getStyle(), children: content() })
13927
- ] });
13928
- };
13929
- Badge.defaultProps = defaultProps$E;
13930
- Badge.displayName = "NutBadge";
13931
13809
  const Content = (props) => {
13932
13810
  const { visible, title, footer, footerDirection, onClick, children } = props;
13933
13811
  const classPrefix2 = "nut-dialog";
@@ -14240,26 +14118,30 @@ var __publicField = (obj, key, value) => {
14240
14118
  network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
14241
14119
  };
14242
14120
  const defaultProps$B = {
14243
- description: "无内容",
14244
- image: "empty",
14121
+ ...ComponentDefaults,
14122
+ description: "",
14245
14123
  imageSize: "",
14246
- className: ""
14124
+ status: "empty"
14247
14125
  };
14126
+ const classPrefix$6 = `nut-empty`;
14248
14127
  const Empty = (props) => {
14249
14128
  const { locale } = useConfig$1();
14250
14129
  defaultProps$B.description = locale.noData || defaultProps$B.description;
14251
- const { image, imageSize, description, children, className, ...rest } = {
14130
+ const {
14131
+ image,
14132
+ imageSize,
14133
+ description,
14134
+ children,
14135
+ className,
14136
+ status,
14137
+ ...rest
14138
+ } = {
14252
14139
  ...defaultProps$B,
14253
14140
  ...props
14254
14141
  };
14255
14142
  const [imgStyle, setImgStyle] = React.useState({});
14256
- const b2 = cn("empty");
14257
- let imageNode = image;
14258
- if (typeof image === "string") {
14259
- const isHttpUrl = image.startsWith("https://") || image.startsWith("http://") || image.startsWith("//");
14260
- const imageUrl = isHttpUrl ? image : defaultStatus[image];
14261
- imageNode = /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "img", src: imageUrl, alt: "empty" });
14262
- }
14143
+ const imageUrl = image || defaultStatus[status];
14144
+ const imageNode = typeof imageUrl === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("img", { className: "img", src: imageUrl, alt: "empty" }) : imageUrl;
14263
14145
  React.useEffect(() => {
14264
14146
  setImgStyle(() => {
14265
14147
  if (!imageSize) {
@@ -14277,9 +14159,9 @@ var __publicField = (obj, key, value) => {
14277
14159
  };
14278
14160
  });
14279
14161
  }, [imageSize]);
14280
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${b2()} ${className}`, ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
14281
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b2("image"), style: imgStyle, children: imageNode }),
14282
- typeof description === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b2("description"), children: description }) : { description },
14162
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$6} ${className}`, ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
14163
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$6}__image`, style: imgStyle, children: imageNode }),
14164
+ typeof description === "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix$6}__description`, children: description }) : description,
14283
14165
  children
14284
14166
  ] }) });
14285
14167
  };
@@ -14835,7 +14717,7 @@ var __publicField = (obj, key, value) => {
14835
14717
  ]
14836
14718
  }
14837
14719
  ) }),
14838
- closeMode || rightIcon ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "right-icon", onClick: onClickIcon, children: rightIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(a$n, { size: 12, color }) }) : null
14720
+ closeMode || rightIcon ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "right-icon", onClick: onClickIcon, children: rightIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(a$o, { size: 12, color }) }) : null
14839
14721
  ] }) : null,
14840
14722
  showNoticeBar && scrollList.current.length > 0 && isVertical ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
14841
14723
  "div",
@@ -14883,7 +14765,7 @@ var __publicField = (obj, key, value) => {
14883
14765
  onClick: (e) => {
14884
14766
  handleClickIcon(e);
14885
14767
  },
14886
- children: rightIcon || (closeMode ? /* @__PURE__ */ jsxRuntimeExports.jsx(a$n, { size: 12, color }) : null)
14768
+ children: rightIcon || (closeMode ? /* @__PURE__ */ jsxRuntimeExports.jsx(a$o, { size: 12, color }) : null)
14887
14769
  }
14888
14770
  )
14889
14771
  ]
@@ -19919,27 +19801,30 @@ This message will only show in development mode. It won't appear in production.
19919
19801
  const defaultProps$v = {
19920
19802
  ...ComponentDefaults,
19921
19803
  size: "",
19804
+ shape: "round",
19922
19805
  icon: "",
19923
- bgColor: "#eee",
19806
+ fit: "cover",
19807
+ background: "#eee",
19924
19808
  color: "#666",
19925
- prefixCls: "nut-avatar",
19926
- url: ""
19809
+ src: "",
19810
+ alt: ""
19927
19811
  };
19812
+ const classPrefix$5 = `nut-avatar`;
19928
19813
  const Avatar = (props) => {
19929
19814
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
19930
19815
  const {
19931
19816
  children,
19932
- prefixCls: prefixCls2,
19933
19817
  size,
19934
19818
  shape,
19935
- bgColor,
19819
+ background,
19936
19820
  color,
19937
- url,
19821
+ src,
19938
19822
  icon,
19823
+ fit,
19824
+ alt,
19939
19825
  className,
19940
19826
  style,
19941
- activeAvatar,
19942
- onActiveAvatar,
19827
+ onClick,
19943
19828
  onError,
19944
19829
  ...rest
19945
19830
  } = {
@@ -19951,24 +19836,23 @@ This message will only show in development mode. It won't appear in production.
19951
19836
  const [avatarIndex, setAvatarIndex] = React.useState(1);
19952
19837
  const avatarRef = React.useRef(null);
19953
19838
  const parent = React.useContext(AvatarContext);
19954
- const b2 = cn("avatar");
19839
+ const sizeValue = ["large", "normal", "small"];
19955
19840
  const classes = classNames({
19956
- [`nut-avatar-${size || ((_a = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a.size) || "normal"}`]: true,
19957
- [`nut-avatar-${shape || ((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || "round"}`]: true
19841
+ [`nut-avatar-${((_a = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a.size) || size || "normal"}`]: true,
19842
+ [`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
19958
19843
  });
19959
- const cls = classNames(b2(""), classes, className);
19960
- const sizeValue = ["large", "normal", "small"];
19844
+ const cls = classNames(classPrefix$5, classes, className);
19961
19845
  const styles = {
19962
19846
  width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
19963
19847
  height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
19964
- backgroundColor: `${bgColor}`,
19848
+ backgroundColor: `${background}`,
19965
19849
  color: `${color}`,
19966
- marginLeft: avatarIndex !== 1 && ((_c = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c.span) ? `${(_d = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _d.span}px` : "",
19967
- zIndex: ((_e = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _e.zIndex) === "right" ? `${Math.abs(maxSum - avatarIndex)}` : "",
19850
+ 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` : "",
19851
+ zIndex: ((_e = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _e.level) === "right" ? `${Math.abs(maxSum - avatarIndex)}` : "",
19968
19852
  ...style
19969
19853
  };
19970
19854
  const maxStyles = {
19971
- backgroundColor: `${(_f = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _f.maxBgColor}`,
19855
+ backgroundColor: `${(_f = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _f.maxBackground}`,
19972
19856
  color: `${(_g = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _g.maxColor}`
19973
19857
  };
19974
19858
  React.useEffect(() => {
@@ -19986,23 +19870,22 @@ This message will only show in development mode. It won't appear in production.
19986
19870
  }
19987
19871
  }
19988
19872
  const index = (_b2 = (_a2 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a2.dataset) == null ? void 0 : _b2.index;
19989
- const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.maxCount;
19873
+ const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.max;
19990
19874
  setMaxSum(children2.length);
19991
19875
  setAvatarIndex(index);
19992
19876
  if (index === children2.length && index !== maxCount && children2.length > maxCount) {
19993
19877
  setShowMax(true);
19994
19878
  }
19995
19879
  };
19996
- const errorEvent = (e) => {
19880
+ const errorEvent = () => {
19997
19881
  if (props.onError) {
19998
- props.onError(e);
19882
+ props.onError();
19999
19883
  }
20000
19884
  };
20001
19885
  const clickAvatar = (e) => {
20002
- activeAvatar && activeAvatar(e);
20003
- onActiveAvatar && onActiveAvatar(e);
19886
+ onClick && onClick(e);
20004
19887
  };
20005
- return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: (showMax || !((_h = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _h.maxCount) || avatarIndex <= ((_i = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _i.maxCount)) && /* @__PURE__ */ jsxRuntimeExports.jsxs(
19888
+ 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(
20006
19889
  "div",
20007
19890
  {
20008
19891
  className: cls,
@@ -20011,15 +19894,25 @@ This message will only show in development mode. It won't appear in production.
20011
19894
  onClick: clickAvatar,
20012
19895
  ref: avatarRef,
20013
19896
  children: [
20014
- (!((_j = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _j.maxCount) || avatarIndex <= ((_k = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _k.maxCount)) && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
20015
- url && /* @__PURE__ */ jsxRuntimeExports.jsx(components.Image, { className: "avatar-img", src: url, onError: errorEvent }),
19897
+ (!((_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: [
19898
+ src && /* @__PURE__ */ jsxRuntimeExports.jsx(
19899
+ Image$1,
19900
+ {
19901
+ className: "avatar-img",
19902
+ src,
19903
+ style: { objectFit: fit },
19904
+ alt,
19905
+ onError: errorEvent
19906
+ }
19907
+ ),
20016
19908
  React.isValidElement(icon) ? React.cloneElement(icon, {
20017
19909
  ...icon.props,
20018
19910
  className: `${icon.props.className || ""} icon`
20019
19911
  }) : null,
20020
- children && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text", children })
19912
+ children && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text", children }),
19913
+ !src && !icon && !children && /* @__PURE__ */ jsxRuntimeExports.jsx(a$b, { className: "icon" })
20021
19914
  ] }),
20022
- showMax && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text", children: ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxContent) ? (_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent : `+ ${avatarIndex - ((_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.maxCount)}` })
19915
+ 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)}` })
20023
19916
  ]
20024
19917
  }
20025
19918
  ) });
@@ -20089,7 +19982,7 @@ This message will only show in development mode. It won't appear in production.
20089
19982
  Avatar,
20090
19983
  {
20091
19984
  className: avatarClass,
20092
- bgColor: "rgb(239, 239, 239)",
19985
+ background: "rgb(239, 239, 239)",
20093
19986
  shape: avatarShape,
20094
19987
  style: getStyle()
20095
19988
  }
@@ -20122,9 +20015,7 @@ This message will only show in development mode. It won't appear in production.
20122
20015
  }
20123
20016
  }
20124
20017
  const defaultProps$t = {
20125
- name: "",
20126
- leftWidth: 0,
20127
- rightWidth: 0
20018
+ name: ""
20128
20019
  };
20129
20020
  const Swipe = React.forwardRef((props, instanceRef) => {
20130
20021
  const swipeBem = cn("swipe");
@@ -20159,14 +20050,8 @@ This message will only show in development mode. It won't appear in production.
20159
20050
  transform: `translate3d(${state.offset}px, 0, 0)`,
20160
20051
  transitionDuration: state.dragging ? "0s" : ".6s"
20161
20052
  };
20162
- const leftWidth = React.useMemo(
20163
- () => props.leftWidth ? props.leftWidth : actionWidth.left,
20164
- [props.leftWidth, actionWidth.left]
20165
- );
20166
- const rightWidth = React.useMemo(
20167
- () => props.rightWidth ? props.rightWidth : actionWidth.right,
20168
- [props.rightWidth, actionWidth.right]
20169
- );
20053
+ const leftWidth = actionWidth.left;
20054
+ const rightWidth = actionWidth.right;
20170
20055
  const onTouchStart = async (event) => {
20171
20056
  if (leftWrapper.current) {
20172
20057
  const leftRect = await getRectByTaro(leftWrapper.current);
@@ -20318,7 +20203,7 @@ This message will only show in development mode. It won't appear in production.
20318
20203
  onClick: (event) => {
20319
20204
  }
20320
20205
  };
20321
- const classPrefix$1 = `nut-animate`;
20206
+ const classPrefix$4 = `nut-animate`;
20322
20207
  const Animate = (props) => {
20323
20208
  const { className, type, action, loop: loop2, onClick, children, ...rest } = {
20324
20209
  ...defaultProps$s,
@@ -20327,7 +20212,7 @@ This message will only show in development mode. It won't appear in production.
20327
20212
  const [clicked, setClicked] = React.useState(false);
20328
20213
  const classes = classNames({
20329
20214
  "nut-ani-container": true,
20330
- [`${classPrefix$1}-${type}`]: action === "initial" || clicked ? type : false,
20215
+ [`${classPrefix$4}-${type}`]: action === "initial" || clicked ? type : false,
20331
20216
  loop: loop2
20332
20217
  });
20333
20218
  const cls = classNames(classes, className);
@@ -20658,22 +20543,20 @@ This message will only show in development mode. It won't appear in production.
20658
20543
  Audio.defaultProps = defaultProps$p;
20659
20544
  Audio.displayName = "NutAudio";
20660
20545
  const defaultProps$o = {
20546
+ ...ComponentDefaults,
20661
20547
  maxContent: "",
20662
- maxCount: "",
20663
- maxBgColor: "#eee",
20548
+ max: "",
20549
+ maxBackground: "#eee",
20664
20550
  maxColor: "#666",
20665
- size: "",
20666
- shape: "",
20667
- span: "-8",
20668
- zIndex: "left"
20551
+ gap: "-8",
20552
+ level: "left"
20669
20553
  };
20554
+ const classPrefix$3 = `nut-avatar-group`;
20670
20555
  const AvatarGroup = (props) => {
20671
- useConfig();
20672
20556
  const propAvatarGroup = { ...defaultProps$o, ...props };
20673
20557
  const { className, style, children } = propAvatarGroup;
20674
20558
  const avatarGroupRef = React.useRef(null);
20675
- const b2 = cn("avatar-group");
20676
- const cls = classNames(b2(""), className);
20559
+ const cls = classNames(classPrefix$3, className);
20677
20560
  const parentAvatar = {
20678
20561
  propAvatarGroup,
20679
20562
  avatarGroupRef
@@ -20683,22 +20566,24 @@ This message will only show in development mode. It won't appear in production.
20683
20566
  AvatarGroup.defaultProps = defaultProps$o;
20684
20567
  AvatarGroup.displayName = "NutAvatarGroup";
20685
20568
  const defaultProps$n = {
20569
+ ...ComponentDefaults,
20686
20570
  strokeWidth: 5,
20687
20571
  radius: 50,
20688
20572
  strokeLinecap: "round",
20689
- circleColor: "#fa2c19",
20690
- pathColor: "#e5e9f2",
20573
+ color: "#fa2c19",
20574
+ background: "#e5e9f2",
20691
20575
  clockwise: true
20692
20576
  };
20577
+ const classPrefix$2 = `nut-circleprogress`;
20693
20578
  const CircleProgress = (props) => {
20694
20579
  const {
20695
20580
  children,
20696
- progress,
20581
+ percent,
20697
20582
  className,
20698
20583
  radius,
20699
- pathColor,
20584
+ background,
20700
20585
  clockwise,
20701
- circleColor,
20586
+ color,
20702
20587
  strokeWidth,
20703
20588
  style,
20704
20589
  strokeLinecap,
@@ -20707,45 +20592,39 @@ This message will only show in development mode. It won't appear in production.
20707
20592
  ...defaultProps$n,
20708
20593
  ...props
20709
20594
  };
20710
- const [oldValue, setOldValue] = React.useState(progress);
20711
- const b2 = cn("circleprogress");
20712
- const classes = classNames(className, b2(""));
20595
+ const [oldValue, setOldValue] = React.useState(percent);
20596
+ const classes = classNames(className, classPrefix$2);
20713
20597
  const refRandomId = Math.random().toString(36).slice(-8);
20598
+ const animateIdRef = React.useRef(0);
20714
20599
  const styles = {
20715
20600
  height: `${Number(radius) * 2}px`,
20716
20601
  width: `${Number(radius) * 2}px`,
20717
20602
  ...style
20718
20603
  };
20719
20604
  React.useEffect(() => {
20720
- let rafId;
20721
20605
  const startTime = Date.now();
20722
20606
  const startRate = Number(oldValue);
20723
- const endRate = Number(progress);
20607
+ const endRate = Number(percent);
20724
20608
  const duration = Math.abs((startRate - endRate) * 1e3 / 100);
20725
20609
  const animate = () => {
20726
20610
  const now = Date.now();
20727
- const progress2 = Math.min((now - startTime) / duration, 1);
20728
- const rate = progress2 * (endRate - startRate) + startRate;
20611
+ const progress = Math.min((now - startTime) / duration, 1);
20612
+ const rate = progress * (endRate - startRate) + startRate;
20729
20613
  setOldValue(Math.min(Math.max(+rate, 0), 100));
20730
20614
  if (endRate > startRate ? rate < endRate : rate > endRate) {
20731
- rafId = window.requestAnimationFrame(animate);
20615
+ animateIdRef.current = window.requestAnimationFrame(animate);
20732
20616
  }
20733
20617
  };
20734
- if (rafId) {
20735
- cancelAnimationFrame2(rafId);
20736
- }
20737
- rafId = window.requestAnimationFrame(animate);
20738
- }, [progress]);
20739
- const cancelAnimationFrame2 = function(id) {
20740
- clearTimeout(id);
20741
- };
20618
+ animateIdRef.current = window.requestAnimationFrame(animate);
20619
+ return () => window.cancelAnimationFrame(animateIdRef.current);
20620
+ }, [percent]);
20742
20621
  const stop2 = () => {
20743
- if (!isObject(circleColor)) {
20622
+ if (!isObject(props.color)) {
20744
20623
  return [];
20745
20624
  }
20746
- const color = circleColor;
20747
- const colorArr = Object.keys(color).sort(
20748
- (a2, b22) => parseFloat(a2) - parseFloat(b22)
20625
+ const color2 = props.color;
20626
+ const colorArr = Object.keys(color2).sort(
20627
+ (a2, b2) => parseFloat(a2) - parseFloat(b2)
20749
20628
  );
20750
20629
  const stopArr = [];
20751
20630
  colorArr.map((item) => {
@@ -20754,15 +20633,15 @@ This message will only show in development mode. It won't appear in production.
20754
20633
  value: ""
20755
20634
  };
20756
20635
  obj.key = item;
20757
- obj.value = color[item];
20636
+ obj.value = color2[item];
20758
20637
  stopArr.push(obj);
20759
20638
  });
20760
20639
  return stopArr;
20761
20640
  };
20762
- const transColor = (color) => {
20763
- return color && color.replace("#", "%23");
20641
+ const transColor = (color2) => {
20642
+ return color2 && color2.replace("#", "%23");
20764
20643
  };
20765
- const format = (progress2) => Math.min(Math.max(+progress2, 0), 100);
20644
+ const format = (progress) => Math.min(Math.max(+progress, 0), 100);
20766
20645
  const circleStyle = () => {
20767
20646
  const stopArr = stop2();
20768
20647
  const stopDom = [];
@@ -20776,17 +20655,17 @@ This message will only show in development mode. It won't appear in production.
20776
20655
  });
20777
20656
  }
20778
20657
  const perimeter = 283;
20779
- const progress2 = +oldValue;
20780
- const offset = perimeter * Number(format(parseFloat(progress2.toFixed(1)))) / 100;
20658
+ const progress = +oldValue;
20659
+ const offset = perimeter * Number(format(parseFloat(progress.toFixed(1)))) / 100;
20781
20660
  const isWise = props.clockwise ? 1 : 0;
20782
- const color = isObject(circleColor) ? `url(%23${refRandomId})` : transColor(circleColor);
20661
+ const color2 = isObject(props.color) ? `url(%23${refRandomId})` : transColor(props.color);
20783
20662
  const d = `M 50 50 m 0 -45 a 45 45 0 1 ${isWise} 0 90 a 45 45 0 1, ${isWise} 0 -90`;
20784
20663
  const pa = `%3Cdefs%3E%3ClinearGradient id='${refRandomId}' x1='100%25' y1='0%25' x2='0%25' y2='0%25'%3E${stopDom}%3C/linearGradient%3E%3C/defs%3E`;
20785
20664
  const path = `%3Cpath d='${d}' stroke-width='${strokeWidth}' stroke='${transColor(
20786
- props.pathColor
20665
+ props.background
20787
20666
  )}' fill='none'/%3E`;
20788
20667
  const path1 = `%3Cpath d='${d}' stroke-width='${strokeWidth}' stroke-dasharray='${offset},${perimeter}' stroke-linecap='round' stroke='${transColor(
20789
- color
20668
+ color2
20790
20669
  )}' fill='none'/%3E`;
20791
20670
  return {
20792
20671
  background: `url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E${pa}${path}${path1}%3C/svg%3E")`,
@@ -20796,10 +20675,7 @@ This message will only show in development mode. It won't appear in production.
20796
20675
  };
20797
20676
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes, style: styles, ...restProps, children: [
20798
20677
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: circleStyle() }),
20799
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-circleprogress-text", children: children || /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
20800
- progress,
20801
- "%"
20802
- ] }) })
20678
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-circleprogress-text", children })
20803
20679
  ] });
20804
20680
  };
20805
20681
  CircleProgress.defaultProps = defaultProps$n;
@@ -21198,6 +21074,7 @@ This message will only show in development mode. It won't appear in production.
21198
21074
  CountDown.defaultProps = defaultProps$k;
21199
21075
  CountDown.displayName = "NutCountDown";
21200
21076
  const defaultProps$j = {
21077
+ ...ComponentDefaults,
21201
21078
  content: "",
21202
21079
  direction: "end",
21203
21080
  rows: 1,
@@ -21206,20 +21083,22 @@ This message will only show in development mode. It won't appear in production.
21206
21083
  symbol: "...",
21207
21084
  lineHeight: "20"
21208
21085
  };
21086
+ const classPrefix$1 = `nut-ellipsis`;
21209
21087
  const Ellipsis = (props) => {
21210
21088
  var _a, _b, _c, _d;
21211
- useConfig$1();
21212
21089
  const {
21213
21090
  children,
21214
21091
  content,
21215
21092
  direction,
21216
21093
  rows,
21094
+ className,
21217
21095
  expandText,
21218
21096
  collapseText,
21219
21097
  symbol,
21220
21098
  lineHeight,
21221
21099
  onClick,
21222
- onChange
21100
+ onChange,
21101
+ ...rest
21223
21102
  } = { ...defaultProps$j, ...props };
21224
21103
  let maxHeight = 0;
21225
21104
  const [exceeded, setExceeded] = React.useState(false);
@@ -21242,6 +21121,7 @@ This message will only show in development mode. It won't appear in production.
21242
21121
  const digitReg = /^[0-9]+$/;
21243
21122
  const letterUpperReg = /^[A-Z]+$/;
21244
21123
  const letterLowerReg = /^[a-z]+$/;
21124
+ const classes = classNames(classPrefix$1, className);
21245
21125
  const init = () => {
21246
21126
  setExceeded(false);
21247
21127
  setExpanded(false);
@@ -21418,10 +21298,11 @@ This message will only show in development mode. It won't appear in production.
21418
21298
  /* @__PURE__ */ jsxRuntimeExports.jsx(
21419
21299
  "div",
21420
21300
  {
21421
- className: "nut-ellipsis",
21301
+ className: classes,
21422
21302
  onClick: handleClick,
21423
21303
  ref: root2,
21424
21304
  id: `root${refRandomId}`,
21305
+ ...rest,
21425
21306
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
21426
21307
  !exceeded ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-ellipsis-wordbreak", children: content }) : null,
21427
21308
  exceeded && !expanded ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "nut-ellipsis-wordbreak", children: [
@@ -22830,7 +22711,7 @@ This message will only show in development mode. It won't appear in production.
22830
22711
  children: [
22831
22712
  item.title,
22832
22713
  " ",
22833
- item.sorter && (sorterIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(a$l, { size: "12px" }))
22714
+ item.sorter && (sorterIcon || /* @__PURE__ */ jsxRuntimeExports.jsx(a$m, { size: "12px" }))
22834
22715
  ]
22835
22716
  },
22836
22717
  item.key
@@ -22985,7 +22866,7 @@ This message will only show in development mode. It won't appear in production.
22985
22866
  children: closeIcon
22986
22867
  }
22987
22868
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
22988
- a$n,
22869
+ a$o,
22989
22870
  {
22990
22871
  size: 12,
22991
22872
  onClick: (e) => {