@zonos/elements 1.3.5-alpha.0 → 1.3.5

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 (146) hide show
  1. package/dist/cjs/{cart-f038cf46.js → cart-c1b0915c.js} +9 -3
  2. package/dist/cjs/index.cjs.js +1 -1
  3. package/dist/cjs/isCheckoutMobile-f491ca7c.js +8 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{submitGtag-42f29b3a.js → submitGtag-bd6e9b42.js} +0 -6
  6. package/dist/cjs/zonos-address_2.cjs.entry.js +23 -3
  7. package/dist/cjs/zonos-button_2.cjs.entry.js +15 -11
  8. package/dist/cjs/zonos-card_2.cjs.entry.js +2 -2
  9. package/dist/cjs/zonos-cart-items_10.cjs.entry.js +20 -19
  10. package/dist/cjs/zonos-checkout.cjs.entry.js +16 -18
  11. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  12. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-country-flag_4.cjs.entry.js +3 -3
  14. package/dist/cjs/zonos-elements.cjs.js +1 -1
  15. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  16. package/dist/cjs/zonos-payment.cjs.entry.js +2 -2
  17. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +5 -1
  18. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +2 -2
  19. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +6 -2
  20. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +9 -12
  21. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +5 -1
  22. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +2 -2
  23. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.css +7 -0
  24. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +5 -1
  25. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +2 -2
  26. package/dist/collection/components/common/zonos-button/zonos-button.css +2 -2
  27. package/dist/collection/components/common/zonos-button/zonos-button.js +13 -9
  28. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +1 -1
  29. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  30. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  31. package/dist/collection/components/common/zonos-spinner/zonos-spinner.css +41 -35
  32. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  33. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  34. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  35. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +2 -2
  36. package/dist/collection/components/main/zonos-controller.js +1 -1
  37. package/dist/collection/components/store/checkout/cart.js +3 -1
  38. package/dist/collection/components/store/checkout/stripe.js +8 -3
  39. package/dist/collection/components/stripe/zonos-address/zonos-address.js +23 -2
  40. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  41. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  42. package/dist/components/cart.js +9 -3
  43. package/dist/components/isCheckoutMobile.js +6 -0
  44. package/dist/components/zonos-address2.js +23 -2
  45. package/dist/components/zonos-button2.js +14 -10
  46. package/dist/components/zonos-checkout-payment2.js +3 -3
  47. package/dist/components/zonos-checkout.js +12 -14
  48. package/dist/components/zonos-component.js +1 -1
  49. package/dist/components/zonos-controller.js +1 -1
  50. package/dist/components/zonos-custom-message2.js +1 -1
  51. package/dist/components/zonos-customer-info2.js +3 -3
  52. package/dist/components/zonos-dialog2.js +3 -3
  53. package/dist/components/zonos-hello-dialog-footer2.js +2 -2
  54. package/dist/components/zonos-hello-dialog2.js +2 -2
  55. package/dist/components/zonos-link-authentication2.js +1 -1
  56. package/dist/components/zonos-logo2.js +2 -2
  57. package/dist/components/zonos-payment2.js +1 -1
  58. package/dist/components/zonos-review2.js +3 -7
  59. package/dist/components/zonos-shipping2.js +3 -3
  60. package/dist/components/zonos-spinner2.js +1 -1
  61. package/dist/components/zonos-v-stack2.js +2 -2
  62. package/dist/esm/{cart-ba9b0d4c.js → cart-7e7c7585.js} +9 -3
  63. package/dist/esm/index.js +1 -1
  64. package/dist/esm/isCheckoutMobile-8846dccb.js +6 -0
  65. package/dist/esm/loader.js +1 -1
  66. package/dist/esm/{submitGtag-a7d07aec.js → submitGtag-776c5e10.js} +1 -6
  67. package/dist/esm/zonos-address_2.entry.js +23 -3
  68. package/dist/esm/zonos-button_2.entry.js +15 -11
  69. package/dist/esm/zonos-card_2.entry.js +2 -2
  70. package/dist/esm/zonos-cart-items_10.entry.js +18 -17
  71. package/dist/esm/zonos-checkout.entry.js +13 -15
  72. package/dist/esm/zonos-component.entry.js +1 -1
  73. package/dist/esm/zonos-controller.entry.js +2 -2
  74. package/dist/esm/zonos-country-flag_4.entry.js +3 -3
  75. package/dist/esm/zonos-elements.js +1 -1
  76. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  77. package/dist/esm/zonos-payment.entry.js +2 -2
  78. package/dist/esm-es5/cart-7e7c7585.js +1 -0
  79. package/dist/esm-es5/index.js +1 -1
  80. package/dist/esm-es5/isCheckoutMobile-8846dccb.js +1 -0
  81. package/dist/esm-es5/loader.js +1 -1
  82. package/dist/esm-es5/submitGtag-776c5e10.js +1 -0
  83. package/dist/esm-es5/zonos-address_2.entry.js +1 -1
  84. package/dist/esm-es5/zonos-button_2.entry.js +1 -1
  85. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  86. package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
  87. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  88. package/dist/esm-es5/zonos-component.entry.js +1 -1
  89. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  90. package/dist/esm-es5/zonos-country-flag_4.entry.js +1 -1
  91. package/dist/esm-es5/zonos-elements.js +1 -1
  92. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  93. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  94. package/dist/scripts/loadZonos.js +1 -1
  95. package/dist/scripts/zonos.js +1 -1
  96. package/dist/scripts/zonosBase.js +1 -1
  97. package/dist/types/components/store/checkout/stripe.d.ts +1 -0
  98. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +4 -0
  99. package/dist/types/components/utils/checkout/isCheckoutMobile.d.ts +1 -1
  100. package/dist/zonos-elements/index.esm.js +1 -1
  101. package/dist/zonos-elements/p-09c5dc1b.system.entry.js +1 -0
  102. package/dist/zonos-elements/p-1156ae5d.system.entry.js +1 -0
  103. package/dist/zonos-elements/{p-7cae86a0.system.entry.js → p-120df5be.system.entry.js} +1 -1
  104. package/dist/zonos-elements/p-174239da.system.js +1 -0
  105. package/dist/zonos-elements/{p-7beaee33.system.entry.js → p-18e09138.system.entry.js} +1 -1
  106. package/dist/zonos-elements/p-2589a038.system.entry.js +1 -0
  107. package/dist/zonos-elements/{p-1165b6e5.entry.js → p-31fa76da.entry.js} +1 -1
  108. package/dist/zonos-elements/{p-afed9236.entry.js → p-3319e4db.entry.js} +1 -1
  109. package/dist/zonos-elements/{p-9f3cad08.entry.js → p-357f0c61.entry.js} +1 -1
  110. package/dist/zonos-elements/{p-59343e23.system.js → p-4d0861e9.system.js} +1 -1
  111. package/dist/zonos-elements/p-54ef8ff3.entry.js +1 -0
  112. package/dist/zonos-elements/{p-eb96f893.system.entry.js → p-626b5a52.system.entry.js} +1 -1
  113. package/dist/zonos-elements/p-6444a4b9.entry.js +1 -0
  114. package/dist/zonos-elements/{p-26edde4d.system.entry.js → p-65f4af1a.system.entry.js} +1 -1
  115. package/dist/zonos-elements/p-661bc488.entry.js +1 -0
  116. package/dist/zonos-elements/p-6c47083f.entry.js +1 -0
  117. package/dist/zonos-elements/p-6d454281.entry.js +1 -0
  118. package/dist/zonos-elements/p-78886ed6.system.entry.js +1 -0
  119. package/dist/zonos-elements/p-81a54668.js +1 -0
  120. package/dist/zonos-elements/{p-5d91e45c.entry.js → p-aca66e4b.entry.js} +1 -1
  121. package/dist/zonos-elements/p-aed0098c.system.js +1 -0
  122. package/dist/zonos-elements/p-af910392.js +1 -0
  123. package/dist/zonos-elements/p-b035f9e5.system.js +1 -1
  124. package/dist/zonos-elements/{p-824ebf9d.entry.js → p-b58d2231.entry.js} +1 -1
  125. package/dist/zonos-elements/p-cfe4a318.js +1 -0
  126. package/dist/zonos-elements/p-e4a2a1b0.system.entry.js +1 -0
  127. package/dist/zonos-elements/p-ead79548.system.js +1 -0
  128. package/dist/zonos-elements/{p-8970e202.system.entry.js → p-eb631432.system.entry.js} +1 -1
  129. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  130. package/package.json +1 -1
  131. package/dist/esm-es5/cart-ba9b0d4c.js +0 -1
  132. package/dist/esm-es5/submitGtag-a7d07aec.js +0 -1
  133. package/dist/zonos-elements/p-12c19be6.system.entry.js +0 -1
  134. package/dist/zonos-elements/p-245997d9.js +0 -1
  135. package/dist/zonos-elements/p-39d12bf0.entry.js +0 -1
  136. package/dist/zonos-elements/p-3d965e88.entry.js +0 -1
  137. package/dist/zonos-elements/p-839f6cd9.entry.js +0 -1
  138. package/dist/zonos-elements/p-83bb8727.system.entry.js +0 -1
  139. package/dist/zonos-elements/p-b87fa3a1.js +0 -1
  140. package/dist/zonos-elements/p-be4bc6bc.entry.js +0 -1
  141. package/dist/zonos-elements/p-c3d75f4f.system.js +0 -1
  142. package/dist/zonos-elements/p-da2387d2.system.entry.js +0 -1
  143. package/dist/zonos-elements/p-dcf1e1b4.system.entry.js +0 -1
  144. package/dist/zonos-elements/p-ee8b44c0.system.js +0 -1
  145. package/dist/zonos-elements/p-efd1544b.system.entry.js +0 -1
  146. package/dist/zonos-elements/p-fdb9568e.entry.js +0 -1
