@redneckz/wildless-cms-uni-blocks 0.14.533 → 0.14.534
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +1 -1
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/StepsBlock/StepsBlockContent.d.ts +1 -2
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +1 -2
- package/dist/components/StepsBlock/renderStep.js.map +1 -1
- package/dist/components/StepsBlock/renderStepMobile.js +6 -19
- package/dist/components/StepsBlock/renderStepMobile.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +1 -2
- package/lib/components/StepsBlock/renderStep.js.map +1 -1
- package/lib/components/StepsBlock/renderStepMobile.js +6 -19
- package/lib/components/StepsBlock/renderStepMobile.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +7 -20
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +1 -2
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +1 -2
- package/mobile/dist/components/StepsBlock/renderStep.js.map +1 -1
- package/mobile/dist/components/StepsBlock/renderStepMobile.js +6 -19
- package/mobile/dist/components/StepsBlock/renderStepMobile.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +1 -2
- package/mobile/lib/components/StepsBlock/renderStep.js.map +1 -1
- package/mobile/lib/components/StepsBlock/renderStepMobile.js +6 -19
- package/mobile/lib/components/StepsBlock/renderStepMobile.js.map +1 -1
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +0 -2
- package/mobile/src/components/StepsBlock/renderStep.tsx +1 -2
- package/mobile/src/components/StepsBlock/renderStepMobile.tsx +16 -38
- package/package.json +1 -1
- package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +0 -8
- package/src/components/StepsBlock/StepsBlockContent.ts +0 -2
- package/src/components/StepsBlock/renderStep.tsx +1 -2
- package/src/components/StepsBlock/renderStepMobile.tsx +16 -38
|
@@ -2,7 +2,6 @@ import { type BlockVersion } from '../../model/BlockVersion';
|
|
|
2
2
|
import { type BulletsProps } from '../../model/Bullets';
|
|
3
3
|
import { type DescriptionProps, type LabelProps, type TitleProps } from '../../model/HeadlineType';
|
|
4
4
|
import { type IconProps } from '../../model/Picture';
|
|
5
|
-
import { type ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
5
|
import { type ButtonsSectionContent } from '../../ui-kit/LinkButton/ButtonsSectionContent';
|
|
7
6
|
import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
|
|
8
7
|
import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
|
|
@@ -10,7 +9,7 @@ import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
|
10
9
|
/**
|
|
11
10
|
* @title Шаг
|
|
12
11
|
*/
|
|
13
|
-
export declare type StepProps = DescriptionProps &
|
|
12
|
+
export declare type StepProps = DescriptionProps & LabelProps & RichTextProps & IconProps & BulletsProps & {
|
|
14
13
|
button?: LinkButtonContent;
|
|
15
14
|
};
|
|
16
15
|
/**
|
|
@@ -2,7 +2,6 @@ import { type BlockVersion } from '../../model/BlockVersion';
|
|
|
2
2
|
import { type BulletsProps } from '../../model/Bullets';
|
|
3
3
|
import { type DescriptionProps, type LabelProps, type TitleProps } from '../../model/HeadlineType';
|
|
4
4
|
import { type IconProps } from '../../model/Picture';
|
|
5
|
-
import { type ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
5
|
import { type ButtonsSectionContent } from '../../ui-kit/LinkButton/ButtonsSectionContent';
|
|
7
6
|
import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
|
|
8
7
|
import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
|
|
@@ -10,7 +9,7 @@ import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
|
10
9
|
/**
|
|
11
10
|
* @title Шаг
|
|
12
11
|
*/
|
|
13
|
-
export declare type StepProps = DescriptionProps &
|
|
12
|
+
export declare type StepProps = DescriptionProps & LabelProps & RichTextProps & IconProps & BulletsProps & {
|
|
14
13
|
button?: LinkButtonContent;
|
|
15
14
|
};
|
|
16
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderStep.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStep.tsx"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"renderStep.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStep.tsx"],"names":[],"mappings":";;;AAEA,mEAAgE;AAChE,6DAA0D;AAC1D,iDAA8C;AAC9C,6CAA0C;AAI7B,QAAA,eAAe,GAAG,CAAC,CAAC;AAMjC,gDAAgD;AACzC,MAAM,UAAU,GACrB,CAAC,KAAsB,EAAE,EAAE,CAC3B,CAAC,IAAe,EAAE,CAAS,EAAE,GAAgB,EAAS,EAAE;IACtD,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACpC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAEtD,OAAO,CACL,iCAEE,SAAS,EAAE,IAAA,aAAK,EACd,iHAAiH,EACjH,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,CAC9B,aAED,iCAAK,SAAS,EAAC,YAAY,aACxB,KAAK,CAAC,CAAC,CAAC,CACP,uBAAC,WAAI,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,aAAa,YACrC,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,EACR,iCAAK,SAAS,EAAC,oCAAoC,aAChD,WAAW,CAAC,CAAC,CAAC,gCAAK,SAAS,EAAE,QAAQ,CAAC,WAAW,YAAG,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,EAC/E,uBAAC,mBAAQ,IAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAC,QAAQ,EAAC,QAAQ,EAAE,QAAQ,GAAI,IACnE,IACF,EACL,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CACd,uBAAC,uBAAU,IACT,SAAS,EAAC,yCAAyC,EACnD,OAAO,EAAE,OAAO,KACZ,MAAM,YAET,MAAM,EAAE,IAAI,GACF,CACd,CAAC,CAAC,CAAC,IAAI,KAzBH,MAAM,CAAC,CAAC,CAAC,CA0BV,CACP,CAAC;AACJ,CAAC,CAAC;AApCS,QAAA,UAAU,cAoCnB;AAEJ,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,CAAC,MAAM,GAAG,uBAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -12,11 +12,10 @@ const getIconTextStyle_1 = require("./getIconTextStyle");
|
|
|
12
12
|
const StepsBlockStyleMaps_1 = require("./StepsBlockStyleMaps");
|
|
13
13
|
const styleMap = StepsBlockStyleMaps_1.STEPS_BLOCK_STYLE;
|
|
14
14
|
const renderStepMobile = (stepsSize, version, stepVersion) => (step, i) => {
|
|
15
|
-
const { button
|
|
16
|
-
|
|
17
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: "contents", children: (0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)('flex items-center relative', image?.src ? 'flex-col' : 'flex-row'), children: [image?.src ? renderText(step) : null, (0, jsx_runtime_1.jsx)("div", { className: "overflow-hidden flex flex-shrink-0 items-center", children: renderIconArea(stepsSize, stepVersion)(step, i) }), (0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)('flex flex-col justify-center h-fit w-full', {
|
|
15
|
+
const { button } = step;
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "contents", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center relative flex-row", children: [(0, jsx_runtime_1.jsx)("div", { className: "overflow-hidden flex flex-shrink-0 items-center", children: renderIconArea(stepsSize, stepVersion)(step, i) }), (0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)('flex flex-col justify-center h-fit w-full', {
|
|
18
17
|
'min-h-6xl': stepsSize,
|
|
19
|
-
}), children: [
|
|
18
|
+
}), children: [renderText(step), button?.text ? ((0, jsx_runtime_1.jsx)(LinkButton_1.LinkButton, { className: "box-border py-s w-full max-w-60 mt-lg", version: version, ...button, children: button?.text })) : null] })] }) }, String(i)));
|
|
20
19
|
};
|
|
21
20
|
exports.renderStepMobile = renderStepMobile;
|
|
22
21
|
const renderIconArea = (stepsSize, stepVersion) => (step, i) => {
|
|
@@ -24,25 +23,13 @@ const renderIconArea = (stepsSize, stepVersion) => (step, i) => {
|
|
|
24
23
|
const isImg = Boolean(step?.icon?.src);
|
|
25
24
|
const iconAreaSize = getIconAreaSize(stepsSize, isImg);
|
|
26
25
|
const containerVersion = isImg ? stepVersion === 'transparent' : stepVersion;
|
|
27
|
-
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)({ 'w-32': Boolean(isImgSrc) }, 'z-10 mr-s flex justify-center content-center rounded-md', !isImgSrc && iconAreaSize), defaultPadding: "", version: containerVersion, children: (0, jsx_runtime_1.jsx)("div", { className: "flex max-w-full max-h-full items-center justify-center", children: renderIcon({ step, iconVersion, i, stepVersion }) }) }));
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('z-10 mr-s flex justify-center content-center rounded-md', iconAreaSize), defaultPadding: "", version: containerVersion, children: (0, jsx_runtime_1.jsx)("div", { className: "flex max-w-full max-h-full items-center justify-center", children: renderIcon({ step, iconVersion, i, stepVersion }) }) }));
|
|
29
27
|
};
|
|
30
28
|
const renderText = (step) => {
|
|
31
|
-
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)({
|
|
33
|
-
'mb-lg w-full': visibleStyle,
|
|
34
|
-
}), children: [step?.label ? ((0, jsx_runtime_1.jsx)(Paragraph_1.Paragraph, { size: "text-l", align: "text-left", children: step.label })) : null, step?.description ? ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)('text-s font-light text-left', styleMap.description), children: step.description })) : null, (0, jsx_runtime_1.jsx)(RichText_1.RichText, { __html: step.__html })] }));
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [step?.label ? ((0, jsx_runtime_1.jsx)(Paragraph_1.Paragraph, { size: "text-l", align: "text-left", children: step.label })) : null, step?.description ? ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)('text-s font-light text-left', styleMap.description), children: step.description })) : null, (0, jsx_runtime_1.jsx)(RichText_1.RichText, { __html: step.__html })] }));
|
|
35
30
|
};
|
|
36
31
|
const getIconAreaSize = (stepsSize, isImg) => {
|
|
37
32
|
return stepsSize && isImg ? 'h-14 w-14' : 'h-11 w-11';
|
|
38
33
|
};
|
|
39
|
-
const renderIcon = ({ step, iconVersion, i, stepVersion, }) => {
|
|
40
|
-
if ((0, isIcon_1.isIcon)(step?.icon)) {
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(Img_1.Img, { image: { ...step.icon, iconVersion: step.icon?.iconVersion || iconVersion }, imageClassName: "max-w-full max-h-full", width: "24", height: "24" }));
|
|
42
|
-
}
|
|
43
|
-
else if ((0, isIcon_1.isIcon)(step.image)) {
|
|
44
|
-
return (0, jsx_runtime_1.jsx)(Img_1.Img, { image: { ...step.image, size: { width: 120, height: 120 } } });
|
|
45
|
-
}
|
|
46
|
-
return ((0, jsx_runtime_1.jsx)("span", { className: (0, style_1.style)('text-h4', stepVersion === 'transparent' ? styleMap.iconText : (0, getIconTextStyle_1.getIconTextStyle)(stepVersion)), children: i + 1 }));
|
|
47
|
-
};
|
|
34
|
+
const renderIcon = ({ step, iconVersion, i, stepVersion, }) => (0, isIcon_1.isIcon)(step?.icon) ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { image: { ...step.icon, iconVersion: step.icon?.iconVersion || iconVersion }, imageClassName: "max-w-full max-h-full", width: "24", height: "24" })) : ((0, jsx_runtime_1.jsx)("span", { className: (0, style_1.style)('text-h4', stepVersion === 'transparent' ? styleMap.iconText : (0, getIconTextStyle_1.getIconTextStyle)(stepVersion)), children: i + 1 }));
|
|
48
35
|
//# sourceMappingURL=renderStepMobile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderStepMobile.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStepMobile.tsx"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"renderStepMobile.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStepMobile.tsx"],"names":[],"mappings":";;;AAEA,4DAAyD;AACzD,8CAA2C;AAC3C,mEAAgE;AAChE,gEAA6D;AAC7D,6DAA0D;AAC1D,+CAA4C;AAC5C,6CAA0C;AAC1C,yDAAsD;AAEtD,+DAA0D;AAE1D,MAAM,QAAQ,GAAG,uCAAiB,CAAC;AAE5B,MAAM,gBAAgB,GAC3B,CAAC,SAAkB,EAAE,OAAqB,EAAE,WAAyB,EAAE,EAAE,CACzE,CAAC,IAAe,EAAE,CAAS,EAAE,EAAE;IAC7B,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAExB,OAAO,CACL,gCAAqB,SAAS,EAAC,UAAU,YACvC,iCAAK,SAAS,EAAC,qCAAqC,aAClD,gCAAK,SAAS,EAAC,iDAAiD,YAC7D,cAAc,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAC5C,EACN,iCACE,SAAS,EAAE,IAAA,aAAK,EAAC,2CAA2C,EAAE;wBAC5D,WAAW,EAAE,SAAS;qBACvB,CAAC,aAED,UAAU,CAAC,IAAI,CAAC,EAChB,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CACd,uBAAC,uBAAU,IACT,SAAS,EAAC,uCAAuC,EACjD,OAAO,EAAE,OAAO,KACZ,MAAM,YAET,M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AAE,QAAQ,CAAC,WAAW,CAAC,YACvE,IAAI,CAAC,WAAW,GACb,CACP,CAAC,CAAC,CAAC,IAAI,EACR,uBAAC,mBAAQ,IAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAI,IAC7B,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,SAAkB,EAAE,KAAc,EAAE,EAAE;IAC7D,OAAO,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC;AACxD,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,EAClB,IAAI,EACJ,WAAW,EACX,CAAC,EACD,WAAW,GAMZ,EAAE,EAAE,CACH,IAAA,eAAM,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CACnB,uBAAC,SAAG,IACF,KAAK,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,WAAW,IAAI,WAAW,EAAE,EAC3E,cAAc,EAAC,uBAAuB,EACtC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,GACX,CACH,CAAC,CAAC,CAAC,CACF,iCACE,SAAS,EAAE,IAAA,aAAK,EACd,SAAS,EACT,WAAW,KAAK,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,mCAAgB,EAAC,WAAW,CAAC,CAClF,YAEA,CAAC,GAAG,CAAC,GACD,CACR,CAAC"}
|
|
@@ -2,7 +2,6 @@ import { type BlockVersion } from '../../model/BlockVersion';
|
|
|
2
2
|
import { type BulletsProps } from '../../model/Bullets';
|
|
3
3
|
import { type DescriptionProps, type LabelProps, type TitleProps } from '../../model/HeadlineType';
|
|
4
4
|
import { type IconProps } from '../../model/Picture';
|
|
5
|
-
import { type ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
5
|
import { type ButtonsSectionContent } from '../../ui-kit/LinkButton/ButtonsSectionContent';
|
|
7
6
|
import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
|
|
8
7
|
import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
|
|
@@ -10,7 +9,7 @@ import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
|
10
9
|
/**
|
|
11
10
|
* @title Шаг
|
|
12
11
|
*/
|
|
13
|
-
export declare type StepProps = DescriptionProps &
|
|
12
|
+
export declare type StepProps = DescriptionProps & LabelProps & RichTextProps & IconProps & BulletsProps & {
|
|
14
13
|
button?: LinkButtonContent;
|
|
15
14
|
};
|
|
16
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderStep.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStep.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"renderStep.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStep.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI1C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AAMjC,gDAAgD;AAChD,MAAM,CAAC,MAAM,UAAU,GACrB,CAAC,KAAsB,EAAE,EAAE,CAC3B,CAAC,IAAe,EAAE,CAAS,EAAE,GAAgB,EAAS,EAAE;IACtD,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACpC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAEtD,OAAO,CACL,eAEE,SAAS,EAAE,KAAK,CACd,iHAAiH,EACjH,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,CAC9B,aAED,eAAK,SAAS,EAAC,YAAY,aACxB,KAAK,CAAC,CAAC,CAAC,CACP,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,aAAa,YACrC,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,EACR,eAAK,SAAS,EAAC,oCAAoC,aAChD,WAAW,CAAC,CAAC,CAAC,cAAK,SAAS,EAAE,QAAQ,CAAC,WAAW,YAAG,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,EAC/E,KAAC,QAAQ,IAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAC,QAAQ,EAAC,QAAQ,EAAE,QAAQ,GAAI,IACnE,IACF,EACL,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CACd,KAAC,UAAU,IACT,SAAS,EAAC,yCAAyC,EACnD,OAAO,EAAE,OAAO,KACZ,MAAM,YAET,MAAM,EAAE,IAAI,GACF,CACd,CAAC,CAAC,CAAC,IAAI,KAzBH,MAAM,CAAC,CAAC,CAAC,CA0BV,CACP,CAAC;AACJ,CAAC,CAAC;AAEJ,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,CAAC,MAAM,GAAG,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -10,36 +10,23 @@ import { getIconTextStyle } from './getIconTextStyle.js';
|
|
|
10
10
|
import { STEPS_BLOCK_STYLE } from './StepsBlockStyleMaps.js';
|
|
11
11
|
const styleMap = STEPS_BLOCK_STYLE;
|
|
12
12
|
export const renderStepMobile = (stepsSize, version, stepVersion) => (step, i) => {
|
|
13
|
-
const { button
|
|
14
|
-
|
|
15
|
-
return (_jsx("div", { className: "contents", children: _jsxs("div", { className: style('flex items-center relative', image?.src ? 'flex-col' : 'flex-row'), children: [image?.src ? renderText(step) : null, _jsx("div", { className: "overflow-hidden flex flex-shrink-0 items-center", children: renderIconArea(stepsSize, stepVersion)(step, i) }), _jsxs("div", { className: style('flex flex-col justify-center h-fit w-full', {
|
|
13
|
+
const { button } = step;
|
|
14
|
+
return (_jsx("div", { className: "contents", children: _jsxs("div", { className: "flex items-center relative flex-row", children: [_jsx("div", { className: "overflow-hidden flex flex-shrink-0 items-center", children: renderIconArea(stepsSize, stepVersion)(step, i) }), _jsxs("div", { className: style('flex flex-col justify-center h-fit w-full', {
|
|
16
15
|
'min-h-6xl': stepsSize,
|
|
17
|
-
}), children: [
|
|
16
|
+
}), children: [renderText(step), button?.text ? (_jsx(LinkButton, { className: "box-border py-s w-full max-w-60 mt-lg", version: version, ...button, children: button?.text })) : null] })] }) }, String(i)));
|
|
18
17
|
};
|
|
19
18
|
const renderIconArea = (stepsSize, stepVersion) => (step, i) => {
|
|
20
19
|
const iconVersion = stepVersion === 'secondary' ? 'white' : 'color';
|
|
21
20
|
const isImg = Boolean(step?.icon?.src);
|
|
22
21
|
const iconAreaSize = getIconAreaSize(stepsSize, isImg);
|
|
23
22
|
const containerVersion = isImg ? stepVersion === 'transparent' : stepVersion;
|
|
24
|
-
|
|
25
|
-
return (_jsx(BlockWrapper, { className: style({ 'w-32': Boolean(isImgSrc) }, 'z-10 mr-s flex justify-center content-center rounded-md', !isImgSrc && iconAreaSize), defaultPadding: "", version: containerVersion, children: _jsx("div", { className: "flex max-w-full max-h-full items-center justify-center", children: renderIcon({ step, iconVersion, i, stepVersion }) }) }));
|
|
23
|
+
return (_jsx(BlockWrapper, { className: style('z-10 mr-s flex justify-center content-center rounded-md', iconAreaSize), defaultPadding: "", version: containerVersion, children: _jsx("div", { className: "flex max-w-full max-h-full items-center justify-center", children: renderIcon({ step, iconVersion, i, stepVersion }) }) }));
|
|
26
24
|
};
|
|
27
25
|
const renderText = (step) => {
|
|
28
|
-
|
|
29
|
-
return (_jsxs("div", { className: style({
|
|
30
|
-
'mb-lg w-full': visibleStyle,
|
|
31
|
-
}), children: [step?.label ? (_jsx(Paragraph, { size: "text-l", align: "text-left", children: step.label })) : null, step?.description ? (_jsx("div", { className: style('text-s font-light text-left', styleMap.description), children: step.description })) : null, _jsx(RichText, { __html: step.__html })] }));
|
|
26
|
+
return (_jsxs("div", { children: [step?.label ? (_jsx(Paragraph, { size: "text-l", align: "text-left", children: step.label })) : null, step?.description ? (_jsx("div", { className: style('text-s font-light text-left', styleMap.description), children: step.description })) : null, _jsx(RichText, { __html: step.__html })] }));
|
|
32
27
|
};
|
|
33
28
|
const getIconAreaSize = (stepsSize, isImg) => {
|
|
34
29
|
return stepsSize && isImg ? 'h-14 w-14' : 'h-11 w-11';
|
|
35
30
|
};
|
|
36
|
-
const renderIcon = ({ step, iconVersion, i, stepVersion, }) => {
|
|
37
|
-
if (isIcon(step?.icon)) {
|
|
38
|
-
return (_jsx(Img, { image: { ...step.icon, iconVersion: step.icon?.iconVersion || iconVersion }, imageClassName: "max-w-full max-h-full", width: "24", height: "24" }));
|
|
39
|
-
}
|
|
40
|
-
else if (isIcon(step.image)) {
|
|
41
|
-
return _jsx(Img, { image: { ...step.image, size: { width: 120, height: 120 } } });
|
|
42
|
-
}
|
|
43
|
-
return (_jsx("span", { className: style('text-h4', stepVersion === 'transparent' ? styleMap.iconText : getIconTextStyle(stepVersion)), children: i + 1 }));
|
|
44
|
-
};
|
|
31
|
+
const renderIcon = ({ step, iconVersion, i, stepVersion, }) => isIcon(step?.icon) ? (_jsx(Img, { image: { ...step.icon, iconVersion: step.icon?.iconVersion || iconVersion }, imageClassName: "max-w-full max-h-full", width: "24", height: "24" })) : (_jsx("span", { className: style('text-h4', stepVersion === 'transparent' ? styleMap.iconText : getIconTextStyle(stepVersion)), children: i + 1 }));
|
|
45
32
|
//# sourceMappingURL=renderStepMobile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderStepMobile.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStepMobile.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"renderStepMobile.js","sourceRoot":"","sources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,MAAM,EAAE,IAAI,CAAC,MAAM,GAAI,IAC7B,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,SAAkB,EAAE,KAAc,EAAE,EAAE;IAC7D,OAAO,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC;AACxD,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,EAClB,IAAI,EACJ,WAAW,EACX,CAAC,EACD,WAAW,GAMZ,EAAE,EAAE,CACH,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CACnB,KAAC,GAAG,IACF,KAAK,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,WAAW,IAAI,WAAW,EAAE,EAC3E,cAAc,EAAC,uBAAuB,EACtC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,GACX,CACH,CAAC,CAAC,CAAC,CACF,eACE,SAAS,EAAE,KAAK,CACd,SAAS,EACT,WAAW,KAAK,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAClF,YAEA,CAAC,GAAG,CAAC,GACD,CACR,CAAC"}
|
|
@@ -5261,38 +5261,25 @@
|
|
|
5261
5261
|
|
|
5262
5262
|
const styleMap = STEPS_BLOCK_STYLE;
|
|
5263
5263
|
const renderStepMobile = (stepsSize, version, stepVersion) => (step, i) => {
|
|
5264
|
-
const { button
|
|
5265
|
-
|
|
5266
|
-
return (jsx("div", { className: "contents", children: jsxs("div", { className: style('flex items-center relative', image?.src ? 'flex-col' : 'flex-row'), children: [image?.src ? renderText(step) : null, jsx("div", { className: "overflow-hidden flex flex-shrink-0 items-center", children: renderIconArea(stepsSize, stepVersion)(step, i) }), jsxs("div", { className: style('flex flex-col justify-center h-fit w-full', {
|
|
5264
|
+
const { button } = step;
|
|
5265
|
+
return (jsx("div", { className: "contents", children: jsxs("div", { className: "flex items-center relative flex-row", children: [jsx("div", { className: "overflow-hidden flex flex-shrink-0 items-center", children: renderIconArea(stepsSize, stepVersion)(step, i) }), jsxs("div", { className: style('flex flex-col justify-center h-fit w-full', {
|
|
5267
5266
|
'min-h-6xl': stepsSize,
|
|
5268
|
-
}), children: [
|
|
5267
|
+
}), children: [renderText(step), button?.text ? (jsx(LinkButton, { className: "box-border py-s w-full max-w-60 mt-lg", version: version, ...button, children: button?.text })) : null] })] }) }, String(i)));
|
|
5269
5268
|
};
|
|
5270
5269
|
const renderIconArea = (stepsSize, stepVersion) => (step, i) => {
|
|
5271
5270
|
const iconVersion = stepVersion === 'secondary' ? 'white' : 'color';
|
|
5272
5271
|
const isImg = Boolean(step?.icon?.src);
|
|
5273
5272
|
const iconAreaSize = getIconAreaSize(stepsSize, isImg);
|
|
5274
5273
|
const containerVersion = isImg ? stepVersion === 'transparent' : stepVersion;
|
|
5275
|
-
|
|
5276
|
-
return (jsx(BlockWrapper, { className: style({ 'w-32': Boolean(isImgSrc) }, 'z-10 mr-s flex justify-center content-center rounded-md', !isImgSrc && iconAreaSize), defaultPadding: "", version: containerVersion, children: jsx("div", { className: "flex max-w-full max-h-full items-center justify-center", children: renderIcon$1({ step, iconVersion, i, stepVersion }) }) }));
|
|
5274
|
+
return (jsx(BlockWrapper, { className: style('z-10 mr-s flex justify-center content-center rounded-md', iconAreaSize), defaultPadding: "", version: containerVersion, children: jsx("div", { className: "flex max-w-full max-h-full items-center justify-center", children: renderIcon$1({ step, iconVersion, i, stepVersion }) }) }));
|
|
5277
5275
|
};
|
|
5278
5276
|
const renderText = (step) => {
|
|
5279
|
-
|
|
5280
|
-
return (jsxs("div", { className: style({
|
|
5281
|
-
'mb-lg w-full': visibleStyle,
|
|
5282
|
-
}), children: [step?.label ? (jsx(Paragraph, { size: "text-l", align: "text-left", children: step.label })) : null, step?.description ? (jsx("div", { className: style('text-s font-light text-left', styleMap.description), children: step.description })) : null, jsx(RichText, { __html: step.__html })] }));
|
|
5277
|
+
return (jsxs("div", { children: [step?.label ? (jsx(Paragraph, { size: "text-l", align: "text-left", children: step.label })) : null, step?.description ? (jsx("div", { className: style('text-s font-light text-left', styleMap.description), children: step.description })) : null, jsx(RichText, { __html: step.__html })] }));
|
|
5283
5278
|
};
|
|
5284
5279
|
const getIconAreaSize = (stepsSize, isImg) => {
|
|
5285
5280
|
return stepsSize && isImg ? 'h-14 w-14' : 'h-11 w-11';
|
|
5286
5281
|
};
|
|
5287
|
-
const renderIcon$1 = ({ step, iconVersion, i, stepVersion, }) => {
|
|
5288
|
-
if (isIcon(step?.icon)) {
|
|
5289
|
-
return (jsx(Img, { image: { ...step.icon, iconVersion: step.icon?.iconVersion || iconVersion }, imageClassName: "max-w-full max-h-full", width: "24", height: "24" }));
|
|
5290
|
-
}
|
|
5291
|
-
else if (isIcon(step.image)) {
|
|
5292
|
-
return jsx(Img, { image: { ...step.image, size: { width: 120, height: 120 } } });
|
|
5293
|
-
}
|
|
5294
|
-
return (jsx("span", { className: style('text-h4', stepVersion === 'transparent' ? styleMap.iconText : getIconTextStyle(stepVersion)), children: i + 1 }));
|
|
5295
|
-
};
|
|
5282
|
+
const renderIcon$1 = ({ step, iconVersion, i, stepVersion, }) => isIcon(step?.icon) ? (jsx(Img, { image: { ...step.icon, iconVersion: step.icon?.iconVersion || iconVersion }, imageClassName: "max-w-full max-h-full", width: "24", height: "24" })) : (jsx("span", { className: style('text-h4', stepVersion === 'transparent' ? styleMap.iconText : getIconTextStyle(stepVersion)), children: i + 1 }));
|
|
5296
5283
|
|
|
5297
5284
|
const StepsBlock = JSX(({ className = '', title, description, steps = [], buttons, stepVersion = 'gray', version = 'primary', ...rest }) => {
|
|
5298
5285
|
const isBigSizeSteps = steps.length > 3;
|
|
@@ -6102,7 +6089,7 @@
|
|
|
6102
6089
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6103
6090
|
});
|
|
6104
6091
|
|
|
6105
|
-
const packageVersion = "0.14.
|
|
6092
|
+
const packageVersion = "0.14.533";
|
|
6106
6093
|
|
|
6107
6094
|
exports.Blocks = Blocks;
|
|
6108
6095
|
exports.ContentPage = ContentPage;
|