@nutui/nutui-react 1.1.3 → 1.1.4-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/esm/Address.js +22 -28
  2. package/dist/esm/Avatar/style/index.js +1 -1
  3. package/dist/esm/Avatar.js +97 -20
  4. package/dist/esm/Badge.js +0 -2
  5. package/dist/esm/Barrage.js +0 -1
  6. package/dist/esm/Calendar.js +6 -2
  7. package/dist/esm/CalendarItem.js +14 -13
  8. package/dist/esm/CheckboxGroup.js +1 -1
  9. package/dist/esm/CircleProgress.js +93 -56
  10. package/dist/esm/Collapse.js +2 -2
  11. package/dist/esm/ConfigProvider/style/index.js +2 -0
  12. package/dist/esm/ConfigProvider.js +146 -0
  13. package/dist/esm/CountDown.js +8 -4
  14. package/dist/esm/Dialog.js +7 -3
  15. package/dist/esm/FixedNav.js +5 -1
  16. package/dist/esm/Infiniteloading.js +7 -3
  17. package/dist/esm/Input.js +5 -1
  18. package/dist/esm/NoticeBar.js +1 -1
  19. package/dist/esm/Pagination.js +6 -2
  20. package/dist/esm/Picker.js +6 -2
  21. package/dist/esm/Range.js +5 -1
  22. package/dist/esm/ShortPassword.js +9 -5
  23. package/dist/esm/Signature.js +7 -3
  24. package/dist/esm/Skeleton.js +20 -12
  25. package/dist/esm/Step.js +14 -3
  26. package/dist/esm/Steps.js +4 -1
  27. package/dist/esm/Swiper.js +2 -1
  28. package/dist/esm/TabbarItem.js +9 -0
  29. package/dist/esm/TextArea.js +5 -1
  30. package/dist/esm/Toast.js +4 -10
  31. package/dist/esm/Uploader/style/index.js +2 -1
  32. package/dist/esm/Uploader.js +84 -18
  33. package/dist/esm/nutui-react.es.js +1 -0
  34. package/dist/locales/base.d.ts +91 -0
  35. package/dist/locales/base.js +5 -0
  36. package/dist/locales/en-US.d.ts +3 -0
  37. package/dist/locales/en-US.js +95 -0
  38. package/dist/locales/zh-CN.d.ts +3 -0
  39. package/dist/locales/zh-CN.js +97 -0
  40. package/dist/locales/zh-TW.d.ts +3 -0
  41. package/dist/locales/zh-TW.js +95 -0
  42. package/dist/nutui.react.es.js +519 -213
  43. package/dist/nutui.react.umd.js +26 -26
  44. package/dist/packages/avatar/avatar.scss +16 -6
  45. package/dist/packages/avatargroup/avatargroup.scss +14 -0
  46. package/dist/packages/circleprogress/circleprogress.scss +12 -53
  47. package/dist/packages/configprovider/configprovider.scss +0 -0
  48. package/dist/packages/skeleton/skeleton.scss +1 -3
  49. package/dist/packages/step/step.scss +29 -29
  50. package/dist/packages/uploader/uploader.scss +97 -14
  51. package/dist/style.css +1 -1
  52. package/dist/style.es.js +1 -1
  53. package/dist/styles/themes/default.scss +2 -0
  54. package/dist/styles/variables.scss +36 -4
  55. package/dist/types/avatar/__tests__/avatar.spec.d.ts +1 -0
  56. package/dist/types/avatar/avatar.d.ts +6 -3
  57. package/dist/types/avatargroup/AvatarContext.d.ts +2 -0
  58. package/dist/types/avatargroup/__tests__/avatargroup.spec.d.ts +1 -0
  59. package/dist/types/avatargroup/avatargroup.d.ts +14 -0
  60. package/dist/types/avatargroup/index.d.ts +2 -0
  61. package/dist/types/barrage/__tests__/barrage.spec.d.ts +1 -0
  62. package/dist/types/button/button.d.ts +2 -2
  63. package/dist/types/checkbox/__test__/checkbox.spec.d.ts +1 -0
  64. package/dist/types/circleprogress/__tests__/circleprogress.spec.d.ts +1 -0
  65. package/dist/types/circleprogress/circleprogress.d.ts +11 -5
  66. package/dist/types/configprovider/configprovider.d.ts +12 -0
  67. package/dist/types/configprovider/index.d.ts +3 -0
  68. package/dist/types/icon/__test__/icon.spec.d.ts +1 -0
  69. package/dist/types/infiniteloading/__tests__/infiniteloading.spec.d.ts +1 -0
  70. package/dist/types/inputnumber/__tests__/inputnumber.spec.d.ts +1 -0
  71. package/dist/types/nutui.react.d.ts +2 -1
  72. package/dist/types/overlay/__tests__/overlay.spec.d.ts +1 -0
  73. package/dist/types/skeleton/__test__/skeleton.spec.d.ts +1 -0
  74. package/dist/types/skeleton/skeleton.d.ts +2 -2
  75. package/dist/types/step/step.d.ts +1 -0
  76. package/dist/types/steps/__tests__/steps.spec.d.ts +1 -0
  77. package/dist/types/steps/steps.d.ts +1 -0
  78. package/dist/types/tabbaritem/tabbaritem.d.ts +1 -0
  79. package/dist/types/toast/Notification.d.ts +1 -7
  80. package/dist/types/uploader/__tests__/uploader.spec.d.ts +1 -0
  81. package/dist/types/uploader/uploader.d.ts +9 -1
  82. package/package.json +9 -4
@@ -34,8 +34,8 @@ var __publicField = (obj, key, value) => {
34
34
  return value;
35
35
  };
36
36
  /*!
37
- * @nutui/nutui-react v1.1.3 Mon Apr 18 2022 14:32:26 GMT+0800 (China Standard Time)
38
- * (c) 2021 @jdf2e.
37
+ * @nutui/nutui-react v1.1.4-beta.2 Fri May 20 2022 09:38:53 GMT+0800 (China Standard Time)
38
+ * (c) 2022 @jdf2e.
39
39
  * Released under the MIT License.
40
40
  */
41
41
  import * as React from "react";
@@ -80,7 +80,7 @@ classname_production_min.cn = e$1, classname_production_min.withNaming = r$1;
80
80
  classname.exports = classname_production_min;
81
81
  }
82
82
  const cn = classname.exports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
83
- const defaultProps$X = {
83
+ const defaultProps$Y = {
84
84
  name: "",
85
85
  size: "",
86
86
  classPrefix: "nutui-iconfont",
@@ -94,7 +94,7 @@ function pxCheck$2(value) {
94
94
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
95
95
  }
96
96
  const Icon = (props) => {
97
- const _a = __spreadValues(__spreadValues({}, defaultProps$X), props), { name, size, classPrefix, color, tag, children, className, style, click } = _a, rest = __objRest(_a, ["name", "size", "classPrefix", "color", "tag", "children", "className", "style", "click"]);
97
+ const _a = __spreadValues(__spreadValues({}, defaultProps$Y), props), { name, size, classPrefix, color, tag, children, className, style, click } = _a, rest = __objRest(_a, ["name", "size", "classPrefix", "color", "tag", "children", "className", "style", "click"]);
98
98
  const isImage = name ? name.indexOf("/") !== -1 : false;
99
99
  const type = isImage ? "img" : tag;
100
100
  const b2 = cn("icon");
@@ -120,9 +120,9 @@ const Icon = (props) => {
120
120
  onClick: handleClick
121
121
  }), hasSrc()), children);
122
122
  };
123
- Icon.defaultProps = defaultProps$X;
123
+ Icon.defaultProps = defaultProps$Y;
124
124
  Icon.displayName = "NutIcon";
125
- const defaultProps$W = {
125
+ const defaultProps$X = {
126
126
  className: "",
127
127
  color: "",
128
128
  shape: "round",
@@ -139,7 +139,7 @@ const defaultProps$W = {
139
139
  }
140
140
  };
141
141
  const Button = (props) => {
142
- const _a = __spreadValues(__spreadValues({}, defaultProps$W), props), {
142
+ const _a = __spreadValues(__spreadValues({}, defaultProps$X), props), {
143
143
  color,
144
144
  shape,
145
145
  plain,
@@ -233,7 +233,7 @@ const Button = (props) => {
233
233
  name: icon
234
234
  }) : "", children));
235
235
  };
236
- Button.defaultProps = defaultProps$W;
236
+ Button.defaultProps = defaultProps$X;
237
237
  Button.displayName = "NutButton";
