@arco-design/mobile-react 2.27.4 → 2.28.0

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 (176) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/cjs/_helpers/hooks.d.ts +1 -0
  5. package/cjs/_helpers/hooks.js +44 -28
  6. package/cjs/action-sheet/index.d.ts +2 -2
  7. package/cjs/badge/index.js +2 -1
  8. package/cjs/badge/style/css/index.css +12 -0
  9. package/cjs/badge/style/index.less +3 -3
  10. package/cjs/button/style/css/index.css +4 -0
  11. package/cjs/button/style/index.less +1 -1
  12. package/cjs/cell/style/css/index.css +7 -0
  13. package/cjs/cell/style/index.less +4 -1
  14. package/cjs/checkbox/style/css/index.css +13 -0
  15. package/cjs/checkbox/style/index.less +3 -3
  16. package/cjs/collapse/collapse.js +12 -6
  17. package/cjs/dialog/index.d.ts +2 -2
  18. package/cjs/form/style/css/index.css +16 -0
  19. package/cjs/form/style/index.less +4 -4
  20. package/cjs/image-preview/index.d.ts +2 -2
  21. package/cjs/image-preview/index.js +4 -2
  22. package/cjs/image-preview/style/css/index.css +3 -0
  23. package/cjs/image-preview/style/index.less +4 -0
  24. package/cjs/index.d.ts +12 -12
  25. package/cjs/index.js +46 -46
  26. package/cjs/load-more/index.d.ts +5 -0
  27. package/cjs/load-more/index.js +2 -1
  28. package/cjs/masking/index.d.ts +2 -2
  29. package/cjs/masking/index.js +4 -2
  30. package/cjs/notify/index.d.ts +8 -8
  31. package/cjs/popover/popover.js +10 -2
  32. package/cjs/popup/index.d.ts +2 -2
  33. package/cjs/popup-swiper/index.d.ts +2 -2
  34. package/cjs/radio/style/css/index.css +8 -0
  35. package/cjs/radio/style/index.less +2 -2
  36. package/cjs/rate/index.js +5 -3
  37. package/cjs/rate/style/css/index.css +4 -0
  38. package/cjs/rate/style/index.less +4 -0
  39. package/cjs/slider/hooks/index.d.ts +1 -1
  40. package/cjs/slider/popover.js +6 -2
  41. package/cjs/stepper/hooks/useButtonClick.js +8 -9
  42. package/cjs/sticky/index.d.ts +5 -0
  43. package/cjs/sticky/index.js +20 -7
  44. package/cjs/style.d.ts +13 -13
  45. package/cjs/style.js +24 -24
  46. package/cjs/switch/index.js +7 -2
  47. package/cjs/switch/style/css/index.css +44 -0
  48. package/cjs/switch/style/index.less +19 -7
  49. package/cjs/tabs/demo/style/css/mobile.css +11 -0
  50. package/cjs/tabs/demo/style/mobile.less +5 -1
  51. package/cjs/tabs/index.js +14 -5
  52. package/cjs/tabs/style/css/index.css +32 -7
  53. package/cjs/tabs/style/index.less +9 -14
  54. package/cjs/tabs/tab-cell-underline.js +14 -5
  55. package/cjs/tabs/tab-cell.js +15 -7
  56. package/cjs/tabs/tab-pane.js +4 -3
  57. package/cjs/tabs/type.d.ts +1 -0
  58. package/cjs/toast/index.d.ts +12 -12
  59. package/cjs/toast/index.js +5 -2
  60. package/dist/index.js +13914 -13836
  61. package/dist/index.min.js +4 -4
  62. package/dist/style.css +3366 -3236
  63. package/dist/style.min.css +1 -1
  64. package/esm/_helpers/hooks.d.ts +1 -0
  65. package/esm/_helpers/hooks.js +43 -29
  66. package/esm/action-sheet/index.d.ts +2 -2
  67. package/esm/badge/index.js +2 -1
  68. package/esm/badge/style/css/index.css +12 -0
  69. package/esm/badge/style/index.less +3 -3
  70. package/esm/button/style/css/index.css +4 -0
  71. package/esm/button/style/index.less +1 -1
  72. package/esm/cell/style/css/index.css +7 -0
  73. package/esm/cell/style/index.less +4 -1
  74. package/esm/checkbox/style/css/index.css +13 -0
  75. package/esm/checkbox/style/index.less +3 -3
  76. package/esm/collapse/collapse.js +14 -8
  77. package/esm/dialog/index.d.ts +2 -2
  78. package/esm/form/style/css/index.css +16 -0
  79. package/esm/form/style/index.less +4 -4
  80. package/esm/image-preview/index.d.ts +2 -2
  81. package/esm/image-preview/index.js +4 -2
  82. package/esm/image-preview/style/css/index.css +3 -0
  83. package/esm/image-preview/style/index.less +4 -0
  84. package/esm/index.d.ts +12 -12
  85. package/esm/index.js +12 -12
  86. package/esm/load-more/index.d.ts +5 -0
  87. package/esm/load-more/index.js +2 -1
  88. package/esm/masking/index.d.ts +2 -2
  89. package/esm/masking/index.js +4 -2
  90. package/esm/notify/index.d.ts +8 -8
  91. package/esm/popover/popover.js +10 -2
  92. package/esm/popup/index.d.ts +2 -2
  93. package/esm/popup-swiper/index.d.ts +2 -2
  94. package/esm/radio/style/css/index.css +8 -0
  95. package/esm/radio/style/index.less +2 -2
  96. package/esm/rate/index.js +5 -3
  97. package/esm/rate/style/css/index.css +4 -0
  98. package/esm/rate/style/index.less +4 -0
  99. package/esm/slider/hooks/index.d.ts +1 -1
  100. package/esm/slider/popover.js +7 -3
  101. package/esm/stepper/hooks/useButtonClick.js +8 -9
  102. package/esm/sticky/index.d.ts +5 -0
  103. package/esm/sticky/index.js +20 -7
  104. package/esm/style.d.ts +13 -13
  105. package/esm/style.js +13 -13
  106. package/esm/switch/index.js +9 -4
  107. package/esm/switch/style/css/index.css +44 -0
  108. package/esm/switch/style/index.less +19 -7
  109. package/esm/tabs/demo/style/css/mobile.css +11 -0
  110. package/esm/tabs/demo/style/mobile.less +5 -1
  111. package/esm/tabs/index.js +16 -7
  112. package/esm/tabs/style/css/index.css +32 -7
  113. package/esm/tabs/style/index.less +9 -14
  114. package/esm/tabs/tab-cell-underline.js +14 -6
  115. package/esm/tabs/tab-cell.js +15 -8
  116. package/esm/tabs/tab-pane.js +4 -3
  117. package/esm/tabs/type.d.ts +1 -0
  118. package/esm/toast/index.d.ts +12 -12
  119. package/esm/toast/index.js +5 -2
  120. package/package.json +3 -3
  121. package/umd/_helpers/hooks.d.ts +1 -0
  122. package/umd/_helpers/hooks.js +44 -28
  123. package/umd/action-sheet/index.d.ts +2 -2
  124. package/umd/badge/index.js +2 -1
  125. package/umd/badge/style/css/index.css +12 -0
  126. package/umd/badge/style/index.less +3 -3
  127. package/umd/button/style/css/index.css +4 -0
  128. package/umd/button/style/index.less +1 -1
  129. package/umd/cell/style/css/index.css +7 -0
  130. package/umd/cell/style/index.less +4 -1
  131. package/umd/checkbox/style/css/index.css +13 -0
  132. package/umd/checkbox/style/index.less +3 -3
  133. package/umd/collapse/collapse.js +12 -6
  134. package/umd/dialog/index.d.ts +2 -2
  135. package/umd/form/style/css/index.css +16 -0
  136. package/umd/form/style/index.less +4 -4
  137. package/umd/image-preview/index.d.ts +2 -2
  138. package/umd/image-preview/index.js +4 -2
  139. package/umd/image-preview/style/css/index.css +3 -0
  140. package/umd/image-preview/style/index.less +4 -0
  141. package/umd/index.d.ts +12 -12
  142. package/umd/index.js +28 -28
  143. package/umd/load-more/index.d.ts +5 -0
  144. package/umd/load-more/index.js +2 -1
  145. package/umd/masking/index.d.ts +2 -2
  146. package/umd/masking/index.js +4 -2
  147. package/umd/notify/index.d.ts +8 -8
  148. package/umd/popover/popover.js +10 -2
  149. package/umd/popup/index.d.ts +2 -2
  150. package/umd/popup-swiper/index.d.ts +2 -2
  151. package/umd/radio/style/css/index.css +8 -0
  152. package/umd/radio/style/index.less +2 -2
  153. package/umd/rate/index.js +5 -3
  154. package/umd/rate/style/css/index.css +4 -0
  155. package/umd/rate/style/index.less +4 -0
  156. package/umd/slider/hooks/index.d.ts +1 -1
  157. package/umd/slider/popover.js +6 -2
  158. package/umd/stepper/hooks/useButtonClick.js +8 -9
  159. package/umd/sticky/index.d.ts +5 -0
  160. package/umd/sticky/index.js +20 -7
  161. package/umd/style.d.ts +13 -13
  162. package/umd/style.js +2 -2
  163. package/umd/switch/index.js +7 -2
  164. package/umd/switch/style/css/index.css +44 -0
  165. package/umd/switch/style/index.less +19 -7
  166. package/umd/tabs/demo/style/css/mobile.css +11 -0
  167. package/umd/tabs/demo/style/mobile.less +5 -1
  168. package/umd/tabs/index.js +14 -5
  169. package/umd/tabs/style/css/index.css +32 -7
  170. package/umd/tabs/style/index.less +9 -14
  171. package/umd/tabs/tab-cell-underline.js +16 -9
  172. package/umd/tabs/tab-cell.js +17 -11
  173. package/umd/tabs/tab-pane.js +4 -3
  174. package/umd/tabs/type.d.ts +1 -0
  175. package/umd/toast/index.d.ts +12 -12
  176. package/umd/toast/index.js +5 -2
