@bigbinary/neeto-site-blocks 1.8.3 → 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 +41 -24
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +41 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -14750,7 +14750,7 @@ var withConditionalRender = function withConditionalRender(Component, condition)
|
|
|
14750
14750
|
return ConditionalRender;
|
|
14751
14751
|
};
|
|
14752
14752
|
|
|
14753
|
-
var _excluded$z = ["id", "disableButtonAndLinks", "index"];
|
|
14753
|
+
var _excluded$z = ["id", "disableButtonAndLinks", "wrapperClassName", "index"];
|
|
14754
14754
|
var StyledImage = styled__default["default"].img.attrs(function () {
|
|
14755
14755
|
return {
|
|
14756
14756
|
className: "hover:mix-blend-multiply m-auto"
|
|
@@ -14773,6 +14773,7 @@ var StyledImage = styled__default["default"].img.attrs(function () {
|
|
|
14773
14773
|
var StyledImageWithWrapper = function StyledImageWithWrapper(_ref2) {
|
|
14774
14774
|
var id = _ref2.id,
|
|
14775
14775
|
disableButtonAndLinks = _ref2.disableButtonAndLinks,
|
|
14776
|
+
wrapperClassName = _ref2.wrapperClassName,
|
|
14776
14777
|
index = _ref2.index,
|
|
14777
14778
|
props = _objectWithoutProperties__default["default"](_ref2, _excluded$z);
|
|
14778
14779
|
var _useElementClick = useElementClick({
|
|
@@ -14781,9 +14782,9 @@ var StyledImageWithWrapper = function StyledImageWithWrapper(_ref2) {
|
|
|
14781
14782
|
}),
|
|
14782
14783
|
handleImageClick = _useElementClick.handleImageClick;
|
|
14783
14784
|
return /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
|
|
14784
|
-
className: classnames({
|
|
14785
|
+
className: classnames(_defineProperty__default["default"]({
|
|
14785
14786
|
"neeto-site-highlight__element": disableButtonAndLinks
|
|
14786
|
-
}),
|
|
14787
|
+
}, wrapperClassName, wrapperClassName)),
|
|
14787
14788
|
onClick: disableButtonAndLinks && handleImageClick
|
|
14788
14789
|
}, /*#__PURE__*/React__default["default"].createElement(StyledImage, props));
|
|
14789
14790
|
};
|
|
@@ -16239,22 +16240,23 @@ var useBreakpoints = function useBreakpoints(breakpointOverrides) {
|
|
|
16239
16240
|
};
|
|
16240
16241
|
var useBreakpoints$1 = useBreakpoints;
|
|
16241
16242
|
|
|
16242
|
-
var _excluded$u = ["isEmbedded", "src", "design"];
|
|
16243
|
+
var _excluded$u = ["isEmbedded", "src", "design", "videoUrl"];
|
|
16243
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; }
|
|
16244
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; }
|
|
16245
16246
|
var Media = function Media(_ref) {
|
|
16246
16247
|
var isEmbedded = _ref.isEmbedded,
|
|
16247
16248
|
src = _ref.src,
|
|
16248
16249
|
design = _ref.design,
|
|
16250
|
+
videoUrl = _ref.videoUrl,
|
|
16249
16251
|
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$u);
|
|
16250
16252
|
if (isEmbedded) {
|
|
16251
16253
|
var _design$width;
|
|
16252
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
|
|
16254
|
+
return videoUrl && /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
|
|
16253
16255
|
allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",
|
|
16254
16256
|
as: "iframe",
|
|
16255
16257
|
design: dissoc("width", design),
|
|
16256
16258
|
height: "300px",
|
|
16257
|
-
src: validateUrl(
|
|
16259
|
+
src: validateUrl(videoUrl),
|
|
16258
16260
|
width: "".concat((_design$width = design === null || design === void 0 ? void 0 : design.width) !== null && _design$width !== void 0 ? _design$width : "100", "%")
|
|
16259
16261
|
});
|
|
16260
16262
|
}
|
|
@@ -39641,10 +39643,12 @@ var FeatureWithDetails = function FeatureWithDetails(_ref) {
|
|
|
39641
39643
|
_properties$features = properties.features,
|
|
39642
39644
|
features = _properties$features === void 0 ? [] : _properties$features,
|
|
39643
39645
|
_properties$media = properties.media,
|
|
39644
|
-
|
|
39646
|
+
imageUrl = _properties$media.src,
|
|
39645
39647
|
mediaPosition = _properties$media.position,
|
|
39646
39648
|
isEmbedded = _properties$media.isEmbedded,
|
|
39649
|
+
videoUrl = _properties$media.videoUrl,
|
|
39647
39650
|
src = properties.backgroundImage.src;
|
|
39651
|
+
var mediaURL = isEmbedded ? videoUrl : imageUrl;
|
|
39648
39652
|
var baseClasses = "grid grid-cols-12 items-center sm:gap-x-2 lg:gap-x-4 grid-flow-row-dense";
|
|
39649
39653
|
var mediaBaseClasses = classnames("col-span-12 flex justify-center", {
|
|
39650
39654
|
"sm:col-span-7 sm:col-start-7 lg:col-span-6 lg:col-start-7": mediaPosition === POSITIONS.RIGHT.label,
|
|
@@ -39708,11 +39712,12 @@ var FeatureWithDetails = function FeatureWithDetails(_ref) {
|
|
|
39708
39712
|
className: mediaBaseClasses
|
|
39709
39713
|
}, /*#__PURE__*/React__default["default"].createElement(Media, {
|
|
39710
39714
|
isEmbedded: isEmbedded,
|
|
39715
|
+
videoUrl: videoUrl,
|
|
39711
39716
|
design: design.media,
|
|
39712
39717
|
disableButtonAndLinks: otherProps.disableButtonAndLinks,
|
|
39713
39718
|
id: "feature-with-details-media",
|
|
39714
39719
|
lgImageWidth: design.media.width,
|
|
39715
|
-
src:
|
|
39720
|
+
src: imageUrl
|
|
39716
39721
|
})));
|
|
39717
39722
|
};
|
|
39718
39723
|
|
|
@@ -39732,8 +39737,9 @@ var FeatureWithGrid = function FeatureWithGrid(_ref) {
|
|
|
39732
39737
|
_properties$features = properties.features,
|
|
39733
39738
|
features = _properties$features === void 0 ? [] : _properties$features,
|
|
39734
39739
|
_properties$media = properties.media,
|
|
39735
|
-
|
|
39740
|
+
imageURL = _properties$media.src,
|
|
39736
39741
|
isEmbedded = _properties$media.isEmbedded,
|
|
39742
|
+
videoUrl = _properties$media.videoUrl,
|
|
39737
39743
|
src = properties.backgroundImage.src;
|
|
39738
39744
|
var baseClasses = "grid grid-cols-12 gap-4";
|
|
39739
39745
|
var gridClasses = function gridClasses(index) {
|
|
@@ -39765,11 +39771,12 @@ var FeatureWithGrid = function FeatureWithGrid(_ref) {
|
|
|
39765
39771
|
style: design.description
|
|
39766
39772
|
}, otherProps), description), /*#__PURE__*/React__default["default"].createElement(Media, {
|
|
39767
39773
|
isEmbedded: isEmbedded,
|
|
39774
|
+
videoUrl: videoUrl,
|
|
39768
39775
|
className: "m-auto",
|
|
39769
39776
|
design: design.media,
|
|
39770
39777
|
disableButtonAndLinks: otherProps.disableButtonAndLinks,
|
|
39771
39778
|
id: "feature-with-grid-media",
|
|
39772
|
-
src:
|
|
39779
|
+
src: imageURL
|
|
39773
39780
|
})), features.map(function (_ref2, index) {
|
|
39774
39781
|
var featureTitle = _ref2.title,
|
|
39775
39782
|
featureDescription = _ref2.description,
|
|
@@ -39818,18 +39825,20 @@ var FeatureWithImage = function FeatureWithImage(_ref) {
|
|
|
39818
39825
|
description = _properties$content.description,
|
|
39819
39826
|
enableAnimation = properties.enableAnimation,
|
|
39820
39827
|
_properties$media = properties.media,
|
|
39821
|
-
|
|
39828
|
+
imageUrl = _properties$media.src,
|
|
39822
39829
|
mediaPosition = _properties$media.position,
|
|
39823
39830
|
isEmbedded = _properties$media.isEmbedded,
|
|
39831
|
+
videoUrl = _properties$media.videoUrl,
|
|
39824
39832
|
src = properties.backgroundImage.src;
|
|
39833
|
+
var mediaURL = isEmbedded ? videoUrl : imageUrl;
|
|
39825
39834
|
var baseClasses = "grid grid-cols-12 items-center grid-flow-row-dense";
|
|
39826
39835
|
var mediaBaseClasses = classnames("col-span-12 flex justify-center", {
|
|
39827
39836
|
"sm:col-span-6 sm:col-start-7": mediaPosition === POSITIONS.RIGHT.label,
|
|
39828
39837
|
"sm:col-span-6 sm:col-start-1": mediaPosition === POSITIONS.LEFT.label
|
|
39829
39838
|
});
|
|
39830
39839
|
var featureClasses = classnames("col-span-12", {
|
|
39831
|
-
"sm:col-span-5": mediaPosition === POSITIONS.RIGHT.label &&
|
|
39832
|
-
"sm:col-span-5 sm:col-start-8": mediaPosition === POSITIONS.LEFT.label &&
|
|
39840
|
+
"sm:col-span-5": mediaPosition === POSITIONS.RIGHT.label && mediaURL,
|
|
39841
|
+
"sm:col-span-5 sm:col-start-8": mediaPosition === POSITIONS.LEFT.label && mediaURL
|
|
39833
39842
|
});
|
|
39834
39843
|
return /*#__PURE__*/React__default["default"].createElement(BlockWrapper, {
|
|
39835
39844
|
className: className,
|
|
@@ -39855,11 +39864,12 @@ var FeatureWithImage = function FeatureWithImage(_ref) {
|
|
|
39855
39864
|
className: mediaBaseClasses
|
|
39856
39865
|
}, /*#__PURE__*/React__default["default"].createElement(Media, {
|
|
39857
39866
|
isEmbedded: isEmbedded,
|
|
39867
|
+
videoUrl: videoUrl,
|
|
39858
39868
|
design: design.media,
|
|
39859
39869
|
disableButtonAndLinks: otherProps.disableButtonAndLinks,
|
|
39860
39870
|
id: "feature-with-image-media",
|
|
39861
39871
|
lgImageWidth: design.media.width,
|
|
39862
|
-
src:
|
|
39872
|
+
src: imageUrl
|
|
39863
39873
|
})));
|
|
39864
39874
|
};
|
|
39865
39875
|
|
|
@@ -39930,10 +39940,12 @@ var FeatureWithList = function FeatureWithList(_ref) {
|
|
|
39930
39940
|
_properties$features = properties.features,
|
|
39931
39941
|
features = _properties$features === void 0 ? [] : _properties$features,
|
|
39932
39942
|
_properties$media = properties.media,
|
|
39933
|
-
|
|
39943
|
+
imageURL = _properties$media.src,
|
|
39934
39944
|
mediaPosition = _properties$media.position,
|
|
39935
39945
|
isEmbedded = _properties$media.isEmbedded,
|
|
39946
|
+
videoUrl = _properties$media.videoUrl,
|
|
39936
39947
|
src = properties.backgroundImage.src;
|
|
39948
|
+
var mediaURL = isEmbedded ? videoUrl : imageURL;
|
|
39937
39949
|
var baseClasses = "grid grid-cols-12 lg:gap-x-4 sm:gap-x-2 items-center grid-flow-row-dense";
|
|
39938
39950
|
var mediaBaseClasses = classnames("col-span-12 flex justify-center", {
|
|
39939
39951
|
"sm:col-span-6 sm:col-start-7": mediaPosition === POSITIONS.RIGHT.label,
|
|
@@ -39992,11 +40004,12 @@ var FeatureWithList = function FeatureWithList(_ref) {
|
|
|
39992
40004
|
className: mediaBaseClasses
|
|
39993
40005
|
}, /*#__PURE__*/React__default["default"].createElement(Media, {
|
|
39994
40006
|
isEmbedded: isEmbedded,
|
|
40007
|
+
videoUrl: videoUrl,
|
|
39995
40008
|
design: design.media,
|
|
39996
40009
|
disableButtonAndLinks: otherProps.disableButtonAndLinks,
|
|
39997
40010
|
id: "feature-with-list-media",
|
|
39998
40011
|
lgImageWidth: design.media.width,
|
|
39999
|
-
src:
|
|
40012
|
+
src: imageURL
|
|
40000
40013
|
})));
|
|
40001
40014
|
};
|
|
40002
40015
|
|
|
@@ -40121,7 +40134,8 @@ var FeatureWithProgressBar = function FeatureWithProgressBar(_ref) {
|
|
|
40121
40134
|
id: "feature-with-progress-bar-".concat(selectedTabId - 1, "-media"),
|
|
40122
40135
|
index: selectedTabId - 1,
|
|
40123
40136
|
isEmbedded: features[selectedTabId - 1].media.isEmbedded,
|
|
40124
|
-
src: features[selectedTabId - 1].media.src
|
|
40137
|
+
src: features[selectedTabId - 1].media.src,
|
|
40138
|
+
videoUrl: features[selectedTabId - 1].media.videoUrl
|
|
40125
40139
|
})));
|
|
40126
40140
|
};
|
|
40127
40141
|
|
|
@@ -42372,7 +42386,8 @@ var GalleryClassic = function GalleryClassic(_ref) {
|
|
|
42372
42386
|
className: "sliding-image",
|
|
42373
42387
|
design: style,
|
|
42374
42388
|
id: "gallery-classic-images-".concat(index, "-image"),
|
|
42375
|
-
title: caption
|
|
42389
|
+
title: caption,
|
|
42390
|
+
wrapperClassName: "h-full w-full"
|
|
42376
42391
|
}));
|
|
42377
42392
|
}))), /*#__PURE__*/React__default["default"].createElement(ArrowButton, {
|
|
42378
42393
|
Icon: ArrowRight$1,
|
|
@@ -42960,10 +42975,12 @@ var HeroWithCallToAction = function HeroWithCallToAction(_ref) {
|
|
|
42960
42975
|
description = _properties$content.description,
|
|
42961
42976
|
enableAnimation = properties.enableAnimation,
|
|
42962
42977
|
_properties$media = properties.media,
|
|
42963
|
-
|
|
42978
|
+
imageURL = _properties$media.src,
|
|
42964
42979
|
mediaPosition = _properties$media.position,
|
|
42965
42980
|
isEmbedded = _properties$media.isEmbedded,
|
|
42981
|
+
videoUrl = _properties$media.videoUrl,
|
|
42966
42982
|
src = properties.backgroundImage.src;
|
|
42983
|
+
var mediaURL = isEmbedded ? videoUrl : imageURL;
|
|
42967
42984
|
var baseClasses = "grid sm:gap-x-6 gap-y-6 grid-cols-12 items-center grid-flow-row-dense";
|
|
42968
42985
|
var mediaBaseClasses = classnames("col-span-12 col-start-1 flex justify-center", {
|
|
42969
42986
|
"sm:col-span-6 sm:col-start-1": POSITIONS.LEFT.label === mediaPosition,
|
|
@@ -43023,10 +43040,11 @@ var HeroWithCallToAction = function HeroWithCallToAction(_ref) {
|
|
|
43023
43040
|
className: mediaBaseClasses
|
|
43024
43041
|
}, /*#__PURE__*/React__default["default"].createElement(Media, {
|
|
43025
43042
|
isEmbedded: isEmbedded,
|
|
43043
|
+
videoUrl: videoUrl,
|
|
43026
43044
|
design: design.media,
|
|
43027
43045
|
disableButtonAndLinks: otherProps.disableButtonAndLinks,
|
|
43028
43046
|
id: "hero-with-call-to-action-media",
|
|
43029
|
-
src:
|
|
43047
|
+
src: imageURL
|
|
43030
43048
|
})));
|
|
43031
43049
|
};
|
|
43032
43050
|
|
|
@@ -43153,6 +43171,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
|
|
|
43153
43171
|
isEmbedded: media.isEmbedded,
|
|
43154
43172
|
lgImageSize: design.media.width,
|
|
43155
43173
|
src: media.src,
|
|
43174
|
+
videoUrl: media.videoUrl,
|
|
43156
43175
|
className: classnames({
|
|
43157
43176
|
"slider-image": media.position !== POSITIONS.BOTTOM.label || media.position !== POSITIONS.TOP.label
|
|
43158
43177
|
})
|
|
@@ -43176,9 +43195,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
|
|
|
43176
43195
|
}
|
|
43177
43196
|
}), /*#__PURE__*/React__default["default"].createElement(Swiper, {
|
|
43178
43197
|
loop: true,
|
|
43179
|
-
className:
|
|
43180
|
-
"pointer-events-none": disableButtonAndLinks
|
|
43181
|
-
}),
|
|
43198
|
+
className: "ns-hero-with-slider",
|
|
43182
43199
|
onSwiper: setSwiper
|
|
43183
43200
|
}, slides.map(function (_ref7, index) {
|
|
43184
43201
|
var content = _ref7.content,
|
|
@@ -43195,7 +43212,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
|
|
|
43195
43212
|
}));
|
|
43196
43213
|
}), /*#__PURE__*/React__default["default"].createElement(Pagination$1, {
|
|
43197
43214
|
swiper: swiper,
|
|
43198
|
-
className: "!
|
|
43215
|
+
className: "!relative"
|
|
43199
43216
|
})), /*#__PURE__*/React__default["default"].createElement(ArrowButton, {
|
|
43200
43217
|
Icon: ArrowRightS$1,
|
|
43201
43218
|
className: "hidden sm:flex",
|