@bigbinary/neeto-site-blocks 1.8.4 → 1.8.6

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
  }
@@ -16504,7 +16505,7 @@ var CardsClassic = function CardsClassic(_ref) {
16504
16505
  description = _ref2.description,
16505
16506
  href = _ref2.href;
16506
16507
  return /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
16507
- className: "ns-card-animation col-span-12 flex h-52 max-h-64 cursor-pointer flex-col justify-center sm:col-span-6",
16508
+ className: "ns-card-animation col-span-12 flex h-full min-h-52 cursor-pointer flex-col sm:col-span-6",
16508
16509
  design: design.card,
16509
16510
  key: getUniqueKey(title, description, index),
16510
16511
  onClick: function onClick() {
@@ -16513,13 +16514,11 @@ var CardsClassic = function CardsClassic(_ref) {
16513
16514
  }, /*#__PURE__*/React__default["default"].createElement(Typography$1, _extends__default["default"]({
16514
16515
  index: index,
16515
16516
  isTitle: true,
16516
- className: "ns-card-truncation ns-card-line-clamp-2",
16517
16517
  component: "h1",
16518
16518
  id: "cards-classic-cards-".concat(index, "-title"),
16519
16519
  style: design.cardTitle
16520
16520
  }, otherProps), title), /*#__PURE__*/React__default["default"].createElement(Typography$1, _extends__default["default"]({
16521
16521
  index: index,
16522
- className: "ns-card-truncation ns-card-line-clamp-3",
16523
16522
  component: "p",
16524
16523
  id: "cards-classic-cards-".concat(index, "-description"),
16525
16524
  style: design.cardDescription
@@ -21384,14 +21383,12 @@ var CardsInGridView = function CardsInGridView(_ref) {
21384
21383
  disableButtonAndLinks: disableButtonAndLinks,
21385
21384
  index: index,
21386
21385
  isTitle: true,
21387
- className: "ns-card-truncation ns-card-line-clamp-2",
21388
21386
  component: "h1",
21389
21387
  id: "cards-in-grid-view-".concat(index, "-title"),
21390
21388
  style: design.cardTitle
21391
21389
  }, title), /*#__PURE__*/React__default["default"].createElement(Typography$1, {
21392
21390
  disableButtonAndLinks: disableButtonAndLinks,
21393
21391
  index: index,
21394
- className: "ns-card-truncation ns-card-line-clamp-2",
21395
21392
  component: "p",
21396
21393
  id: "cards-in-grid-view-".concat(index, "-description"),
21397
21394
  style: design.cardDescription
@@ -21534,7 +21531,7 @@ var CardsWithCustomizableGrid = function CardsWithCustomizableGrid(_ref) {
21534
21531
  isBorderRequired = properties.isBorderRequired,
21535
21532
  src = properties.backgroundImage.src;
21536
21533
  var baseClasses = "grid grid-cols-12 sm:gap-x-4 gap-y-4 items-center ns-card";
21537
- var gridBaseClasses = classnames("col-span-12 h-56 flex flex-col gap-2 ns-card-animation cursor-pointer", {
21534
+ var gridBaseClasses = classnames("col-span-12 min-h-56 flex flex-col gap-2 ns-card-animation cursor-pointer", {
21538
21535
  "sm:col-span-6 lg:col-span-4": gridCount === 3,
21539
21536
  "sm:col-span-6": gridCount === 2,
21540
21537
  "lg:col-span-3 sm:col-span-6": gridCount === 4
@@ -21579,7 +21576,6 @@ var CardsWithCustomizableGrid = function CardsWithCustomizableGrid(_ref) {
21579
21576
  }, /*#__PURE__*/React__default["default"].createElement(Typography$1, _extends__default["default"]({
21580
21577
  index: index,
21581
21578
  isTitle: true,
21582
- className: "ns-card-truncation ns-card-line-clamp-4",
21583
21579
  component: "h1",
21584
21580
  id: "cards-with-customizable-grid-card-".concat(index, "-title"),
21585
21581
  style: design.cardTitle
@@ -39642,10 +39638,12 @@ var FeatureWithDetails = function FeatureWithDetails(_ref) {
39642
39638
  _properties$features = properties.features,
39643
39639
  features = _properties$features === void 0 ? [] : _properties$features,
39644
39640
  _properties$media = properties.media,
39645
- mediaURL = _properties$media.src,
39641
+ imageUrl = _properties$media.src,
39646
39642
  mediaPosition = _properties$media.position,
39647
39643
  isEmbedded = _properties$media.isEmbedded,
39644
+ videoUrl = _properties$media.videoUrl,
39648
39645
  src = properties.backgroundImage.src;
39646
+ var mediaURL = isEmbedded ? videoUrl : imageUrl;
39649
39647
  var baseClasses = "grid grid-cols-12 items-center sm:gap-x-2 lg:gap-x-4 grid-flow-row-dense";
39650
39648
  var mediaBaseClasses = classnames("col-span-12 flex justify-center", {
39651
39649
  "sm:col-span-7 sm:col-start-7 lg:col-span-6 lg:col-start-7": mediaPosition === POSITIONS.RIGHT.label,
@@ -39709,11 +39707,12 @@ var FeatureWithDetails = function FeatureWithDetails(_ref) {
39709
39707
  className: mediaBaseClasses
39710
39708
  }, /*#__PURE__*/React__default["default"].createElement(Media, {
39711
39709
  isEmbedded: isEmbedded,
39710
+ videoUrl: videoUrl,
39712
39711
  design: design.media,
39713
39712
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
39714
39713
  id: "feature-with-details-media",
39715
39714
  lgImageWidth: design.media.width,
39716
- src: mediaURL
39715
+ src: imageUrl
39717
39716
  })));
39718
39717
  };
39719
39718
 
@@ -39733,8 +39732,9 @@ var FeatureWithGrid = function FeatureWithGrid(_ref) {
39733
39732
  _properties$features = properties.features,
39734
39733
  features = _properties$features === void 0 ? [] : _properties$features,
39735
39734
  _properties$media = properties.media,
39736
- mediaURL = _properties$media.src,
39735
+ imageURL = _properties$media.src,
39737
39736
  isEmbedded = _properties$media.isEmbedded,
39737
+ videoUrl = _properties$media.videoUrl,
39738
39738
  src = properties.backgroundImage.src;
39739
39739
  var baseClasses = "grid grid-cols-12 gap-4";
39740
39740
  var gridClasses = function gridClasses(index) {
@@ -39766,11 +39766,12 @@ var FeatureWithGrid = function FeatureWithGrid(_ref) {
39766
39766
  style: design.description
39767
39767
  }, otherProps), description), /*#__PURE__*/React__default["default"].createElement(Media, {
39768
39768
  isEmbedded: isEmbedded,
39769
+ videoUrl: videoUrl,
39769
39770
  className: "m-auto",
39770
39771
  design: design.media,
39771
39772
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
39772
39773
  id: "feature-with-grid-media",
39773
- src: mediaURL
39774
+ src: imageURL
39774
39775
  })), features.map(function (_ref2, index) {
39775
39776
  var featureTitle = _ref2.title,
39776
39777
  featureDescription = _ref2.description,
@@ -39819,18 +39820,20 @@ var FeatureWithImage = function FeatureWithImage(_ref) {
39819
39820
  description = _properties$content.description,
39820
39821
  enableAnimation = properties.enableAnimation,
39821
39822
  _properties$media = properties.media,
39822
- mediaSrc = _properties$media.src,
39823
+ imageUrl = _properties$media.src,
39823
39824
  mediaPosition = _properties$media.position,
39824
39825
  isEmbedded = _properties$media.isEmbedded,
39826
+ videoUrl = _properties$media.videoUrl,
39825
39827
  src = properties.backgroundImage.src;
39828
+ var mediaURL = isEmbedded ? videoUrl : imageUrl;
39826
39829
  var baseClasses = "grid grid-cols-12 items-center grid-flow-row-dense";
39827
39830
  var mediaBaseClasses = classnames("col-span-12 flex justify-center", {
39828
39831
  "sm:col-span-6 sm:col-start-7": mediaPosition === POSITIONS.RIGHT.label,
39829
39832
  "sm:col-span-6 sm:col-start-1": mediaPosition === POSITIONS.LEFT.label
39830
39833
  });
39831
39834
  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
39835
+ "sm:col-span-5": mediaPosition === POSITIONS.RIGHT.label && mediaURL,
39836
+ "sm:col-span-5 sm:col-start-8": mediaPosition === POSITIONS.LEFT.label && mediaURL
39834
39837
  });
39835
39838
  return /*#__PURE__*/React__default["default"].createElement(BlockWrapper, {
39836
39839
  className: className,
@@ -39856,11 +39859,12 @@ var FeatureWithImage = function FeatureWithImage(_ref) {
39856
39859
  className: mediaBaseClasses
39857
39860
  }, /*#__PURE__*/React__default["default"].createElement(Media, {
39858
39861
  isEmbedded: isEmbedded,
39862
+ videoUrl: videoUrl,
39859
39863
  design: design.media,
39860
39864
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
39861
39865
  id: "feature-with-image-media",
39862
39866
  lgImageWidth: design.media.width,
39863
- src: mediaSrc
39867
+ src: imageUrl
39864
39868
  })));
39865
39869
  };
39866
39870
 
@@ -39931,10 +39935,12 @@ var FeatureWithList = function FeatureWithList(_ref) {
39931
39935
  _properties$features = properties.features,
39932
39936
  features = _properties$features === void 0 ? [] : _properties$features,
39933
39937
  _properties$media = properties.media,
39934
- mediaURL = _properties$media.src,
39938
+ imageURL = _properties$media.src,
39935
39939
  mediaPosition = _properties$media.position,
39936
39940
  isEmbedded = _properties$media.isEmbedded,
39941
+ videoUrl = _properties$media.videoUrl,
39937
39942
  src = properties.backgroundImage.src;
39943
+ var mediaURL = isEmbedded ? videoUrl : imageURL;
39938
39944
  var baseClasses = "grid grid-cols-12 lg:gap-x-4 sm:gap-x-2 items-center grid-flow-row-dense";
39939
39945
  var mediaBaseClasses = classnames("col-span-12 flex justify-center", {
39940
39946
  "sm:col-span-6 sm:col-start-7": mediaPosition === POSITIONS.RIGHT.label,
@@ -39993,11 +39999,12 @@ var FeatureWithList = function FeatureWithList(_ref) {
39993
39999
  className: mediaBaseClasses
39994
40000
  }, /*#__PURE__*/React__default["default"].createElement(Media, {
39995
40001
  isEmbedded: isEmbedded,
40002
+ videoUrl: videoUrl,
39996
40003
  design: design.media,
39997
40004
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
39998
40005
  id: "feature-with-list-media",
39999
40006
  lgImageWidth: design.media.width,
40000
- src: mediaURL
40007
+ src: imageURL
40001
40008
  })));
40002
40009
  };
40003
40010
 
@@ -40122,7 +40129,8 @@ var FeatureWithProgressBar = function FeatureWithProgressBar(_ref) {
40122
40129
  id: "feature-with-progress-bar-".concat(selectedTabId - 1, "-media"),
40123
40130
  index: selectedTabId - 1,
40124
40131
  isEmbedded: features[selectedTabId - 1].media.isEmbedded,
40125
- src: features[selectedTabId - 1].media.src
40132
+ src: features[selectedTabId - 1].media.src,
40133
+ videoUrl: features[selectedTabId - 1].media.videoUrl
40126
40134
  })));
40127
40135
  };
40128
40136
 
@@ -42962,10 +42970,12 @@ var HeroWithCallToAction = function HeroWithCallToAction(_ref) {
42962
42970
  description = _properties$content.description,
42963
42971
  enableAnimation = properties.enableAnimation,
42964
42972
  _properties$media = properties.media,
42965
- mediaURL = _properties$media.src,
42973
+ imageURL = _properties$media.src,
42966
42974
  mediaPosition = _properties$media.position,
42967
42975
  isEmbedded = _properties$media.isEmbedded,
42976
+ videoUrl = _properties$media.videoUrl,
42968
42977
  src = properties.backgroundImage.src;
42978
+ var mediaURL = isEmbedded ? videoUrl : imageURL;
42969
42979
  var baseClasses = "grid sm:gap-x-6 gap-y-6 grid-cols-12 items-center grid-flow-row-dense";
42970
42980
  var mediaBaseClasses = classnames("col-span-12 col-start-1 flex justify-center", {
42971
42981
  "sm:col-span-6 sm:col-start-1": POSITIONS.LEFT.label === mediaPosition,
@@ -43025,10 +43035,11 @@ var HeroWithCallToAction = function HeroWithCallToAction(_ref) {
43025
43035
  className: mediaBaseClasses
43026
43036
  }, /*#__PURE__*/React__default["default"].createElement(Media, {
43027
43037
  isEmbedded: isEmbedded,
43038
+ videoUrl: videoUrl,
43028
43039
  design: design.media,
43029
43040
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
43030
43041
  id: "hero-with-call-to-action-media",
43031
- src: mediaURL
43042
+ src: imageURL
43032
43043
  })));
43033
43044
  };
43034
43045
 
@@ -43155,6 +43166,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
43155
43166
  isEmbedded: media.isEmbedded,
43156
43167
  lgImageSize: design.media.width,
43157
43168
  src: media.src,
43169
+ videoUrl: media.videoUrl,
43158
43170
  className: classnames({
43159
43171
  "slider-image": media.position !== POSITIONS.BOTTOM.label || media.position !== POSITIONS.TOP.label
43160
43172
  })
@@ -43178,9 +43190,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
43178
43190
  }
43179
43191
  }), /*#__PURE__*/React__default["default"].createElement(Swiper, {
43180
43192
  loop: true,
43181
- className: classnames("ns-hero-with-slider", {
43182
- "pointer-events-none": disableButtonAndLinks
43183
- }),
43193
+ className: "ns-hero-with-slider",
43184
43194
  onSwiper: setSwiper
43185
43195
  }, slides.map(function (_ref7, index) {
43186
43196
  var content = _ref7.content,
@@ -43197,7 +43207,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
43197
43207
  }));
43198
43208
  }), /*#__PURE__*/React__default["default"].createElement(Pagination$1, {
43199
43209
  swiper: swiper,
43200
- className: "!pointer-events-auto !relative"
43210
+ className: "!relative"
43201
43211
  })), /*#__PURE__*/React__default["default"].createElement(ArrowButton, {
43202
43212
  Icon: ArrowRightS$1,
43203
43213
  className: "hidden sm:flex",