@redneckz/wildless-cms-uni-blocks 0.2.109 → 0.2.111
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 +31 -67
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/BaseTile/BaseTile.js +6 -3
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/Blocks.d.ts +1 -1
- package/dist/components/{MobileBlocks.d.ts → Blocks.mobile.d.ts} +5 -4
- package/dist/components/{MobileBlocks.js → Blocks.mobile.js} +11 -9
- package/dist/components/Blocks.mobile.js.map +1 -0
- package/dist/components/Gallery/Gallery.d.ts +1 -4
- package/dist/components/Gallery/Gallery.js.map +1 -1
- package/dist/components/Gallery/Gallery.mobile.d.ts +1 -1
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +1 -1
- package/dist/components/Gallery/GalleryContent.d.ts +6 -6
- package/dist/components/Gallery/GalleryProps.d.ts +4 -0
- package/dist/components/Gallery/GalleryProps.js +2 -0
- package/dist/components/Gallery/GalleryProps.js.map +1 -0
- package/dist/components/ProductBlock/ProductBlock.mobile.d.ts +2 -2
- package/dist/components/ProductTile/ProductTile.d.ts +1 -1
- package/dist/components/ProductTile/ProductTile.js +6 -6
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +4 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +5 -4
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/ui-kit/BlockItem/BlockItem.js +1 -1
- package/dist/ui-kit/BlockItem/BlockItem.js.map +1 -1
- package/dist/ui-kit/Img.d.ts +2 -2
- package/dist/ui-kit/Img.js.map +1 -1
- package/dist/ui-kit/Title/Title.d.ts +2 -1
- package/dist/ui-kit/Title/Title.js +10 -3
- package/dist/ui-kit/Title/Title.js.map +1 -1
- package/dist/ui-kit/Title/Title.mobile.d.ts +3 -0
- package/dist/ui-kit/Title/Title.mobile.js +18 -0
- package/dist/ui-kit/Title/Title.mobile.js.map +1 -0
- package/dist/ui-kit/Title/TitleProps.d.ts +1 -10
- package/dist/ui-kit/Title/TitleProps.js +0 -11
- package/dist/ui-kit/Title/TitleProps.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BaseTile/BaseTile.js +6 -3
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/Blocks.d.ts +1 -1
- package/lib/components/{MobileBlocks.d.ts → Blocks.mobile.d.ts} +5 -4
- package/lib/components/{MobileBlocks.js → Blocks.mobile.js} +7 -5
- package/lib/components/Blocks.mobile.js.map +1 -0
- package/lib/components/ContentPage/ContentPage.fixture.d.ts +0 -1
- package/lib/components/ContentPage/ContentPage.fixture.mobile.d.ts +4 -0
- package/lib/components/Gallery/Gallery.d.ts +1 -4
- package/lib/components/Gallery/Gallery.fixture.d.ts +0 -1
- package/lib/components/Gallery/Gallery.js.map +1 -1
- package/lib/components/Gallery/Gallery.mobile.d.ts +1 -1
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +1 -1
- package/lib/components/Gallery/GalleryContent.d.ts +6 -6
- package/lib/components/Gallery/GalleryProps.d.ts +4 -0
- package/lib/components/Gallery/GalleryProps.js +2 -0
- package/lib/components/Gallery/GalleryProps.js.map +1 -0
- package/lib/components/ProductBlock/ProductBlock.mobile.d.ts +2 -2
- package/lib/components/ProductTile/ProductTile.d.ts +1 -1
- package/lib/components/ProductTile/ProductTile.js +6 -6
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +4 -1
- package/lib/components/StepsBlock/StepsBlock.fixture.d.ts +0 -5
- package/lib/components/StepsBlock/StepsBlock.fixture.mobile.d.ts +8 -0
- package/lib/components/StepsBlock/StepsBlock.mobile.js +5 -4
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/ui-kit/BlockItem/BlockItem.js +1 -1
- package/lib/ui-kit/BlockItem/BlockItem.js.map +1 -1
- package/lib/ui-kit/Img.d.ts +2 -2
- package/lib/ui-kit/Img.js.map +1 -1
- package/lib/ui-kit/Title/Title.d.ts +2 -1
- package/lib/ui-kit/Title/Title.js +8 -1
- package/lib/ui-kit/Title/Title.js.map +1 -1
- package/lib/ui-kit/Title/Title.mobile.d.ts +3 -0
- package/lib/ui-kit/Title/Title.mobile.js +16 -0
- package/lib/ui-kit/Title/Title.mobile.js.map +1 -0
- package/lib/ui-kit/Title/TitleProps.d.ts +1 -10
- package/lib/ui-kit/Title/TitleProps.js +1 -10
- package/lib/ui-kit/Title/TitleProps.js.map +1 -1
- package/package.json +31 -6
- package/src/components/BaseTile/BaseTile.tsx +7 -3
- package/src/components/{MobileBlocks.ts → Blocks.mobile.ts} +6 -4
- package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +19 -0
- package/src/components/ContentPage/ContentPage.fixture.tsx +1 -11
- package/src/components/Gallery/Gallery.example.json +0 -13
- package/src/components/Gallery/Gallery.fixture.tsx +2 -7
- package/src/components/Gallery/Gallery.mobile.tsx +2 -2
- package/src/components/Gallery/Gallery.tsx +1 -4
- package/src/components/Gallery/GalleryCardInner.tsx +1 -1
- package/src/components/Gallery/GalleryContent.ts +6 -6
- package/src/components/Gallery/GalleryProps.ts +4 -0
- package/src/components/MiniGallery/MiniGallery.example.json +0 -11
- package/src/components/ProductBlock/ProductBlock.mobile.tsx +2 -2
- package/src/components/ProductTile/ProductTile.fixture.tsx +25 -25
- package/src/components/ProductTile/ProductTile.tsx +16 -15
- package/src/components/ProductTile/ProductTileContent.ts +4 -1
- package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +96 -0
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +0 -77
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +7 -6
- package/src/index.ts +0 -1
- package/src/ui-kit/BlockItem/BlockItem.tsx +1 -1
- package/src/ui-kit/Img.tsx +2 -2
- package/src/ui-kit/Title/Title.mobile.tsx +22 -0
- package/src/ui-kit/Title/Title.tsx +10 -1
- package/src/ui-kit/Title/TitleProps.ts +1 -11
- package/dist/components/MobileBlocks.js.map +0 -1
- package/lib/components/MobileBlocks.js.map +0 -1
|
@@ -3,16 +3,16 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
3
3
|
import { Tile } from '../Tile/Tile.js';
|
|
4
4
|
export const ProductTile = JSX((props) => {
|
|
5
5
|
const { benefits, version } = props;
|
|
6
|
-
return (_jsx(Tile, { ...props, children: _jsxs("div", { className: "flex mt-5 mb-1", children: [benefits?.length ?
|
|
6
|
+
return (_jsx(Tile, { ...props, children: _jsxs("div", { className: "flex mt-5 mb-1", children: [benefits?.length ? _jsx("div", { className: "mr-8", children: benefits.map(renderBenefitLabel) }) : null, benefits?.length ? (_jsx("div", { className: "pt-1", children: benefits.map((_, i) => renderBenefitDescription(_, i, version)) })) : null] }) }));
|
|
7
7
|
});
|
|
8
|
-
function renderBenefitLabel(benefit, i
|
|
8
|
+
function renderBenefitLabel(benefit, i) {
|
|
9
|
+
return (_jsx("div", { className: `text-xl font-medium ${i ? 'mt-2.5' : ''}`, children: benefit.label }, String(i)));
|
|
10
|
+
}
|
|
11
|
+
function renderBenefitDescription(benefit, i, version = 'primary') {
|
|
9
12
|
const labelStyleMap = {
|
|
10
13
|
primary: 'text-secondary-text',
|
|
11
14
|
secondary: 'text-white',
|
|
12
15
|
};
|
|
13
|
-
return (_jsx("div", { className: `text-sm ${i ? 'mt-4' : ''} ${labelStyleMap[version]}`, children: benefit.
|
|
14
|
-
}
|
|
15
|
-
function renderBenefitDescription(benefit, i) {
|
|
16
|
-
return (_jsx("div", { className: `text-xl font-medium ${i ? 'mt-2.5' : ''}`, children: benefit.description }, String(i)));
|
|
16
|
+
return (_jsx("div", { className: `text-sm ${i ? 'mt-4' : ''} ${labelStyleMap[version]}`, children: benefit.description }, String(i)));
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=ProductTile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductTile.js","sourceRoot":"","sources":["../../../src/components/ProductTile/ProductTile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAIxC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAKpC,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAmB,CAAC,KAAK,EAAE,EAAE;IACzD,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACpC,OAAO,CACL,KAAC,IAAI,OAAK,KAAK,YACb,eAAK,SAAS,EAAC,gBAAgB,aAC5B,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"ProductTile.js","sourceRoot":"","sources":["../../../src/components/ProductTile/ProductTile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAIxC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAKpC,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAmB,CAAC,KAAK,EAAE,EAAE;IACzD,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACpC,OAAO,CACL,KAAC,IAAI,OAAK,KAAK,YACb,eAAK,SAAS,EAAC,gBAAgB,aAC5B,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,MAAM,YAAE,QAAQ,CAAC,GAAG,CAAC,kBAAkB,CAAC,GAAO,CAAC,CAAC,CAAC,IAAI,EACxF,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,CAClB,cAAK,SAAS,EAAC,MAAM,YAClB,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,GAC5D,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,GACD,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,SAAS,kBAAkB,CAAC,OAAgB,EAAE,CAAS;IACrD,OAAO,CACL,cAAqB,SAAS,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,YACvE,OAAO,CAAC,KAAK,IADN,MAAM,CAAC,CAAC,CAAC,CAEb,CACP,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAAC,OAAgB,EAAE,CAAS,EAAE,OAAO,GAAG,SAAS;IAChF,MAAM,aAAa,GAAiC;QAClD,OAAO,EAAE,qBAAqB;QAC9B,SAAS,EAAE,YAAY;KACxB,CAAC;IACF,OAAO,CACL,cAAqB,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,aAAa,CAAC,OAAO,CAAC,EAAE,YACnF,OAAO,CAAC,WAAW,IADZ,MAAM,CAAC,CAAC,CAAC,CAEb,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -4,6 +4,9 @@ import type { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
|
4
4
|
* @title Продуктовая плитка
|
|
5
5
|
*/
|
|
6
6
|
export interface ProductTileContent extends Omit<BaseTileCommonProps, 'align'> {
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* @title Преимущества
|
|
9
|
+
* @maxItems 7
|
|
10
|
+
*/
|
|
8
11
|
benefits?: Omit<Benefit, 'icon'>[];
|
|
9
12
|
}
|
|
@@ -2,16 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { Icon } from '../../ui-kit/Icon/Icon.js';
|
|
4
4
|
import { Title } from '../../ui-kit/Title/Title.js';
|
|
5
|
-
export const StepsBlock = JSX(({ className, title, description,
|
|
6
|
-
return (_jsxs("section", { className: `box-border font-sans text-primary-text bg-white px-20 py-[50px] flex flex-col ${className || ''}`, children: [title && (_jsx(Title, { size: "
|
|
5
|
+
export const StepsBlock = JSX(({ className, title, description, steps, size = 'normal' }) => {
|
|
6
|
+
return (_jsxs("section", { className: `box-border font-sans text-primary-text bg-white px-20 py-[50px] flex flex-col ${className || ''}`, children: [title && (_jsx(Title, { size: "M", className: "font-medium m-0 text-center", children: title })), description && _jsx("p", { className: `text-m-md text-center ${title && 'mt-2'}`, children: description }), steps?.length ? (_jsx("div", { className: `box-border py-0.5 mb-0.5 mt-5`, children: _jsx("div", { className: "flex flex-col justify-between gap-x-[101px]", children: steps.map((step, i, array) => renderStepTitle({ step, size }, i, array)) }) })) : null] }));
|
|
7
7
|
});
|
|
8
|
-
const renderStepTitle = ({ step
|
|
8
|
+
const renderStepTitle = ({ step, size }, i, array) => {
|
|
9
9
|
const isLastStep = array.length - 1 === i;
|
|
10
10
|
const iconAreaSize = size === 'normal'
|
|
11
11
|
? 'h-[70px] w-[70px] min-w-[70px] min-h-[70px]'
|
|
12
12
|
: 'h-[50px] w-[50px] min-w-[50px] min-h-[50px]';
|
|
13
13
|
const iconSize = size === 'normal' ? '38' : '27';
|
|
14
14
|
const margin = size === 'normal' ? 'ml-[34px]' : 'ml-[24px]';
|
|
15
|
-
|
|
15
|
+
const iconTextSize = size === 'normal' ? 'text-m-title' : 'text-m-title-xs';
|
|
16
|
+
return (_jsxs("div", { children: [_jsxs("div", { className: "flex flex-row text-center relative", children: [_jsx("div", { className: `${iconAreaSize} bg-secondary-light rounded-full z-10 mr-3 flex justify-center content-center`, children: _jsx("span", { className: `font-medium text-secondary-text self-center ${iconTextSize}`, children: (step.icon && _jsx(Icon, { name: step.icon, width: iconSize, height: iconSize })) || i + 1 }) }), _jsxs("div", { className: "flex flex-col justify-center relative", children: [step.label && (_jsx("div", { className: "font-medium text-m-title-xs m-0 text-left", children: step.label })), step.description && (_jsx("div", { className: `font-normal text-sm text-secondary-text text-left ${step.label ? 'mt-1' : ''}`, children: step.description }))] })] }, String(i)), !isLastStep && _jsx("div", { className: `h-8 w-[2px] bg-secondary-light ${margin}` })] }));
|
|
16
17
|
};
|
|
17
18
|
//# sourceMappingURL=StepsBlock.mobile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepsBlock.mobile.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlock.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAKjD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAC3B,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"StepsBlock.mobile.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlock.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAKjD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAC3B,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,GAAG,QAAQ,EAAE,EAAE,EAAE;IAC5D,OAAO,CACL,mBACE,SAAS,EAAE,iFACT,SAAS,IAAI,EACf,EAAE,aAED,KAAK,IAAI,CACR,KAAC,KAAK,IAAC,IAAI,EAAC,GAAG,EAAC,SAAS,EAAC,6BAA6B,YACpD,KAAK,GACA,CACT,EACA,WAAW,IAAI,YAAG,SAAS,EAAE,yBAAyB,KAAK,IAAI,MAAM,EAAE,YAAG,WAAW,GAAK,EAC1F,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACf,cAAK,SAAS,EAAE,+BAA+B,YAC7C,cAAK,SAAS,EAAC,6CAA6C,YACzD,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,GACrE,GACF,CACP,CAAC,CAAC,CAAC,IAAI,IACA,CACX,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAS,EAAE,KAAa,EAAE,EAAE;IACnE,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,YAAY,GAChB,IAAI,KAAK,QAAQ;QACf,CAAC,CAAC,6CAA6C;QAC/C,CAAC,CAAC,6CAA6C,CAAC;IACpD,MAAM,QAAQ,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACjD,MAAM,MAAM,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC;IAC7D,MAAM,YAAY,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAC5E,OAAO,CACL,0BACE,eAAqB,SAAS,EAAC,oCAAoC,aACjE,cACE,SAAS,EAAE,GAAG,YAAY,+EAA+E,YAEzG,eAAM,SAAS,EAAE,+CAA+C,YAAY,EAAE,YAC3E,CAAC,IAAI,CAAC,IAAI,IAAI,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAChF,GACH,EACN,eAAK,SAAS,EAAC,uCAAuC,aACnD,IAAI,CAAC,KAAK,IAAI,CACb,cAAK,SAAS,EAAC,2CAA2C,YAAE,IAAI,CAAC,KAAK,GAAO,CAC9E,EACA,IAAI,CAAC,WAAW,IAAI,CACnB,cACE,SAAS,EAAE,qDACT,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EACxB,EAAE,YAED,IAAI,CAAC,WAAW,GACb,CACP,IACG,KArBE,MAAM,CAAC,CAAC,CAAC,CAsBb,EACL,CAAC,UAAU,IAAI,cAAK,SAAS,EAAE,kCAAkC,MAAM,EAAE,GAAI,IAC1E,CACP,CAAC;AACJ,CAAC,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export type { AsyncDataHook, ContentPageContext, GeolocationHook, HandlerDecorat
|
|
|
9
9
|
export { ContentPageHead } from './components/ContentPage/ContentPageHead';
|
|
10
10
|
export { toMobilePage } from './components/ContentPage/toMobilePage';
|
|
11
11
|
export { Header } from './components/Header/Header';
|
|
12
|
-
export { MobileBlocks } from './components/MobileBlocks';
|
|
13
12
|
export type { Img, ImgSource, Picture } from './model/Picture';
|
|
14
13
|
export { projectSettings } from './ProjectSettings';
|
|
15
14
|
export type { ProjectSettings } from './ProjectSettings';
|
package/lib/index.js
CHANGED
|
@@ -6,7 +6,6 @@ export { ContentPage } from './components/ContentPage/ContentPage.js';
|
|
|
6
6
|
export { ContentPageHead } from './components/ContentPage/ContentPageHead.js';
|
|
7
7
|
export { toMobilePage } from './components/ContentPage/toMobilePage.js';
|
|
8
8
|
export { Header } from './components/Header/Header.js';
|
|
9
|
-
export { MobileBlocks } from './components/MobileBlocks.js';
|
|
10
9
|
export { projectSettings } from './ProjectSettings.js';
|
|
11
10
|
export { Icon } from './ui-kit/Icon/Icon.js';
|
|
12
11
|
export { joinList } from './utils/joinList.js';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAWnE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAWnE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAWpD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC"}
|
|
@@ -10,7 +10,7 @@ const LIST_STYLE_MAP = {
|
|
|
10
10
|
secondary: 'bg-secondary-text',
|
|
11
11
|
};
|
|
12
12
|
export const BlockItem = JSX(({ className = '', isDotted = true, text, children, version = 'primary', white }) => {
|
|
13
|
-
return (_jsxs("div", { className: `font-sans inline-block flex ${className}`, role: "listitem", children: [isDotted && _jsx("div", { className: getListStyle(version, white) }), _jsx("span", { className: white ? 'text-white' : TEXT_STYLE_MAP[version], children: text || children })] }));
|
|
13
|
+
return (_jsxs("div", { className: `font-sans inline-block flex items-baseline ${className}`, role: "listitem", children: [isDotted && _jsx("div", { className: getListStyle(version, white) }), _jsx("span", { className: white ? 'text-white' : TEXT_STYLE_MAP[version], children: text || children })] }));
|
|
14
14
|
});
|
|
15
15
|
const getListStyle = (version, white) => {
|
|
16
16
|
const color = white ? 'bg-white' : LIST_STYLE_MAP[version];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockItem.js","sourceRoot":"","sources":["../../../src/ui-kit/BlockItem/BlockItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAIxC,MAAM,kBAAkB,GAAG,gCAAgC,CAAC;AAE5D,MAAM,cAAc,GAAqC;IACvD,OAAO,EAAE,mBAAmB;IAC5B,SAAS,EAAE,qBAAqB;CACjC,CAAC;AAEF,MAAM,cAAc,GAAqC;IACvD,OAAO,EAAE,iBAAiB;IAC1B,SAAS,EAAE,mBAAmB;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAC1B,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE;IAClF,OAAO,CACL,eAAK,SAAS,EAAE
|
|
1
|
+
{"version":3,"file":"BlockItem.js","sourceRoot":"","sources":["../../../src/ui-kit/BlockItem/BlockItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAIxC,MAAM,kBAAkB,GAAG,gCAAgC,CAAC;AAE5D,MAAM,cAAc,GAAqC;IACvD,OAAO,EAAE,mBAAmB;IAC5B,SAAS,EAAE,qBAAqB;CACjC,CAAC;AAEF,MAAM,cAAc,GAAqC;IACvD,OAAO,EAAE,iBAAiB;IAC1B,SAAS,EAAE,mBAAmB;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAC1B,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE;IAClF,OAAO,CACL,eAAK,SAAS,EAAE,8CAA8C,SAAS,EAAE,EAAE,IAAI,EAAC,UAAU,aACvF,QAAQ,IAAI,cAAK,SAAS,EAAE,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,GAAI,EAC7D,eAAM,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,YAAG,IAAI,IAAI,QAAQ,GAAQ,IACtF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,OAAqB,EAAE,KAAe,EAAE,EAAE;IAC9D,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAC3D,MAAM,IAAI,GACR,OAAO,KAAK,SAAS;QACnB,CAAC,CAAC,8CAA8C;QAChD,CAAC,CAAC,gDAAgD,CAAC;IAEvD,OAAO,GAAG,kBAAkB,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;AAClD,CAAC,CAAC"}
|
package/lib/ui-kit/Img.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ImgSource, Picture } from '../model/Picture';
|
|
2
|
-
export interface
|
|
2
|
+
export interface ImageProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
image: Picture;
|
|
5
5
|
}
|
|
6
|
-
export declare const Img: (props: import("@redneckz/uni-jsx").PropsWithChildren<
|
|
6
|
+
export declare const Img: (props: import("@redneckz/uni-jsx").PropsWithChildren<ImageProps, any>, context?: any) => any;
|
|
7
7
|
export declare function formatToMimeType(format: ImgSource['format']): string | undefined;
|
package/lib/ui-kit/Img.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Img.js","sourceRoot":"","sources":["../../src/ui-kit/Img.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAQxC,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,
|
|
1
|
+
{"version":3,"file":"Img.js","sourceRoot":"","sources":["../../src/ui-kit/Img.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAQxC,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,CAAa,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,EAAE;IAC9E,MAAM,KAAK,GAAG;QACZ,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM;QAChD,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC,MAAM;KACpD,CAAC;IAEF,OAAO,CACL,mBAAS,SAAS,EAAE,aAAa,SAAS,IAAI,EAAE,EAAE,aAC/C,KAAK,CAAC,OAAO,EAAE,MAAM;gBACpB,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5C,iBAAgC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,IAA9D,GAAG,KAAK,IAAI,GAAG,EAAE,CAAiD,CAChF,CAAC;gBACJ,CAAC,CAAC,IAAI,EACR,cACE,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,KAAK,EAC7B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,KAAK,EAAE,KAAK,KACR,IAAI,GACR,IACM,CACX,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,gBAAgB,CAAC,MAA2B;IAC1D,OAAO,MAAM,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACxD,CAAC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { TitleProps } from './TitleProps';
|
|
1
|
+
import { TitleSize, TitleProps } from './TitleProps';
|
|
2
|
+
export declare const SizeTableClass: Record<TitleSize, string>;
|
|
2
3
|
export declare const Title: (props: import("@redneckz/uni-jsx").PropsWithChildren<TitleProps, any>, context?: any) => any;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
|
|
3
|
+
export const SizeTableClass = {
|
|
4
|
+
XL: 'text-title-lg',
|
|
5
|
+
L: 'text-title',
|
|
6
|
+
M: 'text-title-sm',
|
|
7
|
+
S: 'text-title-xs',
|
|
8
|
+
'2XS': 'text-title-2xs',
|
|
9
|
+
'3XS': 'text-title-2xs',
|
|
10
|
+
};
|
|
4
11
|
export const Title = JSX(({ size = 'L', className, children, ...rest }) => {
|
|
5
12
|
const Tag = size === 'XL' ? 'h1' : 'h2';
|
|
6
13
|
return (_jsx(Tag, { className: getClasses(SizeTableClass[size], className), ...rest, children: children }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Title.js","sourceRoot":"","sources":["../../../src/ui-kit/Title/Title.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Title.js","sourceRoot":"","sources":["../../../src/ui-kit/Title/Title.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,MAAM,CAAC,MAAM,cAAc,GAA8B;IACvD,EAAE,EAAE,eAAe;IACnB,CAAC,EAAE,YAAY;IACf,CAAC,EAAE,eAAe;IAClB,CAAC,EAAE,eAAe;IAClB,KAAK,EAAE,gBAAgB;IACvB,KAAK,EAAE,gBAAgB;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAa,CAAC,EAAE,IAAI,GAAG,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACpF,MAAM,GAAG,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACxC,OAAO,CACL,KAAC,GAAG,IAAC,SAAS,EAAE,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,KAAM,IAAI,YAClE,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,CAAC,GAAG,OAA+B,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
export const SizeTableClass = {
|
|
4
|
+
XL: 'text-m-title',
|
|
5
|
+
L: 'text-m-title',
|
|
6
|
+
M: 'text-m-title-md',
|
|
7
|
+
S: 'text-m-title-xs',
|
|
8
|
+
'2XS': 'text-m-title-xs',
|
|
9
|
+
'3XS': 'text-m-title-xs',
|
|
10
|
+
};
|
|
11
|
+
export const Title = JSX(({ size = 'L', className, children, ...rest }) => {
|
|
12
|
+
const Tag = size === 'XL' || size === 'L' ? 'h1' : 'h2';
|
|
13
|
+
return (_jsx(Tag, { className: getClasses(SizeTableClass[size], className), ...rest, children: children }));
|
|
14
|
+
});
|
|
15
|
+
const getClasses = (...classes) => classes.filter(Boolean).join(' ');
|
|
16
|
+
//# sourceMappingURL=Title.mobile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Title.mobile.js","sourceRoot":"","sources":["../../../src/ui-kit/Title/Title.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,MAAM,CAAC,MAAM,cAAc,GAA8B;IACvD,EAAE,EAAE,cAAc;IAClB,CAAC,EAAE,cAAc;IACjB,CAAC,EAAE,iBAAiB;IACpB,CAAC,EAAE,iBAAiB;IACpB,KAAK,EAAE,iBAAiB;IACxB,KAAK,EAAE,iBAAiB;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAa,CAAC,EAAE,IAAI,GAAG,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACpF,MAAM,GAAG,GAAG,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACxD,OAAO,CACL,KAAC,GAAG,IAAC,SAAS,EAAE,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,KAAM,IAAI,YAClE,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,GAAG,CAAC,GAAG,OAA+B,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
'XL' = "text-title-lg",
|
|
3
|
-
'L' = "text-title",
|
|
4
|
-
'M' = "text-title-sm",
|
|
5
|
-
'S' = "text-title-xs",
|
|
6
|
-
'XS' = "text-title-xs",
|
|
7
|
-
'2XS' = "text-title-2xs",
|
|
8
|
-
'3XS' = "text-title-3xs"
|
|
9
|
-
}
|
|
10
|
-
export declare type TitleSize = keyof typeof SizeTableClass;
|
|
1
|
+
export declare type TitleSize = 'XL' | 'L' | 'M' | 'S' | '2XS' | '3XS';
|
|
11
2
|
export interface TitleProps extends Partial<HTMLHeadingElement> {
|
|
12
3
|
size?: TitleSize;
|
|
13
4
|
}
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
(function (SizeTableClass) {
|
|
3
|
-
SizeTableClass["XL"] = "text-title-lg";
|
|
4
|
-
SizeTableClass["L"] = "text-title";
|
|
5
|
-
SizeTableClass["M"] = "text-title-sm";
|
|
6
|
-
SizeTableClass["S"] = "text-title-xs";
|
|
7
|
-
SizeTableClass["XS"] = "text-title-xs";
|
|
8
|
-
SizeTableClass["2XS"] = "text-title-2xs";
|
|
9
|
-
SizeTableClass["3XS"] = "text-title-3xs";
|
|
10
|
-
})(SizeTableClass || (SizeTableClass = {}));
|
|
1
|
+
export {};
|
|
11
2
|
//# sourceMappingURL=TitleProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TitleProps.js","sourceRoot":"","sources":["../../../src/ui-kit/Title/TitleProps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TitleProps.js","sourceRoot":"","sources":["../../../src/ui-kit/Title/TitleProps.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redneckz/wildless-cms-uni-blocks",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.111",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ЦК",
|
|
@@ -14,11 +14,21 @@
|
|
|
14
14
|
"require": "./dist/index.js",
|
|
15
15
|
"types": "./lib/index.d.ts"
|
|
16
16
|
},
|
|
17
|
+
"./mobile": {
|
|
18
|
+
"import": "./mobile/lib/index.js",
|
|
19
|
+
"require": "./mobile/dist/index.js",
|
|
20
|
+
"types": "./mobile/lib/index.d.ts"
|
|
21
|
+
},
|
|
17
22
|
"./lib/*.js": {
|
|
18
23
|
"import": "./lib/*.js",
|
|
19
24
|
"require": "./dist/*.js",
|
|
20
25
|
"types": "./lib/*.d.ts"
|
|
21
26
|
},
|
|
27
|
+
"./mobile/lib/*.js": {
|
|
28
|
+
"import": "./mobile/lib/*.js",
|
|
29
|
+
"require": "./mobile/dist/*.js",
|
|
30
|
+
"types": "./mobile/lib/*.d.ts"
|
|
31
|
+
},
|
|
22
32
|
"./lib/common.css": "./lib/common.css",
|
|
23
33
|
"./fonts/ubuntu/*": "./fonts/ubuntu/*",
|
|
24
34
|
"./lib/content-page-repository": {
|
|
@@ -44,9 +54,13 @@
|
|
|
44
54
|
},
|
|
45
55
|
"files": [
|
|
46
56
|
"lib",
|
|
57
|
+
"mobile/lib",
|
|
47
58
|
"dist",
|
|
59
|
+
"mobile/dist",
|
|
48
60
|
"bundle",
|
|
61
|
+
"mobile/bundle",
|
|
49
62
|
"fonts",
|
|
63
|
+
"mobile/src",
|
|
50
64
|
"src"
|
|
51
65
|
],
|
|
52
66
|
"repository": {
|
|
@@ -57,14 +71,20 @@
|
|
|
57
71
|
},
|
|
58
72
|
"scripts": {
|
|
59
73
|
"start": "npm run cosmos",
|
|
60
|
-
"
|
|
74
|
+
"start:mobile": "npm run cosmos:mobile",
|
|
75
|
+
"prebuild": "rimraf ./mobile/src",
|
|
76
|
+
"build": "npm run build:lib && npm run build:commonjs && npm run bundle && npm run build:style && npm run build:design && npm run build:mobile && npm run build:design:mobile",
|
|
77
|
+
"prebuild:mobile": "rimraf ./mobile/src && node ./scripts/prebuild-mobile.js ./src ./mobile",
|
|
78
|
+
"build:mobile": "npm run --prefix ./mobile build",
|
|
61
79
|
"postbuild": "npm run size",
|
|
62
80
|
"build:design": "npm run cosmos:export || exit 0",
|
|
63
81
|
"postbuild:design": "copyfiles --up 1 \"./docs/**/*\" ./build || exit 0",
|
|
82
|
+
"build:design:mobile": "npm run cosmos:export:mobile || exit 0",
|
|
83
|
+
"postbuild:design:mobile": "copyfiles --up 1 \"./docs/mobile/**/*\" ./build || exit 0",
|
|
64
84
|
"build:lib": "rimraf ./lib && tsc --build --verbose",
|
|
65
85
|
"postbuild:lib": "replace-in-file --configFile=replace-config.lib.cjs --verbose",
|
|
66
|
-
"build:commonjs": "rimraf ./dist && tsc --module commonjs --noImplicitUseStrict --outDir dist",
|
|
67
|
-
"bundle": "rimraf ./bundle && rollup
|
|
86
|
+
"build:commonjs": "rimraf ./dist && tsc --module commonjs --noImplicitUseStrict --outDir ./dist",
|
|
87
|
+
"bundle": "rimraf ./bundle && rollup --config rollup.config.js && npm run build:schema",
|
|
68
88
|
"build:schema": "ts-json-schema-generator --path './src/**/*Content.ts' --additional-properties --unstable --validation-keywords enumNames --validation-keywords required --minify --no-type-check -o ./bundle/blocks.schema.json",
|
|
69
89
|
"postbuild:schema": "node ./scripts/sort-json-schema.js ./bundle/blocks.schema.json",
|
|
70
90
|
"build:style": "postcss ./src/**/*.css --env production --dir ./lib",
|
|
@@ -75,9 +95,13 @@
|
|
|
75
95
|
"test": "jest --coverage",
|
|
76
96
|
"precosmos": "npm run build:icons",
|
|
77
97
|
"cosmos": "cosmos",
|
|
98
|
+
"precosmos:mobile": "npm run build:icons",
|
|
99
|
+
"cosmos:mobile": "cosmos --config cosmos.config.mobile.json",
|
|
78
100
|
"precosmos:export": "npm run build:icons",
|
|
79
|
-
"cosmos:export": "cosmos-export",
|
|
80
|
-
"prepare": "husky install && npm run --prefix ./eslint-rules build || exit 0"
|
|
101
|
+
"cosmos:export": "rimraf ./build && cosmos-export",
|
|
102
|
+
"prepare": "husky install && npm run --prefix ./eslint-rules build || exit 0",
|
|
103
|
+
"precosmos:export:mobile": "npm run build:icons",
|
|
104
|
+
"cosmos:export:mobile": "rimraf ./build && cosmos-export --config cosmos.config.mobile.json"
|
|
81
105
|
},
|
|
82
106
|
"peerDependencies": {
|
|
83
107
|
"react": ">=16.8.0",
|
|
@@ -110,6 +134,7 @@
|
|
|
110
134
|
"husky": "^8.0.1",
|
|
111
135
|
"jest": "^28.1.3",
|
|
112
136
|
"lint-staged": "^13.0.1",
|
|
137
|
+
"npm-watch": "^0.11.0",
|
|
113
138
|
"postcss": "^8.4.14",
|
|
114
139
|
"postcss-cli": "^9.1.0",
|
|
115
140
|
"postcss-loader": "^7.0.0",
|
|
@@ -33,7 +33,7 @@ export const BaseTile = JSX<BaseTileProps>(
|
|
|
33
33
|
<div className={`font-sans flex flex-col grow h-full items-start`}>
|
|
34
34
|
{title && (
|
|
35
35
|
<Title
|
|
36
|
-
size={titleSize
|
|
36
|
+
size={getTitleSize(titleSize, className)}
|
|
37
37
|
className={`${TITLE_CLASSES} ${version === 'primary' ? 'text-primary-text' : ''}`}
|
|
38
38
|
>
|
|
39
39
|
{title}
|
|
@@ -63,7 +63,11 @@ export const BaseTile = JSX<BaseTileProps>(
|
|
|
63
63
|
},
|
|
64
64
|
);
|
|
65
65
|
|
|
66
|
-
function
|
|
66
|
+
function getTitleSize(titleSize, className = '') {
|
|
67
|
+
if (titleSize) {
|
|
68
|
+
return titleSize;
|
|
69
|
+
}
|
|
70
|
+
|
|
67
71
|
const colSpan = getColSpan(className);
|
|
68
72
|
if (colSpan <= 4) {
|
|
69
73
|
return 'S';
|
|
@@ -95,7 +99,7 @@ function renderButton({ icon, asSVG, ...button }: BaseTileIconButton, i: number)
|
|
|
95
99
|
return icon ? (
|
|
96
100
|
<Button
|
|
97
101
|
key={String(i)}
|
|
98
|
-
appendLeft={<Icon name={icon} asSVG width="24" height="24" />}
|
|
102
|
+
appendLeft={<Icon name={icon} asSVG={asSVG} width="24" height="24" />}
|
|
99
103
|
{...button}
|
|
100
104
|
/>
|
|
101
105
|
) : (
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { ExchangeRateTile } from './ExchangeRateTile/ExchangeRateTile';
|
|
2
|
-
import { Footer } from './Footer/Footer
|
|
3
|
-
import { Gallery } from './Gallery/Gallery
|
|
2
|
+
import { Footer } from './Footer/Footer';
|
|
3
|
+
import { Gallery } from './Gallery/Gallery';
|
|
4
4
|
import { Header } from './Header/Header';
|
|
5
5
|
import { Headline } from './Headline/Headline';
|
|
6
6
|
import { MobileAppTile } from './MobileAppTile/MobileAppTile';
|
|
7
7
|
import { Navigation } from './Navigation/Navigation';
|
|
8
8
|
import { PictureText } from './PictureText/PictureText';
|
|
9
9
|
import { Placeholder } from './Placeholder/Placeholder';
|
|
10
|
-
import { ProductBlock } from './ProductBlock/ProductBlock
|
|
10
|
+
import { ProductBlock } from './ProductBlock/ProductBlock';
|
|
11
11
|
import { ProductTile } from './ProductTile/ProductTile';
|
|
12
|
+
import { StepsBlock } from './StepsBlock/StepsBlock';
|
|
12
13
|
import { TextBlock } from './TextBlock/TextBlock';
|
|
13
14
|
import { Tile } from './Tile/Tile';
|
|
14
15
|
|
|
15
|
-
export const
|
|
16
|
+
export const Blocks = {
|
|
16
17
|
ExchangeRateTile,
|
|
17
18
|
Footer,
|
|
18
19
|
Gallery,
|
|
@@ -26,4 +27,5 @@ export const MobileBlocks = {
|
|
|
26
27
|
TextBlock,
|
|
27
28
|
Tile,
|
|
28
29
|
Navigation,
|
|
30
|
+
StepsBlock,
|
|
29
31
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { mobileContext } from '../../setup-fixture';
|
|
2
|
+
|
|
3
|
+
import type { ContentPageDef } from '../../types';
|
|
4
|
+
import { Blocks } from '../Blocks.mobile';
|
|
5
|
+
import { ContentPage } from './ContentPage';
|
|
6
|
+
import { toMobilePage } from './toMobilePage';
|
|
7
|
+
|
|
8
|
+
import data from './ContentPage.page.json';
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
default: (
|
|
12
|
+
<ContentPage
|
|
13
|
+
className="bg-secondary-text"
|
|
14
|
+
context={mobileContext}
|
|
15
|
+
blocksRegistry={Blocks}
|
|
16
|
+
data={toMobilePage(data as ContentPageDef)}
|
|
17
|
+
/>
|
|
18
|
+
),
|
|
19
|
+
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { context
|
|
1
|
+
import { context } from '../../setup-fixture';
|
|
2
2
|
|
|
3
3
|
import type { ContentPageDef } from '../../types';
|
|
4
4
|
import { Blocks } from '../Blocks';
|
|
5
|
-
import { MobileBlocks } from '../MobileBlocks';
|
|
6
5
|
import { BlockDecorator, ContentPage } from './ContentPage';
|
|
7
|
-
import { toMobilePage } from './toMobilePage';
|
|
8
6
|
|
|
9
7
|
import data from './ContentPage.page.json';
|
|
10
8
|
|
|
@@ -36,14 +34,6 @@ export default {
|
|
|
36
34
|
data={data as ContentPageDef}
|
|
37
35
|
/>
|
|
38
36
|
),
|
|
39
|
-
mobile: (
|
|
40
|
-
<ContentPage
|
|
41
|
-
className="bg-secondary-text"
|
|
42
|
-
context={mobileContext}
|
|
43
|
-
blocksRegistry={MobileBlocks}
|
|
44
|
-
data={toMobilePage(data as ContentPageDef)}
|
|
45
|
-
/>
|
|
46
|
-
),
|
|
47
37
|
editor: (
|
|
48
38
|
<div style={{ background: "url('grid.svg')", height: '100%' }}>
|
|
49
39
|
<ContentPage
|
|
@@ -53,19 +53,6 @@
|
|
|
53
53
|
"description": "Описание 4",
|
|
54
54
|
"href": "/credit-cards",
|
|
55
55
|
"items": ["Элемент списка 1", "Элемент списка 2", "Элемент списка 3"]
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"image": {
|
|
59
|
-
"format": "webp",
|
|
60
|
-
"size": {
|
|
61
|
-
"width": 140,
|
|
62
|
-
"height": 140
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"title": "Заголовок 5",
|
|
66
|
-
"description": "Описание 5",
|
|
67
|
-
"href": "/credit-cards",
|
|
68
|
-
"items": ["Элемент списка 1", "Элемент списка 2", "Элемент списка 3"]
|
|
69
56
|
}
|
|
70
57
|
]
|
|
71
58
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Picture } from '../../model/Picture';
|
|
2
2
|
import { context } from '../../setup-fixture';
|
|
3
3
|
import type { ButtonCommonProps } from '../../ui-kit/Button/Button';
|
|
4
|
-
import { Gallery
|
|
5
|
-
import {
|
|
4
|
+
import { Gallery } from './Gallery';
|
|
5
|
+
import type { GalleryProps } from './GalleryProps';
|
|
6
6
|
|
|
7
7
|
const image: Picture = {
|
|
8
8
|
src: 'money-1.png',
|
|
@@ -211,9 +211,4 @@ export default {
|
|
|
211
211
|
<Gallery className="col-span-12" {...onlyTitleProps} />
|
|
212
212
|
</div>
|
|
213
213
|
),
|
|
214
|
-
mobile: (
|
|
215
|
-
<div className="container grid grid-cols-12">
|
|
216
|
-
<MobileGallery className="col-span-12" {...defaultProps} />
|
|
217
|
-
</div>
|
|
218
|
-
),
|
|
219
214
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { GalleryProps } from './Gallery';
|
|
3
|
-
import type { GalleryCard } from './GalleryContent';
|
|
4
2
|
import { BlockItem } from '../../ui-kit/BlockItem/BlockItem';
|
|
5
3
|
import { Button } from '../../ui-kit/Button/Button';
|
|
6
4
|
import { Img } from '../../ui-kit/Img';
|
|
7
5
|
import { Title } from '../../ui-kit/Title/Title';
|
|
6
|
+
import type { GalleryCard } from './GalleryContent';
|
|
7
|
+
import type { GalleryProps } from './GalleryProps';
|
|
8
8
|
|
|
9
9
|
export const Gallery = JSX<GalleryProps>(({ title, description, cards = [], className }) => {
|
|
10
10
|
return (
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { GalleryContent } from './GalleryContent';
|
|
3
2
|
import { GalleryInner } from './GalleryInner';
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
export interface GalleryProps extends GalleryContent, UniBlockProps {}
|
|
3
|
+
import type { GalleryProps } from './GalleryProps';
|
|
7
4
|
|
|
8
5
|
export const Gallery = JSX<GalleryProps>((props) => <GalleryInner {...props} version="normal" />);
|
|
@@ -11,12 +11,9 @@ export interface GalleryCard {
|
|
|
11
11
|
/** @title Описание */
|
|
12
12
|
description?: string;
|
|
13
13
|
image?: Picture;
|
|
14
|
-
/** @title
|
|
14
|
+
/** @title Кнопка */
|
|
15
15
|
button?: BaseTileIconButton;
|
|
16
|
-
/**
|
|
17
|
-
* @title Список
|
|
18
|
-
* @minItems 4
|
|
19
|
-
*/
|
|
16
|
+
/** @title Список */
|
|
20
17
|
items?: string[];
|
|
21
18
|
version?: BlockVersion;
|
|
22
19
|
}
|
|
@@ -29,6 +26,9 @@ export interface GalleryContent {
|
|
|
29
26
|
title?: string;
|
|
30
27
|
/** @title Описание */
|
|
31
28
|
description?: string;
|
|
32
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* @title Карточки
|
|
31
|
+
* @minItems 4
|
|
32
|
+
*/
|
|
33
33
|
cards?: GalleryCard[];
|
|
34
34
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { UniBlockProps } from '../../types';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ProductBlockContent } from './ProductBlockContent';
|
|
4
4
|
import { ProductBlockInner } from './ProductBlockInner';
|
|
5
5
|
|
|
6
|
-
export interface ProductBlockProps extends
|
|
6
|
+
export interface ProductBlockProps extends ProductBlockContent, UniBlockProps {}
|
|
7
7
|
|
|
8
8
|
export const ProductBlock = JSX<ProductBlockProps>(
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|