@bigbinary/neeto-site-blocks 1.6.6 → 1.6.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 +10 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4637,6 +4637,10 @@ var isEditorEmpty = function isEditorEmpty(htmlContent) {
|
|
|
4637
4637
|
})) return false;
|
|
4638
4638
|
return isNotPresent(htmlContent.replace(/<[^>]*>/g, ""));
|
|
4639
4639
|
};
|
|
4640
|
+
var isLinkHighlighted = function isLinkHighlighted(to, currentPath) {
|
|
4641
|
+
if (!(to && currentPath)) return false;
|
|
4642
|
+
return currentPath.pathName === to && isEmpty(currentPath.hash) || currentPath.hash === to;
|
|
4643
|
+
};
|
|
4640
4644
|
|
|
4641
4645
|
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; }
|
|
4642
4646
|
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; }
|
|
@@ -41753,7 +41757,7 @@ var HeaderWithButtons = function HeaderWithButtons(_ref) {
|
|
|
41753
41757
|
})
|
|
41754
41758
|
}, properties.links.map(function (link, index) {
|
|
41755
41759
|
return /*#__PURE__*/React__default.createElement(Link, _extends$2({
|
|
41756
|
-
isHighlighted: link.to
|
|
41760
|
+
isHighlighted: isLinkHighlighted(link.to, currentPath),
|
|
41757
41761
|
key: getUniqueKey(link.label, index),
|
|
41758
41762
|
style: design.links
|
|
41759
41763
|
}, link, otherProps));
|
|
@@ -41777,7 +41781,7 @@ var HeaderWithButtons = function HeaderWithButtons(_ref) {
|
|
|
41777
41781
|
className: "fadeIn col-span-2 col-start-1 ml-2 mt-4 flex flex-col gap-y-6 lg:hidden"
|
|
41778
41782
|
}, properties.links.map(function (button, index) {
|
|
41779
41783
|
return /*#__PURE__*/React__default.createElement(Link, _extends$2({
|
|
41780
|
-
isHighlighted: button.to
|
|
41784
|
+
isHighlighted: isLinkHighlighted(button.to, currentPath),
|
|
41781
41785
|
key: getUniqueKey(button.to, button.label, index),
|
|
41782
41786
|
style: (mergeRight(design.links), {
|
|
41783
41787
|
fontSize: "1.25em",
|
|
@@ -41924,7 +41928,7 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
41924
41928
|
className: "col-span-4 col-start-1 hidden items-center gap-6 lg:flex"
|
|
41925
41929
|
}, properties.links.map(function (link, index) {
|
|
41926
41930
|
return /*#__PURE__*/React__default.createElement(Link, _extends$2({
|
|
41927
|
-
isHighlighted: link.to
|
|
41931
|
+
isHighlighted: isLinkHighlighted(link.to, currentPath),
|
|
41928
41932
|
key: getUniqueKey(link.label, index),
|
|
41929
41933
|
style: design.links
|
|
41930
41934
|
}, link, otherProps));
|
|
@@ -41971,7 +41975,7 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
41971
41975
|
}, properties.links.map(function (icon, index) {
|
|
41972
41976
|
return /*#__PURE__*/React__default.createElement(Link, _extends$2({
|
|
41973
41977
|
className: "w-full",
|
|
41974
|
-
isHighlighted: icon.to
|
|
41978
|
+
isHighlighted: isLinkHighlighted(icon.to, currentPath),
|
|
41975
41979
|
key: getUniqueKey(icon.url, icon.label, index),
|
|
41976
41980
|
setIsMenuOpen: setIsLinksOpen,
|
|
41977
41981
|
style: (mergeRight(design.links), {
|
|
@@ -42051,7 +42055,7 @@ var HeaderWithLogoTitle = function HeaderWithLogoTitle(_ref) {
|
|
|
42051
42055
|
}, properties.links.map(function (link, index) {
|
|
42052
42056
|
return /*#__PURE__*/React__default.createElement(Link, _extends$2({
|
|
42053
42057
|
className: "hidden lg:inline",
|
|
42054
|
-
isHighlighted: link.to
|
|
42058
|
+
isHighlighted: isLinkHighlighted(link.to, currentPath),
|
|
42055
42059
|
key: getUniqueKey(link.label, link.to, index),
|
|
42056
42060
|
style: design.links
|
|
42057
42061
|
}, link, otherProps));
|
|
@@ -42080,7 +42084,7 @@ var HeaderWithLogoTitle = function HeaderWithLogoTitle(_ref) {
|
|
|
42080
42084
|
label: label,
|
|
42081
42085
|
setIsMenuOpen: setIsMenuOpen,
|
|
42082
42086
|
to: to,
|
|
42083
|
-
isHighlighted: to
|
|
42087
|
+
isHighlighted: isLinkHighlighted(to, currentPath),
|
|
42084
42088
|
key: getUniqueKey(to, label, index),
|
|
42085
42089
|
style: (mergeRight(design.links), {
|
|
42086
42090
|
fontSize: "1.25em",
|