238
238
  function _setPrototypeOf(o, p2) {
239
239
  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p3) {
@@ -1442,7 +1442,7 @@ var useContext = React__default.useContext;
1442
1442
  function useHistory() {
1443
1443
  return useContext(historyContext);
1444
1444
  }
1445
- const defaultProps$V = {
1445
+ const defaultProps$W = {
1446
1446
  title: "",
1447
1447
  subTitle: "",
1448
1448
  desc: "",
@@ -1458,7 +1458,7 @@ const defaultProps$V = {
1458
1458
  }
1459
1459
  };
1460
1460
  const Cell = (props) => {
1461
- const _a = __spreadValues(__spreadValues({}, defaultProps$V), props), {
1461
+ const _a = __spreadValues(__spreadValues({}, defaultProps$W), props), {
1462
1462
  children,
1463
1463
  click,
1464
1464
  isLink,
@@ -1521,11 +1521,11 @@ const Cell = (props) => {
1521
1521
  className: b2("link")
1522
1522
  }) : null);
1523
1523
  };
1524
- Cell.defaultProps = defaultProps$V;
1524
+ Cell.defaultProps = defaultProps$W;
1525
1525
  Cell.displayName = "NutCell";
1526
- const defaultProps$U = { title: "", classPrefix: "nutui-cell-group" };
1526
+ const defaultProps$V = { title: "", classPrefix: "nutui-cell-group" };
1527
1527
  const CellGroup = (props) => {
1528
- const { children, classPrefix, title } = __spreadValues(__spreadValues({}, defaultProps$U), props);
1528
+ const { children, classPrefix, title } = __spreadValues(__spreadValues({}, defaultProps$V), props);
1529
1529
  const b2 = cn("cell-group");
1530
1530
  return /* @__PURE__ */ React__default.createElement("div", {
1531
1531
  className: b2(null, [classPrefix])
@@ -1535,7 +1535,7 @@ const CellGroup = (props) => {
1535
1535
  className: b2("wrap")
1536
1536
  }, children));
1537
1537
  };
1538
- CellGroup.defaultProps = defaultProps$U;
1538
+ CellGroup.defaultProps = defaultProps$V;
1539
1539
  CellGroup.displayName = "NutCellGroup";
1540
1540
  var classnames = { exports: {} };
1541
1541
  /*!
@@ -2079,7 +2079,7 @@ CSSTransition.defaultProps = {
2079
2079
  };
2080
2080
  CSSTransition.propTypes = {};
2081
2081
  var CSSTransition$1 = CSSTransition;
2082
- const defaultProps$T = __spreadValues({
2082
+ const defaultProps$U = __spreadValues({
2083
2083
  position: "center",
2084
2084
  transition: "",
2085
2085
  style: {},
@@ -2228,25 +2228,25 @@ const Popup = (props) => {
2228
2228
  size: "12px"
2229
2229
  })) : "")));
2230
2230
  };
2231
- Popup.defaultProps = defaultProps$T;
2231
+ Popup.defaultProps = defaultProps$U;
2232
2232
  Popup.displayName = "NutPopup";
2233
- const defaultProps$S = {};
2233
+ const defaultProps$T = {};
2234
2234
  const Layout = (props) => {
2235
- __spreadValues(__spreadValues({}, defaultProps$S), props);
2235
+ __spreadValues(__spreadValues({}, defaultProps$T), props);
2236
2236
  return /* @__PURE__ */ React__default.createElement("div", {
2237
2237
  className: "nut-layout"
2238
2238
  }, "Layout");
2239
2239
  };
2240
- Layout.defaultProps = defaultProps$S;
2240
+ Layout.defaultProps = defaultProps$T;
2241
2241
  Layout.displayName = "NutLayout";
2242
2242
  const DataContext$2 = createContext({});
2243
- const defaultProps$R = {
2243
+ const defaultProps$S = {
2244
2244
  span: "24",
2245
2245
  offset: "0",
2246
2246
  gutter: "0"
2247
2247
  };
2248
2248
  const Col = (props) => {
2249
- const { span, offset, children } = __spreadValues(__spreadValues({}, defaultProps$R), props);
2249
+ const { span, offset, children } = __spreadValues(__spreadValues({}, defaultProps$S), props);
2250
2250
  const [colName, setColName] = useState("");
2251
2251
  const [colStyle, setColStyle] = useState({});
2252
2252
  const { gutter } = useContext$1(DataContext$2);
@@ -2269,9 +2269,9 @@ const Col = (props) => {
2269
2269
  style: __spreadValues({}, colStyle)
2270
2270
  }, children);
2271
2271
  };
2272
- Col.defaultProps = defaultProps$R;
2272
+ Col.defaultProps = defaultProps$S;
2273
2273
  Col.displayName = "NutCol";
2274
- const defaultProps$Q = {
2274
+ const defaultProps$R = {
2275
2275
  type: "",
2276
2276
  justify: "start",
2277
2277
  align: "flex-start",
@@ -2279,7 +2279,7 @@ const defaultProps$Q = {
2279
2279
  gutter: "0"
2280
2280
  };
2281
2281
  const Row = (props) => {
2282
- const { children, type, justify, align, wrap, gutter } = __spreadValues(__spreadValues({}, defaultProps$Q), props);
2282
+ const { children, type, justify, align, wrap, gutter } = __spreadValues(__spreadValues({}, defaultProps$R), props);
2283
2283
  const prefixCls = "nut-row";
2284
2284
  const getClass = (prefix2, type2) => {
2285
2285
  return prefix2 ? type2 ? `nut-row-${prefix2}-${type2}` : "" : `nut-row-${type2}`;
@@ -2302,15 +2302,15 @@ const Row = (props) => {
2302
2302
  className: getClasses()
2303
2303
  }, children));
2304
2304
  };
2305
- Row.defaultProps = defaultProps$Q;
2305
+ Row.defaultProps = defaultProps$R;
2306
2306
  Row.displayName = "NutRow";
2307
- const defaultProps$P = {
2307
+ const defaultProps$Q = {
2308
2308
  contentPosition: "center",
2309
2309
  dashed: false,
2310
2310
  hairline: true
2311
2311
  };
2312
2312
  const Divider = (props) => {
2313
- const { children, contentPosition, dashed, hairline, styles, className } = __spreadValues(__spreadValues({}, defaultProps$P), props);
2313
+ const { children, contentPosition, dashed, hairline, styles, className } = __spreadValues(__spreadValues({}, defaultProps$Q), props);
2314
2314
  const dividerBem = cn("divider");
2315
2315
  const classes = classNames({
2316
2316
  [dividerBem()]: true,
@@ -2325,9 +2325,9 @@ const Divider = (props) => {
2325
2325
  style: styles
2326
2326
  }, children);
2327
2327
  };
2328
- Divider.defaultProps = defaultProps$P;
2328
+ Divider.defaultProps = defaultProps$Q;
2329
2329
  Divider.displayName = "NutDivider";
2330
- const defaultProps$O = {
2330
+ const defaultProps$P = {
2331
2331
  title: "",
2332
2332
  desc: "",
2333
2333
  leftShow: false,
@@ -2348,7 +2348,7 @@ const NavBar = (props) => {
2348
2348
  onClickIcon,
2349
2349
  onClickBack,
2350
2350
  onClickClear
2351
- } = __spreadValues(__spreadValues({}, defaultProps$O), props);
2351
+ } = __spreadValues(__spreadValues({}, defaultProps$P), props);
2352
2352
  const b2 = cn("navbar");
2353
2353
  return /* @__PURE__ */ React__default.createElement("div", {
2354
2354
  className: `nut-navbar ${className}`,
@@ -2371,8 +2371,124 @@ const NavBar = (props) => {
2371
2371
  name: icon
2372
2372
  })));
2373
2373
  };
2374
- NavBar.defaultProps = defaultProps$O;
2374
+ NavBar.defaultProps = defaultProps$P;
2375
2375
  NavBar.displayName = "NutNavBar";
2376
+ const zhCN = {
2377
+ save: "\u4FDD\u5B58",
2378
+ confirm: "\u786E\u8BA4",
2379
+ cancel: "\u53D6\u6D88",
2380
+ done: "\u5B8C\u6210",
2381
+ noData: "\u6682\u65E0\u6570\u636E",
2382
+ placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9",
2383
+ select: "\u8BF7\u9009\u62E9",
2384
+ video: {
2385
+ errorTip: "\u89C6\u9891\u52A0\u8F7D\u5931\u8D25",
2386
+ clickRetry: "\u70B9\u51FB\u91CD\u8BD5"
2387
+ },
2388
+ fixednav: {
2389
+ activeText: "\u6536\u8D77\u5BFC\u822A",
2390
+ unActiveText: "\u5FEB\u901F\u5BFC\u822A"
2391
+ },
2392
+ infiniteloading: {
2393
+ pullRefreshText: "\u677E\u5F00\u5237\u65B0",
2394
+ loadText: "\u52A0\u8F7D\u4E2D\u2026\u2026",
2395
+ loadMoreText: "\u54CE\u5440\uFF0C\u8FD9\u91CC\u662F\u5E95\u90E8\u4E86\u5566"
2396
+ },
2397
+ pagination: {
2398
+ prev: "\u4E0A\u4E00\u9875",
2399
+ next: "\u4E0B\u4E00\u9875"
2400
+ },
2401
+ range: {
2402
+ rangeText: "\u4E0D\u5728\u8BE5\u533A\u95F4\u5185"
2403
+ },
2404
+ calendaritem: {
2405
+ weekdays: ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"],
2406
+ end: "\u7ED3\u675F",
2407
+ start: "\u5F00\u59CB",
2408
+ title: "\u65E5\u5386\u9009\u62E9",
2409
+ monthTitle: (year, month) => `${year}\u5E74${month}\u6708`,
2410
+ today: "\u4ECA\u5929",
2411
+ loadPreviousMonth: "\u52A0\u8F7D\u4E0A\u4E00\u4E2A\u6708",
2412
+ noEarlierMonth: "\u6CA1\u6709\u66F4\u65E9\u6708\u4EFD"
2413
+ },
2414
+ shortpassword: {
2415
+ title: "\u8BF7\u8F93\u5165\u5BC6\u7801",
2416
+ desc: "\u60A8\u4F7F\u7528\u4E86\u865A\u62DF\u8D44\u4EA7\uFF0C\u8BF7\u8FDB\u884C\u9A8C\u8BC1",
2417
+ tips: "\u5FD8\u8BB0\u5BC6\u7801"
2418
+ },
2419
+ uploader: {
2420
+ ready: "\u51C6\u5907\u5B8C\u6210",
2421
+ readyUpload: "\u51C6\u5907\u4E0A\u4F20",
2422
+ waitingUpload: "\u7B49\u5F85\u4E0A\u4F20",
2423
+ uploading: "\u4E0A\u4F20\u4E2D",
2424
+ success: "\u4E0A\u4F20\u6210\u529F",
2425
+ error: "\u4E0A\u4F20\u5931\u8D25"
2426
+ },
2427
+ countdown: {
2428
+ day: "\u5929",
2429
+ hour: "\u65F6",
2430
+ minute: "\u5206",
2431
+ second: "\u79D2"
2432
+ },
2433
+ address: {
2434
+ selectRegion: "\u8BF7\u9009\u62E9\u6240\u5728\u5730\u533A",
2435
+ deliveryTo: "\u914D\u9001\u81F3",
2436
+ chooseAnotherAddress: "\u9009\u62E9\u5176\u4ED6\u5730\u5740"
2437
+ },
2438
+ signature: {
2439
+ reSign: "\u91CD\u7B7E",
2440
+ unSupportTpl: "\u5BF9\u4E0D\u8D77\uFF0C\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301Canvas\uFF0C\u65E0\u6CD5\u4F7F\u7528\u672C\u63A7\u4EF6\uFF01"
2441
+ },
2442
+ ecard: {
2443
+ chooseText: "\u8BF7\u9009\u62E9\u7535\u5B50\u5361\u9762\u503C",
2444
+ otherValueText: "\u5176\u4ED6\u9762\u503C",
2445
+ placeholder: "\u8BF7\u8F93\u51651-5000\u6574\u6570"
2446
+ },
2447
+ timeselect: {
2448
+ pickupTime: "\u53D6\u4EF6\u65F6\u95F4"
2449
+ },
2450
+ sku: {
2451
+ buyNow: "\u7ACB\u5373\u8D2D\u4E70",
2452
+ buyNumber: "\u8D2D\u4E70\u6570\u91CF",
2453
+ addToCard: "\u52A0\u5165\u8D2D\u7269\u8F66"
2454
+ },
2455
+ skuheader: {
2456
+ skuId: "\u5546\u54C1\u7F16\u53F7"
2457
+ },
2458
+ addresslist: {
2459
+ addAddress: "\u65B0\u5EFA\u5730\u5740"
2460
+ },
2461
+ comment: {
2462
+ complaintsText: "\u6211\u8981\u6295\u8BC9",
2463
+ additionalReview: (day) => `\u8D2D\u4E70${day}\u5929\u540E\u8FFD\u8BC4`,
2464
+ additionalImages: (length) => `${length}\u5F20\u8FFD\u8BC4\u56FE\u7247`
2465
+ }
2466
+ };
2467
+ const defaultProps$O = {
2468
+ locale: zhCN
2469
+ };
2470
+ const defaultConfigRef = {
2471
+ current: {
2472
+ locale: zhCN
2473
+ }
2474
+ };
2475
+ const getDefaultConfig = () => {
2476
+ return defaultConfigRef.current;
2477
+ };
2478
+ const useConfig = () => {
2479
+ var _a;
2480
+ return (_a = useContext$1(ConfigContext)) != null ? _a : getDefaultConfig();
2481
+ };
2482
+ const ConfigContext = createContext(null);
2483
+ const ConfigProvider = (props) => {
2484
+ const _a = __spreadValues(__spreadValues({}, defaultProps$O), props), { children } = _a, config2 = __objRest(_a, ["children"]);
2485
+ const parentConfig = useConfig();
2486
+ return /* @__PURE__ */ React__default.createElement(ConfigContext.Provider, {
2487
+ value: __spreadValues(__spreadValues({}, parentConfig), config2)
2488
+ }, children);
2489
+ };
2490
+ ConfigProvider.defaultProps = defaultProps$O;
2491
+ ConfigProvider.displayName = "NutConfigProvider";
2376
2492
  const defaultProps$N = {
2377
2493
  fixednavClass: "nut-fixednav",
2378
2494
  activeText: "\u6536\u8D77\u5BFC\u822A",
@@ -2384,6 +2500,7 @@ const defaultProps$N = {
2384
2500
  }
2385
2501
  };
2386
2502
  const FixedNav = (props) => {
2503
+ const { locale } = useConfig();
2387
2504
  const _a = __spreadValues(__spreadValues({}, defaultProps$N), props), {
2388
2505
  fixednavClass,
2389
2506
  overlay,
@@ -2452,7 +2569,7 @@ const FixedNav = (props) => {
2452
2569
  color: "#fff"
2453
2570
  }), /* @__PURE__ */ React__default.createElement("div", {
2454
2571
  className: "text"
2455
- }, visible ? activeText : unActiveText))));
2572
+ }, visible ? locale.fixednav.activeText || activeText : locale.fixednav.unActiveText || unActiveText))));
2456
2573
  };
