@nutui/nutui-react-taro 1.3.12 → 1.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/esm/Address.js +5 -5
- package/dist/esm/Audio.js +5 -5
- package/dist/esm/AvatarGroup.js +4 -4
- package/dist/esm/Calendar.js +5 -5
- package/dist/esm/CalendarItem.js +4 -4
- package/dist/esm/Cascader.js +2 -2
- package/dist/esm/Cell.js +2 -2
- package/dist/esm/ConfigProvider.js +3 -3
- package/dist/esm/CountDown.js +4 -4
- package/dist/esm/DatePicker.js +5 -5
- package/dist/esm/Dialog.js +4 -4
- package/dist/esm/Empty.js +4 -4
- package/dist/esm/FixedNav.js +4 -4
- package/dist/esm/Form.js +4 -4
- package/dist/esm/Grid.js +4 -4
- package/dist/esm/GridItem.js +4 -4
- package/dist/esm/Image/style/index.js +2 -0
- package/dist/esm/Image.js +8 -0
- package/dist/esm/Infiniteloading.js +4 -4
- package/dist/esm/Input.js +4 -4
- package/dist/esm/MenuItem.js +4 -4
- package/dist/esm/NumberKeyboard.js +4 -4
- package/dist/esm/Pagination.js +4 -4
- package/dist/esm/Picker.js +4 -4
- package/dist/esm/PullToRefresh.js +4 -4
- package/dist/esm/Range.js +4 -4
- package/dist/esm/SearchBar.js +4 -4
- package/dist/esm/ShortPassword.js +4 -4
- package/dist/esm/SideNavBar.js +4 -4
- package/dist/esm/Signature.js +4 -4
- package/dist/esm/Sticky.js +4 -4
- package/dist/esm/Table.js +4 -4
- package/dist/esm/TextArea.js +4 -4
- package/dist/esm/TimeDetail.js +4 -4
- package/dist/esm/TimePannel.js +4 -4
- package/dist/esm/TimeSelect.js +6 -6
- package/dist/esm/TrendArrow/style/index.js +2 -0
- package/dist/esm/TrendArrow.js +6 -0
- package/dist/esm/Uploader.js +4 -4
- package/dist/esm/VirtualList.js +4 -4
- package/dist/esm/WaterMark/style/index.js +2 -0
- package/dist/esm/WaterMark.js +9 -0
- package/dist/esm/{address.taro-8d642b4a.js → address.taro-5e5bdac3.js} +2 -2
- package/dist/esm/{audio.taro-6920085d.js → audio.taro-ba2f6d01.js} +2 -2
- package/dist/esm/{avatargroup-5b2584d9.js → avatargroup-94384671.js} +1 -1
- package/dist/esm/{calendar.taro-0a8cbd0c.js → calendar.taro-355827c6.js} +2 -2
- package/dist/esm/{calendaritem.taro-3a12e7f2.js → calendaritem.taro-45d428b9.js} +1 -1
- package/dist/esm/{cascader.taro-8c9891b4.js → cascader.taro-459f7d45.js} +13 -2
- package/dist/esm/{cell.taro-1f034402.js → cell.taro-cf50c4f2.js} +7 -5
- package/dist/esm/{configprovider-3e87d67a.js → configprovider-c5b2fa7f.js} +1 -1
- package/dist/esm/{configprovider.taro-6c7b3056.js → configprovider.taro-3838604b.js} +1 -1
- package/dist/esm/{countdown.taro-f2d9ffed.js → countdown.taro-c9a93845.js} +1 -1
- package/dist/esm/{datepicker.taro-9f8afe51.js → datepicker.taro-4a3249c6.js} +1 -1
- package/dist/esm/{dialog.taro-17e19e5e.js → dialog.taro-78bb9f20.js} +1 -1
- package/dist/esm/{empty.taro-ab9c4f03.js → empty.taro-b69b51fb.js} +1 -1
- package/dist/esm/{fixednav.taro-582322a1.js → fixednav.taro-7f01a850.js} +1 -1
- package/dist/esm/{form.taro-e086758a.js → form.taro-111f816d.js} +1 -1
- package/dist/esm/{grid.taro-5d75c0ad.js → grid.taro-d244170c.js} +1 -1
- package/dist/esm/{griditem.taro-ca62dbb5.js → griditem.taro-f7ee189b.js} +1 -1
- package/dist/esm/image.taro-3464cdbe.js +105 -0
- package/dist/esm/{infiniteloading.taro-9701755f.js → infiniteloading.taro-b2f06309.js} +1 -1
- package/dist/esm/{input.taro-14380bc6.js → input.taro-63918b1f.js} +1 -1
- package/dist/esm/{menuitem.taro-bb55f482.js → menuitem.taro-f110c04a.js} +1 -1
- package/dist/esm/{numberkeyboard.taro-53c350b8.js → numberkeyboard.taro-8ff8d319.js} +1 -1
- package/dist/esm/nutui-react.es.js +41 -38
- package/dist/esm/{pagination.taro-62bbd23f.js → pagination.taro-6fbed587.js} +1 -1
- package/dist/esm/{picker.taro-f003b725.js → picker.taro-715409a3.js} +1 -1
- package/dist/esm/{pulltorefresh.taro-fe2fa54c.js → pulltorefresh.taro-92ad45af.js} +1 -1
- package/dist/esm/{range.taro-4e5f8f31.js → range.taro-062fc2f0.js} +1 -1
- package/dist/esm/{searchbar.taro-0d3c0081.js → searchbar.taro-7347bd21.js} +1 -1
- package/dist/esm/{shortpassword.taro-2e96ca22.js → shortpassword.taro-e75c0b88.js} +1 -1
- package/dist/esm/{sidenavbar.taro-4297f552.js → sidenavbar.taro-8e999f21.js} +1 -1
- package/dist/esm/{signature.taro-6589435b.js → signature.taro-a4f4b45a.js} +1 -1
- package/dist/esm/{sticky.taro-30d4e453.js → sticky.taro-f35f365b.js} +1 -1
- package/dist/esm/{table.taro-7ac89a6c.js → table.taro-96be07f2.js} +1 -1
- package/dist/esm/{textarea.taro-e1bf7f4d.js → textarea.taro-b5fc010b.js} +1 -1
- package/dist/esm/{timedetail.taro-519808cf.js → timedetail.taro-d5b32ecb.js} +1 -1
- package/dist/esm/{timepannel.taro-9904f6e6.js → timepannel.taro-38ff5c77.js} +1 -1
- package/dist/esm/{timeselect.taro-8c4439a8.js → timeselect.taro-f3972356.js} +3 -3
- package/dist/esm/trendarrow.taro-5a7153e4.js +100 -0
- package/dist/esm/types/src/locales/base.d.ts +3 -0
- package/dist/esm/types/src/packages/address/address.d.ts +2 -2
- package/dist/esm/types/src/packages/address/address.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/audio/audio.d.ts +2 -2
- package/dist/esm/types/src/packages/audio/audio.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/avatar/avatar.d.ts +2 -2
- package/dist/esm/types/src/packages/avatar/avatar.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/backtop/backtop.d.ts +2 -2
- package/dist/esm/types/src/packages/backtop/backtop.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/badge/badge.d.ts +2 -2
- package/dist/esm/types/src/packages/badge/badge.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/button/button.d.ts +2 -2
- package/dist/esm/types/src/packages/button/button.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/cascader/cascader.d.ts +2 -0
- package/dist/esm/types/src/packages/cascader/cascader.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/cascader/cascaderItem.d.ts +1 -0
- package/dist/esm/types/src/packages/cascader/cascaderItem.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/cell/cell.d.ts +2 -2
- package/dist/esm/types/src/packages/cell/cell.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/checkbox/checkbox.d.ts +2 -2
- package/dist/esm/types/src/packages/checkbox/checkbox.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/circleprogress/circleprogress.d.ts +1 -1
- package/dist/esm/types/src/packages/circleprogress/circleprogress.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/collapseitem/collapseitem.d.ts +2 -2
- package/dist/esm/types/src/packages/dialog/config.d.ts +3 -3
- package/dist/esm/types/src/packages/dialog/dialog.d.ts +2 -2
- package/dist/esm/types/src/packages/dialog/dialog.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/fixednav/fixednav.d.ts +2 -2
- package/dist/esm/types/src/packages/fixednav/fixednav.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/form/form.d.ts +2 -2
- package/dist/esm/types/src/packages/formitem/formitem.d.ts +2 -2
- package/dist/esm/types/src/packages/griditem/griditem.d.ts +2 -2
- package/dist/esm/types/src/packages/griditem/griditem.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/image/__test__/image.spec.d.ts +1 -0
- package/dist/esm/types/src/packages/image/demo.d.ts +3 -0
- package/dist/esm/types/src/packages/image/image.d.ts +23 -0
- package/dist/esm/types/src/packages/image/image.taro.d.ts +23 -0
- package/dist/esm/types/src/packages/image/index.d.ts +2 -0
- package/dist/esm/types/src/packages/image/index.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.d.ts +2 -2
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/input/input.d.ts +2 -2
- package/dist/esm/types/src/packages/input/input.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/inputnumber/inputnumber.d.ts +2 -2
- package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/menu/menu.d.ts +2 -2
- package/dist/esm/types/src/packages/menu/menu.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/menuitem/menuitem.d.ts +2 -2
- package/dist/esm/types/src/packages/menuitem/menuitem.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/navbar/navbar.d.ts +2 -2
- package/dist/esm/types/src/packages/navbar/navbar.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/noticebar/noticebar.d.ts +2 -2
- package/dist/esm/types/src/packages/noticebar/noticebar.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +4 -1
- package/dist/esm/types/src/packages/nutui.react.d.ts +7 -1
- package/dist/esm/types/src/packages/nutui.react.scss.d.ts +3 -0
- package/dist/esm/types/src/packages/nutui.react.taro.d.ts +7 -1
- package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +3 -0
- package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +4 -1
- package/dist/esm/types/src/packages/picker/pickerSlot.d.ts +2 -2
- package/dist/esm/types/src/packages/picker/pickerSlot.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/popover/popover.d.ts +2 -2
- package/dist/esm/types/src/packages/popover/popover.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/popup/popup.d.ts +2 -2
- package/dist/esm/types/src/packages/popup/popup.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/progress/progress.d.ts +2 -2
- package/dist/esm/types/src/packages/progress/progress.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/radio/radio.d.ts +2 -2
- package/dist/esm/types/src/packages/radio/radio.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/rate/rate.d.ts +2 -2
- package/dist/esm/types/src/packages/rate/rate.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +2 -2
- package/dist/esm/types/src/packages/searchbar/searchbar.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +2 -2
- package/dist/esm/types/src/packages/shortpassword/shortpassword.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/step/step.d.ts +2 -2
- package/dist/esm/types/src/packages/step/step.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/sticky/sticky.d.ts +2 -2
- package/dist/esm/types/src/packages/tabbaritem/tabbaritem.d.ts +2 -2
- package/dist/esm/types/src/packages/tabbaritem/tabbaritem.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/table/table.d.ts +2 -2
- package/dist/esm/types/src/packages/table/table.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/table/types.d.ts +2 -2
- package/dist/esm/types/src/packages/tabs/tabs.d.ts +2 -2
- package/dist/esm/types/src/packages/tabs/tabs.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/tag/tag.d.ts +2 -2
- package/dist/esm/types/src/packages/tag/tag.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/trendarrow/__test__/trendarrow.spec.d.ts +1 -0
- package/dist/esm/types/src/packages/trendarrow/demo.d.ts +4 -0
- package/dist/esm/types/src/packages/trendarrow/index.d.ts +2 -0
- package/dist/esm/types/src/packages/trendarrow/index.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/trendarrow/trendarrow.d.ts +18 -0
- package/dist/esm/types/src/packages/trendarrow/trendarrow.taro.d.ts +18 -0
- package/dist/esm/types/src/packages/uploader/uploader.d.ts +2 -2
- package/dist/esm/types/src/packages/uploader/uploader.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/virtuallist/type.d.ts +1 -1
- package/dist/esm/types/src/packages/virtuallist/utils.d.ts +1 -1
- package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +2 -2
- package/dist/esm/types/src/packages/virtuallist/virtuallist.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/watermark/__tests__/watermark.spec.d.ts +2 -0
- package/dist/esm/types/src/packages/watermark/demo.d.ts +4 -0
- package/dist/esm/types/src/packages/watermark/index.d.ts +2 -0
- package/dist/esm/types/src/packages/watermark/index.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/watermark/watermark.d.ts +22 -0
- package/dist/esm/types/src/packages/watermark/watermark.taro.d.ts +22 -0
- package/dist/esm/types/src/utils/typings.d.ts +1 -1
- package/dist/esm/{uploader.taro-2e16bff6.js → uploader.taro-568b7ab5.js} +1 -1
- package/dist/esm/{virtuallist.taro-e3035825.js → virtuallist.taro-f97ca13a.js} +1 -1
- package/dist/esm/watermark.taro-7aab4afb.js +120 -0
- package/dist/esm/{zh-CN-14165629.js → zh-CN-dfc384d0.js} +3 -0
- package/dist/locales/base.d.ts +3 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +4 -1
- package/dist/locales/id-ID.js +4 -1
- package/dist/locales/zh-CN.js +4 -1
- package/dist/locales/zh-TW.js +4 -1
- package/dist/nutui.react.es.js +557 -248
- package/dist/nutui.react.umd.js +559 -247
- package/dist/packages/cascader/cascader.scss +1 -1
- package/dist/packages/image/image.scss +51 -0
- package/dist/packages/trendarrow/trendarrow.scss +17 -0
- package/dist/packages/watermark/watermark.scss +13 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/font/config.json +4 -2
- package/dist/styles/font/demo_index.html +51 -5
- package/dist/styles/font/iconfont.css +11 -3
- package/dist/styles/font/iconfont.js +65 -62
- package/dist/styles/font/iconfont.json +14 -0
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/styles/themes/default.scss +3 -0
- package/dist/styles/variables.scss +4 -0
- package/dist/types/index.d.ts +110 -42
- package/dist/types/nutui.taro.react.build.ts +7 -1
- package/package.json +1 -1
package/dist/nutui.react.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react
|
|
2
|
+
* @nutui/nutui-react v1.3.13 Wed Nov 30 2022 17:53:16 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -60,7 +60,7 @@ classname_production_min.cn = e$1, classname_production_min.withNaming = r$1;
|
|
|
60
60
|
classname.exports = classname_production_min;
|
|
61
61
|
}
|
|
62
62
|
const cn = classname.exports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
63
|
-
const defaultProps$
|
|
63
|
+
const defaultProps$1u = {
|
|
64
64
|
name: "",
|
|
65
65
|
size: "",
|
|
66
66
|
classPrefix: "nut-icon",
|
|
@@ -88,7 +88,7 @@ function Icon$1(props) {
|
|
|
88
88
|
onClick,
|
|
89
89
|
...rest
|
|
90
90
|
} = {
|
|
91
|
-
...defaultProps$
|
|
91
|
+
...defaultProps$1u,
|
|
92
92
|
...props
|
|
93
93
|
};
|
|
94
94
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
@@ -122,13 +122,13 @@ function Icon$1(props) {
|
|
|
122
122
|
children
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
|
-
Icon$1.defaultProps = defaultProps$
|
|
125
|
+
Icon$1.defaultProps = defaultProps$1u;
|
|
126
126
|
Icon$1.displayName = "NutIcon";
|
|
127
127
|
const ComponentDefaults = {
|
|
128
128
|
iconClassPrefix: "nut-icon",
|
|
129
129
|
iconFontClassName: "nutui-iconfont"
|
|
130
130
|
};
|
|
131
|
-
const defaultProps$
|
|
131
|
+
const defaultProps$1t = {
|
|
132
132
|
...ComponentDefaults,
|
|
133
133
|
className: "",
|
|
134
134
|
color: "",
|
|
@@ -164,7 +164,7 @@ const Button = (props) => {
|
|
|
164
164
|
iconFontClassName,
|
|
165
165
|
...rest
|
|
166
166
|
} = {
|
|
167
|
-
...defaultProps$
|
|
167
|
+
...defaultProps$1t,
|
|
168
168
|
...props
|
|
169
169
|
};
|
|
170
170
|
const getStyle = useCallback(() => {
|
|
@@ -243,9 +243,9 @@ const Button = (props) => {
|
|
|
243
243
|
className: icon || loading ? "text" : ""
|
|
244
244
|
}, children)));
|
|
245
245
|
};
|
|
246
|
-
Button.defaultProps = defaultProps$
|
|
246
|
+
Button.defaultProps = defaultProps$1t;
|
|
247
247
|
Button.displayName = "NutButton";
|
|
248
|
-
const defaultProps$
|
|
248
|
+
const defaultProps$1s = {
|
|
249
249
|
...ComponentDefaults,
|
|
250
250
|
title: null,
|
|
251
251
|
subTitle: null,
|
|
@@ -291,14 +291,16 @@ const Cell$1 = (props) => {
|
|
|
291
291
|
iconFontClassName,
|
|
292
292
|
...rest
|
|
293
293
|
} = {
|
|
294
|
-
...defaultProps$
|
|
294
|
+
...defaultProps$1s,
|
|
295
295
|
...props
|
|
296
296
|
};
|
|
297
297
|
const b2 = cn("cell");
|
|
298
298
|
const handleClick2 = (event) => {
|
|
299
299
|
onClick(event);
|
|
300
300
|
const link = to2 || url;
|
|
301
|
-
|
|
301
|
+
if (link) {
|
|
302
|
+
replace ? Taro.redirectTo({ url: link }) : Taro.navigateTo({ url: link });
|
|
303
|
+
}
|
|
302
304
|
};
|
|
303
305
|
const baseStyle = {
|
|
304
306
|
borderRadius: Number.isNaN(Number(roundRadius)) ? String(roundRadius) : `${roundRadius}px`
|
|
@@ -340,9 +342,9 @@ const Cell$1 = (props) => {
|
|
|
340
342
|
className: b2("link")
|
|
341
343
|
}) : linkSlot));
|
|
342
344
|
};
|
|
343
|
-
Cell$1.defaultProps = defaultProps$
|
|
345
|
+
Cell$1.defaultProps = defaultProps$1s;
|
|
344
346
|
Cell$1.displayName = "NutCell";
|
|
345
|
-
const defaultProps$
|
|
347
|
+
const defaultProps$1r = {
|
|
346
348
|
title: "",
|
|
347
349
|
desc: "",
|
|
348
350
|
className: "",
|
|
@@ -351,7 +353,7 @@ const defaultProps$1o = {
|
|
|
351
353
|
};
|
|
352
354
|
const CellGroup = (props) => {
|
|
353
355
|
const { children, className, title, desc, titleSlot, descSlot } = {
|
|
354
|
-
...defaultProps$
|
|
356
|
+
...defaultProps$1r,
|
|
355
357
|
...props
|
|
356
358
|
};
|
|
357
359
|
const b2 = cn("cell-group");
|
|
@@ -365,7 +367,7 @@ const CellGroup = (props) => {
|
|
|
365
367
|
className: b2("wrap")
|
|
366
368
|
}, children));
|
|
367
369
|
};
|
|
368
|
-
CellGroup.defaultProps = defaultProps$
|
|
370
|
+
CellGroup.defaultProps = defaultProps$1r;
|
|
369
371
|
CellGroup.displayName = "NutCellGroup";
|
|
370
372
|
var classnames = { exports: {} };
|
|
371
373
|
/*!
|
|
@@ -1012,7 +1014,7 @@ CSSTransition.defaultProps = {
|
|
|
1012
1014
|
};
|
|
1013
1015
|
CSSTransition.propTypes = {};
|
|
1014
1016
|
var CSSTransition$1 = CSSTransition;
|
|
1015
|
-
const defaultProps$
|
|
1017
|
+
const defaultProps$1q = {
|
|
1016
1018
|
...ComponentDefaults,
|
|
1017
1019
|
position: "center",
|
|
1018
1020
|
transition: "",
|
|
@@ -1198,7 +1200,7 @@ const Popup = (props) => {
|
|
|
1198
1200
|
}, [position]);
|
|
1199
1201
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderToContainer(teleport, renderNode()));
|
|
1200
1202
|
};
|
|
1201
|
-
Popup.defaultProps = defaultProps$
|
|
1203
|
+
Popup.defaultProps = defaultProps$1q;
|
|
1202
1204
|
Popup.displayName = "NutPopup";
|
|
1203
1205
|
const zhCN = {
|
|
1204
1206
|
save: "\u4FDD\u5B58",
|
|
@@ -1323,9 +1325,12 @@ const zhCN = {
|
|
|
1323
1325
|
canReleaseText: "\u677E\u5F00\u5237\u65B0",
|
|
1324
1326
|
refreshingText: "\u52A0\u8F7D\u4E2D...",
|
|
1325
1327
|
completeText: "\u5237\u65B0\u6210\u529F"
|
|
1328
|
+
},
|
|
1329
|
+
watermark: {
|
|
1330
|
+
errorCanvasTips: "\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301Canvas"
|
|
1326
1331
|
}
|
|
1327
1332
|
};
|
|
1328
|
-
const defaultProps$
|
|
1333
|
+
const defaultProps$1p = {
|
|
1329
1334
|
locale: zhCN
|
|
1330
1335
|
};
|
|
1331
1336
|
const defaultConfigRef$1 = {
|
|
@@ -1342,7 +1347,7 @@ const useConfig$1 = () => {
|
|
|
1342
1347
|
};
|
|
1343
1348
|
const ConfigContext$1 = createContext$1(null);
|
|
1344
1349
|
const ConfigProvider = (props) => {
|
|
1345
|
-
const { children, ...config2 } = { ...defaultProps$
|
|
1350
|
+
const { children, ...config2 } = { ...defaultProps$1p, ...props };
|
|
1346
1351
|
const parentConfig = useConfig$1();
|
|
1347
1352
|
return /* @__PURE__ */ React__default.createElement(ConfigContext$1.Provider, {
|
|
1348
1353
|
value: {
|
|
@@ -1351,19 +1356,110 @@ const ConfigProvider = (props) => {
|
|
|
1351
1356
|
}
|
|
1352
1357
|
}, children);
|
|
1353
1358
|
};
|
|
1354
|
-
ConfigProvider.defaultProps = defaultProps$
|
|
1359
|
+
ConfigProvider.defaultProps = defaultProps$1p;
|
|
1355
1360
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
1356
|
-
const defaultProps$
|
|
1361
|
+
const defaultProps$1o = {
|
|
1362
|
+
fit: "fill",
|
|
1363
|
+
position: "center",
|
|
1364
|
+
alt: "",
|
|
1365
|
+
width: "center",
|
|
1366
|
+
height: "",
|
|
1367
|
+
round: false,
|
|
1368
|
+
showError: true,
|
|
1369
|
+
showLoading: true
|
|
1370
|
+
};
|
|
1371
|
+
const Image = (props) => {
|
|
1372
|
+
useConfig$1();
|
|
1373
|
+
const {
|
|
1374
|
+
children,
|
|
1375
|
+
className,
|
|
1376
|
+
style,
|
|
1377
|
+
src,
|
|
1378
|
+
fit,
|
|
1379
|
+
position,
|
|
1380
|
+
alt,
|
|
1381
|
+
width,
|
|
1382
|
+
height,
|
|
1383
|
+
round,
|
|
1384
|
+
radius,
|
|
1385
|
+
showError,
|
|
1386
|
+
showLoading,
|
|
1387
|
+
slotError,
|
|
1388
|
+
slotLoding,
|
|
1389
|
+
onClick,
|
|
1390
|
+
onLoad,
|
|
1391
|
+
onError
|
|
1392
|
+
} = { ...defaultProps$1o, ...props };
|
|
1393
|
+
const [loading, setLoading] = useState(true);
|
|
1394
|
+
const [isError, setIsError] = useState(false);
|
|
1395
|
+
useEffect(() => {
|
|
1396
|
+
if (src) {
|
|
1397
|
+
setIsError(false);
|
|
1398
|
+
setLoading(true);
|
|
1399
|
+
}
|
|
1400
|
+
}, [src]);
|
|
1401
|
+
const load = () => {
|
|
1402
|
+
setLoading(false);
|
|
1403
|
+
onLoad && onLoad();
|
|
1404
|
+
};
|
|
1405
|
+
const error = () => {
|
|
1406
|
+
setIsError(true);
|
|
1407
|
+
setLoading(false);
|
|
1408
|
+
onError && onError();
|
|
1409
|
+
};
|
|
1410
|
+
const pxCheck2 = (value) => {
|
|
1411
|
+
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
1412
|
+
};
|
|
1413
|
+
const stylebox = {
|
|
1414
|
+
height: height ? pxCheck2(height) : "",
|
|
1415
|
+
width: width ? pxCheck2(width) : "",
|
|
1416
|
+
overflow: radius !== void 0 && radius !== null ? "hidden" : "",
|
|
1417
|
+
borderRadius: radius !== void 0 && radius !== null ? pxCheck2(radius) : ""
|
|
1418
|
+
};
|
|
1419
|
+
const styles = {
|
|
1420
|
+
objectFit: fit,
|
|
1421
|
+
objectPosition: position,
|
|
1422
|
+
...style
|
|
1423
|
+
};
|
|
1424
|
+
const imageClick = (event) => {
|
|
1425
|
+
onClick && onClick(event);
|
|
1426
|
+
};
|
|
1427
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
1428
|
+
className: `nut-image ${round ? "nut-image-round" : ""}`,
|
|
1429
|
+
style: stylebox,
|
|
1430
|
+
onClick: (e2) => {
|
|
1431
|
+
imageClick(e2);
|
|
1432
|
+
}
|
|
1433
|
+
}, /* @__PURE__ */ React__default.createElement("img", {
|
|
1434
|
+
className: "nut-img",
|
|
1435
|
+
style: styles,
|
|
1436
|
+
src,
|
|
1437
|
+
alt,
|
|
1438
|
+
onLoad: load,
|
|
1439
|
+
onError: error
|
|
1440
|
+
}), showLoading && loading ? /* @__PURE__ */ React__default.createElement("div", {
|
|
1441
|
+
className: "nut-img-loading"
|
|
1442
|
+
}, slotLoding || children || /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
1443
|
+
name: "image"
|
|
1444
|
+
})) : null, showError && isError && !loading ? /* @__PURE__ */ React__default.createElement("div", {
|
|
1445
|
+
className: "nut-img-error"
|
|
1446
|
+
}, slotError || children || /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
1447
|
+
name: "image-error"
|
|
1448
|
+
})) : null);
|
|
1449
|
+
};
|
|
1450
|
+
Image.defaultProps = defaultProps$1o;
|
|
1451
|
+
Image.displayName = "NutImage";
|
|
1452
|
+
const defaultProps$1n = {};
|
|
1357
1453
|
const Layout = (props) => {
|
|
1358
|
-
({ ...defaultProps$
|
|
1454
|
+
({ ...defaultProps$1n, ...props });
|
|
1359
1455
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
1360
1456
|
className: "nut-layout"
|
|
1361
1457
|
}, "Layout");
|
|
1362
1458
|
};
|
|
1363
|
-
Layout.defaultProps = defaultProps$
|
|
1459
|
+
Layout.defaultProps = defaultProps$1n;
|
|
1364
1460
|
Layout.displayName = "NutLayout";
|
|
1365
1461
|
const DataContext$2 = createContext$1({});
|
|
1366
|
-
const defaultProps$
|
|
1462
|
+
const defaultProps$1m = {
|
|
1367
1463
|
span: "24",
|
|
1368
1464
|
offset: "0",
|
|
1369
1465
|
gutter: "0"
|
|
@@ -1377,7 +1473,7 @@ const Col = (props) => {
|
|
|
1377
1473
|
children,
|
|
1378
1474
|
onClick
|
|
1379
1475
|
} = {
|
|
1380
|
-
...defaultProps$
|
|
1476
|
+
...defaultProps$1m,
|
|
1381
1477
|
...props
|
|
1382
1478
|
};
|
|
1383
1479
|
const [colName, setColName] = useState("");
|
|
@@ -1405,9 +1501,9 @@ const Col = (props) => {
|
|
|
1405
1501
|
}
|
|
1406
1502
|
}, children);
|
|
1407
1503
|
};
|
|
1408
|
-
Col.defaultProps = defaultProps$
|
|
1504
|
+
Col.defaultProps = defaultProps$1m;
|
|
1409
1505
|
Col.displayName = "NutCol";
|
|
1410
|
-
const defaultProps$
|
|
1506
|
+
const defaultProps$1l = {
|
|
1411
1507
|
type: "",
|
|
1412
1508
|
justify: "start",
|
|
1413
1509
|
align: "flex-start",
|
|
@@ -1426,7 +1522,7 @@ const Row = (props) => {
|
|
|
1426
1522
|
gutter,
|
|
1427
1523
|
onClick
|
|
1428
1524
|
} = {
|
|
1429
|
-
...defaultProps$
|
|
1525
|
+
...defaultProps$1l,
|
|
1430
1526
|
...props
|
|
1431
1527
|
};
|
|
1432
1528
|
const prefixCls = "nut-row";
|
|
@@ -1461,9 +1557,9 @@ const Row = (props) => {
|
|
|
1461
1557
|
children
|
|
1462
1558
|
));
|
|
1463
1559
|
};
|
|
1464
|
-
Row.defaultProps = defaultProps$
|
|
1560
|
+
Row.defaultProps = defaultProps$1l;
|
|
1465
1561
|
Row.displayName = "NutRow";
|
|
1466
|
-
const defaultProps$
|
|
1562
|
+
const defaultProps$1k = {
|
|
1467
1563
|
contentPosition: "center",
|
|
1468
1564
|
dashed: false,
|
|
1469
1565
|
hairline: true,
|
|
@@ -1480,7 +1576,7 @@ const Divider = (props) => {
|
|
|
1480
1576
|
direction,
|
|
1481
1577
|
...rest
|
|
1482
1578
|
} = {
|
|
1483
|
-
...defaultProps$
|
|
1579
|
+
...defaultProps$1k,
|
|
1484
1580
|
...props
|
|
1485
1581
|
};
|
|
1486
1582
|
const dividerBem = cn("divider");
|
|
@@ -1501,9 +1597,9 @@ const Divider = (props) => {
|
|
|
1501
1597
|
...rest
|
|
1502
1598
|
}, children);
|
|
1503
1599
|
};
|
|
1504
|
-
Divider.defaultProps = defaultProps$
|
|
1600
|
+
Divider.defaultProps = defaultProps$1k;
|
|
1505
1601
|
Divider.displayName = "NutDivider";
|
|
1506
|
-
const defaultProps$
|
|
1602
|
+
const defaultProps$1j = {
|
|
1507
1603
|
columnNum: 4,
|
|
1508
1604
|
border: true,
|
|
1509
1605
|
gutter: 0,
|
|
@@ -1530,7 +1626,7 @@ const Grid = (props) => {
|
|
|
1530
1626
|
iconColor,
|
|
1531
1627
|
className,
|
|
1532
1628
|
...rest
|
|
1533
|
-
} = { ...defaultProps$
|
|
1629
|
+
} = { ...defaultProps$1j, ...props };
|
|
1534
1630
|
const childrenDom = React__default.Children.toArray(children);
|
|
1535
1631
|
const pxCheck2 = (value) => {
|
|
1536
1632
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
@@ -1569,9 +1665,9 @@ const Grid = (props) => {
|
|
|
1569
1665
|
});
|
|
1570
1666
|
}));
|
|
1571
1667
|
};
|
|
1572
|
-
Grid.defaultProps = defaultProps$
|
|
1668
|
+
Grid.defaultProps = defaultProps$1j;
|
|
1573
1669
|
Grid.displayName = "NutGrid";
|
|
1574
|
-
const defaultProps$
|
|
1670
|
+
const defaultProps$1i = {
|
|
1575
1671
|
...ComponentDefaults,
|
|
1576
1672
|
text: "",
|
|
1577
1673
|
icon: "",
|
|
@@ -1610,7 +1706,7 @@ const GridItem = (props) => {
|
|
|
1610
1706
|
onClick,
|
|
1611
1707
|
...rest
|
|
1612
1708
|
} = {
|
|
1613
|
-
...defaultProps$
|
|
1709
|
+
...defaultProps$1i,
|
|
1614
1710
|
...props
|
|
1615
1711
|
};
|
|
1616
1712
|
const b2 = cn("grid-item");
|
|
@@ -1658,7 +1754,7 @@ const GridItem = (props) => {
|
|
|
1658
1754
|
className: "nut-grid-item__text"
|
|
1659
1755
|
}, text), children && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children)));
|
|
1660
1756
|
};
|
|
1661
|
-
GridItem.defaultProps = defaultProps$
|
|
1757
|
+
GridItem.defaultProps = defaultProps$1i;
|
|
1662
1758
|
GridItem.displayName = "NutGridItem";
|
|
1663
1759
|
const defaultConfigRef = {
|
|
1664
1760
|
current: {
|
|
@@ -1673,17 +1769,17 @@ const useConfig = () => {
|
|
|
1673
1769
|
return (_a = useContext$1(ConfigContext)) != null ? _a : getDefaultConfig();
|
|
1674
1770
|
};
|
|
1675
1771
|
const ConfigContext = createContext$1(null);
|
|
1676
|
-
const defaultProps$
|
|
1772
|
+
const defaultProps$1h = {};
|
|
1677
1773
|
const Sticky = (props) => {
|
|
1678
1774
|
useConfig();
|
|
1679
|
-
({ ...defaultProps$
|
|
1775
|
+
({ ...defaultProps$1h, ...props });
|
|
1680
1776
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
1681
1777
|
className: "nut-sticky"
|
|
1682
1778
|
}, "Sticky");
|
|
1683
1779
|
};
|
|
1684
|
-
Sticky.defaultProps = defaultProps$
|
|
1780
|
+
Sticky.defaultProps = defaultProps$1h;
|
|
1685
1781
|
Sticky.displayName = "NutSticky";
|
|
1686
|
-
const defaultProps$
|
|
1782
|
+
const defaultProps$1g = {
|
|
1687
1783
|
...ComponentDefaults,
|
|
1688
1784
|
title: "",
|
|
1689
1785
|
desc: "",
|
|
@@ -1719,7 +1815,7 @@ const NavBar = (props) => {
|
|
|
1719
1815
|
iconClassPrefix,
|
|
1720
1816
|
iconFontClassName
|
|
1721
1817
|
} = {
|
|
1722
|
-
...defaultProps$
|
|
1818
|
+
...defaultProps$1g,
|
|
1723
1819
|
...props
|
|
1724
1820
|
};
|
|
1725
1821
|
const b2 = cn("navbar");
|
|
@@ -1788,9 +1884,9 @@ const NavBar = (props) => {
|
|
|
1788
1884
|
className: `${b2("")}--placeholder`
|
|
1789
1885
|
}, renderWrapper()) : renderWrapper());
|
|
1790
1886
|
};
|
|
1791
|
-
NavBar.defaultProps = defaultProps$
|
|
1887
|
+
NavBar.defaultProps = defaultProps$1g;
|
|
1792
1888
|
NavBar.displayName = "NutNavBar";
|
|
1793
|
-
const defaultProps$
|
|
1889
|
+
const defaultProps$1f = {
|
|
1794
1890
|
...ComponentDefaults,
|
|
1795
1891
|
fixednavClass: "nut-fixednav",
|
|
1796
1892
|
activeText: "",
|
|
@@ -1820,7 +1916,7 @@ const FixedNav = (props) => {
|
|
|
1820
1916
|
iconFontClassName,
|
|
1821
1917
|
...rest
|
|
1822
1918
|
} = {
|
|
1823
|
-
...defaultProps$
|
|
1919
|
+
...defaultProps$1f,
|
|
1824
1920
|
...props
|
|
1825
1921
|
};
|
|
1826
1922
|
const b2 = cn("fixednav");
|
|
@@ -1875,9 +1971,9 @@ const FixedNav = (props) => {
|
|
|
1875
1971
|
className: "text"
|
|
1876
1972
|
}, visible ? activeText || locale.fixednav.activeText : unActiveText || locale.fixednav.unActiveText))));
|
|
1877
1973
|
};
|
|
1878
|
-
FixedNav.defaultProps = defaultProps$
|
|
1974
|
+
FixedNav.defaultProps = defaultProps$1f;
|
|
1879
1975
|
FixedNav.displayName = "NutFixedNav";
|
|
1880
|
-
const defaultProps$
|
|
1976
|
+
const defaultProps$1e = {
|
|
1881
1977
|
visible: 0,
|
|
1882
1978
|
bottom: false,
|
|
1883
1979
|
size: 20,
|
|
@@ -1905,7 +2001,7 @@ const Tabbar = (props) => {
|
|
|
1905
2001
|
tabSwitch,
|
|
1906
2002
|
onSwitch
|
|
1907
2003
|
} = {
|
|
1908
|
-
...defaultProps$
|
|
2004
|
+
...defaultProps$1e,
|
|
1909
2005
|
...props
|
|
1910
2006
|
};
|
|
1911
2007
|
const b2 = cn("tabbar");
|
|
@@ -1941,9 +2037,9 @@ const Tabbar = (props) => {
|
|
|
1941
2037
|
return React__default.cloneElement(child, childProps);
|
|
1942
2038
|
}));
|
|
1943
2039
|
};
|
|
1944
|
-
Tabbar.defaultProps = defaultProps$
|
|
2040
|
+
Tabbar.defaultProps = defaultProps$1e;
|
|
1945
2041
|
Tabbar.displayName = "NutTabbar";
|
|
1946
|
-
const defaultProps$
|
|
2042
|
+
const defaultProps$1d = {
|
|
1947
2043
|
...ComponentDefaults,
|
|
1948
2044
|
dot: false,
|
|
1949
2045
|
size: "",
|
|
@@ -1979,7 +2075,7 @@ const TabbarItem = (props) => {
|
|
|
1979
2075
|
iconClassPrefix,
|
|
1980
2076
|
iconFontClassName
|
|
1981
2077
|
} = {
|
|
1982
|
-
...defaultProps$
|
|
2078
|
+
...defaultProps$1d,
|
|
1983
2079
|
...props
|
|
1984
2080
|
};
|
|
1985
2081
|
const b2 = cn("tabbar-item");
|
|
@@ -2029,7 +2125,7 @@ var index_cjs$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
2029
2125
|
var require$$0 = /* @__PURE__ */ getAugmentedNamespace(index_cjs$1);
|
|
2030
2126
|
var index_cjs = require$$0;
|
|
2031
2127
|
const elevatorContext = createContext$1({});
|
|
2032
|
-
const defaultProps$
|
|
2128
|
+
const defaultProps$1c = {
|
|
2033
2129
|
height: "200px",
|
|
2034
2130
|
acceptKey: "title",
|
|
2035
2131
|
indexList: [],
|
|
@@ -2052,7 +2148,7 @@ const Elevator = (props) => {
|
|
|
2052
2148
|
children,
|
|
2053
2149
|
...rest
|
|
2054
2150
|
} = {
|
|
2055
|
-
...defaultProps$
|
|
2151
|
+
...defaultProps$1c,
|
|
2056
2152
|
...props
|
|
2057
2153
|
};
|
|
2058
2154
|
const b2 = cn("elevator");
|
|
@@ -2252,9 +2348,9 @@ const Elevator = (props) => {
|
|
|
2252
2348
|
}, item[acceptKey]);
|
|
2253
2349
|
}))));
|
|
2254
2350
|
};
|
|
2255
|
-
Elevator.defaultProps = defaultProps$
|
|
2351
|
+
Elevator.defaultProps = defaultProps$1c;
|
|
2256
2352
|
Elevator.displayName = "NutElevator";
|
|
2257
|
-
const defaultProps$
|
|
2353
|
+
const defaultProps$1b = {
|
|
2258
2354
|
defaultValue: 1,
|
|
2259
2355
|
mode: "multi",
|
|
2260
2356
|
prevText: "",
|
|
@@ -2271,7 +2367,7 @@ const defaultProps$19 = {
|
|
|
2271
2367
|
};
|
|
2272
2368
|
const Pagination = (props) => {
|
|
2273
2369
|
const { locale } = useConfig$1();
|
|
2274
|
-
({ ...defaultProps$
|
|
2370
|
+
({ ...defaultProps$1b, ...props });
|
|
2275
2371
|
const {
|
|
2276
2372
|
modelValue,
|
|
2277
2373
|
mode,
|
|
@@ -2388,7 +2484,7 @@ const Pagination = (props) => {
|
|
|
2388
2484
|
onClick: (e2) => selectPage(Number(currentPage) + 1, true)
|
|
2389
2485
|
}, nextText || locale.pagination.next));
|
|
2390
2486
|
};
|
|
2391
|
-
Pagination.defaultProps = defaultProps$
|
|
2487
|
+
Pagination.defaultProps = defaultProps$1b;
|
|
2392
2488
|
Pagination.displayName = "NutPagination";
|
|
2393
2489
|
class Title {
|
|
2394
2490
|
constructor() {
|
|
@@ -2398,7 +2494,7 @@ class Title {
|
|
|
2398
2494
|
this.index = 0;
|
|
2399
2495
|
}
|
|
2400
2496
|
}
|
|
2401
|
-
const defaultProps$
|
|
2497
|
+
const defaultProps$1a = {
|
|
2402
2498
|
...ComponentDefaults,
|
|
2403
2499
|
tabStyle: {},
|
|
2404
2500
|
value: 0,
|
|
@@ -2439,7 +2535,7 @@ const Tabs = (props) => {
|
|
|
2439
2535
|
iconFontClassName,
|
|
2440
2536
|
...rest
|
|
2441
2537
|
} = {
|
|
2442
|
-
...defaultProps$
|
|
2538
|
+
...defaultProps$1a,
|
|
2443
2539
|
...props
|
|
2444
2540
|
};
|
|
2445
2541
|
const [currentItem, setCurrentItem] = useState({ index: 0 });
|
|
@@ -2557,9 +2653,9 @@ const Tabs = (props) => {
|
|
|
2557
2653
|
return React__default.cloneElement(child, childProps);
|
|
2558
2654
|
}))));
|
|
2559
2655
|
};
|
|
2560
|
-
Tabs.defaultProps = defaultProps$
|
|
2656
|
+
Tabs.defaultProps = defaultProps$1a;
|
|
2561
2657
|
Tabs.displayName = "NutTabs";
|
|
2562
|
-
const defaultProps$
|
|
2658
|
+
const defaultProps$19 = {
|
|
2563
2659
|
title: "",
|
|
2564
2660
|
paneKey: "",
|
|
2565
2661
|
activeKey: "",
|
|
@@ -2567,7 +2663,7 @@ const defaultProps$17 = {
|
|
|
2567
2663
|
};
|
|
2568
2664
|
const TabPane = (props) => {
|
|
2569
2665
|
const { children, paneKey, activeKey, autoHeightClassName, className } = {
|
|
2570
|
-
...defaultProps$
|
|
2666
|
+
...defaultProps$19,
|
|
2571
2667
|
...props
|
|
2572
2668
|
};
|
|
2573
2669
|
const b2 = cn("tabpane");
|
|
@@ -2583,7 +2679,7 @@ const TabPane = (props) => {
|
|
|
2583
2679
|
className: classes
|
|
2584
2680
|
}, children);
|
|
2585
2681
|
};
|
|
2586
|
-
const defaultProps$
|
|
2682
|
+
const defaultProps$18 = {
|
|
2587
2683
|
size: 3,
|
|
2588
2684
|
current: 1,
|
|
2589
2685
|
block: false,
|
|
@@ -2603,7 +2699,7 @@ const Indicator = (props) => {
|
|
|
2603
2699
|
vertical,
|
|
2604
2700
|
...rest
|
|
2605
2701
|
} = {
|
|
2606
|
-
...defaultProps$
|
|
2702
|
+
...defaultProps$18,
|
|
2607
2703
|
...props
|
|
2608
2704
|
};
|
|
2609
2705
|
const b2 = cn("indicator");
|
|
@@ -2637,7 +2733,7 @@ const Indicator = (props) => {
|
|
|
2637
2733
|
...rest
|
|
2638
2734
|
}, renderEles());
|
|
2639
2735
|
};
|
|
2640
|
-
Indicator.defaultProps = defaultProps$
|
|
2736
|
+
Indicator.defaultProps = defaultProps$18;
|
|
2641
2737
|
Indicator.displayName = "NutIndicator";
|
|
2642
2738
|
const handleClick = (e2) => {
|
|
2643
2739
|
e2.stopPropagation();
|
|
@@ -2653,7 +2749,7 @@ const handleClick = (e2) => {
|
|
|
2653
2749
|
}
|
|
2654
2750
|
};
|
|
2655
2751
|
const OffsetContext = createContext$1(20);
|
|
2656
|
-
const defaultProps$
|
|
2752
|
+
const defaultProps$17 = {
|
|
2657
2753
|
showhead: false,
|
|
2658
2754
|
position: "left",
|
|
2659
2755
|
width: "80%"
|
|
@@ -2671,7 +2767,7 @@ const SideNavBar = (props) => {
|
|
|
2671
2767
|
onClose,
|
|
2672
2768
|
...rest
|
|
2673
2769
|
} = {
|
|
2674
|
-
...defaultProps$
|
|
2770
|
+
...defaultProps$17,
|
|
2675
2771
|
...props
|
|
2676
2772
|
};
|
|
2677
2773
|
const offset = props.offset ? Number(props.offset) : 20;
|
|
@@ -2699,14 +2795,14 @@ const SideNavBar = (props) => {
|
|
|
2699
2795
|
className: "nut-sidenavbar__content"
|
|
2700
2796
|
}, children))))));
|
|
2701
2797
|
};
|
|
2702
|
-
SideNavBar.defaultProps = defaultProps$
|
|
2798
|
+
SideNavBar.defaultProps = defaultProps$17;
|
|
2703
2799
|
SideNavBar.displayName = "NutSideNavBar";
|
|
2704
|
-
const defaultProps$
|
|
2800
|
+
const defaultProps$16 = {
|
|
2705
2801
|
open: true
|
|
2706
2802
|
};
|
|
2707
2803
|
const SubSideNavBar = (props) => {
|
|
2708
2804
|
const { title, ikey, children, onClick, open, ...rest } = {
|
|
2709
|
-
...defaultProps$
|
|
2805
|
+
...defaultProps$16,
|
|
2710
2806
|
...props
|
|
2711
2807
|
};
|
|
2712
2808
|
const offset = useContext$1(OffsetContext);
|
|
@@ -2777,7 +2873,7 @@ const SideNavBarItem = (props) => {
|
|
|
2777
2873
|
...rest
|
|
2778
2874
|
}, title);
|
|
2779
2875
|
};
|
|
2780
|
-
const defaultProps$
|
|
2876
|
+
const defaultProps$15 = {
|
|
2781
2877
|
...ComponentDefaults,
|
|
2782
2878
|
className: "",
|
|
2783
2879
|
style: {},
|
|
@@ -2800,7 +2896,7 @@ const Menu = (props) => {
|
|
|
2800
2896
|
iconFontClassName,
|
|
2801
2897
|
...rest
|
|
2802
2898
|
} = {
|
|
2803
|
-
...defaultProps$
|
|
2899
|
+
...defaultProps$15,
|
|
2804
2900
|
...props
|
|
2805
2901
|
};
|
|
2806
2902
|
const parentRef = useRef(null);
|
|
@@ -2897,9 +2993,9 @@ const Menu = (props) => {
|
|
|
2897
2993
|
})));
|
|
2898
2994
|
})), cloneChildren()));
|
|
2899
2995
|
};
|
|
2900
|
-
Menu.defaultProps = defaultProps$
|
|
2996
|
+
Menu.defaultProps = defaultProps$15;
|
|
2901
2997
|
Menu.displayName = "NutMenu";
|
|
2902
|
-
const defaultProps$
|
|
2998
|
+
const defaultProps$14 = {
|
|
2903
2999
|
...ComponentDefaults,
|
|
2904
3000
|
className: "",
|
|
2905
3001
|
style: {},
|
|
@@ -2914,7 +3010,7 @@ const defaultProps$12 = {
|
|
|
2914
3010
|
};
|
|
2915
3011
|
const MenuItem = forwardRef((props, ref) => {
|
|
2916
3012
|
useConfig$1();
|
|
2917
|
-
const mergedProps = { ...defaultProps$
|
|
3013
|
+
const mergedProps = { ...defaultProps$14, ...props };
|
|
2918
3014
|
const {
|
|
2919
3015
|
style,
|
|
2920
3016
|
options,
|
|
@@ -2930,7 +3026,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
2930
3026
|
iconClassPrefix,
|
|
2931
3027
|
iconFontClassName
|
|
2932
3028
|
} = {
|
|
2933
|
-
...defaultProps$
|
|
3029
|
+
...defaultProps$14,
|
|
2934
3030
|
...props
|
|
2935
3031
|
};
|
|
2936
3032
|
const { activeColor, showPopup, parent, orderKey } = mergedProps;
|
|
@@ -3051,7 +3147,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
3051
3147
|
}, item.text));
|
|
3052
3148
|
}), children))));
|
|
3053
3149
|
});
|
|
3054
|
-
MenuItem.defaultProps = defaultProps$
|
|
3150
|
+
MenuItem.defaultProps = defaultProps$14;
|
|
3055
3151
|
MenuItem.displayName = "NutMenuItem";
|
|
3056
3152
|
const MIN_DISTANCE = 10;
|
|
3057
3153
|
function getDirection(x2, y2) {
|
|
@@ -3122,7 +3218,7 @@ const getRectByTaro = async (element) => {
|
|
|
3122
3218
|
const res = await element.getBoundingClientRect();
|
|
3123
3219
|
return res;
|
|
3124
3220
|
};
|
|
3125
|
-
const defaultProps$
|
|
3221
|
+
const defaultProps$13 = {
|
|
3126
3222
|
name: "",
|
|
3127
3223
|
size: "",
|
|
3128
3224
|
classPrefix: "nut-icon",
|
|
@@ -3150,7 +3246,7 @@ function Icon(props) {
|
|
|
3150
3246
|
onClick,
|
|
3151
3247
|
...rest
|
|
3152
3248
|
} = {
|
|
3153
|
-
...defaultProps$
|
|
3249
|
+
...defaultProps$13,
|
|
3154
3250
|
...props
|
|
3155
3251
|
};
|
|
3156
3252
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
@@ -3184,9 +3280,9 @@ function Icon(props) {
|
|
|
3184
3280
|
children
|
|
3185
3281
|
);
|
|
3186
3282
|
}
|
|
3187
|
-
Icon.defaultProps = defaultProps$
|
|
3283
|
+
Icon.defaultProps = defaultProps$13;
|
|
3188
3284
|
Icon.displayName = "NutIcon";
|
|
3189
|
-
const defaultProps$
|
|
3285
|
+
const defaultProps$12 = {
|
|
3190
3286
|
id: "",
|
|
3191
3287
|
style: {},
|
|
3192
3288
|
icon: null,
|
|
@@ -3231,7 +3327,7 @@ const Toast = (props) => {
|
|
|
3231
3327
|
visible,
|
|
3232
3328
|
onClose,
|
|
3233
3329
|
...rest
|
|
3234
|
-
} = { ...defaultProps$
|
|
3330
|
+
} = { ...defaultProps$12, ...props };
|
|
3235
3331
|
let timer;
|
|
3236
3332
|
const [openState, SetOpenState] = useState(false);
|
|
3237
3333
|
useEffect(() => {
|
|
@@ -3320,9 +3416,9 @@ const Toast = (props) => {
|
|
|
3320
3416
|
className: toastBem("text")
|
|
3321
3417
|
}, msg))) : null);
|
|
3322
3418
|
};
|
|
3323
|
-
Toast.defaultProps = defaultProps$
|
|
3419
|
+
Toast.defaultProps = defaultProps$12;
|
|
3324
3420
|
Toast.displayName = "NutToast";
|
|
3325
|
-
const defaultProps
|
|
3421
|
+
const defaultProps$11 = {
|
|
3326
3422
|
range: false,
|
|
3327
3423
|
hiddenRange: false,
|
|
3328
3424
|
hiddenTag: false,
|
|
@@ -3359,8 +3455,8 @@ const Range = (props) => {
|
|
|
3359
3455
|
minDesc,
|
|
3360
3456
|
maxDesc,
|
|
3361
3457
|
curValueDesc
|
|
3362
|
-
} = { ...defaultProps
|
|
3363
|
-
let { min, max, step } = { ...defaultProps
|
|
3458
|
+
} = { ...defaultProps$11, ...props };
|
|
3459
|
+
let { min, max, step } = { ...defaultProps$11, ...props };
|
|
3364
3460
|
min = Number(min);
|
|
3365
3461
|
max = Number(max);
|
|
3366
3462
|
step = Number(step);
|
|
@@ -3711,7 +3807,7 @@ const Range = (props) => {
|
|
|
3711
3807
|
}
|
|
3712
3808
|
}));
|
|
3713
3809
|
};
|
|
3714
|
-
Range.defaultProps = defaultProps
|
|
3810
|
+
Range.defaultProps = defaultProps$11;
|
|
3715
3811
|
Range.displayName = "NutRange";
|
|
3716
3812
|
const Utils = {
|
|
3717
3813
|
isLeapYear(y2) {
|
|
@@ -3805,7 +3901,7 @@ function requestAniFrame() {
|
|
|
3805
3901
|
};
|
|
3806
3902
|
}
|
|
3807
3903
|
var requestAniFrame$1 = requestAniFrame();
|
|
3808
|
-
const defaultProps$
|
|
3904
|
+
const defaultProps$10 = {
|
|
3809
3905
|
type: "one",
|
|
3810
3906
|
isAutoBackFill: false,
|
|
3811
3907
|
poppable: true,
|
|
@@ -3834,7 +3930,7 @@ const CalendarItem = (props) => {
|
|
|
3834
3930
|
onChoose,
|
|
3835
3931
|
onUpdate,
|
|
3836
3932
|
onClose
|
|
3837
|
-
} = { ...defaultProps$
|
|
3933
|
+
} = { ...defaultProps$10, ...props };
|
|
3838
3934
|
const weeks = locale.calendaritem.weekdays;
|
|
3839
3935
|
const [yearMonthTitle, setYearMonthTitle] = useState("");
|
|
3840
3936
|
const [unLoadPrev, setUnLoadPrev] = useState(false);
|
|
@@ -4258,9 +4354,9 @@ const CalendarItem = (props) => {
|
|
|
4258
4354
|
onClick: confirm
|
|
4259
4355
|
}, locale.confirm)) : ""));
|
|
4260
4356
|
};
|
|
4261
|
-
CalendarItem.defaultProps = defaultProps$
|
|
4357
|
+
CalendarItem.defaultProps = defaultProps$10;
|
|
4262
4358
|
CalendarItem.displayName = "NutCalendarItem";
|
|
4263
|
-
const defaultProps
|
|
4359
|
+
const defaultProps$$ = {
|
|
4264
4360
|
type: "one",
|
|
4265
4361
|
isAutoBackFill: false,
|
|
4266
4362
|
poppable: true,
|
|
@@ -4288,7 +4384,7 @@ const Calendar = (props) => {
|
|
|
4288
4384
|
endDate,
|
|
4289
4385
|
onClose,
|
|
4290
4386
|
onChoose
|
|
4291
|
-
} = { ...defaultProps
|
|
4387
|
+
} = { ...defaultProps$$, ...props };
|
|
4292
4388
|
const close = () => {
|
|
4293
4389
|
onClose && onClose();
|
|
4294
4390
|
};
|
|
@@ -4334,9 +4430,9 @@ const Calendar = (props) => {
|
|
|
4334
4430
|
onChoose: choose
|
|
4335
4431
|
}));
|
|
4336
4432
|
};
|
|
4337
|
-
Calendar.defaultProps = defaultProps
|
|
4433
|
+
Calendar.defaultProps = defaultProps$$;
|
|
4338
4434
|
Calendar.displayName = "NutCalendar";
|
|
4339
|
-
const defaultProps$
|
|
4435
|
+
const defaultProps$_ = {
|
|
4340
4436
|
disabled: false,
|
|
4341
4437
|
checkedValue: [],
|
|
4342
4438
|
max: void 0,
|
|
@@ -4346,7 +4442,7 @@ const defaultProps$Y = {
|
|
|
4346
4442
|
};
|
|
4347
4443
|
const CheckboxGroup = React__default.forwardRef(
|
|
4348
4444
|
(props, ref) => {
|
|
4349
|
-
const { children } = { ...defaultProps$
|
|
4445
|
+
const { children } = { ...defaultProps$_, ...props };
|
|
4350
4446
|
const b2 = cn("checkboxgroup");
|
|
4351
4447
|
const {
|
|
4352
4448
|
className,
|
|
@@ -4453,9 +4549,9 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
4453
4549
|
}, (options == null ? void 0 : options.length) ? renderOptionsChildren() : cloneChildren());
|
|
4454
4550
|
}
|
|
4455
4551
|
);
|
|
4456
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
4552
|
+
CheckboxGroup.defaultProps = defaultProps$_;
|
|
4457
4553
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
4458
|
-
const defaultProps$
|
|
4554
|
+
const defaultProps$Z = {
|
|
4459
4555
|
...ComponentDefaults,
|
|
4460
4556
|
checked: false,
|
|
4461
4557
|
disabled: false,
|
|
@@ -4471,7 +4567,7 @@ const defaultProps$X = {
|
|
|
4471
4567
|
};
|
|
4472
4568
|
const Checkbox = (props) => {
|
|
4473
4569
|
const { children } = {
|
|
4474
|
-
...defaultProps$
|
|
4570
|
+
...defaultProps$Z,
|
|
4475
4571
|
...props
|
|
4476
4572
|
};
|
|
4477
4573
|
const b2 = cn("checkbox");
|
|
@@ -4553,7 +4649,7 @@ const Checkbox = (props) => {
|
|
|
4553
4649
|
onClick: handleClick2
|
|
4554
4650
|
}, renderIcon(), renderLabel());
|
|
4555
4651
|
};
|
|
4556
|
-
Checkbox.defaultProps = defaultProps$
|
|
4652
|
+
Checkbox.defaultProps = defaultProps$Z;
|
|
4557
4653
|
Checkbox.displayName = "NutCheckBox";
|
|
4558
4654
|
Checkbox.Group = CheckboxGroup;
|
|
4559
4655
|
const InternalPickerSlot = (props, ref) => {
|
|
@@ -5000,7 +5096,7 @@ const InternalPicker = (props, ref) => {
|
|
|
5000
5096
|
};
|
|
5001
5097
|
const Picker = React__default.forwardRef(InternalPicker);
|
|
5002
5098
|
const currentYear = new Date().getFullYear();
|
|
5003
|
-
const defaultProps$
|
|
5099
|
+
const defaultProps$Y = {
|
|
5004
5100
|
modelValue: null,
|
|
5005
5101
|
visible: false,
|
|
5006
5102
|
title: "",
|
|
@@ -5031,7 +5127,7 @@ const DatePicker = (props) => {
|
|
|
5031
5127
|
style,
|
|
5032
5128
|
...rest
|
|
5033
5129
|
} = {
|
|
5034
|
-
...defaultProps$
|
|
5130
|
+
...defaultProps$Y,
|
|
5035
5131
|
...props
|
|
5036
5132
|
};
|
|
5037
5133
|
const [show, setShow] = useState(false);
|
|
@@ -5296,9 +5392,9 @@ const DatePicker = (props) => {
|
|
|
5296
5392
|
ref: pickerRef
|
|
5297
5393
|
}));
|
|
5298
5394
|
};
|
|
5299
|
-
DatePicker.defaultProps = defaultProps$
|
|
5395
|
+
DatePicker.defaultProps = defaultProps$Y;
|
|
5300
5396
|
DatePicker.displayName = "NutDatePicker";
|
|
5301
|
-
const defaultProps$
|
|
5397
|
+
const defaultProps$X = {
|
|
5302
5398
|
...ComponentDefaults,
|
|
5303
5399
|
disabled: false,
|
|
5304
5400
|
buttonSize: "",
|
|
@@ -5345,7 +5441,7 @@ const InputNumber = (props) => {
|
|
|
5345
5441
|
iconFontClassName,
|
|
5346
5442
|
...restProps
|
|
5347
5443
|
} = {
|
|
5348
|
-
...defaultProps$
|
|
5444
|
+
...defaultProps$X,
|
|
5349
5445
|
...props
|
|
5350
5446
|
};
|
|
5351
5447
|
const [inputValue, setInputValue] = useState(modelValue);
|
|
@@ -5481,7 +5577,7 @@ const InputNumber = (props) => {
|
|
|
5481
5577
|
onClick: addNumber
|
|
5482
5578
|
}));
|
|
5483
5579
|
};
|
|
5484
|
-
InputNumber.defaultProps = defaultProps$
|
|
5580
|
+
InputNumber.defaultProps = defaultProps$X;
|
|
5485
5581
|
InputNumber.displayName = "NutInputNumber";
|
|
5486
5582
|
function trimExtraChar(value, char, regExp) {
|
|
5487
5583
|
const index = value.indexOf(char);
|
|
@@ -5507,7 +5603,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
5507
5603
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
5508
5604
|
return value.replace(regExp, "");
|
|
5509
5605
|
}
|
|
5510
|
-
const defaultProps$
|
|
5606
|
+
const defaultProps$W = {
|
|
5511
5607
|
...ComponentDefaults,
|
|
5512
5608
|
type: "text",
|
|
5513
5609
|
name: "",
|
|
@@ -5604,7 +5700,7 @@ const Input = forwardRef((props, ref) => {
|
|
|
5604
5700
|
iconFontClassName,
|
|
5605
5701
|
...rest
|
|
5606
5702
|
} = {
|
|
5607
|
-
...defaultProps$
|
|
5703
|
+
...defaultProps$W,
|
|
5608
5704
|
...props
|
|
5609
5705
|
};
|
|
5610
5706
|
locale.placeholder = placeholder || locale.placeholder;
|
|
@@ -5835,14 +5931,14 @@ const Input = forwardRef((props, ref) => {
|
|
|
5835
5931
|
}
|
|
5836
5932
|
}, errorMessage) : null)));
|
|
5837
5933
|
});
|
|
5838
|
-
Input.defaultProps = defaultProps$
|
|
5934
|
+
Input.defaultProps = defaultProps$W;
|
|
5839
5935
|
Input.displayName = "NutInput";
|
|
5840
5936
|
const radioContext = {
|
|
5841
5937
|
onChange: (val) => {
|
|
5842
5938
|
}
|
|
5843
5939
|
};
|
|
5844
5940
|
var RadioContext = React__default.createContext(radioContext);
|
|
5845
|
-
const defaultProps$
|
|
5941
|
+
const defaultProps$V = {
|
|
5846
5942
|
value: null,
|
|
5847
5943
|
textPosition: "right",
|
|
5848
5944
|
onChange: (value) => {
|
|
@@ -5852,7 +5948,7 @@ const defaultProps$T = {
|
|
|
5852
5948
|
};
|
|
5853
5949
|
const RadioGroup = React__default.forwardRef(
|
|
5854
5950
|
(props, ref) => {
|
|
5855
|
-
const { children } = { ...defaultProps$
|
|
5951
|
+
const { children } = { ...defaultProps$V, ...props };
|
|
5856
5952
|
cn("RadioGroup");
|
|
5857
5953
|
const {
|
|
5858
5954
|
className,
|
|
@@ -5917,9 +6013,9 @@ const RadioGroup = React__default.forwardRef(
|
|
|
5917
6013
|
}, (options == null ? void 0 : options.length) ? renderOptionsChildren() : cloneChildren()));
|
|
5918
6014
|
}
|
|
5919
6015
|
);
|
|
5920
|
-
RadioGroup.defaultProps = defaultProps$
|
|
6016
|
+
RadioGroup.defaultProps = defaultProps$V;
|
|
5921
6017
|
RadioGroup.displayName = "NutRadioGroup";
|
|
5922
|
-
const defaultProps$
|
|
6018
|
+
const defaultProps$U = {
|
|
5923
6019
|
...ComponentDefaults,
|
|
5924
6020
|
disabled: false,
|
|
5925
6021
|
checked: false,
|
|
@@ -5934,7 +6030,7 @@ const defaultProps$S = {
|
|
|
5934
6030
|
};
|
|
5935
6031
|
const Radio$1 = (props) => {
|
|
5936
6032
|
const { children } = {
|
|
5937
|
-
...defaultProps$
|
|
6033
|
+
...defaultProps$U,
|
|
5938
6034
|
...props
|
|
5939
6035
|
};
|
|
5940
6036
|
const {
|
|
@@ -6014,11 +6110,11 @@ const Radio$1 = (props) => {
|
|
|
6014
6110
|
...rest
|
|
6015
6111
|
}, renderRadioItem());
|
|
6016
6112
|
};
|
|
6017
|
-
Radio$1.defaultProps = defaultProps$
|
|
6113
|
+
Radio$1.defaultProps = defaultProps$U;
|
|
6018
6114
|
Radio$1.displayName = "NutRadio";
|
|
6019
6115
|
Radio$1.RadioGroup = RadioGroup;
|
|
6020
6116
|
var Radio = Radio$1;
|
|
6021
|
-
const defaultProps$
|
|
6117
|
+
const defaultProps$T = {
|
|
6022
6118
|
...ComponentDefaults,
|
|
6023
6119
|
count: 5,
|
|
6024
6120
|
modelValue: 0,
|
|
@@ -6053,7 +6149,7 @@ const Rate = (props) => {
|
|
|
6053
6149
|
iconClassPrefix,
|
|
6054
6150
|
iconFontClassName
|
|
6055
6151
|
} = {
|
|
6056
|
-
...defaultProps$
|
|
6152
|
+
...defaultProps$T,
|
|
6057
6153
|
...props
|
|
6058
6154
|
};
|
|
6059
6155
|
const b2 = cn("rate");
|
|
@@ -6120,9 +6216,9 @@ const Rate = (props) => {
|
|
|
6120
6216
|
}));
|
|
6121
6217
|
}));
|
|
6122
6218
|
};
|
|
6123
|
-
Rate.defaultProps = defaultProps$
|
|
6219
|
+
Rate.defaultProps = defaultProps$T;
|
|
6124
6220
|
Rate.displayName = "NutRate";
|
|
6125
|
-
const defaultProps$
|
|
6221
|
+
const defaultProps$S = {
|
|
6126
6222
|
...ComponentDefaults,
|
|
6127
6223
|
title: "",
|
|
6128
6224
|
desc: "",
|
|
@@ -6290,9 +6386,9 @@ const ShortPassword = (props) => {
|
|
|
6290
6386
|
onClick: () => sure()
|
|
6291
6387
|
}, locale.confirm)) : null)));
|
|
6292
6388
|
};
|
|
6293
|
-
ShortPassword.defaultProps = defaultProps$
|
|
6389
|
+
ShortPassword.defaultProps = defaultProps$S;
|
|
6294
6390
|
ShortPassword.displayName = "NutShortPassword";
|
|
6295
|
-
const defaultProps$
|
|
6391
|
+
const defaultProps$R = {
|
|
6296
6392
|
defaultValue: "",
|
|
6297
6393
|
textAlign: "left",
|
|
6298
6394
|
limitshow: false,
|
|
@@ -6320,7 +6416,7 @@ const TextArea = (props) => {
|
|
|
6320
6416
|
onChange,
|
|
6321
6417
|
onBlur,
|
|
6322
6418
|
onFocus
|
|
6323
|
-
} = { ...defaultProps$
|
|
6419
|
+
} = { ...defaultProps$R, ...props };
|
|
6324
6420
|
const textareaBem = cn("textarea");
|
|
6325
6421
|
const [inputValue, SetInputValue] = useState("");
|
|
6326
6422
|
useEffect(() => {
|
|
@@ -6385,9 +6481,9 @@ const TextArea = (props) => {
|
|
|
6385
6481
|
className: textareaBem("limit")
|
|
6386
6482
|
}, [...inputValue].length, "/", maxlength < 0 ? 0 : maxlength) : null);
|
|
6387
6483
|
};
|
|
6388
|
-
TextArea.defaultProps = defaultProps$
|
|
6484
|
+
TextArea.defaultProps = defaultProps$R;
|
|
6389
6485
|
TextArea.displayName = "NutTextArea";
|
|
6390
|
-
const defaultProps$
|
|
6486
|
+
const defaultProps$Q = {
|
|
6391
6487
|
...ComponentDefaults,
|
|
6392
6488
|
className: "",
|
|
6393
6489
|
style: {},
|
|
@@ -6435,7 +6531,7 @@ const Progress = (props) => {
|
|
|
6435
6531
|
iconFontClassName,
|
|
6436
6532
|
...rest
|
|
6437
6533
|
} = {
|
|
6438
|
-
...defaultProps$
|
|
6534
|
+
...defaultProps$Q,
|
|
6439
6535
|
...props
|
|
6440
6536
|
};
|
|
6441
6537
|
const b2 = cn("progress");
|
|
@@ -6513,7 +6609,7 @@ const Progress = (props) => {
|
|
|
6513
6609
|
color: iconColor
|
|
6514
6610
|
})));
|
|
6515
6611
|
};
|
|
6516
|
-
Progress.defaultProps = defaultProps$
|
|
6612
|
+
Progress.defaultProps = defaultProps$Q;
|
|
6517
6613
|
Progress.displayName = "NutProgress";
|
|
6518
6614
|
class UploadOptions {
|
|
6519
6615
|
constructor() {
|
|
@@ -6611,7 +6707,7 @@ class Upload {
|
|
|
6611
6707
|
}
|
|
6612
6708
|
}
|
|
6613
6709
|
}
|
|
6614
|
-
const defaultProps$
|
|
6710
|
+
const defaultProps$P = {
|
|
6615
6711
|
...ComponentDefaults,
|
|
6616
6712
|
url: "",
|
|
6617
6713
|
maximum: 9,
|
|
@@ -6683,7 +6779,7 @@ const InternalUploader = (props, ref) => {
|
|
|
6683
6779
|
onBeforeXhrUpload,
|
|
6684
6780
|
onBeforeDelete,
|
|
6685
6781
|
...restProps
|
|
6686
|
-
} = { ...defaultProps$
|
|
6782
|
+
} = { ...defaultProps$P, ...props };
|
|
6687
6783
|
const [fileList, setFileList] = useState([]);
|
|
6688
6784
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
6689
6785
|
useEffect(() => {
|
|
@@ -6971,9 +7067,9 @@ const InternalUploader = (props, ref) => {
|
|
|
6971
7067
|
})));
|
|
6972
7068
|
};
|
|
6973
7069
|
const Uploader = React__default.forwardRef(InternalUploader);
|
|
6974
|
-
Uploader.defaultProps = defaultProps$
|
|
7070
|
+
Uploader.defaultProps = defaultProps$P;
|
|
6975
7071
|
Uploader.displayName = "NutUploader";
|
|
6976
|
-
const defaultProps$
|
|
7072
|
+
const defaultProps$O = {
|
|
6977
7073
|
data: {
|
|
6978
7074
|
text: "",
|
|
6979
7075
|
value: "",
|
|
@@ -6982,13 +7078,14 @@ const defaultProps$M = {
|
|
|
6982
7078
|
loading: false,
|
|
6983
7079
|
children: []
|
|
6984
7080
|
},
|
|
7081
|
+
activeColor: "#fa2c19",
|
|
6985
7082
|
checked: false,
|
|
6986
7083
|
chooseItem: () => {
|
|
6987
7084
|
}
|
|
6988
7085
|
};
|
|
6989
7086
|
const InternalCascaderItem = (props) => {
|
|
6990
|
-
const { data, checked, chooseItem } = {
|
|
6991
|
-
...defaultProps$
|
|
7087
|
+
const { data, checked, chooseItem, activeColor } = {
|
|
7088
|
+
...defaultProps$O,
|
|
6992
7089
|
...props
|
|
6993
7090
|
};
|
|
6994
7091
|
const b2 = cn("cascader-item");
|
|
@@ -7008,6 +7105,7 @@ const InternalCascaderItem = (props) => {
|
|
|
7008
7105
|
const initData = () => {
|
|
7009
7106
|
};
|
|
7010
7107
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
7108
|
+
style: { color: checked ? activeColor : "" },
|
|
7011
7109
|
className: classes,
|
|
7012
7110
|
onClick: () => {
|
|
7013
7111
|
chooseItem(data);
|
|
@@ -7024,7 +7122,7 @@ const InternalCascaderItem = (props) => {
|
|
|
7024
7122
|
}));
|
|
7025
7123
|
};
|
|
7026
7124
|
const CascaderItem = React__default.forwardRef(InternalCascaderItem);
|
|
7027
|
-
CascaderItem.defaultProps = defaultProps$
|
|
7125
|
+
CascaderItem.defaultProps = defaultProps$O;
|
|
7028
7126
|
CascaderItem.displayName = "NutCascaderItem";
|
|
7029
7127
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
7030
7128
|
const {
|
|
@@ -7158,9 +7256,11 @@ class Tree {
|
|
|
7158
7256
|
return pathNodes;
|
|
7159
7257
|
}
|
|
7160
7258
|
}
|
|
7161
|
-
const defaultProps$
|
|
7259
|
+
const defaultProps$N = {
|
|
7162
7260
|
className: "",
|
|
7163
7261
|
style: {},
|
|
7262
|
+
activeColor: "#fa2c19",
|
|
7263
|
+
tabsColor: "",
|
|
7164
7264
|
poppable: true,
|
|
7165
7265
|
visible: false,
|
|
7166
7266
|
options: [],
|
|
@@ -7188,6 +7288,7 @@ const InternalCascader = (props) => {
|
|
|
7188
7288
|
const {
|
|
7189
7289
|
className,
|
|
7190
7290
|
style,
|
|
7291
|
+
tabsColor,
|
|
7191
7292
|
poppable,
|
|
7192
7293
|
visible,
|
|
7193
7294
|
options,
|
|
@@ -7205,7 +7306,7 @@ const InternalCascader = (props) => {
|
|
|
7205
7306
|
onClose,
|
|
7206
7307
|
onChange,
|
|
7207
7308
|
onPathChange
|
|
7208
|
-
} = { ...defaultProps$
|
|
7309
|
+
} = { ...defaultProps$N, ...props };
|
|
7209
7310
|
const [tabvalue, setTabvalue] = useState("c1");
|
|
7210
7311
|
const [optiosData, setOptiosData] = useState([]);
|
|
7211
7312
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
|
|
@@ -7429,7 +7530,8 @@ const InternalCascader = (props) => {
|
|
|
7429
7530
|
}, /* @__PURE__ */ React__default.createElement("span", {
|
|
7430
7531
|
className: "nut-tabs__titles-item__text"
|
|
7431
7532
|
}, !state.initLoading && state.panes.length && ((_a = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _a.text), !state.initLoading && state.panes.length && !((_b = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _b.text) && "\u8BF7\u9009\u62E9", !(!state.initLoading && state.panes.length) && "Loading..."), /* @__PURE__ */ React__default.createElement("span", {
|
|
7432
|
-
className: "nut-tabs__titles-item__line"
|
|
7533
|
+
className: "nut-tabs__titles-item__line",
|
|
7534
|
+
style: { background: tabsColor }
|
|
7433
7535
|
}));
|
|
7434
7536
|
});
|
|
7435
7537
|
}
|
|
@@ -7464,9 +7566,9 @@ const InternalCascader = (props) => {
|
|
|
7464
7566
|
}, renderItem()) : renderItem());
|
|
7465
7567
|
};
|
|
7466
7568
|
const Cascader = React__default.forwardRef(InternalCascader);
|
|
7467
|
-
Cascader.defaultProps = defaultProps$
|
|
7569
|
+
Cascader.defaultProps = defaultProps$N;
|
|
7468
7570
|
Cascader.displayName = "NutCascader";
|
|
7469
|
-
const defaultProps$
|
|
7571
|
+
const defaultProps$M = {
|
|
7470
7572
|
...ComponentDefaults,
|
|
7471
7573
|
placeholder: "",
|
|
7472
7574
|
shape: "square",
|
|
@@ -7517,7 +7619,7 @@ const SearchBar = (props) => {
|
|
|
7517
7619
|
iconClassPrefix,
|
|
7518
7620
|
iconFontClassName
|
|
7519
7621
|
} = {
|
|
7520
|
-
...defaultProps$
|
|
7622
|
+
...defaultProps$M,
|
|
7521
7623
|
...props
|
|
7522
7624
|
};
|
|
7523
7625
|
const alignClass = `${align}`;
|
|
@@ -7671,9 +7773,9 @@ const SearchBar = (props) => {
|
|
|
7671
7773
|
className: "nut-searchbar__input-box"
|
|
7672
7774
|
}, renderField()), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
|
|
7673
7775
|
};
|
|
7674
|
-
SearchBar.defaultProps = defaultProps$
|
|
7776
|
+
SearchBar.defaultProps = defaultProps$M;
|
|
7675
7777
|
SearchBar.displayName = "NutSearchBar";
|
|
7676
|
-
const defaultProps$
|
|
7778
|
+
const defaultProps$L = {
|
|
7677
7779
|
confirmText: "",
|
|
7678
7780
|
title: "",
|
|
7679
7781
|
visible: false,
|
|
@@ -7871,17 +7973,17 @@ const NumberKeyboard = (props) => {
|
|
|
7871
7973
|
})
|
|
7872
7974
|
}, confirmText || locale.done))) : null))));
|
|
7873
7975
|
};
|
|
7874
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
7976
|
+
NumberKeyboard.defaultProps = defaultProps$L;
|
|
7875
7977
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
7876
|
-
const defaultProps$
|
|
7978
|
+
const defaultProps$K = {};
|
|
7877
7979
|
const Form = (props) => {
|
|
7878
7980
|
useConfig();
|
|
7879
|
-
({ ...defaultProps$
|
|
7981
|
+
({ ...defaultProps$K, ...props });
|
|
7880
7982
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
7881
7983
|
className: "nut-form"
|
|
7882
7984
|
}, "Form");
|
|
7883
7985
|
};
|
|
7884
|
-
Form.defaultProps = defaultProps$
|
|
7986
|
+
Form.defaultProps = defaultProps$K;
|
|
7885
7987
|
Form.displayName = "NutForm";
|
|
7886
7988
|
const FormItemContext = createContext$1({});
|
|
7887
7989
|
function isAbsolute(pathname) {
|
|
@@ -9013,7 +9115,7 @@ var useContext = React__default.useContext;
|
|
|
9013
9115
|
function useHistory() {
|
|
9014
9116
|
return useContext(historyContext);
|
|
9015
9117
|
}
|
|
9016
|
-
const defaultProps$
|
|
9118
|
+
const defaultProps$J = {
|
|
9017
9119
|
...ComponentDefaults,
|
|
9018
9120
|
title: null,
|
|
9019
9121
|
subTitle: null,
|
|
@@ -9059,7 +9161,7 @@ const Cell = (props) => {
|
|
|
9059
9161
|
iconFontClassName,
|
|
9060
9162
|
...rest
|
|
9061
9163
|
} = {
|
|
9062
|
-
...defaultProps$
|
|
9164
|
+
...defaultProps$J,
|
|
9063
9165
|
...props
|
|
9064
9166
|
};
|
|
9065
9167
|
const b2 = cn("cell");
|
|
@@ -9113,9 +9215,9 @@ const Cell = (props) => {
|
|
|
9113
9215
|
className: b2("link")
|
|
9114
9216
|
}) : linkSlot));
|
|
9115
9217
|
};
|
|
9116
|
-
Cell.defaultProps = defaultProps$
|
|
9218
|
+
Cell.defaultProps = defaultProps$J;
|
|
9117
9219
|
Cell.displayName = "NutCell";
|
|
9118
|
-
const defaultProps$
|
|
9220
|
+
const defaultProps$I = {
|
|
9119
9221
|
...ComponentDefaults,
|
|
9120
9222
|
name: "",
|
|
9121
9223
|
label: "",
|
|
@@ -9162,7 +9264,7 @@ class FormItem extends React__default.Component {
|
|
|
9162
9264
|
showErrorLine,
|
|
9163
9265
|
showErrorMessage
|
|
9164
9266
|
} = {
|
|
9165
|
-
...defaultProps$
|
|
9267
|
+
...defaultProps$I,
|
|
9166
9268
|
...this.props
|
|
9167
9269
|
};
|
|
9168
9270
|
const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
@@ -9211,9 +9313,9 @@ class FormItem extends React__default.Component {
|
|
|
9211
9313
|
return this.renderLayout(returnChildNode);
|
|
9212
9314
|
}
|
|
9213
9315
|
}
|
|
9214
|
-
FormItem.defaultProps = defaultProps$
|
|
9316
|
+
FormItem.defaultProps = defaultProps$I;
|
|
9215
9317
|
FormItem.contextType = FormItemContext;
|
|
9216
|
-
const defaultProps$
|
|
9318
|
+
const defaultProps$H = {
|
|
9217
9319
|
cancelTxt: "",
|
|
9218
9320
|
optionTag: "name",
|
|
9219
9321
|
optionSubTag: "subname",
|
|
@@ -9247,7 +9349,7 @@ const ActionSheet = (props) => {
|
|
|
9247
9349
|
className,
|
|
9248
9350
|
style,
|
|
9249
9351
|
...rest
|
|
9250
|
-
} = { ...defaultProps$
|
|
9352
|
+
} = { ...defaultProps$H, ...props };
|
|
9251
9353
|
const b2 = cn("actionsheet");
|
|
9252
9354
|
const isHighlight = (item) => {
|
|
9253
9355
|
return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "#1a1a1a";
|
|
@@ -9291,9 +9393,9 @@ const ActionSheet = (props) => {
|
|
|
9291
9393
|
onClick: () => cancelActionSheet()
|
|
9292
9394
|
}, cancelTxt)));
|
|
9293
9395
|
};
|
|
9294
|
-
ActionSheet.defaultProps = defaultProps$
|
|
9396
|
+
ActionSheet.defaultProps = defaultProps$H;
|
|
9295
9397
|
ActionSheet.displayName = "NutActionSheet";
|
|
9296
|
-
const defaultProps$
|
|
9398
|
+
const defaultProps$G = {
|
|
9297
9399
|
...ComponentDefaults,
|
|
9298
9400
|
bottom: 20,
|
|
9299
9401
|
right: 10,
|
|
@@ -9319,7 +9421,7 @@ const BackTop = (props) => {
|
|
|
9319
9421
|
iconClassPrefix,
|
|
9320
9422
|
iconFontClassName
|
|
9321
9423
|
} = {
|
|
9322
|
-
...defaultProps$
|
|
9424
|
+
...defaultProps$G,
|
|
9323
9425
|
...props
|
|
9324
9426
|
};
|
|
9325
9427
|
const [backTop, SetBackTop] = useState(false);
|
|
@@ -9353,9 +9455,9 @@ const BackTop = (props) => {
|
|
|
9353
9455
|
name: "top"
|
|
9354
9456
|
})));
|
|
9355
9457
|
};
|
|
9356
|
-
BackTop.defaultProps = defaultProps$
|
|
9458
|
+
BackTop.defaultProps = defaultProps$G;
|
|
9357
9459
|
BackTop.displayName = "NutBackTop";
|
|
9358
|
-
const defaultProps$
|
|
9460
|
+
const defaultProps$F = {
|
|
9359
9461
|
attract: false,
|
|
9360
9462
|
direction: void 0,
|
|
9361
9463
|
boundary: {
|
|
@@ -9368,7 +9470,7 @@ const defaultProps$D = {
|
|
|
9368
9470
|
};
|
|
9369
9471
|
const Drag = (props) => {
|
|
9370
9472
|
const { attract, direction, boundary, children, className, style, ...reset } = {
|
|
9371
|
-
...defaultProps$
|
|
9473
|
+
...defaultProps$F,
|
|
9372
9474
|
...props
|
|
9373
9475
|
};
|
|
9374
9476
|
const b2 = cn("drag");
|
|
@@ -9460,7 +9562,7 @@ const Drag = (props) => {
|
|
|
9460
9562
|
style: currstyle
|
|
9461
9563
|
}, children));
|
|
9462
9564
|
};
|
|
9463
|
-
Drag.defaultProps = defaultProps$
|
|
9565
|
+
Drag.defaultProps = defaultProps$F;
|
|
9464
9566
|
Drag.displayName = "NutDrag";
|
|
9465
9567
|
const Content = (props) => {
|
|
9466
9568
|
const {
|
|
@@ -9559,7 +9661,7 @@ const DialogWrapper = (props) => {
|
|
|
9559
9661
|
}));
|
|
9560
9662
|
};
|
|
9561
9663
|
DialogWrapper.displayName = "NutDialogWrapper";
|
|
9562
|
-
const defaultProps$
|
|
9664
|
+
const defaultProps$E = {
|
|
9563
9665
|
okText: "",
|
|
9564
9666
|
cancelText: "",
|
|
9565
9667
|
mask: true,
|
|
@@ -9638,9 +9740,9 @@ const BaseDialog = (props, ref) => {
|
|
|
9638
9740
|
});
|
|
9639
9741
|
};
|
|
9640
9742
|
const Dialog = forwardRef(BaseDialog);
|
|
9641
|
-
Dialog.defaultProps = defaultProps$
|
|
9743
|
+
Dialog.defaultProps = defaultProps$E;
|
|
9642
9744
|
Dialog.displayName = "NutDialog";
|
|
9643
|
-
const defaultProps$
|
|
9745
|
+
const defaultProps$D = {
|
|
9644
9746
|
...ComponentDefaults,
|
|
9645
9747
|
hasMore: true,
|
|
9646
9748
|
upperThreshold: 40,
|
|
@@ -9672,7 +9774,7 @@ const Infiniteloading = (props) => {
|
|
|
9672
9774
|
iconClassPrefix,
|
|
9673
9775
|
iconFontClassName
|
|
9674
9776
|
} = {
|
|
9675
|
-
...defaultProps$
|
|
9777
|
+
...defaultProps$D,
|
|
9676
9778
|
...props
|
|
9677
9779
|
};
|
|
9678
9780
|
const [isInfiniting, setIsInfiniting] = useState(false);
|
|
@@ -9808,9 +9910,9 @@ const Infiniteloading = (props) => {
|
|
|
9808
9910
|
className: "tips"
|
|
9809
9911
|
}, loadMoreTxt || locale.infiniteloading.loadMoreText)));
|
|
9810
9912
|
};
|
|
9811
|
-
Infiniteloading.defaultProps = defaultProps$
|
|
9913
|
+
Infiniteloading.defaultProps = defaultProps$D;
|
|
9812
9914
|
Infiniteloading.displayName = "NutInfiniteloading";
|
|
9813
|
-
const defaultProps$
|
|
9915
|
+
const defaultProps$C = {
|
|
9814
9916
|
id: "",
|
|
9815
9917
|
msg: "",
|
|
9816
9918
|
color: "",
|
|
@@ -9843,7 +9945,7 @@ const Notify = (props) => {
|
|
|
9843
9945
|
onClosed,
|
|
9844
9946
|
onClick,
|
|
9845
9947
|
...rest
|
|
9846
|
-
} = { ...defaultProps$
|
|
9948
|
+
} = { ...defaultProps$C, ...props };
|
|
9847
9949
|
let timer;
|
|
9848
9950
|
const [showNotify, SetShow] = useState(false);
|
|
9849
9951
|
useEffect(() => {
|
|
@@ -9904,9 +10006,9 @@ const Notify = (props) => {
|
|
|
9904
10006
|
onClick: clickHandle
|
|
9905
10007
|
}, children || msg)));
|
|
9906
10008
|
};
|
|
9907
|
-
Notify.defaultProps = defaultProps$
|
|
10009
|
+
Notify.defaultProps = defaultProps$C;
|
|
9908
10010
|
Notify.displayName = "NutNotify";
|
|
9909
|
-
const defaultProps$
|
|
10011
|
+
const defaultProps$B = {
|
|
9910
10012
|
isAsync: false,
|
|
9911
10013
|
checked: false,
|
|
9912
10014
|
disable: false,
|
|
@@ -9929,7 +10031,7 @@ const Switch = (props) => {
|
|
|
9929
10031
|
className,
|
|
9930
10032
|
style
|
|
9931
10033
|
} = {
|
|
9932
|
-
...defaultProps$
|
|
10034
|
+
...defaultProps$B,
|
|
9933
10035
|
...props
|
|
9934
10036
|
};
|
|
9935
10037
|
const [value, setValue] = useState(false);
|
|
@@ -9969,7 +10071,7 @@ const Switch = (props) => {
|
|
|
9969
10071
|
className: `${b2("label")} close`
|
|
9970
10072
|
}, inactiveText))));
|
|
9971
10073
|
};
|
|
9972
|
-
Switch.defaultProps = defaultProps$
|
|
10074
|
+
Switch.defaultProps = defaultProps$B;
|
|
9973
10075
|
Switch.displayName = "NutSwitch";
|
|
9974
10076
|
function preventDefault(event, isStopPropagation) {
|
|
9975
10077
|
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
@@ -9979,7 +10081,7 @@ function preventDefault(event, isStopPropagation) {
|
|
|
9979
10081
|
event.stopPropagation();
|
|
9980
10082
|
}
|
|
9981
10083
|
}
|
|
9982
|
-
const defaultProps$
|
|
10084
|
+
const defaultProps$A = {
|
|
9983
10085
|
name: "",
|
|
9984
10086
|
leftWidth: 0,
|
|
9985
10087
|
rightWidth: 0
|
|
@@ -9987,7 +10089,7 @@ const defaultProps$y = {
|
|
|
9987
10089
|
const Swipe = forwardRef((props, instanceRef) => {
|
|
9988
10090
|
const swipeBem = cn("swipe");
|
|
9989
10091
|
const touch = useTouch();
|
|
9990
|
-
const { children, className, style } = { ...defaultProps$
|
|
10092
|
+
const { children, className, style } = { ...defaultProps$A, ...props };
|
|
9991
10093
|
const root = useRef();
|
|
9992
10094
|
const opened = useRef(false);
|
|
9993
10095
|
const lockClick = useRef(false);
|
|
@@ -10140,7 +10242,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
10140
10242
|
style: wrapperStyle
|
|
10141
10243
|
}, renderActionContent("left"), children, renderActionContent("right")));
|
|
10142
10244
|
});
|
|
10143
|
-
Swipe.defaultProps = defaultProps$
|
|
10245
|
+
Swipe.defaultProps = defaultProps$A;
|
|
10144
10246
|
Swipe.displayName = "NutSwipe";
|
|
10145
10247
|
function clamp(v2, min, max) {
|
|
10146
10248
|
return Math.max(min, Math.min(v2, max));
|
|
@@ -14667,7 +14769,7 @@ if (canUseDom) {
|
|
|
14667
14769
|
console.log(e2);
|
|
14668
14770
|
}
|
|
14669
14771
|
}
|
|
14670
|
-
const defaultProps$
|
|
14772
|
+
const defaultProps$z = {
|
|
14671
14773
|
pullingText: "",
|
|
14672
14774
|
canReleaseText: "",
|
|
14673
14775
|
refreshingText: "",
|
|
@@ -14682,7 +14784,7 @@ const defaultProps$x = {
|
|
|
14682
14784
|
const PullToRefresh = (p2) => {
|
|
14683
14785
|
const { locale } = useConfig$1();
|
|
14684
14786
|
const props = {
|
|
14685
|
-
...defaultProps$
|
|
14787
|
+
...defaultProps$z,
|
|
14686
14788
|
...p2,
|
|
14687
14789
|
...{
|
|
14688
14790
|
pullingText: p2.pullingText || locale.pullToRefresh.pullingText,
|
|
@@ -14820,10 +14922,10 @@ const PullToRefresh = (p2) => {
|
|
|
14820
14922
|
className: "nut-pulltorefresh-content"
|
|
14821
14923
|
}, props.children));
|
|
14822
14924
|
};
|
|
14823
|
-
PullToRefresh.defaultProps = defaultProps$
|
|
14925
|
+
PullToRefresh.defaultProps = defaultProps$z;
|
|
14824
14926
|
PullToRefresh.displayName = "NutPullToRefresh";
|
|
14825
14927
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
14826
|
-
const defaultProps$
|
|
14928
|
+
const defaultProps$y = {
|
|
14827
14929
|
strokeWidth: 5,
|
|
14828
14930
|
radius: 50,
|
|
14829
14931
|
strokeLinecap: "round",
|
|
@@ -14845,7 +14947,7 @@ const CircleProgress = (props) => {
|
|
|
14845
14947
|
strokeLinecap,
|
|
14846
14948
|
...restProps
|
|
14847
14949
|
} = {
|
|
14848
|
-
...defaultProps$
|
|
14950
|
+
...defaultProps$y,
|
|
14849
14951
|
...props
|
|
14850
14952
|
};
|
|
14851
14953
|
const [oldValue, setOldValue] = useState(progress);
|
|
@@ -14956,9 +15058,9 @@ const CircleProgress = (props) => {
|
|
|
14956
15058
|
className: "nut-circleprogress-text"
|
|
14957
15059
|
}, children || /* @__PURE__ */ React__default.createElement("div", null, progress, "%")));
|
|
14958
15060
|
};
|
|
14959
|
-
CircleProgress.defaultProps = defaultProps$
|
|
15061
|
+
CircleProgress.defaultProps = defaultProps$y;
|
|
14960
15062
|
CircleProgress.displayName = "NutCircleProgress";
|
|
14961
|
-
const defaultProps$
|
|
15063
|
+
const defaultProps$x = {
|
|
14962
15064
|
...ComponentDefaults,
|
|
14963
15065
|
direction: "across",
|
|
14964
15066
|
list: [],
|
|
@@ -15002,7 +15104,7 @@ const NoticeBar = (props) => {
|
|
|
15002
15104
|
iconClassPrefix,
|
|
15003
15105
|
iconFontClassName
|
|
15004
15106
|
} = {
|
|
15005
|
-
...defaultProps$
|
|
15107
|
+
...defaultProps$x,
|
|
15006
15108
|
...props
|
|
15007
15109
|
};
|
|
15008
15110
|
const wrap = useRef(null);
|
|
@@ -15251,16 +15353,16 @@ const NoticeBar = (props) => {
|
|
|
15251
15353
|
size: "11px"
|
|
15252
15354
|
}) : null))) : null);
|
|
15253
15355
|
};
|
|
15254
|
-
NoticeBar.defaultProps = defaultProps$
|
|
15356
|
+
NoticeBar.defaultProps = defaultProps$x;
|
|
15255
15357
|
NoticeBar.displayName = "NutNoticeBar";
|
|
15256
15358
|
const DataContext$1 = createContext$1({});
|
|
15257
|
-
const defaultProps$
|
|
15359
|
+
const defaultProps$w = {
|
|
15258
15360
|
current: 0,
|
|
15259
15361
|
direction: "horizontal",
|
|
15260
15362
|
progressDot: false
|
|
15261
15363
|
};
|
|
15262
15364
|
const Steps = (props) => {
|
|
15263
|
-
const propSteps = { ...defaultProps$
|
|
15365
|
+
const propSteps = { ...defaultProps$w, ...props };
|
|
15264
15366
|
const {
|
|
15265
15367
|
children,
|
|
15266
15368
|
current,
|
|
@@ -15294,9 +15396,9 @@ const Steps = (props) => {
|
|
|
15294
15396
|
children
|
|
15295
15397
|
));
|
|
15296
15398
|
};
|
|
15297
|
-
Steps.defaultProps = defaultProps$
|
|
15399
|
+
Steps.defaultProps = defaultProps$w;
|
|
15298
15400
|
Steps.displayName = "NutSteps";
|
|
15299
|
-
const defaultProps$
|
|
15401
|
+
const defaultProps$v = {
|
|
15300
15402
|
...ComponentDefaults,
|
|
15301
15403
|
title: "",
|
|
15302
15404
|
content: "",
|
|
@@ -15320,7 +15422,7 @@ const Step = (props) => {
|
|
|
15320
15422
|
iconFontClassName,
|
|
15321
15423
|
...restProps
|
|
15322
15424
|
} = {
|
|
15323
|
-
...defaultProps$
|
|
15425
|
+
...defaultProps$v,
|
|
15324
15426
|
...props
|
|
15325
15427
|
};
|
|
15326
15428
|
const parent = useContext$1(DataContext$1);
|
|
@@ -15382,10 +15484,10 @@ const Step = (props) => {
|
|
|
15382
15484
|
className: "nut-step-content"
|
|
15383
15485
|
}, renderContent())));
|
|
15384
15486
|
};
|
|
15385
|
-
Step.defaultProps = defaultProps$
|
|
15487
|
+
Step.defaultProps = defaultProps$v;
|
|
15386
15488
|
Step.displayName = "NutStep";
|
|
15387
15489
|
const DataContext = createContext$1({});
|
|
15388
|
-
const defaultProps$
|
|
15490
|
+
const defaultProps$u = {
|
|
15389
15491
|
width: typeof window === "object" ? window.innerWidth : 375,
|
|
15390
15492
|
height: 0,
|
|
15391
15493
|
duration: 500,
|
|
@@ -15403,7 +15505,7 @@ const defaultProps$s = {
|
|
|
15403
15505
|
};
|
|
15404
15506
|
const DISTANCE = 5;
|
|
15405
15507
|
const Swiper = React__default.forwardRef((props, ref) => {
|
|
15406
|
-
const propSwiper = { ...defaultProps$
|
|
15508
|
+
const propSwiper = { ...defaultProps$u, ...props };
|
|
15407
15509
|
const {
|
|
15408
15510
|
children,
|
|
15409
15511
|
direction,
|
|
@@ -15824,13 +15926,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
15824
15926
|
});
|
|
15825
15927
|
})) : /* @__PURE__ */ React__default.createElement("div", null, pageContent)));
|
|
15826
15928
|
});
|
|
15827
|
-
Swiper.defaultProps = defaultProps$
|
|
15929
|
+
Swiper.defaultProps = defaultProps$u;
|
|
15828
15930
|
Swiper.displayName = "NutSwiper";
|
|
15829
|
-
const defaultProps$
|
|
15931
|
+
const defaultProps$t = {
|
|
15830
15932
|
direction: "horizontal"
|
|
15831
15933
|
};
|
|
15832
15934
|
const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
15833
|
-
const _props = { ...defaultProps$
|
|
15935
|
+
const _props = { ...defaultProps$t, ...props };
|
|
15834
15936
|
const { className, style, children, direction, size } = _props;
|
|
15835
15937
|
const parent = useContext$1(DataContext);
|
|
15836
15938
|
const b2 = cn("swiper-item");
|
|
@@ -15849,10 +15951,10 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
|
15849
15951
|
style: { ...style, ...getStyle() }
|
|
15850
15952
|
}, children);
|
|
15851
15953
|
});
|
|
15852
|
-
SwiperItem.defaultProps = defaultProps$
|
|
15954
|
+
SwiperItem.defaultProps = defaultProps$t;
|
|
15853
15955
|
SwiperItem.displayName = "NutSwiperItem";
|
|
15854
15956
|
const AvatarContext = createContext$1({});
|
|
15855
|
-
const defaultProps$
|
|
15957
|
+
const defaultProps$s = {
|
|
15856
15958
|
...ComponentDefaults,
|
|
15857
15959
|
size: "",
|
|
15858
15960
|
icon: "",
|
|
@@ -15883,7 +15985,7 @@ const Avatar = (props) => {
|
|
|
15883
15985
|
iconFontClassName,
|
|
15884
15986
|
...rest
|
|
15885
15987
|
} = {
|
|
15886
|
-
...defaultProps$
|
|
15988
|
+
...defaultProps$s,
|
|
15887
15989
|
...props
|
|
15888
15990
|
};
|
|
15889
15991
|
const [maxSum, setMaxSum] = useState(0);
|
|
@@ -15970,9 +16072,9 @@ const Avatar = (props) => {
|
|
|
15970
16072
|
className: "text"
|
|
15971
16073
|
}, ((_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent) ? (_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.maxContent : `+ ${avatarIndex - ((_o = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _o.maxCount)}`)));
|
|
15972
16074
|
};
|
|
15973
|
-
Avatar.defaultProps = defaultProps$
|
|
16075
|
+
Avatar.defaultProps = defaultProps$s;
|
|
15974
16076
|
Avatar.displayName = "NutAvatar";
|
|
15975
|
-
const defaultProps$
|
|
16077
|
+
const defaultProps$r = {
|
|
15976
16078
|
maxContent: "",
|
|
15977
16079
|
maxCount: "",
|
|
15978
16080
|
maxBgColor: "#eee",
|
|
@@ -15984,7 +16086,7 @@ const defaultProps$p = {
|
|
|
15984
16086
|
};
|
|
15985
16087
|
const AvatarGroup = (props) => {
|
|
15986
16088
|
useConfig();
|
|
15987
|
-
const propAvatarGroup = { ...defaultProps$
|
|
16089
|
+
const propAvatarGroup = { ...defaultProps$r, ...props };
|
|
15988
16090
|
const { className, style, children } = propAvatarGroup;
|
|
15989
16091
|
const avatarGroupRef = useRef(null);
|
|
15990
16092
|
const b2 = cn("avatar-group");
|
|
@@ -16001,9 +16103,9 @@ const AvatarGroup = (props) => {
|
|
|
16001
16103
|
ref: avatarGroupRef
|
|
16002
16104
|
}, children));
|
|
16003
16105
|
};
|
|
16004
|
-
AvatarGroup.defaultProps = defaultProps$
|
|
16106
|
+
AvatarGroup.defaultProps = defaultProps$r;
|
|
16005
16107
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
16006
|
-
const defaultProps$
|
|
16108
|
+
const defaultProps$q = {
|
|
16007
16109
|
price: 0,
|
|
16008
16110
|
needSymbol: true,
|
|
16009
16111
|
symbol: "¥",
|
|
@@ -16025,7 +16127,7 @@ const Price = (props) => {
|
|
|
16025
16127
|
className,
|
|
16026
16128
|
...rest
|
|
16027
16129
|
} = {
|
|
16028
|
-
...defaultProps$
|
|
16130
|
+
...defaultProps$q,
|
|
16029
16131
|
...props
|
|
16030
16132
|
};
|
|
16031
16133
|
const b2 = cn("price");
|
|
@@ -16090,9 +16192,9 @@ const Price = (props) => {
|
|
|
16090
16192
|
className: `${b2("decimal")} ${b2(`decimal-${size}`)}`
|
|
16091
16193
|
}, formatDecimal(price)), needSymbol && position === "after" ? renderSymbol() : null);
|
|
16092
16194
|
};
|
|
16093
|
-
Price.defaultProps = defaultProps$
|
|
16195
|
+
Price.defaultProps = defaultProps$q;
|
|
16094
16196
|
Price.displayName = "NutPrice";
|
|
16095
|
-
const defaultProps$
|
|
16197
|
+
const defaultProps$p = {
|
|
16096
16198
|
...ComponentDefaults,
|
|
16097
16199
|
value: "",
|
|
16098
16200
|
dot: false,
|
|
@@ -16117,7 +16219,7 @@ const Badge = (props) => {
|
|
|
16117
16219
|
iconClassPrefix,
|
|
16118
16220
|
iconFontClassName
|
|
16119
16221
|
} = {
|
|
16120
|
-
...defaultProps$
|
|
16222
|
+
...defaultProps$p,
|
|
16121
16223
|
...props
|
|
16122
16224
|
};
|
|
16123
16225
|
function content() {
|
|
@@ -16155,9 +16257,9 @@ const Badge = (props) => {
|
|
|
16155
16257
|
style: getStyle()
|
|
16156
16258
|
}, content()));
|
|
16157
16259
|
};
|
|
16158
|
-
Badge.defaultProps = defaultProps$
|
|
16260
|
+
Badge.defaultProps = defaultProps$p;
|
|
16159
16261
|
Badge.displayName = "NutBadge";
|
|
16160
|
-
const defaultProps$
|
|
16262
|
+
const defaultProps$o = {
|
|
16161
16263
|
...ComponentDefaults,
|
|
16162
16264
|
type: "default",
|
|
16163
16265
|
color: "",
|
|
@@ -16190,7 +16292,7 @@ const Tag = (props) => {
|
|
|
16190
16292
|
iconClassPrefix,
|
|
16191
16293
|
iconFontClassName
|
|
16192
16294
|
} = {
|
|
16193
|
-
...defaultProps$
|
|
16295
|
+
...defaultProps$o,
|
|
16194
16296
|
...props
|
|
16195
16297
|
};
|
|
16196
16298
|
const [btnName, setBtnName] = useState("");
|
|
@@ -16264,7 +16366,7 @@ const Tag = (props) => {
|
|
|
16264
16366
|
className: "text"
|
|
16265
16367
|
}, children)));
|
|
16266
16368
|
};
|
|
16267
|
-
Tag.defaultProps = defaultProps$
|
|
16369
|
+
Tag.defaultProps = defaultProps$o;
|
|
16268
16370
|
Tag.displayName = "NutTag";
|
|
16269
16371
|
function fillRef(ref, node) {
|
|
16270
16372
|
if (typeof ref === "function") {
|
|
@@ -16308,7 +16410,7 @@ class Trigger extends React__default.Component {
|
|
|
16308
16410
|
return trigger;
|
|
16309
16411
|
}
|
|
16310
16412
|
}
|
|
16311
|
-
const defaultProps$
|
|
16413
|
+
const defaultProps$n = {
|
|
16312
16414
|
...ComponentDefaults,
|
|
16313
16415
|
list: [],
|
|
16314
16416
|
theme: "light",
|
|
@@ -16337,7 +16439,7 @@ const Popover = (props) => {
|
|
|
16337
16439
|
iconFontClassName,
|
|
16338
16440
|
...reset
|
|
16339
16441
|
} = {
|
|
16340
|
-
...defaultProps$
|
|
16442
|
+
...defaultProps$n,
|
|
16341
16443
|
...props
|
|
16342
16444
|
};
|
|
16343
16445
|
const goodItem = useRef(null);
|
|
@@ -16432,9 +16534,9 @@ const Popover = (props) => {
|
|
|
16432
16534
|
style: { background: "transparent" }
|
|
16433
16535
|
}) : "");
|
|
16434
16536
|
};
|
|
16435
|
-
Popover.defaultProps = defaultProps$
|
|
16537
|
+
Popover.defaultProps = defaultProps$n;
|
|
16436
16538
|
Popover.displayName = "NutPopover";
|
|
16437
|
-
const defaultProps$
|
|
16539
|
+
const defaultProps$m = {
|
|
16438
16540
|
width: "100px",
|
|
16439
16541
|
height: "100px",
|
|
16440
16542
|
row: 1,
|
|
@@ -16462,7 +16564,7 @@ const Skeleton = (props) => {
|
|
|
16462
16564
|
avatarShape,
|
|
16463
16565
|
...restProps
|
|
16464
16566
|
} = {
|
|
16465
|
-
...defaultProps$
|
|
16567
|
+
...defaultProps$m,
|
|
16466
16568
|
...props
|
|
16467
16569
|
};
|
|
16468
16570
|
const b2 = cn("skeleton");
|
|
@@ -16517,9 +16619,9 @@ const Skeleton = (props) => {
|
|
|
16517
16619
|
});
|
|
16518
16620
|
})))));
|
|
16519
16621
|
};
|
|
16520
|
-
Skeleton.defaultProps = defaultProps$
|
|
16622
|
+
Skeleton.defaultProps = defaultProps$m;
|
|
16521
16623
|
Skeleton.displayName = "NutSkeleton";
|
|
16522
|
-
const defaultProps$
|
|
16624
|
+
const defaultProps$l = {
|
|
16523
16625
|
paused: false,
|
|
16524
16626
|
startTime: Date.now(),
|
|
16525
16627
|
endTime: Date.now(),
|
|
@@ -16546,7 +16648,7 @@ const InternalCountDown = (props, ref) => {
|
|
|
16546
16648
|
onUpdate,
|
|
16547
16649
|
children,
|
|
16548
16650
|
...rest
|
|
16549
|
-
} = { ...defaultProps$
|
|
16651
|
+
} = { ...defaultProps$l, ...props };
|
|
16550
16652
|
const b2 = cn("countdown");
|
|
16551
16653
|
const [restTimeStamp, setRestTime] = useState(0);
|
|
16552
16654
|
const stateRef = useRef({
|
|
@@ -16742,9 +16844,9 @@ const InternalCountDown = (props, ref) => {
|
|
|
16742
16844
|
}));
|
|
16743
16845
|
};
|
|
16744
16846
|
const CountDown = React__default.forwardRef(InternalCountDown);
|
|
16745
|
-
CountDown.defaultProps = defaultProps$
|
|
16847
|
+
CountDown.defaultProps = defaultProps$l;
|
|
16746
16848
|
CountDown.displayName = "NutCountDown";
|
|
16747
|
-
const defaultProps$
|
|
16849
|
+
const defaultProps$k = {
|
|
16748
16850
|
activeName: ["0"],
|
|
16749
16851
|
accordion: false,
|
|
16750
16852
|
icon: "",
|
|
@@ -16769,7 +16871,7 @@ const Collapse = memo(
|
|
|
16769
16871
|
iconColor,
|
|
16770
16872
|
onChange
|
|
16771
16873
|
} = {
|
|
16772
|
-
...defaultProps$
|
|
16874
|
+
...defaultProps$k,
|
|
16773
16875
|
...props
|
|
16774
16876
|
};
|
|
16775
16877
|
const childrenDom = React__default.Children.toArray(children);
|
|
@@ -16827,9 +16929,9 @@ const Collapse = memo(
|
|
|
16827
16929
|
},
|
|
16828
16930
|
areEqual
|
|
16829
16931
|
);
|
|
16830
|
-
Collapse.defaultProps = defaultProps$
|
|
16932
|
+
Collapse.defaultProps = defaultProps$k;
|
|
16831
16933
|
Collapse.displayName = "NutCollapse";
|
|
16832
|
-
const defaultProps$
|
|
16934
|
+
const defaultProps$j = {
|
|
16833
16935
|
...ComponentDefaults,
|
|
16834
16936
|
title: "",
|
|
16835
16937
|
name: "",
|
|
@@ -16868,7 +16970,7 @@ const CollapseItem = (props) => {
|
|
|
16868
16970
|
iconFontClassName,
|
|
16869
16971
|
...rest
|
|
16870
16972
|
} = {
|
|
16871
|
-
...defaultProps$
|
|
16973
|
+
...defaultProps$j,
|
|
16872
16974
|
...props
|
|
16873
16975
|
};
|
|
16874
16976
|
const [domHeight, setDomHeight] = useState(-1);
|
|
@@ -16948,9 +17050,9 @@ const CollapseItem = (props) => {
|
|
|
16948
17050
|
className: colBem("content-text")
|
|
16949
17051
|
}, children)));
|
|
16950
17052
|
};
|
|
16951
|
-
CollapseItem.defaultProps = defaultProps$
|
|
17053
|
+
CollapseItem.defaultProps = defaultProps$j;
|
|
16952
17054
|
CollapseItem.displayName = "NutCollapseItem";
|
|
16953
|
-
const defaultProps$
|
|
17055
|
+
const defaultProps$i = {
|
|
16954
17056
|
maxLen: 0,
|
|
16955
17057
|
endNumber: "",
|
|
16956
17058
|
delaySpeed: 300,
|
|
@@ -16968,7 +17070,7 @@ const CountUp = (props) => {
|
|
|
16968
17070
|
thousands,
|
|
16969
17071
|
...reset
|
|
16970
17072
|
} = {
|
|
16971
|
-
...defaultProps$
|
|
17073
|
+
...defaultProps$i,
|
|
16972
17074
|
...props
|
|
16973
17075
|
};
|
|
16974
17076
|
const b2 = cn("countup");
|
|
@@ -17045,9 +17147,9 @@ const CountUp = (props) => {
|
|
|
17045
17147
|
}, item));
|
|
17046
17148
|
})));
|
|
17047
17149
|
};
|
|
17048
|
-
CountUp.defaultProps = defaultProps$
|
|
17150
|
+
CountUp.defaultProps = defaultProps$i;
|
|
17049
17151
|
CountUp.displayName = "NutCountUp";
|
|
17050
|
-
const defaultProps$
|
|
17152
|
+
const defaultProps$h = {};
|
|
17051
17153
|
class AnimatingNumbers extends Component {
|
|
17052
17154
|
constructor(props) {
|
|
17053
17155
|
super(props);
|
|
@@ -17059,7 +17161,7 @@ class AnimatingNumbers extends Component {
|
|
|
17059
17161
|
});
|
|
17060
17162
|
}
|
|
17061
17163
|
}
|
|
17062
|
-
AnimatingNumbers.defaultProps = defaultProps$
|
|
17164
|
+
AnimatingNumbers.defaultProps = defaultProps$h;
|
|
17063
17165
|
AnimatingNumbers.displayName = "NutAnimatingNumbers";
|
|
17064
17166
|
AnimatingNumbers.CountUp = CountUp;
|
|
17065
17167
|
const defaultStatus = {
|
|
@@ -17067,7 +17169,7 @@ const defaultStatus = {
|
|
|
17067
17169
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
17068
17170
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
17069
17171
|
};
|
|
17070
|
-
const defaultProps$
|
|
17172
|
+
const defaultProps$g = {
|
|
17071
17173
|
description: "\u65E0\u5185\u5BB9",
|
|
17072
17174
|
image: "empty",
|
|
17073
17175
|
imageSize: "",
|
|
@@ -17075,9 +17177,9 @@ const defaultProps$e = {
|
|
|
17075
17177
|
};
|
|
17076
17178
|
const Empty = (props) => {
|
|
17077
17179
|
const { locale } = useConfig$1();
|
|
17078
|
-
defaultProps$
|
|
17180
|
+
defaultProps$g.description = locale.noData || defaultProps$g.description;
|
|
17079
17181
|
const { image, imageSize, description, children, className, ...rest } = {
|
|
17080
|
-
...defaultProps$
|
|
17182
|
+
...defaultProps$g,
|
|
17081
17183
|
...props
|
|
17082
17184
|
};
|
|
17083
17185
|
const [imgStyle, setImgStyle] = useState({});
|
|
@@ -17119,7 +17221,7 @@ const Empty = (props) => {
|
|
|
17119
17221
|
className: b2("description")
|
|
17120
17222
|
}, description) : { description }, children));
|
|
17121
17223
|
};
|
|
17122
|
-
Empty.defaultProps = defaultProps$
|
|
17224
|
+
Empty.defaultProps = defaultProps$g;
|
|
17123
17225
|
Empty.displayName = "NutEmpty";
|
|
17124
17226
|
const initPositinoCache = (reaItemSize, length = 0) => {
|
|
17125
17227
|
let index = 0;
|
|
@@ -17232,7 +17334,7 @@ const updateItemSize = (positions, items, sizeKey) => {
|
|
|
17232
17334
|
}
|
|
17233
17335
|
});
|
|
17234
17336
|
};
|
|
17235
|
-
const defaultProps$
|
|
17337
|
+
const defaultProps$f = {};
|
|
17236
17338
|
const VirtualList = (props) => {
|
|
17237
17339
|
const {
|
|
17238
17340
|
sourceData = [],
|
|
@@ -17396,9 +17498,9 @@ const VirtualList = (props) => {
|
|
|
17396
17498
|
}) : data);
|
|
17397
17499
|
}))));
|
|
17398
17500
|
};
|
|
17399
|
-
VirtualList.defaultProps = defaultProps$
|
|
17501
|
+
VirtualList.defaultProps = defaultProps$f;
|
|
17400
17502
|
VirtualList.displayName = "NutVirtualList";
|
|
17401
|
-
const defaultProps$
|
|
17503
|
+
const defaultProps$e = {
|
|
17402
17504
|
...ComponentDefaults,
|
|
17403
17505
|
className: "",
|
|
17404
17506
|
style: {},
|
|
@@ -17410,7 +17512,7 @@ const defaultProps$c = {
|
|
|
17410
17512
|
};
|
|
17411
17513
|
const Table = (props) => {
|
|
17412
17514
|
const { locale } = useConfig$1();
|
|
17413
|
-
defaultProps$
|
|
17515
|
+
defaultProps$e.noData = locale.noData;
|
|
17414
17516
|
const {
|
|
17415
17517
|
children,
|
|
17416
17518
|
className,
|
|
@@ -17426,7 +17528,7 @@ const Table = (props) => {
|
|
|
17426
17528
|
iconFontClassName,
|
|
17427
17529
|
...rest
|
|
17428
17530
|
} = {
|
|
17429
|
-
...defaultProps$
|
|
17531
|
+
...defaultProps$e,
|
|
17430
17532
|
...props
|
|
17431
17533
|
};
|
|
17432
17534
|
const [curData, setCurData] = useState(data);
|
|
@@ -17524,9 +17626,9 @@ const Table = (props) => {
|
|
|
17524
17626
|
className: "nut-table__nodata__text"
|
|
17525
17627
|
}, noData))));
|
|
17526
17628
|
};
|
|
17527
|
-
Table.defaultProps = defaultProps$
|
|
17629
|
+
Table.defaultProps = defaultProps$e;
|
|
17528
17630
|
Table.displayName = "NutTable";
|
|
17529
|
-
const defaultProps$
|
|
17631
|
+
const defaultProps$d = {
|
|
17530
17632
|
source: {
|
|
17531
17633
|
type: {},
|
|
17532
17634
|
src: ""
|
|
@@ -17554,7 +17656,7 @@ const Video = (props) => {
|
|
|
17554
17656
|
onPlayend,
|
|
17555
17657
|
...restProps
|
|
17556
17658
|
} = {
|
|
17557
|
-
...defaultProps$
|
|
17659
|
+
...defaultProps$d,
|
|
17558
17660
|
...props
|
|
17559
17661
|
};
|
|
17560
17662
|
const rootRef = useRef(null);
|
|
@@ -17611,11 +17713,11 @@ const Video = (props) => {
|
|
|
17611
17713
|
kind: "captions"
|
|
17612
17714
|
})));
|
|
17613
17715
|
};
|
|
17614
|
-
Video.defaultProps = defaultProps$
|
|
17716
|
+
Video.defaultProps = defaultProps$d;
|
|
17615
17717
|
Video.displayName = "NutVideo";
|
|
17616
17718
|
const b = cn("audio");
|
|
17617
17719
|
const warn = console.warn;
|
|
17618
|
-
const defaultProps$
|
|
17720
|
+
const defaultProps$c = {
|
|
17619
17721
|
...ComponentDefaults,
|
|
17620
17722
|
className: "",
|
|
17621
17723
|
url: "",
|
|
@@ -17656,7 +17758,7 @@ const Audio = (props) => {
|
|
|
17656
17758
|
iconFontClassName,
|
|
17657
17759
|
...rest
|
|
17658
17760
|
} = {
|
|
17659
|
-
...defaultProps$
|
|
17761
|
+
...defaultProps$c,
|
|
17660
17762
|
...props
|
|
17661
17763
|
};
|
|
17662
17764
|
const [playing, setPlaying] = useState(false);
|
|
@@ -17820,9 +17922,9 @@ const Audio = (props) => {
|
|
|
17820
17922
|
...rest
|
|
17821
17923
|
}, renderAudio());
|
|
17822
17924
|
};
|
|
17823
|
-
Audio.defaultProps = defaultProps$
|
|
17925
|
+
Audio.defaultProps = defaultProps$c;
|
|
17824
17926
|
Audio.displayName = "NutAudio";
|
|
17825
|
-
const defaultProps$
|
|
17927
|
+
const defaultProps$b = {
|
|
17826
17928
|
images: [],
|
|
17827
17929
|
videos: [],
|
|
17828
17930
|
show: false,
|
|
@@ -18005,8 +18107,215 @@ const ImagePreview = (props) => {
|
|
|
18005
18107
|
className: "nut-imagepreview-index"
|
|
18006
18108
|
}, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0)));
|
|
18007
18109
|
};
|
|
18008
|
-
ImagePreview.defaultProps = defaultProps$
|
|
18110
|
+
ImagePreview.defaultProps = defaultProps$b;
|
|
18009
18111
|
ImagePreview.displayName = "NutImagePreview";
|
|
18112
|
+
const defaultProps$a = {
|
|
18113
|
+
rate: 0,
|
|
18114
|
+
digits: 2,
|
|
18115
|
+
showSign: false,
|
|
18116
|
+
showZero: false,
|
|
18117
|
+
arrowLeft: false,
|
|
18118
|
+
syncTextColor: true,
|
|
18119
|
+
textColor: "#333",
|
|
18120
|
+
riseColor: "#fa2c19",
|
|
18121
|
+
dropColor: "#64b578",
|
|
18122
|
+
iconSize: "12px",
|
|
18123
|
+
upIconName: "triangle-up",
|
|
18124
|
+
downIconName: "triangle-down",
|
|
18125
|
+
className: ""
|
|
18126
|
+
};
|
|
18127
|
+
const TrendArrow = (props) => {
|
|
18128
|
+
const {
|
|
18129
|
+
rate,
|
|
18130
|
+
digits,
|
|
18131
|
+
showSign,
|
|
18132
|
+
showZero,
|
|
18133
|
+
arrowLeft,
|
|
18134
|
+
syncTextColor,
|
|
18135
|
+
textColor,
|
|
18136
|
+
riseColor,
|
|
18137
|
+
dropColor,
|
|
18138
|
+
iconSize,
|
|
18139
|
+
upIconName,
|
|
18140
|
+
downIconName,
|
|
18141
|
+
className,
|
|
18142
|
+
children,
|
|
18143
|
+
...rest
|
|
18144
|
+
} = { ...defaultProps$a, ...props };
|
|
18145
|
+
const b2 = cn("trendarrow");
|
|
18146
|
+
const handleClick2 = () => {
|
|
18147
|
+
};
|
|
18148
|
+
const rateTrend = useRef(rate > 0);
|
|
18149
|
+
const myFixed = (num, digit = 2) => {
|
|
18150
|
+
if (Object.is(parseFloat(num), NaN)) {
|
|
18151
|
+
return console.log(`\u4F20\u5165\u7684\u503C\uFF1A${num}\u4E0D\u662F\u4E00\u4E2A\u6570\u5B57`);
|
|
18152
|
+
}
|
|
18153
|
+
num = parseFloat(num);
|
|
18154
|
+
const numPow = Math.pow(10, digit);
|
|
18155
|
+
return (Math.round((num + Number.EPSILON) * numPow) / numPow).toFixed(digit);
|
|
18156
|
+
};
|
|
18157
|
+
const calcStyle = (() => {
|
|
18158
|
+
const arrowColor = rateTrend.current ? riseColor : dropColor;
|
|
18159
|
+
const textEquArrowColor = syncTextColor ? arrowColor : textColor;
|
|
18160
|
+
const style = {
|
|
18161
|
+
color: rate === 0 ? textColor : textEquArrowColor
|
|
18162
|
+
};
|
|
18163
|
+
return style;
|
|
18164
|
+
})();
|
|
18165
|
+
const calcRate = (() => {
|
|
18166
|
+
rateTrend.current = rate > 0;
|
|
18167
|
+
const absRate = Math.abs(rate);
|
|
18168
|
+
if (!showZero && rate === 0) {
|
|
18169
|
+
return "--";
|
|
18170
|
+
}
|
|
18171
|
+
const resultRate = `${showSign && rate !== 0 ? rateTrend.current ? "+" : "-" : ""}${myFixed(Number(absRate), digits)}%`;
|
|
18172
|
+
return resultRate;
|
|
18173
|
+
})();
|
|
18174
|
+
const calcIconProps = (() => {
|
|
18175
|
+
const iconProps = {
|
|
18176
|
+
name: rateTrend.current ? upIconName : downIconName,
|
|
18177
|
+
color: rateTrend.current ? riseColor : dropColor,
|
|
18178
|
+
size: iconSize
|
|
18179
|
+
};
|
|
18180
|
+
return iconProps;
|
|
18181
|
+
})();
|
|
18182
|
+
const renderContent = (arrowLeft2) => {
|
|
18183
|
+
const classNameSuffix = !arrowLeft2 ? "icon-after" : "icon-before";
|
|
18184
|
+
return /* @__PURE__ */ React__default.createElement("span", {
|
|
18185
|
+
className: `${b2(classNameSuffix)} ${b2("rate")}`,
|
|
18186
|
+
style: calcStyle
|
|
18187
|
+
}, calcRate);
|
|
18188
|
+
};
|
|
18189
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
18190
|
+
className: `${b2()} ${className}`,
|
|
18191
|
+
...rest,
|
|
18192
|
+
onClick: handleClick2
|
|
18193
|
+
}, !arrowLeft && renderContent(!arrowLeft), children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, Number(rate) !== 0 && /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
18194
|
+
size: calcIconProps.size,
|
|
18195
|
+
name: calcIconProps.name,
|
|
18196
|
+
color: calcIconProps.color
|
|
18197
|
+
})), arrowLeft && renderContent(!arrowLeft));
|
|
18198
|
+
};
|
|
18199
|
+
TrendArrow.defaultProps = defaultProps$a;
|
|
18200
|
+
TrendArrow.displayName = "NutTrendArrow";
|
|
18201
|
+
const defaultProps$9 = {
|
|
18202
|
+
content: "",
|
|
18203
|
+
fullPage: true,
|
|
18204
|
+
zIndex: 2e3,
|
|
18205
|
+
gapX: 24,
|
|
18206
|
+
gapY: 48,
|
|
18207
|
+
width: 120,
|
|
18208
|
+
height: 64,
|
|
18209
|
+
image: "",
|
|
18210
|
+
imageWidth: 120,
|
|
18211
|
+
imageHeight: 64,
|
|
18212
|
+
rotate: -22,
|
|
18213
|
+
fontColor: "rgba(0,0,0,.15)",
|
|
18214
|
+
fontStyle: "normal",
|
|
18215
|
+
fontFamily: "PingFang SC",
|
|
18216
|
+
fontWeight: "normal",
|
|
18217
|
+
fontSize: 14
|
|
18218
|
+
};
|
|
18219
|
+
const WaterMark = (props) => {
|
|
18220
|
+
const { locale } = useConfig();
|
|
18221
|
+
const {
|
|
18222
|
+
content,
|
|
18223
|
+
fullPage,
|
|
18224
|
+
zIndex,
|
|
18225
|
+
className,
|
|
18226
|
+
gapX,
|
|
18227
|
+
gapY,
|
|
18228
|
+
width,
|
|
18229
|
+
height,
|
|
18230
|
+
image,
|
|
18231
|
+
imageWidth,
|
|
18232
|
+
imageHeight,
|
|
18233
|
+
rotate,
|
|
18234
|
+
fontColor,
|
|
18235
|
+
fontStyle,
|
|
18236
|
+
fontFamily,
|
|
18237
|
+
fontWeight,
|
|
18238
|
+
fontSize,
|
|
18239
|
+
style,
|
|
18240
|
+
children
|
|
18241
|
+
} = {
|
|
18242
|
+
...defaultProps$9,
|
|
18243
|
+
...props
|
|
18244
|
+
};
|
|
18245
|
+
const [base64Url, setBase64Url] = useState("");
|
|
18246
|
+
const b2 = cn("watermark");
|
|
18247
|
+
const classes = classNames({
|
|
18248
|
+
[`${b2("")}`]: true,
|
|
18249
|
+
[`${b2("")}-full-page`]: fullPage
|
|
18250
|
+
});
|
|
18251
|
+
const cls = classNames(classes, className);
|
|
18252
|
+
useEffect(() => {
|
|
18253
|
+
init();
|
|
18254
|
+
}, []);
|
|
18255
|
+
const init = () => {
|
|
18256
|
+
let ratio = 1;
|
|
18257
|
+
Taro.getSystemInfo({
|
|
18258
|
+
success(res) {
|
|
18259
|
+
ratio = res.pixelRatio;
|
|
18260
|
+
}
|
|
18261
|
+
});
|
|
18262
|
+
const canvasWidth = `${(gapX + width) * ratio}px`;
|
|
18263
|
+
const canvasHeight = `${(gapY + height) * ratio}px`;
|
|
18264
|
+
const markWidth = width * ratio;
|
|
18265
|
+
const markHeight = height * ratio;
|
|
18266
|
+
const canvas = Taro.createOffscreenCanvas({
|
|
18267
|
+
type: "2d",
|
|
18268
|
+
width: Number(canvasWidth),
|
|
18269
|
+
height: Number(canvasHeight)
|
|
18270
|
+
});
|
|
18271
|
+
const ctx2 = canvas.getContext("2d");
|
|
18272
|
+
if (ctx2) {
|
|
18273
|
+
if (image) {
|
|
18274
|
+
ctx2.translate(markWidth / 2, markHeight / 2);
|
|
18275
|
+
ctx2.rotate(Math.PI / 180 * Number(rotate));
|
|
18276
|
+
const img = canvas.createImage();
|
|
18277
|
+
img.crossOrigin = "anonymous";
|
|
18278
|
+
img.referrerPolicy = "no-referrer";
|
|
18279
|
+
img.src = image;
|
|
18280
|
+
img.onload = () => {
|
|
18281
|
+
ctx2.drawImage(
|
|
18282
|
+
img,
|
|
18283
|
+
-imageWidth * ratio / 2,
|
|
18284
|
+
-imageHeight * ratio / 2,
|
|
18285
|
+
imageWidth * ratio,
|
|
18286
|
+
imageHeight * ratio
|
|
18287
|
+
);
|
|
18288
|
+
ctx2.restore();
|
|
18289
|
+
setBase64Url(canvas.toDataURL());
|
|
18290
|
+
};
|
|
18291
|
+
} else if (content) {
|
|
18292
|
+
ctx2.textBaseline = "middle";
|
|
18293
|
+
ctx2.textAlign = "center";
|
|
18294
|
+
ctx2.translate(markWidth / 2, markHeight / 2);
|
|
18295
|
+
ctx2.rotate(Math.PI / 180 * Number(rotate));
|
|
18296
|
+
const markSize = Number(fontSize) * ratio;
|
|
18297
|
+
ctx2.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
|
|
18298
|
+
ctx2.fillStyle = fontColor;
|
|
18299
|
+
ctx2.fillText(content, 0, 0);
|
|
18300
|
+
ctx2.restore();
|
|
18301
|
+
setBase64Url(canvas.toDataURL());
|
|
18302
|
+
}
|
|
18303
|
+
} else {
|
|
18304
|
+
throw new Error(locale.watermark.errorCanvasTips);
|
|
18305
|
+
}
|
|
18306
|
+
};
|
|
18307
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
18308
|
+
className: cls,
|
|
18309
|
+
style: {
|
|
18310
|
+
zIndex,
|
|
18311
|
+
backgroundSize: `${gapX + width}px`,
|
|
18312
|
+
backgroundImage: `url('${base64Url}')`,
|
|
18313
|
+
...style
|
|
18314
|
+
}
|
|
18315
|
+
});
|
|
18316
|
+
};
|
|
18317
|
+
WaterMark.defaultProps = defaultProps$9;
|
|
18318
|
+
WaterMark.displayName = "NutWaterMark";
|
|
18010
18319
|
const defaultProps$8 = {
|
|
18011
18320
|
type: "custom",
|
|
18012
18321
|
existAddress: [],
|
|
@@ -19052,4 +19361,4 @@ const TimeSelect = (props) => {
|
|
|
19052
19361
|
};
|
|
19053
19362
|
TimeSelect.defaultProps = defaultProps;
|
|
19054
19363
|
TimeSelect.displayName = "NutTimeSelect";
|
|
19055
|
-
export { ActionSheet, Address, AnimatingNumbers, Audio, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cascader, Cell$1 as Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, ConfigProvider, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, Empty, FixedNav, Form, FormItem, Grid, GridItem, Icon$1 as Icon, ImagePreview, Indicator, Infiniteloading, Input, InputNumber, Layout, Menu, MenuItem, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, Picker, Popover, Popup, Price, Progress, PullToRefresh, Radio, RadioGroup, Range, Rate, Row, SearchBar, ShortPassword, SideNavBar, SideNavBarItem, Signature, Skeleton, Step, Steps, Sticky, SubSideNavBar, Swipe, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Table, Tabs, Tag, TextArea, TimeDetail, TimePannel, TimeSelect, Toast, Uploader, Video, VirtualList };
|
|
19364
|
+
export { ActionSheet, Address, AnimatingNumbers, Audio, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cascader, Cell$1 as Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, ConfigProvider, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, Empty, FixedNav, Form, FormItem, Grid, GridItem, Icon$1 as Icon, Image, ImagePreview, Indicator, Infiniteloading, Input, InputNumber, Layout, Menu, MenuItem, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, Picker, Popover, Popup, Price, Progress, PullToRefresh, Radio, RadioGroup, Range, Rate, Row, SearchBar, ShortPassword, SideNavBar, SideNavBarItem, Signature, Skeleton, Step, Steps, Sticky, SubSideNavBar, Swipe, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Table, Tabs, Tag, TextArea, TimeDetail, TimePannel, TimeSelect, Toast, TrendArrow, Uploader, Video, VirtualList, WaterMark };
|