@pingux/astro 2.119.0-alpha.1 → 2.119.0-alpha.2

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.
Files changed (40) hide show
  1. package/lib/cjs/components/NavBar/NavBar.stories.d.ts +1 -0
  2. package/lib/cjs/components/NavBar/NavBar.stories.js +272 -107
  3. package/lib/cjs/{styles/themeOverrides → components/NavBar}/stories/NavBar.chromatic.stories.js +53 -53
  4. package/lib/cjs/components/NavBar/stories/NavBarNextGenComponent.js +191 -0
  5. package/lib/cjs/{styles/themeOverrides/nextGenDarkMode → components/NavBar}/stories/NextGenDarkNavStory.chomatic.stories.js +2 -2
  6. package/lib/cjs/{styles/themes/next-gen → components/NavBar}/stories/NextGenNavBar.chromatic.stories.js +1 -1
  7. package/lib/cjs/components/NavBarSection/NavBarItem.js +3 -1
  8. package/lib/cjs/components/NavBarSection/NavBarItemHeader.js +9 -6
  9. package/lib/cjs/components/NavBarSection/NavBarItemHeader.test.d.ts +1 -0
  10. package/lib/cjs/components/NavBarSection/NavBarItemHeader.test.js +86 -0
  11. package/lib/cjs/styles/themes/next-gen/convertedComponentList.d.ts +4 -0
  12. package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +7 -2
  13. package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +13 -0
  14. package/lib/cjs/styles/themes/next-gen/variants/links.d.ts +9 -0
  15. package/lib/cjs/styles/themes/next-gen/variants/links.js +12 -1
  16. package/lib/cjs/styles/themes/next-gen/variants/navbar.d.ts +4 -0
  17. package/lib/cjs/styles/themes/next-gen/variants/navbar.js +11 -7
  18. package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +4 -0
  19. package/lib/cjs/utils/devUtils/shouldReturnComingSoon.js +8 -2
  20. package/lib/components/NavBar/NavBar.stories.js +196 -32
  21. package/lib/{styles/themeOverrides → components/NavBar}/stories/NavBar.chromatic.stories.js +2 -2
  22. package/lib/components/NavBar/stories/NavBarNextGenComponent.js +182 -0
  23. package/lib/{styles/themeOverrides/nextGenDarkMode → components/NavBar}/stories/NextGenDarkNavStory.chomatic.stories.js +2 -2
  24. package/lib/{styles/themes/next-gen → components/NavBar}/stories/NextGenNavBar.chromatic.stories.js +1 -1
  25. package/lib/components/NavBarSection/NavBarItem.js +4 -2
  26. package/lib/components/NavBarSection/NavBarItemHeader.js +7 -4
  27. package/lib/components/NavBarSection/NavBarItemHeader.test.js +83 -0
  28. package/lib/styles/themes/next-gen/convertedComponentList.js +5 -1
  29. package/lib/styles/themes/next-gen/variants/links.js +12 -1
  30. package/lib/styles/themes/next-gen/variants/navbar.js +11 -7
  31. package/lib/utils/devUtils/shouldReturnComingSoon.js +9 -3
  32. package/package.json +1 -1
  33. package/lib/cjs/recipes/NextGen/NavBarNextGen.stories.d.ts +0 -6
  34. package/lib/cjs/recipes/NextGen/NavBarNextGen.stories.js +0 -19
  35. package/lib/cjs/styles/themes/next-gen/stories/NavBarNextGenComponent.js +0 -191
  36. package/lib/recipes/NextGen/NavBarNextGen.stories.js +0 -9
  37. package/lib/styles/themes/next-gen/stories/NavBarNextGenComponent.js +0 -182
  38. /package/lib/cjs/{styles/themes/next-gen → components/NavBar}/stories/NavBarNextGenComponent.d.ts +0 -0
  39. /package/lib/cjs/{styles/themeOverrides/nextGenDarkMode → components/NavBar}/stories/NextGenDarkNavStory.chomatic.stories.d.ts +0 -0
  40. /package/lib/cjs/{styles/themes/next-gen → components/NavBar}/stories/NextGenNavBar.chromatic.stories.d.ts +0 -0