2457
2574
  FixedNav.defaultProps = defaultProps$N;
2458
2575
  FixedNav.displayName = "NutFixedNav";
@@ -2501,6 +2618,7 @@ const defaultProps$L = {
2501
2618
  tabTitle: "",
2502
2619
  icon: "",
2503
2620
  href: "",
2621
+ to: "",
2504
2622
  num: "",
2505
2623
  active: false,
2506
2624
  activeColor: "",
@@ -2510,12 +2628,17 @@ const defaultProps$L = {
2510
2628
  }
2511
2629
  };
2512
2630
  const TabbarItem = (props) => {
2513
- const { tabTitle, icon, href, num, active, activeColor, unactiveColor, index: index2, handleClick } = __spreadValues(__spreadValues({}, defaultProps$L), props);
2631
+ const { tabTitle, icon, href, to: to2, num, active, activeColor, unactiveColor, index: index2, handleClick } = __spreadValues(__spreadValues({}, defaultProps$L), props);
2514
2632
  const b2 = cn("tabbar-item");
2515
2633
  const bIcon = cn("tabbar-item__icon-box");
2634
+ const history = useHistory();
2516
2635
  useEffect(() => {
2517
2636
  if (active && href) {
2518
2637
  window.location.href = href;
2638
+ return;
2639
+ }
2640
+ if (active && to2) {
2641
+ history.push(to2);
2519
2642
  }
2520
2643
  }, [active]);
2521
2644
  return /* @__PURE__ */ React__default.createElement("div", {
@@ -2698,6 +2821,7 @@ const defaultProps$J = {
2698
2821
  }
2699
2822
  };
2700
2823
  const Pagination = (props) => {
2824
+ const { locale } = useConfig();
2701
2825
  __spreadValues(__spreadValues({}, defaultProps$J), props);
2702
2826
  const _a = props, {
2703
2827
  modelValue,
@@ -2811,7 +2935,7 @@ const Pagination = (props) => {
2811
2935
  }, rest), /* @__PURE__ */ React__default.createElement("div", {
2812
2936
  className: `${paginationBem("prev")} ${mode == "multi" ? "" : "simple-border"} ${currentPage == 1 ? "disabled" : ""}`,
2813
2937
  onClick: (e2) => selectPage(Number(currentPage) - 1, true)
2814
- }, prevText), mode == "multi" ? /* @__PURE__ */ React__default.createElement("div", {
2938
+ }, locale.pagination.prev || prevText), mode == "multi" ? /* @__PURE__ */ React__default.createElement("div", {
2815
2939
  className: `${paginationBem("contain")}`
2816
2940
  }, pages.map((item, index2) => {
2817
2941
  return /* @__PURE__ */ React__default.createElement("div", {
@@ -2826,7 +2950,7 @@ const Pagination = (props) => {
2826
2950
  }, currentPage, "/", countRef)) : "", /* @__PURE__ */ React__default.createElement("div", {
2827
2951
  className: `${paginationBem("next")} ${Number(currentPage) >= countRef ? "disabled" : ""}`,
2828
2952
  onClick: (e2) => selectPage(Number(currentPage) + 1, true)
2829
- }, nextText));
2953
+ }, locale.pagination.next || nextText));
2830
2954
  };
2831
2955
  Pagination.defaultProps = defaultProps$J;
2832
2956
  Pagination.displayName = "NutPagination";
@@ -3090,14 +3214,8 @@ class Notification$1 extends React.PureComponent {
3090
3214
  this.clearCloseTimer = this.clearCloseTimer.bind(this);
3091
3215
  this.close = this.close.bind(this);
3092
3216
  this.clickCover = this.clickCover.bind(this);
3093
- this.state = {
3094
- show: true
3095
- };
3096
3217
  }
3097
3218
  close() {
3098
- this.setState({
3099
- show: false
3100
- });
3101
3219
  this.clearCloseTimer();
3102
3220
  this.props.onClose();
3103
3221
  }
@@ -3142,7 +3260,6 @@ class Notification$1 extends React.PureComponent {
3142
3260
  cover,
3143
3261
  type
3144
3262
  } = this.props;
3145
- this.state;
3146
3263
  const toastBem = cn("toast");
3147
3264
  const classes = classNames({
3148
3265
  "nut-toast-center": center,
@@ -3235,14 +3352,14 @@ function notice$1(opts) {
3235
3352
  messageInstance$1 = null;
3236
3353
  }
3237
3354
  }
3238
- opts = __spreadProps(__spreadValues(__spreadValues({}, options$1), opts), { onClose: close });
3239
- getInstance$1(opts, (notification) => {
3355
+ const opts2 = __spreadProps(__spreadValues(__spreadValues({}, options$1), opts), { onClose: close });
3356
+ getInstance$1(opts2, (notification) => {
3240
3357
  messageInstance$1 = notification;
3241
3358
  });
3242
3359
  }
3243
3360
  const errorMsg$1 = (msg) => {
3244
3361
  if (!msg) {
3245
- console.warn("[NutUI Toast]: msg\u4E0D\u80FD\u4E3A\u7A7A");
3362
+ console.warn("[NutUI Toast]: msg cannot be null");
3246
3363
  }
3247
3364
  };
3248
3365
  var Toast = {
@@ -3289,6 +3406,7 @@ const defaultProps$G = {
3289
3406
  let startValue;
3290
3407
  let currentValue;
3291
3408
  const Range = (props) => {
3409
+ const { locale } = useConfig();
3292
3410
  const {
3293
3411
  className,
3294
3412
  range,
@@ -3317,7 +3435,7 @@ const Range = (props) => {
3317
3435
  if (modelValue) {
3318
3436
  if (!range && (modelValue < min || modelValue > max)) {
3319
3437
  SetInitValue(0);
3320
- Toast.text(`${modelValue}\u4E0D\u5728\u8BE5\u533A\u95F4\u5185`);
3438
+ Toast.text(`${modelValue} ${locale.range.rangeText}`);
3321
3439
  return;
3322
3440
  }
3323
3441
  SetInitValue(modelValue);
@@ -3618,12 +3736,11 @@ const defaultProps$F = {
3618
3736
  }
3619
3737
  };
3620
3738
  const CalendarItem = (props) => {
3739
+ const { locale } = useConfig();
3621
3740
  const {
3622
- children,
3623
3741
  type,
3624
3742
  isAutoBackFill,
3625
3743
  poppable,
3626
- visible,
3627
3744
  title,
3628
3745
  defaultValue,
3629
3746
  startDate,
@@ -3632,11 +3749,11 @@ const CalendarItem = (props) => {
3632
3749
  onUpdate,
3633
3750
  onClose
3634
3751
  } = __spreadValues(__spreadValues({}, defaultProps$F), props);
3635
- const weeks = ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
3752
+ const weeks = locale.calendaritem.weekdays;
3636
3753
  const [yearMonthTitle, setYearMonthTitle] = useState("");
3637
3754
  const [unLoadPrev, setUnLoadPrev] = useState(false);
3638
3755
  const [monthsData, setMonthsData] = useState([]);
3639
- const [state, setState] = useState({
3756
+ const [state] = useState({
3640
3757
  currDate: "",
3641
3758
  touchParams: {
3642
3759
  startY: 0,
@@ -3794,7 +3911,7 @@ const CalendarItem = (props) => {
3794
3911
  };
3795
3912
  const monthInfo = {
3796
3913
  curData,
3797
- title: `${title2.year}\u5E74${title2.month}\u6708`,
3914
+ title: locale.calendaritem.monthTitle(title2.year, title2.month),
3798
3915
  monthData: [
3799
3916
  ...getDaysStatus(preMonthDays, "prev"),
3800
3917
  ...getDaysStatus(currMonthDays, "curr")
@@ -3968,7 +4085,7 @@ const CalendarItem = (props) => {
3968
4085
  className: headerClasses
3969
4086
  }, poppable ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", {
3970
4087
  className: "calendar-title"
3971
- }, title), /* @__PURE__ */ React__default.createElement("div", {
4088
+ }, locale.calendaritem.title), /* @__PURE__ */ React__default.createElement("div", {
3972
4089
  className: "calendar-curr-month"
3973
4090
  }, yearMonthTitle)) : "", /* @__PURE__ */ React__default.createElement("div", {
3974
4091
  className: "calendar-weeks",
@@ -3987,7 +4104,7 @@ const CalendarItem = (props) => {
3987
4104
  ref: monthsPanel
3988
4105
  }, /* @__PURE__ */ React__default.createElement("div", {
3989
4106
  className: "calendar-loading-tip"
3990
- }, !unLoadPrev ? "\u52A0\u8F7D\u4E0A\u4E00\u4E2A\u6708" : "\u6CA1\u6709\u66F4\u65E9\u6708\u4EFD"), monthsData.map((month, key) => /* @__PURE__ */ React__default.createElement("div", {
4107
+ }, !unLoadPrev ? locale.calendaritem.loadPreviousMonth : locale.calendaritem.noEarlierMonth), monthsData.map((month, key) => /* @__PURE__ */ React__default.createElement("div", {
3991
4108
  className: "calendar-month",
3992
4109
  key
3993
4110
  }, /* @__PURE__ */ React__default.createElement("div", {
@@ -4006,16 +4123,16 @@ const CalendarItem = (props) => {
4006
4123
  className: "calendar-day"
4007
4124
  }, day.type === "curr" ? day.day : ""), isCurrDay(month, day.day) ? /* @__PURE__ */ React__default.createElement("div", {
4008
4125
  className: "calendar-curr-tips"
4009
- }, "\u4ECA\u5929") : "", isStartTip(day, month) ? /* @__PURE__ */ React__default.createElement("div", {
4126
+ }, locale.calendaritem.today) : "", isStartTip(day, month) ? /* @__PURE__ */ React__default.createElement("div", {
4010
4127
  className: "calendar-day-tip"
4011
- }, "\u5F00\u59CB") : isEndTip(day, month) ? /* @__PURE__ */ React__default.createElement("div", {
4128
+ }, locale.calendaritem.start) : isEndTip(day, month) ? /* @__PURE__ */ React__default.createElement("div", {
4012
4129
  className: "calendar-day-tip"
4013
- }, "\u7ED3\u675F") : "")))))))), poppable && !isAutoBackFill ? /* @__PURE__ */ React__default.createElement("div", {
4130
+ }, locale.calendaritem.end) : "")))))))), poppable && !isAutoBackFill ? /* @__PURE__ */ React__default.createElement("div", {
4014
4131
  className: "nut-calendar-footer"
4015
4132
  }, /* @__PURE__ */ React__default.createElement("div", {
4016
4133
  className: "calendar-confirm-btn",
4017
4134
  onClick: confirm2
4018
- }, "\u786E\u5B9A")) : ""));
4135
+ }, locale.confirm)) : ""));
4019
4136
  };