package/cjs/index.d.ts CHANGED
@@ -1,34 +1,31 @@
1
- export { default as Button } from './button';
1
+ export { default as Tabs } from './tabs';
2
+ export { default as Sticky } from './sticky';
3
+ export { default as LoadMore } from './load-more';
4
+ export { default as Cell } from './cell';
2
5
  export { default as ActionSheet } from './action-sheet';
3
6
  export { default as Avatar } from './avatar';
4
7
  export { default as Badge } from './badge';
8
+ export { default as Button } from './button';
5
9
  export { default as Carousel } from './carousel';
6
- export { default as Cell } from './cell';
7
10
  export { default as Checkbox } from './checkbox';
8
11
  export { default as CircleProgress } from './circle-progress';
9
12
  export { default as Collapse } from './collapse';
10
13
  export { default as ContextProvider } from './context-provider';
11
14
  export { default as CountDown } from './count-down';
12
15
  export { default as DatePicker } from './date-picker';
13
- export { default as Divider } from './divider';
14
16
  export { default as Dialog } from './dialog';
17
+ export { default as Divider } from './divider';
15
18
  export { default as Dropdown } from './dropdown';
16
19
  export { default as DropdownMenu } from './dropdown-menu';
17
20
  export { default as Ellipsis } from './ellipsis';
