@synerise/ds-menu 1.0.23 → 1.0.26
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 +27 -0
- package/dist/Elements/Divider/Divider.d.ts +4 -0
- package/dist/Elements/Divider/Divider.js +8 -0
- package/dist/Elements/Divider/Divider.styles.d.ts +2 -0
- package/dist/Elements/Divider/Divider.styles.js +10 -0
- package/dist/Elements/Item/MenuItem.js +2 -2
- package/dist/Menu.d.ts +2 -3
- package/dist/Menu.js +2 -1
- package/dist/Menu.styles.d.ts +0 -3
- package/dist/Menu.styles.js +2 -14
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
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.26](https://github.com/Synerise/synerise-design/compare/@synerise/ds-menu@1.0.25...@synerise/ds-menu@1.0.26) (2025-09-30)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-menu
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.0.25](https://github.com/Synerise/synerise-design/compare/@synerise/ds-menu@1.0.24...@synerise/ds-menu@1.0.25) (2025-09-30)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **divider:** fix style ([7a1db45](https://github.com/Synerise/synerise-design/commit/7a1db453d85eb52f887486f74575de17bb3f8ee0))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [1.0.24](https://github.com/Synerise/synerise-design/compare/@synerise/ds-menu@1.0.23...@synerise/ds-menu@1.0.24) (2025-09-25)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @synerise/ds-menu
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [1.0.23](https://github.com/Synerise/synerise-design/compare/@synerise/ds-menu@1.0.22...@synerise/ds-menu@1.0.23) (2025-09-19)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @synerise/ds-menu
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import * as S from './Divider.styles';
|
|
4
|
+
export var Divider = function Divider(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(S.MenuDivider, _extends({
|
|
6
|
+
dashed: true
|
|
7
|
+
}, props));
|
|
8
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import DSDivider from '@synerise/ds-divider';
|
|
3
|
+
export var MenuDivider = styled(DSDivider).withConfig({
|
|
4
|
+
displayName: "Dividerstyles__MenuDivider",
|
|
5
|
+
componentId: "sc-1gajr0l-0"
|
|
6
|
+
})(["height:1px;width:auto;margin:", " ", ";"], function (props) {
|
|
7
|
+
return props.higher ? '16px' : '8px';
|
|
8
|
+
}, function (props) {
|
|
9
|
+
return props != null && props.level && (props == null ? void 0 : props.level) > 1 ? '35px' : '12px';
|
|
10
|
+
});
|
|
@@ -3,8 +3,8 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
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 React from 'react';
|
|
5
5
|
import '@synerise/ds-core/dist/js/style';
|
|
6
|
-
import { MenuDivider } from '../../Menu.styles';
|
|
7
6
|
import { ItemType } from '../../Menu.types';
|
|
7
|
+
import { Divider } from '../Divider/Divider';
|
|
8
8
|
import SubMenuItem from '../SubMenu/SubMenu';
|
|
9
9
|
import Danger from './Danger/Danger';
|
|
10
10
|
import Select from './Select/Select';
|
|
@@ -75,7 +75,7 @@ var _MenuItem = function MenuItem(_ref) {
|
|
|
75
75
|
}
|
|
76
76
|
}, rest), text || children);
|
|
77
77
|
case ItemType.DIVIDER:
|
|
78
|
-
return /*#__PURE__*/React.createElement(
|
|
78
|
+
return /*#__PURE__*/React.createElement(Divider, {
|
|
79
79
|
level: rest.level
|
|
80
80
|
});
|
|
81
81
|
default:
|
package/dist/Menu.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Component, type ReactNode } from 'react';
|
|
2
2
|
import '@synerise/ds-core/dist/js/style';
|
|
3
3
|
import Breadcrumb from './Elements/Breadcrumb/Breadcrumb';
|
|
4
|
+
import { Divider } from './Elements/Divider/Divider';
|
|
4
5
|
import Header from './Elements/Header/Header';
|
|
5
6
|
import MenuItem from './Elements/Item/MenuItem';
|
|
6
7
|
import * as S from './Menu.styles';
|
|
@@ -14,9 +15,7 @@ export declare class Menu extends Component<AntdMenuProps, {
|
|
|
14
15
|
static Header: typeof Header;
|
|
15
16
|
static ItemGroup: typeof S.AntdMenu.ItemGroup;
|
|
16
17
|
static SubMenu: typeof import("antd/lib/menu/SubMenu").default;
|
|
17
|
-
static Divider:
|
|
18
|
-
level?: number;
|
|
19
|
-
}, never>;
|
|
18
|
+
static Divider: typeof Divider;
|
|
20
19
|
state: {
|
|
21
20
|
allItemsVisible: boolean;
|
|
22
21
|
};
|
package/dist/Menu.js
CHANGED
|
@@ -10,6 +10,7 @@ import '@synerise/ds-core/dist/js/style';
|
|
|
10
10
|
import Icon, { ArrowDownCircleM, ArrowUpCircleM } from '@synerise/ds-icon';
|
|
11
11
|
import Tooltip from '@synerise/ds-tooltip';
|
|
12
12
|
import Breadcrumb from './Elements/Breadcrumb/Breadcrumb';
|
|
13
|
+
import { Divider } from './Elements/Divider/Divider';
|
|
13
14
|
import Header from './Elements/Header/Header';
|
|
14
15
|
import MenuItem from './Elements/Item/MenuItem';
|
|
15
16
|
import SubMenuItem from './Elements/SubMenu/SubMenu';
|
|
@@ -133,5 +134,5 @@ Menu.Breadcrumb = Breadcrumb;
|
|
|
133
134
|
Menu.Header = Header;
|
|
134
135
|
Menu.ItemGroup = S.AntdMenu.ItemGroup;
|
|
135
136
|
Menu.SubMenu = S.AntdMenu.SubMenu;
|
|
136
|
-
Menu.Divider =
|
|
137
|
+
Menu.Divider = Divider;
|
|
137
138
|
export default Menu;
|
package/dist/Menu.styles.d.ts
CHANGED
|
@@ -9,9 +9,6 @@ type SubMenuProps = PropsWithChildren<{
|
|
|
9
9
|
title: string | ReactNode;
|
|
10
10
|
tabIndex?: number;
|
|
11
11
|
}>;
|
|
12
|
-
export declare const MenuDivider: import("styled-components").StyledComponent<"div", any, {
|
|
13
|
-
level?: number;
|
|
14
|
-
}, never>;
|
|
15
12
|
export declare const AntdMenu: import("styled-components").StyledComponent<typeof Menu, any, AntdMenuProps, never>;
|
|
16
13
|
export declare const SubMenuItem: import("styled-components").StyledComponent<typeof import("antd/lib/menu/SubMenu").default, any, SubMenuProps, never>;
|
|
17
14
|
export {};
|
package/dist/Menu.styles.js
CHANGED
|
@@ -6,21 +6,9 @@ var arrowDownSvgWithCustomColor = function arrowDownSvgWithCustomColor(color) {
|
|
|
6
6
|
var iconWithColor = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' >/><path fill='none' d='M0 0h24v24H0z' /><path style='fill: " + colorValueForSvg + ";' d='M14.71973,9.84473,12,12.56445,9.28027,9.84473a.74992.74992,0,0,0-1.06054,1.06054l3.25,3.25a.74971.74971,0,0,0,1.06054,0l3.25-3.25a.74992.74992,0,0,0-1.06054-1.06054Z'/></svg>";
|
|
7
7
|
return iconWithColor;
|
|
8
8
|
};
|
|
9
|
-
export var MenuDivider = styled.div.withConfig({
|
|
10
|
-
displayName: "Menustyles__MenuDivider",
|
|
11
|
-
componentId: "sc-10eu0qe-0"
|
|
12
|
-
})(["height:1px;width:", ";margin:", " ", ";border-top:1px dashed ", ";"], function (props) {
|
|
13
|
-
return props != null && props.level && (props == null ? void 0 : props.level) > 1 ? '75%' : '100%';
|
|
14
|
-
}, function (props) {
|
|
15
|
-
return props.higher ? '16px' : '8px';
|
|
16
|
-
}, function (props) {
|
|
17
|
-
return props != null && props.level && (props == null ? void 0 : props.level) > 1 ? '35px' : '0px';
|
|
18
|
-
}, function (props) {
|
|
19
|
-
return props.theme.palette['grey-300'];
|
|
20
|
-
});
|
|
21
9
|
export var AntdMenu = styled(Menu).withConfig({
|
|
22
10
|
displayName: "Menustyles__AntdMenu",
|
|
23
|
-
componentId: "sc-10eu0qe-
|
|
11
|
+
componentId: "sc-10eu0qe-0"
|
|
24
12
|
})(["", " ", " > li{> .ant-menu-submenu-title,> .-submenu-title{padding-left:12px !important;}&:not(.ant-menu-submenu){padding-left:12px !important;}}.ant-menu-submenu-title,.-submenu-title{display:flex;", " .ds-submenu-title-wrapper{", " .ds-submenu-title{padding-top:5px;padding-bottom:5px;", "}}}&&& .ant-menu-item-selected,&&& .-item-selected{&:focus:not(:active){color:", ";background:", ";box-shadow:inset 0 0 0 2px ", ";&::before{color:", ";}}}&&{.ant-menu-submenu-open,.-submenu-open{.ant-menu-inline,.-inline,.ant-menu-vertical,.-vertical,.ant-menu-vertical-left,.-vertical-left{border-right-width:0px;margin:8px 0 8px 0;padding-left:24px;}}}", ""], function (props) {
|
|
25
13
|
return Boolean(props.asDropdownMenu) && !props.asInfoCardContainer && css(["&&{padding:8px;width:194px;"]);
|
|
26
14
|
}, function (props) {
|
|
@@ -38,7 +26,7 @@ export var AntdMenu = styled(Menu).withConfig({
|
|
|
38
26
|
});
|
|
39
27
|
export var SubMenuItem = styled(Menu.SubMenu).withConfig({
|
|
40
28
|
displayName: "Menustyles__SubMenuItem",
|
|
41
|
-
componentId: "sc-10eu0qe-
|
|
29
|
+
componentId: "sc-10eu0qe-1"
|
|
42
30
|
})(["&&&{color:", ";opacity:", ";cursor:", ";font-weight:500;border-radius:3px;transition:background-color 0.2s ease-out;&& .ant-menu-submenu-title:hover,&& .-submenu-title:hover{&& > i.ant-menu-submenu-arrow,&& > i.-submenu-arrow{background-image:url(\"", "\");}.ds-submenu-title-wrapper > .ds-submenu-title{color:", ";.ds-menu-prefix{svg{fill:", ";}}}}> .ant-menu-submenu-title,> .-submenu-title{line-height:1.39;height:auto;margin:0;padding-bottom:2px;padding-top:2px;max-width:100%;align-items:center;.ds-submenu-title-wrapper > .ds-submenu-title:focus:not(:active){box-shadow:inset 0 0 0 2px transparent;background:transparent;}", "}.ant-menu-item,.-item{padding-right:5px;padding-left:10px !important;}.ant-menu-title-content{.ant-menu-item,.-item{margin-left:0;}}.ds-menu-prefix{margin-left:0px;}&.ant-menu-item-selected,&.-item-selected{background:inherit;.ant-menu-submenu-title,.-submenu-title{&:focus,&:active{background:", ";&::before{color:", ";}}& > .ds-menu-prefix{svg{fill:", ";}}&::after{content:none;}}}}", " i{right:12px;}> .ant-menu-submenu-title:hover,> .-submenu-title:hover{color:", ";}&&.ant-menu-submenu-open > .ant-menu-submenu-title,&&.-submenu-open > .-submenu-title{&:not(:hover){color:", ";}background:", ";.ds-menu-content-wrapper{color:", ";background:", ";.ds-menu-prefix{svg{fill:", ";}}.ds-check-icon{svg{fill:", ";}}}& > i.ant-menu-submenu-arrow,& > i.-submenu-arrow{transform:rotate(180deg);background-image:url(\"", "\");}}> .ant-menu-submenu-title,> .-submenu-title{border-radius:3px;& > i.ant-menu-submenu-arrow,& > i.-submenu-arrow{transform:rotate(0deg);top:calc(50% - 12px);right:5px;height:24px;width:24px;}& > i.ant-menu-submenu-arrow::after,& > i.-submenu-arrow::after,& > i.ant-menu-submenu-arrow::before,& > i.-submenu-arrow::before{background-image:none;display:none;}&:hover > i.ant-menu-submenu-arrow::after,&:hover > i.-submenu-arrow::after,&:hover > i.ant-menu-submenu-arrow::before,&:hover > i.-submenu-arrow::before{background-image:none;}&:hover{color:", ";background:", ";}& > i.ant-menu-submenu-arrow,& > i.-submenu-arrow{background-image:url(\"", "\");}&:hover > i.ant-menu-submenu-arrow,&:hover > i.-submenu-arrow{background-image:url(\"", "\");}}&&.ant-menu-submenu-open > .ant-menu-submenu-title:hover,&&.-submenu-open > .-submenu-title:hover{& > i.ant-menu-submenu-arrow,& > i.-submenu-arrow{background-image:url(\"", "\");}}> li.ant-menu-submenu,> li.-submenu{&:hover{background:none !important;}}", " > ul{li{i{right:12px;}> .ant-menu-submenu,> .-submenu{&:hover{", "}}}}}"], function (props) {
|
|
43
31
|
return props.theme.palette['grey-700'];
|
|
44
32
|
}, function (props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-menu",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"description": "Menu UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-button": "^1.4.
|
|
38
|
+
"@synerise/ds-button": "^1.4.12",
|
|
39
|
+
"@synerise/ds-divider": "^1.1.3",
|
|
39
40
|
"@synerise/ds-icon": "^1.7.2",
|
|
40
41
|
"@synerise/ds-tooltip": "^1.2.0",
|
|
41
42
|
"@synerise/ds-utils": "^1.4.2",
|
|
@@ -51,5 +52,5 @@
|
|
|
51
52
|
"react": ">=16.9.0 <= 18.3.1",
|
|
52
53
|
"styled-components": "^5.3.3"
|
|
53
54
|
},
|
|
54
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "a89d4a4d780cd537376fbc58a58ed572fdad925b"
|
|
55
56
|
}
|