@pingux/astro 1.42.3 → 1.43.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/CHANGELOG.md CHANGED
@@ -3,17 +3,6 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [1.42.3](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.42.2...@pingux/astro@1.42.3) (2023-03-07)
7
-
8
-
9
- ### Bug Fixes
10
-
11
- * [UIP-6181] DataTable error ([a99481e](https://gitlab.corp.pingidentity.com/ux/pingux/commit/a99481e31c31e74619cff883a7fde3c2da7a7ba5))
12
-
13
-
14
-
15
-
16
-
17
6
  ## [1.42.2](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.42.1...@pingux/astro@1.42.2) (2023-02-22)
18
7
 
19
8
 
@@ -38,6 +38,10 @@ var _TransitConnectionVariantIcon = _interopRequireDefault(require("mdi-react/Tr
38
38
 
39
39
  var _ViewDashboardIcon = _interopRequireDefault(require("mdi-react/ViewDashboardIcon"));
40
40
 
41
+ var _ViewGridPlusOutlineIcon = _interopRequireDefault(require("mdi-react/ViewGridPlusOutlineIcon"));
42
+
43
+ var _OpenInNewIcon = _interopRequireDefault(require("mdi-react/OpenInNewIcon"));
44
+
41
45
  var _index = require("../../index");
42
46
 
43
47
  var _react2 = require("@emotion/react");
@@ -299,6 +303,13 @@ var data = [{
299
303
  }, "Sender")]
300
304
  }];
301
305
  var secondData = [{
306
+ 'data-id': 'da-vinci-data-id',
307
+ icon: _ViewGridPlusOutlineIcon["default"],
308
+ key: 'DaVinci',
309
+ heading: 'DaVinci',
310
+ customIcon: _OpenInNewIcon["default"],
311
+ href: 'https://pingidentity.com/'
312
+ }, {
302
313
  'data-id': 'mfa-data-id',
303
314
  icon: _FingerprintIcon["default"],
304
315
  key: 'MFA',
@@ -374,7 +385,8 @@ var thirdData = [{
374
385
 
375
386
  var Default = function Default() {
376
387
  return (0, _react2.jsx)(_index.NavBar, null, (0, _react2.jsx)(_index.Box, {
377
- padding: "md"
388
+ padding: "md",
389
+ key: "top-logo-parent"
378
390
  }, (0, _react2.jsx)(_index.Link, {
379
391
  "aria-label": "home link",
380
392
  href: "https://pingidentity.com",
@@ -384,7 +396,8 @@ var Default = function Default() {
384
396
  backgroundColor: "neutral.60"
385
397
  }), (0, _react2.jsx)(_index.Box, {
386
398
  variant: "navBar.sectionContainer",
387
- paddingBottom: "xl"
399
+ paddingBottom: "xl",
400
+ key: "first-section-container"
388
401
  }, (0, _react2.jsx)(_index.NavBarItem, {
389
402
  "data-id": "nav-bar-item",
390
403
  icon: _GlobeIcon["default"],
@@ -36,6 +36,10 @@ var _ScaleBalanceIcon = _interopRequireDefault(require("mdi-react/ScaleBalanceIc
36
36
 
37
37
  var _VerifiedIcon = _interopRequireDefault(require("mdi-react/VerifiedIcon"));
38
38
 
39
+ var _ViewGridPlusOutlineIcon = _interopRequireDefault(require("mdi-react/ViewGridPlusOutlineIcon"));
40
+
41
+ var _OpenInNewIcon = _interopRequireDefault(require("mdi-react/OpenInNewIcon"));
42
+
39
43
  var _ = require("../../");
40
44
 
41
45
  var _NavBar = _interopRequireDefault(require("./NavBar"));
@@ -90,6 +94,13 @@ var data = [{
90
94
  children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
91
95
  }];
92
96
  var secondData = [{
97
+ 'data-id': 'da-vinci-data-id',
98
+ icon: _ViewGridPlusOutlineIcon["default"],
99
+ key: 'DaVinci',
100
+ heading: 'DaVinci',
101
+ customIcon: _OpenInNewIcon["default"],
102
+ href: 'https://pingidentity.com/'
103
+ }, {
93
104
  icon: _FingerprintIcon["default"],
94
105
  key: 'MFA',
95
106
  heading: 'MFA',
@@ -43,6 +43,17 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "functi
43
43
  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; }
44
44
 
45
45
  var NavBarItemHeader = function NavBarItemHeader(props) {
46
+ var item = props.item;
47
+ var children = item.children,
48
+ href = item.href;
49
+ return !children && href ? (0, _react2.jsx)(NavBarPrimaryItemHeader, {
50
+ item: item
51
+ }) : (0, _react2.jsx)(NavBarSectionItemHeader, {
52
+ item: item
53
+ });
54
+ };
55
+
56
+ var NavBarSectionItemHeader = function NavBarSectionItemHeader(props) {
46
57
  var _context;
47
58
 
48
59
  var item = props.item;
@@ -82,7 +93,7 @@ var NavBarItemHeader = function NavBarItemHeader(props) {
82
93
  icon: icon,
83
94
  size: "sm",
84
95
  sx: {
85
- mr: '10px',
96
+ mr: 'sm',
86
97
  color: color,
87
98
  fill: color
88
99
  },
@@ -106,13 +117,66 @@ var NavBarItemHeader = function NavBarItemHeader(props) {
106
117
  })));
107
118
  };
108
119
 
120
+ var NavBarPrimaryItemHeader = function NavBarPrimaryItemHeader(_ref) {
121
+ var item = _ref.item;
122
+ var icon = item.icon,
123
+ className = item.className,
124
+ heading = item.heading,
125
+ customIcon = item.customIcon;
126
+ return (0, _react2.jsx)(_index.Box, {
127
+ variant: "navBar.itemHeaderContainer",
128
+ className: className,
129
+ isRow: true,
130
+ "data-testid": heading
131
+ }, icon && (0, _react2.jsx)(_index.Icon, {
132
+ icon: icon,
133
+ size: "sm",
134
+ sx: {
135
+ mr: 'sm',
136
+ color: 'neutral.95',
137
+ fill: 'neutral.95'
138
+ },
139
+ "aria-hidden": "true"
140
+ }), (0, _react2.jsx)(_index.Text, {
141
+ variant: "navBarHeaderText"
142
+ }, heading), (0, _react2.jsx)(_index.Box, {
143
+ isRow: true,
144
+ alignItems: "center",
145
+ sx: {
146
+ ml: 'auto'
147
+ }
148
+ }, customIcon ? (0, _react2.jsx)(_index.Icon, {
149
+ icon: customIcon,
150
+ size: "sm",
151
+ sx: {
152
+ color: 'neutral.95',
153
+ fill: 'neutral.95'
154
+ }
155
+ }) : (0, _react2.jsx)(_react["default"].Fragment, null)));
156
+ };
157
+
109
158
  NavBarItemHeader.propTypes = {
159
+ item: _propTypes["default"].shape({
160
+ children: _propTypes["default"].arrayOf(_propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].object])),
161
+ href: _propTypes["default"].string
162
+ })
163
+ };
164
+ NavBarSectionItemHeader.propTypes = {
110
165
  item: _propTypes["default"].shape({
111
166
  heading: _propTypes["default"].string,
112
167
  icon: _propTypes["default"].elementType,
113
168
  className: _propTypes["default"].string,
114
169
  children: _propTypes["default"].arrayOf(_propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].object])),
115
- key: _propTypes["default"].string
170
+ key: _propTypes["default"].string,
171
+ href: _propTypes["default"].string
172
+ })
173
+ };
174
+ NavBarPrimaryItemHeader.propTypes = {
175
+ item: _propTypes["default"].shape({
176
+ heading: _propTypes["default"].string,
177
+ icon: _propTypes["default"].elementType,
178
+ className: _propTypes["default"].string,
179
+ customIcon: _propTypes["default"].elementType
116
180
  })
117
181
  };
118
182
  var _default = NavBarItemHeader;
@@ -65,7 +65,7 @@ var NavBarSection = function NavBarSection(_ref) {
65
65
  others = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
66
66
  var ref = (0, _react.useRef)();
67
67
  var childrenItems = (0, _filter["default"])(items).call(items, function (item) {
68
- return item.children;
68
+ return item.children || item.href;
69
69
  });
70
70
  return (0, _react2.jsx)(_react["default"].Fragment, null, hasSeparator && (0, _react2.jsx)(_.Separator, {
71
71
  variant: "separator.navBarSeparator"
@@ -82,7 +82,10 @@ var NavBarSection = function NavBarSection(_ref) {
82
82
  }, others), (0, _map["default"])(childrenItems).call(childrenItems, function (item) {
83
83
  return (0, _react2.jsx)("li", {
84
84
  key: item.key
85
- }, (0, _react2.jsx)(SectionItem, {
85
+ }, !item.children && item.href ? (0, _react2.jsx)(PrimaryItem, {
86
+ key: item.key,
87
+ item: item
88
+ }) : (0, _react2.jsx)(SectionItem, {
86
89
  key: item.key,
87
90
  item: item
88
91
  }));
@@ -182,6 +185,17 @@ var SectionItem = function SectionItem(_ref2) {
182
185
  }));
183
186
  };
184
187
 
188
+ var PrimaryItem = function PrimaryItem(_ref3) {
189
+ var item = _ref3.item;
190
+ return (0, _react2.jsx)(_.Link, {
191
+ variant: "buttons.navBarSectionButton",
192
+ href: item.href,
193
+ target: "_blank"
194
+ }, (0, _react2.jsx)(_NavBarItemHeader["default"], {
195
+ item: item
196
+ }));
197
+ };
198
+
185
199
  NavBarSection.defaultProps = {
186
200
  hasSeparator: false
187
201
  };
@@ -215,5 +229,10 @@ SectionItem.propTypes = {
215
229
  }),
216
230
  menuProps: _propTypes["default"].shape({})
217
231
  };
232
+ PrimaryItem.propTypes = {
233
+ item: _propTypes["default"].shape({
234
+ href: _propTypes["default"].string
235
+ })
236
+ };
218
237
  var _default = NavBarSection;
219
238
  exports["default"] = _default;
@@ -9,6 +9,8 @@ import GlobeIcon from 'mdi-react/GlobeIcon';
9
9
  import ScaleBalance from 'mdi-react/ScaleBalanceIcon';
10
10
  import TransitConnection from 'mdi-react/TransitConnectionVariantIcon';
11
11
  import ViewDashboard from 'mdi-react/ViewDashboardIcon';
12
+ import ViewGridPlusOutline from 'mdi-react/ViewGridPlusOutlineIcon';
13
+ import OpenInNew from 'mdi-react/OpenInNewIcon';
12
14
  import { Box, Link, NavBar, NavBarItem, NavBarItemButton, NavBarItemLink, NavBarSection, Separator } from '../../index';
13
15
  import { jsx as ___EmotionJSX } from "@emotion/react";
14
16
  export default {
@@ -264,6 +266,13 @@ var data = [{
264
266
  }, "Sender")]
265
267
  }];
266
268
  var secondData = [{
269
+ 'data-id': 'da-vinci-data-id',
270
+ icon: ViewGridPlusOutline,
271
+ key: 'DaVinci',
272
+ heading: 'DaVinci',
273
+ customIcon: OpenInNew,
274
+ href: 'https://pingidentity.com/'
275
+ }, {
267
276
  'data-id': 'mfa-data-id',
268
277
  icon: Fingerprint,
269
278
  key: 'MFA',
@@ -338,7 +347,8 @@ var thirdData = [{
338
347
  }];
339
348
  export var Default = function Default() {
340
349
  return ___EmotionJSX(NavBar, null, ___EmotionJSX(Box, {
341
- padding: "md"
350
+ padding: "md",
351
+ key: "top-logo-parent"
342
352
  }, ___EmotionJSX(Link, {
343
353
  "aria-label": "home link",
344
354
  href: "https://pingidentity.com",
@@ -348,7 +358,8 @@ export var Default = function Default() {
348
358
  backgroundColor: "neutral.60"
349
359
  }), ___EmotionJSX(Box, {
350
360
  variant: "navBar.sectionContainer",
351
- paddingBottom: "xl"
361
+ paddingBottom: "xl",
362
+ key: "first-section-container"
352
363
  }, ___EmotionJSX(NavBarItem, {
353
364
  "data-id": "nav-bar-item",
354
365
  icon: GlobeIcon,
@@ -11,6 +11,8 @@ import EmoticonHappy from 'mdi-react/EmoticonHappyOutlineIcon';
11
11
  import Fingerprint from 'mdi-react/FingerprintIcon';
12
12
  import ScaleBalance from 'mdi-react/ScaleBalanceIcon';
13
13
  import Verify from 'mdi-react/VerifiedIcon';
14
+ import ViewGridPlusOutline from 'mdi-react/ViewGridPlusOutlineIcon';
15
+ import OpenInNew from 'mdi-react/OpenInNewIcon';
14
16
  import { Box, NavBarSection, NavBarItem, NavBarItemButton, NavBarItemLink, Link, Button } from '../../';
15
17
  import NavBar from './NavBar';
16
18
  import axeTest from '../../utils/testUtils/testAxe';
@@ -56,6 +58,13 @@ var data = [{
56
58
  children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
57
59
  }];
58
60
  var secondData = [{
61
+ 'data-id': 'da-vinci-data-id',
62
+ icon: ViewGridPlusOutline,
63
+ key: 'DaVinci',
64
+ heading: 'DaVinci',
65
+ customIcon: OpenInNew,
66
+ href: 'https://pingidentity.com/'
67
+ }, {
59
68
  icon: Fingerprint,
60
69
  key: 'MFA',
61
70
  heading: 'MFA',
@@ -11,6 +11,17 @@ import { useStatusClasses } from '../../hooks';
11
11
  import { jsx as ___EmotionJSX } from "@emotion/react";
12
12
 
13
13
  var NavBarItemHeader = function NavBarItemHeader(props) {
14
+ var item = props.item;
15
+ var children = item.children,
16
+ href = item.href;
17
+ return !children && href ? ___EmotionJSX(NavBarPrimaryItemHeader, {
18
+ item: item
19
+ }) : ___EmotionJSX(NavBarSectionItemHeader, {
20
+ item: item
21
+ });
22
+ };
23
+
24
+ var NavBarSectionItemHeader = function NavBarSectionItemHeader(props) {
14
25
  var _context;
15
26
 
16
27
  var item = props.item;
@@ -54,7 +65,7 @@ var NavBarItemHeader = function NavBarItemHeader(props) {
54
65
  icon: icon,
55
66
  size: "sm",
56
67
  sx: {
57
- mr: '10px',
68
+ mr: 'sm',
58
69
  color: color,
59
70
  fill: color
60
71
  },
@@ -78,13 +89,66 @@ var NavBarItemHeader = function NavBarItemHeader(props) {
78
89
  })));
79
90
  };
80
91
 
92
+ var NavBarPrimaryItemHeader = function NavBarPrimaryItemHeader(_ref) {
93
+ var item = _ref.item;
94
+ var icon = item.icon,
95
+ className = item.className,
96
+ heading = item.heading,
97
+ customIcon = item.customIcon;
98
+ return ___EmotionJSX(Box, {
99
+ variant: "navBar.itemHeaderContainer",
100
+ className: className,
101
+ isRow: true,
102
+ "data-testid": heading
103
+ }, icon && ___EmotionJSX(Icon, {
104
+ icon: icon,
105
+ size: "sm",
106
+ sx: {
107
+ mr: 'sm',
108
+ color: 'neutral.95',
109
+ fill: 'neutral.95'
110
+ },
111
+ "aria-hidden": "true"
112
+ }), ___EmotionJSX(Text, {
113
+ variant: "navBarHeaderText"
114
+ }, heading), ___EmotionJSX(Box, {
115
+ isRow: true,
116
+ alignItems: "center",
117
+ sx: {
118
+ ml: 'auto'
119
+ }
120
+ }, customIcon ? ___EmotionJSX(Icon, {
121
+ icon: customIcon,
122
+ size: "sm",
123
+ sx: {
124
+ color: 'neutral.95',
125
+ fill: 'neutral.95'
126
+ }
127
+ }) : ___EmotionJSX(React.Fragment, null)));
128
+ };
129
+
81
130
  NavBarItemHeader.propTypes = {
131
+ item: PropTypes.shape({
132
+ children: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object])),
133
+ href: PropTypes.string
134
+ })
135
+ };
136
+ NavBarSectionItemHeader.propTypes = {
82
137
  item: PropTypes.shape({
83
138
  heading: PropTypes.string,
84
139
  icon: PropTypes.elementType,
85
140
  className: PropTypes.string,
86
141
  children: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object])),
87
- key: PropTypes.string
142
+ key: PropTypes.string,
143
+ href: PropTypes.string
144
+ })
145
+ };
146
+ NavBarPrimaryItemHeader.propTypes = {
147
+ item: PropTypes.shape({
148
+ heading: PropTypes.string,
149
+ icon: PropTypes.elementType,
150
+ className: PropTypes.string,
151
+ customIcon: PropTypes.elementType
88
152
  })
89
153
  };
90
154
  export default NavBarItemHeader;
@@ -10,7 +10,7 @@ import React, { useRef } from 'react';
10
10
  import { useFocusManager } from '@react-aria/focus';
11
11
  import { useKeyboard } from '@react-aria/interactions';
12
12
  import PropTypes from 'prop-types';
13
- import { Button, Separator, Text } from '../../';
13
+ import { Button, Link, Separator, Text } from '../../';
14
14
  import { useNavBarContext } from '../../context/NavBarContext';
15
15
  import NavBarItemBody from './NavBarItemBody';
16
16
  import NavBarItemHeader from './NavBarItemHeader';
@@ -31,7 +31,7 @@ var NavBarSection = function NavBarSection(_ref) {
31
31
  var ref = useRef();
32
32
 
33
33
  var childrenItems = _filterInstanceProperty(items).call(items, function (item) {
34
- return item.children;
34
+ return item.children || item.href;
35
35
  });
36
36
 
37
37
  return ___EmotionJSX(React.Fragment, null, hasSeparator && ___EmotionJSX(Separator, {
@@ -49,7 +49,10 @@ var NavBarSection = function NavBarSection(_ref) {
49
49
  }, others), _mapInstanceProperty(childrenItems).call(childrenItems, function (item) {
50
50
  return ___EmotionJSX("li", {
51
51
  key: item.key
52
- }, ___EmotionJSX(SectionItem, {
52
+ }, !item.children && item.href ? ___EmotionJSX(PrimaryItem, {
53
+ key: item.key,
54
+ item: item
55
+ }) : ___EmotionJSX(SectionItem, {
53
56
  key: item.key,
54
57
  item: item
55
58
  }));
@@ -153,6 +156,17 @@ var SectionItem = function SectionItem(_ref2) {
153
156
  }));
154
157
  };
155
158
 
159
+ var PrimaryItem = function PrimaryItem(_ref3) {
160
+ var item = _ref3.item;
161
+ return ___EmotionJSX(Link, {
162
+ variant: "buttons.navBarSectionButton",
163
+ href: item.href,
164
+ target: "_blank"
165
+ }, ___EmotionJSX(NavBarItemHeader, {
166
+ item: item
167
+ }));
168
+ };
169
+
156
170
  NavBarSection.defaultProps = {
157
171
  hasSeparator: false
158
172
  };
@@ -186,4 +200,9 @@ SectionItem.propTypes = {
186
200
  }),
187
201
  menuProps: PropTypes.shape({})
188
202
  };
203
+ PrimaryItem.propTypes = {
204
+ item: PropTypes.shape({
205
+ href: PropTypes.string
206
+ })
207
+ };
189
208
  export default NavBarSection;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.42.3",
3
+ "version": "1.43.0-alpha.0",
4
4
  "description": "PingUX themeable React component library",
5
5
  "repository": {
6
6
  "type": "git",