@bigbinary/neeto-site-blocks 1.16.0 → 1.16.2
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 +20 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +20 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -7205,7 +7205,8 @@ var Button = function Button(_ref) {
|
|
|
7205
7205
|
}));
|
|
7206
7206
|
}
|
|
7207
7207
|
if (action === "page") {
|
|
7208
|
-
var
|
|
7208
|
+
var pageHref = to === "/" ? "" : to;
|
|
7209
|
+
var pageUrl = draftMode ? "".concat(baseUrl).concat(pageHref) : pageHref;
|
|
7209
7210
|
return /*#__PURE__*/jsxRuntime.jsx(StyledAnchor, _objectSpread$B(_objectSpread$B({
|
|
7210
7211
|
as: Link !== null && Link !== void 0 ? Link : "a"
|
|
7211
7212
|
}, commonProps), {}, {
|
|
@@ -7348,10 +7349,12 @@ var LinkElement = function LinkElement(_ref) {
|
|
|
7348
7349
|
}));
|
|
7349
7350
|
}
|
|
7350
7351
|
if (action === "page") {
|
|
7352
|
+
var pageHref = to === "/" ? "" : to;
|
|
7353
|
+
var pageUrl = draftMode ? "".concat(baseUrl).concat(pageHref) : pageHref;
|
|
7351
7354
|
return /*#__PURE__*/jsxRuntime.jsxs(StyledAnchor, _objectSpread$z(_objectSpread$z({
|
|
7352
7355
|
as: Link !== null && Link !== void 0 ? Link : "a"
|
|
7353
7356
|
}, commonProps), {}, {
|
|
7354
|
-
to:
|
|
7357
|
+
to: pageUrl,
|
|
7355
7358
|
children: [label, Icon && /*#__PURE__*/jsxRuntime.jsx(Icon, {}), children]
|
|
7356
7359
|
}));
|
|
7357
7360
|
}
|
|
@@ -16363,6 +16366,8 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
16363
16366
|
var position = properties.position;
|
|
16364
16367
|
var headerIntersectorRef = React.useRef(null);
|
|
16365
16368
|
var isHeadingWrapperVisible = useElementVisible(headerIntersectorRef);
|
|
16369
|
+
var logo = properties.logo,
|
|
16370
|
+
links = properties.links;
|
|
16366
16371
|
var baseClasses = "grid grid-cols-12 sm:gap-x-4 items-center grid-flow-row-dense";
|
|
16367
16372
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
16368
16373
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -16377,8 +16382,10 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
16377
16382
|
"neeto-site-sticky-header--scroll": !isHeadingWrapperVisible
|
|
16378
16383
|
}, className),
|
|
16379
16384
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
16380
|
-
className: "col-span-5 col-start-1 hidden items-center gap-6 lg:flex",
|
|
16381
|
-
|
|
16385
|
+
className: classnames__default["default"]("col-span-5 col-start-1 hidden items-center gap-6 lg:flex", {
|
|
16386
|
+
"lg:col-start-4 lg:justify-center": logo.position === POSITIONS.LEFT.label
|
|
16387
|
+
}),
|
|
16388
|
+
children: links.map(function (link, index) {
|
|
16382
16389
|
return /*#__PURE__*/jsxRuntime.jsx(Link, _objectSpread$7(_objectSpread$7({
|
|
16383
16390
|
isHighlighted: isLinkHighlighted(link.to, currentPath),
|
|
16384
16391
|
style: design.links
|
|
@@ -16389,19 +16396,22 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
16389
16396
|
}, otherProps), getUniqueKey(link.label, index));
|
|
16390
16397
|
})
|
|
16391
16398
|
}), /*#__PURE__*/jsxRuntime.jsx(Link, _objectSpread$7(_objectSpread$7({
|
|
16392
|
-
action:
|
|
16393
|
-
|
|
16394
|
-
|
|
16399
|
+
action: logo.action,
|
|
16400
|
+
to: logo.to,
|
|
16401
|
+
className: classnames__default["default"]("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:max-h-14", {
|
|
16402
|
+
"lg:col-start-1": logo.position === POSITIONS.LEFT.label,
|
|
16403
|
+
"lg:col-start-6": logo.position === POSITIONS.RIGHT.label
|
|
16404
|
+
})
|
|
16395
16405
|
}, otherProps), {}, {
|
|
16396
16406
|
children: /*#__PURE__*/jsxRuntime.jsx(StyledImage$1, {
|
|
16397
16407
|
image: image,
|
|
16398
16408
|
priority: true,
|
|
16399
|
-
alt:
|
|
16409
|
+
alt: logo.alt,
|
|
16400
16410
|
design: design.logo,
|
|
16401
16411
|
disableButtonAndLinks: otherProps.disableButtonAndLinks,
|
|
16402
16412
|
id: "header-with-icons-logo",
|
|
16403
16413
|
isAddNewPane: otherProps.isAddNewPane,
|
|
16404
|
-
src:
|
|
16414
|
+
src: logo.src
|
|
16405
16415
|
})
|
|
16406
16416
|
})), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
16407
16417
|
className: "col-span-5 col-start-8 hidden justify-end sm:col-span-3 sm:col-start-10 sm:flex",
|
|
@@ -16442,7 +16452,7 @@ var HeaderWithIcons = function HeaderWithIcons(_ref) {
|
|
|
16442
16452
|
})
|
|
16443
16453
|
}), isLinksOpen && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
16444
16454
|
className: "fadeIn col-span-12 col-start-1 my-6 flex flex-col gap-y-6 lg:hidden",
|
|
16445
|
-
children: [
|
|
16455
|
+
children: [links.map(function (icon, index) {
|
|
16446
16456
|
return /*#__PURE__*/jsxRuntime.jsx(Link, _objectSpread$7({
|
|
16447
16457
|
className: "w-fit",
|
|
16448
16458
|
id: "header-with-icons-links-".concat(index, "-link"),
|