@gravity-ui/blog-constructor 8.2.0 → 8.4.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.
Files changed (90) hide show
  1. package/build/cjs/blocks/CompactMedia/CompactMedia.css +27 -0
  2. package/build/cjs/blocks/CompactMedia/CompactMedia.d.ts +2 -0
  3. package/build/cjs/blocks/CompactMedia/CompactMedia.js +22 -0
  4. package/build/cjs/blocks/CompactMedia/CompactMedia.js.map +1 -0
  5. package/build/cjs/blocks/CompactMedia/schema.d.ts +135 -0
  6. package/build/cjs/blocks/CompactMedia/schema.js +18 -0
  7. package/build/cjs/blocks/CompactMedia/schema.js.map +1 -0
  8. package/build/cjs/blocks/SideCardList/SideCardList.css +47 -0
  9. package/build/cjs/blocks/SideCardList/SideCardList.d.ts +3 -0
  10. package/build/cjs/blocks/SideCardList/SideCardList.js +21 -0
  11. package/build/cjs/blocks/SideCardList/SideCardList.js.map +1 -0
  12. package/build/cjs/blocks/SideCardList/schema.d.ts +94 -0
  13. package/build/cjs/blocks/SideCardList/schema.js +37 -0
  14. package/build/cjs/blocks/SideCardList/schema.js.map +1 -0
  15. package/build/cjs/blocks/Take/Take.css +70 -0
  16. package/build/cjs/blocks/Take/Take.d.ts +2 -0
  17. package/build/cjs/blocks/Take/Take.js +28 -0
  18. package/build/cjs/blocks/Take/Take.js.map +1 -0
  19. package/build/cjs/blocks/Take/schema.d.ts +96 -0
  20. package/build/cjs/blocks/Take/schema.js +26 -0
  21. package/build/cjs/blocks/Take/schema.js.map +1 -0
  22. package/build/cjs/components/Wrapper/Wrapper.css +42 -0
  23. package/build/cjs/components/Wrapper/Wrapper.d.ts +1 -0
  24. package/build/cjs/components/Wrapper/Wrapper.js +2 -2
  25. package/build/cjs/components/Wrapper/Wrapper.js.map +1 -1
  26. package/build/cjs/constructor/blocksMap.d.ts +3 -0
  27. package/build/cjs/constructor/blocksMap.js +6 -0
  28. package/build/cjs/constructor/blocksMap.js.map +1 -1
  29. package/build/cjs/hooks/useExtendedComponentMap.d.ts +3 -0
  30. package/build/cjs/models/blocks.d.ts +27 -2
  31. package/build/cjs/models/blocks.js.map +1 -1
  32. package/build/cjs/models/common.d.ts +4 -1
  33. package/build/cjs/models/common.js +3 -0
  34. package/build/cjs/models/common.js.map +1 -1
  35. package/build/cjs/models/paddings.d.ts +1 -1
  36. package/build/cjs/models/paddings.js.map +1 -1
  37. package/build/cjs/schema/blocks.d.ts +2 -0
  38. package/build/cjs/schema/blocks.js +2 -0
  39. package/build/cjs/schema/blocks.js.map +1 -1
  40. package/build/cjs/schema/index.d.ts +231 -0
  41. package/build/cjs/schema/index.js +3 -1
  42. package/build/cjs/schema/index.js.map +1 -1
  43. package/build/esm/blocks/CompactMedia/CompactMedia.css +27 -0
  44. package/build/esm/blocks/CompactMedia/CompactMedia.d.ts +3 -0
  45. package/build/esm/blocks/CompactMedia/CompactMedia.js +19 -0
  46. package/build/esm/blocks/CompactMedia/CompactMedia.js.map +1 -0
  47. package/build/esm/blocks/CompactMedia/schema.d.ts +135 -0
  48. package/build/esm/blocks/CompactMedia/schema.js +15 -0
  49. package/build/esm/blocks/CompactMedia/schema.js.map +1 -0
  50. package/build/esm/blocks/SideCardList/SideCardList.css +47 -0
  51. package/build/esm/blocks/SideCardList/SideCardList.d.ts +4 -0
  52. package/build/esm/blocks/SideCardList/SideCardList.js +18 -0
  53. package/build/esm/blocks/SideCardList/SideCardList.js.map +1 -0
  54. package/build/esm/blocks/SideCardList/schema.d.ts +94 -0
  55. package/build/esm/blocks/SideCardList/schema.js +34 -0
  56. package/build/esm/blocks/SideCardList/schema.js.map +1 -0
  57. package/build/esm/blocks/Take/Take.css +70 -0
  58. package/build/esm/blocks/Take/Take.d.ts +3 -0
  59. package/build/esm/blocks/Take/Take.js +24 -0
  60. package/build/esm/blocks/Take/Take.js.map +1 -0
  61. package/build/esm/blocks/Take/schema.d.ts +96 -0
  62. package/build/esm/blocks/Take/schema.js +23 -0
  63. package/build/esm/blocks/Take/schema.js.map +1 -0
  64. package/build/esm/components/Wrapper/Wrapper.css +42 -0
  65. package/build/esm/components/Wrapper/Wrapper.d.ts +1 -0
  66. package/build/esm/components/Wrapper/Wrapper.js +2 -2
  67. package/build/esm/components/Wrapper/Wrapper.js.map +1 -1
  68. package/build/esm/constructor/blocksMap.d.ts +3 -0
  69. package/build/esm/constructor/blocksMap.js +6 -0
  70. package/build/esm/constructor/blocksMap.js.map +1 -1
  71. package/build/esm/hooks/useExtendedComponentMap.d.ts +3 -0
  72. package/build/esm/models/blocks.d.ts +27 -2
  73. package/build/esm/models/blocks.js.map +1 -1
  74. package/build/esm/models/common.d.ts +4 -1
  75. package/build/esm/models/common.js +3 -0
  76. package/build/esm/models/common.js.map +1 -1
  77. package/build/esm/models/paddings.d.ts +1 -1
  78. package/build/esm/models/paddings.js.map +1 -1
  79. package/build/esm/schema/blocks.d.ts +2 -0
  80. package/build/esm/schema/blocks.js +2 -0
  81. package/build/esm/schema/blocks.js.map +1 -1
  82. package/build/esm/schema/index.d.ts +231 -0
  83. package/build/esm/schema/index.js +3 -1
  84. package/build/esm/schema/index.js.map +1 -1
  85. package/package.json +1 -1
  86. package/server/models/blocks.d.ts +27 -2
  87. package/server/models/common.d.ts +4 -1
  88. package/server/models/common.js +3 -0
  89. package/server/models/paddings.d.ts +1 -1
  90. package/styles/mixins.scss +60 -0
