@synerise/ds-menu 1.0.13 → 1.0.14
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 +450 -1557
- package/README.md +1 -1
- package/dist/Elements/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/dist/Elements/Breadcrumb/Breadcrumb.js +16 -20
- package/dist/Elements/Breadcrumb/Breadcrumb.styles.d.ts +2 -2
- package/dist/Elements/Breadcrumb/Breadcrumb.styles.js +0 -2
- package/dist/Elements/Breadcrumb/Breadcrumb.types.d.ts +1 -1
- package/dist/Elements/Header/Header.d.ts +1 -1
- package/dist/Elements/Header/Header.js +1 -1
- package/dist/Elements/Item/Danger/Danger.d.ts +1 -1
- package/dist/Elements/Item/Danger/Danger.styles.js +4 -10
- package/dist/Elements/Item/MenuItem.d.ts +3 -3
- package/dist/Elements/Item/MenuItem.js +4 -4
- package/dist/Elements/Item/MenuItem.types.d.ts +5 -5
- package/dist/Elements/Item/Select/Select.d.ts +1 -1
- package/dist/Elements/Item/Select/Select.styles.js +5 -11
- package/dist/Elements/Item/SubmenuText/SubmenuText.d.ts +1 -1
- package/dist/Elements/Item/SubmenuText/SubmenuText.styles.js +7 -15
- package/dist/Elements/Item/Text/Text.d.ts +2 -2
- package/dist/Elements/Item/Text/Text.js +25 -32
- package/dist/Elements/Item/Text/Text.styles.d.ts +1 -1
- package/dist/Elements/Item/Text/Text.styles.js +1 -1
- package/dist/Elements/Item/Text/Text.types.d.ts +1 -1
- package/dist/Elements/SubMenu/SubMenu.d.ts +2 -2
- package/dist/Elements/SubMenu/SubMenu.js +4 -7
- package/dist/Elements/SubMenu/SubMenu.types.d.ts +2 -2
- package/dist/Elements/index.js +0 -1
- package/dist/Menu.d.ts +5 -5
- package/dist/Menu.js +8 -10
- package/dist/Menu.styles.d.ts +1 -1
- package/dist/Menu.styles.js +1 -1
- package/dist/Menu.types.d.ts +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/utils.js +0 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -85,6 +85,6 @@ const items = [
|
|
|
85
85
|
### MenuTexts
|
|
86
86
|
|
|
87
87
|
| Property | Description | Type | Default |
|
|
88
|
-
|
|
88
|
+
| -------- | ------------------- | --------- | ------- |
|
|
89
89
|
| showLess | toggle button label | ReactNode | - |
|
|
90
90
|
| showMore | toggle button label | ReactNode | - |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MenuItemProps } from '../Item/MenuItem.types';
|
|
3
|
-
import { BreadcrumbProps } from './Breadcrumb.types';
|
|
2
|
+
import { type MenuItemProps } from '../Item/MenuItem.types';
|
|
3
|
+
import { type BreadcrumbProps } from './Breadcrumb.types';
|
|
4
4
|
declare const Breadcrumb: ({ path, disabled, highlight, description, onPathClick, compact, startWithArrow, gradientOverlap, highlightActivePath, ...rest }: BreadcrumbProps & MenuItemProps) => React.JSX.Element;
|
|
5
5
|
export default Breadcrumb;
|
|
@@ -2,8 +2,8 @@ var _excluded = ["path", "disabled", "highlight", "description", "onPathClick",
|
|
|
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 React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
-
import Icon, { AngleRightS } from '@synerise/ds-icon';
|
|
6
5
|
import { theme } from '@synerise/ds-core';
|
|
6
|
+
import Icon, { AngleRightS } from '@synerise/ds-icon';
|
|
7
7
|
import { escapeRegEx } from '@synerise/ds-utils';
|
|
8
8
|
import * as S from './Breadcrumb.styles';
|
|
9
9
|
var Breadcrumb = function Breadcrumb(_ref) {
|
|
@@ -86,25 +86,21 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
86
86
|
prefixel: !!prefixel,
|
|
87
87
|
ref: contentRef
|
|
88
88
|
}, pathToDisplay.map(function (item, index) {
|
|
89
|
-
return (
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
component: /*#__PURE__*/React.createElement(AngleRightS, null),
|
|
105
|
-
color: theme.palette['grey-600']
|
|
106
|
-
})))
|
|
107
|
-
);
|
|
89
|
+
return /*#__PURE__*/React.createElement(S.BreadcrumbRoute, {
|
|
90
|
+
className: "route",
|
|
91
|
+
key: item + "-" + index
|
|
92
|
+
}, /*#__PURE__*/React.createElement(S.BreadcrumbName, {
|
|
93
|
+
className: "ds-breadcrumb-name " + attachActiveClassName(index),
|
|
94
|
+
onClick: function onClick() {
|
|
95
|
+
onPathClick && onPathClick(item);
|
|
96
|
+
}
|
|
97
|
+
}, renderWithHighlighting(item)), shouldHaveArrowPlaceholder(index) && /*#__PURE__*/React.createElement(S.ArrowRight, {
|
|
98
|
+
className: "ds-arrow",
|
|
99
|
+
visible: shouldRenderArrow(path, index)
|
|
100
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
101
|
+
component: /*#__PURE__*/React.createElement(AngleRightS, null),
|
|
102
|
+
color: theme.palette['grey-600']
|
|
103
|
+
})));
|
|
108
104
|
}))));
|
|
109
105
|
};
|
|
110
106
|
export default Breadcrumb;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FlattenSimpleInterpolation } from 'styled-components';
|
|
3
|
-
import { ThemeProps } from '@synerise/ds-core';
|
|
2
|
+
import { type FlattenSimpleInterpolation } from 'styled-components';
|
|
3
|
+
import { type ThemeProps } from '@synerise/ds-core';
|
|
4
4
|
export declare const ArrowRight: import("styled-components").StyledComponent<"div", any, {
|
|
5
5
|
visible: boolean;
|
|
6
6
|
}, never>;
|
|
@@ -5,8 +5,6 @@ import React from 'react';
|
|
|
5
5
|
import styled, { css } from 'styled-components';
|
|
6
6
|
import Text from '../Item/Text/Text';
|
|
7
7
|
import { PrefixelWrapper } from '../Item/Text/Text.styles';
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
10
8
|
var NOOP = function NOOP() {};
|
|
11
9
|
export var ArrowRight = styled.div.withConfig({
|
|
12
10
|
displayName: "Breadcrumbstyles__ArrowRight",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Tooltip from '@synerise/ds-tooltip/dist/Tooltip';
|
|
3
2
|
import Icon, { InfoFillS } from '@synerise/ds-icon';
|
|
3
|
+
import Tooltip from '@synerise/ds-tooltip/dist/Tooltip';
|
|
4
4
|
import * as S from './Header.styles';
|
|
5
5
|
var MenuHeader = function MenuHeader(_ref) {
|
|
6
6
|
var headerText = _ref.headerText,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '@synerise/ds-core/dist/js/style';
|
|
3
|
-
import { BasicItemProps } from '../Text/Text.types';
|
|
3
|
+
import { type BasicItemProps } from '../Text/Text.types';
|
|
4
4
|
declare const Danger: ({ children, ...rest }: BasicItemProps) => React.JSX.Element;
|
|
5
5
|
export default Danger;
|
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
var _excluded = ["children", "disabled"];
|
|
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
|
-
import styled from 'styled-components';
|
|
5
4
|
import React from 'react';
|
|
5
|
+
import styled from 'styled-components';
|
|
6
6
|
import { IconContainer } from '@synerise/ds-icon';
|
|
7
7
|
import Text from '../Text/Text';
|
|
8
8
|
import { ContentWrapper, PrefixelWrapper } from '../Text/Text.styles';
|
|
9
|
-
|
|
10
|
-
// eslint-disable-next-line import/prefer-default-export
|
|
11
9
|
export var DangerItem = styled(function (_ref) {
|
|
12
10
|
var children = _ref.children,
|
|
13
11
|
disabled = _ref.disabled,
|
|
14
12
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
15
|
-
return (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
React.createElement(Text, _extends({
|
|
19
|
-
disabled: disabled
|
|
20
|
-
}, rest), children)
|
|
21
|
-
);
|
|
13
|
+
return /*#__PURE__*/React.createElement(Text, _extends({
|
|
14
|
+
disabled: disabled
|
|
15
|
+
}, rest), children);
|
|
22
16
|
}).withConfig({
|
|
23
17
|
displayName: "Dangerstyles__DangerItem",
|
|
24
18
|
componentId: "sc-1n4dcl2-0"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '@synerise/ds-core/dist/js/style';
|
|
3
|
-
import {
|
|
4
|
-
import { SubMenuProps } from '../SubMenu/SubMenu.types';
|
|
5
|
-
import {
|
|
3
|
+
import { type MenuDividerProps } from '../../Menu.types';
|
|
4
|
+
import { type SubMenuProps } from '../SubMenu/SubMenu.types';
|
|
5
|
+
import { type MenuItemProps } from './MenuItem.types';
|
|
6
6
|
declare const MenuItem: ({ prefixel, suffixel, ordered, disabled, danger, text, description, subMenu, children, type, indentLevel, timeToHideTooltip, onClick, menuItemKey, onTitleClick, ...rest }: SubMenuProps & MenuItemProps & MenuDividerProps) => React.JSX.Element;
|
|
7
7
|
export default MenuItem;
|
|
@@ -3,12 +3,12 @@ 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 {
|
|
6
|
+
import { MenuDivider } from '../../Menu.styles';
|
|
7
7
|
import SubMenuItem from '../SubMenu/SubMenu';
|
|
8
|
-
import Text from './Text/Text';
|
|
9
|
-
import Select from './Select/Select';
|
|
10
8
|
import Danger from './Danger/Danger';
|
|
11
|
-
import {
|
|
9
|
+
import { ItemType } from './MenuItem.types';
|
|
10
|
+
import Select from './Select/Select';
|
|
11
|
+
import Text from './Text/Text';
|
|
12
12
|
var MenuItem = function MenuItem(_ref) {
|
|
13
13
|
var prefixel = _ref.prefixel,
|
|
14
14
|
suffixel = _ref.suffixel,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { MenuProps } from 'antd/lib/menu';
|
|
1
|
+
import { type MenuProps } from 'antd/lib/menu';
|
|
3
2
|
import type { TriggerProps } from 'rc-trigger';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import type { Component, LegacyRef, ReactNode } from 'react';
|
|
4
|
+
import { type TooltipProps } from '@synerise/ds-tooltip/dist/Tooltip.types';
|
|
5
|
+
import { type VisibilityTrigger } from '../../Menu.types';
|
|
6
|
+
import { type SubMenuProps } from '../SubMenu/SubMenu.types';
|
|
7
7
|
export declare enum ItemType {
|
|
8
8
|
DEFAULT = "default",
|
|
9
9
|
SELECT = "select",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '@synerise/ds-core/dist/js/style';
|
|
3
|
-
import { BasicItemProps } from '../Text/Text.types';
|
|
3
|
+
import { type BasicItemProps } from '../Text/Text.types';
|
|
4
4
|
declare const Select: ({ disabled, children, ...rest }: BasicItemProps) => React.JSX.Element;
|
|
5
5
|
export default Select;
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
var _excluded = ["children", "disabled"];
|
|
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
|
-
import styled from 'styled-components';
|
|
5
4
|
import React from 'react';
|
|
6
|
-
import
|
|
5
|
+
import styled from 'styled-components';
|
|
7
6
|
import Text from '../Text/Text';
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line import/prefer-default-export
|
|
7
|
+
import { SuffixWraper } from '../Text/Text.styles';
|
|
10
8
|
export var SelectItem = styled(function (_ref) {
|
|
11
9
|
var children = _ref.children,
|
|
12
10
|
disabled = _ref.disabled,
|
|
13
11
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
14
|
-
return (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
React.createElement(Text, _extends({
|
|
18
|
-
disabled: disabled
|
|
19
|
-
}, rest), children)
|
|
20
|
-
);
|
|
12
|
+
return /*#__PURE__*/React.createElement(Text, _extends({
|
|
13
|
+
disabled: disabled
|
|
14
|
+
}, rest), children);
|
|
21
15
|
}).withConfig({
|
|
22
16
|
displayName: "Selectstyles__SelectItem",
|
|
23
17
|
componentId: "sc-h6ad3-0"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '@synerise/ds-core/dist/js/style';
|
|
3
|
-
import { BasicItemProps } from '../Text/Text.types';
|
|
3
|
+
import { type BasicItemProps } from '../Text/Text.types';
|
|
4
4
|
declare const SubmenuText: ({ disabled, children, prefixel, suffixel, key, ...rest }: BasicItemProps) => React.JSX.Element;
|
|
5
5
|
export default SubmenuText;
|
|
@@ -1,33 +1,25 @@
|
|
|
1
1
|
var _excluded = ["children", "disabled", "childrenCollapsed"];
|
|
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
|
-
import styled from 'styled-components';
|
|
5
4
|
import React from 'react';
|
|
6
|
-
import
|
|
5
|
+
import styled from 'styled-components';
|
|
7
6
|
import Text from '../Text/Text';
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
7
|
+
import { ContentWrapper } from '../Text/Text.styles';
|
|
10
8
|
var NOOP = function NOOP() {};
|
|
11
9
|
export var SubtitleItemWrapper = styled.ul.withConfig({
|
|
12
10
|
displayName: "SubmenuTextstyles__SubtitleItemWrapper",
|
|
13
11
|
componentId: "sc-dxm3s9-0"
|
|
14
12
|
})(["display:flex;flex:1;"]);
|
|
15
|
-
|
|
16
|
-
// eslint-disable-next-line import/prefer-default-export
|
|
17
13
|
export var SubmenuText = styled(function (_ref) {
|
|
18
14
|
var children = _ref.children,
|
|
19
15
|
disabled = _ref.disabled,
|
|
20
16
|
childrenCollapsed = _ref.childrenCollapsed,
|
|
21
17
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
22
|
-
return (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
onClick: NOOP,
|
|
28
|
-
tabIndex: -1
|
|
29
|
-
}), children)
|
|
30
|
-
);
|
|
18
|
+
return /*#__PURE__*/React.createElement(Text, _extends({}, rest, {
|
|
19
|
+
disabled: disabled,
|
|
20
|
+
onClick: NOOP,
|
|
21
|
+
tabIndex: -1
|
|
22
|
+
}), children);
|
|
31
23
|
}).withConfig({
|
|
32
24
|
displayName: "SubmenuTextstyles__SubmenuText",
|
|
33
25
|
componentId: "sc-dxm3s9-1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CSSProperties, FC, PropsWithChildren } from 'react';
|
|
2
1
|
import 'rc-trigger/assets/index.less';
|
|
3
|
-
import {
|
|
2
|
+
import { type CSSProperties, type FC, type PropsWithChildren } from 'react';
|
|
3
|
+
import { type BasicItemProps } from './Text.types';
|
|
4
4
|
export type HoverTooltipProps = PropsWithChildren<{
|
|
5
5
|
hoverTooltipProps?: BasicItemProps['hoverTooltipProps'];
|
|
6
6
|
renderHoverTooltip?: () => JSX.Element;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var _excluded = ["parent", "disabled", "prefixel", "suffixel", "danger", "children", "description", "copyable", "copyHint", "copyValue", "copyTooltip", "timeToHideTooltip", "highlight", "style", "prefixVisibilityTrigger", "suffixVisibilityTrigger", "indentLevel", "ordered", "onClick", "checked", "tooltipProps", "hoverTooltipProps", "renderHoverTooltip", "size"];
|
|
2
2
|
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; }
|
|
3
3
|
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); }
|
|
4
|
-
import React, { useCallback, useMemo, useState } from 'react';
|
|
5
|
-
import "rc-trigger/assets/index.css";
|
|
6
4
|
import classNames from 'classnames';
|
|
7
|
-
import { useTheme } from 'styled-components';
|
|
8
5
|
import copy from 'copy-to-clipboard';
|
|
9
6
|
import Trigger from 'rc-trigger';
|
|
7
|
+
import "rc-trigger/assets/index.css";
|
|
8
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
9
|
+
import { useTheme } from 'styled-components';
|
|
10
|
+
import { theme } from '@synerise/ds-core';
|
|
11
|
+
import Icon, { AngleRightS, CheckS } from '@synerise/ds-icon';
|
|
10
12
|
import Tooltip from '@synerise/ds-tooltip';
|
|
11
13
|
import { escapeRegEx } from '@synerise/ds-utils';
|
|
12
|
-
import Icon, { CheckS, AngleRightS } from '@synerise/ds-icon';
|
|
13
|
-
import { theme } from '@synerise/ds-core';
|
|
14
|
-
import * as S from './Text.styles';
|
|
15
|
-
import { triggerPlacements } from '../../../utils';
|
|
16
14
|
import { VisibilityTrigger } from '../../../Menu.types';
|
|
15
|
+
import { triggerPlacements } from '../../../utils';
|
|
16
|
+
import * as S from './Text.styles';
|
|
17
17
|
var renderAddon = function renderAddon(addon) {
|
|
18
18
|
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
19
19
|
params[_key - 1] = arguments[_key];
|
|
@@ -34,28 +34,24 @@ function WithHoverTooltip(_ref) {
|
|
|
34
34
|
};
|
|
35
35
|
}, []);
|
|
36
36
|
// onKeyDown is used to disallow propagating key events to tooltip's container element
|
|
37
|
-
return (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
popupClassName: "ignore-click-outside ds-hide-arrow",
|
|
50
|
-
mouseEnterDelay: 0.2,
|
|
51
|
-
popupStyle: {
|
|
52
|
-
zIndex: zIndex
|
|
53
|
-
},
|
|
37
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
onKeyDown: cancelBubblingEvent,
|
|
39
|
+
onClick: cancelBubblingEvent
|
|
40
|
+
}, /*#__PURE__*/React.createElement(Trigger, _extends({
|
|
41
|
+
builtinPlacements: triggerPlacements,
|
|
42
|
+
defaultPopupVisible: (_hoverTooltipProps$de = hoverTooltipProps == null ? void 0 : hoverTooltipProps.defaultPopupVisible) != null ? _hoverTooltipProps$de : false,
|
|
43
|
+
action: (hoverTooltipProps == null ? void 0 : hoverTooltipProps.action) || ['click', 'hover'],
|
|
44
|
+
popupPlacement: (hoverTooltipProps == null ? void 0 : hoverTooltipProps.popupPlacement) || 'right',
|
|
45
|
+
popup: renderHoverTooltip && renderHoverTooltip(),
|
|
46
|
+
popupClassName: "ignore-click-outside ds-hide-arrow",
|
|
47
|
+
mouseEnterDelay: 0.2,
|
|
48
|
+
popupStyle: {
|
|
54
49
|
zIndex: zIndex
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
},
|
|
51
|
+
zIndex: zIndex
|
|
52
|
+
}, hoverTooltipProps), /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
style: style
|
|
54
|
+
}, children)));
|
|
59
55
|
}
|
|
60
56
|
var Text = function Text(_ref2) {
|
|
61
57
|
var parent = _ref2.parent,
|
|
@@ -137,10 +133,7 @@ var Text = function Text(_ref2) {
|
|
|
137
133
|
var mergedStyle = _extends({}, style, {
|
|
138
134
|
paddingLeft: 'revert-layer'
|
|
139
135
|
});
|
|
140
|
-
var element =
|
|
141
|
-
/*#__PURE__*/
|
|
142
|
-
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
143
|
-
React.createElement(S.Wrapper, _extends({
|
|
136
|
+
var element = /*#__PURE__*/React.createElement(S.Wrapper, _extends({
|
|
144
137
|
onMouseOver: function onMouseOver() {
|
|
145
138
|
setHovered(true);
|
|
146
139
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
1
|
import MenuItem from 'antd/lib/menu/MenuItem';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
3
|
import { IconContainer } from '@synerise/ds-icon';
|
|
4
4
|
import { ItemSize } from '../MenuItem.types';
|
|
5
5
|
var INDENT_LEVEL_STEP = 16;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CSSProperties, ReactNode } from 'react';
|
|
2
1
|
import type { MenuProps } from 'antd/lib/menu';
|
|
2
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
3
3
|
import type { MenuItemProps } from '../MenuItem.types';
|
|
4
4
|
export type AddonRenderer = (hovered: boolean) => ReactNode;
|
|
5
5
|
export type BasicItemProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '@synerise/ds-core/dist/js/style';
|
|
3
|
-
import { MenuItemProps } from '../Item/MenuItem.types';
|
|
4
|
-
import { SubMenuProps, SubMenuState } from './SubMenu.types';
|
|
3
|
+
import { type MenuItemProps } from '../Item/MenuItem.types';
|
|
4
|
+
import { type SubMenuProps, type SubMenuState } from './SubMenu.types';
|
|
5
5
|
declare class SubMenuItem extends React.PureComponent<SubMenuProps & MenuItemProps, SubMenuState> {
|
|
6
6
|
constructor(props: SubMenuProps & MenuItemProps);
|
|
7
7
|
render(): React.ReactNode;
|
|
@@ -3,9 +3,9 @@ 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
|
function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); }
|
|
5
5
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
6
|
+
import classNames from 'classnames';
|
|
6
7
|
import React from 'react';
|
|
7
8
|
import { v4 as uuid } from 'uuid';
|
|
8
|
-
import classNames from 'classnames';
|
|
9
9
|
import '@synerise/ds-core/dist/js/style';
|
|
10
10
|
import * as S from '../../Menu.styles';
|
|
11
11
|
import MenuItem from '../Item/MenuItem';
|
|
@@ -63,7 +63,7 @@ var SubMenuItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
63
63
|
'ant-menu-item-selected': !!menuItemKey && !!selectedKeys && selectedKeys.includes(menuItemKey)
|
|
64
64
|
})
|
|
65
65
|
}), Boolean(subMenu) &&
|
|
66
|
-
// @ts-
|
|
66
|
+
// @ts-expect-error Type 'SubMenuProps' is missing the following properties from type 'MenuInfo': keyPath, item, domEvent
|
|
67
67
|
subMenu.map(function (subItem, index) {
|
|
68
68
|
return /*#__PURE__*/React.createElement(MenuItem, _extends({
|
|
69
69
|
parent: subItem.parent,
|
|
@@ -76,14 +76,11 @@ var SubMenuItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
76
76
|
ordered: subItem.ordered === undefined ? ordered : subItem.ordered,
|
|
77
77
|
description: subItem.description,
|
|
78
78
|
suffixVisibilityTrigger: subItem.suffixVisibilityTrigger,
|
|
79
|
-
prefixVisibilityTrigger: subItem.prefixVisibilityTrigger
|
|
80
|
-
// eslint-disable-next-line react/jsx-handler-names
|
|
81
|
-
,
|
|
79
|
+
prefixVisibilityTrigger: subItem.prefixVisibilityTrigger,
|
|
82
80
|
onClick: function onClick() {
|
|
83
81
|
subItem.onClick && subItem.onClick(subItem);
|
|
84
82
|
},
|
|
85
|
-
key: subItem.key || uuidKey + "-" + index
|
|
86
|
-
,
|
|
83
|
+
key: subItem.key || uuidKey + "-" + index,
|
|
87
84
|
menuItemKey: subItem.key || uuidKey + "-" + index,
|
|
88
85
|
selectedKeys: selectedKeys
|
|
89
86
|
}, subItem));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { type MenuProps } from 'antd/lib/menu';
|
|
1
2
|
import type { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { MenuItemProps } from '../Item/MenuItem.types';
|
|
3
|
+
import { type MenuItemProps } from '../Item/MenuItem.types';
|
|
4
4
|
export type SubMenuProps = Omit<MenuProps, 'dataSource' | 'footer'> & {
|
|
5
5
|
key?: string | number;
|
|
6
6
|
danger?: boolean;
|
package/dist/Elements/index.js
CHANGED
package/dist/Menu.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Component, ReactNode } from 'react';
|
|
1
|
+
import { Component, type ReactNode } from 'react';
|
|
2
2
|
import '@synerise/ds-core/dist/js/style';
|
|
3
|
-
import './style/index.less';
|
|
4
|
-
import * as S from './Menu.styles';
|
|
5
|
-
import type { AntdMenuProps } from './Menu.types';
|
|
6
|
-
import MenuItem from './Elements/Item/MenuItem';
|
|
7
3
|
import Breadcrumb from './Elements/Breadcrumb/Breadcrumb';
|
|
8
4
|
import Header from './Elements/Header/Header';
|
|
5
|
+
import MenuItem from './Elements/Item/MenuItem';
|
|
6
|
+
import * as S from './Menu.styles';
|
|
7
|
+
import type { AntdMenuProps } from './Menu.types';
|
|
8
|
+
import './style/index.less';
|
|
9
9
|
export declare class Menu extends Component<AntdMenuProps, {
|
|
10
10
|
allItemsVisible: boolean;
|
|
11
11
|
}> {
|
package/dist/Menu.js
CHANGED
|
@@ -4,17 +4,17 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
4
4
|
function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); }
|
|
5
5
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
6
6
|
import React, { Children, Component } from 'react';
|
|
7
|
+
import { FormattedMessage } from 'react-intl';
|
|
7
8
|
import Button from '@synerise/ds-button';
|
|
9
|
+
import '@synerise/ds-core/dist/js/style';
|
|
8
10
|
import Icon, { ArrowDownCircleM, ArrowUpCircleM } from '@synerise/ds-icon';
|
|
9
11
|
import Tooltip from '@synerise/ds-tooltip';
|
|
10
|
-
import '@synerise/ds-core/dist/js/style';
|
|
11
|
-
import "./style/index.css";
|
|
12
|
-
import { FormattedMessage } from 'react-intl';
|
|
13
|
-
import * as S from './Menu.styles';
|
|
14
|
-
import SubMenuItem from './Elements/SubMenu/SubMenu';
|
|
15
|
-
import MenuItem from './Elements/Item/MenuItem';
|
|
16
12
|
import Breadcrumb from './Elements/Breadcrumb/Breadcrumb';
|
|
17
13
|
import Header from './Elements/Header/Header';
|
|
14
|
+
import MenuItem from './Elements/Item/MenuItem';
|
|
15
|
+
import SubMenuItem from './Elements/SubMenu/SubMenu';
|
|
16
|
+
import * as S from './Menu.styles';
|
|
17
|
+
import "./style/index.css";
|
|
18
18
|
export var Menu = /*#__PURE__*/function (_Component) {
|
|
19
19
|
function Menu() {
|
|
20
20
|
var _this;
|
|
@@ -97,8 +97,7 @@ export var Menu = /*#__PURE__*/function (_Component) {
|
|
|
97
97
|
copyValue: item.copyValue,
|
|
98
98
|
suffixVisibilityTrigger: item.suffixVisibilityTrigger,
|
|
99
99
|
prefixVisibilityTrigger: item.prefixVisibilityTrigger,
|
|
100
|
-
key: item.key || "" + item.text + index
|
|
101
|
-
,
|
|
100
|
+
key: item.key || "" + item.text + index,
|
|
102
101
|
menuItemKey: item.key || "" + item.text + index
|
|
103
102
|
}, rest, item)) : /*#__PURE__*/React.createElement(MenuItem, _extends({
|
|
104
103
|
className: "ds-menu-item",
|
|
@@ -120,8 +119,7 @@ export var Menu = /*#__PURE__*/function (_Component) {
|
|
|
120
119
|
prefixVisibilityTrigger: item.prefixVisibilityTrigger,
|
|
121
120
|
indentLevel: item.indentLevel || 0,
|
|
122
121
|
type: item.type,
|
|
123
|
-
key: item.key || "" + item.text + index
|
|
124
|
-
,
|
|
122
|
+
key: item.key || "" + item.text + index,
|
|
125
123
|
menuItemKey: item.key || "" + item.text + index
|
|
126
124
|
}, rest, item));
|
|
127
125
|
}) : visibleChildren), toggleButton);
|
package/dist/Menu.styles.d.ts
CHANGED
package/dist/Menu.styles.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
1
|
import { Menu } from 'antd';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
3
|
var overflowStyles = css(["text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"]);
|
|
4
4
|
var arrowDownSvgWithCustomColor = function arrowDownSvgWithCustomColor(color) {
|
|
5
5
|
var colorValueForSvg = color.replace(/#/, '%23');
|
package/dist/Menu.types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { MenuItemProps } from './Elements/Item/MenuItem.types';
|
|
1
|
+
import { type MenuProps } from 'antd/lib/menu';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import { type MenuItemProps } from './Elements/Item/MenuItem.types';
|
|
4
4
|
export type MenuTexts = {
|
|
5
5
|
showLess: ReactNode;
|
|
6
6
|
showMore: ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as MainMenuStyles from './Menu.styles';
|
|
2
1
|
import * as BreadcrumbStyles from './Elements/Breadcrumb/Breadcrumb.styles';
|
|
3
2
|
import * as HeaderStyles from './Elements/Header/Header.styles';
|
|
4
3
|
import * as ItemDangerStyles from './Elements/Item/Danger/Danger.styles';
|
|
5
4
|
import * as ItemSelectStyles from './Elements/Item/Select/Select.styles';
|
|
6
5
|
import * as ItemSubmenuTextStyles from './Elements/Item/SubmenuText/SubmenuText.styles';
|
|
7
6
|
import * as ItemTextStyles from './Elements/Item/Text/Text.styles';
|
|
7
|
+
import * as MainMenuStyles from './Menu.styles';
|
|
8
8
|
export { default } from './Menu';
|
|
9
9
|
export * from './Menu.types';
|
|
10
10
|
export * from './Elements/Item/MenuItem.types';
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as MainMenuStyles from './Menu.styles';
|
|
2
1
|
import * as BreadcrumbStyles from './Elements/Breadcrumb/Breadcrumb.styles';
|
|
3
2
|
import * as HeaderStyles from './Elements/Header/Header.styles';
|
|
4
3
|
import * as ItemDangerStyles from './Elements/Item/Danger/Danger.styles';
|
|
5
4
|
import * as ItemSelectStyles from './Elements/Item/Select/Select.styles';
|
|
6
5
|
import * as ItemSubmenuTextStyles from './Elements/Item/SubmenuText/SubmenuText.styles';
|
|
7
6
|
import * as ItemTextStyles from './Elements/Item/Text/Text.styles';
|
|
7
|
+
import * as MainMenuStyles from './Menu.styles';
|
|
8
8
|
export { default } from './Menu';
|
|
9
9
|
export * from './Menu.types';
|
|
10
10
|
export * from './Elements/Item/MenuItem.types';
|
package/dist/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-menu",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "Menu UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-button": "^1.4.
|
|
38
|
-
"@synerise/ds-icon": "^1.5.
|
|
39
|
-
"@synerise/ds-tooltip": "^1.1.
|
|
40
|
-
"@synerise/ds-utils": "^1.3.
|
|
37
|
+
"@synerise/ds-button": "^1.4.2",
|
|
38
|
+
"@synerise/ds-icon": "^1.5.4",
|
|
39
|
+
"@synerise/ds-tooltip": "^1.1.12",
|
|
40
|
+
"@synerise/ds-utils": "^1.3.1",
|
|
41
41
|
"classnames": "2.3.2",
|
|
42
42
|
"copy-to-clipboard": "^3.3.1",
|
|
43
43
|
"rc-menu": "~9.6.3",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"react": ">=16.9.0 <= 18.3.1",
|
|
51
51
|
"styled-components": "^5.3.3"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "4512641033ba3581a3df208143c547fcfed45895"
|
|
54
54
|
}
|