pay-sdk-react 1.1.1 → 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.
- package/README.md +38 -20
- package/README.zh-CN.md +38 -20
- package/dist/css/index.css +703 -1
- package/dist/css/index.min.css +1 -0
- package/dist/es/Airwallex/airwallex-button.js +56 -36
- package/dist/es/Airwallex/airwallex-modal.js +41 -34
- package/dist/es/Airwallex/airwallex-popup.js +43 -38
- package/dist/es/Airwallex/airwallex.js +26 -28
- package/dist/es/Airwallex/index.js +1 -1
- package/dist/es/Airwallex/style/index.css +335 -1
- package/dist/es/Airwallex/style/index.min.css +1 -0
- package/dist/es/Alipay/alipay-button.js +39 -24
- package/dist/es/Alipay/alipay-modal.js +38 -32
- package/dist/es/Alipay/alipay.js +22 -15
- package/dist/es/Alipay/index.d.ts +4 -4
- package/dist/es/Alipay/index.js +5 -5
- package/dist/es/Alipay/interface.d.ts +7 -9
- package/dist/es/Alipay/style/index.css +18 -1
- package/dist/es/Alipay/style/index.min.css +1 -0
- package/dist/es/Button/button.js +62 -37
- package/dist/es/Button/index.d.ts +2 -2
- package/dist/es/Button/index.js +2 -2
- package/dist/es/Button/interface.d.ts +4 -0
- package/dist/es/Button/style/index.css +95 -1
- package/dist/es/Button/style/index.min.css +1 -0
- package/dist/es/FullScreenLoading/index.js +40 -40
- package/dist/es/FullScreenLoading/interface.d.ts +2 -2
- package/dist/es/FullScreenLoading/style/index.css +239 -1
- package/dist/es/FullScreenLoading/style/index.min.css +1 -0
- package/dist/es/MAlipay/index.js +1 -1
- package/dist/es/MAlipay/m-alipay-auto-submit.js +9 -11
- package/dist/es/MAlipay/m-alipay-button.js +86 -55
- package/dist/es/MAlipay/style/index.css +252 -1
- package/dist/es/MAlipay/style/index.min.css +1 -0
- package/dist/es/MWeChat/index.d.ts +2 -2
- package/dist/es/MWeChat/index.js +2 -2
- package/dist/es/MWeChat/m-wechat-button.js +86 -54
- package/dist/es/MWeChat/style/index.css +252 -1
- package/dist/es/MWeChat/style/index.min.css +1 -0
- package/dist/es/Mask/index.d.ts +2 -2
- package/dist/es/Mask/index.js +2 -2
- package/dist/es/Mask/mask.js +48 -45
- package/dist/es/Mask/style/index.css +11 -1
- package/dist/es/Mask/style/index.min.css +1 -0
- package/dist/es/PayButton/index.js +2 -2
- package/dist/es/PayButton/interface.d.ts +9 -9
- package/dist/es/PayButton/interface.js +1 -1
- package/dist/es/PayMask/index.d.ts +2 -2
- package/dist/es/PayMask/index.js +2 -2
- package/dist/es/PayMask/interface.d.ts +2 -2
- package/dist/es/PayMask/pay-mask.js +41 -40
- package/dist/es/PayMask/style/index.css +62 -1
- package/dist/es/PayMask/style/index.min.css +1 -0
- package/dist/es/Paypal/index.d.ts +2 -2
- package/dist/es/Paypal/index.js +2 -2
- package/dist/es/Paypal/paypal-button.js +55 -36
- package/dist/es/Paypal/style/index.css +207 -1
- package/dist/es/Paypal/style/index.min.css +1 -0
- package/dist/es/Payssion/index.d.ts +2 -2
- package/dist/es/Payssion/index.js +2 -2
- package/dist/es/Payssion/payssion-button.js +56 -37
- package/dist/es/Payssion/style/index.css +157 -1
- package/dist/es/Payssion/style/index.min.css +1 -0
- package/dist/es/Stripe/index.d.ts +5 -5
- package/dist/es/Stripe/index.js +6 -6
- package/dist/es/Stripe/stripe-button.js +47 -33
- package/dist/es/Stripe/stripe-modal.js +38 -32
- package/dist/es/Stripe/stripe-popup.js +42 -37
- package/dist/es/Stripe/stripe.js +15 -15
- package/dist/es/Stripe/style/index.css +365 -1
- package/dist/es/Stripe/style/index.min.css +1 -0
- package/dist/es/Wechat/index.d.ts +4 -4
- package/dist/es/Wechat/index.js +5 -5
- package/dist/es/Wechat/style/index.css +25 -1
- package/dist/es/Wechat/style/index.min.css +1 -0
- package/dist/es/Wechat/wechat-button.js +38 -23
- package/dist/es/Wechat/wechat-modal.js +37 -31
- package/dist/es/Wechat/wechat.js +16 -12
- package/dist/es/confirm-modal/index.d.ts +3 -3
- package/dist/es/confirm-modal/index.js +53 -35
- package/dist/es/confirm-modal/interface.d.ts +2 -2
- package/dist/es/confirm-modal/style/index.css +95 -1
- package/dist/es/confirm-modal/style/index.min.css +1 -0
- package/dist/es/dot-loading/dot-loading.js +25 -23
- package/dist/es/dot-loading/index.d.ts +2 -2
- package/dist/es/dot-loading/index.js +2 -2
- package/dist/es/dot-loading/style/index.css +3 -1
- package/dist/es/dot-loading/style/index.min.css +1 -0
- package/dist/es/hooks/use-initialized.js +2 -2
- package/dist/es/hooks/use-inner-visible.js +8 -4
- package/dist/es/hooks/use-lock-scroll.d.ts +2 -2
- package/dist/es/hooks/use-lock-scroll.js +30 -34
- package/dist/es/hooks/use-touch.d.ts +1 -1
- package/dist/es/hooks/use-touch.js +35 -31
- package/dist/es/hooks/usePayWindowOpen.d.ts +1 -1
- package/dist/es/hooks/usePayWindowOpen.js +31 -27
- package/dist/es/icons/IconAlipay/index.js +18 -16
- package/dist/es/icons/IconClose/index.js +24 -22
- package/dist/es/icons/IconPaypalText/index.js +24 -22
- package/dist/es/icons/IconPaypalWhite/index.js +19 -17
- package/dist/es/icons/IconPayssionPay/index.js +47 -45
- package/dist/es/icons/IconStripe/index.js +19 -17
- package/dist/es/icons/IconStripeText/index.js +19 -17
- package/dist/es/icons/IconWechatPay/index.js +18 -16
- package/dist/es/icons/interface.d.ts +1 -1
- package/dist/es/icons/style/index.css +45 -1
- package/dist/es/icons/style/index.min.css +1 -0
- package/dist/es/index.d.ts +1 -1
- package/dist/es/pay-modal/index.d.ts +2 -2
- package/dist/es/pay-modal/index.js +2 -2
- package/dist/es/pay-modal/interface.d.ts +8 -18
- package/dist/es/pay-modal/pay-modal.js +53 -42
- package/dist/es/pay-modal/style/index.css +95 -1
- package/dist/es/pay-modal/style/index.min.css +1 -0
- package/dist/es/pay-popup/index.js +51 -53
- package/dist/es/pay-popup/interface.d.ts +6 -6
- package/dist/es/pay-popup/style/index.css +145 -1
- package/dist/es/pay-popup/style/index.min.css +1 -0
- package/dist/es/shared/enums/index.js +1 -1
- package/dist/es/shared/index.d.ts +1 -1
- package/dist/es/shared/index.js +1 -1
- package/dist/es/utils/can-use-dom.js +1 -1
- package/dist/es/utils/classNames.js +15 -11
- package/dist/es/utils/dom.js +18 -18
- package/dist/es/utils/get-container.js +2 -2
- package/dist/es/utils/get-scroll-parent.js +8 -9
- package/dist/es/utils/is.js +54 -32
- package/dist/es/utils/native-props.d.ts +2 -2
- package/dist/es/utils/native-props.js +7 -9
- package/dist/es/utils/omit.js +3 -5
- package/dist/es/utils/qrcode.js +5 -5
- package/dist/es/utils/render-to-container.d.ts +1 -1
- package/dist/es/utils/render-to-container.js +4 -4
- package/dist/es/utils/should-render.d.ts +1 -1
- package/dist/es/utils/should-render.js +4 -4
- package/dist/es/utils/supports-passive.js +8 -7
- package/dist/es/utils/warning.js +0 -1
- package/dist/es/utils/with-default-props.js +6 -4
- package/dist/es/utils/with-stop-propagation.d.ts +3 -3
- package/dist/es/utils/with-stop-propagation.js +27 -14
- package/dist/lib/Airwallex/airwallex-button.js +12 -15
- package/dist/lib/Airwallex/airwallex-modal.js +11 -14
- package/dist/lib/Airwallex/airwallex-popup.js +16 -23
- package/dist/lib/Airwallex/airwallex.js +20 -25
- package/dist/lib/Airwallex/index.js +1 -1
- package/dist/lib/Airwallex/style/index.css +335 -1
- package/dist/lib/Airwallex/style/index.min.css +1 -0
- package/dist/lib/Alipay/alipay-button.js +12 -15
- package/dist/lib/Alipay/alipay-modal.js +10 -13
- package/dist/lib/Alipay/alipay.js +19 -23
- package/dist/lib/Alipay/index.js +1 -1
- package/dist/lib/Alipay/style/index.css +18 -1
- package/dist/lib/Alipay/style/index.min.css +1 -0
- package/dist/lib/Button/button.js +13 -13
- package/dist/lib/Button/index.js +1 -1
- package/dist/lib/Button/style/index.css +95 -1
- package/dist/lib/Button/style/index.min.css +1 -0
- package/dist/lib/FullScreenLoading/index.js +28 -29
- package/dist/lib/FullScreenLoading/style/index.css +239 -1
- package/dist/lib/FullScreenLoading/style/index.min.css +1 -0
- package/dist/lib/MAlipay/index.js +1 -1
- package/dist/lib/MAlipay/m-alipay-auto-submit.js +3 -4
- package/dist/lib/MAlipay/m-alipay-button.js +42 -41
- package/dist/lib/MAlipay/style/index.css +252 -1
- package/dist/lib/MAlipay/style/index.min.css +1 -0
- package/dist/lib/MWeChat/index.js +2 -2
- package/dist/lib/MWeChat/m-wechat-button.js +43 -41
- package/dist/lib/MWeChat/style/index.css +252 -1
- package/dist/lib/MWeChat/style/index.min.css +1 -0
- package/dist/lib/Mask/index.js +1 -1
- package/dist/lib/Mask/mask.js +6 -11
- package/dist/lib/Mask/style/index.css +11 -1
- package/dist/lib/Mask/style/index.min.css +1 -0
- package/dist/lib/PayButton/index.js +10 -10
- package/dist/lib/PayMask/index.js +1 -1
- package/dist/lib/PayMask/pay-mask.js +20 -23
- package/dist/lib/PayMask/style/index.css +62 -1
- package/dist/lib/PayMask/style/index.min.css +1 -0
- package/dist/lib/Paypal/index.js +2 -2
- package/dist/lib/Paypal/paypal-button.js +17 -22
- package/dist/lib/Paypal/style/index.css +207 -1
- package/dist/lib/Paypal/style/index.min.css +1 -0
- package/dist/lib/Payssion/index.js +2 -2
- package/dist/lib/Payssion/payssion-button.js +17 -22
- package/dist/lib/Payssion/style/index.css +157 -1
- package/dist/lib/Payssion/style/index.min.css +1 -0
- package/dist/lib/Stripe/index.js +1 -1
- package/dist/lib/Stripe/stripe-button.js +14 -17
- package/dist/lib/Stripe/stripe-modal.js +10 -13
- package/dist/lib/Stripe/stripe-popup.js +16 -23
- package/dist/lib/Stripe/stripe.js +8 -11
- package/dist/lib/Stripe/style/index.css +365 -1
- package/dist/lib/Stripe/style/index.min.css +1 -0
- package/dist/lib/Wechat/index.js +1 -1
- package/dist/lib/Wechat/style/index.css +25 -1
- package/dist/lib/Wechat/style/index.min.css +1 -0
- package/dist/lib/Wechat/wechat-button.js +12 -15
- package/dist/lib/Wechat/wechat-modal.js +9 -12
- package/dist/lib/Wechat/wechat.js +11 -12
- package/dist/lib/confirm-modal/index.js +22 -12
- package/dist/lib/confirm-modal/style/index.css +95 -1
- package/dist/lib/confirm-modal/style/index.min.css +1 -0
- package/dist/lib/dot-loading/dot-loading.js +3 -4
- package/dist/lib/dot-loading/index.js +1 -1
- package/dist/lib/dot-loading/style/index.css +3 -1
- package/dist/lib/dot-loading/style/index.min.css +1 -0
- package/dist/lib/hooks/use-lock-scroll.js +11 -12
- package/dist/lib/hooks/use-touch.js +10 -10
- package/dist/lib/hooks/usePayWindowOpen.js +14 -15
- package/dist/lib/icons/IconAlipay/index.js +6 -6
- package/dist/lib/icons/IconClose/index.js +8 -8
- package/dist/lib/icons/IconPaypalText/index.js +7 -7
- package/dist/lib/icons/IconPaypalWhite/index.js +6 -6
- package/dist/lib/icons/IconPayssionPay/index.js +13 -13
- package/dist/lib/icons/IconStripe/index.js +6 -6
- package/dist/lib/icons/IconStripeText/index.js +6 -6
- package/dist/lib/icons/IconWechatPay/index.js +6 -6
- package/dist/lib/icons/index.js +2 -2
- package/dist/lib/icons/style/index.css +45 -1
- package/dist/lib/icons/style/index.min.css +1 -0
- package/dist/lib/index.js +2 -2
- package/dist/lib/pay-modal/index.js +1 -1
- package/dist/lib/pay-modal/pay-modal.js +29 -21
- package/dist/lib/pay-modal/style/index.css +95 -1
- package/dist/lib/pay-modal/style/index.min.css +1 -0
- package/dist/lib/pay-popup/index.js +24 -28
- package/dist/lib/pay-popup/style/index.css +145 -1
- package/dist/lib/pay-popup/style/index.min.css +1 -0
- package/dist/lib/utils/can-use-dom.js +1 -1
- package/dist/lib/utils/classNames.js +6 -7
- package/dist/lib/utils/dom.js +9 -11
- package/dist/lib/utils/get-scroll-parent.js +2 -3
- package/dist/lib/utils/getPrefixCls.js +1 -1
- package/dist/lib/utils/is.js +16 -14
- package/dist/lib/utils/native-props.js +10 -10
- package/dist/lib/utils/omit.js +3 -6
- package/dist/lib/utils/qrcode.js +1 -1
- package/dist/lib/utils/supports-passive.js +4 -3
- package/dist/lib/utils/warning.js +2 -6
- package/dist/lib/utils/with-default-props.js +4 -8
- package/dist/lib/utils/with-stop-propagation.js +6 -9
- package/dist/umd/pay-sdk-react.umd.js +106 -86
- package/dist/umd/pay-sdk-react.umd.js.map +1 -1
- package/package.json +5 -2
package/dist/lib/Mask/index.js
CHANGED
|
@@ -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 = _mask.default;
|
package/dist/lib/Mask/mask.js
CHANGED
|
@@ -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
|
});
|
|
@@ -27,13 +28,7 @@ Object.keys(_interface).forEach(function (key) {
|
|
|
27
28
|
}
|
|
28
29
|
});
|
|
29
30
|
});
|
|
30
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
31
31
|
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); }
|
|
32
|
-
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; }
|
|
33
|
-
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; }
|
|
34
|
-
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; }
|
|
35
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
36
|
-
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); }
|
|
37
32
|
const classPrefix = (0, _getPrefixCls.getPrefixCls)('mask');
|
|
38
33
|
const opacityRecord = {
|
|
39
34
|
default: 0.7,
|
|
@@ -59,10 +54,9 @@ const Mask = p => {
|
|
|
59
54
|
const ref = (0, _react.useRef)(null);
|
|
60
55
|
(0, _useLockScroll.useLockScroll)(ref, props.visible && props.disableBodyScroll);
|
|
61
56
|
const background = (0, _react.useMemo)(() => {
|
|
62
|
-
|
|
63
|
-
const opacity = (_opacityRecord = opacityRecord[props.opacity]) !== null && _opacityRecord !== void 0 ? _opacityRecord : props.opacity;
|
|
57
|
+
const opacity = opacityRecord[props.opacity] ?? props.opacity;
|
|
64
58
|
const rgb = colorRecord[props.color];
|
|
65
|
-
return rgb ?
|
|
59
|
+
return rgb ? `rgba(${rgb}, ${opacity})` : props.color;
|
|
66
60
|
}, [props.color, props.opacity]);
|
|
67
61
|
const [active, setActive] = (0, _react.useState)(props.visible);
|
|
68
62
|
const unmountedRef = (0, _ahooks.useUnmountedRef)();
|
|
@@ -96,11 +90,12 @@ const Mask = p => {
|
|
|
96
90
|
className: (0, _classNames.default)(classPrefix, props.className),
|
|
97
91
|
ref: ref,
|
|
98
92
|
"aria-hidden": true,
|
|
99
|
-
style:
|
|
93
|
+
style: {
|
|
94
|
+
...props.style,
|
|
100
95
|
background,
|
|
101
96
|
opacity,
|
|
102
97
|
display: active ? undefined : 'none'
|
|
103
|
-
}
|
|
98
|
+
},
|
|
104
99
|
onClick: e => {
|
|
105
100
|
if (e.target === e.currentTarget) {
|
|
106
101
|
var _props$onMaskClick;
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
.pay-mask{
|
|
1
|
+
.pay-mask {
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: 1000;
|
|
4
|
+
left: 0;
|
|
5
|
+
top: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
bottom: 0;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pay-mask{position:fixed;z-index:1000;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}
|
|
@@ -1,10 +1,12 @@
|
|
|
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
|
var _exportNames = {};
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
var _shared = require("../shared");
|
|
10
12
|
var _Paypal = require("../Paypal");
|
|
@@ -27,47 +29,45 @@ Object.keys(_interface).forEach(function (key) {
|
|
|
27
29
|
}
|
|
28
30
|
});
|
|
29
31
|
});
|
|
30
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
31
32
|
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); }
|
|
32
|
-
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); }
|
|
33
33
|
const PayButton = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
34
34
|
if (props.payMethod === _shared.PaymentMethod.PaypalH5 || props.payMethod === _shared.PaymentMethod.PaypalPc) {
|
|
35
|
-
return /*#__PURE__*/_react.default.createElement(_Paypal.PaypalButton,
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(_Paypal.PaypalButton, (0, _extends2.default)({
|
|
36
36
|
ref: ref
|
|
37
37
|
}, props));
|
|
38
38
|
}
|
|
39
39
|
if (props.payMethod === _shared.PaymentMethod.StripeH5 || props.payMethod === _shared.PaymentMethod.StripePc) {
|
|
40
|
-
return /*#__PURE__*/_react.default.createElement(_Stripe.default.Button,
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_Stripe.default.Button, (0, _extends2.default)({
|
|
41
41
|
ref: ref
|
|
42
42
|
}, props));
|
|
43
43
|
}
|
|
44
44
|
if (props.payMethod === _shared.PaymentMethod.Airwallex) {
|
|
45
|
-
return /*#__PURE__*/_react.default.createElement(_Airwallex.default.Button,
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_Airwallex.default.Button, (0, _extends2.default)({
|
|
46
46
|
ref: ref
|
|
47
47
|
}, props));
|
|
48
48
|
}
|
|
49
49
|
if (props.payMethod === _shared.PaymentMethod.Payssion) {
|
|
50
|
-
return /*#__PURE__*/_react.default.createElement(_Payssion.PayssionButton,
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement(_Payssion.PayssionButton, (0, _extends2.default)({
|
|
51
51
|
ref: ref
|
|
52
52
|
}, props));
|
|
53
53
|
}
|
|
54
54
|
if (props.payMethod === _shared.PaymentMethod.WechatH5) {
|
|
55
|
-
return /*#__PURE__*/_react.default.createElement(_MWeChat.MWechatButton,
|
|
55
|
+
return /*#__PURE__*/_react.default.createElement(_MWeChat.MWechatButton, (0, _extends2.default)({
|
|
56
56
|
ref: ref
|
|
57
57
|
}, props));
|
|
58
58
|
}
|
|
59
59
|
if (props.payMethod === _shared.PaymentMethod.AlipayH5) {
|
|
60
|
-
return /*#__PURE__*/_react.default.createElement(_MAlipay.default.Button,
|
|
60
|
+
return /*#__PURE__*/_react.default.createElement(_MAlipay.default.Button, (0, _extends2.default)({
|
|
61
61
|
ref: ref
|
|
62
62
|
}, props));
|
|
63
63
|
}
|
|
64
64
|
if (props.payMethod === _shared.PaymentMethod.AlipayPc) {
|
|
65
|
-
return /*#__PURE__*/_react.default.createElement(_Alipay.default.Button,
|
|
65
|
+
return /*#__PURE__*/_react.default.createElement(_Alipay.default.Button, (0, _extends2.default)({
|
|
66
66
|
ref: ref
|
|
67
67
|
}, props));
|
|
68
68
|
}
|
|
69
69
|
if (props.payMethod === _shared.PaymentMethod.WechatPc) {
|
|
70
|
-
return /*#__PURE__*/_react.default.createElement(_Wechat.default.Button,
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement(_Wechat.default.Button, (0, _extends2.default)({
|
|
71
71
|
ref: ref
|
|
72
72
|
}, props));
|
|
73
73
|
}
|
|
@@ -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 = _payMask.default;
|
|
@@ -1,10 +1,12 @@
|
|
|
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
|
var _exportNames = {};
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
var _Mask = _interopRequireDefault(require("../Mask"));
|
|
10
12
|
var _usePayWindowOpen = require("../hooks/usePayWindowOpen");
|
|
@@ -23,34 +25,29 @@ Object.keys(_interface).forEach(function (key) {
|
|
|
23
25
|
}
|
|
24
26
|
});
|
|
25
27
|
});
|
|
26
|
-
const _excluded = ["visible", "payUrl", "onClose", "onMaskClick", "onContinue", "openMode", "autoOpenWindow", "className", "destroyOnClose"];
|
|
27
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
28
28
|
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); }
|
|
29
|
-
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); }
|
|
30
|
-
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; }
|
|
31
|
-
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; }
|
|
32
29
|
const classPrefix = (0, _getPrefixCls.getPrefixCls)('mask');
|
|
33
30
|
const defaultProps = {
|
|
34
31
|
visible: false,
|
|
35
32
|
title: 'Pay',
|
|
36
|
-
desc:
|
|
33
|
+
desc: `Don't see the secure pay browser? We'll help you re-launch the window to complete your purchase`,
|
|
37
34
|
buttonText: 'Click to Continue',
|
|
38
35
|
autoOpenWindow: true
|
|
39
36
|
};
|
|
40
37
|
const PayMask = p => {
|
|
41
38
|
const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
|
|
42
39
|
const {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
40
|
+
visible,
|
|
41
|
+
payUrl,
|
|
42
|
+
onClose,
|
|
43
|
+
onMaskClick,
|
|
44
|
+
onContinue,
|
|
45
|
+
openMode,
|
|
46
|
+
autoOpenWindow,
|
|
47
|
+
className,
|
|
48
|
+
destroyOnClose = true,
|
|
49
|
+
...rest
|
|
50
|
+
} = props;
|
|
54
51
|
const [isWindowMonitoring, setIsWindowMonitoring] = (0, _react.useState)(false);
|
|
55
52
|
const {
|
|
56
53
|
openWindow,
|
|
@@ -87,7 +84,7 @@ const PayMask = p => {
|
|
|
87
84
|
closeWindow();
|
|
88
85
|
};
|
|
89
86
|
const classNames = (0, _classNames.default)(classPrefix, className);
|
|
90
|
-
return /*#__PURE__*/_react.default.createElement(_Mask.default,
|
|
87
|
+
return /*#__PURE__*/_react.default.createElement(_Mask.default, (0, _extends2.default)({
|
|
91
88
|
visible: visible,
|
|
92
89
|
onMaskClick: e => {
|
|
93
90
|
handleClose();
|
|
@@ -96,16 +93,16 @@ const PayMask = p => {
|
|
|
96
93
|
className: classNames,
|
|
97
94
|
destroyOnClose: destroyOnClose
|
|
98
95
|
}, rest), /*#__PURE__*/_react.default.createElement("div", {
|
|
99
|
-
className:
|
|
96
|
+
className: `${classPrefix}-content`
|
|
100
97
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
101
|
-
className:
|
|
98
|
+
className: `${classPrefix}-close`,
|
|
102
99
|
onClick: handleClose
|
|
103
100
|
}, "\xD7"), /*#__PURE__*/_react.default.createElement("div", {
|
|
104
|
-
className:
|
|
101
|
+
className: `${classPrefix}-title`
|
|
105
102
|
}, props.title), /*#__PURE__*/_react.default.createElement("div", {
|
|
106
|
-
className:
|
|
103
|
+
className: `${classPrefix}-desc`
|
|
107
104
|
}, props.desc), /*#__PURE__*/_react.default.createElement("div", {
|
|
108
|
-
className:
|
|
105
|
+
className: `${classPrefix}-continue`,
|
|
109
106
|
onClick: handleContinue
|
|
110
107
|
}, props.buttonText)));
|
|
111
108
|
};
|
|
@@ -1 +1,62 @@
|
|
|
1
|
-
.pay-mask
|
|
1
|
+
.pay-mask {
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: 1000;
|
|
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-mask-content {
|
|
13
|
+
position: relative;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
padding: 0 88px;
|
|
21
|
+
}
|
|
22
|
+
.pay-mask-close {
|
|
23
|
+
position: absolute;
|
|
24
|
+
right: 12px;
|
|
25
|
+
top: 12px;
|
|
26
|
+
background: none;
|
|
27
|
+
border: none;
|
|
28
|
+
font-size: 28px;
|
|
29
|
+
color: #fff;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
z-index: 1;
|
|
32
|
+
}
|
|
33
|
+
.pay-mask-title {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: 4px;
|
|
37
|
+
font-weight: 700;
|
|
38
|
+
font-size: 28px;
|
|
39
|
+
color: #fff;
|
|
40
|
+
margin-bottom: 16px;
|
|
41
|
+
text-shadow: 0 2px 8px #000;
|
|
42
|
+
}
|
|
43
|
+
.pay-mask-title > .pay-icon-paypal-white {
|
|
44
|
+
width: 36px;
|
|
45
|
+
height: 36px;
|
|
46
|
+
}
|
|
47
|
+
.pay-mask-desc {
|
|
48
|
+
color: #fff;
|
|
49
|
+
text-align: center;
|
|
50
|
+
margin-bottom: 24px;
|
|
51
|
+
line-height: 1.5;
|
|
52
|
+
white-space: pre-line;
|
|
53
|
+
}
|
|
54
|
+
.pay-mask-continue {
|
|
55
|
+
color: #fff;
|
|
56
|
+
font-weight: 700;
|
|
57
|
+
text-decoration: underline;
|
|
58
|
+
text-underline-offset: 4px;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
text-align: center;
|
|
61
|
+
font-size: 18px;
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pay-mask{position:fixed;z-index:1000;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-mask-content{position:relative;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 88px}.pay-mask-close{position:absolute;right:12px;top:12px;background:0 0;border:none;font-size:28px;color:#fff;cursor:pointer;z-index:1}.pay-mask-title{display:flex;align-items:center;gap:4px;font-weight:700;font-size:28px;color:#fff;margin-bottom:16px;text-shadow:0 2px 8px #000}.pay-mask-title>.pay-icon-paypal-white{width:36px;height:36px}.pay-mask-desc{color:#fff;text-align:center;margin-bottom:24px;line-height:1.5;white-space:pre-line}.pay-mask-continue{color:#fff;font-weight:700;text-decoration:underline;text-underline-offset:4px;cursor:pointer;text-align:center;font-size:18px}
|
package/dist/lib/Paypal/index.js
CHANGED
|
@@ -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
|
});
|
|
@@ -24,5 +25,4 @@ Object.keys(_interface).forEach(function (key) {
|
|
|
24
25
|
}
|
|
25
26
|
});
|
|
26
27
|
});
|
|
27
|
-
var _paypalButton = _interopRequireDefault(require("./paypal-button"));
|
|
28
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
28
|
+
var _paypalButton = _interopRequireDefault(require("./paypal-button"));
|
|
@@ -1,37 +1,32 @@
|
|
|
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 = _interopRequireWildcard(require("react"));
|
|
8
10
|
var _icons = require("../icons");
|
|
9
11
|
var _classNames = _interopRequireDefault(require("../utils/classNames"));
|
|
10
12
|
var _PayMask = _interopRequireDefault(require("../PayMask"));
|
|
11
13
|
var _Button = _interopRequireDefault(require("../Button"));
|
|
12
14
|
var _getPrefixCls = require("../utils/getPrefixCls");
|
|
13
|
-
const _excluded = ["className", "children", "onClick", "paypalUrl", "createOrder", "maskProps"],
|
|
14
|
-
_excluded2 = ["onClose"];
|
|
15
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
15
|
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); }
|
|
17
|
-
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); }
|
|
18
|
-
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; }
|
|
19
|
-
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; }
|
|
20
16
|
const PaypalButton = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
21
17
|
const {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
restMaskProps = _objectWithoutProperties(_ref, _excluded2);
|
|
18
|
+
className,
|
|
19
|
+
children = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_icons.IconPaypalText, null), " Buy Now"),
|
|
20
|
+
onClick,
|
|
21
|
+
paypalUrl: propsPaypalUrl,
|
|
22
|
+
createOrder,
|
|
23
|
+
maskProps,
|
|
24
|
+
...others
|
|
25
|
+
} = props;
|
|
26
|
+
const {
|
|
27
|
+
onClose: onMaskClose,
|
|
28
|
+
...restMaskProps
|
|
29
|
+
} = maskProps || {};
|
|
35
30
|
const paypalButtonRef = (0, _react.useRef)({
|
|
36
31
|
nativeElement: null
|
|
37
32
|
});
|
|
@@ -43,7 +38,7 @@ const PaypalButton = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
43
38
|
// 1. 业务侧创建订单,获取参数
|
|
44
39
|
const {
|
|
45
40
|
paypalUrl
|
|
46
|
-
} = await
|
|
41
|
+
} = await createOrder();
|
|
47
42
|
if (paypalUrl) {
|
|
48
43
|
// 2. 唤起蒙层
|
|
49
44
|
setShowMask(true);
|
|
@@ -65,11 +60,11 @@ const PaypalButton = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
65
60
|
}
|
|
66
61
|
onClick === null || onClick === void 0 || onClick(e);
|
|
67
62
|
}, [onClick, createOrder, handlePayCreateOrder, handleOpen]);
|
|
68
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default,
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, (0, _extends2.default)({
|
|
69
64
|
ref: paypalButtonRef,
|
|
70
65
|
className: (0, _classNames.default)((0, _getPrefixCls.getPrefixCls)('paypal-btn'), className),
|
|
71
66
|
onClick: handleClick
|
|
72
|
-
}, others), children), showMask && paypalUrl && /*#__PURE__*/_react.default.createElement(_PayMask.default,
|
|
67
|
+
}, others), children), showMask && paypalUrl && /*#__PURE__*/_react.default.createElement(_PayMask.default, (0, _extends2.default)({
|
|
73
68
|
visible: showMask,
|
|
74
69
|
onClose: () => {
|
|
75
70
|
setShowMask(false);
|
|
@@ -1 +1,207 @@
|
|
|
1
|
-
.pay-dot-loading
|
|
1
|
+
.pay-dot-loading {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
.pay-button {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
padding: 7px 12px;
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
border: 1px solid #eee;
|
|
10
|
+
background: #fff;
|
|
11
|
+
color: #333;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
transition: all 0.2s;
|
|
14
|
+
user-select: none;
|
|
15
|
+
position: relative;
|
|
16
|
+
text-align: center;
|
|
17
|
+
}
|
|
18
|
+
.pay-button-content {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
gap: 6px;
|
|
23
|
+
}
|
|
24
|
+
.pay-button-block {
|
|
25
|
+
display: block;
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
.pay-button-disabled {
|
|
29
|
+
opacity: 0.4;
|
|
30
|
+
cursor: not-allowed;
|
|
31
|
+
}
|
|
32
|
+
.pay-button-loading {
|
|
33
|
+
cursor: wait;
|
|
34
|
+
}
|
|
35
|
+
.pay-button-loading-wrapper {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
gap: 6px;
|
|
40
|
+
}
|
|
41
|
+
.pay-button-primary {
|
|
42
|
+
background: #1677ff;
|
|
43
|
+
border-color: #1677ff;
|
|
44
|
+
color: #fff;
|
|
45
|
+
}
|
|
46
|
+
.pay-button-primary:hover {
|
|
47
|
+
background: #409eff;
|
|
48
|
+
}
|
|
49
|
+
.pay-button-success {
|
|
50
|
+
background: #00b578;
|
|
51
|
+
border-color: #00b578;
|
|
52
|
+
color: #fff;
|
|
53
|
+
}
|
|
54
|
+
.pay-button-danger {
|
|
55
|
+
background: #ff3141;
|
|
56
|
+
border-color: #ff3141;
|
|
57
|
+
color: #fff;
|
|
58
|
+
}
|
|
59
|
+
.pay-button-warning {
|
|
60
|
+
background: #ff8f1f;
|
|
61
|
+
border-color: #ff8f1f;
|
|
62
|
+
color: #fff;
|
|
63
|
+
}
|
|
64
|
+
.pay-button-default {
|
|
65
|
+
background: #fff;
|
|
66
|
+
border-color: #eee;
|
|
67
|
+
color: #333;
|
|
68
|
+
}
|
|
69
|
+
.pay-button-fill-outline {
|
|
70
|
+
background: transparent;
|
|
71
|
+
color: inherit;
|
|
72
|
+
}
|
|
73
|
+
.pay-button-fill-none {
|
|
74
|
+
background: transparent;
|
|
75
|
+
border: none;
|
|
76
|
+
color: inherit;
|
|
77
|
+
}
|
|
78
|
+
.pay-button-mini {
|
|
79
|
+
font-size: 12px;
|
|
80
|
+
padding: 2px 8px;
|
|
81
|
+
}
|
|
82
|
+
.pay-button-small {
|
|
83
|
+
font-size: 14px;
|
|
84
|
+
padding: 4px 10px;
|
|
85
|
+
}
|
|
86
|
+
.pay-button-large {
|
|
87
|
+
font-size: 18px;
|
|
88
|
+
padding: 10px 18px;
|
|
89
|
+
}
|
|
90
|
+
.pay-button-shape-rounded {
|
|
91
|
+
border-radius: 1000px;
|
|
92
|
+
}
|
|
93
|
+
.pay-button-shape-rectangular {
|
|
94
|
+
border-radius: 0;
|
|
95
|
+
}
|
|
96
|
+
.pay-mask {
|
|
97
|
+
position: fixed;
|
|
98
|
+
z-index: 1000;
|
|
99
|
+
left: 0;
|
|
100
|
+
top: 0;
|
|
101
|
+
right: 0;
|
|
102
|
+
bottom: 0;
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
}
|
|
107
|
+
.pay-mask-content {
|
|
108
|
+
position: relative;
|
|
109
|
+
width: 100%;
|
|
110
|
+
height: 100%;
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
padding: 0 88px;
|
|
116
|
+
}
|
|
117
|
+
.pay-mask-close {
|
|
118
|
+
position: absolute;
|
|
119
|
+
right: 12px;
|
|
120
|
+
top: 12px;
|
|
121
|
+
background: none;
|
|
122
|
+
border: none;
|
|
123
|
+
font-size: 28px;
|
|
124
|
+
color: #fff;
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
z-index: 1;
|
|
127
|
+
}
|
|
128
|
+
.pay-mask-title {
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
gap: 4px;
|
|
132
|
+
font-weight: 700;
|
|
133
|
+
font-size: 28px;
|
|
134
|
+
color: #fff;
|
|
135
|
+
margin-bottom: 16px;
|
|
136
|
+
text-shadow: 0 2px 8px #000;
|
|
137
|
+
}
|
|
138
|
+
.pay-mask-title > .pay-icon-paypal-white {
|
|
139
|
+
width: 36px;
|
|
140
|
+
height: 36px;
|
|
141
|
+
}
|
|
142
|
+
.pay-mask-desc {
|
|
143
|
+
color: #fff;
|
|
144
|
+
text-align: center;
|
|
145
|
+
margin-bottom: 24px;
|
|
146
|
+
line-height: 1.5;
|
|
147
|
+
white-space: pre-line;
|
|
148
|
+
}
|
|
149
|
+
.pay-mask-continue {
|
|
150
|
+
color: #fff;
|
|
151
|
+
font-weight: 700;
|
|
152
|
+
text-decoration: underline;
|
|
153
|
+
text-underline-offset: 4px;
|
|
154
|
+
cursor: pointer;
|
|
155
|
+
text-align: center;
|
|
156
|
+
font-size: 18px;
|
|
157
|
+
}
|
|
158
|
+
.pay-icon {
|
|
159
|
+
display: inline-block;
|
|
160
|
+
color: inherit;
|
|
161
|
+
width: 16px;
|
|
162
|
+
vertical-align: -2px;
|
|
163
|
+
stroke: currentColor;
|
|
164
|
+
}
|
|
165
|
+
.pay-icon[fill='currentColor'] {
|
|
166
|
+
fill: currentColor;
|
|
167
|
+
stroke: none;
|
|
168
|
+
}
|
|
169
|
+
.pay-icon[stroke='currentColor'] {
|
|
170
|
+
stroke: currentColor;
|
|
171
|
+
fill: none;
|
|
172
|
+
}
|
|
173
|
+
.pay-icon[fill='currentColor'][stroke='currentColor'] {
|
|
174
|
+
fill: currentColor;
|
|
175
|
+
stroke: currentColor;
|
|
176
|
+
}
|
|
177
|
+
.pay-icon-paypal-text {
|
|
178
|
+
width: 64px;
|
|
179
|
+
height: 26px;
|
|
180
|
+
max-width: 72px;
|
|
181
|
+
max-height: 32px;
|
|
182
|
+
}
|
|
183
|
+
.pay-icon-close {
|
|
184
|
+
width: 18px;
|
|
185
|
+
height: 18px;
|
|
186
|
+
}
|
|
187
|
+
.pay-icon-stripe-text {
|
|
188
|
+
width: 24px;
|
|
189
|
+
height: 24px;
|
|
190
|
+
}
|
|
191
|
+
.pay-icon-alipay {
|
|
192
|
+
width: 20px;
|
|
193
|
+
height: 20px;
|
|
194
|
+
}
|
|
195
|
+
.pay-icon-wechat-pay {
|
|
196
|
+
width: 20px;
|
|
197
|
+
height: 20px;
|
|
198
|
+
}
|
|
199
|
+
.pay-icon-payssion-pay {
|
|
200
|
+
width: 36px;
|
|
201
|
+
height: 20px;
|
|
202
|
+
}
|
|
203
|
+
.pay-paypal-btn.pay-button > span {
|
|
204
|
+
display: flex;
|
|
205
|
+
align-items: center;
|
|
206
|
+
gap: 0.5rem;
|
|
207
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pay-dot-loading{display:inline-block}.pay-button{display:inline-block;padding:7px 12px;font-size:16px;border-radius:4px;border:1px solid #eee;background:#fff;color:#333;cursor:pointer;transition:.2s;user-select:none;position:relative;text-align:center}.pay-button-content{display:flex;align-items:center;justify-content:center;gap:6px}.pay-button-block{display:block;width:100%}.pay-button-disabled{opacity:.4;cursor:not-allowed}.pay-button-loading{cursor:wait}.pay-button-loading-wrapper{display:flex;align-items:center;justify-content:center;gap:6px}.pay-button-primary{background:#1677ff;border-color:#1677ff;color:#fff}.pay-button-primary:hover{background:#409eff}.pay-button-success{background:#00b578;border-color:#00b578;color:#fff}.pay-button-danger{background:#ff3141;border-color:#ff3141;color:#fff}.pay-button-warning{background:#ff8f1f;border-color:#ff8f1f;color:#fff}.pay-button-default{background:#fff;border-color:#eee;color:#333}.pay-button-fill-outline{background:0 0;color:inherit}.pay-button-fill-none{background:0 0;border:none;color:inherit}.pay-button-mini{font-size:12px;padding:2px 8px}.pay-button-small{font-size:14px;padding:4px 10px}.pay-button-large{font-size:18px;padding:10px 18px}.pay-button-shape-rounded{border-radius:1000px}.pay-button-shape-rectangular{border-radius:0}.pay-mask{position:fixed;z-index:1000;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-mask-content{position:relative;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 88px}.pay-mask-close{position:absolute;right:12px;top:12px;background:0 0;border:none;font-size:28px;color:#fff;cursor:pointer;z-index:1}.pay-mask-title{display:flex;align-items:center;gap:4px;font-weight:700;font-size:28px;color:#fff;margin-bottom:16px;text-shadow:0 2px 8px #000}.pay-mask-title>.pay-icon-paypal-white{width:36px;height:36px}.pay-mask-desc{color:#fff;text-align:center;margin-bottom:24px;line-height:1.5;white-space:pre-line}.pay-mask-continue{color:#fff;font-weight:700;text-decoration:underline;text-underline-offset:4px;cursor:pointer;text-align:center;font-size:18px}.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}.pay-paypal-btn.pay-button>span{display:flex;align-items:center;gap:.5rem}
|
|
@@ -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
|
});
|
|
@@ -24,5 +25,4 @@ Object.keys(_interface).forEach(function (key) {
|
|
|
24
25
|
}
|
|
25
26
|
});
|
|
26
27
|
});
|
|
27
|
-
var _payssionButton = _interopRequireDefault(require("./payssion-button"));
|
|
28
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
28
|
+
var _payssionButton = _interopRequireDefault(require("./payssion-button"));
|