@nutui/nutui-react-taro 2.0.0-alpha.11 → 2.0.0-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/esm/ActionSheet/style/style.css +1 -1
- package/dist/esm/ActionSheet.js +1 -3
- package/dist/esm/CountDown/style/style.css +1 -1
- package/dist/esm/CountDown.js +2 -3
- package/dist/esm/Ellipsis/style/style.css +1 -1
- package/dist/esm/Ellipsis.js +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/Toast/style/style.css +1 -1
- package/dist/esm/Toast.js +2 -3
- package/dist/esm/VirtualList/style/style.css +1 -1
- package/dist/esm/VirtualList.js +2 -2
- 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 +7 -7
- 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/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/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/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/{virtuallist.taro-99f03769.js → virtuallist.taro-97d3403a.js} +27 -30
- 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 +393 -422
- package/dist/nutui.react.umd.js +393 -422
- package/dist/packages/actionsheet/actionsheet.scss +26 -73
- package/dist/packages/countdown/countdown.scss +2 -0
- package/dist/packages/ellipsis/ellipsis.scss +4 -0
- 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/virtuallist/virtuallist.scss +0 -12
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +56 -60
- package/dist/styles/variables.scss +30 -53
- package/dist/types/packages/actionsheet/actionsheet.taro.d.ts +11 -15
- package/dist/types/packages/actionsheet/index.taro.d.ts +1 -0
- package/dist/types/packages/configprovider/configprovider.d.ts +2 -1
- package/dist/types/packages/configprovider/configprovider.taro.d.ts +2 -1
- 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 +5 -4
- package/dist/types/packages/countdown/index.taro.d.ts +1 -0
- package/dist/types/packages/ellipsis/ellipsis.taro.d.ts +1 -0
- package/dist/types/packages/overlay/index.d.ts +3 -0
- package/dist/types/packages/overlay/overlay.d.ts +14 -0
- package/dist/types/packages/searchbar/index.taro.d.ts +1 -0
- package/dist/types/packages/searchbar/searchbar.taro.d.ts +4 -31
- package/dist/types/packages/shortpassword/index.taro.d.ts +1 -0
- package/dist/types/packages/shortpassword/shortpassword.taro.d.ts +17 -20
- 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/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 +13 -14
- package/package.json +1 -1
- package/dist/esm/actionsheet.taro-d2217152.js +0 -61
- 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/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.12 Fri May 26 2023 15:28:47 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$j = "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$j, 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$j}__left` }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$j}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$j}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React.createElement(
|
|
1998
1998
|
"div",
|
|
1999
1999
|
{
|
|
2000
|
-
className: `${classPrefix$
|
|
2000
|
+
className: `${classPrefix$j}__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$j}__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$i = "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$i, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$i}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$i}__description` }, description) : null, /* @__PURE__ */ React.createElement(
|
|
2022
2022
|
"div",
|
|
2023
2023
|
{
|
|
2024
|
-
className: `${classPrefix$
|
|
2024
|
+
className: `${classPrefix$i}__wrap ${divider ? `${classPrefix$i}__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$h = `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$h}`]: true,
|
|
2727
|
+
[`${classPrefix$h}__center`]: children,
|
|
2728
|
+
[`${classPrefix$h}__left`]: contentPosition === "left",
|
|
2729
|
+
[`${classPrefix$h}__right`]: contentPosition === "right",
|
|
2730
|
+
[`${classPrefix$h}__hairline`]: true
|
|
2731
2731
|
}) : classNames({
|
|
2732
|
-
[`${classPrefix$
|
|
2733
|
-
[`${classPrefix$
|
|
2732
|
+
[`${classPrefix$h}`]: true,
|
|
2733
|
+
[`${classPrefix$h}__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$g = "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$g}
|
|
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$f = "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$f, 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$e = "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$e,
|
|
5884
|
+
`${classPrefix$e}--${direction}`,
|
|
5885
5885
|
className
|
|
5886
5886
|
);
|
|
5887
|
-
const classesTitle = classNames(`${classPrefix$
|
|
5888
|
-
[`${classPrefix$
|
|
5889
|
-
[`${classPrefix$
|
|
5890
|
-
[`${classPrefix$
|
|
5887
|
+
const classesTitle = classNames(`${classPrefix$e}__titles`, {
|
|
5888
|
+
[`${classPrefix$e}__titles--${activeType}`]: activeType,
|
|
5889
|
+
[`${classPrefix$e}__titles--scrollable`]: true,
|
|
5890
|
+
[`${classPrefix$e}__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$e}__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$e}__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$e}__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$e}__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$e}__content__wrap` }, /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix$e}__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$d = "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$d, 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$c = "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$c}__icon--disable`;
|
|
8240
8240
|
}
|
|
8241
8241
|
if (innerChecked) {
|
|
8242
8242
|
if (innerIndeterminate) {
|
|
8243
|
-
return `${classPrefix$
|
|
8243
|
+
return `${classPrefix$c}__icon--indeterminate`;
|
|
8244
8244
|
}
|
|
8245
|
-
return `${classPrefix$
|
|
8245
|
+
return `${classPrefix$c}__icon`;
|
|
8246
8246
|
}
|
|
8247
|
-
return `${classPrefix$
|
|
8247
|
+
return `${classPrefix$c}__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$c}__label `, {
|
|
8254
|
+
[`${classPrefix$c}__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$c, className, {
|
|
8274
|
+
[`${classPrefix$c}--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$b = `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$b}`]: true,
|
|
9756
|
+
[`${classPrefix$b}--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$a = "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$a, className, {
|
|
10459
|
+
[`${classPrefix$a}--${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
|
-
|
|
11203
|
+
const val = format(value);
|
|
11204
|
+
if (val.length >= comLen) {
|
|
11205
|
+
onComplete && onComplete(val);
|
|
11299
11206
|
}
|
|
11300
|
-
|
|
11301
|
-
|
|
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
|
-
};
|
|
11321
|
-
}
|
|
11322
|
-
if (isAndroid) {
|
|
11323
|
-
style2 = {
|
|
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$9 = `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$9} ${className}`, ...rest }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$9}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$9}__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$8 = "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$8}--popup-top`]: position === "top",
|
|
13246
|
+
[`${classPrefix$8}--popup-bottom`]: position === "bottom",
|
|
13247
|
+
[`${classPrefix$8}`]: true,
|
|
13248
|
+
[`${classPrefix$8}--${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$7 = `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$7, 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$6 = "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$6}__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$6} ${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$6}__inner ${classPrefix$6}-${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$6}__icon-wrapper` }, iconName()) : null,
|
|
14139
|
+
title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$6}-title` }, title) : null,
|
|
14140
|
+
/* @__PURE__ */ React.createElement("span", { className: `${classPrefix$6}-text` }, msg)
|
|
14141
|
+
))
|
|
14220
14142
|
) : null);
|
|
14221
14143
|
};
|
|
14222
14144
|
Toast.defaultProps = defaultProps$t;
|
|
@@ -14915,13 +14837,16 @@ var __publicField = (obj, key, value) => {
|
|
|
14915
14837
|
Collapse.displayName = "NutCollapse";
|
|
14916
14838
|
Collapse.Item = CollapseItem;
|
|
14917
14839
|
const defaultProps$k = {
|
|
14840
|
+
...ComponentDefaults,
|
|
14918
14841
|
paused: false,
|
|
14919
14842
|
startTime: Date.now(),
|
|
14920
14843
|
endTime: Date.now(),
|
|
14844
|
+
remainingTime: 0,
|
|
14921
14845
|
millisecond: false,
|
|
14922
14846
|
format: "HH:mm:ss",
|
|
14923
14847
|
autoStart: true,
|
|
14924
|
-
time: 0
|
|
14848
|
+
time: 0,
|
|
14849
|
+
destroy: false
|
|
14925
14850
|
};
|
|
14926
14851
|
const InternalCountDown = (props, ref) => {
|
|
14927
14852
|
useConfig$1();
|
|
@@ -14929,10 +14854,12 @@ var __publicField = (obj, key, value) => {
|
|
|
14929
14854
|
paused,
|
|
14930
14855
|
startTime,
|
|
14931
14856
|
endTime,
|
|
14857
|
+
remainingTime,
|
|
14932
14858
|
millisecond,
|
|
14933
14859
|
format,
|
|
14934
14860
|
autoStart,
|
|
14935
14861
|
time,
|
|
14862
|
+
destroy,
|
|
14936
14863
|
className,
|
|
14937
14864
|
style,
|
|
14938
14865
|
onEnd,
|
|
@@ -14942,7 +14869,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14942
14869
|
children,
|
|
14943
14870
|
...rest
|
|
14944
14871
|
} = { ...defaultProps$k, ...props };
|
|
14945
|
-
const
|
|
14872
|
+
const classPrefix2 = "nut-countdown";
|
|
14946
14873
|
const [restTimeStamp, setRestTime] = React.useState(0);
|
|
14947
14874
|
const stateRef = React.useRef({
|
|
14948
14875
|
pauseTime: 0,
|
|
@@ -14967,8 +14894,12 @@ var __publicField = (obj, key, value) => {
|
|
|
14967
14894
|
return new Date(t).getTime();
|
|
14968
14895
|
};
|
|
14969
14896
|
const initTime = () => {
|
|
14970
|
-
|
|
14971
|
-
|
|
14897
|
+
if (remainingTime) {
|
|
14898
|
+
stateRef.current.handleEndTime = Date.now() + Number(remainingTime);
|
|
14899
|
+
} else {
|
|
14900
|
+
stateRef.current.handleEndTime = endTime;
|
|
14901
|
+
stateRef.current.diffTime = Date.now() - getTimeStamp(startTime);
|
|
14902
|
+
}
|
|
14972
14903
|
if (!stateRef.current.counting)
|
|
14973
14904
|
stateRef.current.counting = true;
|
|
14974
14905
|
tick();
|
|
@@ -15110,7 +15041,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15110
15041
|
if (stateRef.current.isIninted) {
|
|
15111
15042
|
initTime();
|
|
15112
15043
|
}
|
|
15113
|
-
}, [endTime, startTime]);
|
|
15044
|
+
}, [endTime, startTime, remainingTime]);
|
|
15114
15045
|
React.useEffect(() => {
|
|
15115
15046
|
if (autoStart) {
|
|
15116
15047
|
initTime();
|
|
@@ -15124,20 +15055,28 @@ var __publicField = (obj, key, value) => {
|
|
|
15124
15055
|
return componentWillUnmount;
|
|
15125
15056
|
}, []);
|
|
15126
15057
|
const componentWillUnmount = () => {
|
|
15127
|
-
|
|
15058
|
+
destroy && cancelAnimationFrame(stateRef.current.timer);
|
|
15128
15059
|
};
|
|
15129
15060
|
const renderTime = (() => {
|
|
15130
15061
|
return formatRemainTime(stateRef.current.restTime);
|
|
15131
15062
|
})();
|
|
15132
|
-
return /* @__PURE__ */ React.createElement(
|
|
15063
|
+
return /* @__PURE__ */ React.createElement(
|
|
15133
15064
|
"div",
|
|
15134
15065
|
{
|
|
15135
|
-
className:
|
|
15136
|
-
|
|
15137
|
-
|
|
15066
|
+
className: `${classPrefix2} ${className}`,
|
|
15067
|
+
style: { ...style },
|
|
15068
|
+
...rest
|
|
15069
|
+
},
|
|
15070
|
+
children || /* @__PURE__ */ React.createElement(
|
|
15071
|
+
"div",
|
|
15072
|
+
{
|
|
15073
|
+
className: `${classPrefix2}__block`,
|
|
15074
|
+
dangerouslySetInnerHTML: {
|
|
15075
|
+
__html: `${renderTime}`
|
|
15076
|
+
}
|
|
15138
15077
|
}
|
|
15139
|
-
|
|
15140
|
-
)
|
|
15078
|
+
)
|
|
15079
|
+
);
|
|
15141
15080
|
};
|
|
15142
15081
|
const CountDown = React.forwardRef(InternalCountDown);
|
|
15143
15082
|
CountDown.defaultProps = defaultProps$k;
|
|
@@ -15150,7 +15089,8 @@ var __publicField = (obj, key, value) => {
|
|
|
15150
15089
|
expandText: "",
|
|
15151
15090
|
collapseText: "",
|
|
15152
15091
|
symbol: "...",
|
|
15153
|
-
lineHeight: "20"
|
|
15092
|
+
lineHeight: "20",
|
|
15093
|
+
width: "auto"
|
|
15154
15094
|
};
|
|
15155
15095
|
const classPrefix$2 = `nut-ellipsis`;
|
|
15156
15096
|
const Ellipsis = (props) => {
|
|
@@ -15165,6 +15105,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15165
15105
|
collapseText,
|
|
15166
15106
|
symbol,
|
|
15167
15107
|
lineHeight,
|
|
15108
|
+
width,
|
|
15168
15109
|
onClick,
|
|
15169
15110
|
onChange,
|
|
15170
15111
|
...rest
|
|
@@ -15190,7 +15131,11 @@ var __publicField = (obj, key, value) => {
|
|
|
15190
15131
|
const digitReg = /^[0-9]+$/;
|
|
15191
15132
|
const letterUpperReg = /^[A-Z]+$/;
|
|
15192
15133
|
const letterLowerReg = /^[a-z]+$/;
|
|
15193
|
-
const classes = classNames(
|
|
15134
|
+
const classes = classNames(
|
|
15135
|
+
classPrefix$2,
|
|
15136
|
+
className,
|
|
15137
|
+
width ? `${classPrefix$2}-width` : ""
|
|
15138
|
+
);
|
|
15194
15139
|
const init = () => {
|
|
15195
15140
|
setExceeded(false);
|
|
15196
15141
|
setExpanded(false);
|
|
@@ -15372,17 +15317,47 @@ var __publicField = (obj, key, value) => {
|
|
|
15372
15317
|
id: `root${refRandomId}`,
|
|
15373
15318
|
...rest
|
|
15374
15319
|
},
|
|
15375
|
-
/* @__PURE__ */ React.createElement("div", null, !exceeded ? /* @__PURE__ */ React.createElement(
|
|
15376
|
-
"
|
|
15320
|
+
/* @__PURE__ */ React.createElement("div", null, !exceeded ? /* @__PURE__ */ React.createElement(
|
|
15321
|
+
"div",
|
|
15377
15322
|
{
|
|
15378
|
-
className: "nut-ellipsis-
|
|
15379
|
-
|
|
15380
|
-
|
|
15381
|
-
|
|
15323
|
+
className: "nut-ellipsis-wordbreak",
|
|
15324
|
+
style: {
|
|
15325
|
+
width: `${!Number.isNaN(Number(width)) ? `${width}px` : "auto"}`
|
|
15326
|
+
}
|
|
15327
|
+
},
|
|
15328
|
+
content
|
|
15329
|
+
) : null, exceeded && !expanded ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
15330
|
+
"div",
|
|
15331
|
+
{
|
|
15332
|
+
className: "nut-ellipsis-wordbreak",
|
|
15333
|
+
style: {
|
|
15334
|
+
width: `${!Number.isNaN(Number(width)) ? `${width}px` : "auto"}`
|
|
15335
|
+
}
|
|
15336
|
+
},
|
|
15337
|
+
(_a = ellipsis.current) == null ? void 0 : _a.leading,
|
|
15338
|
+
((_b = ellipsis.current) == null ? void 0 : _b.leading) && symbol,
|
|
15339
|
+
expandText ? /* @__PURE__ */ React.createElement(
|
|
15340
|
+
"span",
|
|
15341
|
+
{
|
|
15342
|
+
className: "nut-ellipsis-text",
|
|
15343
|
+
onClick: (e) => {
|
|
15344
|
+
e.stopPropagation();
|
|
15345
|
+
clickHandle(1);
|
|
15346
|
+
}
|
|
15347
|
+
},
|
|
15348
|
+
expandText
|
|
15349
|
+
) : null,
|
|
15350
|
+
((_c = ellipsis.current) == null ? void 0 : _c.tailing) && symbol,
|
|
15351
|
+
(_d = ellipsis.current) == null ? void 0 : _d.tailing
|
|
15352
|
+
)) : null, exceeded && expanded ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
15353
|
+
"div",
|
|
15354
|
+
{
|
|
15355
|
+
style: {
|
|
15356
|
+
width: `${!Number.isNaN(Number(width)) ? `${width}px` : "auto"}`
|
|
15382
15357
|
}
|
|
15383
15358
|
},
|
|
15384
|
-
|
|
15385
|
-
)
|
|
15359
|
+
content
|
|
15360
|
+
), expandText ? /* @__PURE__ */ React.createElement(
|
|
15386
15361
|
"span",
|
|
15387
15362
|
{
|
|
15388
15363
|
className: "nut-ellipsis-text",
|
|
@@ -15866,31 +15841,33 @@ var __publicField = (obj, key, value) => {
|
|
|
15866
15841
|
}
|
|
15867
15842
|
});
|
|
15868
15843
|
};
|
|
15844
|
+
const clientHeight = Taro.getSystemInfoSync().windowHeight - 5 || 667;
|
|
15869
15845
|
const defaultProps$e = {
|
|
15870
|
-
|
|
15871
|
-
|
|
15872
|
-
|
|
15846
|
+
...ComponentDefaults,
|
|
15847
|
+
list: [],
|
|
15848
|
+
containerHeight: clientHeight,
|
|
15849
|
+
itemHeight: 66,
|
|
15850
|
+
itemEqual: true,
|
|
15873
15851
|
overscan: 2
|
|
15874
15852
|
};
|
|
15875
|
-
const clientHeight = Taro.getSystemInfoSync().windowHeight - 5 || 667;
|
|
15876
|
-
Taro.getSystemInfoSync().windowWidth || 375;
|
|
15877
15853
|
const VirtualList = (props) => {
|
|
15878
15854
|
const {
|
|
15879
|
-
|
|
15855
|
+
list,
|
|
15880
15856
|
ItemRender,
|
|
15881
|
-
|
|
15882
|
-
|
|
15883
|
-
overscan
|
|
15857
|
+
itemHeight,
|
|
15858
|
+
itemEqual,
|
|
15859
|
+
overscan,
|
|
15884
15860
|
key,
|
|
15885
15861
|
onScroll,
|
|
15886
15862
|
className,
|
|
15887
|
-
|
|
15863
|
+
containerHeight,
|
|
15888
15864
|
...rest
|
|
15889
|
-
} =
|
|
15865
|
+
} = {
|
|
15866
|
+
...defaultProps$e,
|
|
15867
|
+
...props
|
|
15868
|
+
};
|
|
15890
15869
|
const [startOffset, setStartOffset] = React.useState(0);
|
|
15891
15870
|
const [start, setStart] = React.useState(0);
|
|
15892
|
-
const [list, setList] = React.useState(sourceData.slice());
|
|
15893
|
-
useConfig$1();
|
|
15894
15871
|
const scrollRef = React.useRef(null);
|
|
15895
15872
|
const itemsRef = React.useRef(null);
|
|
15896
15873
|
const firstItemRef = React.useRef(null);
|
|
@@ -15905,7 +15882,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15905
15882
|
right: 0
|
|
15906
15883
|
}
|
|
15907
15884
|
]);
|
|
15908
|
-
const [offSetSize, setOffSetSize] = React.useState(
|
|
15885
|
+
const [offSetSize, setOffSetSize] = React.useState(containerHeight || 0);
|
|
15909
15886
|
const [options, setOptions] = React.useState({
|
|
15910
15887
|
startOffset: 0,
|
|
15911
15888
|
// 可视区域距离顶部的偏移量
|
|
@@ -15915,37 +15892,32 @@ var __publicField = (obj, key, value) => {
|
|
|
15915
15892
|
endIndex: 10
|
|
15916
15893
|
// 可视区域结束索引
|
|
15917
15894
|
});
|
|
15918
|
-
React.useEffect(() => {
|
|
15919
|
-
if (sourceData.length) {
|
|
15920
|
-
setList(sourceData.slice());
|
|
15921
|
-
}
|
|
15922
|
-
}, [sourceData]);
|
|
15923
15895
|
React.useEffect(() => {
|
|
15924
15896
|
setPositions((options2) => {
|
|
15925
15897
|
return { ...options2, endIndex: visibleCount() };
|
|
15926
15898
|
});
|
|
15927
|
-
}, [
|
|
15899
|
+
}, [itemHeight, overscan, offSetSize]);
|
|
15928
15900
|
React.useEffect(() => {
|
|
15929
|
-
if (
|
|
15901
|
+
if (containerHeight)
|
|
15930
15902
|
return;
|
|
15931
15903
|
setOffSetSize(getContainerHeight());
|
|
15932
|
-
}, [
|
|
15904
|
+
}, [containerHeight]);
|
|
15933
15905
|
React.useEffect(() => {
|
|
15934
|
-
const pos = initPositinoCache(
|
|
15906
|
+
const pos = initPositinoCache(itemHeight, list.length);
|
|
15935
15907
|
setPositions(pos);
|
|
15936
|
-
}, [
|
|
15908
|
+
}, [itemHeight, list]);
|
|
15937
15909
|
const getContainerHeight = () => {
|
|
15938
|
-
const initH =
|
|
15939
|
-
return initH < clientHeight ? initH + overscan *
|
|
15910
|
+
const initH = itemHeight * list.length;
|
|
15911
|
+
return initH < clientHeight ? initH + overscan * itemHeight - 5 : Math.min(containerHeight, clientHeight);
|
|
15940
15912
|
};
|
|
15941
15913
|
const visibleCount = () => {
|
|
15942
|
-
return Math.ceil(getContainerHeight() /
|
|
15914
|
+
return Math.ceil(getContainerHeight() / itemHeight) + overscan;
|
|
15943
15915
|
};
|
|
15944
15916
|
const end = () => {
|
|
15945
15917
|
return start + visibleCount();
|
|
15946
15918
|
};
|
|
15947
15919
|
const listHeight = () => {
|
|
15948
|
-
return list.length *
|
|
15920
|
+
return list.length * itemHeight;
|
|
15949
15921
|
};
|
|
15950
15922
|
const visibleData = () => {
|
|
15951
15923
|
return list.slice(start, Math.min(end(), list.length));
|
|
@@ -15964,15 +15936,15 @@ var __publicField = (obj, key, value) => {
|
|
|
15964
15936
|
const startIndex = binarySearch(positions, scrollSize, false);
|
|
15965
15937
|
const overStart = startIndex - overscan > -1 ? startIndex - overscan : 0;
|
|
15966
15938
|
const endIndex = end();
|
|
15967
|
-
if (!
|
|
15939
|
+
if (!itemEqual) {
|
|
15968
15940
|
updateTotalSize();
|
|
15969
15941
|
}
|
|
15970
|
-
setStart(Math.floor(scrollTop /
|
|
15942
|
+
setStart(Math.floor(scrollTop / itemHeight));
|
|
15971
15943
|
setOptions({ startOffset, startIndex, overStart, endIndex });
|
|
15972
15944
|
if (end() > list.length - 1) {
|
|
15973
15945
|
onScroll && onScroll();
|
|
15974
15946
|
}
|
|
15975
|
-
setStartOffset(scrollTop - scrollTop %
|
|
15947
|
+
setStartOffset(scrollTop - scrollTop % itemHeight);
|
|
15976
15948
|
};
|
|
15977
15949
|
return /* @__PURE__ */ React.createElement(
|
|
15978
15950
|
"div",
|
|
@@ -15980,13 +15952,12 @@ var __publicField = (obj, key, value) => {
|
|
|
15980
15952
|
className: className ? `${className} nut-virtualList-box` : "nut-virtualList-box",
|
|
15981
15953
|
...rest,
|
|
15982
15954
|
style: {
|
|
15983
|
-
height:
|
|
15955
|
+
height: containerHeight ? `${offSetSize}px` : ""
|
|
15984
15956
|
}
|
|
15985
15957
|
},
|
|
15986
15958
|
/* @__PURE__ */ React.createElement(
|
|
15987
15959
|
components.ScrollView,
|
|
15988
15960
|
{
|
|
15989
|
-
scrollTop: 0,
|
|
15990
15961
|
scrollY: true,
|
|
15991
15962
|
type: "list",
|
|
15992
15963
|
ref: scrollRef,
|
|
@@ -16022,7 +15993,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16022
15993
|
className: "nut-virtuallist-item",
|
|
16023
15994
|
key: `${data}`,
|
|
16024
15995
|
style: {
|
|
16025
|
-
height: `${
|
|
15996
|
+
height: `${itemEqual ? `${itemHeight}px` : "auto"}`
|
|
16026
15997
|
}
|
|
16027
15998
|
},
|
|
16028
15999
|
ItemRender ? /* @__PURE__ */ React.createElement(ItemRender, { data, index: `${index}` }) : data
|
|
@@ -17268,7 +17239,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17268
17239
|
exports2.NoticeBar = NoticeBar;
|
|
17269
17240
|
exports2.Notify = Notify;
|
|
17270
17241
|
exports2.NumberKeyboard = NumberKeyboard;
|
|
17271
|
-
exports2.Overlay = Overlay;
|
|
17242
|
+
exports2.Overlay = Overlay$1;
|
|
17272
17243
|
exports2.Pagination = Pagination;
|
|
17273
17244
|
exports2.Picker = Picker$1;
|
|
17274
17245
|
exports2.Popover = Popover;
|