@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.
@@ -14,6 +14,7 @@ _Object$defineProperty(exports, "__esModule", {
14
14
  });
15
15
  exports["default"] = void 0;
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
17
+ var _colors = require("../../styles/colors");
17
18
  var _AccordionGrid = _interopRequireDefault(require("../AccordionGridGroup/AccordionGrid.styles"));
18
19
  var _Buttons = require("../Button/Buttons.styles");
19
20
  var _Text = require("../Text/Text.styles");
@@ -126,7 +127,14 @@ var popUpSectionContainer = {
126
127
  var sectionBody = _objectSpread(_objectSpread({}, _AccordionGrid["default"].body), {}, {
127
128
  pl: '0'
128
129
  });
129
- var itemButton = {
130
+ var truncateText = {
131
+ whiteSpace: 'normal',
132
+ WebkitBoxOrient: 'vertical',
133
+ display: '-webkit-box',
134
+ WebkitLineClamp: '3',
135
+ overflow: 'hidden'
136
+ };
137
+ var itemButton = _objectSpread(_objectSpread({
130
138
  marginY: '2px',
131
139
  textDecoration: 'none',
132
140
  outline: 'none',
@@ -135,20 +143,19 @@ var itemButton = {
135
143
  backgroundColor: 'transparent',
136
144
  paddingTop: 'sm',
137
145
  paddingBottom: 'sm',
138
- display: 'block',
139
146
  color: 'neutral.90',
140
147
  fontSize: 'md',
141
148
  fontWeight: 0,
142
149
  flexGrow: '1',
143
150
  width: '100%',
144
151
  textAlign: 'left',
145
- whiteSpace: 'break-spaces',
146
152
  overflowWrap: 'break-word',
147
153
  maxWidth: '100%',
148
154
  wordWrap: 'break-word',
149
155
  wordBreak: 'break-word',
150
156
  paddingLeft: '45px',
151
- paddingRight: 'md',
157
+ paddingRight: 'md'
158
+ }, truncateText), {}, {
152
159
  '&.is-focused': {
153
160
  outline: '1px solid',
154
161
  outlineColor: 'focus'
@@ -163,7 +170,7 @@ var itemButton = {
163
170
  '&.is-pressed': {
164
171
  bg: 'accent.5'
165
172
  }
166
- };
173
+ });
167
174
  var popUpItemButton = _objectSpread(_objectSpread({}, itemButton), {}, {
168
175
  fontSize: 'sm',
169
176
  px: 'sm',
@@ -196,7 +203,7 @@ var subtitle = {
196
203
  };
197
204
  var headerText = _objectSpread(_objectSpread({}, _Text.wordWrap), {}, {
198
205
  whiteSpace: 'break-spaces',
199
- lineHeight: 1,
206
+ lineHeight: 1.15,
200
207
  fontSize: 'md',
201
208
  fontWeight: 1,
202
209
  maxWidth: '150px',
@@ -231,9 +238,9 @@ var headerNav = {
231
238
  fontSize: '16px',
232
239
  '&.is-focused': {
233
240
  outline: 'none',
234
- boxShadow: 'focus',
235
- WebkitBoxShadow: 'focus',
236
- MozBoxShadow: 'focus'
241
+ boxShadow: "0 0 0 1px ".concat(_colors.focus),
242
+ WebkitBoxShadow: "0 0 0 1px ".concat(_colors.focus),
243
+ MozBoxShadow: "0 0 0 1px ".concat(_colors.focus)
237
244
  },
238
245
  '&.is-hovered': {
239
246
  backgroundColor: 'accent.10'
@@ -18,7 +18,7 @@ var _NavBarContext = require("../../context/NavBarContext");
18
18
  var _hooks = require("../../hooks");
19
19
  var _index = require("../../index");
20
20
  var _react2 = require("@emotion/react");
21
- var _excluded = ["icon", "text", "className", "id", "onPress"];
21
+ var _excluded = ["icon", "text", "className", "id", "onPress", "iconProps"];
22
22
  function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
23
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
24
24
  var NavBarItem = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
@@ -27,6 +27,7 @@ var NavBarItem = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
27
27
  className = props.className,
28
28
  key = props.id,
29
29
  onPressCallback = props.onPress,
30
+ iconProps = props.iconProps,
30
31
  others = (0, _objectWithoutProperties2["default"])(props, _excluded);
31
32
  var navItemRef = (0, _hooks.useLocalOrForwardRef)(null);
32
33
 
@@ -84,7 +85,7 @@ var NavBarItem = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
84
85
  sx: {
85
86
  alignItems: 'center'
86
87
  }
87
- }, icon && (0, _react2.jsx)(_index.Icon, {
88
+ }, icon && (0, _react2.jsx)(_index.Icon, (0, _extends2["default"])({
88
89
  icon: icon,
89
90
  title: {
90
91
  name: text
@@ -95,7 +96,7 @@ var NavBarItem = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
95
96
  color: color,
96
97
  fill: color
97
98
  }
98
- }), (0, _react2.jsx)(_index.Text, {
99
+ }, iconProps)), (0, _react2.jsx)(_index.Text, {
99
100
  variant: state.navStyles.navBarItemText
100
101
  }, text)));
101
102
  });
@@ -63,7 +63,12 @@ var NavBarItemBody = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
63
63
  var shouldShowTransition = isExpanded && isTransitioning;
64
64
  var getEstimatedHeight = function getEstimatedHeight() {
65
65
  if (item !== null && item !== void 0 && item.children && typeof (item === null || item === void 0 ? void 0 : item.children.length) === 'number') {
66
- return (item !== null && item !== void 0 && item.itemHeight ? item.itemHeight : styles.navButtonEstHeight) * item.children.length;
66
+ var height = (item !== null && item !== void 0 && item.itemHeight ? item.itemHeight : styles.navButtonEstHeight) * item.children.length;
67
+ /*
68
+ returning Double the max height to address
69
+ UIP-7608: Ensures the last NavBar item is visible when system scrollbars are always shown
70
+ */
71
+ return height * 2;
67
72
  }
68
73
  return null;
69
74
  };
@@ -13,12 +13,11 @@ var _NavBarContext = require("../../context/NavBarContext");
13
13
  var _hooks = require("../../hooks");
14
14
  var _index = require("../../index");
15
15
  var _react2 = require("@emotion/react");
16
- var _excluded = ["className", "id", "onPress", "sx"];
16
+ var _excluded = ["className", "id", "onPress"];
17
17
  var NavBarItemButton = function NavBarItemButton(props) {
18
18
  var className = props.className,
19
19
  key = props.id,
20
20
  onPressCallback = props.onPress,
21
- sx = props.sx,
22
21
  others = (0, _objectWithoutProperties2["default"])(props, _excluded);
23
22
  var state = (0, _NavBarContext.useNavBarContext)();
24
23
  var isSelected = state.selectedKey === key;
@@ -75,7 +75,7 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
75
75
  "data-testid": heading
76
76
  }, icon && (0, _react2.jsx)(_index.Icon, {
77
77
  icon: icon,
78
- size: isOnyx ? 'icon-200' : 'sm',
78
+ size: isOnyx ? 'icon-200' : 18,
79
79
  sx: {
80
80
  mr: 'sm',
81
81
  color: getIconColor(),
@@ -119,7 +119,7 @@ var NavBarPrimaryItemHeader = function NavBarPrimaryItemHeader(_ref3) {
119
119
  "data-testid": heading
120
120
  }, icon && (0, _react2.jsx)(_index.Icon, {
121
121
  icon: icon,
122
- size: isOnyx ? 'icon-200' : 'sm',
122
+ size: isOnyx ? 'icon-200' : 18,
123
123
  sx: {
124
124
  mr: 'sm',
125
125
  color: 'neutral.95',
@@ -139,7 +139,7 @@ var NavBarPrimaryItemHeader = function NavBarPrimaryItemHeader(_ref3) {
139
139
  }
140
140
  }, customIcon && (0, _react2.jsx)(_index.Icon, {
141
141
  icon: customIcon,
142
- size: isOnyx ? 'icon-200' : 'sm',
142
+ size: isOnyx ? 'icon-200' : 'xs',
143
143
  sx: {
144
144
  color: 'neutral.95',
145
145
  fill: 'neutral.95'
@@ -65,7 +65,7 @@ describe('NavItemHeader', function () {
65
65
  getComponent();
66
66
  var icon = _testWrapper.screen.getByTestId('Dashboard').querySelector('svg');
67
67
  expect(icon).toBeInTheDocument();
68
- expect(icon).toHaveAttribute('width', '20px');
68
+ expect(icon).toHaveAttribute('width', '18');
69
69
  });
70
70
  });
71
71
  describe('NavItemHeader', function () {
@@ -47,7 +47,10 @@ var NavBarItemLink = function NavBarItemLink(props) {
47
47
  onPress: onNavPress,
48
48
  color: isSelected ? 'white' : undefined
49
49
  }, others, {
50
- sx: _objectSpread({}, props.sx)
50
+ sx: _objectSpread(_objectSpread({}, props.sx), {}, {
51
+ // eslint-disable-line react/prop-types
52
+ fontWeight: 1
53
+ })
51
54
  }));
52
55
  };
53
56
  var _default = NavBarItemLink;
@@ -6,6 +6,6 @@ _Object$defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports["default"] = void 0;
8
8
  var _default = {
9
- navButtonEstHeight: 40
9
+ navButtonEstHeight: 41
10
10
  };
11
11
  exports["default"] = _default;
@@ -1,6 +1,6 @@
1
1
  import React, { Key } from 'react';
2
2
  import { ThemeUICSSObject } from 'theme-ui';
3
- import { IconTypeExtended } from './icon';
3
+ import { IconProps, IconTypeExtended } from './icon';
4
4
  import { DOMAttributes, StyleProps } from './shared';
5
5
  export interface NavBarProps extends StyleProps, DOMAttributes {
6
6
  /** Allows only one item to be expanded. */
@@ -33,6 +33,7 @@ export interface NavBarItemProps extends StyleProps, DOMAttributes {
33
33
  /** Text that will render within the component */
34
34
  text?: string;
35
35
  className?: string;
36
+ iconProps?: IconProps;
36
37
  }
37
38
  export interface NavBarItemBodyProps {
38
39
  item?: {
@@ -46,8 +46,8 @@ var pingLogoHorizontalSmall = (0, _react2.jsx)("svg", {
46
46
  }))));
47
47
  exports.pingLogoHorizontalSmall = pingLogoHorizontalSmall;
48
48
  var pingLogoHorizontalSmallWhite = (0, _react2.jsx)("svg", {
49
- width: "161",
50
- height: "28",
49
+ width: "129",
50
+ height: "23",
51
51
  viewBox: "0 0 2385 415",
52
52
  fill: "none",
53
53
  xmlns: "http://www.w3.org/2000/svg"