@bigbinary/neeto-site-blocks 1.2.6 → 1.2.8
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 +74 -35
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +74 -35
- 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),
|
|
@@ -40606,19 +40618,26 @@ var HeaderWithButtons = function HeaderWithButtons(_ref) {
|
|
|
40606
40618
|
"neeto-site-sticky-header": position === "sticky",
|
|
40607
40619
|
"neeto-site-sticky-header--scroll": !isHeadingWrapperVisible
|
|
40608
40620
|
}, className)
|
|
40609
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
40610
|
-
|
|
40611
|
-
|
|
40621
|
+
}, /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40622
|
+
action: properties.logo.action,
|
|
40623
|
+
to: properties.logo.to,
|
|
40612
40624
|
className: classnames("col-start-2 ml-3 flex max-h-8 justify-start sm:ml-0 sm:max-h-10 lg:col-span-3 lg:col-start-1 lg:max-h-14", {
|
|
40613
40625
|
"col-span-10": isEmpty(buttons),
|
|
40614
40626
|
"col-span-3 sm:col-span-4 sm:col-start-2": neetoCist.isNotEmpty(buttons)
|
|
40615
|
-
})
|
|
40616
|
-
|
|
40627
|
+
}),
|
|
40628
|
+
icon: function icon() {
|
|
40629
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledImage$1, {
|
|
40630
|
+
design: design.logo,
|
|
40631
|
+
src: properties.logo.src
|
|
40632
|
+
});
|
|
40633
|
+
}
|
|
40634
|
+
}, otherProps)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
40617
40635
|
className: classnames("col-span-5 col-start-4 hidden items-center justify-center gap-x-6 lg:flex", {
|
|
40618
40636
|
"col-span-9 sm:justify-end": isEmpty(buttons)
|
|
40619
40637
|
})
|
|
40620
40638
|
}, properties.links.map(function (link, index) {
|
|
40621
40639
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40640
|
+
isHighlighted: currentPath === link.to,
|
|
40622
40641
|
key: getUniqueKey(link.label, index),
|
|
40623
40642
|
style: design.links
|
|
40624
40643
|
}, link, otherProps));
|
|
@@ -40642,19 +40661,21 @@ var HeaderWithButtons = function HeaderWithButtons(_ref) {
|
|
|
40642
40661
|
className: "fadeIn col-span-2 col-start-1 ml-2 mt-3 block space-y-2 lg:hidden"
|
|
40643
40662
|
}, properties.links.map(function (button, index) {
|
|
40644
40663
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40645
|
-
|
|
40664
|
+
isHighlighted: currentPath === button.to,
|
|
40665
|
+
key: getUniqueKey(button.to, button.label, index),
|
|
40646
40666
|
style: design.links
|
|
40647
40667
|
}, button, otherProps));
|
|
40648
40668
|
}))));
|
|
40649
40669
|
};
|
|
40650
40670
|
|
|
40651
|
-
var _excluded$6 = ["configurations", "className", "id"];
|
|
40671
|
+
var _excluded$6 = ["configurations", "className", "currentPath", "id"];
|
|
40652
40672
|
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
40673
|
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
40674
|
var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
40655
40675
|
var configurations = _ref.configurations,
|
|
40656
40676
|
_ref$className = _ref.className,
|
|
40657
40677
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
40678
|
+
currentPath = _ref.currentPath,
|
|
40658
40679
|
id = _ref.id,
|
|
40659
40680
|
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$6);
|
|
40660
40681
|
var _useState = React.useState(false),
|
|
@@ -40686,14 +40707,21 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
40686
40707
|
className: "col-span-4 col-start-1 hidden items-center gap-6 lg:flex"
|
|
40687
40708
|
}, properties.links.map(function (link, index) {
|
|
40688
40709
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40710
|
+
isHighlighted: currentPath === link.to,
|
|
40689
40711
|
key: getUniqueKey(link.label, index),
|
|
40690
40712
|
style: design.links
|
|
40691
40713
|
}, link, otherProps));
|
|
40692
|
-
})), /*#__PURE__*/React__default["default"].createElement(
|
|
40714
|
+
})), /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40715
|
+
action: properties.logo.action,
|
|
40693
40716
|
className: "col-span-6 col-start-4 m-auto flex max-h-8 justify-center sm:col-span-4 sm:col-start-5 sm:max-h-10 lg:col-span-3 lg:col-start-6 lg:max-h-14",
|
|
40694
|
-
|
|
40695
|
-
|
|
40696
|
-
|
|
40717
|
+
to: properties.logo.to,
|
|
40718
|
+
icon: function icon() {
|
|
40719
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledImage$1, {
|
|
40720
|
+
design: design.logo,
|
|
40721
|
+
src: properties.logo.src
|
|
40722
|
+
});
|
|
40723
|
+
}
|
|
40724
|
+
}, otherProps)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
40697
40725
|
className: "col-span-5 col-start-8 hidden justify-end sm:col-span-3 sm:col-start-10 sm:flex"
|
|
40698
40726
|
}, properties.icons.map(function (_icon, index) {
|
|
40699
40727
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
@@ -40729,6 +40757,7 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
40729
40757
|
}, properties.links.map(function (icon, index) {
|
|
40730
40758
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40731
40759
|
className: "w-full",
|
|
40760
|
+
isHighlighted: currentPath === icon.to,
|
|
40732
40761
|
key: getUniqueKey(icon.url, icon.label, index),
|
|
40733
40762
|
style: design.links
|
|
40734
40763
|
}, icon));
|
|
@@ -40749,12 +40778,13 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
40749
40778
|
}))));
|
|
40750
40779
|
};
|
|
40751
40780
|
|
|
40752
|
-
var _excluded$5 = ["configurations", "className", "id"];
|
|
40781
|
+
var _excluded$5 = ["configurations", "className", "id", "currentPath"];
|
|
40753
40782
|
var HeaderWithLogoTitle = function HeaderWithLogoTitle(_ref) {
|
|
40754
40783
|
var configurations = _ref.configurations,
|
|
40755
40784
|
_ref$className = _ref.className,
|
|
40756
40785
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
40757
40786
|
id = _ref.id,
|
|
40787
|
+
currentPath = _ref.currentPath,
|
|
40758
40788
|
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$5);
|
|
40759
40789
|
var _useState = React.useState(false),
|
|
40760
40790
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
@@ -40783,22 +40813,30 @@ var HeaderWithLogoTitle = function HeaderWithLogoTitle(_ref) {
|
|
|
40783
40813
|
"col-span-10": isEmpty(buttons),
|
|
40784
40814
|
"col-span-4": neetoCist.isNotEmpty(buttons)
|
|
40785
40815
|
})
|
|
40786
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
40787
|
-
|
|
40788
|
-
|
|
40789
|
-
|
|
40790
|
-
|
|
40791
|
-
|
|
40792
|
-
|
|
40793
|
-
|
|
40794
|
-
|
|
40795
|
-
|
|
40796
|
-
|
|
40816
|
+
}, /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40817
|
+
action: properties.logo.action,
|
|
40818
|
+
className: "flex w-full gap-x-2",
|
|
40819
|
+
to: properties.logo.to,
|
|
40820
|
+
icon: function icon() {
|
|
40821
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(StyledImage$1, {
|
|
40822
|
+
className: "max-h-8 sm:max-h-10 lg:max-h-14",
|
|
40823
|
+
design: design.logo,
|
|
40824
|
+
src: properties.logo.src
|
|
40825
|
+
}), /*#__PURE__*/React__default["default"].createElement(Typography$1, {
|
|
40826
|
+
component: "p",
|
|
40827
|
+
style: design.logoTitle,
|
|
40828
|
+
className: classnames({
|
|
40829
|
+
"hidden sm:flex": properties.logo.src
|
|
40830
|
+
})
|
|
40831
|
+
}, properties.logo.title));
|
|
40832
|
+
}
|
|
40833
|
+
}, otherProps))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
40797
40834
|
className: "col-span-6 col-start-7 flex items-center justify-end gap-x-6 sm:col-span-5 sm:col-start-8 lg:col-span-7 lg:col-start-6"
|
|
40798
40835
|
}, properties.links.map(function (link, index) {
|
|
40799
40836
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40800
40837
|
className: "hidden lg:inline",
|
|
40801
|
-
|
|
40838
|
+
isHighlighted: currentPath === link.to,
|
|
40839
|
+
key: getUniqueKey(link.label, link.to, index),
|
|
40802
40840
|
style: design.links
|
|
40803
40841
|
}, link, otherProps));
|
|
40804
40842
|
}), buttons.map(function (button, index) {
|
|
@@ -40819,14 +40857,15 @@ var HeaderWithLogoTitle = function HeaderWithLogoTitle(_ref) {
|
|
|
40819
40857
|
className: "fadeIn col-span-2 col-start-1 space-y-2 lg:hidden"
|
|
40820
40858
|
}, properties.links.map(function (_ref2, index) {
|
|
40821
40859
|
var label = _ref2.label,
|
|
40822
|
-
|
|
40860
|
+
to = _ref2.to,
|
|
40823
40861
|
action = _ref2.action;
|
|
40824
40862
|
return /*#__PURE__*/React__default["default"].createElement(Link, _extends__default["default"]({
|
|
40825
40863
|
action: action,
|
|
40826
40864
|
label: label,
|
|
40827
|
-
|
|
40828
|
-
|
|
40829
|
-
|
|
40865
|
+
to: to,
|
|
40866
|
+
isHighlighted: currentPath === to,
|
|
40867
|
+
key: getUniqueKey(to, label, index),
|
|
40868
|
+
style: design.links
|
|
40830
40869
|
}, otherProps));
|
|
40831
40870
|
}))));
|
|
40832
40871
|
};
|