@pingux/astro 1.1.0-alpha.1 → 1.1.0-alpha.13

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 (104) hide show
  1. package/CHANGELOG.md +121 -0
  2. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.test.js +24 -0
  3. package/lib/cjs/components/AccordionGridItem/AccordionGridItemBody.js +1 -1
  4. package/lib/cjs/components/AccordionGridItem/AccordionGridItemHeader.js +1 -1
  5. package/lib/cjs/components/AccordionGroup/AccordionGroup.test.js +33 -1
  6. package/lib/cjs/components/AccordionItem/AccordionItem.js +5 -4
  7. package/lib/cjs/components/Button/Button.js +1 -2
  8. package/lib/cjs/components/Button/Button.stories.js +2 -1
  9. package/lib/cjs/components/Button/Button.test.js +2 -1
  10. package/lib/cjs/components/CodeView/CodeView.js +165 -0
  11. package/lib/cjs/components/CodeView/CodeView.stories.js +93 -0
  12. package/lib/cjs/components/CodeView/CodeView.test.js +211 -0
  13. package/lib/cjs/components/CodeView/index.js +18 -0
  14. package/lib/cjs/components/ColorField/ColorField.js +1 -0
  15. package/lib/cjs/components/ComboBoxField/ComboBoxField.js +7 -0
  16. package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +25 -1
  17. package/lib/cjs/components/ComboBoxField/ComboBoxField.test.js +44 -0
  18. package/lib/cjs/components/CopyText/CopyText.js +34 -11
  19. package/lib/cjs/components/FileInputField/FileItem.js +2 -1
  20. package/lib/cjs/components/IconButton/IconButton.js +1 -1
  21. package/lib/cjs/components/IconButton/IconButton.stories.js +8 -17
  22. package/lib/cjs/components/IconButton/IconButton.test.js +4 -5
  23. package/lib/cjs/components/ImageUploadField/ImagePreviewButton.js +2 -1
  24. package/lib/cjs/components/List/List.js +3 -0
  25. package/lib/cjs/components/List/List.stories.js +7 -2
  26. package/lib/cjs/components/ListBox/ListBox.js +3 -6
  27. package/lib/cjs/components/ListBox/ListBox.test.js +2 -0
  28. package/lib/cjs/components/ListBox/Option.js +6 -0
  29. package/lib/cjs/components/Messages/Message.js +2 -2
  30. package/lib/cjs/components/MultivaluesField/MultivaluesField.js +2 -1
  31. package/lib/cjs/components/NavBar/NavBar.js +38 -0
  32. package/lib/cjs/components/NavBar/NavBar.stories.js +679 -0
  33. package/lib/cjs/components/NavBar/NavBar.test.js +116 -0
  34. package/lib/cjs/components/NavBar/index.js +18 -0
  35. package/lib/cjs/components/NavBarSection/NavBarItemBody.js +56 -0
  36. package/lib/cjs/components/NavBarSection/NavBarItemHeader.js +47 -0
  37. package/lib/cjs/components/NavBarSection/NavBarSection.js +82 -0
  38. package/lib/cjs/components/NavBarSection/index.js +18 -0
  39. package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +15 -14
  40. package/lib/cjs/components/PopoverContainer/PopoverContainer.test.js +15 -0
  41. package/lib/cjs/components/Separator/Separator.js +1 -1
  42. package/lib/cjs/components/TextArea/TextArea.js +5 -1
  43. package/lib/cjs/components/TooltipTrigger/TooltipTrigger.js +10 -5
  44. package/lib/cjs/index.js +84 -30
  45. package/lib/cjs/styles/variants/accordion.js +34 -3
  46. package/lib/cjs/styles/variants/boxes.js +24 -1
  47. package/lib/cjs/styles/variants/buttons.js +39 -1
  48. package/lib/cjs/styles/variants/codeView.js +80 -0
  49. package/lib/cjs/styles/variants/link.js +1 -1
  50. package/lib/cjs/styles/variants/separator.js +46 -3
  51. package/lib/cjs/styles/variants/text.js +15 -0
  52. package/lib/cjs/styles/variants/variants.js +3 -0
  53. package/lib/components/AccordionGridGroup/AccordionGridGroup.test.js +23 -1
  54. package/lib/components/AccordionGridItem/AccordionGridItemBody.js +1 -1
  55. package/lib/components/AccordionGridItem/AccordionGridItemHeader.js +1 -1
  56. package/lib/components/AccordionGroup/AccordionGroup.test.js +30 -1
  57. package/lib/components/AccordionItem/AccordionItem.js +6 -5
  58. package/lib/components/Button/Button.js +2 -3
  59. package/lib/components/Button/Button.stories.js +2 -1
  60. package/lib/components/Button/Button.test.js +2 -1
  61. package/lib/components/CodeView/CodeView.js +130 -0
  62. package/lib/components/CodeView/CodeView.stories.js +67 -0
  63. package/lib/components/CodeView/CodeView.test.js +171 -0
  64. package/lib/components/CodeView/index.js +1 -0
  65. package/lib/components/ColorField/ColorField.js +1 -0
  66. package/lib/components/ComboBoxField/ComboBoxField.js +7 -0
  67. package/lib/components/ComboBoxField/ComboBoxField.stories.js +21 -0
  68. package/lib/components/ComboBoxField/ComboBoxField.test.js +35 -0
  69. package/lib/components/CopyText/CopyText.js +35 -11
  70. package/lib/components/FileInputField/FileItem.js +2 -1
  71. package/lib/components/IconButton/IconButton.js +1 -1
  72. package/lib/components/IconButton/IconButton.stories.js +7 -13
  73. package/lib/components/IconButton/IconButton.test.js +4 -5
  74. package/lib/components/ImageUploadField/ImagePreviewButton.js +2 -1
  75. package/lib/components/List/List.js +2 -0
  76. package/lib/components/List/List.stories.js +6 -2
  77. package/lib/components/ListBox/ListBox.js +3 -5
  78. package/lib/components/ListBox/ListBox.test.js +2 -0
  79. package/lib/components/ListBox/Option.js +6 -0
  80. package/lib/components/Messages/Message.js +2 -2
  81. package/lib/components/MultivaluesField/MultivaluesField.js +2 -1
  82. package/lib/components/NavBar/NavBar.js +24 -0
  83. package/lib/components/NavBar/NavBar.stories.js +650 -0
  84. package/lib/components/NavBar/NavBar.test.js +92 -0
  85. package/lib/components/NavBar/index.js +1 -0
  86. package/lib/components/NavBarSection/NavBarItemBody.js +37 -0
  87. package/lib/components/NavBarSection/NavBarItemHeader.js +31 -0
  88. package/lib/components/NavBarSection/NavBarSection.js +65 -0
  89. package/lib/components/NavBarSection/index.js +1 -0
  90. package/lib/components/OverlayPanel/OverlayPanel.stories.js +7 -5
  91. package/lib/components/PopoverContainer/PopoverContainer.test.js +16 -1
  92. package/lib/components/Separator/Separator.js +1 -1
  93. package/lib/components/TextArea/TextArea.js +5 -1
  94. package/lib/components/TooltipTrigger/TooltipTrigger.js +10 -5
  95. package/lib/index.js +5 -0
  96. package/lib/styles/variants/accordion.js +34 -3
  97. package/lib/styles/variants/boxes.js +24 -1
  98. package/lib/styles/variants/buttons.js +39 -1
  99. package/lib/styles/variants/codeView.js +68 -0
  100. package/lib/styles/variants/link.js +1 -1
  101. package/lib/styles/variants/separator.js +33 -1
  102. package/lib/styles/variants/text.js +15 -0
  103. package/lib/styles/variants/variants.js +2 -0
  104. package/package.json +3 -1
