@nutui/nutui-react-taro 2.3.1 → 2.3.2

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 (145) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/esm/ActionSheet/style/style.css +1 -1
  3. package/dist/esm/ActionSheet.js +4 -4
  4. package/dist/esm/Address/style/style.css +1 -1
  5. package/dist/esm/Address.js +5 -5
  6. package/dist/esm/Audio.js +3 -3
  7. package/dist/esm/AvatarCropper.js +2 -2
  8. package/dist/esm/Calendar/style/style.css +1 -1
  9. package/dist/esm/Calendar.js +4 -4
  10. package/dist/esm/Cascader/style/style.css +1 -1
  11. package/dist/esm/Cascader.js +4 -4
  12. package/dist/esm/DatePicker/style/style.css +1 -1
  13. package/dist/esm/DatePicker.js +5 -5
  14. package/dist/esm/Dialog.js +3 -3
  15. package/dist/esm/FixedNav.js +3 -3
  16. package/dist/esm/ImagePreview/style/style.css +1 -1
  17. package/dist/esm/ImagePreview.js +4 -4
  18. package/dist/esm/Menu.js +4 -4
  19. package/dist/esm/MenuItem.js +3 -3
  20. package/dist/esm/NumberKeyboard/style/style.css +1 -1
  21. package/dist/esm/NumberKeyboard.js +4 -4
  22. package/dist/esm/Overlay.js +2 -2
  23. package/dist/esm/Picker/style/style.css +1 -1
  24. package/dist/esm/Picker.js +4 -4
  25. package/dist/esm/Popover/style/style.css +1 -1
  26. package/dist/esm/Popover.js +4 -4
  27. package/dist/esm/Popup/style/style.css +1 -1
  28. package/dist/esm/Popup.js +3 -3
  29. package/dist/esm/PullToRefresh.js +2 -2
  30. package/dist/esm/Range.js +2 -2
  31. package/dist/esm/ShortPassword/style/style.css +1 -1
  32. package/dist/esm/ShortPassword.js +4 -4
  33. package/dist/esm/SideNavBar/style/style.css +1 -1
  34. package/dist/esm/SideNavBar.js +4 -4
  35. package/dist/esm/Swipe.js +2 -2
  36. package/dist/esm/TimeSelect/style/style.css +1 -1
  37. package/dist/esm/TimeSelect.js +4 -4
  38. package/dist/esm/Toast.js +3 -3
  39. package/dist/esm/Tour/style/style.css +1 -1
  40. package/dist/esm/Tour.js +5 -5
  41. package/dist/esm/{actionsheet.taro-1SIVktd6.js → actionsheet.taro-gfhQciJ4.js} +1 -1
  42. package/dist/esm/{address.taro-0oHDMjvi.js → address.taro-DwplktN_.js} +2 -2
  43. package/dist/esm/{audio.taro-TwVp1boF.js → audio.taro-Z23xRUZF.js} +1 -1
  44. package/dist/esm/{avatarcropper.taro-xTaDqZuh.js → avatarcropper.taro-H77gHZmo.js} +1 -1
  45. package/dist/esm/{calendar.taro-UTNDbfde.js → calendar.taro-Tuy-Kr-q.js} +1 -1
  46. package/dist/esm/{cascader.taro-TXNqGqoz.js → cascader.taro-gspYp5PT.js} +2 -2
  47. package/dist/esm/{datepicker.taro-XBRswbnv.js → datepicker.taro-a2BIZNUH.js} +1 -1
  48. package/dist/esm/{dialog.taro-8KQTLwUg.js → dialog.taro-UQN2mJZR.js} +1 -1
  49. package/dist/esm/{fixednav.taro-Y7yk8THh.js → fixednav.taro-7OfzwFBE.js} +2 -2
  50. package/dist/esm/{imagepreview.taro-RbAHvSoF.js → imagepreview.taro-DKFWoFNy.js} +1 -1
  51. package/dist/esm/{menu.taro-EytwZPzh.js → menu.taro-ODwHYGFM.js} +1 -1
  52. package/dist/esm/{menuitem.taro-nLVATeRi.js → menuitem.taro-9nyTDLpt.js} +1 -1
  53. package/dist/esm/{numberkeyboard.taro-5LPPRBFw.js → numberkeyboard.taro-gJhSoXsl.js} +1 -1
  54. package/dist/esm/nutui-react.es.js +26 -26
  55. package/dist/esm/{overlay.taro-Iqz9hm-3.js → overlay.taro-HsGeVyPh.js} +1 -1
  56. package/dist/esm/{picker.taro-77giqVEH.js → picker.taro-4lJuJ4rX.js} +3 -3
  57. package/dist/esm/{popover.taro-dXJi9liV.js → popover.taro-N1dZfUxf.js} +1 -1
  58. package/dist/esm/{popup.taro-KqkDIedA.js → popup.taro-2FdJu1kg.js} +1 -1
  59. package/dist/esm/{pulltorefresh.taro-oRUwveUX.js → pulltorefresh.taro-GxK5LBIE.js} +1 -1
  60. package/dist/esm/{range.taro-708Gnv2w.js → range.taro-S6WTiP1X.js} +1 -1
  61. package/dist/esm/{shortpassword.taro-641T08nE.js → shortpassword.taro-uFeVULsY.js} +1 -1
  62. package/dist/esm/{sidenavbar.taro-jJvAbDgx.js → sidenavbar.taro-J5SEKQIh.js} +1 -1
  63. package/dist/esm/{swipe.taro-AVgWtTnP.js → swipe.taro-p2ONOq1o.js} +1 -1
  64. package/dist/esm/{timeselect.taro-HE0xZtNu.js → timeselect.taro-7FWR9oaJ.js} +1 -1
  65. package/dist/esm/{toast.taro-eCBeePr8.js → toast.taro-xnEQSCDJ.js} +2 -2
  66. package/dist/esm/{tour.taro-omnaIavI.js → tour.taro-_3C-szH1.js} +1 -1
  67. package/dist/esm/types/src/packages/address/address.d.ts +1 -1
  68. package/dist/esm/types/src/packages/address/address.taro.d.ts +1 -1
  69. package/dist/esm/types/src/packages/address/existRender.d.ts +1 -1
  70. package/dist/esm/types/src/packages/address/existRender.taro.d.ts +1 -1
  71. package/dist/esm/types/src/packages/animate/animate.d.ts +1 -1
  72. package/dist/esm/types/src/packages/animate/animate.taro.d.ts +1 -1
  73. package/dist/esm/types/src/packages/animate/index.d.ts +1 -1
  74. package/dist/esm/types/src/packages/animate/index.taro.d.ts +1 -1
  75. package/dist/esm/types/src/packages/calendar/calendar.d.ts +1 -1
  76. package/dist/esm/types/src/packages/calendar/calendar.taro.d.ts +1 -1
  77. package/dist/esm/types/src/packages/calendar/utils.d.ts +1 -1
  78. package/dist/esm/types/src/packages/calendaritem/calendaritem.d.ts +1 -1
  79. package/dist/esm/types/src/packages/calendaritem/calendaritem.taro.d.ts +1 -1
  80. package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.d.ts +1 -1
  81. package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.taro.d.ts +1 -1
  82. package/dist/esm/types/src/packages/fixednav/fixednav.d.ts +2 -6
  83. package/dist/esm/types/src/packages/fixednav/fixednav.taro.d.ts +2 -6
  84. package/dist/esm/types/src/packages/fixednav/index.d.ts +2 -1
  85. package/dist/esm/types/src/packages/fixednav/index.taro.d.ts +2 -1
  86. package/dist/esm/types/src/packages/fixednav/types.d.ts +12 -0
  87. package/dist/esm/types/src/packages/radiogroup/radiogroup.d.ts +1 -1
  88. package/dist/esm/types/src/packages/radiogroup/radiogroup.taro.d.ts +1 -1
  89. package/dist/esm/types/src/packages/virtuallist/utils.d.ts +1 -1
  90. package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +1 -1
  91. package/dist/esm/types/src/packages/virtuallist/virtuallist.taro.d.ts +1 -1
  92. package/dist/esm/types/src/utils/use-touch.d.ts +2 -0
  93. package/dist/esm/{use-touch-DODa8svc.js → use-touch-BUFdkOSA.js} +7 -0
  94. package/dist/locales/base.js +1 -1
  95. package/dist/locales/en-US.js +1 -1
  96. package/dist/locales/id-ID.js +1 -1
  97. package/dist/locales/tr-TR.js +1 -1
  98. package/dist/locales/zh-CN.js +1 -1
  99. package/dist/locales/zh-TW.js +1 -1
  100. package/dist/locales/zh-UG.js +1 -1
  101. package/dist/nutui.react.es.js +13 -14
  102. package/dist/nutui.react.umd.js +13 -14
  103. package/dist/packages/cascader/cascader.scss +1 -6
  104. package/dist/packages/popup/popup.scss +2 -2
  105. package/dist/style.css +1 -1
  106. package/dist/style.mjs +1 -1
  107. package/dist/types/packages/address/address.d.ts +1 -1
  108. package/dist/types/packages/address/address.taro.d.ts +1 -1
  109. package/dist/types/packages/address/existRender.d.ts +1 -1
  110. package/dist/types/packages/address/existRender.taro.d.ts +1 -1
  111. package/dist/types/packages/animate/animate.d.ts +1 -1
  112. package/dist/types/packages/animate/animate.taro.d.ts +1 -1
  113. package/dist/types/packages/animate/index.d.ts +1 -1
  114. package/dist/types/packages/animate/index.taro.d.ts +1 -1
  115. package/dist/types/packages/calendar/calendar.d.ts +1 -1
  116. package/dist/types/packages/calendar/calendar.taro.d.ts +1 -1
  117. package/dist/types/packages/calendar/utils.d.ts +1 -1
  118. package/dist/types/packages/calendaritem/calendaritem.d.ts +1 -1
  119. package/dist/types/packages/calendaritem/calendaritem.taro.d.ts +1 -1
  120. package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +1 -1
  121. package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +1 -1
  122. package/dist/types/packages/fixednav/fixednav.d.ts +2 -6
  123. package/dist/types/packages/fixednav/fixednav.taro.d.ts +2 -6
  124. package/dist/types/packages/fixednav/index.d.ts +2 -1
  125. package/dist/types/packages/fixednav/index.taro.d.ts +2 -1
  126. package/dist/types/packages/fixednav/types.d.ts +12 -0
  127. package/dist/types/packages/radiogroup/radiogroup.d.ts +1 -1
  128. package/dist/types/packages/radiogroup/radiogroup.taro.d.ts +1 -1
  129. package/dist/types/packages/virtuallist/utils.d.ts +1 -1
  130. package/dist/types/packages/virtuallist/virtuallist.d.ts +1 -1
  131. package/dist/types/packages/virtuallist/virtuallist.taro.d.ts +1 -1
  132. package/dist/types/utils/use-touch.d.ts +2 -0
  133. package/package.json +1 -1
  134. /package/dist/esm/types/src/packages/address/{type.d.ts → types.d.ts} +0 -0
  135. /package/dist/esm/types/src/packages/animate/{type.d.ts → types.d.ts} +0 -0
  136. /package/dist/esm/types/src/packages/calendar/{type.d.ts → types.d.ts} +0 -0
  137. /package/dist/esm/types/src/packages/checkboxgroup/{type.d.ts → types.d.ts} +0 -0
  138. /package/dist/esm/types/src/packages/radiogroup/{type.d.ts → types.d.ts} +0 -0
  139. /package/dist/esm/types/src/packages/virtuallist/{type.d.ts → types.d.ts} +0 -0
  140. /package/dist/types/packages/address/{type.d.ts → types.d.ts} +0 -0
  141. /package/dist/types/packages/animate/{type.d.ts → types.d.ts} +0 -0
  142. /package/dist/types/packages/calendar/{type.d.ts → types.d.ts} +0 -0
  143. /package/dist/types/packages/checkboxgroup/{type.d.ts → types.d.ts} +0 -0
  144. /package/dist/types/packages/radiogroup/{type.d.ts → types.d.ts} +0 -0
  145. /package/dist/types/packages/virtuallist/{type.d.ts → types.d.ts} +0 -0
