@bigbinary/neeto-site-blocks 1.16.9 → 1.16.11

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
@@ -5546,7 +5546,7 @@ var StyledWrapper = styled__default["default"].div.attrs(function (props) {
5546
5546
  className: generateResponsiveStyles(props.design)
5547
5547
  };
5548
5548
  })(function (_ref) {
5549
- var _design$border, _design$borderTop, _design$borderTop2, _design$borderTop3, _design$borderBottom, _design$borderBottom2, _design$borderBottom3, _design$borderRight, _design$borderLeft, _design$border2;
5549
+ var _design$border, _design$borderTop, _design$borderTop2, _design$border2, _design$borderTop3, _design$borderBottom, _design$borderBottom2, _design$borderBottom3, _design$borderRight, _design$borderLeft, _design$border3;
5550
5550
  var _ref$design = _ref.design,
5551
5551
  design = _ref$design === void 0 ? {} : _ref$design,
5552
5552
  _ref$backgroundImage = _ref.backgroundImage,
@@ -5555,13 +5555,14 @@ var StyledWrapper = styled__default["default"].div.attrs(function (props) {
5555
5555
  borderColor: (_design$border = design.border) === null || _design$border === void 0 ? void 0 : _design$border.borderColor,
5556
5556
  borderTopColor: (_design$borderTop = design.borderTop) === null || _design$borderTop === void 0 ? void 0 : _design$borderTop.borderColor,
5557
5557
  borderTopWidth: (_design$borderTop2 = design.borderTop) === null || _design$borderTop2 === void 0 ? void 0 : _design$borderTop2.borderWidth,
5558
+ borderStyle: (_design$border2 = design.border) === null || _design$border2 === void 0 ? void 0 : _design$border2.borderStyle,
5558
5559
  borderTopStyle: (_design$borderTop3 = design.borderTop) === null || _design$borderTop3 === void 0 ? void 0 : _design$borderTop3.borderStyle,
5559
5560
  borderBottomStyle: (_design$borderBottom = design.borderBottom) === null || _design$borderBottom === void 0 ? void 0 : _design$borderBottom.borderStyle,
5560
5561
  borderBottomWidth: (_design$borderBottom2 = design.borderBottom) === null || _design$borderBottom2 === void 0 ? void 0 : _design$borderBottom2.borderWidth,
5561
5562
  borderBottomColor: (_design$borderBottom3 = design.borderBottom) === null || _design$borderBottom3 === void 0 ? void 0 : _design$borderBottom3.borderColor,
5562
5563
  borderRightColor: (_design$borderRight = design.borderRight) === null || _design$borderRight === void 0 ? void 0 : _design$borderRight.borderColor,
5563
5564
  borderLeftColor: (_design$borderLeft = design.borderLeft) === null || _design$borderLeft === void 0 ? void 0 : _design$borderLeft.borderColor,
5564
- borderWidth: (_design$border2 = design.border) === null || _design$border2 === void 0 ? void 0 : _design$border2.borderWidth
5565
+ borderWidth: (_design$border3 = design.border) === null || _design$border3 === void 0 ? void 0 : _design$border3.borderWidth
5565
5566
  };
5566
5567
  var borderColorStyles = ramda.pickBy(ramda.identity, borderColors);
5567
5568
  var backgroundStyles = _objectSpread$G({
@@ -13061,6 +13062,7 @@ var CardsInGridView = function CardsInGridView(_ref) {
13061
13062
  isStart: true,
13062
13063
  Icon: ArrowLeft$1,
13063
13064
  className: "flex-shrink-0",
13065
+ design: design.navigationButtons,
13064
13066
  isActive: activeIndex > 0,
13065
13067
  onClick: function onClick() {
13066
13068
  var _swiperRef$current;
@@ -13100,6 +13102,7 @@ var CardsInGridView = function CardsInGridView(_ref) {
13100
13102
  }), isNavigationButtonEnabled && /*#__PURE__*/jsxRuntime.jsx(ArrowButton, {
13101
13103
  Icon: ArrowRight$1,
13102
13104
  className: "flex-shrink-0",
13105
+ design: design.navigationButtons,
13103
13106
  isActive: activeIndex < cards.length - 2,
13104
13107
  onClick: function onClick() {
13105
13108
  var _swiperRef$current2;
@@ -14565,13 +14568,14 @@ var _excluded$e = ["configurations", "className", "id", "image"];
14565
14568
  function ownKeys$e(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; }
14566
14569
  function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$e(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$e(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
14567
14570
  var FeatureWithProgressBar = function FeatureWithProgressBar(_ref) {
14571
+ var _features, _features2, _features3, _features4, _features5;
14568
14572
  var configurations = _ref.configurations,
14569
14573
  _ref$className = _ref.className,
14570
14574
  className = _ref$className === void 0 ? "" : _ref$className,
14571
14575
  id = _ref.id,
14572
14576
  image = _ref.image,
14573
14577
  otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$e);
14574
- var _useState = React.useState(configurations.properties.features[0].id),
14578
+ var _useState = React.useState(configurations.properties.features[0].position),
14575
14579
  _useState2 = _slicedToArray__default["default"](_useState, 2),
14576
14580
  selectedTabId = _useState2[0],
14577
14581
  setSelectedTabId = _useState2[1];
@@ -14619,6 +14623,15 @@ var FeatureWithProgressBar = function FeatureWithProgressBar(_ref) {
14619
14623
  return clearInterval(id);
14620
14624
  };
14621
14625
  }, [selectedTabId]);
14626
+ React.useEffect(function () {
14627
+ var tabExists = neetoCist.existsBy({
14628
+ position: selectedTabId
14629
+ }, features);
14630
+ if (!tabExists && neetoCist.isNotEmpty(features)) {
14631
+ clearInterval(intervalId);
14632
+ setSelectedTabId(features[0].position);
14633
+ }
14634
+ }, [features.length]);
14622
14635
  var imageBaseClasses = classnames__default["default"]("col-span-12 flex justify-center", {
14623
14636
  "lg:col-start-7": contentPosition === POSITIONS.LEFT.label,
14624
14637
  "lg:col-span-6": contentPosition === POSITIONS.RIGHT.label
@@ -14652,13 +14665,13 @@ var FeatureWithProgressBar = function FeatureWithProgressBar(_ref) {
14652
14665
  children: description
14653
14666
  })), features.map(function (_ref2, index) {
14654
14667
  var featureTitle = _ref2.title,
14655
- id = _ref2.id;
14668
+ position = _ref2.position;
14656
14669
  return /*#__PURE__*/React.createElement(MotionWrapper, {
14657
14670
  enableAnimation: enableAnimation,
14658
14671
  className: "relative cursor-pointer",
14659
14672
  key: getUniqueKey(featureTitle, index),
14660
14673
  onClick: function onClick() {
14661
- return handleTabClick(id);
14674
+ return handleTabClick(position);
14662
14675
  }
14663
14676
  }, /*#__PURE__*/jsxRuntime.jsx(Typography$1, _objectSpread$e(_objectSpread$e({
14664
14677
  index: index,
@@ -14674,7 +14687,7 @@ var FeatureWithProgressBar = function FeatureWithProgressBar(_ref) {
14674
14687
  backgroundColor: "#E6E6E6",
14675
14688
  height: "1px"
14676
14689
  },
14677
- children: selectedTabId === id && /*#__PURE__*/jsxRuntime.jsx(StyledWrapper, {
14690
+ children: selectedTabId === position && /*#__PURE__*/jsxRuntime.jsx(StyledWrapper, {
14678
14691
  className: "h-full rounded-xl transition-all duration-300 ease-in-out",
14679
14692
  design: {
14680
14693
  width: "0%",
@@ -14688,16 +14701,16 @@ var FeatureWithProgressBar = function FeatureWithProgressBar(_ref) {
14688
14701
  className: imageBaseClasses,
14689
14702
  children: /*#__PURE__*/jsxRuntime.jsx(Media, {
14690
14703
  image: image,
14691
- alt: features[selectedTabId - 1].media.alt,
14692
- autoPlay: features[selectedTabId - 1].media.autoPlay,
14704
+ alt: (_features = features[selectedTabId - 1]) === null || _features === void 0 ? void 0 : _features.media.alt,
14705
+ autoPlay: (_features2 = features[selectedTabId - 1]) === null || _features2 === void 0 ? void 0 : _features2.media.autoPlay,
14693
14706
  design: design.media,
14694
14707
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
14695
14708
  id: "feature-with-progress-bar-".concat(selectedTabId - 1, "-media"),
14696
14709
  index: selectedTabId - 1,
14697
14710
  isAddNewPane: otherProps.isAddNewPane,
14698
- isEmbedded: features[selectedTabId - 1].media.isEmbedded,
14699
- src: features[selectedTabId - 1].media.src,
14700
- videoUrl: features[selectedTabId - 1].media.videoUrl,
14711
+ isEmbedded: (_features3 = features[selectedTabId - 1]) === null || _features3 === void 0 ? void 0 : _features3.media.isEmbedded,
14712
+ src: (_features4 = features[selectedTabId - 1]) === null || _features4 === void 0 ? void 0 : _features4.media.src,
14713
+ videoUrl: (_features5 = features[selectedTabId - 1]) === null || _features5 === void 0 ? void 0 : _features5.media.videoUrl,
14701
14714
  wrapperClassName: "h-full w-full"
14702
14715
  })
14703
14716
  })]