@nutui/nutui-react-taro 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 +1 -3
- package/dist/esm/Address/style/style.css +1 -1
- package/dist/esm/AnimatingNumbers/style/style.css +1 -1
- package/dist/esm/AnimatingNumbers.js +99 -5
- package/dist/esm/AvatarGroup.js +1 -1
- 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 +2 -3
- package/dist/esm/DatePicker/style/style.css +1 -1
- package/dist/esm/Ellipsis/style/style.css +1 -1
- package/dist/esm/Ellipsis.js +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 +1 -4
- package/dist/esm/ShortPassword/style/style.css +1 -1
- package/dist/esm/ShortPassword.js +3 -4
- 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 +2 -3
- package/dist/esm/TrendArrow/style/style.css +1 -1
- package/dist/esm/TrendArrow.js +2 -3
- package/dist/esm/Video.js +3 -3
- package/dist/esm/VirtualList/style/style.css +1 -1
- package/dist/esm/VirtualList.js +2 -2
- package/dist/esm/WaterMark.js +2 -3
- package/dist/esm/actionsheet.taro-697a594b.js +54 -0
- package/dist/esm/{countdown.taro-22200811.js → countdown.taro-c399cc08.js} +17 -10
- package/dist/esm/{ellipsis.taro-02765890.js → ellipsis.taro-f423affa.js} +13 -6
- package/dist/esm/nutui-react.es.js +18 -18
- package/dist/esm/searchbar.taro-09468fff.js +122 -0
- package/dist/esm/shortpassword.taro-eabbde1b.js +90 -0
- package/dist/esm/toast.taro-b2937e7c.js +171 -0
- package/dist/esm/trendarrow.taro-253025d2.js +70 -0
- 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/{types/packages/avatargroup/avatargroup.d.ts → esm/types/src/packages/avatargroup/avatargroup.taro.d.ts} +1 -1
- 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/esm/video.taro-2a26d7da.js +37 -0
- package/dist/esm/{virtuallist.taro-99f03769.js → virtuallist.taro-97d3403a.js} +27 -30
- package/dist/esm/{watermark.taro-cef29c03.js → watermark.taro-e2245bb1.js} +12 -13
- 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 +495 -548
- package/dist/nutui.react.umd.js +495 -548
- 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.taro.d.ts +44 -16
- package/dist/types/packages/actionsheet/index.taro.d.ts +1 -0
- package/dist/types/packages/animate/animate.taro.d.ts +20 -4
- package/dist/types/packages/animatingnumbers/countup.taro.d.ts +7 -8
- package/dist/types/packages/animatingnumbers/index.taro.d.ts +1 -0
- package/dist/types/packages/audio/audio.taro.d.ts +25 -5
- package/dist/types/packages/avatar/avatar.taro.d.ts +45 -9
- package/dist/types/packages/avatargroup/avatargroup.taro.d.ts +45 -0
- package/dist/types/packages/avatargroup/index.taro.d.ts +1 -1
- package/dist/types/packages/backtop/backtop.taro.d.ts +20 -4
- package/dist/types/packages/badge/badge.taro.d.ts +30 -6
- package/dist/types/packages/button/button.taro.d.ts +50 -10
- package/dist/types/packages/cascader/cascader.taro.d.ts +80 -16
- package/dist/types/packages/cell/cell.taro.d.ts +30 -6
- package/dist/types/packages/cellgroup/cellgroup.taro.d.ts +15 -3
- package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +40 -8
- package/dist/types/packages/circleprogress/circleprogress.taro.d.ts +35 -7
- package/dist/types/packages/col/col.taro.d.ts +15 -3
- package/dist/types/packages/collapse/collapse.taro.d.ts +25 -5
- package/dist/types/packages/collapseitem/collapseitem.taro.d.ts +20 -4
- package/dist/types/packages/configprovider/configprovider.d.ts +2 -1
- package/dist/types/packages/configprovider/configprovider.taro.d.ts +11 -2
- package/dist/types/packages/configprovider/index.d.ts +1 -0
- package/dist/types/packages/configprovider/index.taro.d.ts +1 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -0
- package/dist/types/packages/countdown/countdown.taro.d.ts +68 -15
- package/dist/types/packages/countdown/index.taro.d.ts +1 -0
- package/dist/types/packages/divider/divider.taro.d.ts +10 -2
- package/dist/types/packages/drag/drag.taro.d.ts +15 -3
- package/dist/types/packages/elevator/elevator.taro.d.ts +45 -9
- package/dist/types/packages/ellipsis/ellipsis.taro.d.ts +46 -9
- package/dist/types/packages/empty/empty.taro.d.ts +20 -4
- package/dist/types/packages/fixednav/fixednav.taro.d.ts +50 -10
- package/dist/types/packages/grid/grid.taro.d.ts +35 -7
- package/dist/types/packages/griditem/griditem.taro.d.ts +5 -1
- package/dist/types/packages/imagepreview/imagepreview.taro.d.ts +50 -10
- package/dist/types/packages/indicator/indicator.taro.d.ts +15 -3
- package/dist/types/packages/input/input.taro.d.ts +100 -20
- package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +85 -17
- package/dist/types/packages/menu/menu.taro.d.ts +20 -4
- package/dist/types/packages/menuitem/menuitem.taro.d.ts +35 -7
- package/dist/types/packages/noticebar/noticebar.taro.d.ts +60 -12
- package/dist/types/packages/notify/notify.taro.d.ts +30 -6
- package/dist/types/packages/numberkeyboard/numberkeyboard.taro.d.ts +50 -10
- package/dist/types/packages/overlay/index.d.ts +3 -0
- package/dist/types/packages/overlay/overlay.d.ts +14 -0
- package/dist/types/packages/overlay/overlay.taro.d.ts +40 -8
- package/dist/types/packages/pagination/pagination.taro.d.ts +55 -11
- package/dist/types/packages/picker/picker.taro.d.ts +55 -11
- package/dist/types/packages/popup/popup.taro.d.ts +75 -15
- package/dist/types/packages/price/price.taro.d.ts +35 -7
- package/dist/types/packages/progress/progress.taro.d.ts +35 -7
- package/dist/types/packages/pulltorefresh/pulltorefresh.taro.d.ts +55 -11
- package/dist/types/packages/radio/radio.taro.d.ts +45 -9
- package/dist/types/packages/radiogroup/radiogroup.taro.d.ts +30 -6
- package/dist/types/packages/range/range.taro.d.ts +80 -16
- package/dist/types/packages/searchbar/index.taro.d.ts +1 -0
- package/dist/types/packages/searchbar/searchbar.taro.d.ts +72 -44
- package/dist/types/packages/shortpassword/index.taro.d.ts +1 -0
- package/dist/types/packages/shortpassword/shortpassword.taro.d.ts +89 -24
- package/dist/types/packages/skeleton/skeleton.taro.d.ts +35 -7
- package/dist/types/packages/step/step.taro.d.ts +20 -4
- package/dist/types/packages/steps/steps.taro.d.ts +15 -3
- package/dist/types/packages/sticky/sticky.taro.d.ts +25 -5
- package/dist/types/packages/swipe/swipe.taro.d.ts +47 -11
- package/dist/types/packages/swiper/swiper.taro.d.ts +35 -7
- package/dist/types/packages/switch/switch.taro.d.ts +30 -6
- package/dist/types/packages/tabbar/tabbar.taro.d.ts +35 -7
- package/dist/types/packages/tabbaritem/tabbaritem.taro.d.ts +10 -2
- package/dist/types/packages/tabpane/tabpane.taro.d.ts +15 -3
- package/dist/types/packages/tabs/tabs.taro.d.ts +60 -12
- package/dist/types/packages/textarea/textarea.taro.d.ts +60 -12
- package/dist/types/packages/toast/index.taro.d.ts +1 -0
- package/dist/types/packages/toast/toast.taro.d.ts +9 -11
- package/dist/types/packages/trendarrow/trendarrow.taro.d.ts +57 -15
- package/dist/types/packages/uploader/uploader.taro.d.ts +165 -33
- package/dist/types/packages/video/index.taro.d.ts +2 -1
- package/dist/types/packages/video/video.taro.d.ts +41 -0
- package/dist/types/packages/virtuallist/index.taro.d.ts +1 -0
- package/dist/types/packages/virtuallist/type.d.ts +0 -17
- package/dist/types/packages/virtuallist/utils.d.ts +3 -3
- package/dist/types/packages/virtuallist/virtuallist.taro.d.ts +45 -14
- package/dist/types/packages/watermark/index.taro.d.ts +1 -0
- package/dist/types/packages/watermark/watermark.taro.d.ts +72 -17
- package/package.json +1 -1
- package/dist/esm/actionsheet.taro-d2217152.js +0 -61
- package/dist/esm/animatingnumbers.taro-c2a52dbd.js +0 -103
- package/dist/esm/searchbar.taro-37ade36e.js +0 -159
- package/dist/esm/shortpassword.taro-f7292032.js +0 -146
- package/dist/esm/toast.taro-92c10e1d.js +0 -114
- package/dist/esm/trendarrow.taro-0cf43935.js +0 -72
- package/dist/esm/video-5d106e33.js +0 -73
- package/dist/types/packages/video/video.d.ts +0 -24
- /package/dist/esm/{avatargroup-ad5ffb46.js → avatargroup.taro-ad5ffb46.js} +0 -0
package/dist/nutui.react.umd.js
CHANGED
|
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8
8
|
return value;
|
|
9
9
|
};
|
|
10
10
|
/*!
|
|
11
|
-
* @nutui/nutui-react-taro v2.0.0-alpha.
|
|
11
|
+
* @nutui/nutui-react-taro v2.0.0-alpha.13 Wed May 31 2023 15:00:24 GMT+0800 (China Standard Time)
|
|
12
12
|
* (c) 2023 @jdf2e.
|
|
13
13
|
* Released under the MIT License.
|
|
14
14
|
*/
|
|
@@ -1958,7 +1958,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1958
1958
|
onClick: (event) => {
|
|
1959
1959
|
}
|
|
1960
1960
|
};
|
|
1961
|
-
const classPrefix$
|
|
1961
|
+
const classPrefix$k = "nut-cell";
|
|
1962
1962
|
const Cell = (props) => {
|
|
1963
1963
|
const {
|
|
1964
1964
|
children,
|
|
@@ -1989,19 +1989,19 @@ var __publicField = (obj, key, value) => {
|
|
|
1989
1989
|
return /* @__PURE__ */ React.createElement(
|
|
1990
1990
|
"div",
|
|
1991
1991
|
{
|
|
1992
|
-
className: classNames(classPrefix$
|
|
1992
|
+
className: classNames(classPrefix$k, className),
|
|
1993
1993
|
onClick: (event) => handleClick(event),
|
|
1994
1994
|
style: baseStyle,
|
|
1995
1995
|
...rest
|
|
1996
1996
|
},
|
|
1997
|
-
children || /* @__PURE__ */ React.createElement(React.Fragment, null, title || description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
1997
|
+
children || /* @__PURE__ */ React.createElement(React.Fragment, null, title || description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$k}__left` }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$k}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$k}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React.createElement(
|
|
1998
1998
|
"div",
|
|
1999
1999
|
{
|
|
2000
|
-
className: `${classPrefix$
|
|
2000
|
+
className: `${classPrefix$k}__extra`,
|
|
2001
2001
|
style: styles
|
|
2002
2002
|
},
|
|
2003
2003
|
extra
|
|
2004
|
-
) : null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
2004
|
+
) : null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$k}__divider` }))
|
|
2005
2005
|
);
|
|
2006
2006
|
};
|
|
2007
2007
|
Cell.defaultProps = defaultProps$1t;
|
|
@@ -2012,16 +2012,16 @@ var __publicField = (obj, key, value) => {
|
|
|
2012
2012
|
description: "",
|
|
2013
2013
|
divider: true
|
|
2014
2014
|
};
|
|
2015
|
-
const classPrefix$
|
|
2015
|
+
const classPrefix$j = "nut-cell-group";
|
|
2016
2016
|
const CellGroup = (props) => {
|
|
2017
2017
|
const { children, className, style, title, description, divider, ...rest } = {
|
|
2018
2018
|
...defaultProps$1s,
|
|
2019
2019
|
...props
|
|
2020
2020
|
};
|
|
2021
|
-
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$
|
|
2021
|
+
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$j, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$j}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$j}__description` }, description) : null, /* @__PURE__ */ React.createElement(
|
|
2022
2022
|
"div",
|
|
2023
2023
|
{
|
|
2024
|
-
className: `${classPrefix$
|
|
2024
|
+
className: `${classPrefix$j}__wrap ${divider ? `${classPrefix$j}__wrap--divider` : ""}`
|
|
2025
2025
|
},
|
|
2026
2026
|
children
|
|
2027
2027
|
));
|
|
@@ -2576,7 +2576,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2576
2576
|
};
|
|
2577
2577
|
Image$1.defaultProps = defaultProps$1q;
|
|
2578
2578
|
Image$1.displayName = "NutImage";
|
|
2579
|
-
const defaultOverlayProps = {
|
|
2579
|
+
const defaultOverlayProps$1 = {
|
|
2580
2580
|
...ComponentDefaults,
|
|
2581
2581
|
zIndex: 1e3,
|
|
2582
2582
|
duration: 0.3,
|
|
@@ -2586,7 +2586,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2586
2586
|
onClick: (event) => {
|
|
2587
2587
|
}
|
|
2588
2588
|
};
|
|
2589
|
-
const Overlay = (props) => {
|
|
2589
|
+
const Overlay$1 = (props) => {
|
|
2590
2590
|
const {
|
|
2591
2591
|
children,
|
|
2592
2592
|
zIndex,
|
|
@@ -2601,7 +2601,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2601
2601
|
onClick,
|
|
2602
2602
|
...rest
|
|
2603
2603
|
} = {
|
|
2604
|
-
...defaultOverlayProps,
|
|
2604
|
+
...defaultOverlayProps$1,
|
|
2605
2605
|
...props
|
|
2606
2606
|
};
|
|
2607
2607
|
const classPrefix2 = `nut-overlay`;
|
|
@@ -2666,8 +2666,8 @@ var __publicField = (obj, key, value) => {
|
|
|
2666
2666
|
children
|
|
2667
2667
|
));
|
|
2668
2668
|
};
|
|
2669
|
-
Overlay.defaultProps = defaultOverlayProps;
|
|
2670
|
-
Overlay.displayName = "NutOverlay";
|
|
2669
|
+
Overlay$1.defaultProps = defaultOverlayProps$1;
|
|
2670
|
+
Overlay$1.displayName = "NutOverlay";
|
|
2671
2671
|
const DataContext$1 = React.createContext({});
|
|
2672
2672
|
const defaultProps$1p = {
|
|
2673
2673
|
...ComponentDefaults,
|
|
@@ -2716,21 +2716,21 @@ var __publicField = (obj, key, value) => {
|
|
|
2716
2716
|
contentPosition: "center",
|
|
2717
2717
|
direction: "horizontal"
|
|
2718
2718
|
};
|
|
2719
|
-
const classPrefix$
|
|
2719
|
+
const classPrefix$i = `nut-divider`;
|
|
2720
2720
|
const Divider = (props) => {
|
|
2721
2721
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
2722
2722
|
...defaultProps$1o,
|
|
2723
2723
|
...props
|
|
2724
2724
|
};
|
|
2725
2725
|
const classes = direction === "horizontal" ? classNames({
|
|
2726
|
-
[`${classPrefix$
|
|
2727
|
-
[`${classPrefix$
|
|
2728
|
-
[`${classPrefix$
|
|
2729
|
-
[`${classPrefix$
|
|
2730
|
-
[`${classPrefix$
|
|
2726
|
+
[`${classPrefix$i}`]: true,
|
|
2727
|
+
[`${classPrefix$i}__center`]: children,
|
|
2728
|
+
[`${classPrefix$i}__left`]: contentPosition === "left",
|
|
2729
|
+
[`${classPrefix$i}__right`]: contentPosition === "right",
|
|
2730
|
+
[`${classPrefix$i}__hairline`]: true
|
|
2731
2731
|
}) : classNames({
|
|
2732
|
-
[`${classPrefix$
|
|
2733
|
-
[`${classPrefix$
|
|
2732
|
+
[`${classPrefix$i}`]: true,
|
|
2733
|
+
[`${classPrefix$i}__vertical`]: direction === "vertical"
|
|
2734
2734
|
});
|
|
2735
2735
|
return /* @__PURE__ */ React.createElement("div", { className: `${classes} ${className || ""}`, style, ...rest }, children);
|
|
2736
2736
|
};
|
|
@@ -2891,7 +2891,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2891
2891
|
};
|
|
2892
2892
|
Layout.defaultProps = defaultProps$1l;
|
|
2893
2893
|
Layout.displayName = "NutLayout";
|
|
2894
|
-
const classPrefix$
|
|
2894
|
+
const classPrefix$h = "nut-row";
|
|
2895
2895
|
const defaultProps$1k = {
|
|
2896
2896
|
...ComponentDefaults,
|
|
2897
2897
|
type: "",
|
|
@@ -2926,7 +2926,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2926
2926
|
${getClass("justify", justify)}
|
|
2927
2927
|
${getClass("align", align)}
|
|
2928
2928
|
${getClass("flex", wrap)}
|
|
2929
|
-
${classPrefix$
|
|
2929
|
+
${classPrefix$h}
|
|
2930
2930
|
`;
|
|
2931
2931
|
};
|
|
2932
2932
|
const parentRow = {
|
|
@@ -3002,7 +3002,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3002
3002
|
position: "top",
|
|
3003
3003
|
zIndex: 2e3
|
|
3004
3004
|
};
|
|
3005
|
-
const classPrefix$
|
|
3005
|
+
const classPrefix$g = "nut-sticky";
|
|
3006
3006
|
const Sticky = (props) => {
|
|
3007
3007
|
const {
|
|
3008
3008
|
position,
|
|
@@ -3104,7 +3104,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3104
3104
|
{
|
|
3105
3105
|
ref: rootRef,
|
|
3106
3106
|
style: rootStyle,
|
|
3107
|
-
className: classNames(classPrefix$
|
|
3107
|
+
className: classNames(classPrefix$g, className),
|
|
3108
3108
|
...rest
|
|
3109
3109
|
},
|
|
3110
3110
|
/* @__PURE__ */ React.createElement(
|
|
@@ -3470,7 +3470,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3470
3470
|
...rest
|
|
3471
3471
|
},
|
|
3472
3472
|
overlay && /* @__PURE__ */ React.createElement(
|
|
3473
|
-
Overlay,
|
|
3473
|
+
Overlay$1,
|
|
3474
3474
|
{
|
|
3475
3475
|
visible,
|
|
3476
3476
|
zIndex: 200,
|
|
@@ -5317,7 +5317,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5317
5317
|
},
|
|
5318
5318
|
onClickOverlay: (e) => true,
|
|
5319
5319
|
onClickCloseIcon: (e) => true,
|
|
5320
|
-
...defaultOverlayProps
|
|
5320
|
+
...defaultOverlayProps$1
|
|
5321
5321
|
};
|
|
5322
5322
|
let _zIndex = 2e3;
|
|
5323
5323
|
const Popup = (props) => {
|
|
@@ -5458,7 +5458,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5458
5458
|
};
|
|
5459
5459
|
const renderNode = () => {
|
|
5460
5460
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, overlay ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
5461
|
-
Overlay,
|
|
5461
|
+
Overlay$1,
|
|
5462
5462
|
{
|
|
5463
5463
|
style: overlayStyles,
|
|
5464
5464
|
className: overlayClassName,
|
|
@@ -5818,7 +5818,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5818
5818
|
duration: 300,
|
|
5819
5819
|
autoHeight: false
|
|
5820
5820
|
};
|
|
5821
|
-
const classPrefix$
|
|
5821
|
+
const classPrefix$f = "nut-tabs";
|
|
5822
5822
|
const Tabs = (props) => {
|
|
5823
5823
|
const {
|
|
5824
5824
|
activeColor,
|
|
@@ -5880,14 +5880,14 @@ var __publicField = (obj, key, value) => {
|
|
|
5880
5880
|
}
|
|
5881
5881
|
}, [children]);
|
|
5882
5882
|
const classes = classNames(
|
|
5883
|
-
classPrefix$
|
|
5884
|
-
`${classPrefix$
|
|
5883
|
+
classPrefix$f,
|
|
5884
|
+
`${classPrefix$f}--${direction}`,
|
|
5885
5885
|
className
|
|
5886
5886
|
);
|
|
5887
|
-
const classesTitle = classNames(`${classPrefix$
|
|
5888
|
-
[`${classPrefix$
|
|
5889
|
-
[`${classPrefix$
|
|
5890
|
-
[`${classPrefix$
|
|
5887
|
+
const classesTitle = classNames(`${classPrefix$f}__titles`, {
|
|
5888
|
+
[`${classPrefix$f}__titles--${activeType}`]: activeType,
|
|
5889
|
+
[`${classPrefix$f}__titles--scrollable`]: true,
|
|
5890
|
+
[`${classPrefix$f}__titles--${align}`]: align
|
|
5891
5891
|
});
|
|
5892
5892
|
const tabsActiveStyle = {
|
|
5893
5893
|
color: activeType === "smile" ? activeColor : "",
|
|
@@ -5933,7 +5933,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5933
5933
|
onClick: (e) => {
|
|
5934
5934
|
tabChange(item);
|
|
5935
5935
|
},
|
|
5936
|
-
className: classNames(`${classPrefix$
|
|
5936
|
+
className: classNames(`${classPrefix$f}__titles-item`, {
|
|
5937
5937
|
[`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
|
|
5938
5938
|
[`nut-tabs__titles-item--disabled`]: item.disabled,
|
|
5939
5939
|
[`nut-tabs__titles-item--${align}`]: align
|
|
@@ -5943,14 +5943,14 @@ var __publicField = (obj, key, value) => {
|
|
|
5943
5943
|
activeType === "line" && /* @__PURE__ */ React.createElement(
|
|
5944
5944
|
components.View,
|
|
5945
5945
|
{
|
|
5946
|
-
className: `${classPrefix$
|
|
5946
|
+
className: `${classPrefix$f}__titles-item__line`,
|
|
5947
5947
|
style: tabsActiveStyle
|
|
5948
5948
|
}
|
|
5949
5949
|
),
|
|
5950
5950
|
activeType === "smile" && /* @__PURE__ */ React.createElement(
|
|
5951
5951
|
components.View,
|
|
5952
5952
|
{
|
|
5953
|
-
className: `${classPrefix$
|
|
5953
|
+
className: `${classPrefix$f}__titles-item__smile`,
|
|
5954
5954
|
style: tabsActiveStyle
|
|
5955
5955
|
},
|
|
5956
5956
|
/* @__PURE__ */ React.createElement(a$j, { color: activeColor, width: 40, height: 20 })
|
|
@@ -5962,14 +5962,14 @@ var __publicField = (obj, key, value) => {
|
|
|
5962
5962
|
{
|
|
5963
5963
|
ellipsis: true
|
|
5964
5964
|
},
|
|
5965
|
-
`${classPrefix$
|
|
5965
|
+
`${classPrefix$f}__titles-item__text`
|
|
5966
5966
|
)
|
|
5967
5967
|
},
|
|
5968
5968
|
item.title
|
|
5969
5969
|
)
|
|
5970
5970
|
);
|
|
5971
5971
|
})
|
|
5972
|
-
), /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix$
|
|
5972
|
+
), /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix$f}__content__wrap` }, /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix$f}__content`, style: contentStyle }, React.Children.map(children, (child, idx) => {
|
|
5973
5973
|
if (!React.isValidElement(child)) {
|
|
5974
5974
|
return null;
|
|
5975
5975
|
}
|
|
@@ -8070,7 +8070,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8070
8070
|
},
|
|
8071
8071
|
options: []
|
|
8072
8072
|
};
|
|
8073
|
-
const classPrefix$
|
|
8073
|
+
const classPrefix$e = "nut-checkboxgroup";
|
|
8074
8074
|
const CheckboxGroup = React.forwardRef(
|
|
8075
8075
|
(props, ref) => {
|
|
8076
8076
|
const { children } = { ...defaultProps$$, ...props };
|
|
@@ -8152,7 +8152,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8152
8152
|
/* @__PURE__ */ React.createElement(
|
|
8153
8153
|
"div",
|
|
8154
8154
|
{
|
|
8155
|
-
className: classNames(classPrefix$
|
|
8155
|
+
className: classNames(classPrefix$e, className, {
|
|
8156
8156
|
[`nut-checkboxgroup--${props.direction}`]: props.direction
|
|
8157
8157
|
}),
|
|
8158
8158
|
...rest
|
|
@@ -8174,7 +8174,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8174
8174
|
onChange: (value) => {
|
|
8175
8175
|
}
|
|
8176
8176
|
};
|
|
8177
|
-
const classPrefix$
|
|
8177
|
+
const classPrefix$d = "nut-checkbox";
|
|
8178
8178
|
const Checkbox = (props) => {
|
|
8179
8179
|
const { children } = {
|
|
8180
8180
|
...defaultProps$_,
|
|
@@ -8236,22 +8236,22 @@ var __publicField = (obj, key, value) => {
|
|
|
8236
8236
|
};
|
|
8237
8237
|
const color = () => {
|
|
8238
8238
|
if (innerDisabled) {
|
|
8239
|
-
return `${classPrefix$
|
|
8239
|
+
return `${classPrefix$d}__icon--disable`;
|
|
8240
8240
|
}
|
|
8241
8241
|
if (innerChecked) {
|
|
8242
8242
|
if (innerIndeterminate) {
|
|
8243
|
-
return `${classPrefix$
|
|
8243
|
+
return `${classPrefix$d}__icon--indeterminate`;
|
|
8244
8244
|
}
|
|
8245
|
-
return `${classPrefix$
|
|
8245
|
+
return `${classPrefix$d}__icon`;
|
|
8246
8246
|
}
|
|
8247
|
-
return `${classPrefix$
|
|
8247
|
+
return `${classPrefix$d}__icon--unchecked`;
|
|
8248
8248
|
};
|
|
8249
8249
|
const renderLabel = () => {
|
|
8250
8250
|
return /* @__PURE__ */ React.createElement(
|
|
8251
8251
|
"span",
|
|
8252
8252
|
{
|
|
8253
|
-
className: classNames(`${classPrefix$
|
|
8254
|
-
[`${classPrefix$
|
|
8253
|
+
className: classNames(`${classPrefix$d}__label `, {
|
|
8254
|
+
[`${classPrefix$d}__label--disabled`]: innerDisabled
|
|
8255
8255
|
})
|
|
8256
8256
|
},
|
|
8257
8257
|
children || label
|
|
@@ -8270,8 +8270,8 @@ var __publicField = (obj, key, value) => {
|
|
|
8270
8270
|
return /* @__PURE__ */ React.createElement(
|
|
8271
8271
|
"div",
|
|
8272
8272
|
{
|
|
8273
|
-
className: classNames(classPrefix$
|
|
8274
|
-
[`${classPrefix$
|
|
8273
|
+
className: classNames(classPrefix$d, className, {
|
|
8274
|
+
[`${classPrefix$d}--reverse`]: labelPosition === "left"
|
|
8275
8275
|
}),
|
|
8276
8276
|
...rest,
|
|
8277
8277
|
onClick: handleClick
|
|
@@ -9709,7 +9709,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9709
9709
|
digits: 0,
|
|
9710
9710
|
async: false
|
|
9711
9711
|
};
|
|
9712
|
-
const classPrefix$
|
|
9712
|
+
const classPrefix$c = `nut-inputnumber`;
|
|
9713
9713
|
const InputNumber = (props) => {
|
|
9714
9714
|
const {
|
|
9715
9715
|
children,
|
|
@@ -9752,8 +9752,8 @@ var __publicField = (obj, key, value) => {
|
|
|
9752
9752
|
}, []);
|
|
9753
9753
|
const classes = classNames(
|
|
9754
9754
|
{
|
|
9755
|
-
[`${classPrefix$
|
|
9756
|
-
[`${classPrefix$
|
|
9755
|
+
[`${classPrefix$c}`]: true,
|
|
9756
|
+
[`${classPrefix$c}--disabled`]: disabled
|
|
9757
9757
|
},
|
|
9758
9758
|
className
|
|
9759
9759
|
);
|
|
@@ -10174,7 +10174,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10174
10174
|
onClick: () => parent.toggleMenuItem(index)
|
|
10175
10175
|
}
|
|
10176
10176
|
) : null, /* @__PURE__ */ React.createElement(
|
|
10177
|
-
Overlay,
|
|
10177
|
+
Overlay$1,
|
|
10178
10178
|
{
|
|
10179
10179
|
className: "nut-menu__overlay",
|
|
10180
10180
|
style: getPosition(),
|
|
@@ -10399,7 +10399,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10399
10399
|
direction: "vertical",
|
|
10400
10400
|
options: []
|
|
10401
10401
|
};
|
|
10402
|
-
const classPrefix$
|
|
10402
|
+
const classPrefix$b = "nut-radiogroup";
|
|
10403
10403
|
const RadioGroup = React.forwardRef(
|
|
10404
10404
|
(props, ref) => {
|
|
10405
10405
|
const {
|
|
@@ -10455,8 +10455,8 @@ var __publicField = (obj, key, value) => {
|
|
|
10455
10455
|
/* @__PURE__ */ React.createElement(
|
|
10456
10456
|
"div",
|
|
10457
10457
|
{
|
|
10458
|
-
className: classNames(classPrefix$
|
|
10459
|
-
[`${classPrefix$
|
|
10458
|
+
className: classNames(classPrefix$b, className, {
|
|
10459
|
+
[`${classPrefix$b}--${props.direction}`]: props.direction
|
|
10460
10460
|
}),
|
|
10461
10461
|
...rest
|
|
10462
10462
|
},
|
|
@@ -11003,15 +11003,15 @@ var __publicField = (obj, key, value) => {
|
|
|
11003
11003
|
disabled: false,
|
|
11004
11004
|
maxLength: 9999,
|
|
11005
11005
|
clearable: true,
|
|
11006
|
-
|
|
11007
|
-
align: "left",
|
|
11008
|
-
readonly: true,
|
|
11006
|
+
readOnly: false,
|
|
11009
11007
|
autoFocus: false,
|
|
11010
|
-
|
|
11011
|
-
|
|
11008
|
+
left: "",
|
|
11009
|
+
right: "",
|
|
11010
|
+
rightIn: "",
|
|
11011
|
+
leftIn: /* @__PURE__ */ React.createElement(a$7, { size: "12" })
|
|
11012
11012
|
};
|
|
11013
11013
|
const SearchBar = (props) => {
|
|
11014
|
-
const
|
|
11014
|
+
const classPrefix2 = "nut-searchbar";
|
|
11015
11015
|
const { locale } = useConfig$1();
|
|
11016
11016
|
const searchRef = React.useRef(null);
|
|
11017
11017
|
const [value, setValue] = React.useState(() => props.value);
|
|
@@ -11022,32 +11022,22 @@ var __publicField = (obj, key, value) => {
|
|
|
11022
11022
|
disabled,
|
|
11023
11023
|
maxLength,
|
|
11024
11024
|
clearable,
|
|
11025
|
-
clearSize,
|
|
11026
|
-
align,
|
|
11027
11025
|
readOnly,
|
|
11028
11026
|
autoFocus,
|
|
11029
|
-
|
|
11030
|
-
|
|
11031
|
-
|
|
11032
|
-
|
|
11033
|
-
leftoutIcon,
|
|
11034
|
-
rightoutIcon,
|
|
11027
|
+
right,
|
|
11028
|
+
left,
|
|
11029
|
+
leftIn,
|
|
11030
|
+
rightIn,
|
|
11035
11031
|
onChange,
|
|
11036
11032
|
onFocus,
|
|
11037
11033
|
onBlur,
|
|
11038
11034
|
onClear,
|
|
11039
|
-
onCancel,
|
|
11040
11035
|
onSearch,
|
|
11041
|
-
onClickInput
|
|
11042
|
-
onClickLeftinIcon,
|
|
11043
|
-
onClickLeftoutIcon,
|
|
11044
|
-
onClickRightinIcon,
|
|
11045
|
-
onClickRightoutIcon
|
|
11036
|
+
onClickInput
|
|
11046
11037
|
} = {
|
|
11047
11038
|
...defaultProps$M,
|
|
11048
11039
|
...props
|
|
11049
11040
|
};
|
|
11050
|
-
const alignClass = `${align}`;
|
|
11051
11041
|
const forceFocus = () => {
|
|
11052
11042
|
const searchSelf = searchRef.current;
|
|
11053
11043
|
searchSelf && searchSelf.focus();
|
|
@@ -11078,7 +11068,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11078
11068
|
return /* @__PURE__ */ React.createElement(
|
|
11079
11069
|
"input",
|
|
11080
11070
|
{
|
|
11081
|
-
className: `${
|
|
11071
|
+
className: `${classPrefix2}__input ${shape === "round" ? `${classPrefix2}__round` : ""} ${clearable ? `${classPrefix2}__input-clear` : ""}`,
|
|
11082
11072
|
ref: searchRef,
|
|
11083
11073
|
style: { ...props.style },
|
|
11084
11074
|
value: value || "",
|
|
@@ -11097,76 +11087,34 @@ var __publicField = (obj, key, value) => {
|
|
|
11097
11087
|
const clickInput = (e) => {
|
|
11098
11088
|
onClickInput && onClickInput(e);
|
|
11099
11089
|
};
|
|
11100
|
-
const
|
|
11101
|
-
if (!
|
|
11090
|
+
const renderLeftIn = () => {
|
|
11091
|
+
if (!leftIn)
|
|
11102
11092
|
return null;
|
|
11103
|
-
return /* @__PURE__ */ React.createElement(
|
|
11104
|
-
"div",
|
|
11105
|
-
{
|
|
11106
|
-
className: `${searchbarBem("leftin-icon")} ${searchbarBem("icon")}`,
|
|
11107
|
-
onClick: (e) => clickLeftIcon("in-left", e)
|
|
11108
|
-
},
|
|
11109
|
-
leftinIcon
|
|
11110
|
-
);
|
|
11093
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__leftin ${classPrefix2}__icon` }, leftIn);
|
|
11111
11094
|
};
|
|
11112
|
-
const
|
|
11113
|
-
if (!
|
|
11095
|
+
const renderLeft = () => {
|
|
11096
|
+
if (!left)
|
|
11114
11097
|
return null;
|
|
11115
|
-
return /* @__PURE__ */ React.createElement(
|
|
11116
|
-
"div",
|
|
11117
|
-
{
|
|
11118
|
-
className: `${searchbarBem("leftout-icon")}`,
|
|
11119
|
-
onClick: (e) => clickLeftIcon("out-left", e)
|
|
11120
|
-
},
|
|
11121
|
-
leftoutIcon
|
|
11122
|
-
);
|
|
11123
|
-
};
|
|
11124
|
-
const clickLeftIcon = (flag, event) => {
|
|
11125
|
-
if (flag === "in-left") {
|
|
11126
|
-
onClickLeftinIcon && onClickLeftinIcon(value, event);
|
|
11127
|
-
} else {
|
|
11128
|
-
onClickLeftoutIcon && onClickLeftoutIcon(value, event);
|
|
11129
|
-
}
|
|
11098
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__left` }, left);
|
|
11130
11099
|
};
|
|
11131
|
-
const
|
|
11132
|
-
if (!
|
|
11100
|
+
const renderRightIn = () => {
|
|
11101
|
+
if (!rightIn)
|
|
11133
11102
|
return null;
|
|
11134
|
-
return /* @__PURE__ */ React.createElement(
|
|
11135
|
-
"div",
|
|
11136
|
-
{
|
|
11137
|
-
className: `${searchbarBem("rightin-icon")} ${searchbarBem("icon")}`,
|
|
11138
|
-
onClick: (e) => clickRightIcon("in-right", e)
|
|
11139
|
-
},
|
|
11140
|
-
rightinIcon
|
|
11141
|
-
);
|
|
11103
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__rightin ${classPrefix2}__icon` }, rightIn);
|
|
11142
11104
|
};
|
|
11143
|
-
const
|
|
11144
|
-
if (!
|
|
11105
|
+
const renderRight = () => {
|
|
11106
|
+
if (!right)
|
|
11145
11107
|
return null;
|
|
11146
|
-
return /* @__PURE__ */ React.createElement(
|
|
11147
|
-
"div",
|
|
11148
|
-
{
|
|
11149
|
-
className: `${searchbarBem("rightout-icon")}`,
|
|
11150
|
-
onClick: (e) => clickRightIcon("out-right", e)
|
|
11151
|
-
},
|
|
11152
|
-
rightoutIcon
|
|
11153
|
-
);
|
|
11154
|
-
};
|
|
11155
|
-
const clickRightIcon = (flag, event) => {
|
|
11156
|
-
if (flag === "in-left") {
|
|
11157
|
-
onClickRightinIcon && onClickRightinIcon(value, event);
|
|
11158
|
-
} else {
|
|
11159
|
-
onClickRightoutIcon && onClickRightoutIcon(value, event);
|
|
11160
|
-
}
|
|
11108
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__right` }, right);
|
|
11161
11109
|
};
|
|
11162
11110
|
const handleClear = () => {
|
|
11163
11111
|
return /* @__PURE__ */ React.createElement(
|
|
11164
11112
|
"div",
|
|
11165
11113
|
{
|
|
11166
|
-
className: `${
|
|
11114
|
+
className: `${classPrefix2}__clear ${rightIn ? "pos-right" : ""}`,
|
|
11167
11115
|
onClick: (e) => clearaVal(e)
|
|
11168
11116
|
},
|
|
11169
|
-
/* @__PURE__ */ React.createElement(a$q, {
|
|
11117
|
+
/* @__PURE__ */ React.createElement(a$q, { color: "#555", size: 12 })
|
|
11170
11118
|
);
|
|
11171
11119
|
};
|
|
11172
11120
|
const clearaVal = (event) => {
|
|
@@ -11177,12 +11125,6 @@ var __publicField = (obj, key, value) => {
|
|
|
11177
11125
|
onClear && onClear(event);
|
|
11178
11126
|
forceFocus();
|
|
11179
11127
|
};
|
|
11180
|
-
const renderRightLabel = () => {
|
|
11181
|
-
if (actionText) {
|
|
11182
|
-
return /* @__PURE__ */ React.createElement("div", { className: searchbarBem("action-text"), onClick: search }, actionText);
|
|
11183
|
-
}
|
|
11184
|
-
return null;
|
|
11185
|
-
};
|
|
11186
11128
|
const onKeypress = (e) => {
|
|
11187
11129
|
if (e.keyCode === 13) {
|
|
11188
11130
|
if (typeof e.cancelable !== "boolean" || e.cancelable) {
|
|
@@ -11191,71 +11133,28 @@ var __publicField = (obj, key, value) => {
|
|
|
11191
11133
|
onSearch && onSearch(value);
|
|
11192
11134
|
}
|
|
11193
11135
|
};
|
|
11194
|
-
const search = () => {
|
|
11195
|
-
onSearch && onSearch(value);
|
|
11196
|
-
};
|
|
11197
|
-
const renderLabel = () => {
|
|
11198
|
-
if (label) {
|
|
11199
|
-
return /* @__PURE__ */ React.createElement("div", { className: searchbarBem("label") }, label);
|
|
11200
|
-
}
|
|
11201
|
-
return null;
|
|
11202
|
-
};
|
|
11203
|
-
const envClass = () => {
|
|
11204
|
-
return Taro.getEnv() === "WEB" ? "nut-searchbar-taro" : "";
|
|
11205
|
-
};
|
|
11206
11136
|
return /* @__PURE__ */ React.createElement(
|
|
11207
11137
|
"div",
|
|
11208
11138
|
{
|
|
11209
|
-
className: `${
|
|
11210
|
-
style: { ...props.style
|
|
11139
|
+
className: `${classPrefix2} ${disabled ? `${classPrefix2}__disabled` : ""} ${className || ""}`,
|
|
11140
|
+
style: { ...props.style }
|
|
11211
11141
|
},
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
"div",
|
|
11216
|
-
{
|
|
11217
|
-
className: `${searchbarBem("content")}`,
|
|
11218
|
-
style: { background: props.inputBackground }
|
|
11219
|
-
},
|
|
11220
|
-
renderLeftinIcon(),
|
|
11221
|
-
/* @__PURE__ */ React.createElement("div", { className: "nut-searchbar__input-box" }, renderField()),
|
|
11222
|
-
renderRightinIcon(),
|
|
11223
|
-
clearable && value && handleClear()
|
|
11224
|
-
),
|
|
11225
|
-
renderRightoutIcon(),
|
|
11226
|
-
renderRightLabel()
|
|
11142
|
+
renderLeft(),
|
|
11143
|
+
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content` }, renderLeftIn(), /* @__PURE__ */ React.createElement("div", { className: "nut-searchbar__input-box" }, renderField()), renderRightIn(), clearable && value && handleClear()),
|
|
11144
|
+
renderRight()
|
|
11227
11145
|
);
|
|
11228
11146
|
};
|
|
11229
11147
|
SearchBar.defaultProps = defaultProps$M;
|
|
11230
11148
|
SearchBar.displayName = "NutSearchBar";
|
|
11231
11149
|
const defaultProps$L = {
|
|
11232
11150
|
...ComponentDefaults,
|
|
11233
|
-
|
|
11234
|
-
description: "",
|
|
11235
|
-
tips: "",
|
|
11236
|
-
tipsIcon: null,
|
|
11237
|
-
iconSize: 11,
|
|
11151
|
+
value: "",
|
|
11238
11152
|
visible: false,
|
|
11239
|
-
|
|
11240
|
-
|
|
11241
|
-
noButton: true,
|
|
11242
|
-
closeOnClickOverlay: true,
|
|
11153
|
+
plain: false,
|
|
11154
|
+
hideFooter: true,
|
|
11243
11155
|
length: 6,
|
|
11244
11156
|
// 1~6
|
|
11245
|
-
|
|
11246
|
-
autoFocus: false,
|
|
11247
|
-
onChange: (value) => {
|
|
11248
|
-
},
|
|
11249
|
-
onOk: (value) => {
|
|
11250
|
-
},
|
|
11251
|
-
onCancel: () => {
|
|
11252
|
-
},
|
|
11253
|
-
onClose: () => {
|
|
11254
|
-
},
|
|
11255
|
-
onTips: () => {
|
|
11256
|
-
},
|
|
11257
|
-
onComplete: (value) => {
|
|
11258
|
-
}
|
|
11157
|
+
autoFocus: false
|
|
11259
11158
|
};
|
|
11260
11159
|
const ShortPassword = (props) => {
|
|
11261
11160
|
const { locale } = useConfig$1();
|
|
@@ -11263,85 +11162,54 @@ var __publicField = (obj, key, value) => {
|
|
|
11263
11162
|
title,
|
|
11264
11163
|
description,
|
|
11265
11164
|
tips,
|
|
11266
|
-
tipsIcon,
|
|
11267
|
-
iconSize,
|
|
11268
11165
|
visible,
|
|
11269
|
-
|
|
11270
|
-
|
|
11271
|
-
|
|
11272
|
-
closeOnClickOverlay,
|
|
11166
|
+
value,
|
|
11167
|
+
error,
|
|
11168
|
+
hideFooter,
|
|
11273
11169
|
length,
|
|
11170
|
+
plain,
|
|
11274
11171
|
style,
|
|
11275
11172
|
className,
|
|
11173
|
+
closeable,
|
|
11174
|
+
autoFocus,
|
|
11175
|
+
onFocus,
|
|
11276
11176
|
onChange,
|
|
11277
|
-
|
|
11177
|
+
onConfirm,
|
|
11278
11178
|
onTips,
|
|
11279
11179
|
onCancel,
|
|
11280
11180
|
onClose,
|
|
11281
11181
|
onComplete,
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
return Math.min(Math.max(4, val), 6);
|
|
11182
|
+
onClickOverlay,
|
|
11183
|
+
onClickCloseIcon,
|
|
11184
|
+
...rest
|
|
11185
|
+
} = {
|
|
11186
|
+
...defaultProps$L,
|
|
11187
|
+
...props
|
|
11289
11188
|
};
|
|
11290
|
-
const
|
|
11291
|
-
const
|
|
11292
|
-
|
|
11189
|
+
const classPrefix2 = "nut-shortpassword";
|
|
11190
|
+
const comLen = React.useMemo(() => {
|
|
11191
|
+
return Math.min(Math.max(4, length || 4), 6);
|
|
11192
|
+
}, [length]);
|
|
11193
|
+
const format = (val) => {
|
|
11194
|
+
return val.slice(0, comLen);
|
|
11195
|
+
};
|
|
11196
|
+
const [inputValue, setInputValue] = usePropsValue({ value, onChange });
|
|
11293
11197
|
React.useEffect(() => {
|
|
11294
|
-
|
|
11198
|
+
if (visible && autoFocus) {
|
|
11199
|
+
onFocus && onFocus();
|
|
11200
|
+
}
|
|
11295
11201
|
}, [visible]);
|
|
11296
11202
|
React.useEffect(() => {
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
}, [modelValue]);
|
|
11301
|
-
const changeValue = (e) => {
|
|
11302
|
-
let inputValue2 = e.target.value;
|
|
11303
|
-
if (String(inputValue2).length > comLen) {
|
|
11304
|
-
inputValue2 = inputValue2.slice(0, comLen);
|
|
11305
|
-
}
|
|
11306
|
-
setInputValue(inputValue2);
|
|
11307
|
-
if (String(inputValue2).length === comLen) {
|
|
11308
|
-
onComplete && onComplete(inputValue2);
|
|
11309
|
-
}
|
|
11310
|
-
onChange && onChange(inputValue2);
|
|
11311
|
-
};
|
|
11312
|
-
const systemStyle = () => {
|
|
11313
|
-
const u = navigator.userAgent;
|
|
11314
|
-
const isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1;
|
|
11315
|
-
const isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
|
11316
|
-
let style2 = {};
|
|
11317
|
-
if (isIOS) {
|
|
11318
|
-
style2 = {
|
|
11319
|
-
paddingRight: "1200px"
|
|
11320
|
-
};
|
|
11203
|
+
const val = format(value);
|
|
11204
|
+
if (val.length >= comLen) {
|
|
11205
|
+
onComplete && onComplete(val);
|
|
11321
11206
|
}
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
opacity: 0,
|
|
11325
|
-
zIndex: 10
|
|
11326
|
-
};
|
|
11327
|
-
}
|
|
11328
|
-
return style2;
|
|
11329
|
-
};
|
|
11330
|
-
const focus = () => {
|
|
11331
|
-
if (textInput.current) {
|
|
11332
|
-
textInput.current.focus();
|
|
11333
|
-
}
|
|
11334
|
-
};
|
|
11207
|
+
setInputValue(format(value));
|
|
11208
|
+
}, [value]);
|
|
11335
11209
|
const sure = () => {
|
|
11336
|
-
|
|
11337
|
-
};
|
|
11338
|
-
const renderIcon = (size = "11px") => {
|
|
11339
|
-
return React.isValidElement(tipsIcon) ? React.cloneElement(tipsIcon, {
|
|
11340
|
-
...tipsIcon.props,
|
|
11341
|
-
size
|
|
11342
|
-
}) : /* @__PURE__ */ React.createElement(a$3, { size });
|
|
11210
|
+
onConfirm && onConfirm(inputValue);
|
|
11343
11211
|
};
|
|
11344
|
-
return /* @__PURE__ */ React.createElement(
|
|
11212
|
+
return /* @__PURE__ */ React.createElement(
|
|
11345
11213
|
Popup,
|
|
11346
11214
|
{
|
|
11347
11215
|
style: {
|
|
@@ -11349,28 +11217,28 @@ var __publicField = (obj, key, value) => {
|
|
|
11349
11217
|
borderRadius: "12px",
|
|
11350
11218
|
textAlign: "center"
|
|
11351
11219
|
},
|
|
11352
|
-
visible
|
|
11220
|
+
visible,
|
|
11353
11221
|
closeable: true,
|
|
11354
|
-
"close-on-click-overlay": closeOnClickOverlay,
|
|
11355
11222
|
onClickOverlay: onClose,
|
|
11356
|
-
onClickCloseIcon: onClose
|
|
11223
|
+
onClickCloseIcon: onClose,
|
|
11224
|
+
...rest
|
|
11357
11225
|
},
|
|
11358
|
-
/* @__PURE__ */ React.createElement("div", { className:
|
|
11359
|
-
"
|
|
11226
|
+
/* @__PURE__ */ React.createElement("div", { className: classNames(className, classPrefix2), style }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__title` }, title || locale.shortpassword.title), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__description` }, description || locale.shortpassword.description), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__input`, onClick: onFocus }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__input-site` }), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__input-fake` }, [...new Array(comLen).keys()].map((item, index) => {
|
|
11227
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__input-fake__li`, key: index }, inputValue.length > index && /* @__PURE__ */ React.createElement(React.Fragment, null, plain ? inputValue[index] : /* @__PURE__ */ React.createElement(
|
|
11228
|
+
"div",
|
|
11229
|
+
{
|
|
11230
|
+
className: `${classPrefix2}__input-fake__li__icon`
|
|
11231
|
+
}
|
|
11232
|
+
)));
|
|
11233
|
+
}))), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__message` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__message__error` }, error), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__message__forget`, onClick: onTips }, tips || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(a$3, { width: 11, height: 11, style: { marginRight: "3px" } }), locale.shortpassword.tips))), !hideFooter && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__footer` }, /* @__PURE__ */ React.createElement(
|
|
11234
|
+
"div",
|
|
11360
11235
|
{
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
|
|
11364
|
-
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
autoFocus,
|
|
11368
|
-
onChange: (e) => changeValue(e)
|
|
11369
|
-
}
|
|
11370
|
-
), /* @__PURE__ */ React.createElement("div", { className: b2("input-site") }), /* @__PURE__ */ React.createElement("div", { className: b2("input-fake"), onClick: () => focus() }, [...new Array(comLen).keys()].map((item, index) => {
|
|
11371
|
-
return /* @__PURE__ */ React.createElement("div", { className: b2("input-fake__li"), key: index }, String(inputValue).length > index ? /* @__PURE__ */ React.createElement("div", { className: b2("input-fake__li__icon") }) : null);
|
|
11372
|
-
}))), /* @__PURE__ */ React.createElement("div", { className: b2("message") }, /* @__PURE__ */ React.createElement("div", { className: b2("message__error") }, errorMsg), tips || locale.shortpassword.tips ? /* @__PURE__ */ React.createElement("div", { className: b2("message__forget") }, renderIcon(iconSize), /* @__PURE__ */ React.createElement("div", { className: b2("message__forget-tips"), onClick: onTips }, tips || locale.shortpassword.tips)) : null), !noButton ? /* @__PURE__ */ React.createElement("div", { className: b2("footer") }, /* @__PURE__ */ React.createElement("div", { className: b2("footer__cancel"), onClick: onCancel }, locale.cancel), /* @__PURE__ */ React.createElement("div", { className: b2("footer__sure"), onClick: () => sure() }, locale.confirm)) : null)
|
|
11373
|
-
));
|
|
11236
|
+
className: `${classPrefix2}__footer__cancel`,
|
|
11237
|
+
onClick: onCancel
|
|
11238
|
+
},
|
|
11239
|
+
locale.cancel
|
|
11240
|
+
), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__footer__sure`, onClick: sure }, locale.confirm)))
|
|
11241
|
+
);
|
|
11374
11242
|
};
|
|
11375
11243
|
ShortPassword.defaultProps = defaultProps$L;
|
|
11376
11244
|
ShortPassword.displayName = "NutShortPassword";
|
|
@@ -12343,50 +12211,40 @@ var __publicField = (obj, key, value) => {
|
|
|
12343
12211
|
Uploader.defaultProps = defaultProps$G;
|
|
12344
12212
|
Uploader.displayName = "NutUploader";
|
|
12345
12213
|
const defaultProps$F = {
|
|
12346
|
-
|
|
12347
|
-
|
|
12348
|
-
optionSubTag: "subname",
|
|
12349
|
-
chooseTagValue: "",
|
|
12214
|
+
...ComponentDefaults,
|
|
12215
|
+
visible: false,
|
|
12350
12216
|
title: "",
|
|
12351
|
-
color: "#ee0a24",
|
|
12352
12217
|
description: "",
|
|
12353
|
-
|
|
12218
|
+
options: [],
|
|
12219
|
+
optionKey: { name: "name", description: "description" },
|
|
12220
|
+
cancelText: "",
|
|
12354
12221
|
onCancel: () => {
|
|
12355
12222
|
},
|
|
12356
|
-
|
|
12357
|
-
}
|
|
12358
|
-
visible: false,
|
|
12359
|
-
className: "",
|
|
12360
|
-
style: {}
|
|
12223
|
+
onSelect: () => {
|
|
12224
|
+
}
|
|
12361
12225
|
};
|
|
12362
12226
|
const ActionSheet = (props) => {
|
|
12363
12227
|
const {
|
|
12364
12228
|
children,
|
|
12365
12229
|
cancelText,
|
|
12366
|
-
|
|
12367
|
-
optionSubTag,
|
|
12368
|
-
chooseTagValue,
|
|
12230
|
+
optionKey,
|
|
12369
12231
|
title,
|
|
12370
|
-
color,
|
|
12371
12232
|
description,
|
|
12372
|
-
|
|
12233
|
+
options,
|
|
12373
12234
|
onCancel,
|
|
12374
|
-
|
|
12235
|
+
onSelect,
|
|
12375
12236
|
visible,
|
|
12376
12237
|
className,
|
|
12377
12238
|
style,
|
|
12378
12239
|
...rest
|
|
12379
12240
|
} = { ...defaultProps$F, ...props };
|
|
12380
|
-
const
|
|
12381
|
-
const isHighlight = (item) => {
|
|
12382
|
-
return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "#1a1a1a";
|
|
12383
|
-
};
|
|
12241
|
+
const classPrefix2 = "nut-actionsheet";
|
|
12384
12242
|
const cancelActionSheet = () => {
|
|
12385
12243
|
onCancel && onCancel();
|
|
12386
12244
|
};
|
|
12387
12245
|
const chooseItem = (item, index) => {
|
|
12388
12246
|
if (!item.disable) {
|
|
12389
|
-
|
|
12247
|
+
onSelect && onSelect(item, index);
|
|
12390
12248
|
}
|
|
12391
12249
|
};
|
|
12392
12250
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -12399,19 +12257,25 @@ var __publicField = (obj, key, value) => {
|
|
|
12399
12257
|
onCancel && onCancel();
|
|
12400
12258
|
}
|
|
12401
12259
|
},
|
|
12402
|
-
/* @__PURE__ */ React.createElement("div", { className: `${
|
|
12260
|
+
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, title && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__title` }, title), description && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__description` }, description), options.length ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__list` }, options.map((item, index) => {
|
|
12403
12261
|
return /* @__PURE__ */ React.createElement(
|
|
12404
12262
|
"div",
|
|
12405
12263
|
{
|
|
12406
|
-
className: `${
|
|
12407
|
-
style: { color: isHighlight(item) },
|
|
12264
|
+
className: `${classPrefix2}__item ${item.disable ? "disabled" : ""} ${item.danger ? "danger" : ""}`,
|
|
12408
12265
|
key: index,
|
|
12409
12266
|
onClick: () => chooseItem(item, index)
|
|
12410
12267
|
},
|
|
12411
|
-
item[
|
|
12412
|
-
/* @__PURE__ */ React.createElement("div", { className:
|
|
12268
|
+
item[optionKey.name],
|
|
12269
|
+
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__item-description` }, item[optionKey.description])
|
|
12413
12270
|
);
|
|
12414
|
-
})) : children, cancelText && /* @__PURE__ */ React.createElement(
|
|
12271
|
+
})) : children, cancelText && /* @__PURE__ */ React.createElement(
|
|
12272
|
+
"div",
|
|
12273
|
+
{
|
|
12274
|
+
className: `${classPrefix2}__cancel`,
|
|
12275
|
+
onClick: () => cancelActionSheet()
|
|
12276
|
+
},
|
|
12277
|
+
cancelText
|
|
12278
|
+
))
|
|
12415
12279
|
);
|
|
12416
12280
|
};
|
|
12417
12281
|
ActionSheet.defaultProps = defaultProps$F;
|
|
@@ -12458,7 +12322,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12458
12322
|
onClose: () => {
|
|
12459
12323
|
},
|
|
12460
12324
|
onOverlayClick: (e) => true,
|
|
12461
|
-
...defaultOverlayProps
|
|
12325
|
+
...defaultOverlayProps$1
|
|
12462
12326
|
};
|
|
12463
12327
|
const DialogWrap = (props) => {
|
|
12464
12328
|
const {
|
|
@@ -12481,7 +12345,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12481
12345
|
}
|
|
12482
12346
|
};
|
|
12483
12347
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, overlay ? /* @__PURE__ */ React.createElement(
|
|
12484
|
-
Overlay,
|
|
12348
|
+
Overlay$1,
|
|
12485
12349
|
{
|
|
12486
12350
|
style: overlayStyle,
|
|
12487
12351
|
className: overlayClassName,
|
|
@@ -12725,7 +12589,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12725
12589
|
imageSize: "",
|
|
12726
12590
|
status: "empty"
|
|
12727
12591
|
};
|
|
12728
|
-
const classPrefix$
|
|
12592
|
+
const classPrefix$a = `nut-empty`;
|
|
12729
12593
|
const Empty = (props) => {
|
|
12730
12594
|
const { locale } = useConfig$1();
|
|
12731
12595
|
defaultProps$C.description = locale.noData || defaultProps$C.description;
|
|
@@ -12761,7 +12625,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12761
12625
|
};
|
|
12762
12626
|
});
|
|
12763
12627
|
}, [imageSize]);
|
|
12764
|
-
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
12628
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$a} ${className}`, ...rest }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$a}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$a}__description` }, description) : description, children));
|
|
12765
12629
|
};
|
|
12766
12630
|
Empty.defaultProps = defaultProps$C;
|
|
12767
12631
|
Empty.displayName = "NutEmpty";
|
|
@@ -13327,7 +13191,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13327
13191
|
onClick: () => {
|
|
13328
13192
|
}
|
|
13329
13193
|
};
|
|
13330
|
-
const classPrefix$
|
|
13194
|
+
const classPrefix$9 = "nut-notify";
|
|
13331
13195
|
const Notify = (props) => {
|
|
13332
13196
|
const {
|
|
13333
13197
|
id,
|
|
@@ -13378,10 +13242,10 @@ var __publicField = (obj, key, value) => {
|
|
|
13378
13242
|
onClose();
|
|
13379
13243
|
};
|
|
13380
13244
|
const classes = classNames({
|
|
13381
|
-
[`${classPrefix$
|
|
13382
|
-
[`${classPrefix$
|
|
13383
|
-
[`${classPrefix$
|
|
13384
|
-
[`${classPrefix$
|
|
13245
|
+
[`${classPrefix$9}--popup-top`]: position === "top",
|
|
13246
|
+
[`${classPrefix$9}--popup-bottom`]: position === "bottom",
|
|
13247
|
+
[`${classPrefix$9}`]: true,
|
|
13248
|
+
[`${classPrefix$9}--${type}`]: true
|
|
13385
13249
|
});
|
|
13386
13250
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
13387
13251
|
CSSTransition$1,
|
|
@@ -13559,7 +13423,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13559
13423
|
);
|
|
13560
13424
|
}))) : null))
|
|
13561
13425
|
), visible ? /* @__PURE__ */ React.createElement(
|
|
13562
|
-
Overlay,
|
|
13426
|
+
Overlay$1,
|
|
13563
13427
|
{
|
|
13564
13428
|
visible,
|
|
13565
13429
|
onClick: (e) => handleClick(e),
|
|
@@ -13725,7 +13589,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13725
13589
|
src: "",
|
|
13726
13590
|
alt: ""
|
|
13727
13591
|
};
|
|
13728
|
-
const classPrefix$
|
|
13592
|
+
const classPrefix$8 = `nut-avatar`;
|
|
13729
13593
|
const Avatar = (props) => {
|
|
13730
13594
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
13731
13595
|
const {
|
|
@@ -13757,7 +13621,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13757
13621
|
[`nut-avatar-${((_a = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a.size) || size || "normal"}`]: true,
|
|
13758
13622
|
[`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
|
|
13759
13623
|
});
|
|
13760
|
-
const cls = classNames(classPrefix$
|
|
13624
|
+
const cls = classNames(classPrefix$8, classes, className);
|
|
13761
13625
|
const styles = {
|
|
13762
13626
|
width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
13763
13627
|
height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
@@ -14075,59 +13939,128 @@ var __publicField = (obj, key, value) => {
|
|
|
14075
13939
|
});
|
|
14076
13940
|
Swipe.defaultProps = defaultProps$u;
|
|
14077
13941
|
Swipe.displayName = "NutSwipe";
|
|
13942
|
+
const defaultOverlayProps = {
|
|
13943
|
+
...ComponentDefaults,
|
|
13944
|
+
zIndex: 1e3,
|
|
13945
|
+
duration: 0.3,
|
|
13946
|
+
closeOnOverlayClick: true,
|
|
13947
|
+
visible: false,
|
|
13948
|
+
lockScroll: true,
|
|
13949
|
+
onClick: (event) => {
|
|
13950
|
+
}
|
|
13951
|
+
};
|
|
13952
|
+
const Overlay = (props) => {
|
|
13953
|
+
const {
|
|
13954
|
+
children,
|
|
13955
|
+
zIndex,
|
|
13956
|
+
duration,
|
|
13957
|
+
className,
|
|
13958
|
+
closeOnOverlayClick,
|
|
13959
|
+
visible,
|
|
13960
|
+
lockScroll,
|
|
13961
|
+
style,
|
|
13962
|
+
afterShow,
|
|
13963
|
+
afterClose,
|
|
13964
|
+
onClick,
|
|
13965
|
+
...rest
|
|
13966
|
+
} = {
|
|
13967
|
+
...defaultOverlayProps,
|
|
13968
|
+
...props
|
|
13969
|
+
};
|
|
13970
|
+
const classPrefix2 = `nut-overlay`;
|
|
13971
|
+
const renderRef = React.useRef(true);
|
|
13972
|
+
const intervalCloseRef = React.useRef(0);
|
|
13973
|
+
const intervalShowRef = React.useRef(0);
|
|
13974
|
+
React.useEffect(() => {
|
|
13975
|
+
if (visible) {
|
|
13976
|
+
intervalShowRef.current = window.setTimeout(() => {
|
|
13977
|
+
afterShow && afterShow();
|
|
13978
|
+
}, duration * 1e3 * 0.8);
|
|
13979
|
+
}
|
|
13980
|
+
lock();
|
|
13981
|
+
}, [visible]);
|
|
13982
|
+
React.useEffect(() => {
|
|
13983
|
+
return () => {
|
|
13984
|
+
clearTimeout(intervalCloseRef.current);
|
|
13985
|
+
clearTimeout(intervalShowRef.current);
|
|
13986
|
+
document.body.classList.remove("nut-overflow-hidden");
|
|
13987
|
+
};
|
|
13988
|
+
}, []);
|
|
13989
|
+
const classes = classNames(
|
|
13990
|
+
{
|
|
13991
|
+
"nut-overlay-fade-leave-active": !renderRef.current && !visible,
|
|
13992
|
+
"nut-overlay-fade-enter-active": visible,
|
|
13993
|
+
"nut-overlay-first-render": renderRef.current && !visible,
|
|
13994
|
+
"nut-overlay-hidden-render": !visible
|
|
13995
|
+
},
|
|
13996
|
+
className,
|
|
13997
|
+
classPrefix2
|
|
13998
|
+
);
|
|
13999
|
+
const styles = {
|
|
14000
|
+
zIndex,
|
|
14001
|
+
animationDuration: `${props.duration}s`,
|
|
14002
|
+
...style
|
|
14003
|
+
};
|
|
14004
|
+
const lock = () => {
|
|
14005
|
+
if (lockScroll && visible) {
|
|
14006
|
+
document.body.classList.add("nut-overflow-hidden");
|
|
14007
|
+
} else {
|
|
14008
|
+
document.body.classList.remove("nut-overflow-hidden");
|
|
14009
|
+
}
|
|
14010
|
+
};
|
|
14011
|
+
const handleClick = (e) => {
|
|
14012
|
+
if (closeOnOverlayClick) {
|
|
14013
|
+
onClick && onClick(e);
|
|
14014
|
+
renderRef.current = false;
|
|
14015
|
+
intervalCloseRef.current = window.setTimeout(() => {
|
|
14016
|
+
afterClose && afterClose();
|
|
14017
|
+
}, duration * 1e3 * 0.8);
|
|
14018
|
+
}
|
|
14019
|
+
};
|
|
14020
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: classes, style: styles, ...rest, onClick: handleClick }, children));
|
|
14021
|
+
};
|
|
14022
|
+
Overlay.defaultProps = defaultOverlayProps;
|
|
14023
|
+
Overlay.displayName = "NutOverlay";
|
|
14078
14024
|
const defaultProps$t = {
|
|
14025
|
+
...ComponentDefaults,
|
|
14079
14026
|
id: "",
|
|
14080
|
-
style: {},
|
|
14081
14027
|
icon: null,
|
|
14082
14028
|
iconSize: "20",
|
|
14083
14029
|
msg: "",
|
|
14084
|
-
bottom: "30px",
|
|
14085
|
-
// center为false时生效,距离底部位置
|
|
14086
14030
|
duration: 2,
|
|
14087
14031
|
// 时长,duration为0则一直展示
|
|
14088
|
-
|
|
14089
|
-
// toast是否居中展示
|
|
14032
|
+
position: "center",
|
|
14090
14033
|
type: "text",
|
|
14091
14034
|
title: "",
|
|
14092
|
-
|
|
14093
|
-
|
|
14035
|
+
closeOnOverlayClick: false,
|
|
14036
|
+
contentClassName: "",
|
|
14037
|
+
// 内容自定义样式名
|
|
14094
14038
|
size: "base",
|
|
14095
14039
|
// 设置字体大小,默认base,可选large\small\base
|
|
14096
|
-
textAlignCenter: true,
|
|
14097
|
-
// 文字是否居中显示,true为居中,false为left
|
|
14098
|
-
bgColor: "rgba(0, 0, 0, .8)",
|
|
14099
|
-
cover: false,
|
|
14100
|
-
// 是否展示透明遮罩层
|
|
14101
|
-
coverColor: "rgba(0, 0, 0, 0)",
|
|
14102
|
-
// 遮罩颜色设定
|
|
14103
|
-
closeOnClickOverlay: false,
|
|
14104
|
-
// 是否点击遮罩可关闭
|
|
14105
14040
|
visible: false,
|
|
14106
14041
|
onClose: () => {
|
|
14107
14042
|
}
|
|
14108
14043
|
// 未实现
|
|
14109
14044
|
};
|
|
14045
|
+
const classPrefix$7 = "nut-toast";
|
|
14110
14046
|
const Toast = (props) => {
|
|
14111
14047
|
const {
|
|
14112
14048
|
children,
|
|
14113
14049
|
id,
|
|
14114
|
-
|
|
14050
|
+
position,
|
|
14051
|
+
contentStyle,
|
|
14115
14052
|
icon,
|
|
14116
14053
|
iconSize,
|
|
14117
14054
|
msg,
|
|
14118
|
-
bottom,
|
|
14119
14055
|
duration,
|
|
14120
|
-
center,
|
|
14121
14056
|
type,
|
|
14122
14057
|
title,
|
|
14123
|
-
|
|
14058
|
+
closeOnOverlayClick,
|
|
14059
|
+
contentClassName,
|
|
14124
14060
|
size,
|
|
14125
|
-
textAlignCenter,
|
|
14126
|
-
bgColor,
|
|
14127
|
-
cover,
|
|
14128
|
-
coverColor,
|
|
14129
|
-
closeOnClickOverlay,
|
|
14130
14061
|
visible,
|
|
14062
|
+
className,
|
|
14063
|
+
style,
|
|
14131
14064
|
onClose,
|
|
14132
14065
|
...rest
|
|
14133
14066
|
} = { ...defaultProps$t, ...props };
|
|
@@ -14160,11 +14093,10 @@ var __publicField = (obj, key, value) => {
|
|
|
14160
14093
|
}
|
|
14161
14094
|
};
|
|
14162
14095
|
const clickCover = () => {
|
|
14163
|
-
if (
|
|
14096
|
+
if (closeOnOverlayClick) {
|
|
14164
14097
|
hide();
|
|
14165
14098
|
}
|
|
14166
14099
|
};
|
|
14167
|
-
const toastBem = cn("toast");
|
|
14168
14100
|
const hasIcon = () => {
|
|
14169
14101
|
if (type !== "text") {
|
|
14170
14102
|
return true;
|
|
@@ -14183,40 +14115,30 @@ var __publicField = (obj, key, value) => {
|
|
|
14183
14115
|
}[type];
|
|
14184
14116
|
};
|
|
14185
14117
|
const classes = classNames({
|
|
14186
|
-
"nut-toast-center": center,
|
|
14187
14118
|
"nut-toast-has-icon": icon,
|
|
14188
|
-
"nut-toast-cover": cover,
|
|
14189
|
-
"nut-toast-loading": type === "loading",
|
|
14190
|
-
[`${customClass}`]: true,
|
|
14191
14119
|
[`nut-toast-${size}`]: true
|
|
14192
14120
|
});
|
|
14193
14121
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, openState ? /* @__PURE__ */ React.createElement(
|
|
14194
|
-
|
|
14122
|
+
Overlay,
|
|
14195
14123
|
{
|
|
14196
|
-
|
|
14197
|
-
|
|
14198
|
-
|
|
14199
|
-
|
|
14200
|
-
backgroundColor: cover ? coverColor : "",
|
|
14201
|
-
...style
|
|
14202
|
-
},
|
|
14124
|
+
visible: openState,
|
|
14125
|
+
style,
|
|
14126
|
+
className: `${classPrefix$7}__overlay-default ${className}`,
|
|
14127
|
+
closeOnOverlayClick,
|
|
14203
14128
|
onClick: () => {
|
|
14204
14129
|
clickCover();
|
|
14205
14130
|
}
|
|
14206
14131
|
},
|
|
14207
|
-
/* @__PURE__ */ React.createElement(
|
|
14132
|
+
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix$7} ${classes}`, id }, /* @__PURE__ */ React.createElement(
|
|
14208
14133
|
"div",
|
|
14209
14134
|
{
|
|
14210
|
-
className:
|
|
14211
|
-
style:
|
|
14212
|
-
textAlign: textAlignCenter ? "center" : "left",
|
|
14213
|
-
backgroundColor: bgColor
|
|
14214
|
-
}
|
|
14135
|
+
className: `${classPrefix$7}__inner ${classPrefix$7}-${position} ${contentClassName}`,
|
|
14136
|
+
style: contentStyle
|
|
14215
14137
|
},
|
|
14216
|
-
hasIcon() ? /* @__PURE__ */ React.createElement("p", { className:
|
|
14217
|
-
title ? /* @__PURE__ */ React.createElement("div", { className:
|
|
14218
|
-
/* @__PURE__ */ React.createElement("span", { className:
|
|
14219
|
-
)
|
|
14138
|
+
hasIcon() ? /* @__PURE__ */ React.createElement("p", { className: `${classPrefix$7}__icon-wrapper` }, iconName()) : null,
|
|
14139
|
+
title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$7}-title` }, title) : null,
|
|
14140
|
+
/* @__PURE__ */ React.createElement("span", { className: `${classPrefix$7}-text` }, msg)
|
|
14141
|
+
))
|
|
14220
14142
|
) : null);
|
|
14221
14143
|
};
|
|
14222
14144
|
Toast.defaultProps = defaultProps$t;
|
|
@@ -14229,7 +14151,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14229
14151
|
onClick: (event) => {
|
|
14230
14152
|
}
|
|
14231
14153
|
};
|
|
14232
|
-
const classPrefix$
|
|
14154
|
+
const classPrefix$6 = `nut-animate`;
|
|
14233
14155
|
const Animate = (props) => {
|
|
14234
14156
|
const { className, type, action, loop, onClick, children, ...rest } = {
|
|
14235
14157
|
...defaultProps$s,
|
|
@@ -14238,7 +14160,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14238
14160
|
const [clicked, setClicked] = React.useState(false);
|
|
14239
14161
|
const classes = classNames({
|
|
14240
14162
|
"nut-ani-container": true,
|
|
14241
|
-
[`${classPrefix$
|
|
14163
|
+
[`${classPrefix$6}-${type}`]: action === "initial" || clicked ? type : false,
|
|
14242
14164
|
loop
|
|
14243
14165
|
});
|
|
14244
14166
|
const cls = classNames(classes, className);
|
|
@@ -14256,33 +14178,34 @@ var __publicField = (obj, key, value) => {
|
|
|
14256
14178
|
Animate.defaultProps = defaultProps$s;
|
|
14257
14179
|
Animate.displayName = "NutAnimate";
|
|
14258
14180
|
const defaultProps$r = {
|
|
14259
|
-
|
|
14260
|
-
|
|
14261
|
-
|
|
14262
|
-
|
|
14263
|
-
|
|
14264
|
-
|
|
14181
|
+
...ComponentDefaults,
|
|
14182
|
+
length: 0,
|
|
14183
|
+
value: "",
|
|
14184
|
+
delay: 300,
|
|
14185
|
+
duration: 1,
|
|
14186
|
+
thousands: false
|
|
14265
14187
|
};
|
|
14266
14188
|
const CountUp = (props) => {
|
|
14267
14189
|
const {
|
|
14268
|
-
|
|
14269
|
-
|
|
14270
|
-
|
|
14271
|
-
|
|
14190
|
+
length,
|
|
14191
|
+
value,
|
|
14192
|
+
delay,
|
|
14193
|
+
duration,
|
|
14272
14194
|
className,
|
|
14273
14195
|
thousands,
|
|
14196
|
+
style,
|
|
14274
14197
|
...reset
|
|
14275
14198
|
} = {
|
|
14276
14199
|
...defaultProps$r,
|
|
14277
14200
|
...props
|
|
14278
14201
|
};
|
|
14279
|
-
const
|
|
14202
|
+
const classPrefix2 = "nut-countup";
|
|
14280
14203
|
const countupRef = React.useRef(null);
|
|
14281
14204
|
const timerRef = React.useRef(0);
|
|
14282
14205
|
const numbers = Array.from({ length: 10 }, (v, i) => i);
|
|
14283
14206
|
const getShowNumber = () => {
|
|
14284
|
-
const splitArr =
|
|
14285
|
-
const intNumber =
|
|
14207
|
+
const splitArr = value.split(".");
|
|
14208
|
+
const intNumber = length && splitArr[0].length < length ? (Array(length).join("0") + splitArr[0]).slice(-length) : splitArr[0];
|
|
14286
14209
|
const currNumber = `${thousands ? intNumber.replace(/(\d)(?=(?:\d{3})+$)/g, "$1,") : intNumber}${splitArr[1] ? "." : ""}${splitArr[1] || ""}`;
|
|
14287
14210
|
return currNumber.split("");
|
|
14288
14211
|
};
|
|
@@ -14307,7 +14230,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14307
14230
|
};
|
|
14308
14231
|
const numberEaseStyle = (idx) => {
|
|
14309
14232
|
return {
|
|
14310
|
-
transition: `transform ${
|
|
14233
|
+
transition: `transform ${duration}s ease-in-out`,
|
|
14311
14234
|
transform: transformArr[idx] ? transformArr[idx] : null
|
|
14312
14235
|
};
|
|
14313
14236
|
};
|
|
@@ -14319,26 +14242,31 @@ var __publicField = (obj, key, value) => {
|
|
|
14319
14242
|
isLoaded.current = true;
|
|
14320
14243
|
timerRef.current = window.setTimeout(() => {
|
|
14321
14244
|
setNumerArr(getShowNumber());
|
|
14322
|
-
},
|
|
14245
|
+
}, delay);
|
|
14323
14246
|
} else {
|
|
14324
14247
|
setNumerArr(getShowNumber());
|
|
14325
14248
|
}
|
|
14326
14249
|
return () => {
|
|
14327
14250
|
window.clearTimeout(timerRef.current);
|
|
14328
14251
|
};
|
|
14329
|
-
}, [
|
|
14330
|
-
return /* @__PURE__ */ React.createElement("div", { className: `${
|
|
14252
|
+
}, [value]);
|
|
14253
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2} ${className}`, ref: countupRef }, /* @__PURE__ */ React.createElement("ul", { className: `${classPrefix2}__list` }, numerArr.map((item, idx) => {
|
|
14331
14254
|
return /* @__PURE__ */ React.createElement(
|
|
14332
14255
|
"li",
|
|
14333
14256
|
{
|
|
14334
|
-
className: `${
|
|
14335
|
-
number: !Number.isNaN(Number(item))
|
|
14336
|
-
})}`,
|
|
14257
|
+
className: `${classPrefix2}__listitem ${!Number.isNaN(Number(item)) ? `${classPrefix2}__listitem--number` : ""}`,
|
|
14337
14258
|
key: idx
|
|
14338
14259
|
},
|
|
14339
|
-
!Number.isNaN(Number(item)) ? /* @__PURE__ */ React.createElement(
|
|
14340
|
-
|
|
14341
|
-
|
|
14260
|
+
!Number.isNaN(Number(item)) ? /* @__PURE__ */ React.createElement(
|
|
14261
|
+
"span",
|
|
14262
|
+
{
|
|
14263
|
+
className: `${classPrefix2}__number`,
|
|
14264
|
+
style: numberEaseStyle(idx)
|
|
14265
|
+
},
|
|
14266
|
+
[...numbers, ...numbers].map((number, subidx) => {
|
|
14267
|
+
return /* @__PURE__ */ React.createElement("span", { key: subidx }, number);
|
|
14268
|
+
})
|
|
14269
|
+
) : /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}__separator` }, item)
|
|
14342
14270
|
);
|
|
14343
14271
|
})));
|
|
14344
14272
|
};
|
|
@@ -14357,6 +14285,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14357
14285
|
__publicField(AnimatingNumbers, "defaultProps", defaultProps$q);
|
|
14358
14286
|
__publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
|
|
14359
14287
|
__publicField(AnimatingNumbers, "CountUp", CountUp);
|
|
14288
|
+
AnimatingNumbers.CountUp = CountUp;
|
|
14360
14289
|
const b = cn("audio");
|
|
14361
14290
|
const warn = console.warn;
|
|
14362
14291
|
const defaultProps$p = {
|
|
@@ -14570,12 +14499,12 @@ var __publicField = (obj, key, value) => {
|
|
|
14570
14499
|
gap: "-8",
|
|
14571
14500
|
level: "left"
|
|
14572
14501
|
};
|
|
14573
|
-
const classPrefix$
|
|
14502
|
+
const classPrefix$5 = `nut-avatar-group`;
|
|
14574
14503
|
const AvatarGroup = (props) => {
|
|
14575
14504
|
const propAvatarGroup = { ...defaultProps$o, ...props };
|
|
14576
14505
|
const { className, style, children } = propAvatarGroup;
|
|
14577
14506
|
const avatarGroupRef = React.useRef(null);
|
|
14578
|
-
const cls = classNames(classPrefix$
|
|
14507
|
+
const cls = classNames(classPrefix$5, className);
|
|
14579
14508
|
const parentAvatar = {
|
|
14580
14509
|
propAvatarGroup,
|
|
14581
14510
|
avatarGroupRef
|
|
@@ -14593,7 +14522,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14593
14522
|
background: "#e5e9f2",
|
|
14594
14523
|
clockwise: true
|
|
14595
14524
|
};
|
|
14596
|
-
const classPrefix$
|
|
14525
|
+
const classPrefix$4 = `nut-circleprogress`;
|
|
14597
14526
|
const CircleProgress = (props) => {
|
|
14598
14527
|
const {
|
|
14599
14528
|
children,
|
|
@@ -14612,7 +14541,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14612
14541
|
...props
|
|
14613
14542
|
};
|
|
14614
14543
|
const [oldValue, setOldValue] = React.useState(percent);
|
|
14615
|
-
const classes = classNames(className, classPrefix$
|
|
14544
|
+
const classes = classNames(className, classPrefix$4);
|
|
14616
14545
|
const refRandomId = Math.random().toString(36).slice(-8);
|
|
14617
14546
|
const animateIdRef = React.useRef(0);
|
|
14618
14547
|
const styles = {
|
|
@@ -14915,13 +14844,16 @@ var __publicField = (obj, key, value) => {
|
|
|
14915
14844
|
Collapse.displayName = "NutCollapse";
|
|
14916
14845
|
Collapse.Item = CollapseItem;
|
|
14917
14846
|
const defaultProps$k = {
|
|
14847
|
+
...ComponentDefaults,
|
|
14918
14848
|
paused: false,
|
|
14919
14849
|
startTime: Date.now(),
|
|
14920
14850
|
endTime: Date.now(),
|
|
14851
|
+
remainingTime: 0,
|
|
14921
14852
|
millisecond: false,
|
|
14922
14853
|
format: "HH:mm:ss",
|
|
14923
14854
|
autoStart: true,
|
|
14924
|
-
time: 0
|
|
14855
|
+
time: 0,
|
|
14856
|
+
destroy: false
|
|
14925
14857
|
};
|
|
14926
14858
|
const InternalCountDown = (props, ref) => {
|
|
14927
14859
|
useConfig$1();
|
|
@@ -14929,10 +14861,12 @@ var __publicField = (obj, key, value) => {
|
|
|
14929
14861
|
paused,
|
|
14930
14862
|
startTime,
|
|
14931
14863
|
endTime,
|
|
14864
|
+
remainingTime,
|
|
14932
14865
|
millisecond,
|
|
14933
14866
|
format,
|
|
14934
14867
|
autoStart,
|
|
14935
14868
|
time,
|
|
14869
|
+
destroy,
|
|
14936
14870
|
className,
|
|
14937
14871
|
style,
|
|
14938
14872
|
onEnd,
|
|
@@ -14942,7 +14876,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14942
14876
|
children,
|
|
14943
14877
|
...rest
|
|
14944
14878
|
} = { ...defaultProps$k, ...props };
|
|
14945
|
-
const
|
|
14879
|
+
const classPrefix2 = "nut-countdown";
|
|
14946
14880
|
const [restTimeStamp, setRestTime] = React.useState(0);
|
|
14947
14881
|
const stateRef = React.useRef({
|
|
14948
14882
|
pauseTime: 0,
|
|
@@ -14967,8 +14901,12 @@ var __publicField = (obj, key, value) => {
|
|
|
14967
14901
|
return new Date(t).getTime();
|
|
14968
14902
|
};
|
|
14969
14903
|
const initTime = () => {
|
|
14970
|
-
|
|
14971
|
-
|
|
14904
|
+
if (remainingTime) {
|
|
14905
|
+
stateRef.current.handleEndTime = Date.now() + Number(remainingTime);
|
|
14906
|
+
} else {
|
|
14907
|
+
stateRef.current.handleEndTime = endTime;
|
|
14908
|
+
stateRef.current.diffTime = Date.now() - getTimeStamp(startTime);
|
|
14909
|
+
}
|
|
14972
14910
|
if (!stateRef.current.counting)
|
|
14973
14911
|
stateRef.current.counting = true;
|
|
14974
14912
|
tick();
|
|
@@ -15110,7 +15048,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15110
15048
|
if (stateRef.current.isIninted) {
|
|
15111
15049
|
initTime();
|
|
15112
15050
|
}
|
|
15113
|
-
}, [endTime, startTime]);
|
|
15051
|
+
}, [endTime, startTime, remainingTime]);
|
|
15114
15052
|
React.useEffect(() => {
|
|
15115
15053
|
if (autoStart) {
|
|
15116
15054
|
initTime();
|
|
@@ -15124,20 +15062,28 @@ var __publicField = (obj, key, value) => {
|
|
|
15124
15062
|
return componentWillUnmount;
|
|
15125
15063
|
}, []);
|
|
15126
15064
|
const componentWillUnmount = () => {
|
|
15127
|
-
|
|
15065
|
+
destroy && cancelAnimationFrame(stateRef.current.timer);
|
|
15128
15066
|
};
|
|
15129
15067
|
const renderTime = (() => {
|
|
15130
15068
|
return formatRemainTime(stateRef.current.restTime);
|
|
15131
15069
|
})();
|
|
15132
|
-
return /* @__PURE__ */ React.createElement(
|
|
15070
|
+
return /* @__PURE__ */ React.createElement(
|
|
15133
15071
|
"div",
|
|
15134
15072
|
{
|
|
15135
|
-
className:
|
|
15136
|
-
|
|
15137
|
-
|
|
15073
|
+
className: `${classPrefix2} ${className}`,
|
|
15074
|
+
style: { ...style },
|
|
15075
|
+
...rest
|
|
15076
|
+
},
|
|
15077
|
+
children || /* @__PURE__ */ React.createElement(
|
|
15078
|
+
"div",
|
|
15079
|
+
{
|
|
15080
|
+
className: `${classPrefix2}__block`,
|
|
15081
|
+
dangerouslySetInnerHTML: {
|
|
15082
|
+
__html: `${renderTime}`
|
|
15083
|
+
}
|
|
15138
15084
|
}
|
|
15139
|
-
|
|
15140
|
-
)
|
|
15085
|
+
)
|
|
15086
|
+
);
|
|
15141
15087
|
};
|
|
15142
15088
|
const CountDown = React.forwardRef(InternalCountDown);
|
|
15143
15089
|
CountDown.defaultProps = defaultProps$k;
|
|
@@ -15150,9 +15096,10 @@ var __publicField = (obj, key, value) => {
|
|
|
15150
15096
|
expandText: "",
|
|
15151
15097
|
collapseText: "",
|
|
15152
15098
|
symbol: "...",
|
|
15153
|
-
lineHeight: "20"
|
|
15099
|
+
lineHeight: "20",
|
|
15100
|
+
width: "auto"
|
|
15154
15101
|
};
|
|
15155
|
-
const classPrefix$
|
|
15102
|
+
const classPrefix$3 = `nut-ellipsis`;
|
|
15156
15103
|
const Ellipsis = (props) => {
|
|
15157
15104
|
var _a, _b, _c, _d;
|
|
15158
15105
|
const {
|
|
@@ -15165,6 +15112,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15165
15112
|
collapseText,
|
|
15166
15113
|
symbol,
|
|
15167
15114
|
lineHeight,
|
|
15115
|
+
width,
|
|
15168
15116
|
onClick,
|
|
15169
15117
|
onChange,
|
|
15170
15118
|
...rest
|
|
@@ -15190,7 +15138,11 @@ var __publicField = (obj, key, value) => {
|
|
|
15190
15138
|
const digitReg = /^[0-9]+$/;
|
|
15191
15139
|
const letterUpperReg = /^[A-Z]+$/;
|
|
15192
15140
|
const letterLowerReg = /^[a-z]+$/;
|
|
15193
|
-
const classes = classNames(
|
|
15141
|
+
const classes = classNames(
|
|
15142
|
+
classPrefix$3,
|
|
15143
|
+
className,
|
|
15144
|
+
width ? `${classPrefix$3}-width` : ""
|
|
15145
|
+
);
|
|
15194
15146
|
const init = () => {
|
|
15195
15147
|
setExceeded(false);
|
|
15196
15148
|
setExpanded(false);
|
|
@@ -15372,17 +15324,47 @@ var __publicField = (obj, key, value) => {
|
|
|
15372
15324
|
id: `root${refRandomId}`,
|
|
15373
15325
|
...rest
|
|
15374
15326
|
},
|
|
15375
|
-
/* @__PURE__ */ React.createElement("div", null, !exceeded ? /* @__PURE__ */ React.createElement(
|
|
15376
|
-
"
|
|
15327
|
+
/* @__PURE__ */ React.createElement("div", null, !exceeded ? /* @__PURE__ */ React.createElement(
|
|
15328
|
+
"div",
|
|
15377
15329
|
{
|
|
15378
|
-
className: "nut-ellipsis-
|
|
15379
|
-
|
|
15380
|
-
|
|
15381
|
-
clickHandle(1);
|
|
15330
|
+
className: "nut-ellipsis-wordbreak",
|
|
15331
|
+
style: {
|
|
15332
|
+
width: `${!Number.isNaN(Number(width)) ? `${width}px` : "auto"}`
|
|
15382
15333
|
}
|
|
15383
15334
|
},
|
|
15384
|
-
|
|
15385
|
-
) : null,
|
|
15335
|
+
content
|
|
15336
|
+
) : null, exceeded && !expanded ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
15337
|
+
"div",
|
|
15338
|
+
{
|
|
15339
|
+
className: "nut-ellipsis-wordbreak",
|
|
15340
|
+
style: {
|
|
15341
|
+
width: `${!Number.isNaN(Number(width)) ? `${width}px` : "auto"}`
|
|
15342
|
+
}
|
|
15343
|
+
},
|
|
15344
|
+
(_a = ellipsis.current) == null ? void 0 : _a.leading,
|
|
15345
|
+
((_b = ellipsis.current) == null ? void 0 : _b.leading) && symbol,
|
|
15346
|
+
expandText ? /* @__PURE__ */ React.createElement(
|
|
15347
|
+
"span",
|
|
15348
|
+
{
|
|
15349
|
+
className: "nut-ellipsis-text",
|
|
15350
|
+
onClick: (e) => {
|
|
15351
|
+
e.stopPropagation();
|
|
15352
|
+
clickHandle(1);
|
|
15353
|
+
}
|
|
15354
|
+
},
|
|
15355
|
+
expandText
|
|
15356
|
+
) : null,
|
|
15357
|
+
((_c = ellipsis.current) == null ? void 0 : _c.tailing) && symbol,
|
|
15358
|
+
(_d = ellipsis.current) == null ? void 0 : _d.tailing
|
|
15359
|
+
)) : null, exceeded && expanded ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
15360
|
+
"div",
|
|
15361
|
+
{
|
|
15362
|
+
style: {
|
|
15363
|
+
width: `${!Number.isNaN(Number(width)) ? `${width}px` : "auto"}`
|
|
15364
|
+
}
|
|
15365
|
+
},
|
|
15366
|
+
content
|
|
15367
|
+
), expandText ? /* @__PURE__ */ React.createElement(
|
|
15386
15368
|
"span",
|
|
15387
15369
|
{
|
|
15388
15370
|
className: "nut-ellipsis-text",
|
|
@@ -15420,14 +15402,14 @@ var __publicField = (obj, key, value) => {
|
|
|
15420
15402
|
current: 0,
|
|
15421
15403
|
direction: "horizontal"
|
|
15422
15404
|
};
|
|
15423
|
-
const classPrefix$
|
|
15405
|
+
const classPrefix$2 = `nut-indicator`;
|
|
15424
15406
|
const Indicator = (props) => {
|
|
15425
15407
|
const { total, current, children, className, direction, ...rest } = {
|
|
15426
15408
|
...defaultProps$i,
|
|
15427
15409
|
...props
|
|
15428
15410
|
};
|
|
15429
15411
|
const classes = classNames({
|
|
15430
|
-
[`${classPrefix$
|
|
15412
|
+
[`${classPrefix$2}__vertical`]: direction === "vertical"
|
|
15431
15413
|
});
|
|
15432
15414
|
const renderElement = () => {
|
|
15433
15415
|
const childs = [];
|
|
@@ -15437,9 +15419,9 @@ var __publicField = (obj, key, value) => {
|
|
|
15437
15419
|
"div",
|
|
15438
15420
|
{
|
|
15439
15421
|
key: item,
|
|
15440
|
-
className: `${classPrefix$
|
|
15422
|
+
className: `${classPrefix$2}__dot ${classPrefix$2}__active`
|
|
15441
15423
|
}
|
|
15442
|
-
) : /* @__PURE__ */ React.createElement("div", { key: item, className: `${classPrefix$
|
|
15424
|
+
) : /* @__PURE__ */ React.createElement("div", { key: item, className: `${classPrefix$2}__dot` })
|
|
15443
15425
|
);
|
|
15444
15426
|
}
|
|
15445
15427
|
return childs;
|
|
@@ -15455,7 +15437,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15455
15437
|
loop: false,
|
|
15456
15438
|
defaultValue: 0
|
|
15457
15439
|
};
|
|
15458
|
-
const classPrefix = "nut-swiper";
|
|
15440
|
+
const classPrefix$1 = "nut-swiper";
|
|
15459
15441
|
const Swiper = React.forwardRef((props, ref) => {
|
|
15460
15442
|
const {
|
|
15461
15443
|
width,
|
|
@@ -15486,8 +15468,8 @@ var __publicField = (obj, key, value) => {
|
|
|
15486
15468
|
"div",
|
|
15487
15469
|
{
|
|
15488
15470
|
className: classNames({
|
|
15489
|
-
[`${classPrefix}__indicator`]: true,
|
|
15490
|
-
[`${classPrefix}__indicator-vertical`]: direction === "vertical"
|
|
15471
|
+
[`${classPrefix$1}__indicator`]: true,
|
|
15472
|
+
[`${classPrefix$1}__indicator-vertical`]: direction === "vertical"
|
|
15491
15473
|
})
|
|
15492
15474
|
},
|
|
15493
15475
|
/* @__PURE__ */ React.createElement(
|
|
@@ -15529,7 +15511,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15529
15511
|
return /* @__PURE__ */ React.createElement(
|
|
15530
15512
|
components.View,
|
|
15531
15513
|
{
|
|
15532
|
-
className: classNames(classPrefix, className),
|
|
15514
|
+
className: classNames(classPrefix$1, className),
|
|
15533
15515
|
style: {
|
|
15534
15516
|
width: !width ? "100%" : `${width}px`,
|
|
15535
15517
|
height: !height ? "150px" : `${height}px`
|
|
@@ -15866,31 +15848,33 @@ var __publicField = (obj, key, value) => {
|
|
|
15866
15848
|
}
|
|
15867
15849
|
});
|
|
15868
15850
|
};
|
|
15851
|
+
const clientHeight = Taro.getSystemInfoSync().windowHeight - 5 || 667;
|
|
15869
15852
|
const defaultProps$e = {
|
|
15870
|
-
|
|
15871
|
-
|
|
15872
|
-
|
|
15853
|
+
...ComponentDefaults,
|
|
15854
|
+
list: [],
|
|
15855
|
+
containerHeight: clientHeight,
|
|
15856
|
+
itemHeight: 66,
|
|
15857
|
+
itemEqual: true,
|
|
15873
15858
|
overscan: 2
|
|
15874
15859
|
};
|
|
15875
|
-
const clientHeight = Taro.getSystemInfoSync().windowHeight - 5 || 667;
|
|
15876
|
-
Taro.getSystemInfoSync().windowWidth || 375;
|
|
15877
15860
|
const VirtualList = (props) => {
|
|
15878
15861
|
const {
|
|
15879
|
-
|
|
15862
|
+
list,
|
|
15880
15863
|
ItemRender,
|
|
15881
|
-
|
|
15882
|
-
|
|
15883
|
-
overscan
|
|
15864
|
+
itemHeight,
|
|
15865
|
+
itemEqual,
|
|
15866
|
+
overscan,
|
|
15884
15867
|
key,
|
|
15885
15868
|
onScroll,
|
|
15886
15869
|
className,
|
|
15887
|
-
|
|
15870
|
+
containerHeight,
|
|
15888
15871
|
...rest
|
|
15889
|
-
} =
|
|
15872
|
+
} = {
|
|
15873
|
+
...defaultProps$e,
|
|
15874
|
+
...props
|
|
15875
|
+
};
|
|
15890
15876
|
const [startOffset, setStartOffset] = React.useState(0);
|
|
15891
15877
|
const [start, setStart] = React.useState(0);
|
|
15892
|
-
const [list, setList] = React.useState(sourceData.slice());
|
|
15893
|
-
useConfig$1();
|
|
15894
15878
|
const scrollRef = React.useRef(null);
|
|
15895
15879
|
const itemsRef = React.useRef(null);
|
|
15896
15880
|
const firstItemRef = React.useRef(null);
|
|
@@ -15905,7 +15889,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15905
15889
|
right: 0
|
|
15906
15890
|
}
|
|
15907
15891
|
]);
|
|
15908
|
-
const [offSetSize, setOffSetSize] = React.useState(
|
|
15892
|
+
const [offSetSize, setOffSetSize] = React.useState(containerHeight || 0);
|
|
15909
15893
|
const [options, setOptions] = React.useState({
|
|
15910
15894
|
startOffset: 0,
|
|
15911
15895
|
// 可视区域距离顶部的偏移量
|
|
@@ -15915,37 +15899,32 @@ var __publicField = (obj, key, value) => {
|
|
|
15915
15899
|
endIndex: 10
|
|
15916
15900
|
// 可视区域结束索引
|
|
15917
15901
|
});
|
|
15918
|
-
React.useEffect(() => {
|
|
15919
|
-
if (sourceData.length) {
|
|
15920
|
-
setList(sourceData.slice());
|
|
15921
|
-
}
|
|
15922
|
-
}, [sourceData]);
|
|
15923
15902
|
React.useEffect(() => {
|
|
15924
15903
|
setPositions((options2) => {
|
|
15925
15904
|
return { ...options2, endIndex: visibleCount() };
|
|
15926
15905
|
});
|
|
15927
|
-
}, [
|
|
15906
|
+
}, [itemHeight, overscan, offSetSize]);
|
|
15928
15907
|
React.useEffect(() => {
|
|
15929
|
-
if (
|
|
15908
|
+
if (containerHeight)
|
|
15930
15909
|
return;
|
|
15931
15910
|
setOffSetSize(getContainerHeight());
|
|
15932
|
-
}, [
|
|
15911
|
+
}, [containerHeight]);
|
|
15933
15912
|
React.useEffect(() => {
|
|
15934
|
-
const pos = initPositinoCache(
|
|
15913
|
+
const pos = initPositinoCache(itemHeight, list.length);
|
|
15935
15914
|
setPositions(pos);
|
|
15936
|
-
}, [
|
|
15915
|
+
}, [itemHeight, list]);
|
|
15937
15916
|
const getContainerHeight = () => {
|
|
15938
|
-
const initH =
|
|
15939
|
-
return initH < clientHeight ? initH + overscan *
|
|
15917
|
+
const initH = itemHeight * list.length;
|
|
15918
|
+
return initH < clientHeight ? initH + overscan * itemHeight - 5 : Math.min(containerHeight, clientHeight);
|
|
15940
15919
|
};
|
|
15941
15920
|
const visibleCount = () => {
|
|
15942
|
-
return Math.ceil(getContainerHeight() /
|
|
15921
|
+
return Math.ceil(getContainerHeight() / itemHeight) + overscan;
|
|
15943
15922
|
};
|
|
15944
15923
|
const end = () => {
|
|
15945
15924
|
return start + visibleCount();
|
|
15946
15925
|
};
|
|
15947
15926
|
const listHeight = () => {
|
|
15948
|
-
return list.length *
|
|
15927
|
+
return list.length * itemHeight;
|
|
15949
15928
|
};
|
|
15950
15929
|
const visibleData = () => {
|
|
15951
15930
|
return list.slice(start, Math.min(end(), list.length));
|
|
@@ -15964,15 +15943,15 @@ var __publicField = (obj, key, value) => {
|
|
|
15964
15943
|
const startIndex = binarySearch(positions, scrollSize, false);
|
|
15965
15944
|
const overStart = startIndex - overscan > -1 ? startIndex - overscan : 0;
|
|
15966
15945
|
const endIndex = end();
|
|
15967
|
-
if (!
|
|
15946
|
+
if (!itemEqual) {
|
|
15968
15947
|
updateTotalSize();
|
|
15969
15948
|
}
|
|
15970
|
-
setStart(Math.floor(scrollTop /
|
|
15949
|
+
setStart(Math.floor(scrollTop / itemHeight));
|
|
15971
15950
|
setOptions({ startOffset, startIndex, overStart, endIndex });
|
|
15972
15951
|
if (end() > list.length - 1) {
|
|
15973
15952
|
onScroll && onScroll();
|
|
15974
15953
|
}
|
|
15975
|
-
setStartOffset(scrollTop - scrollTop %
|
|
15954
|
+
setStartOffset(scrollTop - scrollTop % itemHeight);
|
|
15976
15955
|
};
|
|
15977
15956
|
return /* @__PURE__ */ React.createElement(
|
|
15978
15957
|
"div",
|
|
@@ -15980,13 +15959,12 @@ var __publicField = (obj, key, value) => {
|
|
|
15980
15959
|
className: className ? `${className} nut-virtualList-box` : "nut-virtualList-box",
|
|
15981
15960
|
...rest,
|
|
15982
15961
|
style: {
|
|
15983
|
-
height:
|
|
15962
|
+
height: containerHeight ? `${offSetSize}px` : ""
|
|
15984
15963
|
}
|
|
15985
15964
|
},
|
|
15986
15965
|
/* @__PURE__ */ React.createElement(
|
|
15987
15966
|
components.ScrollView,
|
|
15988
15967
|
{
|
|
15989
|
-
scrollTop: 0,
|
|
15990
15968
|
scrollY: true,
|
|
15991
15969
|
type: "list",
|
|
15992
15970
|
ref: scrollRef,
|
|
@@ -16022,7 +16000,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16022
16000
|
className: "nut-virtuallist-item",
|
|
16023
16001
|
key: `${data}`,
|
|
16024
16002
|
style: {
|
|
16025
|
-
height: `${
|
|
16003
|
+
height: `${itemEqual ? `${itemHeight}px` : "auto"}`
|
|
16026
16004
|
}
|
|
16027
16005
|
},
|
|
16028
16006
|
ItemRender ? /* @__PURE__ */ React.createElement(ItemRender, { data, index: `${index}` }) : data
|
|
@@ -16585,6 +16563,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16585
16563
|
Tag.defaultProps = defaultProps$8;
|
|
16586
16564
|
Tag.displayName = "NutTag";
|
|
16587
16565
|
const defaultProps$7 = {
|
|
16566
|
+
...ComponentDefaults,
|
|
16588
16567
|
source: {
|
|
16589
16568
|
type: {},
|
|
16590
16569
|
src: ""
|
|
@@ -16599,15 +16578,13 @@ var __publicField = (obj, key, value) => {
|
|
|
16599
16578
|
loop: false
|
|
16600
16579
|
}
|
|
16601
16580
|
};
|
|
16581
|
+
const classPrefix = `nut-video`;
|
|
16602
16582
|
const Video = (props) => {
|
|
16603
16583
|
const {
|
|
16604
16584
|
children,
|
|
16605
16585
|
source,
|
|
16606
16586
|
options,
|
|
16607
16587
|
className,
|
|
16608
|
-
play,
|
|
16609
|
-
pause,
|
|
16610
|
-
playend,
|
|
16611
16588
|
onPlay,
|
|
16612
16589
|
onPause,
|
|
16613
16590
|
onPlayEnd,
|
|
@@ -16616,55 +16593,21 @@ var __publicField = (obj, key, value) => {
|
|
|
16616
16593
|
...defaultProps$7,
|
|
16617
16594
|
...props
|
|
16618
16595
|
};
|
|
16619
|
-
const
|
|
16620
|
-
const b2 = cn("video");
|
|
16621
|
-
const classes = classNames(className, b2(""));
|
|
16622
|
-
React.useEffect(() => {
|
|
16623
|
-
init();
|
|
16624
|
-
}, []);
|
|
16625
|
-
const init = () => {
|
|
16626
|
-
if (rootRef.current) {
|
|
16627
|
-
const videoRef = rootRef.current;
|
|
16628
|
-
if (options.autoplay) {
|
|
16629
|
-
setTimeout(() => {
|
|
16630
|
-
videoRef.play();
|
|
16631
|
-
}, 200);
|
|
16632
|
-
}
|
|
16633
|
-
if (options.playsinline) {
|
|
16634
|
-
videoRef.setAttribute("playsinline", String(options.playsinline));
|
|
16635
|
-
videoRef.setAttribute("webkit-playsinline", String(options.playsinline));
|
|
16636
|
-
videoRef.setAttribute("x5-video-player-type", "h5-page");
|
|
16637
|
-
videoRef.setAttribute("x5-video-player-fullscreen", "false");
|
|
16638
|
-
}
|
|
16639
|
-
videoRef.addEventListener("play", () => {
|
|
16640
|
-
onPlay && onPlay(videoRef);
|
|
16641
|
-
play && play(videoRef);
|
|
16642
|
-
});
|
|
16643
|
-
videoRef.addEventListener("pause", () => {
|
|
16644
|
-
onPause && onPause(videoRef);
|
|
16645
|
-
pause && pause(videoRef);
|
|
16646
|
-
});
|
|
16647
|
-
videoRef.addEventListener("ended", () => {
|
|
16648
|
-
videoRef.currentTime = 0;
|
|
16649
|
-
onPlayEnd && onPlayEnd(videoRef);
|
|
16650
|
-
playend && playend(videoRef);
|
|
16651
|
-
});
|
|
16652
|
-
}
|
|
16653
|
-
};
|
|
16596
|
+
const classes = classNames(className, classPrefix);
|
|
16654
16597
|
return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps }, /* @__PURE__ */ React.createElement(
|
|
16655
|
-
|
|
16598
|
+
components.Video,
|
|
16656
16599
|
{
|
|
16657
16600
|
className: "nut-video-player",
|
|
16658
16601
|
muted: options.muted,
|
|
16659
|
-
|
|
16602
|
+
autoplay: options.autoplay,
|
|
16660
16603
|
loop: options.loop,
|
|
16661
16604
|
poster: options.poster,
|
|
16662
16605
|
controls: options.controls,
|
|
16663
|
-
|
|
16664
|
-
|
|
16665
|
-
|
|
16666
|
-
|
|
16667
|
-
|
|
16606
|
+
src: source.src,
|
|
16607
|
+
onPlay,
|
|
16608
|
+
onPause,
|
|
16609
|
+
onEnded: onPlayEnd
|
|
16610
|
+
}
|
|
16668
16611
|
));
|
|
16669
16612
|
};
|
|
16670
16613
|
Video.defaultProps = defaultProps$7;
|
|
@@ -17011,43 +16954,42 @@ var __publicField = (obj, key, value) => {
|
|
|
17011
16954
|
TimeSelect.defaultProps = defaultProps$2;
|
|
17012
16955
|
TimeSelect.displayName = "NutTimeSelect";
|
|
17013
16956
|
const defaultProps$1 = {
|
|
17014
|
-
|
|
16957
|
+
...ComponentDefaults,
|
|
16958
|
+
value: 0,
|
|
17015
16959
|
digits: 2,
|
|
17016
|
-
|
|
17017
|
-
|
|
16960
|
+
symbol: false,
|
|
16961
|
+
zero: false,
|
|
17018
16962
|
arrowLeft: false,
|
|
17019
|
-
|
|
17020
|
-
|
|
16963
|
+
syncColor: true,
|
|
16964
|
+
color: "#333",
|
|
17021
16965
|
riseColor: "#fa2c19",
|
|
17022
16966
|
dropColor: "#64b578",
|
|
17023
|
-
|
|
17024
|
-
downIcon: null
|
|
17025
|
-
className: ""
|
|
16967
|
+
riseIcon: null,
|
|
16968
|
+
downIcon: null
|
|
17026
16969
|
};
|
|
17027
16970
|
const TrendArrow = (props) => {
|
|
17028
16971
|
const {
|
|
17029
|
-
|
|
16972
|
+
value,
|
|
17030
16973
|
digits,
|
|
17031
|
-
|
|
17032
|
-
|
|
16974
|
+
symbol,
|
|
16975
|
+
zero,
|
|
17033
16976
|
arrowLeft,
|
|
17034
|
-
|
|
17035
|
-
|
|
16977
|
+
syncColor,
|
|
16978
|
+
color,
|
|
17036
16979
|
riseColor,
|
|
17037
16980
|
dropColor,
|
|
17038
|
-
|
|
16981
|
+
riseIcon,
|
|
17039
16982
|
downIcon,
|
|
17040
16983
|
className,
|
|
16984
|
+
style,
|
|
17041
16985
|
children,
|
|
17042
16986
|
...rest
|
|
17043
16987
|
} = { ...defaultProps$1, ...props };
|
|
17044
|
-
const
|
|
17045
|
-
const
|
|
17046
|
-
};
|
|
17047
|
-
const rateTrend = React.useRef(rate > 0);
|
|
16988
|
+
const classPrefix2 = "nut-trendarrow";
|
|
16989
|
+
const rateTrend = React.useRef(value > 0);
|
|
17048
16990
|
const myFixed = (num, digit = 2) => {
|
|
17049
16991
|
if (Object.is(parseFloat(num), NaN)) {
|
|
17050
|
-
return console.
|
|
16992
|
+
return console.warn(`传入的值:${num}不是一个数字`);
|
|
17051
16993
|
}
|
|
17052
16994
|
num = parseFloat(num);
|
|
17053
16995
|
const numPow = Math.pow(10, digit);
|
|
@@ -17055,20 +16997,20 @@ var __publicField = (obj, key, value) => {
|
|
|
17055
16997
|
};
|
|
17056
16998
|
const calcStyle = (() => {
|
|
17057
16999
|
const arrowColor = rateTrend.current ? riseColor : dropColor;
|
|
17058
|
-
const textEquArrowColor =
|
|
17059
|
-
const
|
|
17060
|
-
color:
|
|
17000
|
+
const textEquArrowColor = syncColor ? arrowColor : color;
|
|
17001
|
+
const style2 = {
|
|
17002
|
+
color: value === 0 ? color : textEquArrowColor
|
|
17061
17003
|
};
|
|
17062
|
-
return
|
|
17004
|
+
return style2;
|
|
17063
17005
|
})();
|
|
17064
17006
|
const calcRate = (() => {
|
|
17065
|
-
rateTrend.current =
|
|
17066
|
-
const absRate = Math.abs(
|
|
17067
|
-
if (!
|
|
17007
|
+
rateTrend.current = value > 0;
|
|
17008
|
+
const absRate = Math.abs(value);
|
|
17009
|
+
if (!zero && value === 0) {
|
|
17068
17010
|
return "--";
|
|
17069
17011
|
}
|
|
17070
17012
|
const resultRate = `${// eslint-disable-next-line no-nested-ternary
|
|
17071
|
-
|
|
17013
|
+
symbol && value !== 0 ? rateTrend.current ? "+" : "-" : ""}${myFixed(Number(absRate), digits)}%`;
|
|
17072
17014
|
return resultRate;
|
|
17073
17015
|
})();
|
|
17074
17016
|
const calcIconProps = (() => {
|
|
@@ -17079,13 +17021,21 @@ var __publicField = (obj, key, value) => {
|
|
|
17079
17021
|
})();
|
|
17080
17022
|
const renderContent = (arrowLeft2) => {
|
|
17081
17023
|
const classNameSuffix = !arrowLeft2 ? "icon-after" : "icon-before";
|
|
17082
|
-
return /* @__PURE__ */ React.createElement(
|
|
17024
|
+
return /* @__PURE__ */ React.createElement(
|
|
17025
|
+
"span",
|
|
17026
|
+
{
|
|
17027
|
+
className: `${classPrefix2}__${classNameSuffix} ${classPrefix2}__value`,
|
|
17028
|
+
style: calcStyle
|
|
17029
|
+
},
|
|
17030
|
+
calcRate
|
|
17031
|
+
);
|
|
17083
17032
|
};
|
|
17084
|
-
return /* @__PURE__ */ React.createElement("div", { className: `${
|
|
17033
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, !arrowLeft && renderContent(!arrowLeft), Number(value) !== 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, rateTrend.current ? /* @__PURE__ */ React.createElement(React.Fragment, null, riseIcon || /* @__PURE__ */ React.createElement(a, { color: calcIconProps.color })) : /* @__PURE__ */ React.createElement(React.Fragment, null, downIcon || /* @__PURE__ */ React.createElement(a$1, { color: calcIconProps.color }))), arrowLeft && renderContent(!arrowLeft));
|
|
17085
17034
|
};
|
|
17086
17035
|
TrendArrow.defaultProps = defaultProps$1;
|
|
17087
17036
|
TrendArrow.displayName = "NutTrendArrow";
|
|
17088
17037
|
const defaultProps = {
|
|
17038
|
+
...ComponentDefaults,
|
|
17089
17039
|
content: "",
|
|
17090
17040
|
fullPage: true,
|
|
17091
17041
|
zIndex: 2e3,
|
|
@@ -17097,9 +17047,8 @@ var __publicField = (obj, key, value) => {
|
|
|
17097
17047
|
imageWidth: 120,
|
|
17098
17048
|
imageHeight: 64,
|
|
17099
17049
|
rotate: -22,
|
|
17100
|
-
|
|
17050
|
+
color: "rgba(0,0,0,.15)",
|
|
17101
17051
|
fontStyle: "normal",
|
|
17102
|
-
fontFamily: "PingFang SC",
|
|
17103
17052
|
fontWeight: "normal",
|
|
17104
17053
|
fontSize: 14
|
|
17105
17054
|
};
|
|
@@ -17118,22 +17067,20 @@ var __publicField = (obj, key, value) => {
|
|
|
17118
17067
|
imageWidth,
|
|
17119
17068
|
imageHeight,
|
|
17120
17069
|
rotate,
|
|
17121
|
-
|
|
17070
|
+
color,
|
|
17122
17071
|
fontStyle,
|
|
17123
17072
|
fontFamily,
|
|
17124
17073
|
fontWeight,
|
|
17125
17074
|
fontSize,
|
|
17126
|
-
style
|
|
17127
|
-
children
|
|
17075
|
+
style
|
|
17128
17076
|
} = {
|
|
17129
17077
|
...defaultProps,
|
|
17130
17078
|
...props
|
|
17131
17079
|
};
|
|
17132
17080
|
const [base64Url, setBase64Url] = React.useState("");
|
|
17133
|
-
const
|
|
17134
|
-
const classes = classNames({
|
|
17135
|
-
[`${
|
|
17136
|
-
[`${b2("")}-full-page`]: fullPage
|
|
17081
|
+
const classPrefix2 = "nut-watermark";
|
|
17082
|
+
const classes = classNames(classPrefix2, {
|
|
17083
|
+
[`${classPrefix2}-full-page`]: fullPage
|
|
17137
17084
|
});
|
|
17138
17085
|
const cls = classNames(classes, className);
|
|
17139
17086
|
React.useEffect(() => {
|
|
@@ -17143,8 +17090,8 @@ var __publicField = (obj, key, value) => {
|
|
|
17143
17090
|
let ratio = 1;
|
|
17144
17091
|
Taro.getSystemInfo().then((res) => {
|
|
17145
17092
|
ratio = res.pixelRatio;
|
|
17146
|
-
const canvasWidth = `${(gapX + width) * ratio}
|
|
17147
|
-
const canvasHeight = `${(gapY + height) * ratio}
|
|
17093
|
+
const canvasWidth = `${(gapX + width) * ratio}`;
|
|
17094
|
+
const canvasHeight = `${(gapY + height) * ratio}`;
|
|
17148
17095
|
const markWidth = width * ratio;
|
|
17149
17096
|
const markHeight = height * ratio;
|
|
17150
17097
|
let ctx;
|
|
@@ -17152,8 +17099,8 @@ var __publicField = (obj, key, value) => {
|
|
|
17152
17099
|
if (process.env.TARO_ENV === "h5") {
|
|
17153
17100
|
canvas = document.createElement("canvas");
|
|
17154
17101
|
ctx = canvas.getContext("2d");
|
|
17155
|
-
canvas.setAttribute("width", canvasWidth);
|
|
17156
|
-
canvas.setAttribute("height", canvasHeight);
|
|
17102
|
+
canvas.setAttribute("width", `${canvasWidth}px`);
|
|
17103
|
+
canvas.setAttribute("height", `${canvasHeight}px`);
|
|
17157
17104
|
} else {
|
|
17158
17105
|
canvas = Taro.createOffscreenCanvas({
|
|
17159
17106
|
type: "2d",
|
|
@@ -17193,7 +17140,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17193
17140
|
ctx.rotate(Math.PI / 180 * Number(rotate));
|
|
17194
17141
|
const markSize = Number(fontSize) * ratio;
|
|
17195
17142
|
ctx.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
|
|
17196
|
-
ctx.fillStyle =
|
|
17143
|
+
ctx.fillStyle = color;
|
|
17197
17144
|
ctx.fillText(content, 0, 0);
|
|
17198
17145
|
ctx.restore();
|
|
17199
17146
|
setBase64Url(canvas.toDataURL());
|
|
@@ -17268,7 +17215,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17268
17215
|
exports2.NoticeBar = NoticeBar;
|
|
17269
17216
|
exports2.Notify = Notify;
|
|
17270
17217
|
exports2.NumberKeyboard = NumberKeyboard;
|
|
17271
|
-
exports2.Overlay = Overlay;
|
|
17218
|
+
exports2.Overlay = Overlay$1;
|
|
17272
17219
|
exports2.Pagination = Pagination;
|
|
17273
17220
|
exports2.Picker = Picker$1;
|
|
17274
17221
|
exports2.Popover = Popover;
|