@nutui/nutui-react-taro 2.0.10 → 2.0.11
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 +15 -0
- package/dist/esm/Address.js +2 -2
- package/dist/esm/Audio.js +2 -2
- package/dist/esm/Calendar.js +3 -3
- package/dist/esm/CalendarItem.js +2 -2
- 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.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/InfiniteLoading.js +2 -2
- package/dist/esm/Input.js +2 -2
- package/dist/esm/NumberKeyboard.js +2 -2
- package/dist/esm/Pagination.js +2 -2
- package/dist/esm/Picker.js +2 -2
- package/dist/esm/Popover.js +1 -1
- package/dist/esm/PullToRefresh.js +2 -2
- package/dist/esm/SearchBar.js +2 -2
- package/dist/esm/ShortPassword.js +2 -2
- package/dist/esm/Switch.js +1 -1
- package/dist/esm/Tabbar.js +2 -2
- package/dist/esm/TabbarItem.js +1 -1
- package/dist/esm/Table.js +2 -2
- package/dist/esm/TextArea.js +2 -2
- package/dist/esm/TimeSelect.js +2 -2
- package/dist/esm/Tour/style/css.js +1 -0
- package/dist/esm/Tour/style/index.js +2 -0
- package/dist/esm/Tour/style/style.css +1 -0
- package/dist/esm/Tour.js +17 -0
- package/dist/esm/Uploader/style/style.css +1 -1
- package/dist/esm/Uploader.js +2 -2
- package/dist/esm/WaterMark.js +2 -2
- package/dist/esm/{address.taro-477dd6df.js → address.taro-99b90732.js} +1 -1
- package/dist/esm/{audio.taro-8398218d.js → audio.taro-e85bb3b8.js} +1 -1
- package/dist/esm/{calendar.taro-cc40e611.js → calendar.taro-e980d2f0.js} +2 -2
- package/dist/esm/{calendaritem.taro-a18d8bd4.js → calendaritem.taro-9b37d00c.js} +1 -1
- package/dist/esm/{configprovider.taro-974adb9a.js → configprovider.taro-3a23ea84.js} +5 -0
- package/dist/esm/{countdown.taro-43884964.js → countdown.taro-80f2110b.js} +1 -1
- package/dist/esm/{datepicker.taro-8dd27172.js → datepicker.taro-2d333eb7.js} +2 -2
- package/dist/esm/{dialog.taro-0a2dfa58.js → dialog.taro-e9b5bc9d.js} +1 -1
- package/dist/esm/{empty.taro-bfe29449.js → empty.taro-cef66b01.js} +1 -1
- package/dist/esm/{fixednav.taro-579c4f66.js → fixednav.taro-fa851179.js} +1 -1
- package/dist/esm/{grid.taro-1fdfe6eb.js → grid.taro-6f1b764c.js} +1 -1
- package/dist/esm/{griditem.taro-751fb091.js → griditem.taro-0d03a061.js} +1 -1
- package/dist/esm/{infiniteloading.taro-87006d3e.js → infiniteloading.taro-590cfd4f.js} +1 -1
- package/dist/esm/{input.taro-fb8e7a49.js → input.taro-abe6d65e.js} +1 -1
- package/dist/esm/{numberkeyboard.taro-c4fc80ed.js → numberkeyboard.taro-0ee2f055.js} +2 -2
- package/dist/esm/nutui-react.es.js +37 -34
- package/dist/esm/{pagination.taro-afc104ce.js → pagination.taro-c2521fdf.js} +1 -1
- package/dist/esm/{picker.taro-7e4954f3.js → picker.taro-e387b0f3.js} +1 -1
- package/dist/esm/{popover.taro-fbf1ba5e.js → popover.taro-437724d4.js} +35 -3
- package/dist/esm/{pulltorefresh.taro-efb36521.js → pulltorefresh.taro-2b4a48be.js} +1 -1
- package/dist/esm/{searchbar.taro-14821587.js → searchbar.taro-75cf9937.js} +1 -1
- package/dist/esm/{shortpassword.taro-2533954b.js → shortpassword.taro-04749137.js} +1 -1
- package/dist/esm/{switch.taro-bbdada9e.js → switch.taro-9c344336.js} +2 -2
- package/dist/esm/{tabbar.taro-3046d794.js → tabbar.taro-ac4f72b9.js} +1 -1
- package/dist/esm/{tabbaritem.taro-fdaf7d3a.js → tabbaritem.taro-1d27af28.js} +2 -2
- package/dist/esm/{table.taro-0254a4e5.js → table.taro-48e8265e.js} +1 -1
- package/dist/esm/{textarea.taro-38d284c4.js → textarea.taro-115dc986.js} +1 -1
- package/dist/esm/{timeselect.taro-3f2aa90b.js → timeselect.taro-57650920.js} +1 -1
- package/dist/esm/tour.taro-105eadd5.js +184 -0
- package/dist/esm/types/src/locales/base.d.ts +5 -0
- package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +3 -1
- package/dist/esm/types/src/packages/nutui.react.d.ts +5 -1
- package/dist/esm/types/src/packages/nutui.react.scss.d.ts +1 -0
- package/dist/esm/types/src/packages/nutui.react.taro.d.ts +3 -1
- package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +1 -0
- package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +2 -1
- package/dist/esm/types/src/packages/popover/popover.d.ts +1 -0
- package/dist/esm/types/src/packages/popover/popover.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/tour/__test__/tour.spec.d.ts +1 -0
- package/dist/esm/types/src/packages/tour/demo.d.ts +4 -0
- package/dist/esm/types/src/packages/tour/demo.taro.d.ts +4 -0
- package/dist/esm/types/src/packages/tour/index.d.ts +3 -0
- package/dist/esm/types/src/packages/tour/index.taro.d.ts +3 -0
- package/dist/esm/types/src/packages/tour/tour.d.ts +31 -0
- package/dist/esm/types/src/packages/tour/tour.taro.d.ts +31 -0
- package/dist/esm/types/src/utils/typings.d.ts +1 -0
- package/dist/esm/types/src/utils/use-taro-rect.d.ts +1 -0
- package/dist/esm/{uploader.taro-f834c8ff.js → uploader.taro-cdb38c18.js} +4 -3
- package/dist/esm/{watermark.taro-c269110c.js → watermark.taro-cea2fceb.js} +1 -1
- package/dist/locales/base.d.ts +5 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +6 -1
- package/dist/locales/id-ID.js +6 -1
- package/dist/locales/tr-TR.js +6 -1
- package/dist/locales/zh-CN.js +6 -1
- package/dist/locales/zh-TW.js +6 -1
- package/dist/locales/zh-UG.js +6 -1
- package/dist/nutui.react.es.js +628 -378
- package/dist/nutui.react.umd.js +628 -378
- package/dist/packages/tour/tour.scss +78 -0
- package/dist/packages/uploader/uploader.scss +1 -0
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/themes/default.scss +1 -0
- package/dist/styles/variables.scss +33 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/locales/base.d.ts +5 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/popover/popover.taro.d.ts +1 -0
- package/dist/types/packages/tour/index.taro.d.ts +3 -0
- package/dist/types/packages/tour/tour.taro.d.ts +95 -0
- package/dist/types/utils/typings.d.ts +1 -0
- package/dist/types/utils/use-taro-rect.d.ts +1 -0
- package/package.json +1 -1
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.
|
|
8
|
+
* @nutui/nutui-react-taro v2.0.11 Wed Aug 09 2023 13:52:27 GMT+0800 (China Standard Time)
|
|
9
9
|
* (c) 2023 @jdf2e.
|
|
10
10
|
* Released under the MIT License.
|
|
11
11
|
*/
|
|
@@ -1913,7 +1913,7 @@ const ComponentDefaults = {
|
|
|
1913
1913
|
style: {}
|
|
1914
1914
|
};
|
|
1915
1915
|
const prefixCls$1 = "nut-button";
|
|
1916
|
-
const defaultProps$
|
|
1916
|
+
const defaultProps$1u = {
|
|
1917
1917
|
...ComponentDefaults,
|
|
1918
1918
|
color: "",
|
|
1919
1919
|
type: "default",
|
|
@@ -1945,7 +1945,7 @@ const Button = React__default.forwardRef(
|
|
|
1945
1945
|
style,
|
|
1946
1946
|
...rest
|
|
1947
1947
|
} = {
|
|
1948
|
-
...defaultProps$
|
|
1948
|
+
...defaultProps$1u,
|
|
1949
1949
|
...props
|
|
1950
1950
|
};
|
|
1951
1951
|
const getStyle = useCallback(() => {
|
|
@@ -2003,29 +2003,29 @@ const Button = React__default.forwardRef(
|
|
|
2003
2003
|
}
|
|
2004
2004
|
);
|
|
2005
2005
|
Button.displayName = "NutButton";
|
|
2006
|
-
const defaultProps$
|
|
2006
|
+
const defaultProps$1t = {
|
|
2007
2007
|
...ComponentDefaults,
|
|
2008
2008
|
title: "",
|
|
2009
2009
|
description: "",
|
|
2010
2010
|
divider: true
|
|
2011
2011
|
};
|
|
2012
|
-
const classPrefix$
|
|
2012
|
+
const classPrefix$p = "nut-cell-group";
|
|
2013
2013
|
const CellGroup = (props) => {
|
|
2014
2014
|
const { children, className, style, title, description, divider, ...rest } = {
|
|
2015
|
-
...defaultProps$
|
|
2015
|
+
...defaultProps$1t,
|
|
2016
2016
|
...props
|
|
2017
2017
|
};
|
|
2018
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix$
|
|
2018
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix$p, className), ...rest }, title ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$p}__title` }, title) : null, description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$p}__description` }, description) : null, /* @__PURE__ */ React__default.createElement(
|
|
2019
2019
|
"div",
|
|
2020
2020
|
{
|
|
2021
|
-
className: `${classPrefix$
|
|
2021
|
+
className: `${classPrefix$p}__wrap ${divider ? `${classPrefix$p}__wrap--divider` : ""}`
|
|
2022
2022
|
},
|
|
2023
2023
|
children
|
|
2024
2024
|
));
|
|
2025
2025
|
};
|
|
2026
|
-
CellGroup.defaultProps = defaultProps$
|
|
2026
|
+
CellGroup.defaultProps = defaultProps$1t;
|
|
2027
2027
|
CellGroup.displayName = "NutCellGroup";
|
|
2028
|
-
const defaultProps$
|
|
2028
|
+
const defaultProps$1s = {
|
|
2029
2029
|
...ComponentDefaults,
|
|
2030
2030
|
title: null,
|
|
2031
2031
|
description: null,
|
|
@@ -2035,7 +2035,7 @@ const defaultProps$1r = {
|
|
|
2035
2035
|
onClick: (event) => {
|
|
2036
2036
|
}
|
|
2037
2037
|
};
|
|
2038
|
-
const classPrefix$
|
|
2038
|
+
const classPrefix$o = "nut-cell";
|
|
2039
2039
|
const Cell = (props) => {
|
|
2040
2040
|
const {
|
|
2041
2041
|
children,
|
|
@@ -2049,7 +2049,7 @@ const Cell = (props) => {
|
|
|
2049
2049
|
style,
|
|
2050
2050
|
...rest
|
|
2051
2051
|
} = {
|
|
2052
|
-
...defaultProps$
|
|
2052
|
+
...defaultProps$1s,
|
|
2053
2053
|
...props
|
|
2054
2054
|
};
|
|
2055
2055
|
const handleClick = (event) => {
|
|
@@ -2066,22 +2066,22 @@ const Cell = (props) => {
|
|
|
2066
2066
|
return /* @__PURE__ */ React__default.createElement(
|
|
2067
2067
|
"div",
|
|
2068
2068
|
{
|
|
2069
|
-
className: classNames(classPrefix$
|
|
2069
|
+
className: classNames(classPrefix$o, className),
|
|
2070
2070
|
onClick: (event) => handleClick(event),
|
|
2071
2071
|
style: baseStyle,
|
|
2072
2072
|
...rest
|
|
2073
2073
|
},
|
|
2074
|
-
children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, title || description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
2074
|
+
children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, title || description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$o}__left` }, title ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$o}__title` }, title) : null, description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$o}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React__default.createElement(
|
|
2075
2075
|
"div",
|
|
2076
2076
|
{
|
|
2077
|
-
className: `${classPrefix$
|
|
2077
|
+
className: `${classPrefix$o}__extra`,
|
|
2078
2078
|
style: styles
|
|
2079
2079
|
},
|
|
2080
2080
|
extra
|
|
2081
|
-
) : null, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
2081
|
+
) : null, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$o}__divider` }))
|
|
2082
2082
|
);
|
|
2083
2083
|
};
|
|
2084
|
-
Cell.defaultProps = defaultProps$
|
|
2084
|
+
Cell.defaultProps = defaultProps$1s;
|
|
2085
2085
|
Cell.displayName = "NutCell";
|
|
2086
2086
|
Cell.Group = CellGroup;
|
|
2087
2087
|
var INFINITY = 1 / 0;
|
|
@@ -3159,22 +3159,27 @@ const zhCN = {
|
|
|
3159
3159
|
refreshingText: "加载中...",
|
|
3160
3160
|
completeText: "刷新成功"
|
|
3161
3161
|
},
|
|
3162
|
+
tour: {
|
|
3163
|
+
prevStepText: "上一步",
|
|
3164
|
+
completeText: "完成",
|
|
3165
|
+
nextStepText: "下一步"
|
|
3166
|
+
},
|
|
3162
3167
|
watermark: {
|
|
3163
3168
|
errorCanvasTips: "当前环境不支持Canvas"
|
|
3164
3169
|
}
|
|
3165
3170
|
};
|
|
3166
|
-
const classPrefix$
|
|
3167
|
-
const defaultConfigRef = {
|
|
3171
|
+
const classPrefix$n = "nut-configprovider";
|
|
3172
|
+
const defaultConfigRef$1 = {
|
|
3168
3173
|
current: {
|
|
3169
3174
|
locale: zhCN
|
|
3170
3175
|
}
|
|
3171
3176
|
};
|
|
3172
|
-
const getDefaultConfig = () => {
|
|
3173
|
-
return defaultConfigRef.current;
|
|
3177
|
+
const getDefaultConfig$1 = () => {
|
|
3178
|
+
return defaultConfigRef$1.current;
|
|
3174
3179
|
};
|
|
3175
|
-
const ConfigContext = createContext(null);
|
|
3176
|
-
const useConfig = () => {
|
|
3177
|
-
return useContext(ConfigContext) ?? getDefaultConfig();
|
|
3180
|
+
const ConfigContext$1 = createContext(null);
|
|
3181
|
+
const useConfig$1 = () => {
|
|
3182
|
+
return useContext(ConfigContext$1) ?? getDefaultConfig$1();
|
|
3178
3183
|
};
|
|
3179
3184
|
function convertThemeVarsToCSSVars(themeVars) {
|
|
3180
3185
|
const cssVars = {};
|
|
@@ -3188,7 +3193,7 @@ const ConfigProvider = (props) => {
|
|
|
3188
3193
|
const mergedConfig = useMemo(
|
|
3189
3194
|
() => {
|
|
3190
3195
|
return {
|
|
3191
|
-
...getDefaultConfig(),
|
|
3196
|
+
...getDefaultConfig$1(),
|
|
3192
3197
|
...config2
|
|
3193
3198
|
};
|
|
3194
3199
|
},
|
|
@@ -3201,10 +3206,10 @@ const ConfigProvider = (props) => {
|
|
|
3201
3206
|
const cssVarStyle = React__default.useMemo(() => {
|
|
3202
3207
|
return convertThemeVarsToCSSVars(mergedConfig.theme || {});
|
|
3203
3208
|
}, [mergedConfig.theme]);
|
|
3204
|
-
return /* @__PURE__ */ React__default.createElement(ConfigContext.Provider, { value: mergedConfig }, /* @__PURE__ */ React__default.createElement(
|
|
3209
|
+
return /* @__PURE__ */ React__default.createElement(ConfigContext$1.Provider, { value: mergedConfig }, /* @__PURE__ */ React__default.createElement(
|
|
3205
3210
|
"div",
|
|
3206
3211
|
{
|
|
3207
|
-
className: classNames(classPrefix$
|
|
3212
|
+
className: classNames(classPrefix$n, className),
|
|
3208
3213
|
style: {
|
|
3209
3214
|
...cssVarStyle,
|
|
3210
3215
|
...style
|
|
@@ -3214,7 +3219,7 @@ const ConfigProvider = (props) => {
|
|
|
3214
3219
|
));
|
|
3215
3220
|
};
|
|
3216
3221
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
3217
|
-
const defaultProps$
|
|
3222
|
+
const defaultProps$1r = {
|
|
3218
3223
|
src: "",
|
|
3219
3224
|
error: true,
|
|
3220
3225
|
loading: true
|
|
@@ -3233,7 +3238,7 @@ const Image$1 = (props) => {
|
|
|
3233
3238
|
onLoad,
|
|
3234
3239
|
onError,
|
|
3235
3240
|
...rest
|
|
3236
|
-
} = { ...defaultProps$
|
|
3241
|
+
} = { ...defaultProps$1r, ...props };
|
|
3237
3242
|
const [innerLoading, setInnerLoading] = useState(true);
|
|
3238
3243
|
const [isError, setIsError] = useState(false);
|
|
3239
3244
|
const handleLoad = (e) => {
|
|
@@ -3294,7 +3299,7 @@ const Image$1 = (props) => {
|
|
|
3294
3299
|
}
|
|
3295
3300
|
), renderLoading(), renderErrorImg());
|
|
3296
3301
|
};
|
|
3297
|
-
Image$1.defaultProps = defaultProps$
|
|
3302
|
+
Image$1.defaultProps = defaultProps$1r;
|
|
3298
3303
|
Image$1.displayName = "NutImage";
|
|
3299
3304
|
function _extends$1() {
|
|
3300
3305
|
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
@@ -5129,7 +5134,7 @@ const Overlay = (props) => {
|
|
|
5129
5134
|
Overlay.defaultProps = defaultOverlayProps;
|
|
5130
5135
|
Overlay.displayName = "NutOverlay";
|
|
5131
5136
|
const DataContext$1 = createContext({});
|
|
5132
|
-
const defaultProps$
|
|
5137
|
+
const defaultProps$1q = {
|
|
5133
5138
|
...ComponentDefaults,
|
|
5134
5139
|
span: "24",
|
|
5135
5140
|
offset: "0",
|
|
@@ -5137,7 +5142,7 @@ const defaultProps$1p = {
|
|
|
5137
5142
|
};
|
|
5138
5143
|
const Col = (props) => {
|
|
5139
5144
|
const { className, style, span, offset, children, onClick } = {
|
|
5140
|
-
...defaultProps$
|
|
5145
|
+
...defaultProps$1q,
|
|
5141
5146
|
...props
|
|
5142
5147
|
};
|
|
5143
5148
|
const [colName, setColName] = useState("");
|
|
@@ -5169,32 +5174,32 @@ const Col = (props) => {
|
|
|
5169
5174
|
children
|
|
5170
5175
|
);
|
|
5171
5176
|
};
|
|
5172
|
-
Col.defaultProps = defaultProps$
|
|
5177
|
+
Col.defaultProps = defaultProps$1q;
|
|
5173
5178
|
Col.displayName = "NutCol";
|
|
5174
|
-
const defaultProps$
|
|
5179
|
+
const defaultProps$1p = {
|
|
5175
5180
|
...ComponentDefaults,
|
|
5176
5181
|
contentPosition: "center",
|
|
5177
5182
|
direction: "horizontal"
|
|
5178
5183
|
};
|
|
5179
|
-
const classPrefix$
|
|
5184
|
+
const classPrefix$m = `nut-divider`;
|
|
5180
5185
|
const Divider = (props) => {
|
|
5181
5186
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
5182
|
-
...defaultProps$
|
|
5187
|
+
...defaultProps$1p,
|
|
5183
5188
|
...props
|
|
5184
5189
|
};
|
|
5185
5190
|
const classes = direction === "horizontal" ? classNames({
|
|
5186
|
-
[`${classPrefix$
|
|
5187
|
-
[`${classPrefix$
|
|
5188
|
-
[`${classPrefix$
|
|
5189
|
-
[`${classPrefix$
|
|
5190
|
-
[`${classPrefix$
|
|
5191
|
+
[`${classPrefix$m}`]: true,
|
|
5192
|
+
[`${classPrefix$m}__center`]: children,
|
|
5193
|
+
[`${classPrefix$m}__left`]: contentPosition === "left",
|
|
5194
|
+
[`${classPrefix$m}__right`]: contentPosition === "right",
|
|
5195
|
+
[`${classPrefix$m}__hairline`]: true
|
|
5191
5196
|
}) : classNames({
|
|
5192
|
-
[`${classPrefix$
|
|
5193
|
-
[`${classPrefix$
|
|
5197
|
+
[`${classPrefix$m}`]: true,
|
|
5198
|
+
[`${classPrefix$m}__vertical`]: direction === "vertical"
|
|
5194
5199
|
});
|
|
5195
5200
|
return /* @__PURE__ */ React__default.createElement("div", { className: `${classes} ${className || ""}`, style, ...rest }, children);
|
|
5196
5201
|
};
|
|
5197
|
-
Divider.defaultProps = defaultProps$
|
|
5202
|
+
Divider.defaultProps = defaultProps$1p;
|
|
5198
5203
|
Divider.displayName = "NutDivider";
|
|
5199
5204
|
const gridContext = {
|
|
5200
5205
|
onClick: (item, index) => {
|
|
@@ -5204,7 +5209,7 @@ const GridContext = React__default.createContext(gridContext);
|
|
|
5204
5209
|
const pxCheck = (value) => {
|
|
5205
5210
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
5206
5211
|
};
|
|
5207
|
-
const defaultProps$
|
|
5212
|
+
const defaultProps$1o = {
|
|
5208
5213
|
text: "",
|
|
5209
5214
|
columns: 4,
|
|
5210
5215
|
gap: 0,
|
|
@@ -5214,7 +5219,7 @@ const defaultProps$1n = {
|
|
|
5214
5219
|
direction: "vertical"
|
|
5215
5220
|
};
|
|
5216
5221
|
const GridItem = (props) => {
|
|
5217
|
-
useConfig();
|
|
5222
|
+
useConfig$1();
|
|
5218
5223
|
const {
|
|
5219
5224
|
children,
|
|
5220
5225
|
style,
|
|
@@ -5230,7 +5235,7 @@ const GridItem = (props) => {
|
|
|
5230
5235
|
onClick,
|
|
5231
5236
|
...rest
|
|
5232
5237
|
} = {
|
|
5233
|
-
...defaultProps$
|
|
5238
|
+
...defaultProps$1o,
|
|
5234
5239
|
...props
|
|
5235
5240
|
};
|
|
5236
5241
|
const classPrefix2 = "nut-grid-item";
|
|
@@ -5288,9 +5293,9 @@ const GridItem = (props) => {
|
|
|
5288
5293
|
/* @__PURE__ */ React__default.createElement("div", { className: contentClass() }, children && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children), text && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__text` }, text))
|
|
5289
5294
|
);
|
|
5290
5295
|
};
|
|
5291
|
-
GridItem.defaultProps = defaultProps$
|
|
5296
|
+
GridItem.defaultProps = defaultProps$1o;
|
|
5292
5297
|
GridItem.displayName = "NutGridItem";
|
|
5293
|
-
const defaultProps$
|
|
5298
|
+
const defaultProps$1n = {
|
|
5294
5299
|
columns: 4,
|
|
5295
5300
|
gap: 0,
|
|
5296
5301
|
center: true,
|
|
@@ -5311,7 +5316,7 @@ const Grid = (props) => {
|
|
|
5311
5316
|
className,
|
|
5312
5317
|
onClick,
|
|
5313
5318
|
...rest
|
|
5314
|
-
} = { ...defaultProps$
|
|
5319
|
+
} = { ...defaultProps$1n, ...props };
|
|
5315
5320
|
const childrenDom = React__default.Children.toArray(children);
|
|
5316
5321
|
const classPrefix2 = "nut-grid";
|
|
5317
5322
|
const rootClass = () => {
|
|
@@ -5341,18 +5346,18 @@ const Grid = (props) => {
|
|
|
5341
5346
|
});
|
|
5342
5347
|
})));
|
|
5343
5348
|
};
|
|
5344
|
-
Grid.defaultProps = defaultProps$
|
|
5349
|
+
Grid.defaultProps = defaultProps$1n;
|
|
5345
5350
|
Grid.displayName = "NutGrid";
|
|
5346
5351
|
Grid.Item = GridItem;
|
|
5347
|
-
const defaultProps$
|
|
5352
|
+
const defaultProps$1m = {};
|
|
5348
5353
|
const Layout = (props) => {
|
|
5349
|
-
({ ...defaultProps$
|
|
5354
|
+
({ ...defaultProps$1m, ...props });
|
|
5350
5355
|
return /* @__PURE__ */ React__default.createElement("div", { className: "nut-layout" }, "Layout");
|
|
5351
5356
|
};
|
|
5352
|
-
Layout.defaultProps = defaultProps$
|
|
5357
|
+
Layout.defaultProps = defaultProps$1m;
|
|
5353
5358
|
Layout.displayName = "NutLayout";
|
|
5354
|
-
const classPrefix$
|
|
5355
|
-
const defaultProps$
|
|
5359
|
+
const classPrefix$l = "nut-row";
|
|
5360
|
+
const defaultProps$1l = {
|
|
5356
5361
|
...ComponentDefaults,
|
|
5357
5362
|
type: "",
|
|
5358
5363
|
justify: "start",
|
|
@@ -5372,7 +5377,7 @@ const Row = (props) => {
|
|
|
5372
5377
|
gutter,
|
|
5373
5378
|
onClick
|
|
5374
5379
|
} = {
|
|
5375
|
-
...defaultProps$
|
|
5380
|
+
...defaultProps$1l,
|
|
5376
5381
|
...props
|
|
5377
5382
|
};
|
|
5378
5383
|
const getClass = (prefix, type22) => {
|
|
@@ -5386,7 +5391,7 @@ const Row = (props) => {
|
|
|
5386
5391
|
${getClass("justify", justify)}
|
|
5387
5392
|
${getClass("align", align)}
|
|
5388
5393
|
${getClass("flex", wrap)}
|
|
5389
|
-
${classPrefix$
|
|
5394
|
+
${classPrefix$l}
|
|
5390
5395
|
`;
|
|
5391
5396
|
};
|
|
5392
5397
|
const parentRow = {
|
|
@@ -5404,15 +5409,15 @@ const Row = (props) => {
|
|
|
5404
5409
|
children
|
|
5405
5410
|
));
|
|
5406
5411
|
};
|
|
5407
|
-
Row.defaultProps = defaultProps$
|
|
5412
|
+
Row.defaultProps = defaultProps$1l;
|
|
5408
5413
|
Row.displayName = "NutRow";
|
|
5409
5414
|
const prefixCls = "nut-space";
|
|
5410
|
-
const defaultProps$
|
|
5415
|
+
const defaultProps$1k = {
|
|
5411
5416
|
direction: "horizontal"
|
|
5412
5417
|
};
|
|
5413
5418
|
const Space = (props) => {
|
|
5414
5419
|
const { className, style, children, wrap, align, direction, justify } = {
|
|
5415
|
-
...defaultProps$
|
|
5420
|
+
...defaultProps$1k,
|
|
5416
5421
|
...props
|
|
5417
5422
|
};
|
|
5418
5423
|
const cls = classNames(
|
|
@@ -5427,7 +5432,7 @@ const Space = (props) => {
|
|
|
5427
5432
|
return child !== null && child !== void 0 && /* @__PURE__ */ React__default.createElement("div", { className: `${prefixCls}-item` }, child);
|
|
5428
5433
|
}));
|
|
5429
5434
|
};
|
|
5430
|
-
Space.defaultProps = defaultProps$
|
|
5435
|
+
Space.defaultProps = defaultProps$1k;
|
|
5431
5436
|
Space.displayName = "NutSpace";
|
|
5432
5437
|
function useWatch(dep, callback, config2 = { immediate: false }) {
|
|
5433
5438
|
const { immediate } = config2;
|
|
@@ -5509,12 +5514,12 @@ function getScrollParent(el, root2 = defaultRoot) {
|
|
|
5509
5514
|
}
|
|
5510
5515
|
return root2;
|
|
5511
5516
|
}
|
|
5512
|
-
const defaultProps$
|
|
5517
|
+
const defaultProps$1j = {
|
|
5513
5518
|
...ComponentDefaults,
|
|
5514
5519
|
position: "top",
|
|
5515
5520
|
zIndex: 2e3
|
|
5516
5521
|
};
|
|
5517
|
-
const classPrefix$
|
|
5522
|
+
const classPrefix$k = "nut-sticky";
|
|
5518
5523
|
const Sticky = (props) => {
|
|
5519
5524
|
const {
|
|
5520
5525
|
position,
|
|
@@ -5526,7 +5531,7 @@ const Sticky = (props) => {
|
|
|
5526
5531
|
className,
|
|
5527
5532
|
onChange,
|
|
5528
5533
|
...rest
|
|
5529
|
-
} = { ...defaultProps$
|
|
5534
|
+
} = { ...defaultProps$1j, ...props };
|
|
5530
5535
|
const stickyRef = useRef(null);
|
|
5531
5536
|
const rootRef = useRef(null);
|
|
5532
5537
|
const [rootRect, setRootRect] = useState({});
|
|
@@ -5616,7 +5621,7 @@ const Sticky = (props) => {
|
|
|
5616
5621
|
{
|
|
5617
5622
|
ref: rootRef,
|
|
5618
5623
|
style: rootStyle,
|
|
5619
|
-
className: classNames(classPrefix$
|
|
5624
|
+
className: classNames(classPrefix$k, className),
|
|
5620
5625
|
...rest
|
|
5621
5626
|
},
|
|
5622
5627
|
/* @__PURE__ */ React__default.createElement(
|
|
@@ -5632,9 +5637,9 @@ const Sticky = (props) => {
|
|
|
5632
5637
|
)
|
|
5633
5638
|
);
|
|
5634
5639
|
};
|
|
5635
|
-
Sticky.defaultProps = defaultProps$
|
|
5640
|
+
Sticky.defaultProps = defaultProps$1j;
|
|
5636
5641
|
Sticky.displayName = "NutSticky";
|
|
5637
|
-
const defaultProps$
|
|
5642
|
+
const defaultProps$1i = {
|
|
5638
5643
|
...ComponentDefaults,
|
|
5639
5644
|
threshold: 200,
|
|
5640
5645
|
zIndex: 10,
|
|
@@ -5642,7 +5647,7 @@ const defaultProps$1h = {
|
|
|
5642
5647
|
};
|
|
5643
5648
|
const BackTop = (props) => {
|
|
5644
5649
|
const { children, threshold, zIndex, className, duration, style, onClick } = {
|
|
5645
|
-
...defaultProps$
|
|
5650
|
+
...defaultProps$1i,
|
|
5646
5651
|
...props
|
|
5647
5652
|
};
|
|
5648
5653
|
const classPrefix2 = "nut-backtop";
|
|
@@ -5680,10 +5685,10 @@ const BackTop = (props) => {
|
|
|
5680
5685
|
children || /* @__PURE__ */ React__default.createElement(a$2, { width: 19, height: 19, className: "nut-backtop-main" })
|
|
5681
5686
|
);
|
|
5682
5687
|
};
|
|
5683
|
-
BackTop.defaultProps = defaultProps$
|
|
5688
|
+
BackTop.defaultProps = defaultProps$1i;
|
|
5684
5689
|
BackTop.displayName = "NutBackTop";
|
|
5685
5690
|
const elevatorContext = createContext({});
|
|
5686
|
-
const defaultProps$
|
|
5691
|
+
const defaultProps$1h = {
|
|
5687
5692
|
...ComponentDefaults,
|
|
5688
5693
|
height: "200px",
|
|
5689
5694
|
floorKey: "title",
|
|
@@ -5710,7 +5715,7 @@ const Elevator = (props) => {
|
|
|
5710
5715
|
children,
|
|
5711
5716
|
...rest
|
|
5712
5717
|
} = {
|
|
5713
|
-
...defaultProps$
|
|
5718
|
+
...defaultProps$1h,
|
|
5714
5719
|
...props
|
|
5715
5720
|
};
|
|
5716
5721
|
const classPrefix2 = "nut-elevator";
|
|
@@ -5922,10 +5927,10 @@ const Elevator = (props) => {
|
|
|
5922
5927
|
})
|
|
5923
5928
|
))) : null, sticky && scrollY > 0 ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__list__fixed` }, /* @__PURE__ */ React__default.createElement("span", { className: `${classPrefix2}__list__fixed__title` }, list[currentIndex][floorKey])) : null);
|
|
5924
5929
|
};
|
|
5925
|
-
Elevator.defaultProps = defaultProps$
|
|
5930
|
+
Elevator.defaultProps = defaultProps$1h;
|
|
5926
5931
|
Elevator.displayName = "NutElevator";
|
|
5927
5932
|
Elevator.Context = elevatorContext;
|
|
5928
|
-
const defaultProps$
|
|
5933
|
+
const defaultProps$1g = {
|
|
5929
5934
|
...ComponentDefaults,
|
|
5930
5935
|
activeText: "",
|
|
5931
5936
|
inactiveText: "",
|
|
@@ -5936,7 +5941,7 @@ const defaultProps$1f = {
|
|
|
5936
5941
|
}
|
|
5937
5942
|
};
|
|
5938
5943
|
const FixedNav = (props) => {
|
|
5939
|
-
const { locale } = useConfig();
|
|
5944
|
+
const { locale } = useConfig$1();
|
|
5940
5945
|
const {
|
|
5941
5946
|
className,
|
|
5942
5947
|
overlay,
|
|
@@ -5953,7 +5958,7 @@ const FixedNav = (props) => {
|
|
|
5953
5958
|
content,
|
|
5954
5959
|
...rest
|
|
5955
5960
|
} = {
|
|
5956
|
-
...defaultProps$
|
|
5961
|
+
...defaultProps$1g,
|
|
5957
5962
|
...props
|
|
5958
5963
|
};
|
|
5959
5964
|
const classPrefix2 = "nut-fixednav";
|
|
@@ -6005,9 +6010,9 @@ const FixedNav = (props) => {
|
|
|
6005
6010
|
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__btn`, onClick: () => onUpdateValue() }, content || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(a$j, { color: "#fff" }), /* @__PURE__ */ React__default.createElement("div", { className: "text" }, visible ? activeText || locale.fixednav.activeText : inactiveText || locale.fixednav.inactiveText)))
|
|
6006
6011
|
);
|
|
6007
6012
|
};
|
|
6008
|
-
FixedNav.defaultProps = defaultProps$
|
|
6013
|
+
FixedNav.defaultProps = defaultProps$1g;
|
|
6009
6014
|
FixedNav.displayName = "NutFixedNav";
|
|
6010
|
-
const defaultProps$
|
|
6015
|
+
const defaultProps$1f = {
|
|
6011
6016
|
...ComponentDefaults,
|
|
6012
6017
|
left: "",
|
|
6013
6018
|
right: "",
|
|
@@ -6030,7 +6035,7 @@ const NavBar = (props) => {
|
|
|
6030
6035
|
zIndex,
|
|
6031
6036
|
onBackClick
|
|
6032
6037
|
} = {
|
|
6033
|
-
...defaultProps$
|
|
6038
|
+
...defaultProps$1f,
|
|
6034
6039
|
...props
|
|
6035
6040
|
};
|
|
6036
6041
|
const classPrefix2 = "nut-navbar";
|
|
@@ -6067,9 +6072,9 @@ const NavBar = (props) => {
|
|
|
6067
6072
|
const cls = classNames(classPrefix2, classes, className);
|
|
6068
6073
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}--placeholder` }, renderWrapper()) : renderWrapper());
|
|
6069
6074
|
};
|
|
6070
|
-
NavBar.defaultProps = defaultProps$
|
|
6075
|
+
NavBar.defaultProps = defaultProps$1f;
|
|
6071
6076
|
NavBar.displayName = "NutNavBar";
|
|
6072
|
-
const defaultProps$
|
|
6077
|
+
const defaultProps$1e = {
|
|
6073
6078
|
...ComponentDefaults,
|
|
6074
6079
|
position: "center",
|
|
6075
6080
|
transition: "",
|
|
@@ -6121,7 +6126,7 @@ const Popup = (props) => {
|
|
|
6121
6126
|
afterShow,
|
|
6122
6127
|
afterClose,
|
|
6123
6128
|
onClick
|
|
6124
|
-
} = { ...defaultProps$
|
|
6129
|
+
} = { ...defaultProps$1e, ...props };
|
|
6125
6130
|
const [index, setIndex] = useState(zIndex || _zIndex);
|
|
6126
6131
|
const [innerVisible, setInnerVisible] = useState(visible);
|
|
6127
6132
|
const [showChildren, setShowChildren] = useState(true);
|
|
@@ -6257,10 +6262,10 @@ const Popup = (props) => {
|
|
|
6257
6262
|
}, [position, transition]);
|
|
6258
6263
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderToContainer(portal, renderNode()));
|
|
6259
6264
|
};
|
|
6260
|
-
Popup.defaultProps = defaultProps$
|
|
6265
|
+
Popup.defaultProps = defaultProps$1e;
|
|
6261
6266
|
Popup.displayName = "NutPopup";
|
|
6262
6267
|
const OffsetContext = createContext(20);
|
|
6263
|
-
const defaultProps$
|
|
6268
|
+
const defaultProps$1d = {
|
|
6264
6269
|
...ComponentDefaults,
|
|
6265
6270
|
position: "left",
|
|
6266
6271
|
width: "80%"
|
|
@@ -6277,7 +6282,7 @@ const SideNavBar = (props) => {
|
|
|
6277
6282
|
onClose,
|
|
6278
6283
|
...rest
|
|
6279
6284
|
} = {
|
|
6280
|
-
...defaultProps$
|
|
6285
|
+
...defaultProps$1d,
|
|
6281
6286
|
...props
|
|
6282
6287
|
};
|
|
6283
6288
|
const indent = props.indent ? Number(props.indent) : 20;
|
|
@@ -6317,7 +6322,7 @@ const SideNavBar = (props) => {
|
|
|
6317
6322
|
)))
|
|
6318
6323
|
);
|
|
6319
6324
|
};
|
|
6320
|
-
SideNavBar.defaultProps = defaultProps$
|
|
6325
|
+
SideNavBar.defaultProps = defaultProps$1d;
|
|
6321
6326
|
SideNavBar.displayName = "NutSideNavBar";
|
|
6322
6327
|
const SideNavBarItem = (props) => {
|
|
6323
6328
|
const classPrefix2 = "nut-subsidenavbar";
|
|
@@ -6336,13 +6341,13 @@ const SideNavBarItem = (props) => {
|
|
|
6336
6341
|
title
|
|
6337
6342
|
);
|
|
6338
6343
|
};
|
|
6339
|
-
const defaultProps$
|
|
6344
|
+
const defaultProps$1c = {
|
|
6340
6345
|
open: true
|
|
6341
6346
|
};
|
|
6342
6347
|
const SubSideNavBar = (props) => {
|
|
6343
6348
|
const classPrefix2 = "nut-subsidenavbar";
|
|
6344
6349
|
const { title, value, children, onClick, open: open2, ...rest } = {
|
|
6345
|
-
...defaultProps$
|
|
6350
|
+
...defaultProps$1c,
|
|
6346
6351
|
...props
|
|
6347
6352
|
};
|
|
6348
6353
|
const [subShow, setSubShow] = useState(open2);
|
|
@@ -6420,7 +6425,7 @@ function usePropsValue({
|
|
|
6420
6425
|
);
|
|
6421
6426
|
return [stateRef.current, setState];
|
|
6422
6427
|
}
|
|
6423
|
-
const defaultProps$
|
|
6428
|
+
const defaultProps$1b = {
|
|
6424
6429
|
...ComponentDefaults,
|
|
6425
6430
|
value: "",
|
|
6426
6431
|
dot: false,
|
|
@@ -6431,7 +6436,7 @@ const defaultProps$1a = {
|
|
|
6431
6436
|
};
|
|
6432
6437
|
const Badge = (props) => {
|
|
6433
6438
|
const { className, style, value, max, children, dot, top, right, color } = {
|
|
6434
|
-
...defaultProps$
|
|
6439
|
+
...defaultProps$1b,
|
|
6435
6440
|
...props
|
|
6436
6441
|
};
|
|
6437
6442
|
const classPrefix2 = "nut-badge";
|
|
@@ -6458,9 +6463,9 @@ const Badge = (props) => {
|
|
|
6458
6463
|
};
|
|
6459
6464
|
return /* @__PURE__ */ React__default.createElement("div", { className: classes, style }, typeof value === "object" && value && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__icon` }, value), /* @__PURE__ */ React__default.createElement("div", null, children), /* @__PURE__ */ React__default.createElement("div", { className: contentClasses, style: getStyle() }, content()));
|
|
6460
6465
|
};
|
|
6461
|
-
Badge.defaultProps = defaultProps$
|
|
6466
|
+
Badge.defaultProps = defaultProps$1b;
|
|
6462
6467
|
Badge.displayName = "NutBadge";
|
|
6463
|
-
const defaultProps$
|
|
6468
|
+
const defaultProps$1a = {
|
|
6464
6469
|
...ComponentDefaults,
|
|
6465
6470
|
title: "",
|
|
6466
6471
|
icon: null,
|
|
@@ -6487,9 +6492,10 @@ const TabbarItem = (props) => {
|
|
|
6487
6492
|
max,
|
|
6488
6493
|
top,
|
|
6489
6494
|
right,
|
|
6490
|
-
handleClick
|
|
6495
|
+
handleClick,
|
|
6496
|
+
...rest
|
|
6491
6497
|
} = {
|
|
6492
|
-
...defaultProps$
|
|
6498
|
+
...defaultProps$1a,
|
|
6493
6499
|
...props
|
|
6494
6500
|
};
|
|
6495
6501
|
const classPrefix2 = "nut-tabbar-item";
|
|
@@ -6516,12 +6522,13 @@ const TabbarItem = (props) => {
|
|
|
6516
6522
|
color: active ? activeColor : inactiveColor,
|
|
6517
6523
|
...style
|
|
6518
6524
|
},
|
|
6519
|
-
onClick: () => handleClick(index)
|
|
6525
|
+
onClick: () => handleClick(index),
|
|
6526
|
+
...rest
|
|
6520
6527
|
},
|
|
6521
6528
|
icon ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React__default.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React__default.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React__default.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React__default.createElement("div", { className: titleClass }, title))
|
|
6522
6529
|
);
|
|
6523
6530
|
};
|
|
6524
|
-
const defaultProps$
|
|
6531
|
+
const defaultProps$19 = {
|
|
6525
6532
|
...ComponentDefaults,
|
|
6526
6533
|
defaultValue: 0,
|
|
6527
6534
|
fixed: false,
|
|
@@ -6544,7 +6551,7 @@ const Tabbar = (props) => {
|
|
|
6544
6551
|
style,
|
|
6545
6552
|
onSwitch
|
|
6546
6553
|
} = {
|
|
6547
|
-
...defaultProps$
|
|
6554
|
+
...defaultProps$19,
|
|
6548
6555
|
...props
|
|
6549
6556
|
};
|
|
6550
6557
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -6579,17 +6586,17 @@ const Tabbar = (props) => {
|
|
|
6579
6586
|
(fixed || safeArea) && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__safe-area` })
|
|
6580
6587
|
);
|
|
6581
6588
|
};
|
|
6582
|
-
Tabbar.defaultProps = defaultProps$
|
|
6589
|
+
Tabbar.defaultProps = defaultProps$19;
|
|
6583
6590
|
Tabbar.displayName = "NutTabbar";
|
|
6584
6591
|
Tabbar.Item = TabbarItem;
|
|
6585
|
-
const defaultProps$
|
|
6592
|
+
const defaultProps$18 = {
|
|
6586
6593
|
title: "",
|
|
6587
6594
|
value: "",
|
|
6588
6595
|
disabled: false
|
|
6589
6596
|
};
|
|
6590
6597
|
const TabPane = (props) => {
|
|
6591
6598
|
const { children, autoHeightClassName, className, disabled } = {
|
|
6592
|
-
...defaultProps$
|
|
6599
|
+
...defaultProps$18,
|
|
6593
6600
|
...props
|
|
6594
6601
|
};
|
|
6595
6602
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -6615,7 +6622,7 @@ function requestAniFrame() {
|
|
|
6615
6622
|
};
|
|
6616
6623
|
}
|
|
6617
6624
|
const requestAniFrame$1 = requestAniFrame();
|
|
6618
|
-
const defaultProps$
|
|
6625
|
+
const defaultProps$17 = {
|
|
6619
6626
|
...ComponentDefaults,
|
|
6620
6627
|
tabStyle: {},
|
|
6621
6628
|
name: "",
|
|
@@ -6625,7 +6632,7 @@ const defaultProps$16 = {
|
|
|
6625
6632
|
duration: 300,
|
|
6626
6633
|
autoHeight: false
|
|
6627
6634
|
};
|
|
6628
|
-
const classPrefix$
|
|
6635
|
+
const classPrefix$j = "nut-tabs";
|
|
6629
6636
|
const Tabs = (props) => {
|
|
6630
6637
|
const {
|
|
6631
6638
|
activeColor,
|
|
@@ -6643,7 +6650,7 @@ const Tabs = (props) => {
|
|
|
6643
6650
|
autoHeight,
|
|
6644
6651
|
...rest
|
|
6645
6652
|
} = {
|
|
6646
|
-
...defaultProps$
|
|
6653
|
+
...defaultProps$17,
|
|
6647
6654
|
...props
|
|
6648
6655
|
};
|
|
6649
6656
|
const [value, setValue] = usePropsValue({
|
|
@@ -6688,14 +6695,14 @@ const Tabs = (props) => {
|
|
|
6688
6695
|
}
|
|
6689
6696
|
}, [children]);
|
|
6690
6697
|
const classes = classNames(
|
|
6691
|
-
classPrefix$
|
|
6692
|
-
`${classPrefix$
|
|
6698
|
+
classPrefix$j,
|
|
6699
|
+
`${classPrefix$j}--${direction}`,
|
|
6693
6700
|
className
|
|
6694
6701
|
);
|
|
6695
|
-
const classesTitle = classNames(`${classPrefix$
|
|
6696
|
-
[`${classPrefix$
|
|
6697
|
-
[`${classPrefix$
|
|
6698
|
-
[`${classPrefix$
|
|
6702
|
+
const classesTitle = classNames(`${classPrefix$j}__titles`, {
|
|
6703
|
+
[`${classPrefix$j}__titles--${activeType}`]: activeType,
|
|
6704
|
+
[`${classPrefix$j}__titles--scrollable`]: true,
|
|
6705
|
+
[`${classPrefix$j}__titles--${align}`]: align
|
|
6699
6706
|
});
|
|
6700
6707
|
const tabsActiveStyle = {
|
|
6701
6708
|
color: activeType === "smile" ? activeColor : "",
|
|
@@ -6835,7 +6842,7 @@ const Tabs = (props) => {
|
|
|
6835
6842
|
onClick: (e) => {
|
|
6836
6843
|
tabChange(item);
|
|
6837
6844
|
},
|
|
6838
|
-
className: classNames(`${classPrefix$
|
|
6845
|
+
className: classNames(`${classPrefix$j}__titles-item taro`, {
|
|
6839
6846
|
[`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
|
|
6840
6847
|
[`nut-tabs__titles-item--disabled`]: item.disabled,
|
|
6841
6848
|
[`nut-tabs__titles-item--${align}`]: align
|
|
@@ -6845,14 +6852,14 @@ const Tabs = (props) => {
|
|
|
6845
6852
|
activeType === "line" && /* @__PURE__ */ React__default.createElement(
|
|
6846
6853
|
View,
|
|
6847
6854
|
{
|
|
6848
|
-
className: `${classPrefix$
|
|
6855
|
+
className: `${classPrefix$j}__titles-item__line`,
|
|
6849
6856
|
style: tabsActiveStyle
|
|
6850
6857
|
}
|
|
6851
6858
|
),
|
|
6852
6859
|
activeType === "smile" && /* @__PURE__ */ React__default.createElement(
|
|
6853
6860
|
View,
|
|
6854
6861
|
{
|
|
6855
|
-
className: `${classPrefix$
|
|
6862
|
+
className: `${classPrefix$j}__titles-item__smile`,
|
|
6856
6863
|
style: tabsActiveStyle
|
|
6857
6864
|
},
|
|
6858
6865
|
/* @__PURE__ */ React__default.createElement(a$k, { color: activeColor, width: 40, height: 20 })
|
|
@@ -6864,14 +6871,14 @@ const Tabs = (props) => {
|
|
|
6864
6871
|
{
|
|
6865
6872
|
ellipsis: true
|
|
6866
6873
|
},
|
|
6867
|
-
`${classPrefix$
|
|
6874
|
+
`${classPrefix$j}__titles-item__text`
|
|
6868
6875
|
)
|
|
6869
6876
|
},
|
|
6870
6877
|
item.title
|
|
6871
6878
|
)
|
|
6872
6879
|
);
|
|
6873
6880
|
}))
|
|
6874
|
-
), /* @__PURE__ */ React__default.createElement(View, { className: `${classPrefix$
|
|
6881
|
+
), /* @__PURE__ */ React__default.createElement(View, { className: `${classPrefix$j}__content__wrap` }, /* @__PURE__ */ React__default.createElement(View, { className: `${classPrefix$j}__content`, style: contentStyle }, React__default.Children.map(children, (child, idx) => {
|
|
6875
6882
|
if (!React__default.isValidElement(child)) {
|
|
6876
6883
|
return null;
|
|
6877
6884
|
}
|
|
@@ -6888,10 +6895,10 @@ const Tabs = (props) => {
|
|
|
6888
6895
|
return React__default.cloneElement(child, childProps);
|
|
6889
6896
|
}))));
|
|
6890
6897
|
};
|
|
6891
|
-
Tabs.defaultProps = defaultProps$
|
|
6898
|
+
Tabs.defaultProps = defaultProps$17;
|
|
6892
6899
|
Tabs.displayName = "NutTabs";
|
|
6893
6900
|
Tabs.TabPane = TabPane;
|
|
6894
|
-
const defaultProps$
|
|
6901
|
+
const defaultProps$16 = {
|
|
6895
6902
|
type: "custom",
|
|
6896
6903
|
existList: [],
|
|
6897
6904
|
defaultIcon: null,
|
|
@@ -6899,7 +6906,7 @@ const defaultProps$15 = {
|
|
|
6899
6906
|
custom: false
|
|
6900
6907
|
};
|
|
6901
6908
|
const ExistRender = (props) => {
|
|
6902
|
-
const { locale } = useConfig();
|
|
6909
|
+
const { locale } = useConfig$1();
|
|
6903
6910
|
const {
|
|
6904
6911
|
children,
|
|
6905
6912
|
type: type4,
|
|
@@ -6910,7 +6917,7 @@ const ExistRender = (props) => {
|
|
|
6910
6917
|
onSelect,
|
|
6911
6918
|
onSwitch,
|
|
6912
6919
|
...rest
|
|
6913
|
-
} = { ...defaultProps$
|
|
6920
|
+
} = { ...defaultProps$16, ...props };
|
|
6914
6921
|
const classPrefix2 = "nut-address";
|
|
6915
6922
|
const selectedExist = (item) => {
|
|
6916
6923
|
existList.forEach((list, index) => {
|
|
@@ -7071,7 +7078,7 @@ class Tree {
|
|
|
7071
7078
|
}
|
|
7072
7079
|
}
|
|
7073
7080
|
const Tree$1 = Tree;
|
|
7074
|
-
const defaultProps$
|
|
7081
|
+
const defaultProps$15 = {
|
|
7075
7082
|
...ComponentDefaults,
|
|
7076
7083
|
activeColor: "",
|
|
7077
7084
|
activeIcon: "checklist",
|
|
@@ -7114,7 +7121,7 @@ const InternalCascader = (props, ref) => {
|
|
|
7114
7121
|
onClose,
|
|
7115
7122
|
onChange,
|
|
7116
7123
|
onPathChange
|
|
7117
|
-
} = { ...defaultProps$
|
|
7124
|
+
} = { ...defaultProps$15, ...props };
|
|
7118
7125
|
const [tabvalue, setTabvalue] = useState("c1");
|
|
7119
7126
|
const [optionsData, setOptionsData] = useState([]);
|
|
7120
7127
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -7410,9 +7417,9 @@ const InternalCascader = (props, ref) => {
|
|
|
7410
7417
|
) : renderTabs());
|
|
7411
7418
|
};
|
|
7412
7419
|
const Cascader = React__default.forwardRef(InternalCascader);
|
|
7413
|
-
Cascader.defaultProps = defaultProps$
|
|
7420
|
+
Cascader.defaultProps = defaultProps$15;
|
|
7414
7421
|
Cascader.displayName = "NutCascader";
|
|
7415
|
-
const defaultProps$
|
|
7422
|
+
const defaultProps$14 = {
|
|
7416
7423
|
...ComponentDefaults,
|
|
7417
7424
|
visible: false,
|
|
7418
7425
|
type: "custom",
|
|
@@ -7439,7 +7446,7 @@ const CustomRender = (props) => {
|
|
|
7439
7446
|
onPathChange,
|
|
7440
7447
|
...rest
|
|
7441
7448
|
} = {
|
|
7442
|
-
...defaultProps$
|
|
7449
|
+
...defaultProps$14,
|
|
7443
7450
|
...props
|
|
7444
7451
|
};
|
|
7445
7452
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, type4 === "custom" && /* @__PURE__ */ React__default.createElement(
|
|
@@ -7464,7 +7471,7 @@ const CustomRender = (props) => {
|
|
|
7464
7471
|
}
|
|
7465
7472
|
));
|
|
7466
7473
|
};
|
|
7467
|
-
const defaultProps$
|
|
7474
|
+
const defaultProps$13 = {
|
|
7468
7475
|
...ComponentDefaults,
|
|
7469
7476
|
defaultValue: [],
|
|
7470
7477
|
type: "custom",
|
|
@@ -7480,7 +7487,7 @@ const defaultProps$12 = {
|
|
|
7480
7487
|
backIcon: null
|
|
7481
7488
|
};
|
|
7482
7489
|
const InternalAddress = (props, ref) => {
|
|
7483
|
-
const { locale } = useConfig();
|
|
7490
|
+
const { locale } = useConfig$1();
|
|
7484
7491
|
const {
|
|
7485
7492
|
style,
|
|
7486
7493
|
className,
|
|
@@ -7506,7 +7513,7 @@ const InternalAddress = (props, ref) => {
|
|
|
7506
7513
|
onSwitch,
|
|
7507
7514
|
...rest
|
|
7508
7515
|
} = {
|
|
7509
|
-
...defaultProps$
|
|
7516
|
+
...defaultProps$13,
|
|
7510
7517
|
...props
|
|
7511
7518
|
};
|
|
7512
7519
|
const classPrefix2 = "nut-address";
|
|
@@ -7597,7 +7604,7 @@ const InternalAddress = (props, ref) => {
|
|
|
7597
7604
|
));
|
|
7598
7605
|
};
|
|
7599
7606
|
const Address = forwardRef(InternalAddress);
|
|
7600
|
-
Address.defaultProps = defaultProps$
|
|
7607
|
+
Address.defaultProps = defaultProps$13;
|
|
7601
7608
|
Address.displayName = "NutAddress";
|
|
7602
7609
|
const Utils = {
|
|
7603
7610
|
/**
|
|
@@ -7847,7 +7854,7 @@ const isEnd = (day, days) => {
|
|
|
7847
7854
|
const isStartAndEnd = (days) => {
|
|
7848
7855
|
return days.length >= 2 && Utils.isEqual(days[0], days[1]);
|
|
7849
7856
|
};
|
|
7850
|
-
const defaultProps$
|
|
7857
|
+
const defaultProps$12 = {
|
|
7851
7858
|
...ComponentDefaults,
|
|
7852
7859
|
type: "single",
|
|
7853
7860
|
autoBackfill: false,
|
|
@@ -7878,7 +7885,7 @@ const defaultProps$11 = {
|
|
|
7878
7885
|
}
|
|
7879
7886
|
};
|
|
7880
7887
|
const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
7881
|
-
const { locale } = useConfig();
|
|
7888
|
+
const { locale } = useConfig$1();
|
|
7882
7889
|
const {
|
|
7883
7890
|
style,
|
|
7884
7891
|
className,
|
|
@@ -7907,7 +7914,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
7907
7914
|
onUpdate,
|
|
7908
7915
|
onDayClick,
|
|
7909
7916
|
onPageChange
|
|
7910
|
-
} = { ...defaultProps$
|
|
7917
|
+
} = { ...defaultProps$12, ...props };
|
|
7911
7918
|
const weekdays = locale.calendaritem.weekdays;
|
|
7912
7919
|
const weeks = [
|
|
7913
7920
|
...weekdays.slice(firstDayOfWeek, 7),
|
|
@@ -8452,9 +8459,9 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
8452
8459
|
};
|
|
8453
8460
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
|
|
8454
8461
|
});
|
|
8455
|
-
CalendarItem.defaultProps = defaultProps$
|
|
8462
|
+
CalendarItem.defaultProps = defaultProps$12;
|
|
8456
8463
|
CalendarItem.displayName = "NutCalendarItem";
|
|
8457
|
-
const defaultProps$
|
|
8464
|
+
const defaultProps$11 = {
|
|
8458
8465
|
...ComponentDefaults,
|
|
8459
8466
|
type: "single",
|
|
8460
8467
|
autoBackfill: false,
|
|
@@ -8487,7 +8494,7 @@ const defaultProps$10 = {
|
|
|
8487
8494
|
}
|
|
8488
8495
|
};
|
|
8489
8496
|
const Calendar = React__default.forwardRef((props, ref) => {
|
|
8490
|
-
const { locale } = useConfig();
|
|
8497
|
+
const { locale } = useConfig$1();
|
|
8491
8498
|
const {
|
|
8492
8499
|
style,
|
|
8493
8500
|
className,
|
|
@@ -8517,7 +8524,7 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
8517
8524
|
onConfirm,
|
|
8518
8525
|
onDayClick,
|
|
8519
8526
|
onPageChange
|
|
8520
|
-
} = { ...defaultProps$
|
|
8527
|
+
} = { ...defaultProps$11, ...props };
|
|
8521
8528
|
const calendarRef = useRef(null);
|
|
8522
8529
|
const close2 = () => {
|
|
8523
8530
|
onClose && onClose();
|
|
@@ -8591,11 +8598,11 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
8591
8598
|
renderItem()
|
|
8592
8599
|
) : renderItem());
|
|
8593
8600
|
});
|
|
8594
|
-
Calendar.defaultProps = defaultProps$
|
|
8601
|
+
Calendar.defaultProps = defaultProps$11;
|
|
8595
8602
|
Calendar.displayName = "NutCalendar";
|
|
8596
8603
|
const CheckboxGroupContext = createContext(null);
|
|
8597
8604
|
const Context$1 = CheckboxGroupContext;
|
|
8598
|
-
const defaultProps
|
|
8605
|
+
const defaultProps$10 = {
|
|
8599
8606
|
max: void 0,
|
|
8600
8607
|
labelPosition: "right",
|
|
8601
8608
|
direction: "vertical",
|
|
@@ -8603,10 +8610,10 @@ const defaultProps$$ = {
|
|
|
8603
8610
|
},
|
|
8604
8611
|
options: []
|
|
8605
8612
|
};
|
|
8606
|
-
const classPrefix$
|
|
8613
|
+
const classPrefix$i = "nut-checkboxgroup";
|
|
8607
8614
|
const CheckboxGroup = React__default.forwardRef(
|
|
8608
8615
|
(props, ref) => {
|
|
8609
|
-
const { children } = { ...defaultProps
|
|
8616
|
+
const { children } = { ...defaultProps$10, ...props };
|
|
8610
8617
|
const {
|
|
8611
8618
|
className,
|
|
8612
8619
|
disabled,
|
|
@@ -8685,7 +8692,7 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
8685
8692
|
/* @__PURE__ */ React__default.createElement(
|
|
8686
8693
|
"div",
|
|
8687
8694
|
{
|
|
8688
|
-
className: classNames(classPrefix$
|
|
8695
|
+
className: classNames(classPrefix$i, className, {
|
|
8689
8696
|
[`nut-checkboxgroup--${props.direction}`]: props.direction
|
|
8690
8697
|
}),
|
|
8691
8698
|
...rest
|
|
@@ -8695,9 +8702,9 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
8695
8702
|
);
|
|
8696
8703
|
}
|
|
8697
8704
|
);
|
|
8698
|
-
CheckboxGroup.defaultProps = defaultProps
|
|
8705
|
+
CheckboxGroup.defaultProps = defaultProps$10;
|
|
8699
8706
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
8700
|
-
const defaultProps
|
|
8707
|
+
const defaultProps$$ = {
|
|
8701
8708
|
...ComponentDefaults,
|
|
8702
8709
|
disabled: false,
|
|
8703
8710
|
labelPosition: "right",
|
|
@@ -8707,10 +8714,10 @@ const defaultProps$_ = {
|
|
|
8707
8714
|
onChange: (value) => {
|
|
8708
8715
|
}
|
|
8709
8716
|
};
|
|
8710
|
-
const classPrefix$
|
|
8717
|
+
const classPrefix$h = "nut-checkbox";
|
|
8711
8718
|
const Checkbox = (props) => {
|
|
8712
8719
|
const { children } = {
|
|
8713
|
-
...defaultProps
|
|
8720
|
+
...defaultProps$$,
|
|
8714
8721
|
...props
|
|
8715
8722
|
};
|
|
8716
8723
|
const {
|
|
@@ -8769,22 +8776,22 @@ const Checkbox = (props) => {
|
|
|
8769
8776
|
};
|
|
8770
8777
|
const color = () => {
|
|
8771
8778
|
if (innerDisabled) {
|
|
8772
|
-
return `${classPrefix$
|
|
8779
|
+
return `${classPrefix$h}__icon--disable`;
|
|
8773
8780
|
}
|
|
8774
8781
|
if (innerChecked) {
|
|
8775
8782
|
if (innerIndeterminate) {
|
|
8776
|
-
return `${classPrefix$
|
|
8783
|
+
return `${classPrefix$h}__icon--indeterminate`;
|
|
8777
8784
|
}
|
|
8778
|
-
return `${classPrefix$
|
|
8785
|
+
return `${classPrefix$h}__icon`;
|
|
8779
8786
|
}
|
|
8780
|
-
return `${classPrefix$
|
|
8787
|
+
return `${classPrefix$h}__icon--unchecked`;
|
|
8781
8788
|
};
|
|
8782
8789
|
const renderLabel = () => {
|
|
8783
8790
|
return /* @__PURE__ */ React__default.createElement(
|
|
8784
8791
|
"span",
|
|
8785
8792
|
{
|
|
8786
|
-
className: classNames(`${classPrefix$
|
|
8787
|
-
[`${classPrefix$
|
|
8793
|
+
className: classNames(`${classPrefix$h}__label `, {
|
|
8794
|
+
[`${classPrefix$h}__label--disabled`]: innerDisabled
|
|
8788
8795
|
})
|
|
8789
8796
|
},
|
|
8790
8797
|
children || label
|
|
@@ -8803,8 +8810,8 @@ const Checkbox = (props) => {
|
|
|
8803
8810
|
return /* @__PURE__ */ React__default.createElement(
|
|
8804
8811
|
"div",
|
|
8805
8812
|
{
|
|
8806
|
-
className: classNames(classPrefix$
|
|
8807
|
-
[`${classPrefix$
|
|
8813
|
+
className: classNames(classPrefix$h, className, {
|
|
8814
|
+
[`${classPrefix$h}--reverse`]: labelPosition === "left"
|
|
8808
8815
|
}),
|
|
8809
8816
|
...rest,
|
|
8810
8817
|
onClick: handleClick
|
|
@@ -8813,7 +8820,7 @@ const Checkbox = (props) => {
|
|
|
8813
8820
|
renderLabel()
|
|
8814
8821
|
);
|
|
8815
8822
|
};
|
|
8816
|
-
Checkbox.defaultProps = defaultProps
|
|
8823
|
+
Checkbox.defaultProps = defaultProps$$;
|
|
8817
8824
|
Checkbox.displayName = "NutCheckBox";
|
|
8818
8825
|
Checkbox.Group = CheckboxGroup;
|
|
8819
8826
|
const MIN_DISTANCE = 10;
|
|
@@ -9140,7 +9147,7 @@ function useRefs() {
|
|
|
9140
9147
|
}, []);
|
|
9141
9148
|
return [refs.current, setRefs, reset];
|
|
9142
9149
|
}
|
|
9143
|
-
const defaultProps$
|
|
9150
|
+
const defaultProps$_ = {
|
|
9144
9151
|
...ComponentDefaults,
|
|
9145
9152
|
visible: false,
|
|
9146
9153
|
title: "",
|
|
@@ -9151,7 +9158,7 @@ const defaultProps$Z = {
|
|
|
9151
9158
|
duration: 1e3
|
|
9152
9159
|
};
|
|
9153
9160
|
const InternalPicker = (props, ref) => {
|
|
9154
|
-
const { locale } = useConfig();
|
|
9161
|
+
const { locale } = useConfig$1();
|
|
9155
9162
|
const {
|
|
9156
9163
|
children,
|
|
9157
9164
|
visible,
|
|
@@ -9167,7 +9174,7 @@ const InternalPicker = (props, ref) => {
|
|
|
9167
9174
|
afterClose,
|
|
9168
9175
|
onChange,
|
|
9169
9176
|
...rest
|
|
9170
|
-
} = { ...defaultProps$
|
|
9177
|
+
} = { ...defaultProps$_, ...props };
|
|
9171
9178
|
const classPrefix2 = "nut-picker";
|
|
9172
9179
|
const classes = classNames(classPrefix2, className);
|
|
9173
9180
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -9465,7 +9472,7 @@ const InternalPicker = (props, ref) => {
|
|
|
9465
9472
|
const Picker = React__default.forwardRef(InternalPicker);
|
|
9466
9473
|
const Picker$1 = Picker;
|
|
9467
9474
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
9468
|
-
const defaultProps$
|
|
9475
|
+
const defaultProps$Z = {
|
|
9469
9476
|
...ComponentDefaults,
|
|
9470
9477
|
visible: false,
|
|
9471
9478
|
title: "",
|
|
@@ -9496,10 +9503,10 @@ const DatePicker = (props) => {
|
|
|
9496
9503
|
style,
|
|
9497
9504
|
...rest
|
|
9498
9505
|
} = {
|
|
9499
|
-
...defaultProps$
|
|
9506
|
+
...defaultProps$Z,
|
|
9500
9507
|
...props
|
|
9501
9508
|
};
|
|
9502
|
-
const { locale } = useConfig();
|
|
9509
|
+
const { locale } = useConfig$1();
|
|
9503
9510
|
const datepickerLang = locale.datepicker;
|
|
9504
9511
|
const zhCNType = {
|
|
9505
9512
|
day: datepickerLang.day,
|
|
@@ -9778,7 +9785,7 @@ const DatePicker = (props) => {
|
|
|
9778
9785
|
)
|
|
9779
9786
|
);
|
|
9780
9787
|
};
|
|
9781
|
-
DatePicker.defaultProps = defaultProps$
|
|
9788
|
+
DatePicker.defaultProps = defaultProps$Z;
|
|
9782
9789
|
DatePicker.displayName = "NutDatePicker";
|
|
9783
9790
|
const Context = createContext({});
|
|
9784
9791
|
function _extends() {
|
|
@@ -10989,7 +10996,7 @@ function isForwardRefComponent(component) {
|
|
|
10989
10996
|
}
|
|
10990
10997
|
).$$typeof === component.type.$$typeof;
|
|
10991
10998
|
}
|
|
10992
|
-
const defaultProps$
|
|
10999
|
+
const defaultProps$Y = {
|
|
10993
11000
|
...ComponentDefaults,
|
|
10994
11001
|
required: false,
|
|
10995
11002
|
name: "",
|
|
@@ -11056,7 +11063,7 @@ class FormItem extends React__default.Component {
|
|
|
11056
11063
|
__publicField(this, "renderLayout", (childNode) => {
|
|
11057
11064
|
var _a, _b;
|
|
11058
11065
|
const { label, name, required: required4, className, style, errorMessageAlign } = {
|
|
11059
|
-
...defaultProps$
|
|
11066
|
+
...defaultProps$Y,
|
|
11060
11067
|
...this.props
|
|
11061
11068
|
};
|
|
11062
11069
|
const item = ((_a = this.context.errors) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errors) == null ? void 0 : _b.filter((item2) => {
|
|
@@ -11106,9 +11113,9 @@ class FormItem extends React__default.Component {
|
|
|
11106
11113
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, { key: this.state.resetCount }, this.renderLayout(returnChildNode));
|
|
11107
11114
|
}
|
|
11108
11115
|
}
|
|
11109
|
-
__publicField(FormItem, "defaultProps", defaultProps$
|
|
11116
|
+
__publicField(FormItem, "defaultProps", defaultProps$Y);
|
|
11110
11117
|
__publicField(FormItem, "contextType", Context);
|
|
11111
|
-
const defaultProps$
|
|
11118
|
+
const defaultProps$X = {
|
|
11112
11119
|
...ComponentDefaults,
|
|
11113
11120
|
labelPosition: "right",
|
|
11114
11121
|
starPosition: "left",
|
|
@@ -11136,7 +11143,7 @@ const Form = (props) => {
|
|
|
11136
11143
|
starPosition,
|
|
11137
11144
|
form
|
|
11138
11145
|
} = {
|
|
11139
|
-
...defaultProps$
|
|
11146
|
+
...defaultProps$X,
|
|
11140
11147
|
...props
|
|
11141
11148
|
};
|
|
11142
11149
|
let formInstance;
|
|
@@ -11179,7 +11186,7 @@ const Form = (props) => {
|
|
|
11179
11186
|
/* @__PURE__ */ React__default.createElement(Cell.Group, null, /* @__PURE__ */ React__default.createElement(Context.Provider, { value: formInstance }, children), footer ? /* @__PURE__ */ React__default.createElement(Cell, null, footer) : null)
|
|
11180
11187
|
);
|
|
11181
11188
|
};
|
|
11182
|
-
Form.defaultProps = defaultProps$
|
|
11189
|
+
Form.defaultProps = defaultProps$X;
|
|
11183
11190
|
Form.displayName = "NutForm";
|
|
11184
11191
|
Form.Item = FormItem;
|
|
11185
11192
|
Form.useForm = useForm;
|
|
@@ -11207,7 +11214,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
11207
11214
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
11208
11215
|
return value.replace(regExp, "");
|
|
11209
11216
|
}
|
|
11210
|
-
const defaultProps$
|
|
11217
|
+
const defaultProps$W = {
|
|
11211
11218
|
...ComponentDefaults,
|
|
11212
11219
|
type: "text",
|
|
11213
11220
|
name: "",
|
|
@@ -11225,7 +11232,7 @@ const defaultProps$V = {
|
|
|
11225
11232
|
};
|
|
11226
11233
|
const Input = forwardRef(
|
|
11227
11234
|
(props, ref) => {
|
|
11228
|
-
const { locale } = useConfig();
|
|
11235
|
+
const { locale } = useConfig$1();
|
|
11229
11236
|
const {
|
|
11230
11237
|
type: type4,
|
|
11231
11238
|
name,
|
|
@@ -11251,7 +11258,7 @@ const Input = forwardRef(
|
|
|
11251
11258
|
value: _value,
|
|
11252
11259
|
...rest
|
|
11253
11260
|
} = {
|
|
11254
|
-
...defaultProps$
|
|
11261
|
+
...defaultProps$W,
|
|
11255
11262
|
...props
|
|
11256
11263
|
};
|
|
11257
11264
|
const [value, setValue] = usePropsValue({
|
|
@@ -11392,9 +11399,9 @@ const Input = forwardRef(
|
|
|
11392
11399
|
);
|
|
11393
11400
|
}
|
|
11394
11401
|
);
|
|
11395
|
-
Input.defaultProps = defaultProps$
|
|
11402
|
+
Input.defaultProps = defaultProps$W;
|
|
11396
11403
|
Input.displayName = "NutInput";
|
|
11397
|
-
const defaultProps$
|
|
11404
|
+
const defaultProps$V = {
|
|
11398
11405
|
...ComponentDefaults,
|
|
11399
11406
|
disabled: false,
|
|
11400
11407
|
min: 1,
|
|
@@ -11406,7 +11413,7 @@ const defaultProps$U = {
|
|
|
11406
11413
|
digits: 0,
|
|
11407
11414
|
async: false
|
|
11408
11415
|
};
|
|
11409
|
-
const classPrefix$
|
|
11416
|
+
const classPrefix$g = `nut-inputnumber`;
|
|
11410
11417
|
const InputNumber = (props) => {
|
|
11411
11418
|
const {
|
|
11412
11419
|
children,
|
|
@@ -11431,7 +11438,7 @@ const InputNumber = (props) => {
|
|
|
11431
11438
|
onChange,
|
|
11432
11439
|
...restProps
|
|
11433
11440
|
} = {
|
|
11434
|
-
...defaultProps$
|
|
11441
|
+
...defaultProps$V,
|
|
11435
11442
|
...props
|
|
11436
11443
|
};
|
|
11437
11444
|
const inputRef = useRef("");
|
|
@@ -11449,8 +11456,8 @@ const InputNumber = (props) => {
|
|
|
11449
11456
|
}, []);
|
|
11450
11457
|
const classes = classNames(
|
|
11451
11458
|
{
|
|
11452
|
-
[`${classPrefix$
|
|
11453
|
-
[`${classPrefix$
|
|
11459
|
+
[`${classPrefix$g}`]: true,
|
|
11460
|
+
[`${classPrefix$g}--disabled`]: disabled
|
|
11454
11461
|
},
|
|
11455
11462
|
className
|
|
11456
11463
|
);
|
|
@@ -11620,9 +11627,9 @@ const InputNumber = (props) => {
|
|
|
11620
11627
|
}
|
|
11621
11628
|
)), /* @__PURE__ */ React__default.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React__default.createElement(a$9, { className: iconAddClasses, onClick: addNumber })));
|
|
11622
11629
|
};
|
|
11623
|
-
InputNumber.defaultProps = defaultProps$
|
|
11630
|
+
InputNumber.defaultProps = defaultProps$V;
|
|
11624
11631
|
InputNumber.displayName = "NutInputNumber";
|
|
11625
|
-
const defaultProps$
|
|
11632
|
+
const defaultProps$U = {
|
|
11626
11633
|
...ComponentDefaults,
|
|
11627
11634
|
columns: 1,
|
|
11628
11635
|
direction: "down",
|
|
@@ -11652,7 +11659,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
11652
11659
|
parent,
|
|
11653
11660
|
index
|
|
11654
11661
|
} = {
|
|
11655
|
-
...defaultProps$
|
|
11662
|
+
...defaultProps$U,
|
|
11656
11663
|
...props
|
|
11657
11664
|
};
|
|
11658
11665
|
const [showPopup, setShowPopup] = useState(show);
|
|
@@ -11817,9 +11824,9 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
11817
11824
|
)
|
|
11818
11825
|
));
|
|
11819
11826
|
});
|
|
11820
|
-
MenuItem.defaultProps = defaultProps$
|
|
11827
|
+
MenuItem.defaultProps = defaultProps$U;
|
|
11821
11828
|
MenuItem.displayName = "NutMenuItem";
|
|
11822
|
-
const defaultProps$
|
|
11829
|
+
const defaultProps$T = {
|
|
11823
11830
|
...ComponentDefaults,
|
|
11824
11831
|
activeColor: "",
|
|
11825
11832
|
closeOnOverlayClick: true,
|
|
@@ -11844,7 +11851,7 @@ const Menu = (props) => {
|
|
|
11844
11851
|
onOpen,
|
|
11845
11852
|
...rest
|
|
11846
11853
|
} = {
|
|
11847
|
-
...defaultProps$
|
|
11854
|
+
...defaultProps$T,
|
|
11848
11855
|
...props
|
|
11849
11856
|
};
|
|
11850
11857
|
const menuRef = useRef(null);
|
|
@@ -11970,10 +11977,10 @@ const Menu = (props) => {
|
|
|
11970
11977
|
), cloneChildren())
|
|
11971
11978
|
);
|
|
11972
11979
|
};
|
|
11973
|
-
Menu.defaultProps = defaultProps$
|
|
11980
|
+
Menu.defaultProps = defaultProps$T;
|
|
11974
11981
|
Menu.displayName = "NutMenu";
|
|
11975
11982
|
Menu.Item = MenuItem;
|
|
11976
|
-
const defaultProps$
|
|
11983
|
+
const defaultProps$S = {
|
|
11977
11984
|
...ComponentDefaults,
|
|
11978
11985
|
visible: false,
|
|
11979
11986
|
type: "default",
|
|
@@ -11983,7 +11990,7 @@ const defaultProps$R = {
|
|
|
11983
11990
|
}
|
|
11984
11991
|
};
|
|
11985
11992
|
const NumberKeyboard = (props) => {
|
|
11986
|
-
const { locale } = useConfig();
|
|
11993
|
+
const { locale } = useConfig$1();
|
|
11987
11994
|
const {
|
|
11988
11995
|
title,
|
|
11989
11996
|
confirmText,
|
|
@@ -12092,7 +12099,7 @@ const NumberKeyboard = (props) => {
|
|
|
12092
12099
|
"span",
|
|
12093
12100
|
{
|
|
12094
12101
|
className: `${classPrefix2}__header__close`,
|
|
12095
|
-
onClick:
|
|
12102
|
+
onClick: onConfirm
|
|
12096
12103
|
},
|
|
12097
12104
|
locale.done
|
|
12098
12105
|
)), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__body` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__body__keys` }, keysList == null ? void 0 : keysList.map((item) => {
|
|
@@ -12118,17 +12125,17 @@ const NumberKeyboard = (props) => {
|
|
|
12118
12125
|
))))
|
|
12119
12126
|
);
|
|
12120
12127
|
};
|
|
12121
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
12128
|
+
NumberKeyboard.defaultProps = defaultProps$S;
|
|
12122
12129
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
12123
12130
|
const RadioContext = React__default.createContext(null);
|
|
12124
|
-
const defaultProps$
|
|
12131
|
+
const defaultProps$R = {
|
|
12125
12132
|
labelPosition: "right",
|
|
12126
12133
|
onChange: (value) => {
|
|
12127
12134
|
},
|
|
12128
12135
|
direction: "vertical",
|
|
12129
12136
|
options: []
|
|
12130
12137
|
};
|
|
12131
|
-
const classPrefix$
|
|
12138
|
+
const classPrefix$f = "nut-radiogroup";
|
|
12132
12139
|
const RadioGroup = React__default.forwardRef(
|
|
12133
12140
|
(props, ref) => {
|
|
12134
12141
|
const {
|
|
@@ -12142,7 +12149,7 @@ const RadioGroup = React__default.forwardRef(
|
|
|
12142
12149
|
options,
|
|
12143
12150
|
disabled,
|
|
12144
12151
|
...rest
|
|
12145
|
-
} = { ...defaultProps$
|
|
12152
|
+
} = { ...defaultProps$R, ...props };
|
|
12146
12153
|
const [val2State, setVal2State] = usePropsValue({
|
|
12147
12154
|
defaultValue: props.defaultValue,
|
|
12148
12155
|
value: props.value,
|
|
@@ -12184,8 +12191,8 @@ const RadioGroup = React__default.forwardRef(
|
|
|
12184
12191
|
/* @__PURE__ */ React__default.createElement(
|
|
12185
12192
|
"div",
|
|
12186
12193
|
{
|
|
12187
|
-
className: classNames(classPrefix$
|
|
12188
|
-
[`${classPrefix$
|
|
12194
|
+
className: classNames(classPrefix$f, className, {
|
|
12195
|
+
[`${classPrefix$f}--${props.direction}`]: props.direction
|
|
12189
12196
|
}),
|
|
12190
12197
|
...rest
|
|
12191
12198
|
},
|
|
@@ -12194,9 +12201,9 @@ const RadioGroup = React__default.forwardRef(
|
|
|
12194
12201
|
);
|
|
12195
12202
|
}
|
|
12196
12203
|
);
|
|
12197
|
-
RadioGroup.defaultProps = defaultProps$
|
|
12204
|
+
RadioGroup.defaultProps = defaultProps$R;
|
|
12198
12205
|
RadioGroup.displayName = "NutRadioGroup";
|
|
12199
|
-
const defaultProps$
|
|
12206
|
+
const defaultProps$Q = {
|
|
12200
12207
|
...ComponentDefaults,
|
|
12201
12208
|
disabled: false,
|
|
12202
12209
|
shape: "round",
|
|
@@ -12222,7 +12229,7 @@ const Radio = (props) => {
|
|
|
12222
12229
|
onChange,
|
|
12223
12230
|
...others
|
|
12224
12231
|
} = {
|
|
12225
|
-
...defaultProps$
|
|
12232
|
+
...defaultProps$Q,
|
|
12226
12233
|
...props
|
|
12227
12234
|
};
|
|
12228
12235
|
let { labelPosition, disabled, ...rest } = others;
|
|
@@ -12318,10 +12325,10 @@ const Radio = (props) => {
|
|
|
12318
12325
|
renderRadioItem()
|
|
12319
12326
|
);
|
|
12320
12327
|
};
|
|
12321
|
-
Radio.defaultProps = defaultProps$
|
|
12328
|
+
Radio.defaultProps = defaultProps$Q;
|
|
12322
12329
|
Radio.displayName = "NutRadio";
|
|
12323
12330
|
Radio.Group = RadioGroup;
|
|
12324
|
-
const defaultProps$
|
|
12331
|
+
const defaultProps$P = {
|
|
12325
12332
|
...ComponentDefaults,
|
|
12326
12333
|
range: false,
|
|
12327
12334
|
min: 0,
|
|
@@ -12349,7 +12356,7 @@ const Range = (props) => {
|
|
|
12349
12356
|
step,
|
|
12350
12357
|
value,
|
|
12351
12358
|
defaultValue
|
|
12352
|
-
} = { ...defaultProps$
|
|
12359
|
+
} = { ...defaultProps$P, ...props };
|
|
12353
12360
|
const classPrefix2 = "nut-range";
|
|
12354
12361
|
const [buttonIndex, setButtonIndex] = useState(0);
|
|
12355
12362
|
const [dragStatus, setDragStatus] = useState("start");
|
|
@@ -12613,9 +12620,9 @@ const Range = (props) => {
|
|
|
12613
12620
|
renderButton()
|
|
12614
12621
|
))), maxDescription !== null && /* @__PURE__ */ React__default.createElement("div", { className: "max" }, maxDescription || max));
|
|
12615
12622
|
};
|
|
12616
|
-
Range.defaultProps = defaultProps$
|
|
12623
|
+
Range.defaultProps = defaultProps$P;
|
|
12617
12624
|
Range.displayName = "NutRange";
|
|
12618
|
-
const defaultProps$
|
|
12625
|
+
const defaultProps$O = {
|
|
12619
12626
|
...ComponentDefaults,
|
|
12620
12627
|
count: 5,
|
|
12621
12628
|
min: 0,
|
|
@@ -12640,7 +12647,7 @@ const Rate = (props) => {
|
|
|
12640
12647
|
allowHalf,
|
|
12641
12648
|
onChange
|
|
12642
12649
|
} = {
|
|
12643
|
-
...defaultProps$
|
|
12650
|
+
...defaultProps$O,
|
|
12644
12651
|
...props
|
|
12645
12652
|
};
|
|
12646
12653
|
const classPrefix2 = "nut-rate";
|
|
@@ -12723,9 +12730,9 @@ const Rate = (props) => {
|
|
|
12723
12730
|
})
|
|
12724
12731
|
);
|
|
12725
12732
|
};
|
|
12726
|
-
Rate.defaultProps = defaultProps$
|
|
12733
|
+
Rate.defaultProps = defaultProps$O;
|
|
12727
12734
|
Rate.displayName = "NutRate";
|
|
12728
|
-
const defaultProps$
|
|
12735
|
+
const defaultProps$N = {
|
|
12729
12736
|
...ComponentDefaults,
|
|
12730
12737
|
placeholder: "",
|
|
12731
12738
|
shape: "square",
|
|
@@ -12741,7 +12748,7 @@ const defaultProps$M = {
|
|
|
12741
12748
|
};
|
|
12742
12749
|
const SearchBar = (props) => {
|
|
12743
12750
|
const classPrefix2 = "nut-searchbar";
|
|
12744
|
-
const { locale } = useConfig();
|
|
12751
|
+
const { locale } = useConfig$1();
|
|
12745
12752
|
const searchRef = useRef(null);
|
|
12746
12753
|
const [value, setValue] = useState(() => props.value);
|
|
12747
12754
|
const {
|
|
@@ -12764,7 +12771,7 @@ const SearchBar = (props) => {
|
|
|
12764
12771
|
onSearch,
|
|
12765
12772
|
onInputClick
|
|
12766
12773
|
} = {
|
|
12767
|
-
...defaultProps$
|
|
12774
|
+
...defaultProps$N,
|
|
12768
12775
|
...props
|
|
12769
12776
|
};
|
|
12770
12777
|
const forceFocus = () => {
|
|
@@ -12882,9 +12889,9 @@ const SearchBar = (props) => {
|
|
|
12882
12889
|
renderRight()
|
|
12883
12890
|
);
|
|
12884
12891
|
};
|
|
12885
|
-
SearchBar.defaultProps = defaultProps$
|
|
12892
|
+
SearchBar.defaultProps = defaultProps$N;
|
|
12886
12893
|
SearchBar.displayName = "NutSearchBar";
|
|
12887
|
-
const defaultProps$
|
|
12894
|
+
const defaultProps$M = {
|
|
12888
12895
|
...ComponentDefaults,
|
|
12889
12896
|
value: "",
|
|
12890
12897
|
visible: false,
|
|
@@ -12895,7 +12902,7 @@ const defaultProps$L = {
|
|
|
12895
12902
|
autoFocus: false
|
|
12896
12903
|
};
|
|
12897
12904
|
const ShortPassword = (props) => {
|
|
12898
|
-
const { locale } = useConfig();
|
|
12905
|
+
const { locale } = useConfig$1();
|
|
12899
12906
|
const {
|
|
12900
12907
|
title,
|
|
12901
12908
|
description,
|
|
@@ -12921,7 +12928,7 @@ const ShortPassword = (props) => {
|
|
|
12921
12928
|
onCloseIconClick,
|
|
12922
12929
|
...rest
|
|
12923
12930
|
} = {
|
|
12924
|
-
...defaultProps$
|
|
12931
|
+
...defaultProps$M,
|
|
12925
12932
|
...props
|
|
12926
12933
|
};
|
|
12927
12934
|
const classPrefix2 = "nut-shortpassword";
|
|
@@ -12978,9 +12985,9 @@ const ShortPassword = (props) => {
|
|
|
12978
12985
|
), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__footer__sure`, onClick: sure }, locale.confirm)))
|
|
12979
12986
|
);
|
|
12980
12987
|
};
|
|
12981
|
-
ShortPassword.defaultProps = defaultProps$
|
|
12988
|
+
ShortPassword.defaultProps = defaultProps$M;
|
|
12982
12989
|
ShortPassword.displayName = "NutShortPassword";
|
|
12983
|
-
const defaultProps$
|
|
12990
|
+
const defaultProps$L = {
|
|
12984
12991
|
...ComponentDefaults,
|
|
12985
12992
|
canvasId: "spcanvas",
|
|
12986
12993
|
type: "png",
|
|
@@ -12999,7 +13006,7 @@ const InternalSignature = (props, ref) => {
|
|
|
12999
13006
|
onClear,
|
|
13000
13007
|
...rest
|
|
13001
13008
|
} = {
|
|
13002
|
-
...defaultProps$
|
|
13009
|
+
...defaultProps$L,
|
|
13003
13010
|
...props
|
|
13004
13011
|
};
|
|
13005
13012
|
const classPrefix2 = `nut-signature`;
|
|
@@ -13147,9 +13154,9 @@ const InternalSignature = (props, ref) => {
|
|
|
13147
13154
|
)));
|
|
13148
13155
|
};
|
|
13149
13156
|
const Signature = React__default.forwardRef(InternalSignature);
|
|
13150
|
-
Signature.defaultProps = defaultProps$
|
|
13157
|
+
Signature.defaultProps = defaultProps$L;
|
|
13151
13158
|
Signature.displayName = "NutSignature";
|
|
13152
|
-
const defaultProps$
|
|
13159
|
+
const defaultProps$K = {
|
|
13153
13160
|
...ComponentDefaults,
|
|
13154
13161
|
disabled: false,
|
|
13155
13162
|
activeText: "",
|
|
@@ -13164,9 +13171,10 @@ const Switch = (props) => {
|
|
|
13164
13171
|
inactiveText,
|
|
13165
13172
|
className,
|
|
13166
13173
|
style,
|
|
13167
|
-
onChange
|
|
13174
|
+
onChange,
|
|
13175
|
+
...rest
|
|
13168
13176
|
} = {
|
|
13169
|
-
...defaultProps$
|
|
13177
|
+
...defaultProps$K,
|
|
13170
13178
|
...props
|
|
13171
13179
|
};
|
|
13172
13180
|
const classPrefix2 = "nut-switch";
|
|
@@ -13183,11 +13191,20 @@ const Switch = (props) => {
|
|
|
13183
13191
|
onChange && onChange(!value, event);
|
|
13184
13192
|
setValue(!value);
|
|
13185
13193
|
};
|
|
13186
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
13194
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
13195
|
+
"div",
|
|
13196
|
+
{
|
|
13197
|
+
className: classes(),
|
|
13198
|
+
onClick: (e) => onClick(e),
|
|
13199
|
+
style,
|
|
13200
|
+
...rest
|
|
13201
|
+
},
|
|
13202
|
+
/* @__PURE__ */ React__default.createElement("div", { className: "switch-button" }, !value && /* @__PURE__ */ React__default.createElement("div", { className: "close-line" }), activeText && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, value ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__label open` }, activeText) : /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__label close` }, inactiveText)))
|
|
13203
|
+
);
|
|
13187
13204
|
};
|
|
13188
|
-
Switch.defaultProps = defaultProps$
|
|
13205
|
+
Switch.defaultProps = defaultProps$K;
|
|
13189
13206
|
Switch.displayName = "NutSwitch";
|
|
13190
|
-
const defaultProps$
|
|
13207
|
+
const defaultProps$J = {
|
|
13191
13208
|
...ComponentDefaults,
|
|
13192
13209
|
defaultValue: "",
|
|
13193
13210
|
showCount: false,
|
|
@@ -13198,7 +13215,7 @@ const defaultProps$I = {
|
|
|
13198
13215
|
autoSize: false
|
|
13199
13216
|
};
|
|
13200
13217
|
const TextArea = (props) => {
|
|
13201
|
-
const { locale } = useConfig();
|
|
13218
|
+
const { locale } = useConfig$1();
|
|
13202
13219
|
const {
|
|
13203
13220
|
className,
|
|
13204
13221
|
value,
|
|
@@ -13215,7 +13232,7 @@ const TextArea = (props) => {
|
|
|
13215
13232
|
onBlur,
|
|
13216
13233
|
onFocus,
|
|
13217
13234
|
...rest
|
|
13218
|
-
} = { ...defaultProps$
|
|
13235
|
+
} = { ...defaultProps$J, ...props };
|
|
13219
13236
|
const classPrefix2 = "nut-textarea";
|
|
13220
13237
|
const compositionRef = useRef(false);
|
|
13221
13238
|
const format2 = (value2) => {
|
|
@@ -13291,9 +13308,9 @@ const TextArea = (props) => {
|
|
|
13291
13308
|
showCount && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__limit` }, inputValue.length, "/", maxLength < 0 ? 0 : maxLength)
|
|
13292
13309
|
);
|
|
13293
13310
|
};
|
|
13294
|
-
TextArea.defaultProps = defaultProps$
|
|
13311
|
+
TextArea.defaultProps = defaultProps$J;
|
|
13295
13312
|
TextArea.displayName = "NutTextArea";
|
|
13296
|
-
const defaultProps$
|
|
13313
|
+
const defaultProps$I = {
|
|
13297
13314
|
...ComponentDefaults,
|
|
13298
13315
|
percent: 0,
|
|
13299
13316
|
showText: false,
|
|
@@ -13314,7 +13331,7 @@ const Progress = (props) => {
|
|
|
13314
13331
|
delay,
|
|
13315
13332
|
...rest
|
|
13316
13333
|
} = {
|
|
13317
|
-
...defaultProps$
|
|
13334
|
+
...defaultProps$I,
|
|
13318
13335
|
...props
|
|
13319
13336
|
};
|
|
13320
13337
|
const classPrefix2 = "nut-progress";
|
|
@@ -13365,7 +13382,7 @@ const Progress = (props) => {
|
|
|
13365
13382
|
)
|
|
13366
13383
|
))));
|
|
13367
13384
|
};
|
|
13368
|
-
Progress.defaultProps = defaultProps$
|
|
13385
|
+
Progress.defaultProps = defaultProps$I;
|
|
13369
13386
|
Progress.displayName = "NutProgress";
|
|
13370
13387
|
class UploadOptions {
|
|
13371
13388
|
constructor() {
|
|
@@ -13508,7 +13525,7 @@ const funcInterceptor = (interceptor, {
|
|
|
13508
13525
|
done();
|
|
13509
13526
|
}
|
|
13510
13527
|
};
|
|
13511
|
-
const defaultProps$
|
|
13528
|
+
const defaultProps$H = {
|
|
13512
13529
|
...ComponentDefaults,
|
|
13513
13530
|
url: "",
|
|
13514
13531
|
maxCount: 1,
|
|
@@ -13543,7 +13560,7 @@ class FileItem {
|
|
|
13543
13560
|
constructor() {
|
|
13544
13561
|
__publicField(this, "status", "ready");
|
|
13545
13562
|
__publicField(this, "message", "准备中..");
|
|
13546
|
-
__publicField(this, "uid",
|
|
13563
|
+
__publicField(this, "uid", Date.now().toString());
|
|
13547
13564
|
__publicField(this, "name");
|
|
13548
13565
|
__publicField(this, "url");
|
|
13549
13566
|
__publicField(this, "type");
|
|
@@ -13553,7 +13570,7 @@ class FileItem {
|
|
|
13553
13570
|
}
|
|
13554
13571
|
}
|
|
13555
13572
|
const InternalUploader = (props, ref) => {
|
|
13556
|
-
const { locale } = useConfig();
|
|
13573
|
+
const { locale } = useConfig$1();
|
|
13557
13574
|
const {
|
|
13558
13575
|
children,
|
|
13559
13576
|
uploadIcon,
|
|
@@ -13596,7 +13613,7 @@ const InternalUploader = (props, ref) => {
|
|
|
13596
13613
|
beforeXhrUpload,
|
|
13597
13614
|
beforeDelete,
|
|
13598
13615
|
...restProps
|
|
13599
|
-
} = { ...defaultProps$
|
|
13616
|
+
} = { ...defaultProps$H, ...props };
|
|
13600
13617
|
const [fileList, setFileList] = useState(defaultValue || []);
|
|
13601
13618
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
13602
13619
|
useEffect(() => {
|
|
@@ -13783,6 +13800,7 @@ const InternalUploader = (props, ref) => {
|
|
|
13783
13800
|
fileItem.name = filepath;
|
|
13784
13801
|
fileItem.status = "ready";
|
|
13785
13802
|
fileItem.type = fileType;
|
|
13803
|
+
fileItem.uid = `${fileItem.uid}_${index}`;
|
|
13786
13804
|
if (autoUpload) {
|
|
13787
13805
|
fileItem.message = locale.uploader.readyUpload;
|
|
13788
13806
|
} else {
|
|
@@ -13855,7 +13873,7 @@ const InternalUploader = (props, ref) => {
|
|
|
13855
13873
|
const handleItemClick = (file) => {
|
|
13856
13874
|
onFileItemClick && onFileItemClick(file);
|
|
13857
13875
|
};
|
|
13858
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: classes, ...restProps }, children && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__slot" }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children, maxCount > fileList.length && /* @__PURE__ */ React__default.createElement(Button, { className: "nut-uploader__input", onClick: _chooseImage }))), fileList.length !== 0 && fileList.map((item, index) => {
|
|
13876
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: classes, ...restProps }, children && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader__slot" }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children, maxCount > fileList.length && /* @__PURE__ */ React__default.createElement(Button, { className: "nut-uploader__input", onClick: _chooseImage }))), fileList.length !== 0 && Array.isArray(fileList) && fileList.map((item, index) => {
|
|
13859
13877
|
return /* @__PURE__ */ React__default.createElement(
|
|
13860
13878
|
"div",
|
|
13861
13879
|
{
|
|
@@ -13931,9 +13949,9 @@ const InternalUploader = (props, ref) => {
|
|
|
13931
13949
|
));
|
|
13932
13950
|
};
|
|
13933
13951
|
const Uploader = React__default.forwardRef(InternalUploader);
|
|
13934
|
-
Uploader.defaultProps = defaultProps$
|
|
13952
|
+
Uploader.defaultProps = defaultProps$H;
|
|
13935
13953
|
Uploader.displayName = "NutUploader";
|
|
13936
|
-
const defaultProps$
|
|
13954
|
+
const defaultProps$G = {
|
|
13937
13955
|
...ComponentDefaults,
|
|
13938
13956
|
visible: false,
|
|
13939
13957
|
description: "",
|
|
@@ -13959,7 +13977,7 @@ const ActionSheet = (props) => {
|
|
|
13959
13977
|
className,
|
|
13960
13978
|
style,
|
|
13961
13979
|
...rest
|
|
13962
|
-
} = { ...defaultProps$
|
|
13980
|
+
} = { ...defaultProps$G, ...props };
|
|
13963
13981
|
const classPrefix2 = "nut-actionsheet";
|
|
13964
13982
|
const cancelActionSheet = () => {
|
|
13965
13983
|
onCancel && onCancel();
|
|
@@ -14002,7 +14020,7 @@ const ActionSheet = (props) => {
|
|
|
14002
14020
|
))
|
|
14003
14021
|
);
|
|
14004
14022
|
};
|
|
14005
|
-
ActionSheet.defaultProps = defaultProps$
|
|
14023
|
+
ActionSheet.defaultProps = defaultProps$G;
|
|
14006
14024
|
ActionSheet.displayName = "NutActionSheet";
|
|
14007
14025
|
const Content = (props) => {
|
|
14008
14026
|
const { visible, title, footer, footerDirection, onClick, children } = props;
|
|
@@ -14092,7 +14110,7 @@ const DialogWrap = (props) => {
|
|
|
14092
14110
|
};
|
|
14093
14111
|
DialogWrap.defaultProps = defaultDialogProps;
|
|
14094
14112
|
DialogWrap.displayName = "NutDialogWrap";
|
|
14095
|
-
const defaultProps$
|
|
14113
|
+
const defaultProps$F = {
|
|
14096
14114
|
confirmText: "",
|
|
14097
14115
|
cancelText: "",
|
|
14098
14116
|
overlay: true,
|
|
@@ -14107,7 +14125,7 @@ const defaultProps$E = {
|
|
|
14107
14125
|
};
|
|
14108
14126
|
const BaseDialog = forwardRef(
|
|
14109
14127
|
(props, ref) => {
|
|
14110
|
-
const { locale } = useConfig();
|
|
14128
|
+
const { locale } = useConfig$1();
|
|
14111
14129
|
const {
|
|
14112
14130
|
visible,
|
|
14113
14131
|
footer,
|
|
@@ -14187,9 +14205,9 @@ const BaseDialog = forwardRef(
|
|
|
14187
14205
|
);
|
|
14188
14206
|
}
|
|
14189
14207
|
);
|
|
14190
|
-
BaseDialog.defaultProps = defaultProps$
|
|
14208
|
+
BaseDialog.defaultProps = defaultProps$F;
|
|
14191
14209
|
BaseDialog.displayName = "NutDialog";
|
|
14192
|
-
const defaultProps$
|
|
14210
|
+
const defaultProps$E = {
|
|
14193
14211
|
...ComponentDefaults,
|
|
14194
14212
|
attract: false,
|
|
14195
14213
|
direction: void 0,
|
|
@@ -14203,7 +14221,7 @@ const defaultProps$D = {
|
|
|
14203
14221
|
};
|
|
14204
14222
|
const Drag = (props) => {
|
|
14205
14223
|
const { attract, direction, boundary, children, className, style, ...reset } = {
|
|
14206
|
-
...defaultProps$
|
|
14224
|
+
...defaultProps$E,
|
|
14207
14225
|
...props
|
|
14208
14226
|
};
|
|
14209
14227
|
const classPrefix2 = "nut-drag";
|
|
@@ -14300,23 +14318,23 @@ const Drag = (props) => {
|
|
|
14300
14318
|
)
|
|
14301
14319
|
);
|
|
14302
14320
|
};
|
|
14303
|
-
Drag.defaultProps = defaultProps$
|
|
14321
|
+
Drag.defaultProps = defaultProps$E;
|
|
14304
14322
|
Drag.displayName = "NutDrag";
|
|
14305
14323
|
const defaultStatus = {
|
|
14306
14324
|
empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
|
|
14307
14325
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
14308
14326
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
14309
14327
|
};
|
|
14310
|
-
const defaultProps$
|
|
14328
|
+
const defaultProps$D = {
|
|
14311
14329
|
...ComponentDefaults,
|
|
14312
14330
|
description: "",
|
|
14313
14331
|
imageSize: "",
|
|
14314
14332
|
status: "empty"
|
|
14315
14333
|
};
|
|
14316
|
-
const classPrefix$
|
|
14334
|
+
const classPrefix$e = `nut-empty`;
|
|
14317
14335
|
const Empty = (props) => {
|
|
14318
|
-
const { locale } = useConfig();
|
|
14319
|
-
defaultProps$
|
|
14336
|
+
const { locale } = useConfig$1();
|
|
14337
|
+
defaultProps$D.description = locale.noData || defaultProps$D.description;
|
|
14320
14338
|
const {
|
|
14321
14339
|
image,
|
|
14322
14340
|
imageSize,
|
|
@@ -14326,7 +14344,7 @@ const Empty = (props) => {
|
|
|
14326
14344
|
status,
|
|
14327
14345
|
...rest
|
|
14328
14346
|
} = {
|
|
14329
|
-
...defaultProps$
|
|
14347
|
+
...defaultProps$D,
|
|
14330
14348
|
...props
|
|
14331
14349
|
};
|
|
14332
14350
|
const [imgStyle, setImgStyle] = useState({});
|
|
@@ -14349,20 +14367,20 @@ const Empty = (props) => {
|
|
|
14349
14367
|
};
|
|
14350
14368
|
});
|
|
14351
14369
|
}, [imageSize]);
|
|
14352
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
14370
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$e} ${className}`, ...rest }, /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$e}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$e}__description` }, description) : description, children));
|
|
14353
14371
|
};
|
|
14354
|
-
Empty.defaultProps = defaultProps$
|
|
14372
|
+
Empty.defaultProps = defaultProps$D;
|
|
14355
14373
|
Empty.displayName = "NutEmpty";
|
|
14356
|
-
const defaultProps$
|
|
14374
|
+
const defaultProps$C = {
|
|
14357
14375
|
...ComponentDefaults,
|
|
14358
14376
|
hasMore: true,
|
|
14359
14377
|
threshold: 40,
|
|
14360
14378
|
target: "",
|
|
14361
14379
|
pullRefresh: false
|
|
14362
14380
|
};
|
|
14363
|
-
const classPrefix$
|
|
14381
|
+
const classPrefix$d = `nut-infiniteloading`;
|
|
14364
14382
|
const InfiniteLoading = (props) => {
|
|
14365
|
-
const { locale } = useConfig();
|
|
14383
|
+
const { locale } = useConfig$1();
|
|
14366
14384
|
const {
|
|
14367
14385
|
children,
|
|
14368
14386
|
hasMore,
|
|
@@ -14377,7 +14395,7 @@ const InfiniteLoading = (props) => {
|
|
|
14377
14395
|
onLoadMore,
|
|
14378
14396
|
onScroll
|
|
14379
14397
|
} = {
|
|
14380
|
-
...defaultProps$
|
|
14398
|
+
...defaultProps$C,
|
|
14381
14399
|
...props
|
|
14382
14400
|
};
|
|
14383
14401
|
const [isInfiniting, setIsInfiniting] = useState(false);
|
|
@@ -14390,7 +14408,7 @@ const InfiniteLoading = (props) => {
|
|
|
14390
14408
|
const y2 = useRef(0);
|
|
14391
14409
|
const refreshMaxH = useRef(0);
|
|
14392
14410
|
const distance = useRef(0);
|
|
14393
|
-
const classes = classNames(className, classPrefix$
|
|
14411
|
+
const classes = classNames(className, classPrefix$d);
|
|
14394
14412
|
useEffect(() => {
|
|
14395
14413
|
refreshMaxH.current = threshold;
|
|
14396
14414
|
setTimeout(() => {
|
|
@@ -14489,13 +14507,13 @@ const InfiniteLoading = (props) => {
|
|
|
14489
14507
|
/* @__PURE__ */ React__default.createElement("div", { className: "nut-infinite-bottom" }, isInfiniting ? /* @__PURE__ */ React__default.createElement("div", { className: "bottom-box" }, loadingText || locale.infiniteloading.loadText) : !hasMore && /* @__PURE__ */ React__default.createElement("div", { className: "tips" }, loadMoreText || locale.infiniteloading.loadMoreText))
|
|
14490
14508
|
);
|
|
14491
14509
|
};
|
|
14492
|
-
InfiniteLoading.defaultProps = defaultProps$
|
|
14510
|
+
InfiniteLoading.defaultProps = defaultProps$C;
|
|
14493
14511
|
InfiniteLoading.displayName = "NutInfiniteLoading";
|
|
14494
14512
|
const loadingMap = {
|
|
14495
14513
|
circular: r$g,
|
|
14496
14514
|
spinner: r$h
|
|
14497
14515
|
};
|
|
14498
|
-
const defaultProps$
|
|
14516
|
+
const defaultProps$B = {
|
|
14499
14517
|
...ComponentDefaults,
|
|
14500
14518
|
// 对比一下,个人感觉还是Loading1比较好看一些,所以用它作为了默认的loading图标
|
|
14501
14519
|
type: "circular",
|
|
@@ -14503,7 +14521,7 @@ const defaultProps$A = {
|
|
|
14503
14521
|
};
|
|
14504
14522
|
const Loading = (props) => {
|
|
14505
14523
|
const { className, style, children, direction, icon, ...rest } = {
|
|
14506
|
-
...defaultProps$
|
|
14524
|
+
...defaultProps$B,
|
|
14507
14525
|
...props
|
|
14508
14526
|
};
|
|
14509
14527
|
const classPrefix2 = "nut-loading";
|
|
@@ -14522,9 +14540,9 @@ const Loading = (props) => {
|
|
|
14522
14540
|
children ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-text` }, children) : ""
|
|
14523
14541
|
);
|
|
14524
14542
|
};
|
|
14525
|
-
Loading.defaultProps = defaultProps$
|
|
14543
|
+
Loading.defaultProps = defaultProps$B;
|
|
14526
14544
|
Loading.displayName = "NutLoading";
|
|
14527
|
-
const defaultProps$
|
|
14545
|
+
const defaultProps$A = {
|
|
14528
14546
|
...ComponentDefaults,
|
|
14529
14547
|
direction: "horizontal",
|
|
14530
14548
|
list: [],
|
|
@@ -14562,7 +14580,7 @@ const NoticeBar = (props) => {
|
|
|
14562
14580
|
onClick,
|
|
14563
14581
|
onItemClick
|
|
14564
14582
|
} = {
|
|
14565
|
-
...defaultProps$
|
|
14583
|
+
...defaultProps$A,
|
|
14566
14584
|
...props
|
|
14567
14585
|
};
|
|
14568
14586
|
const classPrefix2 = "nut-noticebar";
|
|
@@ -14924,7 +14942,7 @@ const NoticeBar = (props) => {
|
|
|
14924
14942
|
)
|
|
14925
14943
|
) : null);
|
|
14926
14944
|
};
|
|
14927
|
-
NoticeBar.defaultProps = defaultProps$
|
|
14945
|
+
NoticeBar.defaultProps = defaultProps$A;
|
|
14928
14946
|
NoticeBar.displayName = "NutNoticeBar";
|
|
14929
14947
|
const customEvents = new Events();
|
|
14930
14948
|
function useCustomEventsPath(selector) {
|
|
@@ -14948,7 +14966,7 @@ function useCustomEvent(selector, cb) {
|
|
|
14948
14966
|
};
|
|
14949
14967
|
return [trigger, off];
|
|
14950
14968
|
}
|
|
14951
|
-
const defaultProps$
|
|
14969
|
+
const defaultProps$z = {
|
|
14952
14970
|
...ComponentDefaults,
|
|
14953
14971
|
id: "",
|
|
14954
14972
|
duration: 3e3,
|
|
@@ -14961,7 +14979,7 @@ const defaultProps$y = {
|
|
|
14961
14979
|
onClick: () => {
|
|
14962
14980
|
}
|
|
14963
14981
|
};
|
|
14964
|
-
const classPrefix$
|
|
14982
|
+
const classPrefix$c = "nut-notify";
|
|
14965
14983
|
const Notify = (props) => {
|
|
14966
14984
|
const {
|
|
14967
14985
|
id,
|
|
@@ -14974,7 +14992,7 @@ const Notify = (props) => {
|
|
|
14974
14992
|
duration,
|
|
14975
14993
|
onClose,
|
|
14976
14994
|
onClick
|
|
14977
|
-
} = { ...defaultProps$
|
|
14995
|
+
} = { ...defaultProps$z, ...props };
|
|
14978
14996
|
useCustomEvent(id, (status) => {
|
|
14979
14997
|
status ? show() : hide();
|
|
14980
14998
|
});
|
|
@@ -15010,10 +15028,10 @@ const Notify = (props) => {
|
|
|
15010
15028
|
onClose();
|
|
15011
15029
|
};
|
|
15012
15030
|
const classes = classNames({
|
|
15013
|
-
[`${classPrefix$
|
|
15014
|
-
[`${classPrefix$
|
|
15015
|
-
[`${classPrefix$
|
|
15016
|
-
[`${classPrefix$
|
|
15031
|
+
[`${classPrefix$c}--popup-top`]: position === "top",
|
|
15032
|
+
[`${classPrefix$c}--popup-bottom`]: position === "bottom",
|
|
15033
|
+
[`${classPrefix$c}`]: true,
|
|
15034
|
+
[`${classPrefix$c}--${type4}`]: true
|
|
15017
15035
|
});
|
|
15018
15036
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
15019
15037
|
CSSTransition$1,
|
|
@@ -15045,16 +15063,17 @@ function close(selector) {
|
|
|
15045
15063
|
const path = useCustomEventsPath(selector);
|
|
15046
15064
|
customEvents.trigger(path, false);
|
|
15047
15065
|
}
|
|
15048
|
-
Notify.defaultProps = defaultProps$
|
|
15066
|
+
Notify.defaultProps = defaultProps$z;
|
|
15049
15067
|
Notify.displayName = "NutNotify";
|
|
15050
15068
|
Notify.open = open;
|
|
15051
15069
|
Notify.close = close;
|
|
15052
|
-
const defaultProps$
|
|
15070
|
+
const defaultProps$y = {
|
|
15053
15071
|
...ComponentDefaults,
|
|
15054
15072
|
list: [],
|
|
15055
15073
|
location: "bottom",
|
|
15056
15074
|
visible: false,
|
|
15057
15075
|
offset: [0, 12],
|
|
15076
|
+
arrowOffset: 0,
|
|
15058
15077
|
targetId: "",
|
|
15059
15078
|
className: "",
|
|
15060
15079
|
showArrow: true,
|
|
@@ -15068,7 +15087,7 @@ const defaultProps$x = {
|
|
|
15068
15087
|
onClose: () => {
|
|
15069
15088
|
}
|
|
15070
15089
|
};
|
|
15071
|
-
const classPrefix$
|
|
15090
|
+
const classPrefix$b = `nut-popover`;
|
|
15072
15091
|
const Popover = (props) => {
|
|
15073
15092
|
const {
|
|
15074
15093
|
children,
|
|
@@ -15082,6 +15101,7 @@ const Popover = (props) => {
|
|
|
15082
15101
|
closeOnActionClick,
|
|
15083
15102
|
className,
|
|
15084
15103
|
showArrow,
|
|
15104
|
+
arrowOffset,
|
|
15085
15105
|
style,
|
|
15086
15106
|
onClick,
|
|
15087
15107
|
onOpen,
|
|
@@ -15089,7 +15109,7 @@ const Popover = (props) => {
|
|
|
15089
15109
|
onSelect,
|
|
15090
15110
|
...rest
|
|
15091
15111
|
} = {
|
|
15092
|
-
...defaultProps$
|
|
15112
|
+
...defaultProps$y,
|
|
15093
15113
|
...props
|
|
15094
15114
|
};
|
|
15095
15115
|
const popoverRef = useRef(null);
|
|
@@ -15153,7 +15173,7 @@ const Popover = (props) => {
|
|
|
15153
15173
|
};
|
|
15154
15174
|
const classes = classNames(
|
|
15155
15175
|
{
|
|
15156
|
-
[`${classPrefix$
|
|
15176
|
+
[`${classPrefix$b}`]: true
|
|
15157
15177
|
},
|
|
15158
15178
|
className
|
|
15159
15179
|
);
|
|
@@ -15215,6 +15235,37 @@ const Popover = (props) => {
|
|
|
15215
15235
|
}
|
|
15216
15236
|
return styles;
|
|
15217
15237
|
};
|
|
15238
|
+
const popoverArrowStyle = () => {
|
|
15239
|
+
const styles = {};
|
|
15240
|
+
const direction = location.split("-")[0];
|
|
15241
|
+
const skew = location.split("-")[1];
|
|
15242
|
+
const base = 16;
|
|
15243
|
+
if (props.arrowOffset !== 0) {
|
|
15244
|
+
if (["bottom", "top"].includes(direction)) {
|
|
15245
|
+
if (!skew) {
|
|
15246
|
+
styles.left = `calc(50% + ${arrowOffset}px)`;
|
|
15247
|
+
}
|
|
15248
|
+
if (skew === "start") {
|
|
15249
|
+
styles.left = `${base + arrowOffset}px`;
|
|
15250
|
+
}
|
|
15251
|
+
if (skew === "end") {
|
|
15252
|
+
styles.right = `${base - arrowOffset}px`;
|
|
15253
|
+
}
|
|
15254
|
+
}
|
|
15255
|
+
if (["left", "right"].includes(direction)) {
|
|
15256
|
+
if (!skew) {
|
|
15257
|
+
styles.top = `calc(50% - ${arrowOffset}px)`;
|
|
15258
|
+
}
|
|
15259
|
+
if (skew === "start") {
|
|
15260
|
+
styles.top = `${base - arrowOffset}px`;
|
|
15261
|
+
}
|
|
15262
|
+
if (skew === "end") {
|
|
15263
|
+
styles.bottom = `${base + arrowOffset}px`;
|
|
15264
|
+
}
|
|
15265
|
+
}
|
|
15266
|
+
}
|
|
15267
|
+
return styles;
|
|
15268
|
+
};
|
|
15218
15269
|
const handleSelect = (item, index) => {
|
|
15219
15270
|
if (!item.disabled) {
|
|
15220
15271
|
onSelect && onSelect(item, index);
|
|
@@ -15249,7 +15300,7 @@ const Popover = (props) => {
|
|
|
15249
15300
|
visible: showPopup,
|
|
15250
15301
|
...rest
|
|
15251
15302
|
},
|
|
15252
|
-
/* @__PURE__ */ React__default.createElement("div", { className: "nut-popover-content-group", ref: popoverContentRef }, showArrow && /* @__PURE__ */ React__default.createElement("div", { className: popoverArrow() }), Array.isArray(children) ? children[1] : "", list.map((item, index) => {
|
|
15303
|
+
/* @__PURE__ */ React__default.createElement("div", { className: "nut-popover-content-group", ref: popoverContentRef }, showArrow && /* @__PURE__ */ React__default.createElement("div", { className: popoverArrow(), style: popoverArrowStyle() }), Array.isArray(children) ? children[1] : "", list.map((item, index) => {
|
|
15253
15304
|
return /* @__PURE__ */ React__default.createElement(
|
|
15254
15305
|
"div",
|
|
15255
15306
|
{
|
|
@@ -15267,7 +15318,7 @@ const Popover = (props) => {
|
|
|
15267
15318
|
/* @__PURE__ */ React__default.createElement("div", { className: "nut-popover-menu-item-name" }, item.name)
|
|
15268
15319
|
);
|
|
15269
15320
|
}))
|
|
15270
|
-
), showPopup && /* @__PURE__ */ React__default.createElement(
|
|
15321
|
+
), showPopup && closeOnOutsideClick && /* @__PURE__ */ React__default.createElement(
|
|
15271
15322
|
"div",
|
|
15272
15323
|
{
|
|
15273
15324
|
className: "nut-popover-content-bg",
|
|
@@ -15276,7 +15327,7 @@ const Popover = (props) => {
|
|
|
15276
15327
|
}
|
|
15277
15328
|
)));
|
|
15278
15329
|
};
|
|
15279
|
-
Popover.defaultProps = defaultProps$
|
|
15330
|
+
Popover.defaultProps = defaultProps$y;
|
|
15280
15331
|
Popover.displayName = "NutPopover";
|
|
15281
15332
|
function bound(position, min, max) {
|
|
15282
15333
|
let ret = position;
|
|
@@ -15301,7 +15352,7 @@ function rubberbandIfOutOfBounds(position, min, max, dimension, constant = 0.15)
|
|
|
15301
15352
|
return position;
|
|
15302
15353
|
}
|
|
15303
15354
|
const sleep = (time) => new Promise((resolve) => setTimeout(resolve, time));
|
|
15304
|
-
const defaultProps$
|
|
15355
|
+
const defaultProps$x = {
|
|
15305
15356
|
...ComponentDefaults,
|
|
15306
15357
|
pullingText: "",
|
|
15307
15358
|
canReleaseText: "",
|
|
@@ -15317,10 +15368,10 @@ const defaultProps$w = {
|
|
|
15317
15368
|
};
|
|
15318
15369
|
const PullToRefresh = (p) => {
|
|
15319
15370
|
const classPrefix2 = "nut-pulltorefresh";
|
|
15320
|
-
const { locale } = useConfig();
|
|
15371
|
+
const { locale } = useConfig$1();
|
|
15321
15372
|
const touch = useTouch();
|
|
15322
15373
|
const props = {
|
|
15323
|
-
...defaultProps$
|
|
15374
|
+
...defaultProps$x,
|
|
15324
15375
|
...p,
|
|
15325
15376
|
...{
|
|
15326
15377
|
pullingText: p.pullingText || locale.pullToRefresh.pullingText,
|
|
@@ -15420,10 +15471,10 @@ const PullToRefresh = (p) => {
|
|
|
15420
15471
|
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-content` }, props.children)
|
|
15421
15472
|
);
|
|
15422
15473
|
};
|
|
15423
|
-
PullToRefresh.defaultProps = defaultProps$
|
|
15474
|
+
PullToRefresh.defaultProps = defaultProps$x;
|
|
15424
15475
|
PullToRefresh.displayName = "NutPullToRefresh";
|
|
15425
15476
|
const AvatarContext = createContext({});
|
|
15426
|
-
const defaultProps$
|
|
15477
|
+
const defaultProps$w = {
|
|
15427
15478
|
...ComponentDefaults,
|
|
15428
15479
|
maxContent: "",
|
|
15429
15480
|
max: "",
|
|
@@ -15432,21 +15483,21 @@ const defaultProps$v = {
|
|
|
15432
15483
|
gap: "-8",
|
|
15433
15484
|
level: "left"
|
|
15434
15485
|
};
|
|
15435
|
-
const classPrefix$
|
|
15486
|
+
const classPrefix$a = `nut-avatar-group`;
|
|
15436
15487
|
const AvatarGroup = (props) => {
|
|
15437
|
-
const propAvatarGroup = { ...defaultProps$
|
|
15488
|
+
const propAvatarGroup = { ...defaultProps$w, ...props };
|
|
15438
15489
|
const { className, style, children } = propAvatarGroup;
|
|
15439
15490
|
const avatarGroupRef = useRef(null);
|
|
15440
|
-
const cls = classNames(classPrefix$
|
|
15491
|
+
const cls = classNames(classPrefix$a, className);
|
|
15441
15492
|
const parentAvatar = {
|
|
15442
15493
|
propAvatarGroup,
|
|
15443
15494
|
avatarGroupRef
|
|
15444
15495
|
};
|
|
15445
15496
|
return /* @__PURE__ */ React__default.createElement(AvatarContext.Provider, { value: parentAvatar }, /* @__PURE__ */ React__default.createElement("div", { className: cls, style, ref: avatarGroupRef }, children));
|
|
15446
15497
|
};
|
|
15447
|
-
AvatarGroup.defaultProps = defaultProps$
|
|
15498
|
+
AvatarGroup.defaultProps = defaultProps$w;
|
|
15448
15499
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
15449
|
-
const defaultProps$
|
|
15500
|
+
const defaultProps$v = {
|
|
15450
15501
|
...ComponentDefaults,
|
|
15451
15502
|
size: "",
|
|
15452
15503
|
shape: "round",
|
|
@@ -15457,7 +15508,7 @@ const defaultProps$u = {
|
|
|
15457
15508
|
src: "",
|
|
15458
15509
|
alt: ""
|
|
15459
15510
|
};
|
|
15460
|
-
const classPrefix$
|
|
15511
|
+
const classPrefix$9 = `nut-avatar`;
|
|
15461
15512
|
const Avatar = (props) => {
|
|
15462
15513
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
15463
15514
|
const {
|
|
@@ -15476,7 +15527,7 @@ const Avatar = (props) => {
|
|
|
15476
15527
|
onError,
|
|
15477
15528
|
...rest
|
|
15478
15529
|
} = {
|
|
15479
|
-
...defaultProps$
|
|
15530
|
+
...defaultProps$v,
|
|
15480
15531
|
...props
|
|
15481
15532
|
};
|
|
15482
15533
|
const [maxSum, setMaxSum] = useState(0);
|
|
@@ -15489,7 +15540,7 @@ const Avatar = (props) => {
|
|
|
15489
15540
|
[`nut-avatar-${((_a = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a.size) || size || "normal"}`]: true,
|
|
15490
15541
|
[`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
|
|
15491
15542
|
});
|
|
15492
|
-
const cls = classNames(classPrefix$
|
|
15543
|
+
const cls = classNames(classPrefix$9, classes, className);
|
|
15493
15544
|
const styles = {
|
|
15494
15545
|
width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
15495
15546
|
height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
@@ -15557,10 +15608,10 @@ const Avatar = (props) => {
|
|
|
15557
15608
|
showMax && /* @__PURE__ */ React__default.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)}`)
|
|
15558
15609
|
));
|
|
15559
15610
|
};
|
|
15560
|
-
Avatar.defaultProps = defaultProps$
|
|
15611
|
+
Avatar.defaultProps = defaultProps$v;
|
|
15561
15612
|
Avatar.displayName = "NutAvatar";
|
|
15562
15613
|
Avatar.Group = AvatarGroup;
|
|
15563
|
-
const defaultProps$
|
|
15614
|
+
const defaultProps$u = {
|
|
15564
15615
|
...ComponentDefaults,
|
|
15565
15616
|
rows: 1,
|
|
15566
15617
|
animated: false,
|
|
@@ -15583,7 +15634,7 @@ const Skeleton = (props) => {
|
|
|
15583
15634
|
avatarShape,
|
|
15584
15635
|
...rest
|
|
15585
15636
|
} = {
|
|
15586
|
-
...defaultProps$
|
|
15637
|
+
...defaultProps$u,
|
|
15587
15638
|
...props
|
|
15588
15639
|
};
|
|
15589
15640
|
const classPrefix2 = "nut-skeleton";
|
|
@@ -15620,7 +15671,7 @@ const Skeleton = (props) => {
|
|
|
15620
15671
|
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__block`, key: index });
|
|
15621
15672
|
})))));
|
|
15622
15673
|
};
|
|
15623
|
-
Skeleton.defaultProps = defaultProps$
|
|
15674
|
+
Skeleton.defaultProps = defaultProps$u;
|
|
15624
15675
|
Skeleton.displayName = "NutSkeleton";
|
|
15625
15676
|
function preventDefault(event, isStopPropagation) {
|
|
15626
15677
|
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
@@ -15630,7 +15681,7 @@ function preventDefault(event, isStopPropagation) {
|
|
|
15630
15681
|
event.stopPropagation();
|
|
15631
15682
|
}
|
|
15632
15683
|
}
|
|
15633
|
-
const defaultProps$
|
|
15684
|
+
const defaultProps$t = {
|
|
15634
15685
|
...ComponentDefaults,
|
|
15635
15686
|
name: ""
|
|
15636
15687
|
};
|
|
@@ -15650,7 +15701,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
15650
15701
|
};
|
|
15651
15702
|
nextTick(() => getWidth());
|
|
15652
15703
|
});
|
|
15653
|
-
const { children, className, style } = { ...defaultProps$
|
|
15704
|
+
const { children, className, style } = { ...defaultProps$t, ...props };
|
|
15654
15705
|
const root2 = useRef();
|
|
15655
15706
|
const opened = useRef(false);
|
|
15656
15707
|
const lockClick = useRef(false);
|
|
@@ -15806,9 +15857,9 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
15806
15857
|
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__wrapper`, style: wrapperStyle }, renderActionContent("left"), children, renderActionContent("right"))
|
|
15807
15858
|
);
|
|
15808
15859
|
});
|
|
15809
|
-
Swipe.defaultProps = defaultProps$
|
|
15860
|
+
Swipe.defaultProps = defaultProps$t;
|
|
15810
15861
|
Swipe.displayName = "NutSwipe";
|
|
15811
|
-
const defaultProps$
|
|
15862
|
+
const defaultProps$s = {
|
|
15812
15863
|
...ComponentDefaults,
|
|
15813
15864
|
id: "",
|
|
15814
15865
|
icon: null,
|
|
@@ -15830,7 +15881,7 @@ const defaultProps$r = {
|
|
|
15830
15881
|
}
|
|
15831
15882
|
// 未实现
|
|
15832
15883
|
};
|
|
15833
|
-
const classPrefix$
|
|
15884
|
+
const classPrefix$8 = "nut-toast";
|
|
15834
15885
|
const Toast = (props) => {
|
|
15835
15886
|
const {
|
|
15836
15887
|
children,
|
|
@@ -15852,7 +15903,7 @@ const Toast = (props) => {
|
|
|
15852
15903
|
style,
|
|
15853
15904
|
onClose,
|
|
15854
15905
|
...rest
|
|
15855
|
-
} = { ...defaultProps$
|
|
15906
|
+
} = { ...defaultProps$s, ...props };
|
|
15856
15907
|
let timer;
|
|
15857
15908
|
const [openState, SetOpenState] = useState(false);
|
|
15858
15909
|
useEffect(() => {
|
|
@@ -15912,28 +15963,28 @@ const Toast = (props) => {
|
|
|
15912
15963
|
{
|
|
15913
15964
|
visible: openState,
|
|
15914
15965
|
style,
|
|
15915
|
-
className: `${classPrefix$
|
|
15966
|
+
className: `${classPrefix$8}__overlay-default ${className}`,
|
|
15916
15967
|
closeOnOverlayClick,
|
|
15917
15968
|
lockScroll,
|
|
15918
15969
|
onClick: () => {
|
|
15919
15970
|
clickCover();
|
|
15920
15971
|
}
|
|
15921
15972
|
},
|
|
15922
|
-
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
15973
|
+
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$8} ${classes}`, id }, /* @__PURE__ */ React__default.createElement(
|
|
15923
15974
|
"div",
|
|
15924
15975
|
{
|
|
15925
|
-
className: `${classPrefix$
|
|
15976
|
+
className: `${classPrefix$8}__inner ${classPrefix$8}-${position} ${contentClassName}`,
|
|
15926
15977
|
style: contentStyle
|
|
15927
15978
|
},
|
|
15928
|
-
hasIcon() ? /* @__PURE__ */ React__default.createElement("p", { className: `${classPrefix$
|
|
15929
|
-
title ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$
|
|
15930
|
-
/* @__PURE__ */ React__default.createElement("span", { className: `${classPrefix$
|
|
15979
|
+
hasIcon() ? /* @__PURE__ */ React__default.createElement("p", { className: `${classPrefix$8}__icon-wrapper` }, iconName()) : null,
|
|
15980
|
+
title ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$8}-title` }, title) : null,
|
|
15981
|
+
/* @__PURE__ */ React__default.createElement("span", { className: `${classPrefix$8}-text` }, msg)
|
|
15931
15982
|
))
|
|
15932
15983
|
) : null);
|
|
15933
15984
|
};
|
|
15934
|
-
Toast.defaultProps = defaultProps$
|
|
15985
|
+
Toast.defaultProps = defaultProps$s;
|
|
15935
15986
|
Toast.displayName = "NutToast";
|
|
15936
|
-
const defaultProps$
|
|
15987
|
+
const defaultProps$r = {
|
|
15937
15988
|
...ComponentDefaults,
|
|
15938
15989
|
type: "shake",
|
|
15939
15990
|
action: "initial",
|
|
@@ -15941,16 +15992,16 @@ const defaultProps$q = {
|
|
|
15941
15992
|
onClick: (event) => {
|
|
15942
15993
|
}
|
|
15943
15994
|
};
|
|
15944
|
-
const classPrefix$
|
|
15995
|
+
const classPrefix$7 = `nut-animate`;
|
|
15945
15996
|
const Animate = (props) => {
|
|
15946
15997
|
const { className, type: type4, action, loop, onClick, children, ...rest } = {
|
|
15947
|
-
...defaultProps$
|
|
15998
|
+
...defaultProps$r,
|
|
15948
15999
|
...props
|
|
15949
16000
|
};
|
|
15950
16001
|
const [clicked, setClicked] = useState(false);
|
|
15951
16002
|
const classes = classNames({
|
|
15952
16003
|
"nut-ani-container": true,
|
|
15953
|
-
[`${classPrefix$
|
|
16004
|
+
[`${classPrefix$7}-${type4}`]: action === "initial" || clicked ? type4 : false,
|
|
15954
16005
|
loop
|
|
15955
16006
|
});
|
|
15956
16007
|
const cls = classNames(classes, className);
|
|
@@ -15965,9 +16016,9 @@ const Animate = (props) => {
|
|
|
15965
16016
|
};
|
|
15966
16017
|
return /* @__PURE__ */ React__default.createElement("div", { className: "nut-animate" }, /* @__PURE__ */ React__default.createElement("div", { className: cls, onClick: handleClick, ...rest }, children));
|
|
15967
16018
|
};
|
|
15968
|
-
Animate.defaultProps = defaultProps$
|
|
16019
|
+
Animate.defaultProps = defaultProps$r;
|
|
15969
16020
|
Animate.displayName = "NutAnimate";
|
|
15970
|
-
const defaultProps$
|
|
16021
|
+
const defaultProps$q = {
|
|
15971
16022
|
...ComponentDefaults,
|
|
15972
16023
|
length: 0,
|
|
15973
16024
|
value: "",
|
|
@@ -15986,7 +16037,7 @@ const CountUp = (props) => {
|
|
|
15986
16037
|
style,
|
|
15987
16038
|
...reset
|
|
15988
16039
|
} = {
|
|
15989
|
-
...defaultProps$
|
|
16040
|
+
...defaultProps$q,
|
|
15990
16041
|
...props
|
|
15991
16042
|
};
|
|
15992
16043
|
const classPrefix2 = "nut-countup";
|
|
@@ -16060,9 +16111,9 @@ const CountUp = (props) => {
|
|
|
16060
16111
|
);
|
|
16061
16112
|
})));
|
|
16062
16113
|
};
|
|
16063
|
-
CountUp.defaultProps = defaultProps$
|
|
16114
|
+
CountUp.defaultProps = defaultProps$q;
|
|
16064
16115
|
CountUp.displayName = "NutCountUp";
|
|
16065
|
-
const defaultProps$
|
|
16116
|
+
const defaultProps$p = {};
|
|
16066
16117
|
class AnimatingNumbers extends Component {
|
|
16067
16118
|
constructor(props) {
|
|
16068
16119
|
super(props);
|
|
@@ -16072,12 +16123,12 @@ class AnimatingNumbers extends Component {
|
|
|
16072
16123
|
return /* @__PURE__ */ React__default.createElement("div", { className: "nut-animatingnumbers" });
|
|
16073
16124
|
}
|
|
16074
16125
|
}
|
|
16075
|
-
__publicField(AnimatingNumbers, "defaultProps", defaultProps$
|
|
16126
|
+
__publicField(AnimatingNumbers, "defaultProps", defaultProps$p);
|
|
16076
16127
|
__publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
|
|
16077
16128
|
__publicField(AnimatingNumbers, "CountUp", CountUp);
|
|
16078
16129
|
AnimatingNumbers.CountUp = CountUp;
|
|
16079
16130
|
const warn = console.warn;
|
|
16080
|
-
const defaultProps$
|
|
16131
|
+
const defaultProps$o = {
|
|
16081
16132
|
...ComponentDefaults,
|
|
16082
16133
|
className: "",
|
|
16083
16134
|
url: "",
|
|
@@ -16102,7 +16153,7 @@ const defaultProps$n = {
|
|
|
16102
16153
|
};
|
|
16103
16154
|
const Audio = (props) => {
|
|
16104
16155
|
const classPrefix2 = "nut-audio";
|
|
16105
|
-
const { locale } = useConfig();
|
|
16156
|
+
const { locale } = useConfig$1();
|
|
16106
16157
|
const {
|
|
16107
16158
|
className,
|
|
16108
16159
|
url: url2,
|
|
@@ -16121,7 +16172,7 @@ const Audio = (props) => {
|
|
|
16121
16172
|
iconFontClassName,
|
|
16122
16173
|
...rest
|
|
16123
16174
|
} = {
|
|
16124
|
-
...defaultProps$
|
|
16175
|
+
...defaultProps$o,
|
|
16125
16176
|
...props
|
|
16126
16177
|
};
|
|
16127
16178
|
const [playing, setPlaying] = useState(false);
|
|
@@ -16285,9 +16336,9 @@ const Audio = (props) => {
|
|
|
16285
16336
|
};
|
|
16286
16337
|
return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, renderAudio());
|
|
16287
16338
|
};
|
|
16288
|
-
Audio.defaultProps = defaultProps$
|
|
16339
|
+
Audio.defaultProps = defaultProps$o;
|
|
16289
16340
|
Audio.displayName = "NutAudio";
|
|
16290
|
-
const defaultProps$
|
|
16341
|
+
const defaultProps$n = {
|
|
16291
16342
|
...ComponentDefaults,
|
|
16292
16343
|
strokeWidth: 5,
|
|
16293
16344
|
radius: 50,
|
|
@@ -16296,7 +16347,7 @@ const defaultProps$m = {
|
|
|
16296
16347
|
background: "#e5e9f2",
|
|
16297
16348
|
clockwise: true
|
|
16298
16349
|
};
|
|
16299
|
-
const classPrefix$
|
|
16350
|
+
const classPrefix$6 = `nut-circleprogress`;
|
|
16300
16351
|
const CircleProgress = (props) => {
|
|
16301
16352
|
const {
|
|
16302
16353
|
children,
|
|
@@ -16311,11 +16362,11 @@ const CircleProgress = (props) => {
|
|
|
16311
16362
|
strokeLinecap,
|
|
16312
16363
|
...restProps
|
|
16313
16364
|
} = {
|
|
16314
|
-
...defaultProps$
|
|
16365
|
+
...defaultProps$n,
|
|
16315
16366
|
...props
|
|
16316
16367
|
};
|
|
16317
16368
|
const [oldValue, setOldValue] = useState(percent);
|
|
16318
|
-
const classes = classNames(className, classPrefix$
|
|
16369
|
+
const classes = classNames(className, classPrefix$6);
|
|
16319
16370
|
const refRandomId = Math.random().toString(36).slice(-8);
|
|
16320
16371
|
const animateIdRef = useRef(0);
|
|
16321
16372
|
const styles = {
|
|
@@ -16397,7 +16448,7 @@ const CircleProgress = (props) => {
|
|
|
16397
16448
|
};
|
|
16398
16449
|
return /* @__PURE__ */ React__default.createElement("div", { className: classes, style: styles, ...restProps }, /* @__PURE__ */ React__default.createElement("div", { style: circleStyle() }), /* @__PURE__ */ React__default.createElement("div", { className: "nut-circleprogress-text" }, children));
|
|
16399
16450
|
};
|
|
16400
|
-
CircleProgress.defaultProps = defaultProps$
|
|
16451
|
+
CircleProgress.defaultProps = defaultProps$n;
|
|
16401
16452
|
CircleProgress.displayName = "NutCircleProgress";
|
|
16402
16453
|
const collapseContext = {
|
|
16403
16454
|
isOpen: (name) => {
|
|
@@ -16409,7 +16460,7 @@ const collapseContext = {
|
|
|
16409
16460
|
rotate: 180
|
|
16410
16461
|
};
|
|
16411
16462
|
const CollapseContext = createContext(collapseContext);
|
|
16412
|
-
const defaultProps$
|
|
16463
|
+
const defaultProps$m = {
|
|
16413
16464
|
...ComponentDefaults,
|
|
16414
16465
|
title: null,
|
|
16415
16466
|
name: "",
|
|
@@ -16430,7 +16481,7 @@ const CollapseItem = (props) => {
|
|
|
16430
16481
|
className,
|
|
16431
16482
|
...rest
|
|
16432
16483
|
} = {
|
|
16433
|
-
...defaultProps$
|
|
16484
|
+
...defaultProps$m,
|
|
16434
16485
|
...props
|
|
16435
16486
|
};
|
|
16436
16487
|
const classPrefix2 = "nut-collapse-item";
|
|
@@ -16542,9 +16593,9 @@ const CollapseItem = (props) => {
|
|
|
16542
16593
|
)
|
|
16543
16594
|
));
|
|
16544
16595
|
};
|
|
16545
|
-
CollapseItem.defaultProps = defaultProps$
|
|
16596
|
+
CollapseItem.defaultProps = defaultProps$m;
|
|
16546
16597
|
CollapseItem.displayName = "NutCollapseItem";
|
|
16547
|
-
const defaultProps$
|
|
16598
|
+
const defaultProps$l = {
|
|
16548
16599
|
...ComponentDefaults,
|
|
16549
16600
|
defaultActiveName: [],
|
|
16550
16601
|
accordion: false,
|
|
@@ -16563,7 +16614,7 @@ const Collapse = (props) => {
|
|
|
16563
16614
|
rotate,
|
|
16564
16615
|
onChange
|
|
16565
16616
|
} = {
|
|
16566
|
-
...defaultProps$
|
|
16617
|
+
...defaultProps$l,
|
|
16567
16618
|
...props
|
|
16568
16619
|
};
|
|
16569
16620
|
const classPrefix2 = "nut-collapse";
|
|
@@ -16620,10 +16671,10 @@ const Collapse = (props) => {
|
|
|
16620
16671
|
/* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix2, className), style }, children)
|
|
16621
16672
|
);
|
|
16622
16673
|
};
|
|
16623
|
-
Collapse.defaultProps = defaultProps$
|
|
16674
|
+
Collapse.defaultProps = defaultProps$l;
|
|
16624
16675
|
Collapse.displayName = "NutCollapse";
|
|
16625
16676
|
Collapse.Item = CollapseItem;
|
|
16626
|
-
const defaultProps$
|
|
16677
|
+
const defaultProps$k = {
|
|
16627
16678
|
...ComponentDefaults,
|
|
16628
16679
|
paused: false,
|
|
16629
16680
|
startTime: Date.now(),
|
|
@@ -16636,7 +16687,7 @@ const defaultProps$j = {
|
|
|
16636
16687
|
destroy: false
|
|
16637
16688
|
};
|
|
16638
16689
|
const InternalCountDown = (props, ref) => {
|
|
16639
|
-
useConfig();
|
|
16690
|
+
useConfig$1();
|
|
16640
16691
|
const {
|
|
16641
16692
|
paused,
|
|
16642
16693
|
startTime,
|
|
@@ -16655,7 +16706,7 @@ const InternalCountDown = (props, ref) => {
|
|
|
16655
16706
|
onUpdate,
|
|
16656
16707
|
children,
|
|
16657
16708
|
...rest
|
|
16658
|
-
} = { ...defaultProps$
|
|
16709
|
+
} = { ...defaultProps$k, ...props };
|
|
16659
16710
|
const classPrefix2 = "nut-countdown";
|
|
16660
16711
|
const [restTimeStamp, setRestTime] = useState(0);
|
|
16661
16712
|
const stateRef = useRef({
|
|
@@ -16866,9 +16917,9 @@ const InternalCountDown = (props, ref) => {
|
|
|
16866
16917
|
);
|
|
16867
16918
|
};
|
|
16868
16919
|
const CountDown = React__default.forwardRef(InternalCountDown);
|
|
16869
|
-
CountDown.defaultProps = defaultProps$
|
|
16920
|
+
CountDown.defaultProps = defaultProps$k;
|
|
16870
16921
|
CountDown.displayName = "NutCountDown";
|
|
16871
|
-
const defaultProps$
|
|
16922
|
+
const defaultProps$j = {
|
|
16872
16923
|
...ComponentDefaults,
|
|
16873
16924
|
content: "",
|
|
16874
16925
|
direction: "end",
|
|
@@ -16879,7 +16930,7 @@ const defaultProps$i = {
|
|
|
16879
16930
|
lineHeight: "20",
|
|
16880
16931
|
width: "auto"
|
|
16881
16932
|
};
|
|
16882
|
-
const classPrefix$
|
|
16933
|
+
const classPrefix$5 = `nut-ellipsis`;
|
|
16883
16934
|
const Ellipsis = (props) => {
|
|
16884
16935
|
var _a, _b, _c, _d;
|
|
16885
16936
|
const {
|
|
@@ -16896,7 +16947,7 @@ const Ellipsis = (props) => {
|
|
|
16896
16947
|
onClick,
|
|
16897
16948
|
onChange,
|
|
16898
16949
|
...rest
|
|
16899
|
-
} = { ...defaultProps$
|
|
16950
|
+
} = { ...defaultProps$j, ...props };
|
|
16900
16951
|
const maxHeight = useRef(0);
|
|
16901
16952
|
const [exceeded, setExceeded] = useState(false);
|
|
16902
16953
|
const [expanded, setExpanded] = useState(false);
|
|
@@ -16919,9 +16970,9 @@ const Ellipsis = (props) => {
|
|
|
16919
16970
|
const letterUpperReg = /^[A-Z]+$/;
|
|
16920
16971
|
const letterLowerReg = /^[a-z]+$/;
|
|
16921
16972
|
const classes = classNames(
|
|
16922
|
-
classPrefix$
|
|
16973
|
+
classPrefix$5,
|
|
16923
16974
|
className,
|
|
16924
|
-
width ? `${classPrefix$
|
|
16975
|
+
width ? `${classPrefix$5}-width` : ""
|
|
16925
16976
|
);
|
|
16926
16977
|
const init = () => {
|
|
16927
16978
|
setExceeded(false);
|
|
@@ -17180,21 +17231,21 @@ const Ellipsis = (props) => {
|
|
|
17180
17231
|
symbolText()
|
|
17181
17232
|
));
|
|
17182
17233
|
};
|
|
17183
|
-
Ellipsis.defaultProps = defaultProps$
|
|
17234
|
+
Ellipsis.defaultProps = defaultProps$j;
|
|
17184
17235
|
Ellipsis.displayName = "NutEllipsis";
|
|
17185
|
-
const defaultProps$
|
|
17236
|
+
const defaultProps$i = {
|
|
17186
17237
|
total: 3,
|
|
17187
17238
|
current: 0,
|
|
17188
17239
|
direction: "horizontal"
|
|
17189
17240
|
};
|
|
17190
|
-
const classPrefix$
|
|
17241
|
+
const classPrefix$4 = `nut-indicator`;
|
|
17191
17242
|
const Indicator = (props) => {
|
|
17192
17243
|
const { total, current, children, className, direction, ...rest } = {
|
|
17193
|
-
...defaultProps$
|
|
17244
|
+
...defaultProps$i,
|
|
17194
17245
|
...props
|
|
17195
17246
|
};
|
|
17196
17247
|
const classes = classNames({
|
|
17197
|
-
[`${classPrefix$
|
|
17248
|
+
[`${classPrefix$4}__vertical`]: direction === "vertical"
|
|
17198
17249
|
});
|
|
17199
17250
|
const renderElement = () => {
|
|
17200
17251
|
const childs = [];
|
|
@@ -17204,25 +17255,25 @@ const Indicator = (props) => {
|
|
|
17204
17255
|
"div",
|
|
17205
17256
|
{
|
|
17206
17257
|
key: item,
|
|
17207
|
-
className: `${classPrefix$
|
|
17258
|
+
className: `${classPrefix$4}__dot ${classPrefix$4}__active`
|
|
17208
17259
|
}
|
|
17209
|
-
) : /* @__PURE__ */ React__default.createElement("div", { key: item, className: `${classPrefix$
|
|
17260
|
+
) : /* @__PURE__ */ React__default.createElement("div", { key: item, className: `${classPrefix$4}__dot` })
|
|
17210
17261
|
);
|
|
17211
17262
|
}
|
|
17212
17263
|
return childs;
|
|
17213
17264
|
};
|
|
17214
17265
|
return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classes, className), ...rest }, renderElement());
|
|
17215
17266
|
};
|
|
17216
|
-
Indicator.defaultProps = defaultProps$
|
|
17267
|
+
Indicator.defaultProps = defaultProps$i;
|
|
17217
17268
|
Indicator.displayName = "NutIndicator";
|
|
17218
|
-
const defaultProps$
|
|
17269
|
+
const defaultProps$h = {
|
|
17219
17270
|
direction: "horizontal",
|
|
17220
17271
|
indicator: false,
|
|
17221
17272
|
autoPlay: false,
|
|
17222
17273
|
loop: false,
|
|
17223
17274
|
defaultValue: 0
|
|
17224
17275
|
};
|
|
17225
|
-
const classPrefix$
|
|
17276
|
+
const classPrefix$3 = "nut-swiper";
|
|
17226
17277
|
const Swiper = forwardRef((props, ref) => {
|
|
17227
17278
|
const {
|
|
17228
17279
|
width,
|
|
@@ -17237,7 +17288,7 @@ const Swiper = forwardRef((props, ref) => {
|
|
|
17237
17288
|
defaultValue,
|
|
17238
17289
|
...rest
|
|
17239
17290
|
} = {
|
|
17240
|
-
...defaultProps$
|
|
17291
|
+
...defaultProps$h,
|
|
17241
17292
|
...props
|
|
17242
17293
|
};
|
|
17243
17294
|
const [current, setCurrent] = useState(defaultValue);
|
|
@@ -17253,8 +17304,8 @@ const Swiper = forwardRef((props, ref) => {
|
|
|
17253
17304
|
"div",
|
|
17254
17305
|
{
|
|
17255
17306
|
className: classNames({
|
|
17256
|
-
[`${classPrefix$
|
|
17257
|
-
[`${classPrefix$
|
|
17307
|
+
[`${classPrefix$3}__indicator`]: true,
|
|
17308
|
+
[`${classPrefix$3}__indicator-vertical`]: direction === "vertical"
|
|
17258
17309
|
})
|
|
17259
17310
|
},
|
|
17260
17311
|
/* @__PURE__ */ React__default.createElement(
|
|
@@ -17296,7 +17347,7 @@ const Swiper = forwardRef((props, ref) => {
|
|
|
17296
17347
|
return /* @__PURE__ */ React__default.createElement(
|
|
17297
17348
|
View,
|
|
17298
17349
|
{
|
|
17299
|
-
className: classNames(classPrefix$
|
|
17350
|
+
className: classNames(classPrefix$3, className),
|
|
17300
17351
|
style: {
|
|
17301
17352
|
width: !width ? "100%" : `${width}px`,
|
|
17302
17353
|
height: !height ? "150px" : `${height}px`
|
|
@@ -17332,9 +17383,9 @@ const Swiper = forwardRef((props, ref) => {
|
|
|
17332
17383
|
renderIndicator()
|
|
17333
17384
|
);
|
|
17334
17385
|
});
|
|
17335
|
-
Swiper.defaultProps = defaultProps$
|
|
17386
|
+
Swiper.defaultProps = defaultProps$h;
|
|
17336
17387
|
Swiper.displayName = "NutSwiper";
|
|
17337
|
-
const defaultProps$
|
|
17388
|
+
const defaultProps$g = {
|
|
17338
17389
|
itemId: "",
|
|
17339
17390
|
skipHiddenItemLayout: false
|
|
17340
17391
|
};
|
|
@@ -17342,11 +17393,11 @@ const SwiperItem = (props) => {
|
|
|
17342
17393
|
const { children, ...rest } = props;
|
|
17343
17394
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children);
|
|
17344
17395
|
};
|
|
17345
|
-
SwiperItem.defaultProps = defaultProps$
|
|
17396
|
+
SwiperItem.defaultProps = defaultProps$g;
|
|
17346
17397
|
SwiperItem.displayName = "NutSwiperItem";
|
|
17347
17398
|
const InnerSwiper = Swiper;
|
|
17348
17399
|
InnerSwiper.Item = SwiperItem;
|
|
17349
|
-
const defaultProps$
|
|
17400
|
+
const defaultProps$f = {
|
|
17350
17401
|
...ComponentDefaults,
|
|
17351
17402
|
images: [],
|
|
17352
17403
|
videos: [],
|
|
@@ -17567,9 +17618,9 @@ const ImagePreview = (props) => {
|
|
|
17567
17618
|
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0))
|
|
17568
17619
|
);
|
|
17569
17620
|
};
|
|
17570
|
-
ImagePreview.defaultProps = defaultProps$
|
|
17621
|
+
ImagePreview.defaultProps = defaultProps$f;
|
|
17571
17622
|
ImagePreview.displayName = "NutImagePreview";
|
|
17572
|
-
const defaultProps$
|
|
17623
|
+
const defaultProps$e = {
|
|
17573
17624
|
...ComponentDefaults,
|
|
17574
17625
|
defaultValue: 1,
|
|
17575
17626
|
mode: "multi",
|
|
@@ -17581,7 +17632,7 @@ const defaultProps$d = {
|
|
|
17581
17632
|
ellipse: false
|
|
17582
17633
|
};
|
|
17583
17634
|
const Pagination = (props) => {
|
|
17584
|
-
const { locale } = useConfig();
|
|
17635
|
+
const { locale } = useConfig$1();
|
|
17585
17636
|
const {
|
|
17586
17637
|
value,
|
|
17587
17638
|
mode,
|
|
@@ -17597,7 +17648,7 @@ const Pagination = (props) => {
|
|
|
17597
17648
|
className,
|
|
17598
17649
|
...rest
|
|
17599
17650
|
} = {
|
|
17600
|
-
...defaultProps$
|
|
17651
|
+
...defaultProps$e,
|
|
17601
17652
|
...props
|
|
17602
17653
|
};
|
|
17603
17654
|
const classPrefix2 = "nut-pagination";
|
|
@@ -17679,9 +17730,9 @@ const Pagination = (props) => {
|
|
|
17679
17730
|
next || locale.pagination.next
|
|
17680
17731
|
));
|
|
17681
17732
|
};
|
|
17682
|
-
Pagination.defaultProps = defaultProps$
|
|
17733
|
+
Pagination.defaultProps = defaultProps$e;
|
|
17683
17734
|
Pagination.displayName = "NutPagination";
|
|
17684
|
-
const defaultProps$
|
|
17735
|
+
const defaultProps$d = {
|
|
17685
17736
|
...ComponentDefaults,
|
|
17686
17737
|
price: 0,
|
|
17687
17738
|
symbol: "¥",
|
|
@@ -17704,7 +17755,7 @@ const Price = (props) => {
|
|
|
17704
17755
|
style,
|
|
17705
17756
|
...rest
|
|
17706
17757
|
} = {
|
|
17707
|
-
...defaultProps$
|
|
17758
|
+
...defaultProps$d,
|
|
17708
17759
|
...props
|
|
17709
17760
|
};
|
|
17710
17761
|
const classPrefix2 = "nut-price";
|
|
@@ -17793,10 +17844,10 @@ const Price = (props) => {
|
|
|
17793
17844
|
symbol && position === "after" ? renderSymbol() : null
|
|
17794
17845
|
);
|
|
17795
17846
|
};
|
|
17796
|
-
Price.defaultProps = defaultProps$
|
|
17847
|
+
Price.defaultProps = defaultProps$d;
|
|
17797
17848
|
Price.displayName = "NutPrice";
|
|
17798
17849
|
const DataContext = createContext({});
|
|
17799
|
-
const defaultProps$
|
|
17850
|
+
const defaultProps$c = {
|
|
17800
17851
|
...ComponentDefaults,
|
|
17801
17852
|
title: "",
|
|
17802
17853
|
description: "",
|
|
@@ -17805,7 +17856,7 @@ const defaultProps$b = {
|
|
|
17805
17856
|
};
|
|
17806
17857
|
const Step = (props) => {
|
|
17807
17858
|
const { children, title, description, value, icon, className, ...restProps } = {
|
|
17808
|
-
...defaultProps$
|
|
17859
|
+
...defaultProps$c,
|
|
17809
17860
|
...props
|
|
17810
17861
|
};
|
|
17811
17862
|
const parent = useContext(DataContext);
|
|
@@ -17839,16 +17890,16 @@ const Step = (props) => {
|
|
|
17839
17890
|
};
|
|
17840
17891
|
return /* @__PURE__ */ React__default.createElement("div", { className: classes, ...restProps, onClick: handleClickStep }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-step-head" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-step-line" }), /* @__PURE__ */ React__default.createElement("div", { className: renderIconClass() }, icon || !dot && /* @__PURE__ */ React__default.createElement("span", { className: "nut-step-inner" }, value))), /* @__PURE__ */ React__default.createElement("div", { className: "nut-step-main" }, /* @__PURE__ */ React__default.createElement("span", { className: "nut-step-title" }, title), description && /* @__PURE__ */ React__default.createElement("span", { className: "nut-step-description" }, description)));
|
|
17841
17892
|
};
|
|
17842
|
-
Step.defaultProps = defaultProps$
|
|
17893
|
+
Step.defaultProps = defaultProps$c;
|
|
17843
17894
|
Step.displayName = "NutStep";
|
|
17844
|
-
const defaultProps$
|
|
17895
|
+
const defaultProps$b = {
|
|
17845
17896
|
...ComponentDefaults,
|
|
17846
17897
|
value: 0,
|
|
17847
17898
|
direction: "horizontal",
|
|
17848
17899
|
dot: false
|
|
17849
17900
|
};
|
|
17850
17901
|
const Steps = (props) => {
|
|
17851
|
-
const propSteps = { ...defaultProps$
|
|
17902
|
+
const propSteps = { ...defaultProps$b, ...props };
|
|
17852
17903
|
const {
|
|
17853
17904
|
children,
|
|
17854
17905
|
value,
|
|
@@ -17879,9 +17930,9 @@ const Steps = (props) => {
|
|
|
17879
17930
|
children
|
|
17880
17931
|
));
|
|
17881
17932
|
};
|
|
17882
|
-
Steps.defaultProps = defaultProps$
|
|
17933
|
+
Steps.defaultProps = defaultProps$b;
|
|
17883
17934
|
Steps.displayName = "NutSteps";
|
|
17884
|
-
const defaultProps$
|
|
17935
|
+
const defaultProps$a = {
|
|
17885
17936
|
...ComponentDefaults,
|
|
17886
17937
|
columns: [],
|
|
17887
17938
|
data: [],
|
|
@@ -17892,8 +17943,8 @@ const defaultProps$9 = {
|
|
|
17892
17943
|
showHeader: true
|
|
17893
17944
|
};
|
|
17894
17945
|
const Table = (props) => {
|
|
17895
|
-
const { locale } = useConfig();
|
|
17896
|
-
defaultProps$
|
|
17946
|
+
const { locale } = useConfig$1();
|
|
17947
|
+
defaultProps$a.noData = locale.noData;
|
|
17897
17948
|
const {
|
|
17898
17949
|
children,
|
|
17899
17950
|
className,
|
|
@@ -17909,7 +17960,7 @@ const Table = (props) => {
|
|
|
17909
17960
|
onSort,
|
|
17910
17961
|
...rest
|
|
17911
17962
|
} = {
|
|
17912
|
-
...defaultProps$
|
|
17963
|
+
...defaultProps$a,
|
|
17913
17964
|
...props
|
|
17914
17965
|
};
|
|
17915
17966
|
const [curData, setCurData] = useState(data);
|
|
@@ -17992,9 +18043,9 @@ const Table = (props) => {
|
|
|
17992
18043
|
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__main__body` }, renderBoyTrs())
|
|
17993
18044
|
), (summary || curData.length === 0) && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}__summary` }, summary || noData));
|
|
17994
18045
|
};
|
|
17995
|
-
Table.defaultProps = defaultProps$
|
|
18046
|
+
Table.defaultProps = defaultProps$a;
|
|
17996
18047
|
Table.displayName = "NutTable";
|
|
17997
|
-
const defaultProps$
|
|
18048
|
+
const defaultProps$9 = {
|
|
17998
18049
|
...ComponentDefaults,
|
|
17999
18050
|
type: "default",
|
|
18000
18051
|
background: "",
|
|
@@ -18025,7 +18076,7 @@ const Tag = (props) => {
|
|
|
18025
18076
|
onClick,
|
|
18026
18077
|
onClose
|
|
18027
18078
|
} = {
|
|
18028
|
-
...defaultProps$
|
|
18079
|
+
...defaultProps$9,
|
|
18029
18080
|
...props
|
|
18030
18081
|
};
|
|
18031
18082
|
const [tagClass, setTagClass] = useState("");
|
|
@@ -18100,8 +18151,206 @@ const Tag = (props) => {
|
|
|
18100
18151
|
children && /* @__PURE__ */ React__default.createElement("span", { className: `${classPrefix2}-text` }, children)
|
|
18101
18152
|
));
|
|
18102
18153
|
};
|
|
18103
|
-
Tag.defaultProps = defaultProps$
|
|
18154
|
+
Tag.defaultProps = defaultProps$9;
|
|
18104
18155
|
Tag.displayName = "NutTag";
|
|
18156
|
+
const getTaroRectById = (id) => {
|
|
18157
|
+
return new Promise((resolve, reject) => {
|
|
18158
|
+
if (Taro.getEnv() === Taro.ENV_TYPE.WEB) {
|
|
18159
|
+
const t = document ? document.querySelector(`#${id}`) : "";
|
|
18160
|
+
if (t) {
|
|
18161
|
+
resolve(t == null ? void 0 : t.getBoundingClientRect());
|
|
18162
|
+
}
|
|
18163
|
+
reject();
|
|
18164
|
+
} else {
|
|
18165
|
+
const query = Taro.createSelectorQuery();
|
|
18166
|
+
query.select(`#${id}`).boundingClientRect().exec(function(rect) {
|
|
18167
|
+
if (rect[0]) {
|
|
18168
|
+
resolve(rect[0]);
|
|
18169
|
+
} else {
|
|
18170
|
+
reject();
|
|
18171
|
+
}
|
|
18172
|
+
});
|
|
18173
|
+
}
|
|
18174
|
+
});
|
|
18175
|
+
};
|
|
18176
|
+
const defaultConfigRef = {
|
|
18177
|
+
current: {
|
|
18178
|
+
locale: zhCN
|
|
18179
|
+
}
|
|
18180
|
+
};
|
|
18181
|
+
const getDefaultConfig = () => {
|
|
18182
|
+
return defaultConfigRef.current;
|
|
18183
|
+
};
|
|
18184
|
+
const ConfigContext = createContext(null);
|
|
18185
|
+
const useConfig = () => {
|
|
18186
|
+
return useContext(ConfigContext) ?? getDefaultConfig();
|
|
18187
|
+
};
|
|
18188
|
+
const defaultProps$8 = {
|
|
18189
|
+
...ComponentDefaults,
|
|
18190
|
+
visible: false,
|
|
18191
|
+
type: "step",
|
|
18192
|
+
location: "bottom",
|
|
18193
|
+
mask: true,
|
|
18194
|
+
maskWidth: "",
|
|
18195
|
+
maskHeight: "",
|
|
18196
|
+
offset: [8, 10],
|
|
18197
|
+
title: "",
|
|
18198
|
+
next: "",
|
|
18199
|
+
prev: "",
|
|
18200
|
+
complete: "",
|
|
18201
|
+
showPrev: true,
|
|
18202
|
+
closeOnOverlayClick: true
|
|
18203
|
+
};
|
|
18204
|
+
const classPrefix$2 = "nut-tour";
|
|
18205
|
+
const Tour = (props) => {
|
|
18206
|
+
const { locale } = useConfig();
|
|
18207
|
+
const {
|
|
18208
|
+
children,
|
|
18209
|
+
className,
|
|
18210
|
+
title,
|
|
18211
|
+
closeOnOverlayClick,
|
|
18212
|
+
showPrev,
|
|
18213
|
+
list,
|
|
18214
|
+
type: type4,
|
|
18215
|
+
location,
|
|
18216
|
+
visible,
|
|
18217
|
+
mask,
|
|
18218
|
+
maskWidth,
|
|
18219
|
+
maskHeight,
|
|
18220
|
+
offset,
|
|
18221
|
+
next,
|
|
18222
|
+
prev,
|
|
18223
|
+
complete,
|
|
18224
|
+
onClose,
|
|
18225
|
+
onChange,
|
|
18226
|
+
...rest
|
|
18227
|
+
} = {
|
|
18228
|
+
...defaultProps$8,
|
|
18229
|
+
...props
|
|
18230
|
+
};
|
|
18231
|
+
const [showTour, setShowTour] = useState(false);
|
|
18232
|
+
const [showPopup, setShowPopup] = useState(false);
|
|
18233
|
+
const [active, setActive] = useState(0);
|
|
18234
|
+
const [maskRect, setMaskRect] = useState({
|
|
18235
|
+
top: 0,
|
|
18236
|
+
left: 0,
|
|
18237
|
+
right: 0,
|
|
18238
|
+
bottom: 0,
|
|
18239
|
+
width: 0,
|
|
18240
|
+
height: 0
|
|
18241
|
+
});
|
|
18242
|
+
const classes = classNames(className, classPrefix$2);
|
|
18243
|
+
useEffect(() => {
|
|
18244
|
+
if (visible) {
|
|
18245
|
+
getRootPosition();
|
|
18246
|
+
}
|
|
18247
|
+
setActive(0);
|
|
18248
|
+
setShowTour(visible);
|
|
18249
|
+
setShowPopup(visible);
|
|
18250
|
+
}, [visible]);
|
|
18251
|
+
useEffect(() => {
|
|
18252
|
+
if (visible) {
|
|
18253
|
+
setShowPopup(true);
|
|
18254
|
+
getRootPosition();
|
|
18255
|
+
}
|
|
18256
|
+
}, [active]);
|
|
18257
|
+
const getRootPosition = () => {
|
|
18258
|
+
getTaroRectById(list[active].target).then((rect) => {
|
|
18259
|
+
console.log("rect", rect);
|
|
18260
|
+
setMaskRect({
|
|
18261
|
+
top: rect.top,
|
|
18262
|
+
left: rect.left,
|
|
18263
|
+
right: rect.right,
|
|
18264
|
+
bottom: rect.bottom,
|
|
18265
|
+
width: rect.width,
|
|
18266
|
+
height: rect.height
|
|
18267
|
+
});
|
|
18268
|
+
});
|
|
18269
|
+
};
|
|
18270
|
+
const maskStyle = () => {
|
|
18271
|
+
const { width, height, left, top } = maskRect;
|
|
18272
|
+
const center = [left + width / 2, top + height / 2];
|
|
18273
|
+
const w2 = Number(maskWidth || width);
|
|
18274
|
+
const h = Number(maskHeight || height);
|
|
18275
|
+
const styles = {
|
|
18276
|
+
width: `${w2 + +offset[1] * 2}px`,
|
|
18277
|
+
height: `${h + +offset[0] * 2}px`,
|
|
18278
|
+
top: `${center[1] - h / 2 - +offset[0]}px`,
|
|
18279
|
+
left: `${center[0] - w2 / 2 - +offset[1]}px`
|
|
18280
|
+
};
|
|
18281
|
+
return styles;
|
|
18282
|
+
};
|
|
18283
|
+
const maskClose = (e) => {
|
|
18284
|
+
setShowTour(false);
|
|
18285
|
+
setShowPopup(false);
|
|
18286
|
+
onClose && onClose(e);
|
|
18287
|
+
};
|
|
18288
|
+
const handleClickMask = (e) => {
|
|
18289
|
+
closeOnOverlayClick && maskClose(e);
|
|
18290
|
+
};
|
|
18291
|
+
const changeStep = (type22) => {
|
|
18292
|
+
if (type22 === "next") {
|
|
18293
|
+
setActive(active + 1);
|
|
18294
|
+
onChange && onChange(active + 1);
|
|
18295
|
+
} else {
|
|
18296
|
+
setActive(active - 1);
|
|
18297
|
+
onChange && onChange(active - 1);
|
|
18298
|
+
}
|
|
18299
|
+
setShowPopup(false);
|
|
18300
|
+
};
|
|
18301
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: classes, ...rest }, /* @__PURE__ */ React__default.createElement(
|
|
18302
|
+
"div",
|
|
18303
|
+
{
|
|
18304
|
+
className: "nut-tour-masked",
|
|
18305
|
+
style: { display: showTour ? "block" : "none" },
|
|
18306
|
+
onClick: handleClickMask
|
|
18307
|
+
}
|
|
18308
|
+
), list.map((item, index) => {
|
|
18309
|
+
return /* @__PURE__ */ React__default.createElement("div", { key: index, style: { height: 0 } }, index === active && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, showTour && /* @__PURE__ */ React__default.createElement(
|
|
18310
|
+
"div",
|
|
18311
|
+
{
|
|
18312
|
+
className: `${mask ? "nut-tour-mask" : "nut-tour-mask nut-tour-mask-none"}`,
|
|
18313
|
+
id: "nut-tour-popid",
|
|
18314
|
+
style: maskStyle()
|
|
18315
|
+
}
|
|
18316
|
+
), /* @__PURE__ */ React__default.createElement(
|
|
18317
|
+
Popover,
|
|
18318
|
+
{
|
|
18319
|
+
visible: showPopup,
|
|
18320
|
+
location: item.location || location,
|
|
18321
|
+
targetId: "nut-tour-popid",
|
|
18322
|
+
closeOnOutsideClick: false,
|
|
18323
|
+
offset: item.popoverOffset || [0, 12],
|
|
18324
|
+
arrowOffset: item.arrowOffset || 0
|
|
18325
|
+
},
|
|
18326
|
+
/* @__PURE__ */ React__default.createElement(React__default.Fragment, null),
|
|
18327
|
+
/* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, type4 === "step" && /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content" }, title && /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content-top" }, /* @__PURE__ */ React__default.createElement("div", { onClick: (e) => maskClose(e) }, /* @__PURE__ */ React__default.createElement(a$q, { className: "nut-tour-content-top-close" }))), /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content-inner" }, item.content), /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content-bottom" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content-bottom-init" }, active + 1, "/", list.length), /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content-bottom-operate" }, active !== 0 && showPrev && /* @__PURE__ */ React__default.createElement(
|
|
18328
|
+
"div",
|
|
18329
|
+
{
|
|
18330
|
+
className: "nut-tour-content-bottom-operate-btn",
|
|
18331
|
+
onClick: () => changeStep("prev")
|
|
18332
|
+
},
|
|
18333
|
+
prev || locale.tour.prevStepText
|
|
18334
|
+
), list.length - 1 === active && /* @__PURE__ */ React__default.createElement(
|
|
18335
|
+
"div",
|
|
18336
|
+
{
|
|
18337
|
+
className: "nut-tour-content-bottom-operate-btn active",
|
|
18338
|
+
onClick: (e) => maskClose(e)
|
|
18339
|
+
},
|
|
18340
|
+
complete || locale.tour.completeText
|
|
18341
|
+
), list.length - 1 !== active && /* @__PURE__ */ React__default.createElement(
|
|
18342
|
+
"div",
|
|
18343
|
+
{
|
|
18344
|
+
className: "nut-tour-content-bottom-operate-btn active",
|
|
18345
|
+
onClick: () => changeStep("next")
|
|
18346
|
+
},
|
|
18347
|
+
next || locale.tour.nextStepText
|
|
18348
|
+
)))), type4 === "tile" && /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content nut-tour-content-tile" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-tour-content-inner" }, item.content))))
|
|
18349
|
+
)));
|
|
18350
|
+
}));
|
|
18351
|
+
};
|
|
18352
|
+
Tour.defaultProps = defaultProps$8;
|
|
18353
|
+
Tour.displayName = "NutTour";
|
|
18105
18354
|
const defaultProps$7 = {
|
|
18106
18355
|
...ComponentDefaults,
|
|
18107
18356
|
source: {
|
|
@@ -18594,7 +18843,7 @@ const defaultProps$2 = {
|
|
|
18594
18843
|
}
|
|
18595
18844
|
};
|
|
18596
18845
|
const TimeSelect = (props) => {
|
|
18597
|
-
const { locale } = useConfig();
|
|
18846
|
+
const { locale } = useConfig$1();
|
|
18598
18847
|
const {
|
|
18599
18848
|
visible,
|
|
18600
18849
|
className,
|
|
@@ -18818,7 +19067,7 @@ const defaultProps = {
|
|
|
18818
19067
|
fontSize: 14
|
|
18819
19068
|
};
|
|
18820
19069
|
const WaterMark = (props) => {
|
|
18821
|
-
const { locale } = useConfig();
|
|
19070
|
+
const { locale } = useConfig$1();
|
|
18822
19071
|
const {
|
|
18823
19072
|
content,
|
|
18824
19073
|
fullPage,
|
|
@@ -19020,6 +19269,7 @@ export {
|
|
|
19020
19269
|
TimeDetail,
|
|
19021
19270
|
TimeSelect,
|
|
19022
19271
|
Toast,
|
|
19272
|
+
Tour,
|
|
19023
19273
|
TrendArrow,
|
|
19024
19274
|
Uploader,
|
|
19025
19275
|
Video,
|