@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.
Files changed (106) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/cjs/checkbox/style/css/index.css +3 -0
  5. package/cjs/checkbox/style/index.less +5 -0
  6. package/cjs/date-picker/index.js +46 -29
  7. package/cjs/dialog/style/css/index.css +88 -0
  8. package/cjs/dialog/style/index.less +16 -4
  9. package/cjs/dropdown-menu/helper.d.ts +1 -6
  10. package/cjs/dropdown-menu/helper.js +0 -10
  11. package/cjs/ellipsis/components/js-ellipsis.js +14 -17
  12. package/cjs/ellipsis/index.d.ts +2 -2
  13. package/cjs/ellipsis/index.js +2 -2
  14. package/cjs/image-preview/index.js +1 -0
  15. package/cjs/index-bar/style/css/index.css +28 -5
  16. package/cjs/index-bar/style/index.less +10 -10
  17. package/cjs/pagination/arrow.js +6 -3
  18. package/cjs/pagination/style/css/index.css +21 -6
  19. package/cjs/pagination/style/index.less +9 -9
  20. package/cjs/picker/style/css/index.css +8 -0
  21. package/cjs/picker/style/index.less +2 -2
  22. package/cjs/progress/style/css/index.css +20 -0
  23. package/cjs/progress/style/index.less +5 -5
  24. package/cjs/radio/style/css/index.css +3 -0
  25. package/cjs/radio/style/index.less +5 -0
  26. package/cjs/search-bar/style/css/index.css +18 -0
  27. package/cjs/search-bar/style/index.less +5 -5
  28. package/cjs/show-monitor/index.d.ts +5 -0
  29. package/cjs/show-monitor/index.js +1 -0
  30. package/cjs/slider/hooks/index.d.ts +1 -1
  31. package/cjs/slider/index.d.ts +10 -0
  32. package/cjs/slider/index.js +1 -0
  33. package/cjs/slider/thumb.d.ts +6 -5
  34. package/cjs/slider/thumb.js +19 -20
  35. package/dist/index.js +86 -57
  36. package/dist/index.min.js +2 -2
  37. package/dist/style.css +152 -11
  38. package/dist/style.min.css +1 -1
  39. package/esm/checkbox/style/css/index.css +3 -0
  40. package/esm/checkbox/style/index.less +5 -0
  41. package/esm/date-picker/index.js +44 -26
  42. package/esm/dialog/style/css/index.css +88 -0
  43. package/esm/dialog/style/index.less +16 -4
  44. package/esm/dropdown-menu/helper.d.ts +1 -6
  45. package/esm/dropdown-menu/helper.js +0 -8
  46. package/esm/ellipsis/components/js-ellipsis.js +14 -17
  47. package/esm/ellipsis/index.d.ts +2 -2
  48. package/esm/ellipsis/index.js +2 -2
  49. package/esm/image-preview/index.js +1 -0
  50. package/esm/index-bar/style/css/index.css +28 -5
  51. package/esm/index-bar/style/index.less +10 -10
  52. package/esm/pagination/arrow.js +6 -3
  53. package/esm/pagination/style/css/index.css +21 -6
  54. package/esm/pagination/style/index.less +9 -9
  55. package/esm/picker/style/css/index.css +8 -0
  56. package/esm/picker/style/index.less +2 -2
  57. package/esm/progress/style/css/index.css +20 -0
  58. package/esm/progress/style/index.less +5 -5
  59. package/esm/radio/style/css/index.css +3 -0
  60. package/esm/radio/style/index.less +5 -0
  61. package/esm/search-bar/style/css/index.css +18 -0
  62. package/esm/search-bar/style/index.less +5 -5
  63. package/esm/show-monitor/index.d.ts +5 -0
  64. package/esm/show-monitor/index.js +1 -0
  65. package/esm/slider/hooks/index.d.ts +1 -1
  66. package/esm/slider/index.d.ts +10 -0
  67. package/esm/slider/index.js +1 -0
  68. package/esm/slider/thumb.d.ts +6 -5
  69. package/esm/slider/thumb.js +19 -17
  70. package/package.json +3 -3
  71. package/tokens/app/arcodesign/default/css-variables.less +3 -4
  72. package/tokens/app/arcodesign/default/index.d.ts +0 -1
  73. package/tokens/app/arcodesign/default/index.js +3 -4
  74. package/tokens/app/arcodesign/default/index.json +9 -21
  75. package/tokens/app/arcodesign/default/index.less +3 -4
  76. package/umd/checkbox/style/css/index.css +3 -0
  77. package/umd/checkbox/style/index.less +5 -0
  78. package/umd/date-picker/index.js +47 -30
  79. package/umd/dialog/style/css/index.css +88 -0
  80. package/umd/dialog/style/index.less +16 -4
  81. package/umd/dropdown-menu/helper.d.ts +1 -6
  82. package/umd/dropdown-menu/helper.js +0 -10
  83. package/umd/ellipsis/components/js-ellipsis.js +14 -17
  84. package/umd/ellipsis/index.d.ts +2 -2
  85. package/umd/ellipsis/index.js +2 -2
  86. package/umd/image-preview/index.js +1 -0
  87. package/umd/index-bar/style/css/index.css +28 -5
  88. package/umd/index-bar/style/index.less +10 -10
  89. package/umd/pagination/arrow.js +6 -3
  90. package/umd/pagination/style/css/index.css +21 -6
  91. package/umd/pagination/style/index.less +9 -9
  92. package/umd/picker/style/css/index.css +8 -0
  93. package/umd/picker/style/index.less +2 -2
  94. package/umd/progress/style/css/index.css +20 -0
  95. package/umd/progress/style/index.less +5 -5
  96. package/umd/radio/style/css/index.css +3 -0
  97. package/umd/radio/style/index.less +5 -0
  98. package/umd/search-bar/style/css/index.css +18 -0
  99. package/umd/search-bar/style/index.less +5 -5
  100. package/umd/show-monitor/index.d.ts +5 -0
  101. package/umd/show-monitor/index.js +1 -0
  102. package/umd/slider/hooks/index.d.ts +1 -1
  103. package/umd/slider/index.d.ts +10 -0
  104. package/umd/slider/index.js +1 -0
  105. package/umd/slider/thumb.d.ts +6 -5
  106. package/umd/slider/thumb.js +23 -23
