@gravity-ui/blog-constructor 5.16.0 → 5.16.1-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/build/cjs/blocks/Feed/Feed.js +2 -1
- package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.css +6 -0
- package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.js +2 -1
- package/build/esm/blocks/Feed/Feed.js +2 -1
- package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.css +6 -0
- package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.js +2 -1
- package/package.json +1 -1
@@ -56,11 +56,12 @@ const Feed = ({ image }) => {
|
|
56
56
|
dispatch({ type: reducer_1.ActionTypes.SetErrorLoad, payload: value });
|
57
57
|
};
|
58
58
|
const handleChangeQueryParams = (0, react_1.useCallback)((value) => {
|
59
|
+
var _a;
|
59
60
|
dispatch({ type: reducer_1.ActionTypes.QueryParamsChange, payload: value });
|
60
61
|
const hasFirstPageQuery = Object.keys(value).some((queryKey) => queryKey === PAGE_QUERY && value[queryKey] === FIRST_PAGE);
|
61
62
|
const result = hasFirstPageQuery
|
62
63
|
? Object.assign(Object.assign({}, value), { [PAGE_QUERY]: null }) : Object.assign({}, value);
|
63
|
-
router.updateQueryCallback(result);
|
64
|
+
(_a = router === null || router === void 0 ? void 0 : router.updateQueryCallback) === null || _a === void 0 ? void 0 : _a.call(router, result);
|
64
65
|
}, [router]);
|
65
66
|
const fetchData = (0, react_1.useCallback)(async ({ page, query }) => {
|
66
67
|
if (query && getPosts) {
|
@@ -45,6 +45,7 @@ unpredictable css rules order in build */
|
|
45
45
|
text-overflow: ellipsis;
|
46
46
|
white-space: nowrap;
|
47
47
|
padding: 0 12px;
|
48
|
+
color: var(--g-color-text-primary);
|
48
49
|
}
|
49
50
|
.bc-feed-custom-switcher__custom-switcher-element_counter {
|
50
51
|
align-items: center;
|
@@ -63,6 +64,11 @@ unpredictable css rules order in build */
|
|
63
64
|
min-width: 30px;
|
64
65
|
height: 100%;
|
65
66
|
}
|
67
|
+
.bc-feed-custom-switcher__custom-switcher-element_overlay {
|
68
|
+
position: absolute;
|
69
|
+
inset: 0;
|
70
|
+
border-radius: var(--g-border-radius-xl);
|
71
|
+
}
|
66
72
|
.bc-feed-custom-switcher__switcher-arrow {
|
67
73
|
width: 16px;
|
68
74
|
height: 16px;
|
@@ -18,7 +18,8 @@ const CustomSwitcher = ({ initial, defaultLabel, list, onClick, controlRef, onKe
|
|
18
18
|
return items.length ? items : [defaultLabel];
|
19
19
|
}, [defaultLabel, initial, list]);
|
20
20
|
const hasCounter = itemsNames.length > 1;
|
21
|
-
return (react_1.default.createElement("button", { className: b('custom-switcher'),
|
21
|
+
return (react_1.default.createElement("button", { className: b('custom-switcher'), ref: controlRef, onKeyDown: onKeyDown, "aria-expanded": open },
|
22
|
+
react_1.default.createElement("div", { onClick: onClick, className: b('custom-switcher-element', { overlay: true }) }),
|
22
23
|
react_1.default.createElement("div", { className: b('custom-switcher-element', { content: true }) }, itemsNames === null || itemsNames === void 0 ? void 0 : itemsNames.join(', ')),
|
23
24
|
renderClear &&
|
24
25
|
renderClear({
|
@@ -52,11 +52,12 @@ export const Feed = ({ image }) => {
|
|
52
52
|
dispatch({ type: ActionTypes.SetErrorLoad, payload: value });
|
53
53
|
};
|
54
54
|
const handleChangeQueryParams = useCallback((value) => {
|
55
|
+
var _a;
|
55
56
|
dispatch({ type: ActionTypes.QueryParamsChange, payload: value });
|
56
57
|
const hasFirstPageQuery = Object.keys(value).some((queryKey) => queryKey === PAGE_QUERY && value[queryKey] === FIRST_PAGE);
|
57
58
|
const result = hasFirstPageQuery
|
58
59
|
? Object.assign(Object.assign({}, value), { [PAGE_QUERY]: null }) : Object.assign({}, value);
|
59
|
-
router.updateQueryCallback(result);
|
60
|
+
(_a = router === null || router === void 0 ? void 0 : router.updateQueryCallback) === null || _a === void 0 ? void 0 : _a.call(router, result);
|
60
61
|
}, [router]);
|
61
62
|
const fetchData = useCallback(async ({ page, query }) => {
|
62
63
|
if (query && getPosts) {
|
@@ -45,6 +45,7 @@ unpredictable css rules order in build */
|
|
45
45
|
text-overflow: ellipsis;
|
46
46
|
white-space: nowrap;
|
47
47
|
padding: 0 12px;
|
48
|
+
color: var(--g-color-text-primary);
|
48
49
|
}
|
49
50
|
.bc-feed-custom-switcher__custom-switcher-element_counter {
|
50
51
|
align-items: center;
|
@@ -63,6 +64,11 @@ unpredictable css rules order in build */
|
|
63
64
|
min-width: 30px;
|
64
65
|
height: 100%;
|
65
66
|
}
|
67
|
+
.bc-feed-custom-switcher__custom-switcher-element_overlay {
|
68
|
+
position: absolute;
|
69
|
+
inset: 0;
|
70
|
+
border-radius: var(--g-border-radius-xl);
|
71
|
+
}
|
66
72
|
.bc-feed-custom-switcher__switcher-arrow {
|
67
73
|
width: 16px;
|
68
74
|
height: 16px;
|
@@ -15,7 +15,8 @@ export const CustomSwitcher = ({ initial, defaultLabel, list, onClick, controlRe
|
|
15
15
|
return items.length ? items : [defaultLabel];
|
16
16
|
}, [defaultLabel, initial, list]);
|
17
17
|
const hasCounter = itemsNames.length > 1;
|
18
|
-
return (React.createElement("button", { className: b('custom-switcher'),
|
18
|
+
return (React.createElement("button", { className: b('custom-switcher'), ref: controlRef, onKeyDown: onKeyDown, "aria-expanded": open },
|
19
|
+
React.createElement("div", { onClick: onClick, className: b('custom-switcher-element', { overlay: true }) }),
|
19
20
|
React.createElement("div", { className: b('custom-switcher-element', { content: true }) }, itemsNames === null || itemsNames === void 0 ? void 0 : itemsNames.join(', ')),
|
20
21
|
renderClear &&
|
21
22
|
renderClear({
|