@nutui/nutui-react 1.1.4-beta.0 → 1.1.4-beta.3
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/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 +459 -239
- 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.3 Mon May 23 2022 14:47:48 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,7 +6318,7 @@ 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;
|
|
@@ -6336,7 +6401,7 @@ const BackTop = (props) => {
|
|
|
6336
6401
|
name: "top"
|
|
6337
6402
|
}));
|
|
6338
6403
|
};
|
|
6339
|
-
BackTop.defaultProps = defaultProps$
|
|
6404
|
+
BackTop.defaultProps = defaultProps$s;
|
|
6340
6405
|
BackTop.displayName = "NutBackTop";
|
|
6341
6406
|
function clamp(v2, min, max) {
|
|
6342
6407
|
return Math.max(min, Math.min(v2, max));
|
|
@@ -10738,7 +10803,7 @@ const host = createHost(primitives, {
|
|
|
10738
10803
|
}
|
|
10739
10804
|
});
|
|
10740
10805
|
const animated = host.animated;
|
|
10741
|
-
const defaultProps$
|
|
10806
|
+
const defaultProps$r = {
|
|
10742
10807
|
attract: false,
|
|
10743
10808
|
direction: void 0,
|
|
10744
10809
|
boundary: {
|
|
@@ -10750,7 +10815,7 @@ const defaultProps$q = {
|
|
|
10750
10815
|
className: ""
|
|
10751
10816
|
};
|
|
10752
10817
|
const Drag = (props) => {
|
|
10753
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
10818
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$r), props), { attract, direction, boundary, children, className, style } = _a, reset = __objRest(_a, ["attract", "direction", "boundary", "children", "className", "style"]);
|
|
10754
10819
|
const b2 = cn("drag");
|
|
10755
10820
|
const [boundaryState, setBoundaryState] = useState(boundary);
|
|
10756
10821
|
const myDrag = useRef(null);
|
|
@@ -10806,7 +10871,7 @@ const Drag = (props) => {
|
|
|
10806
10871
|
style: currstyle
|
|
10807
10872
|
}, bind()), children));
|
|
10808
10873
|
};
|
|
10809
|
-
Drag.defaultProps = defaultProps$
|
|
10874
|
+
Drag.defaultProps = defaultProps$r;
|
|
10810
10875
|
Drag.displayName = "NutDrag";
|
|
10811
10876
|
const Content = (props) => {
|
|
10812
10877
|
const { visible, title, footer, textAlign, footerDirection, children } = props;
|
|
@@ -10965,7 +11030,7 @@ function confirm(config2, renderFunc) {
|
|
|
10965
11030
|
update: update2
|
|
10966
11031
|
};
|
|
10967
11032
|
}
|
|
10968
|
-
const defaultProps$
|
|
11033
|
+
const defaultProps$q = {
|
|
10969
11034
|
okText: "\u786E\u5B9A",
|
|
10970
11035
|
cancelText: "\u53D6\u6D88",
|
|
10971
11036
|
mask: true,
|
|
@@ -11062,9 +11127,9 @@ Dialog.confirm = (props) => {
|
|
|
11062
11127
|
}));
|
|
11063
11128
|
};
|
|
11064
11129
|
});
|
|
11065
|
-
Dialog.defaultProps = defaultProps$
|
|
11130
|
+
Dialog.defaultProps = defaultProps$q;
|
|
11066
11131
|
Dialog.displayName = "NutDialog";
|
|
11067
|
-
const defaultProps$
|
|
11132
|
+
const defaultProps$p = {
|
|
11068
11133
|
hasMore: true,
|
|
11069
11134
|
threshold: 200,
|
|
11070
11135
|
containerId: "",
|
|
@@ -11079,7 +11144,7 @@ const defaultProps$o = {
|
|
|
11079
11144
|
};
|
|
11080
11145
|
const Infiniteloading = (props) => {
|
|
11081
11146
|
const { locale } = useConfig();
|
|
11082
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
11147
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$p), props), {
|
|
11083
11148
|
children,
|
|
11084
11149
|
hasMore,
|
|
11085
11150
|
threshold,
|
|
@@ -11267,7 +11332,7 @@ const Infiniteloading = (props) => {
|
|
|
11267
11332
|
className: "tips"
|
|
11268
11333
|
}, locale.infiniteloading.loadMoreText || loadMoreTxt)));
|
|
11269
11334
|
};
|
|
11270
|
-
Infiniteloading.defaultProps = defaultProps$
|
|
11335
|
+
Infiniteloading.defaultProps = defaultProps$p;
|
|
11271
11336
|
Infiniteloading.displayName = "NutInfiniteloading";
|
|
11272
11337
|
class Notification extends React.PureComponent {
|
|
11273
11338
|
constructor(props) {
|
|
@@ -11424,7 +11489,7 @@ var Notify = {
|
|
|
11424
11489
|
}
|
|
11425
11490
|
}
|
|
11426
11491
|
};
|
|
11427
|
-
const defaultProps$
|
|
11492
|
+
const defaultProps$o = {
|
|
11428
11493
|
isAsync: false,
|
|
11429
11494
|
checked: false,
|
|
11430
11495
|
disable: false,
|
|
@@ -11446,7 +11511,7 @@ const Switch = (props) => {
|
|
|
11446
11511
|
change,
|
|
11447
11512
|
className,
|
|
11448
11513
|
style
|
|
11449
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
11514
|
+
} = __spreadValues(__spreadValues({}, defaultProps$o), props);
|
|
11450
11515
|
const [value, setValue] = useState(false);
|
|
11451
11516
|
const b2 = cn("switch");
|
|
11452
11517
|
useEffect(() => {
|
|
@@ -11483,92 +11548,124 @@ const Switch = (props) => {
|
|
|
11483
11548
|
className: `${b2("label")} close`
|
|
11484
11549
|
}, inactiveText))));
|
|
11485
11550
|
};
|
|
11486
|
-
Switch.defaultProps = defaultProps$
|
|
11551
|
+
Switch.defaultProps = defaultProps$o;
|
|
11487
11552
|
Switch.displayName = "NutSwitch";
|
|
11488
|
-
const
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11553
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
|
11554
|
+
const defaultProps$n = {
|
|
11555
|
+
strokeWidth: 5,
|
|
11556
|
+
radius: 50,
|
|
11557
|
+
strokeLinecap: "round",
|
|
11558
|
+
circleColor: "",
|
|
11559
|
+
pathColor: "",
|
|
11560
|
+
clockwise: true
|
|
11493
11561
|
};
|
|
11494
11562
|
const CircleProgress = (props) => {
|
|
11495
|
-
|
|
11563
|
+
var _b;
|
|
11564
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$n), props), {
|
|
11496
11565
|
children,
|
|
11497
|
-
strokeInnerWidth,
|
|
11498
11566
|
progress,
|
|
11499
|
-
isAuto,
|
|
11500
|
-
progressOption,
|
|
11501
11567
|
className,
|
|
11502
|
-
|
|
11568
|
+
radius,
|
|
11569
|
+
pathColor,
|
|
11570
|
+
clockwise,
|
|
11571
|
+
circleColor,
|
|
11572
|
+
strokeWidth,
|
|
11573
|
+
style,
|
|
11574
|
+
strokeLinecap
|
|
11503
11575
|
} = _a, restProps = __objRest(_a, [
|
|
11504
11576
|
"children",
|
|
11505
|
-
"strokeInnerWidth",
|
|
11506
11577
|
"progress",
|
|
11507
|
-
"isAuto",
|
|
11508
|
-
"progressOption",
|
|
11509
11578
|
"className",
|
|
11510
|
-
"
|
|
11579
|
+
"radius",
|
|
11580
|
+
"pathColor",
|
|
11581
|
+
"clockwise",
|
|
11582
|
+
"circleColor",
|
|
11583
|
+
"strokeWidth",
|
|
11584
|
+
"style",
|
|
11585
|
+
"strokeLinecap"
|
|
11511
11586
|
]);
|
|
11512
11587
|
const b2 = cn("circleprogress");
|
|
11513
11588
|
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
|
-
};
|
|
11589
|
+
const refRandomId = Math.random().toString(36).slice(-8);
|
|
11531
11590
|
const styles = __spreadValues({
|
|
11532
|
-
height: `${
|
|
11533
|
-
width: `${
|
|
11591
|
+
height: `${Number(radius) * 2}px`,
|
|
11592
|
+
width: `${Number(radius) * 2}px`
|
|
11534
11593
|
}, style);
|
|
11535
|
-
const
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11594
|
+
const pathStyle = {
|
|
11595
|
+
stroke: pathColor
|
|
11596
|
+
};
|
|
11597
|
+
const hoverStyle = () => {
|
|
11598
|
+
let perimeter = 283;
|
|
11599
|
+
let offset = perimeter * Number(progress) / 100;
|
|
11600
|
+
return {
|
|
11601
|
+
stroke: isObject(circleColor) ? `url(#${refRandomId})` : circleColor,
|
|
11602
|
+
strokeDasharray: `${offset}px ${perimeter}px`
|
|
11603
|
+
};
|
|
11604
|
+
};
|
|
11605
|
+
const path = () => {
|
|
11606
|
+
const isWise = clockwise ? 1 : 0;
|
|
11607
|
+
return `M 50 50 m -45 0 a 45 45 0 1 ${isWise} 90 0 a 45 45 0 1 ${isWise} -90 0`;
|
|
11608
|
+
};
|
|
11609
|
+
const hoverColor = () => {
|
|
11610
|
+
return isObject(circleColor) ? `url(#${refRandomId})` : circleColor;
|
|
11611
|
+
};
|
|
11612
|
+
const stop2 = () => {
|
|
11613
|
+
if (!isObject(circleColor)) {
|
|
11614
|
+
return;
|
|
11615
|
+
}
|
|
11616
|
+
let color = circleColor;
|
|
11617
|
+
const colorArr = Object.keys(color).sort((a, b22) => parseFloat(a) - parseFloat(b22));
|
|
11618
|
+
let stopArr = [];
|
|
11619
|
+
colorArr.map((item) => {
|
|
11620
|
+
let obj = {
|
|
11621
|
+
key: "",
|
|
11622
|
+
value: ""
|
|
11623
|
+
};
|
|
11624
|
+
obj.key = item;
|
|
11625
|
+
obj.value = color[item];
|
|
11626
|
+
stopArr.push(obj);
|
|
11627
|
+
});
|
|
11628
|
+
return stopArr;
|
|
11539
11629
|
};
|
|
11540
11630
|
return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
|
|
11541
11631
|
className: classes,
|
|
11542
11632
|
style: styles
|
|
11543
11633
|
}, restProps), /* @__PURE__ */ React__default.createElement("svg", {
|
|
11544
|
-
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
|
|
11634
|
+
viewBox: "0 0 100 100"
|
|
11635
|
+
}, /* @__PURE__ */ React__default.createElement("defs", null, /* @__PURE__ */ React__default.createElement("linearGradient", {
|
|
11636
|
+
id: refRandomId,
|
|
11637
|
+
x1: "100%",
|
|
11638
|
+
y1: "0%",
|
|
11639
|
+
x2: "0%",
|
|
11640
|
+
y2: "0%"
|
|
11641
|
+
}, (_b = stop2()) == null ? void 0 : _b.map((item, index2) => {
|
|
11642
|
+
return /* @__PURE__ */ React__default.createElement("stop", {
|
|
11643
|
+
key: index2,
|
|
11644
|
+
offset: item.key,
|
|
11645
|
+
stopColor: item.value
|
|
11646
|
+
});
|
|
11647
|
+
}))), /* @__PURE__ */ React__default.createElement("path", {
|
|
11648
|
+
className: "nut-circleprogress-path",
|
|
11649
|
+
style: pathStyle,
|
|
11650
|
+
d: path(),
|
|
11651
|
+
fill: "none",
|
|
11652
|
+
strokeWidth
|
|
11653
|
+
}), /* @__PURE__ */ React__default.createElement("path", {
|
|
11654
|
+
className: "nut-circleprogress-hover",
|
|
11655
|
+
style: hoverStyle(),
|
|
11656
|
+
d: path(),
|
|
11562
11657
|
fill: "none",
|
|
11563
|
-
|
|
11564
|
-
|
|
11658
|
+
stroke: hoverColor(),
|
|
11659
|
+
strokeLinecap,
|
|
11660
|
+
transform: "rotate(90,50,50)",
|
|
11661
|
+
strokeWidth
|
|
11565
11662
|
})), /* @__PURE__ */ React__default.createElement("div", {
|
|
11566
|
-
className: "nut-circleprogress-
|
|
11567
|
-
},
|
|
11663
|
+
className: "nut-circleprogress-text"
|
|
11664
|
+
}, children ? children : /* @__PURE__ */ React__default.createElement("div", null, progress, "%")));
|
|
11568
11665
|
};
|
|
11569
|
-
CircleProgress.defaultProps = defaultProps$
|
|
11666
|
+
CircleProgress.defaultProps = defaultProps$n;
|
|
11570
11667
|
CircleProgress.displayName = "NutCircleProgress";
|
|
11571
|
-
const defaultProps$
|
|
11668
|
+
const defaultProps$m = {
|
|
11572
11669
|
direction: "across",
|
|
11573
11670
|
list: [],
|
|
11574
11671
|
standTime: 1e3,
|
|
@@ -11606,7 +11703,7 @@ const NoticeBar = (props) => {
|
|
|
11606
11703
|
rightIcon,
|
|
11607
11704
|
close,
|
|
11608
11705
|
click
|
|
11609
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
11706
|
+
} = __spreadValues(__spreadValues({}, defaultProps$m), props);
|
|
11610
11707
|
const wrap = useRef(null);
|
|
11611
11708
|
const content = useRef(null);
|
|
11612
11709
|
const [showNoticeBar, SetShowNoticeBar] = useState(true);
|
|
@@ -11819,17 +11916,17 @@ const NoticeBar = (props) => {
|
|
|
11819
11916
|
size: "11px"
|
|
11820
11917
|
}) : null))) : null);
|
|
11821
11918
|
};
|
|
11822
|
-
NoticeBar.defaultProps = defaultProps$
|
|
11919
|
+
NoticeBar.defaultProps = defaultProps$m;
|
|
11823
11920
|
NoticeBar.displayName = "NutNoticeBar";
|
|
11824
11921
|
const DataContext$1 = createContext({});
|
|
11825
|
-
const defaultProps$
|
|
11922
|
+
const defaultProps$l = {
|
|
11826
11923
|
current: 0,
|
|
11827
11924
|
direction: "horizontal",
|
|
11828
11925
|
progressDot: false
|
|
11829
11926
|
};
|
|
11830
11927
|
const Steps = (props) => {
|
|
11831
|
-
const propSteps = __spreadValues(__spreadValues({}, defaultProps$
|
|
11832
|
-
const _a = propSteps, { children, direction, className } = _a, restProps = __objRest(_a, ["children", "direction", "className"]);
|
|
11928
|
+
const propSteps = __spreadValues(__spreadValues({}, defaultProps$l), props);
|
|
11929
|
+
const _a = propSteps, { children, current, direction, className, progressDot, clickStep } = _a, restProps = __objRest(_a, ["children", "current", "direction", "className", "progressDot", "clickStep"]);
|
|
11833
11930
|
const parentSteps = {
|
|
11834
11931
|
propSteps
|
|
11835
11932
|
};
|
|
@@ -11844,22 +11941,24 @@ const Steps = (props) => {
|
|
|
11844
11941
|
className: classes
|
|
11845
11942
|
}, restProps), children));
|
|
11846
11943
|
};
|
|
11847
|
-
Steps.defaultProps = defaultProps$
|
|
11944
|
+
Steps.defaultProps = defaultProps$l;
|
|
11848
11945
|
Steps.displayName = "NutSteps";
|
|
11849
|
-
const defaultProps$
|
|
11946
|
+
const defaultProps$k = {
|
|
11850
11947
|
title: "",
|
|
11851
11948
|
content: "",
|
|
11852
11949
|
activeIndex: 0,
|
|
11853
11950
|
icon: "",
|
|
11951
|
+
iconColor: "",
|
|
11854
11952
|
size: "12px"
|
|
11855
11953
|
};
|
|
11856
11954
|
const Step = (props) => {
|
|
11857
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
11955
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$k), props), {
|
|
11858
11956
|
children,
|
|
11859
11957
|
title,
|
|
11860
11958
|
content,
|
|
11861
11959
|
activeIndex,
|
|
11862
11960
|
icon,
|
|
11961
|
+
iconColor,
|
|
11863
11962
|
size,
|
|
11864
11963
|
className,
|
|
11865
11964
|
renderContent
|
|
@@ -11869,6 +11968,7 @@ const Step = (props) => {
|
|
|
11869
11968
|
"content",
|
|
11870
11969
|
"activeIndex",
|
|
11871
11970
|
"icon",
|
|
11971
|
+
"iconColor",
|
|
11872
11972
|
"size",
|
|
11873
11973
|
"className",
|
|
11874
11974
|
"renderContent"
|
|
@@ -11881,13 +11981,19 @@ const Step = (props) => {
|
|
|
11881
11981
|
return "finish";
|
|
11882
11982
|
return index2 === +parent.propSteps.current ? "process" : "wait";
|
|
11883
11983
|
};
|
|
11984
|
+
const handleClickStep = () => {
|
|
11985
|
+
var _a2;
|
|
11986
|
+
(_a2 = parent.propSteps) == null ? void 0 : _a2.clickStep(activeIndex);
|
|
11987
|
+
};
|
|
11884
11988
|
const b2 = cn("step");
|
|
11885
11989
|
const classes = classNames({
|
|
11886
11990
|
[`${b2("")}-${getCurrentStatus()}`]: true
|
|
11887
11991
|
}, className, b2(""));
|
|
11888
|
-
return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
|
|
11992
|
+
return /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues({
|
|
11889
11993
|
className: classes
|
|
11890
|
-
}, restProps),
|
|
11994
|
+
}, restProps), {
|
|
11995
|
+
onClick: handleClickStep
|
|
11996
|
+
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
11891
11997
|
className: "nut-step-head"
|
|
11892
11998
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
11893
11999
|
className: "nut-step-line"
|
|
@@ -11895,6 +12001,7 @@ const Step = (props) => {
|
|
|
11895
12001
|
className: `nut-step-icon ${!dot ? icon ? "is-icon" : "is-text" : ""}`
|
|
11896
12002
|
}, icon ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
11897
12003
|
className: "nut-step-icon-inner",
|
|
12004
|
+
color: iconColor,
|
|
11898
12005
|
name: icon,
|
|
11899
12006
|
size
|
|
11900
12007
|
}) : dot ? /* @__PURE__ */ React__default.createElement("span", null) : /* @__PURE__ */ React__default.createElement("span", {
|
|
@@ -11909,11 +12016,11 @@ const Step = (props) => {
|
|
|
11909
12016
|
className: "nut-step-content"
|
|
11910
12017
|
}, renderContent())));
|
|
11911
12018
|
};
|
|
11912
|
-
Step.defaultProps = defaultProps$
|
|
12019
|
+
Step.defaultProps = defaultProps$k;
|
|
11913
12020
|
Step.displayName = "NutStep";
|
|
11914
12021
|
const DataContext = createContext({});
|
|
11915
|
-
const defaultProps$
|
|
11916
|
-
width: window.innerWidth,
|
|
12022
|
+
const defaultProps$j = {
|
|
12023
|
+
width: typeof window === "object" ? window.innerWidth : 375,
|
|
11917
12024
|
height: 0,
|
|
11918
12025
|
duration: 500,
|
|
11919
12026
|
initPage: 0,
|
|
@@ -11929,7 +12036,7 @@ const defaultProps$i = {
|
|
|
11929
12036
|
};
|
|
11930
12037
|
const DISTANCE = 5;
|
|
11931
12038
|
const Swiper = React__default.forwardRef((props, ref) => {
|
|
11932
|
-
const propSwiper = __spreadValues(__spreadValues({}, defaultProps$
|
|
12039
|
+
const propSwiper = __spreadValues(__spreadValues({}, defaultProps$j), props);
|
|
11933
12040
|
const _a = propSwiper, {
|
|
11934
12041
|
children,
|
|
11935
12042
|
direction,
|
|
@@ -12305,13 +12412,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
12305
12412
|
});
|
|
12306
12413
|
})) : /* @__PURE__ */ React__default.createElement("div", null, pageContent)));
|
|
12307
12414
|
});
|
|
12308
|
-
Swiper.defaultProps = defaultProps$
|
|
12415
|
+
Swiper.defaultProps = defaultProps$j;
|
|
12309
12416
|
Swiper.displayName = "NutSwiper";
|
|
12310
|
-
const defaultProps$
|
|
12417
|
+
const defaultProps$i = {
|
|
12311
12418
|
direction: "horizontal"
|
|
12312
12419
|
};
|
|
12313
12420
|
const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
12314
|
-
const _props = __spreadValues(__spreadValues({}, defaultProps$
|
|
12421
|
+
const _props = __spreadValues(__spreadValues({}, defaultProps$i), props);
|
|
12315
12422
|
const { children, direction, size } = _props;
|
|
12316
12423
|
const parent = useContext$1(DataContext);
|
|
12317
12424
|
const [offset, setOffset] = useState(0);
|
|
@@ -12339,51 +12446,158 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
|
12339
12446
|
style: style()
|
|
12340
12447
|
}, children);
|
|
12341
12448
|
});
|
|
12342
|
-
SwiperItem.defaultProps = defaultProps$
|
|
12449
|
+
SwiperItem.defaultProps = defaultProps$i;
|
|
12343
12450
|
SwiperItem.displayName = "NutSwiperItem";
|
|
12344
|
-
const
|
|
12345
|
-
|
|
12451
|
+
const AvatarContext = createContext({});
|
|
12452
|
+
const defaultProps$h = {
|
|
12453
|
+
size: "",
|
|
12346
12454
|
icon: "",
|
|
12347
|
-
shape: "round",
|
|
12348
12455
|
bgColor: "#eee",
|
|
12456
|
+
color: "#666",
|
|
12349
12457
|
prefixCls: "nut-avatar",
|
|
12350
|
-
|
|
12458
|
+
url: "",
|
|
12459
|
+
alt: ""
|
|
12351
12460
|
};
|
|
12352
12461
|
const Avatar = (props) => {
|
|
12353
|
-
|
|
12354
|
-
const
|
|
12462
|
+
var _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
12463
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$h), props), {
|
|
12464
|
+
children,
|
|
12465
|
+
prefixCls,
|
|
12466
|
+
size,
|
|
12467
|
+
shape,
|
|
12468
|
+
bgColor,
|
|
12469
|
+
color,
|
|
12470
|
+
url,
|
|
12471
|
+
alt,
|
|
12472
|
+
icon,
|
|
12473
|
+
className,
|
|
12474
|
+
style,
|
|
12475
|
+
activeAvatar,
|
|
12476
|
+
onError
|
|
12477
|
+
} = _a, rest = __objRest(_a, [
|
|
12478
|
+
"children",
|
|
12479
|
+
"prefixCls",
|
|
12480
|
+
"size",
|
|
12481
|
+
"shape",
|
|
12482
|
+
"bgColor",
|
|
12483
|
+
"color",
|
|
12484
|
+
"url",
|
|
12485
|
+
"alt",
|
|
12486
|
+
"icon",
|
|
12487
|
+
"className",
|
|
12488
|
+
"style",
|
|
12489
|
+
"activeAvatar",
|
|
12490
|
+
"onError"
|
|
12491
|
+
]);
|
|
12492
|
+
const [maxSum, setMaxSum] = useState(0);
|
|
12493
|
+
const [showMax, setShowMax] = useState(false);
|
|
12494
|
+
const [avatarIndex, setAvatarIndex] = useState(1);
|
|
12495
|
+
const avatarRef = useRef(null);
|
|
12496
|
+
const parent = useContext$1(AvatarContext);
|
|
12497
|
+
const b2 = cn("avatar");
|
|
12355
12498
|
const classes = classNames({
|
|
12356
|
-
[
|
|
12357
|
-
[`avatar-${
|
|
12358
|
-
[`avatar-${shape}`]: true
|
|
12499
|
+
[`nut-avatar-${size || ((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.size) || "normal"}`]: true,
|
|
12500
|
+
[`nut-avatar-${shape || ((_c = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c.shape) || "round"}`]: true
|
|
12359
12501
|
});
|
|
12360
|
-
const cls = classNames(classes, className);
|
|
12502
|
+
const cls = classNames(b2(""), classes, className);
|
|
12503
|
+
const sizeValue = ["large", "normal", "small"];
|
|
12361
12504
|
const styles = __spreadValues({
|
|
12362
12505
|
width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
12363
12506
|
height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
12364
|
-
|
|
12365
|
-
|
|
12507
|
+
backgroundColor: `${bgColor}`,
|
|
12508
|
+
color: `${color}`,
|
|
12509
|
+
marginLeft: avatarIndex != 1 && ((_d = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _d.span) ? `${(_e = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _e.span}px` : "",
|
|
12510
|
+
zIndex: ((_f = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _f.zIndex) == "right" ? `${Math.abs(maxSum - avatarIndex)}` : ""
|
|
12366
12511
|
}, style);
|
|
12367
|
-
const
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12512
|
+
const maxStyles = {
|
|
12513
|
+
backgroundColor: `${(_g = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _g.maxBgColor}`,
|
|
12514
|
+
color: `${(_h = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _h.maxColor}`
|
|
12515
|
+
};
|
|
12516
|
+
const iconStyles = !!icon ? icon : "";
|
|
12517
|
+
useEffect(() => {
|
|
12518
|
+
var _a2;
|
|
12519
|
+
const avatarChildren = (_a2 = parent == null ? void 0 : parent.avatarGroupRef) == null ? void 0 : _a2.current.children;
|
|
12520
|
+
if (avatarChildren) {
|
|
12521
|
+
avatarLength(avatarChildren);
|
|
12522
|
+
}
|
|
12523
|
+
}, []);
|
|
12524
|
+
const avatarLength = (children2) => {
|
|
12525
|
+
var _a2, _b2, _c2;
|
|
12526
|
+
for (let i = 0; i < children2.length; i++) {
|
|
12527
|
+
if (children2[i] && children2[i].classList && children2[i].classList[0] == "nut-avatar") {
|
|
12528
|
+
children2[i].setAttribute("data-index", i + 1);
|
|
12529
|
+
}
|
|
12530
|
+
}
|
|
12531
|
+
const index2 = (_b2 = (_a2 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a2.dataset) == null ? void 0 : _b2.index;
|
|
12532
|
+
const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.maxCount;
|
|
12533
|
+
setMaxSum(children2.length);
|
|
12534
|
+
setAvatarIndex(index2);
|
|
12535
|
+
if (index2 == children2.length && index2 != maxCount && children2.length > maxCount) {
|
|
12536
|
+
setShowMax(true);
|
|
12371
12537
|
}
|
|
12372
12538
|
};
|
|
12373
|
-
|
|
12539
|
+
const errorEvent = (e2) => {
|
|
12540
|
+
if (props.onError) {
|
|
12541
|
+
props.onError(e2);
|
|
12542
|
+
}
|
|
12543
|
+
};
|
|
12544
|
+
const clickAvatar = (e2) => {
|
|
12545
|
+
if (props.activeAvatar) {
|
|
12546
|
+
props.activeAvatar(e2);
|
|
12547
|
+
}
|
|
12548
|
+
};
|
|
12549
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (showMax || !((_i = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _i.maxCount) || avatarIndex <= ((_j = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _j.maxCount)) && /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues({
|
|
12374
12550
|
className: cls
|
|
12375
12551
|
}, rest), {
|
|
12376
|
-
style: styles,
|
|
12377
|
-
onClick:
|
|
12378
|
-
|
|
12552
|
+
style: !showMax ? styles : maxStyles,
|
|
12553
|
+
onClick: clickAvatar,
|
|
12554
|
+
ref: avatarRef
|
|
12555
|
+
}), (!((_k = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _k.maxCount) || avatarIndex <= ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxCount)) && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, url && /* @__PURE__ */ React__default.createElement("img", {
|
|
12556
|
+
src: url,
|
|
12557
|
+
alt,
|
|
12558
|
+
onError: errorEvent
|
|
12559
|
+
}), icon && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
12379
12560
|
className: "icon",
|
|
12380
12561
|
name: iconStyles
|
|
12381
12562
|
}), children && /* @__PURE__ */ React__default.createElement("span", {
|
|
12382
12563
|
className: "text"
|
|
12383
|
-
}, children))
|
|
12564
|
+
}, children)), showMax && /* @__PURE__ */ React__default.createElement("div", {
|
|
12565
|
+
className: "text"
|
|
12566
|
+
}, ((_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent) ? (_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.maxContent : `+ ${avatarIndex - ((_o = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _o.maxCount)}`)));
|
|
12384
12567
|
};
|
|
12385
|
-
Avatar.defaultProps = defaultProps$
|
|
12568
|
+
Avatar.defaultProps = defaultProps$h;
|
|
12386
12569
|
Avatar.displayName = "NutAvatar";
|
|
12570
|
+
const defaultProps$g = {
|
|
12571
|
+
maxContent: "",
|
|
12572
|
+
maxCount: "",
|
|
12573
|
+
maxBgColor: "#eee",
|
|
12574
|
+
maxColor: "#666",
|
|
12575
|
+
size: "",
|
|
12576
|
+
shape: "",
|
|
12577
|
+
span: "-8",
|
|
12578
|
+
zIndex: "left"
|
|
12579
|
+
};
|
|
12580
|
+
const AvatarGroup = (props) => {
|
|
12581
|
+
useConfig();
|
|
12582
|
+
const propAvatarGroup = __spreadValues(__spreadValues({}, defaultProps$g), props);
|
|
12583
|
+
const { className, style, children } = propAvatarGroup;
|
|
12584
|
+
const avatarGroupRef = useRef(null);
|
|
12585
|
+
const b2 = cn("avatar-group");
|
|
12586
|
+
const cls = classNames(b2(""), className);
|
|
12587
|
+
const parentAvatar = {
|
|
12588
|
+
propAvatarGroup,
|
|
12589
|
+
avatarGroupRef
|
|
12590
|
+
};
|
|
12591
|
+
return /* @__PURE__ */ React__default.createElement(AvatarContext.Provider, {
|
|
12592
|
+
value: parentAvatar
|
|
12593
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
12594
|
+
className: cls,
|
|
12595
|
+
style,
|
|
12596
|
+
ref: avatarGroupRef
|
|
12597
|
+
}, children));
|
|
12598
|
+
};
|
|
12599
|
+
AvatarGroup.defaultProps = defaultProps$g;
|
|
12600
|
+
AvatarGroup.displayName = "NutAvatarGroup";
|
|
12387
12601
|
const defaultProps$f = {
|
|
12388
12602
|
price: 0,
|
|
12389
12603
|
needSymbol: true,
|
|
@@ -12746,8 +12960,8 @@ const Popover = (props) => {
|
|
|
12746
12960
|
Popover.defaultProps = defaultProps$c;
|
|
12747
12961
|
Popover.displayName = "NutPopover";
|
|
12748
12962
|
const defaultProps$b = {
|
|
12749
|
-
width:
|
|
12750
|
-
height:
|
|
12963
|
+
width: "100px",
|
|
12964
|
+
height: "100px",
|
|
12751
12965
|
row: 1,
|
|
12752
12966
|
animated: false,
|
|
12753
12967
|
title: false,
|
|
@@ -12799,33 +13013,40 @@ const Skeleton = (props) => {
|
|
|
12799
13013
|
return Array.from({ length: num }, (v2, i) => i);
|
|
12800
13014
|
};
|
|
12801
13015
|
const getStyle = () => {
|
|
13016
|
+
if (avatarSize) {
|
|
13017
|
+
return {
|
|
13018
|
+
width: avatarSize,
|
|
13019
|
+
height: avatarSize
|
|
13020
|
+
};
|
|
13021
|
+
}
|
|
12802
13022
|
return {
|
|
12803
|
-
width:
|
|
12804
|
-
height:
|
|
13023
|
+
width: "50px",
|
|
13024
|
+
height: "50px"
|
|
12805
13025
|
};
|
|
12806
13026
|
};
|
|
12807
13027
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, loading ? /* @__PURE__ */ React__default.createElement("div", null, children) : /* @__PURE__ */ React__default.createElement("div", __spreadValues({
|
|
12808
13028
|
className: classes
|
|
12809
|
-
}, restProps), /* @__PURE__ */ React__default.createElement("div", {
|
|
13029
|
+
}, restProps), animated2 && /* @__PURE__ */ React__default.createElement("div", {
|
|
12810
13030
|
className: "skeleton-animation"
|
|
12811
13031
|
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
12812
13032
|
className: "nut-skeleton-content"
|
|
12813
13033
|
}, avatar && /* @__PURE__ */ React__default.createElement(Avatar, {
|
|
12814
13034
|
className: avatarClass,
|
|
12815
13035
|
bgColor: "rgb(239, 239, 239)",
|
|
13036
|
+
shape: avatarShape,
|
|
12816
13037
|
style: getStyle()
|
|
12817
|
-
}), row === 1
|
|
13038
|
+
}), row === 1 && /* @__PURE__ */ React__default.createElement("div", {
|
|
12818
13039
|
className: blockClass,
|
|
12819
|
-
style: { width
|
|
12820
|
-
})
|
|
13040
|
+
style: { width, height }
|
|
13041
|
+
}), /* @__PURE__ */ React__default.createElement("div", {
|
|
12821
13042
|
className: "skeleton-content-line"
|
|
12822
13043
|
}, title && /* @__PURE__ */ React__default.createElement("div", {
|
|
12823
13044
|
className: "skeleton-title"
|
|
12824
13045
|
}), repeatLines(row).map((item, index2) => {
|
|
12825
13046
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
12826
|
-
className:
|
|
13047
|
+
className: blockClass,
|
|
12827
13048
|
key: index2,
|
|
12828
|
-
style: { width
|
|
13049
|
+
style: { width, height }
|
|
12829
13050
|
});
|
|
12830
13051
|
})))));
|
|
12831
13052
|
};
|
|
@@ -13817,7 +14038,6 @@ const InternalBarrage = (props, ref) => {
|
|
|
13817
14038
|
barrageContainer.current.appendChild(el);
|
|
13818
14039
|
const width = el.offsetWidth;
|
|
13819
14040
|
const height = el.offsetHeight;
|
|
13820
|
-
console.log(el.offsetWidth, el.offsetHeight);
|
|
13821
14041
|
el.classList.add("move");
|
|
13822
14042
|
el.style.animationDuration = `${speeds}ms`;
|
|
13823
14043
|
el.style.top = `${_index % rows * (height + top) + 20}px`;
|
|
@@ -14023,4 +14243,4 @@ const Card = (props) => {
|
|
|
14023
14243
|
};
|
|
14024
14244
|
Card.defaultProps = defaultProps;
|
|
14025
14245
|
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 };
|
|
14246
|
+
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 };
|