@liquidcommercedev/rmn-sdk 1.5.0-beta.7 → 1.5.0-beta.8

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/index.cjs CHANGED
@@ -15560,11 +15560,13 @@ const CAROUSEL_COMPONENT_STYLE = ({ width, height, fluid }) => `
15560
15560
  position: relative;
15561
15561
  height: 100%;
15562
15562
  width: 100%;
15563
+ display: flex;
15564
+ transition: transform 0.5s ease-in-out;
15563
15565
  }
15564
15566
 
15565
15567
  .slide {
15566
- display: none;
15567
-
15568
+ flex: 0 0 100%;
15569
+ display: flex;
15568
15570
  justify-content: center;
15569
15571
  align-items: center;
15570
15572
  height: 100%;
@@ -15869,9 +15871,9 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
15869
15871
  renderSlides() {
15870
15872
  const slidesContainer = document.createElement('div');
15871
15873
  slidesContainer.className = 'slides';
15872
- this.slides.forEach((slide, index) => {
15874
+ this.slides.forEach((slide) => {
15873
15875
  const slideElement = document.createElement('div');
15874
- slideElement.className = `slide ${index === this.currentSlide ? 'active' : ''}`;
15876
+ slideElement.className = 'slide';
15875
15877
  if (slide instanceof HTMLElement) {
15876
15878
  slideElement.appendChild(slide);
15877
15879
  }
@@ -15950,10 +15952,9 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
15950
15952
  updateCarousel() {
15951
15953
  if (!this.slidesContainer)
15952
15954
  return;
15953
- const slides = Array.from(this.slidesContainer.children);
15954
- slides.forEach((slide, index) => {
15955
- slide.classList.toggle('active', index === this.currentSlide);
15956
- });
15955
+ // Calculate the translation distance based on current slide
15956
+ const translateX = -this.currentSlide * 100;
15957
+ this.slidesContainer.style.transform = `translateX(${translateX}%)`;
15957
15958
  this.updateDots();
15958
15959
  }
15959
15960
  updateDots() {
@@ -16377,12 +16378,13 @@ function spotHtmlStringToElement(htmlString) {
16377
16378
  spot.className = 'spot';
16378
16379
  spot.innerHTML = htmlString;
16379
16380
  Object.assign(spot.style, {
16380
- position: 'relative',
16381
16381
  display: 'block',
16382
16382
  width: '100%',
16383
16383
  height: '100%',
16384
16384
  margin: '0',
16385
16385
  padding: '0',
16386
+ containerType: 'inline-size',
16387
+ position: 'relative',
16386
16388
  });
16387
16389
  return spot;
16388
16390
  }
@@ -17252,7 +17254,6 @@ const STYLES$6 = ({ textColor = '#ffffff', ctaTextColor = textColor, ctaBorderCo
17252
17254
  box-sizing: border-box;
17253
17255
  color: ${textColor};
17254
17256
  cursor: pointer;
17255
- container-type: inline-size;
17256
17257
  }
17257
17258
 
17258
17259
  .${prefix}__text {
@@ -17268,7 +17269,7 @@ const STYLES$6 = ({ textColor = '#ffffff', ctaTextColor = textColor, ctaBorderCo
17268
17269
  .${prefix}__header {
17269
17270
  font-size: 24px;
17270
17271
  margin: 0;
17271
- font-family: "Cormorant";
17272
+ font-family: "Cormorant", system-ui;
17272
17273
  font-style: normal;
17273
17274
  font-weight: 300;
17274
17275
  line-height: normal;
@@ -17387,7 +17388,6 @@ const STYLES$5 = ({ textColor = '#212121', backgroundColor = '#e8e6de', ctaTextC
17387
17388
  height: 100%;
17388
17389
  display: block;
17389
17390
  position: relative;
17390
- container-type: inline-size;
17391
17391
  }
17392
17392
 
17393
17393
  .${prefix}__content {
@@ -17578,15 +17578,20 @@ function rbHomepageHeroThreeTileTemplate(spot, config) {
17578
17578
  const STYLES$4 = ({ textColor = '#212121', backgroundColor = '#e8e6de', ctaTextColor = textColor, primaryImage, mobilePrimaryImage = primaryImage, }, { prefix }) => `
17579
17579
  <style>
