@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,116 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
+
5
+ var _react = _interopRequireDefault(require("react"));
6
+
7
+ var _GlobeIcon = _interopRequireDefault(require("mdi-react/GlobeIcon"));
8
+
9
+ var _ViewDashboardIcon = _interopRequireDefault(require("mdi-react/ViewDashboardIcon"));
10
+
11
+ var _AccountMultipleIcon = _interopRequireDefault(require("mdi-react/AccountMultipleIcon"));
12
+
13
+ var _TransitConnectionVariantIcon = _interopRequireDefault(require("mdi-react/TransitConnectionVariantIcon"));
14
+
15
+ var _EmoticonHappyOutlineIcon = _interopRequireDefault(require("mdi-react/EmoticonHappyOutlineIcon"));
16
+
17
+ var _FingerprintIcon = _interopRequireDefault(require("mdi-react/FingerprintIcon"));
18
+
19
+ var _ScaleBalanceIcon = _interopRequireDefault(require("mdi-react/ScaleBalanceIcon"));
20
+
21
+ var _VerifiedIcon = _interopRequireDefault(require("mdi-react/VerifiedIcon"));
22
+
23
+ var _NavBar = _interopRequireDefault(require("./NavBar"));
24
+
25
+ var _testAxe = _interopRequireDefault(require("../../utils/testUtils/testAxe"));
26
+
27
+ var _testWrapper = require("../../utils/testUtils/testWrapper");
28
+
29
+ var _index = require("../../index");
30
+
31
+ var _react2 = require("@emotion/react");
32
+
33
+ var data = [{
34
+ icon: _GlobeIcon["default"],
35
+ key: 'Overview',
36
+ heading: 'Overview',
37
+ children: ['Users', 'Group', 'Populations', 'Attributes', 'A roles title that is really really really really long']
38
+ }, {
39
+ icon: _ViewDashboardIcon["default"],
40
+ key: 'Dashboard',
41
+ heading: 'Dashboard',
42
+ children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
43
+ }, {
44
+ icon: _AccountMultipleIcon["default"],
45
+ key: 'Identities',
46
+ heading: 'Identities',
47
+ children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
48
+ }, {
49
+ icon: _TransitConnectionVariantIcon["default"],
50
+ key: 'Connections',
51
+ heading: 'Connections',
52
+ children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
53
+ }, {
54
+ icon: _EmoticonHappyOutlineIcon["default"],
55
+ key: 'Experiences',
56
+ heading: 'Experiences',
57
+ children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
58
+ }];
59
+ var secondData = [{
60
+ icon: _FingerprintIcon["default"],
61
+ key: 'MFA',
62
+ heading: 'MFA',
63
+ children: ['Users', {
64
+ subTitle: 'PingOne Services'
65
+ }, 'Group', 'Populations', 'Attributes', 'Roles']
66
+ }, {
67
+ icon: _ScaleBalanceIcon["default"],
68
+ key: 'Risk',
69
+ heading: 'Risk',
70
+ children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
71
+ }, {
72
+ icon: _VerifiedIcon["default"],
73
+ key: 'Verify',
74
+ heading: 'Verify',
75
+ children: ['Users', 'Group', 'Populations', 'Attributes', 'Roles']
76
+ }];
77
+
78
+ var getComponent = function getComponent() {
79
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
80
+ return (0, _testWrapper.render)((0, _react2.jsx)(_NavBar["default"], props, (0, _react2.jsx)(_index.Box, {
81
+ sx: {
82
+ height: '100%',
83
+ maxHeight: '100%',
84
+ overflowY: 'overlay !important'
85
+ }
86
+ }, (0, _react2.jsx)(_index.NavBarSection, {
87
+ items: data,
88
+ hasSeparator: true
89
+ }), (0, _react2.jsx)(_index.NavBarSection, {
90
+ items: secondData,
91
+ title: "test_title"
92
+ }))));
93
+ };
94
+
95
+ (0, _testAxe["default"])(getComponent);
96
+ test('should render basic nav with children', function () {
97
+ getComponent();
98
+
99
+ var nav = _testWrapper.screen.queryByRole('navigation');
100
+
101
+ expect(nav).toBeInTheDocument();
102
+ });
103
+ test('should render title for sections that have titles', function () {
104
+ getComponent();
105
+
106
+ var title = _testWrapper.screen.getByText('test_title');
107
+
108
+ expect(title).toBeInTheDocument();
109
+ });
110
+ test('should render title for itemBodies that have subTitles', function () {
111
+ getComponent();
112
+
113
+ var subTitle = _testWrapper.screen.getByText('PingOne Services');
114
+
115
+ expect(subTitle).toBeInTheDocument();
116
+ });
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
+
5
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
6
+
7
+ _Object$defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+
11
+ _Object$defineProperty(exports, "default", {
12
+ enumerable: true,
13
+ get: function get() {
14
+ return _NavBar["default"];
15
+ }
16
+ });
17
+
18
+ var _NavBar = _interopRequireDefault(require("./NavBar"));
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime-corejs3/helpers/interopRequireWildcard");
4
+
5
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
6
+
7
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
8
+
9
+ _Object$defineProperty(exports, "__esModule", {
10
+ value: true
11
+ });
12
+
13
+ exports["default"] = void 0;
14
+
15
+ var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
16
+
17
+ var _react = _interopRequireWildcard(require("react"));
18
+
19
+ var _propTypes = _interopRequireDefault(require("prop-types"));
20
+
21
+ var _index = require("../../index");
22
+
23
+ var _react2 = require("@emotion/react");
24
+
25
+ var NavBarItemBody = function NavBarItemBody(props) {
26
+ var _context;
27
+
28
+ return (0, _react2.jsx)(_index.Box, {
29
+ sx: {
30
+ alignItems: 'flex-start',
31
+ mb: '15px'
32
+ }
33
+ }, (0, _map["default"])(_context = props.item.children).call(_context, function (child) {
34
+ return child.subTitle ? (0, _react2.jsx)(_react.Fragment, {
35
+ key: "fragment".concat(child.subTitle)
36
+ }, (0, _react2.jsx)(_index.Separator, {
37
+ variant: "separator.navBarSubtitleSeparator",
38
+ key: "separator".concat(child.subTitle)
39
+ }), (0, _react2.jsx)(_index.Text, {
40
+ key: "text".concat(child.subTitle),
41
+ variant: "text.navBarSubtitle",
42
+ sx: {
43
+ mb: '10px',
44
+ ml: '45px'
45
+ }
46
+ }, child.subTitle)) : child;
47
+ }));
48
+ };
49
+
50
+ NavBarItemBody.propTypes = {
51
+ item: _propTypes["default"].shape({
52
+ children: _propTypes["default"].arrayOf(_propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].object]))
53
+ })
54
+ };
55
+ var _default = NavBarItemBody;
56
+ exports["default"] = _default;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
+
5
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
6
+
7
+ _Object$defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+
11
+ exports["default"] = void 0;
12
+
13
+ var _react = _interopRequireDefault(require("react"));
14
+
15
+ var _propTypes = _interopRequireDefault(require("prop-types"));
16
+
17
+ var _index = require("../../index");
18
+
19
+ var _react2 = require("@emotion/react");
20
+
21
+ var NavBarItemHeader = function NavBarItemHeader(props) {
22
+ var item = props.item;
23
+ var icon = item.icon;
24
+ return (0, _react2.jsx)(_index.Box, {
25
+ variant: "boxes.navBarItemHeaderContainer",
26
+ isRow: true
27
+ }, icon && (0, _react2.jsx)(_index.Icon, {
28
+ icon: icon,
29
+ size: 20,
30
+ sx: {
31
+ mr: '10px',
32
+ color: 'white',
33
+ fill: 'white'
34
+ }
35
+ }), (0, _react2.jsx)(_index.Text, {
36
+ variant: "navBarHeaderText"
37
+ }, props.item.heading));
38
+ };
39
+
40
+ NavBarItemHeader.propTypes = {
41
+ item: _propTypes["default"].shape({
42
+ heading: _propTypes["default"].string,
43
+ icon: _propTypes["default"].elementType
44
+ })
45
+ };
46
+ var _default = NavBarItemHeader;
47
+ exports["default"] = _default;
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
+
5
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
6
+
7
+ _Object$defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+
11
+ exports["default"] = void 0;
12
+
13
+ var _react = _interopRequireDefault(require("react"));
14
+
15
+ var _propTypes = _interopRequireDefault(require("prop-types"));
16
+
17
+ var _index = require("../../index");
18
+
19
+ var _NavBarItemBody = _interopRequireDefault(require("./NavBarItemBody"));
20
+
21
+ var _NavBarItemHeader = _interopRequireDefault(require("./NavBarItemHeader"));
22
+
23
+ var _react2 = require("@emotion/react");
24
+
25
+ /**
26
+ * Composed component that creates an AccordionGrid group
27
+ * with title, and separator options.
28
+ *
29
+ */
30
+ var NavBarSection = function NavBarSection(props) {
31
+ var hasSeparator = props.hasSeparator,
32
+ title = props.title,
33
+ items = props.items;
34
+ return (0, _react2.jsx)(_react["default"].Fragment, null, title && (0, _react2.jsx)(_index.Text, {
35
+ variant: "text.navBarSubtitle",
36
+ sx: {
37
+ mt: '25px',
38
+ mb: '15px',
39
+ ml: '15px'
40
+ }
41
+ }, title), (0, _react2.jsx)(_index.AccordionGridGroup, {
42
+ items: items
43
+ }, function (item) {
44
+ return (0, _react2.jsx)(_index.Item, {
45
+ headerProps: {
46
+ variant: 'accordion.accordionGridHeaderNav'
47
+ },
48
+ textValue: item
49
+ }, (0, _react2.jsx)(_NavBarItemHeader["default"], {
50
+ item: item
51
+ }), (0, _react2.jsx)(_NavBarItemBody["default"], {
52
+ item: item
53
+ }));
54
+ }), hasSeparator && (0, _react2.jsx)(_index.Box, {
55
+ sx: {
56
+ pl: '15px',
57
+ pr: '15px',
58
+ mt: '25px'
59
+ }
60
+ }, (0, _react2.jsx)(_index.Separator, {
61
+ variant: "separator.navBarSeparator"
62
+ })));
63
+ };
64
+
65
+ NavBarSection.defaultProps = {
66
+ hasSeparator: false
67
+ };
68
+ NavBarSection.propTypes = {
69
+ /** If true, a separator will render at the end of the section */
70
+ hasSeparator: _propTypes["default"].bool,
71
+
72
+ /** If present, this string will render at the top of the section */
73
+ title: _propTypes["default"].string,
74
+
75
+ /**
76
+ * *For performance reasons, use this prop instead of Array.map when iteratively rendering Items*.
77
+ * For use with [dynamic collections](https://react-spectrum.adobe.com/react-stately/collections.html#dynamic-collections).
78
+ */
79
+ items: _propTypes["default"].arrayOf(_propTypes["default"].shape({}))
80
+ };
81
+ var _default = NavBarSection;
82
+ exports["default"] = _default;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
+
5
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
6
+
7
+ _Object$defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+
11
+ _Object$defineProperty(exports, "default", {
12
+ enumerable: true,
13
+ get: function get() {
14
+ return _NavBarSection["default"];
15
+ }
16
+ });
17
+
18
+ var _NavBarSection = _interopRequireDefault(require("./NavBarSection"));
@@ -22,8 +22,6 @@ var _collections = require("@react-stately/collections");
22
22
 
