@arco-design/mobile-react 2.29.4 → 2.29.5

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 (68) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/cjs/action-sheet/index.d.ts +2 -2
  5. package/cjs/dialog/index.d.ts +2 -2
  6. package/cjs/image-picker/index.js +14 -6
  7. package/cjs/image-preview/index.d.ts +2 -2
  8. package/cjs/image-preview/index.js +5 -3
  9. package/cjs/index.d.ts +5 -5
  10. package/cjs/index.js +16 -16
  11. package/cjs/load-more/index.d.ts +7 -2
  12. package/cjs/load-more/index.js +9 -1
  13. package/cjs/masking/index.d.ts +2 -2
  14. package/cjs/popup/index.d.ts +2 -2
  15. package/cjs/popup-swiper/index.d.ts +2 -2
  16. package/cjs/pull-refresh/android-pull-refresh.js +12 -20
  17. package/cjs/pull-refresh/hooks.js +2 -2
  18. package/cjs/pull-refresh/style/css/index.css +0 -1
  19. package/cjs/pull-refresh/style/index.less +0 -1
  20. package/cjs/style.d.ts +5 -5
  21. package/cjs/style.js +8 -8
  22. package/cjs/tabs/tab-pane.js +5 -2
  23. package/cjs/toast/index.d.ts +12 -12
  24. package/dist/index.js +2421 -2409
  25. package/dist/index.min.js +4 -4
  26. package/dist/style.css +503 -504
  27. package/dist/style.min.css +1 -1
  28. package/esm/action-sheet/index.d.ts +2 -2
  29. package/esm/dialog/index.d.ts +2 -2
  30. package/esm/image-picker/index.js +13 -6
  31. package/esm/image-preview/index.d.ts +2 -2
  32. package/esm/image-preview/index.js +5 -3
  33. package/esm/index.d.ts +5 -5
  34. package/esm/index.js +5 -5
  35. package/esm/load-more/index.d.ts +7 -2
  36. package/esm/load-more/index.js +9 -1
  37. package/esm/masking/index.d.ts +2 -2
  38. package/esm/popup/index.d.ts +2 -2
  39. package/esm/popup-swiper/index.d.ts +2 -2
  40. package/esm/pull-refresh/android-pull-refresh.js +13 -22
  41. package/esm/pull-refresh/hooks.js +2 -2
  42. package/esm/pull-refresh/style/css/index.css +0 -1
  43. package/esm/pull-refresh/style/index.less +0 -1
  44. package/esm/style.d.ts +5 -5
  45. package/esm/style.js +5 -5
  46. package/esm/tabs/tab-pane.js +6 -3
  47. package/esm/toast/index.d.ts +12 -12
  48. package/package.json +3 -3
  49. package/umd/action-sheet/index.d.ts +2 -2
  50. package/umd/dialog/index.d.ts +2 -2
  51. package/umd/image-picker/index.js +16 -10
  52. package/umd/image-preview/index.d.ts +2 -2
  53. package/umd/image-preview/index.js +5 -3
  54. package/umd/index.d.ts +5 -5
  55. package/umd/index.js +14 -14
  56. package/umd/load-more/index.d.ts +7 -2
  57. package/umd/load-more/index.js +9 -1
  58. package/umd/masking/index.d.ts +2 -2
  59. package/umd/popup/index.d.ts +2 -2
  60. package/umd/popup-swiper/index.d.ts +2 -2
  61. package/umd/pull-refresh/android-pull-refresh.js +15 -24
  62. package/umd/pull-refresh/hooks.js +2 -2
  63. package/umd/pull-refresh/style/css/index.css +0 -1
  64. package/umd/pull-refresh/style/index.less +0 -1
  65. package/umd/style.d.ts +5 -5
  66. package/umd/style.js +2 -2
  67. package/umd/tabs/tab-pane.js +5 -2
  68. package/umd/toast/index.d.ts +12 -12
@@ -250,12 +250,15 @@ var TabPane = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
250
250
  }
251
251
 
252
252
  var translateStr = translateZ ? ' translateZ(0)' : '';
253
+ var translatePercentInSSR = (panes.length ? 100 / panes.length : 0) * activeIndex * rtlRatio * -1 + "%";
254
+ var verticalTranslate = distance - wrapWidth * activeIndex * rtlRatio + "px";
255
+ var horizontalTranslate = distance - wrapHeight * activeIndex + "px";
253
256
  var sizeStyle = tabDirection === 'vertical' ? {
254
257
  width: 100 * panes.length + "%",
255
- transform: "translateX(" + (distance - wrapWidth * activeIndex * rtlRatio) + "px)" + translateStr
258
+ transform: "translateX(" + ((0, _mobileUtils.isSSR)() ? translatePercentInSSR : verticalTranslate) + ")" + translateStr
256
259
  } : {
257
260
  height: 100 * panes.length + "%",
258
- transform: "translateY(" + (distance - wrapHeight * activeIndex) + "px)" + translateStr
261
+ transform: "translateY(" + ((0, _mobileUtils.isSSR)() ? translatePercentInSSR : horizontalTranslate) + ")" + translateStr
259
262
  };
260
263
  var heightStyle = currentPaneHeight && currentPaneHeight !== 'auto' ? {
261
264
  height: currentPaneHeight
@@ -185,8 +185,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
185
185
  * @param {string | ToastProps} config Configuration
186
186
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
187
187
  */
188
- toast: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
189
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
188
+ toast: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
189
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
190
190
  close: () => void;
191
191
  hide: () => void;
192
192
  };
@@ -196,8 +196,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
196
196
  * @param {string | ToastProps} config Configuration
197
197
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
198
198
  */
199
- info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
200
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
199
+ info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
200
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
201
201
  close: () => void;
202
202
  hide: () => void;
203
203
  };
@@ -207,8 +207,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
207
207
  * @param {string | ToastProps} config Configuration
208
208
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
209
209
  */
210
- success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
211
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
210
+ success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
211
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
212
212
  close: () => void;
213
213
  hide: () => void;
214
214
  };
@@ -218,8 +218,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
218
218
  * @param {string | ToastProps} config Configuration
219
219
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
220
220
  */
221
- error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
222
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
221
+ error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
222
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
223
223
  close: () => void;
224
224
  hide: () => void;
225
225
  };
@@ -229,8 +229,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
229
229
  * @param {string | ToastProps} config Configuration
230
230
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
231
231
  */
232
- loading: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
233
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
232
+ loading: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
233
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
234
234
  close: () => void;
235
235
  hide: () => void;
236
236
  };
@@ -240,8 +240,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
240
240
  * @param {string | ToastProps} config Configuration
241
241
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
242
242
  */
243
- warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
244
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
243
+ warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">, context?: import("../context-provider").GlobalContextParams | undefined) => {
244
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap" | "initialBodyOverflow">) => void;
245
245
  close: () => void;
246
246
  hide: () => void;
247
247
  };