@synerise/ds-items-roll 1.0.19 → 1.0.21

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,25 @@
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.0.21](https://github.com/Synerise/synerise-design/compare/@synerise/ds-items-roll@1.0.20...@synerise/ds-items-roll@1.0.21) (2025-07-17)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **items-roll:** change icons and add new stories ([c813c6f](https://github.com/Synerise/synerise-design/commit/c813c6f10d2a5b107a534f7abfd54765a6e5e7a7))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.0.20](https://github.com/Synerise/synerise-design/compare/@synerise/ds-items-roll@1.0.19...@synerise/ds-items-roll@1.0.20) (2025-07-15)
18
+
19
+ **Note:** Version bump only for package @synerise/ds-items-roll
20
+
21
+
22
+
23
+
24
+
6
25
  ## [1.0.19](https://github.com/Synerise/synerise-design/compare/@synerise/ds-items-roll@1.0.18...@synerise/ds-items-roll@1.0.19) (2025-07-11)
7
26
 
8
27
  **Note:** Version bump only for package @synerise/ds-items-roll
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { type ItemsRollProps } from './ItemsRoll.types';
3
- export declare const ItemsRoll: ({ actions, changeSelectionIcon, changeSelectionDropdownProps, className, customSidebarActions, groups, hideSearch, isDisabled, items, maxToShowItems, onClearAll, onChangeSelection, onItemClick, onItemRemove, onSearchClear, onSearch, renderCount, searchValue, searchPlaceholder, showMoreStep, style, texts, useFooter, useVirtualizedList, virtualizedRowWidth, virtualizedRowHeight, }: ItemsRollProps) => React.JSX.Element;
3
+ export declare const ItemsRoll: ({ actions, changeSelectionIcon, changeSelectionDropdownProps, className, customSidebarActions, groups, hideSearch, isDisabled, items, maxToShowItems, onClearAll, onChangeSelection, onItemClick, onItemRemove, onSearchClear, onSearch, renderCount, searchValue, searchPlaceholder, showMoreStep, style, texts, useFooter, }: ItemsRollProps) => React.JSX.Element;
4
4
  export default ItemsRoll;
package/dist/ItemsRoll.js CHANGED
@@ -28,10 +28,7 @@ export var ItemsRoll = function ItemsRoll(_ref) {
28
28
  showMoreStep = _ref$showMoreStep === void 0 ? 10 : _ref$showMoreStep,
29
29
  style = _ref.style,
30
30
  texts = _ref.texts,
31
- useFooter = _ref.useFooter,
32
- useVirtualizedList = _ref.useVirtualizedList,
33
- virtualizedRowWidth = _ref.virtualizedRowWidth,
34
- virtualizedRowHeight = _ref.virtualizedRowHeight;
31
+ useFooter = _ref.useFooter;
35
32
  var intl = useIntl();
36
33
  var defaultTexts = {
37
34
  changeSelectionLabel: intl.formatMessage({
@@ -121,10 +118,7 @@ export var ItemsRoll = function ItemsRoll(_ref) {
121
118
  noResultsLabel: allTexts.noResultsLabel,
122
119
  removeTooltipLabel: allTexts.removeTooltipLabel,
123
120
  searchValue: searchValue,
124
- useVirtualizedList: useVirtualizedList,
125
- visibleItems: visibleItems,
126
- virtualizedRowHeight: virtualizedRowHeight,
127
- virtualizedRowWidth: virtualizedRowWidth
121
+ visibleItems: visibleItems
128
122
  }), useFooter && /*#__PURE__*/React.createElement(Footer, {
129
123
  searchMode: Boolean(searchValue),
130
124
  allTexts: allTexts,
@@ -103,11 +103,8 @@ export var NoResults = styled.div.withConfig({
103
103
  export var NoResultIconWrapper = styled.div.withConfig({
104
104
  displayName: "ItemsRollstyles__NoResultIconWrapper",
105
105
  componentId: "sc-579u47-14"
106
- })(["width:40px;height:40px;border-radius:50%;background:", ";margin-bottom:16px;display:flex;align-items:center;justify-content:center;.ds-icon{svg{fill:", ";}}"], function (_ref15) {
106
+ })(["width:40px;height:40px;border-radius:50%;margin-bottom:16px;display:flex;align-items:center;justify-content:center;.ds-icon{svg{fill:", ";}}"], function (_ref15) {
107
107
  var theme = _ref15.theme;
108
- return theme.palette['grey-200'];
109
- }, function (_ref16) {
110
- var theme = _ref16.theme;
111
108
  return theme.palette['grey-600'];
112
109
  });
113
110
  export var Divider = styled(DividerBase).withConfig({
@@ -119,7 +116,7 @@ export var Divider = styled(DividerBase).withConfig({
119
116
  export var WarningIcon = styled(Icon).withConfig({
120
117
  displayName: "ItemsRollstyles__WarningIcon",
121
118
  componentId: "sc-579u47-16"
122
- })(["svg{fill:", ";}"], function (_ref17) {
123
- var theme = _ref17.theme;
119
+ })(["svg{fill:", ";}"], function (_ref16) {
120
+ var theme = _ref16.theme;
124
121
  return theme.palette['yellow-500'];
125
122
  });
@@ -36,7 +36,10 @@ export type ItemsRollProps = {
36
36
  [k in Texts]?: ReactNode;
37
37
  };
38
38
  useFooter?: boolean;
39
+ /** @deprecated */
39
40
  useVirtualizedList?: boolean;
41
+ /** @deprecated */
40
42
  virtualizedRowHeight?: number;
43
+ /** @deprecated */
41
44
  virtualizedRowWidth?: number;
42
45
  };
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import { type ItemRollElement } from '../ItemsRoll.types';
3
3
  import { type ListProps } from './List.types';
4
4
  export declare const itemsInGroup: (group: string, items: ItemRollElement[]) => ItemRollElement[];
5
- declare const List: ({ groups, items, onItemClick, onItemRemove, noResultsLabel, removeTooltipLabel, searchValue, useVirtualizedList, visibleItems, virtualizedRowHeight, virtualizedRowWidth, }: ListProps) => React.JSX.Element;
5
+ declare const List: ({ groups, onItemClick, onItemRemove, noResultsLabel, removeTooltipLabel, searchValue, visibleItems, }: ListProps) => React.JSX.Element;
6
6
  export default List;
@@ -1,10 +1,8 @@
1
1
  import React, { useMemo } from 'react';
2
- import { FixedSizeList } from 'react-window';
3
- import Icon, { SearchNoResultsM } from '@synerise/ds-icon';
2
+ import Icon, { InformationNoSearchResultL } from '@synerise/ds-icon';
4
3
  import { GroupItem } from '@synerise/ds-list-item';
5
4
  import * as S from '../ItemsRoll.styles';
6
5
  import ItemElement from './ListItem';
7
- import ItemRenderer from './VirtualizedListItem';
8
6
  export var itemsInGroup = function itemsInGroup(group, items) {
9
7
  return items.filter(function (item) {
10
8
  return item.group === group;
@@ -12,17 +10,12 @@ export var itemsInGroup = function itemsInGroup(group, items) {
12
10
  };
13
11
  var List = function List(_ref) {
14
12
  var groups = _ref.groups,
15
- items = _ref.items,
16
13
  onItemClick = _ref.onItemClick,
17
14
  onItemRemove = _ref.onItemRemove,
18
15
  noResultsLabel = _ref.noResultsLabel,
19
16
  removeTooltipLabel = _ref.removeTooltipLabel,
20
17
  searchValue = _ref.searchValue,
21
- useVirtualizedList = _ref.useVirtualizedList,
22
- visibleItems = _ref.visibleItems,
23
- _ref$virtualizedRowHe = _ref.virtualizedRowHeight,
24
- virtualizedRowHeight = _ref$virtualizedRowHe === void 0 ? 32 : _ref$virtualizedRowHe,
25
- virtualizedRowWidth = _ref.virtualizedRowWidth;
18
+ visibleItems = _ref.visibleItems;
26
19
  var groupedList = useMemo(function () {
27
20
  return /*#__PURE__*/React.createElement(React.Fragment, null, groups == null ? void 0 : groups.map(function (group) {
28
21
  var groupItems = itemsInGroup(group, visibleItems);
@@ -56,21 +49,8 @@ var List = function List(_ref) {
56
49
  }, [onItemClick, onItemRemove, removeTooltipLabel, searchValue, visibleItems]);
57
50
  var finalItems = groups ? groupedList : standardList;
58
51
  return visibleItems.length === 0 ? /*#__PURE__*/React.createElement(S.NoResults, null, /*#__PURE__*/React.createElement(S.NoResultIconWrapper, null, /*#__PURE__*/React.createElement(Icon, {
59
- component: /*#__PURE__*/React.createElement(SearchNoResultsM, null),
60
- size: 25
61
- })), noResultsLabel) : /*#__PURE__*/React.createElement(S.ListWrapper, null, useVirtualizedList && !groups ? /*#__PURE__*/React.createElement("div", {
62
- "data-testid": "items-roll-virtualized-list"
63
- }, /*#__PURE__*/React.createElement(FixedSizeList, {
64
- height: visibleItems.length * virtualizedRowHeight,
65
- itemData: items,
66
- itemCount: visibleItems.length,
67
- itemSize: virtualizedRowHeight,
68
- width: virtualizedRowWidth || '100%'
69
- }, ItemRenderer({
70
- highlight: searchValue,
71
- onItemClick: onItemClick,
72
- onItemRemove: onItemRemove,
73
- tooltipLabel: removeTooltipLabel
74
- }))) : finalItems);
52
+ component: /*#__PURE__*/React.createElement(InformationNoSearchResultL, null),
53
+ size: 48
54
+ })), noResultsLabel) : /*#__PURE__*/React.createElement(S.ListWrapper, null, finalItems);
75
55
  };
76
56
  export default List;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-items-roll",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "ItemsRoll UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,22 +34,21 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-button": "^1.4.3",
38
- "@synerise/ds-divider": "^1.0.14",
39
- "@synerise/ds-dropdown": "^1.0.16",
40
- "@synerise/ds-icon": "^1.5.4",
41
- "@synerise/ds-list-item": "^1.0.14",
42
- "@synerise/ds-menu": "^1.0.15",
43
- "@synerise/ds-popconfirm": "^1.0.15",
44
- "@synerise/ds-search": "^1.2.3",
45
- "@synerise/ds-tooltip": "^1.1.12",
46
- "@synerise/ds-utils": "^1.3.1",
47
- "react-window": "^1.8.5"
37
+ "@synerise/ds-button": "^1.4.5",
38
+ "@synerise/ds-divider": "^1.0.16",
39
+ "@synerise/ds-dropdown": "^1.0.18",
40
+ "@synerise/ds-icon": "^1.6.1",
41
+ "@synerise/ds-list-item": "^1.0.16",
42
+ "@synerise/ds-menu": "^1.0.17",
43
+ "@synerise/ds-popconfirm": "^1.0.17",
44
+ "@synerise/ds-search": "^1.2.5",
45
+ "@synerise/ds-tooltip": "^1.1.14",
46
+ "@synerise/ds-utils": "^1.3.1"
48
47
  },
49
48
  "peerDependencies": {
50
49
  "@synerise/ds-core": "*",
51
50
  "react": ">=16.9.0 <= 18.3.1",
52
51
  "styled-components": "^5.3.3"
53
52
  },
54
- "gitHead": "c059915199be3bfd7659518239783b17006dba8a"
53
+ "gitHead": "4e851d649cb25346f2f8e0575dde91cc50f43bc4"
55
54
  }
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { type ListChildComponentProps } from 'react-window';
3
- import { type ItemRendererProps } from './VirtualizedListItem.types';
4
- declare const ItemRenderer: ({ highlight, onItemClick, onItemRemove, tooltipLabel, group, }: ItemRendererProps) => ({ index, style, data }: ListChildComponentProps) => React.JSX.Element;
5
- export default ItemRenderer;
@@ -1,38 +0,0 @@
1
- var _excluded = ["suffixel"];
2
- 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; }
3
- import React, { useCallback } from 'react';
4
- import { RemoveIcon } from './ItemRemoveIcon';
5
- import * as S from './ListItem.styles';
6
- var ItemRenderer = function ItemRenderer(_ref) {
7
- var highlight = _ref.highlight,
8
- onItemClick = _ref.onItemClick,
9
- onItemRemove = _ref.onItemRemove,
10
- tooltipLabel = _ref.tooltipLabel,
11
- group = _ref.group;
12
- return function (_ref2) {
13
- var index = _ref2.index,
14
- style = _ref2.style,
15
- data = _ref2.data;
16
- var _ref3 = data[index],
17
- suffixel = _ref3.suffixel,
18
- item = _objectWithoutPropertiesLoose(_ref3, _excluded);
19
-
20
- // eslint-disable-next-line react-hooks/rules-of-hooks
21
- var onClick = useCallback(function () {
22
- return onItemClick && onItemClick(item.id, group);
23
- }, [item.id]);
24
- return /*#__PURE__*/React.createElement(S.ListItem, {
25
- className: "items-roll-list-item",
26
- highlight: highlight,
27
- onClick: onClick,
28
- style: style,
29
- suffixel: /*#__PURE__*/React.createElement(S.SuffixelWrapper, null, /*#__PURE__*/React.createElement(React.Fragment, null, suffixel, !!onItemRemove && /*#__PURE__*/React.createElement(RemoveIcon, {
30
- id: item.id,
31
- handleRemove: onItemRemove,
32
- tooltipLabel: tooltipLabel,
33
- group: group
34
- })))
35
- }, item.text);
36
- };
37
- };
38
- export default ItemRenderer;
@@ -1,9 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { ItemsRollGroup } from '../ItemsRoll.types';
3
- export type ItemRendererProps = {
4
- highlight?: string;
5
- group?: ItemsRollGroup;
6
- onItemClick?: (id: string, group?: ItemsRollGroup) => void;
7
- onItemRemove?: (id: string, group?: ItemsRollGroup) => void;
8
- tooltipLabel: ReactNode;
9
- };
@@ -1 +0,0 @@
1
- export {};