@bigbinary/neeto-site-blocks 1.4.2 → 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 CHANGED
@@ -41715,18 +41715,24 @@ var Slides = function Slides(_ref) {
41715
41715
  var title = _ref2.title,
41716
41716
  subTitle = _ref2.subTitle,
41717
41717
  layout = _ref2.layout,
41718
- imageUrl = _ref2.imageUrl;
41718
+ imageUrl = _ref2.imageUrl,
41719
+ titleTextAlign = _ref2.titleTextAlign,
41720
+ subTitleTextAlign = _ref2.subTitleTextAlign;
41719
41721
  if (layout === "titleWithSubTitle") {
41720
41722
  return /*#__PURE__*/React__default["default"].createElement("div", {
41721
41723
  className: "col-span-12"
41722
41724
  }, /*#__PURE__*/React__default["default"].createElement(Typography$1, {
41723
41725
  isTitle: true,
41724
41726
  component: "h1",
41725
- style: design.title
41727
+ style: mergeRight(design.title, {
41728
+ textAlign: titleTextAlign
41729
+ })
41726
41730
  }, title), /*#__PURE__*/React__default["default"].createElement(Typography$1, {
41727
41731
  isTitle: true,
41728
41732
  component: "h1",
41729
- style: design.subTitle
41733
+ style: mergeRight(design.subTitle, {
41734
+ textAlign: subTitleTextAlign
41735
+ })
41730
41736
  }, subTitle));
41731
41737
  }
41732
41738
  return /*#__PURE__*/React__default["default"].createElement("div", {
@@ -41750,7 +41756,7 @@ var Slides = function Slides(_ref) {
41750
41756
  swiperRef: swiperRef,
41751
41757
  isStart: true,
41752
41758
  Icon: ArrowLeftS$1,
41753
- className: "absolute left-0 top-1/2 z-20 sm:left-2 lg:left-28",
41759
+ className: "z-20 hidden sm:absolute sm:top-1/2 sm:left-0 sm:flex lg:left-28",
41754
41760
  onClick: function onClick() {
41755
41761
  var _swiperRef$current;
41756
41762
  return (_swiperRef$current = swiperRef.current) === null || _swiperRef$current === void 0 ? void 0 : _swiperRef$current.slidePrev();
@@ -41763,6 +41769,9 @@ var Slides = function Slides(_ref) {
41763
41769
  },
41764
41770
  modules: swiperModules,
41765
41771
  spaceBetween: 10,
41772
+ className: classnames({
41773
+ "pointer-events-none": disableButtonAndLinks
41774
+ }),
41766
41775
  history: {
41767
41776
  key: pageUrl ? pageUrl.slice(1) : "slides",
41768
41777
  root: hostUrl !== null && hostUrl !== void 0 ? hostUrl : window.location.origin
@@ -41773,41 +41782,29 @@ var Slides = function Slides(_ref) {
41773
41782
  onSwiper: function onSwiper(swiper) {
41774
41783
  swiperRef.current = swiper;
41775
41784
  }
41776
- }, slides.map(function (_ref3, index) {
41777
- var title = _ref3.title,
41778
- url = _ref3.url,
41779
- logoUrl = _ref3.logoUrl,
41780
- subTitle = _ref3.subTitle,
41781
- layout = _ref3.layout,
41782
- imageUrl = _ref3.imageUrl,
41783
- backgroundImage = _ref3.backgroundImage;
41785
+ }, slides.map(function (slide, index) {
41784
41786
  return /*#__PURE__*/React__default["default"].createElement(SwiperSlide, {
41785
41787
  className: classnames("my-auto", className),
41786
- "data-history": !disableButtonAndLinks ? url : "",
41787
- key: getUniqueKey(title, index)
41788
+ "data-history": !disableButtonAndLinks ? slide.url : "",
41789
+ key: getUniqueKey(slide.title, index)
41788
41790
  }, /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
41789
41791
  isRootWrapper: true,
41790
41792
  backgroundImage: mergeLeft({
41791
- src: backgroundImage.src
41793
+ src: slide.backgroundImage.src
41792
41794
  }, design.backgroundImage),
41793
41795
  className: classnames("neeto-site-block-wrapper relative lg:w-9/12", baseClasses),
41794
41796
  design: mergeRight(design.container, {
41795
41797
  paddingHorizontal: design.body.paddingHorizontal
41796
41798
  })
41797
- }, logoUrl && /*#__PURE__*/React__default["default"].createElement("img", {
41799
+ }, slide.logoUrl && /*#__PURE__*/React__default["default"].createElement("img", {
41798
41800
  className: "absolute top-8 right-12 w-20",
41799
- src: logoUrl
41800
- }), renderSwiperSlide({
41801
- title: title,
41802
- subTitle: subTitle,
41803
- layout: layout,
41804
- imageUrl: imageUrl
41805
- })));
41801
+ src: slide.logoUrl
41802
+ }), renderSwiperSlide(slide)));
41806
41803
  })), /*#__PURE__*/React__default["default"].createElement(PageNavigation, {
41807
41804
  activeIndex: activeIndex,
41808
41805
  swiperRef: swiperRef,
41809
41806
  Icon: ArrowRightS$1,
41810
- className: "absolute top-1/2 right-0 z-20 sm:right-2 lg:right-28",
41807
+ className: "z-20 hidden sm:absolute sm:top-1/2 sm:right-0 sm:flex lg:right-28",
41811
41808
  onClick: function onClick() {
41812
41809
  var _swiperRef$current2;
41813
41810
  return (_swiperRef$current2 = swiperRef.current) === null || _swiperRef$current2 === void 0 ? void 0 : _swiperRef$current2.slideNext();