23
23
  var _hooks = require("../../hooks");
24
24
 
25
- var _Button = _interopRequireDefault(require("../Button/Button"));
26
-
27
25
  var _OverlayPanel = _interopRequireDefault(require("./OverlayPanel"));
28
26
 
29
27
  var _index = require("../../index");
@@ -66,15 +64,18 @@ var Default = function Default(_ref) {
66
64
  var state = (0, _hooks.useOverlayPanelState)();
67
65
  return (// Application must be wrapped in an OverlayProvider so that it can be hidden from screen
68
66
  // readers when an overlay opens.
69
- (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_Button["default"], {
67
+ (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_index.Button, {
70
68
  onPress: state.open
71
69
  }, "Open Panel"), (0, _react2.jsx)(_OverlayPanel["default"], (0, _extends2["default"])({
72
70
  isOpen: state.isOpen
73
- }, args), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_Button["default"], {
71
+ }, args), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Button, {
74
72
  onPress: state.close
75
- }, "Close Panel"), (0, _react2.jsx)(_index.Text, {
76
- pt: "md"
77
- }, "Children render here."))))
73
+ }, "Close Panel"), (0, _react2.jsx)(_index.AccordionGroup, args, (0, _react2.jsx)(_collections.Item, {
74
+ key: "accordionKey",
75
+ textValue: "accordionKey",
76
+ label: "Accordion Label",
77
+ "data-id": "accordionItem"
78
+ }, (0, _react2.jsx)(_index.Text, null, "Render me!"))))))
78
79
  );
