pixel-react 1.8.6 → 1.8.8

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.
Files changed (170) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/lib/1fb4472b34e4fe07.css +1 -0
  3. package/lib/StyleGuide/ColorPalette/ColorPalette.stories.d.ts +6 -0
  4. package/lib/StyleGuide/Typography/Typography.stories.d.ts +6 -0
  5. package/lib/assets/fonts/Poppins-Bold.ttf +0 -0
  6. package/lib/assets/fonts/Poppins-Medium.ttf +0 -0
  7. package/lib/assets/fonts/Poppins-Regular.ttf +0 -0
  8. package/lib/assets/fonts/Poppins-SemiBold.ttf +0 -0
  9. package/lib/components/Accordion/Accordion.stories.d.ts +6 -0
  10. package/lib/components/AddButton/AddButton.d.ts +5 -0
  11. package/lib/components/AddButton/AddButton.stories.d.ts +6 -0
  12. package/lib/components/AddButton/index.d.ts +1 -0
  13. package/lib/components/AddButton/types.d.ts +4 -0
  14. package/lib/components/AddResourceButton/AddButton.stories.d.ts +8 -0
  15. package/lib/components/AddVariables/AddVariables.d.ts +5 -0
  16. package/lib/components/AddVariables/index.d.ts +1 -0
  17. package/lib/components/AddVariables/types.d.ts +35 -0
  18. package/lib/components/AllProjectsDropdown/AllProjectsDropdown.stories.d.ts +7 -0
  19. package/lib/components/AppHeader/AppHeader.stories.d.ts +7 -0
  20. package/lib/components/AttachImage/AttachImage.stories.d.ts +7 -0
  21. package/lib/components/AttachmentButton/AttachmentButton.stories.d.ts +9 -0
  22. package/lib/components/Avatar/Avatar.stories.d.ts +10 -0
  23. package/lib/components/Button/Button.d.ts +2 -2
  24. package/lib/components/Button/Button.stories.d.ts +13 -0
  25. package/lib/components/Charts/BarChart/BarChart.stories.d.ts +6 -0
  26. package/lib/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.d.ts +7 -0
  27. package/lib/components/Charts/DonutChart/DonutChart.stories.d.ts +6 -0
  28. package/lib/components/Charts/IconRadialChart/IconRadialChart.stories.d.ts +8 -0
  29. package/lib/components/Charts/LineChart/LineChart.stories.d.ts +7 -0
  30. package/lib/components/Charts/MultiRadialChart/MultiRadialChart.stories.d.ts +8 -0
  31. package/lib/components/Charts/PieChart/PieChart.stories.d.ts +7 -0
  32. package/lib/components/Charts/RadialChart/RadialChart.stories.d.ts +6 -0
  33. package/lib/components/Checkbox/Checkbox.stories.d.ts +8 -0
  34. package/lib/components/Chip/Chip.stories.d.ts +14 -0
  35. package/lib/components/ChooseFile/ChooseFile.d.ts +3 -2
  36. package/lib/components/ConnectingBranch/ConnectingBranch.stories.d.ts +6 -0
  37. package/lib/components/DatePicker/DatePicker.stories.d.ts +9 -0
  38. package/lib/components/DragAndDrop/DragAndDrop.stories.d.ts +6 -0
  39. package/lib/components/Drawer/Drawer.stories.d.ts +12 -0
  40. package/lib/components/EditTextField/EditTextField.stories.d.ts +10 -0
  41. package/lib/components/Editor/Editor.stories.d.ts +6 -0
  42. package/lib/components/Excel/ContextMenu/ContextMenu.d.ts +4 -0
  43. package/lib/components/Excel/ExcelFile.stories.d.ts +6 -0
  44. package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +14 -0
  45. package/lib/components/ExcelFile/ColorBarSelector/ColorBarSelector.d.ts +8 -0
  46. package/lib/components/ExcelFile/ContextMenu/ContextMenu.d.ts +4 -0
  47. package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +7 -0
  48. package/lib/components/ExcelFile/ExcelFile/Excel/Cell.d.ts +4 -0
  49. package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +5 -0
  50. package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +3 -0
  51. package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +5 -0
  52. package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +5 -0
  53. package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +8 -0
  54. package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +10 -0
  55. package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +3 -0
  56. package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +3 -0
  57. package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +5 -0
  58. package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +3 -0
  59. package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +80 -0
  60. package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +3 -0
  61. package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +174 -0
  62. package/lib/components/ExcelFile/ExcelFile/Excel/areModelsEqual.d.ts +1 -0
  63. package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +8 -0
  64. package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +22 -0
  65. package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +17 -0
  66. package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -0
  67. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +21 -0
  68. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +3 -0
  69. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +24 -0
  70. package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +13 -0
  71. package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +67 -0
  72. package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +22 -0
  73. package/lib/components/ExcelFile/ExcelFile/Excel/point.d.ts +11 -0
  74. package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +27 -0
  75. package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +95 -0
  76. package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +178 -0
  77. package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +3 -0
  78. package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +3 -0
  79. package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +44 -0
  80. package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +19 -0
  81. package/lib/components/ExcelFile/ExcelFile.stories.d.ts +6 -0
  82. package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +12 -0
  83. package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +15 -0
  84. package/lib/components/ExcelFile/ImportExcelStyles.d.ts +24 -0
  85. package/lib/components/ExcelFile/Types.d.ts +129 -0
  86. package/lib/components/ExcelFile/index.d.ts +1 -0
  87. package/lib/components/ExpandableMenu/ExpandableMenu.stories.d.ts +7 -0
  88. package/lib/components/FF_Captcha/captcha.stories.d.ts +8 -0
  89. package/lib/components/FileDropzone/FileDropzone.stories.d.ts +8 -0
  90. package/lib/components/Form/Form.stories.d.ts +7 -0
  91. package/lib/components/GridLayout/GridLayout.stories.d.ts +8 -0
  92. package/lib/components/HighlightText/HighlightText.stories.d.ts +6 -0
  93. package/lib/components/Icon/Icon.stories.d.ts +8 -0
  94. package/lib/components/IconButton/IconButton.stories.d.ts +7 -0
  95. package/lib/components/IconRadioGroup/IconRadioGroup.stories.d.ts +7 -0
  96. package/lib/components/Input/Input.stories.d.ts +9 -0
  97. package/lib/components/InputWithDropdown/InputWithDropdown.stories.d.ts +9 -0
  98. package/lib/components/LabelEditTextField/LabelEditTextField.stories.d.ts +13 -0
  99. package/lib/components/LazyLoad/LazyLoad.stories.d.ts +6 -0
  100. package/lib/components/MachineInputField/MachineInputField.stories.d.ts +6 -0
  101. package/lib/components/MenuOption/MenuOption.stories.d.ts +16 -0
  102. package/lib/components/MiniModal/MiniModal.stories.d.ts +10 -0
  103. package/lib/components/Modal/Modal.stories.d.ts +7 -0
  104. package/lib/components/ModulesChip/ModuleChip.stories.d.ts +6 -0
  105. package/lib/components/MultiSelect/MultiSelect.stories.d.ts +11 -0
  106. package/lib/components/NLPInput/NlpInput.stories.d.ts +7 -0
  107. package/lib/components/NLPInput/type.d.ts +70 -0
  108. package/lib/components/Paper/Paper.stories.d.ts +11 -0
  109. package/lib/components/RadioButton/RadioButton.stories.d.ts +10 -0
  110. package/lib/components/RadioGroup/RadioGroup.stories.d.ts +9 -0
  111. package/lib/components/Search/Search.d.ts +1 -1
  112. package/lib/components/Search/Search.stories.d.ts +6 -0
  113. package/lib/components/Search/types.d.ts +1 -0
  114. package/lib/components/Select/Select.stories.d.ts +14 -0
  115. package/lib/components/Select/components/Dropdown/Dropdown.d.ts +4 -0
  116. package/lib/components/Select/components/Dropdown/dropdownTypes.d.ts +17 -0
  117. package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.d.ts +6 -0
  118. package/lib/components/SequentialConnectingBranch/components/AddBrowserModal/AddBrowserModal.d.ts +4 -0
  119. package/lib/components/SequentialConnectingBranch/components/AddBrowserModal/types.d.ts +3 -0
  120. package/lib/components/SequentialConnectingBranch/components/DatasetListModal/DatasetListModal.d.ts +4 -0
  121. package/lib/components/SequentialConnectingBranch/components/DatasetListModal/types.d.ts +3 -0
  122. package/lib/components/StateDropdown/StateDropdown.stories.d.ts +10 -0
  123. package/lib/components/StatusButton/StatusButton.stories.d.ts +14 -0
  124. package/lib/components/StatusCard/StatusCard.stories.d.ts +11 -0
  125. package/lib/components/Table/Table.stories.d.ts +13 -0
  126. package/lib/components/TableTree/TableTree.stories.d.ts +7 -0
  127. package/lib/components/Tabs/Tabs.stories.d.ts +9 -0
  128. package/lib/components/TextArea/Textarea.stories.d.ts +9 -0
  129. package/lib/components/Toast/Toast.stories.d.ts +6 -0
  130. package/lib/components/Toastify/Toastify.stories.d.ts +6 -0
  131. package/lib/components/Toggle/Toggle.stories.d.ts +12 -0
  132. package/lib/components/Tooltip/Tooltip.stories.d.ts +15 -0
  133. package/lib/components/Typography/Typography.stories.d.ts +10 -0
  134. package/lib/components/VariableInput/VariableInput.stories.d.ts +6 -0
  135. package/lib/index.d.ts +6 -5
  136. package/lib/index.esm.js +1375 -4525
  137. package/lib/index.esm.js.map +1 -1
  138. package/lib/index.js +1375 -4525
  139. package/lib/index.js.map +1 -1
  140. package/lib/tsconfig.tsbuildinfo +1 -1
  141. package/lib/utils/checkEmpty/checkEmpty.stories.d.ts +6 -0
  142. package/lib/utils/compareArrays/compareArrays.stories.d.ts +6 -0
  143. package/lib/utils/compareObjects/compareObjects.stories.d.ts +6 -0
  144. package/lib/utils/debounce/debounce.stories.d.ts +6 -0
  145. package/lib/utils/ffID/ffID.stories.d.ts +6 -0
  146. package/lib/utils/find/findAndInsert.d.ts +7 -0
  147. package/lib/utils/find/findAndInsert.stories.d.ts +7 -0
  148. package/lib/utils/findAndInsert/findAndInsert.stories.d.ts +7 -0
  149. package/lib/utils/getEncryptedData/getEncryptedData.stories.d.ts +6 -0
  150. package/lib/utils/getExtension/getExtension.stories.d.ts +6 -0
  151. package/lib/utils/getSequentialPayload/getSequentialPayload.stories.d.ts +10 -0
  152. package/lib/utils/throttle/throttle.stories.d.ts +6 -0
  153. package/lib/utils/truncateText/truncateText.stories.d.ts +6 -0
  154. package/package.json +3 -3
  155. package/src/assets/icons/approval_pending.svg +8 -8
  156. package/src/assets/icons/configuration.svg +3 -3
  157. package/src/assets/icons/defects.svg +8 -8
  158. package/src/assets/icons/element.svg +4 -4
  159. package/src/assets/icons/project_element.svg +4 -4
  160. package/src/assets/icons/step_group.svg +10 -10
  161. package/src/assets/icons/variable.svg +3 -3
  162. package/src/assets/icons/web_service_icon.svg +3 -3
  163. package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +7 -45
  164. package/src/components/AllProjectsDropdown/AllProjectsDropdown.stories.tsx +5 -0
  165. package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +76 -64
  166. package/src/components/Button/Button.tsx +3 -4
  167. package/src/components/ChooseFile/ChooseFile.tsx +3 -4
  168. package/src/components/Search/Search.scss +8 -0
  169. package/src/components/Search/Search.tsx +17 -6
  170. package/src/components/Search/types.ts +1 -0
