@arco-design/mobile-react 2.31.0 → 2.31.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.
Files changed (202) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/cjs/action-sheet/style/css/index.css +50 -34
  5. package/cjs/avatar/style/css/index.css +50 -34
  6. package/cjs/badge/style/css/index.css +50 -34
  7. package/cjs/button/style/css/index.css +50 -34
  8. package/cjs/carousel/style/css/index.css +50 -34
  9. package/cjs/cell/style/css/index.css +50 -34
  10. package/cjs/cell/style/index.less +2 -2
  11. package/cjs/checkbox/style/css/index.css +50 -34
  12. package/cjs/circle-progress/style/css/index.css +50 -34
  13. package/cjs/collapse/style/css/index.css +50 -34
  14. package/cjs/count-down/style/css/index.css +50 -34
  15. package/cjs/date-picker/style/css/index.css +50 -34
  16. package/cjs/dialog/style/css/index.css +50 -34
  17. package/cjs/divider/style/css/index.css +50 -34
  18. package/cjs/dropdown/style/css/index.css +50 -34
  19. package/cjs/dropdown-menu/style/css/index.css +50 -34
  20. package/cjs/ellipsis/style/css/index.css +50 -34
  21. package/cjs/form/style/css/index.css +50 -34
  22. package/cjs/grid/style/css/index.css +50 -34
  23. package/cjs/image/style/css/index.css +50 -34
  24. package/cjs/image-picker/style/css/index.css +50 -34
  25. package/cjs/image-preview/style/css/index.css +50 -34
  26. package/cjs/index-bar/style/css/index.css +50 -34
  27. package/cjs/input/style/css/index.css +50 -34
  28. package/cjs/keyboard/style/css/index.css +50 -34
  29. package/cjs/load-more/style/css/index.css +50 -34
  30. package/cjs/loading/style/css/index.css +50 -34
  31. package/cjs/masking/style/css/index.css +50 -34
  32. package/cjs/nav-bar/style/css/index.css +50 -34
  33. package/cjs/notice-bar/style/css/index.css +50 -34
  34. package/cjs/notice-bar/style/index.less +2 -2
  35. package/cjs/notify/style/css/index.css +50 -34
  36. package/cjs/pagination/style/css/index.css +50 -34
  37. package/cjs/pagination/style/index.less +4 -4
  38. package/cjs/picker/style/css/index.css +50 -34
  39. package/cjs/picker-view/style/css/index.css +50 -34
  40. package/cjs/popover/style/css/index.css +50 -34
  41. package/cjs/popover/style/css/menu.css +50 -34
  42. package/cjs/popup/style/css/index.css +50 -34
  43. package/cjs/popup-swiper/style/css/index.css +50 -34
  44. package/cjs/progress/style/css/index.css +50 -34
  45. package/cjs/pull-refresh/style/css/index.css +50 -34
  46. package/cjs/radio/style/css/index.css +50 -34
  47. package/cjs/rate/style/css/index.css +50 -34
  48. package/cjs/rate/style/index.less +2 -2
  49. package/cjs/search-bar/style/css/index.css +50 -34
  50. package/cjs/skeleton/style/css/index.css +50 -34
  51. package/cjs/skeleton/style/index.less +2 -2
  52. package/cjs/slider/style/css/index.css +50 -34
  53. package/cjs/slider/style/index.less +6 -6
  54. package/cjs/stepper/style/css/index.css +50 -34
  55. package/cjs/steps/style/css/index.css +50 -34
  56. package/cjs/sticky/style/css/index.css +50 -34
  57. package/cjs/swipe-action/style/css/index.css +50 -34
  58. package/cjs/swipe-load/style/css/index.css +50 -34
  59. package/cjs/switch/style/css/index.css +50 -34
  60. package/cjs/switch/style/index.less +8 -8
  61. package/cjs/tab-bar/style/css/index.css +50 -34
  62. package/cjs/tabs/style/css/index.css +50 -34
  63. package/cjs/tag/style/css/index.css +50 -34
  64. package/cjs/textarea/style/css/index.css +50 -34
  65. package/cjs/toast/style/css/index.css +50 -34
  66. package/cjs/transition/style/css/index.css +50 -34
  67. package/cjs/uploader/style/css/index.css +50 -34
  68. package/dist/index.js +9 -8
  69. package/dist/index.min.js +2 -2
  70. package/dist/style.css +3143 -2231
  71. package/esm/action-sheet/style/css/index.css +50 -34
  72. package/esm/avatar/style/css/index.css +50 -34
  73. package/esm/badge/style/css/index.css +50 -34
  74. package/esm/button/style/css/index.css +50 -34
  75. package/esm/carousel/style/css/index.css +50 -34
  76. package/esm/cell/style/css/index.css +50 -34
  77. package/esm/cell/style/index.less +2 -2
  78. package/esm/checkbox/style/css/index.css +50 -34
  79. package/esm/circle-progress/style/css/index.css +50 -34
  80. package/esm/collapse/style/css/index.css +50 -34
  81. package/esm/count-down/style/css/index.css +50 -34
  82. package/esm/date-picker/style/css/index.css +50 -34
  83. package/esm/dialog/style/css/index.css +50 -34
  84. package/esm/divider/style/css/index.css +50 -34
  85. package/esm/dropdown/style/css/index.css +50 -34
  86. package/esm/dropdown-menu/style/css/index.css +50 -34
  87. package/esm/ellipsis/style/css/index.css +50 -34
  88. package/esm/form/style/css/index.css +50 -34
  89. package/esm/grid/style/css/index.css +50 -34
  90. package/esm/image/style/css/index.css +50 -34
  91. package/esm/image-picker/style/css/index.css +50 -34
  92. package/esm/image-preview/style/css/index.css +50 -34
  93. package/esm/index-bar/style/css/index.css +50 -34
  94. package/esm/input/style/css/index.css +50 -34
  95. package/esm/keyboard/style/css/index.css +50 -34
  96. package/esm/load-more/style/css/index.css +50 -34
  97. package/esm/loading/style/css/index.css +50 -34
  98. package/esm/masking/style/css/index.css +50 -34
  99. package/esm/nav-bar/style/css/index.css +50 -34
  100. package/esm/notice-bar/style/css/index.css +50 -34
  101. package/esm/notice-bar/style/index.less +2 -2
  102. package/esm/notify/style/css/index.css +50 -34
  103. package/esm/pagination/style/css/index.css +50 -34
  104. package/esm/pagination/style/index.less +4 -4
  105. package/esm/picker/style/css/index.css +50 -34
  106. package/esm/picker-view/style/css/index.css +50 -34
  107. package/esm/popover/style/css/index.css +50 -34
  108. package/esm/popover/style/css/menu.css +50 -34
  109. package/esm/popup/style/css/index.css +50 -34
  110. package/esm/popup-swiper/style/css/index.css +50 -34
  111. package/esm/progress/style/css/index.css +50 -34
  112. package/esm/pull-refresh/style/css/index.css +50 -34
  113. package/esm/radio/style/css/index.css +50 -34
  114. package/esm/rate/style/css/index.css +50 -34
  115. package/esm/rate/style/index.less +2 -2
  116. package/esm/search-bar/style/css/index.css +50 -34
  117. package/esm/skeleton/style/css/index.css +50 -34
  118. package/esm/skeleton/style/index.less +2 -2
  119. package/esm/slider/style/css/index.css +50 -34
  120. package/esm/slider/style/index.less +6 -6
  121. package/esm/stepper/style/css/index.css +50 -34
  122. package/esm/steps/style/css/index.css +50 -34
  123. package/esm/sticky/style/css/index.css +50 -34
  124. package/esm/swipe-action/style/css/index.css +50 -34
  125. package/esm/swipe-load/style/css/index.css +50 -34
  126. package/esm/switch/style/css/index.css +50 -34
  127. package/esm/switch/style/index.less +8 -8
  128. package/esm/tab-bar/style/css/index.css +50 -34
  129. package/esm/tabs/style/css/index.css +50 -34
  130. package/esm/tag/style/css/index.css +50 -34
  131. package/esm/textarea/style/css/index.css +50 -34
  132. package/esm/toast/style/css/index.css +50 -34
  133. package/esm/transition/style/css/index.css +50 -34
  134. package/esm/uploader/style/css/index.css +50 -34
  135. package/package.json +3 -6
  136. package/style/css/public.css +50 -34
  137. package/tokens/mixin/index.less +80 -3
  138. package/tokens/mixin/vars-switch.less +1 -0
  139. package/umd/action-sheet/style/css/index.css +50 -34
  140. package/umd/avatar/style/css/index.css +50 -34
  141. package/umd/badge/style/css/index.css +50 -34
  142. package/umd/button/style/css/index.css +50 -34
  143. package/umd/carousel/style/css/index.css +50 -34
  144. package/umd/cell/style/css/index.css +50 -34
  145. package/umd/cell/style/index.less +2 -2
  146. package/umd/checkbox/style/css/index.css +50 -34
  147. package/umd/circle-progress/style/css/index.css +50 -34
  148. package/umd/collapse/style/css/index.css +50 -34
  149. package/umd/count-down/style/css/index.css +50 -34
  150. package/umd/date-picker/style/css/index.css +50 -34
  151. package/umd/dialog/style/css/index.css +50 -34
  152. package/umd/divider/style/css/index.css +50 -34
  153. package/umd/dropdown/style/css/index.css +50 -34
  154. package/umd/dropdown-menu/style/css/index.css +50 -34
  155. package/umd/ellipsis/style/css/index.css +50 -34
  156. package/umd/form/style/css/index.css +50 -34
  157. package/umd/grid/style/css/index.css +50 -34
  158. package/umd/image/style/css/index.css +50 -34
  159. package/umd/image-picker/style/css/index.css +50 -34
  160. package/umd/image-preview/style/css/index.css +50 -34
  161. package/umd/index-bar/style/css/index.css +50 -34
  162. package/umd/input/style/css/index.css +50 -34
  163. package/umd/keyboard/style/css/index.css +50 -34
  164. package/umd/load-more/style/css/index.css +50 -34
  165. package/umd/loading/style/css/index.css +50 -34
  166. package/umd/masking/style/css/index.css +50 -34
  167. package/umd/nav-bar/style/css/index.css +50 -34
  168. package/umd/notice-bar/style/css/index.css +50 -34
  169. package/umd/notice-bar/style/index.less +2 -2
  170. package/umd/notify/style/css/index.css +50 -34
  171. package/umd/pagination/style/css/index.css +50 -34
  172. package/umd/pagination/style/index.less +4 -4
  173. package/umd/picker/style/css/index.css +50 -34
  174. package/umd/picker-view/style/css/index.css +50 -34
  175. package/umd/popover/style/css/index.css +50 -34
  176. package/umd/popover/style/css/menu.css +50 -34
  177. package/umd/popup/style/css/index.css +50 -34
  178. package/umd/popup-swiper/style/css/index.css +50 -34
  179. package/umd/progress/style/css/index.css +50 -34
  180. package/umd/pull-refresh/style/css/index.css +50 -34
  181. package/umd/radio/style/css/index.css +50 -34
  182. package/umd/rate/style/css/index.css +50 -34
  183. package/umd/rate/style/index.less +2 -2
  184. package/umd/search-bar/style/css/index.css +50 -34
  185. package/umd/skeleton/style/css/index.css +50 -34
  186. package/umd/skeleton/style/index.less +2 -2
  187. package/umd/slider/style/css/index.css +50 -34
  188. package/umd/slider/style/index.less +6 -6
  189. package/umd/stepper/style/css/index.css +50 -34
  190. package/umd/steps/style/css/index.css +50 -34
  191. package/umd/sticky/style/css/index.css +50 -34
  192. package/umd/swipe-action/style/css/index.css +50 -34
  193. package/umd/swipe-load/style/css/index.css +50 -34
  194. package/umd/switch/style/css/index.css +50 -34
  195. package/umd/switch/style/index.less +8 -8
  196. package/umd/tab-bar/style/css/index.css +50 -34
  197. package/umd/tabs/style/css/index.css +50 -34
  198. package/umd/tag/style/css/index.css +50 -34
  199. package/umd/textarea/style/css/index.css +50 -34
  200. package/umd/toast/style/css/index.css +50 -34
  201. package/umd/transition/style/css/index.css +50 -34
  202. package/umd/uploader/style/css/index.css +50 -34
