@arco-design/mobile-react 2.19.0 → 2.19.1
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 +13 -0
- package/README.en-US.md +2 -2
- package/README.md +4 -4
- package/cjs/button/index.d.ts +6 -0
- package/cjs/button/index.js +3 -1
- package/cjs/circle-progress/index.js +5 -3
- package/cjs/collapse/collapse.js +2 -2
- package/cjs/nav-bar/back-icon.d.ts +2 -2
- package/cjs/nav-bar/back-icon.js +2 -2
- package/cjs/notify/index.d.ts +1 -0
- package/cjs/notify/index.js +12 -0
- package/cjs/notify/type.d.ts +1 -0
- package/cjs/progress/index.js +3 -1
- package/cjs/slider/hooks/index.d.ts +1 -1
- package/cjs/slider/marks.d.ts +5 -5
- package/cjs/slider/marks.js +4 -4
- package/cjs/slider/popover.d.ts +2 -2
- package/cjs/slider/popover.js +3 -5
- package/cjs/steps/step.js +3 -1
- package/cjs/steps/style/css/index.css +20 -11
- package/cjs/steps/style/index.less +8 -9
- package/cjs/swipe-load/index.js +2 -2
- package/cjs/switch/index.js +1 -1
- package/cjs/tab-bar/item.js +2 -2
- package/cjs/tab-bar/tab-bar.js +2 -2
- package/cjs/transition/index.js +4 -2
- package/dist/index.js +46 -36
- package/dist/index.min.js +3 -3
- package/dist/style.css +8 -9
- package/dist/style.min.css +1 -1
- package/esm/button/index.d.ts +6 -0
- package/esm/button/index.js +3 -1
- package/esm/circle-progress/index.js +5 -3
- package/esm/collapse/collapse.js +1 -1
- package/esm/nav-bar/back-icon.d.ts +2 -2
- package/esm/nav-bar/back-icon.js +2 -2
- package/esm/notify/index.d.ts +1 -0
- package/esm/notify/index.js +1 -0
- package/esm/notify/type.d.ts +1 -0
- package/esm/progress/index.js +3 -1
- package/esm/slider/hooks/index.d.ts +1 -1
- package/esm/slider/marks.d.ts +5 -5
- package/esm/slider/marks.js +3 -3
- package/esm/slider/popover.d.ts +2 -2
- package/esm/slider/popover.js +2 -2
- package/esm/steps/step.js +3 -1
- package/esm/steps/style/css/index.css +20 -11
- package/esm/steps/style/index.less +8 -9
- package/esm/swipe-load/index.js +1 -1
- package/esm/switch/index.js +1 -1
- package/esm/tab-bar/item.js +1 -1
- package/esm/tab-bar/tab-bar.js +1 -1
- package/esm/transition/index.js +4 -2
- package/package.json +5 -5
- package/umd/button/index.d.ts +6 -0
- package/umd/button/index.js +3 -1
- package/umd/circle-progress/index.js +5 -3
- package/umd/collapse/collapse.js +4 -4
- package/umd/nav-bar/back-icon.d.ts +2 -2
- package/umd/nav-bar/back-icon.js +2 -2
- package/umd/notify/index.d.ts +1 -0
- package/umd/notify/index.js +13 -4
- package/umd/notify/type.d.ts +1 -0
- package/umd/progress/index.js +3 -1
- package/umd/slider/hooks/index.d.ts +1 -1
- package/umd/slider/marks.d.ts +5 -5
- package/umd/slider/marks.js +6 -6
- package/umd/slider/popover.d.ts +2 -2
- package/umd/slider/popover.js +3 -5
- package/umd/steps/step.js +3 -1
- package/umd/steps/style/css/index.css +20 -11
- package/umd/steps/style/index.less +8 -9
- package/umd/swipe-load/index.js +4 -4
- package/umd/switch/index.js +1 -1
- package/umd/tab-bar/item.js +4 -4
- package/umd/tab-bar/tab-bar.js +4 -4
- package/umd/transition/index.js +4 -2
package/dist/index.js
CHANGED
|
@@ -1977,14 +1977,16 @@
|
|
|
1977
1977
|
*/
|
|
1978
1978
|
|
|
1979
1979
|
function Transition(props) {
|
|
1980
|
-
var
|
|
1980
|
+
var _a = props.children,
|
|
1981
|
+
children = _a === void 0 ? /*#__PURE__*/React__default["default"].createElement("div", null) : _a,
|
|
1981
1982
|
type = props.type,
|
|
1982
1983
|
transIn = props.in,
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1984
|
+
_b = props.timeout,
|
|
1985
|
+
timeout = _b === void 0 ? 300 : _b,
|
|
1986
|
+
_c = props.mountOnEnter,
|
|
1987
|
+
mountOnEnter = _c === void 0 ? true : _c,
|
|
1988
|
+
_d = props.unmountOnExit,
|
|
1989
|
+
unmountOnExit = _d === void 0 ? true : _d,
|
|
1988
1990
|
restProps = __rest(props, ["children", "type", "in", "timeout", "mountOnEnter", "unmountOnExit"]);
|
|
1989
1991
|
|
|
1990
1992
|
return /*#__PURE__*/React__default["default"].createElement(ContextLayout, null, function (_a) {
|
|
@@ -4018,24 +4020,26 @@
|
|
|
4018
4020
|
loading = _e === void 0 ? false : _e,
|
|
4019
4021
|
_f = props.disabled,
|
|
4020
4022
|
disabled = _f === void 0 ? false : _f,
|
|
4021
|
-
_g = props.
|
|
4022
|
-
|
|
4023
|
-
_h = props.
|
|
4024
|
-
|
|
4023
|
+
_g = props.disableWhenLoading,
|
|
4024
|
+
disableWhenLoading = _g === void 0 ? true : _g,
|
|
4025
|
+
_h = props.shape,
|
|
4026
|
+
shape = _h === void 0 ? 'semi' : _h,
|
|
4027
|
+
_j = props.halfBorder,
|
|
4028
|
+
halfBorder = _j === void 0 ? false : _j,
|
|
4025
4029
|
icon = props.icon,
|
|
4026
|
-
|
|
4027
|
-
showTextWhenLoading =
|
|
4028
|
-
|
|
4029
|
-
needActive =
|
|
4030
|
-
|
|
4031
|
-
style =
|
|
4030
|
+
_k = props.showTextWhenLoading,
|
|
4031
|
+
showTextWhenLoading = _k === void 0 ? true : _k,
|
|
4032
|
+
_l = props.needActive,
|
|
4033
|
+
needActive = _l === void 0 ? true : _l,
|
|
4034
|
+
_m = props.style,
|
|
4035
|
+
style = _m === void 0 ? {} : _m,
|
|
4032
4036
|
color = props.color,
|
|
4033
4037
|
bgColor = props.bgColor,
|
|
4034
4038
|
borderColor = props.borderColor,
|
|
4035
|
-
|
|
4036
|
-
className =
|
|
4037
|
-
|
|
4038
|
-
children =
|
|
4039
|
+
_o = props.className,
|
|
4040
|
+
className = _o === void 0 ? '' : _o,
|
|
4041
|
+
_p = props.children,
|
|
4042
|
+
children = _p === void 0 ? null : _p,
|
|
4039
4043
|
loadingIcon = props.loadingIcon,
|
|
4040
4044
|
onClick = props.onClick,
|
|
4041
4045
|
onClickDisabled = props.onClickDisabled;
|
|
@@ -4046,15 +4050,15 @@
|
|
|
4046
4050
|
};
|
|
4047
4051
|
});
|
|
4048
4052
|
|
|
4049
|
-
var
|
|
4053
|
+
var _q = useCustomColor({
|
|
4050
4054
|
color: color,
|
|
4051
4055
|
bgColor: bgColor,
|
|
4052
4056
|
borderColor: borderColor,
|
|
4053
4057
|
isActive: isActive,
|
|
4054
4058
|
disabled: disabled
|
|
4055
4059
|
}),
|
|
4056
|
-
customColorClass =
|
|
4057
|
-
customColorStyle =
|
|
4060
|
+
customColorClass = _q.customColorClass,
|
|
4061
|
+
customColorStyle = _q.customColorStyle;
|
|
4058
4062
|
|
|
4059
4063
|
var handleTouchStart = function handleTouchStart() {
|
|
4060
4064
|
if (needActive && !disabled && !loading) {
|
|
@@ -4084,7 +4088,7 @@
|
|
|
4084
4088
|
onTouchCancel: handleTouchEnd,
|
|
4085
4089
|
onMouseDown: handleTouchStart,
|
|
4086
4090
|
onMouseUp: handleTouchEnd,
|
|
4087
|
-
onClick: disabled ? onClickDisabled : onClick
|
|
4091
|
+
onClick: disabled || loading && disableWhenLoading ? onClickDisabled : onClick
|
|
4088
4092
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4089
4093
|
className: "btn-icon"
|
|
4090
4094
|
}, icon, loading && (loadingIcon === void 0 ? /*#__PURE__*/React__default["default"].createElement(Loading, {
|
|
@@ -5542,7 +5546,7 @@
|
|
|
5542
5546
|
className: prefixCls + "-switch-text"
|
|
5543
5547
|
}, switchChecked ? text.off || '' : text.on || '') : null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5544
5548
|
className: prefixCls + "-switch-inner"
|
|
5545
|
-
}, innerArea
|
|
5549
|
+
}, innerArea || null));
|
|
5546
5550
|
});
|
|
5547
5551
|
});
|
|
5548
5552
|
|
|
@@ -6064,11 +6068,13 @@
|
|
|
6064
6068
|
if (isRenderNormal) {
|
|
6065
6069
|
if (progressColorStart) {
|
|
6066
6070
|
return progressColorStart;
|
|
6067
|
-
}
|
|
6071
|
+
}
|
|
6072
|
+
|
|
6073
|
+
if (progressColorEnd) {
|
|
6068
6074
|
return progressColorEnd;
|
|
6069
|
-
} else {
|
|
6070
|
-
return progressColor;
|
|
6071
6075
|
}
|
|
6076
|
+
|
|
6077
|
+
return progressColor;
|
|
6072
6078
|
}
|
|
6073
6079
|
}, [progressColorStart, progressColorEnd, progressColor]);
|
|
6074
6080
|
|
|
@@ -16428,7 +16434,7 @@
|
|
|
16428
16434
|
});
|
|
16429
16435
|
});
|
|
16430
16436
|
|
|
16431
|
-
|
|
16437
|
+
function BackArrow(_a) {
|
|
16432
16438
|
var _b = _a.color,
|
|
16433
16439
|
color = _b === void 0 ? 'currentColor' : _b;
|
|
16434
16440
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -16441,7 +16447,7 @@
|
|
|
16441
16447
|
d: "M2.1,8l5.4,5.4c0.1,0.1,0.1,0.3,0,0.5L7,14.4c-0.1,0.1-0.3,0.1-0.5,0L0.7,8.5c-0.3-0.3-0.3-0.7,0-0.9\n l5.9-5.9c0.1-0.1,0.3-0.1,0.5,0l0.5,0.5c0.1,0.1,0.1,0.3,0,0.5L2.1,8z",
|
|
16442
16448
|
fill: color
|
|
16443
16449
|
})));
|
|
16444
|
-
}
|
|
16450
|
+
}
|
|
16445
16451
|
|
|
16446
16452
|
/**
|
|
16447
16453
|
* 导航栏组件,支持吸顶和沉浸式,支持在指定滚动位置展示,支持根据滚动位置实时更新style。
|
|
@@ -18739,7 +18745,9 @@
|
|
|
18739
18745
|
background: progressColor
|
|
18740
18746
|
}
|
|
18741
18747
|
}, currentPercentage, "%");
|
|
18742
|
-
}
|
|
18748
|
+
}
|
|
18749
|
+
|
|
18750
|
+
if (position === percentPosition) {
|
|
18743
18751
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
18744
18752
|
style: {
|
|
18745
18753
|
color: progressColor
|
|
@@ -21398,7 +21406,7 @@
|
|
|
21398
21406
|
renderThumb: baseRenderThumb('')
|
|
21399
21407
|
});
|
|
21400
21408
|
|
|
21401
|
-
|
|
21409
|
+
function Popover(_a) {
|
|
21402
21410
|
var visible = _a.visible,
|
|
21403
21411
|
content = _a.content,
|
|
21404
21412
|
children = _a.children;
|
|
@@ -21418,7 +21426,7 @@
|
|
|
21418
21426
|
}, content), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
21419
21427
|
className: prefixCls + "-slider-popover-arrow"
|
|
21420
21428
|
}))), children);
|
|
21421
|
-
}
|
|
21429
|
+
}
|
|
21422
21430
|
|
|
21423
21431
|
var Thumb = function Thumb(_a) {
|
|
21424
21432
|
var className = _a.className,
|
|
@@ -21458,7 +21466,7 @@
|
|
|
21458
21466
|
}, thumbEl));
|
|
21459
21467
|
};
|
|
21460
21468
|
|
|
21461
|
-
|
|
21469
|
+
function Marks(_a) {
|
|
21462
21470
|
var runTimeConfig = _a.runTimeConfig,
|
|
21463
21471
|
_b = _a.className,
|
|
21464
21472
|
className = _b === void 0 ? '' : _b,
|
|
@@ -21495,7 +21503,7 @@
|
|
|
21495
21503
|
className: prefixCls + "-slider-marks-item-label"
|
|
21496
21504
|
}, label));
|
|
21497
21505
|
}));
|
|
21498
|
-
}
|
|
21506
|
+
}
|
|
21499
21507
|
|
|
21500
21508
|
var Slider = /*#__PURE__*/React.forwardRef(function (_, ref) {
|
|
21501
21509
|
var _a = React.useContext(GlobalContext).prefixCls,
|
|
@@ -21772,7 +21780,9 @@
|
|
|
21772
21780
|
|
|
21773
21781
|
if (current < index) {
|
|
21774
21782
|
return 'wait';
|
|
21775
|
-
}
|
|
21783
|
+
}
|
|
21784
|
+
|
|
21785
|
+
if (current === index) {
|
|
21776
21786
|
return 'process';
|
|
21777
21787
|
}
|
|
21778
21788
|
|