@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.cjs.js CHANGED
@@ -16240,22 +16240,23 @@ var useBreakpoints = function useBreakpoints(breakpointOverrides) {
16240
16240
  };
16241
16241
  var useBreakpoints$1 = useBreakpoints;
16242
16242
 
16243
- var _excluded$u = ["isEmbedded", "src", "design"];
16243
+ var _excluded$u = ["isEmbedded", "src", "design", "videoUrl"];
16244
16244
  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; }
16245
16245
  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__default["default"](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; }
16246
16246
  var Media = function Media(_ref) {
16247
16247
  var isEmbedded = _ref.isEmbedded,
16248
16248
  src = _ref.src,
16249
16249
  design = _ref.design,
16250
+ videoUrl = _ref.videoUrl,
16250
16251
  otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$u);
16251
16252
  if (isEmbedded) {
16252
16253
  var _design$width;
16253
- return /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
16254
+ return videoUrl && /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
16254
16255
  allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",
16255
16256
  as: "iframe",
16256
16257
  design: dissoc("width", design),
16257
16258
  height: "300px",
16258
- src: validateUrl(src),
16259
+ src: validateUrl(videoUrl),
16259
16260
  width: "".concat((_design$width = design === null || design === void 0 ? void 0 : design.width) !== null && _design$width !== void 0 ? _design$width : "100", "%")
16260
16261
  });
16261
16262
  }
@@ -39642,10 +39643,12 @@ var FeatureWithDetails = function FeatureWithDetails(_ref) {
39642
39643
  _properties$features = properties.features,
39643
39644
  features = _properties$features === void 0 ? [] : _properties$features,
39644
39645
  _properties$media = properties.media,
39645
- mediaURL = _properties$media.src,
39646
+ imageUrl = _properties$media.src,
39646
39647
  mediaPosition = _properties$media.position,
39647
39648
  isEmbedded = _properties$media.isEmbedded,
39649
+ videoUrl = _properties$media.videoUrl,
39648
39650
  src = properties.backgroundImage.src;
39651
+ var mediaURL = isEmbedded ? videoUrl : imageUrl;
39649
39652
  var baseClasses = "grid grid-cols-12 items-center sm:gap-x-2 lg:gap-x-4 grid-flow-row-dense";
39650
39653
  var mediaBaseClasses = classnames("col-span-12 flex justify-center", {
39651
39654
  "sm:col-span-7 sm:col-start-7 lg:col-span-6 lg:col-start-7": mediaPosition === POSITIONS.RIGHT.label,
@@ -39709,11 +39712,12 @@ var FeatureWithDetails = function FeatureWithDetails(_ref) {
39709
39712
  className: mediaBaseClasses
39710
39713
  }, /*#__PURE__*/React__default["default"].createElement(Media, {
39711
39714
  isEmbedded: isEmbedded,
39715
+ videoUrl: videoUrl,
39712
39716
  design: design.media,
39713
39717
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
39714
39718
  id: "feature-with-details-media",
39715
39719
  lgImageWidth: design.media.width,
39716
- src: mediaURL
39720
+ src: imageUrl
39717
39721
  })));
39718
39722
  };
39719
39723
 