@@ -95,6 +95,56 @@
95
95
  * }
96
96
  * ```
97
97
  */
98
+ /**
99
+ * 设置涉及左右相关的属性名,在rtl模式下自动替换为相反的属性名
100
+ * @desc {en} set the property name related to left and right, and automatically replace it with the opposite attribute name in rtl mode
101
+ * @param @property css属性名
102
+ * @param @property {en} css property
103
+ * @param @value css属性值
104
+ * @param @value {en} css property value
105
+ * @param @rules 自定义的复写规则,默认重置为initial
106
+ * @param @rules {en} customized rewrite rules, default to initial
107
+ * @example
108
+ * ```
109
+ * @import '@arco-design/mobile-utils/style/mixin.less';
110
+ *
111
+ * .demo {
112
+ * .set-prop-with-rtl(right, auto);
113
+ * }
114
+ * ```
115
+ */
116
+ /**
117
+ * 设置涉及左右相关的属性值,在rtl模式下自动替换为相反的属性值
118
+ * @desc {en} set the property value related to left and right, and automatically replace it with the opposite attribute value in rtl mode
119
+ * @param @property css属性名
120
+ * @param @property {en} css property
121
+ * @param @value css属性值
122
+ * @param @value {en} css property value
123
+ * @example
124
+ * ```
125
+ * @import '@arco-design/mobile-utils/style/mixin.less';
126
+ *
127
+ * .demo {
128
+ * .set-value-with-rtl(text-align, left);
129
+ * }
130
+ * ```
131
+ */
132
+ /**
133
+ * 在 rtl 模式下,自定义样式规则
134
+ * @desc {en} custom style in RTL mode
135
+ * @param @rules 对应的rtl模式下的规则
136
+ * @param @rules {en} property with rtl
137
+ * @example
138
+ * ```
139
+ * @import '@arco-design/mobile-react/style/mixin.less';
140
+ *
141
+ * .demo {
142
+ * .style-with-rtl({
143
+ * transform: scale(-1);
144
+ * });
145
+ * }
146
+ * ```
147
+ */
98
148
  /**
99
149
  * 0.5px 的边框线
100
150
  * @desc {en} a border line of 0.5 pixels
@@ -396,40 +446,6 @@
396
446
  * }
397
447
  * ```
