@arco-design/mobile-react 2.22.0 → 2.22.3
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 +26 -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/carousel/index.d.ts +6 -0
- package/cjs/carousel/index.js +6 -4
- 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 +107 -95
- 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/carousel/index.d.ts +6 -0
- package/esm/carousel/index.js +6 -4
- 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/tools/flexible.js +82 -63
- package/umd/action-sheet/style/css/index.css +2 -2
- package/umd/action-sheet/style/index.less +1 -1
- package/umd/carousel/index.d.ts +6 -0
- package/umd/carousel/index.js +6 -4
- 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
@@ -528,9 +528,13 @@ var tokens = {
|
|
528
528
|
"notify-font-size": "0.28rem",
|
529
529
|
"notify-min-height": "0.72rem",
|
530
530
|
"steps-padding": "0.32rem 0",
|
531
|
-
"steps-tail-
|
532
|
-
"steps-tail-
|
533
|
-
"steps-tail-vertical-
|
531
|
+
"steps-tail-border-radius": "2PX",
|
532
|
+
"steps-tail-horizontal-gutter": "18PX",
|
533
|
+
"steps-tail-vertical-gutter": "14PX",
|
534
|
+
"steps-tail-horizontal-padding": "0 18PX",
|
535
|
+
"steps-tail-vertical-padding": "14PX 0",
|
536
|
+
"steps-tail-horizontal-left": "9PX",
|
537
|
+
"steps-tail-vertical-top": "9PX",
|
534
538
|
"steps-tail-standard-size": "1PX",
|
535
539
|
"steps-tail-standard-background": "#e5e6eb",
|
536
540
|
"steps-tail-finish-background": "#165dff",
|
@@ -6527,6 +6527,18 @@
|
|
6527
6527
|
"en": "Custom icon color of Steps in processing state"
|
6528
6528
|
}
|
6529
6529
|
},
|
6530
|
+
"stepsTailBorderRadius": {
|
6531
|
+
"cssKey": "steps-tail-border-radius",
|
6532
|
+
"desc": "steps 分割线圆角值",
|
6533
|
+
"override": "",
|
6534
|
+
"value": "2PX",
|
6535
|
+
"jsValue": "2PX",
|
6536
|
+
"staticValue": "2PX",
|
6537
|
+
"localeDesc": {
|
6538
|
+
"ch": "steps 分割线圆角值",
|
6539
|
+
"en": "Border radius of steps dividing"
|
6540
|
+
}
|
6541
|
+
},
|
6530
6542
|
"stepsTailFinishBackground": {
|
6531
6543
|
"cssKey": "steps-tail-finish-background",
|
6532
6544
|
"desc": "steps 步骤分割线完成态颜色",
|
@@ -6539,13 +6551,37 @@
|
|
6539
6551
|
"en": "Steps dividing line color in finish state"
|
6540
6552
|
}
|
6541
6553
|
},
|
6554
|
+
"stepsTailHorizontalGutter": {
|
6555
|
+
"cssKey": "steps-tail-horizontal-gutter",
|
6556
|
+
"desc": "steps 水平分割线与图标中心点的距离",
|
6557
|
+
"override": "",
|
6558
|
+
"value": "18PX",
|
6559
|
+
"jsValue": "18PX",
|
6560
|
+
"staticValue": "18PX",
|
6561
|
+
"localeDesc": {
|
6562
|
+
"ch": "steps 水平分割线与图标中心点的距离",
|
6563
|
+
"en": "The distance between the horizontal dividing line and the center point of the icon"
|
6564
|
+
}
|
6565
|
+
},
|
6566
|
+
"stepsTailHorizontalLeft": {
|
6567
|
+
"cssKey": "steps-tail-horizontal-left",
|
6568
|
+
"desc": "steps 水平分割线的向右偏移距离,一般是 stepsIconHeight 值的一半",
|
6569
|
+
"override": "",
|
6570
|
+
"value": "9PX",
|
6571
|
+
"jsValue": "9PX",
|
6572
|
+
"staticValue": "9PX",
|
6573
|
+
"localeDesc": {
|
6574
|
+
"ch": "steps 水平分割线的向右偏移距离,一般是 stepsIconHeight 值的一半",
|
6575
|
+
"en": "The offset distance to the right of the horizontal dividing line of steps, generally half the value of stepsIconHeight"
|
6576
|
+
}
|
6577
|
+
},
|
6542
6578
|
"stepsTailHorizontalPadding": {
|
6543
6579
|
"cssKey": "steps-tail-horizontal-padding",
|
6544
6580
|
"desc": "steps 水平分割线左右间距",
|
6545
6581
|
"override": "",
|
6546
|
-
"value": "0
|
6547
|
-
"jsValue": "0 @
|
6548
|
-
"staticValue": "0
|
6582
|
+
"value": "0 @steps-tail-horizontal-gutter",
|
6583
|
+
"jsValue": "0 @global@stepsTailHorizontalGutter",
|
6584
|
+
"staticValue": "0 18PX",
|
6549
6585
|
"localeDesc": {
|
6550
6586
|
"ch": "steps 水平分割线左右间距",
|
6551
6587
|
"en": "Left and right spacing of the horizontal dividing line of Steps"
|
@@ -6575,13 +6611,25 @@
|
|
6575
6611
|
"en": "Steps dividing line thickness"
|
6576
6612
|
}
|
6577
6613
|
},
|
6614
|
+
"stepsTailVerticalGutter": {
|
6615
|
+
"cssKey": "steps-tail-vertical-gutter",
|
6616
|
+
"desc": "steps 垂直分割线与图标中心点的距离",
|
6617
|
+
"override": "",
|
6618
|
+
"value": "14PX",
|
6619
|
+
"jsValue": "14PX",
|
6620
|
+
"staticValue": "14PX",
|
6621
|
+
"localeDesc": {
|
6622
|
+
"ch": "steps 垂直分割线与图标中心点的距离",
|
6623
|
+
"en": "The distance between the vertical dividing line and the center point of the icon"
|
6624
|
+
}
|
6625
|
+
},
|
6578
6626
|
"stepsTailVerticalPadding": {
|
6579
6627
|
"cssKey": "steps-tail-vertical-padding",
|
6580
6628
|
"desc": "steps 垂直分割线上下间距",
|
6581
6629
|
"override": "",
|
6582
|
-
"value": "
|
6583
|
-
"jsValue": "@
|
6584
|
-
"staticValue": "
|
6630
|
+
"value": "@steps-tail-vertical-gutter 0",
|
6631
|
+
"jsValue": "@global@stepsTailVerticalGutter 0",
|
6632
|
+
"staticValue": "14PX 0",
|
6585
6633
|
"localeDesc": {
|
6586
6634
|
"ch": "steps 垂直分割线上下间距",
|
6587
6635
|
"en": "Left and right spacing of the vertical dividing line of Steps"
|
@@ -6591,12 +6639,12 @@
|
|
6591
6639
|
"cssKey": "steps-tail-vertical-top",
|
6592
6640
|
"desc": "steps 垂直分割线的向下偏移距离,一般是 stepsIconHeight 值的一半",
|
6593
6641
|
"override": "",
|
6594
|
-
"value": "
|
6595
|
-
"jsValue": "
|
6596
|
-
"staticValue": "
|
6642
|
+
"value": "9PX",
|
6643
|
+
"jsValue": "9PX",
|
6644
|
+
"staticValue": "9PX",
|
6597
6645
|
"localeDesc": {
|
6598
6646
|
"ch": "steps 垂直分割线的向下偏移距离,一般是 stepsIconHeight 值的一半",
|
6599
|
-
"en": "
|
6647
|
+
"en": "The offset distance to the bottom of the vertical dividing line of steps, generally half the value of stepsIconHeight"
|
6600
6648
|
}
|
6601
6649
|
},
|
6602
6650
|
"stepsTitleFontSize": {
|
@@ -516,9 +516,13 @@
|
|
516
516
|
@notify-font-size: ~`pxtorem(14)`;
|
517
517
|
@notify-min-height: ~`pxtorem(36)`;
|
518
518
|
@steps-padding: ~`pxtorem(16)` 0;
|
519
|
-
@steps-tail-
|
520
|
-
@steps-tail-
|
521
|
-
@steps-tail-vertical-
|
519
|
+
@steps-tail-border-radius: 2PX;
|
520
|
+
@steps-tail-horizontal-gutter: 18PX;
|
521
|
+
@steps-tail-vertical-gutter: 14PX;
|
522
|
+
@steps-tail-horizontal-padding: 0 @steps-tail-horizontal-gutter;
|
523
|
+
@steps-tail-vertical-padding: @steps-tail-vertical-gutter 0;
|
524
|
+
@steps-tail-horizontal-left: 9PX;
|
525
|
+
@steps-tail-vertical-top: 9PX;
|
522
526
|
@steps-tail-standard-size: 1PX;
|
523
527
|
@steps-tail-standard-background: @line-color;
|
524
528
|
@steps-tail-finish-background: @primary-color;
|
package/tokens/mixin/index.less
CHANGED
package/tools/flexible.js
CHANGED
@@ -1,82 +1,101 @@
|
|
1
|
-
|
1
|
+
(function (global, factory) {
|
2
|
+
if (typeof define === "function" && define.amd) {
|
3
|
+
define(["exports"], factory);
|
4
|
+
} else if (typeof exports !== "undefined") {
|
5
|
+
factory(exports);
|
6
|
+
} else {
|
7
|
+
var mod = {
|
8
|
+
exports: {}
|
9
|
+
};
|
10
|
+
factory(mod.exports);
|
11
|
+
global.setRootPixel = mod.exports.default;
|
12
|
+
}
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
|
14
|
+
|
15
|
+
"use strict";
|
2
16
|
|
3
|
-
|
4
|
-
|
5
|
-
var sketchWidth = sketch || 375;
|
6
|
-
var maxFontSize = max || 64;
|
7
|
-
var defaultFontSize = 0;
|
17
|
+
_exports.__esModule = true;
|
18
|
+
_exports.default = void 0;
|
8
19
|
|
9
|
-
function
|
10
|
-
|
20
|
+
function setRootPixel(base, sketch, max) {
|
21
|
+
var baseFontSize = base || 50;
|
22
|
+
var sketchWidth = sketch || 375;
|
23
|
+
var maxFontSize = max || 64;
|
24
|
+
var defaultFontSize = 0;
|
25
|
+
|
26
|
+
function getDefaultFontSize() {
|
27
|
+
if (defaultFontSize) {
|
28
|
+
return defaultFontSize;
|
29
|
+
}
|
30
|
+
|
31
|
+
document.documentElement.style.fontSize = '';
|
32
|
+
var temp = document.createElement('div');
|
33
|
+
temp.style.cssText = 'width:1rem;display:none';
|
34
|
+
document.head.appendChild(temp);
|
35
|
+
defaultFontSize = +window.getComputedStyle(temp, null).getPropertyValue('width').replace('px', '') || 16;
|
36
|
+
document.head.removeChild(temp);
|
11
37
|
return defaultFontSize;
|
12
38
|
}
|
13
39
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
document.head.appendChild(temp);
|
18
|
-
defaultFontSize = +window.getComputedStyle(temp, null).getPropertyValue('width').replace('px', '') || 16;
|
19
|
-
document.head.removeChild(temp);
|
20
|
-
return defaultFontSize;
|
21
|
-
}
|
40
|
+
function getQuery(name) {
|
41
|
+
return (new RegExp("[?&]".concat(name, "=([^&#\\b]+)")).exec(location.search || '') || [])[1];
|
42
|
+
}
|
22
43
|
|
23
|
-
|
24
|
-
|
25
|
-
|
44
|
+
function setRootFontSize() {
|
45
|
+
var widthQueryKey = '';
|
46
|
+
var rem2px = baseFontSize;
|
47
|
+
var clientWidth;
|
26
48
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
49
|
+
if (widthQueryKey && +getQuery(widthQueryKey)) {
|
50
|
+
clientWidth = +getQuery(widthQueryKey);
|
51
|
+
} else {
|
52
|
+
clientWidth = window.innerWidth && document.documentElement.clientWidth
|
53
|
+
? Math.min(window.innerWidth, document.documentElement.clientWidth)
|
54
|
+
: window.innerWidth
|
55
|
+
|| document.documentElement.clientWidth
|
56
|
+
|| document.body && document.body.clientWidth
|
57
|
+
|| sketchWidth;
|
58
|
+
}
|
59
|
+
var htmlFontSizePx = clientWidth / sketchWidth * rem2px;
|
60
|
+
htmlFontSizePx = Math.min(htmlFontSizePx, maxFontSize);
|
61
|
+
window.ROOT_FONT_SIZE = htmlFontSizePx;
|
62
|
+
document.documentElement.style.fontSize = "".concat(htmlFontSizePx / getDefaultFontSize() * 100, "%");
|
41
63
|
}
|
42
|
-
var htmlFontSizePx = clientWidth / sketchWidth * rem2px;
|
43
|
-
htmlFontSizePx = Math.min(htmlFontSizePx, maxFontSize);
|
44
|
-
window.ROOT_FONT_SIZE = htmlFontSizePx;
|
45
|
-
document.documentElement.style.fontSize = "".concat(htmlFontSizePx / getDefaultFontSize() * 100, "%");
|
46
|
-
}
|
47
64
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
65
|
+
function adjust(immediate) {
|
66
|
+
if (immediate) {
|
67
|
+
setRootFontSize();
|
68
|
+
return;
|
69
|
+
}
|
70
|
+
|
71
|
+
setTimeout(setRootFontSize, 30);
|
52
72
|
}
|
53
73
|
|
54
|
-
|
55
|
-
|
74
|
+
function removeRootPixel() {
|
75
|
+
document.documentElement.style.fontSize = '';
|
76
|
+
window.removeEventListener('resize', adjust, false);
|
77
|
+
if ('onorientationchange' in window) {
|
78
|
+
window.removeEventListener('orientationchange', adjust, false);
|
79
|
+
}
|
80
|
+
}
|
56
81
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
82
|
+
if (window.isResponsive === false) {
|
83
|
+
document.documentElement.style.fontSize = "".concat(baseFontSize, "px");
|
84
|
+
return function () {
|
85
|
+
document.documentElement.style.fontSize = '';
|
86
|
+
};
|
62
87
|
}
|
63
|
-
}
|
64
88
|
|
65
|
-
|
66
|
-
|
67
|
-
return function () {
|
68
|
-
document.documentElement.style.fontSize = '';
|
69
|
-
};
|
70
|
-
}
|
89
|
+
adjust(true);
|
90
|
+
window.addEventListener('resize', adjust, false);
|
71
91
|
|
72
|
-
|
73
|
-
|
92
|
+
if ('onorientationchange' in window) {
|
93
|
+
window.addEventListener('orientationchange', adjust, false);
|
94
|
+
}
|
74
95
|
|
75
|
-
|
76
|
-
window.addEventListener('orientationchange', adjust, false);
|
96
|
+
return removeRootPixel;
|
77
97
|
}
|
78
98
|
|
79
|
-
|
80
|
-
}
|
99
|
+
_exports.default = setRootPixel;
|
81
100
|
|
82
|
-
|
101
|
+
});
|
@@ -46,8 +46,8 @@
|
|
46
46
|
.arco-action-sheet-title.android,
|
47
47
|
.arco-action-sheet-title.system-android {
|
48
48
|
font-weight: 400;
|
49
|
-
-webkit-text-stroke: 0.3PX
|
50
|
-
text-stroke: 0.3PX
|
49
|
+
-webkit-text-stroke: 0.3PX currentColor;
|
50
|
+
text-stroke: 0.3PX currentColor;
|
51
51
|
}
|
52
52
|
.arco-action-sheet-sub-title {
|
53
53
|
color: #86909c ;
|
package/umd/carousel/index.d.ts
CHANGED
@@ -66,6 +66,12 @@ export interface CarouselProps {
|
|
66
66
|
* @default true
|
67
67
|
*/
|
68
68
|
autoPlay?: boolean;
|
69
|
+
/**
|
70
|
+
* 自动播放方向
|
71
|
+
* @en Direction when playing auto
|
72
|
+
* @default "normal"
|
73
|
+
*/
|
74
|
+
autoPlayDirection?: 'normal' | 'reverse';
|
69
75
|
/**
|
70
76
|
* 是否响应手势滑动
|
71
77
|
* @en Whether to respond to gesture swipe
|
package/umd/carousel/index.js
CHANGED
@@ -47,6 +47,8 @@
|
|
47
47
|
loop = _props$loop === void 0 ? true : _props$loop,
|
48
48
|
_props$autoPlay = props.autoPlay,
|
49
49
|
autoPlay = _props$autoPlay === void 0 ? true : _props$autoPlay,
|
50
|
+
_props$autoPlayDirect = props.autoPlayDirection,
|
51
|
+
autoPlayDirection = _props$autoPlayDirect === void 0 ? 'normal' : _props$autoPlayDirect,
|
50
52
|
_props$swipeable = props.swipeable,
|
51
53
|
swipeable = _props$swipeable === void 0 ? true : _props$swipeable,
|
52
54
|
_props$stayDuration = props.stayDuration,
|
@@ -169,7 +171,7 @@
|
|
169
171
|
transformsRef = _useRefState4[1],
|
170
172
|
setTransforms = _useRefState4[2];
|
171
173
|
|
172
|
-
var _useRefState5 = (0, _helpers.useRefState)('left'),
|
174
|
+
var _useRefState5 = (0, _helpers.useRefState)(autoPlayDirection === 'reverse' && autoPlay ? 'right' : 'left'),
|
173
175
|
direction = _useRefState5[0],
|
174
176
|
directionRef = _useRefState5[1],
|
175
177
|
setStateDirection = _useRefState5[2];
|
@@ -406,7 +408,7 @@
|
|
406
408
|
return function () {
|
407
409
|
clear();
|
408
410
|
};
|
409
|
-
}, [userSetBoxWidth, userSetBoxHeight, childWidth, childHeight, stayDuration, noInterval]);
|
411
|
+
}, [userSetBoxWidth, userSetBoxHeight, childWidth, childHeight, stayDuration, noInterval, autoPlayDirection]);
|
410
412
|
(0, _helpers.useUpdateEffect)(function () {
|
411
413
|
if (currentIndex !== void 0) {
|
412
414
|
jumpTo(currentIndex);
|
@@ -546,7 +548,7 @@
|
|
546
548
|
var changedIndex = newIndex !== oldIndex ? getShownIndex(newIndex) : -1;
|
547
549
|
|
548
550
|
if (autoJump) {
|
549
|
-
setDirection('left');
|
551
|
+
setDirection(autoPlayDirection === 'reverse' ? 'right' : 'left');
|
550
552
|
} else if (newIndex === indexRef.current) {
|
551
553
|
setDirection(distanceRef.current > 0 ? 'right' : 'left');
|
552
554
|
} else {
|
@@ -600,7 +602,7 @@
|
|
600
602
|
}
|
601
603
|
|
602
604
|
timerRef.current = delayTimeout(function () {
|
603
|
-
jumpTo(indexRef.current + 1);
|
605
|
+
jumpTo(autoPlayDirection === 'reverse' ? indexRef.current - 1 : indexRef.current + 1);
|
604
606
|
}, stayDuration);
|
605
607
|
}
|
606
608
|
|
@@ -126,8 +126,8 @@
|
|
126
126
|
.arco-dialog-header.ios.android,
|
127
127
|
.arco-dialog-header.ios.system-android {
|
128
128
|
font-weight: 400;
|
129
|
-
-webkit-text-stroke: 0.3PX
|
130
|
-
text-stroke: 0.3PX
|
129
|
+
-webkit-text-stroke: 0.3PX currentColor;
|
130
|
+
text-stroke: 0.3PX currentColor;
|
131
131
|
}
|
132
132
|
.arco-dialog-header.ios.only-title {
|
133
133
|
padding-bottom: 0.4rem ;
|
@@ -105,7 +105,7 @@
|
|
105
105
|
.use-var(padding-right, dialog-ios-horizontal-padding);
|
106
106
|
.use-var(font-size, dialog-header-ios-font-size);
|
107
107
|
.use-var(line-height, dialog-header-ios-line-height);
|
108
|
-
.text-medium
|
108
|
+
.text-medium();
|
109
109
|
|
110
110
|
&.only-title {
|
111
111
|
.use-var(padding-bottom, dialog-ios-vertical-padding);
|
@@ -37,6 +37,7 @@
|
|
37
37
|
locale = _useContext$locale === void 0 ? _mobileUtils.defaultLocale : _useContext$locale;
|
38
38
|
|
39
39
|
var className = props.className,
|
40
|
+
style = props.style,
|
40
41
|
children = props.children,
|
41
42
|
_props$loosingText = props.loosingText,
|
42
43
|
loosingText = _props$loosingText === void 0 ? /*#__PURE__*/_react.default.createElement("div", {
|
@@ -273,6 +274,7 @@
|
|
273
274
|
className: (0, _mobileUtils.cls)(prefixCls + "-pull-refresh all-border-box is-android", className, {
|
274
275
|
'is-disabled': (disabled || !touching && useHideAsNestedScroll) && status !== _model.PullRefreshStatus.Loading
|
275
276
|
}),
|
277
|
+
style: style,
|
276
278
|
ref: domRef
|
277
279
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
278
280
|
className: (0, _mobileUtils.cls)(prefixCls + "-pull-refresh-place"),
|
@@ -35,6 +35,7 @@
|
|
35
35
|
|
36
36
|
var animationRef = (0, _react.useRef)(0);
|
37
37
|
var className = props.className,
|
38
|
+
style = props.style,
|
38
39
|
children = props.children,
|
39
40
|
_props$loadingText = props.loadingText,
|
40
41
|
loadingText = _props$loadingText === void 0 ? /*#__PURE__*/_react.default.createElement("div", {
|
@@ -214,9 +215,9 @@
|
|
214
215
|
'is-disabled': disabled || !touching && useHideAsNestedScroll
|
215
216
|
}),
|
216
217
|
ref: domRef,
|
217
|
-
style: contentHeight > 0 ? {
|
218
|
+
style: contentHeight > 0 ? (0, _extends2.default)({
|
218
219
|
height: contentHeight
|
219
|
-
}
|
220
|
+
}, style || {}) : style
|
220
221
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
221
222
|
className: (0, _mobileUtils.cls)(prefixCls + "-pull-refresh-content-wrapper")
|
222
223
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ReactNode } from 'react';
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
2
2
|
export interface PullRefreshRef {
|
3
3
|
/**
|
4
4
|
* 最外层元素 DOM
|
@@ -32,9 +32,13 @@ export interface PullRefreshBasicProps {
|
|
32
32
|
/**
|
33
33
|
* 样式类名
|
34
34
|
* @en Custom classname
|
35
|
-
* @default ""
|
36
35
|
*/
|
37
36
|
className?: string;
|
37
|
+
/**
|
38
|
+
* 自定义样式
|
39
|
+
* @en Custom style
|
40
|
+
*/
|
41
|
+
style?: CSSProperties;
|
38
42
|
/**
|
39
43
|
* 是否禁用
|
40
44
|
* @en Whether to be disabled
|
@@ -30,7 +30,10 @@
|
|
30
30
|
#demo-steps #demo-order-7 .process-title-color-with-config {
|
31
31
|
color: #FFB400;
|
32
32
|
}
|
33
|
-
#demo-steps #demo-order-7 .finish-tail-color-with-config
|
33
|
+
#demo-steps #demo-order-7 .finish-tail-color-with-config::before,
|
34
|
+
#demo-steps #demo-order-7 .finish-tail-color-with-config::after,
|
35
|
+
#demo-steps #demo-order-7 .process-tail-color-with-config::before,
|
36
|
+
#demo-steps #demo-order-7 .error-tail-color-with-config::before {
|
34
37
|
background: #FFB400;
|
35
38
|
}
|
36
39
|
#demo-steps #demo-order-8 .demo-svg .arco-steps-item-custom-icon {
|
@@ -57,7 +60,10 @@
|
|
57
60
|
#demo-steps #demo-order-8 .demo-svg .process-title-color-with-config {
|
58
61
|
color: #165DFF;
|
59
62
|
}
|
60
|
-
#demo-steps #demo-order-8 .demo-svg .finish-tail-color-with-config
|
63
|
+
#demo-steps #demo-order-8 .demo-svg .finish-tail-color-with-config::before,
|
64
|
+
#demo-steps #demo-order-8 .demo-svg .finish-tail-color-with-config::after,
|
65
|
+
#demo-steps #demo-order-8 .demo-svg .process-tail-color-with-config::before,
|
66
|
+
#demo-steps #demo-order-8 .demo-svg .error-tail-color-with-config::before {
|
61
67
|
background: #165DFF;
|
62
68
|
}
|
63
69
|
#demo-steps #demo-order-8 .demo-svg .arco-steps-item-custom-icon {
|
package/umd/steps/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { StepsProps, StepsRef } from './type';
|
3
3
|
export * from './type';
|
4
|
-
export declare const StepsContext: React.Context<Pick<StepsProps, "direction" | "status" | "current" | "iconType"> & {
|
4
|
+
export declare const StepsContext: React.Context<Pick<StepsProps, "direction" | "status" | "current" | "align" | "iconType"> & {
|
5
5
|
index?: number | undefined;
|
6
6
|
changeIndex: (newIndex: number) => void;
|
7
7
|
}>;
|
package/umd/steps/index.js
CHANGED
@@ -45,6 +45,7 @@
|
|
45
45
|
children = props.children,
|
46
46
|
_props$direction = props.direction,
|
47
47
|
direction = _props$direction === void 0 ? 'horizontal' : _props$direction,
|
48
|
+
userSetAlign = props.align,
|
48
49
|
_props$iconType = props.iconType,
|
49
50
|
iconType = _props$iconType === void 0 ? 'number' : _props$iconType,
|
50
51
|
current = props.current,
|
@@ -55,6 +56,8 @@
|
|
55
56
|
items = props.items,
|
56
57
|
onClick = props.onClick,
|
57
58
|
onChange = props.onChange;
|
59
|
+
var defaultAlign = direction === 'vertical' ? 'start' : 'center';
|
60
|
+
var align = userSetAlign !== void 0 ? userSetAlign : defaultAlign;
|
58
61
|
|
59
62
|
var _useState = (0, _react.useState)(Number(defaultIndex)),
|
60
63
|
innerIndex = _useState[0],
|
@@ -90,11 +93,12 @@
|
|
90
93
|
direction: direction,
|
91
94
|
index: index,
|
92
95
|
status: activeIndex === index ? status : void 0,
|
96
|
+
align: align,
|
93
97
|
changeIndex: changeIndex
|
94
98
|
},
|
95
99
|
key: index
|
96
100
|
}, child);
|
97
|
-
}, [iconType, activeIndex, direction]);
|
101
|
+
}, [iconType, activeIndex, direction, align]);
|
98
102
|
return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, function (_ref) {
|
99
103
|
var prefixCls = _ref.prefixCls;
|
100
104
|
return /*#__PURE__*/_react.default.createElement("div", {
|
package/umd/steps/step.js
CHANGED
@@ -33,9 +33,11 @@
|
|
33
33
|
_useContext$index = _useContext.index,
|
34
34
|
index = _useContext$index === void 0 ? 0 : _useContext$index,
|
35
35
|
contextStatus = _useContext.status,
|
36
|
+
contextAlign = _useContext.align,
|
36
37
|
changeIndex = _useContext.changeIndex;
|
37
38
|
|
38
39
|
var status = props.status || contextStatus;
|
40
|
+
var align = props.align || contextAlign;
|
39
41
|
var domRef = (0, _react.useRef)(null);
|
40
42
|
(0, _react.useImperativeHandle)(ref, function () {
|
41
43
|
return {
|
@@ -74,12 +76,12 @@
|
|
74
76
|
var prefixCls = _ref.prefixCls;
|
75
77
|
return /*#__PURE__*/_react.default.createElement("div", {
|
76
78
|
ref: domRef,
|
77
|
-
className: (0, _mobileUtils.cls)(prefixCls + "-steps-item", currentStatus, direction, iconType),
|
79
|
+
className: (0, _mobileUtils.cls)(prefixCls + "-steps-item", prefixCls + "-steps-item-align-" + align, currentStatus, direction, iconType),
|
78
80
|
onClick: function onClick() {
|
79
81
|
return changeIndex(index);
|
80
82
|
}
|
81
83
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
82
|
-
className: (0, _mobileUtils.cls)(prefixCls + "-steps-item-tail", currentStatus + "-tail-color-with-config")
|
84
|
+
className: (0, _mobileUtils.cls)(prefixCls + "-steps-item-tail", prefixCls + "-steps-item-tail-status-" + currentStatus, prefixCls + "-steps-item-tail-align-" + align, currentStatus + "-tail-color-with-config")
|
83
85
|
}), icon ? /*#__PURE__*/_react.default.createElement("div", {
|
84
86
|
className: (0, _mobileUtils.cls)(prefixCls + "-steps-item-custom-icon", currentStatus + "-custom-icon-bg-color-with-config")
|
85
87
|
}, icon) : /*#__PURE__*/_react.default.createElement("div", {
|
@@ -87,7 +89,7 @@
|
|
87
89
|
}, iconType === 'number' ? renderNumIcon(prefixCls) : /*#__PURE__*/_react.default.createElement("span", {
|
88
90
|
className: (0, _mobileUtils.cls)(prefixCls + "-steps-item-icon-dot")
|
89
91
|
})), title || description ? /*#__PURE__*/_react.default.createElement("div", {
|
90
|
-
className: (0, _mobileUtils.cls)(prefixCls + "-steps-item-content")
|
92
|
+
className: (0, _mobileUtils.cls)(prefixCls + "-steps-item-content", prefixCls + "-steps-item-content-align-" + align)
|
91
93
|
}, title ? /*#__PURE__*/_react.default.createElement("div", {
|
92
94
|
className: (0, _mobileUtils.cls)(prefixCls + "-steps-item-title", currentStatus + "-title-color-with-config")
|
93
95
|
}, title) : null, description ? /*#__PURE__*/_react.default.createElement("div", {
|