@gravity-ui/blog-constructor 5.5.0-alpha.0 → 5.5.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/FeedHeader/components/Controls/customRenders.js +1 -1
- package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.css +0 -8
- package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.d.ts +1 -1
- package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.js +2 -2
- package/build/cjs/containers/BlogPostPage/BlogPostPage.css +0 -7
- package/build/esm/components/FeedHeader/components/Controls/customRenders.js +1 -1
- package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.css +0 -8
- package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.d.ts +1 -1
- package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.js +2 -2
- package/build/esm/containers/BlogPostPage/BlogPostPage.css +0 -7
- package/package.json +3 -3
@@ -11,7 +11,7 @@ const CustomSwitcher_1 = require("../CustomSwitcher/CustomSwitcher");
|
|
11
11
|
const b = (0, cn_1.block)('feed-controls');
|
12
12
|
const renderSwitcher = ({ initial, list, defaultLabel }) =>
|
13
13
|
// eslint-disable-next-line react/display-name
|
14
|
-
({ onClick, ref
|
14
|
+
({ onClick, ref }) => (react_1.default.createElement(CustomSwitcher_1.CustomSwitcher, { initial: initial, defaultLabel: defaultLabel, list: list, controlRef: ref, onClick: onClick }));
|
15
15
|
exports.renderSwitcher = renderSwitcher;
|
16
16
|
const renderFilter = ({ value, ref, onChange, onKeyDown }) => (react_1.default.createElement(uikit_1.TextInput, { controlRef: ref, controlProps: { size: 1 }, value: value, view: "clear", placeholder: (0, i18n_1.i18)(i18n_1.Keyset.Search), onUpdate: onChange, onKeyDown: onKeyDown, className: b('popup-filter') }));
|
17
17
|
exports.renderFilter = renderFilter;
|
@@ -12,14 +12,6 @@ unpredictable css rules order in build */
|
|
12
12
|
border-radius: var(--g-border-radius-xl);
|
13
13
|
width: 100%;
|
14
14
|
line-height: 42px;
|
15
|
-
text-align: initial;
|
16
|
-
}
|
17
|
-
.bc-feed-custom-switcher__custom-switcher:focus {
|
18
|
-
outline: 2px solid var(--g-color-line-focus);
|
19
|
-
outline-offset: 0;
|
20
|
-
}
|
21
|
-
.bc-feed-custom-switcher__custom-switcher:focus:not(:focus-visible) {
|
22
|
-
outline: 0;
|
23
15
|
}
|
24
16
|
.bc-feed-custom-switcher__custom-switcher + .yc-popup.yc-popup_open {
|
25
17
|
position: absolute !important;
|
@@ -8,5 +8,5 @@ export type CustomSwitcherProps = {
|
|
8
8
|
list: SelectItem[];
|
9
9
|
controlRef: RenderControlParameters['ref'];
|
10
10
|
} & Omit<RenderControlParameters, 'ref'>;
|
11
|
-
export declare const CustomSwitcher: ({ initial, defaultLabel, list, onClick, controlRef,
|
11
|
+
export declare const CustomSwitcher: ({ initial, defaultLabel, list, onClick, controlRef, }: CustomSwitcherProps) => React.JSX.Element;
|
12
12
|
export {};
|
@@ -8,7 +8,7 @@ const DropdownArrow_1 = require("../../../../icons/DropdownArrow");
|
|
8
8
|
const cn_1 = require("../../../../utils/cn");
|
9
9
|
const b = (0, cn_1.block)('feed-custom-switcher');
|
10
10
|
const ICON_SIZE = 12;
|
11
|
-
const CustomSwitcher = ({ initial, defaultLabel, list, onClick, controlRef,
|
11
|
+
const CustomSwitcher = ({ initial, defaultLabel, list, onClick, controlRef, }) => {
|
12
12
|
const itemsNames = (0, react_1.useMemo)(() => {
|
13
13
|
const items = list
|
14
14
|
.filter((item) => initial.includes(item.value))
|
@@ -16,7 +16,7 @@ const CustomSwitcher = ({ initial, defaultLabel, list, onClick, controlRef, onKe
|
|
16
16
|
return items.length ? items : [defaultLabel];
|
17
17
|
}, [defaultLabel, initial, list]);
|
18
18
|
const hasCounter = itemsNames.length > 1;
|
19
|
-
return (react_1.default.createElement("
|
19
|
+
return (react_1.default.createElement("div", { className: b('custom-switcher'), onClick: onClick, ref: controlRef },
|
20
20
|
react_1.default.createElement("div", { className: b('custom-switcher-element', { content: true }) }, itemsNames === null || itemsNames === void 0 ? void 0 : itemsNames.join(', ')),
|
21
21
|
hasCounter && (react_1.default.createElement("div", { className: b('custom-switcher-element', { counter: true }) }, itemsNames.length)),
|
22
22
|
react_1.default.createElement("div", { className: b('custom-switcher-element', { arrow: true }) },
|
@@ -194,7 +194,6 @@ unpredictable css rules order in build */
|
|
194
194
|
color: var(--g-color-text-link);
|
195
195
|
text-decoration: none;
|
196
196
|
cursor: pointer;
|
197
|
-
border-radius: var(--g-focus-border-radius);
|
198
197
|
}
|
199
198
|
.utilityfocus .yfm_constructor a:focus {
|
200
199
|
outline: 2px solid #ffdb4d;
|
@@ -203,12 +202,6 @@ unpredictable css rules order in build */
|
|
203
202
|
--pc-text-header-color: var(--g-color-text-link-hover);
|
204
203
|
color: var(--g-color-text-link-hover);
|
205
204
|
}
|
206
|
-
.yfm_constructor a:focus {
|
207
|
-
box-shadow: 0 0 0 2px var(--g-color-line-focus);
|
208
|
-
}
|
209
|
-
.yfm_constructor a:focus:not(:focus-visible) {
|
210
|
-
box-shadow: none;
|
211
|
-
}
|
212
205
|
.yfm_constructor table {
|
213
206
|
color: var(--g-color-text-primary);
|
214
207
|
border: 1px solid var(--g-color-line-generic);
|
@@ -8,6 +8,6 @@ import './Controls.css';
|
|
8
8
|
const b = block('feed-controls');
|
9
9
|
export const renderSwitcher = ({ initial, list, defaultLabel }) =>
|
10
10
|
// eslint-disable-next-line react/display-name
|
11
|
-
({ onClick, ref
|
11
|
+
({ onClick, ref }) => (React.createElement(CustomSwitcher, { initial: initial, defaultLabel: defaultLabel, list: list, controlRef: ref, onClick: onClick }));
|
12
12
|
export const renderFilter = ({ value, ref, onChange, onKeyDown }) => (React.createElement(TextInput, { controlRef: ref, controlProps: { size: 1 }, value: value, view: "clear", placeholder: i18(Keyset.Search), onUpdate: onChange, onKeyDown: onKeyDown, className: b('popup-filter') }));
|
13
13
|
export const renderOption = (option) => (React.createElement(CustomSelectOption, { data: option }));
|
@@ -12,14 +12,6 @@ unpredictable css rules order in build */
|
|
12
12
|
border-radius: var(--g-border-radius-xl);
|
13
13
|
width: 100%;
|
14
14
|
line-height: 42px;
|
15
|
-
text-align: initial;
|
16
|
-
}
|
17
|
-
.bc-feed-custom-switcher__custom-switcher:focus {
|
18
|
-
outline: 2px solid var(--g-color-line-focus);
|
19
|
-
outline-offset: 0;
|
20
|
-
}
|
21
|
-
.bc-feed-custom-switcher__custom-switcher:focus:not(:focus-visible) {
|
22
|
-
outline: 0;
|
23
15
|
}
|
24
16
|
.bc-feed-custom-switcher__custom-switcher + .yc-popup.yc-popup_open {
|
25
17
|
position: absolute !important;
|
@@ -9,5 +9,5 @@ export type CustomSwitcherProps = {
|
|
9
9
|
list: SelectItem[];
|
10
10
|
controlRef: RenderControlParameters['ref'];
|
11
11
|
} & Omit<RenderControlParameters, 'ref'>;
|
12
|
-
export declare const CustomSwitcher: ({ initial, defaultLabel, list, onClick, controlRef,
|
12
|
+
export declare const CustomSwitcher: ({ initial, defaultLabel, list, onClick, controlRef, }: CustomSwitcherProps) => React.JSX.Element;
|
13
13
|
export {};
|
@@ -5,7 +5,7 @@ import { block } from '../../../../utils/cn';
|
|
5
5
|
import './CustomSwitcher.css';
|
6
6
|
const b = block('feed-custom-switcher');
|
7
7
|
const ICON_SIZE = 12;
|
8
|
-
export const CustomSwitcher = ({ initial, defaultLabel, list, onClick, controlRef,
|
8
|
+
export const CustomSwitcher = ({ initial, defaultLabel, list, onClick, controlRef, }) => {
|
9
9
|
const itemsNames = useMemo(() => {
|
10
10
|
const items = list
|
11
11
|
.filter((item) => initial.includes(item.value))
|
@@ -13,7 +13,7 @@ export const CustomSwitcher = ({ initial, defaultLabel, list, onClick, controlRe
|
|
13
13
|
return items.length ? items : [defaultLabel];
|
14
14
|
}, [defaultLabel, initial, list]);
|
15
15
|
const hasCounter = itemsNames.length > 1;
|
16
|
-
return (React.createElement("
|
16
|
+
return (React.createElement("div", { className: b('custom-switcher'), onClick: onClick, ref: controlRef },
|
17
17
|
React.createElement("div", { className: b('custom-switcher-element', { content: true }) }, itemsNames === null || itemsNames === void 0 ? void 0 : itemsNames.join(', ')),
|
18
18
|
hasCounter && (React.createElement("div", { className: b('custom-switcher-element', { counter: true }) }, itemsNames.length)),
|
19
19
|
React.createElement("div", { className: b('custom-switcher-element', { arrow: true }) },
|
@@ -194,7 +194,6 @@ unpredictable css rules order in build */
|
|
194
194
|
color: var(--g-color-text-link);
|
195
195
|
text-decoration: none;
|
196
196
|
cursor: pointer;
|
197
|
-
border-radius: var(--g-focus-border-radius);
|
198
197
|
}
|
199
198
|
.utilityfocus .yfm_constructor a:focus {
|
200
199
|
outline: 2px solid #ffdb4d;
|
@@ -203,12 +202,6 @@ unpredictable css rules order in build */
|
|
203
202
|
--pc-text-header-color: var(--g-color-text-link-hover);
|
204
203
|
color: var(--g-color-text-link-hover);
|
205
204
|
}
|
206
|
-
.yfm_constructor a:focus {
|
207
|
-
box-shadow: 0 0 0 2px var(--g-color-line-focus);
|
208
|
-
}
|
209
|
-
.yfm_constructor a:focus:not(:focus-visible) {
|
210
|
-
box-shadow: none;
|
211
|
-
}
|
212
205
|
.yfm_constructor table {
|
213
206
|
color: var(--g-color-text-primary);
|
214
207
|
border: 1px solid var(--g-color-line-generic);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gravity-ui/blog-constructor",
|
3
|
-
"version": "5.5.0
|
3
|
+
"version": "5.5.0",
|
4
4
|
"description": "Gravity UI Blog Constructor",
|
5
5
|
"license": "MIT",
|
6
6
|
"repository": {
|
@@ -78,7 +78,7 @@
|
|
78
78
|
},
|
79
79
|
"peerDependencies": {
|
80
80
|
"@doc-tools/transform": "^3.3.2",
|
81
|
-
"@gravity-ui/page-constructor": "^4.
|
81
|
+
"@gravity-ui/page-constructor": "^4.0.0",
|
82
82
|
"@gravity-ui/uikit": "^5.1.0",
|
83
83
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0"
|
84
84
|
},
|
@@ -89,7 +89,7 @@
|
|
89
89
|
"@commitlint/config-conventional": "^17.4.3",
|
90
90
|
"@doc-tools/transform": "^3.3.2",
|
91
91
|
"@gravity-ui/eslint-config": "^2.0.0",
|
92
|
-
"@gravity-ui/page-constructor": "^4.
|
92
|
+
"@gravity-ui/page-constructor": "^4.20.2",
|
93
93
|
"@gravity-ui/prettier-config": "^1.0.1",
|
94
94
|
"@gravity-ui/stylelint-config": "^1.0.0",
|
95
95
|
"@gravity-ui/tsconfig": "^1.0.0",
|