@tap-payments/apple-pay-button 0.0.64-development → 0.0.66-development

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/build/@types/ApplePayButtonProps.d.ts +1 -2
  2. package/build/@types/enums.d.ts +2 -8
  3. package/build/@types/enums.js +1 -8
  4. package/build/api.d.ts +34 -0
  5. package/build/{api/app.service.js → api.js} +36 -107
  6. package/build/constants/index.d.ts +2 -7
  7. package/build/constants/index.js +2 -7
  8. package/build/features/ApplePayButton/ApplePayButton.d.ts +0 -1
  9. package/build/features/ApplePayButton/ApplePayButton.js +9 -8
  10. package/build/hooks/index.d.ts +0 -1
  11. package/build/hooks/index.js +0 -1
  12. package/build/hooks/useApplePay.d.ts +9 -13
  13. package/build/hooks/useApplePay.js +25 -58
  14. package/build/hooks/useMerchantApplePay.js +2 -2
  15. package/build/index.d.ts +2 -2
  16. package/build/index.js +2 -3
  17. package/build/utils/config.d.ts +0 -2
  18. package/build/utils/config.js +0 -18
  19. package/build/utils/defaultValues.d.ts +1 -71
  20. package/build/utils/defaultValues.js +1 -23
  21. package/package.json +3 -4
  22. package/build/api/app.service.d.ts +0 -27
  23. package/build/api/base.d.ts +0 -9
  24. package/build/api/base.js +0 -45
  25. package/build/api/httpClient.d.ts +0 -22
  26. package/build/api/httpClient.js +0 -36
  27. package/build/assets/gif/error-black.gif +0 -0
  28. package/build/assets/gif/error-white.gif +0 -0
  29. package/build/assets/gif/success-black.gif +0 -0
  30. package/build/assets/gif/success-white.gif +0 -0
  31. package/build/assets/lottie/Dark_Mode_Loader.json +0 -255
  32. package/build/assets/lottie/Light_Mode_Loader.json +0 -255
  33. package/build/components/ActionButton/ActionButton.d.ts +0 -24
  34. package/build/components/ActionButton/ActionButton.js +0 -62
  35. package/build/components/ActionButton/index.d.ts +0 -2
  36. package/build/components/ActionButton/index.js +0 -2
  37. package/build/components/InitialLoader/InitialLoader.d.ts +0 -9
  38. package/build/components/InitialLoader/InitialLoader.js +0 -26
  39. package/build/components/InitialLoader/index.d.ts +0 -2
  40. package/build/components/InitialLoader/index.js +0 -2
  41. package/build/components/Loader/Loader.d.ts +0 -24
  42. package/build/components/Loader/Loader.js +0 -48
  43. package/build/components/Loader/index.d.ts +0 -2
  44. package/build/components/Loader/index.js +0 -2
  45. package/build/components/PayButton/PayButton.d.ts +0 -16
  46. package/build/components/PayButton/PayButton.js +0 -40
  47. package/build/components/PayButton/index.d.ts +0 -2
  48. package/build/components/PayButton/index.js +0 -2
  49. package/build/components/PayButton/style.d.ts +0 -5
  50. package/build/components/PayButton/style.js +0 -19
  51. package/build/features/ApplePayButton/ApplePayButton.css +0 -21
  52. package/build/features/ApplePayButton/style.d.ts +0 -5
  53. package/build/features/ApplePayButton/style.js +0 -20
  54. package/build/hooks/useScript.d.ts +0 -3
  55. package/build/hooks/useScript.js +0 -40
