@gravity-ui/blog-constructor 5.0.2 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) 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/Paginator/types.d.ts +4 -4
  9. package/build/cjs/components/PostCard/PostCard.d.ts +3 -2
  10. package/build/cjs/components/PostCard/PostCard.js +5 -4
  11. package/build/cjs/components/PostInfo/SuggestPostInfo.d.ts +2 -2
  12. package/build/cjs/components/PostInfo/SuggestPostInfo.js +2 -1
  13. package/build/cjs/components/PostInfo/components/Date.d.ts +2 -1
  14. package/build/cjs/components/PostInfo/components/Date.js +2 -1
  15. package/build/cjs/components/Posts/Posts.js +5 -2
  16. package/build/cjs/components/Search/Search.css +13 -15
  17. package/build/cjs/components/Search/Search.d.ts +7 -1
  18. package/build/cjs/components/Search/Search.js +26 -14
  19. package/build/cjs/models/blocks.d.ts +5 -5
  20. package/build/cjs/models/common.d.ts +8 -0
  21. package/build/cjs/models/common.js +12 -2
  22. package/build/cjs/utils/cn.d.ts +2 -3
  23. package/build/cjs/utils/cn.js +4 -7
  24. package/build/cjs/utils/common.d.ts +1 -0
  25. package/build/cjs/utils/common.js +15 -2
  26. package/build/esm/blocks/Author/Author.js +2 -2
  27. package/build/esm/blocks/Banner/Banner.js +8 -6
  28. package/build/esm/blocks/ColoredText/ColoredText.js +6 -5
  29. package/build/esm/blocks/YFM/YFM.js +6 -4
  30. package/build/esm/components/FeedHeader/components/Controls/Controls.css +5 -23
  31. package/build/esm/components/FeedHeader/components/Controls/Controls.js +1 -1
  32. package/build/esm/components/FeedHeader/components/Controls/customRenders.js +1 -2
  33. package/build/esm/components/Paginator/types.d.ts +4 -4
  34. package/build/esm/components/PostCard/PostCard.d.ts +3 -2
  35. package/build/esm/components/PostCard/PostCard.js +5 -4
  36. package/build/esm/components/PostInfo/SuggestPostInfo.d.ts +2 -2
  37. package/build/esm/components/PostInfo/SuggestPostInfo.js +2 -1
  38. package/build/esm/components/PostInfo/components/Date.d.ts +2 -1
  39. package/build/esm/components/PostInfo/components/Date.js +2 -1
  40. package/build/esm/components/Posts/Posts.js +5 -2
  41. package/build/esm/components/Search/Search.css +13 -15
  42. package/build/esm/components/Search/Search.d.ts +7 -1
  43. package/build/esm/components/Search/Search.js +28 -16
  44. package/build/esm/models/blocks.d.ts +5 -5
  45. package/build/esm/models/common.d.ts +8 -0
  46. package/build/esm/models/common.js +11 -1
  47. package/build/esm/utils/cn.d.ts +2 -3
  48. package/build/esm/utils/cn.js +3 -4
  49. package/build/esm/utils/common.d.ts +1 -0
  50. package/build/esm/utils/common.js +13 -1
  51. package/package.json +5 -6
  52. package/server/models/blocks.d.ts +5 -5
  53. package/server/models/common.d.ts +8 -0
  54. package/server/models/common.js +12 -2
  55. package/build/cjs/components/ButtonWithIcon/ButtonWithIcon.css +0 -76
  56. package/build/cjs/components/ButtonWithIcon/ButtonWithIcon.d.ts +0 -12
  57. package/build/cjs/components/ButtonWithIcon/ButtonWithIcon.js +0 -11
  58. package/build/cjs/demo/DocsDecorator/DocsDecorator.css +0 -14
  59. package/build/cjs/internal-typings/bem-cn-lite.d.ts +0 -17
  60. package/build/esm/components/ButtonWithIcon/ButtonWithIcon.css +0 -76
  61. package/build/esm/components/ButtonWithIcon/ButtonWithIcon.d.ts +0 -13
  62. package/build/esm/components/ButtonWithIcon/ButtonWithIcon.js +0 -7
  63. package/build/esm/demo/DocsDecorator/DocsDecorator.css +0 -14
  64. package/build/esm/internal-typings/bem-cn-lite.d.ts +0 -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,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
- }