@redneckz/wildless-cms-uni-blocks 0.13.20 → 0.13.21
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/bundle/bundle.umd.js +6 -6
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +6 -4
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/hooks/useSWRResource.js +1 -1
- package/dist/hooks/useSWRResource.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +6 -4
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/hooks/useSWRResource.js +1 -1
- package/lib/hooks/useSWRResource.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +6 -6
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +6 -4
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/hooks/useSWRResource.js +1 -1
- package/mobile/dist/hooks/useSWRResource.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +6 -4
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/hooks/useSWRResource.js +1 -1
- package/mobile/lib/hooks/useSWRResource.js.map +1 -1
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +25 -5
- package/mobile/src/hooks/useSWRResource.ts +1 -0
- package/package.json +1 -1
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +25 -5
- package/src/hooks/useSWRResource.ts +1 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -1136,7 +1136,7 @@
|
|
|
1136
1136
|
const DEFAULT_FOLDER_NAME = 'wcms-resources';
|
|
1137
1137
|
function useSWRResource(filename, options = {}) {
|
|
1138
1138
|
const { fallback = EMPTY_VALUE$1, folderName = DEFAULT_FOLDER_NAME, setBasePath = false } = options;
|
|
1139
|
-
const path = joinPath(setBasePath ? projectSettings.BASE_PATH : '', folderName, `${filename}.json`);
|
|
1139
|
+
const path = joinPath('/', setBasePath ? projectSettings.BASE_PATH : '', folderName, `${filename}.json`);
|
|
1140
1140
|
const { data } = useAsyncData(filename ? path : null, fetchJSONUnsafe, {
|
|
1141
1141
|
fallback,
|
|
1142
1142
|
});
|
|
@@ -1305,18 +1305,18 @@
|
|
|
1305
1305
|
|
|
1306
1306
|
const defaultIconSize = 44;
|
|
1307
1307
|
|
|
1308
|
-
const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: [title ? jsx(Heading, { headingType: "h3", as: "h2", className: "text-center", title: title }) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full sm:justify-center mt-xl gap-5xl", role: "list", children: benefitList.map(renderBenefit) })) : null] })));
|
|
1308
|
+
const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: style('space-y-x', className), defaultPadding: "p-6xl", ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: "text-left sm:text-center", title: title })) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full sm:justify-center mt-xl gap-5xl", role: "list", children: benefitList.map(renderBenefit) })) : null] })));
|
|
1309
1309
|
const renderBenefit = (benefit, i) => (jsxs("div", { className: "flex gap-m items-center md:basis-1/2 md:max-w-[500px]", role: "listitem", children: [benefit?.icon?.icon ? (jsx(RoundedIcon, { className: "shrink-0", defaultIconSize: defaultIconSize, iconBgVersion: benefit?.iconBgVersion || '', ...benefit?.icon })) : null, benefit?.icon?.src ? jsx(Img, { className: "shrink-0", image: benefit.icon }) : null, benefit?.label ? (jsxs("div", { className: "sm:h-full", children: [jsx(Heading, { headingType: "h6", children: benefit.label }), renderDescription$3(benefit.description)] })) : null] }, String(i)));
|
|
1310
1310
|
const renderDescription$3 = (description) => {
|
|
1311
1311
|
const benefitType = description?.benefitType || null;
|
|
1312
|
-
return description && benefitType ? (jsx("div", { className: "mt-
|
|
1312
|
+
return description && benefitType ? (jsx("div", { className: "mt-2xs sm:mt-xs", children: benefitType === 'list'
|
|
1313
1313
|
? renderListBenefit(description)
|
|
1314
1314
|
: renderTextBenefit(description) })) : null;
|
|
1315
1315
|
};
|
|
1316
|
-
const renderTextBenefit = (description) => description?.name
|
|
1316
|
+
const renderTextBenefit = (description) => description?.name ? (jsx(Paragraph, { font: "font-light", size: "text-l", color: "text-secondary-text group-data-secondary:text-white", children: description.name })) : null;
|
|
1317
1317
|
const renderListBenefit = (description) => {
|
|
1318
1318
|
const listStyleType = description?.bullets ? 'list-disc pl-3xl' : '';
|
|
1319
|
-
return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx("
|
|
1319
|
+
return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx(Paragraph, { font: "font-light", size: "text-l", color: "text-secondary-text group-data-secondary:text-white", children: _ }, `benefitListItem-${i}`))) })) : null;
|
|
1320
1320
|
};
|
|
1321
1321
|
|
|
1322
1322
|
const renderButtonsSection = (buttons, { className, buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical ? 'flex-col gap-xs justify-items-stretch' : 'flex-wrap gap-m', className), children: buttons.map(renderButton(buttonClassName)) })) : null;
|
|
@@ -5313,7 +5313,7 @@
|
|
|
5313
5313
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
|
|
5314
5314
|
}
|
|
5315
5315
|
|
|
5316
|
-
const packageVersion = "0.13.
|
|
5316
|
+
const packageVersion = "0.13.21";
|
|
5317
5317
|
|
|
5318
5318
|
exports.Blocks = Blocks;
|
|
5319
5319
|
exports.ContentPage = ContentPage;
|