@bigbinary/neeto-site-blocks 1.4.1 → 1.4.3
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 -37
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +41 -37
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -40996,7 +40996,7 @@ var HeaderWithButtons = function HeaderWithButtons(_ref) {
|
|
|
40996
40996
|
})
|
|
40997
40997
|
}, properties.links.map(function (link, index) {
|
|
40998
40998
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40999
|
-
isHighlighted: currentPath === link.to,
|
|
40999
|
+
isHighlighted: link.to && currentPath === link.to,
|
|
41000
41000
|
key: getUniqueKey(link.label, index),
|
|
41001
41001
|
style: design.links
|
|
41002
41002
|
}, link, otherProps));
|
|
@@ -41020,7 +41020,7 @@ var HeaderWithButtons = function HeaderWithButtons(_ref) {
|
|
|
41020
41020
|
className: "fadeIn col-span-2 col-start-1 ml-2 mt-3 block space-y-2 lg:hidden"
|
|
41021
41021
|
}, properties.links.map(function (button, index) {
|
|
41022
41022
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
41023
|
-
isHighlighted: currentPath === button.to,
|
|
41023
|
+
isHighlighted: button.to && currentPath === button.to,
|
|
41024
41024
|
key: getUniqueKey(button.to, button.label, index),
|
|
41025
41025
|
style: design.links
|
|
41026
41026
|
}, button, otherProps));
|
|
@@ -41066,7 +41066,7 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
41066
41066
|
className: "col-span-4 col-start-1 hidden items-center gap-6 lg:flex"
|
|
41067
41067
|
}, properties.links.map(function (link, index) {
|
|
41068
41068
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
41069
|
-
isHighlighted: currentPath === link.to,
|
|
41069
|
+
isHighlighted: link.to && currentPath === link.to,
|
|
41070
41070
|
key: getUniqueKey(link.label, index),
|
|
41071
41071
|
style: design.links
|
|
41072
41072
|
}, link, otherProps));
|
|
@@ -41113,7 +41113,7 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
41113
41113
|
}, properties.links.map(function (icon, index) {
|
|
41114
41114
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
41115
41115
|
className: "w-full",
|
|
41116
|
-
isHighlighted: currentPath === icon.to,
|
|
41116
|
+
isHighlighted: icon.to && currentPath === icon.to,
|
|
41117
41117
|
key: getUniqueKey(icon.url, icon.label, index),
|
|
41118
41118
|
style: design.links
|
|
41119
41119
|
}, icon));
|
|
@@ -41188,7 +41188,7 @@ var HeaderWithLogoTitle = function HeaderWithLogoTitle(_ref) {
|
|
|
41188
41188
|
}, properties.links.map(function (link, index) {
|
|
41189
41189
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
41190
41190
|
className: "hidden lg:inline",
|
|
41191
|
-
isHighlighted: currentPath === link.to,
|
|
41191
|
+
isHighlighted: link.to && currentPath === link.to,
|
|
41192
41192
|
key: getUniqueKey(link.label, link.to, index),
|
|
41193
41193
|
style: design.links
|
|
41194
41194
|
}, link, otherProps));
|
|
@@ -41216,7 +41216,7 @@ var HeaderWithLogoTitle = function HeaderWithLogoTitle(_ref) {
|
|
|
41216
41216
|
action: action,
|
|
41217
41217
|
label: label,
|
|
41218
41218
|
to: to,
|
|
41219
|
-
isHighlighted: currentPath === to,
|
|
41219
|
+
isHighlighted: to && currentPath === to,
|
|
41220
41220
|
key: getUniqueKey(to, label, index),
|
|
41221
41221
|
style: design.links
|
|
41222
41222
|
}, otherProps));
|
|
@@ -41299,7 +41299,7 @@ var HeroWithCallToAction = function HeroWithCallToAction(_ref) {
|
|
|
41299
41299
|
})));
|
|
41300
41300
|
};
|
|
41301
41301
|
|
|
41302
|
-
var _excluded$3 = ["configurations", "className", "id"];
|
|
41302
|
+
var _excluded$3 = ["configurations", "className", "id", "disableButtonAndLinks"];
|
|
41303
41303
|
function ownKeys(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; }
|
|
41304
41304
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
41305
41305
|
var HeroWithMultipleLayouts = function HeroWithMultipleLayouts(_ref) {
|
|
@@ -41307,6 +41307,7 @@ var HeroWithMultipleLayouts = function HeroWithMultipleLayouts(_ref) {
|
|
|
41307
41307
|
_ref$className = _ref.className,
|
|
41308
41308
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
41309
41309
|
id = _ref.id,
|
|
41310
|
+
disableButtonAndLinks = _ref.disableButtonAndLinks,
|
|
41310
41311
|
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$3);
|
|
41311
41312
|
var _useState = React.useState(0),
|
|
41312
41313
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
@@ -41323,11 +41324,11 @@ var HeroWithMultipleLayouts = function HeroWithMultipleLayouts(_ref) {
|
|
|
41323
41324
|
var src = _ref2.src,
|
|
41324
41325
|
position = _ref2.position,
|
|
41325
41326
|
isEmptyContent = _ref2.isEmptyContent;
|
|
41326
|
-
return classnames("
|
|
41327
|
-
"sm:col-start-1": src && position === POSITIONS.RIGHT.label,
|
|
41327
|
+
return classnames("col-span-12", {
|
|
41328
|
+
"sm:col-start-1 sm:col-span-6 ": src && position === POSITIONS.RIGHT.label,
|
|
41328
41329
|
"sm:col-span-8 sm:col-start-3": src && position === POSITIONS.BOTTOM.label,
|
|
41329
|
-
"sm:col-span-
|
|
41330
|
-
"sm:col-start-7": src && position === POSITIONS.LEFT.label,
|
|
41330
|
+
"sm:col-span-8 sm:col-start-3 flex flex-col justify-center order-2": src && position === POSITIONS.TOP.label,
|
|
41331
|
+
"sm:col-start-7 sm:col-span-6 ": src && position === POSITIONS.LEFT.label,
|
|
41331
41332
|
"flex flex-col justify-center sm:col-span-12": !src,
|
|
41332
41333
|
hidden: isEmptyContent
|
|
41333
41334
|
});
|
|
@@ -41428,11 +41429,17 @@ var HeroWithMultipleLayouts = function HeroWithMultipleLayouts(_ref) {
|
|
|
41428
41429
|
return (_swiperRef$current = swiperRef.current) === null || _swiperRef$current === void 0 ? void 0 : _swiperRef$current.slidePrev();
|
|
41429
41430
|
}
|
|
41430
41431
|
}), /*#__PURE__*/React__default["default"].createElement(Swiper, {
|
|
41431
|
-
|
|
41432
|
-
|
|
41432
|
+
keyboard: {
|
|
41433
|
+
enabled: true,
|
|
41434
|
+
onlyInViewport: true
|
|
41435
|
+
},
|
|
41436
|
+
modules: [Pagination, Keyboard],
|
|
41433
41437
|
pagination: {
|
|
41434
41438
|
clickable: true
|
|
41435
41439
|
},
|
|
41440
|
+
className: classnames("ns-hero-with-slider", {
|
|
41441
|
+
"pointer-events-none": disableButtonAndLinks
|
|
41442
|
+
}),
|
|
41436
41443
|
onSlideChange: function onSlideChange(swiper) {
|
|
41437
41444
|
return setActiveIndex(swiper.activeIndex);
|
|
41438
41445
|
},
|
|
@@ -41708,18 +41715,24 @@ var Slides = function Slides(_ref) {
|
|
|
41708
41715
|
var title = _ref2.title,
|
|
41709
41716
|
subTitle = _ref2.subTitle,
|
|
41710
41717
|
layout = _ref2.layout,
|
|
41711
|
-
imageUrl = _ref2.imageUrl
|
|
41718
|
+
imageUrl = _ref2.imageUrl,
|
|
41719
|
+
titleTextAlign = _ref2.titleTextAlign,
|
|
41720
|
+
subTitleTextAlign = _ref2.subTitleTextAlign;
|
|
41712
41721
|
if (layout === "titleWithSubTitle") {
|
|
41713
41722
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
41714
41723
|
className: "col-span-12"
|
|
41715
41724
|
}, /*#__PURE__*/React__default["default"].createElement(Typography$1, {
|
|
41716
41725
|
isTitle: true,
|
|
41717
41726
|
component: "h1",
|
|
41718
|
-
style: design.title
|
|
41727
|
+
style: mergeRight(design.title, {
|
|
41728
|
+
textAlign: titleTextAlign
|
|
41729
|
+
})
|
|
41719
41730
|
}, title), /*#__PURE__*/React__default["default"].createElement(Typography$1, {
|
|
41720
41731
|
isTitle: true,
|
|
41721
41732
|
component: "h1",
|
|
41722
|
-
style: design.subTitle
|
|
41733
|
+
style: mergeRight(design.subTitle, {
|
|
41734
|
+
textAlign: subTitleTextAlign
|
|
41735
|
+
})
|
|
41723
41736
|
}, subTitle));
|
|
41724
41737
|
}
|
|
41725
41738
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -41743,7 +41756,7 @@ var Slides = function Slides(_ref) {
|
|
|
41743
41756
|
swiperRef: swiperRef,
|
|
41744
41757
|
isStart: true,
|
|
41745
41758
|
Icon: ArrowLeftS$1,
|
|
41746
|
-
className: "absolute
|
|
41759
|
+
className: "z-20 hidden sm:absolute sm:top-1/2 sm:left-0 sm:flex lg:left-28",
|
|
41747
41760
|
onClick: function onClick() {
|
|
41748
41761
|
var _swiperRef$current;
|
|
41749
41762
|
return (_swiperRef$current = swiperRef.current) === null || _swiperRef$current === void 0 ? void 0 : _swiperRef$current.slidePrev();
|
|
@@ -41756,6 +41769,9 @@ var Slides = function Slides(_ref) {
|
|
|
41756
41769
|
},
|
|
41757
41770
|
modules: swiperModules,
|
|
41758
41771
|
spaceBetween: 10,
|
|
41772
|
+
className: classnames({
|
|
41773
|
+
"pointer-events-none": disableButtonAndLinks
|
|
41774
|
+
}),
|
|
41759
41775
|
history: {
|
|
41760
41776
|
key: pageUrl ? pageUrl.slice(1) : "slides",
|
|
41761
41777
|
root: hostUrl !== null && hostUrl !== void 0 ? hostUrl : window.location.origin
|
|
@@ -41766,41 +41782,29 @@ var Slides = function Slides(_ref) {
|
|
|
41766
41782
|
onSwiper: function onSwiper(swiper) {
|
|
41767
41783
|
swiperRef.current = swiper;
|
|
41768
41784
|
}
|
|
41769
|
-
}, slides.map(function (
|
|
41770
|
-
var title = _ref3.title,
|
|
41771
|
-
url = _ref3.url,
|
|
41772
|
-
logoUrl = _ref3.logoUrl,
|
|
41773
|
-
subTitle = _ref3.subTitle,
|
|
41774
|
-
layout = _ref3.layout,
|
|
41775
|
-
imageUrl = _ref3.imageUrl,
|
|
41776
|
-
backgroundImage = _ref3.backgroundImage;
|
|
41785
|
+
}, slides.map(function (slide, index) {
|
|
41777
41786
|
return /*#__PURE__*/React__default["default"].createElement(SwiperSlide, {
|
|
41778
41787
|
className: classnames("my-auto", className),
|
|
41779
|
-
"data-history": !disableButtonAndLinks ? url : "",
|
|
41780
|
-
key: getUniqueKey(title, index)
|
|
41788
|
+
"data-history": !disableButtonAndLinks ? slide.url : "",
|
|
41789
|
+
key: getUniqueKey(slide.title, index)
|
|
41781
41790
|
}, /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
|
|
41782
41791
|
isRootWrapper: true,
|
|
41783
41792
|
backgroundImage: mergeLeft({
|
|
41784
|
-
src: backgroundImage.src
|
|
41793
|
+
src: slide.backgroundImage.src
|
|
41785
41794
|
}, design.backgroundImage),
|
|
41786
41795
|
className: classnames("neeto-site-block-wrapper relative lg:w-9/12", baseClasses),
|
|
41787
41796
|
design: mergeRight(design.container, {
|
|
41788
41797
|
paddingHorizontal: design.body.paddingHorizontal
|
|
41789
41798
|
})
|
|
41790
|
-
}, logoUrl && /*#__PURE__*/React__default["default"].createElement("img", {
|
|
41799
|
+
}, slide.logoUrl && /*#__PURE__*/React__default["default"].createElement("img", {
|
|
41791
41800
|
className: "absolute top-8 right-12 w-20",
|
|
41792
|
-
src: logoUrl
|
|
41793
|
-
}), renderSwiperSlide(
|
|
41794
|
-
title: title,
|
|
41795
|
-
subTitle: subTitle,
|
|
41796
|
-
layout: layout,
|
|
41797
|
-
imageUrl: imageUrl
|
|
41798
|
-
})));
|
|
41801
|
+
src: slide.logoUrl
|
|
41802
|
+
}), renderSwiperSlide(slide)));
|
|
41799
41803
|
})), /*#__PURE__*/React__default["default"].createElement(PageNavigation, {
|
|
41800
41804
|
activeIndex: activeIndex,
|
|
41801
41805
|
swiperRef: swiperRef,
|
|
41802
41806
|
Icon: ArrowRightS$1,
|
|
41803
|
-
className: "absolute top-1/2 right-0
|
|
41807
|
+
className: "z-20 hidden sm:absolute sm:top-1/2 sm:right-0 sm:flex lg:right-28",
|
|
41804
41808
|
onClick: function onClick() {
|
|
41805
41809
|
var _swiperRef$current2;
|
|
41806
41810
|
return (_swiperRef$current2 = swiperRef.current) === null || _swiperRef$current2 === void 0 ? void 0 : _swiperRef$current2.slideNext();
|