ui.shipaid.com 0.3.165 → 0.3.167

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/widget.es.js CHANGED
@@ -2501,6 +2501,7 @@ const styles = i2`
2501
2501
  .shipaid-widget-container {
2502
2502
  display: flex;
2503
2503
  justify-content: right;
2504
+ margin: 10px 0;
2504
2505
  }
2505
2506
 
2506
2507
  .shipaid-prompt p,
@@ -3666,6 +3667,7 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
3666
3667
  this._checkoutButtonStylesInjected = false;
3667
3668
  this._cachedCheckoutButton = null;
3668
3669
  this._cachedCheckoutButtonClasses = "";
3670
+ this._isCartPage = false;
3669
3671
  this._onShipAidCartEvent = (event) => {
3670
3672
  var _a2, _b2;
3671
3673
  if (((_b2 = (_a2 = event == null ? void 0 : event.detail) == null ? void 0 : _a2.data) == null ? void 0 : _b2.source) === "shipaid-widget") return;
@@ -5501,6 +5503,8 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
5501
5503
  // Load the initial language and mark that the strings has been loaded so the component can render.
5502
5504
  async connectedCallback() {
5503
5505
  super.connectedCallback();
5506
+ const pathname = window.location.pathname.replace(/\/$/, "");
5507
+ if (pathname === "/cart") this._isCartPage = true;
5504
5508
  await use(this.lang);
5505
5509
  this.hasLoadedStrings = true;
5506
5510
  this.fetchInterceptorCleanup = interceptFetch(async (args, promise) => {
@@ -5846,7 +5850,6 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
5846
5850
  --shipaid-active-logo-color: #000000;
5847
5851
  --shipaid-inactive-logo-color: #0056d6;
5848
5852
  width: 100%;
5849
- margin: 10px 0;
5850
5853
  }
5851
5854
 
5852
5855
  * {
@@ -5868,12 +5871,14 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
5868
5871
  .shipaid-widget-container {
5869
5872
  display: flex;
5870
5873
  justify-content: right;
5874
+ margin: 10px 0;
5871
5875
  }
5872
5876
 
5873
5877
  .shipaid-prompt {
5874
5878
  width: var(--shipaid-prompt-width, 100%);
5875
5879
  margin: var(--shipaid-prompt-margin, unset);
5876
5880
  padding: var(--shipaid-prompt-padding, unset);
5881
+ ${this._isCartPage ? "max-width: fit-content;" : ""}
5877
5882
  }
5878
5883
 
5879
5884
  .shipaid-prompt p,