@nutui/nutui-react 2.0.0-alpha.14 → 2.0.0-alpha.16
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 +28 -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/DatePicker.js +54 -58
- package/dist/esm/Dialog/style/index.js +1 -0
- package/dist/esm/Dialog/style/style.css +1 -1
- package/dist/esm/InfiniteLoading/style/style.css +1 -0
- package/dist/esm/{Infiniteloading.js → InfiniteLoading.js} +25 -37
- package/dist/esm/Menu/style/style.css +1 -1
- package/dist/esm/Menu.js +5 -3
- package/dist/esm/MenuItem/style/style.css +1 -1
- package/dist/esm/MenuItem.js +31 -44
- package/dist/esm/NoticeBar.js +2 -2
- package/dist/esm/Picker.js +1 -1
- package/dist/esm/Popover.js +3 -40
- package/dist/esm/Popup.js +1 -1
- 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/Toast.js +16 -7
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/index.js +2 -2
- 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/datepicker/datepicker.d.ts +11 -17
- package/dist/esm/types/src/packages/datepicker/datepicker.taro.d.ts +11 -17
- package/dist/esm/types/src/packages/datepicker/index.d.ts +1 -0
- package/dist/esm/types/src/packages/datepicker/index.taro.d.ts +1 -0
- 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 +2 -4
- 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 +2 -3
- 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/esm/types/src/packages/toast/Notification.d.ts +4 -1
- package/dist/esm/use-click-away.js +43 -0
- 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 +765 -828
- package/dist/nutui.react.umd.js +765 -828
- package/dist/packages/card/card.scss +8 -14
- package/dist/packages/infiniteloading/infiniteloading.scss +2 -25
- package/dist/packages/menuitem/menuitem.scss +1 -1
- package/dist/packages/noticebar/noticebar.scss +0 -3
- 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/datepicker/datepicker.d.ts +79 -25
- package/dist/types/packages/datepicker/index.d.ts +1 -0
- 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/dist/types/packages/toast/Notification.d.ts +4 -1
- 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.umd.js
CHANGED
|
@@ -9,7 +9,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9
9
|
return value;
|
|
10
10
|
};
|
|
11
11
|
/*!
|
|
12
|
-
* @nutui/nutui-react v2.0.0-alpha.
|
|
12
|
+
* @nutui/nutui-react v2.0.0-alpha.16 Fri Jun 09 2023 18:29:35 GMT+0800 (China Standard Time)
|
|
13
13
|
* (c) 2023 @jdf2e.
|
|
14
14
|
* Released under the MIT License.
|
|
15
15
|
*/
|
|
@@ -2409,7 +2409,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2409
2409
|
style: {}
|
|
2410
2410
|
};
|
|
2411
2411
|
const prefixCls = "nut-button";
|
|
2412
|
-
const defaultProps$
|
|
2412
|
+
const defaultProps$1r = {
|
|
2413
2413
|
...ComponentDefaults,
|
|
2414
2414
|
color: "",
|
|
2415
2415
|
type: "default",
|
|
@@ -2441,7 +2441,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2441
2441
|
style,
|
|
2442
2442
|
...rest
|
|
2443
2443
|
} = {
|
|
2444
|
-
...defaultProps$
|
|
2444
|
+
...defaultProps$1r,
|
|
2445
2445
|
...props
|
|
2446
2446
|
};
|
|
2447
2447
|
const getStyle = React.useCallback(() => {
|
|
@@ -2494,7 +2494,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2494
2494
|
}
|
|
2495
2495
|
);
|
|
2496
2496
|
Button.displayName = "NutButton";
|
|
2497
|
-
const defaultProps$
|
|
2497
|
+
const defaultProps$1q = {
|
|
2498
2498
|
...ComponentDefaults,
|
|
2499
2499
|
title: null,
|
|
2500
2500
|
description: null,
|
|
@@ -2504,7 +2504,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2504
2504
|
onClick: (event) => {
|
|
2505
2505
|
}
|
|
2506
2506
|
};
|
|
2507
|
-
const classPrefix$
|
|
2507
|
+
const classPrefix$n = "nut-cell";
|
|
2508
2508
|
const Cell = (props) => {
|
|
2509
2509
|
const {
|
|
2510
2510
|
children,
|
|
@@ -2518,7 +2518,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2518
2518
|
style,
|
|
2519
2519
|
...rest
|
|
2520
2520
|
} = {
|
|
2521
|
-
...defaultProps$
|
|
2521
|
+
...defaultProps$1q,
|
|
2522
2522
|
...props
|
|
2523
2523
|
};
|
|
2524
2524
|
const handleClick2 = (event) => {
|
|
@@ -2535,44 +2535,44 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2535
2535
|
return /* @__PURE__ */ React.createElement(
|
|
2536
2536
|
"div",
|
|
2537
2537
|
{
|
|
2538
|
-
className: classNames(classPrefix$
|
|
2538
|
+
className: classNames(classPrefix$n, className),
|
|
2539
2539
|
onClick: (event) => handleClick2(event),
|
|
2540
2540
|
style: baseStyle,
|
|
2541
2541
|
...rest
|
|
2542
2542
|
},
|
|
2543
|
-
children || /* @__PURE__ */ React.createElement(React.Fragment, null, title || description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
2543
|
+
children || /* @__PURE__ */ React.createElement(React.Fragment, null, title || description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$n}__left` }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$n}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$n}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React.createElement(
|
|
2544
2544
|
"div",
|
|
2545
2545
|
{
|
|
2546
|
-
className: `${classPrefix$
|
|
2546
|
+
className: `${classPrefix$n}__extra`,
|
|
2547
2547
|
style: styles
|
|
2548
2548
|
},
|
|
2549
2549
|
extra
|
|
2550
|
-
) : null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
2550
|
+
) : null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$n}__divider` }))
|
|
2551
2551
|
);
|
|
2552
2552
|
};
|
|
2553
|
-
Cell.defaultProps = defaultProps$
|
|
2553
|
+
Cell.defaultProps = defaultProps$1q;
|
|
2554
2554
|
Cell.displayName = "NutCell";
|
|
2555
|
-
const defaultProps$
|
|
2555
|
+
const defaultProps$1p = {
|
|
2556
2556
|
...ComponentDefaults,
|
|
2557
2557
|
title: "",
|
|
2558
2558
|
description: "",
|
|
2559
2559
|
divider: true
|
|
2560
2560
|
};
|
|
2561
|
-
const classPrefix$
|
|
2561
|
+
const classPrefix$m = "nut-cell-group";
|
|
2562
2562
|
const CellGroup = (props) => {
|
|
2563
2563
|
const { children, className, style, title, description, divider, ...rest } = {
|
|
2564
|
-
...defaultProps$
|
|
2564
|
+
...defaultProps$1p,
|
|
2565
2565
|
...props
|
|
2566
2566
|
};
|
|
2567
|
-
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$
|
|
2567
|
+
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$m, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$m}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$m}__description` }, description) : null, /* @__PURE__ */ React.createElement(
|
|
2568
2568
|
"div",
|
|
2569
2569
|
{
|
|
2570
|
-
className: `${classPrefix$
|
|
2570
|
+
className: `${classPrefix$m}__wrap ${divider ? `${classPrefix$m}__wrap--divider` : ""}`
|
|
2571
2571
|
},
|
|
2572
2572
|
children
|
|
2573
2573
|
));
|
|
2574
2574
|
};
|
|
2575
|
-
CellGroup.defaultProps = defaultProps$
|
|
2575
|
+
CellGroup.defaultProps = defaultProps$1p;
|
|
2576
2576
|
CellGroup.displayName = "NutCellGroup";
|
|
2577
2577
|
var INFINITY = 1 / 0;
|
|
2578
2578
|
var symbolTag = "[object Symbol]";
|
|
@@ -2924,7 +2924,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2924
2924
|
},
|
|
2925
2925
|
signature: {
|
|
2926
2926
|
reSign: "重签",
|
|
2927
|
-
|
|
2927
|
+
unsupported: "对不起,当前浏览器不支持Canvas,无法使用本控件!"
|
|
2928
2928
|
},
|
|
2929
2929
|
ecard: {
|
|
2930
2930
|
chooseText: "请选择电子卡面值",
|
|
@@ -2987,7 +2987,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
2987
2987
|
errorCanvasTips: "当前环境不支持Canvas"
|
|
2988
2988
|
}
|
|
2989
2989
|
};
|
|
2990
|
-
const defaultProps$
|
|
2990
|
+
const defaultProps$1o = {
|
|
2991
2991
|
locale: zhCN
|
|
2992
2992
|
};
|
|
2993
2993
|
const defaultConfigRef = {
|
|
@@ -3010,7 +3010,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3010
3010
|
return cssVars;
|
|
3011
3011
|
}
|
|
3012
3012
|
const ConfigProvider = (props) => {
|
|
3013
|
-
const { children, ...config2 } = { ...defaultProps$
|
|
3013
|
+
const { children, ...config2 } = { ...defaultProps$1o, ...props };
|
|
3014
3014
|
const parentConfig = useConfig();
|
|
3015
3015
|
const theme = config2.theme || {};
|
|
3016
3016
|
const style = React.useMemo(
|
|
@@ -3028,12 +3028,12 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3028
3028
|
/* @__PURE__ */ React.createElement("div", { style }, children)
|
|
3029
3029
|
);
|
|
3030
3030
|
};
|
|
3031
|
-
ConfigProvider.defaultProps = defaultProps$
|
|
3031
|
+
ConfigProvider.defaultProps = defaultProps$1o;
|
|
3032
3032
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
3033
3033
|
const pxCheck = (value) => {
|
|
3034
3034
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
3035
3035
|
};
|
|
3036
|
-
const defaultProps$
|
|
3036
|
+
const defaultProps$1n = {
|
|
3037
3037
|
...ComponentDefaults,
|
|
3038
3038
|
fit: "fill",
|
|
3039
3039
|
position: "center",
|
|
@@ -3044,7 +3044,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3044
3044
|
loading: true,
|
|
3045
3045
|
lazy: false
|
|
3046
3046
|
};
|
|
3047
|
-
const classPrefix$
|
|
3047
|
+
const classPrefix$l = "nut-image";
|
|
3048
3048
|
const Image$1 = (props) => {
|
|
3049
3049
|
const {
|
|
3050
3050
|
className,
|
|
@@ -3062,7 +3062,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3062
3062
|
onClick,
|
|
3063
3063
|
onLoad,
|
|
3064
3064
|
onError
|
|
3065
|
-
} = { ...defaultProps$
|
|
3065
|
+
} = { ...defaultProps$1n, ...props };
|
|
3066
3066
|
const [innerLoading, setInnerLoading] = React.useState(true);
|
|
3067
3067
|
const [isError, setIsError] = React.useState(false);
|
|
3068
3068
|
const imgRef = React.useRef(null);
|
|
@@ -3155,7 +3155,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3155
3155
|
return /* @__PURE__ */ React.createElement(
|
|
3156
3156
|
"div",
|
|
3157
3157
|
{
|
|
3158
|
-
className: classNames(classPrefix$
|
|
3158
|
+
className: classNames(classPrefix$l, className),
|
|
3159
3159
|
style: containerStyle,
|
|
3160
3160
|
onClick: (e) => {
|
|
3161
3161
|
imageClick(e);
|
|
@@ -3189,7 +3189,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3189
3189
|
renderErrorImg()
|
|
3190
3190
|
);
|
|
3191
3191
|
};
|
|
3192
|
-
Image$1.defaultProps = defaultProps$
|
|
3192
|
+
Image$1.defaultProps = defaultProps$1n;
|
|
3193
3193
|
Image$1.displayName = "NutImage";
|
|
3194
3194
|
const defaultOverlayProps = {
|
|
3195
3195
|
...ComponentDefaults,
|
|
@@ -3274,7 +3274,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3274
3274
|
Overlay.defaultProps = defaultOverlayProps;
|
|
3275
3275
|
Overlay.displayName = "NutOverlay";
|
|
3276
3276
|
const DataContext$2 = React.createContext({});
|
|
3277
|
-
const defaultProps$
|
|
3277
|
+
const defaultProps$1m = {
|
|
3278
3278
|
...ComponentDefaults,
|
|
3279
3279
|
span: "24",
|
|
3280
3280
|
offset: "0",
|
|
@@ -3282,7 +3282,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3282
3282
|
};
|
|
3283
3283
|
const Col = (props) => {
|
|
3284
3284
|
const { className, style, span, offset, children, onClick } = {
|
|
3285
|
-
...defaultProps$
|
|
3285
|
+
...defaultProps$1m,
|
|
3286
3286
|
...props
|
|
3287
3287
|
};
|
|
3288
3288
|
const [colName, setColName] = React.useState("");
|
|
@@ -3314,39 +3314,39 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3314
3314
|
children
|
|
3315
3315
|
);
|
|
3316
3316
|
};
|
|
3317
|
-
Col.defaultProps = defaultProps$
|
|
3317
|
+
Col.defaultProps = defaultProps$1m;
|
|
3318
3318
|
Col.displayName = "NutCol";
|
|
3319
|
-
const defaultProps$
|
|
3319
|
+
const defaultProps$1l = {
|
|
3320
3320
|
...ComponentDefaults,
|
|
3321
3321
|
contentPosition: "center",
|
|
3322
3322
|
direction: "horizontal"
|
|
3323
3323
|
};
|
|
3324
|
-
const classPrefix$
|
|
3324
|
+
const classPrefix$k = `nut-divider`;
|
|
3325
3325
|
const Divider = (props) => {
|
|
3326
3326
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
3327
|
-
...defaultProps$
|
|
3327
|
+
...defaultProps$1l,
|
|
3328
3328
|
...props
|
|
3329
3329
|
};
|
|
3330
3330
|
const classes = direction === "horizontal" ? classNames({
|
|
3331
|
-
[`${classPrefix$
|
|
3332
|
-
[`${classPrefix$
|
|
3333
|
-
[`${classPrefix$
|
|
3334
|
-
[`${classPrefix$
|
|
3335
|
-
[`${classPrefix$
|
|
3331
|
+
[`${classPrefix$k}`]: true,
|
|
3332
|
+
[`${classPrefix$k}__center`]: children,
|
|
3333
|
+
[`${classPrefix$k}__left`]: contentPosition === "left",
|
|
3334
|
+
[`${classPrefix$k}__right`]: contentPosition === "right",
|
|
3335
|
+
[`${classPrefix$k}__hairline`]: true
|
|
3336
3336
|
}) : classNames({
|
|
3337
|
-
[`${classPrefix$
|
|
3338
|
-
[`${classPrefix$
|
|
3337
|
+
[`${classPrefix$k}`]: true,
|
|
3338
|
+
[`${classPrefix$k}__vertical`]: direction === "vertical"
|
|
3339
3339
|
});
|
|
3340
3340
|
return /* @__PURE__ */ React.createElement("div", { className: `${classes} ${className || ""}`, style, ...rest }, children);
|
|
3341
3341
|
};
|
|
3342
|
-
Divider.defaultProps = defaultProps$
|
|
3342
|
+
Divider.defaultProps = defaultProps$1l;
|
|
3343
3343
|
Divider.displayName = "NutDivider";
|
|
3344
3344
|
const gridContext = {
|
|
3345
3345
|
onClick: (item, index) => {
|
|
3346
3346
|
}
|
|
3347
3347
|
};
|
|
3348
3348
|
const GridContext = React.createContext(gridContext);
|
|
3349
|
-
const defaultProps$
|
|
3349
|
+
const defaultProps$1k = {
|
|
3350
3350
|
text: "",
|
|
3351
3351
|
columns: 4,
|
|
3352
3352
|
gap: 0,
|
|
@@ -3372,7 +3372,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3372
3372
|
onClick,
|
|
3373
3373
|
...rest
|
|
3374
3374
|
} = {
|
|
3375
|
-
...defaultProps$
|
|
3375
|
+
...defaultProps$1k,
|
|
3376
3376
|
...props
|
|
3377
3377
|
};
|
|
3378
3378
|
const classPrefix2 = "nut-grid-item";
|
|
@@ -3430,9 +3430,9 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3430
3430
|
/* @__PURE__ */ React.createElement("div", { className: contentClass() }, children && /* @__PURE__ */ React.createElement(React.Fragment, null, children), text && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__text` }, text))
|
|
3431
3431
|
);
|
|
3432
3432
|
};
|
|
3433
|
-
GridItem.defaultProps = defaultProps$
|
|
3433
|
+
GridItem.defaultProps = defaultProps$1k;
|
|
3434
3434
|
GridItem.displayName = "NutGridItem";
|
|
3435
|
-
const defaultProps$
|
|
3435
|
+
const defaultProps$1j = {
|
|
3436
3436
|
columns: 4,
|
|
3437
3437
|
gap: 0,
|
|
3438
3438
|
center: true,
|
|
@@ -3453,7 +3453,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3453
3453
|
className,
|
|
3454
3454
|
onClick,
|
|
3455
3455
|
...rest
|
|
3456
|
-
} = { ...defaultProps$
|
|
3456
|
+
} = { ...defaultProps$1j, ...props };
|
|
3457
3457
|
const childrenDom = React.Children.toArray(children);
|
|
3458
3458
|
const classPrefix2 = "nut-grid";
|
|
3459
3459
|
const rootClass = () => {
|
|
@@ -3483,18 +3483,18 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3483
3483
|
});
|
|
3484
3484
|
})));
|
|
3485
3485
|
};
|
|
3486
|
-
Grid.defaultProps = defaultProps$
|
|
3486
|
+
Grid.defaultProps = defaultProps$1j;
|
|
3487
3487
|
Grid.displayName = "NutGrid";
|
|
3488
3488
|
Grid.Item = GridItem;
|
|
3489
|
-
const defaultProps$
|
|
3489
|
+
const defaultProps$1i = {};
|
|
3490
3490
|
const Layout = (props) => {
|
|
3491
|
-
({ ...defaultProps$
|
|
3491
|
+
({ ...defaultProps$1i, ...props });
|
|
3492
3492
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-layout" }, "Layout");
|
|
3493
3493
|
};
|
|
3494
|
-
Layout.defaultProps = defaultProps$
|
|
3494
|
+
Layout.defaultProps = defaultProps$1i;
|
|
3495
3495
|
Layout.displayName = "NutLayout";
|
|
3496
|
-
const classPrefix$
|
|
3497
|
-
const defaultProps$
|
|
3496
|
+
const classPrefix$j = "nut-row";
|
|
3497
|
+
const defaultProps$1h = {
|
|
3498
3498
|
...ComponentDefaults,
|
|
3499
3499
|
type: "",
|
|
3500
3500
|
justify: "start",
|
|
@@ -3514,7 +3514,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3514
3514
|
gutter,
|
|
3515
3515
|
onClick
|
|
3516
3516
|
} = {
|
|
3517
|
-
...defaultProps$
|
|
3517
|
+
...defaultProps$1h,
|
|
3518
3518
|
...props
|
|
3519
3519
|
};
|
|
3520
3520
|
const getClass = (prefix2, type22) => {
|
|
@@ -3528,7 +3528,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3528
3528
|
${getClass("justify", justify)}
|
|
3529
3529
|
${getClass("align", align)}
|
|
3530
3530
|
${getClass("flex", wrap)}
|
|
3531
|
-
${classPrefix$
|
|
3531
|
+
${classPrefix$j}
|
|
3532
3532
|
`;
|
|
3533
3533
|
};
|
|
3534
3534
|
const parentRow = {
|
|
@@ -3546,7 +3546,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3546
3546
|
children
|
|
3547
3547
|
));
|
|
3548
3548
|
};
|
|
3549
|
-
Row.defaultProps = defaultProps$
|
|
3549
|
+
Row.defaultProps = defaultProps$1h;
|
|
3550
3550
|
Row.displayName = "NutRow";
|
|
3551
3551
|
const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
|
|
3552
3552
|
const defaultRoot = canUseDom ? window : void 0;
|
|
@@ -3621,13 +3621,13 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3621
3621
|
stop2.current = true;
|
|
3622
3622
|
};
|
|
3623
3623
|
}
|
|
3624
|
-
const defaultProps$
|
|
3624
|
+
const defaultProps$1g = {
|
|
3625
3625
|
...ComponentDefaults,
|
|
3626
3626
|
position: "top",
|
|
3627
3627
|
threshold: 0,
|
|
3628
3628
|
zIndex: 2e3
|
|
3629
3629
|
};
|
|
3630
|
-
const classPrefix$
|
|
3630
|
+
const classPrefix$i = "nut-sticky";
|
|
3631
3631
|
const Sticky = (props) => {
|
|
3632
3632
|
const {
|
|
3633
3633
|
position,
|
|
@@ -3639,7 +3639,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3639
3639
|
threshold,
|
|
3640
3640
|
onChange,
|
|
3641
3641
|
...rest
|
|
3642
|
-
} = { ...defaultProps$
|
|
3642
|
+
} = { ...defaultProps$1g, ...props };
|
|
3643
3643
|
const stickyRef = React.useRef(null);
|
|
3644
3644
|
const rootRef = React.useRef(null);
|
|
3645
3645
|
const [isFixed, setIsFixed] = React.useState(false);
|
|
@@ -3749,15 +3749,15 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3749
3749
|
{
|
|
3750
3750
|
ref: rootRef,
|
|
3751
3751
|
style: { ...style, ...rootStyle },
|
|
3752
|
-
className: classNames(classPrefix$
|
|
3752
|
+
className: classNames(classPrefix$i, className),
|
|
3753
3753
|
...rest
|
|
3754
3754
|
},
|
|
3755
3755
|
/* @__PURE__ */ React.createElement("div", { className: "nut-sticky--box", ref: stickyRef, style: stickyStyle }, children)
|
|
3756
3756
|
);
|
|
3757
3757
|
};
|
|
3758
|
-
Sticky.defaultProps = defaultProps$
|
|
3758
|
+
Sticky.defaultProps = defaultProps$1g;
|
|
3759
3759
|
Sticky.displayName = "NutSticky";
|
|
3760
|
-
const defaultProps$
|
|
3760
|
+
const defaultProps$1f = {
|
|
3761
3761
|
...ComponentDefaults,
|
|
3762
3762
|
target: "",
|
|
3763
3763
|
threshold: 200,
|
|
@@ -3775,7 +3775,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3775
3775
|
style,
|
|
3776
3776
|
onClick
|
|
3777
3777
|
} = {
|
|
3778
|
-
...defaultProps$
|
|
3778
|
+
...defaultProps$1f,
|
|
3779
3779
|
...props
|
|
3780
3780
|
};
|
|
3781
3781
|
const classPrefix2 = "nut-backtop";
|
|
@@ -3873,7 +3873,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
3873
3873
|
children || /* @__PURE__ */ React.createElement(y$2, { width: 19, height: 19, className: "nut-backtop-main" })
|
|
3874
3874
|
);
|
|
3875
3875
|
};
|
|
3876
|
-
BackTop.defaultProps = defaultProps$
|
|
3876
|
+
BackTop.defaultProps = defaultProps$1f;
|
|
3877
3877
|
BackTop.displayName = "NutBackTop";
|
|
3878
3878
|
function clamp$1(v, min, max) {
|
|
3879
3879
|
return Math.max(min, Math.min(v, max));
|
|
@@ -8991,7 +8991,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
8991
8991
|
});
|
|
8992
8992
|
const animated = host.animated;
|
|
8993
8993
|
const elevatorContext = React.createContext({});
|
|
8994
|
-
const defaultProps$
|
|
8994
|
+
const defaultProps$1e = {
|
|
8995
8995
|
...ComponentDefaults,
|
|
8996
8996
|
height: "200px",
|
|
8997
8997
|
floorKey: "title",
|
|
@@ -9017,7 +9017,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
9017
9017
|
children,
|
|
9018
9018
|
...rest
|
|
9019
9019
|
} = {
|
|
9020
|
-
...defaultProps$
|
|
9020
|
+
...defaultProps$1e,
|
|
9021
9021
|
...props
|
|
9022
9022
|
};
|
|
9023
9023
|
const classPrefix2 = "nut-elevator";
|
|
@@ -9192,10 +9192,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
9192
9192
|
})
|
|
9193
9193
|
))) : null);
|
|
9194
9194
|
};
|
|
9195
|
-
Elevator.defaultProps = defaultProps$
|
|
9195
|
+
Elevator.defaultProps = defaultProps$1e;
|
|
9196
9196
|
Elevator.displayName = "NutElevator";
|
|
9197
9197
|
Elevator.Context = elevatorContext;
|
|
9198
|
-
const defaultProps$
|
|
9198
|
+
const defaultProps$1d = {
|
|
9199
9199
|
...ComponentDefaults,
|
|
9200
9200
|
activeText: "",
|
|
9201
9201
|
inactiveText: "",
|
|
@@ -9223,7 +9223,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
9223
9223
|
content,
|
|
9224
9224
|
...rest
|
|
9225
9225
|
} = {
|
|
9226
|
-
...defaultProps$
|
|
9226
|
+
...defaultProps$1d,
|
|
9227
9227
|
...props
|
|
9228
9228
|
};
|
|
9229
9229
|
const classPrefix2 = "nut-fixednav";
|
|
@@ -9275,9 +9275,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
9275
9275
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__btn`, onClick: () => onUpdateValue() }, content || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(y$6, { color: "#fff" }), /* @__PURE__ */ React.createElement("div", { className: "text" }, visible ? activeText || locale.fixednav.activeText : inactiveText || locale.fixednav.inactiveText)))
|
|
9276
9276
|
);
|
|
9277
9277
|
};
|
|
9278
|
-
FixedNav.defaultProps = defaultProps$
|
|
9278
|
+
FixedNav.defaultProps = defaultProps$1d;
|
|
9279
9279
|
FixedNav.displayName = "NutFixedNav";
|
|
9280
|
-
const defaultProps$
|
|
9280
|
+
const defaultProps$1c = {
|
|
9281
9281
|
...ComponentDefaults,
|
|
9282
9282
|
left: "",
|
|
9283
9283
|
right: "",
|
|
@@ -9300,7 +9300,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
9300
9300
|
zIndex,
|
|
9301
9301
|
onClickBack
|
|
9302
9302
|
} = {
|
|
9303
|
-
...defaultProps$
|
|
9303
|
+
...defaultProps$1c,
|
|
9304
9304
|
...props
|
|
9305
9305
|
};
|
|
9306
9306
|
const classPrefix2 = "nut-navbar";
|
|
@@ -9337,7 +9337,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
9337
9337
|
const cls = classNames(classPrefix2, classes, className);
|
|
9338
9338
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}--placeholder` }, renderWrapper()) : renderWrapper());
|
|
9339
9339
|
};
|
|
9340
|
-
NavBar.defaultProps = defaultProps$
|
|
9340
|
+
NavBar.defaultProps = defaultProps$1c;
|
|
9341
9341
|
NavBar.displayName = "NutNavBar";
|
|
9342
9342
|
function _extends$1() {
|
|
9343
9343
|
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
@@ -11080,7 +11080,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11080
11080
|
onExited: propTypesExports.func
|
|
11081
11081
|
}) : {};
|
|
11082
11082
|
const CSSTransition$1 = CSSTransition;
|
|
11083
|
-
const defaultProps$
|
|
11083
|
+
const defaultProps$1b = {
|
|
11084
11084
|
...ComponentDefaults,
|
|
11085
11085
|
position: "center",
|
|
11086
11086
|
transition: "",
|
|
@@ -11221,7 +11221,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11221
11221
|
{
|
|
11222
11222
|
classNames: transitionName,
|
|
11223
11223
|
unmountOnExit: true,
|
|
11224
|
-
timeout:
|
|
11224
|
+
timeout: 300,
|
|
11225
11225
|
in: innerVisible,
|
|
11226
11226
|
onEntered: onHandleOpened,
|
|
11227
11227
|
onExited: onHandleClosed
|
|
@@ -11253,7 +11253,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11253
11253
|
}, [position, transition]);
|
|
11254
11254
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, renderToContainer(portal, renderNode()));
|
|
11255
11255
|
};
|
|
11256
|
-
Popup.defaultProps = defaultProps$
|
|
11256
|
+
Popup.defaultProps = defaultProps$1b;
|
|
11257
11257
|
Popup.displayName = "NutPopup";
|
|
11258
11258
|
const handleClick = (e) => {
|
|
11259
11259
|
e.stopPropagation();
|
|
@@ -11269,7 +11269,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11269
11269
|
}
|
|
11270
11270
|
};
|
|
11271
11271
|
const OffsetContext = React.createContext(20);
|
|
11272
|
-
const defaultProps$
|
|
11272
|
+
const defaultProps$1a = {
|
|
11273
11273
|
...ComponentDefaults,
|
|
11274
11274
|
position: "left",
|
|
11275
11275
|
width: "80%"
|
|
@@ -11286,7 +11286,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11286
11286
|
onClose,
|
|
11287
11287
|
...rest
|
|
11288
11288
|
} = {
|
|
11289
|
-
...defaultProps$
|
|
11289
|
+
...defaultProps$1a,
|
|
11290
11290
|
...props
|
|
11291
11291
|
};
|
|
11292
11292
|
const indent = props.indent ? Number(props.indent) : 20;
|
|
@@ -11318,7 +11318,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11318
11318
|
)))
|
|
11319
11319
|
);
|
|
11320
11320
|
};
|
|
11321
|
-
SideNavBar.defaultProps = defaultProps$
|
|
11321
|
+
SideNavBar.defaultProps = defaultProps$1a;
|
|
11322
11322
|
SideNavBar.displayName = "NutSideNavBar";
|
|
11323
11323
|
const SideNavBarItem = (props) => {
|
|
11324
11324
|
const classPrefix2 = "nut-subsidenavbar";
|
|
@@ -11337,13 +11337,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11337
11337
|
title
|
|
11338
11338
|
);
|
|
11339
11339
|
};
|
|
11340
|
-
const defaultProps$
|
|
11340
|
+
const defaultProps$19 = {
|
|
11341
11341
|
open: true
|
|
11342
11342
|
};
|
|
11343
11343
|
const SubSideNavBar = (props) => {
|
|
11344
11344
|
const classPrefix2 = "nut-subsidenavbar";
|
|
11345
11345
|
const { title, value, children, onClick, open, ...rest } = {
|
|
11346
|
-
...defaultProps$
|
|
11346
|
+
...defaultProps$19,
|
|
11347
11347
|
...props
|
|
11348
11348
|
};
|
|
11349
11349
|
const offset = React.useContext(OffsetContext);
|
|
@@ -11409,7 +11409,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11409
11409
|
}
|
|
11410
11410
|
return [uncontrolled, handleUncontrolledChange];
|
|
11411
11411
|
}
|
|
11412
|
-
const defaultProps$
|
|
11412
|
+
const defaultProps$18 = {
|
|
11413
11413
|
...ComponentDefaults,
|
|
11414
11414
|
value: "",
|
|
11415
11415
|
dot: false,
|
|
@@ -11420,7 +11420,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11420
11420
|
};
|
|
11421
11421
|
const Badge = (props) => {
|
|
11422
11422
|
const { className, style, value, max, children, dot, top, right, color } = {
|
|
11423
|
-
...defaultProps$
|
|
11423
|
+
...defaultProps$18,
|
|
11424
11424
|
...props
|
|
11425
11425
|
};
|
|
11426
11426
|
const classPrefix2 = "nut-badge";
|
|
@@ -11447,9 +11447,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11447
11447
|
};
|
|
11448
11448
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style }, typeof value === "object" && value && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__icon` }, value), /* @__PURE__ */ React.createElement("div", null, children), /* @__PURE__ */ React.createElement("div", { className: contentClasses, style: getStyle() }, content()));
|
|
11449
11449
|
};
|
|
11450
|
-
Badge.defaultProps = defaultProps$
|
|
11450
|
+
Badge.defaultProps = defaultProps$18;
|
|
11451
11451
|
Badge.displayName = "NutBadge";
|
|
11452
|
-
const defaultProps$
|
|
11452
|
+
const defaultProps$17 = {
|
|
11453
11453
|
...ComponentDefaults,
|
|
11454
11454
|
title: "",
|
|
11455
11455
|
icon: null,
|
|
@@ -11471,7 +11471,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11471
11471
|
handleClick: handleClick2,
|
|
11472
11472
|
...rest
|
|
11473
11473
|
} = {
|
|
11474
|
-
...defaultProps$
|
|
11474
|
+
...defaultProps$17,
|
|
11475
11475
|
...props
|
|
11476
11476
|
};
|
|
11477
11477
|
const classPrefix2 = "nut-tabbar-item";
|
|
@@ -11495,7 +11495,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11495
11495
|
icon ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Badge, { ...rest }, /* @__PURE__ */ React.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React.createElement(Badge, { ...rest }, /* @__PURE__ */ React.createElement("div", { className: titleClass }, title))
|
|
11496
11496
|
);
|
|
11497
11497
|
};
|
|
11498
|
-
const defaultProps$
|
|
11498
|
+
const defaultProps$16 = {
|
|
11499
11499
|
...ComponentDefaults,
|
|
11500
11500
|
defaultValue: 0,
|
|
11501
11501
|
fixed: false,
|
|
@@ -11518,7 +11518,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11518
11518
|
style,
|
|
11519
11519
|
onSwitch
|
|
11520
11520
|
} = {
|
|
11521
|
-
...defaultProps$
|
|
11521
|
+
...defaultProps$16,
|
|
11522
11522
|
...props
|
|
11523
11523
|
};
|
|
11524
11524
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -11553,17 +11553,17 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11553
11553
|
(fixed || safeArea) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__safe-area` })
|
|
11554
11554
|
);
|
|
11555
11555
|
};
|
|
11556
|
-
Tabbar.defaultProps = defaultProps$
|
|
11556
|
+
Tabbar.defaultProps = defaultProps$16;
|
|
11557
11557
|
Tabbar.displayName = "NutTabbar";
|
|
11558
11558
|
Tabbar.Item = TabbarItem;
|
|
11559
|
-
const defaultProps$
|
|
11559
|
+
const defaultProps$15 = {
|
|
11560
11560
|
title: "",
|
|
11561
11561
|
value: "",
|
|
11562
11562
|
disabled: false
|
|
11563
11563
|
};
|
|
11564
11564
|
const TabPane = (props) => {
|
|
11565
11565
|
const { children, autoHeightClassName, className, disabled } = {
|
|
11566
|
-
...defaultProps$
|
|
11566
|
+
...defaultProps$15,
|
|
11567
11567
|
...props
|
|
11568
11568
|
};
|
|
11569
11569
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -11594,7 +11594,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11594
11594
|
const [, updateState] = React.useState();
|
|
11595
11595
|
return React.useCallback(() => updateState({}), []);
|
|
11596
11596
|
}
|
|
11597
|
-
const defaultProps$
|
|
11597
|
+
const defaultProps$14 = {
|
|
11598
11598
|
...ComponentDefaults,
|
|
11599
11599
|
tabStyle: {},
|
|
11600
11600
|
activeColor: "",
|
|
@@ -11603,7 +11603,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11603
11603
|
duration: 300,
|
|
11604
11604
|
autoHeight: false
|
|
11605
11605
|
};
|
|
11606
|
-
const classPrefix$
|
|
11606
|
+
const classPrefix$h = "nut-tabs";
|
|
11607
11607
|
const Tabs = (props) => {
|
|
11608
11608
|
const {
|
|
11609
11609
|
activeColor,
|
|
@@ -11620,7 +11620,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11620
11620
|
autoHeight,
|
|
11621
11621
|
...rest
|
|
11622
11622
|
} = {
|
|
11623
|
-
...defaultProps$
|
|
11623
|
+
...defaultProps$14,
|
|
11624
11624
|
...props
|
|
11625
11625
|
};
|
|
11626
11626
|
const [value, setValue] = usePropsValue({
|
|
@@ -11697,14 +11697,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11697
11697
|
}
|
|
11698
11698
|
}, [children]);
|
|
11699
11699
|
const classes = classNames(
|
|
11700
|
-
classPrefix$
|
|
11701
|
-
`${classPrefix$
|
|
11700
|
+
classPrefix$h,
|
|
11701
|
+
`${classPrefix$h}--${direction}`,
|
|
11702
11702
|
className
|
|
11703
11703
|
);
|
|
11704
|
-
const classesTitle = classNames(`${classPrefix$
|
|
11705
|
-
[`${classPrefix$
|
|
11706
|
-
[`${classPrefix$
|
|
11707
|
-
[`${classPrefix$
|
|
11704
|
+
const classesTitle = classNames(`${classPrefix$h}__titles`, {
|
|
11705
|
+
[`${classPrefix$h}__titles--${activeType}`]: activeType,
|
|
11706
|
+
[`${classPrefix$h}__titles--scrollable`]: true,
|
|
11707
|
+
[`${classPrefix$h}__titles--${align}`]: align
|
|
11708
11708
|
});
|
|
11709
11709
|
const tabsActiveStyle = {
|
|
11710
11710
|
color: activeType === "smile" ? activeColor : "",
|
|
@@ -11734,7 +11734,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11734
11734
|
onClick: () => {
|
|
11735
11735
|
tabChange(item);
|
|
11736
11736
|
},
|
|
11737
|
-
className: classNames(`${classPrefix$
|
|
11737
|
+
className: classNames(`${classPrefix$h}__titles-item`, {
|
|
11738
11738
|
[`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
|
|
11739
11739
|
[`nut-tabs__titles-item--disabled`]: item.disabled,
|
|
11740
11740
|
[`nut-tabs__titles-item--${align}`]: align
|
|
@@ -11745,14 +11745,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11745
11745
|
activeType === "line" && /* @__PURE__ */ React.createElement(
|
|
11746
11746
|
"div",
|
|
11747
11747
|
{
|
|
11748
|
-
className: `${classPrefix$
|
|
11748
|
+
className: `${classPrefix$h}__titles-item__line`,
|
|
11749
11749
|
style: tabsActiveStyle
|
|
11750
11750
|
}
|
|
11751
11751
|
),
|
|
11752
11752
|
activeType === "smile" && /* @__PURE__ */ React.createElement(
|
|
11753
11753
|
"div",
|
|
11754
11754
|
{
|
|
11755
|
-
className: `${classPrefix$
|
|
11755
|
+
className: `${classPrefix$h}__titles-item__smile`,
|
|
11756
11756
|
style: tabsActiveStyle
|
|
11757
11757
|
},
|
|
11758
11758
|
/* @__PURE__ */ React.createElement(x$7, { color: activeColor, width: 40, height: 20 })
|
|
@@ -11764,13 +11764,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11764
11764
|
{
|
|
11765
11765
|
ellipsis: true
|
|
11766
11766
|
},
|
|
11767
|
-
`${classPrefix$
|
|
11767
|
+
`${classPrefix$h}__titles-item__text`
|
|
11768
11768
|
)
|
|
11769
11769
|
},
|
|
11770
11770
|
item.title
|
|
11771
11771
|
)
|
|
11772
11772
|
);
|
|
11773
|
-
})), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
11773
|
+
})), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$h}__content__wrap` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$h}__content`, style: contentStyle }, React.Children.map(children, (child, idx) => {
|
|
11774
11774
|
if (!React.isValidElement(child)) {
|
|
11775
11775
|
return null;
|
|
11776
11776
|
}
|
|
@@ -11787,7 +11787,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11787
11787
|
return React.cloneElement(child, childProps);
|
|
11788
11788
|
}))));
|
|
11789
11789
|
};
|
|
11790
|
-
Tabs.defaultProps = defaultProps$
|
|
11790
|
+
Tabs.defaultProps = defaultProps$14;
|
|
11791
11791
|
Tabs.displayName = "NutTabs";
|
|
11792
11792
|
Tabs.TabPane = TabPane;
|
|
11793
11793
|
var classnameExports = {};
|
|
@@ -11910,7 +11910,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11910
11910
|
}
|
|
11911
11911
|
})(classname);
|
|
11912
11912
|
const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
11913
|
-
const defaultProps$
|
|
11913
|
+
const defaultProps$13 = {
|
|
11914
11914
|
type: "custom",
|
|
11915
11915
|
existAddress: [],
|
|
11916
11916
|
defaultIcon: null,
|
|
@@ -11932,7 +11932,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11932
11932
|
onClose,
|
|
11933
11933
|
onSwitchModule,
|
|
11934
11934
|
...rest
|
|
11935
|
-
} = { ...defaultProps$
|
|
11935
|
+
} = { ...defaultProps$13, ...props };
|
|
11936
11936
|
const b = cn("address");
|
|
11937
11937
|
const selectedExist = (item) => {
|
|
11938
11938
|
const copyExistAdd = existAddress;
|
|
@@ -11962,7 +11962,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11962
11962
|
return /* @__PURE__ */ React.createElement("li", { className: b("exist-item"), key: index }, /* @__PURE__ */ React.createElement("div", { onClick: () => selectedExist(item) }, item.selectedAddress ? selectedIcon : defaultIcon, /* @__PURE__ */ React.createElement("div", { className: b("exist-item-info") }, item.name && item.phone && /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-top" }, /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-name" }, item.name), /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-phone" }, item.phone)), /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-bottom" }, /* @__PURE__ */ React.createElement("div", null, item.provinceName + item.cityName + item.countyName + item.townName + item.addressDetail)))));
|
|
11963
11963
|
}))), isShowCustomAddress && /* @__PURE__ */ React.createElement("div", { className: b("choose-other"), onClick: onSwitch }, /* @__PURE__ */ React.createElement("div", { className: b("choose-other-btn") }, customAndExistTitle || locale.address.chooseAnotherAddress)));
|
|
11964
11964
|
};
|
|
11965
|
-
const defaultProps$
|
|
11965
|
+
const defaultProps$12 = {
|
|
11966
11966
|
modelValue: [],
|
|
11967
11967
|
type: "custom",
|
|
11968
11968
|
province: [],
|
|
@@ -11987,7 +11987,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11987
11987
|
onClose,
|
|
11988
11988
|
...rest
|
|
11989
11989
|
} = {
|
|
11990
|
-
...defaultProps$
|
|
11990
|
+
...defaultProps$12,
|
|
11991
11991
|
...props
|
|
11992
11992
|
};
|
|
11993
11993
|
const b = cn("address");
|
|
@@ -12156,28 +12156,28 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12156
12156
|
nextAreaList(item);
|
|
12157
12157
|
};
|
|
12158
12158
|
React.useEffect(() => {
|
|
12159
|
-
const { province: province2 } = { ...defaultProps$
|
|
12159
|
+
const { province: province2 } = { ...defaultProps$12, ...props };
|
|
12160
12160
|
setRegionList({
|
|
12161
12161
|
...regionList,
|
|
12162
12162
|
province: isCustom2() ? transformData(province2) : province2
|
|
12163
12163
|
});
|
|
12164
12164
|
}, [province]);
|
|
12165
12165
|
React.useEffect(() => {
|
|
12166
|
-
const { city: city2 } = { ...defaultProps$
|
|
12166
|
+
const { city: city2 } = { ...defaultProps$12, ...props };
|
|
12167
12167
|
setRegionList({
|
|
12168
12168
|
...regionList,
|
|
12169
12169
|
city: isCustom2() ? transformData(city2) : city2
|
|
12170
12170
|
});
|
|
12171
12171
|
}, [city]);
|
|
12172
12172
|
React.useEffect(() => {
|
|
12173
|
-
const { country: country2 } = { ...defaultProps$
|
|
12173
|
+
const { country: country2 } = { ...defaultProps$12, ...props };
|
|
12174
12174
|
setRegionList({
|
|
12175
12175
|
...regionList,
|
|
12176
12176
|
country: isCustom2() ? transformData(country2) : country2
|
|
12177
12177
|
});
|
|
12178
12178
|
}, [country]);
|
|
12179
12179
|
React.useEffect(() => {
|
|
12180
|
-
const { town: town2 } = { ...defaultProps$
|
|
12180
|
+
const { town: town2 } = { ...defaultProps$12, ...props };
|
|
12181
12181
|
setRegionList({
|
|
12182
12182
|
...regionList,
|
|
12183
12183
|
town: isCustom2() ? transformData(town2) : town2
|
|
@@ -12243,7 +12243,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12243
12243
|
}
|
|
12244
12244
|
)));
|
|
12245
12245
|
};
|
|
12246
|
-
const defaultProps$
|
|
12246
|
+
const defaultProps$11 = {
|
|
12247
12247
|
...ComponentDefaults,
|
|
12248
12248
|
modelValue: false,
|
|
12249
12249
|
modelSelect: [],
|
|
@@ -12294,7 +12294,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12294
12294
|
className,
|
|
12295
12295
|
...rest
|
|
12296
12296
|
} = {
|
|
12297
|
-
...defaultProps$
|
|
12297
|
+
...defaultProps$11,
|
|
12298
12298
|
...props
|
|
12299
12299
|
};
|
|
12300
12300
|
const b = cn("address");
|
|
@@ -12446,7 +12446,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12446
12446
|
)
|
|
12447
12447
|
));
|
|
12448
12448
|
};
|
|
12449
|
-
Address.defaultProps = defaultProps$
|
|
12449
|
+
Address.defaultProps = defaultProps$11;
|
|
12450
12450
|
Address.displayName = "NutAddress";
|
|
12451
12451
|
const Utils = {
|
|
12452
12452
|
/**
|
|
@@ -12566,7 +12566,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12566
12566
|
return false;
|
|
12567
12567
|
}
|
|
12568
12568
|
};
|
|
12569
|
-
const defaultProps$
|
|
12569
|
+
const defaultProps$10 = {
|
|
12570
12570
|
type: "one",
|
|
12571
12571
|
isAutoBackFill: false,
|
|
12572
12572
|
poppable: true,
|
|
@@ -12618,7 +12618,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12618
12618
|
onUpdate,
|
|
12619
12619
|
onSelected,
|
|
12620
12620
|
onYearMonthChange
|
|
12621
|
-
} = { ...defaultProps$
|
|
12621
|
+
} = { ...defaultProps$10, ...props };
|
|
12622
12622
|
const weeks = locale.calendaritem.weekdays;
|
|
12623
12623
|
const [yearMonthTitle, setYearMonthTitle] = React.useState("");
|
|
12624
12624
|
const [monthsData, setMonthsData] = React.useState([]);
|
|
@@ -13200,9 +13200,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13200
13200
|
))
|
|
13201
13201
|
), poppable && !isAutoBackFill ? /* @__PURE__ */ React.createElement("div", { className: "nut-calendar-footer" }, /* @__PURE__ */ React.createElement("div", { className: "calendar-confirm-btn", onClick: confirm2 }, confirmText || locale.confirm)) : ""));
|
|
13202
13202
|
});
|
|
13203
|
-
CalendarItem.defaultProps = defaultProps$
|
|
13203
|
+
CalendarItem.defaultProps = defaultProps$10;
|
|
13204
13204
|
CalendarItem.displayName = "NutCalendarItem";
|
|
13205
|
-
const defaultProps
|
|
13205
|
+
const defaultProps$$ = {
|
|
13206
13206
|
type: "one",
|
|
13207
13207
|
isAutoBackFill: false,
|
|
13208
13208
|
poppable: true,
|
|
@@ -13257,7 +13257,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13257
13257
|
onChoose,
|
|
13258
13258
|
onSelected,
|
|
13259
13259
|
onYearMonthChange
|
|
13260
|
-
} = { ...defaultProps
|
|
13260
|
+
} = { ...defaultProps$$, ...props };
|
|
13261
13261
|
const calendarRef = React.useRef(null);
|
|
13262
13262
|
const close = () => {
|
|
13263
13263
|
onClose && onClose();
|
|
@@ -13327,9 +13327,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13327
13327
|
renderItem()
|
|
13328
13328
|
) : renderItem());
|
|
13329
13329
|
});
|
|
13330
|
-
Calendar.defaultProps = defaultProps
|
|
13330
|
+
Calendar.defaultProps = defaultProps$$;
|
|
13331
13331
|
Calendar.displayName = "NutCalendar";
|
|
13332
|
-
const defaultProps
|
|
13332
|
+
const defaultProps$_ = {
|
|
13333
13333
|
data: {
|
|
13334
13334
|
text: "",
|
|
13335
13335
|
value: "",
|
|
@@ -13346,7 +13346,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13346
13346
|
};
|
|
13347
13347
|
const InternalCascaderItem = (props, ref) => {
|
|
13348
13348
|
const { data, checked, activeIcon, chooseItem, activeColor } = {
|
|
13349
|
-
...defaultProps
|
|
13349
|
+
...defaultProps$_,
|
|
13350
13350
|
...props
|
|
13351
13351
|
};
|
|
13352
13352
|
const classPrefix2 = "nut-cascader-item";
|
|
@@ -13388,7 +13388,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13388
13388
|
);
|
|
13389
13389
|
};
|
|
13390
13390
|
const CascaderItem = React.forwardRef(InternalCascaderItem);
|
|
13391
|
-
CascaderItem.defaultProps = defaultProps
|
|
13391
|
+
CascaderItem.defaultProps = defaultProps$_;
|
|
13392
13392
|
CascaderItem.displayName = "NutCascaderItem";
|
|
13393
13393
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
13394
13394
|
const {
|
|
@@ -13526,7 +13526,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13526
13526
|
}
|
|
13527
13527
|
}
|
|
13528
13528
|
const Tree$1 = Tree;
|
|
13529
|
-
const defaultProps$
|
|
13529
|
+
const defaultProps$Z = {
|
|
13530
13530
|
...ComponentDefaults,
|
|
13531
13531
|
activeColor: "",
|
|
13532
13532
|
activeIcon: "checklist",
|
|
@@ -13569,7 +13569,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13569
13569
|
onClose,
|
|
13570
13570
|
onChange,
|
|
13571
13571
|
onPathChange
|
|
13572
|
-
} = { ...defaultProps$
|
|
13572
|
+
} = { ...defaultProps$Z, ...props };
|
|
13573
13573
|
const [tabvalue, setTabvalue] = React.useState("c1");
|
|
13574
13574
|
const [optionsData, setOptionsData] = React.useState([]);
|
|
13575
13575
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -13831,11 +13831,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13831
13831
|
) : renderItem());
|
|
13832
13832
|
};
|
|
13833
13833
|
const Cascader = React.forwardRef(InternalCascader);
|
|
13834
|
-
Cascader.defaultProps = defaultProps$
|
|
13834
|
+
Cascader.defaultProps = defaultProps$Z;
|
|
13835
13835
|
Cascader.displayName = "NutCascader";
|
|
13836
13836
|
const CheckboxGroupContext = React.createContext(null);
|
|
13837
13837
|
const Context = CheckboxGroupContext;
|
|
13838
|
-
const defaultProps$
|
|
13838
|
+
const defaultProps$Y = {
|
|
13839
13839
|
max: void 0,
|
|
13840
13840
|
labelPosition: "right",
|
|
13841
13841
|
direction: "vertical",
|
|
@@ -13843,10 +13843,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13843
13843
|
},
|
|
13844
13844
|
options: []
|
|
13845
13845
|
};
|
|
13846
|
-
const classPrefix$
|
|
13846
|
+
const classPrefix$g = "nut-checkboxgroup";
|
|
13847
13847
|
const CheckboxGroup = React.forwardRef(
|
|
13848
13848
|
(props, ref) => {
|
|
13849
|
-
const { children } = { ...defaultProps$
|
|
13849
|
+
const { children } = { ...defaultProps$Y, ...props };
|
|
13850
13850
|
const {
|
|
13851
13851
|
className,
|
|
13852
13852
|
disabled,
|
|
@@ -13925,7 +13925,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13925
13925
|
/* @__PURE__ */ React.createElement(
|
|
13926
13926
|
"div",
|
|
13927
13927
|
{
|
|
13928
|
-
className: classNames(classPrefix$
|
|
13928
|
+
className: classNames(classPrefix$g, className, {
|
|
13929
13929
|
[`nut-checkboxgroup--${props.direction}`]: props.direction
|
|
13930
13930
|
}),
|
|
13931
13931
|
...rest
|
|
@@ -13935,9 +13935,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13935
13935
|
);
|
|
13936
13936
|
}
|
|
13937
13937
|
);
|
|
13938
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
13938
|
+
CheckboxGroup.defaultProps = defaultProps$Y;
|
|
13939
13939
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
13940
|
-
const defaultProps$
|
|
13940
|
+
const defaultProps$X = {
|
|
13941
13941
|
...ComponentDefaults,
|
|
13942
13942
|
disabled: false,
|
|
13943
13943
|
labelPosition: "right",
|
|
@@ -13947,10 +13947,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13947
13947
|
onChange: (value) => {
|
|
13948
13948
|
}
|
|
13949
13949
|
};
|
|
13950
|
-
const classPrefix$
|
|
13950
|
+
const classPrefix$f = "nut-checkbox";
|
|
13951
13951
|
const Checkbox = (props) => {
|
|
13952
13952
|
const { children } = {
|
|
13953
|
-
...defaultProps$
|
|
13953
|
+
...defaultProps$X,
|
|
13954
13954
|
...props
|
|
13955
13955
|
};
|
|
13956
13956
|
const {
|
|
@@ -14009,22 +14009,22 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14009
14009
|
};
|
|
14010
14010
|
const color = () => {
|
|
14011
14011
|
if (innerDisabled) {
|
|
14012
|
-
return `${classPrefix$
|
|
14012
|
+
return `${classPrefix$f}__icon--disable`;
|
|
14013
14013
|
}
|
|
14014
14014
|
if (innerChecked) {
|
|
14015
14015
|
if (innerIndeterminate) {
|
|
14016
|
-
return `${classPrefix$
|
|
14016
|
+
return `${classPrefix$f}__icon--indeterminate`;
|
|
14017
14017
|
}
|
|
14018
|
-
return `${classPrefix$
|
|
14018
|
+
return `${classPrefix$f}__icon`;
|
|
14019
14019
|
}
|
|
14020
|
-
return `${classPrefix$
|
|
14020
|
+
return `${classPrefix$f}__icon--unchecked`;
|
|
14021
14021
|
};
|
|
14022
14022
|
const renderLabel = () => {
|
|
14023
14023
|
return /* @__PURE__ */ React.createElement(
|
|
14024
14024
|
"span",
|
|
14025
14025
|
{
|
|
14026
|
-
className: classNames(`${classPrefix$
|
|
14027
|
-
[`${classPrefix$
|
|
14026
|
+
className: classNames(`${classPrefix$f}__label `, {
|
|
14027
|
+
[`${classPrefix$f}__label--disabled`]: innerDisabled
|
|
14028
14028
|
})
|
|
14029
14029
|
},
|
|
14030
14030
|
children || label
|
|
@@ -14043,8 +14043,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14043
14043
|
return /* @__PURE__ */ React.createElement(
|
|
14044
14044
|
"div",
|
|
14045
14045
|
{
|
|
14046
|
-
className: classNames(classPrefix$
|
|
14047
|
-
[`${classPrefix$
|
|
14046
|
+
className: classNames(classPrefix$f, className, {
|
|
14047
|
+
[`${classPrefix$f}--reverse`]: labelPosition === "left"
|
|
14048
14048
|
}),
|
|
14049
14049
|
...rest,
|
|
14050
14050
|
onClick: handleClick2
|
|
@@ -14053,7 +14053,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14053
14053
|
renderLabel()
|
|
14054
14054
|
);
|
|
14055
14055
|
};
|
|
14056
|
-
Checkbox.defaultProps = defaultProps$
|
|
14056
|
+
Checkbox.defaultProps = defaultProps$X;
|
|
14057
14057
|
Checkbox.displayName = "NutCheckBox";
|
|
14058
14058
|
Checkbox.Group = CheckboxGroup;
|
|
14059
14059
|
const MIN_DISTANCE = 10;
|
|
@@ -14347,7 +14347,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14347
14347
|
}, []);
|
|
14348
14348
|
return [refs.current, setRefs, reset];
|
|
14349
14349
|
}
|
|
14350
|
-
const defaultProps$
|
|
14350
|
+
const defaultProps$W = {
|
|
14351
14351
|
...ComponentDefaults,
|
|
14352
14352
|
visible: false,
|
|
14353
14353
|
title: "",
|
|
@@ -14374,7 +14374,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14374
14374
|
afterClose,
|
|
14375
14375
|
onChange,
|
|
14376
14376
|
...rest
|
|
14377
|
-
} = { ...defaultProps$
|
|
14377
|
+
} = { ...defaultProps$W, ...props };
|
|
14378
14378
|
const classPrefix2 = "nut-picker";
|
|
14379
14379
|
const classes = classNames(classPrefix2, className);
|
|
14380
14380
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -14549,7 +14549,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14549
14549
|
{
|
|
14550
14550
|
visible,
|
|
14551
14551
|
position: "bottom",
|
|
14552
|
-
|
|
14552
|
+
afterClose: () => {
|
|
14553
14553
|
closePicker();
|
|
14554
14554
|
}
|
|
14555
14555
|
},
|
|
@@ -14573,30 +14573,30 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14573
14573
|
const Picker = React.forwardRef(InternalPicker);
|
|
14574
14574
|
const Picker$1 = Picker;
|
|
14575
14575
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
14576
|
-
const defaultProps$
|
|
14577
|
-
|
|
14576
|
+
const defaultProps$V = {
|
|
14577
|
+
...ComponentDefaults,
|
|
14578
14578
|
visible: false,
|
|
14579
14579
|
title: "",
|
|
14580
14580
|
type: "date",
|
|
14581
|
-
|
|
14581
|
+
showChinese: false,
|
|
14582
14582
|
threeDimensional: true,
|
|
14583
14583
|
minuteStep: 1,
|
|
14584
|
-
|
|
14585
|
-
|
|
14584
|
+
startDate: new Date(currentYear - 10, 0, 1),
|
|
14585
|
+
endDate: new Date(currentYear + 10, 11, 31)
|
|
14586
14586
|
};
|
|
14587
14587
|
const DatePicker = (props) => {
|
|
14588
14588
|
const {
|
|
14589
|
-
|
|
14590
|
-
|
|
14589
|
+
startDate,
|
|
14590
|
+
endDate,
|
|
14591
14591
|
type: type2,
|
|
14592
|
-
|
|
14592
|
+
showChinese,
|
|
14593
14593
|
minuteStep,
|
|
14594
|
-
modelValue,
|
|
14595
14594
|
visible,
|
|
14596
14595
|
title,
|
|
14596
|
+
defaultValue,
|
|
14597
14597
|
formatter,
|
|
14598
|
-
|
|
14599
|
-
|
|
14598
|
+
onClose,
|
|
14599
|
+
onConfirm,
|
|
14600
14600
|
filter,
|
|
14601
14601
|
onChange,
|
|
14602
14602
|
threeDimensional,
|
|
@@ -14604,18 +14604,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14604
14604
|
style,
|
|
14605
14605
|
...rest
|
|
14606
14606
|
} = {
|
|
14607
|
-
...defaultProps$
|
|
14607
|
+
...defaultProps$V,
|
|
14608
14608
|
...props
|
|
14609
14609
|
};
|
|
14610
14610
|
const { locale } = useConfig();
|
|
14611
|
-
const [show2, setShow] = React.useState(false);
|
|
14612
|
-
const [currentDate, setCurrentDate] = React.useState(modelValue);
|
|
14613
|
-
const [defaultValue, setDefaultValue] = React.useState([]);
|
|
14614
|
-
const [options2, setListData] = React.useState([]);
|
|
14615
|
-
const pickerRef = React.useRef(null);
|
|
14616
|
-
const isDate = (val) => {
|
|
14617
|
-
return Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
|
|
14618
|
-
};
|
|
14619
14611
|
const datepickerLang = locale.datepicker;
|
|
14620
14612
|
const zhCNType = {
|
|
14621
14613
|
day: datepickerLang.day,
|
|
@@ -14625,20 +14617,32 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14625
14617
|
minute: datepickerLang.min,
|
|
14626
14618
|
seconds: datepickerLang.seconds
|
|
14627
14619
|
};
|
|
14620
|
+
const [defaultValueOfPicker, setDefaultValueOfPicker] = React.useState([]);
|
|
14621
|
+
const [options2, setOptions] = React.useState([]);
|
|
14622
|
+
const isDate = (val) => {
|
|
14623
|
+
return Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
|
|
14624
|
+
};
|
|
14628
14625
|
const formatValue = (value) => {
|
|
14629
14626
|
let cvalue = value;
|
|
14630
14627
|
if (!cvalue || cvalue && !isDate(cvalue)) {
|
|
14631
|
-
cvalue =
|
|
14628
|
+
cvalue = startDate;
|
|
14632
14629
|
}
|
|
14633
|
-
let timestmp = Math.max(cvalue.getTime(),
|
|
14634
|
-
timestmp = Math.min(timestmp,
|
|
14630
|
+
let timestmp = Math.max(cvalue.getTime(), startDate.getTime());
|
|
14631
|
+
timestmp = Math.min(timestmp, endDate.getTime());
|
|
14635
14632
|
return new Date(timestmp);
|
|
14636
14633
|
};
|
|
14634
|
+
const [currentDate, setCurrentDate] = usePropsValue({
|
|
14635
|
+
value: props.value && formatValue(props.value),
|
|
14636
|
+
defaultValue: formatValue(props.defaultValue || null),
|
|
14637
|
+
finalValue: null,
|
|
14638
|
+
onChange: (val) => {
|
|
14639
|
+
}
|
|
14640
|
+
});
|
|
14637
14641
|
function getMonthEndDay(year, month) {
|
|
14638
14642
|
return new Date(year, month, 0).getDate();
|
|
14639
14643
|
}
|
|
14640
14644
|
const getBoundary = (type22, value) => {
|
|
14641
|
-
const boundary = type22 === "min" ?
|
|
14645
|
+
const boundary = type22 === "min" ? startDate : endDate;
|
|
14642
14646
|
const year = boundary.getFullYear();
|
|
14643
14647
|
let month = 1;
|
|
14644
14648
|
let date2 = 1;
|
|
@@ -14672,12 +14676,12 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14672
14676
|
[`${type22}Seconds`]: seconds
|
|
14673
14677
|
};
|
|
14674
14678
|
};
|
|
14675
|
-
const ranges = (
|
|
14676
|
-
const curDate =
|
|
14679
|
+
const ranges = () => {
|
|
14680
|
+
const curDate = currentDate;
|
|
14677
14681
|
if (!curDate)
|
|
14678
14682
|
return [];
|
|
14679
|
-
const { maxYear, maxDate
|
|
14680
|
-
const { minYear, minDate
|
|
14683
|
+
const { maxYear, maxDate, maxMonth, maxHour, maxMinute, maxSeconds } = getBoundary("max", curDate);
|
|
14684
|
+
const { minYear, minDate, minMonth, minHour, minMinute, minSeconds } = getBoundary("min", curDate);
|
|
14681
14685
|
let result = [
|
|
14682
14686
|
{
|
|
14683
14687
|
type: "year",
|
|
@@ -14689,7 +14693,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14689
14693
|
},
|
|
14690
14694
|
{
|
|
14691
14695
|
type: "day",
|
|
14692
|
-
range: [
|
|
14696
|
+
range: [minDate, maxDate]
|
|
14693
14697
|
},
|
|
14694
14698
|
{
|
|
14695
14699
|
type: "hour",
|
|
@@ -14729,7 +14733,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14729
14733
|
}
|
|
14730
14734
|
return result;
|
|
14731
14735
|
};
|
|
14732
|
-
const updateChooseValueCustmer = (
|
|
14736
|
+
const updateChooseValueCustmer = (selectedOptions, selectedValue, index) => {
|
|
14733
14737
|
if (["date", "datetime", "datehour", "month-day", "year-month"].includes(
|
|
14734
14738
|
type2.toLocaleLowerCase()
|
|
14735
14739
|
)) {
|
|
@@ -14739,11 +14743,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14739
14743
|
});
|
|
14740
14744
|
if (type2.toLocaleLowerCase() === "month-day" && formatDate.length < 3) {
|
|
14741
14745
|
formatDate.unshift(
|
|
14742
|
-
new Date(
|
|
14746
|
+
new Date(defaultValue || startDate || endDate).getFullYear()
|
|
14743
14747
|
);
|
|
14744
14748
|
}
|
|
14745
14749
|
if (type2.toLocaleLowerCase() === "year-month" && formatDate.length < 3) {
|
|
14746
|
-
formatDate.push(
|
|
14750
|
+
formatDate.push(
|
|
14751
|
+
new Date(defaultValue || startDate || endDate).getDate()
|
|
14752
|
+
);
|
|
14747
14753
|
}
|
|
14748
14754
|
const year = Number(formatDate[0]);
|
|
14749
14755
|
const month = Number(formatDate[1]) - 1;
|
|
@@ -14768,7 +14774,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14768
14774
|
const isEqual2 = (currentDate == null ? void 0 : currentDate.getTime()) === (date2 == null ? void 0 : date2.getTime());
|
|
14769
14775
|
date2 && isDate(date2) && !isEqual2 && setCurrentDate(formatValue(date2));
|
|
14770
14776
|
}
|
|
14771
|
-
props.onChange && props.onChange(
|
|
14777
|
+
props.onChange && props.onChange(selectedOptions, selectedValue, index);
|
|
14772
14778
|
};
|
|
14773
14779
|
const padZero = (num, targetLength = 2) => {
|
|
14774
14780
|
let str = `${num}`;
|
|
@@ -14786,12 +14792,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14786
14792
|
});
|
|
14787
14793
|
} else {
|
|
14788
14794
|
const padMin = padZero(value, 2);
|
|
14789
|
-
const fatter =
|
|
14795
|
+
const fatter = showChinese ? zhCNType[type22] : "";
|
|
14790
14796
|
fOption = { text: padMin + fatter, value: padMin };
|
|
14791
14797
|
}
|
|
14792
14798
|
return fOption;
|
|
14793
14799
|
};
|
|
14794
14800
|
const generateValue = (min, max, val, type22, columnIndex) => {
|
|
14801
|
+
var _a2;
|
|
14795
14802
|
let cmin = min;
|
|
14796
14803
|
const arr = [];
|
|
14797
14804
|
let index = 0;
|
|
@@ -14806,8 +14813,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14806
14813
|
index++;
|
|
14807
14814
|
}
|
|
14808
14815
|
}
|
|
14809
|
-
|
|
14810
|
-
|
|
14816
|
+
defaultValueOfPicker[columnIndex] = (_a2 = arr[index]) == null ? void 0 : _a2.value;
|
|
14817
|
+
setDefaultValueOfPicker([...defaultValueOfPicker]);
|
|
14811
14818
|
if (props.filter && props.filter(type22, arr)) {
|
|
14812
14819
|
return props.filter(type22, arr);
|
|
14813
14820
|
}
|
|
@@ -14832,8 +14839,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14832
14839
|
}
|
|
14833
14840
|
return d;
|
|
14834
14841
|
};
|
|
14835
|
-
const columns = (
|
|
14836
|
-
const val = ranges(
|
|
14842
|
+
const columns = () => {
|
|
14843
|
+
const val = ranges().map((res, columnIndex) => {
|
|
14837
14844
|
return generateValue(
|
|
14838
14845
|
res.range[0],
|
|
14839
14846
|
res.range[1],
|
|
@@ -14844,44 +14851,26 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14844
14851
|
});
|
|
14845
14852
|
return val || [];
|
|
14846
14853
|
};
|
|
14847
|
-
React.useEffect(() => {
|
|
14848
|
-
setCurrentDate(formatValue(modelValue));
|
|
14849
|
-
}, []);
|
|
14850
|
-
React.useEffect(() => {
|
|
14851
|
-
setCurrentDate(formatValue(modelValue));
|
|
14852
|
-
}, [modelValue]);
|
|
14853
|
-
React.useEffect(() => {
|
|
14854
|
-
setShow(visible);
|
|
14855
|
-
}, [visible]);
|
|
14856
14854
|
React.useEffect(() => {
|
|
14857
14855
|
if (currentDate) {
|
|
14858
|
-
|
|
14856
|
+
setOptions(columns());
|
|
14859
14857
|
}
|
|
14860
|
-
}, [
|
|
14861
|
-
return /* @__PURE__ */ React.createElement(
|
|
14862
|
-
|
|
14858
|
+
}, []);
|
|
14859
|
+
return /* @__PURE__ */ React.createElement("div", { className: `nut-datepicker ${className}`, style, ...rest }, options2.length && /* @__PURE__ */ React.createElement(
|
|
14860
|
+
Picker$1,
|
|
14863
14861
|
{
|
|
14864
|
-
|
|
14865
|
-
|
|
14866
|
-
|
|
14867
|
-
|
|
14868
|
-
|
|
14869
|
-
|
|
14870
|
-
|
|
14871
|
-
|
|
14872
|
-
|
|
14873
|
-
|
|
14874
|
-
onClose: onCloseDatePicker,
|
|
14875
|
-
defaultValue,
|
|
14876
|
-
onConfirm: (options22, values) => onConfirmDatePicker && onConfirmDatePicker(options22, values),
|
|
14877
|
-
onChange: (list, value, index) => updateChooseValueCustmer(list, value, index),
|
|
14878
|
-
threeDimensional,
|
|
14879
|
-
ref: pickerRef
|
|
14880
|
-
}
|
|
14881
|
-
)
|
|
14882
|
-
);
|
|
14862
|
+
title,
|
|
14863
|
+
visible,
|
|
14864
|
+
options: options2,
|
|
14865
|
+
onClose,
|
|
14866
|
+
defaultValue: defaultValueOfPicker,
|
|
14867
|
+
onConfirm: (options22, value) => onConfirm && onConfirm(options22, value),
|
|
14868
|
+
onChange: (options22, value, index) => updateChooseValueCustmer(options22, value, index),
|
|
14869
|
+
threeDimensional
|
|
14870
|
+
}
|
|
14871
|
+
));
|
|
14883
14872
|
};
|
|
14884
|
-
DatePicker.defaultProps = defaultProps$
|
|
14873
|
+
DatePicker.defaultProps = defaultProps$V;
|
|
14885
14874
|
DatePicker.displayName = "NutDatePicker";
|
|
14886
14875
|
const FormItemContext = React.createContext({});
|
|
14887
14876
|
function _extends() {
|
|
@@ -16072,7 +16061,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16072
16061
|
}
|
|
16073
16062
|
return [formRef.current];
|
|
16074
16063
|
};
|
|
16075
|
-
const defaultProps$
|
|
16064
|
+
const defaultProps$U = {
|
|
16076
16065
|
...ComponentDefaults,
|
|
16077
16066
|
name: "",
|
|
16078
16067
|
label: "",
|
|
@@ -16134,7 +16123,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16134
16123
|
showErrorLine,
|
|
16135
16124
|
showErrorMessage
|
|
16136
16125
|
} = {
|
|
16137
|
-
...defaultProps$
|
|
16126
|
+
...defaultProps$U,
|
|
16138
16127
|
...this.props
|
|
16139
16128
|
};
|
|
16140
16129
|
const item = ((_a2 = this.context.errList) == null ? void 0 : _a2.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
@@ -16189,9 +16178,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16189
16178
|
return this.renderLayout(returnChildNode);
|
|
16190
16179
|
}
|
|
16191
16180
|
}
|
|
16192
|
-
__publicField(FormItem, "defaultProps", defaultProps$
|
|
16181
|
+
__publicField(FormItem, "defaultProps", defaultProps$U);
|
|
16193
16182
|
__publicField(FormItem, "contextType", FormItemContext);
|
|
16194
|
-
const defaultProps$
|
|
16183
|
+
const defaultProps$T = {
|
|
16195
16184
|
...ComponentDefaults,
|
|
16196
16185
|
className: "",
|
|
16197
16186
|
style: void 0,
|
|
@@ -16219,7 +16208,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16219
16208
|
form,
|
|
16220
16209
|
...rest
|
|
16221
16210
|
} = {
|
|
16222
|
-
...defaultProps$
|
|
16211
|
+
...defaultProps$T,
|
|
16223
16212
|
...props
|
|
16224
16213
|
};
|
|
16225
16214
|
let formInstance = {};
|
|
@@ -16251,7 +16240,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16251
16240
|
/* @__PURE__ */ React.createElement(CellGroup, null, /* @__PURE__ */ React.createElement(FormItemContext.Provider, { value: formInstance }, children))
|
|
16252
16241
|
);
|
|
16253
16242
|
};
|
|
16254
|
-
Form.defaultProps = defaultProps$
|
|
16243
|
+
Form.defaultProps = defaultProps$T;
|
|
16255
16244
|
Form.displayName = "NutForm";
|
|
16256
16245
|
Form.Item = FormItem;
|
|
16257
16246
|
Form.useForm = useForm;
|
|
@@ -16279,7 +16268,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16279
16268
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
16280
16269
|
return value.replace(regExp, "");
|
|
16281
16270
|
}
|
|
16282
|
-
const defaultProps$
|
|
16271
|
+
const defaultProps$S = {
|
|
16283
16272
|
...ComponentDefaults,
|
|
16284
16273
|
type: "text",
|
|
16285
16274
|
name: "",
|
|
@@ -16322,7 +16311,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16322
16311
|
value: _value,
|
|
16323
16312
|
...rest
|
|
16324
16313
|
} = {
|
|
16325
|
-
...defaultProps$
|
|
16314
|
+
...defaultProps$S,
|
|
16326
16315
|
...props
|
|
16327
16316
|
};
|
|
16328
16317
|
const [value, setValue] = usePropsValue({
|
|
@@ -16457,9 +16446,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16457
16446
|
);
|
|
16458
16447
|
}
|
|
16459
16448
|
);
|
|
16460
|
-
Input.defaultProps = defaultProps$
|
|
16449
|
+
Input.defaultProps = defaultProps$S;
|
|
16461
16450
|
Input.displayName = "NutInput";
|
|
16462
|
-
const defaultProps$
|
|
16451
|
+
const defaultProps$R = {
|
|
16463
16452
|
...ComponentDefaults,
|
|
16464
16453
|
disabled: false,
|
|
16465
16454
|
min: 1,
|
|
@@ -16471,7 +16460,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16471
16460
|
digits: 0,
|
|
16472
16461
|
async: false
|
|
16473
16462
|
};
|
|
16474
|
-
const classPrefix$
|
|
16463
|
+
const classPrefix$e = `nut-inputnumber`;
|
|
16475
16464
|
const InputNumber = (props) => {
|
|
16476
16465
|
const {
|
|
16477
16466
|
children,
|
|
@@ -16496,7 +16485,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16496
16485
|
onChange,
|
|
16497
16486
|
...restProps
|
|
16498
16487
|
} = {
|
|
16499
|
-
...defaultProps$
|
|
16488
|
+
...defaultProps$R,
|
|
16500
16489
|
...props
|
|
16501
16490
|
};
|
|
16502
16491
|
const inputRef = React.useRef("");
|
|
@@ -16514,8 +16503,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16514
16503
|
}, []);
|
|
16515
16504
|
const classes = classNames(
|
|
16516
16505
|
{
|
|
16517
|
-
[`${classPrefix$
|
|
16518
|
-
[`${classPrefix$
|
|
16506
|
+
[`${classPrefix$e}`]: true,
|
|
16507
|
+
[`${classPrefix$e}--disabled`]: disabled
|
|
16519
16508
|
},
|
|
16520
16509
|
className
|
|
16521
16510
|
);
|
|
@@ -16693,9 +16682,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16693
16682
|
}
|
|
16694
16683
|
)), /* @__PURE__ */ React.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React.createElement(y$4, { className: iconAddClasses, onClick: (e) => addNumber(e) })));
|
|
16695
16684
|
};
|
|
16696
|
-
InputNumber.defaultProps = defaultProps$
|
|
16685
|
+
InputNumber.defaultProps = defaultProps$R;
|
|
16697
16686
|
InputNumber.displayName = "NutInputNumber";
|
|
16698
|
-
const defaultProps$
|
|
16687
|
+
const defaultProps$Q = {
|
|
16699
16688
|
...ComponentDefaults,
|
|
16700
16689
|
activeColor: "",
|
|
16701
16690
|
closeOnOverlayClick: true,
|
|
@@ -16714,7 +16703,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16714
16703
|
activeColor,
|
|
16715
16704
|
...rest
|
|
16716
16705
|
} = {
|
|
16717
|
-
...defaultProps$
|
|
16706
|
+
...defaultProps$Q,
|
|
16718
16707
|
...props
|
|
16719
16708
|
};
|
|
16720
16709
|
const menuRef = React.useRef(null);
|
|
@@ -16745,6 +16734,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16745
16734
|
};
|
|
16746
16735
|
const hideMenuItem = (index) => {
|
|
16747
16736
|
showMenuItem[index] = false;
|
|
16737
|
+
console.log([...showMenuItem]);
|
|
16748
16738
|
setShowMenuItem([...showMenuItem]);
|
|
16749
16739
|
};
|
|
16750
16740
|
const updateTitle = (text, index) => {
|
|
@@ -16754,6 +16744,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16754
16744
|
const cloneChildren = () => {
|
|
16755
16745
|
return React.Children.map(children, (child, index) => {
|
|
16756
16746
|
return React.cloneElement(child, {
|
|
16747
|
+
...child.props,
|
|
16757
16748
|
show: showMenuItem[index],
|
|
16758
16749
|
index,
|
|
16759
16750
|
activeColor,
|
|
@@ -16793,7 +16784,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16793
16784
|
}),
|
|
16794
16785
|
style: { color: showMenuItem[index] ? activeColor : "" },
|
|
16795
16786
|
key: index,
|
|
16796
|
-
onClick: () => {
|
|
16787
|
+
onClick: (e) => {
|
|
16788
|
+
e.stopPropagation();
|
|
16797
16789
|
!disabled && toggleMenuItem(index);
|
|
16798
16790
|
}
|
|
16799
16791
|
},
|
|
@@ -16833,14 +16825,61 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16833
16825
|
), cloneChildren())
|
|
16834
16826
|
);
|
|
16835
16827
|
};
|
|
16836
|
-
Menu.defaultProps = defaultProps$
|
|
16828
|
+
Menu.defaultProps = defaultProps$Q;
|
|
16837
16829
|
Menu.displayName = "NutMenu";
|
|
16838
|
-
const
|
|
16830
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
|
16831
|
+
const isFunction = (val) => typeof val === "function";
|
|
16832
|
+
const isPromise = (val) => {
|
|
16833
|
+
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
16834
|
+
};
|
|
16835
|
+
const upperCaseFirst = (str) => {
|
|
16836
|
+
var str = str.toLowerCase();
|
|
16837
|
+
str = str.replace(
|
|
16838
|
+
/\b\w+\b/g,
|
|
16839
|
+
(word) => word.substring(0, 1).toUpperCase() + word.substring(1)
|
|
16840
|
+
);
|
|
16841
|
+
return str;
|
|
16842
|
+
};
|
|
16843
|
+
const getTargetElement = (target) => {
|
|
16844
|
+
let targetElement;
|
|
16845
|
+
if (isFunction(target)) {
|
|
16846
|
+
targetElement = target();
|
|
16847
|
+
} else if ("current" in target) {
|
|
16848
|
+
targetElement = target.current;
|
|
16849
|
+
} else {
|
|
16850
|
+
targetElement = target;
|
|
16851
|
+
}
|
|
16852
|
+
return targetElement;
|
|
16853
|
+
};
|
|
16854
|
+
function useClickAway(onClickAway, target, eventName = "click", isListener, outerVar) {
|
|
16855
|
+
const handler = (event) => {
|
|
16856
|
+
const targets = Array.isArray(target) ? target : [target];
|
|
16857
|
+
if (targets.some((item) => {
|
|
16858
|
+
const targetElement = getTargetElement(item);
|
|
16859
|
+
return !targetElement || targetElement.contains(event.target);
|
|
16860
|
+
})) {
|
|
16861
|
+
return;
|
|
16862
|
+
}
|
|
16863
|
+
if (outerVar) {
|
|
16864
|
+
onClickAway();
|
|
16865
|
+
}
|
|
16866
|
+
};
|
|
16867
|
+
React.useEffect(() => {
|
|
16868
|
+
if (isListener) {
|
|
16869
|
+
window.addEventListener(eventName, handler, false);
|
|
16870
|
+
} else {
|
|
16871
|
+
window.removeEventListener(eventName, handler, false);
|
|
16872
|
+
}
|
|
16873
|
+
return () => {
|
|
16874
|
+
window.removeEventListener(eventName, handler, true);
|
|
16875
|
+
};
|
|
16876
|
+
}, [target]);
|
|
16877
|
+
}
|
|
16878
|
+
const defaultProps$P = {
|
|
16839
16879
|
...ComponentDefaults,
|
|
16840
16880
|
columns: 1,
|
|
16841
16881
|
direction: "down",
|
|
16842
16882
|
icon: null,
|
|
16843
|
-
closeOnClickAway: false,
|
|
16844
16883
|
activeTitleClass: "",
|
|
16845
16884
|
inactiveTitleClass: "",
|
|
16846
16885
|
onChange: (value) => void 0
|
|
@@ -16865,7 +16904,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16865
16904
|
parent,
|
|
16866
16905
|
index
|
|
16867
16906
|
} = {
|
|
16868
|
-
...defaultProps$
|
|
16907
|
+
...defaultProps$P,
|
|
16869
16908
|
...props
|
|
16870
16909
|
};
|
|
16871
16910
|
const [_showPopup, setShowPopup] = React.useState(show2);
|
|
@@ -16873,9 +16912,6 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16873
16912
|
React.useEffect(() => {
|
|
16874
16913
|
setShowPopup(show2);
|
|
16875
16914
|
}, [show2]);
|
|
16876
|
-
React.useEffect(() => {
|
|
16877
|
-
getParentOffset();
|
|
16878
|
-
}, [_showPopup]);
|
|
16879
16915
|
React.useImperativeHandle(ref, () => ({
|
|
16880
16916
|
toggle: parent.toggleMenuItem
|
|
16881
16917
|
}));
|
|
@@ -16896,123 +16932,112 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16896
16932
|
setValue(item.value);
|
|
16897
16933
|
onChange && onChange(item);
|
|
16898
16934
|
};
|
|
16899
|
-
const [position, setPosition] = React.useState({
|
|
16900
|
-
top: 0,
|
|
16901
|
-
height: 0
|
|
16902
|
-
});
|
|
16903
|
-
const getParentOffset = () => {
|
|
16904
|
-
setTimeout(() => {
|
|
16905
|
-
const p = parent.menuRef.current;
|
|
16906
|
-
const rect = p.getBoundingClientRect();
|
|
16907
|
-
setPosition({
|
|
16908
|
-
height: rect.height,
|
|
16909
|
-
top: rect.top
|
|
16910
|
-
});
|
|
16911
|
-
});
|
|
16912
|
-
};
|
|
16913
16935
|
const isShow = () => {
|
|
16914
16936
|
if (_showPopup)
|
|
16915
16937
|
return {};
|
|
16916
16938
|
return { display: "none" };
|
|
16917
16939
|
};
|
|
16918
16940
|
const getPosition = () => {
|
|
16919
|
-
return direction === "down" ? {
|
|
16920
|
-
|
|
16921
|
-
|
|
16922
|
-
if (direction === "down") {
|
|
16923
|
-
return {
|
|
16924
|
-
height: `${position.top + position.height}px`,
|
|
16925
|
-
top: 0,
|
|
16926
|
-
...isShow()
|
|
16927
|
-
};
|
|
16928
|
-
}
|
|
16929
|
-
return {
|
|
16930
|
-
height: `${window.innerHeight - position.top}px`,
|
|
16931
|
-
bottom: `0px`,
|
|
16941
|
+
return direction === "down" ? { position: "absolute", height: `${window.innerHeight}px` } : {
|
|
16942
|
+
position: "absolute",
|
|
16943
|
+
bottom: "100%",
|
|
16932
16944
|
top: "auto",
|
|
16933
|
-
|
|
16945
|
+
height: `${window.innerHeight}px`
|
|
16934
16946
|
};
|
|
16935
16947
|
};
|
|
16936
|
-
|
|
16937
|
-
|
|
16938
|
-
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
-
|
|
16945
|
-
|
|
16946
|
-
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
-
|
|
16950
|
-
lockScroll: parent.lockScroll,
|
|
16951
|
-
visible: _showPopup,
|
|
16952
|
-
closeOnOverlayClick: parent.closeOnOverlayClick,
|
|
16953
|
-
onClick: () => {
|
|
16954
|
-
parent.closeOnOverlayClick && parent.toggleMenuItem(index);
|
|
16955
|
-
}
|
|
16956
|
-
}
|
|
16957
|
-
), /* @__PURE__ */ React.createElement(
|
|
16948
|
+
const micRef = React.useRef(null);
|
|
16949
|
+
const targetSet = [micRef.current];
|
|
16950
|
+
useClickAway(
|
|
16951
|
+
() => {
|
|
16952
|
+
parent.hideMenuItem(index);
|
|
16953
|
+
},
|
|
16954
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
16955
|
+
// @ts-ignore
|
|
16956
|
+
targetSet,
|
|
16957
|
+
"click",
|
|
16958
|
+
_showPopup,
|
|
16959
|
+
closeOnClickAway
|
|
16960
|
+
);
|
|
16961
|
+
return /* @__PURE__ */ React.createElement(
|
|
16958
16962
|
"div",
|
|
16959
16963
|
{
|
|
16960
|
-
className:
|
|
16961
|
-
|
|
16962
|
-
|
|
16963
|
-
}),
|
|
16964
|
-
style: {
|
|
16965
|
-
...style,
|
|
16966
|
-
...isShow()
|
|
16967
|
-
}
|
|
16964
|
+
className: "nut-menu-item-container",
|
|
16965
|
+
ref: micRef,
|
|
16966
|
+
style: { position: "absolute", left: 0, right: 0 }
|
|
16968
16967
|
},
|
|
16969
16968
|
/* @__PURE__ */ React.createElement(
|
|
16970
|
-
|
|
16969
|
+
Overlay,
|
|
16971
16970
|
{
|
|
16972
|
-
|
|
16973
|
-
|
|
16974
|
-
|
|
16971
|
+
className: "nut-menu__overlay",
|
|
16972
|
+
style: getPosition(),
|
|
16973
|
+
lockScroll: parent.lockScroll,
|
|
16974
|
+
visible: _showPopup,
|
|
16975
|
+
closeOnOverlayClick: parent.closeOnOverlayClick,
|
|
16976
|
+
onClick: () => {
|
|
16977
|
+
parent.closeOnOverlayClick && parent.toggleMenuItem(index);
|
|
16978
|
+
}
|
|
16979
|
+
}
|
|
16980
|
+
),
|
|
16981
|
+
/* @__PURE__ */ React.createElement(
|
|
16982
|
+
"div",
|
|
16983
|
+
{
|
|
16984
|
+
className: classNames(className, {
|
|
16985
|
+
"nut-menu-item__wrap": direction === "down",
|
|
16986
|
+
"nut-menu-item__wrap-up": direction !== "down"
|
|
16987
|
+
}),
|
|
16988
|
+
style: {
|
|
16989
|
+
...style,
|
|
16990
|
+
...isShow()
|
|
16991
|
+
}
|
|
16975
16992
|
},
|
|
16976
|
-
/* @__PURE__ */ React.createElement(
|
|
16977
|
-
|
|
16978
|
-
|
|
16979
|
-
|
|
16980
|
-
|
|
16981
|
-
|
|
16982
|
-
|
|
16983
|
-
|
|
16984
|
-
|
|
16985
|
-
flexBasis: `${100 / columns}%`
|
|
16986
|
-
},
|
|
16987
|
-
onClick: () => {
|
|
16988
|
-
handleClick2(item);
|
|
16989
|
-
}
|
|
16990
|
-
},
|
|
16991
|
-
item.value === _value ? /* @__PURE__ */ React.createElement("i", null, icon || /* @__PURE__ */ React.createElement(
|
|
16992
|
-
x$f,
|
|
16993
|
-
{
|
|
16994
|
-
color: activeColor,
|
|
16995
|
-
className: getIconCName(item.value, value)
|
|
16996
|
-
}
|
|
16997
|
-
)) : null,
|
|
16998
|
-
/* @__PURE__ */ React.createElement(
|
|
16993
|
+
/* @__PURE__ */ React.createElement(
|
|
16994
|
+
CSSTransition$1,
|
|
16995
|
+
{
|
|
16996
|
+
in: _showPopup,
|
|
16997
|
+
timeout: 100,
|
|
16998
|
+
classNames: direction === "down" ? "menu-item" : "menu-item-up"
|
|
16999
|
+
},
|
|
17000
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-menu-item__content" }, options2 == null ? void 0 : options2.map((item) => {
|
|
17001
|
+
return /* @__PURE__ */ React.createElement(
|
|
16999
17002
|
"div",
|
|
17000
17003
|
{
|
|
17001
|
-
className:
|
|
17004
|
+
className: `nut-menu-item__option ${classNames({
|
|
17005
|
+
active: item.value === _value
|
|
17006
|
+
})}`,
|
|
17007
|
+
key: item.text,
|
|
17002
17008
|
style: {
|
|
17003
|
-
|
|
17009
|
+
flexBasis: `${100 / columns}%`
|
|
17010
|
+
},
|
|
17011
|
+
onClick: () => {
|
|
17012
|
+
handleClick2(item);
|
|
17004
17013
|
}
|
|
17005
17014
|
},
|
|
17006
|
-
item.
|
|
17007
|
-
|
|
17008
|
-
|
|
17009
|
-
|
|
17015
|
+
item.value === _value ? /* @__PURE__ */ React.createElement("i", null, icon || /* @__PURE__ */ React.createElement(
|
|
17016
|
+
x$f,
|
|
17017
|
+
{
|
|
17018
|
+
color: activeColor,
|
|
17019
|
+
className: getIconCName(item.value, value)
|
|
17020
|
+
}
|
|
17021
|
+
)) : null,
|
|
17022
|
+
/* @__PURE__ */ React.createElement(
|
|
17023
|
+
"div",
|
|
17024
|
+
{
|
|
17025
|
+
className: getIconCName(item.value, value),
|
|
17026
|
+
style: {
|
|
17027
|
+
color: `${item.value === _value ? activeColor : ""}`
|
|
17028
|
+
}
|
|
17029
|
+
},
|
|
17030
|
+
item.text
|
|
17031
|
+
)
|
|
17032
|
+
);
|
|
17033
|
+
}), children)
|
|
17034
|
+
)
|
|
17010
17035
|
)
|
|
17011
|
-
)
|
|
17036
|
+
);
|
|
17012
17037
|
});
|
|
17013
|
-
MenuItem.defaultProps = defaultProps$
|
|
17038
|
+
MenuItem.defaultProps = defaultProps$P;
|
|
17014
17039
|
MenuItem.displayName = "NutMenuItem";
|
|
17015
|
-
const defaultProps$
|
|
17040
|
+
const defaultProps$O = {
|
|
17016
17041
|
...ComponentDefaults,
|
|
17017
17042
|
visible: false,
|
|
17018
17043
|
type: "default",
|
|
@@ -17163,17 +17188,17 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17163
17188
|
))))
|
|
17164
17189
|
);
|
|
17165
17190
|
};
|
|
17166
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
17191
|
+
NumberKeyboard.defaultProps = defaultProps$O;
|
|
17167
17192
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
17168
17193
|
const RadioContext = React.createContext(null);
|
|
17169
|
-
const defaultProps$
|
|
17194
|
+
const defaultProps$N = {
|
|
17170
17195
|
labelPosition: "right",
|
|
17171
17196
|
onChange: (value) => {
|
|
17172
17197
|
},
|
|
17173
17198
|
direction: "vertical",
|
|
17174
17199
|
options: []
|
|
17175
17200
|
};
|
|
17176
|
-
const classPrefix$
|
|
17201
|
+
const classPrefix$d = "nut-radiogroup";
|
|
17177
17202
|
const RadioGroup = React.forwardRef(
|
|
17178
17203
|
(props, ref) => {
|
|
17179
17204
|
const {
|
|
@@ -17187,7 +17212,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17187
17212
|
options: options2,
|
|
17188
17213
|
disabled,
|
|
17189
17214
|
...rest
|
|
17190
|
-
} = { ...defaultProps$
|
|
17215
|
+
} = { ...defaultProps$N, ...props };
|
|
17191
17216
|
const [val2State, setVal2State] = usePropsValue({
|
|
17192
17217
|
defaultValue: props.defaultValue,
|
|
17193
17218
|
value: props.value,
|
|
@@ -17229,8 +17254,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17229
17254
|
/* @__PURE__ */ React.createElement(
|
|
17230
17255
|
"div",
|
|
17231
17256
|
{
|
|
17232
|
-
className: classNames(classPrefix$
|
|
17233
|
-
[`${classPrefix$
|
|
17257
|
+
className: classNames(classPrefix$d, className, {
|
|
17258
|
+
[`${classPrefix$d}--${props.direction}`]: props.direction
|
|
17234
17259
|
}),
|
|
17235
17260
|
...rest
|
|
17236
17261
|
},
|
|
@@ -17239,9 +17264,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17239
17264
|
);
|
|
17240
17265
|
}
|
|
17241
17266
|
);
|
|
17242
|
-
RadioGroup.defaultProps = defaultProps$
|
|
17267
|
+
RadioGroup.defaultProps = defaultProps$N;
|
|
17243
17268
|
RadioGroup.displayName = "NutRadioGroup";
|
|
17244
|
-
const defaultProps$
|
|
17269
|
+
const defaultProps$M = {
|
|
17245
17270
|
...ComponentDefaults,
|
|
17246
17271
|
disabled: false,
|
|
17247
17272
|
shape: "round",
|
|
@@ -17267,7 +17292,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17267
17292
|
onChange,
|
|
17268
17293
|
...others
|
|
17269
17294
|
} = {
|
|
17270
|
-
...defaultProps$
|
|
17295
|
+
...defaultProps$M,
|
|
17271
17296
|
...props
|
|
17272
17297
|
};
|
|
17273
17298
|
let { labelPosition, disabled, ...rest } = others;
|
|
@@ -17363,10 +17388,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17363
17388
|
renderRadioItem()
|
|
17364
17389
|
);
|
|
17365
17390
|
};
|
|
17366
|
-
Radio.defaultProps = defaultProps$
|
|
17391
|
+
Radio.defaultProps = defaultProps$M;
|
|
17367
17392
|
Radio.displayName = "NutRadio";
|
|
17368
17393
|
Radio.Group = RadioGroup;
|
|
17369
|
-
const defaultProps$
|
|
17394
|
+
const defaultProps$L = {
|
|
17370
17395
|
...ComponentDefaults,
|
|
17371
17396
|
range: false,
|
|
17372
17397
|
min: 0,
|
|
@@ -17394,7 +17419,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17394
17419
|
step,
|
|
17395
17420
|
value,
|
|
17396
17421
|
defaultValue
|
|
17397
|
-
} = { ...defaultProps$
|
|
17422
|
+
} = { ...defaultProps$L, ...props };
|
|
17398
17423
|
const classPrefix2 = "nut-range";
|
|
17399
17424
|
const [buttonIndex, setButtonIndex] = React.useState(0);
|
|
17400
17425
|
const [dragStatus, setDragStatus] = React.useState("start");
|
|
@@ -17658,9 +17683,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17658
17683
|
renderButton()
|
|
17659
17684
|
))), maxDescription !== null && /* @__PURE__ */ React.createElement("div", { className: "max" }, maxDescription || max));
|
|
17660
17685
|
};
|
|
17661
|
-
Range.defaultProps = defaultProps$
|
|
17686
|
+
Range.defaultProps = defaultProps$L;
|
|
17662
17687
|
Range.displayName = "NutRange";
|
|
17663
|
-
const defaultProps$
|
|
17688
|
+
const defaultProps$K = {
|
|
17664
17689
|
...ComponentDefaults,
|
|
17665
17690
|
count: 5,
|
|
17666
17691
|
min: 0,
|
|
@@ -17685,7 +17710,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17685
17710
|
allowHalf,
|
|
17686
17711
|
onChange
|
|
17687
17712
|
} = {
|
|
17688
|
-
...defaultProps$
|
|
17713
|
+
...defaultProps$K,
|
|
17689
17714
|
...props
|
|
17690
17715
|
};
|
|
17691
17716
|
const classPrefix2 = "nut-rate";
|
|
@@ -17768,9 +17793,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17768
17793
|
})
|
|
17769
17794
|
);
|
|
17770
17795
|
};
|
|
17771
|
-
Rate.defaultProps = defaultProps$
|
|
17796
|
+
Rate.defaultProps = defaultProps$K;
|
|
17772
17797
|
Rate.displayName = "NutRate";
|
|
17773
|
-
const defaultProps$
|
|
17798
|
+
const defaultProps$J = {
|
|
17774
17799
|
...ComponentDefaults,
|
|
17775
17800
|
placeholder: "",
|
|
17776
17801
|
shape: "square",
|
|
@@ -17809,7 +17834,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17809
17834
|
onSearch,
|
|
17810
17835
|
onClickInput
|
|
17811
17836
|
} = {
|
|
17812
|
-
...defaultProps$
|
|
17837
|
+
...defaultProps$J,
|
|
17813
17838
|
...props
|
|
17814
17839
|
};
|
|
17815
17840
|
const forceFocus = () => {
|
|
@@ -17918,9 +17943,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17918
17943
|
renderRight()
|
|
17919
17944
|
);
|
|
17920
17945
|
};
|
|
17921
|
-
SearchBar.defaultProps = defaultProps$
|
|
17946
|
+
SearchBar.defaultProps = defaultProps$J;
|
|
17922
17947
|
SearchBar.displayName = "NutSearchBar";
|
|
17923
|
-
const defaultProps$
|
|
17948
|
+
const defaultProps$I = {
|
|
17924
17949
|
...ComponentDefaults,
|
|
17925
17950
|
value: "",
|
|
17926
17951
|
visible: false,
|
|
@@ -17957,7 +17982,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17957
17982
|
onClickCloseIcon,
|
|
17958
17983
|
...rest
|
|
17959
17984
|
} = {
|
|
17960
|
-
...defaultProps$
|
|
17985
|
+
...defaultProps$I,
|
|
17961
17986
|
...props
|
|
17962
17987
|
};
|
|
17963
17988
|
const classPrefix2 = "nut-shortpassword";
|
|
@@ -18014,33 +18039,32 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18014
18039
|
), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__footer__sure`, onClick: sure }, locale.confirm)))
|
|
18015
18040
|
);
|
|
18016
18041
|
};
|
|
18017
|
-
ShortPassword.defaultProps = defaultProps$
|
|
18042
|
+
ShortPassword.defaultProps = defaultProps$I;
|
|
18018
18043
|
ShortPassword.displayName = "NutShortPassword";
|
|
18019
|
-
const defaultProps$
|
|
18044
|
+
const defaultProps$H = {
|
|
18045
|
+
...ComponentDefaults,
|
|
18020
18046
|
type: "png",
|
|
18021
18047
|
lineWidth: 2,
|
|
18022
18048
|
strokeStyle: "#000",
|
|
18023
|
-
|
|
18024
|
-
className: ""
|
|
18049
|
+
unsupported: ""
|
|
18025
18050
|
};
|
|
18026
|
-
const
|
|
18051
|
+
const InternalSignature = (props, ref) => {
|
|
18027
18052
|
const { locale } = useConfig();
|
|
18028
18053
|
const {
|
|
18029
18054
|
type: type2,
|
|
18030
18055
|
lineWidth,
|
|
18031
18056
|
strokeStyle,
|
|
18032
|
-
|
|
18057
|
+
unsupported,
|
|
18033
18058
|
className,
|
|
18034
|
-
|
|
18035
|
-
clear,
|
|
18059
|
+
style,
|
|
18036
18060
|
onConfirm,
|
|
18037
18061
|
onClear,
|
|
18038
18062
|
...rest
|
|
18039
18063
|
} = {
|
|
18040
|
-
...defaultProps$
|
|
18064
|
+
...defaultProps$H,
|
|
18041
18065
|
...props
|
|
18042
18066
|
};
|
|
18043
|
-
const
|
|
18067
|
+
const classPrefix2 = `nut-signature`;
|
|
18044
18068
|
const canvasRef = React.useRef(null);
|
|
18045
18069
|
const wrapRef = React.useRef(null);
|
|
18046
18070
|
const [canvasHeight, setCanvasHeight] = React.useState(0);
|
|
@@ -18107,12 +18131,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18107
18131
|
ctx2.current.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
18108
18132
|
ctx2.current.closePath();
|
|
18109
18133
|
}
|
|
18110
|
-
clear && clear();
|
|
18111
18134
|
onClear && onClear();
|
|
18112
18135
|
};
|
|
18113
|
-
const handleConfirmBtn = () => {
|
|
18114
|
-
onSave(canvasRef.current);
|
|
18115
|
-
};
|
|
18116
18136
|
const onSave = (canvas) => {
|
|
18117
18137
|
let dataurl;
|
|
18118
18138
|
switch (type2) {
|
|
@@ -18126,30 +18146,22 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18126
18146
|
dataurl = canvas.toDataURL("image/png");
|
|
18127
18147
|
}
|
|
18128
18148
|
handleClearBtn();
|
|
18129
|
-
confirm2 && confirm2(canvas, dataurl);
|
|
18130
18149
|
onConfirm && onConfirm(canvas, dataurl);
|
|
18131
18150
|
};
|
|
18132
|
-
|
|
18133
|
-
|
|
18134
|
-
|
|
18135
|
-
className: `${b("btn")}`,
|
|
18136
|
-
type: "default",
|
|
18137
|
-
onClick: () => handleClearBtn()
|
|
18138
|
-
},
|
|
18139
|
-
locale.signature.reSign
|
|
18140
|
-
), /* @__PURE__ */ React.createElement(
|
|
18141
|
-
Button,
|
|
18142
|
-
{
|
|
18143
|
-
className: `${b("btn")}`,
|
|
18144
|
-
type: "primary",
|
|
18145
|
-
onClick: () => handleConfirmBtn()
|
|
18151
|
+
React.useImperativeHandle(ref, () => ({
|
|
18152
|
+
confirm: () => {
|
|
18153
|
+
onSave(canvasRef.current);
|
|
18146
18154
|
},
|
|
18147
|
-
|
|
18148
|
-
|
|
18155
|
+
clear: () => {
|
|
18156
|
+
handleClearBtn();
|
|
18157
|
+
}
|
|
18158
|
+
}));
|
|
18159
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__inner`, ref: wrapRef }, isCanvasSupported() ? /* @__PURE__ */ React.createElement("canvas", { ref: canvasRef, height: canvasHeight, width: canvasWidth }) : /* @__PURE__ */ React.createElement(React.Fragment, null, unsupported || /* @__PURE__ */ React.createElement("p", { className: `${classPrefix2}__unsupport` }, locale.signature.unsupported))));
|
|
18149
18160
|
};
|
|
18150
|
-
Signature
|
|
18161
|
+
const Signature = React.forwardRef(InternalSignature);
|
|
18162
|
+
Signature.defaultProps = defaultProps$H;
|
|
18151
18163
|
Signature.displayName = "NutSignature";
|
|
18152
|
-
const defaultProps$
|
|
18164
|
+
const defaultProps$G = {
|
|
18153
18165
|
...ComponentDefaults,
|
|
18154
18166
|
disabled: false,
|
|
18155
18167
|
activeText: "",
|
|
@@ -18166,7 +18178,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18166
18178
|
style,
|
|
18167
18179
|
onChange
|
|
18168
18180
|
} = {
|
|
18169
|
-
...defaultProps$
|
|
18181
|
+
...defaultProps$G,
|
|
18170
18182
|
...props
|
|
18171
18183
|
};
|
|
18172
18184
|
const classPrefix2 = "nut-switch";
|
|
@@ -18185,9 +18197,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18185
18197
|
};
|
|
18186
18198
|
return /* @__PURE__ */ React.createElement("div", { className: classes(), onClick: (e) => onClick(e), style }, /* @__PURE__ */ React.createElement("div", { className: "switch-button" }, !value && /* @__PURE__ */ React.createElement("div", { className: "close-line" }), activeText && /* @__PURE__ */ React.createElement(React.Fragment, null, value ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__label open` }, activeText) : /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__label close` }, inactiveText))));
|
|
18187
18199
|
};
|
|
18188
|
-
Switch.defaultProps = defaultProps$
|
|
18200
|
+
Switch.defaultProps = defaultProps$G;
|
|
18189
18201
|
Switch.displayName = "NutSwitch";
|
|
18190
|
-
const defaultProps$
|
|
18202
|
+
const defaultProps$F = {
|
|
18191
18203
|
...ComponentDefaults,
|
|
18192
18204
|
defaultValue: "",
|
|
18193
18205
|
showCount: false,
|
|
@@ -18216,7 +18228,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18216
18228
|
onBlur,
|
|
18217
18229
|
onFocus,
|
|
18218
18230
|
...rest
|
|
18219
|
-
} = { ...defaultProps$
|
|
18231
|
+
} = { ...defaultProps$F, ...props };
|
|
18220
18232
|
const classPrefix2 = "nut-textarea";
|
|
18221
18233
|
const textareaRef = React.useRef(null);
|
|
18222
18234
|
const compositionRef = React.useRef(false);
|
|
@@ -18300,9 +18312,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18300
18312
|
showCount && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__limit` }, inputValue.length, "/", maxLength < 0 ? 0 : maxLength)
|
|
18301
18313
|
);
|
|
18302
18314
|
};
|
|
18303
|
-
TextArea.defaultProps = defaultProps$
|
|
18315
|
+
TextArea.defaultProps = defaultProps$F;
|
|
18304
18316
|
TextArea.displayName = "NutTextArea";
|
|
18305
|
-
const defaultProps$
|
|
18317
|
+
const defaultProps$E = {
|
|
18306
18318
|
...ComponentDefaults,
|
|
18307
18319
|
percent: 0,
|
|
18308
18320
|
showText: false,
|
|
@@ -18325,7 +18337,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18325
18337
|
delay,
|
|
18326
18338
|
...rest
|
|
18327
18339
|
} = {
|
|
18328
|
-
...defaultProps$
|
|
18340
|
+
...defaultProps$E,
|
|
18329
18341
|
...props
|
|
18330
18342
|
};
|
|
18331
18343
|
const classPrefix2 = "nut-progress";
|
|
@@ -18420,7 +18432,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18420
18432
|
)))
|
|
18421
18433
|
);
|
|
18422
18434
|
};
|
|
18423
|
-
Progress.defaultProps = defaultProps$
|
|
18435
|
+
Progress.defaultProps = defaultProps$E;
|
|
18424
18436
|
Progress.displayName = "NutProgress";
|
|
18425
18437
|
class UploadOptions {
|
|
18426
18438
|
constructor() {
|
|
@@ -18487,19 +18499,6 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18487
18499
|
}
|
|
18488
18500
|
}
|
|
18489
18501
|
}
|
|
18490
|
-
const isObject = (val) => val !== null && typeof val === "object";
|
|
18491
|
-
const isFunction = (val) => typeof val === "function";
|
|
18492
|
-
const isPromise = (val) => {
|
|
18493
|
-
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
18494
|
-
};
|
|
18495
|
-
const upperCaseFirst = (str) => {
|
|
18496
|
-
var str = str.toLowerCase();
|
|
18497
|
-
str = str.replace(
|
|
18498
|
-
/\b\w+\b/g,
|
|
18499
|
-
(word) => word.substring(0, 1).toUpperCase() + word.substring(1)
|
|
18500
|
-
);
|
|
18501
|
-
return str;
|
|
18502
|
-
};
|
|
18503
18502
|
const funcInterceptor = (interceptor, {
|
|
18504
18503
|
args = [],
|
|
18505
18504
|
done,
|
|
@@ -18525,7 +18524,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18525
18524
|
done();
|
|
18526
18525
|
}
|
|
18527
18526
|
};
|
|
18528
|
-
const defaultProps$
|
|
18527
|
+
const defaultProps$D = {
|
|
18529
18528
|
...ComponentDefaults,
|
|
18530
18529
|
url: "",
|
|
18531
18530
|
maxCount: 1,
|
|
@@ -18607,7 +18606,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18607
18606
|
beforeXhrUpload,
|
|
18608
18607
|
beforeDelete,
|
|
18609
18608
|
...restProps
|
|
18610
|
-
} = { ...defaultProps$
|
|
18609
|
+
} = { ...defaultProps$D, ...props };
|
|
18611
18610
|
const [fileList, setFileList] = React.useState(defaultValue || []);
|
|
18612
18611
|
const [uploadQueue, setUploadQueue] = React.useState([]);
|
|
18613
18612
|
React.useEffect(() => {
|
|
@@ -18948,9 +18947,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18948
18947
|
));
|
|
18949
18948
|
};
|
|
18950
18949
|
const Uploader = React.forwardRef(InternalUploader);
|
|
18951
|
-
Uploader.defaultProps = defaultProps$
|
|
18950
|
+
Uploader.defaultProps = defaultProps$D;
|
|
18952
18951
|
Uploader.displayName = "NutUploader";
|
|
18953
|
-
const defaultProps$
|
|
18952
|
+
const defaultProps$C = {
|
|
18954
18953
|
...ComponentDefaults,
|
|
18955
18954
|
visible: false,
|
|
18956
18955
|
title: "",
|
|
@@ -18977,7 +18976,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18977
18976
|
className,
|
|
18978
18977
|
style,
|
|
18979
18978
|
...rest
|
|
18980
|
-
} = { ...defaultProps$
|
|
18979
|
+
} = { ...defaultProps$C, ...props };
|
|
18981
18980
|
const classPrefix2 = "nut-actionsheet";
|
|
18982
18981
|
const cancelActionSheet = () => {
|
|
18983
18982
|
onCancel && onCancel();
|
|
@@ -19018,7 +19017,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19018
19017
|
))
|
|
19019
19018
|
);
|
|
19020
19019
|
};
|
|
19021
|
-
ActionSheet.defaultProps = defaultProps$
|
|
19020
|
+
ActionSheet.defaultProps = defaultProps$C;
|
|
19022
19021
|
ActionSheet.displayName = "NutActionSheet";
|
|
19023
19022
|
const fullClone = {
|
|
19024
19023
|
...ReactDOM__namespace
|
|
@@ -19251,7 +19250,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19251
19250
|
};
|
|
19252
19251
|
DialogWrap.defaultProps = defaultDialogProps;
|
|
19253
19252
|
DialogWrap.displayName = "NutDialogWrap";
|
|
19254
|
-
const defaultProps$
|
|
19253
|
+
const defaultProps$B = {
|
|
19255
19254
|
confirmText: "",
|
|
19256
19255
|
cancelText: "",
|
|
19257
19256
|
overlay: true,
|
|
@@ -19350,9 +19349,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19350
19349
|
});
|
|
19351
19350
|
};
|
|
19352
19351
|
});
|
|
19353
|
-
Dialog.defaultProps = defaultProps$
|
|
19352
|
+
Dialog.defaultProps = defaultProps$B;
|
|
19354
19353
|
Dialog.displayName = "NutDialog";
|
|
19355
|
-
const defaultProps$
|
|
19354
|
+
const defaultProps$A = {
|
|
19356
19355
|
...ComponentDefaults,
|
|
19357
19356
|
attract: false,
|
|
19358
19357
|
direction: void 0,
|
|
@@ -19365,7 +19364,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19365
19364
|
};
|
|
19366
19365
|
const Drag = (props) => {
|
|
19367
19366
|
const { attract, direction, boundary, children, className, style, ...reset } = {
|
|
19368
|
-
...defaultProps$
|
|
19367
|
+
...defaultProps$A,
|
|
19369
19368
|
...props
|
|
19370
19369
|
};
|
|
19371
19370
|
const classPrefix2 = "nut-drag";
|
|
@@ -19428,20 +19427,20 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19428
19427
|
/* @__PURE__ */ React.createElement(animated.div, { style: currstyle, ...bind() }, children)
|
|
19429
19428
|
);
|
|
19430
19429
|
};
|
|
19431
|
-
Drag.defaultProps = defaultProps$
|
|
19430
|
+
Drag.defaultProps = defaultProps$A;
|
|
19432
19431
|
Drag.displayName = "NutDrag";
|
|
19433
19432
|
const defaultStatus = {
|
|
19434
19433
|
empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
|
|
19435
19434
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
19436
19435
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
19437
19436
|
};
|
|
19438
|
-
const defaultProps$
|
|
19437
|
+
const defaultProps$z = {
|
|
19439
19438
|
...ComponentDefaults,
|
|
19440
19439
|
description: "",
|
|
19441
19440
|
imageSize: "",
|
|
19442
19441
|
status: "empty"
|
|
19443
19442
|
};
|
|
19444
|
-
const classPrefix$
|
|
19443
|
+
const classPrefix$c = `nut-empty`;
|
|
19445
19444
|
const Empty = (props) => {
|
|
19446
19445
|
const { locale } = useConfig();
|
|
19447
19446
|
const {
|
|
@@ -19453,7 +19452,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19453
19452
|
status,
|
|
19454
19453
|
...rest
|
|
19455
19454
|
} = {
|
|
19456
|
-
...defaultProps$
|
|
19455
|
+
...defaultProps$z,
|
|
19457
19456
|
...props
|
|
19458
19457
|
};
|
|
19459
19458
|
const [imgStyle, setImgStyle] = React.useState({});
|
|
@@ -19476,46 +19475,38 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19476
19475
|
};
|
|
19477
19476
|
});
|
|
19478
19477
|
}, [imageSize]);
|
|
19479
|
-
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
19478
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$c} ${className}`, ...rest }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$c}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$c}__description` }, description || locale.noData) : description, children));
|
|
19480
19479
|
};
|
|
19481
|
-
Empty.defaultProps = defaultProps$
|
|
19480
|
+
Empty.defaultProps = defaultProps$z;
|
|
19482
19481
|
Empty.displayName = "NutEmpty";
|
|
19483
|
-
const defaultProps$
|
|
19482
|
+
const defaultProps$y = {
|
|
19484
19483
|
...ComponentDefaults,
|
|
19485
19484
|
hasMore: true,
|
|
19486
19485
|
threshold: 200,
|
|
19487
|
-
|
|
19488
|
-
|
|
19489
|
-
|
|
19490
|
-
|
|
19491
|
-
|
|
19492
|
-
|
|
19493
|
-
loadIcon: null,
|
|
19494
|
-
loadingText: "加载中···",
|
|
19495
|
-
loadMoreText: "哎呀,这里是底部了啦"
|
|
19496
|
-
};
|
|
19497
|
-
const Infiniteloading = (props) => {
|
|
19486
|
+
target: "",
|
|
19487
|
+
capture: false,
|
|
19488
|
+
pullRefresh: false
|
|
19489
|
+
};
|
|
19490
|
+
const classPrefix$b = `nut-infiniteloading`;
|
|
19491
|
+
const InfiniteLoading = (props) => {
|
|
19498
19492
|
const { locale } = useConfig();
|
|
19499
19493
|
const {
|
|
19500
19494
|
children,
|
|
19501
19495
|
hasMore,
|
|
19502
19496
|
threshold,
|
|
19503
|
-
|
|
19504
|
-
|
|
19505
|
-
|
|
19506
|
-
|
|
19507
|
-
pullIcon,
|
|
19508
|
-
pullText,
|
|
19509
|
-
loadIcon,
|
|
19497
|
+
target,
|
|
19498
|
+
capture,
|
|
19499
|
+
pullRefresh,
|
|
19500
|
+
pullingText,
|
|
19510
19501
|
loadingText,
|
|
19511
19502
|
loadMoreText,
|
|
19512
19503
|
className,
|
|
19513
19504
|
onRefresh,
|
|
19514
19505
|
onLoadMore,
|
|
19515
|
-
|
|
19506
|
+
onScroll,
|
|
19516
19507
|
...restProps
|
|
19517
19508
|
} = {
|
|
19518
|
-
...defaultProps$
|
|
19509
|
+
...defaultProps$y,
|
|
19519
19510
|
...props
|
|
19520
19511
|
};
|
|
19521
19512
|
const [isInfiniting, setIsInfiniting] = React.useState(false);
|
|
@@ -19527,16 +19518,16 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19527
19518
|
const refreshMaxH = React.useRef(0);
|
|
19528
19519
|
const y2 = React.useRef(0);
|
|
19529
19520
|
const distance = React.useRef(0);
|
|
19530
|
-
const
|
|
19531
|
-
const classes = classNames(className, b());
|
|
19521
|
+
const classes = classNames(className, classPrefix$b);
|
|
19532
19522
|
React.useEffect(() => {
|
|
19533
|
-
|
|
19534
|
-
|
|
19535
|
-
|
|
19536
|
-
|
|
19537
|
-
|
|
19523
|
+
if (target && document.getElementById(target)) {
|
|
19524
|
+
scrollEl.current = document.getElementById(target);
|
|
19525
|
+
} else {
|
|
19526
|
+
scrollEl.current = window;
|
|
19527
|
+
}
|
|
19528
|
+
scrollEl.current.addEventListener("scroll", handleScroll, capture);
|
|
19538
19529
|
return () => {
|
|
19539
|
-
scrollEl.current.removeEventListener("scroll", handleScroll,
|
|
19530
|
+
scrollEl.current.removeEventListener("scroll", handleScroll, capture);
|
|
19540
19531
|
};
|
|
19541
19532
|
}, [hasMore, isInfiniting]);
|
|
19542
19533
|
React.useEffect(() => {
|
|
@@ -19554,9 +19545,6 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19554
19545
|
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)`
|
|
19555
19546
|
};
|
|
19556
19547
|
};
|
|
19557
|
-
const getParentElement = (el) => {
|
|
19558
|
-
return containerId ? document.querySelector(`#${containerId}`) : el && el.parentNode;
|
|
19559
|
-
};
|
|
19560
19548
|
const handleScroll = () => {
|
|
19561
19549
|
requestAniFrame2()(() => {
|
|
19562
19550
|
if (!isScrollAtBottom() || !hasMore || isInfiniting) {
|
|
@@ -19576,7 +19564,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19576
19564
|
isTouching.current = false;
|
|
19577
19565
|
};
|
|
19578
19566
|
const touchStart = (event) => {
|
|
19579
|
-
if (beforeScrollTop.current === 0 && !isTouching.current &&
|
|
19567
|
+
if (beforeScrollTop.current === 0 && !isTouching.current && pullRefresh) {
|
|
19580
19568
|
y2.current = event.touches[0].pageY;
|
|
19581
19569
|
isTouching.current = true;
|
|
19582
19570
|
const childHeight = refreshTop.current.firstElementChild.offsetHeight;
|
|
@@ -19608,12 +19596,12 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19608
19596
|
}
|
|
19609
19597
|
};
|
|
19610
19598
|
const requestAniFrame2 = () => {
|
|
19611
|
-
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function fn(callback) {
|
|
19599
|
+
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function fn(callback) {
|
|
19612
19600
|
window.setTimeout(callback, 1e3 / 60);
|
|
19613
19601
|
};
|
|
19614
19602
|
};
|
|
19615
19603
|
const getWindowScrollTop = () => {
|
|
19616
|
-
return window.
|
|
19604
|
+
return window.scrollY !== void 0 ? window.scrollY : (document.documentElement || document.body.parentNode || document.body).scrollTop;
|
|
19617
19605
|
};
|
|
19618
19606
|
const calculateTopPosition = (el) => {
|
|
19619
19607
|
return !el ? 0 : el.offsetTop + calculateTopPosition(el.offsetParent);
|
|
@@ -19623,7 +19611,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19623
19611
|
let resScrollTop = 0;
|
|
19624
19612
|
let direction = "down";
|
|
19625
19613
|
const windowScrollTop = getWindowScrollTop();
|
|
19626
|
-
if (
|
|
19614
|
+
if (!target || !document.getElementById(target)) {
|
|
19627
19615
|
if (scroller.current) {
|
|
19628
19616
|
offsetDistance = calculateTopPosition(scroller.current) + scroller.current.offsetHeight - windowScrollTop - window.innerHeight;
|
|
19629
19617
|
}
|
|
@@ -19639,7 +19627,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19639
19627
|
direction = "down";
|
|
19640
19628
|
}
|
|
19641
19629
|
beforeScrollTop.current = resScrollTop;
|
|
19642
|
-
|
|
19630
|
+
onScroll && onScroll(resScrollTop);
|
|
19643
19631
|
return offsetDistance <= threshold && direction === "down";
|
|
19644
19632
|
};
|
|
19645
19633
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -19651,14 +19639,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19651
19639
|
onTouchEnd: touchEnd,
|
|
19652
19640
|
...restProps
|
|
19653
19641
|
},
|
|
19654
|
-
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React.createElement("div", { className: "top-box" },
|
|
19642
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React.createElement("div", { className: "top-box" }, pullingText || locale.infiniteloading.pullRefreshText)),
|
|
19655
19643
|
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-container" }, children),
|
|
19656
|
-
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-bottom" }, isInfiniting ? /* @__PURE__ */ React.createElement("div", { className: "bottom-box" },
|
|
19644
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-bottom" }, isInfiniting ? /* @__PURE__ */ React.createElement("div", { className: "bottom-box" }, loadingText || locale.infiniteloading.loadText) : !hasMore && /* @__PURE__ */ React.createElement("div", { className: "tips" }, loadMoreText || locale.infiniteloading.loadMoreText))
|
|
19657
19645
|
);
|
|
19658
19646
|
};
|
|
19659
|
-
|
|
19660
|
-
|
|
19661
|
-
const defaultProps$
|
|
19647
|
+
InfiniteLoading.defaultProps = defaultProps$y;
|
|
19648
|
+
InfiniteLoading.displayName = "NutInfiniteLoading";
|
|
19649
|
+
const defaultProps$x = {
|
|
19662
19650
|
...ComponentDefaults,
|
|
19663
19651
|
direction: "horizontal",
|
|
19664
19652
|
list: [],
|
|
@@ -19696,7 +19684,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19696
19684
|
onClick,
|
|
19697
19685
|
onClickItem
|
|
19698
19686
|
} = {
|
|
19699
|
-
...defaultProps$
|
|
19687
|
+
...defaultProps$x,
|
|
19700
19688
|
...props
|
|
19701
19689
|
};
|
|
19702
19690
|
const classPrefix2 = "nut-noticebar";
|
|
@@ -20005,7 +19993,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20005
19993
|
onClick: handleClick2
|
|
20006
19994
|
},
|
|
20007
19995
|
leftIcon ? /* @__PURE__ */ React.createElement("div", { className: "left-icon" }, leftIcon) : null,
|
|
20008
|
-
children ? /* @__PURE__ */ React.createElement(
|
|
19996
|
+
children ? /* @__PURE__ */ React.createElement("div", { className: "nut-noticebar__inner", ref: innerRef }, scrollList.current.map((item, index) => {
|
|
20009
19997
|
return /* @__PURE__ */ React.createElement(
|
|
20010
19998
|
"div",
|
|
20011
19999
|
{
|
|
@@ -20018,7 +20006,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20018
20006
|
},
|
|
20019
20007
|
item
|
|
20020
20008
|
);
|
|
20021
|
-
}))
|
|
20009
|
+
})) : /* @__PURE__ */ React.createElement("div", { className: "horseLamp_list", style: horseLampStyle }, scrollList.current.map((item, index) => {
|
|
20022
20010
|
return (
|
|
20023
20011
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
20024
20012
|
/* @__PURE__ */ React.createElement(
|
|
@@ -20047,7 +20035,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20047
20035
|
)
|
|
20048
20036
|
) : null);
|
|
20049
20037
|
};
|
|
20050
|
-
NoticeBar.defaultProps = defaultProps$
|
|
20038
|
+
NoticeBar.defaultProps = defaultProps$x;
|
|
20051
20039
|
NoticeBar.displayName = "NutNoticeBar";
|
|
20052
20040
|
const classPrefix$a = "nut-notify";
|
|
20053
20041
|
let Notification$1 = (_a = class extends React__namespace.PureComponent {
|
|
@@ -20212,42 +20200,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20212
20200
|
}
|
|
20213
20201
|
}
|
|
20214
20202
|
};
|
|
20215
|
-
const
|
|
20216
|
-
let targetElement;
|
|
20217
|
-
if (isFunction(target)) {
|
|
20218
|
-
targetElement = target();
|
|
20219
|
-
} else if ("current" in target) {
|
|
20220
|
-
targetElement = target.current;
|
|
20221
|
-
} else {
|
|
20222
|
-
targetElement = target;
|
|
20223
|
-
}
|
|
20224
|
-
return targetElement;
|
|
20225
|
-
};
|
|
20226
|
-
function useClickAway(onClickAway, target, eventName = "click", isListener, outerVar) {
|
|
20227
|
-
const handler = (event) => {
|
|
20228
|
-
const targets = Array.isArray(target) ? target : [target];
|
|
20229
|
-
if (targets.some((item) => {
|
|
20230
|
-
const targetElement = getTargetElement(item);
|
|
20231
|
-
return !targetElement || targetElement.contains(event.target);
|
|
20232
|
-
})) {
|
|
20233
|
-
return;
|
|
20234
|
-
}
|
|
20235
|
-
if (outerVar) {
|
|
20236
|
-
onClickAway();
|
|
20237
|
-
}
|
|
20238
|
-
};
|
|
20239
|
-
React.useEffect(() => {
|
|
20240
|
-
if (isListener) {
|
|
20241
|
-
window.addEventListener(eventName, handler, true);
|
|
20242
|
-
} else {
|
|
20243
|
-
window.removeEventListener(eventName, handler, true);
|
|
20244
|
-
}
|
|
20245
|
-
return () => {
|
|
20246
|
-
window.removeEventListener(eventName, handler, true);
|
|
20247
|
-
};
|
|
20248
|
-
}, [target]);
|
|
20249
|
-
}
|
|
20250
|
-
const defaultProps$x = {
|
|
20203
|
+
const defaultProps$w = {
|
|
20251
20204
|
...ComponentDefaults,
|
|
20252
20205
|
list: [],
|
|
20253
20206
|
location: "bottom",
|
|
@@ -20300,7 +20253,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20300
20253
|
onSelect,
|
|
20301
20254
|
...reset
|
|
20302
20255
|
} = {
|
|
20303
|
-
...defaultProps$
|
|
20256
|
+
...defaultProps$w,
|
|
20304
20257
|
...props
|
|
20305
20258
|
};
|
|
20306
20259
|
const popoverRef = React.useRef(null);
|
|
@@ -20495,7 +20448,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20495
20448
|
}))
|
|
20496
20449
|
)));
|
|
20497
20450
|
};
|
|
20498
|
-
Popover.defaultProps = defaultProps$
|
|
20451
|
+
Popover.defaultProps = defaultProps$w;
|
|
20499
20452
|
Popover.displayName = "NutPopover";
|
|
20500
20453
|
function bound(position, min, max) {
|
|
20501
20454
|
let ret = position;
|
|
@@ -20533,7 +20486,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20533
20486
|
console.log(e);
|
|
20534
20487
|
}
|
|
20535
20488
|
}
|
|
20536
|
-
const defaultProps$
|
|
20489
|
+
const defaultProps$v = {
|
|
20537
20490
|
...ComponentDefaults,
|
|
20538
20491
|
pullingText: "",
|
|
20539
20492
|
canReleaseText: "",
|
|
@@ -20550,7 +20503,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20550
20503
|
const classPrefix2 = "nut-pulltorefresh";
|
|
20551
20504
|
const { locale } = useConfig();
|
|
20552
20505
|
const props = {
|
|
20553
|
-
...defaultProps$
|
|
20506
|
+
...defaultProps$v,
|
|
20554
20507
|
...p,
|
|
20555
20508
|
...{
|
|
20556
20509
|
pullingText: p.pullingText || locale.pullToRefresh.pullingText,
|
|
@@ -20693,10 +20646,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20693
20646
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, props.children)
|
|
20694
20647
|
);
|
|
20695
20648
|
};
|
|
20696
|
-
PullToRefresh.defaultProps = defaultProps$
|
|
20649
|
+
PullToRefresh.defaultProps = defaultProps$v;
|
|
20697
20650
|
PullToRefresh.displayName = "NutPullToRefresh";
|
|
20698
20651
|
const AvatarContext = React.createContext({});
|
|
20699
|
-
const defaultProps$
|
|
20652
|
+
const defaultProps$u = {
|
|
20700
20653
|
...ComponentDefaults,
|
|
20701
20654
|
size: "",
|
|
20702
20655
|
shape: "round",
|
|
@@ -20726,7 +20679,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20726
20679
|
onError,
|
|
20727
20680
|
...rest
|
|
20728
20681
|
} = {
|
|
20729
|
-
...defaultProps$
|
|
20682
|
+
...defaultProps$u,
|
|
20730
20683
|
...props
|
|
20731
20684
|
};
|
|
20732
20685
|
const [maxSum, setMaxSum] = React.useState(0);
|
|
@@ -20808,9 +20761,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20808
20761
|
showMax && /* @__PURE__ */ React.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)}`)
|
|
20809
20762
|
));
|
|
20810
20763
|
};
|
|
20811
|
-
Avatar.defaultProps = defaultProps$
|
|
20764
|
+
Avatar.defaultProps = defaultProps$u;
|
|
20812
20765
|
Avatar.displayName = "NutAvatar";
|
|
20813
|
-
const defaultProps$
|
|
20766
|
+
const defaultProps$t = {
|
|
20814
20767
|
...ComponentDefaults,
|
|
20815
20768
|
rows: 1,
|
|
20816
20769
|
animated: false,
|
|
@@ -20833,7 +20786,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20833
20786
|
avatarShape,
|
|
20834
20787
|
...rest
|
|
20835
20788
|
} = {
|
|
20836
|
-
...defaultProps$
|
|
20789
|
+
...defaultProps$t,
|
|
20837
20790
|
...props
|
|
20838
20791
|
};
|
|
20839
20792
|
const classPrefix2 = "nut-skeleton";
|
|
@@ -20869,7 +20822,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20869
20822
|
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__block`, key: index });
|
|
20870
20823
|
})))));
|
|
20871
20824
|
};
|
|
20872
|
-
Skeleton.defaultProps = defaultProps$
|
|
20825
|
+
Skeleton.defaultProps = defaultProps$t;
|
|
20873
20826
|
Skeleton.displayName = "NutSkeleton";
|
|
20874
20827
|
function preventDefault(event, isStopPropagation) {
|
|
20875
20828
|
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
@@ -20879,13 +20832,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20879
20832
|
event.stopPropagation();
|
|
20880
20833
|
}
|
|
20881
20834
|
}
|
|
20882
|
-
const defaultProps$
|
|
20835
|
+
const defaultProps$s = {
|
|
20883
20836
|
name: ""
|
|
20884
20837
|
};
|
|
20885
20838
|
const Swipe = React.forwardRef((props, instanceRef) => {
|
|
20886
20839
|
const swipeBem = cn("swipe");
|
|
20887
20840
|
const touch = useTouch();
|
|
20888
|
-
const { children, className, style } = { ...defaultProps$
|
|
20841
|
+
const { children, className, style } = { ...defaultProps$s, ...props };
|
|
20889
20842
|
const root2 = React.useRef();
|
|
20890
20843
|
const opened = React.useRef(false);
|
|
20891
20844
|
const lockClick = React.useRef(false);
|
|
@@ -21053,7 +21006,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21053
21006
|
/* @__PURE__ */ React.createElement("div", { className: `${swipeBem("wrapper")}`, style: wrapperStyle }, renderActionContent("left", leftRef), children, renderActionContent("right", rightRef))
|
|
21054
21007
|
);
|
|
21055
21008
|
});
|
|
21056
|
-
Swipe.defaultProps = defaultProps$
|
|
21009
|
+
Swipe.defaultProps = defaultProps$s;
|
|
21057
21010
|
Swipe.displayName = "NutSwipe";
|
|
21058
21011
|
const classPrefix$7 = "nut-toast";
|
|
21059
21012
|
class Notification extends React__namespace.PureComponent {
|
|
@@ -21063,11 +21016,20 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21063
21016
|
this.close = this.close.bind(this);
|
|
21064
21017
|
this.startCloseTimer = this.startCloseTimer.bind(this);
|
|
21065
21018
|
this.clearCloseTimer = this.clearCloseTimer.bind(this);
|
|
21066
|
-
this.close = this.close.bind(this);
|
|
21067
21019
|
this.clickCover = this.clickCover.bind(this);
|
|
21020
|
+
this.state = {
|
|
21021
|
+
show: true
|
|
21022
|
+
};
|
|
21068
21023
|
}
|
|
21069
21024
|
close() {
|
|
21025
|
+
this.setState({
|
|
21026
|
+
show: false
|
|
21027
|
+
});
|
|
21070
21028
|
this.clearCloseTimer();
|
|
21029
|
+
if (this.props.id) {
|
|
21030
|
+
const element = document.getElementById(this.props.id);
|
|
21031
|
+
element && element.parentNode && element.parentNode.removeChild(element);
|
|
21032
|
+
}
|
|
21071
21033
|
this.props.onClose();
|
|
21072
21034
|
}
|
|
21073
21035
|
startCloseTimer() {
|
|
@@ -21132,6 +21094,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21132
21094
|
contentClassName,
|
|
21133
21095
|
contentStyle
|
|
21134
21096
|
} = this.props;
|
|
21097
|
+
const { show: show2 } = this.state;
|
|
21135
21098
|
const classes = classNames({
|
|
21136
21099
|
"nut-toast-has-icon": icon,
|
|
21137
21100
|
[`nut-toast-${size}`]: true
|
|
@@ -21139,11 +21102,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21139
21102
|
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
|
|
21140
21103
|
Overlay,
|
|
21141
21104
|
{
|
|
21142
|
-
visible:
|
|
21105
|
+
visible: show2,
|
|
21143
21106
|
style,
|
|
21144
21107
|
className: `${classPrefix$7}__overlay-default ${className}`,
|
|
21145
21108
|
onClick: () => {
|
|
21146
|
-
console.log("onclick");
|
|
21147
21109
|
this.clickCover();
|
|
21148
21110
|
},
|
|
21149
21111
|
closeOnOverlayClick
|
|
@@ -21164,9 +21126,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21164
21126
|
__publicField(Notification, "newInstance");
|
|
21165
21127
|
Notification.newInstance = (properties, callback) => {
|
|
21166
21128
|
const element = document.createElement("div");
|
|
21167
|
-
|
|
21168
|
-
|
|
21169
|
-
|
|
21129
|
+
const id = properties.id ? properties.id : `${(/* @__PURE__ */ new Date()).getTime()}`;
|
|
21130
|
+
element.id = id;
|
|
21131
|
+
properties.id = id;
|
|
21170
21132
|
document.body.appendChild(element);
|
|
21171
21133
|
let called = false;
|
|
21172
21134
|
function ref(instance) {
|
|
@@ -21259,7 +21221,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21259
21221
|
}
|
|
21260
21222
|
}
|
|
21261
21223
|
};
|
|
21262
|
-
const defaultProps$
|
|
21224
|
+
const defaultProps$r = {
|
|
21263
21225
|
...ComponentDefaults,
|
|
21264
21226
|
type: "shake",
|
|
21265
21227
|
action: "initial",
|
|
@@ -21270,7 +21232,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21270
21232
|
const classPrefix$6 = `nut-animate`;
|
|
21271
21233
|
const Animate = (props) => {
|
|
21272
21234
|
const { className, type: type2, action, loop: loop2, onClick, children, ...rest } = {
|
|
21273
|
-
...defaultProps$
|
|
21235
|
+
...defaultProps$r,
|
|
21274
21236
|
...props
|
|
21275
21237
|
};
|
|
21276
21238
|
const [clicked, setClicked] = React.useState(false);
|
|
@@ -21291,9 +21253,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21291
21253
|
};
|
|
21292
21254
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-animate" }, /* @__PURE__ */ React.createElement("div", { className: cls, onClick: handleClick2, ...rest }, children));
|
|
21293
21255
|
};
|
|
21294
|
-
Animate.defaultProps = defaultProps$
|
|
21256
|
+
Animate.defaultProps = defaultProps$r;
|
|
21295
21257
|
Animate.displayName = "NutAnimate";
|
|
21296
|
-
const defaultProps$
|
|
21258
|
+
const defaultProps$q = {
|
|
21297
21259
|
...ComponentDefaults,
|
|
21298
21260
|
length: 0,
|
|
21299
21261
|
value: "",
|
|
@@ -21312,7 +21274,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21312
21274
|
style,
|
|
21313
21275
|
...reset
|
|
21314
21276
|
} = {
|
|
21315
|
-
...defaultProps$
|
|
21277
|
+
...defaultProps$q,
|
|
21316
21278
|
...props
|
|
21317
21279
|
};
|
|
21318
21280
|
const classPrefix2 = "nut-countup";
|
|
@@ -21376,9 +21338,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21376
21338
|
);
|
|
21377
21339
|
})));
|
|
21378
21340
|
};
|
|
21379
|
-
CountUp.defaultProps = defaultProps$
|
|
21341
|
+
CountUp.defaultProps = defaultProps$q;
|
|
21380
21342
|
CountUp.displayName = "NutCountUp";
|
|
21381
|
-
const defaultProps$
|
|
21343
|
+
const defaultProps$p = {};
|
|
21382
21344
|
class AnimatingNumbers extends React.Component {
|
|
21383
21345
|
constructor(props) {
|
|
21384
21346
|
super(props);
|
|
@@ -21388,11 +21350,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21388
21350
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-animatingnumbers" });
|
|
21389
21351
|
}
|
|
21390
21352
|
}
|
|
21391
|
-
__publicField(AnimatingNumbers, "defaultProps", defaultProps$
|
|
21353
|
+
__publicField(AnimatingNumbers, "defaultProps", defaultProps$p);
|
|
21392
21354
|
__publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
|
|
21393
21355
|
__publicField(AnimatingNumbers, "CountUp", CountUp);
|
|
21394
21356
|
AnimatingNumbers.CountUp = CountUp;
|
|
21395
|
-
const defaultProps$
|
|
21357
|
+
const defaultProps$o = {
|
|
21396
21358
|
...ComponentDefaults,
|
|
21397
21359
|
src: "",
|
|
21398
21360
|
muted: false,
|
|
@@ -21435,7 +21397,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21435
21397
|
children,
|
|
21436
21398
|
...rest
|
|
21437
21399
|
} = {
|
|
21438
|
-
...defaultProps$
|
|
21400
|
+
...defaultProps$o,
|
|
21439
21401
|
...props
|
|
21440
21402
|
};
|
|
21441
21403
|
const [playing, setPlaying] = React.useState(false);
|
|
@@ -21641,9 +21603,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21641
21603
|
/* @__PURE__ */ React.createElement("track", { kind: "captions" })
|
|
21642
21604
|
));
|
|
21643
21605
|
};
|
|
21644
|
-
Audio.defaultProps = defaultProps$
|
|
21606
|
+
Audio.defaultProps = defaultProps$o;
|
|
21645
21607
|
Audio.displayName = "NutAudio";
|
|
21646
|
-
const defaultProps$
|
|
21608
|
+
const defaultProps$n = {
|
|
21647
21609
|
...ComponentDefaults,
|
|
21648
21610
|
maxContent: "",
|
|
21649
21611
|
max: "",
|
|
@@ -21654,7 +21616,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21654
21616
|
};
|
|
21655
21617
|
const classPrefix$5 = `nut-avatar-group`;
|
|
21656
21618
|
const AvatarGroup = (props) => {
|
|
21657
|
-
const propAvatarGroup = { ...defaultProps$
|
|
21619
|
+
const propAvatarGroup = { ...defaultProps$n, ...props };
|
|
21658
21620
|
const { className, style, children } = propAvatarGroup;
|
|
21659
21621
|
const avatarGroupRef = React.useRef(null);
|
|
21660
21622
|
const cls = classNames(classPrefix$5, className);
|
|
@@ -21664,9 +21626,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21664
21626
|
};
|
|
21665
21627
|
return /* @__PURE__ */ React.createElement(AvatarContext.Provider, { value: parentAvatar }, /* @__PURE__ */ React.createElement("div", { className: cls, style, ref: avatarGroupRef }, children));
|
|
21666
21628
|
};
|
|
21667
|
-
AvatarGroup.defaultProps = defaultProps$
|
|
21629
|
+
AvatarGroup.defaultProps = defaultProps$n;
|
|
21668
21630
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
21669
|
-
const defaultProps$
|
|
21631
|
+
const defaultProps$m = {
|
|
21670
21632
|
...ComponentDefaults,
|
|
21671
21633
|
strokeWidth: 5,
|
|
21672
21634
|
radius: 50,
|
|
@@ -21691,7 +21653,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21691
21653
|
strokeLinecap,
|
|
21692
21654
|
...restProps
|
|
21693
21655
|
} = {
|
|
21694
|
-
...defaultProps$
|
|
21656
|
+
...defaultProps$m,
|
|
21695
21657
|
...props
|
|
21696
21658
|
};
|
|
21697
21659
|
const classes = classNames(className, classPrefix$4);
|
|
@@ -21760,7 +21722,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21760
21722
|
}
|
|
21761
21723
|
)), /* @__PURE__ */ React.createElement("div", { className: "nut-circleprogress-text" }, children));
|
|
21762
21724
|
};
|
|
21763
|
-
CircleProgress.defaultProps = defaultProps$
|
|
21725
|
+
CircleProgress.defaultProps = defaultProps$m;
|
|
21764
21726
|
CircleProgress.displayName = "NutCircleProgress";
|
|
21765
21727
|
const collapseContext = {
|
|
21766
21728
|
isOpen: (name) => {
|
|
@@ -21772,7 +21734,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21772
21734
|
rotate: 180
|
|
21773
21735
|
};
|
|
21774
21736
|
const CollapseContext = React.createContext(collapseContext);
|
|
21775
|
-
const defaultProps$
|
|
21737
|
+
const defaultProps$l = {
|
|
21776
21738
|
...ComponentDefaults,
|
|
21777
21739
|
title: null,
|
|
21778
21740
|
name: "",
|
|
@@ -21794,7 +21756,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21794
21756
|
extra,
|
|
21795
21757
|
...rest
|
|
21796
21758
|
} = {
|
|
21797
|
-
...defaultProps$
|
|
21759
|
+
...defaultProps$l,
|
|
21798
21760
|
...props
|
|
21799
21761
|
};
|
|
21800
21762
|
const classPrefix2 = "nut-collapse-item";
|
|
@@ -21861,9 +21823,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21861
21823
|
/* @__PURE__ */ React.createElement("div", { ref: contentRef, className: `${classPrefix2}__content-text` }, children)
|
|
21862
21824
|
));
|
|
21863
21825
|
};
|
|
21864
|
-
CollapseItem.defaultProps = defaultProps$
|
|
21826
|
+
CollapseItem.defaultProps = defaultProps$l;
|
|
21865
21827
|
CollapseItem.displayName = "NutCollapseItem";
|
|
21866
|
-
const defaultProps$
|
|
21828
|
+
const defaultProps$k = {
|
|
21867
21829
|
...ComponentDefaults,
|
|
21868
21830
|
defaultActiveName: [],
|
|
21869
21831
|
accordion: false,
|
|
@@ -21882,7 +21844,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21882
21844
|
rotate,
|
|
21883
21845
|
onChange
|
|
21884
21846
|
} = {
|
|
21885
|
-
...defaultProps$
|
|
21847
|
+
...defaultProps$k,
|
|
21886
21848
|
...props
|
|
21887
21849
|
};
|
|
21888
21850
|
const classPrefix2 = "nut-collapse";
|
|
@@ -21939,10 +21901,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21939
21901
|
/* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style }, children)
|
|
21940
21902
|
);
|
|
21941
21903
|
};
|
|
21942
|
-
Collapse.defaultProps = defaultProps$
|
|
21904
|
+
Collapse.defaultProps = defaultProps$k;
|
|
21943
21905
|
Collapse.displayName = "NutCollapse";
|
|
21944
21906
|
Collapse.Item = CollapseItem;
|
|
21945
|
-
const defaultProps$
|
|
21907
|
+
const defaultProps$j = {
|
|
21946
21908
|
...ComponentDefaults,
|
|
21947
21909
|
paused: false,
|
|
21948
21910
|
startTime: Date.now(),
|
|
@@ -21974,7 +21936,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21974
21936
|
onUpdate,
|
|
21975
21937
|
children,
|
|
21976
21938
|
...rest
|
|
21977
|
-
} = { ...defaultProps$
|
|
21939
|
+
} = { ...defaultProps$j, ...props };
|
|
21978
21940
|
const classPrefix2 = "nut-countdown";
|
|
21979
21941
|
const [restTimeStamp, setRestTime] = React.useState(0);
|
|
21980
21942
|
const stateRef = React.useRef({
|
|
@@ -22185,9 +22147,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22185
22147
|
);
|
|
22186
22148
|
};
|
|
22187
22149
|
const CountDown = React.forwardRef(InternalCountDown);
|
|
22188
|
-
CountDown.defaultProps = defaultProps$
|
|
22150
|
+
CountDown.defaultProps = defaultProps$j;
|
|
22189
22151
|
CountDown.displayName = "NutCountDown";
|
|
22190
|
-
const defaultProps$
|
|
22152
|
+
const defaultProps$i = {
|
|
22191
22153
|
...ComponentDefaults,
|
|
22192
22154
|
content: "",
|
|
22193
22155
|
direction: "end",
|
|
@@ -22213,7 +22175,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22213
22175
|
onClick,
|
|
22214
22176
|
onChange,
|
|
22215
22177
|
...rest
|
|
22216
|
-
} = { ...defaultProps$
|
|
22178
|
+
} = { ...defaultProps$i, ...props };
|
|
22217
22179
|
let container = null;
|
|
22218
22180
|
let maxHeight = 0;
|
|
22219
22181
|
const [exceeded, setExceeded] = React.useState(false);
|
|
@@ -22361,9 +22323,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22361
22323
|
collapseText
|
|
22362
22324
|
) : null) : null));
|
|
22363
22325
|
};
|
|
22364
|
-
Ellipsis.defaultProps = defaultProps$
|
|
22326
|
+
Ellipsis.defaultProps = defaultProps$i;
|
|
22365
22327
|
Ellipsis.displayName = "NutEllipsis";
|
|
22366
|
-
const defaultProps$
|
|
22328
|
+
const defaultProps$h = {
|
|
22367
22329
|
...ComponentDefaults,
|
|
22368
22330
|
source: {
|
|
22369
22331
|
type: {},
|
|
@@ -22391,7 +22353,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22391
22353
|
onPlayEnd,
|
|
22392
22354
|
...restProps
|
|
22393
22355
|
} = {
|
|
22394
|
-
...defaultProps$
|
|
22356
|
+
...defaultProps$h,
|
|
22395
22357
|
...props
|
|
22396
22358
|
};
|
|
22397
22359
|
const rootRef = React.useRef(null);
|
|
@@ -22441,10 +22403,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22441
22403
|
/* @__PURE__ */ React.createElement("track", { kind: "captions" })
|
|
22442
22404
|
));
|
|
22443
22405
|
};
|
|
22444
|
-
Video.defaultProps = defaultProps$
|
|
22406
|
+
Video.defaultProps = defaultProps$h;
|
|
22445
22407
|
Video.displayName = "NutVideo";
|
|
22446
22408
|
const DataContext$1 = React.createContext({});
|
|
22447
|
-
const defaultProps$
|
|
22409
|
+
const defaultProps$g = {
|
|
22448
22410
|
total: 3,
|
|
22449
22411
|
current: 0,
|
|
22450
22412
|
direction: "horizontal"
|
|
@@ -22452,7 +22414,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22452
22414
|
const classPrefix$1 = `nut-indicator`;
|
|
22453
22415
|
const Indicator = (props) => {
|
|
22454
22416
|
const { total, current, children, className, direction, ...rest } = {
|
|
22455
|
-
...defaultProps$
|
|
22417
|
+
...defaultProps$g,
|
|
22456
22418
|
...props
|
|
22457
22419
|
};
|
|
22458
22420
|
const classes = classNames({
|
|
@@ -22475,9 +22437,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22475
22437
|
};
|
|
22476
22438
|
return /* @__PURE__ */ React.createElement("div", { className: classNames(classes, className), ...rest }, renderElement());
|
|
22477
22439
|
};
|
|
22478
|
-
Indicator.defaultProps = defaultProps$
|
|
22440
|
+
Indicator.defaultProps = defaultProps$g;
|
|
22479
22441
|
Indicator.displayName = "NutIndicator";
|
|
22480
|
-
const defaultProps$
|
|
22442
|
+
const defaultProps$f = {
|
|
22481
22443
|
width: typeof window === "object" ? window.innerWidth : 375,
|
|
22482
22444
|
height: 0,
|
|
22483
22445
|
duration: 500,
|
|
@@ -22494,7 +22456,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22494
22456
|
};
|
|
22495
22457
|
const DISTANCE = 5;
|
|
22496
22458
|
const Swiper = React.forwardRef((props, ref) => {
|
|
22497
|
-
const propSwiper = { ...defaultProps$
|
|
22459
|
+
const propSwiper = { ...defaultProps$f, ...props };
|
|
22498
22460
|
const {
|
|
22499
22461
|
children,
|
|
22500
22462
|
direction,
|
|
@@ -22907,13 +22869,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22907
22869
|
renderIndicator()
|
|
22908
22870
|
));
|
|
22909
22871
|
});
|
|
22910
|
-
Swiper.defaultProps = defaultProps$
|
|
22872
|
+
Swiper.defaultProps = defaultProps$f;
|
|
22911
22873
|
Swiper.displayName = "NutSwiper";
|
|
22912
|
-
const defaultProps$
|
|
22874
|
+
const defaultProps$e = {
|
|
22913
22875
|
direction: "horizontal"
|
|
22914
22876
|
};
|
|
22915
22877
|
const SwiperItem = React.forwardRef((props, ref) => {
|
|
22916
|
-
const _props = { ...defaultProps$
|
|
22878
|
+
const _props = { ...defaultProps$e, ...props };
|
|
22917
22879
|
const { className, style, children, direction, size } = _props;
|
|
22918
22880
|
const parent = React.useContext(DataContext$1);
|
|
22919
22881
|
const b = cn("swiper-item");
|
|
@@ -22929,9 +22891,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22929
22891
|
};
|
|
22930
22892
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style: { ...style, ...getStyle() } }, children);
|
|
22931
22893
|
});
|
|
22932
|
-
SwiperItem.defaultProps = defaultProps$
|
|
22894
|
+
SwiperItem.defaultProps = defaultProps$e;
|
|
22933
22895
|
SwiperItem.displayName = "NutSwiperItem";
|
|
22934
|
-
const defaultProps$
|
|
22896
|
+
const defaultProps$d = {
|
|
22935
22897
|
...ComponentDefaults,
|
|
22936
22898
|
images: [],
|
|
22937
22899
|
videos: [],
|
|
@@ -23133,7 +23095,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23133
23095
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0))
|
|
23134
23096
|
);
|
|
23135
23097
|
};
|
|
23136
|
-
ImagePreview.defaultProps = defaultProps$
|
|
23098
|
+
ImagePreview.defaultProps = defaultProps$d;
|
|
23137
23099
|
ImagePreview.displayName = "NutImagePreview";
|
|
23138
23100
|
const initPositinoCache = (reaItemSize, length = 0) => {
|
|
23139
23101
|
let index = 0;
|
|
@@ -23246,7 +23208,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23246
23208
|
}
|
|
23247
23209
|
});
|
|
23248
23210
|
};
|
|
23249
|
-
const defaultProps$
|
|
23211
|
+
const defaultProps$c = {
|
|
23250
23212
|
...ComponentDefaults,
|
|
23251
23213
|
list: [],
|
|
23252
23214
|
itemHeight: 66,
|
|
@@ -23268,7 +23230,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23268
23230
|
containerHeight,
|
|
23269
23231
|
...rest
|
|
23270
23232
|
} = {
|
|
23271
|
-
...defaultProps$
|
|
23233
|
+
...defaultProps$c,
|
|
23272
23234
|
...props
|
|
23273
23235
|
};
|
|
23274
23236
|
const horizontal = direction === "horizontal";
|
|
@@ -23432,9 +23394,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23432
23394
|
)
|
|
23433
23395
|
);
|
|
23434
23396
|
};
|
|
23435
|
-
VirtualList.defaultProps = defaultProps$
|
|
23397
|
+
VirtualList.defaultProps = defaultProps$c;
|
|
23436
23398
|
VirtualList.displayName = "NutVirtualList";
|
|
23437
|
-
const defaultProps$
|
|
23399
|
+
const defaultProps$b = {
|
|
23438
23400
|
...ComponentDefaults,
|
|
23439
23401
|
defaultValue: 1,
|
|
23440
23402
|
mode: "multi",
|
|
@@ -23462,7 +23424,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23462
23424
|
className,
|
|
23463
23425
|
...rest
|
|
23464
23426
|
} = {
|
|
23465
|
-
...defaultProps$
|
|
23427
|
+
...defaultProps$b,
|
|
23466
23428
|
...props
|
|
23467
23429
|
};
|
|
23468
23430
|
const classPrefix2 = "nut-pagination";
|
|
@@ -23544,9 +23506,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23544
23506
|
next || locale.pagination.next
|
|
23545
23507
|
));
|
|
23546
23508
|
};
|
|
23547
|
-
Pagination.defaultProps = defaultProps$
|
|
23509
|
+
Pagination.defaultProps = defaultProps$b;
|
|
23548
23510
|
Pagination.displayName = "NutPagination";
|
|
23549
|
-
const defaultProps$
|
|
23511
|
+
const defaultProps$a = {
|
|
23550
23512
|
...ComponentDefaults,
|
|
23551
23513
|
price: 0,
|
|
23552
23514
|
symbol: "¥",
|
|
@@ -23569,7 +23531,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23569
23531
|
style,
|
|
23570
23532
|
...rest
|
|
23571
23533
|
} = {
|
|
23572
|
-
...defaultProps$
|
|
23534
|
+
...defaultProps$a,
|
|
23573
23535
|
...props
|
|
23574
23536
|
};
|
|
23575
23537
|
const classPrefix2 = "nut-price";
|
|
@@ -23649,10 +23611,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23649
23611
|
symbol && position === "after" ? renderSymbol() : null
|
|
23650
23612
|
);
|
|
23651
23613
|
};
|
|
23652
|
-
Price.defaultProps = defaultProps$
|
|
23614
|
+
Price.defaultProps = defaultProps$a;
|
|
23653
23615
|
Price.displayName = "NutPrice";
|
|
23654
23616
|
const DataContext = React.createContext({});
|
|
23655
|
-
const defaultProps$
|
|
23617
|
+
const defaultProps$9 = {
|
|
23656
23618
|
...ComponentDefaults,
|
|
23657
23619
|
title: "",
|
|
23658
23620
|
description: "",
|
|
@@ -23661,7 +23623,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23661
23623
|
};
|
|
23662
23624
|
const Step = (props) => {
|
|
23663
23625
|
const { children, title, description, value, icon, className, ...restProps } = {
|
|
23664
|
-
...defaultProps$
|
|
23626
|
+
...defaultProps$9,
|
|
23665
23627
|
...props
|
|
23666
23628
|
};
|
|
23667
23629
|
const parent = React.useContext(DataContext);
|
|
@@ -23695,16 +23657,16 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23695
23657
|
};
|
|
23696
23658
|
return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps, onClick: handleClickStep }, /* @__PURE__ */ React.createElement("div", { className: "nut-step-head" }, /* @__PURE__ */ React.createElement("div", { className: "nut-step-line" }), /* @__PURE__ */ React.createElement("div", { className: renderIconClass() }, icon || !dot && /* @__PURE__ */ React.createElement("span", { className: "nut-step-inner" }, value))), /* @__PURE__ */ React.createElement("div", { className: "nut-step-main" }, /* @__PURE__ */ React.createElement("span", { className: "nut-step-title" }, title), description && /* @__PURE__ */ React.createElement("span", { className: "nut-step-description" }, description)));
|
|
23697
23659
|
};
|
|
23698
|
-
Step.defaultProps = defaultProps$
|
|
23660
|
+
Step.defaultProps = defaultProps$9;
|
|
23699
23661
|
Step.displayName = "NutStep";
|
|
23700
|
-
const defaultProps$
|
|
23662
|
+
const defaultProps$8 = {
|
|
23701
23663
|
...ComponentDefaults,
|
|
23702
23664
|
value: 0,
|
|
23703
23665
|
direction: "horizontal",
|
|
23704
23666
|
dot: false
|
|
23705
23667
|
};
|
|
23706
23668
|
const Steps = (props) => {
|
|
23707
|
-
const propSteps = { ...defaultProps$
|
|
23669
|
+
const propSteps = { ...defaultProps$8, ...props };
|
|
23708
23670
|
const {
|
|
23709
23671
|
children,
|
|
23710
23672
|
value,
|
|
@@ -23735,9 +23697,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23735
23697
|
children
|
|
23736
23698
|
));
|
|
23737
23699
|
};
|
|
23738
|
-
Steps.defaultProps = defaultProps$
|
|
23700
|
+
Steps.defaultProps = defaultProps$8;
|
|
23739
23701
|
Steps.displayName = "NutSteps";
|
|
23740
|
-
const defaultProps$
|
|
23702
|
+
const defaultProps$7 = {
|
|
23741
23703
|
...ComponentDefaults,
|
|
23742
23704
|
columns: [],
|
|
23743
23705
|
data: [],
|
|
@@ -23749,7 +23711,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23749
23711
|
};
|
|
23750
23712
|
const Table = (props) => {
|
|
23751
23713
|
const { locale } = useConfig();
|
|
23752
|
-
defaultProps$
|
|
23714
|
+
defaultProps$7.noData = locale.noData;
|
|
23753
23715
|
const {
|
|
23754
23716
|
children,
|
|
23755
23717
|
className,
|
|
@@ -23765,7 +23727,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23765
23727
|
onSort,
|
|
23766
23728
|
...rest
|
|
23767
23729
|
} = {
|
|
23768
|
-
...defaultProps$
|
|
23730
|
+
...defaultProps$7,
|
|
23769
23731
|
...props
|
|
23770
23732
|
};
|
|
23771
23733
|
const [curData, setCurData] = React.useState(data);
|
|
@@ -23848,19 +23810,18 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23848
23810
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__main__body` }, renderBoyTrs())
|
|
23849
23811
|
), (summary || curData.length === 0) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__summary` }, summary || noData));
|
|
23850
23812
|
};
|
|
23851
|
-
Table.defaultProps = defaultProps$
|
|
23813
|
+
Table.defaultProps = defaultProps$7;
|
|
23852
23814
|
Table.displayName = "NutTable";
|
|
23853
|
-
const defaultProps$
|
|
23815
|
+
const defaultProps$6 = {
|
|
23854
23816
|
...ComponentDefaults,
|
|
23855
23817
|
type: "default",
|
|
23818
|
+
background: "",
|
|
23856
23819
|
color: "",
|
|
23857
|
-
textColor: "",
|
|
23858
23820
|
plain: false,
|
|
23859
23821
|
round: false,
|
|
23860
23822
|
mark: false,
|
|
23861
23823
|
closeable: false,
|
|
23862
23824
|
closeIcon: null,
|
|
23863
|
-
prefixCls: "nut-tag",
|
|
23864
23825
|
onClose: (e) => {
|
|
23865
23826
|
},
|
|
23866
23827
|
onClick: (e) => {
|
|
@@ -23870,86 +23831,70 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23870
23831
|
const {
|
|
23871
23832
|
className,
|
|
23872
23833
|
style,
|
|
23873
|
-
|
|
23834
|
+
background,
|
|
23874
23835
|
plain,
|
|
23875
23836
|
type: type2,
|
|
23876
23837
|
round,
|
|
23877
|
-
prefixCls: prefixCls2,
|
|
23878
23838
|
children,
|
|
23879
23839
|
mark,
|
|
23880
23840
|
closeable,
|
|
23881
23841
|
closeIcon,
|
|
23882
|
-
|
|
23842
|
+
color,
|
|
23883
23843
|
onClick,
|
|
23884
23844
|
onClose
|
|
23885
23845
|
} = {
|
|
23886
|
-
...defaultProps$
|
|
23846
|
+
...defaultProps$6,
|
|
23887
23847
|
...props
|
|
23888
23848
|
};
|
|
23889
|
-
const [
|
|
23890
|
-
const [
|
|
23891
|
-
|
|
23892
|
-
setBtnName(classes());
|
|
23893
|
-
}, [
|
|
23894
|
-
type2,
|
|
23895
|
-
color,
|
|
23896
|
-
textColor,
|
|
23897
|
-
plain,
|
|
23898
|
-
round,
|
|
23899
|
-
mark,
|
|
23900
|
-
closeable,
|
|
23901
|
-
prefixCls2,
|
|
23902
|
-
onClick,
|
|
23903
|
-
onClose,
|
|
23904
|
-
className
|
|
23905
|
-
]);
|
|
23849
|
+
const [tagClass, setTagClass] = React.useState("");
|
|
23850
|
+
const [visible, setVisible] = React.useState(true);
|
|
23851
|
+
const classPrefix2 = "nut-tag";
|
|
23906
23852
|
const classes = () => {
|
|
23907
|
-
const prefixCls22 = "nut-tag";
|
|
23908
23853
|
return classNames({
|
|
23909
|
-
[
|
|
23910
|
-
[`${
|
|
23911
|
-
[`${
|
|
23912
|
-
[`${
|
|
23913
|
-
[`${
|
|
23914
|
-
[`${
|
|
23854
|
+
[classPrefix2]: true,
|
|
23855
|
+
[`${classPrefix2}--${type2}`]: type2,
|
|
23856
|
+
[`${classPrefix2}--plain`]: plain,
|
|
23857
|
+
[`${classPrefix2}--round`]: round,
|
|
23858
|
+
[`${classPrefix2}--mark`]: mark,
|
|
23859
|
+
[`${classPrefix2}--close`]: closeable,
|
|
23915
23860
|
[`${className}`]: className
|
|
23916
23861
|
});
|
|
23917
23862
|
};
|
|
23863
|
+
React.useEffect(() => {
|
|
23864
|
+
setTagClass(classes());
|
|
23865
|
+
}, [type2, background, color, plain, round, mark, closeable, className]);
|
|
23918
23866
|
const handleClick2 = (e) => {
|
|
23919
|
-
|
|
23920
|
-
props.onClick(e);
|
|
23921
|
-
}
|
|
23867
|
+
onClick && onClick(e);
|
|
23922
23868
|
};
|
|
23923
23869
|
const getStyle = () => {
|
|
23924
23870
|
const style2 = {};
|
|
23925
|
-
if (
|
|
23926
|
-
style2.color = textColor;
|
|
23927
|
-
} else if (color && plain) {
|
|
23871
|
+
if (color) {
|
|
23928
23872
|
style2.color = color;
|
|
23873
|
+
} else if (background && plain) {
|
|
23874
|
+
style2.color = background;
|
|
23929
23875
|
}
|
|
23930
23876
|
if (plain) {
|
|
23931
|
-
style2.
|
|
23932
|
-
|
|
23933
|
-
|
|
23934
|
-
style2.background = color;
|
|
23877
|
+
style2.borderColor = background;
|
|
23878
|
+
} else if (background) {
|
|
23879
|
+
style2.background = background;
|
|
23935
23880
|
}
|
|
23936
23881
|
return style2;
|
|
23937
23882
|
};
|
|
23938
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, closeable ?
|
|
23883
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, closeable ? visible && /* @__PURE__ */ React.createElement(
|
|
23939
23884
|
"div",
|
|
23940
23885
|
{
|
|
23941
|
-
className:
|
|
23886
|
+
className: tagClass,
|
|
23942
23887
|
style: { ...style, ...getStyle() },
|
|
23943
23888
|
onClick: (e) => handleClick2(e)
|
|
23944
23889
|
},
|
|
23945
|
-
children && /* @__PURE__ */ React.createElement("span", { className:
|
|
23890
|
+
children && /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}-text` }, children),
|
|
23946
23891
|
React.isValidElement(closeIcon) ? /* @__PURE__ */ React.createElement(
|
|
23947
23892
|
"i",
|
|
23948
23893
|
{
|
|
23949
|
-
className:
|
|
23894
|
+
className: `${classPrefix2}-custom-icon`,
|
|
23950
23895
|
onClick: (e) => {
|
|
23951
|
-
|
|
23952
|
-
|
|
23896
|
+
setVisible(false);
|
|
23897
|
+
onClose && onClose(e);
|
|
23953
23898
|
}
|
|
23954
23899
|
},
|
|
23955
23900
|
closeIcon
|
|
@@ -23959,24 +23904,24 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23959
23904
|
width: 12,
|
|
23960
23905
|
height: 12,
|
|
23961
23906
|
onClick: (e) => {
|
|
23962
|
-
|
|
23963
|
-
|
|
23907
|
+
setVisible(false);
|
|
23908
|
+
onClose && onClose(e);
|
|
23964
23909
|
}
|
|
23965
23910
|
}
|
|
23966
23911
|
)
|
|
23967
23912
|
) : /* @__PURE__ */ React.createElement(
|
|
23968
23913
|
"div",
|
|
23969
23914
|
{
|
|
23970
|
-
className:
|
|
23915
|
+
className: tagClass,
|
|
23971
23916
|
style: { ...style, ...getStyle() },
|
|
23972
23917
|
onClick: (e) => handleClick2(e)
|
|
23973
23918
|
},
|
|
23974
|
-
children && /* @__PURE__ */ React.createElement("span", { className:
|
|
23919
|
+
children && /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}-text` }, children)
|
|
23975
23920
|
));
|
|
23976
23921
|
};
|
|
23977
|
-
Tag.defaultProps = defaultProps$
|
|
23922
|
+
Tag.defaultProps = defaultProps$6;
|
|
23978
23923
|
Tag.displayName = "NutTag";
|
|
23979
|
-
const defaultProps$
|
|
23924
|
+
const defaultProps$5 = {
|
|
23980
23925
|
...ComponentDefaults,
|
|
23981
23926
|
list: [],
|
|
23982
23927
|
interval: 500,
|
|
@@ -23997,7 +23942,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23997
23942
|
gapY,
|
|
23998
23943
|
...restProps
|
|
23999
23944
|
} = {
|
|
24000
|
-
...defaultProps$
|
|
23945
|
+
...defaultProps$5,
|
|
24001
23946
|
...props
|
|
24002
23947
|
};
|
|
24003
23948
|
const barrageBody = React.useRef(null);
|
|
@@ -24063,250 +24008,243 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
24063
24008
|
return /* @__PURE__ */ React.createElement("div", { className: classes, ref: barrageBody, ...restProps }, /* @__PURE__ */ React.createElement("div", { ref: barrageContainer, className: "bContainer" }));
|
|
24064
24009
|
};
|
|
24065
24010
|
const Barrage = React.forwardRef(InternalBarrage);
|
|
24066
|
-
Barrage.defaultProps = defaultProps$
|
|
24011
|
+
Barrage.defaultProps = defaultProps$5;
|
|
24067
24012
|
Barrage.displayName = "NutBarrage";
|
|
24068
|
-
const defaultProps$
|
|
24013
|
+
const defaultProps$4 = {
|
|
24014
|
+
...ComponentDefaults,
|
|
24015
|
+
src: "",
|
|
24016
|
+
title: "",
|
|
24017
|
+
price: "",
|
|
24018
|
+
vipPrice: "",
|
|
24019
|
+
shopDescription: "",
|
|
24020
|
+
delivery: "",
|
|
24021
|
+
shopName: "",
|
|
24022
|
+
description: "",
|
|
24023
|
+
tag: "",
|
|
24024
|
+
priceTag: "",
|
|
24025
|
+
extra: ""
|
|
24026
|
+
};
|
|
24069
24027
|
const Card = (props) => {
|
|
24070
24028
|
const {
|
|
24071
24029
|
className,
|
|
24072
24030
|
style,
|
|
24073
|
-
|
|
24031
|
+
src,
|
|
24074
24032
|
title,
|
|
24075
24033
|
price,
|
|
24076
24034
|
vipPrice,
|
|
24077
|
-
|
|
24035
|
+
shopDescription,
|
|
24078
24036
|
delivery,
|
|
24079
24037
|
shopName,
|
|
24080
|
-
|
|
24081
|
-
|
|
24082
|
-
|
|
24083
|
-
|
|
24038
|
+
tag,
|
|
24039
|
+
priceTag,
|
|
24040
|
+
description,
|
|
24041
|
+
extra,
|
|
24084
24042
|
...rest
|
|
24085
24043
|
} = {
|
|
24086
|
-
...defaultProps$
|
|
24044
|
+
...defaultProps$4,
|
|
24087
24045
|
...props
|
|
24088
24046
|
};
|
|
24089
|
-
const
|
|
24090
|
-
return /* @__PURE__ */ React.createElement("div", { className: classNames(
|
|
24047
|
+
const classPrefix2 = "nut-card";
|
|
24048
|
+
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style, ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__left` }, /* @__PURE__ */ React.createElement("img", { src, alt: "" })), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__right` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__right-title` }, title), description, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-price` }, /* @__PURE__ */ React.createElement(Price, { size: "normal", price }), priceTag || /* @__PURE__ */ React.createElement(
|
|
24049
|
+
Price,
|
|
24050
|
+
{
|
|
24051
|
+
size: "normal",
|
|
24052
|
+
className: `${classPrefix2}right-price-origin`,
|
|
24053
|
+
price: vipPrice
|
|
24054
|
+
}
|
|
24055
|
+
)), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-other` }, tag || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Tag, { type: "danger" }, shopDescription), /* @__PURE__ */ React.createElement(Tag, { plain: true }, delivery))), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-shop` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-shop-name` }, shopName), extra)));
|
|
24091
24056
|
};
|
|
24092
|
-
Card.defaultProps = defaultProps$
|
|
24057
|
+
Card.defaultProps = defaultProps$4;
|
|
24093
24058
|
Card.displayName = "NutCard";
|
|
24094
|
-
const defaultProps$
|
|
24095
|
-
|
|
24096
|
-
|
|
24097
|
-
|
|
24098
|
-
|
|
24099
|
-
|
|
24059
|
+
const defaultProps$3 = {
|
|
24060
|
+
...ComponentDefaults,
|
|
24061
|
+
activeDate: "",
|
|
24062
|
+
activeTime: [],
|
|
24063
|
+
options: [],
|
|
24064
|
+
optionKey: {
|
|
24065
|
+
valueKey: "value",
|
|
24066
|
+
textKey: "text",
|
|
24067
|
+
childrenKey: "children"
|
|
24068
|
+
},
|
|
24069
|
+
onSelect: () => {
|
|
24070
|
+
}
|
|
24100
24071
|
};
|
|
24101
24072
|
const TimeDetail = (props) => {
|
|
24102
|
-
|
|
24103
|
-
|
|
24104
|
-
...defaultProps$4,
|
|
24073
|
+
const { options: options2, optionKey, className, activeDate, activeTime, onSelect } = {
|
|
24074
|
+
...defaultProps$3,
|
|
24105
24075
|
...props
|
|
24106
24076
|
};
|
|
24107
|
-
const
|
|
24108
|
-
const
|
|
24109
|
-
|
|
24110
|
-
|
|
24111
|
-
|
|
24112
|
-
|
|
24113
|
-
|
|
24114
|
-
|
|
24115
|
-
|
|
24116
|
-
|
|
24117
|
-
|
|
24118
|
-
|
|
24119
|
-
|
|
24120
|
-
|
|
24121
|
-
|
|
24122
|
-
|
|
24123
|
-
|
|
24124
|
-
|
|
24125
|
-
|
|
24126
|
-
|
|
24127
|
-
|
|
24128
|
-
|
|
24129
|
-
|
|
24077
|
+
const classPrefix2 = "nut-timedetail";
|
|
24078
|
+
const timeList = React.useMemo(() => {
|
|
24079
|
+
return (options2 == null ? void 0 : options2.find(
|
|
24080
|
+
(item) => item[optionKey.valueKey] === activeDate
|
|
24081
|
+
)) || {
|
|
24082
|
+
[optionKey.childrenKey]: []
|
|
24083
|
+
};
|
|
24084
|
+
}, [options2, optionKey, activeDate]);
|
|
24085
|
+
const isActive = React.useCallback(
|
|
24086
|
+
(timeKey) => {
|
|
24087
|
+
const date2 = activeTime.find((item) => {
|
|
24088
|
+
return item[optionKey.valueKey] === activeDate;
|
|
24089
|
+
});
|
|
24090
|
+
if (date2 == null ? void 0 : date2[optionKey.childrenKey]) {
|
|
24091
|
+
const time = date2 == null ? void 0 : date2[optionKey.childrenKey].find((time2) => {
|
|
24092
|
+
return time2[optionKey.valueKey] === timeKey;
|
|
24093
|
+
});
|
|
24094
|
+
return time;
|
|
24095
|
+
}
|
|
24096
|
+
return false;
|
|
24097
|
+
},
|
|
24098
|
+
[activeTime, optionKey, activeDate]
|
|
24099
|
+
);
|
|
24100
|
+
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className) }, timeList[optionKey.childrenKey].map((item) => /* @__PURE__ */ React.createElement(
|
|
24130
24101
|
"span",
|
|
24131
24102
|
{
|
|
24132
|
-
className:
|
|
24133
|
-
|
|
24134
|
-
|
|
24103
|
+
className: classNames(`${classPrefix2}__item`, {
|
|
24104
|
+
active: isActive(item[optionKey.valueKey])
|
|
24105
|
+
}),
|
|
24106
|
+
key: item[optionKey.valueKey],
|
|
24107
|
+
onClick: () => onSelect(item)
|
|
24135
24108
|
},
|
|
24136
|
-
item
|
|
24109
|
+
item[optionKey.textKey]
|
|
24137
24110
|
)));
|
|
24138
24111
|
};
|
|
24139
|
-
TimeDetail.defaultProps = defaultProps$
|
|
24112
|
+
TimeDetail.defaultProps = defaultProps$3;
|
|
24140
24113
|
TimeDetail.displayName = "NutTimeDetail";
|
|
24141
|
-
const defaultProps$3 = {
|
|
24142
|
-
className: "",
|
|
24143
|
-
date: "",
|
|
24144
|
-
curKey: 0
|
|
24145
|
-
};
|
|
24146
|
-
const TimePannel = (props) => {
|
|
24147
|
-
useConfig();
|
|
24148
|
-
const { children, className, date: date2, curKey, change } = {
|
|
24149
|
-
...defaultProps$3,
|
|
24150
|
-
...props
|
|
24151
|
-
};
|
|
24152
|
-
const b = cn("timepannel");
|
|
24153
|
-
return /* @__PURE__ */ React.createElement("div", { className: `${b()} ${className || ""}`, onClick: () => change(curKey) }, date2);
|
|
24154
|
-
};
|
|
24155
|
-
TimePannel.defaultProps = defaultProps$3;
|
|
24156
|
-
TimePannel.displayName = "NutTimePannel";
|
|
24157
24114
|
const defaultProps$2 = {
|
|
24158
|
-
|
|
24159
|
-
style: {},
|
|
24115
|
+
...ComponentDefaults,
|
|
24160
24116
|
visible: false,
|
|
24161
|
-
height: "20%",
|
|
24162
24117
|
multiple: false,
|
|
24163
|
-
|
|
24164
|
-
|
|
24165
|
-
|
|
24166
|
-
|
|
24167
|
-
|
|
24118
|
+
defaultValue: [],
|
|
24119
|
+
options: [],
|
|
24120
|
+
optionKey: {
|
|
24121
|
+
valueKey: "value",
|
|
24122
|
+
textKey: "text",
|
|
24123
|
+
childrenKey: "children"
|
|
24124
|
+
}
|
|
24168
24125
|
};
|
|
24169
24126
|
const TimeSelect = (props) => {
|
|
24170
|
-
useConfig();
|
|
24127
|
+
const { locale } = useConfig();
|
|
24171
24128
|
const {
|
|
24172
24129
|
visible,
|
|
24173
24130
|
className,
|
|
24174
|
-
|
|
24131
|
+
style,
|
|
24175
24132
|
title,
|
|
24176
|
-
|
|
24177
|
-
|
|
24178
|
-
|
|
24179
|
-
times,
|
|
24133
|
+
defaultValue,
|
|
24134
|
+
options: options2,
|
|
24135
|
+
optionKey,
|
|
24180
24136
|
multiple,
|
|
24181
|
-
select,
|
|
24182
|
-
pannelChange,
|
|
24183
|
-
timeChange,
|
|
24184
24137
|
onSelect,
|
|
24185
|
-
|
|
24186
|
-
onTimeChange
|
|
24138
|
+
onDateChange,
|
|
24139
|
+
onTimeChange,
|
|
24140
|
+
...rest
|
|
24187
24141
|
} = {
|
|
24188
24142
|
...defaultProps$2,
|
|
24189
24143
|
...props
|
|
24190
24144
|
};
|
|
24191
|
-
const [
|
|
24145
|
+
const [activeDate, setActiveDate] = React.useState(() => {
|
|
24146
|
+
if (defaultValue == null ? void 0 : defaultValue.length) {
|
|
24147
|
+
return defaultValue[0][optionKey.valueKey];
|
|
24148
|
+
}
|
|
24149
|
+
if (options2 == null ? void 0 : options2.length) {
|
|
24150
|
+
return options2[0][optionKey.valueKey];
|
|
24151
|
+
}
|
|
24152
|
+
return "";
|
|
24153
|
+
});
|
|
24192
24154
|
const [activeTime, setActiveTime] = React.useState(
|
|
24193
|
-
|
|
24194
|
-
{
|
|
24195
|
-
key: currentKey,
|
|
24196
|
-
list: []
|
|
24197
|
-
}
|
|
24198
|
-
]
|
|
24155
|
+
() => defaultValue || []
|
|
24199
24156
|
);
|
|
24200
|
-
const
|
|
24201
|
-
const popStyle = {
|
|
24202
|
-
width: "100%",
|
|
24203
|
-
height
|
|
24204
|
-
};
|
|
24205
|
-
const b = cn("timeselect");
|
|
24157
|
+
const classPrefix2 = "nut-timeselect";
|
|
24206
24158
|
const closeFun = () => {
|
|
24207
|
-
|
|
24208
|
-
|
|
24209
|
-
|
|
24210
|
-
|
|
24211
|
-
|
|
24212
|
-
|
|
24213
|
-
|
|
24214
|
-
|
|
24215
|
-
|
|
24216
|
-
|
|
24217
|
-
|
|
24218
|
-
|
|
24219
|
-
|
|
24220
|
-
|
|
24221
|
-
|
|
24222
|
-
|
|
24223
|
-
|
|
24224
|
-
|
|
24225
|
-
);
|
|
24226
|
-
if (curTimeIndex === -1) {
|
|
24227
|
-
curTimeData.list.push(time);
|
|
24228
|
-
} else {
|
|
24229
|
-
curTimeData.list.splice(curTimeIndex, 1);
|
|
24230
|
-
}
|
|
24231
|
-
const resultTimeData = [...activeTime];
|
|
24232
|
-
resultTimeData.splice(curIndex, 1, curTimeData);
|
|
24233
|
-
setActiveTime(resultTimeData);
|
|
24234
|
-
if (onTimeChange) {
|
|
24235
|
-
onTimeChange(time, resultTimeData);
|
|
24236
|
-
} else if (timeChange) {
|
|
24237
|
-
timeChange(time, resultTimeData);
|
|
24238
|
-
}
|
|
24239
|
-
};
|
|
24240
|
-
const handleChange = (pannelKey) => {
|
|
24241
|
-
const resultTimeData = [...activeTime];
|
|
24242
|
-
if (String(pannelKey) !== String(activeKey)) {
|
|
24243
|
-
setActiveKey == null ? void 0 : setActiveKey(pannelKey);
|
|
24244
|
-
if (multiple) {
|
|
24245
|
-
const curTimeDataIndex = activeTime.findIndex(
|
|
24246
|
-
(item) => String(item.key) === String(pannelKey)
|
|
24247
|
-
);
|
|
24248
|
-
if (curTimeDataIndex === -1) {
|
|
24249
|
-
resultTimeData.push({
|
|
24250
|
-
key: pannelKey,
|
|
24251
|
-
list: []
|
|
24252
|
-
});
|
|
24253
|
-
setActiveTime(resultTimeData);
|
|
24159
|
+
onSelect && onSelect(activeTime);
|
|
24160
|
+
};
|
|
24161
|
+
const handleSelectTime = (selectTime) => {
|
|
24162
|
+
let newActiveTime = [...activeTime];
|
|
24163
|
+
const date2 = newActiveTime.find((item) => {
|
|
24164
|
+
return item[optionKey.valueKey] === activeDate;
|
|
24165
|
+
});
|
|
24166
|
+
if (date2) {
|
|
24167
|
+
const timeIndex = date2[optionKey.childrenKey].findIndex(
|
|
24168
|
+
(time) => {
|
|
24169
|
+
return time[optionKey.valueKey] === selectTime[optionKey.valueKey];
|
|
24170
|
+
}
|
|
24171
|
+
);
|
|
24172
|
+
if (timeIndex > -1) {
|
|
24173
|
+
if (multiple) {
|
|
24174
|
+
date2[optionKey.childrenKey].splice(timeIndex, 1);
|
|
24175
|
+
} else {
|
|
24176
|
+
newActiveTime = [];
|
|
24254
24177
|
}
|
|
24178
|
+
} else if (multiple) {
|
|
24179
|
+
date2[optionKey.childrenKey].push({ ...selectTime });
|
|
24255
24180
|
} else {
|
|
24256
|
-
|
|
24181
|
+
newActiveTime = [
|
|
24257
24182
|
{
|
|
24258
|
-
|
|
24259
|
-
|
|
24183
|
+
[optionKey.valueKey]: activeDate,
|
|
24184
|
+
[optionKey.childrenKey]: [{ ...selectTime }]
|
|
24260
24185
|
}
|
|
24261
|
-
]
|
|
24186
|
+
];
|
|
24262
24187
|
}
|
|
24188
|
+
} else if (multiple) {
|
|
24189
|
+
newActiveTime.push({
|
|
24190
|
+
[optionKey.valueKey]: activeDate,
|
|
24191
|
+
[optionKey.childrenKey]: [{ ...selectTime }]
|
|
24192
|
+
});
|
|
24193
|
+
} else {
|
|
24194
|
+
newActiveTime = [
|
|
24195
|
+
{
|
|
24196
|
+
[optionKey.valueKey]: activeDate,
|
|
24197
|
+
[optionKey.childrenKey]: [{ ...selectTime }]
|
|
24198
|
+
}
|
|
24199
|
+
];
|
|
24263
24200
|
}
|
|
24264
|
-
|
|
24265
|
-
|
|
24266
|
-
|
|
24267
|
-
|
|
24268
|
-
|
|
24201
|
+
newActiveTime = newActiveTime.filter((item) => {
|
|
24202
|
+
var _a2;
|
|
24203
|
+
return ((_a2 = item[optionKey.childrenKey]) == null ? void 0 : _a2.length) > 0;
|
|
24204
|
+
});
|
|
24205
|
+
setActiveTime(newActiveTime);
|
|
24206
|
+
onTimeChange && onTimeChange(selectTime, newActiveTime);
|
|
24269
24207
|
};
|
|
24270
|
-
const
|
|
24271
|
-
|
|
24272
|
-
|
|
24273
|
-
}
|
|
24274
|
-
return "";
|
|
24208
|
+
const handleChange = (date2) => {
|
|
24209
|
+
setActiveDate(date2[optionKey.valueKey]);
|
|
24210
|
+
onDateChange && onDateChange(date2, activeTime);
|
|
24275
24211
|
};
|
|
24276
|
-
React.
|
|
24277
|
-
setPopVisible(visible);
|
|
24278
|
-
}, [visible]);
|
|
24279
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
24212
|
+
return /* @__PURE__ */ React.createElement(
|
|
24280
24213
|
Popup,
|
|
24281
24214
|
{
|
|
24282
24215
|
closeable: true,
|
|
24283
24216
|
round: true,
|
|
24284
|
-
visible
|
|
24217
|
+
visible,
|
|
24285
24218
|
position: "bottom",
|
|
24286
|
-
style:
|
|
24287
|
-
|
|
24288
|
-
|
|
24289
|
-
|
|
24219
|
+
style: {
|
|
24220
|
+
width: "100%",
|
|
24221
|
+
height: "20%",
|
|
24222
|
+
...style
|
|
24223
|
+
},
|
|
24224
|
+
onClose: closeFun,
|
|
24225
|
+
...rest
|
|
24290
24226
|
},
|
|
24291
|
-
/* @__PURE__ */ React.createElement("div", { className:
|
|
24292
|
-
|
|
24227
|
+
/* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className) }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__title` }, title || locale.timeselect.pickupTime), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content-left` }, options2.map((item) => /* @__PURE__ */ React.createElement(
|
|
24228
|
+
"div",
|
|
24293
24229
|
{
|
|
24294
|
-
|
|
24295
|
-
className:
|
|
24296
|
-
|
|
24297
|
-
|
|
24298
|
-
|
|
24299
|
-
}
|
|
24230
|
+
key: item[optionKey.valueKey],
|
|
24231
|
+
className: classNames("nut-timepannel", {
|
|
24232
|
+
active: item[optionKey.valueKey] === activeDate
|
|
24233
|
+
}),
|
|
24234
|
+
onClick: () => handleChange(item)
|
|
24235
|
+
},
|
|
24236
|
+
item[optionKey.textKey]
|
|
24300
24237
|
))), /* @__PURE__ */ React.createElement(
|
|
24301
24238
|
TimeDetail,
|
|
24302
24239
|
{
|
|
24303
|
-
|
|
24304
|
-
|
|
24305
|
-
|
|
24306
|
-
|
|
24240
|
+
options: options2,
|
|
24241
|
+
optionKey,
|
|
24242
|
+
activeDate,
|
|
24243
|
+
activeTime,
|
|
24244
|
+
onSelect: handleSelectTime
|
|
24307
24245
|
}
|
|
24308
24246
|
)))
|
|
24309
|
-
)
|
|
24247
|
+
);
|
|
24310
24248
|
};
|
|
24311
24249
|
TimeSelect.defaultProps = defaultProps$2;
|
|
24312
24250
|
TimeSelect.displayName = "NutTimeSelect";
|
|
@@ -24543,7 +24481,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
24543
24481
|
exports2.Image = Image$1;
|
|
24544
24482
|
exports2.ImagePreview = ImagePreview;
|
|
24545
24483
|
exports2.Indicator = Indicator;
|
|
24546
|
-
exports2.
|
|
24484
|
+
exports2.InfiniteLoading = InfiniteLoading;
|
|
24547
24485
|
exports2.Input = Input;
|
|
24548
24486
|
exports2.InputNumber = InputNumber;
|
|
24549
24487
|
exports2.Layout = Layout;
|
|
@@ -24588,7 +24526,6 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
24588
24526
|
exports2.Tag = Tag;
|
|
24589
24527
|
exports2.TextArea = TextArea;
|
|
24590
24528
|
exports2.TimeDetail = TimeDetail;
|
|
24591
|
-
exports2.TimePannel = TimePannel;
|
|
24592
24529
|
exports2.TimeSelect = TimeSelect;
|
|
24593
24530
|
exports2.Toast = Toast;
|
|
24594
24531
|
exports2.TrendArrow = TrendArrow;
|