@synerise/ds-search 1.5.38 → 2.0.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 +8 -0
- package/CLAUDE.md +1 -3
- package/dist/Elements/SearchItems/SearchItems.d.ts +1 -1
- package/dist/Elements/SearchItems/SearchItems.js +2 -4
- package/dist/Elements/SearchItems/SearchItems.types.d.ts +1 -6
- package/dist/Elements/SearchRenderer/SearchRenderer.js +1 -1
- package/dist/Search.js +0 -1
- package/package.json +8 -9
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
|
+
## [2.0.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search@2.0.0...@synerise/ds-search@2.0.1) (2026-09-02)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-search
|
|
9
|
+
|
|
10
|
+
# [2.0.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search@1.5.38...@synerise/ds-search@2.0.0) (2026-08-26)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @synerise/ds-search
|
|
13
|
+
|
|
6
14
|
## [1.5.38](https://github.com/Synerise/synerise-design/compare/@synerise/ds-search@1.5.37...@synerise/ds-search@1.5.38) (2026-08-18)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @synerise/ds-search
|
package/CLAUDE.md
CHANGED
|
@@ -155,7 +155,6 @@ Both names are the same default export from `SearchItems.tsx`.
|
|
|
155
155
|
| `onItemClick` | `(e: T) => void` | — | Item click callback |
|
|
156
156
|
| `listProps` | `Partial<ListProps> & { scrollTop?: number }` | — | Extra react-window props; `scrollTop` is synced via `listRef.scrollTo` |
|
|
157
157
|
| `visibleRows` | `number` | — | Caps height to `visibleRows * rowHeight` |
|
|
158
|
-
| `renderInMenu` | `boolean` | `true` | Wraps list in `ds-menu`; **deprecated** — set to `false` and avoid `Menu.Item` in `itemRender` |
|
|
159
158
|
|
|
160
159
|
#### `renderSearchList`
|
|
161
160
|
|
|
@@ -258,8 +257,7 @@ import { SearchInput } from '@synerise/ds-search';
|
|
|
258
257
|
- `@synerise/ds-scrollbar` — custom scrollbar wrapping the dropdown
|
|
259
258
|
- `@synerise/ds-utils` (`focusWithArrowKeys`, `useOnClickOutside`, `usePrevious`) — keyboard navigation and outside-click handling
|
|
260
259
|
- `@synerise/ds-tooltip` — wraps the search input and provides section header tooltips
|
|
261
|
-
- `@synerise/ds-
|
|
262
|
-
- `@synerise/ds-list-item` (`ListContextProvider`) — wraps items when `renderInMenu=false`
|
|
260
|
+
- `@synerise/ds-list-item` (`ListContextProvider`) — wraps the rendered item list
|
|
263
261
|
No antd — `SearchInput` renders a DS-native styled `input` (`S.SearchNativeInput`), which owns its own border/radius/background/focus chrome.
|
|
264
262
|
|
|
265
263
|
## Implementation notes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { SearchItemListProps } from './SearchItems.types';
|
|
3
3
|
export declare function renderSearchList<V>(props: SearchItemListProps<V>, children?: ReactNode): ReactElement<SearchItemListProps<V>>;
|
|
4
|
-
declare const SearchItems: ({ data, height, highlight, itemRender, listProps, onItemClick, rowHeight, visibleRows, width,
|
|
4
|
+
declare const SearchItems: ({ data, height, highlight, itemRender, listProps, onItemClick, rowHeight, visibleRows, width, }: SearchItemListProps<any>) => React.JSX.Element;
|
|
5
5
|
export default SearchItems;
|
|
@@ -2,7 +2,6 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef, useMemo, useEffect, cloneElement } from "react";
|
|
3
3
|
import { FixedSizeList } from "react-window";
|
|
4
4
|
import { ListContextProvider } from "@synerise/ds-list-item";
|
|
5
|
-
import Menu from "@synerise/ds-menu";
|
|
6
5
|
const listStyle = {
|
|
7
6
|
overflowX: "unset",
|
|
8
7
|
overflowY: "unset"
|
|
@@ -39,8 +38,7 @@ const SearchItems = ({
|
|
|
39
38
|
onItemClick,
|
|
40
39
|
rowHeight,
|
|
41
40
|
visibleRows,
|
|
42
|
-
width
|
|
43
|
-
renderInMenu = true
|
|
41
|
+
width
|
|
44
42
|
}) => {
|
|
45
43
|
const listRef = useRef(null);
|
|
46
44
|
const listHeight = useMemo(() => {
|
|
@@ -67,7 +65,7 @@ const SearchItems = ({
|
|
|
67
65
|
items: data,
|
|
68
66
|
onItemClick
|
|
69
67
|
}, itemSize: rowHeight, ref: listRef, style: listStyle, width, ...listProps, children: rowRenderer });
|
|
70
|
-
return
|
|
68
|
+
return /* @__PURE__ */ jsx(ListContextProvider, { children: list });
|
|
71
69
|
};
|
|
72
70
|
export {
|
|
73
71
|
SearchItems as default,
|
|
@@ -6,7 +6,7 @@ export type SearchItemListProps<T> = {
|
|
|
6
6
|
data: T[] | undefined;
|
|
7
7
|
highlight?: string;
|
|
8
8
|
/**
|
|
9
|
-
* @description
|
|
9
|
+
* @description render a lightweight row (e.g. <ListItem> from @synerise/ds-list-item); avoid heavy components, especially when the results are wrapped in a virtualised list
|
|
10
10
|
*/
|
|
11
11
|
itemRender: (item: T) => JSX.Element;
|
|
12
12
|
listProps?: ListPropsEnhanced;
|
|
@@ -15,10 +15,5 @@ export type SearchItemListProps<T> = {
|
|
|
15
15
|
width: number | string;
|
|
16
16
|
visibleRows?: number;
|
|
17
17
|
height?: number;
|
|
18
|
-
/**
|
|
19
|
-
* @description - set to false if items returned itemRender do NOT require being wraped in an antd <Menu> wrapper component.
|
|
20
|
-
* @deprecated - this prop will be removed once all implementations stop using <Menu.Item> in itemRender
|
|
21
|
-
*/
|
|
22
|
-
renderInMenu?: boolean;
|
|
23
18
|
};
|
|
24
19
|
export {};
|
|
@@ -15,7 +15,7 @@ const SearchRenderer = ({
|
|
|
15
15
|
}) => {
|
|
16
16
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17
17
|
!!title && /* @__PURE__ */ jsx(SearchHeader, { headerText: title, tooltip }),
|
|
18
|
-
/* @__PURE__ */ jsx(SearchItems, { data, height, highlight, width, rowHeight, itemRender, onItemClick, listProps
|
|
18
|
+
/* @__PURE__ */ jsx(SearchItems, { data, height, highlight, width, rowHeight, itemRender, onItemClick, listProps })
|
|
19
19
|
] });
|
|
20
20
|
};
|
|
21
21
|
export {
|
package/dist/Search.js
CHANGED
|
@@ -8,7 +8,6 @@ import "@synerise/ds-tooltip";
|
|
|
8
8
|
import { SearchWrapper, SearchDropdownWrapper, SearchDropdownContent } from "./Search.styles.js";
|
|
9
9
|
import "react-window";
|
|
10
10
|
import "@synerise/ds-list-item";
|
|
11
|
-
import "@synerise/ds-menu";
|
|
12
11
|
import "@synerise/ds-button";
|
|
13
12
|
import SearchRenderer from "./Elements/SearchRenderer/SearchRenderer.js";
|
|
14
13
|
import { getAllElementsFiltered, hasSomeElement, getParametersScrollTop, hasSomeElementFiltered } from "./Elements/utils/searchUtils.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-search",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Search UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -42,13 +42,12 @@
|
|
|
42
42
|
],
|
|
43
43
|
"types": "dist/index.d.ts",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@synerise/ds-button": "^
|
|
46
|
-
"@synerise/ds-icon": "^1.
|
|
47
|
-
"@synerise/ds-list-item": "^
|
|
48
|
-
"@synerise/ds-
|
|
49
|
-
"@synerise/ds-
|
|
50
|
-
"@synerise/ds-
|
|
51
|
-
"@synerise/ds-utils": "^1.10.2",
|
|
45
|
+
"@synerise/ds-button": "^2.0.1",
|
|
46
|
+
"@synerise/ds-icon": "^2.1.0",
|
|
47
|
+
"@synerise/ds-list-item": "^2.0.1",
|
|
48
|
+
"@synerise/ds-scrollbar": "^2.0.1",
|
|
49
|
+
"@synerise/ds-tooltip": "^2.0.1",
|
|
50
|
+
"@synerise/ds-utils": "^2.0.0",
|
|
52
51
|
"react-onclickoutside": "^6.9.0",
|
|
53
52
|
"react-window": "^1.8.11"
|
|
54
53
|
},
|
|
@@ -58,5 +57,5 @@
|
|
|
58
57
|
"styled-components": "^5.3.3",
|
|
59
58
|
"vitest": "4"
|
|
60
59
|
},
|
|
61
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "1dc97a2bae9f1d20c3f35e6672d059d502c90d1a"
|
|
62
61
|
}
|