@nutui/nutui-react-taro 3.0.7 → 3.0.9-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.
Files changed (233) hide show
  1. package/CHANGELOG.md +30 -14
  2. package/dist/cjs/hooks/index.d.ts +12 -0
  3. package/dist/cjs/hooks/index.js +19 -0
  4. package/dist/cjs/hooks/{use-custom-event.js → taro/use-custom-event.js} +1 -1
  5. package/dist/cjs/hooks/{use-lock-scoll-taro.js → taro/use-lock-scoll.js} +1 -1
  6. package/dist/cjs/hooks/use-memo.d.ts +1 -1
  7. package/dist/cjs/hooks/use-memo.js +1 -1
  8. package/dist/cjs/hooks/use-refs.d.ts +1 -1
  9. package/dist/cjs/hooks/use-refs.js +1 -1
  10. package/dist/cjs/hooks/use-uuid.d.ts +1 -1
  11. package/dist/cjs/hooks/use-uuid.js +1 -1
  12. package/dist/cjs/hooks/use-watch.d.ts +2 -2
  13. package/dist/cjs/hooks/use-watch.js +2 -3
  14. package/dist/cjs/packages/address/address.d.ts +1 -1
  15. package/dist/cjs/packages/avatar/avatar.js +6 -6
  16. package/dist/cjs/packages/avatar/style/style.css +4 -0
  17. package/dist/cjs/packages/avatarcropper/avatarcropper.js +1 -1
  18. package/dist/cjs/packages/badge/badge.js +5 -5
  19. package/dist/cjs/packages/barrage/barrage.js +3 -3
  20. package/dist/cjs/packages/button/button.js +3 -3
  21. package/dist/cjs/packages/cascader/cascader.js +2 -1
  22. package/dist/cjs/packages/cell/cell.js +2 -2
  23. package/dist/cjs/packages/col/col.js +3 -3
  24. package/dist/cjs/packages/collapseitem/collapseitem.js +4 -4
  25. package/dist/cjs/packages/configprovider/configprovider.js +2 -2
  26. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  27. package/dist/cjs/packages/countdown/countdown.js +2 -2
  28. package/dist/cjs/packages/dialog/dialog.js +5 -5
  29. package/dist/cjs/packages/dialog/style/dialog.scss +1 -0
  30. package/dist/cjs/packages/dialog/style/style.css +1 -0
  31. package/dist/cjs/packages/dialog/style/style.harmony.css +1 -0
  32. package/dist/cjs/packages/drag/drag.js +5 -5
  33. package/dist/cjs/packages/elevator/elevator.js +4 -4
  34. package/dist/cjs/packages/ellipsis/ellipsis.js +4 -4
  35. package/dist/cjs/packages/griditem/griditem.js +4 -4
  36. package/dist/cjs/packages/hoverbutton/hoverbutton.js +2 -2
  37. package/dist/cjs/packages/hoverbuttonitem/hoverbuttonitem.js +2 -2
  38. package/dist/cjs/packages/image/image.js +12 -11
  39. package/dist/cjs/packages/image/style/image.scss +4 -1
  40. package/dist/cjs/packages/image/style/style.css +4 -0
  41. package/dist/cjs/packages/image/style/style.harmony.css +4 -0
  42. package/dist/cjs/packages/imagepreview/style/style.css +4 -0
  43. package/dist/cjs/packages/indicator/indicator.js +2 -2
  44. package/dist/cjs/packages/infiniteloading/infiniteloading.js +2 -2
  45. package/dist/cjs/packages/lottie/lottiemp.js +3 -3
  46. package/dist/cjs/packages/menuitem/menuitem.js +4 -4
  47. package/dist/cjs/packages/noticebar/noticebar.js +4 -4
  48. package/dist/cjs/packages/notify/notify.js +5 -5
  49. package/dist/cjs/packages/nutui.react.build.d.ts +2 -0
  50. package/dist/cjs/packages/nutui.react.build.js +2 -0
  51. package/dist/cjs/packages/nutui.react.d.ts +2 -0
  52. package/dist/cjs/packages/nutui.react.js +2 -0
  53. package/dist/cjs/packages/overlay/overlay.js +2 -2
  54. package/dist/cjs/packages/pagination/pagination.js +3 -3
  55. package/dist/cjs/packages/picker/picker.js +2 -2
  56. package/dist/cjs/packages/pickerview/pickerroller.js +7 -7
  57. package/dist/cjs/packages/popover/popover.js +15 -15
  58. package/dist/cjs/packages/popup/popup.js +4 -4
  59. package/dist/cjs/packages/price/price.js +2 -2
  60. package/dist/cjs/packages/progress/progress.js +13 -13
  61. package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +4 -4
  62. package/dist/cjs/packages/range/range.js +13 -13
  63. package/dist/cjs/packages/rate/rate.js +4 -4
  64. package/dist/cjs/packages/sidebar/sidebar.js +13 -5
  65. package/dist/cjs/packages/skeleton/skeleton.js +1 -2
  66. package/dist/cjs/packages/sticky/sticky.js +7 -7
  67. package/dist/cjs/packages/swipe/swipe.js +11 -11
  68. package/dist/cjs/packages/swiper/swiper.js +4 -4
  69. package/dist/cjs/packages/switch/switch.js +53 -8
  70. package/dist/cjs/packages/tabs/tabs.js +2 -2
  71. package/dist/cjs/packages/toast/toast.js +3 -3
  72. package/dist/cjs/packages/tour/tour.js +2 -2
  73. package/dist/cjs/packages/trendarrow/trendarrow.js +3 -3
  74. package/dist/cjs/packages/virtuallist/virtuallist.js +1 -1
  75. package/dist/cjs/utils/clamp.d.ts +1 -0
  76. package/dist/cjs/utils/clamp.js +13 -0
  77. package/dist/cjs/utils/event-mocker.d.ts +21 -0
  78. package/dist/cjs/utils/index.d.ts +28 -6
  79. package/dist/cjs/utils/index.js +35 -54
  80. package/dist/cjs/utils/interceptor.js +2 -2
  81. package/dist/cjs/utils/is-function.d.ts +1 -0
  82. package/dist/cjs/utils/is-function.js +14 -0
  83. package/dist/cjs/utils/is-object.d.ts +1 -0
  84. package/dist/cjs/utils/is-object.js +14 -0
  85. package/dist/cjs/utils/is-promise.d.ts +1 -0
  86. package/dist/cjs/utils/is-promise.js +15 -0
  87. package/dist/cjs/utils/lru.d.ts +1 -1
  88. package/dist/cjs/utils/lru.js +1 -1
  89. package/dist/cjs/utils/merge.d.ts +0 -1
  90. package/dist/cjs/utils/merge.js +0 -4
  91. package/dist/cjs/utils/prevent-default.d.ts +1 -0
  92. package/dist/cjs/utils/prevent-default.js +18 -0
  93. package/dist/cjs/utils/raf.d.ts +0 -1
  94. package/dist/cjs/utils/raf.js +3 -6
  95. package/dist/cjs/utils/{add-color-for-harmony.js → taro/add-color-for-harmony.js} +5 -11
  96. package/dist/cjs/{hooks/use-taro-rect.js → utils/taro/get-rect-by-id.js} +3 -3
  97. package/dist/cjs/utils/{get-rect-by-taro.js → taro/get-rect.js} +9 -10
  98. package/dist/cjs/utils/{px-transform.js → taro/px-transform.js} +3 -3
  99. package/dist/cjs/utils/upper-case-first.d.ts +1 -0
  100. package/dist/cjs/utils/upper-case-first.js +17 -0
  101. package/dist/es/hooks/index.d.ts +12 -0
  102. package/dist/es/hooks/index.js +14 -0
  103. package/dist/es/hooks/{use-custom-event.js → taro/use-custom-event.js} +1 -1
  104. package/dist/es/hooks/{use-lock-scoll-taro.js → taro/use-lock-scoll.js} +1 -1
  105. package/dist/es/hooks/use-memo.d.ts +1 -1
  106. package/dist/es/hooks/use-memo.js +1 -1
  107. package/dist/es/hooks/use-refs.d.ts +1 -1
  108. package/dist/es/hooks/use-refs.js +1 -1
  109. package/dist/es/hooks/use-uuid.d.ts +1 -1
  110. package/dist/es/hooks/use-uuid.js +1 -1
  111. package/dist/es/hooks/use-watch.d.ts +2 -2
  112. package/dist/es/hooks/use-watch.js +1 -2
  113. package/dist/es/packages/address/address.d.ts +1 -1
  114. package/dist/es/packages/avatar/avatar.js +2 -2
  115. package/dist/es/packages/avatar/style/style.css +4 -0
  116. package/dist/es/packages/avatarcropper/avatarcropper.js +1 -1
  117. package/dist/es/packages/badge/badge.js +2 -2
  118. package/dist/es/packages/barrage/barrage.js +3 -3
  119. package/dist/es/packages/button/button.js +1 -1
  120. package/dist/es/packages/cascader/cascader.js +2 -1
  121. package/dist/es/packages/cell/cell.js +1 -1
  122. package/dist/es/packages/col/col.js +1 -1
  123. package/dist/es/packages/collapseitem/collapseitem.js +3 -3
  124. package/dist/es/packages/configprovider/configprovider.js +1 -1
  125. package/dist/es/packages/configprovider/types.d.ts +1 -1
  126. package/dist/es/packages/countdown/countdown.js +1 -1
  127. package/dist/es/packages/dialog/dialog.js +3 -3
  128. package/dist/es/packages/dialog/style/dialog.scss +1 -0
  129. package/dist/es/packages/dialog/style/style.css +1 -0
  130. package/dist/es/packages/dialog/style/style.harmony.css +1 -0
  131. package/dist/es/packages/drag/drag.js +4 -4
  132. package/dist/es/packages/elevator/elevator.js +2 -2
  133. package/dist/es/packages/ellipsis/ellipsis.js +4 -4
  134. package/dist/es/packages/griditem/griditem.js +1 -1
  135. package/dist/es/packages/hoverbutton/hoverbutton.js +1 -1
  136. package/dist/es/packages/hoverbuttonitem/hoverbuttonitem.js +1 -1
  137. package/dist/es/packages/image/image.js +11 -11
  138. package/dist/es/packages/image/style/image.scss +4 -1
  139. package/dist/es/packages/image/style/style.css +4 -0
  140. package/dist/es/packages/image/style/style.harmony.css +4 -0
  141. package/dist/es/packages/imagepreview/style/style.css +4 -0
  142. package/dist/es/packages/indicator/indicator.js +1 -1
  143. package/dist/es/packages/infiniteloading/infiniteloading.js +1 -1
  144. package/dist/es/packages/lottie/lottiemp.js +2 -2
  145. package/dist/es/packages/menuitem/menuitem.js +4 -4
  146. package/dist/es/packages/noticebar/noticebar.js +4 -4
  147. package/dist/es/packages/notify/notify.js +3 -3
  148. package/dist/es/packages/nutui.react.build.d.ts +2 -0
  149. package/dist/es/packages/nutui.react.build.js +2 -0
  150. package/dist/es/packages/overlay/overlay.js +1 -1
  151. package/dist/es/packages/pagination/pagination.js +1 -1
  152. package/dist/es/packages/picker/picker.js +1 -1
  153. package/dist/es/packages/pickerview/pickerroller.js +4 -4
  154. package/dist/es/packages/popover/popover.js +6 -6
  155. package/dist/es/packages/popup/popup.js +2 -2
  156. package/dist/es/packages/price/price.js +1 -1
  157. package/dist/es/packages/progress/progress.js +3 -3
  158. package/dist/es/packages/pulltorefresh/pulltorefresh.js +2 -2
  159. package/dist/es/packages/range/range.js +5 -5
  160. package/dist/es/packages/rate/rate.js +3 -3
  161. package/dist/es/packages/sidebar/sidebar.js +12 -4
  162. package/dist/es/packages/skeleton/skeleton.js +1 -2
  163. package/dist/es/packages/sticky/sticky.js +6 -6
  164. package/dist/es/packages/swipe/swipe.js +9 -9
  165. package/dist/es/packages/swiper/swiper.js +1 -1
  166. package/dist/es/packages/switch/switch.js +53 -8
  167. package/dist/es/packages/tabs/tabs.js +1 -1
  168. package/dist/es/packages/toast/toast.js +2 -2
  169. package/dist/es/packages/tour/tour.js +2 -2
  170. package/dist/es/packages/trendarrow/trendarrow.js +1 -1
  171. package/dist/es/packages/virtuallist/virtuallist.js +1 -1
  172. package/dist/es/utils/clamp.d.ts +1 -0
  173. package/dist/es/utils/clamp.js +3 -0
  174. package/dist/es/utils/event-mocker.d.ts +21 -0
  175. package/dist/es/utils/index.d.ts +28 -6
  176. package/dist/es/utils/index.js +34 -29
  177. package/dist/es/utils/interceptor.js +1 -1
  178. package/dist/es/utils/is-function.d.ts +1 -0
  179. package/dist/es/utils/is-function.js +4 -0
  180. package/dist/es/utils/is-object.d.ts +1 -0
  181. package/dist/es/utils/is-object.js +4 -0
  182. package/dist/es/utils/is-promise.d.ts +1 -0
  183. package/dist/es/utils/is-promise.js +5 -0
  184. package/dist/es/utils/lru.d.ts +1 -1
  185. package/dist/es/utils/lru.js +1 -2
  186. package/dist/es/utils/merge.d.ts +0 -1
  187. package/dist/es/utils/merge.js +0 -1
  188. package/dist/es/utils/prevent-default.d.ts +1 -0
  189. package/dist/es/utils/prevent-default.js +8 -0
  190. package/dist/es/utils/raf.d.ts +0 -1
  191. package/dist/es/utils/raf.js +1 -1
  192. package/dist/es/utils/{add-color-for-harmony.js → taro/add-color-for-harmony.js} +2 -3
  193. package/dist/es/{hooks/use-taro-rect.js → utils/taro/get-rect-by-id.js} +1 -1
  194. package/dist/es/utils/{get-rect-by-taro.js → taro/get-rect.js} +4 -4
  195. package/dist/es/utils/{px-transform.js → taro/px-transform.js} +2 -2
  196. package/dist/es/utils/upper-case-first.d.ts +1 -0
  197. package/dist/es/utils/upper-case-first.js +7 -0
  198. package/dist/nutui.react.umd.js +578 -242
  199. package/dist/style.css +1 -1
  200. package/dist/style.scss +45 -45
  201. package/dist/styles/themes/dark.css +1 -1
  202. package/dist/styles/themes/default.css +1 -1
  203. package/dist/styles/themes/jmapp.css +1 -1
  204. package/dist/styles/themes/jrkf.css +1 -1
  205. package/dist/styles/variables-jmapp.scss +1 -0
  206. package/dist/styles/variables.scss +4 -0
  207. package/package.json +1 -1
  208. package/dist/cjs/hooks/use-custom-event.d.ts +0 -7
  209. package/dist/cjs/hooks/use-lock-scoll-taro.d.ts +0 -1
  210. package/dist/cjs/hooks/use-taro-rect.d.ts +0 -1
  211. package/dist/cjs/utils/add-color-for-harmony.d.ts +0 -9
  212. package/dist/cjs/utils/get-rect-by-taro.d.ts +0 -12
  213. package/dist/cjs/utils/get-system-info.d.ts +0 -19
  214. package/dist/cjs/utils/platform-taro.d.ts +0 -3
  215. package/dist/cjs/utils/px-transform.d.ts +0 -1
  216. package/dist/es/hooks/use-custom-event.d.ts +0 -7
  217. package/dist/es/hooks/use-lock-scoll-taro.d.ts +0 -1
  218. package/dist/es/hooks/use-taro-rect.d.ts +0 -1
  219. package/dist/es/utils/add-color-for-harmony.d.ts +0 -9
  220. package/dist/es/utils/get-rect-by-taro.d.ts +0 -12
  221. package/dist/es/utils/get-system-info.d.ts +0 -19
  222. package/dist/es/utils/platform-taro.d.ts +0 -3
  223. package/dist/es/utils/px-transform.d.ts +0 -1
  224. /package/dist/cjs/utils/{test/event.js → event-mocker.js} +0 -0
  225. /package/dist/cjs/{hooks/use-client-rect.d.ts → utils/get-rect.d.ts} +0 -0
  226. /package/dist/cjs/{hooks/use-client-rect.js → utils/get-rect.js} +0 -0
  227. /package/dist/cjs/utils/{get-system-info.js → taro/get-system-info.js} +0 -0
  228. /package/dist/cjs/utils/{platform-taro.js → taro/platform.js} +0 -0
  229. /package/dist/es/utils/{test/event.js → event-mocker.js} +0 -0
  230. /package/dist/es/{hooks/use-client-rect.d.ts → utils/get-rect.d.ts} +0 -0
  231. /package/dist/es/{hooks/use-client-rect.js → utils/get-rect.js} +0 -0
  232. /package/dist/es/utils/{get-system-info.js → taro/get-system-info.js} +0 -0
  233. /package/dist/es/utils/{platform-taro.js → taro/platform.js} +0 -0
