@nutui/nutui-react-taro 2.0.0-alpha.14 → 2.0.0-alpha.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/esm/Address.js +2 -2
- package/dist/esm/Audio.js +2 -2
- package/dist/esm/Avatar.js +3 -3
- package/dist/esm/Calendar.js +3 -3
- package/dist/esm/CalendarItem.js +2 -2
- package/dist/esm/Card/style/style.css +1 -1
- package/dist/esm/Card.js +2 -4
- package/dist/esm/ConfigProvider.js +2 -2
- package/dist/esm/CountDown.js +2 -2
- package/dist/esm/DatePicker.js +3 -3
- package/dist/esm/Dialog/style/index.js +1 -0
- package/dist/esm/Dialog/style/style.css +1 -1
- package/dist/esm/Dialog.js +2 -2
- package/dist/esm/Empty.js +2 -2
- package/dist/esm/FixedNav.js +2 -2
- package/dist/esm/Grid.js +3 -3
- package/dist/esm/GridItem.js +2 -2
- package/dist/esm/Image.js +2 -2
- package/dist/esm/ImagePreview.js +1 -1
- package/dist/esm/InfiniteLoading/style/style.css +1 -0
- package/dist/esm/InfiniteLoading.js +10 -0
- package/dist/esm/Input.js +2 -2
- package/dist/esm/Menu/style/style.css +1 -1
- package/dist/esm/MenuItem/style/style.css +1 -1
- package/dist/esm/MenuItem.js +1 -1
- package/dist/esm/NoticeBar.js +1 -1
- package/dist/esm/NumberKeyboard.js +2 -2
- package/dist/esm/Pagination.js +2 -2
- package/dist/esm/Picker.js +2 -2
- package/dist/esm/PullToRefresh.js +2 -2
- package/dist/esm/SearchBar.js +2 -2
- package/dist/esm/ShortPassword.js +2 -2
- package/dist/esm/Signature/style/index.js +1 -1
- package/dist/esm/Signature/style/style.css +1 -1
- package/dist/esm/Signature.js +1 -7
- package/dist/esm/Skeleton.js +4 -4
- package/dist/esm/Table.js +2 -2
- package/dist/esm/Tag/style/style.css +1 -1
- package/dist/esm/Tag.js +1 -1
- package/dist/esm/TextArea.js +2 -2
- package/dist/esm/TimeDetail/style/style.css +1 -1
- package/dist/esm/TimeDetail.js +3 -4
- package/dist/esm/TimeSelect/style/index.js +0 -1
- package/dist/esm/TimeSelect/style/style.css +1 -1
- package/dist/esm/TimeSelect.js +4 -7
- package/dist/esm/Uploader.js +2 -2
- package/dist/esm/WaterMark.js +2 -2
- package/dist/esm/{address.taro-1a8ab3f1.js → address.taro-cc879a1d.js} +1 -1
- package/dist/esm/{audio.taro-73011657.js → audio.taro-64b15071.js} +1 -1
- package/dist/esm/{avatar.taro-01536aff.js → avatar.taro-8a26cd6c.js} +1 -1
- package/dist/esm/{calendar.taro-10a6cb11.js → calendar.taro-02195ddb.js} +2 -2
- package/dist/esm/{calendaritem.taro-3e5f114e.js → calendaritem.taro-4230e5c4.js} +1 -1
- package/dist/esm/card.taro-92fe9733.js +64 -0
- package/dist/esm/{configprovider.taro-25758d9f.js → configprovider.taro-372b1525.js} +1 -1
- package/dist/esm/{countdown.taro-c399cc08.js → countdown.taro-8f19d21b.js} +1 -1
- package/dist/esm/{datepicker.taro-6304d59d.js → datepicker.taro-b480d072.js} +44 -46
- package/dist/esm/{dialog.taro-290eb9a6.js → dialog.taro-e5c2cb03.js} +1 -1
- package/dist/esm/{empty.taro-ca792f57.js → empty.taro-8345ac72.js} +1 -1
- package/dist/esm/{fixednav.taro-b9ecf0d5.js → fixednav.taro-6c69ad79.js} +1 -1
- package/dist/esm/{grid.taro-fbbd8618.js → grid.taro-9b63aca5.js} +1 -1
- package/dist/esm/{griditem.taro-b0c37077.js → griditem.taro-48971911.js} +1 -1
- package/dist/esm/{image.taro-767aa000.js → image.taro-fde6e649.js} +1 -1
- package/dist/esm/{imagepreview.taro-daa5a84f.js → imagepreview.taro-cfe0a4cc.js} +3 -2
- package/dist/esm/{infiniteloading.taro-f8f23ac6.js → infiniteloading.taro-53eeb1ec.js} +17 -33
- package/dist/esm/{input.taro-27d686c9.js → input.taro-69c08268.js} +1 -1
- package/dist/esm/{menuitem.taro-6aa35a00.js → menuitem.taro-7f8c12cf.js} +11 -8
- package/dist/esm/{noticebar.taro-8d496dd6.js → noticebar.taro-dc895cc5.js} +1 -1
- package/dist/esm/{numberkeyboard.taro-ad8afaf9.js → numberkeyboard.taro-18879f04.js} +1 -1
- package/dist/esm/nutui-react.es.js +39 -41
- package/dist/esm/{pagination.taro-63607c3b.js → pagination.taro-592bca05.js} +1 -1
- package/dist/esm/{picker.taro-8ba4624c.js → picker.taro-3781a455.js} +2 -2
- package/dist/esm/{pulltorefresh.taro-5b36a881.js → pulltorefresh.taro-3719fdfb.js} +1 -1
- package/dist/esm/{searchbar.taro-09468fff.js → searchbar.taro-39351331.js} +1 -1
- package/dist/esm/{shortpassword.taro-eabbde1b.js → shortpassword.taro-cff61e4e.js} +1 -1
- package/dist/esm/{signature.taro-6e75a1ac.js → signature.taro-4f68516a.js} +19 -20
- package/dist/esm/{skeleton.taro-0552c2ec.js → skeleton.taro-ce714b06.js} +1 -1
- package/dist/esm/{table.taro-15a55c5d.js → table.taro-a20f15f2.js} +1 -1
- package/dist/esm/tag.taro-614758eb.js +76 -0
- package/dist/esm/{textarea.taro-c110565e.js → textarea.taro-593cd471.js} +1 -1
- package/dist/esm/timedetail.taro-d7aa4c1b.js +48 -0
- package/dist/esm/timeselect.taro-9e37e648.js +114 -0
- package/dist/esm/types/src/locales/base.d.ts +1 -1
- package/dist/esm/types/src/packages/card/card.d.ts +8 -9
- package/dist/esm/types/src/packages/card/card.taro.d.ts +8 -9
- package/dist/esm/types/src/packages/card/index.d.ts +1 -0
- package/dist/esm/types/src/packages/card/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
- package/dist/esm/types/src/packages/datepicker/datepicker.d.ts +11 -17
- package/dist/esm/types/src/packages/datepicker/datepicker.taro.d.ts +11 -17
- package/dist/esm/types/src/packages/datepicker/index.d.ts +1 -0
- package/dist/esm/types/src/packages/datepicker/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/imagepreview/imagepreview.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/infiniteloading/demo.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/infiniteloading/index.d.ts +3 -2
- package/dist/esm/types/src/packages/infiniteloading/index.taro.d.ts +3 -2
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.d.ts +9 -14
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.taro.d.ts +8 -12
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +2 -3
- package/dist/esm/types/src/packages/nutui.react.d.ts +2 -4
- package/dist/esm/types/src/packages/nutui.react.scss.d.ts +0 -1
- package/dist/esm/types/src/packages/nutui.react.taro.d.ts +2 -4
- package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +0 -1
- package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +2 -3
- package/dist/esm/types/src/packages/signature/index.d.ts +1 -0
- package/dist/esm/types/src/packages/signature/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/signature/signature.d.ts +10 -8
- package/dist/esm/types/src/packages/signature/signature.taro.d.ts +7 -12
- package/dist/esm/types/src/packages/tag/index.d.ts +1 -0
- package/dist/esm/types/src/packages/tag/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/tag/tag.d.ts +4 -6
- package/dist/esm/types/src/packages/tag/tag.taro.d.ts +4 -6
- package/dist/esm/types/src/packages/timedetail/index.d.ts +1 -2
- package/dist/esm/types/src/packages/timedetail/timedetail.d.ts +9 -11
- package/dist/esm/types/src/packages/timedetail/timedetail.taro.d.ts +9 -11
- package/dist/esm/types/src/packages/timeselect/demo.taro.d.ts +0 -4
- package/dist/esm/types/src/packages/timeselect/index.d.ts +1 -0
- package/dist/esm/types/src/packages/timeselect/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/timeselect/timeselect.d.ts +25 -20
- package/dist/esm/types/src/packages/timeselect/timeselect.taro.d.ts +25 -20
- package/dist/esm/types/src/packages/toast/Notification.d.ts +4 -1
- package/dist/esm/{uploader.taro-fbd05e20.js → uploader.taro-5ad88f83.js} +1 -1
- package/dist/esm/{watermark.taro-e2245bb1.js → watermark.taro-b6b1ae18.js} +1 -1
- package/dist/locales/base.d.ts +1 -1
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +2 -2
- package/dist/locales/id-ID.js +2 -2
- package/dist/locales/tr-TR.js +2 -2
- package/dist/locales/zh-CN.js +2 -2
- package/dist/locales/zh-TW.js +2 -2
- package/dist/locales/zh-UG.js +2 -2
- package/dist/nutui.react.es.js +693 -730
- package/dist/nutui.react.umd.js +692 -729
- package/dist/packages/card/card.scss +8 -14
- package/dist/packages/infiniteloading/infiniteloading.scss +2 -25
- package/dist/packages/menuitem/menuitem.scss +1 -1
- package/dist/packages/noticebar/noticebar.scss +0 -3
- package/dist/packages/signature/signature.scss +1 -18
- package/dist/packages/tag/tag.scss +10 -17
- package/dist/packages/timedetail/timedetail.scss +12 -37
- package/dist/packages/timeselect/timeselect.scss +15 -44
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/themes/default.scss +0 -1
- package/dist/styles/variables-jmapp.scss +50 -97
- package/dist/styles/variables.scss +51 -98
- package/dist/types/index.d.ts +2 -3
- package/dist/types/locales/base.d.ts +1 -1
- package/dist/types/packages/card/card.taro.d.ts +57 -14
- package/dist/types/packages/card/index.taro.d.ts +1 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/datepicker/datepicker.taro.d.ts +11 -17
- package/dist/types/packages/datepicker/index.taro.d.ts +1 -0
- package/dist/types/packages/imagepreview/imagepreview.taro.d.ts +5 -0
- package/dist/types/packages/infiniteloading/index.taro.d.ts +3 -2
- package/dist/types/packages/infiniteloading/infiniteloading.taro.d.ts +52 -16
- package/dist/types/packages/picker/index.d.ts +4 -0
- package/dist/types/packages/picker/picker.d.ts +18 -0
- package/dist/types/packages/picker/pickerpanel.d.ts +15 -0
- package/dist/types/packages/popup/index.d.ts +3 -0
- package/dist/types/packages/popup/popup.d.ts +22 -0
- package/dist/types/packages/signature/index.taro.d.ts +1 -0
- package/dist/types/packages/signature/signature.taro.d.ts +32 -17
- package/dist/types/packages/tag/index.taro.d.ts +1 -0
- package/dist/types/packages/tag/tag.taro.d.ts +52 -14
- package/dist/types/packages/timedetail/timedetail.taro.d.ts +9 -11
- package/dist/types/packages/timeselect/index.taro.d.ts +1 -0
- package/dist/types/packages/timeselect/timeselect.taro.d.ts +62 -21
- package/dist/types/packages/toast/toast.taro.d.ts +60 -12
- package/package.json +1 -1
- package/dist/esm/Infiniteloading/style/style.css +0 -1
- package/dist/esm/Infiniteloading.js +0 -12
- package/dist/esm/TimePannel/style/css.js +0 -1
- package/dist/esm/TimePannel/style/index.js +0 -2
- package/dist/esm/TimePannel/style/style.css +0 -1
- package/dist/esm/TimePannel.js +0 -8
- package/dist/esm/card.taro-2080f4d2.js +0 -51
- package/dist/esm/tag.taro-1b4134a5.js +0 -92
- package/dist/esm/timedetail.taro-8d2acbbf.js +0 -41
- package/dist/esm/timepannel.taro-ee4c5dfa.js +0 -22
- package/dist/esm/timeselect.taro-069deedd.js +0 -133
- package/dist/esm/types/src/packages/timedetail/demo.d.ts +0 -3
- package/dist/esm/types/src/packages/timedetail/demo.taro.d.ts +0 -3
- package/dist/esm/types/src/packages/timepannel/demo.d.ts +0 -3
- package/dist/esm/types/src/packages/timepannel/demo.taro.d.ts +0 -3
- package/dist/esm/types/src/packages/timepannel/index.d.ts +0 -2
- package/dist/esm/types/src/packages/timepannel/index.taro.d.ts +0 -2
- package/dist/esm/types/src/packages/timepannel/timepannel.d.ts +0 -8
- package/dist/esm/types/src/packages/timepannel/timepannel.taro.d.ts +0 -8
- package/dist/packages/timepannel/timepannel.scss +0 -17
- package/dist/types/packages/timepannel/index.taro.d.ts +0 -2
- package/dist/types/packages/timepannel/timepannel.taro.d.ts +0 -8
- /package/dist/esm/{Infiniteloading → InfiniteLoading}/style/css.js +0 -0
- /package/dist/esm/{Infiniteloading → InfiniteLoading}/style/index.js +0 -0
package/dist/nutui.react.es.js
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
/*!
|
|
8
|
-
* @nutui/nutui-react-taro v2.0.0-alpha.
|
|
8
|
+
* @nutui/nutui-react-taro v2.0.0-alpha.16 Fri Jun 09 2023 18:38:16 GMT+0800 (China Standard Time)
|
|
9
9
|
* (c) 2023 @jdf2e.
|
|
10
10
|
* Released under the MIT License.
|
|
11
11
|
*/
|
|
@@ -1861,7 +1861,7 @@ const ComponentDefaults = {
|
|
|
1861
1861
|
style: {}
|
|
1862
1862
|
};
|
|
1863
1863
|
const prefixCls = "nut-button";
|
|
1864
|
-
const defaultProps$
|
|
1864
|
+
const defaultProps$1t = {
|
|
1865
1865
|
...ComponentDefaults,
|
|
1866
1866
|
color: "",
|
|
1867
1867
|
type: "default",
|
|
@@ -1893,7 +1893,7 @@ const Button = React.forwardRef(
|
|
|
1893
1893
|
style,
|
|
1894
1894
|
...rest
|
|
1895
1895
|
} = {
|
|
1896
|
-
...defaultProps$
|
|
1896
|
+
...defaultProps$1t,
|
|
1897
1897
|
...props
|
|
1898
1898
|
};
|
|
1899
1899
|
const getStyle = useCallback(() => {
|
|
@@ -1948,7 +1948,7 @@ const Button = React.forwardRef(
|
|
|
1948
1948
|
}
|
|
1949
1949
|
);
|
|
1950
1950
|
Button.displayName = "NutButton";
|
|
1951
|
-
const defaultProps$
|
|
1951
|
+
const defaultProps$1s = {
|
|
1952
1952
|
...ComponentDefaults,
|
|
1953
1953
|
title: null,
|
|
1954
1954
|
description: null,
|
|
@@ -1958,7 +1958,7 @@ const defaultProps$1t = {
|
|
|
1958
1958
|
onClick: (event) => {
|
|
1959
1959
|
}
|
|
1960
1960
|
};
|
|
1961
|
-
const classPrefix$
|
|
1961
|
+
const classPrefix$n = "nut-cell";
|
|
1962
1962
|
const Cell = (props) => {
|
|
1963
1963
|
const {
|
|
1964
1964
|
children,
|
|
@@ -1972,7 +1972,7 @@ const Cell = (props) => {
|
|
|
1972
1972
|
style,
|
|
1973
1973
|
...rest
|
|
1974
1974
|
} = {
|
|
1975
|
-
...defaultProps$
|
|
1975
|
+
...defaultProps$1s,
|
|
1976
1976
|
...props
|
|
1977
1977
|
};
|
|
1978
1978
|
const handleClick = (event) => {
|
|
@@ -1989,44 +1989,44 @@ const Cell = (props) => {
|
|
|
1989
1989
|
return /* @__PURE__ */ React.createElement(
|
|
1990
1990
|
"div",
|
|
1991
1991
|
{
|
|
1992
|
-
className: classNames(classPrefix$
|
|
1992
|
+
className: classNames(classPrefix$n, 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$n}__left` }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$n}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$n}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React.createElement(
|
|
1998
1998
|
"div",
|
|
1999
1999
|
{
|
|
2000
|
-
className: `${classPrefix$
|
|
2000
|
+
className: `${classPrefix$n}__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$n}__divider` }))
|
|
2005
2005
|
);
|
|
2006
2006
|
};
|
|
2007
|
-
Cell.defaultProps = defaultProps$
|
|
2007
|
+
Cell.defaultProps = defaultProps$1s;
|
|
2008
2008
|
Cell.displayName = "NutCell";
|
|
2009
|
-
const defaultProps$
|
|
2009
|
+
const defaultProps$1r = {
|
|
2010
2010
|
...ComponentDefaults,
|
|
2011
2011
|
title: "",
|
|
2012
2012
|
description: "",
|
|
2013
2013
|
divider: true
|
|
2014
2014
|
};
|
|
2015
|
-
const classPrefix$
|
|
2015
|
+
const classPrefix$m = "nut-cell-group";
|
|
2016
2016
|
const CellGroup = (props) => {
|
|
2017
2017
|
const { children, className, style, title, description, divider, ...rest } = {
|
|
2018
|
-
...defaultProps$
|
|
2018
|
+
...defaultProps$1r,
|
|
2019
2019
|
...props
|
|
2020
2020
|
};
|
|
2021
|
-
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$
|
|
2021
|
+
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$m, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$m}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$m}__description` }, description) : null, /* @__PURE__ */ React.createElement(
|
|
2022
2022
|
"div",
|
|
2023
2023
|
{
|
|
2024
|
-
className: `${classPrefix$
|
|
2024
|
+
className: `${classPrefix$m}__wrap ${divider ? `${classPrefix$m}__wrap--divider` : ""}`
|
|
2025
2025
|
},
|
|
2026
2026
|
children
|
|
2027
2027
|
));
|
|
2028
2028
|
};
|
|
2029
|
-
CellGroup.defaultProps = defaultProps$
|
|
2029
|
+
CellGroup.defaultProps = defaultProps$1r;
|
|
2030
2030
|
CellGroup.displayName = "NutCellGroup";
|
|
2031
2031
|
var INFINITY = 1 / 0;
|
|
2032
2032
|
var symbolTag = "[object Symbol]";
|
|
@@ -2378,7 +2378,7 @@ const zhCN = {
|
|
|
2378
2378
|
},
|
|
2379
2379
|
signature: {
|
|
2380
2380
|
reSign: "重签",
|
|
2381
|
-
|
|
2381
|
+
unsupported: "对不起,当前浏览器不支持Canvas,无法使用本控件!"
|
|
2382
2382
|
},
|
|
2383
2383
|
ecard: {
|
|
2384
2384
|
chooseText: "请选择电子卡面值",
|
|
@@ -2441,7 +2441,7 @@ const zhCN = {
|
|
|
2441
2441
|
errorCanvasTips: "当前环境不支持Canvas"
|
|
2442
2442
|
}
|
|
2443
2443
|
};
|
|
2444
|
-
const defaultProps$
|
|
2444
|
+
const defaultProps$1q = {
|
|
2445
2445
|
locale: zhCN
|
|
2446
2446
|
};
|
|
2447
2447
|
const defaultConfigRef$1 = {
|
|
@@ -2464,7 +2464,7 @@ function convertThemeVarsToCSSVars(themeVars) {
|
|
|
2464
2464
|
return cssVars;
|
|
2465
2465
|
}
|
|
2466
2466
|
const ConfigProvider = (props) => {
|
|
2467
|
-
const { children, ...config2 } = { ...defaultProps$
|
|
2467
|
+
const { children, ...config2 } = { ...defaultProps$1q, ...props };
|
|
2468
2468
|
const parentConfig = useConfig$1();
|
|
2469
2469
|
const theme = config2.theme || {};
|
|
2470
2470
|
const style = useMemo(
|
|
@@ -2482,9 +2482,9 @@ const ConfigProvider = (props) => {
|
|
|
2482
2482
|
/* @__PURE__ */ React.createElement("div", { style }, children)
|
|
2483
2483
|
);
|
|
2484
2484
|
};
|
|
2485
|
-
ConfigProvider.defaultProps = defaultProps$
|
|
2485
|
+
ConfigProvider.defaultProps = defaultProps$1q;
|
|
2486
2486
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
2487
|
-
const defaultProps$
|
|
2487
|
+
const defaultProps$1p = {
|
|
2488
2488
|
fit: "fill",
|
|
2489
2489
|
position: "center",
|
|
2490
2490
|
alt: "",
|
|
@@ -2515,7 +2515,7 @@ const Image$1 = (props) => {
|
|
|
2515
2515
|
onClick,
|
|
2516
2516
|
onLoad,
|
|
2517
2517
|
onError
|
|
2518
|
-
} = { ...defaultProps$
|
|
2518
|
+
} = { ...defaultProps$1p, ...props };
|
|
2519
2519
|
const [loading, setLoading] = useState(true);
|
|
2520
2520
|
const [isError, setIsError] = useState(false);
|
|
2521
2521
|
useEffect(() => {
|
|
@@ -2574,7 +2574,7 @@ const Image$1 = (props) => {
|
|
|
2574
2574
|
showError && isError && !loading ? /* @__PURE__ */ React.createElement("div", { className: "nut-img-error" }, slotError || children || /* @__PURE__ */ React.createElement(a$l, null)) : null
|
|
2575
2575
|
);
|
|
2576
2576
|
};
|
|
2577
|
-
Image$1.defaultProps = defaultProps$
|
|
2577
|
+
Image$1.defaultProps = defaultProps$1p;
|
|
2578
2578
|
Image$1.displayName = "NutImage";
|
|
2579
2579
|
const defaultOverlayProps$1 = {
|
|
2580
2580
|
...ComponentDefaults,
|
|
@@ -2669,7 +2669,7 @@ const Overlay$1 = (props) => {
|
|
|
2669
2669
|
Overlay$1.defaultProps = defaultOverlayProps$1;
|
|
2670
2670
|
Overlay$1.displayName = "NutOverlay";
|
|
2671
2671
|
const DataContext$1 = createContext({});
|
|
2672
|
-
const defaultProps$
|
|
2672
|
+
const defaultProps$1o = {
|
|
2673
2673
|
...ComponentDefaults,
|
|
2674
2674
|
span: "24",
|
|
2675
2675
|
offset: "0",
|
|
@@ -2677,7 +2677,7 @@ const defaultProps$1p = {
|
|
|
2677
2677
|
};
|
|
2678
2678
|
const Col = (props) => {
|
|
2679
2679
|
const { className, style, span, offset, children, onClick } = {
|
|
2680
|
-
...defaultProps$
|
|
2680
|
+
...defaultProps$1o,
|
|
2681
2681
|
...props
|
|
2682
2682
|
};
|
|
2683
2683
|
const [colName, setColName] = useState("");
|
|
@@ -2709,32 +2709,32 @@ const Col = (props) => {
|
|
|
2709
2709
|
children
|
|
2710
2710
|
);
|
|
2711
2711
|
};
|
|
2712
|
-
Col.defaultProps = defaultProps$
|
|
2712
|
+
Col.defaultProps = defaultProps$1o;
|
|
2713
2713
|
Col.displayName = "NutCol";
|
|
2714
|
-
const defaultProps$
|
|
2714
|
+
const defaultProps$1n = {
|
|
2715
2715
|
...ComponentDefaults,
|
|
2716
2716
|
contentPosition: "center",
|
|
2717
2717
|
direction: "horizontal"
|
|
2718
2718
|
};
|
|
2719
|
-
const classPrefix$
|
|
2719
|
+
const classPrefix$l = `nut-divider`;
|
|
2720
2720
|
const Divider = (props) => {
|
|
2721
2721
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
2722
|
-
...defaultProps$
|
|
2722
|
+
...defaultProps$1n,
|
|
2723
2723
|
...props
|
|
2724
2724
|
};
|
|
2725
2725
|
const classes = direction === "horizontal" ? classNames({
|
|
2726
|
-
[`${classPrefix$
|
|
2727
|
-
[`${classPrefix$
|
|
2728
|
-
[`${classPrefix$
|
|
2729
|
-
[`${classPrefix$
|
|
2730
|
-
[`${classPrefix$
|
|
2726
|
+
[`${classPrefix$l}`]: true,
|
|
2727
|
+
[`${classPrefix$l}__center`]: children,
|
|
2728
|
+
[`${classPrefix$l}__left`]: contentPosition === "left",
|
|
2729
|
+
[`${classPrefix$l}__right`]: contentPosition === "right",
|
|
2730
|
+
[`${classPrefix$l}__hairline`]: true
|
|
2731
2731
|
}) : classNames({
|
|
2732
|
-
[`${classPrefix$
|
|
2733
|
-
[`${classPrefix$
|
|
2732
|
+
[`${classPrefix$l}`]: true,
|
|
2733
|
+
[`${classPrefix$l}__vertical`]: direction === "vertical"
|
|
2734
2734
|
});
|
|
2735
2735
|
return /* @__PURE__ */ React.createElement("div", { className: `${classes} ${className || ""}`, style, ...rest }, children);
|
|
2736
2736
|
};
|
|
2737
|
-
Divider.defaultProps = defaultProps$
|
|
2737
|
+
Divider.defaultProps = defaultProps$1n;
|
|
2738
2738
|
Divider.displayName = "NutDivider";
|
|
2739
2739
|
const gridContext = {
|
|
2740
2740
|
onClick: (item, index) => {
|
|
@@ -2744,7 +2744,7 @@ const GridContext = React.createContext(gridContext);
|
|
|
2744
2744
|
const pxCheck = (value) => {
|
|
2745
2745
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
2746
2746
|
};
|
|
2747
|
-
const defaultProps$
|
|
2747
|
+
const defaultProps$1m = {
|
|
2748
2748
|
text: "",
|
|
2749
2749
|
columns: 4,
|
|
2750
2750
|
gap: 0,
|
|
@@ -2770,7 +2770,7 @@ const GridItem = (props) => {
|
|
|
2770
2770
|
onClick,
|
|
2771
2771
|
...rest
|
|
2772
2772
|
} = {
|
|
2773
|
-
...defaultProps$
|
|
2773
|
+
...defaultProps$1m,
|
|
2774
2774
|
...props
|
|
2775
2775
|
};
|
|
2776
2776
|
const classPrefix2 = "nut-grid-item";
|
|
@@ -2828,9 +2828,9 @@ const GridItem = (props) => {
|
|
|
2828
2828
|
/* @__PURE__ */ React.createElement("div", { className: contentClass() }, children && /* @__PURE__ */ React.createElement(React.Fragment, null, children), text && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__text` }, text))
|
|
2829
2829
|
);
|
|
2830
2830
|
};
|
|
2831
|
-
GridItem.defaultProps = defaultProps$
|
|
2831
|
+
GridItem.defaultProps = defaultProps$1m;
|
|
2832
2832
|
GridItem.displayName = "NutGridItem";
|
|
2833
|
-
const defaultProps$
|
|
2833
|
+
const defaultProps$1l = {
|
|
2834
2834
|
columns: 4,
|
|
2835
2835
|
gap: 0,
|
|
2836
2836
|
center: true,
|
|
@@ -2851,7 +2851,7 @@ const Grid = (props) => {
|
|
|
2851
2851
|
className,
|
|
2852
2852
|
onClick,
|
|
2853
2853
|
...rest
|
|
2854
|
-
} = { ...defaultProps$
|
|
2854
|
+
} = { ...defaultProps$1l, ...props };
|
|
2855
2855
|
const childrenDom = React.Children.toArray(children);
|
|
2856
2856
|
const classPrefix2 = "nut-grid";
|
|
2857
2857
|
const rootClass = () => {
|
|
@@ -2881,18 +2881,18 @@ const Grid = (props) => {
|
|
|
2881
2881
|
});
|
|
2882
2882
|
})));
|
|
2883
2883
|
};
|
|
2884
|
-
Grid.defaultProps = defaultProps$
|
|
2884
|
+
Grid.defaultProps = defaultProps$1l;
|
|
2885
2885
|
Grid.displayName = "NutGrid";
|
|
2886
2886
|
Grid.Item = GridItem;
|
|
2887
|
-
const defaultProps$
|
|
2887
|
+
const defaultProps$1k = {};
|
|
2888
2888
|
const Layout = (props) => {
|
|
2889
|
-
({ ...defaultProps$
|
|
2889
|
+
({ ...defaultProps$1k, ...props });
|
|
2890
2890
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-layout" }, "Layout");
|
|
2891
2891
|
};
|
|
2892
|
-
Layout.defaultProps = defaultProps$
|
|
2892
|
+
Layout.defaultProps = defaultProps$1k;
|
|
2893
2893
|
Layout.displayName = "NutLayout";
|
|
2894
|
-
const classPrefix$
|
|
2895
|
-
const defaultProps$
|
|
2894
|
+
const classPrefix$k = "nut-row";
|
|
2895
|
+
const defaultProps$1j = {
|
|
2896
2896
|
...ComponentDefaults,
|
|
2897
2897
|
type: "",
|
|
2898
2898
|
justify: "start",
|
|
@@ -2912,7 +2912,7 @@ const Row = (props) => {
|
|
|
2912
2912
|
gutter,
|
|
2913
2913
|
onClick
|
|
2914
2914
|
} = {
|
|
2915
|
-
...defaultProps$
|
|
2915
|
+
...defaultProps$1j,
|
|
2916
2916
|
...props
|
|
2917
2917
|
};
|
|
2918
2918
|
const getClass = (prefix, type2) => {
|
|
@@ -2926,7 +2926,7 @@ const Row = (props) => {
|
|
|
2926
2926
|
${getClass("justify", justify)}
|
|
2927
2927
|
${getClass("align", align)}
|
|
2928
2928
|
${getClass("flex", wrap)}
|
|
2929
|
-
${classPrefix$
|
|
2929
|
+
${classPrefix$k}
|
|
2930
2930
|
`;
|
|
2931
2931
|
};
|
|
2932
2932
|
const parentRow = {
|
|
@@ -2944,7 +2944,7 @@ const Row = (props) => {
|
|
|
2944
2944
|
children
|
|
2945
2945
|
));
|
|
2946
2946
|
};
|
|
2947
|
-
Row.defaultProps = defaultProps$
|
|
2947
|
+
Row.defaultProps = defaultProps$1j;
|
|
2948
2948
|
Row.displayName = "NutRow";
|
|
2949
2949
|
function useWatch(dep, callback, config2 = { immediate: false }) {
|
|
2950
2950
|
const { immediate } = config2;
|
|
@@ -3026,12 +3026,12 @@ function getScrollParent(el, root2 = defaultRoot) {
|
|
|
3026
3026
|
}
|
|
3027
3027
|
return root2;
|
|
3028
3028
|
}
|
|
3029
|
-
const defaultProps$
|
|
3029
|
+
const defaultProps$1i = {
|
|
3030
3030
|
...ComponentDefaults,
|
|
3031
3031
|
position: "top",
|
|
3032
3032
|
zIndex: 2e3
|
|
3033
3033
|
};
|
|
3034
|
-
const classPrefix$
|
|
3034
|
+
const classPrefix$j = "nut-sticky";
|
|
3035
3035
|
const Sticky = (props) => {
|
|
3036
3036
|
const {
|
|
3037
3037
|
position,
|
|
@@ -3043,7 +3043,7 @@ const Sticky = (props) => {
|
|
|
3043
3043
|
className,
|
|
3044
3044
|
onChange,
|
|
3045
3045
|
...rest
|
|
3046
|
-
} = { ...defaultProps$
|
|
3046
|
+
} = { ...defaultProps$1i, ...props };
|
|
3047
3047
|
const stickyRef = useRef(null);
|
|
3048
3048
|
const rootRef = useRef(null);
|
|
3049
3049
|
const [rootRect, setRootRect] = useState({});
|
|
@@ -3133,7 +3133,7 @@ const Sticky = (props) => {
|
|
|
3133
3133
|
{
|
|
3134
3134
|
ref: rootRef,
|
|
3135
3135
|
style: rootStyle,
|
|
3136
|
-
className: classNames(classPrefix$
|
|
3136
|
+
className: classNames(classPrefix$j, className),
|
|
3137
3137
|
...rest
|
|
3138
3138
|
},
|
|
3139
3139
|
/* @__PURE__ */ React.createElement(
|
|
@@ -3149,9 +3149,9 @@ const Sticky = (props) => {
|
|
|
3149
3149
|
)
|
|
3150
3150
|
);
|
|
3151
3151
|
};
|
|
3152
|
-
Sticky.defaultProps = defaultProps$
|
|
3152
|
+
Sticky.defaultProps = defaultProps$1i;
|
|
3153
3153
|
Sticky.displayName = "NutSticky";
|
|
3154
|
-
const defaultProps$
|
|
3154
|
+
const defaultProps$1h = {
|
|
3155
3155
|
...ComponentDefaults,
|
|
3156
3156
|
threshold: 200,
|
|
3157
3157
|
zIndex: 10,
|
|
@@ -3159,7 +3159,7 @@ const defaultProps$1i = {
|
|
|
3159
3159
|
};
|
|
3160
3160
|
const BackTop = (props) => {
|
|
3161
3161
|
const { children, threshold, zIndex, className, duration, style, onClick } = {
|
|
3162
|
-
...defaultProps$
|
|
3162
|
+
...defaultProps$1h,
|
|
3163
3163
|
...props
|
|
3164
3164
|
};
|
|
3165
3165
|
const classPrefix2 = "nut-backtop";
|
|
@@ -3197,10 +3197,10 @@ const BackTop = (props) => {
|
|
|
3197
3197
|
children || /* @__PURE__ */ React.createElement(a$2, { width: 19, height: 19, className: "nut-backtop-main" })
|
|
3198
3198
|
);
|
|
3199
3199
|
};
|
|
3200
|
-
BackTop.defaultProps = defaultProps$
|
|
3200
|
+
BackTop.defaultProps = defaultProps$1h;
|
|
3201
3201
|
BackTop.displayName = "NutBackTop";
|
|
3202
3202
|
const elevatorContext = createContext({});
|
|
3203
|
-
const defaultProps$
|
|
3203
|
+
const defaultProps$1g = {
|
|
3204
3204
|
...ComponentDefaults,
|
|
3205
3205
|
height: "200px",
|
|
3206
3206
|
floorKey: "title",
|
|
@@ -3227,7 +3227,7 @@ const Elevator = (props) => {
|
|
|
3227
3227
|
children,
|
|
3228
3228
|
...rest
|
|
3229
3229
|
} = {
|
|
3230
|
-
...defaultProps$
|
|
3230
|
+
...defaultProps$1g,
|
|
3231
3231
|
...props
|
|
3232
3232
|
};
|
|
3233
3233
|
const classPrefix2 = "nut-elevator";
|
|
@@ -3439,10 +3439,10 @@ const Elevator = (props) => {
|
|
|
3439
3439
|
})
|
|
3440
3440
|
))) : null, sticky && scrollY > 0 ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__list__fixed` }, /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}__list__fixed__title` }, list[currentIndex][floorKey])) : null);
|
|
3441
3441
|
};
|
|
3442
|
-
Elevator.defaultProps = defaultProps$
|
|
3442
|
+
Elevator.defaultProps = defaultProps$1g;
|
|
3443
3443
|
Elevator.displayName = "NutElevator";
|
|
3444
3444
|
Elevator.Context = elevatorContext;
|
|
3445
|
-
const defaultProps$
|
|
3445
|
+
const defaultProps$1f = {
|
|
3446
3446
|
...ComponentDefaults,
|
|
3447
3447
|
activeText: "",
|
|
3448
3448
|
inactiveText: "",
|
|
@@ -3470,7 +3470,7 @@ const FixedNav = (props) => {
|
|
|
3470
3470
|
content,
|
|
3471
3471
|
...rest
|
|
3472
3472
|
} = {
|
|
3473
|
-
...defaultProps$
|
|
3473
|
+
...defaultProps$1f,
|
|
3474
3474
|
...props
|
|
3475
3475
|
};
|
|
3476
3476
|
const classPrefix2 = "nut-fixednav";
|
|
@@ -3522,9 +3522,9 @@ const FixedNav = (props) => {
|
|
|
3522
3522
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__btn`, onClick: () => onUpdateValue() }, content || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(a$i, { color: "#fff" }), /* @__PURE__ */ React.createElement("div", { className: "text" }, visible ? activeText || locale.fixednav.activeText : inactiveText || locale.fixednav.inactiveText)))
|
|
3523
3523
|
);
|
|
3524
3524
|
};
|
|
3525
|
-
FixedNav.defaultProps = defaultProps$
|
|
3525
|
+
FixedNav.defaultProps = defaultProps$1f;
|
|
3526
3526
|
FixedNav.displayName = "NutFixedNav";
|
|
3527
|
-
const defaultProps$
|
|
3527
|
+
const defaultProps$1e = {
|
|
3528
3528
|
...ComponentDefaults,
|
|
3529
3529
|
left: "",
|
|
3530
3530
|
right: "",
|
|
@@ -3547,7 +3547,7 @@ const NavBar = (props) => {
|
|
|
3547
3547
|
zIndex,
|
|
3548
3548
|
onClickBack
|
|
3549
3549
|
} = {
|
|
3550
|
-
...defaultProps$
|
|
3550
|
+
...defaultProps$1e,
|
|
3551
3551
|
...props
|
|
3552
3552
|
};
|
|
3553
3553
|
const classPrefix2 = "nut-navbar";
|
|
@@ -3584,7 +3584,7 @@ const NavBar = (props) => {
|
|
|
3584
3584
|
const cls = classNames(classPrefix2, classes, className);
|
|
3585
3585
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}--placeholder` }, renderWrapper()) : renderWrapper());
|
|
3586
3586
|
};
|
|
3587
|
-
NavBar.defaultProps = defaultProps$
|
|
3587
|
+
NavBar.defaultProps = defaultProps$1e;
|
|
3588
3588
|
NavBar.displayName = "NutNavBar";
|
|
3589
3589
|
function _extends() {
|
|
3590
3590
|
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
@@ -5327,7 +5327,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, T
|
|
|
5327
5327
|
onExited: propTypesExports.func
|
|
5328
5328
|
}) : {};
|
|
5329
5329
|
const CSSTransition$1 = CSSTransition;
|
|
5330
|
-
const defaultProps$
|
|
5330
|
+
const defaultProps$1d = {
|
|
5331
5331
|
...ComponentDefaults,
|
|
5332
5332
|
position: "center",
|
|
5333
5333
|
transition: "",
|
|
@@ -5509,10 +5509,10 @@ const Popup = (props) => {
|
|
|
5509
5509
|
}, [position, transition]);
|
|
5510
5510
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, renderToContainer(portal, renderNode()));
|
|
5511
5511
|
};
|
|
5512
|
-
Popup.defaultProps = defaultProps$
|
|
5512
|
+
Popup.defaultProps = defaultProps$1d;
|
|
5513
5513
|
Popup.displayName = "NutPopup";
|
|
5514
5514
|
const OffsetContext = createContext(20);
|
|
5515
|
-
const defaultProps$
|
|
5515
|
+
const defaultProps$1c = {
|
|
5516
5516
|
...ComponentDefaults,
|
|
5517
5517
|
position: "left",
|
|
5518
5518
|
width: "80%"
|
|
@@ -5529,7 +5529,7 @@ const SideNavBar = (props) => {
|
|
|
5529
5529
|
onClose,
|
|
5530
5530
|
...rest
|
|
5531
5531
|
} = {
|
|
5532
|
-
...defaultProps$
|
|
5532
|
+
...defaultProps$1c,
|
|
5533
5533
|
...props
|
|
5534
5534
|
};
|
|
5535
5535
|
const indent = props.indent ? Number(props.indent) : 20;
|
|
@@ -5569,7 +5569,7 @@ const SideNavBar = (props) => {
|
|
|
5569
5569
|
)))
|
|
5570
5570
|
);
|
|
5571
5571
|
};
|
|
5572
|
-
SideNavBar.defaultProps = defaultProps$
|
|
5572
|
+
SideNavBar.defaultProps = defaultProps$1c;
|
|
5573
5573
|
SideNavBar.displayName = "NutSideNavBar";
|
|
5574
5574
|
const SideNavBarItem = (props) => {
|
|
5575
5575
|
const classPrefix2 = "nut-subsidenavbar";
|
|
@@ -5588,13 +5588,13 @@ const SideNavBarItem = (props) => {
|
|
|
5588
5588
|
title
|
|
5589
5589
|
);
|
|
5590
5590
|
};
|
|
5591
|
-
const defaultProps$
|
|
5591
|
+
const defaultProps$1b = {
|
|
5592
5592
|
open: true
|
|
5593
5593
|
};
|
|
5594
5594
|
const SubSideNavBar = (props) => {
|
|
5595
5595
|
const classPrefix2 = "nut-subsidenavbar";
|
|
5596
5596
|
const { title, value, children, onClick, open, ...rest } = {
|
|
5597
|
-
...defaultProps$
|
|
5597
|
+
...defaultProps$1b,
|
|
5598
5598
|
...props
|
|
5599
5599
|
};
|
|
5600
5600
|
const [subShow, setSubShow] = useState(open);
|
|
@@ -5661,7 +5661,7 @@ function usePropsValue({
|
|
|
5661
5661
|
}
|
|
5662
5662
|
return [uncontrolled, handleUncontrolledChange];
|
|
5663
5663
|
}
|
|
5664
|
-
const defaultProps$
|
|
5664
|
+
const defaultProps$1a = {
|
|
5665
5665
|
...ComponentDefaults,
|
|
5666
5666
|
value: "",
|
|
5667
5667
|
dot: false,
|
|
@@ -5672,7 +5672,7 @@ const defaultProps$1b = {
|
|
|
5672
5672
|
};
|
|
5673
5673
|
const Badge = (props) => {
|
|
5674
5674
|
const { className, style, value, max, children, dot, top, right, color } = {
|
|
5675
|
-
...defaultProps$
|
|
5675
|
+
...defaultProps$1a,
|
|
5676
5676
|
...props
|
|
5677
5677
|
};
|
|
5678
5678
|
const classPrefix2 = "nut-badge";
|
|
@@ -5699,9 +5699,9 @@ const Badge = (props) => {
|
|
|
5699
5699
|
};
|
|
5700
5700
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style }, typeof value === "object" && value && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__icon` }, value), /* @__PURE__ */ React.createElement("div", null, children), /* @__PURE__ */ React.createElement("div", { className: contentClasses, style: getStyle() }, content()));
|
|
5701
5701
|
};
|
|
5702
|
-
Badge.defaultProps = defaultProps$
|
|
5702
|
+
Badge.defaultProps = defaultProps$1a;
|
|
5703
5703
|
Badge.displayName = "NutBadge";
|
|
5704
|
-
const defaultProps$
|
|
5704
|
+
const defaultProps$19 = {
|
|
5705
5705
|
...ComponentDefaults,
|
|
5706
5706
|
title: "",
|
|
5707
5707
|
icon: null,
|
|
@@ -5723,7 +5723,7 @@ const TabbarItem = (props) => {
|
|
|
5723
5723
|
handleClick,
|
|
5724
5724
|
...rest
|
|
5725
5725
|
} = {
|
|
5726
|
-
...defaultProps$
|
|
5726
|
+
...defaultProps$19,
|
|
5727
5727
|
...props
|
|
5728
5728
|
};
|
|
5729
5729
|
const classPrefix2 = "nut-tabbar-item";
|
|
@@ -5747,7 +5747,7 @@ const TabbarItem = (props) => {
|
|
|
5747
5747
|
icon ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Badge, { ...rest }, /* @__PURE__ */ React.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React.createElement(Badge, { ...rest }, /* @__PURE__ */ React.createElement("div", { className: titleClass }, title))
|
|
5748
5748
|
);
|
|
5749
5749
|
};
|
|
5750
|
-
const defaultProps$
|
|
5750
|
+
const defaultProps$18 = {
|
|
5751
5751
|
...ComponentDefaults,
|
|
5752
5752
|
defaultValue: 0,
|
|
5753
5753
|
fixed: false,
|
|
@@ -5770,7 +5770,7 @@ const Tabbar = (props) => {
|
|
|
5770
5770
|
style,
|
|
5771
5771
|
onSwitch
|
|
5772
5772
|
} = {
|
|
5773
|
-
...defaultProps$
|
|
5773
|
+
...defaultProps$18,
|
|
5774
5774
|
...props
|
|
5775
5775
|
};
|
|
5776
5776
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -5805,17 +5805,17 @@ const Tabbar = (props) => {
|
|
|
5805
5805
|
(fixed || safeArea) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__safe-area` })
|
|
5806
5806
|
);
|
|
5807
5807
|
};
|
|
5808
|
-
Tabbar.defaultProps = defaultProps$
|
|
5808
|
+
Tabbar.defaultProps = defaultProps$18;
|
|
5809
5809
|
Tabbar.displayName = "NutTabbar";
|
|
5810
5810
|
Tabbar.Item = TabbarItem;
|
|
5811
|
-
const defaultProps$
|
|
5811
|
+
const defaultProps$17 = {
|
|
5812
5812
|
title: "",
|
|
5813
5813
|
value: "",
|
|
5814
5814
|
disabled: false
|
|
5815
5815
|
};
|
|
5816
5816
|
const TabPane = (props) => {
|
|
5817
5817
|
const { children, autoHeightClassName, className, disabled } = {
|
|
5818
|
-
...defaultProps$
|
|
5818
|
+
...defaultProps$17,
|
|
5819
5819
|
...props
|
|
5820
5820
|
};
|
|
5821
5821
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -5833,7 +5833,7 @@ function useForceUpdate() {
|
|
|
5833
5833
|
const [, updateState] = React.useState();
|
|
5834
5834
|
return React.useCallback(() => updateState({}), []);
|
|
5835
5835
|
}
|
|
5836
|
-
const defaultProps$
|
|
5836
|
+
const defaultProps$16 = {
|
|
5837
5837
|
...ComponentDefaults,
|
|
5838
5838
|
tabStyle: {},
|
|
5839
5839
|
activeColor: "",
|
|
@@ -5842,7 +5842,7 @@ const defaultProps$17 = {
|
|
|
5842
5842
|
duration: 300,
|
|
5843
5843
|
autoHeight: false
|
|
5844
5844
|
};
|
|
5845
|
-
const classPrefix$
|
|
5845
|
+
const classPrefix$i = "nut-tabs";
|
|
5846
5846
|
const Tabs = (props) => {
|
|
5847
5847
|
const {
|
|
5848
5848
|
activeColor,
|
|
@@ -5859,7 +5859,7 @@ const Tabs = (props) => {
|
|
|
5859
5859
|
autoHeight,
|
|
5860
5860
|
...rest
|
|
5861
5861
|
} = {
|
|
5862
|
-
...defaultProps$
|
|
5862
|
+
...defaultProps$16,
|
|
5863
5863
|
...props
|
|
5864
5864
|
};
|
|
5865
5865
|
const [value, setValue] = usePropsValue({
|
|
@@ -5904,14 +5904,14 @@ const Tabs = (props) => {
|
|
|
5904
5904
|
}
|
|
5905
5905
|
}, [children]);
|
|
5906
5906
|
const classes = classNames(
|
|
5907
|
-
classPrefix$
|
|
5908
|
-
`${classPrefix$
|
|
5907
|
+
classPrefix$i,
|
|
5908
|
+
`${classPrefix$i}--${direction}`,
|
|
5909
5909
|
className
|
|
5910
5910
|
);
|
|
5911
|
-
const classesTitle = classNames(`${classPrefix$
|
|
5912
|
-
[`${classPrefix$
|
|
5913
|
-
[`${classPrefix$
|
|
5914
|
-
[`${classPrefix$
|
|
5911
|
+
const classesTitle = classNames(`${classPrefix$i}__titles`, {
|
|
5912
|
+
[`${classPrefix$i}__titles--${activeType}`]: activeType,
|
|
5913
|
+
[`${classPrefix$i}__titles--scrollable`]: true,
|
|
5914
|
+
[`${classPrefix$i}__titles--${align}`]: align
|
|
5915
5915
|
});
|
|
5916
5916
|
const tabsActiveStyle = {
|
|
5917
5917
|
color: activeType === "smile" ? activeColor : "",
|
|
@@ -5957,7 +5957,7 @@ const Tabs = (props) => {
|
|
|
5957
5957
|
onClick: (e) => {
|
|
5958
5958
|
tabChange(item);
|
|
5959
5959
|
},
|
|
5960
|
-
className: classNames(`${classPrefix$
|
|
5960
|
+
className: classNames(`${classPrefix$i}__titles-item`, {
|
|
5961
5961
|
[`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
|
|
5962
5962
|
[`nut-tabs__titles-item--disabled`]: item.disabled,
|
|
5963
5963
|
[`nut-tabs__titles-item--${align}`]: align
|
|
@@ -5967,14 +5967,14 @@ const Tabs = (props) => {
|
|
|
5967
5967
|
activeType === "line" && /* @__PURE__ */ React.createElement(
|
|
5968
5968
|
View,
|
|
5969
5969
|
{
|
|
5970
|
-
className: `${classPrefix$
|
|
5970
|
+
className: `${classPrefix$i}__titles-item__line`,
|
|
5971
5971
|
style: tabsActiveStyle
|
|
5972
5972
|
}
|
|
5973
5973
|
),
|
|
5974
5974
|
activeType === "smile" && /* @__PURE__ */ React.createElement(
|
|
5975
5975
|
View,
|
|
5976
5976
|
{
|
|
5977
|
-
className: `${classPrefix$
|
|
5977
|
+
className: `${classPrefix$i}__titles-item__smile`,
|
|
5978
5978
|
style: tabsActiveStyle
|
|
5979
5979
|
},
|
|
5980
5980
|
/* @__PURE__ */ React.createElement(a$j, { color: activeColor, width: 40, height: 20 })
|
|
@@ -5986,14 +5986,14 @@ const Tabs = (props) => {
|
|
|
5986
5986
|
{
|
|
5987
5987
|
ellipsis: true
|
|
5988
5988
|
},
|
|
5989
|
-
`${classPrefix$
|
|
5989
|
+
`${classPrefix$i}__titles-item__text`
|
|
5990
5990
|
)
|
|
5991
5991
|
},
|
|
5992
5992
|
item.title
|
|
5993
5993
|
)
|
|
5994
5994
|
);
|
|
5995
5995
|
})
|
|
5996
|
-
), /* @__PURE__ */ React.createElement(View, { className: `${classPrefix$
|
|
5996
|
+
), /* @__PURE__ */ React.createElement(View, { className: `${classPrefix$i}__content__wrap` }, /* @__PURE__ */ React.createElement(View, { className: `${classPrefix$i}__content`, style: contentStyle }, React.Children.map(children, (child, idx) => {
|
|
5997
5997
|
if (!React.isValidElement(child)) {
|
|
5998
5998
|
return null;
|
|
5999
5999
|
}
|
|
@@ -6010,7 +6010,7 @@ const Tabs = (props) => {
|
|
|
6010
6010
|
return React.cloneElement(child, childProps);
|
|
6011
6011
|
}))));
|
|
6012
6012
|
};
|
|
6013
|
-
Tabs.defaultProps = defaultProps$
|
|
6013
|
+
Tabs.defaultProps = defaultProps$16;
|
|
6014
6014
|
Tabs.displayName = "NutTabs";
|
|
6015
6015
|
Tabs.TabPane = TabPane;
|
|
6016
6016
|
var classnameExports = {};
|
|
@@ -6145,7 +6145,7 @@ const ConfigContext = createContext(null);
|
|
|
6145
6145
|
const useConfig = () => {
|
|
6146
6146
|
return useContext(ConfigContext) ?? getDefaultConfig();
|
|
6147
6147
|
};
|
|
6148
|
-
const defaultProps$
|
|
6148
|
+
const defaultProps$15 = {
|
|
6149
6149
|
type: "custom",
|
|
6150
6150
|
existAddress: [],
|
|
6151
6151
|
defaultIcon: null,
|
|
@@ -6167,7 +6167,7 @@ const ExistRender = (props) => {
|
|
|
6167
6167
|
onClose,
|
|
6168
6168
|
onSwitchModule,
|
|
6169
6169
|
...rest
|
|
6170
|
-
} = { ...defaultProps$
|
|
6170
|
+
} = { ...defaultProps$15, ...props };
|
|
6171
6171
|
const b2 = cn("address");
|
|
6172
6172
|
const selectedExist = (item) => {
|
|
6173
6173
|
const copyExistAdd = existAddress;
|
|
@@ -6197,7 +6197,7 @@ const ExistRender = (props) => {
|
|
|
6197
6197
|
return /* @__PURE__ */ React.createElement("li", { className: b2("exist-item"), key: index }, /* @__PURE__ */ React.createElement("div", { onClick: () => selectedExist(item) }, item.selectedAddress ? selectedIcon : defaultIcon, /* @__PURE__ */ React.createElement("div", { className: b2("exist-item-info") }, item.name && item.phone && /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-top" }, /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-name" }, item.name), /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-phone" }, item.phone)), /* @__PURE__ */ React.createElement("div", { className: "exist-item-info-bottom" }, /* @__PURE__ */ React.createElement("div", null, item.provinceName + item.cityName + item.countyName + item.townName + item.addressDetail)))));
|
|
6198
6198
|
}))), isShowCustomAddress && /* @__PURE__ */ React.createElement("div", { className: b2("choose-other"), onClick: onSwitch }, /* @__PURE__ */ React.createElement("div", { className: b2("choose-other-btn") }, customAndExistTitle || locale.address.chooseAnotherAddress)));
|
|
6199
6199
|
};
|
|
6200
|
-
const defaultProps$
|
|
6200
|
+
const defaultProps$14 = {
|
|
6201
6201
|
modelValue: [],
|
|
6202
6202
|
type: "custom",
|
|
6203
6203
|
province: [],
|
|
@@ -6222,7 +6222,7 @@ const CustomRender = (props) => {
|
|
|
6222
6222
|
onClose,
|
|
6223
6223
|
...rest
|
|
6224
6224
|
} = {
|
|
6225
|
-
...defaultProps$
|
|
6225
|
+
...defaultProps$14,
|
|
6226
6226
|
...props
|
|
6227
6227
|
};
|
|
6228
6228
|
const b2 = cn("address");
|
|
@@ -6386,28 +6386,28 @@ const CustomRender = (props) => {
|
|
|
6386
6386
|
nextAreaList(item);
|
|
6387
6387
|
};
|
|
6388
6388
|
useEffect(() => {
|
|
6389
|
-
const { province: province2 } = { ...defaultProps$
|
|
6389
|
+
const { province: province2 } = { ...defaultProps$14, ...props };
|
|
6390
6390
|
setRegionList({
|
|
6391
6391
|
...regionList,
|
|
6392
6392
|
province: isCustom2() ? transformData(province2) : province2
|
|
6393
6393
|
});
|
|
6394
6394
|
}, [province]);
|
|
6395
6395
|
useEffect(() => {
|
|
6396
|
-
const { city: city2 } = { ...defaultProps$
|
|
6396
|
+
const { city: city2 } = { ...defaultProps$14, ...props };
|
|
6397
6397
|
setRegionList({
|
|
6398
6398
|
...regionList,
|
|
6399
6399
|
city: isCustom2() ? transformData(city2) : city2
|
|
6400
6400
|
});
|
|
6401
6401
|
}, [city]);
|
|
6402
6402
|
useEffect(() => {
|
|
6403
|
-
const { country: country2 } = { ...defaultProps$
|
|
6403
|
+
const { country: country2 } = { ...defaultProps$14, ...props };
|
|
6404
6404
|
setRegionList({
|
|
6405
6405
|
...regionList,
|
|
6406
6406
|
country: isCustom2() ? transformData(country2) : country2
|
|
6407
6407
|
});
|
|
6408
6408
|
}, [country]);
|
|
6409
6409
|
useEffect(() => {
|
|
6410
|
-
const { town: town2 } = { ...defaultProps$
|
|
6410
|
+
const { town: town2 } = { ...defaultProps$14, ...props };
|
|
6411
6411
|
setRegionList({
|
|
6412
6412
|
...regionList,
|
|
6413
6413
|
town: isCustom2() ? transformData(town2) : town2
|
|
@@ -6471,7 +6471,7 @@ const CustomRender = (props) => {
|
|
|
6471
6471
|
}
|
|
6472
6472
|
)));
|
|
6473
6473
|
};
|
|
6474
|
-
const defaultProps$
|
|
6474
|
+
const defaultProps$13 = {
|
|
6475
6475
|
...ComponentDefaults,
|
|
6476
6476
|
modelValue: false,
|
|
6477
6477
|
modelSelect: [],
|
|
@@ -6522,7 +6522,7 @@ const Address = (props) => {
|
|
|
6522
6522
|
className,
|
|
6523
6523
|
...rest
|
|
6524
6524
|
} = {
|
|
6525
|
-
...defaultProps$
|
|
6525
|
+
...defaultProps$13,
|
|
6526
6526
|
...props
|
|
6527
6527
|
};
|
|
6528
6528
|
const b2 = cn("address");
|
|
@@ -6674,7 +6674,7 @@ const Address = (props) => {
|
|
|
6674
6674
|
)
|
|
6675
6675
|
));
|
|
6676
6676
|
};
|
|
6677
|
-
Address.defaultProps = defaultProps$
|
|
6677
|
+
Address.defaultProps = defaultProps$13;
|
|
6678
6678
|
Address.displayName = "NutAddress";
|
|
6679
6679
|
const Utils = {
|
|
6680
6680
|
/**
|
|
@@ -6807,7 +6807,7 @@ function requestAniFrame() {
|
|
|
6807
6807
|
}
|
|
6808
6808
|
}
|
|
6809
6809
|
const requestAniFrame$1 = requestAniFrame();
|
|
6810
|
-
const defaultProps$
|
|
6810
|
+
const defaultProps$12 = {
|
|
6811
6811
|
type: "one",
|
|
6812
6812
|
isAutoBackFill: false,
|
|
6813
6813
|
poppable: true,
|
|
@@ -6859,7 +6859,7 @@ const CalendarItem = React.forwardRef((props, ref) => {
|
|
|
6859
6859
|
onUpdate,
|
|
6860
6860
|
onSelected,
|
|
6861
6861
|
onYearMonthChange
|
|
6862
|
-
} = { ...defaultProps$
|
|
6862
|
+
} = { ...defaultProps$12, ...props };
|
|
6863
6863
|
const weeks = locale.calendaritem.weekdays;
|
|
6864
6864
|
const [yearMonthTitle, setYearMonthTitle] = useState("");
|
|
6865
6865
|
const [monthsData, setMonthsData] = useState([]);
|
|
@@ -7450,9 +7450,9 @@ const CalendarItem = React.forwardRef((props, ref) => {
|
|
|
7450
7450
|
))
|
|
7451
7451
|
), poppable && !isAutoBackFill ? /* @__PURE__ */ React.createElement("div", { className: "nut-calendar-footer" }, /* @__PURE__ */ React.createElement("div", { className: "calendar-confirm-btn", onClick: confirm }, confirmText || locale.confirm)) : ""));
|
|
7452
7452
|
});
|
|
7453
|
-
CalendarItem.defaultProps = defaultProps$
|
|
7453
|
+
CalendarItem.defaultProps = defaultProps$12;
|
|
7454
7454
|
CalendarItem.displayName = "NutCalendarItem";
|
|
7455
|
-
const defaultProps$
|
|
7455
|
+
const defaultProps$11 = {
|
|
7456
7456
|
type: "one",
|
|
7457
7457
|
isAutoBackFill: false,
|
|
7458
7458
|
poppable: true,
|
|
@@ -7508,7 +7508,7 @@ const Calendar = React.forwardRef((props, ref) => {
|
|
|
7508
7508
|
onChoose,
|
|
7509
7509
|
onSelected,
|
|
7510
7510
|
onYearMonthChange
|
|
7511
|
-
} = { ...defaultProps$
|
|
7511
|
+
} = { ...defaultProps$11, ...props };
|
|
7512
7512
|
const calendarRef = useRef(null);
|
|
7513
7513
|
const close = () => {
|
|
7514
7514
|
onClose && onClose();
|
|
@@ -7578,9 +7578,9 @@ const Calendar = React.forwardRef((props, ref) => {
|
|
|
7578
7578
|
renderItem()
|
|
7579
7579
|
) : renderItem());
|
|
7580
7580
|
});
|
|
7581
|
-
Calendar.defaultProps = defaultProps$
|
|
7581
|
+
Calendar.defaultProps = defaultProps$11;
|
|
7582
7582
|
Calendar.displayName = "NutCalendar";
|
|
7583
|
-
const defaultProps$
|
|
7583
|
+
const defaultProps$10 = {
|
|
7584
7584
|
data: {
|
|
7585
7585
|
text: "",
|
|
7586
7586
|
value: "",
|
|
@@ -7597,7 +7597,7 @@ const defaultProps$11 = {
|
|
|
7597
7597
|
};
|
|
7598
7598
|
const InternalCascaderItem = (props, ref) => {
|
|
7599
7599
|
const { data, checked, activeIcon, chooseItem, activeColor } = {
|
|
7600
|
-
...defaultProps$
|
|
7600
|
+
...defaultProps$10,
|
|
7601
7601
|
...props
|
|
7602
7602
|
};
|
|
7603
7603
|
const classPrefix2 = "nut-cascader-item";
|
|
@@ -7639,7 +7639,7 @@ const InternalCascaderItem = (props, ref) => {
|
|
|
7639
7639
|
);
|
|
7640
7640
|
};
|
|
7641
7641
|
const CascaderItem = React.forwardRef(InternalCascaderItem);
|
|
7642
|
-
CascaderItem.defaultProps = defaultProps$
|
|
7642
|
+
CascaderItem.defaultProps = defaultProps$10;
|
|
7643
7643
|
CascaderItem.displayName = "NutCascaderItem";
|
|
7644
7644
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
7645
7645
|
const {
|
|
@@ -7777,7 +7777,7 @@ class Tree {
|
|
|
7777
7777
|
}
|
|
7778
7778
|
}
|
|
7779
7779
|
const Tree$1 = Tree;
|
|
7780
|
-
const defaultProps
|
|
7780
|
+
const defaultProps$$ = {
|
|
7781
7781
|
...ComponentDefaults,
|
|
7782
7782
|
activeColor: "",
|
|
7783
7783
|
activeIcon: "checklist",
|
|
@@ -7820,7 +7820,7 @@ const InternalCascader = (props, ref) => {
|
|
|
7820
7820
|
onClose,
|
|
7821
7821
|
onChange,
|
|
7822
7822
|
onPathChange
|
|
7823
|
-
} = { ...defaultProps
|
|
7823
|
+
} = { ...defaultProps$$, ...props };
|
|
7824
7824
|
const [tabvalue, setTabvalue] = useState("c1");
|
|
7825
7825
|
const [optionsData, setOptionsData] = useState([]);
|
|
7826
7826
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -8082,11 +8082,11 @@ const InternalCascader = (props, ref) => {
|
|
|
8082
8082
|
) : renderItem());
|
|
8083
8083
|
};
|
|
8084
8084
|
const Cascader = React.forwardRef(InternalCascader);
|
|
8085
|
-
Cascader.defaultProps = defaultProps
|
|
8085
|
+
Cascader.defaultProps = defaultProps$$;
|
|
8086
8086
|
Cascader.displayName = "NutCascader";
|
|
8087
8087
|
const CheckboxGroupContext = createContext(null);
|
|
8088
8088
|
const Context = CheckboxGroupContext;
|
|
8089
|
-
const defaultProps
|
|
8089
|
+
const defaultProps$_ = {
|
|
8090
8090
|
max: void 0,
|
|
8091
8091
|
labelPosition: "right",
|
|
8092
8092
|
direction: "vertical",
|
|
@@ -8094,10 +8094,10 @@ const defaultProps$$ = {
|
|
|
8094
8094
|
},
|
|
8095
8095
|
options: []
|
|
8096
8096
|
};
|
|
8097
|
-
const classPrefix$
|
|
8097
|
+
const classPrefix$h = "nut-checkboxgroup";
|
|
8098
8098
|
const CheckboxGroup = React.forwardRef(
|
|
8099
8099
|
(props, ref) => {
|
|
8100
|
-
const { children } = { ...defaultProps
|
|
8100
|
+
const { children } = { ...defaultProps$_, ...props };
|
|
8101
8101
|
const {
|
|
8102
8102
|
className,
|
|
8103
8103
|
disabled,
|
|
@@ -8176,7 +8176,7 @@ const CheckboxGroup = React.forwardRef(
|
|
|
8176
8176
|
/* @__PURE__ */ React.createElement(
|
|
8177
8177
|
"div",
|
|
8178
8178
|
{
|
|
8179
|
-
className: classNames(classPrefix$
|
|
8179
|
+
className: classNames(classPrefix$h, className, {
|
|
8180
8180
|
[`nut-checkboxgroup--${props.direction}`]: props.direction
|
|
8181
8181
|
}),
|
|
8182
8182
|
...rest
|
|
@@ -8186,9 +8186,9 @@ const CheckboxGroup = React.forwardRef(
|
|
|
8186
8186
|
);
|
|
8187
8187
|
}
|
|
8188
8188
|
);
|
|
8189
|
-
CheckboxGroup.defaultProps = defaultProps
|
|
8189
|
+
CheckboxGroup.defaultProps = defaultProps$_;
|
|
8190
8190
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
8191
|
-
const defaultProps$
|
|
8191
|
+
const defaultProps$Z = {
|
|
8192
8192
|
...ComponentDefaults,
|
|
8193
8193
|
disabled: false,
|
|
8194
8194
|
labelPosition: "right",
|
|
@@ -8198,10 +8198,10 @@ const defaultProps$_ = {
|
|
|
8198
8198
|
onChange: (value) => {
|
|
8199
8199
|
}
|
|
8200
8200
|
};
|
|
8201
|
-
const classPrefix$
|
|
8201
|
+
const classPrefix$g = "nut-checkbox";
|
|
8202
8202
|
const Checkbox = (props) => {
|
|
8203
8203
|
const { children } = {
|
|
8204
|
-
...defaultProps$
|
|
8204
|
+
...defaultProps$Z,
|
|
8205
8205
|
...props
|
|
8206
8206
|
};
|
|
8207
8207
|
const {
|
|
@@ -8260,22 +8260,22 @@ const Checkbox = (props) => {
|
|
|
8260
8260
|
};
|
|
8261
8261
|
const color = () => {
|
|
8262
8262
|
if (innerDisabled) {
|
|
8263
|
-
return `${classPrefix$
|
|
8263
|
+
return `${classPrefix$g}__icon--disable`;
|
|
8264
8264
|
}
|
|
8265
8265
|
if (innerChecked) {
|
|
8266
8266
|
if (innerIndeterminate) {
|
|
8267
|
-
return `${classPrefix$
|
|
8267
|
+
return `${classPrefix$g}__icon--indeterminate`;
|
|
8268
8268
|
}
|
|
8269
|
-
return `${classPrefix$
|
|
8269
|
+
return `${classPrefix$g}__icon`;
|
|
8270
8270
|
}
|
|
8271
|
-
return `${classPrefix$
|
|
8271
|
+
return `${classPrefix$g}__icon--unchecked`;
|
|
8272
8272
|
};
|
|
8273
8273
|
const renderLabel = () => {
|
|
8274
8274
|
return /* @__PURE__ */ React.createElement(
|
|
8275
8275
|
"span",
|
|
8276
8276
|
{
|
|
8277
|
-
className: classNames(`${classPrefix$
|
|
8278
|
-
[`${classPrefix$
|
|
8277
|
+
className: classNames(`${classPrefix$g}__label `, {
|
|
8278
|
+
[`${classPrefix$g}__label--disabled`]: innerDisabled
|
|
8279
8279
|
})
|
|
8280
8280
|
},
|
|
8281
8281
|
children || label
|
|
@@ -8294,8 +8294,8 @@ const Checkbox = (props) => {
|
|
|
8294
8294
|
return /* @__PURE__ */ React.createElement(
|
|
8295
8295
|
"div",
|
|
8296
8296
|
{
|
|
8297
|
-
className: classNames(classPrefix$
|
|
8298
|
-
[`${classPrefix$
|
|
8297
|
+
className: classNames(classPrefix$g, className, {
|
|
8298
|
+
[`${classPrefix$g}--reverse`]: labelPosition === "left"
|
|
8299
8299
|
}),
|
|
8300
8300
|
...rest,
|
|
8301
8301
|
onClick: handleClick
|
|
@@ -8304,7 +8304,7 @@ const Checkbox = (props) => {
|
|
|
8304
8304
|
renderLabel()
|
|
8305
8305
|
);
|
|
8306
8306
|
};
|
|
8307
|
-
Checkbox.defaultProps = defaultProps$
|
|
8307
|
+
Checkbox.defaultProps = defaultProps$Z;
|
|
8308
8308
|
Checkbox.displayName = "NutCheckBox";
|
|
8309
8309
|
Checkbox.Group = CheckboxGroup;
|
|
8310
8310
|
const MIN_DISTANCE = 10;
|
|
@@ -8631,7 +8631,7 @@ function useRefs() {
|
|
|
8631
8631
|
}, []);
|
|
8632
8632
|
return [refs.current, setRefs, reset];
|
|
8633
8633
|
}
|
|
8634
|
-
const defaultProps$
|
|
8634
|
+
const defaultProps$Y = {
|
|
8635
8635
|
...ComponentDefaults,
|
|
8636
8636
|
visible: false,
|
|
8637
8637
|
title: "",
|
|
@@ -8658,7 +8658,7 @@ const InternalPicker = (props, ref) => {
|
|
|
8658
8658
|
afterClose,
|
|
8659
8659
|
onChange,
|
|
8660
8660
|
...rest
|
|
8661
|
-
} = { ...defaultProps$
|
|
8661
|
+
} = { ...defaultProps$Y, ...props };
|
|
8662
8662
|
const classPrefix2 = "nut-picker";
|
|
8663
8663
|
const classes = classNames(classPrefix2, className);
|
|
8664
8664
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -8880,7 +8880,7 @@ const InternalPicker = (props, ref) => {
|
|
|
8880
8880
|
{
|
|
8881
8881
|
visible,
|
|
8882
8882
|
position: "bottom",
|
|
8883
|
-
|
|
8883
|
+
afterClose: () => {
|
|
8884
8884
|
closePicker();
|
|
8885
8885
|
}
|
|
8886
8886
|
},
|
|
@@ -8928,30 +8928,30 @@ const InternalPicker = (props, ref) => {
|
|
|
8928
8928
|
const Picker = React.forwardRef(InternalPicker);
|
|
8929
8929
|
const Picker$1 = Picker;
|
|
8930
8930
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
8931
|
-
const defaultProps$
|
|
8932
|
-
|
|
8931
|
+
const defaultProps$X = {
|
|
8932
|
+
...ComponentDefaults,
|
|
8933
8933
|
visible: false,
|
|
8934
8934
|
title: "",
|
|
8935
8935
|
type: "date",
|
|
8936
|
-
|
|
8936
|
+
showChinese: false,
|
|
8937
8937
|
threeDimensional: true,
|
|
8938
8938
|
minuteStep: 1,
|
|
8939
|
-
|
|
8940
|
-
|
|
8939
|
+
startDate: new Date(currentYear - 10, 0, 1),
|
|
8940
|
+
endDate: new Date(currentYear + 10, 11, 31)
|
|
8941
8941
|
};
|
|
8942
8942
|
const DatePicker = (props) => {
|
|
8943
8943
|
const {
|
|
8944
|
-
|
|
8945
|
-
|
|
8944
|
+
startDate,
|
|
8945
|
+
endDate,
|
|
8946
8946
|
type,
|
|
8947
|
-
|
|
8947
|
+
showChinese,
|
|
8948
8948
|
minuteStep,
|
|
8949
|
-
modelValue,
|
|
8950
8949
|
visible,
|
|
8951
8950
|
title,
|
|
8951
|
+
defaultValue,
|
|
8952
8952
|
formatter,
|
|
8953
|
-
|
|
8954
|
-
|
|
8953
|
+
onClose,
|
|
8954
|
+
onConfirm,
|
|
8955
8955
|
filter,
|
|
8956
8956
|
onChange,
|
|
8957
8957
|
threeDimensional,
|
|
@@ -8959,18 +8959,10 @@ const DatePicker = (props) => {
|
|
|
8959
8959
|
style,
|
|
8960
8960
|
...rest
|
|
8961
8961
|
} = {
|
|
8962
|
-
...defaultProps$
|
|
8962
|
+
...defaultProps$X,
|
|
8963
8963
|
...props
|
|
8964
8964
|
};
|
|
8965
8965
|
const { locale } = useConfig$1();
|
|
8966
|
-
const [show, setShow] = useState(false);
|
|
8967
|
-
const [currentDate, setCurrentDate] = useState(modelValue);
|
|
8968
|
-
const [defaultValue, setDefaultValue] = useState([]);
|
|
8969
|
-
const [options, setListData] = useState([]);
|
|
8970
|
-
const pickerRef = useRef(null);
|
|
8971
|
-
const isDate = (val) => {
|
|
8972
|
-
return Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
|
|
8973
|
-
};
|
|
8974
8966
|
const datepickerLang = locale.datepicker;
|
|
8975
8967
|
const zhCNType = {
|
|
8976
8968
|
day: datepickerLang.day,
|
|
@@ -8980,20 +8972,32 @@ const DatePicker = (props) => {
|
|
|
8980
8972
|
minute: datepickerLang.min,
|
|
8981
8973
|
seconds: datepickerLang.seconds
|
|
8982
8974
|
};
|
|
8975
|
+
const [defaultValueOfPicker, setDefaultValueOfPicker] = useState([]);
|
|
8976
|
+
const [options, setOptions] = useState([]);
|
|
8977
|
+
const isDate = (val) => {
|
|
8978
|
+
return Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
|
|
8979
|
+
};
|
|
8983
8980
|
const formatValue = (value) => {
|
|
8984
8981
|
let cvalue = value;
|
|
8985
8982
|
if (!cvalue || cvalue && !isDate(cvalue)) {
|
|
8986
|
-
cvalue =
|
|
8983
|
+
cvalue = startDate;
|
|
8987
8984
|
}
|
|
8988
|
-
let timestmp = Math.max(cvalue.getTime(),
|
|
8989
|
-
timestmp = Math.min(timestmp,
|
|
8985
|
+
let timestmp = Math.max(cvalue.getTime(), startDate.getTime());
|
|
8986
|
+
timestmp = Math.min(timestmp, endDate.getTime());
|
|
8990
8987
|
return new Date(timestmp);
|
|
8991
8988
|
};
|
|
8989
|
+
const [currentDate, setCurrentDate] = usePropsValue({
|
|
8990
|
+
value: props.value && formatValue(props.value),
|
|
8991
|
+
defaultValue: formatValue(props.defaultValue || null),
|
|
8992
|
+
finalValue: null,
|
|
8993
|
+
onChange: (val) => {
|
|
8994
|
+
}
|
|
8995
|
+
});
|
|
8992
8996
|
function getMonthEndDay(year, month) {
|
|
8993
8997
|
return new Date(year, month, 0).getDate();
|
|
8994
8998
|
}
|
|
8995
8999
|
const getBoundary = (type2, value) => {
|
|
8996
|
-
const boundary = type2 === "min" ?
|
|
9000
|
+
const boundary = type2 === "min" ? startDate : endDate;
|
|
8997
9001
|
const year = boundary.getFullYear();
|
|
8998
9002
|
let month = 1;
|
|
8999
9003
|
let date = 1;
|
|
@@ -9027,12 +9031,12 @@ const DatePicker = (props) => {
|
|
|
9027
9031
|
[`${type2}Seconds`]: seconds
|
|
9028
9032
|
};
|
|
9029
9033
|
};
|
|
9030
|
-
const ranges = (
|
|
9031
|
-
const curDate =
|
|
9034
|
+
const ranges = () => {
|
|
9035
|
+
const curDate = currentDate;
|
|
9032
9036
|
if (!curDate)
|
|
9033
9037
|
return [];
|
|
9034
|
-
const { maxYear, maxDate
|
|
9035
|
-
const { minYear, minDate
|
|
9038
|
+
const { maxYear, maxDate, maxMonth, maxHour, maxMinute, maxSeconds } = getBoundary("max", curDate);
|
|
9039
|
+
const { minYear, minDate, minMonth, minHour, minMinute, minSeconds } = getBoundary("min", curDate);
|
|
9036
9040
|
let result = [
|
|
9037
9041
|
{
|
|
9038
9042
|
type: "year",
|
|
@@ -9044,7 +9048,7 @@ const DatePicker = (props) => {
|
|
|
9044
9048
|
},
|
|
9045
9049
|
{
|
|
9046
9050
|
type: "day",
|
|
9047
|
-
range: [
|
|
9051
|
+
range: [minDate, maxDate]
|
|
9048
9052
|
},
|
|
9049
9053
|
{
|
|
9050
9054
|
type: "hour",
|
|
@@ -9084,7 +9088,7 @@ const DatePicker = (props) => {
|
|
|
9084
9088
|
}
|
|
9085
9089
|
return result;
|
|
9086
9090
|
};
|
|
9087
|
-
const updateChooseValueCustmer = (
|
|
9091
|
+
const updateChooseValueCustmer = (selectedOptions, selectedValue, index) => {
|
|
9088
9092
|
if (["date", "datetime", "datehour", "month-day", "year-month"].includes(
|
|
9089
9093
|
type.toLocaleLowerCase()
|
|
9090
9094
|
)) {
|
|
@@ -9094,11 +9098,13 @@ const DatePicker = (props) => {
|
|
|
9094
9098
|
});
|
|
9095
9099
|
if (type.toLocaleLowerCase() === "month-day" && formatDate.length < 3) {
|
|
9096
9100
|
formatDate.unshift(
|
|
9097
|
-
new Date(
|
|
9101
|
+
new Date(defaultValue || startDate || endDate).getFullYear()
|
|
9098
9102
|
);
|
|
9099
9103
|
}
|
|
9100
9104
|
if (type.toLocaleLowerCase() === "year-month" && formatDate.length < 3) {
|
|
9101
|
-
formatDate.push(
|
|
9105
|
+
formatDate.push(
|
|
9106
|
+
new Date(defaultValue || startDate || endDate).getDate()
|
|
9107
|
+
);
|
|
9102
9108
|
}
|
|
9103
9109
|
const year = Number(formatDate[0]);
|
|
9104
9110
|
const month = Number(formatDate[1]) - 1;
|
|
@@ -9123,7 +9129,7 @@ const DatePicker = (props) => {
|
|
|
9123
9129
|
const isEqual = (currentDate == null ? void 0 : currentDate.getTime()) === (date == null ? void 0 : date.getTime());
|
|
9124
9130
|
date && isDate(date) && !isEqual && setCurrentDate(formatValue(date));
|
|
9125
9131
|
}
|
|
9126
|
-
props.onChange && props.onChange(
|
|
9132
|
+
props.onChange && props.onChange(selectedOptions, selectedValue, index);
|
|
9127
9133
|
};
|
|
9128
9134
|
const padZero = (num, targetLength = 2) => {
|
|
9129
9135
|
let str = `${num}`;
|
|
@@ -9141,12 +9147,13 @@ const DatePicker = (props) => {
|
|
|
9141
9147
|
});
|
|
9142
9148
|
} else {
|
|
9143
9149
|
const padMin = padZero(value, 2);
|
|
9144
|
-
const fatter =
|
|
9150
|
+
const fatter = showChinese ? zhCNType[type2] : "";
|
|
9145
9151
|
fOption = { text: padMin + fatter, value: padMin };
|
|
9146
9152
|
}
|
|
9147
9153
|
return fOption;
|
|
9148
9154
|
};
|
|
9149
9155
|
const generateValue = (min, max, val, type2, columnIndex) => {
|
|
9156
|
+
var _a;
|
|
9150
9157
|
let cmin = min;
|
|
9151
9158
|
const arr = [];
|
|
9152
9159
|
let index = 0;
|
|
@@ -9161,8 +9168,8 @@ const DatePicker = (props) => {
|
|
|
9161
9168
|
index++;
|
|
9162
9169
|
}
|
|
9163
9170
|
}
|
|
9164
|
-
|
|
9165
|
-
|
|
9171
|
+
defaultValueOfPicker[columnIndex] = (_a = arr[index]) == null ? void 0 : _a.value;
|
|
9172
|
+
setDefaultValueOfPicker([...defaultValueOfPicker]);
|
|
9166
9173
|
if (props.filter && props.filter(type2, arr)) {
|
|
9167
9174
|
return props.filter(type2, arr);
|
|
9168
9175
|
}
|
|
@@ -9187,8 +9194,8 @@ const DatePicker = (props) => {
|
|
|
9187
9194
|
}
|
|
9188
9195
|
return d;
|
|
9189
9196
|
};
|
|
9190
|
-
const columns = (
|
|
9191
|
-
const val = ranges(
|
|
9197
|
+
const columns = () => {
|
|
9198
|
+
const val = ranges().map((res, columnIndex) => {
|
|
9192
9199
|
return generateValue(
|
|
9193
9200
|
res.range[0],
|
|
9194
9201
|
res.range[1],
|
|
@@ -9199,48 +9206,38 @@ const DatePicker = (props) => {
|
|
|
9199
9206
|
});
|
|
9200
9207
|
return val || [];
|
|
9201
9208
|
};
|
|
9202
|
-
useEffect(() => {
|
|
9203
|
-
setCurrentDate(formatValue(modelValue));
|
|
9204
|
-
}, []);
|
|
9205
|
-
useEffect(() => {
|
|
9206
|
-
setCurrentDate(formatValue(modelValue));
|
|
9207
|
-
}, [modelValue]);
|
|
9208
|
-
useEffect(() => {
|
|
9209
|
-
setShow(visible);
|
|
9210
|
-
}, [visible]);
|
|
9211
9209
|
useEffect(() => {
|
|
9212
9210
|
if (currentDate) {
|
|
9213
|
-
|
|
9211
|
+
setOptions(columns());
|
|
9214
9212
|
}
|
|
9215
|
-
}, [
|
|
9213
|
+
}, []);
|
|
9216
9214
|
return /* @__PURE__ */ React.createElement(
|
|
9217
9215
|
View,
|
|
9218
9216
|
{
|
|
9219
|
-
className: `nut-datepicker ${className
|
|
9217
|
+
className: `nut-datepicker ${className}`,
|
|
9220
9218
|
style,
|
|
9221
9219
|
catchMove: true,
|
|
9222
9220
|
...rest
|
|
9223
9221
|
},
|
|
9224
|
-
options.length
|
|
9222
|
+
options.length && /* @__PURE__ */ React.createElement(
|
|
9225
9223
|
Picker$1,
|
|
9226
9224
|
{
|
|
9227
9225
|
title,
|
|
9228
|
-
visible
|
|
9226
|
+
visible,
|
|
9229
9227
|
options,
|
|
9230
|
-
onClose
|
|
9231
|
-
defaultValue,
|
|
9232
|
-
onConfirm: (options2,
|
|
9233
|
-
onChange: (
|
|
9234
|
-
threeDimensional
|
|
9235
|
-
ref: pickerRef
|
|
9228
|
+
onClose,
|
|
9229
|
+
defaultValue: defaultValueOfPicker,
|
|
9230
|
+
onConfirm: (options2, value) => onConfirm && onConfirm(options2, value),
|
|
9231
|
+
onChange: (options2, value, index) => updateChooseValueCustmer(options2, value, index),
|
|
9232
|
+
threeDimensional
|
|
9236
9233
|
}
|
|
9237
9234
|
)
|
|
9238
9235
|
);
|
|
9239
9236
|
};
|
|
9240
|
-
DatePicker.defaultProps = defaultProps$
|
|
9237
|
+
DatePicker.defaultProps = defaultProps$X;
|
|
9241
9238
|
DatePicker.displayName = "NutDatePicker";
|
|
9242
9239
|
const FormItemContext = createContext({});
|
|
9243
|
-
const defaultProps$
|
|
9240
|
+
const defaultProps$W = {
|
|
9244
9241
|
...ComponentDefaults,
|
|
9245
9242
|
name: "",
|
|
9246
9243
|
label: "",
|
|
@@ -9289,7 +9286,7 @@ class FormItem extends React.Component {
|
|
|
9289
9286
|
showErrorLine,
|
|
9290
9287
|
showErrorMessage
|
|
9291
9288
|
} = {
|
|
9292
|
-
...defaultProps$
|
|
9289
|
+
...defaultProps$W,
|
|
9293
9290
|
...this.props
|
|
9294
9291
|
};
|
|
9295
9292
|
const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
@@ -9338,7 +9335,7 @@ class FormItem extends React.Component {
|
|
|
9338
9335
|
return this.renderLayout(returnChildNode);
|
|
9339
9336
|
}
|
|
9340
9337
|
}
|
|
9341
|
-
__publicField(FormItem, "defaultProps", defaultProps$
|
|
9338
|
+
__publicField(FormItem, "defaultProps", defaultProps$W);
|
|
9342
9339
|
__publicField(FormItem, "contextType", FormItemContext);
|
|
9343
9340
|
class FormStore {
|
|
9344
9341
|
constructor() {
|
|
@@ -9462,7 +9459,7 @@ const useForm = (form) => {
|
|
|
9462
9459
|
}
|
|
9463
9460
|
return [formRef.current];
|
|
9464
9461
|
};
|
|
9465
|
-
const defaultProps$
|
|
9462
|
+
const defaultProps$V = {
|
|
9466
9463
|
...ComponentDefaults,
|
|
9467
9464
|
className: "",
|
|
9468
9465
|
style: void 0,
|
|
@@ -9489,7 +9486,7 @@ const Form = (props) => {
|
|
|
9489
9486
|
starPositon,
|
|
9490
9487
|
...rest
|
|
9491
9488
|
} = {
|
|
9492
|
-
...defaultProps$
|
|
9489
|
+
...defaultProps$V,
|
|
9493
9490
|
...props
|
|
9494
9491
|
};
|
|
9495
9492
|
console.log("46 dddd");
|
|
@@ -9513,7 +9510,7 @@ const Form = (props) => {
|
|
|
9513
9510
|
/* @__PURE__ */ React.createElement(CellGroup, null, /* @__PURE__ */ React.createElement(FormItemContext.Provider, { value: formInstance }, children))
|
|
9514
9511
|
);
|
|
9515
9512
|
};
|
|
9516
|
-
Form.defaultProps = defaultProps$
|
|
9513
|
+
Form.defaultProps = defaultProps$V;
|
|
9517
9514
|
Form.displayName = "NutForm";
|
|
9518
9515
|
Form.Item = FormItem;
|
|
9519
9516
|
function trimExtraChar(value, char, regExp) {
|
|
@@ -9540,7 +9537,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
9540
9537
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
9541
9538
|
return value.replace(regExp, "");
|
|
9542
9539
|
}
|
|
9543
|
-
const defaultProps$
|
|
9540
|
+
const defaultProps$U = {
|
|
9544
9541
|
...ComponentDefaults,
|
|
9545
9542
|
type: "text",
|
|
9546
9543
|
name: "",
|
|
@@ -9584,7 +9581,7 @@ const Input = forwardRef(
|
|
|
9584
9581
|
value: _value,
|
|
9585
9582
|
...rest
|
|
9586
9583
|
} = {
|
|
9587
|
-
...defaultProps$
|
|
9584
|
+
...defaultProps$U,
|
|
9588
9585
|
...props
|
|
9589
9586
|
};
|
|
9590
9587
|
const [value, setValue] = usePropsValue({
|
|
@@ -9725,9 +9722,9 @@ const Input = forwardRef(
|
|
|
9725
9722
|
);
|
|
9726
9723
|
}
|
|
9727
9724
|
);
|
|
9728
|
-
Input.defaultProps = defaultProps$
|
|
9725
|
+
Input.defaultProps = defaultProps$U;
|
|
9729
9726
|
Input.displayName = "NutInput";
|
|
9730
|
-
const defaultProps$
|
|
9727
|
+
const defaultProps$T = {
|
|
9731
9728
|
...ComponentDefaults,
|
|
9732
9729
|
disabled: false,
|
|
9733
9730
|
min: 1,
|
|
@@ -9739,7 +9736,7 @@ const defaultProps$U = {
|
|
|
9739
9736
|
digits: 0,
|
|
9740
9737
|
async: false
|
|
9741
9738
|
};
|
|
9742
|
-
const classPrefix$
|
|
9739
|
+
const classPrefix$f = `nut-inputnumber`;
|
|
9743
9740
|
const InputNumber = (props) => {
|
|
9744
9741
|
const {
|
|
9745
9742
|
children,
|
|
@@ -9764,7 +9761,7 @@ const InputNumber = (props) => {
|
|
|
9764
9761
|
onChange,
|
|
9765
9762
|
...restProps
|
|
9766
9763
|
} = {
|
|
9767
|
-
...defaultProps$
|
|
9764
|
+
...defaultProps$T,
|
|
9768
9765
|
...props
|
|
9769
9766
|
};
|
|
9770
9767
|
const inputRef = useRef("");
|
|
@@ -9782,8 +9779,8 @@ const InputNumber = (props) => {
|
|
|
9782
9779
|
}, []);
|
|
9783
9780
|
const classes = classNames(
|
|
9784
9781
|
{
|
|
9785
|
-
[`${classPrefix$
|
|
9786
|
-
[`${classPrefix$
|
|
9782
|
+
[`${classPrefix$f}`]: true,
|
|
9783
|
+
[`${classPrefix$f}--disabled`]: disabled
|
|
9787
9784
|
},
|
|
9788
9785
|
className
|
|
9789
9786
|
);
|
|
@@ -9951,9 +9948,9 @@ const InputNumber = (props) => {
|
|
|
9951
9948
|
}
|
|
9952
9949
|
)), /* @__PURE__ */ React.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React.createElement(a$9, { className: iconAddClasses, onClick: addNumber })));
|
|
9953
9950
|
};
|
|
9954
|
-
InputNumber.defaultProps = defaultProps$
|
|
9951
|
+
InputNumber.defaultProps = defaultProps$T;
|
|
9955
9952
|
InputNumber.displayName = "NutInputNumber";
|
|
9956
|
-
const defaultProps$
|
|
9953
|
+
const defaultProps$S = {
|
|
9957
9954
|
...ComponentDefaults,
|
|
9958
9955
|
activeColor: "",
|
|
9959
9956
|
closeOnOverlayClick: true,
|
|
@@ -9972,7 +9969,7 @@ const Menu = (props) => {
|
|
|
9972
9969
|
activeColor,
|
|
9973
9970
|
...rest
|
|
9974
9971
|
} = {
|
|
9975
|
-
...defaultProps$
|
|
9972
|
+
...defaultProps$S,
|
|
9976
9973
|
...props
|
|
9977
9974
|
};
|
|
9978
9975
|
const menuRef = useRef(null);
|
|
@@ -10091,9 +10088,9 @@ const Menu = (props) => {
|
|
|
10091
10088
|
), cloneChildren())
|
|
10092
10089
|
);
|
|
10093
10090
|
};
|
|
10094
|
-
Menu.defaultProps = defaultProps$
|
|
10091
|
+
Menu.defaultProps = defaultProps$S;
|
|
10095
10092
|
Menu.displayName = "NutMenu";
|
|
10096
|
-
const defaultProps$
|
|
10093
|
+
const defaultProps$R = {
|
|
10097
10094
|
...ComponentDefaults,
|
|
10098
10095
|
columns: 1,
|
|
10099
10096
|
direction: "down",
|
|
@@ -10123,7 +10120,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
10123
10120
|
parent,
|
|
10124
10121
|
index
|
|
10125
10122
|
} = {
|
|
10126
|
-
...defaultProps$
|
|
10123
|
+
...defaultProps$R,
|
|
10127
10124
|
...props
|
|
10128
10125
|
};
|
|
10129
10126
|
const [_showPopup, setShowPopup] = useState(show);
|
|
@@ -10174,107 +10171,119 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
10174
10171
|
return { display: "none" };
|
|
10175
10172
|
};
|
|
10176
10173
|
const getPosition = () => {
|
|
10177
|
-
return direction === "down" ? {
|
|
10178
|
-
|
|
10179
|
-
|
|
10174
|
+
return direction === "down" ? { position: "absolute", height: `${window.innerHeight}px` } : {
|
|
10175
|
+
position: "absolute",
|
|
10176
|
+
bottom: "100%",
|
|
10177
|
+
top: "auto",
|
|
10178
|
+
height: `${window.innerHeight}px`
|
|
10180
10179
|
};
|
|
10181
10180
|
};
|
|
10182
10181
|
const placeholderStyle = () => {
|
|
10183
10182
|
if (direction === "down") {
|
|
10184
10183
|
return {
|
|
10185
10184
|
height: `${position.top + position.height}px`,
|
|
10186
|
-
top:
|
|
10185
|
+
top: "auto",
|
|
10186
|
+
bottom: "-100%",
|
|
10187
10187
|
...isShow()
|
|
10188
10188
|
};
|
|
10189
10189
|
}
|
|
10190
10190
|
return {
|
|
10191
10191
|
height: `${getSystemInfoSync().windowHeight - position.top}px`,
|
|
10192
|
-
bottom: `
|
|
10193
|
-
top: "
|
|
10192
|
+
bottom: `auto`,
|
|
10193
|
+
top: "0",
|
|
10194
10194
|
...isShow()
|
|
10195
10195
|
};
|
|
10196
10196
|
};
|
|
10197
|
-
return /* @__PURE__ */ React.createElement(
|
|
10197
|
+
return /* @__PURE__ */ React.createElement(
|
|
10198
10198
|
"div",
|
|
10199
10199
|
{
|
|
10200
|
-
className:
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
lockScroll: parent.lockScroll,
|
|
10212
|
-
visible: _showPopup,
|
|
10213
|
-
closeOnOverlayClick: parent.closeOnOverlayClick,
|
|
10214
|
-
onClick: () => {
|
|
10215
|
-
parent.closeOnOverlayClick && parent.toggleMenuItem(index);
|
|
10200
|
+
className: "nut-menu-item-container",
|
|
10201
|
+
style: { position: "absolute", left: 0, right: 0 }
|
|
10202
|
+
},
|
|
10203
|
+
closeOnClickAway ? /* @__PURE__ */ React.createElement(
|
|
10204
|
+
"div",
|
|
10205
|
+
{
|
|
10206
|
+
className: `placeholder-element ${classNames({
|
|
10207
|
+
up: direction === "up"
|
|
10208
|
+
})}`,
|
|
10209
|
+
style: placeholderStyle(),
|
|
10210
|
+
onClick: () => parent.toggleMenuItem(index)
|
|
10216
10211
|
}
|
|
10217
|
-
|
|
10218
|
-
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
|
|
10224
|
-
|
|
10225
|
-
|
|
10226
|
-
|
|
10227
|
-
|
|
10212
|
+
) : null,
|
|
10213
|
+
/* @__PURE__ */ React.createElement(
|
|
10214
|
+
Overlay$1,
|
|
10215
|
+
{
|
|
10216
|
+
className: "nut-menu__overlay",
|
|
10217
|
+
style: getPosition(),
|
|
10218
|
+
lockScroll: parent.lockScroll,
|
|
10219
|
+
visible: _showPopup,
|
|
10220
|
+
closeOnOverlayClick: parent.closeOnOverlayClick,
|
|
10221
|
+
onClick: () => {
|
|
10222
|
+
parent.closeOnOverlayClick && parent.toggleMenuItem(index);
|
|
10223
|
+
}
|
|
10228
10224
|
}
|
|
10229
|
-
|
|
10225
|
+
),
|
|
10230
10226
|
/* @__PURE__ */ React.createElement(
|
|
10231
|
-
|
|
10227
|
+
"div",
|
|
10232
10228
|
{
|
|
10233
|
-
|
|
10234
|
-
|
|
10235
|
-
|
|
10229
|
+
className: classNames(className, {
|
|
10230
|
+
"nut-menu-item__wrap": direction === "down",
|
|
10231
|
+
"nut-menu-item__wrap-up": direction !== "down"
|
|
10232
|
+
}),
|
|
10233
|
+
style: {
|
|
10234
|
+
...style,
|
|
10235
|
+
...isShow()
|
|
10236
|
+
}
|
|
10236
10237
|
},
|
|
10237
|
-
/* @__PURE__ */ React.createElement(
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
|
|
10246
|
-
flexBasis: `${100 / columns}%`
|
|
10247
|
-
},
|
|
10248
|
-
onClick: () => {
|
|
10249
|
-
handleClick(item);
|
|
10250
|
-
}
|
|
10251
|
-
},
|
|
10252
|
-
item.value === _value ? /* @__PURE__ */ React.createElement(React.Fragment, null, icon || /* @__PURE__ */ React.createElement(
|
|
10253
|
-
a$t,
|
|
10254
|
-
{
|
|
10255
|
-
color: activeColor,
|
|
10256
|
-
size: 10,
|
|
10257
|
-
className: getIconCName(item.value, value)
|
|
10258
|
-
}
|
|
10259
|
-
)) : null,
|
|
10260
|
-
/* @__PURE__ */ React.createElement(
|
|
10238
|
+
/* @__PURE__ */ React.createElement(
|
|
10239
|
+
CSSTransition$1,
|
|
10240
|
+
{
|
|
10241
|
+
in: _showPopup,
|
|
10242
|
+
timeout: 100,
|
|
10243
|
+
classNames: direction === "down" ? "menu-item" : "menu-item-up"
|
|
10244
|
+
},
|
|
10245
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-menu-item__content" }, options == null ? void 0 : options.map((item, index2) => {
|
|
10246
|
+
return /* @__PURE__ */ React.createElement(
|
|
10261
10247
|
"div",
|
|
10262
10248
|
{
|
|
10263
|
-
className:
|
|
10249
|
+
className: `nut-menu-item__option ${classNames({
|
|
10250
|
+
active: item.value === _value
|
|
10251
|
+
})}`,
|
|
10252
|
+
key: item.text,
|
|
10264
10253
|
style: {
|
|
10265
|
-
|
|
10254
|
+
flexBasis: `${100 / columns}%`
|
|
10255
|
+
},
|
|
10256
|
+
onClick: () => {
|
|
10257
|
+
handleClick(item);
|
|
10266
10258
|
}
|
|
10267
10259
|
},
|
|
10268
|
-
item.
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10260
|
+
item.value === _value ? /* @__PURE__ */ React.createElement(React.Fragment, null, icon || /* @__PURE__ */ React.createElement(
|
|
10261
|
+
a$t,
|
|
10262
|
+
{
|
|
10263
|
+
color: activeColor,
|
|
10264
|
+
size: 10,
|
|
10265
|
+
className: getIconCName(item.value, value)
|
|
10266
|
+
}
|
|
10267
|
+
)) : null,
|
|
10268
|
+
/* @__PURE__ */ React.createElement(
|
|
10269
|
+
"div",
|
|
10270
|
+
{
|
|
10271
|
+
className: getIconCName(item.value, value),
|
|
10272
|
+
style: {
|
|
10273
|
+
color: `${item.value === _value ? activeColor : ""}`
|
|
10274
|
+
}
|
|
10275
|
+
},
|
|
10276
|
+
item.text
|
|
10277
|
+
)
|
|
10278
|
+
);
|
|
10279
|
+
}), children)
|
|
10280
|
+
)
|
|
10272
10281
|
)
|
|
10273
|
-
)
|
|
10282
|
+
);
|
|
10274
10283
|
});
|
|
10275
|
-
MenuItem.defaultProps = defaultProps$
|
|
10284
|
+
MenuItem.defaultProps = defaultProps$R;
|
|
10276
10285
|
MenuItem.displayName = "NutMenuItem";
|
|
10277
|
-
const defaultProps$
|
|
10286
|
+
const defaultProps$Q = {
|
|
10278
10287
|
...ComponentDefaults,
|
|
10279
10288
|
visible: false,
|
|
10280
10289
|
type: "default",
|
|
@@ -10419,17 +10428,17 @@ const NumberKeyboard = (props) => {
|
|
|
10419
10428
|
))))
|
|
10420
10429
|
);
|
|
10421
10430
|
};
|
|
10422
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
10431
|
+
NumberKeyboard.defaultProps = defaultProps$Q;
|
|
10423
10432
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
10424
10433
|
const RadioContext = React.createContext(null);
|
|
10425
|
-
const defaultProps$
|
|
10434
|
+
const defaultProps$P = {
|
|
10426
10435
|
labelPosition: "right",
|
|
10427
10436
|
onChange: (value) => {
|
|
10428
10437
|
},
|
|
10429
10438
|
direction: "vertical",
|
|
10430
10439
|
options: []
|
|
10431
10440
|
};
|
|
10432
|
-
const classPrefix$
|
|
10441
|
+
const classPrefix$e = "nut-radiogroup";
|
|
10433
10442
|
const RadioGroup = React.forwardRef(
|
|
10434
10443
|
(props, ref) => {
|
|
10435
10444
|
const {
|
|
@@ -10443,7 +10452,7 @@ const RadioGroup = React.forwardRef(
|
|
|
10443
10452
|
options,
|
|
10444
10453
|
disabled,
|
|
10445
10454
|
...rest
|
|
10446
|
-
} = { ...defaultProps$
|
|
10455
|
+
} = { ...defaultProps$P, ...props };
|
|
10447
10456
|
const [val2State, setVal2State] = usePropsValue({
|
|
10448
10457
|
defaultValue: props.defaultValue,
|
|
10449
10458
|
value: props.value,
|
|
@@ -10485,8 +10494,8 @@ const RadioGroup = React.forwardRef(
|
|
|
10485
10494
|
/* @__PURE__ */ React.createElement(
|
|
10486
10495
|
"div",
|
|
10487
10496
|
{
|
|
10488
|
-
className: classNames(classPrefix$
|
|
10489
|
-
[`${classPrefix$
|
|
10497
|
+
className: classNames(classPrefix$e, className, {
|
|
10498
|
+
[`${classPrefix$e}--${props.direction}`]: props.direction
|
|
10490
10499
|
}),
|
|
10491
10500
|
...rest
|
|
10492
10501
|
},
|
|
@@ -10495,9 +10504,9 @@ const RadioGroup = React.forwardRef(
|
|
|
10495
10504
|
);
|
|
10496
10505
|
}
|
|
10497
10506
|
);
|
|
10498
|
-
RadioGroup.defaultProps = defaultProps$
|
|
10507
|
+
RadioGroup.defaultProps = defaultProps$P;
|
|
10499
10508
|
RadioGroup.displayName = "NutRadioGroup";
|
|
10500
|
-
const defaultProps$
|
|
10509
|
+
const defaultProps$O = {
|
|
10501
10510
|
...ComponentDefaults,
|
|
10502
10511
|
disabled: false,
|
|
10503
10512
|
shape: "round",
|
|
@@ -10523,7 +10532,7 @@ const Radio = (props) => {
|
|
|
10523
10532
|
onChange,
|
|
10524
10533
|
...others
|
|
10525
10534
|
} = {
|
|
10526
|
-
...defaultProps$
|
|
10535
|
+
...defaultProps$O,
|
|
10527
10536
|
...props
|
|
10528
10537
|
};
|
|
10529
10538
|
let { labelPosition, disabled, ...rest } = others;
|
|
@@ -10619,10 +10628,10 @@ const Radio = (props) => {
|
|
|
10619
10628
|
renderRadioItem()
|
|
10620
10629
|
);
|
|
10621
10630
|
};
|
|
10622
|
-
Radio.defaultProps = defaultProps$
|
|
10631
|
+
Radio.defaultProps = defaultProps$O;
|
|
10623
10632
|
Radio.displayName = "NutRadio";
|
|
10624
10633
|
Radio.Group = RadioGroup;
|
|
10625
|
-
const defaultProps$
|
|
10634
|
+
const defaultProps$N = {
|
|
10626
10635
|
...ComponentDefaults,
|
|
10627
10636
|
range: false,
|
|
10628
10637
|
min: 0,
|
|
@@ -10650,7 +10659,7 @@ const Range = (props) => {
|
|
|
10650
10659
|
step,
|
|
10651
10660
|
value,
|
|
10652
10661
|
defaultValue
|
|
10653
|
-
} = { ...defaultProps$
|
|
10662
|
+
} = { ...defaultProps$N, ...props };
|
|
10654
10663
|
const classPrefix2 = "nut-range";
|
|
10655
10664
|
const [buttonIndex, setButtonIndex] = useState(0);
|
|
10656
10665
|
const [dragStatus, setDragStatus] = useState("start");
|
|
@@ -10914,9 +10923,9 @@ const Range = (props) => {
|
|
|
10914
10923
|
renderButton()
|
|
10915
10924
|
))), maxDescription !== null && /* @__PURE__ */ React.createElement("div", { className: "max" }, maxDescription || max));
|
|
10916
10925
|
};
|
|
10917
|
-
Range.defaultProps = defaultProps$
|
|
10926
|
+
Range.defaultProps = defaultProps$N;
|
|
10918
10927
|
Range.displayName = "NutRange";
|
|
10919
|
-
const defaultProps$
|
|
10928
|
+
const defaultProps$M = {
|
|
10920
10929
|
...ComponentDefaults,
|
|
10921
10930
|
count: 5,
|
|
10922
10931
|
min: 0,
|
|
@@ -10941,7 +10950,7 @@ const Rate = (props) => {
|
|
|
10941
10950
|
allowHalf,
|
|
10942
10951
|
onChange
|
|
10943
10952
|
} = {
|
|
10944
|
-
...defaultProps$
|
|
10953
|
+
...defaultProps$M,
|
|
10945
10954
|
...props
|
|
10946
10955
|
};
|
|
10947
10956
|
const classPrefix2 = "nut-rate";
|
|
@@ -11024,9 +11033,9 @@ const Rate = (props) => {
|
|
|
11024
11033
|
})
|
|
11025
11034
|
);
|
|
11026
11035
|
};
|
|
11027
|
-
Rate.defaultProps = defaultProps$
|
|
11036
|
+
Rate.defaultProps = defaultProps$M;
|
|
11028
11037
|
Rate.displayName = "NutRate";
|
|
11029
|
-
const defaultProps$
|
|
11038
|
+
const defaultProps$L = {
|
|
11030
11039
|
...ComponentDefaults,
|
|
11031
11040
|
placeholder: "",
|
|
11032
11041
|
shape: "square",
|
|
@@ -11065,7 +11074,7 @@ const SearchBar = (props) => {
|
|
|
11065
11074
|
onSearch,
|
|
11066
11075
|
onClickInput
|
|
11067
11076
|
} = {
|
|
11068
|
-
...defaultProps$
|
|
11077
|
+
...defaultProps$L,
|
|
11069
11078
|
...props
|
|
11070
11079
|
};
|
|
11071
11080
|
const forceFocus = () => {
|
|
@@ -11174,9 +11183,9 @@ const SearchBar = (props) => {
|
|
|
11174
11183
|
renderRight()
|
|
11175
11184
|
);
|
|
11176
11185
|
};
|
|
11177
|
-
SearchBar.defaultProps = defaultProps$
|
|
11186
|
+
SearchBar.defaultProps = defaultProps$L;
|
|
11178
11187
|
SearchBar.displayName = "NutSearchBar";
|
|
11179
|
-
const defaultProps$
|
|
11188
|
+
const defaultProps$K = {
|
|
11180
11189
|
...ComponentDefaults,
|
|
11181
11190
|
value: "",
|
|
11182
11191
|
visible: false,
|
|
@@ -11213,7 +11222,7 @@ const ShortPassword = (props) => {
|
|
|
11213
11222
|
onClickCloseIcon,
|
|
11214
11223
|
...rest
|
|
11215
11224
|
} = {
|
|
11216
|
-
...defaultProps$
|
|
11225
|
+
...defaultProps$K,
|
|
11217
11226
|
...props
|
|
11218
11227
|
};
|
|
11219
11228
|
const classPrefix2 = "nut-shortpassword";
|
|
@@ -11270,34 +11279,31 @@ const ShortPassword = (props) => {
|
|
|
11270
11279
|
), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__footer__sure`, onClick: sure }, locale.confirm)))
|
|
11271
11280
|
);
|
|
11272
11281
|
};
|
|
11273
|
-
ShortPassword.defaultProps = defaultProps$
|
|
11282
|
+
ShortPassword.defaultProps = defaultProps$K;
|
|
11274
11283
|
ShortPassword.displayName = "NutShortPassword";
|
|
11275
|
-
const defaultProps$
|
|
11284
|
+
const defaultProps$J = {
|
|
11285
|
+
...ComponentDefaults,
|
|
11276
11286
|
canvasId: "spcanvas",
|
|
11277
11287
|
type: "png",
|
|
11278
11288
|
lineWidth: 2,
|
|
11279
|
-
strokeStyle: "#000"
|
|
11280
|
-
className: ""
|
|
11289
|
+
strokeStyle: "#000"
|
|
11281
11290
|
};
|
|
11282
|
-
const
|
|
11283
|
-
const { locale } = useConfig$1();
|
|
11291
|
+
const InternalSignature = (props, ref) => {
|
|
11284
11292
|
const {
|
|
11285
11293
|
canvasId,
|
|
11286
11294
|
type,
|
|
11287
11295
|
lineWidth,
|
|
11288
11296
|
strokeStyle,
|
|
11289
|
-
unSupportTpl,
|
|
11290
11297
|
className,
|
|
11291
|
-
|
|
11292
|
-
clear,
|
|
11298
|
+
style,
|
|
11293
11299
|
onConfirm,
|
|
11294
11300
|
onClear,
|
|
11295
11301
|
...rest
|
|
11296
11302
|
} = {
|
|
11297
|
-
...defaultProps$
|
|
11303
|
+
...defaultProps$J,
|
|
11298
11304
|
...props
|
|
11299
11305
|
};
|
|
11300
|
-
const
|
|
11306
|
+
const classPrefix2 = `nut-signature`;
|
|
11301
11307
|
const canvasRef = useRef(null);
|
|
11302
11308
|
const wrapRef = useRef(null);
|
|
11303
11309
|
const [canvasHeight, setCanvasHeight] = useState(0);
|
|
@@ -11335,12 +11341,8 @@ const Signature = (props) => {
|
|
|
11335
11341
|
ctx.current.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
11336
11342
|
ctx.current.closePath();
|
|
11337
11343
|
}
|
|
11338
|
-
clear && clear();
|
|
11339
11344
|
onClear && onClear();
|
|
11340
11345
|
};
|
|
11341
|
-
const handleConfirmBtn = () => {
|
|
11342
|
-
onSave();
|
|
11343
|
-
};
|
|
11344
11346
|
const onSave = () => {
|
|
11345
11347
|
createSelectorQuery().select(`#${canvasId}`).fields({
|
|
11346
11348
|
node: true,
|
|
@@ -11352,7 +11354,6 @@ const Signature = (props) => {
|
|
|
11352
11354
|
canvasId: `${canvasId}`,
|
|
11353
11355
|
success: (res2) => {
|
|
11354
11356
|
handleClearBtn();
|
|
11355
|
-
confirm && confirm(res2.tempFilePath);
|
|
11356
11357
|
onConfirm && onConfirm(res2.tempFilePath);
|
|
11357
11358
|
},
|
|
11358
11359
|
fail: (res2) => {
|
|
@@ -11376,6 +11377,14 @@ const Signature = (props) => {
|
|
|
11376
11377
|
ctx.current.strokeStyle = strokeStyle;
|
|
11377
11378
|
}
|
|
11378
11379
|
};
|
|
11380
|
+
useImperativeHandle(ref, () => ({
|
|
11381
|
+
confirm: () => {
|
|
11382
|
+
onSave();
|
|
11383
|
+
},
|
|
11384
|
+
clear: () => {
|
|
11385
|
+
handleClearBtn();
|
|
11386
|
+
}
|
|
11387
|
+
}));
|
|
11379
11388
|
const initCanvas = () => {
|
|
11380
11389
|
nextTick(() => {
|
|
11381
11390
|
setTimeout(() => {
|
|
@@ -11412,7 +11421,7 @@ const Signature = (props) => {
|
|
|
11412
11421
|
useEffect(() => {
|
|
11413
11422
|
initCanvas();
|
|
11414
11423
|
}, []);
|
|
11415
|
-
return /* @__PURE__ */ React.createElement("div", { className: `${
|
|
11424
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2} ${className}`, ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__inner spcanvas_WEAPP`, ref: wrapRef }, getEnv() === "WEAPP" || getEnv() === "JD" ? /* @__PURE__ */ React.createElement(
|
|
11416
11425
|
"canvas",
|
|
11417
11426
|
{
|
|
11418
11427
|
id: canvasId,
|
|
@@ -11436,27 +11445,12 @@ const Signature = (props) => {
|
|
|
11436
11445
|
onTouchEnd: endEventHandler,
|
|
11437
11446
|
onTouchCancel: endEventHandler
|
|
11438
11447
|
}
|
|
11439
|
-
))
|
|
11440
|
-
Button,
|
|
11441
|
-
{
|
|
11442
|
-
className: `${b2("btn")}`,
|
|
11443
|
-
type: "default",
|
|
11444
|
-
onClick: () => handleClearBtn()
|
|
11445
|
-
},
|
|
11446
|
-
locale.signature.reSign
|
|
11447
|
-
), /* @__PURE__ */ React.createElement(
|
|
11448
|
-
Button,
|
|
11449
|
-
{
|
|
11450
|
-
className: `${b2("btn")}`,
|
|
11451
|
-
type: "primary",
|
|
11452
|
-
onClick: () => handleConfirmBtn()
|
|
11453
|
-
},
|
|
11454
|
-
locale.confirm
|
|
11455
|
-
));
|
|
11448
|
+
)));
|
|
11456
11449
|
};
|
|
11457
|
-
Signature
|
|
11450
|
+
const Signature = React.forwardRef(InternalSignature);
|
|
11451
|
+
Signature.defaultProps = defaultProps$J;
|
|
11458
11452
|
Signature.displayName = "NutSignature";
|
|
11459
|
-
const defaultProps$
|
|
11453
|
+
const defaultProps$I = {
|
|
11460
11454
|
...ComponentDefaults,
|
|
11461
11455
|
disabled: false,
|
|
11462
11456
|
activeText: "",
|
|
@@ -11473,7 +11467,7 @@ const Switch = (props) => {
|
|
|
11473
11467
|
style,
|
|
11474
11468
|
onChange
|
|
11475
11469
|
} = {
|
|
11476
|
-
...defaultProps$
|
|
11470
|
+
...defaultProps$I,
|
|
11477
11471
|
...props
|
|
11478
11472
|
};
|
|
11479
11473
|
const classPrefix2 = "nut-switch";
|
|
@@ -11492,9 +11486,9 @@ const Switch = (props) => {
|
|
|
11492
11486
|
};
|
|
11493
11487
|
return /* @__PURE__ */ React.createElement("div", { className: classes(), onClick: (e) => onClick(e), style }, /* @__PURE__ */ React.createElement("div", { className: "switch-button" }, !value && /* @__PURE__ */ React.createElement("div", { className: "close-line" }), activeText && /* @__PURE__ */ React.createElement(React.Fragment, null, value ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__label open` }, activeText) : /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__label close` }, inactiveText))));
|
|
11494
11488
|
};
|
|
11495
|
-
Switch.defaultProps = defaultProps$
|
|
11489
|
+
Switch.defaultProps = defaultProps$I;
|
|
11496
11490
|
Switch.displayName = "NutSwitch";
|
|
11497
|
-
const defaultProps$
|
|
11491
|
+
const defaultProps$H = {
|
|
11498
11492
|
...ComponentDefaults,
|
|
11499
11493
|
defaultValue: "",
|
|
11500
11494
|
showCount: false,
|
|
@@ -11522,7 +11516,7 @@ const TextArea = (props) => {
|
|
|
11522
11516
|
onBlur,
|
|
11523
11517
|
onFocus,
|
|
11524
11518
|
...rest
|
|
11525
|
-
} = { ...defaultProps$
|
|
11519
|
+
} = { ...defaultProps$H, ...props };
|
|
11526
11520
|
const classPrefix2 = "nut-textarea";
|
|
11527
11521
|
const compositionRef = useRef(false);
|
|
11528
11522
|
const format = (value2) => {
|
|
@@ -11598,9 +11592,9 @@ const TextArea = (props) => {
|
|
|
11598
11592
|
showCount && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__limit` }, inputValue.length, "/", maxLength < 0 ? 0 : maxLength)
|
|
11599
11593
|
);
|
|
11600
11594
|
};
|
|
11601
|
-
TextArea.defaultProps = defaultProps$
|
|
11595
|
+
TextArea.defaultProps = defaultProps$H;
|
|
11602
11596
|
TextArea.displayName = "NutTextArea";
|
|
11603
|
-
const defaultProps$
|
|
11597
|
+
const defaultProps$G = {
|
|
11604
11598
|
...ComponentDefaults,
|
|
11605
11599
|
percent: 0,
|
|
11606
11600
|
showText: false,
|
|
@@ -11621,7 +11615,7 @@ const Progress = (props) => {
|
|
|
11621
11615
|
delay,
|
|
11622
11616
|
...rest
|
|
11623
11617
|
} = {
|
|
11624
|
-
...defaultProps$
|
|
11618
|
+
...defaultProps$G,
|
|
11625
11619
|
...props
|
|
11626
11620
|
};
|
|
11627
11621
|
const classPrefix2 = "nut-progress";
|
|
@@ -11672,7 +11666,7 @@ const Progress = (props) => {
|
|
|
11672
11666
|
)
|
|
11673
11667
|
))));
|
|
11674
11668
|
};
|
|
11675
|
-
Progress.defaultProps = defaultProps$
|
|
11669
|
+
Progress.defaultProps = defaultProps$G;
|
|
11676
11670
|
Progress.displayName = "NutProgress";
|
|
11677
11671
|
class UploadOptions {
|
|
11678
11672
|
constructor() {
|
|
@@ -11825,7 +11819,7 @@ const funcInterceptor = (interceptor, {
|
|
|
11825
11819
|
done();
|
|
11826
11820
|
}
|
|
11827
11821
|
};
|
|
11828
|
-
const defaultProps$
|
|
11822
|
+
const defaultProps$F = {
|
|
11829
11823
|
...ComponentDefaults,
|
|
11830
11824
|
url: "",
|
|
11831
11825
|
maxCount: 1,
|
|
@@ -11913,7 +11907,7 @@ const InternalUploader = (props, ref) => {
|
|
|
11913
11907
|
beforeXhrUpload,
|
|
11914
11908
|
beforeDelete,
|
|
11915
11909
|
...restProps
|
|
11916
|
-
} = { ...defaultProps$
|
|
11910
|
+
} = { ...defaultProps$F, ...props };
|
|
11917
11911
|
const [fileList, setFileList] = useState(defaultValue || []);
|
|
11918
11912
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
11919
11913
|
useEffect(() => {
|
|
@@ -12246,9 +12240,9 @@ const InternalUploader = (props, ref) => {
|
|
|
12246
12240
|
));
|
|
12247
12241
|
};
|
|
12248
12242
|
const Uploader = React.forwardRef(InternalUploader);
|
|
12249
|
-
Uploader.defaultProps = defaultProps$
|
|
12243
|
+
Uploader.defaultProps = defaultProps$F;
|
|
12250
12244
|
Uploader.displayName = "NutUploader";
|
|
12251
|
-
const defaultProps$
|
|
12245
|
+
const defaultProps$E = {
|
|
12252
12246
|
...ComponentDefaults,
|
|
12253
12247
|
visible: false,
|
|
12254
12248
|
title: "",
|
|
@@ -12275,7 +12269,7 @@ const ActionSheet = (props) => {
|
|
|
12275
12269
|
className,
|
|
12276
12270
|
style,
|
|
12277
12271
|
...rest
|
|
12278
|
-
} = { ...defaultProps$
|
|
12272
|
+
} = { ...defaultProps$E, ...props };
|
|
12279
12273
|
const classPrefix2 = "nut-actionsheet";
|
|
12280
12274
|
const cancelActionSheet = () => {
|
|
12281
12275
|
onCancel && onCancel();
|
|
@@ -12316,7 +12310,7 @@ const ActionSheet = (props) => {
|
|
|
12316
12310
|
))
|
|
12317
12311
|
);
|
|
12318
12312
|
};
|
|
12319
|
-
ActionSheet.defaultProps = defaultProps$
|
|
12313
|
+
ActionSheet.defaultProps = defaultProps$E;
|
|
12320
12314
|
ActionSheet.displayName = "NutActionSheet";
|
|
12321
12315
|
const Content = (props) => {
|
|
12322
12316
|
const { visible, title, footer, footerDirection, onClick, children } = props;
|
|
@@ -12406,7 +12400,7 @@ const DialogWrap = (props) => {
|
|
|
12406
12400
|
};
|
|
12407
12401
|
DialogWrap.defaultProps = defaultDialogProps;
|
|
12408
12402
|
DialogWrap.displayName = "NutDialogWrap";
|
|
12409
|
-
const defaultProps$
|
|
12403
|
+
const defaultProps$D = {
|
|
12410
12404
|
confirmText: "",
|
|
12411
12405
|
cancelText: "",
|
|
12412
12406
|
overlay: true,
|
|
@@ -12501,9 +12495,9 @@ const BaseDialog = forwardRef(
|
|
|
12501
12495
|
);
|
|
12502
12496
|
}
|
|
12503
12497
|
);
|
|
12504
|
-
BaseDialog.defaultProps = defaultProps$
|
|
12498
|
+
BaseDialog.defaultProps = defaultProps$D;
|
|
12505
12499
|
BaseDialog.displayName = "NutDialog";
|
|
12506
|
-
const defaultProps$
|
|
12500
|
+
const defaultProps$C = {
|
|
12507
12501
|
...ComponentDefaults,
|
|
12508
12502
|
attract: false,
|
|
12509
12503
|
direction: void 0,
|
|
@@ -12517,7 +12511,7 @@ const defaultProps$D = {
|
|
|
12517
12511
|
};
|
|
12518
12512
|
const Drag = (props) => {
|
|
12519
12513
|
const { attract, direction, boundary, children, className, style, ...reset } = {
|
|
12520
|
-
...defaultProps$
|
|
12514
|
+
...defaultProps$C,
|
|
12521
12515
|
...props
|
|
12522
12516
|
};
|
|
12523
12517
|
const classPrefix2 = "nut-drag";
|
|
@@ -12614,23 +12608,23 @@ const Drag = (props) => {
|
|
|
12614
12608
|
)
|
|
12615
12609
|
);
|
|
12616
12610
|
};
|
|
12617
|
-
Drag.defaultProps = defaultProps$
|
|
12611
|
+
Drag.defaultProps = defaultProps$C;
|
|
12618
12612
|
Drag.displayName = "NutDrag";
|
|
12619
12613
|
const defaultStatus = {
|
|
12620
12614
|
empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
|
|
12621
12615
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
12622
12616
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
12623
12617
|
};
|
|
12624
|
-
const defaultProps$
|
|
12618
|
+
const defaultProps$B = {
|
|
12625
12619
|
...ComponentDefaults,
|
|
12626
12620
|
description: "",
|
|
12627
12621
|
imageSize: "",
|
|
12628
12622
|
status: "empty"
|
|
12629
12623
|
};
|
|
12630
|
-
const classPrefix$
|
|
12624
|
+
const classPrefix$d = `nut-empty`;
|
|
12631
12625
|
const Empty = (props) => {
|
|
12632
12626
|
const { locale } = useConfig$1();
|
|
12633
|
-
defaultProps$
|
|
12627
|
+
defaultProps$B.description = locale.noData || defaultProps$B.description;
|
|
12634
12628
|
const {
|
|
12635
12629
|
image,
|
|
12636
12630
|
imageSize,
|
|
@@ -12640,7 +12634,7 @@ const Empty = (props) => {
|
|
|
12640
12634
|
status,
|
|
12641
12635
|
...rest
|
|
12642
12636
|
} = {
|
|
12643
|
-
...defaultProps$
|
|
12637
|
+
...defaultProps$B,
|
|
12644
12638
|
...props
|
|
12645
12639
|
};
|
|
12646
12640
|
const [imgStyle, setImgStyle] = useState({});
|
|
@@ -12663,41 +12657,35 @@ const Empty = (props) => {
|
|
|
12663
12657
|
};
|
|
12664
12658
|
});
|
|
12665
12659
|
}, [imageSize]);
|
|
12666
|
-
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
12660
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$d} ${className}`, ...rest }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$d}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$d}__description` }, description) : description, children));
|
|
12667
12661
|
};
|
|
12668
|
-
Empty.defaultProps = defaultProps$
|
|
12662
|
+
Empty.defaultProps = defaultProps$B;
|
|
12669
12663
|
Empty.displayName = "NutEmpty";
|
|
12670
|
-
const defaultProps$
|
|
12664
|
+
const defaultProps$A = {
|
|
12671
12665
|
...ComponentDefaults,
|
|
12672
12666
|
hasMore: true,
|
|
12673
|
-
|
|
12674
|
-
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
|
|
12679
|
-
loadingText: "加载中···",
|
|
12680
|
-
loadMoreText: "哎呀,这里是底部了啦"
|
|
12681
|
-
};
|
|
12682
|
-
const Infiniteloading = (props) => {
|
|
12667
|
+
threshold: 40,
|
|
12668
|
+
target: "",
|
|
12669
|
+
pullRefresh: false
|
|
12670
|
+
};
|
|
12671
|
+
const classPrefix$c = `nut-infiniteloading`;
|
|
12672
|
+
const InfiniteLoading = (props) => {
|
|
12683
12673
|
const { locale } = useConfig$1();
|
|
12684
12674
|
const {
|
|
12685
12675
|
children,
|
|
12686
12676
|
hasMore,
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
pullText,
|
|
12692
|
-
loadIcon,
|
|
12677
|
+
threshold,
|
|
12678
|
+
target,
|
|
12679
|
+
pullRefresh,
|
|
12680
|
+
pullingText,
|
|
12693
12681
|
loadingText,
|
|
12694
12682
|
loadMoreText,
|
|
12695
12683
|
className,
|
|
12696
12684
|
onRefresh,
|
|
12697
12685
|
onLoadMore,
|
|
12698
|
-
|
|
12686
|
+
onScroll
|
|
12699
12687
|
} = {
|
|
12700
|
-
...defaultProps$
|
|
12688
|
+
...defaultProps$A,
|
|
12701
12689
|
...props
|
|
12702
12690
|
};
|
|
12703
12691
|
const [isInfiniting, setIsInfiniting] = useState(false);
|
|
@@ -12710,10 +12698,9 @@ const Infiniteloading = (props) => {
|
|
|
12710
12698
|
const y2 = useRef(0);
|
|
12711
12699
|
const refreshMaxH = useRef(0);
|
|
12712
12700
|
const distance = useRef(0);
|
|
12713
|
-
const
|
|
12714
|
-
const classes = classNames(className, b2());
|
|
12701
|
+
const classes = classNames(className, classPrefix$c);
|
|
12715
12702
|
useEffect(() => {
|
|
12716
|
-
refreshMaxH.current =
|
|
12703
|
+
refreshMaxH.current = threshold;
|
|
12717
12704
|
setTimeout(() => {
|
|
12718
12705
|
getScrollHeight();
|
|
12719
12706
|
}, 200);
|
|
@@ -12731,9 +12718,7 @@ const Infiniteloading = (props) => {
|
|
|
12731
12718
|
};
|
|
12732
12719
|
};
|
|
12733
12720
|
const getParentElement = (el) => {
|
|
12734
|
-
return createSelectorQuery().select(
|
|
12735
|
-
containerId ? `#${containerId} #${el}` : `#${el}`
|
|
12736
|
-
);
|
|
12721
|
+
return createSelectorQuery().select(target ? `#${target} #${el}` : `#${el}`);
|
|
12737
12722
|
};
|
|
12738
12723
|
const infiniteDone = () => {
|
|
12739
12724
|
setIsInfiniting(false);
|
|
@@ -12755,7 +12740,7 @@ const Infiniteloading = (props) => {
|
|
|
12755
12740
|
direction.current = "up";
|
|
12756
12741
|
}
|
|
12757
12742
|
scrollTop.current = e.detail.scrollTop;
|
|
12758
|
-
|
|
12743
|
+
onScroll && onScroll(e.detail.scrollTop);
|
|
12759
12744
|
};
|
|
12760
12745
|
const lower = () => {
|
|
12761
12746
|
if (direction.current == "up" || !hasMore || isInfiniting) {
|
|
@@ -12765,7 +12750,7 @@ const Infiniteloading = (props) => {
|
|
|
12765
12750
|
onLoadMore && onLoadMore(infiniteDone);
|
|
12766
12751
|
};
|
|
12767
12752
|
const touchStart = (event) => {
|
|
12768
|
-
if (scrollTop.current == 0 && !isTouching.current &&
|
|
12753
|
+
if (scrollTop.current == 0 && !isTouching.current && pullRefresh) {
|
|
12769
12754
|
y2.current = event.touches[0].pageY;
|
|
12770
12755
|
isTouching.current = true;
|
|
12771
12756
|
}
|
|
@@ -12807,14 +12792,14 @@ const Infiniteloading = (props) => {
|
|
|
12807
12792
|
onTouchMove: touchMove,
|
|
12808
12793
|
onTouchEnd: touchEnd
|
|
12809
12794
|
},
|
|
12810
|
-
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React.createElement("div", { className: "top-box" },
|
|
12795
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React.createElement("div", { className: "top-box" }, pullingText || locale.infiniteloading.pullRefreshText)),
|
|
12811
12796
|
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-container" }, children),
|
|
12812
|
-
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-bottom" }, isInfiniting ? /* @__PURE__ */ React.createElement("div", { className: "bottom-box" },
|
|
12797
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-bottom" }, isInfiniting ? /* @__PURE__ */ React.createElement("div", { className: "bottom-box" }, loadingText || locale.infiniteloading.loadText) : !hasMore && /* @__PURE__ */ React.createElement("div", { className: "tips" }, loadMoreText || locale.infiniteloading.loadMoreText))
|
|
12813
12798
|
);
|
|
12814
12799
|
};
|
|
12815
|
-
|
|
12816
|
-
|
|
12817
|
-
const defaultProps$
|
|
12800
|
+
InfiniteLoading.defaultProps = defaultProps$A;
|
|
12801
|
+
InfiniteLoading.displayName = "NutInfiniteLoading";
|
|
12802
|
+
const defaultProps$z = {
|
|
12818
12803
|
...ComponentDefaults,
|
|
12819
12804
|
direction: "horizontal",
|
|
12820
12805
|
list: [],
|
|
@@ -12852,7 +12837,7 @@ const NoticeBar = (props) => {
|
|
|
12852
12837
|
onClick,
|
|
12853
12838
|
onClickItem
|
|
12854
12839
|
} = {
|
|
12855
|
-
...defaultProps$
|
|
12840
|
+
...defaultProps$z,
|
|
12856
12841
|
...props
|
|
12857
12842
|
};
|
|
12858
12843
|
const classPrefix2 = "nut-noticebar";
|
|
@@ -13146,7 +13131,7 @@ const NoticeBar = (props) => {
|
|
|
13146
13131
|
"nut-noticebar-page": true,
|
|
13147
13132
|
withicon: closeable,
|
|
13148
13133
|
close: closeable,
|
|
13149
|
-
wrap
|
|
13134
|
+
wrapable: wrap
|
|
13150
13135
|
});
|
|
13151
13136
|
useEffect(() => {
|
|
13152
13137
|
return () => {
|
|
@@ -13214,9 +13199,9 @@ const NoticeBar = (props) => {
|
|
|
13214
13199
|
)
|
|
13215
13200
|
) : null);
|
|
13216
13201
|
};
|
|
13217
|
-
NoticeBar.defaultProps = defaultProps$
|
|
13202
|
+
NoticeBar.defaultProps = defaultProps$z;
|
|
13218
13203
|
NoticeBar.displayName = "NutNoticeBar";
|
|
13219
|
-
const defaultProps$
|
|
13204
|
+
const defaultProps$y = {
|
|
13220
13205
|
...ComponentDefaults,
|
|
13221
13206
|
id: "",
|
|
13222
13207
|
duration: 3e3,
|
|
@@ -13243,7 +13228,7 @@ const Notify = (props) => {
|
|
|
13243
13228
|
onClose,
|
|
13244
13229
|
onClick,
|
|
13245
13230
|
...rest
|
|
13246
|
-
} = { ...defaultProps$
|
|
13231
|
+
} = { ...defaultProps$y, ...props };
|
|
13247
13232
|
let timer;
|
|
13248
13233
|
const [showNotify, SetShow] = useState(false);
|
|
13249
13234
|
useEffect(() => {
|
|
@@ -13307,9 +13292,9 @@ const Notify = (props) => {
|
|
|
13307
13292
|
)
|
|
13308
13293
|
));
|
|
13309
13294
|
};
|
|
13310
|
-
Notify.defaultProps = defaultProps$
|
|
13295
|
+
Notify.defaultProps = defaultProps$y;
|
|
13311
13296
|
Notify.displayName = "NutNotify";
|
|
13312
|
-
const defaultProps$
|
|
13297
|
+
const defaultProps$x = {
|
|
13313
13298
|
...ComponentDefaults,
|
|
13314
13299
|
list: [],
|
|
13315
13300
|
location: "bottom",
|
|
@@ -13362,7 +13347,7 @@ const Popover = (props) => {
|
|
|
13362
13347
|
onSelect,
|
|
13363
13348
|
...reset
|
|
13364
13349
|
} = {
|
|
13365
|
-
...defaultProps$
|
|
13350
|
+
...defaultProps$x,
|
|
13366
13351
|
...props
|
|
13367
13352
|
};
|
|
13368
13353
|
const popoverRef = useRef(null);
|
|
@@ -13568,7 +13553,7 @@ const Popover = (props) => {
|
|
|
13568
13553
|
}
|
|
13569
13554
|
)));
|
|
13570
13555
|
};
|
|
13571
|
-
Popover.defaultProps = defaultProps$
|
|
13556
|
+
Popover.defaultProps = defaultProps$x;
|
|
13572
13557
|
Popover.displayName = "NutPopover";
|
|
13573
13558
|
function bound(position, min, max) {
|
|
13574
13559
|
let ret = position;
|
|
@@ -13593,7 +13578,7 @@ function rubberbandIfOutOfBounds(position, min, max, dimension, constant = 0.15)
|
|
|
13593
13578
|
return position;
|
|
13594
13579
|
}
|
|
13595
13580
|
const sleep = (time) => new Promise((resolve) => setTimeout(resolve, time));
|
|
13596
|
-
const defaultProps$
|
|
13581
|
+
const defaultProps$w = {
|
|
13597
13582
|
...ComponentDefaults,
|
|
13598
13583
|
pullingText: "",
|
|
13599
13584
|
canReleaseText: "",
|
|
@@ -13612,7 +13597,7 @@ const PullToRefresh = (p) => {
|
|
|
13612
13597
|
const { locale } = useConfig$1();
|
|
13613
13598
|
const touch = useTouch();
|
|
13614
13599
|
const props = {
|
|
13615
|
-
...defaultProps$
|
|
13600
|
+
...defaultProps$w,
|
|
13616
13601
|
...p,
|
|
13617
13602
|
...{
|
|
13618
13603
|
pullingText: p.pullingText || locale.pullToRefresh.pullingText,
|
|
@@ -13712,10 +13697,10 @@ const PullToRefresh = (p) => {
|
|
|
13712
13697
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, props.children)
|
|
13713
13698
|
);
|
|
13714
13699
|
};
|
|
13715
|
-
PullToRefresh.defaultProps = defaultProps$
|
|
13700
|
+
PullToRefresh.defaultProps = defaultProps$w;
|
|
13716
13701
|
PullToRefresh.displayName = "NutPullToRefresh";
|
|
13717
13702
|
const AvatarContext = createContext({});
|
|
13718
|
-
const defaultProps$
|
|
13703
|
+
const defaultProps$v = {
|
|
13719
13704
|
...ComponentDefaults,
|
|
13720
13705
|
size: "",
|
|
13721
13706
|
shape: "round",
|
|
@@ -13745,7 +13730,7 @@ const Avatar = (props) => {
|
|
|
13745
13730
|
onError,
|
|
13746
13731
|
...rest
|
|
13747
13732
|
} = {
|
|
13748
|
-
...defaultProps$
|
|
13733
|
+
...defaultProps$v,
|
|
13749
13734
|
...props
|
|
13750
13735
|
};
|
|
13751
13736
|
const [maxSum, setMaxSum] = useState(0);
|
|
@@ -13827,9 +13812,9 @@ const Avatar = (props) => {
|
|
|
13827
13812
|
showMax && /* @__PURE__ */ React.createElement("div", { className: "text" }, ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxContent) ? (_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent : `+ ${avatarIndex - ((_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.max)}`)
|
|
13828
13813
|
));
|
|
13829
13814
|
};
|
|
13830
|
-
Avatar.defaultProps = defaultProps$
|
|
13815
|
+
Avatar.defaultProps = defaultProps$v;
|
|
13831
13816
|
Avatar.displayName = "NutAvatar";
|
|
13832
|
-
const defaultProps$
|
|
13817
|
+
const defaultProps$u = {
|
|
13833
13818
|
...ComponentDefaults,
|
|
13834
13819
|
rows: 1,
|
|
13835
13820
|
animated: false,
|
|
@@ -13852,7 +13837,7 @@ const Skeleton = (props) => {
|
|
|
13852
13837
|
avatarShape,
|
|
13853
13838
|
...rest
|
|
13854
13839
|
} = {
|
|
13855
|
-
...defaultProps$
|
|
13840
|
+
...defaultProps$u,
|
|
13856
13841
|
...props
|
|
13857
13842
|
};
|
|
13858
13843
|
const classPrefix2 = "nut-skeleton";
|
|
@@ -13889,7 +13874,7 @@ const Skeleton = (props) => {
|
|
|
13889
13874
|
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__block`, key: index });
|
|
13890
13875
|
})))));
|
|
13891
13876
|
};
|
|
13892
|
-
Skeleton.defaultProps = defaultProps$
|
|
13877
|
+
Skeleton.defaultProps = defaultProps$u;
|
|
13893
13878
|
Skeleton.displayName = "NutSkeleton";
|
|
13894
13879
|
function preventDefault(event, isStopPropagation) {
|
|
13895
13880
|
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
@@ -13899,7 +13884,7 @@ function preventDefault(event, isStopPropagation) {
|
|
|
13899
13884
|
event.stopPropagation();
|
|
13900
13885
|
}
|
|
13901
13886
|
}
|
|
13902
|
-
const defaultProps$
|
|
13887
|
+
const defaultProps$t = {
|
|
13903
13888
|
name: ""
|
|
13904
13889
|
};
|
|
13905
13890
|
const Swipe = forwardRef((props, instanceRef) => {
|
|
@@ -13918,7 +13903,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
13918
13903
|
};
|
|
13919
13904
|
nextTick(() => getWidth());
|
|
13920
13905
|
});
|
|
13921
|
-
const { children, className, style } = { ...defaultProps$
|
|
13906
|
+
const { children, className, style } = { ...defaultProps$t, ...props };
|
|
13922
13907
|
const root2 = useRef();
|
|
13923
13908
|
const opened = useRef(false);
|
|
13924
13909
|
const lockClick = useRef(false);
|
|
@@ -14074,7 +14059,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
14074
14059
|
/* @__PURE__ */ React.createElement("div", { className: `${swipeBem("wrapper")}`, style: wrapperStyle }, renderActionContent("left"), children, renderActionContent("right"))
|
|
14075
14060
|
);
|
|
14076
14061
|
});
|
|
14077
|
-
Swipe.defaultProps = defaultProps$
|
|
14062
|
+
Swipe.defaultProps = defaultProps$t;
|
|
14078
14063
|
Swipe.displayName = "NutSwipe";
|
|
14079
14064
|
const defaultOverlayProps = {
|
|
14080
14065
|
...ComponentDefaults,
|
|
@@ -14158,7 +14143,7 @@ const Overlay = (props) => {
|
|
|
14158
14143
|
};
|
|
14159
14144
|
Overlay.defaultProps = defaultOverlayProps;
|
|
14160
14145
|
Overlay.displayName = "NutOverlay";
|
|
14161
|
-
const defaultProps$
|
|
14146
|
+
const defaultProps$s = {
|
|
14162
14147
|
...ComponentDefaults,
|
|
14163
14148
|
id: "",
|
|
14164
14149
|
icon: null,
|
|
@@ -14200,7 +14185,7 @@ const Toast = (props) => {
|
|
|
14200
14185
|
style,
|
|
14201
14186
|
onClose,
|
|
14202
14187
|
...rest
|
|
14203
|
-
} = { ...defaultProps$
|
|
14188
|
+
} = { ...defaultProps$s, ...props };
|
|
14204
14189
|
let timer;
|
|
14205
14190
|
const [openState, SetOpenState] = useState(false);
|
|
14206
14191
|
useEffect(() => {
|
|
@@ -14278,9 +14263,9 @@ const Toast = (props) => {
|
|
|
14278
14263
|
))
|
|
14279
14264
|
) : null);
|
|
14280
14265
|
};
|
|
14281
|
-
Toast.defaultProps = defaultProps$
|
|
14266
|
+
Toast.defaultProps = defaultProps$s;
|
|
14282
14267
|
Toast.displayName = "NutToast";
|
|
14283
|
-
const defaultProps$
|
|
14268
|
+
const defaultProps$r = {
|
|
14284
14269
|
...ComponentDefaults,
|
|
14285
14270
|
type: "shake",
|
|
14286
14271
|
action: "initial",
|
|
@@ -14291,7 +14276,7 @@ const defaultProps$s = {
|
|
|
14291
14276
|
const classPrefix$7 = `nut-animate`;
|
|
14292
14277
|
const Animate = (props) => {
|
|
14293
14278
|
const { className, type, action, loop, onClick, children, ...rest } = {
|
|
14294
|
-
...defaultProps$
|
|
14279
|
+
...defaultProps$r,
|
|
14295
14280
|
...props
|
|
14296
14281
|
};
|
|
14297
14282
|
const [clicked, setClicked] = useState(false);
|
|
@@ -14312,9 +14297,9 @@ const Animate = (props) => {
|
|
|
14312
14297
|
};
|
|
14313
14298
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-animate" }, /* @__PURE__ */ React.createElement("div", { className: cls, onClick: handleClick, ...rest }, children));
|
|
14314
14299
|
};
|
|
14315
|
-
Animate.defaultProps = defaultProps$
|
|
14300
|
+
Animate.defaultProps = defaultProps$r;
|
|
14316
14301
|
Animate.displayName = "NutAnimate";
|
|
14317
|
-
const defaultProps$
|
|
14302
|
+
const defaultProps$q = {
|
|
14318
14303
|
...ComponentDefaults,
|
|
14319
14304
|
length: 0,
|
|
14320
14305
|
value: "",
|
|
@@ -14333,7 +14318,7 @@ const CountUp = (props) => {
|
|
|
14333
14318
|
style,
|
|
14334
14319
|
...reset
|
|
14335
14320
|
} = {
|
|
14336
|
-
...defaultProps$
|
|
14321
|
+
...defaultProps$q,
|
|
14337
14322
|
...props
|
|
14338
14323
|
};
|
|
14339
14324
|
const classPrefix2 = "nut-countup";
|
|
@@ -14407,9 +14392,9 @@ const CountUp = (props) => {
|
|
|
14407
14392
|
);
|
|
14408
14393
|
})));
|
|
14409
14394
|
};
|
|
14410
|
-
CountUp.defaultProps = defaultProps$
|
|
14395
|
+
CountUp.defaultProps = defaultProps$q;
|
|
14411
14396
|
CountUp.displayName = "NutCountUp";
|
|
14412
|
-
const defaultProps$
|
|
14397
|
+
const defaultProps$p = {};
|
|
14413
14398
|
class AnimatingNumbers extends Component {
|
|
14414
14399
|
constructor(props) {
|
|
14415
14400
|
super(props);
|
|
@@ -14419,13 +14404,13 @@ class AnimatingNumbers extends Component {
|
|
|
14419
14404
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-animatingnumbers" });
|
|
14420
14405
|
}
|
|
14421
14406
|
}
|
|
14422
|
-
__publicField(AnimatingNumbers, "defaultProps", defaultProps$
|
|
14407
|
+
__publicField(AnimatingNumbers, "defaultProps", defaultProps$p);
|
|
14423
14408
|
__publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
|
|
14424
14409
|
__publicField(AnimatingNumbers, "CountUp", CountUp);
|
|
14425
14410
|
AnimatingNumbers.CountUp = CountUp;
|
|
14426
14411
|
const b = cn("audio");
|
|
14427
14412
|
const warn = console.warn;
|
|
14428
|
-
const defaultProps$
|
|
14413
|
+
const defaultProps$o = {
|
|
14429
14414
|
...ComponentDefaults,
|
|
14430
14415
|
className: "",
|
|
14431
14416
|
url: "",
|
|
@@ -14468,7 +14453,7 @@ const Audio = (props) => {
|
|
|
14468
14453
|
iconFontClassName,
|
|
14469
14454
|
...rest
|
|
14470
14455
|
} = {
|
|
14471
|
-
...defaultProps$
|
|
14456
|
+
...defaultProps$o,
|
|
14472
14457
|
...props
|
|
14473
14458
|
};
|
|
14474
14459
|
const [playing, setPlaying] = useState(false);
|
|
@@ -14625,9 +14610,9 @@ const Audio = (props) => {
|
|
|
14625
14610
|
};
|
|
14626
14611
|
return /* @__PURE__ */ React.createElement("div", { className: `${b()} ${className}`, style, ...rest }, renderAudio());
|
|
14627
14612
|
};
|
|
14628
|
-
Audio.defaultProps = defaultProps$
|
|
14613
|
+
Audio.defaultProps = defaultProps$o;
|
|
14629
14614
|
Audio.displayName = "NutAudio";
|
|
14630
|
-
const defaultProps$
|
|
14615
|
+
const defaultProps$n = {
|
|
14631
14616
|
...ComponentDefaults,
|
|
14632
14617
|
maxContent: "",
|
|
14633
14618
|
max: "",
|
|
@@ -14638,7 +14623,7 @@ const defaultProps$o = {
|
|
|
14638
14623
|
};
|
|
14639
14624
|
const classPrefix$6 = `nut-avatar-group`;
|
|
14640
14625
|
const AvatarGroup = (props) => {
|
|
14641
|
-
const propAvatarGroup = { ...defaultProps$
|
|
14626
|
+
const propAvatarGroup = { ...defaultProps$n, ...props };
|
|
14642
14627
|
const { className, style, children } = propAvatarGroup;
|
|
14643
14628
|
const avatarGroupRef = useRef(null);
|
|
14644
14629
|
const cls = classNames(classPrefix$6, className);
|
|
@@ -14648,9 +14633,9 @@ const AvatarGroup = (props) => {
|
|
|
14648
14633
|
};
|
|
14649
14634
|
return /* @__PURE__ */ React.createElement(AvatarContext.Provider, { value: parentAvatar }, /* @__PURE__ */ React.createElement("div", { className: cls, style, ref: avatarGroupRef }, children));
|
|
14650
14635
|
};
|
|
14651
|
-
AvatarGroup.defaultProps = defaultProps$
|
|
14636
|
+
AvatarGroup.defaultProps = defaultProps$n;
|
|
14652
14637
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
14653
|
-
const defaultProps$
|
|
14638
|
+
const defaultProps$m = {
|
|
14654
14639
|
...ComponentDefaults,
|
|
14655
14640
|
strokeWidth: 5,
|
|
14656
14641
|
radius: 50,
|
|
@@ -14674,7 +14659,7 @@ const CircleProgress = (props) => {
|
|
|
14674
14659
|
strokeLinecap,
|
|
14675
14660
|
...restProps
|
|
14676
14661
|
} = {
|
|
14677
|
-
...defaultProps$
|
|
14662
|
+
...defaultProps$m,
|
|
14678
14663
|
...props
|
|
14679
14664
|
};
|
|
14680
14665
|
const [oldValue, setOldValue] = useState(percent);
|
|
@@ -14760,7 +14745,7 @@ const CircleProgress = (props) => {
|
|
|
14760
14745
|
};
|
|
14761
14746
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style: styles, ...restProps }, /* @__PURE__ */ React.createElement("div", { style: circleStyle() }), /* @__PURE__ */ React.createElement("div", { className: "nut-circleprogress-text" }, children));
|
|
14762
14747
|
};
|
|
14763
|
-
CircleProgress.defaultProps = defaultProps$
|
|
14748
|
+
CircleProgress.defaultProps = defaultProps$m;
|
|
14764
14749
|
CircleProgress.displayName = "NutCircleProgress";
|
|
14765
14750
|
const collapseContext = {
|
|
14766
14751
|
isOpen: (name) => {
|
|
@@ -14772,7 +14757,7 @@ const collapseContext = {
|
|
|
14772
14757
|
rotate: 180
|
|
14773
14758
|
};
|
|
14774
14759
|
const CollapseContext = createContext(collapseContext);
|
|
14775
|
-
const defaultProps$
|
|
14760
|
+
const defaultProps$l = {
|
|
14776
14761
|
...ComponentDefaults,
|
|
14777
14762
|
title: null,
|
|
14778
14763
|
name: "",
|
|
@@ -14794,7 +14779,7 @@ const CollapseItem = (props) => {
|
|
|
14794
14779
|
extra,
|
|
14795
14780
|
...rest
|
|
14796
14781
|
} = {
|
|
14797
|
-
...defaultProps$
|
|
14782
|
+
...defaultProps$l,
|
|
14798
14783
|
...props
|
|
14799
14784
|
};
|
|
14800
14785
|
const classPrefix2 = "nut-collapse-item";
|
|
@@ -14899,9 +14884,9 @@ const CollapseItem = (props) => {
|
|
|
14899
14884
|
)
|
|
14900
14885
|
));
|
|
14901
14886
|
};
|
|
14902
|
-
CollapseItem.defaultProps = defaultProps$
|
|
14887
|
+
CollapseItem.defaultProps = defaultProps$l;
|
|
14903
14888
|
CollapseItem.displayName = "NutCollapseItem";
|
|
14904
|
-
const defaultProps$
|
|
14889
|
+
const defaultProps$k = {
|
|
14905
14890
|
...ComponentDefaults,
|
|
14906
14891
|
defaultActiveName: [],
|
|
14907
14892
|
accordion: false,
|
|
@@ -14920,7 +14905,7 @@ const Collapse = (props) => {
|
|
|
14920
14905
|
rotate,
|
|
14921
14906
|
onChange
|
|
14922
14907
|
} = {
|
|
14923
|
-
...defaultProps$
|
|
14908
|
+
...defaultProps$k,
|
|
14924
14909
|
...props
|
|
14925
14910
|
};
|
|
14926
14911
|
const classPrefix2 = "nut-collapse";
|
|
@@ -14977,10 +14962,10 @@ const Collapse = (props) => {
|
|
|
14977
14962
|
/* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style }, children)
|
|
14978
14963
|
);
|
|
14979
14964
|
};
|
|
14980
|
-
Collapse.defaultProps = defaultProps$
|
|
14965
|
+
Collapse.defaultProps = defaultProps$k;
|
|
14981
14966
|
Collapse.displayName = "NutCollapse";
|
|
14982
14967
|
Collapse.Item = CollapseItem;
|
|
14983
|
-
const defaultProps$
|
|
14968
|
+
const defaultProps$j = {
|
|
14984
14969
|
...ComponentDefaults,
|
|
14985
14970
|
paused: false,
|
|
14986
14971
|
startTime: Date.now(),
|
|
@@ -15012,7 +14997,7 @@ const InternalCountDown = (props, ref) => {
|
|
|
15012
14997
|
onUpdate,
|
|
15013
14998
|
children,
|
|
15014
14999
|
...rest
|
|
15015
|
-
} = { ...defaultProps$
|
|
15000
|
+
} = { ...defaultProps$j, ...props };
|
|
15016
15001
|
const classPrefix2 = "nut-countdown";
|
|
15017
15002
|
const [restTimeStamp, setRestTime] = useState(0);
|
|
15018
15003
|
const stateRef = useRef({
|
|
@@ -15223,9 +15208,9 @@ const InternalCountDown = (props, ref) => {
|
|
|
15223
15208
|
);
|
|
15224
15209
|
};
|
|
15225
15210
|
const CountDown = React.forwardRef(InternalCountDown);
|
|
15226
|
-
CountDown.defaultProps = defaultProps$
|
|
15211
|
+
CountDown.defaultProps = defaultProps$j;
|
|
15227
15212
|
CountDown.displayName = "NutCountDown";
|
|
15228
|
-
const defaultProps$
|
|
15213
|
+
const defaultProps$i = {
|
|
15229
15214
|
...ComponentDefaults,
|
|
15230
15215
|
content: "",
|
|
15231
15216
|
direction: "end",
|
|
@@ -15253,7 +15238,7 @@ const Ellipsis = (props) => {
|
|
|
15253
15238
|
onClick,
|
|
15254
15239
|
onChange,
|
|
15255
15240
|
...rest
|
|
15256
|
-
} = { ...defaultProps$
|
|
15241
|
+
} = { ...defaultProps$i, ...props };
|
|
15257
15242
|
const maxHeight = useRef(0);
|
|
15258
15243
|
const [exceeded, setExceeded] = useState(false);
|
|
15259
15244
|
const [expanded, setExpanded] = useState(false);
|
|
@@ -15537,9 +15522,9 @@ const Ellipsis = (props) => {
|
|
|
15537
15522
|
symbolText()
|
|
15538
15523
|
));
|
|
15539
15524
|
};
|
|
15540
|
-
Ellipsis.defaultProps = defaultProps$
|
|
15525
|
+
Ellipsis.defaultProps = defaultProps$i;
|
|
15541
15526
|
Ellipsis.displayName = "NutEllipsis";
|
|
15542
|
-
const defaultProps$
|
|
15527
|
+
const defaultProps$h = {
|
|
15543
15528
|
total: 3,
|
|
15544
15529
|
current: 0,
|
|
15545
15530
|
direction: "horizontal"
|
|
@@ -15547,7 +15532,7 @@ const defaultProps$i = {
|
|
|
15547
15532
|
const classPrefix$3 = `nut-indicator`;
|
|
15548
15533
|
const Indicator = (props) => {
|
|
15549
15534
|
const { total, current, children, className, direction, ...rest } = {
|
|
15550
|
-
...defaultProps$
|
|
15535
|
+
...defaultProps$h,
|
|
15551
15536
|
...props
|
|
15552
15537
|
};
|
|
15553
15538
|
const classes = classNames({
|
|
@@ -15570,9 +15555,9 @@ const Indicator = (props) => {
|
|
|
15570
15555
|
};
|
|
15571
15556
|
return /* @__PURE__ */ React.createElement("div", { className: classNames(classes, className), ...rest }, renderElement());
|
|
15572
15557
|
};
|
|
15573
|
-
Indicator.defaultProps = defaultProps$
|
|
15558
|
+
Indicator.defaultProps = defaultProps$h;
|
|
15574
15559
|
Indicator.displayName = "NutIndicator";
|
|
15575
|
-
const defaultProps$
|
|
15560
|
+
const defaultProps$g = {
|
|
15576
15561
|
direction: "horizontal",
|
|
15577
15562
|
indicator: false,
|
|
15578
15563
|
autoPlay: false,
|
|
@@ -15594,7 +15579,7 @@ const Swiper = forwardRef((props, ref) => {
|
|
|
15594
15579
|
defaultValue,
|
|
15595
15580
|
...rest
|
|
15596
15581
|
} = {
|
|
15597
|
-
...defaultProps$
|
|
15582
|
+
...defaultProps$g,
|
|
15598
15583
|
...props
|
|
15599
15584
|
};
|
|
15600
15585
|
const [current, setCurrent] = useState(defaultValue);
|
|
@@ -15689,9 +15674,9 @@ const Swiper = forwardRef((props, ref) => {
|
|
|
15689
15674
|
renderIndicator()
|
|
15690
15675
|
);
|
|
15691
15676
|
});
|
|
15692
|
-
Swiper.defaultProps = defaultProps$
|
|
15677
|
+
Swiper.defaultProps = defaultProps$g;
|
|
15693
15678
|
Swiper.displayName = "NutSwiper";
|
|
15694
|
-
const defaultProps$
|
|
15679
|
+
const defaultProps$f = {
|
|
15695
15680
|
itemId: "",
|
|
15696
15681
|
skipHiddenItemLayout: false
|
|
15697
15682
|
};
|
|
@@ -15699,9 +15684,9 @@ const SwiperItem = (props) => {
|
|
|
15699
15684
|
const { children, ...rest } = props;
|
|
15700
15685
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
15701
15686
|
};
|
|
15702
|
-
SwiperItem.defaultProps = defaultProps$
|
|
15687
|
+
SwiperItem.defaultProps = defaultProps$f;
|
|
15703
15688
|
SwiperItem.displayName = "NutSwiperItem";
|
|
15704
|
-
const defaultProps$
|
|
15689
|
+
const defaultProps$e = {
|
|
15705
15690
|
...ComponentDefaults,
|
|
15706
15691
|
images: [],
|
|
15707
15692
|
videos: [],
|
|
@@ -15711,6 +15696,7 @@ const defaultProps$f = {
|
|
|
15711
15696
|
closeOnContentClick: false,
|
|
15712
15697
|
indicator: false,
|
|
15713
15698
|
indicatorColor: "#fff",
|
|
15699
|
+
showMenuByLongpress: false,
|
|
15714
15700
|
onChange: (value) => {
|
|
15715
15701
|
},
|
|
15716
15702
|
onClose: () => {
|
|
@@ -15726,6 +15712,7 @@ const ImagePreview = (props) => {
|
|
|
15726
15712
|
indicator,
|
|
15727
15713
|
autoPlay,
|
|
15728
15714
|
closeOnContentClick,
|
|
15715
|
+
showMenuByLongpress,
|
|
15729
15716
|
onClose
|
|
15730
15717
|
} = props;
|
|
15731
15718
|
const classPrefix2 = "nut-imagepreview";
|
|
@@ -15909,6 +15896,7 @@ const ImagePreview = (props) => {
|
|
|
15909
15896
|
{
|
|
15910
15897
|
src: item.src,
|
|
15911
15898
|
mode: "aspectFit",
|
|
15899
|
+
showMenuByLongpress: true,
|
|
15912
15900
|
style: { width: "100%", height: "100%" }
|
|
15913
15901
|
}
|
|
15914
15902
|
));
|
|
@@ -15919,7 +15907,7 @@ const ImagePreview = (props) => {
|
|
|
15919
15907
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0))
|
|
15920
15908
|
);
|
|
15921
15909
|
};
|
|
15922
|
-
ImagePreview.defaultProps = defaultProps$
|
|
15910
|
+
ImagePreview.defaultProps = defaultProps$e;
|
|
15923
15911
|
ImagePreview.displayName = "NutImagePreview";
|
|
15924
15912
|
const initPositinoCache = (reaItemSize, length = 0) => {
|
|
15925
15913
|
let index = 0;
|
|
@@ -15991,7 +15979,7 @@ const updateItemSize = (positions, items, sizeKey) => {
|
|
|
15991
15979
|
});
|
|
15992
15980
|
};
|
|
15993
15981
|
const clientHeight = getSystemInfoSync().windowHeight - 5 || 667;
|
|
15994
|
-
const defaultProps$
|
|
15982
|
+
const defaultProps$d = {
|
|
15995
15983
|
...ComponentDefaults,
|
|
15996
15984
|
list: [],
|
|
15997
15985
|
containerHeight: clientHeight,
|
|
@@ -16012,7 +16000,7 @@ const VirtualList = (props) => {
|
|
|
16012
16000
|
containerHeight,
|
|
16013
16001
|
...rest
|
|
16014
16002
|
} = {
|
|
16015
|
-
...defaultProps$
|
|
16003
|
+
...defaultProps$d,
|
|
16016
16004
|
...props
|
|
16017
16005
|
};
|
|
16018
16006
|
const [startOffset, setStartOffset] = useState(0);
|
|
@@ -16152,9 +16140,9 @@ const VirtualList = (props) => {
|
|
|
16152
16140
|
)
|
|
16153
16141
|
);
|
|
16154
16142
|
};
|
|
16155
|
-
VirtualList.defaultProps = defaultProps$
|
|
16143
|
+
VirtualList.defaultProps = defaultProps$d;
|
|
16156
16144
|
VirtualList.displayName = "NutVirtualList";
|
|
16157
|
-
const defaultProps$
|
|
16145
|
+
const defaultProps$c = {
|
|
16158
16146
|
...ComponentDefaults,
|
|
16159
16147
|
defaultValue: 1,
|
|
16160
16148
|
mode: "multi",
|
|
@@ -16182,7 +16170,7 @@ const Pagination = (props) => {
|
|
|
16182
16170
|
className,
|
|
16183
16171
|
...rest
|
|
16184
16172
|
} = {
|
|
16185
|
-
...defaultProps$
|
|
16173
|
+
...defaultProps$c,
|
|
16186
16174
|
...props
|
|
16187
16175
|
};
|
|
16188
16176
|
const classPrefix2 = "nut-pagination";
|
|
@@ -16264,9 +16252,9 @@ const Pagination = (props) => {
|
|
|
16264
16252
|
next || locale.pagination.next
|
|
16265
16253
|
));
|
|
16266
16254
|
};
|
|
16267
|
-
Pagination.defaultProps = defaultProps$
|
|
16255
|
+
Pagination.defaultProps = defaultProps$c;
|
|
16268
16256
|
Pagination.displayName = "NutPagination";
|
|
16269
|
-
const defaultProps$
|
|
16257
|
+
const defaultProps$b = {
|
|
16270
16258
|
...ComponentDefaults,
|
|
16271
16259
|
price: 0,
|
|
16272
16260
|
symbol: "¥",
|
|
@@ -16289,7 +16277,7 @@ const Price = (props) => {
|
|
|
16289
16277
|
style,
|
|
16290
16278
|
...rest
|
|
16291
16279
|
} = {
|
|
16292
|
-
...defaultProps$
|
|
16280
|
+
...defaultProps$b,
|
|
16293
16281
|
...props
|
|
16294
16282
|
};
|
|
16295
16283
|
const classPrefix2 = "nut-price";
|
|
@@ -16378,10 +16366,10 @@ const Price = (props) => {
|
|
|
16378
16366
|
symbol && position === "after" ? renderSymbol() : null
|
|
16379
16367
|
);
|
|
16380
16368
|
};
|
|
16381
|
-
Price.defaultProps = defaultProps$
|
|
16369
|
+
Price.defaultProps = defaultProps$b;
|
|
16382
16370
|
Price.displayName = "NutPrice";
|
|
16383
16371
|
const DataContext = createContext({});
|
|
16384
|
-
const defaultProps$
|
|
16372
|
+
const defaultProps$a = {
|
|
16385
16373
|
...ComponentDefaults,
|
|
16386
16374
|
title: "",
|
|
16387
16375
|
description: "",
|
|
@@ -16390,7 +16378,7 @@ const defaultProps$b = {
|
|
|
16390
16378
|
};
|
|
16391
16379
|
const Step = (props) => {
|
|
16392
16380
|
const { children, title, description, value, icon, className, ...restProps } = {
|
|
16393
|
-
...defaultProps$
|
|
16381
|
+
...defaultProps$a,
|
|
16394
16382
|
...props
|
|
16395
16383
|
};
|
|
16396
16384
|
const parent = useContext(DataContext);
|
|
@@ -16424,16 +16412,16 @@ const Step = (props) => {
|
|
|
16424
16412
|
};
|
|
16425
16413
|
return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps, onClick: handleClickStep }, /* @__PURE__ */ React.createElement("div", { className: "nut-step-head" }, /* @__PURE__ */ React.createElement("div", { className: "nut-step-line" }), /* @__PURE__ */ React.createElement("div", { className: renderIconClass() }, icon || !dot && /* @__PURE__ */ React.createElement("span", { className: "nut-step-inner" }, value))), /* @__PURE__ */ React.createElement("div", { className: "nut-step-main" }, /* @__PURE__ */ React.createElement("span", { className: "nut-step-title" }, title), description && /* @__PURE__ */ React.createElement("span", { className: "nut-step-description" }, description)));
|
|
16426
16414
|
};
|
|
16427
|
-
Step.defaultProps = defaultProps$
|
|
16415
|
+
Step.defaultProps = defaultProps$a;
|
|
16428
16416
|
Step.displayName = "NutStep";
|
|
16429
|
-
const defaultProps$
|
|
16417
|
+
const defaultProps$9 = {
|
|
16430
16418
|
...ComponentDefaults,
|
|
16431
16419
|
value: 0,
|
|
16432
16420
|
direction: "horizontal",
|
|
16433
16421
|
dot: false
|
|
16434
16422
|
};
|
|
16435
16423
|
const Steps = (props) => {
|
|
16436
|
-
const propSteps = { ...defaultProps$
|
|
16424
|
+
const propSteps = { ...defaultProps$9, ...props };
|
|
16437
16425
|
const {
|
|
16438
16426
|
children,
|
|
16439
16427
|
value,
|
|
@@ -16464,9 +16452,9 @@ const Steps = (props) => {
|
|
|
16464
16452
|
children
|
|
16465
16453
|
));
|
|
16466
16454
|
};
|
|
16467
|
-
Steps.defaultProps = defaultProps$
|
|
16455
|
+
Steps.defaultProps = defaultProps$9;
|
|
16468
16456
|
Steps.displayName = "NutSteps";
|
|
16469
|
-
const defaultProps$
|
|
16457
|
+
const defaultProps$8 = {
|
|
16470
16458
|
...ComponentDefaults,
|
|
16471
16459
|
columns: [],
|
|
16472
16460
|
data: [],
|
|
@@ -16478,7 +16466,7 @@ const defaultProps$9 = {
|
|
|
16478
16466
|
};
|
|
16479
16467
|
const Table = (props) => {
|
|
16480
16468
|
const { locale } = useConfig$1();
|
|
16481
|
-
defaultProps$
|
|
16469
|
+
defaultProps$8.noData = locale.noData;
|
|
16482
16470
|
const {
|
|
16483
16471
|
children,
|
|
16484
16472
|
className,
|
|
@@ -16494,7 +16482,7 @@ const Table = (props) => {
|
|
|
16494
16482
|
onSort,
|
|
16495
16483
|
...rest
|
|
16496
16484
|
} = {
|
|
16497
|
-
...defaultProps$
|
|
16485
|
+
...defaultProps$8,
|
|
16498
16486
|
...props
|
|
16499
16487
|
};
|
|
16500
16488
|
const [curData, setCurData] = useState(data);
|
|
@@ -16577,19 +16565,18 @@ const Table = (props) => {
|
|
|
16577
16565
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__main__body` }, renderBoyTrs())
|
|
16578
16566
|
), (summary || curData.length === 0) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__summary` }, summary || noData));
|
|
16579
16567
|
};
|
|
16580
|
-
Table.defaultProps = defaultProps$
|
|
16568
|
+
Table.defaultProps = defaultProps$8;
|
|
16581
16569
|
Table.displayName = "NutTable";
|
|
16582
|
-
const defaultProps$
|
|
16570
|
+
const defaultProps$7 = {
|
|
16583
16571
|
...ComponentDefaults,
|
|
16584
16572
|
type: "default",
|
|
16573
|
+
background: "",
|
|
16585
16574
|
color: "",
|
|
16586
|
-
textColor: "",
|
|
16587
16575
|
plain: false,
|
|
16588
16576
|
round: false,
|
|
16589
16577
|
mark: false,
|
|
16590
16578
|
closeable: false,
|
|
16591
16579
|
closeIcon: null,
|
|
16592
|
-
prefixCls: "nut-tag",
|
|
16593
16580
|
onClose: (e) => {
|
|
16594
16581
|
},
|
|
16595
16582
|
onClick: (e) => {
|
|
@@ -16599,86 +16586,70 @@ const Tag = (props) => {
|
|
|
16599
16586
|
const {
|
|
16600
16587
|
className,
|
|
16601
16588
|
style,
|
|
16602
|
-
|
|
16589
|
+
background,
|
|
16603
16590
|
plain,
|
|
16604
16591
|
type,
|
|
16605
16592
|
round,
|
|
16606
|
-
prefixCls: prefixCls2,
|
|
16607
16593
|
children,
|
|
16608
16594
|
mark,
|
|
16609
16595
|
closeable,
|
|
16610
16596
|
closeIcon,
|
|
16611
|
-
|
|
16597
|
+
color,
|
|
16612
16598
|
onClick,
|
|
16613
16599
|
onClose
|
|
16614
16600
|
} = {
|
|
16615
|
-
...defaultProps$
|
|
16601
|
+
...defaultProps$7,
|
|
16616
16602
|
...props
|
|
16617
16603
|
};
|
|
16618
|
-
const [
|
|
16619
|
-
const [
|
|
16620
|
-
|
|
16621
|
-
setBtnName(classes());
|
|
16622
|
-
}, [
|
|
16623
|
-
type,
|
|
16624
|
-
color,
|
|
16625
|
-
textColor,
|
|
16626
|
-
plain,
|
|
16627
|
-
round,
|
|
16628
|
-
mark,
|
|
16629
|
-
closeable,
|
|
16630
|
-
prefixCls2,
|
|
16631
|
-
onClick,
|
|
16632
|
-
onClose,
|
|
16633
|
-
className
|
|
16634
|
-
]);
|
|
16604
|
+
const [tagClass, setTagClass] = useState("");
|
|
16605
|
+
const [visible, setVisible] = useState(true);
|
|
16606
|
+
const classPrefix2 = "nut-tag";
|
|
16635
16607
|
const classes = () => {
|
|
16636
|
-
const prefixCls22 = "nut-tag";
|
|
16637
16608
|
return classNames({
|
|
16638
|
-
[
|
|
16639
|
-
[`${
|
|
16640
|
-
[`${
|
|
16641
|
-
[`${
|
|
16642
|
-
[`${
|
|
16643
|
-
[`${
|
|
16609
|
+
[classPrefix2]: true,
|
|
16610
|
+
[`${classPrefix2}--${type}`]: type,
|
|
16611
|
+
[`${classPrefix2}--plain`]: plain,
|
|
16612
|
+
[`${classPrefix2}--round`]: round,
|
|
16613
|
+
[`${classPrefix2}--mark`]: mark,
|
|
16614
|
+
[`${classPrefix2}--close`]: closeable,
|
|
16644
16615
|
[`${className}`]: className
|
|
16645
16616
|
});
|
|
16646
16617
|
};
|
|
16618
|
+
useEffect(() => {
|
|
16619
|
+
setTagClass(classes());
|
|
16620
|
+
}, [type, background, color, plain, round, mark, closeable, className]);
|
|
16647
16621
|
const handleClick = (e) => {
|
|
16648
|
-
|
|
16649
|
-
props.onClick(e);
|
|
16650
|
-
}
|
|
16622
|
+
onClick && onClick(e);
|
|
16651
16623
|
};
|
|
16652
16624
|
const getStyle = () => {
|
|
16653
16625
|
const style2 = {};
|
|
16654
|
-
if (
|
|
16655
|
-
style2.color = textColor;
|
|
16656
|
-
} else if (color && plain) {
|
|
16626
|
+
if (color) {
|
|
16657
16627
|
style2.color = color;
|
|
16628
|
+
} else if (background && plain) {
|
|
16629
|
+
style2.color = background;
|
|
16658
16630
|
}
|
|
16659
16631
|
if (plain) {
|
|
16660
|
-
style2.
|
|
16661
|
-
|
|
16662
|
-
|
|
16663
|
-
style2.background = color;
|
|
16632
|
+
style2.borderColor = background;
|
|
16633
|
+
} else if (background) {
|
|
16634
|
+
style2.background = background;
|
|
16664
16635
|
}
|
|
16665
16636
|
return style2;
|
|
16666
16637
|
};
|
|
16667
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, closeable ?
|
|
16638
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, closeable ? visible && /* @__PURE__ */ React.createElement(
|
|
16668
16639
|
"div",
|
|
16669
16640
|
{
|
|
16670
|
-
className:
|
|
16641
|
+
className: tagClass,
|
|
16671
16642
|
style: { ...style, ...getStyle() },
|
|
16672
16643
|
onClick: (e) => handleClick(e)
|
|
16673
16644
|
},
|
|
16674
|
-
children && /* @__PURE__ */ React.createElement("span", { className:
|
|
16645
|
+
children && /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}-text` }, children),
|
|
16675
16646
|
React.isValidElement(closeIcon) ? /* @__PURE__ */ React.createElement(
|
|
16676
16647
|
"i",
|
|
16677
16648
|
{
|
|
16678
|
-
className:
|
|
16649
|
+
className: `${classPrefix2}-custom-icon`,
|
|
16679
16650
|
onClick: (e) => {
|
|
16680
|
-
|
|
16681
|
-
|
|
16651
|
+
setVisible(false);
|
|
16652
|
+
onClose && onClose(e);
|
|
16682
16653
|
}
|
|
16683
16654
|
},
|
|
16684
16655
|
closeIcon
|
|
@@ -16687,24 +16658,24 @@ const Tag = (props) => {
|
|
|
16687
16658
|
{
|
|
16688
16659
|
size: 12,
|
|
16689
16660
|
onClick: (e) => {
|
|
16690
|
-
|
|
16691
|
-
|
|
16661
|
+
setVisible(false);
|
|
16662
|
+
onClose && onClose(e);
|
|
16692
16663
|
}
|
|
16693
16664
|
}
|
|
16694
16665
|
)
|
|
16695
16666
|
) : /* @__PURE__ */ React.createElement(
|
|
16696
16667
|
"div",
|
|
16697
16668
|
{
|
|
16698
|
-
className:
|
|
16669
|
+
className: tagClass,
|
|
16699
16670
|
style: { ...style, ...getStyle() },
|
|
16700
16671
|
onClick: (e) => handleClick(e)
|
|
16701
16672
|
},
|
|
16702
|
-
children && /* @__PURE__ */ React.createElement("span", { className:
|
|
16673
|
+
children && /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}-text` }, children)
|
|
16703
16674
|
));
|
|
16704
16675
|
};
|
|
16705
|
-
Tag.defaultProps = defaultProps$
|
|
16676
|
+
Tag.defaultProps = defaultProps$7;
|
|
16706
16677
|
Tag.displayName = "NutTag";
|
|
16707
|
-
const defaultProps$
|
|
16678
|
+
const defaultProps$6 = {
|
|
16708
16679
|
...ComponentDefaults,
|
|
16709
16680
|
source: {
|
|
16710
16681
|
type: {},
|
|
@@ -16732,7 +16703,7 @@ const Video = (props) => {
|
|
|
16732
16703
|
onPlayEnd,
|
|
16733
16704
|
...restProps
|
|
16734
16705
|
} = {
|
|
16735
|
-
...defaultProps$
|
|
16706
|
+
...defaultProps$6,
|
|
16736
16707
|
...props
|
|
16737
16708
|
};
|
|
16738
16709
|
const classes = classNames(className, classPrefix$1);
|
|
@@ -16752,9 +16723,9 @@ const Video = (props) => {
|
|
|
16752
16723
|
}
|
|
16753
16724
|
));
|
|
16754
16725
|
};
|
|
16755
|
-
Video.defaultProps = defaultProps$
|
|
16726
|
+
Video.defaultProps = defaultProps$6;
|
|
16756
16727
|
Video.displayName = "NutVideo";
|
|
16757
|
-
const defaultProps$
|
|
16728
|
+
const defaultProps$5 = {
|
|
16758
16729
|
...ComponentDefaults,
|
|
16759
16730
|
list: [],
|
|
16760
16731
|
interval: 500,
|
|
@@ -16775,7 +16746,7 @@ const InternalBarrage = (props, ref) => {
|
|
|
16775
16746
|
gapY,
|
|
16776
16747
|
...restProps
|
|
16777
16748
|
} = {
|
|
16778
|
-
...defaultProps$
|
|
16749
|
+
...defaultProps$5,
|
|
16779
16750
|
...props
|
|
16780
16751
|
};
|
|
16781
16752
|
const [styleList, setStyleList] = useState([]);
|
|
@@ -16848,250 +16819,243 @@ const InternalBarrage = (props, ref) => {
|
|
|
16848
16819
|
})));
|
|
16849
16820
|
};
|
|
16850
16821
|
const Barrage = React.forwardRef(InternalBarrage);
|
|
16851
|
-
Barrage.defaultProps = defaultProps$
|
|
16822
|
+
Barrage.defaultProps = defaultProps$5;
|
|
16852
16823
|
Barrage.displayName = "NutBarrage";
|
|
16853
|
-
const defaultProps$
|
|
16824
|
+
const defaultProps$4 = {
|
|
16825
|
+
...ComponentDefaults,
|
|
16826
|
+
src: "",
|
|
16827
|
+
title: "",
|
|
16828
|
+
price: "",
|
|
16829
|
+
vipPrice: "",
|
|
16830
|
+
shopDescription: "",
|
|
16831
|
+
delivery: "",
|
|
16832
|
+
shopName: "",
|
|
16833
|
+
description: "",
|
|
16834
|
+
tag: "",
|
|
16835
|
+
priceTag: "",
|
|
16836
|
+
extra: ""
|
|
16837
|
+
};
|
|
16854
16838
|
const Card = (props) => {
|
|
16855
16839
|
const {
|
|
16856
16840
|
className,
|
|
16857
16841
|
style,
|
|
16858
|
-
|
|
16842
|
+
src,
|
|
16859
16843
|
title,
|
|
16860
16844
|
price,
|
|
16861
16845
|
vipPrice,
|
|
16862
|
-
|
|
16846
|
+
shopDescription,
|
|
16863
16847
|
delivery,
|
|
16864
16848
|
shopName,
|
|
16865
|
-
|
|
16866
|
-
|
|
16867
|
-
|
|
16868
|
-
|
|
16849
|
+
tag,
|
|
16850
|
+
priceTag,
|
|
16851
|
+
description,
|
|
16852
|
+
extra,
|
|
16869
16853
|
...rest
|
|
16870
16854
|
} = {
|
|
16871
|
-
...defaultProps$
|
|
16855
|
+
...defaultProps$4,
|
|
16872
16856
|
...props
|
|
16873
16857
|
};
|
|
16874
|
-
const
|
|
16875
|
-
return /* @__PURE__ */ React.createElement("div", { className: classNames(
|
|
16858
|
+
const classPrefix2 = "nut-card";
|
|
16859
|
+
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style, ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__left` }, /* @__PURE__ */ React.createElement("img", { src, alt: "" })), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__right` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__right-title` }, title), description, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-price` }, /* @__PURE__ */ React.createElement(Price, { size: "normal", price }), priceTag || /* @__PURE__ */ React.createElement(
|
|
16860
|
+
Price,
|
|
16861
|
+
{
|
|
16862
|
+
size: "normal",
|
|
16863
|
+
className: `${classPrefix2}right-price-origin`,
|
|
16864
|
+
price: vipPrice
|
|
16865
|
+
}
|
|
16866
|
+
)), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-other` }, tag || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Tag, { type: "danger" }, shopDescription), /* @__PURE__ */ React.createElement(Tag, { plain: true }, delivery))), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-shop` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}right-shop-name` }, shopName), extra)));
|
|
16876
16867
|
};
|
|
16877
|
-
Card.defaultProps = defaultProps$
|
|
16868
|
+
Card.defaultProps = defaultProps$4;
|
|
16878
16869
|
Card.displayName = "NutCard";
|
|
16879
|
-
const defaultProps$
|
|
16880
|
-
|
|
16881
|
-
|
|
16882
|
-
|
|
16883
|
-
|
|
16884
|
-
|
|
16870
|
+
const defaultProps$3 = {
|
|
16871
|
+
...ComponentDefaults,
|
|
16872
|
+
activeDate: "",
|
|
16873
|
+
activeTime: [],
|
|
16874
|
+
options: [],
|
|
16875
|
+
optionKey: {
|
|
16876
|
+
valueKey: "value",
|
|
16877
|
+
textKey: "text",
|
|
16878
|
+
childrenKey: "children"
|
|
16879
|
+
},
|
|
16880
|
+
onSelect: () => {
|
|
16881
|
+
}
|
|
16885
16882
|
};
|
|
16886
16883
|
const TimeDetail = (props) => {
|
|
16887
|
-
|
|
16888
|
-
|
|
16889
|
-
...defaultProps$4,
|
|
16884
|
+
const { options, optionKey, className, activeDate, activeTime, onSelect } = {
|
|
16885
|
+
...defaultProps$3,
|
|
16890
16886
|
...props
|
|
16891
16887
|
};
|
|
16892
|
-
const
|
|
16893
|
-
const
|
|
16894
|
-
|
|
16895
|
-
|
|
16896
|
-
|
|
16897
|
-
|
|
16898
|
-
|
|
16899
|
-
|
|
16900
|
-
|
|
16901
|
-
|
|
16902
|
-
|
|
16903
|
-
|
|
16904
|
-
|
|
16905
|
-
|
|
16906
|
-
|
|
16907
|
-
|
|
16908
|
-
|
|
16909
|
-
|
|
16910
|
-
|
|
16911
|
-
|
|
16912
|
-
|
|
16913
|
-
|
|
16914
|
-
|
|
16888
|
+
const classPrefix2 = "nut-timedetail";
|
|
16889
|
+
const timeList = useMemo(() => {
|
|
16890
|
+
return (options == null ? void 0 : options.find(
|
|
16891
|
+
(item) => item[optionKey.valueKey] === activeDate
|
|
16892
|
+
)) || {
|
|
16893
|
+
[optionKey.childrenKey]: []
|
|
16894
|
+
};
|
|
16895
|
+
}, [options, optionKey, activeDate]);
|
|
16896
|
+
const isActive = useCallback(
|
|
16897
|
+
(timeKey) => {
|
|
16898
|
+
const date = activeTime.find((item) => {
|
|
16899
|
+
return item[optionKey.valueKey] === activeDate;
|
|
16900
|
+
});
|
|
16901
|
+
if (date == null ? void 0 : date[optionKey.childrenKey]) {
|
|
16902
|
+
const time = date == null ? void 0 : date[optionKey.childrenKey].find((time2) => {
|
|
16903
|
+
return time2[optionKey.valueKey] === timeKey;
|
|
16904
|
+
});
|
|
16905
|
+
return time;
|
|
16906
|
+
}
|
|
16907
|
+
return false;
|
|
16908
|
+
},
|
|
16909
|
+
[activeTime, optionKey, activeDate]
|
|
16910
|
+
);
|
|
16911
|
+
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className) }, timeList[optionKey.childrenKey].map((item) => /* @__PURE__ */ React.createElement(
|
|
16915
16912
|
"span",
|
|
16916
16913
|
{
|
|
16917
|
-
className:
|
|
16918
|
-
|
|
16919
|
-
|
|
16914
|
+
className: classNames(`${classPrefix2}__item`, {
|
|
16915
|
+
active: isActive(item[optionKey.valueKey])
|
|
16916
|
+
}),
|
|
16917
|
+
key: item[optionKey.valueKey],
|
|
16918
|
+
onClick: () => onSelect(item)
|
|
16920
16919
|
},
|
|
16921
|
-
item
|
|
16920
|
+
item[optionKey.textKey]
|
|
16922
16921
|
)));
|
|
16923
16922
|
};
|
|
16924
|
-
TimeDetail.defaultProps = defaultProps$
|
|
16923
|
+
TimeDetail.defaultProps = defaultProps$3;
|
|
16925
16924
|
TimeDetail.displayName = "NutTimeDetail";
|
|
16926
|
-
const defaultProps$3 = {
|
|
16927
|
-
className: "",
|
|
16928
|
-
date: "",
|
|
16929
|
-
curKey: 0
|
|
16930
|
-
};
|
|
16931
|
-
const TimePannel = (props) => {
|
|
16932
|
-
useConfig$1();
|
|
16933
|
-
const { children, className, date, curKey, change } = {
|
|
16934
|
-
...defaultProps$3,
|
|
16935
|
-
...props
|
|
16936
|
-
};
|
|
16937
|
-
const b2 = cn("timepannel");
|
|
16938
|
-
return /* @__PURE__ */ React.createElement("div", { className: `${b2()} ${className || ""}`, onClick: () => change(curKey) }, date);
|
|
16939
|
-
};
|
|
16940
|
-
TimePannel.defaultProps = defaultProps$3;
|
|
16941
|
-
TimePannel.displayName = "NutTimePannel";
|
|
16942
16925
|
const defaultProps$2 = {
|
|
16943
|
-
|
|
16944
|
-
style: {},
|
|
16926
|
+
...ComponentDefaults,
|
|
16945
16927
|
visible: false,
|
|
16946
|
-
height: "20%",
|
|
16947
16928
|
multiple: false,
|
|
16948
|
-
|
|
16949
|
-
|
|
16950
|
-
|
|
16951
|
-
|
|
16952
|
-
|
|
16929
|
+
defaultValue: [],
|
|
16930
|
+
options: [],
|
|
16931
|
+
optionKey: {
|
|
16932
|
+
valueKey: "value",
|
|
16933
|
+
textKey: "text",
|
|
16934
|
+
childrenKey: "children"
|
|
16935
|
+
}
|
|
16953
16936
|
};
|
|
16954
16937
|
const TimeSelect = (props) => {
|
|
16955
|
-
useConfig$1();
|
|
16938
|
+
const { locale } = useConfig$1();
|
|
16956
16939
|
const {
|
|
16957
16940
|
visible,
|
|
16958
16941
|
className,
|
|
16959
|
-
|
|
16942
|
+
style,
|
|
16960
16943
|
title,
|
|
16961
|
-
|
|
16962
|
-
|
|
16963
|
-
|
|
16964
|
-
times,
|
|
16944
|
+
defaultValue,
|
|
16945
|
+
options,
|
|
16946
|
+
optionKey,
|
|
16965
16947
|
multiple,
|
|
16966
|
-
select,
|
|
16967
|
-
pannelChange,
|
|
16968
|
-
timeChange,
|
|
16969
16948
|
onSelect,
|
|
16970
|
-
|
|
16971
|
-
onTimeChange
|
|
16949
|
+
onDateChange,
|
|
16950
|
+
onTimeChange,
|
|
16951
|
+
...rest
|
|
16972
16952
|
} = {
|
|
16973
16953
|
...defaultProps$2,
|
|
16974
16954
|
...props
|
|
16975
16955
|
};
|
|
16976
|
-
const [
|
|
16956
|
+
const [activeDate, setActiveDate] = useState(() => {
|
|
16957
|
+
if (defaultValue == null ? void 0 : defaultValue.length) {
|
|
16958
|
+
return defaultValue[0][optionKey.valueKey];
|
|
16959
|
+
}
|
|
16960
|
+
if (options == null ? void 0 : options.length) {
|
|
16961
|
+
return options[0][optionKey.valueKey];
|
|
16962
|
+
}
|
|
16963
|
+
return "";
|
|
16964
|
+
});
|
|
16977
16965
|
const [activeTime, setActiveTime] = useState(
|
|
16978
|
-
|
|
16979
|
-
{
|
|
16980
|
-
key: currentKey,
|
|
16981
|
-
list: []
|
|
16982
|
-
}
|
|
16983
|
-
]
|
|
16966
|
+
() => defaultValue || []
|
|
16984
16967
|
);
|
|
16985
|
-
const
|
|
16986
|
-
const popStyle = {
|
|
16987
|
-
width: "100%",
|
|
16988
|
-
height
|
|
16989
|
-
};
|
|
16990
|
-
const b2 = cn("timeselect");
|
|
16968
|
+
const classPrefix2 = "nut-timeselect";
|
|
16991
16969
|
const closeFun = () => {
|
|
16992
|
-
|
|
16993
|
-
|
|
16994
|
-
|
|
16995
|
-
|
|
16996
|
-
|
|
16997
|
-
|
|
16998
|
-
|
|
16999
|
-
|
|
17000
|
-
|
|
17001
|
-
|
|
17002
|
-
|
|
17003
|
-
|
|
17004
|
-
|
|
17005
|
-
|
|
17006
|
-
|
|
17007
|
-
|
|
17008
|
-
|
|
17009
|
-
|
|
17010
|
-
);
|
|
17011
|
-
if (curTimeIndex === -1) {
|
|
17012
|
-
curTimeData.list.push(time);
|
|
17013
|
-
} else {
|
|
17014
|
-
curTimeData.list.splice(curTimeIndex, 1);
|
|
17015
|
-
}
|
|
17016
|
-
const resultTimeData = [...activeTime];
|
|
17017
|
-
resultTimeData.splice(curIndex, 1, curTimeData);
|
|
17018
|
-
setActiveTime(resultTimeData);
|
|
17019
|
-
if (onTimeChange) {
|
|
17020
|
-
onTimeChange(time, resultTimeData);
|
|
17021
|
-
} else if (timeChange) {
|
|
17022
|
-
timeChange(time, resultTimeData);
|
|
17023
|
-
}
|
|
17024
|
-
};
|
|
17025
|
-
const handleChange = (pannelKey) => {
|
|
17026
|
-
const resultTimeData = [...activeTime];
|
|
17027
|
-
if (String(pannelKey) !== String(activeKey)) {
|
|
17028
|
-
setActiveKey == null ? void 0 : setActiveKey(pannelKey);
|
|
17029
|
-
if (multiple) {
|
|
17030
|
-
const curTimeDataIndex = activeTime.findIndex(
|
|
17031
|
-
(item) => String(item.key) === String(pannelKey)
|
|
17032
|
-
);
|
|
17033
|
-
if (curTimeDataIndex === -1) {
|
|
17034
|
-
resultTimeData.push({
|
|
17035
|
-
key: pannelKey,
|
|
17036
|
-
list: []
|
|
17037
|
-
});
|
|
17038
|
-
setActiveTime(resultTimeData);
|
|
16970
|
+
onSelect && onSelect(activeTime);
|
|
16971
|
+
};
|
|
16972
|
+
const handleSelectTime = (selectTime) => {
|
|
16973
|
+
let newActiveTime = [...activeTime];
|
|
16974
|
+
const date = newActiveTime.find((item) => {
|
|
16975
|
+
return item[optionKey.valueKey] === activeDate;
|
|
16976
|
+
});
|
|
16977
|
+
if (date) {
|
|
16978
|
+
const timeIndex = date[optionKey.childrenKey].findIndex(
|
|
16979
|
+
(time) => {
|
|
16980
|
+
return time[optionKey.valueKey] === selectTime[optionKey.valueKey];
|
|
16981
|
+
}
|
|
16982
|
+
);
|
|
16983
|
+
if (timeIndex > -1) {
|
|
16984
|
+
if (multiple) {
|
|
16985
|
+
date[optionKey.childrenKey].splice(timeIndex, 1);
|
|
16986
|
+
} else {
|
|
16987
|
+
newActiveTime = [];
|
|
17039
16988
|
}
|
|
16989
|
+
} else if (multiple) {
|
|
16990
|
+
date[optionKey.childrenKey].push({ ...selectTime });
|
|
17040
16991
|
} else {
|
|
17041
|
-
|
|
16992
|
+
newActiveTime = [
|
|
17042
16993
|
{
|
|
17043
|
-
|
|
17044
|
-
|
|
16994
|
+
[optionKey.valueKey]: activeDate,
|
|
16995
|
+
[optionKey.childrenKey]: [{ ...selectTime }]
|
|
17045
16996
|
}
|
|
17046
|
-
]
|
|
16997
|
+
];
|
|
17047
16998
|
}
|
|
16999
|
+
} else if (multiple) {
|
|
17000
|
+
newActiveTime.push({
|
|
17001
|
+
[optionKey.valueKey]: activeDate,
|
|
17002
|
+
[optionKey.childrenKey]: [{ ...selectTime }]
|
|
17003
|
+
});
|
|
17004
|
+
} else {
|
|
17005
|
+
newActiveTime = [
|
|
17006
|
+
{
|
|
17007
|
+
[optionKey.valueKey]: activeDate,
|
|
17008
|
+
[optionKey.childrenKey]: [{ ...selectTime }]
|
|
17009
|
+
}
|
|
17010
|
+
];
|
|
17048
17011
|
}
|
|
17049
|
-
|
|
17050
|
-
|
|
17051
|
-
|
|
17052
|
-
|
|
17053
|
-
|
|
17012
|
+
newActiveTime = newActiveTime.filter((item) => {
|
|
17013
|
+
var _a;
|
|
17014
|
+
return ((_a = item[optionKey.childrenKey]) == null ? void 0 : _a.length) > 0;
|
|
17015
|
+
});
|
|
17016
|
+
setActiveTime(newActiveTime);
|
|
17017
|
+
onTimeChange && onTimeChange(selectTime, newActiveTime);
|
|
17054
17018
|
};
|
|
17055
|
-
const
|
|
17056
|
-
|
|
17057
|
-
|
|
17058
|
-
}
|
|
17059
|
-
return "";
|
|
17019
|
+
const handleChange = (date) => {
|
|
17020
|
+
setActiveDate(date[optionKey.valueKey]);
|
|
17021
|
+
onDateChange && onDateChange(date, activeTime);
|
|
17060
17022
|
};
|
|
17061
|
-
|
|
17062
|
-
setPopVisible(visible);
|
|
17063
|
-
}, [visible]);
|
|
17064
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
17023
|
+
return /* @__PURE__ */ React.createElement(
|
|
17065
17024
|
Popup,
|
|
17066
17025
|
{
|
|
17067
17026
|
closeable: true,
|
|
17068
17027
|
round: true,
|
|
17069
|
-
visible
|
|
17028
|
+
visible,
|
|
17070
17029
|
position: "bottom",
|
|
17071
|
-
style:
|
|
17072
|
-
|
|
17073
|
-
|
|
17074
|
-
|
|
17030
|
+
style: {
|
|
17031
|
+
width: "100%",
|
|
17032
|
+
height: "20%",
|
|
17033
|
+
...style
|
|
17034
|
+
},
|
|
17035
|
+
onClose: closeFun,
|
|
17036
|
+
...rest
|
|
17075
17037
|
},
|
|
17076
|
-
/* @__PURE__ */ React.createElement("div", { className:
|
|
17077
|
-
|
|
17038
|
+
/* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className) }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__title` }, title || locale.timeselect.pickupTime), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content-left` }, options.map((item) => /* @__PURE__ */ React.createElement(
|
|
17039
|
+
"div",
|
|
17078
17040
|
{
|
|
17079
|
-
|
|
17080
|
-
className:
|
|
17081
|
-
|
|
17082
|
-
|
|
17083
|
-
|
|
17084
|
-
}
|
|
17041
|
+
key: item[optionKey.valueKey],
|
|
17042
|
+
className: classNames("nut-timepannel", {
|
|
17043
|
+
active: item[optionKey.valueKey] === activeDate
|
|
17044
|
+
}),
|
|
17045
|
+
onClick: () => handleChange(item)
|
|
17046
|
+
},
|
|
17047
|
+
item[optionKey.textKey]
|
|
17085
17048
|
))), /* @__PURE__ */ React.createElement(
|
|
17086
17049
|
TimeDetail,
|
|
17087
17050
|
{
|
|
17088
|
-
|
|
17089
|
-
|
|
17090
|
-
|
|
17091
|
-
|
|
17051
|
+
options,
|
|
17052
|
+
optionKey,
|
|
17053
|
+
activeDate,
|
|
17054
|
+
activeTime,
|
|
17055
|
+
onSelect: handleSelectTime
|
|
17092
17056
|
}
|
|
17093
17057
|
)))
|
|
17094
|
-
)
|
|
17058
|
+
);
|
|
17095
17059
|
};
|
|
17096
17060
|
TimeSelect.defaultProps = defaultProps$2;
|
|
17097
17061
|
TimeSelect.displayName = "NutTimeSelect";
|
|
@@ -17348,7 +17312,7 @@ export {
|
|
|
17348
17312
|
Image$1 as Image,
|
|
17349
17313
|
ImagePreview,
|
|
17350
17314
|
Indicator,
|
|
17351
|
-
|
|
17315
|
+
InfiniteLoading,
|
|
17352
17316
|
Input,
|
|
17353
17317
|
InputNumber,
|
|
17354
17318
|
Layout,
|
|
@@ -17393,7 +17357,6 @@ export {
|
|
|
17393
17357
|
Tag,
|
|
17394
17358
|
TextArea,
|
|
17395
17359
|
TimeDetail,
|
|
17396
|
-
TimePannel,
|
|
17397
17360
|
TimeSelect,
|
|
17398
17361
|
Toast,
|
|
17399
17362
|
TrendArrow,
|