pay-sdk-react 1.1.2 → 1.1.3

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 (239) hide show
  1. package/README.md +37 -19
  2. package/README.zh-CN.md +37 -19
  3. package/dist/css/index.css +703 -1
  4. package/dist/css/index.min.css +1 -0
  5. package/dist/es/Airwallex/airwallex-button.js +56 -36
  6. package/dist/es/Airwallex/airwallex-modal.js +41 -34
  7. package/dist/es/Airwallex/airwallex-popup.js +43 -38
  8. package/dist/es/Airwallex/airwallex.js +26 -28
  9. package/dist/es/Airwallex/index.js +1 -1
  10. package/dist/es/Airwallex/style/index.css +335 -1
  11. package/dist/es/Airwallex/style/index.min.css +1 -0
  12. package/dist/es/Alipay/alipay-button.js +39 -24
  13. package/dist/es/Alipay/alipay-modal.js +37 -31
  14. package/dist/es/Alipay/alipay.js +22 -15
  15. package/dist/es/Alipay/index.d.ts +4 -4
  16. package/dist/es/Alipay/index.js +5 -5
  17. package/dist/es/Alipay/style/index.css +18 -1
  18. package/dist/es/Alipay/style/index.min.css +1 -0
  19. package/dist/es/Button/button.js +62 -37
  20. package/dist/es/Button/index.d.ts +2 -2
  21. package/dist/es/Button/index.js +2 -2
  22. package/dist/es/Button/style/index.css +95 -1
  23. package/dist/es/Button/style/index.min.css +1 -0
  24. package/dist/es/FullScreenLoading/index.js +40 -40
  25. package/dist/es/FullScreenLoading/interface.d.ts +2 -2
  26. package/dist/es/FullScreenLoading/style/index.css +239 -1
  27. package/dist/es/FullScreenLoading/style/index.min.css +1 -0
  28. package/dist/es/MAlipay/index.js +1 -1
  29. package/dist/es/MAlipay/m-alipay-auto-submit.js +9 -11
  30. package/dist/es/MAlipay/m-alipay-button.js +71 -51
  31. package/dist/es/MAlipay/style/index.css +252 -1
  32. package/dist/es/MAlipay/style/index.min.css +1 -0
  33. package/dist/es/MWeChat/index.d.ts +2 -2
  34. package/dist/es/MWeChat/index.js +2 -2
  35. package/dist/es/MWeChat/m-wechat-button.js +70 -50
  36. package/dist/es/MWeChat/style/index.css +252 -1
  37. package/dist/es/MWeChat/style/index.min.css +1 -0
  38. package/dist/es/Mask/index.d.ts +2 -2
  39. package/dist/es/Mask/index.js +2 -2
  40. package/dist/es/Mask/mask.js +48 -45
  41. package/dist/es/Mask/style/index.css +11 -1
  42. package/dist/es/Mask/style/index.min.css +1 -0
  43. package/dist/es/PayButton/index.js +2 -2
  44. package/dist/es/PayButton/interface.d.ts +9 -9
  45. package/dist/es/PayButton/interface.js +1 -1
  46. package/dist/es/PayMask/index.d.ts +2 -2
  47. package/dist/es/PayMask/index.js +2 -2
  48. package/dist/es/PayMask/interface.d.ts +2 -2
  49. package/dist/es/PayMask/pay-mask.js +41 -40
  50. package/dist/es/PayMask/style/index.css +62 -1
  51. package/dist/es/PayMask/style/index.min.css +1 -0
  52. package/dist/es/Paypal/index.d.ts +2 -2
  53. package/dist/es/Paypal/index.js +2 -2
  54. package/dist/es/Paypal/paypal-button.js +55 -36
  55. package/dist/es/Paypal/style/index.css +207 -1
  56. package/dist/es/Paypal/style/index.min.css +1 -0
  57. package/dist/es/Payssion/index.d.ts +2 -2
  58. package/dist/es/Payssion/index.js +2 -2
  59. package/dist/es/Payssion/payssion-button.js +56 -37
  60. package/dist/es/Payssion/style/index.css +157 -1
  61. package/dist/es/Payssion/style/index.min.css +1 -0
  62. package/dist/es/Stripe/index.d.ts +5 -5
  63. package/dist/es/Stripe/index.js +6 -6
  64. package/dist/es/Stripe/stripe-button.js +47 -33
  65. package/dist/es/Stripe/stripe-modal.js +38 -32
  66. package/dist/es/Stripe/stripe-popup.js +42 -37
  67. package/dist/es/Stripe/stripe.js +15 -15
  68. package/dist/es/Stripe/style/index.css +365 -1
  69. package/dist/es/Stripe/style/index.min.css +1 -0
  70. package/dist/es/Wechat/index.d.ts +4 -4
  71. package/dist/es/Wechat/index.js +5 -5
  72. package/dist/es/Wechat/style/index.css +25 -1
  73. package/dist/es/Wechat/style/index.min.css +1 -0
  74. package/dist/es/Wechat/wechat-button.js +38 -23
  75. package/dist/es/Wechat/wechat-modal.js +37 -31
  76. package/dist/es/Wechat/wechat.js +16 -12
  77. package/dist/es/confirm-modal/index.js +38 -39
  78. package/dist/es/confirm-modal/interface.d.ts +2 -2
  79. package/dist/es/confirm-modal/style/index.css +95 -1
  80. package/dist/es/confirm-modal/style/index.min.css +1 -0
  81. package/dist/es/dot-loading/dot-loading.js +25 -23
  82. package/dist/es/dot-loading/index.d.ts +2 -2
  83. package/dist/es/dot-loading/index.js +2 -2
  84. package/dist/es/dot-loading/style/index.css +3 -1
  85. package/dist/es/dot-loading/style/index.min.css +1 -0
  86. package/dist/es/hooks/use-initialized.js +2 -2
  87. package/dist/es/hooks/use-inner-visible.js +8 -4
  88. package/dist/es/hooks/use-lock-scroll.d.ts +2 -2
  89. package/dist/es/hooks/use-lock-scroll.js +30 -34
  90. package/dist/es/hooks/use-touch.d.ts +1 -1
  91. package/dist/es/hooks/use-touch.js +35 -31
  92. package/dist/es/hooks/usePayWindowOpen.d.ts +1 -1
  93. package/dist/es/hooks/usePayWindowOpen.js +31 -27
  94. package/dist/es/icons/IconAlipay/index.js +18 -16
  95. package/dist/es/icons/IconClose/index.js +24 -22
  96. package/dist/es/icons/IconPaypalText/index.js +24 -22
  97. package/dist/es/icons/IconPaypalWhite/index.js +19 -17
  98. package/dist/es/icons/IconPayssionPay/index.js +47 -45
  99. package/dist/es/icons/IconStripe/index.js +19 -17
  100. package/dist/es/icons/IconStripeText/index.js +19 -17
  101. package/dist/es/icons/IconWechatPay/index.js +18 -16
  102. package/dist/es/icons/interface.d.ts +1 -1
  103. package/dist/es/icons/style/index.css +45 -1
  104. package/dist/es/icons/style/index.min.css +1 -0
  105. package/dist/es/pay-modal/index.d.ts +2 -2
  106. package/dist/es/pay-modal/index.js +2 -2
  107. package/dist/es/pay-modal/pay-modal.js +45 -48
  108. package/dist/es/pay-modal/style/index.css +95 -1
  109. package/dist/es/pay-modal/style/index.min.css +1 -0
  110. package/dist/es/pay-popup/index.js +51 -53
  111. package/dist/es/pay-popup/interface.d.ts +6 -6
  112. package/dist/es/pay-popup/style/index.css +145 -1
  113. package/dist/es/pay-popup/style/index.min.css +1 -0
  114. package/dist/es/shared/enums/index.js +1 -1
  115. package/dist/es/shared/index.d.ts +1 -1
  116. package/dist/es/shared/index.js +1 -1
  117. package/dist/es/utils/can-use-dom.js +1 -1
  118. package/dist/es/utils/classNames.js +15 -11
  119. package/dist/es/utils/dom.js +18 -18
  120. package/dist/es/utils/get-container.js +2 -2
  121. package/dist/es/utils/get-scroll-parent.js +8 -9
  122. package/dist/es/utils/is.js +54 -32
  123. package/dist/es/utils/native-props.d.ts +2 -2
  124. package/dist/es/utils/native-props.js +7 -9
  125. package/dist/es/utils/omit.js +3 -5
  126. package/dist/es/utils/qrcode.js +5 -5
  127. package/dist/es/utils/render-to-container.d.ts +1 -1
  128. package/dist/es/utils/render-to-container.js +4 -4
  129. package/dist/es/utils/should-render.d.ts +1 -1
  130. package/dist/es/utils/should-render.js +4 -4
  131. package/dist/es/utils/supports-passive.js +8 -7
  132. package/dist/es/utils/warning.js +0 -1
  133. package/dist/es/utils/with-default-props.js +6 -4
  134. package/dist/es/utils/with-stop-propagation.d.ts +3 -3
  135. package/dist/es/utils/with-stop-propagation.js +27 -14
  136. package/dist/lib/Airwallex/airwallex-button.js +12 -15
  137. package/dist/lib/Airwallex/airwallex-modal.js +11 -14
  138. package/dist/lib/Airwallex/airwallex-popup.js +16 -23
  139. package/dist/lib/Airwallex/airwallex.js +20 -25
  140. package/dist/lib/Airwallex/index.js +1 -1
  141. package/dist/lib/Airwallex/style/index.css +335 -1
  142. package/dist/lib/Airwallex/style/index.min.css +1 -0
  143. package/dist/lib/Alipay/alipay-button.js +12 -15
  144. package/dist/lib/Alipay/alipay-modal.js +9 -12
  145. package/dist/lib/Alipay/alipay.js +19 -23
  146. package/dist/lib/Alipay/index.js +1 -1
  147. package/dist/lib/Alipay/style/index.css +18 -1
  148. package/dist/lib/Alipay/style/index.min.css +1 -0
  149. package/dist/lib/Button/button.js +13 -13
  150. package/dist/lib/Button/index.js +1 -1
  151. package/dist/lib/Button/style/index.css +95 -1
  152. package/dist/lib/Button/style/index.min.css +1 -0
  153. package/dist/lib/FullScreenLoading/index.js +28 -29
  154. package/dist/lib/FullScreenLoading/style/index.css +239 -1
  155. package/dist/lib/FullScreenLoading/style/index.min.css +1 -0
  156. package/dist/lib/MAlipay/index.js +1 -1
  157. package/dist/lib/MAlipay/m-alipay-auto-submit.js +3 -4
  158. package/dist/lib/MAlipay/m-alipay-button.js +34 -44
  159. package/dist/lib/MAlipay/style/index.css +252 -1
  160. package/dist/lib/MAlipay/style/index.min.css +1 -0
  161. package/dist/lib/MWeChat/index.js +2 -2
  162. package/dist/lib/MWeChat/m-wechat-button.js +34 -44
  163. package/dist/lib/MWeChat/style/index.css +252 -1
  164. package/dist/lib/MWeChat/style/index.min.css +1 -0
  165. package/dist/lib/Mask/index.js +1 -1
  166. package/dist/lib/Mask/mask.js +6 -11
  167. package/dist/lib/Mask/style/index.css +11 -1
  168. package/dist/lib/Mask/style/index.min.css +1 -0
  169. package/dist/lib/PayButton/index.js +10 -10
  170. package/dist/lib/PayMask/index.js +1 -1
  171. package/dist/lib/PayMask/pay-mask.js +20 -23
  172. package/dist/lib/PayMask/style/index.css +62 -1
  173. package/dist/lib/PayMask/style/index.min.css +1 -0
  174. package/dist/lib/Paypal/index.js +2 -2
  175. package/dist/lib/Paypal/paypal-button.js +17 -22
  176. package/dist/lib/Paypal/style/index.css +207 -1
  177. package/dist/lib/Paypal/style/index.min.css +1 -0
  178. package/dist/lib/Payssion/index.js +2 -2
  179. package/dist/lib/Payssion/payssion-button.js +17 -22
  180. package/dist/lib/Payssion/style/index.css +157 -1
  181. package/dist/lib/Payssion/style/index.min.css +1 -0
  182. package/dist/lib/Stripe/index.js +1 -1
  183. package/dist/lib/Stripe/stripe-button.js +14 -17
  184. package/dist/lib/Stripe/stripe-modal.js +10 -13
  185. package/dist/lib/Stripe/stripe-popup.js +16 -23
  186. package/dist/lib/Stripe/stripe.js +8 -11
  187. package/dist/lib/Stripe/style/index.css +365 -1
  188. package/dist/lib/Stripe/style/index.min.css +1 -0
  189. package/dist/lib/Wechat/index.js +1 -1
  190. package/dist/lib/Wechat/style/index.css +25 -1
  191. package/dist/lib/Wechat/style/index.min.css +1 -0
  192. package/dist/lib/Wechat/wechat-button.js +12 -15
  193. package/dist/lib/Wechat/wechat-modal.js +9 -12
  194. package/dist/lib/Wechat/wechat.js +11 -12
  195. package/dist/lib/confirm-modal/index.js +17 -26
  196. package/dist/lib/confirm-modal/style/index.css +95 -1
  197. package/dist/lib/confirm-modal/style/index.min.css +1 -0
  198. package/dist/lib/dot-loading/dot-loading.js +3 -4
  199. package/dist/lib/dot-loading/index.js +1 -1
  200. package/dist/lib/dot-loading/style/index.css +3 -1
  201. package/dist/lib/dot-loading/style/index.min.css +1 -0
  202. package/dist/lib/hooks/use-lock-scroll.js +11 -12
  203. package/dist/lib/hooks/use-touch.js +10 -10
  204. package/dist/lib/hooks/usePayWindowOpen.js +14 -15
  205. package/dist/lib/icons/IconAlipay/index.js +6 -6
  206. package/dist/lib/icons/IconClose/index.js +8 -8
  207. package/dist/lib/icons/IconPaypalText/index.js +7 -7
  208. package/dist/lib/icons/IconPaypalWhite/index.js +6 -6
  209. package/dist/lib/icons/IconPayssionPay/index.js +13 -13
  210. package/dist/lib/icons/IconStripe/index.js +6 -6
  211. package/dist/lib/icons/IconStripeText/index.js +6 -6
  212. package/dist/lib/icons/IconWechatPay/index.js +6 -6
  213. package/dist/lib/icons/index.js +2 -2
  214. package/dist/lib/icons/style/index.css +45 -1
  215. package/dist/lib/icons/style/index.min.css +1 -0
  216. package/dist/lib/index.js +2 -2
  217. package/dist/lib/pay-modal/index.js +1 -1
  218. package/dist/lib/pay-modal/pay-modal.js +24 -30
  219. package/dist/lib/pay-modal/style/index.css +95 -1
  220. package/dist/lib/pay-modal/style/index.min.css +1 -0
  221. package/dist/lib/pay-popup/index.js +24 -28
  222. package/dist/lib/pay-popup/style/index.css +145 -1
  223. package/dist/lib/pay-popup/style/index.min.css +1 -0
  224. package/dist/lib/utils/can-use-dom.js +1 -1
  225. package/dist/lib/utils/classNames.js +6 -7
  226. package/dist/lib/utils/dom.js +9 -11
  227. package/dist/lib/utils/get-scroll-parent.js +2 -3
  228. package/dist/lib/utils/getPrefixCls.js +1 -1
  229. package/dist/lib/utils/is.js +16 -14
  230. package/dist/lib/utils/native-props.js +10 -10
  231. package/dist/lib/utils/omit.js +3 -6
  232. package/dist/lib/utils/qrcode.js +1 -1
  233. package/dist/lib/utils/supports-passive.js +4 -3
  234. package/dist/lib/utils/warning.js +2 -6
  235. package/dist/lib/utils/with-default-props.js +4 -8
  236. package/dist/lib/utils/with-stop-propagation.js +6 -9
  237. package/dist/umd/pay-sdk-react.umd.js +61 -63
  238. package/dist/umd/pay-sdk-react.umd.js.map +1 -1
  239. package/package.json +5 -2
