@pingux/astro 2.122.1-alpha.1 → 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.js +5 -4
- package/lib/cjs/components/NavBarSection/NavBarItem.js +4 -3
- 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 +5 -4
- package/lib/components/NavBarSection/NavBarItem.js +4 -3
- 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
@@ -9,6 +9,7 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
|
|
9
9
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
10
10
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
11
11
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
12
|
+
import { focus } from '../../styles/colors';
|
12
13
|
import accordionGrid from '../AccordionGridGroup/AccordionGrid.styles';
|
13
14
|
import { quiet } from '../Button/Buttons.styles';
|
14
15
|
import { wordWrap } from '../Text/Text.styles';
|
@@ -195,7 +196,7 @@ var subtitle = {
|
|
195
196
|
};
|
196
197
|
var headerText = _objectSpread(_objectSpread({}, wordWrap), {}, {
|
197
198
|
whiteSpace: 'break-spaces',
|
198
|
-
lineHeight: 1,
|
199
|
+
lineHeight: 1.15,
|
199
200
|
fontSize: 'md',
|
200
201
|
fontWeight: 1,
|
201
202
|
maxWidth: '150px',
|
@@ -230,9 +231,9 @@ var headerNav = {
|
|
230
231
|
fontSize: '16px',
|
231
232
|
'&.is-focused': {
|
232
233
|
outline: 'none',
|
233
|
-
boxShadow:
|
234
|
-
WebkitBoxShadow:
|
235
|
-
MozBoxShadow:
|
234
|
+
boxShadow: "0 0 0 1px ".concat(focus),
|
235
|
+
WebkitBoxShadow: "0 0 0 1px ".concat(focus),
|
236
|
+
MozBoxShadow: "0 0 0 1px ".concat(focus)
|
236
237
|
},
|
237
238
|
'&.is-hovered': {
|
238
239
|
backgroundColor: 'accent.10'
|
@@ -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
|
});
|
@@ -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"
|