@nutui/nutui-react 1.1.4 → 1.1.5-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.
- package/dist/esm/Address.js +23 -11
- package/dist/esm/Barrage.js +1 -1
- package/dist/esm/Button.js +27 -28
- package/dist/esm/ConfigProvider.js +3 -2
- package/dist/esm/Dialog.js +4 -4
- package/dist/esm/Empty/style/index.js +2 -0
- package/dist/esm/Empty.js +89 -0
- package/dist/esm/FixedNav.js +3 -2
- package/dist/esm/Input.js +3 -2
- package/dist/esm/Swiper.js +62 -39
- package/dist/esm/SwiperItem.js +0 -4
- package/dist/esm/Uploader.js +12 -6
- package/dist/esm/nutui-react.es.js +1 -0
- package/dist/locales/base.d.ts +1 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +4 -3
- package/dist/locales/zh-CN.js +4 -3
- package/dist/locales/zh-TW.js +4 -3
- package/dist/nutui.react.es.js +354 -243
- package/dist/nutui.react.umd.js +15 -21
- package/dist/packages/empty/empty.scss +33 -0
- package/dist/packages/fixednav/fixednav.scss +1 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +1 -0
- package/dist/styles/variables.scss +8 -0
- package/dist/types/address/address.d.ts +1 -0
- package/dist/types/address/customRender.d.ts +1 -0
- package/dist/types/card/__test__/card.spec.d.ts +1 -0
- package/dist/types/cell/__test__/cell.spec.d.ts +1 -0
- package/dist/types/cellgroup/__test__/cellgroup.spec.d.ts +1 -0
- package/dist/types/empty/empty.d.ts +8 -0
- package/dist/types/empty/index.d.ts +2 -0
- package/dist/types/nutui.react.d.ts +2 -1
- package/dist/types/price/__test__/price.spec.d.ts +1 -0
- package/package.json +1 -1
package/dist/nutui.react.es.js
CHANGED
|
@@ -34,12 +34,12 @@ var __publicField = (obj, key, value) => {
|
|
|
34
34
|
return value;
|
|
35
35
|
};
|
|
36
36
|
/*!
|
|
37
|
-
* @nutui/nutui-react v1.1.
|
|
37
|
+
* @nutui/nutui-react v1.1.5-beta.1 Tue Jun 28 2022 09:34:05 GMT+0800 (China Standard Time)
|
|
38
38
|
* (c) 2022 @jdf2e.
|
|
39
39
|
* Released under the MIT License.
|
|
40
40
|
*/
|
|
41
41
|
import * as React from "react";
|
|
42
|
-
import React__default, { useState, useEffect, Component, useRef, createContext, useContext as useContext$1, useImperativeHandle, forwardRef,
|
|
42
|
+
import React__default, { useCallback, useState, useEffect, Component, useRef, createContext, useContext as useContext$1, useImperativeHandle, forwardRef, useMemo, memo } from "react";
|
|
43
43
|
import * as ReactDOM from "react-dom";
|
|
44
44
|
import ReactDOM__default, { unstable_batchedUpdates } from "react-dom";
|
|
45
45
|
var classname = { exports: {} };
|
|
@@ -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$_ = {
|
|
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$_), 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$_;
|
|
124
124
|
Icon.displayName = "NutIcon";
|
|
125
|
-
const defaultProps$
|
|
125
|
+
const defaultProps$Z = {
|
|
126
126
|
className: "",
|
|
127
127
|
color: "",
|
|
128
128
|
shape: "round",
|
|
@@ -139,7 +139,7 @@ const defaultProps$Y = {
|
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
141
|
const Button = (props) => {
|
|
142
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
142
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$Z), props), {
|
|
143
143
|
color,
|
|
144
144
|
shape,
|
|
145
145
|
plain,
|
|
@@ -168,8 +168,37 @@ const Button = (props) => {
|
|
|
168
168
|
"className",
|
|
169
169
|
"style"
|
|
170
170
|
]);
|
|
171
|
-
const
|
|
172
|
-
|
|
171
|
+
const getStyle = useCallback(() => {
|
|
172
|
+
const style2 = {};
|
|
173
|
+
if (color) {
|
|
174
|
+
if (plain) {
|
|
175
|
+
style2.color = color;
|
|
176
|
+
style2.background = "#fff";
|
|
177
|
+
if (!(color == null ? void 0 : color.includes("gradient"))) {
|
|
178
|
+
style2.borderColor = color;
|
|
179
|
+
}
|
|
180
|
+
} else {
|
|
181
|
+
style2.color = "#fff";
|
|
182
|
+
style2.background = color;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return style2;
|
|
186
|
+
}, [color, plain]);
|
|
187
|
+
const classes = useCallback(() => {
|
|
188
|
+
const prefixCls = "nut-button";
|
|
189
|
+
return [
|
|
190
|
+
prefixCls,
|
|
191
|
+
`${type ? `${prefixCls}--${type}` : ""}`,
|
|
192
|
+
`${size ? `${prefixCls}--${size}` : ""}`,
|
|
193
|
+
`${shape ? `${prefixCls}--${shape}` : ""}`,
|
|
194
|
+
`${plain ? `${prefixCls}--plain` : ""}`,
|
|
195
|
+
`${block ? `${prefixCls}--block` : ""}`,
|
|
196
|
+
`${disabled ? `${prefixCls}--disabled` : ""}`,
|
|
197
|
+
`${loading ? `${prefixCls}--loading` : ""}`
|
|
198
|
+
].filter(Boolean).join(" ");
|
|
199
|
+
}, [block, disabled, loading, plain, shape, size, type]);
|
|
200
|
+
const [btnName, setBtnName] = useState(classes());
|
|
201
|
+
const [btnStyle, setBtnStyle] = useState(getStyle());
|
|
173
202
|
useEffect(() => {
|
|
174
203
|
setBtnName(classes());
|
|
175
204
|
setBtnStyle(getStyle());
|
|
@@ -186,39 +215,15 @@ const Button = (props) => {
|
|
|
186
215
|
block,
|
|
187
216
|
icon,
|
|
188
217
|
children,
|
|
189
|
-
onClick
|
|
218
|
+
onClick,
|
|
219
|
+
classes,
|
|
220
|
+
getStyle
|
|
190
221
|
]);
|
|
191
|
-
const classes = () => {
|
|
192
|
-
const prefixCls = "nut-button";
|
|
193
|
-
return `${prefixCls} ${type ? `${prefixCls}--${type}` : ""}
|
|
194
|
-
${size ? `${prefixCls}--${size}` : ""}
|
|
195
|
-
${shape ? `${prefixCls}--${shape}` : ""}
|
|
196
|
-
${plain ? `${prefixCls}--plain` : ""}
|
|
197
|
-
${block ? `${prefixCls}--block` : ""}
|
|
198
|
-
${disabled ? `${prefixCls}--disabled` : ""}
|
|
199
|
-
${loading ? `${prefixCls}--loading` : ""}`;
|
|
200
|
-
};
|
|
201
222
|
const handleClick = (e2) => {
|
|
202
223
|
if (!loading && !disabled && onClick) {
|
|
203
224
|
onClick(e2);
|
|
204
225
|
}
|
|
205
226
|
};
|
|
206
|
-
const getStyle = () => {
|
|
207
|
-
const style2 = {};
|
|
208
|
-
if (color) {
|
|
209
|
-
if (plain) {
|
|
210
|
-
style2.color = color;
|
|
211
|
-
style2.background = "#fff";
|
|
212
|
-
if (!(color == null ? void 0 : color.includes("gradient"))) {
|
|
213
|
-
style2.borderColor = color;
|
|
214
|
-
}
|
|
215
|
-
} else {
|
|
216
|
-
style2.color = "#fff";
|
|
217
|
-
style2.background = color;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
return style2;
|
|
221
|
-
};
|
|
222
227
|
return /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues({
|
|
223
228
|
className: `${btnName} ${className}`,
|
|
224
229
|
style: __spreadValues(__spreadValues({}, btnStyle), style)
|
|
@@ -233,7 +238,7 @@ const Button = (props) => {
|
|
|
233
238
|
name: icon
|
|
234
239
|
}) : "", children));
|
|
235
240
|
};
|
|
236
|
-
Button.defaultProps = defaultProps$
|
|
241
|
+
Button.defaultProps = defaultProps$Z;
|
|
237
242
|
Button.displayName = "NutButton";
|
|
238
243
|
function _setPrototypeOf(o, p2) {
|
|
239
244
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p3) {
|
|
@@ -1442,7 +1447,7 @@ var useContext = React__default.useContext;
|
|
|
1442
1447
|
function useHistory() {
|
|
1443
1448
|
return useContext(historyContext);
|
|
1444
1449
|
}
|
|
1445
|
-
const defaultProps$
|
|
1450
|
+
const defaultProps$Y = {
|
|
1446
1451
|
title: "",
|
|
1447
1452
|
subTitle: "",
|
|
1448
1453
|
desc: "",
|
|
@@ -1458,7 +1463,7 @@ const defaultProps$X = {
|
|
|
1458
1463
|
}
|
|
1459
1464
|
};
|
|
1460
1465
|
const Cell = (props) => {
|
|
1461
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
1466
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$Y), props), {
|
|
1462
1467
|
children,
|
|
1463
1468
|
click,
|
|
1464
1469
|
isLink,
|
|
@@ -1521,11 +1526,11 @@ const Cell = (props) => {
|
|
|
1521
1526
|
className: b2("link")
|
|
1522
1527
|
}) : null);
|
|
1523
1528
|
};
|
|
1524
|
-
Cell.defaultProps = defaultProps$
|
|
1529
|
+
Cell.defaultProps = defaultProps$Y;
|
|
1525
1530
|
Cell.displayName = "NutCell";
|
|
1526
|
-
const defaultProps$
|
|
1531
|
+
const defaultProps$X = { title: "", classPrefix: "nutui-cell-group" };
|
|
1527
1532
|
const CellGroup = (props) => {
|
|
1528
|
-
const { children, classPrefix, title } = __spreadValues(__spreadValues({}, defaultProps$
|
|
1533
|
+
const { children, classPrefix, title } = __spreadValues(__spreadValues({}, defaultProps$X), props);
|
|
1529
1534
|
const b2 = cn("cell-group");
|
|
1530
1535
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
1531
1536
|
className: b2(null, [classPrefix])
|
|
@@ -1535,7 +1540,7 @@ const CellGroup = (props) => {
|
|
|
1535
1540
|
className: b2("wrap")
|
|
1536
1541
|
}, children));
|
|
1537
1542
|
};
|
|
1538
|
-
CellGroup.defaultProps = defaultProps$
|
|
1543
|
+
CellGroup.defaultProps = defaultProps$X;
|
|
1539
1544
|
CellGroup.displayName = "NutCellGroup";
|
|
1540
1545
|
var classnames = { exports: {} };
|
|
1541
1546
|
/*!
|
|
@@ -2079,7 +2084,7 @@ CSSTransition.defaultProps = {
|
|
|
2079
2084
|
};
|
|
2080
2085
|
CSSTransition.propTypes = {};
|
|
2081
2086
|
var CSSTransition$1 = CSSTransition;
|
|
2082
|
-
const defaultProps$
|
|
2087
|
+
const defaultProps$W = __spreadValues({
|
|
2083
2088
|
position: "center",
|
|
2084
2089
|
transition: "",
|
|
2085
2090
|
style: {},
|
|
@@ -2228,25 +2233,25 @@ const Popup = (props) => {
|
|
|
2228
2233
|
size: "12px"
|
|
2229
2234
|
})) : "")));
|
|
2230
2235
|
};
|
|
2231
|
-
Popup.defaultProps = defaultProps$
|
|
2236
|
+
Popup.defaultProps = defaultProps$W;
|
|
2232
2237
|
Popup.displayName = "NutPopup";
|
|
2233
|
-
const defaultProps$
|
|
2238
|
+
const defaultProps$V = {};
|
|
2234
2239
|
const Layout = (props) => {
|
|
2235
|
-
__spreadValues(__spreadValues({}, defaultProps$
|
|
2240
|
+
__spreadValues(__spreadValues({}, defaultProps$V), props);
|
|
2236
2241
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
2237
2242
|
className: "nut-layout"
|
|
2238
2243
|
}, "Layout");
|
|
2239
2244
|
};
|
|
2240
|
-
Layout.defaultProps = defaultProps$
|
|
2245
|
+
Layout.defaultProps = defaultProps$V;
|
|
2241
2246
|
Layout.displayName = "NutLayout";
|
|
2242
2247
|
const DataContext$2 = createContext({});
|
|
2243
|
-
const defaultProps$
|
|
2248
|
+
const defaultProps$U = {
|
|
2244
2249
|
span: "24",
|
|
2245
2250
|
offset: "0",
|
|
2246
2251
|
gutter: "0"
|
|
2247
2252
|
};
|
|
2248
2253
|
const Col = (props) => {
|
|
2249
|
-
const { span, offset, children } = __spreadValues(__spreadValues({}, defaultProps$
|
|
2254
|
+
const { span, offset, children } = __spreadValues(__spreadValues({}, defaultProps$U), props);
|
|
2250
2255
|
const [colName, setColName] = useState("");
|
|
2251
2256
|
const [colStyle, setColStyle] = useState({});
|
|
2252
2257
|
const { gutter } = useContext$1(DataContext$2);
|
|
@@ -2269,9 +2274,9 @@ const Col = (props) => {
|
|
|
2269
2274
|
style: __spreadValues({}, colStyle)
|
|
2270
2275
|
}, children);
|
|
2271
2276
|
};
|
|
2272
|
-
Col.defaultProps = defaultProps$
|
|
2277
|
+
Col.defaultProps = defaultProps$U;
|
|
2273
2278
|
Col.displayName = "NutCol";
|
|
2274
|
-
const defaultProps$
|
|
2279
|
+
const defaultProps$T = {
|
|
2275
2280
|
type: "",
|
|
2276
2281
|
justify: "start",
|
|
2277
2282
|
align: "flex-start",
|
|
@@ -2279,7 +2284,7 @@ const defaultProps$S = {
|
|
|
2279
2284
|
gutter: "0"
|
|
2280
2285
|
};
|
|
2281
2286
|
const Row = (props) => {
|
|
2282
|
-
const { children, type, justify, align, wrap, gutter } = __spreadValues(__spreadValues({}, defaultProps$
|
|
2287
|
+
const { children, type, justify, align, wrap, gutter } = __spreadValues(__spreadValues({}, defaultProps$T), props);
|
|
2283
2288
|
const prefixCls = "nut-row";
|
|
2284
2289
|
const getClass = (prefix2, type2) => {
|
|
2285
2290
|
return prefix2 ? type2 ? `nut-row-${prefix2}-${type2}` : "" : `nut-row-${type2}`;
|
|
@@ -2302,15 +2307,15 @@ const Row = (props) => {
|
|
|
2302
2307
|
className: getClasses()
|
|
2303
2308
|
}, children));
|
|
2304
2309
|
};
|
|
2305
|
-
Row.defaultProps = defaultProps$
|
|
2310
|
+
Row.defaultProps = defaultProps$T;
|
|
2306
2311
|
Row.displayName = "NutRow";
|
|
2307
|
-
const defaultProps$
|
|
2312
|
+
const defaultProps$S = {
|
|
2308
2313
|
contentPosition: "center",
|
|
2309
2314
|
dashed: false,
|
|
2310
2315
|
hairline: true
|
|
2311
2316
|
};
|
|
2312
2317
|
const Divider = (props) => {
|
|
2313
|
-
const { children, contentPosition, dashed, hairline, styles, className } = __spreadValues(__spreadValues({}, defaultProps$
|
|
2318
|
+
const { children, contentPosition, dashed, hairline, styles, className } = __spreadValues(__spreadValues({}, defaultProps$S), props);
|
|
2314
2319
|
const dividerBem = cn("divider");
|
|
2315
2320
|
const classes = classNames({
|
|
2316
2321
|
[dividerBem()]: true,
|
|
@@ -2325,9 +2330,9 @@ const Divider = (props) => {
|
|
|
2325
2330
|
style: styles
|
|
2326
2331
|
}, children);
|
|
2327
2332
|
};
|
|
2328
|
-
Divider.defaultProps = defaultProps$
|
|
2333
|
+
Divider.defaultProps = defaultProps$S;
|
|
2329
2334
|
Divider.displayName = "NutDivider";
|
|
2330
|
-
const defaultProps$
|
|
2335
|
+
const defaultProps$R = {
|
|
2331
2336
|
title: "",
|
|
2332
2337
|
desc: "",
|
|
2333
2338
|
leftShow: false,
|
|
@@ -2348,7 +2353,7 @@ const NavBar = (props) => {
|
|
|
2348
2353
|
onClickIcon,
|
|
2349
2354
|
onClickBack,
|
|
2350
2355
|
onClickClear
|
|
2351
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
2356
|
+
} = __spreadValues(__spreadValues({}, defaultProps$R), props);
|
|
2352
2357
|
const b2 = cn("navbar");
|
|
2353
2358
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
2354
2359
|
className: `nut-navbar ${className}`,
|
|
@@ -2371,7 +2376,7 @@ const NavBar = (props) => {
|
|
|
2371
2376
|
name: icon
|
|
2372
2377
|
})));
|
|
2373
2378
|
};
|
|
2374
|
-
NavBar.defaultProps = defaultProps$
|
|
2379
|
+
NavBar.defaultProps = defaultProps$R;
|
|
2375
2380
|
NavBar.displayName = "NutNavBar";
|
|
2376
2381
|
const zhCN = {
|
|
2377
2382
|
save: "\u4FDD\u5B58",
|
|
@@ -2420,9 +2425,10 @@ const zhCN = {
|
|
|
2420
2425
|
ready: "\u51C6\u5907\u5B8C\u6210",
|
|
2421
2426
|
readyUpload: "\u51C6\u5907\u4E0A\u4F20",
|
|
2422
2427
|
waitingUpload: "\u7B49\u5F85\u4E0A\u4F20",
|
|
2423
|
-
uploading: "\u4E0A\u4F20\u4E2D",
|
|
2428
|
+
uploading: "\u4E0A\u4F20\u4E2D...",
|
|
2424
2429
|
success: "\u4E0A\u4F20\u6210\u529F",
|
|
2425
|
-
error: "\u4E0A\u4F20\u5931\u8D25"
|
|
2430
|
+
error: "\u4E0A\u4F20\u5931\u8D25",
|
|
2431
|
+
deleteWord: "\u7528\u6237\u963B\u6B62\u4E86\u5220\u9664\uFF01"
|
|
2426
2432
|
},
|
|
2427
2433
|
countdown: {
|
|
2428
2434
|
day: "\u5929",
|
|
@@ -2464,7 +2470,7 @@ const zhCN = {
|
|
|
2464
2470
|
additionalImages: (length) => `${length}\u5F20\u8FFD\u8BC4\u56FE\u7247`
|
|
2465
2471
|
}
|
|
2466
2472
|
};
|
|
2467
|
-
const defaultProps$
|
|
2473
|
+
const defaultProps$Q = {
|
|
2468
2474
|
locale: zhCN
|
|
2469
2475
|
};
|
|
2470
2476
|
const defaultConfigRef = {
|
|
@@ -2481,15 +2487,15 @@ const useConfig = () => {
|
|
|
2481
2487
|
};
|
|
2482
2488
|
const ConfigContext = createContext(null);
|
|
2483
2489
|
const ConfigProvider = (props) => {
|
|
2484
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
2490
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$Q), props), { children } = _a, config2 = __objRest(_a, ["children"]);
|
|
2485
2491
|
const parentConfig = useConfig();
|
|
2486
2492
|
return /* @__PURE__ */ React__default.createElement(ConfigContext.Provider, {
|
|
2487
2493
|
value: __spreadValues(__spreadValues({}, parentConfig), config2)
|
|
2488
2494
|
}, children);
|
|
2489
2495
|
};
|
|
2490
|
-
ConfigProvider.defaultProps = defaultProps$
|
|
2496
|
+
ConfigProvider.defaultProps = defaultProps$Q;
|
|
2491
2497
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
2492
|
-
const defaultProps$
|
|
2498
|
+
const defaultProps$P = {
|
|
2493
2499
|
fixednavClass: "nut-fixednav",
|
|
2494
2500
|
activeText: "\u6536\u8D77\u5BFC\u822A",
|
|
2495
2501
|
unActiveText: "\u5FEB\u901F\u5BFC\u822A",
|
|
@@ -2501,7 +2507,7 @@ const defaultProps$O = {
|
|
|
2501
2507
|
};
|
|
2502
2508
|
const FixedNav = (props) => {
|
|
2503
2509
|
const { locale } = useConfig();
|
|
2504
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
2510
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$P), props), {
|
|
2505
2511
|
fixednavClass,
|
|
2506
2512
|
overlay,
|
|
2507
2513
|
visible,
|
|
@@ -2555,9 +2561,10 @@ const FixedNav = (props) => {
|
|
|
2555
2561
|
onClick: (event) => onSelectCb(event, item),
|
|
2556
2562
|
key: item.id || index2
|
|
2557
2563
|
}, /* @__PURE__ */ React__default.createElement("img", {
|
|
2558
|
-
src: item.icon
|
|
2564
|
+
src: item.icon,
|
|
2565
|
+
alt: ""
|
|
2559
2566
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
2560
|
-
className: "
|
|
2567
|
+
className: "nut-fixednav__list-text"
|
|
2561
2568
|
}, item.text), item.num && /* @__PURE__ */ React__default.createElement("div", {
|
|
2562
2569
|
className: "b"
|
|
2563
2570
|
}, item.num));
|
|
@@ -2571,9 +2578,9 @@ const FixedNav = (props) => {
|
|
|
2571
2578
|
className: "text"
|
|
2572
2579
|
}, visible ? locale.fixednav.activeText || activeText : locale.fixednav.unActiveText || unActiveText))));
|
|
2573
2580
|
};
|
|
2574
|
-
FixedNav.defaultProps = defaultProps$
|
|
2581
|
+
FixedNav.defaultProps = defaultProps$P;
|
|
2575
2582
|
FixedNav.displayName = "NutFixedNav";
|
|
2576
|
-
const defaultProps$
|
|
2583
|
+
const defaultProps$O = {
|
|
2577
2584
|
visible: 0,
|
|
2578
2585
|
bottom: false,
|
|
2579
2586
|
type: "",
|
|
@@ -2586,7 +2593,7 @@ const defaultProps$N = {
|
|
|
2586
2593
|
}
|
|
2587
2594
|
};
|
|
2588
2595
|
const Tabbar = (props) => {
|
|
2589
|
-
const { children, visible, bottom, activeColor, unactiveColor, className, style, tabSwitch } = __spreadValues(__spreadValues({}, defaultProps$
|
|
2596
|
+
const { children, visible, bottom, activeColor, unactiveColor, className, style, tabSwitch } = __spreadValues(__spreadValues({}, defaultProps$O), props);
|
|
2590
2597
|
const b2 = cn("tabbar");
|
|
2591
2598
|
const [selectIndex, setSelectIndex] = useState(visible);
|
|
2592
2599
|
const handleClick = (idx) => {
|
|
@@ -2612,9 +2619,9 @@ const Tabbar = (props) => {
|
|
|
2612
2619
|
return React__default.cloneElement(child, childProps);
|
|
2613
2620
|
}));
|
|
2614
2621
|
};
|
|
2615
|
-
Tabbar.defaultProps = defaultProps$
|
|
2622
|
+
Tabbar.defaultProps = defaultProps$O;
|
|
2616
2623
|
Tabbar.displayName = "NutTabbar";
|
|
2617
|
-
const defaultProps$
|
|
2624
|
+
const defaultProps$N = {
|
|
2618
2625
|
tabTitle: "",
|
|
2619
2626
|
icon: "",
|
|
2620
2627
|
href: "",
|
|
@@ -2628,7 +2635,7 @@ const defaultProps$M = {
|
|
|
2628
2635
|
}
|
|
2629
2636
|
};
|
|
2630
2637
|
const TabbarItem = (props) => {
|
|
2631
|
-
const { tabTitle, icon, href, to: to2, num, active, activeColor, unactiveColor, index: index2, handleClick } = __spreadValues(__spreadValues({}, defaultProps$
|
|
2638
|
+
const { tabTitle, icon, href, to: to2, num, active, activeColor, unactiveColor, index: index2, handleClick } = __spreadValues(__spreadValues({}, defaultProps$N), props);
|
|
2632
2639
|
const b2 = cn("tabbar-item");
|
|
2633
2640
|
const bIcon = cn("tabbar-item__icon-box");
|
|
2634
2641
|
const history = useHistory();
|
|
@@ -2662,14 +2669,14 @@ const TabbarItem = (props) => {
|
|
|
2662
2669
|
className: bIcon({ "nav-word": true }, [bIcon({ "big-word": !icon })])
|
|
2663
2670
|
}, tabTitle)));
|
|
2664
2671
|
};
|
|
2665
|
-
const defaultProps$
|
|
2672
|
+
const defaultProps$M = {
|
|
2666
2673
|
height: "200px",
|
|
2667
2674
|
acceptKey: "title",
|
|
2668
2675
|
indexList: [],
|
|
2669
2676
|
className: ""
|
|
2670
2677
|
};
|
|
2671
2678
|
const Elevator = (props) => {
|
|
2672
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
2679
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$M), props), { height, acceptKey, indexList, className, clickItem, clickIndex } = _a, rest = __objRest(_a, ["height", "acceptKey", "indexList", "className", "clickItem", "clickIndex"]);
|
|
2673
2680
|
const b2 = cn("elevator");
|
|
2674
2681
|
const spaceHeight = 23;
|
|
2675
2682
|
const listview = useRef(null);
|
|
@@ -2803,9 +2810,9 @@ const Elevator = (props) => {
|
|
|
2803
2810
|
}, item[acceptKey]);
|
|
2804
2811
|
}))));
|
|
2805
2812
|
};
|
|
2806
|
-
Elevator.defaultProps = defaultProps$
|
|
2813
|
+
Elevator.defaultProps = defaultProps$M;
|
|
2807
2814
|
Elevator.displayName = "NutElevator";
|
|
2808
|
-
const defaultProps$
|
|
2815
|
+
const defaultProps$L = {
|
|
2809
2816
|
defaultValue: 1,
|
|
2810
2817
|
mode: "multi",
|
|
2811
2818
|
prevText: "\u4E0A\u4E00\u9875",
|
|
@@ -2822,7 +2829,7 @@ const defaultProps$K = {
|
|
|
2822
2829
|
};
|
|
2823
2830
|
const Pagination = (props) => {
|
|
2824
2831
|
const { locale } = useConfig();
|
|
2825
|
-
__spreadValues(__spreadValues({}, defaultProps$
|
|
2832
|
+
__spreadValues(__spreadValues({}, defaultProps$L), props);
|
|
2826
2833
|
const _a = props, {
|
|
2827
2834
|
modelValue,
|
|
2828
2835
|
mode,
|
|
@@ -2952,7 +2959,7 @@ const Pagination = (props) => {
|
|
|
2952
2959
|
onClick: (e2) => selectPage(Number(currentPage) + 1, true)
|
|
2953
2960
|
}, locale.pagination.next || nextText));
|
|
2954
2961
|
};
|
|
2955
|
-
Pagination.defaultProps = defaultProps$
|
|
2962
|
+
Pagination.defaultProps = defaultProps$L;
|
|
2956
2963
|
Pagination.displayName = "NutPagination";
|
|
2957
2964
|
class Title {
|
|
2958
2965
|
constructor() {
|
|
@@ -2962,7 +2969,7 @@ class Title {
|
|
|
2962
2969
|
__publicField(this, "index", 0);
|
|
2963
2970
|
}
|
|
2964
2971
|
}
|
|
2965
|
-
const defaultProps$
|
|
2972
|
+
const defaultProps$K = {
|
|
2966
2973
|
value: 0,
|
|
2967
2974
|
color: "",
|
|
2968
2975
|
background: "",
|
|
@@ -2978,7 +2985,7 @@ const pxCheck$1 = (value) => {
|
|
|
2978
2985
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
2979
2986
|
};
|
|
2980
2987
|
const Tabs = (props) => {
|
|
2981
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
2988
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$K), props), {
|
|
2982
2989
|
value,
|
|
2983
2990
|
color,
|
|
2984
2991
|
background,
|
|
@@ -3099,16 +3106,16 @@ const Tabs = (props) => {
|
|
|
3099
3106
|
return React__default.cloneElement(child, childProps);
|
|
3100
3107
|
})));
|
|
3101
3108
|
};
|
|
3102
|
-
Tabs.defaultProps = defaultProps$
|
|
3109
|
+
Tabs.defaultProps = defaultProps$K;
|
|
3103
3110
|
Tabs.displayName = "NutTabs";
|
|
3104
|
-
const defaultProps$
|
|
3111
|
+
const defaultProps$J = {
|
|
3105
3112
|
title: "",
|
|
3106
3113
|
paneKey: "",
|
|
3107
3114
|
activeKey: "",
|
|
3108
3115
|
disabled: false
|
|
3109
3116
|
};
|
|
3110
3117
|
const TabPane = (props) => {
|
|
3111
|
-
const { children, paneKey, activeKey } = __spreadValues(__spreadValues({}, defaultProps$
|
|
3118
|
+
const { children, paneKey, activeKey } = __spreadValues(__spreadValues({}, defaultProps$J), props);
|
|
3112
3119
|
const b2 = cn("tabpane");
|
|
3113
3120
|
const classes = classNames({
|
|
3114
3121
|
active: paneKey === activeKey
|
|
@@ -3394,7 +3401,7 @@ var Toast = {
|
|
|
3394
3401
|
}
|
|
3395
3402
|
}
|
|
3396
3403
|
};
|
|
3397
|
-
const defaultProps$
|
|
3404
|
+
const defaultProps$I = {
|
|
3398
3405
|
range: false,
|
|
3399
3406
|
hiddenRange: false,
|
|
3400
3407
|
hiddenTag: false,
|
|
@@ -3424,7 +3431,7 @@ const Range = (props) => {
|
|
|
3424
3431
|
change,
|
|
3425
3432
|
dragStart,
|
|
3426
3433
|
dragEnd
|
|
3427
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
3434
|
+
} = __spreadValues(__spreadValues({}, defaultProps$I), props);
|
|
3428
3435
|
const [buttonIndex, SetButtonIndex] = useState(0);
|
|
3429
3436
|
const [initValue, SetInitValue] = useState();
|
|
3430
3437
|
const [dragStatus, SetDragStatus] = useState("start");
|
|
@@ -3633,7 +3640,7 @@ const Range = (props) => {
|
|
|
3633
3640
|
className: "max"
|
|
3634
3641
|
}, +max) : null);
|
|
3635
3642
|
};
|
|
3636
|
-
Range.defaultProps = defaultProps$
|
|
3643
|
+
Range.defaultProps = defaultProps$I;
|
|
3637
3644
|
Range.displayName = "NutRange";
|
|
3638
3645
|
const Utils = {
|
|
3639
3646
|
isLeapYear(y2) {
|
|
@@ -3719,7 +3726,7 @@ function requestAniFrame() {
|
|
|
3719
3726
|
};
|
|
3720
3727
|
}
|
|
3721
3728
|
var requestAniFrame$1 = requestAniFrame();
|
|
3722
|
-
const defaultProps$
|
|
3729
|
+
const defaultProps$H = {
|
|
3723
3730
|
type: "one",
|
|
3724
3731
|
isAutoBackFill: false,
|
|
3725
3732
|
poppable: true,
|
|
@@ -3748,7 +3755,7 @@ const CalendarItem = (props) => {
|
|
|
3748
3755
|
onChoose,
|
|
3749
3756
|
onUpdate,
|
|
3750
3757
|
onClose
|
|
3751
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
3758
|
+
} = __spreadValues(__spreadValues({}, defaultProps$H), props);
|
|
3752
3759
|
const weeks = locale.calendaritem.weekdays;
|
|
3753
3760
|
const [yearMonthTitle, setYearMonthTitle] = useState("");
|
|
3754
3761
|
const [unLoadPrev, setUnLoadPrev] = useState(false);
|
|
@@ -4134,9 +4141,9 @@ const CalendarItem = (props) => {
|
|
|
4134
4141
|
onClick: confirm2
|
|
4135
4142
|
}, locale.confirm)) : ""));
|
|
4136
4143
|
};
|
|
4137
|
-
CalendarItem.defaultProps = defaultProps$
|
|
4144
|
+
CalendarItem.defaultProps = defaultProps$H;
|
|
4138
4145
|
CalendarItem.displayName = "NutCalendarItem";
|
|
4139
|
-
const defaultProps$
|
|
4146
|
+
const defaultProps$G = {
|
|
4140
4147
|
type: "one",
|
|
4141
4148
|
isAutoBackFill: false,
|
|
4142
4149
|
poppable: true,
|
|
@@ -4164,7 +4171,7 @@ const Calendar = (props) => {
|
|
|
4164
4171
|
endDate,
|
|
4165
4172
|
onClose,
|
|
4166
4173
|
onChoose
|
|
4167
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
4174
|
+
} = __spreadValues(__spreadValues({}, defaultProps$G), props);
|
|
4168
4175
|
const close = () => {
|
|
4169
4176
|
onClose && onClose();
|
|
4170
4177
|
};
|
|
@@ -4207,16 +4214,16 @@ const Calendar = (props) => {
|
|
|
4207
4214
|
onChoose: choose
|
|
4208
4215
|
}));
|
|
4209
4216
|
};
|
|
4210
|
-
Calendar.defaultProps = defaultProps$
|
|
4217
|
+
Calendar.defaultProps = defaultProps$G;
|
|
4211
4218
|
Calendar.displayName = "NutCalendar";
|
|
4212
|
-
const defaultProps$
|
|
4219
|
+
const defaultProps$F = {
|
|
4213
4220
|
disabled: false,
|
|
4214
4221
|
checkedValue: [],
|
|
4215
4222
|
onChange: (value) => {
|
|
4216
4223
|
}
|
|
4217
4224
|
};
|
|
4218
4225
|
const CheckboxGroup = React__default.forwardRef((props, ref) => {
|
|
4219
|
-
const { children } = __spreadValues(__spreadValues({}, defaultProps$
|
|
4226
|
+
const { children } = __spreadValues(__spreadValues({}, defaultProps$F), props);
|
|
4220
4227
|
const b2 = cn("checkboxgroup");
|
|
4221
4228
|
const _a = props, { className, disabled, onChange, checkedValue } = _a, rest = __objRest(_a, ["className", "disabled", "onChange", "checkedValue"]);
|
|
4222
4229
|
const [innerDisabled, setInnerDisabled] = useState(disabled);
|
|
@@ -4275,9 +4282,9 @@ const CheckboxGroup = React__default.forwardRef((props, ref) => {
|
|
|
4275
4282
|
className: `${b2()} ${className || ""}`
|
|
4276
4283
|
}, rest), cloneChildren());
|
|
4277
4284
|
});
|
|
4278
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
4285
|
+
CheckboxGroup.defaultProps = defaultProps$F;
|
|
4279
4286
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
4280
|
-
const defaultProps$
|
|
4287
|
+
const defaultProps$E = {
|
|
4281
4288
|
checked: false,
|
|
4282
4289
|
disabled: false,
|
|
4283
4290
|
textPosition: "right",
|
|
@@ -4288,7 +4295,7 @@ const defaultProps$D = {
|
|
|
4288
4295
|
}
|
|
4289
4296
|
};
|
|
4290
4297
|
const Checkbox = (props) => {
|
|
4291
|
-
const { children } = __spreadValues(__spreadValues({}, defaultProps$
|
|
4298
|
+
const { children } = __spreadValues(__spreadValues({}, defaultProps$E), props);
|
|
4292
4299
|
const b2 = cn("checkbox");
|
|
4293
4300
|
const _a = props, {
|
|
4294
4301
|
iconName,
|
|
@@ -4344,7 +4351,7 @@ const Checkbox = (props) => {
|
|
|
4344
4351
|
onClick: handleClick
|
|
4345
4352
|
}), renderIcon(), renderLabel());
|
|
4346
4353
|
};
|
|
4347
|
-
Checkbox.defaultProps = defaultProps$
|
|
4354
|
+
Checkbox.defaultProps = defaultProps$E;
|
|
4348
4355
|
Checkbox.displayName = "NutCheckBox";
|
|
4349
4356
|
Checkbox.Group = CheckboxGroup;
|
|
4350
4357
|
const InternalPickerSlot = (props, ref) => {
|
|
@@ -4660,7 +4667,7 @@ const InternalPicker = (props, ref) => {
|
|
|
4660
4667
|
};
|
|
4661
4668
|
const Picker = React__default.forwardRef(InternalPicker);
|
|
4662
4669
|
const currentYear = new Date().getFullYear();
|
|
4663
|
-
const defaultProps$
|
|
4670
|
+
const defaultProps$D = {
|
|
4664
4671
|
modelValue: new Date(),
|
|
4665
4672
|
visible: false,
|
|
4666
4673
|
title: "",
|
|
@@ -4672,7 +4679,7 @@ const defaultProps$C = {
|
|
|
4672
4679
|
onCloseDatePicker: () => void 0
|
|
4673
4680
|
};
|
|
4674
4681
|
const DatePicker = (props) => {
|
|
4675
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
4682
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$D), props), {
|
|
4676
4683
|
minDate,
|
|
4677
4684
|
maxDate,
|
|
4678
4685
|
type,
|
|
@@ -4926,9 +4933,9 @@ const DatePicker = (props) => {
|
|
|
4926
4933
|
ref: pickerRef
|
|
4927
4934
|
}));
|
|
4928
4935
|
};
|
|
4929
|
-
DatePicker.defaultProps = defaultProps$
|
|
4936
|
+
DatePicker.defaultProps = defaultProps$D;
|
|
4930
4937
|
DatePicker.displayName = "NutDatePicker";
|
|
4931
|
-
const defaultProps$
|
|
4938
|
+
const defaultProps$C = {
|
|
4932
4939
|
disabled: false,
|
|
4933
4940
|
buttonSize: "",
|
|
4934
4941
|
min: 1,
|
|
@@ -4944,7 +4951,7 @@ function pxCheck(value) {
|
|
|
4944
4951
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
4945
4952
|
}
|
|
4946
4953
|
const InputNumber = (props) => {
|
|
4947
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
4954
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$C), props), {
|
|
4948
4955
|
children,
|
|
4949
4956
|
disabled,
|
|
4950
4957
|
buttonSize,
|
|
@@ -5101,7 +5108,7 @@ const InputNumber = (props) => {
|
|
|
5101
5108
|
click: addNumber
|
|
5102
5109
|
}));
|
|
5103
5110
|
};
|
|
5104
|
-
InputNumber.defaultProps = defaultProps$
|
|
5111
|
+
InputNumber.defaultProps = defaultProps$C;
|
|
5105
5112
|
InputNumber.displayName = "NutInputNumber";
|
|
5106
5113
|
function trimExtraChar(value, char, regExp) {
|
|
5107
5114
|
const index2 = value.indexOf(char);
|
|
@@ -5127,10 +5134,10 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
5127
5134
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
5128
5135
|
return value.replace(regExp, "");
|
|
5129
5136
|
}
|
|
5130
|
-
const defaultProps$
|
|
5137
|
+
const defaultProps$B = {
|
|
5131
5138
|
type: "text",
|
|
5132
5139
|
defaultValue: "",
|
|
5133
|
-
placeholder: "
|
|
5140
|
+
placeholder: "",
|
|
5134
5141
|
label: "",
|
|
5135
5142
|
requireShow: false,
|
|
5136
5143
|
disabled: false,
|
|
@@ -5158,7 +5165,8 @@ const Input = (props) => {
|
|
|
5158
5165
|
blur,
|
|
5159
5166
|
focus,
|
|
5160
5167
|
clear
|
|
5161
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
5168
|
+
} = __spreadValues(__spreadValues({}, defaultProps$B), props);
|
|
5169
|
+
locale.placeholder = placeholder || locale.placeholder;
|
|
5162
5170
|
const inputBem = cn("input");
|
|
5163
5171
|
const [inputValue, SetInputValue] = useState("");
|
|
5164
5172
|
const [active, SetActive] = useState(false);
|
|
@@ -5217,7 +5225,7 @@ const Input = (props) => {
|
|
|
5217
5225
|
}, label) : null), /* @__PURE__ */ React__default.createElement("input", {
|
|
5218
5226
|
className: "input-text",
|
|
5219
5227
|
type,
|
|
5220
|
-
placeholder
|
|
5228
|
+
placeholder,
|
|
5221
5229
|
disabled,
|
|
5222
5230
|
readOnly: readonly,
|
|
5223
5231
|
value: inputValue,
|
|
@@ -5242,14 +5250,14 @@ const Input = (props) => {
|
|
|
5242
5250
|
size: "12px"
|
|
5243
5251
|
}) : null) : null);
|
|
5244
5252
|
};
|
|
5245
|
-
Input.defaultProps = defaultProps$
|
|
5253
|
+
Input.defaultProps = defaultProps$B;
|
|
5246
5254
|
Input.displayName = "NutInput";
|
|
5247
5255
|
const radioContext = {
|
|
5248
5256
|
onChange: (val) => {
|
|
5249
5257
|
}
|
|
5250
5258
|
};
|
|
5251
5259
|
var RadioContext = React__default.createContext(radioContext);
|
|
5252
|
-
const defaultProps$
|
|
5260
|
+
const defaultProps$A = {
|
|
5253
5261
|
value: null,
|
|
5254
5262
|
textPosition: "right",
|
|
5255
5263
|
onChange: (value) => {
|
|
@@ -5257,7 +5265,7 @@ const defaultProps$z = {
|
|
|
5257
5265
|
direction: "vertical"
|
|
5258
5266
|
};
|
|
5259
5267
|
const RadioGroup = React__default.forwardRef((props, ref) => {
|
|
5260
|
-
const { children } = __spreadValues(__spreadValues({}, defaultProps$
|
|
5268
|
+
const { children } = __spreadValues(__spreadValues({}, defaultProps$A), props);
|
|
5261
5269
|
cn("RadioGroup");
|
|
5262
5270
|
const _a = props, { className, value, onChange, textPosition, direction } = _a, rest = __objRest(_a, ["className", "value", "onChange", "textPosition", "direction"]);
|
|
5263
5271
|
const [val2State, setVal2State] = useState(value);
|
|
@@ -5292,9 +5300,9 @@ const RadioGroup = React__default.forwardRef((props, ref) => {
|
|
|
5292
5300
|
className: `nut-radiogroup nut-radiogroup--${props.direction}`
|
|
5293
5301
|
}, rest), cloneChildren()));
|
|
5294
5302
|
});
|
|
5295
|
-
RadioGroup.defaultProps = defaultProps$
|
|
5303
|
+
RadioGroup.defaultProps = defaultProps$A;
|
|
5296
5304
|
RadioGroup.displayName = "NutRadioGroup";
|
|
5297
|
-
const defaultProps$
|
|
5305
|
+
const defaultProps$z = {
|
|
5298
5306
|
disabled: false,
|
|
5299
5307
|
checked: false,
|
|
5300
5308
|
shape: "round",
|
|
@@ -5307,7 +5315,7 @@ const defaultProps$y = {
|
|
|
5307
5315
|
}
|
|
5308
5316
|
};
|
|
5309
5317
|
const Radio = (props) => {
|
|
5310
|
-
const { children } = __spreadValues(__spreadValues({}, defaultProps$
|
|
5318
|
+
const { children } = __spreadValues(__spreadValues({}, defaultProps$z), props);
|
|
5311
5319
|
const _a = props, {
|
|
5312
5320
|
className,
|
|
5313
5321
|
disabled,
|
|
@@ -5375,10 +5383,10 @@ const Radio = (props) => {
|
|
|
5375
5383
|
onClick: handleClick
|
|
5376
5384
|
}, rest), props.shape == "button" ? renderButton() : reverseState ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()]);
|
|
5377
5385
|
};
|
|
5378
|
-
Radio.defaultProps = defaultProps$
|
|
5386
|
+
Radio.defaultProps = defaultProps$z;
|
|
5379
5387
|
Radio.displayName = "NutRadio";
|
|
5380
5388
|
Radio.RadioGroup = RadioGroup;
|
|
5381
|
-
const defaultProps$
|
|
5389
|
+
const defaultProps$y = {
|
|
5382
5390
|
count: 5,
|
|
5383
5391
|
modelValue: 0,
|
|
5384
5392
|
iconSize: 18,
|
|
@@ -5405,7 +5413,7 @@ const Rate = (props) => {
|
|
|
5405
5413
|
allowHalf,
|
|
5406
5414
|
spacing,
|
|
5407
5415
|
change
|
|
5408
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
5416
|
+
} = __spreadValues(__spreadValues({}, defaultProps$y), props);
|
|
5409
5417
|
const b2 = cn("rate");
|
|
5410
5418
|
const bi = cn("rate-item");
|
|
5411
5419
|
const [countArray, setCountArray] = useState([1, 2, 3, 4, 5]);
|
|
@@ -5468,9 +5476,9 @@ const Rate = (props) => {
|
|
|
5468
5476
|
}));
|
|
5469
5477
|
}));
|
|
5470
5478
|
};
|
|
5471
|
-
Rate.defaultProps = defaultProps$
|
|
5479
|
+
Rate.defaultProps = defaultProps$y;
|
|
5472
5480
|
Rate.displayName = "NutRate";
|
|
5473
|
-
const defaultProps$
|
|
5481
|
+
const defaultProps$x = {
|
|
5474
5482
|
title: "\u8BF7\u8F93\u5165\u5BC6\u7801",
|
|
5475
5483
|
desc: "\u60A8\u4F7F\u7528\u4E86\u865A\u62DF\u8D44\u4EA7\uFF0C\u8BF7\u8FDB\u884C\u9A8C\u8BC1",
|
|
5476
5484
|
tips: "\u5FD8\u8BB0\u5BC6\u7801",
|
|
@@ -5646,9 +5654,9 @@ const ShortPassword = (props) => {
|
|
|
5646
5654
|
onClick: () => sure()
|
|
5647
5655
|
}, locale.confirm)) : null)));
|
|
5648
5656
|
};
|
|
5649
|
-
ShortPassword.defaultProps = defaultProps$
|
|
5657
|
+
ShortPassword.defaultProps = defaultProps$x;
|
|
5650
5658
|
ShortPassword.displayName = "NutShortPassword";
|
|
5651
|
-
const defaultProps$
|
|
5659
|
+
const defaultProps$w = {
|
|
5652
5660
|
defaultValue: "",
|
|
5653
5661
|
textAlign: "left",
|
|
5654
5662
|
limitshow: false,
|
|
@@ -5676,7 +5684,7 @@ const TextArea = (props) => {
|
|
|
5676
5684
|
change,
|
|
5677
5685
|
blur,
|
|
5678
5686
|
focus
|
|
5679
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
5687
|
+
} = __spreadValues(__spreadValues({}, defaultProps$w), props);
|
|
5680
5688
|
const textareaBem = cn("textarea");
|
|
5681
5689
|
const [inputValue, SetInputValue] = useState("");
|
|
5682
5690
|
useEffect(() => {
|
|
@@ -5747,7 +5755,7 @@ const TextArea = (props) => {
|
|
|
5747
5755
|
className: textareaBem("limit")
|
|
5748
5756
|
}, inputValue.length, "/", maxlength < 0 ? 0 : maxlength) : null);
|
|
5749
5757
|
};
|
|
5750
|
-
TextArea.defaultProps = defaultProps$
|
|
5758
|
+
TextArea.defaultProps = defaultProps$w;
|
|
5751
5759
|
TextArea.displayName = "NutTextArea";
|
|
5752
5760
|
class UploadOptions {
|
|
5753
5761
|
constructor() {
|
|
@@ -5803,7 +5811,7 @@ class Upload {
|
|
|
5803
5811
|
}
|
|
5804
5812
|
}
|
|
5805
5813
|
}
|
|
5806
|
-
const defaultProps$
|
|
5814
|
+
const defaultProps$v = {
|
|
5807
5815
|
url: "",
|
|
5808
5816
|
maximum: 1,
|
|
5809
5817
|
uploadIcon: "photograph",
|
|
@@ -5842,7 +5850,8 @@ class FileItem {
|
|
|
5842
5850
|
}
|
|
5843
5851
|
}
|
|
5844
5852
|
const InternalUploader = (props, ref) => {
|
|
5845
|
-
const
|
|
5853
|
+
const { locale } = useConfig();
|
|
5854
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$v), props), {
|
|
5846
5855
|
children,
|
|
5847
5856
|
uploadIcon,
|
|
5848
5857
|
uploadIconSize,
|
|
@@ -5920,6 +5929,7 @@ const InternalUploader = (props, ref) => {
|
|
|
5920
5929
|
const [fileList, setFileList] = useState([]);
|
|
5921
5930
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
5922
5931
|
useEffect(() => {
|
|
5932
|
+
console.log("defaultFileList", defaultFileList);
|
|
5923
5933
|
if (defaultFileList) {
|
|
5924
5934
|
setFileList(defaultFileList);
|
|
5925
5935
|
}
|
|
@@ -5962,7 +5972,7 @@ const InternalUploader = (props, ref) => {
|
|
|
5962
5972
|
fileList2.map((item) => {
|
|
5963
5973
|
if (item.uid === fileItem.uid) {
|
|
5964
5974
|
item.status = "ready";
|
|
5965
|
-
item.message =
|
|
5975
|
+
item.message = locale.uploader.readyUpload;
|
|
5966
5976
|
}
|
|
5967
5977
|
});
|
|
5968
5978
|
return [...fileList2];
|
|
@@ -5974,7 +5984,7 @@ const InternalUploader = (props, ref) => {
|
|
|
5974
5984
|
fileList2.map((item) => {
|
|
5975
5985
|
if (item.uid === fileItem.uid) {
|
|
5976
5986
|
item.status = "uploading";
|
|
5977
|
-
item.message =
|
|
5987
|
+
item.message = locale.uploader.uploading;
|
|
5978
5988
|
}
|
|
5979
5989
|
});
|
|
5980
5990
|
return [...fileList2];
|
|
@@ -5987,7 +5997,7 @@ const InternalUploader = (props, ref) => {
|
|
|
5987
5997
|
fileList2.map((item) => {
|
|
5988
5998
|
if (item.uid === fileItem.uid) {
|
|
5989
5999
|
item.status = "success";
|
|
5990
|
-
item.message =
|
|
6000
|
+
item.message = locale.uploader.success;
|
|
5991
6001
|
}
|
|
5992
6002
|
});
|
|
5993
6003
|
return [...fileList2];
|
|
@@ -6002,7 +6012,7 @@ const InternalUploader = (props, ref) => {
|
|
|
6002
6012
|
fileList2.map((item) => {
|
|
6003
6013
|
if (item.uid === fileItem.uid) {
|
|
6004
6014
|
item.status = "error";
|
|
6005
|
-
item.message =
|
|
6015
|
+
item.message = locale.uploader.error;
|
|
6006
6016
|
}
|
|
6007
6017
|
});
|
|
6008
6018
|
return [...fileList2];
|
|
@@ -6032,7 +6042,7 @@ const InternalUploader = (props, ref) => {
|
|
|
6032
6042
|
fileItem.type = file.type;
|
|
6033
6043
|
fileItem.formData = formData;
|
|
6034
6044
|
fileItem.uid = file.lastModified + fileItem.uid;
|
|
6035
|
-
fileItem.message =
|
|
6045
|
+
fileItem.message = locale.uploader.readyUpload;
|
|
6036
6046
|
executeUpload(fileItem, index2);
|
|
6037
6047
|
if (isPreview && file.type.includes("image")) {
|
|
6038
6048
|
const reader = new FileReader();
|
|
@@ -6077,7 +6087,7 @@ const InternalUploader = (props, ref) => {
|
|
|
6077
6087
|
removeImage && removeImage(file, fileList);
|
|
6078
6088
|
setFileList([...fileList]);
|
|
6079
6089
|
} else {
|
|
6080
|
-
console.log(
|
|
6090
|
+
console.log(locale.uploader.deleteWord);
|
|
6081
6091
|
}
|
|
6082
6092
|
};
|
|
6083
6093
|
const fileChange = (event) => {
|
|
@@ -6203,9 +6213,9 @@ const InternalUploader = (props, ref) => {
|
|
|
6203
6213
|
})));
|
|
6204
6214
|
};
|
|
6205
6215
|
const Uploader = React__default.forwardRef(InternalUploader);
|
|
6206
|
-
Uploader.defaultProps = defaultProps$
|
|
6216
|
+
Uploader.defaultProps = defaultProps$v;
|
|
6207
6217
|
Uploader.displayName = "NutUploader";
|
|
6208
|
-
const defaultProps$
|
|
6218
|
+
const defaultProps$u = {
|
|
6209
6219
|
cancelTxt: "",
|
|
6210
6220
|
optionTag: "name",
|
|
6211
6221
|
optionSubTag: "subname",
|
|
@@ -6223,7 +6233,7 @@ const defaultProps$t = {
|
|
|
6223
6233
|
style: {}
|
|
6224
6234
|
};
|
|
6225
6235
|
const ActionSheet = (props) => {
|
|
6226
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
6236
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$u), props), {
|
|
6227
6237
|
cancelTxt,
|
|
6228
6238
|
optionTag,
|
|
6229
6239
|
optionSubTag,
|
|
@@ -6294,9 +6304,9 @@ const ActionSheet = (props) => {
|
|
|
6294
6304
|
onClick: () => cancelActionSheet()
|
|
6295
6305
|
}, cancelTxt)));
|
|
6296
6306
|
};
|
|
6297
|
-
ActionSheet.defaultProps = defaultProps$
|
|
6307
|
+
ActionSheet.defaultProps = defaultProps$u;
|
|
6298
6308
|
ActionSheet.displayName = "NutActionSheet";
|
|
6299
|
-
const defaultProps$
|
|
6309
|
+
const defaultProps$t = {
|
|
6300
6310
|
bottom: 20,
|
|
6301
6311
|
right: 10,
|
|
6302
6312
|
elId: "",
|
|
@@ -6318,7 +6328,7 @@ const BackTop = (props) => {
|
|
|
6318
6328
|
duration,
|
|
6319
6329
|
style,
|
|
6320
6330
|
backTopClick
|
|
6321
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
6331
|
+
} = __spreadValues(__spreadValues({}, defaultProps$t), props);
|
|
6322
6332
|
const [backTop, SetBackTop] = useState(false);
|
|
6323
6333
|
const [scrollTop, SetScrollTop] = useState(0);
|
|
6324
6334
|
let startTime = 0;
|
|
@@ -6403,7 +6413,7 @@ const BackTop = (props) => {
|
|
|
6403
6413
|
name: "top"
|
|
6404
6414
|
}));
|
|
6405
6415
|
};
|
|
6406
|
-
BackTop.defaultProps = defaultProps$
|
|
6416
|
+
BackTop.defaultProps = defaultProps$t;
|
|
6407
6417
|
BackTop.displayName = "NutBackTop";
|
|
6408
6418
|
function clamp(v2, min, max) {
|
|
6409
6419
|
return Math.max(min, Math.min(v2, max));
|
|
@@ -10805,7 +10815,7 @@ const host = createHost(primitives, {
|
|
|
10805
10815
|
}
|
|
10806
10816
|
});
|
|
10807
10817
|
const animated = host.animated;
|
|
10808
|
-
const defaultProps$
|
|
10818
|
+
const defaultProps$s = {
|
|
10809
10819
|
attract: false,
|
|
10810
10820
|
direction: void 0,
|
|
10811
10821
|
boundary: {
|
|
@@ -10817,7 +10827,7 @@ const defaultProps$r = {
|
|
|
10817
10827
|
className: ""
|
|
10818
10828
|
};
|
|
10819
10829
|
const Drag = (props) => {
|
|
10820
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
10830
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$s), props), { attract, direction, boundary, children, className, style } = _a, reset = __objRest(_a, ["attract", "direction", "boundary", "children", "className", "style"]);
|
|
10821
10831
|
const b2 = cn("drag");
|
|
10822
10832
|
const [boundaryState, setBoundaryState] = useState(boundary);
|
|
10823
10833
|
const myDrag = useRef(null);
|
|
@@ -10873,7 +10883,7 @@ const Drag = (props) => {
|
|
|
10873
10883
|
style: currstyle
|
|
10874
10884
|
}, bind()), children));
|
|
10875
10885
|
};
|
|
10876
|
-
Drag.defaultProps = defaultProps$
|
|
10886
|
+
Drag.defaultProps = defaultProps$s;
|
|
10877
10887
|
Drag.displayName = "NutDrag";
|
|
10878
10888
|
const Content = (props) => {
|
|
10879
10889
|
const { visible, title, footer, textAlign, footerDirection, children } = props;
|
|
@@ -11032,9 +11042,9 @@ function confirm(config2, renderFunc) {
|
|
|
11032
11042
|
update: update2
|
|
11033
11043
|
};
|
|
11034
11044
|
}
|
|
11035
|
-
const defaultProps$
|
|
11036
|
-
okText: "
|
|
11037
|
-
cancelText: "
|
|
11045
|
+
const defaultProps$r = {
|
|
11046
|
+
okText: "",
|
|
11047
|
+
cancelText: "",
|
|
11038
11048
|
mask: true,
|
|
11039
11049
|
closeOnClickOverlay: true,
|
|
11040
11050
|
noFooter: false,
|
|
@@ -11100,13 +11110,13 @@ const BaseDialog = (props, ref) => {
|
|
|
11100
11110
|
type: "primary",
|
|
11101
11111
|
className: "nut-dialog__footer-cancel",
|
|
11102
11112
|
onClick: () => handleCancel()
|
|
11103
|
-
}, locale.cancel
|
|
11113
|
+
}, cancelText || locale.cancel), !noOkBtn && /* @__PURE__ */ React__default.createElement(Button, {
|
|
11104
11114
|
size: "small",
|
|
11105
11115
|
type: "primary",
|
|
11106
11116
|
className: classNames("nut-dialog__footer-ok", { disabled: okBtnDisabled }),
|
|
11107
11117
|
disabled: okBtnDisabled,
|
|
11108
11118
|
onClick: () => handleOk()
|
|
11109
|
-
}, locale.confirm
|
|
11119
|
+
}, okText || locale.confirm));
|
|
11110
11120
|
return footerContent;
|
|
11111
11121
|
};
|
|
11112
11122
|
return /* @__PURE__ */ React__default.createElement(DialogWrapper, __spreadProps(__spreadValues({}, restProps), {
|
|
@@ -11129,9 +11139,9 @@ Dialog.confirm = (props) => {
|
|
|
11129
11139
|
}));
|
|
11130
11140
|
};
|
|
11131
11141
|
});
|
|
11132
|
-
Dialog.defaultProps = defaultProps$
|
|
11142
|
+
Dialog.defaultProps = defaultProps$r;
|
|
11133
11143
|
Dialog.displayName = "NutDialog";
|
|
11134
|
-
const defaultProps$
|
|
11144
|
+
const defaultProps$q = {
|
|
11135
11145
|
hasMore: true,
|
|
11136
11146
|
threshold: 200,
|
|
11137
11147
|
containerId: "",
|
|
@@ -11146,7 +11156,7 @@ const defaultProps$p = {
|
|
|
11146
11156
|
};
|
|
11147
11157
|
const Infiniteloading = (props) => {
|
|
11148
11158
|
const { locale } = useConfig();
|
|
11149
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
11159
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$q), props), {
|
|
11150
11160
|
children,
|
|
11151
11161
|
hasMore,
|
|
11152
11162
|
threshold,
|
|
@@ -11334,7 +11344,7 @@ const Infiniteloading = (props) => {
|
|
|
11334
11344
|
className: "tips"
|
|
11335
11345
|
}, locale.infiniteloading.loadMoreText || loadMoreTxt)));
|
|
11336
11346
|
};
|
|
11337
|
-
Infiniteloading.defaultProps = defaultProps$
|
|
11347
|
+
Infiniteloading.defaultProps = defaultProps$q;
|
|
11338
11348
|
Infiniteloading.displayName = "NutInfiniteloading";
|
|
11339
11349
|
class Notification extends React.PureComponent {
|
|
11340
11350
|
constructor(props) {
|
|
@@ -11491,7 +11501,7 @@ var Notify = {
|
|
|
11491
11501
|
}
|
|
11492
11502
|
}
|
|
11493
11503
|
};
|
|
11494
|
-
const defaultProps$
|
|
11504
|
+
const defaultProps$p = {
|
|
11495
11505
|
isAsync: false,
|
|
11496
11506
|
checked: false,
|
|
11497
11507
|
disable: false,
|
|
@@ -11513,7 +11523,7 @@ const Switch = (props) => {
|
|
|
11513
11523
|
change,
|
|
11514
11524
|
className,
|
|
11515
11525
|
style
|
|
11516
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
11526
|
+
} = __spreadValues(__spreadValues({}, defaultProps$p), props);
|
|
11517
11527
|
const [value, setValue] = useState(false);
|
|
11518
11528
|
const b2 = cn("switch");
|
|
11519
11529
|
useEffect(() => {
|
|
@@ -11550,10 +11560,10 @@ const Switch = (props) => {
|
|
|
11550
11560
|
className: `${b2("label")} close`
|
|
11551
11561
|
}, inactiveText))));
|
|
11552
11562
|
};
|
|
11553
|
-
Switch.defaultProps = defaultProps$
|
|
11563
|
+
Switch.defaultProps = defaultProps$p;
|
|
11554
11564
|
Switch.displayName = "NutSwitch";
|
|
11555
11565
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
11556
|
-
const defaultProps$
|
|
11566
|
+
const defaultProps$o = {
|
|
11557
11567
|
strokeWidth: 5,
|
|
11558
11568
|
radius: 50,
|
|
11559
11569
|
strokeLinecap: "round",
|
|
@@ -11563,7 +11573,7 @@ const defaultProps$n = {
|
|
|
11563
11573
|
};
|
|
11564
11574
|
const CircleProgress = (props) => {
|
|
11565
11575
|
var _b;
|
|
11566
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
11576
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$o), props), {
|
|
11567
11577
|
children,
|
|
11568
11578
|
progress,
|
|
11569
11579
|
className,
|
|
@@ -11665,9 +11675,9 @@ const CircleProgress = (props) => {
|
|
|
11665
11675
|
className: "nut-circleprogress-text"
|
|
11666
11676
|
}, children ? children : /* @__PURE__ */ React__default.createElement("div", null, progress, "%")));
|
|
11667
11677
|
};
|
|
11668
|
-
CircleProgress.defaultProps = defaultProps$
|
|
11678
|
+
CircleProgress.defaultProps = defaultProps$o;
|
|
11669
11679
|
CircleProgress.displayName = "NutCircleProgress";
|
|
11670
|
-
const defaultProps$
|
|
11680
|
+
const defaultProps$n = {
|
|
11671
11681
|
direction: "across",
|
|
11672
11682
|
list: [],
|
|
11673
11683
|
standTime: 1e3,
|
|
@@ -11705,7 +11715,7 @@ const NoticeBar = (props) => {
|
|
|
11705
11715
|
rightIcon,
|
|
11706
11716
|
close,
|
|
11707
11717
|
click
|
|
11708
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
11718
|
+
} = __spreadValues(__spreadValues({}, defaultProps$n), props);
|
|
11709
11719
|
const wrap = useRef(null);
|
|
11710
11720
|
const content = useRef(null);
|
|
11711
11721
|
const [showNoticeBar, SetShowNoticeBar] = useState(true);
|
|
@@ -11918,16 +11928,16 @@ const NoticeBar = (props) => {
|
|
|
11918
11928
|
size: "11px"
|
|
11919
11929
|
}) : null))) : null);
|
|
11920
11930
|
};
|
|
11921
|
-
NoticeBar.defaultProps = defaultProps$
|
|
11931
|
+
NoticeBar.defaultProps = defaultProps$n;
|
|
11922
11932
|
NoticeBar.displayName = "NutNoticeBar";
|
|
11923
11933
|
const DataContext$1 = createContext({});
|
|
11924
|
-
const defaultProps$
|
|
11934
|
+
const defaultProps$m = {
|
|
11925
11935
|
current: 0,
|
|
11926
11936
|
direction: "horizontal",
|
|
11927
11937
|
progressDot: false
|
|
11928
11938
|
};
|
|
11929
11939
|
const Steps = (props) => {
|
|
11930
|
-
const propSteps = __spreadValues(__spreadValues({}, defaultProps$
|
|
11940
|
+
const propSteps = __spreadValues(__spreadValues({}, defaultProps$m), props);
|
|
11931
11941
|
const _a = propSteps, { children, current, direction, className, progressDot, clickStep } = _a, restProps = __objRest(_a, ["children", "current", "direction", "className", "progressDot", "clickStep"]);
|
|
11932
11942
|
const parentSteps = {
|
|
11933
11943
|
propSteps
|
|
@@ -11943,9 +11953,9 @@ const Steps = (props) => {
|
|
|
11943
11953
|
className: classes
|
|
11944
11954
|
}, restProps), children));
|
|
11945
11955
|
};
|
|
11946
|
-
Steps.defaultProps = defaultProps$
|
|
11956
|
+
Steps.defaultProps = defaultProps$m;
|
|
11947
11957
|
Steps.displayName = "NutSteps";
|
|
11948
|
-
const defaultProps$
|
|
11958
|
+
const defaultProps$l = {
|
|
11949
11959
|
title: "",
|
|
11950
11960
|
content: "",
|
|
11951
11961
|
activeIndex: 0,
|
|
@@ -11954,7 +11964,7 @@ const defaultProps$k = {
|
|
|
11954
11964
|
size: "12px"
|
|
11955
11965
|
};
|
|
11956
11966
|
const Step = (props) => {
|
|
11957
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
11967
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$l), props), {
|
|
11958
11968
|
children,
|
|
11959
11969
|
title,
|
|
11960
11970
|
content,
|
|
@@ -12018,10 +12028,10 @@ const Step = (props) => {
|
|
|
12018
12028
|
className: "nut-step-content"
|
|
12019
12029
|
}, renderContent())));
|
|
12020
12030
|
};
|
|
12021
|
-
Step.defaultProps = defaultProps$
|
|
12031
|
+
Step.defaultProps = defaultProps$l;
|
|
12022
12032
|
Step.displayName = "NutStep";
|
|
12023
12033
|
const DataContext = createContext({});
|
|
12024
|
-
const defaultProps$
|
|
12034
|
+
const defaultProps$k = {
|
|
12025
12035
|
width: typeof window === "object" ? window.innerWidth : 375,
|
|
12026
12036
|
height: 0,
|
|
12027
12037
|
duration: 500,
|
|
@@ -12038,7 +12048,7 @@ const defaultProps$j = {
|
|
|
12038
12048
|
};
|
|
12039
12049
|
const DISTANCE = 5;
|
|
12040
12050
|
const Swiper = React__default.forwardRef((props, ref) => {
|
|
12041
|
-
const propSwiper = __spreadValues(__spreadValues({}, defaultProps$
|
|
12051
|
+
const propSwiper = __spreadValues(__spreadValues({}, defaultProps$k), props);
|
|
12042
12052
|
const _a = propSwiper, {
|
|
12043
12053
|
children,
|
|
12044
12054
|
direction,
|
|
@@ -12076,13 +12086,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
12076
12086
|
offset: 0,
|
|
12077
12087
|
size: 0
|
|
12078
12088
|
});
|
|
12079
|
-
const childsRefs = [];
|
|
12080
12089
|
const isVertical = direction === "vertical";
|
|
12081
12090
|
const [rect, setRect] = useState(null);
|
|
12082
12091
|
let [active, setActive] = useState(0);
|
|
12083
12092
|
const [width, setWidth] = useState(0);
|
|
12084
12093
|
const [height, setHeight] = useState(0);
|
|
12085
12094
|
const [offset, setOffset] = useState(0);
|
|
12095
|
+
const [childOffset, setChildOffset] = useState([]);
|
|
12086
12096
|
const [ready, setReady] = useState(false);
|
|
12087
12097
|
let size = isVertical ? height : width;
|
|
12088
12098
|
const [touch, setTouch] = useState({
|
|
@@ -12096,22 +12106,20 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
12096
12106
|
delta: 0,
|
|
12097
12107
|
touchTime: 0
|
|
12098
12108
|
});
|
|
12099
|
-
const
|
|
12100
|
-
|
|
12101
|
-
|
|
12102
|
-
|
|
12103
|
-
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
const getChildren = () => {
|
|
12107
|
-
const childs2 = [];
|
|
12108
|
-
React__default.Children.toArray(children).forEach((child, index2) => {
|
|
12109
|
-
if (child.type && child.type.displayName === "NutSwiperItem") {
|
|
12110
|
-
childs2.push(React__default.cloneElement(child, { ref: childsRefs[index2], key: `item_${index2}` }));
|
|
12111
|
-
}
|
|
12109
|
+
const { childs, childCount } = useMemo(() => {
|
|
12110
|
+
let childCount2 = 0;
|
|
12111
|
+
const childs2 = React__default.Children.map(props.children, (child) => {
|
|
12112
|
+
if (!React__default.isValidElement(child))
|
|
12113
|
+
return null;
|
|
12114
|
+
childCount2++;
|
|
12115
|
+
return child;
|
|
12112
12116
|
});
|
|
12113
|
-
return
|
|
12114
|
-
|
|
12117
|
+
return {
|
|
12118
|
+
childs: childs2,
|
|
12119
|
+
childCount: childCount2
|
|
12120
|
+
};
|
|
12121
|
+
}, [props.children]);
|
|
12122
|
+
let trackSize = childCount * Number(size);
|
|
12115
12123
|
const parent = {
|
|
12116
12124
|
propSwiper,
|
|
12117
12125
|
size
|
|
@@ -12198,12 +12206,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
12198
12206
|
if (props.loop) {
|
|
12199
12207
|
if (Array.isArray(children) && children[0] && targetOffset !== minOffset) {
|
|
12200
12208
|
const rightBound = targetOffset < minOffset;
|
|
12201
|
-
|
|
12209
|
+
childOffset[0] = rightBound ? trackSize : 0;
|
|
12202
12210
|
}
|
|
12203
12211
|
if (Array.isArray(children) && children[childCount - 1] && targetOffset !== 0) {
|
|
12204
12212
|
const leftBound = targetOffset > 0;
|
|
12205
|
-
|
|
12213
|
+
childOffset[childCount - 1] = leftBound ? -trackSize : 0;
|
|
12206
12214
|
}
|
|
12215
|
+
setChildOffset(childOffset);
|
|
12207
12216
|
}
|
|
12208
12217
|
if (isEmit && active !== targetActive) {
|
|
12209
12218
|
props.onChange && props.onChange((targetActive + childCount) % childCount);
|
|
@@ -12371,7 +12380,8 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
12371
12380
|
};
|
|
12372
12381
|
}, [ready]);
|
|
12373
12382
|
useEffect(() => {
|
|
12374
|
-
|
|
12383
|
+
stopAutoPlay();
|
|
12384
|
+
autoplay();
|
|
12375
12385
|
}, [children]);
|
|
12376
12386
|
useEffect(() => {
|
|
12377
12387
|
init();
|
|
@@ -12387,6 +12397,19 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
12387
12397
|
target.removeEventListener("touchend", onTouchEnd, false);
|
|
12388
12398
|
};
|
|
12389
12399
|
});
|
|
12400
|
+
const style = (index2) => {
|
|
12401
|
+
const style2 = {};
|
|
12402
|
+
const _direction = propSwiper.direction || direction;
|
|
12403
|
+
const _size = size;
|
|
12404
|
+
if (_size) {
|
|
12405
|
+
style2[_direction === "horizontal" ? "width" : "height"] = `${_size}px`;
|
|
12406
|
+
}
|
|
12407
|
+
let offset2 = childOffset[index2];
|
|
12408
|
+
if (offset2) {
|
|
12409
|
+
style2.transform = `translate3D${_direction === "horizontal" ? `(${offset2}px,0,0)` : `(0,${offset2}px,0)`}`;
|
|
12410
|
+
}
|
|
12411
|
+
return style2;
|
|
12412
|
+
};
|
|
12390
12413
|
React__default.useImperativeHandle(ref, () => ({
|
|
12391
12414
|
to: to2,
|
|
12392
12415
|
next,
|
|
@@ -12400,12 +12423,18 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
12400
12423
|
}, rest), /* @__PURE__ */ React__default.createElement("div", {
|
|
12401
12424
|
className: contentClass,
|
|
12402
12425
|
ref: innerRef
|
|
12403
|
-
}, childs
|
|
12426
|
+
}, React__default.Children.map(childs, (child, index2) => {
|
|
12427
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
12428
|
+
className: b2("item-wrapper"),
|
|
12429
|
+
style: style(index2),
|
|
12430
|
+
key: index2
|
|
12431
|
+
}, child);
|
|
12432
|
+
})), propSwiper.paginationVisible && !("pageContent" in propSwiper) ? /* @__PURE__ */ React__default.createElement("div", {
|
|
12404
12433
|
className: classNames({
|
|
12405
12434
|
[`${b2("pagination")}`]: true,
|
|
12406
12435
|
[`${b2("pagination-vertical")}`]: isVertical
|
|
12407
12436
|
})
|
|
12408
|
-
},
|
|
12437
|
+
}, React__default.Children.map(childs, (item, index2) => {
|
|
12409
12438
|
return /* @__PURE__ */ React__default.createElement("i", {
|
|
12410
12439
|
style: {
|
|
12411
12440
|
backgroundColor: (active + childCount) % childCount === index2 ? propSwiper.paginationColor : "#ddd"
|
|
@@ -12414,13 +12443,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
12414
12443
|
});
|
|
12415
12444
|
})) : /* @__PURE__ */ React__default.createElement("div", null, pageContent)));
|
|
12416
12445
|
});
|
|
12417
|
-
Swiper.defaultProps = defaultProps$
|
|
12446
|
+
Swiper.defaultProps = defaultProps$k;
|
|
12418
12447
|
Swiper.displayName = "NutSwiper";
|
|
12419
|
-
const defaultProps$
|
|
12448
|
+
const defaultProps$j = {
|
|
12420
12449
|
direction: "horizontal"
|
|
12421
12450
|
};
|
|
12422
12451
|
const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
12423
|
-
const _props = __spreadValues(__spreadValues({}, defaultProps$
|
|
12452
|
+
const _props = __spreadValues(__spreadValues({}, defaultProps$j), props);
|
|
12424
12453
|
const { children, direction, size } = _props;
|
|
12425
12454
|
const parent = useContext$1(DataContext);
|
|
12426
12455
|
const [offset, setOffset] = useState(0);
|
|
@@ -12438,9 +12467,6 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
|
12438
12467
|
if (_size) {
|
|
12439
12468
|
style2[_direction === "horizontal" ? "width" : "height"] = `${_size}px`;
|
|
12440
12469
|
}
|
|
12441
|
-
if (offset) {
|
|
12442
|
-
style2.transform = `translate3D${_direction === "horizontal" ? `(${offset}px,0,0)` : `(0,${offset}px,0)`}`;
|
|
12443
|
-
}
|
|
12444
12470
|
return style2;
|
|
12445
12471
|
};
|
|
12446
12472
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -12448,10 +12474,10 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
|
12448
12474
|
style: style()
|
|
12449
12475
|
}, children);
|
|
12450
12476
|
});
|
|
12451
|
-
SwiperItem.defaultProps = defaultProps$
|
|
12477
|
+
SwiperItem.defaultProps = defaultProps$j;
|
|
12452
12478
|
SwiperItem.displayName = "NutSwiperItem";
|
|
12453
12479
|
const AvatarContext = createContext({});
|
|
12454
|
-
const defaultProps$
|
|
12480
|
+
const defaultProps$i = {
|
|
12455
12481
|
size: "",
|
|
12456
12482
|
icon: "",
|
|
12457
12483
|
bgColor: "#eee",
|
|
@@ -12462,7 +12488,7 @@ const defaultProps$h = {
|
|
|
12462
12488
|
};
|
|
12463
12489
|
const Avatar = (props) => {
|
|
12464
12490
|
var _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
12465
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
12491
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$i), props), {
|
|
12466
12492
|
children,
|
|
12467
12493
|
prefixCls,
|
|
12468
12494
|
size,
|
|
@@ -12567,9 +12593,9 @@ const Avatar = (props) => {
|
|
|
12567
12593
|
className: "text"
|
|
12568
12594
|
}, ((_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)}`)));
|
|
12569
12595
|
};
|
|
12570
|
-
Avatar.defaultProps = defaultProps$
|
|
12596
|
+
Avatar.defaultProps = defaultProps$i;
|
|
12571
12597
|
Avatar.displayName = "NutAvatar";
|
|
12572
|
-
const defaultProps$
|
|
12598
|
+
const defaultProps$h = {
|
|
12573
12599
|
maxContent: "",
|
|
12574
12600
|
maxCount: "",
|
|
12575
12601
|
maxBgColor: "#eee",
|
|
@@ -12581,7 +12607,7 @@ const defaultProps$g = {
|
|
|
12581
12607
|
};
|
|
12582
12608
|
const AvatarGroup = (props) => {
|
|
12583
12609
|
useConfig();
|
|
12584
|
-
const propAvatarGroup = __spreadValues(__spreadValues({}, defaultProps$
|
|
12610
|
+
const propAvatarGroup = __spreadValues(__spreadValues({}, defaultProps$h), props);
|
|
12585
12611
|
const { className, style, children } = propAvatarGroup;
|
|
12586
12612
|
const avatarGroupRef = useRef(null);
|
|
12587
12613
|
const b2 = cn("avatar-group");
|
|
@@ -12598,9 +12624,9 @@ const AvatarGroup = (props) => {
|
|
|
12598
12624
|
ref: avatarGroupRef
|
|
12599
12625
|
}, children));
|
|
12600
12626
|
};
|
|
12601
|
-
AvatarGroup.defaultProps = defaultProps$
|
|
12627
|
+
AvatarGroup.defaultProps = defaultProps$h;
|
|
12602
12628
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
12603
|
-
const defaultProps$
|
|
12629
|
+
const defaultProps$g = {
|
|
12604
12630
|
price: 0,
|
|
12605
12631
|
needSymbol: true,
|
|
12606
12632
|
symbol: "¥",
|
|
@@ -12609,7 +12635,7 @@ const defaultProps$f = {
|
|
|
12609
12635
|
className: ""
|
|
12610
12636
|
};
|
|
12611
12637
|
const Price = (props) => {
|
|
12612
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
12638
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$g), props), { price, needSymbol, symbol, decimalDigits, thousands, className } = _a, rest = __objRest(_a, ["price", "needSymbol", "symbol", "decimalDigits", "thousands", "className"]);
|
|
12613
12639
|
const b2 = cn("price");
|
|
12614
12640
|
const showSymbol = () => {
|
|
12615
12641
|
return { __html: (needSymbol ? symbol : "") || "" };
|
|
@@ -12659,9 +12685,9 @@ const Price = (props) => {
|
|
|
12659
12685
|
className: `${b2("small")}`
|
|
12660
12686
|
}, formatDecimal(price)));
|
|
12661
12687
|
};
|
|
12662
|
-
Price.defaultProps = defaultProps$
|
|
12688
|
+
Price.defaultProps = defaultProps$g;
|
|
12663
12689
|
Price.displayName = "NutPrice";
|
|
12664
|
-
const defaultProps$
|
|
12690
|
+
const defaultProps$f = {
|
|
12665
12691
|
value: "",
|
|
12666
12692
|
dot: false,
|
|
12667
12693
|
max: 1e4,
|
|
@@ -12672,7 +12698,7 @@ const defaultProps$e = {
|
|
|
12672
12698
|
icons: ""
|
|
12673
12699
|
};
|
|
12674
12700
|
const Badge = (props) => {
|
|
12675
|
-
const { children, dot, top, right, zIndex, color, icons } = __spreadValues(__spreadValues({}, defaultProps$
|
|
12701
|
+
const { children, dot, top, right, zIndex, color, icons } = __spreadValues(__spreadValues({}, defaultProps$f), props);
|
|
12676
12702
|
const content = () => {
|
|
12677
12703
|
if (dot)
|
|
12678
12704
|
return;
|
|
@@ -12705,9 +12731,9 @@ const Badge = (props) => {
|
|
|
12705
12731
|
style: getStyle()
|
|
12706
12732
|
}, content()));
|
|
12707
12733
|
};
|
|
12708
|
-
Badge.defaultProps = defaultProps$
|
|
12734
|
+
Badge.defaultProps = defaultProps$f;
|
|
12709
12735
|
Badge.displayName = "NutBadge";
|
|
12710
|
-
const defaultProps$
|
|
12736
|
+
const defaultProps$e = {
|
|
12711
12737
|
type: "default",
|
|
12712
12738
|
color: "",
|
|
12713
12739
|
textColor: "",
|
|
@@ -12733,7 +12759,7 @@ const Tag = (props) => {
|
|
|
12733
12759
|
textColor,
|
|
12734
12760
|
isShow,
|
|
12735
12761
|
onClick
|
|
12736
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
12762
|
+
} = __spreadValues(__spreadValues({}, defaultProps$e), props);
|
|
12737
12763
|
const [btnName, setBtnName] = useState("");
|
|
12738
12764
|
useEffect(() => {
|
|
12739
12765
|
setBtnName(classes());
|
|
@@ -12786,7 +12812,7 @@ const Tag = (props) => {
|
|
|
12786
12812
|
className: "text"
|
|
12787
12813
|
}, children)));
|
|
12788
12814
|
};
|
|
12789
|
-
Tag.defaultProps = defaultProps$
|
|
12815
|
+
Tag.defaultProps = defaultProps$e;
|
|
12790
12816
|
Tag.displayName = "NutTag";
|
|
12791
12817
|
function fillRef(ref, node) {
|
|
12792
12818
|
if (typeof ref === "function") {
|
|
@@ -12843,7 +12869,7 @@ const getEleAttr = (ele) => {
|
|
|
12843
12869
|
}
|
|
12844
12870
|
return null;
|
|
12845
12871
|
};
|
|
12846
|
-
const defaultProps$
|
|
12872
|
+
const defaultProps$d = {
|
|
12847
12873
|
list: [],
|
|
12848
12874
|
theme: "light",
|
|
12849
12875
|
location: "bottom",
|
|
@@ -12853,7 +12879,7 @@ const defaultProps$c = {
|
|
|
12853
12879
|
}
|
|
12854
12880
|
};
|
|
12855
12881
|
const Popover = (props) => {
|
|
12856
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
12882
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$d), props), { children, list, theme, location: location2, visible, className, style, onClick } = _a, reset = __objRest(_a, ["children", "list", "theme", "location", "visible", "className", "style", "onClick"]);
|
|
12857
12883
|
const goodItem = useRef(null);
|
|
12858
12884
|
const aa = goodItem.current && findDOMNode(goodItem.current);
|
|
12859
12885
|
setTimeout(() => {
|
|
@@ -12959,9 +12985,9 @@ const Popover = (props) => {
|
|
|
12959
12985
|
}, item.name));
|
|
12960
12986
|
})) : null)));
|
|
12961
12987
|
};
|
|
12962
|
-
Popover.defaultProps = defaultProps$
|
|
12988
|
+
Popover.defaultProps = defaultProps$d;
|
|
12963
12989
|
Popover.displayName = "NutPopover";
|
|
12964
|
-
const defaultProps$
|
|
12990
|
+
const defaultProps$c = {
|
|
12965
12991
|
width: "100px",
|
|
12966
12992
|
height: "100px",
|
|
12967
12993
|
row: 1,
|
|
@@ -12974,7 +13000,7 @@ const defaultProps$b = {
|
|
|
12974
13000
|
avatarShape: "round"
|
|
12975
13001
|
};
|
|
12976
13002
|
const Skeleton = (props) => {
|
|
12977
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
13003
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$c), props), {
|
|
12978
13004
|
className,
|
|
12979
13005
|
width,
|
|
12980
13006
|
height,
|
|
@@ -13052,9 +13078,9 @@ const Skeleton = (props) => {
|
|
|
13052
13078
|
});
|
|
13053
13079
|
})))));
|
|
13054
13080
|
};
|
|
13055
|
-
Skeleton.defaultProps = defaultProps$
|
|
13081
|
+
Skeleton.defaultProps = defaultProps$c;
|
|
13056
13082
|
Skeleton.displayName = "NutSkeleton";
|
|
13057
|
-
const defaultProps$
|
|
13083
|
+
const defaultProps$b = {
|
|
13058
13084
|
showPlainText: false,
|
|
13059
13085
|
showDays: false,
|
|
13060
13086
|
paused: false,
|
|
@@ -13063,7 +13089,7 @@ const defaultProps$a = {
|
|
|
13063
13089
|
};
|
|
13064
13090
|
const CountDown = (props) => {
|
|
13065
13091
|
const { locale } = useConfig();
|
|
13066
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
13092
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$b), props), {
|
|
13067
13093
|
showPlainText,
|
|
13068
13094
|
showDays,
|
|
13069
13095
|
paused,
|
|
@@ -13235,9 +13261,9 @@ const CountDown = (props) => {
|
|
|
13235
13261
|
className: b2("block")
|
|
13236
13262
|
}, resttime.s))));
|
|
13237
13263
|
};
|
|
13238
|
-
CountDown.defaultProps = defaultProps$
|
|
13264
|
+
CountDown.defaultProps = defaultProps$b;
|
|
13239
13265
|
CountDown.displayName = "NutCountDown";
|
|
13240
|
-
const defaultProps$
|
|
13266
|
+
const defaultProps$a = {
|
|
13241
13267
|
activeName: ["0"],
|
|
13242
13268
|
accordion: false,
|
|
13243
13269
|
icon: "",
|
|
@@ -13249,7 +13275,7 @@ function areEqual(prevProps, nextProps) {
|
|
|
13249
13275
|
return JSON.stringify(prevProps.activeName) === JSON.stringify(nextProps.activeName);
|
|
13250
13276
|
}
|
|
13251
13277
|
const Collapse = memo((props) => {
|
|
13252
|
-
const { children, activeName, accordion, icon, rotate, iconSize, iconColor, change } = __spreadValues(__spreadValues({}, defaultProps$
|
|
13278
|
+
const { children, activeName, accordion, icon, rotate, iconSize, iconColor, change } = __spreadValues(__spreadValues({}, defaultProps$a), props);
|
|
13253
13279
|
const childrenDom = React__default.Children.toArray(children);
|
|
13254
13280
|
const [defaultOpenIndex, setDefaultOpenIndex] = useState([]);
|
|
13255
13281
|
const handleActiveName = () => {
|
|
@@ -13302,9 +13328,9 @@ const Collapse = memo((props) => {
|
|
|
13302
13328
|
});
|
|
13303
13329
|
}));
|
|
13304
13330
|
}, areEqual);
|
|
13305
|
-
Collapse.defaultProps = defaultProps$
|
|
13331
|
+
Collapse.defaultProps = defaultProps$a;
|
|
13306
13332
|
Collapse.displayName = "NutCollapse";
|
|
13307
|
-
const defaultProps$
|
|
13333
|
+
const defaultProps$9 = {
|
|
13308
13334
|
title: "",
|
|
13309
13335
|
name: "",
|
|
13310
13336
|
isOpen: false,
|
|
@@ -13336,7 +13362,7 @@ const CollapseItem = (props) => {
|
|
|
13336
13362
|
titleIconSize,
|
|
13337
13363
|
iconSize,
|
|
13338
13364
|
iconColor
|
|
13339
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
13365
|
+
} = __spreadValues(__spreadValues({}, defaultProps$9), props);
|
|
13340
13366
|
const [domHeight, setDomHeight] = useState(-1);
|
|
13341
13367
|
const [currHeight, setCurrHeight] = useState("auto");
|
|
13342
13368
|
const [update2, setUpdate] = useState(false);
|
|
@@ -13402,9 +13428,9 @@ const CollapseItem = (props) => {
|
|
|
13402
13428
|
className: colBem("content-text")
|
|
13403
13429
|
}, children)));
|
|
13404
13430
|
};
|
|
13405
|
-
CollapseItem.defaultProps = defaultProps$
|
|
13431
|
+
CollapseItem.defaultProps = defaultProps$9;
|
|
13406
13432
|
CollapseItem.displayName = "NutCollapseItem";
|
|
13407
|
-
const defaultProps$
|
|
13433
|
+
const defaultProps$8 = {
|
|
13408
13434
|
maxLen: 0,
|
|
13409
13435
|
endNumber: "",
|
|
13410
13436
|
delaySpeed: 300,
|
|
@@ -13413,7 +13439,7 @@ const defaultProps$7 = {
|
|
|
13413
13439
|
className: ""
|
|
13414
13440
|
};
|
|
13415
13441
|
const CountUp = (props) => {
|
|
13416
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
13442
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$8), props), { maxLen, endNumber, delaySpeed, easeSpeed, className, thousands } = _a, reset = __objRest(_a, ["maxLen", "endNumber", "delaySpeed", "easeSpeed", "className", "thousands"]);
|
|
13417
13443
|
const b2 = cn("countup");
|
|
13418
13444
|
const countupRef = useRef(null);
|
|
13419
13445
|
const timerRef = useRef(0);
|
|
@@ -13477,9 +13503,9 @@ const CountUp = (props) => {
|
|
|
13477
13503
|
}, item));
|
|
13478
13504
|
})));
|
|
13479
13505
|
};
|
|
13480
|
-
CountUp.defaultProps = defaultProps$
|
|
13506
|
+
CountUp.defaultProps = defaultProps$8;
|
|
13481
13507
|
CountUp.displayName = "NutCountUp";
|
|
13482
|
-
const defaultProps$
|
|
13508
|
+
const defaultProps$7 = {};
|
|
13483
13509
|
class AnimatingNumbers extends Component {
|
|
13484
13510
|
constructor(props) {
|
|
13485
13511
|
super(props);
|
|
@@ -13491,10 +13517,63 @@ class AnimatingNumbers extends Component {
|
|
|
13491
13517
|
});
|
|
13492
13518
|
}
|
|
13493
13519
|
}
|
|
13494
|
-
__publicField(AnimatingNumbers, "defaultProps", defaultProps$
|
|
13520
|
+
__publicField(AnimatingNumbers, "defaultProps", defaultProps$7);
|
|
13495
13521
|
__publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
|
|
13496
13522
|
__publicField(AnimatingNumbers, "CountUp", CountUp);
|
|
13497
13523
|
AnimatingNumbers.CountUp = CountUp;
|
|
13524
|
+
const defaultStatus = {
|
|
13525
|
+
empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
|
|
13526
|
+
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
13527
|
+
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
13528
|
+
};
|
|
13529
|
+
const defaultProps$6 = {
|
|
13530
|
+
description: "\u65E0\u5185\u5BB9",
|
|
13531
|
+
image: "empty",
|
|
13532
|
+
imageSize: "",
|
|
13533
|
+
className: ""
|
|
13534
|
+
};
|
|
13535
|
+
const Empty = (props) => {
|
|
13536
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$6), props), { image, imageSize, description, children, className } = _a, rest = __objRest(_a, ["image", "imageSize", "description", "children", "className"]);
|
|
13537
|
+
const [imgStyle, setImgStyle] = useState({});
|
|
13538
|
+
const b2 = cn("empty");
|
|
13539
|
+
let imageNode = image;
|
|
13540
|
+
if (typeof image === "string") {
|
|
13541
|
+
const isHttpUrl = image.startsWith("https://") || image.startsWith("http://") || image.startsWith("//");
|
|
13542
|
+
const imageUrl = isHttpUrl ? image : defaultStatus[image];
|
|
13543
|
+
imageNode = /* @__PURE__ */ React__default.createElement("img", {
|
|
13544
|
+
className: "img",
|
|
13545
|
+
src: imageUrl,
|
|
13546
|
+
alt: "empty"
|
|
13547
|
+
});
|
|
13548
|
+
}
|
|
13549
|
+
useEffect(() => {
|
|
13550
|
+
setImgStyle(() => {
|
|
13551
|
+
if (!imageSize) {
|
|
13552
|
+
return {};
|
|
13553
|
+
}
|
|
13554
|
+
if (typeof imageSize === "number") {
|
|
13555
|
+
return {
|
|
13556
|
+
width: `${imageSize}px`,
|
|
13557
|
+
height: `${imageSize}px`
|
|
13558
|
+
};
|
|
13559
|
+
}
|
|
13560
|
+
return {
|
|
13561
|
+
width: imageSize,
|
|
13562
|
+
height: imageSize
|
|
13563
|
+
};
|
|
13564
|
+
});
|
|
13565
|
+
}, [imageSize]);
|
|
13566
|
+
return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
|
|
13567
|
+
className: `${b2()} ${className}`
|
|
13568
|
+
}, rest), /* @__PURE__ */ React__default.createElement("div", {
|
|
13569
|
+
className: b2("image"),
|
|
13570
|
+
style: imgStyle
|
|
13571
|
+
}, imageNode), typeof description === "string" ? /* @__PURE__ */ React__default.createElement("div", {
|
|
13572
|
+
className: b2("description")
|
|
13573
|
+
}, description) : { description }, children);
|
|
13574
|
+
};
|
|
13575
|
+
Empty.defaultProps = defaultProps$6;
|
|
13576
|
+
Empty.displayName = "NutEmpty";
|
|
13498
13577
|
const defaultProps$5 = {
|
|
13499
13578
|
type: "custom",
|
|
13500
13579
|
existAddress: [],
|
|
@@ -13597,7 +13676,29 @@ const defaultProps$4 = {
|
|
|
13597
13676
|
};
|
|
13598
13677
|
const CustomRender = (props) => {
|
|
13599
13678
|
const { locale } = useConfig();
|
|
13600
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$4), props), {
|
|
13679
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$4), props), {
|
|
13680
|
+
children,
|
|
13681
|
+
type,
|
|
13682
|
+
height,
|
|
13683
|
+
province,
|
|
13684
|
+
city,
|
|
13685
|
+
country,
|
|
13686
|
+
town,
|
|
13687
|
+
onNextArea,
|
|
13688
|
+
onTabClick,
|
|
13689
|
+
onClose
|
|
13690
|
+
} = _a, rest = __objRest(_a, [
|
|
13691
|
+
"children",
|
|
13692
|
+
"type",
|
|
13693
|
+
"height",
|
|
13694
|
+
"province",
|
|
13695
|
+
"city",
|
|
13696
|
+
"country",
|
|
13697
|
+
"town",
|
|
13698
|
+
"onNextArea",
|
|
13699
|
+
"onTabClick",
|
|
13700
|
+
"onClose"
|
|
13701
|
+
]);
|
|
13601
13702
|
const b2 = cn("address");
|
|
13602
13703
|
const [privateType] = useState(type);
|
|
13603
13704
|
const [tabIndex, setTabIndex] = useState(0);
|
|
@@ -13700,21 +13801,26 @@ const CustomRender = (props) => {
|
|
|
13700
13801
|
[tabName[i + 1]]: {}
|
|
13701
13802
|
});
|
|
13702
13803
|
}
|
|
13703
|
-
if (tabIndex <
|
|
13704
|
-
|
|
13705
|
-
|
|
13706
|
-
|
|
13804
|
+
if (tabIndex < 4) {
|
|
13805
|
+
if (tabIndex === 3) {
|
|
13806
|
+
calBack.next = "";
|
|
13807
|
+
} else {
|
|
13808
|
+
setTabIndex(() => tabIndex + 1);
|
|
13809
|
+
lineAnimation(tabIndex + 1);
|
|
13810
|
+
calBack.next = tabName[tabIndex + 1];
|
|
13811
|
+
}
|
|
13707
13812
|
calBack.value = item;
|
|
13708
13813
|
onNextArea && onNextArea(calBack);
|
|
13709
13814
|
} else {
|
|
13710
13815
|
onClose && onClose();
|
|
13711
13816
|
}
|
|
13712
13817
|
};
|
|
13713
|
-
const changeRegionTab = (item, index2) => {
|
|
13818
|
+
const changeRegionTab = (item, index2, key) => {
|
|
13714
13819
|
if (getTabName(item, index2)) {
|
|
13715
13820
|
setTabIndex(index2);
|
|
13716
13821
|
lineAnimation(index2);
|
|
13717
13822
|
}
|
|
13823
|
+
onTabClick && onTabClick(key);
|
|
13718
13824
|
};
|
|
13719
13825
|
const handleElevatorItem = (key, item) => {
|
|
13720
13826
|
nextAreaList(item);
|
|
@@ -13752,8 +13858,8 @@ const CustomRender = (props) => {
|
|
|
13752
13858
|
className: `${b2("tab-item")} ${index2 === tabIndex ? "active" : ""}`,
|
|
13753
13859
|
key: index2,
|
|
13754
13860
|
ref: mapRef[key],
|
|
13755
|
-
onClick: () => changeRegionTab(selectedRegion[key], index2)
|
|
13756
|
-
}, /* @__PURE__ */ React__default.createElement("div", null, getTabName(selectedRegion[key], index2)));
|
|
13861
|
+
onClick: () => changeRegionTab(selectedRegion[key], index2, key)
|
|
13862
|
+
}, index2 <= tabIndex && /* @__PURE__ */ React__default.createElement("div", null, getTabName(selectedRegion[key], index2)));
|
|
13757
13863
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
13758
13864
|
className: b2("tab-line"),
|
|
13759
13865
|
ref: regionLine,
|
|
@@ -13824,6 +13930,7 @@ const Address = (props) => {
|
|
|
13824
13930
|
onClose,
|
|
13825
13931
|
closeMask,
|
|
13826
13932
|
switchModule,
|
|
13933
|
+
onTabChecked,
|
|
13827
13934
|
style,
|
|
13828
13935
|
className
|
|
13829
13936
|
} = _a, rest = __objRest(_a, [
|
|
@@ -13849,6 +13956,7 @@ const Address = (props) => {
|
|
|
13849
13956
|
"onClose",
|
|
13850
13957
|
"closeMask",
|
|
13851
13958
|
"switchModule",
|
|
13959
|
+
"onTabChecked",
|
|
13852
13960
|
"style",
|
|
13853
13961
|
"className"
|
|
13854
13962
|
]);
|
|
@@ -13979,6 +14087,9 @@ const Address = (props) => {
|
|
|
13979
14087
|
onNextArea: (cal) => {
|
|
13980
14088
|
nextAreaList && nextAreaList(cal);
|
|
13981
14089
|
},
|
|
14090
|
+
onTabClick: (type2) => {
|
|
14091
|
+
onTabChecked && onTabChecked(type2);
|
|
14092
|
+
},
|
|
13982
14093
|
onClose: handClose
|
|
13983
14094
|
}), privateType === "exist" && /* @__PURE__ */ React__default.createElement(ExistRender, {
|
|
13984
14095
|
type: privateType,
|
|
@@ -14024,7 +14135,7 @@ const InternalBarrage = (props, ref) => {
|
|
|
14024
14135
|
return () => {
|
|
14025
14136
|
clearInterval(timer.current);
|
|
14026
14137
|
};
|
|
14027
|
-
}, []);
|
|
14138
|
+
}, [barrageList]);
|
|
14028
14139
|
const run = () => {
|
|
14029
14140
|
clearInterval(timer.current);
|
|
14030
14141
|
timer.current = setInterval(() => {
|
|
@@ -14245,4 +14356,4 @@ const Card = (props) => {
|
|
|
14245
14356
|
};
|
|
14246
14357
|
Card.defaultProps = defaultProps;
|
|
14247
14358
|
Card.displayName = "NutCard";
|
|
14248
|
-
export { ActionSheet, Address, AnimatingNumbers, Avatar, AvatarGroup, 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 };
|
|
14359
|
+
export { ActionSheet, Address, AnimatingNumbers, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, ConfigProvider, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, Empty, 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 };
|