@synerise/ds-list-item 1.2.2 → 1.2.4
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/README.md +2 -0
- package/dist/ListItem.d.ts +2 -1
- package/dist/ListItem.types.d.ts +1 -0
- package/dist/components/Text/ItemLabel.d.ts +2 -1
- package/dist/components/Text/ItemLabel.js +5 -4
- package/dist/components/Text/Text.js +3 -1
- package/dist/components/Text/Text.styles.d.ts +2 -3
- package/dist/components/Text/Text.styles.js +12 -6
- package/package.json +6 -6
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.2.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list-item@1.2.3...@synerise/ds-list-item@1.2.4) (2026-01-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-list-item
|
|
9
|
+
|
|
10
|
+
## [1.2.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list-item@1.2.2...@synerise/ds-list-item@1.2.3) (2025-12-16)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- **list-item:** new prop featured ([6a1f387](https://github.com/Synerise/synerise-design/commit/6a1f387a0be65a21b7e16c94068e0e560ba9127a))
|
|
15
|
+
|
|
6
16
|
## [1.2.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list-item@1.2.1...@synerise/ds-list-item@1.2.2) (2025-12-15)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @synerise/ds-list-item
|
package/README.md
CHANGED
|
@@ -59,6 +59,8 @@ import ListItem from '@synerise/ds-list-item'
|
|
|
59
59
|
| title | title attribute (a11y prop) | `string` | - |
|
|
60
60
|
| tooltipProps | Tooltip props for "copied" tooltip. See @synerise/ds-tooltip | `TooltipProps` | - |
|
|
61
61
|
| type | Type of the list item | `"default"` | `"danger"` | `"divider"` | `"select"` | - |
|
|
62
|
+
| featured | featured item will have a blue label and blue prefixel / suffixel icons | `boolean` | - |
|
|
63
|
+
|
|
62
64
|
|
|
63
65
|
### AddonRenderer
|
|
64
66
|
|
package/dist/ListItem.d.ts
CHANGED
|
@@ -35,5 +35,6 @@ declare const ListItem: React.ForwardRefExoticComponent<import("./ListItem.types
|
|
|
35
35
|
type?: import("./ListItem.types").ItemType;
|
|
36
36
|
subMenu?: ListItemProps[];
|
|
37
37
|
indentLevel?: number;
|
|
38
|
-
|
|
38
|
+
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" | "hoverTooltipProps" | "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>>;
|
|
39
40
|
export default ListItem;
|
package/dist/ListItem.types.d.ts
CHANGED
|
@@ -87,6 +87,7 @@ export type BaseListItemProps = ListItemDividerProps & {
|
|
|
87
87
|
type?: ItemType;
|
|
88
88
|
subMenu?: ListItemProps[];
|
|
89
89
|
indentLevel?: number;
|
|
90
|
+
featured?: boolean;
|
|
90
91
|
};
|
|
91
92
|
export type ListItemProps = WithHTMLAttributes<HTMLDivElement, BaseListItemProps>;
|
|
92
93
|
export type ListItemDividerProps = {
|
|
@@ -25,4 +25,5 @@ export declare const ItemLabel: React.ForwardRefExoticComponent<{
|
|
|
25
25
|
description?: ReactNode;
|
|
26
26
|
content?: ReactNode;
|
|
27
27
|
indentLevel?: number;
|
|
28
|
-
|
|
28
|
+
featured?: boolean;
|
|
29
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "content" | "onFocus" | "onBlur" | "onKeyDown" | "onClick" | "onMouseDown" | "onMouseLeave" | "onMouseOver" | "checked" | "description" | "disabled" | "noHover" | "ordered" | "parent" | "size" | "indentLevel" | "featured" | "hasSubMenu" | "subMenuOpen" | "hasHighlight" | "inTooltip" | "prefixVisible" | "suffixVisible" | "prefixElement" | "suffixElement"> & import("@synerise/ds-utils").DataAttributes & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["onClick", "onFocus", "onBlur", "onKeyDown", "onMouseOver", "onMouseLeave", "onMouseDown", "checked", "noHover", "disabled", "ordered", "className", "hasHighlight", "prefixElement", "prefixVisible", "suffixElement", "suffixVisible", "hasSubMenu", "subMenuOpen", "content", "inTooltip", "parent", "description", "size", "indentLevel"];
|
|
1
|
+
var _excluded = ["onClick", "onFocus", "onBlur", "onKeyDown", "onMouseOver", "onMouseLeave", "onMouseDown", "checked", "noHover", "disabled", "ordered", "className", "hasHighlight", "prefixElement", "prefixVisible", "suffixElement", "suffixVisible", "hasSubMenu", "subMenuOpen", "content", "inTooltip", "parent", "description", "size", "indentLevel", "featured"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import classnames from 'classnames';
|
|
@@ -32,6 +32,7 @@ export var ItemLabel = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
32
32
|
description = _ref.description,
|
|
33
33
|
size = _ref.size,
|
|
34
34
|
indentLevel = _ref.indentLevel,
|
|
35
|
+
featured = _ref.featured,
|
|
35
36
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
36
37
|
var theme = useTheme();
|
|
37
38
|
return /*#__PURE__*/React.createElement(S.Wrapper, _extends({
|
|
@@ -57,14 +58,14 @@ export var ItemLabel = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
57
58
|
,
|
|
58
59
|
inTooltip: inTooltip,
|
|
59
60
|
ref: ref,
|
|
60
|
-
indentLevel: indentLevel
|
|
61
|
+
indentLevel: indentLevel,
|
|
62
|
+
featured: featured
|
|
61
63
|
}, rest), /*#__PURE__*/React.createElement(S.Inner, null, prefixElement && /*#__PURE__*/React.createElement(S.PrefixWrapper, {
|
|
62
64
|
"data-testid": "list-item-prefix",
|
|
63
65
|
visible: prefixVisible,
|
|
64
66
|
disabled: disabled
|
|
65
67
|
}, prefixElement), /*#__PURE__*/React.createElement(S.Content, {
|
|
66
|
-
className: "ds-list-item-content"
|
|
67
|
-
highlight: hasHighlight
|
|
68
|
+
className: "ds-list-item-content"
|
|
68
69
|
}, content, description && size === 'large' && /*#__PURE__*/React.createElement(S.Description, null, description)), parent && /*#__PURE__*/React.createElement(S.ArrowRight, null, /*#__PURE__*/React.createElement(Icon, {
|
|
69
70
|
component: /*#__PURE__*/React.createElement(AngleRightS, null),
|
|
70
71
|
color: theme.palette['grey-600']
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["checked", "className", "children", "itemKey", "noHover", "size", "prefixel", "suffixel", "copyable", "copyHint", "copyValue", "copyTooltip", "timeToHideTooltip", "tooltipProps", "disabled", "description", "parent", "ordered", "indentLevel", "onClick", "onMouseOver", "onMouseDown", "onMouseLeave", "onBlur", "onFocus", "onItemHover", "onKeyDown", "prefixVisibilityTrigger", "suffixVisibilityTrigger", "highlight", "style", "hoverTooltipProps", "renderHoverTooltip", "subMenu", "ItemComponent"];
|
|
1
|
+
var _excluded = ["checked", "className", "children", "itemKey", "noHover", "size", "prefixel", "suffixel", "copyable", "copyHint", "copyValue", "copyTooltip", "timeToHideTooltip", "tooltipProps", "disabled", "description", "parent", "ordered", "indentLevel", "onClick", "onMouseOver", "onMouseDown", "onMouseLeave", "onBlur", "onFocus", "onItemHover", "onKeyDown", "prefixVisibilityTrigger", "suffixVisibilityTrigger", "highlight", "style", "hoverTooltipProps", "renderHoverTooltip", "subMenu", "featured", "ItemComponent"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import copy from 'copy-to-clipboard';
|
|
@@ -46,6 +46,7 @@ var Text = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
|
46
46
|
hoverTooltipProps = props.hoverTooltipProps,
|
|
47
47
|
renderHoverTooltip = props.renderHoverTooltip,
|
|
48
48
|
subMenu = props.subMenu,
|
|
49
|
+
featured = props.featured,
|
|
49
50
|
ItemComponent = props.ItemComponent,
|
|
50
51
|
rest = _objectWithoutPropertiesLoose(props, _excluded);
|
|
51
52
|
var _useListItem = useListItem(),
|
|
@@ -189,6 +190,7 @@ var Text = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
|
189
190
|
noHover: noHover,
|
|
190
191
|
hasHighlight: !!highlight,
|
|
191
192
|
size: size,
|
|
193
|
+
featured: featured,
|
|
192
194
|
style: renderHoverTooltip ? undefined : style,
|
|
193
195
|
inTooltip: !!renderHoverTooltip,
|
|
194
196
|
ref: mergedRef,
|
|
@@ -13,6 +13,7 @@ type StyledListItemProps = {
|
|
|
13
13
|
noHover?: boolean;
|
|
14
14
|
inTooltip?: boolean;
|
|
15
15
|
size?: ItemSize;
|
|
16
|
+
featured?: boolean;
|
|
16
17
|
};
|
|
17
18
|
export declare const SuffixWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
18
19
|
visible?: boolean;
|
|
@@ -25,10 +26,8 @@ export declare const PrefixWrapper: import("styled-components").StyledComponent<
|
|
|
25
26
|
export declare const Highlight: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
26
27
|
export declare const ArrowRight: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
27
28
|
export declare const Inner: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
29
|
+
export declare const Content: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
28
30
|
export declare const Wrapper: import("styled-components").StyledComponent<"div", any, StyledListItemProps, never>;
|
|
29
|
-
export declare const Content: import("styled-components").StyledComponent<"div", any, {
|
|
30
|
-
highlight: boolean;
|
|
31
|
-
}, never>;
|
|
32
31
|
export declare const Divider: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
33
32
|
export declare const DynamicLabelMain: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
34
33
|
export declare const DynamicLabelAlternate: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -66,11 +66,21 @@ var selectedStyle = css(["background:", ";color:", ";", "{svg{fill:", ";}}"], fu
|
|
|
66
66
|
});
|
|
67
67
|
var highlightStyle = css(["font-weight:400;.ds-list-item-highlight{font-weight:600;}"]);
|
|
68
68
|
var orderedStyle = css(["&::before{content:none;}"]);
|
|
69
|
+
export var Content = styled.div.withConfig({
|
|
70
|
+
displayName: "Textstyles__Content",
|
|
71
|
+
componentId: "sc-1j4eogh-5"
|
|
72
|
+
})(["white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;order:2;"]);
|
|
69
73
|
export var Wrapper = styled.div.withConfig({
|
|
70
74
|
displayName: "Textstyles__Wrapper",
|
|
71
|
-
componentId: "sc-1j4eogh-
|
|
72
|
-
})(["display:flex;min-width:173px;", " ", " ", "{", " ", " ", "{transition:all ", ";opacity:", ";}", " &.ant-menu-item-selected,&.-item-selected{", "}", " ", " .ds-checkbox,.ds-checkbox > .ant-checkbox-wrapper{padding:0;}}"], function (props) {
|
|
75
|
+
componentId: "sc-1j4eogh-6"
|
|
76
|
+
})(["display:flex;min-width:173px;", " ", " ", " ", "{", " ", " ", "{transition:all ", ";opacity:", ";}", " &.ant-menu-item-selected,&.-item-selected{", "}", " ", " .ds-checkbox,.ds-checkbox > .ant-checkbox-wrapper{padding:0;}}"], function (props) {
|
|
73
77
|
return props.inTooltip && css(["height:100%;"]);
|
|
78
|
+
}, function (_ref) {
|
|
79
|
+
var featured = _ref.featured,
|
|
80
|
+
disabled = _ref.disabled,
|
|
81
|
+
selected = _ref.selected,
|
|
82
|
+
theme = _ref.theme;
|
|
83
|
+
return 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']));
|
|
74
84
|
}, function (props) {
|
|
75
85
|
return 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']));
|
|
76
86
|
}, Inner, function (props) {
|
|
@@ -84,10 +94,6 @@ export var Wrapper = styled.div.withConfig({
|
|
|
84
94
|
}, function (props) {
|
|
85
95
|
return !props.ordered && orderedStyle;
|
|
86
96
|
});
|
|
87
|
-
export var Content = styled.div.withConfig({
|
|
88
|
-
displayName: "Textstyles__Content",
|
|
89
|
-
componentId: "sc-1j4eogh-6"
|
|
90
|
-
})(["white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;order:2;"]);
|
|
91
97
|
export var Divider = styled.div.withConfig({
|
|
92
98
|
displayName: "Textstyles__Divider",
|
|
93
99
|
componentId: "sc-1j4eogh-7"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-list-item",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "ListItem UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@floating-ui/react": "^0.27.16",
|
|
39
|
-
"@synerise/ds-divider": "^1.2.
|
|
40
|
-
"@synerise/ds-icon": "^1.9.
|
|
41
|
-
"@synerise/ds-tooltip": "^1.3.
|
|
42
|
-
"@synerise/ds-utils": "^1.5.
|
|
39
|
+
"@synerise/ds-divider": "^1.2.4",
|
|
40
|
+
"@synerise/ds-icon": "^1.9.2",
|
|
41
|
+
"@synerise/ds-tooltip": "^1.3.3",
|
|
42
|
+
"@synerise/ds-utils": "^1.5.2",
|
|
43
43
|
"classnames": "^2.5.1",
|
|
44
44
|
"rc-trigger": "^5.3.4",
|
|
45
45
|
"uuid": "^8.3.2"
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"react": ">=16.9.0 <= 18.3.1",
|
|
52
52
|
"styled-components": "^5.3.3"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "f38e4b2dca1d43c39af0b189c93808de62c11e9b"
|
|
55
55
|
}
|