@bigbinary/neeto-site-blocks 1.10.26 → 1.10.27
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 +47 -29
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +47 -29
- 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
|