@@ -0,0 +1,92 @@
1
+ import React from 'react';
2
+ import GlobeIcon from 'mdi-react/GlobeIcon';
3
+ import ViewDashboard from 'mdi-react/ViewDashboardIcon';
4
+ import AccountMultiple from 'mdi-react/AccountMultipleIcon';
5
+ import TransitConnection from 'mdi-react/TransitConnectionVariantIcon';
6
+ import EmoticonHappy from 'mdi-react/EmoticonHappyOutlineIcon';
7
+ import Fingerprint from 'mdi-react/FingerprintIcon';
8
+ import ScaleBalance from 'mdi-react/ScaleBalanceIcon';
9
+ import Verify from 'mdi-react/VerifiedIcon';
10
+ import NavBar from './NavBar';
11
+ import axeTest from '../../utils/testUtils/testAxe';
12
+ import { render, screen } from '../../utils/testUtils/testWrapper';
13
+ import { Box, NavBarSection } from '../../index';
14
+ import { jsx as ___EmotionJSX } from "@emotion/react";
15
+ var data = [{
16
+ icon: GlobeIcon,
17
+ key: 'Overview',
18
+ heading: 'Overview',
19
+ children: ['Users', 'Group', 'Populations', 'Attributes', 'A roles title that is really really really really long']
20
+ }, {
21
+ icon: ViewDashboard,
22
+ key: 'Dashboard',
23
+ heading: 'Dashboard',
24
+ children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
25
+ }, {
26
+ icon: AccountMultiple,
27
+ key: 'Identities',
28
+ heading: 'Identities',
29
+ children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
30
+ }, {
31
+ icon: TransitConnection,
32
+ key: 'Connections',
33
+ heading: 'Connections',
34
+ children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
35
+ }, {
36
+ icon: EmoticonHappy,
37
+ key: 'Experiences',
38
+ heading: 'Experiences',
39
+ children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
40
+ }];
41
+ var secondData = [{
42
+ icon: Fingerprint,
43
+ key: 'MFA',
44
+ heading: 'MFA',
45
+ children: ['Users', {
46
+ subTitle: 'PingOne Services'
47
+ }, 'Group', 'Populations', 'Attributes', 'Roles']
48
+ }, {
49
+ icon: ScaleBalance,
50
+ key: 'Risk',
51
+ heading: 'Risk',
52
+ children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
53
+ }, {
54
+ icon: Verify,
55
+ key: 'Verify',
56
+ heading: 'Verify',
57
+ children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
58
+ }];
59
+
60
+ var getComponent = function getComponent() {
61
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
62
+ return render(___EmotionJSX(NavBar, props, ___EmotionJSX(Box, {
63
+ sx: {
64
+ height: '100%',
65
+ maxHeight: '100%',
66
+ overflowY: 'overlay !important'
67
+ }
68
+ }, ___EmotionJSX(NavBarSection, {
69
+ items: data,
70
+ hasSeparator: true
71
+ }), ___EmotionJSX(NavBarSection, {
72
+ items: secondData,
73
+ title: "test_title"
74
+ }))));
75
+ };
76
+
77
+ axeTest(getComponent);
78
+ test('should render basic nav with children', function () {
79
+ getComponent();
80
+ var nav = screen.queryByRole('navigation');
81
+ expect(nav).toBeInTheDocument();
82
+ });
83
+ test('should render title for sections that have titles', function () {
84
+ getComponent();
85
+ var title = screen.getByText('test_title');
86
+ expect(title).toBeInTheDocument();
87
+ });
88
+ test('should render title for itemBodies that have subTitles', function () {
89
+ getComponent();
90
+ var subTitle = screen.getByText('PingOne Services');
91
+ expect(subTitle).toBeInTheDocument();
92
+ });
@@ -0,0 +1 @@
1
+ export { default } from './NavBar';
@@ -0,0 +1,37 @@
1
+ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
2
+ import React, { Fragment } from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import { Separator, Box, Text } from '../../index';
5
+ import { jsx as ___EmotionJSX } from "@emotion/react";
6
+
7
+ var NavBarItemBody = function NavBarItemBody(props) {
8
+ var _context;
9
+
10
+ return ___EmotionJSX(Box, {
11
+ sx: {
12
+ alignItems: 'flex-start',
13
+ mb: '15px'
14
+ }
15
+ }, _mapInstanceProperty(_context = props.item.children).call(_context, function (child) {
16
+ return child.subTitle ? ___EmotionJSX(Fragment, {
17
+ key: "fragment".concat(child.subTitle)
18
+ }, ___EmotionJSX(Separator, {
19
+ variant: "separator.navBarSubtitleSeparator",
20
+ key: "separator".concat(child.subTitle)
21
+ }), ___EmotionJSX(Text, {
22
+ key: "text".concat(child.subTitle),
23
+ variant: "text.navBarSubtitle",
24
+ sx: {
25
+ mb: '10px',
26
+ ml: '45px'
27
+ }
28
+ }, child.subTitle)) : child;
29
+ }));
30
+ };
31
+
32
+ NavBarItemBody.propTypes = {
33
+ item: PropTypes.shape({
34
+ children: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.object]))
35
+ })
36
+ };
37
+ export default NavBarItemBody;
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { Box, Icon, Text } from '../../index';
4
+ import { jsx as ___EmotionJSX } from "@emotion/react";
5
+
6
+ var NavBarItemHeader = function NavBarItemHeader(props) {
7
+ var item = props.item;
8
+ var icon = item.icon;
9
+ return ___EmotionJSX(Box, {
10
+ variant: "boxes.navBarItemHeaderContainer",
11
+ isRow: true
12
+ }, icon && ___EmotionJSX(Icon, {
13
+ icon: icon,
14
+ size: 20,
15
+ sx: {
16
+ mr: '10px',
17
+ color: 'white',
18
+ fill: 'white'
19
+ }
20
+ }), ___EmotionJSX(Text, {
21
+ variant: "navBarHeaderText"
22
+ }, props.item.heading));
23
+ };
24
+
25
+ NavBarItemHeader.propTypes = {
26
+ item: PropTypes.shape({
27
+ heading: PropTypes.string,
28
+ icon: PropTypes.elementType
29
+ })
30
+ };
31
+ export default NavBarItemHeader;
@@ -0,0 +1,65 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { Separator, AccordionGridGroup, Text, Item, Box } from '../../index';
4
+ import NavBarItemBody from './NavBarItemBody';
5
+ import NavBarItemHeader from './NavBarItemHeader';
6
+ /**
7
+ * Composed component that creates an AccordionGrid group
8
+ * with title, and separator options.
9
+ *
10
+ */
11
+
12
+ import { jsx as ___EmotionJSX } from "@emotion/react";
13
+
14
+ var NavBarSection = function NavBarSection(props) {
15
+ var hasSeparator = props.hasSeparator,
16
+ title = props.title,
17
+ items = props.items;
18
+ return ___EmotionJSX(React.Fragment, null, title && ___EmotionJSX(Text, {
19
+ variant: "text.navBarSubtitle",
20
+ sx: {
21
+ mt: '25px',
22
+ mb: '15px',
23
+ ml: '15px'
24
+ }
25
+ }, title), ___EmotionJSX(AccordionGridGroup, {
26
+ items: items
27
+ }, function (item) {
28
+ return ___EmotionJSX(Item, {
29
+ headerProps: {
30
+ variant: 'accordion.accordionGridHeaderNav'
31
+ },
32
+ textValue: item
33
+ }, ___EmotionJSX(NavBarItemHeader, {
34
+ item: item
35
+ }), ___EmotionJSX(NavBarItemBody, {
36
+ item: item
37
+ }));
38
+ }), hasSeparator && ___EmotionJSX(Box, {
39
+ sx: {
40
+ pl: '15px',
41
+ pr: '15px',
42
+ mt: '25px'
43
+ }
44
+ }, ___EmotionJSX(Separator, {
45
+ variant: "separator.navBarSeparator"
46
+ })));
47
+ };
48
+
49
+ NavBarSection.defaultProps = {
50
+ hasSeparator: false
51
+ };
52
+ NavBarSection.propTypes = {
53
+ /** If true, a separator will render at the end of the section */
54
+ hasSeparator: PropTypes.bool,
55
+
56
+ /** If present, this string will render at the top of the section */
57
+ title: PropTypes.string,
58
+
59
+ /**
60
+ * *For performance reasons, use this prop instead of Array.map when iteratively rendering Items*.
61
+ * For use with [dynamic collections](https://react-spectrum.adobe.com/react-stately/collections.html#dynamic-collections).
62
+ */
63
+ items: PropTypes.arrayOf(PropTypes.shape({}))
64
+ };
65
+ export default NavBarSection;
@@ -0,0 +1 @@
1
+ export { default } from './NavBarSection';
@@ -3,9 +3,8 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
3
3
  import React, { useState } from 'react';