398
448
  */
399
- /**
400
- * 设置涉及左右相关的属性名,在rtl模式下自动替换为相反的属性名
401
- * @desc {en} set the property name related to left and right, and automatically replace it with the opposite attribute name in rtl mode
402
- * @param @property css属性名
403
- * @param @property {en} css property
404
- * @param @value css属性值
405
- * @param @value {en} css property value
406
- * @param @rules 自定义的复写规则,默认重置为initial
407
- * @param @rules {en} customized rewrite rules, default to initial
408
- * @example
409
- * ```
410
- * @import '@arco-design/mobile-utils/style/mixin.less';
411
- *
412
- * .demo {
413
- * .set-prop-with-rtl(right, auto);
414
- * }
415
- * ```
416
- */
417
- /**
418
- * 设置涉及左右相关的属性值,在rtl模式下自动替换为相反的属性值
419
- * @desc {en} set the property value related to left and right, and automatically replace it with the opposite attribute value in rtl mode
420
- * @param @property css属性名
421
- * @param @property {en} css property
422
- * @param @value css属性值
423
- * @param @value {en} css property value
424
- * @example
425
- * ```
426
- * @import '@arco-design/mobile-utils/style/mixin.less';
427
- *
428
- * .demo {
429
- * .set-value-with-rtl(text-align, left);
430
- * }
431
- * ```
432
- */
433
449
  /**
434
450
  * 设置Loading组件颜色
435
451
  * @desc {en} set Loading component color
@@ -95,6 +95,56 @@
95
95
  * }
96
96
  * ```
97
97
  */
