@synerise/ds-list-item 1.0.0 → 1.0.2
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 +16 -0
- package/dist/ListItem.types.d.ts +1 -2
- package/dist/components/HoverTooltip/HoverTooltip.js +3 -1
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/Text/Text.js +4 -2
- package/dist/components/Text/Text.styles.d.ts +1 -0
- package/dist/components/Text/Text.styles.js +6 -2
- package/dist/index.d.ts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.0.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list-item@1.0.1...@synerise/ds-list-item@1.0.2) (2025-03-26)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-list-item
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.0.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list-item@1.0.0...@synerise/ds-list-item@1.0.1) (2025-03-18)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @synerise/ds-list-item
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [0.7.7](https://github.com/Synerise/synerise-design/compare/@synerise/ds-list-item@0.7.6...@synerise/ds-list-item@0.7.7) (2025-03-10)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @synerise/ds-list-item
|
package/dist/ListItem.types.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export type ItemData<EventType> = {
|
|
|
20
20
|
item: Partial<BasicItemProps>;
|
|
21
21
|
domEvent: EventType;
|
|
22
22
|
};
|
|
23
|
-
type ListItemEventHandler<EventType> = (item: ItemData<EventType>) => void;
|
|
23
|
+
export type ListItemEventHandler<EventType> = (item: ItemData<EventType>) => void;
|
|
24
24
|
export type TriggerHandle = Component<TriggerProps> & {
|
|
25
25
|
getPopupDomNode: () => HTMLElement;
|
|
26
26
|
};
|
|
@@ -61,4 +61,3 @@ export type ListItemProps = WithHTMLAttributes<HTMLDivElement, {
|
|
|
61
61
|
type?: ItemType;
|
|
62
62
|
}>;
|
|
63
63
|
export type BasicItemProps = Omit<ListItemProps, 'type' | 'text' | 'level' | 'higher'>;
|
|
64
|
-
export {};
|
|
@@ -7,6 +7,7 @@ import { renderWithHighlight } from '@synerise/ds-utils';
|
|
|
7
7
|
import Tooltip from '@synerise/ds-tooltip';
|
|
8
8
|
import Icon, { AngleRightS, CheckS } from '@synerise/ds-icon';
|
|
9
9
|
import { theme } from '@synerise/ds-core';
|
|
10
|
+
import { itemSizes } from '../../ListItem.types';
|
|
10
11
|
import * as S from './Text.styles';
|
|
11
12
|
import { HoverTooltip } from '../index';
|
|
12
13
|
import { renderAddon, removeHandlerProps } from './utils';
|
|
@@ -118,7 +119,8 @@ var Text = function Text(props) {
|
|
|
118
119
|
noHover: noHover,
|
|
119
120
|
highlight: !!highlight,
|
|
120
121
|
size: size,
|
|
121
|
-
style: renderHoverTooltip ? undefined : style
|
|
122
|
+
style: renderHoverTooltip ? undefined : style,
|
|
123
|
+
inTooltip: !!renderHoverTooltip
|
|
122
124
|
}, rest), /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
123
125
|
type: "default",
|
|
124
126
|
trigger: "click",
|
|
@@ -131,7 +133,7 @@ var Text = function Text(props) {
|
|
|
131
133
|
}, prefixElement), /*#__PURE__*/React.createElement(S.Content, {
|
|
132
134
|
className: "ds-list-item-content",
|
|
133
135
|
highlight: !!highlight
|
|
134
|
-
}, canCopyToClipboard && hovered && copyHint ? copyHint : childrenWithHighlight,
|
|
136
|
+
}, canCopyToClipboard && hovered && copyHint ? copyHint : childrenWithHighlight, description && size === itemSizes.LARGE && /*#__PURE__*/React.createElement(S.Description, null, description)), parent && /*#__PURE__*/React.createElement(S.ArrowRight, null, /*#__PURE__*/React.createElement(Icon, {
|
|
135
137
|
component: /*#__PURE__*/React.createElement(AngleRightS, null),
|
|
136
138
|
color: theme.palette['grey-600']
|
|
137
139
|
})), (!!suffixElement || !!checked) && /*#__PURE__*/React.createElement(S.SuffixWrapper, {
|
|
@@ -40,17 +40,21 @@ export var Inner = styled.div.withConfig({
|
|
|
40
40
|
displayName: "Textstyles__Inner",
|
|
41
41
|
componentId: "sc-1j4eogh-4"
|
|
42
42
|
})(["flex-grow:1;min-width:0;&::after{content:'';flex-grow:1;order:4;}"]);
|
|
43
|
-
var selectedStyle = css(["background:", ";color:", ";"], function (props) {
|
|
43
|
+
var selectedStyle = css(["background:", ";color:", ";", "{svg{fill:", ";}}"], function (props) {
|
|
44
44
|
return props.theme.palette['blue-050'];
|
|
45
45
|
}, function (props) {
|
|
46
46
|
return props.theme.palette['blue-600'];
|
|
47
|
+
}, PrefixWrapper, function (props) {
|
|
48
|
+
return props.theme.palette['blue-600'];
|
|
47
49
|
});
|
|
48
50
|
var highlightStyle = css(["font-weight:400;.ds-list-item-highlight{font-weight:600;}"]);
|
|
49
51
|
var orderedStyle = css(["&::before{content:none;}"]);
|
|
50
52
|
export var Wrapper = styled.div.withConfig({
|
|
51
53
|
displayName: "Textstyles__Wrapper",
|
|
52
54
|
componentId: "sc-1j4eogh-5"
|
|
53
|
-
})(["display:flex;min-width:175px;", " ", "{", " ", " ", "{transition:all ", ";opacity:", ";}", " &.ant-menu-item-selected,&.-item-selected{", "}", " ", " .ds-checkbox,.ds-checkbox > .ant-checkbox-wrapper{padding:0;}}"], function (props) {
|
|
55
|
+
})(["display:flex;min-width:175px;", " ", " ", "{", " ", " ", "{transition:all ", ";opacity:", ";}", " &.ant-menu-item-selected,&.-item-selected{", "}", " ", " .ds-checkbox,.ds-checkbox > .ant-checkbox-wrapper{padding:0;}}"], function (props) {
|
|
56
|
+
return props.inTooltip && css(["height:100%;"]);
|
|
57
|
+
}, function (props) {
|
|
54
58
|
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:not(:active){", "{box-shadow:inset 0 0 0 2px ", ";}}&:focus: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']));
|
|
55
59
|
}, Inner, function (props) {
|
|
56
60
|
return 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']);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default } from './ListItem';
|
|
2
2
|
export { HoverTooltip, GroupItem } from './components';
|
|
3
3
|
export { itemSizes, itemTypes } from './ListItem.types';
|
|
4
|
-
export type { ListItemProps, BasicItemProps, ItemSize, ItemType, ItemData } from './ListItem.types';
|
|
4
|
+
export type { ListItemProps, BasicItemProps, ItemSize, ItemType, ItemData, ListItemEventHandler, } from './ListItem.types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-list-item",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "ListItem UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-icon": "^1.
|
|
38
|
-
"@synerise/ds-tooltip": "^1.
|
|
39
|
-
"@synerise/ds-utils": "^1.0.
|
|
37
|
+
"@synerise/ds-icon": "^1.1.0",
|
|
38
|
+
"@synerise/ds-tooltip": "^1.1.1",
|
|
39
|
+
"@synerise/ds-utils": "^1.0.1",
|
|
40
40
|
"copy-to-clipboard": "^3.3.1",
|
|
41
41
|
"rc-trigger": "^5.3.4",
|
|
42
42
|
"uuid": "^8.3.2"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"react": ">=16.9.0 <= 18.3.1",
|
|
48
48
|
"styled-components": "^5.3.3"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "47960dcd849dc47c85bd134bcfeb90a5505656a7"
|
|
51
51
|
}
|