@paypal/checkout-components 5.0.426-alpha-ea5d1e6.0 → 5.0.426

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 (62) hide show
  1. package/dist/button.js +1 -1
  2. package/dist/test/button.js +1 -1
  3. package/package.json +7 -7
  4. package/src/connect/component.jsx +1 -1
  5. package/src/connect/component.test.js +2 -2
  6. package/src/funding/card/config.jsx +3 -3
  7. package/src/funding/card/config.test.jsx +10 -10
  8. package/src/funding/funding.js +6 -6
  9. package/src/funding/funding.test.js +3 -3
  10. package/src/funding/paylater/config.jsx +1 -1
  11. package/src/funding/paypal/template.jsx +8 -8
  12. package/src/funding/util.js +2 -2
  13. package/src/funding/util.test.js +16 -16
  14. package/src/hosted-buttons/index.test.js +9 -9
  15. package/src/hosted-buttons/types.js +3 -3
  16. package/src/hosted-buttons/utils.js +8 -8
  17. package/src/hosted-buttons/utils.test.js +43 -43
  18. package/src/lib/api.js +2 -2
  19. package/src/lib/appSwitchResume.js +1 -1
  20. package/src/lib/perceived-latency-instrumentation.js +1 -1
  21. package/src/lib/security.js +1 -1
  22. package/src/marks/component.jsx +4 -4
  23. package/src/marks/templateRebrand.test.jsx +1 -1
  24. package/src/shopper-insights/shopperSession.js +13 -13
  25. package/src/shopper-insights/shopperSession.test.js +25 -25
  26. package/src/three-domain-secure/api.js +1 -1
  27. package/src/three-domain-secure/api.test.js +4 -4
  28. package/src/three-domain-secure/component.jsx +3 -3
  29. package/src/three-domain-secure/component.test.js +14 -14
  30. package/src/ui/buttons/buttons.jsx +2 -2
  31. package/src/ui/buttons/buttons.test.js +4 -4
  32. package/src/ui/buttons/config.js +1 -1
  33. package/src/ui/buttons/props.bnpl.test.js +1 -1
  34. package/src/ui/buttons/props.js +43 -43
  35. package/src/ui/buttons/props.test.js +8 -8
  36. package/src/ui/buttons/script.jsx +10 -10
  37. package/src/ui/buttons/styles/button.js +2 -2
  38. package/src/ui/buttons/styles/disableMaxHeightConfig.test.js +1 -1
  39. package/src/ui/buttons/styles/labelContainerHeight.test.js +5 -5
  40. package/src/ui/buttons/styles/labels.js +6 -6
  41. package/src/ui/buttons/styles/responsive.js +137 -137
  42. package/src/ui/buttons/styles/styleUtils.js +12 -12
  43. package/src/ui/buttons/styles/styleUtils.test.js +12 -12
  44. package/src/ui/buttons/util.js +4 -4
  45. package/src/ui/overlay/three-domain-secure/overlay.jsx +1 -1
  46. package/src/ui/saved-payment-methods/template.jsx +1 -1
  47. package/src/ui/text/text.jsx +1 -1
  48. package/src/zoid/buttons/component.jsx +13 -13
  49. package/src/zoid/buttons/container.jsx +2 -2
  50. package/src/zoid/buttons/prerender.jsx +3 -3
  51. package/src/zoid/buttons/util.js +10 -10
  52. package/src/zoid/buttons/util.test.js +2 -2
  53. package/src/zoid/card-fields/component.jsx +8 -9
  54. package/src/zoid/card-form/component.js +3 -3
  55. package/src/zoid/checkout/component.jsx +2 -2
  56. package/src/zoid/payment-fields/component.jsx +1 -1
  57. package/src/zoid/qr-code/container.test.jsx +2 -2
  58. package/src/zoid/qr-code/prerender.test.jsx +1 -1
  59. package/src/zoid/saved-payment-methods/component.jsx +8 -8
  60. package/src/zoid/saved-payment-methods/util.js +2 -2
  61. package/src/zoid/saved-payment-methods/util.test.js +14 -14
  62. package/src/zoid/wallet/component.jsx +1 -1
@@ -39,7 +39,7 @@ describe("validateSavedPaymentMethodsStyle", () => {
39
39
  fiTextFontSize: "14px",
40
40
  iconSize: "28px",
41
41
  },
42
- })
42
+ }),
43
43
  ).not.toThrow();
44
44
  });
45
45
 