@@ -10,7 +10,7 @@
10
10
  factory(mod.exports, global._extends, global.objectWithoutPropertiesLoose, global.react, global.mobileUtils, global.picker, global.contextProvider, global.helper, global.type);
11
11
  global.index = mod.exports;
12
12
  }
13
- })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _extends2, _objectWithoutPropertiesLoose2, _react, _mobileUtils, _picker, _contextProvider, _helper, _type) {
13
+ })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _extends4, _objectWithoutPropertiesLoose2, _react, _mobileUtils, _picker, _contextProvider, _helper, _type) {
14
14
  "use strict";
15
15
 
16
16
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -20,7 +20,7 @@
20
20
  YEAR: true
21
21
  };
22
22
  _exports.default = _exports.YEAR = void 0;
23
- _extends2 = _interopRequireDefault(_extends2);
23
+ _extends4 = _interopRequireDefault(_extends4);
24
24
  _objectWithoutPropertiesLoose2 = _interopRequireDefault(_objectWithoutPropertiesLoose2);
25
25
  _react = _interopRequireWildcard(_react);
26
26
  _picker = _interopRequireDefault(_picker);
@@ -100,10 +100,8 @@
100
100
  });
101
101
 
102
102
  function _getColumns() {
103
- var dateObj = {};
104
- allTypes.forEach(function (type) {
105
- dateObj[type] = _getActualArray(type, currentDateObjRef.current);
106
- });
103
+ var dateObj = _getActualArray();
104
+
107
105
  var columns = keyOptions.map(function (opt) {
108
106
  return dateObj[opt];
109
107
  });
@@ -147,32 +145,51 @@
147
145
  // @en Dynamically change the options of other columns based on the currently selected date
148
146
 
149
147
 
150
- function _getActualArray(type, nowDateObj) {
151
- var normalRange = _getNormalRange(type, nowDateObj);
152
-
153
- var range = [];
154
-
155
- switch (type) {
156
- case 'year':
157
- range = [minDateObjRef.current.year, maxDateObjRef.current.year];
158
- break;
159
-
160
- default:
161
- {
162
- var checkKeys = allTypes.slice(0, allTypes.indexOf(type));
163
- range = normalRange;
164
-
165
- if ((0, _helper.judgeObj)(nowDateObj, minDateObjRef.current, checkKeys)) {
166
- range[0] = minDateObjRef.current[type];
167
- }
148
+ function _getActualArray() {
149
+ var dateObj = {}; // 当前时间对象
150
+ // @en current Date object
168
151
 
169
- if ((0, _helper.judgeObj)(nowDateObj, maxDateObjRef.current, checkKeys)) {
170
- range[range.length - 1] = maxDateObjRef.current[type];
152
+ var currentDateObj = (0, _extends4.default)({}, currentDateObjRef.current);
153
+ allTypes.forEach(function (type) {
154
+ // 根据日期类型,计算出默认的日期范围
155
+ // @en According to the date type, calculate the default date range.
156
+ var normalRange = _getNormalRange(type, currentDateObj);
157
+
158
+ var range = [];
159
+
160
+ switch (type) {
161
+ case 'year':
162
+ // 默认使用minTs和maxTs年份区间
163
+ // @en Default use minTs and maxTs years.
164
+ range = [minDateObjRef.current.year, maxDateObjRef.current.year];
165
+ break;
166
+
167
+ default:
168
+ {
169
+ // 除了年份外,其他日期类型都需要判断上一级日期是否相同
170
+ // @en In addition to the year, other date types need to check if the upper-level date is the same.
171
+ var checkKeys = allTypes.slice(0, allTypes.indexOf(type));
172
+ range = normalRange;
173
+
174
+ if ((0, _helper.judgeObj)(currentDateObj, minDateObjRef.current, checkKeys)) {
175
+ var _extends2;
176
+
177
+ range[0] = minDateObjRef.current[type];
178
+ currentDateObj = (0, _extends4.default)({}, currentDateObj, (_extends2 = {}, _extends2[type] = Math.max(minDateObjRef.current[type], currentDateObj[type]), _extends2));
179
+ }
180
+
181
+ if ((0, _helper.judgeObj)(currentDateObj, maxDateObjRef.current, checkKeys)) {
182
+ var _extends3;
183
+
184
+ range[range.length - 1] = maxDateObjRef.current[type];
185
+ currentDateObj = (0, _extends4.default)({}, currentDateObj, (_extends3 = {}, _extends3[type] = Math.min(maxDateObjRef.current[type], currentDateObj[type]), _extends3));
186
+ }
171
187
  }
172
- }
173
- }
188
+ }
174
189
 
175
- return _convertRangeToArr(type, range);
190
+ dateObj[type] = _convertRangeToArr(type, range);
191
+ });
192
+ return dateObj;
176
193
  }
177
194
 
178
195
  function _convertRangeToArr(type, range) {
@@ -320,7 +337,7 @@
320
337
  }, [visible]);
321
338
  return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, function (_ref) {
322
339
  var prefixCls = _ref.prefixCls;
323
- return /*#__PURE__*/_react.default.createElement(_picker.default, (0, _extends2.default)({}, otherProps, {
340
+ return /*#__PURE__*/_react.default.createElement(_picker.default, (0, _extends4.default)({}, otherProps, {
324
341
  ref: pickerRef,
325
342
  visible: visible,
326
343
  className: (0, _mobileUtils.cls)(className, prefixCls + "-date-picker"),
@@ -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: left;
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: right;
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: right;
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, { ReactNode } from '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
@@ -19,7 +19,6 @@
19
19
  _exports.getFormattedOptions = void 0;
20
20
  _exports.isCascadeArray = isCascadeArray;
21
21
  _exports.isRefDom = _exports.isClassNameDom = void 0;
22
- _exports.isString = isString;
23
22
  _exports.isStringArray = isStringArray;
24
23
  _extends2 = _interopRequireDefault(_extends2);
25
24
 
@@ -39,15 +38,6 @@
39
38
  function isCascadeArray(options) {
40
39
  return typeof options[0] === 'object' && !(0, _mobileUtils.isArray)(options[0]);
41
40
  }
42
- /**
43
- * 判断是否为string类型
44
- * @en Determine whether it is of type string
45
- */
46
-
47
-
48
- function isString(icon) {
49
- return typeof icon === 'string';
50
- }
51
41
  /**
52
42
  * 格式化传入的数组
53
43
  * @en format the input array
@@ -59,6 +59,13 @@
59
59
  }
60
60
  }
61
61
 
62
+ function getActualHeight(container) {
63
+ var _container$getBoundin = container.getBoundingClientRect(),
64
+ height = _container$getBoundin.height;
65
+
66
+ return Math.round(height);
67
+ }
68
+
62
69
  function truncateText(container, textContainer, max) {
63
70
  var content = textContainer.textContent || '';
64
71
  var currentText = '';
@@ -74,11 +81,9 @@
74
81
 
75
82
  var temp = content.slice(l, m);
76
83
  textContainer.innerText = currentText + temp;
84
+ var actualHeight = getActualHeight(container);
77
85
 
78
- var _container$getBoundin = container.getBoundingClientRect(),
79
- height = _container$getBoundin.height;
80
-
81
- if (height > max) {
86
+ if (actualHeight > max) {
82
87
  r = m;
83
88
  } else {
84
89
  currentText += temp;
@@ -99,6 +104,7 @@
99
104
  function truncateHTML(container, textContainer, max) {
100
105
  // only enter this function when container overflow.
101
106
  var children = textContainer.childNodes;
107
+ var actualHeight = getActualHeight(container);
102
108
 
103
109
  if (children.length === 1) {
104
110
  var node = children[0];
@@ -110,10 +116,7 @@
110
116
 
111
117
  node.innerHTML = '';
112
118
 
113
- var _container$getBoundin2 = container.getBoundingClientRect(),
114
- height = _container$getBoundin2.height;
115
-
116
- if (height > max) {
119
+ if (actualHeight > max) {
117
120
  // return after remove the node, if overflow with empty node.
118
121
  textContainer.removeChild(node);
119
122
  handleOnReflow(true, textContainer.innerHTML);
@@ -132,10 +135,7 @@
132
135
  while (i < nodes.length) {
133
136
  textContainer.appendChild(nodes[i]);
134
137
 
135
- var _container$getBoundin3 = container.getBoundingClientRect(),
136
- _height = _container$getBoundin3.height;
137
-
138
- if (_height > max) {
138
+ if (actualHeight > max) {
139
139
  if (nodes[i].childNodes && nodes[i].childNodes.length) {
140
140
  break;
141
141
  } else {
@@ -175,13 +175,10 @@
175
175
  }
176
176
 
177
177
  textRef.current.classList.remove(prefixCls + "-js-content-text-pre");
178
-
179
- var _domRef$current$getBo = domRef.current.getBoundingClientRect(),
180
- height = _domRef$current$getBo.height;
181
-
178
+ var actualHeight = getActualHeight(domRef.current);
182
179
  var max = isNaN(Number(maxHeight)) ? lineHeightRef.current * maxLine : Number(maxHeight);
183
180
 
184
- if (height <= max) {
181
+ if (actualHeight <= max) {
185
182
  handleOnReflow(false, text);
186
183
  return;
187
184
  }
@@ -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 文本缩略
@@ -33,8 +33,8 @@
33
33
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
34
34
 
35
35
  /**
36
- * 文本缩略组件,支持多行缩略、富文本、自定义缩略符、尾字符过滤等。
37
- * @en Text ellipsis component supports multi-line abbreviations, rich text, custom abbreviations, tail character filtering, etc.
36
+ * 文本缩略组件,支持多行缩略、富文本、自定义缩略符、尾字符过滤等。如果传入的文本内容中包含换行符号`\n`,建议将`\n`替换为`<br/>`,并设置`dangerouslyUseInnerHTML=true`。
37
+ * @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`.
38
38
  * @type 信息展示
39
39
  * @type_en Data Display
40
40
  * @name 文本缩略
@@ -258,6 +258,7 @@
258
258
  dragMode: 'always',
259
259
  transformMode: 'matrix',
260
260
  useDomBoundary: false,
261
+ preventScroll: false,
261
262
  cubic: {
262
263
  scroll: scrollBezier
263
264
  },
@@ -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-touching {
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: rgba(0, 0, 0, 0.8) ;
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.54rem ;
653
+ right: -0.56rem ;
638
654
  width: 0;
639
655
  height: 0;
640
656
  border: 0.36rem solid transparent ;
641
- border: 18px solid transparent;
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: 0;
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: 18px solid transparent;
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
  }
@@ -21,10 +21,13 @@
21
21
 
22
22
  function Arrow() {
23
23
  return /*#__PURE__*/_react.default.createElement("svg", {
24
- width: "8",
24
+ width: "2",
25
25
  height: "14",
26
- viewBox: "0 0 8 14",
27
- fill: "none"
26
+ viewBox: "3 0 2 14",
27
+ fill: "none",
28
+ style: {
29
+ overflow: 'visible'
30
+ }
28
31
  }, /*#__PURE__*/_react.default.createElement("path", {
29
32
  fillRule: "evenodd",
30
33
  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.16rem ;
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:last-child {
601
- margin-right: -0.06rem ;
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;