@gravity-ui/page-constructor 8.1.2-alpha.0 → 8.2.0-alpha.0
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/build/cjs/components/Title/TitleItem.d.ts +2 -2
- package/build/cjs/components/Title/TitleItem.js +13 -3
- package/build/cjs/components/Title/TitleItem.js.map +1 -1
- package/build/cjs/demo/ComponentsControls.stories.d.ts +4 -0
- package/build/cjs/demo/ComponentsControls.stories.js +34 -0
- package/build/cjs/demo/ComponentsControls.stories.js.map +1 -0
- package/build/cjs/demo/ComponentsLayout.stories.css +13 -0
- package/build/cjs/demo/ComponentsLayout.stories.d.ts +4 -0
- package/build/cjs/demo/ComponentsLayout.stories.js +28 -0
- package/build/cjs/demo/ComponentsLayout.stories.js.map +1 -0
- package/build/cjs/demo/ComponentsText.stories.d.ts +4 -0
- package/build/cjs/demo/ComponentsText.stories.js +26 -0
- package/build/cjs/demo/ComponentsText.stories.js.map +1 -0
- package/build/cjs/demo/ContentAndData.stories.d.ts +8 -0
- package/build/cjs/demo/ContentAndData.stories.js +73 -0
- package/build/cjs/demo/ContentAndData.stories.js.map +1 -0
- package/build/cjs/demo/FeaturesAndCards.stories.d.ts +8 -0
- package/build/cjs/demo/FeaturesAndCards.stories.js +112 -0
- package/build/cjs/demo/FeaturesAndCards.stories.js.map +1 -0
- package/build/cjs/demo/HeroAndMedia.stories.d.ts +8 -0
- package/build/cjs/demo/HeroAndMedia.stories.js +58 -0
- package/build/cjs/demo/HeroAndMedia.stories.js.map +1 -0
- package/build/cjs/demo/InteractiveAndForms.stories.d.ts +8 -0
- package/build/cjs/demo/InteractiveAndForms.stories.js +83 -0
- package/build/cjs/demo/InteractiveAndForms.stories.js.map +1 -0
- package/build/cjs/models/constructor-items/common.d.ts +1 -1
- package/build/cjs/models/constructor-items/common.js.map +1 -1
- package/build/cjs/text-transform/config.d.ts +1 -0
- package/build/esm/components/Title/TitleItem.d.ts +2 -2
- package/build/esm/components/Title/TitleItem.js +13 -3
- package/build/esm/components/Title/TitleItem.js.map +1 -1
- package/build/esm/demo/ComponentsControls.stories.d.ts +4 -0
- package/build/esm/demo/ComponentsControls.stories.js +29 -0
- package/build/esm/demo/ComponentsControls.stories.js.map +1 -0
- package/build/esm/demo/ComponentsLayout.stories.css +13 -0
- package/build/esm/demo/ComponentsLayout.stories.d.ts +5 -0
- package/build/esm/demo/ComponentsLayout.stories.js +24 -0
- package/build/esm/demo/ComponentsLayout.stories.js.map +1 -0
- package/build/esm/demo/ComponentsText.stories.d.ts +4 -0
- package/build/esm/demo/ComponentsText.stories.js +21 -0
- package/build/esm/demo/ComponentsText.stories.js.map +1 -0
- package/build/esm/demo/ContentAndData.stories.d.ts +8 -0
- package/build/esm/demo/ContentAndData.stories.js +69 -0
- package/build/esm/demo/ContentAndData.stories.js.map +1 -0
- package/build/esm/demo/FeaturesAndCards.stories.d.ts +8 -0
- package/build/esm/demo/FeaturesAndCards.stories.js +108 -0
- package/build/esm/demo/FeaturesAndCards.stories.js.map +1 -0
- package/build/esm/demo/HeroAndMedia.stories.d.ts +8 -0
- package/build/esm/demo/HeroAndMedia.stories.js +54 -0
- package/build/esm/demo/HeroAndMedia.stories.js.map +1 -0
- package/build/esm/demo/InteractiveAndForms.stories.d.ts +8 -0
- package/build/esm/demo/InteractiveAndForms.stories.js +79 -0
- package/build/esm/demo/InteractiveAndForms.stories.js.map +1 -0
- package/build/esm/models/constructor-items/common.d.ts +1 -1
- package/build/esm/models/constructor-items/common.js.map +1 -1
- package/build/esm/text-transform/config.d.ts +1 -0
- package/package.json +1 -1
- package/server/models/constructor-items/common.d.ts +1 -1
- package/server/text-transform/config.d.ts +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { QAProps, TextSize, TitleItemProps } from "../../models/index.js";
|
|
1
|
+
import { AnalyticsEventsBase, QAProps, TextSize, TitleItemProps } from "../../models/index.js";
|
|
2
2
|
export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 20 | 24 | 13 | 22 | 26 | 38;
|
|
3
|
-
export interface TitleItemFullProps extends TitleItemProps, QAProps {
|
|
3
|
+
export interface TitleItemFullProps extends TitleItemProps, QAProps, AnalyticsEventsBase {
|
|
4
4
|
className?: string;
|
|
5
5
|
onClick?: () => void;
|
|
6
6
|
resetMargin?: boolean;
|
|
@@ -7,6 +7,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
7
7
|
const __1 = require("../index.js");
|
|
8
8
|
const locationContext_1 = require("../../context/locationContext/index.js");
|
|
9
9
|
const mobileContext_1 = require("../../context/mobileContext/index.js");
|
|
10
|
+
const hooks_1 = require("../../hooks/index.js");
|
|
10
11
|
const utils_1 = require("../../utils/index.js");
|
|
11
12
|
const Anchor_1 = tslib_1.__importDefault(require("../Anchor/Anchor.js"));
|
|
12
13
|
const b = (0, utils_1.block)('title-item');
|
|
@@ -27,21 +28,30 @@ function getArrowSize(size, isMobile) {
|
|
|
27
28
|
}
|
|
28
29
|
const TitleItem = (props) => {
|
|
29
30
|
const isMobile = React.useContext(mobileContext_1.MobileContext);
|
|
30
|
-
const { textSize = 'm', text, anchor, justify, url, onClick, custom, className, qa, resetMargin = true, urlTitle, } = props;
|
|
31
|
+
const { textSize = 'm', text, anchor, justify, url, onClick, custom, className, qa, resetMargin = true, urlTitle, analyticsEvents, } = props;
|
|
32
|
+
const handleAnalytics = (0, hooks_1.useAnalytics)();
|
|
31
33
|
const { hostname } = React.useContext(locationContext_1.LocationContext);
|
|
32
34
|
const textMarkup = ((0, jsx_runtime_1.jsxs)(React.Fragment, { children: [(0, jsx_runtime_1.jsx)(__1.YFMWrapper, { className: b('text'), contentClassName: b('text'), content: text, modifiers: {
|
|
33
35
|
constructor: true,
|
|
34
36
|
} }), custom && ((0, jsx_runtime_1.jsxs)(React.Fragment, { children: ["\u00A0", (0, jsx_runtime_1.jsx)("span", { className: b('custom'), children: custom })] }))] }));
|
|
35
37
|
let content;
|
|
36
38
|
const insideClickableContent = ((0, jsx_runtime_1.jsxs)("span", { className: b('wrapper'), children: [textMarkup, "\u00A0", (0, jsx_runtime_1.jsx)(__1.ToggleArrow, { className: b('arrow', { size: textSize }), size: getArrowSize(textSize, isMobile), type: 'horizontal', iconType: "navigation", open: false })] }));
|
|
39
|
+
const handleClick = () => {
|
|
40
|
+
if (analyticsEvents) {
|
|
41
|
+
handleAnalytics(analyticsEvents);
|
|
42
|
+
}
|
|
43
|
+
if (onClick) {
|
|
44
|
+
onClick();
|
|
45
|
+
}
|
|
46
|
+
};
|
|
37
47
|
if (!url && !onClick) {
|
|
38
48
|
content = textMarkup;
|
|
39
49
|
}
|
|
40
50
|
else if (url) {
|
|
41
|
-
content = ((0, jsx_runtime_1.jsx)("a", { className: b('link'), href: url, ...(0, utils_1.getLinkProps)(url, hostname), onClick:
|
|
51
|
+
content = ((0, jsx_runtime_1.jsx)("a", { className: b('link'), href: url, ...(0, utils_1.getLinkProps)(url, hostname), onClick: handleClick, title: urlTitle, children: insideClickableContent }));
|
|
42
52
|
}
|
|
43
53
|
else if (onClick) {
|
|
44
|
-
content = ((0, jsx_runtime_1.jsx)("button", { className: b('link'), onClick:
|
|
54
|
+
content = ((0, jsx_runtime_1.jsx)("button", { className: b('link'), onClick: handleClick, title: urlTitle, children: insideClickableContent }));
|
|
45
55
|
}
|
|
46
56
|
return ((0, jsx_runtime_1.jsxs)(React.Fragment, { children: [anchor && (0, jsx_runtime_1.jsx)(Anchor_1.default, { id: anchor, className: b('anchor') }), React.createElement((0, utils_1.getHeaderTag)(textSize), {
|
|
47
57
|
className: b({ size: textSize, justify, 'reset-margin': resetMargin }, className),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TitleItem.js","sourceRoot":"../../../../src","sources":["components/Title/TitleItem.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"TitleItem.js","sourceRoot":"../../../../src","sources":["components/Title/TitleItem.tsx"],"names":[],"mappings":";;AAcA,oCAcC;;;AA5BD,qDAA+B;AAE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,sBAAsB,GAClB,CACZ,CAAC;IACN,CAAC;IAED,OAAO,CACH,wBAAC,KAAK,CAAC,QAAQ,eACV,MAAM,IAAI,uBAAC,gBAAM,IAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAI,EACxD,KAAK,CAAC,aAAa,CAChB,IAAA,oBAAY,EAAC,QAAQ,CAAC,EACtB;gBACI,SAAS,EAAE,CAAC,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAC,EAAE,SAAS,CAAC;gBAC/E,SAAS,EAAE,GAAG,EAAE,SAAS;aAC5B,EACD,OAAO,CACV,IACY,CACpB,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {ToggleArrow, YFMWrapper} from '../';\nimport {LocationContext} from '../../context/locationContext';\nimport {MobileContext} from '../../context/mobileContext';\nimport {useAnalytics} from '../../hooks';\nimport {AnalyticsEventsBase, QAProps, TextSize, TitleItemProps} from '../../models';\nimport {block, getHeaderTag, getLinkProps} from '../../utils';\nimport Anchor from '../Anchor/Anchor';\n\nimport './TitleItem.scss';\n\nconst b = block('title-item');\n\nexport function getArrowSize(size: TextSize, isMobile: boolean) {\n switch (size) {\n case 'xs':\n return 13;\n case 's':\n return 16;\n case 'sm':\n case 'm':\n return isMobile ? 22 : 24;\n case 'l':\n return isMobile ? 26 : 38;\n default:\n return 20;\n }\n}\n\nexport interface TitleItemFullProps extends TitleItemProps, QAProps, AnalyticsEventsBase {\n className?: string;\n onClick?: () => void;\n resetMargin?: boolean;\n}\n\nconst TitleItem = (props: TitleItemFullProps) => {\n const isMobile = React.useContext(MobileContext);\n\n const {\n textSize = 'm',\n text,\n anchor,\n justify,\n url,\n onClick,\n custom,\n className,\n qa,\n resetMargin = true,\n urlTitle,\n analyticsEvents,\n } = props;\n\n const handleAnalytics = useAnalytics();\n\n const {hostname} = React.useContext(LocationContext);\n const textMarkup = (\n <React.Fragment>\n <YFMWrapper\n className={b('text')}\n contentClassName={b('text')}\n content={text}\n modifiers={{\n constructor: true,\n }}\n />\n {custom && (\n <React.Fragment>\n \n <span className={b('custom')}>{custom}</span>\n </React.Fragment>\n )}\n </React.Fragment>\n );\n let content: React.ReactNode;\n\n const insideClickableContent = (\n <span className={b('wrapper')}>\n {textMarkup}\n \n <ToggleArrow\n className={b('arrow', {size: textSize})}\n size={getArrowSize(textSize, isMobile)}\n type={'horizontal'}\n iconType=\"navigation\"\n open={false}\n />\n </span>\n );\n\n const handleClick = () => {\n if (analyticsEvents) {\n handleAnalytics(analyticsEvents);\n }\n\n if (onClick) {\n onClick();\n }\n };\n\n if (!url && !onClick) {\n content = textMarkup;\n } else if (url) {\n content = (\n <a\n className={b('link')}\n href={url}\n {...getLinkProps(url, hostname)}\n onClick={handleClick}\n title={urlTitle}\n >\n {insideClickableContent}\n </a>\n );\n } else if (onClick) {\n content = (\n <button className={b('link')} onClick={handleClick} title={urlTitle}>\n {insideClickableContent}\n </button>\n );\n }\n\n return (\n <React.Fragment>\n {anchor && <Anchor id={anchor} className={b('anchor')} />}\n {React.createElement(\n getHeaderTag(textSize),\n {\n className: b({size: textSize, justify, 'reset-margin': resetMargin}, className),\n 'data-qa': `${qa}-header`,\n },\n content,\n )}\n </React.Fragment>\n );\n};\n\nexport default TitleItem;\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Default = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const React = tslib_1.__importStar(require("react"));
|
|
7
|
+
const BackLink_1 = tslib_1.__importDefault(require("../components/BackLink/BackLink.js"));
|
|
8
|
+
const Button_1 = tslib_1.__importDefault(require("../components/Button/Button.js"));
|
|
9
|
+
const Control_1 = tslib_1.__importDefault(require("../components/Control/Control.js"));
|
|
10
|
+
const FileLink_1 = tslib_1.__importDefault(require("../components/FileLink/FileLink.js"));
|
|
11
|
+
const HeaderBreadcrumbs_1 = tslib_1.__importDefault(require("../components/HeaderBreadcrumbs/HeaderBreadcrumbs.js"));
|
|
12
|
+
const Link_1 = tslib_1.__importDefault(require("../components/Link/Link.js"));
|
|
13
|
+
const ToggleArrow_1 = tslib_1.__importDefault(require("../components/ToggleArrow/ToggleArrow.js"));
|
|
14
|
+
const data_json_1 = tslib_1.__importDefault(require("../components/BackLink/__stories__/data.json"));
|
|
15
|
+
const data_json_2 = tslib_1.__importDefault(require("../components/Button/__stories__/data.json"));
|
|
16
|
+
const data_json_3 = tslib_1.__importDefault(require("../components/Control/__stories__/data.json"));
|
|
17
|
+
const data_json_4 = tslib_1.__importDefault(require("../components/FileLink/__stories__/data.json"));
|
|
18
|
+
const data_json_5 = tslib_1.__importDefault(require("../components/HeaderBreadcrumbs/__stories__/data.json"));
|
|
19
|
+
const data_json_6 = tslib_1.__importDefault(require("../components/Link/__stories__/data.json"));
|
|
20
|
+
const data_json_7 = tslib_1.__importDefault(require("../components/ToggleArrow/__stories__/data.json"));
|
|
21
|
+
exports.default = { title: 'Lab/Tokenization/Components/Controls' };
|
|
22
|
+
const LINK_THEMES = ['normal', 'underline', 'back', 'file-link'];
|
|
23
|
+
const CONTROL_THEMES = ['primary', 'secondary', 'link', 'accent'];
|
|
24
|
+
const CONTROL_SIZES = ['xs', 's', 'm', 'l'];
|
|
25
|
+
const FILE_EXTENSIONS = ['example.pdf', 'example.doc', 'example.xls', 'example.ppt', 'example.zip'];
|
|
26
|
+
const Default = () => ((0, jsx_runtime_1.jsxs)("div", { style: { padding: '40px', display: 'flex', flexDirection: 'column', gap: '48px' }, children: [(0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Button \u2014 default" }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '8px' }, children: (0, jsx_runtime_1.jsx)(Button_1.default, { ...data_json_2.default.default }) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Button \u2014 width (max / auto)" }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '8px', display: 'flex', flexDirection: 'column', gap: '8px' }, children: data_json_2.default.width.map((item, index) => ((0, jsx_runtime_1.jsx)(Button_1.default, { ...item }, index))) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Link \u2014 themes" }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '8px', display: 'flex', gap: '24px', flexWrap: 'wrap' }, children: LINK_THEMES.map((theme) => ((0, jsx_runtime_1.jsx)(Link_1.default, { text: `${theme}`, url: "#", theme: theme }, theme))) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Link \u2014 with arrow (s / m / l)" }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '8px', display: 'flex', flexDirection: 'column', gap: '8px' }, children: data_json_6.default.normalArrows.map((item, index) => ((0, jsx_runtime_1.jsx)(Link_1.default, { ...item }, index))) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "BackLink" }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '8px' }, children: (0, jsx_runtime_1.jsx)(BackLink_1.default, { ...data_json_1.default.default.content }) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "FileLink \u2014 default" }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '8px' }, children: (0, jsx_runtime_1.jsx)(FileLink_1.default, { ...data_json_4.default.default.content }) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "FileLink \u2014 horizontal / vertical" }), (0, jsx_runtime_1.jsxs)("div", { style: { marginTop: '8px', display: 'flex', gap: '24px' }, children: [(0, jsx_runtime_1.jsx)(FileLink_1.default, { ...data_json_4.default.typesThemes.content, type: "horizontal" }), (0, jsx_runtime_1.jsx)(FileLink_1.default, { ...data_json_4.default.typesThemes.content, type: "vertical" })] })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "FileLink \u2014 extensions" }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '8px', display: 'flex', gap: '16px', flexWrap: 'wrap' }, children: FILE_EXTENSIONS.map((href) => ((0, jsx_runtime_1.jsx)(FileLink_1.default, { href: href, text: "Link to file" }, href))) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Control \u2014 themes \u00D7 sizes" }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
27
|
+
marginTop: '8px',
|
|
28
|
+
display: 'grid',
|
|
29
|
+
gridTemplateColumns: 'auto repeat(4, 40px)',
|
|
30
|
+
gap: '8px',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
}, children: [(0, jsx_runtime_1.jsx)("span", {}), CONTROL_SIZES.map((size) => ((0, jsx_runtime_1.jsx)("span", { style: { fontSize: '12px', textAlign: 'center' }, children: size }, size))), CONTROL_THEMES.map((theme) => ((0, jsx_runtime_1.jsxs)(React.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { style: { fontSize: '12px' }, children: theme }), CONTROL_SIZES.map((size) => ((0, jsx_runtime_1.jsx)(Control_1.default, { ...data_json_3.default.sizesThemes.content, theme: theme, size: size }, `${theme}-${size}`)))] }, theme)))] })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "ToggleArrow \u2014 closed / open" }), (0, jsx_runtime_1.jsxs)("div", { style: { marginTop: '8px', display: 'flex', gap: '24px', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)(ToggleArrow_1.default, { ...data_json_7.default.vertical.content }), (0, jsx_runtime_1.jsx)(ToggleArrow_1.default, { ...data_json_7.default.vertical.content, open: true }), (0, jsx_runtime_1.jsx)(ToggleArrow_1.default, { ...data_json_7.default.horizontal.content }), (0, jsx_runtime_1.jsx)(ToggleArrow_1.default, { ...data_json_7.default.horizontal.content, open: true })] })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "HeaderBreadcrumbs" }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '8px' }, children: (0, jsx_runtime_1.jsx)(HeaderBreadcrumbs_1.default, { ...data_json_5.default.default.content }) })] })] }));
|
|
33
|
+
exports.Default = Default;
|
|
34
|
+
//# sourceMappingURL=ComponentsControls.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentsControls.stories.js","sourceRoot":"../../../src","sources":["demo/ComponentsControls.stories.tsx"],"names":[],"mappings":";;;;;AAAA,qDAA+B;AAI/B,0FAAwE;AACxE,oFAAgE;AAChE,uFAAoE;AACpE,0FAAuD;AACvD,qHAAkF;AAClF,8EAA4D;AAC5D,mGAAoF;AAGpF,qGAAwE;AACxE,mGAAoE;AACpE,oGAAsE;AACtE,qGAAwE;AACxE,8GAA0F;AAC1F,iGAAgE;AAChE,wGAA8E;AAE9E,kBAAe,EAAC,KAAK,EAAE,sCAAsC,EAAS,CAAC;AAEvE,MAAM,WAAW,GAA6B,CAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;AAC3F,MAAM,cAAc,GAA4B,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC3F,MAAM,aAAa,GAA2B,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACpE,MAAM,eAAe,GAAG,CAAC,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC;AAE7F,MAAM,OAAO,GAAY,GAAG,EAAE,CAAC,CAClC,iCAAK,KAAK,EAAE,EAAC,OAAO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EAAE,QAAQ,EAAC,YAC1D,IAAI,IADE,IAAI,CAER,CACV,CAAC,EACD,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC3B,wBAAC,KAAK,CAAC,QAAQ,eACX,iCAAM,KAAK,EAAE,EAAC,QAAQ,EAAE,MAAM,EAAC,YAAG,KAAK,GAAQ,EAC9C,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACzB,uBAAC,iBAAO,OAEC,mBAAW,CAAC,WAAW,CAAC,OAAwB,EACrD,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,IAHL,GAAG,KAAK,IAAI,IAAI,EAAE,CAIzB,CACL,CAAC,KATe,KAAK,CAUT,CACpB,CAAC,IACA,IACA,EACV,gDACI,kFAA4C,EAC5C,iCAAK,KAAK,EAAE,EAAC,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAC,aAC9E,uBAAC,qBAAW,OAAM,mBAAe,CAAC,QAAQ,CAAC,OAA4B,GAAI,EAC3E,uBAAC,qBAAW,OAAM,mBAAe,CAAC,QAAQ,CAAC,OAA4B,EAAE,IAAI,SAAG,EAChF,uBAAC,qBAAW,OAAM,mBAAe,CAAC,UAAU,CAAC,OAA4B,GAAI,EAC7E,uBAAC,qBAAW,OAAM,mBAAe,CAAC,UAAU,CAAC,OAA4B,EAAE,IAAI,SAAG,IAChF,IACA,EACV,gDACI,mEAAkC,EAClC,gCAAK,KAAK,EAAE,EAAC,SAAS,EAAE,KAAK,EAAC,YAC1B,uBAAC,2BAAiB,OACT,mBAAqB,CAAC,OAAO,CAAC,OAAkC,GACvE,GACA,IACA,IACR,CACT,CAAC;AAnHW,QAAA,OAAO,WAmHlB","sourcesContent":["import * as React from 'react';\n\nimport {Meta, StoryFn} from '@storybook/react';\n\nimport BackLink, {BackLinkProps} from '../components/BackLink/BackLink';\nimport Button, {ButtonProps} from '../components/Button/Button';\nimport Control, {ControlProps} from '../components/Control/Control';\nimport FileLink from '../components/FileLink/FileLink';\nimport HeaderBreadcrumbs from '../components/HeaderBreadcrumbs/HeaderBreadcrumbs';\nimport Link, {LinkFullProps} from '../components/Link/Link';\nimport ToggleArrow, {ToggleArrowProps} from '../components/ToggleArrow/ToggleArrow';\nimport {FileLinkProps, HeaderBreadCrumbsProps} from '../models';\n\nimport backLinkData from '../components/BackLink/__stories__/data.json';\nimport buttonData from '../components/Button/__stories__/data.json';\nimport controlData from '../components/Control/__stories__/data.json';\nimport fileLinkData from '../components/FileLink/__stories__/data.json';\nimport headerBreadcrumbsData from '../components/HeaderBreadcrumbs/__stories__/data.json';\nimport linkData from '../components/Link/__stories__/data.json';\nimport toggleArrowData from '../components/ToggleArrow/__stories__/data.json';\n\nexport default {title: 'Lab/Tokenization/Components/Controls'} as Meta;\n\nconst LINK_THEMES: LinkFullProps['theme'][] = ['normal', 'underline', 'back', 'file-link'];\nconst CONTROL_THEMES: ControlProps['theme'][] = ['primary', 'secondary', 'link', 'accent'];\nconst CONTROL_SIZES: ControlProps['size'][] = ['xs', 's', 'm', 'l'];\nconst FILE_EXTENSIONS = ['example.pdf', 'example.doc', 'example.xls', 'example.ppt', 'example.zip'];\n\nexport const Default: StoryFn = () => (\n <div style={{padding: '40px', display: 'flex', flexDirection: 'column', gap: '48px'}}>\n <section>\n <strong>Button — default</strong>\n <div style={{marginTop: '8px'}}>\n <Button {...buttonData.default} />\n </div>\n </section>\n <section>\n <strong>Button — width (max / auto)</strong>\n <div style={{marginTop: '8px', display: 'flex', flexDirection: 'column', gap: '8px'}}>\n {(buttonData.width as ButtonProps[]).map((item, index) => (\n <Button key={index} {...item} />\n ))}\n </div>\n </section>\n <section>\n <strong>Link — themes</strong>\n <div style={{marginTop: '8px', display: 'flex', gap: '24px', flexWrap: 'wrap'}}>\n {LINK_THEMES.map((theme) => (\n <Link key={theme} text={`${theme}`} url=\"#\" theme={theme} />\n ))}\n </div>\n </section>\n <section>\n <strong>Link — with arrow (s / m / l)</strong>\n <div style={{marginTop: '8px', display: 'flex', flexDirection: 'column', gap: '8px'}}>\n {(linkData.normalArrows as LinkFullProps[]).map((item, index) => (\n <Link key={index} {...item} />\n ))}\n </div>\n </section>\n <section>\n <strong>BackLink</strong>\n <div style={{marginTop: '8px'}}>\n <BackLink {...(backLinkData.default.content as BackLinkProps)} />\n </div>\n </section>\n <section>\n <strong>FileLink — default</strong>\n <div style={{marginTop: '8px'}}>\n <FileLink {...fileLinkData.default.content} />\n </div>\n </section>\n <section>\n <strong>FileLink — horizontal / vertical</strong>\n <div style={{marginTop: '8px', display: 'flex', gap: '24px'}}>\n <FileLink\n {...(fileLinkData.typesThemes.content as FileLinkProps)}\n type=\"horizontal\"\n />\n <FileLink\n {...(fileLinkData.typesThemes.content as FileLinkProps)}\n type=\"vertical\"\n />\n </div>\n </section>\n <section>\n <strong>FileLink — extensions</strong>\n <div style={{marginTop: '8px', display: 'flex', gap: '16px', flexWrap: 'wrap'}}>\n {FILE_EXTENSIONS.map((href) => (\n <FileLink key={href} href={href} text=\"Link to file\" />\n ))}\n </div>\n </section>\n <section>\n <strong>Control — themes × sizes</strong>\n <div\n style={{\n marginTop: '8px',\n display: 'grid',\n gridTemplateColumns: 'auto repeat(4, 40px)',\n gap: '8px',\n alignItems: 'center',\n }}\n >\n <span />\n {CONTROL_SIZES.map((size) => (\n <span key={size} style={{fontSize: '12px', textAlign: 'center'}}>\n {size}\n </span>\n ))}\n {CONTROL_THEMES.map((theme) => (\n <React.Fragment key={theme}>\n <span style={{fontSize: '12px'}}>{theme}</span>\n {CONTROL_SIZES.map((size) => (\n <Control\n key={`${theme}-${size}`}\n {...(controlData.sizesThemes.content as ControlProps)}\n theme={theme}\n size={size}\n />\n ))}\n </React.Fragment>\n ))}\n </div>\n </section>\n <section>\n <strong>ToggleArrow — closed / open</strong>\n <div style={{marginTop: '8px', display: 'flex', gap: '24px', alignItems: 'center'}}>\n <ToggleArrow {...(toggleArrowData.vertical.content as ToggleArrowProps)} />\n <ToggleArrow {...(toggleArrowData.vertical.content as ToggleArrowProps)} open />\n <ToggleArrow {...(toggleArrowData.horizontal.content as ToggleArrowProps)} />\n <ToggleArrow {...(toggleArrowData.horizontal.content as ToggleArrowProps)} open />\n </div>\n </section>\n <section>\n <strong>HeaderBreadcrumbs</strong>\n <div style={{marginTop: '8px'}}>\n <HeaderBreadcrumbs\n {...(headerBreadcrumbsData.default.content as HeaderBreadCrumbsProps)}\n />\n </div>\n </section>\n </div>\n);\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Default = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const BalancedMasonry_1 = tslib_1.__importDefault(require("../components/BalancedMasonry/BalancedMasonry.js"));
|
|
7
|
+
const CardBase_1 = tslib_1.__importDefault(require("../components/CardBase/CardBase.js"));
|
|
8
|
+
const ErrorWrapper_1 = tslib_1.__importDefault(require("../components/ErrorWrapper/ErrorWrapper.js"));
|
|
9
|
+
const FullWidthBackground_1 = tslib_1.__importDefault(require("../components/FullWidthBackground/FullWidthBackground.js"));
|
|
10
|
+
const Table_1 = tslib_1.__importDefault(require("../components/Table/Table.js"));
|
|
11
|
+
const UnpublishedLabel_1 = tslib_1.__importDefault(require("../components/UnpublishedLabel/UnpublishedLabel.js"));
|
|
12
|
+
const constants_1 = require("../constants.js");
|
|
13
|
+
const data_json_1 = tslib_1.__importDefault(require("../components/BalancedMasonry/__stories__/data.json"));
|
|
14
|
+
const data_json_2 = tslib_1.__importDefault(require("../components/ErrorWrapper/__stories__/data.json"));
|
|
15
|
+
const data_json_3 = tslib_1.__importDefault(require("../components/FullWidthBackground/__stories__/data.json"));
|
|
16
|
+
const data_json_4 = tslib_1.__importDefault(require("../components/Table/__stories__/data.json"));
|
|
17
|
+
const data_json_5 = tslib_1.__importDefault(require("../components/UnpublishedLabel/__stories__/data.json"));
|
|
18
|
+
const masonryBreakpointCols = {
|
|
19
|
+
[constants_1.BREAKPOINTS.xs]: 1,
|
|
20
|
+
[constants_1.BREAKPOINTS.sm]: 2,
|
|
21
|
+
[constants_1.BREAKPOINTS.md]: 2,
|
|
22
|
+
[constants_1.BREAKPOINTS.lg]: 3,
|
|
23
|
+
[constants_1.BREAKPOINTS.xl]: 3,
|
|
24
|
+
};
|
|
25
|
+
exports.default = { title: 'Lab/Tokenization/Components/Layout' };
|
|
26
|
+
const Default = () => ((0, jsx_runtime_1.jsxs)("div", { style: { padding: '40px', display: 'flex', flexDirection: 'column', gap: '48px' }, children: [(0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "FullWidthBackground \u2014 default" }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '8px', height: '100px' }, children: (0, jsx_runtime_1.jsx)(FullWidthBackground_1.default, { ...data_json_3.default.default, children: (0, jsx_runtime_1.jsx)("div", { style: { padding: '40px', color: 'white' }, children: "Content" }) }) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "FullWidthBackground \u2014 rounded" }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '8px', height: '100px' }, children: (0, jsx_runtime_1.jsx)(FullWidthBackground_1.default, { ...data_json_3.default.rounded, children: (0, jsx_runtime_1.jsx)("div", { style: { padding: '40px', color: 'white' }, children: "Content" }) }) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "BalancedMasonry" }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '8px' }, children: (0, jsx_runtime_1.jsx)(BalancedMasonry_1.default, { className: "demo-balanced-masonry", columnClassName: "demo-balanced-masonry-column", breakpointCols: masonryBreakpointCols, children: data_json_1.default.default.content.children.map((text, index) => ((0, jsx_runtime_1.jsx)(CardBase_1.default, { className: "demo-balanced-masonry-card", children: (0, jsx_runtime_1.jsx)(CardBase_1.default.Content, { children: text }) }, index))) }) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Table \u2014 default" }), (0, jsx_runtime_1.jsx)(Table_1.default, { ...data_json_4.default.default.content })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Table \u2014 tick markers" }), (0, jsx_runtime_1.jsx)(Table_1.default, { ...data_json_4.default.tick.content })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "UnpublishedLabel (label)" }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '8px' }, children: (0, jsx_runtime_1.jsx)(UnpublishedLabel_1.default, { ...data_json_5.default.label.content }) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "UnpublishedLabel (line)" }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '8px' }, children: (0, jsx_runtime_1.jsx)(UnpublishedLabel_1.default, { ...data_json_5.default.line.content }) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "ErrorWrapper (error state)" }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '8px' }, children: (0, jsx_runtime_1.jsx)(ErrorWrapper_1.default, { ...data_json_2.default.default.content, handler: () => { }, children: data_json_2.default.default.content.children }) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "ErrorWrapper (no error)" }), (0, jsx_runtime_1.jsx)("div", { style: { marginTop: '8px' }, children: (0, jsx_runtime_1.jsx)(ErrorWrapper_1.default, { ...data_json_2.default.noError.content, handler: () => { }, children: data_json_2.default.noError.content.children }) })] })] }));
|
|
27
|
+
exports.Default = Default;
|
|
28
|
+
//# sourceMappingURL=ComponentsLayout.stories.js.map
|
|
@@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Q,GAC/B,GACb,IACA,EACV,gDACI,yEAAwC,EACxC,gCAAK,KAAK,EAAE,EAAC,SAAS,EAAE,KAAK,EAAC,YAC1B,uBAAC,sBAAY,OAAK,mBAAgB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,YAChE,mBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,GAC/B,GACb,IACA,IACR,CACT,CAAC;AA/EW,QAAA,OAAO,WA+ElB","sourcesContent":["import {Meta, StoryFn} from '@storybook/react';\n\nimport BalancedMasonry, {BalancedMasonryProps} from '../components/BalancedMasonry/BalancedMasonry';\nimport CardBase from '../components/CardBase/CardBase';\nimport ErrorWrapper from '../components/ErrorWrapper/ErrorWrapper';\nimport FullWidthBackground, {\n FullWidthBackgroundProps,\n} from '../components/FullWidthBackground/FullWidthBackground';\nimport Table from '../components/Table/Table';\nimport UnpublishedLabel, {\n UnpublishedLabelProps,\n} from '../components/UnpublishedLabel/UnpublishedLabel';\nimport {BREAKPOINTS} from '../constants';\nimport {TableProps} from '../models';\n\nimport balancedMasonryData from '../components/BalancedMasonry/__stories__/data.json';\nimport errorWrapperData from '../components/ErrorWrapper/__stories__/data.json';\nimport fullWidthBackgroundData from '../components/FullWidthBackground/__stories__/data.json';\nimport tableData from '../components/Table/__stories__/data.json';\nimport unpublishedLabelData from '../components/UnpublishedLabel/__stories__/data.json';\n\nimport './ComponentsLayout.stories.scss';\n\nconst masonryBreakpointCols: BalancedMasonryProps['breakpointCols'] = {\n [BREAKPOINTS.xs]: 1,\n [BREAKPOINTS.sm]: 2,\n [BREAKPOINTS.md]: 2,\n [BREAKPOINTS.lg]: 3,\n [BREAKPOINTS.xl]: 3,\n};\n\nexport default {title: 'Lab/Tokenization/Components/Layout'} as Meta;\n\nexport const Default: StoryFn = () => (\n <div style={{padding: '40px', display: 'flex', flexDirection: 'column', gap: '48px'}}>\n <section>\n <strong>FullWidthBackground — default</strong>\n <div style={{marginTop: '8px', height: '100px'}}>\n <FullWidthBackground\n {...(fullWidthBackgroundData.default as FullWidthBackgroundProps)}\n >\n <div style={{padding: '40px', color: 'white'}}>Content</div>\n </FullWidthBackground>\n </div>\n </section>\n <section>\n <strong>FullWidthBackground — rounded</strong>\n <div style={{marginTop: '8px', height: '100px'}}>\n <FullWidthBackground\n {...(fullWidthBackgroundData.rounded as FullWidthBackgroundProps)}\n >\n <div style={{padding: '40px', color: 'white'}}>Content</div>\n </FullWidthBackground>\n </div>\n </section>\n <section>\n <strong>BalancedMasonry</strong>\n <div style={{marginTop: '8px'}}>\n <BalancedMasonry\n className=\"demo-balanced-masonry\"\n columnClassName=\"demo-balanced-masonry-column\"\n breakpointCols={masonryBreakpointCols}\n >\n {balancedMasonryData.default.content.children.map((text, index) => (\n <CardBase key={index} className=\"demo-balanced-masonry-card\">\n <CardBase.Content>{text}</CardBase.Content>\n </CardBase>\n ))}\n </BalancedMasonry>\n </div>\n </section>\n <section>\n <strong>Table — default</strong>\n <Table {...(tableData.default.content as TableProps)} />\n </section>\n <section>\n <strong>Table — tick markers</strong>\n <Table {...(tableData.tick.content as TableProps)} />\n </section>\n <section>\n <strong>UnpublishedLabel (label)</strong>\n <div style={{marginTop: '8px'}}>\n <UnpublishedLabel\n {...(unpublishedLabelData.label.content as UnpublishedLabelProps)}\n />\n </div>\n </section>\n <section>\n <strong>UnpublishedLabel (line)</strong>\n <div style={{marginTop: '8px'}}>\n <UnpublishedLabel\n {...(unpublishedLabelData.line.content as UnpublishedLabelProps)}\n />\n </div>\n </section>\n <section>\n <strong>ErrorWrapper (error state)</strong>\n <div style={{marginTop: '8px'}}>\n <ErrorWrapper {...errorWrapperData.default.content} handler={() => {}}>\n {errorWrapperData.default.content.children}\n </ErrorWrapper>\n </div>\n </section>\n <section>\n <strong>ErrorWrapper (no error)</strong>\n <div style={{marginTop: '8px'}}>\n <ErrorWrapper {...errorWrapperData.noError.content} handler={() => {}}>\n {errorWrapperData.noError.content.children}\n </ErrorWrapper>\n </div>\n </section>\n </div>\n);\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Default = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const utils_1 = require("../../.storybook/utils.js");
|
|
7
|
+
const Author_1 = tslib_1.__importDefault(require("../components/Author/Author.js"));
|
|
8
|
+
const ContentList_1 = tslib_1.__importDefault(require("../components/ContentList/ContentList.js"));
|
|
9
|
+
const MetaInfo_1 = tslib_1.__importDefault(require("../components/MetaInfo/MetaInfo.js"));
|
|
10
|
+
const Title_1 = tslib_1.__importDefault(require("../components/Title/Title.js"));
|
|
11
|
+
const YFMWrapper_1 = tslib_1.__importDefault(require("../components/YFMWrapper/YFMWrapper.js"));
|
|
12
|
+
const models_1 = require("../models/index.js");
|
|
13
|
+
const data_json_1 = tslib_1.__importDefault(require("../components/Author/__stories__/data.json"));
|
|
14
|
+
const data_json_2 = tslib_1.__importDefault(require("../components/ContentList/__stories__/data.json"));
|
|
15
|
+
const data_json_3 = tslib_1.__importDefault(require("../components/MetaInfo/__stories__/data.json"));
|
|
16
|
+
const data_json_4 = tslib_1.__importDefault(require("../components/Title/__stories__/data.json"));
|
|
17
|
+
const data_json_5 = tslib_1.__importDefault(require("../components/YFMWrapper/__stories__/data.json"));
|
|
18
|
+
exports.default = { title: 'Lab/Tokenization/Components/Text' };
|
|
19
|
+
const defaultTitleArgs = {
|
|
20
|
+
...data_json_4.default.default.content,
|
|
21
|
+
subtitle: (0, utils_1.yfmTransform)(data_json_4.default.default.content.subtitle),
|
|
22
|
+
};
|
|
23
|
+
const transformContentList = (item) => (0, utils_1.blockTransform)(item);
|
|
24
|
+
const Default = () => ((0, jsx_runtime_1.jsxs)("div", { style: { padding: '40px', display: 'flex', flexDirection: 'column', gap: '48px' }, children: [(0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Title \u2014 default" }), (0, jsx_runtime_1.jsx)(Title_1.default, { ...defaultTitleArgs })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Title \u2014 sizes (l \u2192 xs)" }), (0, jsx_runtime_1.jsx)("div", { children: Object.entries(data_json_4.default.sizes).map(([size, props]) => ((0, jsx_runtime_1.jsx)("div", { style: { paddingBottom: '32px' }, children: (0, jsx_runtime_1.jsx)(Title_1.default, { ...defaultTitleArgs, title: props }) }, size))) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Title \u2014 with link" }), (0, jsx_runtime_1.jsx)(Title_1.default, { ...defaultTitleArgs, title: data_json_4.default.titleLink.content.title })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "YFMWrapper" }), (0, jsx_runtime_1.jsx)(YFMWrapper_1.default, { ...data_json_5.default.default.content })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Author \u2014 column" }), (0, jsx_runtime_1.jsx)(Author_1.default, { ...data_json_1.default.default.content })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Author \u2014 line" }), (0, jsx_runtime_1.jsx)(Author_1.default, { ...data_json_1.default.default.content, type: models_1.AuthorType.Line })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "ContentList \u2014 default" }), (0, jsx_runtime_1.jsx)(ContentList_1.default, { ...transformContentList(data_json_2.default.default) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "ContentList \u2014 without icon" }), (0, jsx_runtime_1.jsx)(ContentList_1.default, { ...transformContentList(data_json_2.default.withoutIcon) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "ContentList \u2014 sizes (s / m / l)" }), (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flexDirection: 'column', gap: '16px' }, children: data_json_2.default.sizes.map((item, index) => ((0, jsx_runtime_1.jsx)(ContentList_1.default, { ...transformContentList(item) }, index))) })] }), (0, jsx_runtime_1.jsxs)("section", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "MetaInfo" }), (0, jsx_runtime_1.jsx)(MetaInfo_1.default, { ...data_json_3.default.default.content })] })] }));
|
|
25
|
+
exports.Default = Default;
|
|
26
|
+
//# sourceMappingURL=ComponentsText.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentsText.stories.js","sourceRoot":"../../../src","sources":["demo/ComponentsText.stories.tsx"],"names":[],"mappings":";;;;;AAEA,qDAAoE;AACpE,oFAAiD;AACjD,mGAAgE;AAChE,0FAAuD;AACvD,iFAA8C;AAC9C,gGAA6D;AAC7D,+CAAoF;AAEpF,mGAAoE;AACpE,wGAA8E;AAC9E,qGAAwE;AACxE,kGAAkE;AAClE,uGAA4E;AAE5E,kBAAe,EAAC,KAAK,EAAE,kCAAkC,EAAS,CAAC;AAEnE,MAAM,gBAAgB,GAAG;IACrB,GAAG,mBAAS,CAAC,OAAO,CAAC,OAAO;IAC5B,QAAQ,EAAE,IAAA,oBAAY,EAAC,mBAAS,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC;CAC7D,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,IAAa,EAAE,EAAE,CAC3C,IAAA,sBAAc,EAAC,IAA8B,CAAqB,CAAC;AAEhE,MAAM,OAAO,GAAY,GAAG,EAAE,CAAC,CAClC,iCAAK,KAAK,EAAE,EAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAC,aAChF,gDACI,sEAAgC,EAChC,uBAAC,eAAK,OAAK,gBAAg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AAK,CAAoC,CAC9D,CAAC,GACA,IACA,EACV,gDACI,0DAAyB,EACzB,uBAAC,kBAAQ,OAAK,mBAAY,CAAC,OAAO,CAAC,OAAO,GAAI,IACxC,IACR,CACT,CAAC;AAxDW,QAAA,OAAO,WAwDlB","sourcesContent":["import {Meta, StoryFn} from '@storybook/react';\n\nimport {blockTransform, yfmTransform} from '../../.storybook/utils';\nimport Author from '../components/Author/Author';\nimport ContentList from '../components/ContentList/ContentList';\nimport MetaInfo from '../components/MetaInfo/MetaInfo';\nimport Title from '../components/Title/Title';\nimport YFMWrapper from '../components/YFMWrapper/YFMWrapper';\nimport {AuthorType, ContentListProps, CustomBlock, TitleItemProps} from '../models';\n\nimport authorData from '../components/Author/__stories__/data.json';\nimport contentListData from '../components/ContentList/__stories__/data.json';\nimport metaInfoData from '../components/MetaInfo/__stories__/data.json';\nimport titleData from '../components/Title/__stories__/data.json';\nimport yfmWrapperData from '../components/YFMWrapper/__stories__/data.json';\n\nexport default {title: 'Lab/Tokenization/Components/Text'} as Meta;\n\nconst defaultTitleArgs = {\n ...titleData.default.content,\n subtitle: yfmTransform(titleData.default.content.subtitle),\n};\n\nconst transformContentList = (item: unknown) =>\n blockTransform(item as unknown as CustomBlock) as ContentListProps;\n\nexport const Default: StoryFn = () => (\n <div style={{padding: '40px', display: 'flex', flexDirection: 'column', gap: '48px'}}>\n <section>\n <strong>Title — default</strong>\n <Title {...defaultTitleArgs} />\n </section>\n <section>\n <strong>Title — sizes (l → xs)</strong>\n <div>\n {Object.entries(titleData.sizes).map(([size, props]) => (\n <div key={size} style={{paddingBottom: '32px'}}>\n <Title {...defaultTitleArgs} title={props as TitleItemProps} />\n </div>\n ))}\n </div>\n </section>\n <section>\n <strong>Title — with link</strong>\n <Title\n {...defaultTitleArgs}\n title={titleData.titleLink.content.title as TitleItemProps}\n />\n </section>\n <section>\n <strong>YFMWrapper</strong>\n <YFMWrapper {...yfmWrapperData.default.content} />\n </section>\n <section>\n <strong>Author — column</strong>\n <Author {...authorData.default.content} />\n </section>\n <section>\n <strong>Author — line</strong>\n <Author {...authorData.default.content} type={AuthorType.Line} />\n </section>\n <section>\n <strong>ContentList — default</strong>\n <ContentList {...transformContentList(contentListData.default)} />\n </section>\n <section>\n <strong>ContentList — without icon</strong>\n <ContentList {...transformContentList(contentListData.withoutIcon)} />\n </section>\n <section>\n <strong>ContentList — sizes (s / m / l)</strong>\n <div style={{display: 'flex', flexDirection: 'column', gap: '16px'}}>\n {contentListData.sizes.map((item, index) => (\n <ContentList key={index} {...transformContentList(item)} />\n ))}\n </div>\n </section>\n <section>\n <strong>MetaInfo</strong>\n <MetaInfo {...metaInfoData.default.content} />\n </section>\n </div>\n);\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { CustomConfig, NavigationData } from "../models/index.js";
|
|
3
|
+
declare const _default: Meta;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: import("@storybook/core/csf", { with: { "resolution-mode": "import" } }).AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
|
|
6
|
+
navigation: NavigationData;
|
|
7
|
+
custom?: CustomConfig;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Default = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const utils_1 = require("../../.storybook/utils.js");
|
|
7
|
+
const PageConstructor_1 = require("../containers/PageConstructor/index.js");
|
|
8
|
+
const CustomComponent_1 = require("../navigation/__stories__/CustomComponent/CustomComponent.js");
|
|
9
|
+
const data_json_1 = tslib_1.__importDefault(require("../blocks/ContentLayout/__stories__/data.json"));
|
|
10
|
+
const data_json_2 = tslib_1.__importDefault(require("../blocks/FoldableList/__stories__/data.json"));
|
|
11
|
+
const data_json_3 = tslib_1.__importDefault(require("../blocks/Questions/__stories__/data.json"));
|
|
12
|
+
const data_json_4 = tslib_1.__importDefault(require("../blocks/Table/__stories__/data.json"));
|
|
13
|
+
const data_json_5 = tslib_1.__importDefault(require("../blocks/Tabs/__stories__/data.json"));
|
|
14
|
+
const data_json_6 = tslib_1.__importDefault(require("../navigation/__stories__/data.json"));
|
|
15
|
+
exports.default = {
|
|
16
|
+
title: 'Lab/Tokenization/Blocks/ContentAndData',
|
|
17
|
+
component: PageConstructor_1.PageConstructor,
|
|
18
|
+
};
|
|
19
|
+
const Template = ({ navigation, custom = {}, }) => ((0, jsx_runtime_1.jsx)(PageConstructor_1.PageConstructor, { navigation: navigation, custom: custom, content: {
|
|
20
|
+
blocks: [
|
|
21
|
+
// content-layout-block: default text only
|
|
22
|
+
(0, utils_1.blockTransform)(data_json_1.default.default),
|
|
23
|
+
// content-layout-block: centered
|
|
24
|
+
(0, utils_1.blockTransform)(data_json_1.default.textAlignCenter),
|
|
25
|
+
// content-layout-block: with background color
|
|
26
|
+
(0, utils_1.blockTransform)(data_json_1.default.withBackgroundColor),
|
|
27
|
+
// content-layout-block: with background image + color
|
|
28
|
+
(0, utils_1.blockTransform)(data_json_1.default.withImageAndBackgroundColor),
|
|
29
|
+
// content-layout-block: dark monochrome theme
|
|
30
|
+
(0, utils_1.blockTransform)(data_json_1.default.theme[0]),
|
|
31
|
+
// content-layout-block: light monochrome theme
|
|
32
|
+
(0, utils_1.blockTransform)(data_json_1.default.theme[1]),
|
|
33
|
+
// content-layout-block variants with list/links/buttons
|
|
34
|
+
...data_json_1.default.contentVariables.map(utils_1.blockTransform),
|
|
35
|
+
// tabs-block: default (all tab types: image, video, youtube)
|
|
36
|
+
(0, utils_1.blockTransform)(data_json_5.default.default.content),
|
|
37
|
+
// questions-block: default with links
|
|
38
|
+
(0, utils_1.blockTransform)(data_json_3.default.default.content),
|
|
39
|
+
// questions-block: with bullet list items
|
|
40
|
+
(0, utils_1.blockTransform)(data_json_3.default.textWithListBullet.content),
|
|
41
|
+
// foldable-list-block: default
|
|
42
|
+
(0, utils_1.blockTransform)(data_json_2.default.default),
|
|
43
|
+
// foldable-list-block: with bullet list items
|
|
44
|
+
(0, utils_1.blockTransform)(data_json_2.default.textWithListBullet),
|
|
45
|
+
// foldable-list-block: with dash list items
|
|
46
|
+
(0, utils_1.blockTransform)(data_json_2.default.textWithListDash),
|
|
47
|
+
// table-block: numeric values (0/1)
|
|
48
|
+
(0, utils_1.blockTransform)(data_json_4.default.default.content),
|
|
49
|
+
// table-block: tick markers
|
|
50
|
+
(0, utils_1.blockTransform)(data_json_4.default.tick.content),
|
|
51
|
+
],
|
|
52
|
+
} }));
|
|
53
|
+
exports.Default = Template.bind({});
|
|
54
|
+
exports.Default.args = {
|
|
55
|
+
custom: {
|
|
56
|
+
navigation: {
|
|
57
|
+
'custom-item': CustomComponent_1.CustomComponent,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
navigation: {
|
|
61
|
+
...data_json_6.default.navigation,
|
|
62
|
+
header: {
|
|
63
|
+
...data_json_6.default.navigation.header,
|
|
64
|
+
rightItems: [
|
|
65
|
+
...data_json_6.default.navigation.header.rightItems,
|
|
66
|
+
{
|
|
67
|
+
type: 'custom-item',
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=ContentAndData.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentAndData.stories.js","sourceRoot":"../../../src","sources":["demo/ContentAndData.stories.tsx"],"names":[],"mappings":";;;;;AAEA,qDAAsD;AACtD,4EAA8D;AAE9D,kGAA0F;AAE1F,sGAA8E;AAC9E,qGAA4E;AAC5E,kGAAsE;AACtE,8FAA8D;AAC9D,6FAA4D;AAC5D,4FAA0D;AAE1D,kBAAe;IACX,KAAK,EAAE,wCAAwC;IAC/C,SAAS,EAAE,iCAAe;CACrB,CAAC;AAEV,MAAM,QAA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,4BAA4B;YAC5B,IAAA,sBAAc,EAAC,mBAAS,CAAC,IAAI,CAAC,OAAO,CAAC;SACzC;KACW,GAEtB,CACL,CAAC;AAEW,QAAA,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,eAAO,CAAC,IAAI,GAAG;IACX,MAAM,EAAE;QACJ,UAAU,EAAE;YACR,aAAa,EAAE,iCAAe;SACjC;KACJ;IACD,UAAU,EAAE;QACR,GAAG,mBAAO,CAAC,UAAU;QACrB,MAAM,EAAE;YACJ,GAAG,mBAAO,CAAC,UAAU,CAAC,MAAM;YAC5B,UAAU,EAAE;gBACR,GAAG,mBAAO,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU;gBACvC;oBACI,IAAI,EAAE,aAAa;iBACtB;aACJ;SACJ;KACc;CACtB,CAAC","sourcesContent":["import {Meta, StoryFn} from '@storybook/react';\n\nimport {blockTransform} from '../../.storybook/utils';\nimport {PageConstructor} from '../containers/PageConstructor';\nimport {CustomConfig, NavigationData, PageContent} from '../models';\nimport {CustomComponent} from '../navigation/__stories__/CustomComponent/CustomComponent';\n\nimport contentLayoutData from '../blocks/ContentLayout/__stories__/data.json';\nimport foldableListData from '../blocks/FoldableList/__stories__/data.json';\nimport questionsData from '../blocks/Questions/__stories__/data.json';\nimport tableData from '../blocks/Table/__stories__/data.json';\nimport tabsData from '../blocks/Tabs/__stories__/data.json';\nimport navData from '../navigation/__stories__/data.json';\n\nexport default {\n title: 'Lab/Tokenization/Blocks/ContentAndData',\n component: PageConstructor,\n} as Meta;\n\nconst Template: StoryFn<{navigation: NavigationData; custom?: CustomConfig}> = ({\n navigation,\n custom = {},\n}) => (\n <PageConstructor\n navigation={navigation}\n custom={custom}\n content={\n {\n blocks: [\n // content-layout-block: default text only\n blockTransform(contentLayoutData.default),\n // content-layout-block: centered\n blockTransform(contentLayoutData.textAlignCenter),\n // content-layout-block: with background color\n blockTransform(contentLayoutData.withBackgroundColor),\n // content-layout-block: with background image + color\n blockTransform(contentLayoutData.withImageAndBackgroundColor),\n // content-layout-block: dark monochrome theme\n blockTransform(contentLayoutData.theme[0]),\n // content-layout-block: light monochrome theme\n blockTransform(contentLayoutData.theme[1]),\n // content-layout-block variants with list/links/buttons\n ...contentLayoutData.contentVariables.map(blockTransform),\n\n // tabs-block: default (all tab types: image, video, youtube)\n blockTransform(tabsData.default.content),\n\n // questions-block: default with links\n blockTransform(questionsData.default.content),\n // questions-block: with bullet list items\n blockTransform(questionsData.textWithListBullet.content),\n\n // foldable-list-block: default\n blockTransform(foldableListData.default),\n // foldable-list-block: with bullet list items\n blockTransform(foldableListData.textWithListBullet),\n // foldable-list-block: with dash list items\n blockTransform(foldableListData.textWithListDash),\n\n // table-block: numeric values (0/1)\n blockTransform(tableData.default.content),\n // table-block: tick markers\n blockTransform(tableData.tick.content),\n ],\n } as PageContent\n }\n />\n);\n\nexport const Default = Template.bind({});\nDefault.args = {\n custom: {\n navigation: {\n 'custom-item': CustomComponent,\n },\n },\n navigation: {\n ...navData.navigation,\n header: {\n ...navData.navigation.header,\n rightItems: [\n ...navData.navigation.header.rightItems,\n {\n type: 'custom-item',\n },\n ],\n },\n } as NavigationData,\n};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { CustomConfig, NavigationData } from "../models/index.js";
|
|
3
|
+
declare const _default: Meta;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: import("@storybook/core/csf", { with: { "resolution-mode": "import" } }).AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
|
|
6
|
+
navigation: NavigationData;
|
|
7
|
+
custom?: CustomConfig;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Default = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const utils_1 = require("../../.storybook/utils.js");
|
|
7
|
+
const PageConstructor_1 = require("../containers/PageConstructor/index.js");
|
|
8
|
+
const data_json_1 = tslib_1.__importDefault(require("../blocks/CardLayout/__stories__/data.json"));
|
|
9
|
+
const data_json_2 = tslib_1.__importDefault(require("../blocks/ExtendedFeatures/__stories__/data.json"));
|
|
10
|
+
const data_json_3 = tslib_1.__importDefault(require("../blocks/HeaderSlider/__stories__/data.json"));
|
|
11
|
+
const data_json_4 = tslib_1.__importDefault(require("../blocks/PromoFeaturesBlock/__stories__/data.json"));
|
|
12
|
+
const data_json_5 = tslib_1.__importDefault(require("../blocks/Slider/__stories__/data.json"));
|
|
13
|
+
const data_json_6 = tslib_1.__importDefault(require("../navigation/__stories__/data.json"));
|
|
14
|
+
exports.default = {
|
|
15
|
+
title: 'Lab/Tokenization/Blocks/FeaturesAndCards',
|
|
16
|
+
component: PageConstructor_1.PageConstructor,
|
|
17
|
+
};
|
|
18
|
+
const Template = ({ navigation, custom = {}, }) => ((0, jsx_runtime_1.jsx)(PageConstructor_1.PageConstructor, { navigation: navigation, custom: custom, content: {
|
|
19
|
+
blocks: [
|
|
20
|
+
// promo-features-block: default theme
|
|
21
|
+
(0, utils_1.blockTransform)({
|
|
22
|
+
...data_json_4.default.common,
|
|
23
|
+
...data_json_4.default.defaultTheme.content,
|
|
24
|
+
}),
|
|
25
|
+
// promo-features-block: grey theme
|
|
26
|
+
(0, utils_1.blockTransform)({
|
|
27
|
+
...data_json_4.default.common,
|
|
28
|
+
...data_json_4.default.greyTheme.content,
|
|
29
|
+
}),
|
|
30
|
+
// extended-features-block: default (3 cols)
|
|
31
|
+
(0, utils_1.blockTransform)(data_json_2.default.default.content),
|
|
32
|
+
// extended-features-block: with labels
|
|
33
|
+
(0, utils_1.blockTransform)({
|
|
34
|
+
type: 'extended-features-block',
|
|
35
|
+
...data_json_2.default.withLabel.content,
|
|
36
|
+
}),
|
|
37
|
+
// extended-features-block: 2 per row
|
|
38
|
+
(0, utils_1.blockTransform)({
|
|
39
|
+
type: 'extended-features-block',
|
|
40
|
+
...data_json_2.default.colSizes.two,
|
|
41
|
+
}),
|
|
42
|
+
// extended-features-block: 4 per row
|
|
43
|
+
(0, utils_1.blockTransform)({
|
|
44
|
+
type: 'extended-features-block',
|
|
45
|
+
...data_json_2.default.colSizes.four,
|
|
46
|
+
}),
|
|
47
|
+
// card-layout-block: basic cards
|
|
48
|
+
{
|
|
49
|
+
...data_json_1.default.default.content,
|
|
50
|
+
children: [
|
|
51
|
+
(0, utils_1.blockTransform)(data_json_1.default.cards.basicCard),
|
|
52
|
+
(0, utils_1.blockTransform)(data_json_1.default.cards.basicCard),
|
|
53
|
+
(0, utils_1.blockTransform)(data_json_1.default.cards.basicCard),
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
// card-layout-block: layout items with images
|
|
57
|
+
{
|
|
58
|
+
type: 'card-layout-block',
|
|
59
|
+
title: 'Card layout with layout items',
|
|
60
|
+
children: [
|
|
61
|
+
(0, utils_1.blockTransform)(data_json_1.default.cards.layoutItem),
|
|
62
|
+
(0, utils_1.blockTransform)(data_json_1.default.cards.layoutItem),
|
|
63
|
+
(0, utils_1.blockTransform)(data_json_1.default.cards.layoutItem),
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
// card-layout-block: background cards
|
|
67
|
+
{
|
|
68
|
+
type: 'card-layout-block',
|
|
69
|
+
title: 'Card layout with background cards',
|
|
70
|
+
children: [
|
|
71
|
+
(0, utils_1.blockTransform)(data_json_1.default.cards.backgroundCard),
|
|
72
|
+
(0, utils_1.blockTransform)(data_json_1.default.cards.backgroundCard),
|
|
73
|
+
(0, utils_1.blockTransform)(data_json_1.default.cards.backgroundCard),
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
// card-layout-block: price cards
|
|
77
|
+
{
|
|
78
|
+
type: 'card-layout-block',
|
|
79
|
+
title: 'Card layout with price cards',
|
|
80
|
+
children: [
|
|
81
|
+
(0, utils_1.blockTransform)(data_json_1.default.cards.priceCard),
|
|
82
|
+
(0, utils_1.blockTransform)(data_json_1.default.cards.priceCard),
|
|
83
|
+
(0, utils_1.blockTransform)(data_json_1.default.cards.priceCard),
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
// slider-block: basic cards
|
|
87
|
+
(0, utils_1.blockTransform)(data_json_5.default.default.content),
|
|
88
|
+
// slider-block: quote cards
|
|
89
|
+
(0, utils_1.blockTransform)(data_json_5.default.quoteCards.content),
|
|
90
|
+
// slider-block: banner cards (subtitle already HTML — no blockTransform)
|
|
91
|
+
data_json_5.default.banners.content,
|
|
92
|
+
// header-slider-block: default
|
|
93
|
+
(0, utils_1.blockTransform)({ type: 'header-slider-block', ...data_json_3.default.default }),
|
|
94
|
+
// header-slider-block: with different slide themes
|
|
95
|
+
(0, utils_1.blockTransform)({
|
|
96
|
+
type: 'header-slider-block',
|
|
97
|
+
...data_json_3.default.withDifferentSlidesTheme,
|
|
98
|
+
}),
|
|
99
|
+
],
|
|
100
|
+
} }));
|
|
101
|
+
exports.Default = Template.bind({});
|
|
102
|
+
exports.Default.args = {
|
|
103
|
+
navigation: {
|
|
104
|
+
...data_json_6.default.navigation,
|
|
105
|
+
header: {
|
|
106
|
+
...data_json_6.default.navigation.header,
|
|
107
|
+
withBorder: true,
|
|
108
|
+
withBorderOnScroll: true,
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=FeaturesAndCards.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeaturesAndCards.stories.js","sourceRoot":"../../../src","sources":["demo/FeaturesAndCards.stories.tsx"],"names":[],"mappings":";;;;;AAEA,qDAAsD;AACtD,4EAA8D;AAG9D,mGAAwE;AACxE,yGAAoF;AACpF,qGAA4E;AAC5E,2GAAmF;AACnF,+FAAgE;AAChE,4FAA0D;AAE1D,kBAAe;IACX,KAAK,EAAE,0CAA0C;IACjD,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mD;YACnD,IAAA,sBAAc,EAAC;gBACX,IAAI,EAAE,qBAAqB;gBAC3B,GAAG,mBAAgB,CAAC,wBAAwB;aAC/C,CAAC;SACL;KACW,GAEtB,CACL,CAAC;AAEW,QAAA,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,eAAO,CAAC,IAAI,GAAG;IACX,UAAU,EAAE;QACR,GAAG,mBAAO,CAAC,UAAU;QACrB,MAAM,EAAE;YACJ,GAAG,mBAAO,CAAC,UAAU,CAAC,MAAM;YAC5B,UAAU,EAAE,IAAI;YAChB,kBAAkB,EAAE,IAAI;SAC3B;KACc;CACtB,CAAC","sourcesContent":["import {Meta, StoryFn} from '@storybook/react';\n\nimport {blockTransform} from '../../.storybook/utils';\nimport {PageConstructor} from '../containers/PageConstructor';\nimport {CustomConfig, NavigationData, PageContent} from '../models';\n\nimport cardLayoutData from '../blocks/CardLayout/__stories__/data.json';\nimport extendedFeaturesData from '../blocks/ExtendedFeatures/__stories__/data.json';\nimport headerSliderData from '../blocks/HeaderSlider/__stories__/data.json';\nimport promoFeaturesData from '../blocks/PromoFeaturesBlock/__stories__/data.json';\nimport sliderData from '../blocks/Slider/__stories__/data.json';\nimport navData from '../navigation/__stories__/data.json';\n\nexport default {\n title: 'Lab/Tokenization/Blocks/FeaturesAndCards',\n component: PageConstructor,\n} as Meta;\n\nconst Template: StoryFn<{navigation: NavigationData; custom?: CustomConfig}> = ({\n navigation,\n custom = {},\n}) => (\n <PageConstructor\n navigation={navigation}\n custom={custom}\n content={\n {\n blocks: [\n // promo-features-block: default theme\n blockTransform({\n ...promoFeaturesData.common,\n ...promoFeaturesData.defaultTheme.content,\n }),\n // promo-features-block: grey theme\n blockTransform({\n ...promoFeaturesData.common,\n ...promoFeaturesData.greyTheme.content,\n }),\n\n // extended-features-block: default (3 cols)\n blockTransform(extendedFeaturesData.default.content),\n // extended-features-block: with labels\n blockTransform({\n type: 'extended-features-block',\n ...extendedFeaturesData.withLabel.content,\n }),\n // extended-features-block: 2 per row\n blockTransform({\n type: 'extended-features-block',\n ...extendedFeaturesData.colSizes.two,\n }),\n // extended-features-block: 4 per row\n blockTransform({\n type: 'extended-features-block',\n ...extendedFeaturesData.colSizes.four,\n }),\n\n // card-layout-block: basic cards\n {\n ...cardLayoutData.default.content,\n children: [\n blockTransform(cardLayoutData.cards.basicCard),\n blockTransform(cardLayoutData.cards.basicCard),\n blockTransform(cardLayoutData.cards.basicCard),\n ],\n },\n // card-layout-block: layout items with images\n {\n type: 'card-layout-block',\n title: 'Card layout with layout items',\n children: [\n blockTransform(cardLayoutData.cards.layoutItem),\n blockTransform(cardLayoutData.cards.layoutItem),\n blockTransform(cardLayoutData.cards.layoutItem),\n ],\n },\n // card-layout-block: background cards\n {\n type: 'card-layout-block',\n title: 'Card layout with background cards',\n children: [\n blockTransform(cardLayoutData.cards.backgroundCard),\n blockTransform(cardLayoutData.cards.backgroundCard),\n blockTransform(cardLayoutData.cards.backgroundCard),\n ],\n },\n // card-layout-block: price cards\n {\n type: 'card-layout-block',\n title: 'Card layout with price cards',\n children: [\n blockTransform(cardLayoutData.cards.priceCard),\n blockTransform(cardLayoutData.cards.priceCard),\n blockTransform(cardLayoutData.cards.priceCard),\n ],\n },\n\n // slider-block: basic cards\n blockTransform(sliderData.default.content),\n // slider-block: quote cards\n blockTransform(sliderData.quoteCards.content),\n // slider-block: banner cards (subtitle already HTML — no blockTransform)\n sliderData.banners.content,\n\n // header-slider-block: default\n blockTransform({type: 'header-slider-block', ...headerSliderData.default}),\n // header-slider-block: with different slide themes\n blockTransform({\n type: 'header-slider-block',\n ...headerSliderData.withDifferentSlidesTheme,\n }),\n ],\n } as PageContent\n }\n />\n);\n\nexport const Default = Template.bind({});\nDefault.args = {\n navigation: {\n ...navData.navigation,\n header: {\n ...navData.navigation.header,\n withBorder: true,\n withBorderOnScroll: true,\n },\n } as NavigationData,\n};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { CustomConfig, NavigationData } from "../models/index.js";
|
|
3
|
+
declare const _default: Meta;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: import("@storybook/core/csf", { with: { "resolution-mode": "import" } }).AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
|
|
6
|
+
navigation: NavigationData;
|
|
7
|
+
custom?: CustomConfig;
|
|
8
|
+
}>;
|