ublo-lib 1.47.93 → 1.47.95

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.
@@ -101,11 +101,8 @@ const SearchBar = ({ lang, resultFormatter, backdrop, OverrideIcons = {}, messag
101
101
  });
102
102
  }
103
103
  };
104
- const focusInput = (focus = true) => {
105
- sendEvent("basic", "load");
106
- if (focus) {
107
- input.current.focus();
108
- }
104
+ const focusInput = () => {
105
+ input.current.focus();
109
106
  };
110
107
  const handleKeyPresses = React.useCallback((e) => {
111
108
  const allowedKeys = ["k"];
@@ -143,7 +140,10 @@ const SearchBar = ({ lang, resultFormatter, backdrop, OverrideIcons = {}, messag
143
140
  "search-bar--opened": results.length > 0,
144
141
  "search-bar--loading": search?.loading,
145
142
  });
146
- return (_jsxs("div", { className: classes, onFocus: focusInput, children: [backdrop && _jsx("div", { className: "search-bar__backdrop", onClick: close }), _jsxs("div", { className: "search-bar__input-container", children: [_jsx("input", { ref: input, type: "text", value: text, onChange: updateSearch, onKeyDown: handleKeyDown, className: "search-bar__input", placeholder: message(ubloLang, "what-are-you-looking-for", messages), onBlur: handleBlur }), _jsx(Icon, { className: "search-bar__icon" }), _jsxs("div", { ref: resultsContainer, className: "search-bar__results", children: [results?.map((result, i) => {
143
+ return (_jsxs("div", { className: classes, onFocus: () => {
144
+ sendEvent("basic", "load");
145
+ focusInput();
146
+ }, children: [backdrop && _jsx("div", { className: "search-bar__backdrop", onClick: close }), _jsxs("div", { className: "search-bar__input-container", children: [_jsx("input", { ref: input, type: "text", value: text, onChange: updateSearch, onKeyDown: handleKeyDown, className: "search-bar__input", placeholder: message(ubloLang, "what-are-you-looking-for", messages), onBlur: handleBlur }), _jsx(Icon, { className: "search-bar__icon" }), _jsxs("div", { ref: resultsContainer, className: "search-bar__results", children: [results?.map((result, i) => {
147
147
  const { name, title, page, path } = result;
148
148
  const externalLink = page === undefined;
149
149
  const Tag = externalLink ? "a" : Link;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.47.93",
3
+ "version": "1.47.95",
4
4
  "peerDependencies": {
5
5
  "classnames": "^2.5.1",
6
6
  "dt-design-system": "^3.12.0",