98
+ /**
99
+ * 设置涉及左右相关的属性名,在rtl模式下自动替换为相反的属性名
100
+ * @desc {en} set the property name related to left and right, and automatically replace it with the opposite attribute name in rtl mode
101
+ * @param @property css属性名
102
+ * @param @property {en} css property
103
+ * @param @value css属性值
104
+ * @param @value {en} css property value
105
+ * @param @rules 自定义的复写规则,默认重置为initial
106
+ * @param @rules {en} customized rewrite rules, default to initial
107
+ * @example
108
+ * ```
109
+ * @import '@arco-design/mobile-utils/style/mixin.less';
110
+ *
111
+ * .demo {
112
+ * .set-prop-with-rtl(right, auto);
113
+ * }
114
+ * ```
115
+ */
116
+ /**
117
+ * 设置涉及左右相关的属性值,在rtl模式下自动替换为相反的属性值
118
+ * @desc {en} set the property value related to left and right, and automatically replace it with the opposite attribute value in rtl mode
119
+ * @param @property css属性名
120
+ * @param @property {en} css property
121
+ * @param @value css属性值
122
+ * @param @value {en} css property value
123
+ * @example
124
+ * ```
125
+ * @import '@arco-design/mobile-utils/style/mixin.less';
126
+ *
127
+ * .demo {
128
+ * .set-value-with-rtl(text-align, left);
129
+ * }
130
+ * ```
131
+ */
132
+ /**
133
+ * 在 rtl 模式下,自定义样式规则
134
+ * @desc {en} custom style in RTL mode
135
+ * @param @rules 对应的rtl模式下的规则
136
+ * @param @rules {en} property with rtl
137
+ * @example
138
+ * ```
139
+ * @import '@arco-design/mobile-react/style/mixin.less';
140
+ *
141
+ * .demo {
142
+ * .style-with-rtl({
143
+ * transform: scale(-1);
144
+ * });
145
+ * }
146
+ * ```
147
+ */
98
148
  /**
99
149
  * 0.5px 的边框线
100
150
  * @desc {en} a border line of 0.5 pixels
@@ -396,40 +446,6 @@
396
446
  * }
397
447
  * ```
398
448
  */
