@nutui/nutui-react 2.0.0-alpha.11 → 2.0.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/esm/ActionSheet/style/style.css +1 -1
- package/dist/esm/ActionSheet.js +28 -37
- package/dist/esm/Address/style/style.css +1 -1
- package/dist/esm/AnimatingNumbers/style/style.css +1 -1
- package/dist/esm/AnimatingNumbers.js +22 -26
- package/dist/esm/Calendar/style/style.css +1 -1
- package/dist/esm/Cascader/style/style.css +1 -1
- package/dist/esm/CountDown/style/style.css +1 -1
- package/dist/esm/CountDown.js +20 -15
- package/dist/esm/DatePicker/style/style.css +1 -1
- package/dist/esm/Ellipsis/style/style.css +1 -1
- package/dist/esm/ImagePreview/style/style.css +1 -1
- package/dist/esm/NumberKeyboard/style/style.css +1 -1
- package/dist/esm/Picker/style/style.css +1 -1
- package/dist/esm/Popup/style/style.css +1 -1
- package/dist/esm/SearchBar/style/style.css +1 -1
- package/dist/esm/SearchBar.js +33 -87
- package/dist/esm/ShortPassword/style/style.css +1 -1
- package/dist/esm/ShortPassword.js +65 -133
- package/dist/esm/SideNavBar/style/style.css +1 -1
- package/dist/esm/TimeSelect/style/style.css +1 -1
- package/dist/esm/Toast/style/style.css +1 -1
- package/dist/esm/Toast.js +86 -102
- package/dist/esm/TrendArrow/style/style.css +1 -1
- package/dist/esm/TrendArrow.js +30 -35
- package/dist/esm/Video.js +8 -12
- package/dist/esm/VirtualList/style/style.css +1 -1
- package/dist/esm/VirtualList.js +29 -25
- package/dist/esm/WaterMark.js +8 -11
- package/dist/esm/types/src/packages/actionsheet/actionsheet.d.ts +11 -15
- package/dist/esm/types/src/packages/actionsheet/actionsheet.taro.d.ts +11 -15
- package/dist/esm/types/src/packages/actionsheet/index.d.ts +1 -0
- package/dist/esm/types/src/packages/actionsheet/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/animatingnumbers/countup.d.ts +7 -8
- package/dist/esm/types/src/packages/animatingnumbers/countup.taro.d.ts +7 -8
- package/dist/esm/types/src/packages/animatingnumbers/demo.d.ts +1 -0
- package/dist/esm/types/src/packages/animatingnumbers/demo.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/animatingnumbers/index.d.ts +1 -0
- package/dist/esm/types/src/packages/animatingnumbers/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/avatargroup/avatargroup.taro.d.ts +13 -0
- package/dist/esm/types/src/packages/avatargroup/index.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +2 -1
- package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/configprovider/index.d.ts +1 -0
- package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -0
- package/dist/esm/types/src/packages/countdown/countdown.d.ts +5 -4
- package/dist/esm/types/src/packages/countdown/countdown.taro.d.ts +5 -4
- package/dist/esm/types/src/packages/countdown/index.d.ts +1 -0
- package/dist/esm/types/src/packages/countdown/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/ellipsis/ellipsis.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/searchbar/index.d.ts +1 -0
- package/dist/esm/types/src/packages/searchbar/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +4 -31
- package/dist/esm/types/src/packages/searchbar/searchbar.taro.d.ts +4 -31
- package/dist/esm/types/src/packages/shortpassword/index.d.ts +1 -0
- package/dist/esm/types/src/packages/shortpassword/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +17 -20
- package/dist/esm/types/src/packages/shortpassword/shortpassword.taro.d.ts +17 -20
- package/dist/esm/types/src/packages/toast/Notification.d.ts +9 -13
- package/dist/esm/types/src/packages/toast/index.d.ts +1 -0
- package/dist/esm/types/src/packages/toast/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/toast/toast.d.ts +19 -26
- package/dist/esm/types/src/packages/toast/toast.taro.d.ts +9 -11
- package/dist/esm/types/src/packages/trendarrow/trendarrow.d.ts +8 -10
- package/dist/esm/types/src/packages/trendarrow/trendarrow.taro.d.ts +8 -10
- package/dist/esm/types/src/packages/video/index.d.ts +1 -0
- package/dist/esm/types/src/packages/video/index.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/video/video.d.ts +5 -9
- package/dist/esm/types/src/packages/video/video.taro.d.ts +6 -9
- package/dist/esm/types/src/packages/virtuallist/index.d.ts +1 -0
- package/dist/esm/types/src/packages/virtuallist/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/virtuallist/type.d.ts +0 -18
- package/dist/esm/types/src/packages/virtuallist/utils.d.ts +3 -3
- package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +15 -4
- package/dist/esm/types/src/packages/virtuallist/virtuallist.taro.d.ts +13 -14
- package/dist/esm/types/src/packages/watermark/demo.d.ts +0 -1
- package/dist/esm/types/src/packages/watermark/demo.taro.d.ts +0 -1
- package/dist/esm/types/src/packages/watermark/index.d.ts +1 -0
- package/dist/esm/types/src/packages/watermark/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/watermark/watermark.d.ts +3 -4
- package/dist/esm/types/src/packages/watermark/watermark.taro.d.ts +3 -4
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/tr-TR.js +10 -2
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +525 -590
- package/dist/nutui.react.umd.js +525 -590
- package/dist/packages/actionsheet/actionsheet.scss +26 -73
- package/dist/packages/animatingnumbers/countup.scss +0 -21
- package/dist/packages/countdown/countdown.scss +2 -0
- package/dist/packages/ellipsis/ellipsis.scss +4 -0
- package/dist/packages/popup/popup.scss +98 -47
- package/dist/packages/searchbar/searchbar.scss +13 -71
- package/dist/packages/shortpassword/shortpassword.scss +1 -88
- package/dist/packages/toast/toast.scss +20 -7
- package/dist/packages/trendarrow/trendarrow.scss +4 -3
- package/dist/packages/virtuallist/virtuallist.scss +0 -12
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +58 -68
- package/dist/styles/variables.scss +32 -61
- package/dist/types/packages/actionsheet/actionsheet.d.ts +44 -16
- package/dist/types/packages/actionsheet/index.d.ts +1 -0
- package/dist/types/packages/animate/animate.d.ts +20 -4
- package/dist/types/packages/animatingnumbers/countup.d.ts +7 -8
- package/dist/types/packages/animatingnumbers/index.d.ts +1 -0
- package/dist/types/packages/audio/audio.d.ts +60 -12
- package/dist/types/packages/avatar/avatar.d.ts +50 -10
- package/dist/types/packages/avatargroup/avatargroup.d.ts +40 -8
- package/dist/types/packages/backtop/backtop.d.ts +25 -5
- package/dist/types/packages/badge/badge.d.ts +30 -6
- package/dist/types/packages/button/button.d.ts +50 -10
- package/dist/types/packages/cascader/cascader.d.ts +85 -17
- package/dist/types/packages/cell/cell.d.ts +30 -6
- package/dist/types/packages/cellgroup/cellgroup.d.ts +15 -3
- package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +40 -8
- package/dist/types/packages/circleprogress/circleprogress.d.ts +35 -7
- package/dist/types/packages/col/col.d.ts +15 -3
- package/dist/types/packages/collapse/collapse.d.ts +25 -5
- package/dist/types/packages/collapseitem/collapseitem.d.ts +20 -4
- package/dist/types/packages/configprovider/configprovider.d.ts +11 -2
- package/dist/types/packages/configprovider/index.d.ts +1 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -0
- package/dist/types/packages/countdown/countdown.d.ts +68 -15
- package/dist/types/packages/countdown/index.d.ts +1 -0
- package/dist/types/packages/divider/divider.d.ts +10 -2
- package/dist/types/packages/drag/drag.d.ts +15 -3
- package/dist/types/packages/elevator/elevator.d.ts +45 -9
- package/dist/types/packages/ellipsis/ellipsis.d.ts +45 -9
- package/dist/types/packages/empty/empty.d.ts +20 -4
- package/dist/types/packages/fixednav/fixednav.d.ts +50 -10
- package/dist/types/packages/grid/grid.d.ts +35 -7
- package/dist/types/packages/griditem/griditem.d.ts +5 -1
- package/dist/types/packages/image/image.d.ts +65 -13
- package/dist/types/packages/imagepreview/imagepreview.d.ts +50 -10
- package/dist/types/packages/indicator/indicator.d.ts +15 -3
- package/dist/types/packages/input/input.d.ts +100 -20
- package/dist/types/packages/inputnumber/inputnumber.d.ts +85 -17
- package/dist/types/packages/menu/menu.d.ts +25 -5
- package/dist/types/packages/menuitem/menuitem.d.ts +35 -7
- package/dist/types/packages/noticebar/noticebar.d.ts +60 -12
- package/dist/types/packages/notify/notify.d.ts +25 -5
- package/dist/types/packages/numberkeyboard/numberkeyboard.d.ts +50 -10
- package/dist/types/packages/overlay/overlay.d.ts +40 -8
- package/dist/types/packages/pagination/pagination.d.ts +55 -11
- package/dist/types/packages/picker/picker.d.ts +55 -11
- package/dist/types/packages/popup/popup.d.ts +75 -15
- package/dist/types/packages/price/price.d.ts +35 -7
- package/dist/types/packages/progress/progress.d.ts +40 -8
- package/dist/types/packages/pulltorefresh/pulltorefresh.d.ts +50 -10
- package/dist/types/packages/radio/radio.d.ts +45 -9
- package/dist/types/packages/radiogroup/radiogroup.d.ts +30 -6
- package/dist/types/packages/range/range.d.ts +80 -16
- package/dist/types/packages/rate/rate.d.ts +50 -10
- package/dist/types/packages/searchbar/index.d.ts +1 -0
- package/dist/types/packages/searchbar/searchbar.d.ts +76 -45
- package/dist/types/packages/shortpassword/index.d.ts +1 -0
- package/dist/types/packages/shortpassword/shortpassword.d.ts +89 -24
- package/dist/types/packages/skeleton/skeleton.d.ts +35 -7
- package/dist/types/packages/step/step.d.ts +20 -4
- package/dist/types/packages/steps/steps.d.ts +15 -3
- package/dist/types/packages/sticky/sticky.d.ts +25 -5
- package/dist/types/packages/swipe/swipe.d.ts +47 -11
- package/dist/types/packages/swiper/swiper.d.ts +65 -13
- package/dist/types/packages/switch/switch.d.ts +30 -6
- package/dist/types/packages/tabbar/tabbar.d.ts +35 -7
- package/dist/types/packages/tabbaritem/tabbaritem.d.ts +10 -2
- package/dist/types/packages/tabpane/tabpane.d.ts +15 -3
- package/dist/types/packages/tabs/tabs.d.ts +60 -12
- package/dist/types/packages/textarea/textarea.d.ts +60 -12
- package/dist/types/packages/toast/Notification.d.ts +9 -13
- package/dist/types/packages/toast/index.d.ts +1 -0
- package/dist/types/packages/toast/toast.d.ts +19 -26
- package/dist/types/packages/trendarrow/trendarrow.d.ts +57 -15
- package/dist/types/packages/uploader/uploader.d.ts +180 -36
- package/dist/types/packages/video/index.d.ts +1 -0
- package/dist/types/packages/video/video.d.ts +27 -11
- package/dist/types/packages/virtuallist/index.d.ts +1 -0
- package/dist/types/packages/virtuallist/type.d.ts +0 -18
- package/dist/types/packages/virtuallist/utils.d.ts +3 -3
- package/dist/types/packages/virtuallist/virtuallist.d.ts +51 -4
- package/dist/types/packages/watermark/index.d.ts +1 -0
- package/dist/types/packages/watermark/watermark.d.ts +72 -17
- package/package.json +1 -1
package/dist/nutui.react.es.js
CHANGED
|
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6
6
|
};
|
|
7
7
|
var _a;
|
|
8
8
|
/*!
|
|
9
|
-
* @nutui/nutui-react v2.0.0-alpha.
|
|
9
|
+
* @nutui/nutui-react v2.0.0-alpha.13 Wed May 31 2023 14:48:32 GMT+0800 (China Standard Time)
|
|
10
10
|
* (c) 2023 @jdf2e.
|
|
11
11
|
* Released under the MIT License.
|
|
12
12
|
*/
|
|
@@ -707,7 +707,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
707
707
|
process.env.NODE_ENV === "production" ? h.exports = ur() : h.exports = sr();
|
|
708
708
|
})(ir);
|
|
709
709
|
const lr = D.Fragment, cr = D.jsx, vr = D.jsxs;
|
|
710
|
-
const a$
|
|
710
|
+
const a$x = {
|
|
711
711
|
className: "",
|
|
712
712
|
style: void 0,
|
|
713
713
|
name: "ArrowDown2",
|
|
@@ -716,7 +716,7 @@ const a$w = {
|
|
|
716
716
|
onClick: () => {
|
|
717
717
|
}
|
|
718
718
|
}, y$9 = (h) => {
|
|
719
|
-
const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$
|
|
719
|
+
const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$x, ...h }, f = (t) => {
|
|
720
720
|
n && n(t);
|
|
721
721
|
}, c = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
|
|
722
722
|
const t = "nut-icon";
|
|
@@ -753,8 +753,8 @@ const a$w = {
|
|
|
753
753
|
}
|
|
754
754
|
) });
|
|
755
755
|
};
|
|
756
|
-
y$9.defaultProps = a$
|
|
757
|
-
const a$
|
|
756
|
+
y$9.defaultProps = a$x;
|
|
757
|
+
const a$w = {
|
|
758
758
|
className: "",
|
|
759
759
|
style: void 0,
|
|
760
760
|
name: "ArrowUp2",
|
|
@@ -762,8 +762,8 @@ const a$v = {
|
|
|
762
762
|
height: "",
|
|
763
763
|
onClick: () => {
|
|
764
764
|
}
|
|
765
|
-
}, x$
|
|
766
|
-
const { className: o, style: p, name: e, color: d, width: m, height: f, onClick: n } = { ...a$
|
|
765
|
+
}, x$h = (h) => {
|
|
766
|
+
const { className: o, style: p, name: e, color: d, width: m, height: f, onClick: n } = { ...a$w, ...h }, g = (t) => {
|
|
767
767
|
n && n(t);
|
|
768
768
|
}, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", w = () => {
|
|
769
769
|
const t = "nut-icon";
|
|
@@ -800,8 +800,8 @@ const a$v = {
|
|
|
800
800
|
}
|
|
801
801
|
) });
|
|
802
802
|
};
|
|
803
|
-
x$
|
|
804
|
-
const a$
|
|
803
|
+
x$h.defaultProps = a$w;
|
|
804
|
+
const a$v = {
|
|
805
805
|
className: "",
|
|
806
806
|
style: void 0,
|
|
807
807
|
name: "CheckChecked",
|
|
@@ -810,7 +810,7 @@ const a$u = {
|
|
|
810
810
|
onClick: () => {
|
|
811
811
|
}
|
|
812
812
|
}, y$8 = (h) => {
|
|
813
|
-
const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$
|
|
813
|
+
const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$v, ...h }, C = (t) => {
|
|
814
814
|
o && o(t);
|
|
815
815
|
}, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", k2 = () => {
|
|
816
816
|
const t = "nut-icon";
|
|
@@ -858,8 +858,8 @@ const a$u = {
|
|
|
858
858
|
}
|
|
859
859
|
) });
|
|
860
860
|
};
|
|
861
|
-
y$8.defaultProps = a$
|
|
862
|
-
const a$
|
|
861
|
+
y$8.defaultProps = a$v;
|
|
862
|
+
const a$u = {
|
|
863
863
|
className: "",
|
|
864
864
|
style: void 0,
|
|
865
865
|
name: "CheckDisabled",
|
|
@@ -867,8 +867,8 @@ const a$t = {
|
|
|
867
867
|
height: "",
|
|
868
868
|
onClick: () => {
|
|
869
869
|
}
|
|
870
|
-
}, x$
|
|
871
|
-
const { className: i, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$
|
|
870
|
+
}, x$g = (h) => {
|
|
871
|
+
const { className: i, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$u, ...h }, g = (t) => {
|
|
872
872
|
o && o(t);
|
|
873
873
|
}, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
|
|
874
874
|
const t = "nut-icon";
|
|
@@ -905,8 +905,8 @@ const a$t = {
|
|
|
905
905
|
}
|
|
906
906
|
) });
|
|
907
907
|
};
|
|
908
|
-
x$
|
|
909
|
-
const a$
|
|
908
|
+
x$g.defaultProps = a$u;
|
|
909
|
+
const a$t = {
|
|
910
910
|
className: "",
|
|
911
911
|
style: void 0,
|
|
912
912
|
name: "CheckNormal",
|
|
@@ -915,7 +915,7 @@ const a$s = {
|
|
|
915
915
|
onClick: () => {
|
|
916
916
|
}
|
|
917
917
|
}, N = (h) => {
|
|
918
|
-
const { className: o, style: m, name: e, color: d, width: p, height: C, onClick: r } = { ...a$
|
|
918
|
+
const { className: o, style: m, name: e, color: d, width: p, height: C, onClick: r } = { ...a$t, ...h }, f = (t) => {
|
|
919
919
|
r && r(t);
|
|
920
920
|
}, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
|
|
921
921
|
const t = "nut-icon";
|
|
@@ -952,8 +952,8 @@ const a$s = {
|
|
|
952
952
|
}
|
|
953
953
|
) });
|
|
954
954
|
};
|
|
955
|
-
N.defaultProps = a$
|
|
956
|
-
const a$
|
|
955
|
+
N.defaultProps = a$t;
|
|
956
|
+
const a$s = {
|
|
957
957
|
className: "",
|
|
958
958
|
style: void 0,
|
|
959
959
|
name: "Check",
|
|
@@ -961,8 +961,8 @@ const a$r = {
|
|
|
961
961
|
height: "",
|
|
962
962
|
onClick: () => {
|
|
963
963
|
}
|
|
964
|
-
}, x$
|
|
965
|
-
const { className: o, style: d, name: e, color: p, width: m, height: f, onClick: r } = { ...a$
|
|
964
|
+
}, x$f = (h) => {
|
|
965
|
+
const { className: o, style: d, name: e, color: p, width: m, height: f, onClick: r } = { ...a$s, ...h }, g = (t) => {
|
|
966
966
|
r && r(t);
|
|
967
967
|
}, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
|
|
968
968
|
const t = "nut-icon";
|
|
@@ -999,8 +999,8 @@ const a$r = {
|
|
|
999
999
|
}
|
|
1000
1000
|
) });
|
|
1001
1001
|
};
|
|
1002
|
-
x$
|
|
1003
|
-
const a$
|
|
1002
|
+
x$f.defaultProps = a$s;
|
|
1003
|
+
const a$r = {
|
|
1004
1004
|
className: "",
|
|
1005
1005
|
style: void 0,
|
|
1006
1006
|
name: "Checked",
|
|
@@ -1008,8 +1008,8 @@ const a$q = {
|
|
|
1008
1008
|
height: "",
|
|
1009
1009
|
onClick: () => {
|
|
1010
1010
|
}
|
|
1011
|
-
}, x$
|
|
1012
|
-
const { className: o, style: d, name: e, color: m, width: p, height: C, onClick: r } = { ...a$
|
|
1011
|
+
}, x$e = (h) => {
|
|
1012
|
+
const { className: o, style: d, name: e, color: m, width: p, height: C, onClick: r } = { ...a$r, ...h }, f = (t) => {
|
|
1013
1013
|
r && r(t);
|
|
1014
1014
|
}, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
|
|
1015
1015
|
const t = "nut-icon";
|
|
@@ -1046,8 +1046,8 @@ const a$q = {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
) });
|
|
1048
1048
|
};
|
|
1049
|
-
x$
|
|
1050
|
-
const a$
|
|
1049
|
+
x$e.defaultProps = a$r;
|
|
1050
|
+
const a$q = {
|
|
1051
1051
|
className: "",
|
|
1052
1052
|
style: void 0,
|
|
1053
1053
|
name: "Checklist",
|
|
@@ -1055,8 +1055,8 @@ const a$p = {
|
|
|
1055
1055
|
height: "",
|
|
1056
1056
|
onClick: () => {
|
|
1057
1057
|
}
|
|
1058
|
-
}, x$
|
|
1059
|
-
const { className: i, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$
|
|
1058
|
+
}, x$d = (h) => {
|
|
1059
|
+
const { className: i, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$q, ...h }, g = (t) => {
|
|
1060
1060
|
o && o(t);
|
|
1061
1061
|
}, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", k2 = () => {
|
|
1062
1062
|
const t = "nut-icon";
|
|
@@ -1093,8 +1093,8 @@ const a$p = {
|
|
|
1093
1093
|
}
|
|
1094
1094
|
) });
|
|
1095
1095
|
};
|
|
1096
|
-
x$
|
|
1097
|
-
const a$
|
|
1096
|
+
x$d.defaultProps = a$q;
|
|
1097
|
+
const a$p = {
|
|
1098
1098
|
className: "",
|
|
1099
1099
|
style: void 0,
|
|
1100
1100
|
name: "CircleClose",
|
|
@@ -1102,8 +1102,8 @@ const a$o = {
|
|
|
1102
1102
|
height: "",
|
|
1103
1103
|
onClick: () => {
|
|
1104
1104
|
}
|
|
1105
|
-
}, x$
|
|
1106
|
-
const { className: l2, style: m, name: e, color: d, width: p, height: C, onClick: o } = { ...a$
|
|
1105
|
+
}, x$c = (h) => {
|
|
1106
|
+
const { className: l2, style: m, name: e, color: d, width: p, height: C, onClick: o } = { ...a$p, ...h }, f = (t) => {
|
|
1107
1107
|
o && o(t);
|
|
1108
1108
|
}, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
|
|
1109
1109
|
const t = "nut-icon";
|
|
@@ -1140,8 +1140,8 @@ const a$o = {
|
|
|
1140
1140
|
}
|
|
1141
1141
|
) });
|
|
1142
1142
|
};
|
|
1143
|
-
x$
|
|
1144
|
-
const a$
|
|
1143
|
+
x$c.defaultProps = a$p;
|
|
1144
|
+
const a$o = {
|
|
1145
1145
|
className: "",
|
|
1146
1146
|
style: void 0,
|
|
1147
1147
|
name: "Close",
|
|
@@ -1149,8 +1149,8 @@ const a$n = {
|
|
|
1149
1149
|
height: "",
|
|
1150
1150
|
onClick: () => {
|
|
1151
1151
|
}
|
|
1152
|
-
}, x$
|
|
1153
|
-
const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$
|
|
1152
|
+
}, x$b = (h) => {
|
|
1153
|
+
const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$o, ...h }, g = (t) => {
|
|
1154
1154
|
r && r(t);
|
|
1155
1155
|
}, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
|
|
1156
1156
|
const t = "nut-icon";
|
|
@@ -1187,8 +1187,8 @@ const a$n = {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
) });
|
|
1189
1189
|
};
|
|
1190
|
-
x$
|
|
1191
|
-
const a$
|
|
1190
|
+
x$b.defaultProps = a$o;
|
|
1191
|
+
const a$n = {
|
|
1192
1192
|
className: "",
|
|
1193
1193
|
style: void 0,
|
|
1194
1194
|
name: "Del",
|
|
@@ -1197,7 +1197,7 @@ const a$m = {
|
|
|
1197
1197
|
onClick: () => {
|
|
1198
1198
|
}
|
|
1199
1199
|
}, y$7 = (h) => {
|
|
1200
|
-
const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$
|
|
1200
|
+
const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$n, ...h }, g = (t) => {
|
|
1201
1201
|
r && r(t);
|
|
1202
1202
|
}, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
|
|
1203
1203
|
const t = "nut-icon";
|
|
@@ -1234,8 +1234,8 @@ const a$m = {
|
|
|
1234
1234
|
}
|
|
1235
1235
|
) });
|
|
1236
1236
|
};
|
|
1237
|
-
y$7.defaultProps = a$
|
|
1238
|
-
const a$
|
|
1237
|
+
y$7.defaultProps = a$n;
|
|
1238
|
+
const a$m = {
|
|
1239
1239
|
className: "",
|
|
1240
1240
|
style: void 0,
|
|
1241
1241
|
name: "DownArrow",
|
|
@@ -1243,8 +1243,8 @@ const a$l = {
|
|
|
1243
1243
|
height: "",
|
|
1244
1244
|
onClick: () => {
|
|
1245
1245
|
}
|
|
1246
|
-
}, x$
|
|
1247
|
-
const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$
|
|
1246
|
+
}, x$a = (h) => {
|
|
1247
|
+
const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$m, ...h }, f = (t) => {
|
|
1248
1248
|
n && n(t);
|
|
1249
1249
|
}, c = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
|
|
1250
1250
|
const t = "nut-icon";
|
|
@@ -1281,8 +1281,8 @@ const a$l = {
|
|
|
1281
1281
|
}
|
|
1282
1282
|
) });
|
|
1283
1283
|
};
|
|
1284
|
-
x$
|
|
1285
|
-
const a$
|
|
1284
|
+
x$a.defaultProps = a$m;
|
|
1285
|
+
const a$l = {
|
|
1286
1286
|
className: "",
|
|
1287
1287
|
style: void 0,
|
|
1288
1288
|
name: "Failure",
|
|
@@ -1290,8 +1290,8 @@ const a$k = {
|
|
|
1290
1290
|
height: "",
|
|
1291
1291
|
onClick: () => {
|
|
1292
1292
|
}
|
|
1293
|
-
}, x$
|
|
1294
|
-
const { className: r, style: d, name: e, color: m, width: p, height: f, onClick: l2 } = { ...a$
|
|
1293
|
+
}, x$9 = (h) => {
|
|
1294
|
+
const { className: r, style: d, name: e, color: m, width: p, height: f, onClick: l2 } = { ...a$l, ...h }, u = (t) => {
|
|
1295
1295
|
l2 && l2(t);
|
|
1296
1296
|
}, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
|
|
1297
1297
|
const t = "nut-icon";
|
|
@@ -1328,8 +1328,8 @@ const a$k = {
|
|
|
1328
1328
|
}
|
|
1329
1329
|
) });
|
|
1330
1330
|
};
|
|
1331
|
-
x$
|
|
1332
|
-
const a$
|
|
1331
|
+
x$9.defaultProps = a$l;
|
|
1332
|
+
const a$k = {
|
|
1333
1333
|
className: "",
|
|
1334
1334
|
style: void 0,
|
|
1335
1335
|
name: "ImageError",
|
|
@@ -1338,7 +1338,7 @@ const a$j = {
|
|
|
1338
1338
|
onClick: () => {
|
|
1339
1339
|
}
|
|
1340
1340
|
}, k$5 = (h) => {
|
|
1341
|
-
const { className: s, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$
|
|
1341
|
+
const { className: s, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$k, ...h }, g = (t) => {
|
|
1342
1342
|
o && o(t);
|
|
1343
1343
|
}, c = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
|
|
1344
1344
|
const t = "nut-icon";
|
|
@@ -1386,8 +1386,8 @@ const a$j = {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
) });
|
|
1388
1388
|
};
|
|
1389
|
-
k$5.defaultProps = a$
|
|
1390
|
-
const a$
|
|
1389
|
+
k$5.defaultProps = a$k;
|
|
1390
|
+
const a$j = {
|
|
1391
1391
|
className: "",
|
|
1392
1392
|
style: void 0,
|
|
1393
1393
|
name: "Image",
|
|
@@ -1396,7 +1396,7 @@ const a$i = {
|
|
|
1396
1396
|
onClick: () => {
|
|
1397
1397
|
}
|
|
1398
1398
|
}, k$4 = (h) => {
|
|
1399
|
-
const { className: l2, style: d, name: c, color: m, width: p, height: f, onClick: r } = { ...a$
|
|
1399
|
+
const { className: l2, style: d, name: c, color: m, width: p, height: f, onClick: r } = { ...a$j, ...h }, g = (t) => {
|
|
1400
1400
|
r && r(t);
|
|
1401
1401
|
}, o = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
|
|
1402
1402
|
const t = "nut-icon";
|
|
@@ -1444,7 +1444,54 @@ const a$i = {
|
|
|
1444
1444
|
}
|
|
1445
1445
|
) });
|
|
1446
1446
|
};
|
|
1447
|
-
k$4.defaultProps = a$
|
|
1447
|
+
k$4.defaultProps = a$j;
|
|
1448
|
+
const a$i = {
|
|
1449
|
+
className: "",
|
|
1450
|
+
style: void 0,
|
|
1451
|
+
name: "Issue",
|
|
1452
|
+
width: "",
|
|
1453
|
+
height: "",
|
|
1454
|
+
onClick: () => {
|
|
1455
|
+
}
|
|
1456
|
+
}, x$8 = (h) => {
|
|
1457
|
+
const { className: o, style: m, name: s, color: d, width: p, height: f, onClick: r } = { ...a$i, ...h }, u = (t) => {
|
|
1458
|
+
r && r(t);
|
|
1459
|
+
}, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
|
|
1460
|
+
const t = "nut-icon";
|
|
1461
|
+
return classNames({
|
|
1462
|
+
[`${o}`]: o,
|
|
1463
|
+
[t]: true,
|
|
1464
|
+
[t + "-" + s]: s
|
|
1465
|
+
});
|
|
1466
|
+
}, e = {}, i = n(p || ""), l2 = n(f || "");
|
|
1467
|
+
i && (e.width = i), l2 && (e.height = l2);
|
|
1468
|
+
const C = () => ({
|
|
1469
|
+
...m,
|
|
1470
|
+
...e
|
|
1471
|
+
});
|
|
1472
|
+
return /* @__PURE__ */ cr(lr, { children: /* @__PURE__ */ cr(
|
|
1473
|
+
"svg",
|
|
1474
|
+
{
|
|
1475
|
+
className: g(),
|
|
1476
|
+
style: C(),
|
|
1477
|
+
onClick: u,
|
|
1478
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1479
|
+
color: d,
|
|
1480
|
+
viewBox: "0 0 1024 1024",
|
|
1481
|
+
"aria-labelledby": s,
|
|
1482
|
+
role: "presentation",
|
|
1483
|
+
children: /* @__PURE__ */ cr(
|
|
1484
|
+
"path",
|
|
1485
|
+
{
|
|
1486
|
+
d: "M512 1024C229.831 1024 0 794.169 0 512S229.831 0 512 0s512 229.831 512 512-229.831 512-512 512zm0-955.733C266.24 68.267 68.267 266.24 68.267 512S266.24 955.733 512 955.733 955.733 757.76 955.733 512 757.76 68.267 512 68.267zm31.858 377.742c18.204 0 34.133 15.929 34.133 34.133 0 2.276 0 15.93-2.275 18.205l-34.134 195.697h29.582c18.205 0 34.134 15.93 34.134 34.134s-15.93 34.133-34.134 34.133h-91.022c-18.204 0-34.133-15.929-34.133-34.133v-20.48L480.142 512H450.56c-18.204 0-34.133-15.929-34.133-34.133s15.929-34.134 34.133-34.134h93.298zm-34.134-207.076c38.685 0 68.267 29.583 68.267 68.267s-29.582 68.267-68.267 68.267-68.266-29.583-68.266-68.267 29.582-68.267 68.266-68.267z",
|
|
1487
|
+
fill: "currentColor",
|
|
1488
|
+
fillOpacity: "0.9"
|
|
1489
|
+
}
|
|
1490
|
+
)
|
|
1491
|
+
}
|
|
1492
|
+
) });
|
|
1493
|
+
};
|
|
1494
|
+
x$8.defaultProps = a$i;
|
|
1448
1495
|
const a$h = {
|
|
1449
1496
|
className: "",
|
|
1450
1497
|
style: void 0,
|
|
@@ -2439,7 +2486,7 @@ const defaultProps$1r = {
|
|
|
2439
2486
|
onClick: (event) => {
|
|
2440
2487
|
}
|
|
2441
2488
|
};
|
|
2442
|
-
const classPrefix$
|
|
2489
|
+
const classPrefix$k = "nut-cell";
|
|
2443
2490
|
const Cell = (props) => {
|
|
2444
2491
|
const {
|
|
2445
2492
|
children,
|
|
@@ -2470,19 +2517,19 @@ const Cell = (props) => {
|
|
|
2470
2517
|
return /* @__PURE__ */ React__default.createElement(
|
|
2471
2518
|
"div",
|
|
2472
2519
|
{
|
|
2473
|
-
className: classNames(classPrefix$
|
|
2520
|
+
className: classNames(classPrefix$k, className),
|
|
2474
2521
|
onClick: (event) => handleClick2(event),
|
|
2475
2522
|
style: baseStyle,
|
|
2476
2523
|
...rest
|
|
2477
2524
|
},
|
|
2478
|
-
children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, title || description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
2525
|
+
children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, title || description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$k}__left` }, title ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$k}__title` }, title) : null, description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$k}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React__default.createElement(
|
|
2479
2526
|
"div",
|
|
2480
2527
|
{
|
|
2481
|
-
className: `${classPrefix$
|
|
2528
|
+
className: `${classPrefix$k}__extra`,
|
|
2482
2529
|
style: styles
|
|
2483
2530
|
},
|
|
2484
2531
|
extra
|
|
2485
|
-
) : null, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
2532
|
+
) : null, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$k}__divider` }))
|
|
2486
2533
|
);
|
|
2487
2534
|
};
|
|
2488
2535
|
Cell.defaultProps = defaultProps$1r;
|
|
@@ -2493,16 +2540,16 @@ const defaultProps$1q = {
|
|
|
2493
2540
|
description: "",
|
|
2494
2541
|
divider: true
|
|
2495
2542
|
};
|
|
2496
|
-
const classPrefix$
|
|
2543
|
+
const classPrefix$j = "nut-cell-group";
|
|
2497
2544
|
const CellGroup = (props) => {
|
|
2498
2545
|
const { children, className, style, title, description, divider, ...rest } = {
|
|
2499
2546
|
...defaultProps$1q,
|
|
2500
2547
|
...props
|
|
2501
2548
|
};
|
|
2502
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix$
|
|
2549
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix$j, className), ...rest }, title ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$j}__title` }, title) : null, description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$j}__description` }, description) : null, /* @__PURE__ */ React__default.createElement(
|
|
2503
2550
|
"div",
|
|
2504
2551
|
{
|
|
2505
|
-
className: `${classPrefix$
|
|
2552
|
+
className: `${classPrefix$j}__wrap ${divider ? `${classPrefix$j}__wrap--divider` : ""}`
|
|
2506
2553
|
},
|
|
2507
2554
|
children
|
|
2508
2555
|
));
|
|
@@ -2979,7 +3026,7 @@ const defaultProps$1o = {
|
|
|
2979
3026
|
loading: true,
|
|
2980
3027
|
lazy: false
|
|
2981
3028
|
};
|
|
2982
|
-
const classPrefix$
|
|
3029
|
+
const classPrefix$i = "nut-image";
|
|
2983
3030
|
const Image$1 = (props) => {
|
|
2984
3031
|
const {
|
|
2985
3032
|
className,
|
|
@@ -3090,7 +3137,7 @@ const Image$1 = (props) => {
|
|
|
3090
3137
|
return /* @__PURE__ */ React__default.createElement(
|
|
3091
3138
|
"div",
|
|
3092
3139
|
{
|
|
3093
|
-
className: classNames(classPrefix$
|
|
3140
|
+
className: classNames(classPrefix$i, className),
|
|
3094
3141
|
style: containerStyle,
|
|
3095
3142
|
onClick: (e) => {
|
|
3096
3143
|
imageClick(e);
|
|
@@ -3256,21 +3303,21 @@ const defaultProps$1m = {
|
|
|
3256
3303
|
contentPosition: "center",
|
|
3257
3304
|
direction: "horizontal"
|
|
3258
3305
|
};
|
|
3259
|
-
const classPrefix$
|
|
3306
|
+
const classPrefix$h = `nut-divider`;
|
|
3260
3307
|
const Divider = (props) => {
|
|
3261
3308
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
3262
3309
|
...defaultProps$1m,
|
|
3263
3310
|
...props
|
|
3264
3311
|
};
|
|
3265
3312
|
const classes = direction === "horizontal" ? classNames({
|
|
3266
|
-
[`${classPrefix$
|
|
3267
|
-
[`${classPrefix$
|
|
3268
|
-
[`${classPrefix$
|
|
3269
|
-
[`${classPrefix$
|
|
3270
|
-
[`${classPrefix$
|
|
3313
|
+
[`${classPrefix$h}`]: true,
|
|
3314
|
+
[`${classPrefix$h}__center`]: children,
|
|
3315
|
+
[`${classPrefix$h}__left`]: contentPosition === "left",
|
|
3316
|
+
[`${classPrefix$h}__right`]: contentPosition === "right",
|
|
3317
|
+
[`${classPrefix$h}__hairline`]: true
|
|
3271
3318
|
}) : classNames({
|
|
3272
|
-
[`${classPrefix$
|
|
3273
|
-
[`${classPrefix$
|
|
3319
|
+
[`${classPrefix$h}`]: true,
|
|
3320
|
+
[`${classPrefix$h}__vertical`]: direction === "vertical"
|
|
3274
3321
|
});
|
|
3275
3322
|
return /* @__PURE__ */ React__default.createElement("div", { className: `${classes} ${className || ""}`, style, ...rest }, children);
|
|
3276
3323
|
};
|
|
@@ -3428,7 +3475,7 @@ const Layout = (props) => {
|
|
|
3428
3475
|
};
|
|
3429
3476
|
Layout.defaultProps = defaultProps$1j;
|
|
3430
3477
|
Layout.displayName = "NutLayout";
|
|
3431
|
-
const classPrefix$
|
|
3478
|
+
const classPrefix$g = "nut-row";
|
|
3432
3479
|
const defaultProps$1i = {
|
|
3433
3480
|
...ComponentDefaults,
|
|
3434
3481
|
type: "",
|
|
@@ -3463,7 +3510,7 @@ const Row = (props) => {
|
|
|
3463
3510
|
${getClass("justify", justify)}
|
|
3464
3511
|
${getClass("align", align)}
|
|
3465
3512
|
${getClass("flex", wrap)}
|
|
3466
|
-
${classPrefix$
|
|
3513
|
+
${classPrefix$g}
|
|
3467
3514
|
`;
|
|
3468
3515
|
};
|
|
3469
3516
|
const parentRow = {
|
|
@@ -3562,7 +3609,7 @@ const defaultProps$1h = {
|
|
|
3562
3609
|
threshold: 0,
|
|
3563
3610
|
zIndex: 2e3
|
|
3564
3611
|
};
|
|
3565
|
-
const classPrefix$
|
|
3612
|
+
const classPrefix$f = "nut-sticky";
|
|
3566
3613
|
const Sticky = (props) => {
|
|
3567
3614
|
const {
|
|
3568
3615
|
position,
|
|
@@ -3684,7 +3731,7 @@ const Sticky = (props) => {
|
|
|
3684
3731
|
{
|
|
3685
3732
|
ref: rootRef,
|
|
3686
3733
|
style: { ...style, ...rootStyle },
|
|
3687
|
-
className: classNames(classPrefix$
|
|
3734
|
+
className: classNames(classPrefix$f, className),
|
|
3688
3735
|
...rest
|
|
3689
3736
|
},
|
|
3690
3737
|
/* @__PURE__ */ React__default.createElement("div", { className: "nut-sticky--box", ref: stickyRef, style: stickyStyle }, children)
|
|
@@ -7094,7 +7141,7 @@ function replaceRef(ctrl, ref) {
|
|
|
7094
7141
|
ctrl.ref = ref;
|
|
7095
7142
|
}
|
|
7096
7143
|
}
|
|
7097
|
-
const config$
|
|
7144
|
+
const config$2 = {
|
|
7098
7145
|
default: {
|
|
7099
7146
|
tension: 170,
|
|
7100
7147
|
friction: 26
|
|
@@ -7120,7 +7167,7 @@ const config$1 = {
|
|
|
7120
7167
|
friction: 120
|
|
7121
7168
|
}
|
|
7122
7169
|
};
|
|
7123
|
-
const defaults = _extends$2({}, config$
|
|
7170
|
+
const defaults = _extends$2({}, config$2.default, {
|
|
7124
7171
|
mass: 1,
|
|
7125
7172
|
damping: 1,
|
|
7126
7173
|
easing: easings.linear,
|
|
@@ -10304,7 +10351,7 @@ function removeClass$1(element, className) {
|
|
|
10304
10351
|
element.setAttribute("class", replaceClassName(element.className && element.className.baseVal || "", className));
|
|
10305
10352
|
}
|
|
10306
10353
|
}
|
|
10307
|
-
const config = {
|
|
10354
|
+
const config$1 = {
|
|
10308
10355
|
disabled: false
|
|
10309
10356
|
};
|
|
10310
10357
|
var timeoutsShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.number, propTypesExports.shape({
|
|
@@ -10438,7 +10485,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
|
10438
10485
|
var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM__default.findDOMNode(this), appearing], maybeNode = _ref2[0], maybeAppearing = _ref2[1];
|
|
10439
10486
|
var timeouts2 = this.getTimeouts();
|
|
10440
10487
|
var enterTimeout = appearing ? timeouts2.appear : timeouts2.enter;
|
|
10441
|
-
if (!mounting && !enter || config.disabled) {
|
|
10488
|
+
if (!mounting && !enter || config$1.disabled) {
|
|
10442
10489
|
this.safeSetState({
|
|
10443
10490
|
status: ENTERED
|
|
10444
10491
|
}, function() {
|
|
@@ -10465,7 +10512,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
|
10465
10512
|
var exit = this.props.exit;
|
|
10466
10513
|
var timeouts2 = this.getTimeouts();
|
|
10467
10514
|
var maybeNode = this.props.nodeRef ? void 0 : ReactDOM__default.findDOMNode(this);
|
|
10468
|
-
if (!exit || config.disabled) {
|
|
10515
|
+
if (!exit || config$1.disabled) {
|
|
10469
10516
|
this.safeSetState({
|
|
10470
10517
|
status: EXITED
|
|
10471
10518
|
}, function() {
|
|
@@ -11146,7 +11193,7 @@ const Popup = (props) => {
|
|
|
11146
11193
|
};
|
|
11147
11194
|
const renderIcon = () => {
|
|
11148
11195
|
if (closeable) {
|
|
11149
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: closeClasses, onClick: onHandleClickCloseIcon }, React__default.isValidElement(closeIcon) ? closeIcon : /* @__PURE__ */ React__default.createElement(x$
|
|
11196
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: closeClasses, onClick: onHandleClickCloseIcon }, React__default.isValidElement(closeIcon) ? closeIcon : /* @__PURE__ */ React__default.createElement(x$b, { width: 12, height: 12 }));
|
|
11150
11197
|
}
|
|
11151
11198
|
return null;
|
|
11152
11199
|
};
|
|
@@ -11536,7 +11583,7 @@ const defaultProps$15 = {
|
|
|
11536
11583
|
duration: 300,
|
|
11537
11584
|
autoHeight: false
|
|
11538
11585
|
};
|
|
11539
|
-
const classPrefix$
|
|
11586
|
+
const classPrefix$e = "nut-tabs";
|
|
11540
11587
|
const Tabs = (props) => {
|
|
11541
11588
|
const {
|
|
11542
11589
|
activeColor,
|
|
@@ -11630,14 +11677,14 @@ const Tabs = (props) => {
|
|
|
11630
11677
|
}
|
|
11631
11678
|
}, [children]);
|
|
11632
11679
|
const classes = classNames(
|
|
11633
|
-
classPrefix$
|
|
11634
|
-
`${classPrefix$
|
|
11680
|
+
classPrefix$e,
|
|
11681
|
+
`${classPrefix$e}--${direction}`,
|
|
11635
11682
|
className
|
|
11636
11683
|
);
|
|
11637
|
-
const classesTitle = classNames(`${classPrefix$
|
|
11638
|
-
[`${classPrefix$
|
|
11639
|
-
[`${classPrefix$
|
|
11640
|
-
[`${classPrefix$
|
|
11684
|
+
const classesTitle = classNames(`${classPrefix$e}__titles`, {
|
|
11685
|
+
[`${classPrefix$e}__titles--${activeType}`]: activeType,
|
|
11686
|
+
[`${classPrefix$e}__titles--scrollable`]: true,
|
|
11687
|
+
[`${classPrefix$e}__titles--${align}`]: align
|
|
11641
11688
|
});
|
|
11642
11689
|
const tabsActiveStyle = {
|
|
11643
11690
|
color: activeType === "smile" ? activeColor : "",
|
|
@@ -11667,7 +11714,7 @@ const Tabs = (props) => {
|
|
|
11667
11714
|
onClick: () => {
|
|
11668
11715
|
tabChange(item);
|
|
11669
11716
|
},
|
|
11670
|
-
className: classNames(`${classPrefix$
|
|
11717
|
+
className: classNames(`${classPrefix$e}__titles-item`, {
|
|
11671
11718
|
[`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
|
|
11672
11719
|
[`nut-tabs__titles-item--disabled`]: item.disabled,
|
|
11673
11720
|
[`nut-tabs__titles-item--${align}`]: align
|
|
@@ -11678,14 +11725,14 @@ const Tabs = (props) => {
|
|
|
11678
11725
|
activeType === "line" && /* @__PURE__ */ React__default.createElement(
|
|
11679
11726
|
"div",
|
|
11680
11727
|
{
|
|
11681
|
-
className: `${classPrefix$
|
|
11728
|
+
className: `${classPrefix$e}__titles-item__line`,
|
|
11682
11729
|
style: tabsActiveStyle
|
|
11683
11730
|
}
|
|
11684
11731
|
),
|
|
11685
11732
|
activeType === "smile" && /* @__PURE__ */ React__default.createElement(
|
|
11686
11733
|
"div",
|
|
11687
11734
|
{
|
|
11688
|
-
className: `${classPrefix$
|
|
11735
|
+
className: `${classPrefix$e}__titles-item__smile`,
|
|
11689
11736
|
style: tabsActiveStyle
|
|
11690
11737
|
},
|
|
11691
11738
|
/* @__PURE__ */ React__default.createElement(x$7, { color: activeColor, width: 40, height: 20 })
|
|
@@ -11697,13 +11744,13 @@ const Tabs = (props) => {
|
|
|
11697
11744
|
{
|
|
11698
11745
|
ellipsis: true
|
|
11699
11746
|
},
|
|
11700
|
-
`${classPrefix$
|
|
11747
|
+
`${classPrefix$e}__titles-item__text`
|
|
11701
11748
|
)
|
|
11702
11749
|
},
|
|
11703
11750
|
item.title
|
|
11704
11751
|
)
|
|
11705
11752
|
);
|
|
11706
|
-
})), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
11753
|
+
})), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$e}__content__wrap` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$e}__content`, style: contentStyle }, React__default.Children.map(children, (child, idx) => {
|
|
11707
11754
|
if (!React__default.isValidElement(child)) {
|
|
11708
11755
|
return null;
|
|
11709
11756
|
}
|
|
@@ -12156,7 +12203,7 @@ const CustomRender = (props) => {
|
|
|
12156
12203
|
}
|
|
12157
12204
|
},
|
|
12158
12205
|
selectedRegion && selectedRegion[tabName[tabIndex]].id === item.id && /* @__PURE__ */ React__default.createElement(
|
|
12159
|
-
x$
|
|
12206
|
+
x$f,
|
|
12160
12207
|
{
|
|
12161
12208
|
className: b("region-item--icon"),
|
|
12162
12209
|
color: "var(--nutui-brand-color)",
|
|
@@ -12316,7 +12363,7 @@ const Address = (props) => {
|
|
|
12316
12363
|
onSwitch && onSwitch({ type: privateType });
|
|
12317
12364
|
};
|
|
12318
12365
|
const headerRender = () => {
|
|
12319
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: b("header") }, /* @__PURE__ */ React__default.createElement("div", { className: "arrow-back", onClick: onSwitchModule }, privateType === "custom" && (React__default.isValidElement(backBtnIcon) ? backBtnIcon : /* @__PURE__ */ React__default.createElement(y$6, { color: "#cccccc" }))), /* @__PURE__ */ React__default.createElement("div", { className: b("header__title") }, privateType === "custom" ? customAddressTitle || locale.address.selectRegion : existAddressTitle || locale.address.deliveryTo), /* @__PURE__ */ React__default.createElement("div", { onClick: () => handClose() }, React__default.isValidElement(closeBtnIcon) ? closeBtnIcon : /* @__PURE__ */ React__default.createElement(x$
|
|
12366
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: b("header") }, /* @__PURE__ */ React__default.createElement("div", { className: "arrow-back", onClick: onSwitchModule }, privateType === "custom" && (React__default.isValidElement(backBtnIcon) ? backBtnIcon : /* @__PURE__ */ React__default.createElement(y$6, { color: "#cccccc" }))), /* @__PURE__ */ React__default.createElement("div", { className: b("header__title") }, privateType === "custom" ? customAddressTitle || locale.address.selectRegion : existAddressTitle || locale.address.deliveryTo), /* @__PURE__ */ React__default.createElement("div", { onClick: () => handClose() }, React__default.isValidElement(closeBtnIcon) ? closeBtnIcon : /* @__PURE__ */ React__default.createElement(x$c, { width: 18, height: 18, color: "#ccc" })));
|
|
12320
12367
|
};
|
|
12321
12368
|
useEffect(() => {
|
|
12322
12369
|
setShowPopup(modelValue);
|
|
@@ -12368,7 +12415,7 @@ const Address = (props) => {
|
|
|
12368
12415
|
{
|
|
12369
12416
|
type: privateType,
|
|
12370
12417
|
existAddress,
|
|
12371
|
-
selectedIcon: React__default.isValidElement(selectedIcon) ? selectedIcon : /* @__PURE__ */ React__default.createElement(x$
|
|
12418
|
+
selectedIcon: React__default.isValidElement(selectedIcon) ? selectedIcon : /* @__PURE__ */ React__default.createElement(x$f, { color: "#FA2C19" }),
|
|
12372
12419
|
defaultIcon: React__default.isValidElement(defaultIcon) ? defaultIcon : /* @__PURE__ */ React__default.createElement(x$5, null),
|
|
12373
12420
|
isShowCustomAddress,
|
|
12374
12421
|
customAndExistTitle: customAndExistTitle || locale.address.chooseAnotherAddress,
|
|
@@ -13299,7 +13346,7 @@ const InternalCascaderItem = (props, ref) => {
|
|
|
13299
13346
|
return activeIcon;
|
|
13300
13347
|
}
|
|
13301
13348
|
return /* @__PURE__ */ React__default.createElement(
|
|
13302
|
-
x$
|
|
13349
|
+
x$d,
|
|
13303
13350
|
{
|
|
13304
13351
|
className: `${checked ? `${classPrefix2}__icon-check` : ""}`
|
|
13305
13352
|
}
|
|
@@ -13776,7 +13823,7 @@ const defaultProps$Z = {
|
|
|
13776
13823
|
},
|
|
13777
13824
|
options: []
|
|
13778
13825
|
};
|
|
13779
|
-
const classPrefix$
|
|
13826
|
+
const classPrefix$d = "nut-checkboxgroup";
|
|
13780
13827
|
const CheckboxGroup = React__default.forwardRef(
|
|
13781
13828
|
(props, ref) => {
|
|
13782
13829
|
const { children } = { ...defaultProps$Z, ...props };
|
|
@@ -13858,7 +13905,7 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
13858
13905
|
/* @__PURE__ */ React__default.createElement(
|
|
13859
13906
|
"div",
|
|
13860
13907
|
{
|
|
13861
|
-
className: classNames(classPrefix$
|
|
13908
|
+
className: classNames(classPrefix$d, className, {
|
|
13862
13909
|
[`nut-checkboxgroup--${props.direction}`]: props.direction
|
|
13863
13910
|
}),
|
|
13864
13911
|
...rest
|
|
@@ -13880,7 +13927,7 @@ const defaultProps$Y = {
|
|
|
13880
13927
|
onChange: (value) => {
|
|
13881
13928
|
}
|
|
13882
13929
|
};
|
|
13883
|
-
const classPrefix$
|
|
13930
|
+
const classPrefix$c = "nut-checkbox";
|
|
13884
13931
|
const Checkbox = (props) => {
|
|
13885
13932
|
const { children } = {
|
|
13886
13933
|
...defaultProps$Y,
|
|
@@ -13936,28 +13983,28 @@ const Checkbox = (props) => {
|
|
|
13936
13983
|
return React__default.isValidElement(icon) ? icon : /* @__PURE__ */ React__default.createElement(N, { className: color() });
|
|
13937
13984
|
}
|
|
13938
13985
|
if (innerIndeterminate) {
|
|
13939
|
-
return React__default.isValidElement(indeterminateIcon) ? indeterminateIcon : /* @__PURE__ */ React__default.createElement(x$
|
|
13986
|
+
return React__default.isValidElement(indeterminateIcon) ? indeterminateIcon : /* @__PURE__ */ React__default.createElement(x$g, { className: color() });
|
|
13940
13987
|
}
|
|
13941
|
-
return React__default.isValidElement(activeIcon) ? activeIcon : /* @__PURE__ */ React__default.createElement(x$
|
|
13988
|
+
return React__default.isValidElement(activeIcon) ? activeIcon : /* @__PURE__ */ React__default.createElement(x$e, { className: color() });
|
|
13942
13989
|
};
|
|
13943
13990
|
const color = () => {
|
|
13944
13991
|
if (innerDisabled) {
|
|
13945
|
-
return `${classPrefix$
|
|
13992
|
+
return `${classPrefix$c}__icon--disable`;
|
|
13946
13993
|
}
|
|
13947
13994
|
if (innerChecked) {
|
|
13948
13995
|
if (innerIndeterminate) {
|
|
13949
|
-
return `${classPrefix$
|
|
13996
|
+
return `${classPrefix$c}__icon--indeterminate`;
|
|
13950
13997
|
}
|
|
13951
|
-
return `${classPrefix$
|
|
13998
|
+
return `${classPrefix$c}__icon`;
|
|
13952
13999
|
}
|
|
13953
|
-
return `${classPrefix$
|
|
14000
|
+
return `${classPrefix$c}__icon--unchecked`;
|
|
13954
14001
|
};
|
|
13955
14002
|
const renderLabel = () => {
|
|
13956
14003
|
return /* @__PURE__ */ React__default.createElement(
|
|
13957
14004
|
"span",
|
|
13958
14005
|
{
|
|
13959
|
-
className: classNames(`${classPrefix$
|
|
13960
|
-
[`${classPrefix$
|
|
14006
|
+
className: classNames(`${classPrefix$c}__label `, {
|
|
14007
|
+
[`${classPrefix$c}__label--disabled`]: innerDisabled
|
|
13961
14008
|
})
|
|
13962
14009
|
},
|
|
13963
14010
|
children || label
|
|
@@ -13976,8 +14023,8 @@ const Checkbox = (props) => {
|
|
|
13976
14023
|
return /* @__PURE__ */ React__default.createElement(
|
|
13977
14024
|
"div",
|
|
13978
14025
|
{
|
|
13979
|
-
className: classNames(classPrefix$
|
|
13980
|
-
[`${classPrefix$
|
|
14026
|
+
className: classNames(classPrefix$c, className, {
|
|
14027
|
+
[`${classPrefix$c}--reverse`]: labelPosition === "left"
|
|
13981
14028
|
}),
|
|
13982
14029
|
...rest,
|
|
13983
14030
|
onClick: handleClick2
|
|
@@ -14538,7 +14585,7 @@ const DatePicker = (props) => {
|
|
|
14538
14585
|
...props
|
|
14539
14586
|
};
|
|
14540
14587
|
const { locale } = useConfig();
|
|
14541
|
-
const [
|
|
14588
|
+
const [show2, setShow] = useState(false);
|
|
14542
14589
|
const [currentDate, setCurrentDate] = useState(modelValue);
|
|
14543
14590
|
const [defaultValue, setDefaultValue] = useState([]);
|
|
14544
14591
|
const [options2, setListData] = useState([]);
|
|
@@ -14799,7 +14846,7 @@ const DatePicker = (props) => {
|
|
|
14799
14846
|
Picker$1,
|
|
14800
14847
|
{
|
|
14801
14848
|
title,
|
|
14802
|
-
visible:
|
|
14849
|
+
visible: show2,
|
|
14803
14850
|
options: options2,
|
|
14804
14851
|
onClose: onCloseDatePicker,
|
|
14805
14852
|
defaultValue,
|
|
@@ -16401,7 +16448,7 @@ const defaultProps$S = {
|
|
|
16401
16448
|
digits: 0,
|
|
16402
16449
|
async: false
|
|
16403
16450
|
};
|
|
16404
|
-
const classPrefix$
|
|
16451
|
+
const classPrefix$b = `nut-inputnumber`;
|
|
16405
16452
|
const InputNumber = (props) => {
|
|
16406
16453
|
const {
|
|
16407
16454
|
children,
|
|
@@ -16444,8 +16491,8 @@ const InputNumber = (props) => {
|
|
|
16444
16491
|
}, []);
|
|
16445
16492
|
const classes = classNames(
|
|
16446
16493
|
{
|
|
16447
|
-
[`${classPrefix$
|
|
16448
|
-
[`${classPrefix$
|
|
16494
|
+
[`${classPrefix$b}`]: true,
|
|
16495
|
+
[`${classPrefix$b}--disabled`]: disabled
|
|
16449
16496
|
},
|
|
16450
16497
|
className
|
|
16451
16498
|
);
|
|
@@ -16736,7 +16783,7 @@ const Menu = (props) => {
|
|
|
16736
16783
|
})
|
|
16737
16784
|
},
|
|
16738
16785
|
/* @__PURE__ */ React__default.createElement("div", { className: "nut-menu__title-text" }, finallyTitle()),
|
|
16739
|
-
icon || (direction === "up" ? /* @__PURE__ */ React__default.createElement(x$
|
|
16786
|
+
icon || (direction === "up" ? /* @__PURE__ */ React__default.createElement(x$h, { className: "nut-menu__title-icon" }) : /* @__PURE__ */ React__default.createElement(y$9, { className: "nut-menu__title-icon" }))
|
|
16740
16787
|
)
|
|
16741
16788
|
);
|
|
16742
16789
|
}
|
|
@@ -16791,18 +16838,18 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
16791
16838
|
closeOnClickAway,
|
|
16792
16839
|
children,
|
|
16793
16840
|
activeColor,
|
|
16794
|
-
show,
|
|
16841
|
+
show: show2,
|
|
16795
16842
|
parent,
|
|
16796
16843
|
index
|
|
16797
16844
|
} = {
|
|
16798
16845
|
...defaultProps$Q,
|
|
16799
16846
|
...props
|
|
16800
16847
|
};
|
|
16801
|
-
const [_showPopup, setShowPopup] = useState(
|
|
16848
|
+
const [_showPopup, setShowPopup] = useState(show2);
|
|
16802
16849
|
const [_value, setValue] = useState(value);
|
|
16803
16850
|
useEffect(() => {
|
|
16804
|
-
setShowPopup(
|
|
16805
|
-
}, [
|
|
16851
|
+
setShowPopup(show2);
|
|
16852
|
+
}, [show2]);
|
|
16806
16853
|
useEffect(() => {
|
|
16807
16854
|
getParentOffset();
|
|
16808
16855
|
}, [_showPopup]);
|
|
@@ -16919,7 +16966,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
16919
16966
|
}
|
|
16920
16967
|
},
|
|
16921
16968
|
item.value === _value ? /* @__PURE__ */ React__default.createElement("i", null, icon || /* @__PURE__ */ React__default.createElement(
|
|
16922
|
-
x$
|
|
16969
|
+
x$f,
|
|
16923
16970
|
{
|
|
16924
16971
|
color: activeColor,
|
|
16925
16972
|
className: getIconCName(item.value, value)
|
|
@@ -17103,7 +17150,7 @@ const defaultProps$O = {
|
|
|
17103
17150
|
direction: "vertical",
|
|
17104
17151
|
options: []
|
|
17105
17152
|
};
|
|
17106
|
-
const classPrefix$
|
|
17153
|
+
const classPrefix$a = "nut-radiogroup";
|
|
17107
17154
|
const RadioGroup = React__default.forwardRef(
|
|
17108
17155
|
(props, ref) => {
|
|
17109
17156
|
const {
|
|
@@ -17159,8 +17206,8 @@ const RadioGroup = React__default.forwardRef(
|
|
|
17159
17206
|
/* @__PURE__ */ React__default.createElement(
|
|
17160
17207
|
"div",
|
|
17161
17208
|
{
|
|
17162
|
-
className: classNames(classPrefix$
|
|
17163
|
-
[`${classPrefix$
|
|
17209
|
+
className: classNames(classPrefix$a, className, {
|
|
17210
|
+
[`${classPrefix$a}--${props.direction}`]: props.direction
|
|
17164
17211
|
}),
|
|
17165
17212
|
...rest
|
|
17166
17213
|
},
|
|
@@ -17707,15 +17754,15 @@ const defaultProps$K = {
|
|
|
17707
17754
|
disabled: false,
|
|
17708
17755
|
maxLength: 9999,
|
|
17709
17756
|
clearable: true,
|
|
17710
|
-
|
|
17711
|
-
align: "left",
|
|
17712
|
-
readonly: true,
|
|
17757
|
+
readOnly: false,
|
|
17713
17758
|
autoFocus: false,
|
|
17714
|
-
|
|
17715
|
-
|
|
17759
|
+
left: "",
|
|
17760
|
+
right: "",
|
|
17761
|
+
rightIn: "",
|
|
17762
|
+
leftIn: /* @__PURE__ */ React__default.createElement(x$2, { width: "12", height: "12" })
|
|
17716
17763
|
};
|
|
17717
17764
|
const SearchBar = (props) => {
|
|
17718
|
-
const
|
|
17765
|
+
const classPrefix2 = "nut-searchbar";
|
|
17719
17766
|
const { locale } = useConfig();
|
|
17720
17767
|
const searchRef = useRef(null);
|
|
17721
17768
|
const [value, setValue] = useState(() => props.value);
|
|
@@ -17726,32 +17773,22 @@ const SearchBar = (props) => {
|
|
|
17726
17773
|
disabled,
|
|
17727
17774
|
maxLength,
|
|
17728
17775
|
clearable,
|
|
17729
|
-
clearSize,
|
|
17730
|
-
align,
|
|
17731
17776
|
readOnly,
|
|
17732
17777
|
autoFocus,
|
|
17733
|
-
|
|
17734
|
-
|
|
17735
|
-
|
|
17736
|
-
|
|
17737
|
-
leftoutIcon,
|
|
17738
|
-
rightoutIcon,
|
|
17778
|
+
right,
|
|
17779
|
+
left,
|
|
17780
|
+
leftIn,
|
|
17781
|
+
rightIn,
|
|
17739
17782
|
onChange,
|
|
17740
17783
|
onFocus,
|
|
17741
17784
|
onBlur,
|
|
17742
17785
|
onClear,
|
|
17743
|
-
onCancel,
|
|
17744
17786
|
onSearch,
|
|
17745
|
-
onClickInput
|
|
17746
|
-
onClickLeftinIcon,
|
|
17747
|
-
onClickLeftoutIcon,
|
|
17748
|
-
onClickRightinIcon,
|
|
17749
|
-
onClickRightoutIcon
|
|
17787
|
+
onClickInput
|
|
17750
17788
|
} = {
|
|
17751
17789
|
...defaultProps$K,
|
|
17752
17790
|
...props
|
|
17753
17791
|
};
|
|
17754
|
-
const alignClass = `${align}`;
|
|
17755
17792
|
const forceFocus = () => {
|
|
17756
17793
|
const searchSelf = searchRef.current;
|
|
17757
17794
|
searchSelf && searchSelf.focus();
|
|
@@ -17781,7 +17818,7 @@ const SearchBar = (props) => {
|
|
|
17781
17818
|
return /* @__PURE__ */ React__default.createElement(
|
|
17782
17819
|
"input",
|
|
17783
17820
|
{
|
|
17784
|
-
className: `${
|
|
17821
|
+
className: `${classPrefix2}__input ${shape === "round" ? `${classPrefix2}__round` : ""} ${clearable ? `${classPrefix2}__input-clear` : ""}`,
|
|
17785
17822
|
ref: searchRef,
|
|
17786
17823
|
style: { ...props.style },
|
|
17787
17824
|
value: value || "",
|
|
@@ -17800,76 +17837,34 @@ const SearchBar = (props) => {
|
|
|
17800
17837
|
const clickInput = (e) => {
|
|
17801
17838
|
onClickInput && onClickInput(e);
|
|
17802
17839
|
};
|
|
17803
|
-
const
|
|
17804
|
-
if (!
|
|
17840
|
+
const renderLeftIn = () => {
|
|
17841
|
+
if (!leftIn)
|
|
17805
17842
|
return null;
|
|
17806
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
17807
|
-
"div",
|
|
17808
|
-
{
|
|
17809
|
-
className: `${searchbarBem("leftin-icon")} ${searchbarBem("icon")}`,
|
|
17810
|
-
onClick: (e) => clickLeftIcon("in-left", e)
|
|
17811
|
-
},
|
|
17812
|
-
leftinIcon
|
|
17813
|
-
);
|
|
17843
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__leftin ${classPrefix2}__icon` }, leftIn);
|
|
17814
17844
|
};
|
|
17815
|
-
const
|
|
17816
|
-
if (!
|
|
17845
|
+
const renderLeft = () => {
|
|
17846
|
+
if (!left)
|
|
17817
17847
|
return null;
|
|
17818
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
17819
|
-
"div",
|
|
17820
|
-
{
|
|
17821
|
-
className: `${searchbarBem("leftout-icon")}`,
|
|
17822
|
-
onClick: (e) => clickLeftIcon("out-left", e)
|
|
17823
|
-
},
|
|
17824
|
-
leftoutIcon
|
|
17825
|
-
);
|
|
17848
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__left` }, left);
|
|
17826
17849
|
};
|
|
17827
|
-
const
|
|
17828
|
-
if (
|
|
17829
|
-
onClickLeftinIcon && onClickLeftinIcon(value, event);
|
|
17830
|
-
} else {
|
|
17831
|
-
onClickLeftoutIcon && onClickLeftoutIcon(value, event);
|
|
17832
|
-
}
|
|
17833
|
-
};
|
|
17834
|
-
const renderRightinIcon = () => {
|
|
17835
|
-
if (!rightinIcon)
|
|
17850
|
+
const renderRightIn = () => {
|
|
17851
|
+
if (!rightIn)
|
|
17836
17852
|
return null;
|
|
17837
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
17838
|
-
"div",
|
|
17839
|
-
{
|
|
17840
|
-
className: `${searchbarBem("rightin-icon")} ${searchbarBem("icon")}`,
|
|
17841
|
-
onClick: (e) => clickRightIcon("in-right", e)
|
|
17842
|
-
},
|
|
17843
|
-
rightinIcon
|
|
17844
|
-
);
|
|
17853
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__rightin ${classPrefix2}__icon` }, rightIn);
|
|
17845
17854
|
};
|
|
17846
|
-
const
|
|
17847
|
-
if (!
|
|
17855
|
+
const renderRight = () => {
|
|
17856
|
+
if (!right)
|
|
17848
17857
|
return null;
|
|
17849
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
17850
|
-
"div",
|
|
17851
|
-
{
|
|
17852
|
-
className: `${searchbarBem("rightout-icon")}`,
|
|
17853
|
-
onClick: (e) => clickRightIcon("out-right", e)
|
|
17854
|
-
},
|
|
17855
|
-
rightoutIcon
|
|
17856
|
-
);
|
|
17857
|
-
};
|
|
17858
|
-
const clickRightIcon = (flag, event) => {
|
|
17859
|
-
if (flag === "in-left") {
|
|
17860
|
-
onClickRightinIcon && onClickRightinIcon(value, event);
|
|
17861
|
-
} else {
|
|
17862
|
-
onClickRightoutIcon && onClickRightoutIcon(value, event);
|
|
17863
|
-
}
|
|
17858
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__right` }, right);
|
|
17864
17859
|
};
|
|
17865
17860
|
const handleClear = () => {
|
|
17866
17861
|
return /* @__PURE__ */ React__default.createElement(
|
|
17867
17862
|
"div",
|
|
17868
17863
|
{
|
|
17869
|
-
className: `${
|
|
17864
|
+
className: `${classPrefix2}__clear ${rightIn ? "pos-right" : ""}`,
|
|
17870
17865
|
onClick: (e) => clearaVal(e)
|
|
17871
17866
|
},
|
|
17872
|
-
/* @__PURE__ */ React__default.createElement(x$
|
|
17867
|
+
/* @__PURE__ */ React__default.createElement(x$c, { color: "#555", width: 12, height: 12 })
|
|
17873
17868
|
);
|
|
17874
17869
|
};
|
|
17875
17870
|
const clearaVal = (event) => {
|
|
@@ -17880,12 +17875,6 @@ const SearchBar = (props) => {
|
|
|
17880
17875
|
onClear && onClear(event);
|
|
17881
17876
|
forceFocus();
|
|
17882
17877
|
};
|
|
17883
|
-
const renderRightLabel = () => {
|
|
17884
|
-
if (actionText) {
|
|
17885
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: searchbarBem("action-text"), onClick: search }, actionText);
|
|
17886
|
-
}
|
|
17887
|
-
return null;
|
|
17888
|
-
};
|
|
17889
17878
|
const onKeypress = (e) => {
|
|
17890
17879
|
if (e.key === "Enter") {
|
|
17891
17880
|
const event = e.nativeEvent;
|
|
@@ -17895,68 +17884,28 @@ const SearchBar = (props) => {
|
|
|
17895
17884
|
onSearch && onSearch(value);
|
|
17896
17885
|
}
|
|
17897
17886
|
};
|
|
17898
|
-
const search = () => {
|
|
17899
|
-
onSearch && onSearch(value);
|
|
17900
|
-
};
|
|
17901
|
-
const renderLabel = () => {
|
|
17902
|
-
if (label) {
|
|
17903
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: searchbarBem("label") }, label);
|
|
17904
|
-
}
|
|
17905
|
-
return null;
|
|
17906
|
-
};
|
|
17907
17887
|
return /* @__PURE__ */ React__default.createElement(
|
|
17908
17888
|
"div",
|
|
17909
17889
|
{
|
|
17910
|
-
className: `${
|
|
17911
|
-
style: { ...props.style
|
|
17890
|
+
className: `${classPrefix2} ${disabled ? `${classPrefix2}__disabled` : ""} ${className || ""}`,
|
|
17891
|
+
style: { ...props.style }
|
|
17912
17892
|
},
|
|
17913
|
-
|
|
17914
|
-
|
|
17915
|
-
|
|
17916
|
-
"div",
|
|
17917
|
-
{
|
|
17918
|
-
className: `${searchbarBem("content")}`,
|
|
17919
|
-
style: { background: props.inputBackground }
|
|
17920
|
-
},
|
|
17921
|
-
renderLeftinIcon(),
|
|
17922
|
-
renderField(),
|
|
17923
|
-
renderRightinIcon(),
|
|
17924
|
-
clearable && value && handleClear()
|
|
17925
|
-
),
|
|
17926
|
-
renderRightoutIcon(),
|
|
17927
|
-
renderRightLabel()
|
|
17893
|
+
renderLeft(),
|
|
17894
|
+
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__content` }, renderLeftIn(), renderField(), renderRightIn(), clearable && value && handleClear()),
|
|
17895
|
+
renderRight()
|
|
17928
17896
|
);
|
|
17929
17897
|
};
|
|
17930
17898
|
SearchBar.defaultProps = defaultProps$K;
|
|
17931
17899
|
SearchBar.displayName = "NutSearchBar";
|
|
17932
17900
|
const defaultProps$J = {
|
|
17933
17901
|
...ComponentDefaults,
|
|
17934
|
-
|
|
17935
|
-
description: "",
|
|
17936
|
-
tips: "",
|
|
17937
|
-
tipsIcon: null,
|
|
17938
|
-
iconSize: 11,
|
|
17902
|
+
value: "",
|
|
17939
17903
|
visible: false,
|
|
17940
|
-
|
|
17941
|
-
|
|
17942
|
-
noButton: true,
|
|
17943
|
-
closeOnClickOverlay: true,
|
|
17904
|
+
plain: false,
|
|
17905
|
+
hideFooter: true,
|
|
17944
17906
|
length: 6,
|
|
17945
17907
|
// 1~6
|
|
17946
|
-
|
|
17947
|
-
autoFocus: false,
|
|
17948
|
-
onChange: (value) => {
|
|
17949
|
-
},
|
|
17950
|
-
onOk: (value) => {
|
|
17951
|
-
},
|
|
17952
|
-
onCancel: () => {
|
|
17953
|
-
},
|
|
17954
|
-
onClose: () => {
|
|
17955
|
-
},
|
|
17956
|
-
onTips: () => {
|
|
17957
|
-
},
|
|
17958
|
-
onComplete: (value) => {
|
|
17959
|
-
}
|
|
17908
|
+
autoFocus: false
|
|
17960
17909
|
};
|
|
17961
17910
|
const ShortPassword = (props) => {
|
|
17962
17911
|
const { locale } = useConfig();
|
|
@@ -17964,86 +17913,54 @@ const ShortPassword = (props) => {
|
|
|
17964
17913
|
title,
|
|
17965
17914
|
description,
|
|
17966
17915
|
tips,
|
|
17967
|
-
tipsIcon,
|
|
17968
|
-
iconSize,
|
|
17969
17916
|
visible,
|
|
17970
|
-
|
|
17971
|
-
|
|
17972
|
-
|
|
17973
|
-
closeOnClickOverlay,
|
|
17917
|
+
value,
|
|
17918
|
+
error,
|
|
17919
|
+
hideFooter,
|
|
17974
17920
|
length,
|
|
17921
|
+
plain,
|
|
17975
17922
|
style,
|
|
17976
17923
|
className,
|
|
17924
|
+
closeable,
|
|
17925
|
+
autoFocus,
|
|
17926
|
+
onFocus,
|
|
17977
17927
|
onChange,
|
|
17978
|
-
|
|
17928
|
+
onConfirm,
|
|
17979
17929
|
onTips,
|
|
17980
17930
|
onCancel,
|
|
17981
17931
|
onClose,
|
|
17982
17932
|
onComplete,
|
|
17983
|
-
|
|
17984
|
-
|
|
17985
|
-
|
|
17986
|
-
|
|
17987
|
-
|
|
17988
|
-
|
|
17989
|
-
return Math.min(Math.max(4, val), 6);
|
|
17933
|
+
onClickOverlay,
|
|
17934
|
+
onClickCloseIcon,
|
|
17935
|
+
...rest
|
|
17936
|
+
} = {
|
|
17937
|
+
...defaultProps$J,
|
|
17938
|
+
...props
|
|
17990
17939
|
};
|
|
17991
|
-
const
|
|
17992
|
-
const
|
|
17993
|
-
|
|
17940
|
+
const classPrefix2 = "nut-shortpassword";
|
|
17941
|
+
const comLen = useMemo(() => {
|
|
17942
|
+
return Math.min(Math.max(4, length || 4), 6);
|
|
17943
|
+
}, [length]);
|
|
17944
|
+
const format2 = (val) => {
|
|
17945
|
+
return val.slice(0, comLen);
|
|
17946
|
+
};
|
|
17947
|
+
const [inputValue, setInputValue] = usePropsValue({ value, onChange });
|
|
17994
17948
|
useEffect(() => {
|
|
17995
|
-
|
|
17949
|
+
if (visible && autoFocus) {
|
|
17950
|
+
onFocus && onFocus();
|
|
17951
|
+
}
|
|
17996
17952
|
}, [visible]);
|
|
17997
17953
|
useEffect(() => {
|
|
17998
|
-
|
|
17999
|
-
|
|
17954
|
+
const val = format2(value);
|
|
17955
|
+
if (val.length >= comLen) {
|
|
17956
|
+
onComplete && onComplete(val);
|
|
18000
17957
|
}
|
|
18001
|
-
|
|
18002
|
-
|
|
18003
|
-
let inputValue2 = e.target.value;
|
|
18004
|
-
if (String(inputValue2).length > comLen) {
|
|
18005
|
-
inputValue2 = inputValue2.slice(0, comLen);
|
|
18006
|
-
}
|
|
18007
|
-
setInputValue(inputValue2);
|
|
18008
|
-
if (String(inputValue2).length === comLen) {
|
|
18009
|
-
onComplete && onComplete(inputValue2);
|
|
18010
|
-
}
|
|
18011
|
-
onChange && onChange(inputValue2);
|
|
18012
|
-
};
|
|
18013
|
-
const systemStyle = () => {
|
|
18014
|
-
const u = navigator.userAgent;
|
|
18015
|
-
const isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1;
|
|
18016
|
-
const isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
|
18017
|
-
let style2 = {};
|
|
18018
|
-
if (isIOS) {
|
|
18019
|
-
style2 = {
|
|
18020
|
-
paddingRight: "1200px"
|
|
18021
|
-
};
|
|
18022
|
-
}
|
|
18023
|
-
if (isAndroid) {
|
|
18024
|
-
style2 = {
|
|
18025
|
-
opacity: 0,
|
|
18026
|
-
zIndex: 10
|
|
18027
|
-
};
|
|
18028
|
-
}
|
|
18029
|
-
return style2;
|
|
18030
|
-
};
|
|
18031
|
-
const focus = () => {
|
|
18032
|
-
if (textInput.current) {
|
|
18033
|
-
textInput.current.focus();
|
|
18034
|
-
}
|
|
18035
|
-
};
|
|
17958
|
+
setInputValue(format2(value));
|
|
17959
|
+
}, [value]);
|
|
18036
17960
|
const sure = () => {
|
|
18037
|
-
|
|
18038
|
-
};
|
|
18039
|
-
const renderIcon = (size = "11px") => {
|
|
18040
|
-
return React__default.isValidElement(tipsIcon) ? React__default.cloneElement(tipsIcon, {
|
|
18041
|
-
...tipsIcon.props,
|
|
18042
|
-
width: size,
|
|
18043
|
-
height: size
|
|
18044
|
-
}) : /* @__PURE__ */ React__default.createElement(x, { width: size, height: size });
|
|
17961
|
+
onConfirm && onConfirm(inputValue);
|
|
18045
17962
|
};
|
|
18046
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
17963
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
18047
17964
|
Popup,
|
|
18048
17965
|
{
|
|
18049
17966
|
style: {
|
|
@@ -18051,28 +17968,28 @@ const ShortPassword = (props) => {
|
|
|
18051
17968
|
borderRadius: "12px",
|
|
18052
17969
|
textAlign: "center"
|
|
18053
17970
|
},
|
|
18054
|
-
visible
|
|
17971
|
+
visible,
|
|
18055
17972
|
closeable: true,
|
|
18056
|
-
"close-on-click-overlay": closeOnClickOverlay,
|
|
18057
17973
|
onClickOverlay: onClose,
|
|
18058
|
-
onClickCloseIcon: onClose
|
|
17974
|
+
onClickCloseIcon: onClose,
|
|
17975
|
+
...rest
|
|
18059
17976
|
},
|
|
18060
|
-
/* @__PURE__ */ React__default.createElement("div", { className:
|
|
18061
|
-
"
|
|
17977
|
+
/* @__PURE__ */ React__default.createElement("div", { className: classNames(className, classPrefix2), style }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__title` }, title || locale.shortpassword.title), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__description` }, description || locale.shortpassword.description), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__input`, onClick: onFocus }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__input-site` }), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__input-fake` }, [...new Array(comLen).keys()].map((item, index) => {
|
|
17978
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__input-fake__li`, key: index }, inputValue.length > index && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, plain ? inputValue[index] : /* @__PURE__ */ React__default.createElement(
|
|
17979
|
+
"div",
|
|
17980
|
+
{
|
|
17981
|
+
className: `${classPrefix2}__input-fake__li__icon`
|
|
17982
|
+
}
|
|
17983
|
+
)));
|
|
17984
|
+
}))), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__message` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__message__error` }, error), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__message__forget`, onClick: onTips }, tips || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(x, { width: 11, height: 11, style: { marginRight: "3px" } }), locale.shortpassword.tips))), !hideFooter && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__footer` }, /* @__PURE__ */ React__default.createElement(
|
|
17985
|
+
"div",
|
|
18062
17986
|
{
|
|
18063
|
-
|
|
18064
|
-
|
|
18065
|
-
|
|
18066
|
-
|
|
18067
|
-
|
|
18068
|
-
|
|
18069
|
-
autoFocus,
|
|
18070
|
-
onChange: (e) => changeValue(e)
|
|
18071
|
-
}
|
|
18072
|
-
), /* @__PURE__ */ React__default.createElement("div", { className: b("input-site") }), /* @__PURE__ */ React__default.createElement("div", { className: b("input-fake"), onClick: () => focus() }, [...new Array(comLen).keys()].map((item, index) => {
|
|
18073
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: b("input-fake__li"), key: index }, String(inputValue).length > index ? /* @__PURE__ */ React__default.createElement("div", { className: b("input-fake__li__icon") }) : null);
|
|
18074
|
-
}))), /* @__PURE__ */ React__default.createElement("div", { className: b("message") }, /* @__PURE__ */ React__default.createElement("div", { className: b("message__error") }, errorMsg2), tips || locale.shortpassword.tips ? /* @__PURE__ */ React__default.createElement("div", { className: b("message__forget") }, renderIcon(iconSize), /* @__PURE__ */ React__default.createElement("div", { className: b("message__forget-tips"), onClick: onTips }, tips || locale.shortpassword.tips)) : null), !noButton ? /* @__PURE__ */ React__default.createElement("div", { className: b("footer") }, /* @__PURE__ */ React__default.createElement("div", { className: b("footer__cancel"), onClick: onCancel }, locale.cancel), /* @__PURE__ */ React__default.createElement("div", { className: b("footer__sure"), onClick: () => sure() }, locale.confirm)) : null)
|
|
18075
|
-
));
|
|
17987
|
+
className: `${classPrefix2}__footer__cancel`,
|
|
17988
|
+
onClick: onCancel
|
|
17989
|
+
},
|
|
17990
|
+
locale.cancel
|
|
17991
|
+
), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__footer__sure`, onClick: sure }, locale.confirm)))
|
|
17992
|
+
);
|
|
18076
17993
|
};
|
|
18077
17994
|
ShortPassword.defaultProps = defaultProps$J;
|
|
18078
17995
|
ShortPassword.displayName = "NutShortPassword";
|
|
@@ -18903,13 +18820,13 @@ const InternalUploader = (props, ref) => {
|
|
|
18903
18820
|
key: item.uid
|
|
18904
18821
|
},
|
|
18905
18822
|
previewType === "picture" && !children && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__preview-img" }, deletable && /* @__PURE__ */ React__default.createElement(
|
|
18906
|
-
x$
|
|
18823
|
+
x$9,
|
|
18907
18824
|
{
|
|
18908
18825
|
color: "rgba(0,0,0,0.6)",
|
|
18909
18826
|
className: "close",
|
|
18910
18827
|
onClick: () => onDeleteItem(item, index)
|
|
18911
18828
|
}
|
|
18912
|
-
), item.status === "ready" ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__preview__progress" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__preview__progress__msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__preview__progress" }, item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ React__default.createElement(x$
|
|
18829
|
+
), item.status === "ready" ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__preview__progress" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__preview__progress__msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__preview__progress" }, item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ React__default.createElement(x$9, { color: "#fff" }) : item.loadingIcon || /* @__PURE__ */ React__default.createElement(
|
|
18913
18830
|
k$3,
|
|
18914
18831
|
{
|
|
18915
18832
|
className: "nut-icon-loading",
|
|
@@ -19003,50 +18920,40 @@ const Uploader = React__default.forwardRef(InternalUploader);
|
|
|
19003
18920
|
Uploader.defaultProps = defaultProps$E;
|
|
19004
18921
|
Uploader.displayName = "NutUploader";
|
|
19005
18922
|
const defaultProps$D = {
|
|
19006
|
-
|
|
19007
|
-
|
|
19008
|
-
optionSubTag: "subname",
|
|
19009
|
-
chooseTagValue: "",
|
|
18923
|
+
...ComponentDefaults,
|
|
18924
|
+
visible: false,
|
|
19010
18925
|
title: "",
|
|
19011
|
-
color: "#ee0a24",
|
|
19012
18926
|
description: "",
|
|
19013
|
-
|
|
18927
|
+
options: [],
|
|
18928
|
+
optionKey: { name: "name", description: "description" },
|
|
18929
|
+
cancelText: "",
|
|
19014
18930
|
onCancel: () => {
|
|
19015
18931
|
},
|
|
19016
|
-
|
|
19017
|
-
}
|
|
19018
|
-
visible: false,
|
|
19019
|
-
className: "",
|
|
19020
|
-
style: {}
|
|
18932
|
+
onSelect: () => {
|
|
18933
|
+
}
|
|
19021
18934
|
};
|
|
19022
18935
|
const ActionSheet = (props) => {
|
|
19023
18936
|
const {
|
|
19024
18937
|
children,
|
|
19025
18938
|
cancelText,
|
|
19026
|
-
|
|
19027
|
-
optionSubTag,
|
|
19028
|
-
chooseTagValue,
|
|
18939
|
+
optionKey,
|
|
19029
18940
|
title,
|
|
19030
|
-
color,
|
|
19031
18941
|
description,
|
|
19032
|
-
|
|
18942
|
+
options: options2,
|
|
19033
18943
|
onCancel,
|
|
19034
|
-
|
|
18944
|
+
onSelect,
|
|
19035
18945
|
visible,
|
|
19036
18946
|
className,
|
|
19037
18947
|
style,
|
|
19038
18948
|
...rest
|
|
19039
18949
|
} = { ...defaultProps$D, ...props };
|
|
19040
|
-
const
|
|
19041
|
-
const isHighlight = (item) => {
|
|
19042
|
-
return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "$dark1";
|
|
19043
|
-
};
|
|
18950
|
+
const classPrefix2 = "nut-actionsheet";
|
|
19044
18951
|
const cancelActionSheet = () => {
|
|
19045
18952
|
onCancel && onCancel();
|
|
19046
18953
|
};
|
|
19047
18954
|
const chooseItem = (item, index) => {
|
|
19048
18955
|
if (!item.disable) {
|
|
19049
|
-
|
|
18956
|
+
onSelect && onSelect(item, index);
|
|
19050
18957
|
}
|
|
19051
18958
|
};
|
|
19052
18959
|
return /* @__PURE__ */ React__default.createElement(
|
|
@@ -19059,19 +18966,25 @@ const ActionSheet = (props) => {
|
|
|
19059
18966
|
onCancel && onCancel();
|
|
19060
18967
|
}
|
|
19061
18968
|
},
|
|
19062
|
-
/* @__PURE__ */ React__default.createElement("div", { className: `${
|
|
18969
|
+
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, title && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__title` }, title), description && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__description` }, description), options2.length ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__list` }, options2.map((item, index) => {
|
|
19063
18970
|
return /* @__PURE__ */ React__default.createElement(
|
|
19064
18971
|
"div",
|
|
19065
18972
|
{
|
|
19066
|
-
className: `${
|
|
19067
|
-
style: { color: isHighlight(item) },
|
|
18973
|
+
className: `${classPrefix2}__item ${item.disable ? "disabled" : ""} ${item.danger ? "danger" : ""}`,
|
|
19068
18974
|
key: index,
|
|
19069
18975
|
onClick: () => chooseItem(item, index)
|
|
19070
18976
|
},
|
|
19071
|
-
item[
|
|
19072
|
-
/* @__PURE__ */ React__default.createElement("div", { className:
|
|
18977
|
+
item[optionKey.name],
|
|
18978
|
+
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__item-description` }, item[optionKey.description])
|
|
19073
18979
|
);
|
|
19074
|
-
})) : children, cancelText && /* @__PURE__ */ React__default.createElement(
|
|
18980
|
+
})) : children, cancelText && /* @__PURE__ */ React__default.createElement(
|
|
18981
|
+
"div",
|
|
18982
|
+
{
|
|
18983
|
+
className: `${classPrefix2}__cancel`,
|
|
18984
|
+
onClick: () => cancelActionSheet()
|
|
18985
|
+
},
|
|
18986
|
+
cancelText
|
|
18987
|
+
))
|
|
19075
18988
|
);
|
|
19076
18989
|
};
|
|
19077
18990
|
ActionSheet.defaultProps = defaultProps$D;
|
|
@@ -19497,7 +19410,7 @@ const defaultProps$A = {
|
|
|
19497
19410
|
imageSize: "",
|
|
19498
19411
|
status: "empty"
|
|
19499
19412
|
};
|
|
19500
|
-
const classPrefix$
|
|
19413
|
+
const classPrefix$9 = `nut-empty`;
|
|
19501
19414
|
const Empty = (props) => {
|
|
19502
19415
|
const { locale } = useConfig();
|
|
19503
19416
|
const {
|
|
@@ -19532,7 +19445,7 @@ const Empty = (props) => {
|
|
|
19532
19445
|
};
|
|
19533
19446
|
});
|
|
19534
19447
|
}, [imageSize]);
|
|
19535
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
19448
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$9} ${className}`, ...rest }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$9}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$9}__description` }, description || locale.noData) : description, children));
|
|
19536
19449
|
};
|
|
19537
19450
|
Empty.defaultProps = defaultProps$A;
|
|
19538
19451
|
Empty.displayName = "NutEmpty";
|
|
@@ -20052,7 +19965,7 @@ const NoticeBar = (props) => {
|
|
|
20052
19965
|
},
|
|
20053
19966
|
children,
|
|
20054
19967
|
content
|
|
20055
|
-
)), closeable || rightIcon ? /* @__PURE__ */ React__default.createElement("div", { className: "right-icon", onClick: onClickIcon }, rightIcon || /* @__PURE__ */ React__default.createElement(x$
|
|
19968
|
+
)), closeable || rightIcon ? /* @__PURE__ */ React__default.createElement("div", { className: "right-icon", onClick: onClickIcon }, rightIcon || /* @__PURE__ */ React__default.createElement(x$b, { width: 12, height: 12 })) : null) : null, showNoticeBar && scrollList.current.length > 0 && isVertical ? /* @__PURE__ */ React__default.createElement(
|
|
20056
19969
|
"div",
|
|
20057
19970
|
{
|
|
20058
19971
|
className: "nut-noticebar-vertical",
|
|
@@ -20099,13 +20012,13 @@ const NoticeBar = (props) => {
|
|
|
20099
20012
|
handleClickIcon(e);
|
|
20100
20013
|
}
|
|
20101
20014
|
},
|
|
20102
|
-
rightIcon || (closeable ? /* @__PURE__ */ React__default.createElement(x$
|
|
20015
|
+
rightIcon || (closeable ? /* @__PURE__ */ React__default.createElement(x$b, { width: 12, height: 12 }) : null)
|
|
20103
20016
|
)
|
|
20104
20017
|
) : null);
|
|
20105
20018
|
};
|
|
20106
20019
|
NoticeBar.defaultProps = defaultProps$y;
|
|
20107
20020
|
NoticeBar.displayName = "NutNoticeBar";
|
|
20108
|
-
const classPrefix$
|
|
20021
|
+
const classPrefix$8 = "nut-notify";
|
|
20109
20022
|
let Notification$1 = (_a = class extends React.PureComponent {
|
|
20110
20023
|
constructor(props) {
|
|
20111
20024
|
super(props);
|
|
@@ -20154,17 +20067,17 @@ let Notification$1 = (_a = class extends React.PureComponent {
|
|
|
20154
20067
|
}
|
|
20155
20068
|
render() {
|
|
20156
20069
|
const { style, message, type: type4, className, position } = this.props;
|
|
20157
|
-
const { show } = this.state;
|
|
20070
|
+
const { show: show2 } = this.state;
|
|
20158
20071
|
const classes = classNames({
|
|
20159
|
-
[`${classPrefix$
|
|
20160
|
-
[`${classPrefix$
|
|
20161
|
-
[`${classPrefix$
|
|
20162
|
-
[`${classPrefix$
|
|
20072
|
+
[`${classPrefix$8}--popup-top`]: position === "top",
|
|
20073
|
+
[`${classPrefix$8}--popup-bottom`]: position === "bottom",
|
|
20074
|
+
[`${classPrefix$8}`]: true,
|
|
20075
|
+
[`${classPrefix$8}--${type4}`]: true
|
|
20163
20076
|
});
|
|
20164
20077
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
20165
20078
|
CSSTransition$1,
|
|
20166
20079
|
{
|
|
20167
|
-
in:
|
|
20080
|
+
in: show2,
|
|
20168
20081
|
timeout: 300,
|
|
20169
20082
|
classNames: "fade",
|
|
20170
20083
|
unmountOnExit: true,
|
|
@@ -20639,7 +20552,7 @@ const defaultProps$v = {
|
|
|
20639
20552
|
src: "",
|
|
20640
20553
|
alt: ""
|
|
20641
20554
|
};
|
|
20642
|
-
const classPrefix$
|
|
20555
|
+
const classPrefix$7 = `nut-avatar`;
|
|
20643
20556
|
const Avatar = (props) => {
|
|
20644
20557
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
20645
20558
|
const {
|
|
@@ -20671,7 +20584,7 @@ const Avatar = (props) => {
|
|
|
20671
20584
|
[`nut-avatar-${((_a2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a2.size) || size || "normal"}`]: true,
|
|
20672
20585
|
[`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
|
|
20673
20586
|
});
|
|
20674
|
-
const cls = classNames(classPrefix$
|
|
20587
|
+
const cls = classNames(classPrefix$7, classes, className);
|
|
20675
20588
|
const styles = {
|
|
20676
20589
|
width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
20677
20590
|
height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
@@ -20987,6 +20900,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
20987
20900
|
});
|
|
20988
20901
|
Swipe.defaultProps = defaultProps$t;
|
|
20989
20902
|
Swipe.displayName = "NutSwipe";
|
|
20903
|
+
const classPrefix$6 = "nut-toast";
|
|
20990
20904
|
class Notification extends React.PureComponent {
|
|
20991
20905
|
constructor(props) {
|
|
20992
20906
|
super(props);
|
|
@@ -21016,11 +20930,33 @@ class Notification extends React.PureComponent {
|
|
|
21016
20930
|
}
|
|
21017
20931
|
}
|
|
21018
20932
|
clickCover() {
|
|
21019
|
-
const {
|
|
21020
|
-
if (
|
|
20933
|
+
const { closeOnOverlayClick } = this.props;
|
|
20934
|
+
if (closeOnOverlayClick) {
|
|
21021
20935
|
this.close();
|
|
21022
20936
|
}
|
|
21023
20937
|
}
|
|
20938
|
+
renderIcon() {
|
|
20939
|
+
const { icon } = this.props;
|
|
20940
|
+
if (typeof icon === "string") {
|
|
20941
|
+
let iconNode = null;
|
|
20942
|
+
switch (icon) {
|
|
20943
|
+
case "success":
|
|
20944
|
+
iconNode = /* @__PURE__ */ React.createElement(x$f, null);
|
|
20945
|
+
break;
|
|
20946
|
+
case "loading":
|
|
20947
|
+
iconNode = /* @__PURE__ */ React.createElement(k$3, { className: "nut-icon-loading" });
|
|
20948
|
+
break;
|
|
20949
|
+
case "fail":
|
|
20950
|
+
iconNode = /* @__PURE__ */ React.createElement(x$9, null);
|
|
20951
|
+
break;
|
|
20952
|
+
case "warn":
|
|
20953
|
+
iconNode = /* @__PURE__ */ React.createElement(x$8, null);
|
|
20954
|
+
break;
|
|
20955
|
+
}
|
|
20956
|
+
return /* @__PURE__ */ React.createElement("p", { className: `${classPrefix$6}__icon-wrapper` }, iconNode);
|
|
20957
|
+
}
|
|
20958
|
+
return icon;
|
|
20959
|
+
}
|
|
21024
20960
|
componentDidMount() {
|
|
21025
20961
|
this.startCloseTimer();
|
|
21026
20962
|
}
|
|
@@ -21030,56 +20966,43 @@ class Notification extends React.PureComponent {
|
|
|
21030
20966
|
render() {
|
|
21031
20967
|
const {
|
|
21032
20968
|
id,
|
|
21033
|
-
style,
|
|
21034
20969
|
icon,
|
|
21035
20970
|
title,
|
|
21036
|
-
|
|
21037
|
-
|
|
21038
|
-
center,
|
|
21039
|
-
bgColor,
|
|
21040
|
-
coverColor,
|
|
21041
|
-
textAlignCenter,
|
|
20971
|
+
content,
|
|
20972
|
+
position,
|
|
21042
20973
|
size,
|
|
21043
|
-
|
|
21044
|
-
|
|
21045
|
-
|
|
20974
|
+
closeOnOverlayClick,
|
|
20975
|
+
style,
|
|
20976
|
+
className,
|
|
20977
|
+
contentClassName,
|
|
20978
|
+
contentStyle
|
|
21046
20979
|
} = this.props;
|
|
21047
|
-
const toastBem = cn("toast");
|
|
21048
20980
|
const classes = classNames({
|
|
21049
|
-
"nut-toast-center": center,
|
|
21050
20981
|
"nut-toast-has-icon": icon,
|
|
21051
|
-
"nut-toast-cover": cover,
|
|
21052
|
-
"nut-toast-loading": type4 === "loading",
|
|
21053
|
-
[`${customClass}`]: true,
|
|
21054
20982
|
[`nut-toast-${size}`]: true
|
|
21055
20983
|
});
|
|
21056
20984
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
21057
|
-
|
|
20985
|
+
Overlay,
|
|
21058
20986
|
{
|
|
21059
|
-
|
|
21060
|
-
|
|
21061
|
-
|
|
21062
|
-
bottom: center ? "auto" : `${bottom}`,
|
|
21063
|
-
backgroundColor: cover ? coverColor : "",
|
|
21064
|
-
...style
|
|
21065
|
-
},
|
|
20987
|
+
visible: true,
|
|
20988
|
+
style,
|
|
20989
|
+
className: `${classPrefix$6}__overlay-default ${className}`,
|
|
21066
20990
|
onClick: () => {
|
|
20991
|
+
console.log("onclick");
|
|
21067
20992
|
this.clickCover();
|
|
21068
|
-
}
|
|
20993
|
+
},
|
|
20994
|
+
closeOnOverlayClick
|
|
21069
20995
|
},
|
|
21070
|
-
/* @__PURE__ */ React.createElement(
|
|
20996
|
+
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix$6} ${classes}`, id: `toast-${id}` }, /* @__PURE__ */ React.createElement(
|
|
21071
20997
|
"div",
|
|
21072
20998
|
{
|
|
21073
|
-
className:
|
|
21074
|
-
style:
|
|
21075
|
-
textAlign: textAlignCenter ? "center" : "left",
|
|
21076
|
-
backgroundColor: bgColor
|
|
21077
|
-
}
|
|
20999
|
+
className: `${classPrefix$6}__inner ${classPrefix$6}-${position} ${contentClassName}`,
|
|
21000
|
+
style: contentStyle
|
|
21078
21001
|
},
|
|
21079
|
-
|
|
21080
|
-
title ? /* @__PURE__ */ React.createElement("div", { className:
|
|
21081
|
-
/* @__PURE__ */ React.createElement("span", { className:
|
|
21082
|
-
)
|
|
21002
|
+
this.renderIcon(),
|
|
21003
|
+
title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$6}-title` }, title) : null,
|
|
21004
|
+
/* @__PURE__ */ React.createElement("span", { className: `${classPrefix$6}-text` }, content)
|
|
21005
|
+
))
|
|
21083
21006
|
));
|
|
21084
21007
|
}
|
|
21085
21008
|
}
|
|
@@ -21108,36 +21031,20 @@ Notification.newInstance = (properties, callback) => {
|
|
|
21108
21031
|
};
|
|
21109
21032
|
let messageInstance = null;
|
|
21110
21033
|
const options = {
|
|
21111
|
-
|
|
21034
|
+
...ComponentDefaults,
|
|
21112
21035
|
id: "",
|
|
21113
|
-
|
|
21114
|
-
duration: 1.5,
|
|
21036
|
+
duration: 2,
|
|
21115
21037
|
// 时长,duration为0则一直展示
|
|
21116
|
-
|
|
21117
|
-
// toast是否居中展示
|
|
21118
|
-
type: "text",
|
|
21038
|
+
position: "center",
|
|
21119
21039
|
title: "",
|
|
21120
|
-
customClass: "",
|
|
21121
|
-
// 自定义样式名
|
|
21122
|
-
bottom: "30px",
|
|
21123
|
-
// center为false时生效,距离底部位置
|
|
21124
21040
|
size: "base",
|
|
21125
21041
|
// 设置字体大小,默认base,可选large\small\base
|
|
21126
21042
|
icon: null,
|
|
21127
|
-
iconSize: "20",
|
|
21128
|
-
textAlignCenter: true,
|
|
21129
|
-
// 文字是否居中显示,true为居中,false为left
|
|
21130
|
-
loadingRotate: true,
|
|
21131
|
-
// 未实现
|
|
21132
|
-
bgColor: "rgba(0, 0, 0, .8)",
|
|
21133
21043
|
onClose: () => {
|
|
21134
21044
|
},
|
|
21135
|
-
|
|
21136
|
-
// 是否展示透明遮罩层
|
|
21137
|
-
coverColor: "rgba(0, 0, 0, 0)",
|
|
21138
|
-
// 遮罩颜色设定
|
|
21139
|
-
closeOnClickOverlay: false
|
|
21045
|
+
closeOnOverlayClick: false,
|
|
21140
21046
|
// 是否点击遮罩可关闭
|
|
21047
|
+
contentClassName: ""
|
|
21141
21048
|
};
|
|
21142
21049
|
function getInstance(props, callback) {
|
|
21143
21050
|
if (messageInstance) {
|
|
@@ -21153,6 +21060,7 @@ function notice(opts) {
|
|
|
21153
21060
|
if (messageInstance) {
|
|
21154
21061
|
messageInstance.destroy();
|
|
21155
21062
|
messageInstance = null;
|
|
21063
|
+
opts.onClose && opts.onClose();
|
|
21156
21064
|
}
|
|
21157
21065
|
}
|
|
21158
21066
|
const opts2 = { ...options, ...opts, onClose: close };
|
|
@@ -21165,32 +21073,31 @@ const errorMsg = (msg) => {
|
|
|
21165
21073
|
console.warn("[NutUI Toast]: msg cannot be null");
|
|
21166
21074
|
}
|
|
21167
21075
|
};
|
|
21076
|
+
function show(option) {
|
|
21077
|
+
if (typeof option === "string") {
|
|
21078
|
+
errorMsg(option);
|
|
21079
|
+
return notice({ content: option });
|
|
21080
|
+
}
|
|
21081
|
+
errorMsg(option.content);
|
|
21082
|
+
return notice({
|
|
21083
|
+
...option
|
|
21084
|
+
});
|
|
21085
|
+
}
|
|
21086
|
+
function config(config2) {
|
|
21087
|
+
if (config2.duration !== void 0) {
|
|
21088
|
+
options.duration = config2.duration;
|
|
21089
|
+
}
|
|
21090
|
+
if (config2.position !== void 0) {
|
|
21091
|
+
options.position = config2.position;
|
|
21092
|
+
}
|
|
21093
|
+
if (config2.closeOnOverlayClick !== void 0) {
|
|
21094
|
+
options.closeOnOverlayClick = config2.closeOnOverlayClick;
|
|
21095
|
+
}
|
|
21096
|
+
}
|
|
21168
21097
|
const Toast = {
|
|
21169
|
-
|
|
21170
|
-
|
|
21171
|
-
|
|
21172
|
-
},
|
|
21173
|
-
success(msg, option = {}) {
|
|
21174
|
-
errorMsg(msg);
|
|
21175
|
-
return notice({ msg, icon: "success", type: "success", ...option });
|
|
21176
|
-
},
|
|
21177
|
-
fail(msg, option = {}) {
|
|
21178
|
-
errorMsg(msg);
|
|
21179
|
-
return notice({ msg, icon: "failure", type: "fail", ...option });
|
|
21180
|
-
},
|
|
21181
|
-
loading(msg, option = {}) {
|
|
21182
|
-
errorMsg(msg);
|
|
21183
|
-
return notice({ msg, icon: /* @__PURE__ */ React.createElement(k$3, null), type: "loading", ...option });
|
|
21184
|
-
},
|
|
21185
|
-
warn(msg, option = {}) {
|
|
21186
|
-
errorMsg(msg);
|
|
21187
|
-
return notice({ msg, icon: "tips", type: "warn", ...option });
|
|
21188
|
-
},
|
|
21189
|
-
customIcon(msg, option = {}) {
|
|
21190
|
-
errorMsg(msg);
|
|
21191
|
-
return notice({ msg, ...option });
|
|
21192
|
-
},
|
|
21193
|
-
hide() {
|
|
21098
|
+
show,
|
|
21099
|
+
config,
|
|
21100
|
+
clear() {
|
|
21194
21101
|
if (messageInstance) {
|
|
21195
21102
|
messageInstance.destroy();
|
|
21196
21103
|
messageInstance = null;
|
|
@@ -21205,7 +21112,7 @@ const defaultProps$s = {
|
|
|
21205
21112
|
onClick: (event) => {
|
|
21206
21113
|
}
|
|
21207
21114
|
};
|
|
21208
|
-
const classPrefix$
|
|
21115
|
+
const classPrefix$5 = `nut-animate`;
|
|
21209
21116
|
const Animate = (props) => {
|
|
21210
21117
|
const { className, type: type4, action, loop: loop2, onClick, children, ...rest } = {
|
|
21211
21118
|
...defaultProps$s,
|
|
@@ -21214,7 +21121,7 @@ const Animate = (props) => {
|
|
|
21214
21121
|
const [clicked, setClicked] = useState(false);
|
|
21215
21122
|
const classes = classNames({
|
|
21216
21123
|
"nut-ani-container": true,
|
|
21217
|
-
[`${classPrefix$
|
|
21124
|
+
[`${classPrefix$5}-${type4}`]: action === "initial" || clicked ? type4 : false,
|
|
21218
21125
|
loop: loop2
|
|
21219
21126
|
});
|
|
21220
21127
|
const cls = classNames(classes, className);
|
|
@@ -21232,37 +21139,38 @@ const Animate = (props) => {
|
|
|
21232
21139
|
Animate.defaultProps = defaultProps$s;
|
|
21233
21140
|
Animate.displayName = "NutAnimate";
|
|
21234
21141
|
const defaultProps$r = {
|
|
21235
|
-
|
|
21236
|
-
|
|
21237
|
-
|
|
21238
|
-
|
|
21239
|
-
|
|
21240
|
-
|
|
21142
|
+
...ComponentDefaults,
|
|
21143
|
+
length: 0,
|
|
21144
|
+
value: "",
|
|
21145
|
+
delay: 300,
|
|
21146
|
+
duration: 1,
|
|
21147
|
+
thousands: false
|
|
21241
21148
|
};
|
|
21242
21149
|
const CountUp = (props) => {
|
|
21243
21150
|
const {
|
|
21244
|
-
|
|
21245
|
-
|
|
21246
|
-
|
|
21247
|
-
|
|
21151
|
+
length,
|
|
21152
|
+
value,
|
|
21153
|
+
delay,
|
|
21154
|
+
duration,
|
|
21248
21155
|
className,
|
|
21249
21156
|
thousands,
|
|
21157
|
+
style,
|
|
21250
21158
|
...reset
|
|
21251
21159
|
} = {
|
|
21252
21160
|
...defaultProps$r,
|
|
21253
21161
|
...props
|
|
21254
21162
|
};
|
|
21255
|
-
const
|
|
21163
|
+
const classPrefix2 = "nut-countup";
|
|
21256
21164
|
const countupRef = useRef(null);
|
|
21257
21165
|
const timerRef = useRef(0);
|
|
21258
21166
|
const numbers = Array.from({ length: 10 }, (v, i) => i);
|
|
21259
21167
|
const getShowNumber = () => {
|
|
21260
|
-
const splitArr =
|
|
21261
|
-
const intNumber =
|
|
21168
|
+
const splitArr = value.split(".");
|
|
21169
|
+
const intNumber = length && splitArr[0].length < length ? (Array(length).join("0") + splitArr[0]).slice(-length) : splitArr[0];
|
|
21262
21170
|
const currNumber = `${thousands ? intNumber.replace(/(\d)(?=(?:\d{3})+$)/g, "$1,") : intNumber}${splitArr[1] ? "." : ""}${splitArr[1] || ""}`;
|
|
21263
21171
|
return currNumber.split("");
|
|
21264
21172
|
};
|
|
21265
|
-
const numerArr = useMemo(getShowNumber, [
|
|
21173
|
+
const numerArr = useMemo(getShowNumber, [value, length, thousands]);
|
|
21266
21174
|
const setNumberTransform = () => {
|
|
21267
21175
|
if (countupRef.current) {
|
|
21268
21176
|
const numberItems = countupRef.current.querySelectorAll(
|
|
@@ -21283,28 +21191,33 @@ const CountUp = (props) => {
|
|
|
21283
21191
|
}
|
|
21284
21192
|
};
|
|
21285
21193
|
const numberEaseStyle = {
|
|
21286
|
-
transition: `transform ${
|
|
21194
|
+
transition: `transform ${duration}s ease-in-out`
|
|
21287
21195
|
};
|
|
21288
21196
|
useEffect(() => {
|
|
21289
21197
|
timerRef.current = window.setTimeout(() => {
|
|
21290
21198
|
setNumberTransform();
|
|
21291
|
-
},
|
|
21199
|
+
}, delay);
|
|
21292
21200
|
return () => {
|
|
21293
21201
|
window.clearTimeout(timerRef.current);
|
|
21294
21202
|
};
|
|
21295
21203
|
}, [numerArr]);
|
|
21296
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: `${
|
|
21204
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2} ${className}`, ref: countupRef }, /* @__PURE__ */ React__default.createElement("ul", { className: `${classPrefix2}__list` }, numerArr.map((item, idx) => {
|
|
21297
21205
|
return /* @__PURE__ */ React__default.createElement(
|
|
21298
21206
|
"li",
|
|
21299
21207
|
{
|
|
21300
|
-
className: `${
|
|
21301
|
-
number: !Number.isNaN(Number(item))
|
|
21302
|
-
})}`,
|
|
21208
|
+
className: `${classPrefix2}__listitem ${!Number.isNaN(Number(item)) ? `${classPrefix2}__listitem--number` : ""}`,
|
|
21303
21209
|
key: idx
|
|
21304
21210
|
},
|
|
21305
|
-
!Number.isNaN(Number(item)) ? /* @__PURE__ */ React__default.createElement(
|
|
21306
|
-
|
|
21307
|
-
|
|
21211
|
+
!Number.isNaN(Number(item)) ? /* @__PURE__ */ React__default.createElement(
|
|
21212
|
+
"span",
|
|
21213
|
+
{
|
|
21214
|
+
className: `${classPrefix2}__number`,
|
|
21215
|
+
style: numberEaseStyle
|
|
21216
|
+
},
|
|
21217
|
+
[...numbers, ...numbers].map((number4, subidx) => {
|
|
21218
|
+
return /* @__PURE__ */ React__default.createElement("span", { key: subidx }, number4);
|
|
21219
|
+
})
|
|
21220
|
+
) : /* @__PURE__ */ React__default.createElement("span", { className: `${classPrefix2}__separator` }, item)
|
|
21308
21221
|
);
|
|
21309
21222
|
})));
|
|
21310
21223
|
};
|
|
@@ -21584,12 +21497,12 @@ const defaultProps$o = {
|
|
|
21584
21497
|
gap: "-8",
|
|
21585
21498
|
level: "left"
|
|
21586
21499
|
};
|
|
21587
|
-
const classPrefix$
|
|
21500
|
+
const classPrefix$4 = `nut-avatar-group`;
|
|
21588
21501
|
const AvatarGroup = (props) => {
|
|
21589
21502
|
const propAvatarGroup = { ...defaultProps$o, ...props };
|
|
21590
21503
|
const { className, style, children } = propAvatarGroup;
|
|
21591
21504
|
const avatarGroupRef = useRef(null);
|
|
21592
|
-
const cls = classNames(classPrefix$
|
|
21505
|
+
const cls = classNames(classPrefix$4, className);
|
|
21593
21506
|
const parentAvatar = {
|
|
21594
21507
|
propAvatarGroup,
|
|
21595
21508
|
avatarGroupRef
|
|
@@ -21607,7 +21520,7 @@ const defaultProps$n = {
|
|
|
21607
21520
|
background: "#e5e9f2",
|
|
21608
21521
|
clockwise: true
|
|
21609
21522
|
};
|
|
21610
|
-
const classPrefix$
|
|
21523
|
+
const classPrefix$3 = `nut-circleprogress`;
|
|
21611
21524
|
const CircleProgress = (props) => {
|
|
21612
21525
|
var _a2;
|
|
21613
21526
|
const {
|
|
@@ -21626,7 +21539,7 @@ const CircleProgress = (props) => {
|
|
|
21626
21539
|
...defaultProps$n,
|
|
21627
21540
|
...props
|
|
21628
21541
|
};
|
|
21629
|
-
const classes = classNames(className, classPrefix$
|
|
21542
|
+
const classes = classNames(className, classPrefix$3);
|
|
21630
21543
|
const refRandomId = Math.random().toString(36).slice(-8);
|
|
21631
21544
|
const styles = {
|
|
21632
21545
|
height: `${Number(radius) * 2}px`,
|
|
@@ -21875,13 +21788,16 @@ Collapse.defaultProps = defaultProps$l;
|
|
|
21875
21788
|
Collapse.displayName = "NutCollapse";
|
|
21876
21789
|
Collapse.Item = CollapseItem;
|
|
21877
21790
|
const defaultProps$k = {
|
|
21791
|
+
...ComponentDefaults,
|
|
21878
21792
|
paused: false,
|
|
21879
21793
|
startTime: Date.now(),
|
|
21880
21794
|
endTime: Date.now(),
|
|
21795
|
+
remainingTime: 0,
|
|
21881
21796
|
millisecond: false,
|
|
21882
21797
|
format: "HH:mm:ss",
|
|
21883
21798
|
autoStart: true,
|
|
21884
|
-
time: 0
|
|
21799
|
+
time: 0,
|
|
21800
|
+
destroy: false
|
|
21885
21801
|
};
|
|
21886
21802
|
const InternalCountDown = (props, ref) => {
|
|
21887
21803
|
useConfig();
|
|
@@ -21889,10 +21805,12 @@ const InternalCountDown = (props, ref) => {
|
|
|
21889
21805
|
paused,
|
|
21890
21806
|
startTime,
|
|
21891
21807
|
endTime,
|
|
21808
|
+
remainingTime,
|
|
21892
21809
|
millisecond,
|
|
21893
21810
|
format: format2,
|
|
21894
21811
|
autoStart,
|
|
21895
21812
|
time,
|
|
21813
|
+
destroy,
|
|
21896
21814
|
className,
|
|
21897
21815
|
style,
|
|
21898
21816
|
onEnd,
|
|
@@ -21902,7 +21820,7 @@ const InternalCountDown = (props, ref) => {
|
|
|
21902
21820
|
children,
|
|
21903
21821
|
...rest
|
|
21904
21822
|
} = { ...defaultProps$k, ...props };
|
|
21905
|
-
const
|
|
21823
|
+
const classPrefix2 = "nut-countdown";
|
|
21906
21824
|
const [restTimeStamp, setRestTime] = useState(0);
|
|
21907
21825
|
const stateRef = useRef({
|
|
21908
21826
|
pauseTime: 0,
|
|
@@ -21927,8 +21845,12 @@ const InternalCountDown = (props, ref) => {
|
|
|
21927
21845
|
return new Date(t).getTime();
|
|
21928
21846
|
};
|
|
21929
21847
|
const initTime = () => {
|
|
21930
|
-
|
|
21931
|
-
|
|
21848
|
+
if (remainingTime) {
|
|
21849
|
+
stateRef.current.handleEndTime = Date.now() + Number(remainingTime);
|
|
21850
|
+
} else {
|
|
21851
|
+
stateRef.current.handleEndTime = endTime;
|
|
21852
|
+
stateRef.current.diffTime = Date.now() - getTimeStamp(startTime);
|
|
21853
|
+
}
|
|
21932
21854
|
if (!stateRef.current.counting)
|
|
21933
21855
|
stateRef.current.counting = true;
|
|
21934
21856
|
tick();
|
|
@@ -22070,7 +21992,7 @@ const InternalCountDown = (props, ref) => {
|
|
|
22070
21992
|
if (stateRef.current.isIninted) {
|
|
22071
21993
|
initTime();
|
|
22072
21994
|
}
|
|
22073
|
-
}, [endTime, startTime]);
|
|
21995
|
+
}, [endTime, startTime, remainingTime]);
|
|
22074
21996
|
useEffect(() => {
|
|
22075
21997
|
if (autoStart) {
|
|
22076
21998
|
initTime();
|
|
@@ -22084,20 +22006,28 @@ const InternalCountDown = (props, ref) => {
|
|
|
22084
22006
|
return componentWillUnmount;
|
|
22085
22007
|
}, []);
|
|
22086
22008
|
const componentWillUnmount = () => {
|
|
22087
|
-
|
|
22009
|
+
destroy && cancelAnimationFrame(stateRef.current.timer);
|
|
22088
22010
|
};
|
|
22089
22011
|
const renderTime = (() => {
|
|
22090
22012
|
return formatRemainTime(stateRef.current.restTime);
|
|
22091
22013
|
})();
|
|
22092
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
22014
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
22093
22015
|
"div",
|
|
22094
22016
|
{
|
|
22095
|
-
className:
|
|
22096
|
-
|
|
22097
|
-
|
|
22017
|
+
className: `${classPrefix2} ${className}`,
|
|
22018
|
+
style: { ...style },
|
|
22019
|
+
...rest
|
|
22020
|
+
},
|
|
22021
|
+
children || /* @__PURE__ */ React__default.createElement(
|
|
22022
|
+
"div",
|
|
22023
|
+
{
|
|
22024
|
+
className: `${classPrefix2}__block`,
|
|
22025
|
+
dangerouslySetInnerHTML: {
|
|
22026
|
+
__html: `${renderTime}`
|
|
22027
|
+
}
|
|
22098
22028
|
}
|
|
22099
|
-
|
|
22100
|
-
)
|
|
22029
|
+
)
|
|
22030
|
+
);
|
|
22101
22031
|
};
|
|
22102
22032
|
const CountDown = React__default.forwardRef(InternalCountDown);
|
|
22103
22033
|
CountDown.defaultProps = defaultProps$k;
|
|
@@ -22112,7 +22042,7 @@ const defaultProps$j = {
|
|
|
22112
22042
|
symbol: "...",
|
|
22113
22043
|
lineHeight: "20"
|
|
22114
22044
|
};
|
|
22115
|
-
const classPrefix$
|
|
22045
|
+
const classPrefix$2 = `nut-ellipsis`;
|
|
22116
22046
|
const Ellipsis = (props) => {
|
|
22117
22047
|
var _a2, _b;
|
|
22118
22048
|
const {
|
|
@@ -22135,7 +22065,7 @@ const Ellipsis = (props) => {
|
|
|
22135
22065
|
const [expanded, setExpanded] = useState(false);
|
|
22136
22066
|
const ellipsis = useRef();
|
|
22137
22067
|
const root2 = useRef(null);
|
|
22138
|
-
const classes = classNames(classPrefix$
|
|
22068
|
+
const classes = classNames(classPrefix$2, className);
|
|
22139
22069
|
useLayoutEffect(() => {
|
|
22140
22070
|
if (content) {
|
|
22141
22071
|
createContainer();
|
|
@@ -22279,6 +22209,7 @@ const Ellipsis = (props) => {
|
|
|
22279
22209
|
Ellipsis.defaultProps = defaultProps$j;
|
|
22280
22210
|
Ellipsis.displayName = "NutEllipsis";
|
|
22281
22211
|
const defaultProps$i = {
|
|
22212
|
+
...ComponentDefaults,
|
|
22282
22213
|
source: {
|
|
22283
22214
|
type: {},
|
|
22284
22215
|
src: ""
|
|
@@ -22293,15 +22224,13 @@ const defaultProps$i = {
|
|
|
22293
22224
|
loop: false
|
|
22294
22225
|
}
|
|
22295
22226
|
};
|
|
22227
|
+
const classPrefix$1 = `nut-video`;
|
|
22296
22228
|
const Video = (props) => {
|
|
22297
22229
|
const {
|
|
22298
22230
|
children,
|
|
22299
22231
|
source,
|
|
22300
22232
|
options: options2,
|
|
22301
22233
|
className,
|
|
22302
|
-
play,
|
|
22303
|
-
pause,
|
|
22304
|
-
playend,
|
|
22305
22234
|
onPlay,
|
|
22306
22235
|
onPause,
|
|
22307
22236
|
onPlayEnd,
|
|
@@ -22311,8 +22240,7 @@ const Video = (props) => {
|
|
|
22311
22240
|
...props
|
|
22312
22241
|
};
|
|
22313
22242
|
const rootRef = useRef(null);
|
|
22314
|
-
const
|
|
22315
|
-
const classes = classNames(className, b(""));
|
|
22243
|
+
const classes = classNames(className, classPrefix$1);
|
|
22316
22244
|
useEffect(() => {
|
|
22317
22245
|
init();
|
|
22318
22246
|
}, []);
|
|
@@ -22332,16 +22260,13 @@ const Video = (props) => {
|
|
|
22332
22260
|
}
|
|
22333
22261
|
videoRef.addEventListener("play", () => {
|
|
22334
22262
|
onPlay && onPlay(videoRef);
|
|
22335
|
-
play && play(videoRef);
|
|
22336
22263
|
});
|
|
22337
22264
|
videoRef.addEventListener("pause", () => {
|
|
22338
22265
|
onPause && onPause(videoRef);
|
|
22339
|
-
pause && pause(videoRef);
|
|
22340
22266
|
});
|
|
22341
22267
|
videoRef.addEventListener("ended", () => {
|
|
22342
22268
|
videoRef.currentTime = 0;
|
|
22343
22269
|
onPlayEnd && onPlayEnd(videoRef);
|
|
22344
|
-
playend && playend(videoRef);
|
|
22345
22270
|
});
|
|
22346
22271
|
}
|
|
22347
22272
|
};
|
|
@@ -23106,18 +23031,18 @@ const binarySearch = (positionsList, value = 0, horizontal) => {
|
|
|
23106
23031
|
return tempIndex;
|
|
23107
23032
|
};
|
|
23108
23033
|
const getEndIndex = ({
|
|
23109
|
-
|
|
23034
|
+
list,
|
|
23110
23035
|
startIndex,
|
|
23111
23036
|
visibleCount,
|
|
23112
|
-
|
|
23037
|
+
itemEqual = true,
|
|
23113
23038
|
positions,
|
|
23114
23039
|
offSetSize,
|
|
23115
23040
|
overscan,
|
|
23116
23041
|
sizeKey = "width"
|
|
23117
23042
|
}) => {
|
|
23118
|
-
const dataLength =
|
|
23043
|
+
const dataLength = list.length;
|
|
23119
23044
|
let tempIndex = null;
|
|
23120
|
-
if (
|
|
23045
|
+
if (itemEqual) {
|
|
23121
23046
|
const endIndex = startIndex + visibleCount;
|
|
23122
23047
|
tempIndex = dataLength > 0 ? Math.min(dataLength, endIndex) : endIndex;
|
|
23123
23048
|
} else {
|
|
@@ -23166,26 +23091,35 @@ const updateItemSize = (positions, items, sizeKey) => {
|
|
|
23166
23091
|
}
|
|
23167
23092
|
});
|
|
23168
23093
|
};
|
|
23169
|
-
const defaultProps$d = {
|
|
23094
|
+
const defaultProps$d = {
|
|
23095
|
+
...ComponentDefaults,
|
|
23096
|
+
list: [],
|
|
23097
|
+
itemHeight: 66,
|
|
23098
|
+
itemEqual: true,
|
|
23099
|
+
direction: "vertical",
|
|
23100
|
+
overscan: 2
|
|
23101
|
+
};
|
|
23170
23102
|
const VirtualList = (props) => {
|
|
23171
23103
|
const {
|
|
23172
|
-
|
|
23104
|
+
list,
|
|
23173
23105
|
ItemRender,
|
|
23174
|
-
|
|
23175
|
-
|
|
23176
|
-
|
|
23177
|
-
overscan
|
|
23106
|
+
itemEqual,
|
|
23107
|
+
itemHeight,
|
|
23108
|
+
direction,
|
|
23109
|
+
overscan,
|
|
23178
23110
|
key,
|
|
23179
|
-
handleScroll,
|
|
23180
23111
|
onScroll,
|
|
23181
23112
|
className,
|
|
23182
|
-
|
|
23113
|
+
containerHeight,
|
|
23183
23114
|
...rest
|
|
23184
|
-
} =
|
|
23115
|
+
} = {
|
|
23116
|
+
...defaultProps$d,
|
|
23117
|
+
...props
|
|
23118
|
+
};
|
|
23119
|
+
const horizontal = direction === "horizontal";
|
|
23185
23120
|
const sizeKey = horizontal ? "width" : "height";
|
|
23186
23121
|
const scrollKey = horizontal ? "scrollLeft" : "scrollTop";
|
|
23187
23122
|
const offsetKey = horizontal ? "left" : "top";
|
|
23188
|
-
useConfig();
|
|
23189
23123
|
const scrollRef = useRef(null);
|
|
23190
23124
|
const itemsRef = useRef(null);
|
|
23191
23125
|
const firstItemRef = useRef(null);
|
|
@@ -23202,7 +23136,7 @@ const VirtualList = (props) => {
|
|
|
23202
23136
|
]);
|
|
23203
23137
|
const [listTotalSize, setListTotalSize] = useState(99999999);
|
|
23204
23138
|
const [visibleCount, setVisibleCount] = useState(0);
|
|
23205
|
-
const [offSetSize, setOffSetSize] = useState(
|
|
23139
|
+
const [offSetSize, setOffSetSize] = useState(containerHeight || 0);
|
|
23206
23140
|
const [options2, setOptions] = useState({
|
|
23207
23141
|
startOffset: 0,
|
|
23208
23142
|
// 可视区域距离顶部的偏移量
|
|
@@ -23213,30 +23147,30 @@ const VirtualList = (props) => {
|
|
|
23213
23147
|
// 可视区域结束索引
|
|
23214
23148
|
});
|
|
23215
23149
|
useEffect(() => {
|
|
23216
|
-
const pos = initPositinoCache(
|
|
23150
|
+
const pos = initPositinoCache(itemHeight, list.length);
|
|
23217
23151
|
setPositions(pos);
|
|
23218
23152
|
const totalSize = getListTotalSize(pos, horizontal);
|
|
23219
23153
|
setListTotalSize(totalSize);
|
|
23220
|
-
}, [
|
|
23154
|
+
}, [list, itemHeight, horizontal]);
|
|
23221
23155
|
const getElement = useCallback(() => {
|
|
23222
23156
|
var _a2;
|
|
23223
23157
|
return ((_a2 = scrollRef.current) == null ? void 0 : _a2.parentElement) || document.body;
|
|
23224
23158
|
}, []);
|
|
23225
23159
|
useEffect(() => {
|
|
23226
|
-
if (
|
|
23160
|
+
if (containerHeight)
|
|
23227
23161
|
return;
|
|
23228
23162
|
const size = horizontal ? getElement().offsetWidth : getElement().offsetHeight;
|
|
23229
23163
|
setOffSetSize(size);
|
|
23230
|
-
}, [getElement, horizontal,
|
|
23164
|
+
}, [getElement, horizontal, containerHeight]);
|
|
23231
23165
|
useEffect(() => {
|
|
23232
23166
|
if (offSetSize === 0)
|
|
23233
23167
|
return;
|
|
23234
|
-
const count = Math.ceil(offSetSize /
|
|
23168
|
+
const count = Math.ceil(offSetSize / itemHeight) + overscan;
|
|
23235
23169
|
setVisibleCount(count);
|
|
23236
23170
|
setOptions((options22) => {
|
|
23237
23171
|
return { ...options22, endIndex: count };
|
|
23238
23172
|
});
|
|
23239
|
-
}, [getElement, horizontal,
|
|
23173
|
+
}, [getElement, horizontal, itemHeight, overscan, offSetSize]);
|
|
23240
23174
|
const updateTotalSize = useCallback(() => {
|
|
23241
23175
|
if (!itemsRef.current)
|
|
23242
23176
|
return;
|
|
@@ -23252,14 +23186,14 @@ const VirtualList = (props) => {
|
|
|
23252
23186
|
const scrollSize = getElement()[scrollKey];
|
|
23253
23187
|
const startIndex = binarySearch(positions, scrollSize, horizontal);
|
|
23254
23188
|
const overStart = startIndex - overscan > -1 ? startIndex - overscan : 0;
|
|
23255
|
-
if (!
|
|
23189
|
+
if (!itemEqual) {
|
|
23256
23190
|
updateTotalSize();
|
|
23257
23191
|
}
|
|
23258
23192
|
const endIndex = getEndIndex({
|
|
23259
|
-
|
|
23193
|
+
list,
|
|
23260
23194
|
startIndex,
|
|
23261
23195
|
visibleCount,
|
|
23262
|
-
|
|
23196
|
+
itemEqual,
|
|
23263
23197
|
positions,
|
|
23264
23198
|
offSetSize,
|
|
23265
23199
|
sizeKey,
|
|
@@ -23267,27 +23201,24 @@ const VirtualList = (props) => {
|
|
|
23267
23201
|
});
|
|
23268
23202
|
const startOffset = positions[startIndex][offsetKey];
|
|
23269
23203
|
setOptions({ startOffset, startIndex, overStart, endIndex });
|
|
23270
|
-
if (endIndex >
|
|
23204
|
+
if (endIndex > list.length - 1) {
|
|
23271
23205
|
if (onScroll) {
|
|
23272
23206
|
onScroll();
|
|
23273
|
-
} else if (handleScroll) {
|
|
23274
|
-
handleScroll();
|
|
23275
23207
|
}
|
|
23276
23208
|
}
|
|
23277
23209
|
});
|
|
23278
23210
|
}, [
|
|
23279
23211
|
positions,
|
|
23280
23212
|
getElement,
|
|
23281
|
-
|
|
23213
|
+
list,
|
|
23282
23214
|
visibleCount,
|
|
23283
|
-
|
|
23215
|
+
itemEqual,
|
|
23284
23216
|
updateTotalSize,
|
|
23285
23217
|
offsetKey,
|
|
23286
23218
|
sizeKey,
|
|
23287
23219
|
scrollKey,
|
|
23288
23220
|
horizontal,
|
|
23289
23221
|
overscan,
|
|
23290
|
-
handleScroll,
|
|
23291
23222
|
offSetSize
|
|
23292
23223
|
]);
|
|
23293
23224
|
useEffect(() => {
|
|
@@ -23303,7 +23234,7 @@ const VirtualList = (props) => {
|
|
|
23303
23234
|
className: className ? `${className} nut-virtualList-box` : "nut-virtualList-box",
|
|
23304
23235
|
...rest,
|
|
23305
23236
|
style: {
|
|
23306
|
-
[sizeKey]:
|
|
23237
|
+
[sizeKey]: containerHeight ? `${offSetSize}px` : ""
|
|
23307
23238
|
}
|
|
23308
23239
|
},
|
|
23309
23240
|
/* @__PURE__ */ React__default.createElement(
|
|
@@ -23325,7 +23256,7 @@ const VirtualList = (props) => {
|
|
|
23325
23256
|
transform: horizontal ? `translate3d(${options2.startOffset}px,0,0)` : `translate3d(0,${options2.startOffset}px,0)`
|
|
23326
23257
|
}
|
|
23327
23258
|
},
|
|
23328
|
-
|
|
23259
|
+
list.slice(options2.overStart, options2.endIndex).map((data, index) => {
|
|
23329
23260
|
const { startIndex, overStart } = options2;
|
|
23330
23261
|
const dataIndex = overStart + index;
|
|
23331
23262
|
const styleVal = dataIndex < startIndex ? "none" : "block";
|
|
@@ -23722,7 +23653,7 @@ const Table = (props) => {
|
|
|
23722
23653
|
},
|
|
23723
23654
|
item.title,
|
|
23724
23655
|
" ",
|
|
23725
|
-
item.sorter && (sorterIcon || /* @__PURE__ */ React__default.createElement(x$
|
|
23656
|
+
item.sorter && (sorterIcon || /* @__PURE__ */ React__default.createElement(x$a, { width: "12px", height: "12px" }))
|
|
23726
23657
|
);
|
|
23727
23658
|
});
|
|
23728
23659
|
};
|
|
@@ -23868,7 +23799,7 @@ const Tag = (props) => {
|
|
|
23868
23799
|
},
|
|
23869
23800
|
closeIcon
|
|
23870
23801
|
) : /* @__PURE__ */ React__default.createElement(
|
|
23871
|
-
x$
|
|
23802
|
+
x$b,
|
|
23872
23803
|
{
|
|
23873
23804
|
width: 12,
|
|
23874
23805
|
height: 12,
|
|
@@ -24224,43 +24155,42 @@ const TimeSelect = (props) => {
|
|
|
24224
24155
|
TimeSelect.defaultProps = defaultProps$2;
|
|
24225
24156
|
TimeSelect.displayName = "NutTimeSelect";
|
|
24226
24157
|
const defaultProps$1 = {
|
|
24227
|
-
|
|
24158
|
+
...ComponentDefaults,
|
|
24159
|
+
value: 0,
|
|
24228
24160
|
digits: 2,
|
|
24229
|
-
|
|
24230
|
-
|
|
24161
|
+
symbol: false,
|
|
24162
|
+
zero: false,
|
|
24231
24163
|
arrowLeft: false,
|
|
24232
|
-
|
|
24233
|
-
|
|
24164
|
+
syncColor: true,
|
|
24165
|
+
color: "#333",
|
|
24234
24166
|
riseColor: "#fa2c19",
|
|
24235
24167
|
dropColor: "#64b578",
|
|
24236
|
-
|
|
24237
|
-
downIcon: null
|
|
24238
|
-
className: ""
|
|
24168
|
+
riseIcon: null,
|
|
24169
|
+
downIcon: null
|
|
24239
24170
|
};
|
|
24240
24171
|
const TrendArrow = (props) => {
|
|
24241
24172
|
const {
|
|
24242
|
-
|
|
24173
|
+
value,
|
|
24243
24174
|
digits,
|
|
24244
|
-
|
|
24245
|
-
|
|
24175
|
+
symbol,
|
|
24176
|
+
zero,
|
|
24246
24177
|
arrowLeft,
|
|
24247
|
-
|
|
24248
|
-
|
|
24178
|
+
syncColor,
|
|
24179
|
+
color,
|
|
24249
24180
|
riseColor,
|
|
24250
24181
|
dropColor,
|
|
24251
|
-
|
|
24182
|
+
riseIcon,
|
|
24252
24183
|
downIcon,
|
|
24253
24184
|
className,
|
|
24185
|
+
style,
|
|
24254
24186
|
children,
|
|
24255
24187
|
...rest
|
|
24256
24188
|
} = { ...defaultProps$1, ...props };
|
|
24257
|
-
const
|
|
24258
|
-
const
|
|
24259
|
-
};
|
|
24260
|
-
const rateTrend = useRef(rate > 0);
|
|
24189
|
+
const classPrefix2 = "nut-trendarrow";
|
|
24190
|
+
const rateTrend = useRef(value > 0);
|
|
24261
24191
|
const myFixed = (num, digit = 2) => {
|
|
24262
24192
|
if (Object.is(parseFloat(num), NaN)) {
|
|
24263
|
-
return console.
|
|
24193
|
+
return console.warn(`传入的值:${num}不是一个数字`);
|
|
24264
24194
|
}
|
|
24265
24195
|
num = parseFloat(num);
|
|
24266
24196
|
const numPow = Math.pow(10, digit);
|
|
@@ -24268,20 +24198,20 @@ const TrendArrow = (props) => {
|
|
|
24268
24198
|
};
|
|
24269
24199
|
const calcStyle = (() => {
|
|
24270
24200
|
const arrowColor = rateTrend.current ? riseColor : dropColor;
|
|
24271
|
-
const textEquArrowColor =
|
|
24272
|
-
const
|
|
24273
|
-
color:
|
|
24201
|
+
const textEquArrowColor = syncColor ? arrowColor : color;
|
|
24202
|
+
const style2 = {
|
|
24203
|
+
color: value === 0 ? color : textEquArrowColor
|
|
24274
24204
|
};
|
|
24275
|
-
return
|
|
24205
|
+
return style2;
|
|
24276
24206
|
})();
|
|
24277
24207
|
const calcRate = (() => {
|
|
24278
|
-
rateTrend.current =
|
|
24279
|
-
const absRate = Math.abs(
|
|
24280
|
-
if (!
|
|
24208
|
+
rateTrend.current = value > 0;
|
|
24209
|
+
const absRate = Math.abs(value);
|
|
24210
|
+
if (!zero && value === 0) {
|
|
24281
24211
|
return "--";
|
|
24282
24212
|
}
|
|
24283
24213
|
const resultRate = `${// eslint-disable-next-line no-nested-ternary
|
|
24284
|
-
|
|
24214
|
+
symbol && value !== 0 ? rateTrend.current ? "+" : "-" : ""}${myFixed(Number(absRate), digits)}%`;
|
|
24285
24215
|
return resultRate;
|
|
24286
24216
|
})();
|
|
24287
24217
|
const calcIconProps = (() => {
|
|
@@ -24292,13 +24222,21 @@ const TrendArrow = (props) => {
|
|
|
24292
24222
|
})();
|
|
24293
24223
|
const renderContent = (arrowLeft2) => {
|
|
24294
24224
|
const classNameSuffix = !arrowLeft2 ? "icon-after" : "icon-before";
|
|
24295
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
24225
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
24226
|
+
"span",
|
|
24227
|
+
{
|
|
24228
|
+
className: `${classPrefix2}__${classNameSuffix} ${classPrefix2}__value`,
|
|
24229
|
+
style: calcStyle
|
|
24230
|
+
},
|
|
24231
|
+
calcRate
|
|
24232
|
+
);
|
|
24296
24233
|
};
|
|
24297
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: `${
|
|
24234
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, !arrowLeft && renderContent(!arrowLeft), Number(value) !== 0 && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, rateTrend.current ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, riseIcon || /* @__PURE__ */ React__default.createElement(y, { color: calcIconProps.color })) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, downIcon || /* @__PURE__ */ React__default.createElement(y$1, { color: calcIconProps.color }))), arrowLeft && renderContent(!arrowLeft));
|
|
24298
24235
|
};
|
|
24299
24236
|
TrendArrow.defaultProps = defaultProps$1;
|
|
24300
24237
|
TrendArrow.displayName = "NutTrendArrow";
|
|
24301
24238
|
const defaultProps = {
|
|
24239
|
+
...ComponentDefaults,
|
|
24302
24240
|
content: "",
|
|
24303
24241
|
fullPage: true,
|
|
24304
24242
|
zIndex: 2e3,
|
|
@@ -24310,9 +24248,8 @@ const defaultProps = {
|
|
|
24310
24248
|
imageWidth: 120,
|
|
24311
24249
|
imageHeight: 64,
|
|
24312
24250
|
rotate: -22,
|
|
24313
|
-
|
|
24251
|
+
color: "rgba(0,0,0,.15)",
|
|
24314
24252
|
fontStyle: "normal",
|
|
24315
|
-
fontFamily: "PingFang SC",
|
|
24316
24253
|
fontWeight: "normal",
|
|
24317
24254
|
fontSize: 14
|
|
24318
24255
|
};
|
|
@@ -24331,22 +24268,20 @@ const WaterMark = (props) => {
|
|
|
24331
24268
|
imageWidth,
|
|
24332
24269
|
imageHeight,
|
|
24333
24270
|
rotate,
|
|
24334
|
-
|
|
24271
|
+
color,
|
|
24335
24272
|
fontStyle,
|
|
24336
24273
|
fontFamily,
|
|
24337
24274
|
fontWeight,
|
|
24338
24275
|
fontSize,
|
|
24339
|
-
style
|
|
24340
|
-
children
|
|
24276
|
+
style
|
|
24341
24277
|
} = {
|
|
24342
24278
|
...defaultProps,
|
|
24343
24279
|
...props
|
|
24344
24280
|
};
|
|
24345
24281
|
const [base64Url, setBase64Url] = useState("");
|
|
24346
|
-
const
|
|
24347
|
-
const classes = classNames({
|
|
24348
|
-
[`${
|
|
24349
|
-
[`${b("")}-full-page`]: fullPage
|
|
24282
|
+
const classPrefix2 = "nut-watermark";
|
|
24283
|
+
const classes = classNames(classPrefix2, {
|
|
24284
|
+
[`${classPrefix2}-full-page`]: fullPage
|
|
24350
24285
|
});
|
|
24351
24286
|
const cls = classNames(classes, className);
|
|
24352
24287
|
useEffect(() => {
|
|
@@ -24388,7 +24323,7 @@ const WaterMark = (props) => {
|
|
|
24388
24323
|
ctx2.rotate(Math.PI / 180 * Number(rotate));
|
|
24389
24324
|
const markSize = Number(fontSize) * ratio;
|
|
24390
24325
|
ctx2.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
|
|
24391
|
-
ctx2.fillStyle =
|
|
24326
|
+
ctx2.fillStyle = color;
|
|
24392
24327
|
ctx2.fillText(content, 0, 0);
|
|
24393
24328
|
ctx2.restore();
|
|
24394
24329
|
setBase64Url(canvas.toDataURL());
|