@synerise/ds-list-item 2.0.2 → 2.1.1

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,20 @@
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.1.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list-item@2.1.0...@synerise/ds-list-item@2.1.1) (2026-09-18)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-list-item
9
+
10
+
11
+
12
+
13
+
14
+ # [2.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list-item@2.0.2...@synerise/ds-list-item@2.1.0) (2026-09-16)
15
+
16
+ ### Features
17
+
18
+ - **list-item:** add content-fitting size="auto" ([e269f0a](https://github.com/Synerise/synerise-design/commit/e269f0a48ca7472f4766a50a957e22d7988c5e13))
19
+
6
20
  ## [2.0.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list-item@2.0.1...@synerise/ds-list-item@2.0.2) (2026-09-08)
7
21
 
8
22
  ### Bug Fixes
package/CLAUDE.md CHANGED
@@ -6,7 +6,7 @@
6
6
  src/
7
7
  ListItem.tsx — main component; type-switch dispatcher
8
8
  ListItem.types.ts — all public types, itemTypes/itemSizes consts
9
- ListItem.const.ts — LIST_ITEM_SIZE_MAPPING (default=32px, large=50px)
9
+ ListItem.const.ts — LIST_ITEM_SIZE_MAPPING (default=32px, large=50px, auto=32px floor)
10
10
  ListItem.styles.ts — (empty placeholder)
11
11
  components/
12
12
  Danger/Danger.tsx — renders DangerItem styled variant
@@ -41,7 +41,7 @@ src/
41
41
  | `type` | `'default' \| 'danger' \| 'divider' \| 'select' \| 'header'` | `'default'` | Visual/behavioural variant |
42
42
  | `text` | `ReactNode` | — | Label alternative to `children` (`text` wins if both provided) |
43
43
  | `children` | `ReactNode` | — | Label content |
44
- | `size` | `'default' \| 'large'` | `'default'` | Row height: 32px or 50px |
44
+ | `size` | `'default' \| 'large' \| 'auto'` | `'default'` | Row height: 32px, 50px, or content height with a 32px floor |
45
45
  | `checked` | `boolean` | — | Shows green check icon in suffix slot; adds `ds-list-item-selected` class |
46
46
  | `selected` | `boolean` | — | Additional selected state (typed but not rendered by built-in variants) |
47
47
  | `disabled` | `boolean` | — | Prevents click/key events; sets `tabIndex=-1` |
@@ -54,7 +54,7 @@ src/
54
54
  | `prefixVisibilityTrigger` | `'hover' \| 'default'` | — | When `'hover'`, prefix only visible while item is hovered |
55
55
  | `suffixel` | `ReactNode \| AddonRenderer` | — | Right slot |
56
56
  | `suffixVisibilityTrigger` | `'hover' \| 'default'` | — | When `'hover'`, suffix only visible while item is hovered |
57
- | `description` | `ReactNode` | — | Second line; only rendered when `size === 'large'` |
57
+ | `description` | `ReactNode` | — | Second line; only rendered at `size="large"` (one ellipsized line) or `size="auto"` (wraps) |
58
58
  | `highlight` | `string` | — | Substring to highlight in string children |
59
59
  | `copyable` | `boolean \| Copyable` | — | Enables copy-to-clipboard on mousedown/Enter |
60
60
  | `copyValue` | `string` | — | **Deprecated** — use `copyable: { copyValue }` |
@@ -121,7 +121,7 @@ Provides `ListContext` + `FloatingDelayGroup`. Use when building custom list con
121
121
 
122
122
  ### Const/type exports
123
123
  - `itemTypes` — `{ DEFAULT, DANGER, DIVIDER, SELECT, HEADER }`
124
- - `itemSizes` — `{ DEFAULT, LARGE }`
124
+ - `itemSizes` — `{ DEFAULT, LARGE, AUTO }`
125
125
  - `LIST_ITEM_SIZE_MAPPING` — `Record<ItemSize, number>`
126
126
  - `type ListItemProps`, `type BasicItemProps`, `type ItemSize`, `type ItemType`, `type ItemData`, `type StyledListItem`, `type ListItemEventHandler`, `type ListWrapperProps`
127
127
 
@@ -167,13 +167,22 @@ import ListItem, { ListWrapper, ListContextProvider, useListContext } from '@syn
167
167
  <ListItem size="large" description="Secondary text">
168
168
  Primary label
169
169
  </ListItem>
170
+
171
+ // Auto size: the row grows with its content and the description wraps
172
+ <ListItem size="auto" description="A description long enough to need more than one line">
173
+ Primary label
174
+ </ListItem>
170
175
  ```
171
176
 
172
177
  ## Styling / Key dependencies / Implementation notes
173
178
 
174
179
  - **`@floating-ui/react` `useListItem`** — `Text` registers each item with floating-ui's list context via `useListItem()`. The merged ref (`useMergeRefs`) handles both the forwarded ref and the floating-ui ref. This is required for keyboard navigation in dropdowns.
175
180
  - **`useDropdown` integration** — if an item is rendered inside `@synerise/ds-core`'s `DropdownProvider`, clicking an item calls `setIsOpen(false)` when `hideOnItemClick === true`.
176
- - **`description` only renders at `size="large"`** — setting `description` on a default-size item silently does nothing.
181
+ - **`description` renders at `size="large"` and `size="auto"`** — setting `description` on a default-size item silently does nothing. At `large` it is one ellipsized line; at `auto` it wraps. The allow-list is `rendersDescription` in `components/Text/ItemLabel.const.ts`, deliberately not `size !== 'default'`, so a future size has to opt in explicitly.
182
+ - **`size="auto"` CSS contract** — every auto-only declaration lives in the single `autoSizeStyles` block in `Text.styles.tsx`, gated on `props.size === itemSizes.AUTO`, so `default`/`large` emit byte-identical CSS. It flips `Content` to `white-space: normal` + `overflow-wrap: break-word`, drops `PrefixWrapper`'s -7px vertical bleed, and gives prefix/suffix/arrow `align-self: flex-start` so addons sit beside the first line rather than the middle of a wrapped block. `min-height` needs no rule of its own — `baseStyles` reads `LIST_ITEM_SIZE_MAPPING`, whose `auto` entry *is* the 32px floor. **The 6px vertical padding is load-bearing:** `2 * pad + 18.07px line <= 32` gives `pad <= 6.96`, so 8px would make a single-line auto row 34px and break its pixel-identity with a default row.
183
+ - **`size="auto"` in a virtualized list** — `LIST_ITEM_SIZE_MAPPING.auto` is a *floor*, not the row's height, so a `VariableSizeList` sized from the map alone would overlap auto rows. `ds-dropdown`, `ds-item-picker`, `ds-context-selector` and `ds-select` all measure their rows via `useMeasuredRowHeights` / `useMeasuredRow` from `@synerise/ds-utils`, using the map only as the starting estimate. A hand-rolled virtualized list must do the same — put react-window's offset on a wrapper with `height: auto; min-height: <the offset height>`, or its inline height pins tall rows back.
184
+ - **`size="auto"` + `renderHoverTooltip`** — `S.Wrapper` gets `height: 100%` in a tooltip, so an auto row overflows a *fixed-height* parent rather than growing it. Give it a parent that can grow.
185
+ - **`size="auto"` + `copyable`** — `DynamicLabel` swaps only the label, not the description, so a wrapped title briefly collapses to the one-line "Copied!" and the row shrinks and regrows.
177
186
  - **`checked` in `Text` type** — renders a `CheckS` icon in the suffix slot. In `select` type, the styled component handles its own checked appearance independently via `S.SelectItem`.
178
187
  - **`Select.tsx` bug** — `uuid()` is called as the `key` prop on every render, generating a new key on each re-render, causing unnecessary unmount/remount cycles. (TODO comment present in source.)
179
188
  - **`copyable` boolean legacy** — when `copyable` is a plain `boolean`, it requires `copyValue` (deprecated string prop) to be set separately. Use the object form `copyable: { copyValue: '..' }` instead.
package/README.md CHANGED
@@ -53,7 +53,7 @@ import ListItem from '@synerise/ds-list-item'
53
53
  | prefixel | prefix element | `ReactNode` &#124; `AddonRenderer` | - |
54
54
  | prefixVisibilityTrigger | drives prefix visibility | `'hover'` &#124; `'default'` | - |
55
55
  | renderHoverTooltip | Tooltip to display on item hover | `() => JSX.Element` | - |
56
- | size | height of the item | `'default'` &#124; `'large'` | 'default' |
56
+ | size | height of the item (`'auto'` fits its content, with a 32px floor) | `'default'` &#124; `'large'` &#124; `'auto'` | 'default' |
57
57
  | suffixel | suffix element. Item with type="select" and checked also displays a check icon | `ReactNode` &#124; `AddonRenderer` | - |
58
58
  | suffixVisibilityTrigger | drives suffix visibility | `'hover'` &#124; `'default'` | - |
59
59
  | text | prop alternative to `children` | `ReactNode` | - |
@@ -1,2 +1,8 @@
1
1
  import { ItemSize } from './ListItem.types';
2
+ /**
3
+ * Row height in px per `size`. For `'auto'` this is the `min-height` floor the CSS
4
+ * applies (`baseStyles` in `Text.styles.tsx` reads this map), i.e. a lower bound and
5
+ * the estimate a virtualized list should start from — the real height is content-driven
6
+ * and must be measured. `@synerise/ds-select`'s `OptionList` is the reference pattern.
7
+ */
2
8
  export declare const LIST_ITEM_SIZE_MAPPING: Record<ItemSize, number>;
@@ -1,6 +1,7 @@
1
1
  const LIST_ITEM_SIZE_MAPPING = {
2
2
  default: 32,
3
- large: 50
3
+ large: 50,
4
+ auto: 32
4
5
  };
5
6
  export {
6
7
  LIST_ITEM_SIZE_MAPPING
package/dist/ListItem.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef, useContext } from "react";
3
3
  import { useDropdown } from "@synerise/ds-core";
4
- import { itemTypes } from "./ListItem.types.js";
5
4
  import Danger from "./components/Danger/Danger.js";
6
5
  import { Divider } from "./components/Divider/Divider.js";
7
6
  import { Header } from "./components/Header/Header.js";
8
7
  import { ListContext } from "./components/ListContext/ListContext.js";
9
8
  import Select from "./components/Select/Select.js";
10
9
  import Text from "./components/Text/Text.js";
10
+ import { itemTypes } from "./ListItem.types.js";
11
11
  const ListItem = forwardRef((props, forwardedRef) => {
12
12
  const {
13
13
  text,
@@ -14,6 +14,7 @@ export declare const itemTypes: {
14
14
  export declare const itemSizes: {
15
15
  readonly DEFAULT: "default";
16
16
  readonly LARGE: "large";
17
+ readonly AUTO: "auto";
17
18
  };
18
19
  export type ItemType = (typeof itemTypes)[keyof typeof itemTypes];
19
20
  export type ItemSize = (typeof itemSizes)[keyof typeof itemSizes];
@@ -84,6 +85,10 @@ export type BaseListItemProps = ListItemDividerProps & {
84
85
  prefixel?: ReactNode | AddonRenderer;
85
86
  prefixVisibilityTrigger?: 'hover' | 'default';
86
87
  renderHoverTooltip?: () => JSX.Element;
88
+ /**
89
+ * Row height: `'default'` 32px, `'large'` 50px, `'auto'` grows with its content
90
+ * (32px floor, and `description` wraps over multiple lines).
91
+ */
87
92
  size?: ItemSize;
88
93
  suffixel?: ReactNode | AddonRenderer;
89
94
  suffixVisibilityTrigger?: 'hover' | 'default';
@@ -7,7 +7,8 @@ const itemTypes = {
7
7
  };
8
8
  const itemSizes = {
9
9
  DEFAULT: "default",
10
- LARGE: "large"
10
+ LARGE: "large",
11
+ AUTO: "auto"
11
12
  };
12
13
  export {
13
14
  itemSizes,
@@ -1,10 +1,12 @@
1
1
  import { default as React, ComponentType } from 'react';
2
- import { ListItemProps } from '../../ListItem.types';
2
+ import { ItemSize, ListItemProps } from '../../ListItem.types';
3
3
  type SubMenuProps = {
4
4
  dataSource?: ListItemProps[];
5
5
  onClick?: ListItemProps['onClick'];
6
6
  isOpen?: boolean;
7
7
  indentLevel: number;
8
+ /** The parent row's size, inherited by children that do not set their own. */
9
+ size?: ItemSize;
8
10
  ItemComponent: ComponentType<ListItemProps>;
9
11
  };
10
12
  export declare const SubMenu: React.ForwardRefExoticComponent<SubMenuProps & React.RefAttributes<HTMLDivElement>>;
@@ -7,9 +7,10 @@ const SubMenu = forwardRef(({
7
7
  isOpen,
8
8
  dataSource,
9
9
  indentLevel,
10
+ size,
10
11
  ItemComponent
11
12
  }, forwardedRef) => {
12
- return /* @__PURE__ */ jsx(ListContextProvider, { onClick, children: /* @__PURE__ */ jsx(SubMenuContainer, { ref: forwardedRef, isOpen, children: /* @__PURE__ */ jsx(SubMenuList, { children: dataSource?.map((item) => /* @__PURE__ */ createElement(ItemComponent, { ...item, key: item.itemKey, indentLevel })) }) }) });
13
+ return /* @__PURE__ */ jsx(ListContextProvider, { onClick, children: /* @__PURE__ */ jsx(SubMenuContainer, { ref: forwardedRef, isOpen, children: /* @__PURE__ */ jsx(SubMenuList, { children: dataSource?.map((item) => /* @__PURE__ */ createElement(ItemComponent, { ...item, key: item.itemKey, indentLevel, size: item.size ?? size })) }) }) });
13
14
  });
14
15
  export {
15
16
  SubMenu
@@ -1 +1,3 @@
1
+ import { ItemSize } from '../../ListItem.types';
1
2
  export declare const INDENT_WIDTH = 20;
3
+ export declare const rendersDescription: (size?: ItemSize) => boolean;
@@ -1,4 +1,8 @@
1
+ import { itemSizes } from "../../ListItem.types.js";
1
2
  const INDENT_WIDTH = 20;
3
+ const SIZES_WITH_DESCRIPTION = [itemSizes.LARGE, itemSizes.AUTO];
4
+ const rendersDescription = (size) => !!size && SIZES_WITH_DESCRIPTION.includes(size);
2
5
  export {
3
- INDENT_WIDTH
6
+ INDENT_WIDTH,
7
+ rendersDescription
4
8
  };
@@ -3,6 +3,7 @@ import classnames from "classnames";
3
3
  import { forwardRef } from "react";
4
4
  import { useTheme } from "@synerise/ds-core";
5
5
  import Icon, { AngleRightS, CheckS, AngleUpS, AngleDownS } from "@synerise/ds-icon";
6
+ import { rendersDescription } from "./ItemLabel.const.js";
6
7
  import { Wrapper, Inner, PrefixWrapper, Content, Description, ArrowRight, SuffixWrapper, SubMenuToggle } from "./Text.styles.js";
7
8
  const ItemLabel = forwardRef(({
8
9
  onClick,
@@ -65,7 +66,7 @@ const ItemLabel = forwardRef(({
65
66
  prefixElement && /* @__PURE__ */ jsx(PrefixWrapper, { "data-testid": "list-item-prefix", visible: prefixVisible, disabled, children: prefixElement }),
66
67
  /* @__PURE__ */ jsxs(Content, { className: "ds-list-item-content", children: [
67
68
  content,
68
- description && size === "large" && /* @__PURE__ */ jsx(Description, { children: description })
69
+ description && rendersDescription(size) && /* @__PURE__ */ jsx(Description, { children: description })
69
70
  ] }),
70
71
  parent && /* @__PURE__ */ jsx(ArrowRight, { children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(AngleRightS, {}), color: theme.palette["grey-600"] }) }),
71
72
  (!!suffixElement || !!checked || hasSubMenu) && /* @__PURE__ */ jsxs(SuffixWrapper, { "data-testid": "list-item-suffix", visible: suffixVisible || hasSubMenu, disabled, children: [
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { useListItem, useMergeRefs } from "@floating-ui/react";
2
3
  import copy from "copy-to-clipboard";
3
4
  import { forwardRef, useState, useMemo } from "react";
4
- import { useListItem, useMergeRefs } from "@floating-ui/react";
5
5
  import { useStableId, renderWithHighlight } from "@synerise/ds-utils";
6
6
  import { useTemporaryLabel } from "../../hooks/useTemporaryLabel.js";
7
7
  import HoverTooltip from "../HoverTooltip/HoverTooltip.js";
@@ -200,7 +200,7 @@ const Text = forwardRef((props, forwardedRef) => {
200
200
  const nextIndentLevel = indentLevel ? indentLevel + 1 : 1;
201
201
  return /* @__PURE__ */ jsxs(Fragment, { children: [
202
202
  TextNode,
203
- /* @__PURE__ */ jsx(SubMenu, { onClick, indentLevel: nextIndentLevel, dataSource: subMenu, isOpen: subMenuOpen, ItemComponent })
203
+ /* @__PURE__ */ jsx(SubMenu, { onClick, indentLevel: nextIndentLevel, size, dataSource: subMenu, isOpen: subMenuOpen, ItemComponent })
204
204
  ] });
205
205
  }
206
206
  return TextNode;
@@ -1,6 +1,7 @@
1
1
  import styled, { css } from "styled-components";
2
2
  import { IconContainer } from "@synerise/ds-icon";
3
3
  import { LIST_ITEM_SIZE_MAPPING } from "../../ListItem.const.js";
4
+ import { itemSizes } from "../../ListItem.types.js";
4
5
  import { INDENT_WIDTH } from "./ItemLabel.const.js";
5
6
  const TRANSITION_FN = "0.2s ease-out";
6
7
  const hiddenElementStyle = () => css(["opacity:0;pointer-events:none;"]);
@@ -43,15 +44,17 @@ const Content = /* @__PURE__ */ styled.div.withConfig({
43
44
  displayName: "Textstyles__Content",
44
45
  componentId: "sc-1j4eogh-6"
45
46
  })(["white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;order:2;"]);
47
+ const AUTO_SIZE_PADDING = 6;
48
+ const autoSizeStyles = /* @__PURE__ */ css(["padding-top:", "px;padding-bottom:", "px;", "{flex:1 1 auto;white-space:normal;text-overflow:clip;overflow-wrap:break-word;}", "{margin-top:0;margin-bottom:0;}", ",", ",", "{align-self:flex-start;}"], AUTO_SIZE_PADDING, AUTO_SIZE_PADDING, Content, PrefixWrapper, PrefixWrapper, SuffixWrapper, ArrowRight);
46
49
  const Wrapper = /* @__PURE__ */ styled.div.withConfig({
47
50
  displayName: "Textstyles__Wrapper",
48
51
  componentId: "sc-1j4eogh-7"
49
- })(["display:flex;min-width:173px;", " ", " ", " ", "{", " ", " ", "{transition:all ", ";opacity:", ";}", " ", " ", " .ds-checkbox,.ds-checkbox > .ant-checkbox-wrapper{padding:0;}}"], (props) => props.inTooltip && css(["height:100%;"]), ({
52
+ })(["display:flex;min-width:173px;", " ", " ", " ", "{", " ", " ", " ", "{transition:all ", ";opacity:", ";}", " ", " ", " .ds-checkbox,.ds-checkbox > .ant-checkbox-wrapper{padding:0;}}"], (props) => props.inTooltip && css(["height:100%;"]), ({
50
53
  featured,
51
54
  disabled,
52
55
  selected,
53
56
  theme
54
- }) => featured && css(["&&{", " > .ds-icon > svg,", " ", " > svg,", " > .ds-icon > svg,", " ", " > svg,", " svg,", "{fill:", ";color:", ";}}&:hover,&:active,&:focus-visible:not(:active){&&{", " > .ds-icon > svg,", " ", " > svg,", " > .ds-icon > svg,", " ", " > svg,", " svg,", "{fill:", ";color:", ";}&:focus-visible:not(:active) ", "{box-shadow:inset 0 0 0 2px ", ";}}}", " ", ""], PrefixWrapper, PrefixWrapper, IconContainer, SuffixWrapper, SuffixWrapper, IconContainer, ArrowRight, Content, theme.palette["blue-600"], theme.palette["blue-600"], PrefixWrapper, PrefixWrapper, IconContainer, SuffixWrapper, SuffixWrapper, IconContainer, ArrowRight, Content, theme.palette["blue-700"], theme.palette["blue-700"], Inner, theme.palette["blue-700"], disabled && css(["&:hover{&&{", " > .ds-icon > svg,", " ", " > svg,", " > .ds-icon > svg,", " ", " > svg,", "{fill:", ";color:", ";}}}"], PrefixWrapper, PrefixWrapper, IconContainer, SuffixWrapper, SuffixWrapper, IconContainer, Content, theme.palette["blue-600"], theme.palette["blue-600"]), selected && css(["&:hover{&&{", " > .ds-icon > svg,", " ", " > svg,", " > .ds-icon > svg,", " ", " > svg,", "{fill:", ";color:", ";}}}"], PrefixWrapper, PrefixWrapper, IconContainer, SuffixWrapper, SuffixWrapper, IconContainer, Content, theme.palette["blue-700"], theme.palette["blue-700"])), (props) => props.disabled ? css(["cursor:not-allowed;opacity:0.4;svg{fill:", ";}&:hover{", "{opacity:1;svg{fill:", ";}}}"], props.theme.palette["grey-600"], ArrowRight, props.theme.palette["grey-600"]) : css(["", " > .ds-icon > svg{fill:", ";}&:hover{", "{background:", ";", ";}}&:focus-visible:not(:active){", "{box-shadow:inset 0 0 0 2px ", ";}}&:focus-visible:active,&:active{", "{background:", ";", "}}}"], PrefixWrapper, props.theme.palette["grey-600"], Inner, props.theme.palette["grey-050"], !props.noHover && css(["&{color:", ";}", "{", " > svg{fill:", ";}}", "{opacity:1;svg{fill:", ";}}"], props.noHover ? props.theme.palette["grey-700"] : props.theme.palette["blue-600"], PrefixWrapper, IconContainer, props.theme.palette["blue-600"], ArrowRight, props.theme.palette["blue-600"]), Inner, props.theme.palette["blue-600"], Inner, props.theme.palette["blue-050"], !props.noHover && css(["color:", ";", "{", " > svg{fill:", ";}}"], props.theme.palette["blue-600"], PrefixWrapper, IconContainer, props.theme.palette["blue-600"])), Inner, (props) => props.ordered && css(["&::before{font-weight:400;color:", ";counter-increment:ds-list-items 1;content:'0' counter(ds-list-items) '. \\00A0';}"], props.theme.palette["grey-500"]), baseStyles, ArrowRight, TRANSITION_FN, (props) => props.disabled ? "1" : "0", (props) => props.selected && selectedStyle, (props) => props.highlight && highlightStyle, (props) => !props.ordered && orderedStyle);
57
+ }) => featured && css(["&&{", " > .ds-icon > svg,", " ", " > svg,", " > .ds-icon > svg,", " ", " > svg,", " svg,", "{fill:", ";color:", ";}}&:hover,&:active,&:focus-visible:not(:active){&&{", " > .ds-icon > svg,", " ", " > svg,", " > .ds-icon > svg,", " ", " > svg,", " svg,", "{fill:", ";color:", ";}&:focus-visible:not(:active) ", "{box-shadow:inset 0 0 0 2px ", ";}}}", " ", ""], PrefixWrapper, PrefixWrapper, IconContainer, SuffixWrapper, SuffixWrapper, IconContainer, ArrowRight, Content, theme.palette["blue-600"], theme.palette["blue-600"], PrefixWrapper, PrefixWrapper, IconContainer, SuffixWrapper, SuffixWrapper, IconContainer, ArrowRight, Content, theme.palette["blue-700"], theme.palette["blue-700"], Inner, theme.palette["blue-700"], disabled && css(["&:hover{&&{", " > .ds-icon > svg,", " ", " > svg,", " > .ds-icon > svg,", " ", " > svg,", "{fill:", ";color:", ";}}}"], PrefixWrapper, PrefixWrapper, IconContainer, SuffixWrapper, SuffixWrapper, IconContainer, Content, theme.palette["blue-600"], theme.palette["blue-600"]), selected && css(["&:hover{&&{", " > .ds-icon > svg,", " ", " > svg,", " > .ds-icon > svg,", " ", " > svg,", "{fill:", ";color:", ";}}}"], PrefixWrapper, PrefixWrapper, IconContainer, SuffixWrapper, SuffixWrapper, IconContainer, Content, theme.palette["blue-700"], theme.palette["blue-700"])), (props) => props.disabled ? css(["cursor:not-allowed;opacity:0.4;svg{fill:", ";}&:hover{", "{opacity:1;svg{fill:", ";}}}"], props.theme.palette["grey-600"], ArrowRight, props.theme.palette["grey-600"]) : css(["", " > .ds-icon > svg{fill:", ";}&:hover{", "{background:", ";", ";}}&:focus-visible:not(:active){", "{box-shadow:inset 0 0 0 2px ", ";}}&:focus-visible:active,&:active{", "{background:", ";", "}}}"], PrefixWrapper, props.theme.palette["grey-600"], Inner, props.theme.palette["grey-050"], !props.noHover && css(["&{color:", ";}", "{", " > svg{fill:", ";}}", "{opacity:1;svg{fill:", ";}}"], props.noHover ? props.theme.palette["grey-700"] : props.theme.palette["blue-600"], PrefixWrapper, IconContainer, props.theme.palette["blue-600"], ArrowRight, props.theme.palette["blue-600"]), Inner, props.theme.palette["blue-600"], Inner, props.theme.palette["blue-050"], !props.noHover && css(["color:", ";", "{", " > svg{fill:", ";}}"], props.theme.palette["blue-600"], PrefixWrapper, IconContainer, props.theme.palette["blue-600"])), Inner, (props) => props.ordered && css(["&::before{font-weight:400;color:", ";counter-increment:ds-list-items 1;content:'0' counter(ds-list-items) '. \\00A0';}"], props.theme.palette["grey-500"]), baseStyles, (props) => props.size === itemSizes.AUTO && autoSizeStyles, ArrowRight, TRANSITION_FN, (props) => props.disabled ? "1" : "0", (props) => props.selected && selectedStyle, (props) => props.highlight && highlightStyle, (props) => !props.ordered && orderedStyle);
55
58
  const Divider = /* @__PURE__ */ styled.div.withConfig({
56
59
  displayName: "Textstyles__Divider",
57
60
  componentId: "sc-1j4eogh-8"
@@ -67,7 +70,7 @@ const DynamicLabelAlternate = /* @__PURE__ */ styled.div.withConfig({
67
70
  const DynamicLabelWrapper = /* @__PURE__ */ styled.div.withConfig({
68
71
  displayName: "Textstyles__DynamicLabelWrapper",
69
72
  componentId: "sc-1j4eogh-11"
70
- })(["", ""], (props) => props.showAlternative ? css(["", "{height:0;visibility:hidden;}", "{height:auto;visibility:inherit;}"], DynamicLabelMain, DynamicLabelAlternate) : css(["", "{height:auto;visibility:inherit;}", "{height:0;visibility:hidden;}"], DynamicLabelMain, DynamicLabelAlternate));
73
+ })(["", ""], (props) => props.showAlternative ? css(["", "{height:0;overflow:hidden;visibility:hidden;}", "{height:auto;visibility:inherit;}"], DynamicLabelMain, DynamicLabelAlternate) : css(["", "{height:auto;visibility:inherit;}", "{height:0;overflow:hidden;visibility:hidden;}"], DynamicLabelMain, DynamicLabelAlternate));
71
74
  const Description = /* @__PURE__ */ styled.div.withConfig({
72
75
  displayName: "Textstyles__Description",
73
76
  componentId: "sc-1j4eogh-12"
@@ -1,5 +1,5 @@
1
1
  export { default as Danger } from './Danger/Danger';
2
+ export { GroupItem } from './GroupItem/GroupItem';
3
+ export { default as HoverTooltip } from './HoverTooltip/HoverTooltip';
2
4
  export { default as Select } from './Select/Select';
3
5
  export { default as Text } from './Text/Text';
4
- export { default as HoverTooltip } from './HoverTooltip/HoverTooltip';
5
- export { GroupItem } from './GroupItem/GroupItem';
@@ -1,12 +1,12 @@
1
1
  import { default as default2 } from "./Danger/Danger.js";
2
- import { default as default3 } from "./Select/Select.js";
3
- import { default as default4 } from "./Text/Text.js";
4
- import { default as default5 } from "./HoverTooltip/HoverTooltip.js";
5
2
  import { GroupItem } from "./GroupItem/GroupItem.js";
3
+ import { default as default3 } from "./HoverTooltip/HoverTooltip.js";
4
+ import { default as default4 } from "./Select/Select.js";
5
+ import { default as default5 } from "./Text/Text.js";
6
6
  export {
7
7
  default2 as Danger,
8
8
  GroupItem,
9
- default5 as HoverTooltip,
10
- default3 as Select,
11
- default4 as Text
9
+ default3 as HoverTooltip,
10
+ default4 as Select,
11
+ default5 as Text
12
12
  };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export { default } from './ListItem';
2
- export { HoverTooltip, GroupItem } from './components';
1
+ export { GroupItem, HoverTooltip } from './components';
3
2
  export { HoverableSuffix } from './components/HoverableSuffix/HoverableSuffix';
4
- export { type HoverableSuffixProps } from './components/HoverableSuffix/HoverableSuffix.types';
5
- export { ListWrapper, type ListWrapperProps, type ListWrapperTexts, } from './components/ListWrapper/ListWrapper';
3
+ export type { HoverableSuffixProps } from './components/HoverableSuffix/HoverableSuffix.types';
6
4
  export { useListContext } from './components/ListContext/ListContext';
7
5
  export { ListContextProvider } from './components/ListContext/ListContextProvider';
8
- export { itemSizes, itemTypes, type ListItemProps, type BasicItemProps, type ItemSize, type ItemType, type ItemData, type StyledListItem, type ListItemEventHandler, } from './ListItem.types';
6
+ export { ListWrapper, type ListWrapperProps, type ListWrapperTexts, } from './components/ListWrapper/ListWrapper';
7
+ export { default } from './ListItem';
9
8
  export * from './ListItem.const';
9
+ export { type BasicItemProps, type ItemData, type ItemSize, type ItemType, itemSizes, itemTypes, type ListItemEventHandler, type ListItemProps, type StyledListItem, } from './ListItem.types';
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
- import { default as default2 } from "./ListItem.js";
2
1
  import "./components/Danger/Danger.js";
2
+ import { GroupItem } from "./components/GroupItem/GroupItem.js";
3
+ import { default as default2 } from "./components/HoverTooltip/HoverTooltip.js";
3
4
  import "./components/Select/Select.js";
4
5
  import "./components/Text/Text.js";
5
- import { default as default3 } from "./components/HoverTooltip/HoverTooltip.js";
6
- import { GroupItem } from "./components/GroupItem/GroupItem.js";
7
6
  import { HoverableSuffix } from "./components/HoverableSuffix/HoverableSuffix.js";
8
- import { ListWrapper } from "./components/ListWrapper/ListWrapper.js";
9
7
  import { useListContext } from "./components/ListContext/ListContext.js";
10
8
  import { ListContextProvider } from "./components/ListContext/ListContextProvider.js";
11
- import { itemSizes, itemTypes } from "./ListItem.types.js";
9
+ import { ListWrapper } from "./components/ListWrapper/ListWrapper.js";
10
+ import { default as default3 } from "./ListItem.js";
12
11
  import { LIST_ITEM_SIZE_MAPPING } from "./ListItem.const.js";
12
+ import { itemSizes, itemTypes } from "./ListItem.types.js";
13
13
  export {
14
14
  GroupItem,
15
- default3 as HoverTooltip,
15
+ default2 as HoverTooltip,
16
16
  HoverableSuffix,
17
17
  LIST_ITEM_SIZE_MAPPING,
18
18
  ListContextProvider,
19
19
  ListWrapper,
20
- default2 as default,
20
+ default3 as default,
21
21
  itemSizes,
22
22
  itemTypes,
23
23
  useListContext
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-list-item",
3
- "version": "2.0.2",
3
+ "version": "2.1.1",
4
4
  "description": "ListItem UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -43,12 +43,12 @@
43
43
  "types": "dist/index.d.ts",
44
44
  "dependencies": {
45
45
  "@floating-ui/react": "^0.27.16",
46
- "@synerise/ds-button": "^2.0.2",
47
- "@synerise/ds-divider": "^2.0.2",
48
- "@synerise/ds-icon": "^2.1.0",
49
- "@synerise/ds-popover": "^2.0.1",
50
- "@synerise/ds-tooltip": "^2.0.2",
51
- "@synerise/ds-utils": "^2.0.0",
46
+ "@synerise/ds-button": "^2.0.4",
47
+ "@synerise/ds-divider": "^2.0.4",
48
+ "@synerise/ds-icon": "^2.1.2",
49
+ "@synerise/ds-popover": "^2.0.2",
50
+ "@synerise/ds-tooltip": "^2.0.4",
51
+ "@synerise/ds-utils": "^2.1.1",
52
52
  "classnames": "^2.5.1"
53
53
  },
54
54
  "peerDependencies": {
@@ -61,5 +61,5 @@
61
61
  "@testing-library/react": "^14.0.0",
62
62
  "vitest": "^4.0.0"
63
63
  },
64
- "gitHead": "e0dced8fd3a1194eff2fafc1b7e385b29238af88"
64
+ "gitHead": "b1d905617dfb186b5d80966d63ce55bf29df743d"
65
65
  }