ab-ui-library 1.34.2 → 1.34.3
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.
|
@@ -2,22 +2,20 @@ import { _ as _slicedToArray } from '../../../slicedToArray-7fc3134e.js';
|
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { NavigationItemTypes } from './types.js';
|
|
5
|
-
import { Badge } from '../../Badge/Badge.js';
|
|
6
5
|
import { IconDynamicComponent } from '../../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
|
|
7
6
|
import { IconChevronDown } from '../../SVGIcons/IconChevronDown.js';
|
|
8
7
|
import { ButtonIcon } from '../../ButtonIcon/ButtonIcon.js';
|
|
9
|
-
import '../../Text/Text.js';
|
|
10
|
-
import '../../../utils/helpers.js';
|
|
11
|
-
import 'dayjs';
|
|
12
|
-
import '../../Badge/consts.js';
|
|
13
8
|
import '../../../helperComponents/IconDynamicComponent/constants.js';
|
|
14
9
|
import '../../../defineProperty-4ffc5b52.js';
|
|
15
10
|
import '../../../typeof-7dcf72fa.js';
|
|
16
11
|
import '../../../extends-e3da3c46.js';
|
|
17
12
|
import '../../../objectWithoutProperties-b89845a5.js';
|
|
13
|
+
import 'dayjs';
|
|
18
14
|
import '../../../helperComponents/Loader/Loader.js';
|
|
19
15
|
import '../../../RadioGroup-f807c335.js';
|
|
20
16
|
import '../../Radio/Radio.js';
|
|
17
|
+
import '../../Text/Text.js';
|
|
18
|
+
import '../../../utils/helpers.js';
|
|
21
19
|
import '../../../helperComponents/Label/Label.js';
|
|
22
20
|
import '../../Popover/Popover.js';
|
|
23
21
|
import '../../../hooks/useGetTooltipStyles.js';
|
|
@@ -40,7 +38,6 @@ var NavigationItem = function NavigationItem(props) {
|
|
|
40
38
|
type = props.type,
|
|
41
39
|
isOpen = props.isOpen,
|
|
42
40
|
iconName = props.iconName,
|
|
43
|
-
showBadge = props.showBadge,
|
|
44
41
|
_props$expandable = props.expandable,
|
|
45
42
|
expandable = _props$expandable === void 0 ? false : _props$expandable,
|
|
46
43
|
_props$showAction = props.showAction,
|
|
@@ -48,7 +45,6 @@ var NavigationItem = function NavigationItem(props) {
|
|
|
48
45
|
actionElm = props.actionElm,
|
|
49
46
|
_props$active = props.active,
|
|
50
47
|
active = _props$active === void 0 ? false : _props$active,
|
|
51
|
-
badgeProps = props.badgeProps,
|
|
52
48
|
_props$expandIconProp = props.expandIconProps,
|
|
53
49
|
expandIconProps = _props$expandIconProp === void 0 ? {
|
|
54
50
|
Component: IconChevronDown,
|
|
@@ -57,7 +53,8 @@ var NavigationItem = function NavigationItem(props) {
|
|
|
57
53
|
children = props.children,
|
|
58
54
|
actionsList = props.actionsList,
|
|
59
55
|
_props$className = props.className,
|
|
60
|
-
className = _props$className === void 0 ? '' : _props$className
|
|
56
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
57
|
+
rightContent = props.rightContent;
|
|
61
58
|
var _useState = useState(false),
|
|
62
59
|
_useState2 = _slicedToArray(_useState, 2),
|
|
63
60
|
childOpen = _useState2[0],
|
|
@@ -96,12 +93,7 @@ var NavigationItem = function NavigationItem(props) {
|
|
|
96
93
|
}));
|
|
97
94
|
}))) : null, /*#__PURE__*/React.createElement(React.Fragment, null, displayHeader, displayNavigationItem(), type === NavigationItemTypes.USER && iconName && isOpen && /*#__PURE__*/React.createElement(IconDynamicComponent, {
|
|
98
95
|
componentName: iconName
|
|
99
|
-
})),
|
|
100
|
-
type: badgeProps === null || badgeProps === void 0 ? void 0 : badgeProps.type,
|
|
101
|
-
text: badgeProps === null || badgeProps === void 0 ? void 0 : badgeProps.text,
|
|
102
|
-
size: badgeProps === null || badgeProps === void 0 ? void 0 : badgeProps.size,
|
|
103
|
-
className: 'mr-12'
|
|
104
|
-
})), children && /*#__PURE__*/React.createElement("div", {
|
|
96
|
+
})), rightContent ? rightContent : null), children && /*#__PURE__*/React.createElement("div", {
|
|
105
97
|
className: classNames('navigation-item__child', childOpen && 'active')
|
|
106
98
|
}, children)));
|
|
107
99
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JSX, ReactNode } from 'react';
|
|
2
2
|
import type { ISVGIconProps } from '../../SVGIcons/types';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ReactElement } from 'react';
|
|
4
4
|
export declare enum NavigationItemTypes {
|
|
5
5
|
MAIN = "main",
|
|
6
6
|
SUB = "sub",
|
|
@@ -24,8 +24,8 @@ export interface TNavigationLinkPropTypes {
|
|
|
24
24
|
showAction?: boolean;
|
|
25
25
|
actionElm?: JSX.Element;
|
|
26
26
|
active?: boolean;
|
|
27
|
-
badgeProps?: TBadgeProps;
|
|
28
27
|
children?: ReactNode;
|
|
29
28
|
actionsList?: TActionItemProps[];
|
|
30
29
|
className?: string;
|
|
30
|
+
rightContent?: ReactElement;
|
|
31
31
|
}
|