18
21
  export { default as Form } from './form';
19
- export { default as Input } from './input';
20
- export { default as Textarea } from './textarea';
21
- export { default as Radio } from './radio';
22
- export { default as Rate } from './rate';
23
- export { default as Slider } from './slider';
24
22
  export { default as Grid } from './grid';
25
23
  export { default as Image } from './image';
26
- export { default as ShowMonitor } from './show-monitor';
27
24
  export { default as ImagePicker } from './image-picker';
28
25
  export { default as ImagePreview } from './image-preview';
29
26
  export { default as IndexBar } from './index-bar';
27
+ export { default as Input } from './input';
30
28
  export { default as Keyboard } from './keyboard';
31
- export { default as LoadMore } from './load-more';
32
29
  export { default as Loading } from './loading';
33
30
  export { default as Masking } from './masking';
34
31
  export { default as NavBar } from './nav-bar';
@@ -43,15 +40,18 @@ export { default as PopupSwiper } from './popup-swiper';
43
40
  export { default as Portal } from './portal';
44
41
  export { default as Progress } from './progress';
45
42
  export { default as PullRefresh } from './pull-refresh';
43
+ export { default as Radio } from './radio';
44
+ export { default as Rate } from './rate';
46
45
  export { default as SearchBar } from './search-bar';
46
+ export { default as ShowMonitor } from './show-monitor';
47
+ export { default as Slider } from './slider';
47
48
  export { default as Stepper } from './stepper';
48
49
  export { default as Steps } from './steps';
49
- export { default as Sticky } from './sticky';
50
50
  export { default as SwipeAction } from './swipe-action';
51
51
  export { default as SwipeLoad } from './swipe-load';
52
52
  export { default as Switch } from './switch';
53
53
  export { default as TabBar } from './tab-bar';
54
- export { default as Tabs } from './tabs';
55
54
  export { default as Tag } from './tag';
55
+ export { default as Textarea } from './textarea';
56
56
  export { default as Toast } from './toast';
57
57
  export { default as Transition } from './transition';
package/cjs/index.js CHANGED
@@ -5,9 +5,21 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  exports.__esModule = true;
6
6
  exports.Transition = exports.Toast = exports.Textarea = exports.Tag = exports.Tabs = exports.TabBar = exports.Switch = exports.SwipeLoad = exports.SwipeAction = exports.Sticky = exports.Steps = exports.Stepper = exports.Slider = exports.ShowMonitor = exports.SearchBar = exports.Rate = exports.Radio = exports.PullRefresh = exports.Progress = exports.Portal = exports.PopupSwiper = exports.Popup = exports.Popover = exports.PickerView = exports.Picker = exports.Pagination = exports.Notify = exports.NoticeBar = exports.NavBar = exports.Masking = exports.Loading = exports.LoadMore = exports.Keyboard = exports.Input = exports.IndexBar = exports.ImagePreview = exports.ImagePicker = exports.Image = exports.Grid = exports.Form = exports.Ellipsis = exports.DropdownMenu = exports.Dropdown = exports.Divider = exports.Dialog = exports.DatePicker = exports.CountDown = exports.ContextProvider = exports.Collapse = exports.CircleProgress = exports.Checkbox = exports.Cell = exports.Carousel = exports.Button = exports.Badge = exports.Avatar = exports.ActionSheet = void 0;
7
7
 
8
- var _button = _interopRequireDefault(require("./button"));
8
+ var _tabs = _interopRequireDefault(require("./tabs"));
9
9
 
10
- exports.Button = _button.default;
10
+ exports.Tabs = _tabs.default;
11
+
12
+ var _sticky = _interopRequireDefault(require("./sticky"));
13
+
14
+ exports.Sticky = _sticky.default;
15
+
16
+ var _loadMore = _interopRequireDefault(require("./load-more"));
17
+
18
+ exports.LoadMore = _loadMore.default;
19
+
20
+ var _cell = _interopRequireDefault(require("./cell"));
21
+
22
+ exports.Cell = _cell.default;
11
23
 