@@ -0,0 +1,182 @@
1
+ import React from 'react';
2
+ import AccountCheckIcon from '@pingux/mdi-react/AccountCheckOutlineIcon';
3
+ import AccountMultipleOutlineIcon from '@pingux/mdi-react/AccountMultipleOutlineIcon';
4
+ import AppsIcon from '@pingux/mdi-react/AppsIcon';
5
+ import CheckCircleOutlineIcon from '@pingux/mdi-react/CheckCircleOutlineIcon';
6
+ import CodeTagsIcon from '@pingux/mdi-react/CodeTagsIcon';
7
+ import CogOutlineIcon from '@pingux/mdi-react/CogOutlineIcon';
8
+ import FileTreeIcon from '@pingux/mdi-react/FileTreeIcon';
9
+ import LayersOutlineIcon from '@pingux/mdi-react/LayersOutlineIcon';
10
+ import PaletteOutlineIcon from '@pingux/mdi-react/PaletteOutlineIcon';
11
+ import ShieldCheckOutlineIcon from '@pingux/mdi-react/ShieldCheckOutlineIcon';
12
+ import ShowChartIcon from '@pingux/mdi-react/ShowChartIcon';
13
+ import DashboardIcon from '@pingux/mdi-react/ViewDashboardOutlineIcon';
14
+ import WidgetsOutlineIcon from '@pingux/mdi-react/WidgetsOutlineIcon';
15
+ import { Box, NavBar, NavBarItem, NavBarItemButton, NavBarSection, Separator } from '../../..';
16
+ import { useGetTheme } from '../../../hooks';
17
+ import { jsx as ___EmotionJSX } from "@emotion/react";
18
+ export var NavBarNextGenComponent = function NavBarNextGenComponent() {
19
+ var firstSectionData = [{
20
+ 'data-id': 'dashboard-data-id',
21
+ heading: 'Monitoring',
22
+ icon: ShowChartIcon,
23
+ key: 'Monitoring',
24
+ children: [___EmotionJSX(NavBarItemButton, {
25
+ key: "Dashboards",
26
+ id: "Dashboards"
27
+ }, "Dashboards"), ___EmotionJSX(NavBarItemButton, {
28
+ key: "Audit",
29
+ id: "Audit"
30
+ }, "Audits")]
31
+ }, {
32
+ 'data-id': 'Directory-data-id',
33
+ heading: 'Directory',
34
+ icon: AccountMultipleOutlineIcon,
35
+ key: 'Directory',
36
+ children: [___EmotionJSX(NavBarItemButton, {
37
+ key: "Users",
38
+ id: "Users"
39
+ }, "Users"), ___EmotionJSX(NavBarItemButton, {
40
+ key: "Group",
41
+ id: "Group"
42
+ }, "Groups")]
43
+ }, {
44
+ 'data-id': 'Applications-data-id',
45
+ heading: 'Applications',
46
+ icon: AppsIcon,
47
+ key: 'Applications',
48
+ children: [___EmotionJSX(NavBarItemButton, {
49
+ key: "Applications-sub",
50
+ id: "Applications-sub"
51
+ }, "Applications"), ___EmotionJSX(NavBarItemButton, {
52
+ key: "Resources",
53
+ id: "Resources"
54
+ }, "Resourcess")]
55
+ }];
56
+ var secondSectionData = [{
57
+ 'data-id': 'Authentication-data-id',
58
+ heading: 'Authentication',
59
+ icon: CheckCircleOutlineIcon,
60
+ key: 'Authentication',
61
+ children: [___EmotionJSX(NavBarItemButton, {
62
+ key: "Authentication-Policies",
63
+ id: "Authentication-Policies"
64
+ }, "Authentication Policies"), ___EmotionJSX(NavBarItemButton, {
65
+ key: "Password-Policies",
66
+ id: "Password-Policies"
67
+ }, "Password Policies")]
68
+ }, {
69
+ 'data-id': 'Threat Protection-data-id',
70
+ heading: 'Threat Protection',
71
+ icon: ShieldCheckOutlineIcon,
72
+ key: 'Threat Protection',
73
+ children: [___EmotionJSX(NavBarItemButton, {
74
+ key: "Risk Policies",
75
+ id: "Risk Policies"
76
+ }, "Risk Policies"), ___EmotionJSX(NavBarItemButton, {
77
+ key: "Predictors",
78
+ id: "Predictors"
79
+ }, "Predictors")]
80
+ }, {
81
+ 'data-id': 'Threat Protection-data-id',
82
+ heading: 'Identity Verification',
83
+ icon: LayersOutlineIcon,
84
+ key: 'Identity Verification',
85
+ children: [___EmotionJSX(NavBarItemButton, {
86
+ key: "Verify Policies",
87
+ id: "Verify Policies"
88
+ }, "Verify Policies")]
89
+ }, {
90
+ 'data-id': 'Digital Credentials-data-id',
91
+ heading: 'Digital Credentials',
92
+ icon: CodeTagsIcon,
93
+ key: 'Digital Credentials',
94
+ children: [___EmotionJSX(NavBarItemButton, {
95
+ key: "Management",
96
+ id: "Management"
97
+ }, "Management")]
98
+ }, {
99
+ 'data-id': 'Authorization-data-id',
100
+ heading: 'Authorization',
101
+ icon: AccountCheckIcon,
102
+ key: 'Authorization',
103
+ children: [___EmotionJSX(NavBarItemButton, {
104
+ key: "Trust Framework",
105
+ id: "Trust Framework"
106
+ }, "Trust Framework"), ___EmotionJSX(NavBarItemButton, {
107
+ key: "Policies",
108
+ id: "Policies"
109
+ }, "Policies")]
110
+ }];
111
+ var thirdSectionData = [{
112
+ 'data-id': 'Integrations-data-id',
113
+ heading: 'Integrations',
114
+ icon: WidgetsOutlineIcon,
115
+ key: 'Integrations',
116
+ children: [___EmotionJSX(NavBarItemButton, {
117
+ key: "External IDPs",
118
+ id: "External IDPs"
119
+ }, "External IDPs"), ___EmotionJSX(NavBarItemButton, {
120
+ key: "Provisioning",
121
+ id: "Provisioning"
122
+ }, "Provisioning")]
123
+ }, {
124
+ 'data-id': 'User Experience-data-id',
125
+ heading: 'User Experience',
126
+ icon: PaletteOutlineIcon,
127
+ key: 'User Experience',
128
+ children: [___EmotionJSX(NavBarItemButton, {
129
+ key: "Notification Templates",
130
+ id: "Notification Templates"
131
+ }, "Notification Templates"), ___EmotionJSX(NavBarItemButton, {
132
+ key: "Notification Policies",
133
+ id: "Notification Policies"
134
+ }, "Notification Policies")]
135
+ }, {
136
+ 'data-id': 'Settings-data-id',
137
+ heading: 'Settings',
138
+ icon: CogOutlineIcon,
139
+ key: 'Settings',
140
+ children: [___EmotionJSX(NavBarItemButton, {
141
+ key: "Certificates & Key Pairs",
142
+ id: "Certificates & Key Pairs"
143
+ }, "Certificates & Key Pairs"), ___EmotionJSX(NavBarItemButton, {
144
+ key: "Domains",
145
+ id: "Domains"
146
+ }, "Domains")]
147
+ }];
148
+ var _useGetTheme = useGetTheme(),
149
+ icons = _useGetTheme.icons;
150
+ return ___EmotionJSX(NavBar, null, ___EmotionJSX(Box, {
151
+ padding: "md",
152
+ key: "top-logo-parent"
153
+ }, icons.pingLogoHorizontalSmall), ___EmotionJSX(Box, {
154
+ variant: "navBar.sectionContainer",
155
+ paddingBottom: "xl",
156
+ key: "first-section-container"
157
+ }, ___EmotionJSX(NavBarItem, {
158
+ "data-id": "nav-bar-item",
159
+ icon: DashboardIcon,
160
+ id: "Overview",
161
+ key: "Overview",
162
+ text: "Overview"
163
+ }), ___EmotionJSX(NavBarSection, {
164
+ items: firstSectionData,
165
+ "data-id": "nav-bar-section"
166
+ }), ___EmotionJSX(Separator, {
167
+ variant: "separator.navBarSeparator"
168
+ }), ___EmotionJSX(NavBarItem, {
169
+ "data-id": "nav-bar-item",
170
+ icon: FileTreeIcon,
171
+ id: "DaVinci",
172
+ key: "DaVinci",
173
+ text: "DaVinci"
174
+ }), ___EmotionJSX(NavBarSection, {
175
+ items: secondSectionData,
176
+ "data-id": "second-nav-bar-section"
177
+ }), ___EmotionJSX(NavBarSection, {
178
+ items: thirdSectionData,
179
+ hasSeparator: true,
180
+ "data-id": "third-nav-bar-section"
181
+ })));
182
+ };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { AstroProvider, NextGenDarkTheme } from '../../../..';
3
- import { NavBarNextGenComponent } from '../../../themes/next-gen/stories/NavBarNextGenComponent';
2
+ import { AstroProvider, NextGenDarkTheme } from '../../..';
3
+ import { NavBarNextGenComponent } from './NavBarNextGenComponent';
4
4
  import { jsx as ___EmotionJSX } from "@emotion/react";
