@nutui/nutui-react 1.3.3 → 1.3.4-beta.0
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/Address.js +7 -5
- package/dist/esm/Audio.js +7 -5
- package/dist/esm/Avatar.js +5 -3
- package/dist/esm/BackTop.js +5 -3
- package/dist/esm/Badge.js +5 -3
- package/dist/esm/Barrage.js +1 -1
- package/dist/esm/Button.js +7 -5
- package/dist/esm/Cascader.js +1 -1
- package/dist/esm/Cell.js +7 -5
- package/dist/esm/Checkbox.js +2 -2
- package/dist/esm/Collapse.js +2 -1
- package/dist/esm/CollapseItem.js +13 -9
- package/dist/esm/FixedNav.js +5 -3
- package/dist/esm/GridItem.js +5 -3
- package/dist/esm/Infiniteloading.js +13 -11
- package/dist/esm/Input.js +9 -7
- package/dist/esm/InputNumber.js +7 -5
- package/dist/esm/Menu.js +5 -3
- package/dist/esm/MenuItem.js +5 -5
- package/dist/esm/NavBar.js +7 -5
- package/dist/esm/NoticeBar.js +9 -7
- package/dist/esm/Notify.js +1 -1
- package/dist/esm/Popover.js +5 -3
- package/dist/esm/Popup.js +5 -3
- package/dist/esm/Progress.js +5 -3
- package/dist/esm/PullToRefresh.js +1 -30
- package/dist/esm/Radio.js +5 -3
- package/dist/esm/Rate.js +10 -8
- package/dist/esm/SearchBar.js +5 -3
- package/dist/esm/ShortPassword.js +5 -3
- package/dist/esm/Step.js +5 -3
- package/dist/esm/Sticky/style/index.js +2 -0
- package/dist/esm/Sticky.js +209 -0
- package/dist/esm/TabbarItem.js +5 -3
- package/dist/esm/Table.js +5 -3
- package/dist/esm/Tabs.js +2 -2
- package/dist/esm/Tag.js +5 -3
- package/dist/esm/Toast.js +1 -1
- package/dist/esm/Uploader.js +121 -44
- package/dist/esm/get-scroll-parent-3dcd3f53.js +32 -0
- package/dist/esm/nutui-react.es.js +1 -0
- package/dist/esm/render-18227751.js +43 -0
- package/dist/esm/{tabs-41234c2c.js → tabs-0896a61b.js} +5 -3
- 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/fixednav/fixednav.d.ts +1 -1
- package/dist/esm/types/src/packages/griditem/griditem.d.ts +1 -1
- package/dist/esm/types/src/packages/infiniteloading/infiniteloading.d.ts +3 -3
- package/dist/esm/types/src/packages/input/input.d.ts +1 -1
- package/dist/esm/types/src/packages/menuitem/menuitem.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/progress/progress.d.ts +1 -1
- package/dist/esm/types/src/packages/radio/radio.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/tabs/tabs.d.ts +1 -1
- package/dist/esm/types/src/packages/toast/index.taro.d.ts +1 -1
- 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/utils/date.d.ts +1 -1
- package/dist/esm/types/src/utils/useWatch.d.ts +6 -0
- 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 +1002 -616
- package/dist/nutui.react.umd.js +1002 -615
- 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 +37 -24
- package/dist/types/nutui.react.build.ts +3 -1
- package/package.json +10 -5
- package/dist/esm/render-4a3856cb.js +0 -32
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
|
@@ -295,7 +295,6 @@ interface GridProps {
|
|
|
295
295
|
declare const Grid: FunctionComponent<Partial<GridProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
296
296
|
|
|
297
297
|
declare type GridDirection = 'horizontal' | 'vertical';
|
|
298
|
-
|
|
299
298
|
interface GridItemProps extends IComponent {
|
|
300
299
|
text: string | ReactNode;
|
|
301
300
|
icon: string | ReactNode;
|
|
@@ -314,6 +313,18 @@ interface GridItemProps extends IComponent {
|
|
|
314
313
|
}
|
|
315
314
|
declare const GridItem: FunctionComponent<Partial<GridItemProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
316
315
|
|
|
316
|
+
interface StickyProps extends IComponent {
|
|
317
|
+
container?: React__default.RefObject<HTMLElement>;
|
|
318
|
+
position?: 'top' | 'bottom';
|
|
319
|
+
className?: string;
|
|
320
|
+
top?: number;
|
|
321
|
+
bottom?: number;
|
|
322
|
+
zIndex?: number;
|
|
323
|
+
children: React__default.ReactNode;
|
|
324
|
+
onChange?: (val: boolean) => void;
|
|
325
|
+
}
|
|
326
|
+
declare const Sticky: FunctionComponent<StickyProps>;
|
|
327
|
+
|
|
317
328
|
interface NavBarProps$1 extends IComponent {
|
|
318
329
|
leftShow: boolean;
|
|
319
330
|
title: string;
|
|
@@ -340,7 +351,6 @@ declare type Position$2 = {
|
|
|
340
351
|
top?: string;
|
|
341
352
|
bottom?: string;
|
|
342
353
|
};
|
|
343
|
-
|
|
344
354
|
interface FixedNavProps extends IComponent {
|
|
345
355
|
fixednavClass: string;
|
|
346
356
|
visible: boolean;
|
|
@@ -435,7 +445,6 @@ declare class Title {
|
|
|
435
445
|
constructor();
|
|
436
446
|
}
|
|
437
447
|
declare type TabsSize = 'large' | 'normal' | 'small';
|
|
438
|
-
|
|
439
448
|
interface TabsProps extends IComponent {
|
|
440
449
|
className: string;
|
|
441
450
|
style: React__default.CSSProperties;
|
|
@@ -531,7 +540,6 @@ interface OptionItem {
|
|
|
531
540
|
text: string;
|
|
532
541
|
value: string | number;
|
|
533
542
|
}
|
|
534
|
-
|
|
535
543
|
interface MenuItemProps extends IComponent {
|
|
536
544
|
className: string;
|
|
537
545
|
style: React__default.CSSProperties;
|
|
@@ -751,7 +759,6 @@ declare const RadioGroup: React__default.ForwardRefExoticComponent<Partial<Radio
|
|
|
751
759
|
|
|
752
760
|
declare type Shape = 'button' | 'round';
|
|
753
761
|
declare type Position = 'right' | 'left';
|
|
754
|
-
|
|
755
762
|
interface RadioProps extends IComponent {
|
|
756
763
|
className: string;
|
|
757
764
|
style: React__default.CSSProperties;
|
|
@@ -885,7 +892,9 @@ declare const TextArea: FunctionComponent<Partial<TextAreaProps> & Omit<React__d
|
|
|
885
892
|
declare class UploadOptions {
|
|
886
893
|
url: string;
|
|
887
894
|
name: string;
|
|
895
|
+
fileType?: string | undefined;
|
|
888
896
|
formData?: FormData;
|
|
897
|
+
sourceFile: any;
|
|
889
898
|
method: string;
|
|
890
899
|
xhrState: string | number;
|
|
891
900
|
timeout: number;
|
|
@@ -896,6 +905,7 @@ declare class UploadOptions {
|
|
|
896
905
|
onProgress?: Function;
|
|
897
906
|
onSuccess?: Function;
|
|
898
907
|
onFailure?: Function;
|
|
908
|
+
beforeXhrUpload?: Function;
|
|
899
909
|
}
|
|
900
910
|
|
|
901
911
|
declare type FileType<T> = {
|
|
@@ -929,29 +939,31 @@ interface UploaderProps extends IComponent {
|
|
|
929
939
|
className: string;
|
|
930
940
|
defaultImg: string;
|
|
931
941
|
style: React__default.CSSProperties;
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
942
|
+
onStart?: (option: UploadOptions) => void;
|
|
943
|
+
onRemove?: (file: FileItem, fileList: FileItem[]) => void;
|
|
944
|
+
onSuccess?: (param: {
|
|
935
945
|
responseText: XMLHttpRequest['responseText'];
|
|
936
946
|
option: UploadOptions;
|
|
937
947
|
}) => void;
|
|
938
|
-
|
|
948
|
+
onProgress?: (param: {
|
|
939
949
|
e: ProgressEvent<XMLHttpRequestEventTarget>;
|
|
940
950
|
option: UploadOptions;
|
|
951
|
+
percentage: string | number;
|
|
941
952
|
}) => void;
|
|
942
|
-
|
|
953
|
+
onFailure?: (param: {
|
|
943
954
|
responseText: XMLHttpRequest['responseText'];
|
|
944
955
|
option: UploadOptions;
|
|
945
956
|
}) => void;
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
fileList:
|
|
957
|
+
onUpdate?: (fileList: FileItem[]) => void;
|
|
958
|
+
onOversize?: (file: File[]) => void;
|
|
959
|
+
onChange?: (param: {
|
|
960
|
+
fileList: FileItem[];
|
|
950
961
|
event: React__default.ChangeEvent<HTMLInputElement>;
|
|
951
962
|
}) => void;
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
963
|
+
onBeforeUpload?: (file: File[]) => Promise<File[]>;
|
|
964
|
+
onBeforeXhrUpload?: (xhr: XMLHttpRequest, options: any) => void;
|
|
965
|
+
onBeforeDelete?: (file: FileItem, files: FileItem[]) => boolean;
|
|
966
|
+
onFileItemClick?: (file: FileItem) => void;
|
|
955
967
|
}
|
|
956
968
|
declare class FileItem {
|
|
957
969
|
status: FileItemStatus;
|
|
@@ -960,6 +972,8 @@ declare class FileItem {
|
|
|
960
972
|
name?: string;
|
|
961
973
|
url?: string;
|
|
962
974
|
type?: string;
|
|
975
|
+
path?: string;
|
|
976
|
+
percentage: string | number;
|
|
963
977
|
formData: FormData;
|
|
964
978
|
}
|
|
965
979
|
declare const Uploader: React__default.ForwardRefExoticComponent<Partial<UploaderProps> & {
|
|
@@ -1115,7 +1129,7 @@ declare const BackTop: FunctionComponent<Partial<BackTopProps> & Omit<React__def
|
|
|
1115
1129
|
|
|
1116
1130
|
interface DragProps {
|
|
1117
1131
|
attract: boolean;
|
|
1118
|
-
direction:
|
|
1132
|
+
direction: 'x' | 'y' | 'lock' | undefined;
|
|
1119
1133
|
boundary: {
|
|
1120
1134
|
top: number;
|
|
1121
1135
|
left: number;
|
|
@@ -1190,9 +1204,9 @@ interface InfiniteloadingProps extends IComponent {
|
|
|
1190
1204
|
loadMoreTxt: string;
|
|
1191
1205
|
className: string;
|
|
1192
1206
|
style: React__default.CSSProperties;
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1207
|
+
onRefresh: (param: () => void) => void;
|
|
1208
|
+
onLoadMore: (param: () => void) => void;
|
|
1209
|
+
onScrollChange: (param: number) => void;
|
|
1196
1210
|
}
|
|
1197
1211
|
declare const Infiniteloading: FunctionComponent<Partial<InfiniteloadingProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1198
1212
|
|
|
@@ -1490,7 +1504,6 @@ interface List {
|
|
|
1490
1504
|
icon?: string;
|
|
1491
1505
|
disabled?: boolean;
|
|
1492
1506
|
}
|
|
1493
|
-
|
|
1494
1507
|
interface PopoverProps extends IComponent {
|
|
1495
1508
|
list: List[];
|
|
1496
1509
|
theme: PopoverTheme;
|
|
@@ -1567,6 +1580,7 @@ interface CollapseItemProps extends IComponent {
|
|
|
1567
1580
|
titleIconColor: string;
|
|
1568
1581
|
titleIconPosition: string;
|
|
1569
1582
|
titleIconSize: string;
|
|
1583
|
+
childnull: boolean;
|
|
1570
1584
|
onToggle: (isOpen: boolean, name: string) => void;
|
|
1571
1585
|
}
|
|
1572
1586
|
declare const CollapseItem: FunctionComponent<Partial<CollapseItemProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -1665,7 +1679,6 @@ declare const Video: FunctionComponent<Partial<VideoProps> & React__default.HTML
|
|
|
1665
1679
|
|
|
1666
1680
|
declare type ProgressSize = 'small' | 'base' | 'large';
|
|
1667
1681
|
declare type TextType = 'icon' | 'text';
|
|
1668
|
-
|
|
1669
1682
|
interface ProgressProps extends IComponent {
|
|
1670
1683
|
className: string;
|
|
1671
1684
|
style: CSSProperties;
|
|
@@ -1883,4 +1896,4 @@ interface TimeSelectProps {
|
|
|
1883
1896
|
}
|
|
1884
1897
|
declare const TimeSelect: FunctionComponent<Partial<TimeSelectProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1885
1898
|
|
|
1886
|
-
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$1 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, 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, _default as Toast, ToastProps, Uploader, UploaderProps, Video, VideoProps, VirtualList, VirtualListProps };
|
|
1899
|
+
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$1 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, _default as Toast, ToastProps, Uploader, UploaderProps, Video, VideoProps, VirtualList, VirtualListProps };
|
|
@@ -11,6 +11,7 @@ import Row from '@/packages/row';
|
|
|
11
11
|
import Divider from '@/packages/divider';
|
|
12
12
|
import Grid from '@/packages/grid';
|
|
13
13
|
import GridItem from '@/packages/griditem';
|
|
14
|
+
import Sticky from '@/packages/sticky';
|
|
14
15
|
import NavBar from '@/packages/navbar';
|
|
15
16
|
import FixedNav from '@/packages/fixednav';
|
|
16
17
|
import Tabbar from '@/packages/tabbar';
|
|
@@ -85,7 +86,7 @@ import TimePannel from '@/packages/timepannel';
|
|
|
85
86
|
import TimeDetail from '@/packages/timedetail';
|
|
86
87
|
import TimeSelect from '@/packages/timeselect';
|
|
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';
|
|
90
91
|
export type { CellProps } from '@/packages/cell/cell';
|
|
91
92
|
export type { CellGroupProps } from '@/packages/cellgroup/cellgroup';
|
|
@@ -99,6 +100,7 @@ export type { RowProps } from '@/packages/row/row';
|
|
|
99
100
|
export type { DividerProps } from '@/packages/divider/divider';
|
|
100
101
|
export type { GridProps } from '@/packages/grid/grid';
|
|
101
102
|
export type { GridItemProps } from '@/packages/griditem/griditem';
|
|
103
|
+
export type { StickyProps } from '@/packages/sticky/sticky';
|
|
102
104
|
export type { NavBarProps } from '@/packages/navbar/navbar';
|
|
103
105
|
export type { FixedNavProps } from '@/packages/fixednav/fixednav';
|
|
104
106
|
export type { TabbarProps } from '@/packages/tabbar/tabbar';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nutui/nutui-react",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4-beta.0",
|
|
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 };
|