@synerise/ds-menu 0.11.4 → 0.12.1
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,44 @@
|
|
|
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.12.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-menu@0.12.0...@synerise/ds-menu@0.12.1) (2022-01-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-menu
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [0.12.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-menu@0.11.6...@synerise/ds-menu@0.12.0) (2022-01-13)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @synerise/ds-menu
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.11.6](https://github.com/Synerise/synerise-design/compare/@synerise/ds-menu@0.11.5...@synerise/ds-menu@0.11.6) (2022-01-04)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **menu:** fix typing of menu items ([4ccd48c](https://github.com/Synerise/synerise-design/commit/4ccd48c490e0c16beed209bb36122144555bf899))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [0.11.5](https://github.com/Synerise/synerise-design/compare/@synerise/ds-menu@0.11.4...@synerise/ds-menu@0.11.5) (2021-12-29)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* **table:** fixes sorting ([8042c70](https://github.com/Synerise/synerise-design/commit/8042c70e131be15ad8cb30e771d0c5b695647b8d))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
## [0.11.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-menu@0.11.3...@synerise/ds-menu@0.11.4) (2021-12-22)
|
|
7
45
|
|
|
8
46
|
**Note:** Version bump only for package @synerise/ds-menu
|
|
@@ -8,6 +8,10 @@ export declare enum ItemType {
|
|
|
8
8
|
DANGER = "danger",
|
|
9
9
|
DIVIDER = "divider"
|
|
10
10
|
}
|
|
11
|
+
export declare enum ItemSize {
|
|
12
|
+
DEFAULT = "default",
|
|
13
|
+
LARGE = "large"
|
|
14
|
+
}
|
|
11
15
|
export interface MenuItemProps extends Omit<MenuProps, 'dataSource' | 'footer'> {
|
|
12
16
|
key?: React.ReactText;
|
|
13
17
|
text?: string | React.ReactNode;
|
|
@@ -5,4 +5,11 @@ export var ItemType;
|
|
|
5
5
|
ItemType["SELECT"] = "select";
|
|
6
6
|
ItemType["DANGER"] = "danger";
|
|
7
7
|
ItemType["DIVIDER"] = "divider";
|
|
8
|
-
})(ItemType || (ItemType = {}));
|
|
8
|
+
})(ItemType || (ItemType = {}));
|
|
9
|
+
|
|
10
|
+
export var ItemSize;
|
|
11
|
+
|
|
12
|
+
(function (ItemSize) {
|
|
13
|
+
ItemSize["DEFAULT"] = "default";
|
|
14
|
+
ItemSize["LARGE"] = "large";
|
|
15
|
+
})(ItemSize || (ItemSize = {}));
|
|
@@ -1,13 +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
|
-
|
|
5
|
-
|
|
6
|
-
(function (ItemSize) {
|
|
7
|
-
ItemSize["DEFAULT"] = "default";
|
|
8
|
-
ItemSize["LARGE"] = "large";
|
|
9
|
-
})(ItemSize || (ItemSize = {}));
|
|
10
|
-
|
|
4
|
+
import { ItemSize } from "../MenuItem.types";
|
|
11
5
|
var INDENT_LEVEL_STEP = 16;
|
|
12
6
|
var TRANSITION_FN = '0.2s ease-out';
|
|
13
7
|
|
|
@@ -62,7 +56,7 @@ var applySizeStyles = function applySizeStyles(props) {
|
|
|
62
56
|
export var Wrapper = styled(MenuItem).withConfig({
|
|
63
57
|
displayName: "Textstyles__Wrapper",
|
|
64
58
|
componentId: "dgb761-3"
|
|
65
|
-
})(["&&&{", " ", " ", ";color:", ";opacity:", ";cursor:", ";padding-right:12px;font-weight:500;border-radius:3px;display:flex;align-items:center;margin:0;
|
|
59
|
+
})(["&&&{", " ", " ", ";color:", ";opacity:", ";cursor:", ";padding-right:12px;font-weight:500;border-radius:3px;display:flex;align-items:center;margin:0;transition:background-color ", ";padding-left:", "px;", "{padding-left:", ";}", " ", " &.ant-menu-item-only-child{margin-bottom:0px;}&.ant-menu-item-selected{background:", ";color:", ";.ds-menu-prefix > .ds-icon > svg{fill:", ";}&::before{color:", ";}&:focus,&:active{background:", ";&::before{color:", ";}}&::after{content:none;}}&.ant-menu-item-disabled,&.ant-menu-submenu-disabled{color:", " !important;}& .ds-menu-prefix > * > .ant-avatar::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:", ";opacity:0.05;border-radius:inherit;}& .ds-checkbox{padding:0px;}& .ds-checkbox > .ant-checkbox-wrapper{padding:0px;}& .ds-tag{margin:0;}&:focus:not(:active){box-shadow:", ";color:", ";background:", ";", " > .ds-icon > svg{fill:", ";}}", " &:active{&&{background:", ";}}&{.ds-icon{height:18px;display:flex;align-items:center;}}", " > .ds-icon > svg{", "}&:focus{color:", ";", "{opacity:1;svg{fill:", ";}}}&:hover{& .ds-menu-prefix > * > .ant-avatar::before,.ds-menu-prefix > .ant-badge::before,.ds-menu-prefix > .ant-avatar::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;opacity:0.3;border-radius:inherit;box-sizing:border-box;}& .ds-menu-prefix > * > .ant-avatar::after,.ds-menu-prefix > .ant-badge::after,.ds-menu-prefix > .ant-avatar::after{opacity:0.1;}", "{opacity:1;svg{fill:", ";}}", "}}"], function (props) {
|
|
66
60
|
return !props.description && props.size === ItemSize.DEFAULT && "max-height: 32px;";
|
|
67
61
|
}, function (props) {
|
|
68
62
|
return props.size === ItemSize.LARGE && "min-height: 50px;";
|
package/dist/Menu.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import '@synerise/ds-core/dist/js/style';
|
|
3
3
|
import './style/index.less';
|
|
4
|
+
import * as S from './Menu.styles';
|
|
4
5
|
import { AntdMenuProps } from './Menu.types';
|
|
5
6
|
import MenuItem from './Elements/Item/MenuItem';
|
|
6
7
|
import Breadcrumb from './Elements/Breadcrumb/Breadcrumb';
|
|
@@ -9,7 +10,7 @@ declare class Menu extends React.Component<AntdMenuProps> {
|
|
|
9
10
|
static Item: typeof MenuItem;
|
|
10
11
|
static Breadcrumb: typeof Breadcrumb;
|
|
11
12
|
static Header: typeof Header;
|
|
12
|
-
static ItemGroup: typeof
|
|
13
|
+
static ItemGroup: typeof S.AntdMenu.ItemGroup;
|
|
13
14
|
static SubMenu: typeof import("antd/lib/menu/SubMenu").default;
|
|
14
15
|
static Divider: import("styled-components").StyledComponent<"div", any, import("./Menu.types").MenuDividerProps, never>;
|
|
15
16
|
render(): React.ReactNode;
|
package/dist/Menu.js
CHANGED
|
@@ -10,8 +10,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
10
10
|
|
|
11
11
|
import * as React from 'react';
|
|
12
12
|
import '@synerise/ds-core/dist/js/style';
|
|
13
|
-
import "./style/index.css";
|
|
14
13
|
import Tooltip from '@synerise/ds-tooltip';
|
|
14
|
+
import "./style/index.css";
|
|
15
15
|
import * as S from './Menu.styles';
|
|
16
16
|
import SubMenuItem from './Elements/SubMenu/SubMenu';
|
|
17
17
|
import MenuItem from './Elements/Item/MenuItem';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-menu",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "Menu UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
],
|
|
33
33
|
"types": "dist/index.d.ts",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@synerise/ds-icon": "^0.
|
|
36
|
-
"@synerise/ds-tooltip": "^0.11.
|
|
35
|
+
"@synerise/ds-icon": "^0.47.0",
|
|
36
|
+
"@synerise/ds-tooltip": "^0.11.4",
|
|
37
37
|
"@synerise/ds-typography": "^0.12.2",
|
|
38
38
|
"classnames": "^2.2.6"
|
|
39
39
|
},
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"@synerise/ds-core": "*",
|
|
42
42
|
"react": ">=16.9.0 < 17.0.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "56c08eca6e2a1e41b8a39e28a9ec657ac1bdec83"
|
|
45
45
|
}
|