@arco-design/mobile-react 2.22.0 → 2.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/cjs/action-sheet/style/css/index.css +2 -2
  5. package/cjs/action-sheet/style/index.less +1 -1
  6. package/cjs/dialog/style/css/index.css +2 -2
  7. package/cjs/dialog/style/index.less +1 -1
  8. package/cjs/pull-refresh/android-pull-refresh.js +2 -0
  9. package/cjs/pull-refresh/ios-pull-refresh.js +3 -2
  10. package/cjs/pull-refresh/model.d.ts +6 -2
  11. package/cjs/steps/demo/style/css/mobile.css +8 -2
  12. package/cjs/steps/index.d.ts +1 -1
  13. package/cjs/steps/index.js +5 -1
  14. package/cjs/steps/step.js +5 -3
  15. package/cjs/steps/style/css/index.css +78 -23
  16. package/cjs/steps/style/index.less +92 -24
  17. package/cjs/steps/type.d.ts +12 -0
  18. package/cjs/tabs/index.js +3 -2
  19. package/cjs/tabs/style/css/index.css +8 -8
  20. package/cjs/tabs/style/index.less +4 -4
  21. package/dist/index.js +19 -9
  22. package/dist/index.min.js +3 -3
  23. package/dist/style.css +87 -35
  24. package/dist/style.min.css +1 -1
  25. package/esm/action-sheet/style/css/index.css +2 -2
  26. package/esm/action-sheet/style/index.less +1 -1
  27. package/esm/dialog/style/css/index.css +2 -2
  28. package/esm/dialog/style/index.less +1 -1
  29. package/esm/pull-refresh/android-pull-refresh.js +2 -0
  30. package/esm/pull-refresh/ios-pull-refresh.js +3 -2
  31. package/esm/pull-refresh/model.d.ts +6 -2
  32. package/esm/steps/demo/style/css/mobile.css +8 -2
  33. package/esm/steps/index.d.ts +1 -1
  34. package/esm/steps/index.js +5 -1
  35. package/esm/steps/step.js +5 -3
  36. package/esm/steps/style/css/index.css +78 -23
  37. package/esm/steps/style/index.less +92 -24
  38. package/esm/steps/type.d.ts +12 -0
  39. package/esm/tabs/index.js +4 -3
  40. package/esm/tabs/style/css/index.css +8 -8
  41. package/esm/tabs/style/index.less +4 -4
  42. package/package.json +3 -3
  43. package/tokens/app/arcodesign/default/css-variables.less +7 -3
  44. package/tokens/app/arcodesign/default/index.d.ts +4 -0
  45. package/tokens/app/arcodesign/default/index.js +7 -3
  46. package/tokens/app/arcodesign/default/index.json +58 -10
  47. package/tokens/app/arcodesign/default/index.less +7 -3
  48. package/tokens/mixin/index.less +1 -1
  49. package/umd/action-sheet/style/css/index.css +2 -2
  50. package/umd/action-sheet/style/index.less +1 -1
  51. package/umd/dialog/style/css/index.css +2 -2
  52. package/umd/dialog/style/index.less +1 -1
  53. package/umd/pull-refresh/android-pull-refresh.js +2 -0
  54. package/umd/pull-refresh/ios-pull-refresh.js +3 -2
  55. package/umd/pull-refresh/model.d.ts +6 -2
  56. package/umd/steps/demo/style/css/mobile.css +8 -2
  57. package/umd/steps/index.d.ts +1 -1
  58. package/umd/steps/index.js +5 -1
  59. package/umd/steps/step.js +5 -3
  60. package/umd/steps/style/css/index.css +78 -23
  61. package/umd/steps/style/index.less +92 -24
  62. package/umd/steps/type.d.ts +12 -0
  63. package/umd/tabs/index.js +3 -2
  64. package/umd/tabs/style/css/index.css +8 -8
  65. package/umd/tabs/style/index.less +4 -4
@@ -386,8 +386,8 @@
386
386
  .arco-tab-cell.vertical:not(.custom).line.active.system-android,
