@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.
- package/CHANGELOG.md +14 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/action-sheet/style/css/index.css +2 -2
- package/cjs/action-sheet/style/index.less +1 -1
- package/cjs/dialog/style/css/index.css +2 -2
- package/cjs/dialog/style/index.less +1 -1
- package/cjs/pull-refresh/android-pull-refresh.js +2 -0
- package/cjs/pull-refresh/ios-pull-refresh.js +3 -2
- package/cjs/pull-refresh/model.d.ts +6 -2
- package/cjs/steps/demo/style/css/mobile.css +8 -2
- package/cjs/steps/index.d.ts +1 -1
- package/cjs/steps/index.js +5 -1
- package/cjs/steps/step.js +5 -3
- package/cjs/steps/style/css/index.css +78 -23
- package/cjs/steps/style/index.less +92 -24
- package/cjs/steps/type.d.ts +12 -0
- package/cjs/tabs/index.js +3 -2
- package/cjs/tabs/style/css/index.css +8 -8
- package/cjs/tabs/style/index.less +4 -4
- package/dist/index.js +19 -9
- package/dist/index.min.js +3 -3
- package/dist/style.css +87 -35
- package/dist/style.min.css +1 -1
- package/esm/action-sheet/style/css/index.css +2 -2
- package/esm/action-sheet/style/index.less +1 -1
- package/esm/dialog/style/css/index.css +2 -2
- package/esm/dialog/style/index.less +1 -1
- package/esm/pull-refresh/android-pull-refresh.js +2 -0
- package/esm/pull-refresh/ios-pull-refresh.js +3 -2
- package/esm/pull-refresh/model.d.ts +6 -2
- package/esm/steps/demo/style/css/mobile.css +8 -2
- package/esm/steps/index.d.ts +1 -1
- package/esm/steps/index.js +5 -1
- package/esm/steps/step.js +5 -3
- package/esm/steps/style/css/index.css +78 -23
- package/esm/steps/style/index.less +92 -24
- package/esm/steps/type.d.ts +12 -0
- package/esm/tabs/index.js +4 -3
- package/esm/tabs/style/css/index.css +8 -8
- package/esm/tabs/style/index.less +4 -4
- package/package.json +3 -3
- package/tokens/app/arcodesign/default/css-variables.less +7 -3
- package/tokens/app/arcodesign/default/index.d.ts +4 -0
- package/tokens/app/arcodesign/default/index.js +7 -3
- package/tokens/app/arcodesign/default/index.json +58 -10
- package/tokens/app/arcodesign/default/index.less +7 -3
- package/tokens/mixin/index.less +1 -1
- package/umd/action-sheet/style/css/index.css +2 -2
- package/umd/action-sheet/style/index.less +1 -1
- package/umd/dialog/style/css/index.css +2 -2
- package/umd/dialog/style/index.less +1 -1
- package/umd/pull-refresh/android-pull-refresh.js +2 -0
- package/umd/pull-refresh/ios-pull-refresh.js +3 -2
- package/umd/pull-refresh/model.d.ts +6 -2
- package/umd/steps/demo/style/css/mobile.css +8 -2
- package/umd/steps/index.d.ts +1 -1
- package/umd/steps/index.js +5 -1
- package/umd/steps/step.js +5 -3
- package/umd/steps/style/css/index.css +78 -23
- package/umd/steps/style/index.less +92 -24
- package/umd/steps/type.d.ts +12 -0
- package/umd/tabs/index.js +3 -2
- package/umd/tabs/style/css/index.css +8 -8
- 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
|
390
|
-
text-stroke: 0.3PX
|
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
|
405
|
-
text-stroke: 0.3PX
|
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
|
448
|
-
text-stroke: 0.3PX
|
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
|
462
|
-
text-stroke: 0.3PX
|
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
|
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
|
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
|
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
|
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.
|
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", {
|