12
24
  var _actionSheet = _interopRequireDefault(require("./action-sheet"));
13
25
 
@@ -21,13 +33,13 @@ var _badge = _interopRequireDefault(require("./badge"));
21
33
 
22
34
  exports.Badge = _badge.default;
23
35
 
24
- var _carousel = _interopRequireDefault(require("./carousel"));
36
+ var _button = _interopRequireDefault(require("./button"));
25
37
 
26
- exports.Carousel = _carousel.default;
38
+ exports.Button = _button.default;
27
39
 
28
- var _cell = _interopRequireDefault(require("./cell"));
40
+ var _carousel = _interopRequireDefault(require("./carousel"));
29
41
 
30
- exports.Cell = _cell.default;
42
+ exports.Carousel = _carousel.default;
31
43
 
32
44
  var _checkbox = _interopRequireDefault(require("./checkbox"));
33
45
 
@@ -53,14 +65,14 @@ var _datePicker = _interopRequireDefault(require("./date-picker"));
53
65
 
54
66
  exports.DatePicker = _datePicker.default;
55
67
 
56
- var _divider = _interopRequireDefault(require("./divider"));
57
-
58
- exports.Divider = _divider.default;
59
-
60
68
  var _dialog = _interopRequireDefault(require("./dialog"));
61
69
 
62
70
  exports.Dialog = _dialog.default;
63
71
 
72
+ var _divider = _interopRequireDefault(require("./divider"));
73
+
74
+ exports.Divider = _divider.default;
75
+
64
76
  var _dropdown = _interopRequireDefault(require("./dropdown"));
65
77
 
66
78
  exports.Dropdown = _dropdown.default;
@@ -77,26 +89,6 @@ var _form = _interopRequireDefault(require("./form"));
77
89
 
78
90
  exports.Form = _form.default;
79
91
 
80
- var _input = _interopRequireDefault(require("./input"));
81
-
82
- exports.Input = _input.default;
83
-
84
- var _textarea = _interopRequireDefault(require("./textarea"));
85
-
86
- exports.Textarea = _textarea.default;
87
-
88
- var _radio = _interopRequireDefault(require("./radio"));
89
-
90
- exports.Radio = _radio.default;
91
-
92
- var _rate = _interopRequireDefault(require("./rate"));
93
-
94
- exports.Rate = _rate.default;
95
-
96
- var _slider = _interopRequireDefault(require("./slider"));
97
-
98
- exports.Slider = _slider.default;
99
-
100
92
  var _grid = _interopRequireDefault(require("./grid"));
101
93
 
102
94
  exports.Grid = _grid.default;
@@ -105,10 +97,6 @@ var _image = _interopRequireDefault(require("./image"));
105
97
 
106
98
  exports.Image = _image.default;
107
99
 
108
- var _showMonitor = _interopRequireDefault(require("./show-monitor"));
109
-
110
- exports.ShowMonitor = _showMonitor.default;
111
-
112
100
  var _imagePicker = _interopRequireDefault(require("./image-picker"));
113
101
 
114
102
  exports.ImagePicker = _imagePicker.default;
@@ -121,13 +109,13 @@ var _indexBar = _interopRequireDefault(require("./index-bar"));
121
109
 
122
110
  exports.IndexBar = _indexBar.default;
123
111
 
124
- var _keyboard = _interopRequireDefault(require("./keyboard"));
112
+ var _input = _interopRequireDefault(require("./input"));
125
113
 
126
- exports.Keyboard = _keyboard.default;
114
+ exports.Input = _input.default;
127
115
 
128
- var _loadMore = _interopRequireDefault(require("./load-more"));
116
+ var _keyboard = _interopRequireDefault(require("./keyboard"));
129
117
 
130
- exports.LoadMore = _loadMore.default;
118
+ exports.Keyboard = _keyboard.default;
131
119
 
132
120
  var _loading = _interopRequireDefault(require("./loading"));
133
121
 
@@ -185,10 +173,26 @@ var _pullRefresh = _interopRequireDefault(require("./pull-refresh"));
185
173
 
186
174
  exports.PullRefresh = _pullRefresh.default;
187
175
 
176
+ var _radio = _interopRequireDefault(require("./radio"));
177
+
178
+ exports.Radio = _radio.default;
179
+
180
+ var _rate = _interopRequireDefault(require("./rate"));
181
+
182
+ exports.Rate = _rate.default;
183
+
188
184
  var _searchBar = _interopRequireDefault(require("./search-bar"));
189
185
 
190
186
  exports.SearchBar = _searchBar.default;
191
187
 
188
+ var _showMonitor = _interopRequireDefault(require("./show-monitor"));
189
+
190
+ exports.ShowMonitor = _showMonitor.default;
191
+
192
+ var _slider = _interopRequireDefault(require("./slider"));
193
+
194
+ exports.Slider = _slider.default;
195
+
192
196
  var _stepper = _interopRequireDefault(require("./stepper"));