4020
4137
  CalendarItem.defaultProps = defaultProps$F;
4021
4138
  CalendarItem.displayName = "NutCalendarItem";
@@ -4034,6 +4151,7 @@ const defaultProps$E = {
4034
4151
  }
4035
4152
  };
4036
4153
  const Calendar = (props) => {
4154
+ const { locale } = useConfig();
4037
4155
  const {
4038
4156
  children,
4039
4157
  poppable,
@@ -4070,7 +4188,7 @@ const Calendar = (props) => {
4070
4188
  type,
4071
4189
  isAutoBackFill,
4072
4190
  poppable,
4073
- title,
4191
+ title: locale.calendaritem.title || title,
4074
4192
  defaultValue,
4075
4193
  startDate,
4076
4194
  endDate,
@@ -4081,7 +4199,7 @@ const Calendar = (props) => {
4081
4199
  type,
4082
4200
  isAutoBackFill,
4083
4201
  poppable,
4084
- title,
4202
+ title: locale.calendaritem.title,
4085
4203
  defaultValue,
4086
4204
  startDate,
4087
4205
  endDate,
@@ -4141,7 +4259,7 @@ const CheckboxGroup = React__default.forwardRef((props, ref) => {
4141
4259
  return (innerValue == null ? void 0 : innerValue.indexOf(child.props.label || child.children)) > -1;
4142
4260
  }
4143
4261
  function cloneChildren() {
4144
- return React__default.Children.map(children, (child, index2) => {
4262
+ return React__default.Children.map(children, (child) => {
4145
4263
  const childChecked = validateChildChecked(child);
4146
4264
  if (child.type.displayName !== "NutCheckBox") {
4147
4265
  return React__default.cloneElement(child);
@@ -4412,6 +4530,7 @@ const InternalPickerSlot = (props, ref) => {
4412
4530
  };
4413
4531
  const PickerSlot = React__default.forwardRef(InternalPickerSlot);
4414
4532
  const InternalPicker = (props, ref) => {
4533
+ const { locale } = useConfig();
4415
4534
  const _a = props, {
4416
4535
  isVisible,
4417
4536
  title,
@@ -4519,12 +4638,12 @@ const InternalPicker = (props, ref) => {
4519
4638
  }, /* @__PURE__ */ React__default.createElement("span", {
4520
4639
  className: b2("cancel-btn"),
4521
4640
  onClick: () => closeActionSheet()
4522
- }, "\u53D6\u6D88"), /* @__PURE__ */ React__default.createElement("div", {
4641
+ }, locale.cancel), /* @__PURE__ */ React__default.createElement("div", {
4523
4642
  className: b2("title")
4524
4643
  }, title || ""), /* @__PURE__ */ React__default.createElement("span", {
4525
4644
  className: b2("confirm-btn"),
4526
4645
  onClick: () => confirm2()
4527
- }, "\u786E\u5B9A")), /* @__PURE__ */ React__default.createElement("div", {
4646
+ }, locale.confirm)), /* @__PURE__ */ React__default.createElement("div", {
4528
4647
  className: b2("panel"),
4529
4648
  ref: pickerRef
4530
4649
  }, listData == null ? void 0 : listData.map((item, index2) => {
@@ -5021,6 +5140,7 @@ const defaultProps$z = {
5021
5140
  clearable: true
5022
5141
  };
5023
5142
  const Input = (props) => {
5143
+ const { locale } = useConfig();
5024
5144
  const {
5025
5145
  type,
5026
5146
  defaultValue,
@@ -5097,7 +5217,7 @@ const Input = (props) => {
5097
5217
  }, label) : null), /* @__PURE__ */ React__default.createElement("input", {
5098
5218
  className: "input-text",
5099
5219
  type,
5100
- placeholder,
5220
+ placeholder: locale.placeholder || placeholder,
5101
5221
  disabled,
5102
5222
  readOnly: readonly,
5103
5223
  value: inputValue,
@@ -5375,6 +5495,7 @@ const defaultProps$v = {
5375
5495
  }
5376
5496
  };
5377
5497
  const ShortPassword = (props) => {
5498
+ const { locale } = useConfig();
5378
5499
  const _a = props, {
5379
5500
  title,
5380
5501
  desc,
@@ -5479,9 +5600,9 @@ const ShortPassword = (props) => {
5479
5600
  style: __spreadValues({}, style)
5480
5601
  }, reset), /* @__PURE__ */ React__default.createElement("div", {
5481
5602
  className: b2("title")
5482
- }, title), /* @__PURE__ */ React__default.createElement("div", {
5603
+ }, locale.shortpassword.title || title), /* @__PURE__ */ React__default.createElement("div", {
5483
5604
  className: b2("subtitle")
5484
- }, desc), /* @__PURE__ */ React__default.createElement("div", {
5605
+ }, locale.shortpassword.desc || desc), /* @__PURE__ */ React__default.createElement("div", {
5485
5606
  className: b2("input")
5486
5607
  }, /* @__PURE__ */ React__default.createElement("input", {
5487
5608
  ref: textInput,
@@ -5515,15 +5636,15 @@ const ShortPassword = (props) => {
5515
5636
  name: "tips"
5516
5637
  }), /* @__PURE__ */ React__default.createElement("div", {
5517
5638
  onClick: onTips
5518
- }, tips)) : null), !noButton ? /* @__PURE__ */ React__default.createElement("div", {
5639
+ }, locale.shortpassword.tips || tips)) : null), !noButton ? /* @__PURE__ */ React__default.createElement("div", {
5519
5640
  className: b2("footer")
5520
5641
  }, /* @__PURE__ */ React__default.createElement("div", {
5521
5642
  className: b2("footer__cancel"),
5522
5643
  onClick: onCancel
5523
- }, "\u53D6\u6D88"), /* @__PURE__ */ React__default.createElement("div", {
5644
+ }, locale.cancel), /* @__PURE__ */ React__default.createElement("div", {
5524
5645
  className: b2("footer__sure"),
5525
5646
  onClick: () => sure()
5526
- }, "\u786E\u8BA4")) : null)));
5647
+ }, locale.confirm)) : null)));
5527
5648
  };
5528
5649
  ShortPassword.defaultProps = defaultProps$v;
5529
5650
  ShortPassword.displayName = "NutShortPassword";
@@ -5539,6 +5660,7 @@ const defaultProps$u = {
5539
5660
  autosize: false
5540
5661
  };
5541
5662
  const TextArea = (props) => {
5663
+ const { locale } = useConfig();
5542
5664
  const {
5543
5665
  className,
5544
5666
  defaultValue,
@@ -5620,7 +5742,7 @@ const TextArea = (props) => {
5620
5742
  },
5621
5743
  rows,
5622
5744
  maxLength: maxlength < 0 ? 0 : maxlength,
5623
- placeholder
5745
+ placeholder: locale.placeholder
5624
5746
  }), limitshow ? /* @__PURE__ */ React__default.createElement("div", {
5625
5747
  className: textareaBem("limit")
5626
5748
  }, inputValue.length, "/", maxlength < 0 ? 0 : maxlength) : null);
@@ -5685,6 +5807,8 @@ const defaultProps$t = {
5685
5807
  url: "",
5686
5808
  maximum: 1,
5687
5809
  uploadIcon: "photograph",
5810
+ uploadIconSize: "",
5811
+ listType: "picture",
5688
5812
  name: "file",
5689
5813
  accept: "*",
5690
5814
  disabled: false,
@@ -5709,6 +5833,7 @@ const defaultProps$t = {
5709
5833
  class FileItem {
5710
5834
  constructor() {
5711
5835
  __publicField(this, "status", "ready");
5836
+ __publicField(this, "message", "\u51C6\u5907\u4E2D..");
5712
5837
  __publicField(this, "uid", new Date().getTime().toString());
5713
5838
  __publicField(this, "name");
5714
5839
  __publicField(this, "url");
@@ -5720,8 +5845,11 @@ const InternalUploader = (props, ref) => {
5720
5845
  const _a = __spreadValues(__spreadValues({}, defaultProps$t), props), {
5721
5846
  children,
5722
5847
  uploadIcon,
5848
+ uploadIconSize,
5723
5849
  name,
5724
5850
  accept,
5851
+ defaultFileList,
5852
+ listType,
5725
5853
  disabled,
5726
5854
  multiple,
5727
5855
  url,
@@ -5742,6 +5870,8 @@ const InternalUploader = (props, ref) => {
5742
5870
  clearInput,
5743
5871
  start: start2,
5744
5872
  removeImage,
5873
+ change,
5874
+ fileItemClick,
5745
5875
  progress,
5746
5876
  success,
5747
5877
  update: update2,
@@ -5752,8 +5882,11 @@ const InternalUploader = (props, ref) => {
5752
5882
  } = _a, restProps = __objRest(_a, [
5753
5883
  "children",
5754
5884
  "uploadIcon",
5885
+ "uploadIconSize",
5755
5886
  "name",
5756
5887
  "accept",
5888
+ "defaultFileList",
5889
+ "listType",
5757
5890
  "disabled",
5758
5891
  "multiple",
5759
5892
  "url",
@@ -5774,6 +5907,8 @@ const InternalUploader = (props, ref) => {
5774
5907
  "clearInput",
5775
5908
  "start",
5776
5909
  "removeImage",
5910
+ "change",
5911
+ "fileItemClick",
5777
5912
  "progress",
5778
5913
  "success",
5779
5914
  "update",
@@ -5784,6 +5919,11 @@ const InternalUploader = (props, ref) => {
5784
5919
  ]);
5785
5920
  const [fileList, setFileList] = useState([]);
5786
5921
  const [uploadQueue, setUploadQueue] = useState([]);
5922
+ useEffect(() => {
5923
+ if (defaultFileList) {
5924
+ setFileList(defaultFileList);
5925
+ }
5926
+ }, [defaultFileList]);
5787
5927
  const b2 = cn("uploader");
5788
5928
  const classes = classNames(className, b2(""));
5789
5929
  useImperativeHandle(ref, () => ({
@@ -5822,6 +5962,7 @@ const InternalUploader = (props, ref) => {
5822
5962
  fileList2.map((item) => {
5823
5963
  if (item.uid === fileItem.uid) {
5824
5964
  item.status = "ready";
5965
+ item.message = "\u51C6\u5907\u4E0A\u4F20";
5825
5966
  }
5826
5967
  });
5827
5968
  return [...fileList2];
@@ -5833,6 +5974,7 @@ const InternalUploader = (props, ref) => {
5833
5974
  fileList2.map((item) => {
5834
5975
  if (item.uid === fileItem.uid) {
5835
5976
  item.status = "uploading";
5977
+ item.message = "\u4E0A\u4F20\u4E2D...";
5836
5978
  }
5837
5979
  });
5838
5980
  return [...fileList2];
@@ -5845,6 +5987,7 @@ const InternalUploader = (props, ref) => {
5845
5987
  fileList2.map((item) => {
5846
5988
  if (item.uid === fileItem.uid) {
5847
5989
  item.status = "success";
5990
+ item.message = "\u4E0A\u4F20\u6210\u529F";
5848
5991
  }
5849
5992
  });
5850
5993
  return [...fileList2];
@@ -5859,6 +6002,7 @@ const InternalUploader = (props, ref) => {
5859
6002
  fileList2.map((item) => {
5860
6003
  if (item.uid === fileItem.uid) {
5861
6004
  item.status = "error";
6005
+ item.message = "\u4E0A\u4F20\u5931\u8D25";
5862
6006
  }
5863
6007
  });
5864
6008
  return [...fileList2];
@@ -5888,6 +6032,7 @@ const InternalUploader = (props, ref) => {
5888
6032
  fileItem.type = file.type;
5889
6033
  fileItem.formData = formData;
5890
6034
  fileItem.uid = file.lastModified + fileItem.uid;
6035
+ fileItem.message = "\u51C6\u5907\u4E0A\u4F20";
5891
6036
  executeUpload(fileItem, index2);
5892
6037
  if (isPreview && file.type.includes("image")) {
5893
6038
  const reader = new FileReader();
@@ -5955,9 +6100,12 @@ const InternalUploader = (props, ref) => {
5955
6100
  clearInputValue($el);
5956
6101
  }
5957
6102
  };
6103
+ const handleItemClick = (file) => {
6104
+ fileItemClick && fileItemClick(file);
6105
+ };
5958
6106
  return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
5959
6107
  className: classes
5960
- }, restProps), children ? /* @__PURE__ */ React__default.createElement("div", {
6108
+ }, restProps), children && /* @__PURE__ */ React__default.createElement("div", {
5961
6109
  className: "nut-uploader__slot"
5962
6110
  }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children, maximum > fileList.length && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, capture ? /* @__PURE__ */ React__default.createElement("input", {
5963
6111
  className: "nut-uploader__input",
@@ -5976,30 +6124,63 @@ const InternalUploader = (props, ref) => {
5976
6124
  disabled,
5977
6125
  multiple,
5978
6126
  onChange: fileChange
5979
- })))) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, fileList.length !== 0 && fileList.map((item, index2) => {
5980
- console.log("item", item);
6127
+ })))), fileList.length !== 0 && fileList.map((item, index2) => {
5981
6128
  return /* @__PURE__ */ React__default.createElement("div", {
5982
- className: "nut-uploader__preview",
6129
+ className: `nut-uploader__preview ${listType}`,
5983
6130
  key: item.uid
5984
- }, /* @__PURE__ */ React__default.createElement("div", {
6131
+ }, listType == "picture" && !children && /* @__PURE__ */ React__default.createElement("div", {
5985
6132
  className: "nut-uploader__preview-img"
5986
- }, isDeletable && /* @__PURE__ */ React__default.createElement(Icon, {
6133
+ }, item.status === "ready" ? /* @__PURE__ */ React__default.createElement("div", {
6134
+ className: "nut-uploader__preview__progress"
6135
+ }, /* @__PURE__ */ React__default.createElement("div", {
6136
+ className: "nut-uploader__preview__progress__msg"
6137
+ }, item.message)) : item.status !== "success" && /* @__PURE__ */ React__default.createElement("div", {
6138
+ className: "nut-uploader__preview__progress"
6139
+ }, /* @__PURE__ */ React__default.createElement(Icon, {
6140
+ color: "#fff",
6141
+ name: `${item.status == "error" ? "failure" : "loading"}`
6142
+ }), /* @__PURE__ */ React__default.createElement("div", {
6143
+ className: "nut-uploader__preview__progress__msg"
6144
+ }, item.message)), isDeletable && /* @__PURE__ */ React__default.createElement(Icon, {
5987
6145
  color: "rgba(0,0,0,0.6)",
5988
6146
  className: "close",
5989
- name: "circle-close",
6147
+ name: "failure",
5990
6148
  click: () => onDelete(item, index2)
5991
- }), item.type.includes("image") && item.url && /* @__PURE__ */ React__default.createElement("img", {
6149
+ }), item.type.includes("image") ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, item.url && /* @__PURE__ */ React__default.createElement("img", {
5992
6150
  className: "nut-uploader__preview-img__c",
5993
- src: item.url
5994
- }), !item.type.includes("image") && defaultImg && /* @__PURE__ */ React__default.createElement("img", {
6151
+ src: item.url,
6152
+ onClick: () => handleItemClick(item)
6153
+ })) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, defaultImg ? /* @__PURE__ */ React__default.createElement("img", {
5995
6154
  className: "nut-uploader__preview-img__c",
5996
- src: defaultImg
5997
- }), item.status !== "success" && /* @__PURE__ */ React__default.createElement("div", {
6155
+ src: defaultImg,
6156
+ onClick: () => handleItemClick(item)
6157
+ }) : /* @__PURE__ */ React__default.createElement("div", {
6158
+ className: "nut-uploader__preview-img__file"
6159
+ }, /* @__PURE__ */ React__default.createElement("div", {
6160
+ onClick: () => handleItemClick(item),
6161
+ className: "nut-uploader__preview-img__file__name"
6162
+ }, /* @__PURE__ */ React__default.createElement(Icon, {
6163
+ color: "#808080",
6164
+ name: "link"
6165
+ }), "\xA0", item.name))), /* @__PURE__ */ React__default.createElement("div", {
5998
6166
  className: "tips"
5999
- }, item.status)));
6000
- }), maximum > fileList.length && /* @__PURE__ */ React__default.createElement("div", {
6001
- className: "nut-uploader__upload"
6167
+ }, item.name)), listType == "list" && /* @__PURE__ */ React__default.createElement("div", {
6168
+ className: "nut-uploader__preview-list"
6169
+ }, /* @__PURE__ */ React__default.createElement("div", {
6170
+ className: `nut-uploader__preview-img__file__name ${item.status}`,
6171
+ onClick: () => handleItemClick(item)
6172
+ }, /* @__PURE__ */ React__default.createElement(Icon, {
6173
+ name: "link"
6174
+ }), "\xA0", item.name), /* @__PURE__ */ React__default.createElement(Icon, {
6175
+ color: "#808080",
6176
+ className: "nut-uploader__preview-img__file__del",
6177
+ name: "del",
6178
+ click: () => onDelete(item, index2)
6179
+ })));
6180
+ }), maximum > fileList.length && listType == "picture" && !children && /* @__PURE__ */ React__default.createElement("div", {
6181
+ className: `nut-uploader__upload ${listType}`
6002
6182
  }, /* @__PURE__ */ React__default.createElement(Icon, {
6183
+ size: uploadIconSize,
6003
6184
  color: "#808080",
6004
6185
  name: uploadIcon
6005
6186
  }), capture ? /* @__PURE__ */ React__default.createElement("input", {
@@ -6019,7 +6200,7 @@ const InternalUploader = (props, ref) => {
6019
6200
  disabled,
6020
6201
  multiple,
6021
6202
  onChange: fileChange
6022
- }))));
6203
+ })));
6023
6204
  };
6024
6205
  const Uploader = React__default.forwardRef(InternalUploader);
6025
6206
  Uploader.defaultProps = defaultProps$t;
@@ -10864,6 +11045,7 @@ const defaultProps$p = {
10864
11045
  lockScroll: false
10865
11046
  };
10866
11047
  const BaseDialog = (props, ref) => {
11048
+ const { locale } = useConfig();
10867
11049
  const _a = props, {
10868
11050
  visible,
10869
11051
  footer,
@@ -10894,7 +11076,7 @@ const BaseDialog = (props, ref) => {
10894
11076
  const renderFooter = () => {
10895
11077
  if (footer === null)
10896
11078
  return;
10897
- const handleCancel = (e2) => {
11079
+ const handleCancel = () => {
10898
11080
  if (!cancelAutoClose)
10899
11081
  return;
10900
11082
  onClosed == null ? void 0 : onClosed();
@@ -10916,13 +11098,13 @@ const BaseDialog = (props, ref) => {
10916
11098
  type: "primary",
10917
11099
  className: "nut-dialog__footer-cancel",
10918
11100
  onClick: () => handleCancel()
10919
- }, cancelText), !noOkBtn && /* @__PURE__ */ React__default.createElement(Button, {
11101
+ }, locale.cancel || cancelText), !noOkBtn && /* @__PURE__ */ React__default.createElement(Button, {
10920
11102
  size: "small",
10921
11103
  type: "primary",
10922
11104
  className: classNames("nut-dialog__footer-ok", { disabled: okBtnDisabled }),
10923
11105
  disabled: okBtnDisabled,
10924
11106
  onClick: () => handleOk()
10925
- }, okText));
11107
+ }, locale.confirm || okText));
10926
11108
  return footerContent;
10927
11109
  };
10928
11110
  return /* @__PURE__ */ React__default.createElement(DialogWrapper, __spreadProps(__spreadValues({}, restProps), {
@@ -10961,6 +11143,7 @@ const defaultProps$o = {
10961
11143
  loadMoreTxt: "\u54CE\u5440\uFF0C\u8FD9\u91CC\u662F\u5E95\u90E8\u4E86\u5566"
10962
11144
  };
10963
11145
  const Infiniteloading = (props) => {
11146
+ const { locale } = useConfig();
10964
11147
  const _a = __spreadValues(__spreadValues({}, defaultProps$o), props), {
10965
11148
  children,
10966
11149
  hasMore,
@@ -11134,7 +11317,7 @@ const Infiniteloading = (props) => {
11134
11317
  name: pullIcon
11135
11318
  }), /* @__PURE__ */ React__default.createElement("span", {
11136
11319
  className: "top-text"
11137
- }, pullTxt))), /* @__PURE__ */ React__default.createElement("div", {
11320
+ }, locale.infiniteloading.pullRefreshText || pullTxt))), /* @__PURE__ */ React__default.createElement("div", {
11138
11321
  className: "nut-infinite-container"
11139
11322
  }, children), /* @__PURE__ */ React__default.createElement("div", {
11140
11323
  className: "nut-infinite-bottom"
@@ -11145,9 +11328,9 @@ const Infiniteloading = (props) => {
11145
11328
  name: loadIcon
11146
11329
  }), /* @__PURE__ */ React__default.createElement("div", {
11147
11330
  className: "bottom-text"
11148
- }, loadTxt)) : !hasMore && /* @__PURE__ */ React__default.createElement("div", {
11331
+ }, locale.infiniteloading.loadText || loadTxt)) : !hasMore && /* @__PURE__ */ React__default.createElement("div", {
11149
11332
  className: "tips"
11150
- }, loadMoreTxt)));
11333
+ }, locale.infiniteloading.loadMoreText || loadMoreTxt)));
11151
11334
  };
