@pingux/astro 2.122.1-alpha.0 → 2.123.0-alpha.0
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/lib/cjs/components/NavBar/NavBar.stories.js +235 -178
- package/lib/cjs/components/NavBar/NavBar.styles.d.ts +24 -18
- package/lib/cjs/components/NavBar/NavBar.styles.js +16 -9
- package/lib/cjs/components/NavBarSection/NavBarItem.js +4 -3
- package/lib/cjs/components/NavBarSection/NavBarItemBody.js +6 -1
- package/lib/cjs/components/NavBarSection/NavBarItemButton.js +1 -2
- package/lib/cjs/components/NavBarSection/NavBarItemHeader.js +3 -3
- package/lib/cjs/components/NavBarSection/NavBarItemHeader.test.js +1 -1
- package/lib/cjs/components/NavBarSection/NavBarItemLink.js +4 -1
- package/lib/cjs/styles/themes/astro/customProperties/styles.js +1 -1
- package/lib/cjs/types/navBar.d.ts +2 -1
- package/lib/cjs/utils/devUtils/constants/logos.js +2 -2
- package/lib/components/NavBar/NavBar.stories.js +235 -178
- package/lib/components/NavBar/NavBar.styles.js +16 -9
- package/lib/components/NavBarSection/NavBarItem.js +4 -3
- package/lib/components/NavBarSection/NavBarItemBody.js +6 -1
- package/lib/components/NavBarSection/NavBarItemButton.js +1 -2
- package/lib/components/NavBarSection/NavBarItemHeader.js +3 -3
- package/lib/components/NavBarSection/NavBarItemHeader.test.js +1 -1
- package/lib/components/NavBarSection/NavBarItemLink.js +4 -1
- package/lib/styles/themes/astro/customProperties/styles.js +1 -1
- package/lib/utils/devUtils/constants/logos.js +2 -2
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
3
|
-
var _excluded = ["icon", "text", "className", "id", "onPress"];
|
3
|
+
var _excluded = ["icon", "text", "className", "id", "onPress", "iconProps"];
|
4
4
|
import React, { forwardRef, useImperativeHandle } from 'react';
|
5
5
|
import { mergeProps, useFocusRing } from 'react-aria';
|
6
6
|
import { useHover, usePress } from '@react-aria/interactions';
|
@@ -14,6 +14,7 @@ var NavBarItem = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
14
14
|
className = props.className,
|
15
15
|
key = props.id,
|
16
16
|
onPressCallback = props.onPress,
|
17
|
+
iconProps = props.iconProps,
|
17
18
|
others = _objectWithoutProperties(props, _excluded);
|
18
19
|
var navItemRef = useLocalOrForwardRef(null);
|
19
20
|
|
@@ -71,7 +72,7 @@ var NavBarItem = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
71
72
|
sx: {
|
72
73
|
alignItems: 'center'
|
73
74
|
}
|
74
|
-
}, icon && ___EmotionJSX(Icon, {
|
75
|
+
}, icon && ___EmotionJSX(Icon, _extends({
|
75
76
|
icon: icon,
|
76
77
|
title: {
|
77
78
|
name: text
|
@@ -82,7 +83,7 @@ var NavBarItem = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
82
83
|
color: color,
|
83
84
|
fill: color
|
84
85
|
}
|
85
|
-
}), ___EmotionJSX(Text, {
|
86
|
+
}, iconProps)), ___EmotionJSX(Text, {
|
86
87
|
variant: state.navStyles.navBarItemText
|
87
88
|
}, text)));
|
88
89
|
});
|
@@ -52,7 +52,12 @@ var NavBarItemBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
52
52
|
var shouldShowTransition = isExpanded && isTransitioning;
|
53
53
|
var getEstimatedHeight = function getEstimatedHeight() {
|
54
54
|
if (item !== null && item !== void 0 && item.children && typeof (item === null || item === void 0 ? void 0 : item.children.length) === 'number') {
|
55
|
-
|
55
|
+
var height = (item !== null && item !== void 0 && item.itemHeight ? item.itemHeight : styles.navButtonEstHeight) * item.children.length;
|
56
|
+
/*
|
57
|
+
returning Double the max height to address
|
58
|
+
UIP-7608: Ensures the last NavBar item is visible when system scrollbars are always shown
|
59
|
+
*/
|
60
|
+
return height * 2;
|
56
61
|
}
|
57
62
|
return null;
|
58
63
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
3
|
-
var _excluded = ["className", "id", "onPress"
|
3
|
+
var _excluded = ["className", "id", "onPress"];
|
4
4
|
import React from 'react';
|
5
5
|
import { useNavBarContext } from '../../context/NavBarContext';
|
6
6
|
import { useNavBarPress, useStatusClasses } from '../../hooks';
|
@@ -10,7 +10,6 @@ var NavBarItemButton = function NavBarItemButton(props) {
|
|
10
10
|
var className = props.className,
|
11
11
|
key = props.id,
|
12
12
|
onPressCallback = props.onPress,
|
13
|
-
sx = props.sx,
|
14
13
|
others = _objectWithoutProperties(props, _excluded);
|
15
14
|
var state = useNavBarContext();
|
16
15
|
var isSelected = state.selectedKey === key;
|
@@ -62,7 +62,7 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
|
|
62
62
|
"data-testid": heading
|
63
63
|
}, icon && ___EmotionJSX(Icon, {
|
64
64
|
icon: icon,
|
65
|
-
size: isOnyx ? 'icon-200' :
|
65
|
+
size: isOnyx ? 'icon-200' : 18,
|
66
66
|
sx: {
|
67
67
|
mr: 'sm',
|
68
68
|
color: getIconColor(),
|
@@ -106,7 +106,7 @@ var NavBarPrimaryItemHeader = function NavBarPrimaryItemHeader(_ref3) {
|
|
106
106
|
"data-testid": heading
|
107
107
|
}, icon && ___EmotionJSX(Icon, {
|
108
108
|
icon: icon,
|
109
|
-
size: isOnyx ? 'icon-200' :
|
109
|
+
size: isOnyx ? 'icon-200' : 18,
|
110
110
|
sx: {
|
111
111
|
mr: 'sm',
|
112
112
|
color: 'neutral.95',
|
@@ -126,7 +126,7 @@ var NavBarPrimaryItemHeader = function NavBarPrimaryItemHeader(_ref3) {
|
|
126
126
|
}
|
127
127
|
}, customIcon && ___EmotionJSX(Icon, {
|
128
128
|
icon: customIcon,
|
129
|
-
size: isOnyx ? 'icon-200' : '
|
129
|
+
size: isOnyx ? 'icon-200' : 'xs',
|
130
130
|
sx: {
|
131
131
|
color: 'neutral.95',
|
132
132
|
fill: 'neutral.95'
|
@@ -62,7 +62,7 @@ describe('NavItemHeader', function () {
|
|
62
62
|
getComponent();
|
63
63
|
var icon = screen.getByTestId('Dashboard').querySelector('svg');
|
64
64
|
expect(icon).toBeInTheDocument();
|
65
|
-
expect(icon).toHaveAttribute('width', '
|
65
|
+
expect(icon).toHaveAttribute('width', '18');
|
66
66
|
});
|
67
67
|
});
|
68
68
|
describe('NavItemHeader', function () {
|
@@ -40,7 +40,10 @@ var NavBarItemLink = function NavBarItemLink(props) {
|
|
40
40
|
onPress: onNavPress,
|
41
41
|
color: isSelected ? 'white' : undefined
|
42
42
|
}, others, {
|
43
|
-
sx: _objectSpread({}, props.sx)
|
43
|
+
sx: _objectSpread(_objectSpread({}, props.sx), {}, {
|
44
|
+
// eslint-disable-line react/prop-types
|
45
|
+
fontWeight: 1
|
46
|
+
})
|
44
47
|
}));
|
45
48
|
};
|
46
49
|
export default NavBarItemLink;
|
@@ -37,8 +37,8 @@ export var pingLogoHorizontalSmall = ___EmotionJSX("svg", {
|
|
37
37
|
fill: "white"
|
38
38
|
}))));
|
39
39
|
export var pingLogoHorizontalSmallWhite = ___EmotionJSX("svg", {
|
40
|
-
width: "
|
41
|
-
height: "
|
40
|
+
width: "129",
|
41
|
+
height: "23",
|
42
42
|
viewBox: "0 0 2385 415",
|
43
43
|
fill: "none",
|
44
44
|
xmlns: "http://www.w3.org/2000/svg"
|