399
- /**
400
- * 设置涉及左右相关的属性名,在rtl模式下自动替换为相反的属性名
401
- * @desc {en} set the property name related to left and right, and automatically replace it with the opposite attribute name in rtl mode
402
- * @param @property css属性名
403
- * @param @property {en} css property
404
- * @param @value css属性值
405
- * @param @value {en} css property value
406
- * @param @rules 自定义的复写规则,默认重置为initial
407
- * @param @rules {en} customized rewrite rules, default to initial
408
- * @example
409
- * ```
410
- * @import '@arco-design/mobile-utils/style/mixin.less';
411
- *
412
- * .demo {
413
- * .set-prop-with-rtl(right, auto);
414
- * }
415
- * ```
416
- */
417
- /**
418
- * 设置涉及左右相关的属性值,在rtl模式下自动替换为相反的属性值
419
- * @desc {en} set the property value related to left and right, and automatically replace it with the opposite attribute value in rtl mode
420
- * @param @property css属性名
421
- * @param @property {en} css property
422
- * @param @value css属性值
423
- * @param @value {en} css property value
424
- * @example
425
- * ```
426
- * @import '@arco-design/mobile-utils/style/mixin.less';
427
- *
428
- * .demo {
429
- * .set-value-with-rtl(text-align, left);
430
- * }
431
- * ```
432
- */
433
449
  /**
434
450
  * 设置Loading组件颜色
435
451
  * @desc {en} set Loading component color
@@ -95,6 +95,56 @@
95
95
  * }
96
96
  * ```
97
97
  */
98
+ /**
99
+ * 设置涉及左右相关的属性名,在rtl模式下自动替换为相反的属性名
100
+ * @desc {en} set the property name related to left and right, and automatically replace it with the opposite attribute name in rtl mode
101
+ * @param @property css属性名
102
+ * @param @property {en} css property
103
+ * @param @value css属性值
104
+ * @param @value {en} css property value
105
+ * @param @rules 自定义的复写规则,默认重置为initial
106
+ * @param @rules {en} customized rewrite rules, default to initial
107
+ * @example
108
+ * ```
109
+ * @import '@arco-design/mobile-utils/style/mixin.less';
110
+ *
111
+ * .demo {
112
+ * .set-prop-with-rtl(right, auto);
113
+ * }
114
+ * ```
115
+ */
116
+ /**
117
+ * 设置涉及左右相关的属性值,在rtl模式下自动替换为相反的属性值
118
+ * @desc {en} set the property value related to left and right, and automatically replace it with the opposite attribute value in rtl mode
119
+ * @param @property css属性名
120
+ * @param @property {en} css property
121
+ * @param @value css属性值
122
+ * @param @value {en} css property value
123
+ * @example
124
+ * ```
125
+ * @import '@arco-design/mobile-utils/style/mixin.less';
126
+ *
127
+ * .demo {
128
+ * .set-value-with-rtl(text-align, left);
129
+ * }
130
+ * ```
131
+ */
132
+ /**
133
+ * 在 rtl 模式下,自定义样式规则
134
+ * @desc {en} custom style in RTL mode
135
+ * @param @rules 对应的rtl模式下的规则
136
+ * @param @rules {en} property with rtl
137
+ * @example
138
+ * ```
139
+ * @import '@arco-design/mobile-react/style/mixin.less';
140
+ *
141
+ * .demo {
142
+ * .style-with-rtl({
143
+ * transform: scale(-1);
144
+ * });
145
+ * }
146
+ * ```
147
+ */
98
148
  /**
99
149
  * 0.5px 的边框线
100
150
  * @desc {en} a border line of 0.5 pixels
@@ -396,40 +446,6 @@
396
446
  * }
397
447
  * ```
398
448
  */