11152
11335
  Infiniteloading.defaultProps = defaultProps$o;
11153
11336
  Infiniteloading.displayName = "NutInfiniteloading";
@@ -11367,86 +11550,118 @@ const Switch = (props) => {
11367
11550
  };
11368
11551
  Switch.defaultProps = defaultProps$n;
11369
11552
  Switch.displayName = "NutSwitch";
11553
+ const isObject = (val) => val !== null && typeof val === "object";
11370
11554
  const defaultProps$m = {
11371
- strokeInnerWidth: 10,
11372
- progress: 10,
11373
- isAuto: false,
11374
- progressOption: {}
11555
+ strokeWidth: 5,
11556
+ radius: 50,
11557
+ strokeLinecap: "round",
11558
+ circleColor: "",
11559
+ pathColor: "",
11560
+ clockwise: true
11375
11561
  };
11376
11562
  const CircleProgress = (props) => {
11563
+ var _b;
11377
11564
  const _a = __spreadValues(__spreadValues({}, defaultProps$m), props), {
11378
11565
  children,
11379
- strokeInnerWidth,
11380
11566
  progress,
11381
- isAuto,
11382
- progressOption,
11383
11567
  className,
11384
- style
11568
+ radius,
11569
+ pathColor,
11570
+ clockwise,
11571
+ circleColor,
11572
+ strokeWidth,
11573
+ style,
11574
+ strokeLinecap
11385
11575
  } = _a, restProps = __objRest(_a, [
11386
11576
  "children",
11387
- "strokeInnerWidth",
11388
11577
  "progress",
11389
- "isAuto",
11390
- "progressOption",
11391
11578
  "className",
11392
- "style"
11579
+ "radius",
11580
+ "pathColor",
11581
+ "clockwise",
11582
+ "circleColor",
11583
+ "strokeWidth",
11584
+ "style",
11585
+ "strokeLinecap"
11393
11586
  ]);
11394
11587
  const b2 = cn("circleprogress");
11395
11588
  const classes = classNames(className, b2(""));
11396
- const option = () => {
11397
- const baseOption = {
11398
- radius: 50,
11399
- strokeOutWidth: 10,
11400
- backColor: "#d9d9d9",
11401
- progressColor: "red",
11402
- cy: 1,
11403
- cx: 1,
11404
- size: 1,
11405
- startPosition: ""
11406
- };
11407
- Object.assign(baseOption, progressOption);
11408
- baseOption.cy = baseOption.cx = baseOption.radius + baseOption.strokeOutWidth;
11409
- baseOption.size = (baseOption.radius + baseOption.strokeOutWidth) * 2;
11410
- baseOption.startPosition = `rotate(-90,${baseOption.cx},${baseOption.cy})`;
11411
- return baseOption;
11412
- };
11589
+ const refRandomId = Math.random().toString(36).slice(-8);
11413
11590
  const styles = __spreadValues({
11414
- height: `${option().size}px`,
11415
- width: `${option().size}px`
11591
+ height: `${Number(radius) * 2}px`,
11592
+ width: `${Number(radius) * 2}px`
11416
11593
  }, style);
11417
- const arcLength = () => {
11418
- const circleLength = Math.floor(2 * Math.PI * option().radius);
11419
- const progressLength = progress / 100 * circleLength;
11420
- return `${progressLength},${circleLength}`;
11594
+ const pathStyle = {
11595
+ stroke: pathColor
11596
+ };
11597
+ const hoverStyle = () => {
11598
+ let perimeter = 283;
11599
+ let offset = perimeter * Number(progress) / 100;
11600
+ return {
11601
+ stroke: isObject(circleColor) ? `url(#${refRandomId})` : circleColor,
11602
+ strokeDasharray: `${offset}px ${perimeter}px`
11603
+ };
11604
+ };
11605
+ const path = () => {
11606
+ const isWise = clockwise ? 1 : 0;
11607
+ return `M 50 50 m -45 0 a 45 45 0 1 ${isWise} 90 0 a 45 45 0 1 ${isWise} -90 0`;
11608
+ };
11609
+ const hoverColor = () => {
11610
+ return isObject(circleColor) ? `url(#${refRandomId})` : circleColor;
11611
+ };
11612
+ const stop2 = () => {
11613
+ if (!isObject(circleColor)) {
11614
+ return;
11615
+ }
11616
+ let color = circleColor;
11617
+ const colorArr = Object.keys(color).sort((a, b22) => parseFloat(a) - parseFloat(b22));
11618
+ let stopArr = [];
11619
+ colorArr.map((item) => {
11620
+ let obj = {
11621
+ key: "",
11622
+ value: ""
11623
+ };
11624
+ obj.key = item;
11625
+ obj.value = color[item];
11626
+ stopArr.push(obj);
11627
+ });
11628
+ return stopArr;
11421
11629
  };
11422
11630
  return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
11423
11631
  className: classes,
11424
11632
  style: styles
11425
11633
  }, restProps), /* @__PURE__ */ React__default.createElement("svg", {
11426
- height: option().size,
11427
- width: option().size,
11428
- "x-mlns": "http://www.w3.org/200/svg"
11429
- }, /* @__PURE__ */ React__default.createElement("circle", {
11430
- r: option().radius,
11431
- cx: option().cx,
11432
- cy: option().cy,
11433
- stroke: option().backColor,
11434
- strokeWidth: option().strokeOutWidth,
11435
- fill: "none"
11436
- }), /* @__PURE__ */ React__default.createElement("circle", {
11437
- r: option().radius,
11438
- cx: option().cx,
11439
- cy: option().cy,
11440
- stroke: option().progressColor,
11441
- strokeWidth: strokeInnerWidth,
11442
- strokeDasharray: arcLength(),
11443
- transform: option().startPosition,
11634
+ viewBox: "0 0 100 100"
11635
+ }, /* @__PURE__ */ React__default.createElement("defs", null, /* @__PURE__ */ React__default.createElement("linearGradient", {
11636
+ id: refRandomId,
11637
+ x1: "100%",
11638
+ y1: "0%",
11639
+ x2: "0%",
11640
+ y2: "0%"
11641
+ }, (_b = stop2()) == null ? void 0 : _b.map((item, index2) => {
11642
+ return /* @__PURE__ */ React__default.createElement("stop", {
11643
+ key: index2,
11644
+ offset: item.key,
11645
+ stopColor: item.value
11646
+ });
11647
+ }))), /* @__PURE__ */ React__default.createElement("path", {
11648
+ className: "nut-circleprogress-path",
11649
+ style: pathStyle,
11650
+ d: path(),
11651
+ fill: "none",
11652
+ strokeWidth
11653
+ }), /* @__PURE__ */ React__default.createElement("path", {
11654
+ className: "nut-circleprogress-hover",
11655
+ style: hoverStyle(),
11656
+ d: path(),
11444
11657
  fill: "none",
11445
- strokeLinecap: "round",
11446
- style: { transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease 0s" }
11658
+ stroke: hoverColor(),
11659
+ strokeLinecap,
11660
+ transform: "rotate(90,50,50)",
11661
+ strokeWidth
11447
11662
  })), /* @__PURE__ */ React__default.createElement("div", {
11448
- className: "nut-circleprogress-content"
11449
- }, !isAuto ? `${progress}%` : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children)));
11663
+ className: "nut-circleprogress-text"
11664
+ }, children ? children : /* @__PURE__ */ React__default.createElement("div", null, progress, "%")));
11450
11665
  };
