@bigbinary/neeto-site-blocks 1.16.1 → 1.16.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
@@ -13035,6 +13035,7 @@ var CardsInGridView = function CardsInGridView(_ref) {
13035
13035
  });
13036
13036
  };
13037
13037
  if (isSliderView) {
13038
+ var isNavigationButtonEnabled = cards.length > 2;
13038
13039
  return /*#__PURE__*/jsxRuntime.jsxs(BlockWrapper, {
13039
13040
  className: className,
13040
13041
  enableAnimation: enableAnimation,
@@ -13055,7 +13056,7 @@ var CardsInGridView = function CardsInGridView(_ref) {
13055
13056
  style: design.title
13056
13057
  }, otherProps), {}, {
13057
13058
  children: title
13058
- })), /*#__PURE__*/jsxRuntime.jsx(ArrowButton, {
13059
+ })), isNavigationButtonEnabled && /*#__PURE__*/jsxRuntime.jsx(ArrowButton, {
13059
13060
  isStart: true,
13060
13061
  Icon: ArrowLeft$1,
13061
13062
  className: "flex-shrink-0",
@@ -13074,7 +13075,7 @@ var CardsInGridView = function CardsInGridView(_ref) {
13074
13075
  spaceBetween: 10,
13075
13076
  breakpoints: {
13076
13077
  480: {
13077
- slidesPerView: 2,
13078
+ slidesPerView: cards.length > 1 ? 2 : 1,
13078
13079
  spaceBetween: 15
13079
13080
  }
13080
13081
  },
@@ -13094,8 +13095,8 @@ var CardsInGridView = function CardsInGridView(_ref) {
13094
13095
  }))
13095
13096
  }, getUniqueKey(card.title, card.description, index));
13096
13097
  })
13097
- })
13098
- }), /*#__PURE__*/jsxRuntime.jsx(ArrowButton, {
13098
+ }, cards.length)
13099
+ }), isNavigationButtonEnabled && /*#__PURE__*/jsxRuntime.jsx(ArrowButton, {
13099
13100
  Icon: ArrowRight$1,
13100
13101
  className: "flex-shrink-0",
13101
13102
  isActive: activeIndex < cards.length - 2,
@@ -15130,6 +15131,7 @@ var GalleryClassic = function GalleryClassic(_ref) {
15130
15131
  images = _properties$images === void 0 ? [] : _properties$images,
15131
15132
  src = properties.backgroundImage.src;
15132
15133
  var baseClasses = "grid grid-cols-12 items-center gap-y-8";
15134
+ var isNavigationEnabled = images.length > 2;
15133
15135
  return /*#__PURE__*/jsxRuntime.jsxs(BlockWrapper, {
15134
15136
  className: className,
15135
15137
  enableAnimation: enableAnimation,
@@ -15156,7 +15158,7 @@ var GalleryClassic = function GalleryClassic(_ref) {
15156
15158
  style: design.description,
15157
15159
  children: description
15158
15160
  })]
15159
- }), /*#__PURE__*/jsxRuntime.jsx(ArrowButton, {
15161
+ }), isNavigationEnabled && /*#__PURE__*/jsxRuntime.jsx(ArrowButton, {
15160
15162
  isStart: true,
15161
15163
  Icon: ArrowLeft$1,
15162
15164
  className: "hidden justify-center sm:flex",
@@ -15173,7 +15175,7 @@ var GalleryClassic = function GalleryClassic(_ref) {
15173
15175
  spaceBetween: 10,
15174
15176
  breakpoints: {
15175
15177
  640: {
15176
- slidesPerView: 2,
15178
+ slidesPerView: images.length > 1 ? 2 : 1,
15177
15179
  spaceBetween: 10
15178
15180
  }
15179
15181
  },
@@ -15199,11 +15201,11 @@ var GalleryClassic = function GalleryClassic(_ref) {
15199
15201
  })
15200
15202
  }, getUniqueKey(src, title, index));
15201
15203
  })
15202
- }), /*#__PURE__*/jsxRuntime.jsx(Pagination, {
15204
+ }, images.length), isNavigationEnabled && /*#__PURE__*/jsxRuntime.jsx(Pagination, {
15203
15205
  swiper: swiper,
15204
15206
  design: design.button
15205
15207
  })]
15206
- }), /*#__PURE__*/jsxRuntime.jsx(ArrowButton, {
15208
+ }), isNavigationEnabled && /*#__PURE__*/jsxRuntime.jsx(ArrowButton, {
15207
15209
  Icon: ArrowRight$1,
15208
15210
  className: "hidden justify-center sm:flex",
15209
15211
  design: design.navigationButtons,
@@ -16075,8 +16077,8 @@ var GalleryWithAutoplay = function GalleryWithAutoplay(_ref) {
16075
16077
  })
16076
16078
  }, getUniqueKey(src, title, index));
16077
16079
  })
