@arco-design/mobile-react 2.30.2 → 2.30.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 +12 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/form/type.d.ts +2 -2
- package/cjs/image-preview/index.d.ts +6 -0
- package/cjs/image-preview/index.js +48 -14
- package/cjs/image-preview/style/css/index.css +2 -1
- package/cjs/image-preview/style/index.less +2 -1
- package/cjs/popover/style/css/index.css +9 -2
- package/cjs/popover/style/css/menu.css +4 -0
- package/cjs/popover/style/index.less +1 -2
- package/cjs/popover/style/menu.less +1 -1
- package/cjs/slider/hooks/useSliderEvents.js +14 -8
- package/cjs/slider/hooks/useSliderStyle.js +13 -7
- package/cjs/slider/index.js +4 -2
- package/cjs/slider/marks.js +4 -2
- package/cjs/slider/style/css/index.css +28 -0
- package/cjs/slider/style/index.less +13 -4
- package/dist/index.js +97 -52
- package/dist/index.min.js +4 -4
- package/dist/style.css +36 -3
- package/dist/style.min.css +1 -1
- package/esm/form/type.d.ts +2 -2
- package/esm/image-preview/index.d.ts +6 -0
- package/esm/image-preview/index.js +48 -14
- package/esm/image-preview/style/css/index.css +2 -1
- package/esm/image-preview/style/index.less +2 -1
- package/esm/popover/style/css/index.css +9 -2
- package/esm/popover/style/css/menu.css +4 -0
- package/esm/popover/style/index.less +1 -2
- package/esm/popover/style/menu.less +1 -1
- package/esm/slider/hooks/useSliderEvents.js +13 -8
- package/esm/slider/hooks/useSliderStyle.js +12 -7
- package/esm/slider/index.js +4 -2
- package/esm/slider/marks.js +4 -2
- package/esm/slider/style/css/index.css +28 -0
- package/esm/slider/style/index.less +13 -4
- package/package.json +3 -3
- package/tokens/app/arcodesign/default/css-variables.less +1 -1
- package/tokens/app/arcodesign/default/index.d.ts +1 -1
- package/tokens/app/arcodesign/default/index.js +1 -1
- package/tokens/app/arcodesign/default/index.json +7 -7
- package/tokens/app/arcodesign/default/index.less +1 -1
- package/umd/form/type.d.ts +2 -2
- package/umd/image-preview/index.d.ts +6 -0
- package/umd/image-preview/index.js +48 -14
- package/umd/image-preview/style/css/index.css +2 -1
- package/umd/image-preview/style/index.less +2 -1
- package/umd/popover/style/css/index.css +9 -2
- package/umd/popover/style/css/menu.css +4 -0
- package/umd/popover/style/index.less +1 -2
- package/umd/popover/style/menu.less +1 -1
- package/umd/slider/hooks/useSliderEvents.js +16 -12
- package/umd/slider/hooks/useSliderStyle.js +15 -11
- package/umd/slider/index.js +4 -2
- package/umd/slider/marks.js +4 -2
- package/umd/slider/style/css/index.css +28 -0
- package/umd/slider/style/index.less +13 -4
@@ -173,7 +173,7 @@
|
|
173
173
|
transformersRef.current = []; // 移除过渡图片
|
174
174
|
// @en Remove transition image
|
175
175
|
|
176
|
-
removeChild(
|
176
|
+
removeChild(transImageRef.current);
|
177
177
|
setTransImageInfo(null);
|
178
178
|
setPlaceholders({});
|
179
179
|
var mounted = isInitialMount.current;
|
@@ -216,7 +216,9 @@
|
|
216
216
|
|
217
217
|
function removeChild(child) {
|
218
218
|
try {
|
219
|
-
|
219
|
+
var _domRef$current, _domRef$current$query, _domRef$current$query2;
|
220
|
+
|
221
|
+
child && ((_domRef$current = domRef.current) == null ? void 0 : (_domRef$current$query = _domRef$current.querySelectorAll('.carousel-item')) == null ? void 0 : (_domRef$current$query2 = _domRef$current$query[innerIndexRef.current]) == null ? void 0 : _domRef$current$query2.removeChild(child));
|
220
222
|
} catch (e) {}
|
221
223
|
} // 监听滑动到上下边缘后还在往外滑动的操作,则关闭弹窗
|
222
224
|
// @en Monitor the operation of sliding out after sliding to the upper and lower edges, then close the popup
|
@@ -635,7 +637,41 @@
|
|
635
637
|
}
|
636
638
|
}
|
637
639
|
|
638
|
-
var handleClick = (0, _helpers.useSingleAndDoubleClick)(handleImageClick, handleImageDoubleClick);
|
640
|
+
var handleClick = (0, _helpers.useSingleAndDoubleClick)(handleImageClick, handleImageDoubleClick); // 当使用 getThumbBounds 时,关闭图片预览有缩小效果
|
641
|
+
// @en When using getThumbBounds, closing the image preview has a shrinking effect
|
642
|
+
|
643
|
+
function animateBeforeClose() {
|
644
|
+
var _imagesRef$current$in2;
|
645
|
+
|
646
|
+
var index = innerIndexRef.current;
|
647
|
+
var imageDom = (_imagesRef$current$in2 = imagesRef.current[index]) == null ? void 0 : _imagesRef$current$in2.image;
|
648
|
+
var thumbBounds = getThumbBounds == null ? void 0 : getThumbBounds(index);
|
649
|
+
|
650
|
+
if (!imageDom || !thumbBounds || !thumbBounds.width || !thumbBounds.height) {
|
651
|
+
return;
|
652
|
+
} // 小图超过一半在视野外时,不展示缩小效果
|
653
|
+
// @en When more than half of the thumbnail is outside the field of view, the zoom effect will not be displayed
|
654
|
+
|
655
|
+
|
656
|
+
if (thumbBounds.top < -1 * thumbBounds.height / 2 || thumbBounds.top > windowHeight - thumbBounds.height / 2 || thumbBounds.left < -1 * thumbBounds.width / 2 || thumbBounds.left > windowWidth - thumbBounds.width / 2) {
|
657
|
+
return;
|
658
|
+
}
|
659
|
+
|
660
|
+
var imageDomRect = imageDom.getBoundingClientRect();
|
661
|
+
|
662
|
+
if (!imageDomRect.width || !imageDomRect.height) {
|
663
|
+
return;
|
664
|
+
}
|
665
|
+
|
666
|
+
imageDom.classList.add('closing-animation');
|
667
|
+
setImageBounds(imageDom, imageDomRect, imageDomRect);
|
668
|
+
imageDom.style.objectPosition = images[index].thumbPosition || 'top center';
|
669
|
+
(0, _mobileUtils.nextTick)(function () {
|
670
|
+
imageDom.style.transitionDuration = displayDuration + "ms";
|
671
|
+
imageDom.style.webkitTransitionDuration = displayDuration + "ms";
|
672
|
+
setImageBounds(imageDom, thumbBounds, imageDomRect);
|
673
|
+
});
|
674
|
+
}
|
639
675
|
|
640
676
|
function goClose(e) {
|
641
677
|
if (closingRef.current) {
|
@@ -643,6 +679,7 @@
|
|
643
679
|
}
|
644
680
|
|
645
681
|
closingRef.current = true;
|
682
|
+
animateBeforeClose();
|
646
683
|
close(e);
|
647
684
|
}
|
648
685
|
/**
|
@@ -665,7 +702,7 @@
|
|
665
702
|
|
666
703
|
|
667
704
|
function setDisplayAnimation(index) {
|
668
|
-
var _imagesStatusRef$curr4;
|
705
|
+
var _imagesStatusRef$curr4, _domRef$current2, _domRef$current2$quer, _domRef$current2$quer2;
|
669
706
|
|
670
707
|
var firstLoaded = (_imagesStatusRef$curr4 = imagesStatusRef.current[index]) == null ? void 0 : _imagesStatusRef$curr4.firstLoaded;
|
671
708
|
var fallbackSrc = replaceFallbackWhenLoaded && firstLoaded ? images[index].src : images[index].fallbackSrc; // 用户设置了getThumbBounds和images的fallbackSrc属性才有放大过渡效果
|
@@ -696,7 +733,7 @@
|
|
696
733
|
transImage.style.opacity = '0';
|
697
734
|
transImage.style.transitionDuration = displayDuration + "ms";
|
698
735
|
transImage.style.webkitTransitionDuration = displayDuration + "ms";
|
699
|
-
|
736
|
+
(_domRef$current2 = domRef.current) == null ? void 0 : (_domRef$current2$quer = _domRef$current2.querySelectorAll('.carousel-item')) == null ? void 0 : (_domRef$current2$quer2 = _domRef$current2$quer[index]) == null ? void 0 : _domRef$current2$quer2.prepend(transImage); // 拿到放大之后的位置rect,没拿到就取消小图放大效果
|
700
737
|
// @en Get the zoomed-in position rect, and cancel the zoom-in effect if not getting it
|
701
738
|
|
702
739
|
getNewImageBounds(index, fallbackSrc, transImage, function (rect) {
|
@@ -718,9 +755,10 @@
|
|
718
755
|
return (0, _extends5.default)({}, holders, (_extends3 = {}, _extends3[index] = true, _extends3));
|
719
756
|
});
|
720
757
|
}, Math.max(0, displayDuration - 80));
|
758
|
+
var transitionEndDelay = images[index].transitionEndDelay || 30;
|
721
759
|
setTimeout(function () {
|
722
760
|
resetAnimation(index);
|
723
|
-
}, displayDuration +
|
761
|
+
}, displayDuration + transitionEndDelay);
|
724
762
|
});
|
725
763
|
});
|
726
764
|
}
|
@@ -880,18 +918,14 @@
|
|
880
918
|
}) : null;
|
881
919
|
}
|
882
920
|
|
883
|
-
function renderLoadingArea(
|
884
|
-
|
885
|
-
// @en The loadingArea is extracted and placed on the upper layer of the transition image
|
886
|
-
return index === openIndex ? /*#__PURE__*/_react.default.createElement(_portal.default, {
|
887
|
-
getContainer: getContainer
|
888
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
921
|
+
function renderLoadingArea() {
|
922
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
889
923
|
className: "image-preview-loading-area"
|
890
924
|
}, loadingArea || /*#__PURE__*/_react.default.createElement(_loading.default, {
|
891
925
|
type: "circle",
|
892
926
|
className: "loading-icon",
|
893
927
|
radius: 7
|
894
|
-
}))
|
928
|
+
}));
|
895
929
|
}
|
896
930
|
|
897
931
|
return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, function (_ref3) {
|
@@ -939,7 +973,7 @@
|
|
939
973
|
imagesRef.current[index] = r;
|
940
974
|
},
|
941
975
|
showLoading: showLoading,
|
942
|
-
loadingArea: renderLoadingArea(
|
976
|
+
loadingArea: renderLoadingArea(),
|
943
977
|
errorArea: errorArea,
|
944
978
|
showError: showError,
|
945
979
|
retryTime: retryTime,
|
@@ -575,6 +575,7 @@
|
|
575
575
|
height: 100%;
|
576
576
|
opacity: 0;
|
577
577
|
}
|
578
|
+
.arco-image-preview .image-container img.closing-animation,
|
578
579
|
.image-preview-fake-trans-image {
|
579
580
|
position: fixed;
|
580
581
|
left: 0;
|
@@ -584,7 +585,7 @@
|
|
584
585
|
transition: all cubic-bezier(0.34, 0.69, 0.1, 1) ;
|
585
586
|
will-change: transform;
|
586
587
|
pointer-events: none;
|
587
|
-
|
588
|
+
height: auto !important;
|
588
589
|
}
|
589
590
|
.image-preview-loading-area {
|
590
591
|
position: fixed;
|
@@ -77,6 +77,7 @@
|
|
77
77
|
opacity: 0;
|
78
78
|
}
|
79
79
|
|
80
|
+
.@{prefix}-image-preview .image-container img.closing-animation,
|
80
81
|
.image-preview-fake-trans-image {
|
81
82
|
position: fixed;
|
82
83
|
left: 0;
|
@@ -85,7 +86,7 @@
|
|
85
86
|
.use-var(transition, image-preview-thumb-transition);
|
86
87
|
will-change: transform;
|
87
88
|
pointer-events: none;
|
88
|
-
|
89
|
+
height: auto !important;
|
89
90
|
}
|
90
91
|
|
91
92
|
.image-preview-loading-area {
|
@@ -549,6 +549,10 @@
|
|
549
549
|
font-size: 0.4rem;
|
550
550
|
line-height: 1;
|
551
551
|
}
|
552
|
+
[dir="rtl"] .arco-popover-menu-icon {
|
553
|
+
margin-right: initial;
|
554
|
+
margin-left: 0.16rem;
|
555
|
+
}
|
552
556
|
.arco-popover-menu-icon > * {
|
553
557
|
float: left;
|
554
558
|
}
|
@@ -634,7 +638,6 @@
|
|
634
638
|
width: -webkit-max-content;
|
635
639
|
width: max-content;
|
636
640
|
z-index: 1010;
|
637
|
-
right: 0;
|
638
641
|
background-color: transparent;
|
639
642
|
visibility: hidden;
|
640
643
|
will-change: transform;
|
@@ -716,11 +719,15 @@
|
|
716
719
|
padding: 0 0.2rem 0 0.22rem ;
|
717
720
|
}
|
718
721
|
.arco-popover-inner .text-suffix {
|
719
|
-
padding: 0
|
722
|
+
padding-right: 0.24rem ;
|
720
723
|
-webkit-box-flex: 0;
|
721
724
|
-webkit-flex: 0 0 auto;
|
722
725
|
flex: 0 0 auto;
|
723
726
|
}
|
727
|
+
[dir="rtl"] .arco-popover-inner .text-suffix {
|
728
|
+
padding-right: initial;
|
729
|
+
padding-left: 0.24rem ;
|
730
|
+
}
|
724
731
|
.arco-popover-inner .popover-arrow {
|
725
732
|
position: absolute;
|
726
733
|
-webkit-transform: rotate(45deg);
|
@@ -29,7 +29,6 @@
|
|
29
29
|
position: absolute;
|
30
30
|
width: max-content;
|
31
31
|
z-index: @full-screen-z-index + 10;
|
32
|
-
right: 0;
|
33
32
|
background-color: transparent;
|
34
33
|
visibility: hidden;
|
35
34
|
will-change: transform;
|
@@ -104,7 +103,7 @@
|
|
104
103
|
}
|
105
104
|
|
106
105
|
.text-suffix {
|
107
|
-
.use-var(padding, popover-text-suffix-
|
106
|
+
.use-var-with-rtl(padding-right, popover-text-suffix-edge);
|
108
107
|
flex: 0 0 auto;
|
109
108
|
}
|
110
109
|
|
@@ -1,16 +1,16 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define(["exports", "react", "."], factory);
|
3
|
+
define(["exports", "react", ".", "../../context-provider"], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(exports, require("react"), require("."));
|
5
|
+
factory(exports, require("react"), require("."), require("../../context-provider"));
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
9
9
|
};
|
10
|
-
factory(mod.exports, global.react, global._);
|
10
|
+
factory(mod.exports, global.react, global._, global.contextProvider);
|
11
11
|
global.useSliderEvents = mod.exports;
|
12
12
|
}
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _react, _) {
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _react, _, _contextProvider) {
|
14
14
|
"use strict";
|
15
15
|
|
16
16
|
_exports.__esModule = true;
|
@@ -30,13 +30,16 @@
|
|
30
30
|
setValueGroup = _ref.setValueGroup,
|
31
31
|
setCommonIsTouching = _ref.setCommonIsTouching;
|
32
32
|
|
33
|
-
var _useContext = (0, _react.useContext)(
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
33
|
+
var _useContext = (0, _react.useContext)(_contextProvider.GlobalContext),
|
34
|
+
useRtl = _useContext.useRtl;
|
35
|
+
|
36
|
+
var _useContext2 = (0, _react.useContext)(_.SliderContext),
|
37
|
+
disabled = _useContext2.disabled,
|
38
|
+
step = _useContext2.step,
|
39
|
+
min = _useContext2.min,
|
40
|
+
max = _useContext2.max,
|
41
|
+
type = _useContext2.type,
|
42
|
+
draggableTrackOnly = _useContext2.draggableTrackOnly;
|
40
43
|
|
41
44
|
var _useState = (0, _react.useState)(IsTouchingStatus.Idle),
|
42
45
|
isTouching = _useState[0],
|
@@ -62,7 +65,8 @@
|
|
62
65
|
length = _linePositionRef$curr.length,
|
63
66
|
start = _linePositionRef$curr.start;
|
64
67
|
if (length === 0) return 0;
|
65
|
-
var
|
68
|
+
var rtlRatio = useRtl ? -1 : 1;
|
69
|
+
var newWidth = isHorizontal ? (touchPosition - start) * rtlRatio : length - touchPosition + start;
|
66
70
|
|
67
71
|
if (newWidth < 0) {
|
68
72
|
newWidth = 0;
|
@@ -1,16 +1,16 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define(["exports", "react", "."], factory);
|
3
|
+
define(["exports", "react", ".", "../../context-provider"], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(exports, require("react"), require("."));
|
5
|
+
factory(exports, require("react"), require("."), require("../../context-provider"));
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
9
9
|
};
|
10
|
-
factory(mod.exports, global.react, global._);
|
10
|
+
factory(mod.exports, global.react, global._, global.contextProvider);
|
11
11
|
global.useSliderStyle = mod.exports;
|
12
12
|
}
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _react, _) {
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _react, _, _contextProvider) {
|
14
14
|
"use strict";
|
15
15
|
|
16
16
|
_exports.__esModule = true;
|
@@ -21,12 +21,15 @@
|
|
21
21
|
commonIsTouching = _ref.commonIsTouching,
|
22
22
|
valueGroup = _ref.valueGroup;
|
23
23
|
|
24
|
-
var _useContext = (0, _react.useContext)(
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
24
|
+
var _useContext = (0, _react.useContext)(_contextProvider.GlobalContext),
|
25
|
+
useRtl = _useContext.useRtl;
|
26
|
+
|
27
|
+
var _useContext2 = (0, _react.useContext)(_.SliderContext),
|
28
|
+
size = _useContext2.size,
|
29
|
+
useAnimation = _useContext2.useAnimation,
|
30
|
+
min = _useContext2.min,
|
31
|
+
max = _useContext2.max,
|
32
|
+
type = _useContext2.type;
|
30
33
|
|
31
34
|
var isHorizontal = /^horizontal/g.test(type);
|
32
35
|
var heightStyle = (0, _react.useMemo)(function () {
|
@@ -60,7 +63,8 @@
|
|
60
63
|
length = (larger - min) / (max - min) * length - start;
|
61
64
|
}
|
62
65
|
|
63
|
-
|
66
|
+
var leftStyle = useRtl ? 'right' : 'left';
|
67
|
+
return _ref3 = {}, _ref3[isHorizontal ? leftStyle : 'bottom'] = start + "px", _ref3[isHorizontal ? 'width' : 'height'] = Math.abs(length) + "px", _ref3;
|
64
68
|
}, [valueGroup, getLinePosition, min, max, isHorizontal]);
|
65
69
|
return {
|
66
70
|
heightStyle: heightStyle,
|
package/umd/slider/index.js
CHANGED
@@ -29,7 +29,8 @@
|
|
29
29
|
var Slider = /*#__PURE__*/(0, _react.forwardRef)(function (_, ref) {
|
30
30
|
var _useContext = (0, _react.useContext)(_contextProvider.GlobalContext),
|
31
31
|
_useContext$prefixCls = _useContext.prefixCls,
|
32
|
-
prefixCls = _useContext$prefixCls === void 0 ? '' : _useContext$prefixCls
|
32
|
+
prefixCls = _useContext$prefixCls === void 0 ? '' : _useContext$prefixCls,
|
33
|
+
useRtl = _useContext.useRtl;
|
33
34
|
|
34
35
|
var _useContext2 = (0, _react.useContext)(_hooks.SliderContext),
|
35
36
|
className = _useContext2.className,
|
@@ -80,9 +81,10 @@
|
|
80
81
|
top = _ref.top,
|
81
82
|
height = _ref.height;
|
82
83
|
|
84
|
+
var leftValue = useRtl ? left + width : left;
|
83
85
|
return {
|
84
86
|
length: isHorizontal ? width : height,
|
85
|
-
start: isHorizontal ?
|
87
|
+
start: isHorizontal ? leftValue : top
|
86
88
|
};
|
87
89
|
}, [isHorizontal, firstRender]);
|
88
90
|
|
package/umd/slider/marks.js
CHANGED
@@ -33,7 +33,8 @@
|
|
33
33
|
|
34
34
|
var _useContext = (0, _react.useContext)(_contextProvider.GlobalContext),
|
35
35
|
_useContext$prefixCls = _useContext.prefixCls,
|
36
|
-
prefixCls = _useContext$prefixCls === void 0 ? '' : _useContext$prefixCls
|
36
|
+
prefixCls = _useContext$prefixCls === void 0 ? '' : _useContext$prefixCls,
|
37
|
+
useRtl = _useContext.useRtl;
|
37
38
|
|
38
39
|
var _useContext2 = (0, _react.useContext)(_hooks.SliderContext),
|
39
40
|
type = _useContext2.type,
|
@@ -45,7 +46,8 @@
|
|
45
46
|
var genMarkStyle = (0, _react.useCallback)(function (value) {
|
46
47
|
var _ref2;
|
47
48
|
|
48
|
-
|
49
|
+
var leftStyle = useRtl ? 'right' : 'left';
|
50
|
+
return _ref2 = {}, _ref2[isHorizontal ? leftStyle : 'bottom'] = (value - min) / (max - min) * 100 + "%", _ref2;
|
49
51
|
}, [isHorizontal, min, max]);
|
50
52
|
return /*#__PURE__*/_react.default.createElement("div", {
|
51
53
|
className: prefixCls + "-slider-marks"
|
@@ -541,6 +541,10 @@
|
|
541
541
|
.is-horizontal .arco-slider-label {
|
542
542
|
margin-right: 0.24rem ;
|
543
543
|
}
|
544
|
+
[dir="rtl"] .is-horizontal .arco-slider-label {
|
545
|
+
margin-right: initial;
|
546
|
+
margin-left: 0.24rem ;
|
547
|
+
}
|
544
548
|
.is-vertical .arco-slider-label {
|
545
549
|
-webkit-box-orient: vertical;
|
546
550
|
-webkit-box-direction: normal;
|
@@ -552,6 +556,10 @@
|
|
552
556
|
margin-right: 0;
|
553
557
|
margin-left: 0.24rem ;
|
554
558
|
}
|
559
|
+
[dir="rtl"] .is-horizontal .arco-slider-wrapper + .arco-slider-label {
|
560
|
+
margin-left: initial;
|
561
|
+
margin-right: 0.24rem ;
|
562
|
+
}
|
555
563
|
.is-vertical .arco-slider-wrapper + .arco-slider-label {
|
556
564
|
margin-bottom: 0;
|
557
565
|
margin-top: 0.24rem ;
|
@@ -636,11 +644,27 @@
|
|
636
644
|
-webkit-transform: translateX(50%);
|
637
645
|
transform: translateX(50%);
|
638
646
|
}
|
647
|
+
[dir="rtl"] .is-horizontal .arco-slider-thumb-wrapper.is-end {
|
648
|
+
right: initial;
|
649
|
+
left: 0;
|
650
|
+
}
|
651
|
+
[dir="rtl"] .is-horizontal .arco-slider-thumb-wrapper.is-end {
|
652
|
+
-webkit-transform: translateX(-50%);
|
653
|
+
transform: translateX(-50%);
|
654
|
+
}
|
639
655
|
.is-horizontal .arco-slider-thumb-wrapper.is-start {
|
640
656
|
left: 0;
|
641
657
|
-webkit-transform: translateX(-50%);
|
642
658
|
transform: translateX(-50%);
|
643
659
|
}
|
660
|
+
[dir="rtl"] .is-horizontal .arco-slider-thumb-wrapper.is-start {
|
661
|
+
left: initial;
|
662
|
+
right: 0;
|
663
|
+
}
|
664
|
+
[dir="rtl"] .is-horizontal .arco-slider-thumb-wrapper.is-start {
|
665
|
+
-webkit-transform: translateX(50%);
|
666
|
+
transform: translateX(50%);
|
667
|
+
}
|
644
668
|
.arco-slider-popover-wrapper .arco-slider-thumb {
|
645
669
|
position: relative;
|
646
670
|
}
|
@@ -739,6 +763,10 @@
|
|
739
763
|
-webkit-transform: translateX(-50%);
|
740
764
|
transform: translateX(-50%);
|
741
765
|
}
|
766
|
+
[dir="rtl"] .arco-slider-marks-item {
|
767
|
+
-webkit-transform: translateX(50%);
|
768
|
+
transform: translateX(50%);
|
769
|
+
}
|
742
770
|
.arco-slider-marks-item.is-activated {
|
743
771
|
background: #165DFF ;
|
744
772
|
}
|
@@ -31,7 +31,7 @@
|
|
31
31
|
.use-var(color, slider-text-color);
|
32
32
|
|
33
33
|
.is-horizontal & {
|
34
|
-
.use-var(margin-right, slider-label-gutter);
|
34
|
+
.use-var-with-rtl(margin-right, slider-label-gutter);
|
35
35
|
}
|
36
36
|
|
37
37
|
.is-vertical & {
|
@@ -44,7 +44,7 @@
|
|
44
44
|
|
45
45
|
.is-horizontal & {
|
46
46
|
margin-right: 0;
|
47
|
-
.use-var(margin-left, slider-label-gutter);
|
47
|
+
.use-var-with-rtl(margin-left, slider-label-gutter);
|
48
48
|
}
|
49
49
|
|
50
50
|
.is-vertical & {
|
@@ -124,13 +124,19 @@
|
|
124
124
|
bottom: 0;
|
125
125
|
|
126
126
|
&.is-end {
|
127
|
-
right
|
127
|
+
.set-prop-with-rtl(right, 0);
|
128
128
|
transform: translateX(50%);
|
129
|
+
[dir="rtl"] & {
|
130
|
+
transform: translateX(-50%);
|
131
|
+
}
|
129
132
|
}
|
130
133
|
|
131
134
|
&.is-start {
|
132
|
-
left
|
135
|
+
.set-prop-with-rtl(left, 0);
|
133
136
|
transform: translateX(-50%);
|
137
|
+
[dir="rtl"] & {
|
138
|
+
transform: translateX(50%);
|
139
|
+
}
|
134
140
|
}
|
135
141
|
}
|
136
142
|
}
|
@@ -236,6 +242,9 @@
|
|
236
242
|
.use-var(border-radius, slider-mark-border-radius);
|
237
243
|
.use-var(background, slider-line-color);
|
238
244
|
transform: translateX(-50%);
|
245
|
+
[dir="rtl"] & {
|
246
|
+
transform: translateX(50%);
|
247
|
+
}
|
239
248
|
|
240
249
|
&.is-activated {
|
241
250
|
.use-var(background, slider-line-activated-color);
|