@nutui/nutui-react-taro 2.5.2 → 2.6.1
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 +29 -5
- package/dist/esm/ActionSheet.js +1 -1
- package/dist/esm/Address.js +1 -1
- package/dist/esm/Audio.js +1 -1
- package/dist/esm/AvatarCropper.js +1 -1
- package/dist/esm/Calendar.js +1 -1
- package/dist/esm/Cascader.js +1 -1
- package/dist/esm/Cell.js +1 -1
- package/dist/esm/CellGroup.js +1 -1
- package/dist/esm/DatePicker.js +1 -1
- package/dist/esm/Dialog.js +1 -1
- package/dist/esm/FixedNav.js +1 -1
- package/dist/esm/Form/style/style.css +1 -1
- package/dist/esm/Form.js +2 -2
- package/dist/esm/FormItem.js +1 -1
- package/dist/esm/ImagePreview/style/style.css +1 -1
- package/dist/esm/ImagePreview.js +1 -1
- package/dist/esm/Input.js +1 -1
- package/dist/esm/Menu.js +1 -1
- package/dist/esm/MenuItem.js +1 -1
- package/dist/esm/NumberKeyboard.js +1 -1
- package/dist/esm/Overlay.js +1 -1
- package/dist/esm/Picker.js +1 -1
- package/dist/esm/Popover.js +1 -1
- package/dist/esm/Popup.js +1 -1
- package/dist/esm/PullToRefresh.js +1 -1
- package/dist/esm/Range.js +1 -1
- package/dist/esm/ShortPassword.js +1 -1
- package/dist/esm/SideNavBar.js +1 -1
- package/dist/esm/Swipe.js +1 -1
- package/dist/esm/Swiper/style/index.js +0 -1
- package/dist/esm/Swiper/style/style.css +1 -1
- package/dist/esm/Swiper.js +14 -8
- package/dist/esm/TimeSelect.js +1 -1
- package/dist/esm/Toast.js +1 -1
- package/dist/esm/Tour.js +1 -1
- package/dist/esm/{actionsheet.taro-C5BqWoML.js → actionsheet.taro-Dpjoa3xo.js} +1 -1
- package/dist/esm/{address.taro-CQmN9x1W.js → address.taro-C7tIIp3x.js} +2 -2
- package/dist/esm/{audio.taro-BEskw47C.js → audio.taro-2hRKQ2Lk.js} +1 -1
- package/dist/esm/{avatarcropper.taro-CsVKBnvS.js → avatarcropper.taro-Dd4pAR3N.js} +1 -1
- package/dist/esm/{calendar.taro-DbHJEx4G.js → calendar.taro-DEsLc-lS.js} +1 -1
- package/dist/esm/{cascader.taro-7Xhq98L4.js → cascader.taro-CFcAyFL-.js} +1 -1
- package/dist/esm/{cell.taro-CCnLF6RC.js → cell.taro-CmI4m0SC.js} +1 -1
- package/dist/esm/{cellgroup.taro-Dz69kT6e.js → cellgroup.taro-CYsSk-Bt.js} +1 -1
- package/dist/esm/{datepicker.taro-FiLalMAA.js → datepicker.taro-Bgq3ZNDe.js} +1 -1
- package/dist/esm/{dialog.taro-B8Usf0kl.js → dialog.taro-x_jRYew5.js} +1 -1
- package/dist/esm/{fixednav.taro-WTBxWxOo.js → fixednav.taro-CJUDQcX1.js} +1 -1
- package/dist/esm/{formitem.taro-Brz5dj_8.js → formitem.taro-DDNlpN_O.js} +1 -1
- package/dist/esm/{imagepreview.taro-Bb1TkBCV.js → imagepreview.taro-BMlwAhT0.js} +1 -1
- package/dist/esm/{input.taro-Dh6zXTLQ.js → input.taro-CAZ-rRMH.js} +2 -1
- package/dist/esm/{menu.taro-BAiJPGR7.js → menu.taro-J7oZoaGM.js} +1 -1
- package/dist/esm/{menuitem.taro-oLv6ZYC5.js → menuitem.taro-CaI5vTha.js} +1 -1
- package/dist/esm/{numberkeyboard.taro-B9rMgy7D.js → numberkeyboard.taro-DjxjkImT.js} +1 -1
- package/dist/esm/nutui-react.es.js +29 -29
- package/dist/esm/{overlay.taro-BaBu-3-F.js → overlay.taro--1Kf1D7C.js} +1 -1
- package/dist/esm/{picker.taro-Cmng9GW9.js → picker.taro-DR2HAkv6.js} +3 -3
- package/dist/esm/{popover.taro-BG0msyw5.js → popover.taro-MnR5htLt.js} +1 -1
- package/dist/esm/{popup.taro-Iy_WQZ-m.js → popup.taro-B7_iPgl4.js} +1 -1
- package/dist/esm/{pulltorefresh.taro-DfVmOGuo.js → pulltorefresh.taro-Ck1i2xRr.js} +1 -1
- package/dist/esm/{range.taro-GsWDprz5.js → range.taro-CsC41L60.js} +1 -1
- package/dist/esm/{shortpassword.taro-BXsxku33.js → shortpassword.taro-GkcE-e__.js} +1 -1
- package/dist/esm/{sidenavbar.taro-eK5vaZPR.js → sidenavbar.taro-5d-6iiNq.js} +1 -1
- package/dist/esm/{swipe.taro-aEnunftO.js → swipe.taro-CavqgBEb.js} +1 -1
- package/dist/esm/{timeselect.taro-BXq4APSJ.js → timeselect.taro-DkdpBJlT.js} +1 -1
- package/dist/esm/{toast.taro-BVXqvjNJ.js → toast.taro-B0YEmeDn.js} +1 -1
- package/dist/esm/{tour.taro-BqlNfxdD.js → tour.taro-CdX6pugO.js} +1 -1
- package/dist/esm/{use-touch-OfEaR5qi.js → use-touch-BeiLHDO9.js} +13 -3
- 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 +30 -13
- package/dist/nutui.react.umd.js +30 -13
- package/dist/packages/form/form.scss +0 -3
- package/dist/packages/swiper/swiper.scss +30 -16
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/types/packages/input/input.taro.d.ts +1 -1
- package/dist/types/packages/swiper/effects/default.d.ts +11 -0
- package/dist/types/packages/swiper/effects/focus.d.ts +21 -0
- package/dist/types/packages/swiper/index.d.ts +4 -2
- package/dist/types/packages/swiper/swiper.d.ts +12 -15
- package/dist/types/packages/swiper/types.d.ts +6 -0
- package/dist/types/packages/swiperitem/swiperitem.d.ts +8 -4
- package/dist/types/utils/use-lock-fn.d.ts +2 -0
- package/dist/types/utils/use-ref-state.d.ts +3 -0
- package/dist/types/utils/use-touch.d.ts +3 -1
- package/package.json +1 -1
- package/dist/types/packages/picker/doc.en.d.ts +0 -145
package/dist/style.mjs
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { SpringValue } from '@react-spring/web';
|
|
3
|
+
type DefaultEffect = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
getSpringsAxis: () => SpringValue<number>;
|
|
6
|
+
isVertical: boolean;
|
|
7
|
+
loop: boolean;
|
|
8
|
+
count: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const defaultEffect: (args: DefaultEffect) => React.JSX.Element[] | null | undefined;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export interface FocusEffect {
|
|
3
|
+
name: 'focus';
|
|
4
|
+
scale: number;
|
|
5
|
+
}
|
|
6
|
+
type DefaultEffect = {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
springs: any;
|
|
9
|
+
isVertical: boolean;
|
|
10
|
+
loop: boolean;
|
|
11
|
+
count: number;
|
|
12
|
+
current: React.MutableRefObject<number>;
|
|
13
|
+
swiperDirection: React.MutableRefObject<number>;
|
|
14
|
+
effect: FocusEffect;
|
|
15
|
+
transforms: React.MutableRefObject<number[]>;
|
|
16
|
+
dragging: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const focusEffect: (args: DefaultEffect) => React.JSX.Element[] | null | undefined;
|
|
19
|
+
export declare const useList: (effect: FocusEffect | undefined, count: number, current: React.MutableRefObject<number>) => [React.MutableRefObject<number[]>, (p: number[]) => void];
|
|
20
|
+
export declare const updateTransform: (transforms: React.MutableRefObject<number[]>, setTransforms: any, effect: FocusEffect, page: number) => void;
|
|
21
|
+
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SwiperProps
|
|
2
|
+
import { SwiperProps } from './swiper';
|
|
3
3
|
import SwiperItem from '../../packages/swiperitem';
|
|
4
|
-
|
|
4
|
+
import { SwiperRef } from '../../packages/swiper/types';
|
|
5
|
+
export type { SwiperProps } from './swiper';
|
|
6
|
+
export type { SwiperRef } from './types';
|
|
5
7
|
type CompoundedComponent = React.ForwardRefExoticComponent<Partial<SwiperProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & React.RefAttributes<SwiperRef>> & {
|
|
6
8
|
Item: typeof SwiperItem;
|
|
7
9
|
};
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
3
|
+
import { SwiperRef } from '../../packages/swiper/types';
|
|
4
|
+
export interface FocusEffect {
|
|
5
|
+
name: 'focus';
|
|
6
|
+
scale: number;
|
|
7
|
+
}
|
|
8
8
|
export interface SwiperProps extends BasicComponent {
|
|
9
|
-
width: number | string;
|
|
10
|
-
height: number | string;
|
|
11
|
-
duration: number | string;
|
|
12
|
-
defaultValue: number | string;
|
|
13
|
-
autoPlay: number | string;
|
|
14
9
|
direction: 'horizontal' | 'vertical';
|
|
15
10
|
indicator: ReactNode;
|
|
16
11
|
loop: boolean;
|
|
12
|
+
duration: number | string;
|
|
13
|
+
autoPlay: boolean | number;
|
|
14
|
+
defaultValue: number;
|
|
17
15
|
touchable: boolean;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
onChange?: (current: number) => void;
|
|
16
|
+
effect: FocusEffect | undefined;
|
|
17
|
+
slideSize?: number;
|
|
18
|
+
onChange?: (index: number) => void;
|
|
22
19
|
}
|
|
23
|
-
export declare const Swiper: React.ForwardRefExoticComponent<Partial<SwiperProps> &
|
|
20
|
+
export declare const Swiper: React.ForwardRefExoticComponent<Partial<SwiperProps> & React.RefAttributes<SwiperRef>>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { BasicComponent } from '../../utils/typings';
|
|
3
|
+
export interface SwiperItemProps extends BasicComponent {
|
|
4
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
5
5
|
}
|
|
6
|
-
export declare const SwiperItem:
|
|
6
|
+
export declare const SwiperItem: {
|
|
7
|
+
(props: SwiperItemProps): React.JSX.Element;
|
|
8
|
+
defaultProps: SwiperItemProps;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type Direction = '' | 'vertical' | 'horizontal';
|
|
3
3
|
export declare function useTouch(): {
|
|
4
|
+
end: (event: React.TouchEvent<HTMLElement>) => void;
|
|
4
5
|
move: (event: React.TouchEvent<HTMLElement>) => void;
|
|
5
6
|
start: (event: React.TouchEvent<HTMLElement>) => void;
|
|
6
7
|
reset: () => void;
|
|
7
|
-
touchTime: React.MutableRefObject<number
|
|
8
|
+
touchTime: React.MutableRefObject<number>;
|
|
8
9
|
startX: React.MutableRefObject<number>;
|
|
9
10
|
startY: React.MutableRefObject<number>;
|
|
10
11
|
deltaX: React.MutableRefObject<number>;
|
|
@@ -15,5 +16,6 @@ export declare function useTouch(): {
|
|
|
15
16
|
direction: React.MutableRefObject<Direction>;
|
|
16
17
|
isVertical: () => boolean;
|
|
17
18
|
isHorizontal: () => boolean;
|
|
19
|
+
last: React.MutableRefObject<boolean>;
|
|
18
20
|
};
|
|
19
21
|
export {};
|
package/package.json
CHANGED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
export declare const Internation: {
|
|
2
|
-
'zh-CN': {
|
|
3
|
-
basic: string;
|
|
4
|
-
chooseCity: string;
|
|
5
|
-
defaultSelected: string;
|
|
6
|
-
controlled: string;
|
|
7
|
-
tileDesc: string;
|
|
8
|
-
multipleColumns: string;
|
|
9
|
-
chooseTime: string;
|
|
10
|
-
cascade: string;
|
|
11
|
-
async: string;
|
|
12
|
-
theme: string;
|
|
13
|
-
validTime: string;
|
|
14
|
-
chooseDate: string;
|
|
15
|
-
always: string;
|
|
16
|
-
monday: string;
|
|
17
|
-
tuesday: string;
|
|
18
|
-
wednesday: string;
|
|
19
|
-
thursday: string;
|
|
20
|
-
friday: string;
|
|
21
|
-
morning: string;
|
|
22
|
-
afternoon: string;
|
|
23
|
-
evening: string;
|
|
24
|
-
nanJing: string;
|
|
25
|
-
wuXi: string;
|
|
26
|
-
zangZu: string;
|
|
27
|
-
beiJing: string;
|
|
28
|
-
lianYunGang: string;
|
|
29
|
-
wuhan: string;
|
|
30
|
-
yangzhou: string;
|
|
31
|
-
daQing: string;
|
|
32
|
-
suiHua: string;
|
|
33
|
-
weiFang: string;
|
|
34
|
-
shijiazhuang: string;
|
|
35
|
-
wlmq: string;
|
|
36
|
-
hangZhou: string;
|
|
37
|
-
chaoYang: string;
|
|
38
|
-
haiDian: string;
|
|
39
|
-
daXing: string;
|
|
40
|
-
dongCheng: string;
|
|
41
|
-
xiCheng: string;
|
|
42
|
-
fengTai: string;
|
|
43
|
-
shangHai: string;
|
|
44
|
-
huangPu: string;
|
|
45
|
-
changNing: string;
|
|
46
|
-
puTuo: string;
|
|
47
|
-
yangPu: string;
|
|
48
|
-
puDong: string;
|
|
49
|
-
};
|
|
50
|
-
'zh-TW': {
|
|
51
|
-
basic: string;
|
|
52
|
-
chooseCity: string;
|
|
53
|
-
defaultSelected: string;
|
|
54
|
-
controlled: string;
|
|
55
|
-
tileDesc: string;
|
|
56
|
-
multipleColumns: string;
|
|
57
|
-
chooseTime: string;
|
|
58
|
-
cascade: string;
|
|
59
|
-
async: string;
|
|
60
|
-
theme: string;
|
|
61
|
-
chooseDate: string;
|
|
62
|
-
always: string;
|
|
63
|
-
monday: string;
|
|
64
|
-
tuesday: string;
|
|
65
|
-
wednesday: string;
|
|
66
|
-
thursday: string;
|
|
67
|
-
friday: string;
|
|
68
|
-
morning: string;
|
|
69
|
-
afternoon: string;
|
|
70
|
-
evening: string;
|
|
71
|
-
nanJing: string;
|
|
72
|
-
wuXi: string;
|
|
73
|
-
zangZu: string;
|
|
74
|
-
beiJing: string;
|
|
75
|
-
lianYunGang: string;
|
|
76
|
-
wuhan: string;
|
|
77
|
-
yangzhou: string;
|
|
78
|
-
daQing: string;
|
|
79
|
-
suiHua: string;
|
|
80
|
-
weiFang: string;
|
|
81
|
-
shijiazhuang: string;
|
|
82
|
-
wlmq: string;
|
|
83
|
-
hangZhou: string;
|
|
84
|
-
chaoYang: string;
|
|
85
|
-
haiDian: string;
|
|
86
|
-
daXing: string;
|
|
87
|
-
dongCheng: string;
|
|
88
|
-
xiCheng: string;
|
|
89
|
-
fengTai: string;
|
|
90
|
-
shangHai: string;
|
|
91
|
-
huangPu: string;
|
|
92
|
-
changNing: string;
|
|
93
|
-
puTuo: string;
|
|
94
|
-
yangPu: string;
|
|
95
|
-
puDong: string;
|
|
96
|
-
};
|
|
97
|
-
'en-US': {
|
|
98
|
-
basic: string;
|
|
99
|
-
chooseCity: string;
|
|
100
|
-
defaultSelected: string;
|
|
101
|
-
controlled: string;
|
|
102
|
-
tileDesc: string;
|
|
103
|
-
multipleColumns: string;
|
|
104
|
-
chooseTime: string;
|
|
105
|
-
cascade: string;
|
|
106
|
-
async: string;
|
|
107
|
-
theme: string;
|
|
108
|
-
validTime: string;
|
|
109
|
-
chooseDate: string;
|
|
110
|
-
always: string;
|
|
111
|
-
monday: string;
|
|
112
|
-
tuesday: string;
|
|
113
|
-
wednesday: string;
|
|
114
|
-
thursday: string;
|
|
115
|
-
friday: string;
|
|
116
|
-
morning: string;
|
|
117
|
-
afternoon: string;
|
|
118
|
-
evening: string;
|
|
119
|
-
nanJing: string;
|
|
120
|
-
wuXi: string;
|
|
121
|
-
zangZu: string;
|
|
122
|
-
beiJing: string;
|
|
123
|
-
lianYunGang: string;
|
|
124
|
-
wuhan: string;
|
|
125
|
-
yangzhou: string;
|
|
126
|
-
daQing: string;
|
|
127
|
-
suiHua: string;
|
|
128
|
-
weiFang: string;
|
|
129
|
-
shijiazhuang: string;
|
|
130
|
-
wlmq: string;
|
|
131
|
-
hangZhou: string;
|
|
132
|
-
chaoYang: string;
|
|
133
|
-
haiDian: string;
|
|
134
|
-
daXing: string;
|
|
135
|
-
dongCheng: string;
|
|
136
|
-
xiCheng: string;
|
|
137
|
-
fengTai: string;
|
|
138
|
-
shangHai: string;
|
|
139
|
-
huangPu: string;
|
|
140
|
-
changNing: string;
|
|
141
|
-
puTuo: string;
|
|
142
|
-
yangPu: string;
|
|
143
|
-
puDong: string;
|
|
144
|
-
};
|
|
145
|
-
};
|