@@ -1,21 +1,23 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
+ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
2
2
  import React from 'react';
3
3
  import omit from '../../utils/omit';
4
4
  import { getPrefixCls } from '../../utils/getPrefixCls';
5
- const classPrefix = getPrefixCls('icon');
6
- const IconWechatPay = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement("svg", _extends({
7
- ref: ref,
8
- d: "1750765734858",
9
- viewBox: "0 0 1024 1024",
10
- version: "1.1",
11
- xmlns: "http://www.w3.org/2000/svg",
12
- "p-id": "6038",
13
- stroke: "currentColor",
14
- className: "".concat(classPrefix, " ").concat(classPrefix, "-wechat-pay")
15
- }, omit(props, ['className'])), /*#__PURE__*/React.createElement("path", {
16
- d: "M964.16 294.4c-3.328-5.568-5.888-5.76-11.168-2.528-17.44 10.56-35.168 20.64-52.864 30.752-45.024 25.76-90.144 51.424-135.2 77.184-53.344 30.464-106.688 60.896-159.936 91.488-75.328 43.264-150.56 86.656-225.856 129.984-21.056 12.096-41.184 5.6-51.232-16.48-8.448-18.432-16.992-36.832-25.44-55.264-21.92-48.032-43.84-96.064-65.696-144.128-4.032-8.864-2.528-15.264 4.16-20.8 6.304-5.28 13.824-5.248 21.568 0.256 35.136 24.864 70.08 49.92 105.376 74.56 15.84 11.072 33.12 12.64 51.008 4.8 45.824-20.16 91.648-40.224 137.376-60.48 64.928-28.8 129.728-57.76 194.624-86.528a30516.544 30516.544 0 0 1 165.056-72.8c7.136-3.104 7.616-5.44 2.56-11.104-40.96-45.664-89.376-81.248-144.32-108.864a568.64 568.64 0 0 0-159.488-52.064c-33.728-5.856-67.84-9.536-99.712-7.68-45.92-1.28-88.576 3.968-130.976 13.088a560.096 560.096 0 0 0-98.976 30.784c-85.76 35.904-157.696 89.216-211.008 165.76C30.816 336.32 8.352 405.12 7.776 480.48a340.96 340.96 0 0 0 15.264 102.656c20.16 66.24 56.832 122.016 106.176 170.24 16.832 16.416 35.136 31.072 53.792 45.28 11.584 8.8 15.552 20.704 12.224 34.048-6.752 27.136-14.72 54.016-22.144 80.992l-3.648 13.696a15.776 15.776 0 0 0 6.304 17.792c6.496 4.544 13.76 3.424 20.576-0.48 36.352-20.8 72.704-41.6 109.12-62.272 10.624-6.048 21.888-10.528 34.432-8.032 9.312 1.824 18.496 4.416 27.68 6.912 39.36 10.656 79.616 15.808 120.288 17.216 41.248 1.408 82.304-0.64 123.2-7.424 34.112-5.632 67.584-13.504 99.872-25.216 58.976-21.344 113.568-50.72 161.6-91.424 66.944-56.64 113.856-125.6 134.88-211.104a349.12 349.12 0 0 0 5.184-139.2c-7.36-46.304-24.224-89.44-48.416-129.792",
17
- fill: "#0DC803",
18
- "p-id": "6039"
19
- })));
5
+ var classPrefix = getPrefixCls('icon');
6
+ var IconWechatPay = /*#__PURE__*/React.forwardRef(function (props, ref) {
7
+ return /*#__PURE__*/React.createElement("svg", _extends({
8
+ ref: ref,
9
+ d: "1750765734858",
10
+ viewBox: "0 0 1024 1024",
11
+ version: "1.1",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ "data-p-id": "6038",
14
+ stroke: "currentColor",
15
+ className: "".concat(classPrefix, " ").concat(classPrefix, "-wechat-pay")
16
+ }, omit(props, ['className'])), /*#__PURE__*/React.createElement("path", {
17
+ d: "M964.16 294.4c-3.328-5.568-5.888-5.76-11.168-2.528-17.44 10.56-35.168 20.64-52.864 30.752-45.024 25.76-90.144 51.424-135.2 77.184-53.344 30.464-106.688 60.896-159.936 91.488-75.328 43.264-150.56 86.656-225.856 129.984-21.056 12.096-41.184 5.6-51.232-16.48-8.448-18.432-16.992-36.832-25.44-55.264-21.92-48.032-43.84-96.064-65.696-144.128-4.032-8.864-2.528-15.264 4.16-20.8 6.304-5.28 13.824-5.248 21.568 0.256 35.136 24.864 70.08 49.92 105.376 74.56 15.84 11.072 33.12 12.64 51.008 4.8 45.824-20.16 91.648-40.224 137.376-60.48 64.928-28.8 129.728-57.76 194.624-86.528a30516.544 30516.544 0 0 1 165.056-72.8c7.136-3.104 7.616-5.44 2.56-11.104-40.96-45.664-89.376-81.248-144.32-108.864a568.64 568.64 0 0 0-159.488-52.064c-33.728-5.856-67.84-9.536-99.712-7.68-45.92-1.28-88.576 3.968-130.976 13.088a560.096 560.096 0 0 0-98.976 30.784c-85.76 35.904-157.696 89.216-211.008 165.76C30.816 336.32 8.352 405.12 7.776 480.48a340.96 340.96 0 0 0 15.264 102.656c20.16 66.24 56.832 122.016 106.176 170.24 16.832 16.416 35.136 31.072 53.792 45.28 11.584 8.8 15.552 20.704 12.224 34.048-6.752 27.136-14.72 54.016-22.144 80.992l-3.648 13.696a15.776 15.776 0 0 0 6.304 17.792c6.496 4.544 13.76 3.424 20.576-0.48 36.352-20.8 72.704-41.6 109.12-62.272 10.624-6.048 21.888-10.528 34.432-8.032 9.312 1.824 18.496 4.416 27.68 6.912 39.36 10.656 79.616 15.808 120.288 17.216 41.248 1.408 82.304-0.64 123.2-7.424 34.112-5.632 67.584-13.504 99.872-25.216 58.976-21.344 113.568-50.72 161.6-91.424 66.944-56.64 113.856-125.6 134.88-211.104a349.12 349.12 0 0 0 5.184-139.2c-7.36-46.304-24.224-89.44-48.416-129.792",
18
+ fill: "#0DC803",
19
+ "data-p-id": "6039"
20
+ }));
21
+ });
20
22
  IconWechatPay.displayName = 'IconWechatPay';
