@bigbinary/neeto-site-blocks 1.1.5 → 1.1.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 +265 -254
- 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 +265 -254
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -14205,257 +14205,11 @@ var StyledImage = styled__default["default"].img(function (_ref) {
|
|
|
14205
14205
|
});
|
|
14206
14206
|
var StyledImage$1 = withConditionalRender(StyledImage, prop("src"));
|
|
14207
14207
|
|
|
14208
|
-
var
|
|
14209
|
-
var
|
|
14210
|
-
|
|
14211
|
-
|
|
14212
|
-
|
|
14213
|
-
"swiper-pagination-bullet-active": isActive
|
|
14214
|
-
})
|
|
14215
|
-
};
|
|
14216
|
-
})(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n &.swiper-pagination-bullet {\n background-color: ", " !important;\n }\n\n &.swiper-pagination-bullet-active {\n background-color: ", " !important;\n }\n"])), function (_ref2) {
|
|
14217
|
-
var design = _ref2.design;
|
|
14218
|
-
return (design === null || design === void 0 ? void 0 : design.paginationButtonInactiveColor) || "#A2A2A2";
|
|
14219
|
-
}, function (_ref3) {
|
|
14220
|
-
var design = _ref3.design;
|
|
14221
|
-
return (design === null || design === void 0 ? void 0 : design.paginationButtonActiveColor) || "#1F2433";
|
|
14222
|
-
});
|
|
14223
|
-
|
|
14224
|
-
var _excluded$h = ["enableAnimation", "children", "duration"];
|
|
14225
|
-
var MotionStyledWrapper = motion(StyledWrapper);
|
|
14226
|
-
var MotionWrapper = function MotionWrapper(_ref) {
|
|
14227
|
-
var enableAnimation = _ref.enableAnimation,
|
|
14228
|
-
children = _ref.children,
|
|
14229
|
-
_ref$duration = _ref.duration,
|
|
14230
|
-
duration = _ref$duration === void 0 ? 0.5 : _ref$duration,
|
|
14231
|
-
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$h);
|
|
14232
|
-
return /*#__PURE__*/React__default["default"].createElement(MotionStyledWrapper, _extends__default["default"]({
|
|
14233
|
-
initial: enableAnimation ? {
|
|
14234
|
-
opacity: 0
|
|
14235
|
-
} : {},
|
|
14236
|
-
transition: enableAnimation ? {
|
|
14237
|
-
duration: duration
|
|
14238
|
-
} : {},
|
|
14239
|
-
viewport: {
|
|
14240
|
-
once: true
|
|
14241
|
-
},
|
|
14242
|
-
whileInView: {
|
|
14243
|
-
opacity: 1
|
|
14244
|
-
}
|
|
14245
|
-
}, otherProps), children);
|
|
14246
|
-
};
|
|
14247
|
-
|
|
14248
|
-
var _excluded$g = ["design", "nestedComponent", "nestedClassName", "enableAnimation", "children"];
|
|
14249
|
-
var BlockWrapper = function BlockWrapper(_ref) {
|
|
14250
|
-
var design = _ref.design,
|
|
14251
|
-
_ref$nestedComponent = _ref.nestedComponent,
|
|
14252
|
-
Wrapper = _ref$nestedComponent === void 0 ? MotionWrapper : _ref$nestedComponent,
|
|
14253
|
-
nestedClassName = _ref.nestedClassName,
|
|
14254
|
-
_ref$enableAnimation = _ref.enableAnimation,
|
|
14255
|
-
enableAnimation = _ref$enableAnimation === void 0 ? false : _ref$enableAnimation,
|
|
14256
|
-
children = _ref.children,
|
|
14257
|
-
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$g);
|
|
14258
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledWrapper, _extends__default["default"]({
|
|
14259
|
-
design: mergeDesign(design)
|
|
14260
|
-
}, otherProps), /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
14261
|
-
className: classnames("neeto-site-block-wrapper", nestedClassName),
|
|
14262
|
-
enableAnimation: enableAnimation,
|
|
14263
|
-
design: {
|
|
14264
|
-
paddingHorizontal: design.paddingHorizontal
|
|
14265
|
-
}
|
|
14266
|
-
}, children));
|
|
14267
|
-
};
|
|
14268
|
-
|
|
14269
|
-
var Button = function Button(_ref) {
|
|
14270
|
-
var to = _ref.to,
|
|
14271
|
-
label = _ref.label,
|
|
14272
|
-
_ref$style = _ref.style,
|
|
14273
|
-
style = _ref$style === void 0 ? DEFAULT_BUTTON_STYLES : _ref$style,
|
|
14274
|
-
_ref$className = _ref.className,
|
|
14275
|
-
className = _ref$className === void 0 ? "" : _ref$className,
|
|
14276
|
-
_ref$action = _ref.action,
|
|
14277
|
-
action = _ref$action === void 0 ? "" : _ref$action,
|
|
14278
|
-
_ref$draftMode = _ref.draftMode,
|
|
14279
|
-
draftMode = _ref$draftMode === void 0 ? false : _ref$draftMode,
|
|
14280
|
-
_ref$baseUrl = _ref.baseUrl,
|
|
14281
|
-
baseUrl = _ref$baseUrl === void 0 ? "" : _ref$baseUrl,
|
|
14282
|
-
Link = _ref.link;
|
|
14283
|
-
var anchorBaseClass = classnames("inline-flex transition-all duration-300 ease-in-out", {
|
|
14284
|
-
"pointer-events-none": action === ""
|
|
14285
|
-
});
|
|
14286
|
-
var commonProps = {
|
|
14287
|
-
className: classnames([anchorBaseClass, className]),
|
|
14288
|
-
design: style,
|
|
14289
|
-
href: to !== null && to !== void 0 ? to : "",
|
|
14290
|
-
rel: "noreferrer"
|
|
14291
|
-
};
|
|
14292
|
-
if (action === "external") {
|
|
14293
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledAnchor, _extends__default["default"]({}, commonProps, {
|
|
14294
|
-
isButton: true,
|
|
14295
|
-
target: "_blank"
|
|
14296
|
-
}), label);
|
|
14297
|
-
}
|
|
14298
|
-
if (action === "page") {
|
|
14299
|
-
var pageUrl = draftMode ? "".concat(baseUrl).concat(to) : to;
|
|
14300
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledAnchor, _extends__default["default"]({
|
|
14301
|
-
as: Link !== null && Link !== void 0 ? Link : "a"
|
|
14302
|
-
}, commonProps, {
|
|
14303
|
-
percentage: 0.1,
|
|
14304
|
-
to: pageUrl
|
|
14305
|
-
}), label);
|
|
14306
|
-
}
|
|
14307
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledAnchor, _extends__default["default"]({}, commonProps, {
|
|
14308
|
-
isButton: true
|
|
14309
|
-
}), label);
|
|
14310
|
-
};
|
|
14311
|
-
var Button$1 = withConditionalRender(Button, prop("label"));
|
|
14312
|
-
|
|
14313
|
-
var LinkElement = function LinkElement(_ref) {
|
|
14314
|
-
var to = _ref.to,
|
|
14315
|
-
label = _ref.label,
|
|
14316
|
-
_ref$style = _ref.style,
|
|
14317
|
-
style = _ref$style === void 0 ? DEFAULT_LINK_STYLES : _ref$style,
|
|
14318
|
-
_ref$className = _ref.className,
|
|
14319
|
-
className = _ref$className === void 0 ? "" : _ref$className,
|
|
14320
|
-
_ref$icon = _ref.icon,
|
|
14321
|
-
Icon = _ref$icon === void 0 ? null : _ref$icon,
|
|
14322
|
-
_ref$action = _ref.action,
|
|
14323
|
-
action = _ref$action === void 0 ? "" : _ref$action,
|
|
14324
|
-
_ref$baseUrl = _ref.baseUrl,
|
|
14325
|
-
baseUrl = _ref$baseUrl === void 0 ? "" : _ref$baseUrl,
|
|
14326
|
-
_ref$draftMode = _ref.draftMode,
|
|
14327
|
-
draftMode = _ref$draftMode === void 0 ? false : _ref$draftMode,
|
|
14328
|
-
Link = _ref.link;
|
|
14329
|
-
var baseClass = classnames("inline-flex items-center transition-all duration-300 ease-in-out", {
|
|
14330
|
-
"pointer-events-none": action === ""
|
|
14331
|
-
});
|
|
14332
|
-
var commonProps = {
|
|
14333
|
-
className: classnames([baseClass, className]),
|
|
14334
|
-
design: style,
|
|
14335
|
-
href: to !== null && to !== void 0 ? to : "",
|
|
14336
|
-
rel: "noreferrer",
|
|
14337
|
-
percentage: 0.1
|
|
14338
|
-
};
|
|
14339
|
-
if (action === "external") {
|
|
14340
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledAnchor, _extends__default["default"]({}, commonProps, {
|
|
14341
|
-
target: "_blank"
|
|
14342
|
-
}), label, Icon && /*#__PURE__*/React__default["default"].createElement(Icon, null));
|
|
14343
|
-
}
|
|
14344
|
-
if (action === "page") {
|
|
14345
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledAnchor, _extends__default["default"]({
|
|
14346
|
-
as: Link !== null && Link !== void 0 ? Link : "a"
|
|
14347
|
-
}, commonProps, {
|
|
14348
|
-
to: draftMode ? "".concat(baseUrl).concat(to) : to
|
|
14349
|
-
}), label, Icon && /*#__PURE__*/React__default["default"].createElement(Icon, null));
|
|
14350
|
-
}
|
|
14351
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledAnchor, commonProps, label, Icon && /*#__PURE__*/React__default["default"].createElement(Icon, null));
|
|
14352
|
-
};
|
|
14353
|
-
var Link = withConditionalRender(LinkElement, function () {
|
|
14354
|
-
return !!(prop("label") || prop("icon"));
|
|
14355
|
-
});
|
|
14356
|
-
|
|
14357
|
-
var _excluded$f = ["isEmbedded", "src", "design"];
|
|
14358
|
-
var Media = function Media(_ref) {
|
|
14359
|
-
var isEmbedded = _ref.isEmbedded,
|
|
14360
|
-
src = _ref.src,
|
|
14361
|
-
design = _ref.design,
|
|
14362
|
-
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$f);
|
|
14363
|
-
if (isEmbedded) {
|
|
14364
|
-
return /*#__PURE__*/React__default["default"].createElement("iframe", {
|
|
14365
|
-
allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",
|
|
14366
|
-
className: "w-full",
|
|
14367
|
-
height: "300px",
|
|
14368
|
-
src: validateUrl(src),
|
|
14369
|
-
style: design
|
|
14370
|
-
});
|
|
14371
|
-
}
|
|
14372
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledImage$1, _extends__default["default"]({
|
|
14373
|
-
design: design,
|
|
14374
|
-
src: src
|
|
14375
|
-
}, otherProps));
|
|
14376
|
-
};
|
|
14377
|
-
|
|
14378
|
-
var Pagination$1 = function Pagination(_ref) {
|
|
14379
|
-
var _classnames, _classnames2;
|
|
14380
|
-
var swiper = _ref.swiper,
|
|
14381
|
-
design = _ref.design;
|
|
14382
|
-
var _useState = React.useState(0),
|
|
14383
|
-
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
14384
|
-
activeSlide = _useState2[0],
|
|
14385
|
-
setActiveSlide = _useState2[1];
|
|
14386
|
-
React.useEffect(function () {
|
|
14387
|
-
if (!swiper) return undefined;
|
|
14388
|
-
var changeHandler = function changeHandler() {
|
|
14389
|
-
return setActiveSlide(swiper.realIndex);
|
|
14390
|
-
};
|
|
14391
|
-
swiper.on("slideChange", changeHandler);
|
|
14392
|
-
return function () {
|
|
14393
|
-
return swiper.off("slideChange", changeHandler);
|
|
14394
|
-
};
|
|
14395
|
-
}, [swiper]);
|
|
14396
|
-
if (!swiper) return null;
|
|
14397
|
-
var totalSlides = swiper.slides.length;
|
|
14398
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
14399
|
-
className: "swiper-pagination flex items-center justify-center space-x-4"
|
|
14400
|
-
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
14401
|
-
className: classnames({
|
|
14402
|
-
"cursor-default": swiper.isBeginning
|
|
14403
|
-
}),
|
|
14404
|
-
onClick: function onClick() {
|
|
14405
|
-
return !swiper.isBeginning && swiper.slidePrev();
|
|
14406
|
-
}
|
|
14407
|
-
}, /*#__PURE__*/React__default["default"].createElement(ArrowLeftS$1, {
|
|
14408
|
-
size: 26,
|
|
14409
|
-
fill: classnames((_classnames = {}, _defineProperty__default["default"](_classnames, (design === null || design === void 0 ? void 0 : design.navigationInactiveColor) || "#ccc", swiper.isBeginning), _defineProperty__default["default"](_classnames, (design === null || design === void 0 ? void 0 : design.navigationActiveColor) || "#1F2433", !swiper.isBeginning), _classnames))
|
|
14410
|
-
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
14411
|
-
className: "space-x-2"
|
|
14412
|
-
}, _toConsumableArray__default["default"](Array(totalSlides)).map(function (_, index) {
|
|
14413
|
-
return /*#__PURE__*/React__default["default"].createElement(PaginationWrapper, {
|
|
14414
|
-
design: design,
|
|
14415
|
-
isActive: activeSlide === index,
|
|
14416
|
-
key: index,
|
|
14417
|
-
onClick: function onClick() {
|
|
14418
|
-
return swiper.slideTo(index);
|
|
14419
|
-
}
|
|
14420
|
-
});
|
|
14421
|
-
})), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
14422
|
-
className: classnames({
|
|
14423
|
-
"cursor-default": swiper.isEnd
|
|
14424
|
-
}),
|
|
14425
|
-
onClick: function onClick() {
|
|
14426
|
-
return swiper.slideNext();
|
|
14427
|
-
}
|
|
14428
|
-
}, /*#__PURE__*/React__default["default"].createElement(ArrowRightS$1, {
|
|
14429
|
-
size: 26,
|
|
14430
|
-
fill: classnames((_classnames2 = {}, _defineProperty__default["default"](_classnames2, (design === null || design === void 0 ? void 0 : design.navigationInactiveColor) || "#ccc", swiper.isEnd), _defineProperty__default["default"](_classnames2, (design === null || design === void 0 ? void 0 : design.navigationActiveColor) || "#1F2433", !swiper.isEnd), _classnames2))
|
|
14431
|
-
})));
|
|
14432
|
-
};
|
|
14433
|
-
|
|
14434
|
-
var Toggle = function Toggle(_ref) {
|
|
14435
|
-
var className = _ref.className,
|
|
14436
|
-
options = _ref.options,
|
|
14437
|
-
activeOption = _ref.activeOption,
|
|
14438
|
-
setActiveOption = _ref.setActiveOption;
|
|
14439
|
-
var buttonClasses = function buttonClasses(isActive) {
|
|
14440
|
-
return classnames("rounded-full px-3 py-2 lg:px-6 lg:py-3 duration-300 font-semibold", {
|
|
14441
|
-
"bg-black text-white text-sm lg:text-base transform": isActive,
|
|
14442
|
-
"bg-white text-black text-sm lg:text-base": !isActive
|
|
14443
|
-
});
|
|
14444
|
-
};
|
|
14445
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
14446
|
-
className: classnames("flex justify-center p-4", className)
|
|
14447
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
14448
|
-
className: "neeto-site-toggle-button flex rounded-full bg-white"
|
|
14449
|
-
}, options.map(function (option) {
|
|
14450
|
-
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
14451
|
-
className: buttonClasses(option === activeOption),
|
|
14452
|
-
key: option,
|
|
14453
|
-
onClick: function onClick() {
|
|
14454
|
-
return setActiveOption(option);
|
|
14455
|
-
}
|
|
14456
|
-
}, option);
|
|
14457
|
-
})));
|
|
14458
|
-
};
|
|
14208
|
+
var FIXED_H1_SIZE = "32px";
|
|
14209
|
+
var FIXED_H2_SIZE = "24px";
|
|
14210
|
+
var FIXED_H3_SIZE = "20px";
|
|
14211
|
+
var FIXED_H4_SIZE = "16px";
|
|
14212
|
+
var FIXED_H5_SIZE = "14px";
|
|
14459
14213
|
|
|
14460
14214
|
/* eslint-disable no-bitwise, no-magic-numbers, sort-keys */
|
|
14461
14215
|
// https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories
|
|
@@ -15564,6 +15318,263 @@ function Interweave(props) {
|
|
|
15564
15318
|
});
|
|
15565
15319
|
}
|
|
15566
15320
|
|
|
15321
|
+
var StyledInterweave = styled__default["default"](Interweave)(function (_ref) {
|
|
15322
|
+
var fontSize = _ref.fontSize;
|
|
15323
|
+
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");
|
|
15324
|
+
});
|
|
15325
|
+
|
|
15326
|
+
var _templateObject;
|
|
15327
|
+
var PaginationWrapper = styled__default["default"].div.attrs(function (_ref) {
|
|
15328
|
+
var isActive = _ref.isActive;
|
|
15329
|
+
return {
|
|
15330
|
+
className: classnames("swiper-pagination-bullet cursor-pointer", {
|
|
15331
|
+
"swiper-pagination-bullet-active": isActive
|
|
15332
|
+
})
|
|
15333
|
+
};
|
|
15334
|
+
})(_templateObject || (_templateObject = _taggedTemplateLiteral__default["default"](["\n &.swiper-pagination-bullet {\n background-color: ", " !important;\n }\n\n &.swiper-pagination-bullet-active {\n background-color: ", " !important;\n }\n"])), function (_ref2) {
|
|
15335
|
+
var design = _ref2.design;
|
|
15336
|
+
return (design === null || design === void 0 ? void 0 : design.paginationButtonInactiveColor) || "#A2A2A2";
|
|
15337
|
+
}, function (_ref3) {
|
|
15338
|
+
var design = _ref3.design;
|
|
15339
|
+
return (design === null || design === void 0 ? void 0 : design.paginationButtonActiveColor) || "#1F2433";
|
|
15340
|
+
});
|
|
15341
|
+
|
|
15342
|
+
var _excluded$h = ["enableAnimation", "children", "duration"];
|
|
15343
|
+
var MotionStyledWrapper = motion(StyledWrapper);
|
|
15344
|
+
var MotionWrapper = function MotionWrapper(_ref) {
|
|
15345
|
+
var enableAnimation = _ref.enableAnimation,
|
|
15346
|
+
children = _ref.children,
|
|
15347
|
+
_ref$duration = _ref.duration,
|
|
15348
|
+
duration = _ref$duration === void 0 ? 0.5 : _ref$duration,
|
|
15349
|
+
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$h);
|
|
15350
|
+
return /*#__PURE__*/React__default["default"].createElement(MotionStyledWrapper, _extends__default["default"]({
|
|
15351
|
+
initial: enableAnimation ? {
|
|
15352
|
+
opacity: 0
|
|
15353
|
+
} : {},
|
|
15354
|
+
transition: enableAnimation ? {
|
|
15355
|
+
duration: duration
|
|
15356
|
+
} : {},
|
|
15357
|
+
viewport: {
|
|
15358
|
+
once: true
|
|
15359
|
+
},
|
|
15360
|
+
whileInView: {
|
|
15361
|
+
opacity: 1
|
|
15362
|
+
}
|
|
15363
|
+
}, otherProps), children);
|
|
15364
|
+
};
|
|
15365
|
+
|
|
15366
|
+
var _excluded$g = ["design", "nestedComponent", "nestedClassName", "enableAnimation", "children"];
|
|
15367
|
+
var BlockWrapper = function BlockWrapper(_ref) {
|
|
15368
|
+
var design = _ref.design,
|
|
15369
|
+
_ref$nestedComponent = _ref.nestedComponent,
|
|
15370
|
+
Wrapper = _ref$nestedComponent === void 0 ? MotionWrapper : _ref$nestedComponent,
|
|
15371
|
+
nestedClassName = _ref.nestedClassName,
|
|
15372
|
+
_ref$enableAnimation = _ref.enableAnimation,
|
|
15373
|
+
enableAnimation = _ref$enableAnimation === void 0 ? false : _ref$enableAnimation,
|
|
15374
|
+
children = _ref.children,
|
|
15375
|
+
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$g);
|
|
15376
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledWrapper, _extends__default["default"]({
|
|
15377
|
+
design: mergeDesign(design)
|
|
15378
|
+
}, otherProps), /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
15379
|
+
className: classnames("neeto-site-block-wrapper", nestedClassName),
|
|
15380
|
+
enableAnimation: enableAnimation,
|
|
15381
|
+
design: {
|
|
15382
|
+
paddingHorizontal: design.paddingHorizontal
|
|
15383
|
+
}
|
|
15384
|
+
}, children));
|
|
15385
|
+
};
|
|
15386
|
+
|
|
15387
|
+
var Button = function Button(_ref) {
|
|
15388
|
+
var to = _ref.to,
|
|
15389
|
+
label = _ref.label,
|
|
15390
|
+
_ref$style = _ref.style,
|
|
15391
|
+
style = _ref$style === void 0 ? DEFAULT_BUTTON_STYLES : _ref$style,
|
|
15392
|
+
_ref$className = _ref.className,
|
|
15393
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
15394
|
+
_ref$action = _ref.action,
|
|
15395
|
+
action = _ref$action === void 0 ? "" : _ref$action,
|
|
15396
|
+
_ref$draftMode = _ref.draftMode,
|
|
15397
|
+
draftMode = _ref$draftMode === void 0 ? false : _ref$draftMode,
|
|
15398
|
+
_ref$baseUrl = _ref.baseUrl,
|
|
15399
|
+
baseUrl = _ref$baseUrl === void 0 ? "" : _ref$baseUrl,
|
|
15400
|
+
Link = _ref.link;
|
|
15401
|
+
var anchorBaseClass = classnames("inline-flex transition-all duration-300 ease-in-out", {
|
|
15402
|
+
"pointer-events-none": action === ""
|
|
15403
|
+
});
|
|
15404
|
+
var commonProps = {
|
|
15405
|
+
className: classnames([anchorBaseClass, className]),
|
|
15406
|
+
design: style,
|
|
15407
|
+
href: to !== null && to !== void 0 ? to : "",
|
|
15408
|
+
rel: "noreferrer"
|
|
15409
|
+
};
|
|
15410
|
+
if (action === "external") {
|
|
15411
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledAnchor, _extends__default["default"]({}, commonProps, {
|
|
15412
|
+
isButton: true,
|
|
15413
|
+
target: "_blank"
|
|
15414
|
+
}), label);
|
|
15415
|
+
}
|
|
15416
|
+
if (action === "page") {
|
|
15417
|
+
var pageUrl = draftMode ? "".concat(baseUrl).concat(to) : to;
|
|
15418
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledAnchor, _extends__default["default"]({
|
|
15419
|
+
as: Link !== null && Link !== void 0 ? Link : "a"
|
|
15420
|
+
}, commonProps, {
|
|
15421
|
+
percentage: 0.1,
|
|
15422
|
+
to: pageUrl
|
|
15423
|
+
}), label);
|
|
15424
|
+
}
|
|
15425
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledAnchor, _extends__default["default"]({}, commonProps, {
|
|
15426
|
+
isButton: true
|
|
15427
|
+
}), label);
|
|
15428
|
+
};
|
|
15429
|
+
var Button$1 = withConditionalRender(Button, prop("label"));
|
|
15430
|
+
|
|
15431
|
+
var LinkElement = function LinkElement(_ref) {
|
|
15432
|
+
var to = _ref.to,
|
|
15433
|
+
label = _ref.label,
|
|
15434
|
+
_ref$style = _ref.style,
|
|
15435
|
+
style = _ref$style === void 0 ? DEFAULT_LINK_STYLES : _ref$style,
|
|
15436
|
+
_ref$className = _ref.className,
|
|
15437
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
15438
|
+
_ref$icon = _ref.icon,
|
|
15439
|
+
Icon = _ref$icon === void 0 ? null : _ref$icon,
|
|
15440
|
+
_ref$action = _ref.action,
|
|
15441
|
+
action = _ref$action === void 0 ? "" : _ref$action,
|
|
15442
|
+
_ref$baseUrl = _ref.baseUrl,
|
|
15443
|
+
baseUrl = _ref$baseUrl === void 0 ? "" : _ref$baseUrl,
|
|
15444
|
+
_ref$draftMode = _ref.draftMode,
|
|
15445
|
+
draftMode = _ref$draftMode === void 0 ? false : _ref$draftMode,
|
|
15446
|
+
Link = _ref.link;
|
|
15447
|
+
var baseClass = classnames("inline-flex items-center transition-all duration-300 ease-in-out", {
|
|
15448
|
+
"pointer-events-none": action === ""
|
|
15449
|
+
});
|
|
15450
|
+
var commonProps = {
|
|
15451
|
+
className: classnames([baseClass, className]),
|
|
15452
|
+
design: style,
|
|
15453
|
+
href: to !== null && to !== void 0 ? to : "",
|
|
15454
|
+
rel: "noreferrer",
|
|
15455
|
+
percentage: 0.1
|
|
15456
|
+
};
|
|
15457
|
+
if (action === "external") {
|
|
15458
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledAnchor, _extends__default["default"]({}, commonProps, {
|
|
15459
|
+
target: "_blank"
|
|
15460
|
+
}), label, Icon && /*#__PURE__*/React__default["default"].createElement(Icon, null));
|
|
15461
|
+
}
|
|
15462
|
+
if (action === "page") {
|
|
15463
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledAnchor, _extends__default["default"]({
|
|
15464
|
+
as: Link !== null && Link !== void 0 ? Link : "a"
|
|
15465
|
+
}, commonProps, {
|
|
15466
|
+
to: draftMode ? "".concat(baseUrl).concat(to) : to
|
|
15467
|
+
}), label, Icon && /*#__PURE__*/React__default["default"].createElement(Icon, null));
|
|
15468
|
+
}
|
|
15469
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledAnchor, commonProps, label, Icon && /*#__PURE__*/React__default["default"].createElement(Icon, null));
|
|
15470
|
+
};
|
|
15471
|
+
var Link = withConditionalRender(LinkElement, function () {
|
|
15472
|
+
return !!(prop("label") || prop("icon"));
|
|
15473
|
+
});
|
|
15474
|
+
|
|
15475
|
+
var _excluded$f = ["isEmbedded", "src", "design"];
|
|
15476
|
+
var Media = function Media(_ref) {
|
|
15477
|
+
var isEmbedded = _ref.isEmbedded,
|
|
15478
|
+
src = _ref.src,
|
|
15479
|
+
design = _ref.design,
|
|
15480
|
+
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded$f);
|
|
15481
|
+
if (isEmbedded) {
|
|
15482
|
+
return /*#__PURE__*/React__default["default"].createElement("iframe", {
|
|
15483
|
+
allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",
|
|
15484
|
+
className: "w-full",
|
|
15485
|
+
height: "300px",
|
|
15486
|
+
src: validateUrl(src),
|
|
15487
|
+
style: design
|
|
15488
|
+
});
|
|
15489
|
+
}
|
|
15490
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledImage$1, _extends__default["default"]({
|
|
15491
|
+
design: design,
|
|
15492
|
+
src: src
|
|
15493
|
+
}, otherProps));
|
|
15494
|
+
};
|
|
15495
|
+
|
|
15496
|
+
var Pagination$1 = function Pagination(_ref) {
|
|
15497
|
+
var _classnames, _classnames2;
|
|
15498
|
+
var swiper = _ref.swiper,
|
|
15499
|
+
design = _ref.design;
|
|
15500
|
+
var _useState = React.useState(0),
|
|
15501
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
15502
|
+
activeSlide = _useState2[0],
|
|
15503
|
+
setActiveSlide = _useState2[1];
|
|
15504
|
+
React.useEffect(function () {
|
|
15505
|
+
if (!swiper) return undefined;
|
|
15506
|
+
var changeHandler = function changeHandler() {
|
|
15507
|
+
return setActiveSlide(swiper.realIndex);
|
|
15508
|
+
};
|
|
15509
|
+
swiper.on("slideChange", changeHandler);
|
|
15510
|
+
return function () {
|
|
15511
|
+
return swiper.off("slideChange", changeHandler);
|
|
15512
|
+
};
|
|
15513
|
+
}, [swiper]);
|
|
15514
|
+
if (!swiper) return null;
|
|
15515
|
+
var totalSlides = swiper.slides.length;
|
|
15516
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
15517
|
+
className: "swiper-pagination flex items-center justify-center space-x-4"
|
|
15518
|
+
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
15519
|
+
className: classnames({
|
|
15520
|
+
"cursor-default": swiper.isBeginning
|
|
15521
|
+
}),
|
|
15522
|
+
onClick: function onClick() {
|
|
15523
|
+
return !swiper.isBeginning && swiper.slidePrev();
|
|
15524
|
+
}
|
|
15525
|
+
}, /*#__PURE__*/React__default["default"].createElement(ArrowLeftS$1, {
|
|
15526
|
+
size: 26,
|
|
15527
|
+
fill: classnames((_classnames = {}, _defineProperty__default["default"](_classnames, (design === null || design === void 0 ? void 0 : design.navigationInactiveColor) || "#ccc", swiper.isBeginning), _defineProperty__default["default"](_classnames, (design === null || design === void 0 ? void 0 : design.navigationActiveColor) || "#1F2433", !swiper.isBeginning), _classnames))
|
|
15528
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
15529
|
+
className: "space-x-2"
|
|
15530
|
+
}, _toConsumableArray__default["default"](Array(totalSlides)).map(function (_, index) {
|
|
15531
|
+
return /*#__PURE__*/React__default["default"].createElement(PaginationWrapper, {
|
|
15532
|
+
design: design,
|
|
15533
|
+
isActive: activeSlide === index,
|
|
15534
|
+
key: index,
|
|
15535
|
+
onClick: function onClick() {
|
|
15536
|
+
return swiper.slideTo(index);
|
|
15537
|
+
}
|
|
15538
|
+
});
|
|
15539
|
+
})), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
15540
|
+
className: classnames({
|
|
15541
|
+
"cursor-default": swiper.isEnd
|
|
15542
|
+
}),
|
|
15543
|
+
onClick: function onClick() {
|
|
15544
|
+
return swiper.slideNext();
|
|
15545
|
+
}
|
|
15546
|
+
}, /*#__PURE__*/React__default["default"].createElement(ArrowRightS$1, {
|
|
15547
|
+
size: 26,
|
|
15548
|
+
fill: classnames((_classnames2 = {}, _defineProperty__default["default"](_classnames2, (design === null || design === void 0 ? void 0 : design.navigationInactiveColor) || "#ccc", swiper.isEnd), _defineProperty__default["default"](_classnames2, (design === null || design === void 0 ? void 0 : design.navigationActiveColor) || "#1F2433", !swiper.isEnd), _classnames2))
|
|
15549
|
+
})));
|
|
15550
|
+
};
|
|
15551
|
+
|
|
15552
|
+
var Toggle = function Toggle(_ref) {
|
|
15553
|
+
var className = _ref.className,
|
|
15554
|
+
options = _ref.options,
|
|
15555
|
+
activeOption = _ref.activeOption,
|
|
15556
|
+
setActiveOption = _ref.setActiveOption;
|
|
15557
|
+
var buttonClasses = function buttonClasses(isActive) {
|
|
15558
|
+
return classnames("rounded-full px-3 py-2 lg:px-6 lg:py-3 duration-300 font-semibold", {
|
|
15559
|
+
"bg-black text-white text-sm lg:text-base transform": isActive,
|
|
15560
|
+
"bg-white text-black text-sm lg:text-base": !isActive
|
|
15561
|
+
});
|
|
15562
|
+
};
|
|
15563
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
15564
|
+
className: classnames("flex justify-center p-4", className)
|
|
15565
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
15566
|
+
className: "neeto-site-toggle-button flex rounded-full bg-white"
|
|
15567
|
+
}, options.map(function (option) {
|
|
15568
|
+
return /*#__PURE__*/React__default["default"].createElement("button", {
|
|
15569
|
+
className: buttonClasses(option === activeOption),
|
|
15570
|
+
key: option,
|
|
15571
|
+
onClick: function onClick() {
|
|
15572
|
+
return setActiveOption(option);
|
|
15573
|
+
}
|
|
15574
|
+
}, option);
|
|
15575
|
+
})));
|
|
15576
|
+
};
|
|
15577
|
+
|
|
15567
15578
|
var _excluded$e = ["style", "component", "className", "isTitle", "children"];
|
|
15568
15579
|
var Typography = function Typography(_ref) {
|
|
15569
15580
|
var _ref$style = _ref.style,
|
|
@@ -15580,9 +15591,10 @@ var Typography = function Typography(_ref) {
|
|
|
15580
15591
|
as: component,
|
|
15581
15592
|
className: classnames("neeto-site-typography break-words", className),
|
|
15582
15593
|
design: style
|
|
15583
|
-
}, otherProps), isTitle ? children : /*#__PURE__*/React__default["default"].createElement(
|
|
15594
|
+
}, otherProps), isTitle ? children : /*#__PURE__*/React__default["default"].createElement(StyledInterweave, {
|
|
15584
15595
|
className: "neeto-editor-content",
|
|
15585
|
-
content: children
|
|
15596
|
+
content: children,
|
|
15597
|
+
fontSize: style.fontSize
|
|
15586
15598
|
}));
|
|
15587
15599
|
};
|
|
15588
15600
|
Typography.displayName = "Typography";
|
|
@@ -40695,7 +40707,6 @@ var HeaderWithLogoTitle = function HeaderWithLogoTitle(_ref) {
|
|
|
40695
40707
|
design: design.logo,
|
|
40696
40708
|
src: properties.logo.src
|
|
40697
40709
|
}), /*#__PURE__*/React__default["default"].createElement(Typography$1, {
|
|
40698
|
-
isTitle: true,
|
|
40699
40710
|
component: "p",
|
|
40700
40711
|
style: design.logoTitle,
|
|
40701
40712
|
className: classnames({
|