@@ -47,17 +47,17 @@ describe("validateSavedPaymentMethodsStyle", () => {
47
47
  expect(() =>
48
48
  validateSavedPaymentMethodsStyle({
49
49
  root: { backgroundColor: "transparent" },
50
- })
50
+ }),
51
51
  ).not.toThrow();
52
52
  expect(() =>
53
53
  validateSavedPaymentMethodsStyle({
54
54
  component: { height: "40px" },
55
- })
55
+ }),
56
56
  ).not.toThrow();
57
57
  expect(() =>
58
58
  validateSavedPaymentMethodsStyle({
59
59
  layout: { logo: false },
60
- })
60
+ }),
61
61
  ).not.toThrow();
62
62
  });
63
63
 
@@ -69,49 +69,49 @@ describe("validateSavedPaymentMethodsStyle", () => {
69
69
 
70
70
  it("rejects unknown top-level keys", () => {
71
71
  expect(() => validateSavedPaymentMethodsStyle({ color: "red" })).toThrow(
72
- /Invalid style key: color/
72
+ /Invalid style key: color/,
73
73
  );
74
74
  });
75
75
 
76
76
  it("rejects non-object root", () => {
77
77
  expect(() => validateSavedPaymentMethodsStyle({ root: [] })).toThrow(
78
- /Expected style\.root to be a plain object/
78
+ /Expected style\.root to be a plain object/,
79
79
  );
80
80
  expect(() => validateSavedPaymentMethodsStyle({ root: "x" })).toThrow(
81
- /Expected style\.root to be a plain object/
81
+ /Expected style\.root to be a plain object/,
82
82
  );
83
83
  });
84
84
 
85
85
  it("rejects unknown root keys and non-string root values", () => {
86
86
  expect(() =>
87
- validateSavedPaymentMethodsStyle({ root: { unknown: "a" } })
87
+ validateSavedPaymentMethodsStyle({ root: { unknown: "a" } }),
88
88
  ).toThrow(/Invalid style\.root key: unknown/);
89
89
  expect(() =>
90
- validateSavedPaymentMethodsStyle({ root: { backgroundColor: 1 } })
90
+ validateSavedPaymentMethodsStyle({ root: { backgroundColor: 1 } }),
91
91
  ).toThrow(/Expected style\.root\.backgroundColor to be a string/);
92
92
  });
93
93
 
94
94
  it("rejects unknown component keys and non-string component values", () => {
95
95
  expect(() =>
96
- validateSavedPaymentMethodsStyle({ component: { width: "1" } })
96
+ validateSavedPaymentMethodsStyle({ component: { width: "1" } }),
97
97
  ).toThrow(/Invalid style\.component key: width/);
98
98
  expect(() =>
99
- validateSavedPaymentMethodsStyle({ component: { height: true } })
99
+ validateSavedPaymentMethodsStyle({ component: { height: true } }),
100
100
  ).toThrow(/Expected style\.component\.height to be a string/);
101
101
  });
102
102
 
103
103
  it("rejects unknown layout keys", () => {
104
104
  expect(() =>
105
- validateSavedPaymentMethodsStyle({ layout: { extra: true } })
105
+ validateSavedPaymentMethodsStyle({ layout: { extra: true } }),
106
106
  ).toThrow(/Invalid style\.layout key: extra/);
107
107
  });
108
108
 
109
109
  it("rejects layout fields with wrong types", () => {
110
110
  expect(() =>
111
- validateSavedPaymentMethodsStyle({ layout: { logo: "yes" } })
111
+ validateSavedPaymentMethodsStyle({ layout: { logo: "yes" } }),
112
112
  ).toThrow(/Expected style\.layout\.logo to be a boolean/);
113
113
  expect(() =>
114
- validateSavedPaymentMethodsStyle({ layout: { logoWidth: true } })
114
+ validateSavedPaymentMethodsStyle({ layout: { logoWidth: true } }),
115
115
  ).toThrow(/Expected style\.layout\.logoWidth to be a string/);
116
116
  });
117
117
  });
@@ -235,7 +235,7 @@ export function getWalletComponent(): WalletComponent {
235
235
  type: "function",
236
236
  value: () => {
237
237
  return (
238
- fundingSources: $ReadOnlyArray<$Values<typeof FUNDING>>
238
+ fundingSources: $ReadOnlyArray<$Values<typeof FUNDING>>,
239
239
  ) => {
240
240
  rememberFunding(fundingSources, { cookie: false });
241
241
  };