21
23
  export default IconWechatPay;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export interface IconProps extends React.SVGAttributes<SVGElement> {
3
3
  style?: React.CSSProperties;
4
4
  spin?: boolean;
@@ -1 +1,45 @@
1
- .pay-icon{display:inline-block;color:inherit;width:16px;vertical-align:-2px;stroke:currentColor}.pay-icon[fill=currentColor]{fill:currentColor;stroke:none}.pay-icon[stroke=currentColor]{stroke:currentColor;fill:none}.pay-icon[fill=currentColor][stroke=currentColor]{fill:currentColor;stroke:currentColor}.pay-icon-paypal-text{width:64px;height:26px;max-width:72px;max-height:32px}.pay-icon-close{width:18px;height:18px}.pay-icon-stripe-text{width:24px;height:24px}.pay-icon-alipay{width:20px;height:20px}.pay-icon-wechat-pay{width:20px;height:20px}.pay-icon-payssion-pay{width:36px;height:20px}
1
+ .pay-icon {
2
+ display: inline-block;
3
+ color: inherit;
4
+ width: 16px;
5
+ vertical-align: -2px;
6
+ stroke: currentColor;
7
+ }
8
+ .pay-icon[fill='currentColor'] {
9
+ fill: currentColor;
10
+ stroke: none;
11
+ }
12
+ .pay-icon[stroke='currentColor'] {
13
+ stroke: currentColor;
14
+ fill: none;
15
+ }
16
+ .pay-icon[fill='currentColor'][stroke='currentColor'] {
17
+ fill: currentColor;
18
+ stroke: currentColor;
19
+ }
20
+ .pay-icon-paypal-text {
21
+ width: 64px;
22
+ height: 26px;
23
+ max-width: 72px;
24
+ max-height: 32px;
25
+ }
26
+ .pay-icon-close {
27
+ width: 18px;
28
+ height: 18px;
29
+ }
30
+ .pay-icon-stripe-text {
31
+ width: 24px;
32
+ height: 24px;
33
+ }
34
+ .pay-icon-alipay {
35
+ width: 20px;
36
+ height: 20px;
37
+ }
38
+ .pay-icon-wechat-pay {
39
+ width: 20px;
40
+ height: 20px;
41
+ }
42
+ .pay-icon-payssion-pay {
43
+ width: 36px;
44
+ height: 20px;
45
+ }
@@ -0,0 +1 @@
1
+ .pay-icon{display:inline-block;color:inherit;width:16px;vertical-align:-2px;stroke:currentColor}.pay-icon[fill=currentColor]{fill:currentColor;stroke:none}.pay-icon[stroke=currentColor]{stroke:currentColor;fill:none}.pay-icon[fill=currentColor][stroke=currentColor]{fill:currentColor;stroke:currentColor}.pay-icon-paypal-text{width:64px;height:26px;max-width:72px;max-height:32px}.pay-icon-close{width:18px;height:18px}.pay-icon-stripe-text{width:24px;height:24px}.pay-icon-alipay{width:20px;height:20px}.pay-icon-wechat-pay{width:20px;height:20px}.pay-icon-payssion-pay{width:36px;height:20px}
@@ -1,3 +1,3 @@
1
- import PayModal from "./pay-modal";
2
- export * from "./interface";
1
+ import PayModal from './pay-modal';
2
+ export * from './interface';
3
3
  export default PayModal;
@@ -1,3 +1,3 @@
1
- import PayModal from "./pay-modal";
2
- export * from "./interface";
1
+ import PayModal from './pay-modal';
2
+ export * from './interface';
3
3
  export default PayModal;
@@ -1,8 +1,7 @@
1
- const _excluded = ["className", "children"],
1
+ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
2
+ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["className", "children"],
2
4
  _excluded2 = ["className", "children"];
3
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
5
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
6
5
  import React, { useCallback, useEffect, useRef } from 'react';
7
6
  import ReactDOM from 'react-dom';
8
7
  import { isFunction } from '../utils/is';
@@ -11,75 +10,73 @@ import { useLockScroll } from '../hooks/use-lock-scroll';
11
10
  import { clientDocument } from '../utils/dom';
12
11
  import { getPrefixCls } from '../utils/getPrefixCls';
13
12
  import Button from '../Button';
14
- const classPrefix = getPrefixCls('modal');
15
- const PayModal = props => {
16
- const {
17
- visible,
18
- title,
19
- desc,
20
- retryButtonProps,
21
- finishButtonProps,
22
- icon,
23
- showClose = true,
24
- maskClosable = false,
25
- onClose,
26
- children,
27
- footer,
28
- className,
29
- style,
30
- contentClassName,
31
- contentStyle,
32
- container
33
- } = props;
34
- const _ref = retryButtonProps || {},
35
- {
36
- className: retryButtonClassName,
37
- children: retryButtonChildren = '重新支付'
38
- } = _ref,
13
+ var classPrefix = getPrefixCls('modal');
14
+ var PayModal = function PayModal(props) {
15
+ var visible = props.visible,
16
+ title = props.title,
17
+ desc = props.desc,
18
+ retryButtonProps = props.retryButtonProps,
19
+ finishButtonProps = props.finishButtonProps,
20
+ icon = props.icon,
21
+ _props$showClose = props.showClose,
22
+ showClose = _props$showClose === void 0 ? true : _props$showClose,
23
+ _props$maskClosable = props.maskClosable,
24
+ maskClosable = _props$maskClosable === void 0 ? false : _props$maskClosable,
25
+ onClose = props.onClose,
26
+ children = props.children,
27
+ footer = props.footer,
28
+ className = props.className,
29
+ style = props.style,
30
+ contentClassName = props.contentClassName,
31
+ contentStyle = props.contentStyle,
32
+ container = props.container;
33
+ var _ref = retryButtonProps || {},
34
+ retryButtonClassName = _ref.className,
35
+ _ref$children = _ref.children,
36
+ retryButtonChildren = _ref$children === void 0 ? '重新支付' : _ref$children,
39
37
  retryButtonPropsRest = _objectWithoutProperties(_ref, _excluded);
40
- const _ref2 = finishButtonProps || {},
41
- {
42
- className: finishButtonClassName,
43
- children: finishButtonChildren = '支付完成'
44
- } = _ref2,
38
+ var _ref2 = finishButtonProps || {},
39
+ finishButtonClassName = _ref2.className,
40
+ _ref2$children = _ref2.children,
41
+ finishButtonChildren = _ref2$children === void 0 ? '支付完成' : _ref2$children,
45
42
  finishButtonPropsRest = _objectWithoutProperties(_ref2, _excluded2);
46
- const el = useRef(clientDocument === null || clientDocument === void 0 ? void 0 : clientDocument.createElement('div'));
47
- const ref = useRef(null);
43
+ var el = useRef(clientDocument === null || clientDocument === void 0 ? void 0 : clientDocument.createElement('div'));
44
+ var ref = useRef(null);
48
45
  useLockScroll(ref, !!visible);
49
- useEffect(() => {
46
+ useEffect(function () {
50
47
  if (visible) {
51
- const mountNode = container || document.body;
52
- const currentEl = el.current;
48
+ var mountNode = container || document.body;
49
+ var currentEl = el.current;
53
50
  if (currentEl) {
54
51
  mountNode.appendChild(currentEl);
55
52
  }
56
- return () => {
53
+ return function () {
57
54
  if (currentEl && mountNode.contains(currentEl)) {
58
55
  mountNode.removeChild(currentEl);
59
56
  }
60
57
  };
61
58
  }
62
59
  }, [visible, container]);
63
- const classNames = cs(classPrefix, className);
64
- const contentClassNames = cs("".concat(classPrefix, "__content"), contentClassName);
65
- const handleMaskClose = useCallback(() => {
60
+ var classNames = cs(classPrefix, className);
61
+ var contentClassNames = cs("".concat(classPrefix, "__content"), contentClassName);
62
+ var handleMaskClose = useCallback(function () {
66
63
  if (maskClosable) onClose === null || onClose === void 0 || onClose();
67
64
  }, [maskClosable, onClose]);
68
- const renderFooter = () => {
65
+ var renderFooter = function renderFooter() {
69
66
  if (footer === null) return;
70
- const retryButtonNode = /*#__PURE__*/React.createElement(Button, _extends({
67
+ var retryButtonNode = /*#__PURE__*/React.createElement(Button, _extends({
71
68
  className: cs("".concat(classPrefix, "__btn"), "".concat(classPrefix, "__btn--retry"), retryButtonClassName)
72
69
  }, retryButtonPropsRest), retryButtonChildren);
73
- const finishButtonNode = /*#__PURE__*/React.createElement(Button, _extends({
70
+ var finishButtonNode = /*#__PURE__*/React.createElement(Button, _extends({
74
71
  className: cs("".concat(classPrefix, "__btn"), "".concat(classPrefix, "__btn--finish"), finishButtonClassName)
75
72
  }, finishButtonPropsRest), finishButtonChildren);
76
- const footerContent = isFunction(footer) ? footer(retryButtonNode, finishButtonNode) : footer || /*#__PURE__*/React.createElement(React.Fragment, null, retryButtonNode, finishButtonNode);
73
+ var footerContent = isFunction(footer) ? footer(retryButtonNode, finishButtonNode) : footer || /*#__PURE__*/React.createElement(React.Fragment, null, retryButtonNode, finishButtonNode);
77
74
  return /*#__PURE__*/React.createElement("div", {
78
75
  className: "".concat(classPrefix, "__actions")
79
76
  }, footerContent);
80
77
  };
81
78
  if (!visible || !el.current) return null;
82
- const modalContent = /*#__PURE__*/React.createElement("div", {
79
+ var modalContent = /*#__PURE__*/React.createElement("div", {
83
80
  className: classNames,
84
81
  style: style
85
82
  }, /*#__PURE__*/React.createElement("div", {
@@ -1 +1,95 @@
1
- .pay-modal{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-modal__mask{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(0,0,0,.55);z-index:0}.pay-modal__content{position:relative;z-index:1;background:#fff;border-radius:16px;padding:42px 20px 20px 20px;min-width:280px;max-width:80vw;box-shadow:0 4px 24px #0001;text-align:center;max-height:60vh;display:flex;flex-direction:column}.pay-modal__close{position:absolute;right:12px;top:12px;background:0 0;border:none;font-size:28px;cursor:pointer;text-align:left}.pay-modal__icon{margin-bottom:8px;font-size:40px}.pay-modal__title{font-size:20px;font-weight:700;color:#222;margin-bottom:12px}.pay-modal__desc{color:#222;font-size:15px;margin-bottom:24px;line-height:1.7;text-align:left}.pay-modal__content-wrapper{position:relative;z-index:1;text-align:center;overflow-y:auto;flex:1;min-height:0}.pay-modal__actions{display:flex;justify-content:center;gap:16px;margin-top:16px}.pay-modal__btn{min-width:96px;padding:8px 0;border-radius:24px;border:none;font-size:15px;font-weight:600;cursor:pointer;transition:background .2s}.pay-modal__btn--retry{background:#fff;color:#f25a5a;border:1.5px solid #f25a5a}.pay-modal__btn--finish{background:#f25a5a;color:#fff;border:none}
1
+ .pay-modal {
2
+ position: fixed;
3
+ z-index: 9999;
4
+ left: 0;
5
+ top: 0;
6
+ right: 0;
7
+ bottom: 0;
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ }
12
+ .pay-modal__mask {
13
+ position: absolute;
14
+ left: 0;
15
+ top: 0;
16
+ right: 0;
17
+ bottom: 0;
18
+ background: rgba(0, 0, 0, 0.55);
19
+ z-index: 0;
20
+ }
21
+ .pay-modal__content {
22
+ position: relative;
23
+ z-index: 1;
24
+ background: #fff;
25
+ border-radius: 16px;
26
+ padding: 42px 20px 20px 20px;
27
+ min-width: 280px;
28
+ max-width: 80vw;
29
+ box-shadow: 0 4px 24px #0001;
30
+ text-align: center;
31
+ max-height: 60vh;
32
+ display: flex;
33
+ flex-direction: column;
34
+ }
35
+ .pay-modal__close {
36
+ position: absolute;
37
+ right: 12px;
38
+ top: 12px;
39
+ background: none;
40
+ border: none;
41
+ font-size: 28px;
42
+ cursor: pointer;
43
+ text-align: left;
44
+ }
45
+ .pay-modal__icon {
46
+ margin-bottom: 8px;
47
+ font-size: 40px;
48
+ }
49
+ .pay-modal__title {
50
+ font-size: 20px;
51
+ font-weight: 700;
52
+ color: #222;
53
+ margin-bottom: 12px;
54
+ }
55
+ .pay-modal__desc {
56
+ color: #222;
57
+ font-size: 15px;
58
+ margin-bottom: 24px;
59
+ line-height: 1.7;
60
+ text-align: left;
61
+ }
62
+ .pay-modal__content-wrapper {
63
+ position: relative;
64
+ z-index: 1;
65
+ text-align: center;
66
+ overflow-y: auto;
67
+ flex: 1;
68
+ min-height: 0;
69
+ }
70
+ .pay-modal__actions {
71
+ display: flex;
72
+ justify-content: center;
73
+ gap: 16px;
74
+ margin-top: 16px;
75
+ }
76
+ .pay-modal__btn {
77
+ min-width: 96px;
78
+ padding: 8px 0;
79
+ border-radius: 24px;
80
+ border: none;
81
+ font-size: 15px;
82
+ font-weight: 600;
83
+ cursor: pointer;
84
+ transition: background 0.2s;
85
+ }
86
+ .pay-modal__btn--retry {
87
+ background: #fff;
88
+ color: #f25a5a;
89
+ border: 1.5px solid #f25a5a;
90
+ }
91
+ .pay-modal__btn--finish {
92
+ background: #f25a5a;
93
+ color: #fff;
94
+ border: none;
95
+ }
@@ -0,0 +1 @@
1
+ .pay-modal{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-modal__mask{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(0,0,0,.55);z-index:0}.pay-modal__content{position:relative;z-index:1;background:#fff;border-radius:16px;padding:42px 20px 20px;min-width:280px;max-width:80vw;box-shadow:0 4px 24px #0001;text-align:center;max-height:60vh;display:flex;flex-direction:column}.pay-modal__close{position:absolute;right:12px;top:12px;background:0 0;border:none;font-size:28px;cursor:pointer;text-align:left}.pay-modal__icon{margin-bottom:8px;font-size:40px}.pay-modal__title{font-size:20px;font-weight:700;color:#222;margin-bottom:12px}.pay-modal__desc{color:#222;font-size:15px;margin-bottom:24px;line-height:1.7;text-align:left}.pay-modal__content-wrapper{position:relative;z-index:1;text-align:center;overflow-y:auto;flex:1;min-height:0}.pay-modal__actions{display:flex;justify-content:center;gap:16px;margin-top:16px}.pay-modal__btn{min-width:96px;padding:8px 0;border-radius:24px;border:none;font-size:15px;font-weight:600;cursor:pointer;transition:background .2s}.pay-modal__btn--retry{background:#fff;color:#f25a5a;border:1.5px solid #f25a5a}.pay-modal__btn--finish{background:#f25a5a;color:#fff;border:none}
@@ -1,9 +1,8 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
+ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
2
+ import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
3
+ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
2
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
6
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
6
  import cs from '../utils/classNames';
8
7
  import React, { useState, useRef } from 'react';
9
8
  import { useIsomorphicLayoutEffect, useUnmountedRef } from 'ahooks';
@@ -19,65 +18,65 @@ import { renderToContainer } from '../utils/render-to-container';
19
18
  import Mask from '../Mask';
20
19
  import { IconClose } from '../icons';
21
20
  import { getPrefixCls } from '../utils/getPrefixCls';
22
- const classPrefix = getPrefixCls('popup');
23
- const defaultPopupBaseProps = {
21
+ var classPrefix = getPrefixCls('popup');
22
+ var defaultPopupBaseProps = {
24
23
  closeOnMaskClick: true,
25
24
  closeIcon: /*#__PURE__*/React.createElement(IconClose, null),
26
25
  destroyOnClose: false,
27
26
  disableBodyScroll: true,
28
27
  forceRender: false,
29
- getContainer: () => document.body,
28
+ getContainer: function getContainer() {
29
+ return document.body;
30
+ },
30
31
  mask: true,
31
32
  showCloseButton: false,
32
33
  stopPropagation: ['click'],
33
34
  visible: false
34
35
  };
35
- const defaultProps = _objectSpread(_objectSpread({}, defaultPopupBaseProps), {}, {
36
+ var defaultProps = _objectSpread(_objectSpread({}, defaultPopupBaseProps), {}, {
36
37
  closeOnSwipe: false,
37
38
  position: 'bottom',
38
39
  round: false
39
40
  });
40
- const PayPopup = p => {
41
- const props = mergeProps(defaultProps, p);
42
- const bodyCls = cs("".concat(classPrefix, "-body"), props.bodyClassName, "".concat(classPrefix, "-body-position-").concat(props.position), {
43
- ["".concat(classPrefix, "-body-with-close")]: props.showCloseButton,
44
- ["".concat(classPrefix, "-body-round")]: props.round
45
- });
46
- const [active, setActive] = useState(props.visible);
47
- const ref = useRef(null);
41
+ var PayPopup = function PayPopup(p) {
42
+ var props = mergeProps(defaultProps, p);
43
+ var bodyCls = cs("".concat(classPrefix, "-body"), props.bodyClassName, "".concat(classPrefix, "-body-position-").concat(props.position), _defineProperty(_defineProperty({}, "".concat(classPrefix, "-body-with-close"), props.showCloseButton), "".concat(classPrefix, "-body-round"), props.round));
44
+ var _useState = useState(props.visible),
45
+ _useState2 = _slicedToArray(_useState, 2),
46
+ active = _useState2[0],
47
+ setActive = _useState2[1];
48
+ var ref = useRef(null);
48
49
  useLockScroll(ref, props.disableBodyScroll && active ? 'strict' : false);
49
- useIsomorphicLayoutEffect(() => {
50
+ useIsomorphicLayoutEffect(function () {
50
51
  if (props.visible) {
51
52
  setActive(true);
52
53
  }
53
54
  }, [props.visible]);
54
- const unmountedRef = useUnmountedRef();
55
- const {
56
- percent
57
- } = useSpring({
58
- percent: props.visible ? 0 : 100,
59
- config: {
60
- precision: 0.1,
61
- mass: 0.4,
62
- tension: 300,
63
- friction: 30
64
- },
65
- onRest: () => {
66
- if (unmountedRef.current) return;
67
- setActive(props.visible);
68
- if (props.visible) {
69
- var _props$afterShow;
70
- (_props$afterShow = props.afterShow) === null || _props$afterShow === void 0 || _props$afterShow.call(props);
71
- } else {
72
- var _props$afterClose;
73
- (_props$afterClose = props.afterClose) === null || _props$afterClose === void 0 || _props$afterClose.call(props);
55
+ var unmountedRef = useUnmountedRef();
56
+ var _useSpring = useSpring({
57
+ percent: props.visible ? 0 : 100,
58
+ config: {
59
+ precision: 0.1,
60
+ mass: 0.4,
61
+ tension: 300,
62
+ friction: 30
63
+ },
64
+ onRest: function onRest() {
65
+ if (unmountedRef.current) return;
66
+ setActive(props.visible);
67
+ if (props.visible) {
68
+ var _props$afterShow;
69
+ (_props$afterShow = props.afterShow) === null || _props$afterShow === void 0 || _props$afterShow.call(props);
70
+ } else {
71
+ var _props$afterClose;
72
+ (_props$afterClose = props.afterClose) === null || _props$afterClose === void 0 || _props$afterClose.call(props);
73
+ }
74
74
  }
75
- }
76
- });
77
- const bind = useDrag(_ref => {
78
- let {
79
- swipe: [, swipeY]
80
- } = _ref;
75
+ }),
76
+ percent = _useSpring.percent;
77
+ var bind = useDrag(function (_ref) {
78
+ var _ref$swipe = _slicedToArray(_ref.swipe, 2),
79
+ swipeY = _ref$swipe[1];
81
80
  if (!props.closeOnSwipe) return;
82
81
  if (swipeY === 1 && props.position === 'bottom' || swipeY === -1 && props.position === 'top') {
83
82
  var _props$onClose;
@@ -87,8 +86,8 @@ const PayPopup = p => {
87
86
  axis: 'y',
88
87
  enabled: ['top', 'bottom'].includes(props.position)
89
88
  });
90
- const maskVisible = useInnerVisible(active && props.visible);
91
- const node = withStopPropagation(props.stopPropagation, withNativeProps(props, /*#__PURE__*/React.createElement("div", _extends({
89
+ var maskVisible = useInnerVisible(active && props.visible);
90
+ var node = withStopPropagation(props.stopPropagation, withNativeProps(props, /*#__PURE__*/React.createElement("div", _extends({
92
91
  className: classPrefix,
93
92
  onClick: props.onClick,
94
93
  style: {
@@ -99,7 +98,7 @@ const PayPopup = p => {
99
98
  visible: maskVisible,
100
99
  forceRender: props.forceRender,
101
100
  destroyOnClose: props.destroyOnClose,
102
- onMaskClick: e => {
101
+ onMaskClick: function onMaskClick(e) {
103
102
  var _props$onMaskClick;
104
103
  (_props$onMaskClick = props.onMaskClick) === null || _props$onMaskClick === void 0 || _props$onMaskClick.call(props, e);
105
104
  if (props.closeOnMaskClick) {
@@ -112,13 +111,12 @@ const PayPopup = p => {
112
111
  disableBodyScroll: false,
113
112
  stopPropagation: props.stopPropagation
114
113
  }), /*#__PURE__*/React.createElement(animated.div, {
115
- className: cs("".concat(classPrefix, "-body"), "".concat(classPrefix, "-body-position-").concat(props.position), {
116
- ["".concat(classPrefix, "-body-with-close")]: props.showCloseButton,
117
- ["".concat(classPrefix, "-body-round")]: props.round
118
- }, bodyCls),
114
+ className: cs("".concat(classPrefix, "-body"), "".concat(classPrefix, "-body-position-").concat(props.position), _defineProperty(_defineProperty({}, "".concat(classPrefix, "-body-with-close"), props.showCloseButton), "".concat(classPrefix, "-body-round"), props.round), bodyCls),
119
115
  style: _objectSpread(_objectSpread({}, props.bodyStyle), {}, {
120
- pointerEvents: percent.to(v => v === 0 ? 'unset' : 'none'),
121
- transform: percent.to(v => {
116
+ pointerEvents: percent.to(function (v) {
117
+ return v === 0 ? 'unset' : 'none';
118
+ }),
119
+ transform: percent.to(function (v) {
122
120
  if (props.position === 'bottom') {
123
121
  return "translate(0, ".concat(v, "%)");
124
122
  }
@@ -137,7 +135,7 @@ const PayPopup = p => {
137
135
  ref: ref
138
136
  }, props.showCloseButton && /*#__PURE__*/React.createElement("a", {
139
137
  className: cs("".concat(classPrefix, "-close-icon"), "".concat(classPrefix, "-close-button")),
140
- onClick: () => {
138
+ onClick: function onClick() {
141
139
  var _props$onClose3;
142
140
  (_props$onClose3 = props.onClose) === null || _props$onClose3 === void 0 || _props$onClose3.call(props);
143
141
  },
@@ -1,9 +1,9 @@
1
- import { NativeProps } from "../utils/native-props";
2
- import React, { PropsWithChildren } from "react";
3
- import { GetContainer } from "../utils/render-to-container";
4
- import { PropagationEvent } from "../utils/with-stop-propagation";
5
- export type PopupPosition = "bottom" | "top" | "left" | "right";
6
- export interface PayPopupBaseProps extends NativeProps<"--z-index"> {
1
+ import { NativeProps } from '../utils/native-props';
2
+ import React, { PropsWithChildren } from 'react';
3
+ import { GetContainer } from '../utils/render-to-container';
4
+ import { PropagationEvent } from '../utils/with-stop-propagation';
5
+ export type PopupPosition = 'bottom' | 'top' | 'left' | 'right';
6
+ export interface PayPopupBaseProps extends NativeProps<'--z-index'> {
7
7
  /**
8
8
  * @zh 是否可见
9
9
  * @eb Whether to show the popup