193
197
 
194
198
  exports.Stepper = _stepper.default;
@@ -197,10 +201,6 @@ var _steps = _interopRequireDefault(require("./steps"));
197
201
 
198
202
  exports.Steps = _steps.default;
199
203
 
200
- var _sticky = _interopRequireDefault(require("./sticky"));
201
-
202
- exports.Sticky = _sticky.default;
203
-
204
204
  var _swipeAction = _interopRequireDefault(require("./swipe-action"));
205
205
 
206
206
  exports.SwipeAction = _swipeAction.default;
@@ -217,14 +217,14 @@ var _tabBar = _interopRequireDefault(require("./tab-bar"));
217
217
 
218
218
  exports.TabBar = _tabBar.default;
219
219
 
220
- var _tabs = _interopRequireDefault(require("./tabs"));
221
-
222
- exports.Tabs = _tabs.default;
223
-
224
220
  var _tag = _interopRequireDefault(require("./tag"));
225
221
 
226
222
  exports.Tag = _tag.default;
227
223
 
224
+ var _textarea = _interopRequireDefault(require("./textarea"));
225
+
226
+ exports.Textarea = _textarea.default;
227
+
228
228
  var _toast = _interopRequireDefault(require("./toast"));
229
229
 
230
230
  exports.Toast = _toast.default;
@@ -62,6 +62,11 @@ export interface LoadMoreProps {
62
62
  * @default () => window
63
63
  */
64
64
  getScrollContainer?: () => HTMLElement | Window | null;
65
+ /**
66
+ * 当多个 loadmore 在同一页面时,通过传入节点的 offsetHeight + offsetTop 代替 scrollHeight
67
+ * @en When multiple loadmores are on the same page, pass in the offsetHeight + offsetTop of the node instead of scrollHeight
68
+ */
69
+ getOffsetNode?: () => HTMLElement | Window | null;
65
70
  /**
66
71
  * 触发loading的时机,当为click时,点击后将触发getData
67
72
  * @en The timing of triggering loading, when it is click, getData will be triggered after clicking
@@ -40,6 +40,7 @@ var LoadMore = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
40
40
  defaultStatus = _props$defaultStatus === void 0 ? 'prepare' : _props$defaultStatus,
41
41
  status = props.status,
42
42
  getScrollContainer = props.getScrollContainer,
43
+ getOffsetNode = props.getOffsetNode,
43
44
  _props$trigger = props.trigger,
44
45
  trigger = _props$trigger === void 0 ? 'scroll' : _props$trigger,
45
46
  _props$threshold = props.threshold,
@@ -142,7 +143,7 @@ var LoadMore = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
142
143
  }, [changeStatus]);
143
144
 
144
145
  function checkNeedTrigger(top, ths) {
145
- var scrollHeight = (0, _mobileUtils.getScrollContainerAttribute)('scrollHeight', getScrollContainer);
146
+ var scrollHeight = getOffsetNode ? (0, _mobileUtils.getScrollContainerAttribute)('offsetHeight', getOffsetNode) + (0, _mobileUtils.getScrollContainerAttribute)('offsetTop', getOffsetNode) : (0, _mobileUtils.getScrollContainerAttribute)('scrollHeight', getScrollContainer);
146
147
  var clientHeight = (0, _mobileUtils.getScrollContainerAttribute)('clientHeight', getScrollContainer);
147
148
  return scrollHeight - top - clientHeight <= ths;
148
149
  }
@@ -205,11 +205,11 @@ declare const _default: React.ForwardRefExoticComponent<MaskingProps & React.Ref
205
205
  * @param {MaskingProps} config Configuration
206
206
  * @returns {{ close: () => void; update: (newConfig: MaskingProps) => void; }}
207
207
  */
208
- open: (config: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onTouchMove" | "onPreventTouchMove" | "getScrollContainer"> & {
208
+ open: (config: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
209
209
  key?: string | undefined;
210
210
  }, context?: import("../context-provider").GlobalContextParams | undefined) => {
211
211
  close: () => void;
212
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onTouchMove" | "onPreventTouchMove" | "getScrollContainer"> & {
212
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<MaskingProps & React.RefAttributes<MaskingRef>>, "children" | "ref" | "key" | "context" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "contentAtCenter" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove"> & {
213
213
  key?: string | undefined;
214
214
  }) => void;
215
215
  };
@@ -184,7 +184,8 @@ var Masking = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
184
184
  timeout: maskTransitionTimeout,
185
185
  type: maskTransitionType,
186
186
  mountOnEnter: mountOnEnter,
