@bigbinary/neeto-site-blocks 1.8.4 → 1.8.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.
package/dist/index.js CHANGED
@@ -16194,22 +16194,23 @@ var useBreakpoints = function useBreakpoints(breakpointOverrides) {
16194
16194
  };
16195
16195
  var useBreakpoints$1 = useBreakpoints;
16196
16196
 
16197
- var _excluded$u = ["isEmbedded", "src", "design"];
16197
+ var _excluded$u = ["isEmbedded", "src", "design", "videoUrl"];
16198
16198
  function ownKeys$h(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
16199
16199
  function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$h(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$h(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
16200
16200
  var Media = function Media(_ref) {
16201
16201
  var isEmbedded = _ref.isEmbedded,
16202
16202
  src = _ref.src,
16203
16203
  design = _ref.design,
16204
+ videoUrl = _ref.videoUrl,
16204
16205
  otherProps = _objectWithoutProperties(_ref, _excluded$u);
16205
16206
  if (isEmbedded) {
16206
16207
  var _design$width;
16207
- return /*#__PURE__*/React__default.createElement(StyledWrapper, {
16208
+ return videoUrl && /*#__PURE__*/React__default.createElement(StyledWrapper, {
16208
16209
  allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",
16209
16210
  as: "iframe",
16210
16211
  design: dissoc("width", design),
16211
16212
  height: "300px",
16212
- src: validateUrl(src),
16213
+ src: validateUrl(videoUrl),
16213
16214
  width: "".concat((_design$width = design === null || design === void 0 ? void 0 : design.width) !== null && _design$width !== void 0 ? _design$width : "100", "%")
16214
16215
  });
16215
16216
  }
@@ -39596,10 +39597,12 @@ var FeatureWithDetails = function FeatureWithDetails(_ref) {
39596
39597
  _properties$features = properties.features,
39597
39598
  features = _properties$features === void 0 ? [] : _properties$features,
39598
39599
  _properties$media = properties.media,
39599
- mediaURL = _properties$media.src,
39600
+ imageUrl = _properties$media.src,
39600
39601
  mediaPosition = _properties$media.position,
39601
39602
  isEmbedded = _properties$media.isEmbedded,
39603
+ videoUrl = _properties$media.videoUrl,
39602
39604
  src = properties.backgroundImage.src;
39605
+ var mediaURL = isEmbedded ? videoUrl : imageUrl;
39603
39606
  var baseClasses = "grid grid-cols-12 items-center sm:gap-x-2 lg:gap-x-4 grid-flow-row-dense";
39604
39607
  var mediaBaseClasses = classnames("col-span-12 flex justify-center", {
39605
39608
  "sm:col-span-7 sm:col-start-7 lg:col-span-6 lg:col-start-7": mediaPosition === POSITIONS.RIGHT.label,
@@ -39663,11 +39666,12 @@ var FeatureWithDetails = function FeatureWithDetails(_ref) {
39663
39666
  className: mediaBaseClasses
39664
39667
  }, /*#__PURE__*/React__default.createElement(Media, {
39665
39668
  isEmbedded: isEmbedded,
39669
+ videoUrl: videoUrl,
39666
39670
  design: design.media,
39667
39671
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
39668
39672
  id: "feature-with-details-media",
39669
39673
  lgImageWidth: design.media.width,
39670
- src: mediaURL
39674
+ src: imageUrl
39671
39675
  })));
39672
39676
  };
39673
39677
 
@@ -39687,8 +39691,9 @@ var FeatureWithGrid = function FeatureWithGrid(_ref) {
39687
39691
  _properties$features = properties.features,
39688
39692
  features = _properties$features === void 0 ? [] : _properties$features,
39689
39693
  _properties$media = properties.media,
39690
- mediaURL = _properties$media.src,
39694
+ imageURL = _properties$media.src,
39691
39695
  isEmbedded = _properties$media.isEmbedded,
39696
+ videoUrl = _properties$media.videoUrl,
39692
39697
  src = properties.backgroundImage.src;
39693
39698
  var baseClasses = "grid grid-cols-12 gap-4";
39694
39699
  var gridClasses = function gridClasses(index) {
@@ -39720,11 +39725,12 @@ var FeatureWithGrid = function FeatureWithGrid(_ref) {
39720
39725
  style: design.description
39721
39726
  }, otherProps), description), /*#__PURE__*/React__default.createElement(Media, {
39722
39727
  isEmbedded: isEmbedded,
39728
+ videoUrl: videoUrl,
39723
39729
  className: "m-auto",
39724
39730
  design: design.media,
39725
39731
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
39726
39732
  id: "feature-with-grid-media",
39727
- src: mediaURL
39733
+ src: imageURL
39728
39734
  })), features.map(function (_ref2, index) {
39729
39735
  var featureTitle = _ref2.title,
39730
39736
  featureDescription = _ref2.description,
@@ -39773,18 +39779,20 @@ var FeatureWithImage = function FeatureWithImage(_ref) {
39773
39779
  description = _properties$content.description,
39774
39780
  enableAnimation = properties.enableAnimation,
39775
39781
  _properties$media = properties.media,
39776
- mediaSrc = _properties$media.src,
39782
+ imageUrl = _properties$media.src,
39777
39783
  mediaPosition = _properties$media.position,
39778
39784
  isEmbedded = _properties$media.isEmbedded,
39785
+ videoUrl = _properties$media.videoUrl,
39779
39786
  src = properties.backgroundImage.src;
39787
+ var mediaURL = isEmbedded ? videoUrl : imageUrl;
39780
39788
  var baseClasses = "grid grid-cols-12 items-center grid-flow-row-dense";
39781
39789
  var mediaBaseClasses = classnames("col-span-12 flex justify-center", {
39782
39790
  "sm:col-span-6 sm:col-start-7": mediaPosition === POSITIONS.RIGHT.label,
39783
39791
  "sm:col-span-6 sm:col-start-1": mediaPosition === POSITIONS.LEFT.label
39784
39792
  });
39785
39793
  var featureClasses = classnames("col-span-12", {
39786
- "sm:col-span-5": mediaPosition === POSITIONS.RIGHT.label && mediaSrc,
39787
- "sm:col-span-5 sm:col-start-8": mediaPosition === POSITIONS.LEFT.label && mediaSrc
39794
+ "sm:col-span-5": mediaPosition === POSITIONS.RIGHT.label && mediaURL,
39795
+ "sm:col-span-5 sm:col-start-8": mediaPosition === POSITIONS.LEFT.label && mediaURL
39788
39796
  });
39789
39797
  return /*#__PURE__*/React__default.createElement(BlockWrapper, {
39790
39798
  className: className,
@@ -39810,11 +39818,12 @@ var FeatureWithImage = function FeatureWithImage(_ref) {
39810
39818
  className: mediaBaseClasses
39811
39819
  }, /*#__PURE__*/React__default.createElement(Media, {
39812
39820
  isEmbedded: isEmbedded,
39821
+ videoUrl: videoUrl,
39813
39822
  design: design.media,
39814
39823
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
39815
39824
  id: "feature-with-image-media",
39816
39825
  lgImageWidth: design.media.width,
39817
- src: mediaSrc
39826
+ src: imageUrl
39818
39827
  })));
39819
39828
  };
39820
39829
 
@@ -39885,10 +39894,12 @@ var FeatureWithList = function FeatureWithList(_ref) {
39885
39894
  _properties$features = properties.features,
39886
39895
  features = _properties$features === void 0 ? [] : _properties$features,
39887
39896
  _properties$media = properties.media,
39888
- mediaURL = _properties$media.src,
39897
+ imageURL = _properties$media.src,
39889
39898
  mediaPosition = _properties$media.position,
39890
39899
  isEmbedded = _properties$media.isEmbedded,
39900
+ videoUrl = _properties$media.videoUrl,
39891
39901
  src = properties.backgroundImage.src;
39902
+ var mediaURL = isEmbedded ? videoUrl : imageURL;
39892
39903
  var baseClasses = "grid grid-cols-12 lg:gap-x-4 sm:gap-x-2 items-center grid-flow-row-dense";
39893
39904
  var mediaBaseClasses = classnames("col-span-12 flex justify-center", {
39894
39905
  "sm:col-span-6 sm:col-start-7": mediaPosition === POSITIONS.RIGHT.label,
@@ -39947,11 +39958,12 @@ var FeatureWithList = function FeatureWithList(_ref) {
39947
39958
  className: mediaBaseClasses
39948
39959
  }, /*#__PURE__*/React__default.createElement(Media, {
39949
39960
  isEmbedded: isEmbedded,
39961
+ videoUrl: videoUrl,
39950
39962
  design: design.media,
39951
39963
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
39952
39964
  id: "feature-with-list-media",
39953
39965
  lgImageWidth: design.media.width,
39954
- src: mediaURL
39966
+ src: imageURL
39955
39967
  })));
39956
39968
  };
39957
39969
 
@@ -40076,7 +40088,8 @@ var FeatureWithProgressBar = function FeatureWithProgressBar(_ref) {
40076
40088
  id: "feature-with-progress-bar-".concat(selectedTabId - 1, "-media"),
40077
40089
  index: selectedTabId - 1,
40078
40090
  isEmbedded: features[selectedTabId - 1].media.isEmbedded,
40079
- src: features[selectedTabId - 1].media.src
40091
+ src: features[selectedTabId - 1].media.src,
40092
+ videoUrl: features[selectedTabId - 1].media.videoUrl
40080
40093
  })));
40081
40094
  };
40082
40095
 
@@ -42916,10 +42929,12 @@ var HeroWithCallToAction = function HeroWithCallToAction(_ref) {
42916
42929
  description = _properties$content.description,
42917
42930
  enableAnimation = properties.enableAnimation,
42918
42931
  _properties$media = properties.media,
42919
- mediaURL = _properties$media.src,
42932
+ imageURL = _properties$media.src,
42920
42933
  mediaPosition = _properties$media.position,
42921
42934
  isEmbedded = _properties$media.isEmbedded,
42935
+ videoUrl = _properties$media.videoUrl,
42922
42936
  src = properties.backgroundImage.src;
42937
+ var mediaURL = isEmbedded ? videoUrl : imageURL;
42923
42938
  var baseClasses = "grid sm:gap-x-6 gap-y-6 grid-cols-12 items-center grid-flow-row-dense";
42924
42939
  var mediaBaseClasses = classnames("col-span-12 col-start-1 flex justify-center", {
42925
42940
  "sm:col-span-6 sm:col-start-1": POSITIONS.LEFT.label === mediaPosition,
@@ -42979,10 +42994,11 @@ var HeroWithCallToAction = function HeroWithCallToAction(_ref) {
42979
42994
  className: mediaBaseClasses
42980
42995
  }, /*#__PURE__*/React__default.createElement(Media, {
42981
42996
  isEmbedded: isEmbedded,
42997
+ videoUrl: videoUrl,
42982
42998
  design: design.media,
42983
42999
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
42984
43000
  id: "hero-with-call-to-action-media",
42985
- src: mediaURL
43001
+ src: imageURL
42986
43002
  })));
42987
43003
  };
42988
43004
 
@@ -43109,6 +43125,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
43109
43125
  isEmbedded: media.isEmbedded,
43110
43126
  lgImageSize: design.media.width,
43111
43127
  src: media.src,
43128
+ videoUrl: media.videoUrl,
43112
43129
  className: classnames({
43113
43130
  "slider-image": media.position !== POSITIONS.BOTTOM.label || media.position !== POSITIONS.TOP.label
43114
43131
  })
@@ -43132,9 +43149,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
43132
43149
  }
43133
43150
  }), /*#__PURE__*/React__default.createElement(Swiper, {
43134
43151
  loop: true,
43135
- className: classnames("ns-hero-with-slider", {
43136
- "pointer-events-none": disableButtonAndLinks
43137
- }),
43152
+ className: "ns-hero-with-slider",
43138
43153
  onSwiper: setSwiper
43139
43154
  }, slides.map(function (_ref7, index) {
43140
43155
  var content = _ref7.content,
@@ -43151,7 +43166,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
43151
43166
  }));
43152
43167
  }), /*#__PURE__*/React__default.createElement(Pagination$1, {
43153
43168
  swiper: swiper,
43154
- className: "!pointer-events-auto !relative"
43169
+ className: "!relative"
43155
43170
  })), /*#__PURE__*/React__default.createElement(ArrowButton, {
43156
43171
  Icon: ArrowRightS$1,
43157
43172
  className: "hidden sm:flex",