@@ -39733,8 +39737,9 @@ var FeatureWithGrid = function FeatureWithGrid(_ref) {
39733
39737
  _properties$features = properties.features,
39734
39738
  features = _properties$features === void 0 ? [] : _properties$features,
39735
39739
  _properties$media = properties.media,
39736
- mediaURL = _properties$media.src,
39740
+ imageURL = _properties$media.src,
39737
39741
  isEmbedded = _properties$media.isEmbedded,
39742
+ videoUrl = _properties$media.videoUrl,
39738
39743
  src = properties.backgroundImage.src;
39739
39744
  var baseClasses = "grid grid-cols-12 gap-4";
39740
39745
  var gridClasses = function gridClasses(index) {
@@ -39766,11 +39771,12 @@ var FeatureWithGrid = function FeatureWithGrid(_ref) {
39766
39771
  style: design.description
39767
39772
  }, otherProps), description), /*#__PURE__*/React__default["default"].createElement(Media, {
39768
39773
  isEmbedded: isEmbedded,
39774
+ videoUrl: videoUrl,
39769
39775
  className: "m-auto",
39770
39776
  design: design.media,
39771
39777
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
39772
39778
  id: "feature-with-grid-media",
39773
- src: mediaURL
39779
+ src: imageURL
39774
39780
  })), features.map(function (_ref2, index) {
39775
39781
  var featureTitle = _ref2.title,
39776
39782
  featureDescription = _ref2.description,
@@ -39819,18 +39825,20 @@ var FeatureWithImage = function FeatureWithImage(_ref) {
39819
39825
  description = _properties$content.description,
39820
39826
  enableAnimation = properties.enableAnimation,
39821
39827
  _properties$media = properties.media,
39822
- mediaSrc = _properties$media.src,
39828
+ imageUrl = _properties$media.src,
39823
39829
  mediaPosition = _properties$media.position,
39824
39830
  isEmbedded = _properties$media.isEmbedded,
39831
+ videoUrl = _properties$media.videoUrl,
39825
39832
  src = properties.backgroundImage.src;
39833
+ var mediaURL = isEmbedded ? videoUrl : imageUrl;
39826
39834
  var baseClasses = "grid grid-cols-12 items-center grid-flow-row-dense";
39827
39835
  var mediaBaseClasses = classnames("col-span-12 flex justify-center", {
39828
39836
  "sm:col-span-6 sm:col-start-7": mediaPosition === POSITIONS.RIGHT.label,
39829
39837
  "sm:col-span-6 sm:col-start-1": mediaPosition === POSITIONS.LEFT.label
39830
39838
  });
39831
39839
  var featureClasses = classnames("col-span-12", {
39832
- "sm:col-span-5": mediaPosition === POSITIONS.RIGHT.label && mediaSrc,
39833
- "sm:col-span-5 sm:col-start-8": mediaPosition === POSITIONS.LEFT.label && mediaSrc
39840
+ "sm:col-span-5": mediaPosition === POSITIONS.RIGHT.label && mediaURL,
39841
+ "sm:col-span-5 sm:col-start-8": mediaPosition === POSITIONS.LEFT.label && mediaURL
39834
39842
  });
39835
39843
  return /*#__PURE__*/React__default["default"].createElement(BlockWrapper, {
39836
39844
  className: className,
@@ -39856,11 +39864,12 @@ var FeatureWithImage = function FeatureWithImage(_ref) {
39856
39864
  className: mediaBaseClasses
39857
39865
  }, /*#__PURE__*/React__default["default"].createElement(Media, {
39858
39866
  isEmbedded: isEmbedded,
39867
+ videoUrl: videoUrl,
39859
39868
  design: design.media,
39860
39869
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
39861
39870
  id: "feature-with-image-media",
39862
39871
  lgImageWidth: design.media.width,
39863
- src: mediaSrc
39872
+ src: imageUrl
39864
39873
  })));
39865
39874
  };
39866
39875
 
@@ -39931,10 +39940,12 @@ var FeatureWithList = function FeatureWithList(_ref) {
39931
39940
  _properties$features = properties.features,
39932
39941
  features = _properties$features === void 0 ? [] : _properties$features,
39933
39942
  _properties$media = properties.media,
39934
- mediaURL = _properties$media.src,
39943
+ imageURL = _properties$media.src,
39935
39944
  mediaPosition = _properties$media.position,
39936
39945
  isEmbedded = _properties$media.isEmbedded,
39946
+ videoUrl = _properties$media.videoUrl,
39937
39947
  src = properties.backgroundImage.src;
39948
+ var mediaURL = isEmbedded ? videoUrl : imageURL;
39938
39949
  var baseClasses = "grid grid-cols-12 lg:gap-x-4 sm:gap-x-2 items-center grid-flow-row-dense";
39939
39950
  var mediaBaseClasses = classnames("col-span-12 flex justify-center", {
39940
39951
  "sm:col-span-6 sm:col-start-7": mediaPosition === POSITIONS.RIGHT.label,
@@ -39993,11 +40004,12 @@ var FeatureWithList = function FeatureWithList(_ref) {
39993
40004
  className: mediaBaseClasses
39994
40005
  }, /*#__PURE__*/React__default["default"].createElement(Media, {
39995
40006
  isEmbedded: isEmbedded,
40007
+ videoUrl: videoUrl,
39996
40008
  design: design.media,
39997
40009
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
39998
40010
  id: "feature-with-list-media",
39999
40011
  lgImageWidth: design.media.width,
40000
- src: mediaURL
40012
+ src: imageURL
40001
40013
  })));
40002
40014
  };
40003
40015
 
@@ -40122,7 +40134,8 @@ var FeatureWithProgressBar = function FeatureWithProgressBar(_ref) {
40122
40134
  id: "feature-with-progress-bar-".concat(selectedTabId - 1, "-media"),
40123
40135
  index: selectedTabId - 1,
40124
40136
  isEmbedded: features[selectedTabId - 1].media.isEmbedded,
40125
- src: features[selectedTabId - 1].media.src
40137
+ src: features[selectedTabId - 1].media.src,
40138
+ videoUrl: features[selectedTabId - 1].media.videoUrl
40126
40139
  })));
