@nutui/nutui-react-taro 1.3.3 → 1.3.4
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 +21 -0
- package/README.md +3 -2
- package/dist/esm/ActionSheet.js +3 -3
- package/dist/esm/Address.js +3 -3
- package/dist/esm/Audio.js +6 -7
- package/dist/esm/Avatar.js +2 -2
- package/dist/esm/BackTop.js +2 -2
- package/dist/esm/Badge.js +2 -2
- package/dist/esm/Barrage.js +2 -2
- package/dist/esm/Button.js +2 -2
- package/dist/esm/Calendar.js +3 -3
- package/dist/esm/Card.js +3 -3
- package/dist/esm/Cascader.js +4 -4
- package/dist/esm/Cell.js +2 -2
- package/dist/esm/Checkbox.js +2 -2
- package/dist/esm/CircleProgress.js +2 -2
- package/dist/esm/CollapseItem.js +2 -2
- package/dist/esm/DatePicker.js +4 -4
- package/dist/esm/Dialog.js +3 -3
- package/dist/esm/FixedNav.js +2 -2
- package/dist/esm/GridItem.js +2 -2
- package/dist/esm/ImagePreview.js +5 -5
- package/dist/esm/Infiniteloading.js +4 -2
- package/dist/esm/Input.js +2 -2
- package/dist/esm/InputNumber.js +2 -2
- package/dist/esm/Menu.js +2 -2
- package/dist/esm/MenuItem.js +2 -2
- package/dist/esm/NavBar.js +2 -2
- package/dist/esm/NoticeBar.js +2 -2
- package/dist/esm/Notify.js +2 -3
- package/dist/esm/NumberKeyboard.js +3 -3
- package/dist/esm/Picker.js +3 -3
- package/dist/esm/Popover.js +2 -2
- package/dist/esm/Popup.js +2 -2
- package/dist/esm/Progress.js +2 -2
- package/dist/esm/PullToRefresh.js +2 -2
- package/dist/esm/Radio.js +2 -2
- package/dist/esm/Range.js +3 -5
- package/dist/esm/Rate.js +2 -2
- package/dist/esm/SearchBar.js +2 -2
- package/dist/esm/ShortPassword.js +3 -3
- package/dist/esm/SideNavBar.js +3 -3
- package/dist/esm/Signature.js +3 -3
- package/dist/esm/Skeleton.js +3 -3
- package/dist/esm/Step.js +2 -2
- package/dist/esm/Sticky/style/index.js +2 -0
- package/dist/esm/Sticky.js +5 -0
- package/dist/esm/Swiper.js +3 -3
- package/dist/esm/TabbarItem.js +2 -2
- package/dist/esm/Table.js +2 -2
- package/dist/esm/Tabs.js +2 -2
- package/dist/esm/Tag.js +2 -2
- package/dist/esm/TimeSelect.js +3 -3
- package/dist/esm/Toast.js +2 -4
- package/dist/esm/Uploader.js +8 -4
- package/dist/esm/{actionsheet.taro-08b7eab2.js → actionsheet.taro-360d8d34.js} +1 -1
- package/dist/esm/{address.taro-5f8dbfc3.js → address.taro-7540c626.js} +8 -6
- package/dist/esm/{audio.taro-327472dc.js → audio.taro-ab2528b2.js} +105 -148
- package/dist/esm/{avatar.taro-766690a4.js → avatar.taro-ec620cdd.js} +5 -3
- package/dist/esm/{backtop.taro-c414da6c.js → backtop.taro-aa8b2bc5.js} +5 -3
- package/dist/esm/{badge.taro-351d0088.js → badge.taro-38684262.js} +5 -3
- package/dist/esm/{barrage.taro-efac8422.js → barrage.taro-d86c367a.js} +3 -10
- package/dist/esm/{button.taro-7074924f.js → button.taro-a9ebb937.js} +7 -5
- package/dist/esm/{calendar.taro-156a74c0.js → calendar.taro-438940bd.js} +1 -1
- package/dist/esm/{card.taro-f81f1b5c.js → card.taro-1bc35ebe.js} +1 -1
- package/dist/esm/{cascader.taro-39402f43.js → cascader.taro-35387092.js} +2 -2
- package/dist/esm/{cell.taro-075998e0.js → cell.taro-a4c3bb7b.js} +7 -5
- package/dist/esm/{checkbox.taro-62677b5e.js → checkbox.taro-104557c1.js} +2 -2
- package/dist/esm/{circleprogress.taro-1a38e1c6.js → circleprogress.taro-3c89a157.js} +85 -51
- package/dist/esm/{collapseitem-246e1699.js → collapseitem-75843a5e.js} +13 -9
- package/dist/esm/{datepicker.taro-e0e58f39.js → datepicker.taro-1acec61f.js} +1 -1
- package/dist/esm/{dialog.taro-7e9249e7.js → dialog.taro-54c67e08.js} +8 -6
- package/dist/esm/{fixednav.taro-9ee2dbea.js → fixednav.taro-582322a1.js} +5 -3
- package/dist/esm/{griditem.taro-a2ad1edd.js → griditem.taro-866cd288.js} +5 -3
- package/dist/esm/{imagepreview.taro-99659d6a.js → imagepreview.taro-3f1c7638.js} +2 -2
- package/dist/esm/{infiniteloading.taro-aa47eb1e.js → infiniteloading.taro-9701755f.js} +84 -113
- package/dist/esm/{input.taro-32fac7f7.js → input.taro-2453d7c4.js} +9 -7
- package/dist/esm/{inputnumber.taro-83d108b3.js → inputnumber.taro-0cf7c1b7.js} +7 -5
- package/dist/esm/{menu.taro-8330048e.js → menu.taro-9345dcfd.js} +5 -3
- package/dist/esm/{menuitem.taro-818c9e83.js → menuitem.taro-fc0961b7.js} +31 -14
- package/dist/esm/{navbar.taro-05d293bb.js → navbar.taro-c931c078.js} +7 -5
- package/dist/esm/{noticebar.taro-6845f9ab.js → noticebar.taro-1fa04a96.js} +9 -7
- package/dist/esm/{notify.taro-22b8f4cd.js → notify.taro-0d9cfb07.js} +38 -5
- package/dist/esm/{numberkeyboard.taro-6ff18124.js → numberkeyboard.taro-53c350b8.js} +1 -1
- package/dist/esm/nutui-react.es.js +54 -53
- package/dist/esm/{picker.taro-a3f311a0.js → picker.taro-6a4dad23.js} +1 -1
- package/dist/esm/{popover.taro-604c3116.js → popover.taro-eddd0bd2.js} +5 -3
- package/dist/esm/{popup.taro-d74c3422.js → popup.taro-33d0bbc8.js} +5 -3
- package/dist/esm/{progress.taro-57e1a455.js → progress.taro-623bc807.js} +5 -3
- package/dist/esm/{pulltorefresh.taro-8846f019.js → pulltorefresh.taro-e66c78ad.js} +0 -0
- package/dist/esm/{radio.taro-64546f70.js → radio.taro-95d43860.js} +5 -3
- package/dist/esm/{range.taro-ef3b30f0.js → range.taro-141a0163.js} +35 -12
- package/dist/esm/{rate.taro-0119c0e9.js → rate.taro-5077b962.js} +7 -5
- package/dist/esm/{searchbar.taro-2fff1f66.js → searchbar.taro-f134fb96.js} +5 -3
- package/dist/esm/{shortpassword.taro-d39e038d.js → shortpassword.taro-2e96ca22.js} +6 -4
- package/dist/esm/{sidenavbar.taro-48b136b4.js → sidenavbar.taro-87f056cd.js} +1 -1
- package/dist/esm/{signature.taro-3dbc7030.js → signature.taro-a9286cd1.js} +1 -1
- package/dist/esm/{skeleton.taro-112de52a.js → skeleton.taro-b9ff84b9.js} +1 -1
- package/dist/esm/{step.taro-8c2ba0bb.js → step.taro-f1057500.js} +5 -3
- package/dist/esm/sticky.taro-30d4e453.js +23 -0
- package/dist/esm/{swiper.taro-448cd0ad.js → swiper.taro-58ed323b.js} +4 -4
- package/dist/esm/{tabbaritem.taro-8c0a0a3b.js → tabbaritem.taro-94cd62c2.js} +5 -3
- package/dist/esm/{table.taro-04f9ec51.js → table.taro-7ac89a6c.js} +5 -3
- package/dist/esm/{tabs.taro-7bb22cb5.js → tabs.taro-86186dff.js} +12 -13
- package/dist/esm/{tag.taro-81dcc92d.js → tag.taro-95d7f5c2.js} +5 -3
- package/dist/esm/{timeselect.taro-5b6ed203.js → timeselect.taro-73796bfc.js} +1 -1
- package/dist/esm/toast.taro-cd22a0d7.js +167 -0
- package/dist/esm/types/src/packages/audio/audio.taro.d.ts +13 -14
- package/dist/esm/types/src/packages/button/demo.d.ts +1 -0
- package/dist/esm/types/src/packages/collapseitem/collapseitem.d.ts +1 -0
- package/dist/esm/types/src/packages/drag/drag.d.ts +1 -1
- package/dist/esm/types/src/packages/drag/drag.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/fixednav/fixednav.d.ts +1 -1
- package/dist/esm/types/src/packages/fixednav/fixednav.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/griditem/griditem.d.ts +1 -1
- package/dist/esm/types/src/packages/griditem/griditem.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.d.ts +3 -3
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.taro.d.ts +4 -6
- package/dist/esm/types/src/packages/input/input.d.ts +1 -1
- package/dist/esm/types/src/packages/input/input.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/menuitem/menuitem.d.ts +1 -1
- package/dist/esm/types/src/packages/menuitem/menuitem.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +2 -1
- package/dist/esm/types/src/packages/nutui.react.d.ts +3 -1
- package/dist/esm/types/src/packages/nutui.react.scss.d.ts +1 -0
- package/dist/esm/types/src/packages/nutui.react.taro.d.ts +3 -1
- package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +2 -1
- package/dist/esm/types/src/packages/popover/popover.d.ts +1 -1
- package/dist/esm/types/src/packages/popover/popover.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/progress/progress.d.ts +1 -1
- package/dist/esm/types/src/packages/progress/progress.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/radio/radio.d.ts +1 -1
- package/dist/esm/types/src/packages/radio/radio.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/sticky/__test__/sticky.spec.d.ts +1 -0
- package/dist/esm/types/src/packages/sticky/demo.d.ts +3 -0
- package/dist/esm/types/src/packages/sticky/index.d.ts +2 -0
- package/dist/esm/types/src/packages/sticky/index.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/sticky/sticky.d.ts +13 -0
- package/dist/esm/types/src/packages/sticky/sticky.taro.d.ts +4 -0
- package/dist/esm/types/src/packages/tabs/tabs.d.ts +1 -1
- package/dist/esm/types/src/packages/tabs/tabs.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/toast/index.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/toast/toast.taro.d.ts +11 -17
- package/dist/esm/types/src/packages/uploader/demo.d.ts +1 -0
- package/dist/esm/types/src/packages/uploader/upload.d.ts +4 -0
- package/dist/esm/types/src/packages/uploader/uploader.d.ts +16 -12
- package/dist/esm/types/src/packages/uploader/uploader.taro.d.ts +39 -19
- package/dist/esm/types/src/utils/date.d.ts +1 -1
- package/dist/esm/types/src/utils/useWatch.d.ts +6 -0
- package/dist/esm/{uploader.taro-4fd5dd3c.js → uploader.taro-6184abe7.js} +181 -131
- 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/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/nutui.react.es.js +1357 -1235
- package/dist/nutui.react.umd.js +1356 -1233
- package/dist/packages/barrage/barrage.scss +7 -2
- package/dist/packages/circleprogress/circleprogress.scss +3 -0
- package/dist/packages/sticky/sticky.scss +0 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +1 -0
- package/dist/types/index.d.ts +75 -64
- package/dist/types/nutui.taro.react.build.ts +3 -1
- package/package.json +10 -5
- package/dist/esm/render-4a3856cb.js +0 -32
- package/dist/esm/toast.taro-d4ecd6af.js +0 -300
package/dist/style.es.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
@import '../../packages/divider/divider.scss';
|
|
13
13
|
@import '../../packages/grid/grid.scss';
|
|
14
14
|
@import '../../packages/griditem/griditem.scss';
|
|
15
|
+
@import '../../packages/sticky/sticky.scss';
|
|
15
16
|
@import '../../packages/navbar/navbar.scss';
|
|
16
17
|
@import '../../packages/fixednav/fixednav.scss';
|
|
17
18
|
@import '../../packages/tabbar/tabbar.scss';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { CSSProperties, ReactNode, FunctionComponent, ReactHTML, ReactElement, MouseEvent as MouseEvent$1, ChangeEvent, FocusEvent, HTMLInputTypeAttribute, MouseEventHandler, RefObject, ForwardRefExoticComponent, PropsWithChildren, Component
|
|
2
|
+
import React__default, { CSSProperties, ReactNode, FunctionComponent, ReactHTML, ReactElement, MouseEvent as MouseEvent$1, ChangeEvent, FocusEvent, HTMLInputTypeAttribute, MouseEventHandler, RefObject, ForwardRefExoticComponent, PropsWithChildren, Component } from 'react';
|
|
3
|
+
import Taro from '@tarojs/taro';
|
|
3
4
|
|
|
4
5
|
interface IComponent {
|
|
5
6
|
className?: string;
|
|
@@ -295,7 +296,6 @@ interface GridProps {
|
|
|
295
296
|
declare const Grid: FunctionComponent<Partial<GridProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
296
297
|
|
|
297
298
|
declare type GridDirection = 'horizontal' | 'vertical';
|
|
298
|
-
|
|
299
299
|
interface GridItemProps extends IComponent {
|
|
300
300
|
text: string | ReactNode;
|
|
301
301
|
icon: string | ReactNode;
|
|
@@ -314,6 +314,10 @@ interface GridItemProps extends IComponent {
|
|
|
314
314
|
}
|
|
315
315
|
declare const GridItem: FunctionComponent<Partial<GridItemProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
316
316
|
|
|
317
|
+
interface StickyProps {
|
|
318
|
+
}
|
|
319
|
+
declare const Sticky: FunctionComponent<Partial<StickyProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
320
|
+
|
|
317
321
|
interface NavBarProps$1 extends IComponent {
|
|
318
322
|
leftShow: boolean;
|
|
319
323
|
title: string;
|
|
@@ -340,7 +344,6 @@ declare type Position$2 = {
|
|
|
340
344
|
top?: string;
|
|
341
345
|
bottom?: string;
|
|
342
346
|
};
|
|
343
|
-
|
|
344
347
|
interface FixedNavProps extends IComponent {
|
|
345
348
|
fixednavClass: string;
|
|
346
349
|
visible: boolean;
|
|
@@ -435,7 +438,6 @@ declare class Title {
|
|
|
435
438
|
constructor();
|
|
436
439
|
}
|
|
437
440
|
declare type TabsSize = 'large' | 'normal' | 'small';
|
|
438
|
-
|
|
439
441
|
interface TabsProps extends IComponent {
|
|
440
442
|
className: string;
|
|
441
443
|
style: React__default.CSSProperties;
|
|
@@ -531,7 +533,6 @@ interface OptionItem {
|
|
|
531
533
|
text: string;
|
|
532
534
|
value: string | number;
|
|
533
535
|
}
|
|
534
|
-
|
|
535
536
|
interface MenuItemProps extends IComponent {
|
|
536
537
|
className: string;
|
|
537
538
|
style: React__default.CSSProperties;
|
|
@@ -732,7 +733,6 @@ declare const RadioGroup: React__default.ForwardRefExoticComponent<Partial<Radio
|
|
|
732
733
|
|
|
733
734
|
declare type Shape = 'button' | 'round';
|
|
734
735
|
declare type Position = 'right' | 'left';
|
|
735
|
-
|
|
736
736
|
interface RadioProps extends IComponent {
|
|
737
737
|
className: string;
|
|
738
738
|
style: React__default.CSSProperties;
|
|
@@ -848,7 +848,9 @@ declare const TextArea: FunctionComponent<Partial<TextAreaProps> & Omit<React__d
|
|
|
848
848
|
declare class UploadOptions {
|
|
849
849
|
url: string;
|
|
850
850
|
name: string;
|
|
851
|
+
fileType?: string | undefined;
|
|
851
852
|
formData?: FormData;
|
|
853
|
+
sourceFile: any;
|
|
852
854
|
method: string;
|
|
853
855
|
xhrState: string | number;
|
|
854
856
|
timeout: number;
|
|
@@ -859,62 +861,79 @@ declare class UploadOptions {
|
|
|
859
861
|
onProgress?: Function;
|
|
860
862
|
onSuccess?: Function;
|
|
861
863
|
onFailure?: Function;
|
|
864
|
+
beforeXhrUpload?: Function;
|
|
862
865
|
}
|
|
863
866
|
|
|
864
867
|
declare type FileType<T> = {
|
|
865
868
|
[key: string]: T;
|
|
866
869
|
};
|
|
867
870
|
declare type FileItemStatus = 'ready' | 'uploading' | 'success' | 'error' | 'removed';
|
|
871
|
+
/** 图片的尺寸 */
|
|
872
|
+
interface sizeType {
|
|
873
|
+
/** 原图 */
|
|
874
|
+
original: string;
|
|
875
|
+
/** compressed */
|
|
876
|
+
compressed: string;
|
|
877
|
+
}
|
|
878
|
+
/** 图片的来源 */
|
|
879
|
+
interface sourceType {
|
|
880
|
+
/** 从相册选图 */
|
|
881
|
+
album: string;
|
|
882
|
+
/** 使用相机 */
|
|
883
|
+
camera: string;
|
|
884
|
+
/** 使用前置摄像头(仅H5纯浏览器使用) */
|
|
885
|
+
user: string;
|
|
886
|
+
/** 使用后置摄像头(仅H5纯浏览器) */
|
|
887
|
+
environment: string;
|
|
888
|
+
}
|
|
868
889
|
|
|
869
890
|
interface UploaderProps extends IComponent {
|
|
870
891
|
url: string;
|
|
871
892
|
maximum: string | number;
|
|
893
|
+
sizeType: (keyof sizeType)[];
|
|
894
|
+
sourceType: (keyof sourceType)[];
|
|
872
895
|
maximize: number;
|
|
873
896
|
defaultFileList: FileType<string>[];
|
|
874
897
|
listType: string;
|
|
875
898
|
uploadIcon: string;
|
|
876
899
|
uploadIconSize: string | number;
|
|
877
900
|
name: string;
|
|
878
|
-
accept: string;
|
|
879
901
|
disabled: boolean;
|
|
880
902
|
autoUpload: boolean;
|
|
881
|
-
multiple: boolean;
|
|
882
903
|
timeout: number;
|
|
883
904
|
data: object;
|
|
884
905
|
method: string;
|
|
885
906
|
xhrState: number | string;
|
|
886
907
|
headers: object;
|
|
887
|
-
withCredentials: boolean;
|
|
888
|
-
clearInput: boolean;
|
|
889
908
|
isPreview: boolean;
|
|
890
909
|
isDeletable: boolean;
|
|
891
|
-
capture: boolean;
|
|
892
910
|
className: string;
|
|
893
911
|
defaultImg: string;
|
|
894
912
|
style: React__default.CSSProperties;
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
913
|
+
onStart?: (option: UploadOptions) => void;
|
|
914
|
+
onRemove?: (file: FileItem, fileList: FileType<string>[]) => void;
|
|
915
|
+
onSuccess?: (param: {
|
|
898
916
|
responseText: XMLHttpRequest['responseText'];
|
|
899
917
|
option: UploadOptions;
|
|
900
918
|
}) => void;
|
|
901
|
-
|
|
919
|
+
onProgress?: (param: {
|
|
902
920
|
e: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
903
921
|
option: UploadOptions;
|
|
922
|
+
percentage: string | number;
|
|
904
923
|
}) => void;
|
|
905
|
-
|
|
924
|
+
onFailure?: (param: {
|
|
906
925
|
responseText: XMLHttpRequest['responseText'];
|
|
907
926
|
option: UploadOptions;
|
|
908
927
|
}) => void;
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
fileList:
|
|
913
|
-
event: React__default.ChangeEvent<HTMLInputElement>;
|
|
928
|
+
onUpdate?: (fileList: FileType<string>[]) => void;
|
|
929
|
+
onOversize?: (file: Taro.chooseImage.ImageFile[]) => void;
|
|
930
|
+
onChange?: (param: {
|
|
931
|
+
fileList: FileType<string>[];
|
|
914
932
|
}) => void;
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
933
|
+
onBeforeUpload?: (file: Taro.chooseImage.ImageFile[]) => Promise<any[]>;
|
|
934
|
+
onBeforeXhrUpload?: (xhr: XMLHttpRequest, options: any) => void;
|
|
935
|
+
onBeforeDelete?: (file: FileItem, files: FileType<string>[]) => boolean;
|
|
936
|
+
onFileItemClick?: (file: FileItem) => void;
|
|
918
937
|
}
|
|
919
938
|
declare class FileItem {
|
|
920
939
|
status: FileItemStatus;
|
|
@@ -923,7 +942,9 @@ declare class FileItem {
|
|
|
923
942
|
name?: string;
|
|
924
943
|
url?: string;
|
|
925
944
|
type?: string;
|
|
926
|
-
|
|
945
|
+
path?: string;
|
|
946
|
+
percentage: string | number;
|
|
947
|
+
formData: any;
|
|
927
948
|
}
|
|
928
949
|
declare const Uploader: React__default.ForwardRefExoticComponent<Partial<UploaderProps> & {
|
|
929
950
|
children?: React__default.ReactNode;
|
|
@@ -1078,7 +1099,7 @@ declare const BackTop: FunctionComponent<Partial<BackTopProps> & Omit<React__def
|
|
|
1078
1099
|
|
|
1079
1100
|
interface DragProps {
|
|
1080
1101
|
attract: boolean;
|
|
1081
|
-
direction:
|
|
1102
|
+
direction: 'x' | 'y' | 'lock' | undefined;
|
|
1082
1103
|
boundary: {
|
|
1083
1104
|
top: number;
|
|
1084
1105
|
left: number;
|
|
@@ -1141,10 +1162,8 @@ declare const Dialog: DialogComponent;
|
|
|
1141
1162
|
|
|
1142
1163
|
interface InfiniteloadingProps extends IComponent {
|
|
1143
1164
|
hasMore: boolean;
|
|
1144
|
-
|
|
1165
|
+
upperThreshold: number;
|
|
1145
1166
|
containerId: string;
|
|
1146
|
-
useWindow: boolean;
|
|
1147
|
-
useCapture: boolean;
|
|
1148
1167
|
isOpenRefresh: boolean;
|
|
1149
1168
|
pullIcon: string;
|
|
1150
1169
|
pullTxt: string;
|
|
@@ -1153,9 +1172,9 @@ interface InfiniteloadingProps extends IComponent {
|
|
|
1153
1172
|
loadMoreTxt: string;
|
|
1154
1173
|
className: string;
|
|
1155
1174
|
style: React__default.CSSProperties;
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1175
|
+
onRefresh: (param: () => void) => void;
|
|
1176
|
+
onLoadMore: (param: () => void) => void;
|
|
1177
|
+
onScrollChange: (param: number) => void;
|
|
1159
1178
|
}
|
|
1160
1179
|
declare const Infiniteloading: FunctionComponent<Partial<InfiniteloadingProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1161
1180
|
|
|
@@ -1172,7 +1191,7 @@ interface NotifyProps {
|
|
|
1172
1191
|
onClick: () => void;
|
|
1173
1192
|
onClosed: () => void;
|
|
1174
1193
|
}
|
|
1175
|
-
declare const _default
|
|
1194
|
+
declare const _default: {
|
|
1176
1195
|
text(msg: string | React$1.ReactNode, option?: {}): void;
|
|
1177
1196
|
success(msg: string | React$1.ReactNode, option?: {}): void;
|
|
1178
1197
|
primary(msg: string | React$1.ReactNode, option?: {}): void;
|
|
@@ -1196,32 +1215,27 @@ interface SwitchProps {
|
|
|
1196
1215
|
declare const Switch: FunctionComponent<Partial<SwitchProps>>;
|
|
1197
1216
|
|
|
1198
1217
|
interface ToastProps {
|
|
1199
|
-
id
|
|
1200
|
-
|
|
1218
|
+
id?: string;
|
|
1219
|
+
style?: React__default.CSSProperties;
|
|
1220
|
+
icon: string | null;
|
|
1221
|
+
iconSize: string;
|
|
1222
|
+
msg: string | React__default.ReactNode;
|
|
1223
|
+
bottom: number | string;
|
|
1201
1224
|
duration: number;
|
|
1202
1225
|
center: boolean;
|
|
1203
1226
|
type: string;
|
|
1227
|
+
title: string;
|
|
1204
1228
|
customClass: string;
|
|
1205
|
-
bottom: number;
|
|
1206
1229
|
size: string | number;
|
|
1207
|
-
icon: string;
|
|
1208
1230
|
textAlignCenter: boolean;
|
|
1209
|
-
loadingRotate: boolean;
|
|
1210
1231
|
bgColor: string;
|
|
1211
|
-
onClose: () => void;
|
|
1212
1232
|
cover: boolean;
|
|
1213
1233
|
coverColor: string;
|
|
1214
1234
|
closeOnClickOverlay: boolean;
|
|
1235
|
+
visible: boolean;
|
|
1236
|
+
onClose: () => void;
|
|
1215
1237
|
}
|
|
1216
|
-
declare const
|
|
1217
|
-
text(msg: string | React$1.ReactNode, option?: {}): void;
|
|
1218
|
-
success(msg: string | React$1.ReactNode, option?: {}): void;
|
|
1219
|
-
fail(msg: string | React$1.ReactNode, option?: {}): void;
|
|
1220
|
-
loading(msg: string | React$1.ReactNode, option?: {}): void;
|
|
1221
|
-
warn(msg: string | React$1.ReactNode, option?: {}): void;
|
|
1222
|
-
customIcon(msg: string | React$1.ReactNode, option?: {}): void;
|
|
1223
|
-
hide(): void;
|
|
1224
|
-
};
|
|
1238
|
+
declare const Toast: FunctionComponent<Partial<ToastProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1225
1239
|
|
|
1226
1240
|
declare type SwipeSide = 'left' | 'right';
|
|
1227
1241
|
declare type SwipePosition = SwipeSide | 'cell' | 'outside';
|
|
@@ -1450,7 +1464,6 @@ interface List {
|
|
|
1450
1464
|
icon?: string;
|
|
1451
1465
|
disabled?: boolean;
|
|
1452
1466
|
}
|
|
1453
|
-
|
|
1454
1467
|
interface PopoverProps extends IComponent {
|
|
1455
1468
|
list: List[];
|
|
1456
1469
|
theme: PopoverTheme;
|
|
@@ -1527,6 +1540,7 @@ interface CollapseItemProps$1 extends IComponent {
|
|
|
1527
1540
|
titleIconColor: string;
|
|
1528
1541
|
titleIconPosition: string;
|
|
1529
1542
|
titleIconSize: string;
|
|
1543
|
+
childnull: boolean;
|
|
1530
1544
|
onToggle: (isOpen: boolean, name: string) => void;
|
|
1531
1545
|
}
|
|
1532
1546
|
declare const CollapseItem: FunctionComponent<Partial<CollapseItemProps$1> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -1625,7 +1639,6 @@ declare const Video: FunctionComponent<Partial<VideoProps$1> & React__default.HT
|
|
|
1625
1639
|
|
|
1626
1640
|
declare type ProgressSize = 'small' | 'base' | 'large';
|
|
1627
1641
|
declare type TextType = 'icon' | 'text';
|
|
1628
|
-
|
|
1629
1642
|
interface ProgressProps extends IComponent {
|
|
1630
1643
|
className: string;
|
|
1631
1644
|
style: CSSProperties;
|
|
@@ -1651,22 +1664,20 @@ interface ProgressProps extends IComponent {
|
|
|
1651
1664
|
declare const Progress: FunctionComponent<Partial<ProgressProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1652
1665
|
|
|
1653
1666
|
interface AudioProps extends IComponent {
|
|
1654
|
-
className
|
|
1655
|
-
style
|
|
1667
|
+
className?: string;
|
|
1668
|
+
style?: CSSProperties;
|
|
1656
1669
|
url: string;
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
loop: boolean;
|
|
1660
|
-
preload: string;
|
|
1670
|
+
autoplay?: boolean;
|
|
1671
|
+
loop?: boolean;
|
|
1661
1672
|
type: string;
|
|
1662
|
-
onFastBack
|
|
1663
|
-
onForward
|
|
1664
|
-
onPause
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
onCanPlay
|
|
1673
|
+
onFastBack?: (ctx: Taro.InnerAudioContext) => void;
|
|
1674
|
+
onForward?: (ctx: Taro.InnerAudioContext) => void;
|
|
1675
|
+
onPause?: any;
|
|
1676
|
+
onPlay?: any;
|
|
1677
|
+
onPlayEnd?: (ctx: Taro.InnerAudioContext) => void;
|
|
1678
|
+
onCanPlay?: (ctx: Taro.InnerAudioContext) => void;
|
|
1668
1679
|
}
|
|
1669
|
-
declare const Audio: FunctionComponent<Partial<AudioProps> & React__default.HTMLAttributes<
|
|
1680
|
+
declare const Audio: FunctionComponent<Partial<AudioProps> & (React__default.HTMLAttributes<HTMLDivElement> | Taro.InnerAudioContext)>;
|
|
1670
1681
|
|
|
1671
1682
|
interface ImagePreviewProps {
|
|
1672
1683
|
className?: string;
|
|
@@ -1880,4 +1891,4 @@ interface VideoProps {
|
|
|
1880
1891
|
playend: (e: HTMLVideoElement) => void;
|
|
1881
1892
|
}
|
|
1882
1893
|
|
|
1883
|
-
export { ActionSheet, ActionSheetProps, Address, AddressProps, AnimatingNumbers, AnimatingNumbersProps, Audio, AudioProps, Avatar, AvatarGroup, AvatarGroupProps, AvatarProps, BackTop, BackTopProps, Badge, BadgeProps, Barrage, BarrageProps, Button, ButtonProps, Calendar, CalendarItem, CalendarItemProps, CalendarProps, Card, CardProps, Cascader, CascaderProps, Cell, CellGroup, CellGroupProps, CellProps, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, CircleProgress, CircleProgressProps, Col, ColProps, Collapse, CollapseItem, CollapseItemProps, CollapseProps, ConfigProvider, ConfigProviderProps, CountDown, CountDownProps, DatePicker, DatePickerProps, Dialog, DialogProps, Divider, DividerProps, Drag, DragProps, Elevator, ElevatorProps, Empty, EmptyProps, FixedNav, FixedNavProps, Grid, GridItem, GridItemProps, GridProps, Icon, IconProps, ImagePreview, ImagePreviewProps, Indicator, IndicatorProps, Infiniteloading, InfiniteloadingProps, Input, InputNumber, InputNumberProps, InputProps, Layout, LayoutProps, Menu, MenuItem, MenuItemProps, MenuProps, NavBar, NavBarProps$1 as NavBarProps, NoticeBar, NoticeBarProps, _default
|
|
1894
|
+
export { ActionSheet, ActionSheetProps, Address, AddressProps, AnimatingNumbers, AnimatingNumbersProps, Audio, AudioProps, Avatar, AvatarGroup, AvatarGroupProps, AvatarProps, BackTop, BackTopProps, Badge, BadgeProps, Barrage, BarrageProps, Button, ButtonProps, Calendar, CalendarItem, CalendarItemProps, CalendarProps, Card, CardProps, Cascader, CascaderProps, Cell, CellGroup, CellGroupProps, CellProps, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, CircleProgress, CircleProgressProps, Col, ColProps, Collapse, CollapseItem, CollapseItemProps, CollapseProps, ConfigProvider, ConfigProviderProps, CountDown, CountDownProps, DatePicker, DatePickerProps, Dialog, DialogProps, Divider, DividerProps, Drag, DragProps, Elevator, ElevatorProps, Empty, EmptyProps, FixedNav, FixedNavProps, Grid, GridItem, GridItemProps, GridProps, Icon, IconProps, ImagePreview, ImagePreviewProps, Indicator, IndicatorProps, Infiniteloading, InfiniteloadingProps, Input, InputNumber, InputNumberProps, InputProps, Layout, LayoutProps, Menu, MenuItem, MenuItemProps, MenuProps, NavBar, NavBarProps$1 as NavBarProps, NoticeBar, NoticeBarProps, _default as Notify, NotifyProps, NumberKeyboard, NumberKeyboardProps, Overlay, OverlayProps, Pagination, PaginationProps, Picker, PickerProps, Popover, PopoverProps, Popup, PopupProps, Price, PriceProps, Progress, ProgressProps, PullToRefresh, PullToRefreshProps, Radio, RadioGroup, RadioGroupProps, RadioProps, Range, RangeProps, Rate, RateProps, Row, RowProps, SearchBar, SearchBarProps, ShortPassword, ShortPasswordProps, SideNavBar, SideNavBarItem, SideNavBarItemProps, SideNavBarProps, Signature, SignatureProps, Skeleton, SkeletonProps, Step, StepProps, Steps, StepsProps, Sticky, StickyProps, SubSideNavBar, SubSideNavBarProps, Swipe, SwipeProps, Swiper, SwiperItem, SwiperItemProps, SwiperProps, Switch, SwitchProps, TabPane, TabPaneProps, Tabbar, TabbarItem, TabbarItemProps, TabbarProps, Table, TableProps, Tabs, TabsProps, Tag, TagProps, TextArea, TextAreaProps, TimeDetail, TimeDetailProps, TimePannel, TimePannelProps, TimeSelect, TimeSelectProps, Toast, ToastProps, Uploader, UploaderProps, Video, VideoProps, VirtualList, VirtualListProps };
|
|
@@ -11,6 +11,7 @@ import Row from '@/packages/row/index.taro'
|
|
|
11
11
|
import Divider from '@/packages/divider/index.taro'
|
|
12
12
|
import Grid from '@/packages/grid/index.taro'
|
|
13
13
|
import GridItem from '@/packages/griditem/index.taro'
|
|
14
|
+
import Sticky from '@/packages/sticky/index.taro'
|
|
14
15
|
import NavBar from '@/packages/navbar/index.taro'
|
|
15
16
|
import FixedNav from '@/packages/fixednav/index.taro'
|
|
16
17
|
import Tabbar from '@/packages/tabbar/index.taro'
|
|
@@ -85,7 +86,7 @@ import TimePannel from '@/packages/timepannel/index.taro'
|
|
|
85
86
|
import TimeDetail from '@/packages/timedetail/index.taro'
|
|
86
87
|
import TimeSelect from '@/packages/timeselect/index.taro'
|
|
87
88
|
|
|
88
|
-
export { Button,Cell,CellGroup,Icon,Overlay,Popup,ConfigProvider,Layout,Col,Row,Divider,Grid,GridItem,NavBar,FixedNav,Tabbar,TabbarItem,Elevator,Pagination,Tabs,TabPane,Indicator,SideNavBar,SubSideNavBar,SideNavBarItem,Menu,MenuItem,Range,Calendar,Checkbox,CheckboxGroup,DatePicker,InputNumber,Input,Radio,RadioGroup,Rate,CalendarItem,Picker,ShortPassword,TextArea,Uploader,Cascader,SearchBar,NumberKeyboard,ActionSheet,BackTop,Drag,Dialog,Infiniteloading,Notify,Switch,Toast,Swipe,PullToRefresh,CircleProgress,NoticeBar,Steps,Step,Swiper,SwiperItem,Avatar,AvatarGroup,Price,Badge,Tag,Popover,Skeleton,CountDown,Collapse,CollapseItem,AnimatingNumbers,Empty,VirtualList,Table,Video,Progress,Audio,ImagePreview,Address,Barrage,Signature,Card,TimePannel,TimeDetail,TimeSelect };
|
|
89
|
+
export { Button,Cell,CellGroup,Icon,Overlay,Popup,ConfigProvider,Layout,Col,Row,Divider,Grid,GridItem,Sticky,NavBar,FixedNav,Tabbar,TabbarItem,Elevator,Pagination,Tabs,TabPane,Indicator,SideNavBar,SubSideNavBar,SideNavBarItem,Menu,MenuItem,Range,Calendar,Checkbox,CheckboxGroup,DatePicker,InputNumber,Input,Radio,RadioGroup,Rate,CalendarItem,Picker,ShortPassword,TextArea,Uploader,Cascader,SearchBar,NumberKeyboard,ActionSheet,BackTop,Drag,Dialog,Infiniteloading,Notify,Switch,Toast,Swipe,PullToRefresh,CircleProgress,NoticeBar,Steps,Step,Swiper,SwiperItem,Avatar,AvatarGroup,Price,Badge,Tag,Popover,Skeleton,CountDown,Collapse,CollapseItem,AnimatingNumbers,Empty,VirtualList,Table,Video,Progress,Audio,ImagePreview,Address,Barrage,Signature,Card,TimePannel,TimeDetail,TimeSelect };
|
|
89
90
|
export type { ButtonProps } from '@/packages/button/button.taro';
|
|
90
91
|
export type { CellProps } from '@/packages/cell/cell.taro';
|
|
91
92
|
export type { CellGroupProps } from '@/packages/cellgroup/cellgroup.taro';
|
|
@@ -99,6 +100,7 @@ export type { RowProps } from '@/packages/row/row.taro';
|
|
|
99
100
|
export type { DividerProps } from '@/packages/divider/divider.taro';
|
|
100
101
|
export type { GridProps } from '@/packages/grid/grid.taro';
|
|
101
102
|
export type { GridItemProps } from '@/packages/griditem/griditem.taro';
|
|
103
|
+
export type { StickyProps } from '@/packages/sticky/sticky.taro';
|
|
102
104
|
export type { NavBarProps } from '@/packages/navbar/navbar.taro';
|
|
103
105
|
export type { FixedNavProps } from '@/packages/fixednav/fixednav.taro';
|
|
104
106
|
export type { TabbarProps } from '@/packages/tabbar/tabbar.taro';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nutui/nutui-react-taro",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"style": "dist/style.css",
|
|
5
5
|
"main": "dist/nutui.react.umd.js",
|
|
6
6
|
"module": "dist/esm/nutui-react.es.js",
|
|
@@ -63,9 +63,11 @@
|
|
|
63
63
|
"generate:file:taro:pages": "node scripts/taro/generate-taro-pages.js",
|
|
64
64
|
"dev:taro:weapp": "npm run checked:taro && npm run generate:file:taro:pages && cd ./src/sites/mobile-taro && npm run dev:weapp",
|
|
65
65
|
"dev:taro:jd": "npm run checked:taro && npm run generate:file:taro:pages && cd ./src/sites/mobile-taro && npm run dev:jd",
|
|
66
|
+
"dev:taro:h5": "npm run checked:taro && npm run generate:file:taro:pages && cd ./src/sites/mobile-taro && npm run dev:h5",
|
|
66
67
|
"replace:taro:types": "node scripts/taro/replace-taro-types-alias.js",
|
|
67
|
-
"build:taro:es": "npx rollup -c rollup.config.taro.es.js",
|
|
68
68
|
"build:taro": "npm run checked:taro && vite build --config vite.config.build.taro.ts && npm run build:taro:es && npm run build:css && npm run build:loader-style && npm --taro run build:dts && npm run build:locales",
|
|
69
|
+
"build:taro:es": "npx rollup -c rollup.config.taro.es.js",
|
|
70
|
+
"build:taro:weapp": "npm run checked:taro && vite build --config vite.config.build.taro.ts && npm run generate:file:taro:pages && cd ./src/sites/mobile-taro && npm run build:weapp",
|
|
69
71
|
"add:taro:config": "node scripts/taro/generate-taro-route.js"
|
|
70
72
|
},
|
|
71
73
|
"engines": {
|
|
@@ -79,7 +81,7 @@
|
|
|
79
81
|
"@babel/runtime": "^7.16.5",
|
|
80
82
|
"@bem-react/classname": "^1.5.10",
|
|
81
83
|
"@react-spring/web": "^9.3.2",
|
|
82
|
-
"@use-gesture/react": "10.2.9",
|
|
84
|
+
"@use-gesture/react": "^10.2.9",
|
|
83
85
|
"classnames": "^2.3.1",
|
|
84
86
|
"react-router-dom": "^5.2.0",
|
|
85
87
|
"react-transition-group": "^4.4.2"
|
|
@@ -99,7 +101,8 @@
|
|
|
99
101
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
100
102
|
"@rollup/plugin-node-resolve": "^13.1.1",
|
|
101
103
|
"@rollup/plugin-typescript": "^8.3.0",
|
|
102
|
-
"@tarojs/
|
|
104
|
+
"@tarojs/components": "^3.5.5",
|
|
105
|
+
"@tarojs/taro": "^3.5.5",
|
|
103
106
|
"@testing-library/jest-dom": "^5.16.3",
|
|
104
107
|
"@testing-library/react": "^13.3.0",
|
|
105
108
|
"@types/jest": "^27.4.1",
|
|
@@ -148,11 +151,13 @@
|
|
|
148
151
|
"react-test-renderer": "^18.2.0",
|
|
149
152
|
"remark-directive": "^2.0.1",
|
|
150
153
|
"remark-gfm": "^3.0.1",
|
|
154
|
+
"rollup-plugin-delete": "^2.0.0",
|
|
155
|
+
"rollup-plugin-dts": "^4.2.2",
|
|
151
156
|
"sass": "^1.45.0",
|
|
152
157
|
"shelljs": "^0.8.4",
|
|
153
158
|
"ts-jest": "^27.1.4",
|
|
154
159
|
"ts-node": "^10.7.0",
|
|
155
|
-
"typescript": "4.
|
|
160
|
+
"typescript": "^4.8.2",
|
|
156
161
|
"unist-util-visit": "^4.1.0",
|
|
157
162
|
"vinyl-fs": "^3.0.3",
|
|
158
163
|
"vite": "^2.1.5",
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as ReactDOM from 'react-dom';
|
|
2
|
-
var createRoot;
|
|
3
|
-
|
|
4
|
-
try {
|
|
5
|
-
var mainVersion = Number((ReactDOM.version || '').split('.')[0]);
|
|
6
|
-
|
|
7
|
-
if (mainVersion >= 18 && ReactDOM.createRoot) {
|
|
8
|
-
createRoot = ReactDOM.createRoot;
|
|
9
|
-
}
|
|
10
|
-
} catch (e) {
|
|
11
|
-
console.log(e);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function legacyRender(node, container) {
|
|
15
|
-
ReactDOM.render(node, container);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function concurrentRender(node, container) {
|
|
19
|
-
var root = ReactDOM.createRoot(container);
|
|
20
|
-
root.render(node);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function render(node, container) {
|
|
24
|
-
if (createRoot) {
|
|
25
|
-
concurrentRender(node, container);
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
legacyRender(node, container);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export { render as r };
|