399
- /**
400
- * 设置涉及左右相关的属性名,在rtl模式下自动替换为相反的属性名
401
- * @desc {en} set the property name related to left and right, and automatically replace it with the opposite attribute name in rtl mode
402
- * @param @property css属性名
403
- * @param @property {en} css property
404
- * @param @value css属性值
405
- * @param @value {en} css property value
406
- * @param @rules 自定义的复写规则,默认重置为initial
407
- * @param @rules {en} customized rewrite rules, default to initial
408
- * @example
409
- * ```
410
- * @import '@arco-design/mobile-utils/style/mixin.less';
411
- *
412
- * .demo {
413
- * .set-prop-with-rtl(right, auto);
414
- * }
415
- * ```
416
- */
417
- /**
418
- * 设置涉及左右相关的属性值,在rtl模式下自动替换为相反的属性值
419
- * @desc {en} set the property value related to left and right, and automatically replace it with the opposite attribute value in rtl mode
420
- * @param @property css属性名
421
- * @param @property {en} css property
422
- * @param @value css属性值
423
- * @param @value {en} css property value
424
- * @example
425
- * ```
426
- * @import '@arco-design/mobile-utils/style/mixin.less';
427
- *
428
- * .demo {
429
- * .set-value-with-rtl(text-align, left);
430
- * }
431
- * ```
432
- */
433
449
  /**
434
450
  * 设置Loading组件颜色
435
451
  * @desc {en} set Loading component color
@@ -95,6 +95,56 @@
95
95
  * }
96
96
  * ```
97
97
  */
98
+ /**
99
+ * 设置涉及左右相关的属性名,在rtl模式下自动替换为相反的属性名
100
+ * @desc {en} set the property name related to left and right, and automatically replace it with the opposite attribute name in rtl mode
101
+ * @param @property css属性名
102
+ * @param @property {en} css property
103
+ * @param @value css属性值
104
+ * @param @value {en} css property value
105
+ * @param @rules 自定义的复写规则,默认重置为initial
106
+ * @param @rules {en} customized rewrite rules, default to initial
107
+ * @example
108
+ * ```
109
+ * @import '@arco-design/mobile-utils/style/mixin.less';
110
+ *
111
+ * .demo {
112
+ * .set-prop-with-rtl(right, auto);
113
+ * }
114
+ * ```
115
+ */
116
+ /**
117
+ * 设置涉及左右相关的属性值,在rtl模式下自动替换为相反的属性值
118
+ * @desc {en} set the property value related to left and right, and automatically replace it with the opposite attribute value in rtl mode
119
+ * @param @property css属性名
120
+ * @param @property {en} css property
121
+ * @param @value css属性值
122
+ * @param @value {en} css property value
123
+ * @example
124
+ * ```
125
+ * @import '@arco-design/mobile-utils/style/mixin.less';
126
+ *
127
+ * .demo {
128
+ * .set-value-with-rtl(text-align, left);
129
+ * }
130
+ * ```
131
+ */
132
+ /**
133
+ * 在 rtl 模式下,自定义样式规则
134
+ * @desc {en} custom style in RTL mode
135
+ * @param @rules 对应的rtl模式下的规则
136
+ * @param @rules {en} property with rtl
137
+ * @example
138
+ * ```
139
+ * @import '@arco-design/mobile-react/style/mixin.less';
140
+ *
141
+ * .demo {
142
+ * .style-with-rtl({
143
+ * transform: scale(-1);
144
+ * });
145
+ * }
146
+ * ```
147
+ */
98
148
  /**
99
149
  * 0.5px 的边框线
100
150
  * @desc {en} a border line of 0.5 pixels
@@ -396,40 +446,6 @@
396
446
  * }
397
447
  * ```
398
448
  */
