@bigbinary/neeto-site-blocks 1.8.9 → 1.8.11
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 +11 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -4992,6 +4992,10 @@ var isLinkHighlighted = function isLinkHighlighted(to, currentPath) {
|
|
|
4992
4992
|
if (!(to && currentPath)) return false;
|
|
4993
4993
|
return currentPath.pathName === to && isEmpty(currentPath.hash) || currentPath.hash === to;
|
|
4994
4994
|
};
|
|
4995
|
+
var isEditorContent = function isEditorContent(content) {
|
|
4996
|
+
var checkForHTMLTags = /<(p|h[1-5])>.*?<\/\1>/;
|
|
4997
|
+
return checkForHTMLTags.test(content);
|
|
4998
|
+
};
|
|
4995
4999
|
|
|
4996
5000
|
function ownKeys$l(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; }
|
|
4997
5001
|
function _objectSpread$l(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$l(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$l(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -15905,7 +15909,7 @@ function Interweave(props) {
|
|
|
15905
15909
|
|
|
15906
15910
|
var StyledInterweave = styled__default["default"](Interweave)(function (_ref) {
|
|
15907
15911
|
var fontSize = _ref.fontSize;
|
|
15908
|
-
return "\n h1 {\n font-size: ".concat(fontSize ? "calc(".concat(FIXED_H1_SIZE, " + ").concat(fontSize, ")") : FIXED_H1_SIZE, ";\n font-weight: inherit;\n }\n\n h2 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H2_SIZE, " + ").concat(fontSize, ")") : FIXED_H2_SIZE, ";\n font-weight: inherit;\n }\n\n h3 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H3_SIZE, " + ").concat(fontSize, ")") : FIXED_H3_SIZE, ";\n font-weight: inherit;\n }\n\n h4 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H4_SIZE, " + ").concat(fontSize, ")") : FIXED_H4_SIZE, ";\n font-weight: inherit;\n }\n\n h5 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H5_SIZE, " + ").concat(fontSize, ")") : FIXED_H5_SIZE, ";\n font-weight: inherit;\n }\n");
|
|
15912
|
+
return "\n font-size: ".concat(fontSize || "inherit", ";\n font-weight: inherit;\n\n h1 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H1_SIZE, " + ").concat(fontSize, ")") : FIXED_H1_SIZE, ";\n font-weight: inherit;\n }\n\n h2 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H2_SIZE, " + ").concat(fontSize, ")") : FIXED_H2_SIZE, ";\n font-weight: inherit;\n }\n\n h3 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H3_SIZE, " + ").concat(fontSize, ")") : FIXED_H3_SIZE, ";\n font-weight: inherit;\n }\n\n h4 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H4_SIZE, " + ").concat(fontSize, ")") : FIXED_H4_SIZE, ";\n font-weight: inherit;\n }\n\n h5 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H5_SIZE, " + ").concat(fontSize, ")") : FIXED_H5_SIZE, ";\n font-weight: inherit;\n }\n\n p {\n font-size: inherit;\n font-weight: inherit;\n }\n");
|
|
15909
15913
|
});
|
|
15910
15914
|
|
|
15911
15915
|
var _templateObject;
|
|
@@ -16404,7 +16408,7 @@ var Typography = function Typography(_ref) {
|
|
|
16404
16408
|
className: "neeto-editor-content",
|
|
16405
16409
|
content: children,
|
|
16406
16410
|
fontSize: style.fontSize,
|
|
16407
|
-
tagName: "p"
|
|
16411
|
+
tagName: isEditorContent(children) ? "div" : "p"
|
|
16408
16412
|
}));
|
|
16409
16413
|
};
|
|
16410
16414
|
Typography.displayName = "Typography";
|
|
@@ -42592,7 +42596,7 @@ var HeaderWithButtons = function HeaderWithButtons(_ref) {
|
|
|
42592
42596
|
id: "header-with-buttons-".concat(index, "-link"),
|
|
42593
42597
|
isHighlighted: isLinkHighlighted(button.to, currentPath),
|
|
42594
42598
|
key: getUniqueKey(button.to, button.label, index),
|
|
42595
|
-
style:
|
|
42599
|
+
style: mergeRight(design.links, {
|
|
42596
42600
|
fontSize: "1.25em",
|
|
42597
42601
|
fontWeight: "500"
|
|
42598
42602
|
})
|
|
@@ -42696,9 +42700,9 @@ var HeaderWithDropdownLinks = function HeaderWithDropdownLinks(_ref) {
|
|
|
42696
42700
|
}, properties.links.map(function (link, index) {
|
|
42697
42701
|
return /*#__PURE__*/React__default["default"].createElement(Dropdown, {
|
|
42698
42702
|
index: index,
|
|
42699
|
-
|
|
42703
|
+
dropdownLink: link,
|
|
42700
42704
|
key: getUniqueKey(link.label, link.to, index),
|
|
42701
|
-
design:
|
|
42705
|
+
design: mergeRight(design.links, {
|
|
42702
42706
|
fontSize: "1.25em",
|
|
42703
42707
|
fontWeight: "500"
|
|
42704
42708
|
})
|
|
@@ -42805,7 +42809,7 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
42805
42809
|
isHighlighted: isLinkHighlighted(icon.to, currentPath),
|
|
42806
42810
|
key: getUniqueKey(icon.url, icon.label, index),
|
|
42807
42811
|
setIsMenuOpen: setIsLinksOpen,
|
|
42808
|
-
style:
|
|
42812
|
+
style: mergeRight(design.links, {
|
|
42809
42813
|
fontSize: "1.25em",
|
|
42810
42814
|
fontWeight: "500"
|
|
42811
42815
|
})
|
|
@@ -42927,7 +42931,7 @@ var HeaderWithLogoTitle = function HeaderWithLogoTitle(_ref) {
|
|
|
42927
42931
|
id: "header-with-logo-title-links-".concat(index, "-link"),
|
|
42928
42932
|
isHighlighted: isLinkHighlighted(to, currentPath),
|
|
42929
42933
|
key: getUniqueKey(to, label, index),
|
|
42930
|
-
style:
|
|
42934
|
+
style: mergeRight(design.links, {
|
|
42931
42935
|
fontSize: "1.25em",
|
|
42932
42936
|
fontWeight: "500"
|
|
42933
42937
|
})
|