187
- unmountOnExit: unmountOnExit
187
+ unmountOnExit: unmountOnExit,
188
+ nodeRef: maskRef
188
189
  }, /*#__PURE__*/_react.default.createElement("div", {
189
190
  ref: maskRef,
190
191
  className: (0, _mobileUtils.cls)(prefixCls + "-masking-mask", extraClass, maskClass),
@@ -195,7 +196,8 @@ var Masking = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
195
196
  timeout: contentTransitionTimeout,
196
197
  type: contentTransitionType,
197
198
  mountOnEnter: mountOnEnter,
198
- unmountOnExit: unmountOnExit
199
+ unmountOnExit: unmountOnExit,
200
+ nodeRef: contentRef
199
201
  }, /*#__PURE__*/_react.default.createElement("div", {
200
202
  ref: contentRef,
201
203
  className: (0, _mobileUtils.cls)(prefixCls + "-masking-content", {
@@ -51,8 +51,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
51
51
  * @param {string | NotifyProps} config
52
52
  * @returns {{ update: (config: NotifyProps) => void; close: () => void }}
53
53
  */
54
- info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "className" | "duration" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
55
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "className" | "duration" | "getContainer" | "onClose">) => void;
54
+ info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
55
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
56
56
  close: () => void;
57
57
  };
58
58
  /**
@@ -61,8 +61,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
61
61
  * @param {string | NotifyProps} config
62
62
  * @returns {{ update: (config: NotifyProps) => void; close: () => void }}
63
63
  */
64
- success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "className" | "duration" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
65
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "className" | "duration" | "getContainer" | "onClose">) => void;
64
+ success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
65
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
66
66
  close: () => void;
67
67
  };
68
68
  /**
@@ -71,8 +71,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
71
71
  * @param {string | NotifyProps} config
72
72
  * @returns {{ update: (config: NotifyProps) => void; close: () => void }}
73
73
  */
74
- error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "className" | "duration" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
75
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "className" | "duration" | "getContainer" | "onClose">) => void;
74
+ error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
75
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
76
76
  close: () => void;
77
77
  };
78
78
  /**
@@ -81,8 +81,8 @@ declare const _default: React.ForwardRefExoticComponent<NotifyProps & React.RefA
81
81
  * @param {string | NotifyProps} config
82
82
  * @returns {{ update: (config: NotifyProps) => void; close: () => void }}
83
83
  */
84
- warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "className" | "duration" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
85
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "className" | "duration" | "getContainer" | "onClose">) => void;
84
+ warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">, context?: import("../context-provider").GlobalContextParams | undefined) => {
85
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<NotifyProps & React.RefAttributes<NotifyRef>>, "style" | "content" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose">) => void;
86
86
  close: () => void;
87
87
  };
88
88
  };
@@ -84,6 +84,8 @@ var Popover = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
84
84
  var wrapperRef = (0, _react.useRef)(null);
85
85
  var childRef = (0, _react.useRef)(null);
86
86
  var popoverRef = (0, _react.useRef)(null);
87
+ var transitionNodeRef = (0, _react.useRef)(null);
88
+ var maskRef = (0, _react.useRef)(null);
87
89
 
88
90
  var _usePosition = (0, _hooks.usePosition)(props, popoverRef, childRef, wrapperRef),
89
91
  direction = _usePosition.direction,
@@ -215,7 +217,10 @@ var Popover = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
215
217
  className: (0, _mobileUtils.cls)(theme + "-theme", innerPopoverClassName, {
216
218
  bordered: bordered
217
219
  }),
218
- ref: popoverRef,
220
+ ref: function ref(ele) {
221
+ popoverRef.current = ele;
222
+ transitionNodeRef.current = ele == null ? void 0 : ele.dom;
223
+ },
219
224
  direction: direction,
220
225
  minWidth: minWidth,
221
226
  maxWidth: maxWidth,
@@ -243,6 +248,7 @@ var Popover = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
243
248
  in: visibleState && !isCalcPosition,
244
249
  timeout: transitionTimeout,
245
250
  type: transitionName,
251
+ nodeRef: transitionNodeRef,
246
252
  mountOnEnter: true,
247
253
  unmountOnExit: true
248
254
  }, renderInnerPopover()));