4
4
  import { Item } from '@react-stately/collections';
5
5
  import { useOverlayPanelState } from '../../hooks';
6
- import Button from '../Button/Button';
7
6
  import OverlayPanel from './OverlayPanel';
8
- import { OverlayProvider, Box, Text, List, ListItem, Separator, Messages } from '../../index';
7
+ import { OverlayProvider, Box, Text, List, ListItem, Separator, Messages, Button, AccordionGroup } from '../../index';
9
8
  import { panelSizes } from '../../utils/devUtils/constants/panelSizes';
10
9
  import { jsx as ___EmotionJSX } from "@emotion/react";
11
10
  export default {
@@ -47,9 +46,12 @@ export var Default = function Default(_ref) {
47
46
  isOpen: state.isOpen
48
47
  }, args), ___EmotionJSX(Box, null, ___EmotionJSX(Button, {
49
48
  onPress: state.close
50
- }, "Close Panel"), ___EmotionJSX(Text, {
51
- pt: "md"
52
- }, "Children render here."))))
49
+ }, "Close Panel"), ___EmotionJSX(AccordionGroup, args, ___EmotionJSX(Item, {
50
+ key: "accordionKey",
51
+ textValue: "accordionKey",
52
+ label: "Accordion Label",
53
+ "data-id": "accordionItem"
54
+ }, ___EmotionJSX(Text, null, "Render me!"))))))
53
55
  );
