@nutui/nutui-react 1.1.4-beta.1 → 1.1.4-beta.4
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/Avatar/style/index.js +1 -1
- package/dist/esm/Avatar.js +97 -20
- package/dist/esm/AvatarContext-7153ad2b.js +3 -0
- package/dist/esm/AvatarGroup/style/index.js +2 -0
- package/dist/esm/AvatarGroup.js +50 -0
- package/dist/esm/BackTop.js +16 -12
- package/dist/esm/Barrage.js +0 -1
- package/dist/esm/CircleProgress.js +93 -56
- package/dist/esm/Skeleton.js +20 -12
- package/dist/esm/Step.js +14 -3
- package/dist/esm/Steps.js +4 -1
- package/dist/esm/Swiper.js +2 -1
- package/dist/esm/TabbarItem.js +9 -0
- package/dist/esm/Uploader/style/index.js +2 -1
- package/dist/esm/Uploader.js +84 -18
- package/dist/esm/nutui-react.es.js +1 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/nutui.react.es.js +472 -250
- package/dist/nutui.react.umd.js +12 -12
- package/dist/packages/avatar/avatar.scss +16 -6
- package/dist/packages/avatargroup/avatargroup.scss +14 -0
- package/dist/packages/circleprogress/circleprogress.scss +12 -53
- package/dist/packages/configprovider/configprovider.scss +0 -2
- package/dist/packages/skeleton/skeleton.scss +1 -3
- package/dist/packages/step/step.scss +29 -29
- package/dist/packages/uploader/uploader.scss +97 -14
- 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 +36 -4
- package/dist/types/avatar/__tests__/avatar.spec.d.ts +1 -0
- package/dist/types/avatar/avatar.d.ts +6 -3
- package/dist/types/avatargroup/AvatarContext.d.ts +2 -0
- package/dist/types/avatargroup/__tests__/avatargroup.spec.d.ts +1 -0
- package/dist/types/avatargroup/avatargroup.d.ts +14 -0
- package/dist/types/avatargroup/index.d.ts +2 -0
- package/dist/types/barrage/__tests__/barrage.spec.d.ts +1 -0
- package/dist/types/button/button.d.ts +2 -2
- package/dist/types/checkbox/__test__/checkbox.spec.d.ts +1 -0
- package/dist/types/circleprogress/__tests__/circleprogress.spec.d.ts +1 -0
- package/dist/types/circleprogress/circleprogress.d.ts +11 -5
- package/dist/types/icon/__test__/icon.spec.d.ts +1 -0
- package/dist/types/infiniteloading/__tests__/infiniteloading.spec.d.ts +1 -0
- package/dist/types/inputnumber/__tests__/inputnumber.spec.d.ts +1 -0
- package/dist/types/nutui.react.d.ts +2 -1
- package/dist/types/overlay/__tests__/overlay.spec.d.ts +1 -0
- package/dist/types/skeleton/__test__/skeleton.spec.d.ts +1 -0
- package/dist/types/skeleton/skeleton.d.ts +2 -2
- package/dist/types/step/step.d.ts +1 -0
- package/dist/types/steps/__tests__/steps.spec.d.ts +1 -0
- package/dist/types/steps/steps.d.ts +1 -0
- package/dist/types/tabbaritem/tabbaritem.d.ts +1 -0
- package/dist/types/uploader/__tests__/uploader.spec.d.ts +1 -0
- package/dist/types/uploader/uploader.d.ts +9 -1
- package/package.json +6 -3
- package/dist/styles/variables-jdw.scss +0 -376
package/dist/nutui.react.es.js
CHANGED
|
@@ -34,7 +34,7 @@ var __publicField = (obj, key, value) => {
|
|
|
34
34
|
return value;
|
|
35
35
|
};
|
|
36
36
|
/*!
|
|
37
|
-
* @nutui/nutui-react v1.1.4-beta.
|
|
37
|
+
* @nutui/nutui-react v1.1.4-beta.4 Mon May 23 2022 16:09:58 GMT+0800 (China Standard Time)
|
|
38
38
|
* (c) 2022 @jdf2e.
|
|
39
39
|
* Released under the MIT License.
|
|
40
40
|
*/
|
|
@@ -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$Z = {
|
|
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$Z), 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$Z;
|
|
124
124
|
Icon.displayName = "NutIcon";
|
|
125
|
-
const defaultProps$
|
|
125
|
+
const defaultProps$Y = {
|
|
126
126
|
className: "",
|
|
127
127
|
color: "",
|
|
128
128
|
shape: "round",
|
|
@@ -139,7 +139,7 @@ const defaultProps$X = {
|
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
141
|
const Button = (props) => {
|
|
142
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
142
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$Y), 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$Y;
|
|
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$X = {
|
|
1446
1446
|
title: "",
|
|
1447
1447
|
subTitle: "",
|
|
1448
1448
|
desc: "",
|
|
@@ -1458,7 +1458,7 @@ const defaultProps$W = {
|
|
|
1458
1458
|
}
|
|
1459
1459
|
};
|
|
1460
1460
|
const Cell = (props) => {
|
|
1461
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
1461
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$X), 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$X;
|
|
1525
1525
|
Cell.displayName = "NutCell";
|
|
1526
|
-
const defaultProps$
|
|
1526
|
+
const defaultProps$W = { 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$W), 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$W;
|
|
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$V = __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$V;
|
|
2232
2232
|
Popup.displayName = "NutPopup";
|
|
2233
|
-
const defaultProps$
|
|
2233
|
+
const defaultProps$U = {};
|
|
2234
2234
|
const Layout = (props) => {
|
|
2235
|
-
__spreadValues(__spreadValues({}, defaultProps$
|
|
2235
|
+
__spreadValues(__spreadValues({}, defaultProps$U), 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$U;
|
|
2241
2241
|
Layout.displayName = "NutLayout";
|
|
2242
2242
|
const DataContext$2 = createContext({});
|
|
2243
|
-
const defaultProps$
|
|
2243
|
+
const defaultProps$T = {
|
|
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$T), 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$T;
|
|
2273
2273
|
Col.displayName = "NutCol";
|
|
2274
|
-
const defaultProps$
|
|
2274
|
+
const defaultProps$S = {
|
|
2275
2275
|
type: "",
|
|
2276
2276
|
justify: "start",
|
|
2277
2277
|
align: "flex-start",
|
|
@@ -2279,7 +2279,7 @@ const defaultProps$R = {
|
|
|
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$S), 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$S;
|
|
2306
2306
|
Row.displayName = "NutRow";
|
|
2307
|
-
const defaultProps$
|
|
2307
|
+
const defaultProps$R = {
|
|
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$R), 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$R;
|
|
2329
2329
|
Divider.displayName = "NutDivider";
|
|
2330
|
-
const defaultProps$
|
|
2330
|
+
const defaultProps$Q = {
|
|
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$Q), props);
|
|
2352
2352
|
const b2 = cn("navbar");
|
|
2353
2353
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
2354
2354
|
className: `nut-navbar ${className}`,
|
|
@@ -2371,7 +2371,7 @@ const NavBar = (props) => {
|
|
|
2371
2371
|
name: icon
|
|
2372
2372
|
})));
|
|
2373
2373
|
};
|
|
2374
|
-
NavBar.defaultProps = defaultProps$
|
|
2374
|
+
NavBar.defaultProps = defaultProps$Q;
|
|
2375
2375
|
NavBar.displayName = "NutNavBar";
|
|
2376
2376
|
const zhCN = {
|
|
2377
2377
|
save: "\u4FDD\u5B58",
|
|
@@ -2464,7 +2464,7 @@ const zhCN = {
|
|
|
2464
2464
|
additionalImages: (length) => `${length}\u5F20\u8FFD\u8BC4\u56FE\u7247`
|
|
2465
2465
|
}
|
|
2466
2466
|
};
|
|
2467
|
-
const defaultProps$
|
|
2467
|
+
const defaultProps$P = {
|
|
2468
2468
|
locale: zhCN
|
|
2469
2469
|
};
|
|
2470
2470
|
const defaultConfigRef = {
|
|
@@ -2481,15 +2481,15 @@ const useConfig = () => {
|
|
|
2481
2481
|
};
|
|
2482
2482
|
const ConfigContext = createContext(null);
|
|
2483
2483
|
const ConfigProvider = (props) => {
|
|
2484
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
2484
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$P), props), { children } = _a, config2 = __objRest(_a, ["children"]);
|
|
2485
2485
|
const parentConfig = useConfig();
|
|
2486
2486
|
return /* @__PURE__ */ React__default.createElement(ConfigContext.Provider, {
|
|
2487
2487
|
value: __spreadValues(__spreadValues({}, parentConfig), config2)
|
|
2488
2488
|
}, children);
|
|
2489
2489
|
};
|
|
2490
|
-
ConfigProvider.defaultProps = defaultProps$
|
|
2490
|
+
ConfigProvider.defaultProps = defaultProps$P;
|
|
2491
2491
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
2492
|
-
const defaultProps$
|
|
2492
|
+
const defaultProps$O = {
|
|
2493
2493
|
fixednavClass: "nut-fixednav",
|
|
2494
2494
|
activeText: "\u6536\u8D77\u5BFC\u822A",
|
|
2495
2495
|
unActiveText: "\u5FEB\u901F\u5BFC\u822A",
|
|
@@ -2501,7 +2501,7 @@ const defaultProps$N = {
|
|
|
2501
2501
|
};
|
|
2502
2502
|
const FixedNav = (props) => {
|
|
2503
2503
|
const { locale } = useConfig();
|
|
2504
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
2504
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$O), props), {
|
|
2505
2505
|
fixednavClass,
|
|
2506
2506
|
overlay,
|
|
2507
2507
|
visible,
|
|
@@ -2571,9 +2571,9 @@ const FixedNav = (props) => {
|
|
|
2571
2571
|
className: "text"
|
|
2572
2572
|
}, visible ? locale.fixednav.activeText || activeText : locale.fixednav.unActiveText || unActiveText))));
|
|
2573
2573
|
};
|
|
2574
|
-
FixedNav.defaultProps = defaultProps$
|
|
2574
|
+
FixedNav.defaultProps = defaultProps$O;
|
|
2575
2575
|
FixedNav.displayName = "NutFixedNav";
|
|
2576
|
-
const defaultProps$
|
|
2576
|
+
const defaultProps$N = {
|
|
2577
2577
|
visible: 0,
|
|
2578
2578
|
bottom: false,
|
|
2579
2579
|
type: "",
|
|
@@ -2586,7 +2586,7 @@ const defaultProps$M = {
|
|
|
2586
2586
|
}
|
|
2587
2587
|
};
|
|
2588
2588
|
const Tabbar = (props) => {
|
|
2589
|
-
const { children, visible, bottom, activeColor, unactiveColor, className, style, tabSwitch } = __spreadValues(__spreadValues({}, defaultProps$
|
|
2589
|
+
const { children, visible, bottom, activeColor, unactiveColor, className, style, tabSwitch } = __spreadValues(__spreadValues({}, defaultProps$N), props);
|
|
2590
2590
|
const b2 = cn("tabbar");
|
|
2591
2591
|
const [selectIndex, setSelectIndex] = useState(visible);
|
|
2592
2592
|
const handleClick = (idx) => {
|
|
@@ -2612,12 +2612,13 @@ const Tabbar = (props) => {
|
|
|
2612
2612
|
return React__default.cloneElement(child, childProps);
|
|
2613
2613
|
}));
|
|
2614
2614
|
};
|
|
2615
|
-
Tabbar.defaultProps = defaultProps$
|
|
2615
|
+
Tabbar.defaultProps = defaultProps$N;
|
|
2616
2616
|
Tabbar.displayName = "NutTabbar";
|
|
2617
|
-
const defaultProps$
|
|
2617
|
+
const defaultProps$M = {
|
|
2618
2618
|
tabTitle: "",
|
|
2619
2619
|
icon: "",
|
|
2620
2620
|
href: "",
|
|
2621
|
+
to: "",
|
|
2621
2622
|
num: "",
|
|
2622
2623
|
active: false,
|
|
2623
2624
|
activeColor: "",
|
|
@@ -2627,12 +2628,17 @@ const defaultProps$L = {
|
|
|
2627
2628
|
}
|
|
2628
2629
|
};
|
|
2629
2630
|
const TabbarItem = (props) => {
|
|
2630
|
-
const { tabTitle, icon, href, num, active, activeColor, unactiveColor, index: index2, handleClick } = __spreadValues(__spreadValues({}, defaultProps$
|
|
2631
|
+
const { tabTitle, icon, href, to: to2, num, active, activeColor, unactiveColor, index: index2, handleClick } = __spreadValues(__spreadValues({}, defaultProps$M), props);
|
|
2631
2632
|
const b2 = cn("tabbar-item");
|
|
2632
2633
|
const bIcon = cn("tabbar-item__icon-box");
|
|
2634
|
+
const history = useHistory();
|
|
2633
2635
|
useEffect(() => {
|
|
2634
2636
|
if (active && href) {
|
|
2635
2637
|
window.location.href = href;
|
|
2638
|
+
return;
|
|
2639
|
+
}
|
|
2640
|
+
if (active && to2) {
|
|
2641
|
+
history.push(to2);
|
|
2636
2642
|
}
|
|
2637
2643
|
}, [active]);
|
|
2638
2644
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -2656,14 +2662,14 @@ const TabbarItem = (props) => {
|
|
|
2656
2662
|
className: bIcon({ "nav-word": true }, [bIcon({ "big-word": !icon })])
|
|
2657
2663
|
}, tabTitle)));
|
|
2658
2664
|
};
|
|
2659
|
-
const defaultProps$
|
|
2665
|
+
const defaultProps$L = {
|
|
2660
2666
|
height: "200px",
|
|
2661
2667
|
acceptKey: "title",
|
|
2662
2668
|
indexList: [],
|
|
2663
2669
|
className: ""
|
|
2664
2670
|
};
|
|
2665
2671
|
const Elevator = (props) => {
|
|
2666
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
2672
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$L), props), { height, acceptKey, indexList, className, clickItem, clickIndex } = _a, rest = __objRest(_a, ["height", "acceptKey", "indexList", "className", "clickItem", "clickIndex"]);
|
|
2667
2673
|
const b2 = cn("elevator");
|
|
2668
2674
|
const spaceHeight = 23;
|
|
2669
2675
|
const listview = useRef(null);
|
|
@@ -2797,9 +2803,9 @@ const Elevator = (props) => {
|
|
|
2797
2803
|
}, item[acceptKey]);
|
|
2798
2804
|
}))));
|
|
2799
2805
|
};
|
|
2800
|
-
Elevator.defaultProps = defaultProps$
|
|
2806
|
+
Elevator.defaultProps = defaultProps$L;
|
|
2801
2807
|
Elevator.displayName = "NutElevator";
|
|
2802
|
-
const defaultProps$
|
|
2808
|
+
const defaultProps$K = {
|
|
2803
2809
|
defaultValue: 1,
|
|
2804
2810
|
mode: "multi",
|
|
2805
2811
|
prevText: "\u4E0A\u4E00\u9875",
|
|
@@ -2816,7 +2822,7 @@ const defaultProps$J = {
|
|
|
2816
2822
|
};
|
|
2817
2823
|
const Pagination = (props) => {
|
|
2818
2824
|
const { locale } = useConfig();
|
|
2819
|
-
__spreadValues(__spreadValues({}, defaultProps$
|
|
2825
|
+
__spreadValues(__spreadValues({}, defaultProps$K), props);
|
|
2820
2826
|
const _a = props, {
|
|
2821
2827
|
modelValue,
|
|
2822
2828
|
mode,
|
|
@@ -2946,7 +2952,7 @@ const Pagination = (props) => {
|
|
|
2946
2952
|
onClick: (e2) => selectPage(Number(currentPage) + 1, true)
|
|
2947
2953
|
}, locale.pagination.next || nextText));
|
|
2948
2954
|
};
|
|
2949
|
-
Pagination.defaultProps = defaultProps$
|
|
2955
|
+
Pagination.defaultProps = defaultProps$K;
|
|
2950
2956
|
Pagination.displayName = "NutPagination";
|
|
2951
2957
|
class Title {
|
|
2952
2958
|
constructor() {
|
|
@@ -2956,7 +2962,7 @@ class Title {
|
|
|
2956
2962
|
__publicField(this, "index", 0);
|
|
2957
2963
|
}
|
|
2958
2964
|
}
|
|
2959
|
-
const defaultProps$
|
|
2965
|
+
const defaultProps$J = {
|
|
2960
2966
|
value: 0,
|
|
2961
2967
|
color: "",
|
|
2962
2968
|
background: "",
|
|
@@ -2972,7 +2978,7 @@ const pxCheck$1 = (value) => {
|
|
|
2972
2978
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
2973
2979
|
};
|
|
2974
2980
|
const Tabs = (props) => {
|
|
2975
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
2981
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$J), props), {
|
|
2976
2982
|
value,
|
|
2977
2983
|
color,
|
|
2978
2984
|
background,
|
|
@@ -3093,16 +3099,16 @@ const Tabs = (props) => {
|
|
|
3093
3099
|
return React__default.cloneElement(child, childProps);
|
|
3094
3100
|
})));
|
|
3095
3101
|
};
|
|
3096
|
-
Tabs.defaultProps = defaultProps$
|
|
3102
|
+
Tabs.defaultProps = defaultProps$J;
|
|
3097
3103
|
Tabs.displayName = "NutTabs";
|
|
3098
|
-
const defaultProps$
|
|
3104
|
+
const defaultProps$I = {
|
|
3099
3105
|
title: "",
|
|
3100
3106
|
paneKey: "",
|
|
3101
3107
|
activeKey: "",
|
|
3102
3108
|
disabled: false
|
|
3103
3109
|
};
|
|
3104
3110
|
const TabPane = (props) => {
|
|
3105
|
-
const { children, paneKey, activeKey } = __spreadValues(__spreadValues({}, defaultProps$
|
|
3111
|
+
const { children, paneKey, activeKey } = __spreadValues(__spreadValues({}, defaultProps$I), props);
|
|
3106
3112
|
const b2 = cn("tabpane");
|
|
3107
3113
|
const classes = classNames({
|
|
3108
3114
|
active: paneKey === activeKey
|
|
@@ -3388,7 +3394,7 @@ var Toast = {
|
|
|
3388
3394
|
}
|
|
3389
3395
|
}
|
|
3390
3396
|
};
|
|
3391
|
-
const defaultProps$
|
|
3397
|
+
const defaultProps$H = {
|
|
3392
3398
|
range: false,
|
|
3393
3399
|
hiddenRange: false,
|
|
3394
3400
|
hiddenTag: false,
|
|
@@ -3418,7 +3424,7 @@ const Range = (props) => {
|
|
|
3418
3424
|
change,
|
|
3419
3425
|
dragStart,
|
|
3420
3426
|
dragEnd
|
|
3421
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
3427
|
+
} = __spreadValues(__spreadValues({}, defaultProps$H), props);
|
|
3422
3428
|
const [buttonIndex, SetButtonIndex] = useState(0);
|
|
3423
3429
|
const [initValue, SetInitValue] = useState();
|
|
3424
3430
|
const [dragStatus, SetDragStatus] = useState("start");
|
|
@@ -3627,7 +3633,7 @@ const Range = (props) => {
|
|
|
3627
3633
|
className: "max"
|
|
3628
3634
|
}, +max) : null);
|
|
3629
3635
|
};
|
|
3630
|
-
Range.defaultProps = defaultProps$
|
|
3636
|
+
Range.defaultProps = defaultProps$H;
|
|
3631
3637
|
Range.displayName = "NutRange";
|
|
3632
3638
|
const Utils = {
|
|
3633
3639
|
isLeapYear(y2) {
|
|
@@ -3713,7 +3719,7 @@ function requestAniFrame() {
|
|
|
3713
3719
|
};
|
|
3714
3720
|
}
|
|
3715
3721
|
var requestAniFrame$1 = requestAniFrame();
|
|
3716
|
-
const defaultProps$
|
|
3722
|
+
const defaultProps$G = {
|
|
3717
3723
|
type: "one",
|
|
3718
3724
|
isAutoBackFill: false,
|
|
3719
3725
|
poppable: true,
|
|
@@ -3742,7 +3748,7 @@ const CalendarItem = (props) => {
|
|
|
3742
3748
|
onChoose,
|
|
3743
3749
|
onUpdate,
|
|
3744
3750
|
onClose
|
|
3745
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
3751
|
+
} = __spreadValues(__spreadValues({}, defaultProps$G), props);
|
|
3746
3752
|
const weeks = locale.calendaritem.weekdays;
|
|
3747
3753
|
const [yearMonthTitle, setYearMonthTitle] = useState("");
|
|
3748
3754
|
const [unLoadPrev, setUnLoadPrev] = useState(false);
|
|
@@ -4128,9 +4134,9 @@ const CalendarItem = (props) => {
|
|
|
4128
4134
|
onClick: confirm2
|
|
4129
4135
|
}, locale.confirm)) : ""));
|
|
4130
4136
|
};
|
|
4131
|
-
CalendarItem.defaultProps = defaultProps$
|
|
4137
|
+
CalendarItem.defaultProps = defaultProps$G;
|
|
4132
4138
|
CalendarItem.displayName = "NutCalendarItem";
|
|
4133
|
-
const defaultProps$
|
|
4139
|
+
const defaultProps$F = {
|
|
4134
4140
|
type: "one",
|
|
4135
4141
|
isAutoBackFill: false,
|
|
4136
4142
|
poppable: true,
|
|
@@ -4158,7 +4164,7 @@ const Calendar = (props) => {
|
|
|
4158
4164
|
endDate,
|
|
4159
4165
|
onClose,
|
|
4160
4166
|
onChoose
|
|
4161
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
4167
|
+
} = __spreadValues(__spreadValues({}, defaultProps$F), props);
|
|
4162
4168
|
const close = () => {
|
|
4163
4169
|
onClose && onClose();
|
|
4164
4170
|
};
|
|
@@ -4201,16 +4207,16 @@ const Calendar = (props) => {
|
|
|
4201
4207
|
onChoose: choose
|
|
4202
4208
|
}));
|
|
4203
4209
|
};
|
|
4204
|
-
Calendar.defaultProps = defaultProps$
|
|
4210
|
+
Calendar.defaultProps = defaultProps$F;
|
|
4205
4211
|
Calendar.displayName = "NutCalendar";
|
|
4206
|
-
const defaultProps$
|
|
4212
|
+
const defaultProps$E = {
|
|
4207
4213
|
disabled: false,
|
|
4208
4214
|
checkedValue: [],
|
|
4209
4215
|
onChange: (value) => {
|
|
4210
4216
|
}
|
|
4211
4217
|
};
|
|
4212
4218
|
const CheckboxGroup = React__default.forwardRef((props, ref) => {
|
|
4213
|
-
const { children } = __spreadValues(__spreadValues({}, defaultProps$
|
|
4219
|
+
const { children } = __spreadValues(__spreadValues({}, defaultProps$E), props);
|
|
4214
4220
|
const b2 = cn("checkboxgroup");
|
|
4215
4221
|
const _a = props, { className, disabled, onChange, checkedValue } = _a, rest = __objRest(_a, ["className", "disabled", "onChange", "checkedValue"]);
|
|
4216
4222
|
const [innerDisabled, setInnerDisabled] = useState(disabled);
|
|
@@ -4269,9 +4275,9 @@ const CheckboxGroup = React__default.forwardRef((props, ref) => {
|
|
|
4269
4275
|
className: `${b2()} ${className || ""}`
|
|
4270
4276
|
}, rest), cloneChildren());
|
|
4271
4277
|
});
|
|
4272
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
4278
|
+
CheckboxGroup.defaultProps = defaultProps$E;
|
|
4273
4279
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
4274
|
-
const defaultProps$
|
|
4280
|
+
const defaultProps$D = {
|
|
4275
4281
|
checked: false,
|
|
4276
4282
|
disabled: false,
|
|
4277
4283
|
textPosition: "right",
|
|
@@ -4282,7 +4288,7 @@ const defaultProps$C = {
|
|
|
4282
4288
|
}
|
|
4283
4289
|
};
|
|
4284
4290
|
const Checkbox = (props) => {
|
|
4285
|
-
const { children } = __spreadValues(__spreadValues({}, defaultProps$
|
|
4291
|
+
const { children } = __spreadValues(__spreadValues({}, defaultProps$D), props);
|
|
4286
4292
|
const b2 = cn("checkbox");
|
|
4287
4293
|
const _a = props, {
|
|
4288
4294
|
iconName,
|
|
@@ -4338,7 +4344,7 @@ const Checkbox = (props) => {
|
|
|
4338
4344
|
onClick: handleClick
|
|
4339
4345
|
}), renderIcon(), renderLabel());
|
|
4340
4346
|
};
|
|
4341
|
-
Checkbox.defaultProps = defaultProps$
|
|
4347
|
+
Checkbox.defaultProps = defaultProps$D;
|
|
4342
4348
|
Checkbox.displayName = "NutCheckBox";
|
|
4343
4349
|
Checkbox.Group = CheckboxGroup;
|
|
4344
4350
|
const InternalPickerSlot = (props, ref) => {
|
|
@@ -4654,7 +4660,7 @@ const InternalPicker = (props, ref) => {
|
|
|
4654
4660
|
};
|
|
4655
4661
|
const Picker = React__default.forwardRef(InternalPicker);
|
|
4656
4662
|
const currentYear = new Date().getFullYear();
|
|
4657
|
-
const defaultProps$
|
|
4663
|
+
const defaultProps$C = {
|
|
4658
4664
|
modelValue: new Date(),
|
|
4659
4665
|
visible: false,
|
|
4660
4666
|
title: "",
|
|
@@ -4666,7 +4672,7 @@ const defaultProps$B = {
|
|
|
4666
4672
|
onCloseDatePicker: () => void 0
|
|
4667
4673
|
};
|
|
4668
4674
|
const DatePicker = (props) => {
|
|
4669
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
4675
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$C), props), {
|
|
4670
4676
|
minDate,
|
|
4671
4677
|
maxDate,
|
|
4672
4678
|
type,
|
|
@@ -4920,9 +4926,9 @@ const DatePicker = (props) => {
|
|
|
4920
4926
|
ref: pickerRef
|
|
4921
4927
|
}));
|
|
4922
4928
|
};
|
|
4923
|
-
DatePicker.defaultProps = defaultProps$
|
|
4929
|
+
DatePicker.defaultProps = defaultProps$C;
|
|
4924
4930
|
DatePicker.displayName = "NutDatePicker";
|
|
4925
|
-
const defaultProps$
|
|
4931
|
+
const defaultProps$B = {
|
|
4926
4932
|
disabled: false,
|
|
4927
4933
|
buttonSize: "",
|
|
4928
4934
|
min: 1,
|
|
@@ -4938,7 +4944,7 @@ function pxCheck(value) {
|
|
|
4938
4944
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
4939
4945
|
}
|
|
4940
4946
|
const InputNumber = (props) => {
|
|
4941
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
4947
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$B), props), {
|
|
4942
4948
|
children,
|
|
4943
4949
|
disabled,
|
|
4944
4950
|
buttonSize,
|
|
@@ -5095,7 +5101,7 @@ const InputNumber = (props) => {
|
|
|
5095
5101
|
click: addNumber
|
|
5096
5102
|
}));
|
|
5097
5103
|
};
|
|
5098
|
-
InputNumber.defaultProps = defaultProps$
|
|
5104
|
+
InputNumber.defaultProps = defaultProps$B;
|
|
5099
5105
|
InputNumber.displayName = "NutInputNumber";
|
|
5100
5106
|
function trimExtraChar(value, char, regExp) {
|
|
5101
5107
|
const index2 = value.indexOf(char);
|
|
@@ -5121,7 +5127,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
5121
5127
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
5122
5128
|
return value.replace(regExp, "");
|
|
5123
5129
|
}
|
|
5124
|
-
const defaultProps$
|
|
5130
|
+
const defaultProps$A = {
|
|
5125
5131
|
type: "text",
|
|
5126
5132
|
defaultValue: "",
|
|
5127
5133
|
placeholder: "\u8BF7\u8F93\u5165\u4FE1\u606F",
|
|
@@ -5152,7 +5158,7 @@ const Input = (props) => {
|
|
|
5152
5158
|
blur,
|
|
5153
5159
|
focus,
|
|
5154
5160
|
clear
|
|
5155
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
5161
|
+
} = __spreadValues(__spreadValues({}, defaultProps$A), props);
|
|
5156
5162
|
const inputBem = cn("input");
|
|
5157
5163
|
const [inputValue, SetInputValue] = useState("");
|
|
5158
5164
|
const [active, SetActive] = useState(false);
|
|
@@ -5236,14 +5242,14 @@ const Input = (props) => {
|
|
|
5236
5242
|
size: "12px"
|
|
5237
5243
|
}) : null) : null);
|
|
5238
5244
|
};
|
|
5239
|
-
Input.defaultProps = defaultProps$
|
|
5245
|
+
Input.defaultProps = defaultProps$A;
|
|
5240
5246
|
Input.displayName = "NutInput";
|
|
5241
5247
|
const radioContext = {
|
|
5242
5248
|
onChange: (val) => {
|
|
5243
5249
|
}
|
|
5244
5250
|
};
|
|
5245
5251
|
var RadioContext = React__default.createContext(radioContext);
|
|
5246
|
-
const defaultProps$
|
|
5252
|
+
const defaultProps$z = {
|
|
5247
5253
|
value: null,
|
|
5248
5254
|
textPosition: "right",
|
|
5249
5255
|
onChange: (value) => {
|
|
@@ -5251,7 +5257,7 @@ const defaultProps$y = {
|
|
|
5251
5257
|
direction: "vertical"
|
|
5252
5258
|
};
|
|
5253
5259
|
const RadioGroup = React__default.forwardRef((props, ref) => {
|
|
5254
|
-
const { children } = __spreadValues(__spreadValues({}, defaultProps$
|
|
5260
|
+
const { children } = __spreadValues(__spreadValues({}, defaultProps$z), props);
|
|
5255
5261
|
cn("RadioGroup");
|
|
5256
5262
|
const _a = props, { className, value, onChange, textPosition, direction } = _a, rest = __objRest(_a, ["className", "value", "onChange", "textPosition", "direction"]);
|
|
5257
5263
|
const [val2State, setVal2State] = useState(value);
|
|
@@ -5286,9 +5292,9 @@ const RadioGroup = React__default.forwardRef((props, ref) => {
|
|
|
5286
5292
|
className: `nut-radiogroup nut-radiogroup--${props.direction}`
|
|
5287
5293
|
}, rest), cloneChildren()));
|
|
5288
5294
|
});
|
|
5289
|
-
RadioGroup.defaultProps = defaultProps$
|
|
5295
|
+
RadioGroup.defaultProps = defaultProps$z;
|
|
5290
5296
|
RadioGroup.displayName = "NutRadioGroup";
|
|
5291
|
-
const defaultProps$
|
|
5297
|
+
const defaultProps$y = {
|
|
5292
5298
|
disabled: false,
|
|
5293
5299
|
checked: false,
|
|
5294
5300
|
shape: "round",
|
|
@@ -5301,7 +5307,7 @@ const defaultProps$x = {
|
|
|
5301
5307
|
}
|
|
5302
5308
|
};
|
|
5303
5309
|
const Radio = (props) => {
|
|
5304
|
-
const { children } = __spreadValues(__spreadValues({}, defaultProps$
|
|
5310
|
+
const { children } = __spreadValues(__spreadValues({}, defaultProps$y), props);
|
|
5305
5311
|
const _a = props, {
|
|
5306
5312
|
className,
|
|
5307
5313
|
disabled,
|
|
@@ -5369,10 +5375,10 @@ const Radio = (props) => {
|
|
|
5369
5375
|
onClick: handleClick
|
|
5370
5376
|
}, rest), props.shape == "button" ? renderButton() : reverseState ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()]);
|
|
5371
5377
|
};
|
|
5372
|
-
Radio.defaultProps = defaultProps$
|
|
5378
|
+
Radio.defaultProps = defaultProps$y;
|
|
5373
5379
|
Radio.displayName = "NutRadio";
|
|
5374
5380
|
Radio.RadioGroup = RadioGroup;
|
|
5375
|
-
const defaultProps$
|
|
5381
|
+
const defaultProps$x = {
|
|
5376
5382
|
count: 5,
|
|
5377
5383
|
modelValue: 0,
|
|
5378
5384
|
iconSize: 18,
|
|
@@ -5399,7 +5405,7 @@ const Rate = (props) => {
|
|
|
5399
5405
|
allowHalf,
|
|
5400
5406
|
spacing,
|
|
5401
5407
|
change
|
|
5402
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
5408
|
+
} = __spreadValues(__spreadValues({}, defaultProps$x), props);
|
|
5403
5409
|
const b2 = cn("rate");
|
|
5404
5410
|
const bi = cn("rate-item");
|
|
5405
5411
|
const [countArray, setCountArray] = useState([1, 2, 3, 4, 5]);
|
|
@@ -5462,9 +5468,9 @@ const Rate = (props) => {
|
|
|
5462
5468
|
}));
|
|
5463
5469
|
}));
|
|
5464
5470
|
};
|
|
5465
|
-
Rate.defaultProps = defaultProps$
|
|
5471
|
+
Rate.defaultProps = defaultProps$x;
|
|
5466
5472
|
Rate.displayName = "NutRate";
|
|
5467
|
-
const defaultProps$
|
|
5473
|
+
const defaultProps$w = {
|
|
5468
5474
|
title: "\u8BF7\u8F93\u5165\u5BC6\u7801",
|
|
5469
5475
|
desc: "\u60A8\u4F7F\u7528\u4E86\u865A\u62DF\u8D44\u4EA7\uFF0C\u8BF7\u8FDB\u884C\u9A8C\u8BC1",
|
|
5470
5476
|
tips: "\u5FD8\u8BB0\u5BC6\u7801",
|
|
@@ -5640,9 +5646,9 @@ const ShortPassword = (props) => {
|
|
|
5640
5646
|
onClick: () => sure()
|
|
5641
5647
|
}, locale.confirm)) : null)));
|
|
5642
5648
|
};
|
|
5643
|
-
ShortPassword.defaultProps = defaultProps$
|
|
5649
|
+
ShortPassword.defaultProps = defaultProps$w;
|
|
5644
5650
|
ShortPassword.displayName = "NutShortPassword";
|
|
5645
|
-
const defaultProps$
|
|
5651
|
+
const defaultProps$v = {
|
|
5646
5652
|
defaultValue: "",
|
|
5647
5653
|
textAlign: "left",
|
|
5648
5654
|
limitshow: false,
|
|
@@ -5670,7 +5676,7 @@ const TextArea = (props) => {
|
|
|
5670
5676
|
change,
|
|
5671
5677
|
blur,
|
|
5672
5678
|
focus
|
|
5673
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
5679
|
+
} = __spreadValues(__spreadValues({}, defaultProps$v), props);
|
|
5674
5680
|
const textareaBem = cn("textarea");
|
|
5675
5681
|
const [inputValue, SetInputValue] = useState("");
|
|
5676
5682
|
useEffect(() => {
|
|
@@ -5741,7 +5747,7 @@ const TextArea = (props) => {
|
|
|
5741
5747
|
className: textareaBem("limit")
|
|
5742
5748
|
}, inputValue.length, "/", maxlength < 0 ? 0 : maxlength) : null);
|
|
5743
5749
|
};
|
|
5744
|
-
TextArea.defaultProps = defaultProps$
|
|
5750
|
+
TextArea.defaultProps = defaultProps$v;
|
|
5745
5751
|
TextArea.displayName = "NutTextArea";
|
|
5746
5752
|
class UploadOptions {
|
|
5747
5753
|
constructor() {
|
|
@@ -5797,10 +5803,12 @@ class Upload {
|
|
|
5797
5803
|
}
|
|
5798
5804
|
}
|
|
5799
5805
|
}
|
|
5800
|
-
const defaultProps$
|
|
5806
|
+
const defaultProps$u = {
|
|
5801
5807
|
url: "",
|
|
5802
5808
|
maximum: 1,
|
|
5803
5809
|
uploadIcon: "photograph",
|
|
5810
|
+
uploadIconSize: "",
|
|
5811
|
+
listType: "picture",
|
|
5804
5812
|
name: "file",
|
|
5805
5813
|
accept: "*",
|
|
5806
5814
|
disabled: false,
|
|
@@ -5825,6 +5833,7 @@ const defaultProps$t = {
|
|
|
5825
5833
|
class FileItem {
|
|
5826
5834
|
constructor() {
|
|
5827
5835
|
__publicField(this, "status", "ready");
|
|
5836
|
+
__publicField(this, "message", "\u51C6\u5907\u4E2D..");
|
|
5828
5837
|
__publicField(this, "uid", new Date().getTime().toString());
|
|
5829
5838
|
__publicField(this, "name");
|
|
5830
5839
|
__publicField(this, "url");
|
|
@@ -5833,11 +5842,14 @@ class FileItem {
|
|
|
5833
5842
|
}
|
|
5834
5843
|
}
|
|
5835
5844
|
const InternalUploader = (props, ref) => {
|
|
5836
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
5845
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$u), props), {
|
|
5837
5846
|
children,
|
|
5838
5847
|
uploadIcon,
|
|
5848
|
+
uploadIconSize,
|
|
5839
5849
|
name,
|
|
5840
5850
|
accept,
|
|
5851
|
+
defaultFileList,
|
|
5852
|
+
listType,
|
|
5841
5853
|
disabled,
|
|
5842
5854
|
multiple,
|
|
5843
5855
|
url,
|
|
@@ -5858,6 +5870,8 @@ const InternalUploader = (props, ref) => {
|
|
|
5858
5870
|
clearInput,
|
|
5859
5871
|
start: start2,
|
|
5860
5872
|
removeImage,
|
|
5873
|
+
change,
|
|
5874
|
+
fileItemClick,
|
|
5861
5875
|
progress,
|
|
5862
5876
|
success,
|
|
5863
5877
|
update: update2,
|
|
@@ -5868,8 +5882,11 @@ const InternalUploader = (props, ref) => {
|
|
|
5868
5882
|
} = _a, restProps = __objRest(_a, [
|
|
5869
5883
|
"children",
|
|
5870
5884
|
"uploadIcon",
|
|
5885
|
+
"uploadIconSize",
|
|
5871
5886
|
"name",
|
|
5872
5887
|
"accept",
|
|
5888
|
+
"defaultFileList",
|
|
5889
|
+
"listType",
|
|
5873
5890
|
"disabled",
|
|
5874
5891
|
"multiple",
|
|
5875
5892
|
"url",
|
|
@@ -5890,6 +5907,8 @@ const InternalUploader = (props, ref) => {
|
|
|
5890
5907
|
"clearInput",
|
|
5891
5908
|
"start",
|
|
5892
5909
|
"removeImage",
|
|
5910
|
+
"change",
|
|
5911
|
+
"fileItemClick",
|
|
5893
5912
|
"progress",
|
|
5894
5913
|
"success",
|
|
5895
5914
|
"update",
|
|
@@ -5900,6 +5919,11 @@ const InternalUploader = (props, ref) => {
|
|
|
5900
5919
|
]);
|
|
5901
5920
|
const [fileList, setFileList] = useState([]);
|
|
5902
5921
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
5922
|
+
useEffect(() => {
|
|
5923
|
+
if (defaultFileList) {
|
|
5924
|
+
setFileList(defaultFileList);
|
|
5925
|
+
}
|
|
5926
|
+
}, [defaultFileList]);
|
|
5903
5927
|
const b2 = cn("uploader");
|
|
5904
5928
|
const classes = classNames(className, b2(""));
|
|
5905
5929
|
useImperativeHandle(ref, () => ({
|
|
@@ -5938,6 +5962,7 @@ const InternalUploader = (props, ref) => {
|
|
|
5938
5962
|
fileList2.map((item) => {
|
|
5939
5963
|
if (item.uid === fileItem.uid) {
|
|
5940
5964
|
item.status = "ready";
|
|
5965
|
+
item.message = "\u51C6\u5907\u4E0A\u4F20";
|
|
5941
5966
|
}
|
|
5942
5967
|
});
|
|
5943
5968
|
return [...fileList2];
|
|
@@ -5949,6 +5974,7 @@ const InternalUploader = (props, ref) => {
|
|
|
5949
5974
|
fileList2.map((item) => {
|
|
5950
5975
|
if (item.uid === fileItem.uid) {
|
|
5951
5976
|
item.status = "uploading";
|
|
5977
|
+
item.message = "\u4E0A\u4F20\u4E2D...";
|
|
5952
5978
|
}
|
|
5953
5979
|
});
|
|
5954
5980
|
return [...fileList2];
|
|
@@ -5961,6 +5987,7 @@ const InternalUploader = (props, ref) => {
|
|
|
5961
5987
|
fileList2.map((item) => {
|
|
5962
5988
|
if (item.uid === fileItem.uid) {
|
|
5963
5989
|
item.status = "success";
|
|
5990
|
+
item.message = "\u4E0A\u4F20\u6210\u529F";
|
|
5964
5991
|
}
|
|
5965
5992
|
});
|
|
5966
5993
|
return [...fileList2];
|
|
@@ -5975,6 +6002,7 @@ const InternalUploader = (props, ref) => {
|
|
|
5975
6002
|
fileList2.map((item) => {
|
|
5976
6003
|
if (item.uid === fileItem.uid) {
|
|
5977
6004
|
item.status = "error";
|
|
6005
|
+
item.message = "\u4E0A\u4F20\u5931\u8D25";
|
|
5978
6006
|
}
|
|
5979
6007
|
});
|
|
5980
6008
|
return [...fileList2];
|
|
@@ -6004,6 +6032,7 @@ const InternalUploader = (props, ref) => {
|
|
|
6004
6032
|
fileItem.type = file.type;
|
|
6005
6033
|
fileItem.formData = formData;
|
|
6006
6034
|
fileItem.uid = file.lastModified + fileItem.uid;
|
|
6035
|
+
fileItem.message = "\u51C6\u5907\u4E0A\u4F20";
|
|
6007
6036
|
executeUpload(fileItem, index2);
|
|
6008
6037
|
if (isPreview && file.type.includes("image")) {
|
|
6009
6038
|
const reader = new FileReader();
|
|
@@ -6071,9 +6100,12 @@ const InternalUploader = (props, ref) => {
|
|
|
6071
6100
|
clearInputValue($el);
|
|
6072
6101
|
}
|
|
6073
6102
|
};
|
|
6103
|
+
const handleItemClick = (file) => {
|
|
6104
|
+
fileItemClick && fileItemClick(file);
|
|
6105
|
+
};
|
|
6074
6106
|
return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
|
|
6075
6107
|
className: classes
|
|
6076
|
-
}, restProps), children
|
|
6108
|
+
}, restProps), children && /* @__PURE__ */ React__default.createElement("div", {
|
|
6077
6109
|
className: "nut-uploader__slot"
|
|
6078
6110
|
}, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children, maximum > fileList.length && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, capture ? /* @__PURE__ */ React__default.createElement("input", {
|
|
6079
6111
|
className: "nut-uploader__input",
|
|
@@ -6092,30 +6124,63 @@ const InternalUploader = (props, ref) => {
|
|
|
6092
6124
|
disabled,
|
|
6093
6125
|
multiple,
|
|
6094
6126
|
onChange: fileChange
|
|
6095
|
-
}))))
|
|
6096
|
-
console.log("item", item);
|
|
6127
|
+
})))), fileList.length !== 0 && fileList.map((item, index2) => {
|
|
6097
6128
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
6098
|
-
className:
|
|
6129
|
+
className: `nut-uploader__preview ${listType}`,
|
|
6099
6130
|
key: item.uid
|
|
6100
|
-
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
6131
|
+
}, listType == "picture" && !children && /* @__PURE__ */ React__default.createElement("div", {
|
|
6101
6132
|
className: "nut-uploader__preview-img"
|
|
6102
|
-
},
|
|
6133
|
+
}, item.status === "ready" ? /* @__PURE__ */ React__default.createElement("div", {
|
|
6134
|
+
className: "nut-uploader__preview__progress"
|
|
6135
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
6136
|
+
className: "nut-uploader__preview__progress__msg"
|
|
6137
|
+
}, item.message)) : item.status !== "success" && /* @__PURE__ */ React__default.createElement("div", {
|
|
6138
|
+
className: "nut-uploader__preview__progress"
|
|
6139
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
6140
|
+
color: "#fff",
|
|
6141
|
+
name: `${item.status == "error" ? "failure" : "loading"}`
|
|
6142
|
+
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
6143
|
+
className: "nut-uploader__preview__progress__msg"
|
|
6144
|
+
}, item.message)), isDeletable && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
6103
6145
|
color: "rgba(0,0,0,0.6)",
|
|
6104
6146
|
className: "close",
|
|
6105
|
-
name: "
|
|
6147
|
+
name: "failure",
|
|
6106
6148
|
click: () => onDelete(item, index2)
|
|
6107
|
-
}), item.type.includes("image")
|
|
6149
|
+
}), item.type.includes("image") ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, item.url && /* @__PURE__ */ React__default.createElement("img", {
|
|
6108
6150
|
className: "nut-uploader__preview-img__c",
|
|
6109
|
-
src: item.url
|
|
6110
|
-
|
|
6151
|
+
src: item.url,
|
|
6152
|
+
onClick: () => handleItemClick(item)
|
|
6153
|
+
})) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, defaultImg ? /* @__PURE__ */ React__default.createElement("img", {
|
|
6111
6154
|
className: "nut-uploader__preview-img__c",
|
|
6112
|
-
src: defaultImg
|
|
6113
|
-
|
|
6155
|
+
src: defaultImg,
|
|
6156
|
+
onClick: () => handleItemClick(item)
|
|
6157
|
+
}) : /* @__PURE__ */ React__default.createElement("div", {
|
|
6158
|
+
className: "nut-uploader__preview-img__file"
|
|
6159
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
6160
|
+
onClick: () => handleItemClick(item),
|
|
6161
|
+
className: "nut-uploader__preview-img__file__name"
|
|
6162
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
6163
|
+
color: "#808080",
|
|
6164
|
+
name: "link"
|
|
6165
|
+
}), "\xA0", item.name))), /* @__PURE__ */ React__default.createElement("div", {
|
|
6114
6166
|
className: "tips"
|
|
6115
|
-
}, item.
|
|
6116
|
-
|
|
6117
|
-
|
|
6167
|
+
}, item.name)), listType == "list" && /* @__PURE__ */ React__default.createElement("div", {
|
|
6168
|
+
className: "nut-uploader__preview-list"
|
|
6169
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
6170
|
+
className: `nut-uploader__preview-img__file__name ${item.status}`,
|
|
6171
|
+
onClick: () => handleItemClick(item)
|
|
6172
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
6173
|
+
name: "link"
|
|
6174
|
+
}), "\xA0", item.name), /* @__PURE__ */ React__default.createElement(Icon, {
|
|
6175
|
+
color: "#808080",
|
|
6176
|
+
className: "nut-uploader__preview-img__file__del",
|
|
6177
|
+
name: "del",
|
|
6178
|
+
click: () => onDelete(item, index2)
|
|
6179
|
+
})));
|
|
6180
|
+
}), maximum > fileList.length && listType == "picture" && !children && /* @__PURE__ */ React__default.createElement("div", {
|
|
6181
|
+
className: `nut-uploader__upload ${listType}`
|
|
6118
6182
|
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
6183
|
+
size: uploadIconSize,
|
|
6119
6184
|
color: "#808080",
|
|
6120
6185
|
name: uploadIcon
|
|
6121
6186
|
}), capture ? /* @__PURE__ */ React__default.createElement("input", {
|
|
@@ -6135,12 +6200,12 @@ const InternalUploader = (props, ref) => {
|
|
|
6135
6200
|
disabled,
|
|
6136
6201
|
multiple,
|
|
6137
6202
|
onChange: fileChange
|
|
6138
|
-
})))
|
|
6203
|
+
})));
|
|
6139
6204
|
};
|
|
6140
6205
|
const Uploader = React__default.forwardRef(InternalUploader);
|
|
6141
|
-
Uploader.defaultProps = defaultProps$
|
|
6206
|
+
Uploader.defaultProps = defaultProps$u;
|
|
6142
6207
|
Uploader.displayName = "NutUploader";
|
|
6143
|
-
const defaultProps$
|
|
6208
|
+
const defaultProps$t = {
|
|
6144
6209
|
cancelTxt: "",
|
|
6145
6210
|
optionTag: "name",
|
|
6146
6211
|
optionSubTag: "subname",
|
|
@@ -6158,7 +6223,7 @@ const defaultProps$s = {
|
|
|
6158
6223
|
style: {}
|
|
6159
6224
|
};
|
|
6160
6225
|
const ActionSheet = (props) => {
|
|
6161
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
6226
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$t), props), {
|
|
6162
6227
|
cancelTxt,
|
|
6163
6228
|
optionTag,
|
|
6164
6229
|
optionSubTag,
|
|
@@ -6229,9 +6294,9 @@ const ActionSheet = (props) => {
|
|
|
6229
6294
|
onClick: () => cancelActionSheet()
|
|
6230
6295
|
}, cancelTxt)));
|
|
6231
6296
|
};
|
|
6232
|
-
ActionSheet.defaultProps = defaultProps$
|
|
6297
|
+
ActionSheet.defaultProps = defaultProps$t;
|
|
6233
6298
|
ActionSheet.displayName = "NutActionSheet";
|
|
6234
|
-
const defaultProps$
|
|
6299
|
+
const defaultProps$s = {
|
|
6235
6300
|
bottom: 20,
|
|
6236
6301
|
right: 10,
|
|
6237
6302
|
elId: "",
|
|
@@ -6253,39 +6318,39 @@ const BackTop = (props) => {
|
|
|
6253
6318
|
duration,
|
|
6254
6319
|
style,
|
|
6255
6320
|
backTopClick
|
|
6256
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
6321
|
+
} = __spreadValues(__spreadValues({}, defaultProps$s), props);
|
|
6257
6322
|
const [backTop, SetBackTop] = useState(false);
|
|
6258
6323
|
const [scrollTop, SetScrollTop] = useState(0);
|
|
6259
6324
|
let startTime = 0;
|
|
6260
|
-
let scrollEl =
|
|
6325
|
+
let scrollEl = useRef(null);
|
|
6261
6326
|
useEffect(() => {
|
|
6262
6327
|
init();
|
|
6263
6328
|
return () => removeEventListener();
|
|
6264
6329
|
}, []);
|
|
6265
6330
|
const init = () => {
|
|
6266
6331
|
if (elId && document.getElementById(elId)) {
|
|
6267
|
-
scrollEl = document.getElementById(elId);
|
|
6332
|
+
scrollEl.current = document.getElementById(elId);
|
|
6268
6333
|
}
|
|
6269
6334
|
addEventListener();
|
|
6270
6335
|
initCancelAniFrame();
|
|
6271
6336
|
};
|
|
6272
6337
|
const scrollListener = () => {
|
|
6273
6338
|
let top = null;
|
|
6274
|
-
if (scrollEl instanceof Window) {
|
|
6275
|
-
top = scrollEl.pageYOffset;
|
|
6339
|
+
if (scrollEl.current instanceof Window) {
|
|
6340
|
+
top = scrollEl.current.pageYOffset;
|
|
6276
6341
|
SetScrollTop(top);
|
|
6277
6342
|
} else {
|
|
6278
|
-
top = scrollEl.scrollTop;
|
|
6343
|
+
top = scrollEl.current.scrollTop;
|
|
6279
6344
|
SetScrollTop(top);
|
|
6280
6345
|
}
|
|
6281
6346
|
const showBtn = top >= distance;
|
|
6282
6347
|
SetBackTop(showBtn);
|
|
6283
6348
|
};
|
|
6284
6349
|
const scroll = (y2 = 0) => {
|
|
6285
|
-
if (scrollEl instanceof Window) {
|
|
6350
|
+
if (scrollEl.current instanceof Window) {
|
|
6286
6351
|
window.scrollTo(0, y2);
|
|
6287
6352
|
} else {
|
|
6288
|
-
scrollEl.scrollTop = y2;
|
|
6353
|
+
scrollEl.current.scrollTop = y2;
|
|
6289
6354
|
}
|
|
6290
6355
|
};
|
|
6291
6356
|
const scrollAnimation = () => {
|
|
@@ -6308,12 +6373,14 @@ const BackTop = (props) => {
|
|
|
6308
6373
|
};
|
|
6309
6374
|
};
|
|
6310
6375
|
function addEventListener() {
|
|
6311
|
-
|
|
6312
|
-
scrollEl.addEventListener("
|
|
6376
|
+
var _a, _b;
|
|
6377
|
+
(_a = scrollEl.current) == null ? void 0 : _a.addEventListener("scroll", scrollListener, false);
|
|
6378
|
+
(_b = scrollEl.current) == null ? void 0 : _b.addEventListener("resize", scrollListener, false);
|
|
6313
6379
|
}
|
|
6314
6380
|
function removeEventListener() {
|
|
6315
|
-
|
|
6316
|
-
scrollEl.removeEventListener("
|
|
6381
|
+
var _a, _b;
|
|
6382
|
+
(_a = scrollEl.current) == null ? void 0 : _a.removeEventListener("scroll", scrollListener, false);
|
|
6383
|
+
(_b = scrollEl.current) == null ? void 0 : _b.removeEventListener("resize", scrollListener, false);
|
|
6317
6384
|
}
|
|
6318
6385
|
const goTop = (e2) => {
|
|
6319
6386
|
backTopClick(e2);
|
|
@@ -6336,7 +6403,7 @@ const BackTop = (props) => {
|
|
|
6336
6403
|
name: "top"
|
|
6337
6404
|
}));
|
|
6338
6405
|
};
|
|
6339
|
-
BackTop.defaultProps = defaultProps$
|
|
6406
|
+
BackTop.defaultProps = defaultProps$s;
|
|
6340
6407
|
BackTop.displayName = "NutBackTop";
|
|
6341
6408
|
function clamp(v2, min, max) {
|
|
6342
6409
|
return Math.max(min, Math.min(v2, max));
|
|
@@ -10738,7 +10805,7 @@ const host = createHost(primitives, {
|
|
|
10738
10805
|
}
|
|
10739
10806
|
});
|
|
10740
10807
|
const animated = host.animated;
|
|
10741
|
-
const defaultProps$
|
|
10808
|
+
const defaultProps$r = {
|
|
10742
10809
|
attract: false,
|
|
10743
10810
|
direction: void 0,
|
|
10744
10811
|
boundary: {
|
|
@@ -10750,7 +10817,7 @@ const defaultProps$q = {
|
|
|
10750
10817
|
className: ""
|
|
10751
10818
|
};
|
|
10752
10819
|
const Drag = (props) => {
|
|
10753
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
10820
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$r), props), { attract, direction, boundary, children, className, style } = _a, reset = __objRest(_a, ["attract", "direction", "boundary", "children", "className", "style"]);
|
|
10754
10821
|
const b2 = cn("drag");
|
|
10755
10822
|
const [boundaryState, setBoundaryState] = useState(boundary);
|
|
10756
10823
|
const myDrag = useRef(null);
|
|
@@ -10806,7 +10873,7 @@ const Drag = (props) => {
|
|
|
10806
10873
|
style: currstyle
|
|
10807
10874
|
}, bind()), children));
|
|
10808
10875
|
};
|
|
10809
|
-
Drag.defaultProps = defaultProps$
|
|
10876
|
+
Drag.defaultProps = defaultProps$r;
|
|
10810
10877
|
Drag.displayName = "NutDrag";
|
|
10811
10878
|
const Content = (props) => {
|
|
10812
10879
|
const { visible, title, footer, textAlign, footerDirection, children } = props;
|
|
@@ -10965,7 +11032,7 @@ function confirm(config2, renderFunc) {
|
|
|
10965
11032
|
update: update2
|
|
10966
11033
|
};
|
|
10967
11034
|
}
|
|
10968
|
-
const defaultProps$
|
|
11035
|
+
const defaultProps$q = {
|
|
10969
11036
|
okText: "\u786E\u5B9A",
|
|
10970
11037
|
cancelText: "\u53D6\u6D88",
|
|
10971
11038
|
mask: true,
|
|
@@ -11062,9 +11129,9 @@ Dialog.confirm = (props) => {
|
|
|
11062
11129
|
}));
|
|
11063
11130
|
};
|
|
11064
11131
|
});
|
|
11065
|
-
Dialog.defaultProps = defaultProps$
|
|
11132
|
+
Dialog.defaultProps = defaultProps$q;
|
|
11066
11133
|
Dialog.displayName = "NutDialog";
|
|
11067
|
-
const defaultProps$
|
|
11134
|
+
const defaultProps$p = {
|
|
11068
11135
|
hasMore: true,
|
|
11069
11136
|
threshold: 200,
|
|
11070
11137
|
containerId: "",
|
|
@@ -11079,7 +11146,7 @@ const defaultProps$o = {
|
|
|
11079
11146
|
};
|
|
11080
11147
|
const Infiniteloading = (props) => {
|
|
11081
11148
|
const { locale } = useConfig();
|
|
11082
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
11149
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$p), props), {
|
|
11083
11150
|
children,
|
|
11084
11151
|
hasMore,
|
|
11085
11152
|
threshold,
|
|
@@ -11267,7 +11334,7 @@ const Infiniteloading = (props) => {
|
|
|
11267
11334
|
className: "tips"
|
|
11268
11335
|
}, locale.infiniteloading.loadMoreText || loadMoreTxt)));
|
|
11269
11336
|
};
|
|
11270
|
-
Infiniteloading.defaultProps = defaultProps$
|
|
11337
|
+
Infiniteloading.defaultProps = defaultProps$p;
|
|
11271
11338
|
Infiniteloading.displayName = "NutInfiniteloading";
|
|
11272
11339
|
class Notification extends React.PureComponent {
|
|
11273
11340
|
constructor(props) {
|
|
@@ -11424,7 +11491,7 @@ var Notify = {
|
|
|
11424
11491
|
}
|
|
11425
11492
|
}
|
|
11426
11493
|
};
|
|
11427
|
-
const defaultProps$
|
|
11494
|
+
const defaultProps$o = {
|
|
11428
11495
|
isAsync: false,
|
|
11429
11496
|
checked: false,
|
|
11430
11497
|
disable: false,
|
|
@@ -11446,7 +11513,7 @@ const Switch = (props) => {
|
|
|
11446
11513
|
change,
|
|
11447
11514
|
className,
|
|
11448
11515
|
style
|
|
11449
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
11516
|
+
} = __spreadValues(__spreadValues({}, defaultProps$o), props);
|
|
11450
11517
|
const [value, setValue] = useState(false);
|
|
11451
11518
|
const b2 = cn("switch");
|
|
11452
11519
|
useEffect(() => {
|
|
@@ -11483,92 +11550,124 @@ const Switch = (props) => {
|
|
|
11483
11550
|
className: `${b2("label")} close`
|
|
11484
11551
|
}, inactiveText))));
|
|
11485
11552
|
};
|
|
11486
|
-
Switch.defaultProps = defaultProps$
|
|
11553
|
+
Switch.defaultProps = defaultProps$o;
|
|
11487
11554
|
Switch.displayName = "NutSwitch";
|
|
11488
|
-
const
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11555
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
|
11556
|
+
const defaultProps$n = {
|
|
11557
|
+
strokeWidth: 5,
|
|
11558
|
+
radius: 50,
|
|
11559
|
+
strokeLinecap: "round",
|
|
11560
|
+
circleColor: "",
|
|
11561
|
+
pathColor: "",
|
|
11562
|
+
clockwise: true
|
|
11493
11563
|
};
|
|
11494
11564
|
const CircleProgress = (props) => {
|
|
11495
|
-
|
|
11565
|
+
var _b;
|
|
11566
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$n), props), {
|
|
11496
11567
|
children,
|
|
11497
|
-
strokeInnerWidth,
|
|
11498
11568
|
progress,
|
|
11499
|
-
isAuto,
|
|
11500
|
-
progressOption,
|
|
11501
11569
|
className,
|
|
11502
|
-
|
|
11570
|
+
radius,
|
|
11571
|
+
pathColor,
|
|
11572
|
+
clockwise,
|
|
11573
|
+
circleColor,
|
|
11574
|
+
strokeWidth,
|
|
11575
|
+
style,
|
|
11576
|
+
strokeLinecap
|
|
11503
11577
|
} = _a, restProps = __objRest(_a, [
|
|
11504
11578
|
"children",
|
|
11505
|
-
"strokeInnerWidth",
|
|
11506
11579
|
"progress",
|
|
11507
|
-
"isAuto",
|
|
11508
|
-
"progressOption",
|
|
11509
11580
|
"className",
|
|
11510
|
-
"
|
|
11581
|
+
"radius",
|
|
11582
|
+
"pathColor",
|
|
11583
|
+
"clockwise",
|
|
11584
|
+
"circleColor",
|
|
11585
|
+
"strokeWidth",
|
|
11586
|
+
"style",
|
|
11587
|
+
"strokeLinecap"
|
|
11511
11588
|
]);
|
|
11512
11589
|
const b2 = cn("circleprogress");
|
|
11513
11590
|
const classes = classNames(className, b2(""));
|
|
11514
|
-
const
|
|
11515
|
-
const baseOption = {
|
|
11516
|
-
radius: 50,
|
|
11517
|
-
strokeOutWidth: 10,
|
|
11518
|
-
backColor: "#d9d9d9",
|
|
11519
|
-
progressColor: "red",
|
|
11520
|
-
cy: 1,
|
|
11521
|
-
cx: 1,
|
|
11522
|
-
size: 1,
|
|
11523
|
-
startPosition: ""
|
|
11524
|
-
};
|
|
11525
|
-
Object.assign(baseOption, progressOption);
|
|
11526
|
-
baseOption.cy = baseOption.cx = baseOption.radius + baseOption.strokeOutWidth;
|
|
11527
|
-
baseOption.size = (baseOption.radius + baseOption.strokeOutWidth) * 2;
|
|
11528
|
-
baseOption.startPosition = `rotate(-90,${baseOption.cx},${baseOption.cy})`;
|
|
11529
|
-
return baseOption;
|
|
11530
|
-
};
|
|
11591
|
+
const refRandomId = Math.random().toString(36).slice(-8);
|
|
11531
11592
|
const styles = __spreadValues({
|
|
11532
|
-
height: `${
|
|
11533
|
-
width: `${
|
|
11593
|
+
height: `${Number(radius) * 2}px`,
|
|
11594
|
+
width: `${Number(radius) * 2}px`
|
|
11534
11595
|
}, style);
|
|
11535
|
-
const
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11596
|
+
const pathStyle = {
|
|
11597
|
+
stroke: pathColor
|
|
11598
|
+
};
|
|
11599
|
+
const hoverStyle = () => {
|
|
11600
|
+
let perimeter = 283;
|
|
11601
|
+
let offset = perimeter * Number(progress) / 100;
|
|
11602
|
+
return {
|
|
11603
|
+
stroke: isObject(circleColor) ? `url(#${refRandomId})` : circleColor,
|
|
11604
|
+
strokeDasharray: `${offset}px ${perimeter}px`
|
|
11605
|
+
};
|
|
11606
|
+
};
|
|
11607
|
+
const path = () => {
|
|
11608
|
+
const isWise = clockwise ? 1 : 0;
|
|
11609
|
+
return `M 50 50 m -45 0 a 45 45 0 1 ${isWise} 90 0 a 45 45 0 1 ${isWise} -90 0`;
|
|
11610
|
+
};
|
|
11611
|
+
const hoverColor = () => {
|
|
11612
|
+
return isObject(circleColor) ? `url(#${refRandomId})` : circleColor;
|
|
11613
|
+
};
|
|
11614
|
+
const stop2 = () => {
|
|
11615
|
+
if (!isObject(circleColor)) {
|
|
11616
|
+
return;
|
|
11617
|
+
}
|
|
11618
|
+
let color = circleColor;
|
|
11619
|
+
const colorArr = Object.keys(color).sort((a, b22) => parseFloat(a) - parseFloat(b22));
|
|
11620
|
+
let stopArr = [];
|
|
11621
|
+
colorArr.map((item) => {
|
|
11622
|
+
let obj = {
|
|
11623
|
+
key: "",
|
|
11624
|
+
value: ""
|
|
11625
|
+
};
|
|
11626
|
+
obj.key = item;
|
|
11627
|
+
obj.value = color[item];
|
|
11628
|
+
stopArr.push(obj);
|
|
11629
|
+
});
|
|
11630
|
+
return stopArr;
|
|
11539
11631
|
};
|
|
11540
11632
|
return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
|
|
11541
11633
|
className: classes,
|
|
11542
11634
|
style: styles
|
|
11543
11635
|
}, restProps), /* @__PURE__ */ React__default.createElement("svg", {
|
|
11544
|
-
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
|
|
11636
|
+
viewBox: "0 0 100 100"
|
|
11637
|
+
}, /* @__PURE__ */ React__default.createElement("defs", null, /* @__PURE__ */ React__default.createElement("linearGradient", {
|
|
11638
|
+
id: refRandomId,
|
|
11639
|
+
x1: "100%",
|
|
11640
|
+
y1: "0%",
|
|
11641
|
+
x2: "0%",
|
|
11642
|
+
y2: "0%"
|
|
11643
|
+
}, (_b = stop2()) == null ? void 0 : _b.map((item, index2) => {
|
|
11644
|
+
return /* @__PURE__ */ React__default.createElement("stop", {
|
|
11645
|
+
key: index2,
|
|
11646
|
+
offset: item.key,
|
|
11647
|
+
stopColor: item.value
|
|
11648
|
+
});
|
|
11649
|
+
}))), /* @__PURE__ */ React__default.createElement("path", {
|
|
11650
|
+
className: "nut-circleprogress-path",
|
|
11651
|
+
style: pathStyle,
|
|
11652
|
+
d: path(),
|
|
11653
|
+
fill: "none",
|
|
11654
|
+
strokeWidth
|
|
11655
|
+
}), /* @__PURE__ */ React__default.createElement("path", {
|
|
11656
|
+
className: "nut-circleprogress-hover",
|
|
11657
|
+
style: hoverStyle(),
|
|
11658
|
+
d: path(),
|
|
11562
11659
|
fill: "none",
|
|
11563
|
-
|
|
11564
|
-
|
|
11660
|
+
stroke: hoverColor(),
|
|
11661
|
+
strokeLinecap,
|
|
11662
|
+
transform: "rotate(90,50,50)",
|
|
11663
|
+
strokeWidth
|
|
11565
11664
|
})), /* @__PURE__ */ React__default.createElement("div", {
|
|
11566
|
-
className: "nut-circleprogress-
|
|
11567
|
-
},
|
|
11665
|
+
className: "nut-circleprogress-text"
|
|
11666
|
+
}, children ? children : /* @__PURE__ */ React__default.createElement("div", null, progress, "%")));
|
|
11568
11667
|
};
|
|
11569
|
-
CircleProgress.defaultProps = defaultProps$
|
|
11668
|
+
CircleProgress.defaultProps = defaultProps$n;
|
|
11570
11669
|
CircleProgress.displayName = "NutCircleProgress";
|
|
11571
|
-
const defaultProps$
|
|
11670
|
+
const defaultProps$m = {
|
|
11572
11671
|
direction: "across",
|
|
11573
11672
|
list: [],
|
|
11574
11673
|
standTime: 1e3,
|
|
@@ -11606,7 +11705,7 @@ const NoticeBar = (props) => {
|
|
|
11606
11705
|
rightIcon,
|
|
11607
11706
|
close,
|
|
11608
11707
|
click
|
|
11609
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
11708
|
+
} = __spreadValues(__spreadValues({}, defaultProps$m), props);
|
|
11610
11709
|
const wrap = useRef(null);
|
|
11611
11710
|
const content = useRef(null);
|
|
11612
11711
|
const [showNoticeBar, SetShowNoticeBar] = useState(true);
|
|
@@ -11819,17 +11918,17 @@ const NoticeBar = (props) => {
|
|
|
11819
11918
|
size: "11px"
|
|
11820
11919
|
}) : null))) : null);
|
|
11821
11920
|
};
|
|
11822
|
-
NoticeBar.defaultProps = defaultProps$
|
|
11921
|
+
NoticeBar.defaultProps = defaultProps$m;
|
|
11823
11922
|
NoticeBar.displayName = "NutNoticeBar";
|
|
11824
11923
|
const DataContext$1 = createContext({});
|
|
11825
|
-
const defaultProps$
|
|
11924
|
+
const defaultProps$l = {
|
|
11826
11925
|
current: 0,
|
|
11827
11926
|
direction: "horizontal",
|
|
11828
11927
|
progressDot: false
|
|
11829
11928
|
};
|
|
11830
11929
|
const Steps = (props) => {
|
|
11831
|
-
const propSteps = __spreadValues(__spreadValues({}, defaultProps$
|
|
11832
|
-
const _a = propSteps, { children, direction, className } = _a, restProps = __objRest(_a, ["children", "direction", "className"]);
|
|
11930
|
+
const propSteps = __spreadValues(__spreadValues({}, defaultProps$l), props);
|
|
11931
|
+
const _a = propSteps, { children, current, direction, className, progressDot, clickStep } = _a, restProps = __objRest(_a, ["children", "current", "direction", "className", "progressDot", "clickStep"]);
|
|
11833
11932
|
const parentSteps = {
|
|
11834
11933
|
propSteps
|
|
11835
11934
|
};
|
|
@@ -11844,22 +11943,24 @@ const Steps = (props) => {
|
|
|
11844
11943
|
className: classes
|
|
11845
11944
|
}, restProps), children));
|
|
11846
11945
|
};
|
|
11847
|
-
Steps.defaultProps = defaultProps$
|
|
11946
|
+
Steps.defaultProps = defaultProps$l;
|
|
11848
11947
|
Steps.displayName = "NutSteps";
|
|
11849
|
-
const defaultProps$
|
|
11948
|
+
const defaultProps$k = {
|
|
11850
11949
|
title: "",
|
|
11851
11950
|
content: "",
|
|
11852
11951
|
activeIndex: 0,
|
|
11853
11952
|
icon: "",
|
|
11953
|
+
iconColor: "",
|
|
11854
11954
|
size: "12px"
|
|
11855
11955
|
};
|
|
11856
11956
|
const Step = (props) => {
|
|
11857
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
11957
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$k), props), {
|
|
11858
11958
|
children,
|
|
11859
11959
|
title,
|
|
11860
11960
|
content,
|
|
11861
11961
|
activeIndex,
|
|
11862
11962
|
icon,
|
|
11963
|
+
iconColor,
|
|
11863
11964
|
size,
|
|
11864
11965
|
className,
|
|
11865
11966
|
renderContent
|
|
@@ -11869,6 +11970,7 @@ const Step = (props) => {
|
|
|
11869
11970
|
"content",
|
|
11870
11971
|
"activeIndex",
|
|
11871
11972
|
"icon",
|
|
11973
|
+
"iconColor",
|
|
11872
11974
|
"size",
|
|
11873
11975
|
"className",
|
|
11874
11976
|
"renderContent"
|
|
@@ -11881,13 +11983,19 @@ const Step = (props) => {
|
|
|
11881
11983
|
return "finish";
|
|
11882
11984
|
return index2 === +parent.propSteps.current ? "process" : "wait";
|
|
11883
11985
|
};
|
|
11986
|
+
const handleClickStep = () => {
|
|
11987
|
+
var _a2;
|
|
11988
|
+
(_a2 = parent.propSteps) == null ? void 0 : _a2.clickStep(activeIndex);
|
|
11989
|
+
};
|
|
11884
11990
|
const b2 = cn("step");
|
|
11885
11991
|
const classes = classNames({
|
|
11886
11992
|
[`${b2("")}-${getCurrentStatus()}`]: true
|
|
11887
11993
|
}, className, b2(""));
|
|
11888
|
-
return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
|
|
11994
|
+
return /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues({
|
|
11889
11995
|
className: classes
|
|
11890
|
-
}, restProps),
|
|
11996
|
+
}, restProps), {
|
|
11997
|
+
onClick: handleClickStep
|
|
11998
|
+
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
11891
11999
|
className: "nut-step-head"
|
|
11892
12000
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
11893
12001
|
className: "nut-step-line"
|
|
@@ -11895,6 +12003,7 @@ const Step = (props) => {
|
|
|
11895
12003
|
className: `nut-step-icon ${!dot ? icon ? "is-icon" : "is-text" : ""}`
|
|
11896
12004
|
}, icon ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
11897
12005
|
className: "nut-step-icon-inner",
|
|
12006
|
+
color: iconColor,
|
|
11898
12007
|
name: icon,
|
|
11899
12008
|
size
|
|
11900
12009
|
}) : dot ? /* @__PURE__ */ React__default.createElement("span", null) : /* @__PURE__ */ React__default.createElement("span", {
|
|
@@ -11909,11 +12018,11 @@ const Step = (props) => {
|
|
|
11909
12018
|
className: "nut-step-content"
|
|
11910
12019
|
}, renderContent())));
|
|
11911
12020
|
};
|
|
11912
|
-
Step.defaultProps = defaultProps$
|
|
12021
|
+
Step.defaultProps = defaultProps$k;
|
|
11913
12022
|
Step.displayName = "NutStep";
|
|
11914
12023
|
const DataContext = createContext({});
|
|
11915
|
-
const defaultProps$
|
|
11916
|
-
width: window.innerWidth,
|
|
12024
|
+
const defaultProps$j = {
|
|
12025
|
+
width: typeof window === "object" ? window.innerWidth : 375,
|
|
11917
12026
|
height: 0,
|
|
11918
12027
|
duration: 500,
|
|
11919
12028
|
initPage: 0,
|
|
@@ -11929,7 +12038,7 @@ const defaultProps$i = {
|
|
|
11929
12038
|
};
|
|
11930
12039
|
const DISTANCE = 5;
|
|
11931
12040
|
const Swiper = React__default.forwardRef((props, ref) => {
|
|
11932
|
-
const propSwiper = __spreadValues(__spreadValues({}, defaultProps$
|
|
12041
|
+
const propSwiper = __spreadValues(__spreadValues({}, defaultProps$j), props);
|
|
11933
12042
|
const _a = propSwiper, {
|
|
11934
12043
|
children,
|
|
11935
12044
|
direction,
|
|
@@ -12305,13 +12414,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
12305
12414
|
});
|
|
12306
12415
|
})) : /* @__PURE__ */ React__default.createElement("div", null, pageContent)));
|
|
12307
12416
|
});
|
|
12308
|
-
Swiper.defaultProps = defaultProps$
|
|
12417
|
+
Swiper.defaultProps = defaultProps$j;
|
|
12309
12418
|
Swiper.displayName = "NutSwiper";
|
|
12310
|
-
const defaultProps$
|
|
12419
|
+
const defaultProps$i = {
|
|
12311
12420
|
direction: "horizontal"
|
|
12312
12421
|
};
|
|
12313
12422
|
const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
12314
|
-
const _props = __spreadValues(__spreadValues({}, defaultProps$
|
|
12423
|
+
const _props = __spreadValues(__spreadValues({}, defaultProps$i), props);
|
|
12315
12424
|
const { children, direction, size } = _props;
|
|
12316
12425
|
const parent = useContext$1(DataContext);
|
|
12317
12426
|
const [offset, setOffset] = useState(0);
|
|
@@ -12339,51 +12448,158 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
|
12339
12448
|
style: style()
|
|
12340
12449
|
}, children);
|
|
12341
12450
|
});
|
|
12342
|
-
SwiperItem.defaultProps = defaultProps$
|
|
12451
|
+
SwiperItem.defaultProps = defaultProps$i;
|
|
12343
12452
|
SwiperItem.displayName = "NutSwiperItem";
|
|
12344
|
-
const
|
|
12345
|
-
|
|
12453
|
+
const AvatarContext = createContext({});
|
|
12454
|
+
const defaultProps$h = {
|
|
12455
|
+
size: "",
|
|
12346
12456
|
icon: "",
|
|
12347
|
-
shape: "round",
|
|
12348
12457
|
bgColor: "#eee",
|
|
12458
|
+
color: "#666",
|
|
12349
12459
|
prefixCls: "nut-avatar",
|
|
12350
|
-
|
|
12460
|
+
url: "",
|
|
12461
|
+
alt: ""
|
|
12351
12462
|
};
|
|
12352
12463
|
const Avatar = (props) => {
|
|
12353
|
-
|
|
12354
|
-
const
|
|
12464
|
+
var _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
12465
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$h), props), {
|
|
12466
|
+
children,
|
|
12467
|
+
prefixCls,
|
|
12468
|
+
size,
|
|
12469
|
+
shape,
|
|
12470
|
+
bgColor,
|
|
12471
|
+
color,
|
|
12472
|
+
url,
|
|
12473
|
+
alt,
|
|
12474
|
+
icon,
|
|
12475
|
+
className,
|
|
12476
|
+
style,
|
|
12477
|
+
activeAvatar,
|
|
12478
|
+
onError
|
|
12479
|
+
} = _a, rest = __objRest(_a, [
|
|
12480
|
+
"children",
|
|
12481
|
+
"prefixCls",
|
|
12482
|
+
"size",
|
|
12483
|
+
"shape",
|
|
12484
|
+
"bgColor",
|
|
12485
|
+
"color",
|
|
12486
|
+
"url",
|
|
12487
|
+
"alt",
|
|
12488
|
+
"icon",
|
|
12489
|
+
"className",
|
|
12490
|
+
"style",
|
|
12491
|
+
"activeAvatar",
|
|
12492
|
+
"onError"
|
|
12493
|
+
]);
|
|
12494
|
+
const [maxSum, setMaxSum] = useState(0);
|
|
12495
|
+
const [showMax, setShowMax] = useState(false);
|
|
12496
|
+
const [avatarIndex, setAvatarIndex] = useState(1);
|
|
12497
|
+
const avatarRef = useRef(null);
|
|
12498
|
+
const parent = useContext$1(AvatarContext);
|
|
12499
|
+
const b2 = cn("avatar");
|
|
12355
12500
|
const classes = classNames({
|
|
12356
|
-
[
|
|
12357
|
-
[`avatar-${
|
|
12358
|
-
[`avatar-${shape}`]: true
|
|
12501
|
+
[`nut-avatar-${size || ((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.size) || "normal"}`]: true,
|
|
12502
|
+
[`nut-avatar-${shape || ((_c = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c.shape) || "round"}`]: true
|
|
12359
12503
|
});
|
|
12360
|
-
const cls = classNames(classes, className);
|
|
12504
|
+
const cls = classNames(b2(""), classes, className);
|
|
12505
|
+
const sizeValue = ["large", "normal", "small"];
|
|
12361
12506
|
const styles = __spreadValues({
|
|
12362
12507
|
width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
12363
12508
|
height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
12364
|
-
|
|
12365
|
-
|
|
12509
|
+
backgroundColor: `${bgColor}`,
|
|
12510
|
+
color: `${color}`,
|
|
12511
|
+
marginLeft: avatarIndex != 1 && ((_d = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _d.span) ? `${(_e = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _e.span}px` : "",
|
|
12512
|
+
zIndex: ((_f = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _f.zIndex) == "right" ? `${Math.abs(maxSum - avatarIndex)}` : ""
|
|
12366
12513
|
}, style);
|
|
12367
|
-
const
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12514
|
+
const maxStyles = {
|
|
12515
|
+
backgroundColor: `${(_g = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _g.maxBgColor}`,
|
|
12516
|
+
color: `${(_h = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _h.maxColor}`
|
|
12517
|
+
};
|
|
12518
|
+
const iconStyles = !!icon ? icon : "";
|
|
12519
|
+
useEffect(() => {
|
|
12520
|
+
var _a2;
|
|
12521
|
+
const avatarChildren = (_a2 = parent == null ? void 0 : parent.avatarGroupRef) == null ? void 0 : _a2.current.children;
|
|
12522
|
+
if (avatarChildren) {
|
|
12523
|
+
avatarLength(avatarChildren);
|
|
12524
|
+
}
|
|
12525
|
+
}, []);
|
|
12526
|
+
const avatarLength = (children2) => {
|
|
12527
|
+
var _a2, _b2, _c2;
|
|
12528
|
+
for (let i = 0; i < children2.length; i++) {
|
|
12529
|
+
if (children2[i] && children2[i].classList && children2[i].classList[0] == "nut-avatar") {
|
|
12530
|
+
children2[i].setAttribute("data-index", i + 1);
|
|
12531
|
+
}
|
|
12532
|
+
}
|
|
12533
|
+
const index2 = (_b2 = (_a2 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a2.dataset) == null ? void 0 : _b2.index;
|
|
12534
|
+
const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.maxCount;
|
|
12535
|
+
setMaxSum(children2.length);
|
|
12536
|
+
setAvatarIndex(index2);
|
|
12537
|
+
if (index2 == children2.length && index2 != maxCount && children2.length > maxCount) {
|
|
12538
|
+
setShowMax(true);
|
|
12371
12539
|
}
|
|
12372
12540
|
};
|
|
12373
|
-
|
|
12541
|
+
const errorEvent = (e2) => {
|
|
12542
|
+
if (props.onError) {
|
|
12543
|
+
props.onError(e2);
|
|
12544
|
+
}
|
|
12545
|
+
};
|
|
12546
|
+
const clickAvatar = (e2) => {
|
|
12547
|
+
if (props.activeAvatar) {
|
|
12548
|
+
props.activeAvatar(e2);
|
|
12549
|
+
}
|
|
12550
|
+
};
|
|
12551
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (showMax || !((_i = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _i.maxCount) || avatarIndex <= ((_j = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _j.maxCount)) && /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues({
|
|
12374
12552
|
className: cls
|
|
12375
12553
|
}, rest), {
|
|
12376
|
-
style: styles,
|
|
12377
|
-
onClick:
|
|
12378
|
-
|
|
12554
|
+
style: !showMax ? styles : maxStyles,
|
|
12555
|
+
onClick: clickAvatar,
|
|
12556
|
+
ref: avatarRef
|
|
12557
|
+
}), (!((_k = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _k.maxCount) || avatarIndex <= ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxCount)) && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, url && /* @__PURE__ */ React__default.createElement("img", {
|
|
12558
|
+
src: url,
|
|
12559
|
+
alt,
|
|
12560
|
+
onError: errorEvent
|
|
12561
|
+
}), icon && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
12379
12562
|
className: "icon",
|
|
12380
12563
|
name: iconStyles
|
|
12381
12564
|
}), children && /* @__PURE__ */ React__default.createElement("span", {
|
|
12382
12565
|
className: "text"
|
|
12383
|
-
}, children))
|
|
12566
|
+
}, children)), showMax && /* @__PURE__ */ React__default.createElement("div", {
|
|
12567
|
+
className: "text"
|
|
12568
|
+
}, ((_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)}`)));
|
|
12384
12569
|
};
|
|
12385
|
-
Avatar.defaultProps = defaultProps$
|
|
12570
|
+
Avatar.defaultProps = defaultProps$h;
|
|
12386
12571
|
Avatar.displayName = "NutAvatar";
|
|
12572
|
+
const defaultProps$g = {
|
|
12573
|
+
maxContent: "",
|
|
12574
|
+
maxCount: "",
|
|
12575
|
+
maxBgColor: "#eee",
|
|
12576
|
+
maxColor: "#666",
|
|
12577
|
+
size: "",
|
|
12578
|
+
shape: "",
|
|
12579
|
+
span: "-8",
|
|
12580
|
+
zIndex: "left"
|
|
12581
|
+
};
|
|
12582
|
+
const AvatarGroup = (props) => {
|
|
12583
|
+
useConfig();
|
|
12584
|
+
const propAvatarGroup = __spreadValues(__spreadValues({}, defaultProps$g), props);
|
|
12585
|
+
const { className, style, children } = propAvatarGroup;
|
|
12586
|
+
const avatarGroupRef = useRef(null);
|
|
12587
|
+
const b2 = cn("avatar-group");
|
|
12588
|
+
const cls = classNames(b2(""), className);
|
|
12589
|
+
const parentAvatar = {
|
|
12590
|
+
propAvatarGroup,
|
|
12591
|
+
avatarGroupRef
|
|
12592
|
+
};
|
|
12593
|
+
return /* @__PURE__ */ React__default.createElement(AvatarContext.Provider, {
|
|
12594
|
+
value: parentAvatar
|
|
12595
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
12596
|
+
className: cls,
|
|
12597
|
+
style,
|
|
12598
|
+
ref: avatarGroupRef
|
|
12599
|
+
}, children));
|
|
12600
|
+
};
|
|
12601
|
+
AvatarGroup.defaultProps = defaultProps$g;
|
|
12602
|
+
AvatarGroup.displayName = "NutAvatarGroup";
|
|
12387
12603
|
const defaultProps$f = {
|
|
12388
12604
|
price: 0,
|
|
12389
12605
|
needSymbol: true,
|
|
@@ -12746,8 +12962,8 @@ const Popover = (props) => {
|
|
|
12746
12962
|
Popover.defaultProps = defaultProps$c;
|
|
12747
12963
|
Popover.displayName = "NutPopover";
|
|
12748
12964
|
const defaultProps$b = {
|
|
12749
|
-
width:
|
|
12750
|
-
height:
|
|
12965
|
+
width: "100px",
|
|
12966
|
+
height: "100px",
|
|
12751
12967
|
row: 1,
|
|
12752
12968
|
animated: false,
|
|
12753
12969
|
title: false,
|
|
@@ -12799,33 +13015,40 @@ const Skeleton = (props) => {
|
|
|
12799
13015
|
return Array.from({ length: num }, (v2, i) => i);
|
|
12800
13016
|
};
|
|
12801
13017
|
const getStyle = () => {
|
|
13018
|
+
if (avatarSize) {
|
|
13019
|
+
return {
|
|
13020
|
+
width: avatarSize,
|
|
13021
|
+
height: avatarSize
|
|
13022
|
+
};
|
|
13023
|
+
}
|
|
12802
13024
|
return {
|
|
12803
|
-
width:
|
|
12804
|
-
height:
|
|
13025
|
+
width: "50px",
|
|
13026
|
+
height: "50px"
|
|
12805
13027
|
};
|
|
12806
13028
|
};
|
|
12807
13029
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, loading ? /* @__PURE__ */ React__default.createElement("div", null, children) : /* @__PURE__ */ React__default.createElement("div", __spreadValues({
|
|
12808
13030
|
className: classes
|
|
12809
|
-
}, restProps), /* @__PURE__ */ React__default.createElement("div", {
|
|
13031
|
+
}, restProps), animated2 && /* @__PURE__ */ React__default.createElement("div", {
|
|
12810
13032
|
className: "skeleton-animation"
|
|
12811
13033
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
12812
13034
|
className: "nut-skeleton-content"
|
|
12813
13035
|
}, avatar && /* @__PURE__ */ React__default.createElement(Avatar, {
|
|
12814
13036
|
className: avatarClass,
|
|
12815
13037
|
bgColor: "rgb(239, 239, 239)",
|
|
13038
|
+
shape: avatarShape,
|
|
12816
13039
|
style: getStyle()
|
|
12817
|
-
}), row === 1
|
|
13040
|
+
}), row === 1 && /* @__PURE__ */ React__default.createElement("div", {
|
|
12818
13041
|
className: blockClass,
|
|
12819
|
-
style: { width
|
|
12820
|
-
})
|
|
13042
|
+
style: { width, height }
|
|
13043
|
+
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
12821
13044
|
className: "skeleton-content-line"
|
|
12822
13045
|
}, title && /* @__PURE__ */ React__default.createElement("div", {
|
|
12823
13046
|
className: "skeleton-title"
|
|
12824
13047
|
}), repeatLines(row).map((item, index2) => {
|
|
12825
13048
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
12826
|
-
className:
|
|
13049
|
+
className: blockClass,
|
|
12827
13050
|
key: index2,
|
|
12828
|
-
style: { width
|
|
13051
|
+
style: { width, height }
|
|
12829
13052
|
});
|
|
12830
13053
|
})))));
|
|
12831
13054
|
};
|
|
@@ -13817,7 +14040,6 @@ const InternalBarrage = (props, ref) => {
|
|
|
13817
14040
|
barrageContainer.current.appendChild(el);
|
|
13818
14041
|
const width = el.offsetWidth;
|
|
13819
14042
|
const height = el.offsetHeight;
|
|
13820
|
-
console.log(el.offsetWidth, el.offsetHeight);
|
|
13821
14043
|
el.classList.add("move");
|
|
13822
14044
|
el.style.animationDuration = `${speeds}ms`;
|
|
13823
14045
|
el.style.top = `${_index % rows * (height + top) + 20}px`;
|
|
@@ -14023,4 +14245,4 @@ const Card = (props) => {
|
|
|
14023
14245
|
};
|
|
14024
14246
|
Card.defaultProps = defaultProps;
|
|
14025
14247
|
Card.displayName = "NutCard";
|
|
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 };
|
|
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 };
|