@arco-design/mobile-react 2.22.3 → 2.24.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 (236) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/cjs/_helpers/render.d.ts +3 -1
  5. package/cjs/_helpers/render.js +10 -3
  6. package/cjs/action-sheet/index.d.ts +5 -5
  7. package/cjs/action-sheet/index.js +4 -3
  8. package/cjs/action-sheet/methods.d.ts +1 -1
  9. package/cjs/badge/style/css/index.css +1 -2
  10. package/cjs/checkbox/checkbox.js +4 -0
  11. package/cjs/circle-progress/index.js +4 -0
  12. package/cjs/context-provider/index.d.ts +4 -0
  13. package/cjs/context-provider/index.js +14 -2
  14. package/cjs/dialog/index.d.ts +8 -8
  15. package/cjs/dialog/index.js +3 -2
  16. package/cjs/dialog/methods.d.ts +3 -3
  17. package/cjs/dialog/style/css/index.css +1 -2
  18. package/cjs/image-picker/index.js +18 -12
  19. package/cjs/image-picker/type.d.ts +10 -0
  20. package/cjs/image-preview/index.d.ts +3 -3
  21. package/cjs/image-preview/index.js +3 -2
  22. package/cjs/image-preview/methods.d.ts +2 -1
  23. package/cjs/image-preview/methods.js +2 -2
  24. package/cjs/index.d.ts +1 -0
  25. package/cjs/index.js +5 -1
  26. package/cjs/input/hooks.js +1 -0
  27. package/cjs/input/index.d.ts +5 -0
  28. package/cjs/input/index.js +6 -2
  29. package/cjs/input/style/css/index.css +1 -0
  30. package/cjs/input/style/index.less +1 -0
  31. package/cjs/masking/index.d.ts +4 -14
  32. package/cjs/masking/index.js +3 -2
  33. package/cjs/masking/methods.d.ts +3 -2
  34. package/cjs/masking/methods.js +2 -2
  35. package/cjs/nav-bar/index.d.ts +12 -0
  36. package/cjs/nav-bar/index.js +8 -2
  37. package/cjs/notify/index.d.ts +12 -12
  38. package/cjs/notify/index.js +3 -2
  39. package/cjs/notify/methods.d.ts +2 -1
  40. package/cjs/notify/methods.js +2 -2
  41. package/cjs/picker-view/components/picker-cell.js +3 -1
  42. package/cjs/popup/index.d.ts +4 -4
  43. package/cjs/popup/index.js +3 -2
  44. package/cjs/popup/methods.d.ts +1 -1
  45. package/cjs/popup-swiper/index.d.ts +12 -6
  46. package/cjs/popup-swiper/index.js +3 -2
  47. package/cjs/popup-swiper/methods.d.ts +1 -1
  48. package/cjs/progress/index.js +4 -0
  49. package/cjs/rate/index.js +5 -0
  50. package/cjs/slider/index.js +6 -1
  51. package/cjs/stepper/demo/style/css/mobile.css +4 -0
  52. package/cjs/stepper/demo/style/mobile.less +10 -0
  53. package/cjs/stepper/hooks/useButtonClick.d.ts +11 -0
  54. package/cjs/stepper/hooks/useButtonClick.js +74 -0
  55. package/cjs/stepper/hooks/useInputEvent.d.ts +9 -0
  56. package/cjs/stepper/hooks/useInputEvent.js +59 -0
  57. package/cjs/stepper/hooks/useValue.d.ts +6 -0
  58. package/cjs/stepper/hooks/useValue.js +44 -0
  59. package/cjs/stepper/index.d.ts +13 -0
  60. package/cjs/stepper/index.js +190 -0
  61. package/cjs/stepper/style/css/index.css +76 -0
  62. package/cjs/stepper/style/css/index.d.ts +2 -0
  63. package/cjs/stepper/style/css/index.js +5 -0
  64. package/cjs/stepper/style/index.d.ts +2 -0
  65. package/cjs/stepper/style/index.js +5 -0
  66. package/cjs/stepper/style/index.less +80 -0
  67. package/cjs/stepper/type.d.ts +159 -0
  68. package/cjs/stepper/type.js +3 -0
  69. package/cjs/style.d.ts +1 -0
  70. package/cjs/style.js +2 -0
  71. package/cjs/swipe-action/index.d.ts +1 -0
  72. package/cjs/swipe-action/index.js +10 -0
  73. package/cjs/switch/index.js +4 -0
  74. package/cjs/toast/index.d.ts +18 -18
  75. package/cjs/toast/index.js +3 -2
  76. package/cjs/toast/methods.d.ts +2 -1
  77. package/cjs/toast/methods.js +2 -2
  78. package/dist/index.js +463 -52
  79. package/dist/index.min.js +3 -3
  80. package/dist/style.css +77 -113
  81. package/dist/style.min.css +1 -1
  82. package/esm/_helpers/render.d.ts +3 -1
  83. package/esm/_helpers/render.js +10 -3
  84. package/esm/action-sheet/index.d.ts +5 -5
  85. package/esm/action-sheet/index.js +4 -3
  86. package/esm/action-sheet/methods.d.ts +1 -1
  87. package/esm/badge/style/css/index.css +1 -2
  88. package/esm/checkbox/checkbox.js +4 -0
  89. package/esm/circle-progress/index.js +4 -0
  90. package/esm/context-provider/index.d.ts +4 -0
  91. package/esm/context-provider/index.js +13 -2
  92. package/esm/dialog/index.d.ts +8 -8
  93. package/esm/dialog/index.js +3 -2
  94. package/esm/dialog/methods.d.ts +3 -3
  95. package/esm/dialog/style/css/index.css +1 -2
  96. package/esm/image-picker/index.js +18 -12
  97. package/esm/image-picker/type.d.ts +10 -0
  98. package/esm/image-preview/index.d.ts +3 -3
  99. package/esm/image-preview/index.js +3 -2
  100. package/esm/image-preview/methods.d.ts +2 -1
  101. package/esm/image-preview/methods.js +2 -2
  102. package/esm/index.d.ts +1 -0
  103. package/esm/index.js +1 -0
  104. package/esm/input/hooks.js +1 -0
  105. package/esm/input/index.d.ts +5 -0
  106. package/esm/input/index.js +6 -2
  107. package/esm/input/style/css/index.css +1 -0
  108. package/esm/input/style/index.less +1 -0
  109. package/esm/masking/index.d.ts +4 -14
  110. package/esm/masking/index.js +3 -2
  111. package/esm/masking/methods.d.ts +3 -2
  112. package/esm/masking/methods.js +2 -2
  113. package/esm/nav-bar/index.d.ts +12 -0
  114. package/esm/nav-bar/index.js +8 -2
  115. package/esm/notify/index.d.ts +12 -12
  116. package/esm/notify/index.js +3 -2
  117. package/esm/notify/methods.d.ts +2 -1
  118. package/esm/notify/methods.js +2 -2
  119. package/esm/picker-view/components/picker-cell.js +3 -1
  120. package/esm/popup/index.d.ts +4 -4
  121. package/esm/popup/index.js +3 -2
  122. package/esm/popup/methods.d.ts +1 -1
  123. package/esm/popup-swiper/index.d.ts +12 -6
  124. package/esm/popup-swiper/index.js +3 -2
  125. package/esm/popup-swiper/methods.d.ts +1 -1
  126. package/esm/progress/index.js +4 -0
  127. package/esm/rate/index.js +5 -0
  128. package/esm/slider/index.js +6 -1
  129. package/esm/stepper/demo/style/css/mobile.css +4 -0
  130. package/esm/stepper/demo/style/mobile.less +10 -0
  131. package/esm/stepper/hooks/useButtonClick.d.ts +11 -0
  132. package/esm/stepper/hooks/useButtonClick.js +69 -0
  133. package/esm/stepper/hooks/useInputEvent.d.ts +9 -0
  134. package/esm/stepper/hooks/useInputEvent.js +53 -0
  135. package/esm/stepper/hooks/useValue.d.ts +6 -0
  136. package/esm/stepper/hooks/useValue.js +38 -0
  137. package/esm/stepper/index.d.ts +13 -0
  138. package/esm/stepper/index.js +163 -0
  139. package/esm/stepper/style/css/index.css +76 -0
  140. package/esm/stepper/style/css/index.d.ts +2 -0
  141. package/esm/stepper/style/css/index.js +2 -0
  142. package/esm/stepper/style/index.d.ts +2 -0
  143. package/esm/stepper/style/index.js +2 -0
  144. package/esm/stepper/style/index.less +80 -0
  145. package/esm/stepper/type.d.ts +159 -0
  146. package/esm/stepper/type.js +1 -0
  147. package/esm/style.d.ts +1 -0
  148. package/esm/style.js +1 -0
  149. package/esm/swipe-action/index.d.ts +1 -0
  150. package/esm/swipe-action/index.js +1 -0
  151. package/esm/switch/index.js +4 -0
  152. package/esm/toast/index.d.ts +18 -18
  153. package/esm/toast/index.js +3 -2
  154. package/esm/toast/methods.d.ts +2 -1
  155. package/esm/toast/methods.js +2 -2
  156. package/package.json +3 -3
  157. package/style/css/public.css +4 -4
  158. package/tokens/app/arcodesign/default/css-variables.less +15 -0
  159. package/tokens/app/arcodesign/default/index.d.ts +15 -0
  160. package/tokens/app/arcodesign/default/index.js +16 -1
  161. package/tokens/app/arcodesign/default/index.json +180 -0
  162. package/tokens/app/arcodesign/default/index.less +15 -0
  163. package/umd/_helpers/render.d.ts +3 -1
  164. package/umd/_helpers/render.js +13 -7
  165. package/umd/action-sheet/index.d.ts +5 -5
  166. package/umd/action-sheet/index.js +4 -3
  167. package/umd/action-sheet/methods.d.ts +1 -1
  168. package/umd/badge/style/css/index.css +1 -2
  169. package/umd/checkbox/checkbox.js +4 -0
  170. package/umd/circle-progress/index.js +4 -0
  171. package/umd/context-provider/index.d.ts +4 -0
  172. package/umd/context-provider/index.js +13 -1
  173. package/umd/dialog/index.d.ts +8 -8
  174. package/umd/dialog/index.js +3 -2
  175. package/umd/dialog/methods.d.ts +3 -3
  176. package/umd/dialog/style/css/index.css +1 -2
  177. package/umd/image-picker/index.js +18 -12
  178. package/umd/image-picker/type.d.ts +10 -0
  179. package/umd/image-preview/index.d.ts +3 -3
  180. package/umd/image-preview/index.js +3 -2
  181. package/umd/image-preview/methods.d.ts +2 -1
  182. package/umd/image-preview/methods.js +2 -2
  183. package/umd/index.d.ts +1 -0
  184. package/umd/index.js +7 -5
  185. package/umd/input/hooks.js +1 -0
  186. package/umd/input/index.d.ts +5 -0
  187. package/umd/input/index.js +6 -2
  188. package/umd/input/style/css/index.css +1 -0
  189. package/umd/input/style/index.less +1 -0
  190. package/umd/masking/index.d.ts +4 -14
  191. package/umd/masking/index.js +3 -2
  192. package/umd/masking/methods.d.ts +3 -2
  193. package/umd/masking/methods.js +2 -2
  194. package/umd/nav-bar/index.d.ts +12 -0
  195. package/umd/nav-bar/index.js +8 -2
  196. package/umd/notify/index.d.ts +12 -12
  197. package/umd/notify/index.js +3 -2
  198. package/umd/notify/methods.d.ts +2 -1
  199. package/umd/notify/methods.js +2 -2
  200. package/umd/picker-view/components/picker-cell.js +3 -1
  201. package/umd/popup/index.d.ts +4 -4
  202. package/umd/popup/index.js +3 -2
  203. package/umd/popup/methods.d.ts +1 -1
  204. package/umd/popup-swiper/index.d.ts +12 -6
  205. package/umd/popup-swiper/index.js +3 -2
  206. package/umd/popup-swiper/methods.d.ts +1 -1
  207. package/umd/progress/index.js +4 -0
  208. package/umd/rate/index.js +5 -0
  209. package/umd/slider/index.js +6 -1
  210. package/umd/stepper/demo/style/css/mobile.css +4 -0
  211. package/umd/stepper/demo/style/mobile.less +10 -0
  212. package/umd/stepper/hooks/useButtonClick.d.ts +11 -0
  213. package/umd/stepper/hooks/useButtonClick.js +86 -0
  214. package/umd/stepper/hooks/useInputEvent.d.ts +9 -0
  215. package/umd/stepper/hooks/useInputEvent.js +71 -0
  216. package/umd/stepper/hooks/useValue.d.ts +6 -0
  217. package/umd/stepper/hooks/useValue.js +56 -0
  218. package/umd/stepper/index.d.ts +13 -0
  219. package/umd/stepper/index.js +191 -0
  220. package/umd/stepper/style/css/index.css +76 -0
  221. package/umd/stepper/style/css/index.d.ts +2 -0
  222. package/umd/stepper/style/css/index.js +15 -0
  223. package/umd/stepper/style/index.d.ts +2 -0
  224. package/umd/stepper/style/index.js +15 -0
  225. package/umd/stepper/style/index.less +80 -0
  226. package/umd/stepper/type.d.ts +159 -0
  227. package/umd/stepper/type.js +17 -0
  228. package/umd/style.d.ts +1 -0
  229. package/umd/style.js +4 -4
  230. package/umd/swipe-action/index.d.ts +1 -0
  231. package/umd/swipe-action/index.js +11 -4
  232. package/umd/switch/index.js +4 -0
  233. package/umd/toast/index.d.ts +18 -18
  234. package/umd/toast/index.js +3 -2
  235. package/umd/toast/methods.d.ts +2 -1
  236. package/umd/toast/methods.js +2 -2
