@synerise/ds-list-item 1.4.21 → 1.5.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 +10 -0
- package/dist/ListItem.d.ts +5 -1
- package/dist/ListItem.types.d.ts +23 -0
- package/dist/components/Text/ItemLabel.d.ts +2 -1
- package/dist/components/Text/ItemLabel.js +8 -2
- package/dist/components/Text/Text.js +24 -6
- package/dist/components/Text/Text.styles.d.ts +1 -0
- package/dist/components/Text/Text.styles.js +16 -11
- package/package.json +7 -7
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.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list-item@1.4.22...@synerise/ds-list-item@1.5.0) (2026-06-11)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- add nested-dropdown selection story to ListItem ([1f84c87](https://github.com/Synerise/synerise-design/commit/1f84c87fa89612a72f25ed10076998f0b3dc29d3))
|
|
11
|
+
|
|
12
|
+
## [1.4.22](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list-item@1.4.21...@synerise/ds-list-item@1.4.22) (2026-05-26)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @synerise/ds-list-item
|
|
15
|
+
|
|
6
16
|
## [1.4.21](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list-item@1.4.20...@synerise/ds-list-item@1.4.21) (2026-05-22)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @synerise/ds-list-item
|
package/dist/ListItem.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ declare const ListItem: React.ForwardRefExoticComponent<import('./ListItem.types
|
|
|
25
25
|
onClick?: import('./ListItem.types').ListItemEventHandler<MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>>;
|
|
26
26
|
ordered?: boolean;
|
|
27
27
|
parent?: boolean;
|
|
28
|
+
selectableParent?: boolean;
|
|
28
29
|
prefixel?: React.ReactNode | import('./ListItem.types').AddonRenderer;
|
|
29
30
|
prefixVisibilityTrigger?: "hover" | "default";
|
|
30
31
|
renderHoverTooltip?: () => JSX.Element;
|
|
@@ -34,7 +35,10 @@ declare const ListItem: React.ForwardRefExoticComponent<import('./ListItem.types
|
|
|
34
35
|
text?: React.ReactNode;
|
|
35
36
|
type?: import('./ListItem.types').ItemType;
|
|
36
37
|
subMenu?: ListItemProps[];
|
|
38
|
+
defaultSubMenuOpen?: boolean;
|
|
39
|
+
subMenuOpen?: boolean;
|
|
40
|
+
onSubMenuToggle?: (open: boolean) => void;
|
|
37
41
|
indentLevel?: number;
|
|
38
42
|
featured?: boolean;
|
|
39
|
-
} & Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "children" | "onClick" | keyof import('./ListItem.types').ListItemDividerProps | "checked" | "selected" | "copyable" | "copyValue" | "copyHint" | "copyTooltip" | "timeToHideTooltip" | "tooltipProps" | "description" | "direction" | "disabled" | "highlight" | "popoverProps" | "key" | "itemKey" | "noHover" | "onItemHover" | "ordered" | "parent" | "prefixel" | "prefixVisibilityTrigger" | "renderHoverTooltip" | "size" | "suffixel" | "suffixVisibilityTrigger" | "text" | "type" | "subMenu" | "indentLevel" | "featured"> & import('@synerise/ds-utils').DataAttributes & React.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "children" | "onClick" | keyof import('./ListItem.types').ListItemDividerProps | "checked" | "selected" | "copyable" | "copyValue" | "copyHint" | "copyTooltip" | "timeToHideTooltip" | "tooltipProps" | "description" | "direction" | "disabled" | "highlight" | "popoverProps" | "key" | "itemKey" | "noHover" | "onItemHover" | "ordered" | "parent" | "selectableParent" | "prefixel" | "prefixVisibilityTrigger" | "renderHoverTooltip" | "size" | "suffixel" | "suffixVisibilityTrigger" | "text" | "type" | "subMenu" | "defaultSubMenuOpen" | "subMenuOpen" | "onSubMenuToggle" | "indentLevel" | "featured"> & import('@synerise/ds-utils').DataAttributes & React.RefAttributes<HTMLDivElement>>;
|
|
40
44
|
export default ListItem;
|
package/dist/ListItem.types.d.ts
CHANGED
|
@@ -74,6 +74,13 @@ export type BaseListItemProps = ListItemDividerProps & {
|
|
|
74
74
|
onClick?: ListItemEventHandler<MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>>;
|
|
75
75
|
ordered?: boolean;
|
|
76
76
|
parent?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Only relevant for items that have a `subMenu`. When `true`, clicking the row
|
|
79
|
+
* fires `onClick` (e.g. to select the item) and expand/collapse is moved to the
|
|
80
|
+
* suffix arrow. When omitted, clicking anywhere on the row toggles the sub-menu
|
|
81
|
+
* (the default, backwards-compatible behaviour) and `onClick` is not called.
|
|
82
|
+
*/
|
|
83
|
+
selectableParent?: boolean;
|
|
77
84
|
prefixel?: ReactNode | AddonRenderer;
|
|
78
85
|
prefixVisibilityTrigger?: 'hover' | 'default';
|
|
79
86
|
renderHoverTooltip?: () => JSX.Element;
|
|
@@ -83,6 +90,22 @@ export type BaseListItemProps = ListItemDividerProps & {
|
|
|
83
90
|
text?: ReactNode;
|
|
84
91
|
type?: ItemType;
|
|
85
92
|
subMenu?: ListItemProps[];
|
|
93
|
+
/**
|
|
94
|
+
* Initial open state of the item's `subMenu` (uncontrolled — read once on mount).
|
|
95
|
+
* Defaults to `false`. Ignored when `subMenuOpen` is provided.
|
|
96
|
+
*/
|
|
97
|
+
defaultSubMenuOpen?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Controlled open state of the item's `subMenu`. When provided, the component no
|
|
100
|
+
* longer manages open state internally — drive it together with `onSubMenuToggle`.
|
|
101
|
+
*/
|
|
102
|
+
subMenuOpen?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Fires with the next open state whenever the `subMenu` is toggled (row click in the
|
|
105
|
+
* default mode, or the suffix arrow when `selectableParent` is set). Use to drive a
|
|
106
|
+
* controlled `subMenuOpen`.
|
|
107
|
+
*/
|
|
108
|
+
onSubMenuToggle?: (open: boolean) => void;
|
|
86
109
|
indentLevel?: number;
|
|
87
110
|
featured?: boolean;
|
|
88
111
|
};
|
|
@@ -12,6 +12,7 @@ export declare const ItemLabel: React.ForwardRefExoticComponent<{
|
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
hasSubMenu?: boolean;
|
|
14
14
|
subMenuOpen?: boolean;
|
|
15
|
+
onToggleSubMenu?: (event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;
|
|
15
16
|
ordered?: boolean;
|
|
16
17
|
noHover?: boolean;
|
|
17
18
|
hasHighlight: boolean;
|
|
@@ -26,4 +27,4 @@ export declare const ItemLabel: React.ForwardRefExoticComponent<{
|
|
|
26
27
|
content?: ReactNode;
|
|
27
28
|
indentLevel?: number;
|
|
28
29
|
featured?: boolean;
|
|
29
|
-
} & Omit<React.HTMLAttributes<HTMLDivElement>, "content" | "onFocus" | "onBlur" | "onKeyDown" | "onClick" | "onMouseDown" | "onMouseLeave" | "onMouseOver" | "checked" | "description" | "disabled" | "noHover" | "ordered" | "parent" | "size" | "indentLevel" | "featured" | "inTooltip" | "hasSubMenu" | "
|
|
30
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "content" | "onFocus" | "onBlur" | "onKeyDown" | "onClick" | "onMouseDown" | "onMouseLeave" | "onMouseOver" | "checked" | "description" | "disabled" | "noHover" | "ordered" | "parent" | "size" | "subMenuOpen" | "indentLevel" | "featured" | "inTooltip" | "hasSubMenu" | "onToggleSubMenu" | "hasHighlight" | "prefixVisible" | "suffixVisible" | "prefixElement" | "suffixElement"> & import('@synerise/ds-utils').DataAttributes & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -3,7 +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 { Wrapper, Inner, PrefixWrapper, Content, Description, ArrowRight, SuffixWrapper } from "./Text.styles.js";
|
|
6
|
+
import { Wrapper, Inner, PrefixWrapper, Content, Description, ArrowRight, SuffixWrapper, SubMenuToggle } from "./Text.styles.js";
|
|
7
7
|
const ItemLabel = forwardRef(({
|
|
8
8
|
onClick,
|
|
9
9
|
onFocus,
|
|
@@ -24,6 +24,7 @@ const ItemLabel = forwardRef(({
|
|
|
24
24
|
suffixVisible,
|
|
25
25
|
hasSubMenu,
|
|
26
26
|
subMenuOpen,
|
|
27
|
+
onToggleSubMenu,
|
|
27
28
|
content,
|
|
28
29
|
inTooltip,
|
|
29
30
|
parent,
|
|
@@ -69,7 +70,12 @@ const ItemLabel = forwardRef(({
|
|
|
69
70
|
parent && /* @__PURE__ */ jsx(ArrowRight, { children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(AngleRightS, {}), color: theme.palette["grey-600"] }) }),
|
|
70
71
|
(!!suffixElement || !!checked || hasSubMenu) && /* @__PURE__ */ jsxs(SuffixWrapper, { "data-testid": "list-item-suffix", visible: suffixVisible || hasSubMenu, disabled, children: [
|
|
71
72
|
!!checked && /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CheckS, {}), color: theme.palette[`green-600`] }),
|
|
72
|
-
hasSubMenu && /* @__PURE__ */ jsx(
|
|
73
|
+
hasSubMenu && (onToggleSubMenu ? /* @__PURE__ */ jsx(SubMenuToggle, { role: "button", tabIndex: disabled ? -1 : 0, "aria-expanded": subMenuOpen, "aria-label": "Toggle sub-menu", "data-testid": "list-item-submenu-toggle", onClick: onToggleSubMenu, onKeyDown: (event) => {
|
|
74
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
onToggleSubMenu(event);
|
|
77
|
+
}
|
|
78
|
+
}, children: /* @__PURE__ */ jsx(Icon, { component: subMenuOpen ? /* @__PURE__ */ jsx(AngleUpS, {}) : /* @__PURE__ */ jsx(AngleDownS, {}) }) }) : /* @__PURE__ */ jsx(Icon, { component: subMenuOpen ? /* @__PURE__ */ jsx(AngleUpS, {}) : /* @__PURE__ */ jsx(AngleDownS, {}) })),
|
|
73
79
|
suffixElement
|
|
74
80
|
] })
|
|
75
81
|
] })
|
|
@@ -28,6 +28,7 @@ const Text = forwardRef((props, forwardedRef) => {
|
|
|
28
28
|
disabled,
|
|
29
29
|
description,
|
|
30
30
|
parent,
|
|
31
|
+
selectableParent,
|
|
31
32
|
ordered,
|
|
32
33
|
indentLevel,
|
|
33
34
|
onClick,
|
|
@@ -45,6 +46,9 @@ const Text = forwardRef((props, forwardedRef) => {
|
|
|
45
46
|
popoverProps,
|
|
46
47
|
renderHoverTooltip,
|
|
47
48
|
subMenu,
|
|
49
|
+
subMenuOpen: controlledSubMenuOpen,
|
|
50
|
+
defaultSubMenuOpen,
|
|
51
|
+
onSubMenuToggle,
|
|
48
52
|
featured,
|
|
49
53
|
ItemComponent,
|
|
50
54
|
...rest
|
|
@@ -55,7 +59,15 @@ const Text = forwardRef((props, forwardedRef) => {
|
|
|
55
59
|
const mergedRef = useMergeRefs([forwardedRef, ref]);
|
|
56
60
|
const stableId = useStableId();
|
|
57
61
|
const itemKey = menuItemKey ?? stableId;
|
|
58
|
-
const
|
|
62
|
+
const isSubMenuControlled = controlledSubMenuOpen !== void 0;
|
|
63
|
+
const [uncontrolledSubMenuOpen, setUncontrolledSubMenuOpen] = useState(Boolean(defaultSubMenuOpen));
|
|
64
|
+
const subMenuOpen = isSubMenuControlled ? Boolean(controlledSubMenuOpen) : uncontrolledSubMenuOpen;
|
|
65
|
+
const updateSubMenuOpen = (next) => {
|
|
66
|
+
if (!isSubMenuControlled) {
|
|
67
|
+
setUncontrolledSubMenuOpen(next);
|
|
68
|
+
}
|
|
69
|
+
onSubMenuToggle?.(next);
|
|
70
|
+
};
|
|
59
71
|
const [hovered, setHovered] = useState(false);
|
|
60
72
|
const {
|
|
61
73
|
enabled: canCopyToClipboard,
|
|
@@ -98,10 +110,16 @@ const Text = forwardRef((props, forwardedRef) => {
|
|
|
98
110
|
key: itemKey,
|
|
99
111
|
item: removeHandlerProps(props)
|
|
100
112
|
};
|
|
113
|
+
const handleToggleSubMenu = (event) => {
|
|
114
|
+
event.stopPropagation();
|
|
115
|
+
if (!disabled) {
|
|
116
|
+
updateSubMenuOpen(!subMenuOpen);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
101
119
|
const handleClick = (event) => {
|
|
102
120
|
if (!disabled) {
|
|
103
|
-
if (subMenu) {
|
|
104
|
-
|
|
121
|
+
if (subMenu && !selectableParent) {
|
|
122
|
+
updateSubMenuOpen(!subMenuOpen);
|
|
105
123
|
} else {
|
|
106
124
|
if (delayClickEvent) {
|
|
107
125
|
setTimeout(() => {
|
|
@@ -121,8 +139,8 @@ const Text = forwardRef((props, forwardedRef) => {
|
|
|
121
139
|
};
|
|
122
140
|
const handleKeyDown = (event) => {
|
|
123
141
|
if (!disabled && event.key === "Enter") {
|
|
124
|
-
if (subMenu) {
|
|
125
|
-
|
|
142
|
+
if (subMenu && !selectableParent) {
|
|
143
|
+
updateSubMenuOpen(!subMenuOpen);
|
|
126
144
|
} else {
|
|
127
145
|
event.preventDefault();
|
|
128
146
|
if (canCopyToClipboard && valueToCopy) {
|
|
@@ -174,7 +192,7 @@ const Text = forwardRef((props, forwardedRef) => {
|
|
|
174
192
|
}
|
|
175
193
|
onMouseDown && onMouseDown(event);
|
|
176
194
|
};
|
|
177
|
-
const TextNode = /* @__PURE__ */ jsx(ItemLabel, { role: "menuitem", "data-testid": "ds-list-item", className, onClick: handleClick, onKeyDown: handleKeyDown, onMouseOver: handleMouseOver, onMouseLeave: handleMouseLeave, onFocus: handleFocus, onBlur: handleBlur, onMouseDown: handleMouseDown, ordered, disabled, noHover, hasHighlight: !!highlight, size, featured, style: renderHoverTooltip ? void 0 : style, inTooltip: !!renderHoverTooltip, ref: mergedRef, parent, hasSubMenu: !!(subMenu && subMenu.length), subMenuOpen, prefixElement, prefixVisible: shouldRenderPrefix, description, checked, suffixElement, suffixVisible: shouldRenderSuffix, indentLevel, content: /* @__PURE__ */ jsx(DynamicLabel, { showAlternative: temporaryLabel, content: childrenWithHighlight, alternativeContent: canCopyToClipboard ? copiedLabel : void 0 }), ...rest });
|
|
195
|
+
const TextNode = /* @__PURE__ */ jsx(ItemLabel, { role: "menuitem", "data-testid": "ds-list-item", className, onClick: handleClick, onKeyDown: handleKeyDown, onMouseOver: handleMouseOver, onMouseLeave: handleMouseLeave, onFocus: handleFocus, onBlur: handleBlur, onMouseDown: handleMouseDown, ordered, disabled, noHover, hasHighlight: !!highlight, size, featured, style: renderHoverTooltip ? void 0 : style, inTooltip: !!renderHoverTooltip, ref: mergedRef, parent, hasSubMenu: !!(subMenu && subMenu.length), subMenuOpen, onToggleSubMenu: selectableParent ? handleToggleSubMenu : void 0, prefixElement, prefixVisible: shouldRenderPrefix, description, checked, suffixElement, suffixVisible: shouldRenderSuffix, indentLevel, content: /* @__PURE__ */ jsx(DynamicLabel, { showAlternative: temporaryLabel, content: childrenWithHighlight, alternativeContent: canCopyToClipboard ? copiedLabel : void 0 }), ...rest });
|
|
178
196
|
if (renderHoverTooltip) {
|
|
179
197
|
return /* @__PURE__ */ jsx(HoverTooltip, { popoverProps, renderHoverTooltip, style, children: TextNode });
|
|
180
198
|
}
|
|
@@ -19,6 +19,7 @@ export declare const SuffixWrapper: import('styled-components').StyledComponent<
|
|
|
19
19
|
visible?: boolean;
|
|
20
20
|
disabled?: boolean;
|
|
21
21
|
}, never>;
|
|
22
|
+
export declare const SubMenuToggle: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
22
23
|
export declare const PrefixWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
23
24
|
visible?: boolean;
|
|
24
25
|
disabled?: boolean;
|
|
@@ -9,13 +9,17 @@ const SuffixWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
|
9
9
|
displayName: "Textstyles__SuffixWrapper",
|
|
10
10
|
componentId: "sc-1j4eogh-0"
|
|
11
11
|
})(["display:flex;order:10;justify-content:flex-end;transition:opacity ", ";", ";"], TRANSITION_FN, (props) => props.visible ? visibleElementStyle() : hiddenElementStyle());
|
|
12
|
+
const SubMenuToggle = /* @__PURE__ */ styled.span.withConfig({
|
|
13
|
+
displayName: "Textstyles__SubMenuToggle",
|
|
14
|
+
componentId: "sc-1j4eogh-1"
|
|
15
|
+
})(["display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border-radius:3px;outline:none;&:focus-visible{box-shadow:inset 0 0 0 2px ", ";}"], (props) => props.theme.palette["blue-600"]);
|
|
12
16
|
const PrefixWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
13
17
|
displayName: "Textstyles__PrefixWrapper",
|
|
14
|
-
componentId: "sc-1j4eogh-
|
|
18
|
+
componentId: "sc-1j4eogh-2"
|
|
15
19
|
})(["display:flex;order:1;", ";transition:opacity ", ";margin-top:-7px;margin-bottom:-7px;margin-left:-4px;margin-right:12px;align-items:center;"], (props) => props.visible ? visibleElementStyle() : hiddenElementStyle(), TRANSITION_FN);
|
|
16
20
|
const Highlight = /* @__PURE__ */ styled.span.withConfig({
|
|
17
21
|
displayName: "Textstyles__Highlight",
|
|
18
|
-
componentId: "sc-1j4eogh-
|
|
22
|
+
componentId: "sc-1j4eogh-3"
|
|
19
23
|
})([""]);
|
|
20
24
|
const getPaddingFromIndentLevel = (indentLevel = 0) => {
|
|
21
25
|
return indentLevel * INDENT_WIDTH;
|
|
@@ -26,22 +30,22 @@ const calculatePadding = (indentLevel = 0, withPrefixel = false) => {
|
|
|
26
30
|
const baseStyles = /* @__PURE__ */ css(["display:flex;align-items:center;margin:0;padding-left:", "px;padding-right:12px;font-size:13px;line-height:1.39;font-weight:500;user-select:none;border-radius:3px;transition:background-color 0.2s ease-out,color 0.2s ease-out;min-height:", "px;background:", ";border:none;color:", ";cursor:pointer;opacity:1;"], (props) => calculatePadding(props.indentLevel, !!props.prefixel), (props) => LIST_ITEM_SIZE_MAPPING[props.size || "default"], (props) => props.theme.palette.white, (props) => props.theme.palette["grey-700"]);
|
|
27
31
|
const ArrowRight = /* @__PURE__ */ styled.div.withConfig({
|
|
28
32
|
displayName: "Textstyles__ArrowRight",
|
|
29
|
-
componentId: "sc-1j4eogh-
|
|
33
|
+
componentId: "sc-1j4eogh-4"
|
|
30
34
|
})(["order:3;"]);
|
|
31
35
|
const Inner = /* @__PURE__ */ styled.div.withConfig({
|
|
32
36
|
displayName: "Textstyles__Inner",
|
|
33
|
-
componentId: "sc-1j4eogh-
|
|
37
|
+
componentId: "sc-1j4eogh-5"
|
|
34
38
|
})(["flex-grow:1;min-width:0;&::after{content:'';flex-grow:1;order:4;}"]);
|
|
35
39
|
const selectedStyle = /* @__PURE__ */ css(["background:", ";color:", ";", "{svg{fill:", ";}}"], (props) => props.theme.palette["blue-050"], (props) => props.theme.palette["blue-600"], PrefixWrapper, (props) => props.theme.palette["blue-600"]);
|
|
36
40
|
const highlightStyle = /* @__PURE__ */ css(["font-weight:400;.ds-list-item-highlight{font-weight:600;}"]);
|
|
37
41
|
const orderedStyle = /* @__PURE__ */ css(["&::before{content:none;}"]);
|
|
38
42
|
const Content = /* @__PURE__ */ styled.div.withConfig({
|
|
39
43
|
displayName: "Textstyles__Content",
|
|
40
|
-
componentId: "sc-1j4eogh-
|
|
44
|
+
componentId: "sc-1j4eogh-6"
|
|
41
45
|
})(["white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;order:2;"]);
|
|
42
46
|
const Wrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
43
47
|
displayName: "Textstyles__Wrapper",
|
|
44
|
-
componentId: "sc-1j4eogh-
|
|
48
|
+
componentId: "sc-1j4eogh-7"
|
|
45
49
|
})(["display:flex;min-width:173px;", " ", " ", " ", "{", " ", " ", "{transition:all ", ";opacity:", ";}", " &.ant-menu-item-selected,&.-item-selected{", "}", " ", " .ds-checkbox,.ds-checkbox > .ant-checkbox-wrapper{padding:0;}}"], (props) => props.inTooltip && css(["height:100%;"]), ({
|
|
46
50
|
featured,
|
|
47
51
|
disabled,
|
|
@@ -50,23 +54,23 @@ const Wrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
|
50
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, selectedStyle, (props) => props.highlight && highlightStyle, (props) => !props.ordered && orderedStyle);
|
|
51
55
|
const Divider = /* @__PURE__ */ styled.div.withConfig({
|
|
52
56
|
displayName: "Textstyles__Divider",
|
|
53
|
-
componentId: "sc-1j4eogh-
|
|
57
|
+
componentId: "sc-1j4eogh-8"
|
|
54
58
|
})(["flex-grow:1;"]);
|
|
55
59
|
const DynamicLabelMain = /* @__PURE__ */ styled.div.withConfig({
|
|
56
60
|
displayName: "Textstyles__DynamicLabelMain",
|
|
57
|
-
componentId: "sc-1j4eogh-
|
|
61
|
+
componentId: "sc-1j4eogh-9"
|
|
58
62
|
})([""]);
|
|
59
63
|
const DynamicLabelAlternate = /* @__PURE__ */ styled.div.withConfig({
|
|
60
64
|
displayName: "Textstyles__DynamicLabelAlternate",
|
|
61
|
-
componentId: "sc-1j4eogh-
|
|
65
|
+
componentId: "sc-1j4eogh-10"
|
|
62
66
|
})([""]);
|
|
63
67
|
const DynamicLabelWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
64
68
|
displayName: "Textstyles__DynamicLabelWrapper",
|
|
65
|
-
componentId: "sc-1j4eogh-
|
|
69
|
+
componentId: "sc-1j4eogh-11"
|
|
66
70
|
})(["", ""], (props) => props.showAlternative ? css(["", "{height:0;visibility:hidden;}", "{height:auto;visibility:visible;}"], DynamicLabelMain, DynamicLabelAlternate) : css(["", "{height:auto;visibility:visible;}", "{height:0;visibility:hidden;}"], DynamicLabelMain, DynamicLabelAlternate));
|
|
67
71
|
const Description = /* @__PURE__ */ styled.div.withConfig({
|
|
68
72
|
displayName: "Textstyles__Description",
|
|
69
|
-
componentId: "sc-1j4eogh-
|
|
73
|
+
componentId: "sc-1j4eogh-12"
|
|
70
74
|
})(["text-overflow:ellipsis;overflow:hidden;color:", ";font-weight:normal;line-height:1.39;font-size:13px;width:100%;"], (props) => props.theme.palette["grey-600"]);
|
|
71
75
|
export {
|
|
72
76
|
ArrowRight,
|
|
@@ -79,6 +83,7 @@ export {
|
|
|
79
83
|
Highlight,
|
|
80
84
|
Inner,
|
|
81
85
|
PrefixWrapper,
|
|
86
|
+
SubMenuToggle,
|
|
82
87
|
SuffixWrapper,
|
|
83
88
|
Wrapper
|
|
84
89
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-list-item",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "ListItem UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"types": "dist/index.d.ts",
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@floating-ui/react": "^0.27.16",
|
|
45
|
-
"@synerise/ds-divider": "^1.3.
|
|
46
|
-
"@synerise/ds-icon": "^1.18.
|
|
47
|
-
"@synerise/ds-popover": "^1.6.
|
|
48
|
-
"@synerise/ds-tooltip": "^1.5.
|
|
49
|
-
"@synerise/ds-utils": "^1.
|
|
45
|
+
"@synerise/ds-divider": "^1.3.14",
|
|
46
|
+
"@synerise/ds-icon": "^1.18.3",
|
|
47
|
+
"@synerise/ds-popover": "^1.6.1",
|
|
48
|
+
"@synerise/ds-tooltip": "^1.5.2",
|
|
49
|
+
"@synerise/ds-utils": "^1.10.0",
|
|
50
50
|
"classnames": "^2.5.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"@testing-library/react": "^14.0.0",
|
|
60
60
|
"vitest": "^4.0.0"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "fe3379f50afdce6d8c61a2222ebbf03324107c95"
|
|
63
63
|
}
|