79
80
  };
80
81
 
@@ -106,7 +107,7 @@ var InnerPanel = function InnerPanel(_ref2) {
106
107
  variant: "overlayPanel.overlayPanelInner" // applies higher z-index
107
108
  ,
108
109
  isOpen: innerState.isOpen
109
- }, args), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_Button["default"], {
110
+ }, args), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Button, {
110
111
  onPress: innerState.close
111
112
  }, "Close Inner Panel"), (0, _react2.jsx)(_index.Text, {
112
113
  pt: "md"
@@ -121,7 +122,7 @@ var InnerPanel = function InnerPanel(_ref2) {
121
122
  sx: {
122
123
  p: '12px'
123
124
  }
124
- }, (0, _react2.jsx)(_Button["default"], {
125
+ }, (0, _react2.jsx)(_index.Button, {
125
126
  onPress: closeOuterPanel
126
127
  }, "Close Panel"), (0, _react2.jsx)(_index.Text, {
127
128
  pt: "md",
@@ -164,14 +165,14 @@ var InnerPanel = function InnerPanel(_ref2) {
164
165
  mr: "auto"
165
166
  }, "Form 5")), (0, _react2.jsx)(_index.Separator, {
166
167
  margin: "0"
167
- })), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_Button["default"], {
168
+ })), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_index.Button, {
168
169
  onPress: toggleMessagesOpen
169
- }, "Toggle Messages"), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_Button["default"], {
170
+ }, "Toggle Messages"), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_index.Button, {
170
171
  onPress: innerState.open
171
172
  }, "Open Inner Panel"), inner)));
