@synerise/ds-menu 0.14.0 → 0.15.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
CHANGED
|
@@ -3,6 +3,42 @@
|
|
|
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
|
+
## [0.15.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-menu@0.15.3...@synerise/ds-menu@0.15.4) (2022-08-04)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-menu
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.15.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-menu@0.15.0...@synerise/ds-menu@0.15.3) (2022-08-04)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @synerise/ds-menu
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.15.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-menu@0.15.0...@synerise/ds-menu@0.15.2) (2022-08-04)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @synerise/ds-menu
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [0.15.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-menu@0.14.0...@synerise/ds-menu@0.15.0) (2022-06-29)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* **menu:** adds data-name attribute for the UI tests ([7722c84](https://github.com/Synerise/synerise-design/commit/7722c8461f4852ad44602f92269f3c54704c59bf))
|
|
36
|
+
* **menu:** enables hover tooltip on disabled menu-item ([1d36a08](https://github.com/Synerise/synerise-design/commit/1d36a08950b5f08ad9cfd1ea54bb7823a2e47ad2))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
6
42
|
# [0.14.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-menu@0.13.2...@synerise/ds-menu@0.14.0) (2022-06-15)
|
|
7
43
|
|
|
8
44
|
|
|
@@ -4,6 +4,7 @@ import { BasicItemProps } from './Text.types';
|
|
|
4
4
|
export declare type HoverTooltipProps = React.PropsWithChildren<{
|
|
5
5
|
hoverTooltipProps?: BasicItemProps['hoverTooltipProps'];
|
|
6
6
|
renderHoverTooltip?: () => JSX.Element;
|
|
7
|
+
style?: React.CSSProperties;
|
|
7
8
|
}>;
|
|
8
9
|
declare const Text: React.FC<BasicItemProps>;
|
|
9
10
|
export default Text;
|
|
@@ -34,7 +34,8 @@ function WithHoverTooltip(_ref) {
|
|
|
34
34
|
|
|
35
35
|
var hoverTooltipProps = _ref.hoverTooltipProps,
|
|
36
36
|
renderHoverTooltip = _ref.renderHoverTooltip,
|
|
37
|
-
children = _ref.children
|
|
37
|
+
children = _ref.children,
|
|
38
|
+
style = _ref.style;
|
|
38
39
|
var dsTheme = useTheme();
|
|
39
40
|
var zIndex = parseInt(dsTheme.variables['zindex-tooltip'], 10);
|
|
40
41
|
var cancelBubblingEvent = React.useCallback(function () {
|
|
@@ -63,7 +64,9 @@ function WithHoverTooltip(_ref) {
|
|
|
63
64
|
zIndex: zIndex
|
|
64
65
|
},
|
|
65
66
|
zIndex: zIndex
|
|
66
|
-
}, hoverTooltipProps),
|
|
67
|
+
}, hoverTooltipProps), /*#__PURE__*/React.createElement("div", {
|
|
68
|
+
style: style
|
|
69
|
+
}, children)))
|
|
67
70
|
);
|
|
68
71
|
}
|
|
69
72
|
|
|
@@ -176,13 +179,14 @@ var Text = function Text(_ref2) {
|
|
|
176
179
|
disabled: disabled,
|
|
177
180
|
tabIndex: disabled ? -1 : 0,
|
|
178
181
|
description: description,
|
|
179
|
-
style: style,
|
|
182
|
+
style: renderHoverTooltip ? undefined : style,
|
|
180
183
|
indentLevel: Number(indentLevel),
|
|
181
184
|
ordered: ordered,
|
|
182
185
|
size: size,
|
|
183
186
|
onClick: onClick,
|
|
184
187
|
onItemHover: onItemHover
|
|
185
188
|
}, rest, {
|
|
189
|
+
"data-name": typeof children === 'string' ? children : undefined,
|
|
186
190
|
className: className
|
|
187
191
|
}), /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
188
192
|
type: "default",
|
|
@@ -214,7 +218,8 @@ var Text = function Text(_ref2) {
|
|
|
214
218
|
if (renderHoverTooltip) {
|
|
215
219
|
return /*#__PURE__*/React.createElement(WithHoverTooltip, {
|
|
216
220
|
hoverTooltipProps: hoverTooltipProps,
|
|
217
|
-
renderHoverTooltip: renderHoverTooltip
|
|
221
|
+
renderHoverTooltip: renderHoverTooltip,
|
|
222
|
+
style: style
|
|
218
223
|
}, element);
|
|
219
224
|
}
|
|
220
225
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import MenuItem from 'antd/lib/menu/MenuItem';
|
|
3
3
|
import { IconContainer } from '@synerise/ds-icon';
|
|
4
|
-
import { ItemSize } from
|
|
4
|
+
import { ItemSize } from '../MenuItem.types';
|
|
5
5
|
var INDENT_LEVEL_STEP = 16;
|
|
6
6
|
var TRANSITION_FN = '0.2s ease-out';
|
|
7
7
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-menu",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.4",
|
|
4
4
|
"description": "Menu UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
],
|
|
33
33
|
"types": "dist/index.d.ts",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@synerise/ds-icon": "^0.49.
|
|
36
|
-
"@synerise/ds-tooltip": "^0.11.
|
|
37
|
-
"@synerise/ds-typography": "^0.12.
|
|
35
|
+
"@synerise/ds-icon": "^0.49.3",
|
|
36
|
+
"@synerise/ds-tooltip": "^0.11.13",
|
|
37
|
+
"@synerise/ds-typography": "^0.12.5",
|
|
38
38
|
"classnames": "^2.2.6"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@synerise/ds-core": "*",
|
|
42
42
|
"react": ">=16.9.0 < 17.0.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "28486eab4b37b485cbe2a383e3ae9b8e9d789862"
|
|
45
45
|
}
|