@synerise/ds-item-picker 2.2.0 → 2.2.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 +21 -0
- package/CLAUDE.md +1 -2
- package/dist/components/ItemPickerList/ItemPickerList.js +8 -6
- package/dist/components/ItemPickerList/hooks/useItemsInSections.d.ts +1 -0
- package/dist/components/ItemPickerList/hooks/useItemsInSections.js +30 -4
- package/dist/components/ItemPickerTrigger/Trigger.js +2 -2
- package/dist/components/ItemPickerTrigger/Trigger.styles.d.ts +1 -0
- package/dist/components/ItemPickerTrigger/Trigger.styles.js +8 -3
- package/package.json +27 -28
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,27 @@
|
|
|
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.2.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-item-picker@2.2.1...@synerise/ds-item-picker@2.2.2) (2026-10-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* drop vitest peer dependency and bump vulnerable runtime deps ([2467d36](https://github.com/Synerise/synerise-design/commit/2467d3606aa97141a3a2d80c3ef396e78bee285c))
|
|
12
|
+
* **item-picker:** fix list bugs found while prototyping the mixed list variant ([8104f7a](https://github.com/Synerise/synerise-design/commit/8104f7a535dd96982971a9c962f41d162a5f5114))
|
|
13
|
+
* remove per-render random keys and guard against them with a Biome plugin ([fcea7c5](https://github.com/Synerise/synerise-design/commit/fcea7c5d60b80c28cbbd191bfa2792379782a0e8))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## [2.2.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-item-picker@2.2.0...@synerise/ds-item-picker@2.2.1) (2026-10-22)
|
|
20
|
+
|
|
21
|
+
**Note:** Version bump only for package @synerise/ds-item-picker
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
6
27
|
# [2.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-item-picker@2.1.4...@synerise/ds-item-picker@2.2.0) (2026-10-20)
|
|
7
28
|
|
|
8
29
|
|
package/CLAUDE.md
CHANGED
|
@@ -303,7 +303,6 @@ import { ItemPickerList } from '@synerise/ds-item-picker';
|
|
|
303
303
|
| `@synerise/ds-popconfirm` | Clear-confirmation dialog |
|
|
304
304
|
| `@synerise/ds-information-card` | Optional info tooltip on trigger |
|
|
305
305
|
| `lodash.debounce` | 300 ms debounce on search query |
|
|
306
|
-
| `uuid` | Unique class-name per list instance (used by `focusWithArrowKeys`) |
|
|
307
306
|
| `react-intl` | All default text strings |
|
|
308
307
|
|
|
309
308
|
---
|
|
@@ -328,4 +327,4 @@ import { ItemPickerList } from '@synerise/ds-item-picker';
|
|
|
328
327
|
- **`Props` alias** in `Trigger.types.ts` is marked `@deprecated`; use `ItemPickerTriggerProps`.
|
|
329
328
|
- **Tests use Vitest** (`vitest run`); the root `@testing-library/user-event` is v10, so there is no `userEvent.hover` — a `ds-tooltip` cannot be opened from these specs.
|
|
330
329
|
- The search-bar `searchPlaceholder` in `ItemPickerNew` must be overridden via `texts.searchPlaceholder` (not a top-level prop), unlike `ItemPickerLegacy` where it is a direct prop.
|
|
331
|
-
- `ItemPickerList` generates a unique per-instance CSS class via `
|
|
330
|
+
- `ItemPickerList` generates a unique per-instance CSS class via `generateUuid()` on mount; `focusWithArrowKeys` from `@synerise/ds-utils` uses this class for keyboard navigation.
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import debounce from "lodash.debounce";
|
|
3
3
|
import { forwardRef, useState, useRef, useCallback, useMemo, useImperativeHandle, useEffect } from "react";
|
|
4
|
-
import { v4 } from "uuid";
|
|
5
4
|
import { useTheme } from "@synerise/ds-core";
|
|
6
5
|
import Dropdown from "@synerise/ds-dropdown";
|
|
7
6
|
import Icon, { ArrowLeftM } from "@synerise/ds-icon";
|
|
8
7
|
import { itemSizes, ListContextProvider } from "@synerise/ds-list-item";
|
|
9
8
|
import { Text } from "@synerise/ds-typography";
|
|
10
|
-
import { useCombinedRefs, useScrollContain, useMeasuredRowHeights, useKeyboardShortcuts, focusWithArrowKeys } from "@synerise/ds-utils";
|
|
9
|
+
import { useCombinedRefs, useScrollContain, generateUuid, useMeasuredRowHeights, useKeyboardShortcuts, focusWithArrowKeys } from "@synerise/ds-utils";
|
|
11
10
|
import { useDefaultTexts } from "../../hooks/useDefaultTexts.js";
|
|
12
11
|
import { EmptyListMessage } from "./components/EmptyListMessage.js";
|
|
13
12
|
import { ErrorMessage } from "./components/ErrorMessage.js";
|
|
@@ -23,6 +22,7 @@ import { useListHeight } from "./hooks/useListHeight.js";
|
|
|
23
22
|
import { findSectionById } from "./utils/findSectionById.js";
|
|
24
23
|
import { isNavKey } from "./utils/isNavKey.js";
|
|
25
24
|
import { isTitle } from "./utils/typeguards.utils.js";
|
|
25
|
+
const ListRow = ItemPickerListRow;
|
|
26
26
|
const ItemPickerListInner = ({
|
|
27
27
|
items,
|
|
28
28
|
recents,
|
|
@@ -70,7 +70,7 @@ const ItemPickerListInner = ({
|
|
|
70
70
|
const debouncedSearchQueryChange = useRef(debounce((query) => {
|
|
71
71
|
changeSearchQuery(query);
|
|
72
72
|
}, 300)).current;
|
|
73
|
-
const classNames = useMemo(() => `ds-item-picker-dropdown ds-item-picker-dropdown-${
|
|
73
|
+
const classNames = useMemo(() => `ds-item-picker-dropdown ds-item-picker-dropdown-${generateUuid()}`, []);
|
|
74
74
|
const handleItemSelect = (item) => {
|
|
75
75
|
const section = findSectionById(sections, item.sectionId);
|
|
76
76
|
onItemSelect?.(item, section);
|
|
@@ -85,6 +85,7 @@ const ItemPickerListInner = ({
|
|
|
85
85
|
isLoadingMoreError,
|
|
86
86
|
isLoading: isLoadingItems,
|
|
87
87
|
isLoadedAll,
|
|
88
|
+
isSinglePage,
|
|
88
89
|
isLoadingError,
|
|
89
90
|
handleScrollEndReach,
|
|
90
91
|
refreshItems,
|
|
@@ -144,6 +145,7 @@ const ItemPickerListInner = ({
|
|
|
144
145
|
}, []);
|
|
145
146
|
const handleKeyDown = (event) => {
|
|
146
147
|
if (isNavKey(event)) {
|
|
148
|
+
event.stopPropagation();
|
|
147
149
|
focusWithArrowKeys(event, classNames.split(" ")[1], () => {
|
|
148
150
|
focusSearchInput();
|
|
149
151
|
});
|
|
@@ -172,12 +174,12 @@ const ItemPickerListInner = ({
|
|
|
172
174
|
getEstimatedItemSize,
|
|
173
175
|
measureRow,
|
|
174
176
|
texts: allTexts,
|
|
175
|
-
infiniteScroll: {
|
|
177
|
+
infiniteScroll: isSinglePage ? void 0 : {
|
|
176
178
|
isLoading: isLoadingMore,
|
|
177
179
|
hasMore: !isLoadedAll,
|
|
178
180
|
hasError: isLoadingMoreError
|
|
179
181
|
}
|
|
180
|
-
}), [mergedItemsList, classNames, getItemSize, getEstimatedItemSize, measureRow, allTexts, isLoadingMore, isLoadedAll, isLoadingMoreError]);
|
|
182
|
+
}), [mergedItemsList, classNames, getItemSize, getEstimatedItemSize, measureRow, allTexts, isLoadingMore, isLoadedAll, isSinglePage, isLoadingMoreError]);
|
|
181
183
|
const handleRefresh = onRefresh || refreshItems ? () => {
|
|
182
184
|
changeSearchQuery("");
|
|
183
185
|
setSearchByParamConfig(void 0);
|
|
@@ -227,7 +229,7 @@ const ItemPickerListInner = ({
|
|
|
227
229
|
title: allTexts.backTooltip,
|
|
228
230
|
shortCuts: ["⌘", /* @__PURE__ */ jsx(Icon, { size: 18, color: theme.palette.white, component: /* @__PURE__ */ jsx(ArrowLeftM, {}) }, "hint-arrow-left")]
|
|
229
231
|
}, label: getSectionLabel(), onClick: goBack }),
|
|
230
|
-
mergedItemsList?.length === 0 ? /* @__PURE__ */ jsx(EmptyListMessage, { buttonOnClick: () => resetCurrentSection(), listActions, hasCurrentSection: isSection, texts: allTexts, isActionSection, currentSection, searchQuery, emptyListIcon, noResultsIcon, emptyStateComponent, noResultsComponent }) : /* @__PURE__ */ jsx(StyledScrollbar, { withSectionHeader: isSection, maxHeight: listHeight, "data-maxheight": listHeight, onScroll: handleScroll, absolute: true, withDnd: false, ref: scrollBarRef, ...scrollbarProps, children: /* @__PURE__ */ jsx(ScrollContent, { children: /* @__PURE__ */ jsx(ListContextProvider, { children: /* @__PURE__ */ jsx(StyledList, { width: "100%", "data-listheight": listHeight, height: listHeight, maxHeight: listHeight, itemCount: mergedItemsList.length, itemSize: getItemSize, itemData, style: LIST_STYLE, ref: listRef, children:
|
|
232
|
+
mergedItemsList?.length === 0 ? /* @__PURE__ */ jsx(EmptyListMessage, { buttonOnClick: () => resetCurrentSection(), listActions, hasCurrentSection: isSection, texts: allTexts, isActionSection, currentSection, searchQuery, emptyListIcon, noResultsIcon, emptyStateComponent, noResultsComponent }) : /* @__PURE__ */ jsx(StyledScrollbar, { withSectionHeader: isSection, maxHeight: listHeight, "data-maxheight": listHeight, onScroll: handleScroll, absolute: true, withDnd: false, ref: scrollBarRef, ...scrollbarProps, children: /* @__PURE__ */ jsx(ScrollContent, { children: /* @__PURE__ */ jsx(ListContextProvider, { children: /* @__PURE__ */ jsx(StyledList, { width: "100%", "data-listheight": listHeight, height: listHeight, maxHeight: listHeight, itemCount: mergedItemsList.length, itemSize: getItemSize, itemData, style: LIST_STYLE, ref: listRef, children: ListRow }) }) }) })
|
|
231
233
|
] });
|
|
232
234
|
}, [allTexts, currentSection, currentPath, getItemSize, handleScroll, isLoading, isLoadingError, isLoadingItems, itemData, listHeight, goBack, mergedItemsList.length, scrollbarProps, searchQuery, listWrapperHeight]);
|
|
233
235
|
useEffect(() => {
|
|
@@ -27,6 +27,7 @@ export declare const useItemsInSections: <ItemType extends BaseItemType, Section
|
|
|
27
27
|
isLoading: boolean;
|
|
28
28
|
isLoadingMore: boolean;
|
|
29
29
|
isLoadedAll: boolean;
|
|
30
|
+
isSinglePage: boolean;
|
|
30
31
|
handleScrollEndReach: () => void;
|
|
31
32
|
refreshItems: (() => void) | undefined;
|
|
32
33
|
isLoadingError: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useState, useRef, useMemo, useCallback, useEffect } from "react";
|
|
2
2
|
import { itemSizes } from "@synerise/ds-list-item";
|
|
3
|
+
import { generateUuid } from "@synerise/ds-utils";
|
|
3
4
|
import { FIRST_PAGE, ITEMS_PER_SECTION_IN_SEARCH, ITEMS_PER_SECTION, ITEM_SIZE, SECTION_HEADER_HEIGHT, GET_ITEM_KEY, ITEMS_PER_PAGE, SECOND_PAGE } from "../constants.js";
|
|
4
5
|
import { RENDER_MODES } from "../types/renderMode.js";
|
|
5
6
|
import { isItems, isItemsConfig, isWithOutSections } from "../utils/typeguards.utils.js";
|
|
@@ -56,6 +57,7 @@ const useItemsInSections = ({
|
|
|
56
57
|
const [isLoadingMoreError, setIsLoadingMoreError] = useState(false);
|
|
57
58
|
const [isLoadingMore, setIsLoadingMore] = useState(false);
|
|
58
59
|
const [isLoadedAll, setIsLoadedAll] = useState(false);
|
|
60
|
+
const [isSinglePage, setIsSinglePage] = useState(false);
|
|
59
61
|
const [refreshTrigger, setRefreshTrigger] = useState();
|
|
60
62
|
const [currentItems, setCurrentItems] = useState(() => {
|
|
61
63
|
if (isFixedItemsList) {
|
|
@@ -237,20 +239,23 @@ const useItemsInSections = ({
|
|
|
237
239
|
}
|
|
238
240
|
setIsLoading(true);
|
|
239
241
|
setIsLoadingError(false);
|
|
240
|
-
const currentRequestId =
|
|
242
|
+
const currentRequestId = generateUuid();
|
|
241
243
|
requestIdRef.current = currentRequestId;
|
|
244
|
+
const abortController = abortControllerRef.current;
|
|
242
245
|
if (listRenderingMode === RENDER_MODES.LIST_ITEMS) {
|
|
243
246
|
try {
|
|
247
|
+
const limit = items.limitPerPage || ITEMS_PER_PAGE;
|
|
244
248
|
const {
|
|
245
249
|
items: fetchedItems2,
|
|
250
|
+
total,
|
|
246
251
|
meta
|
|
247
252
|
} = await items.loadItems({
|
|
248
253
|
page: FIRST_PAGE,
|
|
249
254
|
searchQuery,
|
|
250
255
|
sectionId: activeSectionIdWithFallback,
|
|
251
|
-
limit
|
|
256
|
+
limit,
|
|
252
257
|
meta: void 0,
|
|
253
|
-
abortController
|
|
258
|
+
abortController,
|
|
254
259
|
searchKey: searchByParamConfig?.paramKey,
|
|
255
260
|
searchInItem
|
|
256
261
|
});
|
|
@@ -259,6 +264,10 @@ const useItemsInSections = ({
|
|
|
259
264
|
}
|
|
260
265
|
setIsLoading(false);
|
|
261
266
|
pageToLoad.current = FIRST_PAGE + 1;
|
|
267
|
+
if (total <= limit) {
|
|
268
|
+
setIsLoadedAll(true);
|
|
269
|
+
setIsSinglePage(true);
|
|
270
|
+
}
|
|
262
271
|
metaRef.current[activeSectionIdWithFallback] = meta;
|
|
263
272
|
onLoadedData?.({
|
|
264
273
|
sectionId: activeSectionIdWithFallback,
|
|
@@ -268,9 +277,14 @@ const useItemsInSections = ({
|
|
|
268
277
|
setIsInitialDataLoaded(true);
|
|
269
278
|
setCurrentItems(fetchedItems2);
|
|
270
279
|
} catch (_event) {
|
|
280
|
+
if (currentRequestId !== requestIdRef.current) {
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
271
283
|
setIsLoading(false);
|
|
272
284
|
setIsInitialDataLoaded(true);
|
|
273
|
-
|
|
285
|
+
if (!abortController?.signal.aborted) {
|
|
286
|
+
setIsLoadingError(true);
|
|
287
|
+
}
|
|
274
288
|
}
|
|
275
289
|
return;
|
|
276
290
|
}
|
|
@@ -341,6 +355,7 @@ const useItemsInSections = ({
|
|
|
341
355
|
pageToLoad.current = FIRST_PAGE;
|
|
342
356
|
metaRef.current = {};
|
|
343
357
|
setIsLoadedAll(false);
|
|
358
|
+
setIsSinglePage(false);
|
|
344
359
|
setIsLoadingMore(false);
|
|
345
360
|
sectionTotals.current = {};
|
|
346
361
|
if (!isFixedItemsList) {
|
|
@@ -378,12 +393,15 @@ const useItemsInSections = ({
|
|
|
378
393
|
return;
|
|
379
394
|
}
|
|
380
395
|
setIsLoadingMore(true);
|
|
396
|
+
const pageRequestId = requestIdRef.current;
|
|
397
|
+
const isStale = () => pageRequestId !== requestIdRef.current;
|
|
381
398
|
items.loadItems({
|
|
382
399
|
page: pageToLoad.current,
|
|
383
400
|
limit: items.limitPerPage || ITEMS_PER_PAGE,
|
|
384
401
|
searchQuery,
|
|
385
402
|
sectionId: activeSectionIdWithFallback,
|
|
386
403
|
meta: metaRef.current[activeSectionIdWithFallback],
|
|
404
|
+
abortController: abortControllerRef.current,
|
|
387
405
|
searchKey: searchByParamConfig?.paramKey,
|
|
388
406
|
searchInItem
|
|
389
407
|
}).then(({
|
|
@@ -391,6 +409,9 @@ const useItemsInSections = ({
|
|
|
391
409
|
total,
|
|
392
410
|
meta
|
|
393
411
|
}) => {
|
|
412
|
+
if (isStale()) {
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
394
415
|
sectionTotals.current[activeSectionIdWithFallback] = total;
|
|
395
416
|
metaRef.current[activeSectionIdWithFallback] = meta;
|
|
396
417
|
setIsLoadingMore(false);
|
|
@@ -401,6 +422,9 @@ const useItemsInSections = ({
|
|
|
401
422
|
pageToLoad.current += 1;
|
|
402
423
|
setCurrentItems([...currentItems, ...fetchedItems]);
|
|
403
424
|
}).catch(() => {
|
|
425
|
+
if (isStale()) {
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
404
428
|
setIsLoadingMore(false);
|
|
405
429
|
setIsLoadingMoreError(true);
|
|
406
430
|
});
|
|
@@ -495,6 +519,7 @@ const useItemsInSections = ({
|
|
|
495
519
|
pageToLoad.current = FIRST_PAGE;
|
|
496
520
|
metaRef.current = {};
|
|
497
521
|
setIsLoadedAll(false);
|
|
522
|
+
setIsSinglePage(false);
|
|
498
523
|
setIsLoadingMore(false);
|
|
499
524
|
sectionTotals.current = {};
|
|
500
525
|
abortControllerRef.current?.abort();
|
|
@@ -513,6 +538,7 @@ const useItemsInSections = ({
|
|
|
513
538
|
isLoading: isLoading || !isInitialDataLoaded,
|
|
514
539
|
isLoadingMore,
|
|
515
540
|
isLoadedAll,
|
|
541
|
+
isSinglePage,
|
|
516
542
|
handleScrollEndReach,
|
|
517
543
|
refreshItems,
|
|
518
544
|
isLoadingError,
|
|
@@ -7,7 +7,7 @@ import { InformationCardTooltip } from "@synerise/ds-information-card";
|
|
|
7
7
|
import Popconfirm from "@synerise/ds-popconfirm";
|
|
8
8
|
import Tooltip from "@synerise/ds-tooltip";
|
|
9
9
|
import { useDefaultTexts } from "../../hooks/useDefaultTexts.js";
|
|
10
|
-
import { ClearIconWrapper, ClearWrapper, AngleIconWrapper, ChangeButtonWrapper, TriggerWrapper, Trigger as Trigger$1, Value, Prefix, ValueText, Placeholder, IconWrapper } from "./Trigger.styles.js";
|
|
10
|
+
import { ClearIconWrapper, ClearWrapper, AngleIconWrapper, ChangeButtonWrapper, TriggerWrapper, Trigger as Trigger$1, Value, Prefix, ValueText, Placeholder, IconWrapper, InformationCardTriggerWrapper } from "./Trigger.styles.js";
|
|
11
11
|
const Trigger = forwardRef(({
|
|
12
12
|
selected,
|
|
13
13
|
clear,
|
|
@@ -86,7 +86,7 @@ const Trigger = forwardRef(({
|
|
|
86
86
|
renderAngleIcon
|
|
87
87
|
] })
|
|
88
88
|
] }), [disabled, error, handleOpen, informationCardTooltipProps, onClear, opened, placeholder, placeholderIcon, ref, renderAngleIcon, renderChangeButton, renderClear, selected, size]);
|
|
89
|
-
return informationCardTooltipProps ? /* @__PURE__ */ jsx(
|
|
89
|
+
return informationCardTooltipProps ? /* @__PURE__ */ jsx(InformationCardTriggerWrapper, { children: /* @__PURE__ */ jsx(InformationCardTooltip, { ref, ...informationCardTooltipProps, children: renderedTrigger }) }) : renderedTrigger;
|
|
90
90
|
});
|
|
91
91
|
export {
|
|
92
92
|
Trigger as default
|
|
@@ -23,6 +23,7 @@ export declare const Value: import('styled-components').StyledComponent<"div", a
|
|
|
23
23
|
export declare const Trigger: import('styled-components').StyledComponent<"div", any, {
|
|
24
24
|
size: ItemPickerSize;
|
|
25
25
|
}, never>;
|
|
26
|
+
export declare const InformationCardTriggerWrapper: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
26
27
|
export declare const TriggerWrapper: import('styled-components').StyledComponent<"div", any, TriggerWrapperProps, never>;
|
|
27
28
|
export declare const ChangeButtonWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
28
29
|
export declare const ValueText: import('styled-components').StyledComponent<"span", any, {
|
|
@@ -55,9 +55,13 @@ const Trigger = /* @__PURE__ */ styled.div.withConfig({
|
|
|
55
55
|
displayName: "Triggerstyles__Trigger",
|
|
56
56
|
componentId: "sc-1t1uce7-7"
|
|
57
57
|
})(["max-width:100%;width:100%;overflow:hidden;border-radius:3px;height:", ";display:flex;align-items:center;justify-content:flex-start;position:relative;transition:all 0.3s ease;font-weight:", ";"], (props) => props.size === "small" ? "32px" : "48px", (props) => props.size === "small" ? "400" : "500");
|
|
58
|
+
const InformationCardTriggerWrapper = /* @__PURE__ */ styled.span.withConfig({
|
|
59
|
+
displayName: "Triggerstyles__InformationCardTriggerWrapper",
|
|
60
|
+
componentId: "sc-1t1uce7-8"
|
|
61
|
+
})(["display:block;width:100%;min-width:0;"]);
|
|
58
62
|
const TriggerWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
59
63
|
displayName: "Triggerstyles__TriggerWrapper",
|
|
60
|
-
componentId: "sc-1t1uce7-
|
|
64
|
+
componentId: "sc-1t1uce7-9"
|
|
61
65
|
})(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between;cursor:", ";pointer-events:", ";position:relative;border-radius:3px;transition:all 0.3s ease;padding:", ";background-color:", ";", " ", " &:hover{", ";", "}&:focus{background-color:", ";", ";}&&{", ";", " ", ";", ";}"], (props) => {
|
|
62
66
|
if (props.disabled) {
|
|
63
67
|
return "not-allowed";
|
|
@@ -94,11 +98,11 @@ const TriggerWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
|
94
98
|
`, (props) => props.theme.palette["blue-050"], (props) => getFocusStyles(props), (props) => props.selected && props.size === "large" && css(["border:1px solid ", ";&:hover{border:1px solid ", ";}"], props.theme.palette["grey-300"], props.theme.palette["grey-400"]), (props) => props.opened && !props.error && css(["background-color:", ";", ";"], props.theme.palette["blue-050"], getFocusStyles(props)), (props) => Boolean(props.error) && css(["background-color:", ";", ""], props.theme.palette["red-050"], getErrorStyles(props)), (props) => Boolean(props.disabled) && css(["", "{opacity:0.4;}"], IconWrapper));
|
|
95
99
|
const ChangeButtonWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
96
100
|
displayName: "Triggerstyles__ChangeButtonWrapper",
|
|
97
|
-
componentId: "sc-1t1uce7-
|
|
101
|
+
componentId: "sc-1t1uce7-10"
|
|
98
102
|
})(["margin:0 4px 0 8px;"]);
|
|
99
103
|
const ValueText = /* @__PURE__ */ styled.span.withConfig({
|
|
100
104
|
displayName: "Triggerstyles__ValueText",
|
|
101
|
-
componentId: "sc-1t1uce7-
|
|
105
|
+
componentId: "sc-1t1uce7-11"
|
|
102
106
|
})(["text-overflow:ellipsis;overflow:hidden;white-space:nowrap;", ""], (props) => props.isObjectDeleted && css(["color:", ";"], props.theme.palette["red-600"]));
|
|
103
107
|
export {
|
|
104
108
|
AngleIconWrapper,
|
|
@@ -106,6 +110,7 @@ export {
|
|
|
106
110
|
ClearIconWrapper,
|
|
107
111
|
ClearWrapper,
|
|
108
112
|
IconWrapper,
|
|
113
|
+
InformationCardTriggerWrapper,
|
|
109
114
|
Placeholder,
|
|
110
115
|
Prefix,
|
|
111
116
|
Trigger,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-item-picker",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "ItemPicker UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -42,40 +42,39 @@
|
|
|
42
42
|
],
|
|
43
43
|
"types": "dist/index.d.ts",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@synerise/ds-avatar": "^2.0.
|
|
46
|
-
"@synerise/ds-button": "^2.1.
|
|
47
|
-
"@synerise/ds-dropdown": "^2.1.
|
|
48
|
-
"@synerise/ds-empty-states": "^2.0.
|
|
49
|
-
"@synerise/ds-flag": "^2.0.
|
|
50
|
-
"@synerise/ds-form-field": "^2.0.
|
|
51
|
-
"@synerise/ds-icon": "^2.2.
|
|
52
|
-
"@synerise/ds-information-card": "^2.0.
|
|
53
|
-
"@synerise/ds-inline-alert": "^2.0.
|
|
54
|
-
"@synerise/ds-list-item": "^2.2.
|
|
55
|
-
"@synerise/ds-loader": "^2.0.
|
|
56
|
-
"@synerise/ds-popconfirm": "^2.0.
|
|
57
|
-
"@synerise/ds-result": "^2.0.
|
|
58
|
-
"@synerise/ds-scrollbar": "^2.0.
|
|
59
|
-
"@synerise/ds-search": "^2.0.
|
|
60
|
-
"@synerise/ds-search-bar": "^2.0.
|
|
61
|
-
"@synerise/ds-short-cuts": "^2.0.
|
|
62
|
-
"@synerise/ds-skeleton": "^2.0.
|
|
63
|
-
"@synerise/ds-tooltip": "^2.0.
|
|
64
|
-
"@synerise/ds-typography": "^2.0.
|
|
65
|
-
"@synerise/ds-utils": "^2.2.
|
|
45
|
+
"@synerise/ds-avatar": "^2.0.10",
|
|
46
|
+
"@synerise/ds-button": "^2.1.5",
|
|
47
|
+
"@synerise/ds-dropdown": "^2.1.7",
|
|
48
|
+
"@synerise/ds-empty-states": "^2.0.8",
|
|
49
|
+
"@synerise/ds-flag": "^2.0.3",
|
|
50
|
+
"@synerise/ds-form-field": "^2.0.10",
|
|
51
|
+
"@synerise/ds-icon": "^2.2.3",
|
|
52
|
+
"@synerise/ds-information-card": "^2.0.13",
|
|
53
|
+
"@synerise/ds-inline-alert": "^2.0.8",
|
|
54
|
+
"@synerise/ds-list-item": "^2.2.3",
|
|
55
|
+
"@synerise/ds-loader": "^2.0.3",
|
|
56
|
+
"@synerise/ds-popconfirm": "^2.0.10",
|
|
57
|
+
"@synerise/ds-result": "^2.0.10",
|
|
58
|
+
"@synerise/ds-scrollbar": "^2.0.9",
|
|
59
|
+
"@synerise/ds-search": "^2.0.10",
|
|
60
|
+
"@synerise/ds-search-bar": "^2.0.11",
|
|
61
|
+
"@synerise/ds-short-cuts": "^2.0.10",
|
|
62
|
+
"@synerise/ds-skeleton": "^2.0.10",
|
|
63
|
+
"@synerise/ds-tooltip": "^2.0.10",
|
|
64
|
+
"@synerise/ds-typography": "^2.0.10",
|
|
65
|
+
"@synerise/ds-utils": "^2.2.2",
|
|
66
66
|
"lodash.debounce": "^4.0.8",
|
|
67
|
-
"react-window": "^1.8.11"
|
|
68
|
-
"uuid": "^8.3.2"
|
|
67
|
+
"react-window": "^1.8.11"
|
|
69
68
|
},
|
|
70
69
|
"devDependencies": {
|
|
71
|
-
"@types/lodash.debounce": "^4.0.9"
|
|
70
|
+
"@types/lodash.debounce": "^4.0.9",
|
|
71
|
+
"vitest": "4"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@synerise/ds-core": "*",
|
|
75
75
|
"react": ">=16.9.0 <= 18.3.1",
|
|
76
76
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
77
|
-
"styled-components": "^5.3.3"
|
|
78
|
-
"vitest": "4"
|
|
77
|
+
"styled-components": "^5.3.3"
|
|
79
78
|
},
|
|
80
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "5ac0f7dcb7c3995b402c86c087d8f32770f80a1d"
|
|
81
80
|
}
|