@synerise/ds-items-roll 1.5.14 → 1.5.16

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,16 @@
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.5.16](https://github.com/Synerise/synerise-design/compare/@synerise/ds-items-roll@1.5.15...@synerise/ds-items-roll@1.5.16) (2026-04-20)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **items-roll:** skip rendering divider if footer is empty ([f828790](https://github.com/Synerise/synerise-design/commit/f828790e8d79a5a1675fb1c0dc71fe049f66cef3))
11
+
12
+ ## [1.5.15](https://github.com/Synerise/synerise-design/compare/@synerise/ds-items-roll@1.5.14...@synerise/ds-items-roll@1.5.15) (2026-04-14)
13
+
14
+ **Note:** Version bump only for package @synerise/ds-items-roll
15
+
6
16
  ## [1.5.14](https://github.com/Synerise/synerise-design/compare/@synerise/ds-items-roll@1.5.13...@synerise/ds-items-roll@1.5.14) (2026-04-10)
7
17
 
8
18
  **Note:** Version bump only for package @synerise/ds-items-roll
package/README.md CHANGED
@@ -46,7 +46,7 @@ import ItemsRoll from '@synerise/ds-items-roll';
46
46
  | hideSearch | Hide search component in itemsroll | boolean | - |
47
47
  | isDisabled | prevents rendering 'remove' / 'clear all' buttons | boolean | - |
48
48
  | items | ItemRollElement array for list | ItemRollElement[] | - |
49
- | maxToShowItems | Amount of initial ItemsRollElement to render. Note that if number is greater than 20, list will becoma scrollable | number | 10 |
49
+ | maxToShowItems | Amount of initial ItemsRollElement to render. Note that if number is greater than 20, list will become scrollable | number | 10 |
50
50
  | onClearAll | Callback function that is fired when click on clearAll button | () => void | - |
51
51
  | onChangeSelection | Callback function that is fired when click on changeSelection button | () => void | - |
52
52
  | onItemClick | Callback function that is fired when list element is clicked | (id: string, group?: string) => void | - |
@@ -60,6 +60,7 @@ import ItemsRoll from '@synerise/ds-items-roll';
60
60
  | renderCount | Custom items count renderer | (count: number) => ReactNode | - |
61
61
  | texts | Object contains texts for buttons, title etc. | Texts | - |
62
62
  | useFooter | Whether the footer is visibile | boolean | - |
63
+ | intl | **@deprecated** Component uses `useIntl()` internally; prop is accepted but ignored | IntlShape | - |
63
64
  | useVirtualizedList | **@deprecated** Virtualized list was removed; prop is accepted but ignored | boolean | - |
64
65
  | virtualizedRowHeight | **@deprecated** Ignored | number | - |
65
66
  | virtualizedRowWidth | **@deprecated** Ignored | number | - |
package/dist/ItemsRoll.js CHANGED
@@ -97,7 +97,7 @@ const ItemsRoll = ({
97
97
  return /* @__PURE__ */ jsxs(Panel, { style: style || {}, className: className || "", "data-testid": "ds-items-roll", radius: 3, p: 12, children: [
98
98
  /* @__PURE__ */ jsx(Header, { actions, allTexts, changeSelectionIcon, changeSelectionDropdownProps, customSidebarActions, hideSearch, itemsCount, onChangeSelection, onSearch, onSearchClear, searchValue, searchPlaceholder }),
99
99
  /* @__PURE__ */ jsx(Divider, { dashed: true }),
100
- /* @__PURE__ */ jsx(List, { groups, items, onItemClick, onItemRemove: !isDisabled ? onItemRemove : void 0, noResultsLabel: allTexts.noResultsLabel, removeTooltipLabel: allTexts.removeTooltipLabel, searchValue, visibleItems }),
100
+ /* @__PURE__ */ jsx(List, { groups, onItemClick, onItemRemove: !isDisabled ? onItemRemove : void 0, noResultsLabel: allTexts.noResultsLabel, removeTooltipLabel: allTexts.removeTooltipLabel, searchValue, visibleItems }),
101
101
  useFooter && /* @__PURE__ */ jsx(Footer, { searchMode: Boolean(searchValue), allTexts, itemsCount: items.length, maxToShowItems, onClearAll: !isDisabled ? onClearAll : void 0, showAdditionalItems, showDefaultItemsAmount, showMoreStep, visibleItemsCount: visibleItems.length })
102
102
  ] });
103
103
  };
@@ -6,7 +6,7 @@ import { ShowButtonsWrapper, Divider, ContainerSpaceBetween, ClearButton, Warnin
6
6
  const ShowLessButton = ({
7
7
  showDefaultItemsAmount,
8
8
  showLessLabel
9
- }) => /* @__PURE__ */ jsxs(ShowButton, { type: "ghost", mode: "icon-label", onClick: showDefaultItemsAmount, children: [
9
+ }) => /* @__PURE__ */ jsxs(ShowButton, { type: "ghost", mode: "icon-label", onClick: showDefaultItemsAmount, "data-testid": "ds-items-roll-show-less", children: [
10
10
  /* @__PURE__ */ jsx(ArrowIcon, { component: /* @__PURE__ */ jsx(ArrowUpCircleM, {}), size: 20 }),
11
11
  /* @__PURE__ */ jsx("span", { className: "bold-label", children: showLessLabel })
12
12
  ] });
@@ -15,7 +15,7 @@ const ShowMoreButton = ({
15
15
  moreLabel,
16
16
  showAdditionalItems,
17
17
  getShowMoreNumber
18
- }) => /* @__PURE__ */ jsxs(ShowButton, { type: "ghost", mode: "icon-label", onClick: showAdditionalItems, children: [
18
+ }) => /* @__PURE__ */ jsxs(ShowButton, { type: "ghost", mode: "icon-label", onClick: showAdditionalItems, "data-testid": "ds-items-roll-show-more", children: [
19
19
  /* @__PURE__ */ jsx(ArrowIcon, { component: /* @__PURE__ */ jsx(ArrowDownCircleM, {}), size: 20 }),
20
20
  /* @__PURE__ */ jsxs(ShowButtonLabel, { children: [
21
21
  showLabel,
@@ -37,9 +37,11 @@ const Footer = ({
37
37
  searchMode
38
38
  }) => {
39
39
  const getShowMoreNumber = useMemo(() => visibleItemsCount + showMoreStep < itemsCount ? showMoreStep : itemsCount - visibleItemsCount, [itemsCount, showMoreStep, visibleItemsCount]);
40
+ const showButtons = useMemo(() => itemsCount > maxToShowItems, [itemsCount, maxToShowItems]);
41
+ const showClearButton = useMemo(() => onClearAll && !searchMode, [onClearAll, searchMode]);
40
42
  const showDivider = useMemo(() => {
41
- return !searchMode || searchMode && itemsCount > maxToShowItems;
42
- }, [searchMode, maxToShowItems, itemsCount]);
43
+ return showButtons || showClearButton;
44
+ }, [showButtons, showClearButton]);
43
45
  const buttonsConfiguration = useMemo(() => {
44
46
  if (visibleItemsCount === itemsCount) {
45
47
  return /* @__PURE__ */ jsx(ShowLessButton, { showLessLabel: allTexts.showLessLabel, showDefaultItemsAmount });
@@ -54,9 +56,9 @@ const Footer = ({
54
56
  }, [itemsCount, maxToShowItems, visibleItemsCount, getShowMoreNumber, showDefaultItemsAmount, showAdditionalItems, allTexts]);
55
57
  return visibleItemsCount !== 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
56
58
  showDivider && /* @__PURE__ */ jsx(Divider, { dashed: true, footer: true }),
57
- /* @__PURE__ */ jsxs(ContainerSpaceBetween, { "data-testid": "items-roll-footer", children: [
58
- itemsCount > maxToShowItems && buttonsConfiguration,
59
- onClearAll && !searchMode && /* @__PURE__ */ jsx(Popconfirm, { onConfirm: onClearAll, icon: /* @__PURE__ */ jsx(WarningIcon, { component: /* @__PURE__ */ jsx(WarningFillM, {}) }), cancelText: allTexts.popconfirmNoLabel, okText: allTexts.popconfirmYesLabel, title: allTexts.popconfirmTitleLabel, children: /* @__PURE__ */ jsxs(ClearButton, { type: "custom-color-ghost", color: "red", mode: "icon-label", children: [
59
+ (showButtons || showClearButton) && /* @__PURE__ */ jsxs(ContainerSpaceBetween, { "data-testid": "items-roll-footer", children: [
60
+ showButtons && buttonsConfiguration,
61
+ showClearButton && /* @__PURE__ */ jsx(Popconfirm, { onConfirm: onClearAll, icon: /* @__PURE__ */ jsx(WarningIcon, { component: /* @__PURE__ */ jsx(WarningFillM, {}) }), cancelText: allTexts.popconfirmNoLabel, okText: allTexts.popconfirmYesLabel, title: allTexts.popconfirmTitleLabel, children: /* @__PURE__ */ jsxs(ClearButton, { type: "custom-color-ghost", color: "red", mode: "icon-label", children: [
60
62
  /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CloseS, {}), size: 22 }),
61
63
  allTexts.clearAllLabel
62
64
  ] }) })
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
3
  import Dropdown from "@synerise/ds-dropdown";
4
4
  import Icon, { EditM } from "@synerise/ds-icon";
5
- import { SearchInput } from "@synerise/ds-search/dist/Elements";
5
+ import { SearchInput } from "@synerise/ds-search";
6
6
  import { NOOP } from "@synerise/ds-utils";
7
7
  import Extras from "../Extras/Extras.js";
8
8
  import { ChangeSelection, ContainerSpaceBetween, HeaderLeft, HeaderRight, SearchWrapper } from "../ItemsRoll.styles.js";
@@ -1,6 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { theme } from "@synerise/ds-core";
3
3
  import Icon, { CloseS } from "@synerise/ds-icon";
4
+ import { FloatingDelayGroup } from "@synerise/ds-popover";
4
5
  import Tooltip from "@synerise/ds-tooltip";
5
6
  import { RemoveIconWrapper } from "./ItemRemoveIcon.styles.js";
6
7
  const RemoveIcon = ({
@@ -8,10 +9,13 @@ const RemoveIcon = ({
8
9
  handleRemove,
9
10
  tooltipLabel,
10
11
  group
11
- }) => /* @__PURE__ */ jsx(Tooltip, { title: tooltipLabel, children: /* @__PURE__ */ jsx(RemoveIconWrapper, { "data-testid": "items-roll-remove-icon", children: /* @__PURE__ */ jsx(Icon, { className: "element-remove-icon", onClick: (event) => {
12
+ }) => /* @__PURE__ */ jsx(FloatingDelayGroup, { delay: {
13
+ open: 0,
14
+ close: 100
15
+ }, children: /* @__PURE__ */ jsx(Tooltip, { title: tooltipLabel, children: /* @__PURE__ */ jsx(RemoveIconWrapper, { "data-testid": "items-roll-remove-icon", children: /* @__PURE__ */ jsx(Icon, { className: "element-remove-icon", onClick: (event) => {
12
16
  event.stopPropagation();
13
17
  handleRemove(id, group);
14
- }, component: /* @__PURE__ */ jsx(CloseS, {}), color: theme.palette["red-600"], size: 24 }) }) });
18
+ }, component: /* @__PURE__ */ jsx(CloseS, {}), color: theme.palette["red-600"], size: 24 }) }) }) });
15
19
  export {
16
20
  RemoveIcon
17
21
  };
@@ -1,6 +1,4 @@
1
1
  import { default as React } from 'react';
2
- import { ItemRollElement } from '../ItemsRoll.types';
3
2
  import { ListProps } from './List.types';
4
- export declare const itemsInGroup: (group: string, items: ItemRollElement[]) => ItemRollElement[];
5
3
  declare const List: ({ groups, onItemClick, onItemRemove, noResultsLabel, removeTooltipLabel, searchValue, visibleItems, }: ListProps) => React.JSX.Element;
6
4
  export default List;
@@ -30,6 +30,5 @@ const List = ({
30
30
  ] }) : /* @__PURE__ */ jsx(ListContextProvider, { children: /* @__PURE__ */ jsx(ListWrapper, { children: finalItems }) });
31
31
  };
32
32
  export {
33
- List as default,
34
- itemsInGroup
33
+ List as default
35
34
  };
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ItemRollElement, ItemsRollProps } from '../ItemsRoll.types';
3
- export type ListProps = Pick<ItemsRollProps, 'groups' | 'items' | 'onItemClick' | 'onItemRemove' | 'searchValue' | 'useVirtualizedList' | 'virtualizedRowHeight' | 'virtualizedRowWidth'> & {
3
+ export type ListProps = Pick<ItemsRollProps, 'groups' | 'onItemClick' | 'onItemRemove' | 'searchValue'> & {
4
4
  noResultsLabel: ReactNode;
5
5
  removeTooltipLabel: ReactNode;
6
6
  visibleItems: ItemRollElement[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-items-roll",
3
- "version": "1.5.14",
3
+ "version": "1.5.16",
4
4
  "description": "ItemsRoll UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,18 +34,20 @@
34
34
  "dependencies": {
35
35
  "@synerise/ds-button": "^1.5.20",
36
36
  "@synerise/ds-divider": "^1.3.4",
37
- "@synerise/ds-dropdown": "^1.3.4",
37
+ "@synerise/ds-dropdown": "^1.3.5",
38
38
  "@synerise/ds-icon": "^1.15.3",
39
- "@synerise/ds-list-item": "^1.4.12",
39
+ "@synerise/ds-list-item": "^1.4.13",
40
40
  "@synerise/ds-menu": "^1.4.15",
41
41
  "@synerise/ds-panel": "^1.2.5",
42
42
  "@synerise/ds-popconfirm": "^1.3.12",
43
- "@synerise/ds-search": "^1.5.12",
43
+ "@synerise/ds-popover": "^1.5.4",
44
+ "@synerise/ds-search": "^1.5.13",
44
45
  "@synerise/ds-tooltip": "^1.4.12",
45
46
  "@synerise/ds-utils": "^1.8.0",
46
47
  "react-intl": "^6.8.7"
47
48
  },
48
49
  "devDependencies": {
50
+ "@testing-library/react": "^14",
49
51
  "@testing-library/user-event": "^14"
50
52
  },
51
53
  "peerDependencies": {
@@ -54,5 +56,5 @@
54
56
  "styled-components": "^5.3.3",
55
57
  "vitest": "4"
56
58
  },
57
- "gitHead": "ce3c6d75efe8573a2b274853636f959b75a6cd32"
59
+ "gitHead": "4766ad0a45eea48ac75745bc9e7525f5dccc71e0"
58
60
  }