54
56
  };
55
57
  export var InnerPanel = function InnerPanel(_ref2) {
@@ -1,13 +1,20 @@
1
1
  import React from 'react';
2
2
  import axeTest from '../../utils/testUtils/testAxe';
3
3
  import { render, screen } from '../../utils/testUtils/testWrapper';
4
- import { Box } from '../../index';
4
+ import { Box, OverlayPanel } from '../../index';
5
5
  import PopoverContainer from './PopoverContainer';
6
6
  import { jsx as ___EmotionJSX } from "@emotion/react";
7
7
 
8
8
  var getComponent = function getComponent() {
9
9
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10
10
  return render(___EmotionJSX(React.Fragment, null, ___EmotionJSX(PopoverContainer, props, ___EmotionJSX(Box, null, "I am in a popover"))));
11
+ };
12
+
13
+ var getComponentInOverlayPanel = function getComponentInOverlayPanel() {
14
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
15
+ return render(___EmotionJSX(OverlayPanel, {
16
+ isOpen: true
17
+ }, ___EmotionJSX(PopoverContainer, props, ___EmotionJSX(Box, null, "I am in a popover"))));
11
18
  }; // Need to be added to each test file to test accessibility using axe.
12
19
 
13
20
 
@@ -26,4 +33,12 @@ test('should render a popover with no arrow', function () {
26
33
  });
27
34
  var arrow = screen.queryByTestId('popover-arrow');
28
35
  expect(arrow).not.toBeInTheDocument();
36
+ });
37
+ test('popover will not open if wrapped in an overlayPanel', function () {
38
+ getComponentInOverlayPanel({
39
+ popoverProps: {
40
+ 'data-test-id': 'popover-test'
41
+ }
42
+ });
43
+ expect(screen.queryByTestId('popover-test')).not.toBeInTheDocument();
29
44
  });
