@gravity-ui/blog-constructor 5.0.1 → 5.1.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 (66) hide show
  1. package/build/cjs/blocks/Author/Author.js +2 -2
  2. package/build/cjs/blocks/Banner/Banner.js +7 -5
  3. package/build/cjs/blocks/ColoredText/ColoredText.js +5 -4
  4. package/build/cjs/blocks/YFM/YFM.js +6 -4
  5. package/build/cjs/components/FeedHeader/components/Controls/Controls.css +5 -23
  6. package/build/cjs/components/FeedHeader/components/Controls/Controls.js +1 -1
  7. package/build/cjs/components/FeedHeader/components/Controls/customRenders.js +1 -2
  8. package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.css +1 -1
  9. package/build/cjs/components/Paginator/types.d.ts +4 -4
  10. package/build/cjs/components/PostCard/PostCard.d.ts +3 -2
  11. package/build/cjs/components/PostCard/PostCard.js +5 -4
  12. package/build/cjs/components/PostInfo/SuggestPostInfo.d.ts +2 -2
  13. package/build/cjs/components/PostInfo/SuggestPostInfo.js +2 -1
  14. package/build/cjs/components/PostInfo/components/Date.d.ts +2 -1
  15. package/build/cjs/components/PostInfo/components/Date.js +2 -1
  16. package/build/cjs/components/Posts/Posts.js +5 -2
  17. package/build/cjs/components/Search/Search.css +13 -15
  18. package/build/cjs/components/Search/Search.d.ts +7 -1
  19. package/build/cjs/components/Search/Search.js +26 -14
  20. package/build/cjs/models/blocks.d.ts +5 -5
  21. package/build/cjs/models/common.d.ts +8 -0
  22. package/build/cjs/models/common.js +12 -2
  23. package/build/cjs/utils/cn.d.ts +2 -3
  24. package/build/cjs/utils/cn.js +4 -7
  25. package/build/cjs/utils/common.d.ts +1 -0
  26. package/build/cjs/utils/common.js +15 -2
  27. package/build/esm/blocks/Author/Author.js +2 -2
  28. package/build/esm/blocks/Banner/Banner.js +8 -6
  29. package/build/esm/blocks/ColoredText/ColoredText.js +6 -5
  30. package/build/esm/blocks/YFM/YFM.js +6 -4
  31. package/build/esm/components/FeedHeader/components/Controls/Controls.css +5 -23
  32. package/build/esm/components/FeedHeader/components/Controls/Controls.js +1 -1
  33. package/build/esm/components/FeedHeader/components/Controls/customRenders.js +1 -2
  34. package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.css +1 -1
  35. package/build/esm/components/Paginator/types.d.ts +4 -4
  36. package/build/esm/components/PostCard/PostCard.d.ts +3 -2
  37. package/build/esm/components/PostCard/PostCard.js +5 -4
  38. package/build/esm/components/PostInfo/SuggestPostInfo.d.ts +2 -2
  39. package/build/esm/components/PostInfo/SuggestPostInfo.js +2 -1
  40. package/build/esm/components/PostInfo/components/Date.d.ts +2 -1
  41. package/build/esm/components/PostInfo/components/Date.js +2 -1
  42. package/build/esm/components/Posts/Posts.js +5 -2
  43. package/build/esm/components/Search/Search.css +13 -15
  44. package/build/esm/components/Search/Search.d.ts +7 -1
  45. package/build/esm/components/Search/Search.js +28 -16
  46. package/build/esm/models/blocks.d.ts +5 -5
  47. package/build/esm/models/common.d.ts +8 -0
  48. package/build/esm/models/common.js +11 -1
  49. package/build/esm/utils/cn.d.ts +2 -3
  50. package/build/esm/utils/cn.js +3 -4
  51. package/build/esm/utils/common.d.ts +1 -0
  52. package/build/esm/utils/common.js +13 -1
  53. package/package.json +5 -6
  54. package/server/models/blocks.d.ts +5 -5
  55. package/server/models/common.d.ts +8 -0
  56. package/server/models/common.js +12 -2
  57. package/build/cjs/components/ButtonWithIcon/ButtonWithIcon.css +0 -76
  58. package/build/cjs/components/ButtonWithIcon/ButtonWithIcon.d.ts +0 -12
  59. package/build/cjs/components/ButtonWithIcon/ButtonWithIcon.js +0 -11
  60. package/build/cjs/demo/DocsDecorator/DocsDecorator.css +0 -14
  61. package/build/cjs/internal-typings/bem-cn-lite.d.ts +0 -17
  62. package/build/esm/components/ButtonWithIcon/ButtonWithIcon.css +0 -76
  63. package/build/esm/components/ButtonWithIcon/ButtonWithIcon.d.ts +0 -13
  64. package/build/esm/components/ButtonWithIcon/ButtonWithIcon.js +0 -7
  65. package/build/esm/demo/DocsDecorator/DocsDecorator.css +0 -14
  66. package/build/esm/internal-typings/bem-cn-lite.d.ts +0 -17
