@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.js CHANGED
@@ -41669,18 +41669,24 @@ var Slides = function Slides(_ref) {
41669
41669
  var title = _ref2.title,
41670
41670
  subTitle = _ref2.subTitle,
41671
41671
  layout = _ref2.layout,
41672
- imageUrl = _ref2.imageUrl;
41672
+ imageUrl = _ref2.imageUrl,
41673
+ titleTextAlign = _ref2.titleTextAlign,
41674
+ subTitleTextAlign = _ref2.subTitleTextAlign;
41673
41675
  if (layout === "titleWithSubTitle") {
41674
41676
  return /*#__PURE__*/React__default.createElement("div", {
41675
41677
  className: "col-span-12"
41676
41678
  }, /*#__PURE__*/React__default.createElement(Typography$1, {
41677
41679
  isTitle: true,
41678
41680
  component: "h1",
41679
- style: design.title
41681
+ style: mergeRight(design.title, {
41682
+ textAlign: titleTextAlign
41683
+ })
41680
41684
  }, title), /*#__PURE__*/React__default.createElement(Typography$1, {
41681
41685
  isTitle: true,
41682
41686
  component: "h1",
41683
- style: design.subTitle
41687
+ style: mergeRight(design.subTitle, {
41688
+ textAlign: subTitleTextAlign
41689
+ })
41684
41690
  }, subTitle));
41685
41691
  }
41686
41692
  return /*#__PURE__*/React__default.createElement("div", {
@@ -41704,7 +41710,7 @@ var Slides = function Slides(_ref) {
41704
41710
  swiperRef: swiperRef,
41705
41711
  isStart: true,
41706
41712
  Icon: ArrowLeftS$1,
41707
- className: "absolute left-0 top-1/2 z-20 sm:left-2 lg:left-28",
41713
+ className: "z-20 hidden sm:absolute sm:top-1/2 sm:left-0 sm:flex lg:left-28",
41708
41714
  onClick: function onClick() {
41709
41715
  var _swiperRef$current;
41710
41716
  return (_swiperRef$current = swiperRef.current) === null || _swiperRef$current === void 0 ? void 0 : _swiperRef$current.slidePrev();
@@ -41717,6 +41723,9 @@ var Slides = function Slides(_ref) {
41717
41723
  },
41718
41724
  modules: swiperModules,
41719
41725
  spaceBetween: 10,
41726
+ className: classnames({
41727
+ "pointer-events-none": disableButtonAndLinks
41728
+ }),
41720
41729
  history: {
41721
41730
  key: pageUrl ? pageUrl.slice(1) : "slides",
41722
41731
  root: hostUrl !== null && hostUrl !== void 0 ? hostUrl : window.location.origin
@@ -41727,41 +41736,29 @@ var Slides = function Slides(_ref) {
41727
41736
  onSwiper: function onSwiper(swiper) {
41728
41737
  swiperRef.current = swiper;
41729
41738
  }
41730
- }, slides.map(function (_ref3, index) {
41731
- var title = _ref3.title,
41732
- url = _ref3.url,
41733
- logoUrl = _ref3.logoUrl,
41734
- subTitle = _ref3.subTitle,
41735
- layout = _ref3.layout,
41736
- imageUrl = _ref3.imageUrl,
41737
- backgroundImage = _ref3.backgroundImage;
41739
+ }, slides.map(function (slide, index) {
41738
41740
  return /*#__PURE__*/React__default.createElement(SwiperSlide, {
41739
41741
  className: classnames("my-auto", className),
41740
- "data-history": !disableButtonAndLinks ? url : "",
41741
- key: getUniqueKey(title, index)
41742
+ "data-history": !disableButtonAndLinks ? slide.url : "",
41743
+ key: getUniqueKey(slide.title, index)
41742
41744
  }, /*#__PURE__*/React__default.createElement(StyledWrapper, {
41743
41745
  isRootWrapper: true,
41744
41746
  backgroundImage: mergeLeft({
41745
- src: backgroundImage.src
41747
+ src: slide.backgroundImage.src
41746
41748
  }, design.backgroundImage),
41747
41749
  className: classnames("neeto-site-block-wrapper relative lg:w-9/12", baseClasses),
41748
41750
  design: mergeRight(design.container, {
41749
41751
  paddingHorizontal: design.body.paddingHorizontal
41750
41752
  })
41751
- }, logoUrl && /*#__PURE__*/React__default.createElement("img", {
41753
+ }, slide.logoUrl && /*#__PURE__*/React__default.createElement("img", {
41752
41754
  className: "absolute top-8 right-12 w-20",
41753
- src: logoUrl
41754
- }), renderSwiperSlide({
41755
- title: title,
41756
- subTitle: subTitle,
41757
- layout: layout,
41758
- imageUrl: imageUrl
41759
- })));
41755
+ src: slide.logoUrl
41756
+ }), renderSwiperSlide(slide)));
41760
41757
  })), /*#__PURE__*/React__default.createElement(PageNavigation, {
41761
41758
  activeIndex: activeIndex,
41762
41759
  swiperRef: swiperRef,
41763
41760
  Icon: ArrowRightS$1,
41764
- className: "absolute top-1/2 right-0 z-20 sm:right-2 lg:right-28",
41761
+ className: "z-20 hidden sm:absolute sm:top-1/2 sm:right-0 sm:flex lg:right-28",
41765
41762
  onClick: function onClick() {
41766
41763
  var _swiperRef$current2;
41767
41764
  return (_swiperRef$current2 = swiperRef.current) === null || _swiperRef$current2 === void 0 ? void 0 : _swiperRef$current2.slideNext();