11451
11666
  CircleProgress.defaultProps = defaultProps$m;
11452
11667
  CircleProgress.displayName = "NutCircleProgress";
@@ -11711,7 +11926,7 @@ const defaultProps$k = {
11711
11926
  };
11712
11927
  const Steps = (props) => {
11713
11928
  const propSteps = __spreadValues(__spreadValues({}, defaultProps$k), props);
11714
- const _a = propSteps, { children, direction, className } = _a, restProps = __objRest(_a, ["children", "direction", "className"]);
11929
+ const _a = propSteps, { children, current, direction, className, progressDot, clickStep } = _a, restProps = __objRest(_a, ["children", "current", "direction", "className", "progressDot", "clickStep"]);
11715
11930
  const parentSteps = {
11716
11931
  propSteps
11717
11932
  };
@@ -11733,6 +11948,7 @@ const defaultProps$j = {
11733
11948
  content: "",
11734
11949
  activeIndex: 0,
11735
11950
  icon: "",
11951
+ iconColor: "",
11736
11952
  size: "12px"
11737
11953
  };
11738
11954
  const Step = (props) => {
@@ -11742,6 +11958,7 @@ const Step = (props) => {
11742
11958
  content,
11743
11959
  activeIndex,
11744
11960
  icon,
11961
+ iconColor,
11745
11962
  size,
11746
11963
  className,
11747
11964
  renderContent
@@ -11751,6 +11968,7 @@ const Step = (props) => {
11751
11968
  "content",
11752
11969
  "activeIndex",
11753
11970
  "icon",
11971
+ "iconColor",
11754
11972
  "size",
11755
11973
  "className",
11756
11974
  "renderContent"
@@ -11763,13 +11981,19 @@ const Step = (props) => {
11763
11981
  return "finish";
11764
11982
  return index2 === +parent.propSteps.current ? "process" : "wait";
11765
11983
  };
11984
+ const handleClickStep = () => {
11985
+ var _a2;
11986
+ (_a2 = parent.propSteps) == null ? void 0 : _a2.clickStep(activeIndex);
11987
+ };
11766
11988
  const b2 = cn("step");
11767
11989
  const classes = classNames({
11768
11990
  [`${b2("")}-${getCurrentStatus()}`]: true
11769
11991
  }, className, b2(""));
11770
- return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
11992
+ return /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues({
11771
11993
  className: classes
11772
- }, restProps), /* @__PURE__ */ React__default.createElement("div", {
11994
+ }, restProps), {
11995
+ onClick: handleClickStep
11996
+ }), /* @__PURE__ */ React__default.createElement("div", {
11773
11997
  className: "nut-step-head"
11774
11998
  }, /* @__PURE__ */ React__default.createElement("div", {
11775
11999
  className: "nut-step-line"
@@ -11777,6 +12001,7 @@ const Step = (props) => {
11777
12001
  className: `nut-step-icon ${!dot ? icon ? "is-icon" : "is-text" : ""}`
11778
12002
  }, icon ? /* @__PURE__ */ React__default.createElement(Icon, {
11779
12003
  className: "nut-step-icon-inner",
12004
+ color: iconColor,
11780
12005
  name: icon,
11781
12006
  size
11782
12007
  }) : dot ? /* @__PURE__ */ React__default.createElement("span", null) : /* @__PURE__ */ React__default.createElement("span", {
@@ -11795,7 +12020,7 @@ Step.defaultProps = defaultProps$j;
11795
12020
  Step.displayName = "NutStep";
11796
12021
  const DataContext = createContext({});
11797
12022
  const defaultProps$i = {
11798
- width: window.innerWidth,
12023
+ width: typeof window === "object" ? window.innerWidth : 375,
11799
12024
  height: 0,
11800
12025
  duration: 500,
11801
12026
  initPage: 0,
@@ -12223,46 +12448,122 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
12223
12448
  });
12224
12449
  SwiperItem.defaultProps = defaultProps$h;
12225
12450
  SwiperItem.displayName = "NutSwiperItem";
12451
+ const AvatarContext = createContext({});
12226
12452
  const defaultProps$g = {
12227
- size: "normal",
12453
+ size: "",
12228
12454
  icon: "",
12229
- shape: "round",
12230
12455
  bgColor: "#eee",
12456
+ color: "#666",
12231
12457
  prefixCls: "nut-avatar",
12232
- src: ""
12458
+ url: "",
12459
+ alt: ""
12233
12460
  };
12234
12461
  const Avatar = (props) => {
12235
- const _a = __spreadValues(__spreadValues({}, defaultProps$g), props), { children, prefixCls, size, shape, bgColor, src, icon, className, style } = _a, rest = __objRest(_a, ["children", "prefixCls", "size", "shape", "bgColor", "src", "icon", "className", "style"]);
12236
- const sizeValue = ["large", "normal", "small"];
12462
+ var _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
12463
+ const _a = __spreadValues(__spreadValues({}, defaultProps$g), props), {
12464
+ children,
12465
+ prefixCls,
12466
+ size,
12467
+ shape,
12468
+ bgColor,
12469
+ color,
12470
+ url,
12471
+ alt,
12472
+ icon,
12473
+ className,
12474
+ style,
12475
+ activeAvatar,
12476
+ onError
12477
+ } = _a, rest = __objRest(_a, [
12478
+ "children",
12479
+ "prefixCls",
12480
+ "size",
12481
+ "shape",
12482
+ "bgColor",
12483
+ "color",
12484
+ "url",
12485
+ "alt",
12486
+ "icon",
12487
+ "className",
12488
+ "style",
12489
+ "activeAvatar",
12490
+ "onError"
12491
+ ]);
12492
+ const [maxSum, setMaxSum] = useState(0);
12493
+ const [showMax, setShowMax] = useState(false);
12494
+ const [avatarIndex, setAvatarIndex] = useState(1);
12495
+ const avatarRef = useRef(null);
12496
+ const parent = useContext$1(AvatarContext);
12497
+ const b2 = cn("avatar");
12237
12498
  const classes = classNames({
12238
- [`${prefixCls}`]: true,
12239
- [`avatar-${size}`]: true,
12240
- [`avatar-${shape}`]: true
12499
+ [`nut-avatar-${size || ((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.size) || "normal"}`]: true,
12500
+ [`nut-avatar-${shape || ((_c = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c.shape) || "round"}`]: true
12241
12501
  });
12242
- const cls = classNames(classes, className);
12502
+ const cls = classNames(b2(""), classes, className);
12503
+ const sizeValue = ["large", "normal", "small"];
12243
12504
  const styles = __spreadValues({
12244
12505
  width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
12245
12506
  height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
12246
- backgroundImage: src ? `url(${src})` : "",
12247
- backgroundColor: `${bgColor}`
12507
+ backgroundColor: `${bgColor}`,
12508
+ color: `${color}`,
12509
+ marginLeft: avatarIndex != 1 && ((_d = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _d.span) ? `${(_e = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _e.span}px` : "",
12510
+ zIndex: ((_f = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _f.zIndex) == "right" ? `${Math.abs(maxSum - avatarIndex)}` : ""
12248
12511
  }, style);
12249
- const iconStyles = !!icon && !src ? icon : "";
12250
- const handleClick = (e2) => {
12251
- if (props.onClick) {
12252
- props.onClick(e2);
12512
+ const maxStyles = {
12513
+ backgroundColor: `${(_g = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _g.maxBgColor}`,
12514
+ color: `${(_h = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _h.maxColor}`
12515
+ };
12516
+ const iconStyles = !!icon ? icon : "";
12517
+ useEffect(() => {
12518
+ var _a2;
12519
+ const avatarChildren = (_a2 = parent == null ? void 0 : parent.avatarGroupRef) == null ? void 0 : _a2.current.children;
12520
+ if (avatarChildren) {
12521
+ avatarLength(avatarChildren);
12522
+ }
12523
+ }, []);
12524
+ const avatarLength = (children2) => {
12525
+ var _a2, _b2, _c2;
12526
+ for (let i = 0; i < children2.length; i++) {
12527
+ if (children2[i] && children2[i].classList && children2[i].classList[0] == "nut-avatar") {
12528
+ children2[i].setAttribute("data-index", i + 1);
12529
+ }
12530
+ }
12531
+ const index2 = (_b2 = (_a2 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a2.dataset) == null ? void 0 : _b2.index;
12532
+ const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.maxCount;
12533
+ setMaxSum(children2.length);
12534
+ setAvatarIndex(index2);
12535
+ if (index2 == children2.length && index2 != maxCount && children2.length > maxCount) {
12536
+ setShowMax(true);
12253
12537
  }
12254
12538
  };
12255
- return /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues({
12539
+ const errorEvent = (e2) => {
12540
+ if (props.onError) {
12541
+ props.onError(e2);
12542
+ }
12543
+ };
12544
+ const clickAvatar = (e2) => {
12545
+ if (props.activeAvatar) {
12546
+ props.activeAvatar(e2);
12547
+ }
12548
+ };
12549
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (showMax || !((_i = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _i.maxCount) || avatarIndex <= ((_j = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _j.maxCount)) && /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues({
12256
12550
  className: cls
12257
12551
  }, rest), {
12258
- style: styles,
12259
- onClick: handleClick
12260
- }), /* @__PURE__ */ React__default.createElement(Icon, {
12552
+ style: !showMax ? styles : maxStyles,
12553
+ onClick: clickAvatar,
12554
+ ref: avatarRef
12555
+ }), (!((_k = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _k.maxCount) || avatarIndex <= ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxCount)) && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, url && /* @__PURE__ */ React__default.createElement("img", {
12556
+ src: url,
12557
+ alt,
12558
+ onError: errorEvent
12559
+ }), icon && /* @__PURE__ */ React__default.createElement(Icon, {
12261
12560
  className: "icon",
12262
12561
  name: iconStyles
12263
12562
  }), children && /* @__PURE__ */ React__default.createElement("span", {
12264
12563
  className: "text"
12265
- }, children));
12564
+ }, children)), showMax && /* @__PURE__ */ React__default.createElement("div", {
12565
+ className: "text"
12566
+ }, ((_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent) ? (_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.maxContent : `+ ${avatarIndex - ((_o = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _o.maxCount)}`)));
12266
12567
  };
12267
12568
  Avatar.defaultProps = defaultProps$g;
12268
12569
  Avatar.displayName = "NutAvatar";
@@ -12338,16 +12639,16 @@ const defaultProps$e = {
12338
12639
  icons: ""
12339
12640
  };
12340
12641
  const Badge = (props) => {
12341
- const { value, children, dot, max, top, right, zIndex, color, icons } = __spreadValues(__spreadValues({}, defaultProps$e), props);
12642
+ const { children, dot, top, right, zIndex, color, icons } = __spreadValues(__spreadValues({}, defaultProps$e), props);
12342
12643
  const content = () => {
12343
12644
  if (dot)
12344
12645
  return;
12345
- const { value: value2 } = props;
12346
- const { max: max2 } = props;
12347
- if (typeof value2 === "number" && typeof max2 === "number") {
12348
- return max2 < value2 ? `${max2}+` : value2;
12646
+ const { value } = props;
12647
+ const { max } = props;
12648
+ if (typeof value === "number" && typeof max === "number") {
12649
+ return max < value ? `${max}+` : value;
12349
12650
  }
12350
- return value2;
12651
+ return value;
12351
12652
  };
12352
12653
  const getStyle = () => {
12353
12654
  const style = {};
@@ -12628,8 +12929,8 @@ const Popover = (props) => {
12628
12929
  Popover.defaultProps = defaultProps$c;
12629
12930
  Popover.displayName = "NutPopover";
12630
12931
  const defaultProps$b = {
12631
- width: 100,
12632
- height: 100,
12932
+ width: "100px",
12933
+ height: "100px",
12633
12934
  row: 1,
12634
12935
  animated: false,
12635
12936
  title: false,
@@ -12681,33 +12982,40 @@ const Skeleton = (props) => {
12681
12982
  return Array.from({ length: num }, (v2, i) => i);
12682
12983
  };
12683
12984
  const getStyle = () => {
12985
+ if (avatarSize) {
12986
+ return {
12987
+ width: avatarSize,
12988
+ height: avatarSize
12989
+ };
12990
+ }
12684
12991
  return {
12685
- width: avatarSize,
12686
- height: avatarSize
12992
+ width: "50px",
12993
+ height: "50px"
12687
12994
  };
12688
12995
  };
12689
12996
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, loading ? /* @__PURE__ */ React__default.createElement("div", null, children) : /* @__PURE__ */ React__default.createElement("div", __spreadValues({
12690
12997
  className: classes
12691
- }, restProps), /* @__PURE__ */ React__default.createElement("div", {
12998
+ }, restProps), animated2 && /* @__PURE__ */ React__default.createElement("div", {
12692
12999
  className: "skeleton-animation"
12693
13000
  }), /* @__PURE__ */ React__default.createElement("div", {
12694
13001
  className: "nut-skeleton-content"
12695
13002
  }, avatar && /* @__PURE__ */ React__default.createElement(Avatar, {
12696
13003
  className: avatarClass,
12697
13004
  bgColor: "rgb(239, 239, 239)",
13005
+ shape: avatarShape,
12698
13006
  style: getStyle()
12699
- }), row === 1 ? /* @__PURE__ */ React__default.createElement("div", {
13007
+ }), row === 1 && /* @__PURE__ */ React__default.createElement("div", {
12700
13008
  className: blockClass,
12701
- style: { width: `${width}px`, height: `${height}px` }
12702
- }) : /* @__PURE__ */ React__default.createElement("div", {
13009
+ style: { width, height }
13010
+ }), /* @__PURE__ */ React__default.createElement("div", {
12703
13011
  className: "skeleton-content-line"
12704
13012
  }, title && /* @__PURE__ */ React__default.createElement("div", {
12705
13013
  className: "skeleton-title"
12706
13014
  }), repeatLines(row).map((item, index2) => {
12707
13015
  return /* @__PURE__ */ React__default.createElement("div", {
12708
- className: `${blockClass} skeleton-lines`,
13016
+ className: blockClass,
12709
13017
  key: index2,
12710
- style: { width: `${width}px`, height: `${height}px` }
13018
+ style: { width, height }
12711
13019
  });
12712
13020
  })))));
12713
13021
  };
@@ -12721,6 +13029,7 @@ const defaultProps$a = {
12721
13029
  endTime: Date.now()
12722
13030
  };
12723
13031
  const CountDown = (props) => {
13032
+ const { locale } = useConfig();
12724
13033
  const _a = __spreadValues(__spreadValues({}, defaultProps$a), props), {
12725
13034
  showPlainText,
12726
13035
  showDays,
@@ -12817,8 +13126,8 @@ const CountDown = (props) => {
12817
13126
  };
12818
13127
  const plainText = (() => {
12819
13128
  const { d: d2, h: h2, m: m2, s } = resttime;
12820
- const showDayshours = Number(d2) > 0 && showDays ? `${d2}\u5929${h2}` : h2;
12821
- return `${showDayshours}\u5C0F\u65F6${m2}\u5206${s}\u79D2`;
13129
+ const showDayshours = Number(d2) > 0 && showDays ? `${d2}${locale.countdown.day}${h2}` : h2;
13130
+ return `${showDayshours}${locale.countdown.hour}${m2}${locale.countdown.minute}${s}${locale.countdown.second}`;
12822
13131
  })();
12823
13132
  const initTimer = () => {
12824
13133
  if (!stateRef.current.isIninted) {
@@ -12881,7 +13190,7 @@ const CountDown = (props) => {
12881
13190
  className: b2("block")
12882
13191
  }, resttime.d), /* @__PURE__ */ React__default.createElement("div", {
12883
13192
  className: b2("dot")
12884
- }, "\u5929")) : null, /* @__PURE__ */ React__default.createElement("div", {
13193
+ }, locale.countdown.day || ":")) : null, /* @__PURE__ */ React__default.createElement("div", {
12885
13194
  className: b2("block")
12886
13195
  }, resttime.h), /* @__PURE__ */ React__default.createElement("div", {
12887
13196
  className: b2("dot")
@@ -12904,7 +13213,7 @@ const defaultProps$9 = {
12904
13213
  rotate: 180
12905
13214
  };
12906
13215
  function areEqual(prevProps, nextProps) {
12907
- return JSON.stringify(prevProps.activeName) == JSON.stringify(nextProps.activeName);
13216
+ return JSON.stringify(prevProps.activeName) === JSON.stringify(nextProps.activeName);
12908
13217
  }
12909
13218
  const Collapse = memo((props) => {
12910
13219
  const { children, activeName, accordion, icon, rotate, iconSize, iconColor, change } = __spreadValues(__spreadValues({}, defaultProps$9), props);
@@ -12949,7 +13258,7 @@ const Collapse = memo((props) => {
12949
13258
  };
12950
13259
  return /* @__PURE__ */ React__default.createElement("div", {
12951
13260
  className: colBem()
12952
- }, childrenDom.map((item, index2) => {
13261
+ }, childrenDom.map((item) => {
12953
13262
  return React__default.cloneElement(item, {
12954
13263
  isOpen: defaultOpenIndex.includes(item.props.name),
12955
13264
  onToggle: (isOpen, name) => onToggle(isOpen, name),
@@ -13162,6 +13471,7 @@ const defaultProps$5 = {
13162
13471
  customAndExistTitle: "\u9009\u62E9\u5176\u4ED6\u5730\u5740"
13163
13472
  };
13164
13473
  const ExistRender = (props) => {
13474
+ const { locale } = useConfig();
13165
13475
  const _a = __spreadValues(__spreadValues({}, defaultProps$5), props), {
13166
13476
  children,
13167
13477
  type,
@@ -13242,7 +13552,7 @@ const ExistRender = (props) => {
13242
13552
  onClick: switchModule
13243
13553
  }, /* @__PURE__ */ React__default.createElement("div", {
13244
13554
  className: b2("choose-other-btn")
13245
- }, customAndExistTitle)));
13555
+ }, locale.address.chooseAnotherAddress || customAndExistTitle)));
13246
13556
  };
13247
13557
  const defaultProps$4 = {
13248
13558
  type: "custom",
@@ -13253,11 +13563,12 @@ const defaultProps$4 = {
13253
13563
  height: "200px"
13254
13564
  };
13255
13565
  const CustomRender = (props) => {
13566
+ const { locale } = useConfig();
13256
13567
  const _a = __spreadValues(__spreadValues({}, defaultProps$4), props), { children, type, height, province, city, country, town, onNextArea, onClose } = _a, rest = __objRest(_a, ["children", "type", "height", "province", "city", "country", "town", "onNextArea", "onClose"]);
13257
13568
  const b2 = cn("address");
13258
- const [privateType, setPrivateType] = useState(type);
13569
+ const [privateType] = useState(type);
13259
13570
  const [tabIndex, setTabIndex] = useState(0);
13260
- const [tabName, setTabName] = useState(["province", "city", "country", "town"]);
13571
+ const [tabName] = useState(["province", "city", "country", "town"]);
13261
13572
  const provinceRef = useRef(null);
13262
13573
  const cityRef = useRef(null);
13263
13574
  const countryRef = useRef(null);
@@ -13317,7 +13628,7 @@ const CustomRender = (props) => {
13317
13628
  if (tabIndex < index2) {
13318
13629
  return item.name;
13319
13630
  }
13320
- return "\u8BF7\u9009\u62E9";
13631
+ return locale.select;
13321
13632
  };
13322
13633
  const mapRef = {
13323
13634
  province: provinceRef,
@@ -13456,6 +13767,7 @@ const defaultProps$3 = {
13456
13767
  backBtnIcon: "left"
13457
13768
  };
13458
13769
  const Address = (props) => {
13770
+ const { locale } = useConfig();
13459
13771
  const _a = __spreadValues(__spreadValues({}, defaultProps$3), props), {
13460
13772
  modelValue,
13461
13773
  children,
@@ -13509,7 +13821,7 @@ const Address = (props) => {
13509
13821
  ]);
13510
13822
  const b2 = cn("address");
13511
13823
  const [privateType, setPrivateType] = useState(type);
13512
- const [tabName, setTabName] = useState(["province", "city", "country", "town"]);
13824
+ const [tabName] = useState(["province", "city", "country", "town"]);
13513
13825
  const [showPopup, setShowPopup] = useState(modelValue);
13514
13826
  const [selectedRegion, setSelectedRegion] = useState({
13515
13827
  province: { name: "" },
@@ -13518,13 +13830,10 @@ const Address = (props) => {
13518
13830
  town: { name: "" }
13519
13831
  });
13520
13832
  const [selectedExistAddress, setSelectedExistAddress] = useState({});
13521
- const [closeWay, setCloseWay] = useState("self");
13522
- const handClose = (type2 = "self") => {
13523
- setCloseWay(() => type2 === "cross" ? "cross" : "self");
13833
+ const handClose = () => {
13524
13834
  setShowPopup(false);
13525
13835
  };
13526
13836
  const clickOverlay = () => {
13527
- setCloseWay("mask");
13528
13837
  closeMask && closeMask({ closeWay: "mask" });
13529
13838
  };
13530
13839
  const nextAreaList = (item) => {
@@ -13601,8 +13910,8 @@ const Address = (props) => {
13601
13910
  color: "#cccccc"
13602
13911
  })), /* @__PURE__ */ React__default.createElement("div", {
13603
13912
  className: b2("header__title")
13604
- }, privateType === "custom" ? customAddressTitle : existAddressTitle), /* @__PURE__ */ React__default.createElement("div", {
13605
- onClick: () => handClose("cross")
13913
+ }, privateType === "custom" ? locale.address.selectRegion || customAddressTitle : locale.address.deliveryTo || existAddressTitle), /* @__PURE__ */ React__default.createElement("div", {
13914
+ onClick: () => handClose()
13606
13915
  }, closeBtnIcon && /* @__PURE__ */ React__default.createElement(Icon, {
13607
13916
  name: closeBtnIcon,
13608
13917
  color: "#cccccc",
@@ -13621,9 +13930,6 @@ const Address = (props) => {
13621
13930
  visible: showPopup,
13622
13931
  position: "bottom",
13623
13932
  onClickOverlay: clickOverlay,
13624
- onOpen: () => {
13625
- setCloseWay("self");
13626
- },
13627
13933
  onClose: () => {
13628
13934
  closeFun();
13629
13935
  }
@@ -13647,7 +13953,7 @@ const Address = (props) => {
13647
13953
  selectedIcon,
13648
13954
  defaultIcon,
13649
13955
  isShowCustomAddress,
13650
- customAndExistTitle,
13956
+ customAndExistTitle: locale.address.chooseAnotherAddress || customAndExistTitle,
13651
13957
  onSelected: selectedExist,
13652
13958
  onSwitchModule
13653
13959
  }))));
@@ -13701,7 +14007,6 @@ const InternalBarrage = (props, ref) => {
13701
14007
  barrageContainer.current.appendChild(el);
13702
14008
  const width = el.offsetWidth;
13703
14009
  const height = el.offsetHeight;
13704
- console.log(el.offsetWidth, el.offsetHeight);
13705
14010
  el.classList.add("move");
13706
14011
  el.style.animationDuration = `${speeds}ms`;
13707
14012
  el.style.top = `${_index % rows * (height + top) + 20}px`;
@@ -13732,6 +14037,7 @@ const defaultProps$1 = {
13732
14037
  className: ""
13733
14038
  };
13734
14039
  const Signature = (props) => {
14040
+ const { locale } = useConfig();
13735
14041
  const _a = __spreadValues(__spreadValues({}, defaultProps$1), props), { type, lineWidth, strokeStyle, unSupportTpl, className } = _a, rest = __objRest(_a, ["type", "lineWidth", "strokeStyle", "unSupportTpl", "className"]);
13736
14042
  const b2 = cn("signature");
13737
14043
  const canvasRef = useRef(null);
@@ -13829,15 +14135,15 @@ const Signature = (props) => {
13829
14135
  width: canvasWidth
13830
14136
  }) : /* @__PURE__ */ React__default.createElement("p", {
13831
14137
  className: `${b2("unsopport")}`
13832
- }, unSupportTpl)), /* @__PURE__ */ React__default.createElement(Button, {
14138
+ }, locale.signature.unSupportTpl || unSupportTpl)), /* @__PURE__ */ React__default.createElement(Button, {
13833
14139
  className: `${b2("btn")}`,
13834
14140
  type: "default",
13835
14141
  onClick: () => clear()
13836
- }, "\u91CD\u7B7E"), /* @__PURE__ */ React__default.createElement(Button, {
14142
+ }, locale.signature.reSign), /* @__PURE__ */ React__default.createElement(Button, {
13837
14143
  className: `${b2("btn")}`,
13838
14144
  type: "primary",
13839
14145
  onClick: () => confirm2()
13840
- }, "\u786E\u8BA4"));
14146
+ }, locale.confirm));
13841
14147
  };
13842
14148
  Signature.defaultProps = defaultProps$1;
13843
14149
  Signature.displayName = "NutSignature";
@@ -13906,4 +14212,4 @@ const Card = (props) => {
13906
14212
  };
13907
14213
  Card.defaultProps = defaultProps;
13908
14214
  Card.displayName = "NutCard";
13909
- export { ActionSheet, Address, AnimatingNumbers, Avatar, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, FixedNav, Icon, Infiniteloading, Input, InputNumber, Layout, NavBar, NoticeBar, Notify, Overlay, Pagination, Picker, Popover, Popup, Price, Radio, RadioGroup, Range, Rate, Row, ShortPassword, Signature, Skeleton, Step, Steps, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Tabs, Tag, TextArea, Toast, Uploader };
14215
+ export { ActionSheet, Address, AnimatingNumbers, Avatar, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, ConfigProvider, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, FixedNav, Icon, Infiniteloading, Input, InputNumber, Layout, NavBar, NoticeBar, Notify, Overlay, Pagination, Picker, Popover, Popup, Price, Radio, RadioGroup, Range, Rate, Row, ShortPassword, Signature, Skeleton, Step, Steps, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Tabs, Tag, TextArea, Toast, Uploader };