172
173
  return (// Application must be wrapped in an OverlayProvider so that it can be hidden from screen
173
174
  // readers when an overlay opens.
174
- (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_Button["default"], {
175
+ (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Button, {
175
176
  onPress: state.open
176
177
  }, "Open Panel"), outer), messagesOpen && (0, _react2.jsx)(_index.Messages, {
177
178
  sx: {
@@ -192,14 +193,14 @@ var CustomWidth = function CustomWidth() {
192
193
  // readers when an overlay opens.
193
194
  //
194
195
  // For a custom width, provide the width via the 'sx' prop
195
- (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_Button["default"], {
196
+ (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."), (0, _react2.jsx)("br", null), (0, _react2.jsx)(_index.Button, {
196
197
  onPress: state.open
197
198
  }, "Open Panel"), (0, _react2.jsx)(_OverlayPanel["default"], {
198
199
  isOpen: state.isOpen,
199
200
  sx: {
200
201
  width: '720px'
201
202
  }
202
- }, (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_Button["default"], {
203
+ }, (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Button, {
203
204
  onPress: state.close
204
205
  }, "Close Panel"), (0, _react2.jsx)(_index.Text, {
205
206
  pt: "md"
@@ -17,6 +17,13 @@ var _react2 = require("@emotion/react");
17
17
  var getComponent = function getComponent() {
18
18
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
19
19
  return (0, _testWrapper.render)((0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_PopoverContainer["default"], props, (0, _react2.jsx)(_index.Box, null, "I am in a popover"))));
20
+ };
21
+
22
+ var getComponentInOverlayPanel = function getComponentInOverlayPanel() {
23
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
24
+ return (0, _testWrapper.render)((0, _react2.jsx)(_index.OverlayPanel, {
25
+ isOpen: true
26
+ }, (0, _react2.jsx)(_PopoverContainer["default"], props, (0, _react2.jsx)(_index.Box, null, "I am in a popover"))));
20
27
  }; // Need to be added to each test file to test accessibility using axe.
21
28
 
22
29
 
@@ -39,4 +46,12 @@ test('should render a popover with no arrow', function () {
39
46
  var arrow = _testWrapper.screen.queryByTestId('popover-arrow');
40
47
 
41
48
  expect(arrow).not.toBeInTheDocument();
49
+ });
50
+ test('popover will not open if wrapped in an overlayPanel', function () {
51
+ getComponentInOverlayPanel({
52
+ popoverProps: {
53
+ 'data-test-id': 'popover-test'
54
+ }
55
+ });
56
+ expect(_testWrapper.screen.queryByTestId('popover-test')).not.toBeInTheDocument();
42
57
  });
@@ -51,7 +51,7 @@ var Separator = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
51
51
  return (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({
52
52
  ref: ref,
53
53
  className: classNames,
54
- variant: "separator"
54
+ variant: "separator.base"
55
55
  }, others, separatorProps));
56
56
  });
57
57
  Separator.propTypes = {
@@ -29,7 +29,11 @@ var _react2 = require("@emotion/react");
29
29
  */
30
30
  var TextArea = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
31
31
  return (0, _react2.jsx)(_themeUi.Textarea, (0, _extends2["default"])({
32
- ref: ref
32
+ ref: ref // this requires to fix safari resizing issue (UIP-4995)
33
+ ,
34
+ sx: {
35
+ position: 'relative'
36
+ }
33
37
  }, props));
34
38
  });
35
39
  TextArea.displayName = 'TextArea';
@@ -59,7 +59,8 @@ var TooltipTrigger = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
59
59
  className = props.className,
60
60
  isNotFlippable = props.isNotFlippable,
61
61
  isDarkMode = props.isDarkMode,
62
- hasNoArrow = props.hasNoArrow;
62
+ hasNoArrow = props.hasNoArrow,
63
+ targetRef = props.targetRef;
63
64
 
64
65
  var _React$Children$toArr = _react["default"].Children.toArray(children),
65
66
  _React$Children$toArr2 = (0, _slicedToArray2["default"])(_React$Children$toArr, 2),
@@ -69,23 +70,24 @@ var TooltipTrigger = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
69
70
  var state = (0, _tooltip2.useTooltipTriggerState)(props);
70
71
  var tooltipTriggerRef = (0, _react.useRef)();
71
72
  var overlayRef = (0, _react.useRef)();
73
+ var tooltipRef = targetRef || tooltipTriggerRef;
72
74
  (0, _hooks.usePropWarning)(props, 'disabled', 'isDisabled');
73
75
  /* istanbul ignore next */
74
76
 
75
77
  (0, _react.useImperativeHandle)(ref, function () {
76
- return tooltipTriggerRef.current;
78
+ return tooltipRef.current;
77
79
  });
78
80
 
79
81
  var _useTooltipTrigger = (0, _tooltip.useTooltipTrigger)({
80
82
  isDisabled: isDisabled,
81
83
  trigger: triggerAction
82
- }, state, tooltipTriggerRef),
84
+ }, state, tooltipRef),
83
85
  triggerProps = _useTooltipTrigger.triggerProps,
84
86
  tooltipProps = _useTooltipTrigger.tooltipProps;
85
87
 
86
88
  var _useOverlayPosition = (0, _overlays.useOverlayPosition)({
87
89
  placement: (0, _concat["default"])(_context = "".concat(direction, " ")).call(_context, align),
88
- targetRef: tooltipTriggerRef,
90
+ targetRef: tooltipRef,
89
91
  overlayRef: overlayRef,
90
92
  offset: offset,
91
93
  // Our API preference is for default false so we invert this since it should be default true
@@ -160,7 +162,10 @@ TooltipTrigger.propTypes = {
160
162
  placement: _propTypes["default"].string,
161
163
 
162
164
  /** By default, opens for both focus and hover. Can be made to open only for focus. */
163
- trigger: _propTypes["default"].string
165
+ trigger: _propTypes["default"].string,
166
+
167
+ /* The ref for the element which the overlay positions itself with respect to. */
168
+ targetRef: _propTypes["default"].shape({})
164
169
  };
165
170
  TooltipTrigger.defaultProps = {
166
171
  align: 'middle',