@redneckz/wildless-cms-uni-blocks 0.3.0 → 0.3.3
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 +7 -2
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/ContentPage/normalizePage.d.ts +1 -1
- package/dist/components/ContentPage/normalizePage.js +3 -0
- package/dist/components/ContentPage/normalizePage.js.map +1 -1
- package/dist/components/ContentPage/normalizePage.mobile.d.ts +1 -1
- package/dist/components/ContentPage/normalizePage.mobile.js +3 -0
- package/dist/components/ContentPage/normalizePage.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +3 -1
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Gallery/GalleryContent.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocs.mobile.js +1 -1
- package/dist/components/LinkDocs/LinkDocs.mobile.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocsList.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocsListItem.js +1 -1
- package/dist/components/LinkDocs/LinkDocsListItem.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsListItem.mobile.js +1 -1
- package/dist/components/LinkDocs/LinkDocsListItem.mobile.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
- package/dist/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ContentPage/normalizePage.d.ts +1 -1
- package/lib/components/ContentPage/normalizePage.js +3 -0
- package/lib/components/ContentPage/normalizePage.js.map +1 -1
- package/lib/components/ContentPage/normalizePage.mobile.d.ts +1 -1
- package/lib/components/ContentPage/normalizePage.mobile.js +3 -0
- package/lib/components/ContentPage/normalizePage.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +3 -1
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Gallery/GalleryContent.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocs.mobile.js +1 -1
- package/lib/components/LinkDocs/LinkDocs.mobile.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocsList.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocsListItem.js +1 -1
- package/lib/components/LinkDocs/LinkDocsListItem.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsListItem.mobile.js +1 -1
- package/lib/components/LinkDocs/LinkDocsListItem.mobile.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
- package/lib/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +8 -3
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/ContentPage/normalizePage.d.ts +1 -1
- package/mobile/dist/components/ContentPage/normalizePage.js +3 -0
- package/mobile/dist/components/ContentPage/normalizePage.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +3 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContent.d.ts +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocs.js +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsList.d.ts +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsListItem.js +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsListItem.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
- package/mobile/lib/components/ContentPage/normalizePage.d.ts +1 -1
- package/mobile/lib/components/ContentPage/normalizePage.js +3 -0
- package/mobile/lib/components/ContentPage/normalizePage.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +3 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContent.d.ts +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocs.js +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsList.d.ts +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsListItem.js +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsListItem.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.d.ts +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
- package/mobile/src/components/ContentPage/normalizePage.ts +7 -1
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +3 -1
- package/mobile/src/components/Gallery/GalleryContent.ts +1 -1
- package/mobile/src/components/LinkDocs/LinkDocs.tsx +2 -2
- package/mobile/src/components/LinkDocs/LinkDocsContent.ts +1 -1
- package/mobile/src/components/LinkDocs/LinkDocsList.tsx +1 -1
- package/mobile/src/components/LinkDocs/LinkDocsListItem.tsx +1 -1
- package/mobile/src/components/LinkDocs/LinkDocsListItemBase.tsx +1 -1
- package/mobile/src/components/LinkDocs/LinkDocsVerticalList.tsx +1 -1
- package/package.json +4 -4
- package/src/components/ContentPage/normalizePage.mobile.ts +7 -1
- package/src/components/ContentPage/normalizePage.ts +7 -1
- package/src/components/Gallery/GalleryCardInner.tsx +3 -1
- package/src/components/Gallery/GalleryContent.ts +1 -1
- package/src/components/LinkDocs/LinkDocs.mobile.tsx +2 -2
- package/src/components/LinkDocs/LinkDocsContent.ts +1 -1
- package/src/components/LinkDocs/LinkDocsList.tsx +1 -1
- package/src/components/LinkDocs/LinkDocsListItem.mobile.tsx +1 -1
- package/src/components/LinkDocs/LinkDocsListItem.tsx +1 -1
- package/src/components/LinkDocs/LinkDocsListItemBase.tsx +1 -1
- package/src/components/LinkDocs/LinkDocsVerticalList.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizePage.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizePage.ts"],"names":[],"mappings":";;AACA,sCAAmC;AACnC,2DAAwD;AACxD,qDAAkD;AAElD,SAAgB,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"normalizePage.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizePage.ts"],"names":[],"mappings":";;AACA,sCAAmC;AACnC,2DAAwD;AACxD,qDAAkD;AAElD,SAAgB,aAAa,CAC3B,WAA8C;IAE9C,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,WAAW,CAAC;IAEtC,OAAO;QACL,GAAG,WAAW;QACd,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC;QAC/B,KAAK,EACH,KAAK;YACL,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CACvB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;gBACb,GAAG,GAAG;gBACN,CAAC,GAAG,CAAC,EAAE;oBACL,GAAG,KAAK,CAAC,GAAG,CAAC;oBACb,MAAM,EAAE,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;iBAC3C;aACF,CAAC,EACF,EAAE,CACH;KACJ,CAAC;AACJ,CAAC;AAzBD,sCAyBC;AAED,SAAS,eAAe,CAAC,MAAmB;IAC1C,OAAO,MAAM;QACX,EAAE,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,qCAAiB,EAAC,KAAK,EAAE,eAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC;SAC7E,GAAG,CAAC,+BAAc,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -6,7 +6,9 @@ const BlockItem_1 = require("../../ui-kit/BlockItem/BlockItem");
|
|
|
6
6
|
const Button_1 = require("../../ui-kit/Button/Button");
|
|
7
7
|
const Img_1 = require("../../ui-kit/Img/Img");
|
|
8
8
|
exports.GalleryCardInner = (0, uni_jsx_1.JSX)(({ title, description, image, items, button, version }) => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { children: [image?.src ? ((0, jsx_runtime_1.jsx)("div", { className: "flex justify-center", children: (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "mb-6", image: image }) })) : null, title && renderCardTitle(title, description, items), description ? (0, jsx_runtime_1.jsx)("div", { className: `font-normal text-sm mt-2`, children: description }) : null, items?.length ? ((0, jsx_runtime_1.jsx)("section", { className: `max-w-[308px] mt-2`, role: "list", children: items
|
|
9
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { children: [image?.src ? ((0, jsx_runtime_1.jsx)("div", { className: "flex justify-center", children: (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "mb-6", image: image }) })) : null, title && renderCardTitle(title, description, items), description ? (0, jsx_runtime_1.jsx)("div", { className: `font-normal text-sm mt-2`, children: description }) : null, items?.length ? ((0, jsx_runtime_1.jsx)("section", { className: `max-w-[308px] mt-2`, role: "list", children: items
|
|
10
|
+
.filter((item) => item?.text)
|
|
11
|
+
.map((item, i) => renderItem(item.text, i, version)) })) : null] }), button?.text && (0, jsx_runtime_1.jsx)(Button_1.Button, { className: "mt-6", ...button })] }));
|
|
10
12
|
});
|
|
11
13
|
function renderCardTitle(title, description, items) {
|
|
12
14
|
return ((0, jsx_runtime_1.jsx)("div", { className: `font-medium text-xl m-0 ${!description && !items?.length ? 'text-center' : ''}`, children: title }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GalleryCardInner.js","sourceRoot":"","sources":["../../../src/components/Gallery/GalleryCardInner.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,gEAA6D;AAC7D,uDAAoD;AACpD,8CAA2C;AAG9B,QAAA,gBAAgB,GAAG,IAAA,aAAG,EACjC,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;IACxD,OAAO,CACL,4CACE,4CACG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CACZ,gCAAK,SAAS,EAAC,qBAAqB,YAClC,uBAAC,SAAG,IAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,GAAI,GAClC,CACP,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,IAAI,eAAe,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,CAAC,EACnD,WAAW,CAAC,CAAC,CAAC,gCAAK,SAAS,EAAE,0BAA0B,YAAG,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,EACpF,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACf,oCAAS,SAAS,EAAE,oBAAoB,EAAE,IAAI,EAAC,MAAM,YAClD,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"GalleryCardInner.js","sourceRoot":"","sources":["../../../src/components/Gallery/GalleryCardInner.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,gEAA6D;AAC7D,uDAAoD;AACpD,8CAA2C;AAG9B,QAAA,gBAAgB,GAAG,IAAA,aAAG,EACjC,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;IACxD,OAAO,CACL,4CACE,4CACG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CACZ,gCAAK,SAAS,EAAC,qBAAqB,YAClC,uBAAC,SAAG,IAAC,S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../ui-kit/Heading/Heading");
|
|
|
6
6
|
const LinkDocsHorizontalList_1 = require("./LinkDocsHorizontalList");
|
|
7
7
|
const LinkDocsVerticalList_1 = require("./LinkDocsVerticalList");
|
|
8
8
|
exports.LinkDocs = (0, uni_jsx_1.JSX)(({ className = '', context, title, subtitle, icon = 'DocIconMonoColor', documents, listMode = 'vertical', hasBorder = true, }) => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsxs)("section", { className: `py-6 px-4 bg-white ${className}`, children: [title ? ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h2", className: `text-center ${subtitle ? 'mb-2' : 'mb-5'}`, title: title })) : null, subtitle ? (0, jsx_runtime_1.jsx)("h3", { className: "mb-5 text-center text-m-
|
|
9
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: `font-sans py-6 px-4 bg-white ${className}`, children: [title ? ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h2", className: `text-center ${subtitle ? 'mb-2' : 'mb-5'}`, title: title })) : null, subtitle ? (0, jsx_runtime_1.jsx)("h3", { className: "mb-5 text-center text-m-md", children: subtitle }) : null, listMode === 'vertical' ? ((0, jsx_runtime_1.jsx)(LinkDocsVerticalList_1.LinkDocsVerticalList, { hasBorder: hasBorder, documents: documents, icon: icon })) : ((0, jsx_runtime_1.jsx)(LinkDocsHorizontalList_1.LinkDocsHorizontalList, { context: context, hasBorder: hasBorder, documents: documents, icon: icon }))] }));
|
|
10
10
|
});
|
|
11
11
|
//# sourceMappingURL=LinkDocs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkDocs.js","sourceRoot":"","sources":["../../../src/components/LinkDocs/LinkDocs.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,0DAAuD;AAEvD,qEAAkE;AAClE,iEAA8D;AAIjD,QAAA,QAAQ,GAAG,IAAA,aAAG,EACzB,CAAC,EACC,SAAS,GAAG,EAAE,EACd,OAAO,EACP,KAAK,EACL,QAAQ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+1,5 @@
|
|
|
1
1
|
import type { LinkProps } from '../../model/LinkProps';
|
|
2
|
-
import type { IconName } from '../../
|
|
2
|
+
import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
3
3
|
import type { AlignType } from '../BaseTile/BaseTileProps';
|
|
4
4
|
/**
|
|
5
5
|
* @title Отображение списка
|
|
@@ -3,5 +3,5 @@ exports.LinkDocsListItem = void 0;
|
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const LinkDocsListItemBase_1 = require("./LinkDocsListItemBase");
|
|
6
|
-
exports.LinkDocsListItem = (0, uni_jsx_1.JSX)(({ className = '', doc, icon }) => ((0, jsx_runtime_1.jsx)(LinkDocsListItemBase_1.LinkDocsListItemBase, { className: `flex h-full ${className}`, iconClassName: "mr-
|
|
6
|
+
exports.LinkDocsListItem = (0, uni_jsx_1.JSX)(({ className = '', doc, icon }) => ((0, jsx_runtime_1.jsx)(LinkDocsListItemBase_1.LinkDocsListItemBase, { className: `flex h-full ${className}`, iconClassName: "mr-3 min-w-6 min-h-6", doc: doc, icon: icon })));
|
|
7
7
|
//# sourceMappingURL=LinkDocsListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkDocsListItem.js","sourceRoot":"","sources":["../../../src/components/LinkDocs/LinkDocsListItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iEAA8D;AAGjD,QAAA,gBAAgB,GAAG,IAAA,aAAG,EAAwB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAC5F,uBAAC,2CAAoB,IACnB,SAAS,EAAE,eAAe,SAAS,EAAE,EACrC,aAAa,EAAC,
|
|
1
|
+
{"version":3,"file":"LinkDocsListItem.js","sourceRoot":"","sources":["../../../src/components/LinkDocs/LinkDocsListItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iEAA8D;AAGjD,QAAA,gBAAgB,GAAG,IAAA,aAAG,EAAwB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAC5F,uBAAC,2CAAoB,IACnB,SAAS,EAAE,eAAe,SAAS,EAAE,EACrC,aAAa,EAAC,sBAAsB,EACpC,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,GACV,CACH,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ContentPageDef } from '../../types';
|
|
2
|
-
export declare function normalizePage(contentPage: ContentPageDef): ContentPageDef;
|
|
2
|
+
export declare function normalizePage(contentPage: ContentPageDef | undefined | null): ContentPageDef | undefined;
|
|
@@ -2,6 +2,9 @@ import { Blocks } from '../Blocks.js';
|
|
|
2
2
|
import { isBlockInRegistry } from './isBlockInRegistry.js';
|
|
3
3
|
import { normalizeBlock } from './normalizeBlock.js';
|
|
4
4
|
export function normalizePage(contentPage) {
|
|
5
|
+
if (!contentPage) {
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
5
8
|
const { blocks, slots } = contentPage;
|
|
6
9
|
return {
|
|
7
10
|
...contentPage,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizePage.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizePage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,UAAU,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"normalizePage.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizePage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,UAAU,aAAa,CAC3B,WAA8C;IAE9C,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,WAAW,CAAC;IAEtC,OAAO;QACL,GAAG,WAAW;QACd,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC;QAC/B,KAAK,EACH,KAAK;YACL,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CACvB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;gBACb,GAAG,GAAG;gBACN,CAAC,GAAG,CAAC,EAAE;oBACL,GAAG,KAAK,CAAC,GAAG,CAAC;oBACb,MAAM,EAAE,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;iBAC3C;aACF,CAAC,EACF,EAAE,CACH;KACJ,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,MAAmB;IAC1C,OAAO,MAAM;QACX,EAAE,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC;SAC7E,GAAG,CAAC,cAAc,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -4,7 +4,9 @@ import { BlockItem } from '../../ui-kit/BlockItem/BlockItem.js';
|
|
|
4
4
|
import { Button } from '../../ui-kit/Button/Button.js';
|
|
5
5
|
import { Img } from '../../ui-kit/Img/Img.js';
|
|
6
6
|
export const GalleryCardInner = JSX(({ title, description, image, items, button, version }) => {
|
|
7
|
-
return (_jsxs("div", { children: [_jsxs("div", { children: [image?.src ? (_jsx("div", { className: "flex justify-center", children: _jsx(Img, { className: "mb-6", image: image }) })) : null, title && renderCardTitle(title, description, items), description ? _jsx("div", { className: `font-normal text-sm mt-2`, children: description }) : null, items?.length ? (_jsx("section", { className: `max-w-[308px] mt-2`, role: "list", children: items
|
|
7
|
+
return (_jsxs("div", { children: [_jsxs("div", { children: [image?.src ? (_jsx("div", { className: "flex justify-center", children: _jsx(Img, { className: "mb-6", image: image }) })) : null, title && renderCardTitle(title, description, items), description ? _jsx("div", { className: `font-normal text-sm mt-2`, children: description }) : null, items?.length ? (_jsx("section", { className: `max-w-[308px] mt-2`, role: "list", children: items
|
|
8
|
+
.filter((item) => item?.text)
|
|
9
|
+
.map((item, i) => renderItem(item.text, i, version)) })) : null] }), button?.text && _jsx(Button, { className: "mt-6", ...button })] }));
|
|
8
10
|
});
|
|
9
11
|
function renderCardTitle(title, description, items) {
|
|
10
12
|
return (_jsx("div", { className: `font-medium text-xl m-0 ${!description && !items?.length ? 'text-center' : ''}`, children: title }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GalleryCardInner.js","sourceRoot":"","sources":["../../../src/components/Gallery/GalleryCardInner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAG3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CACjC,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;IACxD,OAAO,CACL,0BACE,0BACG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CACZ,cAAK,SAAS,EAAC,qBAAqB,YAClC,KAAC,GAAG,IAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,GAAI,GAClC,CACP,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,IA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AAoB,EAAE,IAAI,EAAC,MAAM,YAClD,KAAK;6BACH,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;6BAC5B,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAc,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,GACxD,CACX,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,MAAM,EAAE,IAAI,IAAI,KAAC,MAAM,IAAC,SAAS,EAAC,MAAM,KAAK,MAAM,GAAI,IACpD,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,eAAe,CAAC,KAAa,EAAE,WAAoB,EAAE,KAAqB;IACjF,OAAO,CACL,cACE,SAAS,EAAE,2BAA2B,CAAC,WAAW,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,YAE1F,KAAK,GACF,CACP,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,IAAY,EAAE,CAAS,EAAE,OAAsB;IACjE,OAAO,CACL,KAAC,SAAS,IAAiB,OAAO,EAAE,OAAO,IAAI,SAAS,YACtD,eAAM,SAAS,EAAC,SAAS,YAAE,IAAI,GAAQ,IADzB,MAAM,CAAC,CAAC,CAAC,CAEb,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -4,6 +4,6 @@ import { Heading } from '../../ui-kit/Heading/Heading.js';
|
|
|
4
4
|
import { LinkDocsHorizontalList } from './LinkDocsHorizontalList.js';
|
|
5
5
|
import { LinkDocsVerticalList } from './LinkDocsVerticalList.js';
|
|
6
6
|
export const LinkDocs = JSX(({ className = '', context, title, subtitle, icon = 'DocIconMonoColor', documents, listMode = 'vertical', hasBorder = true, }) => {
|
|
7
|
-
return (_jsxs("section", { className: `py-6 px-4 bg-white ${className}`, children: [title ? (_jsx(Heading, { headingType: "h2", className: `text-center ${subtitle ? 'mb-2' : 'mb-5'}`, title: title })) : null, subtitle ? _jsx("h3", { className: "mb-5 text-center text-m-
|
|
7
|
+
return (_jsxs("section", { className: `font-sans py-6 px-4 bg-white ${className}`, children: [title ? (_jsx(Heading, { headingType: "h2", className: `text-center ${subtitle ? 'mb-2' : 'mb-5'}`, title: title })) : null, subtitle ? _jsx("h3", { className: "mb-5 text-center text-m-md", children: subtitle }) : null, listMode === 'vertical' ? (_jsx(LinkDocsVerticalList, { hasBorder: hasBorder, documents: documents, icon: icon })) : (_jsx(LinkDocsHorizontalList, { context: context, hasBorder: hasBorder, documents: documents, icon: icon }))] }));
|
|
8
8
|
});
|
|
9
9
|
//# sourceMappingURL=LinkDocs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkDocs.js","sourceRoot":"","sources":["../../../src/components/LinkDocs/LinkDocs.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CACzB,CAAC,EACC,SAAS,GAAG,EAAE,EACd,OAAO,EACP,KAAK,EACL,QAAQ,EACR,IAAI,GAAG,kBAAkB,EACzB,SAAS,EACT,QAAQ,GAAG,UAAU,EACrB,SAAS,GAAG,IAAI,GACjB,EAAE,EAAE;IACH,OAAO,CACL,mBAAS,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"LinkDocs.js","sourceRoot":"","sources":["../../../src/components/LinkDocs/LinkDocs.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CACzB,CAAC,EACC,SAAS,GAAG,EAAE,EACd,OAAO,EACP,KAAK,EACL,QAAQ,EACR,IAAI,GAAG,kBAAkB,EACzB,SAAS,EACT,QAAQ,GAAG,UAAU,EACrB,SAAS,GAAG,IAAI,GACjB,EAAE,EAAE;IACH,OAAO,CACL,mBAAS,SAAS,EAAE,gCAAgC,SAAS,EAAE,aAC5D,KAAK,CAAC,CAAC,CAAC,CACP,KAAC,OAAO,IACN,WAAW,EAAC,IAAI,EAChB,SAAS,EAAE,eAAe,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EACtD,KAAK,EAAE,KAAK,GACZ,CACH,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,CAAC,CAAC,CAAC,aAAI,SAAS,EAAC,4BAA4B,YAAE,QAAQ,GAAM,CAAC,CAAC,CAAC,IAAI,EAC5E,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,CACzB,KAAC,oBAAoB,IAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,GAAI,CACjF,CAAC,CAAC,CAAC,CACF,KAAC,sBAAsB,IACrB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,GACV,CACH,IACO,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LinkProps } from '../../model/LinkProps';
|
|
2
|
-
import type { IconName } from '../../
|
|
2
|
+
import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
3
3
|
import type { AlignType } from '../BaseTile/BaseTileProps';
|
|
4
4
|
/**
|
|
5
5
|
* @title Отображение списка
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { LinkDocsListItemBase } from './LinkDocsListItemBase.js';
|
|
4
|
-
export const LinkDocsListItem = JSX(({ className = '', doc, icon }) => (_jsx(LinkDocsListItemBase, { className: `flex h-full ${className}`, iconClassName: "mr-
|
|
4
|
+
export const LinkDocsListItem = JSX(({ className = '', doc, icon }) => (_jsx(LinkDocsListItemBase, { className: `flex h-full ${className}`, iconClassName: "mr-3 min-w-6 min-h-6", doc: doc, icon: icon })));
|
|
5
5
|
//# sourceMappingURL=LinkDocsListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkDocsListItem.js","sourceRoot":"","sources":["../../../src/components/LinkDocs/LinkDocsListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAwB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAC5F,KAAC,oBAAoB,IACnB,SAAS,EAAE,eAAe,SAAS,EAAE,EACrC,aAAa,EAAC,
|
|
1
|
+
{"version":3,"file":"LinkDocsListItem.js","sourceRoot":"","sources":["../../../src/components/LinkDocs/LinkDocsListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAwB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAC5F,KAAC,oBAAoB,IACnB,SAAS,EAAE,eAAe,SAAS,EAAE,EACrC,aAAa,EAAC,sBAAsB,EACpC,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,GACV,CACH,CAAC,CAAC"}
|
|
@@ -3,7 +3,13 @@ import { Blocks } from '../Blocks';
|
|
|
3
3
|
import { isBlockInRegistry } from './isBlockInRegistry';
|
|
4
4
|
import { normalizeBlock } from './normalizeBlock';
|
|
5
5
|
|
|
6
|
-
export function normalizePage(
|
|
6
|
+
export function normalizePage(
|
|
7
|
+
contentPage: ContentPageDef | undefined | null,
|
|
8
|
+
): ContentPageDef | undefined {
|
|
9
|
+
if (!contentPage) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
const { blocks, slots } = contentPage;
|
|
8
14
|
|
|
9
15
|
return {
|
|
@@ -19,7 +19,9 @@ export const GalleryCardInner = JSX<GalleryCard>(
|
|
|
19
19
|
{description ? <div className={`font-normal text-sm mt-2`}>{description}</div> : null}
|
|
20
20
|
{items?.length ? (
|
|
21
21
|
<section className={`max-w-[308px] mt-2`} role="list">
|
|
22
|
-
{items
|
|
22
|
+
{items
|
|
23
|
+
.filter((item) => item?.text)
|
|
24
|
+
.map((item, i) => renderItem(item.text as string, i, version))}
|
|
23
25
|
</section>
|
|
24
26
|
) : null}
|
|
25
27
|
</div>
|
|
@@ -19,7 +19,7 @@ export const LinkDocs = JSX<LinkDocsProps>(
|
|
|
19
19
|
hasBorder = true,
|
|
20
20
|
}) => {
|
|
21
21
|
return (
|
|
22
|
-
<section className={`py-6 px-4 bg-white ${className}`}>
|
|
22
|
+
<section className={`font-sans py-6 px-4 bg-white ${className}`}>
|
|
23
23
|
{title ? (
|
|
24
24
|
<Heading
|
|
25
25
|
headingType="h2"
|
|
@@ -27,7 +27,7 @@ export const LinkDocs = JSX<LinkDocsProps>(
|
|
|
27
27
|
title={title}
|
|
28
28
|
/>
|
|
29
29
|
) : null}
|
|
30
|
-
{subtitle ? <h3 className="mb-5 text-center text-m-
|
|
30
|
+
{subtitle ? <h3 className="mb-5 text-center text-m-md">{subtitle}</h3> : null}
|
|
31
31
|
{listMode === 'vertical' ? (
|
|
32
32
|
<LinkDocsVerticalList hasBorder={hasBorder} documents={documents} icon={icon} />
|
|
33
33
|
) : (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { LinkDocsListItem } from './LinkDocsListItem';
|
|
3
|
-
import type { IconName } from '../../
|
|
3
|
+
import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
4
4
|
import type { LinkColumnsMode, LinkDocsItem } from './LinkDocsContent';
|
|
5
5
|
|
|
6
6
|
export interface LinkDocsListProps {
|
|
@@ -5,7 +5,7 @@ import type { LinkDocsListItemProps } from './LinkDocsListItemBase';
|
|
|
5
5
|
export const LinkDocsListItem = JSX<LinkDocsListItemProps>(({ className = '', doc, icon }) => (
|
|
6
6
|
<LinkDocsListItemBase
|
|
7
7
|
className={`flex h-full ${className}`}
|
|
8
|
-
iconClassName="mr-
|
|
8
|
+
iconClassName="mr-3 min-w-6 min-h-6"
|
|
9
9
|
doc={doc}
|
|
10
10
|
icon={icon}
|
|
11
11
|
/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
3
|
-
import type { IconName } from '../../
|
|
3
|
+
import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
4
4
|
import type { LinkDocsItem } from './LinkDocsContent';
|
|
5
5
|
|
|
6
6
|
export interface LinkDocsListItemProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { IconName } from '../../
|
|
2
|
+
import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
3
3
|
import type { LinkDocsItem } from './LinkDocsContent';
|
|
4
4
|
import { LinkDocsListItem } from './LinkDocsListItem';
|
|
5
5
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redneckz/wildless-cms-uni-blocks",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ЦК",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"prebuild:schema": "npm run build:icons",
|
|
90
90
|
"build:schema": "node ./scripts/build-schema.js ./bundle/blocks.schema.json",
|
|
91
91
|
"build:style": "postcss ./src/**/*.css --env production --dir ./lib",
|
|
92
|
-
"build:icons": "node ./scripts/prepare-icons.js ./src/icons ./cosmos-static/icons > ./src/icons/IconName.ts",
|
|
92
|
+
"build:icons": "rimraf ./cosmos-static/icons && node ./scripts/prepare-icons.js ./src/icons ./cosmos-static/icons > ./src/icons/IconName.ts",
|
|
93
93
|
"size": "size-limit",
|
|
94
94
|
"lint": "eslint ./src",
|
|
95
95
|
"pretest": "npm run lint",
|
|
@@ -168,8 +168,8 @@
|
|
|
168
168
|
],
|
|
169
169
|
"src/**/*.{js,jsx,ts,tsx,css}": [
|
|
170
170
|
"prettier --write",
|
|
171
|
-
"npm run
|
|
172
|
-
"git add ./
|
|
171
|
+
"npm run build:icons",
|
|
172
|
+
"git add ./cosmos-static/icons"
|
|
173
173
|
]
|
|
174
174
|
},
|
|
175
175
|
"peerDependenciesMeta": {
|
|
@@ -3,7 +3,13 @@ import { Blocks } from '../Blocks';
|
|
|
3
3
|
import { isBlockInRegistry } from './isBlockInRegistry';
|
|
4
4
|
import { normalizeBlock } from './normalizeBlock';
|
|
5
5
|
|
|
6
|
-
export function normalizePage(
|
|
6
|
+
export function normalizePage(
|
|
7
|
+
contentPage: ContentPageDef | undefined | null,
|
|
8
|
+
): ContentPageDef | undefined {
|
|
9
|
+
if (!contentPage) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
const { blocks, slots } = contentPage;
|
|
8
14
|
|
|
9
15
|
return {
|
|
@@ -3,7 +3,13 @@ import { Blocks } from '../Blocks';
|
|
|
3
3
|
import { isBlockInRegistry } from './isBlockInRegistry';
|
|
4
4
|
import { normalizeBlock } from './normalizeBlock';
|
|
5
5
|
|
|
6
|
-
export function normalizePage
|
|
6
|
+
export function normalizePage<T extends ContentPageDef | undefined | null>(
|
|
7
|
+
contentPage: T,
|
|
8
|
+
): T extends ContentPageDef ? ContentPageDef : ContentPageDef | undefined {
|
|
9
|
+
if (!contentPage) {
|
|
10
|
+
return undefined as any;
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
const { blocks, slots } = contentPage;
|
|
8
14
|
|
|
9
15
|
return {
|
|
@@ -19,7 +19,9 @@ export const GalleryCardInner = JSX<GalleryCard>(
|
|
|
19
19
|
{description ? <div className={`font-normal text-sm mt-2`}>{description}</div> : null}
|
|
20
20
|
{items?.length ? (
|
|
21
21
|
<section className={`max-w-[308px] mt-2`} role="list">
|
|
22
|
-
{items
|
|
22
|
+
{items
|
|
23
|
+
.filter((item) => item?.text)
|
|
24
|
+
.map((item, i) => renderItem(item.text as string, i, version))}
|
|
23
25
|
</section>
|
|
24
26
|
) : null}
|
|
25
27
|
</div>
|
|
@@ -19,7 +19,7 @@ export const LinkDocs = JSX<LinkDocsProps>(
|
|
|
19
19
|
hasBorder = true,
|
|
20
20
|
}) => {
|
|
21
21
|
return (
|
|
22
|
-
<section className={`py-6 px-4 bg-white ${className}`}>
|
|
22
|
+
<section className={`font-sans py-6 px-4 bg-white ${className}`}>
|
|
23
23
|
{title ? (
|
|
24
24
|
<Heading
|
|
25
25
|
headingType="h2"
|
|
@@ -27,7 +27,7 @@ export const LinkDocs = JSX<LinkDocsProps>(
|
|
|
27
27
|
title={title}
|
|
28
28
|
/>
|
|
29
29
|
) : null}
|
|
30
|
-
{subtitle ? <h3 className="mb-5 text-center text-m-
|
|
30
|
+
{subtitle ? <h3 className="mb-5 text-center text-m-md">{subtitle}</h3> : null}
|
|
31
31
|
{listMode === 'vertical' ? (
|
|
32
32
|
<LinkDocsVerticalList hasBorder={hasBorder} documents={documents} icon={icon} />
|
|
33
33
|
) : (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { LinkDocsListItem } from './LinkDocsListItem';
|
|
3
|
-
import type { IconName } from '../../
|
|
3
|
+
import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
4
4
|
import type { LinkColumnsMode, LinkDocsItem } from './LinkDocsContent';
|
|
5
5
|
|
|
6
6
|
export interface LinkDocsListProps {
|
|
@@ -5,7 +5,7 @@ import type { LinkDocsListItemProps } from './LinkDocsListItemBase';
|
|
|
5
5
|
export const LinkDocsListItem = JSX<LinkDocsListItemProps>(({ className = '', doc, icon }) => (
|
|
6
6
|
<LinkDocsListItemBase
|
|
7
7
|
className={`flex h-full ${className}`}
|
|
8
|
-
iconClassName="mr-
|
|
8
|
+
iconClassName="mr-3 min-w-6 min-h-6"
|
|
9
9
|
doc={doc}
|
|
10
10
|
icon={icon}
|
|
11
11
|
/>
|
|
@@ -5,7 +5,7 @@ import type { LinkDocsListItemProps } from './LinkDocsListItemBase';
|
|
|
5
5
|
export const LinkDocsListItem = JSX<LinkDocsListItemProps>(({ className = '', doc, icon }) => (
|
|
6
6
|
<LinkDocsListItemBase
|
|
7
7
|
className={className}
|
|
8
|
-
iconClassName="mr-
|
|
8
|
+
iconClassName="mr-2.5 min-w-6 min-h-6 text-primary-text"
|
|
9
9
|
textClassName="self-center"
|
|
10
10
|
suffixClassName="text-secondary-text group-hover:text-primary-main"
|
|
11
11
|
doc={doc}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
3
|
-
import type { IconName } from '../../
|
|
3
|
+
import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
4
4
|
import type { LinkDocsItem } from './LinkDocsContent';
|
|
5
5
|
|
|
6
6
|
export interface LinkDocsListItemProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { IconName } from '../../
|
|
2
|
+
import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
3
3
|
import type { LinkDocsItem } from './LinkDocsContent';
|
|
4
4
|
import { LinkDocsListItem } from './LinkDocsListItem';
|
|
5
5
|
|