5
5
  export default {
6
6
  title: 'Chromatic Only Onyx Dark NavBar'
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { AstroProvider, NextGenTheme } from '../../../..';
2
+ import { AstroProvider, NextGenTheme } from '../../..';
3
3
  import { NavBarNextGenComponent } from './NavBarNextGenComponent';
4
4
  import { jsx as ___EmotionJSX } from "@emotion/react";
5
5
  export default {
@@ -5,7 +5,7 @@ import React, { forwardRef, useImperativeHandle } from 'react';
5
5
  import { mergeProps, useFocusRing } from 'react-aria';
6
6
  import { useHover, usePress } from '@react-aria/interactions';
7
7
  import { useNavBarContext } from '../../context/NavBarContext';
8
- import { useLocalOrForwardRef, useNavBarPress, useStatusClasses } from '../../hooks';
8
+ import { useGetTheme, useLocalOrForwardRef, useNavBarPress, useStatusClasses } from '../../hooks';
9
9
  import { Box, Icon, Text } from '../../index';
10
10
  import { jsx as ___EmotionJSX } from "@emotion/react";
11
11
  var NavBarItem = /*#__PURE__*/forwardRef(function (props, ref) {
@@ -53,6 +53,8 @@ var NavBarItem = /*#__PURE__*/forwardRef(function (props, ref) {
53
53
  }),
54
54
  classNames = _useStatusClasses.classNames;
55
55
  var color = isSelected ? 'white' : 'neutral.95';
56
+ var _useGetTheme = useGetTheme(),
57
+ isOnyx = _useGetTheme.themeState.isOnyx;
56
58
  return ___EmotionJSX(Box, _extends({
57
59
  id: key,
58
60
  variant: state.navStyles.navBarItem,
@@ -74,7 +76,7 @@ var NavBarItem = /*#__PURE__*/forwardRef(function (props, ref) {
74
76
  title: {
75
77
  name: text
76
78
  },
77
- size: "sm",
79
+ size: isOnyx ? 'icon-200' : 'sm',
78
80
  sx: {
79
81
  mr: 'sm',
80
82
  color: color,
@@ -26,6 +26,7 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
26
26
  heading = item.heading;
27
27
  var navBarState = useNavBarContext();
28
28
  var _useGetTheme = useGetTheme(),
29
+ isOnyx = _useGetTheme.themeState.isOnyx,
29
30
  icons = _useGetTheme.icons;
30
31
  var MenuDown = icons.MenuDown,
31
32
  MenuUp = icons.MenuUp;
@@ -61,7 +62,7 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
61
62
  "data-testid": heading
62
63
  }, icon && ___EmotionJSX(Icon, {
63
64
  icon: icon,
64
- size: "sm",
65
+ size: isOnyx ? 'icon-200' : 'sm',
65
66
  sx: {
66
67
  mr: 'sm',
67
68
  color: getIconColor(),
@@ -78,7 +79,7 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
78
79
  }
79
80
  }, ___EmotionJSX(Icon, {
80
81
  icon: isExpanded ? MenuUp : MenuDown,
81
- size: navStyles.navBarItemHeaderIconSize,
82
+ size: isOnyx ? 'icon-100' : navStyles.navBarItemHeaderIconSize,
82
83
  sx: {
83
84
  color: getIconColor(),
84
85
  fill: getIconColor()
@@ -96,6 +97,8 @@ var NavBarPrimaryItemHeader = function NavBarPrimaryItemHeader(_ref3) {
96
97
  customIcon = item.customIcon;
97
98
  var navBarState = useNavBarContext();
98
99
  var navStyles = navBarState.navStyles;
100
+ var _useGetTheme2 = useGetTheme(),
101
+ isOnyx = _useGetTheme2.themeState.isOnyx;
99
102
  return ___EmotionJSX(Box, {
100
103
  variant: navStyles.navBarItemHeader,
101
104
  className: className,
@@ -103,7 +106,7 @@ var NavBarPrimaryItemHeader = function NavBarPrimaryItemHeader(_ref3) {
103
106
  "data-testid": heading
104
107
  }, icon && ___EmotionJSX(Icon, {
105
108
  icon: icon,
106
- size: "sm",
109
+ size: isOnyx ? 'icon-200' : 'sm',
107
110
  sx: {
108
111
  mr: 'sm',
109
112
  color: 'neutral.95',
@@ -123,7 +126,7 @@ var NavBarPrimaryItemHeader = function NavBarPrimaryItemHeader(_ref3) {
123
126
  }
124
127
  }, customIcon && ___EmotionJSX(Icon, {
125
128
  icon: customIcon,
126
- size: "sm",
129
+ size: isOnyx ? 'icon-200' : 'sm',
127
130
  sx: {
128
131
  color: 'neutral.95',
129
132
  fill: 'neutral.95'
@@ -0,0 +1,83 @@
1
+ import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
2
+ import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
3
+ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
4
+ import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
5
+ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
6
+ import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
7
+ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
8
+ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
9
+ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
10
+ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
11
+ 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; }
12
+ 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; }
13
+ import React from 'react';
14
+ import ViewDashboard from '@pingux/mdi-react/ViewDashboardIcon';
15
+ import { useGetTheme } from '../../hooks';
16
+ import { render, screen } from '../../utils/testUtils/testWrapper';
17
+ import NavBar from '../NavBar';
18
+ import NavBarSection from './NavBarSection';
19
+ import { jsx as ___EmotionJSX } from "@emotion/react";
20
+ var data = [{
21
+ 'data-id': 'dashboard-data-id',
22
+ heading: 'Dashboard',
23
+ icon: ViewDashboard,
24
+ key: 'Dashboard',
25
+ children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles', 'Dashboard Unique']
26
+ }];
27
+ var mockTheme = {
28
+ themeState: {
29
+ isOnyx: false
30
+ },
31
+ icons: {
32
+ MenuDown: function MenuDown() {
33
+ return ___EmotionJSX("span", null, "MenuDown");
34
+ },
35
+ MenuUp: function MenuUp() {
36
+ return ___EmotionJSX("span", null, "MenuUp");
37
+ }
38
+ }
39
+ };
40
+ jest.mock('../../hooks/useGetTheme', function () {
41
+ return {
42
+ __esModule: true,
43
+ "default": jest.fn()
44
+ };
45
+ });
46
+ var NavBarWithSection = /*#__PURE__*/React.forwardRef(function (props, ref) {
47
+ return ___EmotionJSX(NavBar, null, ___EmotionJSX(NavBarSection, _extends({
48
+ ref: ref
49
+ }, props, {
50
+ items: data
51
+ })));
52
+ });
53
+ var getComponent = function getComponent() {
54
+ return render(___EmotionJSX(NavBarWithSection, null));
55
+ };
56
+ describe('NavItemHeader', function () {
57
+ beforeEach(function () {
58
+ jest.clearAllMocks();
59
+ useGetTheme.mockReturnValue(mockTheme);
60
+ });
61
+ it('should render Icon', function () {
62
+ getComponent();
63
+ var icon = screen.getByTestId('Dashboard').querySelector('svg');
64
+ expect(icon).toBeInTheDocument();
65
+ expect(icon).toHaveAttribute('width', '20px');
66
+ });
67
+ });
68
+ describe('NavItemHeader', function () {
69
+ beforeEach(function () {
70
+ jest.clearAllMocks();
71
+ useGetTheme.mockReturnValue(_objectSpread(_objectSpread({}, mockTheme), {}, {
72
+ themeState: {
73
+ isOnyx: true
74
+ }
75
+ }));
76
+ });
77
+ it('should render Icon', function () {
78
+ getComponent();
79
+ var icon = screen.getByTestId('Dashboard').querySelector('svg');
80
+ expect(icon).toBeInTheDocument();
81
+ expect(icon).toHaveAttribute('width', 'icon-200');
82
+ });
83
+ });
@@ -7,7 +7,11 @@ export var componentSpecificNextGenBlacklist = {
7
7
  MultivaluesField: ['Condensed', 'Condensed With Section'],
8
8
  PasswordField: ['Success'],
9
9
  TextField: ['Success'],
10
- OverlayPanel: ['Expandable']
10
+ OverlayPanel: ['Expandable'],
11
+ NavBar: ['Default', 'Controlled', 'Auto Collapse']
12
+ };
13
+ export var astroBlacklistStory = {
14
+ NavBar: ['Onyx Default']
11
15
  };
12
16
  export var nextGenOnlyComponents = ['NavigationHeader', 'Prompt', 'AI Panel', 'Response', 'Suggestions', 'Prompt Input'];
13
17
  export default nextGenConvertedComponents;
@@ -10,6 +10,10 @@ 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
12
  import buttons from './button';
13
+ var navBarFocus = {
14
+ outline: '2px solid',
15
+ outlineColor: 'active'
16
+ };
13
17
  var nextGen = {
14
18
  color: 'gray-800',
15
19
  fontSize: 'md',
@@ -62,6 +66,12 @@ var button = _objectSpread(_objectSpread({}, buttons["default"]), {}, {
62
66
  var primaryButton = _objectSpread(_objectSpread({}, buttons.primary), {}, {
63
67
  textDecoration: 'none'
64
68
  });
69
+ var navBarLogoLink = {
70
+ borderRadius: '4px',
71
+ px: 'md',
72
+ py: 'sm',
73
+ '&.is-focused': _objectSpread({}, navBarFocus)
74
+ };
65
75
  export default {
66
76
  nextGen: nextGen,
67
77
  onyx: onyx,
@@ -69,5 +79,6 @@ export default {
69
79
  footerLinks: footerLinks,
70
80
  footerHeader: footerHeader,
71
81
  button: button,
72
- primaryButton: primaryButton
82
+ primaryButton: primaryButton,
83
+ navBarLogoLink: navBarLogoLink
73
84
  };
@@ -20,11 +20,15 @@ export var navBarFocus = {
20
20
  };
21
21
  export var navBar = {
22
22
  container: {
23
+ fontFamily: 'standard',
23
24
  width: '252px',
24
25
  p: 'sm',
25
26
  backgroundColor: 'background.base',
26
27
  boxShadow: '0 .5rem 1rem rgba(0, 0, 0, .15)'
27
28
  },
29
+ sectionContainer: {
30
+ pt: '0'
31
+ },
28
32
  sectionButton: {
29
33
  borderRadius: '4px',
30
34
  '&.is-hovered': {
@@ -38,7 +42,7 @@ export var navBar = {
38
42
  itemButton: {
39
43
  py: '.75rem',
40
44
  paddingLeft: '53px',
41
- color: 'text.primary',
45
+ color: 'gray-700',
42
46
  borderRadius: '4px',
43
47
  '&.is-focused': _objectSpread({}, navBarFocus),
44
48
  '&.is-hovered': {
@@ -46,7 +50,7 @@ export var navBar = {
46
50
  },
47
51
  '&.is-pressed': {
48
52
  backgroundColor: 'gray-200',
49
- color: 'text.primary'
53
+ color: 'gray-700'
50
54
  },
51
55
  '&.is-selected': {
52
56
  bg: 'lightblue',
@@ -55,7 +59,7 @@ export var navBar = {
55
59
  }
56
60
  },
57
61
  subtitle: {
58
- color: 'text.primary'
62
+ color: 'gray-700'
59
63
  },
60
64
  headerText: {
61
65
  color: 'text.primary',
@@ -79,13 +83,13 @@ export var navBar = {
79
83
  item: {
80
84
  px: '1rem',
81
85
  py: '.75rem',
82
- color: 'text.primary',
86
+ color: 'gray-700',
83
87
  borderRadius: '4px',
84
88
  '&.is-hovered': {
85
89
  backgroundColor: 'light'
86
90
  },
87
91
  '> div > svg': {
88
- fill: 'text.primary'
92
+ fill: 'gray-700'
89
93
  },
90
94
  '&.is-pressed': {
91
95
  backgroundColor: 'gray-200'
@@ -112,10 +116,10 @@ export var navBar = {
112
116
  '&.is-selected': _objectSpread({}, navBarSelected),
113
117
  backgroundColor: 'transparent',
114
118
  '> svg': {
115
- fill: 'text.primary'
119
+ fill: 'gray-700'
116
120
  },
117
121
  '> div > svg': {
118
- fill: 'text.primary'
122
+ fill: 'gray-700'
119
123
  }
120
124
  },
121
125
  navBarItemBody: {
@@ -1,8 +1,8 @@
1
1
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
2
- import nextGenConvertedComponents, { componentSpecificNextGenBlacklist, nextGenOnlyComponents } from '../../styles/themes/next-gen/convertedComponentList';
2
+ import nextGenConvertedComponents, { astroBlacklistStory, componentSpecificNextGenBlacklist, nextGenOnlyComponents } from '../../styles/themes/next-gen/convertedComponentList';
3
3
  import { themes } from './constants/themes';
4
4
  export var shouldReturnComingSoon = function shouldReturnComingSoon(context, selectedTheme) {
5
- var _context;
5
+ var _context, _context2;
6
6
  var story = context.name;
7
7
  var component = context.title.split('/')[1];
8
8
  var isNextGenOnlyComponent = _includesInstanceProperty(nextGenOnlyComponents).call(nextGenOnlyComponents, component) || context.title.split('/')[0] === 'Onyx Recipes';
@@ -11,8 +11,14 @@ export var shouldReturnComingSoon = function shouldReturnComingSoon(context, sel
11
11
  return false;
12
12
  }
13
13
 
14
+ // if a story made for NextGen theme only, and the selected theme is Astro,
15
+ // return the coming soon message
16
+ if (astroBlacklistStory[component] && _includesInstanceProperty(_context = astroBlacklistStory[component]).call(_context, story) && selectedTheme === themes.ASTRO) {
17
+ return true;
18
+ }
19
+
14
20
  // if a specific story has not been converted, return the coming soon message
15
- if (componentSpecificNextGenBlacklist[component] && _includesInstanceProperty(_context = componentSpecificNextGenBlacklist[component]).call(_context, story) && (selectedTheme === themes.NEXT_GEN || selectedTheme === themes.NEXT_GEN_DARK)) {
21
+ if (componentSpecificNextGenBlacklist[component] && _includesInstanceProperty(_context2 = componentSpecificNextGenBlacklist[component]).call(_context2, story) && (selectedTheme === themes.NEXT_GEN || selectedTheme === themes.NEXT_GEN_DARK)) {
16
22
  return true;
17
23
  }
18
24
  // if the component has NOT been converted, and the active theme is NextGen
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.119.0-alpha.1",
3
+ "version": "2.119.0-alpha.2",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const Default: () => React.JSX.Element;
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
5
- _Object$defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = exports.Default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _NavBarNextGenComponent = require("../../styles/themes/next-gen/stories/NavBarNextGenComponent");
11
- var _react2 = require("@emotion/react");
12
- var _default = {
13
- title: 'Onyx Recipes/NavBar'
14
- };
15
- exports["default"] = _default;
16
- var Default = function Default() {
17
- return (0, _react2.jsx)(_NavBarNextGenComponent.NavBarNextGenComponent, null);
18
- };
19
- exports.Default = Default;