@nutui/nutui-react 1.1.3 → 1.1.4-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/Address.js +22 -28
- package/dist/esm/Badge.js +0 -2
- package/dist/esm/Calendar.js +6 -2
- package/dist/esm/CalendarItem.js +14 -13
- package/dist/esm/CheckboxGroup.js +1 -1
- package/dist/esm/Collapse.js +2 -2
- package/dist/esm/ConfigProvider/style/index.js +2 -0
- package/dist/esm/ConfigProvider.js +146 -0
- package/dist/esm/CountDown.js +8 -4
- package/dist/esm/Dialog.js +7 -3
- package/dist/esm/FixedNav.js +5 -1
- package/dist/esm/Infiniteloading.js +7 -3
- package/dist/esm/Input.js +5 -1
- package/dist/esm/NoticeBar.js +1 -1
- package/dist/esm/Pagination.js +6 -2
- package/dist/esm/Picker.js +6 -2
- package/dist/esm/Range.js +5 -1
- package/dist/esm/ShortPassword.js +9 -5
- package/dist/esm/Signature.js +7 -3
- package/dist/esm/TextArea.js +5 -1
- package/dist/esm/Toast.js +4 -10
- package/dist/esm/nutui-react.es.js +1 -0
- package/dist/locales/base.d.ts +91 -0
- package/dist/locales/base.js +5 -0
- package/dist/locales/en-US.d.ts +3 -0
- package/dist/locales/en-US.js +95 -0
- package/dist/locales/zh-CN.d.ts +3 -0
- package/dist/locales/zh-CN.js +97 -0
- package/dist/locales/zh-TW.d.ts +3 -0
- package/dist/locales/zh-TW.js +95 -0
- package/dist/nutui.react.es.js +221 -104
- package/dist/nutui.react.umd.js +26 -26
- package/dist/packages/configprovider/configprovider.scss +2 -0
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +1 -0
- package/dist/styles/variables-jdw.scss +376 -0
- package/dist/types/configprovider/configprovider.d.ts +12 -0
- package/dist/types/configprovider/index.d.ts +3 -0
- package/dist/types/nutui.react.d.ts +2 -1
- package/dist/types/toast/Notification.d.ts +1 -7
- package/package.json +5 -3
package/dist/nutui.react.es.js
CHANGED
|
@@ -34,8 +34,8 @@ var __publicField = (obj, key, value) => {
|
|
|
34
34
|
return value;
|
|
35
35
|
};
|
|
36
36
|
/*!
|
|
37
|
-
* @nutui/nutui-react v1.1.
|
|
38
|
-
* (c)
|
|
37
|
+
* @nutui/nutui-react v1.1.4-beta.0 Tue May 10 2022 10:33:01 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$
|
|
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$
|
|
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$
|
|
123
|
+
Icon.defaultProps = defaultProps$Y;
|
|
124
124
|
Icon.displayName = "NutIcon";
|
|
125
|
-
const defaultProps$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
1524
|
+
Cell.defaultProps = defaultProps$W;
|
|
1525
1525
|
Cell.displayName = "NutCell";
|
|
1526
|
-
const defaultProps$
|
|
1526
|
+
const defaultProps$V = { title: "", classPrefix: "nutui-cell-group" };
|
|
1527
1527
|
const CellGroup = (props) => {
|
|
1528
|
-
const { children, classPrefix, title } = __spreadValues(__spreadValues({}, defaultProps$
|
|
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$
|
|
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$
|
|
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$
|
|
2231
|
+
Popup.defaultProps = defaultProps$U;
|
|
2232
2232
|
Popup.displayName = "NutPopup";
|
|
2233
|
-
const defaultProps$
|
|
2233
|
+
const defaultProps$T = {};
|
|
2234
2234
|
const Layout = (props) => {
|
|
2235
|
-
__spreadValues(__spreadValues({}, defaultProps$
|
|
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$
|
|
2240
|
+
Layout.defaultProps = defaultProps$T;
|
|
2241
2241
|
Layout.displayName = "NutLayout";
|
|
2242
2242
|
const DataContext$2 = createContext({});
|
|
2243
|
-
const defaultProps$
|
|
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$
|
|
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$
|
|
2272
|
+
Col.defaultProps = defaultProps$S;
|
|
2273
2273
|
Col.displayName = "NutCol";
|
|
2274
|
-
const defaultProps$
|
|
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$
|
|
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$
|
|
2305
|
+
Row.defaultProps = defaultProps$R;
|
|
2306
2306
|
Row.displayName = "NutRow";
|
|
2307
|
-
const defaultProps$
|
|
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$
|
|
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$
|
|
2328
|
+
Divider.defaultProps = defaultProps$Q;
|
|
2329
2329
|
Divider.displayName = "NutDivider";
|
|
2330
|
-
const defaultProps$
|
|
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$
|
|
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$
|
|
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";
|
|
@@ -2698,6 +2815,7 @@ const defaultProps$J = {
|
|
|
2698
2815
|
}
|
|
2699
2816
|
};
|
|
2700
2817
|
const Pagination = (props) => {
|
|
2818
|
+
const { locale } = useConfig();
|
|
2701
2819
|
__spreadValues(__spreadValues({}, defaultProps$J), props);
|
|
2702
2820
|
const _a = props, {
|
|
2703
2821
|
modelValue,
|
|
@@ -2811,7 +2929,7 @@ const Pagination = (props) => {
|
|
|
2811
2929
|
}, rest), /* @__PURE__ */ React__default.createElement("div", {
|
|
2812
2930
|
className: `${paginationBem("prev")} ${mode == "multi" ? "" : "simple-border"} ${currentPage == 1 ? "disabled" : ""}`,
|
|
2813
2931
|
onClick: (e2) => selectPage(Number(currentPage) - 1, true)
|
|
2814
|
-
}, prevText), mode == "multi" ? /* @__PURE__ */ React__default.createElement("div", {
|
|
2932
|
+
}, locale.pagination.prev || prevText), mode == "multi" ? /* @__PURE__ */ React__default.createElement("div", {
|
|
2815
2933
|
className: `${paginationBem("contain")}`
|
|
2816
2934
|
}, pages.map((item, index2) => {
|
|
2817
2935
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -2826,7 +2944,7 @@ const Pagination = (props) => {
|
|
|
2826
2944
|
}, currentPage, "/", countRef)) : "", /* @__PURE__ */ React__default.createElement("div", {
|
|
2827
2945
|
className: `${paginationBem("next")} ${Number(currentPage) >= countRef ? "disabled" : ""}`,
|
|
2828
2946
|
onClick: (e2) => selectPage(Number(currentPage) + 1, true)
|
|
2829
|
-
}, nextText));
|
|
2947
|
+
}, locale.pagination.next || nextText));
|
|
2830
2948
|
};
|
|
2831
2949
|
Pagination.defaultProps = defaultProps$J;
|
|
2832
2950
|
Pagination.displayName = "NutPagination";
|
|
@@ -3090,14 +3208,8 @@ class Notification$1 extends React.PureComponent {
|
|
|
3090
3208
|
this.clearCloseTimer = this.clearCloseTimer.bind(this);
|
|
3091
3209
|
this.close = this.close.bind(this);
|
|
3092
3210
|
this.clickCover = this.clickCover.bind(this);
|
|
3093
|
-
this.state = {
|
|
3094
|
-
show: true
|
|
3095
|
-
};
|
|
3096
3211
|
}
|
|
3097
3212
|
close() {
|
|
3098
|
-
this.setState({
|
|
3099
|
-
show: false
|
|
3100
|
-
});
|
|
3101
3213
|
this.clearCloseTimer();
|
|
3102
3214
|
this.props.onClose();
|
|
3103
3215
|
}
|
|
@@ -3142,7 +3254,6 @@ class Notification$1 extends React.PureComponent {
|
|
|
3142
3254
|
cover,
|
|
3143
3255
|
type
|
|
3144
3256
|
} = this.props;
|
|
3145
|
-
this.state;
|
|
3146
3257
|
const toastBem = cn("toast");
|
|
3147
3258
|
const classes = classNames({
|
|
3148
3259
|
"nut-toast-center": center,
|
|
@@ -3235,14 +3346,14 @@ function notice$1(opts) {
|
|
|
3235
3346
|
messageInstance$1 = null;
|
|
3236
3347
|
}
|
|
3237
3348
|
}
|
|
3238
|
-
|
|
3239
|
-
getInstance$1(
|
|
3349
|
+
const opts2 = __spreadProps(__spreadValues(__spreadValues({}, options$1), opts), { onClose: close });
|
|
3350
|
+
getInstance$1(opts2, (notification) => {
|
|
3240
3351
|
messageInstance$1 = notification;
|
|
3241
3352
|
});
|
|
3242
3353
|
}
|
|
3243
3354
|
const errorMsg$1 = (msg) => {
|
|
3244
3355
|
if (!msg) {
|
|
3245
|
-
console.warn("[NutUI Toast]: msg
|
|
3356
|
+
console.warn("[NutUI Toast]: msg cannot be null");
|
|
3246
3357
|
}
|
|
3247
3358
|
};
|
|
3248
3359
|
var Toast = {
|
|
@@ -3289,6 +3400,7 @@ const defaultProps$G = {
|
|
|
3289
3400
|
let startValue;
|
|
3290
3401
|
let currentValue;
|
|
3291
3402
|
const Range = (props) => {
|
|
3403
|
+
const { locale } = useConfig();
|
|
3292
3404
|
const {
|
|
3293
3405
|
className,
|
|
3294
3406
|
range,
|
|
@@ -3317,7 +3429,7 @@ const Range = (props) => {
|
|
|
3317
3429
|
if (modelValue) {
|
|
3318
3430
|
if (!range && (modelValue < min || modelValue > max)) {
|
|
3319
3431
|
SetInitValue(0);
|
|
3320
|
-
Toast.text(`${modelValue}
|
|
3432
|
+
Toast.text(`${modelValue} ${locale.range.rangeText}`);
|
|
3321
3433
|
return;
|
|
3322
3434
|
}
|
|
3323
3435
|
SetInitValue(modelValue);
|
|
@@ -3618,12 +3730,11 @@ const defaultProps$F = {
|
|
|
3618
3730
|
}
|
|
3619
3731
|
};
|
|
3620
3732
|
const CalendarItem = (props) => {
|
|
3733
|
+
const { locale } = useConfig();
|
|
3621
3734
|
const {
|
|
3622
|
-
children,
|
|
3623
3735
|
type,
|
|
3624
3736
|
isAutoBackFill,
|
|
3625
3737
|
poppable,
|
|
3626
|
-
visible,
|
|
3627
3738
|
title,
|
|
3628
3739
|
defaultValue,
|
|
3629
3740
|
startDate,
|
|
@@ -3632,11 +3743,11 @@ const CalendarItem = (props) => {
|
|
|
3632
3743
|
onUpdate,
|
|
3633
3744
|
onClose
|
|
3634
3745
|
} = __spreadValues(__spreadValues({}, defaultProps$F), props);
|
|
3635
|
-
const weeks =
|
|
3746
|
+
const weeks = locale.calendaritem.weekdays;
|
|
3636
3747
|
const [yearMonthTitle, setYearMonthTitle] = useState("");
|
|
3637
3748
|
const [unLoadPrev, setUnLoadPrev] = useState(false);
|
|
3638
3749
|
const [monthsData, setMonthsData] = useState([]);
|
|
3639
|
-
const [state
|
|
3750
|
+
const [state] = useState({
|
|
3640
3751
|
currDate: "",
|
|
3641
3752
|
touchParams: {
|
|
3642
3753
|
startY: 0,
|
|
@@ -3794,7 +3905,7 @@ const CalendarItem = (props) => {
|
|
|
3794
3905
|
};
|
|
3795
3906
|
const monthInfo = {
|
|
3796
3907
|
curData,
|
|
3797
|
-
title:
|
|
3908
|
+
title: locale.calendaritem.monthTitle(title2.year, title2.month),
|
|
3798
3909
|
monthData: [
|
|
3799
3910
|
...getDaysStatus(preMonthDays, "prev"),
|
|
3800
3911
|
...getDaysStatus(currMonthDays, "curr")
|
|
@@ -3968,7 +4079,7 @@ const CalendarItem = (props) => {
|
|
|
3968
4079
|
className: headerClasses
|
|
3969
4080
|
}, poppable ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", {
|
|
3970
4081
|
className: "calendar-title"
|
|
3971
|
-
}, title), /* @__PURE__ */ React__default.createElement("div", {
|
|
4082
|
+
}, locale.calendaritem.title), /* @__PURE__ */ React__default.createElement("div", {
|
|
3972
4083
|
className: "calendar-curr-month"
|
|
3973
4084
|
}, yearMonthTitle)) : "", /* @__PURE__ */ React__default.createElement("div", {
|
|
3974
4085
|
className: "calendar-weeks",
|
|
@@ -3987,7 +4098,7 @@ const CalendarItem = (props) => {
|
|
|
3987
4098
|
ref: monthsPanel
|
|
3988
4099
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
3989
4100
|
className: "calendar-loading-tip"
|
|
3990
|
-
}, !unLoadPrev ?
|
|
4101
|
+
}, !unLoadPrev ? locale.calendaritem.loadPreviousMonth : locale.calendaritem.noEarlierMonth), monthsData.map((month, key) => /* @__PURE__ */ React__default.createElement("div", {
|
|
3991
4102
|
className: "calendar-month",
|
|
3992
4103
|
key
|
|
3993
4104
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -4006,16 +4117,16 @@ const CalendarItem = (props) => {
|
|
|
4006
4117
|
className: "calendar-day"
|
|
4007
4118
|
}, day.type === "curr" ? day.day : ""), isCurrDay(month, day.day) ? /* @__PURE__ */ React__default.createElement("div", {
|
|
4008
4119
|
className: "calendar-curr-tips"
|
|
4009
|
-
},
|
|
4120
|
+
}, locale.calendaritem.today) : "", isStartTip(day, month) ? /* @__PURE__ */ React__default.createElement("div", {
|
|
4010
4121
|
className: "calendar-day-tip"
|
|
4011
|
-
},
|
|
4122
|
+
}, locale.calendaritem.start) : isEndTip(day, month) ? /* @__PURE__ */ React__default.createElement("div", {
|
|
4012
4123
|
className: "calendar-day-tip"
|
|
4013
|
-
},
|
|
4124
|
+
}, locale.calendaritem.end) : "")))))))), poppable && !isAutoBackFill ? /* @__PURE__ */ React__default.createElement("div", {
|
|
4014
4125
|
className: "nut-calendar-footer"
|
|
4015
4126
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
4016
4127
|
className: "calendar-confirm-btn",
|
|
4017
4128
|
onClick: confirm2
|
|
4018
|
-
},
|
|
4129
|
+
}, locale.confirm)) : ""));
|
|
4019
4130
|
};
|
|
4020
4131
|
CalendarItem.defaultProps = defaultProps$F;
|
|
4021
4132
|
CalendarItem.displayName = "NutCalendarItem";
|
|
@@ -4034,6 +4145,7 @@ const defaultProps$E = {
|
|
|
4034
4145
|
}
|
|
4035
4146
|
};
|
|
4036
4147
|
const Calendar = (props) => {
|
|
4148
|
+
const { locale } = useConfig();
|
|
4037
4149
|
const {
|
|
4038
4150
|
children,
|
|
4039
4151
|
poppable,
|
|
@@ -4070,7 +4182,7 @@ const Calendar = (props) => {
|
|
|
4070
4182
|
type,
|
|
4071
4183
|
isAutoBackFill,
|
|
4072
4184
|
poppable,
|
|
4073
|
-
title,
|
|
4185
|
+
title: locale.calendaritem.title || title,
|
|
4074
4186
|
defaultValue,
|
|
4075
4187
|
startDate,
|
|
4076
4188
|
endDate,
|
|
@@ -4081,7 +4193,7 @@ const Calendar = (props) => {
|
|
|
4081
4193
|
type,
|
|
4082
4194
|
isAutoBackFill,
|
|
4083
4195
|
poppable,
|
|
4084
|
-
title,
|
|
4196
|
+
title: locale.calendaritem.title,
|
|
4085
4197
|
defaultValue,
|
|
4086
4198
|
startDate,
|
|
4087
4199
|
endDate,
|
|
@@ -4141,7 +4253,7 @@ const CheckboxGroup = React__default.forwardRef((props, ref) => {
|
|
|
4141
4253
|
return (innerValue == null ? void 0 : innerValue.indexOf(child.props.label || child.children)) > -1;
|
|
4142
4254
|
}
|
|
4143
4255
|
function cloneChildren() {
|
|
4144
|
-
return React__default.Children.map(children, (child
|
|
4256
|
+
return React__default.Children.map(children, (child) => {
|
|
4145
4257
|
const childChecked = validateChildChecked(child);
|
|
4146
4258
|
if (child.type.displayName !== "NutCheckBox") {
|
|
4147
4259
|
return React__default.cloneElement(child);
|
|
@@ -4412,6 +4524,7 @@ const InternalPickerSlot = (props, ref) => {
|
|
|
4412
4524
|
};
|
|
4413
4525
|
const PickerSlot = React__default.forwardRef(InternalPickerSlot);
|
|
4414
4526
|
const InternalPicker = (props, ref) => {
|
|
4527
|
+
const { locale } = useConfig();
|
|
4415
4528
|
const _a = props, {
|
|
4416
4529
|
isVisible,
|
|
4417
4530
|
title,
|
|
@@ -4519,12 +4632,12 @@ const InternalPicker = (props, ref) => {
|
|
|
4519
4632
|
}, /* @__PURE__ */ React__default.createElement("span", {
|
|
4520
4633
|
className: b2("cancel-btn"),
|
|
4521
4634
|
onClick: () => closeActionSheet()
|
|
4522
|
-
},
|
|
4635
|
+
}, locale.cancel), /* @__PURE__ */ React__default.createElement("div", {
|
|
4523
4636
|
className: b2("title")
|
|
4524
4637
|
}, title || ""), /* @__PURE__ */ React__default.createElement("span", {
|
|
4525
4638
|
className: b2("confirm-btn"),
|
|
4526
4639
|
onClick: () => confirm2()
|
|
4527
|
-
},
|
|
4640
|
+
}, locale.confirm)), /* @__PURE__ */ React__default.createElement("div", {
|
|
4528
4641
|
className: b2("panel"),
|
|
4529
4642
|
ref: pickerRef
|
|
4530
4643
|
}, listData == null ? void 0 : listData.map((item, index2) => {
|
|
@@ -5021,6 +5134,7 @@ const defaultProps$z = {
|
|
|
5021
5134
|
clearable: true
|
|
5022
5135
|
};
|
|
5023
5136
|
const Input = (props) => {
|
|
5137
|
+
const { locale } = useConfig();
|
|
5024
5138
|
const {
|
|
5025
5139
|
type,
|
|
5026
5140
|
defaultValue,
|
|
@@ -5097,7 +5211,7 @@ const Input = (props) => {
|
|
|
5097
5211
|
}, label) : null), /* @__PURE__ */ React__default.createElement("input", {
|
|
5098
5212
|
className: "input-text",
|
|
5099
5213
|
type,
|
|
5100
|
-
placeholder,
|
|
5214
|
+
placeholder: locale.placeholder || placeholder,
|
|
5101
5215
|
disabled,
|
|
5102
5216
|
readOnly: readonly,
|
|
5103
5217
|
value: inputValue,
|
|
@@ -5375,6 +5489,7 @@ const defaultProps$v = {
|
|
|
5375
5489
|
}
|
|
5376
5490
|
};
|
|
5377
5491
|
const ShortPassword = (props) => {
|
|
5492
|
+
const { locale } = useConfig();
|
|
5378
5493
|
const _a = props, {
|
|
5379
5494
|
title,
|
|
5380
5495
|
desc,
|
|
@@ -5479,9 +5594,9 @@ const ShortPassword = (props) => {
|
|
|
5479
5594
|
style: __spreadValues({}, style)
|
|
5480
5595
|
}, reset), /* @__PURE__ */ React__default.createElement("div", {
|
|
5481
5596
|
className: b2("title")
|
|
5482
|
-
}, title), /* @__PURE__ */ React__default.createElement("div", {
|
|
5597
|
+
}, locale.shortpassword.title || title), /* @__PURE__ */ React__default.createElement("div", {
|
|
5483
5598
|
className: b2("subtitle")
|
|
5484
|
-
}, desc), /* @__PURE__ */ React__default.createElement("div", {
|
|
5599
|
+
}, locale.shortpassword.desc || desc), /* @__PURE__ */ React__default.createElement("div", {
|
|
5485
5600
|
className: b2("input")
|
|
5486
5601
|
}, /* @__PURE__ */ React__default.createElement("input", {
|
|
5487
5602
|
ref: textInput,
|
|
@@ -5515,15 +5630,15 @@ const ShortPassword = (props) => {
|
|
|
5515
5630
|
name: "tips"
|
|
5516
5631
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
5517
5632
|
onClick: onTips
|
|
5518
|
-
}, tips)) : null), !noButton ? /* @__PURE__ */ React__default.createElement("div", {
|
|
5633
|
+
}, locale.shortpassword.tips || tips)) : null), !noButton ? /* @__PURE__ */ React__default.createElement("div", {
|
|
5519
5634
|
className: b2("footer")
|
|
5520
5635
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
5521
5636
|
className: b2("footer__cancel"),
|
|
5522
5637
|
onClick: onCancel
|
|
5523
|
-
},
|
|
5638
|
+
}, locale.cancel), /* @__PURE__ */ React__default.createElement("div", {
|
|
5524
5639
|
className: b2("footer__sure"),
|
|
5525
5640
|
onClick: () => sure()
|
|
5526
|
-
},
|
|
5641
|
+
}, locale.confirm)) : null)));
|
|
5527
5642
|
};
|
|
5528
5643
|
ShortPassword.defaultProps = defaultProps$v;
|
|
5529
5644
|
ShortPassword.displayName = "NutShortPassword";
|
|
@@ -5539,6 +5654,7 @@ const defaultProps$u = {
|
|
|
5539
5654
|
autosize: false
|
|
5540
5655
|
};
|
|
5541
5656
|
const TextArea = (props) => {
|
|
5657
|
+
const { locale } = useConfig();
|
|
5542
5658
|
const {
|
|
5543
5659
|
className,
|
|
5544
5660
|
defaultValue,
|
|
@@ -5620,7 +5736,7 @@ const TextArea = (props) => {
|
|
|
5620
5736
|
},
|
|
5621
5737
|
rows,
|
|
5622
5738
|
maxLength: maxlength < 0 ? 0 : maxlength,
|
|
5623
|
-
placeholder
|
|
5739
|
+
placeholder: locale.placeholder
|
|
5624
5740
|
}), limitshow ? /* @__PURE__ */ React__default.createElement("div", {
|
|
5625
5741
|
className: textareaBem("limit")
|
|
5626
5742
|
}, inputValue.length, "/", maxlength < 0 ? 0 : maxlength) : null);
|
|
@@ -10864,6 +10980,7 @@ const defaultProps$p = {
|
|
|
10864
10980
|
lockScroll: false
|
|
10865
10981
|
};
|
|
10866
10982
|
const BaseDialog = (props, ref) => {
|
|
10983
|
+
const { locale } = useConfig();
|
|
10867
10984
|
const _a = props, {
|
|
10868
10985
|
visible,
|
|
10869
10986
|
footer,
|
|
@@ -10894,7 +11011,7 @@ const BaseDialog = (props, ref) => {
|
|
|
10894
11011
|
const renderFooter = () => {
|
|
10895
11012
|
if (footer === null)
|
|
10896
11013
|
return;
|
|
10897
|
-
const handleCancel = (
|
|
11014
|
+
const handleCancel = () => {
|
|
10898
11015
|
if (!cancelAutoClose)
|
|
10899
11016
|
return;
|
|
10900
11017
|
onClosed == null ? void 0 : onClosed();
|
|
@@ -10916,13 +11033,13 @@ const BaseDialog = (props, ref) => {
|
|
|
10916
11033
|
type: "primary",
|
|
10917
11034
|
className: "nut-dialog__footer-cancel",
|
|
10918
11035
|
onClick: () => handleCancel()
|
|
10919
|
-
}, cancelText), !noOkBtn && /* @__PURE__ */ React__default.createElement(Button, {
|
|
11036
|
+
}, locale.cancel || cancelText), !noOkBtn && /* @__PURE__ */ React__default.createElement(Button, {
|
|
10920
11037
|
size: "small",
|
|
10921
11038
|
type: "primary",
|
|
10922
11039
|
className: classNames("nut-dialog__footer-ok", { disabled: okBtnDisabled }),
|
|
10923
11040
|
disabled: okBtnDisabled,
|
|
10924
11041
|
onClick: () => handleOk()
|
|
10925
|
-
}, okText));
|
|
11042
|
+
}, locale.confirm || okText));
|
|
10926
11043
|
return footerContent;
|
|
10927
11044
|
};
|
|
10928
11045
|
return /* @__PURE__ */ React__default.createElement(DialogWrapper, __spreadProps(__spreadValues({}, restProps), {
|
|
@@ -10961,6 +11078,7 @@ const defaultProps$o = {
|
|
|
10961
11078
|
loadMoreTxt: "\u54CE\u5440\uFF0C\u8FD9\u91CC\u662F\u5E95\u90E8\u4E86\u5566"
|
|
10962
11079
|
};
|
|
10963
11080
|
const Infiniteloading = (props) => {
|
|
11081
|
+
const { locale } = useConfig();
|
|
10964
11082
|
const _a = __spreadValues(__spreadValues({}, defaultProps$o), props), {
|
|
10965
11083
|
children,
|
|
10966
11084
|
hasMore,
|
|
@@ -11134,7 +11252,7 @@ const Infiniteloading = (props) => {
|
|
|
11134
11252
|
name: pullIcon
|
|
11135
11253
|
}), /* @__PURE__ */ React__default.createElement("span", {
|
|
11136
11254
|
className: "top-text"
|
|
11137
|
-
}, pullTxt))), /* @__PURE__ */ React__default.createElement("div", {
|
|
11255
|
+
}, locale.infiniteloading.pullRefreshText || pullTxt))), /* @__PURE__ */ React__default.createElement("div", {
|
|
11138
11256
|
className: "nut-infinite-container"
|
|
11139
11257
|
}, children), /* @__PURE__ */ React__default.createElement("div", {
|
|
11140
11258
|
className: "nut-infinite-bottom"
|
|
@@ -11145,9 +11263,9 @@ const Infiniteloading = (props) => {
|
|
|
11145
11263
|
name: loadIcon
|
|
11146
11264
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
11147
11265
|
className: "bottom-text"
|
|
11148
|
-
}, loadTxt)) : !hasMore && /* @__PURE__ */ React__default.createElement("div", {
|
|
11266
|
+
}, locale.infiniteloading.loadText || loadTxt)) : !hasMore && /* @__PURE__ */ React__default.createElement("div", {
|
|
11149
11267
|
className: "tips"
|
|
11150
|
-
}, loadMoreTxt)));
|
|
11268
|
+
}, locale.infiniteloading.loadMoreText || loadMoreTxt)));
|
|
11151
11269
|
};
|
|
11152
11270
|
Infiniteloading.defaultProps = defaultProps$o;
|
|
11153
11271
|
Infiniteloading.displayName = "NutInfiniteloading";
|
|
@@ -12338,16 +12456,16 @@ const defaultProps$e = {
|
|
|
12338
12456
|
icons: ""
|
|
12339
12457
|
};
|
|
12340
12458
|
const Badge = (props) => {
|
|
12341
|
-
const {
|
|
12459
|
+
const { children, dot, top, right, zIndex, color, icons } = __spreadValues(__spreadValues({}, defaultProps$e), props);
|
|
12342
12460
|
const content = () => {
|
|
12343
12461
|
if (dot)
|
|
12344
12462
|
return;
|
|
12345
|
-
const { value
|
|
12346
|
-
const { max
|
|
12347
|
-
if (typeof
|
|
12348
|
-
return
|
|
12463
|
+
const { value } = props;
|
|
12464
|
+
const { max } = props;
|
|
12465
|
+
if (typeof value === "number" && typeof max === "number") {
|
|
12466
|
+
return max < value ? `${max}+` : value;
|
|
12349
12467
|
}
|
|
12350
|
-
return
|
|
12468
|
+
return value;
|
|
12351
12469
|
};
|
|
12352
12470
|
const getStyle = () => {
|
|
12353
12471
|
const style = {};
|
|
@@ -12721,6 +12839,7 @@ const defaultProps$a = {
|
|
|
12721
12839
|
endTime: Date.now()
|
|
12722
12840
|
};
|
|
12723
12841
|
const CountDown = (props) => {
|
|
12842
|
+
const { locale } = useConfig();
|
|
12724
12843
|
const _a = __spreadValues(__spreadValues({}, defaultProps$a), props), {
|
|
12725
12844
|
showPlainText,
|
|
12726
12845
|
showDays,
|
|
@@ -12817,8 +12936,8 @@ const CountDown = (props) => {
|
|
|
12817
12936
|
};
|
|
12818
12937
|
const plainText = (() => {
|
|
12819
12938
|
const { d: d2, h: h2, m: m2, s } = resttime;
|
|
12820
|
-
const showDayshours = Number(d2) > 0 && showDays ? `${d2}
|
|
12821
|
-
return `${showDayshours}
|
|
12939
|
+
const showDayshours = Number(d2) > 0 && showDays ? `${d2}${locale.countdown.day}${h2}` : h2;
|
|
12940
|
+
return `${showDayshours}${locale.countdown.hour}${m2}${locale.countdown.minute}${s}${locale.countdown.second}`;
|
|
12822
12941
|
})();
|
|
12823
12942
|
const initTimer = () => {
|
|
12824
12943
|
if (!stateRef.current.isIninted) {
|
|
@@ -12881,7 +13000,7 @@ const CountDown = (props) => {
|
|
|
12881
13000
|
className: b2("block")
|
|
12882
13001
|
}, resttime.d), /* @__PURE__ */ React__default.createElement("div", {
|
|
12883
13002
|
className: b2("dot")
|
|
12884
|
-
}, "
|
|
13003
|
+
}, locale.countdown.day || ":")) : null, /* @__PURE__ */ React__default.createElement("div", {
|
|
12885
13004
|
className: b2("block")
|
|
12886
13005
|
}, resttime.h), /* @__PURE__ */ React__default.createElement("div", {
|
|
12887
13006
|
className: b2("dot")
|
|
@@ -12904,7 +13023,7 @@ const defaultProps$9 = {
|
|
|
12904
13023
|
rotate: 180
|
|
12905
13024
|
};
|
|
12906
13025
|
function areEqual(prevProps, nextProps) {
|
|
12907
|
-
return JSON.stringify(prevProps.activeName)
|
|
13026
|
+
return JSON.stringify(prevProps.activeName) === JSON.stringify(nextProps.activeName);
|
|
12908
13027
|
}
|
|
12909
13028
|
const Collapse = memo((props) => {
|
|
12910
13029
|
const { children, activeName, accordion, icon, rotate, iconSize, iconColor, change } = __spreadValues(__spreadValues({}, defaultProps$9), props);
|
|
@@ -12949,7 +13068,7 @@ const Collapse = memo((props) => {
|
|
|
12949
13068
|
};
|
|
12950
13069
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
12951
13070
|
className: colBem()
|
|
12952
|
-
}, childrenDom.map((item
|
|
13071
|
+
}, childrenDom.map((item) => {
|
|
12953
13072
|
return React__default.cloneElement(item, {
|
|
12954
13073
|
isOpen: defaultOpenIndex.includes(item.props.name),
|
|
12955
13074
|
onToggle: (isOpen, name) => onToggle(isOpen, name),
|
|
@@ -13162,6 +13281,7 @@ const defaultProps$5 = {
|
|
|
13162
13281
|
customAndExistTitle: "\u9009\u62E9\u5176\u4ED6\u5730\u5740"
|
|
13163
13282
|
};
|
|
13164
13283
|
const ExistRender = (props) => {
|
|
13284
|
+
const { locale } = useConfig();
|
|
13165
13285
|
const _a = __spreadValues(__spreadValues({}, defaultProps$5), props), {
|
|
13166
13286
|
children,
|
|
13167
13287
|
type,
|
|
@@ -13242,7 +13362,7 @@ const ExistRender = (props) => {
|
|
|
13242
13362
|
onClick: switchModule
|
|
13243
13363
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
13244
13364
|
className: b2("choose-other-btn")
|
|
13245
|
-
}, customAndExistTitle)));
|
|
13365
|
+
}, locale.address.chooseAnotherAddress || customAndExistTitle)));
|
|
13246
13366
|
};
|
|
13247
13367
|
const defaultProps$4 = {
|
|
13248
13368
|
type: "custom",
|
|
@@ -13253,11 +13373,12 @@ const defaultProps$4 = {
|
|
|
13253
13373
|
height: "200px"
|
|
13254
13374
|
};
|
|
13255
13375
|
const CustomRender = (props) => {
|
|
13376
|
+
const { locale } = useConfig();
|
|
13256
13377
|
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
13378
|
const b2 = cn("address");
|
|
13258
|
-
const [privateType
|
|
13379
|
+
const [privateType] = useState(type);
|
|
13259
13380
|
const [tabIndex, setTabIndex] = useState(0);
|
|
13260
|
-
const [tabName
|
|
13381
|
+
const [tabName] = useState(["province", "city", "country", "town"]);
|
|
13261
13382
|
const provinceRef = useRef(null);
|
|
13262
13383
|
const cityRef = useRef(null);
|
|
13263
13384
|
const countryRef = useRef(null);
|
|
@@ -13317,7 +13438,7 @@ const CustomRender = (props) => {
|
|
|
13317
13438
|
if (tabIndex < index2) {
|
|
13318
13439
|
return item.name;
|
|
13319
13440
|
}
|
|
13320
|
-
return
|
|
13441
|
+
return locale.select;
|
|
13321
13442
|
};
|
|
13322
13443
|
const mapRef = {
|
|
13323
13444
|
province: provinceRef,
|
|
@@ -13456,6 +13577,7 @@ const defaultProps$3 = {
|
|
|
13456
13577
|
backBtnIcon: "left"
|
|
13457
13578
|
};
|
|
13458
13579
|
const Address = (props) => {
|
|
13580
|
+
const { locale } = useConfig();
|
|
13459
13581
|
const _a = __spreadValues(__spreadValues({}, defaultProps$3), props), {
|
|
13460
13582
|
modelValue,
|
|
13461
13583
|
children,
|
|
@@ -13509,7 +13631,7 @@ const Address = (props) => {
|
|
|
13509
13631
|
]);
|
|
13510
13632
|
const b2 = cn("address");
|
|
13511
13633
|
const [privateType, setPrivateType] = useState(type);
|
|
13512
|
-
const [tabName
|
|
13634
|
+
const [tabName] = useState(["province", "city", "country", "town"]);
|
|
13513
13635
|
const [showPopup, setShowPopup] = useState(modelValue);
|
|
13514
13636
|
const [selectedRegion, setSelectedRegion] = useState({
|
|
13515
13637
|
province: { name: "" },
|
|
@@ -13518,13 +13640,10 @@ const Address = (props) => {
|
|
|
13518
13640
|
town: { name: "" }
|
|
13519
13641
|
});
|
|
13520
13642
|
const [selectedExistAddress, setSelectedExistAddress] = useState({});
|
|
13521
|
-
const
|
|
13522
|
-
const handClose = (type2 = "self") => {
|
|
13523
|
-
setCloseWay(() => type2 === "cross" ? "cross" : "self");
|
|
13643
|
+
const handClose = () => {
|
|
13524
13644
|
setShowPopup(false);
|
|
13525
13645
|
};
|
|
13526
13646
|
const clickOverlay = () => {
|
|
13527
|
-
setCloseWay("mask");
|
|
13528
13647
|
closeMask && closeMask({ closeWay: "mask" });
|
|
13529
13648
|
};
|
|
13530
13649
|
const nextAreaList = (item) => {
|
|
@@ -13601,8 +13720,8 @@ const Address = (props) => {
|
|
|
13601
13720
|
color: "#cccccc"
|
|
13602
13721
|
})), /* @__PURE__ */ React__default.createElement("div", {
|
|
13603
13722
|
className: b2("header__title")
|
|
13604
|
-
}, privateType === "custom" ? customAddressTitle : existAddressTitle), /* @__PURE__ */ React__default.createElement("div", {
|
|
13605
|
-
onClick: () => handClose(
|
|
13723
|
+
}, privateType === "custom" ? locale.address.selectRegion || customAddressTitle : locale.address.deliveryTo || existAddressTitle), /* @__PURE__ */ React__default.createElement("div", {
|
|
13724
|
+
onClick: () => handClose()
|
|
13606
13725
|
}, closeBtnIcon && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
13607
13726
|
name: closeBtnIcon,
|
|
13608
13727
|
color: "#cccccc",
|
|
@@ -13621,9 +13740,6 @@ const Address = (props) => {
|
|
|
13621
13740
|
visible: showPopup,
|
|
13622
13741
|
position: "bottom",
|
|
13623
13742
|
onClickOverlay: clickOverlay,
|
|
13624
|
-
onOpen: () => {
|
|
13625
|
-
setCloseWay("self");
|
|
13626
|
-
},
|
|
13627
13743
|
onClose: () => {
|
|
13628
13744
|
closeFun();
|
|
13629
13745
|
}
|
|
@@ -13647,7 +13763,7 @@ const Address = (props) => {
|
|
|
13647
13763
|
selectedIcon,
|
|
13648
13764
|
defaultIcon,
|
|
13649
13765
|
isShowCustomAddress,
|
|
13650
|
-
customAndExistTitle,
|
|
13766
|
+
customAndExistTitle: locale.address.chooseAnotherAddress || customAndExistTitle,
|
|
13651
13767
|
onSelected: selectedExist,
|
|
13652
13768
|
onSwitchModule
|
|
13653
13769
|
}))));
|
|
@@ -13732,6 +13848,7 @@ const defaultProps$1 = {
|
|
|
13732
13848
|
className: ""
|
|
13733
13849
|
};
|
|
13734
13850
|
const Signature = (props) => {
|
|
13851
|
+
const { locale } = useConfig();
|
|
13735
13852
|
const _a = __spreadValues(__spreadValues({}, defaultProps$1), props), { type, lineWidth, strokeStyle, unSupportTpl, className } = _a, rest = __objRest(_a, ["type", "lineWidth", "strokeStyle", "unSupportTpl", "className"]);
|
|
13736
13853
|
const b2 = cn("signature");
|
|
13737
13854
|
const canvasRef = useRef(null);
|
|
@@ -13829,15 +13946,15 @@ const Signature = (props) => {
|
|
|
13829
13946
|
width: canvasWidth
|
|
13830
13947
|
}) : /* @__PURE__ */ React__default.createElement("p", {
|
|
13831
13948
|
className: `${b2("unsopport")}`
|
|
13832
|
-
}, unSupportTpl)), /* @__PURE__ */ React__default.createElement(Button, {
|
|
13949
|
+
}, locale.signature.unSupportTpl || unSupportTpl)), /* @__PURE__ */ React__default.createElement(Button, {
|
|
13833
13950
|
className: `${b2("btn")}`,
|
|
13834
13951
|
type: "default",
|
|
13835
13952
|
onClick: () => clear()
|
|
13836
|
-
},
|
|
13953
|
+
}, locale.signature.reSign), /* @__PURE__ */ React__default.createElement(Button, {
|
|
13837
13954
|
className: `${b2("btn")}`,
|
|
13838
13955
|
type: "primary",
|
|
13839
13956
|
onClick: () => confirm2()
|
|
13840
|
-
},
|
|
13957
|
+
}, locale.confirm));
|
|
13841
13958
|
};
|
|
13842
13959
|
Signature.defaultProps = defaultProps$1;
|
|
13843
13960
|
Signature.displayName = "NutSignature";
|
|
@@ -13906,4 +14023,4 @@ const Card = (props) => {
|
|
|
13906
14023
|
};
|
|
13907
14024
|
Card.defaultProps = defaultProps;
|
|
13908
14025
|
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 };
|
|
14026
|
+
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 };
|