@bigbinary/neeto-site-blocks 1.10.26 → 1.10.28
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 +63 -50
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +63 -50
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -8,10 +8,10 @@ var React = require('react');
|
|
|
8
8
|
var classnames = require('classnames');
|
|
9
9
|
var styled = require('styled-components');
|
|
10
10
|
var _defineProperty$1 = require('@babel/runtime/helpers/defineProperty');
|
|
11
|
-
var neetoCist = require('@bigbinary/neeto-cist');
|
|
12
|
-
var ramda = require('ramda');
|
|
13
11
|
var framerMotion = require('framer-motion');
|
|
12
|
+
var ramda = require('ramda');
|
|
14
13
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
14
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
15
15
|
var reactFrameComponent = require('react-frame-component');
|
|
16
16
|
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
|
17
17
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
@@ -4159,14 +4159,9 @@ var renderIcon = function renderIcon(_ref) {
|
|
|
4159
4159
|
type = _ref.type,
|
|
4160
4160
|
color = _ref.color,
|
|
4161
4161
|
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$C);
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
fill: color
|
|
4166
|
-
}, otherProps));
|
|
4167
|
-
}
|
|
4168
|
-
var OutlineIcon = OutlineIcons[name];
|
|
4169
|
-
return /*#__PURE__*/React__default["default"].createElement(OutlineIcon, _extends__default["default"]({
|
|
4162
|
+
var IconComponent = type === "filled" ? FilledIcons[name] : OutlineIcons[name];
|
|
4163
|
+
var StyledIcon = createStyledIcon(IconComponent);
|
|
4164
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledIcon, _extends__default["default"]({
|
|
4170
4165
|
fill: color
|
|
4171
4166
|
}, otherProps));
|
|
4172
4167
|
};
|
|
@@ -4403,9 +4398,10 @@ var StyledAnchor = styled__default["default"].a.attrs(function (props) {
|
|
|
4403
4398
|
};
|
|
4404
4399
|
var borderColorStyles = ramda.pickBy(ramda.identity, borderColors);
|
|
4405
4400
|
var anchorStyles = disableHovering ? {} : {
|
|
4406
|
-
color: design.color,
|
|
4401
|
+
color: isHighlighted && design.activeColor ? design.activeColor : design.color,
|
|
4407
4402
|
"&:hover": {
|
|
4408
4403
|
transitionDuration: "0.3s",
|
|
4404
|
+
color: design.hoverColor,
|
|
4409
4405
|
borderColor: isButton && blendColors({
|
|
4410
4406
|
color0: design.borderColor,
|
|
4411
4407
|
percentage: percentage
|
|
@@ -4418,6 +4414,7 @@ var StyledAnchor = styled__default["default"].a.attrs(function (props) {
|
|
|
4418
4414
|
width: "100%",
|
|
4419
4415
|
display: isButton && "none",
|
|
4420
4416
|
transitionProperty: "all",
|
|
4417
|
+
backgroundColor: design.hoverColor,
|
|
4421
4418
|
transitionTimingFunction: "cubic-bezier(.4,0,.2,1)",
|
|
4422
4419
|
transitionDuration: ".2s"
|
|
4423
4420
|
}
|
|
@@ -4429,7 +4426,7 @@ var StyledAnchor = styled__default["default"].a.attrs(function (props) {
|
|
|
4429
4426
|
left: 0,
|
|
4430
4427
|
width: isHighlighted ? "100%" : 0,
|
|
4431
4428
|
height: "1px",
|
|
4432
|
-
backgroundColor: blendColors({
|
|
4429
|
+
backgroundColor: isHighlighted && design.activeColor ? design.activeColor : blendColors({
|
|
4433
4430
|
color0: design.color,
|
|
4434
4431
|
percentage: percentage
|
|
4435
4432
|
}),
|
|
@@ -5965,6 +5962,20 @@ var Button = function Button(_ref) {
|
|
|
5965
5962
|
};
|
|
5966
5963
|
var Button$1 = withConditionalRender(Button, ramda.prop("label"));
|
|
5967
5964
|
|
|
5965
|
+
var createStyledIcon = function createStyledIcon(IconComponent) {
|
|
5966
|
+
return styled__default["default"](IconComponent)(function (_ref) {
|
|
5967
|
+
var fill = _ref.fill,
|
|
5968
|
+
hoverColor = _ref.hoverColor;
|
|
5969
|
+
return {
|
|
5970
|
+
fill: fill,
|
|
5971
|
+
transition: "fill 0.3s ease",
|
|
5972
|
+
"&:hover": {
|
|
5973
|
+
fill: hoverColor
|
|
5974
|
+
}
|
|
5975
|
+
};
|
|
5976
|
+
});
|
|
5977
|
+
};
|
|
5978
|
+
|
|
5968
5979
|
var _excluded$y = ["to", "label", "Icon", "Link", "baseUrl", "draftMode", "children", "router", "disableButtonAndLinks", "handleLinkClick"];
|
|
5969
5980
|
var PageAndScroll = function PageAndScroll(_ref) {
|
|
5970
5981
|
var to = _ref.to,
|
|
@@ -13095,7 +13106,7 @@ var FeatureWithProgressBar = function FeatureWithProgressBar(_ref) {
|
|
|
13095
13106
|
})));
|
|
13096
13107
|
};
|
|
13097
13108
|
|
|
13098
|
-
var _excluded$d = ["configurations", "className", "id", "image"];
|
|
13109
|
+
var _excluded$d = ["configurations", "className", "id", "image", "currentPath"];
|
|
13099
13110
|
function ownKeys$a(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; }
|
|
13100
13111
|
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$a(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$a(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13101
13112
|
var FooterClassic = function FooterClassic(_ref) {
|
|
@@ -13104,6 +13115,7 @@ var FooterClassic = function FooterClassic(_ref) {
|
|
|
13104
13115
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
13105
13116
|
id = _ref.id,
|
|
13106
13117
|
image = _ref.image,
|
|
13118
|
+
currentPath = _ref.currentPath,
|
|
13107
13119
|
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$d);
|
|
13108
13120
|
var properties = configurations.properties,
|
|
13109
13121
|
design = configurations.design;
|
|
@@ -13164,11 +13176,12 @@ var FooterClassic = function FooterClassic(_ref) {
|
|
|
13164
13176
|
id: "footer-classic-social-icons-".concat(index, "-link"),
|
|
13165
13177
|
key: getUniqueKey(_icon.name, index),
|
|
13166
13178
|
icon: function icon() {
|
|
13167
|
-
return renderIcon(_objectSpread$a({
|
|
13179
|
+
return renderIcon(_objectSpread$a(_objectSpread$a({
|
|
13168
13180
|
name: _icon.name,
|
|
13169
|
-
type: _icon.type
|
|
13170
|
-
|
|
13171
|
-
|
|
13181
|
+
type: _icon.type
|
|
13182
|
+
}, design.socialIcon), {}, {
|
|
13183
|
+
color: isLinkHighlighted(_icon.to, currentPath) ? design.socialIcon.activeColor : design.socialIcon.color
|
|
13184
|
+
}));
|
|
13172
13185
|
}
|
|
13173
13186
|
}, _objectSpread$a(_objectSpread$a({
|
|
13174
13187
|
index: index
|
|
@@ -13244,7 +13257,7 @@ var FooterClassic = function FooterClassic(_ref) {
|
|
|
13244
13257
|
}))));
|
|
13245
13258
|
};
|
|
13246
13259
|
|
|
13247
|
-
var _excluded$c = ["configurations", "className", "id", "image"];
|
|
13260
|
+
var _excluded$c = ["configurations", "className", "id", "image", "currentPath"];
|
|
13248
13261
|
function ownKeys$9(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; }
|
|
13249
13262
|
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$9(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13250
13263
|
var FooterWithIcons = function FooterWithIcons(_ref) {
|
|
@@ -13253,6 +13266,7 @@ var FooterWithIcons = function FooterWithIcons(_ref) {
|
|
|
13253
13266
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
13254
13267
|
id = _ref.id,
|
|
13255
13268
|
image = _ref.image,
|
|
13269
|
+
currentPath = _ref.currentPath,
|
|
13256
13270
|
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$c);
|
|
13257
13271
|
var properties = configurations.properties,
|
|
13258
13272
|
design = configurations.design;
|
|
@@ -13305,11 +13319,12 @@ var FooterWithIcons = function FooterWithIcons(_ref) {
|
|
|
13305
13319
|
id: "footer-with-icons-social-icon-".concat(index, "-link"),
|
|
13306
13320
|
key: getUniqueKey(_icon.name, index),
|
|
13307
13321
|
icon: function icon() {
|
|
13308
|
-
return renderIcon(_objectSpread$9({
|
|
13322
|
+
return renderIcon(_objectSpread$9(_objectSpread$9({
|
|
13309
13323
|
name: _icon.name,
|
|
13310
|
-
type: _icon.type
|
|
13311
|
-
|
|
13312
|
-
|
|
13324
|
+
type: _icon.type
|
|
13325
|
+
}, design.socialIcon), {}, {
|
|
13326
|
+
color: isLinkHighlighted(_icon.to, currentPath) ? design.socialIcon.activeColor : design.socialIcon.color
|
|
13327
|
+
}));
|
|
13313
13328
|
}
|
|
13314
13329
|
}, _objectSpread$9(_objectSpread$9({
|
|
13315
13330
|
index: index
|
|
@@ -13322,7 +13337,7 @@ var FooterWithIcons = function FooterWithIcons(_ref) {
|
|
|
13322
13337
|
}, otherProps), copyrightText));
|
|
13323
13338
|
};
|
|
13324
13339
|
|
|
13325
|
-
var _excluded$b = ["configurations", "className", "id", "image"];
|
|
13340
|
+
var _excluded$b = ["configurations", "className", "id", "image", "currentPath"];
|
|
13326
13341
|
function ownKeys$8(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; }
|
|
13327
13342
|
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$8(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13328
13343
|
var FooterWithLinks = function FooterWithLinks(_ref) {
|
|
@@ -13331,6 +13346,7 @@ var FooterWithLinks = function FooterWithLinks(_ref) {
|
|
|
13331
13346
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
13332
13347
|
id = _ref.id,
|
|
13333
13348
|
image = _ref.image,
|
|
13349
|
+
currentPath = _ref.currentPath,
|
|
13334
13350
|
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$b);
|
|
13335
13351
|
var properties = configurations.properties,
|
|
13336
13352
|
design = configurations.design;
|
|
@@ -13400,7 +13416,6 @@ var FooterWithLinks = function FooterWithLinks(_ref) {
|
|
|
13400
13416
|
}, /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
13401
13417
|
action: action,
|
|
13402
13418
|
linkIndex: linkIndex,
|
|
13403
|
-
disableHovering: true,
|
|
13404
13419
|
id: "footer-with-links-columns-".concat(index, "-links-").concat(linkIndex),
|
|
13405
13420
|
label: name,
|
|
13406
13421
|
style: design.columnLinks,
|
|
@@ -13441,14 +13456,15 @@ var FooterWithLinks = function FooterWithLinks(_ref) {
|
|
|
13441
13456
|
isVisible: neetoCist.isNotEmpty(contact.socialLinks)
|
|
13442
13457
|
}, contact.socialLinks.map(function (_icon, index) {
|
|
13443
13458
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
13444
|
-
disableHovering: true,
|
|
13445
13459
|
id: "footer-with-links-social-links-".concat(index, "-icon"),
|
|
13446
13460
|
key: getUniqueKey(_icon.name, index),
|
|
13447
13461
|
icon: function icon() {
|
|
13448
|
-
return renderIcon(_objectSpread$8({
|
|
13462
|
+
return renderIcon(_objectSpread$8(_objectSpread$8({
|
|
13449
13463
|
name: _icon.name,
|
|
13450
13464
|
type: _icon.type
|
|
13451
|
-
}, design.socialIcon)
|
|
13465
|
+
}, design.socialIcon), {}, {
|
|
13466
|
+
color: isLinkHighlighted(_icon.to, currentPath) ? design.socialIcon.activeColor : design.socialIcon.color
|
|
13467
|
+
}));
|
|
13452
13468
|
}
|
|
13453
13469
|
}, _objectSpread$8(_objectSpread$8({
|
|
13454
13470
|
index: index
|
|
@@ -14726,10 +14742,12 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
14726
14742
|
key: getUniqueKey(_icon.to, index),
|
|
14727
14743
|
style: design.icons,
|
|
14728
14744
|
icon: function icon() {
|
|
14729
|
-
return renderIcon(_objectSpread$5({
|
|
14745
|
+
return renderIcon(_objectSpread$5(_objectSpread$5({
|
|
14730
14746
|
name: _icon.name,
|
|
14731
14747
|
type: _icon.type
|
|
14732
|
-
}, design.icons)
|
|
14748
|
+
}, design.icons), {}, {
|
|
14749
|
+
color: isLinkHighlighted(_icon.to, currentPath) ? design.icons.activeColor : design.icons.color
|
|
14750
|
+
}));
|
|
14733
14751
|
}
|
|
14734
14752
|
}, _objectSpread$5(_objectSpread$5({
|
|
14735
14753
|
index: index
|
|
@@ -15018,17 +15036,16 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
|
|
|
15018
15036
|
var slides = properties.slides,
|
|
15019
15037
|
src = properties.backgroundImage.src,
|
|
15020
15038
|
enableAnimation = properties.enableAnimation;
|
|
15021
|
-
var baseClasses = "grid
|
|
15039
|
+
var baseClasses = "grid gap-y-6 lg:gap-6 grid-cols-12 grid-flow-row-dense px-0 sm:px-4";
|
|
15022
15040
|
var contentBaseClasses = function contentBaseClasses(_ref2) {
|
|
15023
15041
|
var src = _ref2.src,
|
|
15024
15042
|
position = _ref2.position,
|
|
15025
15043
|
isEmptyContent = _ref2.isEmptyContent;
|
|
15026
|
-
return classnames__default["default"]("col-span-12", {
|
|
15027
|
-
"
|
|
15028
|
-
"
|
|
15029
|
-
"
|
|
15030
|
-
"
|
|
15031
|
-
"flex flex-col justify-center sm:col-span-12": !src,
|
|
15044
|
+
return classnames__default["default"]("col-span-12 flex flex-col justify-center", {
|
|
15045
|
+
"order-1 lg:col-span-6 ": src && position === POSITIONS.LEFT.label,
|
|
15046
|
+
"order-2 lg:col-span-6": src && position === POSITIONS.RIGHT.label,
|
|
15047
|
+
"order-1": src && position === POSITIONS.BOTTOM.label,
|
|
15048
|
+
"order-2": src && position === POSITIONS.TOP.label,
|
|
15032
15049
|
hidden: isEmptyContent
|
|
15033
15050
|
});
|
|
15034
15051
|
};
|
|
@@ -15036,19 +15053,18 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
|
|
|
15036
15053
|
var src = _ref3.src,
|
|
15037
15054
|
position = _ref3.position,
|
|
15038
15055
|
isEmptyContent = _ref3.isEmptyContent;
|
|
15039
|
-
return classnames__default["default"]("col-span-12 flex justify-center", {
|
|
15040
|
-
"
|
|
15041
|
-
"
|
|
15042
|
-
"
|
|
15043
|
-
"
|
|
15044
|
-
hidden: !src
|
|
15045
|
-
"flex justify-center": isEmptyContent
|
|
15056
|
+
return classnames__default["default"]("col-span-12 flex flex-col justify-center items-center", {
|
|
15057
|
+
"order-2 lg:col-span-6": src && position === POSITIONS.LEFT.label && !isEmptyContent,
|
|
15058
|
+
"order-1 lg:col-span-6": src && position === POSITIONS.RIGHT.label && !isEmptyContent,
|
|
15059
|
+
"order-2": src && position === POSITIONS.BOTTOM.label && !isEmptyContent,
|
|
15060
|
+
"order-1": src && position === POSITIONS.TOP.label && !isEmptyContent,
|
|
15061
|
+
hidden: !src
|
|
15046
15062
|
});
|
|
15047
15063
|
};
|
|
15048
15064
|
var buttonBaseClasses = function buttonBaseClasses(_ref4) {
|
|
15049
15065
|
var src = _ref4.src,
|
|
15050
15066
|
position = _ref4.position;
|
|
15051
|
-
return classnames__default["default"]("flex w-full gap-
|
|
15067
|
+
return classnames__default["default"]("flex flex-wrap w-full items-center gap-2", {
|
|
15052
15068
|
"justify-center": !src || position === POSITIONS.BOTTOM.label || position === POSITIONS.TOP.label
|
|
15053
15069
|
});
|
|
15054
15070
|
};
|
|
@@ -15067,10 +15083,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
|
|
|
15067
15083
|
var isEmptyContent = !content.prefixTitle && !content.title && !content.description;
|
|
15068
15084
|
return /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
|
|
15069
15085
|
isRootWrapper: true,
|
|
15070
|
-
className: classnames__default["default"]("neeto-site-block-wrapper", baseClasses)
|
|
15071
|
-
design: {
|
|
15072
|
-
paddingHorizontal: design.body.paddingHorizontal
|
|
15073
|
-
}
|
|
15086
|
+
className: classnames__default["default"]("neeto-site-block-wrapper", baseClasses)
|
|
15074
15087
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
15075
15088
|
className: contentBaseClasses(_objectSpread$2({
|
|
15076
15089
|
isEmptyContent: isEmptyContent
|
|
@@ -15079,6 +15092,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
|
|
|
15079
15092
|
disableButtonAndLinks: disableButtonAndLinks,
|
|
15080
15093
|
index: index,
|
|
15081
15094
|
isTitle: true,
|
|
15095
|
+
className: textClasses(_objectSpread$2({}, media)),
|
|
15082
15096
|
component: "h3",
|
|
15083
15097
|
id: "hero-with-gallery-slide-".concat(index, "-prefixTitle"),
|
|
15084
15098
|
isAddNewPane: otherProps.isAddNewPane,
|
|
@@ -15104,7 +15118,6 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
|
|
|
15104
15118
|
className: buttonBaseClasses(_objectSpread$2({}, media))
|
|
15105
15119
|
}, buttons.map(function (button, buttonIndex) {
|
|
15106
15120
|
return /*#__PURE__*/React__default["default"].createElement(Button$1, _extends__default["default"]({
|
|
15107
|
-
className: "flex w-full justify-center sm:w-auto",
|
|
15108
15121
|
id: "hero-with-gallery-slide-".concat(index, "-buttons-").concat(buttonIndex, "-button"),
|
|
15109
15122
|
key: getUniqueKey(button.label, button.url, index),
|
|
15110
15123
|
style: button.type === "primary" ? design.primaryButtons : design.secondaryButtons
|
|
@@ -15141,7 +15154,7 @@ var HeroWithGallery = function HeroWithGallery(_ref) {
|
|
|
15141
15154
|
src: src
|
|
15142
15155
|
}, design.backgroundImage),
|
|
15143
15156
|
design: design.body,
|
|
15144
|
-
nestedClassName: "flex items-center justify-between gap-x-2"
|
|
15157
|
+
nestedClassName: "flex items-center justify-between gap-x-2 ns-hero-with-gallery "
|
|
15145
15158
|
}, slides.length > 1 ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(ArrowButton, {
|
|
15146
15159
|
isStart: true,
|
|
15147
15160
|
Icon: ArrowLeftS$1,
|