@bigbinary/neeto-site-blocks 1.10.25 → 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 +59 -45
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +59 -45
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,10 +4,10 @@ import React, { useState, useEffect, useSyncExternalStore, forwardRef, useRef, u
|
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
|
|
7
|
-
import { isNotPresent, isPresent, isNotEmpty } from '@bigbinary/neeto-cist';
|
|
8
|
-
import { has, __, isEmpty, mergeRight, pickBy, identity, mergeAll, prop, dissoc, equals, mergeLeft, omit } from 'ramda';
|
|
9
7
|
import { motion, AnimatePresence } from 'framer-motion';
|
|
8
|
+
import { has, __, isEmpty, mergeRight, pickBy, identity, mergeAll, prop, dissoc, equals, mergeLeft, omit } from 'ramda';
|
|
10
9
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
10
|
+
import { isNotPresent, isPresent, isNotEmpty } from '@bigbinary/neeto-cist';
|
|
11
11
|
import { useFrame } from 'react-frame-component';
|
|
12
12
|
import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
|
|
13
13
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
@@ -4140,14 +4140,9 @@ var renderIcon = function renderIcon(_ref) {
|
|
|
4140
4140
|
type = _ref.type,
|
|
4141
4141
|
color = _ref.color,
|
|
4142
4142
|
otherProps = _objectWithoutProperties(_ref, _excluded$C);
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
fill: color
|
|
4147
|
-
}, otherProps));
|
|
4148
|
-
}
|
|
4149
|
-
var OutlineIcon = OutlineIcons[name];
|
|
4150
|
-
return /*#__PURE__*/React.createElement(OutlineIcon, _extends$2({
|
|
4143
|
+
var IconComponent = type === "filled" ? FilledIcons[name] : OutlineIcons[name];
|
|
4144
|
+
var StyledIcon = createStyledIcon(IconComponent);
|
|
4145
|
+
return /*#__PURE__*/React.createElement(StyledIcon, _extends$2({
|
|
4151
4146
|
fill: color
|
|
4152
4147
|
}, otherProps));
|
|
4153
4148
|
};
|
|
@@ -4384,9 +4379,10 @@ var StyledAnchor = styled.a.attrs(function (props) {
|
|
|
4384
4379
|
};
|
|
4385
4380
|
var borderColorStyles = pickBy(identity, borderColors);
|
|
4386
4381
|
var anchorStyles = disableHovering ? {} : {
|
|
4387
|
-
color: design.color,
|
|
4382
|
+
color: isHighlighted && design.activeColor ? design.activeColor : design.color,
|
|
4388
4383
|
"&:hover": {
|
|
4389
4384
|
transitionDuration: "0.3s",
|
|
4385
|
+
color: design.hoverColor,
|
|
4390
4386
|
borderColor: isButton && blendColors({
|
|
4391
4387
|
color0: design.borderColor,
|
|
4392
4388
|
percentage: percentage
|
|
@@ -4399,6 +4395,7 @@ var StyledAnchor = styled.a.attrs(function (props) {
|
|
|
4399
4395
|
width: "100%",
|
|
4400
4396
|
display: isButton && "none",
|
|
4401
4397
|
transitionProperty: "all",
|
|
4398
|
+
backgroundColor: design.hoverColor,
|
|
4402
4399
|
transitionTimingFunction: "cubic-bezier(.4,0,.2,1)",
|
|
4403
4400
|
transitionDuration: ".2s"
|
|
4404
4401
|
}
|
|
@@ -4410,7 +4407,7 @@ var StyledAnchor = styled.a.attrs(function (props) {
|
|
|
4410
4407
|
left: 0,
|
|
4411
4408
|
width: isHighlighted ? "100%" : 0,
|
|
4412
4409
|
height: "1px",
|
|
4413
|
-
backgroundColor: blendColors({
|
|
4410
|
+
backgroundColor: isHighlighted && design.activeColor ? design.activeColor : blendColors({
|
|
4414
4411
|
color0: design.color,
|
|
4415
4412
|
percentage: percentage
|
|
4416
4413
|
}),
|
|
@@ -5946,6 +5943,20 @@ var Button = function Button(_ref) {
|
|
|
5946
5943
|
};
|
|
5947
5944
|
var Button$1 = withConditionalRender(Button, prop("label"));
|
|
5948
5945
|
|
|
5946
|
+
var createStyledIcon = function createStyledIcon(IconComponent) {
|
|
5947
|
+
return styled(IconComponent)(function (_ref) {
|
|
5948
|
+
var fill = _ref.fill,
|
|
5949
|
+
hoverColor = _ref.hoverColor;
|
|
5950
|
+
return {
|
|
5951
|
+
fill: fill,
|
|
5952
|
+
transition: "fill 0.3s ease",
|
|
5953
|
+
"&:hover": {
|
|
5954
|
+
fill: hoverColor
|
|
5955
|
+
}
|
|
5956
|
+
};
|
|
5957
|
+
});
|
|
5958
|
+
};
|
|
5959
|
+
|
|
5949
5960
|
var _excluded$y = ["to", "label", "Icon", "Link", "baseUrl", "draftMode", "children", "router", "disableButtonAndLinks", "handleLinkClick"];
|
|
5950
5961
|
var PageAndScroll = function PageAndScroll(_ref) {
|
|
5951
5962
|
var to = _ref.to,
|
|
@@ -13076,7 +13087,7 @@ var FeatureWithProgressBar = function FeatureWithProgressBar(_ref) {
|
|
|
13076
13087
|
})));
|
|
13077
13088
|
};
|
|
13078
13089
|
|
|
13079
|
-
var _excluded$d = ["configurations", "className", "id", "image"];
|
|
13090
|
+
var _excluded$d = ["configurations", "className", "id", "image", "currentPath"];
|
|
13080
13091
|
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; }
|
|
13081
13092
|
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$1(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; }
|
|
13082
13093
|
var FooterClassic = function FooterClassic(_ref) {
|
|
@@ -13085,6 +13096,7 @@ var FooterClassic = function FooterClassic(_ref) {
|
|
|
13085
13096
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
13086
13097
|
id = _ref.id,
|
|
13087
13098
|
image = _ref.image,
|
|
13099
|
+
currentPath = _ref.currentPath,
|
|
13088
13100
|
otherProps = _objectWithoutProperties(_ref, _excluded$d);
|
|
13089
13101
|
var properties = configurations.properties,
|
|
13090
13102
|
design = configurations.design;
|
|
@@ -13145,11 +13157,12 @@ var FooterClassic = function FooterClassic(_ref) {
|
|
|
13145
13157
|
id: "footer-classic-social-icons-".concat(index, "-link"),
|
|
13146
13158
|
key: getUniqueKey(_icon.name, index),
|
|
13147
13159
|
icon: function icon() {
|
|
13148
|
-
return renderIcon(_objectSpread$a({
|
|
13160
|
+
return renderIcon(_objectSpread$a(_objectSpread$a({
|
|
13149
13161
|
name: _icon.name,
|
|
13150
|
-
type: _icon.type
|
|
13151
|
-
|
|
13152
|
-
|
|
13162
|
+
type: _icon.type
|
|
13163
|
+
}, design.socialIcon), {}, {
|
|
13164
|
+
color: isLinkHighlighted(_icon.to, currentPath) ? design.socialIcon.activeColor : design.socialIcon.color
|
|
13165
|
+
}));
|
|
13153
13166
|
}
|
|
13154
13167
|
}, _objectSpread$a(_objectSpread$a({
|
|
13155
13168
|
index: index
|
|
@@ -13225,7 +13238,7 @@ var FooterClassic = function FooterClassic(_ref) {
|
|
|
13225
13238
|
}))));
|
|
13226
13239
|
};
|
|
13227
13240
|
|
|
13228
|
-
var _excluded$c = ["configurations", "className", "id", "image"];
|
|
13241
|
+
var _excluded$c = ["configurations", "className", "id", "image", "currentPath"];
|
|
13229
13242
|
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; }
|
|
13230
13243
|
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$1(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; }
|
|
13231
13244
|
var FooterWithIcons = function FooterWithIcons(_ref) {
|
|
@@ -13234,6 +13247,7 @@ var FooterWithIcons = function FooterWithIcons(_ref) {
|
|
|
13234
13247
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
13235
13248
|
id = _ref.id,
|
|
13236
13249
|
image = _ref.image,
|
|
13250
|
+
currentPath = _ref.currentPath,
|
|
13237
13251
|
otherProps = _objectWithoutProperties(_ref, _excluded$c);
|
|
13238
13252
|
var properties = configurations.properties,
|
|
13239
13253
|
design = configurations.design;
|
|
@@ -13286,11 +13300,12 @@ var FooterWithIcons = function FooterWithIcons(_ref) {
|
|
|
13286
13300
|
id: "footer-with-icons-social-icon-".concat(index, "-link"),
|
|
13287
13301
|
key: getUniqueKey(_icon.name, index),
|
|
13288
13302
|
icon: function icon() {
|
|
13289
|
-
return renderIcon(_objectSpread$9({
|
|
13303
|
+
return renderIcon(_objectSpread$9(_objectSpread$9({
|
|
13290
13304
|
name: _icon.name,
|
|
13291
|
-
type: _icon.type
|
|
13292
|
-
|
|
13293
|
-
|
|
13305
|
+
type: _icon.type
|
|
13306
|
+
}, design.socialIcon), {}, {
|
|
13307
|
+
color: isLinkHighlighted(_icon.to, currentPath) ? design.socialIcon.activeColor : design.socialIcon.color
|
|
13308
|
+
}));
|
|
13294
13309
|
}
|
|
13295
13310
|
}, _objectSpread$9(_objectSpread$9({
|
|
13296
13311
|
index: index
|
|
@@ -13303,7 +13318,7 @@ var FooterWithIcons = function FooterWithIcons(_ref) {
|
|
|
13303
13318
|
}, otherProps), copyrightText));
|
|
13304
13319
|
};
|
|
13305
13320
|
|
|
13306
|
-
var _excluded$b = ["configurations", "className", "id", "image"];
|
|
13321
|
+
var _excluded$b = ["configurations", "className", "id", "image", "currentPath"];
|
|
13307
13322
|
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; }
|
|
13308
13323
|
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$1(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; }
|
|
13309
13324
|
var FooterWithLinks = function FooterWithLinks(_ref) {
|
|
@@ -13312,6 +13327,7 @@ var FooterWithLinks = function FooterWithLinks(_ref) {
|
|
|
13312
13327
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
13313
13328
|
id = _ref.id,
|
|
13314
13329
|
image = _ref.image,
|
|
13330
|
+
currentPath = _ref.currentPath,
|
|
13315
13331
|
otherProps = _objectWithoutProperties(_ref, _excluded$b);
|
|
13316
13332
|
var properties = configurations.properties,
|
|
13317
13333
|
design = configurations.design;
|
|
@@ -13381,7 +13397,6 @@ var FooterWithLinks = function FooterWithLinks(_ref) {
|
|
|
13381
13397
|
}, /*#__PURE__*/React.createElement(Link, _extends$2({
|
|
13382
13398
|
action: action,
|
|
13383
13399
|
linkIndex: linkIndex,
|
|
13384
|
-
disableHovering: true,
|
|
13385
13400
|
id: "footer-with-links-columns-".concat(index, "-links-").concat(linkIndex),
|
|
13386
13401
|
label: name,
|
|
13387
13402
|
style: design.columnLinks,
|
|
@@ -13422,14 +13437,15 @@ var FooterWithLinks = function FooterWithLinks(_ref) {
|
|
|
13422
13437
|
isVisible: isNotEmpty(contact.socialLinks)
|
|
13423
13438
|
}, contact.socialLinks.map(function (_icon, index) {
|
|
13424
13439
|
return /*#__PURE__*/React.createElement(Link, _extends$2({
|
|
13425
|
-
disableHovering: true,
|
|
13426
13440
|
id: "footer-with-links-social-links-".concat(index, "-icon"),
|
|
13427
13441
|
key: getUniqueKey(_icon.name, index),
|
|
13428
13442
|
icon: function icon() {
|
|
13429
|
-
return renderIcon(_objectSpread$8({
|
|
13443
|
+
return renderIcon(_objectSpread$8(_objectSpread$8({
|
|
13430
13444
|
name: _icon.name,
|
|
13431
13445
|
type: _icon.type
|
|
13432
|
-
}, design.socialIcon)
|
|
13446
|
+
}, design.socialIcon), {}, {
|
|
13447
|
+
color: isLinkHighlighted(_icon.to, currentPath) ? design.socialIcon.activeColor : design.socialIcon.color
|
|
13448
|
+
}));
|
|
13433
13449
|
}
|
|
13434
13450
|
}, _objectSpread$8(_objectSpread$8({
|
|
13435
13451
|
index: index
|
|
@@ -14707,10 +14723,12 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
14707
14723
|
key: getUniqueKey(_icon.to, index),
|
|
14708
14724
|
style: design.icons,
|
|
14709
14725
|
icon: function icon() {
|
|
14710
|
-
return renderIcon(_objectSpread$5({
|
|
14726
|
+
return renderIcon(_objectSpread$5(_objectSpread$5({
|
|
14711
14727
|
name: _icon.name,
|
|
14712
14728
|
type: _icon.type
|
|
14713
|
-
}, design.icons)
|
|
14729
|
+
}, design.icons), {}, {
|
|
14730
|
+
color: isLinkHighlighted(_icon.to, currentPath) ? design.icons.activeColor : design.icons.color
|
|
14731
|
+
}));
|
|
14714
14732
|
}
|
|
14715
14733
|
}, _objectSpread$5(_objectSpread$5({
|
|
14716
14734
|
index: index
|
|
@@ -14909,24 +14927,21 @@ var HeroWithCallToAction = function HeroWithCallToAction(_ref) {
|
|
|
14909
14927
|
autoPlay = _properties$media.autoPlay,
|
|
14910
14928
|
src = properties.backgroundImage.src;
|
|
14911
14929
|
var mediaURL = isEmbedded ? videoUrl : imageURL;
|
|
14912
|
-
var baseClasses = "grid
|
|
14913
|
-
var mediaBaseClasses = classnames("col-span-12 col-
|
|
14914
|
-
"
|
|
14915
|
-
"
|
|
14916
|
-
"
|
|
14917
|
-
"
|
|
14930
|
+
var baseClasses = "grid gap-y-6 lg:gap-6 grid-cols-12 grid-flow-row-dense";
|
|
14931
|
+
var mediaBaseClasses = classnames("col-span-12 flex flex-col items-center justify-center", {
|
|
14932
|
+
"order-1 lg:col-span-6": POSITIONS.LEFT.label === mediaPosition,
|
|
14933
|
+
"order-2 lg:col-span-6": POSITIONS.RIGHT.label === mediaPosition,
|
|
14934
|
+
"lg:col-span-12 flex justify-center": POSITIONS.BOTTOM.label === mediaPosition,
|
|
14935
|
+
"lg:col-span-12 justify-center order-1": POSITIONS.TOP.label === mediaPosition,
|
|
14918
14936
|
hidden: !mediaURL
|
|
14919
14937
|
});
|
|
14920
|
-
var textBaseClasses = classnames("col-span-12", {
|
|
14921
|
-
"
|
|
14922
|
-
"
|
|
14923
|
-
"
|
|
14924
|
-
"
|
|
14925
|
-
"sm:col-span-12 lg:col-start-1": !mediaURL
|
|
14926
|
-
});
|
|
14927
|
-
var buttonBaseClasses = classnames("flex w-full items-center gap-x-3", {
|
|
14928
|
-
"sm:!justify-start": mediaURL && (mediaPosition === POSITIONS.LEFT.label || mediaPosition === POSITIONS.RIGHT.label)
|
|
14938
|
+
var textBaseClasses = classnames("col-span-12 flex flex-col item-center justify-center", {
|
|
14939
|
+
"order-2 lg:col-span-6": POSITIONS.LEFT.label === mediaPosition && mediaURL,
|
|
14940
|
+
"order-1 lg:col-span-6": POSITIONS.RIGHT.label === mediaPosition && mediaURL,
|
|
14941
|
+
"lg:col-span-12": POSITIONS.BOTTOM.label === mediaPosition && mediaURL,
|
|
14942
|
+
"lg:col-span-12 order-2": POSITIONS.TOP.label === mediaPosition && mediaURL
|
|
14929
14943
|
});
|
|
14944
|
+
var buttonBaseClasses = classnames("flex flex-wrap w-full items-center gap-2");
|
|
14930
14945
|
return /*#__PURE__*/React.createElement(BlockWrapper, {
|
|
14931
14946
|
className: className,
|
|
14932
14947
|
enableAnimation: enableAnimation,
|
|
@@ -14960,7 +14975,6 @@ var HeroWithCallToAction = function HeroWithCallToAction(_ref) {
|
|
|
14960
14975
|
}
|
|
14961
14976
|
}, properties.buttons.map(function (button, index) {
|
|
14962
14977
|
return /*#__PURE__*/React.createElement(Button$1, _extends$2({
|
|
14963
|
-
className: "w-full justify-center sm:w-auto sm:justify-start",
|
|
14964
14978
|
id: "hero-with-call-to-action-button-".concat(index, "-button"),
|
|
14965
14979
|
key: getUniqueKey(button.label, button.to, index),
|
|
14966
14980
|
style: button.type === "primary" ? dissoc("justifyContent", design.primaryButtons) : design.secondaryButtons
|