@nutui/nutui-react-taro 3.0.0-beta.12 → 3.0.0-beta.14

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 (253) hide show
  1. package/dist/cjs/{utils → hooks}/use-click-away.js +2 -2
  2. package/dist/cjs/{utils → hooks}/use-isomprphic-layout-effect.js +1 -1
  3. package/dist/cjs/{utils → hooks}/use-lock-scroll.js +2 -2
  4. package/dist/cjs/packages/address/address.d.ts +1 -1
  5. package/dist/cjs/packages/address/address.js +1 -1
  6. package/dist/cjs/packages/animate/animate.js +5 -6
  7. package/dist/cjs/packages/animate/style/animate.scss +63 -105
  8. package/dist/cjs/packages/animate/style/style.css +45 -44
  9. package/dist/cjs/packages/animate/style/style.harmony.css +45 -44
  10. package/dist/cjs/packages/avatarcropper/avatarcropper.js +3 -2
  11. package/dist/cjs/packages/badge/badge.js +10 -11
  12. package/dist/cjs/packages/calendar/style/calendar.scss +25 -31
  13. package/dist/cjs/packages/calendar/style/style.css +14 -20
  14. package/dist/cjs/packages/calendar/style/style.harmony.css +14 -20
  15. package/dist/cjs/packages/calendarcard/calendarcard.js +1 -1
  16. package/dist/cjs/packages/calendaritem/calendaritem.js +1 -2
  17. package/dist/cjs/packages/cascader/cascader.js +1 -1
  18. package/dist/cjs/packages/checkbox/checkbox.js +1 -1
  19. package/dist/cjs/packages/checkboxgroup/checkboxgroup.js +1 -1
  20. package/dist/cjs/packages/circleprogress/circleprogress.js +1 -1
  21. package/dist/cjs/packages/collapse/collapse.js +1 -1
  22. package/dist/cjs/packages/configprovider/configprovider.js +1 -1
  23. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  24. package/dist/cjs/packages/datepicker/datepicker.js +1 -1
  25. package/dist/cjs/packages/datepicker/style/style.css +2 -2
  26. package/dist/cjs/packages/dialog/dialog.js +2 -2
  27. package/dist/cjs/packages/drag/drag.js +3 -2
  28. package/dist/cjs/packages/elevator/elevator.js +1 -1
  29. package/dist/cjs/packages/imagepreview/imagepreview.js +1 -1
  30. package/dist/cjs/packages/input/input.js +1 -1
  31. package/dist/cjs/packages/inputnumber/inputnumber.js +1 -1
  32. package/dist/cjs/packages/lottie/mp.js +3 -2
  33. package/dist/cjs/packages/menuitem/menuitem.js +5 -4
  34. package/dist/cjs/packages/notify/notify.js +1 -1
  35. package/dist/cjs/packages/nutui.react.build.d.ts +3 -1
  36. package/dist/cjs/packages/nutui.react.build.js +122 -118
  37. package/dist/cjs/packages/nutui.react.d.ts +4 -1
  38. package/dist/cjs/packages/nutui.react.js +123 -118
  39. package/dist/cjs/packages/nutui.react.scss.d.ts +1 -0
  40. package/dist/cjs/packages/nutui.react.scss.js +1 -0
  41. package/dist/cjs/packages/overlay/overlay.js +1 -1
  42. package/dist/cjs/packages/pagination/pagination.js +1 -1
  43. package/dist/cjs/packages/picker/picker.js +2 -2
  44. package/dist/cjs/packages/picker/pickerpanel.js +1 -1
  45. package/dist/cjs/packages/picker/style/style.css +2 -2
  46. package/dist/cjs/packages/picker/style/style.harmony.css +2 -2
  47. package/dist/cjs/packages/pickerview/index.d.ts +3 -0
  48. package/dist/cjs/packages/pickerview/index.js +13 -0
  49. package/dist/cjs/packages/pickerview/pickerroller.d.ts +7 -0
  50. package/dist/cjs/packages/pickerview/pickerroller.js +186 -0
  51. package/dist/cjs/packages/pickerview/pickerview.d.ts +4 -0
  52. package/dist/cjs/packages/pickerview/pickerview.js +201 -0
  53. package/dist/cjs/packages/pickerview/style/css.js +1 -0
  54. package/dist/cjs/packages/pickerview/style/index.js +1 -0
  55. package/dist/cjs/packages/pickerview/style/pickerview.scss +79 -0
  56. package/dist/cjs/packages/pickerview/style/style.css +73 -0
  57. package/dist/cjs/packages/pickerview/style/style.harmony.css +83 -0
  58. package/dist/cjs/packages/pickerview/types.d.ts +32 -0
  59. package/dist/cjs/packages/pickerview/types.js +4 -0
  60. package/dist/cjs/packages/pickerview/utils.d.ts +14 -0
  61. package/dist/cjs/packages/pickerview/utils.js +46 -0
  62. package/dist/cjs/packages/popover/popover.d.ts +2 -2
  63. package/dist/cjs/packages/popover/popover.js +1 -1
  64. package/dist/cjs/packages/popover/types.d.ts +3 -2
  65. package/dist/cjs/packages/popup/popup.js +1 -1
  66. package/dist/cjs/packages/progress/progress.js +1 -1
  67. package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +3 -2
  68. package/dist/cjs/packages/radio/radio.js +1 -1
  69. package/dist/cjs/packages/radiogroup/radiogroup.js +1 -1
  70. package/dist/cjs/packages/range/range.js +2 -2
  71. package/dist/cjs/packages/rate/rate.js +2 -2
  72. package/dist/cjs/packages/segmented/segmented.js +1 -1
  73. package/dist/cjs/packages/shortpassword/shortpassword.js +1 -1
  74. package/dist/cjs/packages/sidebar/sidebar.js +3 -3
  75. package/dist/cjs/packages/sticky/sticky.js +3 -2
  76. package/dist/cjs/packages/swipe/swipe.js +2 -2
  77. package/dist/cjs/packages/switch/switch.js +1 -1
  78. package/dist/cjs/packages/tabbar/style/style.css +2 -9
  79. package/dist/cjs/packages/tabbar/tabbar.js +1 -1
  80. package/dist/cjs/packages/tabbaritem/style/style.css +2 -9
  81. package/dist/cjs/packages/tabbaritem/style/style.harmony.css +1 -1
  82. package/dist/cjs/packages/tabbaritem/style/tabbaritem.scss +2 -10
  83. package/dist/cjs/packages/tabbaritem/tabbaritem.js +9 -11
  84. package/dist/cjs/packages/table/table.js +1 -1
  85. package/dist/cjs/packages/tabs/tabs.js +3 -3
  86. package/dist/cjs/packages/textarea/textarea.d.ts +3 -3
  87. package/dist/cjs/packages/textarea/textarea.js +19 -22
  88. package/dist/cjs/packages/toast/toast.js +2 -2
  89. package/dist/cjs/packages/tour/tour.d.ts +1 -1
  90. package/dist/cjs/packages/tour/tour.js +1 -1
  91. package/dist/cjs/packages/uploader/types.d.ts +2 -1
  92. package/dist/cjs/packages/uploader/uploader.js +1 -1
  93. package/dist/cjs/packages/virtuallist/virtuallist.js +2 -2
  94. package/dist/cjs/utils/get-rect-by-taro.js +1 -1
  95. package/dist/cjs/utils/get-system-info.d.ts +19 -0
  96. package/dist/cjs/utils/get-system-info.js +32 -0
  97. package/dist/es/{utils → hooks}/use-click-away.js +3 -2
  98. package/dist/es/{utils → hooks}/use-isomprphic-layout-effect.js +1 -1
  99. package/dist/es/{utils → hooks}/use-lock-scroll.js +2 -2
  100. package/dist/es/packages/address/address.d.ts +1 -1
  101. package/dist/es/packages/address/address.js +1 -1
  102. package/dist/es/packages/animate/animate.js +5 -6
  103. package/dist/es/packages/animate/style/animate.scss +63 -105
  104. package/dist/es/packages/animate/style/style.css +45 -44
  105. package/dist/es/packages/animate/style/style.harmony.css +45 -44
  106. package/dist/es/packages/audio/audio.d.ts +30 -10
  107. package/dist/es/packages/avatarcropper/avatarcropper.js +3 -2
  108. package/dist/es/packages/badge/badge.js +10 -11
  109. package/dist/es/packages/calendar/calendar.d.ts +27 -135
  110. package/dist/es/packages/calendar/style/calendar.scss +25 -31
  111. package/dist/es/packages/calendar/style/style.css +14 -20
  112. package/dist/es/packages/calendar/style/style.harmony.css +14 -20
  113. package/dist/es/packages/calendarcard/calendarcard.js +1 -1
  114. package/dist/es/packages/calendaritem/calendaritem.js +1 -2
  115. package/dist/es/packages/cascader/cascader.js +1 -1
  116. package/dist/es/packages/checkbox/checkbox.js +1 -1
  117. package/dist/es/packages/checkboxgroup/checkboxgroup.js +1 -1
  118. package/dist/es/packages/circleprogress/circleprogress.d.ts +1 -1
  119. package/dist/es/packages/circleprogress/circleprogress.js +1 -1
  120. package/dist/es/packages/collapse/collapse.js +1 -1
  121. package/dist/es/packages/configprovider/configprovider.js +1 -1
  122. package/dist/es/packages/configprovider/types.d.ts +1 -1
  123. package/dist/es/packages/datepicker/datepicker.js +1 -1
  124. package/dist/es/packages/datepicker/style/style.css +2 -2
  125. package/dist/es/packages/dialog/dialog.js +2 -2
  126. package/dist/es/packages/drag/drag.js +4 -3
  127. package/dist/es/packages/elevator/elevator.js +1 -1
  128. package/dist/es/packages/form/form.d.ts +1 -1
  129. package/dist/es/packages/imagepreview/imagepreview.js +1 -1
  130. package/dist/es/packages/input/input.js +1 -1
  131. package/dist/es/packages/inputnumber/inputnumber.js +1 -1
  132. package/dist/es/packages/lottie/mp.js +4 -3
  133. package/dist/es/packages/menuitem/menuitem.js +6 -5
  134. package/dist/es/packages/noticebar/noticebar.d.ts +1 -1
  135. package/dist/es/packages/notify/notify.js +1 -1
  136. package/dist/es/packages/nutui.react.build.d.ts +3 -1
  137. package/dist/es/packages/nutui.react.build.js +3 -1
  138. package/dist/es/packages/overlay/overlay.js +1 -1
  139. package/dist/es/packages/pagination/pagination.js +1 -1
  140. package/dist/es/packages/picker/picker.js +2 -2
  141. package/dist/es/packages/picker/pickerpanel.js +1 -1
  142. package/dist/es/packages/picker/style/style.css +2 -2
  143. package/dist/es/packages/picker/style/style.harmony.css +2 -2
  144. package/dist/es/packages/pickerview/index.d.ts +3 -0
  145. package/dist/es/packages/pickerview/index.js +2 -0
  146. package/dist/es/packages/pickerview/pickerroller.d.ts +7 -0
  147. package/dist/es/packages/pickerview/pickerroller.js +175 -0
  148. package/dist/es/packages/pickerview/pickerview.d.ts +4 -0
  149. package/dist/es/packages/pickerview/pickerview.js +189 -0
  150. package/dist/es/packages/pickerview/style/css.js +1 -0
  151. package/dist/es/packages/pickerview/style/index.js +1 -0
  152. package/dist/es/packages/pickerview/style/pickerview.scss +79 -0
  153. package/dist/es/packages/pickerview/style/style.css +73 -0
  154. package/dist/es/packages/pickerview/style/style.harmony.css +83 -0
  155. package/dist/es/packages/pickerview/types.d.ts +32 -0
  156. package/dist/es/packages/pickerview/types.js +1 -0
  157. package/dist/es/packages/pickerview/utils.d.ts +14 -0
  158. package/dist/es/packages/pickerview/utils.js +28 -0
  159. package/dist/es/packages/popover/popover.d.ts +2 -2
  160. package/dist/es/packages/popover/popover.js +1 -1
  161. package/dist/es/packages/popover/types.d.ts +3 -2
  162. package/dist/es/packages/popup/popup.js +1 -1
  163. package/dist/es/packages/progress/progress.js +1 -1
  164. package/dist/es/packages/pulltorefresh/pulltorefresh.js +3 -2
  165. package/dist/es/packages/radio/radio.js +1 -1
  166. package/dist/es/packages/radiogroup/radiogroup.js +1 -1
  167. package/dist/es/packages/range/range.js +2 -2
  168. package/dist/es/packages/rate/rate.js +2 -2
  169. package/dist/es/packages/segmented/segmented.js +1 -1
  170. package/dist/es/packages/shortpassword/shortpassword.js +1 -1
  171. package/dist/es/packages/sidebar/sidebar.js +3 -3
  172. package/dist/es/packages/sticky/sticky.js +4 -3
  173. package/dist/es/packages/swipe/swipe.js +2 -2
  174. package/dist/es/packages/switch/switch.js +1 -1
  175. package/dist/es/packages/tabbar/style/style.css +2 -9
  176. package/dist/es/packages/tabbar/tabbar.js +1 -1
  177. package/dist/es/packages/tabbaritem/style/style.css +2 -9
  178. package/dist/es/packages/tabbaritem/style/style.harmony.css +1 -1
  179. package/dist/es/packages/tabbaritem/style/tabbaritem.scss +2 -10
  180. package/dist/es/packages/tabbaritem/tabbaritem.js +9 -11
  181. package/dist/es/packages/table/table.js +1 -1
  182. package/dist/es/packages/tabs/tabs.js +3 -3
  183. package/dist/es/packages/textarea/textarea.d.ts +3 -3
  184. package/dist/es/packages/textarea/textarea.js +20 -23
  185. package/dist/es/packages/toast/toast.js +2 -2
  186. package/dist/es/packages/tour/tour.d.ts +1 -1
  187. package/dist/es/packages/tour/tour.js +1 -1
  188. package/dist/es/packages/uploader/types.d.ts +2 -1
  189. package/dist/es/packages/uploader/uploader.js +1 -1
  190. package/dist/es/packages/virtuallist/virtuallist.d.ts +1 -1
  191. package/dist/es/packages/virtuallist/virtuallist.js +2 -2
  192. package/dist/es/utils/get-rect-by-taro.js +1 -1
  193. package/dist/es/utils/get-system-info.d.ts +19 -0
  194. package/dist/es/utils/get-system-info.js +19 -0
  195. package/dist/nutui.react.umd.js +529 -172
  196. package/dist/style.css +1 -1
  197. package/dist/style.scss +24 -23
  198. package/dist/styles/variables.scss +3 -1
  199. package/package.json +1 -80
  200. /package/dist/cjs/{utils → hooks}/use-click-away.d.ts +0 -0
  201. /package/dist/cjs/{utils → hooks}/use-client-rect.d.ts +0 -0
  202. /package/dist/cjs/{utils → hooks}/use-client-rect.js +0 -0
  203. /package/dist/cjs/{utils → hooks}/use-custom-event.d.ts +0 -0
  204. /package/dist/cjs/{utils → hooks}/use-custom-event.js +0 -0
  205. /package/dist/cjs/{utils → hooks}/use-force-update.d.ts +0 -0
  206. /package/dist/cjs/{utils → hooks}/use-force-update.js +0 -0
  207. /package/dist/cjs/{utils → hooks}/use-isomprphic-layout-effect.d.ts +0 -0
  208. /package/dist/cjs/{utils → hooks}/use-lock-scoll-taro.d.ts +0 -0
  209. /package/dist/cjs/{utils → hooks}/use-lock-scoll-taro.js +0 -0
  210. /package/dist/cjs/{utils → hooks}/use-lock-scroll.d.ts +0 -0
  211. /package/dist/cjs/{utils → hooks}/use-memo.d.ts +0 -0
  212. /package/dist/cjs/{utils → hooks}/use-memo.js +0 -0
  213. /package/dist/cjs/{utils → hooks}/use-props-value.d.ts +0 -0
  214. /package/dist/cjs/{utils → hooks}/use-props-value.js +0 -0
  215. /package/dist/cjs/{utils → hooks}/use-ref-state.d.ts +0 -0
  216. /package/dist/cjs/{utils → hooks}/use-ref-state.js +0 -0
  217. /package/dist/cjs/{utils → hooks}/use-refs.d.ts +0 -0
  218. /package/dist/cjs/{utils → hooks}/use-refs.js +0 -0
  219. /package/dist/cjs/{utils → hooks}/use-taro-rect.d.ts +0 -0
  220. /package/dist/cjs/{utils → hooks}/use-taro-rect.js +0 -0
  221. /package/dist/cjs/{utils → hooks}/use-touch.d.ts +0 -0
  222. /package/dist/cjs/{utils → hooks}/use-touch.js +0 -0
  223. /package/dist/cjs/{utils → hooks}/use-uuid.d.ts +0 -0
  224. /package/dist/cjs/{utils → hooks}/use-uuid.js +0 -0
  225. /package/dist/cjs/{utils → hooks}/use-watch.d.ts +0 -0
  226. /package/dist/cjs/{utils → hooks}/use-watch.js +0 -0
  227. /package/dist/es/{utils → hooks}/use-click-away.d.ts +0 -0
  228. /package/dist/es/{utils → hooks}/use-client-rect.d.ts +0 -0
  229. /package/dist/es/{utils → hooks}/use-client-rect.js +0 -0
  230. /package/dist/es/{utils → hooks}/use-custom-event.d.ts +0 -0
  231. /package/dist/es/{utils → hooks}/use-custom-event.js +0 -0
  232. /package/dist/es/{utils → hooks}/use-force-update.d.ts +0 -0
  233. /package/dist/es/{utils → hooks}/use-force-update.js +0 -0
  234. /package/dist/es/{utils → hooks}/use-isomprphic-layout-effect.d.ts +0 -0
  235. /package/dist/es/{utils → hooks}/use-lock-scoll-taro.d.ts +0 -0
  236. /package/dist/es/{utils → hooks}/use-lock-scoll-taro.js +0 -0
  237. /package/dist/es/{utils → hooks}/use-lock-scroll.d.ts +0 -0
  238. /package/dist/es/{utils → hooks}/use-memo.d.ts +0 -0
  239. /package/dist/es/{utils → hooks}/use-memo.js +0 -0
  240. /package/dist/es/{utils → hooks}/use-props-value.d.ts +0 -0
  241. /package/dist/es/{utils → hooks}/use-props-value.js +0 -0
  242. /package/dist/es/{utils → hooks}/use-ref-state.d.ts +0 -0
  243. /package/dist/es/{utils → hooks}/use-ref-state.js +0 -0
  244. /package/dist/es/{utils → hooks}/use-refs.d.ts +0 -0
  245. /package/dist/es/{utils → hooks}/use-refs.js +0 -0
  246. /package/dist/es/{utils → hooks}/use-taro-rect.d.ts +0 -0
  247. /package/dist/es/{utils → hooks}/use-taro-rect.js +0 -0
  248. /package/dist/es/{utils → hooks}/use-touch.d.ts +0 -0
  249. /package/dist/es/{utils → hooks}/use-touch.js +0 -0
  250. /package/dist/es/{utils → hooks}/use-uuid.d.ts +0 -0
  251. /package/dist/es/{utils → hooks}/use-uuid.js +0 -0
  252. /package/dist/es/{utils → hooks}/use-watch.d.ts +0 -0
  253. /package/dist/es/{utils → hooks}/use-watch.js +0 -0
