@synerise/ds-list-item 2.0.2 → 2.1.0
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 +6 -0
- package/CLAUDE.md +14 -5
- package/README.md +1 -1
- package/dist/ListItem.const.d.ts +6 -0
- package/dist/ListItem.const.js +2 -1
- package/dist/ListItem.types.d.ts +5 -0
- package/dist/ListItem.types.js +2 -1
- package/dist/components/SubMenu/SubMenu.d.ts +3 -1
- package/dist/components/SubMenu/SubMenu.js +2 -1
- package/dist/components/Text/ItemLabel.const.d.ts +2 -0
- package/dist/components/Text/ItemLabel.const.js +5 -1
- package/dist/components/Text/ItemLabel.js +2 -1
- package/dist/components/Text/Text.js +1 -1
- package/dist/components/Text/Text.styles.js +6 -3
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.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)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **list-item:** add content-fitting size="auto" ([e269f0a](https://github.com/Synerise/synerise-design/commit/e269f0a48ca7472f4766a50a957e22d7988c5e13))
|
|
11
|
+
|
|
6
12
|
## [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
13
|
|
|
8
14
|
### 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
|
|
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
|
|
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`
|
|
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` | `AddonRenderer` | - |
|
|
54
54
|
| prefixVisibilityTrigger | drives prefix visibility | `'hover'` | `'default'` | - |
|
|
55
55
|
| renderHoverTooltip | Tooltip to display on item hover | `() => JSX.Element` | - |
|
|
56
|
-
| size | height of the item
|
|
56
|
+
| size | height of the item (`'auto'` fits its content, with a 32px floor) | `'default'` | `'large'` | `'auto'` | 'default' |
|
|
57
57
|
| suffixel | suffix element. Item with type="select" and checked also displays a check icon | `ReactNode` | `AddonRenderer` | - |
|
|
58
58
|
| suffixVisibilityTrigger | drives suffix visibility | `'hover'` | `'default'` | - |
|
|
59
59
|
| text | prop alternative to `children` | `ReactNode` | - |
|
package/dist/ListItem.const.d.ts
CHANGED
|
@@ -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>;
|
package/dist/ListItem.const.js
CHANGED
package/dist/ListItem.types.d.ts
CHANGED
|
@@ -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';
|
package/dist/ListItem.types.js
CHANGED
|
@@ -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,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
|
|
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: [
|
|
@@ -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"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-list-item",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
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.
|
|
47
|
-
"@synerise/ds-divider": "^2.0.
|
|
48
|
-
"@synerise/ds-icon": "^2.1.
|
|
46
|
+
"@synerise/ds-button": "^2.0.3",
|
|
47
|
+
"@synerise/ds-divider": "^2.0.3",
|
|
48
|
+
"@synerise/ds-icon": "^2.1.1",
|
|
49
49
|
"@synerise/ds-popover": "^2.0.1",
|
|
50
|
-
"@synerise/ds-tooltip": "^2.0.
|
|
51
|
-
"@synerise/ds-utils": "^2.
|
|
50
|
+
"@synerise/ds-tooltip": "^2.0.3",
|
|
51
|
+
"@synerise/ds-utils": "^2.1.0",
|
|
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": "
|
|
64
|
+
"gitHead": "71f08fdaba8e7b80731e29a03883dc6a33f2b9db"
|
|
65
65
|
}
|