@pingux/astro 1.40.0 → 1.40.1-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/lib/cjs/components/{Bulletin/Bulletin.js → Callout/Callout.js} +26 -26
- package/lib/cjs/components/{Bulletin/Bulletin.stories.js → Callout/Callout.stories.js} +11 -13
- package/lib/cjs/components/{Bulletin/Bulletin.test.js → Callout/Callout.test.js} +6 -6
- package/lib/cjs/components/{Bulletin → Callout}/index.js +2 -2
- package/lib/cjs/components/CopyText/CopyText.js +1 -1
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +7 -8
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +55 -14
- package/lib/cjs/index.js +13 -5
- package/lib/cjs/styles/variants/boxes.js +2 -1
- package/lib/cjs/styles/variants/{bulletin.js → callout.js} +0 -0
- package/lib/cjs/styles/variants/variants.js +17 -18
- package/lib/components/{Bulletin/Bulletin.js → Callout/Callout.js} +24 -24
- package/lib/components/{Bulletin/Bulletin.stories.js → Callout/Callout.stories.js} +12 -13
- package/lib/components/{Bulletin/Bulletin.test.js → Callout/Callout.test.js} +6 -6
- package/lib/components/Callout/index.js +1 -0
- package/lib/components/CopyText/CopyText.js +1 -1
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +8 -8
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +52 -15
- package/lib/index.js +3 -2
- package/lib/styles/variants/boxes.js +2 -1
- package/lib/styles/variants/{bulletin.js → callout.js} +0 -0
- package/lib/styles/variants/variants.js +13 -14
- package/package.json +1 -1
- package/NOTICE.html +0 -4707
- package/lib/components/Bulletin/index.js +0 -1
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectW
|
|
3
3
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
4
4
|
var _excluded = ["children", "status"];
|
5
5
|
|
6
|
-
var
|
6
|
+
var _calloutProps;
|
7
7
|
|
8
8
|
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
9
9
|
import React from 'react';
|
@@ -12,59 +12,59 @@ import { Box } from '../..';
|
|
12
12
|
import statuses from '../../utils/devUtils/constants/statuses';
|
13
13
|
import { NoticeIcon } from '../Icon/NoticeIcon';
|
14
14
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
15
|
-
export var
|
16
|
-
var
|
15
|
+
export var CALLOUT_TEST_ID = 'CalloutTestId';
|
16
|
+
var calloutProps = (_calloutProps = {}, _defineProperty(_calloutProps, statuses.DEFAULT, {
|
17
17
|
color: 'text.secondary',
|
18
|
-
variant: '
|
19
|
-
}), _defineProperty(
|
18
|
+
variant: 'callout.base'
|
19
|
+
}), _defineProperty(_calloutProps, statuses.ERROR, {
|
20
20
|
color: 'critical.bright',
|
21
|
-
variant: '
|
22
|
-
}), _defineProperty(
|
21
|
+
variant: 'callout.error'
|
22
|
+
}), _defineProperty(_calloutProps, statuses.SUCCESS, {
|
23
23
|
color: 'success.bright',
|
24
|
-
variant: '
|
25
|
-
}), _defineProperty(
|
24
|
+
variant: 'callout.success'
|
25
|
+
}), _defineProperty(_calloutProps, statuses.WARNING, {
|
26
26
|
color: 'warning.bright',
|
27
|
-
variant: '
|
28
|
-
}),
|
27
|
+
variant: 'callout.warning'
|
28
|
+
}), _calloutProps);
|
29
29
|
var defaultIconProps = {
|
30
30
|
mr: 'md',
|
31
31
|
ml: 'md',
|
32
32
|
size: 'md'
|
33
33
|
};
|
34
34
|
/**
|
35
|
-
*
|
36
|
-
that should be placed at the top of panels or above related content. If the
|
35
|
+
*Callout is composed of the Box, Icon, and Text components. It's a persistent component
|
36
|
+
that should be placed at the top of panels or above related content. If the Callouts
|
37
37
|
status is error or warning, the text should include a direct link to instructions on resolving the
|
38
38
|
issue or error.
|
39
39
|
*
|
40
|
-
*Please note,
|
41
|
-
recommended if you need to interrupt and notify users of successful/failed actions
|
42
|
-
give warnings of unexpected events.
|
40
|
+
*Please note, Callout is a static component, the [Messages](./?path=/docs/components-messages)
|
41
|
+
component is recommended if you need to interrupt and notify users of successful/failed actions
|
42
|
+
or give warnings of unexpected events.
|
43
43
|
*/
|
44
44
|
|
45
|
-
var
|
45
|
+
var Callout = function Callout(_ref) {
|
46
46
|
var children = _ref.children,
|
47
47
|
status = _ref.status,
|
48
48
|
others = _objectWithoutProperties(_ref, _excluded);
|
49
49
|
|
50
50
|
return ___EmotionJSX(Box, _extends({
|
51
|
-
"data-testid":
|
51
|
+
"data-testid": CALLOUT_TEST_ID,
|
52
52
|
isRow: true,
|
53
53
|
role: "note",
|
54
|
-
variant:
|
54
|
+
variant: calloutProps[status].variant
|
55
55
|
}, others), ___EmotionJSX(NoticeIcon, _extends({
|
56
|
-
color:
|
56
|
+
color: calloutProps[status].color,
|
57
57
|
status: status,
|
58
58
|
"aria-label": "".concat(status, "-icon")
|
59
59
|
}, defaultIconProps)), children);
|
60
60
|
};
|
61
61
|
|
62
|
-
|
62
|
+
Callout.propTypes = {
|
63
63
|
/** Determines the icon and color */
|
64
64
|
status: PropTypes.oneOf(_Object$values(statuses))
|
65
65
|
};
|
66
|
-
|
66
|
+
Callout.defaultProps = {
|
67
67
|
status: statuses.DEFAULT
|
68
68
|
};
|
69
|
-
|
70
|
-
export default
|
69
|
+
Callout.displayName = 'Callout';
|
70
|
+
export default Callout;
|
@@ -1,12 +1,11 @@
|
|
1
1
|
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
2
2
|
import React from 'react';
|
3
|
-
import { Link, Text } from '../..';
|
3
|
+
import { Link, Text, Callout } from '../..';
|
4
4
|
import statuses from '../../utils/devUtils/constants/statuses';
|
5
|
-
import Bulletin from './Bulletin';
|
6
5
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
7
6
|
export default {
|
8
|
-
title: '
|
9
|
-
component:
|
7
|
+
title: 'Components/Callout',
|
8
|
+
component: Callout,
|
10
9
|
argTypes: {
|
11
10
|
status: {
|
12
11
|
control: {
|
@@ -18,42 +17,42 @@ export default {
|
|
18
17
|
}; // main
|
19
18
|
|
20
19
|
export var Default = function Default(args) {
|
21
|
-
return ___EmotionJSX(
|
20
|
+
return ___EmotionJSX(Callout, args, ___EmotionJSX(Text, null, "You should be aware of this. It might be good or bad, I don\u2019t know. You may already be aware of it, but I want to be sure", ___EmotionJSX(Link, {
|
22
21
|
href: "https://pingidentity.com",
|
23
22
|
target: "_blank",
|
24
|
-
"aria-label": "".concat(statuses.DEFAULT, "-
|
23
|
+
"aria-label": "".concat(statuses.DEFAULT, "-callout"),
|
25
24
|
variant: "app"
|
26
25
|
}, " Read More")));
|
27
26
|
};
|
28
27
|
export var ErrorStatus = function ErrorStatus() {
|
29
|
-
return ___EmotionJSX(
|
28
|
+
return ___EmotionJSX(Callout, {
|
30
29
|
status: statuses.ERROR
|
31
30
|
}, ___EmotionJSX(Text, null, "You\u2019ve got problems. Allow me to tell you about them in some detail so that you can address them", ___EmotionJSX(Link, {
|
32
31
|
href: "https://pingidentity.com",
|
33
32
|
target: "_blank",
|
34
|
-
"aria-label": "".concat(statuses.ERROR, "-
|
33
|
+
"aria-label": "".concat(statuses.ERROR, "-callout"),
|
35
34
|
variant: "app"
|
36
35
|
}, " Read More")));
|
37
36
|
}; // Avoiding using Error as the function name due to it being a JS built-in method
|
38
37
|
|
39
38
|
ErrorStatus.storyName = 'Error';
|
40
39
|
export var Success = function Success() {
|
41
|
-
return ___EmotionJSX(
|
40
|
+
return ___EmotionJSX(Callout, {
|
42
41
|
status: statuses.SUCCESS
|
43
42
|
}, ___EmotionJSX(Text, null, "It Worked! Maybe there is something else related to it working that I need to explain", ___EmotionJSX(Link, {
|
44
43
|
href: "https://pingidentity.com",
|
45
44
|
target: "_blank",
|
46
|
-
"aria-label": "".concat(statuses.SUCCESS, "-
|
45
|
+
"aria-label": "".concat(statuses.SUCCESS, "-callout"),
|
47
46
|
variant: "app"
|
48
47
|
}, " Read More")));
|
49
48
|
};
|
50
49
|
export var Warning = function Warning() {
|
51
|
-
return ___EmotionJSX(
|
50
|
+
return ___EmotionJSX(Callout, {
|
52
51
|
status: statuses.WARNING
|
53
|
-
}, ___EmotionJSX(Text, null, "You\u2019ve got issues. Allow me to tell you about them in some detail so that you can address them. I\u2019ll continue to type enough text to demonstrate that the
|
52
|
+
}, ___EmotionJSX(Text, null, "You\u2019ve got issues. Allow me to tell you about them in some detail so that you can address them. I\u2019ll continue to type enough text to demonstrate that the Callout box will grow in height with the content", ___EmotionJSX(Link, {
|
54
53
|
href: "https://pingidentity.com",
|
55
54
|
target: "_blank",
|
56
|
-
"aria-label": "".concat(statuses.WARNING, "-
|
55
|
+
"aria-label": "".concat(statuses.WARNING, "-callout"),
|
57
56
|
variant: "app"
|
58
57
|
}, " Read More")));
|
59
58
|
};
|
@@ -7,32 +7,32 @@ import { screen } from '@testing-library/react';
|
|
7
7
|
import statuses from '../../utils/devUtils/constants/statuses';
|
8
8
|
import { render } from '../../utils/testUtils/testWrapper';
|
9
9
|
import { noticeIcons } from '../Icon/NoticeIcon';
|
10
|
-
import
|
10
|
+
import Callout, { CALLOUT_TEST_ID } from './Callout';
|
11
11
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
12
12
|
var TEST_TEXT = 'test text';
|
13
13
|
var testColors = (_testColors = {}, _defineProperty(_testColors, statuses.DEFAULT, 'var(--theme-ui-colors-text-secondary)'), _defineProperty(_testColors, statuses.ERROR, 'var(--theme-ui-colors-critical-bright)'), _defineProperty(_testColors, statuses.SUCCESS, 'var(--theme-ui-colors-success-bright)'), _defineProperty(_testColors, statuses.WARNING, 'var(--theme-ui-colors-warning-bright)'), _testColors);
|
14
14
|
|
15
15
|
var getComponent = function getComponent() {
|
16
16
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
17
|
-
return render(___EmotionJSX(
|
17
|
+
return render(___EmotionJSX(Callout, props, TEST_TEXT));
|
18
18
|
};
|
19
19
|
|
20
|
-
describe('
|
20
|
+
describe('Callout', function () {
|
21
21
|
test('renders', function () {
|
22
22
|
getComponent();
|
23
23
|
screen.getByText(TEST_TEXT);
|
24
24
|
});
|
25
25
|
test('renders the default color', function () {
|
26
26
|
getComponent();
|
27
|
-
expect(screen.getByTestId(
|
27
|
+
expect(screen.getByTestId(CALLOUT_TEST_ID)).toHaveStyle({
|
28
28
|
'border-color': testColors[statuses.DEFAULT]
|
29
29
|
});
|
30
30
|
});
|
31
|
-
test.each([[statuses.DEFAULT, testColors[statuses.DEFAULT]], [statuses.ERROR, testColors[statuses.ERROR]], [statuses.SUCCESS, testColors[statuses.SUCCESS]], [statuses.WARNING, testColors[statuses.WARNING]]])('when given status %s it renders
|
31
|
+
test.each([[statuses.DEFAULT, testColors[statuses.DEFAULT]], [statuses.ERROR, testColors[statuses.ERROR]], [statuses.SUCCESS, testColors[statuses.SUCCESS]], [statuses.WARNING, testColors[statuses.WARNING]]])('when given status %s it renders Callout with color %s', function (status, expected) {
|
32
32
|
getComponent({
|
33
33
|
status: status
|
34
34
|
});
|
35
|
-
expect(screen.getByTestId(
|
35
|
+
expect(screen.getByTestId(CALLOUT_TEST_ID)).toHaveStyle({
|
36
36
|
'border-color': expected
|
37
37
|
});
|
38
38
|
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './Callout';
|
@@ -88,23 +88,23 @@ var EnvironmentBreadcrumb = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
88
88
|
var filterNodesWithChildren = function filterNodesWithChildren(iterableNode) {
|
89
89
|
var nodeArr = _Array$from(iterableNode); // with this function we are filtering child items if they have sections
|
90
90
|
// we can't filter items because if it would be a section - we can't change childNodes
|
91
|
-
// eslint-disable-next-line array-callback-return,consistent-return
|
92
91
|
|
93
92
|
|
94
93
|
var filteredSections = _mapInstanceProperty(nodeArr).call(nodeArr, function f(nodeItem) {
|
94
|
+
var _context;
|
95
|
+
|
95
96
|
if ((nodeItem === null || nodeItem === void 0 ? void 0 : nodeItem.type) === 'item') {
|
96
97
|
var _nodeItem$value;
|
97
98
|
|
98
|
-
return contains(nodeItem === null || nodeItem === void 0 ? void 0 : (_nodeItem$value = nodeItem.value) === null || _nodeItem$value === void 0 ? void 0 : _nodeItem$value.name, searchValue)
|
99
|
+
return contains(nodeItem === null || nodeItem === void 0 ? void 0 : (_nodeItem$value = nodeItem.value) === null || _nodeItem$value === void 0 ? void 0 : _nodeItem$value.name, searchValue) && nodeItem;
|
99
100
|
}
|
100
101
|
|
101
|
-
|
102
|
-
var _context;
|
102
|
+
var childNodes = _filterInstanceProperty(_context = _Array$from(nodeItem.childNodes)).call(_context, f); // Don't return sections without children, see UIP-5951
|
103
103
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
}
|
104
|
+
|
105
|
+
return childNodes.length !== 0 && _objectSpread(_objectSpread({}, nodeItem), {}, {
|
106
|
+
childNodes: childNodes
|
107
|
+
});
|
108
108
|
}); // we are filtering null items here since we were not able to filter them in previous function
|
109
109
|
|
110
110
|
|
@@ -2,7 +2,6 @@ import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
2
2
|
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
3
3
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
4
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
5
|
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
7
6
|
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
8
7
|
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
@@ -13,13 +12,15 @@ import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
|
13
12
|
|
14
13
|
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; }
|
15
14
|
|
16
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var
|
15
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context5, _context6; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context5 = ownKeys(Object(source), !0)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context6 = ownKeys(Object(source))).call(_context6, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
17
16
|
|
17
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
18
|
+
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
18
19
|
import React from 'react';
|
19
20
|
import userEvent from '@testing-library/user-event';
|
20
21
|
import { Section } from '@react-stately/collections';
|
21
22
|
import { axe } from 'jest-axe';
|
22
|
-
import { render, screen } from '../../utils/testUtils/testWrapper';
|
23
|
+
import { render, screen, within } from '../../utils/testUtils/testWrapper';
|
23
24
|
import { EnvironmentBreadcrumb, Item, OverlayProvider } from '../../index';
|
24
25
|
import { breadCrumbDataIds } from './EnvironmentBreadcrumb';
|
25
26
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
@@ -43,6 +44,15 @@ var itemsWithSections = [{
|
|
43
44
|
}, {
|
44
45
|
name: 'Baz'
|
45
46
|
}]
|
47
|
+
}, {
|
48
|
+
name: 'Heading 2',
|
49
|
+
options: [{
|
50
|
+
name: 'Foo'
|
51
|
+
}, {
|
52
|
+
name: 'Zod'
|
53
|
+
}, {
|
54
|
+
name: 'Zay'
|
55
|
+
}]
|
46
56
|
}];
|
47
57
|
var defaultProps = {
|
48
58
|
'data-testid': testEnvBreadcrumb,
|
@@ -83,11 +93,13 @@ var getSectionsComponent = function getSectionsComponent() {
|
|
83
93
|
return (// eslint-disable-next-line testing-library/no-node-access
|
84
94
|
___EmotionJSX(Section, {
|
85
95
|
key: section.name,
|
86
|
-
|
96
|
+
title: section.name,
|
87
97
|
items: section.options
|
88
98
|
}, function (item) {
|
99
|
+
var _context;
|
100
|
+
|
89
101
|
return ___EmotionJSX(Item, {
|
90
|
-
key: item.name,
|
102
|
+
key: _concatInstanceProperty(_context = "".concat(section.name, "-")).call(_context, item.name),
|
91
103
|
childItems: item.options
|
92
104
|
}, item.name);
|
93
105
|
})
|
@@ -164,9 +176,9 @@ test('should not call onNamePress when current env button pressed', function ()
|
|
164
176
|
expect(onNamePressMock).not.toHaveBeenCalled();
|
165
177
|
});
|
166
178
|
test('should render items passed in props', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
167
|
-
return _regeneratorRuntime.wrap(function _callee$(
|
179
|
+
return _regeneratorRuntime.wrap(function _callee$(_context2) {
|
168
180
|
while (1) {
|
169
|
-
switch (
|
181
|
+
switch (_context2.prev = _context2.next) {
|
170
182
|
case 0:
|
171
183
|
getComponent();
|
172
184
|
expect(screen.queryByRole('listbox')).not.toBeInTheDocument();
|
@@ -177,7 +189,7 @@ test('should render items passed in props', /*#__PURE__*/_asyncToGenerator( /*#_
|
|
177
189
|
|
178
190
|
case 6:
|
179
191
|
case "end":
|
180
|
-
return
|
192
|
+
return _context2.stop();
|
181
193
|
}
|
182
194
|
}
|
183
195
|
}, _callee);
|
@@ -187,9 +199,24 @@ test('should render items with sections passed in props', function () {
|
|
187
199
|
expect(screen.queryByRole('listbox')).not.toBeInTheDocument();
|
188
200
|
expect(screen.queryByRole('option')).not.toBeInTheDocument();
|
189
201
|
userEvent.click(screen.getByText(testSelectedItem));
|
190
|
-
|
202
|
+
var groups = screen.getAllByRole('group');
|
203
|
+
expect(groups).toHaveLength(2);
|
191
204
|
expect(screen.queryByRole('listbox')).toBeInTheDocument();
|
192
|
-
expect(screen.queryAllByRole('option')).toHaveLength(
|
205
|
+
expect(screen.queryAllByRole('option')).toHaveLength(6);
|
206
|
+
|
207
|
+
_forEachInstanceProperty(groups).call(groups, function (group, index) {
|
208
|
+
var _context3;
|
209
|
+
|
210
|
+
expect(function () {
|
211
|
+
return within(group).getByText(itemsWithSections[index].name);
|
212
|
+
});
|
213
|
+
|
214
|
+
_forEachInstanceProperty(_context3 = itemsWithSections[index].options).call(_context3, function (opt) {
|
215
|
+
return expect(function () {
|
216
|
+
return within(group).getByText(opt.name);
|
217
|
+
});
|
218
|
+
});
|
219
|
+
});
|
193
220
|
});
|
194
221
|
test('should call onSelectionChange when env clicked', function () {
|
195
222
|
var onSelectionChangeMock = jest.fn();
|
@@ -257,22 +284,22 @@ test('should show empty state in search if there are no results', function () {
|
|
257
284
|
test('should have no accessibility violations', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
258
285
|
var _getComponent, container, results;
|
259
286
|
|
260
|
-
return _regeneratorRuntime.wrap(function _callee2$(
|
287
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context4) {
|
261
288
|
while (1) {
|
262
|
-
switch (
|
289
|
+
switch (_context4.prev = _context4.next) {
|
263
290
|
case 0:
|
264
291
|
jest.useRealTimers();
|
265
292
|
_getComponent = getComponent(), container = _getComponent.container;
|
266
|
-
|
293
|
+
_context4.next = 4;
|
267
294
|
return axe(container);
|
268
295
|
|
269
296
|
case 4:
|
270
|
-
results =
|
297
|
+
results = _context4.sent;
|
271
298
|
expect(results).toHaveNoViolations();
|
272
299
|
|
273
300
|
case 6:
|
274
301
|
case "end":
|
275
|
-
return
|
302
|
+
return _context4.stop();
|
276
303
|
}
|
277
304
|
}
|
278
305
|
}, _callee2);
|
@@ -309,4 +336,14 @@ test('should add data-id to dropdown list', function () {
|
|
309
336
|
expect(screen.getByRole('listbox', {
|
310
337
|
name: 'Items List'
|
311
338
|
})).toHaveAttribute('data-id', breadCrumbDataIds.dropdownList);
|
339
|
+
});
|
340
|
+
test('should hide section title if no search results within it', function () {
|
341
|
+
getSectionsComponent(); // Open popover
|
342
|
+
|
343
|
+
userEvent.click(screen.getByText(testSelectedItem)); // Search for option exclusive to only one section
|
344
|
+
|
345
|
+
userEvent.type(screen.getByRole('searchbox'), 'Zod'); // 'Heading 1' should not be rendered, but 'Heading 2' should be
|
346
|
+
|
347
|
+
expect(screen.queryByText(itemsWithSections[0].name)).not.toBeInTheDocument();
|
348
|
+
expect(screen.queryByText(itemsWithSections[1].name)).toBeInTheDocument();
|
312
349
|
});
|
package/lib/index.js
CHANGED
@@ -22,8 +22,9 @@ export { default as Bracket } from './components/Bracket';
|
|
22
22
|
export * from './components/Bracket';
|
23
23
|
export { default as Breadcrumbs } from './components/Breadcrumbs';
|
24
24
|
export * from './components/Breadcrumbs';
|
25
|
-
export { default as Bulletin } from './components/
|
26
|
-
export
|
25
|
+
export { default as Bulletin } from './components/Callout';
|
26
|
+
export { default as Callout } from './components/Callout';
|
27
|
+
export * from './components/Callout';
|
27
28
|
export { default as Button } from './components/Button';
|
28
29
|
export * from './components/Button';
|
29
30
|
export { default as Card } from './components/Card';
|
File without changes
|
@@ -14,16 +14,19 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
14
14
|
|
15
15
|
import accordion from './accordion';
|
16
16
|
import boxes from './boxes';
|
17
|
+
import callout from './callout';
|
17
18
|
import codeView from './codeView';
|
18
|
-
import
|
19
|
+
import collapsiblePanel from './collapsiblePanel';
|
20
|
+
import dataTable from './../../components/DataTable/DataTable.styles';
|
19
21
|
import imageUpload from './imageUpload';
|
22
|
+
import images from './images';
|
20
23
|
import links from './links';
|
21
24
|
import listBox from './listBox';
|
22
25
|
import loader from './loader';
|
23
|
-
import modal from './modal';
|
24
26
|
import menu from './menu';
|
25
27
|
import menuItem from './menuItem';
|
26
28
|
import messages from './messages';
|
29
|
+
import modal from './modal';
|
27
30
|
import navBar from './navBar';
|
28
31
|
import numberField from './numberField';
|
29
32
|
import overlayPanel from './overlayPanel';
|
@@ -34,24 +37,22 @@ import stepper from './stepper';
|
|
34
37
|
import table from './table';
|
35
38
|
import * as tabs from './tabs';
|
36
39
|
import tooltip from './tooltip';
|
37
|
-
|
38
|
-
import bulletin from './bulletin';
|
39
|
-
import dataTable from './../../components/DataTable/DataTable.styles';
|
40
|
-
export default _objectSpread(_objectSpread({
|
40
|
+
export default _objectSpread(_objectSpread({}, tabs), {}, {
|
41
41
|
accordion: accordion,
|
42
42
|
boxes: boxes,
|
43
|
-
|
43
|
+
callout: callout,
|
44
44
|
codeView: codeView,
|
45
|
-
|
45
|
+
collapsiblePanel: collapsiblePanel,
|
46
|
+
dataTable: dataTable,
|
46
47
|
imageUpload: imageUpload,
|
47
|
-
|
48
|
+
images: images,
|
48
49
|
links: links,
|
49
50
|
listBox: listBox,
|
51
|
+
loader: loader,
|
50
52
|
menu: menu,
|
51
53
|
menuItem: menuItem,
|
52
54
|
messages: messages,
|
53
55
|
modal: modal,
|
54
|
-
collapsiblePanel: collapsiblePanel,
|
55
56
|
navBar: navBar,
|
56
57
|
numberField: numberField,
|
57
58
|
overlayPanel: overlayPanel,
|
@@ -59,8 +60,6 @@ export default _objectSpread(_objectSpread({
|
|
59
60
|
rockerbutton: rockerbutton,
|
60
61
|
separator: separator,
|
61
62
|
stepper: stepper,
|
62
|
-
table: table
|
63
|
-
|
64
|
-
tooltip: tooltip,
|
65
|
-
dataTable: dataTable
|
63
|
+
table: table,
|
64
|
+
tooltip: tooltip
|
66
65
|
});
|