@@ -0,0 +1,32 @@
1
+ import { BasicComponent } from "../../utils/typings";
2
+ export type PickerValue = string | number | null;
3
+ export interface PickerOptionItem {
4
+ label: string | number;
5
+ value: string | number;
6
+ children?: PickerOptionItem[];
7
+ }
8
+ export type PickerOptions = PickerOptionItem[];
9
+ export interface PickerRollerProps {
10
+ options: PickerOptionItem[];
11
+ keyIndex: number;
12
+ value: PickerValue;
13
+ threeDimensional?: boolean;
14
+ duration?: number | string;
15
+ onSelect: (option: PickerOptionItem, index: number) => void;
16
+ renderLabel: (item: PickerOptionItem) => React.ReactNode;
17
+ }
18
+ export interface PickerOnChangeCallbackParameter {
19
+ value: PickerValue[];
20
+ index: number;
21
+ selectedOptions: PickerOptionItem[];
22
+ }
23
+ export interface PickerViewProps extends BasicComponent {
24
+ setRefs?: (ref: any) => any;
25
+ options: PickerOptions[];
26
+ value?: PickerValue[];
27
+ defaultValue?: PickerValue[];
28
+ threeDimensional?: boolean;
29
+ duration?: number | string;
30
+ renderLabel: (item: PickerOptionItem) => React.ReactNode;
31
+ onChange?: (arg0: PickerOnChangeCallbackParameter) => void;
32
+ }
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,14 @@
1
+ export declare const momentum: (distance: number, duration: number) => number;
2
+ export declare const useStyles: (touchTime: number, touchDeg: string, scrollDistance: number, lineSpacing: React.MutableRefObject<number>, rotation: number) => {
3
+ touchRollerStyle: () => {
4
+ transition: string;
5
+ transform: string;
6
+ };
7
+ touchTiledStyle: () => {
8
+ transition: string;
9
+ transform: string;
10
+ };
11
+ rollerStyle: (index: number) => {
12
+ transform: string;
13
+ };
14
+ };
@@ -0,0 +1,28 @@
1
+ export var momentum = function(distance, duration) {
2
+ var speed = Math.abs(distance / duration);
3
+ return speed / 0.003 * (distance < 0 ? -1 : 1);
4
+ };
5
+ export var useStyles = function(touchTime, touchDeg, scrollDistance, lineSpacing, rotation) {
6
+ var getTransitionStyle = function(transformValue) {
7
+ return {
8
+ transition: "transform ".concat(touchTime, "ms cubic-bezier(0.17, 0.89, 0.45, 1)"),
9
+ transform: transformValue
10
+ };
11
+ };
12
+ var touchRollerStyle = function() {
13
+ return getTransitionStyle("rotate3d(1, 0, 0, ".concat(touchDeg, ")"));
14
+ };
15
+ var touchTiledStyle = function() {
16
+ return getTransitionStyle("translate3d(0, ".concat(scrollDistance, "px, 0)"));
17
+ };
18
+ var rollerStyle = function(index) {
19
+ return {
20
+ transform: "rotate3d(1, 0, 0, ".concat(-rotation * (index + 1), "deg) translate3d(0px, 0px, ").concat(Math.round(lineSpacing.current * 3.2), "px)")
21
+ };
22
+ };
23
+ return {
24
+ touchRollerStyle: touchRollerStyle,
25
+ touchTiledStyle: touchTiledStyle,
26
+ rollerStyle: rollerStyle
27
+ };
28
+ };
@@ -3,8 +3,8 @@ import { PopupProps } from "../popup/index";
3
3
  import { PopoverTheme, PopoverLocation, PopoverList } from './types';