@@ -1,255 +0,0 @@
1
- {
2
- "ddd": 0,
3
- "h": 48,
4
- "w": 358,
5
- "meta": { "g": "LottieFiles Figma v41" },
6
- "layers": [
7
- {
8
- "ty": 4,
9
- "sr": 1,
10
- "st": 0,
11
- "op": 22,
12
- "ip": 0,
13
- "hasMask": false,
14
- "ao": 0,
15
- "ks": {
16
- "a": {
17
- "a": 1,
18
- "k": [
19
- { "o": { "x": 0, "y": 0 }, "i": { "x": 1, "y": 1 }, "s": [90, 179.92], "t": 0 },
20
- { "o": { "x": 0, "y": 0 }, "i": { "x": 1, "y": 1 }, "s": [90, 179.92], "t": 3 },
21
- { "s": [90, 179.92], "t": 21 }
22
- ]
23
- },
24
- "s": {
25
- "a": 1,
26
- "k": [
27
- { "o": { "x": 0, "y": 0 }, "i": { "x": 1, "y": 1 }, "s": [100, 100], "t": 0 },
28
- { "o": { "x": 0, "y": 0 }, "i": { "x": 1, "y": 1 }, "s": [100, 100], "t": 3 },
29
- { "s": [100, 100], "t": 21 }
30
- ]
31
- },
32
- "p": {
33
- "a": 1,
34
- "k": [
35
- { "o": { "x": 0, "y": 0 }, "i": { "x": 1, "y": 1 }, "s": [-60, 44.63], "t": 0 },
36
- { "o": { "x": 0, "y": 0 }, "i": { "x": 1, "y": 1 }, "s": [-60, 44.63], "t": 3 },
37
- { "s": [476, 44.63], "t": 21 }
38
- ]
39
- },
40
- "r": {
41
- "a": 1,
42
- "k": [
43
- { "o": { "x": 0, "y": 0 }, "i": { "x": 1, "y": 1 }, "s": [0], "t": 0 },
44
- { "o": { "x": 0, "y": 0 }, "i": { "x": 1, "y": 1 }, "s": [0], "t": 3 },
45
- { "s": [0], "t": 21 }
46
- ]
47
- },
48
- "o": {
49
- "a": 1,
50
- "k": [
51
- { "o": { "x": 0, "y": 0 }, "i": { "x": 1, "y": 1 }, "s": [100], "t": 0 },
52
- { "o": { "x": 0, "y": 0 }, "i": { "x": 1, "y": 1 }, "s": [100], "t": 3 },
53
- { "s": [100], "t": 21 }
54
- ]
55
- }
56
- },
57
- "shapes": [
58
- {
59
- "ty": "sh",
60
- "d": 1,
61
- "ks": {
62
- "a": 1,
63
- "k": [
64
- {
65
- "o": { "x": 0, "y": 0 },
66
- "i": { "x": 1, "y": 1 },
67
- "s": [
68
- {
69
- "c": true,
70
- "i": [
71
- [0, 0],
72
- [0, 0],
73
- [0, 0],
74
- [0, 0]
75
- ],
76
- "o": [
77
- [0, 0],
78
- [0, 0],
79
- [0, 0],
80
- [0, 0]
81
- ],
82
- "v": [
83
- [0, 0],
84
- [180, 0],
85
- [180, 359.85],
86
- [0, 359.85]
87
- ]
88
- }
89
- ],
90
- "t": 0
91
- },
92
- {
93
- "o": { "x": 0, "y": 0 },
94
- "i": { "x": 1, "y": 1 },
95
- "s": [
96
- {
97
- "c": true,
98
- "i": [
99
- [0, 0],
100
- [0, 0],
101
- [0, 0],
102
- [0, 0]
103
- ],
104
- "o": [
105
- [0, 0],
106
- [0, 0],
107
- [0, 0],
108
- [0, 0]
109
- ],
110
- "v": [
111
- [0, 0],
112
- [180, 0],
113
- [180, 359.85],
114
- [0, 359.85]
115
- ]
116
- }
117
- ],
118
- "t": 3
119
- },
120
- {
121
- "s": [
122
- {
123
- "c": true,
124
- "i": [
125
- [0, 0],
126
- [0, 0],
127
- [0, 0],
128
- [0, 0]
129
- ],
130
- "o": [
131
- [0, 0],
132
- [0, 0],
133
- [0, 0],
134
- [0, 0]
135
- ],
136
- "v": [
137
- [0, 0],
138
- [180, 0],
139
- [180, 359.85],
140
- [0, 359.85]
141
- ]
142
- }
143
- ],
144
- "t": 21
145
- }
146
- ]
147
- }
148
- },
149
- {
150
- "ty": "gf",
151
- "e": {
152
- "a": 1,
153
- "k": [
154
- { "o": { "x": 0, "y": 0 }, "i": { "x": 1, "y": 1 }, "s": [180.1510009765625, 158.0290069580078], "t": 0 },
155
- { "o": { "x": 0, "y": 0 }, "i": { "x": 1, "y": 1 }, "s": [180.1510009765625, 158.0290069580078], "t": 3 },
156
- { "s": [180.1510009765625, 158.0290069580078], "t": 21 }
157
- ]
158
- },
159
- "g": {
160
- "p": 3,
161
- "k": {
162
- "a": 1,
163
- "k": [
164
- {
165
- "o": { "x": 0, "y": 0 },
166
- "i": { "x": 1, "y": 1 },
167
- "s": [
168
- 0, 0.9490196108818054, 0.9490196108818054, 0.9490196108818054, 0.515625, 0.9137254953384399,
169
- 0.9137254953384399, 0.9137254953384399, 1, 0.9490196108818054, 0.9490196108818054,
170
- 0.9490196108818054
171
- ],
172
- "t": 0
173
- },
174
- {
175
- "o": { "x": 0, "y": 0 },
176
- "i": { "x": 1, "y": 1 },
177
- "s": [
178
- 0, 0.9490196108818054, 0.9490196108818054, 0.9490196108818054, 0.515625, 0.9137254953384399,
179
- 0.9137254953384399, 0.9137254953384399, 1, 0.9490196108818054, 0.9490196108818054,
180
- 0.9490196108818054
181
- ],
182
- "t": 3
183
- },
184
- {
185
- "s": [
186
- 0, 0.9490196108818054, 0.9490196108818054, 0.9490196108818054, 0.515625, 0.9137254953384399,
187
- 0.9137254953384399, 0.9137254953384399, 1, 0.9490196108818054, 0.9490196108818054,
188
- 0.9490196108818054
189
- ],
190
- "t": 21
191
- }
192
- ]
193
- }
194
- },
195
- "t": 1,
196
- "a": { "a": 0, "k": 0 },
197
- "h": { "a": 0, "k": 0 },
198
- "s": {
199
- "a": 1,
200
- "k": [
201
- {
202
- "o": { "x": 0, "y": 0 },
203
- "i": { "x": 1, "y": 1 },
204
- "s": [-1.0300099849700928, 158.0290069580078],
205
- "t": 0
206
- },
207
- {
208
- "o": { "x": 0, "y": 0 },
209
- "i": { "x": 1, "y": 1 },
210
- "s": [-1.0300099849700928, 158.0290069580078],
211
- "t": 3
212
- },
213
- { "s": [-1.0300099849700928, 158.0290069580078], "t": 21 }
214
- ]
215
- },
216
- "r": 1,
217
- "o": {
218
- "a": 1,
219
- "k": [
220
- { "o": { "x": 0, "y": 0 }, "i": { "x": 1, "y": 1 }, "s": [100], "t": 0 },
221
- { "o": { "x": 0, "y": 0 }, "i": { "x": 1, "y": 1 }, "s": [100], "t": 3 },
222
- { "s": [100], "t": 21 }
223
- ]
224
- }
225
- }
226
- ],
227
- "ind": 1
228
- },
229
- {
230
- "ty": 1,
231
- "sr": 1,
232
- "st": 0,
233
- "op": 22.00000075995922,
234
- "ip": 0,
235
- "hasMask": false,
236
- "ao": 0,
237
- "ks": {
238
- "a": { "a": 0, "k": [0, 0] },
239
- "s": { "a": 0, "k": [100, 100] },
240
- "p": { "a": 0, "k": [0, 0] },
241
- "r": { "a": 0, "k": 0 },
242
- "o": { "a": 0, "k": 100 }
243
- },
244
- "sc": "#f2f2f2",
245
- "sh": 48,
246
- "sw": 358,
247
- "ind": 2
248
- }
249
- ],
250
- "v": "5.7.0",
251
- "fr": 30,
252
- "op": 21.00000075995922,
253
- "ip": 0,
254
- "assets": []
255
- }
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import { ButtonProps as MuiButtonProps } from '@mui/material/Button';
3
- interface ButtonProps extends MuiButtonProps {
4
- rounded?: boolean;
5
- }
6
- interface IProps extends ButtonProps {
7
- children?: string | React.ReactElement;
8
- onClick: () => void;
9
- disabled?: boolean;
10
- rounded?: boolean;
11
- bgColor?: string;
12
- textColor?: string;
13
- gradientColor?: string;
14
- }
15
- declare function ActionButton(props: IProps): JSX.Element;
16
- declare namespace ActionButton {
17
- var defaultProps: {
18
- children: string;
19
- disabled: boolean;
20
- rounded: boolean;
21
- bgColor: string;
22
- };
23
- }
24
- export default ActionButton;
@@ -1,62 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import { jsx as _jsx } from "react/jsx-runtime";
24
- import Button from '@mui/material/Button';
25
- import { styled } from '@mui/material/styles';
26
- var StyledButton = styled(Button, {
27
- shouldForwardProp: function (prop) { return prop !== 'rounded'; }
28
- })(function (_a) {
29
- var theme = _a.theme, rounded = _a.rounded;
30
- return ({
31
- cursor: rounded ? 'not-allowed' : 'pointer',
32
- pointerEvents: rounded ? 'none' : 'auto',
33
- border: 'none',
34
- overflow: 'hidden',
35
- height: '48px',
36
- maxWidth: '360px',
37
- minWidth: '0px',
38
- transition: theme.transitions.create(['width', 'padding'], {
39
- easing: theme.transitions.easing.easeInOut,
40
- duration: theme.transitions.duration.complex * 3
41
- }),
42
- width: rounded ? theme.spacing(6) : '100%',
43
- borderRadius: rounded ? 30 : 0
44
- });
45
- });
46
- export default function ActionButton(props) {
47
- var children = props.children, onClick = props.onClick, disabled = props.disabled, rounded = props.rounded, bgColor = props.bgColor, textColor = props.textColor, gradientColor = props.gradientColor, sx = props.sx, rest = __rest(props, ["children", "onClick", "disabled", "rounded", "bgColor", "textColor", "gradientColor", "sx"]);
48
- var background = rounded ? bgColor : gradientColor || bgColor;
49
- return (_jsx(StyledButton, __assign({ "data-testid": 'ActionButton', "data-is-rounded": rounded, sx: __assign({ background: background, color: textColor, '&:hover': {
50
- background: background
51
- }, '&:disabled': {
52
- background: background,
53
- color: textColor,
54
- pointerEvents: 'none'
55
- } }, sx), disabled: disabled, rounded: rounded, onClick: onClick }, rest, { children: children })));
56
- }
57
- ActionButton.defaultProps = {
58
- children: 'Pay',
59
- disabled: false,
60
- rounded: false,
61
- bgColor: 'secondary'
62
- };
@@ -1,2 +0,0 @@
1
- import ActionButton from './ActionButton';
2
- export default ActionButton;
@@ -1,2 +0,0 @@
1
- import ActionButton from './ActionButton';
2
- export default ActionButton;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { Edges, ThemeMode } from '../../@types/enums';
3
- declare type Props = {
4
- open: boolean;
5
- themeMode?: ThemeMode;
6
- edges?: Edges;
7
- };
8
- export default function InitialLoader({ open, themeMode, edges }: Props): JSX.Element | null;
9
- export {};
@@ -1,26 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import Lottie from 'lottie-react';
3
- import DarkLoader from '../../assets/lottie/Dark_Mode_Loader.json';
4
- import LightLoader from '../../assets/lottie/Light_Mode_Loader.json';
5
- import { Edges, ThemeMode } from '../../@types/enums';
6
- import { styled } from '@mui/material/styles';
7
- var StyledLottie = styled(Lottie, {
8
- shouldForwardProp: function (prop) { return !['edges'].includes(prop); }
9
- })(function (_a) {
10
- var edges = _a.edges;
11
- return ({
12
- border: 'none',
13
- width: '100%',
14
- borderRadius: edges === Edges.STRAIGHT ? '0px' : '30px',
15
- overflow: 'hidden',
16
- height: '48px',
17
- maxWidth: '360px',
18
- minWidth: '170px'
19
- });
20
- });
21
- export default function InitialLoader(_a) {
22
- var open = _a.open, themeMode = _a.themeMode, edges = _a.edges;
23
- if (!open)
24
- return null;
25
- return (_jsx(StyledLottie, { "data-testid": 'InitialLoader-StyledLottie', animationData: themeMode === ThemeMode.DARK ? DarkLoader : LightLoader, edges: edges, loop: true }));
26
- }
@@ -1,2 +0,0 @@
1
- import InitialLoader from './InitialLoader';
2
- export default InitialLoader;
@@ -1,2 +0,0 @@
1
- import InitialLoader from './InitialLoader';
2
- export default InitialLoader;
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- export interface LoaderProps {
3
- outerColor?: string;
4
- innerColor?: string;
5
- duration?: number;
6
- toggleAnimation?: boolean;
7
- size?: number | string;
8
- style?: React.CSSProperties;
9
- className?: string;
10
- }
11
- declare function Loader({ duration, innerColor, outerColor, size, style, toggleAnimation }: LoaderProps): JSX.Element;
12
- declare namespace Loader {
13
- var defaultProps: {
14
- outerColor: string;
15
- innerColor: string;
16
- duration: number;
17
- toggleAnimation: boolean;
18
- size: number;
19
- style: null;
20
- className: string;
21
- };
22
- }
23
- declare const _default: React.MemoExoticComponent<typeof Loader>;
24
- export default _default;
@@ -1,48 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
- import React from 'react';
14
- import { styled } from '@mui/material/styles';
15
- var RootStyled = styled('div')(function (_a) {
16
- var size = _a.size;
17
- return (__assign({ '&:before': {
18
- content: '""',
19
- display: 'block',
20
- paddingTop: '100%'
21
- }, position: 'relative', margin: '0px auto', width: '30px', height: '30px' }, (size && {
22
- width: size,
23
- height: size
24
- })));
25
- });
26
- var LoaderBoxStyled = styled('svg')(function () { return ({
27
- height: '100%',
28
- transformOrigin: 'center center',
29
- width: '100%',
30
- position: 'absolute',
31
- top: 0,
32
- left: 0,
33
- margin: 'auto'
34
- }); });
35
- function Loader(_a) {
36
- var duration = _a.duration, innerColor = _a.innerColor, outerColor = _a.outerColor, size = _a.size, style = _a.style, toggleAnimation = _a.toggleAnimation;
37
- return (_jsx(RootStyled, __assign({ className: 'loader', style: style, size: size }, { children: _jsxs(LoaderBoxStyled, __assign({ className: 'circular-loader', viewBox: '25 25 50 50' }, { children: [_jsx("circle", __assign({ cx: '50', cy: '50', r: '20', fill: 'none', stroke: outerColor || 'black', strokeWidth: '3.6px', strokeLinecap: 'round', strokeDasharray: ' 125, 124' }, { children: toggleAnimation && (_jsxs(_Fragment, { children: [_jsx("animateTransform", { attributeName: 'transform', type: 'rotate', from: '0 50 50', to: '360 50 50', dur: "".concat(duration || 0 / 3, "s"), repeatCount: 'indefinite' }), _jsx("animate", { attributeName: 'stroke-dashoffset', values: '0; 122; 122; 0; 0', keyTimes: '0; 0.45; 0.55; 0.9; 1', dur: "".concat(duration, "s"), repeatCount: 'indefinite' })] })) })), _jsx("circle", __assign({ cx: '50', cy: '50', r: '14', fill: 'none', stroke: innerColor || 'black', strokeWidth: ' 3.6px', strokeLinecap: 'round', strokeDasharray: ' 88, 124' }, { children: toggleAnimation && (_jsxs(_Fragment, { children: [_jsx("animateTransform", { attributeName: 'transform', type: 'rotate', from: '360 50 50', to: '0 50 50', dur: "".concat(duration || 0 / 3, "s"), repeatCount: 'indefinite' }), _jsx("animate", { attributeName: 'stroke-dashoffset', values: '0; -85; -85; 0; 0', keyTimes: '0; 0.45; 0.55; 0.9; 1', dur: "".concat(duration, "s"), repeatCount: 'indefinite' })] })) }))] })) })));
38
- }
39
- Loader.defaultProps = {
40
- outerColor: '#423e3c',
41
- innerColor: '#423e3c',
42
- duration: 5,
43
- toggleAnimation: false,
44
- size: 50,
45
- style: null,
46
- className: ''
47
- };
48
- export default React.memo(Loader);
@@ -1,2 +0,0 @@
1
- import Loader from './Loader';
2
- export default Loader;
@@ -1,2 +0,0 @@
1
- import Loader from './Loader';
2
- export default Loader;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { Edges, ThemeMode } from '../../@types/enums';
3
- export interface PayButtonProps {
4
- theme: ThemeMode;
5
- isRounded?: boolean;
6
- isFailed?: boolean;
7
- isSuccess?: boolean;
8
- disabled?: boolean;
9
- bgColor?: string;
10
- gradientColor?: string;
11
- edges?: Edges;
12
- titleAsset?: string;
13
- onClick: () => void;
14
- }
15
- declare const _default: React.NamedExoticComponent<PayButtonProps>;
16
- export default _default;
@@ -1,40 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { memo } from 'react';
14
- import Loader from '../Loader';
15
- import ActionButton from '../ActionButton';
16
- import WhiteSuccessGif from '../../assets/gif/success-white.gif';
17
- import WhiteErrorGif from '../../assets/gif/error-white.gif';
18
- import BlackSuccessGif from '../../assets/gif/success-black.gif';
19
- import BlackErrorGif from '../../assets/gif/error-black.gif';
20
- import { StyledContainerLoader } from './style';
21
- import { Edges, ThemeMode } from '../../@types/enums';
22
- var PayButton = function (_a) {
23
- var theme = _a.theme, isRounded = _a.isRounded, isFailed = _a.isFailed, isSuccess = _a.isSuccess, disabled = _a.disabled, bgColor = _a.bgColor, gradientColor = _a.gradientColor, edges = _a.edges, titleAsset = _a.titleAsset, onClick = _a.onClick;
24
- var renderButtonLabel = function () {
25
- if (isFailed) {
26
- return _jsx("img", { src: theme === ThemeMode.DARK ? BlackErrorGif : WhiteErrorGif, alt: 'error', width: 30, height: 30 });
27
- }
28
- if (isSuccess) {
29
- return (_jsx("img", { src: theme === ThemeMode.DARK ? BlackSuccessGif : WhiteSuccessGif, alt: 'success', width: 30, height: 30 }));
30
- }
31
- if (isRounded) {
32
- return (_jsx(Loader, { toggleAnimation: true, size: 28, outerColor: theme === ThemeMode.DARK ? 'black' : 'white', innerColor: theme === ThemeMode.DARK ? 'black' : 'white' }));
33
- }
34
- return _jsx("img", { src: titleAsset, alt: 'logo' });
35
- };
36
- return (_jsx(StyledContainerLoader, __assign({ "data-testid": 'PayButton', "data-src": 'apple-pay-button-element', "data-is-rounded": isRounded, "data-is-error": isFailed, "data-is-success": isSuccess, edges: edges }, { children: _jsx(ActionButton, __assign({ "data-testid": 'PayButton-ActionButton', "data-src": 'apple-pay-button-element', "data-is-error": isFailed, "data-is-success": isSuccess, gradientColor: gradientColor, bgColor: bgColor, rounded: isRounded, onClick: onClick, disabled: disabled, style: {
37
- borderRadius: edges === Edges.STRAIGHT ? '0px' : '30px'
38
- } }, { children: renderButtonLabel() })) })));
39
- };
40
- export default memo(PayButton);
@@ -1,2 +0,0 @@
1
- import PayButton from './PayButton';
2
- export default PayButton;
@@ -1,2 +0,0 @@
1
- import PayButton from './PayButton';
2
- export default PayButton;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { Edges } from '../../@types';
3
- export declare const StyledContainerLoader: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
4
- edges?: Edges | undefined;
5
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
@@ -1,19 +0,0 @@
1
- import { styled } from '@mui/material/styles';
2
- import { Edges } from '../../@types';
3
- export var StyledContainerLoader = styled('section', {
4
- shouldForwardProp: function (prop) { return prop !== 'edges'; }
5
- })(function (_a) {
6
- var edges = _a.edges;
7
- return ({
8
- width: '100%',
9
- height: '48px',
10
- maxWidth: '360px',
11
- justifyContent: 'center',
12
- display: 'flex',
13
- background: 'transparent',
14
- borderRadius: edges === Edges.STRAIGHT ? '0px' : '30px',
15
- padding: 0,
16
- margin: 0,
17
- overflow: 'hidden'
18
- });
19
- });
@@ -1,21 +0,0 @@
1
- .button-applepay-tap {
2
- -webkit-appearance: -apple-pay-button;
3
- display: block;
4
- width: 100%;
5
- height: 48px;
6
- min-height: 30px;
7
- cursor: pointer;
8
- }
9
- .button-applepay-tap:disabled {
10
- cursor: default;
11
- }
12
- .black {
13
- -apple-pay-button-style: black;
14
- }
15
- .white {
16
- -apple-pay-button-style: white;
17
- }
18
- .whiteOutline {
19
- -apple-pay-button-style: white;
20
- border: solid 1px gray;
21
- }
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { Edges } from '../../@types';
3
- export declare const StyledContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
4
- edges?: Edges | undefined;
5
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
@@ -1,20 +0,0 @@
1
- import { styled } from '@mui/material';
2
- import { Edges } from '../../@types';
3
- export var StyledContainer = styled('section', {
4
- shouldForwardProp: function (prop) { return !['edges'].includes(prop); }
5
- })(function (_a) {
6
- var edges = _a.edges;
7
- return ({
8
- width: '100%',
9
- display: 'flex',
10
- borderRadius: edges === Edges.STRAIGHT ? '0px' : '30px',
11
- overflow: 'hidden',
12
- justifyContent: 'center',
13
- alignItems: 'center',
14
- flexDirection: 'column',
15
- margin: '0 auto',
16
- height: '48px',
17
- maxWidth: '360px',
18
- minWidth: '170px'
19
- });
20
- });
@@ -1,3 +0,0 @@
1
- declare type Status = 'ready' | 'loading' | 'idle' | 'error';
2
- export declare function useScript(src: string, async?: boolean): Status;
3
- export {};