387
387
  .arco-tab-cell.vertical:not(.custom).line-divide.active.system-android {
388
388
  font-weight: 400;
389
- -webkit-text-stroke: 0.3PX #165dff;
390
- text-stroke: 0.3PX #165dff;
389
+ -webkit-text-stroke: 0.3PX currentColor;
390
+ text-stroke: 0.3PX currentColor;
391
391
  }
392
392
  .arco-tab-cell.vertical:not(.custom).card {
393
393
  color: #165dff ;
@@ -401,8 +401,8 @@
401
401
  .arco-tab-cell.vertical:not(.custom).card.active.android,
402
402
  .arco-tab-cell.vertical:not(.custom).card.active.system-android {
403
403
  font-weight: 400;
404
- -webkit-text-stroke: 0.3PX #ffffff;
405
- text-stroke: 0.3PX #ffffff;
404
+ -webkit-text-stroke: 0.3PX currentColor;
405
+ text-stroke: 0.3PX currentColor;
406
406
  }
407
407
  .arco-tab-cell.vertical:not(.custom).card:not(:last-child) {
408
408
  border-right: 1PX solid #165dff ;
@@ -444,8 +444,8 @@
444
444
  .arco-tab-cell.vertical:not(.custom).tag.active.system-android,
445
445
  .arco-tab-cell.vertical:not(.custom).tag-divide.active.system-android {
446
446
  font-weight: 400;
447
- -webkit-text-stroke: 0.3PX #ffffff;
448
- text-stroke: 0.3PX #ffffff;
447
+ -webkit-text-stroke: 0.3PX currentColor;
448
+ text-stroke: 0.3PX currentColor;
449
449
  }
450
450
  .arco-tab-cell.horizontal {
451
451
  height: 1.08rem ;
@@ -458,8 +458,8 @@
458
458
  .arco-tab-cell.horizontal.active.android,
459
459
  .arco-tab-cell.horizontal.active.system-android {
460
460
  font-weight: 400;
461
- -webkit-text-stroke: 0.3PX #165dff;
462
- text-stroke: 0.3PX #165dff;
461
+ -webkit-text-stroke: 0.3PX currentColor;
462
+ text-stroke: 0.3PX currentColor;
463
463
  }
464
464
  .arco-tab-pane-container.mode-swipe {
465
465
  display: -webkit-box;
@@ -322,7 +322,7 @@
322
322
  &.line-divide {
323
323
 
324
324
  &.active {
325
- .text-medium-var(tabs-tab-bar-line-active-color);
325
+ .text-medium();
326
326
  .use-var(color, tabs-tab-bar-line-active-color);
327
327
  }
328
328
  }
@@ -333,7 +333,7 @@
333
333
  &.active {
334
334
  .use-var(background, tabs-tab-bar-card-color);
335
335
  .use-var(color, tabs-tab-bar-card-text-color);
336
- .text-medium-var(tabs-tab-bar-card-text-color);
336
+ .text-medium();
337
337
  }
338
338
 
339
339
  &:not(:last-child) {
@@ -374,7 +374,7 @@
374
374
  &.active {
375
375
  .use-var(background, tabs-tab-bar-tag-active-background);
376
376
  .use-var(color, tabs-tab-bar-tag-active-text-color);
377
- .text-medium-var(tabs-tab-bar-tag-active-text-color);
377
+ .text-medium();
378
378
  }
379
379
  }
380
380
  }
@@ -384,7 +384,7 @@
384
384
  .use-var(height, tabs-tab-bar-horizontal-height);
385
385
 
386
386
  &.active {
387
- .text-medium-var(tabs-tab-bar-line-active-color);
387
+ .text-medium();
388
388
  .use-var(color, tabs-tab-bar-line-active-color);
389
389
  }
390
390
  }
package/dist/index.js CHANGED
@@ -8061,6 +8061,7 @@
8061
8061
  var touchStoppedRef = React.useRef(false);
8062
8062
  var changeFromRef = React.useRef('');
8063
8063
  var touchMoveBarScrollRef = React.useRef(false);
8064
+ var system = useSystem();
8064
8065
  var allPanes = getAllPanes();
8065
8066
  var tabDirection = ['top', 'bottom'].indexOf(tabBarPosition) !== -1 ? 'vertical' : 'horizontal';
8066
8067
  var canSwipe = mode === 'swipe' && !disabled && swipeable && tabDirection === 'vertical' && tabs.length > 1;
@@ -8173,10 +8174,10 @@
8173
8174
 
8174
8175
  var evt = e.changedTouches[0];
8175
8176
  var touchMoveX = evt.clientX || 0;
8176
- var touchMoveY = evt.clientY || 0; // bugfix: 兼容safari在右滑返回上一页时clientX为负值的情况
8177
+ var touchMoveY = evt.clientY || 0; // bugfix: 兼容safari在右滑返回上一页时clientX为负值的情况,安卓有折叠屏,触点会有超出屏幕(clientX < 0)的情况,因此这里限定ios系统
8177
8178
  // @en bugfix: bugfix: Compatible with the case in safari where clientX is negative when swiping right back to the previous page
8178
8179
 
8179
- var posDisX = touchMoveX < 0 ? 0 : touchMoveX - touchStartXRef.current;
8180
+ var posDisX = system === 'ios' && touchMoveX < 0 ? 0 : touchMoveX - touchStartXRef.current;
8180
8181
  var posDisY = touchMoveY - touchStartYRef.current;
8181
8182
  var absDisX = Math.abs(posDisX);
8182
8183
  var absDisY = Math.abs(posDisY);
@@ -14681,7 +14682,7 @@
14681
14682
  });