4
4
  export interface PopoverProps extends PopupProps {
5
5
  list: PopoverList[];
6
- theme: PopoverTheme | string;
7
- location: PopoverLocation | string;
6
+ theme: PopoverTheme;
7
+ location: PopoverLocation;
8
8
  visible: boolean;
9
9
  offset: string[] | number[];
10
10
  arrowOffset: number;
@@ -13,7 +13,7 @@ import { ArrowRadius } from "@nutui/icons-react-taro";
13
13
  import Popup from "../popup/index";
14
14
  import { getRectByTaro } from "../../utils/get-rect-by-taro";
15
15
  import { ComponentDefaults } from "../../utils/typings";
16
- import { getRect } from "../../utils/use-client-rect";
16
+ import { getRect } from "../../hooks/use-client-rect";
17
17
  import { useRtl } from "../configprovider/index";
18
18
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
19
19
  list: [],
@@ -1,5 +1,6 @@
1
- export type PopoverTheme = 'light' | 'dark';
2
- export type PopoverLocation = 'bottom' | 'top' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
1
+ import { FixAutoComplete } from "../../types/fix-string-literal-union";
2
+ export type PopoverTheme = FixAutoComplete<'light' | 'dark'>;
3
+ export type PopoverLocation = FixAutoComplete<'bottom' | 'top' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end'>;
3
4
  export interface PopoverList {
4
5
  key?: string;
5
6
  name: string;
@@ -10,7 +10,7 @@ import { Close } from "@nutui/icons-react-taro";
10
10
  import { View } from "@tarojs/components";
11
11
  import { defaultOverlayProps } from "../overlay/overlay";
12
12
  import Overlay from "../overlay/index";
13
- import { useLockScrollTaro } from "../../utils/use-lock-scoll-taro";
13
+ import { useLockScrollTaro } from "../../hooks/use-lock-scoll-taro";
14
14
  var defaultProps = _object_spread_props(_object_spread({}, defaultOverlayProps), {
15
15
  position: 'center',
16
16
  transition: '',
@@ -10,7 +10,7 @@ import { View } from "@tarojs/components";
10
10
  import pxTransform from "../../utils/px-transform";
11
11
  import { ComponentDefaults } from "../../utils/typings";
12
12
  import { useRtl } from "../configprovider/index";
13
- import useUuid from "../../utils/use-uuid";
13
+ import useUuid from "../../hooks/use-uuid";
14
14
  import { harmony, web } from "../../utils/platform-taro";
15
15
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
16
16
  percent: 0,
@@ -10,11 +10,12 @@ import { View } from "@tarojs/components";
10
10
  import { Loading, More } from "@nutui/icons-react-taro";
11
11
  import Taro from "@tarojs/taro";
12
12
  import { useConfig } from "../configprovider/index";
13
- import { useTouch } from "../../utils/use-touch";
13
+ import { useTouch } from "../../hooks/use-touch";
14
14
  import { rubberbandIfOutOfBounds } from "../../utils/rubberband";
15
15
  import { sleep } from "../../utils/sleep";
16
16
  import { ComponentDefaults } from "../../utils/typings";
17
17
  import pxTransform from "../../utils/px-transform";
18
+ import { getDeviceInfo } from "../../utils/get-system-info";
18
19
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
19
20
  type: 'default',
20
21
  pullingText: '',
@@ -155,7 +156,7 @@ export var PullToRefresh = function(p) {
155
156
  }
156
157
  };
157
158
  // 安卓微信小程序onTouchMove回调次数少导致下拉卡顿,增加动效会更顺畅
158
- var isAndroidWeApp = Taro.getSystemInfoSync().platform === 'android' && Taro.getEnv() === 'WEAPP';
159
+ var isAndroidWeApp = getDeviceInfo().platform === 'android' && Taro.getEnv() === 'WEAPP';
159
160
  var springStyles = _object_spread({
160
161
  height: pxTransform(height)
161
162
  }, !pullingRef.current || isAndroidWeApp ? {
@@ -9,7 +9,7 @@ import classNames from "classnames";
9
9
  import { View } from "@tarojs/components";
10
10
  import RadioContext from "../radiogroup/context";
11
11
  import { ComponentDefaults } from "../../utils/typings";
12
- import { usePropsValue } from "../../utils/use-props-value";
12
+ import { usePropsValue } from "../../hooks/use-props-value";
13
13
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
14
14
  disabled: false,
15
15
  shape: 'round',
@@ -8,7 +8,7 @@ import classNames from "classnames";
8
8
  import { View } from "@tarojs/components";
9
9
  import RadioContext from "./context";
10
10
  import Radio from "../radio/index";
11
- import { usePropsValue } from "../../utils/use-props-value";
11
+ import { usePropsValue } from "../../hooks/use-props-value";
12
12
  var defaultProps = {
13
13
  labelPosition: 'right',
14
14
  onChange: function(value) {},
@@ -8,9 +8,9 @@ import React, { useEffect, useState, useCallback, useMemo, useRef } from "react"
8
8
  import classNames from "classnames";
9
9
  import { View, Text } from "@tarojs/components";
10
10
  import pxTransform from "../../utils/px-transform";
11
- import { useTouch } from "../../utils/use-touch";
11
+ import { useTouch } from "../../hooks/use-touch";
12
12
  import { ComponentDefaults } from "../../utils/typings";
13
- import { usePropsValue } from "../../utils/use-props-value";
13
+ import { usePropsValue } from "../../hooks/use-props-value";
14
14
  import { getRectByTaro } from "../../utils/get-rect-by-taro";
15
15
  import { useRtl } from "../configprovider/index";
16
16
  import { harmony } from "../../utils/platform-taro";
@@ -8,9 +8,9 @@ import { StarFill } from "@nutui/icons-react-taro";
8
8
  import { useReady } from "@tarojs/taro";
9
9
  import { View, Text } from "@tarojs/components";
10
10
  import { ComponentDefaults } from "../../utils/typings";
11
- import { usePropsValue } from "../../utils/use-props-value";
11
+ import { usePropsValue } from "../../hooks/use-props-value";
12
12
  import { getRectByTaro } from "../../utils/get-rect-by-taro";
13
- import useRefs from "../../utils/use-refs";
13
+ import useRefs from "../../hooks/use-refs";
14
14
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
15
15
  size: 'normal',
16
16
  showScore: false,
@@ -4,7 +4,7 @@ import { _ as _type_of } from "@swc/helpers/_/_type_of";
4
4
  import React, { useCallback } from "react";
5
5
  import classNames from "classnames";
6
6
  import { View } from "@tarojs/components";
7
- import { usePropsValue } from "../../utils/use-props-value";
7
+ import { usePropsValue } from "../../hooks/use-props-value";
8
8
  import { mergeProps } from "../../utils/merge-props";
9
9
  var defaultProps = {
10
10
  options: [],
@@ -10,7 +10,7 @@ import { View } from "@tarojs/components";
10
10
  import Popup from "../popup/index";
11
11
  import { useConfig } from "../configprovider/index";
12
12
  import { ComponentDefaults } from "../../utils/typings";
13
- import { usePropsValue } from "../../utils/use-props-value";
13
+ import { usePropsValue } from "../../hooks/use-props-value";
14
14
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
15
15
  value: '',
16
16
  visible: false,
@@ -8,10 +8,10 @@ import { ScrollView, View } from "@tarojs/components";
8
8
  import classNames from "classnames";
9
9
  import Taro, { nextTick, createSelectorQuery } from "@tarojs/taro";
10
10
  import { ComponentDefaults } from "../../utils/typings";
11
- import { usePropsValue } from "../../utils/use-props-value";
12
- import { useForceUpdate } from "../../utils/use-force-update";
11
+ import { usePropsValue } from "../../hooks/use-props-value";
12
+ import { useForceUpdate } from "../../hooks/use-force-update";
13
13
  import raf from "../../utils/raf";
14
- import useUuid from "../../utils/use-uuid";
14
+ import useUuid from "../../hooks/use-uuid";
15
15
  import SideBarItem from "../sidebaritem/index";
16
16
  import { mergeProps } from "../../utils/merge-props";
17
17
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
@@ -7,10 +7,11 @@ import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
7
7
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
8
8
  import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
9
9
  import classNames from "classnames";
10
- import { getEnv, getSystemInfoSync, usePageScroll } from "@tarojs/taro";
10
+ import { getEnv, usePageScroll } from "@tarojs/taro";
11
11
  import { View } from "@tarojs/components";
12
+ import { getWindowInfo } from "../../utils/get-system-info";
12
13
  import { ComponentDefaults } from "../../utils/typings";
13
- import useWatch from "../../utils/use-watch";
14
+ import useWatch from "../../hooks/use-watch";
14
15
  import { getRectByTaro } from "../../utils/get-rect-by-taro";
15
16
  import { getScrollParent } from "../../utils/get-scroll-parent";
16
17
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
@@ -140,7 +141,7 @@ export var Sticky = function(props) {
140
141
  7
141
142
  ];
142
143
  case 6:
143
- windowHeight = getSystemInfoSync().windowHeight;
144
+ windowHeight = getWindowInfo().windowHeight;
144
145
  setFixed(windowHeight - threshold < curRootRect.bottom);
145
146
  _state.label = 7;
146
147
  case 7:
@@ -6,12 +6,12 @@ import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
6
6
  import React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react";
7
7
  import classNames from "classnames";
8
8
  import { View } from "@tarojs/components";
9
- import { useTouch } from "../../utils/use-touch";
9
+ import { useTouch } from "../../hooks/use-touch";
10
10
  import { getRectByTaro } from "../../utils/get-rect-by-taro";
11
11
  import { ComponentDefaults } from "../../utils/typings";
12
12
  import { harmony } from "../../utils/platform-taro";
13
13
  import pxTransform from "../../utils/px-transform";
14
- import { useRefState } from "../../utils/use-ref-state";
14
+ import { useRefState } from "../../hooks/use-ref-state";
15
15
  function preventDefault(event, isStopPropagation) {
16
16
  if (typeof event.cancelable !== 'boolean' || event.cancelable) {
17
17
  event.preventDefault();
@@ -7,7 +7,7 @@ import React from "react";
7
7
  import { View } from "@tarojs/components";
8
8
  import classNames from "classnames";
9
9
  import { ComponentDefaults } from "../../utils/typings";
10
- import { usePropsValue } from "../../utils/use-props-value";
10
+ import { usePropsValue } from "../../hooks/use-props-value";
11
11
  import { useRtl } from "../configprovider/index";
12
12
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
13
13
  disabled: false,
@@ -138,15 +138,8 @@
138
138
  .nut-tabbar-item-active {
139
139
  color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
140
140
  }
141
- .nut-tabbar-item-active .nut-tabbar-item-icon-box {
142
- /* #ifdef harmony*/
143
- color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
144
- /* #endif*/
145
- /* #ifndef harmony*/
146
- color: inherit;
147
- /* #endif*/
148
- }
149
- .nut-tabbar-item-active .nut-tabbar-item-icon-box .nut-icon {
141
+ .nut-tabbar-item-active .nut-tabbar-item-icon-box,
142
+ .nut-tabbar-item-active .nut-icon {
150
143
  /* #ifdef harmony*/
151
144
  color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
152
145
  /* #endif*/
@@ -6,7 +6,7 @@ import React from "react";
6
6
  import classNames from "classnames";
7
7
  import { View } from "@tarojs/components";
8
8
  import { ComponentDefaults } from "../../utils/typings";
9
- import { usePropsValue } from "../../utils/use-props-value";
9
+ import { usePropsValue } from "../../hooks/use-props-value";
10
10
  import TabbarItem from "../tabbaritem/index";
11
11
  import TabbarContext from "./context";
12
12
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
@@ -138,15 +138,8 @@
138
138
  .nut-tabbar-item-active {
139
139
  color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
140
140
  }
141
- .nut-tabbar-item-active .nut-tabbar-item-icon-box {
142
- /* #ifdef harmony*/
143
- color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
144
- /* #endif*/
145
- /* #ifndef harmony*/
146
- color: inherit;
147
- /* #endif*/
148
- }
149
- .nut-tabbar-item-active .nut-tabbar-item-icon-box .nut-icon {
141
+ .nut-tabbar-item-active .nut-tabbar-item-icon-box,
142
+ .nut-tabbar-item-active .nut-icon {
150
143
  /* #ifdef harmony*/
151
144
  color: var(--nutui-tabbar-active-color, var(--nutui-color-primary, #ff0f23));
152
145
  /* #endif*/
@@ -49,7 +49,7 @@
49
49
  color: inherit;
50
50
  /* #endif*/
51
51
  }
52
- .nut-tabbar-item-active .nut-tabbar-item-icon-box .nut-icon {
52
+ .nut-tabbar-item-active .nut-icon {
53
53
  /* #ifdef harmony*/
54
54
  color: #ff0f23;
55
55
  /* #endif*/
@@ -41,22 +41,14 @@
41
41
  &-active {
42
42
  color: $tabbar-active-color;
43
43
 
44
- .nut-tabbar-item-icon-box {
44
+ .nut-tabbar-item-icon-box,
45
+ .nut-icon {
45
46
  /* #ifdef harmony*/
46
47
  color: $tabbar-active-color;
47
48
  /* #endif*/
48
49
  /* #ifndef harmony*/
49
50
  color: inherit;
50
51
  /* #endif*/
51
-
52
- .nut-icon {
53
- /* #ifdef harmony*/
54
- color: $tabbar-active-color;
55
- /* #endif*/
56
- /* #ifndef harmony*/
57
- color: inherit;
58
- /* #endif*/
59
- }
60
52
  }
61
53
  }
62
54
  }
@@ -46,6 +46,14 @@ export var TabbarItem = function(props) {
46
46
  right: right,
47
47
  color: ctx === null || ctx === void 0 ? void 0 : ctx.activeColor
48
48
  };
49
+ var renderTitleText = function() {
50
+ return title && /*#__PURE__*/ React.createElement(View, {
51
+ className: titleClass,
52
+ style: {
53
+ color: active ? ctx === null || ctx === void 0 ? void 0 : ctx.activeColor : ctx === null || ctx === void 0 ? void 0 : ctx.inactiveColor
54
+ }
55
+ }, title);
56
+ };
49
57
  return /*#__PURE__*/ React.createElement(View, _object_spread({
50
58
  className: tabbarItemClass,
51
59
  style: _object_spread({
@@ -56,15 +64,5 @@ export var TabbarItem = function(props) {
56
64
  }
57
65
  }, rest), icon ? /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Badge, badgeProps, /*#__PURE__*/ React.createElement(View, {
58
66
  className: boxPrefix
59
- }, addColorForHarmony(icon, active ? ctx === null || ctx === void 0 ? void 0 : ctx.activeColor : ctx === null || ctx === void 0 ? void 0 : ctx.inactiveColor))), /*#__PURE__*/ React.createElement(View, {
60
- className: titleClass,
61
- style: {
62
- color: active ? ctx === null || ctx === void 0 ? void 0 : ctx.activeColor : ctx === null || ctx === void 0 ? void 0 : ctx.inactiveColor
63
- }
64
- }, title)) : /*#__PURE__*/ React.createElement(Badge, badgeProps, /*#__PURE__*/ React.createElement(View, {
65
- className: titleClass,
66
- style: {
67
- color: active ? ctx === null || ctx === void 0 ? void 0 : ctx.activeColor : ctx === null || ctx === void 0 ? void 0 : ctx.inactiveColor
68
- }
69
- }, title)));
67
+ }, addColorForHarmony(icon, active ? ctx === null || ctx === void 0 ? void 0 : ctx.activeColor : ctx === null || ctx === void 0 ? void 0 : ctx.inactiveColor))), renderTitleText()) : /*#__PURE__*/ React.createElement(Badge, badgeProps, renderTitleText()));
70
68
  };
@@ -10,7 +10,7 @@ import { ArrowDown } from "@nutui/icons-react-taro";
10
10
  import { View } from "@tarojs/components";
11
11
  import { useConfig, useRtl } from "../configprovider/index";
12
12
  import { ComponentDefaults } from "../../utils/typings";
13
- import { usePropsValue } from "../../utils/use-props-value";
13
+ import { usePropsValue } from "../../hooks/use-props-value";
14
14
  import { useTableSticky } from "./utils";
15
15
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
16
16
  columns: [],
@@ -10,10 +10,10 @@ import { JoySmile } from "@nutui/icons-react-taro";
10
10
  import Taro, { nextTick, createSelectorQuery } from "@tarojs/taro";
11
11
  import { ComponentDefaults } from "../../utils/typings";
12
12
  import TabPane from "../tabpane/index";
13
- import { usePropsValue } from "../../utils/use-props-value";
14
- import { useForceUpdate } from "../../utils/use-force-update";
13
+ import { usePropsValue } from "../../hooks/use-props-value";
14
+ import { useForceUpdate } from "../../hooks/use-force-update";
15
15
  import raf from "../../utils/raf";
16
- import useUuid from "../../utils/use-uuid";
16
+ import useUuid from "../../hooks/use-uuid";
17
17
  import { useRtl } from "../configprovider/configprovider";
18
18
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
19
19
  tabStyle: {},
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
- import { TextareaProps } from '@tarojs/components';
2
+ import { BaseEventOrig, TextareaProps } from '@tarojs/components';
3
3
  import { BasicComponent } from "../../utils/typings";
4
4
  export interface TextAreaProps extends Omit<TextareaProps, 'showCount' | 'onFocus' | 'onBlur'>, Omit<BasicComponent, 'style'> {
5
5
  value: string;
@@ -14,7 +14,7 @@ export interface TextAreaProps extends Omit<TextareaProps, 'showCount' | 'onFocu
14
14
  plain: boolean;
15
15
  status: 'error' | 'default';
16
16
  onChange: (value: string) => void;
17
- onBlur: (event: Event) => void;
18
- onFocus: (event: Event) => void;
17
+ onBlur: (event: BaseEventOrig) => void;
18
+ onFocus: (event: BaseEventOrig) => void;
19
19
  }
20
20
  export declare const TextArea: FunctionComponent<Partial<TextAreaProps>>;
@@ -1,3 +1,4 @@
1
+ import { _ as _define_property } from "@swc/helpers/_/_define_property";
1
2
  import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
2
3
  import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
3
4
  import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
@@ -5,10 +6,10 @@ import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
5
6
  import React, { useRef } from "react";
6
7
  import classNames from "classnames";
7
8
  import Taro from "@tarojs/taro";
8
- import { Textarea, View, Text } from "@tarojs/components";
9
+ import { Text, Textarea, View } from "@tarojs/components";
9
10
  import { useConfig, useRtl } from "../configprovider/index";
10
11
  import { ComponentDefaults } from "../../utils/typings";
11
- import { usePropsValue } from "../../utils/use-props-value";
12
+ import { usePropsValue } from "../../hooks/use-props-value";
12
13
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
13
14
  defaultValue: '',
14
15
  showCount: false,
@@ -65,19 +66,21 @@ export var TextArea = function(props) {
65
66
  setInputValue('');
66
67
  }
67
68
  };
69
+ var isDisabled = function() {
70
+ return disabled || readOnly;
71
+ };
68
72
  var handleFocus = function(event) {
69
- if (disabled) return;
70
- if (readOnly) return;
71
- onFocus && onFocus(event);
73
+ if (isDisabled()) return;
74
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
72
75
  };
73
76
  var handleBlur = function(event) {
74
- if (disabled) return;
75
- if (readOnly) return;
76
- onBlur && onBlur(event);
77
+ if (isDisabled()) return;
78
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
77
79
  };
80
+ var _obj;
78
81
  return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(View, {
79
- className: classNames(classPrefix, disabled ? "".concat(classPrefix, "-disabled") : '', readOnly ? "".concat(classPrefix, "-readonly") : '', rtl ? "".concat(classPrefix, "-rtl") : '', plain ? "".concat(classPrefix, "-plain") : "".concat(classPrefix, "-container"), status ? "".concat(classPrefix, "-").concat(status) : '', className)
80
- }, /*#__PURE__*/ React.createElement(Textarea, _object_spread({
82
+ className: classNames(classPrefix, (_obj = {}, _define_property(_obj, "".concat(classPrefix, "-disabled"), disabled), _define_property(_obj, "".concat(classPrefix, "-readonly"), readOnly), _define_property(_obj, "".concat(classPrefix, "-rtl"), rtl), _define_property(_obj, "".concat(classPrefix, "-plain"), plain), _define_property(_obj, "".concat(classPrefix, "-container"), !plain), _define_property(_obj, "".concat(classPrefix, "-").concat(status), status), _obj), className)
83
+ }, /*#__PURE__*/ React.createElement(Textarea, _object_spread_props(_object_spread({}, rest), {
81
84
  nativeProps: {
82
85
  style: style,
83
86
  readOnly: readOnly,
@@ -89,25 +92,19 @@ export var TextArea = function(props) {
89
92
  compositionRef.current = false;
90
93
  }
91
94
  },
92
- className: "".concat(classPrefix, "-textarea ").concat(disabled ? "".concat(classPrefix, "-textarea-disabled") : ''),
95
+ className: classNames("".concat(classPrefix, "-textarea"), _define_property({}, "".concat(classPrefix, "-textarea-disabled"), disabled)),
93
96
  style: Taro.getEnv() === 'WEB' ? undefined : style,
94
97
  disabled: Taro.getEnv() === 'WEB' ? disabled : disabled || readOnly,
95
98
  // @ts-ignore
96
99
  value: inputValue,
97
- onInput: function(e) {
98
- return handleChange(e);
99
- },
100
- onBlur: function(e) {
101
- return handleBlur(e);
102
- },
103
- onFocus: function(e) {
104
- return handleFocus(e);
105
- },
100
+ onInput: handleChange,
101
+ onBlur: handleBlur,
102
+ onFocus: handleFocus,
106
103
  autoHeight: autoSize,
107
104
  maxlength: maxLength,
108
- placeholder: placeholder || locale.placeholder
109
- }, rest)), showCount && /*#__PURE__*/ React.createElement(Text, {
110
- className: "".concat(classPrefix, "-limit ").concat(disabled ? "".concat(classPrefix, "-limit-disabled") : '')
105
+ placeholder: placeholder !== undefined ? placeholder : locale.placeholder
106
+ })), showCount && /*#__PURE__*/ React.createElement(Text, {
107
+ className: classNames("".concat(classPrefix, "-limit"), _define_property({}, "".concat(classPrefix, "-limit-disabled"), disabled))
111
108
  }, inputValue.length, "/", maxLength < 0 ? 0 : maxLength)));
112
109
  };
113
110
  TextArea.displayName = 'NutTextArea';
@@ -8,8 +8,8 @@ import { Text, View } from "@tarojs/components";
8
8
  import { Failure, Loading, Success, Tips } from "@nutui/icons-react-taro";
9
9
  import Overlay from "../overlay/index";
10
10
  import { defaultOverlayProps } from "../overlay/overlay";
11
- import { customEvents, useCustomEvent, useCustomEventsPath, useParams } from "../../utils/use-custom-event";
12
- import { usePropsValue } from "../../utils/use-props-value";
11
+ import { customEvents, useCustomEvent, useCustomEventsPath, useParams } from "../../hooks/use-custom-event";
12
+ import { usePropsValue } from "../../hooks/use-props-value";
13
13
  import { useRtl } from "../configprovider/index";
14
14
  import { harmony } from "../../utils/platform-taro";
15
15
  import { mergeProps } from "../../utils/merge-props";
@@ -26,7 +26,7 @@ export interface TourProps extends BasicComponent {
26
26
  * 弹出层位置,同 Popopver 的[location 属性](https://nutui.jd.com/h5/react/2x/#/zh-CN/component/popover)
27
27
  * @default bottom
28
28
  */
29
- location: PopoverLocation | string
29
+ location: PopoverLocation
30
30
  /**
31
31
  * 是否显示镂空遮罩
32
32
  * @default true
@@ -6,7 +6,7 @@ import { Close } from "@nutui/icons-react-taro";
6
6
  import classNames from "classnames";
7
7
  import { View } from "@tarojs/components";
8
8
  import Popover from "../popover/index";
9
- import { getTaroRectById } from "../../utils/use-taro-rect";
9
+ import { getTaroRectById } from "../../hooks/use-taro-rect";
10
10
  import { ComponentDefaults } from "../../utils/typings";
11
11
  import { useConfig } from "../configprovider/index";
12
12
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
@@ -1,10 +1,11 @@
1
+ import { FixAutoComplete } from "../../types/fix-string-literal-union";
1
2
  export type FileItem = {
2
3
  status?: FileItemStatus;
3
4
  message?: string;
4
5
  uid?: string | number;
5
6
  name?: string;
6
7
  url?: string;
7
- type?: 'image' | 'list' | string;
8
+ type?: FixAutoComplete<'image' | 'list'>;
8
9
  path?: string;
9
10
  loadingIcon?: React.ReactNode;
10
11
  failIcon?: React.ReactNode;
@@ -14,7 +14,7 @@ import Button from "../button/index";
14
14
  import { useConfig } from "../configprovider/index";
15
15
  import { funcInterceptor } from "../../utils/interceptor";
16
16
  import { ComponentDefaults } from "../../utils/typings";
17
- import { usePropsValue } from "../../utils/use-props-value";
17
+ import { usePropsValue } from "../../hooks/use-props-value";
18
18
  import { Preview } from "./preview";
19
19
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
20
20
  maxCount: Number.MAX_VALUE,
@@ -34,7 +34,7 @@ export interface VirtualListProps extends BasicComponent {
34
34
  */
35
35
  overscan: number
36
36
  /**
37
- * 滑动到底(右)的事件,可以实现无限滚动
37
+ * 滑动到底的事件,可以实现无限滚动
38
38
  * @default -
39
39
  */
40
40
  onScroll: () => void
@@ -4,8 +4,8 @@ import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_
4
4
  import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
5
5
  import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
6
6
  import { ScrollView, View } from "@tarojs/components";
7
- import { getSystemInfoSync } from "@tarojs/taro";
8
7
  import classNames from "classnames";
8
+ import { getWindowInfo } from "../../utils/get-system-info";
9
9
  import { initPositinoCache, updateItemSize } from "./utils";
10
10
  import { ComponentDefaults } from "../../utils/typings";
11
11
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
@@ -29,7 +29,7 @@ export var VirtualList = function(props) {
29
29
  "containerHeight"
30
30
  ]);
31
31
  var clientHeight = useMemo(function() {
32
- return getSystemInfoSync().windowHeight - 5 || 667;
32
+ return getWindowInfo().windowHeight - 5 || 667;
33
33
  }, []);
34
34
  var containerHeight = useMemo(function() {
35
35
  return origContainerHeight !== null && origContainerHeight !== void 0 ? origContainerHeight : clientHeight;