@nutui/nutui-react-taro 2.6.16 → 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.
Files changed (97) hide show
  1. package/CHANGELOG.md +28 -14
  2. package/README.md +2 -2
  3. package/dist/esm/ActionSheet.js +1 -1
  4. package/dist/esm/Address.js +1 -1
  5. package/dist/esm/Calendar.js +1 -1
  6. package/dist/esm/Cascader.js +1 -1
  7. package/dist/esm/Cell/style/style.css +1 -1
  8. package/dist/esm/Cell.js +1 -1
  9. package/dist/esm/DatePicker.js +1 -1
  10. package/dist/esm/Dialog.js +1 -1
  11. package/dist/esm/Drag.js +1 -1
  12. package/dist/esm/Ellipsis.js +1 -1
  13. package/dist/esm/FixedNav.js +1 -1
  14. package/dist/esm/Form/style/style.css +1 -1
  15. package/dist/esm/Form.js +2 -2
  16. package/dist/esm/FormItem.js +1 -1
  17. package/dist/esm/ImagePreview.js +1 -1
  18. package/dist/esm/Menu.js +1 -1
  19. package/dist/esm/MenuItem.js +1 -1
  20. package/dist/esm/NumberKeyboard.js +1 -1
  21. package/dist/esm/Overlay.js +1 -1
  22. package/dist/esm/Picker.js +1 -1
  23. package/dist/esm/Popover.js +1 -1
  24. package/dist/esm/Popup.js +1 -1
  25. package/dist/esm/PullToRefresh.js +1 -1
  26. package/dist/esm/ShortPassword.js +1 -1
  27. package/dist/esm/SideNavBar.js +1 -1
  28. package/dist/esm/Sticky.js +1 -1
  29. package/dist/esm/Tabs.js +1 -1
  30. package/dist/esm/TimeSelect.js +1 -1
  31. package/dist/esm/Toast.js +1 -1
  32. package/dist/esm/Tour.js +1 -1
  33. package/dist/esm/Uploader.js +1 -1
  34. package/dist/esm/{actionsheet.taro-CJjNsNrH.js → actionsheet.taro-CQ3sJY3B.js} +1 -1
  35. package/dist/esm/{address.taro-BYzOGUEN.js → address.taro-Old6uBAn.js} +2 -2
  36. package/dist/esm/{calendar.taro-BXrHr8bg.js → calendar.taro-C4UvVkgw.js} +1 -1
  37. package/dist/esm/{cascader.taro-jxe42b68.js → cascader.taro-BNw6H5ue.js} +2 -2
  38. package/dist/esm/{cell.taro-CVFlcls2.js → cell.taro-DWLhb5m6.js} +3 -3
  39. package/dist/esm/{datepicker.taro-BxaZ3Fjv.js → datepicker.taro-C1wMTysn.js} +1 -1
  40. package/dist/esm/{dialog.taro-BW9D2Gsr.js → dialog.taro-BY2KfQh1.js} +1 -1
  41. package/dist/esm/{drag.taro-B_TO4Nnu.js → drag.taro-B_sfzmtW.js} +2 -2
  42. package/dist/esm/{ellipsis.taro-cMTr1Wcw.js → ellipsis.taro-Ck2rumQ6.js} +3 -3
  43. package/dist/esm/{fixednav.taro-D3KnhYoI.js → fixednav.taro-C3iUeag8.js} +1 -1
  44. package/dist/esm/{formitem.taro-DogVddcs.js → formitem.taro-CEWRz5EJ.js} +4 -4
  45. package/dist/esm/{get-scroll-parent-DB1VRg11.js → get-scroll-parent-9ZDWApX2.js} +0 -1
  46. package/dist/esm/{imagepreview.taro-CF-CCJ1Q.js → imagepreview.taro-CJDHziHn.js} +27 -18
  47. package/dist/esm/{menu.taro-CLbOM_Z4.js → menu.taro-Cw_lCHDb.js} +1 -1
  48. package/dist/esm/{menuitem.taro-CNaseNcY.js → menuitem.taro-DqLGsBUc.js} +1 -1
  49. package/dist/esm/{numberkeyboard.taro-Cz6rKxk3.js → numberkeyboard.taro-B-FEM91t.js} +1 -1
  50. package/dist/esm/nutui-react.es.js +28 -28
  51. package/dist/esm/{overlay.taro-C2t82CZz.js → overlay.taro-B5s6rmEf.js} +2 -16
  52. package/dist/esm/{picker.taro-CafNRRO5.js → picker.taro-Cu8B-fNC.js} +2 -3
  53. package/dist/esm/{popover.taro-B_FJgU0z.js → popover.taro-DrC9HQ1E.js} +1 -1
  54. package/dist/esm/{popup.taro-CR3JyuJV.js → popup.taro-_E52-0su.js} +1 -1
  55. package/dist/esm/{pulltorefresh.taro-BScP6uPx.js → pulltorefresh.taro-DSr2dBjM.js} +5 -1
  56. package/dist/esm/{shortpassword.taro-DpdtRsQ-.js → shortpassword.taro-CmPaHe0E.js} +1 -1
  57. package/dist/esm/{sidenavbar.taro-5BmrYFtP.js → sidenavbar.taro-BWB1yd3c.js} +1 -1
  58. package/dist/esm/{sticky.taro-Zbz7wQH8.js → sticky.taro-2Vup8HR8.js} +1 -1
  59. package/dist/esm/{tabs.taro-B2D3AtVV.js → tabs.taro-8X51sTol.js} +2 -0
  60. package/dist/esm/{timeselect.taro-DncKbp3l.js → timeselect.taro-CgcPLf0z.js} +1 -1
  61. package/dist/esm/{toast.taro-CYk6UERn.js → toast.taro-3B6uFLDu.js} +1 -1
  62. package/dist/esm/{tour.taro-SPMrhDA9.js → tour.taro-D88VKjAl.js} +1 -1
  63. package/dist/esm/{uploader.taro-DagHZaNI.js → uploader.taro-0QYFT-E8.js} +1 -1
  64. package/dist/locales/base.js +1 -1
  65. package/dist/locales/en-US.js +1 -1
  66. package/dist/locales/id-ID.js +1 -1
  67. package/dist/locales/tr-TR.js +1 -1
  68. package/dist/locales/zh-CN.js +1 -1
  69. package/dist/locales/zh-TW.js +1 -1
  70. package/dist/locales/zh-UG.js +1 -1
  71. package/dist/nutui.react.es.js +45 -28
  72. package/dist/nutui.react.umd.js +45 -28
  73. package/dist/packages/cell/cell.scss +20 -0
  74. package/dist/style.css +1 -1
  75. package/dist/types/packages/avatargroup/context.d.ts +0 -1
  76. package/dist/types/packages/cascader/cascader.d.ts +1 -1
  77. package/dist/types/packages/cascader/cascader.taro.d.ts +1 -1
  78. package/dist/types/packages/cell/cell.d.ts +1 -0
  79. package/dist/types/packages/cell/cell.taro.d.ts +5 -0
  80. package/dist/types/packages/cellgroup/context.d.ts +0 -1
  81. package/dist/types/packages/checkboxgroup/context.d.ts +0 -1
  82. package/dist/types/packages/collapse/context.d.ts +0 -1
  83. package/dist/types/packages/form/context.d.ts +0 -1
  84. package/dist/types/packages/imagepreview/imagepreview.d.ts +15 -0
  85. package/dist/types/packages/imagepreview/imagepreview.taro.d.ts +17 -13
  86. package/dist/types/packages/popover/types.d.ts +0 -1
  87. package/dist/types/packages/radiogroup/context.d.ts +1 -1
  88. package/dist/types/packages/row/UserContext.d.ts +0 -1
  89. package/dist/types/packages/sidenavbar/context.d.ts +0 -1
  90. package/dist/types/packages/steps/context.d.ts +0 -1
  91. package/dist/types/packages/swiper/context.d.ts +0 -1
  92. package/dist/types/packages/uploader/uploader.d.ts +1 -1
  93. package/dist/types/packages/uploader/uploader.taro.d.ts +1 -1
  94. package/dist/types/packages/virtuallist/utils.d.ts +2 -2
  95. package/dist/types/utils/index.d.ts +0 -1
  96. package/dist/types/utils/use-lock-scoll-taro.d.ts +0 -1
  97. package/package.json +1 -1
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const AvatarContext: import("react").Context<{}>;
@@ -25,5 +25,5 @@ export type CascaderActions = {
25
25
  close: () => void;
26
26
  };
