@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/buttons/config.js
CHANGED
|
@@ -1,78 +1,81 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
/* eslint no-template-curly-in-string: off, max-lines: off */
|
|
3
3
|
|
|
4
|
-
import { BUTTON_SIZE, BUTTON_LAYOUT } from
|
|
4
|
+
import { BUTTON_SIZE, BUTTON_LAYOUT } from "../../constants";
|
|
5
5
|
|
|
6
|
-
export const MINIMUM_SIZE
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export const MINIMUM_SIZE: {|
|
|
7
|
+
[$Values<typeof BUTTON_LAYOUT>]: $Values<typeof BUTTON_SIZE>,
|
|
8
|
+
|} = {
|
|
9
|
+
[BUTTON_LAYOUT.HORIZONTAL]: BUTTON_SIZE.SMALL,
|
|
10
|
+
[BUTTON_LAYOUT.VERTICAL]: BUTTON_SIZE.MEDIUM,
|
|
9
11
|
};
|
|
10
12
|
|
|
11
|
-
export const MAXIMUM_SIZE
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
export const MAXIMUM_SIZE: {|
|
|
14
|
+
[$Values<typeof BUTTON_LAYOUT>]: $Values<typeof BUTTON_SIZE>,
|
|
15
|
+
|} = {
|
|
16
|
+
[BUTTON_LAYOUT.HORIZONTAL]: BUTTON_SIZE.HUGE,
|
|
17
|
+
[BUTTON_LAYOUT.VERTICAL]: BUTTON_SIZE.HUGE,
|
|
14
18
|
};
|
|
15
19
|
|
|
16
20
|
export const BUTTON_RELATIVE_STYLE = {
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
TAGLINE: 50,
|
|
22
|
+
VERTICAL_MARGIN: 30,
|
|
19
23
|
};
|
|
20
24
|
|
|
21
25
|
type ButtonStyleMap = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
[$Values<typeof BUTTON_SIZE>]: {|
|
|
27
|
+
defaultWidth: number,
|
|
28
|
+
defaultHeight: number,
|
|
29
|
+
minWidth: number,
|
|
30
|
+
maxWidth: number,
|
|
31
|
+
minHeight: number,
|
|
32
|
+
maxHeight: number,
|
|
33
|
+
|},
|
|
30
34
|
};
|
|
31
35
|
|
|
32
|
-
export const BUTTON_SIZE_STYLE
|
|
36
|
+
export const BUTTON_SIZE_STYLE: ButtonStyleMap = {
|
|
37
|
+
[BUTTON_SIZE.TINY]: {
|
|
38
|
+
defaultWidth: 75,
|
|
39
|
+
defaultHeight: 25,
|
|
40
|
+
minWidth: 75,
|
|
41
|
+
maxWidth: 150,
|
|
42
|
+
minHeight: 25,
|
|
43
|
+
maxHeight: 30,
|
|
44
|
+
},
|
|
33
45
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
[BUTTON_SIZE.SMALL]: {
|
|
47
|
+
defaultWidth: 150,
|
|
48
|
+
defaultHeight: 25,
|
|
49
|
+
minWidth: 150,
|
|
50
|
+
maxWidth: 200,
|
|
51
|
+
minHeight: 25,
|
|
52
|
+
maxHeight: 55,
|
|
53
|
+
},
|
|
42
54
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
55
|
+
[BUTTON_SIZE.MEDIUM]: {
|
|
56
|
+
defaultWidth: 250,
|
|
57
|
+
defaultHeight: 35,
|
|
58
|
+
minWidth: 200,
|
|
59
|
+
maxWidth: 300,
|
|
60
|
+
minHeight: 35,
|
|
61
|
+
maxHeight: 55,
|
|
62
|
+
},
|
|
51
63
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
64
|
+
[BUTTON_SIZE.LARGE]: {
|
|
65
|
+
defaultWidth: 350,
|
|
66
|
+
defaultHeight: 45,
|
|
67
|
+
minWidth: 300,
|
|
68
|
+
maxWidth: 500,
|
|
69
|
+
minHeight: 30,
|
|
70
|
+
maxHeight: 55,
|
|
71
|
+
},
|
|
60
72
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
[ BUTTON_SIZE.HUGE ]: {
|
|
71
|
-
defaultWidth: 500,
|
|
72
|
-
defaultHeight: 55,
|
|
73
|
-
minWidth: 500,
|
|
74
|
-
maxWidth: 750,
|
|
75
|
-
minHeight: 40,
|
|
76
|
-
maxHeight: 55
|
|
77
|
-
}
|
|
73
|
+
[BUTTON_SIZE.HUGE]: {
|
|
74
|
+
defaultWidth: 500,
|
|
75
|
+
defaultHeight: 55,
|
|
76
|
+
minWidth: 500,
|
|
77
|
+
maxWidth: 750,
|
|
78
|
+
minHeight: 40,
|
|
79
|
+
maxHeight: 55,
|
|
80
|
+
},
|
|
78
81
|
};
|
|
@@ -2,128 +2,313 @@
|
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
/** @jsxFrag Fragment */
|
|
4
4
|
|
|
5
|
-
import { node, Fragment, type ChildType } from
|
|
6
|
-
import { LANG } from
|
|
7
|
-
import { PayPalLogo, LOGO_COLOR } from
|
|
5
|
+
import { node, Fragment, type ChildType } from "@krakenjs/jsx-pragmatic/src";
|
|
6
|
+
import { LANG } from "@paypal/sdk-constants/src";
|
|
7
|
+
import { PayPalLogo, LOGO_COLOR } from "@paypal/sdk-logos/src";
|
|
8
8
|
|
|
9
|
-
import { Text } from
|
|
9
|
+
import { Text } from "../text";
|
|
10
10
|
|
|
11
11
|
type ButtonContentMap = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
[$Values<typeof LANG>]: {|
|
|
13
|
+
PoweredBy: ({| logoColor: $Values<typeof LOGO_COLOR> |}) => ChildType,
|
|
14
|
+
|},
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
export const buttonContent
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
17
|
+
export const buttonContent: ButtonContentMap = {
|
|
18
|
+
ar: {
|
|
19
|
+
PoweredBy: ({ logoColor }) => (
|
|
20
|
+
<Fragment>
|
|
21
|
+
<Text>مدعوم من </Text>
|
|
22
|
+
<PayPalLogo logoColor={logoColor} />
|
|
23
|
+
</Fragment>
|
|
24
|
+
),
|
|
25
|
+
},
|
|
26
|
+
bg: {
|
|
27
|
+
PoweredBy: ({ logoColor }) => (
|
|
28
|
+
<Fragment>
|
|
29
|
+
<Text>С подкрепата на </Text>
|
|
30
|
+
<PayPalLogo logoColor={logoColor} />
|
|
31
|
+
</Fragment>
|
|
32
|
+
),
|
|
33
|
+
},
|
|
34
|
+
cs: {
|
|
35
|
+
PoweredBy: ({ logoColor }) => (
|
|
36
|
+
<Fragment>
|
|
37
|
+
<Text>Využívá službu </Text>
|
|
38
|
+
<PayPalLogo logoColor={logoColor} />
|
|
39
|
+
</Fragment>
|
|
40
|
+
),
|
|
41
|
+
},
|
|
42
|
+
da: {
|
|
43
|
+
PoweredBy: ({ logoColor }) => (
|
|
44
|
+
<Fragment>
|
|
45
|
+
<Text>Leveret af </Text>
|
|
46
|
+
<PayPalLogo logoColor={logoColor} />
|
|
47
|
+
</Fragment>
|
|
48
|
+
),
|
|
49
|
+
},
|
|
50
|
+
de: {
|
|
51
|
+
PoweredBy: ({ logoColor }) => (
|
|
52
|
+
<Fragment>
|
|
53
|
+
<Text>Abgewickelt durch </Text>
|
|
54
|
+
<PayPalLogo logoColor={logoColor} />
|
|
55
|
+
</Fragment>
|
|
56
|
+
),
|
|
57
|
+
},
|
|
58
|
+
el: {
|
|
59
|
+
PoweredBy: ({ logoColor }) => (
|
|
60
|
+
<Fragment>
|
|
61
|
+
<Text>Με την υποστήριξη του </Text>
|
|
62
|
+
<PayPalLogo logoColor={logoColor} />
|
|
63
|
+
</Fragment>
|
|
64
|
+
),
|
|
65
|
+
},
|
|
66
|
+
en: {
|
|
67
|
+
PoweredBy: ({ logoColor }) => (
|
|
68
|
+
<Fragment>
|
|
69
|
+
<Text>Powered by </Text>
|
|
70
|
+
<PayPalLogo logoColor={logoColor} />
|
|
71
|
+
</Fragment>
|
|
72
|
+
),
|
|
73
|
+
},
|
|
74
|
+
es: {
|
|
75
|
+
PoweredBy: ({ logoColor }) => (
|
|
76
|
+
<Fragment>
|
|
77
|
+
<Text>Desarrollado por </Text>
|
|
78
|
+
<PayPalLogo logoColor={logoColor} />
|
|
79
|
+
</Fragment>
|
|
80
|
+
),
|
|
81
|
+
},
|
|
82
|
+
et: {
|
|
83
|
+
PoweredBy: ({ logoColor }) => (
|
|
84
|
+
<Fragment>
|
|
85
|
+
<Text>Powered by </Text>
|
|
86
|
+
<PayPalLogo logoColor={logoColor} />
|
|
87
|
+
</Fragment>
|
|
88
|
+
),
|
|
89
|
+
},
|
|
90
|
+
fi: {
|
|
91
|
+
PoweredBy: ({ logoColor }) => (
|
|
92
|
+
<Fragment>
|
|
93
|
+
<Text>Palvelun tarjoaa </Text>
|
|
94
|
+
<PayPalLogo logoColor={logoColor} />
|
|
95
|
+
</Fragment>
|
|
96
|
+
),
|
|
97
|
+
},
|
|
98
|
+
fr: {
|
|
99
|
+
PoweredBy: ({ logoColor }) => (
|
|
100
|
+
<Fragment>
|
|
101
|
+
<Text>Optimisé par </Text>
|
|
102
|
+
<PayPalLogo logoColor={logoColor} />
|
|
103
|
+
</Fragment>
|
|
104
|
+
),
|
|
105
|
+
},
|
|
106
|
+
he: {
|
|
107
|
+
PoweredBy: ({ logoColor }) => (
|
|
108
|
+
<Fragment>
|
|
109
|
+
<PayPalLogo logoColor={logoColor} /> מופעל על-ידי
|
|
110
|
+
</Fragment>
|
|
111
|
+
),
|
|
112
|
+
},
|
|
113
|
+
hu: {
|
|
114
|
+
PoweredBy: ({ logoColor }) => (
|
|
115
|
+
<Fragment>
|
|
116
|
+
<Text>Üzemeltető: </Text>
|
|
117
|
+
<PayPalLogo logoColor={logoColor} />
|
|
118
|
+
</Fragment>
|
|
119
|
+
),
|
|
120
|
+
},
|
|
121
|
+
id: {
|
|
122
|
+
PoweredBy: ({ logoColor }) => (
|
|
123
|
+
<Fragment>
|
|
124
|
+
<Text>Ditunjang teknologi </Text>
|
|
125
|
+
<PayPalLogo logoColor={logoColor} />
|
|
126
|
+
</Fragment>
|
|
127
|
+
),
|
|
128
|
+
},
|
|
129
|
+
it: {
|
|
130
|
+
PoweredBy: ({ logoColor }) => (
|
|
131
|
+
<Fragment>
|
|
132
|
+
<Text>Con tecnologia </Text>
|
|
133
|
+
<PayPalLogo logoColor={logoColor} />
|
|
134
|
+
</Fragment>
|
|
135
|
+
),
|
|
136
|
+
},
|
|
137
|
+
ja: {
|
|
138
|
+
PoweredBy: ({ logoColor }) => (
|
|
139
|
+
<Fragment>
|
|
140
|
+
<Text>Powered by </Text>
|
|
141
|
+
<PayPalLogo logoColor={logoColor} />
|
|
142
|
+
</Fragment>
|
|
143
|
+
),
|
|
144
|
+
},
|
|
145
|
+
ko: {
|
|
146
|
+
PoweredBy: ({ logoColor }) => (
|
|
147
|
+
<Fragment>
|
|
148
|
+
<Text>제공: </Text>
|
|
149
|
+
<PayPalLogo logoColor={logoColor} />
|
|
150
|
+
</Fragment>
|
|
151
|
+
),
|
|
152
|
+
},
|
|
153
|
+
lt: {
|
|
154
|
+
PoweredBy: ({ logoColor }) => (
|
|
155
|
+
<Fragment>
|
|
156
|
+
<Text>Sukurta </Text>
|
|
157
|
+
<PayPalLogo logoColor={logoColor} />
|
|
158
|
+
</Fragment>
|
|
159
|
+
),
|
|
160
|
+
},
|
|
161
|
+
lv: {
|
|
162
|
+
PoweredBy: ({ logoColor }) => (
|
|
163
|
+
<Fragment>
|
|
164
|
+
<Text>Darbojas ar </Text>
|
|
165
|
+
<PayPalLogo logoColor={logoColor} />
|
|
166
|
+
</Fragment>
|
|
167
|
+
),
|
|
168
|
+
},
|
|
169
|
+
ms: {
|
|
170
|
+
PoweredBy: ({ logoColor }) => (
|
|
171
|
+
<Fragment>
|
|
172
|
+
<Text>Dikuasakan oleh </Text>
|
|
173
|
+
<PayPalLogo logoColor={logoColor} />
|
|
174
|
+
</Fragment>
|
|
175
|
+
),
|
|
176
|
+
},
|
|
177
|
+
nl: {
|
|
178
|
+
PoweredBy: ({ logoColor }) => (
|
|
179
|
+
<Fragment>
|
|
180
|
+
<Text>Mogelijk gemaakt door </Text>
|
|
181
|
+
<PayPalLogo logoColor={logoColor} />
|
|
182
|
+
</Fragment>
|
|
183
|
+
),
|
|
184
|
+
},
|
|
185
|
+
no: {
|
|
186
|
+
PoweredBy: ({ logoColor }) => (
|
|
187
|
+
<Fragment>
|
|
188
|
+
<Text>Leveres av </Text>
|
|
189
|
+
<PayPalLogo logoColor={logoColor} />
|
|
190
|
+
</Fragment>
|
|
191
|
+
),
|
|
192
|
+
},
|
|
193
|
+
pl: {
|
|
194
|
+
PoweredBy: ({ logoColor }) => (
|
|
195
|
+
<Fragment>
|
|
196
|
+
<Text>Powered by </Text>
|
|
197
|
+
<PayPalLogo logoColor={logoColor} />
|
|
198
|
+
</Fragment>
|
|
199
|
+
),
|
|
200
|
+
},
|
|
201
|
+
pt: {
|
|
202
|
+
PoweredBy: ({ logoColor }) => (
|
|
203
|
+
<Fragment>
|
|
204
|
+
<Text>Powered by </Text>
|
|
205
|
+
<PayPalLogo logoColor={logoColor} />
|
|
206
|
+
</Fragment>
|
|
207
|
+
),
|
|
208
|
+
},
|
|
209
|
+
ro: {
|
|
210
|
+
PoweredBy: ({ logoColor }) => (
|
|
211
|
+
<Fragment>
|
|
212
|
+
<Text>Cu tehnologia </Text>
|
|
213
|
+
<PayPalLogo logoColor={logoColor} />
|
|
214
|
+
</Fragment>
|
|
215
|
+
),
|
|
216
|
+
},
|
|
217
|
+
ru: {
|
|
218
|
+
PoweredBy: ({ logoColor }) => (
|
|
219
|
+
<Fragment>
|
|
220
|
+
<Text>Обработано </Text>
|
|
221
|
+
<PayPalLogo logoColor={logoColor} />
|
|
222
|
+
</Fragment>
|
|
223
|
+
),
|
|
224
|
+
},
|
|
225
|
+
si: {
|
|
226
|
+
PoweredBy: ({ logoColor }) => (
|
|
227
|
+
<Fragment>
|
|
228
|
+
<Text>බලගන්වන්නේ </Text>
|
|
229
|
+
<PayPalLogo logoColor={logoColor} />
|
|
230
|
+
<Text> විසිනි</Text>
|
|
231
|
+
</Fragment>
|
|
232
|
+
),
|
|
233
|
+
},
|
|
234
|
+
sk: {
|
|
235
|
+
PoweredBy: ({ logoColor }) => (
|
|
236
|
+
<Fragment>
|
|
237
|
+
<Text>Používa technológiu </Text>
|
|
238
|
+
<PayPalLogo logoColor={logoColor} />
|
|
239
|
+
</Fragment>
|
|
240
|
+
),
|
|
241
|
+
},
|
|
242
|
+
sl: {
|
|
243
|
+
PoweredBy: ({ logoColor }) => (
|
|
244
|
+
<Fragment>
|
|
245
|
+
<Text>Powered by </Text>
|
|
246
|
+
<PayPalLogo logoColor={logoColor} />
|
|
247
|
+
</Fragment>
|
|
248
|
+
),
|
|
249
|
+
},
|
|
250
|
+
sq: {
|
|
251
|
+
PoweredBy: ({ logoColor }) => (
|
|
252
|
+
<Fragment>
|
|
253
|
+
<Text>Mundësuar nga </Text>
|
|
254
|
+
<PayPalLogo logoColor={logoColor} />
|
|
255
|
+
</Fragment>
|
|
256
|
+
),
|
|
257
|
+
},
|
|
258
|
+
sv: {
|
|
259
|
+
PoweredBy: ({ logoColor }) => (
|
|
260
|
+
<Fragment>
|
|
261
|
+
<Text>Tillhandahålls av </Text>
|
|
262
|
+
<PayPalLogo logoColor={logoColor} />
|
|
263
|
+
</Fragment>
|
|
264
|
+
),
|
|
265
|
+
},
|
|
266
|
+
th: {
|
|
267
|
+
PoweredBy: ({ logoColor }) => (
|
|
268
|
+
<Fragment>
|
|
269
|
+
<Text>ให้บริการโดย </Text>
|
|
270
|
+
<PayPalLogo logoColor={logoColor} />
|
|
271
|
+
</Fragment>
|
|
272
|
+
),
|
|
273
|
+
},
|
|
274
|
+
tl: {
|
|
275
|
+
PoweredBy: ({ logoColor }) => (
|
|
276
|
+
<Fragment>
|
|
277
|
+
<Text>Pinapagana ng </Text>
|
|
278
|
+
<PayPalLogo logoColor={logoColor} />
|
|
279
|
+
</Fragment>
|
|
280
|
+
),
|
|
281
|
+
},
|
|
282
|
+
tr: {
|
|
283
|
+
PoweredBy: ({ logoColor }) => (
|
|
284
|
+
<Fragment>
|
|
285
|
+
<Text>Çalıştıran </Text>
|
|
286
|
+
<PayPalLogo logoColor={logoColor} />
|
|
287
|
+
</Fragment>
|
|
288
|
+
),
|
|
289
|
+
},
|
|
290
|
+
vi: {
|
|
291
|
+
PoweredBy: ({ logoColor }) => (
|
|
292
|
+
<Fragment>
|
|
293
|
+
<Text>Được hỗ trợ bởi </Text>
|
|
294
|
+
<PayPalLogo logoColor={logoColor} />
|
|
295
|
+
</Fragment>
|
|
296
|
+
),
|
|
297
|
+
},
|
|
298
|
+
zh: {
|
|
299
|
+
PoweredBy: ({ logoColor }) => (
|
|
300
|
+
<Fragment>
|
|
301
|
+
<Text>技术支持提供方: </Text>
|
|
302
|
+
<PayPalLogo logoColor={logoColor} />
|
|
303
|
+
</Fragment>
|
|
304
|
+
),
|
|
305
|
+
},
|
|
306
|
+
zh_Hant: {
|
|
307
|
+
PoweredBy: ({ logoColor }) => (
|
|
308
|
+
<Fragment>
|
|
309
|
+
<Text>技術支持: </Text>
|
|
310
|
+
<PayPalLogo logoColor={logoColor} />
|
|
311
|
+
</Fragment>
|
|
312
|
+
),
|
|
313
|
+
},
|
|
129
314
|
};
|
package/src/ui/buttons/index.js
CHANGED
|
@@ -1,29 +1,36 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
/** @jsx node */
|
|
3
3
|
|
|
4
|
-
import { node, type ChildType, Style } from
|
|
4
|
+
import { node, type ChildType, Style } from "@krakenjs/jsx-pragmatic/src";
|
|
5
5
|
|
|
6
|
-
import { ATTRIBUTE, TEXT_COLOR } from
|
|
7
|
-
import { Chevron } from
|
|
8
|
-
import type { ContentType } from
|
|
6
|
+
import { ATTRIBUTE, TEXT_COLOR } from "../../../constants";
|
|
7
|
+
import { Chevron } from "../../chevron";
|
|
8
|
+
import type { ContentType } from "../../../types";
|
|
9
9
|
|
|
10
|
-
import css from
|
|
10
|
+
import css from "./menu-button.scoped.scss";
|
|
11
11
|
|
|
12
|
-
export function MenuButton({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
12
|
+
export function MenuButton({
|
|
13
|
+
textColor = TEXT_COLOR.BLACK,
|
|
14
|
+
content,
|
|
15
|
+
}: {|
|
|
16
|
+
textColor?: $Values<typeof TEXT_COLOR>,
|
|
17
|
+
content: ?ContentType,
|
|
18
|
+
|} = {}): ChildType {
|
|
19
|
+
const labelText = content?.moreOptions;
|
|
20
|
+
return (
|
|
21
|
+
<Style css={css}>
|
|
22
|
+
<div
|
|
23
|
+
{...{
|
|
24
|
+
[ATTRIBUTE.MENU]: true,
|
|
25
|
+
}}
|
|
26
|
+
tabindex="0"
|
|
27
|
+
class="menu-button"
|
|
28
|
+
role="button"
|
|
29
|
+
aria-label={labelText}
|
|
30
|
+
aria-haspopup="menu"
|
|
31
|
+
>
|
|
32
|
+
<Chevron color={textColor} />
|
|
33
|
+
</div>
|
|
34
|
+
</Style>
|
|
35
|
+
);
|
|
29
36
|
}
|