@nutui/nutui-react-taro 2.0.12-beta.0 → 2.0.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 +11 -0
- package/dist/esm/Address.js +7 -5
- package/dist/esm/Audio.js +6 -4
- package/dist/esm/Calendar.js +6 -4
- package/dist/esm/CalendarItem.js +5 -3
- package/dist/esm/Cascader.js +4 -3
- package/dist/esm/Checkbox.js +3 -2
- package/dist/esm/CheckboxGroup.js +3 -2
- package/dist/esm/Collapse.js +3 -2
- package/dist/esm/ConfigProvider.js +3 -2
- package/dist/esm/CountDown.js +3 -2
- package/dist/esm/DatePicker.js +6 -4
- package/dist/esm/Dialog.js +6 -3
- package/dist/esm/Empty.js +3 -2
- package/dist/esm/FixedNav.js +3 -2
- package/dist/esm/Form.js +2 -2
- package/dist/esm/FormItem.js +1 -1
- package/dist/esm/Grid.js +4 -3
- package/dist/esm/GridItem.js +3 -2
- package/dist/esm/ImagePreview.js +3 -2
- package/dist/esm/InfiniteLoading.js +3 -2
- package/dist/esm/Input.js +5 -3
- package/dist/esm/InputNumber.js +3 -2
- package/dist/esm/Notify.js +4 -1
- package/dist/esm/NumberKeyboard.js +3 -2
- package/dist/esm/Pagination.js +5 -3
- package/dist/esm/Picker.js +5 -3
- package/dist/esm/PullToRefresh.js +3 -2
- package/dist/esm/Radio.js +3 -2
- package/dist/esm/RadioGroup.js +3 -2
- package/dist/esm/Range.js +3 -2
- package/dist/esm/Rate.js +3 -2
- package/dist/esm/SearchBar.js +3 -2
- package/dist/esm/ShortPassword.js +5 -3
- package/dist/esm/Switch.js +3 -2
- package/dist/esm/Tabbar.js +3 -2
- package/dist/esm/Table.js +3 -2
- package/dist/esm/Tabs.js +3 -2
- package/dist/esm/TextArea.js +5 -3
- package/dist/esm/TimeSelect.js +3 -2
- package/dist/esm/Toast.js +5 -1
- package/dist/esm/Uploader.js +3 -2
- package/dist/esm/WaterMark.js +3 -2
- package/dist/esm/{address.taro-fe8a0601.js → address.taro-b58603a5.js} +3 -3
- package/dist/esm/{audio.taro-e85bb3b8.js → audio.taro-ef39c1d9.js} +2 -2
- package/dist/esm/{calendar.taro-29726d55.js → calendar.taro-c8ddf452.js} +2 -2
- package/dist/esm/{calendaritem.taro-9b37d00c.js → calendaritem.taro-0bd17638.js} +2 -2
- package/dist/esm/{cascader.taro-e05fd966.js → cascader.taro-ec5179d6.js} +2 -2
- package/dist/esm/{checkbox.taro-07d5c9d5.js → checkbox.taro-22cd35c4.js} +1 -1
- package/dist/esm/{collapse.taro-bd6b2bb3.js → collapse.taro-4a3e417c.js} +1 -1
- package/dist/esm/configprovider.taro-c5ff4877.js +483 -0
- package/dist/esm/{countdown.taro-80f2110b.js → countdown.taro-7caa9578.js} +1 -1
- package/dist/esm/{datepicker.taro-b894c285.js → datepicker.taro-288d64bb.js} +3 -3
- package/dist/esm/{dialog.taro-51697911.js → dialog.taro-519e45af.js} +50 -46
- package/dist/esm/{empty.taro-cef66b01.js → empty.taro-05f15f93.js} +1 -1
- package/dist/esm/{fixednav.taro-04cf5ffb.js → fixednav.taro-0d998d65.js} +1 -1
- package/dist/esm/{form.taro-16cb71e2.js → form.taro-6166be06.js} +1 -1
- package/dist/esm/{formitem.taro-34af0204.js → formitem.taro-9e2d3898.js} +1 -1
- package/dist/esm/{grid.taro-6f1b764c.js → grid.taro-f72acab8.js} +1 -1
- package/dist/esm/{griditem.taro-0d03a061.js → griditem.taro-b7abc653.js} +1 -1
- package/dist/esm/{imagepreview.taro-167d1380.js → imagepreview.taro-bc96904b.js} +1 -1
- package/dist/esm/{configprovider.taro-3a23ea84.js → index-21e61675.js} +26 -504
- package/dist/esm/{infiniteloading.taro-590cfd4f.js → infiniteloading.taro-cb3b949e.js} +1 -1
- package/dist/esm/{input.taro-abe6d65e.js → input.taro-fbcb7090.js} +2 -2
- package/dist/esm/{inputnumber.taro-9c74cc1c.js → inputnumber.taro-2f6f30d7.js} +1 -1
- package/dist/esm/{notify.taro-687d6f8c.js → notify.taro-07e9ead7.js} +2 -24
- package/dist/esm/{numberkeyboard.taro-42950800.js → numberkeyboard.taro-f19c44a8.js} +1 -1
- package/dist/esm/nutui-react.es.js +44 -41
- package/dist/esm/{pagination.taro-c2521fdf.js → pagination.taro-47fad28d.js} +2 -2
- package/dist/esm/{picker.taro-bd10e4e7.js → picker.taro-0770a67f.js} +2 -2
- package/dist/esm/{pulltorefresh.taro-2b4a48be.js → pulltorefresh.taro-f3ab76c2.js} +1 -1
- package/dist/esm/{radio.taro-802db0e9.js → radio.taro-d1d370be.js} +1 -1
- package/dist/esm/{range.taro-70101605.js → range.taro-fbbf5522.js} +1 -1
- package/dist/esm/{rate.taro-f090e140.js → rate.taro-61bbf5a7.js} +1 -1
- package/dist/esm/{searchbar.taro-75cf9937.js → searchbar.taro-7daf43fc.js} +1 -1
- package/dist/esm/{shortpassword.taro-d400cd45.js → shortpassword.taro-86563915.js} +2 -2
- package/dist/esm/{switch.taro-9c344336.js → switch.taro-74b2bd0a.js} +1 -1
- package/dist/esm/{tabbar.taro-ac4f72b9.js → tabbar.taro-4397646a.js} +1 -1
- package/dist/esm/{table.taro-48e8265e.js → table.taro-072907bf.js} +1 -1
- package/dist/esm/{tabs.taro-eceaf324.js → tabs.taro-3ece2221.js} +2 -1
- package/dist/esm/{textarea.taro-115dc986.js → textarea.taro-6ebe789c.js} +2 -2
- package/dist/esm/{timeselect.taro-e115bfd7.js → timeselect.taro-6e9fc4d4.js} +1 -1
- package/dist/esm/{toast.taro-b6ecbca7.js → toast.taro-a907b5f5.js} +28 -9
- package/dist/esm/types/src/packages/dialog/config.d.ts +1 -0
- package/dist/esm/types/src/packages/dialog/content.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/dialog/dialog.taro.d.ts +11 -3
- package/dist/esm/types/src/packages/toast/index.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/toast/toast.taro.d.ts +12 -1
- package/dist/esm/types/src/utils/use-custom-event.d.ts +4 -0
- package/dist/esm/{uploader.taro-cdb38c18.js → uploader.taro-c0bcca89.js} +1 -1
- package/dist/esm/use-custom-event-e1689884.js +49 -0
- package/dist/esm/use-force-update-9cd7c164.js +8 -0
- package/dist/esm/{use-props-value-e8331e19.js → use-props-value-c78cbf9b.js} +2 -6
- package/dist/esm/{watermark.taro-cea2fceb.js → watermark.taro-311b59d2.js} +1 -1
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +216 -179
- package/dist/nutui.react.umd.js +216 -179
- package/dist/style.mjs +1 -1
- package/dist/types/packages/dialog/config.d.ts +1 -0
- package/dist/types/packages/dialog/content.taro.d.ts +1 -1
- package/dist/types/packages/dialog/dialog.taro.d.ts +11 -3
- package/dist/types/packages/toast/index.taro.d.ts +1 -1
- package/dist/types/packages/toast/toast.taro.d.ts +12 -1
- package/dist/types/utils/use-custom-event.d.ts +4 -0
- package/package.json +5 -4
- package/dist/types/packages/dialog/dialogwrap.taro.d.ts +0 -14
|
@@ -1,30 +1,8 @@
|
|
|
1
|
-
import React__default, {
|
|
1
|
+
import React__default, { useState, useEffect } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { CSSTransition } from "react-transition-group";
|
|
4
4
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
5
|
-
import {
|
|
6
|
-
const customEvents = new Events();
|
|
7
|
-
function useCustomEventsPath(selector) {
|
|
8
|
-
var _a;
|
|
9
|
-
const path = (_a = getCurrentInstance().router) == null ? void 0 : _a.path;
|
|
10
|
-
return path ? `${path}__${selector}` : selector;
|
|
11
|
-
}
|
|
12
|
-
function useCustomEvent(selector, cb) {
|
|
13
|
-
const path = useCustomEventsPath(selector);
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
customEvents.on(path, cb);
|
|
16
|
-
return () => {
|
|
17
|
-
customEvents.off(path);
|
|
18
|
-
};
|
|
19
|
-
}, []);
|
|
20
|
-
const trigger = (args) => {
|
|
21
|
-
customEvents.trigger(path, args);
|
|
22
|
-
};
|
|
23
|
-
const off = () => {
|
|
24
|
-
customEvents.off(path);
|
|
25
|
-
};
|
|
26
|
-
return [trigger, off];
|
|
27
|
-
}
|
|
5
|
+
import { a as useCustomEvent, b as useCustomEventsPath, c as customEvents } from "./use-custom-event-e1689884.js";
|
|
28
6
|
const defaultProps = {
|
|
29
7
|
...ComponentDefaults,
|
|
30
8
|
id: "",
|
|
@@ -3,7 +3,7 @@ import classNames from "classnames";
|
|
|
3
3
|
import { RectDown } from "@nutui/icons-react-taro";
|
|
4
4
|
import { View } from "@tarojs/components";
|
|
5
5
|
import { P as Popup } from "./popup.taro-487eb86e.js";
|
|
6
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
6
|
+
import { u as useConfig } from "./configprovider.taro-c5ff4877.js";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
8
8
|
const defaultProps = {
|
|
9
9
|
...ComponentDefaults,
|
|
@@ -1,86 +1,86 @@
|
|
|
1
1
|
import { B } from "./button.taro-25f559e1.js";
|
|
2
2
|
import { C } from "./cell.taro-0a9f80bc.js";
|
|
3
3
|
import { C as C2 } from "./cellgroup.taro-d2fad5e7.js";
|
|
4
|
-
import { C as C3 } from "./configprovider.taro-
|
|
4
|
+
import { C as C3 } from "./configprovider.taro-c5ff4877.js";
|
|
5
5
|
import { I } from "./image.taro-a7ad2272.js";
|
|
6
6
|
import { O } from "./overlay.taro-626840fc.js";
|
|
7
7
|
import { C as C4 } from "./col.taro-23d5f6bd.js";
|
|
8
8
|
import { D } from "./divider.taro-c61ab869.js";
|
|
9
|
-
import { G } from "./grid.taro-
|
|
10
|
-
import { G as G2 } from "./griditem.taro-
|
|
9
|
+
import { G } from "./grid.taro-f72acab8.js";
|
|
10
|
+
import { G as G2 } from "./griditem.taro-b7abc653.js";
|
|
11
11
|
import { L } from "./layout.taro-7711a89c.js";
|
|
12
12
|
import { R } from "./row.taro-a71fbf76.js";
|
|
13
13
|
import { S } from "./space.taro-a7e4ced4.js";
|
|
14
14
|
import { S as S2 } from "./sticky.taro-2d78a04e.js";
|
|
15
15
|
import { B as B2 } from "./backtop.taro-61b1eeaf.js";
|
|
16
16
|
import { E } from "./elevator.taro-cdf3dba7.js";
|
|
17
|
-
import { F } from "./fixednav.taro-
|
|
17
|
+
import { F } from "./fixednav.taro-0d998d65.js";
|
|
18
18
|
import { N } from "./navbar.taro-23394f73.js";
|
|
19
19
|
import { S as S3 } from "./sidenavbar.taro-f16b1320.js";
|
|
20
20
|
import { S as S4 } from "./sidenavbaritem.taro-69b0784d.js";
|
|
21
21
|
import { S as S5 } from "./subsidenavbar.taro-797ce379.js";
|
|
22
|
-
import { T } from "./tabbar.taro-
|
|
22
|
+
import { T } from "./tabbar.taro-4397646a.js";
|
|
23
23
|
import { T as T2 } from "./tabbaritem.taro-1d27af28.js";
|
|
24
24
|
import { T as T3 } from "./tabpane.taro-d0eea168.js";
|
|
25
|
-
import { T as T4 } from "./tabs.taro-
|
|
26
|
-
import { A } from "./address.taro-
|
|
27
|
-
import { C as C5 } from "./calendar.taro-
|
|
28
|
-
import { C as C6 } from "./calendaritem.taro-
|
|
29
|
-
import { C as C7 } from "./cascader.taro-
|
|
30
|
-
import { C as C8, a } from "./checkbox.taro-
|
|
31
|
-
import { D as D2 } from "./datepicker.taro-
|
|
32
|
-
import { F as F2 } from "./form.taro-
|
|
33
|
-
import { F as F3 } from "./formitem.taro-
|
|
34
|
-
import { I as I2 } from "./input.taro-
|
|
35
|
-
import { I as I3 } from "./inputnumber.taro-
|
|
25
|
+
import { T as T4 } from "./tabs.taro-3ece2221.js";
|
|
26
|
+
import { A } from "./address.taro-b58603a5.js";
|
|
27
|
+
import { C as C5 } from "./calendar.taro-c8ddf452.js";
|
|
28
|
+
import { C as C6 } from "./calendaritem.taro-0bd17638.js";
|
|
29
|
+
import { C as C7 } from "./cascader.taro-ec5179d6.js";
|
|
30
|
+
import { C as C8, a } from "./checkbox.taro-22cd35c4.js";
|
|
31
|
+
import { D as D2 } from "./datepicker.taro-288d64bb.js";
|
|
32
|
+
import { F as F2 } from "./form.taro-6166be06.js";
|
|
33
|
+
import { F as F3 } from "./formitem.taro-9e2d3898.js";
|
|
34
|
+
import { I as I2 } from "./input.taro-fbcb7090.js";
|
|
35
|
+
import { I as I3 } from "./inputnumber.taro-2f6f30d7.js";
|
|
36
36
|
import { M } from "./menu.taro-4cde3e7f.js";
|
|
37
37
|
import { M as M2 } from "./menuitem.taro-8a60a655.js";
|
|
38
|
-
import { N as N2 } from "./numberkeyboard.taro-
|
|
39
|
-
import { P } from "./picker.taro-
|
|
40
|
-
import { R as R2, a as a2 } from "./radio.taro-
|
|
41
|
-
import { R as R3 } from "./range.taro-
|
|
42
|
-
import { R as R4 } from "./rate.taro-
|
|
43
|
-
import { S as S6 } from "./searchbar.taro-
|
|
44
|
-
import { S as S7 } from "./shortpassword.taro-
|
|
38
|
+
import { N as N2 } from "./numberkeyboard.taro-f19c44a8.js";
|
|
39
|
+
import { P } from "./picker.taro-0770a67f.js";
|
|
40
|
+
import { R as R2, a as a2 } from "./radio.taro-d1d370be.js";
|
|
41
|
+
import { R as R3 } from "./range.taro-fbbf5522.js";
|
|
42
|
+
import { R as R4 } from "./rate.taro-61bbf5a7.js";
|
|
43
|
+
import { S as S6 } from "./searchbar.taro-7daf43fc.js";
|
|
44
|
+
import { S as S7 } from "./shortpassword.taro-86563915.js";
|
|
45
45
|
import { S as S8 } from "./signature.taro-3e0c2694.js";
|
|
46
|
-
import { S as S9 } from "./switch.taro-
|
|
47
|
-
import { T as T5 } from "./textarea.taro-
|
|
48
|
-
import { U } from "./uploader.taro-
|
|
46
|
+
import { S as S9 } from "./switch.taro-74b2bd0a.js";
|
|
47
|
+
import { T as T5 } from "./textarea.taro-6ebe789c.js";
|
|
48
|
+
import { U } from "./uploader.taro-c0bcca89.js";
|
|
49
49
|
import { A as A2 } from "./actionsheet.taro-0a411006.js";
|
|
50
50
|
import { B as B3 } from "./badge.taro-289489e5.js";
|
|
51
|
-
import { B as B4 } from "./dialog.taro-
|
|
51
|
+
import { B as B4 } from "./dialog.taro-519e45af.js";
|
|
52
52
|
import { D as D3 } from "./drag.taro-ce333e51.js";
|
|
53
|
-
import { E as E2 } from "./empty.taro-
|
|
54
|
-
import { I as I4 } from "./infiniteloading.taro-
|
|
53
|
+
import { E as E2 } from "./empty.taro-05f15f93.js";
|
|
54
|
+
import { I as I4 } from "./infiniteloading.taro-cb3b949e.js";
|
|
55
55
|
import { L as L2 } from "./loading.taro-0799622f.js";
|
|
56
56
|
import { N as N3 } from "./noticebar.taro-d95c13b6.js";
|
|
57
|
-
import { N as N4 } from "./notify.taro-
|
|
57
|
+
import { N as N4 } from "./notify.taro-07e9ead7.js";
|
|
58
58
|
import { P as P2 } from "./popover.taro-7a482b85.js";
|
|
59
59
|
import { P as P3 } from "./popup.taro-487eb86e.js";
|
|
60
|
-
import { P as P4 } from "./pulltorefresh.taro-
|
|
60
|
+
import { P as P4 } from "./pulltorefresh.taro-f3ab76c2.js";
|
|
61
61
|
import { S as S10 } from "./skeleton.taro-1896ff37.js";
|
|
62
62
|
import { S as S11 } from "./swipe.taro-36f8782e.js";
|
|
63
|
-
import { T as T6 } from "./toast.taro-
|
|
63
|
+
import { T as T6 } from "./toast.taro-a907b5f5.js";
|
|
64
64
|
import { A as A3 } from "./animate.taro-37bf4eab.js";
|
|
65
65
|
import { default as default2 } from "./AnimatingNumbers.js";
|
|
66
|
-
import { A as A4 } from "./audio.taro-
|
|
66
|
+
import { A as A4 } from "./audio.taro-ef39c1d9.js";
|
|
67
67
|
import { A as A5 } from "./avatar.taro-47abbb9f.js";
|
|
68
68
|
import { A as A6 } from "./avatargroup.taro-1f8b7174.js";
|
|
69
69
|
import { C as C9 } from "./circleprogress.taro-417e1d3f.js";
|
|
70
|
-
import { C as C10 } from "./collapse.taro-
|
|
70
|
+
import { C as C10 } from "./collapse.taro-4a3e417c.js";
|
|
71
71
|
import { C as C11 } from "./collapseitem.taro-e99fb1a2.js";
|
|
72
|
-
import { C as C12 } from "./countdown.taro-
|
|
72
|
+
import { C as C12 } from "./countdown.taro-7caa9578.js";
|
|
73
73
|
import { E as E3 } from "./ellipsis.taro-21b13b31.js";
|
|
74
|
-
import { I as I5 } from "./imagepreview.taro-
|
|
74
|
+
import { I as I5 } from "./imagepreview.taro-bc96904b.js";
|
|
75
75
|
import { I as I6 } from "./indicator.taro-4ed0d6da.js";
|
|
76
|
-
import { P as P5 } from "./pagination.taro-
|
|
76
|
+
import { P as P5 } from "./pagination.taro-47fad28d.js";
|
|
77
77
|
import { P as P6 } from "./price.taro-0bd3f07a.js";
|
|
78
78
|
import { P as P7 } from "./progress.taro-421575b9.js";
|
|
79
79
|
import { S as S12 } from "./step.taro-dd522794.js";
|
|
80
80
|
import { S as S13 } from "./steps.taro-0680ae4f.js";
|
|
81
81
|
import { default as default3 } from "./Swiper.js";
|
|
82
82
|
import { S as S14 } from "./swiperitem.taro-da39a67b.js";
|
|
83
|
-
import { T as T7 } from "./table.taro-
|
|
83
|
+
import { T as T7 } from "./table.taro-072907bf.js";
|
|
84
84
|
import { T as T8 } from "./tag.taro-518b9c70.js";
|
|
85
85
|
import { T as T9 } from "./tour.taro-3299d7a2.js";
|
|
86
86
|
import { V } from "./video.taro-672ca6b8.js";
|
|
@@ -88,24 +88,27 @@ import { V as V2 } from "./virtuallist.taro-e552d954.js";
|
|
|
88
88
|
import { B as B5 } from "./barrage.taro-d77c34b4.js";
|
|
89
89
|
import { C as C13 } from "./card.taro-c0e9cfba.js";
|
|
90
90
|
import { T as T10 } from "./timedetail.taro-958b8c07.js";
|
|
91
|
-
import { T as T11 } from "./timeselect.taro-
|
|
91
|
+
import { T as T11 } from "./timeselect.taro-6e9fc4d4.js";
|
|
92
92
|
import { T as T12 } from "./trendarrow.taro-53d6e250.js";
|
|
93
|
-
import { W } from "./watermark.taro-
|
|
93
|
+
import { W } from "./watermark.taro-311b59d2.js";
|
|
94
94
|
import "react";
|
|
95
95
|
import "classnames";
|
|
96
96
|
import "@nutui/icons-react-taro";
|
|
97
97
|
import "@tarojs/taro";
|
|
98
98
|
import "./typings-11d83a22.js";
|
|
99
|
+
import "./index-21e61675.js";
|
|
99
100
|
import "@tarojs/components";
|
|
100
101
|
import "react-transition-group";
|
|
101
102
|
import "./UserContext-ab42ba7f.js";
|
|
102
103
|
import "./use-client-rect-2bb6c562.js";
|
|
103
104
|
import "./can-use-dom-0e539bd3.js";
|
|
104
105
|
import "./context-f32a9246.js";
|
|
105
|
-
import "./use-props-value-
|
|
106
|
+
import "./use-props-value-c78cbf9b.js";
|
|
107
|
+
import "./use-force-update-9cd7c164.js";
|
|
106
108
|
import "./raf-a9ff50ad.js";
|
|
107
109
|
import "./use-touch-ff43512c.js";
|
|
108
110
|
import "./index-e3184f19.js";
|
|
111
|
+
import "./use-custom-event-e1689884.js";
|
|
109
112
|
import "react-dom";
|
|
110
113
|
import "./context-ab42ba7f.js";
|
|
111
114
|
import "./ConfigProvider.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useMemo } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
4
|
-
import { u as usePropsValue } from "./use-props-value-
|
|
3
|
+
import { u as useConfig } from "./configprovider.taro-c5ff4877.js";
|
|
4
|
+
import { u as usePropsValue } from "./use-props-value-c78cbf9b.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
6
6
|
const defaultProps = {
|
|
7
7
|
...ComponentDefaults,
|
|
@@ -6,8 +6,8 @@ import { P as Popup } from "./popup.taro-487eb86e.js";
|
|
|
6
6
|
import { u as useTouch } from "./use-touch-ff43512c.js";
|
|
7
7
|
import { g as getRectByTaro } from "./use-client-rect-2bb6c562.js";
|
|
8
8
|
import { c as canUseDom } from "./can-use-dom-0e539bd3.js";
|
|
9
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
10
|
-
import { u as usePropsValue } from "./use-props-value-
|
|
9
|
+
import { u as useConfig } from "./configprovider.taro-c5ff4877.js";
|
|
10
|
+
import { u as usePropsValue } from "./use-props-value-c78cbf9b.js";
|
|
11
11
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
12
12
|
let passiveSupported = false;
|
|
13
13
|
if (canUseDom) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useRef, useState } from "react";
|
|
2
2
|
import { View } from "@tarojs/components";
|
|
3
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
3
|
+
import { u as useConfig } from "./configprovider.taro-c5ff4877.js";
|
|
4
4
|
import { u as useTouch } from "./use-touch-ff43512c.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
6
6
|
function bound(position, min, max) {
|
|
@@ -2,7 +2,7 @@ import React__default, { useCallback, useContext } from "react";
|
|
|
2
2
|
import { CheckChecked, CheckNormal } from "@nutui/icons-react-taro";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
5
|
-
import { u as usePropsValue } from "./use-props-value-
|
|
5
|
+
import { u as usePropsValue } from "./use-props-value-c78cbf9b.js";
|
|
6
6
|
const RadioContext = React__default.createContext(null);
|
|
7
7
|
const defaultProps$1 = {
|
|
8
8
|
labelPosition: "right",
|
|
@@ -4,7 +4,7 @@ import { View } from "@tarojs/components";
|
|
|
4
4
|
import { u as useTouch } from "./use-touch-ff43512c.js";
|
|
5
5
|
import { g as getRectByTaro } from "./use-client-rect-2bb6c562.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
7
|
-
import { u as usePropsValue } from "./use-props-value-
|
|
7
|
+
import { u as usePropsValue } from "./use-props-value-c78cbf9b.js";
|
|
8
8
|
const defaultProps = {
|
|
9
9
|
...ComponentDefaults,
|
|
10
10
|
range: false,
|
|
@@ -2,7 +2,7 @@ import React__default, { useState, useEffect } from "react";
|
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { StarFillN } from "@nutui/icons-react-taro";
|
|
4
4
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
5
|
-
import { u as usePropsValue } from "./use-props-value-
|
|
5
|
+
import { u as usePropsValue } from "./use-props-value-c78cbf9b.js";
|
|
6
6
|
const defaultProps = {
|
|
7
7
|
...ComponentDefaults,
|
|
8
8
|
count: 5,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useRef, useState, useEffect } from "react";
|
|
2
2
|
import { Search, CircleClose } from "@nutui/icons-react-taro";
|
|
3
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
3
|
+
import { u as useConfig } from "./configprovider.taro-c5ff4877.js";
|
|
4
4
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
5
5
|
const defaultProps = {
|
|
6
6
|
...ComponentDefaults,
|
|
@@ -2,9 +2,9 @@ import React__default, { useMemo, useEffect } from "react";
|
|
|
2
2
|
import { Tips } from "@nutui/icons-react-taro";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { P as Popup } from "./popup.taro-487eb86e.js";
|
|
5
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
5
|
+
import { u as useConfig } from "./configprovider.taro-c5ff4877.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
7
|
-
import { u as usePropsValue } from "./use-props-value-
|
|
7
|
+
import { u as usePropsValue } from "./use-props-value-c78cbf9b.js";
|
|
8
8
|
const defaultProps = {
|
|
9
9
|
...ComponentDefaults,
|
|
10
10
|
value: "",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from "react";
|
|
2
2
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
3
|
-
import { u as usePropsValue } from "./use-props-value-
|
|
3
|
+
import { u as usePropsValue } from "./use-props-value-c78cbf9b.js";
|
|
4
4
|
const defaultProps = {
|
|
5
5
|
...ComponentDefaults,
|
|
6
6
|
disabled: false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
4
|
-
import { u as usePropsValue } from "./use-props-value-
|
|
4
|
+
import { u as usePropsValue } from "./use-props-value-c78cbf9b.js";
|
|
5
5
|
import { T as TabbarItem } from "./tabbaritem.taro-1d27af28.js";
|
|
6
6
|
const defaultProps = {
|
|
7
7
|
...ComponentDefaults,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useState, useEffect } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { DownArrow } from "@nutui/icons-react-taro";
|
|
4
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
4
|
+
import { u as useConfig } from "./configprovider.taro-c5ff4877.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
6
6
|
const defaultProps = {
|
|
7
7
|
...ComponentDefaults,
|
|
@@ -5,7 +5,8 @@ import { JoySmile } from "@nutui/icons-react-taro";
|
|
|
5
5
|
import Taro, { nextTick } from "@tarojs/taro";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
7
7
|
import { T as TabPane } from "./tabpane.taro-d0eea168.js";
|
|
8
|
-
import { u as usePropsValue
|
|
8
|
+
import { u as usePropsValue } from "./use-props-value-c78cbf9b.js";
|
|
9
|
+
import { u as useForceUpdate } from "./use-force-update-9cd7c164.js";
|
|
9
10
|
import { r as requestAniFrame } from "./raf-a9ff50ad.js";
|
|
10
11
|
const defaultProps = {
|
|
11
12
|
...ComponentDefaults,
|
|
@@ -2,9 +2,9 @@ import React__default, { useRef } from "react";
|
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import Taro from "@tarojs/taro";
|
|
4
4
|
import { Textarea } from "@tarojs/components";
|
|
5
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
5
|
+
import { u as useConfig } from "./configprovider.taro-c5ff4877.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
7
|
-
import { u as usePropsValue } from "./use-props-value-
|
|
7
|
+
import { u as usePropsValue } from "./use-props-value-c78cbf9b.js";
|
|
8
8
|
const defaultProps = {
|
|
9
9
|
...ComponentDefaults,
|
|
10
10
|
defaultValue: "",
|
|
@@ -3,7 +3,7 @@ import classNames from "classnames";
|
|
|
3
3
|
import { P as Popup } from "./popup.taro-487eb86e.js";
|
|
4
4
|
import { T as TimeDetail } from "./timedetail.taro-958b8c07.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
6
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
6
|
+
import { u as useConfig } from "./configprovider.taro-c5ff4877.js";
|
|
7
7
|
const defaultProps = {
|
|
8
8
|
...ComponentDefaults,
|
|
9
9
|
visible: false,
|
|
@@ -3,6 +3,7 @@ import classNames from "classnames";
|
|
|
3
3
|
import { Success, Failure, Tips, Loading } from "@nutui/icons-react-taro";
|
|
4
4
|
import { O as Overlay } from "./overlay.taro-626840fc.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
6
|
+
import { u as useParams, a as useCustomEvent, b as useCustomEventsPath, c as customEvents } from "./use-custom-event-e1689884.js";
|
|
6
7
|
const defaultProps = {
|
|
7
8
|
...ComponentDefaults,
|
|
8
9
|
id: "",
|
|
@@ -24,38 +25,46 @@ const defaultProps = {
|
|
|
24
25
|
};
|
|
25
26
|
const classPrefix = "nut-toast";
|
|
26
27
|
const Toast = (props) => {
|
|
27
|
-
const {
|
|
28
|
+
const { params: { id, position, contentStyle, icon, iconSize, msg, duration, type, title, closeOnOverlayClick, lockScroll, contentClassName, size, visible, className, style, onClose }, setParams } = useParams({ ...defaultProps, ...props });
|
|
28
29
|
let timer;
|
|
29
30
|
const [openState, SetOpenState] = useState(false);
|
|
30
31
|
useEffect(() => {
|
|
31
32
|
if (visible) {
|
|
32
|
-
|
|
33
|
-
show();
|
|
33
|
+
show2();
|
|
34
34
|
} else {
|
|
35
|
-
|
|
35
|
+
hide2();
|
|
36
36
|
}
|
|
37
37
|
}, [visible]);
|
|
38
|
+
useCustomEvent(id, ({ status, options }) => {
|
|
39
|
+
if (status) {
|
|
40
|
+
setParams(options);
|
|
41
|
+
show2();
|
|
42
|
+
} else {
|
|
43
|
+
hide2();
|
|
44
|
+
}
|
|
45
|
+
});
|
|
38
46
|
const clearTimer = () => {
|
|
39
47
|
if (timer) {
|
|
40
48
|
clearTimeout(timer);
|
|
41
49
|
timer = null;
|
|
42
50
|
}
|
|
43
51
|
};
|
|
44
|
-
const
|
|
52
|
+
const hide2 = () => {
|
|
45
53
|
SetOpenState(false);
|
|
46
|
-
onClose();
|
|
54
|
+
onClose == null ? void 0 : onClose();
|
|
47
55
|
};
|
|
48
|
-
const
|
|
56
|
+
const show2 = () => {
|
|
49
57
|
clearTimer();
|
|
58
|
+
SetOpenState(true);
|
|
50
59
|
if (duration) {
|
|
51
60
|
timer = window.setTimeout(() => {
|
|
52
|
-
|
|
61
|
+
hide2();
|
|
53
62
|
}, duration * 1e3);
|
|
54
63
|
}
|
|
55
64
|
};
|
|
56
65
|
const clickCover = () => {
|
|
57
66
|
if (closeOnOverlayClick) {
|
|
58
|
-
|
|
67
|
+
hide2();
|
|
59
68
|
}
|
|
60
69
|
};
|
|
61
70
|
const hasIcon = () => {
|
|
@@ -97,8 +106,18 @@ const Toast = (props) => {
|
|
|
97
106
|
)
|
|
98
107
|
) : null);
|
|
99
108
|
};
|
|
109
|
+
function show(selector, options) {
|
|
110
|
+
const path = useCustomEventsPath(selector);
|
|
111
|
+
customEvents.trigger(path, { status: true, options });
|
|
112
|
+
}
|
|
113
|
+
function hide(selector) {
|
|
114
|
+
const path = useCustomEventsPath(selector);
|
|
115
|
+
customEvents.trigger(path, { status: false });
|
|
116
|
+
}
|
|
100
117
|
Toast.defaultProps = defaultProps;
|
|
101
118
|
Toast.displayName = "NutToast";
|
|
119
|
+
Toast.show = show;
|
|
120
|
+
Toast.hide = hide;
|
|
102
121
|
export {
|
|
103
122
|
Toast as T
|
|
104
123
|
};
|
|
@@ -24,6 +24,7 @@ export interface BasicDialogProps {
|
|
|
24
24
|
onConfirm?: (e?: MouseEvent<HTMLButtonElement>) => Promise<() => void> | void;
|
|
25
25
|
onCancel?: () => void;
|
|
26
26
|
onClick?: () => void;
|
|
27
|
+
onOverlayClick?: () => void;
|
|
27
28
|
}
|
|
28
29
|
export type DialogReturnProps = {
|
|
29
30
|
update: (newConfig: ConfirmProps) => void;
|
|
@@ -7,5 +7,5 @@ interface ContentProps {
|
|
|
7
7
|
footerDirection: string;
|
|
8
8
|
onClick: (event: ITouchEvent) => void;
|
|
9
9
|
}
|
|
10
|
-
export declare const Content: FunctionComponent<Partial<ContentProps> & Omit<HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
10
|
+
export declare const Content: FunctionComponent<Partial<ContentProps> & Omit<HTMLAttributes<HTMLDivElement>, 'onClick' | 'title'>>;
|
|
11
11
|
export {};
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
2
|
import { BasicDialogProps } from './config';
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
import { BasicComponent } from '@/utils/typings';
|
|
4
|
+
export type DialogProps = BasicDialogProps & BasicComponent;
|
|
5
|
+
declare const defaultProps: DialogProps;
|
|
6
|
+
export declare const BaseDialog: FunctionComponent<Partial<DialogProps>> & {
|
|
7
|
+
open: typeof open;
|
|
8
|
+
close: typeof close;
|
|
9
|
+
};
|
|
10
|
+
export declare function open(selector: string, options: Partial<typeof defaultProps>): void;
|
|
11
|
+
export declare function close(selector: string): void;
|
|
12
|
+
export {};
|
|
@@ -19,4 +19,15 @@ export interface ToastProps extends BasicComponent {
|
|
|
19
19
|
visible: boolean;
|
|
20
20
|
onClose: () => void;
|
|
21
21
|
}
|
|
22
|
-
export declare const Toast: FunctionComponent<Partial<ToastProps> & React.HTMLAttributes<HTMLDivElement
|
|
22
|
+
export declare const Toast: FunctionComponent<Partial<ToastProps> & React.HTMLAttributes<HTMLDivElement>> & {
|
|
23
|
+
show: typeof show;
|
|
24
|
+
hide: typeof hide;
|
|
25
|
+
};
|
|
26
|
+
export interface ToastOptions {
|
|
27
|
+
title: string;
|
|
28
|
+
msg?: string;
|
|
29
|
+
type?: string;
|
|
30
|
+
duration?: number;
|
|
31
|
+
}
|
|
32
|
+
export declare function show(selector: string, options: ToastOptions): void;
|
|
33
|
+
export declare function hide(selector: string): void;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export declare const customEvents: TaroGeneral.Events;
|
|
2
2
|
export declare function useCustomEventsPath(selector: string): string;
|
|
3
3
|
export declare function useCustomEvent(selector: string, cb: any): (<T = any>(args: T) => void)[];
|
|
4
|
+
export declare function useParams<T = any>(args: T): {
|
|
5
|
+
params: T;
|
|
6
|
+
setParams: (args: T) => void;
|
|
7
|
+
};
|
|
@@ -11,7 +11,7 @@ import { Failure, Loading, Link, Del, Photograph } from "@nutui/icons-react-taro
|
|
|
11
11
|
import { Image } from "@tarojs/components";
|
|
12
12
|
import { B as Button } from "./button.taro-25f559e1.js";
|
|
13
13
|
import { P as Progress } from "./progress.taro-421575b9.js";
|
|
14
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
14
|
+
import { u as useConfig } from "./configprovider.taro-c5ff4877.js";
|
|
15
15
|
import { i as isPromise } from "./index-e3184f19.js";
|
|
16
16
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
17
17
|
class UploadOptions {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
import { i as isEqual } from "./index-21e61675.js";
|
|
3
|
+
import { Events, getCurrentInstance } from "@tarojs/taro";
|
|
4
|
+
import { u as useForceUpdate } from "./use-force-update-9cd7c164.js";
|
|
5
|
+
const customEvents = new Events();
|
|
6
|
+
function useCustomEventsPath(selector) {
|
|
7
|
+
var _a;
|
|
8
|
+
const path = (_a = getCurrentInstance().router) == null ? void 0 : _a.path;
|
|
9
|
+
return path ? `${path}__${selector}` : selector;
|
|
10
|
+
}
|
|
11
|
+
function useCustomEvent(selector, cb) {
|
|
12
|
+
const path = useCustomEventsPath(selector);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
customEvents.on(path, cb);
|
|
15
|
+
return () => {
|
|
16
|
+
customEvents.off(path);
|
|
17
|
+
};
|
|
18
|
+
}, []);
|
|
19
|
+
const trigger = (args) => {
|
|
20
|
+
customEvents.trigger(path, args);
|
|
21
|
+
};
|
|
22
|
+
const off = () => {
|
|
23
|
+
customEvents.off(path);
|
|
24
|
+
};
|
|
25
|
+
return [trigger, off];
|
|
26
|
+
}
|
|
27
|
+
function useParams(args) {
|
|
28
|
+
const forceUpdate = useForceUpdate();
|
|
29
|
+
const stateRef = useRef(args);
|
|
30
|
+
const currentRef = useRef();
|
|
31
|
+
const previousRef = useRef();
|
|
32
|
+
if (!isEqual(currentRef.current, args)) {
|
|
33
|
+
previousRef.current = currentRef.current;
|
|
34
|
+
currentRef.current = args;
|
|
35
|
+
stateRef.current = args;
|
|
36
|
+
}
|
|
37
|
+
const setParams = (args2) => {
|
|
38
|
+
stateRef.current = { ...stateRef.current, ...args2 };
|
|
39
|
+
forceUpdate();
|
|
40
|
+
};
|
|
41
|
+
const params = stateRef.current;
|
|
42
|
+
return { params, setParams };
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
useCustomEvent as a,
|
|
46
|
+
useCustomEventsPath as b,
|
|
47
|
+
customEvents as c,
|
|
48
|
+
useParams as u
|
|
49
|
+
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const [, updateState] = React__default.useState();
|
|
4
|
-
return React__default.useCallback(() => updateState({}), []);
|
|
5
|
-
}
|
|
1
|
+
import { useRef, useCallback } from "react";
|
|
2
|
+
import { u as useForceUpdate } from "./use-force-update-9cd7c164.js";
|
|
6
3
|
function usePropsValue({ value, defaultValue, finalValue, onChange = (value2) => {
|
|
7
4
|
} }) {
|
|
8
5
|
const forceUpdate = useForceUpdate();
|
|
@@ -22,6 +19,5 @@ function usePropsValue({ value, defaultValue, finalValue, onChange = (value2) =>
|
|
|
22
19
|
return [stateRef.current, setState];
|
|
23
20
|
}
|
|
24
21
|
export {
|
|
25
|
-
useForceUpdate as a,
|
|
26
22
|
usePropsValue as u
|
|
27
23
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useState, useEffect } from "react";
|
|
2
2
|
import { getSystemInfo, createOffscreenCanvas } from "@tarojs/taro";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
import { u as useConfig } from "./configprovider.taro-
|
|
4
|
+
import { u as useConfig } from "./configprovider.taro-c5ff4877.js";
|
|
5
5
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
6
6
|
const defaultProps = {
|
|
7
7
|
...ComponentDefaults,
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/tr-TR.js
CHANGED