@synerise/ds-search-bar 0.7.2 → 0.7.4

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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.7.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search-bar@0.7.3...@synerise/ds-search-bar@0.7.4) (2024-11-29)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-search-bar
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.7.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search-bar@0.7.2...@synerise/ds-search-bar@0.7.3) (2024-11-28)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-search-bar
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.7.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search-bar@0.7.1...@synerise/ds-search-bar@0.7.2) (2024-11-21)
7
23
 
8
24
 
package/dist/SearchBar.js CHANGED
@@ -4,38 +4,33 @@ import Icon, { Close3M } from '@synerise/ds-icon';
4
4
  import { theme } from '@synerise/ds-core';
5
5
  import Tooltip from '@synerise/ds-tooltip';
6
6
  import * as S from './SearchBar.styles';
7
-
8
7
  var SearchBar = function SearchBar(_ref) {
9
8
  var value = _ref.value,
10
- className = _ref.className,
11
- onSearchChange = _ref.onSearchChange,
12
- onClearInput = _ref.onClearInput,
13
- placeholder = _ref.placeholder,
14
- iconLeft = _ref.iconLeft,
15
- autofocus = _ref.autofocus,
16
- _ref$clearTooltip = _ref.clearTooltip,
17
- clearTooltip = _ref$clearTooltip === void 0 ? /*#__PURE__*/React.createElement(FormattedMessage, {
18
- id: "DS.SEARCH-BAR.CLEAR-TOOLTIP"
19
- }) : _ref$clearTooltip,
20
- disabled = _ref.disabled,
21
- borderRadius = _ref.borderRadius,
22
- handleInputRef = _ref.handleInputRef,
23
- autofocusDelay = _ref.autofocusDelay;
24
-
9
+ className = _ref.className,
10
+ onSearchChange = _ref.onSearchChange,
11
+ onClearInput = _ref.onClearInput,
12
+ placeholder = _ref.placeholder,
13
+ iconLeft = _ref.iconLeft,
14
+ autofocus = _ref.autofocus,
15
+ _ref$clearTooltip = _ref.clearTooltip,
16
+ clearTooltip = _ref$clearTooltip === void 0 ? /*#__PURE__*/React.createElement(FormattedMessage, {
17
+ id: "DS.SEARCH-BAR.CLEAR-TOOLTIP"
18
+ }) : _ref$clearTooltip,
19
+ disabled = _ref.disabled,
20
+ borderRadius = _ref.borderRadius,
21
+ handleInputRef = _ref.handleInputRef,
22
+ autofocusDelay = _ref.autofocusDelay;
25
23
  var _useState = useState(false),
26
- isFocused = _useState[0],
27
- setFocus = _useState[1];
28
-
24
+ isFocused = _useState[0],
25
+ setFocus = _useState[1];
29
26
  var _useState2 = useState(),
30
- input = _useState2[0],
31
- setInput = _useState2[1];
32
-
27
+ input = _useState2[0],
28
+ setInput = _useState2[1];
33
29
  var handleRef = function handleRef(ref) {
34
30
  // eslint-disable-next-line no-unused-expressions
35
31
  handleInputRef == null || handleInputRef(ref);
36
32
  if (ref.current) setInput(ref.current);
37
33
  };
38
-
39
34
  useEffect(function () {
40
35
  if (input) {
41
36
  if (autofocus) {
@@ -49,13 +44,11 @@ var SearchBar = function SearchBar(_ref) {
49
44
  clearTimeout(timeout);
50
45
  };
51
46
  }
52
-
53
47
  input.focus({
54
48
  preventScroll: true
55
49
  });
56
50
  }
57
51
  }
58
-
59
52
  return undefined;
60
53
  }, [autofocus, autofocusDelay, input]);
61
54
  return /*#__PURE__*/React.createElement(S.SearchBarWrapper, {
@@ -93,5 +86,4 @@ var SearchBar = function SearchBar(_ref) {
93
86
  autoComplete: "off"
94
87
  }));
95
88
  };
96
-
97
89
  export default SearchBar;
@@ -15,7 +15,8 @@ export var SearchBar = styled(Input).withConfig({
15
15
  return props.theme.palette['grey-050'];
16
16
  }, function (props) {
17
17
  return props.theme.palette['blue-600'];
18
- }); // placeholder styling rules have to be separated
18
+ });
19
+ // placeholder styling rules have to be separated
19
20
  // https://stackoverflow.com/questions/44971077/why-do-comma-separated-placeholder-rules-not-get-applied-in-css
20
21
 
21
22
  export var SearchBarWrapper = styled.div.withConfig({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-search-bar",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "SearchBar UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,9 +34,9 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-icon": "^0.67.0",
38
- "@synerise/ds-input": "^0.24.14",
39
- "@synerise/ds-tooltip": "^0.14.49",
37
+ "@synerise/ds-icon": "^0.68.0",
38
+ "@synerise/ds-input": "^0.24.16",
39
+ "@synerise/ds-tooltip": "^0.14.51",
40
40
  "@synerise/ds-utils": "^0.31.2"
41
41
  },
42
42
  "peerDependencies": {
@@ -45,5 +45,5 @@
45
45
  "react-intl": ">=3.12.0 <= 6.8",
46
46
  "styled-components": "5.0.1"
47
47
  },
48
- "gitHead": "05f083c767e2cec3c2f91c9475aee89852a77d6c"
48
+ "gitHead": "9ebd107163650754a5f55680d62d30812d740084"
49
49
  }