@paypal/checkout-components 5.0.256 → 5.0.258
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 +8 -0
- package/__sdk__.js +72 -76
- package/dist/button.js +1 -1
- package/globals.js +28 -30
- package/package.json +6 -4
- package/src/constants/button.js +37 -36
- package/src/constants/class.js +32 -30
- package/src/constants/index.js +3 -3
- package/src/constants/misc.js +14 -12
- package/src/declarations.js +19 -19
- package/src/funding/applepay/config.jsx +51 -50
- package/src/funding/applepay/index.js +1 -1
- package/src/funding/applepay/style.scoped.scss +1 -1
- package/src/funding/applepay/template.jsx +16 -11
- package/src/funding/bancontact/config.jsx +48 -37
- package/src/funding/bancontact/index.js +1 -2
- package/src/funding/blik/config.jsx +48 -37
- package/src/funding/blik/index.js +1 -2
- package/src/funding/boleto/config.jsx +50 -39
- package/src/funding/boleto/index.js +1 -2
- package/src/funding/card/amex/config.js +9 -8
- package/src/funding/card/amex/index.js +1 -2
- package/src/funding/card/config.jsx +246 -177
- package/src/funding/card/discover/config.js +9 -7
- package/src/funding/card/discover/index.js +1 -2
- package/src/funding/card/elo/config.js +6 -7
- package/src/funding/card/elo/index.js +1 -2
- package/src/funding/card/hiper/config.js +9 -7
- package/src/funding/card/hiper/index.js +1 -2
- package/src/funding/card/index.js +1 -1
- package/src/funding/card/jcb/config.js +6 -7
- package/src/funding/card/jcb/index.js +1 -2
- package/src/funding/card/mastercard/config.js +9 -7
- package/src/funding/card/mastercard/index.js +1 -2
- package/src/funding/card/visa/config.js +9 -7
- package/src/funding/card/visa/index.js +1 -2
- package/src/funding/common.jsx +242 -216
- package/src/funding/config.js +212 -65
- package/src/funding/content.jsx +1946 -337
- package/src/funding/credit/config.jsx +74 -57
- package/src/funding/credit/index.js +1 -2
- package/src/funding/eps/config.jsx +45 -37
- package/src/funding/eps/index.js +1 -2
- package/src/funding/funding.js +193 -100
- package/src/funding/giropay/config.jsx +48 -38
- package/src/funding/giropay/index.js +1 -2
- package/src/funding/ideal/config.jsx +48 -37
- package/src/funding/ideal/index.js +1 -2
- package/src/funding/index.js +2 -2
- package/src/funding/itau/config.jsx +41 -41
- package/src/funding/itau/index.js +1 -1
- package/src/funding/maxima/config.jsx +25 -19
- package/src/funding/maxima/index.js +1 -2
- package/src/funding/mercadopago/config.jsx +48 -37
- package/src/funding/mercadopago/index.js +1 -2
- package/src/funding/multibanco/config.jsx +50 -39
- package/src/funding/multibanco/index.js +1 -2
- package/src/funding/mybank/config.jsx +48 -37
- package/src/funding/mybank/index.js +1 -2
- package/src/funding/oxxo/config.jsx +50 -39
- package/src/funding/oxxo/index.js +1 -2
- package/src/funding/p24/config.jsx +45 -37
- package/src/funding/p24/index.js +1 -2
- package/src/funding/paidy/config.jsx +50 -39
- package/src/funding/paidy/index.js +1 -1
- package/src/funding/paylater/config.jsx +118 -111
- package/src/funding/paylater/index.js +1 -2
- package/src/funding/paypal/config.jsx +44 -46
- package/src/funding/paypal/index.js +1 -2
- package/src/funding/paypal/style.scoped.scss +80 -74
- package/src/funding/paypal/template.jsx +450 -354
- package/src/funding/payu/config.jsx +50 -39
- package/src/funding/payu/index.js +1 -1
- package/src/funding/satispay/config.jsx +50 -39
- package/src/funding/satispay/index.js +1 -1
- package/src/funding/sepa/config.jsx +19 -13
- package/src/funding/sepa/index.js +1 -2
- package/src/funding/sofort/config.jsx +48 -37
- package/src/funding/sofort/index.js +1 -2
- package/src/funding/trustly/config.jsx +50 -39
- package/src/funding/trustly/index.js +1 -2
- package/src/funding/venmo/config.jsx +80 -75
- package/src/funding/venmo/index.js +1 -2
- package/src/funding/venmo/style.scoped.scss +30 -32
- package/src/funding/venmo/template.jsx +56 -57
- package/src/funding/verkkopankki/config.jsx +50 -39
- package/src/funding/verkkopankki/index.js +1 -1
- package/src/funding/wechatpay/config.jsx +48 -37
- package/src/funding/wechatpay/index.js +1 -2
- package/src/funding/zimpler/config.jsx +19 -13
- package/src/funding/zimpler/index.js +1 -2
- package/src/interface/button.js +60 -44
- package/src/interface/card-fields.js +11 -8
- package/src/interface/fields.js +7 -4
- package/src/interface/marks.js +4 -4
- package/src/interface/payment-fields.js +7 -4
- package/src/interface/wallet.js +4 -4
- package/src/lib/errors.js +7 -7
- package/src/lib/index.js +5 -5
- package/src/lib/isRTLLanguage.js +3 -3
- package/src/lib/perceived-latency-instrumentation.js +54 -36
- package/src/lib/security.js +21 -17
- package/src/lib/session.js +39 -35
- package/src/marks/component.jsx +114 -65
- package/src/marks/index.js +1 -2
- package/src/marks/template.jsx +79 -65
- package/src/types.js +48 -48
- package/src/ui/buttons/button.jsx +311 -249
- package/src/ui/buttons/buttonDesigns/control.jsx +3 -5
- package/src/ui/buttons/buttonDesigns/divideLogoAnimation.jsx +127 -99
- package/src/ui/buttons/buttonDesigns/index.js +78 -75
- package/src/ui/buttons/buttonDesigns/inlineLogoTextDesign.jsx +102 -82
- package/src/ui/buttons/buttonDesigns/script.jsx +24 -18
- package/src/ui/buttons/buttonDesigns/types.js +6 -7
- package/src/ui/buttons/buttons.jsx +318 -212
- package/src/ui/buttons/config.js +62 -59
- package/src/ui/buttons/content.jsx +304 -119
- package/src/ui/buttons/index.js +1 -1
- package/src/ui/buttons/menu-button/index.js +1 -1
- package/src/ui/buttons/menu-button/menu-button.jsx +29 -22
- package/src/ui/buttons/menu-button/menu-button.scoped.scss +16 -17
- package/src/ui/buttons/poweredBy.jsx +23 -23
- package/src/ui/buttons/props.js +680 -529
- package/src/ui/buttons/script.jsx +182 -160
- package/src/ui/buttons/spinner.jsx +4 -6
- package/src/ui/buttons/style.jsx +15 -14
- package/src/ui/buttons/styles/base.js +24 -16
- package/src/ui/buttons/styles/button.js +24 -22
- package/src/ui/buttons/styles/color.js +118 -118
- package/src/ui/buttons/styles/custom.js +30 -24
- package/src/ui/buttons/styles/index.js +1 -1
- package/src/ui/buttons/styles/labels.js +17 -13
- package/src/ui/buttons/styles/page.js +3 -3
- package/src/ui/buttons/styles/responsive.js +226 -118
- package/src/ui/buttons/tagline.jsx +53 -54
- package/src/ui/chevron.jsx +27 -16
- package/src/ui/index.js +3 -3
- package/src/ui/loading.jsx +25 -18
- package/src/ui/text/index.js +1 -1
- package/src/ui/text/style.scoped.scss +25 -26
- package/src/ui/text/text.jsx +42 -20
- package/src/ui/tracking.jsx +18 -11
- package/src/zoid/buttons/component.jsx +836 -684
- package/src/zoid/buttons/container.jsx +140 -107
- package/src/zoid/buttons/index.js +1 -1
- package/src/zoid/buttons/prerender.jsx +84 -64
- package/src/zoid/buttons/util.js +355 -254
- package/src/zoid/card-fields/component.jsx +581 -549
- package/src/zoid/card-fields/index.js +1 -1
- package/src/zoid/card-fields/prerender.jsx +20 -17
- package/src/zoid/card-form/component.js +155 -141
- package/src/zoid/card-form/index.js +1 -1
- package/src/zoid/checkout/component.jsx +314 -282
- package/src/zoid/checkout/config.js +2 -2
- package/src/zoid/checkout/content.js +190 -154
- package/src/zoid/checkout/hacks.js +31 -28
- package/src/zoid/checkout/index.js +2 -2
- package/src/zoid/checkout/props.js +27 -33
- package/src/zoid/installments/component.jsx +83 -70
- package/src/zoid/installments/index.js +1 -1
- package/src/zoid/installments/props.js +1 -1
- package/src/zoid/menu/component.jsx +53 -48
- package/src/zoid/menu/index.js +1 -1
- package/src/zoid/menu/props.js +1 -3
- package/src/zoid/modal/component.jsx +119 -106
- package/src/zoid/modal/index.js +1 -1
- package/src/zoid/modal/props.js +1 -3
- package/src/zoid/payment-fields/component.jsx +215 -191
- package/src/zoid/payment-fields/container.jsx +73 -64
- package/src/zoid/payment-fields/index.js +1 -1
- package/src/zoid/payment-fields/prerender.jsx +16 -14
- package/src/zoid/payment-fields/props.js +6 -6
- package/src/zoid/qr-code/component.jsx +131 -115
- package/src/zoid/qr-code/container.jsx +74 -68
- package/src/zoid/qr-code/index.js +1 -1
- package/src/zoid/qr-code/prerender.jsx +17 -12
- package/src/zoid/qr-code/types.js +2 -2
- package/src/zoid/wallet/component.jsx +298 -260
- package/src/zoid/wallet/container.jsx +73 -64
- package/src/zoid/wallet/index.js +1 -1
- package/src/zoid/wallet/prerender.jsx +14 -14
- package/src/zoid/wallet/props.js +4 -4
- package/src/actions/save/index.js +0 -40
- package/src/interface/actions.js +0 -14
- package/src/lib/getLogoCDNExperiment.js +0 -25
package/src/ui/loading.jsx
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
|
|
4
|
-
import { node, Fragment, type ChildType } from
|
|
4
|
+
import { node, Fragment, type ChildType } from "@krakenjs/jsx-pragmatic/src";
|
|
5
5
|
|
|
6
|
-
export function LoadingDots({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export function LoadingDots({
|
|
7
|
+
color = "rgba(0, 0, 0, 0.5)",
|
|
8
|
+
delay = 0.2,
|
|
9
|
+
}: {|
|
|
10
|
+
color: string,
|
|
11
|
+
delay: number,
|
|
12
|
+
|}): ChildType {
|
|
13
|
+
return (
|
|
14
|
+
<Fragment>
|
|
15
|
+
<style
|
|
16
|
+
innerHTML={`
|
|
10
17
|
.loading-dots {
|
|
11
|
-
color: ${
|
|
18
|
+
color: ${color};
|
|
12
19
|
font-size: inherit;
|
|
13
20
|
display: inline-block;
|
|
14
21
|
}
|
|
@@ -24,15 +31,15 @@ export function LoadingDots({ color = 'rgba(0, 0, 0, 0.5)', delay = 0.2 } : {| c
|
|
|
24
31
|
}
|
|
25
32
|
|
|
26
33
|
.loading-dot-0 {
|
|
27
|
-
animation-delay: ${
|
|
34
|
+
animation-delay: ${delay.toFixed(1)}s;
|
|
28
35
|
}
|
|
29
36
|
|
|
30
37
|
.loading-dot-1 {
|
|
31
|
-
animation-delay: ${
|
|
38
|
+
animation-delay: ${(delay * 2).toFixed(1)}s;
|
|
32
39
|
}
|
|
33
40
|
|
|
34
41
|
.loading-dot-2 {
|
|
35
|
-
animation-delay: ${
|
|
42
|
+
animation-delay: ${(delay * 3).toFixed(1)}s;
|
|
36
43
|
}
|
|
37
44
|
|
|
38
45
|
@keyframes loading-dot {
|
|
@@ -52,14 +59,14 @@ export function LoadingDots({ color = 'rgba(0, 0, 0, 0.5)', delay = 0.2 } : {| c
|
|
|
52
59
|
opacity: 0;
|
|
53
60
|
}
|
|
54
61
|
}
|
|
55
|
-
`
|
|
62
|
+
`}
|
|
63
|
+
/>
|
|
56
64
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
);
|
|
65
|
+
<div class="loading-dots">
|
|
66
|
+
{[0, 1, 2].map((i) => (
|
|
67
|
+
<div class={`loading-dot loading-dot-${i}`}>•</div>
|
|
68
|
+
))}
|
|
69
|
+
</div>
|
|
70
|
+
</Fragment>
|
|
71
|
+
);
|
|
65
72
|
}
|
package/src/ui/text/index.js
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
|
|
2
1
|
.placeholder {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
display: inline-block;
|
|
3
|
+
color: transparent;
|
|
4
|
+
background: #fff;
|
|
5
|
+
opacity: 0.15;
|
|
6
|
+
border-radius: 2px;
|
|
7
|
+
animation: 1s loading-placeholder ease-in-out infinite;
|
|
8
|
+
position: relative;
|
|
9
|
+
top: 10%;
|
|
10
|
+
height: 80%;
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
&.color-black {
|
|
13
|
+
background: #000;
|
|
14
|
+
}
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
&.color-white {
|
|
17
|
+
background: #fff;
|
|
18
|
+
}
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
@keyframes loading-placeholder {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
22
|
+
0% {
|
|
23
|
+
opacity: 0.15;
|
|
24
|
+
}
|
|
25
|
+
50% {
|
|
26
|
+
opacity: 0.3;
|
|
27
|
+
}
|
|
28
|
+
100% {
|
|
29
|
+
opacity: 0.15;
|
|
30
|
+
}
|
|
31
|
+
}
|
package/src/ui/text/text.jsx
CHANGED
|
@@ -1,37 +1,59 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
node,
|
|
6
|
+
Style,
|
|
7
|
+
type ChildType,
|
|
8
|
+
type NullableChildrenType,
|
|
9
|
+
} from "@krakenjs/jsx-pragmatic/src";
|
|
5
10
|
|
|
6
|
-
import { CLASS, TEXT_COLOR } from
|
|
11
|
+
import { CLASS, TEXT_COLOR } from "../../constants";
|
|
7
12
|
|
|
8
|
-
import css from
|
|
13
|
+
import css from "./style.scoped.scss";
|
|
9
14
|
|
|
10
15
|
type TextProps = {|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
optional?: boolean | number,
|
|
17
|
+
className?: $ReadOnlyArray<string>,
|
|
18
|
+
animate?: boolean,
|
|
19
|
+
children: NullableChildrenType,
|
|
14
20
|
|};
|
|
15
21
|
|
|
16
|
-
export function Text(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
export function Text(
|
|
23
|
+
{ optional, className = [], animate, ...rest }: TextProps,
|
|
24
|
+
children: NullableChildrenType
|
|
25
|
+
): ChildType {
|
|
26
|
+
return (
|
|
27
|
+
<span
|
|
28
|
+
class={[CLASS.TEXT, ...className, animate || CLASS.IMMEDIATE]
|
|
29
|
+
.filter(Boolean)
|
|
30
|
+
.join(" ")}
|
|
31
|
+
optional={optional}
|
|
32
|
+
{...rest}
|
|
33
|
+
>
|
|
34
|
+
{children}
|
|
35
|
+
</span>
|
|
36
|
+
);
|
|
20
37
|
}
|
|
21
38
|
|
|
22
|
-
export function Space()
|
|
23
|
-
|
|
39
|
+
export function Space(): ChildType {
|
|
40
|
+
return <span class={[CLASS.SPACE].join(" ")}> </span>;
|
|
24
41
|
}
|
|
25
42
|
|
|
26
43
|
type PlaceHolderProps = {|
|
|
27
|
-
|
|
28
|
-
|
|
44
|
+
chars: number,
|
|
45
|
+
color?: $Values<typeof TEXT_COLOR>,
|
|
29
46
|
|};
|
|
30
47
|
|
|
31
|
-
export function PlaceHolder({
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
48
|
+
export function PlaceHolder({
|
|
49
|
+
chars,
|
|
50
|
+
color = TEXT_COLOR.WHITE,
|
|
51
|
+
}: PlaceHolderProps): ChildType {
|
|
52
|
+
return (
|
|
53
|
+
<Style css={css}>
|
|
54
|
+
<div class={["placeholder", `color-${color}`].join(" ")}>
|
|
55
|
+
{new Array(chars).fill("x").join("")}
|
|
56
|
+
</div>
|
|
57
|
+
</Style>
|
|
58
|
+
);
|
|
37
59
|
}
|
package/src/ui/tracking.jsx
CHANGED
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
|
|
4
|
-
import { node, Fragment, type ChildType } from
|
|
4
|
+
import { node, Fragment, type ChildType } from "@krakenjs/jsx-pragmatic/src";
|
|
5
5
|
|
|
6
|
-
export function TrackingBeacon({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
export function TrackingBeacon({
|
|
7
|
+
url,
|
|
8
|
+
nonce,
|
|
9
|
+
}: {|
|
|
10
|
+
url: string,
|
|
11
|
+
nonce: ?string,
|
|
12
|
+
|}): ChildType {
|
|
13
|
+
return (
|
|
14
|
+
<Fragment>
|
|
15
|
+
<style
|
|
16
|
+
nonce={nonce}
|
|
17
|
+
innerHTML={`
|
|
12
18
|
.tracking-beacon {
|
|
13
19
|
visibility: hidden;
|
|
14
20
|
position: absolute;
|
|
15
21
|
height: 1px;
|
|
16
22
|
width: 1px;
|
|
17
23
|
}
|
|
18
|
-
`
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
`}
|
|
25
|
+
/>
|
|
26
|
+
<img class="tracking-beacon" src={url} />
|
|
27
|
+
</Fragment>
|
|
28
|
+
);
|
|
22
29
|
}
|