@nutui/nutui-react-taro 2.6.15 → 2.6.17
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 +45 -14
- package/README.md +2 -2
- package/dist/esm/ActionSheet.js +1 -1
- package/dist/esm/Address.js +1 -1
- package/dist/esm/Calendar.js +1 -1
- package/dist/esm/Cascader.js +1 -1
- package/dist/esm/Cell/style/style.css +1 -1
- package/dist/esm/Cell.js +1 -1
- package/dist/esm/DatePicker.js +1 -1
- package/dist/esm/Dialog.js +1 -1
- package/dist/esm/Drag.js +1 -1
- package/dist/esm/Ellipsis.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.js +1 -1
- package/dist/esm/InputNumber.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/ShortPassword.js +1 -1
- package/dist/esm/SideNavBar.js +1 -1
- package/dist/esm/Sticky.js +1 -1
- package/dist/esm/Tabs.js +1 -1
- package/dist/esm/TimeSelect.js +1 -1
- package/dist/esm/Toast.js +1 -1
- package/dist/esm/Tour.js +1 -1
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/{actionsheet.taro-CJjNsNrH.js → actionsheet.taro-CQ3sJY3B.js} +1 -1
- package/dist/esm/{address.taro-BYzOGUEN.js → address.taro-Old6uBAn.js} +2 -2
- package/dist/esm/{calendar.taro-BXrHr8bg.js → calendar.taro-C4UvVkgw.js} +1 -1
- package/dist/esm/{cascader.taro-jxe42b68.js → cascader.taro-BNw6H5ue.js} +2 -2
- package/dist/esm/{cell.taro-CVFlcls2.js → cell.taro-DWLhb5m6.js} +3 -3
- package/dist/esm/{datepicker.taro-BxaZ3Fjv.js → datepicker.taro-C1wMTysn.js} +1 -1
- package/dist/esm/{dialog.taro-BW9D2Gsr.js → dialog.taro-BY2KfQh1.js} +1 -1
- package/dist/esm/{drag.taro-B_TO4Nnu.js → drag.taro-B_sfzmtW.js} +2 -2
- package/dist/esm/{ellipsis.taro-cMTr1Wcw.js → ellipsis.taro-Ck2rumQ6.js} +3 -3
- package/dist/esm/{fixednav.taro-D3KnhYoI.js → fixednav.taro-C3iUeag8.js} +1 -1
- package/dist/esm/{formitem.taro-Dmt5-wxG.js → formitem.taro-CEWRz5EJ.js} +6 -6
- package/dist/esm/{get-scroll-parent-DB1VRg11.js → get-scroll-parent-9ZDWApX2.js} +0 -1
- package/dist/esm/{imagepreview.taro-CF-CCJ1Q.js → imagepreview.taro-CJDHziHn.js} +27 -18
- package/dist/esm/{inputnumber.taro-WN5Drnyz.js → inputnumber.taro-D9mteLSI.js} +26 -9
- package/dist/esm/{menu.taro-BeuoJcj7.js → menu.taro-Cw_lCHDb.js} +10 -3
- package/dist/esm/{menuitem.taro-DMV3j4DK.js → menuitem.taro-DqLGsBUc.js} +2 -2
- package/dist/esm/{numberkeyboard.taro-BA0iCeGP.js → numberkeyboard.taro-B-FEM91t.js} +39 -28
- package/dist/esm/nutui-react.es.js +29 -29
- package/dist/esm/{overlay.taro-C2t82CZz.js → overlay.taro-B5s6rmEf.js} +2 -16
- package/dist/esm/{picker.taro-CafNRRO5.js → picker.taro-Cu8B-fNC.js} +2 -3
- package/dist/esm/{popover.taro-B_FJgU0z.js → popover.taro-DrC9HQ1E.js} +1 -1
- package/dist/esm/{popup.taro-CR3JyuJV.js → popup.taro-_E52-0su.js} +1 -1
- package/dist/esm/{pulltorefresh.taro-BScP6uPx.js → pulltorefresh.taro-DSr2dBjM.js} +5 -1
- package/dist/esm/{shortpassword.taro-DpdtRsQ-.js → shortpassword.taro-CmPaHe0E.js} +1 -1
- package/dist/esm/{sidenavbar.taro-5BmrYFtP.js → sidenavbar.taro-BWB1yd3c.js} +1 -1
- package/dist/esm/{sticky.taro-Zbz7wQH8.js → sticky.taro-2Vup8HR8.js} +1 -1
- package/dist/esm/{tabs.taro-B2D3AtVV.js → tabs.taro-8X51sTol.js} +2 -0
- package/dist/esm/{timeselect.taro-DncKbp3l.js → timeselect.taro-CgcPLf0z.js} +1 -1
- package/dist/esm/{toast.taro-CYk6UERn.js → toast.taro-3B6uFLDu.js} +1 -1
- package/dist/esm/{tour.taro-SPMrhDA9.js → tour.taro-D88VKjAl.js} +1 -1
- package/dist/esm/{uploader.taro-DfO2HWvy.js → uploader.taro-0QYFT-E8.js} +5 -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 +231 -141
- package/dist/nutui.react.umd.js +231 -141
- package/dist/packages/cell/cell.scss +20 -0
- package/dist/style.css +1 -1
- package/dist/types/packages/avatargroup/context.d.ts +0 -1
- package/dist/types/packages/cascader/cascader.d.ts +1 -1
- package/dist/types/packages/cascader/cascader.taro.d.ts +1 -1
- package/dist/types/packages/cell/cell.d.ts +2 -1
- package/dist/types/packages/cell/cell.taro.d.ts +7 -2
- package/dist/types/packages/cellgroup/context.d.ts +0 -1
- package/dist/types/packages/checkboxgroup/context.d.ts +0 -1
- package/dist/types/packages/collapse/context.d.ts +0 -1
- package/dist/types/packages/form/context.d.ts +0 -1
- package/dist/types/packages/formitem/formitem.d.ts +1 -0
- package/dist/types/packages/formitem/formitem.taro.d.ts +5 -0
- package/dist/types/packages/imagepreview/imagepreview.d.ts +15 -0
- package/dist/types/packages/imagepreview/imagepreview.taro.d.ts +17 -13
- package/dist/types/packages/inputnumber/inputnumber.d.ts +1 -1
- package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +1 -1
- package/dist/types/packages/menuitem/menuitem.d.ts +1 -0
- package/dist/types/packages/menuitem/menuitem.taro.d.ts +5 -0
- package/dist/types/packages/popover/types.d.ts +0 -1
- package/dist/types/packages/radiogroup/context.d.ts +1 -1
- package/dist/types/packages/row/UserContext.d.ts +0 -1
- package/dist/types/packages/sidenavbar/context.d.ts +0 -1
- package/dist/types/packages/steps/context.d.ts +0 -1
- package/dist/types/packages/swiper/context.d.ts +0 -1
- package/dist/types/packages/swiper/swiper.taro.d.ts +2 -1
- package/dist/types/packages/uploader/uploader.d.ts +1 -1
- package/dist/types/packages/uploader/uploader.taro.d.ts +1 -1
- package/dist/types/packages/virtuallist/utils.d.ts +2 -2
- package/dist/types/utils/index.d.ts +0 -1
- package/dist/types/utils/use-lock-scoll-taro.d.ts +0 -1
- package/package.json +1 -1
|
@@ -6,7 +6,8 @@ export interface CellProps extends BasicComponent {
|
|
|
6
6
|
description: ReactNode;
|
|
7
7
|
extra: ReactNode;
|
|
8
8
|
radius: string | number;
|
|
9
|
-
align:
|
|
9
|
+
align: 'flex-start' | 'center' | 'flex-end';
|
|
10
|
+
clickable: boolean;
|
|
10
11
|
onClick: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
11
12
|
}
|
|
12
13
|
export declare const Cell: FunctionComponent<Partial<CellProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'title'>> & {
|
|
@@ -23,10 +23,15 @@ export interface CellProps extends BasicComponent {
|
|
|
23
23
|
*/
|
|
24
24
|
radius: string | number
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* 纵轴方向上的对齐方式
|
|
27
27
|
* @default flex-start
|
|
28
28
|
*/
|
|
29
|
-
align:
|
|
29
|
+
align: 'flex-start' | 'center' | 'flex-end'
|
|
30
|
+
/**
|
|
31
|
+
* 点击的样式反馈
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
clickable: boolean
|
|
30
35
|
/**
|
|
31
36
|
* 点击事件
|
|
32
37
|
* @default false
|
|
@@ -15,6 +15,7 @@ export interface FormItemProps extends Omit<BasicComponent, 'children'>, BaseFor
|
|
|
15
15
|
shouldUpdate: boolean;
|
|
16
16
|
noStyle: boolean;
|
|
17
17
|
children: ReactNode | ((obj: any) => React.ReactNode);
|
|
18
|
+
align?: 'flex-start' | 'center' | 'flex-end';
|
|
18
19
|
}
|
|
19
20
|
export declare class FormItem extends React.Component<Partial<FormItemProps>, {
|
|
20
21
|
resetCount: number;
|
|
@@ -55,6 +55,11 @@ export interface FormItemProps extends Omit<BasicComponent, 'children'>, BaseFor
|
|
|
55
55
|
*/
|
|
56
56
|
noStyle: boolean
|
|
57
57
|
children: ReactNode | ((obj: any) => React.ReactNode);
|
|
58
|
+
/**
|
|
59
|
+
* 对齐方式
|
|
60
|
+
* @default flex-start
|
|
61
|
+
*/
|
|
62
|
+
align?: 'flex-start' | 'center' | 'flex-end'
|
|
58
63
|
}
|
|
59
64
|
export declare class FormItem extends React.Component<Partial<FormItemProps>, {
|
|
60
65
|
resetCount: number;
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
export type ImagePreviewCloseIconPosition = 'top-right' | 'top-left' | 'bottom';
|
|
4
|
+
export interface ImageOption {
|
|
5
|
+
src: string;
|
|
6
|
+
index?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface VideoOption {
|
|
9
|
+
source: {
|
|
10
|
+
src: string;
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
options: {
|
|
14
|
+
muted: boolean;
|
|
15
|
+
controls: boolean;
|
|
16
|
+
};
|
|
17
|
+
index?: number;
|
|
18
|
+
}
|
|
4
19
|
export interface ImagePreviewProps extends BasicComponent {
|
|
5
20
|
images: Array<{
|
|
6
21
|
src: string;
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
export type ImagePreviewCloseIconPosition = 'top-right' | 'top-left' | 'bottom';
|
|
4
|
+
export interface ImageOption {
|
|
5
|
+
src: string;
|
|
6
|
+
index?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface VideoOption {
|
|
9
|
+
source: {
|
|
10
|
+
src: string;
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
options: {
|
|
14
|
+
muted: boolean;
|
|
15
|
+
controls: boolean;
|
|
16
|
+
};
|
|
17
|
+
index?: number;
|
|
18
|
+
}
|
|
4
19
|
export interface ImagePreviewProps extends BasicComponent {
|
|
5
20
|
/**
|
|
6
21
|
* 预览图片数组
|
|
7
22
|
* @default []
|
|
8
23
|
*/
|
|
9
|
-
images: Array<
|
|
10
|
-
src: string;
|
|
11
|
-
}>
|
|
24
|
+
images: Array<ImageOption>
|
|
12
25
|
/**
|
|
13
26
|
* 预览的视频数组(视频自动放到图片之前)
|
|
14
27
|
* @default []
|
|
15
28
|
*/
|
|
16
|
-
videos: Array<
|
|
17
|
-
source: {
|
|
18
|
-
src: string;
|
|
19
|
-
type: string;
|
|
20
|
-
};
|
|
21
|
-
options: {
|
|
22
|
-
muted: boolean;
|
|
23
|
-
controls: boolean;
|
|
24
|
-
};
|
|
25
|
-
}>
|
|
29
|
+
videos: Array<VideoOption>
|
|
26
30
|
/**
|
|
27
31
|
* 是否展示预览图片
|
|
28
32
|
* @default false
|
|
@@ -14,7 +14,7 @@ export interface InputNumberProps extends BasicComponent {
|
|
|
14
14
|
formatter?: (value?: string | number) => string;
|
|
15
15
|
onPlus: (e: React.MouseEvent) => void;
|
|
16
16
|
onMinus: (e: React.MouseEvent) => void;
|
|
17
|
-
onOverlimit: (e: React.MouseEvent) => void;
|
|
17
|
+
onOverlimit: (e: React.MouseEvent | ChangeEvent<HTMLInputElement>) => void;
|
|
18
18
|
onBlur: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
19
19
|
onFocus: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
20
20
|
onChange: (param: string | number, e: React.MouseEvent | ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -76,7 +76,7 @@ export interface InputNumberProps extends BasicComponent {
|
|
|
76
76
|
* 点击不可用的按钮时触发
|
|
77
77
|
* @default -
|
|
78
78
|
*/
|
|
79
|
-
onOverlimit: (e: React.MouseEvent) => void
|
|
79
|
+
onOverlimit: (e: React.MouseEvent | ChangeEvent<HTMLInputElement>) => void
|
|
80
80
|
/**
|
|
81
81
|
* 输入框失去焦点时触发
|
|
82
82
|
* @default -
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export type PopoverTheme = 'light' | 'dark';
|
|
3
2
|
export type PopoverLocation = 'bottom' | 'top' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
|
4
3
|
export interface PopoverList {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RadioGroupShape } from './types';
|
|
3
3
|
declare const _default: React.Context<{
|
|
4
|
-
labelPosition:
|
|
4
|
+
labelPosition: "left" | "right";
|
|
5
5
|
disabled: boolean | undefined;
|
|
6
6
|
value: string | number;
|
|
7
7
|
shape: RadioGroupShape | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { SwiperProps as TaroSwiperProps } from '@tarojs/components';
|
|
3
|
+
import { CommonEventFunction } from '@tarojs/components/types/common';
|
|
3
4
|
export interface SwiperProps extends Omit<TaroSwiperProps, 'ref'> {
|
|
4
5
|
/**
|
|
5
6
|
* 轮播卡片的宽度
|
|
@@ -40,7 +41,7 @@ export interface SwiperProps extends Omit<TaroSwiperProps, 'ref'> {
|
|
|
40
41
|
* 卡片切换后的回调
|
|
41
42
|
* @default -
|
|
42
43
|
*/
|
|
43
|
-
onChange:
|
|
44
|
+
onChange: CommonEventFunction<TaroSwiperProps.onChangeEventDetail>
|
|
44
45
|
style: CSSProperties;
|
|
45
46
|
}
|
|
46
47
|
export declare const Swiper: React.ForwardRefExoticComponent<Partial<SwiperProps> & React.RefAttributes<unknown>>;
|
|
@@ -56,5 +56,5 @@ export interface UploaderProps extends BasicComponent {
|
|
|
56
56
|
onFileItemClick?: (file: FileItem, index: number) => void;
|
|
57
57
|
}
|
|
58
58
|
export declare const Uploader: React.ForwardRefExoticComponent<Partial<UploaderProps> & {
|
|
59
|
-
children?: React.ReactNode;
|
|
59
|
+
children?: React.ReactNode | undefined;
|
|
60
60
|
} & React.RefAttributes<unknown>>;
|
|
@@ -211,6 +211,6 @@ export interface UploaderProps extends BasicComponent {
|
|
|
211
211
|
onFileItemClick?: (file: FileItem, index: number) => void
|
|
212
212
|
}
|
|
213
213
|
export declare const Uploader: React.ForwardRefExoticComponent<Partial<UploaderProps> & {
|
|
214
|
-
children?: React.ReactNode;
|
|
214
|
+
children?: React.ReactNode | undefined;
|
|
215
215
|
} & React.RefAttributes<unknown>>;
|
|
216
216
|
export {};
|
|
@@ -10,7 +10,7 @@ declare const getEndIndex: ({ list, startIndex, visibleCount, itemEqual, positio
|
|
|
10
10
|
positions: PositionType[];
|
|
11
11
|
offSetSize: number;
|
|
12
12
|
overscan: number;
|
|
13
|
-
sizeKey?:
|
|
13
|
+
sizeKey?: "width" | "height";
|
|
14
14
|
}) => number;
|
|
15
|
-
declare const updateItemSize: (positions: PositionType[], items: HTMLCollection, sizeKey:
|
|
15
|
+
declare const updateItemSize: (positions: PositionType[], items: HTMLCollection, sizeKey: "width" | "height", margin?: number) => void;
|
|
16
16
|
export { initPositinoCache, getListTotalSize, binarySearch, getEndIndex, updateItemSize, };
|