@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.
- package/build/cjs/blocks/Author/Author.js +2 -2
- package/build/cjs/blocks/Banner/Banner.js +7 -5
- package/build/cjs/blocks/ColoredText/ColoredText.js +5 -4
- package/build/cjs/blocks/YFM/YFM.js +6 -4
- package/build/cjs/components/FeedHeader/components/Controls/Controls.css +5 -23
- package/build/cjs/components/FeedHeader/components/Controls/Controls.js +1 -1
- package/build/cjs/components/FeedHeader/components/Controls/customRenders.js +1 -2
- package/build/cjs/components/Paginator/types.d.ts +4 -4
- package/build/cjs/components/PostCard/PostCard.d.ts +3 -2
- package/build/cjs/components/PostCard/PostCard.js +5 -4
- package/build/cjs/components/PostInfo/SuggestPostInfo.d.ts +2 -2
- package/build/cjs/components/PostInfo/SuggestPostInfo.js +2 -1
- package/build/cjs/components/PostInfo/components/Date.d.ts +2 -1
- package/build/cjs/components/PostInfo/components/Date.js +2 -1
- package/build/cjs/components/Posts/Posts.js +5 -2
- package/build/cjs/components/Search/Search.css +13 -15
- package/build/cjs/components/Search/Search.d.ts +7 -1
- package/build/cjs/components/Search/Search.js +26 -14
- package/build/cjs/models/blocks.d.ts +5 -5
- package/build/cjs/models/common.d.ts +8 -0
- package/build/cjs/models/common.js +12 -2
- package/build/cjs/utils/cn.d.ts +2 -3
- package/build/cjs/utils/cn.js +4 -7
- package/build/cjs/utils/common.d.ts +1 -0
- package/build/cjs/utils/common.js +15 -2
- package/build/esm/blocks/Author/Author.js +2 -2
- package/build/esm/blocks/Banner/Banner.js +8 -6
- package/build/esm/blocks/ColoredText/ColoredText.js +6 -5
- package/build/esm/blocks/YFM/YFM.js +6 -4
- package/build/esm/components/FeedHeader/components/Controls/Controls.css +5 -23
- package/build/esm/components/FeedHeader/components/Controls/Controls.js +1 -1
- package/build/esm/components/FeedHeader/components/Controls/customRenders.js +1 -2
- package/build/esm/components/Paginator/types.d.ts +4 -4
- package/build/esm/components/PostCard/PostCard.d.ts +3 -2
- package/build/esm/components/PostCard/PostCard.js +5 -4
- package/build/esm/components/PostInfo/SuggestPostInfo.d.ts +2 -2
- package/build/esm/components/PostInfo/SuggestPostInfo.js +2 -1
- package/build/esm/components/PostInfo/components/Date.d.ts +2 -1
- package/build/esm/components/PostInfo/components/Date.js +2 -1
- package/build/esm/components/Posts/Posts.js +5 -2
- package/build/esm/components/Search/Search.css +13 -15
- package/build/esm/components/Search/Search.d.ts +7 -1
- package/build/esm/components/Search/Search.js +28 -16
- package/build/esm/models/blocks.d.ts +5 -5
- package/build/esm/models/common.d.ts +8 -0
- package/build/esm/models/common.js +11 -1
- package/build/esm/utils/cn.d.ts +2 -3
- package/build/esm/utils/cn.js +3 -4
- package/build/esm/utils/common.d.ts +1 -0
- package/build/esm/utils/common.js +13 -1
- package/package.json +5 -6
- package/server/models/blocks.d.ts +5 -5
- package/server/models/common.d.ts +8 -0
- package/server/models/common.js +12 -2
- package/build/cjs/components/ButtonWithIcon/ButtonWithIcon.css +0 -76
- package/build/cjs/components/ButtonWithIcon/ButtonWithIcon.d.ts +0 -12
- package/build/cjs/components/ButtonWithIcon/ButtonWithIcon.js +0 -11
- package/build/cjs/demo/DocsDecorator/DocsDecorator.css +0 -14
- package/build/cjs/internal-typings/bem-cn-lite.d.ts +0 -17
- package/build/esm/components/ButtonWithIcon/ButtonWithIcon.css +0 -76
- package/build/esm/components/ButtonWithIcon/ButtonWithIcon.d.ts +0 -13
- package/build/esm/components/ButtonWithIcon/ButtonWithIcon.js +0 -7
- package/build/esm/demo/DocsDecorator/DocsDecorator.css +0 -14
- 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
|
-
}
|