package/umd/style.js CHANGED
@@ -1,15 +1,15 @@
1
1
  (function (global, factory) {
2
2
  if (typeof define === "function" && define.amd) {
3
- define(["../style/public.less", "./action-sheet/style", "./cell/style", "./loading/style", "./badge/style", "./avatar/style", "./button/style", "./carousel/style", "./toast/style", "./switch/style", "./checkbox/style", "./circle-progress/style", "./collapse/style", "./tabs/style", "./context-provider/style", "./dialog/style", "./count-down/style", "./date-picker/style", "./dropdown/style", "./dropdown-menu/style", "./ellipsis/style", "./grid/style", "./image/style", "./show-monitor/style", "./image-picker/style", "./image-preview/style", "./input/style", "./load-more/style", "./masking/style", "./nav-bar/style", "./notice-bar/style", "./notify/style", "./pagination/style", "./picker/style", "./picker-view/style", "./popover/style", "./popup/style", "./popup-swiper/style", "./portal/style", "./progress/style", "./pull-refresh/style", "./radio/style", "./rate/style", "./slider/style", "./search-bar/style", "./steps/style", "./sticky/style", "./swipe-action/style", "./swipe-load/style", "./tab-bar/style", "./tag/style", "./textarea/style", "./transition/style"], factory);
3
+ define(["../style/public.less", "./action-sheet/style", "./cell/style", "./loading/style", "./badge/style", "./avatar/style", "./button/style", "./carousel/style", "./toast/style", "./switch/style", "./checkbox/style", "./circle-progress/style", "./collapse/style", "./tabs/style", "./context-provider/style", "./dialog/style", "./count-down/style", "./date-picker/style", "./dropdown/style", "./dropdown-menu/style", "./ellipsis/style", "./grid/style", "./image/style", "./show-monitor/style", "./image-picker/style", "./image-preview/style", "./input/style", "./load-more/style", "./masking/style", "./nav-bar/style", "./notice-bar/style", "./notify/style", "./pagination/style", "./picker/style", "./picker-view/style", "./popover/style", "./popup/style", "./popup-swiper/style", "./portal/style", "./progress/style", "./pull-refresh/style", "./radio/style", "./rate/style", "./slider/style", "./search-bar/style", "./stepper/style", "./steps/style", "./sticky/style", "./swipe-action/style", "./swipe-load/style", "./tab-bar/style", "./tag/style", "./textarea/style", "./transition/style"], factory);
4
4
  } else if (typeof exports !== "undefined") {
5
- factory(require("../style/public.less"), require("./action-sheet/style"), require("./cell/style"), require("./loading/style"), require("./badge/style"), require("./avatar/style"), require("./button/style"), require("./carousel/style"), require("./toast/style"), require("./switch/style"), require("./checkbox/style"), require("./circle-progress/style"), require("./collapse/style"), require("./tabs/style"), require("./context-provider/style"), require("./dialog/style"), require("./count-down/style"), require("./date-picker/style"), require("./dropdown/style"), require("./dropdown-menu/style"), require("./ellipsis/style"), require("./grid/style"), require("./image/style"), require("./show-monitor/style"), require("./image-picker/style"), require("./image-preview/style"), require("./input/style"), require("./load-more/style"), require("./masking/style"), require("./nav-bar/style"), require("./notice-bar/style"), require("./notify/style"), require("./pagination/style"), require("./picker/style"), require("./picker-view/style"), require("./popover/style"), require("./popup/style"), require("./popup-swiper/style"), require("./portal/style"), require("./progress/style"), require("./pull-refresh/style"), require("./radio/style"), require("./rate/style"), require("./slider/style"), require("./search-bar/style"), require("./steps/style"), require("./sticky/style"), require("./swipe-action/style"), require("./swipe-load/style"), require("./tab-bar/style"), require("./tag/style"), require("./textarea/style"), require("./transition/style"));
5
+ factory(require("../style/public.less"), require("./action-sheet/style"), require("./cell/style"), require("./loading/style"), require("./badge/style"), require("./avatar/style"), require("./button/style"), require("./carousel/style"), require("./toast/style"), require("./switch/style"), require("./checkbox/style"), require("./circle-progress/style"), require("./collapse/style"), require("./tabs/style"), require("./context-provider/style"), require("./dialog/style"), require("./count-down/style"), require("./date-picker/style"), require("./dropdown/style"), require("./dropdown-menu/style"), require("./ellipsis/style"), require("./grid/style"), require("./image/style"), require("./show-monitor/style"), require("./image-picker/style"), require("./image-preview/style"), require("./input/style"), require("./load-more/style"), require("./masking/style"), require("./nav-bar/style"), require("./notice-bar/style"), require("./notify/style"), require("./pagination/style"), require("./picker/style"), require("./picker-view/style"), require("./popover/style"), require("./popup/style"), require("./popup-swiper/style"), require("./portal/style"), require("./progress/style"), require("./pull-refresh/style"), require("./radio/style"), require("./rate/style"), require("./slider/style"), require("./search-bar/style"), require("./stepper/style"), require("./steps/style"), require("./sticky/style"), require("./swipe-action/style"), require("./swipe-load/style"), require("./tab-bar/style"), require("./tag/style"), require("./textarea/style"), require("./transition/style"));
6
6
  } else {
7
7
  var mod = {
8
8
  exports: {}
9
9
  };
10
- factory(global._public, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style);
10
+ factory(global._public, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style, global.style);
11
11
  global.style = mod.exports;
12
12
  }
13
- })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_public, _style, _style2, _style3, _style4, _style5, _style6, _style7, _style8, _style9, _style10, _style11, _style12, _style13, _style14, _style15, _style16, _style17, _style18, _style19, _style20, _style21, _style22, _style23, _style24, _style25, _style26, _style27, _style28, _style29, _style30, _style31, _style32, _style33, _style34, _style35, _style36, _style37, _style38, _style39, _style40, _style41, _style42, _style43, _style44, _style45, _style46, _style47, _style48, _style49, _style50, _style51, _style52) {
13
+ })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_public, _style, _style2, _style3, _style4, _style5, _style6, _style7, _style8, _style9, _style10, _style11, _style12, _style13, _style14, _style15, _style16, _style17, _style18, _style19, _style20, _style21, _style22, _style23, _style24, _style25, _style26, _style27, _style28, _style29, _style30, _style31, _style32, _style33, _style34, _style35, _style36, _style37, _style38, _style39, _style40, _style41, _style42, _style43, _style44, _style45, _style46, _style47, _style48, _style49, _style50, _style51, _style52, _style53) {
14
14
  "use strict";
15
15
  });
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { SwipeActionProps, SwipeActionRef } from './type';
3
+ export * from './type';
3
4
  /**
4
5
  * 滑动操作组件,左右滑动拉出菜单栏
5
6
  * @en SwipeAction component, slide left and right to pull out the menu bar
@@ -1,25 +1,32 @@
1
1
  (function (global, factory) {
2
2
  if (typeof define === "function" && define.amd) {
3
- define(["exports", "@babel/runtime/helpers/extends", "react", "@arco-design/mobile-utils", "../context-provider", "./item", "../_helpers"], factory);
3
+ define(["exports", "@babel/runtime/helpers/extends", "react", "@arco-design/mobile-utils", "../context-provider", "./item", "../_helpers", "./type"], factory);
4
4
  } else if (typeof exports !== "undefined") {
5
- factory(exports, require("@babel/runtime/helpers/extends"), require("react"), require("@arco-design/mobile-utils"), require("../context-provider"), require("./item"), require("../_helpers"));
5
+ factory(exports, require("@babel/runtime/helpers/extends"), require("react"), require("@arco-design/mobile-utils"), require("../context-provider"), require("./item"), require("../_helpers"), require("./type"));
6
6
  } else {
7
7
  var mod = {
8
8
  exports: {}
9
9
  };
10
- factory(mod.exports, global._extends, global.react, global.mobileUtils, global.contextProvider, global.item, global._helpers);
10
+ factory(mod.exports, global._extends, global.react, global.mobileUtils, global.contextProvider, global.item, global._helpers, global.type);
11
11
  global.index = mod.exports;
12
12
  }
13
- })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _extends2, _react, _mobileUtils, _contextProvider, _item, _helpers) {
13
+ })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _extends2, _react, _mobileUtils, _contextProvider, _item, _helpers, _type) {
14
14
  "use strict";
15
15
 
16
16
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
17
17
 
18
18
  _exports.__esModule = true;
19
+ var _exportNames = {};
19
20
  _exports.default = void 0;
20
21
  _extends2 = _interopRequireDefault(_extends2);
21
22
  _react = _interopRequireWildcard(_react);
22
23
  _item = _interopRequireDefault(_item);
24
+ Object.keys(_type).forEach(function (key) {
25
+ if (key === "default" || key === "__esModule") return;
26
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
27
+ if (key in _exports && _exports[key] === _type[key]) return;
28
+ _exports[key] = _type[key];
29
+ });
23
30
 
24
31
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
32
 
@@ -122,6 +122,10 @@
122
122
  return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, function (_ref) {
123
123
  var prefixCls = _ref.prefixCls;
124
124
  return /*#__PURE__*/_react.default.createElement("div", {
125
+ role: "switch",
126
+ "aria-checked": switchChecked,
127
+ "aria-disabled": disabled,
128
+ tabIndex: 0,
125
129
  ref: domRef,
126
130
  className: (0, _mobileUtils.cls)(prefixCls + "-switch all-border-box", className, "type-" + platform, "system-" + system, shape, {
127
131
  checked: switchChecked,
@@ -117,7 +117,7 @@ export declare function methodsGenerator<P extends ToastBaseProps>(Comp: React.F
117
117
  * @param {string | ToastProps} config Configuration
118
118
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
119
119
  */
120
- toast: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>) => {
120
+ toast: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>, context?: import("../context-provider").GlobalContextParams | undefined) => {
121
121
  update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">>) => void;
122
122
  close: () => void;
123
123
  hide: () => void;
@@ -128,7 +128,7 @@ export declare function methodsGenerator<P extends ToastBaseProps>(Comp: React.F
128
128
  * @param {string | ToastProps} config Configuration
129
129
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
130
130
  */
131
- info: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>) => {
131
+ info: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>, context?: import("../context-provider").GlobalContextParams | undefined) => {
132
132
  update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">>) => void;
133
133
  close: () => void;
134
134
  hide: () => void;
@@ -139,7 +139,7 @@ export declare function methodsGenerator<P extends ToastBaseProps>(Comp: React.F
139
139
  * @param {string | ToastProps} config Configuration
140
140
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
141
141
  */
142
- success: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>) => {
142
+ success: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>, context?: import("../context-provider").GlobalContextParams | undefined) => {
143
143
  update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">>) => void;
144
144
  close: () => void;
145
145
  hide: () => void;
@@ -150,7 +150,7 @@ export declare function methodsGenerator<P extends ToastBaseProps>(Comp: React.F
150
150
  * @param {string | ToastProps} config Configuration
151
151
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
152
152
  */
153
- error: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>) => {
153
+ error: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>, context?: import("../context-provider").GlobalContextParams | undefined) => {
154
154
  update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">>) => void;
155
155
  close: () => void;
156
156
  hide: () => void;
@@ -161,7 +161,7 @@ export declare function methodsGenerator<P extends ToastBaseProps>(Comp: React.F
161
161
  * @param {string | ToastProps} config Configuration
162
162
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
163
163
  */
164
- loading: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>) => {
164
+ loading: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>, context?: import("../context-provider").GlobalContextParams | undefined) => {
165
165
  update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">>) => void;
166
166
  close: () => void;
167
167
  hide: () => void;
@@ -172,7 +172,7 @@ export declare function methodsGenerator<P extends ToastBaseProps>(Comp: React.F
172
172
  * @param {string | ToastProps} config Configuration
173
173
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
174
174
  */
175
- warn: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>) => {
175
+ warn: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>, context?: import("../context-provider").GlobalContextParams | undefined) => {
176
176
  update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">>) => void;
177
177
  close: () => void;
178
178
  hide: () => void;
@@ -185,8 +185,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
185
185
  * @param {string | ToastProps} config Configuration
186
186
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
187
187
  */
188
- toast: (originConfig: string | Pick<ToastProps & React.RefAttributes<ToastRef>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => {
189
- update: (newConfig: Pick<ToastProps & React.RefAttributes<ToastRef>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
188
+ toast: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "context" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
189
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "context" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
190
190
  close: () => void;
191
191
  hide: () => void;
192
192
  };
@@ -196,8 +196,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
196
196
  * @param {string | ToastProps} config Configuration
197
197
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
198
198
  */
199
- info: (originConfig: string | Pick<ToastProps & React.RefAttributes<ToastRef>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => {
200
- update: (newConfig: Pick<ToastProps & React.RefAttributes<ToastRef>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
199
+ info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "context" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
200
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "context" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
201
201
  close: () => void;
202
202
  hide: () => void;
203
203
  };
@@ -207,8 +207,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
207
207
  * @param {string | ToastProps} config Configuration
208
208
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
209
209
  */
210
- success: (originConfig: string | Pick<ToastProps & React.RefAttributes<ToastRef>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => {
211
- update: (newConfig: Pick<ToastProps & React.RefAttributes<ToastRef>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
210
+ success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "context" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
211
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "context" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
212
212
  close: () => void;
213
213
  hide: () => void;
214
214
  };
@@ -218,8 +218,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
218
218
  * @param {string | ToastProps} config Configuration
219
219
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
220
220
  */
221
- error: (originConfig: string | Pick<ToastProps & React.RefAttributes<ToastRef>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => {
222
- update: (newConfig: Pick<ToastProps & React.RefAttributes<ToastRef>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
221
+ error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "context" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
222
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "context" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
223
223
  close: () => void;
224
224
  hide: () => void;
225
225
  };
@@ -229,8 +229,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
229
229
  * @param {string | ToastProps} config Configuration
230
230
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
231
231
  */
232
- loading: (originConfig: string | Pick<ToastProps & React.RefAttributes<ToastRef>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => {
233
- update: (newConfig: Pick<ToastProps & React.RefAttributes<ToastRef>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
232
+ loading: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "context" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
233
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "context" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
234
234
  close: () => void;
235
235
  hide: () => void;
236
236
  };
@@ -240,8 +240,8 @@ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAt
240
240
  * @param {string | ToastProps} config Configuration
241
241
  * @returns {{ update: (config: ToastProps) => void; close: () => void }}
242
242
  */
243
- warn: (originConfig: string | Pick<ToastProps & React.RefAttributes<ToastRef>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => {
244
- update: (newConfig: Pick<ToastProps & React.RefAttributes<ToastRef>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
243
+ warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "context" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
244
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "context" | "getContainer" | "type" | "className" | "duration" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
245
245
  close: () => void;
246
246
  hide: () => void;
247
247
  };
@@ -219,6 +219,8 @@
219
219
  warn: (0, _methods.toast)(Comp, 'warn')
220
220
  };
221
221
  }
222
+
223
+ var ToastWithGlobalContext = (0, _contextProvider.CompWithGlobalContext)(Toast);
222
224
  /**
223
225
  * 轻提示组件,支持各个场景下调用方法。
224
226
  * @en The toast component, supports calling methods in various scenarios.
@@ -228,8 +230,7 @@
228
230
  * @name_en Toast
229
231
  */
230
232
 
231
-
232
- var _default = (0, _mobileUtils.componentWrapper)(Toast, methodsGenerator(Toast));
233
+ var _default = (0, _mobileUtils.componentWrapper)(Toast, methodsGenerator(ToastWithGlobalContext));
233
234
 
234
235
  _exports.default = _default;
235
236
  });
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { GlobalContextParams } from '../context-provider';
2
3
  export interface ToastBaseProps {
3
4
  getContainer?: () => HTMLElement;
4
5
  onClose?: (scene?: string) => void;
@@ -8,7 +9,7 @@ export interface ToastBaseProps {
8
9
  type?: string;
9
10
  loading?: boolean;
10
11
  }
11
- export declare function toast<P extends ToastBaseProps>(Component: React.FunctionComponent<P>, type?: string): (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>) => {
12
+ export declare function toast<P extends ToastBaseProps>(Component: React.FunctionComponent<P>, type?: string): (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>, context?: GlobalContextParams | undefined) => {
12
13
  update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">>) => void;
13
14
  close: () => void;
14
15
  hide: () => void;
@@ -20,7 +20,7 @@
20
20
  _extends2 = _interopRequireDefault(_extends2);
21
21
 
22
22
  function toast(Component, type) {
23
- return function (originConfig) {
23
+ return function (originConfig, context) {
24
24
  var config = typeof originConfig === 'string' ? {
25
25
  content: originConfig,
26
26
  type: 'info'
@@ -34,7 +34,7 @@
34
34
  var div = document.createElement('div');
35
35
  document.body.appendChild(div);
36
36
 
37
- var _ReactDOMRender = new _render.ReactDOMRender(Component, div),
37
+ var _ReactDOMRender = new _render.ReactDOMRender(Component, div, context),
38
38
  render = _ReactDOMRender.render,
39
39
  unmount = _ReactDOMRender.unmount;
40
40