27
27
  export declare const Cascader: React.ForwardRefExoticComponent<Partial<CascaderProps> & {
28
- children?: React.ReactNode;
28
+ children?: ReactNode | undefined;
29
29
  } & React.RefAttributes<unknown>>;
@@ -89,5 +89,5 @@ export type CascaderActions = {
89
89
  close: () => void;
90
90
  };
91
91
  export declare const Cascader: React.ForwardRefExoticComponent<Partial<CascaderProps> & {
92
- children?: React.ReactNode;
92
+ children?: ReactNode | undefined;
93
93
  } & React.RefAttributes<unknown>>;
@@ -7,6 +7,7 @@ export interface CellProps extends BasicComponent {
7
7
  extra: ReactNode;
8
8
  radius: string | number;
9
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'>> & {
@@ -28,6 +28,11 @@ export interface CellProps extends BasicComponent {
28
28
  */
29
29
  align: 'flex-start' | 'center' | 'flex-end'
30
30
  /**
31
+ * 点击的样式反馈
32
+ * @default false
33
+ */
34
+ clickable: boolean
35
+ /**
31
36
  * 点击事件
32
37
  * @default false
33
38
  */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const CellGroupContext: import("react").Context<{
3
2
  divider: boolean;
4
3
  } | null>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CheckboxLimit, CheckboxLabelPosition } from './types';
3
2
  declare const CheckboxGroupContext: import("react").Context<{
4
3
  labelPosition: CheckboxLabelPosition;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: import("react").Context<{
3
2
  isOpen: (name: string) => boolean;
4
3
  updateValue: (name: string) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Context: import("react").Context<{
3
2
  [key: string]: any;
4
3
  }>;
@@ -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
@@ -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: 'left' | 'right';
4
+ labelPosition: "left" | "right";
5
5
  disabled: boolean | undefined;
6
6
  value: string | number;
7
7
  shape: RadioGroupShape | undefined;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const DataContext: import("react").Context<{}>;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const OffsetContext: import("react").Context<number>;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const DataContext: import("react").Context<{}>;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const DataContext: import("react").Context<{}>;
@@ -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?: 'width' | 'height';
13
+ sizeKey?: "width" | "height";
14
14
  }) => number;
15
- declare const updateItemSize: (positions: PositionType[], items: HTMLCollection, sizeKey: 'width' | 'height', margin?: number) => void;
15
+ declare const updateItemSize: (positions: PositionType[], items: HTMLCollection, sizeKey: "width" | "height", margin?: number) => void;
16
16
  export { initPositinoCache, getListTotalSize, binarySearch, getEndIndex, updateItemSize, };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const isObject: (val: unknown) => val is Record<any, any>;
3
2
  export declare const isFunction: (val: unknown) => val is Function;
4
3
  export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const useLockScrollTaro: (shouldLock: boolean) => import("react").MutableRefObject<null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui-react-taro",
3
- "version": "2.6.16",
3
+ "version": "2.6.17",
4
4
  "style": "dist/style.css",
5
5
  "main": "dist/nutui.react.umd.js",
6
6
  "module": "dist/esm/nutui-react.es.js",