@@ -7,7 +7,7 @@ import { ComponentDefaults } from "../../utils/typings";
7
7
  import { useRtl } from "../configprovider/index";
8
8
  import HoverButtonItem from "../hoverbuttonitem/index";
9
9
  import SafeArea from "../safearea/index";
10
- import pxTransform from "../../utils/px-transform";
10
+ import { pxTransform } from "../../utils/taro/px-transform";
11
11
  import { UI_BOTTOM_DISTANCE } from "./utils";
12
12
  var defaultProps = _object_spread({}, ComponentDefaults);
13
13
  var classPrefix = 'nut-hoverbutton';
@@ -6,7 +6,7 @@ import React, { useMemo, useState } from "react";
6
6
  import classNames from "classnames";
7
7
  import { View } from "@tarojs/components";
8
8
  import { ComponentDefaults } from "../../utils/typings";
9
- import { harmony } from "../../utils/platform-taro";
9
+ import { harmony } from "../../utils/taro/platform";
10
10
  import { getIcon } from "./utils";
11
11
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
12
12
  icon: null,
@@ -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";
@@ -7,7 +8,7 @@ import Taro from "@tarojs/taro";
7
8
  import { Image as TImage, View } from "@tarojs/components";
8
9
  import { Image as ImageIcon, ImageError } from "@nutui/icons-react-taro";