40127
40140
  };
40128
40141
 
@@ -42962,10 +42975,12 @@ var HeroWithCallToAction = function HeroWithCallToAction(_ref) {
42962
42975
  description = _properties$content.description,
42963
42976
  enableAnimation = properties.enableAnimation,
42964
42977
  _properties$media = properties.media,
42965
- mediaURL = _properties$media.src,
42978
+ imageURL = _properties$media.src,
42966
42979
  mediaPosition = _properties$media.position,
42967
42980
  isEmbedded = _properties$media.isEmbedded,
42981
+ videoUrl = _properties$media.videoUrl,
42968
42982
  src = properties.backgroundImage.src;
42983
+ var mediaURL = isEmbedded ? videoUrl : imageURL;
42969
42984
  var baseClasses = "grid sm:gap-x-6 gap-y-6 grid-cols-12 items-center grid-flow-row-dense";
42970
42985
  var mediaBaseClasses = classnames("col-span-12 col-start-1 flex justify-center", {
42971
42986
  "sm:col-span-6 sm:col-start-1": POSITIONS.LEFT.label === mediaPosition,
@@ -43025,10 +43040,11 @@ var HeroWithCallToAction = function HeroWithCallToAction(_ref) {
43025
43040
  className: mediaBaseClasses
43026
43041
  }, /*#__PURE__*/React__default["default"].createElement(Media, {
43027
43042
  isEmbedded: isEmbedded,
43043
+ videoUrl: videoUrl,
43028
43044
  design: design.media,
43029
43045
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
43030
43046
  id: "hero-with-call-to-action-media",
43031
- src: mediaURL
43047
+ src: imageURL
43032
43048
  })));
43033
43049
  };
43034
43050
 
@@ -43155,6 +43171,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
43155
43171
  isEmbedded: media.isEmbedded,
43156
43172
  lgImageSize: design.media.width,
43157
43173
  src: media.src,
43174
+ videoUrl: media.videoUrl,
43158
43175
  className: classnames({
43159
43176
  "slider-image": media.position !== POSITIONS.BOTTOM.label || media.position !== POSITIONS.TOP.label
43160
43177
  })
@@ -43178,9 +43195,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
43178
43195
  }
43179
43196
  }), /*#__PURE__*/React__default["default"].createElement(Swiper, {
43180
43197
  loop: true,
43181
- className: classnames("ns-hero-with-slider", {
43182
- "pointer-events-none": disableButtonAndLinks
43183
- }),
43198
+ className: "ns-hero-with-slider",
43184
43199
  onSwiper: setSwiper
43185
43200
  }, slides.map(function (_ref7, index) {
43186
43201
  var content = _ref7.content,
@@ -43197,7 +43212,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
43197
43212
  }));
43198
43213
  }), /*#__PURE__*/React__default["default"].createElement(Pagination$1, {
43199
43214
  swiper: swiper,
43200
- className: "!pointer-events-auto !relative"
43215
+ className: "!relative"
43201
43216
  })), /*#__PURE__*/React__default["default"].createElement(ArrowButton, {
43202
43217
  Icon: ArrowRightS$1,
43203
43218
  className: "hidden sm:flex",