@nutui/nutui-react 2.0.0-alpha.13 → 2.0.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/dist/esm/ActionSheet/style/style.css +1 -1
- package/dist/esm/Address/style/style.css +1 -1
- package/dist/esm/Avatar.js +1 -1
- package/dist/esm/AvatarGroup.js +1 -1
- package/dist/esm/Barrage/style/style.css +1 -1
- package/dist/esm/Barrage.js +23 -24
- package/dist/esm/Calendar/style/style.css +1 -1
- package/dist/esm/Card/style/style.css +1 -1
- package/dist/esm/Card.js +35 -22
- package/dist/esm/Cascader/style/style.css +1 -1
- package/dist/esm/CircleProgress.js +1 -1
- package/dist/esm/ConfigProvider.js +1 -1
- package/dist/esm/DatePicker/style/style.css +1 -1
- package/dist/esm/ImagePreview/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/NumberKeyboard/style/style.css +1 -1
- package/dist/esm/Picker/style/style.css +1 -1
- package/dist/esm/Picker.js +37 -40
- package/dist/esm/Popover/style/index.js +1 -1
- package/dist/esm/Popover/style/style.css +1 -1
- package/dist/esm/Popover.js +214 -166
- package/dist/esm/Popup/style/style.css +1 -1
- package/dist/esm/ShortPassword/style/style.css +1 -1
- package/dist/esm/SideNavBar/style/style.css +1 -1
- package/dist/esm/SideNavBar.js +17 -15
- package/dist/esm/SideNavBarItem/style/style.css +1 -1
- package/dist/esm/SideNavBarItem.js +5 -4
- 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/Step.js +1 -1
- package/dist/esm/Steps.js +1 -1
- package/dist/esm/SubSideNavBar/style/style.css +1 -1
- package/dist/esm/SubSideNavBar.js +12 -12
- package/dist/esm/Swiper.js +1 -1
- package/dist/esm/SwiperItem.js +1 -1
- package/dist/esm/Tag/style/style.css +1 -1
- package/dist/esm/Tag.js +26 -30
- package/dist/esm/TextArea/style/style.css +1 -1
- 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/context.js +16 -2
- package/dist/esm/context2.js +2 -2
- package/dist/esm/context4.js +5 -0
- package/dist/esm/index.js +11 -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/barrage/barrage.d.ts +6 -7
- package/dist/esm/types/src/packages/barrage/barrage.taro.d.ts +6 -7
- package/dist/esm/types/src/packages/barrage/index.d.ts +1 -0
- package/dist/esm/types/src/packages/barrage/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/button/button.d.ts +1 -0
- package/dist/esm/types/src/packages/card/card.d.ts +8 -9
- package/dist/esm/types/src/packages/card/card.taro.d.ts +8 -9
- package/dist/esm/types/src/packages/card/index.d.ts +1 -0
- package/dist/esm/types/src/packages/card/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
- package/dist/esm/types/src/packages/imagepreview/imagepreview.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/infiniteloading/demo.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/infiniteloading/index.d.ts +3 -2
- package/dist/esm/types/src/packages/infiniteloading/index.taro.d.ts +3 -2
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.d.ts +9 -14
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.taro.d.ts +8 -12
- package/dist/esm/types/src/packages/input/input.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/menu/menu.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +2 -3
- package/dist/esm/types/src/packages/nutui.react.d.ts +2 -4
- package/dist/esm/types/src/packages/nutui.react.scss.d.ts +0 -1
- package/dist/esm/types/src/packages/nutui.react.taro.d.ts +1 -3
- package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +0 -1
- package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +1 -2
- package/dist/esm/types/src/packages/picker/doc.en.d.ts +9 -9
- package/dist/esm/types/src/packages/popover/demo.d.ts +3 -2
- package/dist/esm/types/src/packages/popover/demo.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/popover/index.d.ts +1 -0
- package/dist/esm/types/src/packages/popover/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/popover/popover.d.ts +20 -9
- package/dist/esm/types/src/packages/popover/popover.taro.d.ts +20 -10
- package/dist/esm/types/src/packages/sidenavbar/index.d.ts +1 -0
- package/dist/esm/types/src/packages/sidenavbar/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/sidenavbar/sidenavbar.d.ts +5 -9
- package/dist/esm/types/src/packages/sidenavbar/sidenavbar.taro.d.ts +5 -9
- package/dist/esm/types/src/packages/sidenavbaritem/index.d.ts +1 -0
- package/dist/esm/types/src/packages/sidenavbaritem/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/sidenavbaritem/sidenavbaritem.d.ts +3 -3
- package/dist/esm/types/src/packages/sidenavbaritem/sidenavbaritem.taro.d.ts +3 -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/subsidenavbar/index.d.ts +1 -0
- package/dist/esm/types/src/packages/subsidenavbar/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/subsidenavbar/subsidenavbar.d.ts +3 -3
- package/dist/esm/types/src/packages/subsidenavbar/subsidenavbar.taro.d.ts +3 -3
- 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/utils/index.d.ts +1 -0
- package/dist/esm/types/src/utils/use-click-away.d.ts +3 -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 +909 -820
- package/dist/nutui.react.umd.js +909 -820
- package/dist/packages/barrage/barrage.scss +0 -13
- package/dist/packages/card/card.scss +8 -14
- package/dist/packages/infiniteloading/infiniteloading.scss +2 -25
- package/dist/packages/popover/popover.scss +158 -230
- package/dist/packages/popup/popup.scss +36 -0
- package/dist/packages/sidenavbar/sidenavbar.scss +10 -16
- package/dist/packages/sidenavbaritem/sidenavbaritem.scss +7 -19
- package/dist/packages/signature/signature.scss +1 -18
- package/dist/packages/subsidenavbar/subsidenavbar.scss +10 -19
- 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 +85 -144
- package/dist/styles/variables.scss +96 -155
- package/dist/types/index.d.ts +2 -3
- package/dist/types/locales/base.d.ts +1 -1
- package/dist/types/packages/barrage/barrage.d.ts +32 -9
- package/dist/types/packages/barrage/index.d.ts +1 -0
- package/dist/types/packages/button/button.d.ts +1 -0
- package/dist/types/packages/card/card.d.ts +57 -14
- package/dist/types/packages/card/index.d.ts +1 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/infiniteloading/index.d.ts +3 -2
- package/dist/types/packages/infiniteloading/infiniteloading.d.ts +57 -18
- package/dist/types/packages/popover/index.d.ts +1 -0
- package/dist/types/packages/popover/popover.d.ts +99 -12
- package/dist/types/packages/sidenavbar/index.d.ts +1 -0
- package/dist/types/packages/sidenavbar/sidenavbar.d.ts +33 -13
- package/dist/types/packages/sidenavbaritem/index.d.ts +1 -0
- package/dist/types/packages/sidenavbaritem/sidenavbaritem.d.ts +3 -3
- package/dist/types/packages/signature/index.d.ts +1 -0
- package/dist/types/packages/signature/signature.d.ts +38 -12
- package/dist/types/packages/subsidenavbar/index.d.ts +1 -0
- package/dist/types/packages/subsidenavbar/subsidenavbar.d.ts +3 -3
- 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/utils/index.d.ts +1 -0
- package/dist/types/utils/use-click-away.d.ts +3 -0
- 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/offsetContext.js +0 -19
- package/dist/esm/types/src/packages/popover/Trigger.d.ts +0 -19
- package/dist/esm/types/src/packages/sidenavbar/type.d.ts +0 -34
- 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/popover/Trigger.d.ts +0 -19
- 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/esm/types/src/packages/sidenavbar/{offsetContext.d.ts → context.d.ts} +0 -0
- /package/dist/types/packages/sidenavbar/{offsetContext.d.ts → context.d.ts} +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.15 Wed Jun 07 2023 16:11:56 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: "",
|
|
@@ -11253,28 +11253,29 @@ 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();
|
|
11260
11260
|
const isIcon = e.target.className.includes("arrow-icon");
|
|
11261
11261
|
const isTitle = e.target.className.includes("__title") || isIcon;
|
|
11262
11262
|
const currentClass = e.currentTarget.className;
|
|
11263
|
-
const isShow = currentClass.includes("
|
|
11263
|
+
const isShow = currentClass.includes("sidenavbar-show");
|
|
11264
11264
|
const arrowIcon = e.currentTarget.querySelector(".arrow-icon");
|
|
11265
11265
|
const iconClass = arrowIcon.className;
|
|
11266
11266
|
if (isTitle) {
|
|
11267
|
-
e.currentTarget.className = isShow ? currentClass.replace("
|
|
11267
|
+
e.currentTarget.className = isShow ? currentClass.replace("sidenavbar-show", "sidenavbar-hide") : currentClass.replace("sidenavbar-hide", "sidenavbar-show");
|
|
11268
11268
|
arrowIcon.className = isShow ? iconClass.replace("arrow-down", "arrow-up") : iconClass.replace("arrow-up", "arrow-down");
|
|
11269
11269
|
}
|
|
11270
11270
|
};
|
|
11271
11271
|
const OffsetContext = React.createContext(20);
|
|
11272
|
-
const defaultProps$
|
|
11273
|
-
|
|
11272
|
+
const defaultProps$1a = {
|
|
11273
|
+
...ComponentDefaults,
|
|
11274
11274
|
position: "left",
|
|
11275
11275
|
width: "80%"
|
|
11276
11276
|
};
|
|
11277
11277
|
const SideNavBar = (props) => {
|
|
11278
|
+
const classPrefix2 = "nut-sidenavbar";
|
|
11278
11279
|
const {
|
|
11279
11280
|
title,
|
|
11280
11281
|
visible,
|
|
@@ -11282,14 +11283,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11282
11283
|
position,
|
|
11283
11284
|
children,
|
|
11284
11285
|
className,
|
|
11285
|
-
showhead,
|
|
11286
11286
|
onClose,
|
|
11287
11287
|
...rest
|
|
11288
11288
|
} = {
|
|
11289
|
-
...defaultProps$
|
|
11289
|
+
...defaultProps$1a,
|
|
11290
11290
|
...props
|
|
11291
11291
|
};
|
|
11292
|
-
const
|
|
11292
|
+
const indent = props.indent ? Number(props.indent) : 20;
|
|
11293
11293
|
return /* @__PURE__ */ React.createElement(
|
|
11294
11294
|
Popup,
|
|
11295
11295
|
{
|
|
@@ -11298,58 +11298,60 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11298
11298
|
position,
|
|
11299
11299
|
onClose
|
|
11300
11300
|
},
|
|
11301
|
-
/* @__PURE__ */ React.createElement(
|
|
11301
|
+
/* @__PURE__ */ React.createElement("div", { className: classNames(className, classPrefix2), ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content` }, /* @__PURE__ */ React.createElement(
|
|
11302
11302
|
"div",
|
|
11303
11303
|
{
|
|
11304
|
-
className:
|
|
11305
|
-
|
|
11304
|
+
className: `${classPrefix2}__list sidenavbar-show`,
|
|
11305
|
+
onClick: handleClick
|
|
11306
11306
|
},
|
|
11307
|
-
/* @__PURE__ */ React.createElement(
|
|
11307
|
+
/* @__PURE__ */ React.createElement(
|
|
11308
11308
|
"div",
|
|
11309
11309
|
{
|
|
11310
|
-
className:
|
|
11311
|
-
style: { paddingLeft: `${
|
|
11310
|
+
className: `${classPrefix2}__title ${classPrefix2}-border-bt`,
|
|
11311
|
+
style: { paddingLeft: `${indent}px` }
|
|
11312
11312
|
},
|
|
11313
11313
|
title,
|
|
11314
11314
|
" ",
|
|
11315
11315
|
/* @__PURE__ */ React.createElement("i", { className: "arrow-icon arrow-down" })
|
|
11316
|
-
),
|
|
11317
|
-
|
|
11316
|
+
),
|
|
11317
|
+
/* @__PURE__ */ React.createElement(OffsetContext.Provider, { value: indent }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content` }, children))
|
|
11318
|
+
)))
|
|
11318
11319
|
);
|
|
11319
11320
|
};
|
|
11320
|
-
SideNavBar.defaultProps = defaultProps$
|
|
11321
|
+
SideNavBar.defaultProps = defaultProps$1a;
|
|
11321
11322
|
SideNavBar.displayName = "NutSideNavBar";
|
|
11322
11323
|
const SideNavBarItem = (props) => {
|
|
11323
|
-
const
|
|
11324
|
+
const classPrefix2 = "nut-subsidenavbar";
|
|
11325
|
+
const { title, value, children, onClick, ...rest } = props;
|
|
11324
11326
|
const clickFn = (e) => {
|
|
11325
11327
|
e.stopPropagation();
|
|
11326
|
-
onClick && onClick({ title,
|
|
11328
|
+
onClick && onClick({ title, value });
|
|
11327
11329
|
};
|
|
11328
11330
|
return /* @__PURE__ */ React.createElement(
|
|
11329
11331
|
"div",
|
|
11330
11332
|
{
|
|
11331
|
-
className:
|
|
11333
|
+
className: `${classPrefix2}__item ${classPrefix2}-border-bt`,
|
|
11332
11334
|
onClick: clickFn,
|
|
11333
11335
|
...rest
|
|
11334
11336
|
},
|
|
11335
11337
|
title
|
|
11336
11338
|
);
|
|
11337
11339
|
};
|
|
11338
|
-
const defaultProps$
|
|
11340
|
+
const defaultProps$19 = {
|
|
11339
11341
|
open: true
|
|
11340
11342
|
};
|
|
11341
11343
|
const SubSideNavBar = (props) => {
|
|
11342
|
-
const
|
|
11343
|
-
|
|
11344
|
+
const classPrefix2 = "nut-subsidenavbar";
|
|
11345
|
+
const { title, value, children, onClick, open, ...rest } = {
|
|
11346
|
+
...defaultProps$19,
|
|
11344
11347
|
...props
|
|
11345
11348
|
};
|
|
11346
11349
|
const offset = React.useContext(OffsetContext);
|
|
11347
|
-
console.log("offset>>>>>>>", offset);
|
|
11348
11350
|
const listRef = React.useRef(null);
|
|
11349
11351
|
const setListLevel = React.useCallback(
|
|
11350
11352
|
(nodeList, level = 1) => {
|
|
11351
11353
|
const titleClass = nodeList[0].className;
|
|
11352
|
-
if (titleClass.includes(
|
|
11354
|
+
if (titleClass.includes(`${classPrefix2}__title`)) {
|
|
11353
11355
|
const left = offset * (level + 1);
|
|
11354
11356
|
nodeList[0].style.paddingLeft = `${left}px`;
|
|
11355
11357
|
}
|
|
@@ -11358,11 +11360,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11358
11360
|
);
|
|
11359
11361
|
childNodes.forEach((item) => {
|
|
11360
11362
|
const itemClass = item.className;
|
|
11361
|
-
if (itemClass.includes(
|
|
11363
|
+
if (itemClass.includes(`${classPrefix2}__item`)) {
|
|
11362
11364
|
const left = offset * (level + 2);
|
|
11363
11365
|
item.style.paddingLeft = `${left}px`;
|
|
11364
11366
|
}
|
|
11365
|
-
if (itemClass.includes(
|
|
11367
|
+
if (itemClass.includes(`${classPrefix2}__list`)) {
|
|
11366
11368
|
let level2 = item.getAttribute("level") ? Number(item.getAttribute("level")) : 1;
|
|
11367
11369
|
level2 += 1;
|
|
11368
11370
|
item.setAttribute("level", level2.toString());
|
|
@@ -11375,8 +11377,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11375
11377
|
const clickFn = (e) => {
|
|
11376
11378
|
handleClick(e);
|
|
11377
11379
|
const currentClass = e.currentTarget.className;
|
|
11378
|
-
const isShow = currentClass.includes("
|
|
11379
|
-
onClick && onClick({ title,
|
|
11380
|
+
const isShow = currentClass.includes("sidenavbar-show");
|
|
11381
|
+
onClick && onClick({ title, value, isShow });
|
|
11380
11382
|
};
|
|
11381
11383
|
React.useEffect(() => {
|
|
11382
11384
|
var _a2, _b;
|
|
@@ -11384,9 +11386,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11384
11386
|
(_b = listRef.current) == null ? void 0 : _b.setAttribute("level", "1");
|
|
11385
11387
|
childNodes && setListLevel(childNodes);
|
|
11386
11388
|
}, [setListLevel]);
|
|
11387
|
-
const divClass = open ?
|
|
11389
|
+
const divClass = open ? `${classPrefix2}__list sidenavbar-show` : `${classPrefix2}__list sidenavbar-hide`;
|
|
11388
11390
|
const iconClass = open ? "arrow-icon arrow-down" : "arrow-icon arrow-up";
|
|
11389
|
-
return /* @__PURE__ */ React.createElement("div", { className: divClass, ref: listRef, onClick: clickFn, ...rest }, /* @__PURE__ */ React.createElement("div", { className:
|
|
11391
|
+
return /* @__PURE__ */ React.createElement("div", { className: divClass, ref: listRef, onClick: clickFn, ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__title ${classPrefix2}-border-bt` }, title, " ", /* @__PURE__ */ React.createElement("i", { className: iconClass })), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content` }, children));
|
|
11390
11392
|
};
|
|
11391
11393
|
function usePropsValue({
|
|
11392
11394
|
value,
|
|
@@ -11407,7 +11409,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11407
11409
|
}
|
|
11408
11410
|
return [uncontrolled, handleUncontrolledChange];
|
|
11409
11411
|
}
|
|
11410
|
-
const defaultProps$
|
|
11412
|
+
const defaultProps$18 = {
|
|
11411
11413
|
...ComponentDefaults,
|
|
11412
11414
|
value: "",
|
|
11413
11415
|
dot: false,
|
|
@@ -11418,7 +11420,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11418
11420
|
};
|
|
11419
11421
|
const Badge = (props) => {
|
|
11420
11422
|
const { className, style, value, max, children, dot, top, right, color } = {
|
|
11421
|
-
...defaultProps$
|
|
11423
|
+
...defaultProps$18,
|
|
11422
11424
|
...props
|
|
11423
11425
|
};
|
|
11424
11426
|
const classPrefix2 = "nut-badge";
|
|
@@ -11445,9 +11447,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11445
11447
|
};
|
|
11446
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()));
|
|
11447
11449
|
};
|
|
11448
|
-
Badge.defaultProps = defaultProps$
|
|
11450
|
+
Badge.defaultProps = defaultProps$18;
|
|
11449
11451
|
Badge.displayName = "NutBadge";
|
|
11450
|
-
const defaultProps$
|
|
11452
|
+
const defaultProps$17 = {
|
|
11451
11453
|
...ComponentDefaults,
|
|
11452
11454
|
title: "",
|
|
11453
11455
|
icon: null,
|
|
@@ -11469,7 +11471,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11469
11471
|
handleClick: handleClick2,
|
|
11470
11472
|
...rest
|
|
11471
11473
|
} = {
|
|
11472
|
-
...defaultProps$
|
|
11474
|
+
...defaultProps$17,
|
|
11473
11475
|
...props
|
|
11474
11476
|
};
|
|
11475
11477
|
const classPrefix2 = "nut-tabbar-item";
|
|
@@ -11493,7 +11495,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11493
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))
|
|
11494
11496
|
);
|
|
11495
11497
|
};
|
|
11496
|
-
const defaultProps$
|
|
11498
|
+
const defaultProps$16 = {
|
|
11497
11499
|
...ComponentDefaults,
|
|
11498
11500
|
defaultValue: 0,
|
|
11499
11501
|
fixed: false,
|
|
@@ -11516,7 +11518,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11516
11518
|
style,
|
|
11517
11519
|
onSwitch
|
|
11518
11520
|
} = {
|
|
11519
|
-
...defaultProps$
|
|
11521
|
+
...defaultProps$16,
|
|
11520
11522
|
...props
|
|
11521
11523
|
};
|
|
11522
11524
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -11551,17 +11553,17 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11551
11553
|
(fixed || safeArea) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__safe-area` })
|
|
11552
11554
|
);
|
|
11553
11555
|
};
|
|
11554
|
-
Tabbar.defaultProps = defaultProps$
|
|
11556
|
+
Tabbar.defaultProps = defaultProps$16;
|
|
11555
11557
|
Tabbar.displayName = "NutTabbar";
|
|
11556
11558
|
Tabbar.Item = TabbarItem;
|
|
11557
|
-
const defaultProps$
|
|
11559
|
+
const defaultProps$15 = {
|
|
11558
11560
|
title: "",
|
|
11559
11561
|
value: "",
|
|
11560
11562
|
disabled: false
|
|
11561
11563
|
};
|
|
11562
11564
|
const TabPane = (props) => {
|
|
11563
11565
|
const { children, autoHeightClassName, className, disabled } = {
|
|
11564
|
-
...defaultProps$
|
|
11566
|
+
...defaultProps$15,
|
|
11565
11567
|
...props
|
|
11566
11568
|
};
|
|
11567
11569
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -11592,7 +11594,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11592
11594
|
const [, updateState] = React.useState();
|
|
11593
11595
|
return React.useCallback(() => updateState({}), []);
|
|
11594
11596
|
}
|
|
11595
|
-
const defaultProps$
|
|
11597
|
+
const defaultProps$14 = {
|
|
11596
11598
|
...ComponentDefaults,
|
|
11597
11599
|
tabStyle: {},
|
|
11598
11600
|
activeColor: "",
|
|
@@ -11601,7 +11603,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11601
11603
|
duration: 300,
|
|
11602
11604
|
autoHeight: false
|
|
11603
11605
|
};
|
|
11604
|
-
const classPrefix$
|
|
11606
|
+
const classPrefix$h = "nut-tabs";
|
|
11605
11607
|
const Tabs = (props) => {
|
|
11606
11608
|
const {
|
|
11607
11609
|
activeColor,
|
|
@@ -11618,7 +11620,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11618
11620
|
autoHeight,
|
|
11619
11621
|
...rest
|
|
11620
11622
|
} = {
|
|
11621
|
-
...defaultProps$
|
|
11623
|
+
...defaultProps$14,
|
|
11622
11624
|
...props
|
|
11623
11625
|
};
|
|
11624
11626
|
const [value, setValue] = usePropsValue({
|
|
@@ -11695,14 +11697,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11695
11697
|
}
|
|
11696
11698
|
}, [children]);
|
|
11697
11699
|
const classes = classNames(
|
|
11698
|
-
classPrefix$
|
|
11699
|
-
`${classPrefix$
|
|
11700
|
+
classPrefix$h,
|
|
11701
|
+
`${classPrefix$h}--${direction}`,
|
|
11700
11702
|
className
|
|
11701
11703
|
);
|
|
11702
|
-
const classesTitle = classNames(`${classPrefix$
|
|
11703
|
-
[`${classPrefix$
|
|
11704
|
-
[`${classPrefix$
|
|
11705
|
-
[`${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
|
|
11706
11708
|
});
|
|
11707
11709
|
const tabsActiveStyle = {
|
|
11708
11710
|
color: activeType === "smile" ? activeColor : "",
|
|
@@ -11732,7 +11734,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11732
11734
|
onClick: () => {
|
|
11733
11735
|
tabChange(item);
|
|
11734
11736
|
},
|
|
11735
|
-
className: classNames(`${classPrefix$
|
|
11737
|
+
className: classNames(`${classPrefix$h}__titles-item`, {
|
|
11736
11738
|
[`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
|
|
11737
11739
|
[`nut-tabs__titles-item--disabled`]: item.disabled,
|
|
11738
11740
|
[`nut-tabs__titles-item--${align}`]: align
|
|
@@ -11743,14 +11745,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11743
11745
|
activeType === "line" && /* @__PURE__ */ React.createElement(
|
|
11744
11746
|
"div",
|
|
11745
11747
|
{
|
|
11746
|
-
className: `${classPrefix$
|
|
11748
|
+
className: `${classPrefix$h}__titles-item__line`,
|
|
11747
11749
|
style: tabsActiveStyle
|
|
11748
11750
|
}
|
|
11749
11751
|
),
|
|
11750
11752
|
activeType === "smile" && /* @__PURE__ */ React.createElement(
|
|
11751
11753
|
"div",
|
|
11752
11754
|
{
|
|
11753
|
-
className: `${classPrefix$
|
|
11755
|
+
className: `${classPrefix$h}__titles-item__smile`,
|
|
11754
11756
|
style: tabsActiveStyle
|
|
11755
11757
|
},
|
|
11756
11758
|
/* @__PURE__ */ React.createElement(x$7, { color: activeColor, width: 40, height: 20 })
|
|
@@ -11762,13 +11764,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11762
11764
|
{
|
|
11763
11765
|
ellipsis: true
|
|
11764
11766
|
},
|
|
11765
|
-
`${classPrefix$
|
|
11767
|
+
`${classPrefix$h}__titles-item__text`
|
|
11766
11768
|
)
|
|
11767
11769
|
},
|
|
11768
11770
|
item.title
|
|
11769
11771
|
)
|
|
11770
11772
|
);
|
|
11771
|
-
})), /* @__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) => {
|
|
11772
11774
|
if (!React.isValidElement(child)) {
|
|
11773
11775
|
return null;
|
|
11774
11776
|
}
|
|
@@ -11785,7 +11787,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11785
11787
|
return React.cloneElement(child, childProps);
|
|
11786
11788
|
}))));
|
|
11787
11789
|
};
|
|
11788
|
-
Tabs.defaultProps = defaultProps$
|
|
11790
|
+
Tabs.defaultProps = defaultProps$14;
|
|
11789
11791
|
Tabs.displayName = "NutTabs";
|
|
11790
11792
|
Tabs.TabPane = TabPane;
|
|
11791
11793
|
var classnameExports = {};
|
|
@@ -11908,7 +11910,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11908
11910
|
}
|
|
11909
11911
|
})(classname);
|
|
11910
11912
|
const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
11911
|
-
const defaultProps$
|
|
11913
|
+
const defaultProps$13 = {
|
|
11912
11914
|
type: "custom",
|
|
11913
11915
|
existAddress: [],
|
|
11914
11916
|
defaultIcon: null,
|
|
@@ -11930,7 +11932,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11930
11932
|
onClose,
|
|
11931
11933
|
onSwitchModule,
|
|
11932
11934
|
...rest
|
|
11933
|
-
} = { ...defaultProps$
|
|
11935
|
+
} = { ...defaultProps$13, ...props };
|
|
11934
11936
|
const b = cn("address");
|
|
11935
11937
|
const selectedExist = (item) => {
|
|
11936
11938
|
const copyExistAdd = existAddress;
|
|
@@ -11960,7 +11962,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11960
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)))));
|
|
11961
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)));
|
|
11962
11964
|
};
|
|
11963
|
-
const defaultProps$
|
|
11965
|
+
const defaultProps$12 = {
|
|
11964
11966
|
modelValue: [],
|
|
11965
11967
|
type: "custom",
|
|
11966
11968
|
province: [],
|
|
@@ -11985,7 +11987,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11985
11987
|
onClose,
|
|
11986
11988
|
...rest
|
|
11987
11989
|
} = {
|
|
11988
|
-
...defaultProps$
|
|
11990
|
+
...defaultProps$12,
|
|
11989
11991
|
...props
|
|
11990
11992
|
};
|
|
11991
11993
|
const b = cn("address");
|
|
@@ -12154,28 +12156,28 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12154
12156
|
nextAreaList(item);
|
|
12155
12157
|
};
|
|
12156
12158
|
React.useEffect(() => {
|
|
12157
|
-
const { province: province2 } = { ...defaultProps$
|
|
12159
|
+
const { province: province2 } = { ...defaultProps$12, ...props };
|
|
12158
12160
|
setRegionList({
|
|
12159
12161
|
...regionList,
|
|
12160
12162
|
province: isCustom2() ? transformData(province2) : province2
|
|
12161
12163
|
});
|
|
12162
12164
|
}, [province]);
|
|
12163
12165
|
React.useEffect(() => {
|
|
12164
|
-
const { city: city2 } = { ...defaultProps$
|
|
12166
|
+
const { city: city2 } = { ...defaultProps$12, ...props };
|
|
12165
12167
|
setRegionList({
|
|
12166
12168
|
...regionList,
|
|
12167
12169
|
city: isCustom2() ? transformData(city2) : city2
|
|
12168
12170
|
});
|
|
12169
12171
|
}, [city]);
|
|
12170
12172
|
React.useEffect(() => {
|
|
12171
|
-
const { country: country2 } = { ...defaultProps$
|
|
12173
|
+
const { country: country2 } = { ...defaultProps$12, ...props };
|
|
12172
12174
|
setRegionList({
|
|
12173
12175
|
...regionList,
|
|
12174
12176
|
country: isCustom2() ? transformData(country2) : country2
|
|
12175
12177
|
});
|
|
12176
12178
|
}, [country]);
|
|
12177
12179
|
React.useEffect(() => {
|
|
12178
|
-
const { town: town2 } = { ...defaultProps$
|
|
12180
|
+
const { town: town2 } = { ...defaultProps$12, ...props };
|
|
12179
12181
|
setRegionList({
|
|
12180
12182
|
...regionList,
|
|
12181
12183
|
town: isCustom2() ? transformData(town2) : town2
|
|
@@ -12241,7 +12243,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12241
12243
|
}
|
|
12242
12244
|
)));
|
|
12243
12245
|
};
|
|
12244
|
-
const defaultProps$
|
|
12246
|
+
const defaultProps$11 = {
|
|
12245
12247
|
...ComponentDefaults,
|
|
12246
12248
|
modelValue: false,
|
|
12247
12249
|
modelSelect: [],
|
|
@@ -12292,7 +12294,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12292
12294
|
className,
|
|
12293
12295
|
...rest
|
|
12294
12296
|
} = {
|
|
12295
|
-
...defaultProps$
|
|
12297
|
+
...defaultProps$11,
|
|
12296
12298
|
...props
|
|
12297
12299
|
};
|
|
12298
12300
|
const b = cn("address");
|
|
@@ -12444,7 +12446,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12444
12446
|
)
|
|
12445
12447
|
));
|
|
12446
12448
|
};
|
|
12447
|
-
Address.defaultProps = defaultProps$
|
|
12449
|
+
Address.defaultProps = defaultProps$11;
|
|
12448
12450
|
Address.displayName = "NutAddress";
|
|
12449
12451
|
const Utils = {
|
|
12450
12452
|
/**
|
|
@@ -12564,7 +12566,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12564
12566
|
return false;
|
|
12565
12567
|
}
|
|
12566
12568
|
};
|
|
12567
|
-
const defaultProps$
|
|
12569
|
+
const defaultProps$10 = {
|
|
12568
12570
|
type: "one",
|
|
12569
12571
|
isAutoBackFill: false,
|
|
12570
12572
|
poppable: true,
|
|
@@ -12616,7 +12618,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
12616
12618
|
onUpdate,
|
|
12617
12619
|
onSelected,
|
|
12618
12620
|
onYearMonthChange
|
|
12619
|
-
} = { ...defaultProps$
|
|
12621
|
+
} = { ...defaultProps$10, ...props };
|
|
12620
12622
|
const weeks = locale.calendaritem.weekdays;
|
|
12621
12623
|
const [yearMonthTitle, setYearMonthTitle] = React.useState("");
|
|
12622
12624
|
const [monthsData, setMonthsData] = React.useState([]);
|
|
@@ -13198,9 +13200,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13198
13200
|
))
|
|
13199
13201
|
), poppable && !isAutoBackFill ? /* @__PURE__ */ React.createElement("div", { className: "nut-calendar-footer" }, /* @__PURE__ */ React.createElement("div", { className: "calendar-confirm-btn", onClick: confirm2 }, confirmText || locale.confirm)) : ""));
|
|
13200
13202
|
});
|
|
13201
|
-
CalendarItem.defaultProps = defaultProps$
|
|
13203
|
+
CalendarItem.defaultProps = defaultProps$10;
|
|
13202
13204
|
CalendarItem.displayName = "NutCalendarItem";
|
|
13203
|
-
const defaultProps
|
|
13205
|
+
const defaultProps$$ = {
|
|
13204
13206
|
type: "one",
|
|
13205
13207
|
isAutoBackFill: false,
|
|
13206
13208
|
poppable: true,
|
|
@@ -13255,7 +13257,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13255
13257
|
onChoose,
|
|
13256
13258
|
onSelected,
|
|
13257
13259
|
onYearMonthChange
|
|
13258
|
-
} = { ...defaultProps
|
|
13260
|
+
} = { ...defaultProps$$, ...props };
|
|
13259
13261
|
const calendarRef = React.useRef(null);
|
|
13260
13262
|
const close = () => {
|
|
13261
13263
|
onClose && onClose();
|
|
@@ -13325,9 +13327,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13325
13327
|
renderItem()
|
|
13326
13328
|
) : renderItem());
|
|
13327
13329
|
});
|
|
13328
|
-
Calendar.defaultProps = defaultProps
|
|
13330
|
+
Calendar.defaultProps = defaultProps$$;
|
|
13329
13331
|
Calendar.displayName = "NutCalendar";
|
|
13330
|
-
const defaultProps
|
|
13332
|
+
const defaultProps$_ = {
|
|
13331
13333
|
data: {
|
|
13332
13334
|
text: "",
|
|
13333
13335
|
value: "",
|
|
@@ -13344,7 +13346,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13344
13346
|
};
|
|
13345
13347
|
const InternalCascaderItem = (props, ref) => {
|
|
13346
13348
|
const { data, checked, activeIcon, chooseItem, activeColor } = {
|
|
13347
|
-
...defaultProps
|
|
13349
|
+
...defaultProps$_,
|
|
13348
13350
|
...props
|
|
13349
13351
|
};
|
|
13350
13352
|
const classPrefix2 = "nut-cascader-item";
|
|
@@ -13386,7 +13388,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13386
13388
|
);
|
|
13387
13389
|
};
|
|
13388
13390
|
const CascaderItem = React.forwardRef(InternalCascaderItem);
|
|
13389
|
-
CascaderItem.defaultProps = defaultProps
|
|
13391
|
+
CascaderItem.defaultProps = defaultProps$_;
|
|
13390
13392
|
CascaderItem.displayName = "NutCascaderItem";
|
|
13391
13393
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
13392
13394
|
const {
|
|
@@ -13524,7 +13526,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13524
13526
|
}
|
|
13525
13527
|
}
|
|
13526
13528
|
const Tree$1 = Tree;
|
|
13527
|
-
const defaultProps$
|
|
13529
|
+
const defaultProps$Z = {
|
|
13528
13530
|
...ComponentDefaults,
|
|
13529
13531
|
activeColor: "",
|
|
13530
13532
|
activeIcon: "checklist",
|
|
@@ -13567,7 +13569,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13567
13569
|
onClose,
|
|
13568
13570
|
onChange,
|
|
13569
13571
|
onPathChange
|
|
13570
|
-
} = { ...defaultProps$
|
|
13572
|
+
} = { ...defaultProps$Z, ...props };
|
|
13571
13573
|
const [tabvalue, setTabvalue] = React.useState("c1");
|
|
13572
13574
|
const [optionsData, setOptionsData] = React.useState([]);
|
|
13573
13575
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -13829,11 +13831,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13829
13831
|
) : renderItem());
|
|
13830
13832
|
};
|
|
13831
13833
|
const Cascader = React.forwardRef(InternalCascader);
|
|
13832
|
-
Cascader.defaultProps = defaultProps$
|
|
13834
|
+
Cascader.defaultProps = defaultProps$Z;
|
|
13833
13835
|
Cascader.displayName = "NutCascader";
|
|
13834
13836
|
const CheckboxGroupContext = React.createContext(null);
|
|
13835
13837
|
const Context = CheckboxGroupContext;
|
|
13836
|
-
const defaultProps$
|
|
13838
|
+
const defaultProps$Y = {
|
|
13837
13839
|
max: void 0,
|
|
13838
13840
|
labelPosition: "right",
|
|
13839
13841
|
direction: "vertical",
|
|
@@ -13841,10 +13843,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13841
13843
|
},
|
|
13842
13844
|
options: []
|
|
13843
13845
|
};
|
|
13844
|
-
const classPrefix$
|
|
13846
|
+
const classPrefix$g = "nut-checkboxgroup";
|
|
13845
13847
|
const CheckboxGroup = React.forwardRef(
|
|
13846
13848
|
(props, ref) => {
|
|
13847
|
-
const { children } = { ...defaultProps$
|
|
13849
|
+
const { children } = { ...defaultProps$Y, ...props };
|
|
13848
13850
|
const {
|
|
13849
13851
|
className,
|
|
13850
13852
|
disabled,
|
|
@@ -13923,7 +13925,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13923
13925
|
/* @__PURE__ */ React.createElement(
|
|
13924
13926
|
"div",
|
|
13925
13927
|
{
|
|
13926
|
-
className: classNames(classPrefix$
|
|
13928
|
+
className: classNames(classPrefix$g, className, {
|
|
13927
13929
|
[`nut-checkboxgroup--${props.direction}`]: props.direction
|
|
13928
13930
|
}),
|
|
13929
13931
|
...rest
|
|
@@ -13933,9 +13935,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13933
13935
|
);
|
|
13934
13936
|
}
|
|
13935
13937
|
);
|
|
13936
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
13938
|
+
CheckboxGroup.defaultProps = defaultProps$Y;
|
|
13937
13939
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
13938
|
-
const defaultProps$
|
|
13940
|
+
const defaultProps$X = {
|
|
13939
13941
|
...ComponentDefaults,
|
|
13940
13942
|
disabled: false,
|
|
13941
13943
|
labelPosition: "right",
|
|
@@ -13945,10 +13947,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13945
13947
|
onChange: (value) => {
|
|
13946
13948
|
}
|
|
13947
13949
|
};
|
|
13948
|
-
const classPrefix$
|
|
13950
|
+
const classPrefix$f = "nut-checkbox";
|
|
13949
13951
|
const Checkbox = (props) => {
|
|
13950
13952
|
const { children } = {
|
|
13951
|
-
...defaultProps$
|
|
13953
|
+
...defaultProps$X,
|
|
13952
13954
|
...props
|
|
13953
13955
|
};
|
|
13954
13956
|
const {
|
|
@@ -14007,22 +14009,22 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14007
14009
|
};
|
|
14008
14010
|
const color = () => {
|
|
14009
14011
|
if (innerDisabled) {
|
|
14010
|
-
return `${classPrefix$
|
|
14012
|
+
return `${classPrefix$f}__icon--disable`;
|
|
14011
14013
|
}
|
|
14012
14014
|
if (innerChecked) {
|
|
14013
14015
|
if (innerIndeterminate) {
|
|
14014
|
-
return `${classPrefix$
|
|
14016
|
+
return `${classPrefix$f}__icon--indeterminate`;
|
|
14015
14017
|
}
|
|
14016
|
-
return `${classPrefix$
|
|
14018
|
+
return `${classPrefix$f}__icon`;
|
|
14017
14019
|
}
|
|
14018
|
-
return `${classPrefix$
|
|
14020
|
+
return `${classPrefix$f}__icon--unchecked`;
|
|
14019
14021
|
};
|
|
14020
14022
|
const renderLabel = () => {
|
|
14021
14023
|
return /* @__PURE__ */ React.createElement(
|
|
14022
14024
|
"span",
|
|
14023
14025
|
{
|
|
14024
|
-
className: classNames(`${classPrefix$
|
|
14025
|
-
[`${classPrefix$
|
|
14026
|
+
className: classNames(`${classPrefix$f}__label `, {
|
|
14027
|
+
[`${classPrefix$f}__label--disabled`]: innerDisabled
|
|
14026
14028
|
})
|
|
14027
14029
|
},
|
|
14028
14030
|
children || label
|
|
@@ -14041,8 +14043,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14041
14043
|
return /* @__PURE__ */ React.createElement(
|
|
14042
14044
|
"div",
|
|
14043
14045
|
{
|
|
14044
|
-
className: classNames(classPrefix$
|
|
14045
|
-
[`${classPrefix$
|
|
14046
|
+
className: classNames(classPrefix$f, className, {
|
|
14047
|
+
[`${classPrefix$f}--reverse`]: labelPosition === "left"
|
|
14046
14048
|
}),
|
|
14047
14049
|
...rest,
|
|
14048
14050
|
onClick: handleClick2
|
|
@@ -14051,7 +14053,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14051
14053
|
renderLabel()
|
|
14052
14054
|
);
|
|
14053
14055
|
};
|
|
14054
|
-
Checkbox.defaultProps = defaultProps$
|
|
14056
|
+
Checkbox.defaultProps = defaultProps$X;
|
|
14055
14057
|
Checkbox.displayName = "NutCheckBox";
|
|
14056
14058
|
Checkbox.Group = CheckboxGroup;
|
|
14057
14059
|
const MIN_DISTANCE = 10;
|
|
@@ -14345,7 +14347,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14345
14347
|
}, []);
|
|
14346
14348
|
return [refs.current, setRefs, reset];
|
|
14347
14349
|
}
|
|
14348
|
-
const defaultProps$
|
|
14350
|
+
const defaultProps$W = {
|
|
14349
14351
|
...ComponentDefaults,
|
|
14350
14352
|
visible: false,
|
|
14351
14353
|
title: "",
|
|
@@ -14358,6 +14360,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14358
14360
|
const InternalPicker = (props, ref) => {
|
|
14359
14361
|
const { locale } = useConfig();
|
|
14360
14362
|
const {
|
|
14363
|
+
children,
|
|
14361
14364
|
visible,
|
|
14362
14365
|
title,
|
|
14363
14366
|
options: options2 = [],
|
|
@@ -14371,7 +14374,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14371
14374
|
afterClose,
|
|
14372
14375
|
onChange,
|
|
14373
14376
|
...rest
|
|
14374
|
-
} = { ...defaultProps$
|
|
14377
|
+
} = { ...defaultProps$W, ...props };
|
|
14375
14378
|
const classPrefix2 = "nut-picker";
|
|
14376
14379
|
const classes = classNames(classPrefix2, className);
|
|
14377
14380
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -14383,6 +14386,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14383
14386
|
(_a2 = props.onConfirm) == null ? void 0 : _a2.call(props, setSelectedOptions(), val);
|
|
14384
14387
|
}
|
|
14385
14388
|
});
|
|
14389
|
+
const [innerValue, setInnerValue] = React.useState(selectedValue);
|
|
14386
14390
|
const [columnIndex, setColumnIndex] = React.useState(0);
|
|
14387
14391
|
const pickerRef = React.useRef(null);
|
|
14388
14392
|
const [refs, setRefs] = useRefs();
|
|
@@ -14422,41 +14426,48 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14422
14426
|
}
|
|
14423
14427
|
return "single";
|
|
14424
14428
|
};
|
|
14425
|
-
const normalListData = () => {
|
|
14429
|
+
const normalListData = (innerValue2) => {
|
|
14426
14430
|
const type2 = columnsType();
|
|
14427
14431
|
switch (type2) {
|
|
14428
14432
|
case "multiple":
|
|
14429
14433
|
return options2;
|
|
14430
14434
|
case "cascade":
|
|
14431
|
-
return formatCascade(options2,
|
|
14435
|
+
return formatCascade(options2, innerValue2);
|
|
14432
14436
|
default:
|
|
14433
14437
|
return [options2];
|
|
14434
14438
|
}
|
|
14435
14439
|
};
|
|
14436
14440
|
const init = () => {
|
|
14437
|
-
const normalData = normalListData(
|
|
14441
|
+
const normalData = normalListData(
|
|
14442
|
+
innerValue
|
|
14443
|
+
);
|
|
14438
14444
|
setColumnsList(normalData);
|
|
14439
14445
|
const data = [];
|
|
14440
14446
|
normalData.length > 0 && normalData.map((item) => {
|
|
14441
14447
|
item[0] && data.push(item[0].value);
|
|
14442
14448
|
return item;
|
|
14443
14449
|
});
|
|
14444
|
-
if (!
|
|
14445
|
-
|
|
14450
|
+
if (!innerValue.length && innerValue.length === 0) {
|
|
14451
|
+
setInnerValue([...data]);
|
|
14446
14452
|
}
|
|
14447
14453
|
};
|
|
14448
14454
|
React.useEffect(() => {
|
|
14449
|
-
|
|
14450
|
-
|
|
14455
|
+
setInnerValue(innerValue !== selectedValue ? selectedValue : innerValue);
|
|
14456
|
+
}, [visible]);
|
|
14457
|
+
React.useEffect(() => {
|
|
14458
|
+
if (visible) {
|
|
14459
|
+
init();
|
|
14451
14460
|
}
|
|
14452
|
-
init();
|
|
14453
14461
|
}, [options2, visible]);
|
|
14462
|
+
React.useEffect(() => {
|
|
14463
|
+
onChange && onChange(setSelectedOptions(), innerValue, columnIndex);
|
|
14464
|
+
}, [innerValue, columnsList]);
|
|
14454
14465
|
const setSelectedOptions = () => {
|
|
14455
14466
|
const options22 = [];
|
|
14456
14467
|
let currOptions = [];
|
|
14457
14468
|
columnsList.forEach((columnOptions, index) => {
|
|
14458
14469
|
currOptions = columnOptions.filter(
|
|
14459
|
-
(item) => item.value ===
|
|
14470
|
+
(item) => item.value === innerValue[index]
|
|
14460
14471
|
);
|
|
14461
14472
|
if (currOptions[0]) {
|
|
14462
14473
|
options22.push(currOptions[0]);
|
|
@@ -14466,36 +14477,30 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14466
14477
|
});
|
|
14467
14478
|
return options22;
|
|
14468
14479
|
};
|
|
14469
|
-
React.useEffect(() => {
|
|
14470
|
-
if (!visible) {
|
|
14471
|
-
return;
|
|
14472
|
-
}
|
|
14473
|
-
onChange && onChange(setSelectedOptions(), selectedValue, columnIndex);
|
|
14474
|
-
if (isConfirmEvent.current) {
|
|
14475
|
-
isConfirmEvent.current = false;
|
|
14476
|
-
onConfirm && onConfirm(setSelectedOptions(), selectedValue);
|
|
14477
|
-
}
|
|
14478
|
-
}, [selectedValue, columnsList, visible]);
|
|
14479
14480
|
const chooseItem = (columnOptions, columnIndex2) => {
|
|
14480
14481
|
var _a2, _b;
|
|
14482
|
+
const values = [];
|
|
14483
|
+
const start2 = columnIndex2;
|
|
14481
14484
|
if (columnOptions && Object.keys(columnOptions).length) {
|
|
14482
|
-
if (
|
|
14485
|
+
if (values[columnIndex2] !== columnOptions.value) {
|
|
14483
14486
|
if (columnsType() === "cascade") {
|
|
14484
|
-
|
|
14485
|
-
setSelectedValue([...selectedValue]);
|
|
14487
|
+
values[columnIndex2] = columnOptions.value || "";
|
|
14486
14488
|
while ((_a2 = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _a2[0]) {
|
|
14487
|
-
|
|
14488
|
-
setSelectedValue([...selectedValue]);
|
|
14489
|
+
values[columnIndex2 + 1] = columnOptions.children[0].value;
|
|
14489
14490
|
columnIndex2++;
|
|
14490
14491
|
columnOptions = columnOptions.children[0];
|
|
14491
14492
|
}
|
|
14492
14493
|
if ((_b = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _b.length) {
|
|
14493
|
-
|
|
14494
|
-
setSelectedValue([...selectedValue]);
|
|
14494
|
+
values[columnIndex2 + 1] = "";
|
|
14495
14495
|
}
|
|
14496
|
-
|
|
14496
|
+
const combineResult = [
|
|
14497
|
+
...innerValue.slice(0, start2),
|
|
14498
|
+
...values.splice(start2)
|
|
14499
|
+
];
|
|
14500
|
+
setInnerValue(combineResult);
|
|
14501
|
+
setColumnsList(normalListData(combineResult));
|
|
14497
14502
|
} else {
|
|
14498
|
-
|
|
14503
|
+
setInnerValue((data) => {
|
|
14499
14504
|
const cdata = [...data];
|
|
14500
14505
|
cdata[columnIndex2] = Object.prototype.hasOwnProperty.call(
|
|
14501
14506
|
columnOptions,
|
|
@@ -14509,16 +14514,16 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14509
14514
|
}
|
|
14510
14515
|
};
|
|
14511
14516
|
const confirm2 = () => {
|
|
14512
|
-
let
|
|
14517
|
+
let moving = false;
|
|
14513
14518
|
refs.forEach((ref2) => {
|
|
14514
14519
|
if (ref2.moving)
|
|
14515
|
-
|
|
14520
|
+
moving = true;
|
|
14516
14521
|
ref2.stopMomentum();
|
|
14517
14522
|
});
|
|
14518
|
-
if (
|
|
14523
|
+
if (moving) {
|
|
14519
14524
|
isConfirmEvent.current = true;
|
|
14520
14525
|
} else {
|
|
14521
|
-
|
|
14526
|
+
setSelectedValue(innerValue);
|
|
14522
14527
|
closePicker();
|
|
14523
14528
|
}
|
|
14524
14529
|
setTimeout(() => {
|
|
@@ -14526,8 +14531,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14526
14531
|
}, 0);
|
|
14527
14532
|
};
|
|
14528
14533
|
const closePicker = () => {
|
|
14529
|
-
onClose && onClose(setSelectedOptions(),
|
|
14530
|
-
afterClose && afterClose(setSelectedOptions(),
|
|
14534
|
+
onClose && onClose(setSelectedOptions(), innerValue);
|
|
14535
|
+
afterClose && afterClose(setSelectedOptions(), innerValue, pickerRef);
|
|
14531
14536
|
};
|
|
14532
14537
|
const renderTitleBar = () => {
|
|
14533
14538
|
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__control` }, /* @__PURE__ */ React.createElement(
|
|
@@ -14548,12 +14553,12 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14548
14553
|
closePicker();
|
|
14549
14554
|
}
|
|
14550
14555
|
},
|
|
14551
|
-
/* @__PURE__ */ React.createElement("div", { className: classes, style, ...rest }, renderTitleBar(), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__panel`, ref: pickerRef }, columnsList == null ? void 0 : columnsList.map((item, index) => {
|
|
14556
|
+
/* @__PURE__ */ React.createElement("div", { className: classes, style, ...rest }, renderTitleBar(), children, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__panel`, ref: pickerRef }, columnsList == null ? void 0 : columnsList.map((item, index) => {
|
|
14552
14557
|
return /* @__PURE__ */ React.createElement(
|
|
14553
14558
|
PickerPanel$1,
|
|
14554
14559
|
{
|
|
14555
14560
|
ref: setRefs(index),
|
|
14556
|
-
defaultValue:
|
|
14561
|
+
defaultValue: innerValue == null ? void 0 : innerValue[index],
|
|
14557
14562
|
options: item,
|
|
14558
14563
|
threeDimensional,
|
|
14559
14564
|
chooseItem: (value, index2) => chooseItem(value, index2),
|
|
@@ -14568,7 +14573,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14568
14573
|
const Picker = React.forwardRef(InternalPicker);
|
|
14569
14574
|
const Picker$1 = Picker;
|
|
14570
14575
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
14571
|
-
const defaultProps$
|
|
14576
|
+
const defaultProps$V = {
|
|
14572
14577
|
modelValue: null,
|
|
14573
14578
|
visible: false,
|
|
14574
14579
|
title: "",
|
|
@@ -14599,7 +14604,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14599
14604
|
style,
|
|
14600
14605
|
...rest
|
|
14601
14606
|
} = {
|
|
14602
|
-
...defaultProps$
|
|
14607
|
+
...defaultProps$V,
|
|
14603
14608
|
...props
|
|
14604
14609
|
};
|
|
14605
14610
|
const { locale } = useConfig();
|
|
@@ -14876,7 +14881,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14876
14881
|
)
|
|
14877
14882
|
);
|
|
14878
14883
|
};
|
|
14879
|
-
DatePicker.defaultProps = defaultProps$
|
|
14884
|
+
DatePicker.defaultProps = defaultProps$V;
|
|
14880
14885
|
DatePicker.displayName = "NutDatePicker";
|
|
14881
14886
|
const FormItemContext = React.createContext({});
|
|
14882
14887
|
function _extends() {
|
|
@@ -16067,7 +16072,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16067
16072
|
}
|
|
16068
16073
|
return [formRef.current];
|
|
16069
16074
|
};
|
|
16070
|
-
const defaultProps$
|
|
16075
|
+
const defaultProps$U = {
|
|
16071
16076
|
...ComponentDefaults,
|
|
16072
16077
|
name: "",
|
|
16073
16078
|
label: "",
|
|
@@ -16129,7 +16134,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16129
16134
|
showErrorLine,
|
|
16130
16135
|
showErrorMessage
|
|
16131
16136
|
} = {
|
|
16132
|
-
...defaultProps$
|
|
16137
|
+
...defaultProps$U,
|
|
16133
16138
|
...this.props
|
|
16134
16139
|
};
|
|
16135
16140
|
const item = ((_a2 = this.context.errList) == null ? void 0 : _a2.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
@@ -16184,9 +16189,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16184
16189
|
return this.renderLayout(returnChildNode);
|
|
16185
16190
|
}
|
|
16186
16191
|
}
|
|
16187
|
-
__publicField(FormItem, "defaultProps", defaultProps$
|
|
16192
|
+
__publicField(FormItem, "defaultProps", defaultProps$U);
|
|
16188
16193
|
__publicField(FormItem, "contextType", FormItemContext);
|
|
16189
|
-
const defaultProps$
|
|
16194
|
+
const defaultProps$T = {
|
|
16190
16195
|
...ComponentDefaults,
|
|
16191
16196
|
className: "",
|
|
16192
16197
|
style: void 0,
|
|
@@ -16214,7 +16219,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16214
16219
|
form,
|
|
16215
16220
|
...rest
|
|
16216
16221
|
} = {
|
|
16217
|
-
...defaultProps$
|
|
16222
|
+
...defaultProps$T,
|
|
16218
16223
|
...props
|
|
16219
16224
|
};
|
|
16220
16225
|
let formInstance = {};
|
|
@@ -16246,7 +16251,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16246
16251
|
/* @__PURE__ */ React.createElement(CellGroup, null, /* @__PURE__ */ React.createElement(FormItemContext.Provider, { value: formInstance }, children))
|
|
16247
16252
|
);
|
|
16248
16253
|
};
|
|
16249
|
-
Form.defaultProps = defaultProps$
|
|
16254
|
+
Form.defaultProps = defaultProps$T;
|
|
16250
16255
|
Form.displayName = "NutForm";
|
|
16251
16256
|
Form.Item = FormItem;
|
|
16252
16257
|
Form.useForm = useForm;
|
|
@@ -16274,7 +16279,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16274
16279
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
16275
16280
|
return value.replace(regExp, "");
|
|
16276
16281
|
}
|
|
16277
|
-
const defaultProps$
|
|
16282
|
+
const defaultProps$S = {
|
|
16278
16283
|
...ComponentDefaults,
|
|
16279
16284
|
type: "text",
|
|
16280
16285
|
name: "",
|
|
@@ -16317,7 +16322,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16317
16322
|
value: _value,
|
|
16318
16323
|
...rest
|
|
16319
16324
|
} = {
|
|
16320
|
-
...defaultProps$
|
|
16325
|
+
...defaultProps$S,
|
|
16321
16326
|
...props
|
|
16322
16327
|
};
|
|
16323
16328
|
const [value, setValue] = usePropsValue({
|
|
@@ -16452,9 +16457,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16452
16457
|
);
|
|
16453
16458
|
}
|
|
16454
16459
|
);
|
|
16455
|
-
Input.defaultProps = defaultProps$
|
|
16460
|
+
Input.defaultProps = defaultProps$S;
|
|
16456
16461
|
Input.displayName = "NutInput";
|
|
16457
|
-
const defaultProps$
|
|
16462
|
+
const defaultProps$R = {
|
|
16458
16463
|
...ComponentDefaults,
|
|
16459
16464
|
disabled: false,
|
|
16460
16465
|
min: 1,
|
|
@@ -16466,7 +16471,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16466
16471
|
digits: 0,
|
|
16467
16472
|
async: false
|
|
16468
16473
|
};
|
|
16469
|
-
const classPrefix$
|
|
16474
|
+
const classPrefix$e = `nut-inputnumber`;
|
|
16470
16475
|
const InputNumber = (props) => {
|
|
16471
16476
|
const {
|
|
16472
16477
|
children,
|
|
@@ -16491,7 +16496,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16491
16496
|
onChange,
|
|
16492
16497
|
...restProps
|
|
16493
16498
|
} = {
|
|
16494
|
-
...defaultProps$
|
|
16499
|
+
...defaultProps$R,
|
|
16495
16500
|
...props
|
|
16496
16501
|
};
|
|
16497
16502
|
const inputRef = React.useRef("");
|
|
@@ -16509,8 +16514,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16509
16514
|
}, []);
|
|
16510
16515
|
const classes = classNames(
|
|
16511
16516
|
{
|
|
16512
|
-
[`${classPrefix$
|
|
16513
|
-
[`${classPrefix$
|
|
16517
|
+
[`${classPrefix$e}`]: true,
|
|
16518
|
+
[`${classPrefix$e}--disabled`]: disabled
|
|
16514
16519
|
},
|
|
16515
16520
|
className
|
|
16516
16521
|
);
|
|
@@ -16688,9 +16693,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16688
16693
|
}
|
|
16689
16694
|
)), /* @__PURE__ */ React.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React.createElement(y$4, { className: iconAddClasses, onClick: (e) => addNumber(e) })));
|
|
16690
16695
|
};
|
|
16691
|
-
InputNumber.defaultProps = defaultProps$
|
|
16696
|
+
InputNumber.defaultProps = defaultProps$R;
|
|
16692
16697
|
InputNumber.displayName = "NutInputNumber";
|
|
16693
|
-
const defaultProps$
|
|
16698
|
+
const defaultProps$Q = {
|
|
16694
16699
|
...ComponentDefaults,
|
|
16695
16700
|
activeColor: "",
|
|
16696
16701
|
closeOnOverlayClick: true,
|
|
@@ -16709,7 +16714,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16709
16714
|
activeColor,
|
|
16710
16715
|
...rest
|
|
16711
16716
|
} = {
|
|
16712
|
-
...defaultProps$
|
|
16717
|
+
...defaultProps$Q,
|
|
16713
16718
|
...props
|
|
16714
16719
|
};
|
|
16715
16720
|
const menuRef = React.useRef(null);
|
|
@@ -16828,9 +16833,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16828
16833
|
), cloneChildren())
|
|
16829
16834
|
);
|
|
16830
16835
|
};
|
|
16831
|
-
Menu.defaultProps = defaultProps$
|
|
16836
|
+
Menu.defaultProps = defaultProps$Q;
|
|
16832
16837
|
Menu.displayName = "NutMenu";
|
|
16833
|
-
const defaultProps$
|
|
16838
|
+
const defaultProps$P = {
|
|
16834
16839
|
...ComponentDefaults,
|
|
16835
16840
|
columns: 1,
|
|
16836
16841
|
direction: "down",
|
|
@@ -16860,7 +16865,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16860
16865
|
parent,
|
|
16861
16866
|
index
|
|
16862
16867
|
} = {
|
|
16863
|
-
...defaultProps$
|
|
16868
|
+
...defaultProps$P,
|
|
16864
16869
|
...props
|
|
16865
16870
|
};
|
|
16866
16871
|
const [_showPopup, setShowPopup] = React.useState(show2);
|
|
@@ -17005,9 +17010,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17005
17010
|
)
|
|
17006
17011
|
));
|
|
17007
17012
|
});
|
|
17008
|
-
MenuItem.defaultProps = defaultProps$
|
|
17013
|
+
MenuItem.defaultProps = defaultProps$P;
|
|
17009
17014
|
MenuItem.displayName = "NutMenuItem";
|
|
17010
|
-
const defaultProps$
|
|
17015
|
+
const defaultProps$O = {
|
|
17011
17016
|
...ComponentDefaults,
|
|
17012
17017
|
visible: false,
|
|
17013
17018
|
type: "default",
|
|
@@ -17158,17 +17163,17 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17158
17163
|
))))
|
|
17159
17164
|
);
|
|
17160
17165
|
};
|
|
17161
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
17166
|
+
NumberKeyboard.defaultProps = defaultProps$O;
|
|
17162
17167
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
17163
17168
|
const RadioContext = React.createContext(null);
|
|
17164
|
-
const defaultProps$
|
|
17169
|
+
const defaultProps$N = {
|
|
17165
17170
|
labelPosition: "right",
|
|
17166
17171
|
onChange: (value) => {
|
|
17167
17172
|
},
|
|
17168
17173
|
direction: "vertical",
|
|
17169
17174
|
options: []
|
|
17170
17175
|
};
|
|
17171
|
-
const classPrefix$
|
|
17176
|
+
const classPrefix$d = "nut-radiogroup";
|
|
17172
17177
|
const RadioGroup = React.forwardRef(
|
|
17173
17178
|
(props, ref) => {
|
|
17174
17179
|
const {
|
|
@@ -17182,7 +17187,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17182
17187
|
options: options2,
|
|
17183
17188
|
disabled,
|
|
17184
17189
|
...rest
|
|
17185
|
-
} = { ...defaultProps$
|
|
17190
|
+
} = { ...defaultProps$N, ...props };
|
|
17186
17191
|
const [val2State, setVal2State] = usePropsValue({
|
|
17187
17192
|
defaultValue: props.defaultValue,
|
|
17188
17193
|
value: props.value,
|
|
@@ -17224,8 +17229,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17224
17229
|
/* @__PURE__ */ React.createElement(
|
|
17225
17230
|
"div",
|
|
17226
17231
|
{
|
|
17227
|
-
className: classNames(classPrefix$
|
|
17228
|
-
[`${classPrefix$
|
|
17232
|
+
className: classNames(classPrefix$d, className, {
|
|
17233
|
+
[`${classPrefix$d}--${props.direction}`]: props.direction
|
|
17229
17234
|
}),
|
|
17230
17235
|
...rest
|
|
17231
17236
|
},
|
|
@@ -17234,9 +17239,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17234
17239
|
);
|
|
17235
17240
|
}
|
|
17236
17241
|
);
|
|
17237
|
-
RadioGroup.defaultProps = defaultProps$
|
|
17242
|
+
RadioGroup.defaultProps = defaultProps$N;
|
|
17238
17243
|
RadioGroup.displayName = "NutRadioGroup";
|
|
17239
|
-
const defaultProps$
|
|
17244
|
+
const defaultProps$M = {
|
|
17240
17245
|
...ComponentDefaults,
|
|
17241
17246
|
disabled: false,
|
|
17242
17247
|
shape: "round",
|
|
@@ -17262,7 +17267,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17262
17267
|
onChange,
|
|
17263
17268
|
...others
|
|
17264
17269
|
} = {
|
|
17265
|
-
...defaultProps$
|
|
17270
|
+
...defaultProps$M,
|
|
17266
17271
|
...props
|
|
17267
17272
|
};
|
|
17268
17273
|
let { labelPosition, disabled, ...rest } = others;
|
|
@@ -17358,10 +17363,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17358
17363
|
renderRadioItem()
|
|
17359
17364
|
);
|
|
17360
17365
|
};
|
|
17361
|
-
Radio.defaultProps = defaultProps$
|
|
17366
|
+
Radio.defaultProps = defaultProps$M;
|
|
17362
17367
|
Radio.displayName = "NutRadio";
|
|
17363
17368
|
Radio.Group = RadioGroup;
|
|
17364
|
-
const defaultProps$
|
|
17369
|
+
const defaultProps$L = {
|
|
17365
17370
|
...ComponentDefaults,
|
|
17366
17371
|
range: false,
|
|
17367
17372
|
min: 0,
|
|
@@ -17389,7 +17394,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17389
17394
|
step,
|
|
17390
17395
|
value,
|
|
17391
17396
|
defaultValue
|
|
17392
|
-
} = { ...defaultProps$
|
|
17397
|
+
} = { ...defaultProps$L, ...props };
|
|
17393
17398
|
const classPrefix2 = "nut-range";
|
|
17394
17399
|
const [buttonIndex, setButtonIndex] = React.useState(0);
|
|
17395
17400
|
const [dragStatus, setDragStatus] = React.useState("start");
|
|
@@ -17653,9 +17658,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17653
17658
|
renderButton()
|
|
17654
17659
|
))), maxDescription !== null && /* @__PURE__ */ React.createElement("div", { className: "max" }, maxDescription || max));
|
|
17655
17660
|
};
|
|
17656
|
-
Range.defaultProps = defaultProps$
|
|
17661
|
+
Range.defaultProps = defaultProps$L;
|
|
17657
17662
|
Range.displayName = "NutRange";
|
|
17658
|
-
const defaultProps$
|
|
17663
|
+
const defaultProps$K = {
|
|
17659
17664
|
...ComponentDefaults,
|
|
17660
17665
|
count: 5,
|
|
17661
17666
|
min: 0,
|
|
@@ -17680,7 +17685,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17680
17685
|
allowHalf,
|
|
17681
17686
|
onChange
|
|
17682
17687
|
} = {
|
|
17683
|
-
...defaultProps$
|
|
17688
|
+
...defaultProps$K,
|
|
17684
17689
|
...props
|
|
17685
17690
|
};
|
|
17686
17691
|
const classPrefix2 = "nut-rate";
|
|
@@ -17763,9 +17768,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17763
17768
|
})
|
|
17764
17769
|
);
|
|
17765
17770
|
};
|
|
17766
|
-
Rate.defaultProps = defaultProps$
|
|
17771
|
+
Rate.defaultProps = defaultProps$K;
|
|
17767
17772
|
Rate.displayName = "NutRate";
|
|
17768
|
-
const defaultProps$
|
|
17773
|
+
const defaultProps$J = {
|
|
17769
17774
|
...ComponentDefaults,
|
|
17770
17775
|
placeholder: "",
|
|
17771
17776
|
shape: "square",
|
|
@@ -17804,7 +17809,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17804
17809
|
onSearch,
|
|
17805
17810
|
onClickInput
|
|
17806
17811
|
} = {
|
|
17807
|
-
...defaultProps$
|
|
17812
|
+
...defaultProps$J,
|
|
17808
17813
|
...props
|
|
17809
17814
|
};
|
|
17810
17815
|
const forceFocus = () => {
|
|
@@ -17913,9 +17918,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17913
17918
|
renderRight()
|
|
17914
17919
|
);
|
|
17915
17920
|
};
|
|
17916
|
-
SearchBar.defaultProps = defaultProps$
|
|
17921
|
+
SearchBar.defaultProps = defaultProps$J;
|
|
17917
17922
|
SearchBar.displayName = "NutSearchBar";
|
|
17918
|
-
const defaultProps$
|
|
17923
|
+
const defaultProps$I = {
|
|
17919
17924
|
...ComponentDefaults,
|
|
17920
17925
|
value: "",
|
|
17921
17926
|
visible: false,
|
|
@@ -17952,7 +17957,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17952
17957
|
onClickCloseIcon,
|
|
17953
17958
|
...rest
|
|
17954
17959
|
} = {
|
|
17955
|
-
...defaultProps$
|
|
17960
|
+
...defaultProps$I,
|
|
17956
17961
|
...props
|
|
17957
17962
|
};
|
|
17958
17963
|
const classPrefix2 = "nut-shortpassword";
|
|
@@ -18009,33 +18014,32 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18009
18014
|
), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__footer__sure`, onClick: sure }, locale.confirm)))
|
|
18010
18015
|
);
|
|
18011
18016
|
};
|
|
18012
|
-
ShortPassword.defaultProps = defaultProps$
|
|
18017
|
+
ShortPassword.defaultProps = defaultProps$I;
|
|
18013
18018
|
ShortPassword.displayName = "NutShortPassword";
|
|
18014
|
-
const defaultProps$
|
|
18019
|
+
const defaultProps$H = {
|
|
18020
|
+
...ComponentDefaults,
|
|
18015
18021
|
type: "png",
|
|
18016
18022
|
lineWidth: 2,
|
|
18017
18023
|
strokeStyle: "#000",
|
|
18018
|
-
|
|
18019
|
-
className: ""
|
|
18024
|
+
unsupported: ""
|
|
18020
18025
|
};
|
|
18021
|
-
const
|
|
18026
|
+
const InternalSignature = (props, ref) => {
|
|
18022
18027
|
const { locale } = useConfig();
|
|
18023
18028
|
const {
|
|
18024
18029
|
type: type2,
|
|
18025
18030
|
lineWidth,
|
|
18026
18031
|
strokeStyle,
|
|
18027
|
-
|
|
18032
|
+
unsupported,
|
|
18028
18033
|
className,
|
|
18029
|
-
|
|
18030
|
-
clear,
|
|
18034
|
+
style,
|
|
18031
18035
|
onConfirm,
|
|
18032
18036
|
onClear,
|
|
18033
18037
|
...rest
|
|
18034
18038
|
} = {
|
|
18035
|
-
...defaultProps$
|
|
18039
|
+
...defaultProps$H,
|
|
18036
18040
|
...props
|
|
18037
18041
|
};
|
|
18038
|
-
const
|
|
18042
|
+
const classPrefix2 = `nut-signature`;
|
|
18039
18043
|
const canvasRef = React.useRef(null);
|
|
18040
18044
|
const wrapRef = React.useRef(null);
|
|
18041
18045
|
const [canvasHeight, setCanvasHeight] = React.useState(0);
|
|
@@ -18102,12 +18106,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18102
18106
|
ctx2.current.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
18103
18107
|
ctx2.current.closePath();
|
|
18104
18108
|
}
|
|
18105
|
-
clear && clear();
|
|
18106
18109
|
onClear && onClear();
|
|
18107
18110
|
};
|
|
18108
|
-
const handleConfirmBtn = () => {
|
|
18109
|
-
onSave(canvasRef.current);
|
|
18110
|
-
};
|
|
18111
18111
|
const onSave = (canvas) => {
|
|
18112
18112
|
let dataurl;
|
|
18113
18113
|
switch (type2) {
|
|
@@ -18121,30 +18121,22 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18121
18121
|
dataurl = canvas.toDataURL("image/png");
|
|
18122
18122
|
}
|
|
18123
18123
|
handleClearBtn();
|
|
18124
|
-
confirm2 && confirm2(canvas, dataurl);
|
|
18125
18124
|
onConfirm && onConfirm(canvas, dataurl);
|
|
18126
18125
|
};
|
|
18127
|
-
|
|
18128
|
-
|
|
18129
|
-
|
|
18130
|
-
className: `${b("btn")}`,
|
|
18131
|
-
type: "default",
|
|
18132
|
-
onClick: () => handleClearBtn()
|
|
18133
|
-
},
|
|
18134
|
-
locale.signature.reSign
|
|
18135
|
-
), /* @__PURE__ */ React.createElement(
|
|
18136
|
-
Button,
|
|
18137
|
-
{
|
|
18138
|
-
className: `${b("btn")}`,
|
|
18139
|
-
type: "primary",
|
|
18140
|
-
onClick: () => handleConfirmBtn()
|
|
18126
|
+
React.useImperativeHandle(ref, () => ({
|
|
18127
|
+
confirm: () => {
|
|
18128
|
+
onSave(canvasRef.current);
|
|
18141
18129
|
},
|
|
18142
|
-
|
|
18143
|
-
|
|
18130
|
+
clear: () => {
|
|
18131
|
+
handleClearBtn();
|
|
18132
|
+
}
|
|
18133
|
+
}));
|
|
18134
|
+
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))));
|
|
18144
18135
|
};
|
|
18145
|
-
Signature
|
|
18136
|
+
const Signature = React.forwardRef(InternalSignature);
|
|
18137
|
+
Signature.defaultProps = defaultProps$H;
|
|
18146
18138
|
Signature.displayName = "NutSignature";
|
|
18147
|
-
const defaultProps$
|
|
18139
|
+
const defaultProps$G = {
|
|
18148
18140
|
...ComponentDefaults,
|
|
18149
18141
|
disabled: false,
|
|
18150
18142
|
activeText: "",
|
|
@@ -18161,7 +18153,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18161
18153
|
style,
|
|
18162
18154
|
onChange
|
|
18163
18155
|
} = {
|
|
18164
|
-
...defaultProps$
|
|
18156
|
+
...defaultProps$G,
|
|
18165
18157
|
...props
|
|
18166
18158
|
};
|
|
18167
18159
|
const classPrefix2 = "nut-switch";
|
|
@@ -18180,9 +18172,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18180
18172
|
};
|
|
18181
18173
|
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))));
|
|
18182
18174
|
};
|
|
18183
|
-
Switch.defaultProps = defaultProps$
|
|
18175
|
+
Switch.defaultProps = defaultProps$G;
|
|
18184
18176
|
Switch.displayName = "NutSwitch";
|
|
18185
|
-
const defaultProps$
|
|
18177
|
+
const defaultProps$F = {
|
|
18186
18178
|
...ComponentDefaults,
|
|
18187
18179
|
defaultValue: "",
|
|
18188
18180
|
showCount: false,
|
|
@@ -18211,7 +18203,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18211
18203
|
onBlur,
|
|
18212
18204
|
onFocus,
|
|
18213
18205
|
...rest
|
|
18214
|
-
} = { ...defaultProps$
|
|
18206
|
+
} = { ...defaultProps$F, ...props };
|
|
18215
18207
|
const classPrefix2 = "nut-textarea";
|
|
18216
18208
|
const textareaRef = React.useRef(null);
|
|
18217
18209
|
const compositionRef = React.useRef(false);
|
|
@@ -18295,9 +18287,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18295
18287
|
showCount && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__limit` }, inputValue.length, "/", maxLength < 0 ? 0 : maxLength)
|
|
18296
18288
|
);
|
|
18297
18289
|
};
|
|
18298
|
-
TextArea.defaultProps = defaultProps$
|
|
18290
|
+
TextArea.defaultProps = defaultProps$F;
|
|
18299
18291
|
TextArea.displayName = "NutTextArea";
|
|
18300
|
-
const defaultProps$
|
|
18292
|
+
const defaultProps$E = {
|
|
18301
18293
|
...ComponentDefaults,
|
|
18302
18294
|
percent: 0,
|
|
18303
18295
|
showText: false,
|
|
@@ -18320,7 +18312,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18320
18312
|
delay,
|
|
18321
18313
|
...rest
|
|
18322
18314
|
} = {
|
|
18323
|
-
...defaultProps$
|
|
18315
|
+
...defaultProps$E,
|
|
18324
18316
|
...props
|
|
18325
18317
|
};
|
|
18326
18318
|
const classPrefix2 = "nut-progress";
|
|
@@ -18415,7 +18407,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18415
18407
|
)))
|
|
18416
18408
|
);
|
|
18417
18409
|
};
|
|
18418
|
-
Progress.defaultProps = defaultProps$
|
|
18410
|
+
Progress.defaultProps = defaultProps$E;
|
|
18419
18411
|
Progress.displayName = "NutProgress";
|
|
18420
18412
|
class UploadOptions {
|
|
18421
18413
|
constructor() {
|
|
@@ -18487,6 +18479,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18487
18479
|
const isPromise = (val) => {
|
|
18488
18480
|
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
18489
18481
|
};
|
|
18482
|
+
const upperCaseFirst = (str) => {
|
|
18483
|
+
var str = str.toLowerCase();
|
|
18484
|
+
str = str.replace(
|
|
18485
|
+
/\b\w+\b/g,
|
|
18486
|
+
(word) => word.substring(0, 1).toUpperCase() + word.substring(1)
|
|
18487
|
+
);
|
|
18488
|
+
return str;
|
|
18489
|
+
};
|
|
18490
18490
|
const funcInterceptor = (interceptor, {
|
|
18491
18491
|
args = [],
|
|
18492
18492
|
done,
|
|
@@ -18512,7 +18512,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18512
18512
|
done();
|
|
18513
18513
|
}
|
|
18514
18514
|
};
|
|
18515
|
-
const defaultProps$
|
|
18515
|
+
const defaultProps$D = {
|
|
18516
18516
|
...ComponentDefaults,
|
|
18517
18517
|
url: "",
|
|
18518
18518
|
maxCount: 1,
|
|
@@ -18594,7 +18594,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18594
18594
|
beforeXhrUpload,
|
|
18595
18595
|
beforeDelete,
|
|
18596
18596
|
...restProps
|
|
18597
|
-
} = { ...defaultProps$
|
|
18597
|
+
} = { ...defaultProps$D, ...props };
|
|
18598
18598
|
const [fileList, setFileList] = React.useState(defaultValue || []);
|
|
18599
18599
|
const [uploadQueue, setUploadQueue] = React.useState([]);
|
|
18600
18600
|
React.useEffect(() => {
|
|
@@ -18935,9 +18935,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18935
18935
|
));
|
|
18936
18936
|
};
|
|
18937
18937
|
const Uploader = React.forwardRef(InternalUploader);
|
|
18938
|
-
Uploader.defaultProps = defaultProps$
|
|
18938
|
+
Uploader.defaultProps = defaultProps$D;
|
|
18939
18939
|
Uploader.displayName = "NutUploader";
|
|
18940
|
-
const defaultProps$
|
|
18940
|
+
const defaultProps$C = {
|
|
18941
18941
|
...ComponentDefaults,
|
|
18942
18942
|
visible: false,
|
|
18943
18943
|
title: "",
|
|
@@ -18964,7 +18964,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18964
18964
|
className,
|
|
18965
18965
|
style,
|
|
18966
18966
|
...rest
|
|
18967
|
-
} = { ...defaultProps$
|
|
18967
|
+
} = { ...defaultProps$C, ...props };
|
|
18968
18968
|
const classPrefix2 = "nut-actionsheet";
|
|
18969
18969
|
const cancelActionSheet = () => {
|
|
18970
18970
|
onCancel && onCancel();
|
|
@@ -19005,7 +19005,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19005
19005
|
))
|
|
19006
19006
|
);
|
|
19007
19007
|
};
|
|
19008
|
-
ActionSheet.defaultProps = defaultProps$
|
|
19008
|
+
ActionSheet.defaultProps = defaultProps$C;
|
|
19009
19009
|
ActionSheet.displayName = "NutActionSheet";
|
|
19010
19010
|
const fullClone = {
|
|
19011
19011
|
...ReactDOM__namespace
|
|
@@ -19238,7 +19238,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19238
19238
|
};
|
|
19239
19239
|
DialogWrap.defaultProps = defaultDialogProps;
|
|
19240
19240
|
DialogWrap.displayName = "NutDialogWrap";
|
|
19241
|
-
const defaultProps$
|
|
19241
|
+
const defaultProps$B = {
|
|
19242
19242
|
confirmText: "",
|
|
19243
19243
|
cancelText: "",
|
|
19244
19244
|
overlay: true,
|
|
@@ -19337,9 +19337,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19337
19337
|
});
|
|
19338
19338
|
};
|
|
19339
19339
|
});
|
|
19340
|
-
Dialog.defaultProps = defaultProps$
|
|
19340
|
+
Dialog.defaultProps = defaultProps$B;
|
|
19341
19341
|
Dialog.displayName = "NutDialog";
|
|
19342
|
-
const defaultProps$
|
|
19342
|
+
const defaultProps$A = {
|
|
19343
19343
|
...ComponentDefaults,
|
|
19344
19344
|
attract: false,
|
|
19345
19345
|
direction: void 0,
|
|
@@ -19352,7 +19352,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19352
19352
|
};
|
|
19353
19353
|
const Drag = (props) => {
|
|
19354
19354
|
const { attract, direction, boundary, children, className, style, ...reset } = {
|
|
19355
|
-
...defaultProps$
|
|
19355
|
+
...defaultProps$A,
|
|
19356
19356
|
...props
|
|
19357
19357
|
};
|
|
19358
19358
|
const classPrefix2 = "nut-drag";
|
|
@@ -19415,20 +19415,20 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19415
19415
|
/* @__PURE__ */ React.createElement(animated.div, { style: currstyle, ...bind() }, children)
|
|
19416
19416
|
);
|
|
19417
19417
|
};
|
|
19418
|
-
Drag.defaultProps = defaultProps$
|
|
19418
|
+
Drag.defaultProps = defaultProps$A;
|
|
19419
19419
|
Drag.displayName = "NutDrag";
|
|
19420
19420
|
const defaultStatus = {
|
|
19421
19421
|
empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
|
|
19422
19422
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
19423
19423
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
19424
19424
|
};
|
|
19425
|
-
const defaultProps$
|
|
19425
|
+
const defaultProps$z = {
|
|
19426
19426
|
...ComponentDefaults,
|
|
19427
19427
|
description: "",
|
|
19428
19428
|
imageSize: "",
|
|
19429
19429
|
status: "empty"
|
|
19430
19430
|
};
|
|
19431
|
-
const classPrefix$
|
|
19431
|
+
const classPrefix$c = `nut-empty`;
|
|
19432
19432
|
const Empty = (props) => {
|
|
19433
19433
|
const { locale } = useConfig();
|
|
19434
19434
|
const {
|
|
@@ -19440,7 +19440,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19440
19440
|
status,
|
|
19441
19441
|
...rest
|
|
19442
19442
|
} = {
|
|
19443
|
-
...defaultProps$
|
|
19443
|
+
...defaultProps$z,
|
|
19444
19444
|
...props
|
|
19445
19445
|
};
|
|
19446
19446
|
const [imgStyle, setImgStyle] = React.useState({});
|
|
@@ -19463,46 +19463,38 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19463
19463
|
};
|
|
19464
19464
|
});
|
|
19465
19465
|
}, [imageSize]);
|
|
19466
|
-
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
19466
|
+
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));
|
|
19467
19467
|
};
|
|
19468
|
-
Empty.defaultProps = defaultProps$
|
|
19468
|
+
Empty.defaultProps = defaultProps$z;
|
|
19469
19469
|
Empty.displayName = "NutEmpty";
|
|
19470
|
-
const defaultProps$
|
|
19470
|
+
const defaultProps$y = {
|
|
19471
19471
|
...ComponentDefaults,
|
|
19472
19472
|
hasMore: true,
|
|
19473
19473
|
threshold: 200,
|
|
19474
|
-
|
|
19475
|
-
|
|
19476
|
-
|
|
19477
|
-
|
|
19478
|
-
|
|
19479
|
-
|
|
19480
|
-
loadIcon: null,
|
|
19481
|
-
loadingText: "加载中···",
|
|
19482
|
-
loadMoreText: "哎呀,这里是底部了啦"
|
|
19483
|
-
};
|
|
19484
|
-
const Infiniteloading = (props) => {
|
|
19474
|
+
target: "",
|
|
19475
|
+
capture: false,
|
|
19476
|
+
pullRefresh: false
|
|
19477
|
+
};
|
|
19478
|
+
const classPrefix$b = `nut-infiniteloading`;
|
|
19479
|
+
const InfiniteLoading = (props) => {
|
|
19485
19480
|
const { locale } = useConfig();
|
|
19486
19481
|
const {
|
|
19487
19482
|
children,
|
|
19488
19483
|
hasMore,
|
|
19489
19484
|
threshold,
|
|
19490
|
-
|
|
19491
|
-
|
|
19492
|
-
|
|
19493
|
-
|
|
19494
|
-
pullIcon,
|
|
19495
|
-
pullText,
|
|
19496
|
-
loadIcon,
|
|
19485
|
+
target,
|
|
19486
|
+
capture,
|
|
19487
|
+
pullRefresh,
|
|
19488
|
+
pullingText,
|
|
19497
19489
|
loadingText,
|
|
19498
19490
|
loadMoreText,
|
|
19499
19491
|
className,
|
|
19500
19492
|
onRefresh,
|
|
19501
19493
|
onLoadMore,
|
|
19502
|
-
|
|
19494
|
+
onScroll,
|
|
19503
19495
|
...restProps
|
|
19504
19496
|
} = {
|
|
19505
|
-
...defaultProps$
|
|
19497
|
+
...defaultProps$y,
|
|
19506
19498
|
...props
|
|
19507
19499
|
};
|
|
19508
19500
|
const [isInfiniting, setIsInfiniting] = React.useState(false);
|
|
@@ -19514,16 +19506,16 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19514
19506
|
const refreshMaxH = React.useRef(0);
|
|
19515
19507
|
const y2 = React.useRef(0);
|
|
19516
19508
|
const distance = React.useRef(0);
|
|
19517
|
-
const
|
|
19518
|
-
const classes = classNames(className, b());
|
|
19509
|
+
const classes = classNames(className, classPrefix$b);
|
|
19519
19510
|
React.useEffect(() => {
|
|
19520
|
-
|
|
19521
|
-
|
|
19522
|
-
|
|
19523
|
-
|
|
19524
|
-
|
|
19511
|
+
if (target && document.getElementById(target)) {
|
|
19512
|
+
scrollEl.current = document.getElementById(target);
|
|
19513
|
+
} else {
|
|
19514
|
+
scrollEl.current = window;
|
|
19515
|
+
}
|
|
19516
|
+
scrollEl.current.addEventListener("scroll", handleScroll, capture);
|
|
19525
19517
|
return () => {
|
|
19526
|
-
scrollEl.current.removeEventListener("scroll", handleScroll,
|
|
19518
|
+
scrollEl.current.removeEventListener("scroll", handleScroll, capture);
|
|
19527
19519
|
};
|
|
19528
19520
|
}, [hasMore, isInfiniting]);
|
|
19529
19521
|
React.useEffect(() => {
|
|
@@ -19541,9 +19533,6 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19541
19533
|
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)`
|
|
19542
19534
|
};
|
|
19543
19535
|
};
|
|
19544
|
-
const getParentElement = (el) => {
|
|
19545
|
-
return containerId ? document.querySelector(`#${containerId}`) : el && el.parentNode;
|
|
19546
|
-
};
|
|
19547
19536
|
const handleScroll = () => {
|
|
19548
19537
|
requestAniFrame2()(() => {
|
|
19549
19538
|
if (!isScrollAtBottom() || !hasMore || isInfiniting) {
|
|
@@ -19563,7 +19552,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19563
19552
|
isTouching.current = false;
|
|
19564
19553
|
};
|
|
19565
19554
|
const touchStart = (event) => {
|
|
19566
|
-
if (beforeScrollTop.current === 0 && !isTouching.current &&
|
|
19555
|
+
if (beforeScrollTop.current === 0 && !isTouching.current && pullRefresh) {
|
|
19567
19556
|
y2.current = event.touches[0].pageY;
|
|
19568
19557
|
isTouching.current = true;
|
|
19569
19558
|
const childHeight = refreshTop.current.firstElementChild.offsetHeight;
|
|
@@ -19595,12 +19584,12 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19595
19584
|
}
|
|
19596
19585
|
};
|
|
19597
19586
|
const requestAniFrame2 = () => {
|
|
19598
|
-
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function fn(callback) {
|
|
19587
|
+
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function fn(callback) {
|
|
19599
19588
|
window.setTimeout(callback, 1e3 / 60);
|
|
19600
19589
|
};
|
|
19601
19590
|
};
|
|
19602
19591
|
const getWindowScrollTop = () => {
|
|
19603
|
-
return window.
|
|
19592
|
+
return window.scrollY !== void 0 ? window.scrollY : (document.documentElement || document.body.parentNode || document.body).scrollTop;
|
|
19604
19593
|
};
|
|
19605
19594
|
const calculateTopPosition = (el) => {
|
|
19606
19595
|
return !el ? 0 : el.offsetTop + calculateTopPosition(el.offsetParent);
|
|
@@ -19610,7 +19599,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19610
19599
|
let resScrollTop = 0;
|
|
19611
19600
|
let direction = "down";
|
|
19612
19601
|
const windowScrollTop = getWindowScrollTop();
|
|
19613
|
-
if (
|
|
19602
|
+
if (!target || !document.getElementById(target)) {
|
|
19614
19603
|
if (scroller.current) {
|
|
19615
19604
|
offsetDistance = calculateTopPosition(scroller.current) + scroller.current.offsetHeight - windowScrollTop - window.innerHeight;
|
|
19616
19605
|
}
|
|
@@ -19626,7 +19615,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19626
19615
|
direction = "down";
|
|
19627
19616
|
}
|
|
19628
19617
|
beforeScrollTop.current = resScrollTop;
|
|
19629
|
-
|
|
19618
|
+
onScroll && onScroll(resScrollTop);
|
|
19630
19619
|
return offsetDistance <= threshold && direction === "down";
|
|
19631
19620
|
};
|
|
19632
19621
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -19638,14 +19627,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19638
19627
|
onTouchEnd: touchEnd,
|
|
19639
19628
|
...restProps
|
|
19640
19629
|
},
|
|
19641
|
-
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React.createElement("div", { className: "top-box" },
|
|
19630
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React.createElement("div", { className: "top-box" }, pullingText || locale.infiniteloading.pullRefreshText)),
|
|
19642
19631
|
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-container" }, children),
|
|
19643
|
-
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-bottom" }, isInfiniting ? /* @__PURE__ */ React.createElement("div", { className: "bottom-box" },
|
|
19632
|
+
/* @__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))
|
|
19644
19633
|
);
|
|
19645
19634
|
};
|
|
19646
|
-
|
|
19647
|
-
|
|
19648
|
-
const defaultProps$
|
|
19635
|
+
InfiniteLoading.defaultProps = defaultProps$y;
|
|
19636
|
+
InfiniteLoading.displayName = "NutInfiniteLoading";
|
|
19637
|
+
const defaultProps$x = {
|
|
19649
19638
|
...ComponentDefaults,
|
|
19650
19639
|
direction: "horizontal",
|
|
19651
19640
|
list: [],
|
|
@@ -19683,7 +19672,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19683
19672
|
onClick,
|
|
19684
19673
|
onClickItem
|
|
19685
19674
|
} = {
|
|
19686
|
-
...defaultProps$
|
|
19675
|
+
...defaultProps$x,
|
|
19687
19676
|
...props
|
|
19688
19677
|
};
|
|
19689
19678
|
const classPrefix2 = "nut-noticebar";
|
|
@@ -20034,9 +20023,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20034
20023
|
)
|
|
20035
20024
|
) : null);
|
|
20036
20025
|
};
|
|
20037
|
-
NoticeBar.defaultProps = defaultProps$
|
|
20026
|
+
NoticeBar.defaultProps = defaultProps$x;
|
|
20038
20027
|
NoticeBar.displayName = "NutNoticeBar";
|
|
20039
|
-
const classPrefix$
|
|
20028
|
+
const classPrefix$a = "nut-notify";
|
|
20040
20029
|
let Notification$1 = (_a = class extends React__namespace.PureComponent {
|
|
20041
20030
|
constructor(props) {
|
|
20042
20031
|
super(props);
|
|
@@ -20087,10 +20076,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20087
20076
|
const { style, message, type: type2, className, position } = this.props;
|
|
20088
20077
|
const { show: show2 } = this.state;
|
|
20089
20078
|
const classes = classNames({
|
|
20090
|
-
[`${classPrefix$
|
|
20091
|
-
[`${classPrefix$
|
|
20092
|
-
[`${classPrefix$
|
|
20093
|
-
[`${classPrefix$
|
|
20079
|
+
[`${classPrefix$a}--popup-top`]: position === "top",
|
|
20080
|
+
[`${classPrefix$a}--popup-bottom`]: position === "bottom",
|
|
20081
|
+
[`${classPrefix$a}`]: true,
|
|
20082
|
+
[`${classPrefix$a}--${type2}`]: true
|
|
20094
20083
|
});
|
|
20095
20084
|
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
|
|
20096
20085
|
CSSTransition$1,
|
|
@@ -20199,166 +20188,290 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20199
20188
|
}
|
|
20200
20189
|
}
|
|
20201
20190
|
};
|
|
20202
|
-
|
|
20203
|
-
|
|
20204
|
-
|
|
20205
|
-
|
|
20206
|
-
|
|
20191
|
+
const getTargetElement = (target) => {
|
|
20192
|
+
let targetElement;
|
|
20193
|
+
if (isFunction(target)) {
|
|
20194
|
+
targetElement = target();
|
|
20195
|
+
} else if ("current" in target) {
|
|
20196
|
+
targetElement = target.current;
|
|
20197
|
+
} else {
|
|
20198
|
+
targetElement = target;
|
|
20207
20199
|
}
|
|
20208
|
-
|
|
20209
|
-
|
|
20210
|
-
|
|
20211
|
-
|
|
20212
|
-
|
|
20213
|
-
|
|
20214
|
-
|
|
20215
|
-
|
|
20216
|
-
|
|
20217
|
-
|
|
20218
|
-
const childCallback = this.props.children.props[type2];
|
|
20219
|
-
if (childCallback) {
|
|
20220
|
-
childCallback(e);
|
|
20200
|
+
return targetElement;
|
|
20201
|
+
};
|
|
20202
|
+
function useClickAway(onClickAway, target, eventName = "click", isListener, outerVar) {
|
|
20203
|
+
const handler = (event) => {
|
|
20204
|
+
const targets = Array.isArray(target) ? target : [target];
|
|
20205
|
+
if (targets.some((item) => {
|
|
20206
|
+
const targetElement = getTargetElement(item);
|
|
20207
|
+
return !targetElement || targetElement.contains(event.target);
|
|
20208
|
+
})) {
|
|
20209
|
+
return;
|
|
20221
20210
|
}
|
|
20222
|
-
|
|
20223
|
-
|
|
20224
|
-
callback(e);
|
|
20211
|
+
if (outerVar) {
|
|
20212
|
+
onClickAway();
|
|
20225
20213
|
}
|
|
20226
|
-
}
|
|
20227
|
-
|
|
20228
|
-
|
|
20229
|
-
|
|
20230
|
-
|
|
20231
|
-
|
|
20232
|
-
};
|
|
20233
|
-
if (child && child.props && child.props.className) {
|
|
20234
|
-
newChildProps.className = className;
|
|
20214
|
+
};
|
|
20215
|
+
React.useEffect(() => {
|
|
20216
|
+
if (isListener) {
|
|
20217
|
+
window.addEventListener(eventName, handler, true);
|
|
20218
|
+
} else {
|
|
20219
|
+
window.removeEventListener(eventName, handler, true);
|
|
20235
20220
|
}
|
|
20236
|
-
|
|
20237
|
-
|
|
20221
|
+
return () => {
|
|
20222
|
+
window.removeEventListener(eventName, handler, true);
|
|
20238
20223
|
};
|
|
20239
|
-
|
|
20240
|
-
const trigger = React.cloneElement(child, cloneProps);
|
|
20241
|
-
return trigger;
|
|
20242
|
-
}
|
|
20224
|
+
}, [target]);
|
|
20243
20225
|
}
|
|
20244
|
-
const defaultProps$
|
|
20226
|
+
const defaultProps$w = {
|
|
20245
20227
|
...ComponentDefaults,
|
|
20246
20228
|
list: [],
|
|
20247
|
-
theme: "light",
|
|
20248
20229
|
location: "bottom",
|
|
20249
20230
|
visible: false,
|
|
20250
|
-
offset:
|
|
20231
|
+
offset: [0, 12],
|
|
20232
|
+
targetId: "",
|
|
20251
20233
|
className: "",
|
|
20252
|
-
|
|
20234
|
+
background: "",
|
|
20235
|
+
color: "",
|
|
20236
|
+
showArrow: true,
|
|
20237
|
+
duration: 0.3,
|
|
20238
|
+
overlay: false,
|
|
20239
|
+
overlayClassName: "",
|
|
20240
|
+
overlayStyle: {},
|
|
20241
|
+
closeOnClickOutside: true,
|
|
20242
|
+
closeOnClickAction: true,
|
|
20243
|
+
closeOnOverlayClick: true,
|
|
20244
|
+
onClick: () => {
|
|
20245
|
+
},
|
|
20246
|
+
onOpen: () => {
|
|
20247
|
+
},
|
|
20248
|
+
onClose: () => {
|
|
20253
20249
|
},
|
|
20254
|
-
|
|
20250
|
+
onSelect: (item, index) => {
|
|
20255
20251
|
}
|
|
20256
20252
|
};
|
|
20253
|
+
const classPrefix$9 = `nut-popover`;
|
|
20257
20254
|
const Popover = (props) => {
|
|
20258
20255
|
const {
|
|
20259
20256
|
children,
|
|
20260
20257
|
list,
|
|
20261
|
-
theme,
|
|
20262
20258
|
location,
|
|
20263
20259
|
visible,
|
|
20264
20260
|
offset,
|
|
20261
|
+
targetId,
|
|
20262
|
+
overlay,
|
|
20263
|
+
overlayStyle,
|
|
20264
|
+
overlayClassName,
|
|
20265
|
+
closeOnClickOutside,
|
|
20266
|
+
closeOnClickAction,
|
|
20267
|
+
closeOnOverlayClick,
|
|
20265
20268
|
className,
|
|
20269
|
+
showArrow,
|
|
20266
20270
|
style,
|
|
20271
|
+
background,
|
|
20272
|
+
color,
|
|
20267
20273
|
onClick,
|
|
20268
|
-
|
|
20274
|
+
onOpen,
|
|
20275
|
+
onClose,
|
|
20276
|
+
onSelect,
|
|
20269
20277
|
...reset
|
|
20270
20278
|
} = {
|
|
20271
|
-
...defaultProps$
|
|
20279
|
+
...defaultProps$w,
|
|
20272
20280
|
...props
|
|
20273
20281
|
};
|
|
20274
|
-
const
|
|
20275
|
-
|
|
20276
|
-
|
|
20277
|
-
setElWidth(getRect(goodItem.current).width);
|
|
20278
|
-
setElHeight(getRect(goodItem.current).height);
|
|
20279
|
-
}
|
|
20280
|
-
});
|
|
20281
|
-
const [classes, setClasses] = React.useState("");
|
|
20282
|
+
const popoverRef = React.useRef(null);
|
|
20283
|
+
const popoverContentRef = React.useRef(null);
|
|
20284
|
+
const [showPopup, setShowPopup] = React.useState(false);
|
|
20282
20285
|
const [elWidth, setElWidth] = React.useState(0);
|
|
20283
20286
|
const [elHeight, setElHeight] = React.useState(0);
|
|
20284
|
-
const [
|
|
20285
|
-
const [popoverArrow, setPopoverArrow] = React.useState("");
|
|
20287
|
+
const [rootPosition, setRootPosition] = React.useState();
|
|
20286
20288
|
React.useEffect(() => {
|
|
20287
|
-
|
|
20288
|
-
|
|
20289
|
-
|
|
20290
|
-
|
|
20291
|
-
|
|
20292
|
-
|
|
20293
|
-
|
|
20294
|
-
|
|
20295
|
-
|
|
20296
|
-
|
|
20297
|
-
|
|
20298
|
-
|
|
20299
|
-
|
|
20289
|
+
setShowPopup(visible);
|
|
20290
|
+
if (visible) {
|
|
20291
|
+
setTimeout(() => {
|
|
20292
|
+
getContentWidth();
|
|
20293
|
+
}, 0);
|
|
20294
|
+
}
|
|
20295
|
+
}, [visible]);
|
|
20296
|
+
const targetSet = [
|
|
20297
|
+
targetId ? document.querySelector(`#${targetId}`) : popoverRef.current,
|
|
20298
|
+
popoverContentRef.current
|
|
20299
|
+
];
|
|
20300
|
+
useClickAway(
|
|
20301
|
+
() => {
|
|
20302
|
+
props.onClick && props.onClick();
|
|
20303
|
+
onClose && onClose();
|
|
20304
|
+
},
|
|
20305
|
+
targetSet,
|
|
20306
|
+
"touchstart",
|
|
20307
|
+
visible,
|
|
20308
|
+
closeOnClickOutside
|
|
20309
|
+
);
|
|
20310
|
+
const getContentWidth = () => {
|
|
20311
|
+
let rect = getRect(popoverRef.current);
|
|
20312
|
+
if (targetId) {
|
|
20313
|
+
setTimeout(() => {
|
|
20314
|
+
rect = getRect(document.querySelector(`#${targetId}`));
|
|
20315
|
+
setRootPosition({
|
|
20316
|
+
width: rect.width,
|
|
20317
|
+
height: rect.height,
|
|
20318
|
+
left: rect.left,
|
|
20319
|
+
top: rect.top,
|
|
20320
|
+
right: rect.right
|
|
20321
|
+
});
|
|
20322
|
+
if (popoverContentRef.current) {
|
|
20323
|
+
setElWidth(popoverContentRef.current.clientWidth);
|
|
20324
|
+
setElHeight(popoverContentRef.current.clientHeight);
|
|
20325
|
+
}
|
|
20326
|
+
}, 0);
|
|
20300
20327
|
} else {
|
|
20301
|
-
|
|
20328
|
+
setRootPosition({
|
|
20329
|
+
width: rect.width,
|
|
20330
|
+
height: rect.height,
|
|
20331
|
+
left: rect.left,
|
|
20332
|
+
top: rect.top,
|
|
20333
|
+
right: rect.right
|
|
20334
|
+
});
|
|
20335
|
+
if (popoverContentRef.current) {
|
|
20336
|
+
setElWidth(popoverContentRef.current.clientWidth);
|
|
20337
|
+
setElHeight(popoverContentRef.current.clientHeight);
|
|
20338
|
+
}
|
|
20302
20339
|
}
|
|
20303
|
-
return style2;
|
|
20304
|
-
};
|
|
20305
|
-
const classesSelf = () => {
|
|
20306
|
-
const prefixCls2 = "nut-popover";
|
|
20307
|
-
return `${prefixCls2} ${theme ? `${prefixCls2}--${theme}` : ""}`;
|
|
20308
20340
|
};
|
|
20309
|
-
const
|
|
20310
|
-
|
|
20311
|
-
|
|
20341
|
+
const classes = classNames(
|
|
20342
|
+
{
|
|
20343
|
+
[`${classPrefix$9}`]: true
|
|
20344
|
+
},
|
|
20345
|
+
className
|
|
20346
|
+
);
|
|
20347
|
+
const customStyle = () => {
|
|
20348
|
+
const styles = {};
|
|
20349
|
+
if (background) {
|
|
20350
|
+
styles.background = background;
|
|
20351
|
+
}
|
|
20352
|
+
if (color) {
|
|
20353
|
+
styles.color = color;
|
|
20354
|
+
}
|
|
20355
|
+
return styles;
|
|
20312
20356
|
};
|
|
20313
|
-
const
|
|
20314
|
-
const
|
|
20315
|
-
|
|
20357
|
+
const popoverArrow = () => {
|
|
20358
|
+
const prefixCls2 = "nut-popover-arrow";
|
|
20359
|
+
const loca = location;
|
|
20360
|
+
const direction = loca.split("-")[0];
|
|
20361
|
+
return `${prefixCls2} ${prefixCls2}-${direction} ${prefixCls2}--${loca}`;
|
|
20316
20362
|
};
|
|
20317
|
-
const
|
|
20318
|
-
const
|
|
20319
|
-
|
|
20363
|
+
const popoverArrowStyle = () => {
|
|
20364
|
+
const styles = {};
|
|
20365
|
+
const { background: background2 } = props;
|
|
20366
|
+
const direction = location.split("-")[0];
|
|
20367
|
+
if (background2) {
|
|
20368
|
+
styles[`border${upperCaseFirst(direction)}Color`] = background2;
|
|
20369
|
+
}
|
|
20370
|
+
return styles;
|
|
20320
20371
|
};
|
|
20321
|
-
const
|
|
20322
|
-
|
|
20323
|
-
|
|
20372
|
+
const getRootPosition = () => {
|
|
20373
|
+
let styles = {};
|
|
20374
|
+
if (!rootPosition)
|
|
20375
|
+
return {};
|
|
20376
|
+
const contentWidth = elWidth;
|
|
20377
|
+
const contentHeight = elHeight;
|
|
20378
|
+
const { width, height, left, top, right } = rootPosition;
|
|
20379
|
+
const direction = location.split("-")[0];
|
|
20380
|
+
const skew = location.split("-")[1];
|
|
20381
|
+
let cross = 0;
|
|
20382
|
+
let parallel = 0;
|
|
20383
|
+
if (Array.isArray(offset) && offset.length == 2) {
|
|
20384
|
+
cross += +offset[1];
|
|
20385
|
+
parallel += +offset[0];
|
|
20386
|
+
}
|
|
20387
|
+
if (width) {
|
|
20388
|
+
if (["bottom", "top"].includes(direction)) {
|
|
20389
|
+
const h = direction == "bottom" ? height + cross : -(contentHeight + cross);
|
|
20390
|
+
styles.top = `${top + h}px`;
|
|
20391
|
+
if (!skew) {
|
|
20392
|
+
styles.left = `${-(contentWidth - width) / 2 + left + parallel}px`;
|
|
20393
|
+
}
|
|
20394
|
+
if (skew == "start") {
|
|
20395
|
+
styles.left = `${left + parallel}px`;
|
|
20396
|
+
}
|
|
20397
|
+
if (skew == "end") {
|
|
20398
|
+
styles.left = `${right + parallel}px`;
|
|
20399
|
+
}
|
|
20400
|
+
}
|
|
20401
|
+
if (["left", "right"].includes(direction)) {
|
|
20402
|
+
const contentW = direction == "left" ? -(contentWidth + cross) : width + cross;
|
|
20403
|
+
styles.left = `${left + contentW}px`;
|
|
20404
|
+
if (!skew) {
|
|
20405
|
+
styles.top = `${top - contentHeight / 2 + height / 2 - 4 + parallel}px`;
|
|
20406
|
+
}
|
|
20407
|
+
if (skew == "start") {
|
|
20408
|
+
styles.top = `${top + parallel}px`;
|
|
20409
|
+
}
|
|
20410
|
+
if (skew == "end") {
|
|
20411
|
+
styles.top = `${top + height + parallel}px`;
|
|
20412
|
+
}
|
|
20413
|
+
}
|
|
20324
20414
|
}
|
|
20415
|
+
return styles;
|
|
20325
20416
|
};
|
|
20326
|
-
const
|
|
20417
|
+
const handleSelect = (item, index) => {
|
|
20327
20418
|
if (!item.disabled) {
|
|
20328
|
-
|
|
20419
|
+
onSelect(item, index);
|
|
20420
|
+
}
|
|
20421
|
+
if (closeOnClickAction) {
|
|
20422
|
+
props.onClick && props.onClick();
|
|
20423
|
+
onClose && onClose();
|
|
20329
20424
|
}
|
|
20330
20425
|
};
|
|
20331
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
20426
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, !targetId && /* @__PURE__ */ React.createElement(
|
|
20332
20427
|
"div",
|
|
20333
20428
|
{
|
|
20334
|
-
className:
|
|
20335
|
-
|
|
20336
|
-
|
|
20429
|
+
className: "nut-popover-wrapper",
|
|
20430
|
+
ref: popoverRef,
|
|
20431
|
+
onClick: () => {
|
|
20432
|
+
props.onClick && props.onClick();
|
|
20433
|
+
if (!visible) {
|
|
20434
|
+
onOpen && onOpen();
|
|
20435
|
+
} else {
|
|
20436
|
+
onClose && onClose();
|
|
20437
|
+
}
|
|
20438
|
+
},
|
|
20439
|
+
style
|
|
20440
|
+
},
|
|
20441
|
+
Array.isArray(children) ? children[0] : children
|
|
20442
|
+
), /* @__PURE__ */ React.createElement("div", { className: classes, style: getRootPosition(), ...reset }, /* @__PURE__ */ React.createElement(
|
|
20443
|
+
Popup,
|
|
20444
|
+
{
|
|
20445
|
+
className: `nut-popover-content nut-popover-content--${location}`,
|
|
20446
|
+
style: customStyle(),
|
|
20447
|
+
position: "default",
|
|
20448
|
+
overlay,
|
|
20449
|
+
overlayStyle,
|
|
20450
|
+
overlayClassName,
|
|
20451
|
+
closeOnOverlayClick,
|
|
20452
|
+
visible: showPopup
|
|
20337
20453
|
},
|
|
20338
|
-
/* @__PURE__ */ React.createElement(
|
|
20454
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-popover-content-group", ref: popoverContentRef }, showArrow && /* @__PURE__ */ React.createElement("div", { className: popoverArrow(), style: popoverArrowStyle() }), Array.isArray(children) ? children[1] : "", list.map((item, index) => {
|
|
20339
20455
|
return /* @__PURE__ */ React.createElement(
|
|
20340
20456
|
"div",
|
|
20341
20457
|
{
|
|
20342
|
-
|
|
20343
|
-
|
|
20344
|
-
|
|
20345
|
-
|
|
20346
|
-
|
|
20458
|
+
className: classNames(
|
|
20459
|
+
{
|
|
20460
|
+
"nut-popover-menu-item": true,
|
|
20461
|
+
"nut-popover-menu-disabled": item.disabled
|
|
20462
|
+
},
|
|
20463
|
+
item.className
|
|
20464
|
+
),
|
|
20465
|
+
key: item.key,
|
|
20466
|
+
onClick: () => handleSelect(item, index)
|
|
20347
20467
|
},
|
|
20348
20468
|
item.icon ? item.icon : null,
|
|
20349
|
-
/* @__PURE__ */ React.createElement("div", { className: "popover-menu-item-name" }, item.name)
|
|
20469
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-popover-menu-item-name" }, item.name)
|
|
20350
20470
|
);
|
|
20351
|
-
}))
|
|
20352
|
-
)
|
|
20353
|
-
Overlay,
|
|
20354
|
-
{
|
|
20355
|
-
visible,
|
|
20356
|
-
onClick: (e) => handleClick2(e),
|
|
20357
|
-
style: { background: "transparent" }
|
|
20358
|
-
}
|
|
20359
|
-
) : null);
|
|
20471
|
+
}))
|
|
20472
|
+
)));
|
|
20360
20473
|
};
|
|
20361
|
-
Popover.defaultProps = defaultProps$
|
|
20474
|
+
Popover.defaultProps = defaultProps$w;
|
|
20362
20475
|
Popover.displayName = "NutPopover";
|
|
20363
20476
|
function bound(position, min, max) {
|
|
20364
20477
|
let ret = position;
|
|
@@ -20396,7 +20509,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20396
20509
|
console.log(e);
|
|
20397
20510
|
}
|
|
20398
20511
|
}
|
|
20399
|
-
const defaultProps$
|
|
20512
|
+
const defaultProps$v = {
|
|
20400
20513
|
...ComponentDefaults,
|
|
20401
20514
|
pullingText: "",
|
|
20402
20515
|
canReleaseText: "",
|
|
@@ -20413,7 +20526,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20413
20526
|
const classPrefix2 = "nut-pulltorefresh";
|
|
20414
20527
|
const { locale } = useConfig();
|
|
20415
20528
|
const props = {
|
|
20416
|
-
...defaultProps$
|
|
20529
|
+
...defaultProps$v,
|
|
20417
20530
|
...p,
|
|
20418
20531
|
...{
|
|
20419
20532
|
pullingText: p.pullingText || locale.pullToRefresh.pullingText,
|
|
@@ -20556,10 +20669,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20556
20669
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, props.children)
|
|
20557
20670
|
);
|
|
20558
20671
|
};
|
|
20559
|
-
PullToRefresh.defaultProps = defaultProps$
|
|
20672
|
+
PullToRefresh.defaultProps = defaultProps$v;
|
|
20560
20673
|
PullToRefresh.displayName = "NutPullToRefresh";
|
|
20561
20674
|
const AvatarContext = React.createContext({});
|
|
20562
|
-
const defaultProps$
|
|
20675
|
+
const defaultProps$u = {
|
|
20563
20676
|
...ComponentDefaults,
|
|
20564
20677
|
size: "",
|
|
20565
20678
|
shape: "round",
|
|
@@ -20570,7 +20683,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20570
20683
|
src: "",
|
|
20571
20684
|
alt: ""
|
|
20572
20685
|
};
|
|
20573
|
-
const classPrefix$
|
|
20686
|
+
const classPrefix$8 = `nut-avatar`;
|
|
20574
20687
|
const Avatar = (props) => {
|
|
20575
20688
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
20576
20689
|
const {
|
|
@@ -20589,7 +20702,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20589
20702
|
onError,
|
|
20590
20703
|
...rest
|
|
20591
20704
|
} = {
|
|
20592
|
-
...defaultProps$
|
|
20705
|
+
...defaultProps$u,
|
|
20593
20706
|
...props
|
|
20594
20707
|
};
|
|
20595
20708
|
const [maxSum, setMaxSum] = React.useState(0);
|
|
@@ -20602,7 +20715,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20602
20715
|
[`nut-avatar-${((_a2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a2.size) || size || "normal"}`]: true,
|
|
20603
20716
|
[`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
|
|
20604
20717
|
});
|
|
20605
|
-
const cls = classNames(classPrefix$
|
|
20718
|
+
const cls = classNames(classPrefix$8, classes, className);
|
|
20606
20719
|
const styles = {
|
|
20607
20720
|
width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
20608
20721
|
height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
@@ -20671,9 +20784,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20671
20784
|
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)}`)
|
|
20672
20785
|
));
|
|
20673
20786
|
};
|
|
20674
|
-
Avatar.defaultProps = defaultProps$
|
|
20787
|
+
Avatar.defaultProps = defaultProps$u;
|
|
20675
20788
|
Avatar.displayName = "NutAvatar";
|
|
20676
|
-
const defaultProps$
|
|
20789
|
+
const defaultProps$t = {
|
|
20677
20790
|
...ComponentDefaults,
|
|
20678
20791
|
rows: 1,
|
|
20679
20792
|
animated: false,
|
|
@@ -20696,7 +20809,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20696
20809
|
avatarShape,
|
|
20697
20810
|
...rest
|
|
20698
20811
|
} = {
|
|
20699
|
-
...defaultProps$
|
|
20812
|
+
...defaultProps$t,
|
|
20700
20813
|
...props
|
|
20701
20814
|
};
|
|
20702
20815
|
const classPrefix2 = "nut-skeleton";
|
|
@@ -20732,7 +20845,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20732
20845
|
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__block`, key: index });
|
|
20733
20846
|
})))));
|
|
20734
20847
|
};
|
|
20735
|
-
Skeleton.defaultProps = defaultProps$
|
|
20848
|
+
Skeleton.defaultProps = defaultProps$t;
|
|
20736
20849
|
Skeleton.displayName = "NutSkeleton";
|
|
20737
20850
|
function preventDefault(event, isStopPropagation) {
|
|
20738
20851
|
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
@@ -20742,13 +20855,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20742
20855
|
event.stopPropagation();
|
|
20743
20856
|
}
|
|
20744
20857
|
}
|
|
20745
|
-
const defaultProps$
|
|
20858
|
+
const defaultProps$s = {
|
|
20746
20859
|
name: ""
|
|
20747
20860
|
};
|
|
20748
20861
|
const Swipe = React.forwardRef((props, instanceRef) => {
|
|
20749
20862
|
const swipeBem = cn("swipe");
|
|
20750
20863
|
const touch = useTouch();
|
|
20751
|
-
const { children, className, style } = { ...defaultProps$
|
|
20864
|
+
const { children, className, style } = { ...defaultProps$s, ...props };
|
|
20752
20865
|
const root2 = React.useRef();
|
|
20753
20866
|
const opened = React.useRef(false);
|
|
20754
20867
|
const lockClick = React.useRef(false);
|
|
@@ -20916,9 +21029,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20916
21029
|
/* @__PURE__ */ React.createElement("div", { className: `${swipeBem("wrapper")}`, style: wrapperStyle }, renderActionContent("left", leftRef), children, renderActionContent("right", rightRef))
|
|
20917
21030
|
);
|
|
20918
21031
|
});
|
|
20919
|
-
Swipe.defaultProps = defaultProps$
|
|
21032
|
+
Swipe.defaultProps = defaultProps$s;
|
|
20920
21033
|
Swipe.displayName = "NutSwipe";
|
|
20921
|
-
const classPrefix$
|
|
21034
|
+
const classPrefix$7 = "nut-toast";
|
|
20922
21035
|
class Notification extends React__namespace.PureComponent {
|
|
20923
21036
|
constructor(props) {
|
|
20924
21037
|
super(props);
|
|
@@ -20971,7 +21084,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20971
21084
|
iconNode = /* @__PURE__ */ React__namespace.createElement(x$8, null);
|
|
20972
21085
|
break;
|
|
20973
21086
|
}
|
|
20974
|
-
return /* @__PURE__ */ React__namespace.createElement("p", { className: `${classPrefix$
|
|
21087
|
+
return /* @__PURE__ */ React__namespace.createElement("p", { className: `${classPrefix$7}__icon-wrapper` }, iconNode);
|
|
20975
21088
|
}
|
|
20976
21089
|
return icon;
|
|
20977
21090
|
}
|
|
@@ -21004,22 +21117,22 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21004
21117
|
{
|
|
21005
21118
|
visible: true,
|
|
21006
21119
|
style,
|
|
21007
|
-
className: `${classPrefix$
|
|
21120
|
+
className: `${classPrefix$7}__overlay-default ${className}`,
|
|
21008
21121
|
onClick: () => {
|
|
21009
21122
|
console.log("onclick");
|
|
21010
21123
|
this.clickCover();
|
|
21011
21124
|
},
|
|
21012
21125
|
closeOnOverlayClick
|
|
21013
21126
|
},
|
|
21014
|
-
/* @__PURE__ */ React__namespace.createElement("div", { className: `${classPrefix$
|
|
21127
|
+
/* @__PURE__ */ React__namespace.createElement("div", { className: `${classPrefix$7} ${classes}`, id: `toast-${id}` }, /* @__PURE__ */ React__namespace.createElement(
|
|
21015
21128
|
"div",
|
|
21016
21129
|
{
|
|
21017
|
-
className: `${classPrefix$
|
|
21130
|
+
className: `${classPrefix$7}__inner ${classPrefix$7}-${position} ${contentClassName}`,
|
|
21018
21131
|
style: contentStyle
|
|
21019
21132
|
},
|
|
21020
21133
|
this.renderIcon(),
|
|
21021
|
-
title ? /* @__PURE__ */ React__namespace.createElement("div", { className: `${classPrefix$
|
|
21022
|
-
/* @__PURE__ */ React__namespace.createElement("span", { className: `${classPrefix$
|
|
21134
|
+
title ? /* @__PURE__ */ React__namespace.createElement("div", { className: `${classPrefix$7}-title` }, title) : null,
|
|
21135
|
+
/* @__PURE__ */ React__namespace.createElement("span", { className: `${classPrefix$7}-text` }, content)
|
|
21023
21136
|
))
|
|
21024
21137
|
));
|
|
21025
21138
|
}
|
|
@@ -21122,7 +21235,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21122
21235
|
}
|
|
21123
21236
|
}
|
|
21124
21237
|
};
|
|
21125
|
-
const defaultProps$
|
|
21238
|
+
const defaultProps$r = {
|
|
21126
21239
|
...ComponentDefaults,
|
|
21127
21240
|
type: "shake",
|
|
21128
21241
|
action: "initial",
|
|
@@ -21130,16 +21243,16 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21130
21243
|
onClick: (event) => {
|
|
21131
21244
|
}
|
|
21132
21245
|
};
|
|
21133
|
-
const classPrefix$
|
|
21246
|
+
const classPrefix$6 = `nut-animate`;
|
|
21134
21247
|
const Animate = (props) => {
|
|
21135
21248
|
const { className, type: type2, action, loop: loop2, onClick, children, ...rest } = {
|
|
21136
|
-
...defaultProps$
|
|
21249
|
+
...defaultProps$r,
|
|
21137
21250
|
...props
|
|
21138
21251
|
};
|
|
21139
21252
|
const [clicked, setClicked] = React.useState(false);
|
|
21140
21253
|
const classes = classNames({
|
|
21141
21254
|
"nut-ani-container": true,
|
|
21142
|
-
[`${classPrefix$
|
|
21255
|
+
[`${classPrefix$6}-${type2}`]: action === "initial" || clicked ? type2 : false,
|
|
21143
21256
|
loop: loop2
|
|
21144
21257
|
});
|
|
21145
21258
|
const cls = classNames(classes, className);
|
|
@@ -21154,9 +21267,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21154
21267
|
};
|
|
21155
21268
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-animate" }, /* @__PURE__ */ React.createElement("div", { className: cls, onClick: handleClick2, ...rest }, children));
|
|
21156
21269
|
};
|
|
21157
|
-
Animate.defaultProps = defaultProps$
|
|
21270
|
+
Animate.defaultProps = defaultProps$r;
|
|
21158
21271
|
Animate.displayName = "NutAnimate";
|
|
21159
|
-
const defaultProps$
|
|
21272
|
+
const defaultProps$q = {
|
|
21160
21273
|
...ComponentDefaults,
|
|
21161
21274
|
length: 0,
|
|
21162
21275
|
value: "",
|
|
@@ -21175,7 +21288,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21175
21288
|
style,
|
|
21176
21289
|
...reset
|
|
21177
21290
|
} = {
|
|
21178
|
-
...defaultProps$
|
|
21291
|
+
...defaultProps$q,
|
|
21179
21292
|
...props
|
|
21180
21293
|
};
|
|
21181
21294
|
const classPrefix2 = "nut-countup";
|
|
@@ -21239,9 +21352,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21239
21352
|
);
|
|
21240
21353
|
})));
|
|
21241
21354
|
};
|
|
21242
|
-
CountUp.defaultProps = defaultProps$
|
|
21355
|
+
CountUp.defaultProps = defaultProps$q;
|
|
21243
21356
|
CountUp.displayName = "NutCountUp";
|
|
21244
|
-
const defaultProps$
|
|
21357
|
+
const defaultProps$p = {};
|
|
21245
21358
|
class AnimatingNumbers extends React.Component {
|
|
21246
21359
|
constructor(props) {
|
|
21247
21360
|
super(props);
|
|
@@ -21251,11 +21364,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21251
21364
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-animatingnumbers" });
|
|
21252
21365
|
}
|
|
21253
21366
|
}
|
|
21254
|
-
__publicField(AnimatingNumbers, "defaultProps", defaultProps$
|
|
21367
|
+
__publicField(AnimatingNumbers, "defaultProps", defaultProps$p);
|
|
21255
21368
|
__publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
|
|
21256
21369
|
__publicField(AnimatingNumbers, "CountUp", CountUp);
|
|
21257
21370
|
AnimatingNumbers.CountUp = CountUp;
|
|
21258
|
-
const defaultProps$
|
|
21371
|
+
const defaultProps$o = {
|
|
21259
21372
|
...ComponentDefaults,
|
|
21260
21373
|
src: "",
|
|
21261
21374
|
muted: false,
|
|
@@ -21298,7 +21411,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21298
21411
|
children,
|
|
21299
21412
|
...rest
|
|
21300
21413
|
} = {
|
|
21301
|
-
...defaultProps$
|
|
21414
|
+
...defaultProps$o,
|
|
21302
21415
|
...props
|
|
21303
21416
|
};
|
|
21304
21417
|
const [playing, setPlaying] = React.useState(false);
|
|
@@ -21504,9 +21617,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21504
21617
|
/* @__PURE__ */ React.createElement("track", { kind: "captions" })
|
|
21505
21618
|
));
|
|
21506
21619
|
};
|
|
21507
|
-
Audio.defaultProps = defaultProps$
|
|
21620
|
+
Audio.defaultProps = defaultProps$o;
|
|
21508
21621
|
Audio.displayName = "NutAudio";
|
|
21509
|
-
const defaultProps$
|
|
21622
|
+
const defaultProps$n = {
|
|
21510
21623
|
...ComponentDefaults,
|
|
21511
21624
|
maxContent: "",
|
|
21512
21625
|
max: "",
|
|
@@ -21515,21 +21628,21 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21515
21628
|
gap: "-8",
|
|
21516
21629
|
level: "left"
|
|
21517
21630
|
};
|
|
21518
|
-
const classPrefix$
|
|
21631
|
+
const classPrefix$5 = `nut-avatar-group`;
|
|
21519
21632
|
const AvatarGroup = (props) => {
|
|
21520
|
-
const propAvatarGroup = { ...defaultProps$
|
|
21633
|
+
const propAvatarGroup = { ...defaultProps$n, ...props };
|
|
21521
21634
|
const { className, style, children } = propAvatarGroup;
|
|
21522
21635
|
const avatarGroupRef = React.useRef(null);
|
|
21523
|
-
const cls = classNames(classPrefix$
|
|
21636
|
+
const cls = classNames(classPrefix$5, className);
|
|
21524
21637
|
const parentAvatar = {
|
|
21525
21638
|
propAvatarGroup,
|
|
21526
21639
|
avatarGroupRef
|
|
21527
21640
|
};
|
|
21528
21641
|
return /* @__PURE__ */ React.createElement(AvatarContext.Provider, { value: parentAvatar }, /* @__PURE__ */ React.createElement("div", { className: cls, style, ref: avatarGroupRef }, children));
|
|
21529
21642
|
};
|
|
21530
|
-
AvatarGroup.defaultProps = defaultProps$
|
|
21643
|
+
AvatarGroup.defaultProps = defaultProps$n;
|
|
21531
21644
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
21532
|
-
const defaultProps$
|
|
21645
|
+
const defaultProps$m = {
|
|
21533
21646
|
...ComponentDefaults,
|
|
21534
21647
|
strokeWidth: 5,
|
|
21535
21648
|
radius: 50,
|
|
@@ -21538,7 +21651,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21538
21651
|
background: "#e5e9f2",
|
|
21539
21652
|
clockwise: true
|
|
21540
21653
|
};
|
|
21541
|
-
const classPrefix$
|
|
21654
|
+
const classPrefix$4 = `nut-circleprogress`;
|
|
21542
21655
|
const CircleProgress = (props) => {
|
|
21543
21656
|
var _a2;
|
|
21544
21657
|
const {
|
|
@@ -21554,10 +21667,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21554
21667
|
strokeLinecap,
|
|
21555
21668
|
...restProps
|
|
21556
21669
|
} = {
|
|
21557
|
-
...defaultProps$
|
|
21670
|
+
...defaultProps$m,
|
|
21558
21671
|
...props
|
|
21559
21672
|
};
|
|
21560
|
-
const classes = classNames(className, classPrefix$
|
|
21673
|
+
const classes = classNames(className, classPrefix$4);
|
|
21561
21674
|
const refRandomId = Math.random().toString(36).slice(-8);
|
|
21562
21675
|
const styles = {
|
|
21563
21676
|
height: `${Number(radius) * 2}px`,
|
|
@@ -21623,7 +21736,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21623
21736
|
}
|
|
21624
21737
|
)), /* @__PURE__ */ React.createElement("div", { className: "nut-circleprogress-text" }, children));
|
|
21625
21738
|
};
|
|
21626
|
-
CircleProgress.defaultProps = defaultProps$
|
|
21739
|
+
CircleProgress.defaultProps = defaultProps$m;
|
|
21627
21740
|
CircleProgress.displayName = "NutCircleProgress";
|
|
21628
21741
|
const collapseContext = {
|
|
21629
21742
|
isOpen: (name) => {
|
|
@@ -21635,7 +21748,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21635
21748
|
rotate: 180
|
|
21636
21749
|
};
|
|
21637
21750
|
const CollapseContext = React.createContext(collapseContext);
|
|
21638
|
-
const defaultProps$
|
|
21751
|
+
const defaultProps$l = {
|
|
21639
21752
|
...ComponentDefaults,
|
|
21640
21753
|
title: null,
|
|
21641
21754
|
name: "",
|
|
@@ -21657,7 +21770,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21657
21770
|
extra,
|
|
21658
21771
|
...rest
|
|
21659
21772
|
} = {
|
|
21660
|
-
...defaultProps$
|
|
21773
|
+
...defaultProps$l,
|
|
21661
21774
|
...props
|
|
21662
21775
|
};
|
|
21663
21776
|
const classPrefix2 = "nut-collapse-item";
|
|
@@ -21724,9 +21837,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21724
21837
|
/* @__PURE__ */ React.createElement("div", { ref: contentRef, className: `${classPrefix2}__content-text` }, children)
|
|
21725
21838
|
));
|
|
21726
21839
|
};
|
|
21727
|
-
CollapseItem.defaultProps = defaultProps$
|
|
21840
|
+
CollapseItem.defaultProps = defaultProps$l;
|
|
21728
21841
|
CollapseItem.displayName = "NutCollapseItem";
|
|
21729
|
-
const defaultProps$
|
|
21842
|
+
const defaultProps$k = {
|
|
21730
21843
|
...ComponentDefaults,
|
|
21731
21844
|
defaultActiveName: [],
|
|
21732
21845
|
accordion: false,
|
|
@@ -21745,7 +21858,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21745
21858
|
rotate,
|
|
21746
21859
|
onChange
|
|
21747
21860
|
} = {
|
|
21748
|
-
...defaultProps$
|
|
21861
|
+
...defaultProps$k,
|
|
21749
21862
|
...props
|
|
21750
21863
|
};
|
|
21751
21864
|
const classPrefix2 = "nut-collapse";
|
|
@@ -21802,10 +21915,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21802
21915
|
/* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style }, children)
|
|
21803
21916
|
);
|
|
21804
21917
|
};
|
|
21805
|
-
Collapse.defaultProps = defaultProps$
|
|
21918
|
+
Collapse.defaultProps = defaultProps$k;
|
|
21806
21919
|
Collapse.displayName = "NutCollapse";
|
|
21807
21920
|
Collapse.Item = CollapseItem;
|
|
21808
|
-
const defaultProps$
|
|
21921
|
+
const defaultProps$j = {
|
|
21809
21922
|
...ComponentDefaults,
|
|
21810
21923
|
paused: false,
|
|
21811
21924
|
startTime: Date.now(),
|
|
@@ -21837,7 +21950,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21837
21950
|
onUpdate,
|
|
21838
21951
|
children,
|
|
21839
21952
|
...rest
|
|
21840
|
-
} = { ...defaultProps$
|
|
21953
|
+
} = { ...defaultProps$j, ...props };
|
|
21841
21954
|
const classPrefix2 = "nut-countdown";
|
|
21842
21955
|
const [restTimeStamp, setRestTime] = React.useState(0);
|
|
21843
21956
|
const stateRef = React.useRef({
|
|
@@ -22048,9 +22161,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22048
22161
|
);
|
|
22049
22162
|
};
|
|
22050
22163
|
const CountDown = React.forwardRef(InternalCountDown);
|
|
22051
|
-
CountDown.defaultProps = defaultProps$
|
|
22164
|
+
CountDown.defaultProps = defaultProps$j;
|
|
22052
22165
|
CountDown.displayName = "NutCountDown";
|
|
22053
|
-
const defaultProps$
|
|
22166
|
+
const defaultProps$i = {
|
|
22054
22167
|
...ComponentDefaults,
|
|
22055
22168
|
content: "",
|
|
22056
22169
|
direction: "end",
|
|
@@ -22060,7 +22173,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22060
22173
|
symbol: "...",
|
|
22061
22174
|
lineHeight: "20"
|
|
22062
22175
|
};
|
|
22063
|
-
const classPrefix$
|
|
22176
|
+
const classPrefix$3 = `nut-ellipsis`;
|
|
22064
22177
|
const Ellipsis = (props) => {
|
|
22065
22178
|
var _a2, _b;
|
|
22066
22179
|
const {
|
|
@@ -22076,14 +22189,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22076
22189
|
onClick,
|
|
22077
22190
|
onChange,
|
|
22078
22191
|
...rest
|
|
22079
|
-
} = { ...defaultProps$
|
|
22192
|
+
} = { ...defaultProps$i, ...props };
|
|
22080
22193
|
let container = null;
|
|
22081
22194
|
let maxHeight = 0;
|
|
22082
22195
|
const [exceeded, setExceeded] = React.useState(false);
|
|
22083
22196
|
const [expanded, setExpanded] = React.useState(false);
|
|
22084
22197
|
const ellipsis = React.useRef();
|
|
22085
22198
|
const root2 = React.useRef(null);
|
|
22086
|
-
const classes = classNames(classPrefix$
|
|
22199
|
+
const classes = classNames(classPrefix$3, className);
|
|
22087
22200
|
React.useLayoutEffect(() => {
|
|
22088
22201
|
if (content) {
|
|
22089
22202
|
createContainer();
|
|
@@ -22224,9 +22337,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22224
22337
|
collapseText
|
|
22225
22338
|
) : null) : null));
|
|
22226
22339
|
};
|
|
22227
|
-
Ellipsis.defaultProps = defaultProps$
|
|
22340
|
+
Ellipsis.defaultProps = defaultProps$i;
|
|
22228
22341
|
Ellipsis.displayName = "NutEllipsis";
|
|
22229
|
-
const defaultProps$
|
|
22342
|
+
const defaultProps$h = {
|
|
22230
22343
|
...ComponentDefaults,
|
|
22231
22344
|
source: {
|
|
22232
22345
|
type: {},
|
|
@@ -22242,7 +22355,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22242
22355
|
loop: false
|
|
22243
22356
|
}
|
|
22244
22357
|
};
|
|
22245
|
-
const classPrefix$
|
|
22358
|
+
const classPrefix$2 = `nut-video`;
|
|
22246
22359
|
const Video = (props) => {
|
|
22247
22360
|
const {
|
|
22248
22361
|
children,
|
|
@@ -22254,11 +22367,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22254
22367
|
onPlayEnd,
|
|
22255
22368
|
...restProps
|
|
22256
22369
|
} = {
|
|
22257
|
-
...defaultProps$
|
|
22370
|
+
...defaultProps$h,
|
|
22258
22371
|
...props
|
|
22259
22372
|
};
|
|
22260
22373
|
const rootRef = React.useRef(null);
|
|
22261
|
-
const classes = classNames(className, classPrefix$
|
|
22374
|
+
const classes = classNames(className, classPrefix$2);
|
|
22262
22375
|
React.useEffect(() => {
|
|
22263
22376
|
init();
|
|
22264
22377
|
}, []);
|
|
@@ -22304,22 +22417,22 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22304
22417
|
/* @__PURE__ */ React.createElement("track", { kind: "captions" })
|
|
22305
22418
|
));
|
|
22306
22419
|
};
|
|
22307
|
-
Video.defaultProps = defaultProps$
|
|
22420
|
+
Video.defaultProps = defaultProps$h;
|
|
22308
22421
|
Video.displayName = "NutVideo";
|
|
22309
22422
|
const DataContext$1 = React.createContext({});
|
|
22310
|
-
const defaultProps$
|
|
22423
|
+
const defaultProps$g = {
|
|
22311
22424
|
total: 3,
|
|
22312
22425
|
current: 0,
|
|
22313
22426
|
direction: "horizontal"
|
|
22314
22427
|
};
|
|
22315
|
-
const classPrefix = `nut-indicator`;
|
|
22428
|
+
const classPrefix$1 = `nut-indicator`;
|
|
22316
22429
|
const Indicator = (props) => {
|
|
22317
22430
|
const { total, current, children, className, direction, ...rest } = {
|
|
22318
|
-
...defaultProps$
|
|
22431
|
+
...defaultProps$g,
|
|
22319
22432
|
...props
|
|
22320
22433
|
};
|
|
22321
22434
|
const classes = classNames({
|
|
22322
|
-
[`${classPrefix}__vertical`]: direction === "vertical"
|
|
22435
|
+
[`${classPrefix$1}__vertical`]: direction === "vertical"
|
|
22323
22436
|
});
|
|
22324
22437
|
const renderElement = () => {
|
|
22325
22438
|
const childs = [];
|
|
@@ -22329,18 +22442,18 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22329
22442
|
"div",
|
|
22330
22443
|
{
|
|
22331
22444
|
key: item,
|
|
22332
|
-
className: `${classPrefix}__dot ${classPrefix}__active`
|
|
22445
|
+
className: `${classPrefix$1}__dot ${classPrefix$1}__active`
|
|
22333
22446
|
}
|
|
22334
|
-
) : /* @__PURE__ */ React.createElement("div", { key: item, className: `${classPrefix}__dot` })
|
|
22447
|
+
) : /* @__PURE__ */ React.createElement("div", { key: item, className: `${classPrefix$1}__dot` })
|
|
22335
22448
|
);
|
|
22336
22449
|
}
|
|
22337
22450
|
return childs;
|
|
22338
22451
|
};
|
|
22339
22452
|
return /* @__PURE__ */ React.createElement("div", { className: classNames(classes, className), ...rest }, renderElement());
|
|
22340
22453
|
};
|
|
22341
|
-
Indicator.defaultProps = defaultProps$
|
|
22454
|
+
Indicator.defaultProps = defaultProps$g;
|
|
22342
22455
|
Indicator.displayName = "NutIndicator";
|
|
22343
|
-
const defaultProps$
|
|
22456
|
+
const defaultProps$f = {
|
|
22344
22457
|
width: typeof window === "object" ? window.innerWidth : 375,
|
|
22345
22458
|
height: 0,
|
|
22346
22459
|
duration: 500,
|
|
@@ -22357,7 +22470,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22357
22470
|
};
|
|
22358
22471
|
const DISTANCE = 5;
|
|
22359
22472
|
const Swiper = React.forwardRef((props, ref) => {
|
|
22360
|
-
const propSwiper = { ...defaultProps$
|
|
22473
|
+
const propSwiper = { ...defaultProps$f, ...props };
|
|
22361
22474
|
const {
|
|
22362
22475
|
children,
|
|
22363
22476
|
direction,
|
|
@@ -22770,13 +22883,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22770
22883
|
renderIndicator()
|
|
22771
22884
|
));
|
|
22772
22885
|
});
|
|
22773
|
-
Swiper.defaultProps = defaultProps$
|
|
22886
|
+
Swiper.defaultProps = defaultProps$f;
|
|
22774
22887
|
Swiper.displayName = "NutSwiper";
|
|
22775
|
-
const defaultProps$
|
|
22888
|
+
const defaultProps$e = {
|
|
22776
22889
|
direction: "horizontal"
|
|
22777
22890
|
};
|
|
22778
22891
|
const SwiperItem = React.forwardRef((props, ref) => {
|
|
22779
|
-
const _props = { ...defaultProps$
|
|
22892
|
+
const _props = { ...defaultProps$e, ...props };
|
|
22780
22893
|
const { className, style, children, direction, size } = _props;
|
|
22781
22894
|
const parent = React.useContext(DataContext$1);
|
|
22782
22895
|
const b = cn("swiper-item");
|
|
@@ -22792,9 +22905,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22792
22905
|
};
|
|
22793
22906
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style: { ...style, ...getStyle() } }, children);
|
|
22794
22907
|
});
|
|
22795
|
-
SwiperItem.defaultProps = defaultProps$
|
|
22908
|
+
SwiperItem.defaultProps = defaultProps$e;
|
|
22796
22909
|
SwiperItem.displayName = "NutSwiperItem";
|
|
22797
|
-
const defaultProps$
|
|
22910
|
+
const defaultProps$d = {
|
|
22798
22911
|
...ComponentDefaults,
|
|
22799
22912
|
images: [],
|
|
22800
22913
|
videos: [],
|
|
@@ -22996,7 +23109,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22996
23109
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0))
|
|
22997
23110
|
);
|
|
22998
23111
|
};
|
|
22999
|
-
ImagePreview.defaultProps = defaultProps$
|
|
23112
|
+
ImagePreview.defaultProps = defaultProps$d;
|
|
23000
23113
|
ImagePreview.displayName = "NutImagePreview";
|
|
23001
23114
|
const initPositinoCache = (reaItemSize, length = 0) => {
|
|
23002
23115
|
let index = 0;
|
|
@@ -23109,7 +23222,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23109
23222
|
}
|
|
23110
23223
|
});
|
|
23111
23224
|
};
|
|
23112
|
-
const defaultProps$
|
|
23225
|
+
const defaultProps$c = {
|
|
23113
23226
|
...ComponentDefaults,
|
|
23114
23227
|
list: [],
|
|
23115
23228
|
itemHeight: 66,
|
|
@@ -23131,7 +23244,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23131
23244
|
containerHeight,
|
|
23132
23245
|
...rest
|
|
23133
23246
|
} = {
|
|
23134
|
-
...defaultProps$
|
|
23247
|
+
...defaultProps$c,
|
|
23135
23248
|
...props
|
|
23136
23249
|
};
|
|
23137
23250
|
const horizontal = direction === "horizontal";
|
|
@@ -23295,9 +23408,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23295
23408
|
)
|
|
23296
23409
|
);
|
|
23297
23410
|
};
|
|
23298
|
-
VirtualList.defaultProps = defaultProps$
|
|
23411
|
+
VirtualList.defaultProps = defaultProps$c;
|
|
23299
23412
|
VirtualList.displayName = "NutVirtualList";
|
|
23300
|
-
const defaultProps$
|
|
23413
|
+
const defaultProps$b = {
|
|
23301
23414
|
...ComponentDefaults,
|
|
23302
23415
|
defaultValue: 1,
|
|
23303
23416
|
mode: "multi",
|
|
@@ -23325,7 +23438,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23325
23438
|
className,
|
|
23326
23439
|
...rest
|
|
23327
23440
|
} = {
|
|
23328
|
-
...defaultProps$
|
|
23441
|
+
...defaultProps$b,
|
|
23329
23442
|
...props
|
|
23330
23443
|
};
|
|
23331
23444
|
const classPrefix2 = "nut-pagination";
|
|
@@ -23407,9 +23520,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23407
23520
|
next || locale.pagination.next
|
|
23408
23521
|
));
|
|
23409
23522
|
};
|
|
23410
|
-
Pagination.defaultProps = defaultProps$
|
|
23523
|
+
Pagination.defaultProps = defaultProps$b;
|
|
23411
23524
|
Pagination.displayName = "NutPagination";
|
|
23412
|
-
const defaultProps$
|
|
23525
|
+
const defaultProps$a = {
|
|
23413
23526
|
...ComponentDefaults,
|
|
23414
23527
|
price: 0,
|
|
23415
23528
|
symbol: "¥",
|
|
@@ -23432,7 +23545,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23432
23545
|
style,
|
|
23433
23546
|
...rest
|
|
23434
23547
|
} = {
|
|
23435
|
-
...defaultProps$
|
|
23548
|
+
...defaultProps$a,
|
|
23436
23549
|
...props
|
|
23437
23550
|
};
|
|
23438
23551
|
const classPrefix2 = "nut-price";
|
|
@@ -23512,10 +23625,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23512
23625
|
symbol && position === "after" ? renderSymbol() : null
|
|
23513
23626
|
);
|
|
23514
23627
|
};
|
|
23515
|
-
Price.defaultProps = defaultProps$
|
|
23628
|
+
Price.defaultProps = defaultProps$a;
|
|
23516
23629
|
Price.displayName = "NutPrice";
|
|
23517
23630
|
const DataContext = React.createContext({});
|
|
23518
|
-
const defaultProps$
|
|
23631
|
+
const defaultProps$9 = {
|
|
23519
23632
|
...ComponentDefaults,
|
|
23520
23633
|
title: "",
|
|
23521
23634
|
description: "",
|
|
@@ -23524,7 +23637,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23524
23637
|
};
|
|
23525
23638
|
const Step = (props) => {
|
|
23526
23639
|
const { children, title, description, value, icon, className, ...restProps } = {
|
|
23527
|
-
...defaultProps$
|
|
23640
|
+
...defaultProps$9,
|
|
23528
23641
|
...props
|
|
23529
23642
|
};
|
|
23530
23643
|
const parent = React.useContext(DataContext);
|
|
@@ -23558,16 +23671,16 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23558
23671
|
};
|
|
23559
23672
|
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)));
|
|
23560
23673
|
};
|
|
23561
|
-
Step.defaultProps = defaultProps$
|
|
23674
|
+
Step.defaultProps = defaultProps$9;
|
|
23562
23675
|
Step.displayName = "NutStep";
|
|
23563
|
-
const defaultProps$
|
|
23676
|
+
const defaultProps$8 = {
|
|
23564
23677
|
...ComponentDefaults,
|
|
23565
23678
|
value: 0,
|
|
23566
23679
|
direction: "horizontal",
|
|
23567
23680
|
dot: false
|
|
23568
23681
|
};
|
|
23569
23682
|
const Steps = (props) => {
|
|
23570
|
-
const propSteps = { ...defaultProps$
|
|
23683
|
+
const propSteps = { ...defaultProps$8, ...props };
|
|
23571
23684
|
const {
|
|
23572
23685
|
children,
|
|
23573
23686
|
value,
|
|
@@ -23598,9 +23711,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23598
23711
|
children
|
|
23599
23712
|
));
|
|
23600
23713
|
};
|
|
23601
|
-
Steps.defaultProps = defaultProps$
|
|
23714
|
+
Steps.defaultProps = defaultProps$8;
|
|
23602
23715
|
Steps.displayName = "NutSteps";
|
|
23603
|
-
const defaultProps$
|
|
23716
|
+
const defaultProps$7 = {
|
|
23604
23717
|
...ComponentDefaults,
|
|
23605
23718
|
columns: [],
|
|
23606
23719
|
data: [],
|
|
@@ -23612,7 +23725,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23612
23725
|
};
|
|
23613
23726
|
const Table = (props) => {
|
|
23614
23727
|
const { locale } = useConfig();
|
|
23615
|
-
defaultProps$
|
|
23728
|
+
defaultProps$7.noData = locale.noData;
|
|
23616
23729
|
const {
|
|
23617
23730
|
children,
|
|
23618
23731
|
className,
|
|
@@ -23628,7 +23741,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23628
23741
|
onSort,
|
|
23629
23742
|
...rest
|
|
23630
23743
|
} = {
|
|
23631
|
-
...defaultProps$
|
|
23744
|
+
...defaultProps$7,
|
|
23632
23745
|
...props
|
|
23633
23746
|
};
|
|
23634
23747
|
const [curData, setCurData] = React.useState(data);
|
|
@@ -23711,19 +23824,18 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23711
23824
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__main__body` }, renderBoyTrs())
|
|
23712
23825
|
), (summary || curData.length === 0) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__summary` }, summary || noData));
|
|
23713
23826
|
};
|
|
23714
|
-
Table.defaultProps = defaultProps$
|
|
23827
|
+
Table.defaultProps = defaultProps$7;
|
|
23715
23828
|
Table.displayName = "NutTable";
|
|
23716
|
-
const defaultProps$
|
|
23829
|
+
const defaultProps$6 = {
|
|
23717
23830
|
...ComponentDefaults,
|
|
23718
23831
|
type: "default",
|
|
23832
|
+
background: "",
|
|
23719
23833
|
color: "",
|
|
23720
|
-
textColor: "",
|
|
23721
23834
|
plain: false,
|
|
23722
23835
|
round: false,
|
|
23723
23836
|
mark: false,
|
|
23724
23837
|
closeable: false,
|
|
23725
23838
|
closeIcon: null,
|
|
23726
|
-
prefixCls: "nut-tag",
|
|
23727
23839
|
onClose: (e) => {
|
|
23728
23840
|
},
|
|
23729
23841
|
onClick: (e) => {
|
|
@@ -23733,86 +23845,70 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23733
23845
|
const {
|
|
23734
23846
|
className,
|
|
23735
23847
|
style,
|
|
23736
|
-
|
|
23848
|
+
background,
|
|
23737
23849
|
plain,
|
|
23738
23850
|
type: type2,
|
|
23739
23851
|
round,
|
|
23740
|
-
prefixCls: prefixCls2,
|
|
23741
23852
|
children,
|
|
23742
23853
|
mark,
|
|
23743
23854
|
closeable,
|
|
23744
23855
|
closeIcon,
|
|
23745
|
-
|
|
23856
|
+
color,
|
|
23746
23857
|
onClick,
|
|
23747
23858
|
onClose
|
|
23748
23859
|
} = {
|
|
23749
|
-
...defaultProps$
|
|
23860
|
+
...defaultProps$6,
|
|
23750
23861
|
...props
|
|
23751
23862
|
};
|
|
23752
|
-
const [
|
|
23753
|
-
const [
|
|
23754
|
-
|
|
23755
|
-
setBtnName(classes());
|
|
23756
|
-
}, [
|
|
23757
|
-
type2,
|
|
23758
|
-
color,
|
|
23759
|
-
textColor,
|
|
23760
|
-
plain,
|
|
23761
|
-
round,
|
|
23762
|
-
mark,
|
|
23763
|
-
closeable,
|
|
23764
|
-
prefixCls2,
|
|
23765
|
-
onClick,
|
|
23766
|
-
onClose,
|
|
23767
|
-
className
|
|
23768
|
-
]);
|
|
23863
|
+
const [tagClass, setTagClass] = React.useState("");
|
|
23864
|
+
const [visible, setVisible] = React.useState(true);
|
|
23865
|
+
const classPrefix2 = "nut-tag";
|
|
23769
23866
|
const classes = () => {
|
|
23770
|
-
const prefixCls22 = "nut-tag";
|
|
23771
23867
|
return classNames({
|
|
23772
|
-
[
|
|
23773
|
-
[`${
|
|
23774
|
-
[`${
|
|
23775
|
-
[`${
|
|
23776
|
-
[`${
|
|
23777
|
-
[`${
|
|
23868
|
+
[classPrefix2]: true,
|
|
23869
|
+
[`${classPrefix2}--${type2}`]: type2,
|
|
23870
|
+
[`${classPrefix2}--plain`]: plain,
|
|
23871
|
+
[`${classPrefix2}--round`]: round,
|
|
23872
|
+
[`${classPrefix2}--mark`]: mark,
|
|
23873
|
+
[`${classPrefix2}--close`]: closeable,
|
|
23778
23874
|
[`${className}`]: className
|
|
23779
23875
|
});
|
|
23780
23876
|
};
|
|
23877
|
+
React.useEffect(() => {
|
|
23878
|
+
setTagClass(classes());
|
|
23879
|
+
}, [type2, background, color, plain, round, mark, closeable, className]);
|
|
23781
23880
|
const handleClick2 = (e) => {
|
|
23782
|
-
|
|
23783
|
-
props.onClick(e);
|
|
23784
|
-
}
|
|
23881
|
+
onClick && onClick(e);
|
|
23785
23882
|
};
|
|
23786
23883
|
const getStyle = () => {
|
|
23787
23884
|
const style2 = {};
|
|
23788
|
-
if (
|
|
23789
|
-
style2.color = textColor;
|
|
23790
|
-
} else if (color && plain) {
|
|
23885
|
+
if (color) {
|
|
23791
23886
|
style2.color = color;
|
|
23887
|
+
} else if (background && plain) {
|
|
23888
|
+
style2.color = background;
|
|
23792
23889
|
}
|
|
23793
23890
|
if (plain) {
|
|
23794
|
-
style2.
|
|
23795
|
-
|
|
23796
|
-
|
|
23797
|
-
style2.background = color;
|
|
23891
|
+
style2.borderColor = background;
|
|
23892
|
+
} else if (background) {
|
|
23893
|
+
style2.background = background;
|
|
23798
23894
|
}
|
|
23799
23895
|
return style2;
|
|
23800
23896
|
};
|
|
23801
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, closeable ?
|
|
23897
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, closeable ? visible && /* @__PURE__ */ React.createElement(
|
|
23802
23898
|
"div",
|
|
23803
23899
|
{
|
|
23804
|
-
className:
|
|
23900
|
+
className: tagClass,
|
|
23805
23901
|
style: { ...style, ...getStyle() },
|
|
23806
23902
|
onClick: (e) => handleClick2(e)
|
|
23807
23903
|
},
|
|
23808
|
-
children && /* @__PURE__ */ React.createElement("span", { className:
|
|
23904
|
+
children && /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}-text` }, children),
|
|
23809
23905
|
React.isValidElement(closeIcon) ? /* @__PURE__ */ React.createElement(
|
|
23810
23906
|
"i",
|
|
23811
23907
|
{
|
|
23812
|
-
className:
|
|
23908
|
+
className: `${classPrefix2}-custom-icon`,
|
|
23813
23909
|
onClick: (e) => {
|
|
23814
|
-
|
|
23815
|
-
|
|
23910
|
+
setVisible(false);
|
|
23911
|
+
onClose && onClose(e);
|
|
23816
23912
|
}
|
|
23817
23913
|
},
|
|
23818
23914
|
closeIcon
|
|
@@ -23822,43 +23918,45 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23822
23918
|
width: 12,
|
|
23823
23919
|
height: 12,
|
|
23824
23920
|
onClick: (e) => {
|
|
23825
|
-
|
|
23826
|
-
|
|
23921
|
+
setVisible(false);
|
|
23922
|
+
onClose && onClose(e);
|
|
23827
23923
|
}
|
|
23828
23924
|
}
|
|
23829
23925
|
)
|
|
23830
23926
|
) : /* @__PURE__ */ React.createElement(
|
|
23831
23927
|
"div",
|
|
23832
23928
|
{
|
|
23833
|
-
className:
|
|
23929
|
+
className: tagClass,
|
|
23834
23930
|
style: { ...style, ...getStyle() },
|
|
23835
23931
|
onClick: (e) => handleClick2(e)
|
|
23836
23932
|
},
|
|
23837
|
-
children && /* @__PURE__ */ React.createElement("span", { className:
|
|
23933
|
+
children && /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}-text` }, children)
|
|
23838
23934
|
));
|
|
23839
23935
|
};
|
|
23840
|
-
Tag.defaultProps = defaultProps$
|
|
23936
|
+
Tag.defaultProps = defaultProps$6;
|
|
23841
23937
|
Tag.displayName = "NutTag";
|
|
23842
|
-
const defaultProps$
|
|
23843
|
-
|
|
23844
|
-
|
|
23938
|
+
const defaultProps$5 = {
|
|
23939
|
+
...ComponentDefaults,
|
|
23940
|
+
list: [],
|
|
23941
|
+
interval: 500,
|
|
23845
23942
|
loop: true,
|
|
23846
|
-
|
|
23943
|
+
duration: 3e3,
|
|
23847
23944
|
rows: 3,
|
|
23848
|
-
|
|
23945
|
+
gapY: 10
|
|
23849
23946
|
};
|
|
23947
|
+
const classPrefix = `nut-barrage`;
|
|
23850
23948
|
const InternalBarrage = (props, ref) => {
|
|
23851
23949
|
const {
|
|
23852
23950
|
className,
|
|
23853
|
-
|
|
23951
|
+
interval,
|
|
23854
23952
|
loop: loop2,
|
|
23855
|
-
|
|
23856
|
-
|
|
23953
|
+
list,
|
|
23954
|
+
duration,
|
|
23857
23955
|
rows,
|
|
23858
|
-
|
|
23956
|
+
gapY,
|
|
23859
23957
|
...restProps
|
|
23860
23958
|
} = {
|
|
23861
|
-
...defaultProps$
|
|
23959
|
+
...defaultProps$5,
|
|
23862
23960
|
...props
|
|
23863
23961
|
};
|
|
23864
23962
|
const barrageBody = React.useRef(null);
|
|
@@ -23866,15 +23964,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23866
23964
|
const barrageCWidth = React.useRef(0);
|
|
23867
23965
|
const timer = React.useRef(0);
|
|
23868
23966
|
const index = React.useRef(0);
|
|
23869
|
-
const
|
|
23870
|
-
const classes = classNames(className, b(""));
|
|
23967
|
+
const classes = classNames(classPrefix, className);
|
|
23871
23968
|
React.useImperativeHandle(ref, () => ({
|
|
23872
23969
|
add: (word) => {
|
|
23873
|
-
const _index = index.current %
|
|
23874
|
-
if (!loop2 && index.current ===
|
|
23875
|
-
|
|
23970
|
+
const _index = index.current % list.length;
|
|
23971
|
+
if (!loop2 && index.current === list.length) {
|
|
23972
|
+
list.splice(list.length, 0, word);
|
|
23876
23973
|
} else {
|
|
23877
|
-
|
|
23974
|
+
list.splice(_index, 0, word);
|
|
23878
23975
|
}
|
|
23879
23976
|
}
|
|
23880
23977
|
}));
|
|
@@ -23894,27 +23991,27 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23894
23991
|
return () => {
|
|
23895
23992
|
clearInterval(timer.current);
|
|
23896
23993
|
};
|
|
23897
|
-
}, [
|
|
23994
|
+
}, [list]);
|
|
23898
23995
|
const run = () => {
|
|
23899
23996
|
clearInterval(timer.current);
|
|
23900
23997
|
timer.current = window.setTimeout(() => {
|
|
23901
23998
|
play();
|
|
23902
|
-
},
|
|
23999
|
+
}, interval);
|
|
23903
24000
|
};
|
|
23904
24001
|
const play = () => {
|
|
23905
|
-
if (!loop2 && index.current >=
|
|
24002
|
+
if (!loop2 && index.current >= list.length) {
|
|
23906
24003
|
return;
|
|
23907
24004
|
}
|
|
23908
|
-
const _index = loop2 ? index.current %
|
|
24005
|
+
const _index = loop2 ? index.current % list.length : index.current;
|
|
23909
24006
|
const el = document.createElement(`div`);
|
|
23910
|
-
el.innerHTML =
|
|
24007
|
+
el.innerHTML = list[_index];
|
|
23911
24008
|
el.classList.add("barrage-item");
|
|
23912
24009
|
barrageContainer.current.appendChild(el);
|
|
23913
24010
|
const width = el.offsetWidth;
|
|
23914
24011
|
const height = el.offsetHeight;
|
|
23915
24012
|
el.classList.add("move");
|
|
23916
|
-
el.style.animationDuration = `${
|
|
23917
|
-
el.style.top = `${_index % rows * (height +
|
|
24013
|
+
el.style.animationDuration = `${duration}ms`;
|
|
24014
|
+
el.style.top = `${_index % rows * (height + gapY) + 20}px`;
|
|
23918
24015
|
el.style.width = `${width}px`;
|
|
23919
24016
|
el.addEventListener("animationend", () => {
|
|
23920
24017
|
barrageContainer.current.removeChild(el);
|
|
@@ -23925,250 +24022,243 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23925
24022
|
return /* @__PURE__ */ React.createElement("div", { className: classes, ref: barrageBody, ...restProps }, /* @__PURE__ */ React.createElement("div", { ref: barrageContainer, className: "bContainer" }));
|
|
23926
24023
|
};
|
|
23927
24024
|
const Barrage = React.forwardRef(InternalBarrage);
|
|
23928
|
-
Barrage.defaultProps = defaultProps$
|
|
24025
|
+
Barrage.defaultProps = defaultProps$5;
|
|
23929
24026
|
Barrage.displayName = "NutBarrage";
|
|
23930
|
-
const defaultProps$
|
|
24027
|
+
const defaultProps$4 = {
|
|
24028
|
+
...ComponentDefaults,
|
|
24029
|
+
src: "",
|
|
24030
|
+
title: "",
|
|
24031
|
+
price: "",
|
|
24032
|
+
vipPrice: "",
|
|
24033
|
+
shopDescription: "",
|
|
24034
|
+
delivery: "",
|
|
24035
|
+
shopName: "",
|
|
24036
|
+
description: "",
|
|
24037
|
+
tag: "",
|
|
24038
|
+
priceTag: "",
|
|
24039
|
+
extra: ""
|
|
24040
|
+
};
|
|
23931
24041
|
const Card = (props) => {
|
|
23932
24042
|
const {
|
|
23933
24043
|
className,
|
|
23934
24044
|
style,
|
|
23935
|
-
|
|
24045
|
+
src,
|
|
23936
24046
|
title,
|
|
23937
24047
|
price,
|
|
23938
24048
|
vipPrice,
|
|
23939
|
-
|
|
24049
|
+
shopDescription,
|
|
23940
24050
|
delivery,
|
|
23941
24051
|
shopName,
|
|
23942
|
-
|
|
23943
|
-
|
|
23944
|
-
|
|
23945
|
-
|
|
24052
|
+
tag,
|
|
24053
|
+
priceTag,
|
|
24054
|
+
description,
|
|
24055
|
+
extra,
|
|
23946
24056
|
...rest
|
|
23947
24057
|
} = {
|
|
23948
|
-
...defaultProps$
|
|
24058
|
+
...defaultProps$4,
|
|
23949
24059
|
...props
|
|
23950
24060
|
};
|
|
23951
|
-
const
|
|
23952
|
-
return /* @__PURE__ */ React.createElement("div", { className: classNames(
|
|
24061
|
+
const classPrefix2 = "nut-card";
|
|
24062
|
+
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(
|
|
24063
|
+
Price,
|
|
24064
|
+
{
|
|
24065
|
+
size: "normal",
|
|
24066
|
+
className: `${classPrefix2}right-price-origin`,
|
|
24067
|
+
price: vipPrice
|
|
24068
|
+
}
|
|
24069
|
+
)), /* @__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)));
|
|
23953
24070
|
};
|
|
23954
|
-
Card.defaultProps = defaultProps$
|
|
24071
|
+
Card.defaultProps = defaultProps$4;
|
|
23955
24072
|
Card.displayName = "NutCard";
|
|
23956
|
-
const defaultProps$
|
|
23957
|
-
|
|
23958
|
-
|
|
23959
|
-
|
|
23960
|
-
|
|
23961
|
-
|
|
24073
|
+
const defaultProps$3 = {
|
|
24074
|
+
...ComponentDefaults,
|
|
24075
|
+
activeDate: "",
|
|
24076
|
+
activeTime: [],
|
|
24077
|
+
options: [],
|
|
24078
|
+
optionKey: {
|
|
24079
|
+
valueKey: "value",
|
|
24080
|
+
textKey: "text",
|
|
24081
|
+
childrenKey: "children"
|
|
24082
|
+
},
|
|
24083
|
+
onSelect: () => {
|
|
24084
|
+
}
|
|
23962
24085
|
};
|
|
23963
24086
|
const TimeDetail = (props) => {
|
|
23964
|
-
|
|
23965
|
-
|
|
23966
|
-
...defaultProps$4,
|
|
24087
|
+
const { options: options2, optionKey, className, activeDate, activeTime, onSelect } = {
|
|
24088
|
+
...defaultProps$3,
|
|
23967
24089
|
...props
|
|
23968
24090
|
};
|
|
23969
|
-
const
|
|
23970
|
-
const
|
|
23971
|
-
|
|
23972
|
-
|
|
23973
|
-
|
|
23974
|
-
|
|
23975
|
-
|
|
23976
|
-
|
|
23977
|
-
|
|
23978
|
-
|
|
23979
|
-
|
|
23980
|
-
|
|
23981
|
-
|
|
23982
|
-
|
|
23983
|
-
|
|
23984
|
-
|
|
23985
|
-
|
|
23986
|
-
|
|
23987
|
-
|
|
23988
|
-
|
|
23989
|
-
|
|
23990
|
-
|
|
23991
|
-
|
|
24091
|
+
const classPrefix2 = "nut-timedetail";
|
|
24092
|
+
const timeList = React.useMemo(() => {
|
|
24093
|
+
return (options2 == null ? void 0 : options2.find(
|
|
24094
|
+
(item) => item[optionKey.valueKey] === activeDate
|
|
24095
|
+
)) || {
|
|
24096
|
+
[optionKey.childrenKey]: []
|
|
24097
|
+
};
|
|
24098
|
+
}, [options2, optionKey, activeDate]);
|
|
24099
|
+
const isActive = React.useCallback(
|
|
24100
|
+
(timeKey) => {
|
|
24101
|
+
const date2 = activeTime.find((item) => {
|
|
24102
|
+
return item[optionKey.valueKey] === activeDate;
|
|
24103
|
+
});
|
|
24104
|
+
if (date2 == null ? void 0 : date2[optionKey.childrenKey]) {
|
|
24105
|
+
const time = date2 == null ? void 0 : date2[optionKey.childrenKey].find((time2) => {
|
|
24106
|
+
return time2[optionKey.valueKey] === timeKey;
|
|
24107
|
+
});
|
|
24108
|
+
return time;
|
|
24109
|
+
}
|
|
24110
|
+
return false;
|
|
24111
|
+
},
|
|
24112
|
+
[activeTime, optionKey, activeDate]
|
|
24113
|
+
);
|
|
24114
|
+
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className) }, timeList[optionKey.childrenKey].map((item) => /* @__PURE__ */ React.createElement(
|
|
23992
24115
|
"span",
|
|
23993
24116
|
{
|
|
23994
|
-
className:
|
|
23995
|
-
|
|
23996
|
-
|
|
24117
|
+
className: classNames(`${classPrefix2}__item`, {
|
|
24118
|
+
active: isActive(item[optionKey.valueKey])
|
|
24119
|
+
}),
|
|
24120
|
+
key: item[optionKey.valueKey],
|
|
24121
|
+
onClick: () => onSelect(item)
|
|
23997
24122
|
},
|
|
23998
|
-
item
|
|
24123
|
+
item[optionKey.textKey]
|
|
23999
24124
|
)));
|
|
24000
24125
|
};
|
|
24001
|
-
TimeDetail.defaultProps = defaultProps$
|
|
24126
|
+
TimeDetail.defaultProps = defaultProps$3;
|
|
24002
24127
|
TimeDetail.displayName = "NutTimeDetail";
|
|
24003
|
-
const defaultProps$3 = {
|
|
24004
|
-
className: "",
|
|
24005
|
-
date: "",
|
|
24006
|
-
curKey: 0
|
|
24007
|
-
};
|
|
24008
|
-
const TimePannel = (props) => {
|
|
24009
|
-
useConfig();
|
|
24010
|
-
const { children, className, date: date2, curKey, change } = {
|
|
24011
|
-
...defaultProps$3,
|
|
24012
|
-
...props
|
|
24013
|
-
};
|
|
24014
|
-
const b = cn("timepannel");
|
|
24015
|
-
return /* @__PURE__ */ React.createElement("div", { className: `${b()} ${className || ""}`, onClick: () => change(curKey) }, date2);
|
|
24016
|
-
};
|
|
24017
|
-
TimePannel.defaultProps = defaultProps$3;
|
|
24018
|
-
TimePannel.displayName = "NutTimePannel";
|
|
24019
24128
|
const defaultProps$2 = {
|
|
24020
|
-
|
|
24021
|
-
style: {},
|
|
24129
|
+
...ComponentDefaults,
|
|
24022
24130
|
visible: false,
|
|
24023
|
-
height: "20%",
|
|
24024
24131
|
multiple: false,
|
|
24025
|
-
|
|
24026
|
-
|
|
24027
|
-
|
|
24028
|
-
|
|
24029
|
-
|
|
24132
|
+
defaultValue: [],
|
|
24133
|
+
options: [],
|
|
24134
|
+
optionKey: {
|
|
24135
|
+
valueKey: "value",
|
|
24136
|
+
textKey: "text",
|
|
24137
|
+
childrenKey: "children"
|
|
24138
|
+
}
|
|
24030
24139
|
};
|
|
24031
24140
|
const TimeSelect = (props) => {
|
|
24032
|
-
useConfig();
|
|
24141
|
+
const { locale } = useConfig();
|
|
24033
24142
|
const {
|
|
24034
24143
|
visible,
|
|
24035
24144
|
className,
|
|
24036
|
-
|
|
24145
|
+
style,
|
|
24037
24146
|
title,
|
|
24038
|
-
|
|
24039
|
-
|
|
24040
|
-
|
|
24041
|
-
times,
|
|
24147
|
+
defaultValue,
|
|
24148
|
+
options: options2,
|
|
24149
|
+
optionKey,
|
|
24042
24150
|
multiple,
|
|
24043
|
-
select,
|
|
24044
|
-
pannelChange,
|
|
24045
|
-
timeChange,
|
|
24046
24151
|
onSelect,
|
|
24047
|
-
|
|
24048
|
-
onTimeChange
|
|
24152
|
+
onDateChange,
|
|
24153
|
+
onTimeChange,
|
|
24154
|
+
...rest
|
|
24049
24155
|
} = {
|
|
24050
24156
|
...defaultProps$2,
|
|
24051
24157
|
...props
|
|
24052
24158
|
};
|
|
24053
|
-
const [
|
|
24159
|
+
const [activeDate, setActiveDate] = React.useState(() => {
|
|
24160
|
+
if (defaultValue == null ? void 0 : defaultValue.length) {
|
|
24161
|
+
return defaultValue[0][optionKey.valueKey];
|
|
24162
|
+
}
|
|
24163
|
+
if (options2 == null ? void 0 : options2.length) {
|
|
24164
|
+
return options2[0][optionKey.valueKey];
|
|
24165
|
+
}
|
|
24166
|
+
return "";
|
|
24167
|
+
});
|
|
24054
24168
|
const [activeTime, setActiveTime] = React.useState(
|
|
24055
|
-
|
|
24056
|
-
{
|
|
24057
|
-
key: currentKey,
|
|
24058
|
-
list: []
|
|
24059
|
-
}
|
|
24060
|
-
]
|
|
24169
|
+
() => defaultValue || []
|
|
24061
24170
|
);
|
|
24062
|
-
const
|
|
24063
|
-
const popStyle = {
|
|
24064
|
-
width: "100%",
|
|
24065
|
-
height
|
|
24066
|
-
};
|
|
24067
|
-
const b = cn("timeselect");
|
|
24171
|
+
const classPrefix2 = "nut-timeselect";
|
|
24068
24172
|
const closeFun = () => {
|
|
24069
|
-
|
|
24070
|
-
|
|
24071
|
-
|
|
24072
|
-
|
|
24073
|
-
|
|
24074
|
-
|
|
24075
|
-
|
|
24076
|
-
|
|
24077
|
-
|
|
24078
|
-
|
|
24079
|
-
|
|
24080
|
-
curTimeData = activeTime[i];
|
|
24081
|
-
curIndex = i;
|
|
24082
|
-
break;
|
|
24083
|
-
}
|
|
24084
|
-
}
|
|
24085
|
-
const curTimeIndex = curTimeData.list.findIndex(
|
|
24086
|
-
(item) => String(item) === String(time)
|
|
24087
|
-
);
|
|
24088
|
-
if (curTimeIndex === -1) {
|
|
24089
|
-
curTimeData.list.push(time);
|
|
24090
|
-
} else {
|
|
24091
|
-
curTimeData.list.splice(curTimeIndex, 1);
|
|
24092
|
-
}
|
|
24093
|
-
const resultTimeData = [...activeTime];
|
|
24094
|
-
resultTimeData.splice(curIndex, 1, curTimeData);
|
|
24095
|
-
setActiveTime(resultTimeData);
|
|
24096
|
-
if (onTimeChange) {
|
|
24097
|
-
onTimeChange(time, resultTimeData);
|
|
24098
|
-
} else if (timeChange) {
|
|
24099
|
-
timeChange(time, resultTimeData);
|
|
24100
|
-
}
|
|
24101
|
-
};
|
|
24102
|
-
const handleChange = (pannelKey) => {
|
|
24103
|
-
const resultTimeData = [...activeTime];
|
|
24104
|
-
if (String(pannelKey) !== String(activeKey)) {
|
|
24105
|
-
setActiveKey == null ? void 0 : setActiveKey(pannelKey);
|
|
24106
|
-
if (multiple) {
|
|
24107
|
-
const curTimeDataIndex = activeTime.findIndex(
|
|
24108
|
-
(item) => String(item.key) === String(pannelKey)
|
|
24109
|
-
);
|
|
24110
|
-
if (curTimeDataIndex === -1) {
|
|
24111
|
-
resultTimeData.push({
|
|
24112
|
-
key: pannelKey,
|
|
24113
|
-
list: []
|
|
24114
|
-
});
|
|
24115
|
-
setActiveTime(resultTimeData);
|
|
24173
|
+
onSelect && onSelect(activeTime);
|
|
24174
|
+
};
|
|
24175
|
+
const handleSelectTime = (selectTime) => {
|
|
24176
|
+
let newActiveTime = [...activeTime];
|
|
24177
|
+
const date2 = newActiveTime.find((item) => {
|
|
24178
|
+
return item[optionKey.valueKey] === activeDate;
|
|
24179
|
+
});
|
|
24180
|
+
if (date2) {
|
|
24181
|
+
const timeIndex = date2[optionKey.childrenKey].findIndex(
|
|
24182
|
+
(time) => {
|
|
24183
|
+
return time[optionKey.valueKey] === selectTime[optionKey.valueKey];
|
|
24116
24184
|
}
|
|
24185
|
+
);
|
|
24186
|
+
if (timeIndex > -1) {
|
|
24187
|
+
if (multiple) {
|
|
24188
|
+
date2[optionKey.childrenKey].splice(timeIndex, 1);
|
|
24189
|
+
} else {
|
|
24190
|
+
newActiveTime = [];
|
|
24191
|
+
}
|
|
24192
|
+
} else if (multiple) {
|
|
24193
|
+
date2[optionKey.childrenKey].push({ ...selectTime });
|
|
24117
24194
|
} else {
|
|
24118
|
-
|
|
24195
|
+
newActiveTime = [
|
|
24119
24196
|
{
|
|
24120
|
-
|
|
24121
|
-
|
|
24197
|
+
[optionKey.valueKey]: activeDate,
|
|
24198
|
+
[optionKey.childrenKey]: [{ ...selectTime }]
|
|
24122
24199
|
}
|
|
24123
|
-
]
|
|
24200
|
+
];
|
|
24124
24201
|
}
|
|
24202
|
+
} else if (multiple) {
|
|
24203
|
+
newActiveTime.push({
|
|
24204
|
+
[optionKey.valueKey]: activeDate,
|
|
24205
|
+
[optionKey.childrenKey]: [{ ...selectTime }]
|
|
24206
|
+
});
|
|
24207
|
+
} else {
|
|
24208
|
+
newActiveTime = [
|
|
24209
|
+
{
|
|
24210
|
+
[optionKey.valueKey]: activeDate,
|
|
24211
|
+
[optionKey.childrenKey]: [{ ...selectTime }]
|
|
24212
|
+
}
|
|
24213
|
+
];
|
|
24125
24214
|
}
|
|
24126
|
-
|
|
24127
|
-
|
|
24128
|
-
|
|
24129
|
-
|
|
24130
|
-
|
|
24215
|
+
newActiveTime = newActiveTime.filter((item) => {
|
|
24216
|
+
var _a2;
|
|
24217
|
+
return ((_a2 = item[optionKey.childrenKey]) == null ? void 0 : _a2.length) > 0;
|
|
24218
|
+
});
|
|
24219
|
+
setActiveTime(newActiveTime);
|
|
24220
|
+
onTimeChange && onTimeChange(selectTime, newActiveTime);
|
|
24131
24221
|
};
|
|
24132
|
-
const
|
|
24133
|
-
|
|
24134
|
-
|
|
24135
|
-
}
|
|
24136
|
-
return "";
|
|
24222
|
+
const handleChange = (date2) => {
|
|
24223
|
+
setActiveDate(date2[optionKey.valueKey]);
|
|
24224
|
+
onDateChange && onDateChange(date2, activeTime);
|
|
24137
24225
|
};
|
|
24138
|
-
React.
|
|
24139
|
-
setPopVisible(visible);
|
|
24140
|
-
}, [visible]);
|
|
24141
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
24226
|
+
return /* @__PURE__ */ React.createElement(
|
|
24142
24227
|
Popup,
|
|
24143
24228
|
{
|
|
24144
24229
|
closeable: true,
|
|
24145
24230
|
round: true,
|
|
24146
|
-
visible
|
|
24231
|
+
visible,
|
|
24147
24232
|
position: "bottom",
|
|
24148
|
-
style:
|
|
24149
|
-
|
|
24150
|
-
|
|
24151
|
-
|
|
24233
|
+
style: {
|
|
24234
|
+
width: "100%",
|
|
24235
|
+
height: "20%",
|
|
24236
|
+
...style
|
|
24237
|
+
},
|
|
24238
|
+
onClose: closeFun,
|
|
24239
|
+
...rest
|
|
24152
24240
|
},
|
|
24153
|
-
/* @__PURE__ */ React.createElement("div", { className:
|
|
24154
|
-
|
|
24241
|
+
/* @__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(
|
|
24242
|
+
"div",
|
|
24155
24243
|
{
|
|
24156
|
-
|
|
24157
|
-
className:
|
|
24158
|
-
|
|
24159
|
-
|
|
24160
|
-
|
|
24161
|
-
}
|
|
24244
|
+
key: item[optionKey.valueKey],
|
|
24245
|
+
className: classNames("nut-timepannel", {
|
|
24246
|
+
active: item[optionKey.valueKey] === activeDate
|
|
24247
|
+
}),
|
|
24248
|
+
onClick: () => handleChange(item)
|
|
24249
|
+
},
|
|
24250
|
+
item[optionKey.textKey]
|
|
24162
24251
|
))), /* @__PURE__ */ React.createElement(
|
|
24163
24252
|
TimeDetail,
|
|
24164
24253
|
{
|
|
24165
|
-
|
|
24166
|
-
|
|
24167
|
-
|
|
24168
|
-
|
|
24254
|
+
options: options2,
|
|
24255
|
+
optionKey,
|
|
24256
|
+
activeDate,
|
|
24257
|
+
activeTime,
|
|
24258
|
+
onSelect: handleSelectTime
|
|
24169
24259
|
}
|
|
24170
24260
|
)))
|
|
24171
|
-
)
|
|
24261
|
+
);
|
|
24172
24262
|
};
|
|
24173
24263
|
TimeSelect.defaultProps = defaultProps$2;
|
|
24174
24264
|
TimeSelect.displayName = "NutTimeSelect";
|
|
@@ -24405,7 +24495,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
24405
24495
|
exports2.Image = Image$1;
|
|
24406
24496
|
exports2.ImagePreview = ImagePreview;
|
|
24407
24497
|
exports2.Indicator = Indicator;
|
|
24408
|
-
exports2.
|
|
24498
|
+
exports2.InfiniteLoading = InfiniteLoading;
|
|
24409
24499
|
exports2.Input = Input;
|
|
24410
24500
|
exports2.InputNumber = InputNumber;
|
|
24411
24501
|
exports2.Layout = Layout;
|
|
@@ -24450,7 +24540,6 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
24450
24540
|
exports2.Tag = Tag;
|
|
24451
24541
|
exports2.TextArea = TextArea;
|
|
24452
24542
|
exports2.TimeDetail = TimeDetail;
|
|
24453
|
-
exports2.TimePannel = TimePannel;
|
|
24454
24543
|
exports2.TimeSelect = TimeSelect;
|
|
24455
24544
|
exports2.Toast = Toast;
|
|
24456
24545
|
exports2.TrendArrow = TrendArrow;
|