@bigbinary/neeto-site-blocks 1.10.3 → 1.10.5

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
@@ -3526,6 +3526,45 @@ _curry2(function mergeRight(l, r) {
3526
3526
  return _objectAssign$1({}, l, r);
3527
3527
  });
3528
3528
 
3529
+ /**
3530
+ * Returns a partial copy of an object omitting the keys specified.
3531
+ *
3532
+ * @func
3533
+ * @memberOf R
3534
+ * @since v0.1.0
3535
+ * @category Object
3536
+ * @sig [String] -> {String: *} -> {String: *}
3537
+ * @param {Array} names an array of String property names to omit from the new object
3538
+ * @param {Object} obj The object to copy from
3539
+ * @return {Object} A new object with properties from `names` not on it.
3540
+ * @see R.pick
3541
+ * @example
3542
+ *
3543
+ * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}
3544
+ */
3545
+
3546
+ var omit =
3547
+ /*#__PURE__*/
3548
+ _curry2(function omit(names, obj) {
3549
+ var result = {};
3550
+ var index = {};
3551
+ var idx = 0;
3552
+ var len = names.length;
3553
+
3554
+ while (idx < len) {
3555
+ index[names[idx]] = 1;
3556
+ idx += 1;
3557
+ }
3558
+
3559
+ for (var prop in obj) {
3560
+ if (!index.hasOwnProperty(prop)) {
3561
+ result[prop] = obj[prop];
3562
+ }
3563
+ }
3564
+
3565
+ return result;
3566
+ });
3567
+
3529
3568
  /**
3530
3569
  * Returns a partial copy of an object containing only the keys that satisfy
3531
3570
  * the supplied predicate.
@@ -16667,7 +16706,8 @@ var Button = function Button(_ref) {
16667
16706
  id = _ref.id,
16668
16707
  index = _ref.index;
16669
16708
  var anchorBaseClass = classnames("inline-flex items-center justify-center transition-all duration-300 ease-in-out", {
16670
- "neeto-site-highlight__element after:z-10": disableButtonAndLinks
16709
+ "neeto-site-highlight__element after:z-10": disableButtonAndLinks,
16710
+ "pointer-events-none": !disableButtonAndLinks && action === ""
16671
16711
  });
16672
16712
  var _useElementClick = useElementClick({
16673
16713
  id: id,
@@ -16733,7 +16773,8 @@ var LinkElement = function LinkElement(_ref) {
16733
16773
  index = _ref.index,
16734
16774
  otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$x);
16735
16775
  var baseClass = classnames("inline-flex items-center transition-all duration-300 ease-in-out relative", {
16736
- " neeto-site-highlight__element": disableButtonAndLinks
16776
+ "neeto-site-highlight__element": disableButtonAndLinks,
16777
+ "pointer-events-none": !disableButtonAndLinks && action === ""
16737
16778
  });
16738
16779
  var _useElementClick = useElementClick({
16739
16780
  id: id,
@@ -22418,7 +22459,7 @@ var CtaClassic = function CtaClassic(_ref) {
22418
22459
  design: design.body,
22419
22460
  nestedClassName: baseClasses
22420
22461
  }, /*#__PURE__*/React__default["default"].createElement("div", {
22421
- className: "col-span-12 sm:col-span-8 sm:col-start-3 lg:col-span-6 lg:col-start-4"
22462
+ className: "col-span-full"
22422
22463
  }, /*#__PURE__*/React__default["default"].createElement(Typography$1, _extends__default["default"]({
22423
22464
  isTitle: true,
22424
22465
  component: "h3",
@@ -22428,7 +22469,7 @@ var CtaClassic = function CtaClassic(_ref) {
22428
22469
  id: "cta-classic-description",
22429
22470
  style: design.description
22430
22471
  }, otherProps), description)), /*#__PURE__*/React__default["default"].createElement("div", {
22431
- className: "col-span-10 col-start-2 flex flex-col justify-center gap-y-2 space-x-2 sm:col-span-6 sm:col-start-4 sm:flex-row lg:col-span-4 lg:col-start-5"
22472
+ className: "col-span-10 col-start-2 flex flex-col justify-center gap-y-2 sm:col-span-6 sm:col-start-4 sm:flex-row sm:space-x-2 lg:col-span-4 lg:col-start-5"
22432
22473
  }, buttons.map(function (button, index) {
22433
22474
  return /*#__PURE__*/React__default["default"].createElement(Button$1, _extends__default["default"]({
22434
22475
  className: "justify-center sm:w-auto",
@@ -40001,7 +40042,7 @@ var CtaWithEmailAction = function CtaWithEmailAction(_ref) {
40001
40042
  design: design.body,
40002
40043
  nestedClassName: baseClasses
40003
40044
  }, /*#__PURE__*/React__default["default"].createElement("div", {
40004
- className: "col-span-12 sm:col-span-8 sm:col-start-3 lg:col-span-6 lg:col-start-4"
40045
+ className: "col-span-full"
40005
40046
  }, /*#__PURE__*/React__default["default"].createElement(Typography$1, _extends__default["default"]({
40006
40047
  isTitle: true,
40007
40048
  component: "h3",
@@ -40011,7 +40052,9 @@ var CtaWithEmailAction = function CtaWithEmailAction(_ref) {
40011
40052
  id: "cta-with-email-action-description",
40012
40053
  style: design.description
40013
40054
  }, otherProps), description)), /*#__PURE__*/React__default["default"].createElement("div", {
40014
- className: "col-span-12 flex flex-col justify-center gap-y-2 sm:col-span-8 sm:col-start-3 sm:flex-row sm:gap-y-0 lg:col-span-6 lg:col-start-4"
40055
+ className: "col-span-12 flex flex-col gap-3 sm:col-span-8 sm:col-start-3 lg:col-span-6 lg:col-start-4"
40056
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
40057
+ className: "flex flex-col justify-center gap-y-2 sm:flex-row sm:gap-y-0"
40015
40058
  }, /*#__PURE__*/React__default["default"].createElement(StyledInput, {
40016
40059
  className: "h-10 flex-grow rounded-md px-4 focus:border-black focus:outline-none sm:rounded-r-none",
40017
40060
  design: design.input,
@@ -40026,20 +40069,26 @@ var CtaWithEmailAction = function CtaWithEmailAction(_ref) {
40026
40069
  className: buttonClasses,
40027
40070
  design: design.button,
40028
40071
  onClick: handleSubscribe
40029
- }, response.status === "loading" ? "Loading.." : button.label)), response.message && /*#__PURE__*/React__default["default"].createElement("div", {
40030
- className: "col-span-12 -mt-4 flex flex-col justify-center gap-x-2 sm:flex-row lg:col-span-6 lg:col-start-4"
40072
+ }, response.status === "loading" ? "Loading.." : button.label)), response.message && /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
40073
+ design: {
40074
+ textAlign: design.successMessage.textAlign,
40075
+ marginTop: design.successMessage.marginTop,
40076
+ marginBottom: design.successMessage.marginBottom
40077
+ }
40078
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
40079
+ className: "inline-flex items-center gap-x-2"
40031
40080
  }, response.status === "error" ? /*#__PURE__*/React__default["default"].createElement(Close, {
40032
- className: "self-center rounded-full bg-red-600 p-1",
40081
+ className: "flex-shrink-0 rounded-full bg-red-600 p-1",
40033
40082
  color: "#ffffff",
40034
40083
  size: 20
40035
40084
  }) : /*#__PURE__*/React__default["default"].createElement(Check, {
40036
- className: "self-center rounded-full bg-green-600 p-1",
40085
+ className: "flex-shrink-0 rounded-full bg-green-600 p-1",
40037
40086
  color: "#ffffff",
40038
40087
  size: 20
40039
40088
  }), /*#__PURE__*/React__default["default"].createElement(Typography$1, {
40040
- style: design.successMessage
40041
- }, response.message)), /*#__PURE__*/React__default["default"].createElement(Typography$1, _extends__default["default"]({
40042
- className: "col-span-10 col-start-2 sm:col-span-4 sm:col-start-5",
40089
+ style: omit(["textAlign", "marginTop", "marginBottom"], design.successMessage)
40090
+ }, response.message)))), /*#__PURE__*/React__default["default"].createElement(Typography$1, _extends__default["default"]({
40091
+ className: "col-span-full",
40043
40092
  id: "cta-with-email-action-promotion-text",
40044
40093
  style: design.promotionText
40045
40094
  }, otherProps), promotionText));
@@ -40064,7 +40113,7 @@ var CtaWithLogo = function CtaWithLogo(_ref) {
40064
40113
  logoUrl = properties.logoUrl,
40065
40114
  buttons = properties.buttons,
40066
40115
  src = properties.backgroundImage.src;
40067
- var baseClasses = "grid grid-cols-12 items-center gap-x-4 gap-y-8";
40116
+ var baseClasses = "flex flex-col sm:flex-row items-center gap-x-4 gap-y-8";
40068
40117
  return /*#__PURE__*/React__default["default"].createElement(BlockWrapper, {
40069
40118
  className: className,
40070
40119
  enableAnimation: enableAnimation,
@@ -40077,13 +40126,13 @@ var CtaWithLogo = function CtaWithLogo(_ref) {
40077
40126
  }, /*#__PURE__*/React__default["default"].createElement(StyledImage$1, {
40078
40127
  image: image,
40079
40128
  alt: "logo",
40080
- className: "col-span-10 col-start-2 mx-auto sm:col-span-2 sm:col-start-1",
40081
40129
  design: design.logo,
40082
40130
  disableButtonAndLinks: otherProps.disableButtonAndLinks,
40083
40131
  id: "cta-with-logo-logo",
40084
- src: logoUrl
40132
+ src: logoUrl,
40133
+ wrapperClassName: "flex item-center flex-shrink-0"
40085
40134
  }), /*#__PURE__*/React__default["default"].createElement("div", {
40086
- className: "col-span-12 sm:col-span-6 sm:col-start-3 lg:col-span-7"
40135
+ className: "flex-grow"
40087
40136
  }, /*#__PURE__*/React__default["default"].createElement(Typography$1, _extends__default["default"]({
40088
40137
  isTitle: true,
40089
40138
  component: "h4",
@@ -40093,7 +40142,7 @@ var CtaWithLogo = function CtaWithLogo(_ref) {
40093
40142
  id: "cta-with-logo-description",
40094
40143
  style: design.description
40095
40144
  }, otherProps), description)), /*#__PURE__*/React__default["default"].createElement("div", {
40096
- className: "col-span-12 mx-auto w-full sm:col-span-3 sm:col-start-10 lg:col-span-3 lg:col-start-10"
40145
+ className: "flex-shrink-0"
40097
40146
  }, buttons.map(function (button, index) {
40098
40147
  return /*#__PURE__*/React__default["default"].createElement(Button$1, _extends__default["default"]({
40099
40148
  className: "justify-center sm:w-auto",
@@ -42657,7 +42706,7 @@ var HeroWithCallToAction = function HeroWithCallToAction(_ref) {
42657
42706
  "sm:col-span-12 sm:col-start-1 flex flex-col justify-center order-2": POSITIONS.TOP.label === mediaPosition && mediaURL,
42658
42707
  "sm:col-span-12 lg:col-start-1": !mediaURL
42659
42708
  });
42660
- var buttonBaseClasses = classnames("flex w-full items-center gap-x-3 justify-center", {
42709
+ var buttonBaseClasses = classnames("flex w-full items-center gap-x-3", {
42661
42710
  "sm:justify-start": mediaURL && (mediaPosition === POSITIONS.LEFT.label || mediaPosition === POSITIONS.RIGHT.label)
42662
42711
  });
42663
42712
  return /*#__PURE__*/React__default["default"].createElement(BlockWrapper, {
@@ -42686,14 +42735,17 @@ var HeroWithCallToAction = function HeroWithCallToAction(_ref) {
42686
42735
  component: "p",
42687
42736
  id: "hero-with-call-to-action-description",
42688
42737
  style: design.description
42689
- }, otherProps), description), /*#__PURE__*/React__default["default"].createElement("div", {
42690
- className: buttonBaseClasses
42738
+ }, otherProps), description), /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
42739
+ className: buttonBaseClasses,
42740
+ design: {
42741
+ justifyContent: design.primaryButtons.justifyContent
42742
+ }
42691
42743
  }, properties.buttons.map(function (button, index) {
42692
42744
  return /*#__PURE__*/React__default["default"].createElement(Button$1, _extends__default["default"]({
42693
42745
  className: "w-full justify-center sm:w-auto sm:justify-start",
42694
42746
  id: "hero-with-call-to-action-button-".concat(index, "-button"),
42695
42747
  key: getUniqueKey(button.label, button.to, index),
42696
- style: button.type === "primary" ? design.primaryButtons : design.secondaryButtons
42748
+ style: button.type === "primary" ? dissoc("justifyContent", design.primaryButtons) : design.secondaryButtons
42697
42749
  }, _objectSpread$3(_objectSpread$3({
42698
42750
  index: index
42699
42751
  }, button), otherProps)));