399
- /**
400
- * 设置涉及左右相关的属性名,在rtl模式下自动替换为相反的属性名
401
- * @desc {en} set the property name related to left and right, and automatically replace it with the opposite attribute name in rtl mode
402
- * @param @property css属性名
403
- * @param @property {en} css property
404
- * @param @value css属性值
405
- * @param @value {en} css property value
406
- * @param @rules 自定义的复写规则,默认重置为initial
407
- * @param @rules {en} customized rewrite rules, default to initial
408
- * @example
409
- * ```
410
- * @import '@arco-design/mobile-utils/style/mixin.less';
411
- *
412
- * .demo {
413
- * .set-prop-with-rtl(right, auto);
414
- * }
415
- * ```
416
- */
417
- /**
418
- * 设置涉及左右相关的属性值,在rtl模式下自动替换为相反的属性值
419
- * @desc {en} set the property value related to left and right, and automatically replace it with the opposite attribute value in rtl mode
420
- * @param @property css属性名
421
- * @param @property {en} css property
422
- * @param @value css属性值
423
- * @param @value {en} css property value
424
- * @example
425
- * ```
426
- * @import '@arco-design/mobile-utils/style/mixin.less';
427
- *
428
- * .demo {
429
- * .set-value-with-rtl(text-align, left);
430
- * }
431
- * ```
432
- */
433
449
  /**
434
450
  * 设置Loading组件颜色
435
451
  * @desc {en} set Loading component color
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arco-design/mobile-react",
3
- "version": "2.31.0",
3
+ "version": "2.31.1",
4
4
  "description": "",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -15,16 +15,13 @@
15
15
  "author": "taoyiyue@bytedance.com",
16
16
  "license": "ISC",
17
17
  "dependencies": {
18
- "@arco-design/mobile-utils": "2.18.0",
18
+ "@arco-design/mobile-utils": "2.18.1",
19
19
  "@arco-design/transformable": "^1.0.0",
20
20
  "lodash.throttle": "^4.1.1",
21
21
  "resize-observer-polyfill": "^1.5.1"
22
22
  },
23
23
  "devDependencies": {
24
24
  "babel-jest": "^25.3.0",
25
- "enzyme": "^3.11.0",
26
- "enzyme-adapter-react-16": "^1.15.2",
27
- "enzyme-to-json": "^3.4.4",
28
25
  "jest": "^25.3.0"
29
26
  },
30
27
  "peerDependencies": {
@@ -49,5 +46,5 @@
49
46
  "publishConfig": {
50
47
  "access": "public"
51
48
  },
52
- "gitHead": "d531e333e595adbbfc5f78552d07f983a4978d0a"
49
+ "gitHead": "8cc54e96718590f82149dcdca12a7480b39c0ed2"
53
50
  }
@@ -152,40 +152,6 @@
152
152
  * }
153
153
  * ```
154
154
  */
155
- /**
156
- * 设置涉及左右相关的属性名,在rtl模式下自动替换为相反的属性名
157
- * @desc {en} set the property name related to left and right, and automatically replace it with the opposite attribute name in rtl mode
158
- * @param @property css属性名
159
- * @param @property {en} css property
160
- * @param @value css属性值
161
- * @param @value {en} css property value
162
- * @param @rules 自定义的复写规则,默认重置为initial
163
- * @param @rules {en} customized rewrite rules, default to initial
164
- * @example
165
- * ```
166
- * @import '@arco-design/mobile-utils/style/mixin.less';
167
- *
168
- * .demo {
169
- * .set-prop-with-rtl(right, auto);
170
- * }
171
- * ```
172
- */
173
- /**
174
- * 设置涉及左右相关的属性值,在rtl模式下自动替换为相反的属性值
175
- * @desc {en} set the property value related to left and right, and automatically replace it with the opposite attribute value in rtl mode
176
- * @param @property css属性名
177
- * @param @property {en} css property
178
- * @param @value css属性值
179
- * @param @value {en} css property value
180
- * @example
181
- * ```
182
- * @import '@arco-design/mobile-utils/style/mixin.less';
183
- *
184
- * .demo {
185
- * .set-value-with-rtl(text-align, left);
186
- * }
187
- * ```
188
- */
189
155
  /**
190
156
  * 设置Loading组件颜色
191
157
  * @desc {en} set Loading component color
@@ -342,6 +308,56 @@
342
308
  * }
343
309
  * ```
344
310
  */
311
+ /**
312
+ * 设置涉及左右相关的属性名,在rtl模式下自动替换为相反的属性名
313
+ * @desc {en} set the property name related to left and right, and automatically replace it with the opposite attribute name in rtl mode
314
+ * @param @property css属性名
315
+ * @param @property {en} css property
316
+ * @param @value css属性值
317
+ * @param @value {en} css property value
318
+ * @param @rules 自定义的复写规则,默认重置为initial
319
+ * @param @rules {en} customized rewrite rules, default to initial
320
+ * @example
321
+ * ```
322
+ * @import '@arco-design/mobile-utils/style/mixin.less';
323
+ *
324
+ * .demo {
325
+ * .set-prop-with-rtl(right, auto);
326
+ * }
327
+ * ```
328
+ */
329
+ /**
330
+ * 设置涉及左右相关的属性值,在rtl模式下自动替换为相反的属性值
331
+ * @desc {en} set the property value related to left and right, and automatically replace it with the opposite attribute value in rtl mode
332
+ * @param @property css属性名
333
+ * @param @property {en} css property
334
+ * @param @value css属性值
335
+ * @param @value {en} css property value
336
+ * @example
337
+ * ```
338
+ * @import '@arco-design/mobile-utils/style/mixin.less';
339
+ *
340
+ * .demo {
341
+ * .set-value-with-rtl(text-align, left);
342
+ * }
343
+ * ```
344
+ */
345
+ /**
346
+ * 在 rtl 模式下,自定义样式规则
347
+ * @desc {en} custom style in RTL mode
348
+ * @param @rules 对应的rtl模式下的规则
349
+ * @param @rules {en} property with rtl
350
+ * @example
351
+ * ```
352
+ * @import '@arco-design/mobile-react/style/mixin.less';
353
+ *
354
+ * .demo {
355
+ * .style-with-rtl({
356
+ * transform: scale(-1);
357
+ * });
358
+ * }
359
+ * ```
360
+ */
345
361
  /**
346
362
  * 0.5px 的边框线
347
363
  * @desc {en} a border line of 0.5 pixels
@@ -56,11 +56,11 @@
56
56
  */
