@synerise/ds-search 1.1.8 → 1.2.1

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.2.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search@1.2.0...@synerise/ds-search@1.2.1) (2025-06-26)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-search
9
+
10
+
11
+
12
+
13
+
14
+ # [1.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search@1.1.8...@synerise/ds-search@1.2.0) (2025-06-24)
15
+
16
+
17
+ ### Features
18
+
19
+ * **factors:** array factor type ([195d328](https://github.com/Synerise/synerise-design/commit/195d3286e98b5f07fc9c1e56001e6ae844b7a080))
20
+
21
+
22
+
23
+
24
+
6
25
  ## [1.1.8](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search@1.1.7...@synerise/ds-search@1.1.8) (2025-06-05)
7
26
 
8
27
  **Note:** Version bump only for package @synerise/ds-search
@@ -7,17 +7,19 @@ var SearchButton = function SearchButton(_ref) {
7
7
  hidden = _ref.hidden,
8
8
  onClick = _ref.onClick,
9
9
  inputFocused = _ref.inputFocused,
10
- clickable = _ref.clickable;
10
+ clickable = _ref.clickable,
11
+ disabled = _ref.disabled;
11
12
  return /*#__PURE__*/React.createElement(S.SearchButton, {
12
13
  isOpen: inputOpen,
13
14
  hidden: hidden,
14
15
  className: "SearchButton",
15
16
  inputFocused: inputFocused,
16
- clickable: clickable,
17
+ clickable: !disabled && clickable,
17
18
  onClick: onClick
18
19
  }, /*#__PURE__*/React.createElement(Button, {
19
20
  mode: "single-icon",
20
21
  type: "ghost",
22
+ disabled: disabled,
21
23
  className: inputOpen ? 'btn-search-open' : 'btn-search',
22
24
  "data-testid": "btn"
23
25
  }, /*#__PURE__*/React.createElement(Icon, {
@@ -3,5 +3,6 @@ export type SearchButtonProps = {
3
3
  hidden: boolean;
4
4
  onClick: () => void;
5
5
  clickable?: boolean;
6
+ disabled?: boolean;
6
7
  inputFocused?: boolean;
7
8
  };
@@ -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, searchTooltipProps, }: 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, disabled, focusTrigger, toggleTrigger, inputProps, searchTooltipProps, }: SearchInputProps) => React.JSX.Element;
4
4
  export default SearchInput;
@@ -25,6 +25,7 @@ var SearchInput = function SearchInput(_ref) {
25
25
  value = _ref.value,
26
26
  closeOnClickOutside = _ref.closeOnClickOutside,
27
27
  disableInput = _ref.disableInput,
28
+ disabled = _ref.disabled,
28
29
  focusTrigger = _ref.focusTrigger,
29
30
  toggleTrigger = _ref.toggleTrigger,
30
31
  _ref$inputProps = _ref.inputProps,
@@ -106,7 +107,7 @@ var SearchInput = function SearchInput(_ref) {
106
107
  }, [moveCursorToEnd, value.length]);
107
108
  return /*#__PURE__*/React.createElement(S.SearchInputWrapper, {
108
109
  ref: wrapperRef
109
- }, /*#__PURE__*/React.createElement(S.SearchInputContent, {
110
+ }, !disabled && /*#__PURE__*/React.createElement(S.SearchInputContent, {
110
111
  className: renderInputOpened ? 'is-open search-input-wrapper' : 'search-input-wrapper',
111
112
  offset: inputOffset,
112
113
  filterLabel: filterLabel,
@@ -136,12 +137,13 @@ var SearchInput = function SearchInput(_ref) {
136
137
  autoFocus: true,
137
138
  disabled: disableInput
138
139
  }, inputProps))))), /*#__PURE__*/React.createElement(SearchButton, {
140
+ disabled: disabled,
139
141
  inputOpen: isInputOpen,
140
142
  hidden: !!value || !!filterLabel,
141
143
  inputFocused: isInputFocused,
142
- clickable: !alwaysExpanded,
144
+ clickable: !disabled && !alwaysExpanded,
143
145
  onClick: handleSearchButtonClick
144
- }), /*#__PURE__*/React.createElement(S.ClearButton, {
146
+ }), !disabled && /*#__PURE__*/React.createElement(S.ClearButton, {
145
147
  hidden: !value && !filterLabel
146
148
  }, /*#__PURE__*/React.createElement(Icon, {
147
149
  "data-testid": "clear",
@@ -24,6 +24,7 @@ export type SearchInputProps = {
24
24
  value: string;
25
25
  moveCursorToEnd?: boolean;
26
26
  disableInput?: boolean;
27
+ disabled?: boolean;
27
28
  inputProps?: Partial<InputProps>;
28
29
  searchTooltipProps?: Partial<TooltipProps>;
29
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-search",
3
- "version": "1.1.8",
3
+ "version": "1.2.1",
4
4
  "description": "Search UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,12 +34,12 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-button": "^1.3.3",
38
- "@synerise/ds-icon": "^1.5.2",
39
- "@synerise/ds-menu": "^1.0.11",
40
- "@synerise/ds-scrollbar": "^1.0.10",
41
- "@synerise/ds-tooltip": "^1.1.9",
42
- "@synerise/ds-utils": "^1.2.0",
37
+ "@synerise/ds-button": "^1.4.1",
38
+ "@synerise/ds-icon": "^1.5.3",
39
+ "@synerise/ds-menu": "^1.0.13",
40
+ "@synerise/ds-scrollbar": "^1.1.1",
41
+ "@synerise/ds-tooltip": "^1.1.11",
42
+ "@synerise/ds-utils": "^1.3.0",
43
43
  "react-onclickoutside": "^6.9.0",
44
44
  "react-window": "^1.8.5"
45
45
  },
@@ -49,5 +49,5 @@
49
49
  "react": ">=16.9.0 <= 18.3.1",
50
50
  "styled-components": "^5.3.3"
51
51
  },
52
- "gitHead": "93bc81d59d20bc8f3bc80c5d56ae7f7c0838380d"
52
+ "gitHead": "11fe1d29b2ac23e70c3d5e6ce8ae20201a619a34"
53
53
  }