9
10
  import classNames from "classnames";
10
- import pxTransform from "../../utils/px-transform";
11
+ import { pxTransform } from "../../utils/taro/px-transform";
11
12
  var defaultProps = {
12
13
  src: '',
13
14
  error: true,
@@ -45,15 +46,14 @@ export var Image = function(props) {
45
46
  onError && onError(e);
46
47
  }
47
48
  };
48
- var containerStyle = {
49
- // eslint-disable-next-line no-nested-ternary
50
- height: height ? pxCheck(height) : Taro.getEnv() === 'WEB' ? '' : '100%',
51
- // eslint-disable-next-line no-nested-ternary
52
- width: width ? pxCheck(width) : Taro.getEnv() === 'WEB' ? '' : '100%',
53
- overflow: radius !== undefined && radius !== null ? 'hidden' : '',
54
- borderRadius: // eslint-disable-next-line no-nested-ternary
55
- radius !== undefined && radius != null ? pxCheck(radius) : ''
56
- };
49
+ var containerStyle = _object_spread({}, height ? {
50
+ height: pxCheck(height)
51
+ } : {}, width ? {
52
+ width: pxCheck(width)
53
+ } : {}, radius !== undefined && radius !== null ? {
54
+ overflow: 'hidden',
55
+ borderRadius: pxCheck(radius)
56
+ } : {});
57
57
  var imgStyle = _object_spread_props(_object_spread({}, style), {
58
58
  width: width,
59
59
  height: height
@@ -94,7 +94,7 @@ export var Image = function(props) {
94
94
  innerLoading
95
95
  ]);
96
96
  return /*#__PURE__*/ React.createElement(View, {
97
- className: classNames(classPrefix, className),
97
+ className: classNames(classPrefix, _define_property({}, "".concat(classPrefix, "-basic"), Taro.getEnv() !== 'WEB'), className),
98
98
  style: containerStyle
99
99
  }, /*#__PURE__*/ React.createElement(TImage, _object_spread_props(_object_spread({}, rest), {
100
100
  className: "".concat(classPrefix, "-default ").concat(className ? "".concat(className, "-image") : ''),
@@ -12,7 +12,10 @@
12
12
  border-radius: 50%;
13
13
  overflow: hidden;
14
14
  }
15
-
15
+ &-basic {
16
+ width: 100%;
17
+ height: 100%;
18
+ }
16
19
  &-loading {
17
20
  width: 100%;
18
21
  height: 100%;
@@ -15,6 +15,10 @@
15
15
  border-radius: 50%;
16
16
  overflow: hidden;
17
17
  }
18
+ .nut-image-basic {
19
+ width: 100%;
20
+ height: 100%;
21
+ }
18
22
  .nut-image-loading {
19
23
  width: 100%;
20
24
  height: 100%;
@@ -15,6 +15,10 @@
15
15
  border-radius: 50%;
16
16
  overflow: hidden;
17
17
  }
18
+ .nut-image-basic {
19
+ width: 100%;
20
+ height: 100%;
21
+ }
18
22
  .nut-image-loading {
19
23
  width: 100%;
20
24
  height: 100%;
@@ -608,6 +608,10 @@
608
608
  border-radius: 50%;
609
609
  overflow: hidden;
610
610
  }
611
+ .nut-image-basic {
612
+ width: 100%;
613
+ height: 100%;
614
+ }
611
615
  .nut-image-loading {
612
616
  width: 100%;
613
617
  height: 100%;
@@ -4,7 +4,7 @@ import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_
4
4
  import React from "react";
5
5
  import classNames from "classnames";
6
6
  import { View } from "@tarojs/components";
7
- import pxTransform from "../../utils/px-transform";
7
+ import { pxTransform } from "../../utils/taro/px-transform";
8
8
  var defaultProps = {
9
9
  total: 2,
10
10
  current: 0,
@@ -10,7 +10,7 @@ import { ScrollView, View } from "@tarojs/components";
10
10
  import { createSelectorQuery } from "@tarojs/taro";
11
11
  import { useConfig } from "../configprovider/index";
12
12
  import { ComponentDefaults } from "../../utils/typings";
13
- import pxTransform from "../../utils/px-transform";
13
+ import { pxTransform } from "../../utils/taro/px-transform";
14
14
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
15
15
  type: 'default',
16
16
  hasMore: true,
@@ -1,8 +1,8 @@
1
1
  import React, { useImperativeHandle, useRef } from "react";
2
2
  import { createSelectorQuery, getEnv, useReady, useUnload } from "@tarojs/taro";
3
3
  import lottie from "@nutui/lottie-miniprogram";
4
- import { getWindowInfo } from "../../utils/get-system-info";
5
- import useUuid from "../../hooks/use-uuid";
4
+ import { getWindowInfo } from "../../utils/taro/get-system-info";
5
+ import { useUuid } from "../../hooks/use-uuid";
6
6
  export var Lottie = /*#__PURE__*/ React.forwardRef(function(props, ref) {
7
7
  var uuid = useUuid();
8
8
  var id = "nutLottie-".concat(uuid);
@@ -10,9 +10,9 @@ import { usePageScroll } from "@tarojs/taro";
10
10
  import { View } from "@tarojs/components";
11
11
  import { CSSTransition } from "react-transition-group";
12
12
  import { Check } from "@nutui/icons-react-taro";
13
- import { getWindowInfo } from "../../utils/get-system-info";
13
+ import { getWindowInfo } from "../../utils/taro/get-system-info";
14
14
  import { Overlay } from "../overlay/overlay";
15
- import { getRectByTaro } from "../../utils/get-rect-by-taro";
15
+ import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
16
16
  import { ComponentDefaults } from "../../utils/typings";
17
17
  import { usePropsValue } from "../../hooks/use-props-value";
18
18
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
@@ -56,7 +56,7 @@ export var MenuItem = /*#__PURE__*/ forwardRef(function(props, ref) {
56
56
  p = parent.menuRef.current;
57
57
  return [
58
58
  4,
59
- getRectByTaro(p)
59
+ getRectInMultiPlatform(p)
60
60
  ];
61
61
  case 1:
62
62
  rect = _state.sent();
@@ -85,7 +85,7 @@ export var MenuItem = /*#__PURE__*/ forwardRef(function(props, ref) {
85
85
  var updateItemOffset = useCallback(function() {
86
86
  if (!parent.lockScroll) return;
87
87
  var p = parent.menuRef.current;
88
- getRectByTaro(p).then(function(rect) {
88
+ getRectInMultiPlatform(p).then(function(rect) {
89
89
  if (rect) {
90
90
  setPosition({
91
91
  height: rect.height,
@@ -8,7 +8,7 @@ import React, { useEffect, useMemo, useRef, useState } from "react";
8
8
  import { View } from "@tarojs/components";
9
9
  import { Close, Notice } from "@nutui/icons-react-taro";
10
10
  import classNames from "classnames";
11
- import { getRectByTaro } from "../../utils/get-rect-by-taro";
11
+ import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
12
12
  import { ComponentDefaults } from "../../utils/typings";
13
13
  import { useRtl } from "../configprovider/index";
14
14
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
@@ -129,13 +129,13 @@ export var NoticeBar = function(props) {
129
129
  }
130
130
  return [
131
131
  4,
132
- getRectByTaro(wrapRef.current)
132
+ getRectInMultiPlatform(wrapRef.current)
133
133
  ];
134
134
  case 1:
135
135
  warpRes = _state.sent();
136
136
  return [
137
137
  4,
138
- getRectByTaro(contentRef.current)
138
+ getRectInMultiPlatform(contentRef.current)
139
139
  ];
140
140
  case 2:
141
141
  contentRes = _state.sent();
@@ -228,7 +228,7 @@ export var NoticeBar = function(props) {
228
228
  case 0:
229
229
  return [
230
230
  4,
231
- getRectByTaro(container === null || container === void 0 ? void 0 : container.current)
231
+ getRectInMultiPlatform(container === null || container === void 0 ? void 0 : container.current)
232
232
  ];
233
233
  case 1:
234
234
  rects = _state.sent();
@@ -7,10 +7,10 @@ import classNames from "classnames";
7
7
  import { CSSTransition } from "react-transition-group";
8
8
  import { View } from "@tarojs/components";
9
9
  import { Close } from "@nutui/icons-react-taro";
10
- import { web } from "../../utils/platform-taro";
11
- import pxTransform from "../../utils/px-transform";
10
+ import { web } from "../../utils/taro/platform";
11
+ import { pxTransform } from "../../utils/taro/px-transform";
12
12
  import { ComponentDefaults } from "../../utils/typings";
13
- import { customEvents, useCustomEvent, useCustomEventsPath } from "../../hooks/use-custom-event";
13
+ import { customEvents, useCustomEvent, useCustomEventsPath } from "../../hooks/taro/use-custom-event";
14
14
  import { mergeProps } from "../../utils/merge-props";
15
15
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
16
16
  id: '',
@@ -207,4 +207,6 @@ export * from "./trendarrow/index";
207
207
  import WaterMark from "./watermark/index";
208
208
  export * from "./watermark/index";
209
209
  export * from "../types";
210
+ export * from "../utils/index";
211
+ export * from "../hooks/index";
210
212
  export { Button, Cell, CellGroup, ConfigProvider, Image, Overlay, Divider, Grid, GridItem, Layout, Col, Row, SafeArea, Space, Sticky, BackTop, Elevator, FixedNav, HoverButton, HoverButtonItem, NavBar, SideBar, SideBarItem, Tabbar, TabbarItem, TabPane, Tabs, Address, Calendar, CalendarItem, CalendarCard, Cascader, Checkbox, CheckboxGroup, DatePicker, DatePickerView, Form, FormItem, Input, InputNumber, Menu, MenuItem, NumberKeyboard, Picker, PickerView, Radio, RadioGroup, Range, Rate, SearchBar, ShortPassword, Signature, Switch, TextArea, Uploader, ActionSheet, Badge, Dialog, Drag, Empty, InfiniteLoading, Loading, NoticeBar, Notify, Popover, Popup, PullToRefresh, ResultPage, Skeleton, Swipe, Toast, Animate, AnimatingNumbers, Audio, Avatar, AvatarGroup, CircleProgress, Collapse, CollapseItem, CountDown, Ellipsis, ImagePreview, Indicator, Lottie, Pagination, Price, Progress, Segmented, Step, Steps, Swiper, SwiperItem, Table, Tag, Tour, Video, VirtualList, AvatarCropper, Barrage, Card, TimeDetail, TimeSelect, TrendArrow, WaterMark };
@@ -207,4 +207,6 @@ export * from "./trendarrow/index";
207
207
  import WaterMark from "./watermark/index";
208
208
  export * from "./watermark/index";
209
209
  export * from "../types";
210
+ export * from "../utils/index";
211
+ export * from "../hooks/index";
210
212
  export { Button, Cell, CellGroup, ConfigProvider, Image, Overlay, Divider, Grid, GridItem, Layout, Col, Row, SafeArea, Space, Sticky, BackTop, Elevator, FixedNav, HoverButton, HoverButtonItem, NavBar, SideBar, SideBarItem, Tabbar, TabbarItem, TabPane, Tabs, Address, Calendar, CalendarItem, CalendarCard, Cascader, Checkbox, CheckboxGroup, DatePicker, DatePickerView, Form, FormItem, Input, InputNumber, Menu, MenuItem, NumberKeyboard, Picker, PickerView, Radio, RadioGroup, Range, Rate, SearchBar, ShortPassword, Signature, Switch, TextArea, Uploader, ActionSheet, Badge, Dialog, Drag, Empty, InfiniteLoading, Loading, NoticeBar, Notify, Popover, Popup, PullToRefresh, ResultPage, Skeleton, Swipe, Toast, Animate, AnimatingNumbers, Audio, Avatar, AvatarGroup, CircleProgress, Collapse, CollapseItem, CountDown, Ellipsis, ImagePreview, Indicator, Lottie, Pagination, Price, Progress, Segmented, Step, Steps, Swiper, SwiperItem, Table, Tag, Tour, Video, VirtualList, AvatarCropper, Barrage, Card, TimeDetail, TimeSelect, TrendArrow, WaterMark };
@@ -7,7 +7,7 @@ import { CSSTransition } from "react-transition-group";
7
7
  import classNames from "classnames";
8
8
  import { View } from "@tarojs/components";
9
9
  import { ComponentDefaults } from "../../utils/typings";
10
- import { useLockScrollTaro } from "../../hooks/use-lock-scoll-taro";
10
+ import { useLockScrollTaro } from "../../hooks/taro/use-lock-scoll";
11
11
  export var defaultOverlayProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
12
12
  zIndex: 1000,
13
13
  duration: 300,
@@ -9,7 +9,7 @@ import { View } from "@tarojs/components";
9
9
  import { useConfig } from "../configprovider/index";
10
10
  import { usePropsValue } from "../../hooks/use-props-value";
11
11
  import { ComponentDefaults } from "../../utils/typings";
12
- import addColorForHarmony from "../../utils/add-color-for-harmony";
12
+ import { addColorForHarmony } from "../../utils/taro/add-color-for-harmony";
13
13
  import { usePagination } from "../../hooks/use-pagination";
14
14
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
15
15
  defaultValue: 1,
@@ -10,7 +10,7 @@ import isEqual from "react-fast-compare";
10
10
  import PickerView from "../pickerview/index";
11
11
  import Popup from "../popup/index";
12
12
  import SafeArea from "../safearea/index";
13
- import useRefs from "../../hooks/use-refs";
13
+ import { useRefs } from "../../hooks/use-refs";
14
14
  import { useConfig } from "../configprovider/index";
15
15
  import { usePropsValue } from "../../hooks/use-props-value";
16
16
  import { ComponentDefaults } from "../../utils/typings";
@@ -7,11 +7,11 @@ import classNames from "classnames";
7
7
  import { View } from "@tarojs/components";
8
8
  import { useTouch } from "../../hooks/use-touch";
9
9
  import { passiveSupported } from "../../utils/supports-passive";
10
- import { web } from "../../utils/platform-taro";
10
+ import { web } from "../../utils/taro/platform";
11
11
  import { preventDefault } from "../../utils";
12
12
  import { momentum, useStyles } from "./utils";
13
- import useUuid from "../../hooks/use-uuid";
14
- import { getRectByTaro } from "../../utils/get-rect-by-taro";
13
+ import { useUuid } from "../../hooks/use-uuid";
14
+ import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
15
15
  var InternalPickerRoller = function(props, ref) {
16
16
  var _props_keyIndex = props.keyIndex, keyIndex = _props_keyIndex === void 0 ? 0 : _props_keyIndex, _props_options = props.options, options = _props_options === void 0 ? [] : _props_options, _props_threeDimensional = props.threeDimensional, threeDimensional = _props_threeDimensional === void 0 ? true : _props_threeDimensional, _props_duration = props.duration, duration = _props_duration === void 0 ? 1000 : _props_duration, onSelect = props.onSelect, _props_renderLabel = props.renderLabel, renderLabel = _props_renderLabel === void 0 ? function(item) {
17
17
  return item.label;
@@ -125,7 +125,7 @@ var InternalPickerRoller = function(props, ref) {
125
125
  ]);
126
126
  return [
127
127
  4,
128
- getRectByTaro(placeholderRef.current)
128
+ getRectInMultiPlatform(placeholderRef.current)
129
129
  ];
130
130
  case 1:
131
131
  placeholder = _state.sent();
@@ -11,11 +11,11 @@ import { nextTick } from "@tarojs/taro";
11
11
  import { Text, View } from "@tarojs/components";
12
12
  import { ArrowRadius } from "@nutui/icons-react-taro";
13
13
  import Popup from "../popup/index";
14
- import { getRectByTaro } from "../../utils/get-rect-by-taro";
14
+ import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
15
15
  import { ComponentDefaults } from "../../utils/typings";
16
16
  import { useRtl } from "../configprovider/index";
17
- import pxTransform from "../../utils/px-transform";
18
- import useUuid from "../../hooks/use-uuid";
17
+ import { pxTransform } from "../../utils/taro/px-transform";
18
+ import { useUuid } from "../../hooks/use-uuid";
19
19
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
20
20
  list: [],
21
21
  theme: 'light',
@@ -88,7 +88,7 @@ export var Popover = function(props) {
88
88
  ];
89
89
  return [
90
90
  4,
91
- getRectByTaro(document.querySelector("#".concat(targetId)), targetId)
91
+ getRectInMultiPlatform(document.querySelector("#".concat(targetId)), targetId)
92
92
  ];
93
93
  case 1:
94
94
  _tmp = _state.sent();
@@ -99,7 +99,7 @@ export var Popover = function(props) {
99
99
  case 2:
100
100
  return [
101
101
  4,
102
- getRectByTaro(popoverRef.current, popoverId)
102
+ getRectInMultiPlatform(popoverRef.current, popoverId)
103
103
  ];
104
104
  case 3:
105
105
  _tmp = _state.sent();
@@ -140,7 +140,7 @@ export var Popover = function(props) {
140
140
  case 0:
141
141
  return [
142
142
  4,
143
- getRectByTaro(popoverContentRef.current)
143
+ getRectInMultiPlatform(popoverContentRef.current)
144
144
  ];
145
145
  case 1:
146
146
  rectContent = _state.sent();
@@ -10,8 +10,8 @@ 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 "../../hooks/use-lock-scoll-taro";
14
- import { harmony } from "../../utils/platform-taro";
13
+ import { useLockScrollTaro } from "../../hooks/taro/use-lock-scoll";
14
+ import { harmony } from "../../utils/taro/platform";
15
15
  var defaultProps = _object_spread_props(_object_spread({}, defaultOverlayProps), {
16
16
  position: 'center',
17
17
  transition: '',
@@ -6,7 +6,7 @@ import { Text, View } from "@tarojs/components";
6
6
  import classNames from "classnames";
7
7
  import { ComponentDefaults } from "../../utils/typings";
8
8
  import { useRtl } from "../configprovider/index";
9
- import { harmony } from "../../utils/platform-taro";
9
+ import { harmony } from "../../utils/taro/platform";
10
10
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
11
11
  color: 'primary',
12
12
  price: 0,
@@ -7,11 +7,11 @@ import React, { useEffect, useRef, useState } from "react";
7
7
  import classNames from "classnames";
8
8
  import Taro from "@tarojs/taro";
9
9
  import { View } from "@tarojs/components";
10
- import pxTransform from "../../utils/px-transform";
10
+ import { pxTransform } from "../../utils/taro/px-transform";
11
11
  import { ComponentDefaults } from "../../utils/typings";
12
12
  import { useRtl } from "../configprovider/index";
13
- import useUuid from "../../hooks/use-uuid";
14
- import { harmony, web } from "../../utils/platform-taro";
13
+ import { useUuid } from "../../hooks/use-uuid";
14
+ import { harmony, web } from "../../utils/taro/platform";
15
15
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
16
16
  percent: 0,
17
17
  showText: false,
@@ -14,8 +14,8 @@ 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
- import pxTransform from "../../utils/px-transform";
18
- import { getDeviceInfo } from "../../utils/get-system-info";
17
+ import { pxTransform } from "../../utils/taro/px-transform";
18
+ import { getDeviceInfo } from "../../utils/taro/get-system-info";
19
19
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
20
20
  type: 'default',
21
21
  pullingText: '',
@@ -7,13 +7,13 @@ import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
7
7
  import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
8
8
  import classNames from "classnames";
9
9
  import { Text, View } from "@tarojs/components";
10
- import pxTransform from "../../utils/px-transform";
10
+ import { pxTransform } from "../../utils/taro/px-transform";
11
11
  import { useTouch } from "../../hooks/use-touch";
12
12
  import { ComponentDefaults } from "../../utils/typings";
13
13
  import { usePropsValue } from "../../hooks/use-props-value";
14
- import { getRectByTaro } from "../../utils/get-rect-by-taro";
14
+ import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
15
15
  import { useRtl } from "../configprovider/index";
16
- import { harmony } from "../../utils/platform-taro";
16
+ import { harmony } from "../../utils/taro/platform";
17
17
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
18
18
  range: false,
19
19
  min: 0,
@@ -242,7 +242,7 @@ export var Range = function(props) {
242
242
  setDragStatus('');
243
243
  return [
244
244
  4,
245
- getRectByTaro(root.current)
245
+ getRectInMultiPlatform(root.current)
246
246
  ];
247
247
  case 1:
248
248
  rect = _state.sent();
@@ -332,7 +332,7 @@ export var Range = function(props) {
332
332
  setDragStatus('draging');
333
333
  return [
334
334
  4,
335
- getRectByTaro(root.current)
335
+ getRectInMultiPlatform(root.current)
336
336
  ];
337
337
  case 1:
338
338
  rect = _state.sent();
@@ -9,8 +9,8 @@ import { useReady } from "@tarojs/taro";
9
9
  import { Text, View } from "@tarojs/components";
10
10
  import { ComponentDefaults } from "../../utils/typings";
11
11
  import { usePropsValue } from "../../hooks/use-props-value";
12
- import { getRectByTaro } from "../../utils/get-rect-by-taro";
13
- import useRefs from "../../hooks/use-refs";
12
+ import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
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,
@@ -88,7 +88,7 @@ export var Rate = function(props) {
88
88
  var _loop = function(index) {
89
89
  var item = refs[index];
90
90
  if (item) {
91
- getRectByTaro(item).then(function(res) {
91
+ getRectInMultiPlatform(item).then(function(res) {
92
92
  rateRects.current[index] = res;
93
93
  });
94
94
  }
@@ -11,7 +11,7 @@ import { ComponentDefaults } from "../../utils/typings";
11
11
  import { usePropsValue } from "../../hooks/use-props-value";
12
12
  import { useForceUpdate } from "../../hooks/use-force-update";
13
13
  import raf from "../../utils/raf";
14
- import useUuid from "../../hooks/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), {
@@ -90,11 +90,19 @@ export var SideBar = function(props) {
90
90
  var titleRectRef = useRef([]);
91
91
  var _useState = _sliced_to_array(useState(0), 2), scrollTop = _useState[0], setScrollTop = _useState[1];
92
92
  var scrollDirection = function(to) {
93
+ if (sidebarDuration === 0) {
94
+ setScrollTop(to);
95
+ return;
96
+ }
97
+ var from = scrollTop;
98
+ var frames = Math.round(sidebarDuration / 16);
93
99
  var count = 0;
94
- var frames = sidebarDuration === 0 ? 1 : Math.round(sidebarDuration / 16);
95
100
  function animate() {
96
- setScrollTop(to);
97
- if (++count < frames) {
101
+ var progress = count / frames;
102
+ var current = from + (to - from) * progress;
103
+ setScrollTop(current);
104
+ if (count < frames) {
105
+ count++;
98
106
  raf(animate);
99
107
  }
100
108
  }
@@ -12,8 +12,7 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
12
12
  visible: false,
13
13
  size: 'normal',
14
14
  shape: 'round',
15
- duration: 0.6,
16
- inline: false
15
+ duration: 0.6
17
16
  });
18
17
  export var Skeleton = function(props) {
19
18
  var shapeStyle = function shapeStyle() {
@@ -9,10 +9,10 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from "react"
9
9
  import classNames from "classnames";
10
10
  import { getEnv, usePageScroll } from "@tarojs/taro";
11
11
  import { View } from "@tarojs/components";
12
- import { getWindowInfo } from "../../utils/get-system-info";
12
+ import { getWindowInfo } from "../../utils/taro/get-system-info";
13
13
  import { ComponentDefaults } from "../../utils/typings";
14
- import useWatch from "../../hooks/use-watch";
15
- import { getRectByTaro } from "../../utils/get-rect-by-taro";
14
+ import { useWatch } from "../../hooks/use-watch";
15
+ import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
16
16
  import { getScrollParent } from "../../utils/get-scroll-parent";
17
17
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
18
18
  position: 'top',
@@ -89,13 +89,13 @@ export var Sticky = function(props) {
89
89
  case 0:
90
90
  return [
91
91
  4,
92
- getRectByTaro(rootRef.current)
92
+ getRectInMultiPlatform(rootRef.current)
93
93
  ];
94
94
  case 1:
95
95
  curRootRect = _state.sent();
96
96
  return [
97
97
  4,
98
- getRectByTaro(stickyRef.current)
98
+ getRectInMultiPlatform(stickyRef.current)
99
99
  ];
100
100
  case 2:
101
101
  stickyRect = _state.sent();
@@ -119,7 +119,7 @@ export var Sticky = function(props) {
119
119
  ];
120
120
  return [
121
121
  4,
122
- getRectByTaro(container.current)
122
+ getRectInMultiPlatform(container.current)
123
123
  ];
124
124
  case 3:
125
125
  containerRect = _state.sent();
@@ -6,13 +6,13 @@ 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 { useReady } from "@tarojs/taro";
9
+ import { nextTick, useReady } from "@tarojs/taro";
10
10
  import { useTouch } from "../../hooks/use-touch";
11
- import { getRectByTaro } from "../../utils/get-rect-by-taro";
11
+ import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
12
12
  import { ComponentDefaults } from "../../utils/typings";
13
- import { harmony } from "../../utils/platform-taro";
13
+ import { harmony } from "../../utils/taro/platform";
14
14
  import { useRefState } from "../../hooks/use-ref-state";
15
- import useUuid from "../../hooks/use-uuid";
15
+ import { useUuid } from "../../hooks/use-uuid";
16
16
  function preventDefault(event, isStopPropagation) {
17
17
  if (typeof event.cancelable !== 'boolean' || event.cancelable) {
18
18
  event.preventDefault();
@@ -44,7 +44,7 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
44
44
  ];
45
45
  return [
46
46
  4,
47
- getRectByTaro(leftWrapper.current, leftId)
47
+ getRectInMultiPlatform(leftWrapper.current, leftId)
48
48
  ];
49
49
  case 1:
50
50
  leftRect = _state.sent();
@@ -61,7 +61,7 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
61
61
  ];
62
62
  return [
63
63
  4,
64
- getRectByTaro(rightWrapper.current, rightId)
64
+ getRectInMultiPlatform(rightWrapper.current, rightId)
65
65
  ];
66
66
  case 3:
67
67
  rightRect = _state.sent();
@@ -82,7 +82,7 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
82
82
  return _ref.apply(this, arguments);
83
83
  };
84
84
  }();
85
- setTimeout(function() {
85
+ nextTick(function() {
86
86
  return getWidth();
87
87
  });
88
88
  });
@@ -128,7 +128,7 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
128
128
  ];
129
129
  return [
130
130
  4,
131
- getRectByTaro(leftWrapper.current, leftId)
131
+ getRectInMultiPlatform(leftWrapper.current, leftId)
132
132
  ];
133
133
  case 1:
134
134
  leftRect = _state.sent();
@@ -145,7 +145,7 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
145
145
  ];
146
146
  return [
147
147
  4,
148
- getRectByTaro(rightWrapper.current, rightId)
148
+ getRectInMultiPlatform(rightWrapper.current, rightId)
149
149
  ];
150
150
  case 3:
151
151
  rightRect = _state.sent();
@@ -7,7 +7,7 @@ import React, { Children, useEffect, useImperativeHandle, useMemo, useState } fr
7
7
  import { Swiper as TaroSwiper, SwiperItem as TSwiperItem, View } from "@tarojs/components";
8
8
  import classNames from "classnames";
9
9
  import Indicator from "../indicator/index";
10
- import pxTransform from "../../utils/px-transform";
10
+ import { pxTransform } from "../../utils/taro/px-transform";
11
11
  var defaultProps = {
12
12
  direction: 'horizontal',
13
13
  indicator: false,