@@ -14,6 +14,11 @@ const meta: Meta<typeof AllProjectsDropdown> = {
14
14
 
15
15
  type Story = StoryObj<typeof AllProjectsDropdown>;
16
16
  const options = [
17
+ {
18
+ label: 'All Projects',
19
+ value: 'All Projects',
20
+ iconName: 'all_projects',
21
+ },
17
22
  {
18
23
  label:
19
24
  'Pantaloon Project Pantaloon Web Project Pantaloon Web Project Pantaloon Web Project Pantaloon Web Project',
@@ -7,6 +7,7 @@ import classNames from 'classnames';
7
7
  import { AllProjectsDropdownProps, optionsType } from './types';
8
8
  import Tooltip from '../Tooltip';
9
9
  import useClickOutside from '../../hooks/useClickOutside';
10
+ import Search from '../Search';
10
11
 
11
12
  const AllProjectsDropdown = ({
12
13
  onClick = () => {},
@@ -21,8 +22,8 @@ const AllProjectsDropdown = ({
21
22
  }: AllProjectsDropdownProps) => {
22
23
  const [showOptions, setShowOptions] = useState(false);
23
24
  const [selectedOptions, setSelectedOptions] = useState(selectedOption);
24
- const [search, setSearch] = useState(true);
25
25
  const optionsRef = useRef<HTMLDivElement>(null);
26
+ const [optionsList, setOptionSList] = useState<optionsType[]>(options);
26
27
 
27
28
  const handleShowOption = () => {
28
29
  setShowOptions(!showOptions);
@@ -34,17 +35,22 @@ const AllProjectsDropdown = ({
34
35
  setSelectedOptions(option);
35
36
  closeOptions();
36
37
  onClick(option);
38
+ setSearchValue('');
39
+ setOptionSList(options);
37
40
  };
38
41
 
39
- const handleInput = () => {
40
- setSearch(false);
41
- };
42
-
43
- const handleSearchEnter = () => {
44
- setSearch(false);
45
- };
46
- const handleSearchLeave = () => {
47
- setSearch(true);
42
+ const [searchValue, setSearchValue] = useState('');
43
+ const handleSearch = (query: string) => {
44
+ setSearchValue(query);
45
+ if (query !== '') {
46
+ let filterData = options.filter((option) =>
47
+ option.label.toLowerCase().includes(query.toLowerCase())
48
+ );
49
+ setOptionSList(filterData);
50
+ } else {
51
+ setSearchValue('');
52
+ setOptionSList(options);
53
+ }
48
54
  };
49
55
  useClickOutside(optionsRef, closeOptions);
50
56
  return (
@@ -82,66 +88,72 @@ const AllProjectsDropdown = ({
82
88
  </div>
83
89
  {showOptions && (
84
90
  <div className={classNames('ff-projects-dropdown')} ref={optionsRef}>
85
- <div
86
- className={classNames('ff-projects-search')}
87
- onMouseEnter={() => handleSearchEnter()}
88
- onMouseLeave={() => handleSearchLeave()}
89
- >
90
- {search && <Icon name="search" height={8} width={8} />}
91
- <input
92
- type="text"
93
- placeholder={`${search ? 'Search Project' : ''}`}
94
- onClick={() => handleInput()}
95
- />
96
- </div>
97
- <div
98
- onClick={() =>
99
- handleSelectOption({
100
- label: 'All Projects',
101
- value: 'All Projects',
102
- iconName: 'all_projects',
103
- })
104
- }
105
- className={classNames('ff-all-projects-options', {
106
- ['ff-selected-option']: selectedOption.label === 'All Projects',
107
- })}
108
- >
109
- <div className={classNames('ff-projects-icons')}>
110
- <Icon name={'all_projects'} height={12} width={12} />
111
- </div>
112
- <Typography
113
- as={'div'}
114
- lineHeight={'30px'}
115
- children={'All Projects'}
116
- />
91
+ <Search
92
+ onSearch={handleSearch}
93
+ value={searchValue}
94
+ isExpand={true}
95
+ onClose={() => {}}
96
+ onExpand={() => {}}
97
+ showClose={false}
98
+ />
99
+ <div className={classNames('option-card')}>
100
+ {optionsList.map(
101
+ (option, index) =>
102
+ index === 0 && (
103
+ <div
104
+ key={index}
105
+ onClick={() => handleSelectOption(option)}
106
+ className={classNames('ff-projects-options', {
107
+ ['ff-selected-option']:
108
+ selectedOption.label === option.label,
109
+ })}
110
+ >
111
+ <div className={classNames('ff-projects-icons')}>
112
+ <Icon name={option.iconName} height={12} width={12} />
113
+ </div>
114
+ <Typography
115
+ key={index}
116
+ as={'div'}
117
+ lineHeight={'30px'}
118
+ className="ff-projects-label"
119
+ >
120
+ <Tooltip title={option.label}>{option.label}</Tooltip>
121
+ </Typography>
122
+ </div>
123
+ )
124
+ )}
117
125
  </div>
118
126
  <div
119
127
  className={classNames(
120
128
  'option-card',
121
- `${options.length > 4 ? 'scroll' : ''}`
129
+ `${optionsList.length > 4 ? 'scroll' : ''}`
122
130
  )}
123
131
  >
124
- {options.map((option, index) => (
125
- <div
126
- key={index}
127
- onClick={() => handleSelectOption(option)}
128
- className={classNames('ff-projects-options', {
129
- ['ff-selected-option']: selectedOption.label === option.label,
130
- })}
131
- >
132
- <div className={classNames('ff-projects-icons')}>
133
- <Icon name={option.iconName} height={12} width={12} />
134
- </div>
135
- <Typography
136
- key={index}
137
- as={'div'}
138
- lineHeight={'30px'}
139
- className="ff-projects-label"
140
- >
141
- <Tooltip title={option.label}>{option.label}</Tooltip>
142
- </Typography>
143
- </div>
144
- ))}
132
+ {optionsList.map(
133
+ (option, index) =>
134
+ index > 0 && (
135
+ <div
136
+ key={index}
137
+ onClick={() => handleSelectOption(option)}
138
+ className={classNames('ff-projects-options', {
139
+ ['ff-selected-option']:
140
+ selectedOption.label === option.label,
141
+ })}
142
+ >
143
+ <div className={classNames('ff-projects-icons')}>
144
+ <Icon name={option.iconName} height={12} width={12} />
145
+ </div>
146
+ <Typography
147
+ key={index}
148
+ as={'div'}
149
+ lineHeight={'30px'}
150
+ className="ff-projects-label"
151
+ >
152
+ <Tooltip title={option.label}>{option.label}</Tooltip>
153
+ </Typography>
154
+ </div>
155
+ )
156
+ )}
145
157
  </div>
146
158
  </div>
147
159
  )}
@@ -1,4 +1,4 @@
1
- import { forwardRef, memo } from 'react';
1
+ import { forwardRef } from 'react';
2
2
  import './Button.scss';
3
3
  import '../../assets/styles/_colors.scss';
4
4
  import Icon from '../Icon';
@@ -6,8 +6,7 @@ import { ButtonProps } from './types';
6
6
  import classNames from 'classnames';
7
7
  import Typography from '../Typography';
8
8
 
9
- const areEqual = (prevProps: ButtonProps, nextProps: ButtonProps) =>
10
- prevProps.selectedFile?.name === nextProps.selectedFile?.name;
9
+
11
10
 
12
11
  const Button = forwardRef<HTMLButtonElement, ButtonProps>(
13
12
  (
@@ -88,4 +87,4 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(
88
87
  );
89
88
  }
90
89
  );
91
- export default memo(Button, areEqual);
90
+ export default Button;
@@ -1,9 +1,8 @@
1
- import { memo, type FC } from 'react'
1
+ import { type FC } from 'react'
2
2
  import { ChooseFileProps } from './types'
3
3
  import Button from '../Button'
4
4
 
5
- const areEqual = (prevProps: ChooseFileProps, nextProps: ChooseFileProps) =>
6
- prevProps.selectedFile?.name === nextProps.selectedFile?.name;
5
+
7
6
 
8
7
  const ChooseFile:FC<ChooseFileProps> = ({
9
8
  variant = 'primary',
@@ -43,4 +42,4 @@ const ChooseFile:FC<ChooseFileProps> = ({
43
42
  )
44
43
  }
45
44
 
46
- export default memo(ChooseFile, areEqual);
45
+ export default ChooseFile;
@@ -86,12 +86,20 @@
86
86
  cursor: pointer;
87
87
  width: 22px;
88
88
  padding-top: 1px;
89
+
90
+ &.showClose {
91
+ display: none
92
+ }
89
93
  }
90
94
 
91
95
  .ff-search-close-icon {
92
96
  margin: 4px;
93
97
  cursor: pointer;
94
98
 
99
+ &.showClose {
100
+ display: none
101
+ }
102
+
95
103
  .ff-icon-container {
96
104
  svg {
97
105
  path {
@@ -16,12 +16,13 @@ const Search = ({
16
16
  isExpand = false,
17
17
  onClose,
18
18
  onExpand,
19
+ showClose = true,
19
20
  }: SearchProps) => {
20
21
  const [searchValue, setSearchValue] = useState<string>(value);
21
22
  const inputRef = useRef<HTMLInputElement>(null);
22
23
 
23
24
  useEffect(() => {
24
- if (isExpand && inputRef.current) {
25
+ if (isExpand && inputRef.current && showClose) {
25
26
  inputRef.current.focus();
26
27
  }
27
28
  setSearchValue('');
@@ -45,7 +46,7 @@ const Search = ({
45
46
  if (label === 'Close') {
46
47
  onClose?.();
47
48
  }
48
- if (label === 'Clear' && isExpand && inputRef.current) {
49
+ if (label === 'Clear' && isExpand && inputRef.current && showClose) {
49
50
  inputRef.current.focus();
50
51
  }
51
52
  };
@@ -57,8 +58,12 @@ const Search = ({
57
58
  };
58
59
  const handleChange = (data: string) => {
59
60
  setSearchValue(data);
60
- if (data === '') {
61
- onSearch('');
61
+ if (showClose) {
62
+ if (data === '') {
63
+ onSearch('');
64
+ }
65
+ } else {
66
+ onSearch(data);
62
67
  }
63
68
  };
64
69
 
@@ -105,7 +110,9 @@ const Search = ({
105
110
  {isExpand && (
106
111
  <>
107
112
  <div
108
- className="ff-search-clear-button"
113
+ className={classNames('ff-search-clear-button', {
114
+ showClose: !showClose,
115
+ })}
109
116
  onClick={() => handleSearchClearAndClose('Clear')}
110
117
  >
111
118
  {searchValue !== '' && (
@@ -117,7 +124,11 @@ const Search = ({
117
124
  )}
118
125
  </div>
119
126
  <Tooltip title="Close">
120
- <div className="ff-search-close-icon">
127
+ <div
128
+ className={classNames('ff-search-close-icon', {
129
+ showClose: !showClose,
130
+ })}
131
+ >
121
132
  <Icon
122
133
  height={6}
123
134
  width={6}
@@ -16,4 +16,5 @@ export interface SearchProps {
16
16
  isExpand: boolean;
17
17
  onClose: () => void;
18
18
  onExpand: (isExpand: boolean) => void;
19
+ showClose?:boolean
19
20
  }