@gravity-ui/blog-constructor 6.3.0 → 6.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,10 +7,6 @@ unpredictable css rules order in build */
7
7
  display: flex;
8
8
  align-items: center;
9
9
  }
10
- .bc-paginator__link {
11
- text-decoration: none;
12
- color: var(--g-color-text-primary);
13
- }
14
10
  .bc-paginator__item {
15
11
  display: inline-flex;
16
12
  align-items: center;
@@ -20,7 +20,12 @@ const PaginatorItem = ({ dataKey, mods, content, queryParams, onClick, loading =
20
20
  .join('&');
21
21
  return queryString ? `${urlPath}?${queryString}` : urlPath;
22
22
  }, [queryParams, index, urlPath]);
23
- const renderButton = (react_1.default.createElement(uikit_1.Button, { view: "flat", size: "xl", className: b('item', mods), onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(itemKey), loading: loading && Boolean(mods.active) }, content));
24
- return (react_1.default.createElement(react_1.Fragment, null, addNavigationLinkForPages ? (react_1.default.createElement("a", { href: navigationLink, className: b('link'), onClick: (event) => event.preventDefault() }, renderButton)) : (react_1.default.createElement(react_1.Fragment, null, renderButton))));
23
+ const handleClick = (0, react_1.useCallback)((event) => {
24
+ if (addNavigationLinkForPages && (event.metaKey || event.ctrlKey)) {
25
+ return;
26
+ }
27
+ onClick === null || onClick === void 0 ? void 0 : onClick(itemKey);
28
+ }, [addNavigationLinkForPages, itemKey, onClick]);
29
+ return (react_1.default.createElement(uikit_1.Button, { view: "flat", size: "xl", className: b('item', mods), onClick: handleClick, href: addNavigationLinkForPages ? navigationLink : undefined, loading: loading && Boolean(mods.active) }, content));
25
30
  };
26
31
  exports.PaginatorItem = PaginatorItem;
@@ -45,7 +45,7 @@ const Search = ({ className, initialValue, onSubmit, debounce = 300, placeholder
45
45
  onSubmit('');
46
46
  }
47
47
  };
48
- return (react_1.default.createElement("button", { className: b('input-icon'), onClick: handleClick },
48
+ return (react_1.default.createElement("button", { className: b('input-icon'), onClick: handleClick, "aria-label": (0, i18n_1.i18n)(i18n_1.Keyset.SearchAction) },
49
49
  react_1.default.createElement(uikit_1.Icon, { size: iconSize, data: iconData })));
50
50
  }, [handleChange, onSubmit, value]);
51
51
  return (react_1.default.createElement("div", { className: b({ size }, className) },
@@ -70,6 +70,9 @@ unpredictable css rules order in build */
70
70
  .yfm_blog ul {
71
71
  margin: 0 0 16px;
72
72
  }
73
+ .yfm_blog *:has(+ dfn) {
74
+ margin-bottom: 0 !important;
75
+ }
73
76
  .yfm_blog img {
74
77
  margin-bottom: 32px;
75
78
  margin-top: 16px;
@@ -18,6 +18,7 @@ export declare enum Keyset {
18
18
  AllServices = "label_all_services",
19
19
  PromptSignInOnLike = "prompt_sign_in_on_like",
20
20
  SignIn = "Sign In",
21
- Save = "save"
21
+ Save = "save",
22
+ SearchAction = "search_action"
22
23
  }
23
24
  export declare const i18n: (key: Keyset, params?: import("@gravity-ui/i18n").Params | undefined) => string;
@@ -25,6 +25,7 @@ var Keyset;
25
25
  Keyset["PromptSignInOnLike"] = "prompt_sign_in_on_like";
26
26
  Keyset["SignIn"] = "Sign In";
27
27
  Keyset["Save"] = "save";
28
+ Keyset["SearchAction"] = "search_action";
28
29
  })(Keyset = exports.Keyset || (exports.Keyset = {}));
29
30
  const en = {
30
31
  [Keyset.Title]: 'Blog',
@@ -51,6 +52,7 @@ const en = {
51
52
  ],
52
53
  [Keyset.SignIn]: 'Sign In',
53
54
  [Keyset.Save]: 'Save',
55
+ [Keyset.SearchAction]: 'Find',
54
56
  };
55
57
  const ru = {
56
58
  [Keyset.Title]: 'Блог',
@@ -77,5 +79,6 @@ const ru = {
77
79
  ],
78
80
  [Keyset.SignIn]: 'Войти',
79
81
  [Keyset.Save]: 'Сохранить',
82
+ [Keyset.SearchAction]: 'Найти',
80
83
  };
81
84
  exports.i18n = (0, i18n_1.addComponentKeysets)({ en, ru }, NAMESPACE);
@@ -7,10 +7,6 @@ unpredictable css rules order in build */
7
7
  display: flex;
8
8
  align-items: center;
9
9
  }