@@ -251,12 +257,14 @@ var Popover = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
251
257
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showMask && /*#__PURE__*/_react.default.createElement(_portal.default, null, /*#__PURE__*/_react.default.createElement(_transition.default, {
252
258
  in: visibleState && !isCalcPosition,
253
259
  timeout: maskTransitionTimeout,
260
+ nodeRef: maskRef,
254
261
  type: "fade",
255
262
  mountOnEnter: true,
256
263
  unmountOnExit: true
257
264
  }, /*#__PURE__*/_react.default.createElement("div", {
258
265
  className: prefixCls + "-popover-mask",
259
- onClick: onClickMask
266
+ onClick: onClickMask,
267
+ ref: maskRef
260
268
  }))), /*#__PURE__*/_react.default.createElement("div", {
261
269
  className: (0, _mobileUtils.cls)(prefixCls + "-popover", className, theme + "-theme", mode + "-mode", {
262
270
  bordered: bordered,
@@ -66,11 +66,11 @@ declare const _default: React.ForwardRefExoticComponent<PopupProps & React.RefAt
66
66
  * @param {PopupProps} config Configuration
67
67
  * @returns {{ close: () => void; update: (newConfig: PopupProps) => void; }}
68
68
  */
69
- open: (config: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onTouchMove" | "onPreventTouchMove" | "getScrollContainer" | "needBottomOffset" | "translateZ"> & {
69
+ open: (config: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset"> & {
70
70
  key?: string | undefined;
71
71
  }, context?: import("../context-provider").GlobalContextParams | undefined) => {
72
72
  close: () => void;
73
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onTouchMove" | "onPreventTouchMove" | "getScrollContainer" | "needBottomOffset" | "translateZ"> & {
73
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupProps & React.RefAttributes<PopupRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchMove" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset"> & {
74
74
  key?: string | undefined;
75
75
  }) => void;
76
76
  };
@@ -76,11 +76,11 @@ declare const _default: React.ForwardRefExoticComponent<PopupSwiperProps & React
76
76
  * @param {string | PopupSwiperProps} config Configuration
77
77
  * @returns {{ close: () => void; update: (newConfig: PopupSwiperProps) => void; }}
78
78
  */
79
- open: (config: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onTouchMove" | "onPreventTouchMove" | "getScrollContainer" | "needBottomOffset" | "translateZ" | "onTouchEnd" | "onTouchStart" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
79
+ open: (config: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
80
80
  key?: string | undefined;
81
81
  }, context?: import("../context-provider").GlobalContextParams | undefined) => {
82
82
  close: () => void;
83
- update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "context" | "className" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onTouchMove" | "onPreventTouchMove" | "getScrollContainer" | "needBottomOffset" | "translateZ" | "onTouchEnd" | "onTouchStart" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
83
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "initialBodyOverflow" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
84
84
  key?: string | undefined;
85
85
  }) => void; /**
86
86
  * 内容面板 touchstart 事件,返回true时表示阻止本组件内部处理事件
@@ -32,6 +32,10 @@
32
32
  .arco-radio .radio-icon + .radio-text {
33
33
  margin-left: 0.16rem ;
34
34
  }
35
+ [dir="rtl"] .arco-radio .radio-icon + .radio-text {
36
+ margin-left: initial;
37
+ margin-right: 0.16rem ;
38
+ }
35
39
  .arco-radio.disabled .radio-text {
36
40
  opacity: 0.5 ;
37
41
  }
@@ -47,3 +51,7 @@
47
51
  .arco-radio-group .arco-radio:not(:last-child, .block) {
48
52
  margin-right: 0.48rem ;
49
53
  }
54
+ [dir="rtl"] .arco-radio-group .arco-radio:not(:last-child, .block) {
55
+ margin-right: initial;
56
+ margin-left: 0.48rem ;
57
+ }
@@ -29,7 +29,7 @@
29
29
  }
30
30
 
31
31
  .radio-icon + .radio-text {
32
- .use-var(margin-left, checkbox-icon-margin-right);
32
+ .use-var-with-rtl(margin-left, checkbox-icon-margin-right);
33
33
  }
34
34
 
35
35
  &.disabled .radio-text {
@@ -48,6 +48,6 @@
48
48
 
49
49
  .@{prefix}-radio-group {
50
50
  .@{prefix}-radio:not(:last-child, .block) {
51
- .use-var(margin-right, checkbox-group-gutter);
51
+ .use-var-with-rtl(margin-right, checkbox-group-gutter);
52
52
  }
53
53
  }
package/cjs/rate/index.js CHANGED
@@ -150,7 +150,8 @@ var Rate = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
150
150
  }
151
151
 
152
152
  return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, function (_ref2) {
153
- var prefixCls = _ref2.prefixCls;
153
+ var prefixCls = _ref2.prefixCls,
154
+ useRtl = _ref2.useRtl;
154
155
  return /*#__PURE__*/_react.default.createElement("div", {
155
156
  role: "slider",
156
157
  "aria-valuemin": 0,
@@ -166,6 +167,7 @@ var Rate = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
166
167
  // 对内的index从1开始,方便计算
167
168
  // @en The index of the pair starts from 1, which is convenient for calculation
168
169
  var index = i + 1;
170
+ var halfIndex = allowHalf ? index - 0.5 : index;
169
171
  var status = getIconStatus(index);
170
172
  return /*#__PURE__*/_react.default.createElement("div", {
171
173
  key: index,
@@ -176,12 +178,12 @@ var Rate = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
176
178
  }, renderRateIcon(prefixCls + "-rate", status, index), /*#__PURE__*/_react.default.createElement("div", {
177
179
  className: prefixCls + "-rate-icon-click-half left",
178
180
  onClick: function onClick() {
179
- return handleStarIndexChange(allowHalf ? index - 0.5 : index);
181
+ return handleStarIndexChange(useRtl ? index : halfIndex);
180
182
  }
181
183
  }), /*#__PURE__*/_react.default.createElement("div", {
182
184
  className: prefixCls + "-rate-icon-click-half right",
183
185
  onClick: function onClick() {
184
- return handleStarIndexChange(index);
186
+ return handleStarIndexChange(useRtl ? halfIndex : index);
185
187
  }
186
188
  }));
187
189
  }));
@@ -40,6 +40,10 @@
40
40
  position: absolute;
41
41
  z-index: 1;
42
42
  }