57
57
  .rem-with-rtl(@property; @values...) {
58
58
  .rem(@property; @values...);
59
- [dir="rtl"] & {
59
+ .style-with-rtl({
60
60
  @{property}: initial;
61
61
  @new-property: .prop-with-rtl(@property)[@property-name];
62
62
  .rem(@new-property; @values...);
63
- }
63
+ });
64
64
  }
65
65
 
66
66
  /**
@@ -138,10 +138,87 @@
138
138
  */
139
139
  .use-var-with-rtl(@property, @variables, @preValues: '', @nextValues: '') {
140
140
  .use-var(@property, @variables, @preValues, @nextValues);
141
- [dir="rtl"] & {
141
+ .style-with-rtl({
142
142
  @{property}: initial;
143
143
  @new-property: .prop-with-rtl(@property)[@property-name];
144
144
  .use-var(@new-property, @variables, @preValues, @nextValues);
145
+ });
146
+ }
147
+
148
+ /**
149
+ * 设置涉及左右相关的属性名,在rtl模式下自动替换为相反的属性名
150
+ * @desc {en} set the property name related to left and right, and automatically replace it with the opposite attribute name in rtl mode
151
+ * @param @property css属性名
152
+ * @param @property {en} css property
153
+ * @param @value css属性值
154
+ * @param @value {en} css property value
155
+ * @param @rules 自定义的复写规则,默认重置为initial
156
+ * @param @rules {en} customized rewrite rules, default to initial
157
+ * @example
158
+ * ```
159
+ * @import '@arco-design/mobile-utils/style/mixin.less';
160
+ *
161
+ * .demo {
162
+ * .set-prop-with-rtl(right, auto);
163
+ * }
164
+ * ```
165
+ */
166
+ .set-prop-with-rtl(@property, @value, @rules: {
167
+ @{property}: initial;
168
+ }) {
169
+ @{property}: @value;
170
+ .style-with-rtl({
171
+ @rules();
172
+ @new-property: .prop-with-rtl(@property)[@property-name];
173
+ @{new-property}: @value;
174
+ });
175
+ }
176
+
177
+ /**
178
+ * 设置涉及左右相关的属性值,在rtl模式下自动替换为相反的属性值
179
+ * @desc {en} set the property value related to left and right, and automatically replace it with the opposite attribute value in rtl mode
180
+ * @param @property css属性名
181
+ * @param @property {en} css property
182
+ * @param @value css属性值
183
+ * @param @value {en} css property value
184
+ * @example
185
+ * ```
186
+ * @import '@arco-design/mobile-utils/style/mixin.less';
187
+ *
188
+ * .demo {
189
+ * .set-value-with-rtl(text-align, left);
190
+ * }
191
+ * ```
192
+ */
193
+ .set-value-with-rtl(@property, @value) {
194
+ @{property}: @value;
195
+ .style-with-rtl({
196
+ @new-value: .prop-with-rtl(@value)[@property-name];
197
+ @{property}: @new-value;
198
+ });
199
+ }
200
+
201
+ /**
202
+ * 在 rtl 模式下,自定义样式规则
203
+ * @desc {en} custom style in RTL mode
204
+ * @param @rules 对应的rtl模式下的规则
205
+ * @param @rules {en} property with rtl
206
+ * @example
207
+ * ```
208
+ * @import '@arco-design/mobile-react/style/mixin.less';
209
+ *
210
+ * .demo {
211
+ * .style-with-rtl({
212
+ * transform: scale(-1);
213
+ * });
214
+ * }
215
+ * ```
216
+ */
217
+ .style-with-rtl(@rules) {
218
+ & when (@use-rtl = 1) {
219
+ [dir="rtl"] & {
220
+ @rules();
221
+ }
145
222
  }
146
223
  }
147
224
 
@@ -1,3 +1,4 @@
1
1
  @use-css-vars: 0;
2
2
  @use-dark-mode: 1;
3
3
  @use-rem: 1;
4
+ @use-rtl: 1;