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.
- package/README.md +37 -19
- package/README.zh-CN.md +37 -19
- 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 +37 -31
- 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/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/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 +71 -51
- 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 +70 -50
- 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 +8 -2
- package/dist/es/PayMask/pay-mask.js +48 -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.js +42 -39
- package/dist/es/confirm-modal/interface.d.ts +8 -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 +16 -10
- package/dist/es/hooks/usePayWindowOpen.js +81 -37
- 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/pay-modal/index.d.ts +2 -2
- package/dist/es/pay-modal/index.js +2 -2
- package/dist/es/pay-modal/pay-modal.js +45 -48
- 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.d.ts +21 -0
- package/dist/es/shared/enums/index.js +24 -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.d.ts +10 -1
- package/dist/es/utils/is.js +68 -34
- 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 +9 -12
- 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 +34 -44
- 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 +34 -44
- 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 +26 -24
- 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 +24 -28
- 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 +63 -21
- 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 +24 -30
- 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/shared/enums/index.js +23 -1
- 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 +32 -17
- 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 +218 -130
- package/dist/umd/pay-sdk-react.umd.js.map +1 -1
- package/package.json +6 -3
package/dist/es/Button/button.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/esm/asyncToGenerator";
|
|
3
|
+
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
|
1
5
|
import React, { useImperativeHandle, useRef, useState } from 'react';
|
|
2
6
|
import cs from '../utils/classNames';
|
|
3
7
|
import { withNativeProps } from '../utils/native-props';
|
|
@@ -5,8 +9,8 @@ import { mergeProps } from '../utils/with-default-props';
|
|
|
5
9
|
import { isPromise } from '../utils/is';
|
|
6
10
|
import DotLoading from '../dot-loading';
|
|
7
11
|
import { getPrefixCls } from '../utils/getPrefixCls';
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
var classPrefix = getPrefixCls('button');
|
|
13
|
+
var defaultProps = {
|
|
10
14
|
color: 'default',
|
|
11
15
|
fill: 'solid',
|
|
12
16
|
block: false,
|
|
@@ -18,47 +22,68 @@ const defaultProps = {
|
|
|
18
22
|
shape: 'default',
|
|
19
23
|
size: 'middle'
|
|
20
24
|
};
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const promise = props.onClick(e);
|
|
35
|
-
if (isPromise(promise)) {
|
|
36
|
-
try {
|
|
37
|
-
setInnerLoading(true);
|
|
38
|
-
await promise;
|
|
39
|
-
setInnerLoading(false);
|
|
40
|
-
} catch (e) {
|
|
41
|
-
setInnerLoading(false);
|
|
42
|
-
throw e;
|
|
25
|
+
export var Button = /*#__PURE__*/React.forwardRef(function (p, ref) {
|
|
26
|
+
var props = mergeProps(defaultProps, p);
|
|
27
|
+
var _useState = useState(false),
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
innerLoading = _useState2[0],
|
|
30
|
+
setInnerLoading = _useState2[1];
|
|
31
|
+
var nativeButtonRef = useRef(null);
|
|
32
|
+
var loading = props.loading === 'auto' ? innerLoading : props.loading;
|
|
33
|
+
var disabled = props.disabled || loading;
|
|
34
|
+
useImperativeHandle(ref, function () {
|
|
35
|
+
return {
|
|
36
|
+
get nativeElement() {
|
|
37
|
+
return nativeButtonRef.current;
|
|
43
38
|
}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
var handleClick = /*#__PURE__*/function () {
|
|
42
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(e) {
|
|
43
|
+
var promise, _t;
|
|
44
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
45
|
+
while (1) switch (_context.prev = _context.next) {
|
|
46
|
+
case 0:
|
|
47
|
+
if (props.onClick) {
|
|
48
|
+
_context.next = 1;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
return _context.abrupt("return");
|
|
52
|
+
case 1:
|
|
53
|
+
promise = props.onClick(e);
|
|
54
|
+
if (!isPromise(promise)) {
|
|
55
|
+
_context.next = 5;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
_context.prev = 2;
|
|
59
|
+
setInnerLoading(true);
|
|
60
|
+
_context.next = 3;
|
|
61
|
+
return promise;
|
|
62
|
+
case 3:
|
|
63
|
+
setInnerLoading(false);
|
|
64
|
+
_context.next = 5;
|
|
65
|
+
break;
|
|
66
|
+
case 4:
|
|
67
|
+
_context.prev = 4;
|
|
68
|
+
_t = _context["catch"](2);
|
|
69
|
+
setInnerLoading(false);
|
|
70
|
+
throw _t;
|
|
71
|
+
case 5:
|
|
72
|
+
case "end":
|
|
73
|
+
return _context.stop();
|
|
74
|
+
}
|
|
75
|
+
}, _callee, null, [[2, 4]]);
|
|
76
|
+
}));
|
|
77
|
+
return function handleClick(_x) {
|
|
78
|
+
return _ref.apply(this, arguments);
|
|
79
|
+
};
|
|
80
|
+
}();
|
|
46
81
|
return withNativeProps(props, /*#__PURE__*/React.createElement("button", {
|
|
47
82
|
ref: nativeButtonRef,
|
|
48
83
|
type: props.type,
|
|
49
84
|
form: props.form,
|
|
50
85
|
onClick: handleClick,
|
|
51
|
-
className: cs(classPrefix, {
|
|
52
|
-
["".concat(classPrefix, "-").concat(props.color)]: props.color,
|
|
53
|
-
["".concat(classPrefix, "-block")]: props.block,
|
|
54
|
-
["".concat(classPrefix, "-disabled")]: disabled,
|
|
55
|
-
["".concat(classPrefix, "-fill-outline")]: props.fill === 'outline',
|
|
56
|
-
["".concat(classPrefix, "-fill-none")]: props.fill === 'none',
|
|
57
|
-
["".concat(classPrefix, "-mini")]: props.size === 'mini',
|
|
58
|
-
["".concat(classPrefix, "-small")]: props.size === 'small',
|
|
59
|
-
["".concat(classPrefix, "-large")]: props.size === 'large',
|
|
60
|
-
["".concat(classPrefix, "-loading")]: loading
|
|
61
|
-
}, "".concat(classPrefix, "-shape-").concat(props.shape)),
|
|
86
|
+
className: cs(classPrefix, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(classPrefix, "-").concat(props.color), props.color), "".concat(classPrefix, "-block"), props.block), "".concat(classPrefix, "-disabled"), disabled), "".concat(classPrefix, "-fill-outline"), props.fill === 'outline'), "".concat(classPrefix, "-fill-none"), props.fill === 'none'), "".concat(classPrefix, "-mini"), props.size === 'mini'), "".concat(classPrefix, "-small"), props.size === 'small'), "".concat(classPrefix, "-large"), props.size === 'large'), "".concat(classPrefix, "-loading"), loading), "".concat(classPrefix, "-shape-").concat(props.shape)),
|
|
62
87
|
disabled: disabled,
|
|
63
88
|
onMouseDown: props.onMouseDown,
|
|
64
89
|
onMouseUp: props.onMouseUp,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import Button from
|
|
2
|
-
export * from
|
|
1
|
+
import Button from './button';
|
|
2
|
+
export * from './interface';
|
|
3
3
|
export default Button;
|
package/dist/es/Button/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import Button from
|
|
2
|
-
export * from
|
|
1
|
+
import Button from './button';
|
|
2
|
+
export * from './interface';
|
|
3
3
|
export default Button;
|
|
@@ -1 +1,95 @@
|
|
|
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
|
+
}
|
|
@@ -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}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
1
2
|
import React, { useEffect, useRef } from 'react';
|
|
2
3
|
import cs from '../utils/classNames';
|
|
3
4
|
import { useLockScroll } from '../hooks/use-lock-scroll';
|
|
4
5
|
import { getPrefixCls } from '../utils/getPrefixCls';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
loading = false,
|
|
9
|
-
text =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}, className);
|
|
6
|
+
var classPrefix = getPrefixCls('fullscreen-loading');
|
|
7
|
+
var FullScreenLoading = function FullScreenLoading(_ref) {
|
|
8
|
+
var _ref$loading = _ref.loading,
|
|
9
|
+
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
10
|
+
_ref$text = _ref.text,
|
|
11
|
+
text = _ref$text === void 0 ? 'Loading...' : _ref$text,
|
|
12
|
+
children = _ref.children,
|
|
13
|
+
_ref$fullscreen = _ref.fullscreen,
|
|
14
|
+
fullscreen = _ref$fullscreen === void 0 ? true : _ref$fullscreen,
|
|
15
|
+
_ref$className = _ref.className,
|
|
16
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
17
|
+
_ref$size = _ref.size,
|
|
18
|
+
size = _ref$size === void 0 ? 'default' : _ref$size,
|
|
19
|
+
_ref$type = _ref.type,
|
|
20
|
+
type = _ref$type === void 0 ? 'circle' : _ref$type;
|
|
21
|
+
var containerRef = useRef(null);
|
|
22
|
+
var sizeClass = size ? "".concat(classPrefix, "--").concat(size) : '';
|
|
23
|
+
var typeClass = type ? "".concat(classPrefix, "--").concat(type) : '';
|
|
24
|
+
var classNames = cs(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classPrefix, fullscreen), "".concat(classPrefix, "__container"), !fullscreen), sizeClass, size), typeClass, type), className);
|
|
25
25
|
useLockScroll(containerRef, fullscreen && loading);
|
|
26
|
-
useEffect(()
|
|
26
|
+
useEffect(function () {
|
|
27
27
|
if (!fullscreen || !loading) return;
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
var originalPointerEvents = document.body.style.pointerEvents;
|
|
29
|
+
var originalUserSelect = document.body.style.userSelect;
|
|
30
30
|
document.body.style.pointerEvents = 'none';
|
|
31
31
|
document.body.style.userSelect = 'none';
|
|
32
|
-
return ()
|
|
32
|
+
return function () {
|
|
33
33
|
document.body.style.pointerEvents = originalPointerEvents;
|
|
34
34
|
document.body.style.userSelect = originalUserSelect;
|
|
35
35
|
};
|
|
36
36
|
}, [fullscreen, loading]);
|
|
37
37
|
|
|
38
38
|
// 局部 loading 时禁止容器操作
|
|
39
|
-
useEffect(()
|
|
39
|
+
useEffect(function () {
|
|
40
40
|
if (fullscreen || !containerRef.current) return;
|
|
41
|
-
|
|
41
|
+
var container = containerRef.current;
|
|
42
42
|
if (loading) {
|
|
43
43
|
container.style.pointerEvents = 'none';
|
|
44
44
|
container.style.userSelect = 'none';
|
|
@@ -46,12 +46,12 @@ const FullScreenLoading = _ref => {
|
|
|
46
46
|
container.style.pointerEvents = '';
|
|
47
47
|
container.style.userSelect = '';
|
|
48
48
|
}
|
|
49
|
-
return ()
|
|
49
|
+
return function () {
|
|
50
50
|
container.style.pointerEvents = '';
|
|
51
51
|
container.style.userSelect = '';
|
|
52
52
|
};
|
|
53
53
|
}, [fullscreen, loading]);
|
|
54
|
-
|
|
54
|
+
var renderLoadingIcon = function renderLoadingIcon() {
|
|
55
55
|
switch (type) {
|
|
56
56
|
case 'circle':
|
|
57
57
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -72,26 +72,26 @@ const FullScreenLoading = _ref => {
|
|
|
72
72
|
className: "".concat(classPrefix, "__spin-dots")
|
|
73
73
|
}, Array.from({
|
|
74
74
|
length: 12
|
|
75
|
-
}).map((_, index)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
}).map(function (_, index) {
|
|
76
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
77
|
+
key: index,
|
|
78
|
+
className: "".concat(classPrefix, "__spin-dot"),
|
|
79
|
+
style: {
|
|
80
|
+
transform: "rotate(".concat(index * 30, "deg)"),
|
|
81
|
+
opacity: 1 - index * 0.08
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}));
|
|
83
85
|
default:
|
|
84
86
|
return /*#__PURE__*/React.createElement("div", {
|
|
85
87
|
className: "".concat(classPrefix, "__circle")
|
|
86
88
|
});
|
|
87
89
|
}
|
|
88
90
|
};
|
|
89
|
-
|
|
91
|
+
var loadingContent = /*#__PURE__*/React.createElement("div", {
|
|
90
92
|
className: "".concat(classPrefix, "__center")
|
|
91
93
|
}, /*#__PURE__*/React.createElement("div", {
|
|
92
|
-
className: cs("".concat(classPrefix, "__spinner-box"), {
|
|
93
|
-
["".concat(classPrefix, "__spinner-box--no-text")]: text === null
|
|
94
|
-
})
|
|
94
|
+
className: cs("".concat(classPrefix, "__spinner-box"), _defineProperty({}, "".concat(classPrefix, "__spinner-box--no-text"), text === null))
|
|
95
95
|
}, /*#__PURE__*/React.createElement("div", {
|
|
96
96
|
className: "".concat(classPrefix, "__spinner")
|
|
97
97
|
}, renderLoadingIcon()), text !== null && /*#__PURE__*/React.createElement("div", {
|
|
@@ -33,11 +33,11 @@ export interface FullScreenLoadingProps {
|
|
|
33
33
|
* @en The size of the loading
|
|
34
34
|
* @default "default"
|
|
35
35
|
*/
|
|
36
|
-
size?:
|
|
36
|
+
size?: 'small' | 'medium' | 'large' | 'default';
|
|
37
37
|
/**
|
|
38
38
|
* @zh 类型
|
|
39
39
|
* @en The type of the loading
|
|
40
40
|
* @default "circle"
|
|
41
41
|
*/
|
|
42
|
-
type?:
|
|
42
|
+
type?: 'circle' | 'dots' | 'spin-dots';
|
|
43
43
|
}
|
|
@@ -1 +1,239 @@
|
|
|
1
|
-
.pay-fullscreen-loading
|
|
1
|
+
.pay-fullscreen-loading {
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: 9999;
|
|
4
|
+
left: 0;
|
|
5
|
+
top: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
bottom: 0;
|
|
8
|
+
background: hsla(0, 0%, 100%, 0.8);
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
pointer-events: auto;
|
|
13
|
+
user-select: none;
|
|
14
|
+
}
|
|
15
|
+
.pay-fullscreen-loading__center {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
}
|
|
21
|
+
.pay-fullscreen-loading__spinner-box {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
background-color: rgba(17, 17, 17, 0.8);
|
|
27
|
+
border-radius: 16px;
|
|
28
|
+
transition: width 0.2s, height 0.2s;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
padding: 8px;
|
|
31
|
+
}
|
|
32
|
+
.pay-fullscreen-loading__spinner-box--no-text {
|
|
33
|
+
padding: 4px;
|
|
34
|
+
}
|
|
35
|
+
.pay-fullscreen-loading__spinner {
|
|
36
|
+
margin-bottom: 8px;
|
|
37
|
+
}
|
|
38
|
+
.pay-fullscreen-loading__spinner-box--no-text .pay-fullscreen-loading__spinner {
|
|
39
|
+
margin-bottom: 0;
|
|
40
|
+
}
|
|
41
|
+
.pay-fullscreen-loading__circle {
|
|
42
|
+
border: 3px solid rgba(255, 255, 255, 0.3);
|
|
43
|
+
border-top-color: #fff;
|
|
44
|
+
border-radius: 50%;
|
|
45
|
+
animation: spin 1.2s linear infinite;
|
|
46
|
+
}
|
|
47
|
+
.pay-fullscreen-loading__text {
|
|
48
|
+
color: #fff;
|
|
49
|
+
font-weight: 600;
|
|
50
|
+
letter-spacing: 0.25px;
|
|
51
|
+
text-align: center;
|
|
52
|
+
width: 100%;
|
|
53
|
+
word-break: break-all;
|
|
54
|
+
line-height: 1.2;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
display: -webkit-box;
|
|
57
|
+
-webkit-box-orient: vertical;
|
|
58
|
+
-webkit-line-clamp: 2;
|
|
59
|
+
}
|
|
60
|
+
.pay-fullscreen-loading__dots {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 10px;
|
|
64
|
+
}
|
|
65
|
+
.pay-fullscreen-loading__dot {
|
|
66
|
+
background: #fff;
|
|
67
|
+
border-radius: 50%;
|
|
68
|
+
animation: bounce 0.5s ease-in-out infinite;
|
|
69
|
+
}
|
|
70
|
+
.pay-fullscreen-loading__dot:nth-child(2) {
|
|
71
|
+
animation-delay: 0.1s;
|
|
72
|
+
}
|
|
73
|
+
.pay-fullscreen-loading__dot:nth-child(3) {
|
|
74
|
+
animation-delay: 0.2s;
|
|
75
|
+
}
|
|
76
|
+
.pay-fullscreen-loading__spin-dots {
|
|
77
|
+
position: relative;
|
|
78
|
+
animation: spin 1.2s steps(12) infinite;
|
|
79
|
+
}
|
|
80
|
+
.pay-fullscreen-loading__spin-dot {
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: 0;
|
|
83
|
+
left: 50%;
|
|
84
|
+
background: #fff;
|
|
85
|
+
border-radius: 50%;
|
|
86
|
+
}
|
|
87
|
+
.pay-fullscreen-loading--small .pay-fullscreen-loading__spinner-box {
|
|
88
|
+
width: 88px;
|
|
89
|
+
height: 88px;
|
|
90
|
+
}
|
|
91
|
+
.pay-fullscreen-loading--small .pay-fullscreen-loading__spinner-box--no-text {
|
|
92
|
+
width: 48px;
|
|
93
|
+
height: 48px;
|
|
94
|
+
}
|
|
95
|
+
.pay-fullscreen-loading--small .pay-fullscreen-loading__circle {
|
|
96
|
+
width: 24px;
|
|
97
|
+
height: 24px;
|
|
98
|
+
border-width: 3px;
|
|
99
|
+
}
|
|
100
|
+
.pay-fullscreen-loading--small .pay-fullscreen-loading__text {
|
|
101
|
+
font-size: 14px;
|
|
102
|
+
}
|
|
103
|
+
.pay-fullscreen-loading--small .pay-fullscreen-loading__dot {
|
|
104
|
+
width: 6px;
|
|
105
|
+
height: 6px;
|
|
106
|
+
}
|
|
107
|
+
.pay-fullscreen-loading--small .pay-fullscreen-loading__spin-dots {
|
|
108
|
+
width: 28px;
|
|
109
|
+
height: 28px;
|
|
110
|
+
}
|
|
111
|
+
.pay-fullscreen-loading--small .pay-fullscreen-loading__spin-dot {
|
|
112
|
+
width: 3.5px;
|
|
113
|
+
height: 3.5px;
|
|
114
|
+
margin-left: -1.75px;
|
|
115
|
+
transform-origin: 50% 14px;
|
|
116
|
+
}
|
|
117
|
+
.pay-fullscreen-loading--medium .pay-fullscreen-loading__spinner-box {
|
|
118
|
+
width: 112px;
|
|
119
|
+
height: 112px;
|
|
120
|
+
}
|
|
121
|
+
.pay-fullscreen-loading--medium .pay-fullscreen-loading__spinner-box--no-text {
|
|
122
|
+
width: 62px;
|
|
123
|
+
height: 62px;
|
|
124
|
+
}
|
|
125
|
+
.pay-fullscreen-loading--medium .pay-fullscreen-loading__circle {
|
|
126
|
+
width: 36px;
|
|
127
|
+
height: 36px;
|
|
128
|
+
border-width: 4px;
|
|
129
|
+
}
|
|
130
|
+
.pay-fullscreen-loading--medium .pay-fullscreen-loading__text {
|
|
131
|
+
font-size: 16px;
|
|
132
|
+
}
|
|
133
|
+
.pay-fullscreen-loading--medium .pay-fullscreen-loading__dot {
|
|
134
|
+
width: 10px;
|
|
135
|
+
height: 10px;
|
|
136
|
+
}
|
|
137
|
+
.pay-fullscreen-loading--medium .pay-fullscreen-loading__spin-dots {
|
|
138
|
+
width: 40px;
|
|
139
|
+
height: 40px;
|
|
140
|
+
}
|
|
141
|
+
.pay-fullscreen-loading--medium .pay-fullscreen-loading__spin-dot {
|
|
142
|
+
width: 4.5px;
|
|
143
|
+
height: 4.5px;
|
|
144
|
+
margin-left: -2.25px;
|
|
145
|
+
transform-origin: 50% 20px;
|
|
146
|
+
}
|
|
147
|
+
.pay-fullscreen-loading--large .pay-fullscreen-loading__spinner-box {
|
|
148
|
+
width: 144px;
|
|
149
|
+
height: 144px;
|
|
150
|
+
}
|
|
151
|
+
.pay-fullscreen-loading--large .pay-fullscreen-loading__spinner-box--no-text {
|
|
152
|
+
width: 80px;
|
|
153
|
+
height: 80px;
|
|
154
|
+
}
|
|
155
|
+
.pay-fullscreen-loading--large .pay-fullscreen-loading__circle {
|
|
156
|
+
width: 42px;
|
|
157
|
+
height: 42px;
|
|
158
|
+
border-width: 5px;
|
|
159
|
+
}
|
|
160
|
+
.pay-fullscreen-loading--large .pay-fullscreen-loading__text {
|
|
161
|
+
font-size: 18px;
|
|
162
|
+
}
|
|
163
|
+
.pay-fullscreen-loading--large .pay-fullscreen-loading__dot {
|
|
164
|
+
width: 12px;
|
|
165
|
+
height: 12px;
|
|
166
|
+
}
|
|
167
|
+
.pay-fullscreen-loading--large .pay-fullscreen-loading__spin-dots {
|
|
168
|
+
width: 48px;
|
|
169
|
+
height: 48px;
|
|
170
|
+
}
|
|
171
|
+
.pay-fullscreen-loading--large .pay-fullscreen-loading__spin-dot {
|
|
172
|
+
width: 5.5px;
|
|
173
|
+
height: 5.5px;
|
|
174
|
+
margin-left: -2.75px;
|
|
175
|
+
transform-origin: 50% 24px;
|
|
176
|
+
}
|
|
177
|
+
.pay-fullscreen-loading--default .pay-fullscreen-loading__spinner-box {
|
|
178
|
+
width: 100px;
|
|
179
|
+
height: 100px;
|
|
180
|
+
}
|
|
181
|
+
.pay-fullscreen-loading--default .pay-fullscreen-loading__spinner-box--no-text {
|
|
182
|
+
width: 56px;
|
|
183
|
+
height: 56px;
|
|
184
|
+
}
|
|
185
|
+
.pay-fullscreen-loading--default .pay-fullscreen-loading__circle {
|
|
186
|
+
width: 32px;
|
|
187
|
+
height: 32px;
|
|
188
|
+
border-width: 4px;
|
|
189
|
+
}
|
|
190
|
+
.pay-fullscreen-loading--default .pay-fullscreen-loading__text {
|
|
191
|
+
font-size: 16px;
|
|
192
|
+
}
|
|
193
|
+
.pay-fullscreen-loading--default .pay-fullscreen-loading__dot {
|
|
194
|
+
width: 9px;
|
|
195
|
+
height: 9px;
|
|
196
|
+
}
|
|
197
|
+
.pay-fullscreen-loading--default .pay-fullscreen-loading__spin-dots {
|
|
198
|
+
width: 32px;
|
|
199
|
+
height: 32px;
|
|
200
|
+
}
|
|
201
|
+
.pay-fullscreen-loading--default .pay-fullscreen-loading__spin-dot {
|
|
202
|
+
width: 4px;
|
|
203
|
+
height: 4px;
|
|
204
|
+
margin-left: -2px;
|
|
205
|
+
transform-origin: 50% 16px;
|
|
206
|
+
}
|
|
207
|
+
.pay-fullscreen-loading__container {
|
|
208
|
+
position: relative;
|
|
209
|
+
display: block;
|
|
210
|
+
}
|
|
211
|
+
.pay-fullscreen-loading__mask {
|
|
212
|
+
position: absolute;
|
|
213
|
+
left: 0;
|
|
214
|
+
top: 0;
|
|
215
|
+
right: 0;
|
|
216
|
+
bottom: 0;
|
|
217
|
+
background: hsla(0, 0%, 100%, 0.8);
|
|
218
|
+
z-index: 10;
|
|
219
|
+
display: flex;
|
|
220
|
+
align-items: center;
|
|
221
|
+
justify-content: center;
|
|
222
|
+
}
|
|
223
|
+
@keyframes spin {
|
|
224
|
+
0% {
|
|
225
|
+
transform: rotate(0deg);
|
|
226
|
+
}
|
|
227
|
+
100% {
|
|
228
|
+
transform: rotate(360deg);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
@keyframes bounce {
|
|
232
|
+
0%,
|
|
233
|
+
100% {
|
|
234
|
+
transform: translateY(0);
|
|
235
|
+
}
|
|
236
|
+
50% {
|
|
237
|
+
transform: translateY(-12px);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pay-fullscreen-loading{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;background:hsla(0,0%,100%,.8);display:flex;align-items:center;justify-content:center;pointer-events:auto;user-select:none}.pay-fullscreen-loading__center{display:flex;flex-direction:column;align-items:center;justify-content:center}.pay-fullscreen-loading__spinner-box{display:flex;flex-direction:column;align-items:center;justify-content:center;background-color:rgba(17,17,17,.8);border-radius:16px;transition:width .2s,height .2s;box-sizing:border-box;padding:8px}.pay-fullscreen-loading__spinner-box--no-text{padding:4px}.pay-fullscreen-loading__spinner{margin-bottom:8px}.pay-fullscreen-loading__spinner-box--no-text .pay-fullscreen-loading__spinner{margin-bottom:0}.pay-fullscreen-loading__circle{border:3px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:1.2s linear infinite spin}.pay-fullscreen-loading__text{color:#fff;font-weight:600;letter-spacing:.25px;text-align:center;width:100%;word-break:break-all;line-height:1.2;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.pay-fullscreen-loading__dots{display:flex;align-items:center;gap:10px}.pay-fullscreen-loading__dot{background:#fff;border-radius:50%;animation:.5s ease-in-out infinite bounce}.pay-fullscreen-loading__dot:nth-child(2){animation-delay:.1s}.pay-fullscreen-loading__dot:nth-child(3){animation-delay:.2s}.pay-fullscreen-loading__spin-dots{position:relative;animation:1.2s steps(12) infinite spin}.pay-fullscreen-loading__spin-dot{position:absolute;top:0;left:50%;background:#fff;border-radius:50%}.pay-fullscreen-loading--small .pay-fullscreen-loading__spinner-box{width:88px;height:88px}.pay-fullscreen-loading--small .pay-fullscreen-loading__spinner-box--no-text{width:48px;height:48px}.pay-fullscreen-loading--small .pay-fullscreen-loading__circle{width:24px;height:24px;border-width:3px}.pay-fullscreen-loading--small .pay-fullscreen-loading__text{font-size:14px}.pay-fullscreen-loading--small .pay-fullscreen-loading__dot{width:6px;height:6px}.pay-fullscreen-loading--small .pay-fullscreen-loading__spin-dots{width:28px;height:28px}.pay-fullscreen-loading--small .pay-fullscreen-loading__spin-dot{width:3.5px;height:3.5px;margin-left:-1.75px;transform-origin:50% 14px}.pay-fullscreen-loading--medium .pay-fullscreen-loading__spinner-box{width:112px;height:112px}.pay-fullscreen-loading--medium .pay-fullscreen-loading__spinner-box--no-text{width:62px;height:62px}.pay-fullscreen-loading--medium .pay-fullscreen-loading__circle{width:36px;height:36px;border-width:4px}.pay-fullscreen-loading--medium .pay-fullscreen-loading__text{font-size:16px}.pay-fullscreen-loading--medium .pay-fullscreen-loading__dot{width:10px;height:10px}.pay-fullscreen-loading--medium .pay-fullscreen-loading__spin-dots{width:40px;height:40px}.pay-fullscreen-loading--medium .pay-fullscreen-loading__spin-dot{width:4.5px;height:4.5px;margin-left:-2.25px;transform-origin:50% 20px}.pay-fullscreen-loading--large .pay-fullscreen-loading__spinner-box{width:144px;height:144px}.pay-fullscreen-loading--large .pay-fullscreen-loading__spinner-box--no-text{width:80px;height:80px}.pay-fullscreen-loading--large .pay-fullscreen-loading__circle{width:42px;height:42px;border-width:5px}.pay-fullscreen-loading--large .pay-fullscreen-loading__text{font-size:18px}.pay-fullscreen-loading--large .pay-fullscreen-loading__dot{width:12px;height:12px}.pay-fullscreen-loading--large .pay-fullscreen-loading__spin-dots{width:48px;height:48px}.pay-fullscreen-loading--large .pay-fullscreen-loading__spin-dot{width:5.5px;height:5.5px;margin-left:-2.75px;transform-origin:50% 24px}.pay-fullscreen-loading--default .pay-fullscreen-loading__spinner-box{width:100px;height:100px}.pay-fullscreen-loading--default .pay-fullscreen-loading__spinner-box--no-text{width:56px;height:56px}.pay-fullscreen-loading--default .pay-fullscreen-loading__circle{width:32px;height:32px;border-width:4px}.pay-fullscreen-loading--default .pay-fullscreen-loading__text{font-size:16px}.pay-fullscreen-loading--default .pay-fullscreen-loading__dot{width:9px;height:9px}.pay-fullscreen-loading--default .pay-fullscreen-loading__spin-dots{width:32px;height:32px}.pay-fullscreen-loading--default .pay-fullscreen-loading__spin-dot{width:4px;height:4px;margin-left:-2px;transform-origin:50% 16px}.pay-fullscreen-loading__container{position:relative;display:block}.pay-fullscreen-loading__mask{position:absolute;left:0;top:0;right:0;bottom:0;background:hsla(0,0%,100%,.8);z-index:10;display:flex;align-items:center;justify-content:center}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes bounce{0%,100%{transform:translateY(0)}50%{transform:translateY(-12px)}}
|
package/dist/es/MAlipay/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import MAlipay from './m-alipay-auto-submit';
|
|
2
2
|
import MAlipayButton from './m-alipay-button';
|
|
3
3
|
export * from './interface';
|
|
4
|
-
|
|
4
|
+
var MAlipayComponent = MAlipay;
|
|
5
5
|
MAlipayComponent.Button = MAlipayButton;
|
|
6
6
|
export default MAlipayComponent;
|