package/dist/style.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.3.1 Wed Dec 13 2023 16:29:32 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.3.2 Fri Dec 15 2023 18:56:15 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import React, { ForwardRefRenderFunction } from 'react';
2
- import { AddressList } from './type';
2
+ import { AddressList } from './types';
3
3
  import { CascaderOption, CascaderOptionKey, CascaderProps, CascaderValue } from '../../packages/cascader/index';
4
4
  type AddressRef = {
5
5
  open: () => void;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { AddressList } from './type';
2
+ import { AddressList } from './types';
3
3
  import { CascaderOption, CascaderOptionKey, CascaderProps, CascaderValue } from '../../packages/cascader/index.taro';
4
4
  type AddressRef = {
5
5
  open: () => void;
@@ -1,5 +1,5 @@
1
1
  import React, { FunctionComponent, ReactNode } from 'react';
2
- import { AddressList } from './type';
2
+ import { AddressList } from './types';
3
3
  export interface ExistRenderProps {
4
4
  type: string;
5
5
  existList: AddressList[] | [];
@@ -1,5 +1,5 @@
1
1
  import React, { FunctionComponent, ReactNode } from 'react';
2
- import { AddressList } from './type';
2
+ import { AddressList } from './types';
3
3
  export interface ExistRenderProps {
4
4
  type: string;
5
5
  existList: AddressList[] | [];
@@ -1,5 +1,5 @@
1
1
  import React, { FunctionComponent } from 'react';
2
- import { AnimateType, AnimateAction } from './type';
2
+ import { AnimateType, AnimateAction } from './types';
3
3
  import { BasicComponent } from '../../utils/typings';
4
4
  export interface AnimateProps extends BasicComponent {
5
5
  type: AnimateType;
@@ -1,5 +1,5 @@
1
1
  import React, { FunctionComponent } from 'react';
2
- import { AnimateType, AnimateAction } from './type';
2
+ import { AnimateType, AnimateAction } from './types';
3
3
  import { BasicComponent } from '../../utils/typings';
4
4
  export interface AnimateProps extends BasicComponent {
5
5
  /**
@@ -1,4 +1,4 @@
1
1
  import { Animate } from './animate';
2
- export type { AnimateType, AnimateAction } from './type';
2
+ export type { AnimateType, AnimateAction } from './types';
3
3
  export type { AnimateProps } from './animate';
4
4
  export default Animate;
@@ -1,4 +1,4 @@
1
1
  import { Animate } from './animate.taro';
2
- export type { AnimateType, AnimateAction } from './type';
2
+ export type { AnimateType, AnimateAction } from './types';
3
3
  export type { AnimateProps } from './animate.taro';
4
4
  export default Animate;
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { Day, SelectedType } from './type';
2
+ import { Day, SelectedType } from './types';
3
3
  type CalendarRef = {
4
4
  scrollToDate: (date: string) => void;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { Day, SelectedType } from './type';
2
+ import { Day, SelectedType } from './types';
3
3
  type CalendarRef = {
4
4
  scrollToDate: (date: string) => void;
5
5
  };
@@ -1,4 +1,4 @@
1
- import { Day, MonthInfo } from './type';
1
+ import { Day, MonthInfo } from './types';
2
2
  export declare const splitDate: (date: string) => string[];
3
3
  export declare const isMultiple: (day: string, days: string[]) => boolean;
4
4
  export declare const isCurrDay: (month: MonthInfo, day: string | number) => boolean;
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { PopupProps } from '../../packages/popup/index';
3
- import { Day, InputDate, SelectedType } from '../calendar/type';
3
+ import { Day, InputDate, SelectedType } from '../calendar/types';
4
4
  type CalendarRef = {
5
5
  scrollToDate: (date: string) => void;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { PopupProps } from '../../packages/popup/index.taro';
3
- import { Day, InputDate, SelectedType } from '../calendar/type';
3
+ import { Day, InputDate, SelectedType } from '../calendar/types';
4
4
  type CalendarRef = {
5
5
  scrollToDate: (date: string) => void;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { RadioGroupOptionType } from '../../packages/radiogroup/type';
2
+ import { RadioGroupOptionType } from '../../packages/radiogroup/types';
3
3
  export type CheckboxLabelPosition = 'left' | 'right';
4
4
  export type CheckboxDirection = 'horizontal' | 'vertical';
5
5
  export interface CheckboxGroupProps {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { RadioGroupOptionType } from '../../packages/radiogroup/type';
2
+ import { RadioGroupOptionType } from '../../packages/radiogroup/types';
3
3
  export type CheckboxLabelPosition = 'left' | 'right';
4
4
  export type CheckboxDirection = 'horizontal' | 'vertical';
5
5
  export interface CheckboxGroupProps {
@@ -1,14 +1,10 @@
1
1
  import React, { FunctionComponent, MouseEvent } from 'react';
2
2
  import { BasicComponent } from '../../utils/typings';
3
- export type FixedNavDirection = 'right' | 'left';
4
- export type FixedNavPosition = {
5
- top?: string;
6
- bottom?: string;
7
- };
3
+ import { FixedNavDirection, FixedNavItem, FixedNavPosition } from '../../packages/fixednav/types';
8
4
  export interface FixedNavProps extends BasicComponent {
9
5
  visible: boolean;
10
6
  overlay: boolean;
11
- list: Array<any>;
7
+ list: Array<FixedNavItem>;
12
8
  activeText: string;
13
9
  inactiveText: string;
14
10
  position: FixedNavPosition;
@@ -1,10 +1,6 @@
1
1
  import React, { FunctionComponent, MouseEvent } from 'react';
2
2
  import { BasicComponent } from '../../utils/typings';
3
- export type FixedNavDirection = 'right' | 'left';
4
- export type FixedNavPosition = {
5
- top?: string;
6
- bottom?: string;
7
- };
3
+ import { FixedNavDirection, FixedNavItem, FixedNavPosition } from '../../packages/fixednav/types';
8
4
  export interface FixedNavProps extends BasicComponent {
9
5
  /**
10
6
  * 是否打开
@@ -20,7 +16,7 @@ export interface FixedNavProps extends BasicComponent {
20
16
  * 悬浮列表内容数据
21
17
  * @default []
22
18
  */
23
- list: Array<any>
19
+ list: Array<FixedNavItem>
24
20
  /**
25
21
  * 收起列表按钮文案
26
22
  * @default 收起导航
@@ -1,3 +1,4 @@
1
1
  import { FixedNav } from './fixednav';
2
- export type { FixedNavProps, FixedNavDirection, FixedNavPosition, } from './fixednav';
2
+ export type { FixedNavDirection, FixedNavPosition, FixedNavItem } from './types';
3
+ export type { FixedNavProps } from './fixednav';
3
4
  export default FixedNav;
@@ -1,3 +1,4 @@
1
1
  import { FixedNav } from './fixednav.taro';
2
- export type { FixedNavProps, FixedNavDirection, FixedNavPosition, } from './fixednav.taro';
2
+ export type { FixedNavDirection, FixedNavPosition, FixedNavItem } from './types';
3
+ export type { FixedNavProps } from './fixednav.taro';
3
4
  export default FixedNav;
@@ -0,0 +1,12 @@
1
+ import { Key, ReactNode } from 'react';
2
+ export type FixedNavDirection = 'right' | 'left';
3
+ export type FixedNavPosition = {
4
+ top?: string;
5
+ bottom?: string;
6
+ };
7
+ export interface FixedNavItem {
8
+ id: Key;
9
+ num?: number;
10
+ text: ReactNode;
11
+ icon: ReactNode;
12
+ }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { RadioGroupOptionType } from './type';
2
+ import { RadioGroupOptionType } from './types';
3
3
  type Position = 'left' | 'right';
4
4
  type Direction = 'horizontal' | 'vertical';
5
5
  export interface RadioGroupProps {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { RadioGroupOptionType } from './type';
2
+ import { RadioGroupOptionType } from './types';
3
3
  type Position = 'left' | 'right';
4
4
  type Direction = 'horizontal' | 'vertical';
5
5
  export interface RadioGroupProps {
@@ -1,4 +1,4 @@
1
- import { PositionType, Data } from './type';
1
+ import { PositionType, Data } from './types';
2
2
  declare const initPositinoCache: (reaItemSize: number, length?: number) => PositionType[];
3
3
  declare const getListTotalSize: (positions: Array<PositionType>, horizontal: true | false) => number;
4
4
  declare const binarySearch: (positionsList: Array<PositionType>, horizontal: true | false, value?: number) => number;
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent, ReactNode } from 'react';
2
- import type { Data } from './type';
2
+ import type { Data } from './types';
3
3
  import { BasicComponent } from '../../utils/typings';
4
4
  export interface VirtualListProps extends BasicComponent {
5
5
  list: Array<Data>;
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent, ReactNode } from 'react';
2
- import { Data } from './type';
2
+ import { Data } from './types';
3
3
  import { BasicComponent } from '../../utils/typings';
4
4
  export interface VirtualListProps extends BasicComponent {
5
5
  /**
@@ -4,10 +4,12 @@ export declare function useTouch(): {
4
4
  move: (event: React.TouchEvent<HTMLElement>) => void;
5
5
  start: (event: React.TouchEvent<HTMLElement>) => void;
6
6
  reset: () => void;
7
+ touchTime: React.MutableRefObject<number | null>;
7
8
  startX: React.MutableRefObject<number>;
8
9
  startY: React.MutableRefObject<number>;
9
10
  deltaX: React.MutableRefObject<number>;
10
11
  deltaY: React.MutableRefObject<number>;
12
+ delta: React.MutableRefObject<number>;
11
13
  offsetX: React.MutableRefObject<number>;
12
14
  offsetY: React.MutableRefObject<number>;
13
15
  direction: React.MutableRefObject<Direction>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui-react-taro",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "style": "dist/style.css",
5
5
  "main": "dist/nutui.react.umd.js",
6
6
  "module": "dist/esm/nutui-react.es.js",