@arco-design/mobile-react 2.30.4 → 2.30.6
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/checkbox/style/css/index.css +3 -0
- package/cjs/checkbox/style/index.less +5 -0
- package/cjs/date-picker/index.js +46 -29
- package/cjs/dialog/style/css/index.css +88 -0
- package/cjs/dialog/style/index.less +16 -4
- package/cjs/dropdown-menu/helper.d.ts +1 -6
- package/cjs/dropdown-menu/helper.js +0 -10
- package/cjs/ellipsis/components/js-ellipsis.js +14 -17
- package/cjs/ellipsis/index.d.ts +2 -2
- package/cjs/ellipsis/index.js +2 -2
- package/cjs/image-preview/index.js +1 -0
- package/cjs/index-bar/style/css/index.css +28 -5
- package/cjs/index-bar/style/index.less +10 -10
- package/cjs/pagination/arrow.js +6 -3
- package/cjs/pagination/style/css/index.css +21 -6
- package/cjs/pagination/style/index.less +9 -9
- package/cjs/picker/style/css/index.css +8 -0
- package/cjs/picker/style/index.less +2 -2
- package/cjs/progress/style/css/index.css +20 -0
- package/cjs/progress/style/index.less +5 -5
- package/cjs/radio/style/css/index.css +3 -0
- package/cjs/radio/style/index.less +5 -0
- package/cjs/search-bar/style/css/index.css +18 -0
- package/cjs/search-bar/style/index.less +5 -5
- package/cjs/show-monitor/index.d.ts +5 -0
- package/cjs/show-monitor/index.js +1 -0
- package/cjs/slider/hooks/index.d.ts +1 -1
- package/cjs/slider/index.d.ts +10 -0
- package/cjs/slider/index.js +1 -0
- package/cjs/slider/thumb.d.ts +6 -5
- package/cjs/slider/thumb.js +19 -20
- package/dist/index.js +86 -57
- package/dist/index.min.js +2 -2
- package/dist/style.css +152 -11
- package/dist/style.min.css +1 -1
- package/esm/checkbox/style/css/index.css +3 -0
- package/esm/checkbox/style/index.less +5 -0
- package/esm/date-picker/index.js +44 -26
- package/esm/dialog/style/css/index.css +88 -0
- package/esm/dialog/style/index.less +16 -4
- package/esm/dropdown-menu/helper.d.ts +1 -6
- package/esm/dropdown-menu/helper.js +0 -8
- package/esm/ellipsis/components/js-ellipsis.js +14 -17
- package/esm/ellipsis/index.d.ts +2 -2
- package/esm/ellipsis/index.js +2 -2
- package/esm/image-preview/index.js +1 -0
- package/esm/index-bar/style/css/index.css +28 -5
- package/esm/index-bar/style/index.less +10 -10
- package/esm/pagination/arrow.js +6 -3
- package/esm/pagination/style/css/index.css +21 -6
- package/esm/pagination/style/index.less +9 -9
- package/esm/picker/style/css/index.css +8 -0
- package/esm/picker/style/index.less +2 -2
- package/esm/progress/style/css/index.css +20 -0
- package/esm/progress/style/index.less +5 -5
- package/esm/radio/style/css/index.css +3 -0
- package/esm/radio/style/index.less +5 -0
- package/esm/search-bar/style/css/index.css +18 -0
- package/esm/search-bar/style/index.less +5 -5
- package/esm/show-monitor/index.d.ts +5 -0
- package/esm/show-monitor/index.js +1 -0
- package/esm/slider/hooks/index.d.ts +1 -1
- package/esm/slider/index.d.ts +10 -0
- package/esm/slider/index.js +1 -0
- package/esm/slider/thumb.d.ts +6 -5
- package/esm/slider/thumb.js +19 -17
- package/package.json +3 -3
- package/tokens/app/arcodesign/default/css-variables.less +3 -4
- package/tokens/app/arcodesign/default/index.d.ts +0 -1
- package/tokens/app/arcodesign/default/index.js +3 -4
- package/tokens/app/arcodesign/default/index.json +9 -21
- package/tokens/app/arcodesign/default/index.less +3 -4
- package/umd/checkbox/style/css/index.css +3 -0
- package/umd/checkbox/style/index.less +5 -0
- package/umd/date-picker/index.js +47 -30
- package/umd/dialog/style/css/index.css +88 -0
- package/umd/dialog/style/index.less +16 -4
- package/umd/dropdown-menu/helper.d.ts +1 -6
- package/umd/dropdown-menu/helper.js +0 -10
- package/umd/ellipsis/components/js-ellipsis.js +14 -17
- package/umd/ellipsis/index.d.ts +2 -2
- package/umd/ellipsis/index.js +2 -2
- package/umd/image-preview/index.js +1 -0
- package/umd/index-bar/style/css/index.css +28 -5
- package/umd/index-bar/style/index.less +10 -10
- package/umd/pagination/arrow.js +6 -3
- package/umd/pagination/style/css/index.css +21 -6
- package/umd/pagination/style/index.less +9 -9
- package/umd/picker/style/css/index.css +8 -0
- package/umd/picker/style/index.less +2 -2
- package/umd/progress/style/css/index.css +20 -0
- package/umd/progress/style/index.less +5 -5
- package/umd/radio/style/css/index.css +3 -0
- package/umd/radio/style/index.less +5 -0
- package/umd/search-bar/style/css/index.css +18 -0
- package/umd/search-bar/style/index.less +5 -5
- package/umd/show-monitor/index.d.ts +5 -0
- package/umd/show-monitor/index.js +1 -0
- package/umd/slider/hooks/index.d.ts +1 -1
- package/umd/slider/index.d.ts +10 -0
- package/umd/slider/index.js +1 -0
- package/umd/slider/thumb.d.ts +6 -5
- package/umd/slider/thumb.js +23 -23
package/esm/date-picker/index.js
CHANGED
@@ -71,10 +71,8 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
71
71
|
});
|
72
72
|
|
73
73
|
function _getColumns() {
|
74
|
-
var dateObj =
|
75
|
-
|
76
|
-
dateObj[type] = _getActualArray(type, currentDateObjRef.current);
|
77
|
-
});
|
74
|
+
var dateObj = _getActualArray();
|
75
|
+
|
78
76
|
var columns = keyOptions.map(function (opt) {
|
79
77
|
return dateObj[opt];
|
80
78
|
});
|
@@ -118,32 +116,52 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
118
116
|
// @en Dynamically change the options of other columns based on the currently selected date
|
119
117
|
|
120
118
|
|
121
|
-
function _getActualArray(
|
122
|
-
var
|
123
|
-
|
124
|
-
var range = [];
|
119
|
+
function _getActualArray() {
|
120
|
+
var dateObj = {}; // 当前时间对象
|
121
|
+
// @en current Date object
|
125
122
|
|
126
|
-
|
127
|
-
case 'year':
|
128
|
-
range = [minDateObjRef.current.year, maxDateObjRef.current.year];
|
129
|
-
break;
|
130
|
-
|
131
|
-
default:
|
132
|
-
{
|
133
|
-
var checkKeys = allTypes.slice(0, allTypes.indexOf(type));
|
134
|
-
range = normalRange;
|
123
|
+
var currentDateObj = _extends({}, currentDateObjRef.current);
|
135
124
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
125
|
+
allTypes.forEach(function (type) {
|
126
|
+
// 根据日期类型,计算出默认的日期范围
|
127
|
+
// @en According to the date type, calculate the default date range.
|
128
|
+
var normalRange = _getNormalRange(type, currentDateObj);
|
129
|
+
|
130
|
+
var range = [];
|
131
|
+
|
132
|
+
switch (type) {
|
133
|
+
case 'year':
|
134
|
+
// 默认使用minTs和maxTs年份区间
|
135
|
+
// @en Default use minTs and maxTs years.
|
136
|
+
range = [minDateObjRef.current.year, maxDateObjRef.current.year];
|
137
|
+
break;
|
138
|
+
|
139
|
+
default:
|
140
|
+
{
|
141
|
+
// 除了年份外,其他日期类型都需要判断上一级日期是否相同
|
142
|
+
// @en In addition to the year, other date types need to check if the upper-level date is the same.
|
143
|
+
var checkKeys = allTypes.slice(0, allTypes.indexOf(type));
|
144
|
+
range = normalRange;
|
145
|
+
|
146
|
+
if (judgeObj(currentDateObj, minDateObjRef.current, checkKeys)) {
|
147
|
+
var _extends2;
|
148
|
+
|
149
|
+
range[0] = minDateObjRef.current[type];
|
150
|
+
currentDateObj = _extends({}, currentDateObj, (_extends2 = {}, _extends2[type] = Math.max(minDateObjRef.current[type], currentDateObj[type]), _extends2));
|
151
|
+
}
|
152
|
+
|
153
|
+
if (judgeObj(currentDateObj, maxDateObjRef.current, checkKeys)) {
|
154
|
+
var _extends3;
|
155
|
+
|
156
|
+
range[range.length - 1] = maxDateObjRef.current[type];
|
157
|
+
currentDateObj = _extends({}, currentDateObj, (_extends3 = {}, _extends3[type] = Math.min(maxDateObjRef.current[type], currentDateObj[type]), _extends3));
|
158
|
+
}
|
142
159
|
}
|
143
|
-
|
144
|
-
}
|
160
|
+
}
|
145
161
|
|
146
|
-
|
162
|
+
dateObj[type] = _convertRangeToArr(type, range);
|
163
|
+
});
|
164
|
+
return dateObj;
|
147
165
|
}
|
148
166
|
|
149
167
|
function _convertRangeToArr(type, range) {
|
@@ -655,6 +655,10 @@
|
|
655
655
|
.arco-dialog-body.left {
|
656
656
|
text-align: left;
|
657
657
|
}
|
658
|
+
[dir="rtl"] .arco-dialog-header.left,
|
659
|
+
[dir="rtl"] .arco-dialog-body.left {
|
660
|
+
text-align: right;
|
661
|
+
}
|
658
662
|
.arco-dialog-header.center,
|
659
663
|
.arco-dialog-body.center {
|
660
664
|
text-align: center;
|
@@ -663,6 +667,10 @@
|
|
663
667
|
.arco-dialog-body.right {
|
664
668
|
text-align: right;
|
665
669
|
}
|
670
|
+
[dir="rtl"] .arco-dialog-header.right,
|
671
|
+
[dir="rtl"] .arco-dialog-body.right {
|
672
|
+
text-align: left;
|
673
|
+
}
|
666
674
|
.arco-dialog-header.android,
|
667
675
|
.arco-dialog-body.sub-title.android {
|
668
676
|
padding-top: 0.4rem ;
|
@@ -693,6 +701,9 @@
|
|
693
701
|
justify-content: flex-end;
|
694
702
|
text-align: right;
|
695
703
|
}
|
704
|
+
[dir="rtl"] .arco-dialog-footer.android {
|
705
|
+
text-align: left;
|
706
|
+
}
|
696
707
|
.arco-dialog-footer.android .dialog-footer-button {
|
697
708
|
color: #1a74ff ;
|
698
709
|
font-size: 0.3rem ;
|
@@ -701,6 +712,10 @@
|
|
701
712
|
.arco-dialog-footer.android .dialog-footer-button:not(:last-child) {
|
702
713
|
margin-right: 0.56rem ;
|
703
714
|
}
|
715
|
+
[dir="rtl"] .arco-dialog-footer.android .dialog-footer-button:not(:last-child) {
|
716
|
+
margin-right: initial;
|
717
|
+
margin-left: 0.56rem ;
|
718
|
+
}
|
704
719
|
.arco-dialog-footer.ios {
|
705
720
|
overflow: hidden;
|
706
721
|
}
|
@@ -793,6 +808,44 @@
|
|
793
808
|
border-radius: 0;
|
794
809
|
}
|
795
810
|
}
|
811
|
+
[dir='rtl'] .arco-dialog-footer.ios:not(.collapsed):not(.type-button) .dialog-footer-button:not(:last-child) {
|
812
|
+
position: relative;
|
813
|
+
border-width: 0;
|
814
|
+
}
|
815
|
+
[dir='rtl'] .arco-dialog-footer.ios:not(.collapsed):not(.type-button) .dialog-footer-button:not(:last-child)::before {
|
816
|
+
content: '';
|
817
|
+
width: 1PX;
|
818
|
+
height: 100%;
|
819
|
+
position: absolute;
|
820
|
+
left: 0;
|
821
|
+
top: 0;
|
822
|
+
z-index: 1;
|
823
|
+
border-left-style: solid;
|
824
|
+
border-left-width: 1PX;
|
825
|
+
border-left-color: #e5e6eb;
|
826
|
+
box-sizing: border-box;
|
827
|
+
transform-origin: left top;
|
828
|
+
-webkit-transform-origin: left top;
|
829
|
+
pointer-events: none;
|
830
|
+
border-radius: 0;
|
831
|
+
}
|
832
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) {
|
833
|
+
[dir='rtl'] .arco-dialog-footer.ios:not(.collapsed):not(.type-button) .dialog-footer-button:not(:last-child)::before {
|
834
|
+
transform: scaleX(0.5);
|
835
|
+
-webkit-transform: scaleX(0.5);
|
836
|
+
border-radius: 0;
|
837
|
+
}
|
838
|
+
}
|
839
|
+
@media (-webkit-min-device-pixel-ratio: 3), (min-device-pixel-ratio: 3) {
|
840
|
+
[dir='rtl'] .arco-dialog-footer.ios:not(.collapsed):not(.type-button) .dialog-footer-button:not(:last-child)::before {
|
841
|
+
transform: scaleX(0.33333333);
|
842
|
+
-webkit-transform: scaleX(0.33333333);
|
843
|
+
border-radius: 0;
|
844
|
+
}
|
845
|
+
}
|
846
|
+
[dir='rtl'] .arco-dialog-footer.ios:not(.collapsed):not(.type-button) .dialog-footer-button:not(:last-child)::after {
|
847
|
+
display: none;
|
848
|
+
}
|
796
849
|
.arco-dialog-footer.ios.collapsed {
|
797
850
|
-webkit-box-orient: vertical;
|
798
851
|
-webkit-box-direction: normal;
|
@@ -962,6 +1015,41 @@
|
|
962
1015
|
border-radius: 0;
|
963
1016
|
}
|
964
1017
|
}
|
1018
|
+
.arco-theme-dark [dir='rtl'] .arco-dialog-footer.ios:not(.collapsed):not(.type-button) .dialog-footer-button:not(:last-child) {
|
1019
|
+
position: relative;
|
1020
|
+
border-width: 0;
|
1021
|
+
}
|
1022
|
+
.arco-theme-dark [dir='rtl'] .arco-dialog-footer.ios:not(.collapsed):not(.type-button) .dialog-footer-button:not(:last-child)::before {
|
1023
|
+
content: '';
|
1024
|
+
width: 1PX;
|
1025
|
+
height: 100%;
|
1026
|
+
position: absolute;
|
1027
|
+
left: 0;
|
1028
|
+
top: 0;
|
1029
|
+
z-index: 1;
|
1030
|
+
border-left-style: solid;
|
1031
|
+
border-left-width: 1PX;
|
1032
|
+
border-left-color: #484849;
|
1033
|
+
box-sizing: border-box;
|
1034
|
+
transform-origin: left top;
|
1035
|
+
-webkit-transform-origin: left top;
|
1036
|
+
pointer-events: none;
|
1037
|
+
border-radius: 0;
|
1038
|
+
}
|
1039
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) {
|
1040
|
+
.arco-theme-dark [dir='rtl'] .arco-dialog-footer.ios:not(.collapsed):not(.type-button) .dialog-footer-button:not(:last-child)::before {
|
1041
|
+
transform: scaleX(0.5);
|
1042
|
+
-webkit-transform: scaleX(0.5);
|
1043
|
+
border-radius: 0;
|
1044
|
+
}
|
1045
|
+
}
|
1046
|
+
@media (-webkit-min-device-pixel-ratio: 3), (min-device-pixel-ratio: 3) {
|
1047
|
+
.arco-theme-dark [dir='rtl'] .arco-dialog-footer.ios:not(.collapsed):not(.type-button) .dialog-footer-button:not(:last-child)::before {
|
1048
|
+
transform: scaleX(0.33333333);
|
1049
|
+
-webkit-transform: scaleX(0.33333333);
|
1050
|
+
border-radius: 0;
|
1051
|
+
}
|
1052
|
+
}
|
965
1053
|
.arco-theme-dark .arco-dialog-footer.ios.collapsed .dialog-footer-button {
|
966
1054
|
position: relative;
|
967
1055
|
border-width: 0;
|
@@ -147,7 +147,7 @@
|
|
147
147
|
&-body {
|
148
148
|
|
149
149
|
&.left {
|
150
|
-
text-align
|
150
|
+
.set-value-with-rtl(text-align, left);
|
151
151
|
}
|
152
152
|
|
153
153
|
&.center {
|
@@ -155,7 +155,7 @@
|
|
155
155
|
}
|
156
156
|
|
157
157
|
&.right {
|
158
|
-
text-align
|
158
|
+
.set-value-with-rtl(text-align, right);
|
159
159
|
}
|
160
160
|
}
|
161
161
|
|
@@ -185,7 +185,7 @@
|
|
185
185
|
.use-var(padding-top, dialog-android-body-footer-gutter);
|
186
186
|
.use-var(padding-bottom, dialog-android-vertical-padding);
|
187
187
|
justify-content: flex-end;
|
188
|
-
text-align
|
188
|
+
.set-value-with-rtl(text-align, right);
|
189
189
|
|
190
190
|
.dialog-footer-button {
|
191
191
|
.use-var(color, dialog-footer-android-color);
|
@@ -193,7 +193,7 @@
|
|
193
193
|
.use-var(line-height, dialog-footer-android-line-height);
|
194
194
|
|
195
195
|
&:not(:last-child) {
|
196
|
-
.use-var(margin-right, dialog-footer-android-button-gutter);
|
196
|
+
.use-var-with-rtl(margin-right, dialog-footer-android-button-gutter);
|
197
197
|
}
|
198
198
|
}
|
199
199
|
}
|
@@ -218,6 +218,13 @@
|
|
218
218
|
|
219
219
|
&:not(:last-child) {
|
220
220
|
.onepx-border-var(right, line-color);
|
221
|
+
|
222
|
+
[dir='rtl'] & {
|
223
|
+
.onepx-border-var(left, line-color);
|
224
|
+
&::after {
|
225
|
+
display: none;
|
226
|
+
}
|
227
|
+
}
|
221
228
|
}
|
222
229
|
}
|
223
230
|
}
|
@@ -332,6 +339,11 @@
|
|
332
339
|
@{arco-dark-mode-selector} & {
|
333
340
|
.onepx-border-var(right, dark-line-color);
|
334
341
|
}
|
342
|
+
[dir='rtl'] & {
|
343
|
+
@{arco-dark-mode-selector} & {
|
344
|
+
.onepx-border-var(left, dark-line-color);
|
345
|
+
}
|
346
|
+
}
|
335
347
|
}
|
336
348
|
}
|
337
349
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import { OptionsItem } from '../dropdown';
|
3
3
|
import { CascadeOptions, ValueType } from './type';
|
4
4
|
/**
|
@@ -11,11 +11,6 @@ export declare function isStringArray(options: string[] | OptionsItem[][] | Casc
|
|
11
11
|
* @en Determine if it is a nested array
|
12
12
|
* */
|
13
13
|
export declare function isCascadeArray(options: string[] | OptionsItem[][] | CascadeOptions[]): options is CascadeOptions[];
|
14
|
-
/**
|
15
|
-
* 判断是否为string类型
|
16
|
-
* @en Determine whether it is of type string
|
17
|
-
*/
|
18
|
-
export declare function isString(icon: string | ReactNode): icon is string;
|
19
14
|
/**
|
20
15
|
* 格式化传入的数组
|
21
16
|
* @en format the input array
|
@@ -16,14 +16,6 @@ export function isStringArray(options) {
|
|
16
16
|
export function isCascadeArray(options) {
|
17
17
|
return typeof options[0] === 'object' && !isArray(options[0]);
|
18
18
|
}
|
19
|
-
/**
|
20
|
-
* 判断是否为string类型
|
21
|
-
* @en Determine whether it is of type string
|
22
|
-
*/
|
23
|
-
|
24
|
-
export function isString(icon) {
|
25
|
-
return typeof icon === 'string';
|
26
|
-
}
|
27
19
|
/**
|
28
20
|
* 格式化传入的数组
|
29
21
|
* @en format the input array
|
@@ -36,6 +36,13 @@ var JsEllipsis = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
36
36
|
}
|
37
37
|
}
|
38
38
|
|
39
|
+
function getActualHeight(container) {
|
40
|
+
var _container$getBoundin = container.getBoundingClientRect(),
|
41
|
+
height = _container$getBoundin.height;
|
42
|
+
|
43
|
+
return Math.round(height);
|
44
|
+
}
|
45
|
+
|
39
46
|
function truncateText(container, textContainer, max) {
|
40
47
|
var content = textContainer.textContent || '';
|
41
48
|
var currentText = '';
|
@@ -51,11 +58,9 @@ var JsEllipsis = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
51
58
|
|
52
59
|
var temp = content.slice(l, m);
|
53
60
|
textContainer.innerText = currentText + temp;
|
61
|
+
var actualHeight = getActualHeight(container);
|
54
62
|
|
55
|
-
|
56
|
-
height = _container$getBoundin.height;
|
57
|
-
|
58
|
-
if (height > max) {
|
63
|
+
if (actualHeight > max) {
|
59
64
|
r = m;
|
60
65
|
} else {
|
61
66
|
currentText += temp;
|
@@ -76,6 +81,7 @@ var JsEllipsis = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
76
81
|
function truncateHTML(container, textContainer, max) {
|
77
82
|
// only enter this function when container overflow.
|
78
83
|
var children = textContainer.childNodes;
|
84
|
+
var actualHeight = getActualHeight(container);
|
79
85
|
|
80
86
|
if (children.length === 1) {
|
81
87
|
var node = children[0];
|
@@ -87,10 +93,7 @@ var JsEllipsis = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
87
93
|
|
88
94
|
node.innerHTML = '';
|
89
95
|
|
90
|
-
|
91
|
-
height = _container$getBoundin2.height;
|
92
|
-
|
93
|
-
if (height > max) {
|
96
|
+
if (actualHeight > max) {
|
94
97
|
// return after remove the node, if overflow with empty node.
|
95
98
|
textContainer.removeChild(node);
|
96
99
|
handleOnReflow(true, textContainer.innerHTML);
|
@@ -109,10 +112,7 @@ var JsEllipsis = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
109
112
|
while (i < nodes.length) {
|
110
113
|
textContainer.appendChild(nodes[i]);
|
111
114
|
|
112
|
-
|
113
|
-
_height = _container$getBoundin3.height;
|
114
|
-
|
115
|
-
if (_height > max) {
|
115
|
+
if (actualHeight > max) {
|
116
116
|
if (nodes[i].childNodes && nodes[i].childNodes.length) {
|
117
117
|
break;
|
118
118
|
} else {
|
@@ -152,13 +152,10 @@ var JsEllipsis = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
152
152
|
}
|
153
153
|
|
154
154
|
textRef.current.classList.remove(prefixCls + "-js-content-text-pre");
|
155
|
-
|
156
|
-
var _domRef$current$getBo = domRef.current.getBoundingClientRect(),
|
157
|
-
height = _domRef$current$getBo.height;
|
158
|
-
|
155
|
+
var actualHeight = getActualHeight(domRef.current);
|
159
156
|
var max = isNaN(Number(maxHeight)) ? lineHeightRef.current * maxLine : Number(maxHeight);
|
160
157
|
|
161
|
-
if (
|
158
|
+
if (actualHeight <= max) {
|
162
159
|
handleOnReflow(false, text);
|
163
160
|
return;
|
164
161
|
}
|
package/esm/ellipsis/index.d.ts
CHANGED
@@ -2,8 +2,8 @@ import React from 'react';
|
|
2
2
|
import { EllipsisProps, EllipsisRef } from './type';
|
3
3
|
export * from './type';
|
4
4
|
/**
|
5
|
-
*
|
6
|
-
* @en Text ellipsis component supports multi-line abbreviations, rich text, custom abbreviations, tail character filtering, etc.
|
5
|
+
* 文本缩略组件,支持多行缩略、富文本、自定义缩略符、尾字符过滤等。如果传入的文本内容中包含换行符号`\n`,建议将`\n`替换为`<br/>`,并设置`dangerouslyUseInnerHTML=true`。
|
6
|
+
* @en Text ellipsis component supports multi-line abbreviations, rich text, custom abbreviations, tail character filtering, etc. If the incoming text contains newline characters `\n`, it is recommended to replace `\n` with `<br/>`, and set `dangerouslyUseInnerHTML=true`.
|
7
7
|
* @type 信息展示
|
8
8
|
* @type_en Data Display
|
9
9
|
* @name 文本缩略
|
package/esm/ellipsis/index.js
CHANGED
@@ -6,8 +6,8 @@ import JsEllipsis from './components/js-ellipsis';
|
|
6
6
|
import NativeEllipsis from './components/native-ellipsis';
|
7
7
|
export * from './type';
|
8
8
|
/**
|
9
|
-
*
|
10
|
-
* @en Text ellipsis component supports multi-line abbreviations, rich text, custom abbreviations, tail character filtering, etc.
|
9
|
+
* 文本缩略组件,支持多行缩略、富文本、自定义缩略符、尾字符过滤等。如果传入的文本内容中包含换行符号`\n`,建议将`\n`替换为`<br/>`,并设置`dangerouslyUseInnerHTML=true`。
|
10
|
+
* @en Text ellipsis component supports multi-line abbreviations, rich text, custom abbreviations, tail character filtering, etc. If the incoming text contains newline characters `\n`, it is recommended to replace `\n` with `<br/>`, and set `dangerouslyUseInnerHTML=true`.
|
11
11
|
* @type 信息展示
|
12
12
|
* @type_en Data Display
|
13
13
|
* @name 文本缩略
|
@@ -522,6 +522,10 @@
|
|
522
522
|
-webkit-align-items: center;
|
523
523
|
align-items: center;
|
524
524
|
}
|
525
|
+
[dir="rtl"] .arco-index-bar-group-title {
|
526
|
+
padding-left: initial;
|
527
|
+
padding-right: 0.32rem ;
|
528
|
+
}
|
525
529
|
.arco-index-bar-group-item {
|
526
530
|
height: 1.08rem ;
|
527
531
|
display: -webkit-box;
|
@@ -533,6 +537,10 @@
|
|
533
537
|
margin-left: 0.32rem ;
|
534
538
|
font-size: 0.32rem ;
|
535
539
|
}
|
540
|
+
[dir="rtl"] .arco-index-bar-group-item {
|
541
|
+
margin-left: initial;
|
542
|
+
margin-right: 0.32rem ;
|
543
|
+
}
|
536
544
|
.arco-index-bar-group-item:not(:last-child) {
|
537
545
|
position: relative;
|
538
546
|
border-width: 0;
|
@@ -578,9 +586,13 @@
|
|
578
586
|
-webkit-user-select: none;
|
579
587
|
user-select: none;
|
580
588
|
}
|
581
|
-
.arco-index-bar-sidebar
|
589
|
+
[dir="rtl"] .arco-index-bar-sidebar {
|
590
|
+
right: initial;
|
582
591
|
left: 0;
|
583
592
|
}
|
593
|
+
.arco-index-bar-sidebar-touching {
|
594
|
+
width: 100%;
|
595
|
+
}
|
584
596
|
.arco-index-bar-sidebar-item {
|
585
597
|
display: -webkit-box;
|
586
598
|
display: -webkit-flex;
|
@@ -623,25 +635,36 @@
|
|
623
635
|
border-radius: 9999px;
|
624
636
|
text-align: center;
|
625
637
|
padding: 0 0.16rem ;
|
626
|
-
background:
|
638
|
+
background: #333333 ;
|
627
639
|
right: 0.72rem ;
|
628
640
|
font-size: 0.48rem ;
|
629
641
|
color: #FFFFFF ;
|
630
642
|
}
|
643
|
+
[dir="rtl"] .arco-index-bar-sidebar-sweat {
|
644
|
+
right: initial;
|
645
|
+
left: 0.72rem ;
|
646
|
+
}
|
631
647
|
.arco-index-bar-sidebar-sweat::before {
|
632
648
|
content: '';
|
633
649
|
position: absolute;
|
634
650
|
top: 0;
|
635
651
|
bottom: 0;
|
636
652
|
margin: auto;
|
637
|
-
right: -0.
|
653
|
+
right: -0.56rem ;
|
638
654
|
width: 0;
|
639
655
|
height: 0;
|
640
656
|
border: 0.36rem solid transparent ;
|
641
|
-
border:
|
642
|
-
border-left-color: rgba(0, 0, 0, 0.8) ;
|
657
|
+
border-left-color: #333333 ;
|
643
658
|
border-radius: 4px;
|
644
659
|
}
|
660
|
+
[dir="rtl"] .arco-index-bar-sidebar-sweat::before {
|
661
|
+
right: initial;
|
662
|
+
left: -0.56rem ;
|
663
|
+
}
|
664
|
+
[dir="rtl"] .arco-index-bar-sidebar-sweat::before {
|
665
|
+
border-left-color: initial;
|
666
|
+
border-right-color: #333333 ;
|
667
|
+
}
|
645
668
|
.arco-index-bar-sidebar-toast {
|
646
669
|
position: absolute;
|
647
670
|
background: rgba(0, 0, 0, 0.8) ;
|
@@ -18,7 +18,7 @@
|
|
18
18
|
.use-var(color, index-bar-group-active-color);
|
19
19
|
}
|
20
20
|
&-title {
|
21
|
-
.use-var(padding-left, index-bar-group-left-spacing);
|
21
|
+
.use-var-with-rtl(padding-left, index-bar-group-left-spacing);
|
22
22
|
.use-var(height, index-bar-group-title-height);
|
23
23
|
.use-var(background, index-bar-group-title-background);
|
24
24
|
.use-var(font-size, index-bar-group-title-font-size);
|
@@ -30,7 +30,7 @@
|
|
30
30
|
.use-var(height, index-bar-group-item-height);
|
31
31
|
display: flex;
|
32
32
|
align-items: center;
|
33
|
-
.use-var(margin-left, index-bar-group-left-spacing);
|
33
|
+
.use-var-with-rtl(margin-left, index-bar-group-left-spacing);
|
34
34
|
.use-var(font-size, index-bar-group-item-font-size);
|
35
35
|
|
36
36
|
&:not(:last-child) {
|
@@ -40,16 +40,17 @@
|
|
40
40
|
}
|
41
41
|
|
42
42
|
&-sidebar {
|
43
|
-
&-touching {
|
44
|
-
left: 0;
|
45
|
-
}
|
46
43
|
position: absolute;
|
47
44
|
z-index: 2;
|
48
|
-
right
|
45
|
+
.set-prop-with-rtl(right, 0);
|
49
46
|
top: 50%;
|
50
47
|
transform: translateY(-50%) translateZ(0);
|
51
48
|
user-select: none;
|
52
49
|
|
50
|
+
&-touching {
|
51
|
+
width: 100%;
|
52
|
+
}
|
53
|
+
|
53
54
|
&-item {
|
54
55
|
display: flex;
|
55
56
|
justify-content: flex-end;
|
@@ -84,7 +85,7 @@
|
|
84
85
|
text-align: center;
|
85
86
|
.use-var(padding, index-bar-sidebar-sweat-padding);
|
86
87
|
.use-var(background, index-bar-sidebar-sweat-background);
|
87
|
-
.use-var(right, index-bar-sidebar-sweat-right);
|
88
|
+
.use-var-with-rtl(right, index-bar-sidebar-sweat-right);
|
88
89
|
.use-var(font-size, index-bar-sidebar-sweat-font-size);
|
89
90
|
.use-var(color, index-bar-sidebar-sweat-color);
|
90
91
|
&::before {
|
@@ -93,12 +94,11 @@
|
|
93
94
|
top: 0;
|
94
95
|
bottom: 0;
|
95
96
|
margin: auto;
|
96
|
-
.use-var(right, index-bar-sidebar-sweat-triangle-position);
|
97
|
+
.use-var-with-rtl(right, index-bar-sidebar-sweat-triangle-position);
|
97
98
|
width: 0;
|
98
99
|
height: 0;
|
99
100
|
.use-var(border, index-bar-sidebar-sweat-triangle-border);
|
100
|
-
border
|
101
|
-
.use-var(border-left-color, index-bar-sidebar-sweat-background);
|
101
|
+
.use-var-with-rtl(border-left-color, index-bar-sidebar-sweat-background);
|
102
102
|
border-radius: 4px;
|
103
103
|
}
|
104
104
|
}
|
package/esm/pagination/arrow.js
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
export default function Arrow() {
|
3
3
|
return /*#__PURE__*/React.createElement("svg", {
|
4
|
-
width: "
|
4
|
+
width: "2",
|
5
5
|
height: "14",
|
6
|
-
viewBox: "
|
7
|
-
fill: "none"
|
6
|
+
viewBox: "3 0 2 14",
|
7
|
+
fill: "none",
|
8
|
+
style: {
|
9
|
+
overflow: 'visible'
|
10
|
+
}
|
8
11
|
}, /*#__PURE__*/React.createElement("path", {
|
9
12
|
fillRule: "evenodd",
|
10
13
|
clipRule: "evenodd",
|
@@ -527,6 +527,10 @@
|
|
527
527
|
justify-content: flex-end;
|
528
528
|
margin-right: 0.48rem ;
|
529
529
|
}
|
530
|
+
[dir="rtl"] .arco-pagination-prev-field.flex-center {
|
531
|
+
margin-right: initial;
|
532
|
+
margin-left: 0.48rem ;
|
533
|
+
}
|
530
534
|
.arco-pagination-next-field {
|
531
535
|
-webkit-box-pack: end;
|
532
536
|
-webkit-justify-content: flex-end;
|
@@ -538,6 +542,10 @@
|
|
538
542
|
justify-content: flex-start;
|
539
543
|
margin-left: 0.48rem ;
|
540
544
|
}
|
545
|
+
[dir="rtl"] .arco-pagination-next-field.flex-center {
|
546
|
+
margin-left: initial;
|
547
|
+
margin-right: 0.48rem ;
|
548
|
+
}
|
541
549
|
.arco-pagination-field {
|
542
550
|
cursor: pointer;
|
543
551
|
text-align: center;
|
@@ -572,10 +580,18 @@
|
|
572
580
|
-webkit-align-items: center;
|
573
581
|
align-items: center;
|
574
582
|
}
|
583
|
+
[dir="rtl"] .arco-pagination-field .btn-icon {
|
584
|
+
-webkit-transform: scaleX(-1);
|
585
|
+
transform: scaleX(-1);
|
586
|
+
}
|
575
587
|
.arco-pagination-field .btn-icon.next {
|
576
588
|
-webkit-transform: rotateY(180deg);
|
577
589
|
transform: rotateY(180deg);
|
578
590
|
}
|
591
|
+
[dir="rtl"] .arco-pagination-field .btn-icon.next {
|
592
|
+
-webkit-transform: none;
|
593
|
+
transform: none;
|
594
|
+
}
|
579
595
|
.arco-pagination-field.button {
|
580
596
|
padding: 0.12rem 0.32rem ;
|
581
597
|
border-radius: 0.04rem ;
|
@@ -592,13 +608,12 @@
|
|
592
608
|
}
|
593
609
|
.arco-pagination-field.button .btn-icon + .btn-text,
|
594
610
|
.arco-pagination-field.button .btn-text + .btn-icon {
|
595
|
-
margin-left: 0.
|
596
|
-
}
|
597
|
-
.arco-pagination-field.button .btn-icon:first-child {
|
598
|
-
margin-left: -0.06rem ;
|
611
|
+
margin-left: 0.22rem ;
|
599
612
|
}
|
600
|
-
.arco-pagination-field.button .btn-icon
|
601
|
-
|
613
|
+
[dir="rtl"] .arco-pagination-field.button .btn-icon + .btn-text,
|
614
|
+
[dir="rtl"] .arco-pagination-field.button .btn-text + .btn-icon {
|
615
|
+
margin-left: initial;
|
616
|
+
margin-right: 0.22rem ;
|
602
617
|
}
|
603
618
|
.arco-pagination.android .arco-pagination-field.button .btn-text {
|
604
619
|
padding-top: 0.04rem;
|
@@ -16,14 +16,14 @@
|
|
16
16
|
justify-content: flex-start;
|
17
17
|
&.flex-center {
|
18
18
|
justify-content: flex-end;
|
19
|
-
.use-var(margin-right, pagination-center-field-gutter);
|
19
|
+
.use-var-with-rtl(margin-right, pagination-center-field-gutter);
|
20
20
|
}
|
21
21
|
}
|
22
22
|
&-next-field {
|
23
23
|
justify-content: flex-end;
|
24
24
|
&.flex-center {
|
25
25
|
justify-content: flex-start;
|
26
|
-
.use-var(margin-left, pagination-center-field-gutter);
|
26
|
+
.use-var-with-rtl(margin-left, pagination-center-field-gutter);
|
27
27
|
}
|
28
28
|
}
|
29
29
|
|
@@ -41,8 +41,14 @@
|
|
41
41
|
.btn-icon {
|
42
42
|
display: inline-flex;
|
43
43
|
align-items: center;
|
44
|
+
[dir="rtl"] & {
|
45
|
+
transform: scaleX(-1);
|
46
|
+
}
|
44
47
|
&.next {
|
45
48
|
transform: rotateY(180deg);
|
49
|
+
[dir="rtl"] & {
|
50
|
+
transform: none;
|
51
|
+
}
|
46
52
|
}
|
47
53
|
}
|
48
54
|
}
|
@@ -61,13 +67,7 @@
|
|
61
67
|
}
|
62
68
|
.btn-icon + .btn-text,
|
63
69
|
.btn-text + .btn-icon {
|
64
|
-
.use-var(margin-left, pagination-field-btn-icon-text-gutter);
|
65
|
-
}
|
66
|
-
.btn-icon:first-child {
|
67
|
-
.use-var(margin-left, pagination-field-btn-icon-side-margin);
|
68
|
-
}
|
69
|
-
.btn-icon:last-child {
|
70
|
-
.use-var(margin-right, pagination-field-btn-icon-side-margin);
|
70
|
+
.use-var-with-rtl(margin-left, pagination-field-btn-icon-text-gutter);
|
71
71
|
}
|
72
72
|
}
|
73
73
|
&.android &-field.button {
|