@nutui/nutui-react 1.1.4-beta.2 → 1.1.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/CHANGELOG.md +12 -0
- package/dist/esm/Avatar.js +2 -2
- 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/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 +176 -143
- package/dist/nutui.react.umd.js +12 -12
- package/dist/style.es.js +1 -1
- package/dist/types/nutui.react.d.ts +2 -1
- package/package.json +1 -1
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
|
|
37
|
+
* @nutui/nutui-react v1.1.4 Tue May 24 2022 15:09:27 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,9 +2612,9 @@ 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: "",
|
|
@@ -2628,7 +2628,7 @@ const defaultProps$L = {
|
|
|
2628
2628
|
}
|
|
2629
2629
|
};
|
|
2630
2630
|
const TabbarItem = (props) => {
|
|
2631
|
-
const { tabTitle, icon, href, to: to2, 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);
|
|
2632
2632
|
const b2 = cn("tabbar-item");
|
|
2633
2633
|
const bIcon = cn("tabbar-item__icon-box");
|
|
2634
2634
|
const history = useHistory();
|
|
@@ -2662,14 +2662,14 @@ const TabbarItem = (props) => {
|
|
|
2662
2662
|
className: bIcon({ "nav-word": true }, [bIcon({ "big-word": !icon })])
|
|
2663
2663
|
}, tabTitle)));
|
|
2664
2664
|
};
|
|
2665
|
-
const defaultProps$
|
|
2665
|
+
const defaultProps$L = {
|
|
2666
2666
|
height: "200px",
|
|
2667
2667
|
acceptKey: "title",
|
|
2668
2668
|
indexList: [],
|
|
2669
2669
|
className: ""
|
|
2670
2670
|
};
|
|
2671
2671
|
const Elevator = (props) => {
|
|
2672
|
-
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"]);
|
|
2673
2673
|
const b2 = cn("elevator");
|
|
2674
2674
|
const spaceHeight = 23;
|
|
2675
2675
|
const listview = useRef(null);
|
|
@@ -2803,9 +2803,9 @@ const Elevator = (props) => {
|
|
|
2803
2803
|
}, item[acceptKey]);
|
|
2804
2804
|
}))));
|
|
2805
2805
|
};
|
|
2806
|
-
Elevator.defaultProps = defaultProps$
|
|
2806
|
+
Elevator.defaultProps = defaultProps$L;
|
|
2807
2807
|
Elevator.displayName = "NutElevator";
|
|
2808
|
-
const defaultProps$
|
|
2808
|
+
const defaultProps$K = {
|
|
2809
2809
|
defaultValue: 1,
|
|
2810
2810
|
mode: "multi",
|
|
2811
2811
|
prevText: "\u4E0A\u4E00\u9875",
|
|
@@ -2822,7 +2822,7 @@ const defaultProps$J = {
|
|
|
2822
2822
|
};
|
|
2823
2823
|
const Pagination = (props) => {
|
|
2824
2824
|
const { locale } = useConfig();
|
|
2825
|
-
__spreadValues(__spreadValues({}, defaultProps$
|
|
2825
|
+
__spreadValues(__spreadValues({}, defaultProps$K), props);
|
|
2826
2826
|
const _a = props, {
|
|
2827
2827
|
modelValue,
|
|
2828
2828
|
mode,
|
|
@@ -2952,7 +2952,7 @@ const Pagination = (props) => {
|
|
|
2952
2952
|
onClick: (e2) => selectPage(Number(currentPage) + 1, true)
|
|
2953
2953
|
}, locale.pagination.next || nextText));
|
|
2954
2954
|
};
|
|
2955
|
-
Pagination.defaultProps = defaultProps$
|
|
2955
|
+
Pagination.defaultProps = defaultProps$K;
|
|
2956
2956
|
Pagination.displayName = "NutPagination";
|
|
2957
2957
|
class Title {
|
|
2958
2958
|
constructor() {
|
|
@@ -2962,7 +2962,7 @@ class Title {
|
|
|
2962
2962
|
__publicField(this, "index", 0);
|
|
2963
2963
|
}
|
|
2964
2964
|
}
|
|
2965
|
-
const defaultProps$
|
|
2965
|
+
const defaultProps$J = {
|
|
2966
2966
|
value: 0,
|
|
2967
2967
|
color: "",
|
|
2968
2968
|
background: "",
|
|
@@ -2978,7 +2978,7 @@ const pxCheck$1 = (value) => {
|
|
|
2978
2978
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
2979
2979
|
};
|
|
2980
2980
|
const Tabs = (props) => {
|
|
2981
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
2981
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$J), props), {
|
|
2982
2982
|
value,
|
|
2983
2983
|
color,
|
|
2984
2984
|
background,
|
|
@@ -3099,16 +3099,16 @@ const Tabs = (props) => {
|
|
|
3099
3099
|
return React__default.cloneElement(child, childProps);
|
|
3100
3100
|
})));
|
|
3101
3101
|
};
|
|
3102
|
-
Tabs.defaultProps = defaultProps$
|
|
3102
|
+
Tabs.defaultProps = defaultProps$J;
|
|
3103
3103
|
Tabs.displayName = "NutTabs";
|
|
3104
|
-
const defaultProps$
|
|
3104
|
+
const defaultProps$I = {
|
|
3105
3105
|
title: "",
|
|
3106
3106
|
paneKey: "",
|
|
3107
3107
|
activeKey: "",
|
|
3108
3108
|
disabled: false
|
|
3109
3109
|
};
|
|
3110
3110
|
const TabPane = (props) => {
|
|
3111
|
-
const { children, paneKey, activeKey } = __spreadValues(__spreadValues({}, defaultProps$
|
|
3111
|
+
const { children, paneKey, activeKey } = __spreadValues(__spreadValues({}, defaultProps$I), props);
|
|
3112
3112
|
const b2 = cn("tabpane");
|
|
3113
3113
|
const classes = classNames({
|
|
3114
3114
|
active: paneKey === activeKey
|
|
@@ -3394,7 +3394,7 @@ var Toast = {
|
|
|
3394
3394
|
}
|
|
3395
3395
|
}
|
|
3396
3396
|
};
|
|
3397
|
-
const defaultProps$
|
|
3397
|
+
const defaultProps$H = {
|
|
3398
3398
|
range: false,
|
|
3399
3399
|
hiddenRange: false,
|
|
3400
3400
|
hiddenTag: false,
|
|
@@ -3424,7 +3424,7 @@ const Range = (props) => {
|
|
|
3424
3424
|
change,
|
|
3425
3425
|
dragStart,
|
|
3426
3426
|
dragEnd
|
|
3427
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
3427
|
+
} = __spreadValues(__spreadValues({}, defaultProps$H), props);
|
|
3428
3428
|
const [buttonIndex, SetButtonIndex] = useState(0);
|
|
3429
3429
|
const [initValue, SetInitValue] = useState();
|
|
3430
3430
|
const [dragStatus, SetDragStatus] = useState("start");
|
|
@@ -3633,7 +3633,7 @@ const Range = (props) => {
|
|
|
3633
3633
|
className: "max"
|
|
3634
3634
|
}, +max) : null);
|
|
3635
3635
|
};
|
|
3636
|
-
Range.defaultProps = defaultProps$
|
|
3636
|
+
Range.defaultProps = defaultProps$H;
|
|
3637
3637
|
Range.displayName = "NutRange";
|
|
3638
3638
|
const Utils = {
|
|
3639
3639
|
isLeapYear(y2) {
|
|
@@ -3719,7 +3719,7 @@ function requestAniFrame() {
|
|
|
3719
3719
|
};
|
|
3720
3720
|
}
|
|
3721
3721
|
var requestAniFrame$1 = requestAniFrame();
|
|
3722
|
-
const defaultProps$
|
|
3722
|
+
const defaultProps$G = {
|
|
3723
3723
|
type: "one",
|
|
3724
3724
|
isAutoBackFill: false,
|
|
3725
3725
|
poppable: true,
|
|
@@ -3748,7 +3748,7 @@ const CalendarItem = (props) => {
|
|
|
3748
3748
|
onChoose,
|
|
3749
3749
|
onUpdate,
|
|
3750
3750
|
onClose
|
|
3751
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
3751
|
+
} = __spreadValues(__spreadValues({}, defaultProps$G), props);
|
|
3752
3752
|
const weeks = locale.calendaritem.weekdays;
|
|
3753
3753
|
const [yearMonthTitle, setYearMonthTitle] = useState("");
|
|
3754
3754
|
const [unLoadPrev, setUnLoadPrev] = useState(false);
|
|
@@ -4134,9 +4134,9 @@ const CalendarItem = (props) => {
|
|
|
4134
4134
|
onClick: confirm2
|
|
4135
4135
|
}, locale.confirm)) : ""));
|
|
4136
4136
|
};
|
|
4137
|
-
CalendarItem.defaultProps = defaultProps$
|
|
4137
|
+
CalendarItem.defaultProps = defaultProps$G;
|
|
4138
4138
|
CalendarItem.displayName = "NutCalendarItem";
|
|
4139
|
-
const defaultProps$
|
|
4139
|
+
const defaultProps$F = {
|
|
4140
4140
|
type: "one",
|
|
4141
4141
|
isAutoBackFill: false,
|
|
4142
4142
|
poppable: true,
|
|
@@ -4164,7 +4164,7 @@ const Calendar = (props) => {
|
|
|
4164
4164
|
endDate,
|
|
4165
4165
|
onClose,
|
|
4166
4166
|
onChoose
|
|
4167
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
4167
|
+
} = __spreadValues(__spreadValues({}, defaultProps$F), props);
|
|
4168
4168
|
const close = () => {
|
|
4169
4169
|
onClose && onClose();
|
|
4170
4170
|
};
|
|
@@ -4207,16 +4207,16 @@ const Calendar = (props) => {
|
|
|
4207
4207
|
onChoose: choose
|
|
4208
4208
|
}));
|
|
4209
4209
|
};
|
|
4210
|
-
Calendar.defaultProps = defaultProps$
|
|
4210
|
+
Calendar.defaultProps = defaultProps$F;
|
|
4211
4211
|
Calendar.displayName = "NutCalendar";
|
|
4212
|
-
const defaultProps$
|
|
4212
|
+
const defaultProps$E = {
|
|
4213
4213
|
disabled: false,
|
|
4214
4214
|
checkedValue: [],
|
|
4215
4215
|
onChange: (value) => {
|
|
4216
4216
|
}
|
|
4217
4217
|
};
|
|
4218
4218
|
const CheckboxGroup = React__default.forwardRef((props, ref) => {
|
|
4219
|
-
const { children } = __spreadValues(__spreadValues({}, defaultProps$
|
|
4219
|
+
const { children } = __spreadValues(__spreadValues({}, defaultProps$E), props);
|
|
4220
4220
|
const b2 = cn("checkboxgroup");
|
|
4221
4221
|
const _a = props, { className, disabled, onChange, checkedValue } = _a, rest = __objRest(_a, ["className", "disabled", "onChange", "checkedValue"]);
|
|
4222
4222
|
const [innerDisabled, setInnerDisabled] = useState(disabled);
|
|
@@ -4275,9 +4275,9 @@ const CheckboxGroup = React__default.forwardRef((props, ref) => {
|
|
|
4275
4275
|
className: `${b2()} ${className || ""}`
|
|
4276
4276
|
}, rest), cloneChildren());
|
|
4277
4277
|
});
|
|
4278
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
4278
|
+
CheckboxGroup.defaultProps = defaultProps$E;
|
|
4279
4279
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
4280
|
-
const defaultProps$
|
|
4280
|
+
const defaultProps$D = {
|
|
4281
4281
|
checked: false,
|
|
4282
4282
|
disabled: false,
|
|
4283
4283
|
textPosition: "right",
|
|
@@ -4288,7 +4288,7 @@ const defaultProps$C = {
|
|
|
4288
4288
|
}
|
|
4289
4289
|
};
|
|
4290
4290
|
const Checkbox = (props) => {
|
|
4291
|
-
const { children } = __spreadValues(__spreadValues({}, defaultProps$
|
|
4291
|
+
const { children } = __spreadValues(__spreadValues({}, defaultProps$D), props);
|
|
4292
4292
|
const b2 = cn("checkbox");
|
|
4293
4293
|
const _a = props, {
|
|
4294
4294
|
iconName,
|
|
@@ -4344,7 +4344,7 @@ const Checkbox = (props) => {
|
|
|
4344
4344
|
onClick: handleClick
|
|
4345
4345
|
}), renderIcon(), renderLabel());
|
|
4346
4346
|
};
|
|
4347
|
-
Checkbox.defaultProps = defaultProps$
|
|
4347
|
+
Checkbox.defaultProps = defaultProps$D;
|
|
4348
4348
|
Checkbox.displayName = "NutCheckBox";
|
|
4349
4349
|
Checkbox.Group = CheckboxGroup;
|
|
4350
4350
|
const InternalPickerSlot = (props, ref) => {
|
|
@@ -4660,7 +4660,7 @@ const InternalPicker = (props, ref) => {
|
|
|
4660
4660
|
};
|
|
4661
4661
|
const Picker = React__default.forwardRef(InternalPicker);
|
|
4662
4662
|
const currentYear = new Date().getFullYear();
|
|
4663
|
-
const defaultProps$
|
|
4663
|
+
const defaultProps$C = {
|
|
4664
4664
|
modelValue: new Date(),
|
|
4665
4665
|
visible: false,
|
|
4666
4666
|
title: "",
|
|
@@ -4672,7 +4672,7 @@ const defaultProps$B = {
|
|
|
4672
4672
|
onCloseDatePicker: () => void 0
|
|
4673
4673
|
};
|
|
4674
4674
|
const DatePicker = (props) => {
|
|
4675
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
4675
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$C), props), {
|
|
4676
4676
|
minDate,
|
|
4677
4677
|
maxDate,
|
|
4678
4678
|
type,
|
|
@@ -4926,9 +4926,9 @@ const DatePicker = (props) => {
|
|
|
4926
4926
|
ref: pickerRef
|
|
4927
4927
|
}));
|
|
4928
4928
|
};
|
|
4929
|
-
DatePicker.defaultProps = defaultProps$
|
|
4929
|
+
DatePicker.defaultProps = defaultProps$C;
|
|
4930
4930
|
DatePicker.displayName = "NutDatePicker";
|
|
4931
|
-
const defaultProps$
|
|
4931
|
+
const defaultProps$B = {
|
|
4932
4932
|
disabled: false,
|
|
4933
4933
|
buttonSize: "",
|
|
4934
4934
|
min: 1,
|
|
@@ -4944,7 +4944,7 @@ function pxCheck(value) {
|
|
|
4944
4944
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
4945
4945
|
}
|
|
4946
4946
|
const InputNumber = (props) => {
|
|
4947
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
4947
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$B), props), {
|
|
4948
4948
|
children,
|
|
4949
4949
|
disabled,
|
|
4950
4950
|
buttonSize,
|
|
@@ -5101,7 +5101,7 @@ const InputNumber = (props) => {
|
|
|
5101
5101
|
click: addNumber
|
|
5102
5102
|
}));
|
|
5103
5103
|
};
|
|
5104
|
-
InputNumber.defaultProps = defaultProps$
|
|
5104
|
+
InputNumber.defaultProps = defaultProps$B;
|
|
5105
5105
|
InputNumber.displayName = "NutInputNumber";
|
|
5106
5106
|
function trimExtraChar(value, char, regExp) {
|
|
5107
5107
|
const index2 = value.indexOf(char);
|
|
@@ -5127,7 +5127,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
5127
5127
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
5128
5128
|
return value.replace(regExp, "");
|
|
5129
5129
|
}
|
|
5130
|
-
const defaultProps$
|
|
5130
|
+
const defaultProps$A = {
|
|
5131
5131
|
type: "text",
|
|
5132
5132
|
defaultValue: "",
|
|
5133
5133
|
placeholder: "\u8BF7\u8F93\u5165\u4FE1\u606F",
|
|
@@ -5158,7 +5158,7 @@ const Input = (props) => {
|
|
|
5158
5158
|
blur,
|
|
5159
5159
|
focus,
|
|
5160
5160
|
clear
|
|
5161
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
5161
|
+
} = __spreadValues(__spreadValues({}, defaultProps$A), props);
|
|
5162
5162
|
const inputBem = cn("input");
|
|
5163
5163
|
const [inputValue, SetInputValue] = useState("");
|
|
5164
5164
|
const [active, SetActive] = useState(false);
|
|
@@ -5242,14 +5242,14 @@ const Input = (props) => {
|
|
|
5242
5242
|
size: "12px"
|
|
5243
5243
|
}) : null) : null);
|
|
5244
5244
|
};
|
|
5245
|
-
Input.defaultProps = defaultProps$
|
|
5245
|
+
Input.defaultProps = defaultProps$A;
|
|
5246
5246
|
Input.displayName = "NutInput";
|
|
5247
5247
|
const radioContext = {
|
|
5248
5248
|
onChange: (val) => {
|
|
5249
5249
|
}
|
|
5250
5250
|
};
|
|
5251
5251
|
var RadioContext = React__default.createContext(radioContext);
|
|
5252
|
-
const defaultProps$
|
|
5252
|
+
const defaultProps$z = {
|
|
5253
5253
|
value: null,
|
|
5254
5254
|
textPosition: "right",
|
|
5255
5255
|
onChange: (value) => {
|
|
@@ -5257,7 +5257,7 @@ const defaultProps$y = {
|
|
|
5257
5257
|
direction: "vertical"
|
|
5258
5258
|
};
|
|
5259
5259
|
const RadioGroup = React__default.forwardRef((props, ref) => {
|
|
5260
|
-
const { children } = __spreadValues(__spreadValues({}, defaultProps$
|
|
5260
|
+
const { children } = __spreadValues(__spreadValues({}, defaultProps$z), props);
|
|
5261
5261
|
cn("RadioGroup");
|
|
5262
5262
|
const _a = props, { className, value, onChange, textPosition, direction } = _a, rest = __objRest(_a, ["className", "value", "onChange", "textPosition", "direction"]);
|
|
5263
5263
|
const [val2State, setVal2State] = useState(value);
|
|
@@ -5292,9 +5292,9 @@ const RadioGroup = React__default.forwardRef((props, ref) => {
|
|
|
5292
5292
|
className: `nut-radiogroup nut-radiogroup--${props.direction}`
|
|
5293
5293
|
}, rest), cloneChildren()));
|
|
5294
5294
|
});
|
|
5295
|
-
RadioGroup.defaultProps = defaultProps$
|
|
5295
|
+
RadioGroup.defaultProps = defaultProps$z;
|
|
5296
5296
|
RadioGroup.displayName = "NutRadioGroup";
|
|
5297
|
-
const defaultProps$
|
|
5297
|
+
const defaultProps$y = {
|
|
5298
5298
|
disabled: false,
|
|
5299
5299
|
checked: false,
|
|
5300
5300
|
shape: "round",
|
|
@@ -5307,7 +5307,7 @@ const defaultProps$x = {
|
|
|
5307
5307
|
}
|
|
5308
5308
|
};
|
|
5309
5309
|
const Radio = (props) => {
|
|
5310
|
-
const { children } = __spreadValues(__spreadValues({}, defaultProps$
|
|
5310
|
+
const { children } = __spreadValues(__spreadValues({}, defaultProps$y), props);
|
|
5311
5311
|
const _a = props, {
|
|
5312
5312
|
className,
|
|
5313
5313
|
disabled,
|
|
@@ -5375,10 +5375,10 @@ const Radio = (props) => {
|
|
|
5375
5375
|
onClick: handleClick
|
|
5376
5376
|
}, rest), props.shape == "button" ? renderButton() : reverseState ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()]);
|
|
5377
5377
|
};
|
|
5378
|
-
Radio.defaultProps = defaultProps$
|
|
5378
|
+
Radio.defaultProps = defaultProps$y;
|
|
5379
5379
|
Radio.displayName = "NutRadio";
|
|
5380
5380
|
Radio.RadioGroup = RadioGroup;
|
|
5381
|
-
const defaultProps$
|
|
5381
|
+
const defaultProps$x = {
|
|
5382
5382
|
count: 5,
|
|
5383
5383
|
modelValue: 0,
|
|
5384
5384
|
iconSize: 18,
|
|
@@ -5405,7 +5405,7 @@ const Rate = (props) => {
|
|
|
5405
5405
|
allowHalf,
|
|
5406
5406
|
spacing,
|
|
5407
5407
|
change
|
|
5408
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
5408
|
+
} = __spreadValues(__spreadValues({}, defaultProps$x), props);
|
|
5409
5409
|
const b2 = cn("rate");
|
|
5410
5410
|
const bi = cn("rate-item");
|
|
5411
5411
|
const [countArray, setCountArray] = useState([1, 2, 3, 4, 5]);
|
|
@@ -5468,9 +5468,9 @@ const Rate = (props) => {
|
|
|
5468
5468
|
}));
|
|
5469
5469
|
}));
|
|
5470
5470
|
};
|
|
5471
|
-
Rate.defaultProps = defaultProps$
|
|
5471
|
+
Rate.defaultProps = defaultProps$x;
|
|
5472
5472
|
Rate.displayName = "NutRate";
|
|
5473
|
-
const defaultProps$
|
|
5473
|
+
const defaultProps$w = {
|
|
5474
5474
|
title: "\u8BF7\u8F93\u5165\u5BC6\u7801",
|
|
5475
5475
|
desc: "\u60A8\u4F7F\u7528\u4E86\u865A\u62DF\u8D44\u4EA7\uFF0C\u8BF7\u8FDB\u884C\u9A8C\u8BC1",
|
|
5476
5476
|
tips: "\u5FD8\u8BB0\u5BC6\u7801",
|
|
@@ -5646,9 +5646,9 @@ const ShortPassword = (props) => {
|
|
|
5646
5646
|
onClick: () => sure()
|
|
5647
5647
|
}, locale.confirm)) : null)));
|
|
5648
5648
|
};
|
|
5649
|
-
ShortPassword.defaultProps = defaultProps$
|
|
5649
|
+
ShortPassword.defaultProps = defaultProps$w;
|
|
5650
5650
|
ShortPassword.displayName = "NutShortPassword";
|
|
5651
|
-
const defaultProps$
|
|
5651
|
+
const defaultProps$v = {
|
|
5652
5652
|
defaultValue: "",
|
|
5653
5653
|
textAlign: "left",
|
|
5654
5654
|
limitshow: false,
|
|
@@ -5676,7 +5676,7 @@ const TextArea = (props) => {
|
|
|
5676
5676
|
change,
|
|
5677
5677
|
blur,
|
|
5678
5678
|
focus
|
|
5679
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
5679
|
+
} = __spreadValues(__spreadValues({}, defaultProps$v), props);
|
|
5680
5680
|
const textareaBem = cn("textarea");
|
|
5681
5681
|
const [inputValue, SetInputValue] = useState("");
|
|
5682
5682
|
useEffect(() => {
|
|
@@ -5747,7 +5747,7 @@ const TextArea = (props) => {
|
|
|
5747
5747
|
className: textareaBem("limit")
|
|
5748
5748
|
}, inputValue.length, "/", maxlength < 0 ? 0 : maxlength) : null);
|
|
5749
5749
|
};
|
|
5750
|
-
TextArea.defaultProps = defaultProps$
|
|
5750
|
+
TextArea.defaultProps = defaultProps$v;
|
|
5751
5751
|
TextArea.displayName = "NutTextArea";
|
|
5752
5752
|
class UploadOptions {
|
|
5753
5753
|
constructor() {
|
|
@@ -5803,7 +5803,7 @@ class Upload {
|
|
|
5803
5803
|
}
|
|
5804
5804
|
}
|
|
5805
5805
|
}
|
|
5806
|
-
const defaultProps$
|
|
5806
|
+
const defaultProps$u = {
|
|
5807
5807
|
url: "",
|
|
5808
5808
|
maximum: 1,
|
|
5809
5809
|
uploadIcon: "photograph",
|
|
@@ -5842,7 +5842,7 @@ class FileItem {
|
|
|
5842
5842
|
}
|
|
5843
5843
|
}
|
|
5844
5844
|
const InternalUploader = (props, ref) => {
|
|
5845
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
5845
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$u), props), {
|
|
5846
5846
|
children,
|
|
5847
5847
|
uploadIcon,
|
|
5848
5848
|
uploadIconSize,
|
|
@@ -6203,9 +6203,9 @@ const InternalUploader = (props, ref) => {
|
|
|
6203
6203
|
})));
|
|
6204
6204
|
};
|
|
6205
6205
|
const Uploader = React__default.forwardRef(InternalUploader);
|
|
6206
|
-
Uploader.defaultProps = defaultProps$
|
|
6206
|
+
Uploader.defaultProps = defaultProps$u;
|
|
6207
6207
|
Uploader.displayName = "NutUploader";
|
|
6208
|
-
const defaultProps$
|
|
6208
|
+
const defaultProps$t = {
|
|
6209
6209
|
cancelTxt: "",
|
|
6210
6210
|
optionTag: "name",
|
|
6211
6211
|
optionSubTag: "subname",
|
|
@@ -6223,7 +6223,7 @@ const defaultProps$s = {
|
|
|
6223
6223
|
style: {}
|
|
6224
6224
|
};
|
|
6225
6225
|
const ActionSheet = (props) => {
|
|
6226
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
6226
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$t), props), {
|
|
6227
6227
|
cancelTxt,
|
|
6228
6228
|
optionTag,
|
|
6229
6229
|
optionSubTag,
|
|
@@ -6294,9 +6294,9 @@ const ActionSheet = (props) => {
|
|
|
6294
6294
|
onClick: () => cancelActionSheet()
|
|
6295
6295
|
}, cancelTxt)));
|
|
6296
6296
|
};
|
|
6297
|
-
ActionSheet.defaultProps = defaultProps$
|
|
6297
|
+
ActionSheet.defaultProps = defaultProps$t;
|
|
6298
6298
|
ActionSheet.displayName = "NutActionSheet";
|
|
6299
|
-
const defaultProps$
|
|
6299
|
+
const defaultProps$s = {
|
|
6300
6300
|
bottom: 20,
|
|
6301
6301
|
right: 10,
|
|
6302
6302
|
elId: "",
|
|
@@ -6318,39 +6318,39 @@ const BackTop = (props) => {
|
|
|
6318
6318
|
duration,
|
|
6319
6319
|
style,
|
|
6320
6320
|
backTopClick
|
|
6321
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
6321
|
+
} = __spreadValues(__spreadValues({}, defaultProps$s), props);
|
|
6322
6322
|
const [backTop, SetBackTop] = useState(false);
|
|
6323
6323
|
const [scrollTop, SetScrollTop] = useState(0);
|
|
6324
6324
|
let startTime = 0;
|
|
6325
|
-
let scrollEl =
|
|
6325
|
+
let scrollEl = useRef(null);
|
|
6326
6326
|
useEffect(() => {
|
|
6327
6327
|
init();
|
|
6328
6328
|
return () => removeEventListener();
|
|
6329
6329
|
}, []);
|
|
6330
6330
|
const init = () => {
|
|
6331
6331
|
if (elId && document.getElementById(elId)) {
|
|
6332
|
-
scrollEl = document.getElementById(elId);
|
|
6332
|
+
scrollEl.current = document.getElementById(elId);
|
|
6333
6333
|
}
|
|
6334
6334
|
addEventListener();
|
|
6335
6335
|
initCancelAniFrame();
|
|
6336
6336
|
};
|
|
6337
6337
|
const scrollListener = () => {
|
|
6338
6338
|
let top = null;
|
|
6339
|
-
if (scrollEl instanceof Window) {
|
|
6340
|
-
top = scrollEl.pageYOffset;
|
|
6339
|
+
if (scrollEl.current instanceof Window) {
|
|
6340
|
+
top = scrollEl.current.pageYOffset;
|
|
6341
6341
|
SetScrollTop(top);
|
|
6342
6342
|
} else {
|
|
6343
|
-
top = scrollEl.scrollTop;
|
|
6343
|
+
top = scrollEl.current.scrollTop;
|
|
6344
6344
|
SetScrollTop(top);
|
|
6345
6345
|
}
|
|
6346
6346
|
const showBtn = top >= distance;
|
|
6347
6347
|
SetBackTop(showBtn);
|
|
6348
6348
|
};
|
|
6349
6349
|
const scroll = (y2 = 0) => {
|
|
6350
|
-
if (scrollEl instanceof Window) {
|
|
6350
|
+
if (scrollEl.current instanceof Window) {
|
|
6351
6351
|
window.scrollTo(0, y2);
|
|
6352
6352
|
} else {
|
|
6353
|
-
scrollEl.scrollTop = y2;
|
|
6353
|
+
scrollEl.current.scrollTop = y2;
|
|
6354
6354
|
}
|
|
6355
6355
|
};
|
|
6356
6356
|
const scrollAnimation = () => {
|
|
@@ -6373,12 +6373,14 @@ const BackTop = (props) => {
|
|
|
6373
6373
|
};
|
|
6374
6374
|
};
|
|
6375
6375
|
function addEventListener() {
|
|
6376
|
-
|
|
6377
|
-
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);
|
|
6378
6379
|
}
|
|
6379
6380
|
function removeEventListener() {
|
|
6380
|
-
|
|
6381
|
-
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);
|
|
6382
6384
|
}
|
|
6383
6385
|
const goTop = (e2) => {
|
|
6384
6386
|
backTopClick(e2);
|
|
@@ -6401,7 +6403,7 @@ const BackTop = (props) => {
|
|
|
6401
6403
|
name: "top"
|
|
6402
6404
|
}));
|
|
6403
6405
|
};
|
|
6404
|
-
BackTop.defaultProps = defaultProps$
|
|
6406
|
+
BackTop.defaultProps = defaultProps$s;
|
|
6405
6407
|
BackTop.displayName = "NutBackTop";
|
|
6406
6408
|
function clamp(v2, min, max) {
|
|
6407
6409
|
return Math.max(min, Math.min(v2, max));
|
|
@@ -10803,7 +10805,7 @@ const host = createHost(primitives, {
|
|
|
10803
10805
|
}
|
|
10804
10806
|
});
|
|
10805
10807
|
const animated = host.animated;
|
|
10806
|
-
const defaultProps$
|
|
10808
|
+
const defaultProps$r = {
|
|
10807
10809
|
attract: false,
|
|
10808
10810
|
direction: void 0,
|
|
10809
10811
|
boundary: {
|
|
@@ -10815,7 +10817,7 @@ const defaultProps$q = {
|
|
|
10815
10817
|
className: ""
|
|
10816
10818
|
};
|
|
10817
10819
|
const Drag = (props) => {
|
|
10818
|
-
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"]);
|
|
10819
10821
|
const b2 = cn("drag");
|
|
10820
10822
|
const [boundaryState, setBoundaryState] = useState(boundary);
|
|
10821
10823
|
const myDrag = useRef(null);
|
|
@@ -10871,7 +10873,7 @@ const Drag = (props) => {
|
|
|
10871
10873
|
style: currstyle
|
|
10872
10874
|
}, bind()), children));
|
|
10873
10875
|
};
|
|
10874
|
-
Drag.defaultProps = defaultProps$
|
|
10876
|
+
Drag.defaultProps = defaultProps$r;
|
|
10875
10877
|
Drag.displayName = "NutDrag";
|
|
10876
10878
|
const Content = (props) => {
|
|
10877
10879
|
const { visible, title, footer, textAlign, footerDirection, children } = props;
|
|
@@ -11030,7 +11032,7 @@ function confirm(config2, renderFunc) {
|
|
|
11030
11032
|
update: update2
|
|
11031
11033
|
};
|
|
11032
11034
|
}
|
|
11033
|
-
const defaultProps$
|
|
11035
|
+
const defaultProps$q = {
|
|
11034
11036
|
okText: "\u786E\u5B9A",
|
|
11035
11037
|
cancelText: "\u53D6\u6D88",
|
|
11036
11038
|
mask: true,
|
|
@@ -11127,9 +11129,9 @@ Dialog.confirm = (props) => {
|
|
|
11127
11129
|
}));
|
|
11128
11130
|
};
|
|
11129
11131
|
});
|
|
11130
|
-
Dialog.defaultProps = defaultProps$
|
|
11132
|
+
Dialog.defaultProps = defaultProps$q;
|
|
11131
11133
|
Dialog.displayName = "NutDialog";
|
|
11132
|
-
const defaultProps$
|
|
11134
|
+
const defaultProps$p = {
|
|
11133
11135
|
hasMore: true,
|
|
11134
11136
|
threshold: 200,
|
|
11135
11137
|
containerId: "",
|
|
@@ -11144,7 +11146,7 @@ const defaultProps$o = {
|
|
|
11144
11146
|
};
|
|
11145
11147
|
const Infiniteloading = (props) => {
|
|
11146
11148
|
const { locale } = useConfig();
|
|
11147
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
11149
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$p), props), {
|
|
11148
11150
|
children,
|
|
11149
11151
|
hasMore,
|
|
11150
11152
|
threshold,
|
|
@@ -11332,7 +11334,7 @@ const Infiniteloading = (props) => {
|
|
|
11332
11334
|
className: "tips"
|
|
11333
11335
|
}, locale.infiniteloading.loadMoreText || loadMoreTxt)));
|
|
11334
11336
|
};
|
|
11335
|
-
Infiniteloading.defaultProps = defaultProps$
|
|
11337
|
+
Infiniteloading.defaultProps = defaultProps$p;
|
|
11336
11338
|
Infiniteloading.displayName = "NutInfiniteloading";
|
|
11337
11339
|
class Notification extends React.PureComponent {
|
|
11338
11340
|
constructor(props) {
|
|
@@ -11489,7 +11491,7 @@ var Notify = {
|
|
|
11489
11491
|
}
|
|
11490
11492
|
}
|
|
11491
11493
|
};
|
|
11492
|
-
const defaultProps$
|
|
11494
|
+
const defaultProps$o = {
|
|
11493
11495
|
isAsync: false,
|
|
11494
11496
|
checked: false,
|
|
11495
11497
|
disable: false,
|
|
@@ -11511,7 +11513,7 @@ const Switch = (props) => {
|
|
|
11511
11513
|
change,
|
|
11512
11514
|
className,
|
|
11513
11515
|
style
|
|
11514
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
11516
|
+
} = __spreadValues(__spreadValues({}, defaultProps$o), props);
|
|
11515
11517
|
const [value, setValue] = useState(false);
|
|
11516
11518
|
const b2 = cn("switch");
|
|
11517
11519
|
useEffect(() => {
|
|
@@ -11548,10 +11550,10 @@ const Switch = (props) => {
|
|
|
11548
11550
|
className: `${b2("label")} close`
|
|
11549
11551
|
}, inactiveText))));
|
|
11550
11552
|
};
|
|
11551
|
-
Switch.defaultProps = defaultProps$
|
|
11553
|
+
Switch.defaultProps = defaultProps$o;
|
|
11552
11554
|
Switch.displayName = "NutSwitch";
|
|
11553
11555
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
11554
|
-
const defaultProps$
|
|
11556
|
+
const defaultProps$n = {
|
|
11555
11557
|
strokeWidth: 5,
|
|
11556
11558
|
radius: 50,
|
|
11557
11559
|
strokeLinecap: "round",
|
|
@@ -11561,7 +11563,7 @@ const defaultProps$m = {
|
|
|
11561
11563
|
};
|
|
11562
11564
|
const CircleProgress = (props) => {
|
|
11563
11565
|
var _b;
|
|
11564
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
11566
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$n), props), {
|
|
11565
11567
|
children,
|
|
11566
11568
|
progress,
|
|
11567
11569
|
className,
|
|
@@ -11663,9 +11665,9 @@ const CircleProgress = (props) => {
|
|
|
11663
11665
|
className: "nut-circleprogress-text"
|
|
11664
11666
|
}, children ? children : /* @__PURE__ */ React__default.createElement("div", null, progress, "%")));
|
|
11665
11667
|
};
|
|
11666
|
-
CircleProgress.defaultProps = defaultProps$
|
|
11668
|
+
CircleProgress.defaultProps = defaultProps$n;
|
|
11667
11669
|
CircleProgress.displayName = "NutCircleProgress";
|
|
11668
|
-
const defaultProps$
|
|
11670
|
+
const defaultProps$m = {
|
|
11669
11671
|
direction: "across",
|
|
11670
11672
|
list: [],
|
|
11671
11673
|
standTime: 1e3,
|
|
@@ -11703,7 +11705,7 @@ const NoticeBar = (props) => {
|
|
|
11703
11705
|
rightIcon,
|
|
11704
11706
|
close,
|
|
11705
11707
|
click
|
|
11706
|
-
} = __spreadValues(__spreadValues({}, defaultProps$
|
|
11708
|
+
} = __spreadValues(__spreadValues({}, defaultProps$m), props);
|
|
11707
11709
|
const wrap = useRef(null);
|
|
11708
11710
|
const content = useRef(null);
|
|
11709
11711
|
const [showNoticeBar, SetShowNoticeBar] = useState(true);
|
|
@@ -11916,16 +11918,16 @@ const NoticeBar = (props) => {
|
|
|
11916
11918
|
size: "11px"
|
|
11917
11919
|
}) : null))) : null);
|
|
11918
11920
|
};
|
|
11919
|
-
NoticeBar.defaultProps = defaultProps$
|
|
11921
|
+
NoticeBar.defaultProps = defaultProps$m;
|
|
11920
11922
|
NoticeBar.displayName = "NutNoticeBar";
|
|
11921
11923
|
const DataContext$1 = createContext({});
|
|
11922
|
-
const defaultProps$
|
|
11924
|
+
const defaultProps$l = {
|
|
11923
11925
|
current: 0,
|
|
11924
11926
|
direction: "horizontal",
|
|
11925
11927
|
progressDot: false
|
|
11926
11928
|
};
|
|
11927
11929
|
const Steps = (props) => {
|
|
11928
|
-
const propSteps = __spreadValues(__spreadValues({}, defaultProps$
|
|
11930
|
+
const propSteps = __spreadValues(__spreadValues({}, defaultProps$l), props);
|
|
11929
11931
|
const _a = propSteps, { children, current, direction, className, progressDot, clickStep } = _a, restProps = __objRest(_a, ["children", "current", "direction", "className", "progressDot", "clickStep"]);
|
|
11930
11932
|
const parentSteps = {
|
|
11931
11933
|
propSteps
|
|
@@ -11941,9 +11943,9 @@ const Steps = (props) => {
|
|
|
11941
11943
|
className: classes
|
|
11942
11944
|
}, restProps), children));
|
|
11943
11945
|
};
|
|
11944
|
-
Steps.defaultProps = defaultProps$
|
|
11946
|
+
Steps.defaultProps = defaultProps$l;
|
|
11945
11947
|
Steps.displayName = "NutSteps";
|
|
11946
|
-
const defaultProps$
|
|
11948
|
+
const defaultProps$k = {
|
|
11947
11949
|
title: "",
|
|
11948
11950
|
content: "",
|
|
11949
11951
|
activeIndex: 0,
|
|
@@ -11952,7 +11954,7 @@ const defaultProps$j = {
|
|
|
11952
11954
|
size: "12px"
|
|
11953
11955
|
};
|
|
11954
11956
|
const Step = (props) => {
|
|
11955
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
11957
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$k), props), {
|
|
11956
11958
|
children,
|
|
11957
11959
|
title,
|
|
11958
11960
|
content,
|
|
@@ -12016,10 +12018,10 @@ const Step = (props) => {
|
|
|
12016
12018
|
className: "nut-step-content"
|
|
12017
12019
|
}, renderContent())));
|
|
12018
12020
|
};
|
|
12019
|
-
Step.defaultProps = defaultProps$
|
|
12021
|
+
Step.defaultProps = defaultProps$k;
|
|
12020
12022
|
Step.displayName = "NutStep";
|
|
12021
12023
|
const DataContext = createContext({});
|
|
12022
|
-
const defaultProps$
|
|
12024
|
+
const defaultProps$j = {
|
|
12023
12025
|
width: typeof window === "object" ? window.innerWidth : 375,
|
|
12024
12026
|
height: 0,
|
|
12025
12027
|
duration: 500,
|
|
@@ -12036,7 +12038,7 @@ const defaultProps$i = {
|
|
|
12036
12038
|
};
|
|
12037
12039
|
const DISTANCE = 5;
|
|
12038
12040
|
const Swiper = React__default.forwardRef((props, ref) => {
|
|
12039
|
-
const propSwiper = __spreadValues(__spreadValues({}, defaultProps$
|
|
12041
|
+
const propSwiper = __spreadValues(__spreadValues({}, defaultProps$j), props);
|
|
12040
12042
|
const _a = propSwiper, {
|
|
12041
12043
|
children,
|
|
12042
12044
|
direction,
|
|
@@ -12412,13 +12414,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
12412
12414
|
});
|
|
12413
12415
|
})) : /* @__PURE__ */ React__default.createElement("div", null, pageContent)));
|
|
12414
12416
|
});
|
|
12415
|
-
Swiper.defaultProps = defaultProps$
|
|
12417
|
+
Swiper.defaultProps = defaultProps$j;
|
|
12416
12418
|
Swiper.displayName = "NutSwiper";
|
|
12417
|
-
const defaultProps$
|
|
12419
|
+
const defaultProps$i = {
|
|
12418
12420
|
direction: "horizontal"
|
|
12419
12421
|
};
|
|
12420
12422
|
const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
12421
|
-
const _props = __spreadValues(__spreadValues({}, defaultProps$
|
|
12423
|
+
const _props = __spreadValues(__spreadValues({}, defaultProps$i), props);
|
|
12422
12424
|
const { children, direction, size } = _props;
|
|
12423
12425
|
const parent = useContext$1(DataContext);
|
|
12424
12426
|
const [offset, setOffset] = useState(0);
|
|
@@ -12446,10 +12448,10 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
|
12446
12448
|
style: style()
|
|
12447
12449
|
}, children);
|
|
12448
12450
|
});
|
|
12449
|
-
SwiperItem.defaultProps = defaultProps$
|
|
12451
|
+
SwiperItem.defaultProps = defaultProps$i;
|
|
12450
12452
|
SwiperItem.displayName = "NutSwiperItem";
|
|
12451
12453
|
const AvatarContext = createContext({});
|
|
12452
|
-
const defaultProps$
|
|
12454
|
+
const defaultProps$h = {
|
|
12453
12455
|
size: "",
|
|
12454
12456
|
icon: "",
|
|
12455
12457
|
bgColor: "#eee",
|
|
@@ -12460,7 +12462,7 @@ const defaultProps$g = {
|
|
|
12460
12462
|
};
|
|
12461
12463
|
const Avatar = (props) => {
|
|
12462
12464
|
var _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
12463
|
-
const _a = __spreadValues(__spreadValues({}, defaultProps$
|
|
12465
|
+
const _a = __spreadValues(__spreadValues({}, defaultProps$h), props), {
|
|
12464
12466
|
children,
|
|
12465
12467
|
prefixCls,
|
|
12466
12468
|
size,
|
|
@@ -12565,8 +12567,39 @@ const Avatar = (props) => {
|
|
|
12565
12567
|
className: "text"
|
|
12566
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)}`)));
|
|
12567
12569
|
};
|
|
12568
|
-
Avatar.defaultProps = defaultProps$
|
|
12570
|
+
Avatar.defaultProps = defaultProps$h;
|
|
12569
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";
|
|
12570
12603
|
const defaultProps$f = {
|
|
12571
12604
|
price: 0,
|
|
12572
12605
|
needSymbol: true,
|
|
@@ -14212,4 +14245,4 @@ const Card = (props) => {
|
|
|
14212
14245
|
};
|
|
14213
14246
|
Card.defaultProps = defaultProps;
|
|
14214
14247
|
Card.displayName = "NutCard";
|
|
14215
|
-
export { ActionSheet, Address, AnimatingNumbers, Avatar, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, ConfigProvider, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, FixedNav, Icon, Infiniteloading, Input, InputNumber, Layout, NavBar, NoticeBar, Notify, Overlay, Pagination, Picker, Popover, Popup, Price, Radio, RadioGroup, Range, Rate, Row, ShortPassword, Signature, Skeleton, Step, Steps, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Tabs, Tag, TextArea, Toast, Uploader };
|
|
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 };
|