@synerise/ds-search 1.0.2 → 1.1.0
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,25 @@
|
|
|
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
|
+
# [1.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search@1.0.3...@synerise/ds-search@1.1.0) (2025-04-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **ds-search:** add tooltip opt in search ([77994f5](https://github.com/Synerise/synerise-design/commit/77994f5085d9cd639681eadb1c0b67e2919e653c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.0.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search@1.0.2...@synerise/ds-search@1.0.3) (2025-03-31)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-search
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [1.0.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search@1.0.1...@synerise/ds-search@1.0.2) (2025-03-26)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-search
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SearchInputProps } from './SearchInput.types';
|
|
3
|
-
declare const SearchInput: ({ alwaysExpanded, alwaysHighlight, clearTooltip, filterLabel, filterLookupKey, onKeyDown, onClick, onChange, onClear, onToggle, onButtonClick, moveCursorToEnd, placeholder, textLookupKey, value, closeOnClickOutside, disableInput, focusTrigger, toggleTrigger, inputProps, }: SearchInputProps) => React.JSX.Element;
|
|
3
|
+
declare const SearchInput: ({ alwaysExpanded, alwaysHighlight, clearTooltip, filterLabel, filterLookupKey, onKeyDown, onClick, onChange, onClear, onToggle, onButtonClick, moveCursorToEnd, placeholder, textLookupKey, value, closeOnClickOutside, disableInput, focusTrigger, toggleTrigger, inputProps, searchTooltipProps, }: SearchInputProps) => React.JSX.Element;
|
|
4
4
|
export default SearchInput;
|
|
@@ -28,7 +28,9 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
28
28
|
focusTrigger = _ref.focusTrigger,
|
|
29
29
|
toggleTrigger = _ref.toggleTrigger,
|
|
30
30
|
_ref$inputProps = _ref.inputProps,
|
|
31
|
-
inputProps = _ref$inputProps === void 0 ? {} : _ref$inputProps
|
|
31
|
+
inputProps = _ref$inputProps === void 0 ? {} : _ref$inputProps,
|
|
32
|
+
_ref$searchTooltipPro = _ref.searchTooltipProps,
|
|
33
|
+
searchTooltipProps = _ref$searchTooltipPro === void 0 ? {} : _ref$searchTooltipPro;
|
|
32
34
|
var inputRef = useRef(null);
|
|
33
35
|
var wrapperRef = useRef(null);
|
|
34
36
|
var _useState = useState(alwaysExpanded || !!value || !!filterLabel),
|
|
@@ -118,7 +120,7 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
118
120
|
}), /*#__PURE__*/React.createElement("span", null, filterLabel[filterLookupKey || ''] || filterLabel[textLookupKey || '']))), /*#__PURE__*/React.createElement(S.SearchInner, {
|
|
119
121
|
hasValue: !!value,
|
|
120
122
|
alwaysHighlight: alwaysHighlight
|
|
121
|
-
}, /*#__PURE__*/React.createElement(Input, _extends({
|
|
123
|
+
}, /*#__PURE__*/React.createElement(Tooltip, searchTooltipProps, /*#__PURE__*/React.createElement(Input, _extends({
|
|
122
124
|
placeholder: placeholder,
|
|
123
125
|
ref: inputRef,
|
|
124
126
|
value: value,
|
|
@@ -133,7 +135,7 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
133
135
|
autoComplete: "off",
|
|
134
136
|
autoFocus: true,
|
|
135
137
|
disabled: disableInput
|
|
136
|
-
}, inputProps)))), /*#__PURE__*/React.createElement(SearchButton, {
|
|
138
|
+
}, inputProps))))), /*#__PURE__*/React.createElement(SearchButton, {
|
|
137
139
|
inputOpen: isInputOpen,
|
|
138
140
|
hidden: !!value || !!filterLabel,
|
|
139
141
|
inputFocused: isInputFocused,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactNode, KeyboardEvent } from 'react';
|
|
2
2
|
import type { InputProps } from 'antd/lib/input';
|
|
3
|
+
import type { TooltipProps } from '@synerise/ds-tooltip';
|
|
3
4
|
export type SearchInputProps = {
|
|
4
5
|
alwaysExpanded?: boolean;
|
|
5
6
|
alwaysHighlight?: boolean;
|
|
@@ -24,4 +25,5 @@ export type SearchInputProps = {
|
|
|
24
25
|
moveCursorToEnd?: boolean;
|
|
25
26
|
disableInput?: boolean;
|
|
26
27
|
inputProps?: Partial<InputProps>;
|
|
28
|
+
searchTooltipProps?: Partial<TooltipProps>;
|
|
27
29
|
};
|
package/dist/Search.js
CHANGED
|
@@ -350,7 +350,8 @@ var Search = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
350
350
|
filterLookupKey = _this$props12.filterLookupKey,
|
|
351
351
|
disableInput = _this$props12.disableInput,
|
|
352
352
|
inputProps = _this$props12.inputProps,
|
|
353
|
-
alwaysExpanded = _this$props12.alwaysExpanded
|
|
353
|
+
alwaysExpanded = _this$props12.alwaysExpanded,
|
|
354
|
+
searchTooltipProps = _this$props12.searchTooltipProps;
|
|
354
355
|
var _this$state5 = this.state,
|
|
355
356
|
label = _this$state5.label,
|
|
356
357
|
isListVisible = _this$state5.isListVisible,
|
|
@@ -360,6 +361,7 @@ var Search = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
360
361
|
return /*#__PURE__*/React.createElement(SearchInput, {
|
|
361
362
|
alwaysHighlight: true,
|
|
362
363
|
clearTooltip: clearTooltip,
|
|
364
|
+
searchTooltipProps: searchTooltipProps,
|
|
363
365
|
filterLookupKey: filterLookupKey,
|
|
364
366
|
textLookupKey: textLookupConfig.parameters,
|
|
365
367
|
filterLabel: label,
|
package/dist/Search.types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ListProps } from 'react-window';
|
|
3
3
|
import { InputProps } from 'antd/lib/input';
|
|
4
|
+
import { TooltipProps } from '@synerise/ds-tooltip';
|
|
4
5
|
export type AnyObject = Record<string, any>;
|
|
5
6
|
export type DataSetProps = {
|
|
6
7
|
itemRender: (item: any) => JSX.Element;
|
|
@@ -39,6 +40,7 @@ export type SearchProps<T extends AnyObject, U extends AnyObject> = {
|
|
|
39
40
|
hideLabel?: boolean;
|
|
40
41
|
disableInput?: boolean;
|
|
41
42
|
alwaysExpanded?: boolean;
|
|
43
|
+
searchTooltipProps?: TooltipProps;
|
|
42
44
|
};
|
|
43
45
|
export type SearchState<T extends AnyObject> = {
|
|
44
46
|
isInputOpen: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-search",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Search UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-button": "^1.1.
|
|
38
|
-
"@synerise/ds-icon": "^1.
|
|
39
|
-
"@synerise/ds-menu": "^1.0.
|
|
40
|
-
"@synerise/ds-scrollbar": "^1.0.
|
|
41
|
-
"@synerise/ds-tooltip": "^1.1.
|
|
37
|
+
"@synerise/ds-button": "^1.1.2",
|
|
38
|
+
"@synerise/ds-icon": "^1.2.0",
|
|
39
|
+
"@synerise/ds-menu": "^1.0.3",
|
|
40
|
+
"@synerise/ds-scrollbar": "^1.0.3",
|
|
41
|
+
"@synerise/ds-tooltip": "^1.1.2",
|
|
42
42
|
"@synerise/ds-utils": "^1.0.1",
|
|
43
43
|
"react-onclickoutside": "^6.9.0",
|
|
44
44
|
"react-window": "^1.8.5"
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"react": ">=16.9.0 <= 18.3.1",
|
|
50
50
|
"styled-components": "^5.3.3"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "f692b29dca874f88921311fe5599b533c6f09ba4"
|
|
53
53
|
}
|