@@ -29,7 +29,7 @@ var Separator = /*#__PURE__*/forwardRef(function (props, ref) {
29
29
  return ___EmotionJSX(Box, _extends({
30
30
  ref: ref,
31
31
  className: classNames,
32
- variant: "separator"
32
+ variant: "separator.base"
33
33
  }, others, separatorProps));
34
34
  });
35
35
  Separator.propTypes = {
@@ -12,7 +12,11 @@ import { Textarea as ThemeUITextArea } from 'theme-ui';
12
12
  import { jsx as ___EmotionJSX } from "@emotion/react";
13
13
  var TextArea = /*#__PURE__*/forwardRef(function (props, ref) {
14
14
  return ___EmotionJSX(ThemeUITextArea, _extends({
15
- ref: ref
15
+ ref: ref // this requires to fix safari resizing issue (UIP-4995)
16
+ ,
17
+ sx: {
18
+ position: 'relative'
19
+ }
16
20
  }, props));
17
21
  });
18
22
  TextArea.displayName = 'TextArea';
@@ -32,7 +32,8 @@ var TooltipTrigger = /*#__PURE__*/forwardRef(function (props, ref) {
32
32
  className = props.className,
33
33
  isNotFlippable = props.isNotFlippable,
34
34
  isDarkMode = props.isDarkMode,
35
- hasNoArrow = props.hasNoArrow;
35
+ hasNoArrow = props.hasNoArrow,
36
+ targetRef = props.targetRef;
36
37
 
37
38
  var _React$Children$toArr = React.Children.toArray(children),
38
39
  _React$Children$toArr2 = _slicedToArray(_React$Children$toArr, 2),
@@ -42,23 +43,24 @@ var TooltipTrigger = /*#__PURE__*/forwardRef(function (props, ref) {
42
43
  var state = useTooltipTriggerState(props);
43
44
  var tooltipTriggerRef = useRef();
44
45
  var overlayRef = useRef();
46
+ var tooltipRef = targetRef || tooltipTriggerRef;
45
47
  usePropWarning(props, 'disabled', 'isDisabled');
46
48
  /* istanbul ignore next */
47
49
 
48
50
  useImperativeHandle(ref, function () {
49
- return tooltipTriggerRef.current;
51
+ return tooltipRef.current;
50
52
  });
51
53
 
52
54
  var _useTooltipTrigger = useTooltipTrigger({
53
55
  isDisabled: isDisabled,
54
56
  trigger: triggerAction
55
- }, state, tooltipTriggerRef),
57
+ }, state, tooltipRef),
56
58
  triggerProps = _useTooltipTrigger.triggerProps,
57
59
  tooltipProps = _useTooltipTrigger.tooltipProps;
58
60
 
59
61
  var _useOverlayPosition = useOverlayPosition({
60
62
  placement: _concatInstanceProperty(_context = "".concat(direction, " ")).call(_context, align),
61
- targetRef: tooltipTriggerRef,
63
+ targetRef: tooltipRef,
62
64
  overlayRef: overlayRef,
63
65
  offset: offset,
64
66
  // Our API preference is for default false so we invert this since it should be default true
@@ -134,7 +136,10 @@ TooltipTrigger.propTypes = {
134
136
  placement: PropTypes.string,
135
137
 
136
138
  /** By default, opens for both focus and hover. Can be made to open only for focus. */
137
- trigger: PropTypes.string
139
+ trigger: PropTypes.string,
140
+
141
+ /* The ref for the element which the overlay positions itself with respect to. */
142
+ targetRef: PropTypes.shape({})
138
143
  };
139
144
  TooltipTrigger.defaultProps = {
140
145
  align: 'middle',
package/lib/index.js CHANGED
@@ -27,6 +27,7 @@ export { default as CheckboxField } from './components/CheckboxField';
27
27
  export * from './components/CheckboxField';
28
28
  export { default as Chip } from './components/Chip';
29
29
  export * from './components/Chip';
30
+ export { default as CodeView } from './components/CodeView';
30
31
  export { default as ComboBoxField } from './components/ComboBoxField';
31
32
  export { default as CopyText } from './components/CopyText';
32
33
  export { default as ColorField } from './components/ColorField';
@@ -68,6 +69,10 @@ export { default as Messages } from './components/Messages';
68
69
  export * from './components/Messages';
69
70
  export { default as Modal } from './components/Modal';
70
71
  export * from './components/Modal';
72
+ export { default as NavBar } from './components/NavBar';
73
+ export * from './components/NavBar';
74
+ export { default as NavBarSection } from './components/NavBarSection';
75
+ export * from './components/NavBarSection';
71
76
  export { default as MultivaluesField } from './components/MultivaluesField';
72
77
  export { default as OverlayPanel } from './components/OverlayPanel';
73
78
  export * from './components/OverlayPanel';
@@ -18,11 +18,11 @@ var accordion = {
18
18
  alignItems: 'flex-start'
19
19
  };
20
20
  var accordionBody = {
21
- display: 'none !important',
21
+ display: 'none',
22
22
  pt: 'md',
23
23
  width: '100%',
24
24
  '.is-open &': {
25
- display: 'flex !important'
25
+ display: 'flex'
26
26
  }
27
27
  };
28
28
  var accordionGridHeader = {
@@ -56,6 +56,36 @@ var accordionGridHeader = {
56
56
  }
57
57
  }
58
58
  };
59
+ var accordionGridHeaderNav = {
60
+ padding: '10px 15px 10px 15px',
61
+ cursor: 'pointer',
62
+ minHeight: '40px',
63
+ lineHeight: '30px',
64
+ outline: 'none',
65
+ display: 'flex',
66
+ justifyContent: 'flex-start',
67
+ flexShrink: 0,
68
+ wordBreak: 'inherit',
69
+ whiteSpace: 'nowrap',
70
+ color: 'neutral.95',
71
+ flexGrow: 1,
72
+ fontWeight: 0,
73
+ fontSize: '16px',
74
+ mt: '5px',
75
+ '&.is-focused': {
76
+ outline: 'none',
77
+ boxShadow: 'focus',
78
+ WebkitBoxShadow: 'focus',
79
+ MozBoxShadow: 'focus'
80
+ },
81
+ '&.is-hovered': {
82
+ backgroundColor: 'accent.10',
83
+ boxShadow: 'inset 2px 0 0 0 white'
84
+ },
85
+ '&.is-pressed': {
86
+ backgroundColor: 'accent.10'
87
+ }
88
+ };
59
89
  var accordionGridBody = {
60
90
  display: 'none !important',
61
91
  pl: 'sm',
@@ -69,5 +99,6 @@ export default {
69
99
  accordionGridBody: accordionGridBody,
70
100
  accordionTitle: accordionTitle,
71
101
  accordion: accordion,
72
- accordionBody: accordionBody
102
+ accordionBody: accordionBody,
103
+ accordionGridHeaderNav: accordionGridHeaderNav
73
104
  };
@@ -189,6 +189,26 @@ var expandableRow = {
189
189
  }
190
190
  }
191
191
  };
192
+ var navBar = {
193
+ height: '100%',
194
+ width: '230px',
195
+ position: 'absolute',
196
+ zIndex: '1',
197
+ top: '0',
198
+ left: '0',
199
+ backgroundColor: 'accent.20',
200
+ overflowY: 'hidden'
201
+ };
202
+ var navBarSectionContainer = {
203
+ height: '100%',
204
+ maxHeight: '100%',
205
+ overflowY: 'overlay !important'
206
+ };
207
+ var navBarItemHeaderContainer = {
208
+ flexGrow: 1,
209
+ alignItems: 'center',
210
+ maxWidth: '180px'
211
+ };
192
212
  var datePicker = {
193
213
  '.react-calendar': {
194
214
  width: 280,
@@ -270,5 +290,8 @@ export default {
270
290
  radioContainer: radioContainer,
271
291
  scrollbox: scrollbox,
272
292
  topShadowScrollbox: topShadowScrollbox,
273
- bottomShadowScrollbox: bottomShadowScrollbox
293
+ bottomShadowScrollbox: bottomShadowScrollbox,
294
+ navBar: navBar,
295
+ navBarSectionContainer: navBarSectionContainer,
296
+ navBarItemHeaderContainer: navBarItemHeaderContainer
274
297
  };
@@ -52,6 +52,33 @@ var defaultFocus = {
52
52
  outline: 'none',
53
53
  boxShadow: 'focus'
54
54
  };
55
+ var navItemButton = {
56
+ textDecoration: 'none',
57
+ outline: 'none',
58
+ cursor: 'pointer',
59
+ borderRadius: 0,
60
+ backgroundColor: 'transparent',
61
+ paddingTop: '5px',
62
+ paddingBottom: '5px',
63
+ display: 'block',
64
+ color: 'neutral.95',
65
+ fontSize: 'sm',
66
+ fontWeight: 1,
67
+ flexGrow: '1',
68
+ width: '100%',
69
+ textAlign: 'left',
70
+ lineHeight: '16px',
71
+ whiteSpace: 'break-spaces',
72
+ overflowWrap: 'break-word',
73
+ maxWidth: '100%',
74
+ wordWrap: 'break-word',
75
+ wordBreak: 'break-word',
76
+ '&.is-focused': _objectSpread({}, defaultFocus),
77
+ '&.is-hovered': {
78
+ bg: 'accent.10',
79
+ boxShadow: 'inset 2px 0 0 0 white'
80
+ }
81
+ };
55
82
  var iconButton = {
56
83
  justifyContent: 'center',
57
84
  appearance: 'none',
@@ -67,7 +94,7 @@ var iconButton = {
67
94
  width: 'inherit',
68
95
  height: 'inherit',
69
96
  path: {
70
- fill: 'neutral.20'
97
+ fill: 'neutral.40'
71
98
  },
72
99
  outline: 'none',
73
100
  '&.is-focused': _objectSpread({}, defaultFocus),
@@ -82,6 +109,10 @@ var iconButton = {
82
109
  }
83
110
  };
84
111
 
112
+ var square = _objectSpread(_objectSpread({}, iconButton), {}, {
113
+ borderRadius: '2px'
114
+ });
115
+
85
116
  var modalCloseButton = _objectSpread(_objectSpread({}, iconButton), {}, {
86
117
  position: 'absolute',
87
118
  top: 14,
@@ -219,6 +250,10 @@ var inverted = _objectSpread(_objectSpread({}, iconButton), {}, {
219
250
  }
220
251
  });
221
252
 
253
+ var invertedSquare = _objectSpread(_objectSpread({}, inverted), {}, {
254
+ borderRadius: '2px'
255
+ });
256
+
222
257
  var applicationPortal = _objectSpread(_objectSpread({}, iconButton), {}, {
223
258
  background: 'transparent',
224
259
  '&.is-focused': _objectSpread({}, defaultFocus),
@@ -508,8 +543,11 @@ export default {
508
543
  text: text,
509
544
  helpHint: helpHint,
510
545
  modalCloseButton: modalCloseButton,
546
+ navItemButton: navItemButton,
511
547
  applicationPortalPinned: applicationPortalPinned,
512
548
  applicationPortal: applicationPortal,
549
+ square: square,
550
+ invertedSquare: invertedSquare,
513
551
  tooltipChip: tooltipChip,
514
552
  tooltipIconButton: tooltipIconButton,
515
553
  tooltipInline: tooltipInline
@@ -0,0 +1,68 @@
1
+ import 'a11y-syntax-highlighting/dist/prism/a11y-light.min.css';
2
+ var wrapper = {
3
+ bg: 'accent.99',
4
+ border: '1px solid',
5
+ borderColor: 'accent.95',
6
+ width: 400,
7
+ height: 200,
8
+ my: 5,
9
+ overflow: 'auto',
10
+ alignItems: 'center',
11
+ '&.is-focused, &:focus': {
12
+ boxShadow: 'focus',
13
+ outline: 'none'
14
+ },
15
+ pre: {
16
+ backgroundColor: 'transparent',
17
+ m: 0,
18
+ p: 10,
19
+ pr: 0,
20
+ height: '100%',
21
+ width: '100%',
22
+ overflowX: 'hidden',
23
+ overflowY: 'auto',
24
+ fontFamily: 'standard',
25
+ fontSize: 'sm',
26
+ '& .token-line': {
27
+ display: 'block',
28
+ alignItems: 'center',
29
+ '& .token': {
30
+ whiteSpace: 'pre-wrap',
31
+ wordBreak: 'break-all'
32
+ }
33
+ }
34
+ },
35
+ '&.has-no-copy-button': {
36
+ pre: {
37
+ p: 10
38
+ }
39
+ },
40
+ '&.has-line-numbers': {
41
+ pre: {
42
+ p: '0 10px 0 0',
43
+ overflow: 'auto',
44
+ '& .token-line:first-of-type *': {
45
+ pt: 10
46
+ },
47
+ '& .token-line': {
48
+ display: 'flex',
49
+ '& .token': {
50
+ whiteSpace: 'pre'
51
+ }
52
+ }
53
+ }
54
+ }
55
+ };
56
+ var lineNo = {
57
+ display: 'table-cell',
58
+ userSelect: 'none',
59
+ p: 5,
60
+ m: '0 10px 0 0',
61
+ bg: 'accent.30',
62
+ minWidth: 26,
63
+ color: 'white'
64
+ };
65
+ export default {
66
+ wrapper: wrapper,
67
+ lineNo: lineNo
68
+ };
@@ -1,5 +1,5 @@
1
1
  var link = {
2
- color: 'active',
2
+ color: 'white',
3
3
  fontFamily: 'standard',
4
4
  fontSize: 'md',
5
5
  textDecoration: 'none',
@@ -1,4 +1,18 @@
1
- export default {
1
+ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
2
+ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
3
+ import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
4
+ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
5
+ import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
6
+ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
7
+ import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
8
+ import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
9
+ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
10
+
11
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); if (enumerableOnly) symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
12
+
13
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context; _forEachInstanceProperty(_context = ownKeys(Object(source), true)).call(_context, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { var _context2; _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
14
+
15
+ var base = {
2
16
  bg: 'neutral.80',
3
17
  width: '100%',
4
18
  height: '1px',
@@ -8,4 +22,22 @@ export default {
8
22
  height: '100%',
9
23
  mx: '5px'
10
24
  }
25
+ };
26
+
27
+ var navBarSeparator = _objectSpread(_objectSpread({}, base), {}, {
28
+ width: '100%',
29
+ backgroundColor: 'neutral.60'
30
+ });
31
+
32
+ var navBarSubtitleSeparator = _objectSpread(_objectSpread({}, base), {}, {
33
+ ml: '45px',
34
+ width: 'calc(100% - 75px)',
35
+ mb: '15px',
36
+ backgroundColor: 'neutral.60'
37
+ });
38
+
39
+ export default {
40
+ base: base,
41
+ navBarSeparator: navBarSeparator,
42
+ navBarSubtitleSeparator: navBarSubtitleSeparator
11
43
  };