16078
- })
16079
- }), /*#__PURE__*/jsxRuntime.jsx("div", {
16080
+ }, images.length)
16081
+ }), images.length > 1 && /*#__PURE__*/jsxRuntime.jsx("div", {
16080
16082
  className: "col-span-12 flex justify-center",
16081
16083
  children: /*#__PURE__*/jsxRuntime.jsx(Pagination, {
16082
16084
  swiper: swiper,
@@ -16366,6 +16368,8 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
16366
16368
  var position = properties.position;
16367
16369
  var headerIntersectorRef = React.useRef(null);
16368
16370
  var isHeadingWrapperVisible = useElementVisible(headerIntersectorRef);
16371
+ var logo = properties.logo,
16372
+ links = properties.links;
16369
16373
  var baseClasses = "grid grid-cols-12 sm:gap-x-4 items-center grid-flow-row-dense";
16370
16374
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
16371
16375
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
@@ -16380,8 +16384,10 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
16380
16384
  "neeto-site-sticky-header--scroll": !isHeadingWrapperVisible
16381
16385
  }, className),
16382
16386
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
16383
- className: "col-span-5 col-start-1 hidden items-center gap-6 lg:flex",
16384
- children: properties.links.map(function (link, index) {
16387
+ className: classnames__default["default"]("col-span-5 col-start-1 hidden items-center gap-6 lg:flex", {
16388
+ "lg:col-start-4 lg:justify-center": logo.position === POSITIONS.LEFT.label
16389
+ }),
16390
+ children: links.map(function (link, index) {
16385
16391
  return /*#__PURE__*/jsxRuntime.jsx(Link, _objectSpread$7(_objectSpread$7({
16386
16392
  isHighlighted: isLinkHighlighted(link.to, currentPath),
16387
16393
  style: design.links
@@ -16392,19 +16398,22 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
16392
16398
  }, otherProps), getUniqueKey(link.label, index));
16393
16399
  })
16394
16400
  }), /*#__PURE__*/jsxRuntime.jsx(Link, _objectSpread$7(_objectSpread$7({
16395
- action: properties.logo.action,
16396
- className: "col-span-6 col-start-4 m-auto flex max-h-8 justify-center sm:col-span-4 sm:col-start-5 sm:max-h-10 lg:col-span-3 lg:col-start-6 lg:max-h-14",
16397
- to: properties.logo.to
16401
+ action: logo.action,
16402
+ to: logo.to,
16403
+ className: classnames__default["default"]("col-span-6 col-start-4 m-auto flex max-h-8 justify-center sm:col-span-4 sm:col-start-5 sm:max-h-10 lg:col-span-3 lg:max-h-14", {
16404
+ "lg:col-start-1": logo.position === POSITIONS.LEFT.label,
16405
+ "lg:col-start-6": logo.position === POSITIONS.RIGHT.label
16406
+ })
16398
16407
  }, otherProps), {}, {
16399
16408
  children: /*#__PURE__*/jsxRuntime.jsx(StyledImage$1, {
16400
16409
  image: image,
16401
16410
  priority: true,
16402
- alt: properties.logo.alt,
16411
+ alt: logo.alt,
16403
16412
  design: design.logo,
16404
16413
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
16405
16414
  id: "header-with-icons-logo",
16406
16415
  isAddNewPane: otherProps.isAddNewPane,
16407
- src: properties.logo.src
16416
+ src: logo.src
16408
16417
  })
16409
16418
  })), /*#__PURE__*/jsxRuntime.jsx("div", {
16410
16419
  className: "col-span-5 col-start-8 hidden justify-end sm:col-span-3 sm:col-start-10 sm:flex",
@@ -16445,7 +16454,7 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
16445
16454
  })
16446
16455
  }), isLinksOpen && /*#__PURE__*/jsxRuntime.jsxs("div", {
16447
16456
  className: "fadeIn col-span-12 col-start-1 my-6 flex flex-col gap-y-6 lg:hidden",
16448
- children: [properties.links.map(function (icon, index) {
16457
+ children: [links.map(function (icon, index) {
16449
16458
  return /*#__PURE__*/jsxRuntime.jsx(Link, _objectSpread$7({
16450
16459
  className: "w-fit",
16451
16460
  id: "header-with-icons-links-".concat(index, "-link"),
@@ -17482,12 +17491,12 @@ var TestimonialWithSlider = function TestimonialWithSlider(_ref) {
17482
17491
  })]
17483
17492
  })
17484
17493
  }, getUniqueKey(testimonialDescription, logoUrl, index));
17485
- }), /*#__PURE__*/jsxRuntime.jsx(Pagination, {
17494
+ }), testimonials.length > 1 && /*#__PURE__*/jsxRuntime.jsx(Pagination, {
17486
17495
  swiper: swiper,
17487
17496
  hasNavigation: true,
17488
17497
  design: design.buttons
17489
17498
  })]
17490
- })
17499
+ }, testimonials.length)
17491
17500
  }), isButtonRequired && /*#__PURE__*/jsxRuntime.jsx(StyledWrapper, {
17492
17501
  className: "col-span-12 flex",
17493
17502
  design: {