pay-sdk-react 1.1.2 → 1.1.4

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 (242) 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 +8 -2
  49. package/dist/es/PayMask/pay-mask.js +48 -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 +42 -39
  78. package/dist/es/confirm-modal/interface.d.ts +8 -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 +16 -10
  93. package/dist/es/hooks/usePayWindowOpen.js +81 -37
  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.d.ts +21 -0
  115. package/dist/es/shared/enums/index.js +24 -1
  116. package/dist/es/shared/index.d.ts +1 -1
  117. package/dist/es/shared/index.js +1 -1
  118. package/dist/es/utils/can-use-dom.js +1 -1
  119. package/dist/es/utils/classNames.js +15 -11
  120. package/dist/es/utils/dom.js +18 -18
  121. package/dist/es/utils/get-container.js +2 -2
  122. package/dist/es/utils/get-scroll-parent.js +8 -9
  123. package/dist/es/utils/is.d.ts +10 -1
  124. package/dist/es/utils/is.js +68 -34
  125. package/dist/es/utils/native-props.d.ts +2 -2
  126. package/dist/es/utils/native-props.js +7 -9
  127. package/dist/es/utils/omit.js +3 -5
  128. package/dist/es/utils/qrcode.js +5 -5
  129. package/dist/es/utils/render-to-container.d.ts +1 -1
  130. package/dist/es/utils/render-to-container.js +4 -4
  131. package/dist/es/utils/should-render.d.ts +1 -1
  132. package/dist/es/utils/should-render.js +4 -4
  133. package/dist/es/utils/supports-passive.js +8 -7
  134. package/dist/es/utils/warning.js +0 -1
  135. package/dist/es/utils/with-default-props.js +6 -4
  136. package/dist/es/utils/with-stop-propagation.d.ts +3 -3
  137. package/dist/es/utils/with-stop-propagation.js +27 -14
  138. package/dist/lib/Airwallex/airwallex-button.js +12 -15
  139. package/dist/lib/Airwallex/airwallex-modal.js +11 -14
  140. package/dist/lib/Airwallex/airwallex-popup.js +16 -23
  141. package/dist/lib/Airwallex/airwallex.js +20 -25
  142. package/dist/lib/Airwallex/index.js +1 -1
  143. package/dist/lib/Airwallex/style/index.css +335 -1
  144. package/dist/lib/Airwallex/style/index.min.css +1 -0
  145. package/dist/lib/Alipay/alipay-button.js +12 -15
  146. package/dist/lib/Alipay/alipay-modal.js +9 -12
  147. package/dist/lib/Alipay/alipay.js +19 -23
  148. package/dist/lib/Alipay/index.js +1 -1
  149. package/dist/lib/Alipay/style/index.css +18 -1
  150. package/dist/lib/Alipay/style/index.min.css +1 -0
  151. package/dist/lib/Button/button.js +13 -13
  152. package/dist/lib/Button/index.js +1 -1
  153. package/dist/lib/Button/style/index.css +95 -1
  154. package/dist/lib/Button/style/index.min.css +1 -0
  155. package/dist/lib/FullScreenLoading/index.js +28 -29
  156. package/dist/lib/FullScreenLoading/style/index.css +239 -1
  157. package/dist/lib/FullScreenLoading/style/index.min.css +1 -0
  158. package/dist/lib/MAlipay/index.js +1 -1
  159. package/dist/lib/MAlipay/m-alipay-auto-submit.js +3 -4
  160. package/dist/lib/MAlipay/m-alipay-button.js +34 -44
  161. package/dist/lib/MAlipay/style/index.css +252 -1
  162. package/dist/lib/MAlipay/style/index.min.css +1 -0
  163. package/dist/lib/MWeChat/index.js +2 -2
  164. package/dist/lib/MWeChat/m-wechat-button.js +34 -44
  165. package/dist/lib/MWeChat/style/index.css +252 -1
  166. package/dist/lib/MWeChat/style/index.min.css +1 -0
  167. package/dist/lib/Mask/index.js +1 -1
  168. package/dist/lib/Mask/mask.js +6 -11
  169. package/dist/lib/Mask/style/index.css +11 -1
  170. package/dist/lib/Mask/style/index.min.css +1 -0
  171. package/dist/lib/PayButton/index.js +10 -10
  172. package/dist/lib/PayMask/index.js +1 -1
  173. package/dist/lib/PayMask/pay-mask.js +26 -24
  174. package/dist/lib/PayMask/style/index.css +62 -1
  175. package/dist/lib/PayMask/style/index.min.css +1 -0
  176. package/dist/lib/Paypal/index.js +2 -2
  177. package/dist/lib/Paypal/paypal-button.js +17 -22
  178. package/dist/lib/Paypal/style/index.css +207 -1
  179. package/dist/lib/Paypal/style/index.min.css +1 -0
  180. package/dist/lib/Payssion/index.js +2 -2
  181. package/dist/lib/Payssion/payssion-button.js +17 -22
  182. package/dist/lib/Payssion/style/index.css +157 -1
  183. package/dist/lib/Payssion/style/index.min.css +1 -0
  184. package/dist/lib/Stripe/index.js +1 -1
  185. package/dist/lib/Stripe/stripe-button.js +14 -17
  186. package/dist/lib/Stripe/stripe-modal.js +10 -13
  187. package/dist/lib/Stripe/stripe-popup.js +16 -23
  188. package/dist/lib/Stripe/stripe.js +8 -11
  189. package/dist/lib/Stripe/style/index.css +365 -1
  190. package/dist/lib/Stripe/style/index.min.css +1 -0
  191. package/dist/lib/Wechat/index.js +1 -1
  192. package/dist/lib/Wechat/style/index.css +25 -1
  193. package/dist/lib/Wechat/style/index.min.css +1 -0
  194. package/dist/lib/Wechat/wechat-button.js +12 -15
  195. package/dist/lib/Wechat/wechat-modal.js +9 -12
  196. package/dist/lib/Wechat/wechat.js +11 -12
  197. package/dist/lib/confirm-modal/index.js +24 -28
  198. package/dist/lib/confirm-modal/style/index.css +95 -1
  199. package/dist/lib/confirm-modal/style/index.min.css +1 -0
  200. package/dist/lib/dot-loading/dot-loading.js +3 -4
  201. package/dist/lib/dot-loading/index.js +1 -1
  202. package/dist/lib/dot-loading/style/index.css +3 -1
  203. package/dist/lib/dot-loading/style/index.min.css +1 -0
  204. package/dist/lib/hooks/use-lock-scroll.js +11 -12
  205. package/dist/lib/hooks/use-touch.js +10 -10
  206. package/dist/lib/hooks/usePayWindowOpen.js +63 -21
  207. package/dist/lib/icons/IconAlipay/index.js +6 -6
  208. package/dist/lib/icons/IconClose/index.js +8 -8
  209. package/dist/lib/icons/IconPaypalText/index.js +7 -7
  210. package/dist/lib/icons/IconPaypalWhite/index.js +6 -6
  211. package/dist/lib/icons/IconPayssionPay/index.js +13 -13
  212. package/dist/lib/icons/IconStripe/index.js +6 -6
  213. package/dist/lib/icons/IconStripeText/index.js +6 -6
  214. package/dist/lib/icons/IconWechatPay/index.js +6 -6
  215. package/dist/lib/icons/index.js +2 -2
  216. package/dist/lib/icons/style/index.css +45 -1
  217. package/dist/lib/icons/style/index.min.css +1 -0
  218. package/dist/lib/index.js +2 -2
  219. package/dist/lib/pay-modal/index.js +1 -1
  220. package/dist/lib/pay-modal/pay-modal.js +24 -30
  221. package/dist/lib/pay-modal/style/index.css +95 -1
  222. package/dist/lib/pay-modal/style/index.min.css +1 -0
  223. package/dist/lib/pay-popup/index.js +24 -28
  224. package/dist/lib/pay-popup/style/index.css +145 -1
  225. package/dist/lib/pay-popup/style/index.min.css +1 -0
  226. package/dist/lib/shared/enums/index.js +23 -1
  227. package/dist/lib/utils/can-use-dom.js +1 -1
  228. package/dist/lib/utils/classNames.js +6 -7
  229. package/dist/lib/utils/dom.js +9 -11
  230. package/dist/lib/utils/get-scroll-parent.js +2 -3
  231. package/dist/lib/utils/getPrefixCls.js +1 -1
  232. package/dist/lib/utils/is.js +32 -17
  233. package/dist/lib/utils/native-props.js +10 -10
  234. package/dist/lib/utils/omit.js +3 -6
  235. package/dist/lib/utils/qrcode.js +1 -1
  236. package/dist/lib/utils/supports-passive.js +4 -3
  237. package/dist/lib/utils/warning.js +2 -6
  238. package/dist/lib/utils/with-default-props.js +4 -8
  239. package/dist/lib/utils/with-stop-propagation.js +6 -9
  240. package/dist/umd/pay-sdk-react.umd.js +218 -130
  241. package/dist/umd/pay-sdk-react.umd.js.map +1 -1
  242. package/package.json +6 -3
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -8,6 +9,7 @@ exports.default = void 0;
8
9
  var _react = _interopRequireWildcard(require("react"));
