@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
package/umd/steps/type.d.ts
CHANGED
@@ -20,6 +20,11 @@ export interface StepProps {
|
|
20
20
|
* @en Specify the step status. When this item is not input, the status will be automatically specified according to the current property of steps
|
21
21
|
*/
|
22
22
|
status?: 'finish' | 'error' | 'wait' | 'process';
|
23
|
+
/**
|
24
|
+
* 指定对齐方式,不配置该项时,会跟随 Steps 的 align 属性值
|
25
|
+
* @en Specify the step alignment. When this item is not input, it will be automatically specified according to the align property of steps
|
26
|
+
*/
|
27
|
+
align?: 'center' | 'start';
|
23
28
|
}
|
24
29
|
export interface StepsProps {
|
25
30
|
/**
|
@@ -38,6 +43,13 @@ export interface StepsProps {
|
|
38
43
|
* @default horizontal
|
39
44
|
*/
|
40
45
|
direction?: 'vertical' | 'horizontal';
|
46
|
+
/**
|
47
|
+
* 步骤条对齐方式
|
48
|
+
* @en Step alignment
|
49
|
+
* @default direction="horizontal" 时默认为 "center",direction="vertical" 时默认为 "start"
|
50
|
+
* @default_en "center" when direction="horizontal" and "start" when direction="vertical"
|
51
|
+
*/
|
52
|
+
align?: 'center' | 'start';
|
41
53
|
/**
|
42
54
|
* 指定当前步骤,从 0 开始记数。在子 Step 元素中,可以通过 status 属性覆盖状态,传入则受控
|
43
55
|
* @en Specify the current step, counting from 0. In the step children elements, the status can be overwritten through the status, and it is controlled if it is input
|
package/umd/tabs/index.js
CHANGED
@@ -193,6 +193,7 @@
|
|
193
193
|
var touchStoppedRef = (0, _react.useRef)(false);
|
194
194
|
var changeFromRef = (0, _react.useRef)('');
|
195
195
|
var touchMoveBarScrollRef = (0, _react.useRef)(false);
|
196
|
+
var system = (0, _helpers.useSystem)();
|
196
197
|
var allPanes = getAllPanes();
|
197
198
|
var tabDirection = ['top', 'bottom'].indexOf(tabBarPosition) !== -1 ? 'vertical' : 'horizontal';
|
198
199
|
var canSwipe = mode === 'swipe' && !disabled && swipeable && tabDirection === 'vertical' && tabs.length > 1;
|
@@ -307,10 +308,10 @@
|
|
307
308
|
|
308
309
|
var evt = e.changedTouches[0];
|
309
310
|
var touchMoveX = evt.clientX || 0;
|
310
|
-
var touchMoveY = evt.clientY || 0; // bugfix: 兼容safari在右滑返回上一页时clientX
|
311
|
+
var touchMoveY = evt.clientY || 0; // bugfix: 兼容safari在右滑返回上一页时clientX为负值的情况,安卓有折叠屏,触点会有超出屏幕(clientX < 0)的情况,因此这里限定ios系统
|
311
312
|
// @en bugfix: bugfix: Compatible with the case in safari where clientX is negative when swiping right back to the previous page
|
312
313
|
|
313
|
-
var posDisX = touchMoveX < 0 ? 0 : touchMoveX - touchStartXRef.current;
|
314
|
+
var posDisX = system === 'ios' && touchMoveX < 0 ? 0 : touchMoveX - touchStartXRef.current;
|
314
315
|
var posDisY = touchMoveY - touchStartYRef.current;
|
315
316
|
var absDisX = Math.abs(posDisX);
|
316
317
|
var absDisY = Math.abs(posDisY);
|
@@ -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
|
}
|