10
- .bc-paginator__link {
11
- text-decoration: none;
12
- color: var(--g-color-text-primary);
13
- }
14
10
  .bc-paginator__item {
15
11
  display: inline-flex;
16
12
  align-items: center;
@@ -1,4 +1,4 @@
1
- import React, { Fragment, useContext, useMemo } from 'react';
1
+ import React, { useCallback, useContext, useMemo } from 'react';
2
2
  import { Button } from '@gravity-ui/uikit';
3
3
  import { LocaleContext } from '../../../contexts/LocaleContext';
4
4
  import { SettingsContext } from '../../../contexts/SettingsContext';
@@ -17,6 +17,11 @@ export const PaginatorItem = ({ dataKey, mods, content, queryParams, onClick, lo
17
17
  .join('&');
18
18
  return queryString ? `${urlPath}?${queryString}` : urlPath;
19
19
  }, [queryParams, index, urlPath]);
20
- const renderButton = (React.createElement(Button, { view: "flat", size: "xl", className: b('item', mods), onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(itemKey), loading: loading && Boolean(mods.active) }, content));
21
- return (React.createElement(Fragment, null, addNavigationLinkForPages ? (React.createElement("a", { href: navigationLink, className: b('link'), onClick: (event) => event.preventDefault() }, renderButton)) : (React.createElement(Fragment, null, renderButton))));
20
+ const handleClick = useCallback((event) => {
21
+ if (addNavigationLinkForPages && (event.metaKey || event.ctrlKey)) {
22
+ return;
23
+ }
24
+ onClick === null || onClick === void 0 ? void 0 : onClick(itemKey);
25
+ }, [addNavigationLinkForPages, itemKey, onClick]);
26
+ return (React.createElement(Button, { view: "flat", size: "xl", className: b('item', mods), onClick: handleClick, href: addNavigationLinkForPages ? navigationLink : undefined, loading: loading && Boolean(mods.active) }, content));
22
27
  };
@@ -42,7 +42,7 @@ export const Search = ({ className, initialValue, onSubmit, debounce = 300, plac
42
42
  onSubmit('');
43
43
  }
44
44
  };
45
- return (React.createElement("button", { className: b('input-icon'), onClick: handleClick },
45
+ return (React.createElement("button", { className: b('input-icon'), onClick: handleClick, "aria-label": i18n(Keyset.SearchAction) },
46
46
  React.createElement(Icon, { size: iconSize, data: iconData })));
47
47
  }, [handleChange, onSubmit, value]);
48
48
  return (React.createElement("div", { className: b({ size }, className) },
@@ -70,6 +70,9 @@ unpredictable css rules order in build */
70
70
  .yfm_blog ul {
71
71
  margin: 0 0 16px;
72
72
  }
73
+ .yfm_blog *:has(+ dfn) {
74
+ margin-bottom: 0 !important;
75
+ }
73
76
  .yfm_blog img {
74
77
  margin-bottom: 32px;
75
78
  margin-top: 16px;
@@ -18,6 +18,7 @@ export declare enum Keyset {
18
18
  AllServices = "label_all_services",
19
19
  PromptSignInOnLike = "prompt_sign_in_on_like",
20
20
  SignIn = "Sign In",
21
- Save = "save"
21
+ Save = "save",
22
+ SearchAction = "search_action"
22
23
  }
23
24
  export declare const i18n: (key: Keyset, params?: import("@gravity-ui/i18n").Params | undefined) => string;
@@ -22,6 +22,7 @@ export var Keyset;
22
22
  Keyset["PromptSignInOnLike"] = "prompt_sign_in_on_like";
23
23
  Keyset["SignIn"] = "Sign In";
24
24
  Keyset["Save"] = "save";
25
+ Keyset["SearchAction"] = "search_action";
25
26
  })(Keyset || (Keyset = {}));
26
27
  const en = {
27
28
  [Keyset.Title]: 'Blog',
@@ -48,6 +49,7 @@ const en = {
48
49
  ],
49
50
  [Keyset.SignIn]: 'Sign In',
50
51
  [Keyset.Save]: 'Save',
52
+ [Keyset.SearchAction]: 'Find',
51
53
  };
52
54
  const ru = {
53
55
  [Keyset.Title]: 'Блог',
@@ -74,5 +76,6 @@ const ru = {
74
76
  ],
75
77
  [Keyset.SignIn]: 'Войти',
76
78
  [Keyset.Save]: 'Сохранить',
79
+ [Keyset.SearchAction]: 'Найти',
77
80
  };
78
81
  export const i18n = addComponentKeysets({ en, ru }, NAMESPACE);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/blog-constructor",
3
- "version": "6.3.0",
3
+ "version": "6.4.0",
4
4
  "description": "Gravity UI Blog Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
package/styles/styles.css CHANGED
@@ -47,6 +47,9 @@ unpredictable css rules order in build */
47
47
  .yfm_blog ul {
48
48
  margin: 0 0 16px;
49
49
  }
50
+ .yfm_blog *:has(+ dfn) {
51
+ margin-bottom: 0 !important;
52
+ }
50
53
  .yfm_blog img {
51
54
  margin-bottom: 32px;
52
55
  margin-top: 16px;
package/styles/yfm.css CHANGED
@@ -46,6 +46,9 @@ unpredictable css rules order in build */
46
46
  .yfm_blog ul {
47
47
  margin: 0 0 16px;
48
48
  }
49
+ .yfm_blog *:has(+ dfn) {
50
+ margin-bottom: 0 !important;
51
+ }
49
52
  .yfm_blog img {
50
53
  margin-bottom: 32px;
51
54
  margin-top: 16px;
package/styles/yfm.scss CHANGED
@@ -52,6 +52,11 @@
52
52
  margin: 0 0 $indentXS;
53
53
  }
54
54
 
55
+ *:has(+ dfn) {
56
+ //stylelint-disable-next-line declaration-no-important
57
+ margin-bottom: 0 !important;
58
+ }
59
+
55
60
  img {
56
61
  margin-bottom: $indentM;
57
62
  margin-top: $indentXS;