@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.umd.js
CHANGED
|
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8
8
|
return value;
|
|
9
9
|
};
|
|
10
10
|
/*!
|
|
11
|
-
* @nutui/nutui-react-taro v2.0.
|
|
11
|
+
* @nutui/nutui-react-taro v2.0.11 Wed Aug 09 2023 13:52:27 GMT+0800 (China Standard Time)
|
|
12
12
|
* (c) 2023 @jdf2e.
|
|
13
13
|
* Released under the MIT License.
|
|
14
14
|
*/
|
|
@@ -1929,7 +1929,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1929
1929
|
style: {}
|
|
1930
1930
|
};
|
|
1931
1931
|
const prefixCls$1 = "nut-button";
|
|
1932
|
-
const defaultProps$
|
|
1932
|
+
const defaultProps$1u = {
|
|
1933
1933
|
...ComponentDefaults,
|
|
1934
1934
|
color: "",
|
|
1935
1935
|
type: "default",
|
|
@@ -1961,7 +1961,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1961
1961
|
style,
|
|
1962
1962
|
...rest
|
|
1963
1963
|
} = {
|
|
1964
|
-
...defaultProps$
|
|
1964
|
+
...defaultProps$1u,
|
|
1965
1965
|
...props
|
|
1966
1966
|
};
|
|
1967
1967
|
const getStyle = React.useCallback(() => {
|
|
@@ -2019,29 +2019,29 @@ var __publicField = (obj, key, value) => {
|
|
|
2019
2019
|
}
|
|
2020
2020
|
);
|
|
2021
2021
|
Button.displayName = "NutButton";
|
|
2022
|
-
const defaultProps$
|
|
2022
|
+
const defaultProps$1t = {
|
|
2023
2023
|
...ComponentDefaults,
|
|
2024
2024
|
title: "",
|
|
2025
2025
|
description: "",
|
|
2026
2026
|
divider: true
|
|
2027
2027
|
};
|
|
2028
|
-
const classPrefix$
|
|
2028
|
+
const classPrefix$p = "nut-cell-group";
|
|
2029
2029
|
const CellGroup = (props) => {
|
|
2030
2030
|
const { children, className, style, title, description, divider, ...rest } = {
|
|
2031
|
-
...defaultProps$
|
|
2031
|
+
...defaultProps$1t,
|
|
2032
2032
|
...props
|
|
2033
2033
|
};
|
|
2034
|
-
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$
|
|
2034
|
+
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$p, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$p}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$p}__description` }, description) : null, /* @__PURE__ */ React.createElement(
|
|
2035
2035
|
"div",
|
|
2036
2036
|
{
|
|
2037
|
-
className: `${classPrefix$
|
|
2037
|
+
className: `${classPrefix$p}__wrap ${divider ? `${classPrefix$p}__wrap--divider` : ""}`
|
|
2038
2038
|
},
|
|
2039
2039
|
children
|
|
2040
2040
|
));
|
|
2041
2041
|
};
|
|
2042
|
-
CellGroup.defaultProps = defaultProps$
|
|
2042
|
+
CellGroup.defaultProps = defaultProps$1t;
|
|
2043
2043
|
CellGroup.displayName = "NutCellGroup";
|
|
2044
|
-
const defaultProps$
|
|
2044
|
+
const defaultProps$1s = {
|
|
2045
2045
|
...ComponentDefaults,
|
|
2046
2046
|
title: null,
|
|
2047
2047
|
description: null,
|
|
@@ -2051,7 +2051,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2051
2051
|
onClick: (event) => {
|
|
2052
2052
|
}
|
|
2053
2053
|
};
|
|
2054
|
-
const classPrefix$
|
|
2054
|
+
const classPrefix$o = "nut-cell";
|
|
2055
2055
|
const Cell = (props) => {
|
|
2056
2056
|
const {
|
|
2057
2057
|
children,
|
|
@@ -2065,7 +2065,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2065
2065
|
style,
|
|
2066
2066
|
...rest
|
|
2067
2067
|
} = {
|
|
2068
|
-
...defaultProps$
|
|
2068
|
+
...defaultProps$1s,
|
|
2069
2069
|
...props
|
|
2070
2070
|
};
|
|
2071
2071
|
const handleClick = (event) => {
|
|
@@ -2082,22 +2082,22 @@ var __publicField = (obj, key, value) => {
|
|
|
2082
2082
|
return /* @__PURE__ */ React.createElement(
|
|
2083
2083
|
"div",
|
|
2084
2084
|
{
|
|
2085
|
-
className: classNames(classPrefix$
|
|
2085
|
+
className: classNames(classPrefix$o, className),
|
|
2086
2086
|
onClick: (event) => handleClick(event),
|
|
2087
2087
|
style: baseStyle,
|
|
2088
2088
|
...rest
|
|
2089
2089
|
},
|
|
2090
|
-
children || /* @__PURE__ */ React.createElement(React.Fragment, null, title || description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
2090
|
+
children || /* @__PURE__ */ React.createElement(React.Fragment, null, title || description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$o}__left` }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$o}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$o}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React.createElement(
|
|
2091
2091
|
"div",
|
|
2092
2092
|
{
|
|
2093
|
-
className: `${classPrefix$
|
|
2093
|
+
className: `${classPrefix$o}__extra`,
|
|
2094
2094
|
style: styles
|
|
2095
2095
|
},
|
|
2096
2096
|
extra
|
|
2097
|
-
) : null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
2097
|
+
) : null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$o}__divider` }))
|
|
2098
2098
|
);
|
|
2099
2099
|
};
|
|
2100
|
-
Cell.defaultProps = defaultProps$
|
|
2100
|
+
Cell.defaultProps = defaultProps$1s;
|
|
2101
2101
|
Cell.displayName = "NutCell";
|
|
2102
2102
|
Cell.Group = CellGroup;
|
|
2103
2103
|
var INFINITY = 1 / 0;
|
|
@@ -3175,22 +3175,27 @@ var __publicField = (obj, key, value) => {
|
|
|
3175
3175
|
refreshingText: "加载中...",
|
|
3176
3176
|
completeText: "刷新成功"
|
|
3177
3177
|
},
|
|
3178
|
+
tour: {
|
|
3179
|
+
prevStepText: "上一步",
|
|
3180
|
+
completeText: "完成",
|
|
3181
|
+
nextStepText: "下一步"
|
|
3182
|
+
},
|
|
3178
3183
|
watermark: {
|
|
3179
3184
|
errorCanvasTips: "当前环境不支持Canvas"
|
|
3180
3185
|
}
|
|
3181
3186
|
};
|
|
3182
|
-
const classPrefix$
|
|
3183
|
-
const defaultConfigRef = {
|
|
3187
|
+
const classPrefix$n = "nut-configprovider";
|
|
3188
|
+
const defaultConfigRef$1 = {
|
|
3184
3189
|
current: {
|
|
3185
3190
|
locale: zhCN
|
|
3186
3191
|
}
|
|
3187
3192
|
};
|
|
3188
|
-
const getDefaultConfig = () => {
|
|
3189
|
-
return defaultConfigRef.current;
|
|
3193
|
+
const getDefaultConfig$1 = () => {
|
|
3194
|
+
return defaultConfigRef$1.current;
|
|
3190
3195
|
};
|
|
3191
|
-
const ConfigContext = React.createContext(null);
|
|
3192
|
-
const useConfig = () => {
|
|
3193
|
-
return React.useContext(ConfigContext) ?? getDefaultConfig();
|
|
3196
|
+
const ConfigContext$1 = React.createContext(null);
|
|
3197
|
+
const useConfig$1 = () => {
|
|
3198
|
+
return React.useContext(ConfigContext$1) ?? getDefaultConfig$1();
|
|
3194
3199
|
};
|
|
3195
3200
|
function convertThemeVarsToCSSVars(themeVars) {
|
|
3196
3201
|
const cssVars = {};
|
|
@@ -3204,7 +3209,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3204
3209
|
const mergedConfig = useMemo(
|
|
3205
3210
|
() => {
|
|
3206
3211
|
return {
|
|
3207
|
-
...getDefaultConfig(),
|
|
3212
|
+
...getDefaultConfig$1(),
|
|
3208
3213
|
...config2
|
|
3209
3214
|
};
|
|
3210
3215
|
},
|
|
@@ -3217,10 +3222,10 @@ var __publicField = (obj, key, value) => {
|
|
|
3217
3222
|
const cssVarStyle = React.useMemo(() => {
|
|
3218
3223
|
return convertThemeVarsToCSSVars(mergedConfig.theme || {});
|
|
3219
3224
|
}, [mergedConfig.theme]);
|
|
3220
|
-
return /* @__PURE__ */ React.createElement(ConfigContext.Provider, { value: mergedConfig }, /* @__PURE__ */ React.createElement(
|
|
3225
|
+
return /* @__PURE__ */ React.createElement(ConfigContext$1.Provider, { value: mergedConfig }, /* @__PURE__ */ React.createElement(
|
|
3221
3226
|
"div",
|
|
3222
3227
|
{
|
|
3223
|
-
className: classNames(classPrefix$
|
|
3228
|
+
className: classNames(classPrefix$n, className),
|
|
3224
3229
|
style: {
|
|
3225
3230
|
...cssVarStyle,
|
|
3226
3231
|
...style
|
|
@@ -3230,7 +3235,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3230
3235
|
));
|
|
3231
3236
|
};
|
|
3232
3237
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
3233
|
-
const defaultProps$
|
|
3238
|
+
const defaultProps$1r = {
|
|
3234
3239
|
src: "",
|
|
3235
3240
|
error: true,
|
|
3236
3241
|
loading: true
|
|
@@ -3249,7 +3254,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3249
3254
|
onLoad,
|
|
3250
3255
|
onError,
|
|
3251
3256
|
...rest
|
|
3252
|
-
} = { ...defaultProps$
|
|
3257
|
+
} = { ...defaultProps$1r, ...props };
|
|
3253
3258
|
const [innerLoading, setInnerLoading] = React.useState(true);
|
|
3254
3259
|
const [isError, setIsError] = React.useState(false);
|
|
3255
3260
|
const handleLoad = (e) => {
|
|
@@ -3310,7 +3315,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3310
3315
|
}
|
|
3311
3316
|
), renderLoading(), renderErrorImg());
|
|
3312
3317
|
};
|
|
3313
|
-
Image$1.defaultProps = defaultProps$
|
|
3318
|
+
Image$1.defaultProps = defaultProps$1r;
|
|
3314
3319
|
Image$1.displayName = "NutImage";
|
|
3315
3320
|
function _extends$1() {
|
|
3316
3321
|
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
@@ -5145,7 +5150,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5145
5150
|
Overlay.defaultProps = defaultOverlayProps;
|
|
5146
5151
|
Overlay.displayName = "NutOverlay";
|
|
5147
5152
|
const DataContext$1 = React.createContext({});
|
|
5148
|
-
const defaultProps$
|
|
5153
|
+
const defaultProps$1q = {
|
|
5149
5154
|
...ComponentDefaults,
|
|
5150
5155
|
span: "24",
|
|
5151
5156
|
offset: "0",
|
|
@@ -5153,7 +5158,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5153
5158
|
};
|
|
5154
5159
|
const Col = (props) => {
|
|
5155
5160
|
const { className, style, span, offset, children, onClick } = {
|
|
5156
|
-
...defaultProps$
|
|
5161
|
+
...defaultProps$1q,
|
|
5157
5162
|
...props
|
|
5158
5163
|
};
|
|
5159
5164
|
const [colName, setColName] = React.useState("");
|
|
@@ -5185,32 +5190,32 @@ var __publicField = (obj, key, value) => {
|
|
|
5185
5190
|
children
|
|
5186
5191
|
);
|
|
5187
5192
|
};
|
|
5188
|
-
Col.defaultProps = defaultProps$
|
|
5193
|
+
Col.defaultProps = defaultProps$1q;
|
|
5189
5194
|
Col.displayName = "NutCol";
|
|
5190
|
-
const defaultProps$
|
|
5195
|
+
const defaultProps$1p = {
|
|
5191
5196
|
...ComponentDefaults,
|
|
5192
5197
|
contentPosition: "center",
|
|
5193
5198
|
direction: "horizontal"
|
|
5194
5199
|
};
|
|
5195
|
-
const classPrefix$
|
|
5200
|
+
const classPrefix$m = `nut-divider`;
|
|
5196
5201
|
const Divider = (props) => {
|
|
5197
5202
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
5198
|
-
...defaultProps$
|
|
5203
|
+
...defaultProps$1p,
|
|
5199
5204
|
...props
|
|
5200
5205
|
};
|
|
5201
5206
|
const classes = direction === "horizontal" ? classNames({
|
|
5202
|
-
[`${classPrefix$
|
|
5203
|
-
[`${classPrefix$
|
|
5204
|
-
[`${classPrefix$
|
|
5205
|
-
[`${classPrefix$
|
|
5206
|
-
[`${classPrefix$
|
|
5207
|
+
[`${classPrefix$m}`]: true,
|
|
5208
|
+
[`${classPrefix$m}__center`]: children,
|
|
5209
|
+
[`${classPrefix$m}__left`]: contentPosition === "left",
|
|
5210
|
+
[`${classPrefix$m}__right`]: contentPosition === "right",
|
|
5211
|
+
[`${classPrefix$m}__hairline`]: true
|
|
5207
5212
|
}) : classNames({
|
|
5208
|
-
[`${classPrefix$
|
|
5209
|
-
[`${classPrefix$
|
|
5213
|
+
[`${classPrefix$m}`]: true,
|
|
5214
|
+
[`${classPrefix$m}__vertical`]: direction === "vertical"
|
|
5210
5215
|
});
|
|
5211
5216
|
return /* @__PURE__ */ React.createElement("div", { className: `${classes} ${className || ""}`, style, ...rest }, children);
|
|
5212
5217
|
};
|
|
5213
|
-
Divider.defaultProps = defaultProps$
|
|
5218
|
+
Divider.defaultProps = defaultProps$1p;
|
|
5214
5219
|
Divider.displayName = "NutDivider";
|
|
5215
5220
|
const gridContext = {
|
|
5216
5221
|
onClick: (item, index) => {
|
|
@@ -5220,7 +5225,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5220
5225
|
const pxCheck = (value) => {
|
|
5221
5226
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
5222
5227
|
};
|
|
5223
|
-
const defaultProps$
|
|
5228
|
+
const defaultProps$1o = {
|
|
5224
5229
|
text: "",
|
|
5225
5230
|
columns: 4,
|
|
5226
5231
|
gap: 0,
|
|
@@ -5230,7 +5235,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5230
5235
|
direction: "vertical"
|
|
5231
5236
|
};
|
|
5232
5237
|
const GridItem = (props) => {
|
|
5233
|
-
useConfig();
|
|
5238
|
+
useConfig$1();
|
|
5234
5239
|
const {
|
|
5235
5240
|
children,
|
|
5236
5241
|
style,
|
|
@@ -5246,7 +5251,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5246
5251
|
onClick,
|
|
5247
5252
|
...rest
|
|
5248
5253
|
} = {
|
|
5249
|
-
...defaultProps$
|
|
5254
|
+
...defaultProps$1o,
|
|
5250
5255
|
...props
|
|
5251
5256
|
};
|
|
5252
5257
|
const classPrefix2 = "nut-grid-item";
|
|
@@ -5304,9 +5309,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5304
5309
|
/* @__PURE__ */ React.createElement("div", { className: contentClass() }, children && /* @__PURE__ */ React.createElement(React.Fragment, null, children), text && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__text` }, text))
|
|
5305
5310
|
);
|
|
5306
5311
|
};
|
|
5307
|
-
GridItem.defaultProps = defaultProps$
|
|
5312
|
+
GridItem.defaultProps = defaultProps$1o;
|
|
5308
5313
|
GridItem.displayName = "NutGridItem";
|
|
5309
|
-
const defaultProps$
|
|
5314
|
+
const defaultProps$1n = {
|
|
5310
5315
|
columns: 4,
|
|
5311
5316
|
gap: 0,
|
|
5312
5317
|
center: true,
|
|
@@ -5327,7 +5332,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5327
5332
|
className,
|
|
5328
5333
|
onClick,
|
|
5329
5334
|
...rest
|
|
5330
|
-
} = { ...defaultProps$
|
|
5335
|
+
} = { ...defaultProps$1n, ...props };
|
|
5331
5336
|
const childrenDom = React.Children.toArray(children);
|
|
5332
5337
|
const classPrefix2 = "nut-grid";
|
|
5333
5338
|
const rootClass = () => {
|
|
@@ -5357,18 +5362,18 @@ var __publicField = (obj, key, value) => {
|
|
|
5357
5362
|
});
|
|
5358
5363
|
})));
|
|
5359
5364
|
};
|
|
5360
|
-
Grid.defaultProps = defaultProps$
|
|
5365
|
+
Grid.defaultProps = defaultProps$1n;
|
|
5361
5366
|
Grid.displayName = "NutGrid";
|
|
5362
5367
|
Grid.Item = GridItem;
|
|
5363
|
-
const defaultProps$
|
|
5368
|
+
const defaultProps$1m = {};
|
|
5364
5369
|
const Layout = (props) => {
|
|
5365
|
-
({ ...defaultProps$
|
|
5370
|
+
({ ...defaultProps$1m, ...props });
|
|
5366
5371
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-layout" }, "Layout");
|
|
5367
5372
|
};
|
|
5368
|
-
Layout.defaultProps = defaultProps$
|
|
5373
|
+
Layout.defaultProps = defaultProps$1m;
|
|
5369
5374
|
Layout.displayName = "NutLayout";
|
|
5370
|
-
const classPrefix$
|
|
5371
|
-
const defaultProps$
|
|
5375
|
+
const classPrefix$l = "nut-row";
|
|
5376
|
+
const defaultProps$1l = {
|
|
5372
5377
|
...ComponentDefaults,
|
|
5373
5378
|
type: "",
|
|
5374
5379
|
justify: "start",
|
|
@@ -5388,7 +5393,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5388
5393
|
gutter,
|
|
5389
5394
|
onClick
|
|
5390
5395
|
} = {
|
|
5391
|
-
...defaultProps$
|
|
5396
|
+
...defaultProps$1l,
|
|
5392
5397
|
...props
|
|
5393
5398
|
};
|
|
5394
5399
|
const getClass = (prefix, type22) => {
|
|
@@ -5402,7 +5407,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5402
5407
|
${getClass("justify", justify)}
|
|
5403
5408
|
${getClass("align", align)}
|
|
5404
5409
|
${getClass("flex", wrap)}
|
|
5405
|
-
${classPrefix$
|
|
5410
|
+
${classPrefix$l}
|
|
5406
5411
|
`;
|
|
5407
5412
|
};
|
|
5408
5413
|
const parentRow = {
|
|
@@ -5420,15 +5425,15 @@ var __publicField = (obj, key, value) => {
|
|
|
5420
5425
|
children
|
|
5421
5426
|
));
|
|
5422
5427
|
};
|
|
5423
|
-
Row.defaultProps = defaultProps$
|
|
5428
|
+
Row.defaultProps = defaultProps$1l;
|
|
5424
5429
|
Row.displayName = "NutRow";
|
|
5425
5430
|
const prefixCls = "nut-space";
|
|
5426
|
-
const defaultProps$
|
|
5431
|
+
const defaultProps$1k = {
|
|
5427
5432
|
direction: "horizontal"
|
|
5428
5433
|
};
|
|
5429
5434
|
const Space = (props) => {
|
|
5430
5435
|
const { className, style, children, wrap, align, direction, justify } = {
|
|
5431
|
-
...defaultProps$
|
|
5436
|
+
...defaultProps$1k,
|
|
5432
5437
|
...props
|
|
5433
5438
|
};
|
|
5434
5439
|
const cls = classNames(
|
|
@@ -5443,7 +5448,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5443
5448
|
return child !== null && child !== void 0 && /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-item` }, child);
|
|
5444
5449
|
}));
|
|
5445
5450
|
};
|
|
5446
|
-
Space.defaultProps = defaultProps$
|
|
5451
|
+
Space.defaultProps = defaultProps$1k;
|
|
5447
5452
|
Space.displayName = "NutSpace";
|
|
5448
5453
|
function useWatch(dep, callback, config2 = { immediate: false }) {
|
|
5449
5454
|
const { immediate } = config2;
|
|
@@ -5525,12 +5530,12 @@ var __publicField = (obj, key, value) => {
|
|
|
5525
5530
|
}
|
|
5526
5531
|
return root2;
|
|
5527
5532
|
}
|
|
5528
|
-
const defaultProps$
|
|
5533
|
+
const defaultProps$1j = {
|
|
5529
5534
|
...ComponentDefaults,
|
|
5530
5535
|
position: "top",
|
|
5531
5536
|
zIndex: 2e3
|
|
5532
5537
|
};
|
|
5533
|
-
const classPrefix$
|
|
5538
|
+
const classPrefix$k = "nut-sticky";
|
|
5534
5539
|
const Sticky = (props) => {
|
|
5535
5540
|
const {
|
|
5536
5541
|
position,
|
|
@@ -5542,7 +5547,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5542
5547
|
className,
|
|
5543
5548
|
onChange,
|
|
5544
5549
|
...rest
|
|
5545
|
-
} = { ...defaultProps$
|
|
5550
|
+
} = { ...defaultProps$1j, ...props };
|
|
5546
5551
|
const stickyRef = React.useRef(null);
|
|
5547
5552
|
const rootRef = React.useRef(null);
|
|
5548
5553
|
const [rootRect, setRootRect] = React.useState({});
|
|
@@ -5632,7 +5637,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5632
5637
|
{
|
|
5633
5638
|
ref: rootRef,
|
|
5634
5639
|
style: rootStyle,
|
|
5635
|
-
className: classNames(classPrefix$
|
|
5640
|
+
className: classNames(classPrefix$k, className),
|
|
5636
5641
|
...rest
|
|
5637
5642
|
},
|
|
5638
5643
|
/* @__PURE__ */ React.createElement(
|
|
@@ -5648,9 +5653,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5648
5653
|
)
|
|
5649
5654
|
);
|
|
5650
5655
|
};
|
|
5651
|
-
Sticky.defaultProps = defaultProps$
|
|
5656
|
+
Sticky.defaultProps = defaultProps$1j;
|
|
5652
5657
|
Sticky.displayName = "NutSticky";
|
|
5653
|
-
const defaultProps$
|
|
5658
|
+
const defaultProps$1i = {
|
|
5654
5659
|
...ComponentDefaults,
|
|
5655
5660
|
threshold: 200,
|
|
5656
5661
|
zIndex: 10,
|
|
@@ -5658,7 +5663,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5658
5663
|
};
|
|
5659
5664
|
const BackTop = (props) => {
|
|
5660
5665
|
const { children, threshold, zIndex, className, duration, style, onClick } = {
|
|
5661
|
-
...defaultProps$
|
|
5666
|
+
...defaultProps$1i,
|
|
5662
5667
|
...props
|
|
5663
5668
|
};
|
|
5664
5669
|
const classPrefix2 = "nut-backtop";
|
|
@@ -5696,10 +5701,10 @@ var __publicField = (obj, key, value) => {
|
|
|
5696
5701
|
children || /* @__PURE__ */ React.createElement(a$2, { width: 19, height: 19, className: "nut-backtop-main" })
|
|
5697
5702
|
);
|
|
5698
5703
|
};
|
|
5699
|
-
BackTop.defaultProps = defaultProps$
|
|
5704
|
+
BackTop.defaultProps = defaultProps$1i;
|
|
5700
5705
|
BackTop.displayName = "NutBackTop";
|
|
5701
5706
|
const elevatorContext = React.createContext({});
|
|
5702
|
-
const defaultProps$
|
|
5707
|
+
const defaultProps$1h = {
|
|
5703
5708
|
...ComponentDefaults,
|
|
5704
5709
|
height: "200px",
|
|
5705
5710
|
floorKey: "title",
|
|
@@ -5726,7 +5731,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5726
5731
|
children,
|
|
5727
5732
|
...rest
|
|
5728
5733
|
} = {
|
|
5729
|
-
...defaultProps$
|
|
5734
|
+
...defaultProps$1h,
|
|
5730
5735
|
...props
|
|
5731
5736
|
};
|
|
5732
5737
|
const classPrefix2 = "nut-elevator";
|
|
@@ -5938,10 +5943,10 @@ var __publicField = (obj, key, value) => {
|
|
|
5938
5943
|
})
|
|
5939
5944
|
))) : null, sticky && scrollY > 0 ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__list__fixed` }, /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}__list__fixed__title` }, list[currentIndex][floorKey])) : null);
|
|
5940
5945
|
};
|
|
5941
|
-
Elevator.defaultProps = defaultProps$
|
|
5946
|
+
Elevator.defaultProps = defaultProps$1h;
|
|
5942
5947
|
Elevator.displayName = "NutElevator";
|
|
5943
5948
|
Elevator.Context = elevatorContext;
|
|
5944
|
-
const defaultProps$
|
|
5949
|
+
const defaultProps$1g = {
|
|
5945
5950
|
...ComponentDefaults,
|
|
5946
5951
|
activeText: "",
|
|
5947
5952
|
inactiveText: "",
|
|
@@ -5952,7 +5957,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5952
5957
|
}
|
|
5953
5958
|
};
|
|
5954
5959
|
const FixedNav = (props) => {
|
|
5955
|
-
const { locale } = useConfig();
|
|
5960
|
+
const { locale } = useConfig$1();
|
|
5956
5961
|
const {
|
|
5957
5962
|
className,
|
|
5958
5963
|
overlay,
|
|
@@ -5969,7 +5974,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5969
5974
|
content,
|
|
5970
5975
|
...rest
|
|
5971
5976
|
} = {
|
|
5972
|
-
...defaultProps$
|
|
5977
|
+
...defaultProps$1g,
|
|
5973
5978
|
...props
|
|
5974
5979
|
};
|
|
5975
5980
|
const classPrefix2 = "nut-fixednav";
|
|
@@ -6021,9 +6026,9 @@ var __publicField = (obj, key, value) => {
|
|
|
6021
6026
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__btn`, onClick: () => onUpdateValue() }, content || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(a$j, { color: "#fff" }), /* @__PURE__ */ React.createElement("div", { className: "text" }, visible ? activeText || locale.fixednav.activeText : inactiveText || locale.fixednav.inactiveText)))
|
|
6022
6027
|
);
|
|
6023
6028
|
};
|
|
6024
|
-
FixedNav.defaultProps = defaultProps$
|
|
6029
|
+
FixedNav.defaultProps = defaultProps$1g;
|
|
6025
6030
|
FixedNav.displayName = "NutFixedNav";
|
|
6026
|
-
const defaultProps$
|
|
6031
|
+
const defaultProps$1f = {
|
|
6027
6032
|
...ComponentDefaults,
|
|
6028
6033
|
left: "",
|
|
6029
6034
|
right: "",
|
|
@@ -6046,7 +6051,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6046
6051
|
zIndex,
|
|
6047
6052
|
onBackClick
|
|
6048
6053
|
} = {
|
|
6049
|
-
...defaultProps$
|
|
6054
|
+
...defaultProps$1f,
|
|
6050
6055
|
...props
|
|
6051
6056
|
};
|
|
6052
6057
|
const classPrefix2 = "nut-navbar";
|
|
@@ -6083,9 +6088,9 @@ var __publicField = (obj, key, value) => {
|
|
|
6083
6088
|
const cls = classNames(classPrefix2, classes, className);
|
|
6084
6089
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}--placeholder` }, renderWrapper()) : renderWrapper());
|
|
6085
6090
|
};
|
|
6086
|
-
NavBar.defaultProps = defaultProps$
|
|
6091
|
+
NavBar.defaultProps = defaultProps$1f;
|
|
6087
6092
|
NavBar.displayName = "NutNavBar";
|
|
6088
|
-
const defaultProps$
|
|
6093
|
+
const defaultProps$1e = {
|
|
6089
6094
|
...ComponentDefaults,
|
|
6090
6095
|
position: "center",
|
|
6091
6096
|
transition: "",
|
|
@@ -6137,7 +6142,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6137
6142
|
afterShow,
|
|
6138
6143
|
afterClose,
|
|
6139
6144
|
onClick
|
|
6140
|
-
} = { ...defaultProps$
|
|
6145
|
+
} = { ...defaultProps$1e, ...props };
|
|
6141
6146
|
const [index, setIndex] = React.useState(zIndex || _zIndex);
|
|
6142
6147
|
const [innerVisible, setInnerVisible] = React.useState(visible);
|
|
6143
6148
|
const [showChildren, setShowChildren] = React.useState(true);
|
|
@@ -6273,10 +6278,10 @@ var __publicField = (obj, key, value) => {
|
|
|
6273
6278
|
}, [position, transition]);
|
|
6274
6279
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, renderToContainer(portal, renderNode()));
|
|
6275
6280
|
};
|
|
6276
|
-
Popup.defaultProps = defaultProps$
|
|
6281
|
+
Popup.defaultProps = defaultProps$1e;
|
|
6277
6282
|
Popup.displayName = "NutPopup";
|
|
6278
6283
|
const OffsetContext = React.createContext(20);
|
|
6279
|
-
const defaultProps$
|
|
6284
|
+
const defaultProps$1d = {
|
|
6280
6285
|
...ComponentDefaults,
|
|
6281
6286
|
position: "left",
|
|
6282
6287
|
width: "80%"
|
|
@@ -6293,7 +6298,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6293
6298
|
onClose,
|
|
6294
6299
|
...rest
|
|
6295
6300
|
} = {
|
|
6296
|
-
...defaultProps$
|
|
6301
|
+
...defaultProps$1d,
|
|
6297
6302
|
...props
|
|
6298
6303
|
};
|
|
6299
6304
|
const indent = props.indent ? Number(props.indent) : 20;
|
|
@@ -6333,7 +6338,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6333
6338
|
)))
|
|
6334
6339
|
);
|
|
6335
6340
|
};
|
|
6336
|
-
SideNavBar.defaultProps = defaultProps$
|
|
6341
|
+
SideNavBar.defaultProps = defaultProps$1d;
|
|
6337
6342
|
SideNavBar.displayName = "NutSideNavBar";
|
|
6338
6343
|
const SideNavBarItem = (props) => {
|
|
6339
6344
|
const classPrefix2 = "nut-subsidenavbar";
|
|
@@ -6352,13 +6357,13 @@ var __publicField = (obj, key, value) => {
|
|
|
6352
6357
|
title
|
|
6353
6358
|
);
|
|
6354
6359
|
};
|
|
6355
|
-
const defaultProps$
|
|
6360
|
+
const defaultProps$1c = {
|
|
6356
6361
|
open: true
|
|
6357
6362
|
};
|
|
6358
6363
|
const SubSideNavBar = (props) => {
|
|
6359
6364
|
const classPrefix2 = "nut-subsidenavbar";
|
|
6360
6365
|
const { title, value, children, onClick, open: open2, ...rest } = {
|
|
6361
|
-
...defaultProps$
|
|
6366
|
+
...defaultProps$1c,
|
|
6362
6367
|
...props
|
|
6363
6368
|
};
|
|
6364
6369
|
const [subShow, setSubShow] = React.useState(open2);
|
|
@@ -6436,7 +6441,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6436
6441
|
);
|
|
6437
6442
|
return [stateRef.current, setState];
|
|
6438
6443
|
}
|
|
6439
|
-
const defaultProps$
|
|
6444
|
+
const defaultProps$1b = {
|
|
6440
6445
|
...ComponentDefaults,
|
|
6441
6446
|
value: "",
|
|
6442
6447
|
dot: false,
|
|
@@ -6447,7 +6452,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6447
6452
|
};
|
|
6448
6453
|
const Badge = (props) => {
|
|
6449
6454
|
const { className, style, value, max, children, dot, top, right, color } = {
|
|
6450
|
-
...defaultProps$
|
|
6455
|
+
...defaultProps$1b,
|
|
6451
6456
|
...props
|
|
6452
6457
|
};
|
|
6453
6458
|
const classPrefix2 = "nut-badge";
|
|
@@ -6474,9 +6479,9 @@ var __publicField = (obj, key, value) => {
|
|
|
6474
6479
|
};
|
|
6475
6480
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style }, typeof value === "object" && value && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__icon` }, value), /* @__PURE__ */ React.createElement("div", null, children), /* @__PURE__ */ React.createElement("div", { className: contentClasses, style: getStyle() }, content()));
|
|
6476
6481
|
};
|
|
6477
|
-
Badge.defaultProps = defaultProps$
|
|
6482
|
+
Badge.defaultProps = defaultProps$1b;
|
|
6478
6483
|
Badge.displayName = "NutBadge";
|
|
6479
|
-
const defaultProps$
|
|
6484
|
+
const defaultProps$1a = {
|
|
6480
6485
|
...ComponentDefaults,
|
|
6481
6486
|
title: "",
|
|
6482
6487
|
icon: null,
|
|
@@ -6503,9 +6508,10 @@ var __publicField = (obj, key, value) => {
|
|
|
6503
6508
|
max,
|
|
6504
6509
|
top,
|
|
6505
6510
|
right,
|
|
6506
|
-
handleClick
|
|
6511
|
+
handleClick,
|
|
6512
|
+
...rest
|
|
6507
6513
|
} = {
|
|
6508
|
-
...defaultProps$
|
|
6514
|
+
...defaultProps$1a,
|
|
6509
6515
|
...props
|
|
6510
6516
|
};
|
|
6511
6517
|
const classPrefix2 = "nut-tabbar-item";
|
|
@@ -6532,12 +6538,13 @@ var __publicField = (obj, key, value) => {
|
|
|
6532
6538
|
color: active ? activeColor : inactiveColor,
|
|
6533
6539
|
...style
|
|
6534
6540
|
},
|
|
6535
|
-
onClick: () => handleClick(index)
|
|
6541
|
+
onClick: () => handleClick(index),
|
|
6542
|
+
...rest
|
|
6536
6543
|
},
|
|
6537
6544
|
icon ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React.createElement("div", { className: titleClass }, title))
|
|
6538
6545
|
);
|
|
6539
6546
|
};
|
|
6540
|
-
const defaultProps$
|
|
6547
|
+
const defaultProps$19 = {
|
|
6541
6548
|
...ComponentDefaults,
|
|
6542
6549
|
defaultValue: 0,
|
|
6543
6550
|
fixed: false,
|
|
@@ -6560,7 +6567,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6560
6567
|
style,
|
|
6561
6568
|
onSwitch
|
|
6562
6569
|
} = {
|
|
6563
|
-
...defaultProps$
|
|
6570
|
+
...defaultProps$19,
|
|
6564
6571
|
...props
|
|
6565
6572
|
};
|
|
6566
6573
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -6595,17 +6602,17 @@ var __publicField = (obj, key, value) => {
|
|
|
6595
6602
|
(fixed || safeArea) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__safe-area` })
|
|
6596
6603
|
);
|
|
6597
6604
|
};
|
|
6598
|
-
Tabbar.defaultProps = defaultProps$
|
|
6605
|
+
Tabbar.defaultProps = defaultProps$19;
|
|
6599
6606
|
Tabbar.displayName = "NutTabbar";
|
|
6600
6607
|
Tabbar.Item = TabbarItem;
|
|
6601
|
-
const defaultProps$
|
|
6608
|
+
const defaultProps$18 = {
|
|
6602
6609
|
title: "",
|
|
6603
6610
|
value: "",
|
|
6604
6611
|
disabled: false
|
|
6605
6612
|
};
|
|
6606
6613
|
const TabPane = (props) => {
|
|
6607
6614
|
const { children, autoHeightClassName, className, disabled } = {
|
|
6608
|
-
...defaultProps$
|
|
6615
|
+
...defaultProps$18,
|
|
6609
6616
|
...props
|
|
6610
6617
|
};
|
|
6611
6618
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -6631,7 +6638,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6631
6638
|
};
|
|
6632
6639
|
}
|
|
6633
6640
|
const requestAniFrame$1 = requestAniFrame();
|
|
6634
|
-
const defaultProps$
|
|
6641
|
+
const defaultProps$17 = {
|
|
6635
6642
|
...ComponentDefaults,
|
|
6636
6643
|
tabStyle: {},
|
|
6637
6644
|
name: "",
|
|
@@ -6641,7 +6648,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6641
6648
|
duration: 300,
|
|
6642
6649
|
autoHeight: false
|
|
6643
6650
|
};
|
|
6644
|
-
const classPrefix$
|
|
6651
|
+
const classPrefix$j = "nut-tabs";
|
|
6645
6652
|
const Tabs = (props) => {
|
|
6646
6653
|
const {
|
|
6647
6654
|
activeColor,
|
|
@@ -6659,7 +6666,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6659
6666
|
autoHeight,
|
|
6660
6667
|
...rest
|
|
6661
6668
|
} = {
|
|
6662
|
-
...defaultProps$
|
|
6669
|
+
...defaultProps$17,
|
|
6663
6670
|
...props
|
|
6664
6671
|
};
|
|
6665
6672
|
const [value, setValue] = usePropsValue({
|
|
@@ -6704,14 +6711,14 @@ var __publicField = (obj, key, value) => {
|
|
|
6704
6711
|
}
|
|
6705
6712
|
}, [children]);
|
|
6706
6713
|
const classes = classNames(
|
|
6707
|
-
classPrefix$
|
|
6708
|
-
`${classPrefix$
|
|
6714
|
+
classPrefix$j,
|
|
6715
|
+
`${classPrefix$j}--${direction}`,
|
|
6709
6716
|
className
|
|
6710
6717
|
);
|
|
6711
|
-
const classesTitle = classNames(`${classPrefix$
|
|
6712
|
-
[`${classPrefix$
|
|
6713
|
-
[`${classPrefix$
|
|
6714
|
-
[`${classPrefix$
|
|
6718
|
+
const classesTitle = classNames(`${classPrefix$j}__titles`, {
|
|
6719
|
+
[`${classPrefix$j}__titles--${activeType}`]: activeType,
|
|
6720
|
+
[`${classPrefix$j}__titles--scrollable`]: true,
|
|
6721
|
+
[`${classPrefix$j}__titles--${align}`]: align
|
|
6715
6722
|
});
|
|
6716
6723
|
const tabsActiveStyle = {
|
|
6717
6724
|
color: activeType === "smile" ? activeColor : "",
|
|
@@ -6851,7 +6858,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6851
6858
|
onClick: (e) => {
|
|
6852
6859
|
tabChange(item);
|
|
6853
6860
|
},
|
|
6854
|
-
className: classNames(`${classPrefix$
|
|
6861
|
+
className: classNames(`${classPrefix$j}__titles-item taro`, {
|
|
6855
6862
|
[`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
|
|
6856
6863
|
[`nut-tabs__titles-item--disabled`]: item.disabled,
|
|
6857
6864
|
[`nut-tabs__titles-item--${align}`]: align
|
|
@@ -6861,14 +6868,14 @@ var __publicField = (obj, key, value) => {
|
|
|
6861
6868
|
activeType === "line" && /* @__PURE__ */ React.createElement(
|
|
6862
6869
|
components.View,
|
|
6863
6870
|
{
|
|
6864
|
-
className: `${classPrefix$
|
|
6871
|
+
className: `${classPrefix$j}__titles-item__line`,
|
|
6865
6872
|
style: tabsActiveStyle
|
|
6866
6873
|
}
|
|
6867
6874
|
),
|
|
6868
6875
|
activeType === "smile" && /* @__PURE__ */ React.createElement(
|
|
6869
6876
|
components.View,
|
|
6870
6877
|
{
|
|
6871
|
-
className: `${classPrefix$
|
|
6878
|
+
className: `${classPrefix$j}__titles-item__smile`,
|
|
6872
6879
|
style: tabsActiveStyle
|
|
6873
6880
|
},
|
|
6874
6881
|
/* @__PURE__ */ React.createElement(a$k, { color: activeColor, width: 40, height: 20 })
|
|
@@ -6880,14 +6887,14 @@ var __publicField = (obj, key, value) => {
|
|
|
6880
6887
|
{
|
|
6881
6888
|
ellipsis: true
|
|
6882
6889
|
},
|
|
6883
|
-
`${classPrefix$
|
|
6890
|
+
`${classPrefix$j}__titles-item__text`
|
|
6884
6891
|
)
|
|
6885
6892
|
},
|
|
6886
6893
|
item.title
|
|
6887
6894
|
)
|
|
6888
6895
|
);
|
|
6889
6896
|
}))
|
|
6890
|
-
), /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix$
|
|
6897
|
+
), /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix$j}__content__wrap` }, /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix$j}__content`, style: contentStyle }, React.Children.map(children, (child, idx) => {
|
|
6891
6898
|
if (!React.isValidElement(child)) {
|
|
6892
6899
|
return null;
|
|
6893
6900
|
}
|
|
@@ -6904,10 +6911,10 @@ var __publicField = (obj, key, value) => {
|
|
|
6904
6911
|
return React.cloneElement(child, childProps);
|
|
6905
6912
|
}))));
|
|
6906
6913
|
};
|
|
6907
|
-
Tabs.defaultProps = defaultProps$
|
|
6914
|
+
Tabs.defaultProps = defaultProps$17;
|
|
6908
6915
|
Tabs.displayName = "NutTabs";
|
|
6909
6916
|
Tabs.TabPane = TabPane;
|
|
6910
|
-
const defaultProps$
|
|
6917
|
+
const defaultProps$16 = {
|
|
6911
6918
|
type: "custom",
|
|
6912
6919
|
existList: [],
|
|
6913
6920
|
defaultIcon: null,
|
|
@@ -6915,7 +6922,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6915
6922
|
custom: false
|
|
6916
6923
|
};
|
|
6917
6924
|
const ExistRender = (props) => {
|
|
6918
|
-
const { locale } = useConfig();
|
|
6925
|
+
const { locale } = useConfig$1();
|
|
6919
6926
|
const {
|
|
6920
6927
|
children,
|
|
6921
6928
|
type: type2,
|
|
@@ -6926,7 +6933,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6926
6933
|
onSelect,
|
|
6927
6934
|
onSwitch,
|
|
6928
6935
|
...rest
|
|
6929
|
-
} = { ...defaultProps$
|
|
6936
|
+
} = { ...defaultProps$16, ...props };
|
|
6930
6937
|
const classPrefix2 = "nut-address";
|
|
6931
6938
|
const selectedExist = (item) => {
|
|
6932
6939
|
existList.forEach((list, index) => {
|
|
@@ -7087,7 +7094,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7087
7094
|
}
|
|
7088
7095
|
}
|
|
7089
7096
|
const Tree$1 = Tree;
|
|
7090
|
-
const defaultProps$
|
|
7097
|
+
const defaultProps$15 = {
|
|
7091
7098
|
...ComponentDefaults,
|
|
7092
7099
|
activeColor: "",
|
|
7093
7100
|
activeIcon: "checklist",
|
|
@@ -7130,7 +7137,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7130
7137
|
onClose,
|
|
7131
7138
|
onChange,
|
|
7132
7139
|
onPathChange
|
|
7133
|
-
} = { ...defaultProps$
|
|
7140
|
+
} = { ...defaultProps$15, ...props };
|
|
7134
7141
|
const [tabvalue, setTabvalue] = React.useState("c1");
|
|
7135
7142
|
const [optionsData, setOptionsData] = React.useState([]);
|
|
7136
7143
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -7426,9 +7433,9 @@ var __publicField = (obj, key, value) => {
|
|
|
7426
7433
|
) : renderTabs());
|
|
7427
7434
|
};
|
|
7428
7435
|
const Cascader = React.forwardRef(InternalCascader);
|
|
7429
|
-
Cascader.defaultProps = defaultProps$
|
|
7436
|
+
Cascader.defaultProps = defaultProps$15;
|
|
7430
7437
|
Cascader.displayName = "NutCascader";
|
|
7431
|
-
const defaultProps$
|
|
7438
|
+
const defaultProps$14 = {
|
|
7432
7439
|
...ComponentDefaults,
|
|
7433
7440
|
visible: false,
|
|
7434
7441
|
type: "custom",
|
|
@@ -7455,7 +7462,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7455
7462
|
onPathChange,
|
|
7456
7463
|
...rest
|
|
7457
7464
|
} = {
|
|
7458
|
-
...defaultProps$
|
|
7465
|
+
...defaultProps$14,
|
|
7459
7466
|
...props
|
|
7460
7467
|
};
|
|
7461
7468
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, type2 === "custom" && /* @__PURE__ */ React.createElement(
|
|
@@ -7480,7 +7487,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7480
7487
|
}
|
|
7481
7488
|
));
|
|
7482
7489
|
};
|
|
7483
|
-
const defaultProps$
|
|
7490
|
+
const defaultProps$13 = {
|
|
7484
7491
|
...ComponentDefaults,
|
|
7485
7492
|
defaultValue: [],
|
|
7486
7493
|
type: "custom",
|
|
@@ -7496,7 +7503,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7496
7503
|
backIcon: null
|
|
7497
7504
|
};
|
|
7498
7505
|
const InternalAddress = (props, ref) => {
|
|
7499
|
-
const { locale } = useConfig();
|
|
7506
|
+
const { locale } = useConfig$1();
|
|
7500
7507
|
const {
|
|
7501
7508
|
style,
|
|
7502
7509
|
className,
|
|
@@ -7522,7 +7529,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7522
7529
|
onSwitch,
|
|
7523
7530
|
...rest
|
|
7524
7531
|
} = {
|
|
7525
|
-
...defaultProps$
|
|
7532
|
+
...defaultProps$13,
|
|
7526
7533
|
...props
|
|
7527
7534
|
};
|
|
7528
7535
|
const classPrefix2 = "nut-address";
|
|
@@ -7613,7 +7620,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7613
7620
|
));
|
|
7614
7621
|
};
|
|
7615
7622
|
const Address = React.forwardRef(InternalAddress);
|
|
7616
|
-
Address.defaultProps = defaultProps$
|
|
7623
|
+
Address.defaultProps = defaultProps$13;
|
|
7617
7624
|
Address.displayName = "NutAddress";
|
|
7618
7625
|
const Utils = {
|
|
7619
7626
|
/**
|
|
@@ -7863,7 +7870,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7863
7870
|
const isStartAndEnd = (days) => {
|
|
7864
7871
|
return days.length >= 2 && Utils.isEqual(days[0], days[1]);
|
|
7865
7872
|
};
|
|
7866
|
-
const defaultProps$
|
|
7873
|
+
const defaultProps$12 = {
|
|
7867
7874
|
...ComponentDefaults,
|
|
7868
7875
|
type: "single",
|
|
7869
7876
|
autoBackfill: false,
|
|
@@ -7894,7 +7901,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7894
7901
|
}
|
|
7895
7902
|
};
|
|
7896
7903
|
const CalendarItem = React.forwardRef((props, ref) => {
|
|
7897
|
-
const { locale } = useConfig();
|
|
7904
|
+
const { locale } = useConfig$1();
|
|
7898
7905
|
const {
|
|
7899
7906
|
style,
|
|
7900
7907
|
className,
|
|
@@ -7923,7 +7930,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7923
7930
|
onUpdate,
|
|
7924
7931
|
onDayClick,
|
|
7925
7932
|
onPageChange
|
|
7926
|
-
} = { ...defaultProps$
|
|
7933
|
+
} = { ...defaultProps$12, ...props };
|
|
7927
7934
|
const weekdays = locale.calendaritem.weekdays;
|
|
7928
7935
|
const weeks = [
|
|
7929
7936
|
...weekdays.slice(firstDayOfWeek, 7),
|
|
@@ -8468,9 +8475,9 @@ var __publicField = (obj, key, value) => {
|
|
|
8468
8475
|
};
|
|
8469
8476
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
|
|
8470
8477
|
});
|
|
8471
|
-
CalendarItem.defaultProps = defaultProps$
|
|
8478
|
+
CalendarItem.defaultProps = defaultProps$12;
|
|
8472
8479
|
CalendarItem.displayName = "NutCalendarItem";
|
|
8473
|
-
const defaultProps$
|
|
8480
|
+
const defaultProps$11 = {
|
|
8474
8481
|
...ComponentDefaults,
|
|
8475
8482
|
type: "single",
|
|
8476
8483
|
autoBackfill: false,
|
|
@@ -8503,7 +8510,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8503
8510
|
}
|
|
8504
8511
|
};
|
|
8505
8512
|
const Calendar = React.forwardRef((props, ref) => {
|
|
8506
|
-
const { locale } = useConfig();
|
|
8513
|
+
const { locale } = useConfig$1();
|
|
8507
8514
|
const {
|
|
8508
8515
|
style,
|
|
8509
8516
|
className,
|
|
@@ -8533,7 +8540,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8533
8540
|
onConfirm,
|
|
8534
8541
|
onDayClick,
|
|
8535
8542
|
onPageChange
|
|
8536
|
-
} = { ...defaultProps$
|
|
8543
|
+
} = { ...defaultProps$11, ...props };
|
|
8537
8544
|
const calendarRef = React.useRef(null);
|
|
8538
8545
|
const close2 = () => {
|
|
8539
8546
|
onClose && onClose();
|
|
@@ -8607,11 +8614,11 @@ var __publicField = (obj, key, value) => {
|
|
|
8607
8614
|
renderItem()
|
|
8608
8615
|
) : renderItem());
|
|
8609
8616
|
});
|
|
8610
|
-
Calendar.defaultProps = defaultProps$
|
|
8617
|
+
Calendar.defaultProps = defaultProps$11;
|
|
8611
8618
|
Calendar.displayName = "NutCalendar";
|
|
8612
8619
|
const CheckboxGroupContext = React.createContext(null);
|
|
8613
8620
|
const Context$1 = CheckboxGroupContext;
|
|
8614
|
-
const defaultProps
|
|
8621
|
+
const defaultProps$10 = {
|
|
8615
8622
|
max: void 0,
|
|
8616
8623
|
labelPosition: "right",
|
|
8617
8624
|
direction: "vertical",
|
|
@@ -8619,10 +8626,10 @@ var __publicField = (obj, key, value) => {
|
|
|
8619
8626
|
},
|
|
8620
8627
|
options: []
|
|
8621
8628
|
};
|
|
8622
|
-
const classPrefix$
|
|
8629
|
+
const classPrefix$i = "nut-checkboxgroup";
|
|
8623
8630
|
const CheckboxGroup = React.forwardRef(
|
|
8624
8631
|
(props, ref) => {
|
|
8625
|
-
const { children } = { ...defaultProps
|
|
8632
|
+
const { children } = { ...defaultProps$10, ...props };
|
|
8626
8633
|
const {
|
|
8627
8634
|
className,
|
|
8628
8635
|
disabled,
|
|
@@ -8701,7 +8708,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8701
8708
|
/* @__PURE__ */ React.createElement(
|
|
8702
8709
|
"div",
|
|
8703
8710
|
{
|
|
8704
|
-
className: classNames(classPrefix$
|
|
8711
|
+
className: classNames(classPrefix$i, className, {
|
|
8705
8712
|
[`nut-checkboxgroup--${props.direction}`]: props.direction
|
|
8706
8713
|
}),
|
|
8707
8714
|
...rest
|
|
@@ -8711,9 +8718,9 @@ var __publicField = (obj, key, value) => {
|
|
|
8711
8718
|
);
|
|
8712
8719
|
}
|
|
8713
8720
|
);
|
|
8714
|
-
CheckboxGroup.defaultProps = defaultProps
|
|
8721
|
+
CheckboxGroup.defaultProps = defaultProps$10;
|
|
8715
8722
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
8716
|
-
const defaultProps
|
|
8723
|
+
const defaultProps$$ = {
|
|
8717
8724
|
...ComponentDefaults,
|
|
8718
8725
|
disabled: false,
|
|
8719
8726
|
labelPosition: "right",
|
|
@@ -8723,10 +8730,10 @@ var __publicField = (obj, key, value) => {
|
|
|
8723
8730
|
onChange: (value) => {
|
|
8724
8731
|
}
|
|
8725
8732
|
};
|
|
8726
|
-
const classPrefix$
|
|
8733
|
+
const classPrefix$h = "nut-checkbox";
|
|
8727
8734
|
const Checkbox = (props) => {
|
|
8728
8735
|
const { children } = {
|
|
8729
|
-
...defaultProps
|
|
8736
|
+
...defaultProps$$,
|
|
8730
8737
|
...props
|
|
8731
8738
|
};
|
|
8732
8739
|
const {
|
|
@@ -8785,22 +8792,22 @@ var __publicField = (obj, key, value) => {
|
|
|
8785
8792
|
};
|
|
8786
8793
|
const color = () => {
|
|
8787
8794
|
if (innerDisabled) {
|
|
8788
|
-
return `${classPrefix$
|
|
8795
|
+
return `${classPrefix$h}__icon--disable`;
|
|
8789
8796
|
}
|
|
8790
8797
|
if (innerChecked) {
|
|
8791
8798
|
if (innerIndeterminate) {
|
|
8792
|
-
return `${classPrefix$
|
|
8799
|
+
return `${classPrefix$h}__icon--indeterminate`;
|
|
8793
8800
|
}
|
|
8794
|
-
return `${classPrefix$
|
|
8801
|
+
return `${classPrefix$h}__icon`;
|
|
8795
8802
|
}
|
|
8796
|
-
return `${classPrefix$
|
|
8803
|
+
return `${classPrefix$h}__icon--unchecked`;
|
|
8797
8804
|
};
|
|
8798
8805
|
const renderLabel = () => {
|
|
8799
8806
|
return /* @__PURE__ */ React.createElement(
|
|
8800
8807
|
"span",
|
|
8801
8808
|
{
|
|
8802
|
-
className: classNames(`${classPrefix$
|
|
8803
|
-
[`${classPrefix$
|
|
8809
|
+
className: classNames(`${classPrefix$h}__label `, {
|
|
8810
|
+
[`${classPrefix$h}__label--disabled`]: innerDisabled
|
|
8804
8811
|
})
|
|
8805
8812
|
},
|
|
8806
8813
|
children || label
|
|
@@ -8819,8 +8826,8 @@ var __publicField = (obj, key, value) => {
|
|
|
8819
8826
|
return /* @__PURE__ */ React.createElement(
|
|
8820
8827
|
"div",
|
|
8821
8828
|
{
|
|
8822
|
-
className: classNames(classPrefix$
|
|
8823
|
-
[`${classPrefix$
|
|
8829
|
+
className: classNames(classPrefix$h, className, {
|
|
8830
|
+
[`${classPrefix$h}--reverse`]: labelPosition === "left"
|
|
8824
8831
|
}),
|
|
8825
8832
|
...rest,
|
|
8826
8833
|
onClick: handleClick
|
|
@@ -8829,7 +8836,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8829
8836
|
renderLabel()
|
|
8830
8837
|
);
|
|
8831
8838
|
};
|
|
8832
|
-
Checkbox.defaultProps = defaultProps
|
|
8839
|
+
Checkbox.defaultProps = defaultProps$$;
|
|
8833
8840
|
Checkbox.displayName = "NutCheckBox";
|
|
8834
8841
|
Checkbox.Group = CheckboxGroup;
|
|
8835
8842
|
const MIN_DISTANCE = 10;
|
|
@@ -9156,7 +9163,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9156
9163
|
}, []);
|
|
9157
9164
|
return [refs.current, setRefs, reset];
|
|
9158
9165
|
}
|
|
9159
|
-
const defaultProps$
|
|
9166
|
+
const defaultProps$_ = {
|
|
9160
9167
|
...ComponentDefaults,
|
|
9161
9168
|
visible: false,
|
|
9162
9169
|
title: "",
|
|
@@ -9167,7 +9174,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9167
9174
|
duration: 1e3
|
|
9168
9175
|
};
|
|
9169
9176
|
const InternalPicker = (props, ref) => {
|
|
9170
|
-
const { locale } = useConfig();
|
|
9177
|
+
const { locale } = useConfig$1();
|
|
9171
9178
|
const {
|
|
9172
9179
|
children,
|
|
9173
9180
|
visible,
|
|
@@ -9183,7 +9190,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9183
9190
|
afterClose,
|
|
9184
9191
|
onChange,
|
|
9185
9192
|
...rest
|
|
9186
|
-
} = { ...defaultProps$
|
|
9193
|
+
} = { ...defaultProps$_, ...props };
|
|
9187
9194
|
const classPrefix2 = "nut-picker";
|
|
9188
9195
|
const classes = classNames(classPrefix2, className);
|
|
9189
9196
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -9481,7 +9488,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9481
9488
|
const Picker = React.forwardRef(InternalPicker);
|
|
9482
9489
|
const Picker$1 = Picker;
|
|
9483
9490
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
9484
|
-
const defaultProps$
|
|
9491
|
+
const defaultProps$Z = {
|
|
9485
9492
|
...ComponentDefaults,
|
|
9486
9493
|
visible: false,
|
|
9487
9494
|
title: "",
|
|
@@ -9512,10 +9519,10 @@ var __publicField = (obj, key, value) => {
|
|
|
9512
9519
|
style,
|
|
9513
9520
|
...rest
|
|
9514
9521
|
} = {
|
|
9515
|
-
...defaultProps$
|
|
9522
|
+
...defaultProps$Z,
|
|
9516
9523
|
...props
|
|
9517
9524
|
};
|
|
9518
|
-
const { locale } = useConfig();
|
|
9525
|
+
const { locale } = useConfig$1();
|
|
9519
9526
|
const datepickerLang = locale.datepicker;
|
|
9520
9527
|
const zhCNType = {
|
|
9521
9528
|
day: datepickerLang.day,
|
|
@@ -9794,7 +9801,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9794
9801
|
)
|
|
9795
9802
|
);
|
|
9796
9803
|
};
|
|
9797
|
-
DatePicker.defaultProps = defaultProps$
|
|
9804
|
+
DatePicker.defaultProps = defaultProps$Z;
|
|
9798
9805
|
DatePicker.displayName = "NutDatePicker";
|
|
9799
9806
|
const Context = React.createContext({});
|
|
9800
9807
|
function _extends() {
|
|
@@ -11005,7 +11012,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11005
11012
|
}
|
|
11006
11013
|
).$$typeof === component.type.$$typeof;
|
|
11007
11014
|
}
|
|
11008
|
-
const defaultProps$
|
|
11015
|
+
const defaultProps$Y = {
|
|
11009
11016
|
...ComponentDefaults,
|
|
11010
11017
|
required: false,
|
|
11011
11018
|
name: "",
|
|
@@ -11072,7 +11079,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11072
11079
|
__publicField(this, "renderLayout", (childNode) => {
|
|
11073
11080
|
var _a, _b;
|
|
11074
11081
|
const { label, name, required: required2, className, style, errorMessageAlign } = {
|
|
11075
|
-
...defaultProps$
|
|
11082
|
+
...defaultProps$Y,
|
|
11076
11083
|
...this.props
|
|
11077
11084
|
};
|
|
11078
11085
|
const item = ((_a = this.context.errors) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errors) == null ? void 0 : _b.filter((item2) => {
|
|
@@ -11122,9 +11129,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11122
11129
|
return /* @__PURE__ */ React.createElement(React.Fragment, { key: this.state.resetCount }, this.renderLayout(returnChildNode));
|
|
11123
11130
|
}
|
|
11124
11131
|
}
|
|
11125
|
-
__publicField(FormItem, "defaultProps", defaultProps$
|
|
11132
|
+
__publicField(FormItem, "defaultProps", defaultProps$Y);
|
|
11126
11133
|
__publicField(FormItem, "contextType", Context);
|
|
11127
|
-
const defaultProps$
|
|
11134
|
+
const defaultProps$X = {
|
|
11128
11135
|
...ComponentDefaults,
|
|
11129
11136
|
labelPosition: "right",
|
|
11130
11137
|
starPosition: "left",
|
|
@@ -11152,7 +11159,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11152
11159
|
starPosition,
|
|
11153
11160
|
form
|
|
11154
11161
|
} = {
|
|
11155
|
-
...defaultProps$
|
|
11162
|
+
...defaultProps$X,
|
|
11156
11163
|
...props
|
|
11157
11164
|
};
|
|
11158
11165
|
let formInstance;
|
|
@@ -11195,7 +11202,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11195
11202
|
/* @__PURE__ */ React.createElement(Cell.Group, null, /* @__PURE__ */ React.createElement(Context.Provider, { value: formInstance }, children), footer ? /* @__PURE__ */ React.createElement(Cell, null, footer) : null)
|
|
11196
11203
|
);
|
|
11197
11204
|
};
|
|
11198
|
-
Form.defaultProps = defaultProps$
|
|
11205
|
+
Form.defaultProps = defaultProps$X;
|
|
11199
11206
|
Form.displayName = "NutForm";
|
|
11200
11207
|
Form.Item = FormItem;
|
|
11201
11208
|
Form.useForm = useForm;
|
|
@@ -11223,7 +11230,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11223
11230
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
11224
11231
|
return value.replace(regExp, "");
|
|
11225
11232
|
}
|
|
11226
|
-
const defaultProps$
|
|
11233
|
+
const defaultProps$W = {
|
|
11227
11234
|
...ComponentDefaults,
|
|
11228
11235
|
type: "text",
|
|
11229
11236
|
name: "",
|
|
@@ -11241,7 +11248,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11241
11248
|
};
|
|
11242
11249
|
const Input = React.forwardRef(
|
|
11243
11250
|
(props, ref) => {
|
|
11244
|
-
const { locale } = useConfig();
|
|
11251
|
+
const { locale } = useConfig$1();
|
|
11245
11252
|
const {
|
|
11246
11253
|
type: type2,
|
|
11247
11254
|
name,
|
|
@@ -11267,7 +11274,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11267
11274
|
value: _value,
|
|
11268
11275
|
...rest
|
|
11269
11276
|
} = {
|
|
11270
|
-
...defaultProps$
|
|
11277
|
+
...defaultProps$W,
|
|
11271
11278
|
...props
|
|
11272
11279
|
};
|
|
11273
11280
|
const [value, setValue] = usePropsValue({
|
|
@@ -11408,9 +11415,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11408
11415
|
);
|
|
11409
11416
|
}
|
|
11410
11417
|
);
|
|
11411
|
-
Input.defaultProps = defaultProps$
|
|
11418
|
+
Input.defaultProps = defaultProps$W;
|
|
11412
11419
|
Input.displayName = "NutInput";
|
|
11413
|
-
const defaultProps$
|
|
11420
|
+
const defaultProps$V = {
|
|
11414
11421
|
...ComponentDefaults,
|
|
11415
11422
|
disabled: false,
|
|
11416
11423
|
min: 1,
|
|
@@ -11422,7 +11429,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11422
11429
|
digits: 0,
|
|
11423
11430
|
async: false
|
|
11424
11431
|
};
|
|
11425
|
-
const classPrefix$
|
|
11432
|
+
const classPrefix$g = `nut-inputnumber`;
|
|
11426
11433
|
const InputNumber = (props) => {
|
|
11427
11434
|
const {
|
|
11428
11435
|
children,
|
|
@@ -11447,7 +11454,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11447
11454
|
onChange,
|
|
11448
11455
|
...restProps
|
|
11449
11456
|
} = {
|
|
11450
|
-
...defaultProps$
|
|
11457
|
+
...defaultProps$V,
|
|
11451
11458
|
...props
|
|
11452
11459
|
};
|
|
11453
11460
|
const inputRef = React.useRef("");
|
|
@@ -11465,8 +11472,8 @@ var __publicField = (obj, key, value) => {
|
|
|
11465
11472
|
}, []);
|
|
11466
11473
|
const classes = classNames(
|
|
11467
11474
|
{
|
|
11468
|
-
[`${classPrefix$
|
|
11469
|
-
[`${classPrefix$
|
|
11475
|
+
[`${classPrefix$g}`]: true,
|
|
11476
|
+
[`${classPrefix$g}--disabled`]: disabled
|
|
11470
11477
|
},
|
|
11471
11478
|
className
|
|
11472
11479
|
);
|
|
@@ -11636,9 +11643,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11636
11643
|
}
|
|
11637
11644
|
)), /* @__PURE__ */ React.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React.createElement(a$9, { className: iconAddClasses, onClick: addNumber })));
|
|
11638
11645
|
};
|
|
11639
|
-
InputNumber.defaultProps = defaultProps$
|
|
11646
|
+
InputNumber.defaultProps = defaultProps$V;
|
|
11640
11647
|
InputNumber.displayName = "NutInputNumber";
|
|
11641
|
-
const defaultProps$
|
|
11648
|
+
const defaultProps$U = {
|
|
11642
11649
|
...ComponentDefaults,
|
|
11643
11650
|
columns: 1,
|
|
11644
11651
|
direction: "down",
|
|
@@ -11668,7 +11675,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11668
11675
|
parent,
|
|
11669
11676
|
index
|
|
11670
11677
|
} = {
|
|
11671
|
-
...defaultProps$
|
|
11678
|
+
...defaultProps$U,
|
|
11672
11679
|
...props
|
|
11673
11680
|
};
|
|
11674
11681
|
const [showPopup, setShowPopup] = React.useState(show);
|
|
@@ -11833,9 +11840,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11833
11840
|
)
|
|
11834
11841
|
));
|
|
11835
11842
|
});
|
|
11836
|
-
MenuItem.defaultProps = defaultProps$
|
|
11843
|
+
MenuItem.defaultProps = defaultProps$U;
|
|
11837
11844
|
MenuItem.displayName = "NutMenuItem";
|
|
11838
|
-
const defaultProps$
|
|
11845
|
+
const defaultProps$T = {
|
|
11839
11846
|
...ComponentDefaults,
|
|
11840
11847
|
activeColor: "",
|
|
11841
11848
|
closeOnOverlayClick: true,
|
|
@@ -11860,7 +11867,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11860
11867
|
onOpen,
|
|
11861
11868
|
...rest
|
|
11862
11869
|
} = {
|
|
11863
|
-
...defaultProps$
|
|
11870
|
+
...defaultProps$T,
|
|
11864
11871
|
...props
|
|
11865
11872
|
};
|
|
11866
11873
|
const menuRef = React.useRef(null);
|
|
@@ -11986,10 +11993,10 @@ var __publicField = (obj, key, value) => {
|
|
|
11986
11993
|
), cloneChildren())
|
|
11987
11994
|
);
|
|
11988
11995
|
};
|
|
11989
|
-
Menu.defaultProps = defaultProps$
|
|
11996
|
+
Menu.defaultProps = defaultProps$T;
|
|
11990
11997
|
Menu.displayName = "NutMenu";
|
|
11991
11998
|
Menu.Item = MenuItem;
|
|
11992
|
-
const defaultProps$
|
|
11999
|
+
const defaultProps$S = {
|
|
11993
12000
|
...ComponentDefaults,
|
|
11994
12001
|
visible: false,
|
|
11995
12002
|
type: "default",
|
|
@@ -11999,7 +12006,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11999
12006
|
}
|
|
12000
12007
|
};
|
|
12001
12008
|
const NumberKeyboard = (props) => {
|
|
12002
|
-
const { locale } = useConfig();
|
|
12009
|
+
const { locale } = useConfig$1();
|
|
12003
12010
|
const {
|
|
12004
12011
|
title,
|
|
12005
12012
|
confirmText,
|
|
@@ -12108,7 +12115,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12108
12115
|
"span",
|
|
12109
12116
|
{
|
|
12110
12117
|
className: `${classPrefix2}__header__close`,
|
|
12111
|
-
onClick:
|
|
12118
|
+
onClick: onConfirm
|
|
12112
12119
|
},
|
|
12113
12120
|
locale.done
|
|
12114
12121
|
)), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__body` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__body__keys` }, keysList == null ? void 0 : keysList.map((item) => {
|
|
@@ -12134,17 +12141,17 @@ var __publicField = (obj, key, value) => {
|
|
|
12134
12141
|
))))
|
|
12135
12142
|
);
|
|
12136
12143
|
};
|
|
12137
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
12144
|
+
NumberKeyboard.defaultProps = defaultProps$S;
|
|
12138
12145
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
12139
12146
|
const RadioContext = React.createContext(null);
|
|
12140
|
-
const defaultProps$
|
|
12147
|
+
const defaultProps$R = {
|
|
12141
12148
|
labelPosition: "right",
|
|
12142
12149
|
onChange: (value) => {
|
|
12143
12150
|
},
|
|
12144
12151
|
direction: "vertical",
|
|
12145
12152
|
options: []
|
|
12146
12153
|
};
|
|
12147
|
-
const classPrefix$
|
|
12154
|
+
const classPrefix$f = "nut-radiogroup";
|
|
12148
12155
|
const RadioGroup = React.forwardRef(
|
|
12149
12156
|
(props, ref) => {
|
|
12150
12157
|
const {
|
|
@@ -12158,7 +12165,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12158
12165
|
options,
|
|
12159
12166
|
disabled,
|
|
12160
12167
|
...rest
|
|
12161
|
-
} = { ...defaultProps$
|
|
12168
|
+
} = { ...defaultProps$R, ...props };
|
|
12162
12169
|
const [val2State, setVal2State] = usePropsValue({
|
|
12163
12170
|
defaultValue: props.defaultValue,
|
|
12164
12171
|
value: props.value,
|
|
@@ -12200,8 +12207,8 @@ var __publicField = (obj, key, value) => {
|
|
|
12200
12207
|
/* @__PURE__ */ React.createElement(
|
|
12201
12208
|
"div",
|
|
12202
12209
|
{
|
|
12203
|
-
className: classNames(classPrefix$
|
|
12204
|
-
[`${classPrefix$
|
|
12210
|
+
className: classNames(classPrefix$f, className, {
|
|
12211
|
+
[`${classPrefix$f}--${props.direction}`]: props.direction
|
|
12205
12212
|
}),
|
|
12206
12213
|
...rest
|
|
12207
12214
|
},
|
|
@@ -12210,9 +12217,9 @@ var __publicField = (obj, key, value) => {
|
|
|
12210
12217
|
);
|
|
12211
12218
|
}
|
|
12212
12219
|
);
|
|
12213
|
-
RadioGroup.defaultProps = defaultProps$
|
|
12220
|
+
RadioGroup.defaultProps = defaultProps$R;
|
|
12214
12221
|
RadioGroup.displayName = "NutRadioGroup";
|
|
12215
|
-
const defaultProps$
|
|
12222
|
+
const defaultProps$Q = {
|
|
12216
12223
|
...ComponentDefaults,
|
|
12217
12224
|
disabled: false,
|
|
12218
12225
|
shape: "round",
|
|
@@ -12238,7 +12245,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12238
12245
|
onChange,
|
|
12239
12246
|
...others
|
|
12240
12247
|
} = {
|
|
12241
|
-
...defaultProps$
|
|
12248
|
+
...defaultProps$Q,
|
|
12242
12249
|
...props
|
|
12243
12250
|
};
|
|
12244
12251
|
let { labelPosition, disabled, ...rest } = others;
|
|
@@ -12334,10 +12341,10 @@ var __publicField = (obj, key, value) => {
|
|
|
12334
12341
|
renderRadioItem()
|
|
12335
12342
|
);
|
|
12336
12343
|
};
|
|
12337
|
-
Radio.defaultProps = defaultProps$
|
|
12344
|
+
Radio.defaultProps = defaultProps$Q;
|
|
12338
12345
|
Radio.displayName = "NutRadio";
|
|
12339
12346
|
Radio.Group = RadioGroup;
|
|
12340
|
-
const defaultProps$
|
|
12347
|
+
const defaultProps$P = {
|
|
12341
12348
|
...ComponentDefaults,
|
|
12342
12349
|
range: false,
|
|
12343
12350
|
min: 0,
|
|
@@ -12365,7 +12372,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12365
12372
|
step,
|
|
12366
12373
|
value,
|
|
12367
12374
|
defaultValue
|
|
12368
|
-
} = { ...defaultProps$
|
|
12375
|
+
} = { ...defaultProps$P, ...props };
|
|
12369
12376
|
const classPrefix2 = "nut-range";
|
|
12370
12377
|
const [buttonIndex, setButtonIndex] = React.useState(0);
|
|
12371
12378
|
const [dragStatus, setDragStatus] = React.useState("start");
|
|
@@ -12629,9 +12636,9 @@ var __publicField = (obj, key, value) => {
|
|
|
12629
12636
|
renderButton()
|
|
12630
12637
|
))), maxDescription !== null && /* @__PURE__ */ React.createElement("div", { className: "max" }, maxDescription || max));
|
|
12631
12638
|
};
|
|
12632
|
-
Range.defaultProps = defaultProps$
|
|
12639
|
+
Range.defaultProps = defaultProps$P;
|
|
12633
12640
|
Range.displayName = "NutRange";
|
|
12634
|
-
const defaultProps$
|
|
12641
|
+
const defaultProps$O = {
|
|
12635
12642
|
...ComponentDefaults,
|
|
12636
12643
|
count: 5,
|
|
12637
12644
|
min: 0,
|
|
@@ -12656,7 +12663,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12656
12663
|
allowHalf,
|
|
12657
12664
|
onChange
|
|
12658
12665
|
} = {
|
|
12659
|
-
...defaultProps$
|
|
12666
|
+
...defaultProps$O,
|
|
12660
12667
|
...props
|
|
12661
12668
|
};
|
|
12662
12669
|
const classPrefix2 = "nut-rate";
|
|
@@ -12739,9 +12746,9 @@ var __publicField = (obj, key, value) => {
|
|
|
12739
12746
|
})
|
|
12740
12747
|
);
|
|
12741
12748
|
};
|
|
12742
|
-
Rate.defaultProps = defaultProps$
|
|
12749
|
+
Rate.defaultProps = defaultProps$O;
|
|
12743
12750
|
Rate.displayName = "NutRate";
|
|
12744
|
-
const defaultProps$
|
|
12751
|
+
const defaultProps$N = {
|
|
12745
12752
|
...ComponentDefaults,
|
|
12746
12753
|
placeholder: "",
|
|
12747
12754
|
shape: "square",
|
|
@@ -12757,7 +12764,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12757
12764
|
};
|
|
12758
12765
|
const SearchBar = (props) => {
|
|
12759
12766
|
const classPrefix2 = "nut-searchbar";
|
|
12760
|
-
const { locale } = useConfig();
|
|
12767
|
+
const { locale } = useConfig$1();
|
|
12761
12768
|
const searchRef = React.useRef(null);
|
|
12762
12769
|
const [value, setValue] = React.useState(() => props.value);
|
|
12763
12770
|
const {
|
|
@@ -12780,7 +12787,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12780
12787
|
onSearch,
|
|
12781
12788
|
onInputClick
|
|
12782
12789
|
} = {
|
|
12783
|
-
...defaultProps$
|
|
12790
|
+
...defaultProps$N,
|
|
12784
12791
|
...props
|
|
12785
12792
|
};
|
|
12786
12793
|
const forceFocus = () => {
|
|
@@ -12898,9 +12905,9 @@ var __publicField = (obj, key, value) => {
|
|
|
12898
12905
|
renderRight()
|
|
12899
12906
|
);
|
|
12900
12907
|
};
|
|
12901
|
-
SearchBar.defaultProps = defaultProps$
|
|
12908
|
+
SearchBar.defaultProps = defaultProps$N;
|
|
12902
12909
|
SearchBar.displayName = "NutSearchBar";
|
|
12903
|
-
const defaultProps$
|
|
12910
|
+
const defaultProps$M = {
|
|
12904
12911
|
...ComponentDefaults,
|
|
12905
12912
|
value: "",
|
|
12906
12913
|
visible: false,
|
|
@@ -12911,7 +12918,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12911
12918
|
autoFocus: false
|
|
12912
12919
|
};
|
|
12913
12920
|
const ShortPassword = (props) => {
|
|
12914
|
-
const { locale } = useConfig();
|
|
12921
|
+
const { locale } = useConfig$1();
|
|
12915
12922
|
const {
|
|
12916
12923
|
title,
|
|
12917
12924
|
description,
|
|
@@ -12937,7 +12944,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12937
12944
|
onCloseIconClick,
|
|
12938
12945
|
...rest
|
|
12939
12946
|
} = {
|
|
12940
|
-
...defaultProps$
|
|
12947
|
+
...defaultProps$M,
|
|
12941
12948
|
...props
|
|
12942
12949
|
};
|
|
12943
12950
|
const classPrefix2 = "nut-shortpassword";
|
|
@@ -12994,9 +13001,9 @@ var __publicField = (obj, key, value) => {
|
|
|
12994
13001
|
), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__footer__sure`, onClick: sure }, locale.confirm)))
|
|
12995
13002
|
);
|
|
12996
13003
|
};
|
|
12997
|
-
ShortPassword.defaultProps = defaultProps$
|
|
13004
|
+
ShortPassword.defaultProps = defaultProps$M;
|
|
12998
13005
|
ShortPassword.displayName = "NutShortPassword";
|
|
12999
|
-
const defaultProps$
|
|
13006
|
+
const defaultProps$L = {
|
|
13000
13007
|
...ComponentDefaults,
|
|
13001
13008
|
canvasId: "spcanvas",
|
|
13002
13009
|
type: "png",
|
|
@@ -13015,7 +13022,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13015
13022
|
onClear,
|
|
13016
13023
|
...rest
|
|
13017
13024
|
} = {
|
|
13018
|
-
...defaultProps$
|
|
13025
|
+
...defaultProps$L,
|
|
13019
13026
|
...props
|
|
13020
13027
|
};
|
|
13021
13028
|
const classPrefix2 = `nut-signature`;
|
|
@@ -13163,9 +13170,9 @@ var __publicField = (obj, key, value) => {
|
|
|
13163
13170
|
)));
|
|
13164
13171
|
};
|
|
13165
13172
|
const Signature = React.forwardRef(InternalSignature);
|
|
13166
|
-
Signature.defaultProps = defaultProps$
|
|
13173
|
+
Signature.defaultProps = defaultProps$L;
|
|
13167
13174
|
Signature.displayName = "NutSignature";
|
|
13168
|
-
const defaultProps$
|
|
13175
|
+
const defaultProps$K = {
|
|
13169
13176
|
...ComponentDefaults,
|
|
13170
13177
|
disabled: false,
|
|
13171
13178
|
activeText: "",
|
|
@@ -13180,9 +13187,10 @@ var __publicField = (obj, key, value) => {
|
|
|
13180
13187
|
inactiveText,
|
|
13181
13188
|
className,
|
|
13182
13189
|
style,
|
|
13183
|
-
onChange
|
|
13190
|
+
onChange,
|
|
13191
|
+
...rest
|
|
13184
13192
|
} = {
|
|
13185
|
-
...defaultProps$
|
|
13193
|
+
...defaultProps$K,
|
|
13186
13194
|
...props
|
|
13187
13195
|
};
|
|
13188
13196
|
const classPrefix2 = "nut-switch";
|
|
@@ -13199,11 +13207,20 @@ var __publicField = (obj, key, value) => {
|
|
|
13199
13207
|
onChange && onChange(!value, event);
|
|
13200
13208
|
setValue(!value);
|
|
13201
13209
|
};
|
|
13202
|
-
return /* @__PURE__ */ React.createElement(
|
|
13210
|
+
return /* @__PURE__ */ React.createElement(
|
|
13211
|
+
"div",
|
|
13212
|
+
{
|
|
13213
|
+
className: classes(),
|
|
13214
|
+
onClick: (e) => onClick(e),
|
|
13215
|
+
style,
|
|
13216
|
+
...rest
|
|
13217
|
+
},
|
|
13218
|
+
/* @__PURE__ */ React.createElement("div", { className: "switch-button" }, !value && /* @__PURE__ */ React.createElement("div", { className: "close-line" }), activeText && /* @__PURE__ */ React.createElement(React.Fragment, null, value ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__label open` }, activeText) : /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__label close` }, inactiveText)))
|
|
13219
|
+
);
|
|
13203
13220
|
};
|
|
13204
|
-
Switch.defaultProps = defaultProps$
|
|
13221
|
+
Switch.defaultProps = defaultProps$K;
|
|
13205
13222
|
Switch.displayName = "NutSwitch";
|
|
13206
|
-
const defaultProps$
|
|
13223
|
+
const defaultProps$J = {
|
|
13207
13224
|
...ComponentDefaults,
|
|
13208
13225
|
defaultValue: "",
|
|
13209
13226
|
showCount: false,
|
|
@@ -13214,7 +13231,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13214
13231
|
autoSize: false
|
|
13215
13232
|
};
|
|
13216
13233
|
const TextArea = (props) => {
|
|
13217
|
-
const { locale } = useConfig();
|
|
13234
|
+
const { locale } = useConfig$1();
|
|
13218
13235
|
const {
|
|
13219
13236
|
className,
|
|
13220
13237
|
value,
|
|
@@ -13231,7 +13248,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13231
13248
|
onBlur,
|
|
13232
13249
|
onFocus,
|
|
13233
13250
|
...rest
|
|
13234
|
-
} = { ...defaultProps$
|
|
13251
|
+
} = { ...defaultProps$J, ...props };
|
|
13235
13252
|
const classPrefix2 = "nut-textarea";
|
|
13236
13253
|
const compositionRef = React.useRef(false);
|
|
13237
13254
|
const format2 = (value2) => {
|
|
@@ -13307,9 +13324,9 @@ var __publicField = (obj, key, value) => {
|
|
|
13307
13324
|
showCount && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__limit` }, inputValue.length, "/", maxLength < 0 ? 0 : maxLength)
|
|
13308
13325
|
);
|
|
13309
13326
|
};
|
|
13310
|
-
TextArea.defaultProps = defaultProps$
|
|
13327
|
+
TextArea.defaultProps = defaultProps$J;
|
|
13311
13328
|
TextArea.displayName = "NutTextArea";
|
|
13312
|
-
const defaultProps$
|
|
13329
|
+
const defaultProps$I = {
|
|
13313
13330
|
...ComponentDefaults,
|
|
13314
13331
|
percent: 0,
|
|
13315
13332
|
showText: false,
|
|
@@ -13330,7 +13347,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13330
13347
|
delay,
|
|
13331
13348
|
...rest
|
|
13332
13349
|
} = {
|
|
13333
|
-
...defaultProps$
|
|
13350
|
+
...defaultProps$I,
|
|
13334
13351
|
...props
|
|
13335
13352
|
};
|
|
13336
13353
|
const classPrefix2 = "nut-progress";
|
|
@@ -13381,7 +13398,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13381
13398
|
)
|
|
13382
13399
|
))));
|
|
13383
13400
|
};
|
|
13384
|
-
Progress.defaultProps = defaultProps$
|
|
13401
|
+
Progress.defaultProps = defaultProps$I;
|
|
13385
13402
|
Progress.displayName = "NutProgress";
|
|
13386
13403
|
class UploadOptions {
|
|
13387
13404
|
constructor() {
|
|
@@ -13524,7 +13541,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13524
13541
|
done();
|
|
13525
13542
|
}
|
|
13526
13543
|
};
|
|
13527
|
-
const defaultProps$
|
|
13544
|
+
const defaultProps$H = {
|
|
13528
13545
|
...ComponentDefaults,
|
|
13529
13546
|
url: "",
|
|
13530
13547
|
maxCount: 1,
|
|
@@ -13559,7 +13576,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13559
13576
|
constructor() {
|
|
13560
13577
|
__publicField(this, "status", "ready");
|
|
13561
13578
|
__publicField(this, "message", "准备中..");
|
|
13562
|
-
__publicField(this, "uid",
|
|
13579
|
+
__publicField(this, "uid", Date.now().toString());
|
|
13563
13580
|
__publicField(this, "name");
|
|
13564
13581
|
__publicField(this, "url");
|
|
13565
13582
|
__publicField(this, "type");
|
|
@@ -13569,7 +13586,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13569
13586
|
}
|
|
13570
13587
|
}
|
|
13571
13588
|
const InternalUploader = (props, ref) => {
|
|
13572
|
-
const { locale } = useConfig();
|
|
13589
|
+
const { locale } = useConfig$1();
|
|
13573
13590
|
const {
|
|
13574
13591
|
children,
|
|
13575
13592
|
uploadIcon,
|
|
@@ -13612,7 +13629,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13612
13629
|
beforeXhrUpload,
|
|
13613
13630
|
beforeDelete,
|
|
13614
13631
|
...restProps
|
|
13615
|
-
} = { ...defaultProps$
|
|
13632
|
+
} = { ...defaultProps$H, ...props };
|
|
13616
13633
|
const [fileList, setFileList] = React.useState(defaultValue || []);
|
|
13617
13634
|
const [uploadQueue, setUploadQueue] = React.useState([]);
|
|
13618
13635
|
React.useEffect(() => {
|
|
@@ -13799,6 +13816,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13799
13816
|
fileItem.name = filepath;
|
|
13800
13817
|
fileItem.status = "ready";
|
|
13801
13818
|
fileItem.type = fileType;
|
|
13819
|
+
fileItem.uid = `${fileItem.uid}_${index}`;
|
|
13802
13820
|
if (autoUpload) {
|
|
13803
13821
|
fileItem.message = locale.uploader.readyUpload;
|
|
13804
13822
|
} else {
|
|
@@ -13871,7 +13889,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13871
13889
|
const handleItemClick = (file) => {
|
|
13872
13890
|
onFileItemClick && onFileItemClick(file);
|
|
13873
13891
|
};
|
|
13874
|
-
return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps }, children && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__slot" }, /* @__PURE__ */ React.createElement(React.Fragment, null, children, maxCount > fileList.length && /* @__PURE__ */ React.createElement(Button, { className: "nut-uploader__input", onClick: _chooseImage }))), fileList.length !== 0 && fileList.map((item, index) => {
|
|
13892
|
+
return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps }, children && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__slot" }, /* @__PURE__ */ React.createElement(React.Fragment, null, children, maxCount > fileList.length && /* @__PURE__ */ React.createElement(Button, { className: "nut-uploader__input", onClick: _chooseImage }))), fileList.length !== 0 && Array.isArray(fileList) && fileList.map((item, index) => {
|
|
13875
13893
|
return /* @__PURE__ */ React.createElement(
|
|
13876
13894
|
"div",
|
|
13877
13895
|
{
|
|
@@ -13947,9 +13965,9 @@ var __publicField = (obj, key, value) => {
|
|
|
13947
13965
|
));
|
|
13948
13966
|
};
|
|
13949
13967
|
const Uploader = React.forwardRef(InternalUploader);
|
|
13950
|
-
Uploader.defaultProps = defaultProps$
|
|
13968
|
+
Uploader.defaultProps = defaultProps$H;
|
|
13951
13969
|
Uploader.displayName = "NutUploader";
|
|
13952
|
-
const defaultProps$
|
|
13970
|
+
const defaultProps$G = {
|
|
13953
13971
|
...ComponentDefaults,
|
|
13954
13972
|
visible: false,
|
|
13955
13973
|
description: "",
|
|
@@ -13975,7 +13993,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13975
13993
|
className,
|
|
13976
13994
|
style,
|
|
13977
13995
|
...rest
|
|
13978
|
-
} = { ...defaultProps$
|
|
13996
|
+
} = { ...defaultProps$G, ...props };
|
|
13979
13997
|
const classPrefix2 = "nut-actionsheet";
|
|
13980
13998
|
const cancelActionSheet = () => {
|
|
13981
13999
|
onCancel && onCancel();
|
|
@@ -14018,7 +14036,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14018
14036
|
))
|
|
14019
14037
|
);
|
|
14020
14038
|
};
|
|
14021
|
-
ActionSheet.defaultProps = defaultProps$
|
|
14039
|
+
ActionSheet.defaultProps = defaultProps$G;
|
|
14022
14040
|
ActionSheet.displayName = "NutActionSheet";
|
|
14023
14041
|
const Content = (props) => {
|
|
14024
14042
|
const { visible, title, footer, footerDirection, onClick, children } = props;
|
|
@@ -14108,7 +14126,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14108
14126
|
};
|
|
14109
14127
|
DialogWrap.defaultProps = defaultDialogProps;
|
|
14110
14128
|
DialogWrap.displayName = "NutDialogWrap";
|
|
14111
|
-
const defaultProps$
|
|
14129
|
+
const defaultProps$F = {
|
|
14112
14130
|
confirmText: "",
|
|
14113
14131
|
cancelText: "",
|
|
14114
14132
|
overlay: true,
|
|
@@ -14123,7 +14141,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14123
14141
|
};
|
|
14124
14142
|
const BaseDialog = React.forwardRef(
|
|
14125
14143
|
(props, ref) => {
|
|
14126
|
-
const { locale } = useConfig();
|
|
14144
|
+
const { locale } = useConfig$1();
|
|
14127
14145
|
const {
|
|
14128
14146
|
visible,
|
|
14129
14147
|
footer,
|
|
@@ -14203,9 +14221,9 @@ var __publicField = (obj, key, value) => {
|
|
|
14203
14221
|
);
|
|
14204
14222
|
}
|
|
14205
14223
|
);
|
|
14206
|
-
BaseDialog.defaultProps = defaultProps$
|
|
14224
|
+
BaseDialog.defaultProps = defaultProps$F;
|
|
14207
14225
|
BaseDialog.displayName = "NutDialog";
|
|
14208
|
-
const defaultProps$
|
|
14226
|
+
const defaultProps$E = {
|
|
14209
14227
|
...ComponentDefaults,
|
|
14210
14228
|
attract: false,
|
|
14211
14229
|
direction: void 0,
|
|
@@ -14219,7 +14237,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14219
14237
|
};
|
|
14220
14238
|
const Drag = (props) => {
|
|
14221
14239
|
const { attract, direction, boundary, children, className, style, ...reset } = {
|
|
14222
|
-
...defaultProps$
|
|
14240
|
+
...defaultProps$E,
|
|
14223
14241
|
...props
|
|
14224
14242
|
};
|
|
14225
14243
|
const classPrefix2 = "nut-drag";
|
|
@@ -14316,23 +14334,23 @@ var __publicField = (obj, key, value) => {
|
|
|
14316
14334
|
)
|
|
14317
14335
|
);
|
|
14318
14336
|
};
|
|
14319
|
-
Drag.defaultProps = defaultProps$
|
|
14337
|
+
Drag.defaultProps = defaultProps$E;
|
|
14320
14338
|
Drag.displayName = "NutDrag";
|
|
14321
14339
|
const defaultStatus = {
|
|
14322
14340
|
empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
|
|
14323
14341
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
14324
14342
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
14325
14343
|
};
|
|
14326
|
-
const defaultProps$
|
|
14344
|
+
const defaultProps$D = {
|
|
14327
14345
|
...ComponentDefaults,
|
|
14328
14346
|
description: "",
|
|
14329
14347
|
imageSize: "",
|
|
14330
14348
|
status: "empty"
|
|
14331
14349
|
};
|
|
14332
|
-
const classPrefix$
|
|
14350
|
+
const classPrefix$e = `nut-empty`;
|
|
14333
14351
|
const Empty = (props) => {
|
|
14334
|
-
const { locale } = useConfig();
|
|
14335
|
-
defaultProps$
|
|
14352
|
+
const { locale } = useConfig$1();
|
|
14353
|
+
defaultProps$D.description = locale.noData || defaultProps$D.description;
|
|
14336
14354
|
const {
|
|
14337
14355
|
image,
|
|
14338
14356
|
imageSize,
|
|
@@ -14342,7 +14360,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14342
14360
|
status,
|
|
14343
14361
|
...rest
|
|
14344
14362
|
} = {
|
|
14345
|
-
...defaultProps$
|
|
14363
|
+
...defaultProps$D,
|
|
14346
14364
|
...props
|
|
14347
14365
|
};
|
|
14348
14366
|
const [imgStyle, setImgStyle] = React.useState({});
|
|
@@ -14365,20 +14383,20 @@ var __publicField = (obj, key, value) => {
|
|
|
14365
14383
|
};
|
|
14366
14384
|
});
|
|
14367
14385
|
}, [imageSize]);
|
|
14368
|
-
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
14386
|
+
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$e} ${className}`, ...rest }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$e}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$e}__description` }, description) : description, children));
|
|
14369
14387
|
};
|
|
14370
|
-
Empty.defaultProps = defaultProps$
|
|
14388
|
+
Empty.defaultProps = defaultProps$D;
|
|
14371
14389
|
Empty.displayName = "NutEmpty";
|
|
14372
|
-
const defaultProps$
|
|
14390
|
+
const defaultProps$C = {
|
|
14373
14391
|
...ComponentDefaults,
|
|
14374
14392
|
hasMore: true,
|
|
14375
14393
|
threshold: 40,
|
|
14376
14394
|
target: "",
|
|
14377
14395
|
pullRefresh: false
|
|
14378
14396
|
};
|
|
14379
|
-
const classPrefix$
|
|
14397
|
+
const classPrefix$d = `nut-infiniteloading`;
|
|
14380
14398
|
const InfiniteLoading = (props) => {
|
|
14381
|
-
const { locale } = useConfig();
|
|
14399
|
+
const { locale } = useConfig$1();
|
|
14382
14400
|
const {
|
|
14383
14401
|
children,
|
|
14384
14402
|
hasMore,
|
|
@@ -14393,7 +14411,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14393
14411
|
onLoadMore,
|
|
14394
14412
|
onScroll
|
|
14395
14413
|
} = {
|
|
14396
|
-
...defaultProps$
|
|
14414
|
+
...defaultProps$C,
|
|
14397
14415
|
...props
|
|
14398
14416
|
};
|
|
14399
14417
|
const [isInfiniting, setIsInfiniting] = React.useState(false);
|
|
@@ -14406,7 +14424,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14406
14424
|
const y2 = React.useRef(0);
|
|
14407
14425
|
const refreshMaxH = React.useRef(0);
|
|
14408
14426
|
const distance = React.useRef(0);
|
|
14409
|
-
const classes = classNames(className, classPrefix$
|
|
14427
|
+
const classes = classNames(className, classPrefix$d);
|
|
14410
14428
|
React.useEffect(() => {
|
|
14411
14429
|
refreshMaxH.current = threshold;
|
|
14412
14430
|
setTimeout(() => {
|
|
@@ -14505,13 +14523,13 @@ var __publicField = (obj, key, value) => {
|
|
|
14505
14523
|
/* @__PURE__ */ React.createElement("div", { className: "nut-infinite-bottom" }, isInfiniting ? /* @__PURE__ */ React.createElement("div", { className: "bottom-box" }, loadingText || locale.infiniteloading.loadText) : !hasMore && /* @__PURE__ */ React.createElement("div", { className: "tips" }, loadMoreText || locale.infiniteloading.loadMoreText))
|
|
14506
14524
|
);
|
|
14507
14525
|
};
|
|
14508
|
-
InfiniteLoading.defaultProps = defaultProps$
|
|
14526
|
+
InfiniteLoading.defaultProps = defaultProps$C;
|
|
14509
14527
|
InfiniteLoading.displayName = "NutInfiniteLoading";
|
|
14510
14528
|
const loadingMap = {
|
|
14511
14529
|
circular: r$g,
|
|
14512
14530
|
spinner: r$h
|
|
14513
14531
|
};
|
|
14514
|
-
const defaultProps$
|
|
14532
|
+
const defaultProps$B = {
|
|
14515
14533
|
...ComponentDefaults,
|
|
14516
14534
|
// 对比一下,个人感觉还是Loading1比较好看一些,所以用它作为了默认的loading图标
|
|
14517
14535
|
type: "circular",
|
|
@@ -14519,7 +14537,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14519
14537
|
};
|
|
14520
14538
|
const Loading = (props) => {
|
|
14521
14539
|
const { className, style, children, direction, icon, ...rest } = {
|
|
14522
|
-
...defaultProps$
|
|
14540
|
+
...defaultProps$B,
|
|
14523
14541
|
...props
|
|
14524
14542
|
};
|
|
14525
14543
|
const classPrefix2 = "nut-loading";
|
|
@@ -14538,9 +14556,9 @@ var __publicField = (obj, key, value) => {
|
|
|
14538
14556
|
children ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-text` }, children) : ""
|
|
14539
14557
|
);
|
|
14540
14558
|
};
|
|
14541
|
-
Loading.defaultProps = defaultProps$
|
|
14559
|
+
Loading.defaultProps = defaultProps$B;
|
|
14542
14560
|
Loading.displayName = "NutLoading";
|
|
14543
|
-
const defaultProps$
|
|
14561
|
+
const defaultProps$A = {
|
|
14544
14562
|
...ComponentDefaults,
|
|
14545
14563
|
direction: "horizontal",
|
|
14546
14564
|
list: [],
|
|
@@ -14578,7 +14596,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14578
14596
|
onClick,
|
|
14579
14597
|
onItemClick
|
|
14580
14598
|
} = {
|
|
14581
|
-
...defaultProps$
|
|
14599
|
+
...defaultProps$A,
|
|
14582
14600
|
...props
|
|
14583
14601
|
};
|
|
14584
14602
|
const classPrefix2 = "nut-noticebar";
|
|
@@ -14940,7 +14958,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14940
14958
|
)
|
|
14941
14959
|
) : null);
|
|
14942
14960
|
};
|
|
14943
|
-
NoticeBar.defaultProps = defaultProps$
|
|
14961
|
+
NoticeBar.defaultProps = defaultProps$A;
|
|
14944
14962
|
NoticeBar.displayName = "NutNoticeBar";
|
|
14945
14963
|
const customEvents = new Taro.Events();
|
|
14946
14964
|
function useCustomEventsPath(selector) {
|
|
@@ -14964,7 +14982,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14964
14982
|
};
|
|
14965
14983
|
return [trigger, off];
|
|
14966
14984
|
}
|
|
14967
|
-
const defaultProps$
|
|
14985
|
+
const defaultProps$z = {
|
|
14968
14986
|
...ComponentDefaults,
|
|
14969
14987
|
id: "",
|
|
14970
14988
|
duration: 3e3,
|
|
@@ -14977,7 +14995,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14977
14995
|
onClick: () => {
|
|
14978
14996
|
}
|
|
14979
14997
|
};
|
|
14980
|
-
const classPrefix$
|
|
14998
|
+
const classPrefix$c = "nut-notify";
|
|
14981
14999
|
const Notify = (props) => {
|
|
14982
15000
|
const {
|
|
14983
15001
|
id,
|
|
@@ -14990,7 +15008,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14990
15008
|
duration,
|
|
14991
15009
|
onClose,
|
|
14992
15010
|
onClick
|
|
14993
|
-
} = { ...defaultProps$
|
|
15011
|
+
} = { ...defaultProps$z, ...props };
|
|
14994
15012
|
useCustomEvent(id, (status) => {
|
|
14995
15013
|
status ? show() : hide();
|
|
14996
15014
|
});
|
|
@@ -15026,10 +15044,10 @@ var __publicField = (obj, key, value) => {
|
|
|
15026
15044
|
onClose();
|
|
15027
15045
|
};
|
|
15028
15046
|
const classes = classNames({
|
|
15029
|
-
[`${classPrefix$
|
|
15030
|
-
[`${classPrefix$
|
|
15031
|
-
[`${classPrefix$
|
|
15032
|
-
[`${classPrefix$
|
|
15047
|
+
[`${classPrefix$c}--popup-top`]: position === "top",
|
|
15048
|
+
[`${classPrefix$c}--popup-bottom`]: position === "bottom",
|
|
15049
|
+
[`${classPrefix$c}`]: true,
|
|
15050
|
+
[`${classPrefix$c}--${type2}`]: true
|
|
15033
15051
|
});
|
|
15034
15052
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
15035
15053
|
CSSTransition$1,
|
|
@@ -15061,16 +15079,17 @@ var __publicField = (obj, key, value) => {
|
|
|
15061
15079
|
const path = useCustomEventsPath(selector);
|
|
15062
15080
|
customEvents.trigger(path, false);
|
|
15063
15081
|
}
|
|
15064
|
-
Notify.defaultProps = defaultProps$
|
|
15082
|
+
Notify.defaultProps = defaultProps$z;
|
|
15065
15083
|
Notify.displayName = "NutNotify";
|
|
15066
15084
|
Notify.open = open;
|
|
15067
15085
|
Notify.close = close;
|
|
15068
|
-
const defaultProps$
|
|
15086
|
+
const defaultProps$y = {
|
|
15069
15087
|
...ComponentDefaults,
|
|
15070
15088
|
list: [],
|
|
15071
15089
|
location: "bottom",
|
|
15072
15090
|
visible: false,
|
|
15073
15091
|
offset: [0, 12],
|
|
15092
|
+
arrowOffset: 0,
|
|
15074
15093
|
targetId: "",
|
|
15075
15094
|
className: "",
|
|
15076
15095
|
showArrow: true,
|
|
@@ -15084,7 +15103,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15084
15103
|
onClose: () => {
|
|
15085
15104
|
}
|
|
15086
15105
|
};
|
|
15087
|
-
const classPrefix$
|
|
15106
|
+
const classPrefix$b = `nut-popover`;
|
|
15088
15107
|
const Popover = (props) => {
|
|
15089
15108
|
const {
|
|
15090
15109
|
children,
|
|
@@ -15098,6 +15117,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15098
15117
|
closeOnActionClick,
|
|
15099
15118
|
className,
|
|
15100
15119
|
showArrow,
|
|
15120
|
+
arrowOffset,
|
|
15101
15121
|
style,
|
|
15102
15122
|
onClick,
|
|
15103
15123
|
onOpen,
|
|
@@ -15105,7 +15125,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15105
15125
|
onSelect,
|
|
15106
15126
|
...rest
|
|
15107
15127
|
} = {
|
|
15108
|
-
...defaultProps$
|
|
15128
|
+
...defaultProps$y,
|
|
15109
15129
|
...props
|
|
15110
15130
|
};
|
|
15111
15131
|
const popoverRef = React.useRef(null);
|
|
@@ -15169,7 +15189,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15169
15189
|
};
|
|
15170
15190
|
const classes = classNames(
|
|
15171
15191
|
{
|
|
15172
|
-
[`${classPrefix$
|
|
15192
|
+
[`${classPrefix$b}`]: true
|
|
15173
15193
|
},
|
|
15174
15194
|
className
|
|
15175
15195
|
);
|
|
@@ -15231,6 +15251,37 @@ var __publicField = (obj, key, value) => {
|
|
|
15231
15251
|
}
|
|
15232
15252
|
return styles;
|
|
15233
15253
|
};
|
|
15254
|
+
const popoverArrowStyle = () => {
|
|
15255
|
+
const styles = {};
|
|
15256
|
+
const direction = location.split("-")[0];
|
|
15257
|
+
const skew = location.split("-")[1];
|
|
15258
|
+
const base = 16;
|
|
15259
|
+
if (props.arrowOffset !== 0) {
|
|
15260
|
+
if (["bottom", "top"].includes(direction)) {
|
|
15261
|
+
if (!skew) {
|
|
15262
|
+
styles.left = `calc(50% + ${arrowOffset}px)`;
|
|
15263
|
+
}
|
|
15264
|
+
if (skew === "start") {
|
|
15265
|
+
styles.left = `${base + arrowOffset}px`;
|
|
15266
|
+
}
|
|
15267
|
+
if (skew === "end") {
|
|
15268
|
+
styles.right = `${base - arrowOffset}px`;
|
|
15269
|
+
}
|
|
15270
|
+
}
|
|
15271
|
+
if (["left", "right"].includes(direction)) {
|
|
15272
|
+
if (!skew) {
|
|
15273
|
+
styles.top = `calc(50% - ${arrowOffset}px)`;
|
|
15274
|
+
}
|
|
15275
|
+
if (skew === "start") {
|
|
15276
|
+
styles.top = `${base - arrowOffset}px`;
|
|
15277
|
+
}
|
|
15278
|
+
if (skew === "end") {
|
|
15279
|
+
styles.bottom = `${base + arrowOffset}px`;
|
|
15280
|
+
}
|
|
15281
|
+
}
|
|
15282
|
+
}
|
|
15283
|
+
return styles;
|
|
15284
|
+
};
|
|
15234
15285
|
const handleSelect = (item, index) => {
|
|
15235
15286
|
if (!item.disabled) {
|
|
15236
15287
|
onSelect && onSelect(item, index);
|
|
@@ -15265,7 +15316,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15265
15316
|
visible: showPopup,
|
|
15266
15317
|
...rest
|
|
15267
15318
|
},
|
|
15268
|
-
/* @__PURE__ */ React.createElement("div", { className: "nut-popover-content-group", ref: popoverContentRef }, showArrow && /* @__PURE__ */ React.createElement("div", { className: popoverArrow() }), Array.isArray(children) ? children[1] : "", list.map((item, index) => {
|
|
15319
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-popover-content-group", ref: popoverContentRef }, showArrow && /* @__PURE__ */ React.createElement("div", { className: popoverArrow(), style: popoverArrowStyle() }), Array.isArray(children) ? children[1] : "", list.map((item, index) => {
|
|
15269
15320
|
return /* @__PURE__ */ React.createElement(
|
|
15270
15321
|
"div",
|
|
15271
15322
|
{
|
|
@@ -15283,7 +15334,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15283
15334
|
/* @__PURE__ */ React.createElement("div", { className: "nut-popover-menu-item-name" }, item.name)
|
|
15284
15335
|
);
|
|
15285
15336
|
}))
|
|
15286
|
-
), showPopup && /* @__PURE__ */ React.createElement(
|
|
15337
|
+
), showPopup && closeOnOutsideClick && /* @__PURE__ */ React.createElement(
|
|
15287
15338
|
"div",
|
|
15288
15339
|
{
|
|
15289
15340
|
className: "nut-popover-content-bg",
|
|
@@ -15292,7 +15343,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15292
15343
|
}
|
|
15293
15344
|
)));
|
|
15294
15345
|
};
|
|
15295
|
-
Popover.defaultProps = defaultProps$
|
|
15346
|
+
Popover.defaultProps = defaultProps$y;
|
|
15296
15347
|
Popover.displayName = "NutPopover";
|
|
15297
15348
|
function bound(position, min, max) {
|
|
15298
15349
|
let ret = position;
|
|
@@ -15317,7 +15368,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15317
15368
|
return position;
|
|
15318
15369
|
}
|
|
15319
15370
|
const sleep = (time) => new Promise((resolve) => setTimeout(resolve, time));
|
|
15320
|
-
const defaultProps$
|
|
15371
|
+
const defaultProps$x = {
|
|
15321
15372
|
...ComponentDefaults,
|
|
15322
15373
|
pullingText: "",
|
|
15323
15374
|
canReleaseText: "",
|
|
@@ -15333,10 +15384,10 @@ var __publicField = (obj, key, value) => {
|
|
|
15333
15384
|
};
|
|
15334
15385
|
const PullToRefresh = (p) => {
|
|
15335
15386
|
const classPrefix2 = "nut-pulltorefresh";
|
|
15336
|
-
const { locale } = useConfig();
|
|
15387
|
+
const { locale } = useConfig$1();
|
|
15337
15388
|
const touch = useTouch();
|
|
15338
15389
|
const props = {
|
|
15339
|
-
...defaultProps$
|
|
15390
|
+
...defaultProps$x,
|
|
15340
15391
|
...p,
|
|
15341
15392
|
...{
|
|
15342
15393
|
pullingText: p.pullingText || locale.pullToRefresh.pullingText,
|
|
@@ -15436,10 +15487,10 @@ var __publicField = (obj, key, value) => {
|
|
|
15436
15487
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, props.children)
|
|
15437
15488
|
);
|
|
15438
15489
|
};
|
|
15439
|
-
PullToRefresh.defaultProps = defaultProps$
|
|
15490
|
+
PullToRefresh.defaultProps = defaultProps$x;
|
|
15440
15491
|
PullToRefresh.displayName = "NutPullToRefresh";
|
|
15441
15492
|
const AvatarContext = React.createContext({});
|
|
15442
|
-
const defaultProps$
|
|
15493
|
+
const defaultProps$w = {
|
|
15443
15494
|
...ComponentDefaults,
|
|
15444
15495
|
maxContent: "",
|
|
15445
15496
|
max: "",
|
|
@@ -15448,21 +15499,21 @@ var __publicField = (obj, key, value) => {
|
|
|
15448
15499
|
gap: "-8",
|
|
15449
15500
|
level: "left"
|
|
15450
15501
|
};
|
|
15451
|
-
const classPrefix$
|
|
15502
|
+
const classPrefix$a = `nut-avatar-group`;
|
|
15452
15503
|
const AvatarGroup = (props) => {
|
|
15453
|
-
const propAvatarGroup = { ...defaultProps$
|
|
15504
|
+
const propAvatarGroup = { ...defaultProps$w, ...props };
|
|
15454
15505
|
const { className, style, children } = propAvatarGroup;
|
|
15455
15506
|
const avatarGroupRef = React.useRef(null);
|
|
15456
|
-
const cls = classNames(classPrefix$
|
|
15507
|
+
const cls = classNames(classPrefix$a, className);
|
|
15457
15508
|
const parentAvatar = {
|
|
15458
15509
|
propAvatarGroup,
|
|
15459
15510
|
avatarGroupRef
|
|
15460
15511
|
};
|
|
15461
15512
|
return /* @__PURE__ */ React.createElement(AvatarContext.Provider, { value: parentAvatar }, /* @__PURE__ */ React.createElement("div", { className: cls, style, ref: avatarGroupRef }, children));
|
|
15462
15513
|
};
|
|
15463
|
-
AvatarGroup.defaultProps = defaultProps$
|
|
15514
|
+
AvatarGroup.defaultProps = defaultProps$w;
|
|
15464
15515
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
15465
|
-
const defaultProps$
|
|
15516
|
+
const defaultProps$v = {
|
|
15466
15517
|
...ComponentDefaults,
|
|
15467
15518
|
size: "",
|
|
15468
15519
|
shape: "round",
|
|
@@ -15473,7 +15524,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15473
15524
|
src: "",
|
|
15474
15525
|
alt: ""
|
|
15475
15526
|
};
|
|
15476
|
-
const classPrefix$
|
|
15527
|
+
const classPrefix$9 = `nut-avatar`;
|
|
15477
15528
|
const Avatar = (props) => {
|
|
15478
15529
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
15479
15530
|
const {
|
|
@@ -15492,7 +15543,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15492
15543
|
onError,
|
|
15493
15544
|
...rest
|
|
15494
15545
|
} = {
|
|
15495
|
-
...defaultProps$
|
|
15546
|
+
...defaultProps$v,
|
|
15496
15547
|
...props
|
|
15497
15548
|
};
|
|
15498
15549
|
const [maxSum, setMaxSum] = React.useState(0);
|
|
@@ -15505,7 +15556,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15505
15556
|
[`nut-avatar-${((_a = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a.size) || size || "normal"}`]: true,
|
|
15506
15557
|
[`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
|
|
15507
15558
|
});
|
|
15508
|
-
const cls = classNames(classPrefix$
|
|
15559
|
+
const cls = classNames(classPrefix$9, classes, className);
|
|
15509
15560
|
const styles = {
|
|
15510
15561
|
width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
15511
15562
|
height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
|
|
@@ -15573,10 +15624,10 @@ var __publicField = (obj, key, value) => {
|
|
|
15573
15624
|
showMax && /* @__PURE__ */ React.createElement("div", { className: "text" }, ((_l = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _l.maxContent) ? (_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent : `+ ${avatarIndex - ((_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.max)}`)
|
|
15574
15625
|
));
|
|
15575
15626
|
};
|
|
15576
|
-
Avatar.defaultProps = defaultProps$
|
|
15627
|
+
Avatar.defaultProps = defaultProps$v;
|
|
15577
15628
|
Avatar.displayName = "NutAvatar";
|
|
15578
15629
|
Avatar.Group = AvatarGroup;
|
|
15579
|
-
const defaultProps$
|
|
15630
|
+
const defaultProps$u = {
|
|
15580
15631
|
...ComponentDefaults,
|
|
15581
15632
|
rows: 1,
|
|
15582
15633
|
animated: false,
|
|
@@ -15599,7 +15650,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15599
15650
|
avatarShape,
|
|
15600
15651
|
...rest
|
|
15601
15652
|
} = {
|
|
15602
|
-
...defaultProps$
|
|
15653
|
+
...defaultProps$u,
|
|
15603
15654
|
...props
|
|
15604
15655
|
};
|
|
15605
15656
|
const classPrefix2 = "nut-skeleton";
|
|
@@ -15636,7 +15687,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15636
15687
|
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__block`, key: index });
|
|
15637
15688
|
})))));
|
|
15638
15689
|
};
|
|
15639
|
-
Skeleton.defaultProps = defaultProps$
|
|
15690
|
+
Skeleton.defaultProps = defaultProps$u;
|
|
15640
15691
|
Skeleton.displayName = "NutSkeleton";
|
|
15641
15692
|
function preventDefault(event, isStopPropagation) {
|
|
15642
15693
|
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
@@ -15646,7 +15697,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15646
15697
|
event.stopPropagation();
|
|
15647
15698
|
}
|
|
15648
15699
|
}
|
|
15649
|
-
const defaultProps$
|
|
15700
|
+
const defaultProps$t = {
|
|
15650
15701
|
...ComponentDefaults,
|
|
15651
15702
|
name: ""
|
|
15652
15703
|
};
|
|
@@ -15666,7 +15717,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15666
15717
|
};
|
|
15667
15718
|
Taro.nextTick(() => getWidth());
|
|
15668
15719
|
});
|
|
15669
|
-
const { children, className, style } = { ...defaultProps$
|
|
15720
|
+
const { children, className, style } = { ...defaultProps$t, ...props };
|
|
15670
15721
|
const root2 = React.useRef();
|
|
15671
15722
|
const opened = React.useRef(false);
|
|
15672
15723
|
const lockClick = React.useRef(false);
|
|
@@ -15822,9 +15873,9 @@ var __publicField = (obj, key, value) => {
|
|
|
15822
15873
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__wrapper`, style: wrapperStyle }, renderActionContent("left"), children, renderActionContent("right"))
|
|
15823
15874
|
);
|
|
15824
15875
|
});
|
|
15825
|
-
Swipe.defaultProps = defaultProps$
|
|
15876
|
+
Swipe.defaultProps = defaultProps$t;
|
|
15826
15877
|
Swipe.displayName = "NutSwipe";
|
|
15827
|
-
const defaultProps$
|
|
15878
|
+
const defaultProps$s = {
|
|
15828
15879
|
...ComponentDefaults,
|
|
15829
15880
|
id: "",
|
|
15830
15881
|
icon: null,
|
|
@@ -15846,7 +15897,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15846
15897
|
}
|
|
15847
15898
|
// 未实现
|
|
15848
15899
|
};
|
|
15849
|
-
const classPrefix$
|
|
15900
|
+
const classPrefix$8 = "nut-toast";
|
|
15850
15901
|
const Toast = (props) => {
|
|
15851
15902
|
const {
|
|
15852
15903
|
children,
|
|
@@ -15868,7 +15919,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15868
15919
|
style,
|
|
15869
15920
|
onClose,
|
|
15870
15921
|
...rest
|
|
15871
|
-
} = { ...defaultProps$
|
|
15922
|
+
} = { ...defaultProps$s, ...props };
|
|
15872
15923
|
let timer;
|
|
15873
15924
|
const [openState, SetOpenState] = React.useState(false);
|
|
15874
15925
|
React.useEffect(() => {
|
|
@@ -15928,28 +15979,28 @@ var __publicField = (obj, key, value) => {
|
|
|
15928
15979
|
{
|
|
15929
15980
|
visible: openState,
|
|
15930
15981
|
style,
|
|
15931
|
-
className: `${classPrefix$
|
|
15982
|
+
className: `${classPrefix$8}__overlay-default ${className}`,
|
|
15932
15983
|
closeOnOverlayClick,
|
|
15933
15984
|
lockScroll,
|
|
15934
15985
|
onClick: () => {
|
|
15935
15986
|
clickCover();
|
|
15936
15987
|
}
|
|
15937
15988
|
},
|
|
15938
|
-
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
15989
|
+
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix$8} ${classes}`, id }, /* @__PURE__ */ React.createElement(
|
|
15939
15990
|
"div",
|
|
15940
15991
|
{
|
|
15941
|
-
className: `${classPrefix$
|
|
15992
|
+
className: `${classPrefix$8}__inner ${classPrefix$8}-${position} ${contentClassName}`,
|
|
15942
15993
|
style: contentStyle
|
|
15943
15994
|
},
|
|
15944
|
-
hasIcon() ? /* @__PURE__ */ React.createElement("p", { className: `${classPrefix$
|
|
15945
|
-
title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$
|
|
15946
|
-
/* @__PURE__ */ React.createElement("span", { className: `${classPrefix$
|
|
15995
|
+
hasIcon() ? /* @__PURE__ */ React.createElement("p", { className: `${classPrefix$8}__icon-wrapper` }, iconName()) : null,
|
|
15996
|
+
title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$8}-title` }, title) : null,
|
|
15997
|
+
/* @__PURE__ */ React.createElement("span", { className: `${classPrefix$8}-text` }, msg)
|
|
15947
15998
|
))
|
|
15948
15999
|
) : null);
|
|
15949
16000
|
};
|
|
15950
|
-
Toast.defaultProps = defaultProps$
|
|
16001
|
+
Toast.defaultProps = defaultProps$s;
|
|
15951
16002
|
Toast.displayName = "NutToast";
|
|
15952
|
-
const defaultProps$
|
|
16003
|
+
const defaultProps$r = {
|
|
15953
16004
|
...ComponentDefaults,
|
|
15954
16005
|
type: "shake",
|
|
15955
16006
|
action: "initial",
|
|
@@ -15957,16 +16008,16 @@ var __publicField = (obj, key, value) => {
|
|
|
15957
16008
|
onClick: (event) => {
|
|
15958
16009
|
}
|
|
15959
16010
|
};
|
|
15960
|
-
const classPrefix$
|
|
16011
|
+
const classPrefix$7 = `nut-animate`;
|
|
15961
16012
|
const Animate = (props) => {
|
|
15962
16013
|
const { className, type: type2, action, loop, onClick, children, ...rest } = {
|
|
15963
|
-
...defaultProps$
|
|
16014
|
+
...defaultProps$r,
|
|
15964
16015
|
...props
|
|
15965
16016
|
};
|
|
15966
16017
|
const [clicked, setClicked] = React.useState(false);
|
|
15967
16018
|
const classes = classNames({
|
|
15968
16019
|
"nut-ani-container": true,
|
|
15969
|
-
[`${classPrefix$
|
|
16020
|
+
[`${classPrefix$7}-${type2}`]: action === "initial" || clicked ? type2 : false,
|
|
15970
16021
|
loop
|
|
15971
16022
|
});
|
|
15972
16023
|
const cls = classNames(classes, className);
|
|
@@ -15981,9 +16032,9 @@ var __publicField = (obj, key, value) => {
|
|
|
15981
16032
|
};
|
|
15982
16033
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-animate" }, /* @__PURE__ */ React.createElement("div", { className: cls, onClick: handleClick, ...rest }, children));
|
|
15983
16034
|
};
|
|
15984
|
-
Animate.defaultProps = defaultProps$
|
|
16035
|
+
Animate.defaultProps = defaultProps$r;
|
|
15985
16036
|
Animate.displayName = "NutAnimate";
|
|
15986
|
-
const defaultProps$
|
|
16037
|
+
const defaultProps$q = {
|
|
15987
16038
|
...ComponentDefaults,
|
|
15988
16039
|
length: 0,
|
|
15989
16040
|
value: "",
|
|
@@ -16002,7 +16053,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16002
16053
|
style,
|
|
16003
16054
|
...reset
|
|
16004
16055
|
} = {
|
|
16005
|
-
...defaultProps$
|
|
16056
|
+
...defaultProps$q,
|
|
16006
16057
|
...props
|
|
16007
16058
|
};
|
|
16008
16059
|
const classPrefix2 = "nut-countup";
|
|
@@ -16076,9 +16127,9 @@ var __publicField = (obj, key, value) => {
|
|
|
16076
16127
|
);
|
|
16077
16128
|
})));
|
|
16078
16129
|
};
|
|
16079
|
-
CountUp.defaultProps = defaultProps$
|
|
16130
|
+
CountUp.defaultProps = defaultProps$q;
|
|
16080
16131
|
CountUp.displayName = "NutCountUp";
|
|
16081
|
-
const defaultProps$
|
|
16132
|
+
const defaultProps$p = {};
|
|
16082
16133
|
class AnimatingNumbers extends React.Component {
|
|
16083
16134
|
constructor(props) {
|
|
16084
16135
|
super(props);
|
|
@@ -16088,12 +16139,12 @@ var __publicField = (obj, key, value) => {
|
|
|
16088
16139
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-animatingnumbers" });
|
|
16089
16140
|
}
|
|
16090
16141
|
}
|
|
16091
|
-
__publicField(AnimatingNumbers, "defaultProps", defaultProps$
|
|
16142
|
+
__publicField(AnimatingNumbers, "defaultProps", defaultProps$p);
|
|
16092
16143
|
__publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
|
|
16093
16144
|
__publicField(AnimatingNumbers, "CountUp", CountUp);
|
|
16094
16145
|
AnimatingNumbers.CountUp = CountUp;
|
|
16095
16146
|
const warn = console.warn;
|
|
16096
|
-
const defaultProps$
|
|
16147
|
+
const defaultProps$o = {
|
|
16097
16148
|
...ComponentDefaults,
|
|
16098
16149
|
className: "",
|
|
16099
16150
|
url: "",
|
|
@@ -16118,7 +16169,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16118
16169
|
};
|
|
16119
16170
|
const Audio = (props) => {
|
|
16120
16171
|
const classPrefix2 = "nut-audio";
|
|
16121
|
-
const { locale } = useConfig();
|
|
16172
|
+
const { locale } = useConfig$1();
|
|
16122
16173
|
const {
|
|
16123
16174
|
className,
|
|
16124
16175
|
url,
|
|
@@ -16137,7 +16188,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16137
16188
|
iconFontClassName,
|
|
16138
16189
|
...rest
|
|
16139
16190
|
} = {
|
|
16140
|
-
...defaultProps$
|
|
16191
|
+
...defaultProps$o,
|
|
16141
16192
|
...props
|
|
16142
16193
|
};
|
|
16143
16194
|
const [playing, setPlaying] = React.useState(false);
|
|
@@ -16301,9 +16352,9 @@ var __publicField = (obj, key, value) => {
|
|
|
16301
16352
|
};
|
|
16302
16353
|
return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, renderAudio());
|
|
16303
16354
|
};
|
|
16304
|
-
Audio.defaultProps = defaultProps$
|
|
16355
|
+
Audio.defaultProps = defaultProps$o;
|
|
16305
16356
|
Audio.displayName = "NutAudio";
|
|
16306
|
-
const defaultProps$
|
|
16357
|
+
const defaultProps$n = {
|
|
16307
16358
|
...ComponentDefaults,
|
|
16308
16359
|
strokeWidth: 5,
|
|
16309
16360
|
radius: 50,
|
|
@@ -16312,7 +16363,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16312
16363
|
background: "#e5e9f2",
|
|
16313
16364
|
clockwise: true
|
|
16314
16365
|
};
|
|
16315
|
-
const classPrefix$
|
|
16366
|
+
const classPrefix$6 = `nut-circleprogress`;
|
|
16316
16367
|
const CircleProgress = (props) => {
|
|
16317
16368
|
const {
|
|
16318
16369
|
children,
|
|
@@ -16327,11 +16378,11 @@ var __publicField = (obj, key, value) => {
|
|
|
16327
16378
|
strokeLinecap,
|
|
16328
16379
|
...restProps
|
|
16329
16380
|
} = {
|
|
16330
|
-
...defaultProps$
|
|
16381
|
+
...defaultProps$n,
|
|
16331
16382
|
...props
|
|
16332
16383
|
};
|
|
16333
16384
|
const [oldValue, setOldValue] = React.useState(percent);
|
|
16334
|
-
const classes = classNames(className, classPrefix$
|
|
16385
|
+
const classes = classNames(className, classPrefix$6);
|
|
16335
16386
|
const refRandomId = Math.random().toString(36).slice(-8);
|
|
16336
16387
|
const animateIdRef = React.useRef(0);
|
|
16337
16388
|
const styles = {
|
|
@@ -16413,7 +16464,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16413
16464
|
};
|
|
16414
16465
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style: styles, ...restProps }, /* @__PURE__ */ React.createElement("div", { style: circleStyle() }), /* @__PURE__ */ React.createElement("div", { className: "nut-circleprogress-text" }, children));
|
|
16415
16466
|
};
|
|
16416
|
-
CircleProgress.defaultProps = defaultProps$
|
|
16467
|
+
CircleProgress.defaultProps = defaultProps$n;
|
|
16417
16468
|
CircleProgress.displayName = "NutCircleProgress";
|
|
16418
16469
|
const collapseContext = {
|
|
16419
16470
|
isOpen: (name) => {
|
|
@@ -16425,7 +16476,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16425
16476
|
rotate: 180
|
|
16426
16477
|
};
|
|
16427
16478
|
const CollapseContext = React.createContext(collapseContext);
|
|
16428
|
-
const defaultProps$
|
|
16479
|
+
const defaultProps$m = {
|
|
16429
16480
|
...ComponentDefaults,
|
|
16430
16481
|
title: null,
|
|
16431
16482
|
name: "",
|
|
@@ -16446,7 +16497,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16446
16497
|
className,
|
|
16447
16498
|
...rest
|
|
16448
16499
|
} = {
|
|
16449
|
-
...defaultProps$
|
|
16500
|
+
...defaultProps$m,
|
|
16450
16501
|
...props
|
|
16451
16502
|
};
|
|
16452
16503
|
const classPrefix2 = "nut-collapse-item";
|
|
@@ -16558,9 +16609,9 @@ var __publicField = (obj, key, value) => {
|
|
|
16558
16609
|
)
|
|
16559
16610
|
));
|
|
16560
16611
|
};
|
|
16561
|
-
CollapseItem.defaultProps = defaultProps$
|
|
16612
|
+
CollapseItem.defaultProps = defaultProps$m;
|
|
16562
16613
|
CollapseItem.displayName = "NutCollapseItem";
|
|
16563
|
-
const defaultProps$
|
|
16614
|
+
const defaultProps$l = {
|
|
16564
16615
|
...ComponentDefaults,
|
|
16565
16616
|
defaultActiveName: [],
|
|
16566
16617
|
accordion: false,
|
|
@@ -16579,7 +16630,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16579
16630
|
rotate,
|
|
16580
16631
|
onChange
|
|
16581
16632
|
} = {
|
|
16582
|
-
...defaultProps$
|
|
16633
|
+
...defaultProps$l,
|
|
16583
16634
|
...props
|
|
16584
16635
|
};
|
|
16585
16636
|
const classPrefix2 = "nut-collapse";
|
|
@@ -16636,10 +16687,10 @@ var __publicField = (obj, key, value) => {
|
|
|
16636
16687
|
/* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style }, children)
|
|
16637
16688
|
);
|
|
16638
16689
|
};
|
|
16639
|
-
Collapse.defaultProps = defaultProps$
|
|
16690
|
+
Collapse.defaultProps = defaultProps$l;
|
|
16640
16691
|
Collapse.displayName = "NutCollapse";
|
|
16641
16692
|
Collapse.Item = CollapseItem;
|
|
16642
|
-
const defaultProps$
|
|
16693
|
+
const defaultProps$k = {
|
|
16643
16694
|
...ComponentDefaults,
|
|
16644
16695
|
paused: false,
|
|
16645
16696
|
startTime: Date.now(),
|
|
@@ -16652,7 +16703,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16652
16703
|
destroy: false
|
|
16653
16704
|
};
|
|
16654
16705
|
const InternalCountDown = (props, ref) => {
|
|
16655
|
-
useConfig();
|
|
16706
|
+
useConfig$1();
|
|
16656
16707
|
const {
|
|
16657
16708
|
paused,
|
|
16658
16709
|
startTime,
|
|
@@ -16671,7 +16722,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16671
16722
|
onUpdate,
|
|
16672
16723
|
children,
|
|
16673
16724
|
...rest
|
|
16674
|
-
} = { ...defaultProps$
|
|
16725
|
+
} = { ...defaultProps$k, ...props };
|
|
16675
16726
|
const classPrefix2 = "nut-countdown";
|
|
16676
16727
|
const [restTimeStamp, setRestTime] = React.useState(0);
|
|
16677
16728
|
const stateRef = React.useRef({
|
|
@@ -16882,9 +16933,9 @@ var __publicField = (obj, key, value) => {
|
|
|
16882
16933
|
);
|
|
16883
16934
|
};
|
|
16884
16935
|
const CountDown = React.forwardRef(InternalCountDown);
|
|
16885
|
-
CountDown.defaultProps = defaultProps$
|
|
16936
|
+
CountDown.defaultProps = defaultProps$k;
|
|
16886
16937
|
CountDown.displayName = "NutCountDown";
|
|
16887
|
-
const defaultProps$
|
|
16938
|
+
const defaultProps$j = {
|
|
16888
16939
|
...ComponentDefaults,
|
|
16889
16940
|
content: "",
|
|
16890
16941
|
direction: "end",
|
|
@@ -16895,7 +16946,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16895
16946
|
lineHeight: "20",
|
|
16896
16947
|
width: "auto"
|
|
16897
16948
|
};
|
|
16898
|
-
const classPrefix$
|
|
16949
|
+
const classPrefix$5 = `nut-ellipsis`;
|
|
16899
16950
|
const Ellipsis = (props) => {
|
|
16900
16951
|
var _a, _b, _c, _d;
|
|
16901
16952
|
const {
|
|
@@ -16912,7 +16963,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16912
16963
|
onClick,
|
|
16913
16964
|
onChange,
|
|
16914
16965
|
...rest
|
|
16915
|
-
} = { ...defaultProps$
|
|
16966
|
+
} = { ...defaultProps$j, ...props };
|
|
16916
16967
|
const maxHeight = React.useRef(0);
|
|
16917
16968
|
const [exceeded, setExceeded] = React.useState(false);
|
|
16918
16969
|
const [expanded, setExpanded] = React.useState(false);
|
|
@@ -16935,9 +16986,9 @@ var __publicField = (obj, key, value) => {
|
|
|
16935
16986
|
const letterUpperReg = /^[A-Z]+$/;
|
|
16936
16987
|
const letterLowerReg = /^[a-z]+$/;
|
|
16937
16988
|
const classes = classNames(
|
|
16938
|
-
classPrefix$
|
|
16989
|
+
classPrefix$5,
|
|
16939
16990
|
className,
|
|
16940
|
-
width ? `${classPrefix$
|
|
16991
|
+
width ? `${classPrefix$5}-width` : ""
|
|
16941
16992
|
);
|
|
16942
16993
|
const init = () => {
|
|
16943
16994
|
setExceeded(false);
|
|
@@ -17196,21 +17247,21 @@ var __publicField = (obj, key, value) => {
|
|
|
17196
17247
|
symbolText()
|
|
17197
17248
|
));
|
|
17198
17249
|
};
|
|
17199
|
-
Ellipsis.defaultProps = defaultProps$
|
|
17250
|
+
Ellipsis.defaultProps = defaultProps$j;
|
|
17200
17251
|
Ellipsis.displayName = "NutEllipsis";
|
|
17201
|
-
const defaultProps$
|
|
17252
|
+
const defaultProps$i = {
|
|
17202
17253
|
total: 3,
|
|
17203
17254
|
current: 0,
|
|
17204
17255
|
direction: "horizontal"
|
|
17205
17256
|
};
|
|
17206
|
-
const classPrefix$
|
|
17257
|
+
const classPrefix$4 = `nut-indicator`;
|
|
17207
17258
|
const Indicator = (props) => {
|
|
17208
17259
|
const { total, current, children, className, direction, ...rest } = {
|
|
17209
|
-
...defaultProps$
|
|
17260
|
+
...defaultProps$i,
|
|
17210
17261
|
...props
|
|
17211
17262
|
};
|
|
17212
17263
|
const classes = classNames({
|
|
17213
|
-
[`${classPrefix$
|
|
17264
|
+
[`${classPrefix$4}__vertical`]: direction === "vertical"
|
|
17214
17265
|
});
|
|
17215
17266
|
const renderElement = () => {
|
|
17216
17267
|
const childs = [];
|
|
@@ -17220,25 +17271,25 @@ var __publicField = (obj, key, value) => {
|
|
|
17220
17271
|
"div",
|
|
17221
17272
|
{
|
|
17222
17273
|
key: item,
|
|
17223
|
-
className: `${classPrefix$
|
|
17274
|
+
className: `${classPrefix$4}__dot ${classPrefix$4}__active`
|
|
17224
17275
|
}
|
|
17225
|
-
) : /* @__PURE__ */ React.createElement("div", { key: item, className: `${classPrefix$
|
|
17276
|
+
) : /* @__PURE__ */ React.createElement("div", { key: item, className: `${classPrefix$4}__dot` })
|
|
17226
17277
|
);
|
|
17227
17278
|
}
|
|
17228
17279
|
return childs;
|
|
17229
17280
|
};
|
|
17230
17281
|
return /* @__PURE__ */ React.createElement("div", { className: classNames(classes, className), ...rest }, renderElement());
|
|
17231
17282
|
};
|
|
17232
|
-
Indicator.defaultProps = defaultProps$
|
|
17283
|
+
Indicator.defaultProps = defaultProps$i;
|
|
17233
17284
|
Indicator.displayName = "NutIndicator";
|
|
17234
|
-
const defaultProps$
|
|
17285
|
+
const defaultProps$h = {
|
|
17235
17286
|
direction: "horizontal",
|
|
17236
17287
|
indicator: false,
|
|
17237
17288
|
autoPlay: false,
|
|
17238
17289
|
loop: false,
|
|
17239
17290
|
defaultValue: 0
|
|
17240
17291
|
};
|
|
17241
|
-
const classPrefix$
|
|
17292
|
+
const classPrefix$3 = "nut-swiper";
|
|
17242
17293
|
const Swiper = React.forwardRef((props, ref) => {
|
|
17243
17294
|
const {
|
|
17244
17295
|
width,
|
|
@@ -17253,7 +17304,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17253
17304
|
defaultValue,
|
|
17254
17305
|
...rest
|
|
17255
17306
|
} = {
|
|
17256
|
-
...defaultProps$
|
|
17307
|
+
...defaultProps$h,
|
|
17257
17308
|
...props
|
|
17258
17309
|
};
|
|
17259
17310
|
const [current, setCurrent] = React.useState(defaultValue);
|
|
@@ -17269,8 +17320,8 @@ var __publicField = (obj, key, value) => {
|
|
|
17269
17320
|
"div",
|
|
17270
17321
|
{
|
|
17271
17322
|
className: classNames({
|
|
17272
|
-
[`${classPrefix$
|
|
17273
|
-
[`${classPrefix$
|
|
17323
|
+
[`${classPrefix$3}__indicator`]: true,
|
|
17324
|
+
[`${classPrefix$3}__indicator-vertical`]: direction === "vertical"
|
|
17274
17325
|
})
|
|
17275
17326
|
},
|
|
17276
17327
|
/* @__PURE__ */ React.createElement(
|
|
@@ -17312,7 +17363,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17312
17363
|
return /* @__PURE__ */ React.createElement(
|
|
17313
17364
|
components.View,
|
|
17314
17365
|
{
|
|
17315
|
-
className: classNames(classPrefix$
|
|
17366
|
+
className: classNames(classPrefix$3, className),
|
|
17316
17367
|
style: {
|
|
17317
17368
|
width: !width ? "100%" : `${width}px`,
|
|
17318
17369
|
height: !height ? "150px" : `${height}px`
|
|
@@ -17348,9 +17399,9 @@ var __publicField = (obj, key, value) => {
|
|
|
17348
17399
|
renderIndicator()
|
|
17349
17400
|
);
|
|
17350
17401
|
});
|
|
17351
|
-
Swiper.defaultProps = defaultProps$
|
|
17402
|
+
Swiper.defaultProps = defaultProps$h;
|
|
17352
17403
|
Swiper.displayName = "NutSwiper";
|
|
17353
|
-
const defaultProps$
|
|
17404
|
+
const defaultProps$g = {
|
|
17354
17405
|
itemId: "",
|
|
17355
17406
|
skipHiddenItemLayout: false
|
|
17356
17407
|
};
|
|
@@ -17358,11 +17409,11 @@ var __publicField = (obj, key, value) => {
|
|
|
17358
17409
|
const { children, ...rest } = props;
|
|
17359
17410
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
|
|
17360
17411
|
};
|
|
17361
|
-
SwiperItem.defaultProps = defaultProps$
|
|
17412
|
+
SwiperItem.defaultProps = defaultProps$g;
|
|
17362
17413
|
SwiperItem.displayName = "NutSwiperItem";
|
|
17363
17414
|
const InnerSwiper = Swiper;
|
|
17364
17415
|
InnerSwiper.Item = SwiperItem;
|
|
17365
|
-
const defaultProps$
|
|
17416
|
+
const defaultProps$f = {
|
|
17366
17417
|
...ComponentDefaults,
|
|
17367
17418
|
images: [],
|
|
17368
17419
|
videos: [],
|
|
@@ -17583,9 +17634,9 @@ var __publicField = (obj, key, value) => {
|
|
|
17583
17634
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0))
|
|
17584
17635
|
);
|
|
17585
17636
|
};
|
|
17586
|
-
ImagePreview.defaultProps = defaultProps$
|
|
17637
|
+
ImagePreview.defaultProps = defaultProps$f;
|
|
17587
17638
|
ImagePreview.displayName = "NutImagePreview";
|
|
17588
|
-
const defaultProps$
|
|
17639
|
+
const defaultProps$e = {
|
|
17589
17640
|
...ComponentDefaults,
|
|
17590
17641
|
defaultValue: 1,
|
|
17591
17642
|
mode: "multi",
|
|
@@ -17597,7 +17648,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17597
17648
|
ellipse: false
|
|
17598
17649
|
};
|
|
17599
17650
|
const Pagination = (props) => {
|
|
17600
|
-
const { locale } = useConfig();
|
|
17651
|
+
const { locale } = useConfig$1();
|
|
17601
17652
|
const {
|
|
17602
17653
|
value,
|
|
17603
17654
|
mode,
|
|
@@ -17613,7 +17664,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17613
17664
|
className,
|
|
17614
17665
|
...rest
|
|
17615
17666
|
} = {
|
|
17616
|
-
...defaultProps$
|
|
17667
|
+
...defaultProps$e,
|
|
17617
17668
|
...props
|
|
17618
17669
|
};
|
|
17619
17670
|
const classPrefix2 = "nut-pagination";
|
|
@@ -17695,9 +17746,9 @@ var __publicField = (obj, key, value) => {
|
|
|
17695
17746
|
next || locale.pagination.next
|
|
17696
17747
|
));
|
|
17697
17748
|
};
|
|
17698
|
-
Pagination.defaultProps = defaultProps$
|
|
17749
|
+
Pagination.defaultProps = defaultProps$e;
|
|
17699
17750
|
Pagination.displayName = "NutPagination";
|
|
17700
|
-
const defaultProps$
|
|
17751
|
+
const defaultProps$d = {
|
|
17701
17752
|
...ComponentDefaults,
|
|
17702
17753
|
price: 0,
|
|
17703
17754
|
symbol: "¥",
|
|
@@ -17720,7 +17771,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17720
17771
|
style,
|
|
17721
17772
|
...rest
|
|
17722
17773
|
} = {
|
|
17723
|
-
...defaultProps$
|
|
17774
|
+
...defaultProps$d,
|
|
17724
17775
|
...props
|
|
17725
17776
|
};
|
|
17726
17777
|
const classPrefix2 = "nut-price";
|
|
@@ -17809,10 +17860,10 @@ var __publicField = (obj, key, value) => {
|
|
|
17809
17860
|
symbol && position === "after" ? renderSymbol() : null
|
|
17810
17861
|
);
|
|
17811
17862
|
};
|
|
17812
|
-
Price.defaultProps = defaultProps$
|
|
17863
|
+
Price.defaultProps = defaultProps$d;
|
|
17813
17864
|
Price.displayName = "NutPrice";
|
|
17814
17865
|
const DataContext = React.createContext({});
|
|
17815
|
-
const defaultProps$
|
|
17866
|
+
const defaultProps$c = {
|
|
17816
17867
|
...ComponentDefaults,
|
|
17817
17868
|
title: "",
|
|
17818
17869
|
description: "",
|
|
@@ -17821,7 +17872,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17821
17872
|
};
|
|
17822
17873
|
const Step = (props) => {
|
|
17823
17874
|
const { children, title, description, value, icon, className, ...restProps } = {
|
|
17824
|
-
...defaultProps$
|
|
17875
|
+
...defaultProps$c,
|
|
17825
17876
|
...props
|
|
17826
17877
|
};
|
|
17827
17878
|
const parent = React.useContext(DataContext);
|
|
@@ -17855,16 +17906,16 @@ var __publicField = (obj, key, value) => {
|
|
|
17855
17906
|
};
|
|
17856
17907
|
return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps, onClick: handleClickStep }, /* @__PURE__ */ React.createElement("div", { className: "nut-step-head" }, /* @__PURE__ */ React.createElement("div", { className: "nut-step-line" }), /* @__PURE__ */ React.createElement("div", { className: renderIconClass() }, icon || !dot && /* @__PURE__ */ React.createElement("span", { className: "nut-step-inner" }, value))), /* @__PURE__ */ React.createElement("div", { className: "nut-step-main" }, /* @__PURE__ */ React.createElement("span", { className: "nut-step-title" }, title), description && /* @__PURE__ */ React.createElement("span", { className: "nut-step-description" }, description)));
|
|
17857
17908
|
};
|
|
17858
|
-
Step.defaultProps = defaultProps$
|
|
17909
|
+
Step.defaultProps = defaultProps$c;
|
|
17859
17910
|
Step.displayName = "NutStep";
|
|
17860
|
-
const defaultProps$
|
|
17911
|
+
const defaultProps$b = {
|
|
17861
17912
|
...ComponentDefaults,
|
|
17862
17913
|
value: 0,
|
|
17863
17914
|
direction: "horizontal",
|
|
17864
17915
|
dot: false
|
|
17865
17916
|
};
|
|
17866
17917
|
const Steps = (props) => {
|
|
17867
|
-
const propSteps = { ...defaultProps$
|
|
17918
|
+
const propSteps = { ...defaultProps$b, ...props };
|
|
17868
17919
|
const {
|
|
17869
17920
|
children,
|
|
17870
17921
|
value,
|
|
@@ -17895,9 +17946,9 @@ var __publicField = (obj, key, value) => {
|
|
|
17895
17946
|
children
|
|
17896
17947
|
));
|
|
17897
17948
|
};
|
|
17898
|
-
Steps.defaultProps = defaultProps$
|
|
17949
|
+
Steps.defaultProps = defaultProps$b;
|
|
17899
17950
|
Steps.displayName = "NutSteps";
|
|
17900
|
-
const defaultProps$
|
|
17951
|
+
const defaultProps$a = {
|
|
17901
17952
|
...ComponentDefaults,
|
|
17902
17953
|
columns: [],
|
|
17903
17954
|
data: [],
|
|
@@ -17908,8 +17959,8 @@ var __publicField = (obj, key, value) => {
|
|
|
17908
17959
|
showHeader: true
|
|
17909
17960
|
};
|
|
17910
17961
|
const Table = (props) => {
|
|
17911
|
-
const { locale } = useConfig();
|
|
17912
|
-
defaultProps$
|
|
17962
|
+
const { locale } = useConfig$1();
|
|
17963
|
+
defaultProps$a.noData = locale.noData;
|
|
17913
17964
|
const {
|
|
17914
17965
|
children,
|
|
17915
17966
|
className,
|
|
@@ -17925,7 +17976,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17925
17976
|
onSort,
|
|
17926
17977
|
...rest
|
|
17927
17978
|
} = {
|
|
17928
|
-
...defaultProps$
|
|
17979
|
+
...defaultProps$a,
|
|
17929
17980
|
...props
|
|
17930
17981
|
};
|
|
17931
17982
|
const [curData, setCurData] = React.useState(data);
|
|
@@ -18008,9 +18059,9 @@ var __publicField = (obj, key, value) => {
|
|
|
18008
18059
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__main__body` }, renderBoyTrs())
|
|
18009
18060
|
), (summary || curData.length === 0) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__summary` }, summary || noData));
|
|
18010
18061
|
};
|
|
18011
|
-
Table.defaultProps = defaultProps$
|
|
18062
|
+
Table.defaultProps = defaultProps$a;
|
|
18012
18063
|
Table.displayName = "NutTable";
|
|
18013
|
-
const defaultProps$
|
|
18064
|
+
const defaultProps$9 = {
|
|
18014
18065
|
...ComponentDefaults,
|
|
18015
18066
|
type: "default",
|
|
18016
18067
|
background: "",
|
|
@@ -18041,7 +18092,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18041
18092
|
onClick,
|
|
18042
18093
|
onClose
|
|
18043
18094
|
} = {
|
|
18044
|
-
...defaultProps$
|
|
18095
|
+
...defaultProps$9,
|
|
18045
18096
|
...props
|
|
18046
18097
|
};
|
|
18047
18098
|
const [tagClass, setTagClass] = React.useState("");
|
|
@@ -18116,8 +18167,206 @@ var __publicField = (obj, key, value) => {
|
|
|
18116
18167
|
children && /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}-text` }, children)
|
|
18117
18168
|
));
|
|
18118
18169
|
};
|
|
18119
|
-
Tag.defaultProps = defaultProps$
|
|
18170
|
+
Tag.defaultProps = defaultProps$9;
|
|
18120
18171
|
Tag.displayName = "NutTag";
|
|
18172
|
+
const getTaroRectById = (id) => {
|
|
18173
|
+
return new Promise((resolve, reject) => {
|
|
18174
|
+
if (Taro.getEnv() === Taro.ENV_TYPE.WEB) {
|
|
18175
|
+
const t = document ? document.querySelector(`#${id}`) : "";
|
|
18176
|
+
if (t) {
|
|
18177
|
+
resolve(t == null ? void 0 : t.getBoundingClientRect());
|
|
18178
|
+
}
|
|
18179
|
+
reject();
|
|
18180
|
+
} else {
|
|
18181
|
+
const query = Taro.createSelectorQuery();
|
|
18182
|
+
query.select(`#${id}`).boundingClientRect().exec(function(rect) {
|
|
18183
|
+
if (rect[0]) {
|
|
18184
|
+
resolve(rect[0]);
|
|
18185
|
+
} else {
|
|
18186
|
+
reject();
|
|
18187
|
+
}
|
|
18188
|
+
});
|
|
18189
|
+
}
|
|
18190
|
+
});
|
|
18191
|
+
};
|
|
18192
|
+
const defaultConfigRef = {
|
|
18193
|
+
current: {
|
|
18194
|
+
locale: zhCN
|
|
18195
|
+
}
|
|
18196
|
+
};
|
|
18197
|
+
const getDefaultConfig = () => {
|
|
18198
|
+
return defaultConfigRef.current;
|
|
18199
|
+
};
|
|
18200
|
+
const ConfigContext = React.createContext(null);
|
|
18201
|
+
const useConfig = () => {
|
|
18202
|
+
return React.useContext(ConfigContext) ?? getDefaultConfig();
|
|
18203
|
+
};
|
|
18204
|
+
const defaultProps$8 = {
|
|
18205
|
+
...ComponentDefaults,
|
|
18206
|
+
visible: false,
|
|
18207
|
+
type: "step",
|
|
18208
|
+
location: "bottom",
|
|
18209
|
+
mask: true,
|
|
18210
|
+
maskWidth: "",
|
|
18211
|
+
maskHeight: "",
|
|
18212
|
+
offset: [8, 10],
|
|
18213
|
+
title: "",
|
|
18214
|
+
next: "",
|
|
18215
|
+
prev: "",
|
|
18216
|
+
complete: "",
|
|
18217
|
+
showPrev: true,
|
|
18218
|
+
closeOnOverlayClick: true
|
|
18219
|
+
};
|
|
18220
|
+
const classPrefix$2 = "nut-tour";
|
|
18221
|
+
const Tour = (props) => {
|
|
18222
|
+
const { locale } = useConfig();
|
|
18223
|
+
const {
|
|
18224
|
+
children,
|
|
18225
|
+
className,
|
|
18226
|
+
title,
|
|
18227
|
+
closeOnOverlayClick,
|
|
18228
|
+
showPrev,
|
|
18229
|
+
list,
|
|
18230
|
+
type: type2,
|
|
18231
|
+
location,
|
|
18232
|
+
visible,
|
|
18233
|
+
mask,
|
|
18234
|
+
maskWidth,
|
|
18235
|
+
maskHeight,
|
|
18236
|
+
offset,
|
|
18237
|
+
next,
|
|
18238
|
+
prev,
|
|
18239
|
+
complete,
|
|
18240
|
+
onClose,
|
|
18241
|
+
onChange,
|
|
18242
|
+
...rest
|
|
18243
|
+
} = {
|
|
18244
|
+
...defaultProps$8,
|
|
18245
|
+
...props
|
|
18246
|
+
};
|
|
18247
|
+
const [showTour, setShowTour] = React.useState(false);
|
|
18248
|
+
const [showPopup, setShowPopup] = React.useState(false);
|
|
18249
|
+
const [active, setActive] = React.useState(0);
|
|
18250
|
+
const [maskRect, setMaskRect] = React.useState({
|
|
18251
|
+
top: 0,
|
|
18252
|
+
left: 0,
|
|
18253
|
+
right: 0,
|
|
18254
|
+
bottom: 0,
|
|
18255
|
+
width: 0,
|
|
18256
|
+
height: 0
|
|
18257
|
+
});
|
|
18258
|
+
const classes = classNames(className, classPrefix$2);
|
|
18259
|
+
React.useEffect(() => {
|
|
18260
|
+
if (visible) {
|
|
18261
|
+
getRootPosition();
|
|
18262
|
+
}
|
|
18263
|
+
setActive(0);
|
|
18264
|
+
setShowTour(visible);
|
|
18265
|
+
setShowPopup(visible);
|
|
18266
|
+
}, [visible]);
|
|
18267
|
+
React.useEffect(() => {
|
|
18268
|
+
if (visible) {
|
|
18269
|
+
setShowPopup(true);
|
|
18270
|
+
getRootPosition();
|
|
18271
|
+
}
|
|
18272
|
+
}, [active]);
|
|
18273
|
+
const getRootPosition = () => {
|
|
18274
|
+
getTaroRectById(list[active].target).then((rect) => {
|
|
18275
|
+
console.log("rect", rect);
|
|
18276
|
+
setMaskRect({
|
|
18277
|
+
top: rect.top,
|
|
18278
|
+
left: rect.left,
|
|
18279
|
+
right: rect.right,
|
|
18280
|
+
bottom: rect.bottom,
|
|
18281
|
+
width: rect.width,
|
|
18282
|
+
height: rect.height
|
|
18283
|
+
});
|
|
18284
|
+
});
|
|
18285
|
+
};
|
|
18286
|
+
const maskStyle = () => {
|
|
18287
|
+
const { width, height, left, top } = maskRect;
|
|
18288
|
+
const center = [left + width / 2, top + height / 2];
|
|
18289
|
+
const w2 = Number(maskWidth || width);
|
|
18290
|
+
const h = Number(maskHeight || height);
|
|
18291
|
+
const styles = {
|
|
18292
|
+
width: `${w2 + +offset[1] * 2}px`,
|
|
18293
|
+
height: `${h + +offset[0] * 2}px`,
|
|
18294
|
+
top: `${center[1] - h / 2 - +offset[0]}px`,
|
|
18295
|
+
left: `${center[0] - w2 / 2 - +offset[1]}px`
|
|
18296
|
+
};
|
|
18297
|
+
return styles;
|
|
18298
|
+
};
|
|
18299
|
+
const maskClose = (e) => {
|
|
18300
|
+
setShowTour(false);
|
|
18301
|
+
setShowPopup(false);
|
|
18302
|
+
onClose && onClose(e);
|
|
18303
|
+
};
|
|
18304
|
+
const handleClickMask = (e) => {
|
|
18305
|
+
closeOnOverlayClick && maskClose(e);
|
|
18306
|
+
};
|
|
18307
|
+
const changeStep = (type22) => {
|
|
18308
|
+
if (type22 === "next") {
|
|
18309
|
+
setActive(active + 1);
|
|
18310
|
+
onChange && onChange(active + 1);
|
|
18311
|
+
} else {
|
|
18312
|
+
setActive(active - 1);
|
|
18313
|
+
onChange && onChange(active - 1);
|
|
18314
|
+
}
|
|
18315
|
+
setShowPopup(false);
|
|
18316
|
+
};
|
|
18317
|
+
return /* @__PURE__ */ React.createElement("div", { className: classes, ...rest }, /* @__PURE__ */ React.createElement(
|
|
18318
|
+
"div",
|
|
18319
|
+
{
|
|
18320
|
+
className: "nut-tour-masked",
|
|
18321
|
+
style: { display: showTour ? "block" : "none" },
|
|
18322
|
+
onClick: handleClickMask
|
|
18323
|
+
}
|
|
18324
|
+
), list.map((item, index) => {
|
|
18325
|
+
return /* @__PURE__ */ React.createElement("div", { key: index, style: { height: 0 } }, index === active && /* @__PURE__ */ React.createElement(React.Fragment, null, showTour && /* @__PURE__ */ React.createElement(
|
|
18326
|
+
"div",
|
|
18327
|
+
{
|
|
18328
|
+
className: `${mask ? "nut-tour-mask" : "nut-tour-mask nut-tour-mask-none"}`,
|
|
18329
|
+
id: "nut-tour-popid",
|
|
18330
|
+
style: maskStyle()
|
|
18331
|
+
}
|
|
18332
|
+
), /* @__PURE__ */ React.createElement(
|
|
18333
|
+
Popover,
|
|
18334
|
+
{
|
|
18335
|
+
visible: showPopup,
|
|
18336
|
+
location: item.location || location,
|
|
18337
|
+
targetId: "nut-tour-popid",
|
|
18338
|
+
closeOnOutsideClick: false,
|
|
18339
|
+
offset: item.popoverOffset || [0, 12],
|
|
18340
|
+
arrowOffset: item.arrowOffset || 0
|
|
18341
|
+
},
|
|
18342
|
+
/* @__PURE__ */ React.createElement(React.Fragment, null),
|
|
18343
|
+
/* @__PURE__ */ React.createElement(React.Fragment, null, children || /* @__PURE__ */ React.createElement(React.Fragment, null, type2 === "step" && /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content" }, title && /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content-top" }, /* @__PURE__ */ React.createElement("div", { onClick: (e) => maskClose(e) }, /* @__PURE__ */ React.createElement(a$q, { className: "nut-tour-content-top-close" }))), /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content-inner" }, item.content), /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content-bottom" }, /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content-bottom-init" }, active + 1, "/", list.length), /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content-bottom-operate" }, active !== 0 && showPrev && /* @__PURE__ */ React.createElement(
|
|
18344
|
+
"div",
|
|
18345
|
+
{
|
|
18346
|
+
className: "nut-tour-content-bottom-operate-btn",
|
|
18347
|
+
onClick: () => changeStep("prev")
|
|
18348
|
+
},
|
|
18349
|
+
prev || locale.tour.prevStepText
|
|
18350
|
+
), list.length - 1 === active && /* @__PURE__ */ React.createElement(
|
|
18351
|
+
"div",
|
|
18352
|
+
{
|
|
18353
|
+
className: "nut-tour-content-bottom-operate-btn active",
|
|
18354
|
+
onClick: (e) => maskClose(e)
|
|
18355
|
+
},
|
|
18356
|
+
complete || locale.tour.completeText
|
|
18357
|
+
), list.length - 1 !== active && /* @__PURE__ */ React.createElement(
|
|
18358
|
+
"div",
|
|
18359
|
+
{
|
|
18360
|
+
className: "nut-tour-content-bottom-operate-btn active",
|
|
18361
|
+
onClick: () => changeStep("next")
|
|
18362
|
+
},
|
|
18363
|
+
next || locale.tour.nextStepText
|
|
18364
|
+
)))), type2 === "tile" && /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content nut-tour-content-tile" }, /* @__PURE__ */ React.createElement("div", { className: "nut-tour-content-inner" }, item.content))))
|
|
18365
|
+
)));
|
|
18366
|
+
}));
|
|
18367
|
+
};
|
|
18368
|
+
Tour.defaultProps = defaultProps$8;
|
|
18369
|
+
Tour.displayName = "NutTour";
|
|
18121
18370
|
const defaultProps$7 = {
|
|
18122
18371
|
...ComponentDefaults,
|
|
18123
18372
|
source: {
|
|
@@ -18610,7 +18859,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18610
18859
|
}
|
|
18611
18860
|
};
|
|
18612
18861
|
const TimeSelect = (props) => {
|
|
18613
|
-
const { locale } = useConfig();
|
|
18862
|
+
const { locale } = useConfig$1();
|
|
18614
18863
|
const {
|
|
18615
18864
|
visible,
|
|
18616
18865
|
className,
|
|
@@ -18834,7 +19083,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18834
19083
|
fontSize: 14
|
|
18835
19084
|
};
|
|
18836
19085
|
const WaterMark = (props) => {
|
|
18837
|
-
const { locale } = useConfig();
|
|
19086
|
+
const { locale } = useConfig$1();
|
|
18838
19087
|
const {
|
|
18839
19088
|
content,
|
|
18840
19089
|
fullPage,
|
|
@@ -19035,6 +19284,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19035
19284
|
exports2.TimeDetail = TimeDetail;
|
|
19036
19285
|
exports2.TimeSelect = TimeSelect;
|
|
19037
19286
|
exports2.Toast = Toast;
|
|
19287
|
+
exports2.Tour = Tour;
|
|
19038
19288
|
exports2.TrendArrow = TrendArrow;
|
|
19039
19289
|
exports2.Uploader = Uploader;
|
|
19040
19290
|
exports2.Video = Video;
|