@nutui/nutui-react 2.0.0-alpha.14 → 2.0.0-alpha.15
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 +14 -0
- package/dist/esm/Card/style/style.css +1 -1
- package/dist/esm/Card.js +35 -22
- package/dist/esm/ConfigProvider.js +1 -1
- package/dist/esm/InfiniteLoading/style/style.css +1 -0
- package/dist/esm/{Infiniteloading.js → InfiniteLoading.js} +25 -37
- package/dist/esm/Signature/style/index.js +1 -1
- package/dist/esm/Signature/style/style.css +1 -1
- package/dist/esm/Signature.js +27 -35
- package/dist/esm/Tag/style/style.css +1 -1
- package/dist/esm/Tag.js +26 -30
- package/dist/esm/TimeDetail/style/style.css +1 -1
- package/dist/esm/TimeDetail.js +39 -41
- package/dist/esm/TimeSelect/style/index.js +0 -1
- package/dist/esm/TimeSelect/style/style.css +1 -1
- package/dist/esm/TimeSelect.js +91 -114
- package/dist/esm/nutui-react.es.js +8 -10
- package/dist/esm/types/src/locales/base.d.ts +1 -1
- package/dist/esm/types/src/packages/card/card.d.ts +8 -9
- package/dist/esm/types/src/packages/card/card.taro.d.ts +8 -9
- package/dist/esm/types/src/packages/card/index.d.ts +1 -0
- package/dist/esm/types/src/packages/card/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
- package/dist/esm/types/src/packages/imagepreview/imagepreview.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/infiniteloading/demo.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/infiniteloading/index.d.ts +3 -2
- package/dist/esm/types/src/packages/infiniteloading/index.taro.d.ts +3 -2
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.d.ts +9 -14
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.taro.d.ts +8 -12
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +2 -3
- package/dist/esm/types/src/packages/nutui.react.d.ts +2 -4
- package/dist/esm/types/src/packages/nutui.react.scss.d.ts +0 -1
- package/dist/esm/types/src/packages/nutui.react.taro.d.ts +1 -3
- package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +0 -1
- package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +1 -2
- package/dist/esm/types/src/packages/signature/index.d.ts +1 -0
- package/dist/esm/types/src/packages/signature/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/signature/signature.d.ts +10 -8
- package/dist/esm/types/src/packages/signature/signature.taro.d.ts +7 -12
- package/dist/esm/types/src/packages/tag/index.d.ts +1 -0
- package/dist/esm/types/src/packages/tag/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/tag/tag.d.ts +4 -6
- package/dist/esm/types/src/packages/tag/tag.taro.d.ts +4 -6
- package/dist/esm/types/src/packages/timedetail/index.d.ts +1 -2
- package/dist/esm/types/src/packages/timedetail/timedetail.d.ts +9 -11
- package/dist/esm/types/src/packages/timedetail/timedetail.taro.d.ts +9 -11
- package/dist/esm/types/src/packages/timeselect/demo.taro.d.ts +0 -4
- package/dist/esm/types/src/packages/timeselect/index.d.ts +1 -0
- package/dist/esm/types/src/packages/timeselect/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/timeselect/timeselect.d.ts +25 -20
- package/dist/esm/types/src/packages/timeselect/timeselect.taro.d.ts +25 -20
- package/dist/locales/base.d.ts +1 -1
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +2 -2
- package/dist/locales/id-ID.js +2 -2
- package/dist/locales/tr-TR.js +2 -2
- package/dist/locales/zh-CN.js +2 -2
- package/dist/locales/zh-TW.js +2 -2
- package/dist/locales/zh-UG.js +2 -2
- package/dist/nutui.react.es.js +556 -605
- package/dist/nutui.react.umd.js +556 -605
- package/dist/packages/card/card.scss +8 -14
- package/dist/packages/infiniteloading/infiniteloading.scss +2 -25
- package/dist/packages/signature/signature.scss +1 -18
- package/dist/packages/tag/tag.scss +10 -17
- package/dist/packages/timedetail/timedetail.scss +12 -37
- package/dist/packages/timeselect/timeselect.scss +15 -44
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/themes/default.scss +0 -1
- package/dist/styles/variables-jmapp.scss +50 -97
- package/dist/styles/variables.scss +51 -98
- package/dist/types/index.d.ts +2 -3
- package/dist/types/locales/base.d.ts +1 -1
- package/dist/types/packages/card/card.d.ts +57 -14
- package/dist/types/packages/card/index.d.ts +1 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/infiniteloading/index.d.ts +3 -2
- package/dist/types/packages/infiniteloading/infiniteloading.d.ts +57 -18
- package/dist/types/packages/signature/index.d.ts +1 -0
- package/dist/types/packages/signature/signature.d.ts +38 -12
- package/dist/types/packages/tag/index.d.ts +1 -0
- package/dist/types/packages/tag/tag.d.ts +52 -14
- package/dist/types/packages/timedetail/index.d.ts +1 -2
- package/dist/types/packages/timedetail/timedetail.d.ts +9 -11
- package/dist/types/packages/timeselect/index.d.ts +1 -0
- package/dist/types/packages/timeselect/timeselect.d.ts +62 -21
- package/package.json +1 -1
- package/dist/esm/Infiniteloading/style/style.css +0 -1
- package/dist/esm/TimePannel/style/css.js +0 -1
- package/dist/esm/TimePannel/style/index.js +0 -2
- package/dist/esm/TimePannel/style/style.css +0 -1
- package/dist/esm/TimePannel.js +0 -47
- package/dist/esm/types/src/packages/timedetail/demo.d.ts +0 -3
- package/dist/esm/types/src/packages/timedetail/demo.taro.d.ts +0 -3
- package/dist/esm/types/src/packages/timepannel/demo.d.ts +0 -3
- package/dist/esm/types/src/packages/timepannel/demo.taro.d.ts +0 -3
- package/dist/esm/types/src/packages/timepannel/index.d.ts +0 -2
- package/dist/esm/types/src/packages/timepannel/index.taro.d.ts +0 -2
- package/dist/esm/types/src/packages/timepannel/timepannel.d.ts +0 -8
- package/dist/esm/types/src/packages/timepannel/timepannel.taro.d.ts +0 -8
- package/dist/packages/timepannel/timepannel.scss +0 -17
- package/dist/types/packages/timepannel/index.d.ts +0 -2
- package/dist/types/packages/timepannel/timepannel.d.ts +0 -8
- /package/dist/esm/{Infiniteloading → InfiniteLoading}/style/css.js +0 -0
- /package/dist/esm/{Infiniteloading → InfiniteLoading}/style/index.js +0 -0
package/dist/nutui.react.es.js
CHANGED
|
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6
6
|
};
|
|
7
7
|
var _a;
|
|
8
8
|
/*!
|
|
9
|
-
* @nutui/nutui-react v2.0.0-alpha.
|
|
9
|
+
* @nutui/nutui-react v2.0.0-alpha.15 Wed Jun 07 2023 16:11:56 GMT+0800 (China Standard Time)
|
|
10
10
|
* (c) 2023 @jdf2e.
|
|
11
11
|
* Released under the MIT License.
|
|
12
12
|
*/
|
|
@@ -2391,7 +2391,7 @@ const ComponentDefaults = {
|
|
|
2391
2391
|
style: {}
|
|
2392
2392
|
};
|
|
2393
2393
|
const prefixCls = "nut-button";
|
|
2394
|
-
const defaultProps$
|
|
2394
|
+
const defaultProps$1r = {
|
|
2395
2395
|
...ComponentDefaults,
|
|
2396
2396
|
color: "",
|
|
2397
2397
|
type: "default",
|
|
@@ -2423,7 +2423,7 @@ const Button = React__default.forwardRef(
|
|
|
2423
2423
|
style,
|
|
2424
2424
|
...rest
|
|
2425
2425
|
} = {
|
|
2426
|
-
...defaultProps$
|
|
2426
|
+
...defaultProps$1r,
|
|
2427
2427
|
...props
|
|
2428
2428
|
};
|
|
2429
2429
|
const getStyle = useCallback(() => {
|
|
@@ -2476,7 +2476,7 @@ const Button = React__default.forwardRef(
|
|
|
2476
2476
|
}
|
|
2477
2477
|
);
|
|
2478
2478
|
Button.displayName = "NutButton";
|
|
2479
|
-
const defaultProps$
|
|
2479
|
+
const defaultProps$1q = {
|
|
2480
2480
|
...ComponentDefaults,
|
|
2481
2481
|
title: null,
|
|
2482
2482
|
description: null,
|
|
@@ -2486,7 +2486,7 @@ const defaultProps$1r = {
|
|
|
2486
2486
|
onClick: (event) => {
|
|
2487
2487
|
}
|
|
2488
2488
|
};
|
|
2489
|
-
const classPrefix$
|
|
2489
|
+
const classPrefix$n = "nut-cell";
|
|
2490
2490
|
const Cell = (props) => {
|
|
2491
2491
|
const {
|
|
2492
2492
|
children,
|
|
@@ -2500,7 +2500,7 @@ const Cell = (props) => {
|
|
|
2500
2500
|
style,
|
|
2501
2501
|
...rest
|
|
2502
2502
|
} = {
|
|
2503
|
-
...defaultProps$
|
|
2503
|
+
...defaultProps$1q,
|
|
2504
2504
|
...props
|
|
2505
2505
|
};
|
|
2506
2506
|
const handleClick2 = (event) => {
|
|
@@ -2517,44 +2517,44 @@ const Cell = (props) => {
|
|
|
2517
2517
|
return /* @__PURE__ */ React__default.createElement(
|
|
2518
2518
|
"div",
|
|
2519
2519
|
{
|
|
2520
|
-
className: classNames(classPrefix$
|
|
2520
|
+
className: classNames(classPrefix$n, className),
|
|
2521
2521
|
onClick: (event) => handleClick2(event),
|
|
2522
2522
|
style: baseStyle,
|
|
2523
2523
|
...rest
|
|
2524
2524
|
},
|
|
2525
|
-
children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, title || description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
2525
|
+
children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, title || description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$n}__left` }, title ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$n}__title` }, title) : null, description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$n}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React__default.createElement(
|
|
2526
2526
|
"div",
|
|
2527
2527
|
{
|
|
2528
|
-
className: `${classPrefix$
|
|
2528
|
+
className: `${classPrefix$n}__extra`,
|
|
2529
2529
|
style: styles
|
|
2530
2530
|
},
|
|
2531
2531
|
extra
|
|
2532
|
-
) : null, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
2532
|
+
) : null, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$n}__divider` }))
|
|
2533
2533
|
);
|
|
2534
2534
|
};
|
|
2535
|
-
Cell.defaultProps = defaultProps$
|
|
2535
|
+
Cell.defaultProps = defaultProps$1q;
|
|
2536
2536
|
Cell.displayName = "NutCell";
|
|
2537
|
-
const defaultProps$
|
|
2537
|
+
const defaultProps$1p = {
|
|
2538
2538
|
...ComponentDefaults,
|
|
2539
2539
|
title: "",
|
|
2540
2540
|
description: "",
|
|
2541
2541
|
divider: true
|
|
2542
2542
|
};
|
|
2543
|
-
const classPrefix$
|
|
2543
|
+
const classPrefix$m = "nut-cell-group";
|
|
2544
2544
|
const CellGroup = (props) => {
|
|
2545
2545
|
const { children, className, style, title, description, divider, ...rest } = {
|
|
2546
|
-
...defaultProps$
|
|
2546
|
+
...defaultProps$1p,
|
|
2547
2547
|
...props
|
|
2548
2548
|
};
|
|
2549
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix$
|
|
2549
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix$m, className), ...rest }, title ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$m}__title` }, title) : null, description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$m}__description` }, description) : null, /* @__PURE__ */ React__default.createElement(
|
|
2550
2550
|
"div",
|
|
2551
2551
|
{
|
|
2552
|
-
className: `${classPrefix$
|
|
2552
|
+
className: `${classPrefix$m}__wrap ${divider ? `${classPrefix$m}__wrap--divider` : ""}`
|
|
2553
2553
|
},
|
|
2554
2554
|
children
|
|
2555
2555
|
));
|
|
2556
2556
|
};
|
|
2557
|
-
CellGroup.defaultProps = defaultProps$
|
|
2557
|
+
CellGroup.defaultProps = defaultProps$1p;
|
|
2558
2558
|
CellGroup.displayName = "NutCellGroup";
|
|
2559
2559
|
var INFINITY = 1 / 0;
|
|
2560
2560
|
var symbolTag = "[object Symbol]";
|
|
@@ -2906,7 +2906,7 @@ const zhCN = {
|
|
|
2906
2906
|
},
|
|
2907
2907
|
signature: {
|
|
2908
2908
|
reSign: "重签",
|
|
2909
|
-
|
|
2909
|
+
unsupported: "对不起,当前浏览器不支持Canvas,无法使用本控件!"
|
|
2910
2910
|
},
|
|
2911
2911
|
ecard: {
|
|
2912
2912
|
chooseText: "请选择电子卡面值",
|
|
@@ -2969,7 +2969,7 @@ const zhCN = {
|
|
|
2969
2969
|
errorCanvasTips: "当前环境不支持Canvas"
|
|
2970
2970
|
}
|
|
2971
2971
|
};
|
|
2972
|
-
const defaultProps$
|
|
2972
|
+
const defaultProps$1o = {
|
|
2973
2973
|
locale: zhCN
|
|
2974
2974
|
};
|
|
2975
2975
|
const defaultConfigRef = {
|
|
@@ -2992,7 +2992,7 @@ function convertThemeVarsToCSSVars(themeVars) {
|
|
|
2992
2992
|
return cssVars;
|
|
2993
2993
|
}
|
|
2994
2994
|
const ConfigProvider = (props) => {
|
|
2995
|
-
const { children, ...config2 } = { ...defaultProps$
|
|
2995
|
+
const { children, ...config2 } = { ...defaultProps$1o, ...props };
|
|
2996
2996
|
const parentConfig = useConfig();
|
|
2997
2997
|
const theme = config2.theme || {};
|
|
2998
2998
|
const style = useMemo(
|
|
@@ -3010,12 +3010,12 @@ const ConfigProvider = (props) => {
|
|
|
3010
3010
|
/* @__PURE__ */ React__default.createElement("div", { style }, children)
|
|
3011
3011
|
);
|
|
3012
3012
|
};
|
|
3013
|
-
ConfigProvider.defaultProps = defaultProps$
|
|
3013
|
+
ConfigProvider.defaultProps = defaultProps$1o;
|
|
3014
3014
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
3015
3015
|
const pxCheck = (value) => {
|
|
3016
3016
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
3017
3017
|
};
|
|
3018
|
-
const defaultProps$
|
|
3018
|
+
const defaultProps$1n = {
|
|
3019
3019
|
...ComponentDefaults,
|
|
3020
3020
|
fit: "fill",
|
|
3021
3021
|
position: "center",
|
|
@@ -3026,7 +3026,7 @@ const defaultProps$1o = {
|
|
|
3026
3026
|
loading: true,
|
|
3027
3027
|
lazy: false
|
|
3028
3028
|
};
|
|
3029
|
-
const classPrefix$
|
|
3029
|
+
const classPrefix$l = "nut-image";
|
|
3030
3030
|
const Image$1 = (props) => {
|
|
3031
3031
|
const {
|
|
3032
3032
|
className,
|
|
@@ -3044,7 +3044,7 @@ const Image$1 = (props) => {
|
|
|
3044
3044
|
onClick,
|
|
3045
3045
|
onLoad,
|
|
3046
3046
|
onError
|
|
3047
|
-
} = { ...defaultProps$
|
|
3047
|
+
} = { ...defaultProps$1n, ...props };
|
|
3048
3048
|
const [innerLoading, setInnerLoading] = useState(true);
|
|
3049
3049
|
const [isError, setIsError] = useState(false);
|
|
3050
3050
|
const imgRef = useRef(null);
|
|
@@ -3137,7 +3137,7 @@ const Image$1 = (props) => {
|
|
|
3137
3137
|
return /* @__PURE__ */ React__default.createElement(
|
|
3138
3138
|
"div",
|
|
3139
3139
|
{
|
|
3140
|
-
className: classNames(classPrefix$
|
|
3140
|
+
className: classNames(classPrefix$l, className),
|
|
3141
3141
|
style: containerStyle,
|
|
3142
3142
|
onClick: (e) => {
|
|
3143
3143
|
imageClick(e);
|
|
@@ -3171,7 +3171,7 @@ const Image$1 = (props) => {
|
|
|
3171
3171
|
renderErrorImg()
|
|
3172
3172
|
);
|
|
3173
3173
|
};
|
|
3174
|
-
Image$1.defaultProps = defaultProps$
|
|
3174
|
+
Image$1.defaultProps = defaultProps$1n;
|
|
3175
3175
|
Image$1.displayName = "NutImage";
|
|
3176
3176
|
const defaultOverlayProps = {
|
|
3177
3177
|
...ComponentDefaults,
|
|
@@ -3256,7 +3256,7 @@ const Overlay = (props) => {
|
|
|
3256
3256
|
Overlay.defaultProps = defaultOverlayProps;
|
|
3257
3257
|
Overlay.displayName = "NutOverlay";
|
|
3258
3258
|
const DataContext$2 = createContext({});
|
|
3259
|
-
const defaultProps$
|
|
3259
|
+
const defaultProps$1m = {
|
|
3260
3260
|
...ComponentDefaults,
|
|
3261
3261
|
span: "24",
|
|
3262
3262
|
offset: "0",
|
|
@@ -3264,7 +3264,7 @@ const defaultProps$1n = {
|
|
|
3264
3264
|
};
|
|
3265
3265
|
const Col = (props) => {
|
|
3266
3266
|
const { className, style, span, offset, children, onClick } = {
|
|
3267
|
-
...defaultProps$
|
|
3267
|
+
...defaultProps$1m,
|
|
3268
3268
|
...props
|
|
3269
3269
|
};
|
|
3270
3270
|
const [colName, setColName] = useState("");
|
|
@@ -3296,39 +3296,39 @@ const Col = (props) => {
|
|
|
3296
3296
|
children
|
|
3297
3297
|
);
|
|
3298
3298
|
};
|
|
3299
|
-
Col.defaultProps = defaultProps$
|
|
3299
|
+
Col.defaultProps = defaultProps$1m;
|
|
3300
3300
|
Col.displayName = "NutCol";
|
|
3301
|
-
const defaultProps$
|
|
3301
|
+
const defaultProps$1l = {
|
|
3302
3302
|
...ComponentDefaults,
|
|
3303
3303
|
contentPosition: "center",
|
|
3304
3304
|
direction: "horizontal"
|
|
3305
3305
|
};
|
|
3306
|
-
const classPrefix$
|
|
3306
|
+
const classPrefix$k = `nut-divider`;
|
|
3307
3307
|
const Divider = (props) => {
|
|
3308
3308
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
3309
|
-
...defaultProps$
|
|
3309
|
+
...defaultProps$1l,
|
|
3310
3310
|
...props
|
|
3311
3311
|
};
|
|
3312
3312
|
const classes = direction === "horizontal" ? classNames({
|
|
3313
|
-
[`${classPrefix$
|
|
3314
|
-
[`${classPrefix$
|
|
3315
|
-
[`${classPrefix$
|
|
3316
|
-
[`${classPrefix$
|
|
3317
|
-
[`${classPrefix$
|
|
3313
|
+
[`${classPrefix$k}`]: true,
|
|
3314
|
+
[`${classPrefix$k}__center`]: children,
|
|
3315
|
+
[`${classPrefix$k}__left`]: contentPosition === "left",
|
|
3316
|
+
[`${classPrefix$k}__right`]: contentPosition === "right",
|
|
3317
|
+
[`${classPrefix$k}__hairline`]: true
|
|
3318
3318
|
}) : classNames({
|
|
3319
|
-
[`${classPrefix$
|
|
3320
|
-
[`${classPrefix$
|
|
3319
|
+
[`${classPrefix$k}`]: true,
|
|
3320
|
+
[`${classPrefix$k}__vertical`]: direction === "vertical"
|
|
3321
3321
|
});
|
|
3322
3322
|
return /* @__PURE__ */ React__default.createElement("div", { className: `${classes} ${className || ""}`, style, ...rest }, children);
|
|
3323
3323
|
};
|
|
3324
|
-
Divider.defaultProps = defaultProps$
|
|
3324
|
+
Divider.defaultProps = defaultProps$1l;
|
|
3325
3325
|
Divider.displayName = "NutDivider";
|
|
3326
3326
|
const gridContext = {
|
|
3327
3327
|
onClick: (item, index) => {
|
|
3328
3328
|
}
|
|
3329
3329
|
};
|
|
3330
3330
|
const GridContext = React__default.createContext(gridContext);
|
|
3331
|
-
const defaultProps$
|
|
3331
|
+
const defaultProps$1k = {
|
|
3332
3332
|
text: "",
|
|
3333
3333
|
columns: 4,
|
|
3334
3334
|
gap: 0,
|
|
@@ -3354,7 +3354,7 @@ const GridItem = (props) => {
|
|
|
3354
3354
|
onClick,
|
|
3355
3355
|
...rest
|
|
3356
3356
|
} = {
|
|
3357
|
-
...defaultProps$
|
|
3357
|
+
...defaultProps$1k,
|
|
3358
3358
|
...props
|
|
3359
3359
|
};
|
|
3360
3360
|
const classPrefix2 = "nut-grid-item";
|
|
@@ -3412,9 +3412,9 @@ const GridItem = (props) => {
|
|
|
3412
3412
|
/* @__PURE__ */ React__default.createElement("div", { className: contentClass() }, children && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children), text && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__text` }, text))
|
|
3413
3413
|
);
|
|
3414
3414
|
};
|
|
3415
|
-
GridItem.defaultProps = defaultProps$
|
|
3415
|
+
GridItem.defaultProps = defaultProps$1k;
|
|
3416
3416
|
GridItem.displayName = "NutGridItem";
|
|
3417
|
-
const defaultProps$
|
|
3417
|
+
const defaultProps$1j = {
|
|
3418
3418
|
columns: 4,
|
|
3419
3419
|
gap: 0,
|
|
3420
3420
|
center: true,
|
|
@@ -3435,7 +3435,7 @@ const Grid = (props) => {
|
|
|
3435
3435
|
className,
|
|
3436
3436
|
onClick,
|
|
3437
3437
|
...rest
|
|
3438
|
-
} = { ...defaultProps$
|
|
3438
|
+
} = { ...defaultProps$1j, ...props };
|
|
3439
3439
|
const childrenDom = React__default.Children.toArray(children);
|
|
3440
3440
|
const classPrefix2 = "nut-grid";
|
|
3441
3441
|
const rootClass = () => {
|
|
@@ -3465,18 +3465,18 @@ const Grid = (props) => {
|
|
|
3465
3465
|
});
|
|
3466
3466
|
})));
|
|
3467
3467
|
};
|
|
3468
|
-
Grid.defaultProps = defaultProps$
|
|
3468
|
+
Grid.defaultProps = defaultProps$1j;
|
|
3469
3469
|
Grid.displayName = "NutGrid";
|
|
3470
3470
|
Grid.Item = GridItem;
|
|
3471
|
-
const defaultProps$
|
|
3471
|
+
const defaultProps$1i = {};
|
|
3472
3472
|
const Layout = (props) => {
|
|
3473
|
-
({ ...defaultProps$
|
|
3473
|
+
({ ...defaultProps$1i, ...props });
|
|
3474
3474
|
return /* @__PURE__ */ React__default.createElement("div", { className: "nut-layout" }, "Layout");
|
|
3475
3475
|
};
|
|
3476
|
-
Layout.defaultProps = defaultProps$
|
|
3476
|
+
Layout.defaultProps = defaultProps$1i;
|
|
3477
3477
|
Layout.displayName = "NutLayout";
|
|
3478
|
-
const classPrefix$
|
|
3479
|
-
const defaultProps$
|
|
3478
|
+
const classPrefix$j = "nut-row";
|
|
3479
|
+
const defaultProps$1h = {
|
|
3480
3480
|
...ComponentDefaults,
|
|
3481
3481
|
type: "",
|
|
3482
3482
|
justify: "start",
|
|
@@ -3496,7 +3496,7 @@ const Row = (props) => {
|
|
|
3496
3496
|
gutter,
|
|
3497
3497
|
onClick
|
|
3498
3498
|
} = {
|
|
3499
|
-
...defaultProps$
|
|
3499
|
+
...defaultProps$1h,
|
|
3500
3500
|
...props
|
|
3501
3501
|
};
|
|
3502
3502
|
const getClass = (prefix2, type22) => {
|
|
@@ -3510,7 +3510,7 @@ const Row = (props) => {
|
|
|
3510
3510
|
${getClass("justify", justify)}
|
|
3511
3511
|
${getClass("align", align)}
|
|
3512
3512
|
${getClass("flex", wrap)}
|
|
3513
|
-
${classPrefix$
|
|
3513
|
+
${classPrefix$j}
|
|
3514
3514
|
`;
|
|
3515
3515
|
};
|
|
3516
3516
|
const parentRow = {
|
|
@@ -3528,7 +3528,7 @@ const Row = (props) => {
|
|
|
3528
3528
|
children
|
|
3529
3529
|
));
|
|
3530
3530
|
};
|
|
3531
|
-
Row.defaultProps = defaultProps$
|
|
3531
|
+
Row.defaultProps = defaultProps$1h;
|
|
3532
3532
|
Row.displayName = "NutRow";
|
|
3533
3533
|
const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
|
|
3534
3534
|
const defaultRoot = canUseDom ? window : void 0;
|
|
@@ -3603,13 +3603,13 @@ function useWatch(dep, callback, config2 = { immediate: false }) {
|
|
|
3603
3603
|
stop2.current = true;
|
|
3604
3604
|
};
|
|
3605
3605
|
}
|
|
3606
|
-
const defaultProps$
|
|
3606
|
+
const defaultProps$1g = {
|
|
3607
3607
|
...ComponentDefaults,
|
|
3608
3608
|
position: "top",
|
|
3609
3609
|
threshold: 0,
|
|
3610
3610
|
zIndex: 2e3
|
|
3611
3611
|
};
|
|
3612
|
-
const classPrefix$
|
|
3612
|
+
const classPrefix$i = "nut-sticky";
|
|
3613
3613
|
const Sticky = (props) => {
|
|
3614
3614
|
const {
|
|
3615
3615
|
position,
|
|
@@ -3621,7 +3621,7 @@ const Sticky = (props) => {
|
|
|
3621
3621
|
threshold,
|
|
3622
3622
|
onChange,
|
|
3623
3623
|
...rest
|
|
3624
|
-
} = { ...defaultProps$
|
|
3624
|
+
} = { ...defaultProps$1g, ...props };
|
|
3625
3625
|
const stickyRef = useRef(null);
|
|
3626
3626
|
const rootRef = useRef(null);
|
|
3627
3627
|
const [isFixed, setIsFixed] = useState(false);
|
|
@@ -3731,15 +3731,15 @@ const Sticky = (props) => {
|
|
|
3731
3731
|
{
|
|
3732
3732
|
ref: rootRef,
|
|
3733
3733
|
style: { ...style, ...rootStyle },
|
|
3734
|
-
className: classNames(classPrefix$
|
|
3734
|
+
className: classNames(classPrefix$i, className),
|
|
3735
3735
|
...rest
|
|
3736
3736
|
},
|
|
3737
3737
|
/* @__PURE__ */ React__default.createElement("div", { className: "nut-sticky--box", ref: stickyRef, style: stickyStyle }, children)
|
|
3738
3738
|
);
|
|
3739
3739
|
};
|
|
3740
|
-
Sticky.defaultProps = defaultProps$
|
|
3740
|
+
Sticky.defaultProps = defaultProps$1g;
|
|
3741
3741
|
Sticky.displayName = "NutSticky";
|
|
3742
|
-
const defaultProps$
|
|
3742
|
+
const defaultProps$1f = {
|
|
3743
3743
|
...ComponentDefaults,
|
|
3744
3744
|
target: "",
|
|
3745
3745
|
threshold: 200,
|
|
@@ -3757,7 +3757,7 @@ const BackTop = (props) => {
|
|
|
3757
3757
|
style,
|
|
3758
3758
|
onClick
|
|
3759
3759
|
} = {
|
|
3760
|
-
...defaultProps$
|
|
3760
|
+
...defaultProps$1f,
|
|
3761
3761
|
...props
|
|
3762
3762
|
};
|
|
3763
3763
|
const classPrefix2 = "nut-backtop";
|
|
@@ -3855,7 +3855,7 @@ const BackTop = (props) => {
|
|
|
3855
3855
|
children || /* @__PURE__ */ React__default.createElement(y$2, { width: 19, height: 19, className: "nut-backtop-main" })
|
|
3856
3856
|
);
|
|
3857
3857
|
};
|
|
3858
|
-
BackTop.defaultProps = defaultProps$
|
|
3858
|
+
BackTop.defaultProps = defaultProps$1f;
|
|
3859
3859
|
BackTop.displayName = "NutBackTop";
|
|
3860
3860
|
function clamp$1(v, min, max) {
|
|
3861
3861
|
return Math.max(min, Math.min(v, max));
|
|
@@ -8973,7 +8973,7 @@ const host = createHost(primitives, {
|
|
|
8973
8973
|
});
|
|
8974
8974
|
const animated = host.animated;
|
|
8975
8975
|
const elevatorContext = createContext({});
|
|
8976
|
-
const defaultProps$
|
|
8976
|
+
const defaultProps$1e = {
|
|
8977
8977
|
...ComponentDefaults,
|
|
8978
8978
|
height: "200px",
|
|
8979
8979
|
floorKey: "title",
|
|
@@ -8999,7 +8999,7 @@ const Elevator = (props) => {
|
|
|
8999
8999
|
children,
|
|
9000
9000
|
...rest
|
|
9001
9001
|
} = {
|
|
9002
|
-
...defaultProps$
|
|
9002
|
+
...defaultProps$1e,
|
|
9003
9003
|
...props
|
|
9004
9004
|
};
|
|
9005
9005
|
const classPrefix2 = "nut-elevator";
|
|
@@ -9174,10 +9174,10 @@ const Elevator = (props) => {
|
|
|
9174
9174
|
})
|
|
9175
9175
|
))) : null);
|
|
9176
9176
|
};
|
|
9177
|
-
Elevator.defaultProps = defaultProps$
|
|
9177
|
+
Elevator.defaultProps = defaultProps$1e;
|
|
9178
9178
|
Elevator.displayName = "NutElevator";
|
|
9179
9179
|
Elevator.Context = elevatorContext;
|
|
9180
|
-
const defaultProps$
|
|
9180
|
+
const defaultProps$1d = {
|
|
9181
9181
|
...ComponentDefaults,
|
|
9182
9182
|
activeText: "",
|
|
9183
9183
|
inactiveText: "",
|
|
@@ -9205,7 +9205,7 @@ const FixedNav = (props) => {
|
|
|
9205
9205
|
content,
|
|
9206
9206
|
...rest
|
|
9207
9207
|
} = {
|
|
9208
|
-
...defaultProps$
|
|
9208
|
+
...defaultProps$1d,
|
|
9209
9209
|
...props
|
|
9210
9210
|
};
|
|
9211
9211
|
const classPrefix2 = "nut-fixednav";
|
|
@@ -9257,9 +9257,9 @@ const FixedNav = (props) => {
|
|
|
9257
9257
|
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__btn`, onClick: () => onUpdateValue() }, content || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(y$6, { color: "#fff" }), /* @__PURE__ */ React__default.createElement("div", { className: "text" }, visible ? activeText || locale.fixednav.activeText : inactiveText || locale.fixednav.inactiveText)))
|
|
9258
9258
|
);
|
|
9259
9259
|
};
|
|
9260
|
-
FixedNav.defaultProps = defaultProps$
|
|
9260
|
+
FixedNav.defaultProps = defaultProps$1d;
|
|
9261
9261
|
FixedNav.displayName = "NutFixedNav";
|
|
9262
|
-
const defaultProps$
|
|
9262
|
+
const defaultProps$1c = {
|
|
9263
9263
|
...ComponentDefaults,
|
|
9264
9264
|
left: "",
|
|
9265
9265
|
right: "",
|
|
@@ -9282,7 +9282,7 @@ const NavBar = (props) => {
|
|
|
9282
9282
|
zIndex,
|
|
9283
9283
|
onClickBack
|
|
9284
9284
|
} = {
|
|
9285
|
-
...defaultProps$
|
|
9285
|
+
...defaultProps$1c,
|
|
9286
9286
|
...props
|
|
9287
9287
|
};
|
|
9288
9288
|
const classPrefix2 = "nut-navbar";
|
|
@@ -9319,7 +9319,7 @@ const NavBar = (props) => {
|
|
|
9319
9319
|
const cls = classNames(classPrefix2, classes, className);
|
|
9320
9320
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}--placeholder` }, renderWrapper()) : renderWrapper());
|
|
9321
9321
|
};
|
|
9322
|
-
NavBar.defaultProps = defaultProps$
|
|
9322
|
+
NavBar.defaultProps = defaultProps$1c;
|
|
9323
9323
|
NavBar.displayName = "NutNavBar";
|
|
9324
9324
|
function _extends$1() {
|
|
9325
9325
|
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
@@ -11062,7 +11062,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$1({},
|
|
|
11062
11062
|
onExited: propTypesExports.func
|
|
11063
11063
|
}) : {};
|
|
11064
11064
|
const CSSTransition$1 = CSSTransition;
|
|
11065
|
-
const defaultProps$
|
|
11065
|
+
const defaultProps$1b = {
|
|
11066
11066
|
...ComponentDefaults,
|
|
11067
11067
|
position: "center",
|
|
11068
11068
|
transition: "",
|
|
@@ -11235,7 +11235,7 @@ const Popup = (props) => {
|
|
|
11235
11235
|
}, [position, transition]);
|
|
11236
11236
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderToContainer(portal, renderNode()));
|
|
11237
11237
|
};
|
|
11238
|
-
Popup.defaultProps = defaultProps$
|
|
11238
|
+
Popup.defaultProps = defaultProps$1b;
|
|
11239
11239
|
Popup.displayName = "NutPopup";
|
|
11240
11240
|
const handleClick = (e) => {
|
|
11241
11241
|
e.stopPropagation();
|
|
@@ -11251,7 +11251,7 @@ const handleClick = (e) => {
|
|
|
11251
11251
|
}
|
|
11252
11252
|
};
|
|
11253
11253
|
const OffsetContext = createContext(20);
|
|
11254
|
-
const defaultProps$
|
|
11254
|
+
const defaultProps$1a = {
|
|
11255
11255
|
...ComponentDefaults,
|
|
11256
11256
|
position: "left",
|
|
11257
11257
|
width: "80%"
|
|
@@ -11268,7 +11268,7 @@ const SideNavBar = (props) => {
|
|
|
11268
11268
|
onClose,
|
|
11269
11269
|
...rest
|
|
11270
11270
|
} = {
|
|
11271
|
-
...defaultProps$
|
|
11271
|
+
...defaultProps$1a,
|
|
11272
11272
|
...props
|
|
11273
11273
|
};
|
|
11274
11274
|
const indent = props.indent ? Number(props.indent) : 20;
|
|
@@ -11300,7 +11300,7 @@ const SideNavBar = (props) => {
|
|
|
11300
11300
|
)))
|
|
11301
11301
|
);
|
|
11302
11302
|
};
|
|
11303
|
-
SideNavBar.defaultProps = defaultProps$
|
|
11303
|
+
SideNavBar.defaultProps = defaultProps$1a;
|
|
11304
11304
|
SideNavBar.displayName = "NutSideNavBar";
|
|
11305
11305
|
const SideNavBarItem = (props) => {
|
|
11306
11306
|
const classPrefix2 = "nut-subsidenavbar";
|
|
@@ -11319,13 +11319,13 @@ const SideNavBarItem = (props) => {
|
|
|
11319
11319
|
title
|
|
11320
11320
|
);
|
|
11321
11321
|
};
|
|
11322
|
-
const defaultProps$
|
|
11322
|
+
const defaultProps$19 = {
|
|
11323
11323
|
open: true
|
|
11324
11324
|
};
|
|
11325
11325
|
const SubSideNavBar = (props) => {
|
|
11326
11326
|
const classPrefix2 = "nut-subsidenavbar";
|
|
11327
11327
|
const { title, value, children, onClick, open, ...rest } = {
|
|
11328
|
-
...defaultProps$
|
|
11328
|
+
...defaultProps$19,
|
|
11329
11329
|
...props
|
|
11330
11330
|
};
|
|
11331
11331
|
const offset = useContext(OffsetContext);
|
|
@@ -11391,7 +11391,7 @@ function usePropsValue({
|
|
|
11391
11391
|
}
|
|
11392
11392
|
return [uncontrolled, handleUncontrolledChange];
|
|
11393
11393
|
}
|
|
11394
|
-
const defaultProps$
|
|
11394
|
+
const defaultProps$18 = {
|
|
11395
11395
|
...ComponentDefaults,
|
|
11396
11396
|
value: "",
|
|
11397
11397
|
dot: false,
|
|
@@ -11402,7 +11402,7 @@ const defaultProps$19 = {
|
|
|
11402
11402
|
};
|
|
11403
11403
|
const Badge = (props) => {
|
|
11404
11404
|
const { className, style, value, max, children, dot, top, right, color } = {
|
|
11405
|
-
...defaultProps$
|
|
11405
|
+
...defaultProps$18,
|
|
11406
11406
|
...props
|
|
11407
11407
|
};
|
|
11408
11408
|
const classPrefix2 = "nut-badge";
|
|
@@ -11429,9 +11429,9 @@ const Badge = (props) => {
|
|
|
11429
11429
|
};
|
|
11430
11430
|
return /* @__PURE__ */ React__default.createElement("div", { className: classes, style }, typeof value === "object" && value && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__icon` }, value), /* @__PURE__ */ React__default.createElement("div", null, children), /* @__PURE__ */ React__default.createElement("div", { className: contentClasses, style: getStyle() }, content()));
|
|
11431
11431
|
};
|
|
11432
|
-
Badge.defaultProps = defaultProps$
|
|
11432
|
+
Badge.defaultProps = defaultProps$18;
|
|
11433
11433
|
Badge.displayName = "NutBadge";
|
|
11434
|
-
const defaultProps$
|
|
11434
|
+
const defaultProps$17 = {
|
|
11435
11435
|
...ComponentDefaults,
|
|
11436
11436
|
title: "",
|
|
11437
11437
|
icon: null,
|
|
@@ -11453,7 +11453,7 @@ const TabbarItem = (props) => {
|
|
|
11453
11453
|
handleClick: handleClick2,
|
|
11454
11454
|
...rest
|
|
11455
11455
|
} = {
|
|
11456
|
-
...defaultProps$
|
|
11456
|
+
...defaultProps$17,
|
|
11457
11457
|
...props
|
|
11458
11458
|
};
|
|
11459
11459
|
const classPrefix2 = "nut-tabbar-item";
|
|
@@ -11477,7 +11477,7 @@ const TabbarItem = (props) => {
|
|
|
11477
11477
|
icon ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Badge, { ...rest }, /* @__PURE__ */ React__default.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React__default.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React__default.createElement(Badge, { ...rest }, /* @__PURE__ */ React__default.createElement("div", { className: titleClass }, title))
|
|
11478
11478
|
);
|
|
11479
11479
|
};
|
|
11480
|
-
const defaultProps$
|
|
11480
|
+
const defaultProps$16 = {
|
|
11481
11481
|
...ComponentDefaults,
|
|
11482
11482
|
defaultValue: 0,
|
|
11483
11483
|
fixed: false,
|
|
@@ -11500,7 +11500,7 @@ const Tabbar = (props) => {
|
|
|
11500
11500
|
style,
|
|
11501
11501
|
onSwitch
|
|
11502
11502
|
} = {
|
|
11503
|
-
...defaultProps$
|
|
11503
|
+
...defaultProps$16,
|
|
11504
11504
|
...props
|
|
11505
11505
|
};
|
|
11506
11506
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -11535,17 +11535,17 @@ const Tabbar = (props) => {
|
|
|
11535
11535
|
(fixed || safeArea) && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__safe-area` })
|
|
11536
11536
|
);
|
|
11537
11537
|
};
|
|
11538
|
-
Tabbar.defaultProps = defaultProps$
|
|
11538
|
+
Tabbar.defaultProps = defaultProps$16;
|
|
11539
11539
|
Tabbar.displayName = "NutTabbar";
|
|
11540
11540
|
Tabbar.Item = TabbarItem;
|
|
11541
|
-
const defaultProps$
|
|
11541
|
+
const defaultProps$15 = {
|
|
11542
11542
|
title: "",
|
|
11543
11543
|
value: "",
|
|
11544
11544
|
disabled: false
|
|
11545
11545
|
};
|
|
11546
11546
|
const TabPane = (props) => {
|
|
11547
11547
|
const { children, autoHeightClassName, className, disabled } = {
|
|
11548
|
-
...defaultProps$
|
|
11548
|
+
...defaultProps$15,
|
|
11549
11549
|
...props
|
|
11550
11550
|
};
|
|
11551
11551
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -11576,7 +11576,7 @@ function useForceUpdate() {
|
|
|
11576
11576
|
const [, updateState] = React__default.useState();
|
|
11577
11577
|
return React__default.useCallback(() => updateState({}), []);
|
|
11578
11578
|
}
|
|
11579
|
-
const defaultProps$
|
|
11579
|
+
const defaultProps$14 = {
|
|
11580
11580
|
...ComponentDefaults,
|
|
11581
11581
|
tabStyle: {},
|
|
11582
11582
|
activeColor: "",
|
|
@@ -11585,7 +11585,7 @@ const defaultProps$15 = {
|
|
|
11585
11585
|
duration: 300,
|
|
11586
11586
|
autoHeight: false
|
|
11587
11587
|
};
|
|
11588
|
-
const classPrefix$
|
|
11588
|
+
const classPrefix$h = "nut-tabs";
|
|
11589
11589
|
const Tabs = (props) => {
|
|
11590
11590
|
const {
|
|
11591
11591
|
activeColor,
|
|
@@ -11602,7 +11602,7 @@ const Tabs = (props) => {
|
|
|
11602
11602
|
autoHeight,
|
|
11603
11603
|
...rest
|
|
11604
11604
|
} = {
|
|
11605
|
-
...defaultProps$
|
|
11605
|
+
...defaultProps$14,
|
|
11606
11606
|
...props
|
|
11607
11607
|
};
|
|
11608
11608
|
const [value, setValue] = usePropsValue({
|
|
@@ -11679,14 +11679,14 @@ const Tabs = (props) => {
|
|
|
11679
11679
|
}
|
|
11680
11680
|
}, [children]);
|
|
11681
11681
|
const classes = classNames(
|
|
11682
|
-
classPrefix$
|
|
11683
|
-
`${classPrefix$
|
|
11682
|
+
classPrefix$h,
|
|
11683
|
+
`${classPrefix$h}--${direction}`,
|
|
11684
11684
|
className
|
|
11685
11685
|
);
|
|
11686
|
-
const classesTitle = classNames(`${classPrefix$
|
|
11687
|
-
[`${classPrefix$
|
|
11688
|
-
[`${classPrefix$
|
|
11689
|
-
[`${classPrefix$
|
|
11686
|
+
const classesTitle = classNames(`${classPrefix$h}__titles`, {
|
|
11687
|
+
[`${classPrefix$h}__titles--${activeType}`]: activeType,
|
|
11688
|
+
[`${classPrefix$h}__titles--scrollable`]: true,
|
|
11689
|
+
[`${classPrefix$h}__titles--${align}`]: align
|
|
11690
11690
|
});
|
|
11691
11691
|
const tabsActiveStyle = {
|
|
11692
11692
|
color: activeType === "smile" ? activeColor : "",
|
|
@@ -11716,7 +11716,7 @@ const Tabs = (props) => {
|
|
|
11716
11716
|
onClick: () => {
|
|
11717
11717
|
tabChange(item);
|
|
11718
11718
|
},
|
|
11719
|
-
className: classNames(`${classPrefix$
|
|
11719
|
+
className: classNames(`${classPrefix$h}__titles-item`, {
|
|
11720
11720
|
[`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
|
|
11721
11721
|
[`nut-tabs__titles-item--disabled`]: item.disabled,
|
|
11722
11722
|
[`nut-tabs__titles-item--${align}`]: align
|
|
@@ -11727,14 +11727,14 @@ const Tabs = (props) => {
|
|
|
11727
11727
|
activeType === "line" && /* @__PURE__ */ React__default.createElement(
|
|
11728
11728
|
"div",
|
|
11729
11729
|
{
|
|
11730
|
-
className: `${classPrefix$
|
|
11730
|
+
className: `${classPrefix$h}__titles-item__line`,
|
|
11731
11731
|
style: tabsActiveStyle
|
|
11732
11732
|
}
|
|
11733
11733
|
),
|
|
11734
11734
|
activeType === "smile" && /* @__PURE__ */ React__default.createElement(
|
|
11735
11735
|
"div",
|
|
11736
11736
|
{
|
|
11737
|
-
className: `${classPrefix$
|
|
11737
|
+
className: `${classPrefix$h}__titles-item__smile`,
|
|
11738
11738
|
style: tabsActiveStyle
|
|
11739
11739
|
},
|
|
11740
11740
|
/* @__PURE__ */ React__default.createElement(x$7, { color: activeColor, width: 40, height: 20 })
|
|
@@ -11746,13 +11746,13 @@ const Tabs = (props) => {
|
|
|
11746
11746
|
{
|
|
11747
11747
|
ellipsis: true
|
|
11748
11748
|
},
|
|
11749
|
-
`${classPrefix$
|
|
11749
|
+
`${classPrefix$h}__titles-item__text`
|
|
11750
11750
|
)
|
|
11751
11751
|
},
|
|
11752
11752
|
item.title
|
|
11753
11753
|
)
|
|
11754
11754
|
);
|
|
11755
|
-
})), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
11755
|
+
})), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$h}__content__wrap` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$h}__content`, style: contentStyle }, React__default.Children.map(children, (child, idx) => {
|
|
11756
11756
|
if (!React__default.isValidElement(child)) {
|
|
11757
11757
|
return null;
|
|
11758
11758
|
}
|
|
@@ -11769,7 +11769,7 @@ const Tabs = (props) => {
|
|
|
11769
11769
|
return React__default.cloneElement(child, childProps);
|
|
11770
11770
|
}))));
|
|
11771
11771
|
};
|
|
11772
|
-
Tabs.defaultProps = defaultProps$
|
|
11772
|
+
Tabs.defaultProps = defaultProps$14;
|
|
11773
11773
|
Tabs.displayName = "NutTabs";
|
|
11774
11774
|
Tabs.TabPane = TabPane;
|
|
11775
11775
|
var classnameExports = {};
|
|
@@ -11892,7 +11892,7 @@ function requireClassname_development() {
|
|
|
11892
11892
|
}
|
|
11893
11893
|
})(classname);
|
|
11894
11894
|
const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
11895
|
-
const defaultProps$
|
|
11895
|
+
const defaultProps$13 = {
|
|
11896
11896
|
type: "custom",
|
|
11897
11897
|
existAddress: [],
|
|
11898
11898
|
defaultIcon: null,
|
|
@@ -11914,7 +11914,7 @@ const ExistRender = (props) => {
|
|
|
11914
11914
|
onClose,
|
|
11915
11915
|
onSwitchModule,
|
|
11916
11916
|
...rest
|
|
11917
|
-
} = { ...defaultProps$
|
|
11917
|
+
} = { ...defaultProps$13, ...props };
|
|
11918
11918
|
const b = cn("address");
|
|
11919
11919
|
const selectedExist = (item) => {
|
|
11920
11920
|
const copyExistAdd = existAddress;
|
|
@@ -11944,7 +11944,7 @@ const ExistRender = (props) => {
|
|
|
11944
11944
|
return /* @__PURE__ */ React__default.createElement("li", { className: b("exist-item"), key: index }, /* @__PURE__ */ React__default.createElement("div", { onClick: () => selectedExist(item) }, item.selectedAddress ? selectedIcon : defaultIcon, /* @__PURE__ */ React__default.createElement("div", { className: b("exist-item-info") }, item.name && item.phone && /* @__PURE__ */ React__default.createElement("div", { className: "exist-item-info-top" }, /* @__PURE__ */ React__default.createElement("div", { className: "exist-item-info-name" }, item.name), /* @__PURE__ */ React__default.createElement("div", { className: "exist-item-info-phone" }, item.phone)), /* @__PURE__ */ React__default.createElement("div", { className: "exist-item-info-bottom" }, /* @__PURE__ */ React__default.createElement("div", null, item.provinceName + item.cityName + item.countyName + item.townName + item.addressDetail)))));
|
|
11945
11945
|
}))), isShowCustomAddress && /* @__PURE__ */ React__default.createElement("div", { className: b("choose-other"), onClick: onSwitch }, /* @__PURE__ */ React__default.createElement("div", { className: b("choose-other-btn") }, customAndExistTitle || locale.address.chooseAnotherAddress)));
|
|
11946
11946
|
};
|
|
11947
|
-
const defaultProps$
|
|
11947
|
+
const defaultProps$12 = {
|
|
11948
11948
|
modelValue: [],
|
|
11949
11949
|
type: "custom",
|
|
11950
11950
|
province: [],
|
|
@@ -11969,7 +11969,7 @@ const CustomRender = (props) => {
|
|
|
11969
11969
|
onClose,
|
|
11970
11970
|
...rest
|
|
11971
11971
|
} = {
|
|
11972
|
-
...defaultProps$
|
|
11972
|
+
...defaultProps$12,
|
|
11973
11973
|
...props
|
|
11974
11974
|
};
|
|
11975
11975
|
const b = cn("address");
|
|
@@ -12138,28 +12138,28 @@ const CustomRender = (props) => {
|
|
|
12138
12138
|
nextAreaList(item);
|
|
12139
12139
|
};
|
|
12140
12140
|
useEffect(() => {
|
|
12141
|
-
const { province: province2 } = { ...defaultProps$
|
|
12141
|
+
const { province: province2 } = { ...defaultProps$12, ...props };
|
|
12142
12142
|
setRegionList({
|
|
12143
12143
|
...regionList,
|
|
12144
12144
|
province: isCustom2() ? transformData(province2) : province2
|
|
12145
12145
|
});
|
|
12146
12146
|
}, [province]);
|
|
12147
12147
|
useEffect(() => {
|
|
12148
|
-
const { city: city2 } = { ...defaultProps$
|
|
12148
|
+
const { city: city2 } = { ...defaultProps$12, ...props };
|
|
12149
12149
|
setRegionList({
|
|
12150
12150
|
...regionList,
|
|
12151
12151
|
city: isCustom2() ? transformData(city2) : city2
|
|
12152
12152
|
});
|
|
12153
12153
|
}, [city]);
|
|
12154
12154
|
useEffect(() => {
|
|
12155
|
-
const { country: country2 } = { ...defaultProps$
|
|
12155
|
+
const { country: country2 } = { ...defaultProps$12, ...props };
|
|
12156
12156
|
setRegionList({
|
|
12157
12157
|
...regionList,
|
|
12158
12158
|
country: isCustom2() ? transformData(country2) : country2
|
|
12159
12159
|
});
|
|
12160
12160
|
}, [country]);
|
|
12161
12161
|
useEffect(() => {
|
|
12162
|
-
const { town: town2 } = { ...defaultProps$
|
|
12162
|
+
const { town: town2 } = { ...defaultProps$12, ...props };
|
|
12163
12163
|
setRegionList({
|
|
12164
12164
|
...regionList,
|
|
12165
12165
|
town: isCustom2() ? transformData(town2) : town2
|
|
@@ -12225,7 +12225,7 @@ const CustomRender = (props) => {
|
|
|
12225
12225
|
}
|
|
12226
12226
|
)));
|
|
12227
12227
|
};
|
|
12228
|
-
const defaultProps$
|
|
12228
|
+
const defaultProps$11 = {
|
|
12229
12229
|
...ComponentDefaults,
|
|
12230
12230
|
modelValue: false,
|
|
12231
12231
|
modelSelect: [],
|
|
@@ -12276,7 +12276,7 @@ const Address = (props) => {
|
|
|
12276
12276
|
className,
|
|
12277
12277
|
...rest
|
|
12278
12278
|
} = {
|
|
12279
|
-
...defaultProps$
|
|
12279
|
+
...defaultProps$11,
|
|
12280
12280
|
...props
|
|
12281
12281
|
};
|
|
12282
12282
|
const b = cn("address");
|
|
@@ -12428,7 +12428,7 @@ const Address = (props) => {
|
|
|
12428
12428
|
)
|
|
12429
12429
|
));
|
|
12430
12430
|
};
|
|
12431
|
-
Address.defaultProps = defaultProps$
|
|
12431
|
+
Address.defaultProps = defaultProps$11;
|
|
12432
12432
|
Address.displayName = "NutAddress";
|
|
12433
12433
|
const Utils = {
|
|
12434
12434
|
/**
|
|
@@ -12548,7 +12548,7 @@ const Utils = {
|
|
|
12548
12548
|
return false;
|
|
12549
12549
|
}
|
|
12550
12550
|
};
|
|
12551
|
-
const defaultProps$
|
|
12551
|
+
const defaultProps$10 = {
|
|
12552
12552
|
type: "one",
|
|
12553
12553
|
isAutoBackFill: false,
|
|
12554
12554
|
poppable: true,
|
|
@@ -12600,7 +12600,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
12600
12600
|
onUpdate,
|
|
12601
12601
|
onSelected,
|
|
12602
12602
|
onYearMonthChange
|
|
12603
|
-
} = { ...defaultProps$
|
|
12603
|
+
} = { ...defaultProps$10, ...props };
|
|
12604
12604
|
const weeks = locale.calendaritem.weekdays;
|
|
12605
12605
|
const [yearMonthTitle, setYearMonthTitle] = useState("");
|
|
12606
12606
|
const [monthsData, setMonthsData] = useState([]);
|
|
@@ -13182,9 +13182,9 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
13182
13182
|
))
|
|
13183
13183
|
), poppable && !isAutoBackFill ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-calendar-footer" }, /* @__PURE__ */ React__default.createElement("div", { className: "calendar-confirm-btn", onClick: confirm2 }, confirmText || locale.confirm)) : ""));
|
|
13184
13184
|
});
|
|
13185
|
-
CalendarItem.defaultProps = defaultProps$
|
|
13185
|
+
CalendarItem.defaultProps = defaultProps$10;
|
|
13186
13186
|
CalendarItem.displayName = "NutCalendarItem";
|
|
13187
|
-
const defaultProps
|
|
13187
|
+
const defaultProps$$ = {
|
|
13188
13188
|
type: "one",
|
|
13189
13189
|
isAutoBackFill: false,
|
|
13190
13190
|
poppable: true,
|
|
@@ -13239,7 +13239,7 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
13239
13239
|
onChoose,
|
|
13240
13240
|
onSelected,
|
|
13241
13241
|
onYearMonthChange
|
|
13242
|
-
} = { ...defaultProps
|
|
13242
|
+
} = { ...defaultProps$$, ...props };
|
|
13243
13243
|
const calendarRef = useRef(null);
|
|
13244
13244
|
const close = () => {
|
|
13245
13245
|
onClose && onClose();
|
|
@@ -13309,9 +13309,9 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
13309
13309
|
renderItem()
|
|
13310
13310
|
) : renderItem());
|
|
13311
13311
|
});
|
|
13312
|
-
Calendar.defaultProps = defaultProps
|
|
13312
|
+
Calendar.defaultProps = defaultProps$$;
|
|
13313
13313
|
Calendar.displayName = "NutCalendar";
|
|
13314
|
-
const defaultProps
|
|
13314
|
+
const defaultProps$_ = {
|
|
13315
13315
|
data: {
|
|
13316
13316
|
text: "",
|
|
13317
13317
|
value: "",
|
|
@@ -13328,7 +13328,7 @@ const defaultProps$$ = {
|
|
|
13328
13328
|
};
|
|
13329
13329
|
const InternalCascaderItem = (props, ref) => {
|
|
13330
13330
|
const { data, checked, activeIcon, chooseItem, activeColor } = {
|
|
13331
|
-
...defaultProps
|
|
13331
|
+
...defaultProps$_,
|
|
13332
13332
|
...props
|
|
13333
13333
|
};
|
|
13334
13334
|
const classPrefix2 = "nut-cascader-item";
|
|
@@ -13370,7 +13370,7 @@ const InternalCascaderItem = (props, ref) => {
|
|
|
13370
13370
|
);
|
|
13371
13371
|
};
|
|
13372
13372
|
const CascaderItem = React__default.forwardRef(InternalCascaderItem);
|
|
13373
|
-
CascaderItem.defaultProps = defaultProps
|
|
13373
|
+
CascaderItem.defaultProps = defaultProps$_;
|
|
13374
13374
|
CascaderItem.displayName = "NutCascaderItem";
|
|
13375
13375
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
13376
13376
|
const {
|
|
@@ -13508,7 +13508,7 @@ class Tree {
|
|
|
13508
13508
|
}
|
|
13509
13509
|
}
|
|
13510
13510
|
const Tree$1 = Tree;
|
|
13511
|
-
const defaultProps$
|
|
13511
|
+
const defaultProps$Z = {
|
|
13512
13512
|
...ComponentDefaults,
|
|
13513
13513
|
activeColor: "",
|
|
13514
13514
|
activeIcon: "checklist",
|
|
@@ -13551,7 +13551,7 @@ const InternalCascader = (props, ref) => {
|
|
|
13551
13551
|
onClose,
|
|
13552
13552
|
onChange,
|
|
13553
13553
|
onPathChange
|
|
13554
|
-
} = { ...defaultProps$
|
|
13554
|
+
} = { ...defaultProps$Z, ...props };
|
|
13555
13555
|
const [tabvalue, setTabvalue] = useState("c1");
|
|
13556
13556
|
const [optionsData, setOptionsData] = useState([]);
|
|
13557
13557
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -13813,11 +13813,11 @@ const InternalCascader = (props, ref) => {
|
|
|
13813
13813
|
) : renderItem());
|
|
13814
13814
|
};
|
|
13815
13815
|
const Cascader = React__default.forwardRef(InternalCascader);
|
|
13816
|
-
Cascader.defaultProps = defaultProps$
|
|
13816
|
+
Cascader.defaultProps = defaultProps$Z;
|
|
13817
13817
|
Cascader.displayName = "NutCascader";
|
|
13818
13818
|
const CheckboxGroupContext = createContext(null);
|
|
13819
13819
|
const Context = CheckboxGroupContext;
|
|
13820
|
-
const defaultProps$
|
|
13820
|
+
const defaultProps$Y = {
|
|
13821
13821
|
max: void 0,
|
|
13822
13822
|
labelPosition: "right",
|
|
13823
13823
|
direction: "vertical",
|
|
@@ -13825,10 +13825,10 @@ const defaultProps$Z = {
|
|
|
13825
13825
|
},
|
|
13826
13826
|
options: []
|
|
13827
13827
|
};
|
|
13828
|
-
const classPrefix$
|
|
13828
|
+
const classPrefix$g = "nut-checkboxgroup";
|
|
13829
13829
|
const CheckboxGroup = React__default.forwardRef(
|
|
13830
13830
|
(props, ref) => {
|
|
13831
|
-
const { children } = { ...defaultProps$
|
|
13831
|
+
const { children } = { ...defaultProps$Y, ...props };
|
|
13832
13832
|
const {
|
|
13833
13833
|
className,
|
|
13834
13834
|
disabled,
|
|
@@ -13907,7 +13907,7 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
13907
13907
|
/* @__PURE__ */ React__default.createElement(
|
|
13908
13908
|
"div",
|
|
13909
13909
|
{
|
|
13910
|
-
className: classNames(classPrefix$
|
|
13910
|
+
className: classNames(classPrefix$g, className, {
|
|
13911
13911
|
[`nut-checkboxgroup--${props.direction}`]: props.direction
|
|
13912
13912
|
}),
|
|
13913
13913
|
...rest
|
|
@@ -13917,9 +13917,9 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
13917
13917
|
);
|
|
13918
13918
|
}
|
|
13919
13919
|
);
|
|
13920
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
13920
|
+
CheckboxGroup.defaultProps = defaultProps$Y;
|
|
13921
13921
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
13922
|
-
const defaultProps$
|
|
13922
|
+
const defaultProps$X = {
|
|
13923
13923
|
...ComponentDefaults,
|
|
13924
13924
|
disabled: false,
|
|
13925
13925
|
labelPosition: "right",
|
|
@@ -13929,10 +13929,10 @@ const defaultProps$Y = {
|
|
|
13929
13929
|
onChange: (value) => {
|
|
13930
13930
|
}
|
|
13931
13931
|
};
|
|
13932
|
-
const classPrefix$
|
|
13932
|
+
const classPrefix$f = "nut-checkbox";
|
|
13933
13933
|
const Checkbox = (props) => {
|
|
13934
13934
|
const { children } = {
|
|
13935
|
-
...defaultProps$
|
|
13935
|
+
...defaultProps$X,
|
|
13936
13936
|
...props
|
|
13937
13937
|
};
|
|
13938
13938
|
const {
|
|
@@ -13991,22 +13991,22 @@ const Checkbox = (props) => {
|
|
|
13991
13991
|
};
|
|
13992
13992
|
const color = () => {
|
|
13993
13993
|
if (innerDisabled) {
|
|
13994
|
-
return `${classPrefix$
|
|
13994
|
+
return `${classPrefix$f}__icon--disable`;
|
|
13995
13995
|
}
|
|
13996
13996
|
if (innerChecked) {
|
|
13997
13997
|
if (innerIndeterminate) {
|
|
13998
|
-
return `${classPrefix$
|
|
13998
|
+
return `${classPrefix$f}__icon--indeterminate`;
|
|
13999
13999
|
}
|
|
14000
|
-
return `${classPrefix$
|
|
14000
|
+
return `${classPrefix$f}__icon`;
|
|
14001
14001
|
}
|
|
14002
|
-
return `${classPrefix$
|
|
14002
|
+
return `${classPrefix$f}__icon--unchecked`;
|
|
14003
14003
|
};
|
|
14004
14004
|
const renderLabel = () => {
|
|
14005
14005
|
return /* @__PURE__ */ React__default.createElement(
|
|
14006
14006
|
"span",
|
|
14007
14007
|
{
|
|
14008
|
-
className: classNames(`${classPrefix$
|
|
14009
|
-
[`${classPrefix$
|
|
14008
|
+
className: classNames(`${classPrefix$f}__label `, {
|
|
14009
|
+
[`${classPrefix$f}__label--disabled`]: innerDisabled
|
|
14010
14010
|
})
|
|
14011
14011
|
},
|
|
14012
14012
|
children || label
|
|
@@ -14025,8 +14025,8 @@ const Checkbox = (props) => {
|
|
|
14025
14025
|
return /* @__PURE__ */ React__default.createElement(
|
|
14026
14026
|
"div",
|
|
14027
14027
|
{
|
|
14028
|
-
className: classNames(classPrefix$
|
|
14029
|
-
[`${classPrefix$
|
|
14028
|
+
className: classNames(classPrefix$f, className, {
|
|
14029
|
+
[`${classPrefix$f}--reverse`]: labelPosition === "left"
|
|
14030
14030
|
}),
|
|
14031
14031
|
...rest,
|
|
14032
14032
|
onClick: handleClick2
|
|
@@ -14035,7 +14035,7 @@ const Checkbox = (props) => {
|
|
|
14035
14035
|
renderLabel()
|
|
14036
14036
|
);
|
|
14037
14037
|
};
|
|
14038
|
-
Checkbox.defaultProps = defaultProps$
|
|
14038
|
+
Checkbox.defaultProps = defaultProps$X;
|
|
14039
14039
|
Checkbox.displayName = "NutCheckBox";
|
|
14040
14040
|
Checkbox.Group = CheckboxGroup;
|
|
14041
14041
|
const MIN_DISTANCE = 10;
|
|
@@ -14329,7 +14329,7 @@ function useRefs() {
|
|
|
14329
14329
|
}, []);
|
|
14330
14330
|
return [refs.current, setRefs, reset];
|
|
14331
14331
|
}
|
|
14332
|
-
const defaultProps$
|
|
14332
|
+
const defaultProps$W = {
|
|
14333
14333
|
...ComponentDefaults,
|
|
14334
14334
|
visible: false,
|
|
14335
14335
|
title: "",
|
|
@@ -14356,7 +14356,7 @@ const InternalPicker = (props, ref) => {
|
|
|
14356
14356
|
afterClose,
|
|
14357
14357
|
onChange,
|
|
14358
14358
|
...rest
|
|
14359
|
-
} = { ...defaultProps$
|
|
14359
|
+
} = { ...defaultProps$W, ...props };
|
|
14360
14360
|
const classPrefix2 = "nut-picker";
|
|
14361
14361
|
const classes = classNames(classPrefix2, className);
|
|
14362
14362
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -14555,7 +14555,7 @@ const InternalPicker = (props, ref) => {
|
|
|
14555
14555
|
const Picker = React__default.forwardRef(InternalPicker);
|
|
14556
14556
|
const Picker$1 = Picker;
|
|
14557
14557
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
14558
|
-
const defaultProps$
|
|
14558
|
+
const defaultProps$V = {
|
|
14559
14559
|
modelValue: null,
|
|
14560
14560
|
visible: false,
|
|
14561
14561
|
title: "",
|
|
@@ -14586,7 +14586,7 @@ const DatePicker = (props) => {
|
|
|
14586
14586
|
style,
|
|
14587
14587
|
...rest
|
|
14588
14588
|
} = {
|
|
14589
|
-
...defaultProps$
|
|
14589
|
+
...defaultProps$V,
|
|
14590
14590
|
...props
|
|
14591
14591
|
};
|
|
14592
14592
|
const { locale } = useConfig();
|
|
@@ -14863,7 +14863,7 @@ const DatePicker = (props) => {
|
|
|
14863
14863
|
)
|
|
14864
14864
|
);
|
|
14865
14865
|
};
|
|
14866
|
-
DatePicker.defaultProps = defaultProps$
|
|
14866
|
+
DatePicker.defaultProps = defaultProps$V;
|
|
14867
14867
|
DatePicker.displayName = "NutDatePicker";
|
|
14868
14868
|
const FormItemContext = createContext({});
|
|
14869
14869
|
function _extends() {
|
|
@@ -16054,7 +16054,7 @@ const useForm = (form) => {
|
|
|
16054
16054
|
}
|
|
16055
16055
|
return [formRef.current];
|
|
16056
16056
|
};
|
|
16057
|
-
const defaultProps$
|
|
16057
|
+
const defaultProps$U = {
|
|
16058
16058
|
...ComponentDefaults,
|
|
16059
16059
|
name: "",
|
|
16060
16060
|
label: "",
|
|
@@ -16116,7 +16116,7 @@ class FormItem extends React__default.Component {
|
|
|
16116
16116
|
showErrorLine,
|
|
16117
16117
|
showErrorMessage
|
|
16118
16118
|
} = {
|
|
16119
|
-
...defaultProps$
|
|
16119
|
+
...defaultProps$U,
|
|
16120
16120
|
...this.props
|
|
16121
16121
|
};
|
|
16122
16122
|
const item = ((_a2 = this.context.errList) == null ? void 0 : _a2.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
@@ -16171,9 +16171,9 @@ class FormItem extends React__default.Component {
|
|
|
16171
16171
|
return this.renderLayout(returnChildNode);
|
|
16172
16172
|
}
|
|
16173
16173
|
}
|
|
16174
|
-
__publicField(FormItem, "defaultProps", defaultProps$
|
|
16174
|
+
__publicField(FormItem, "defaultProps", defaultProps$U);
|
|
16175
16175
|
__publicField(FormItem, "contextType", FormItemContext);
|
|
16176
|
-
const defaultProps$
|
|
16176
|
+
const defaultProps$T = {
|
|
16177
16177
|
...ComponentDefaults,
|
|
16178
16178
|
className: "",
|
|
16179
16179
|
style: void 0,
|
|
@@ -16201,7 +16201,7 @@ const Form = (props) => {
|
|
|
16201
16201
|
form,
|
|
16202
16202
|
...rest
|
|
16203
16203
|
} = {
|
|
16204
|
-
...defaultProps$
|
|
16204
|
+
...defaultProps$T,
|
|
16205
16205
|
...props
|
|
16206
16206
|
};
|
|
16207
16207
|
let formInstance = {};
|
|
@@ -16233,7 +16233,7 @@ const Form = (props) => {
|
|
|
16233
16233
|
/* @__PURE__ */ React__default.createElement(CellGroup, null, /* @__PURE__ */ React__default.createElement(FormItemContext.Provider, { value: formInstance }, children))
|
|
16234
16234
|
);
|
|
16235
16235
|
};
|
|
16236
|
-
Form.defaultProps = defaultProps$
|
|
16236
|
+
Form.defaultProps = defaultProps$T;
|
|
16237
16237
|
Form.displayName = "NutForm";
|
|
16238
16238
|
Form.Item = FormItem;
|
|
16239
16239
|
Form.useForm = useForm;
|
|
@@ -16261,7 +16261,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
16261
16261
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
16262
16262
|
return value.replace(regExp, "");
|
|
16263
16263
|
}
|
|
16264
|
-
const defaultProps$
|
|
16264
|
+
const defaultProps$S = {
|
|
16265
16265
|
...ComponentDefaults,
|
|
16266
16266
|
type: "text",
|
|
16267
16267
|
name: "",
|
|
@@ -16304,7 +16304,7 @@ const Input = forwardRef(
|
|
|
16304
16304
|
value: _value,
|
|
16305
16305
|
...rest
|
|
16306
16306
|
} = {
|
|
16307
|
-
...defaultProps$
|
|
16307
|
+
...defaultProps$S,
|
|
16308
16308
|
...props
|
|
16309
16309
|
};
|
|
16310
16310
|
const [value, setValue] = usePropsValue({
|
|
@@ -16439,9 +16439,9 @@ const Input = forwardRef(
|
|
|
16439
16439
|
);
|
|
16440
16440
|
}
|
|
16441
16441
|
);
|
|
16442
|
-
Input.defaultProps = defaultProps$
|
|
16442
|
+
Input.defaultProps = defaultProps$S;
|
|
16443
16443
|
Input.displayName = "NutInput";
|
|
16444
|
-
const defaultProps$
|
|
16444
|
+
const defaultProps$R = {
|
|
16445
16445
|
...ComponentDefaults,
|
|
16446
16446
|
disabled: false,
|
|
16447
16447
|
min: 1,
|
|
@@ -16453,7 +16453,7 @@ const defaultProps$S = {
|
|
|
16453
16453
|
digits: 0,
|
|
16454
16454
|
async: false
|
|
16455
16455
|
};
|
|
16456
|
-
const classPrefix$
|
|
16456
|
+
const classPrefix$e = `nut-inputnumber`;
|
|
16457
16457
|
const InputNumber = (props) => {
|
|
16458
16458
|
const {
|
|
16459
16459
|
children,
|
|
@@ -16478,7 +16478,7 @@ const InputNumber = (props) => {
|
|
|
16478
16478
|
onChange,
|
|
16479
16479
|
...restProps
|
|
16480
16480
|
} = {
|
|
16481
|
-
...defaultProps$
|
|
16481
|
+
...defaultProps$R,
|
|
16482
16482
|
...props
|
|
16483
16483
|
};
|
|
16484
16484
|
const inputRef = useRef("");
|
|
@@ -16496,8 +16496,8 @@ const InputNumber = (props) => {
|
|
|
16496
16496
|
}, []);
|
|
16497
16497
|
const classes = classNames(
|
|
16498
16498
|
{
|
|
16499
|
-
[`${classPrefix$
|
|
16500
|
-
[`${classPrefix$
|
|
16499
|
+
[`${classPrefix$e}`]: true,
|
|
16500
|
+
[`${classPrefix$e}--disabled`]: disabled
|
|
16501
16501
|
},
|
|
16502
16502
|
className
|
|
16503
16503
|
);
|
|
@@ -16675,9 +16675,9 @@ const InputNumber = (props) => {
|
|
|
16675
16675
|
}
|
|
16676
16676
|
)), /* @__PURE__ */ React__default.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React__default.createElement(y$4, { className: iconAddClasses, onClick: (e) => addNumber(e) })));
|
|
16677
16677
|
};
|
|
16678
|
-
InputNumber.defaultProps = defaultProps$
|
|
16678
|
+
InputNumber.defaultProps = defaultProps$R;
|
|
16679
16679
|
InputNumber.displayName = "NutInputNumber";
|
|
16680
|
-
const defaultProps$
|
|
16680
|
+
const defaultProps$Q = {
|
|
16681
16681
|
...ComponentDefaults,
|
|
16682
16682
|
activeColor: "",
|
|
16683
16683
|
closeOnOverlayClick: true,
|
|
@@ -16696,7 +16696,7 @@ const Menu = (props) => {
|
|
|
16696
16696
|
activeColor,
|
|
16697
16697
|
...rest
|
|
16698
16698
|
} = {
|
|
16699
|
-
...defaultProps$
|
|
16699
|
+
...defaultProps$Q,
|
|
16700
16700
|
...props
|
|
16701
16701
|
};
|
|
16702
16702
|
const menuRef = useRef(null);
|
|
@@ -16815,9 +16815,9 @@ const Menu = (props) => {
|
|
|
16815
16815
|
), cloneChildren())
|
|
16816
16816
|
);
|
|
16817
16817
|
};
|
|
16818
|
-
Menu.defaultProps = defaultProps$
|
|
16818
|
+
Menu.defaultProps = defaultProps$Q;
|
|
16819
16819
|
Menu.displayName = "NutMenu";
|
|
16820
|
-
const defaultProps$
|
|
16820
|
+
const defaultProps$P = {
|
|
16821
16821
|
...ComponentDefaults,
|
|
16822
16822
|
columns: 1,
|
|
16823
16823
|
direction: "down",
|
|
@@ -16847,7 +16847,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
16847
16847
|
parent,
|
|
16848
16848
|
index
|
|
16849
16849
|
} = {
|
|
16850
|
-
...defaultProps$
|
|
16850
|
+
...defaultProps$P,
|
|
16851
16851
|
...props
|
|
16852
16852
|
};
|
|
16853
16853
|
const [_showPopup, setShowPopup] = useState(show2);
|
|
@@ -16992,9 +16992,9 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
16992
16992
|
)
|
|
16993
16993
|
));
|
|
16994
16994
|
});
|
|
16995
|
-
MenuItem.defaultProps = defaultProps$
|
|
16995
|
+
MenuItem.defaultProps = defaultProps$P;
|
|
16996
16996
|
MenuItem.displayName = "NutMenuItem";
|
|
16997
|
-
const defaultProps$
|
|
16997
|
+
const defaultProps$O = {
|
|
16998
16998
|
...ComponentDefaults,
|
|
16999
16999
|
visible: false,
|
|
17000
17000
|
type: "default",
|
|
@@ -17145,17 +17145,17 @@ const NumberKeyboard = (props) => {
|
|
|
17145
17145
|
))))
|
|
17146
17146
|
);
|
|
17147
17147
|
};
|
|
17148
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
17148
|
+
NumberKeyboard.defaultProps = defaultProps$O;
|
|
17149
17149
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
17150
17150
|
const RadioContext = React__default.createContext(null);
|
|
17151
|
-
const defaultProps$
|
|
17151
|
+
const defaultProps$N = {
|
|
17152
17152
|
labelPosition: "right",
|
|
17153
17153
|
onChange: (value) => {
|
|
17154
17154
|
},
|
|
17155
17155
|
direction: "vertical",
|
|
17156
17156
|
options: []
|
|
17157
17157
|
};
|
|
17158
|
-
const classPrefix$
|
|
17158
|
+
const classPrefix$d = "nut-radiogroup";
|
|
17159
17159
|
const RadioGroup = React__default.forwardRef(
|
|
17160
17160
|
(props, ref) => {
|
|
17161
17161
|
const {
|
|
@@ -17169,7 +17169,7 @@ const RadioGroup = React__default.forwardRef(
|
|
|
17169
17169
|
options: options2,
|
|
17170
17170
|
disabled,
|
|
17171
17171
|
...rest
|
|
17172
|
-
} = { ...defaultProps$
|
|
17172
|
+
} = { ...defaultProps$N, ...props };
|
|
17173
17173
|
const [val2State, setVal2State] = usePropsValue({
|
|
17174
17174
|
defaultValue: props.defaultValue,
|
|
17175
17175
|
value: props.value,
|
|
@@ -17211,8 +17211,8 @@ const RadioGroup = React__default.forwardRef(
|
|
|
17211
17211
|
/* @__PURE__ */ React__default.createElement(
|
|
17212
17212
|
"div",
|
|
17213
17213
|
{
|
|
17214
|
-
className: classNames(classPrefix$
|
|
17215
|
-
[`${classPrefix$
|
|
17214
|
+
className: classNames(classPrefix$d, className, {
|
|
17215
|
+
[`${classPrefix$d}--${props.direction}`]: props.direction
|
|
17216
17216
|
}),
|
|
17217
17217
|
...rest
|
|
17218
17218
|
},
|
|
@@ -17221,9 +17221,9 @@ const RadioGroup = React__default.forwardRef(
|
|
|
17221
17221
|
);
|
|
17222
17222
|
}
|
|
17223
17223
|
);
|
|
17224
|
-
RadioGroup.defaultProps = defaultProps$
|
|
17224
|
+
RadioGroup.defaultProps = defaultProps$N;
|
|
17225
17225
|
RadioGroup.displayName = "NutRadioGroup";
|
|
17226
|
-
const defaultProps$
|
|
17226
|
+
const defaultProps$M = {
|
|
17227
17227
|
...ComponentDefaults,
|
|
17228
17228
|
disabled: false,
|
|
17229
17229
|
shape: "round",
|
|
@@ -17249,7 +17249,7 @@ const Radio = (props) => {
|
|
|
17249
17249
|
onChange,
|
|
17250
17250
|
...others
|
|
17251
17251
|
} = {
|
|
17252
|
-
...defaultProps$
|
|
17252
|
+
...defaultProps$M,
|
|
17253
17253
|
...props
|
|
17254
17254
|
};
|
|
17255
17255
|
let { labelPosition, disabled, ...rest } = others;
|
|
@@ -17345,10 +17345,10 @@ const Radio = (props) => {
|
|
|
17345
17345
|
renderRadioItem()
|
|
17346
17346
|
);
|
|
17347
17347
|
};
|
|
17348
|
-
Radio.defaultProps = defaultProps$
|
|
17348
|
+
Radio.defaultProps = defaultProps$M;
|
|
17349
17349
|
Radio.displayName = "NutRadio";
|
|
17350
17350
|
Radio.Group = RadioGroup;
|
|
17351
|
-
const defaultProps$
|
|
17351
|
+
const defaultProps$L = {
|
|
17352
17352
|
...ComponentDefaults,
|
|
17353
17353
|
range: false,
|
|
17354
17354
|
min: 0,
|
|
@@ -17376,7 +17376,7 @@ const Range = (props) => {
|
|
|
17376
17376
|
step,
|
|
17377
17377
|
value,
|
|
17378
17378
|
defaultValue
|
|
17379
|
-
} = { ...defaultProps$
|
|
17379
|
+
} = { ...defaultProps$L, ...props };
|
|
17380
17380
|
const classPrefix2 = "nut-range";
|
|
17381
17381
|
const [buttonIndex, setButtonIndex] = useState(0);
|
|
17382
17382
|
const [dragStatus, setDragStatus] = useState("start");
|
|
@@ -17640,9 +17640,9 @@ const Range = (props) => {
|
|
|
17640
17640
|
renderButton()
|
|
17641
17641
|
))), maxDescription !== null && /* @__PURE__ */ React__default.createElement("div", { className: "max" }, maxDescription || max));
|
|
17642
17642
|
};
|
|
17643
|
-
Range.defaultProps = defaultProps$
|
|
17643
|
+
Range.defaultProps = defaultProps$L;
|
|
17644
17644
|
Range.displayName = "NutRange";
|
|
17645
|
-
const defaultProps$
|
|
17645
|
+
const defaultProps$K = {
|
|
17646
17646
|
...ComponentDefaults,
|
|
17647
17647
|
count: 5,
|
|
17648
17648
|
min: 0,
|
|
@@ -17667,7 +17667,7 @@ const Rate = (props) => {
|
|
|
17667
17667
|
allowHalf,
|
|
17668
17668
|
onChange
|
|
17669
17669
|
} = {
|
|
17670
|
-
...defaultProps$
|
|
17670
|
+
...defaultProps$K,
|
|
17671
17671
|
...props
|
|
17672
17672
|
};
|
|
17673
17673
|
const classPrefix2 = "nut-rate";
|
|
@@ -17750,9 +17750,9 @@ const Rate = (props) => {
|
|
|
17750
17750
|
})
|
|
17751
17751
|
);
|
|
17752
17752
|
};
|
|
17753
|
-
Rate.defaultProps = defaultProps$
|
|
17753
|
+
Rate.defaultProps = defaultProps$K;
|
|
17754
17754
|
Rate.displayName = "NutRate";
|
|
17755
|
-
const defaultProps$
|
|
17755
|
+
const defaultProps$J = {
|
|
17756
17756
|
...ComponentDefaults,
|
|
17757
17757
|
placeholder: "",
|
|
17758
17758
|
shape: "square",
|
|
@@ -17791,7 +17791,7 @@ const SearchBar = (props) => {
|
|
|
17791
17791
|
onSearch,
|
|
17792
17792
|
onClickInput
|
|
17793
17793
|
} = {
|
|
17794
|
-
...defaultProps$
|
|
17794
|
+
...defaultProps$J,
|
|
17795
17795
|
...props
|
|
17796
17796
|
};
|
|
17797
17797
|
const forceFocus = () => {
|
|
@@ -17900,9 +17900,9 @@ const SearchBar = (props) => {
|
|
|
17900
17900
|
renderRight()
|
|
17901
17901
|
);
|
|
17902
17902
|
};
|
|
17903
|
-
SearchBar.defaultProps = defaultProps$
|
|
17903
|
+
SearchBar.defaultProps = defaultProps$J;
|
|
17904
17904
|
SearchBar.displayName = "NutSearchBar";
|
|
17905
|
-
const defaultProps$
|
|
17905
|
+
const defaultProps$I = {
|
|
17906
17906
|
...ComponentDefaults,
|
|
17907
17907
|
value: "",
|
|
17908
17908
|
visible: false,
|
|
@@ -17939,7 +17939,7 @@ const ShortPassword = (props) => {
|
|
|
17939
17939
|
onClickCloseIcon,
|
|
17940
17940
|
...rest
|
|
17941
17941
|
} = {
|
|
17942
|
-
...defaultProps$
|
|
17942
|
+
...defaultProps$I,
|
|
17943
17943
|
...props
|
|
17944
17944
|
};
|
|
17945
17945
|
const classPrefix2 = "nut-shortpassword";
|
|
@@ -17996,33 +17996,32 @@ const ShortPassword = (props) => {
|
|
|
17996
17996
|
), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__footer__sure`, onClick: sure }, locale.confirm)))
|
|
17997
17997
|
);
|
|
17998
17998
|
};
|
|
17999
|
-
ShortPassword.defaultProps = defaultProps$
|
|
17999
|
+
ShortPassword.defaultProps = defaultProps$I;
|
|
18000
18000
|
ShortPassword.displayName = "NutShortPassword";
|
|
18001
|
-
const defaultProps$
|
|
18001
|
+
const defaultProps$H = {
|
|
18002
|
+
...ComponentDefaults,
|
|
18002
18003
|
type: "png",
|
|
18003
18004
|
lineWidth: 2,
|
|
18004
18005
|
strokeStyle: "#000",
|
|
18005
|
-
|
|
18006
|
-
className: ""
|
|
18006
|
+
unsupported: ""
|
|
18007
18007
|
};
|
|
18008
|
-
const
|
|
18008
|
+
const InternalSignature = (props, ref) => {
|
|
18009
18009
|
const { locale } = useConfig();
|
|
18010
18010
|
const {
|
|
18011
18011
|
type: type4,
|
|
18012
18012
|
lineWidth,
|
|
18013
18013
|
strokeStyle,
|
|
18014
|
-
|
|
18014
|
+
unsupported,
|
|
18015
18015
|
className,
|
|
18016
|
-
|
|
18017
|
-
clear,
|
|
18016
|
+
style,
|
|
18018
18017
|
onConfirm,
|
|
18019
18018
|
onClear,
|
|
18020
18019
|
...rest
|
|
18021
18020
|
} = {
|
|
18022
|
-
...defaultProps$
|
|
18021
|
+
...defaultProps$H,
|
|
18023
18022
|
...props
|
|
18024
18023
|
};
|
|
18025
|
-
const
|
|
18024
|
+
const classPrefix2 = `nut-signature`;
|
|
18026
18025
|
const canvasRef = useRef(null);
|
|
18027
18026
|
const wrapRef = useRef(null);
|
|
18028
18027
|
const [canvasHeight, setCanvasHeight] = useState(0);
|
|
@@ -18089,12 +18088,8 @@ const Signature = (props) => {
|
|
|
18089
18088
|
ctx2.current.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
18090
18089
|
ctx2.current.closePath();
|
|
18091
18090
|
}
|
|
18092
|
-
clear && clear();
|
|
18093
18091
|
onClear && onClear();
|
|
18094
18092
|
};
|
|
18095
|
-
const handleConfirmBtn = () => {
|
|
18096
|
-
onSave(canvasRef.current);
|
|
18097
|
-
};
|
|
18098
18093
|
const onSave = (canvas) => {
|
|
18099
18094
|
let dataurl;
|
|
18100
18095
|
switch (type4) {
|
|
@@ -18108,30 +18103,22 @@ const Signature = (props) => {
|
|
|
18108
18103
|
dataurl = canvas.toDataURL("image/png");
|
|
18109
18104
|
}
|
|
18110
18105
|
handleClearBtn();
|
|
18111
|
-
confirm2 && confirm2(canvas, dataurl);
|
|
18112
18106
|
onConfirm && onConfirm(canvas, dataurl);
|
|
18113
18107
|
};
|
|
18114
|
-
|
|
18115
|
-
|
|
18116
|
-
|
|
18117
|
-
className: `${b("btn")}`,
|
|
18118
|
-
type: "default",
|
|
18119
|
-
onClick: () => handleClearBtn()
|
|
18120
|
-
},
|
|
18121
|
-
locale.signature.reSign
|
|
18122
|
-
), /* @__PURE__ */ React__default.createElement(
|
|
18123
|
-
Button,
|
|
18124
|
-
{
|
|
18125
|
-
className: `${b("btn")}`,
|
|
18126
|
-
type: "primary",
|
|
18127
|
-
onClick: () => handleConfirmBtn()
|
|
18108
|
+
useImperativeHandle(ref, () => ({
|
|
18109
|
+
confirm: () => {
|
|
18110
|
+
onSave(canvasRef.current);
|
|
18128
18111
|
},
|
|
18129
|
-
|
|
18130
|
-
|
|
18112
|
+
clear: () => {
|
|
18113
|
+
handleClearBtn();
|
|
18114
|
+
}
|
|
18115
|
+
}));
|
|
18116
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__inner`, ref: wrapRef }, isCanvasSupported() ? /* @__PURE__ */ React__default.createElement("canvas", { ref: canvasRef, height: canvasHeight, width: canvasWidth }) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, unsupported || /* @__PURE__ */ React__default.createElement("p", { className: `${classPrefix2}__unsupport` }, locale.signature.unsupported))));
|
|
18131
18117
|
};
|
|
18132
|
-
Signature
|
|
18118
|
+
const Signature = React__default.forwardRef(InternalSignature);
|
|
18119
|
+
Signature.defaultProps = defaultProps$H;
|
|
18133
18120
|
Signature.displayName = "NutSignature";
|
|
18134
|
-
const defaultProps$
|
|
18121
|
+
const defaultProps$G = {
|
|
18135
18122
|
...ComponentDefaults,
|
|
18136
18123
|
disabled: false,
|
|
18137
18124
|
activeText: "",
|
|
@@ -18148,7 +18135,7 @@ const Switch = (props) => {
|
|
|
18148
18135
|
style,
|
|
18149
18136
|
onChange
|
|
18150
18137
|
} = {
|
|
18151
|
-
...defaultProps$
|
|
18138
|
+
...defaultProps$G,
|
|
18152
18139
|
...props
|
|
18153
18140
|
};
|
|
18154
18141
|
const classPrefix2 = "nut-switch";
|
|
@@ -18167,9 +18154,9 @@ const Switch = (props) => {
|
|
|
18167
18154
|
};
|
|
18168
18155
|
return /* @__PURE__ */ React__default.createElement("div", { className: classes(), onClick: (e) => onClick(e), style }, /* @__PURE__ */ React__default.createElement("div", { className: "switch-button" }, !value && /* @__PURE__ */ React__default.createElement("div", { className: "close-line" }), activeText && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, value ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__label open` }, activeText) : /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__label close` }, inactiveText))));
|
|
18169
18156
|
};
|
|
18170
|
-
Switch.defaultProps = defaultProps$
|
|
18157
|
+
Switch.defaultProps = defaultProps$G;
|
|
18171
18158
|
Switch.displayName = "NutSwitch";
|
|
18172
|
-
const defaultProps$
|
|
18159
|
+
const defaultProps$F = {
|
|
18173
18160
|
...ComponentDefaults,
|
|
18174
18161
|
defaultValue: "",
|
|
18175
18162
|
showCount: false,
|
|
@@ -18198,7 +18185,7 @@ const TextArea = (props) => {
|
|
|
18198
18185
|
onBlur,
|
|
18199
18186
|
onFocus,
|
|
18200
18187
|
...rest
|
|
18201
|
-
} = { ...defaultProps$
|
|
18188
|
+
} = { ...defaultProps$F, ...props };
|
|
18202
18189
|
const classPrefix2 = "nut-textarea";
|
|
18203
18190
|
const textareaRef = useRef(null);
|
|
18204
18191
|
const compositionRef = useRef(false);
|
|
@@ -18282,9 +18269,9 @@ const TextArea = (props) => {
|
|
|
18282
18269
|
showCount && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__limit` }, inputValue.length, "/", maxLength < 0 ? 0 : maxLength)
|
|
18283
18270
|
);
|
|
18284
18271
|
};
|
|
18285
|
-
TextArea.defaultProps = defaultProps$
|
|
18272
|
+
TextArea.defaultProps = defaultProps$F;
|
|
18286
18273
|
TextArea.displayName = "NutTextArea";
|
|
18287
|
-
const defaultProps$
|
|
18274
|
+
const defaultProps$E = {
|
|
18288
18275
|
...ComponentDefaults,
|
|
18289
18276
|
percent: 0,
|
|
18290
18277
|
showText: false,
|
|
@@ -18307,7 +18294,7 @@ const Progress = (props) => {
|
|
|
18307
18294
|
delay,
|
|
18308
18295
|
...rest
|
|
18309
18296
|
} = {
|
|
18310
|
-
...defaultProps$
|
|
18297
|
+
...defaultProps$E,
|
|
18311
18298
|
...props
|
|
18312
18299
|
};
|
|
18313
18300
|
const classPrefix2 = "nut-progress";
|
|
@@ -18402,7 +18389,7 @@ const Progress = (props) => {
|
|
|
18402
18389
|
)))
|
|
18403
18390
|
);
|
|
18404
18391
|
};
|
|
18405
|
-
Progress.defaultProps = defaultProps$
|
|
18392
|
+
Progress.defaultProps = defaultProps$E;
|
|
18406
18393
|
Progress.displayName = "NutProgress";
|
|
18407
18394
|
class UploadOptions {
|
|
18408
18395
|
constructor() {
|
|
@@ -18507,7 +18494,7 @@ const funcInterceptor = (interceptor, {
|
|
|
18507
18494
|
done();
|
|
18508
18495
|
}
|
|
18509
18496
|
};
|
|
18510
|
-
const defaultProps$
|
|
18497
|
+
const defaultProps$D = {
|
|
18511
18498
|
...ComponentDefaults,
|
|
18512
18499
|
url: "",
|
|
18513
18500
|
maxCount: 1,
|
|
@@ -18589,7 +18576,7 @@ const InternalUploader = (props, ref) => {
|
|
|
18589
18576
|
beforeXhrUpload,
|
|
18590
18577
|
beforeDelete,
|
|
18591
18578
|
...restProps
|
|
18592
|
-
} = { ...defaultProps$
|
|
18579
|
+
} = { ...defaultProps$D, ...props };
|
|
18593
18580
|
const [fileList, setFileList] = useState(defaultValue || []);
|
|
18594
18581
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
18595
18582
|
useEffect(() => {
|
|
@@ -18930,9 +18917,9 @@ const InternalUploader = (props, ref) => {
|
|
|
18930
18917
|
));
|
|
18931
18918
|
};
|
|
18932
18919
|
const Uploader = React__default.forwardRef(InternalUploader);
|
|
18933
|
-
Uploader.defaultProps = defaultProps$
|
|
18920
|
+
Uploader.defaultProps = defaultProps$D;
|
|
18934
18921
|
Uploader.displayName = "NutUploader";
|
|
18935
|
-
const defaultProps$
|
|
18922
|
+
const defaultProps$C = {
|
|
18936
18923
|
...ComponentDefaults,
|
|
18937
18924
|
visible: false,
|
|
18938
18925
|
title: "",
|
|
@@ -18959,7 +18946,7 @@ const ActionSheet = (props) => {
|
|
|
18959
18946
|
className,
|
|
18960
18947
|
style,
|
|
18961
18948
|
...rest
|
|
18962
|
-
} = { ...defaultProps$
|
|
18949
|
+
} = { ...defaultProps$C, ...props };
|
|
18963
18950
|
const classPrefix2 = "nut-actionsheet";
|
|
18964
18951
|
const cancelActionSheet = () => {
|
|
18965
18952
|
onCancel && onCancel();
|
|
@@ -19000,7 +18987,7 @@ const ActionSheet = (props) => {
|
|
|
19000
18987
|
))
|
|
19001
18988
|
);
|
|
19002
18989
|
};
|
|
19003
|
-
ActionSheet.defaultProps = defaultProps$
|
|
18990
|
+
ActionSheet.defaultProps = defaultProps$C;
|
|
19004
18991
|
ActionSheet.displayName = "NutActionSheet";
|
|
19005
18992
|
const fullClone = {
|
|
19006
18993
|
...ReactDOM
|
|
@@ -19233,7 +19220,7 @@ const DialogWrap = (props) => {
|
|
|
19233
19220
|
};
|
|
19234
19221
|
DialogWrap.defaultProps = defaultDialogProps;
|
|
19235
19222
|
DialogWrap.displayName = "NutDialogWrap";
|
|
19236
|
-
const defaultProps$
|
|
19223
|
+
const defaultProps$B = {
|
|
19237
19224
|
confirmText: "",
|
|
19238
19225
|
cancelText: "",
|
|
19239
19226
|
overlay: true,
|
|
@@ -19332,9 +19319,9 @@ Dialog.confirm = (props) => {
|
|
|
19332
19319
|
});
|
|
19333
19320
|
};
|
|
19334
19321
|
});
|
|
19335
|
-
Dialog.defaultProps = defaultProps$
|
|
19322
|
+
Dialog.defaultProps = defaultProps$B;
|
|
19336
19323
|
Dialog.displayName = "NutDialog";
|
|
19337
|
-
const defaultProps$
|
|
19324
|
+
const defaultProps$A = {
|
|
19338
19325
|
...ComponentDefaults,
|
|
19339
19326
|
attract: false,
|
|
19340
19327
|
direction: void 0,
|
|
@@ -19347,7 +19334,7 @@ const defaultProps$B = {
|
|
|
19347
19334
|
};
|
|
19348
19335
|
const Drag = (props) => {
|
|
19349
19336
|
const { attract, direction, boundary, children, className, style, ...reset } = {
|
|
19350
|
-
...defaultProps$
|
|
19337
|
+
...defaultProps$A,
|
|
19351
19338
|
...props
|
|
19352
19339
|
};
|
|
19353
19340
|
const classPrefix2 = "nut-drag";
|
|
@@ -19410,20 +19397,20 @@ const Drag = (props) => {
|
|
|
19410
19397
|
/* @__PURE__ */ React__default.createElement(animated.div, { style: currstyle, ...bind() }, children)
|
|
19411
19398
|
);
|
|
19412
19399
|
};
|
|
19413
|
-
Drag.defaultProps = defaultProps$
|
|
19400
|
+
Drag.defaultProps = defaultProps$A;
|
|
19414
19401
|
Drag.displayName = "NutDrag";
|
|
19415
19402
|
const defaultStatus = {
|
|
19416
19403
|
empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
|
|
19417
19404
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
19418
19405
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
19419
19406
|
};
|
|
19420
|
-
const defaultProps$
|
|
19407
|
+
const defaultProps$z = {
|
|
19421
19408
|
...ComponentDefaults,
|
|
19422
19409
|
description: "",
|
|
19423
19410
|
imageSize: "",
|
|
19424
19411
|
status: "empty"
|
|
19425
19412
|
};
|
|
19426
|
-
const classPrefix$
|
|
19413
|
+
const classPrefix$c = `nut-empty`;
|
|
19427
19414
|
const Empty = (props) => {
|
|
19428
19415
|
const { locale } = useConfig();
|
|
19429
19416
|
const {
|
|
@@ -19435,7 +19422,7 @@ const Empty = (props) => {
|
|
|
19435
19422
|
status,
|
|
19436
19423
|
...rest
|
|
19437
19424
|
} = {
|
|
19438
|
-
...defaultProps$
|
|
19425
|
+
...defaultProps$z,
|
|
19439
19426
|
...props
|
|
19440
19427
|
};
|
|
19441
19428
|
const [imgStyle, setImgStyle] = useState({});
|
|
@@ -19458,46 +19445,38 @@ const Empty = (props) => {
|
|
|
19458
19445
|
};
|
|
19459
19446
|
});
|
|
19460
19447
|
}, [imageSize]);
|
|
19461
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
19448
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$c} ${className}`, ...rest }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$c}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$c}__description` }, description || locale.noData) : description, children));
|
|
19462
19449
|
};
|
|
19463
|
-
Empty.defaultProps = defaultProps$
|
|
19450
|
+
Empty.defaultProps = defaultProps$z;
|
|
19464
19451
|
Empty.displayName = "NutEmpty";
|
|
19465
|
-
const defaultProps$
|
|
19452
|
+
const defaultProps$y = {
|
|
19466
19453
|
...ComponentDefaults,
|
|
19467
19454
|
hasMore: true,
|
|
19468
19455
|
threshold: 200,
|
|
19469
|
-
|
|
19470
|
-
|
|
19471
|
-
|
|
19472
|
-
|
|
19473
|
-
|
|
19474
|
-
|
|
19475
|
-
loadIcon: null,
|
|
19476
|
-
loadingText: "加载中···",
|
|
19477
|
-
loadMoreText: "哎呀,这里是底部了啦"
|
|
19478
|
-
};
|
|
19479
|
-
const Infiniteloading = (props) => {
|
|
19456
|
+
target: "",
|
|
19457
|
+
capture: false,
|
|
19458
|
+
pullRefresh: false
|
|
19459
|
+
};
|
|
19460
|
+
const classPrefix$b = `nut-infiniteloading`;
|
|
19461
|
+
const InfiniteLoading = (props) => {
|
|
19480
19462
|
const { locale } = useConfig();
|
|
19481
19463
|
const {
|
|
19482
19464
|
children,
|
|
19483
19465
|
hasMore,
|
|
19484
19466
|
threshold,
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19488
|
-
|
|
19489
|
-
pullIcon,
|
|
19490
|
-
pullText,
|
|
19491
|
-
loadIcon,
|
|
19467
|
+
target,
|
|
19468
|
+
capture,
|
|
19469
|
+
pullRefresh,
|
|
19470
|
+
pullingText,
|
|
19492
19471
|
loadingText,
|
|
19493
19472
|
loadMoreText,
|
|
19494
19473
|
className,
|
|
19495
19474
|
onRefresh,
|
|
19496
19475
|
onLoadMore,
|
|
19497
|
-
|
|
19476
|
+
onScroll,
|
|
19498
19477
|
...restProps
|
|
19499
19478
|
} = {
|
|
19500
|
-
...defaultProps$
|
|
19479
|
+
...defaultProps$y,
|
|
19501
19480
|
...props
|
|
19502
19481
|
};
|
|
19503
19482
|
const [isInfiniting, setIsInfiniting] = useState(false);
|
|
@@ -19509,16 +19488,16 @@ const Infiniteloading = (props) => {
|
|
|
19509
19488
|
const refreshMaxH = useRef(0);
|
|
19510
19489
|
const y2 = useRef(0);
|
|
19511
19490
|
const distance = useRef(0);
|
|
19512
|
-
const
|
|
19513
|
-
const classes = classNames(className, b());
|
|
19491
|
+
const classes = classNames(className, classPrefix$b);
|
|
19514
19492
|
useEffect(() => {
|
|
19515
|
-
|
|
19516
|
-
|
|
19517
|
-
|
|
19518
|
-
|
|
19519
|
-
|
|
19493
|
+
if (target && document.getElementById(target)) {
|
|
19494
|
+
scrollEl.current = document.getElementById(target);
|
|
19495
|
+
} else {
|
|
19496
|
+
scrollEl.current = window;
|
|
19497
|
+
}
|
|
19498
|
+
scrollEl.current.addEventListener("scroll", handleScroll, capture);
|
|
19520
19499
|
return () => {
|
|
19521
|
-
scrollEl.current.removeEventListener("scroll", handleScroll,
|
|
19500
|
+
scrollEl.current.removeEventListener("scroll", handleScroll, capture);
|
|
19522
19501
|
};
|
|
19523
19502
|
}, [hasMore, isInfiniting]);
|
|
19524
19503
|
useEffect(() => {
|
|
@@ -19536,9 +19515,6 @@ const Infiniteloading = (props) => {
|
|
|
19536
19515
|
transition: isTouching.current ? `height 0s cubic-bezier(0.25,0.1,0.25,1)` : `height 0.2s cubic-bezier(0.25,0.1,0.25,1)`
|
|
19537
19516
|
};
|
|
19538
19517
|
};
|
|
19539
|
-
const getParentElement = (el) => {
|
|
19540
|
-
return containerId ? document.querySelector(`#${containerId}`) : el && el.parentNode;
|
|
19541
|
-
};
|
|
19542
19518
|
const handleScroll = () => {
|
|
19543
19519
|
requestAniFrame2()(() => {
|
|
19544
19520
|
if (!isScrollAtBottom() || !hasMore || isInfiniting) {
|
|
@@ -19558,7 +19534,7 @@ const Infiniteloading = (props) => {
|
|
|
19558
19534
|
isTouching.current = false;
|
|
19559
19535
|
};
|
|
19560
19536
|
const touchStart = (event) => {
|
|
19561
|
-
if (beforeScrollTop.current === 0 && !isTouching.current &&
|
|
19537
|
+
if (beforeScrollTop.current === 0 && !isTouching.current && pullRefresh) {
|
|
19562
19538
|
y2.current = event.touches[0].pageY;
|
|
19563
19539
|
isTouching.current = true;
|
|
19564
19540
|
const childHeight = refreshTop.current.firstElementChild.offsetHeight;
|
|
@@ -19590,12 +19566,12 @@ const Infiniteloading = (props) => {
|
|
|
19590
19566
|
}
|
|
19591
19567
|
};
|
|
19592
19568
|
const requestAniFrame2 = () => {
|
|
19593
|
-
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function fn(callback) {
|
|
19569
|
+
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function fn(callback) {
|
|
19594
19570
|
window.setTimeout(callback, 1e3 / 60);
|
|
19595
19571
|
};
|
|
19596
19572
|
};
|
|
19597
19573
|
const getWindowScrollTop = () => {
|
|
19598
|
-
return window.
|
|
19574
|
+
return window.scrollY !== void 0 ? window.scrollY : (document.documentElement || document.body.parentNode || document.body).scrollTop;
|
|
19599
19575
|
};
|
|
19600
19576
|
const calculateTopPosition = (el) => {
|
|
19601
19577
|
return !el ? 0 : el.offsetTop + calculateTopPosition(el.offsetParent);
|
|
@@ -19605,7 +19581,7 @@ const Infiniteloading = (props) => {
|
|
|
19605
19581
|
let resScrollTop = 0;
|
|
19606
19582
|
let direction = "down";
|
|
19607
19583
|
const windowScrollTop = getWindowScrollTop();
|
|
19608
|
-
if (
|
|
19584
|
+
if (!target || !document.getElementById(target)) {
|
|
19609
19585
|
if (scroller.current) {
|
|
19610
19586
|
offsetDistance = calculateTopPosition(scroller.current) + scroller.current.offsetHeight - windowScrollTop - window.innerHeight;
|
|
19611
19587
|
}
|
|
@@ -19621,7 +19597,7 @@ const Infiniteloading = (props) => {
|
|
|
19621
19597
|
direction = "down";
|
|
19622
19598
|
}
|
|
19623
19599
|
beforeScrollTop.current = resScrollTop;
|
|
19624
|
-
|
|
19600
|
+
onScroll && onScroll(resScrollTop);
|
|
19625
19601
|
return offsetDistance <= threshold && direction === "down";
|
|
19626
19602
|
};
|
|
19627
19603
|
return /* @__PURE__ */ React__default.createElement(
|
|
@@ -19633,14 +19609,14 @@ const Infiniteloading = (props) => {
|
|
|
19633
19609
|
onTouchEnd: touchEnd,
|
|
19634
19610
|
...restProps
|
|
19635
19611
|
},
|
|
19636
|
-
/* @__PURE__ */ React__default.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React__default.createElement("div", { className: "top-box" },
|
|
19612
|
+
/* @__PURE__ */ React__default.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React__default.createElement("div", { className: "top-box" }, pullingText || locale.infiniteloading.pullRefreshText)),
|
|
19637
19613
|
/* @__PURE__ */ React__default.createElement("div", { className: "nut-infinite-container" }, children),
|
|
19638
|
-
/* @__PURE__ */ React__default.createElement("div", { className: "nut-infinite-bottom" }, isInfiniting ? /* @__PURE__ */ React__default.createElement("div", { className: "bottom-box" },
|
|
19614
|
+
/* @__PURE__ */ React__default.createElement("div", { className: "nut-infinite-bottom" }, isInfiniting ? /* @__PURE__ */ React__default.createElement("div", { className: "bottom-box" }, loadingText || locale.infiniteloading.loadText) : !hasMore && /* @__PURE__ */ React__default.createElement("div", { className: "tips" }, loadMoreText || locale.infiniteloading.loadMoreText))
|
|
19639
19615
|
);
|
|
19640
19616
|
};
|
|
19641
|
-
|
|
19642
|
-
|
|
19643
|
-
const defaultProps$
|
|
19617
|
+
InfiniteLoading.defaultProps = defaultProps$y;
|
|
19618
|
+
InfiniteLoading.displayName = "NutInfiniteLoading";
|
|
19619
|
+
const defaultProps$x = {
|
|
19644
19620
|
...ComponentDefaults,
|
|
19645
19621
|
direction: "horizontal",
|
|
19646
19622
|
list: [],
|
|
@@ -19678,7 +19654,7 @@ const NoticeBar = (props) => {
|
|
|
19678
19654
|
onClick,
|
|
19679
19655
|
onClickItem
|
|
19680
19656
|
} = {
|
|
19681
|
-
...defaultProps$
|
|
19657
|
+
...defaultProps$x,
|
|
19682
19658
|
...props
|
|
19683
19659
|
};
|
|
19684
19660
|
const classPrefix2 = "nut-noticebar";
|
|
@@ -20029,7 +20005,7 @@ const NoticeBar = (props) => {
|
|
|
20029
20005
|
)
|
|
20030
20006
|
) : null);
|
|
20031
20007
|
};
|
|
20032
|
-
NoticeBar.defaultProps = defaultProps$
|
|
20008
|
+
NoticeBar.defaultProps = defaultProps$x;
|
|
20033
20009
|
NoticeBar.displayName = "NutNoticeBar";
|
|
20034
20010
|
const classPrefix$a = "nut-notify";
|
|
20035
20011
|
let Notification$1 = (_a = class extends React.PureComponent {
|
|
@@ -20229,7 +20205,7 @@ function useClickAway(onClickAway, target, eventName = "click", isListener, oute
|
|
|
20229
20205
|
};
|
|
20230
20206
|
}, [target]);
|
|
20231
20207
|
}
|
|
20232
|
-
const defaultProps$
|
|
20208
|
+
const defaultProps$w = {
|
|
20233
20209
|
...ComponentDefaults,
|
|
20234
20210
|
list: [],
|
|
20235
20211
|
location: "bottom",
|
|
@@ -20282,7 +20258,7 @@ const Popover = (props) => {
|
|
|
20282
20258
|
onSelect,
|
|
20283
20259
|
...reset
|
|
20284
20260
|
} = {
|
|
20285
|
-
...defaultProps$
|
|
20261
|
+
...defaultProps$w,
|
|
20286
20262
|
...props
|
|
20287
20263
|
};
|
|
20288
20264
|
const popoverRef = useRef(null);
|
|
@@ -20477,7 +20453,7 @@ const Popover = (props) => {
|
|
|
20477
20453
|
}))
|
|
20478
20454
|
)));
|
|
20479
20455
|
};
|
|
20480
|
-
Popover.defaultProps = defaultProps$
|
|
20456
|
+
Popover.defaultProps = defaultProps$w;
|
|
20481
20457
|
Popover.displayName = "NutPopover";
|
|
20482
20458
|
function bound(position, min, max) {
|
|
20483
20459
|
let ret = position;
|
|
@@ -20515,7 +20491,7 @@ if (canUseDom) {
|
|
|
20515
20491
|
console.log(e);
|
|
20516
20492
|
}
|
|
20517
20493
|
}
|
|
20518
|
-
const defaultProps$
|
|
20494
|
+
const defaultProps$v = {
|
|
20519
20495
|
...ComponentDefaults,
|
|
20520
20496
|
pullingText: "",
|
|
20521
20497
|
canReleaseText: "",
|
|
@@ -20532,7 +20508,7 @@ const PullToRefresh = (p) => {
|
|
|
20532
20508
|
const classPrefix2 = "nut-pulltorefresh";
|
|
20533
20509
|
const { locale } = useConfig();
|
|
20534
20510
|
const props = {
|
|
20535
|
-
...defaultProps$
|
|
20511
|
+
...defaultProps$v,
|
|
20536
20512
|
...p,
|
|
20537
20513
|
...{
|
|
20538
20514
|
pullingText: p.pullingText || locale.pullToRefresh.pullingText,
|
|
@@ -20675,10 +20651,10 @@ const PullToRefresh = (p) => {
|
|
|
20675
20651
|
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-content` }, props.children)
|
|
20676
20652
|
);
|
|
20677
20653
|
};
|
|
20678
|
-
PullToRefresh.defaultProps = defaultProps$
|
|
20654
|
+
PullToRefresh.defaultProps = defaultProps$v;
|
|
20679
20655
|
PullToRefresh.displayName = "NutPullToRefresh";
|
|
20680
20656
|
const AvatarContext = createContext({});
|
|
20681
|
-
const defaultProps$
|
|
20657
|
+
const defaultProps$u = {
|
|
20682
20658
|
...ComponentDefaults,
|
|
20683
20659
|
size: "",
|
|
20684
20660
|
shape: "round",
|
|
@@ -20708,7 +20684,7 @@ const Avatar = (props) => {
|
|
|
20708
20684
|
onError,
|
|
20709
20685
|
...rest
|
|
20710
20686
|
} = {
|
|
20711
|
-
...defaultProps$
|
|
20687
|
+
...defaultProps$u,
|
|
20712
20688
|
...props
|
|
20713
20689
|
};
|
|
20714
20690
|
const [maxSum, setMaxSum] = useState(0);
|
|
@@ -20790,9 +20766,9 @@ const Avatar = (props) => {
|
|
|
20790
20766
|
showMax && /* @__PURE__ */ React__default.createElement("div", { className: "text" }, ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxContent) ? (_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent : `+ ${avatarIndex - ((_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.max)}`)
|
|
20791
20767
|
));
|
|
20792
20768
|
};
|
|
20793
|
-
Avatar.defaultProps = defaultProps$
|
|
20769
|
+
Avatar.defaultProps = defaultProps$u;
|
|
20794
20770
|
Avatar.displayName = "NutAvatar";
|
|
20795
|
-
const defaultProps$
|
|
20771
|
+
const defaultProps$t = {
|
|
20796
20772
|
...ComponentDefaults,
|
|
20797
20773
|
rows: 1,
|
|
20798
20774
|
animated: false,
|
|
@@ -20815,7 +20791,7 @@ const Skeleton = (props) => {
|
|
|
20815
20791
|
avatarShape,
|
|
20816
20792
|
...rest
|
|
20817
20793
|
} = {
|
|
20818
|
-
...defaultProps$
|
|
20794
|
+
...defaultProps$t,
|
|
20819
20795
|
...props
|
|
20820
20796
|
};
|
|
20821
20797
|
const classPrefix2 = "nut-skeleton";
|
|
@@ -20851,7 +20827,7 @@ const Skeleton = (props) => {
|
|
|
20851
20827
|
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__block`, key: index });
|
|
20852
20828
|
})))));
|
|
20853
20829
|
};
|
|
20854
|
-
Skeleton.defaultProps = defaultProps$
|
|
20830
|
+
Skeleton.defaultProps = defaultProps$t;
|
|
20855
20831
|
Skeleton.displayName = "NutSkeleton";
|
|
20856
20832
|
function preventDefault(event, isStopPropagation) {
|
|
20857
20833
|
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
@@ -20861,13 +20837,13 @@ function preventDefault(event, isStopPropagation) {
|
|
|
20861
20837
|
event.stopPropagation();
|
|
20862
20838
|
}
|
|
20863
20839
|
}
|
|
20864
|
-
const defaultProps$
|
|
20840
|
+
const defaultProps$s = {
|
|
20865
20841
|
name: ""
|
|
20866
20842
|
};
|
|
20867
20843
|
const Swipe = forwardRef((props, instanceRef) => {
|
|
20868
20844
|
const swipeBem = cn("swipe");
|
|
20869
20845
|
const touch = useTouch();
|
|
20870
|
-
const { children, className, style } = { ...defaultProps$
|
|
20846
|
+
const { children, className, style } = { ...defaultProps$s, ...props };
|
|
20871
20847
|
const root2 = useRef();
|
|
20872
20848
|
const opened = useRef(false);
|
|
20873
20849
|
const lockClick = useRef(false);
|
|
@@ -21035,7 +21011,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
21035
21011
|
/* @__PURE__ */ React__default.createElement("div", { className: `${swipeBem("wrapper")}`, style: wrapperStyle }, renderActionContent("left", leftRef), children, renderActionContent("right", rightRef))
|
|
21036
21012
|
);
|
|
21037
21013
|
});
|
|
21038
|
-
Swipe.defaultProps = defaultProps$
|
|
21014
|
+
Swipe.defaultProps = defaultProps$s;
|
|
21039
21015
|
Swipe.displayName = "NutSwipe";
|
|
21040
21016
|
const classPrefix$7 = "nut-toast";
|
|
21041
21017
|
class Notification extends React.PureComponent {
|
|
@@ -21241,7 +21217,7 @@ const Toast = {
|
|
|
21241
21217
|
}
|
|
21242
21218
|
}
|
|
21243
21219
|
};
|
|
21244
|
-
const defaultProps$
|
|
21220
|
+
const defaultProps$r = {
|
|
21245
21221
|
...ComponentDefaults,
|
|
21246
21222
|
type: "shake",
|
|
21247
21223
|
action: "initial",
|
|
@@ -21252,7 +21228,7 @@ const defaultProps$s = {
|
|
|
21252
21228
|
const classPrefix$6 = `nut-animate`;
|
|
21253
21229
|
const Animate = (props) => {
|
|
21254
21230
|
const { className, type: type4, action, loop: loop2, onClick, children, ...rest } = {
|
|
21255
|
-
...defaultProps$
|
|
21231
|
+
...defaultProps$r,
|
|
21256
21232
|
...props
|
|
21257
21233
|
};
|
|
21258
21234
|
const [clicked, setClicked] = useState(false);
|
|
@@ -21273,9 +21249,9 @@ const Animate = (props) => {
|
|
|
21273
21249
|
};
|
|
21274
21250
|
return /* @__PURE__ */ React__default.createElement("div", { className: "nut-animate" }, /* @__PURE__ */ React__default.createElement("div", { className: cls, onClick: handleClick2, ...rest }, children));
|
|
21275
21251
|
};
|
|
21276
|
-
Animate.defaultProps = defaultProps$
|
|
21252
|
+
Animate.defaultProps = defaultProps$r;
|
|
21277
21253
|
Animate.displayName = "NutAnimate";
|
|
21278
|
-
const defaultProps$
|
|
21254
|
+
const defaultProps$q = {
|
|
21279
21255
|
...ComponentDefaults,
|
|
21280
21256
|
length: 0,
|
|
21281
21257
|
value: "",
|
|
@@ -21294,7 +21270,7 @@ const CountUp = (props) => {
|
|
|
21294
21270
|
style,
|
|
21295
21271
|
...reset
|
|
21296
21272
|
} = {
|
|
21297
|
-
...defaultProps$
|
|
21273
|
+
...defaultProps$q,
|
|
21298
21274
|
...props
|
|
21299
21275
|
};
|
|
21300
21276
|
const classPrefix2 = "nut-countup";
|
|
@@ -21358,9 +21334,9 @@ const CountUp = (props) => {
|
|
|
21358
21334
|
);
|
|
21359
21335
|
})));
|
|
21360
21336
|
};
|
|
21361
|
-
CountUp.defaultProps = defaultProps$
|
|
21337
|
+
CountUp.defaultProps = defaultProps$q;
|
|
21362
21338
|
CountUp.displayName = "NutCountUp";
|
|
21363
|
-
const defaultProps$
|
|
21339
|
+
const defaultProps$p = {};
|
|
21364
21340
|
class AnimatingNumbers extends Component {
|
|
21365
21341
|
constructor(props) {
|
|
21366
21342
|
super(props);
|
|
@@ -21370,11 +21346,11 @@ class AnimatingNumbers extends Component {
|
|
|
21370
21346
|
return /* @__PURE__ */ React__default.createElement("div", { className: "nut-animatingnumbers" });
|
|
21371
21347
|
}
|
|
21372
21348
|
}
|
|
21373
|
-
__publicField(AnimatingNumbers, "defaultProps", defaultProps$
|
|
21349
|
+
__publicField(AnimatingNumbers, "defaultProps", defaultProps$p);
|
|
21374
21350
|
__publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
|
|
21375
21351
|
__publicField(AnimatingNumbers, "CountUp", CountUp);
|
|
21376
21352
|
AnimatingNumbers.CountUp = CountUp;
|
|
21377
|
-
const defaultProps$
|
|
21353
|
+
const defaultProps$o = {
|
|
21378
21354
|
...ComponentDefaults,
|
|
21379
21355
|
src: "",
|
|
21380
21356
|
muted: false,
|
|
@@ -21417,7 +21393,7 @@ const Audio = (props) => {
|
|
|
21417
21393
|
children,
|
|
21418
21394
|
...rest
|
|
21419
21395
|
} = {
|
|
21420
|
-
...defaultProps$
|
|
21396
|
+
...defaultProps$o,
|
|
21421
21397
|
...props
|
|
21422
21398
|
};
|
|
21423
21399
|
const [playing, setPlaying] = useState(false);
|
|
@@ -21623,9 +21599,9 @@ const Audio = (props) => {
|
|
|
21623
21599
|
/* @__PURE__ */ React__default.createElement("track", { kind: "captions" })
|
|
21624
21600
|
));
|
|
21625
21601
|
};
|
|
21626
|
-
Audio.defaultProps = defaultProps$
|
|
21602
|
+
Audio.defaultProps = defaultProps$o;
|
|
21627
21603
|
Audio.displayName = "NutAudio";
|
|
21628
|
-
const defaultProps$
|
|
21604
|
+
const defaultProps$n = {
|
|
21629
21605
|
...ComponentDefaults,
|
|
21630
21606
|
maxContent: "",
|
|
21631
21607
|
max: "",
|
|
@@ -21636,7 +21612,7 @@ const defaultProps$o = {
|
|
|
21636
21612
|
};
|
|
21637
21613
|
const classPrefix$5 = `nut-avatar-group`;
|
|
21638
21614
|
const AvatarGroup = (props) => {
|
|
21639
|
-
const propAvatarGroup = { ...defaultProps$
|
|
21615
|
+
const propAvatarGroup = { ...defaultProps$n, ...props };
|
|
21640
21616
|
const { className, style, children } = propAvatarGroup;
|
|
21641
21617
|
const avatarGroupRef = useRef(null);
|
|
21642
21618
|
const cls = classNames(classPrefix$5, className);
|
|
@@ -21646,9 +21622,9 @@ const AvatarGroup = (props) => {
|
|
|
21646
21622
|
};
|
|
21647
21623
|
return /* @__PURE__ */ React__default.createElement(AvatarContext.Provider, { value: parentAvatar }, /* @__PURE__ */ React__default.createElement("div", { className: cls, style, ref: avatarGroupRef }, children));
|
|
21648
21624
|
};
|
|
21649
|
-
AvatarGroup.defaultProps = defaultProps$
|
|
21625
|
+
AvatarGroup.defaultProps = defaultProps$n;
|
|
21650
21626
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
21651
|
-
const defaultProps$
|
|
21627
|
+
const defaultProps$m = {
|
|
21652
21628
|
...ComponentDefaults,
|
|
21653
21629
|
strokeWidth: 5,
|
|
21654
21630
|
radius: 50,
|
|
@@ -21673,7 +21649,7 @@ const CircleProgress = (props) => {
|
|
|
21673
21649
|
strokeLinecap,
|
|
21674
21650
|
...restProps
|
|
21675
21651
|
} = {
|
|
21676
|
-
...defaultProps$
|
|
21652
|
+
...defaultProps$m,
|
|
21677
21653
|
...props
|
|
21678
21654
|
};
|
|
21679
21655
|
const classes = classNames(className, classPrefix$4);
|
|
@@ -21742,7 +21718,7 @@ const CircleProgress = (props) => {
|
|
|
21742
21718
|
}
|
|
21743
21719
|
)), /* @__PURE__ */ React__default.createElement("div", { className: "nut-circleprogress-text" }, children));
|
|
21744
21720
|
};
|
|
21745
|
-
CircleProgress.defaultProps = defaultProps$
|
|
21721
|
+
CircleProgress.defaultProps = defaultProps$m;
|
|
21746
21722
|
CircleProgress.displayName = "NutCircleProgress";
|
|
21747
21723
|
const collapseContext = {
|
|
21748
21724
|
isOpen: (name) => {
|
|
@@ -21754,7 +21730,7 @@ const collapseContext = {
|
|
|
21754
21730
|
rotate: 180
|
|
21755
21731
|
};
|
|
21756
21732
|
const CollapseContext = createContext(collapseContext);
|
|
21757
|
-
const defaultProps$
|
|
21733
|
+
const defaultProps$l = {
|
|
21758
21734
|
...ComponentDefaults,
|
|
21759
21735
|
title: null,
|
|
21760
21736
|
name: "",
|
|
@@ -21776,7 +21752,7 @@ const CollapseItem = (props) => {
|
|
|
21776
21752
|
extra,
|
|
21777
21753
|
...rest
|
|
21778
21754
|
} = {
|
|
21779
|
-
...defaultProps$
|
|
21755
|
+
...defaultProps$l,
|
|
21780
21756
|
...props
|
|
21781
21757
|
};
|
|
21782
21758
|
const classPrefix2 = "nut-collapse-item";
|
|
@@ -21843,9 +21819,9 @@ const CollapseItem = (props) => {
|
|
|
21843
21819
|
/* @__PURE__ */ React__default.createElement("div", { ref: contentRef, className: `${classPrefix2}__content-text` }, children)
|
|
21844
21820
|
));
|
|
21845
21821
|
};
|
|
21846
|
-
CollapseItem.defaultProps = defaultProps$
|
|
21822
|
+
CollapseItem.defaultProps = defaultProps$l;
|
|
21847
21823
|
CollapseItem.displayName = "NutCollapseItem";
|
|
21848
|
-
const defaultProps$
|
|
21824
|
+
const defaultProps$k = {
|
|
21849
21825
|
...ComponentDefaults,
|
|
21850
21826
|
defaultActiveName: [],
|
|
21851
21827
|
accordion: false,
|
|
@@ -21864,7 +21840,7 @@ const Collapse = (props) => {
|
|
|
21864
21840
|
rotate,
|
|
21865
21841
|
onChange
|
|
21866
21842
|
} = {
|
|
21867
|
-
...defaultProps$
|
|
21843
|
+
...defaultProps$k,
|
|
21868
21844
|
...props
|
|
21869
21845
|
};
|
|
21870
21846
|
const classPrefix2 = "nut-collapse";
|
|
@@ -21921,10 +21897,10 @@ const Collapse = (props) => {
|
|
|
21921
21897
|
/* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix2, className), style }, children)
|
|
21922
21898
|
);
|
|
21923
21899
|
};
|
|
21924
|
-
Collapse.defaultProps = defaultProps$
|
|
21900
|
+
Collapse.defaultProps = defaultProps$k;
|
|
21925
21901
|
Collapse.displayName = "NutCollapse";
|
|
21926
21902
|
Collapse.Item = CollapseItem;
|
|
21927
|
-
const defaultProps$
|
|
21903
|
+
const defaultProps$j = {
|
|
21928
21904
|
...ComponentDefaults,
|
|
21929
21905
|
paused: false,
|
|
21930
21906
|
startTime: Date.now(),
|
|
@@ -21956,7 +21932,7 @@ const InternalCountDown = (props, ref) => {
|
|
|
21956
21932
|
onUpdate,
|
|
21957
21933
|
children,
|
|
21958
21934
|
...rest
|
|
21959
|
-
} = { ...defaultProps$
|
|
21935
|
+
} = { ...defaultProps$j, ...props };
|
|
21960
21936
|
const classPrefix2 = "nut-countdown";
|
|
21961
21937
|
const [restTimeStamp, setRestTime] = useState(0);
|
|
21962
21938
|
const stateRef = useRef({
|
|
@@ -22167,9 +22143,9 @@ const InternalCountDown = (props, ref) => {
|
|
|
22167
22143
|
);
|
|
22168
22144
|
};
|
|
22169
22145
|
const CountDown = React__default.forwardRef(InternalCountDown);
|
|
22170
|
-
CountDown.defaultProps = defaultProps$
|
|
22146
|
+
CountDown.defaultProps = defaultProps$j;
|
|
22171
22147
|
CountDown.displayName = "NutCountDown";
|
|
22172
|
-
const defaultProps$
|
|
22148
|
+
const defaultProps$i = {
|
|
22173
22149
|
...ComponentDefaults,
|
|
22174
22150
|
content: "",
|
|
22175
22151
|
direction: "end",
|
|
@@ -22195,7 +22171,7 @@ const Ellipsis = (props) => {
|
|
|
22195
22171
|
onClick,
|
|
22196
22172
|
onChange,
|
|
22197
22173
|
...rest
|
|
22198
|
-
} = { ...defaultProps$
|
|
22174
|
+
} = { ...defaultProps$i, ...props };
|
|
22199
22175
|
let container = null;
|
|
22200
22176
|
let maxHeight = 0;
|
|
22201
22177
|
const [exceeded, setExceeded] = useState(false);
|
|
@@ -22343,9 +22319,9 @@ const Ellipsis = (props) => {
|
|
|
22343
22319
|
collapseText
|
|
22344
22320
|
) : null) : null));
|
|
22345
22321
|
};
|
|
22346
|
-
Ellipsis.defaultProps = defaultProps$
|
|
22322
|
+
Ellipsis.defaultProps = defaultProps$i;
|
|
22347
22323
|
Ellipsis.displayName = "NutEllipsis";
|
|
22348
|
-
const defaultProps$
|
|
22324
|
+
const defaultProps$h = {
|
|
22349
22325
|
...ComponentDefaults,
|
|
22350
22326
|
source: {
|
|
22351
22327
|
type: {},
|
|
@@ -22373,7 +22349,7 @@ const Video = (props) => {
|
|
|
22373
22349
|
onPlayEnd,
|
|
22374
22350
|
...restProps
|
|
22375
22351
|
} = {
|
|
22376
|
-
...defaultProps$
|
|
22352
|
+
...defaultProps$h,
|
|
22377
22353
|
...props
|
|
22378
22354
|
};
|
|
22379
22355
|
const rootRef = useRef(null);
|
|
@@ -22423,10 +22399,10 @@ const Video = (props) => {
|
|
|
22423
22399
|
/* @__PURE__ */ React__default.createElement("track", { kind: "captions" })
|
|
22424
22400
|
));
|
|
22425
22401
|
};
|
|
22426
|
-
Video.defaultProps = defaultProps$
|
|
22402
|
+
Video.defaultProps = defaultProps$h;
|
|
22427
22403
|
Video.displayName = "NutVideo";
|
|
22428
22404
|
const DataContext$1 = createContext({});
|
|
22429
|
-
const defaultProps$
|
|
22405
|
+
const defaultProps$g = {
|
|
22430
22406
|
total: 3,
|
|
22431
22407
|
current: 0,
|
|
22432
22408
|
direction: "horizontal"
|
|
@@ -22434,7 +22410,7 @@ const defaultProps$h = {
|
|
|
22434
22410
|
const classPrefix$1 = `nut-indicator`;
|
|
22435
22411
|
const Indicator = (props) => {
|
|
22436
22412
|
const { total, current, children, className, direction, ...rest } = {
|
|
22437
|
-
...defaultProps$
|
|
22413
|
+
...defaultProps$g,
|
|
22438
22414
|
...props
|
|
22439
22415
|
};
|
|
22440
22416
|
const classes = classNames({
|
|
@@ -22457,9 +22433,9 @@ const Indicator = (props) => {
|
|
|
22457
22433
|
};
|
|
22458
22434
|
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classes, className), ...rest }, renderElement());
|
|
22459
22435
|
};
|
|
22460
|
-
Indicator.defaultProps = defaultProps$
|
|
22436
|
+
Indicator.defaultProps = defaultProps$g;
|
|
22461
22437
|
Indicator.displayName = "NutIndicator";
|
|
22462
|
-
const defaultProps$
|
|
22438
|
+
const defaultProps$f = {
|
|
22463
22439
|
width: typeof window === "object" ? window.innerWidth : 375,
|
|
22464
22440
|
height: 0,
|
|
22465
22441
|
duration: 500,
|
|
@@ -22476,7 +22452,7 @@ const defaultProps$g = {
|
|
|
22476
22452
|
};
|
|
22477
22453
|
const DISTANCE = 5;
|
|
22478
22454
|
const Swiper = React__default.forwardRef((props, ref) => {
|
|
22479
|
-
const propSwiper = { ...defaultProps$
|
|
22455
|
+
const propSwiper = { ...defaultProps$f, ...props };
|
|
22480
22456
|
const {
|
|
22481
22457
|
children,
|
|
22482
22458
|
direction,
|
|
@@ -22889,13 +22865,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
22889
22865
|
renderIndicator()
|
|
22890
22866
|
));
|
|
22891
22867
|
});
|
|
22892
|
-
Swiper.defaultProps = defaultProps$
|
|
22868
|
+
Swiper.defaultProps = defaultProps$f;
|
|
22893
22869
|
Swiper.displayName = "NutSwiper";
|
|
22894
|
-
const defaultProps$
|
|
22870
|
+
const defaultProps$e = {
|
|
22895
22871
|
direction: "horizontal"
|
|
22896
22872
|
};
|
|
22897
22873
|
const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
22898
|
-
const _props = { ...defaultProps$
|
|
22874
|
+
const _props = { ...defaultProps$e, ...props };
|
|
22899
22875
|
const { className, style, children, direction, size } = _props;
|
|
22900
22876
|
const parent = useContext(DataContext$1);
|
|
22901
22877
|
const b = cn("swiper-item");
|
|
@@ -22911,9 +22887,9 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
|
22911
22887
|
};
|
|
22912
22888
|
return /* @__PURE__ */ React__default.createElement("div", { className: classes, style: { ...style, ...getStyle() } }, children);
|
|
22913
22889
|
});
|
|
22914
|
-
SwiperItem.defaultProps = defaultProps$
|
|
22890
|
+
SwiperItem.defaultProps = defaultProps$e;
|
|
22915
22891
|
SwiperItem.displayName = "NutSwiperItem";
|
|
22916
|
-
const defaultProps$
|
|
22892
|
+
const defaultProps$d = {
|
|
22917
22893
|
...ComponentDefaults,
|
|
22918
22894
|
images: [],
|
|
22919
22895
|
videos: [],
|
|
@@ -23115,7 +23091,7 @@ const ImagePreview = (props) => {
|
|
|
23115
23091
|
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0))
|
|
23116
23092
|
);
|
|
23117
23093
|
};
|
|
23118
|
-
ImagePreview.defaultProps = defaultProps$
|
|
23094
|
+
ImagePreview.defaultProps = defaultProps$d;
|
|
23119
23095
|
ImagePreview.displayName = "NutImagePreview";
|
|
23120
23096
|
const initPositinoCache = (reaItemSize, length = 0) => {
|
|
23121
23097
|
let index = 0;
|
|
@@ -23228,7 +23204,7 @@ const updateItemSize = (positions, items, sizeKey) => {
|
|
|
23228
23204
|
}
|
|
23229
23205
|
});
|
|
23230
23206
|
};
|
|
23231
|
-
const defaultProps$
|
|
23207
|
+
const defaultProps$c = {
|
|
23232
23208
|
...ComponentDefaults,
|
|
23233
23209
|
list: [],
|
|
23234
23210
|
itemHeight: 66,
|
|
@@ -23250,7 +23226,7 @@ const VirtualList = (props) => {
|
|
|
23250
23226
|
containerHeight,
|
|
23251
23227
|
...rest
|
|
23252
23228
|
} = {
|
|
23253
|
-
...defaultProps$
|
|
23229
|
+
...defaultProps$c,
|
|
23254
23230
|
...props
|
|
23255
23231
|
};
|
|
23256
23232
|
const horizontal = direction === "horizontal";
|
|
@@ -23414,9 +23390,9 @@ const VirtualList = (props) => {
|
|
|
23414
23390
|
)
|
|
23415
23391
|
);
|
|
23416
23392
|
};
|
|
23417
|
-
VirtualList.defaultProps = defaultProps$
|
|
23393
|
+
VirtualList.defaultProps = defaultProps$c;
|
|
23418
23394
|
VirtualList.displayName = "NutVirtualList";
|
|
23419
|
-
const defaultProps$
|
|
23395
|
+
const defaultProps$b = {
|
|
23420
23396
|
...ComponentDefaults,
|
|
23421
23397
|
defaultValue: 1,
|
|
23422
23398
|
mode: "multi",
|
|
@@ -23444,7 +23420,7 @@ const Pagination = (props) => {
|
|
|
23444
23420
|
className,
|
|
23445
23421
|
...rest
|
|
23446
23422
|
} = {
|
|
23447
|
-
...defaultProps$
|
|
23423
|
+
...defaultProps$b,
|
|
23448
23424
|
...props
|
|
23449
23425
|
};
|
|
23450
23426
|
const classPrefix2 = "nut-pagination";
|
|
@@ -23526,9 +23502,9 @@ const Pagination = (props) => {
|
|
|
23526
23502
|
next || locale.pagination.next
|
|
23527
23503
|
));
|
|
23528
23504
|
};
|
|
23529
|
-
Pagination.defaultProps = defaultProps$
|
|
23505
|
+
Pagination.defaultProps = defaultProps$b;
|
|
23530
23506
|
Pagination.displayName = "NutPagination";
|
|
23531
|
-
const defaultProps$
|
|
23507
|
+
const defaultProps$a = {
|
|
23532
23508
|
...ComponentDefaults,
|
|
23533
23509
|
price: 0,
|
|
23534
23510
|
symbol: "¥",
|
|
@@ -23551,7 +23527,7 @@ const Price = (props) => {
|
|
|
23551
23527
|
style,
|
|
23552
23528
|
...rest
|
|
23553
23529
|
} = {
|
|
23554
|
-
...defaultProps$
|
|
23530
|
+
...defaultProps$a,
|
|
23555
23531
|
...props
|
|
23556
23532
|
};
|
|
23557
23533
|
const classPrefix2 = "nut-price";
|
|
@@ -23631,10 +23607,10 @@ const Price = (props) => {
|
|
|
23631
23607
|
symbol && position === "after" ? renderSymbol() : null
|
|
23632
23608
|
);
|
|
23633
23609
|
};
|
|
23634
|
-
Price.defaultProps = defaultProps$
|
|
23610
|
+
Price.defaultProps = defaultProps$a;
|
|
23635
23611
|
Price.displayName = "NutPrice";
|
|
23636
23612
|
const DataContext = createContext({});
|
|
23637
|
-
const defaultProps$
|
|
23613
|
+
const defaultProps$9 = {
|
|
23638
23614
|
...ComponentDefaults,
|
|
23639
23615
|
title: "",
|
|
23640
23616
|
description: "",
|
|
@@ -23643,7 +23619,7 @@ const defaultProps$a = {
|
|
|
23643
23619
|
};
|
|
23644
23620
|
const Step = (props) => {
|
|
23645
23621
|
const { children, title, description, value, icon, className, ...restProps } = {
|
|
23646
|
-
...defaultProps$
|
|
23622
|
+
...defaultProps$9,
|
|
23647
23623
|
...props
|
|
23648
23624
|
};
|
|
23649
23625
|
const parent = useContext(DataContext);
|
|
@@ -23677,16 +23653,16 @@ const Step = (props) => {
|
|
|
23677
23653
|
};
|
|
23678
23654
|
return /* @__PURE__ */ React__default.createElement("div", { className: classes, ...restProps, onClick: handleClickStep }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-step-head" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-step-line" }), /* @__PURE__ */ React__default.createElement("div", { className: renderIconClass() }, icon || !dot && /* @__PURE__ */ React__default.createElement("span", { className: "nut-step-inner" }, value))), /* @__PURE__ */ React__default.createElement("div", { className: "nut-step-main" }, /* @__PURE__ */ React__default.createElement("span", { className: "nut-step-title" }, title), description && /* @__PURE__ */ React__default.createElement("span", { className: "nut-step-description" }, description)));
|
|
23679
23655
|
};
|
|
23680
|
-
Step.defaultProps = defaultProps$
|
|
23656
|
+
Step.defaultProps = defaultProps$9;
|
|
23681
23657
|
Step.displayName = "NutStep";
|
|
23682
|
-
const defaultProps$
|
|
23658
|
+
const defaultProps$8 = {
|
|
23683
23659
|
...ComponentDefaults,
|
|
23684
23660
|
value: 0,
|
|
23685
23661
|
direction: "horizontal",
|
|
23686
23662
|
dot: false
|
|
23687
23663
|
};
|
|
23688
23664
|
const Steps = (props) => {
|
|
23689
|
-
const propSteps = { ...defaultProps$
|
|
23665
|
+
const propSteps = { ...defaultProps$8, ...props };
|
|
23690
23666
|
const {
|
|
23691
23667
|
children,
|
|
23692
23668
|
value,
|
|
@@ -23717,9 +23693,9 @@ const Steps = (props) => {
|
|
|
23717
23693
|
children
|
|
23718
23694
|
));
|
|
23719
23695
|
};
|
|
23720
|
-
Steps.defaultProps = defaultProps$
|
|
23696
|
+
Steps.defaultProps = defaultProps$8;
|
|
23721
23697
|
Steps.displayName = "NutSteps";
|
|
23722
|
-
const defaultProps$
|
|
23698
|
+
const defaultProps$7 = {
|
|
23723
23699
|
...ComponentDefaults,
|
|
23724
23700
|
columns: [],
|
|
23725
23701
|
data: [],
|
|
@@ -23731,7 +23707,7 @@ const defaultProps$8 = {
|
|
|
23731
23707
|
};
|
|
23732
23708
|
const Table = (props) => {
|
|
23733
23709
|
const { locale } = useConfig();
|
|
23734
|
-
defaultProps$
|
|
23710
|
+
defaultProps$7.noData = locale.noData;
|
|
23735
23711
|
const {
|
|
23736
23712
|
children,
|
|
23737
23713
|
className,
|
|
@@ -23747,7 +23723,7 @@ const Table = (props) => {
|
|
|
23747
23723
|
onSort,
|
|
23748
23724
|
...rest
|
|
23749
23725
|
} = {
|
|
23750
|
-
...defaultProps$
|
|
23726
|
+
...defaultProps$7,
|
|
23751
23727
|
...props
|
|
23752
23728
|
};
|
|
23753
23729
|
const [curData, setCurData] = useState(data);
|
|
@@ -23830,19 +23806,18 @@ const Table = (props) => {
|
|
|
23830
23806
|
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__main__body` }, renderBoyTrs())
|
|
23831
23807
|
), (summary || curData.length === 0) && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__summary` }, summary || noData));
|
|
23832
23808
|
};
|
|
23833
|
-
Table.defaultProps = defaultProps$
|
|
23809
|
+
Table.defaultProps = defaultProps$7;
|
|
23834
23810
|
Table.displayName = "NutTable";
|
|
23835
|
-
const defaultProps$
|
|
23811
|
+
const defaultProps$6 = {
|
|
23836
23812
|
...ComponentDefaults,
|
|
23837
23813
|
type: "default",
|
|
23814
|
+
background: "",
|
|
23838
23815
|
color: "",
|
|
23839
|
-
textColor: "",
|
|
23840
23816
|
plain: false,
|
|
23841
23817
|
round: false,
|
|
23842
23818
|
mark: false,
|
|
23843
23819
|
closeable: false,
|
|
23844
23820
|
closeIcon: null,
|
|
23845
|
-
prefixCls: "nut-tag",
|
|
23846
23821
|
onClose: (e) => {
|
|
23847
23822
|
},
|
|
23848
23823
|
onClick: (e) => {
|
|
@@ -23852,86 +23827,70 @@ const Tag = (props) => {
|
|
|
23852
23827
|
const {
|
|
23853
23828
|
className,
|
|
23854
23829
|
style,
|
|
23855
|
-
|
|
23830
|
+
background,
|
|
23856
23831
|
plain,
|
|
23857
23832
|
type: type4,
|
|
23858
23833
|
round,
|
|
23859
|
-
prefixCls: prefixCls2,
|
|
23860
23834
|
children,
|
|
23861
23835
|
mark,
|
|
23862
23836
|
closeable,
|
|
23863
23837
|
closeIcon,
|
|
23864
|
-
|
|
23838
|
+
color,
|
|
23865
23839
|
onClick,
|
|
23866
23840
|
onClose
|
|
23867
23841
|
} = {
|
|
23868
|
-
...defaultProps$
|
|
23842
|
+
...defaultProps$6,
|
|
23869
23843
|
...props
|
|
23870
23844
|
};
|
|
23871
|
-
const [
|
|
23872
|
-
const [
|
|
23873
|
-
|
|
23874
|
-
setBtnName(classes());
|
|
23875
|
-
}, [
|
|
23876
|
-
type4,
|
|
23877
|
-
color,
|
|
23878
|
-
textColor,
|
|
23879
|
-
plain,
|
|
23880
|
-
round,
|
|
23881
|
-
mark,
|
|
23882
|
-
closeable,
|
|
23883
|
-
prefixCls2,
|
|
23884
|
-
onClick,
|
|
23885
|
-
onClose,
|
|
23886
|
-
className
|
|
23887
|
-
]);
|
|
23845
|
+
const [tagClass, setTagClass] = useState("");
|
|
23846
|
+
const [visible, setVisible] = useState(true);
|
|
23847
|
+
const classPrefix2 = "nut-tag";
|
|
23888
23848
|
const classes = () => {
|
|
23889
|
-
const prefixCls22 = "nut-tag";
|
|
23890
23849
|
return classNames({
|
|
23891
|
-
[
|
|
23892
|
-
[`${
|
|
23893
|
-
[`${
|
|
23894
|
-
[`${
|
|
23895
|
-
[`${
|
|
23896
|
-
[`${
|
|
23850
|
+
[classPrefix2]: true,
|
|
23851
|
+
[`${classPrefix2}--${type4}`]: type4,
|
|
23852
|
+
[`${classPrefix2}--plain`]: plain,
|
|
23853
|
+
[`${classPrefix2}--round`]: round,
|
|
23854
|
+
[`${classPrefix2}--mark`]: mark,
|
|
23855
|
+
[`${classPrefix2}--close`]: closeable,
|
|
23897
23856
|
[`${className}`]: className
|
|
23898
23857
|
});
|
|
23899
23858
|
};
|
|
23859
|
+
useEffect(() => {
|
|
23860
|
+
setTagClass(classes());
|
|
23861
|
+
}, [type4, background, color, plain, round, mark, closeable, className]);
|
|
23900
23862
|
const handleClick2 = (e) => {
|
|
23901
|
-
|
|
23902
|
-
props.onClick(e);
|
|
23903
|
-
}
|
|
23863
|
+
onClick && onClick(e);
|
|
23904
23864
|
};
|
|
23905
23865
|
const getStyle = () => {
|
|
23906
23866
|
const style2 = {};
|
|
23907
|
-
if (
|
|
23908
|
-
style2.color = textColor;
|
|
23909
|
-
} else if (color && plain) {
|
|
23867
|
+
if (color) {
|
|
23910
23868
|
style2.color = color;
|
|
23869
|
+
} else if (background && plain) {
|
|
23870
|
+
style2.color = background;
|
|
23911
23871
|
}
|
|
23912
23872
|
if (plain) {
|
|
23913
|
-
style2.
|
|
23914
|
-
|
|
23915
|
-
|
|
23916
|
-
style2.background = color;
|
|
23873
|
+
style2.borderColor = background;
|
|
23874
|
+
} else if (background) {
|
|
23875
|
+
style2.background = background;
|
|
23917
23876
|
}
|
|
23918
23877
|
return style2;
|
|
23919
23878
|
};
|
|
23920
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, closeable ?
|
|
23879
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, closeable ? visible && /* @__PURE__ */ React__default.createElement(
|
|
23921
23880
|
"div",
|
|
23922
23881
|
{
|
|
23923
|
-
className:
|
|
23882
|
+
className: tagClass,
|
|
23924
23883
|
style: { ...style, ...getStyle() },
|
|
23925
23884
|
onClick: (e) => handleClick2(e)
|
|
23926
23885
|
},
|
|
23927
|
-
children && /* @__PURE__ */ React__default.createElement("span", { className:
|
|
23886
|
+
children && /* @__PURE__ */ React__default.createElement("span", { className: `${classPrefix2}-text` }, children),
|
|
23928
23887
|
React__default.isValidElement(closeIcon) ? /* @__PURE__ */ React__default.createElement(
|
|
23929
23888
|
"i",
|
|
23930
23889
|
{
|
|
23931
|
-
className:
|
|
23890
|
+
className: `${classPrefix2}-custom-icon`,
|
|
23932
23891
|
onClick: (e) => {
|
|
23933
|
-
|
|
23934
|
-
|
|
23892
|
+
setVisible(false);
|
|
23893
|
+
onClose && onClose(e);
|
|
23935
23894
|
}
|
|
23936
23895
|
},
|
|
23937
23896
|
closeIcon
|
|
@@ -23941,24 +23900,24 @@ const Tag = (props) => {
|
|
|
23941
23900
|
width: 12,
|
|
23942
23901
|
height: 12,
|
|
23943
23902
|
onClick: (e) => {
|
|
23944
|
-
|
|
23945
|
-
|
|
23903
|
+
setVisible(false);
|
|
23904
|
+
onClose && onClose(e);
|
|
23946
23905
|
}
|
|
23947
23906
|
}
|
|
23948
23907
|
)
|
|
23949
23908
|
) : /* @__PURE__ */ React__default.createElement(
|
|
23950
23909
|
"div",
|
|
23951
23910
|
{
|
|
23952
|
-
className:
|
|
23911
|
+
className: tagClass,
|
|
23953
23912
|
style: { ...style, ...getStyle() },
|
|
23954
23913
|
onClick: (e) => handleClick2(e)
|
|
23955
23914
|
},
|
|
23956
|
-
children && /* @__PURE__ */ React__default.createElement("span", { className:
|
|
23915
|
+
children && /* @__PURE__ */ React__default.createElement("span", { className: `${classPrefix2}-text` }, children)
|
|
23957
23916
|
));
|
|
23958
23917
|
};
|
|
23959
|
-
Tag.defaultProps = defaultProps$
|
|
23918
|
+
Tag.defaultProps = defaultProps$6;
|
|
23960
23919
|
Tag.displayName = "NutTag";
|
|
23961
|
-
const defaultProps$
|
|
23920
|
+
const defaultProps$5 = {
|
|
23962
23921
|
...ComponentDefaults,
|
|
23963
23922
|
list: [],
|
|
23964
23923
|
interval: 500,
|
|
@@ -23979,7 +23938,7 @@ const InternalBarrage = (props, ref) => {
|
|
|
23979
23938
|
gapY,
|
|
23980
23939
|
...restProps
|
|
23981
23940
|
} = {
|
|
23982
|
-
...defaultProps$
|
|
23941
|
+
...defaultProps$5,
|
|
23983
23942
|
...props
|
|
23984
23943
|
};
|
|
23985
23944
|
const barrageBody = useRef(null);
|
|
@@ -24045,250 +24004,243 @@ const InternalBarrage = (props, ref) => {
|
|
|
24045
24004
|
return /* @__PURE__ */ React__default.createElement("div", { className: classes, ref: barrageBody, ...restProps }, /* @__PURE__ */ React__default.createElement("div", { ref: barrageContainer, className: "bContainer" }));
|
|
24046
24005
|
};
|
|
24047
24006
|
const Barrage = React__default.forwardRef(InternalBarrage);
|
|
24048
|
-
Barrage.defaultProps = defaultProps$
|
|
24007
|
+
Barrage.defaultProps = defaultProps$5;
|
|
24049
24008
|
Barrage.displayName = "NutBarrage";
|
|
24050
|
-
const defaultProps$
|
|
24009
|
+
const defaultProps$4 = {
|
|
24010
|
+
...ComponentDefaults,
|
|
24011
|
+
src: "",
|
|
24012
|
+
title: "",
|
|
24013
|
+
price: "",
|
|
24014
|
+
vipPrice: "",
|
|
24015
|
+
shopDescription: "",
|
|
24016
|
+
delivery: "",
|
|
24017
|
+
shopName: "",
|
|
24018
|
+
description: "",
|
|
24019
|
+
tag: "",
|
|
24020
|
+
priceTag: "",
|
|
24021
|
+
extra: ""
|
|
24022
|
+
};
|
|
24051
24023
|
const Card = (props) => {
|
|
24052
24024
|
const {
|
|
24053
24025
|
className,
|
|
24054
24026
|
style,
|
|
24055
|
-
|
|
24027
|
+
src,
|
|
24056
24028
|
title,
|
|
24057
24029
|
price,
|
|
24058
24030
|
vipPrice,
|
|
24059
|
-
|
|
24031
|
+
shopDescription,
|
|
24060
24032
|
delivery,
|
|
24061
24033
|
shopName,
|
|
24062
|
-
|
|
24063
|
-
|
|
24064
|
-
|
|
24065
|
-
|
|
24034
|
+
tag,
|
|
24035
|
+
priceTag,
|
|
24036
|
+
description,
|
|
24037
|
+
extra,
|
|
24066
24038
|
...rest
|
|
24067
24039
|
} = {
|
|
24068
|
-
...defaultProps$
|
|
24040
|
+
...defaultProps$4,
|
|
24069
24041
|
...props
|
|
24070
24042
|
};
|
|
24071
|
-
const
|
|
24072
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(
|
|
24043
|
+
const classPrefix2 = "nut-card";
|
|
24044
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix2, className), style, ...rest }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__left` }, /* @__PURE__ */ React__default.createElement("img", { src, alt: "" })), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__right` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__right-title` }, title), description, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}right-price` }, /* @__PURE__ */ React__default.createElement(Price, { size: "normal", price }), priceTag || /* @__PURE__ */ React__default.createElement(
|
|
24045
|
+
Price,
|
|
24046
|
+
{
|
|
24047
|
+
size: "normal",
|
|
24048
|
+
className: `${classPrefix2}right-price-origin`,
|
|
24049
|
+
price: vipPrice
|
|
24050
|
+
}
|
|
24051
|
+
)), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}right-other` }, tag || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Tag, { type: "danger" }, shopDescription), /* @__PURE__ */ React__default.createElement(Tag, { plain: true }, delivery))), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}right-shop` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}right-shop-name` }, shopName), extra)));
|
|
24073
24052
|
};
|
|
24074
|
-
Card.defaultProps = defaultProps$
|
|
24053
|
+
Card.defaultProps = defaultProps$4;
|
|
24075
24054
|
Card.displayName = "NutCard";
|
|
24076
|
-
const defaultProps$
|
|
24077
|
-
|
|
24078
|
-
|
|
24079
|
-
|
|
24080
|
-
|
|
24081
|
-
|
|
24055
|
+
const defaultProps$3 = {
|
|
24056
|
+
...ComponentDefaults,
|
|
24057
|
+
activeDate: "",
|
|
24058
|
+
activeTime: [],
|
|
24059
|
+
options: [],
|
|
24060
|
+
optionKey: {
|
|
24061
|
+
valueKey: "value",
|
|
24062
|
+
textKey: "text",
|
|
24063
|
+
childrenKey: "children"
|
|
24064
|
+
},
|
|
24065
|
+
onSelect: () => {
|
|
24066
|
+
}
|
|
24082
24067
|
};
|
|
24083
24068
|
const TimeDetail = (props) => {
|
|
24084
|
-
|
|
24085
|
-
|
|
24086
|
-
...defaultProps$4,
|
|
24069
|
+
const { options: options2, optionKey, className, activeDate, activeTime, onSelect } = {
|
|
24070
|
+
...defaultProps$3,
|
|
24087
24071
|
...props
|
|
24088
24072
|
};
|
|
24089
|
-
const
|
|
24090
|
-
const
|
|
24091
|
-
|
|
24092
|
-
|
|
24093
|
-
|
|
24094
|
-
|
|
24095
|
-
|
|
24096
|
-
|
|
24097
|
-
|
|
24098
|
-
|
|
24099
|
-
|
|
24100
|
-
|
|
24101
|
-
|
|
24102
|
-
|
|
24103
|
-
|
|
24104
|
-
|
|
24105
|
-
|
|
24106
|
-
|
|
24107
|
-
|
|
24108
|
-
|
|
24109
|
-
|
|
24110
|
-
|
|
24111
|
-
|
|
24073
|
+
const classPrefix2 = "nut-timedetail";
|
|
24074
|
+
const timeList = useMemo(() => {
|
|
24075
|
+
return (options2 == null ? void 0 : options2.find(
|
|
24076
|
+
(item) => item[optionKey.valueKey] === activeDate
|
|
24077
|
+
)) || {
|
|
24078
|
+
[optionKey.childrenKey]: []
|
|
24079
|
+
};
|
|
24080
|
+
}, [options2, optionKey, activeDate]);
|
|
24081
|
+
const isActive = useCallback(
|
|
24082
|
+
(timeKey) => {
|
|
24083
|
+
const date4 = activeTime.find((item) => {
|
|
24084
|
+
return item[optionKey.valueKey] === activeDate;
|
|
24085
|
+
});
|
|
24086
|
+
if (date4 == null ? void 0 : date4[optionKey.childrenKey]) {
|
|
24087
|
+
const time = date4 == null ? void 0 : date4[optionKey.childrenKey].find((time2) => {
|
|
24088
|
+
return time2[optionKey.valueKey] === timeKey;
|
|
24089
|
+
});
|
|
24090
|
+
return time;
|
|
24091
|
+
}
|
|
24092
|
+
return false;
|
|
24093
|
+
},
|
|
24094
|
+
[activeTime, optionKey, activeDate]
|
|
24095
|
+
);
|
|
24096
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix2, className) }, timeList[optionKey.childrenKey].map((item) => /* @__PURE__ */ React__default.createElement(
|
|
24112
24097
|
"span",
|
|
24113
24098
|
{
|
|
24114
|
-
className:
|
|
24115
|
-
|
|
24116
|
-
|
|
24099
|
+
className: classNames(`${classPrefix2}__item`, {
|
|
24100
|
+
active: isActive(item[optionKey.valueKey])
|
|
24101
|
+
}),
|
|
24102
|
+
key: item[optionKey.valueKey],
|
|
24103
|
+
onClick: () => onSelect(item)
|
|
24117
24104
|
},
|
|
24118
|
-
item
|
|
24105
|
+
item[optionKey.textKey]
|
|
24119
24106
|
)));
|
|
24120
24107
|
};
|
|
24121
|
-
TimeDetail.defaultProps = defaultProps$
|
|
24108
|
+
TimeDetail.defaultProps = defaultProps$3;
|
|
24122
24109
|
TimeDetail.displayName = "NutTimeDetail";
|
|
24123
|
-
const defaultProps$3 = {
|
|
24124
|
-
className: "",
|
|
24125
|
-
date: "",
|
|
24126
|
-
curKey: 0
|
|
24127
|
-
};
|
|
24128
|
-
const TimePannel = (props) => {
|
|
24129
|
-
useConfig();
|
|
24130
|
-
const { children, className, date: date4, curKey, change } = {
|
|
24131
|
-
...defaultProps$3,
|
|
24132
|
-
...props
|
|
24133
|
-
};
|
|
24134
|
-
const b = cn("timepannel");
|
|
24135
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: `${b()} ${className || ""}`, onClick: () => change(curKey) }, date4);
|
|
24136
|
-
};
|
|
24137
|
-
TimePannel.defaultProps = defaultProps$3;
|
|
24138
|
-
TimePannel.displayName = "NutTimePannel";
|
|
24139
24110
|
const defaultProps$2 = {
|
|
24140
|
-
|
|
24141
|
-
style: {},
|
|
24111
|
+
...ComponentDefaults,
|
|
24142
24112
|
visible: false,
|
|
24143
|
-
height: "20%",
|
|
24144
24113
|
multiple: false,
|
|
24145
|
-
|
|
24146
|
-
|
|
24147
|
-
|
|
24148
|
-
|
|
24149
|
-
|
|
24114
|
+
defaultValue: [],
|
|
24115
|
+
options: [],
|
|
24116
|
+
optionKey: {
|
|
24117
|
+
valueKey: "value",
|
|
24118
|
+
textKey: "text",
|
|
24119
|
+
childrenKey: "children"
|
|
24120
|
+
}
|
|
24150
24121
|
};
|
|
24151
24122
|
const TimeSelect = (props) => {
|
|
24152
|
-
useConfig();
|
|
24123
|
+
const { locale } = useConfig();
|
|
24153
24124
|
const {
|
|
24154
24125
|
visible,
|
|
24155
24126
|
className,
|
|
24156
|
-
|
|
24127
|
+
style,
|
|
24157
24128
|
title,
|
|
24158
|
-
|
|
24159
|
-
|
|
24160
|
-
|
|
24161
|
-
times,
|
|
24129
|
+
defaultValue,
|
|
24130
|
+
options: options2,
|
|
24131
|
+
optionKey,
|
|
24162
24132
|
multiple,
|
|
24163
|
-
select,
|
|
24164
|
-
pannelChange,
|
|
24165
|
-
timeChange,
|
|
24166
24133
|
onSelect,
|
|
24167
|
-
|
|
24168
|
-
onTimeChange
|
|
24134
|
+
onDateChange,
|
|
24135
|
+
onTimeChange,
|
|
24136
|
+
...rest
|
|
24169
24137
|
} = {
|
|
24170
24138
|
...defaultProps$2,
|
|
24171
24139
|
...props
|
|
24172
24140
|
};
|
|
24173
|
-
const [
|
|
24141
|
+
const [activeDate, setActiveDate] = useState(() => {
|
|
24142
|
+
if (defaultValue == null ? void 0 : defaultValue.length) {
|
|
24143
|
+
return defaultValue[0][optionKey.valueKey];
|
|
24144
|
+
}
|
|
24145
|
+
if (options2 == null ? void 0 : options2.length) {
|
|
24146
|
+
return options2[0][optionKey.valueKey];
|
|
24147
|
+
}
|
|
24148
|
+
return "";
|
|
24149
|
+
});
|
|
24174
24150
|
const [activeTime, setActiveTime] = useState(
|
|
24175
|
-
|
|
24176
|
-
{
|
|
24177
|
-
key: currentKey,
|
|
24178
|
-
list: []
|
|
24179
|
-
}
|
|
24180
|
-
]
|
|
24151
|
+
() => defaultValue || []
|
|
24181
24152
|
);
|
|
24182
|
-
const
|
|
24183
|
-
const popStyle = {
|
|
24184
|
-
width: "100%",
|
|
24185
|
-
height
|
|
24186
|
-
};
|
|
24187
|
-
const b = cn("timeselect");
|
|
24153
|
+
const classPrefix2 = "nut-timeselect";
|
|
24188
24154
|
const closeFun = () => {
|
|
24189
|
-
|
|
24190
|
-
|
|
24191
|
-
|
|
24192
|
-
|
|
24193
|
-
|
|
24194
|
-
|
|
24195
|
-
|
|
24196
|
-
|
|
24197
|
-
|
|
24198
|
-
|
|
24199
|
-
|
|
24200
|
-
|
|
24201
|
-
|
|
24202
|
-
|
|
24203
|
-
|
|
24204
|
-
|
|
24205
|
-
|
|
24206
|
-
|
|
24207
|
-
);
|
|
24208
|
-
if (curTimeIndex === -1) {
|
|
24209
|
-
curTimeData.list.push(time);
|
|
24210
|
-
} else {
|
|
24211
|
-
curTimeData.list.splice(curTimeIndex, 1);
|
|
24212
|
-
}
|
|
24213
|
-
const resultTimeData = [...activeTime];
|
|
24214
|
-
resultTimeData.splice(curIndex, 1, curTimeData);
|
|
24215
|
-
setActiveTime(resultTimeData);
|
|
24216
|
-
if (onTimeChange) {
|
|
24217
|
-
onTimeChange(time, resultTimeData);
|
|
24218
|
-
} else if (timeChange) {
|
|
24219
|
-
timeChange(time, resultTimeData);
|
|
24220
|
-
}
|
|
24221
|
-
};
|
|
24222
|
-
const handleChange = (pannelKey) => {
|
|
24223
|
-
const resultTimeData = [...activeTime];
|
|
24224
|
-
if (String(pannelKey) !== String(activeKey)) {
|
|
24225
|
-
setActiveKey == null ? void 0 : setActiveKey(pannelKey);
|
|
24226
|
-
if (multiple) {
|
|
24227
|
-
const curTimeDataIndex = activeTime.findIndex(
|
|
24228
|
-
(item) => String(item.key) === String(pannelKey)
|
|
24229
|
-
);
|
|
24230
|
-
if (curTimeDataIndex === -1) {
|
|
24231
|
-
resultTimeData.push({
|
|
24232
|
-
key: pannelKey,
|
|
24233
|
-
list: []
|
|
24234
|
-
});
|
|
24235
|
-
setActiveTime(resultTimeData);
|
|
24155
|
+
onSelect && onSelect(activeTime);
|
|
24156
|
+
};
|
|
24157
|
+
const handleSelectTime = (selectTime) => {
|
|
24158
|
+
let newActiveTime = [...activeTime];
|
|
24159
|
+
const date4 = newActiveTime.find((item) => {
|
|
24160
|
+
return item[optionKey.valueKey] === activeDate;
|
|
24161
|
+
});
|
|
24162
|
+
if (date4) {
|
|
24163
|
+
const timeIndex = date4[optionKey.childrenKey].findIndex(
|
|
24164
|
+
(time) => {
|
|
24165
|
+
return time[optionKey.valueKey] === selectTime[optionKey.valueKey];
|
|
24166
|
+
}
|
|
24167
|
+
);
|
|
24168
|
+
if (timeIndex > -1) {
|
|
24169
|
+
if (multiple) {
|
|
24170
|
+
date4[optionKey.childrenKey].splice(timeIndex, 1);
|
|
24171
|
+
} else {
|
|
24172
|
+
newActiveTime = [];
|
|
24236
24173
|
}
|
|
24174
|
+
} else if (multiple) {
|
|
24175
|
+
date4[optionKey.childrenKey].push({ ...selectTime });
|
|
24237
24176
|
} else {
|
|
24238
|
-
|
|
24177
|
+
newActiveTime = [
|
|
24239
24178
|
{
|
|
24240
|
-
|
|
24241
|
-
|
|
24179
|
+
[optionKey.valueKey]: activeDate,
|
|
24180
|
+
[optionKey.childrenKey]: [{ ...selectTime }]
|
|
24242
24181
|
}
|
|
24243
|
-
]
|
|
24182
|
+
];
|
|
24244
24183
|
}
|
|
24184
|
+
} else if (multiple) {
|
|
24185
|
+
newActiveTime.push({
|
|
24186
|
+
[optionKey.valueKey]: activeDate,
|
|
24187
|
+
[optionKey.childrenKey]: [{ ...selectTime }]
|
|
24188
|
+
});
|
|
24189
|
+
} else {
|
|
24190
|
+
newActiveTime = [
|
|
24191
|
+
{
|
|
24192
|
+
[optionKey.valueKey]: activeDate,
|
|
24193
|
+
[optionKey.childrenKey]: [{ ...selectTime }]
|
|
24194
|
+
}
|
|
24195
|
+
];
|
|
24245
24196
|
}
|
|
24246
|
-
|
|
24247
|
-
|
|
24248
|
-
|
|
24249
|
-
|
|
24250
|
-
|
|
24197
|
+
newActiveTime = newActiveTime.filter((item) => {
|
|
24198
|
+
var _a2;
|
|
24199
|
+
return ((_a2 = item[optionKey.childrenKey]) == null ? void 0 : _a2.length) > 0;
|
|
24200
|
+
});
|
|
24201
|
+
setActiveTime(newActiveTime);
|
|
24202
|
+
onTimeChange && onTimeChange(selectTime, newActiveTime);
|
|
24251
24203
|
};
|
|
24252
|
-
const
|
|
24253
|
-
|
|
24254
|
-
|
|
24255
|
-
}
|
|
24256
|
-
return "";
|
|
24204
|
+
const handleChange = (date4) => {
|
|
24205
|
+
setActiveDate(date4[optionKey.valueKey]);
|
|
24206
|
+
onDateChange && onDateChange(date4, activeTime);
|
|
24257
24207
|
};
|
|
24258
|
-
|
|
24259
|
-
setPopVisible(visible);
|
|
24260
|
-
}, [visible]);
|
|
24261
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
24208
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
24262
24209
|
Popup,
|
|
24263
24210
|
{
|
|
24264
24211
|
closeable: true,
|
|
24265
24212
|
round: true,
|
|
24266
|
-
visible
|
|
24213
|
+
visible,
|
|
24267
24214
|
position: "bottom",
|
|
24268
|
-
style:
|
|
24269
|
-
|
|
24270
|
-
|
|
24271
|
-
|
|
24215
|
+
style: {
|
|
24216
|
+
width: "100%",
|
|
24217
|
+
height: "20%",
|
|
24218
|
+
...style
|
|
24219
|
+
},
|
|
24220
|
+
onClose: closeFun,
|
|
24221
|
+
...rest
|
|
24272
24222
|
},
|
|
24273
|
-
/* @__PURE__ */ React__default.createElement("div", { className:
|
|
24274
|
-
|
|
24223
|
+
/* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix2, className) }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__title` }, title || locale.timeselect.pickupTime), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__content` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__content-left` }, options2.map((item) => /* @__PURE__ */ React__default.createElement(
|
|
24224
|
+
"div",
|
|
24275
24225
|
{
|
|
24276
|
-
|
|
24277
|
-
className:
|
|
24278
|
-
|
|
24279
|
-
|
|
24280
|
-
|
|
24281
|
-
}
|
|
24226
|
+
key: item[optionKey.valueKey],
|
|
24227
|
+
className: classNames("nut-timepannel", {
|
|
24228
|
+
active: item[optionKey.valueKey] === activeDate
|
|
24229
|
+
}),
|
|
24230
|
+
onClick: () => handleChange(item)
|
|
24231
|
+
},
|
|
24232
|
+
item[optionKey.textKey]
|
|
24282
24233
|
))), /* @__PURE__ */ React__default.createElement(
|
|
24283
24234
|
TimeDetail,
|
|
24284
24235
|
{
|
|
24285
|
-
|
|
24286
|
-
|
|
24287
|
-
|
|
24288
|
-
|
|
24236
|
+
options: options2,
|
|
24237
|
+
optionKey,
|
|
24238
|
+
activeDate,
|
|
24239
|
+
activeTime,
|
|
24240
|
+
onSelect: handleSelectTime
|
|
24289
24241
|
}
|
|
24290
24242
|
)))
|
|
24291
|
-
)
|
|
24243
|
+
);
|
|
24292
24244
|
};
|
|
24293
24245
|
TimeSelect.defaultProps = defaultProps$2;
|
|
24294
24246
|
TimeSelect.displayName = "NutTimeSelect";
|
|
@@ -24526,7 +24478,7 @@ export {
|
|
|
24526
24478
|
Image$1 as Image,
|
|
24527
24479
|
ImagePreview,
|
|
24528
24480
|
Indicator,
|
|
24529
|
-
|
|
24481
|
+
InfiniteLoading,
|
|
24530
24482
|
Input,
|
|
24531
24483
|
InputNumber,
|
|
24532
24484
|
Layout,
|
|
@@ -24571,7 +24523,6 @@ export {
|
|
|
24571
24523
|
Tag,
|
|
24572
24524
|
TextArea,
|
|
24573
24525
|
TimeDetail,
|
|
24574
|
-
TimePannel,
|
|
24575
24526
|
TimeSelect,
|
|
24576
24527
|
Toast,
|
|
24577
24528
|
TrendArrow,
|