@synerise/ds-search-bar 0.7.2 → 0.7.3
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 +8 -0
- package/dist/SearchBar.js +18 -26
- package/dist/SearchBar.styles.js +2 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.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)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-search-bar
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [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
15
|
|
|
8
16
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
isFocused = _useState[0],
|
|
25
|
+
setFocus = _useState[1];
|
|
29
26
|
var _useState2 = useState(),
|
|
30
|
-
|
|
31
|
-
|
|
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;
|
package/dist/SearchBar.styles.js
CHANGED
|
@@ -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
|
-
});
|
|
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.
|
|
3
|
+
"version": "0.7.3",
|
|
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.
|
|
38
|
-
"@synerise/ds-input": "^0.24.
|
|
39
|
-
"@synerise/ds-tooltip": "^0.14.
|
|
37
|
+
"@synerise/ds-icon": "^0.67.1",
|
|
38
|
+
"@synerise/ds-input": "^0.24.15",
|
|
39
|
+
"@synerise/ds-tooltip": "^0.14.50",
|
|
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": "
|
|
48
|
+
"gitHead": "4a56ee7ef816c22341ce704154dc7aa65b7d1dcc"
|
|
49
49
|
}
|