9
10
  var _usePayWindowOpen = require("../hooks/usePayWindowOpen");
10
11
  var _payModal = _interopRequireDefault(require("../pay-modal"));
12
+ var _enums = require("../shared/enums");
11
13
  var _interface = require("./interface");
12
14
  Object.keys(_interface).forEach(function (key) {
13
15
  if (key === "default" || key === "__esModule") return;
@@ -20,17 +22,7 @@ Object.keys(_interface).forEach(function (key) {
20
22
  }
21
23
  });
22
24
  });
23
- const _excluded = ["children"],
24
- _excluded2 = ["children"];
25
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
26
25
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
27
- 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; }
28
- 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; }
29
- 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; }
30
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
31
- 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); }
32
- 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; }
33
- 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; }
34
26
  const ConfirmModal = props => {
35
27
  const {
36
28
  visible,
@@ -47,25 +39,27 @@ const ConfirmModal = props => {
47
39
  onClose,
48
40
  payUrl,
49
41
  autoOpenWindow = false,
50
- openMode = 'window'
42
+ openMode = _enums.OpenPayUrlMode.Window,
43
+ forceNewWindow
51
44
  } = props;
52
- const _ref = retryButtonProps || {},
53
- {
54
- children: retryButtonChildren = '重新支付'
55
- } = _ref,
56
- retryButtonPropsRest = _objectWithoutProperties(_ref, _excluded);
57
- const _ref2 = finishButtonProps || {},
58
- {
59
- children: finishButtonChildren = '支付完成'
60
- } = _ref2,
61
- finishButtonPropsRest = _objectWithoutProperties(_ref2, _excluded2);
45
+ const {
46
+ children: retryButtonChildren = '重新支付',
47
+ ...retryButtonPropsRest
48
+ } = retryButtonProps || {};
49
+ const {
50
+ children: finishButtonChildren = '支付完成',
51
+ ...finishButtonPropsRest
52
+ } = finishButtonProps || {};
62
53
  const {
63
54
  closeWindow
64
55
  } = (0, _usePayWindowOpen.usePayWindowOpen)({
65
56
  payUrl: payUrl || '',
66
57
  onClose,
67
58
  autoOpen: autoOpenWindow,
68
- openMode: openMode
59
+ openMode: openMode,
60
+ ...(openMode === _enums.OpenPayUrlMode.Window && {
61
+ forceNewWindow
62
+ })
69
63
  });
70
64
  const handleClose = (0, _react.useCallback)(() => {
71
65
  onClose === null || onClose === void 0 || onClose();
@@ -80,12 +74,14 @@ const ConfirmModal = props => {
80
74
  showClose: showClose,
81
75
  maskClosable: maskClosable,
82
76
  onClose: handleClose,
83
- retryButtonProps: _objectSpread({
84
- children: retryButtonChildren
85
- }, retryButtonPropsRest),
86
- finishButtonProps: _objectSpread({
87
- children: finishButtonChildren
88
- }, finishButtonPropsRest)
77
+ retryButtonProps: {
78
+ children: retryButtonChildren,
79
+ ...retryButtonPropsRest
80
+ },
81
+ finishButtonProps: {
82
+ children: finishButtonChildren,
83
+ ...finishButtonPropsRest
84
+ }
89
85
  });
90
86
  };
91
87
  var _default = exports.default = ConfirmModal;
@@ -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,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -9,7 +10,6 @@ var _classNames = _interopRequireDefault(require("../utils/classNames"));
9
10
  var _withDefaultProps = require("../utils/with-default-props");
10
11
  var _nativeProps = require("../utils/native-props");
11
12
  var _getPrefixCls = require("../utils/getPrefixCls");
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
13
  const classPrefix = (0, _getPrefixCls.getPrefixCls)('dot-loading');
14
14
  const colorRecord = {
15
15
  default: 'var(--adm-color-weak)',
@@ -20,11 +20,10 @@ const defaultProps = {
20
20
  color: 'default'
21
21
  };
22
22
  const DotLoading = /*#__PURE__*/_react.default.memo(p => {
23
- var _colorRecord$props$co;
24
23
  const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
25
24
  return (0, _nativeProps.withNativeProps)(props, /*#__PURE__*/_react.default.createElement("div", {
26
25
  style: {
27
- color: (_colorRecord$props$co = colorRecord[props.color]) !== null && _colorRecord$props$co !== void 0 ? _colorRecord$props$co : props.color
26
+ color: colorRecord[props.color] ?? props.color
28
27
  },
29
28
  className: (0, _classNames.default)('adm-loading', classPrefix)
30
29
  }, /*#__PURE__*/_react.default.createElement("svg", {
@@ -57,7 +56,7 @@ const DotLoading = /*#__PURE__*/_react.default.memo(p => {
57
56
  from: "16",
58
57
  to: "16",
59
58
  dur: "2s",
60
- begin: "".concat(i * 0.2, "s"),
59
+ begin: `${i * 0.2}s`,
61
60
  repeatCount: "indefinite",
62
61
  values: "16; 6; 26; 16; 16",
63
62
  keyTimes: "0; 0.1; 0.3; 0.4; 1"
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -18,5 +19,4 @@ Object.keys(_interface).forEach(function (key) {
18
19
  }
19
20
  });
20
21
  });
21
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
22
  var _default = exports.default = _dotLoading.default;
@@ -1 +1,3 @@
1
- .pay-dot-loading{display:inline-block}
1
+ .pay-dot-loading {
2
+ display: inline-block;
3
+ }
@@ -0,0 +1 @@
1
+ .pay-dot-loading{display:inline-block}
@@ -9,7 +9,7 @@ var _getScrollParent = require("../utils/get-scroll-parent");
9
9
  var _supportsPassive = require("../utils/supports-passive");
10
10
  var _useTouch = require("./use-touch");
11
11
  let totalLockCount = 0;
12
- const BODY_LOCK_CLASS = "yfm-overflow-hidden";
12
+ const BODY_LOCK_CLASS = 'yfm-overflow-hidden';
13
13
  function getScrollableElement(el) {
14
14
  let current = el === null || el === void 0 ? void 0 : el.parentElement;
15
15
  while (current) {
@@ -24,12 +24,12 @@ function useLockScroll(rootRef, shouldLock) {
24
24
  const touch = (0, _useTouch.useTouch)();
25
25
  const onTouchMove = event => {
26
26
  touch.move(event);
27
- const direction = touch.deltaY.current > 0 ? "10" : "01";
27
+ const direction = touch.deltaY.current > 0 ? '10' : '01';
28
28
  const el = (0, _getScrollParent.getScrollParent)(event.target, rootRef.current);
29
29
  if (!el) return;
30
30
 
31
31
  // This has perf cost but we have to compatible with iOS 12
32
- if (shouldLock === "strict") {
32
+ if (shouldLock === 'strict') {
33
33
  const scrollableParent = getScrollableElement(event.target);
34
34
  if (scrollableParent === document.body || scrollableParent === document.documentElement) {
35
35
  event.preventDefault();
@@ -44,21 +44,21 @@ function useLockScroll(rootRef, shouldLock) {
44
44
  const {
45
45
  height
46
46
  } = el.getBoundingClientRect();
47
- let status = "11";
47
+ let status = '11';
48
48
  if (scrollTop === 0) {
49
- status = offsetHeight >= scrollHeight ? "00" : "01";
49
+ status = offsetHeight >= scrollHeight ? '00' : '01';
50
50
  } else if (scrollHeight <= Math.round(height + scrollTop)) {
51
- status = "10";
51
+ status = '10';
52
52
  }
53
- if (status !== "11" && touch.isVertical() && !(parseInt(status, 2) & parseInt(direction, 2))) {
53
+ if (status !== '11' && touch.isVertical() && !(parseInt(status, 2) & parseInt(direction, 2))) {
54
54
  if (event.cancelable && _supportsPassive.supportsPassive) {
55
55
  event.preventDefault();
56
56
  }
57
57
  }
58
58
  };
59
59
  const lock = () => {
60
- document.addEventListener("touchstart", touch.start);
61
- document.addEventListener("touchmove", onTouchMove, _supportsPassive.supportsPassive ? {
60
+ document.addEventListener('touchstart', touch.start);
61
+ document.addEventListener('touchmove', onTouchMove, _supportsPassive.supportsPassive ? {
62
62
  passive: false
63
63
  } : false);
64
64
  if (!totalLockCount) {
@@ -68,8 +68,8 @@ function useLockScroll(rootRef, shouldLock) {
68
68
  };
69
69
  const unlock = () => {
70
70
  if (totalLockCount) {
71
- document.removeEventListener("touchstart", touch.start);
72
- document.removeEventListener("touchmove", onTouchMove);
71
+ document.removeEventListener('touchstart', touch.start);
72
+ document.removeEventListener('touchmove', onTouchMove);
73
73
  totalLockCount--;
74
74
  if (!totalLockCount) {
75
75
  document.body.classList.remove(BODY_LOCK_CLASS);
@@ -83,6 +83,5 @@ function useLockScroll(rootRef, shouldLock) {
83
83
  unlock();
84
84
  };
85
85
  }
86
- // eslint-disable-next-line react-hooks/exhaustive-deps
87
86
  }, [shouldLock]);
88
87
  }
@@ -8,12 +8,12 @@ var _react = require("react");
8
8
  const MIN_DISTANCE = 10;
9
9
  function getDirection(x, y) {
10
10
  if (x > y && x > MIN_DISTANCE) {
11
- return "horizontal";
11
+ return 'horizontal';
12
12
  }
13
13
  if (y > x && y > MIN_DISTANCE) {
14
- return "vertical";
14
+ return 'vertical';
15
15
  }
16
- return "";
16
+ return '';
17
17
  }
18
18
  function useTouch() {
19
19
  const startX = (0, _react.useRef)(0);
@@ -22,21 +22,21 @@ function useTouch() {
22
22
  const deltaY = (0, _react.useRef)(0);
23
23
  const offsetX = (0, _react.useRef)(0);
24
24
  const offsetY = (0, _react.useRef)(0);
25
- const direction = (0, _react.useRef)("");
26
- const isVertical = () => direction.current === "vertical";
27
- const isHorizontal = () => direction.current === "horizontal";
25
+ const direction = (0, _react.useRef)('');
26
+ const isVertical = () => direction.current === 'vertical';
27
+ const isHorizontal = () => direction.current === 'horizontal';
28
28
  const reset = () => {
29
29
  deltaX.current = 0;
30
30
  deltaY.current = 0;
31
31
  offsetX.current = 0;
32
32
  offsetY.current = 0;
33
- direction.current = "";
33
+ direction.current = '';
34
34
  };
35
35
  const start = event => {
36
- var _event$touches$0$clie, _event$touches$, _event$touches$0$clie2, _event$touches$2;
36
+ var _event$touches$, _event$touches$2;
37
37
  reset();
38
- startX.current = (_event$touches$0$clie = (_event$touches$ = event.touches[0]) === null || _event$touches$ === void 0 ? void 0 : _event$touches$.clientX) !== null && _event$touches$0$clie !== void 0 ? _event$touches$0$clie : 0;
39
- startY.current = (_event$touches$0$clie2 = (_event$touches$2 = event.touches[0]) === null || _event$touches$2 === void 0 ? void 0 : _event$touches$2.clientY) !== null && _event$touches$0$clie2 !== void 0 ? _event$touches$0$clie2 : 0;
38
+ startX.current = ((_event$touches$ = event.touches[0]) === null || _event$touches$ === void 0 ? void 0 : _event$touches$.clientX) ?? 0;
39
+ startY.current = ((_event$touches$2 = event.touches[0]) === null || _event$touches$2 === void 0 ? void 0 : _event$touches$2.clientY) ?? 0;
40
40
  };
41
41
  const move = event => {
42
42
  const touch = event.touches[0];
@@ -4,41 +4,83 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.usePayWindowOpen = usePayWindowOpen;
7
+ var _is = require("../utils/is");
8
+ var _withDefaultProps = require("../utils/with-default-props");
7
9
  var _react = require("react");
10
+ var _enums = require("../shared/enums");
11
+ var _dom = require("../utils/dom");
8
12
  /**
9
- * @zh 如果您希望用户在支付过程中随时可以通过"后退"按钮放弃支付并返回到您的应用,那么 href 是一个好选择;
10
- * @en If you want users to be able to abandon payment at any time and return to your application, then href is a good choice;
11
- * @zh 使用 replace: 如果您的业务逻辑是"一旦点击支付,就不能轻易返回",replace 会更合适。例如,点击支付后,您的后端已经创建了一张"待支付"的订单。为了防止用户通过"后退"按钮回到上一个页面再次创建订单,使用 replace 可以强制用户要么完成支付,要么关闭页面,而不能"后退"到上一步。
12
- * @en Use replace: If your business logic is "once clicked, payment cannot be easily returned", replace is more suitable. For example, after clicking payment, your backend has already created an "awaiting payment" order. To prevent users from returning to the previous page by clicking the "back" button and creating an order again, using replace can force users to either complete payment or close the page, and cannot "back" to the previous step.
13
+ * @zh 获取屏幕宽度
14
+ * @en Get screen width
13
15
  */
14
-
15
- function usePayWindowOpen(_ref) {
16
- let {
16
+ function getScreenWidth() {
17
+ var _clientDocument$docum, _clientDocument$body;
18
+ return (_dom.clientWindow === null || _dom.clientWindow === void 0 ? void 0 : _dom.clientWindow.innerWidth) || (_dom.clientDocument === null || _dom.clientDocument === void 0 || (_clientDocument$docum = _dom.clientDocument.documentElement) === null || _clientDocument$docum === void 0 ? void 0 : _clientDocument$docum.clientWidth) || (_dom.clientDocument === null || _dom.clientDocument === void 0 || (_clientDocument$body = _dom.clientDocument.body) === null || _clientDocument$body === void 0 ? void 0 : _clientDocument$body.clientWidth);
19
+ }
20
+ const defaultProps = {
21
+ payUrl: '',
22
+ openMode: _enums.OpenPayUrlMode.Window
23
+ };
24
+ function usePayWindowOpen(p) {
25
+ const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
26
+ const {
17
27
  payUrl,
18
28
  onClose,
19
29
  onSuccess,
20
- autoOpen = true,
21
- openMode = "window"
22
- } = _ref;
30
+ autoOpen = true
31
+ } = props;
23
32
  const payWindowRef = (0, _react.useRef)(null);
24
33
  const pollTimerRef = (0, _react.useRef)(null);
25
34
  const [isWindowMonitoring, setWindowMonitoring] = (0, _react.useState)(false);
26
35
 
36
+ // 创建弹窗的公共函数
37
+ const createPopupWindow = (0, _react.useCallback)(url => {
38
+ // 计算弹窗尺寸和位置,实现垂直水平居中
39
+ const width = Math.min(550, window.outerWidth * 0.9);
40
+ const height = Math.min(700, window.outerHeight);
41
+
42
+ // 使用多种定位方法确保居中
43
+ const left = Math.round((window.screen.availWidth - width) / 2);
44
+ const top = Math.round((window.screen.availHeight - height) / 2);
45
+ const screenX = left;
46
+ const screenY = top;
47
+ return window.open(url, 'paypal_payment', `width=${width},height=${height},left=${left},top=${top},screenX=${screenX},screenY=${screenY},scrollbars=yes,resizable=yes`);
48
+ }, [onClose, onSuccess]);
49
+
27
50
  // 打开支付窗口
28
51
  const openWindow = (0, _react.useCallback)(() => {
29
- if (openMode === "window") {
52
+ if ((props === null || props === void 0 ? void 0 : props.openMode) === _enums.OpenPayUrlMode.Window) {
30
53
  if (payWindowRef.current && !payWindowRef.current.closed) {
31
54
  payWindowRef.current.focus();
32
55
  } else {
33
- payWindowRef.current = window.open(payUrl);
34
- setWindowMonitoring(true);
56
+ const isMobile = (0, _is.isMobileDevice)() || (0, _is.isTouchDevice)();
57
+ const forceNewWindow = props === null || props === void 0 ? void 0 : props.forceNewWindow;
58
+ if (isMobile) {
59
+ payWindowRef.current = window.open(payUrl);
60
+ return;
61
+ }
62
+ if (forceNewWindow) {
63
+ payWindowRef.current = createPopupWindow(payUrl);
64
+ return;
65
+ }
66
+ const screenWidth = getScreenWidth() || 0;
67
+ if (screenWidth >= 768) {
68
+ payWindowRef.current = createPopupWindow(payUrl);
69
+ } else {
70
+ payWindowRef.current = window.open(payUrl);
71
+ }
35
72
  }
36
- } else if (openMode === "replace") {
73
+ setWindowMonitoring(true);
74
+ return;
75
+ }
76
+ if ((props === null || props === void 0 ? void 0 : props.openMode) === _enums.OpenPayUrlMode.Replace) {
37
77
  window.location.replace(payUrl);
38
- } else if (openMode === "href") {
78
+ return;
79
+ }
80
+ if ((props === null || props === void 0 ? void 0 : props.openMode) === _enums.OpenPayUrlMode.Href) {
39
81
  window.location.href = payUrl;
40
82
  }
41
- }, [payUrl, openMode]);
83
+ }, [payUrl, props, createPopupWindow]);
42
84
 
43
85
  // 关闭窗口
44
86
  const closeWindow = (0, _react.useCallback)(() => {
@@ -56,7 +98,7 @@ function usePayWindowOpen(_ref) {
56
98
 
57
99
  // 轮询和消息监听
58
100
  (0, _react.useEffect)(() => {
59
- if (!isWindowMonitoring || openMode !== "window") {
101
+ if (!isWindowMonitoring || (props === null || props === void 0 ? void 0 : props.openMode) !== _enums.OpenPayUrlMode.Window) {
60
102
  return;
61
103
  }
62
104
  pollTimerRef.current = setInterval(() => {
@@ -67,7 +109,7 @@ function usePayWindowOpen(_ref) {
67
109
  }
68
110
  }, 1500);
69
111
  function handleMessage(event) {
70
- if (event.data === "PAYMENT_SUCCESS") {
112
+ if (event.data === 'PAYMENT_SUCCESS') {
71
113
  var _payWindowRef$current2;
72
114
  onSuccess === null || onSuccess === void 0 || onSuccess();
73
115
  onClose === null || onClose === void 0 || onClose();
@@ -76,14 +118,14 @@ function usePayWindowOpen(_ref) {
76
118
  setWindowMonitoring(false);
77
119
  }
78
120
  }
79
- window.addEventListener("message", handleMessage);
121
+ window.addEventListener('message', handleMessage);
80
122
  return () => {
81
123
  var _payWindowRef$current3;
82
124
  clearInterval(pollTimerRef.current);
83
- window.removeEventListener("message", handleMessage);
125
+ window.removeEventListener('message', handleMessage);
84
126
  (_payWindowRef$current3 = payWindowRef.current) === null || _payWindowRef$current3 === void 0 || _payWindowRef$current3.close();
85
127
  };
86
- }, [isWindowMonitoring, openMode, onClose, onSuccess]);
128
+ }, [isWindowMonitoring, props, onClose, onSuccess]);
87
129
  return {
88
130
  openWindow,
89
131
  closeWindow,
@@ -1,28 +1,28 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.default = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
7
9
  var _react = _interopRequireDefault(require("react"));
8
10
  var _omit = _interopRequireDefault(require("../../utils/omit"));
9
11
  var _getPrefixCls = require("../../utils/getPrefixCls");
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- 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); }
12
12
  const classPrefix = (0, _getPrefixCls.getPrefixCls)('icon');
13
- const IconAlipay = /*#__PURE__*/_react.default.forwardRef((props, ref) => /*#__PURE__*/_react.default.createElement("svg", _extends({
13
+ const IconAlipay = /*#__PURE__*/_react.default.forwardRef((props, ref) => /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
14
14
  ref: ref,
15
15
  d: "1750766022943",
16
16
  viewBox: "0 0 1024 1024",
17
17
  version: "1.1",
18
18
  xmlns: "http://www.w3.org/2000/svg",
19
- "p-id": "7113",
19
+ "data-p-id": "7113",
20
20
  stroke: "currentColor",
21
- className: "".concat(classPrefix, " ").concat(classPrefix, "-alipay")
21
+ className: `${classPrefix} ${classPrefix}-alipay`
22
22
  }, (0, _omit.default)(props, ['className'])), /*#__PURE__*/_react.default.createElement("path", {
23
23
  d: "M1024.0512 701.0304V196.864A196.9664 196.9664 0 0 0 827.136 0H196.864A196.9664 196.9664 0 0 0 0 196.864v630.272A196.9152 196.9152 0 0 0 196.864 1024h630.272a197.12 197.12 0 0 0 193.8432-162.0992c-52.224-22.6304-278.528-120.32-396.4416-176.64-89.7024 108.6976-183.7056 173.9264-325.3248 173.9264s-236.1856-87.2448-224.8192-194.048c7.4752-70.0416 55.552-184.576 264.2944-164.9664 110.08 10.3424 160.4096 30.8736 250.1632 60.5184 23.1936-42.5984 42.496-89.4464 57.1392-139.264H248.064v-39.424h196.9152V311.1424H204.8V267.776h240.128V165.632s2.1504-15.9744 19.8144-15.9744h98.4576V267.776h256v43.4176h-256V381.952h208.8448a805.9904 805.9904 0 0 1-84.8384 212.6848c60.672 22.016 336.7936 106.3936 336.7936 106.3936zM283.5456 791.6032c-149.6576 0-173.312-94.464-165.376-133.9392 7.8336-39.3216 51.2-90.624 134.4-90.624 95.5904 0 181.248 24.4736 284.0576 74.5472-72.192 94.0032-160.9216 150.016-253.0816 150.016z",
24
24
  fill: "#009FE8",
25
- "p-id": "7114"
25
+ "data-p-id": "7114"
26
26
  })));
27
27
  IconAlipay.displayName = 'IconAlipay';
28
28
  var _default = exports.default = IconAlipay;
@@ -1,34 +1,34 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.default = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
7
9
  var _react = _interopRequireDefault(require("react"));
8
10
  var _omit = _interopRequireDefault(require("../../utils/omit"));
9
11
  var _getPrefixCls = require("../../utils/getPrefixCls");
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- 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); }
12
12
  const classPrefix = (0, _getPrefixCls.getPrefixCls)('icon');
13
- const IconClose = /*#__PURE__*/_react.default.forwardRef((props, ref) => /*#__PURE__*/_react.default.createElement("svg", _extends({
13
+ const IconClose = /*#__PURE__*/_react.default.forwardRef((props, ref) => /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
14
14
  ref: ref,
15
15
  d: "1750733458208",
16
16
  viewBox: "0 0 1024 1024",
17
17
  version: "1.1",
18
18
  xmlns: "http://www.w3.org/2000/svg",
19
- "p-id": "4564",
19
+ "data-p-id": "4564",
20
20
  stroke: "currentColor",
21
21
  strokeWidth: "4",
22
- className: "".concat(classPrefix, " ").concat(classPrefix, "-close")
22
+ className: `${classPrefix} ${classPrefix}-close`
23
23
  }, (0, _omit.default)(props, ['className'])), /*#__PURE__*/_react.default.createElement("path", {
24
24
  d: "M0 0h1024v1024H0z",
25
25
  fill: "#999999",
26
- "fill-opacity": "0",
27
- "p-id": "4565"
26
+ fillOpacity: "0",
27
+ "data-p-id": "4565"
28
28
  }), /*#__PURE__*/_react.default.createElement("path", {
29
29
  d: "M240.448 168l2.346667 2.154667 289.92 289.941333 279.253333-279.253333a42.666667 42.666667 0 0 1 62.506667 58.026666l-2.133334 2.346667-279.296 279.210667 279.274667 279.253333a42.666667 42.666667 0 0 1-58.005333 62.528l-2.346667-2.176-279.253333-279.253333-289.92 289.962666a42.666667 42.666667 0 0 1-62.506667-58.005333l2.154667-2.346667 289.941333-289.962666-289.92-289.92a42.666667 42.666667 0 0 1 57.984-62.506667z",
30
30
  fill: "#999999",
31
- "p-id": "4566"
31
+ "data-p-id": "4566"
32
32
  })));
33
33
  IconClose.displayName = 'IconClose';
34
34
  var _default = exports.default = IconClose;
@@ -1,34 +1,34 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.default = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
7
9
  var _react = _interopRequireDefault(require("react"));
8
10
  var _omit = _interopRequireDefault(require("../../utils/omit"));
9
11
  var _getPrefixCls = require("../../utils/getPrefixCls");
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- 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); }
12
12
  const classPrefix = (0, _getPrefixCls.getPrefixCls)('icon');
13
- const IconPaypalText = /*#__PURE__*/_react.default.forwardRef((props, ref) => /*#__PURE__*/_react.default.createElement("svg", _extends({
13
+ const IconPaypalText = /*#__PURE__*/_react.default.forwardRef((props, ref) => /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
14
14
  ref: ref,
15
15
  d: "1749543295731",
16
16
  viewBox: "0 0 3711 1024",
17
17
  version: "1.1",
18
18
  xmlns: "http://www.w3.org/2000/svg",
19
- "p-id": "4652",
19
+ "data-p-id": "4652",
20
20
  id: "mx_n_1749543295732",
21
21
  stroke: "currentColor",
22
22
  strokeWidth: "4",
23
- className: "".concat(classPrefix, " ").concat(classPrefix, "-paypal-text")
23
+ className: `${classPrefix} ${classPrefix}-paypal-text`
24
24
  }, (0, _omit.default)(props, ['className'])), /*#__PURE__*/_react.default.createElement("path", {
25
25
  d: "M470.648858 1.406067c118.876545 0 230.083635 66.59643 215.256023 235.196604-18.534515 199.661465-122.455624 309.334665-285.815005 313.297217H258.971914c-22.241418 0-29.655224 15.722382-37.06903 54.964424l-26.076146 180.23218c-3.706903 27.354388-18.534515 39.114218-37.06903 39.114218H25.053551c-22.241418 0-29.655224-15.722382-22.241418-47.039321L110.440145 52.407939C114.274872 17.000624 129.102484 1.406067 151.343902 1.406067h319.304956zM251.558108 393.187367h107.628011c66.852078-3.834727 111.462739-50.874048 115.041818-137.155411 3.834727-54.8366-33.234303-93.950818-88.965673-93.950818h-100.342029l-33.362127 231.106229z m794.555486 376.186744c11.120709-11.75983 25.948321-15.722382 22.241418-3.962552l-3.706903 35.279491c-3.706903 19.557109 3.834727 27.354388 18.534515 27.354388h118.876545c18.534515 0 29.655224-7.669455 33.362127-39.114218l74.265884-474.100113c3.834727-23.51966-3.706903-35.279491-18.534515-35.27949H1161.155411c-11.120709 0-18.534515 7.925103-18.534515 23.51966l-3.706903 27.482212c-3.706903 15.594557-7.413806 19.557109-14.827612 3.834727-22.241418-54.8366-77.972787-78.35626-155.945575-78.35626-181.893896 3.962551-304.477344 148.915242-315.598052 329.147422-11.120709 140.990139 89.093496 254.625889 215.383847 254.62589 89.093496 3.962551 129.86943-23.51966 178.186993-70.431157zM945.899388 698.815129c-77.972787 0-133.704157-66.59643-122.583447-144.95269 11.120709-78.35626 85.386593-144.95269 163.35938-144.95269s133.704157 66.468606 122.583448 144.95269C1098.010236 632.218699 1023.872176 698.815129 945.899388 698.815129z m593.999251-419.263512h-118.876544c-25.948321 0-33.234303 19.684933-25.948321 43.076769l148.531768 450.580452-144.824865 215.511671c-11.120709 19.557109-3.706903 35.279491 14.955436 35.279491h133.576332c18.662339 0 29.783048-3.834727 40.903758-19.557109l449.302209-681.814505c14.827612-19.557109 7.413806-43.076769-14.955436-43.076769h-126.162527c-22.369242 0-29.783048 7.925103-44.61066 27.482211l-189.307702 285.942829-85.386593-285.942829c-3.834727-19.557109-14.827612-27.482212-37.06903-27.482211z",
26
26
  fill: "#113984",
27
- "p-id": "4653"
27
+ "data-p-id": "4653"
28
28
  }), /*#__PURE__*/_react.default.createElement("path", {
29
29
  d: "M2524.912246 1.406067c121.177381 0 234.685308 60.844339 219.602047 215.000374-18.917988 182.660841-124.884284 282.875047-291.439271 286.58195h-143.930096c-22.624891 0-30.166521 14.316315-37.835976 50.107103l-26.459618 164.765447c-3.834727 25.053551-18.917988 35.790788-37.835975 35.790788H2070.752715c-22.752715 0-30.294345-14.316315-22.752715-42.948945l113.635751-666.347772c3.834727-28.63263 15.083261-42.948945 41.542878-42.948945h321.733617z m-219.474223 358.163525h109.801023c68.130321-3.579079 113.507927-46.528024 117.342654-125.267757 3.834727-50.234927-34.129073-86.025715-90.883036-86.025715h-102.259393l-34.001248 211.293472z m806.187492 343.84721c11.376358-10.609412 26.459618-14.188491 22.752715-3.451255l-3.834727 32.211709c-3.834727 17.895394 3.834727 25.053551 18.917987 25.053552h121.177382c18.917988 0 30.294345-7.158158 34.001248-35.790788l75.799775-433.452004c3.834727-21.474473-3.834727-32.211709-18.917988-32.211708H3228.840345c-11.376358 0-18.917988 7.158158-18.917988 21.474472l-3.834727 25.053552c-3.834727 14.316315-7.54163 17.895394-15.083261 3.579078-22.752715-50.107103-79.506678-71.581575-159.013357-71.581575-185.34515 3.579079-310.357259 136.132817-321.733616 300.898265-11.376358 128.97466 90.883036 232.767944 219.602047 232.767944 90.755212 3.579079 136.260642-21.474473 181.638248-64.423418z m-98.424666-64.423418c-79.506678 0-136.260642-60.844339-124.884284-132.425914 11.376358-71.7094 87.048309-132.553739 166.554987-132.553739 79.506678 0 136.260642 60.844339 124.884284 132.553739-15.083261 71.581575-86.920484 132.425914-166.554987 132.425914z m552.712021 118.237424H3425.689677c-11.376358 0-18.917988-7.158158-18.917988-17.895394L3527.94907 22.880539c0-10.737236 11.248533-17.895394 22.624891-17.895394h140.095369c11.376358 0 18.917988 7.158158 15.08326 17.895394l-121.049557 716.454875c3.834727 10.737236-7.669455 17.895394-18.917987 17.895394z",
30
30
  fill: "#009DE2",
31
- "p-id": "4654"
31
+ "data-p-id": "4654"
32
32
  })));
33
33
  IconPaypalText.displayName = 'IconPaypalText';
34
34
  var _default = exports.default = IconPaypalText;