@@ -11,11 +11,11 @@ export class ZonosLogo {
11
11
  const filterColor = this.theme === 'DARK'
12
12
  ? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'
13
13
  : 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';
14
- return (h(Host, { key: '7ddd949ab91ed0c61ee34ce6ee80da54b3ba3664', class: classes(['zonos--elements zonos--logo', this.class]), style: {
14
+ return (h(Host, { key: '25b7723a73f8f8c7a28e8b2730b88f18d4f11fb7', class: classes(['zonos--elements zonos--logo', this.class]), style: {
15
15
  '--filter-color': filterColor,
16
16
  '--font-family': zonosStoreFontFamily(),
17
17
  '--width': this.width,
18
- } }, h("img", { key: '1a8d98f7d836f253a21654c84ab0251969362e2f', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
18
+ } }, h("img", { key: 'e7f15f665c2d3c579e8727f1dceefea0fd438d5d', alt: "Zonos Logo", src: getAssetPath('./assets/ZonosLogo.png') })));
19
19
  }
20
20
  static get is() { return "zonos-logo"; }
21
21
  static get encapsulation() { return "shadow"; }
@@ -47,62 +47,68 @@
47
47
  :host circle.track {
48
48
  stroke: var(--amino-gray-200);
49
49
  }
50
- :host.black {
50
+ @keyframes rotate {
51
+ 100% {
52
+ transform: rotate(360deg);
53
+ }
54
+ }
55
+ @keyframes dash {
56
+ 0% {
57
+ stroke-dasharray: 1, 150;
58
+ stroke-dashoffset: 0;
59
+ }
60
+ 50% {
61
+ stroke-dasharray: 90, 150;
62
+ stroke-dashoffset: -35;
63
+ }
64
+ 100% {
65
+ stroke-dasharray: 90, 150;
66
+ stroke-dashoffset: -124;
67
+ }
68
+ }
69
+ :host circle:not(.track) {
70
+ stroke-linecap: round;
71
+ animation: dash 1.5s ease-in-out infinite;
72
+ }
73
+
74
+ :host(.black) circle {
51
75
  stroke: var(--amino-spinner-stroke-black);
52
76
  }
53
- :host.black circle.track {
77
+ :host(.black) circle.track {
54
78
  stroke: var(--amino-spinner-track-black);
55
79
  }
56
- :host.white {
80
+
81
+ :host(.white) circle {
57
82
  stroke: var(--amino-spinner-stroke-white);
58
83
  }
59
- :host.white circle.track {
84
+ :host(.white) circle.track {
60
85
  stroke: var(--amino-spinner-track-white);
61
86
  }
62
- :host.info {
87
+
88
+ :host(.info) circle {
63
89
  stroke: var(--amino-blue-600);
64
90
  }
65
- :host.info circle.track {
91
+ :host(.info) circle.track {
66
92
  stroke: var(--amino-blue-100);
67
93
  }
68
- :host.success {
94
+
95
+ :host(.success) circle {
69
96
  stroke: var(--amino-green-600);
70
97
  }
71
- :host.success circle.track {
98
+ :host(.success) circle.track {
72
99
  stroke: var(--amino-green-100);
73
100
  }
74
- :host.danger {
101
+
102
+ :host(.danger) circle {
75
103
  stroke: var(--amino-red-600);
76
104
  }
77
- :host.danger circle.track {
105
+ :host(.danger) circle.track {
78
106
  stroke: var(--amino-red-100);
79
107
  }
80
- :host.warning {
108
+
109
+ :host(.warning) circle {
81
110
  stroke: var(--amino-orange-600);
82
111
  }
83
- :host.warning circle.track {
112
+ :host(.warning) circle.track {
84
113
  stroke: var(--amino-orange-100);
85
- }
86
- @keyframes rotate {
87
- 100% {
88
- transform: rotate(360deg);
89
- }
90
- }
91
- @keyframes dash {
92
- 0% {
93
- stroke-dasharray: 1, 150;
94
- stroke-dashoffset: 0;
95
- }
96
- 50% {
97
- stroke-dasharray: 90, 150;
98
- stroke-dashoffset: -35;
99
- }
100
- 100% {
101
- stroke-dasharray: 90, 150;
102
- stroke-dashoffset: -124;
103
- }
104
- }
105
- :host circle:not(.track) {
106
- stroke-linecap: round;
107
- animation: dash 1.5s ease-in-out infinite;
108
114
  }
@@ -8,9 +8,9 @@ export class VStack {
8
8
  this.class = '';
9
9
  }
10
10
  render() {
11
- return (h(Host, { key: 'd363ffeb2bbae49e7318b26ab56b4b8871844daf', style: {
11
+ return (h(Host, { key: '2bd82aba32704cc02da767522c39853c6e223297', style: {
12
12
  '--font-family': zonosStoreFontFamily(),
13
- } }, h("div", { key: '5d9fa5ae9ffca787ca42f38e4ec75fedc24823f9', class: classes(['vstack', this.class]), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: 'e1d6fef3378b92c18c2c43ec8616e8c733a4290c' }))));
13
+ } }, h("div", { key: '22afa237aa1ac8a5ab61adcfa7a0ccabad316b28', class: classes(['vstack', this.class]), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: '5f2645af6b1f4178cb87248e03e9bb3d1c8201ee' }))));
14
14
  }
15
15
  static get is() { return "zonos-v-stack"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -10,7 +10,7 @@ export class ZonosComponent {
10
10
  return format(this.first, this.middle, this.last);
11
11
  }
12
12
  render() {
13
- return h("div", { key: '8862bb59447d2b9ecf98f19a641b86ded55e72b8' }, "Hello, World! I'm ", this.getText());
13
+ return h("div", { key: 'a61bec010f8c7a8b9979d4c5ec4a84153b780a7e' }, "Hello, World! I'm ", this.getText());
14
14
  }
15
15
  static get is() { return "zonos-component"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -14,9 +14,9 @@ export class ZonosHelloDialogFooter {
14
14
  var _a, _b;
15
15
  const primaryColor = (_a = this.appearanceSettings) === null || _a === void 0 ? void 0 : _a.colorPrimary;
16
16
  const footerTheme = primaryColor && isDarkColor(primaryColor) ? 'DARK' : 'LIGHT';
17
- return (h(Host, { key: '2a67210015d9880acddd72578337243a7f2175e5', class: "zonos--elements" }, h("div", { key: 'b025a2fbbd5f6f2a5addce5d6bba1e6ce720b205', class: "zonos--hello-dialog-footer", "data-theme": footerTheme, style: {
17
+ return (h(Host, { key: '724259a8adaa1cb5c760f36b14be99c55d6c29e2', class: "zonos--elements" }, h("div", { key: 'cb27d219f7a0f948a939b221143c3f0f252b0eeb', class: "zonos--hello-dialog-footer", "data-theme": footerTheme, style: {
18
18
  '--primary-color': (_b = this.appearanceSettings) === null || _b === void 0 ? void 0 : _b.colorPrimary,
19
- } }, h("a", { key: '7595e99d4849a19b0337181defa88d074a4407fc', href: "https://zonos.com", target: "_blank" }, h("zonos-icon", { key: '0fa6457c3343170ad144d1b4c02793b62a49efd6', autoHeight: true, color: "gray-1200", content: ZonosIcon, size: 108 })), h("zonos-button", { key: '5fcee8b5e43f239883caa2e3f6f155641674d37e', icon: h("zonos-icon", { color: "gray-700", content: ChevronDownIcon }), iconRight: true, onClick: () => this.setShowCountrySelect(true), variant: "outline" }, localizationStore.selectedCountryCode))));
19
+ } }, h("a", { key: 'd04f060e7db6e2c964dc2c4252dbbc7b69fba7db', href: "https://zonos.com", target: "_blank" }, h("zonos-icon", { key: 'ed138c417f139f84a5466a4228925e2aa908cd12', autoHeight: true, color: "gray-1200", content: ZonosIcon, size: 108 })), h("zonos-button", { key: '07b300a1950adfaf154c173a49cec722df74172c', icon: h("zonos-icon", { color: "gray-700", content: ChevronDownIcon }), iconRight: true, onClick: () => this.setShowCountrySelect(true), variant: "outline" }, localizationStore.selectedCountryCode))));
20
20
  }
21
21
  static get is() { return "zonos-hello-dialog-footer"; }
22
22
  static get encapsulation() { return "shadow"; }
@@ -90,14 +90,14 @@ export class ZonosHelloDialog {
90
90
  translate('Know about duties and taxes before you buy. Shop with confidence!');
91
91
  const currentPage = this.getCurrentPageEnum();
92
92
  const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
93
- return (h(Host, { key: '09c2e005a701cf41134f1613c1bbf7214782b24c', class: "zonos--elements" }, h("div", { key: 'ad9675ef097ea4b21bbdb99b5f30d64c45c744e5', "aria-hidden": "true", class: classes([
93
+ return (h(Host, { key: '56fcc25e2fabf8c2f1edf727a64d213f18729c00', class: "zonos--elements" }, h("div", { key: 'c83e357cd266c605015e136eb23906bd4385e7f5', "aria-hidden": "true", class: classes([
94
94
  'zonos--hello-dialog',
95
95
  animateLeft && 'zonos--hello-dialog-animate-from-left',
96
96
  animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
97
97
  !!this.mobileLocationOverride &&
98
98
  'zonos--hello-dialog-mobile-override',
99
99
  this.isOpen && 'zonos--hello-dialog-open',
100
- ]), ref: el => el && (this.dialogRef = el) }, h("div", { key: '54f5da38c7ff31b3d848a83ca87b4514cf51de20', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '31b30feb4e314c23932aa433f6a3d9564f28a56d', class: "zonos--close-button", icon: h("zonos-icon", { content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), this.showCountrySelect ? (h("div", null, h("zonos-country-select", { closeCountrySelect: () => this.setShowCountrySelect(false) }))) : (h("div", null, h("zonos-v-stack", { spacing: 24 }, h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { type: "boldSubheader" }, welcomeMessage), h("zonos-text", { color: "gray-800" }, defaultMessage)), h("zonos-v-stack", { spacing: 8 }, this.restrictedItems.map(item => {
100
+ ]), ref: el => el && (this.dialogRef = el) }, h("div", { key: '8d5811f45f2cfe8bd1c0ca3131d99ebc69b7b00d', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '137ea59ae312bee3817292dde42e2e718e70001b', class: "zonos--close-button", icon: h("zonos-icon", { content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), this.showCountrySelect ? (h("div", null, h("zonos-country-select", { closeCountrySelect: () => this.setShowCountrySelect(false) }))) : (h("div", null, h("zonos-v-stack", { spacing: 24 }, h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { type: "boldSubheader" }, welcomeMessage), h("zonos-text", { color: "gray-800" }, defaultMessage)), h("zonos-v-stack", { spacing: 8 }, this.restrictedItems.map(item => {
101
101
  var _a;
102
102
  return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { color: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
103
103
  }), h("zonos-card", { spacing: "12px" }, h("zonos-v-stack", { spacing: 12 }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { content: BagIcon }), h("zonos-text", null, dutyDeMinimisMessage)), h("div", { class: "zonos--flex-message" }, h("zonos-icon", { content: MoneyIcon }), h("zonos-text", null, taxDeMinimisMessage)))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))))), !this.showCountrySelect && (h("zonos-hello-dialog-footer", { appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value) })))));
@@ -153,7 +153,7 @@ export class ZonosController {
153
153
  zonosStore.organizationName = organizationName;
154
154
  }
155
155
  render() {
156
- return h(Host, { key: 'a94fb7ff23c45a9813ce5da857cda14c8455ff79', class: "zonos--elements" });
156
+ return h(Host, { key: 'ff6eb2466864a217c485484d381e6f2531631e49', class: "zonos--elements" });
157
157
  }
158
158
  static get is() { return "zonos-controller"; }
159
159
  static get encapsulation() { return "shadow"; }
@@ -1,5 +1,5 @@
1
1
  import { createStore } from "@stencil/store";
2
- import { stripeStore, stripeStoreUpdateCheckoutSession, } from "./stripe";
2
+ import { stripeStore, stripeStoreReset, stripeStoreUpdateCheckoutSession, } from "./stripe";
3
3
  import { localizationStore } from "../hello/localization";
4
4
  import { translate } from "../translationStore";
5
5
  import { formatDate } from "../../utils/formatDate";
@@ -57,6 +57,8 @@ const cartStoreReset = () => {
57
57
  reset();
58
58
  };
59
59
  const cartStoreUpdateToErrorState = ({ messages, title, }) => {
60
+ cartStoreReset();
61
+ stripeStoreReset();
60
62
  cartStore.step = 'error';
61
63
  cartStore.error = {
62
64
  messages,
@@ -28,8 +28,9 @@ const { onChange, reset, state: stripeStore, } = createStore(() => ({
28
28
  stripePaymentElement: null,
29
29
  stripePaymentEventData: null,
30
30
  }));
31
- const getStripeOptions = ({ clientSecret, overrideBorderRaidus, overridePrimaryColor, overrideTheme, }) => {
31
+ const getStripeOptions = ({ clientSecret, overrideBorderRaidus, overridePrimaryColor, overrideSecondaryColor, overrideTheme, }) => {
32
32
  const primaryColor = overridePrimaryColor || zonosStore.appearance.colorPrimary;
33
+ const secondaryColor = overrideSecondaryColor || zonosStore.appearance.colorSecondary;
33
34
  const themeBasedColor = primaryColor && isDarkColor(primaryColor) ? 'night' : 'flat';
34
35
  // if overrideTheme is provided, use it. Otherwise, use theme based on primary color
35
36
  const theme = overrideTheme === 'DARK' ? 'night' : 'flat';
@@ -39,10 +40,13 @@ const getStripeOptions = ({ clientSecret, overrideBorderRaidus, overridePrimaryC
39
40
  rules: Object.assign({}, addressRuleStyle({ theme: 'LIGHT' })),
40
41
  // get contrast theme color base on primary color
41
42
  theme: overrideTheme ? theme : themeBasedColor,
42
- variables: Object.assign({}, defaultVariable({
43
+ variables: Object.assign(Object.assign({}, defaultVariable({
43
44
  borderStyle: overrideBorderRaidus,
44
45
  theme: 'LIGHT',
45
- })),
46
+ })), {
47
+ // use the button background color for input glow color
48
+ colorPrimary: secondaryColor
49
+ }),
46
50
  },
47
51
  clientSecret,
48
52
  locale: localizationStore.selectedLocale,
@@ -60,6 +64,7 @@ const initStripeElements = async (props) => {
60
64
  clientSecret,
61
65
  overrideBorderRaidus: props === null || props === void 0 ? void 0 : props.overrideBorderRaidus,
62
66
  overridePrimaryColor: props === null || props === void 0 ? void 0 : props.overridePrimaryColor,
67
+ overrideSecondaryColor: props === null || props === void 0 ? void 0 : props.overrideSecondaryColor,
63
68
  overrideTheme: props === null || props === void 0 ? void 0 : props.overrideTheme,
64
69
  });
65
70
  // compare with the previous options to see if we need to update
@@ -2,6 +2,7 @@
2
2
  import { h, Host } from "@stencil/core";
3
3
  import { stripeStore, stripeStorePrefetchLandedCost, } from "../../store/checkout/stripe";
4
4
  import { localizationStore } from "../../store/hello/localization";
5
+ import { isCheckoutMobile } from "../../utils/checkout/isCheckoutMobile";
5
6
  import { logError } from "../../utils/logging/logError";
6
7
  /**
7
8
  * This component is a wrapper for the stripe address element that would render default style object
@@ -12,6 +13,8 @@ export class ZonosAddress {
12
13
  this.titleText = undefined;
13
14
  this.defaultAddress = null;
14
15
  this.stripe = window.Zonos.stripe;
16
+ this.isDirtyAddress = !!stripeStore.stripeAddressEventData &&
17
+ stripeStore.stripeAddressEventData.value.address.line1.length > 0;
15
18
  }
16
19
  async watchInitStripe() {
17
20
  var _a, _b, _c, _d, _e, _f, _g;
@@ -59,6 +62,23 @@ export class ZonosAddress {
59
62
  addressElement.mount(this.el.querySelector('.zonos--address-component'));
60
63
  addressElement.on('change', event => {
61
64
  const eventValue = event.value;
65
+ if (!this.isDirtyAddress && eventValue.address.line1.length >= 3) {
66
+ this.isDirtyAddress = true;
67
+ // stripe element started with just address line 1, so scroll bar is not yet available. Wait for a moment before scrolling
68
+ setTimeout(() => {
69
+ // scroll directly into view if it's mobile
70
+ if (isCheckoutMobile()) {
71
+ this.el.scrollIntoView({ behavior: 'smooth', block: 'end' });
72
+ }
73
+ else {
74
+ // scroll into the end of the page so the address placeholder won't be hidden
75
+ const yOffset = 100;
76
+ const parentWrapper = this.el.closest('.zonos--group');
77
+ const y = this.el.getBoundingClientRect().top + yOffset;
78
+ parentWrapper === null || parentWrapper === void 0 ? void 0 : parentWrapper.scrollTo({ behavior: 'smooth', top: y });
79
+ }
80
+ }, 400);
81
+ }
62
82
  stripeStore.stripeAddressEventData = Object.assign(Object.assign({}, event), { elementMode: 'shipping', elementType: 'address', empty: false, value: Object.assign(Object.assign({}, eventValue), { firstName: eventValue.firstName || eventValue.name.split(' ')[0], lastName: eventValue.lastName || eventValue.name.split(' ').pop() }) });
63
83
  // run prefetch landed cost when address is changed
64
84
  void stripeStorePrefetchLandedCost();
@@ -76,7 +96,7 @@ export class ZonosAddress {
76
96
  }
77
97
  render() {
78
98
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
79
- return (h(Host, { key: 'f376a81e62581bff4ac25d53f11c8e53408f9e7e', class: "zonos--address zonos--elements" }, h("zonos-text", { key: 'bdc1a8b7414cae0e79c90e0685700590cd920468', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'fe384f4c0e508a9f8ddff8fa579c504c3f18e7bb', class: "zonos--address-component" })));
99
+ return (h(Host, { key: '41014c1af1c8f8f5bb37caf358a6cec124e66f30', class: "zonos--address zonos--elements" }, h("zonos-text", { key: '5d8dcc4b44f7fe7b089b630ec6ca7b2177fef371', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'da0fe9760d7ca8dbc089481ac1dcb7c0a7c6553f', class: "zonos--address-component" })));
80
100
  }
81
101
  static get is() { return "zonos-address"; }
82
102
  static get encapsulation() { return "scoped"; }
@@ -152,7 +172,8 @@ export class ZonosAddress {
152
172
  }
153
173
  static get states() {
154
174
  return {
155
- "stripe": {}
175
+ "stripe": {},
176
+ "isDirtyAddress": {}
156
177
  };
157
178
  }
158
179
  static get elementRef() { return "el"; }
@@ -36,7 +36,7 @@ export class ZonosLinkAuthentication {
36
36
  }
37
37
  render() {
38
38
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
39
- return (h(Host, { key: '48ec92ca8a1500c3b8e85222c3df069c32074e72', class: "zonos--link-authentication zonos--elements" }, h("zonos-text", { key: '9060fab8ab9f88157ee6951af830e106e6ff9509', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'dac7e96170d15faa8c1013fb298ae86e2ce99f0b', class: "zonos--link-authentication-component" })));
39
+ return (h(Host, { key: '5d02895b441a5713b83e7b3c4b784ab4b6743f54', class: "zonos--link-authentication zonos--elements" }, h("zonos-text", { key: '5bd33edd16f1511111bfcb497e0767f938172b05', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'd5a90ce88adaed9f2369af4692506d5d072c021d', class: "zonos--link-authentication-component" })));
40
40
  }
41
41
  static get is() { return "zonos-link-authentication"; }
42
42
  static get encapsulation() { return "scoped"; }
@@ -37,7 +37,7 @@ export class ZonosPayment {
37
37
  }
38
38
  render() {
39
39
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
40
- return (h(Host, { key: '8a674f72e9235f9b6afcc8d8e0374639423e0bb3', class: "zonos--payment zonos--elements" }, this.titleText && (h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("div", { key: '94a0a064e6f6d8058bc11d114ecc4c3ab495e802', class: "zonos--payment-component" })));
40
+ return (h(Host, { key: '365e346a6cda504bdbc825ff8e25b7492bf1d19b', class: "zonos--payment zonos--elements" }, this.titleText && (h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("div", { key: 'f76c3b4ef941ecc8cb99ac3593b9d902eda5b1e7', class: "zonos--payment-component" })));
41
41
  }
42
42
  static get is() { return "zonos-payment"; }
43
43
  static get encapsulation() { return "scoped"; }
@@ -130,8 +130,9 @@ const { onChange: onChange$1, reset: reset$1, state: stripeStore, } = createStor
130
130
  stripePaymentElement: null,
131
131
  stripePaymentEventData: null,
132
132
  }));
133
- const getStripeOptions = ({ clientSecret, overrideBorderRaidus, overridePrimaryColor, overrideTheme, }) => {
133
+ const getStripeOptions = ({ clientSecret, overrideBorderRaidus, overridePrimaryColor, overrideSecondaryColor, overrideTheme, }) => {
134
134
  const primaryColor = overridePrimaryColor || zonosStore.appearance.colorPrimary;
135
+ const secondaryColor = overrideSecondaryColor || zonosStore.appearance.colorSecondary;
135
136
  const themeBasedColor = primaryColor && isDarkColor(primaryColor) ? 'night' : 'flat';
136
137
  // if overrideTheme is provided, use it. Otherwise, use theme based on primary color
137
138
  const theme = overrideTheme === 'DARK' ? 'night' : 'flat';
@@ -141,10 +142,12 @@ const getStripeOptions = ({ clientSecret, overrideBorderRaidus, overridePrimaryC
141
142
  rules: Object.assign({}, addressRuleStyle({ theme: 'LIGHT' })),
142
143
  // get contrast theme color base on primary color
143
144
  theme: overrideTheme ? theme : themeBasedColor,
144
- variables: Object.assign({}, defaultVariable({
145
+ variables: Object.assign(Object.assign({}, defaultVariable({
145
146
  borderStyle: overrideBorderRaidus,
146
147
  theme: 'LIGHT',
147
- })),
148
+ })), {
149
+ // use the button background color for input glow color
150
+ colorPrimary: secondaryColor }),
148
151
  },
149
152
  clientSecret,
150
153
  locale: localizationStore.selectedLocale,
@@ -162,6 +165,7 @@ const initStripeElements = async (props) => {
162
165
  clientSecret,
163
166
  overrideBorderRaidus: props === null || props === void 0 ? void 0 : props.overrideBorderRaidus,
164
167
  overridePrimaryColor: props === null || props === void 0 ? void 0 : props.overridePrimaryColor,
168
+ overrideSecondaryColor: props === null || props === void 0 ? void 0 : props.overrideSecondaryColor,
165
169
  overrideTheme: props === null || props === void 0 ? void 0 : props.overrideTheme,
166
170
  });
167
171
  // compare with the previous options to see if we need to update
@@ -484,6 +488,8 @@ const cartStoreReset = () => {
484
488
  reset();
485
489
  };
486
490
  const cartStoreUpdateToErrorState = ({ messages, title, }) => {
491
+ cartStoreReset();
492
+ stripeStoreReset();
487
493
  cartStore.step = 'error';
488
494
  cartStore.error = {
489
495
  messages,
@@ -0,0 +1,6 @@
1
+ const checkoutBreakpoint = 890;
2
+ const isCheckoutMobile = (isMobile) => {
3
+ return isMobile || window.innerWidth < checkoutBreakpoint;
4
+ };
5
+
6
+ export { isCheckoutMobile as i };
@@ -1,6 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { s as stripeStore, k as stripeStorePrefetchLandedCost } from './cart.js';
3
3
  import { l as logError, b as localizationStore } from './localization.js';
4
+ import { i as isCheckoutMobile } from './isCheckoutMobile.js';
4
5
  import { d as defineCustomElement$1 } from './zonos-text2.js';
5
6
 
6
7
  const zonosAddressCss = ".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:var(--amino-space-16)}";
@@ -14,6 +15,8 @@ const ZonosAddress = /*@__PURE__*/ proxyCustomElement(class ZonosAddress extends
14
15
  this.titleText = undefined;
15
16
  this.defaultAddress = null;
16
17
  this.stripe = window.Zonos.stripe;
18
+ this.isDirtyAddress = !!stripeStore.stripeAddressEventData &&
19
+ stripeStore.stripeAddressEventData.value.address.line1.length > 0;
17
20
  }
18
21
  async watchInitStripe() {
19
22
  var _a, _b, _c, _d, _e, _f, _g;
@@ -61,6 +64,23 @@ const ZonosAddress = /*@__PURE__*/ proxyCustomElement(class ZonosAddress extends
61
64
  addressElement.mount(this.el.querySelector('.zonos--address-component'));
62
65
  addressElement.on('change', event => {
63
66
  const eventValue = event.value;
67
+ if (!this.isDirtyAddress && eventValue.address.line1.length >= 3) {
68
+ this.isDirtyAddress = true;
69
+ // stripe element started with just address line 1, so scroll bar is not yet available. Wait for a moment before scrolling
70
+ setTimeout(() => {
71
+ // scroll directly into view if it's mobile
72
+ if (isCheckoutMobile()) {
73
+ this.el.scrollIntoView({ behavior: 'smooth', block: 'end' });
74
+ }
75
+ else {
76
+ // scroll into the end of the page so the address placeholder won't be hidden
77
+ const yOffset = 100;
78
+ const parentWrapper = this.el.closest('.zonos--group');
79
+ const y = this.el.getBoundingClientRect().top + yOffset;
80
+ parentWrapper === null || parentWrapper === void 0 ? void 0 : parentWrapper.scrollTo({ behavior: 'smooth', top: y });
81
+ }
82
+ }, 400);
83
+ }
64
84
  stripeStore.stripeAddressEventData = Object.assign(Object.assign({}, event), { elementMode: 'shipping', elementType: 'address', empty: false, value: Object.assign(Object.assign({}, eventValue), { firstName: eventValue.firstName || eventValue.name.split(' ')[0], lastName: eventValue.lastName || eventValue.name.split(' ').pop() }) });
65
85
  // run prefetch landed cost when address is changed
66
86
  void stripeStorePrefetchLandedCost();
@@ -78,7 +98,7 @@ const ZonosAddress = /*@__PURE__*/ proxyCustomElement(class ZonosAddress extends
78
98
  }
79
99
  render() {
80
100
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
81
- return (h(Host, { key: 'f376a81e62581bff4ac25d53f11c8e53408f9e7e', class: "zonos--address zonos--elements" }, h("zonos-text", { key: 'bdc1a8b7414cae0e79c90e0685700590cd920468', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'fe384f4c0e508a9f8ddff8fa579c504c3f18e7bb', class: "zonos--address-component" })));
101
+ return (h(Host, { key: '41014c1af1c8f8f5bb37caf358a6cec124e66f30', class: "zonos--address zonos--elements" }, h("zonos-text", { key: '5d8dcc4b44f7fe7b089b630ec6ca7b2177fef371', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'da0fe9760d7ca8dbc089481ac1dcb7c0a7c6553f', class: "zonos--address-component" })));
82
102
  }
83
103
  get el() { return this; }
84
104
  static get watchers() { return {
@@ -89,7 +109,8 @@ const ZonosAddress = /*@__PURE__*/ proxyCustomElement(class ZonosAddress extends
89
109
  "type": [1],
90
110
  "titleText": [1, "title-text"],
91
111
  "defaultAddress": [16],
92
- "stripe": [32]
112
+ "stripe": [32],
113
+ "isDirtyAddress": [32]
93
114
  }, undefined, {
94
115
  "stripe": ["watchInitStripe"]
95
116
  }]);
@@ -20,7 +20,7 @@ const getButtonTheme = (overrideBackground) => {
20
20
  return buttonTheme;
21
21
  };
22
22
 
23
- const zonosButtonCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--amino-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--amino-radius-10);gap:var(--amino-space-8)}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--amino-surface-color);border:none;outline:1px solid var(--amino-surface-color);border-radius:var(--border-radius, var(--amino-radius-10));-webkit-transition:var(--amino-transition);transition:var(--amino-transition);font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:var(--amino-space-8) var(--amino-space-24);color:var(--color, var(--amino-gray-1200));}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--amino-gray-200)}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-200)}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button.sm{height:var(--amino-size-sm);line-height:var(--amino-size-sm);padding:var(--amino-space-4) var(--amino-space-8)}:host button.sm:not(.has-content).has-icon{padding:0 var(--amino-space-4)}:host button.md{height:var(--amino-size-md);line-height:var(--amino-size-md);padding:var(--amino-space-8) var(--amino-space-16)}:host button.md:not(.has-content).has-icon{padding:0 var(--amino-space-8)}:host button.lg{height:var(--amino-size-lg);line-height:var(--amino-size-lg);padding:var(--amino-space-12) var(--amino-space-24)}:host button.lg:not(.has-content).has-icon{padding:0 var(--amino-space-16)}:host button:not(.only-icon).has-icon{gap:var(--amino-space-8)}:host button.override-background{background-color:var(--background-color, var(--amino-gray-0));color:var(--color, var(--amino-gray-1200));outline:1px solid var(--background-color, var(--amino-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--amino-blue-600);outline:1px solid var(--amino-blue-600);color:var(--amino-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--amino-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--amino-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--amino-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--amino-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--amino-blue-600)}:host button:not(.override-background).success{background:var(--amino-green-600);outline:1px solid var(--amino-green-600);color:var(--amino-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--amino-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--amino-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--amino-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--amino-green-400)}:host button:not(.override-background).danger{background:var(--amino-red-600);outline:1px solid var(--amino-red-600);color:var(--amino-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--amino-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--amino-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--amino-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--amino-red-400)}:host button:not(.override-background).warning{background:var(--amino-orange-600);outline:1px solid var(--amino-orange-600);color:var(--amino-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--amino-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--amino-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--amino-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--amino-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--color)}:host button:not(.override-background).subtle:not([disabled]):hover{background:var(--amino-gray-100)}:host button:not(.override-background).subtle:not([disabled]):active{background:var(--amino-gray-200)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--amino-button-focus-ring);box-shadow:var(--amino-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--amino-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--amino-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--amino-gray-200)}";
23
+ const zonosButtonCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--amino-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--amino-radius-10);gap:var(--amino-space-8)}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--amino-surface-color);border:none;outline:1px solid var(--amino-surface-color);border-radius:var(--border-radius, var(--amino-radius-10));-webkit-transition:var(--amino-transition);transition:var(--amino-transition);font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:var(--amino-space-8) var(--amino-space-24);color:var(--color, var(--amino-gray-1200));}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--background-color, var(--amino-gray-200))}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--background-color, var(--amino-gray-200))}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button.sm{height:var(--amino-size-sm);line-height:var(--amino-size-sm);padding:var(--amino-space-4) var(--amino-space-8)}:host button.sm:not(.has-content).has-icon{padding:0 var(--amino-space-4)}:host button.md{height:var(--amino-size-md);line-height:var(--amino-size-md);padding:var(--amino-space-8) var(--amino-space-16)}:host button.md:not(.has-content).has-icon{padding:0 var(--amino-space-8)}:host button.lg{height:var(--amino-size-lg);line-height:var(--amino-size-lg);padding:var(--amino-space-12) var(--amino-space-24)}:host button.lg:not(.has-content).has-icon{padding:0 var(--amino-space-16)}:host button:not(.only-icon).has-icon{gap:var(--amino-space-8)}:host button.override-background{background-color:var(--background-color, var(--amino-gray-0));color:var(--color, var(--amino-gray-1200));outline:1px solid var(--background-color, var(--amino-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--amino-blue-600);outline:1px solid var(--amino-blue-600);color:var(--amino-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--amino-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--amino-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--amino-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--amino-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--amino-blue-600)}:host button:not(.override-background).success{background:var(--amino-green-600);outline:1px solid var(--amino-green-600);color:var(--amino-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--amino-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--amino-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--amino-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--amino-green-400)}:host button:not(.override-background).danger{background:var(--amino-red-600);outline:1px solid var(--amino-red-600);color:var(--amino-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--amino-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--amino-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--amino-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--amino-red-400)}:host button:not(.override-background).warning{background:var(--amino-orange-600);outline:1px solid var(--amino-orange-600);color:var(--amino-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--amino-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--amino-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--amino-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--amino-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--color)}:host button:not(.override-background).subtle:not([disabled]):hover{background:var(--amino-gray-100)}:host button:not(.override-background).subtle:not([disabled]):active{background:var(--amino-gray-200)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--amino-button-focus-ring);box-shadow:var(--amino-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--amino-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--amino-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--amino-gray-200)}";
24
24
  const ZonosButtonStyle0 = zonosButtonCss;
25
25
 
26
26
  const ZonosButton = /*@__PURE__*/ proxyCustomElement(class ZonosButton extends HTMLElement {
@@ -68,35 +68,39 @@ const ZonosButton = /*@__PURE__*/ proxyCustomElement(class ZonosButton extends H
68
68
  }
69
69
  render() {
70
70
  const disabled = this.loading || this.isDisabled;
71
+ /**
72
+ * If the parent component pass in the variant prop with `undefined` value, it would not re-assign the `undefined` value with the default value.
73
+ * So need to re-assign the variant prop with the default value if the value is `undefined` here.
74
+ */
75
+ const variant = this.variant || 'standard';
71
76
  const color = this.color && isColorVariable(this.color)
72
77
  ? `var(--amino-${this.color})`
73
78
  : this.color;
74
79
  // use override background if it exists, otherwise use color from setting
75
80
  const overrideBackground = this.backgroundColor || zonosStore.appearance.colorSecondary;
76
81
  // only set theme for button to change text color if variant is standard and override background is set
77
- const buttonTheme = this.variant === 'standard'
78
- ? getButtonTheme(overrideBackground)
79
- : undefined;
82
+ const buttonTheme = variant === 'standard' ? getButtonTheme(overrideBackground) : undefined;
80
83
  const borderStyle = getBorderRadius(this.borderStyle);
81
- return (h(Host, { key: 'af41b1035e5ea776d47580647a65997bb41730e3', class: classes(['zonos--elements', this.class]), "data-theme": this.theme || buttonTheme, disabled: disabled, style: {
84
+ const spinnerColor = buttonTheme === 'LIGHT' ? 'white' : 'black';
85
+ return (h(Host, { key: 'e1ad2eb31ad09c8671debc2e32d83af21085b912', class: classes(['zonos--elements', this.class]), "data-theme": this.theme || buttonTheme, disabled: disabled, style: {
82
86
  '--background-color': overrideBackground,
83
87
  '--border-radius': borderStyle,
84
88
  '--color': color,
85
89
  '--font-family': zonosStoreFontFamily(),
86
- } }, h("button", { key: 'af3fdc9aa0440cf5a7e49c4c0c76826d7a700d32', class: classes([
90
+ } }, h("button", { key: '0a087bf98251899711a71d69a89473479fc78c4f', class: classes([
87
91
  this.hasIcon && 'has-icon',
88
92
  this.hasContent && 'has-content',
89
93
  this.noBackground && 'no-background',
90
94
  this.noPaddingLeft && 'no-padding-left',
91
95
  this.noPaddingRight && 'no-padding-right',
92
96
  this.iconRight && 'icon-right',
93
- this.variant,
97
+ variant,
94
98
  this.size,
95
99
  // only override background if variant is set to standard
96
- this.backgroundColor &&
97
- this.variant === 'standard' &&
100
+ overrideBackground &&
101
+ variant === 'standard' &&
98
102
  'override-background',
99
- ]), disabled: disabled }, this.loading && (h("div", { class: "zonos--spinner-wrapper" }, h("zonos-spinner", { size: 16 }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: '32b6a079ba98ab9d62b5df34ddc15e4ac7a87a8e', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
103
+ ]), disabled: disabled }, this.loading && (h("div", { class: "zonos--spinner-wrapper" }, h("zonos-spinner", { color: spinnerColor, size: 16 }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: 'd80e58786f16bff52592a759679290a3a5ed0954', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
100
104
  }
101
105
  static get watchers() { return {
102
106
  "icon": ["iconChangeHandler"]
@@ -9,7 +9,7 @@ import { d as defineCustomElement$3 } from './zonos-payment2.js';
9
9
  import { d as defineCustomElement$2 } from './zonos-spinner2.js';
10
10
  import { d as defineCustomElement$1 } from './zonos-text2.js';
11
11
 
12
- const zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:calc(100% - 10px)}";
12
+ const zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}";
13
13
  const ZonosCheckoutPaymentStyle0 = zonosCheckoutPaymentCss;
14
14
 
15
15
  const ZonosCheckoutPayment = /*@__PURE__*/ proxyCustomElement(class ZonosCheckoutPayment extends HTMLElement {
@@ -41,12 +41,12 @@ const ZonosCheckoutPayment = /*@__PURE__*/ proxyCustomElement(class ZonosCheckou
41
41
  return null;
42
42
  }
43
43
  this.disabled = !((_a = stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.complete);
44
- return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), this.paymentError && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, translate("We couldn't complete your payment. Please verify the payment details and try again."))), h("zonos-payment", null)), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, "is-disabled": this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
44
+ return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), this.paymentError && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, translate("We couldn't complete your payment. Please verify the payment details and try again."))), h("zonos-payment", null), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, "is-disabled": this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
45
45
  // use primary type when on mobile mode
46
46
  variant: this.submitBtnType }, "Pay", ' ', formatCurrency({
47
47
  amount: cartStore.total,
48
48
  currency: cartStore.currency,
49
- })))));
49
+ }))))));
50
50
  }
51
51
  static get watchers() { return {
52
52
  "disabled": ["watchFormComplete"]