@bigbinary/neeto-site-blocks 1.2.5 → 1.2.7
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 -25
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +47 -25
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -14168,7 +14168,7 @@ stepsOrder.reduce((acc, key) => {
|
|
|
14168
14168
|
|
|
14169
14169
|
var StyledAnchor = styled__default["default"].a.attrs(function (props) {
|
|
14170
14170
|
return {
|
|
14171
|
-
className:
|
|
14171
|
+
className: generateResponsiveStyles(props.design)
|
|
14172
14172
|
};
|
|
14173
14173
|
})(function (_ref) {
|
|
14174
14174
|
var _design$border, _design$border2, _design$border3;
|
|
@@ -14176,14 +14176,20 @@ var StyledAnchor = styled__default["default"].a.attrs(function (props) {
|
|
|
14176
14176
|
_ref$percentage = _ref.percentage,
|
|
14177
14177
|
percentage = _ref$percentage === void 0 ? 0.08 : _ref$percentage,
|
|
14178
14178
|
_ref$isButton = _ref.isButton,
|
|
14179
|
-
isButton = _ref$isButton === void 0 ? false : _ref$isButton
|
|
14179
|
+
isButton = _ref$isButton === void 0 ? false : _ref$isButton,
|
|
14180
|
+
isHighlighted = _ref.isHighlighted;
|
|
14180
14181
|
var borderColors = {
|
|
14181
14182
|
borderColor: (_design$border = design.border) === null || _design$border === void 0 ? void 0 : _design$border.borderColor,
|
|
14182
14183
|
borderStyle: (_design$border2 = design.border) === null || _design$border2 === void 0 ? void 0 : _design$border2.borderStyle,
|
|
14183
14184
|
borderWidth: (_design$border3 = design.border) === null || _design$border3 === void 0 ? void 0 : _design$border3.borderWidth
|
|
14184
14185
|
};
|
|
14185
14186
|
var borderColorStyles = pickBy(identity, borderColors);
|
|
14186
|
-
var
|
|
14187
|
+
var anchorStyles = {
|
|
14188
|
+
color: isHighlighted ? blendColors({
|
|
14189
|
+
color0: design.color,
|
|
14190
|
+
color1: "#0e19e8",
|
|
14191
|
+
percentage: 0.4
|
|
14192
|
+
}) : design.color,
|
|
14187
14193
|
"&:hover": {
|
|
14188
14194
|
transitionDuration: "0.3s",
|
|
14189
14195
|
borderColor: isButton && blendColors({
|
|
@@ -14200,7 +14206,7 @@ var StyledAnchor = styled__default["default"].a.attrs(function (props) {
|
|
|
14200
14206
|
})
|
|
14201
14207
|
}
|
|
14202
14208
|
};
|
|
14203
|
-
return mergeAll([design, borderColorStyles,
|
|
14209
|
+
return mergeAll([design, borderColorStyles, anchorStyles]);
|
|
14204
14210
|
});
|
|
14205
14211
|
|
|
14206
14212
|
var withConditionalRender = function withConditionalRender(Component, condition) {
|
|
@@ -15469,6 +15475,8 @@ var LinkElement = function LinkElement(_ref) {
|
|
|
15469
15475
|
_ref$draftMode = _ref.draftMode,
|
|
15470
15476
|
draftMode = _ref$draftMode === void 0 ? false : _ref$draftMode,
|
|
15471
15477
|
Link = _ref.link,
|
|
15478
|
+
_ref$isHighlighted = _ref.isHighlighted,
|
|
15479
|
+
isHighlighted = _ref$isHighlighted === void 0 ? false : _ref$isHighlighted,
|
|
15472
15480
|
_ref$disableButtonAnd = _ref.disableButtonAndLinks,
|
|
15473
15481
|
disableButtonAndLinks = _ref$disableButtonAnd === void 0 ? false : _ref$disableButtonAnd;
|
|
15474
15482
|
var baseClass = classnames("inline-flex items-center transition-all duration-300 ease-in-out", {
|
|
@@ -15479,7 +15487,8 @@ var LinkElement = function LinkElement(_ref) {
|
|
|
15479
15487
|
design: style,
|
|
15480
15488
|
href: to !== null && to !== void 0 ? to : "",
|
|
15481
15489
|
rel: "noreferrer",
|
|
15482
|
-
percentage: 0.1
|
|
15490
|
+
percentage: 0.1,
|
|
15491
|
+
isHighlighted: isHighlighted
|
|
15483
15492
|
};
|
|
15484
15493
|
if (action === "external") {
|
|
15485
15494
|
return /*#__PURE__*/React__default["default"].createElement(StyledAnchor, _extends__default["default"]({}, commonProps, {
|
|
@@ -15493,7 +15502,9 @@ var LinkElement = function LinkElement(_ref) {
|
|
|
15493
15502
|
to: draftMode ? "".concat(baseUrl).concat(to) : to
|
|
15494
15503
|
}), label, Icon && /*#__PURE__*/React__default["default"].createElement(Icon, null));
|
|
15495
15504
|
}
|
|
15496
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledAnchor,
|
|
15505
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledAnchor, _extends__default["default"]({
|
|
15506
|
+
as: !draftMode && Link
|
|
15507
|
+
}, commonProps), label, Icon && /*#__PURE__*/React__default["default"].createElement(Icon, null));
|
|
15497
15508
|
};
|
|
15498
15509
|
var Link = withConditionalRender(LinkElement, function () {
|
|
15499
15510
|
return !!(prop("label") || prop("icon"));
|
|
@@ -40577,11 +40588,12 @@ var useElementVisible = function useElementVisible(ref) {
|
|
|
40577
40588
|
return isIntersecting;
|
|
40578
40589
|
};
|
|
40579
40590
|
|
|
40580
|
-
var _excluded$7 = ["configurations", "className", "id"];
|
|
40591
|
+
var _excluded$7 = ["configurations", "className", "currentPath", "id"];
|
|
40581
40592
|
var HeaderWithButtons = function HeaderWithButtons(_ref) {
|
|
40582
40593
|
var configurations = _ref.configurations,
|
|
40583
40594
|
_ref$className = _ref.className,
|
|
40584
40595
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
40596
|
+
currentPath = _ref.currentPath,
|
|
40585
40597
|
id = _ref.id,
|
|
40586
40598
|
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$7);
|
|
40587
40599
|
var _useState = React.useState(false),
|
|
@@ -40619,6 +40631,7 @@ var HeaderWithButtons = function HeaderWithButtons(_ref) {
|
|
|
40619
40631
|
})
|
|
40620
40632
|
}, properties.links.map(function (link, index) {
|
|
40621
40633
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40634
|
+
isHighlighted: currentPath === link.to,
|
|
40622
40635
|
key: getUniqueKey(link.label, index),
|
|
40623
40636
|
style: design.links
|
|
40624
40637
|
}, link, otherProps));
|
|
@@ -40642,19 +40655,21 @@ var HeaderWithButtons = function HeaderWithButtons(_ref) {
|
|
|
40642
40655
|
className: "fadeIn col-span-2 col-start-1 ml-2 mt-3 block space-y-2 lg:hidden"
|
|
40643
40656
|
}, properties.links.map(function (button, index) {
|
|
40644
40657
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40645
|
-
|
|
40658
|
+
isHighlighted: currentPath === button.to,
|
|
40659
|
+
key: getUniqueKey(button.to, button.label, index),
|
|
40646
40660
|
style: design.links
|
|
40647
40661
|
}, button, otherProps));
|
|
40648
40662
|
}))));
|
|
40649
40663
|
};
|
|
40650
40664
|
|
|
40651
|
-
var _excluded$6 = ["configurations", "className", "id"];
|
|
40665
|
+
var _excluded$6 = ["configurations", "className", "currentPath", "id"];
|
|
40652
40666
|
function ownKeys$1(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; }
|
|
40653
40667
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
40654
40668
|
var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
40655
40669
|
var configurations = _ref.configurations,
|
|
40656
40670
|
_ref$className = _ref.className,
|
|
40657
40671
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
40672
|
+
currentPath = _ref.currentPath,
|
|
40658
40673
|
id = _ref.id,
|
|
40659
40674
|
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$6);
|
|
40660
40675
|
var _useState = React.useState(false),
|
|
@@ -40686,6 +40701,7 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
40686
40701
|
className: "col-span-4 col-start-1 hidden items-center gap-6 lg:flex"
|
|
40687
40702
|
}, properties.links.map(function (link, index) {
|
|
40688
40703
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40704
|
+
isHighlighted: currentPath === link.to,
|
|
40689
40705
|
key: getUniqueKey(link.label, index),
|
|
40690
40706
|
style: design.links
|
|
40691
40707
|
}, link, otherProps));
|
|
@@ -40729,6 +40745,7 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
40729
40745
|
}, properties.links.map(function (icon, index) {
|
|
40730
40746
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40731
40747
|
className: "w-full",
|
|
40748
|
+
isHighlighted: currentPath === icon.to,
|
|
40732
40749
|
key: getUniqueKey(icon.url, icon.label, index),
|
|
40733
40750
|
style: design.links
|
|
40734
40751
|
}, icon));
|
|
@@ -40749,12 +40766,13 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
40749
40766
|
}))));
|
|
40750
40767
|
};
|
|
40751
40768
|
|
|
40752
|
-
var _excluded$5 = ["configurations", "className", "id"];
|
|
40769
|
+
var _excluded$5 = ["configurations", "className", "id", "currentPath"];
|
|
40753
40770
|
var HeaderWithLogoTitle = function HeaderWithLogoTitle(_ref) {
|
|
40754
40771
|
var configurations = _ref.configurations,
|
|
40755
40772
|
_ref$className = _ref.className,
|
|
40756
40773
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
40757
40774
|
id = _ref.id,
|
|
40775
|
+
currentPath = _ref.currentPath,
|
|
40758
40776
|
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$5);
|
|
40759
40777
|
var _useState = React.useState(false),
|
|
40760
40778
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
@@ -40798,7 +40816,8 @@ var HeaderWithLogoTitle = function HeaderWithLogoTitle(_ref) {
|
|
|
40798
40816
|
}, properties.links.map(function (link, index) {
|
|
40799
40817
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40800
40818
|
className: "hidden lg:inline",
|
|
40801
|
-
|
|
40819
|
+
isHighlighted: currentPath === link.to,
|
|
40820
|
+
key: getUniqueKey(link.label, link.to, index),
|
|
40802
40821
|
style: design.links
|
|
40803
40822
|
}, link, otherProps));
|
|
40804
40823
|
}), buttons.map(function (button, index) {
|
|
@@ -40819,14 +40838,15 @@ var HeaderWithLogoTitle = function HeaderWithLogoTitle(_ref) {
|
|
|
40819
40838
|
className: "fadeIn col-span-2 col-start-1 space-y-2 lg:hidden"
|
|
40820
40839
|
}, properties.links.map(function (_ref2, index) {
|
|
40821
40840
|
var label = _ref2.label,
|
|
40822
|
-
|
|
40841
|
+
to = _ref2.to,
|
|
40823
40842
|
action = _ref2.action;
|
|
40824
40843
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40825
40844
|
action: action,
|
|
40826
40845
|
label: label,
|
|
40827
|
-
|
|
40828
|
-
|
|
40829
|
-
|
|
40846
|
+
to: to,
|
|
40847
|
+
isHighlighted: currentPath === to,
|
|
40848
|
+
key: getUniqueKey(to, label, index),
|
|
40849
|
+
style: design.links
|
|
40830
40850
|
}, otherProps));
|
|
40831
40851
|
}))));
|
|
40832
40852
|
};
|
|
@@ -40931,9 +40951,10 @@ var HeroWithMultipleLayouts = function HeroWithMultipleLayouts(_ref) {
|
|
|
40931
40951
|
var src = _ref2.src,
|
|
40932
40952
|
position = _ref2.position;
|
|
40933
40953
|
return classnames("sm:col-span-6 col-span-12", {
|
|
40934
|
-
"sm:col-start-1": src && position === POSITIONS.RIGHT.label
|
|
40935
|
-
"sm:col-span-8 sm:col-start-3": src && position === POSITIONS.
|
|
40936
|
-
"sm:col-start-
|
|
40954
|
+
"sm:col-start-1": src && position === POSITIONS.RIGHT.label,
|
|
40955
|
+
"sm:col-span-8 sm:col-start-3": src && position === POSITIONS.BOTTOM.label,
|
|
40956
|
+
"sm:col-span-12 sm:col-start-1 flex flex-col justify-center order-2": src && position === POSITIONS.TOP.label,
|
|
40957
|
+
"sm:col-start-7": src && position === POSITIONS.LEFT.label,
|
|
40937
40958
|
"flex flex-col justify-center sm:col-span-12": !src
|
|
40938
40959
|
});
|
|
40939
40960
|
};
|
|
@@ -40943,7 +40964,8 @@ var HeroWithMultipleLayouts = function HeroWithMultipleLayouts(_ref) {
|
|
|
40943
40964
|
return classnames("sm:col-span-5 col-span-12 flex justify-center", {
|
|
40944
40965
|
"sm:col-start-1": src && position === POSITIONS.LEFT.label,
|
|
40945
40966
|
"sm:col-start-8": src && position === POSITIONS.RIGHT.label,
|
|
40946
|
-
"sm:col-span-8 sm:col-start-3": src && position === POSITIONS.
|
|
40967
|
+
"sm:col-span-8 sm:col-start-3": src && position === POSITIONS.BOTTOM.label,
|
|
40968
|
+
"sm:col-span-8 sm:col-start-3 flex justify-center order-1": src && position === POSITIONS.TOP.label,
|
|
40947
40969
|
hidden: !src
|
|
40948
40970
|
});
|
|
40949
40971
|
};
|
|
@@ -40951,24 +40973,24 @@ var HeroWithMultipleLayouts = function HeroWithMultipleLayouts(_ref) {
|
|
|
40951
40973
|
var src = _ref4.src,
|
|
40952
40974
|
position = _ref4.position;
|
|
40953
40975
|
return classnames("flex w-full gap-x-4", {
|
|
40954
|
-
"justify-center": !src || position === POSITIONS.
|
|
40976
|
+
"justify-center": !src || position === POSITIONS.BOTTOM.label || position === POSITIONS.TOP.label
|
|
40955
40977
|
});
|
|
40956
40978
|
};
|
|
40957
40979
|
var textClasses = function textClasses(_ref5) {
|
|
40958
40980
|
var src = _ref5.src,
|
|
40959
40981
|
position = _ref5.position;
|
|
40960
40982
|
return classnames({
|
|
40961
|
-
"text-center": !src || position === POSITIONS.
|
|
40983
|
+
"text-center": !src || position === POSITIONS.BOTTOM.label || position === POSITIONS.TOP.label
|
|
40962
40984
|
});
|
|
40963
40985
|
};
|
|
40964
40986
|
return /*#__PURE__*/React__default["default"].createElement(MotionWrapper, {
|
|
40987
|
+
enableAnimation: enableAnimation,
|
|
40988
|
+
id: id,
|
|
40965
40989
|
backgroundImage: mergeLeft({
|
|
40966
40990
|
src: src
|
|
40967
40991
|
}, design.backgroundImage),
|
|
40968
40992
|
className: "flex items-center justify-between gap-x-2",
|
|
40969
|
-
design: mergeDesign(design.body, 24)
|
|
40970
|
-
enableAnimation: enableAnimation,
|
|
40971
|
-
id: id
|
|
40993
|
+
design: mergeDesign(design.body, 24)
|
|
40972
40994
|
}, /*#__PURE__*/React__default["default"].createElement(ArrowButton, {
|
|
40973
40995
|
isStart: true,
|
|
40974
40996
|
Icon: ArrowLeftS$1,
|
|
@@ -41034,7 +41056,7 @@ var HeroWithMultipleLayouts = function HeroWithMultipleLayouts(_ref) {
|
|
|
41034
41056
|
lgImageSize: design.media.width,
|
|
41035
41057
|
src: media.src,
|
|
41036
41058
|
className: classnames({
|
|
41037
|
-
"slider-image": media.position !== POSITIONS.
|
|
41059
|
+
"slider-image": media.position !== POSITIONS.BOTTOM.label || media.position !== POSITIONS.TOP.label
|
|
41038
41060
|
})
|
|
41039
41061
|
}))));
|
|
41040
41062
|
})), /*#__PURE__*/React__default["default"].createElement(ArrowButton, {
|