@synerise/ds-item-picker 1.17.0 → 1.17.2
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/ItemPicker.d.ts +5 -5
- package/dist/ItemPicker.js +13 -17
- package/dist/ItemPicker.styles.d.ts +1 -1
- package/dist/ItemPicker.styles.js +6 -3
- package/dist/components/ItemPickerDropdown/ItemPickerDropdown.d.ts +2 -2
- package/dist/components/ItemPickerDropdown/ItemPickerDropdown.js +58 -99
- package/dist/components/ItemPickerDropdown/ItemPickerDropdown.style.d.ts +7 -7
- package/dist/components/ItemPickerDropdown/ItemPickerDropdown.style.js +22 -19
- package/dist/components/ItemPickerDropdown/ItemPickerDropdown.types.d.ts +4 -4
- package/dist/components/ItemPickerDropdown/ItemPickerDropdown.types.js +1 -1
- package/dist/components/ItemPickerLegacy/ItemPickerLegacy.d.ts +2 -2
- package/dist/components/ItemPickerLegacy/ItemPickerLegacy.js +89 -152
- package/dist/components/ItemPickerLegacy/ItemPickerLegacy.types.d.ts +8 -8
- package/dist/components/ItemPickerLegacy/ItemPickerLegacy.types.js +1 -1
- package/dist/components/ItemPickerList/ItemPickerList.d.ts +4 -4
- package/dist/components/ItemPickerList/ItemPickerList.js +199 -267
- package/dist/components/ItemPickerList/ItemPickerList.styles.d.ts +18 -18
- package/dist/components/ItemPickerList/ItemPickerList.styles.js +55 -64
- package/dist/components/ItemPickerList/ItemPickerList.types.d.ts +3 -3
- package/dist/components/ItemPickerList/ItemPickerList.types.js +1 -1
- package/dist/components/ItemPickerList/components/EmptyListMessage.d.ts +3 -3
- package/dist/components/ItemPickerList/components/EmptyListMessage.js +27 -40
- package/dist/components/ItemPickerList/components/ErrorItem.d.ts +1 -1
- package/dist/components/ItemPickerList/components/ErrorItem.js +10 -9
- package/dist/components/ItemPickerList/components/ErrorMessage.d.ts +2 -2
- package/dist/components/ItemPickerList/components/ErrorMessage.js +12 -15
- package/dist/components/ItemPickerList/components/InfiniteLoaderItem.d.ts +2 -2
- package/dist/components/ItemPickerList/components/InfiniteLoaderItem.js +19 -17
- package/dist/components/ItemPickerList/components/ItemPickerListFooter.d.ts +3 -3
- package/dist/components/ItemPickerList/components/ItemPickerListFooter.js +21 -20
- package/dist/components/ItemPickerList/components/ItemPickerListRow.d.ts +4 -4
- package/dist/components/ItemPickerList/components/ItemPickerListRow.js +42 -43
- package/dist/components/ItemPickerList/components/ItemPickerListSkeleton.d.ts +1 -1
- package/dist/components/ItemPickerList/components/ItemPickerListSkeleton.js +16 -23
- package/dist/components/ItemPickerList/components/ListSearchInput.d.ts +4 -4
- package/dist/components/ItemPickerList/components/ListSearchInput.js +36 -51
- package/dist/components/ItemPickerList/components/LoadingItem.d.ts +1 -1
- package/dist/components/ItemPickerList/components/LoadingItem.js +10 -9
- package/dist/components/ItemPickerList/components/NoMoreItem.d.ts +1 -1
- package/dist/components/ItemPickerList/components/NoMoreItem.js +10 -9
- package/dist/components/ItemPickerList/components/index.js +14 -6
- package/dist/components/ItemPickerList/constants.d.ts +2 -2
- package/dist/components/ItemPickerList/constants.js +47 -26
- package/dist/components/ItemPickerList/hooks/index.js +8 -3
- package/dist/components/ItemPickerList/hooks/useFlattenFolders.d.ts +2 -2
- package/dist/components/ItemPickerList/hooks/useFlattenFolders.js +40 -61
- package/dist/components/ItemPickerList/hooks/useItemsInSections.d.ts +7 -7
- package/dist/components/ItemPickerList/hooks/useItemsInSections.js +342 -443
- package/dist/components/ItemPickerList/hooks/useItemsInSections.utils.d.ts +5 -5
- package/dist/components/ItemPickerList/hooks/useItemsInSections.utils.js +77 -74
- package/dist/components/ItemPickerList/hooks/useListHeight.d.ts +2 -2
- package/dist/components/ItemPickerList/hooks/useListHeight.js +37 -41
- package/dist/components/ItemPickerList/types/renderMode.js +8 -5
- package/dist/components/ItemPickerList/utils/actionItemsUtils.d.ts +4 -4
- package/dist/components/ItemPickerList/utils/actionItemsUtils.js +92 -92
- package/dist/components/ItemPickerList/utils/createTitleFromTitlePath.d.ts +2 -2
- package/dist/components/ItemPickerList/utils/createTitleFromTitlePath.js +7 -4
- package/dist/components/ItemPickerList/utils/findSectionById.d.ts +1 -1
- package/dist/components/ItemPickerList/utils/findSectionById.js +10 -12
- package/dist/components/ItemPickerList/utils/getContextAwareActions.d.ts +1 -1
- package/dist/components/ItemPickerList/utils/getContextAwareActions.js +19 -15
- package/dist/components/ItemPickerList/utils/getSearchByActionItems.d.ts +2 -2
- package/dist/components/ItemPickerList/utils/getSearchByActionItems.js +28 -29
- package/dist/components/ItemPickerList/utils/index.js +16 -4
- package/dist/components/ItemPickerList/utils/isNavKey.d.ts +1 -1
- package/dist/components/ItemPickerList/utils/isNavKey.js +6 -3
- package/dist/components/ItemPickerList/utils/resolveSectionId.d.ts +2 -2
- package/dist/components/ItemPickerList/utils/resolveSectionId.js +15 -9
- package/dist/components/ItemPickerList/utils/typeguards.utils.d.ts +5 -5
- package/dist/components/ItemPickerList/utils/typeguards.utils.js +23 -14
- package/dist/components/ItemPickerNew/ItemPickerNew.d.ts +4 -4
- package/dist/components/ItemPickerNew/ItemPickerNew.js +55 -100
- package/dist/components/ItemPickerNew/ItemPickerNew.types.d.ts +13 -13
- package/dist/components/ItemPickerNew/ItemPickerNew.types.js +1 -1
- package/dist/components/ItemPickerNew/types/actions.types.d.ts +2 -2
- package/dist/components/ItemPickerNew/types/actions.types.js +10 -6
- package/dist/components/ItemPickerNew/types/baseItemSectionType.types.d.ts +3 -3
- package/dist/components/ItemPickerNew/types/baseItemSectionType.types.js +1 -1
- package/dist/components/ItemPickerNew/types/itemPickerListTexts.types.d.ts +1 -1
- package/dist/components/ItemPickerNew/types/itemPickerListTexts.types.js +1 -1
- package/dist/components/ItemPickerTrigger/Trigger.d.ts +5 -5
- package/dist/components/ItemPickerTrigger/Trigger.js +71 -111
- package/dist/components/ItemPickerTrigger/Trigger.styles.d.ts +12 -12
- package/dist/components/ItemPickerTrigger/Trigger.styles.js +70 -93
- package/dist/components/ItemPickerTrigger/Trigger.types.d.ts +3 -3
- package/dist/components/ItemPickerTrigger/Trigger.types.js +1 -1
- package/dist/hooks/useDefaultTexts.d.ts +1 -1
- package/dist/hooks/useDefaultTexts.js +116 -121
- package/dist/index.js +14 -6
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/package.json +25 -25
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
|
+
## [1.17.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-item-picker@1.17.1...@synerise/ds-item-picker@1.17.2) (2026-04-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-item-picker
|
|
9
|
+
|
|
10
|
+
## [1.17.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-item-picker@1.17.0...@synerise/ds-item-picker@1.17.1) (2026-03-24)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @synerise/ds-item-picker
|
|
13
|
+
|
|
6
14
|
# [1.17.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-item-picker@1.16.2...@synerise/ds-item-picker@1.17.0) (2026-03-20)
|
|
7
15
|
|
|
8
16
|
### Bug Fixes
|
package/dist/ItemPicker.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ItemPickerProps } from './components/ItemPickerLegacy/ItemPickerLegacy.types';
|
|
3
|
+
import { ItemPickerListRef } from './components/ItemPickerList/ItemPickerList.types';
|
|
4
|
+
import { ItemPickerProps as ItemPickerPropsNew } from './components/ItemPickerNew/ItemPickerNew.types';
|
|
5
|
+
import { BaseItemType, BaseSectionType } from './components/ItemPickerNew/types/baseItemSectionType.types';
|
|
6
6
|
declare const ItemPickerInner: <ItemType extends BaseItemType, SectionType extends BaseSectionType | undefined>(props: ItemPickerProps | ItemPickerPropsNew<ItemType, SectionType>, forwardedRef: ItemPickerListRef) => React.JSX.Element;
|
|
7
7
|
type ItemPickerType = <ItemType extends BaseItemType, SectionType extends BaseSectionType>(p: ItemPickerProps | (ItemPickerPropsNew<ItemType, SectionType> & {
|
|
8
8
|
ref?: ItemPickerListRef;
|
package/dist/ItemPicker.js
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import ItemPickerLegacy from
|
|
4
|
-
import { ItemPickerNew } from
|
|
5
|
-
|
|
6
|
-
return
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import ItemPickerLegacy from "./components/ItemPickerLegacy/ItemPickerLegacy.js";
|
|
4
|
+
import { ItemPickerNew } from "./components/ItemPickerNew/ItemPickerNew.js";
|
|
5
|
+
const isNewItemPicker = (props) => {
|
|
6
|
+
return "isNewVersion" in props && props.isNewVersion;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
const ItemPickerInner = (props, forwardedRef) => {
|
|
9
9
|
if (isNewItemPicker(props)) {
|
|
10
|
-
return
|
|
11
|
-
key: "ds-item-picker"
|
|
12
|
-
}, props, {
|
|
13
|
-
ref: forwardedRef
|
|
14
|
-
}));
|
|
10
|
+
return /* @__PURE__ */ jsx(ItemPickerNew, { ...props, ref: forwardedRef }, "ds-item-picker");
|
|
15
11
|
}
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
return /* @__PURE__ */ jsx(ItemPickerLegacy, { ...props }, "ds-item-picker-legacy");
|
|
13
|
+
};
|
|
14
|
+
const ItemPicker = forwardRef(ItemPickerInner);
|
|
15
|
+
export {
|
|
16
|
+
ItemPicker as default
|
|
19
17
|
};
|
|
20
|
-
var ItemPicker = /*#__PURE__*/forwardRef(ItemPickerInner);
|
|
21
|
-
export default ItemPicker;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const ItemPickerWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "ItemPickerstyles__ItemPickerWrapper",
|
|
4
4
|
componentId: "sc-1dxa5ip-0"
|
|
5
|
-
})(["position:relative;"]);
|
|
5
|
+
})(["position:relative;"]);
|
|
6
|
+
export {
|
|
7
|
+
ItemPickerWrapper
|
|
8
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ItemPickerDropdownProps } from './ItemPickerDropdown.types';
|
|
3
3
|
declare const ItemPickerDropdown: ({ onChange, placeholder, dataSource, closeDropdown, noResults, dropdownVisibleRows, dropdownRowHeight, dropdownBottomAction, closeOnBottomAction, isDropdownOpened, searchBarProps, hideSearchBar, scrollbarProps, clearSearchQuery, }: ItemPickerDropdownProps) => React.JSX.Element;
|
|
4
4
|
export default ItemPickerDropdown;
|
|
@@ -1,47 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import Icon, { SearchM } from
|
|
4
|
-
import Result from
|
|
5
|
-
import SearchBar from
|
|
6
|
-
import { SearchItems } from
|
|
7
|
-
import { useKeyboardShortcuts } from
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
scrollTop = _useState2[0],
|
|
34
|
-
setScrollTop = _useState2[1];
|
|
35
|
-
var containerRef = useRef(null);
|
|
36
|
-
useEffect(function () {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useRef, useEffect, useMemo } from "react";
|
|
3
|
+
import Icon, { SearchM } from "@synerise/ds-icon";
|
|
4
|
+
import Result from "@synerise/ds-result";
|
|
5
|
+
import SearchBar from "@synerise/ds-search-bar";
|
|
6
|
+
import { SearchItems } from "@synerise/ds-search/dist/Elements";
|
|
7
|
+
import { useKeyboardShortcuts } from "@synerise/ds-utils";
|
|
8
|
+
import { DropdownWrapper, ListWrapper, StyledScrollbar, ListItem, DropdownFooter, BottomActionWrapper } from "./ItemPickerDropdown.style.js";
|
|
9
|
+
const DEFAULT_ROW_HEIGHT = 32;
|
|
10
|
+
const DEFAULT_VISIBLE_ROWS = 10;
|
|
11
|
+
const ItemPickerDropdown = ({
|
|
12
|
+
onChange,
|
|
13
|
+
placeholder,
|
|
14
|
+
dataSource,
|
|
15
|
+
closeDropdown,
|
|
16
|
+
noResults,
|
|
17
|
+
dropdownVisibleRows,
|
|
18
|
+
dropdownRowHeight,
|
|
19
|
+
dropdownBottomAction,
|
|
20
|
+
closeOnBottomAction,
|
|
21
|
+
isDropdownOpened,
|
|
22
|
+
searchBarProps,
|
|
23
|
+
hideSearchBar,
|
|
24
|
+
scrollbarProps,
|
|
25
|
+
clearSearchQuery
|
|
26
|
+
}) => {
|
|
27
|
+
const rowCount = dropdownVisibleRows || DEFAULT_VISIBLE_ROWS;
|
|
28
|
+
const rowHeight = dropdownRowHeight || DEFAULT_ROW_HEIGHT;
|
|
29
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
30
|
+
const [scrollTop, setScrollTop] = useState(0);
|
|
31
|
+
const containerRef = useRef(null);
|
|
32
|
+
useEffect(() => {
|
|
37
33
|
if (clearSearchQuery && clearSearchQuery > 0) {
|
|
38
|
-
setSearchQuery(
|
|
34
|
+
setSearchQuery("");
|
|
39
35
|
}
|
|
40
36
|
}, [clearSearchQuery]);
|
|
41
37
|
useKeyboardShortcuts({
|
|
42
|
-
Escape:
|
|
43
|
-
|
|
44
|
-
if (!((_containerRef$current = containerRef.current) != null && _containerRef$current.offsetParent)) {
|
|
38
|
+
Escape: (event) => {
|
|
39
|
+
if (!containerRef.current?.offsetParent) {
|
|
45
40
|
return;
|
|
46
41
|
}
|
|
47
42
|
if (!searchQuery) {
|
|
@@ -51,70 +46,34 @@ var ItemPickerDropdown = function ItemPickerDropdown(_ref) {
|
|
|
51
46
|
}
|
|
52
47
|
}
|
|
53
48
|
});
|
|
54
|
-
|
|
55
|
-
setSearchQuery(
|
|
49
|
+
const handleClose = () => {
|
|
50
|
+
setSearchQuery("");
|
|
56
51
|
closeDropdown();
|
|
57
52
|
};
|
|
58
|
-
|
|
53
|
+
const handleChange = (item) => {
|
|
59
54
|
handleClose();
|
|
60
55
|
onChange(item);
|
|
61
56
|
};
|
|
62
|
-
|
|
63
|
-
return searchQuery ? dataSource.filter(
|
|
64
|
-
return item.text && String(item.text).toLowerCase().includes(searchQuery.toLowerCase());
|
|
65
|
-
}) : dataSource;
|
|
57
|
+
const filteredDataSource = useMemo(() => {
|
|
58
|
+
return searchQuery ? dataSource.filter((item) => item.text && String(item.text).toLowerCase().includes(searchQuery.toLowerCase())) : dataSource;
|
|
66
59
|
}, [searchQuery, dataSource]);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}, dropdownBottomAction);
|
|
71
|
-
return dropdownBottomAction && /*#__PURE__*/React.createElement(S.DropdownFooter, null, bottomAction);
|
|
60
|
+
const renderBottomAction = () => {
|
|
61
|
+
const bottomAction = !closeOnBottomAction ? dropdownBottomAction : /* @__PURE__ */ jsx(BottomActionWrapper, { onClick: handleClose, children: dropdownBottomAction });
|
|
62
|
+
return dropdownBottomAction && /* @__PURE__ */ jsx(DropdownFooter, { children: bottomAction });
|
|
72
63
|
};
|
|
73
|
-
return
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
type: "no-results",
|
|
89
|
-
description: noResults
|
|
90
|
-
}), /*#__PURE__*/React.createElement(S.StyledScrollbar, _extends({
|
|
91
|
-
maxHeight: rowCount * rowHeight,
|
|
92
|
-
absolute: true,
|
|
93
|
-
onScroll: function onScroll(event) {
|
|
94
|
-
return setScrollTop(event.currentTarget.scrollTop);
|
|
95
|
-
},
|
|
96
|
-
style: {
|
|
97
|
-
paddingRight: '8px'
|
|
98
|
-
}
|
|
99
|
-
}, scrollbarProps), /*#__PURE__*/React.createElement(SearchItems, {
|
|
100
|
-
data: filteredDataSource,
|
|
101
|
-
highlight: (_searchBarProps$value = searchBarProps == null ? void 0 : searchBarProps.value) != null ? _searchBarProps$value : searchQuery,
|
|
102
|
-
itemRender: function itemRender(item) {
|
|
103
|
-
return /*#__PURE__*/React.createElement(S.ListItem, _extends({
|
|
104
|
-
key: item == null ? void 0 : item.text
|
|
105
|
-
}, item));
|
|
106
|
-
},
|
|
107
|
-
onItemClick: function onItemClick(i) {
|
|
108
|
-
return handleChange(i);
|
|
109
|
-
},
|
|
110
|
-
rowHeight: rowHeight,
|
|
111
|
-
height: rowCount * rowHeight,
|
|
112
|
-
visibleRows: rowCount,
|
|
113
|
-
listProps: {
|
|
114
|
-
scrollTop: scrollTop
|
|
115
|
-
},
|
|
116
|
-
width: "100%",
|
|
117
|
-
renderInMenu: false
|
|
118
|
-
}))), renderBottomAction());
|
|
64
|
+
return /* @__PURE__ */ jsxs(DropdownWrapper, { ref: containerRef, "data-testid": "ds-item-picker-dropdown", children: [
|
|
65
|
+
hideSearchBar !== true && /* @__PURE__ */ jsx(SearchBar, { iconLeft: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(SearchM, {}) }), onSearchChange: setSearchQuery, placeholder, value: searchQuery, onClearInput: () => setSearchQuery(""), autofocus: isDropdownOpened, ...searchBarProps }),
|
|
66
|
+
/* @__PURE__ */ jsxs(ListWrapper, { children: [
|
|
67
|
+
filteredDataSource?.length === 0 && /* @__PURE__ */ jsx(Result, { type: "no-results", description: noResults }),
|
|
68
|
+
/* @__PURE__ */ jsx(StyledScrollbar, { maxHeight: rowCount * rowHeight, absolute: true, onScroll: (event) => setScrollTop(event.currentTarget.scrollTop), style: {
|
|
69
|
+
paddingRight: "8px"
|
|
70
|
+
}, ...scrollbarProps, children: /* @__PURE__ */ jsx(SearchItems, { data: filteredDataSource, highlight: searchBarProps?.value ?? searchQuery, itemRender: (item) => /* @__PURE__ */ jsx(ListItem, { ...item }, item?.text), onItemClick: (i) => handleChange(i), rowHeight, height: rowCount * rowHeight, visibleRows: rowCount, listProps: {
|
|
71
|
+
scrollTop
|
|
72
|
+
}, width: "100%", renderInMenu: false }) })
|
|
73
|
+
] }),
|
|
74
|
+
renderBottomAction()
|
|
75
|
+
] });
|
|
76
|
+
};
|
|
77
|
+
export {
|
|
78
|
+
ItemPickerDropdown as default
|
|
119
79
|
};
|
|
120
|
-
export default ItemPickerDropdown;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export declare const DropdownWrapper: import(
|
|
1
|
+
import { StyledListItem } from '@synerise/ds-list-item';
|
|
2
|
+
import { ScrollbarProps } from '@synerise/ds-scrollbar';
|
|
3
|
+
export declare const DropdownWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export declare const ListItem: StyledListItem;
|
|
5
|
-
export declare const ListWrapper: import(
|
|
6
|
-
export declare const StyledScrollbar: import(
|
|
7
|
-
export declare const DropdownFooter: import(
|
|
8
|
-
export declare const BottomActionWrapper: import(
|
|
5
|
+
export declare const ListWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const StyledScrollbar: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<(ScrollbarProps | import('@synerise/ds-scrollbar').VirtualScrollbarProps) & import('react').RefAttributes<HTMLElement>>, any, ScrollbarProps, never>;
|
|
7
|
+
export declare const DropdownFooter: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const BottomActionWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
@@ -1,34 +1,37 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
import DSListItem from
|
|
3
|
-
import Scrollbar from
|
|
4
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import DSListItem from "@synerise/ds-list-item";
|
|
3
|
+
import Scrollbar from "@synerise/ds-scrollbar";
|
|
4
|
+
const DropdownWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
5
5
|
displayName: "ItemPickerDropdownstyle__DropdownWrapper",
|
|
6
6
|
componentId: "sc-1y4j72s-0"
|
|
7
7
|
})(["display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;width:100%;"]);
|
|
8
|
-
|
|
8
|
+
const ListItem = /* @__PURE__ */ styled(DSListItem).withConfig({
|
|
9
9
|
displayName: "ItemPickerDropdownstyle__ListItem",
|
|
10
10
|
componentId: "sc-1y4j72s-1"
|
|
11
11
|
})(["min-width:auto;"]);
|
|
12
|
-
|
|
12
|
+
const ListWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
13
13
|
displayName: "ItemPickerDropdownstyle__ListWrapper",
|
|
14
14
|
componentId: "sc-1y4j72s-2"
|
|
15
|
-
})(["display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;padding:8px 0 8px 8px;background:", ";"],
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export var StyledScrollbar = styled(Scrollbar).withConfig({
|
|
15
|
+
})(["display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;padding:8px 0 8px 8px;background:", ";"], ({
|
|
16
|
+
theme
|
|
17
|
+
}) => theme.palette.white);
|
|
18
|
+
const StyledScrollbar = /* @__PURE__ */ styled(Scrollbar).withConfig({
|
|
20
19
|
displayName: "ItemPickerDropdownstyle__StyledScrollbar",
|
|
21
20
|
componentId: "sc-1y4j72s-3"
|
|
22
21
|
})(["&&{.scrollbar-container{padding-right:8px;}}"]);
|
|
23
|
-
|
|
22
|
+
const DropdownFooter = /* @__PURE__ */ styled.div.withConfig({
|
|
24
23
|
displayName: "ItemPickerDropdownstyle__DropdownFooter",
|
|
25
24
|
componentId: "sc-1y4j72s-4"
|
|
26
|
-
})(["background-color:", ";height:52px;display:flex;align-items:center;border-top:1px solid ", ";cursor:default;margin:0;padding:0 8px;"],
|
|
27
|
-
|
|
28
|
-
}, function (props) {
|
|
29
|
-
return props.theme.palette['grey-100'];
|
|
30
|
-
});
|
|
31
|
-
export var BottomActionWrapper = styled.div.withConfig({
|
|
25
|
+
})(["background-color:", ";height:52px;display:flex;align-items:center;border-top:1px solid ", ";cursor:default;margin:0;padding:0 8px;"], (props) => props.theme.palette["grey-050"], (props) => props.theme.palette["grey-100"]);
|
|
26
|
+
const BottomActionWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
32
27
|
displayName: "ItemPickerDropdownstyle__BottomActionWrapper",
|
|
33
28
|
componentId: "sc-1y4j72s-5"
|
|
34
|
-
})([""]);
|
|
29
|
+
})([""]);
|
|
30
|
+
export {
|
|
31
|
+
BottomActionWrapper,
|
|
32
|
+
DropdownFooter,
|
|
33
|
+
DropdownWrapper,
|
|
34
|
+
ListItem,
|
|
35
|
+
ListWrapper,
|
|
36
|
+
StyledScrollbar
|
|
37
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ListItemProps } from '@synerise/ds-list-item';
|
|
3
|
+
import { ScrollbarAdditionalProps } from '@synerise/ds-scrollbar';
|
|
4
|
+
import { SearchBarProps } from '@synerise/ds-search-bar/dist/SearchBar.types';
|
|
5
5
|
export type ItemPickerDropdownProps = {
|
|
6
6
|
onChange: (item: ListItemProps) => void;
|
|
7
7
|
placeholder: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|