@treely/strapi-slices 7.1.2 → 7.1.4
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/README.md +1 -1
- package/dist/strapi-slices.cjs.development.js +12 -16
- package/dist/strapi-slices.cjs.development.js.map +1 -1
- package/dist/strapi-slices.cjs.production.min.js +1 -1
- package/dist/strapi-slices.cjs.production.min.js.map +1 -1
- package/dist/strapi-slices.esm.js +12 -16
- package/dist/strapi-slices.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/slices/CarouselMarqueeBanner/CarouselMarqueeBanner.tsx +10 -23
- package/src/slices/CarouselMarqueeBanner/styles.ts +4 -2
- package/src/slices/FullWidthImageSlider/FullWidthImageSlider.tsx +4 -1
- package/src/utils/getClosestRatio.ts +1 -1
|
@@ -3524,7 +3524,7 @@ var ImageContainer = /*#__PURE__*/styled(Box)(_templateObject4 || (_templateObje
|
|
|
3524
3524
|
return aspectRatio;
|
|
3525
3525
|
});
|
|
3526
3526
|
|
|
3527
|
-
var ALLOWED_RATIOS = [2 / 3, 1 / 1, 3 / 2];
|
|
3527
|
+
var ALLOWED_RATIOS = [2 / 3, 1 / 1, 3 / 2, 2 / 1, 3 / 1, 4 / 1, 5 / 1]; // width / height
|
|
3528
3528
|
var getClosestRatio = function getClosestRatio(width, height) {
|
|
3529
3529
|
var ratio = width / height;
|
|
3530
3530
|
var minDiff = Math.abs(ratio - ALLOWED_RATIOS[0]);
|
|
@@ -3611,7 +3611,9 @@ var FullWidthImageSlider = function FullWidthImageSlider(_ref) {
|
|
|
3611
3611
|
if (!isMobile) setIsOpen(true);
|
|
3612
3612
|
}
|
|
3613
3613
|
})), React.createElement(Text, {
|
|
3614
|
-
|
|
3614
|
+
noOfLines: 3,
|
|
3615
|
+
height: "72px",
|
|
3616
|
+
fontSize: "md"
|
|
3615
3617
|
}, image.caption)));
|
|
3616
3618
|
}))), React.createElement(Box, {
|
|
3617
3619
|
display: ['none', null, null, !!allowScroll ? 'flex' : 'none'],
|
|
@@ -5367,14 +5369,14 @@ var Comparison = function Comparison(_ref) {
|
|
|
5367
5369
|
};
|
|
5368
5370
|
|
|
5369
5371
|
var _templateObject, _templateObject2;
|
|
5370
|
-
var CarouselInnerContainer = /*#__PURE__*/styled(motion.div)(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: ", ";\n gap: var(--boemly-space-
|
|
5372
|
+
var CarouselInnerContainer = /*#__PURE__*/styled(motion.div)(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: ", ";\n gap: var(--boemly-space-24);\n padding-right: var(--boemly-space-24);\n padding-left: var(--boemly-space-24);\n\n @media screen and (max-width: ", ") {\n width: calc(\n ", " *\n (var(--boemly-sizes-16) + var(--boemly-space-6))\n );\n justify-content: ", ";\n }\n"])), function (props) {
|
|
5371
5373
|
return props.logoCount < 5 ? 'center' : 'flex-start';
|
|
5372
5374
|
}, BREAKPOINT_MD, function (props) {
|
|
5373
5375
|
return props.logoCount;
|
|
5374
5376
|
}, function (props) {
|
|
5375
5377
|
return props.logoCount < 5 ? 'center' : 'flex-start';
|
|
5376
5378
|
});
|
|
5377
|
-
var LogoGrid = /*#__PURE__*/styled(motion.div)(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: var(--boemly-space-
|
|
5379
|
+
var LogoGrid = /*#__PURE__*/styled(motion.div)(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: var(--boemly-space-24);\n\n @media screen and (max-width: ", ") {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-gap: var(--boemly-space-6);\n }\n"])), BREAKPOINT_MD);
|
|
5378
5380
|
|
|
5379
5381
|
// Separate component containing the actual logic
|
|
5380
5382
|
var CarouselMarqueeBannerContent = function CarouselMarqueeBannerContent(_ref) {
|
|
@@ -5412,7 +5414,6 @@ var CarouselMarqueeBannerContent = function CarouselMarqueeBannerContent(_ref) {
|
|
|
5412
5414
|
return React.createElement(LogoGrid, null, slice.logos.map(function (logo, index) {
|
|
5413
5415
|
return React.createElement(Box, {
|
|
5414
5416
|
key: logo.id + "-" + index,
|
|
5415
|
-
width: isMobile ? '16' : '36',
|
|
5416
5417
|
flexShrink: 0,
|
|
5417
5418
|
transform: "translate3d(0, 0, 0)"
|
|
5418
5419
|
}, React.createElement(Flex, {
|
|
@@ -5422,17 +5423,15 @@ var CarouselMarqueeBannerContent = function CarouselMarqueeBannerContent(_ref) {
|
|
|
5422
5423
|
alignItems: "center"
|
|
5423
5424
|
}, React.createElement(Box, {
|
|
5424
5425
|
position: "relative",
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
width: isMobile ? '16' : '36',
|
|
5428
|
-
borderRadius: "xl"
|
|
5426
|
+
height: isMobile ? '16' : '36',
|
|
5427
|
+
width: "calc(var(--boemly-sizes-10)\n * " + getClosestRatio(logo.img.data.attributes.width, logo.img.data.attributes.height) + ")"
|
|
5429
5428
|
}, React.createElement(Image, {
|
|
5430
5429
|
src: strapiMediaUrl(logo.img, 'large'),
|
|
5431
5430
|
alt: logo.alt,
|
|
5432
5431
|
fill: true,
|
|
5433
5432
|
style: {
|
|
5434
5433
|
objectFit: logo.objectFit || 'contain',
|
|
5435
|
-
|
|
5434
|
+
filter: 'grayscale(100%)'
|
|
5436
5435
|
}
|
|
5437
5436
|
}))));
|
|
5438
5437
|
}));
|
|
@@ -5447,7 +5446,6 @@ var CarouselMarqueeBannerContent = function CarouselMarqueeBannerContent(_ref) {
|
|
|
5447
5446
|
}, logosToRender.map(function (logo, index) {
|
|
5448
5447
|
return React.createElement(Box, {
|
|
5449
5448
|
key: logo.id + "-" + index,
|
|
5450
|
-
width: isMobile ? '16' : '36',
|
|
5451
5449
|
flexShrink: 0,
|
|
5452
5450
|
transform: "translate3d(0, 0, 0)"
|
|
5453
5451
|
}, React.createElement(Flex, {
|
|
@@ -5457,17 +5455,15 @@ var CarouselMarqueeBannerContent = function CarouselMarqueeBannerContent(_ref) {
|
|
|
5457
5455
|
alignItems: "center"
|
|
5458
5456
|
}, React.createElement(Box, {
|
|
5459
5457
|
position: "relative",
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
width: isMobile ? '16' : '36',
|
|
5463
|
-
borderRadius: "xl"
|
|
5458
|
+
height: isMobile ? '16' : '36',
|
|
5459
|
+
width: "calc(var(--boemly-sizes-10) * " + getClosestRatio(logo.img.data.attributes.width, logo.img.data.attributes.height) + ")"
|
|
5464
5460
|
}, React.createElement(Image, {
|
|
5465
5461
|
src: strapiMediaUrl(logo.img, 'large'),
|
|
5466
5462
|
alt: logo.alt,
|
|
5467
5463
|
fill: true,
|
|
5468
5464
|
style: {
|
|
5469
5465
|
objectFit: logo.objectFit || 'contain',
|
|
5470
|
-
|
|
5466
|
+
filter: 'grayscale(100%)'
|
|
5471
5467
|
}
|
|
5472
5468
|
}))));
|
|
5473
5469
|
})));
|