43
+ [dir="rtl"] .arco-rate-icon.half-active {
44
+ -webkit-transform: scaleX(-1);
45
+ transform: scaleX(-1);
46
+ }
43
47
  .arco-rate-icon-click-half {
44
48
  width: 50%;
45
49
  height: 100%;
@@ -38,6 +38,10 @@
38
38
  &.half-active {
39
39
  position: absolute;
40
40
  z-index: 1;
41
+
42
+ [dir="rtl"] & {
43
+ transform: scaleX(-1);
44
+ }
41
45
  }
42
46
  }
43
47
 
@@ -5,7 +5,7 @@ export declare type LinePosition = {
5
5
  length: number;
6
6
  start: number;
7
7
  };
8
- export declare const SliderContext: React.Context<Required<Pick<SliderProps, "max" | "disabled" | "style" | "size" | "step" | "type" | "className" | "onChange" | "min" | "onAfterChange" | "suffixLabel" | "prefixLabel" | "useRange" | "useAnimation" | "showTooltip" | "showMarks" | "useMarkOnly" | "draggableTrackOnly" | "formatTooltip" | "renderThumb">> & Pick<SliderProps, "value" | "defaultValue" | "marks">>;
8
+ export declare const SliderContext: React.Context<Required<Pick<SliderProps, "max" | "disabled" | "style" | "size" | "step" | "type" | "className" | "onChange" | "onAfterChange" | "min" | "suffixLabel" | "prefixLabel" | "useRange" | "useAnimation" | "showTooltip" | "showMarks" | "useMarkOnly" | "draggableTrackOnly" | "formatTooltip" | "renderThumb">> & Pick<SliderProps, "value" | "defaultValue" | "marks">>;
9
9
  export * from './useSliderIcon';
10
10
  export * from './useSliderInit';
11
11
  export * from './useSliderStyle';
@@ -24,15 +24,19 @@ function Popover(_ref) {
24
24
  _useContext$prefixCls = _useContext.prefixCls,
25
25
  prefixCls = _useContext$prefixCls === void 0 ? '' : _useContext$prefixCls;
26
26
 
27
+ var domRef = (0, _react.useRef)(null);
27
28
  return /*#__PURE__*/_react.default.createElement("div", {
28
29
  className: prefixCls + "-slider-popover-wrapper"
29
30
  }, /*#__PURE__*/_react.default.createElement(_transition.default, {
30
31
  in: visible,
31
32
  timeout: 300,
32
33
  type: "fade",
33
- mountOnEnter: true
34
+ mountOnEnter: true,
35
+ unmountOnExit: true,
36
+ nodeRef: domRef
34
37
  }, /*#__PURE__*/_react.default.createElement("div", {
35
- className: prefixCls + "-slider-popover" + (content ? '' : ' no-content')
38
+ className: prefixCls + "-slider-popover" + (content ? '' : ' no-content'),
39
+ ref: domRef
36
40
  }, /*#__PURE__*/_react.default.createElement("div", {
37
41
  className: prefixCls + "-slider-popover-content"
38
42
  }, content), /*#__PURE__*/_react.default.createElement("div", {
@@ -22,16 +22,15 @@ function useButtonClick(params) {
22
22
  updateValue = params.updateValue,
23
23
  onAddButtonClick = params.onAddButtonClick,
24
24
  onMinusButtonClick = params.onMinusButtonClick;
25
+ var minusDisable = actualInputValue <= min || disabled;
25
26
 
26
- var _useState = (0, _react.useState)(function () {
27
- return actualInputValue === min || disabled;
28
- }),
27
+ var _useState = (0, _react.useState)(minusDisable),
29
28
  minusButtonDisable = _useState[0],
30
29
  setMinusButtonDisable = _useState[1];
31
30
 
32
- var _useState2 = (0, _react.useState)(function () {
33
- return actualInputValue === max || disabled;
34
- }),
31
+ var addDisable = actualInputValue >= max || disabled;
32
+
33
+ var _useState2 = (0, _react.useState)(addDisable),
35
34
  addButtonDisable = _useState2[0],
36
35
  setAddButtonDisable = _useState2[1];
37
36
 
@@ -62,9 +61,9 @@ function useButtonClick(params) {
62
61
 
63
62
 
64
63
  (0, _react.useEffect)(function () {
65
- setMinusButtonDisable(actualInputValue <= min);
66
- setAddButtonDisable(actualInputValue >= max);
67
- }, [actualInputValue]);
64
+ setMinusButtonDisable(minusDisable);
65
+ setAddButtonDisable(addDisable);
66
+ }, [minusDisable, addDisable]);
68
67
  return {
69
68
  minusButtonDisable: minusButtonDisable,
70
69
  addButtonDisable: addButtonDisable,
@@ -10,6 +10,11 @@ export interface StickyRef {
10
10
  * @en In the local scrolling mode, if there is nested scrolling outside the container, this method can be actively called to make the sticky element actively update the fixed position
11
11
  */
12
12
  recalculatePosition: () => void;
13
+ /**
14
+ * 手动更新占位模块的高度
15
+ * @en Manually update the height of the placeholder
16
+ */
17
+ updatePlaceholderLayout: () => void;
13
18
  }
14
19
  export interface StickyEventPayload {
15
20
  /**