@gravity-ui/blog-constructor 6.3.1 → 6.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -107,7 +107,7 @@ const Controls = ({ handleLoadData, tags = [], services = [], queryParams, }) =>
107
107
  defaultLabel: (0, i18n_1.i18n)(i18n_1.Keyset.AllServices),
108
108
  }), virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: customRenders_1.renderOption, renderFilter: customRenders_1.renderFilter }))) : null,
109
109
  hasLikes ? (react_1.default.createElement("div", { className: b('filter-item', { 'width-auto': true }) },
110
- react_1.default.createElement(uikit_1.Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly },
110
+ react_1.default.createElement(uikit_1.Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly, selected: savedOnly },
111
111
  react_1.default.createElement(uikit_1.Icon, { data: Save_1.Save, size: ICON_SIZE, className: b('icon', { savedOnly }) }),
112
112
  (0, i18n_1.i18n)(i18n_1.Keyset.ActionSavedOnly)))) : null)));
113
113
  };
@@ -39,13 +39,15 @@ const Search = ({ className, initialValue, onSubmit, debounce = 300, placeholder
39
39
  const iconData = value ? Close_1.Close : SearchIcon_1.SearchIcon;
40
40
  const iconSize = value ? CLOSE_ICON_SIZE : SEARCH_ICON_SIZE;
41
41
  const handleClick = () => {
42
+ var _a;
42
43
  if (value) {
43
44
  handleChange.cancel();
44
45
  setValue('');
45
46
  onSubmit('');
47
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
46
48
  }
47
49
  };
48
- return (react_1.default.createElement("button", { className: b('input-icon'), onClick: handleClick },
50
+ return (react_1.default.createElement("button", { className: b('input-icon'), onClick: handleClick, "aria-label": value ? (0, i18n_1.i18n)(i18n_1.Keyset.ClearAction) : undefined, "aria-hidden": !value },
49
51
  react_1.default.createElement(uikit_1.Icon, { size: iconSize, data: iconData })));
50
52
  }, [handleChange, onSubmit, value]);
51
53
  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
+ ClearAction = "clear_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["ClearAction"] = "clear_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.ClearAction]: 'Clear',
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.ClearAction]: 'Очистить',
80
83
  };
81
84
  exports.i18n = (0, i18n_1.addComponentKeysets)({ en, ru }, NAMESPACE);
@@ -104,7 +104,7 @@ export const Controls = ({ handleLoadData, tags = [], services = [], queryParams
104
104
  defaultLabel: i18n(Keyset.AllServices),
105
105
  }), virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: renderOption, renderFilter: renderFilter }))) : null,
106
106
  hasLikes ? (React.createElement("div", { className: b('filter-item', { 'width-auto': true }) },
107
- React.createElement(Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly },
107
+ React.createElement(Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly, selected: savedOnly },
108
108
  React.createElement(Icon, { data: Save, size: ICON_SIZE, className: b('icon', { savedOnly }) }),
109
109
  i18n(Keyset.ActionSavedOnly)))) : null)));
110
110
  };
@@ -36,13 +36,15 @@ export const Search = ({ className, initialValue, onSubmit, debounce = 300, plac
36
36
  const iconData = value ? Close : SearchIcon;
37
37
  const iconSize = value ? CLOSE_ICON_SIZE : SEARCH_ICON_SIZE;
38
38
  const handleClick = () => {
39
+ var _a;
39
40
  if (value) {
40
41
  handleChange.cancel();
41
42
  setValue('');
42
43
  onSubmit('');
44
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
43
45
  }
44
46
  };
45
- return (React.createElement("button", { className: b('input-icon'), onClick: handleClick },
47
+ return (React.createElement("button", { className: b('input-icon'), onClick: handleClick, "aria-label": value ? i18n(Keyset.ClearAction) : undefined, "aria-hidden": !value },
46
48
  React.createElement(Icon, { size: iconSize, data: iconData })));
47
49
  }, [handleChange, onSubmit, value]);
48
50
  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
+ ClearAction = "clear_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["ClearAction"] = "clear_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.ClearAction]: 'Clear',
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.ClearAction]: 'Очистить',
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.1",
3
+ "version": "6.4.1",
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;