@synerise/ds-item-picker 1.8.0 → 1.8.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 CHANGED
@@ -3,6 +3,28 @@
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.8.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-item-picker@1.8.1...@synerise/ds-item-picker@1.8.2) (2025-07-15)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **item-picker:** allow click on infocard ([f2c035b](https://github.com/Synerise/synerise-design/commit/f2c035b52872e1908a4e0695345e170b3256f29f))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.8.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-item-picker@1.8.0...@synerise/ds-item-picker@1.8.1) (2025-07-14)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **item-picker:** back action overflow with ellipsis ([c35f1c2](https://github.com/Synerise/synerise-design/commit/c35f1c2340e4fd905e9df0e723856d192c8f4d6c))
23
+
24
+
25
+
26
+
27
+
6
28
  # [1.8.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-item-picker@1.7.1...@synerise/ds-item-picker@1.8.0) (2025-07-11)
7
29
 
8
30
 
@@ -8,6 +8,7 @@ import { useTheme } from '@synerise/ds-core';
8
8
  import Dropdown from '@synerise/ds-dropdown';
9
9
  import Icon, { ArrowLeftM } from '@synerise/ds-icon';
10
10
  import { itemSizes } from '@synerise/ds-list-item';
11
+ import { Text } from '@synerise/ds-typography';
11
12
  import { focusWithArrowKeys, useCombinedRefs, useKeyboardShortcuts, useScrollContain } from '@synerise/ds-utils';
12
13
  import { useDefaultTexts } from '../../hooks/useDefaultTexts';
13
14
  import * as S from './ItemPickerList.styles';
@@ -191,7 +192,12 @@ export var ItemPickerList = function ItemPickerList(_ref) {
191
192
  var searchByActionLabel = (searchByAction == null ? void 0 : searchByAction.sectionTitle) || (searchByAction == null ? void 0 : searchByAction.text);
192
193
  var searchInActionLabel = searchInAction == null ? void 0 : searchInAction.text;
193
194
  var searchInItemLabel = searchInItem && "" + (searchInAction == null ? void 0 : searchInAction.renderSearchInValueText(searchInItem));
194
- return [].concat(itemsPath, [searchInActionLabel, searchInItemLabel, searchByActionLabel]).filter(Boolean).join(' - ');
195
+ var labelParts = [].concat(itemsPath, [searchInActionLabel, searchInItemLabel, searchByActionLabel]).filter(Boolean).join(' - ');
196
+ return /*#__PURE__*/React.createElement(Text, {
197
+ ellipsis: {
198
+ tooltip: labelParts
199
+ }
200
+ }, labelParts);
195
201
  };
196
202
  return /*#__PURE__*/React.createElement(React.Fragment, null, isSection && /*#__PURE__*/React.createElement(Dropdown.BackAction, {
197
203
  tooltipProps: {
@@ -1,6 +1,7 @@
1
1
  import { VariableSizeList } from 'react-window';
2
2
  import styled, { css } from 'styled-components';
3
3
  import Dropdown from '@synerise/ds-dropdown';
4
+ import { Label as DropdownBackActionLabel } from '@synerise/ds-dropdown/dist/elements/BackAction/BackAction.styles';
4
5
  import DSEmptyStates from '@synerise/ds-empty-states';
5
6
  import DSLoader from '@synerise/ds-loader';
6
7
  import Scrollbar from '@synerise/ds-scrollbar';
@@ -10,13 +11,13 @@ import { LIST_INNER_PADDING } from './constants';
10
11
  export var ListWrapper = styled.div.withConfig({
11
12
  displayName: "ItemPickerListstyles__ListWrapper",
12
13
  componentId: "sc-1r33ill-0"
13
- })(["position:relative;flex:1 0 calc(100% - ", "px);", " ", ""], function (props) {
14
+ })(["position:relative;flex:1 0 calc(100% - ", "px);", " ", " ", "{min-width:0;}"], function (props) {
14
15
  return props.offsetSpace;
15
16
  }, function (props) {
16
17
  return props.wrapperHeight !== undefined && "height: " + (props.wrapperHeight + LIST_INNER_PADDING) + "px;";
17
18
  }, function (props) {
18
19
  return props.centered && css(["display:flex;flex-direction:column;"]);
19
- });
20
+ }, DropdownBackActionLabel);
20
21
  export var ListContainer = styled(Dropdown.Wrapper).withConfig({
21
22
  displayName: "ItemPickerListstyles__ListContainer",
22
23
  componentId: "sc-1r33ill-1"
@@ -1,10 +1,9 @@
1
1
  var _excluded = ["onFocus", "onBlur", "onClear", "selectedItem", "onChange", "dropdownProps", "texts", "triggerProps", "renderTrigger", "placeholder", "placeholderIcon", "label", "description", "error", "errorMessage", "errorText", "disabled", "tooltip", "tooltipConfig"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
- import React, { useEffect, useMemo, useRef, useState } from 'react';
4
+ import React, { useEffect, useMemo, useState } from 'react';
5
5
  import Dropdown from '@synerise/ds-dropdown';
6
6
  import FormField from '@synerise/ds-form-field';
7
- import { useOnClickOutside } from '@synerise/ds-utils';
8
7
  import * as S from '../../ItemPicker.styles';
9
8
  import { useDefaultTexts } from '../../hooks/useDefaultTexts';
10
9
  import { ItemPickerList } from '../ItemPickerList/ItemPickerList';
@@ -30,10 +29,6 @@ export var ItemPickerNew = function ItemPickerNew(_ref) {
30
29
  tooltip = _ref.tooltip,
31
30
  tooltipConfig = _ref.tooltipConfig,
32
31
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
33
- var overlayRef = useRef(null);
34
- useOnClickOutside(overlayRef, function () {
35
- closeDropdown();
36
- });
37
32
  var _useState = useState(selectedItem),
38
33
  selected = _useState[0],
39
34
  setSelected = _useState[1];
@@ -106,8 +101,7 @@ export var ItemPickerNew = function ItemPickerNew(_ref) {
106
101
  texts: allTexts,
107
102
  isVisible: visible,
108
103
  selectedItem: selected,
109
- onItemSelect: handleItemSelect,
110
- containerRef: overlayRef
104
+ onItemSelect: handleItemSelect
111
105
  }))
112
106
  }), trigger)));
113
107
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-item-picker",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "ItemPicker UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,25 +34,25 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-alert": "^1.1.8",
38
- "@synerise/ds-avatar": "^1.0.14",
39
- "@synerise/ds-button": "^1.4.3",
40
- "@synerise/ds-dropdown": "^1.0.16",
41
- "@synerise/ds-empty-states": "^1.0.12",
37
+ "@synerise/ds-alert": "^1.1.9",
38
+ "@synerise/ds-avatar": "^1.0.15",
39
+ "@synerise/ds-button": "^1.4.4",
40
+ "@synerise/ds-dropdown": "^1.0.17",
41
+ "@synerise/ds-empty-states": "^1.0.13",
42
42
  "@synerise/ds-flag": "^1.0.2",
43
- "@synerise/ds-form-field": "^1.1.9",
44
- "@synerise/ds-icon": "^1.5.4",
45
- "@synerise/ds-information-card": "^1.0.20",
46
- "@synerise/ds-list-item": "^1.0.14",
43
+ "@synerise/ds-form-field": "^1.1.10",
44
+ "@synerise/ds-icon": "^1.6.0",
45
+ "@synerise/ds-information-card": "^1.0.21",
46
+ "@synerise/ds-list-item": "^1.0.15",
47
47
  "@synerise/ds-loader": "^1.0.6",
48
- "@synerise/ds-popconfirm": "^1.0.15",
49
- "@synerise/ds-result": "^1.0.15",
50
- "@synerise/ds-scrollbar": "^1.1.2",
51
- "@synerise/ds-search": "^1.2.3",
52
- "@synerise/ds-search-bar": "^1.3.5",
53
- "@synerise/ds-short-cuts": "^1.0.14",
54
- "@synerise/ds-skeleton": "^1.0.15",
55
- "@synerise/ds-tooltip": "^1.1.12",
48
+ "@synerise/ds-popconfirm": "^1.0.16",
49
+ "@synerise/ds-result": "^1.0.16",
50
+ "@synerise/ds-scrollbar": "^1.1.3",
51
+ "@synerise/ds-search": "^1.2.4",
52
+ "@synerise/ds-search-bar": "^1.3.6",
53
+ "@synerise/ds-short-cuts": "^1.0.15",
54
+ "@synerise/ds-skeleton": "^1.0.16",
55
+ "@synerise/ds-tooltip": "^1.1.13",
56
56
  "@synerise/ds-utils": "^1.3.1",
57
57
  "lodash": "^4.17.21",
58
58
  "react-window": "^1.8.5",
@@ -64,5 +64,5 @@
64
64
  "react-intl": ">=3.12.0 <= 6.8",
65
65
  "styled-components": "^5.3.3"
66
66
  },
67
- "gitHead": "c059915199be3bfd7659518239783b17006dba8a"
67
+ "gitHead": "f7c362a4f370d86b51df9aba9e91ac8f7fe4ed8f"
68
68
  }