14682
14683
 
14683
14684
  /*!
14684
- * @arco-design/transformable v1.0.1
14685
+ * @arco-design/transformable v1.0.2
14685
14686
  * (c) 2022 ludan.kibbon
14686
14687
  */
14687
14688
  function _defineProperty(obj, key, value) {
@@ -20831,6 +20832,7 @@
20831
20832
 
20832
20833
  var animationRef = React.useRef(0);
20833
20834
  var className = props.className,
20835
+ style = props.style,
20834
20836
  children = props.children,
20835
20837
  _d = props.loadingText,
20836
20838
  loadingText = _d === void 0 ? /*#__PURE__*/React__default["default"].createElement("div", {
@@ -21006,9 +21008,9 @@
21006
21008
  'is-disabled': disabled || !touching && useHideAsNestedScroll
21007
21009
  }),
21008
21010
  ref: domRef,
21009
- style: contentHeight > 0 ? {
21011
+ style: contentHeight > 0 ? __assign({
21010
21012
  height: contentHeight
21011
- } : {}
21013
+ }, style || {}) : style
21012
21014
  }, /*#__PURE__*/React__default["default"].createElement("div", {
21013
21015
  className: cls(prefixCls + "-pull-refresh-content-wrapper")
21014
21016
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -21038,6 +21040,7 @@
21038
21040
  locale = _c === void 0 ? defaultLocale : _c;
21039
21041
 
21040
21042
  var className = props.className,
21043
+ style = props.style,
21041
21044
  children = props.children,
21042
21045
  _d = props.loosingText,
21043
21046
  loosingText = _d === void 0 ? /*#__PURE__*/React__default["default"].createElement("div", {
@@ -21272,6 +21275,7 @@
21272
21275
  className: cls(prefixCls + "-pull-refresh all-border-box is-android", className, {
21273
21276
  'is-disabled': (disabled || !touching && useHideAsNestedScroll) && status !== PullRefreshStatus.Loading
21274
21277
  }),
21278
+ style: style,
21275
21279
  ref: domRef
21276
21280
  }, /*#__PURE__*/React__default["default"].createElement("div", {
21277
21281
  className: cls(prefixCls + "-pull-refresh-place"),
@@ -22741,9 +22745,11 @@
22741
22745
  _b = _a.index,
22742
22746
  index = _b === void 0 ? 0 : _b,
22743
22747
  contextStatus = _a.status,
22748
+ contextAlign = _a.align,
22744
22749
  changeIndex = _a.changeIndex;
22745
22750
 
22746
22751
  var status = props.status || contextStatus;
22752
+ var align = props.align || contextAlign;
22747
22753
  var domRef = React.useRef(null);
22748
22754
  React.useImperativeHandle(ref, function () {
22749
22755
  return {
@@ -22782,12 +22788,12 @@
22782
22788
  var prefixCls = _a.prefixCls;
22783
22789
  return /*#__PURE__*/React__default["default"].createElement("div", {
22784
22790
  ref: domRef,
22785
- className: cls(prefixCls + "-steps-item", currentStatus, direction, iconType),
22791
+ className: cls(prefixCls + "-steps-item", prefixCls + "-steps-item-align-" + align, currentStatus, direction, iconType),
22786
22792
  onClick: function onClick() {
22787
22793
  return changeIndex(index);
22788
22794
  }
22789
22795
  }, /*#__PURE__*/React__default["default"].createElement("div", {
22790
- className: cls(prefixCls + "-steps-item-tail", currentStatus + "-tail-color-with-config")
22796
+ className: cls(prefixCls + "-steps-item-tail", prefixCls + "-steps-item-tail-status-" + currentStatus, prefixCls + "-steps-item-tail-align-" + align, currentStatus + "-tail-color-with-config")
22791
22797
  }), icon ? /*#__PURE__*/React__default["default"].createElement("div", {
22792
22798
  className: cls(prefixCls + "-steps-item-custom-icon", currentStatus + "-custom-icon-bg-color-with-config")
22793
22799
  }, icon) : /*#__PURE__*/React__default["default"].createElement("div", {
@@ -22795,7 +22801,7 @@
22795
22801
  }, iconType === 'number' ? renderNumIcon(prefixCls) : /*#__PURE__*/React__default["default"].createElement("span", {
22796
22802
  className: cls(prefixCls + "-steps-item-icon-dot")
22797
22803
  })), title || description ? /*#__PURE__*/React__default["default"].createElement("div", {
22798
- className: cls(prefixCls + "-steps-item-content")
22804
+ className: cls(prefixCls + "-steps-item-content", prefixCls + "-steps-item-content-align-" + align)
22799
22805
  }, title ? /*#__PURE__*/React__default["default"].createElement("div", {
22800
22806
  className: cls(prefixCls + "-steps-item-title", currentStatus + "-title-color-with-config")
22801
22807
  }, title) : null, description ? /*#__PURE__*/React__default["default"].createElement("div", {
@@ -22814,6 +22820,7 @@
22814
22820
  children = props.children,
22815
22821
  _b = props.direction,
22816
22822
  direction = _b === void 0 ? 'horizontal' : _b,
22823
+ userSetAlign = props.align,
22817
22824
  _c = props.iconType,
22818
22825
  iconType = _c === void 0 ? 'number' : _c,
22819
22826
  current = props.current,
@@ -22824,6 +22831,8 @@
22824
22831
  items = props.items,
22825
22832
  onClick = props.onClick,
22826
22833
  onChange = props.onChange;
22834
+ var defaultAlign = direction === 'vertical' ? 'start' : 'center';
22835
+ var align = userSetAlign !== void 0 ? userSetAlign : defaultAlign;
22827
22836
 
22828
22837
  var _f = React.useState(Number(defaultIndex)),
22829
22838
  innerIndex = _f[0],
@@ -22859,11 +22868,12 @@
22859
22868
  direction: direction,
22860
22869
  index: index,
22861
22870
  status: activeIndex === index ? status : void 0,
22871
+ align: align,
22862
22872
  changeIndex: changeIndex
22863
22873
  },
22864
22874
  key: index
22865
22875
  }, child);
22866
- }, [iconType, activeIndex, direction]);
22876
+ }, [iconType, activeIndex, direction, align]);
22867
22877
  return /*#__PURE__*/React__default["default"].createElement(ContextLayout, null, function (_a) {
22868
22878
  var prefixCls = _a.prefixCls;
22869
22879
  return /*#__PURE__*/React__default["default"].createElement("div", {