@bigbinary/neeto-site-blocks 1.1.4 → 1.1.6
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 -253
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +265 -253
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14159,257 +14159,11 @@ var StyledImage = styled.img(function (_ref) {
|
|
|
14159
14159
|
});
|
|
14160
14160
|
var StyledImage$1 = withConditionalRender(StyledImage, prop("src"));
|
|
14161
14161
|
|
|
14162
|
-
var
|
|
14163
|
-
var
|
|
14164
|
-
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
"swiper-pagination-bullet-active": isActive
|
|
14168
|
-
})
|
|
14169
|
-
};
|
|
14170
|
-
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.swiper-pagination-bullet {\n background-color: ", " !important;\n }\n\n &.swiper-pagination-bullet-active {\n background-color: ", " !important;\n }\n"])), function (_ref2) {
|
|
14171
|
-
var design = _ref2.design;
|
|
14172
|
-
return (design === null || design === void 0 ? void 0 : design.paginationButtonInactiveColor) || "#A2A2A2";
|
|
14173
|
-
}, function (_ref3) {
|
|
14174
|
-
var design = _ref3.design;
|
|
14175
|
-
return (design === null || design === void 0 ? void 0 : design.paginationButtonActiveColor) || "#1F2433";
|
|
14176
|
-
});
|
|
14177
|
-
|
|
14178
|
-
var _excluded$h = ["enableAnimation", "children", "duration"];
|
|
14179
|
-
var MotionStyledWrapper = motion(StyledWrapper);
|
|
14180
|
-
var MotionWrapper = function MotionWrapper(_ref) {
|
|
14181
|
-
var enableAnimation = _ref.enableAnimation,
|
|
14182
|
-
children = _ref.children,
|
|
14183
|
-
_ref$duration = _ref.duration,
|
|
14184
|
-
duration = _ref$duration === void 0 ? 0.5 : _ref$duration,
|
|
14185
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$h);
|
|
14186
|
-
return /*#__PURE__*/React__default.createElement(MotionStyledWrapper, _extends$2({
|
|
14187
|
-
initial: enableAnimation ? {
|
|
14188
|
-
opacity: 0
|
|
14189
|
-
} : {},
|
|
14190
|
-
transition: enableAnimation ? {
|
|
14191
|
-
duration: duration
|
|
14192
|
-
} : {},
|
|
14193
|
-
viewport: {
|
|
14194
|
-
once: true
|
|
14195
|
-
},
|
|
14196
|
-
whileInView: {
|
|
14197
|
-
opacity: 1
|
|
14198
|
-
}
|
|
14199
|
-
}, otherProps), children);
|
|
14200
|
-
};
|
|
14201
|
-
|
|
14202
|
-
var _excluded$g = ["design", "nestedComponent", "nestedClassName", "enableAnimation", "children"];
|
|
14203
|
-
var BlockWrapper = function BlockWrapper(_ref) {
|
|
14204
|
-
var design = _ref.design,
|
|
14205
|
-
_ref$nestedComponent = _ref.nestedComponent,
|
|
14206
|
-
Wrapper = _ref$nestedComponent === void 0 ? MotionWrapper : _ref$nestedComponent,
|
|
14207
|
-
nestedClassName = _ref.nestedClassName,
|
|
14208
|
-
_ref$enableAnimation = _ref.enableAnimation,
|
|
14209
|
-
enableAnimation = _ref$enableAnimation === void 0 ? false : _ref$enableAnimation,
|
|
14210
|
-
children = _ref.children,
|
|
14211
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$g);
|
|
14212
|
-
return /*#__PURE__*/React__default.createElement(StyledWrapper, _extends$2({
|
|
14213
|
-
design: mergeDesign(design)
|
|
14214
|
-
}, otherProps), /*#__PURE__*/React__default.createElement(Wrapper, {
|
|
14215
|
-
className: classnames("neeto-site-block-wrapper", nestedClassName),
|
|
14216
|
-
enableAnimation: enableAnimation,
|
|
14217
|
-
design: {
|
|
14218
|
-
paddingHorizontal: design.paddingHorizontal
|
|
14219
|
-
}
|
|
14220
|
-
}, children));
|
|
14221
|
-
};
|
|
14222
|
-
|
|
14223
|
-
var Button = function Button(_ref) {
|
|
14224
|
-
var to = _ref.to,
|
|
14225
|
-
label = _ref.label,
|
|
14226
|
-
_ref$style = _ref.style,
|
|
14227
|
-
style = _ref$style === void 0 ? DEFAULT_BUTTON_STYLES : _ref$style,
|
|
14228
|
-
_ref$className = _ref.className,
|
|
14229
|
-
className = _ref$className === void 0 ? "" : _ref$className,
|
|
14230
|
-
_ref$action = _ref.action,
|
|
14231
|
-
action = _ref$action === void 0 ? "" : _ref$action,
|
|
14232
|
-
_ref$draftMode = _ref.draftMode,
|
|
14233
|
-
draftMode = _ref$draftMode === void 0 ? false : _ref$draftMode,
|
|
14234
|
-
_ref$baseUrl = _ref.baseUrl,
|
|
14235
|
-
baseUrl = _ref$baseUrl === void 0 ? "" : _ref$baseUrl,
|
|
14236
|
-
Link = _ref.link;
|
|
14237
|
-
var anchorBaseClass = classnames("inline-flex transition-all duration-300 ease-in-out", {
|
|
14238
|
-
"pointer-events-none": action === ""
|
|
14239
|
-
});
|
|
14240
|
-
var commonProps = {
|
|
14241
|
-
className: classnames([anchorBaseClass, className]),
|
|
14242
|
-
design: style,
|
|
14243
|
-
href: to,
|
|
14244
|
-
rel: "noreferrer"
|
|
14245
|
-
};
|
|
14246
|
-
if (action === "external") {
|
|
14247
|
-
return /*#__PURE__*/React__default.createElement(StyledAnchor, _extends$2({}, commonProps, {
|
|
14248
|
-
isButton: true,
|
|
14249
|
-
target: "_blank"
|
|
14250
|
-
}), label);
|
|
14251
|
-
}
|
|
14252
|
-
if (action === "page") {
|
|
14253
|
-
var pageUrl = draftMode ? "".concat(baseUrl).concat(to) : to;
|
|
14254
|
-
return /*#__PURE__*/React__default.createElement(StyledAnchor, _extends$2({
|
|
14255
|
-
as: Link !== null && Link !== void 0 ? Link : "a"
|
|
14256
|
-
}, commonProps, {
|
|
14257
|
-
percentage: 0.1,
|
|
14258
|
-
to: pageUrl
|
|
14259
|
-
}), label);
|
|
14260
|
-
}
|
|
14261
|
-
return /*#__PURE__*/React__default.createElement(StyledAnchor, _extends$2({}, commonProps, {
|
|
14262
|
-
isButton: true
|
|
14263
|
-
}), label);
|
|
14264
|
-
};
|
|
14265
|
-
var Button$1 = withConditionalRender(Button, prop("label"));
|
|
14266
|
-
|
|
14267
|
-
var LinkElement = function LinkElement(_ref) {
|
|
14268
|
-
var to = _ref.to,
|
|
14269
|
-
label = _ref.label,
|
|
14270
|
-
_ref$style = _ref.style,
|
|
14271
|
-
style = _ref$style === void 0 ? DEFAULT_LINK_STYLES : _ref$style,
|
|
14272
|
-
_ref$className = _ref.className,
|
|
14273
|
-
className = _ref$className === void 0 ? "" : _ref$className,
|
|
14274
|
-
_ref$icon = _ref.icon,
|
|
14275
|
-
Icon = _ref$icon === void 0 ? null : _ref$icon,
|
|
14276
|
-
_ref$action = _ref.action,
|
|
14277
|
-
action = _ref$action === void 0 ? "" : _ref$action,
|
|
14278
|
-
_ref$baseUrl = _ref.baseUrl,
|
|
14279
|
-
baseUrl = _ref$baseUrl === void 0 ? "" : _ref$baseUrl,
|
|
14280
|
-
_ref$draftMode = _ref.draftMode,
|
|
14281
|
-
draftMode = _ref$draftMode === void 0 ? false : _ref$draftMode,
|
|
14282
|
-
Link = _ref.link;
|
|
14283
|
-
var baseClass = classnames("inline-flex items-center transition-all duration-300 ease-in-out", {
|
|
14284
|
-
"pointer-events-none": action === ""
|
|
14285
|
-
});
|
|
14286
|
-
var commonProps = {
|
|
14287
|
-
className: classnames([baseClass, className]),
|
|
14288
|
-
design: style,
|
|
14289
|
-
href: to,
|
|
14290
|
-
rel: "noreferrer",
|
|
14291
|
-
percentage: 0.1
|
|
14292
|
-
};
|
|
14293
|
-
if (action === "external") {
|
|
14294
|
-
return /*#__PURE__*/React__default.createElement(StyledAnchor, _extends$2({}, commonProps, {
|
|
14295
|
-
target: "_blank"
|
|
14296
|
-
}), label, Icon && /*#__PURE__*/React__default.createElement(Icon, null));
|
|
14297
|
-
}
|
|
14298
|
-
if (action === "page") {
|
|
14299
|
-
return /*#__PURE__*/React__default.createElement(StyledAnchor, _extends$2({
|
|
14300
|
-
as: Link !== null && Link !== void 0 ? Link : "a"
|
|
14301
|
-
}, commonProps, {
|
|
14302
|
-
to: draftMode ? "".concat(baseUrl).concat(to) : to
|
|
14303
|
-
}), label, Icon && /*#__PURE__*/React__default.createElement(Icon, null));
|
|
14304
|
-
}
|
|
14305
|
-
return /*#__PURE__*/React__default.createElement(StyledAnchor, commonProps, label, Icon && /*#__PURE__*/React__default.createElement(Icon, null));
|
|
14306
|
-
};
|
|
14307
|
-
var Link = withConditionalRender(LinkElement, function () {
|
|
14308
|
-
return !!(prop("label") || prop("icon"));
|
|
14309
|
-
});
|
|
14310
|
-
|
|
14311
|
-
var _excluded$f = ["isEmbedded", "src", "design"];
|
|
14312
|
-
var Media = function Media(_ref) {
|
|
14313
|
-
var isEmbedded = _ref.isEmbedded,
|
|
14314
|
-
src = _ref.src,
|
|
14315
|
-
design = _ref.design,
|
|
14316
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$f);
|
|
14317
|
-
if (isEmbedded) {
|
|
14318
|
-
return /*#__PURE__*/React__default.createElement("iframe", {
|
|
14319
|
-
allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",
|
|
14320
|
-
className: "w-full",
|
|
14321
|
-
height: "300px",
|
|
14322
|
-
src: validateUrl(src),
|
|
14323
|
-
style: design
|
|
14324
|
-
});
|
|
14325
|
-
}
|
|
14326
|
-
return /*#__PURE__*/React__default.createElement(StyledImage$1, _extends$2({
|
|
14327
|
-
design: design,
|
|
14328
|
-
src: src
|
|
14329
|
-
}, otherProps));
|
|
14330
|
-
};
|
|
14331
|
-
|
|
14332
|
-
var Pagination$1 = function Pagination(_ref) {
|
|
14333
|
-
var _classnames, _classnames2;
|
|
14334
|
-
var swiper = _ref.swiper,
|
|
14335
|
-
design = _ref.design;
|
|
14336
|
-
var _useState = useState(0),
|
|
14337
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
14338
|
-
activeSlide = _useState2[0],
|
|
14339
|
-
setActiveSlide = _useState2[1];
|
|
14340
|
-
useEffect(function () {
|
|
14341
|
-
if (!swiper) return undefined;
|
|
14342
|
-
var changeHandler = function changeHandler() {
|
|
14343
|
-
return setActiveSlide(swiper.realIndex);
|
|
14344
|
-
};
|
|
14345
|
-
swiper.on("slideChange", changeHandler);
|
|
14346
|
-
return function () {
|
|
14347
|
-
return swiper.off("slideChange", changeHandler);
|
|
14348
|
-
};
|
|
14349
|
-
}, [swiper]);
|
|
14350
|
-
if (!swiper) return null;
|
|
14351
|
-
var totalSlides = swiper.slides.length;
|
|
14352
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
14353
|
-
className: "swiper-pagination flex items-center justify-center space-x-4"
|
|
14354
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
14355
|
-
className: classnames({
|
|
14356
|
-
"cursor-default": swiper.isBeginning
|
|
14357
|
-
}),
|
|
14358
|
-
onClick: function onClick() {
|
|
14359
|
-
return !swiper.isBeginning && swiper.slidePrev();
|
|
14360
|
-
}
|
|
14361
|
-
}, /*#__PURE__*/React__default.createElement(ArrowLeftS$1, {
|
|
14362
|
-
size: 26,
|
|
14363
|
-
fill: classnames((_classnames = {}, _defineProperty$1(_classnames, (design === null || design === void 0 ? void 0 : design.navigationInactiveColor) || "#ccc", swiper.isBeginning), _defineProperty$1(_classnames, (design === null || design === void 0 ? void 0 : design.navigationActiveColor) || "#1F2433", !swiper.isBeginning), _classnames))
|
|
14364
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
14365
|
-
className: "space-x-2"
|
|
14366
|
-
}, _toConsumableArray(Array(totalSlides)).map(function (_, index) {
|
|
14367
|
-
return /*#__PURE__*/React__default.createElement(PaginationWrapper, {
|
|
14368
|
-
design: design,
|
|
14369
|
-
isActive: activeSlide === index,
|
|
14370
|
-
key: index,
|
|
14371
|
-
onClick: function onClick() {
|
|
14372
|
-
return swiper.slideTo(index);
|
|
14373
|
-
}
|
|
14374
|
-
});
|
|
14375
|
-
})), /*#__PURE__*/React__default.createElement("button", {
|
|
14376
|
-
className: classnames({
|
|
14377
|
-
"cursor-default": swiper.isEnd
|
|
14378
|
-
}),
|
|
14379
|
-
onClick: function onClick() {
|
|
14380
|
-
return swiper.slideNext();
|
|
14381
|
-
}
|
|
14382
|
-
}, /*#__PURE__*/React__default.createElement(ArrowRightS$1, {
|
|
14383
|
-
size: 26,
|
|
14384
|
-
fill: classnames((_classnames2 = {}, _defineProperty$1(_classnames2, (design === null || design === void 0 ? void 0 : design.navigationInactiveColor) || "#ccc", swiper.isEnd), _defineProperty$1(_classnames2, (design === null || design === void 0 ? void 0 : design.navigationActiveColor) || "#1F2433", !swiper.isEnd), _classnames2))
|
|
14385
|
-
})));
|
|
14386
|
-
};
|
|
14387
|
-
|
|
14388
|
-
var Toggle = function Toggle(_ref) {
|
|
14389
|
-
var className = _ref.className,
|
|
14390
|
-
options = _ref.options,
|
|
14391
|
-
activeOption = _ref.activeOption,
|
|
14392
|
-
setActiveOption = _ref.setActiveOption;
|
|
14393
|
-
var buttonClasses = function buttonClasses(isActive) {
|
|
14394
|
-
return classnames("rounded-full px-3 py-2 lg:px-6 lg:py-3 duration-300 font-semibold", {
|
|
14395
|
-
"bg-black text-white text-sm lg:text-base transform": isActive,
|
|
14396
|
-
"bg-white text-black text-sm lg:text-base": !isActive
|
|
14397
|
-
});
|
|
14398
|
-
};
|
|
14399
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
14400
|
-
className: classnames("flex justify-center p-4", className)
|
|
14401
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14402
|
-
className: "neeto-site-toggle-button flex rounded-full bg-white"
|
|
14403
|
-
}, options.map(function (option) {
|
|
14404
|
-
return /*#__PURE__*/React__default.createElement("button", {
|
|
14405
|
-
className: buttonClasses(option === activeOption),
|
|
14406
|
-
key: option,
|
|
14407
|
-
onClick: function onClick() {
|
|
14408
|
-
return setActiveOption(option);
|
|
14409
|
-
}
|
|
14410
|
-
}, option);
|
|
14411
|
-
})));
|
|
14412
|
-
};
|
|
14162
|
+
var FIXED_H1_SIZE = "32px";
|
|
14163
|
+
var FIXED_H2_SIZE = "24px";
|
|
14164
|
+
var FIXED_H3_SIZE = "20px";
|
|
14165
|
+
var FIXED_H4_SIZE = "16px";
|
|
14166
|
+
var FIXED_H5_SIZE = "14px";
|
|
14413
14167
|
|
|
14414
14168
|
/* eslint-disable no-bitwise, no-magic-numbers, sort-keys */
|
|
14415
14169
|
// https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories
|
|
@@ -15518,6 +15272,263 @@ function Interweave(props) {
|
|
|
15518
15272
|
});
|
|
15519
15273
|
}
|
|
15520
15274
|
|
|
15275
|
+
var StyledInterweave = styled(Interweave)(function (_ref) {
|
|
15276
|
+
var fontSize = _ref.fontSize;
|
|
15277
|
+
return "\n h1 {\n font-size: ".concat(fontSize ? "calc(".concat(FIXED_H1_SIZE, " + ").concat(fontSize, ")") : FIXED_H1_SIZE, ";\n }\n\n h2 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H2_SIZE, " + ").concat(fontSize, ")") : FIXED_H2_SIZE, ";\n }\n\n h3 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H3_SIZE, " + ").concat(fontSize, ")") : FIXED_H3_SIZE, ";\n }\n\n h4 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H4_SIZE, " + ").concat(fontSize, ")") : FIXED_H4_SIZE, ";\n }\n\n h5 {\n font-size: ").concat(fontSize ? "calc(".concat(FIXED_H5_SIZE, " + ").concat(fontSize, ")") : FIXED_H5_SIZE, ";\n }\n");
|
|
15278
|
+
});
|
|
15279
|
+
|
|
15280
|
+
var _templateObject;
|
|
15281
|
+
var PaginationWrapper = styled.div.attrs(function (_ref) {
|
|
15282
|
+
var isActive = _ref.isActive;
|
|
15283
|
+
return {
|
|
15284
|
+
className: classnames("swiper-pagination-bullet cursor-pointer", {
|
|
15285
|
+
"swiper-pagination-bullet-active": isActive
|
|
15286
|
+
})
|
|
15287
|
+
};
|
|
15288
|
+
})(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.swiper-pagination-bullet {\n background-color: ", " !important;\n }\n\n &.swiper-pagination-bullet-active {\n background-color: ", " !important;\n }\n"])), function (_ref2) {
|
|
15289
|
+
var design = _ref2.design;
|
|
15290
|
+
return (design === null || design === void 0 ? void 0 : design.paginationButtonInactiveColor) || "#A2A2A2";
|
|
15291
|
+
}, function (_ref3) {
|
|
15292
|
+
var design = _ref3.design;
|
|
15293
|
+
return (design === null || design === void 0 ? void 0 : design.paginationButtonActiveColor) || "#1F2433";
|
|
15294
|
+
});
|
|
15295
|
+
|
|
15296
|
+
var _excluded$h = ["enableAnimation", "children", "duration"];
|
|
15297
|
+
var MotionStyledWrapper = motion(StyledWrapper);
|
|
15298
|
+
var MotionWrapper = function MotionWrapper(_ref) {
|
|
15299
|
+
var enableAnimation = _ref.enableAnimation,
|
|
15300
|
+
children = _ref.children,
|
|
15301
|
+
_ref$duration = _ref.duration,
|
|
15302
|
+
duration = _ref$duration === void 0 ? 0.5 : _ref$duration,
|
|
15303
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$h);
|
|
15304
|
+
return /*#__PURE__*/React__default.createElement(MotionStyledWrapper, _extends$2({
|
|
15305
|
+
initial: enableAnimation ? {
|
|
15306
|
+
opacity: 0
|
|
15307
|
+
} : {},
|
|
15308
|
+
transition: enableAnimation ? {
|
|
15309
|
+
duration: duration
|
|
15310
|
+
} : {},
|
|
15311
|
+
viewport: {
|
|
15312
|
+
once: true
|
|
15313
|
+
},
|
|
15314
|
+
whileInView: {
|
|
15315
|
+
opacity: 1
|
|
15316
|
+
}
|
|
15317
|
+
}, otherProps), children);
|
|
15318
|
+
};
|
|
15319
|
+
|
|
15320
|
+
var _excluded$g = ["design", "nestedComponent", "nestedClassName", "enableAnimation", "children"];
|
|
15321
|
+
var BlockWrapper = function BlockWrapper(_ref) {
|
|
15322
|
+
var design = _ref.design,
|
|
15323
|
+
_ref$nestedComponent = _ref.nestedComponent,
|
|
15324
|
+
Wrapper = _ref$nestedComponent === void 0 ? MotionWrapper : _ref$nestedComponent,
|
|
15325
|
+
nestedClassName = _ref.nestedClassName,
|
|
15326
|
+
_ref$enableAnimation = _ref.enableAnimation,
|
|
15327
|
+
enableAnimation = _ref$enableAnimation === void 0 ? false : _ref$enableAnimation,
|
|
15328
|
+
children = _ref.children,
|
|
15329
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$g);
|
|
15330
|
+
return /*#__PURE__*/React__default.createElement(StyledWrapper, _extends$2({
|
|
15331
|
+
design: mergeDesign(design)
|
|
15332
|
+
}, otherProps), /*#__PURE__*/React__default.createElement(Wrapper, {
|
|
15333
|
+
className: classnames("neeto-site-block-wrapper", nestedClassName),
|
|
15334
|
+
enableAnimation: enableAnimation,
|
|
15335
|
+
design: {
|
|
15336
|
+
paddingHorizontal: design.paddingHorizontal
|
|
15337
|
+
}
|
|
15338
|
+
}, children));
|
|
15339
|
+
};
|
|
15340
|
+
|
|
15341
|
+
var Button = function Button(_ref) {
|
|
15342
|
+
var to = _ref.to,
|
|
15343
|
+
label = _ref.label,
|
|
15344
|
+
_ref$style = _ref.style,
|
|
15345
|
+
style = _ref$style === void 0 ? DEFAULT_BUTTON_STYLES : _ref$style,
|
|
15346
|
+
_ref$className = _ref.className,
|
|
15347
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
15348
|
+
_ref$action = _ref.action,
|
|
15349
|
+
action = _ref$action === void 0 ? "" : _ref$action,
|
|
15350
|
+
_ref$draftMode = _ref.draftMode,
|
|
15351
|
+
draftMode = _ref$draftMode === void 0 ? false : _ref$draftMode,
|
|
15352
|
+
_ref$baseUrl = _ref.baseUrl,
|
|
15353
|
+
baseUrl = _ref$baseUrl === void 0 ? "" : _ref$baseUrl,
|
|
15354
|
+
Link = _ref.link;
|
|
15355
|
+
var anchorBaseClass = classnames("inline-flex transition-all duration-300 ease-in-out", {
|
|
15356
|
+
"pointer-events-none": action === ""
|
|
15357
|
+
});
|
|
15358
|
+
var commonProps = {
|
|
15359
|
+
className: classnames([anchorBaseClass, className]),
|
|
15360
|
+
design: style,
|
|
15361
|
+
href: to !== null && to !== void 0 ? to : "",
|
|
15362
|
+
rel: "noreferrer"
|
|
15363
|
+
};
|
|
15364
|
+
if (action === "external") {
|
|
15365
|
+
return /*#__PURE__*/React__default.createElement(StyledAnchor, _extends$2({}, commonProps, {
|
|
15366
|
+
isButton: true,
|
|
15367
|
+
target: "_blank"
|
|
15368
|
+
}), label);
|
|
15369
|
+
}
|
|
15370
|
+
if (action === "page") {
|
|
15371
|
+
var pageUrl = draftMode ? "".concat(baseUrl).concat(to) : to;
|
|
15372
|
+
return /*#__PURE__*/React__default.createElement(StyledAnchor, _extends$2({
|
|
15373
|
+
as: Link !== null && Link !== void 0 ? Link : "a"
|
|
15374
|
+
}, commonProps, {
|
|
15375
|
+
percentage: 0.1,
|
|
15376
|
+
to: pageUrl
|
|
15377
|
+
}), label);
|
|
15378
|
+
}
|
|
15379
|
+
return /*#__PURE__*/React__default.createElement(StyledAnchor, _extends$2({}, commonProps, {
|
|
15380
|
+
isButton: true
|
|
15381
|
+
}), label);
|
|
15382
|
+
};
|
|
15383
|
+
var Button$1 = withConditionalRender(Button, prop("label"));
|
|
15384
|
+
|
|
15385
|
+
var LinkElement = function LinkElement(_ref) {
|
|
15386
|
+
var to = _ref.to,
|
|
15387
|
+
label = _ref.label,
|
|
15388
|
+
_ref$style = _ref.style,
|
|
15389
|
+
style = _ref$style === void 0 ? DEFAULT_LINK_STYLES : _ref$style,
|
|
15390
|
+
_ref$className = _ref.className,
|
|
15391
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
15392
|
+
_ref$icon = _ref.icon,
|
|
15393
|
+
Icon = _ref$icon === void 0 ? null : _ref$icon,
|
|
15394
|
+
_ref$action = _ref.action,
|
|
15395
|
+
action = _ref$action === void 0 ? "" : _ref$action,
|
|
15396
|
+
_ref$baseUrl = _ref.baseUrl,
|
|
15397
|
+
baseUrl = _ref$baseUrl === void 0 ? "" : _ref$baseUrl,
|
|
15398
|
+
_ref$draftMode = _ref.draftMode,
|
|
15399
|
+
draftMode = _ref$draftMode === void 0 ? false : _ref$draftMode,
|
|
15400
|
+
Link = _ref.link;
|
|
15401
|
+
var baseClass = classnames("inline-flex items-center transition-all duration-300 ease-in-out", {
|
|
15402
|
+
"pointer-events-none": action === ""
|
|
15403
|
+
});
|
|
15404
|
+
var commonProps = {
|
|
15405
|
+
className: classnames([baseClass, className]),
|
|
15406
|
+
design: style,
|
|
15407
|
+
href: to !== null && to !== void 0 ? to : "",
|
|
15408
|
+
rel: "noreferrer",
|
|
15409
|
+
percentage: 0.1
|
|
15410
|
+
};
|
|
15411
|
+
if (action === "external") {
|
|
15412
|
+
return /*#__PURE__*/React__default.createElement(StyledAnchor, _extends$2({}, commonProps, {
|
|
15413
|
+
target: "_blank"
|
|
15414
|
+
}), label, Icon && /*#__PURE__*/React__default.createElement(Icon, null));
|
|
15415
|
+
}
|
|
15416
|
+
if (action === "page") {
|
|
15417
|
+
return /*#__PURE__*/React__default.createElement(StyledAnchor, _extends$2({
|
|
15418
|
+
as: Link !== null && Link !== void 0 ? Link : "a"
|
|
15419
|
+
}, commonProps, {
|
|
15420
|
+
to: draftMode ? "".concat(baseUrl).concat(to) : to
|
|
15421
|
+
}), label, Icon && /*#__PURE__*/React__default.createElement(Icon, null));
|
|
15422
|
+
}
|
|
15423
|
+
return /*#__PURE__*/React__default.createElement(StyledAnchor, commonProps, label, Icon && /*#__PURE__*/React__default.createElement(Icon, null));
|
|
15424
|
+
};
|
|
15425
|
+
var Link = withConditionalRender(LinkElement, function () {
|
|
15426
|
+
return !!(prop("label") || prop("icon"));
|
|
15427
|
+
});
|
|
15428
|
+
|
|
15429
|
+
var _excluded$f = ["isEmbedded", "src", "design"];
|
|
15430
|
+
var Media = function Media(_ref) {
|
|
15431
|
+
var isEmbedded = _ref.isEmbedded,
|
|
15432
|
+
src = _ref.src,
|
|
15433
|
+
design = _ref.design,
|
|
15434
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$f);
|
|
15435
|
+
if (isEmbedded) {
|
|
15436
|
+
return /*#__PURE__*/React__default.createElement("iframe", {
|
|
15437
|
+
allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",
|
|
15438
|
+
className: "w-full",
|
|
15439
|
+
height: "300px",
|
|
15440
|
+
src: validateUrl(src),
|
|
15441
|
+
style: design
|
|
15442
|
+
});
|
|
15443
|
+
}
|
|
15444
|
+
return /*#__PURE__*/React__default.createElement(StyledImage$1, _extends$2({
|
|
15445
|
+
design: design,
|
|
15446
|
+
src: src
|
|
15447
|
+
}, otherProps));
|
|
15448
|
+
};
|
|
15449
|
+
|
|
15450
|
+
var Pagination$1 = function Pagination(_ref) {
|
|
15451
|
+
var _classnames, _classnames2;
|
|
15452
|
+
var swiper = _ref.swiper,
|
|
15453
|
+
design = _ref.design;
|
|
15454
|
+
var _useState = useState(0),
|
|
15455
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
15456
|
+
activeSlide = _useState2[0],
|
|
15457
|
+
setActiveSlide = _useState2[1];
|
|
15458
|
+
useEffect(function () {
|
|
15459
|
+
if (!swiper) return undefined;
|
|
15460
|
+
var changeHandler = function changeHandler() {
|
|
15461
|
+
return setActiveSlide(swiper.realIndex);
|
|
15462
|
+
};
|
|
15463
|
+
swiper.on("slideChange", changeHandler);
|
|
15464
|
+
return function () {
|
|
15465
|
+
return swiper.off("slideChange", changeHandler);
|
|
15466
|
+
};
|
|
15467
|
+
}, [swiper]);
|
|
15468
|
+
if (!swiper) return null;
|
|
15469
|
+
var totalSlides = swiper.slides.length;
|
|
15470
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
15471
|
+
className: "swiper-pagination flex items-center justify-center space-x-4"
|
|
15472
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
15473
|
+
className: classnames({
|
|
15474
|
+
"cursor-default": swiper.isBeginning
|
|
15475
|
+
}),
|
|
15476
|
+
onClick: function onClick() {
|
|
15477
|
+
return !swiper.isBeginning && swiper.slidePrev();
|
|
15478
|
+
}
|
|
15479
|
+
}, /*#__PURE__*/React__default.createElement(ArrowLeftS$1, {
|
|
15480
|
+
size: 26,
|
|
15481
|
+
fill: classnames((_classnames = {}, _defineProperty$1(_classnames, (design === null || design === void 0 ? void 0 : design.navigationInactiveColor) || "#ccc", swiper.isBeginning), _defineProperty$1(_classnames, (design === null || design === void 0 ? void 0 : design.navigationActiveColor) || "#1F2433", !swiper.isBeginning), _classnames))
|
|
15482
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
15483
|
+
className: "space-x-2"
|
|
15484
|
+
}, _toConsumableArray(Array(totalSlides)).map(function (_, index) {
|
|
15485
|
+
return /*#__PURE__*/React__default.createElement(PaginationWrapper, {
|
|
15486
|
+
design: design,
|
|
15487
|
+
isActive: activeSlide === index,
|
|
15488
|
+
key: index,
|
|
15489
|
+
onClick: function onClick() {
|
|
15490
|
+
return swiper.slideTo(index);
|
|
15491
|
+
}
|
|
15492
|
+
});
|
|
15493
|
+
})), /*#__PURE__*/React__default.createElement("button", {
|
|
15494
|
+
className: classnames({
|
|
15495
|
+
"cursor-default": swiper.isEnd
|
|
15496
|
+
}),
|
|
15497
|
+
onClick: function onClick() {
|
|
15498
|
+
return swiper.slideNext();
|
|
15499
|
+
}
|
|
15500
|
+
}, /*#__PURE__*/React__default.createElement(ArrowRightS$1, {
|
|
15501
|
+
size: 26,
|
|
15502
|
+
fill: classnames((_classnames2 = {}, _defineProperty$1(_classnames2, (design === null || design === void 0 ? void 0 : design.navigationInactiveColor) || "#ccc", swiper.isEnd), _defineProperty$1(_classnames2, (design === null || design === void 0 ? void 0 : design.navigationActiveColor) || "#1F2433", !swiper.isEnd), _classnames2))
|
|
15503
|
+
})));
|
|
15504
|
+
};
|
|
15505
|
+
|
|
15506
|
+
var Toggle = function Toggle(_ref) {
|
|
15507
|
+
var className = _ref.className,
|
|
15508
|
+
options = _ref.options,
|
|
15509
|
+
activeOption = _ref.activeOption,
|
|
15510
|
+
setActiveOption = _ref.setActiveOption;
|
|
15511
|
+
var buttonClasses = function buttonClasses(isActive) {
|
|
15512
|
+
return classnames("rounded-full px-3 py-2 lg:px-6 lg:py-3 duration-300 font-semibold", {
|
|
15513
|
+
"bg-black text-white text-sm lg:text-base transform": isActive,
|
|
15514
|
+
"bg-white text-black text-sm lg:text-base": !isActive
|
|
15515
|
+
});
|
|
15516
|
+
};
|
|
15517
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
15518
|
+
className: classnames("flex justify-center p-4", className)
|
|
15519
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15520
|
+
className: "neeto-site-toggle-button flex rounded-full bg-white"
|
|
15521
|
+
}, options.map(function (option) {
|
|
15522
|
+
return /*#__PURE__*/React__default.createElement("button", {
|
|
15523
|
+
className: buttonClasses(option === activeOption),
|
|
15524
|
+
key: option,
|
|
15525
|
+
onClick: function onClick() {
|
|
15526
|
+
return setActiveOption(option);
|
|
15527
|
+
}
|
|
15528
|
+
}, option);
|
|
15529
|
+
})));
|
|
15530
|
+
};
|
|
15531
|
+
|
|
15521
15532
|
var _excluded$e = ["style", "component", "className", "isTitle", "children"];
|
|
15522
15533
|
var Typography = function Typography(_ref) {
|
|
15523
15534
|
var _ref$style = _ref.style,
|
|
@@ -15534,9 +15545,10 @@ var Typography = function Typography(_ref) {
|
|
|
15534
15545
|
as: component,
|
|
15535
15546
|
className: classnames("neeto-site-typography break-words", className),
|
|
15536
15547
|
design: style
|
|
15537
|
-
}, otherProps), isTitle ? children : /*#__PURE__*/React__default.createElement(
|
|
15548
|
+
}, otherProps), isTitle ? children : /*#__PURE__*/React__default.createElement(StyledInterweave, {
|
|
15538
15549
|
className: "neeto-editor-content",
|
|
15539
|
-
content: children
|
|
15550
|
+
content: children,
|
|
15551
|
+
fontSize: style.fontSize
|
|
15540
15552
|
}));
|
|
15541
15553
|
};
|
|
15542
15554
|
Typography.displayName = "Typography";
|