17580
17580
  .${prefix} {
17581
+ width: 100%;
17582
+ height: 100%;
17583
+ background-color: transparent;
17584
+ cursor: pointer;
17585
+ position: relative;
17586
+ }
17587
+
17588
+ .${prefix}__content {
17581
17589
  width: 100%;
17582
17590
  height: 100%;
17583
17591
  display: flex;
17584
17592
  flex-direction: column-reverse;
17585
17593
  background-color: transparent;
17586
17594
  gap: 6px;
17587
- cursor: pointer;
17588
- container-type: inline-size;
17589
- position: relative;
17590
17595
  }
17591
17596
 
17592
17597
  .${prefix}__image {
@@ -17617,7 +17622,7 @@ const STYLES$4 = ({ textColor = '#212121', backgroundColor = '#e8e6de', ctaTextC
17617
17622
  font-size: 18px;
17618
17623
  margin: 0;
17619
17624
  color: inherit;
17620
- font-family: "Cormorant";
17625
+ font-family: "Cormorant", system-ui;
17621
17626
  font-style: normal;
17622
17627
  font-weight: 700;
17623
17628
  line-height: normal;
@@ -17659,7 +17664,7 @@ const STYLES$4 = ({ textColor = '#212121', backgroundColor = '#e8e6de', ctaTextC
17659
17664
  }
17660
17665
 
17661
17666
  @container (min-width: 768px) {
17662
- .${prefix} {
17667
+ .${prefix}__content {
17663
17668
  flex-direction: row;
17664
17669
  }
17665
17670
  .${prefix}__image {
@@ -17714,12 +17719,14 @@ function rbHomepageHeroTwoTileTemplate(spot, config) {
17714
17719
  ${GFONT_CORMORANT}
17715
17720
  ${STYLES$4(spot, config)}
17716
17721
  <div class="${prefix}">
17717
- <div class="${prefix}__text">
17718
- ${spot.header ? `<h2 class="${prefix}__header">${spot.header}</h2>` : ''}
17719
- ${spot.description ? `<p class="${prefix}__description">${spot.description}</p>` : ''}
17720
- ${spot.ctaText ? `<span class="${prefix}__cta-button">${spot.ctaText}</span>` : ''}
17721
- </div>
17722
- <div class="${prefix}__image"></div>
17722
+ <div class="${prefix}__content">
17723
+ <div class="${prefix}__text">
17724
+ ${spot.header ? `<h2 class="${prefix}__header">${spot.header}</h2>` : ''}
17725
+ ${spot.description ? `<p class="${prefix}__description">${spot.description}</p>` : ''}
17726
+ ${spot.ctaText ? `<span class="${prefix}__cta-button">${spot.ctaText}</span>` : ''}
17727
+ </div>
17728
+ <div class="${prefix}__image"></div>
17729
+ </div>
17723
17730
  </div>
17724
17731
  `;
17725
17732
  }
@@ -17742,12 +17749,10 @@ const STYLES$3 = ({ textColor = '#ffffff', ctaTextColor = textColor, ctaBorderCo
17742
17749
  overflow: hidden;
17743
17750
  cursor: pointer;
17744
17751
  color: ${textColor};
17745
- container-type: inline-size;
17746
17752
  }
17747
17753
 
17748
17754
  .${prefix}__text {
17749
17755
  padding: 20px;
17750
- width: 70%;
17751
17756
  display: flex;
17752
17757
  flex-direction: column;
17753
17758
  justify-content: center;
@@ -17759,7 +17764,7 @@ const STYLES$3 = ({ textColor = '#ffffff', ctaTextColor = textColor, ctaBorderCo
17759
17764
  color: inherit;
17760
17765
  margin: 0;
17761
17766
  font-size: 20px;
17762
- font-family: "Cormorant";
17767
+ font-family: "Cormorant", system-ui;
17763
17768
  font-style: normal;
17764
17769
  font-weight: 300;
17765
17770
  line-height: normal;
@@ -17878,7 +17883,6 @@ const STYLES$2 = ({ textColor = '#ffffff', primaryImage, mobilePrimaryImage = pr
17878
17883
  background-size: cover;
17879
17884
  background-position: center;
17880
17885
  background-repeat: no-repeat;
17881
- container-type: inline-size;
17882
17886
  position: relative;
17883
17887
  }
17884
17888
 
@@ -17948,12 +17952,7 @@ const STYLES$1 = ({ textColor = '#ffffff', primaryImage, mobilePrimaryImage = pr
17948
17952
  border-radius: 5px;
17949
17953
  overflow: hidden;
17950
17954
  cursor: pointer;
17951
- container-type: inline-size;
17952
- }
17953
-
17954
- .${prefix}__text {
17955
- padding: 10px;
17956
- width: 70%;
17955
+ position: relative;
17957
17956
  }
17958
17957
 
17959
17958
  .${prefix}__header {
@@ -17964,6 +17963,7 @@ const STYLES$1 = ({ textColor = '#ffffff', primaryImage, mobilePrimaryImage = pr
17964
17963
  font-style: normal;
17965
17964
  font-weight: 400;
17966
17965
  margin: 0;
17966
+ padding: 10px;
17967
17967
  }
17968
17968
 
17969
17969
  @container (min-width: 640px) {
@@ -17981,9 +17981,7 @@ function rbSmallCategoryImageToutTemplate(spot, config) {
17981
17981
  ${GFONT_CORMORANT}
17982
17982
  ${STYLES$1(spot, config)}
17983
17983
  <div class="${prefix}">
17984
- <div class="${prefix}__text">
17985
- ${spot.header ? `<h2 class="${prefix}__header">${spot.header}</h2>` : ''}
17986
- </div>
17984
+ ${spot.header ? `<h2 class="${prefix}__header">${spot.header}</h2>` : ''}
17987
17985
  </div>
17988
17986
  `;
17989
17987
  }
@@ -17998,7 +17996,6 @@ const STYLES = ({ textColor = '#000000', backgroundColor = 'transparent', primar
17998
17996
  display: flex;
17999
17997
  flex-direction: column;
18000
17998
  border-radius: 5px;
18001
- container-type: inline-size;
18002
17999
  }
18003
18000
 
18004
18001
  .${prefix}__image {
package/dist/index.esm.js CHANGED
@@ -15558,11 +15558,13 @@ const CAROUSEL_COMPONENT_STYLE = ({ width, height, fluid }) => `
15558
15558
  position: relative;
15559
15559
  height: 100%;
15560
15560
  width: 100%;
15561
+ display: flex;
15562
+ transition: transform 0.5s ease-in-out;
15561
15563
  }
15562
15564
 
15563
15565
  .slide {
15564
- display: none;
15565
-
15566
+ flex: 0 0 100%;
15567
+ display: flex;
15566
15568
  justify-content: center;
15567
15569
  align-items: center;
15568
15570
  height: 100%;
@@ -15867,9 +15869,9 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
15867
15869
  renderSlides() {
15868
15870
  const slidesContainer = document.createElement('div');
15869
15871
  slidesContainer.className = 'slides';
15870
- this.slides.forEach((slide, index) => {
15872
+ this.slides.forEach((slide) => {
15871
15873
  const slideElement = document.createElement('div');
15872
- slideElement.className = `slide ${index === this.currentSlide ? 'active' : ''}`;
15874
+ slideElement.className = 'slide';
15873
15875
  if (slide instanceof HTMLElement) {
15874
15876
  slideElement.appendChild(slide);
15875
15877
  }
@@ -15948,10 +15950,9 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
15948
15950
  updateCarousel() {
15949
15951
  if (!this.slidesContainer)
15950
15952
  return;
15951
- const slides = Array.from(this.slidesContainer.children);
15952
- slides.forEach((slide, index) => {
15953
- slide.classList.toggle('active', index === this.currentSlide);
15954
- });
15953
+ // Calculate the translation distance based on current slide
15954
+ const translateX = -this.currentSlide * 100;
15955
+ this.slidesContainer.style.transform = `translateX(${translateX}%)`;
15955
15956
  this.updateDots();
15956
15957
  }
15957
15958
  updateDots() {
@@ -16375,12 +16376,13 @@ function spotHtmlStringToElement(htmlString) {
16375
16376
  spot.className = 'spot';
16376
16377
  spot.innerHTML = htmlString;
16377
16378
  Object.assign(spot.style, {
16378
- position: 'relative',
16379
16379
  display: 'block',
16380
16380
  width: '100%',
16381
16381
  height: '100%',
16382
16382
  margin: '0',
16383
16383
  padding: '0',
16384
+ containerType: 'inline-size',
16385
+ position: 'relative',
16384
16386
  });
16385
16387
  return spot;
16386
16388
  }
@@ -17250,7 +17252,6 @@ const STYLES$6 = ({ textColor = '#ffffff', ctaTextColor = textColor, ctaBorderCo
17250
17252
  box-sizing: border-box;
17251
17253
  color: ${textColor};
17252
17254
  cursor: pointer;
17253
- container-type: inline-size;
17254
17255
  }
17255
17256
 
17256
17257
  .${prefix}__text {
@@ -17266,7 +17267,7 @@ const STYLES$6 = ({ textColor = '#ffffff', ctaTextColor = textColor, ctaBorderCo
17266
17267
  .${prefix}__header {
17267
17268
  font-size: 24px;
17268
17269
  margin: 0;
17269
- font-family: "Cormorant";
17270
+ font-family: "Cormorant", system-ui;
17270
17271
  font-style: normal;
17271
17272
  font-weight: 300;
17272
17273
  line-height: normal;
@@ -17385,7 +17386,6 @@ const STYLES$5 = ({ textColor = '#212121', backgroundColor = '#e8e6de', ctaTextC
17385
17386
  height: 100%;
17386
17387
  display: block;
17387
17388
  position: relative;
17388
- container-type: inline-size;
17389
17389
  }
17390
17390
 
17391
17391
  .${prefix}__content {
@@ -17576,15 +17576,20 @@ function rbHomepageHeroThreeTileTemplate(spot, config) {
17576
17576
  const STYLES$4 = ({ textColor = '#212121', backgroundColor = '#e8e6de', ctaTextColor = textColor, primaryImage, mobilePrimaryImage = primaryImage, }, { prefix }) => `
17577
17577
  <style>
17578
17578
  .${prefix} {
17579
+ width: 100%;
17580
+ height: 100%;
17581
+ background-color: transparent;
17582
+ cursor: pointer;
17583
+ position: relative;
17584
+ }
17585
+
17586
+ .${prefix}__content {
17579
17587
  width: 100%;
17580
17588
  height: 100%;
17581
17589
  display: flex;
17582
17590
  flex-direction: column-reverse;
17583
17591
  background-color: transparent;
17584
17592
  gap: 6px;
17585
- cursor: pointer;
17586
- container-type: inline-size;
17587
- position: relative;
17588
17593
  }
17589
17594
 
17590
17595
  .${prefix}__image {
@@ -17615,7 +17620,7 @@ const STYLES$4 = ({ textColor = '#212121', backgroundColor = '#e8e6de', ctaTextC
17615
17620
  font-size: 18px;
17616
17621
  margin: 0;
17617
17622
  color: inherit;
17618
- font-family: "Cormorant";
17623
+ font-family: "Cormorant", system-ui;
17619
17624
  font-style: normal;
17620
17625
  font-weight: 700;
17621
17626
  line-height: normal;
@@ -17657,7 +17662,7 @@ const STYLES$4 = ({ textColor = '#212121', backgroundColor = '#e8e6de', ctaTextC
17657
17662
  }
17658
17663
 
17659
17664
  @container (min-width: 768px) {
17660
- .${prefix} {
17665
+ .${prefix}__content {
17661
17666
  flex-direction: row;
17662
17667
  }
17663
17668
  .${prefix}__image {
@@ -17712,12 +17717,14 @@ function rbHomepageHeroTwoTileTemplate(spot, config) {
17712
17717
  ${GFONT_CORMORANT}
17713
17718
  ${STYLES$4(spot, config)}
17714
17719
  <div class="${prefix}">
17715
- <div class="${prefix}__text">
17716
- ${spot.header ? `<h2 class="${prefix}__header">${spot.header}</h2>` : ''}
17717
- ${spot.description ? `<p class="${prefix}__description">${spot.description}</p>` : ''}
17718
- ${spot.ctaText ? `<span class="${prefix}__cta-button">${spot.ctaText}</span>` : ''}
17719
- </div>
17720
- <div class="${prefix}__image"></div>
17720
+ <div class="${prefix}__content">
17721
+ <div class="${prefix}__text">
17722
+ ${spot.header ? `<h2 class="${prefix}__header">${spot.header}</h2>` : ''}
17723
+ ${spot.description ? `<p class="${prefix}__description">${spot.description}</p>` : ''}
17724
+ ${spot.ctaText ? `<span class="${prefix}__cta-button">${spot.ctaText}</span>` : ''}
17725
+ </div>
17726
+ <div class="${prefix}__image"></div>
17727
+ </div>
17721
17728
  </div>
17722
17729
  `;
17723
17730
  }
@@ -17740,12 +17747,10 @@ const STYLES$3 = ({ textColor = '#ffffff', ctaTextColor = textColor, ctaBorderCo
17740
17747
  overflow: hidden;
17741
17748
  cursor: pointer;
17742
17749
  color: ${textColor};
17743
- container-type: inline-size;
17744
17750
  }
17745
17751
 
17746
17752
  .${prefix}__text {
17747
17753
  padding: 20px;
17748
- width: 70%;
17749
17754
  display: flex;
17750
17755
  flex-direction: column;
17751
17756
  justify-content: center;
@@ -17757,7 +17762,7 @@ const STYLES$3 = ({ textColor = '#ffffff', ctaTextColor = textColor, ctaBorderCo
17757
17762
  color: inherit;
17758
17763
  margin: 0;
17759
17764
  font-size: 20px;
17760
- font-family: "Cormorant";
17765
+ font-family: "Cormorant", system-ui;
17761
17766
  font-style: normal;
17762
17767
  font-weight: 300;
17763
17768
  line-height: normal;
@@ -17876,7 +17881,6 @@ const STYLES$2 = ({ textColor = '#ffffff', primaryImage, mobilePrimaryImage = pr
17876
17881
  background-size: cover;
17877
17882
  background-position: center;
17878
17883
  background-repeat: no-repeat;
17879
- container-type: inline-size;
17880
17884
  position: relative;
17881
17885
  }
17882
17886
 
@@ -17946,12 +17950,7 @@ const STYLES$1 = ({ textColor = '#ffffff', primaryImage, mobilePrimaryImage = pr
17946
17950
  border-radius: 5px;
17947
17951
  overflow: hidden;
17948
17952
  cursor: pointer;
17949
- container-type: inline-size;
17950
- }
17951
-
17952
- .${prefix}__text {
17953
- padding: 10px;
17954
- width: 70%;
17953
+ position: relative;
17955
17954
  }
17956
17955
 
17957
17956
  .${prefix}__header {
@@ -17962,6 +17961,7 @@ const STYLES$1 = ({ textColor = '#ffffff', primaryImage, mobilePrimaryImage = pr
17962
17961
  font-style: normal;
17963
17962
  font-weight: 400;
17964
17963
  margin: 0;
17964
+ padding: 10px;
17965
17965
  }
17966
17966
 
17967
17967
  @container (min-width: 640px) {
@@ -17979,9 +17979,7 @@ function rbSmallCategoryImageToutTemplate(spot, config) {
17979
17979
  ${GFONT_CORMORANT}
17980
17980
  ${STYLES$1(spot, config)}
17981
17981
  <div class="${prefix}">
17982
- <div class="${prefix}__text">
17983
- ${spot.header ? `<h2 class="${prefix}__header">${spot.header}</h2>` : ''}
17984
- </div>
17982
+ ${spot.header ? `<h2 class="${prefix}__header">${spot.header}</h2>` : ''}
17985
17983
  </div>
17986
17984
  `;
17987
17985
  }
@@ -17996,7 +17994,6 @@ const STYLES = ({ textColor = '#000000', backgroundColor = 'transparent', primar
17996
17994
  display: flex;
17997
17995
  flex-direction: column;
17998
17996
  border-radius: 5px;
17999
- container-type: inline-size;
18000
17997
  }
18001
17998
 
18002
17999
  .${prefix}__image {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@liquidcommercedev/rmn-sdk",
3
3
  "description": "LiquidCommerce RMN SDK",
4
4
  "author": "LiquidCommerce Tech",
5
- "version": "1.5.0-beta.7",
5
+ "version": "1.5.0-beta.8",
6
6
  "homepage": "https://docs.liquidcommerce.co/rmn-sdk",
7
7
  "main": "./dist/index.cjs",
8
8
  "module": "./dist/index.esm.js",