@@ -0,0 +1,27 @@
1
+ /* use this for style redefinitions to awoid problems with
2
+ unpredictable css rules order in build */
3
+ .bc-compact-media__container {
4
+ max-width: 296px;
5
+ }
6
+ .bc-compact-media__media {
7
+ max-width: 232px;
8
+ padding: 8px 0;
9
+ }
10
+ .bc-compact-media__image {
11
+ object-fit: contain;
12
+ object-position: left;
13
+ max-height: 88px;
14
+ max-width: 232px;
15
+ width: auto;
16
+ }
17
+ @media (max-width: 1081px) {
18
+ .bc-compact-media__container {
19
+ max-width: none;
20
+ width: 50%;
21
+ }
22
+ }
23
+ @media (max-width: 577px) {
24
+ .bc-compact-media__container {
25
+ width: 100%;
26
+ }
27
+ }
@@ -0,0 +1,3 @@
1
+ import { CompactMediaProps } from "../../models/blocks.js";
2
+ import './CompactMedia.css';
3
+ export declare const CompactMedia: ({ paddingBottom, paddingTop, description, paddingRight, paddingLeft, image, }: CompactMediaProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Media as PCMedia, YFMWrapper } from '@gravity-ui/page-constructor';
3
+ import { Wrapper } from "../../components/Wrapper/Wrapper.js";
4
+ import { PaddingsDirections } from "../../models/paddings.js";
5
+ import { block } from "../../utils/cn.js";
6
+ import './CompactMedia.css';
7
+ const b = block('compact-media');
8
+ export const CompactMedia = ({ paddingBottom, paddingTop, description, paddingRight, paddingLeft, image, }) => {
9
+ return (_jsxs(Wrapper, { paddings: {
10
+ [PaddingsDirections.top]: paddingTop,
11
+ [PaddingsDirections.bottom]: paddingBottom,
12
+ [PaddingsDirections.left]: paddingLeft,
13
+ [PaddingsDirections.right]: paddingRight,
14
+ }, className: b('container'), children: [_jsx(PCMedia, { className: b('media'), imageClassName: b('image'), image: image }), description && (_jsx("div", { className: b('text-content'), children: _jsx(YFMWrapper, { content: description, modifiers: {
15
+ blog: true,
16
+ resetPaddings: true,
17
+ } }) }))] }));
18
+ };
19
+ //# sourceMappingURL=CompactMedia.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CompactMedia.js","sourceRoot":"../../../../src","sources":["blocks/CompactMedia/CompactMedia.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,KAAK,IAAI,OAAO,EAAE,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAE1E,OAAO,EAAC,OAAO,EAAC,4CAAyC;AAEzD,OAAO,EAAC,kBAAkB,EAAC,iCAA8B;AACzD,OAAO,EAAC,KAAK,EAAC,0BAAuB;AAErC,OAAO,oBAAoB,CAAC;AAE5B,MAAM,CAAC,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;AACjC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EACzB,aAAa,EACb,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,KAAK,GACW,EAAE,EAAE;IACpB,OAAO,CACH,MAAC,OAAO,IACJ,QAAQ,EAAE;YACN,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;YAC1C,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,WAAW;YACtC,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,YAAY;SAC3C,EACD,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,aAEzB,KAAC,OAAO,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,GAAI,EAC3E,WAAW,IAAI,CACZ,cAAK,SAAS,EAAE,CAAC,CAAC,cAAc,CAAC,YAC7B,KAAC,UAAU,IACP,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE;wBACP,IAAI,EAAE,IAAI;wBACV,aAAa,EAAE,IAAI;qBACtB,GACH,GACA,CACT,IACK,CACb,CAAC;AACN,CAAC,CAAC","sourcesContent":["import {Media as PCMedia, YFMWrapper} from '@gravity-ui/page-constructor';\n\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {CompactMediaProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './CompactMedia.scss';\n\nconst b = block('compact-media');\nexport const CompactMedia = ({\n paddingBottom,\n paddingTop,\n description,\n paddingRight,\n paddingLeft,\n image,\n}: CompactMediaProps) => {\n return (\n <Wrapper\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n [PaddingsDirections.left]: paddingLeft,\n [PaddingsDirections.right]: paddingRight,\n }}\n className={b('container')}\n >\n <PCMedia className={b('media')} imageClassName={b('image')} image={image} />\n {description && (\n <div className={b('text-content')}>\n <YFMWrapper\n content={description}\n modifiers={{\n blog: true,\n resetPaddings: true,\n }}\n />\n </div>\n )}\n </Wrapper>\n );\n};\n"]}
@@ -0,0 +1,135 @@
1
+ export declare const CompactMedia: {
2
+ "blog-compact-media-block": {
3
+ type: string;
4
+ additionalProperties: boolean;
5
+ properties: {
6
+ image: {
7
+ oneOf: ({
8
+ optionName: string;
9
+ oneOf: ({
10
+ type: string;
11
+ properties: {
12
+ when: {
13
+ type: string;
14
+ };
15
+ };
16
+ } | {
17
+ type: string;
18
+ pattern: string;
19
+ optionName: string;
20
+ items?: undefined;
21
+ } | {
22
+ type: string;
23
+ items: {
24
+ type: string;
25
+ properties: {
26
+ when: {
27
+ type: string;
28
+ };
29
+ };
30
+ };
31
+ optionName: string;
32
+ pattern?: undefined;
33
+ })[];
34
+ type?: undefined;
35
+ items?: undefined;
36
+ } | {
37
+ type: string;
38
+ items: {
39
+ oneOf: ({
40
+ type: string;
41
+ properties: {
42
+ when: {
43
+ type: string;
44
+ };
45
+ };
46
+ } | {
47
+ type: string;
48
+ pattern: string;
49
+ optionName: string;
50
+ items?: undefined;
51
+ } | {
52
+ type: string;
53
+ items: {
54
+ type: string;
55
+ properties: {
56
+ when: {
57
+ type: string;
58
+ };
59
+ };
60
+ };
61
+ optionName: string;
62
+ pattern?: undefined;
63
+ })[];
64
+ };
65
+ optionName: string;
66
+ })[];
67
+ };
68
+ description: {
69
+ type: string;
70
+ contentType: string;
71
+ };
72
+ paddingTop: {
73
+ type: string;
74
+ enum: string[];
75
+ };
76
+ paddingBottom: {
77
+ type: string;
78
+ enum: string[];
79
+ };
80
+ fullWidth: {
81
+ type: string;
82
+ };
83
+ column: {
84
+ type: string;
85
+ enum: string[];
86
+ };
87
+ qa: {
88
+ type: string;
89
+ };
90
+ anchor: {
91
+ type: string;
92
+ additionalProperties: boolean;
93
+ required: string[];
94
+ properties: {
95
+ text: {
96
+ type: string;
97
+ contentType: string;
98
+ };
99
+ url: {
100
+ type: string;
101
+ };
102
+ urlTitle: {
103
+ type: string;
104
+ };
105
+ };
106
+ };
107
+ visible: {
108
+ type: string;
109
+ enum: string[];
110
+ };
111
+ resetPaddings: {
112
+ type: string;
113
+ };
114
+ context: {
115
+ type: string;
116
+ };
117
+ indent: {
118
+ type: string;
119
+ additionalProperties: boolean;
120
+ properties: {
121
+ top: {
122
+ enum: string[];
123
+ };
124
+ bottom: {
125
+ enum: string[];
126
+ };
127
+ };
128
+ };
129
+ type: {};
130
+ when: {
131
+ type: string;
132
+ };
133
+ };
134
+ };
135
+ };
@@ -0,0 +1,15 @@
1
+ import { validators } from '@gravity-ui/page-constructor';
2
+ import { BlockType } from "../../models/common.js";
3
+ import { BlogBlockBase } from "../../schema/common.js";
4
+ const { common: { BlockBaseProps, MediaProps }, } = validators;
5
+ export const CompactMedia = {
6
+ [BlockType.CompactMedia]: {
7
+ type: 'object',
8
+ additionalProperties: false,
9
+ properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), BlogBlockBase), { image: MediaProps['image'], description: {
10
+ type: 'string',
11
+ contentType: 'text',
12
+ } }),
13
+ },
14
+ };
15
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/CompactMedia/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAC,SAAS,EAAC,+BAA4B;AAC9C,OAAO,EAAC,aAAa,EAAC,+BAA4B;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAE,UAAU,EAAC,GACvC,GAAG,UAAU,CAAC;AAEf,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE;QACtB,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,UAAU,gDACH,cAAc,GACd,aAAa,KAChB,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,EAC1B,WAAW,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,MAAM;aACtB,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nconst {\n common: {BlockBaseProps, MediaProps},\n} = validators;\n\nexport const CompactMedia = {\n [BlockType.CompactMedia]: {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n image: MediaProps['image'],\n description: {\n type: 'string',\n contentType: 'text',\n },\n },\n },\n};\n"]}
@@ -0,0 +1,47 @@
1
+ /* use this for style redefinitions to awoid problems with
2
+ unpredictable css rules order in build */
3
+ .bc-side-card-list__container {
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: 24px;
7
+ max-width: 296px;
8
+ }
9
+ .bc-side-card-list__title {
10
+ font-size: var(--g-text-header-2-font-size);
11
+ line-height: var(--g-text-header-2-line-height);
12
+ font-weight: 500;
13
+ }
14
+ .bc-side-card-list__items {
15
+ display: flex;
16
+ flex-direction: column;
17
+ gap: 16px;
18
+ }
19
+ .bc-side-card-list__item.bc-side-card-list__item {
20
+ min-height: auto;
21
+ }
22
+
23
+ .bc-side-card-list__item-image {
24
+ object-fit: contain;
25
+ object-position: left;
26
+ max-height: 104px;
27
+ max-width: 232px;
28
+ width: auto;
29
+ }
30
+ .bc-side-card-list__item-media {
31
+ max-width: 232px;
32
+ padding: 0 0 16px;
33
+ }
34
+ .bc-side-card-list__item-description {
35
+ padding-bottom: 12px;
36
+ }
37
+ @media (max-width: 1081px) {
38
+ .bc-side-card-list__container {
39
+ max-width: none;
40
+ width: 50%;
41
+ }
42
+ }
43
+ @media (max-width: 577px) {
44
+ .bc-side-card-list__container {
45
+ width: 100%;
46
+ }
47
+ }
@@ -0,0 +1,4 @@
1
+ import { SideCardListProps } from "../../models/blocks.js";
2
+ import './SideCardList.css';
3
+ export declare const SideCardList: ({ title, items, paddingTop, paddingBottom }: SideCardListProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default SideCardList;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CardBase, Media as PCMedia, YFMWrapper } from '@gravity-ui/page-constructor';
3
+ import { Wrapper } from "../../components/Wrapper/Wrapper.js";
4
+ import { PaddingsDirections } from "../../models/paddings.js";
5
+ import { block } from "../../utils/cn.js";
6
+ import './SideCardList.css';
7
+ const b = block('side-card-list');
8
+ export const SideCardList = ({ title, items, paddingTop, paddingBottom }) => {
9
+ return (_jsxs(Wrapper, { paddings: {
10
+ [PaddingsDirections.top]: paddingTop,
11
+ [PaddingsDirections.bottom]: paddingBottom,
12
+ }, className: b('container'), children: [title && _jsx("div", { className: b('title'), children: title }), _jsx("div", { className: b('items'), children: items.map(({ url, description, image }, index) => (_jsx(CardBase, { url: url, className: b('item'), children: _jsxs(CardBase.Content, { children: [_jsx(PCMedia, { className: b('item-media'), imageClassName: b('item-image'), image: image }), description && (_jsx("div", { className: b('item-description'), children: _jsx(YFMWrapper, { content: description, modifiers: {
13
+ blog: true,
14
+ resetPaddings: true,
15
+ } }) }))] }) }, index))) })] }));
16
+ };
17
+ export default SideCardList;
18
+ //# sourceMappingURL=SideCardList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SideCardList.js","sourceRoot":"../../../../src","sources":["blocks/SideCardList/SideCardList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,QAAQ,EAAE,KAAK,IAAI,OAAO,EAAE,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAEpF,OAAO,EAAC,OAAO,EAAC,4CAAyC;AAEzD,OAAO,EAAC,kBAAkB,EAAC,iCAA8B;AACzD,OAAO,EAAC,KAAK,EAAC,0BAAuB;AAErC,OAAO,oBAAoB,CAAC;AAE5B,MAAM,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAC,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAoB,EAAE,EAAE;IACzF,OAAO,CACH,MAAC,OAAO,IACJ,QAAQ,EAAE;YACN,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;SAC7C,EACD,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,aAExB,KAAK,IAAI,cAAK,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,YAAG,KAAK,GAAO,EACnD,cAAK,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,YACrB,KAAK,CAAC,GAAG,CAAC,CAAC,EAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAC7C,KAAC,QAAQ,IAAa,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YAChD,MAAC,QAAQ,CAAC,OAAO,eACb,KAAC,OAAO,IACJ,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,EAC1B,cAAc,EAAE,CAAC,CAAC,YAAY,CAAC,EAC/B,KAAK,EAAE,KAAK,GACd,EACD,WAAW,IAAI,CACZ,cAAK,SAAS,EAAE,CAAC,CAAC,kBAAkB,CAAC,YACjC,KAAC,UAAU,IACP,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE;wCACP,IAAI,EAAE,IAAI;wCACV,aAAa,EAAE,IAAI;qCACtB,GACH,GACA,CACT,IACc,IAlBR,KAAK,CAmBT,CACd,CAAC,GACA,IACA,CACb,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import {CardBase, Media as PCMedia, YFMWrapper} from '@gravity-ui/page-constructor';\n\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {SideCardListProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './SideCardList.scss';\n\nconst b = block('side-card-list');\n\nexport const SideCardList = ({title, items, paddingTop, paddingBottom}: SideCardListProps) => {\n return (\n <Wrapper\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n }}\n className={b('container')}\n >\n {title && <div className={b('title')}>{title}</div>}\n <div className={b('items')}>\n {items.map(({url, description, image}, index) => (\n <CardBase key={index} url={url} className={b('item')}>\n <CardBase.Content>\n <PCMedia\n className={b('item-media')}\n imageClassName={b('item-image')}\n image={image}\n />\n {description && (\n <div className={b('item-description')}>\n <YFMWrapper\n content={description}\n modifiers={{\n blog: true,\n resetPaddings: true,\n }}\n />\n </div>\n )}\n </CardBase.Content>\n </CardBase>\n ))}\n </div>\n </Wrapper>\n );\n};\n\nexport default SideCardList;\n"]}
@@ -0,0 +1,94 @@
1
+ export declare const SideCardList: {
2
+ "blog-side-card-list-block": {
3
+ type: string;
4
+ additionalProperties: boolean;
5
+ required: string[];
6
+ properties: {
7
+ className: {
8
+ type: string;
9
+ };
10
+ title: {
11
+ type: string;
12
+ };
13
+ items: {
14
+ type: string;
15
+ items: {
16
+ type: string;
17
+ required: string[];
18
+ properties: {
19
+ image: {
20
+ type: string;
21
+ };
22
+ description: {
23
+ type: string;
24
+ };
25
+ url: {
26
+ type: string;
27
+ };
28
+ };
29
+ };
30
+ };
31
+ paddingTop: {
32
+ type: string;
33
+ enum: string[];
34
+ };
35
+ paddingBottom: {
36
+ type: string;
37
+ enum: string[];
38
+ };
39
+ fullWidth: {
40
+ type: string;
41
+ };
42
+ column: {
43
+ type: string;
44
+ enum: string[];
45
+ };
46
+ qa: {
47
+ type: string;
48
+ };
49
+ anchor: {
50
+ type: string;
51
+ additionalProperties: boolean;
52
+ required: string[];
53
+ properties: {
54
+ text: {
55
+ type: string;
56
+ contentType: string;
57
+ };
58
+ url: {
59
+ type: string;
60
+ };
61
+ urlTitle: {
62
+ type: string;
63
+ };
64
+ };
65
+ };
66
+ visible: {
67
+ type: string;
68
+ enum: string[];
69
+ };
70
+ resetPaddings: {
71
+ type: string;
72
+ };
73
+ context: {
74
+ type: string;
75
+ };
76
+ indent: {
77
+ type: string;
78
+ additionalProperties: boolean;
79
+ properties: {
80
+ top: {
81
+ enum: string[];
82
+ };
83
+ bottom: {
84
+ enum: string[];
85
+ };
86
+ };
87
+ };
88
+ type: {};
89
+ when: {
90
+ type: string;
91
+ };
92
+ };
93
+ };
94
+ };
@@ -0,0 +1,34 @@
1
+ import { validators } from '@gravity-ui/page-constructor';
2
+ import { BlockType } from "../../models/common.js";
3
+ import { BlogBlockBase } from "../../schema/common.js";
4
+ const { common: { BlockBaseProps }, } = validators;
5
+ export const SideCardList = {
6
+ [BlockType.SideCardList]: {
7
+ type: 'object',
8
+ additionalProperties: false,
9
+ required: ['items'],
10
+ properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), BlogBlockBase), { className: {
11
+ type: 'string',
12
+ }, title: {
13
+ type: 'string',
14
+ }, items: {
15
+ type: 'array',
16
+ items: {
17
+ type: 'object',
18
+ required: ['image', 'description', 'url'],
19
+ properties: {
20
+ image: {
21
+ type: 'string',
22
+ },
23
+ description: {
24
+ type: 'string',
25
+ },
26
+ url: {
27
+ type: 'string',
28
+ },
29
+ },
30
+ },
31
+ } }),
32
+ },
33
+ };
34
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/SideCardList/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAC,SAAS,EAAC,+BAA4B;AAC9C,OAAO,EAAC,aAAa,EAAC,+BAA4B;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,UAAU,CAAC;AAEf,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE;QACtB,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,CAAC;QACnB,UAAU,gDACH,cAAc,GACd,aAAa,KAChB,SAAS,EAAE;gBACP,IAAI,EAAE,QAAQ;aACjB,EACD,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB,EACD,KAAK,EAAE;gBACH,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC;oBACzC,UAAU,EAAE;wBACR,KAAK,EAAE;4BACH,IAAI,EAAE,QAAQ;yBACjB;wBACD,WAAW,EAAE;4BACT,IAAI,EAAE,QAAQ;yBACjB;wBACD,GAAG,EAAE;4BACD,IAAI,EAAE,QAAQ;yBACjB;qBACJ;iBACJ;aACJ,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nconst {\n common: {BlockBaseProps},\n} = validators;\n\nexport const SideCardList = {\n [BlockType.SideCardList]: {\n type: 'object',\n additionalProperties: false,\n required: ['items'],\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n className: {\n type: 'string',\n },\n title: {\n type: 'string',\n },\n items: {\n type: 'array',\n items: {\n type: 'object',\n required: ['image', 'description', 'url'],\n properties: {\n image: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n url: {\n type: 'string',\n },\n },\n },\n },\n },\n },\n};\n"]}
@@ -0,0 +1,70 @@
1
+ /* use this for style redefinitions to awoid problems with
2
+ unpredictable css rules order in build */
3
+ .bc-take__container {
4
+ --take-color: #d6e0e9;
5
+ display: flex;
6
+ flex-direction: column;
7
+ align-items: flex-start;
8
+ align-self: stretch;
9
+ gap: 40px;
10
+ border-radius: 24px 0 0 24px;
11
+ border-left: 4px solid var(--take-color);
12
+ background: linear-gradient(90deg, color-mix(in sRGB, var(--take-color) 20%, transparent) 0%, rgba(255, 255, 255, 0.2) 100%);
13
+ font-family: "YS Text";
14
+ }
15
+ .bc-take__container_noBackground {
16
+ background: none;
17
+ }
18
+ .bc-take__text {
19
+ font-size: 24px;
20
+ line-height: 32px;
21
+ font-weight: var(--g-text-body-font-weight);
22
+ font-family: inherit;
23
+ }
24
+ .bc-take__author {
25
+ align-items: flex-start;
26
+ max-width: 402px;
27
+ }
28
+ .bc-take__author .pc-author__name {
29
+ font-weight: var(--g-text-accent-font-weight);
30
+ font-size: var(--g-text-header-1-font-size);
31
+ line-height: var(--g-text-header-1-line-height);
32
+ }
33
+ .bc-take__author .pc-author__description {
34
+ font-size: var(--g-text-body-3-font-size);
35
+ line-height: var(--g-text-body-3-line-height);
36
+ }
37
+ .bc-take__avatar {
38
+ width: 88px;
39
+ height: 88px;
40
+ }
41
+ .bc-take__avatar img {
42
+ width: 88px;
43
+ height: 88px;
44
+ }
45
+ @media (max-width: 577px) {
46
+ .bc-take__text {
47
+ font-size: 20px;
48
+ line-height: 28px;
49
+ }
50
+ .bc-take__author {
51
+ max-width: none;
52
+ }
53
+ .bc-take__author .pc-author__name {
54
+ font-weight: var(--g-text-accent-font-weight);
55
+ font-size: var(--g-text-subheader-3-font-size);
56
+ line-height: var(--g-text-subheader-3-line-height);
57
+ }
58
+ .bc-take__author .pc-author__description {
59
+ font-size: var(--g-text-body-2-font-size);
60
+ line-height: var(--g-text-body-2-line-height);
61
+ }
62
+ .bc-take__avatar {
63
+ width: 80px;
64
+ height: 80px;
65
+ }
66
+ .bc-take__avatar img {
67
+ width: 80px;
68
+ height: 80px;
69
+ }
70
+ }
@@ -0,0 +1,3 @@
1
+ import { TakeProps } from "../../models/blocks.js";
2
+ import './Take.css';
3
+ export declare const Take: (props: TakeProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { AuthorType, Author as PCAuthor, YFMWrapper } from '@gravity-ui/page-constructor';
4
+ import { Wrapper } from "../../components/Wrapper/Wrapper.js";
5
+ import { MobileContext } from "../../contexts/MobileContext.js";
6
+ import { PaddingsDirections } from "../../models/paddings.js";
7
+ import { block } from "../../utils/cn.js";
8
+ import './Take.css';
9
+ const b = block('take');
10
+ export const Take = (props) => {
11
+ const { paddingTop, paddingBottom, paddingLeft, paddingRight, text, author, color, noBackground, } = props;
12
+ const isMobile = React.useContext(MobileContext);
13
+ const containerStyle = color ? { '--take-color': color } : undefined;
14
+ return (_jsxs(Wrapper, { className: b('container', { noBackground }), paddings: {
15
+ [PaddingsDirections.top]: paddingTop,
16
+ [PaddingsDirections.bottom]: paddingBottom,
17
+ [PaddingsDirections.left]: paddingLeft,
18
+ [PaddingsDirections.right]: paddingRight,
19
+ }, style: containerStyle, children: [_jsx(YFMWrapper, { content: text, contentClassName: b('text'), tagName: "div", modifiers: {
20
+ blog: true,
21
+ resetPaddings: true,
22
+ } }), _jsx(PCAuthor, { type: isMobile ? AuthorType.Column : AuthorType.Line, author: author, className: b('author'), authorContainerClassName: b('avatar') })] }));
23
+ };
24
+ //# sourceMappingURL=Take.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Take.js","sourceRoot":"../../../../src","sources":["blocks/Take/Take.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,UAAU,EAAE,MAAM,IAAI,QAAQ,EAAE,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExF,OAAO,EAAC,OAAO,EAAC,4CAAyC;AACzD,OAAO,EAAC,aAAa,EAAC,wCAAqC;AAE3D,OAAO,EAAC,kBAAkB,EAAC,iCAA8B;AACzD,OAAO,EAAC,KAAK,EAAC,0BAAuB;AAErC,OAAO,YAAY,CAAC;AAEpB,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAExB,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAAgB,EAAE,EAAE;IACrC,MAAM,EACF,UAAU,EACV,aAAa,EACb,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,MAAM,EACN,KAAK,EACL,YAAY,GACf,GAAG,KAAK,CAAC;IAEV,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAEjD,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,CAAE,EAAC,cAAc,EAAE,KAAK,EAAyB,CAAC,CAAC,CAAC,SAAS,CAAC;IAE5F,OAAO,CACH,MAAC,OAAO,IACJ,SAAS,EAAE,CAAC,CAAC,WAAW,EAAE,EAAC,YAAY,EAAC,CAAC,EACzC,QAAQ,EAAE;YACN,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;YAC1C,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,WAAW;YACtC,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,YAAY;SAC3C,EACD,KAAK,EAAE,cAAc,aAErB,KAAC,UAAU,IACP,OAAO,EAAE,IAAI,EACb,gBAAgB,EAAE,CAAC,CAAC,MAAM,CAAC,EAC3B,OAAO,EAAC,KAAK,EACb,SAAS,EAAE;oBACP,IAAI,EAAE,IAAI;oBACV,aAAa,EAAE,IAAI;iBACtB,GACH,EACF,KAAC,QAAQ,IACL,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EACpD,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,EACtB,wBAAwB,EAAE,CAAC,CAAC,QAAQ,CAAC,GACvC,IACI,CACb,CAAC;AACN,CAAC,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {AuthorType, Author as PCAuthor, YFMWrapper} from '@gravity-ui/page-constructor';\n\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {MobileContext} from '../../contexts/MobileContext';\nimport {TakeProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './Take.scss';\n\nconst b = block('take');\n\nexport const Take = (props: TakeProps) => {\n const {\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n text,\n author,\n color,\n noBackground,\n } = props;\n\n const isMobile = React.useContext(MobileContext);\n\n const containerStyle = color ? ({'--take-color': color} as React.CSSProperties) : undefined;\n\n return (\n <Wrapper\n className={b('container', {noBackground})}\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n [PaddingsDirections.left]: paddingLeft,\n [PaddingsDirections.right]: paddingRight,\n }}\n style={containerStyle}\n >\n <YFMWrapper\n content={text}\n contentClassName={b('text')}\n tagName=\"div\"\n modifiers={{\n blog: true,\n resetPaddings: true,\n }}\n />\n <PCAuthor\n type={isMobile ? AuthorType.Column : AuthorType.Line}\n author={author}\n className={b('author')}\n authorContainerClassName={b('avatar')}\n />\n </Wrapper>\n );\n};\n"]}
@@ -0,0 +1,96 @@
1
+ export declare const Take: {
2
+ "blog-take-block": {
3
+ type: string;
4
+ additionalProperties: boolean;
5
+ required: string[];
6
+ properties: {
7
+ text: {
8
+ type: string;
9
+ contentType: string;
10
+ };
11
+ author: {
12
+ type: string;
13
+ additionalProperties: boolean;
14
+ required: string[];
15
+ properties: {
16
+ firstName: {
17
+ type: string;
18
+ contentType: string;
19
+ };
20
+ secondName: {
21
+ type: string;
22
+ contentType: string;
23
+ };
24
+ description: {
25
+ type: string;
26
+ contentType: string;
27
+ };
28
+ avatar: {
29
+ type: string;
30
+ };
31
+ };
32
+ };
33
+ paddingTop: {
34
+ type: string;
35
+ enum: string[];
36
+ };
37
+ paddingBottom: {
38
+ type: string;
39
+ enum: string[];
40
+ };
41
+ fullWidth: {
42
+ type: string;
43
+ };
44
+ column: {
45
+ type: string;
46
+ enum: string[];
47
+ };
48
+ qa: {
49
+ type: string;
50
+ };
51
+ anchor: {
52
+ type: string;
53
+ additionalProperties: boolean;
54
+ required: string[];
55
+ properties: {
56
+ text: {
57
+ type: string;
58
+ contentType: string;
59
+ };
60
+ url: {
61
+ type: string;
62
+ };
63
+ urlTitle: {
64
+ type: string;
65
+ };
66
+ };
67
+ };
68
+ visible: {
69
+ type: string;
70
+ enum: string[];
71
+ };
72
+ resetPaddings: {
73
+ type: string;
74
+ };
75
+ context: {
76
+ type: string;
77
+ };
78
+ indent: {
79
+ type: string;
80
+ additionalProperties: boolean;
81
+ properties: {
82
+ top: {
83
+ enum: string[];
84
+ };
85
+ bottom: {
86
+ enum: string[];
87
+ };
88
+ };
89
+ };
90
+ type: {};
91
+ when: {
92
+ type: string;
93
+ };
94
+ };
95
+ };
96
+ };
@@ -0,0 +1,23 @@
1
+ import { validators } from '@gravity-ui/page-constructor';
2
+ import { BlockType } from "../../models/common.js";
3
+ import { BlogBlockBase } from "../../schema/common.js";
4
+ const { common: { BlockBaseProps }, } = validators;
5
+ export const Take = {
6
+ [BlockType.Take]: {
7
+ type: 'object',
8
+ additionalProperties: false,
9
+ required: ['text', 'author'],
10
+ properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), BlogBlockBase), { text: { type: 'string', contentType: 'text' }, author: {
11
+ type: 'object',
12
+ additionalProperties: false,
13
+ required: ['firstName', 'secondName'],
14
+ properties: {
15
+ firstName: { type: 'string', contentType: 'text' },
16
+ secondName: { type: 'string', contentType: 'text' },
17
+ description: { type: 'string', contentType: 'yfm' },
18
+ avatar: { type: 'string' },
19
+ },
20
+ } }),
21
+ },
22
+ };
23
+ //# sourceMappingURL=schema.js.map