@@ -168,3 +168,11 @@ export type FetchArgs = {
168
168
  export interface QAProps {
169
169
  qa?: string;
170
170
  }
171
+ export declare enum PostCardSize {
172
+ SMALL = "s",
173
+ MEDIUM = "m"
174
+ }
175
+ export declare enum PostCardTitleHeadingLevel {
176
+ H2 = "h2",
177
+ H3 = "h3"
178
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DefaultEventNames = exports.BlockType = exports.Theme = void 0;
3
+ exports.PostCardTitleHeadingLevel = exports.PostCardSize = exports.DefaultEventNames = exports.BlockType = exports.Theme = void 0;
4
4
  var Theme;
5
5
  (function (Theme) {
6
6
  Theme["Light"] = "light";
@@ -31,4 +31,14 @@ var DefaultEventNames;
31
31
  DefaultEventNames["Tag"] = "selector-tag-click";
32
32
  DefaultEventNames["Service"] = "selector-service-click";
33
33
  DefaultEventNames["SaveOnly"] = "save-only-button-click";
34
- })(DefaultEventNames = exports.DefaultEventNames || (exports.DefaultEventNames = {}));
34
+ })(DefaultEventNames = exports.DefaultEventNames || (exports.DefaultEventNames = {}));
35
+ var PostCardSize;
36
+ (function (PostCardSize) {
37
+ PostCardSize["SMALL"] = "s";
38
+ PostCardSize["MEDIUM"] = "m";
39
+ })(PostCardSize = exports.PostCardSize || (exports.PostCardSize = {}));
40
+ var PostCardTitleHeadingLevel;
41
+ (function (PostCardTitleHeadingLevel) {
42
+ PostCardTitleHeadingLevel["H2"] = "h2";
43
+ PostCardTitleHeadingLevel["H3"] = "h3";
44
+ })(PostCardTitleHeadingLevel = exports.PostCardTitleHeadingLevel || (exports.PostCardTitleHeadingLevel = {}));
@@ -1,76 +0,0 @@
1
- /* use this for style redefinitions to awoid problems with
2
- unpredictable css rules order in build */
3
- .bc-button-with-icon {
4
- display: inline-block;
5
- margin: 0;
6
- padding: 0;
7
- font: inherit;
8
- border: none;
9
- outline: none;
10
- color: inherit;
11
- background: none;
12
- cursor: pointer;
13
- outline: none;
14
- display: flex;
15
- align-items: center;
16
- justify-content: center;
17
- transition: color 0.2s;
18
- }
19
- .utilityfocus .bc-button-with-icon:focus {
20
- outline: 2px solid #ffdb4d;
21
- }
22
- .bc-button-with-icon_size_xs {
23
- height: 24px;
24
- width: 24px;
25
- }
26
- .bc-button-with-icon_size_s {
27
- height: 28px;
28
- width: 28px;
29
- }
30
- .bc-button-with-icon_size_m {
31
- height: 32px;
32
- width: 32px;
33
- }
34
- .bc-button-with-icon_size_n {
35
- height: 36px;
36
- width: 36px;
37
- }
38
- .bc-button-with-icon_theme_primary {
39
- color: var(--www-text-content-color);
40
- transition: color 0.2s;
41
- }
42
- .bc-button-with-icon_theme_primary:hover {
43
- color: var(--g-color-text-primary);
44
- }
45
- .bc-button-with-icon_theme_secondary {
46
- color: var(--g-color-text-secondary);
47
- transition: color 0.2s;
48
- }
49
- .bc-button-with-icon_theme_secondary:hover {
50
- color: var(--www-text-content-color);
51
- }
52
- .bc-button-with-icon_theme_link {
53
- color: var(--www-text-content-color);
54
- transition: color 0.2s;
55
- }
56
- .bc-button-with-icon_theme_link:hover {
57
- color: var(--g-color-text-link-hover);
58
- }
59
- .bc-button-with-icon_theme_accent {
60
- color: var(--g-color-base-danger-heavy);
61
- transition: opacity 0.2s;
62
- opacity: 0.7;
63
- }
64
- .bc-button-with-icon_theme_accent:hover {
65
- opacity: 1;
66
- }
67
- .bc-button-with-icon_disabled {
68
- cursor: default;
69
- color: var(--g-color-text-secondary);
70
- }
71
- .bc-button-with-icon_disabled:hover {
72
- color: var(--g-color-text-secondary);
73
- }
74
- .mobile .bc-button-with-icon:hover {
75
- color: inherit;
76
- }
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { SVGIconData } from '@gravity-ui/uikit/build/esm/components/Icon/types';
3
- import { ClassNameProps } from '../../models/common';
4
- export interface ButtonWithIconProps extends ClassNameProps {
5
- icon: SVGIconData;
6
- theme?: 'primary' | 'secondary' | 'link' | 'accent';
7
- size?: 'xs' | 's' | 'm' | 'n';
8
- iconSize?: number;
9
- disabled?: boolean;
10
- onClick?: (event: React.MouseEvent) => void;
11
- }
12
- export declare const ButtonWithIcon: React.FC<ButtonWithIconProps>;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ButtonWithIcon = void 0;
4
- const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importDefault(require("react"));
6
- const uikit_1 = require("@gravity-ui/uikit");
7
- const cn_1 = require("../../utils/cn");
8
- const b = (0, cn_1.block)('button-with-icon');
9
- const ButtonWithIcon = ({ icon, theme = 'primary', size = 's', iconSize = 16, disabled = false, onClick, className, }) => (react_1.default.createElement("button", { type: "button", className: b({ size, theme, disabled }, className), onClick: disabled ? undefined : onClick, disabled: disabled },
10
- react_1.default.createElement(uikit_1.Icon, { data: icon, size: iconSize })));
11
- exports.ButtonWithIcon = ButtonWithIcon;
@@ -1,14 +0,0 @@
1
- /* use this for style redefinitions to awoid problems with
2
- unpredictable css rules order in build */
3
- .docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .sbdocs-wrapper {
4
- padding: 40px;
5
- }
6
- .docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .sbdocs-wrapper h1 {
7
- margin-bottom: 32px;
8
- }
9
- .docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .sbdocs-content {
10
- max-width: 1680px;
11
- }
12
- .docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .innerZoomElementWrapper {
13
- overflow: hidden;
14
- }
@@ -1,17 +0,0 @@
1
- declare module 'bem-cn-lite' {
2
- interface Modifications {
3
- [name: string]: string | boolean | number | undefined;
4
- }
5
-
6
- interface Inner {
7
- (elem: string, mods: Modifications | null, mixin?: string): string;
8
- (elem: string, mixin?: string): string;
9
- (elem: string, mods: Modifications): string;
10
- (mods: Modifications | null, mixin?: string): string;
11
- (elem: string): string;
12
- (mods: Modifications);
13
- (): string;
14
- }
15
-
16
- export default function Outer(name: string): Inner;
17
- }
@@ -1,76 +0,0 @@
1
- /* use this for style redefinitions to awoid problems with
2
- unpredictable css rules order in build */
3
- .bc-button-with-icon {
4
- display: inline-block;
5
- margin: 0;
6
- padding: 0;
7
- font: inherit;
8
- border: none;
9
- outline: none;
10
- color: inherit;
11
- background: none;
12
- cursor: pointer;
13
- outline: none;
14
- display: flex;
15
- align-items: center;
16
- justify-content: center;
17
- transition: color 0.2s;
18
- }
19
- .utilityfocus .bc-button-with-icon:focus {
20
- outline: 2px solid #ffdb4d;
21
- }
22
- .bc-button-with-icon_size_xs {
23
- height: 24px;
24
- width: 24px;
25
- }
26
- .bc-button-with-icon_size_s {
27
- height: 28px;
28
- width: 28px;
29
- }
30
- .bc-button-with-icon_size_m {
31
- height: 32px;
32
- width: 32px;
33
- }
34
- .bc-button-with-icon_size_n {
35
- height: 36px;
36
- width: 36px;
37
- }
38
- .bc-button-with-icon_theme_primary {
39
- color: var(--www-text-content-color);
40
- transition: color 0.2s;
41
- }
42
- .bc-button-with-icon_theme_primary:hover {
43
- color: var(--g-color-text-primary);
44
- }
45
- .bc-button-with-icon_theme_secondary {
46
- color: var(--g-color-text-secondary);
47
- transition: color 0.2s;
48
- }
49
- .bc-button-with-icon_theme_secondary:hover {
50
- color: var(--www-text-content-color);
51
- }
52
- .bc-button-with-icon_theme_link {
53
- color: var(--www-text-content-color);
54
- transition: color 0.2s;
55
- }
56
- .bc-button-with-icon_theme_link:hover {
57
- color: var(--g-color-text-link-hover);
58
- }
59
- .bc-button-with-icon_theme_accent {
60
- color: var(--g-color-base-danger-heavy);
61
- transition: opacity 0.2s;
62
- opacity: 0.7;
63
- }
64
- .bc-button-with-icon_theme_accent:hover {
65
- opacity: 1;
66
- }
67
- .bc-button-with-icon_disabled {
68
- cursor: default;
69
- color: var(--g-color-text-secondary);
70
- }
71
- .bc-button-with-icon_disabled:hover {
72
- color: var(--g-color-text-secondary);
73
- }
74
- .mobile .bc-button-with-icon:hover {
75
- color: inherit;
76
- }
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { SVGIconData } from '@gravity-ui/uikit/build/esm/components/Icon/types';
3
- import { ClassNameProps } from '../../models/common';
4
- import './ButtonWithIcon.css';
5
- export interface ButtonWithIconProps extends ClassNameProps {
6
- icon: SVGIconData;
7
- theme?: 'primary' | 'secondary' | 'link' | 'accent';
8
- size?: 'xs' | 's' | 'm' | 'n';
9
- iconSize?: number;
10
- disabled?: boolean;
11
- onClick?: (event: React.MouseEvent) => void;
12
- }
13
- export declare const ButtonWithIcon: React.FC<ButtonWithIconProps>;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { Icon } from '@gravity-ui/uikit';
3
- import { block } from '../../utils/cn';
4
- import './ButtonWithIcon.css';
5
- const b = block('button-with-icon');
6
- export const ButtonWithIcon = ({ icon, theme = 'primary', size = 's', iconSize = 16, disabled = false, onClick, className, }) => (React.createElement("button", { type: "button", className: b({ size, theme, disabled }, className), onClick: disabled ? undefined : onClick, disabled: disabled },
7
- React.createElement(Icon, { data: icon, size: iconSize })));
@@ -1,14 +0,0 @@
1
- /* use this for style redefinitions to awoid problems with
2
- unpredictable css rules order in build */
3
- .docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .sbdocs-wrapper {
4
- padding: 40px;
5
- }
6
- .docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .sbdocs-wrapper h1 {
7
- margin-bottom: 32px;
8
- }
9
- .docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .sbdocs-content {
10
- max-width: 1680px;
11
- }
12
- .docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .innerZoomElementWrapper {
13
- overflow: hidden;
14
- }
@@ -1,17 +0,0 @@
1
- declare module 'bem-cn-lite' {
2
- interface Modifications {
3
- [name: string]: string | boolean | number | undefined;
4
- }
5
-
6
- interface Inner {
7
- (elem: string, mods: Modifications | null, mixin?: string): string;
8
- (elem: string, mixin?: string): string;
9
- (elem: string, mods: Modifications): string;
10
- (mods: Modifications | null, mixin?: string): string;
11
- (elem: string): string;
12
- (mods: Modifications);
13
- (): string;
14
- }
15
-
16
- export default function Outer(name: string): Inner;
17
- }