diff --git a/packages/carbon-react/src/components/Popover/index.js b/packages/carbon-react/src/components/Popover/index.js index 319abbb4edf6..29bef66cee63 100644 --- a/packages/carbon-react/src/components/Popover/index.js +++ b/packages/carbon-react/src/components/Popover/index.js @@ -42,6 +42,7 @@ function Popover({ ); } +Popover.displayName = 'Popover'; Popover.propTypes = { /** * Specify how the popover should align with the trigger element @@ -122,6 +123,8 @@ const PopoverContent = React.forwardRef(function PopoverContent( ); }); +PopoverContent.displayName = 'PopoverContent'; + PopoverContent.propTypes = { /** * Provide a custom element or component to render the top-level node for the diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index a3794fa429fe..9a4ad6008094 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -447,6 +447,7 @@ Map { "shouldFilterItem": [Function], "type": "default", }, + "displayName": "ComboBox", "propTypes": Object { "ariaLabel": Object { "type": "string", @@ -4692,6 +4693,7 @@ Map { }, "PaginationNav" => Object { "$$typeof": Symbol(react.forward_ref), + "displayName": "PaginationNav", "propTypes": Object { "className": Object { "type": "string", @@ -4730,6 +4732,7 @@ Map { "onClick": [Function], "size": "", }, + "displayName": "ControlledPasswordInput", "propTypes": Object { "className": Object { "type": "string", @@ -4841,6 +4844,7 @@ Map { "onClick": [Function], "size": "", }, + "displayName": "PasswordInput", "propTypes": Object { "className": Object { "type": "string", @@ -6046,6 +6050,7 @@ Map { "onClick": [Function], "size": "", }, + "displayName": "ControlledPasswordInput", "propTypes": Object { "className": Object { "type": "string", @@ -6157,6 +6162,7 @@ Map { "onClick": [Function], "size": "", }, + "displayName": "PasswordInput", "propTypes": Object { "className": Object { "type": "string", @@ -6901,6 +6907,7 @@ Map { }, "ToolbarTitle" => Object { "$$typeof": Symbol(react.forward_ref), + "displayName": "ToolbarTitle", "propTypes": Object { "title": Object { "type": "string", @@ -6910,6 +6917,7 @@ Map { }, "ToolbarOption" => Object { "$$typeof": Symbol(react.forward_ref), + "displayName": "ToolbarOption", "propTypes": Object { "children": Object { "type": "node", @@ -6919,6 +6927,7 @@ Map { }, "ToolbarDivider" => Object { "$$typeof": Symbol(react.forward_ref), + "displayName": "ToolbarDivider", "render": [Function], }, "ToolbarSearch" => Object { @@ -7589,6 +7598,7 @@ Map { }, "HeaderMenuItem" => Object { "$$typeof": Symbol(react.forward_ref), + "displayName": "HeaderMenuItem", "propTypes": Object { "children": Object { "isRequired": true, @@ -7701,6 +7711,7 @@ Map { }, "Switcher" => Object { "$$typeof": Symbol(react.forward_ref), + "displayName": "Switcher", "propTypes": Object { "aria-label": [Function], "aria-labelledby": [Function], @@ -7716,6 +7727,7 @@ Map { }, "SwitcherItem" => Object { "$$typeof": Symbol(react.forward_ref), + "displayName": "SwitcherItem", "propTypes": Object { "aria-label": [Function], "aria-labelledby": [Function], @@ -7769,6 +7781,7 @@ Map { "isFixedNav": false, "isPersistent": true, }, + "displayName": "SideNav", "propTypes": Object { "addFocusListeners": Object { "type": "bool", @@ -7936,6 +7949,7 @@ Map { "element": "a", "large": false, }, + "displayName": "SideNavLink", "propTypes": Object { "children": Object { "isRequired": true, @@ -7987,6 +8001,7 @@ Map { }, "SideNavMenuItem" => Object { "$$typeof": Symbol(react.forward_ref), + "displayName": "SideNavMenuItem", "propTypes": Object { "children": Object { "type": "node", @@ -8002,6 +8017,7 @@ Map { }, "SideNavSwitcher" => Object { "$$typeof": Symbol(react.forward_ref), + "displayName": "SideNavSwitcher", "propTypes": Object { "className": Object { "type": "string", diff --git a/packages/react/src/components/ComboBox/ComboBox-test.js b/packages/react/src/components/ComboBox/ComboBox-test.js index 7bfe47f8f4b2..ddc455eca43f 100644 --- a/packages/react/src/components/ComboBox/ComboBox-test.js +++ b/packages/react/src/components/ComboBox/ComboBox-test.js @@ -60,7 +60,7 @@ describe('ComboBox', () => { for (let i = 0; i < mockProps.items.length; i++) { openMenu(wrapper); - wrapper.find('ForwardRef(ListBoxMenuItem)').at(i).simulate('click'); + wrapper.find('ListBoxMenuItem').at(i).simulate('click'); expect(mockProps.onChange).toHaveBeenCalledTimes(i + 1); expect(mockProps.onChange).toHaveBeenCalledWith({ selectedItem: mockProps.items[i], @@ -94,7 +94,7 @@ describe('ComboBox', () => { it('should let the user select an option by clicking on the option node', () => { const wrapper = mount(); openMenu(wrapper); - wrapper.find('ForwardRef(ListBoxMenuItem)').at(0).simulate('click'); + wrapper.find('ListBoxMenuItem').at(0).simulate('click'); expect(mockProps.onChange).toHaveBeenCalledTimes(1); expect(mockProps.onChange).toHaveBeenCalledWith({ selectedItem: mockProps.items[0], @@ -104,7 +104,7 @@ describe('ComboBox', () => { mockProps.onChange.mockClear(); openMenu(wrapper); - wrapper.find('ForwardRef(ListBoxMenuItem)').at(1).simulate('click'); + wrapper.find('ListBoxMenuItem').at(1).simulate('click'); expect(mockProps.onChange).toHaveBeenCalledTimes(1); expect(mockProps.onChange).toHaveBeenCalledWith({ selectedItem: mockProps.items[1], diff --git a/packages/react/src/components/ComboBox/ComboBox.js b/packages/react/src/components/ComboBox/ComboBox.js index 3fd7d0a2658d..25f6cb54b514 100644 --- a/packages/react/src/components/ComboBox/ComboBox.js +++ b/packages/react/src/components/ComboBox/ComboBox.js @@ -402,6 +402,7 @@ const ComboBox = React.forwardRef((props, ref) => { ); }); +ComboBox.displayName = 'ComboBox'; ComboBox.propTypes = { /** * 'aria-label' of the ListBox component. diff --git a/packages/react/src/components/Dropdown/Dropdown-test.js b/packages/react/src/components/Dropdown/Dropdown-test.js index 06f5e3ea26a4..903f92b5c52d 100644 --- a/packages/react/src/components/Dropdown/Dropdown-test.js +++ b/packages/react/src/components/Dropdown/Dropdown-test.js @@ -133,7 +133,7 @@ describe('Dropdown', () => { it('should let the user select an option by clicking on the option node', () => { const wrapper = mount(); openMenu(wrapper); - wrapper.find('ForwardRef(ListBoxMenuItem)').at(0).simulate('click'); + wrapper.find('ListBoxMenuItem').at(0).simulate('click'); expect(mockProps.onChange).toHaveBeenCalledTimes(1); expect(mockProps.onChange).toHaveBeenCalledWith({ selectedItem: mockProps.items[0], @@ -143,7 +143,7 @@ describe('Dropdown', () => { mockProps.onChange.mockClear(); openMenu(wrapper); - wrapper.find('ForwardRef(ListBoxMenuItem)').at(1).simulate('click'); + wrapper.find('ListBoxMenuItem').at(1).simulate('click'); expect(mockProps.onChange).toHaveBeenCalledTimes(1); expect(mockProps.onChange).toHaveBeenCalledWith({ selectedItem: mockProps.items[1], diff --git a/packages/react/src/components/Dropdown/__snapshots__/Dropdown-test.js.snap b/packages/react/src/components/Dropdown/__snapshots__/Dropdown-test.js.snap index 1507eea3e6b4..22a74f42b416 100644 --- a/packages/react/src/components/Dropdown/__snapshots__/Dropdown-test.js.snap +++ b/packages/react/src/components/Dropdown/__snapshots__/Dropdown-test.js.snap @@ -295,7 +295,7 @@ exports[`Dropdown should render custom item components 1`] = ` role="listbox" tabIndex={-1} > - - - + - - + - - + - - + - + @@ -604,7 +604,7 @@ exports[`Dropdown should render with strings as items 1`] = ` role="listbox" tabIndex={-1} > - - - + - + diff --git a/packages/react/src/components/ListBox/ListBoxMenuItem.js b/packages/react/src/components/ListBox/ListBoxMenuItem.js index c3153f47ad6c..f979f4ec11e0 100644 --- a/packages/react/src/components/ListBox/ListBoxMenuItem.js +++ b/packages/react/src/components/ListBox/ListBoxMenuItem.js @@ -53,6 +53,7 @@ const ListBoxMenuItem = React.forwardRef(function ListBoxMenuItem( ); }); +ListBoxMenuItem.displayName = 'ListBoxMenuItem'; ListBoxMenuItem.propTypes = { /** * Specify any children nodes that should be rendered inside of the ListBox diff --git a/packages/react/src/components/ListBox/__tests__/__snapshots__/ListBoxMenu-test.js.snap b/packages/react/src/components/ListBox/__tests__/__snapshots__/ListBoxMenu-test.js.snap index c9d75663e139..52cc01053551 100644 --- a/packages/react/src/components/ListBox/__tests__/__snapshots__/ListBoxMenu-test.js.snap +++ b/packages/react/src/components/ListBox/__tests__/__snapshots__/ListBoxMenu-test.js.snap @@ -9,7 +9,7 @@ exports[`ListBoxMenu should render 1`] = ` id="test-listbox" role="listbox" > - @@ -22,7 +22,7 @@ exports[`ListBoxMenu should render 1`] = ` Hello - + `; diff --git a/packages/react/src/components/ListBox/__tests__/__snapshots__/ListBoxMenuItem-test.js.snap b/packages/react/src/components/ListBox/__tests__/__snapshots__/ListBoxMenuItem-test.js.snap index 8b1f126a2baf..0f20253e8d57 100644 --- a/packages/react/src/components/ListBox/__tests__/__snapshots__/ListBoxMenuItem-test.js.snap +++ b/packages/react/src/components/ListBox/__tests__/__snapshots__/ListBoxMenuItem-test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ListBoxMenuItem should render 1`] = ` - @@ -16,11 +16,11 @@ exports[`ListBoxMenuItem should render 1`] = ` - + `; exports[`ListBoxMenuItem should render 2`] = ` - @@ -35,11 +35,11 @@ exports[`ListBoxMenuItem should render 2`] = ` - + `; exports[`ListBoxMenuItem should render 3`] = ` - @@ -54,5 +54,5 @@ exports[`ListBoxMenuItem should render 3`] = ` - + `; diff --git a/packages/react/src/components/MultiSelect/__tests__/FilterableMultiSelect-test.js b/packages/react/src/components/MultiSelect/__tests__/FilterableMultiSelect-test.js index 4c4474840704..7ccf35a41f55 100644 --- a/packages/react/src/components/MultiSelect/__tests__/FilterableMultiSelect-test.js +++ b/packages/react/src/components/MultiSelect/__tests__/FilterableMultiSelect-test.js @@ -16,7 +16,7 @@ import { generateGenericItem, } from '../../ListBox/test-helpers'; -const listItemName = 'ForwardRef(ListBoxMenuItem)'; +const listItemName = 'ListBoxMenuItem'; const openMenu = (wrapper) => { wrapper.find(`[role="combobox"]`).simulate('click'); }; diff --git a/packages/react/src/components/PaginationNav/PaginationNav.js b/packages/react/src/components/PaginationNav/PaginationNav.js index f72ce69c39a1..8ada5f152121 100644 --- a/packages/react/src/components/PaginationNav/PaginationNav.js +++ b/packages/react/src/components/PaginationNav/PaginationNav.js @@ -426,6 +426,7 @@ PaginationOverflow.propTypes = { translateWithId: PropTypes.func, }; +PaginationNav.displayName = 'PaginationNav'; PaginationNav.propTypes = { /** * Additional CSS class names. diff --git a/packages/react/src/components/Popover/index.js b/packages/react/src/components/Popover/index.js index 319abbb4edf6..cab4b6c64f61 100644 --- a/packages/react/src/components/Popover/index.js +++ b/packages/react/src/components/Popover/index.js @@ -122,6 +122,7 @@ const PopoverContent = React.forwardRef(function PopoverContent( ); }); +PopoverContent.displayName = 'PopoverContent'; PopoverContent.propTypes = { /** * Provide a custom element or component to render the top-level node for the diff --git a/packages/react/src/components/TextInput/ControlledPasswordInput.js b/packages/react/src/components/TextInput/ControlledPasswordInput.js index 4182677e18e3..c62434e654dd 100644 --- a/packages/react/src/components/TextInput/ControlledPasswordInput.js +++ b/packages/react/src/components/TextInput/ControlledPasswordInput.js @@ -153,6 +153,7 @@ const ControlledPasswordInput = React.forwardRef( } ); +ControlledPasswordInput.displayName = 'ControlledPasswordInput'; ControlledPasswordInput.propTypes = { /** * Provide a custom className that is applied directly to the underlying diff --git a/packages/react/src/components/TextInput/PasswordInput.js b/packages/react/src/components/TextInput/PasswordInput.js index 39bdb4a6a79c..c593fb0c6f26 100644 --- a/packages/react/src/components/TextInput/PasswordInput.js +++ b/packages/react/src/components/TextInput/PasswordInput.js @@ -204,6 +204,7 @@ const PasswordInput = React.forwardRef(function PasswordInput( ); }); +PasswordInput.displayName = 'PasswordInput'; PasswordInput.propTypes = { /** * Provide a custom className that is applied directly to the underlying diff --git a/packages/react/src/components/Toolbar/Toolbar.js b/packages/react/src/components/Toolbar/Toolbar.js index 76e1f9b3712c..d27576ab5d82 100644 --- a/packages/react/src/components/Toolbar/Toolbar.js +++ b/packages/react/src/components/Toolbar/Toolbar.js @@ -86,6 +86,7 @@ export const ToolbarTitle = React.forwardRef(({ title }, ref) => ( )); +ToolbarTitle.displayName = 'ToolbarTitle'; ToolbarTitle.propTypes = { /** * Specify the title of the Toolbar @@ -100,6 +101,7 @@ export const ToolbarOption = React.forwardRef(({ children }, ref) => ( )); +ToolbarOption.displayName = 'ToolbarOption'; ToolbarOption.propTypes = { /** * Specify the contents of the ToolbarOption @@ -112,4 +114,6 @@ export const ToolbarDivider = React.forwardRef((props, ref) => (
)); +ToolbarDivider.displayName = 'ToolbarDivider'; + export default Toolbar; diff --git a/packages/react/src/components/UIShell/HeaderMenuItem.js b/packages/react/src/components/UIShell/HeaderMenuItem.js index 56210d88a7aa..408f2f2b6642 100644 --- a/packages/react/src/components/UIShell/HeaderMenuItem.js +++ b/packages/react/src/components/UIShell/HeaderMenuItem.js @@ -45,6 +45,7 @@ const HeaderMenuItem = React.forwardRef(function HeaderMenuItem( ); }); +HeaderMenuItem.displayName = 'HeaderMenuItem'; HeaderMenuItem.propTypes = { /** * Pass in a valid `element` to replace the underlying `` tag with a diff --git a/packages/react/src/components/UIShell/SideNav.js b/packages/react/src/components/UIShell/SideNav.js index 414c7a203e13..7f2f4bacb0b0 100644 --- a/packages/react/src/components/UIShell/SideNav.js +++ b/packages/react/src/components/UIShell/SideNav.js @@ -138,6 +138,7 @@ const SideNav = React.forwardRef(function SideNav(props, ref) { ); }); +SideNav.displayName = 'SideNav'; SideNav.defaultProps = { // TO-DO: comment back in when footer is added for rails // translateById: (id) => { diff --git a/packages/react/src/components/UIShell/SideNavLink.js b/packages/react/src/components/UIShell/SideNavLink.js index d07af038a592..3cd1231d766d 100644 --- a/packages/react/src/components/UIShell/SideNavLink.js +++ b/packages/react/src/components/UIShell/SideNavLink.js @@ -46,6 +46,7 @@ const SideNavLink = React.forwardRef(function SideNavLink( ); }); +SideNavLink.displayName = 'SideNavLink'; SideNavLink.propTypes = { ...LinkPropTypes, diff --git a/packages/react/src/components/UIShell/SideNavMenuItem.js b/packages/react/src/components/UIShell/SideNavMenuItem.js index c94009654527..4e3ac46fa9b9 100644 --- a/packages/react/src/components/UIShell/SideNavMenuItem.js +++ b/packages/react/src/components/UIShell/SideNavMenuItem.js @@ -30,6 +30,7 @@ const SideNavMenuItem = React.forwardRef(function SideNavMenuItem(props, ref) { ); }); +SideNavMenuItem.displayName = 'SideNavMenuItem'; SideNavMenuItem.propTypes = { /** * Specify the children to be rendered inside of the `SideNavMenuItem` diff --git a/packages/react/src/components/UIShell/SideNavSwitcher.js b/packages/react/src/components/UIShell/SideNavSwitcher.js index 37f1dd8d194a..e4bcd1d30177 100644 --- a/packages/react/src/components/UIShell/SideNavSwitcher.js +++ b/packages/react/src/components/UIShell/SideNavSwitcher.js @@ -53,6 +53,7 @@ const SideNavSwitcher = React.forwardRef(function SideNavSwitcher(props, ref) { ); }); +SideNavSwitcher.displayName = 'SideNavSwitcher'; SideNavSwitcher.propTypes = { /** * Provide an optional class to be applied to the containing node diff --git a/packages/react/src/components/UIShell/Switcher.js b/packages/react/src/components/UIShell/Switcher.js index ae1f121e63fd..7af28b16bfd8 100644 --- a/packages/react/src/components/UIShell/Switcher.js +++ b/packages/react/src/components/UIShell/Switcher.js @@ -36,6 +36,7 @@ const Switcher = React.forwardRef(function Switcher(props, ref) { ); }); +Switcher.displayName = 'Switcher'; Switcher.propTypes = { /** * Required props for accessibility label on the underlying menu diff --git a/packages/react/src/components/UIShell/SwitcherItem.js b/packages/react/src/components/UIShell/SwitcherItem.js index 6a03fab3f5b4..1a3f3b78d0f2 100644 --- a/packages/react/src/components/UIShell/SwitcherItem.js +++ b/packages/react/src/components/UIShell/SwitcherItem.js @@ -50,6 +50,7 @@ const SwitcherItem = React.forwardRef(function SwitcherItem(props, ref) { ); }); +SwitcherItem.displayName = 'SwitcherItem'; SwitcherItem.propTypes = { /** * Required props for accessibility label on the underlying menuitem diff --git a/packages/react/src/components/UIShell/__tests__/__snapshots__/HeaderMenu-test.js.snap b/packages/react/src/components/UIShell/__tests__/__snapshots__/HeaderMenu-test.js.snap index 934e2a3d2540..9bb46f4e7a8e 100644 --- a/packages/react/src/components/UIShell/__tests__/__snapshots__/HeaderMenu-test.js.snap +++ b/packages/react/src/components/UIShell/__tests__/__snapshots__/HeaderMenu-test.js.snap @@ -103,7 +103,7 @@ exports[`HeaderMenu should render 1`] = ` aria-label="Accessibility label" className="bx--header__menu" > - @@ -127,8 +127,8 @@ exports[`HeaderMenu should render 1`] = ` - - + @@ -152,8 +152,8 @@ exports[`HeaderMenu should render 1`] = ` - - + @@ -177,7 +177,7 @@ exports[`HeaderMenu should render 1`] = ` - + diff --git a/packages/react/src/components/UIShell/__tests__/__snapshots__/HeaderMenuItem-test.js.snap b/packages/react/src/components/UIShell/__tests__/__snapshots__/HeaderMenuItem-test.js.snap index aed4a4e59d32..c0234b3220b4 100644 --- a/packages/react/src/components/UIShell/__tests__/__snapshots__/HeaderMenuItem-test.js.snap +++ b/packages/react/src/components/UIShell/__tests__/__snapshots__/HeaderMenuItem-test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`HeaderMenuItem should render 1`] = ` - @@ -26,5 +26,5 @@ exports[`HeaderMenuItem should render 1`] = ` - + `; diff --git a/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNav-test.js.snap b/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNav-test.js.snap index 3f0dff98b0d9..ea8b9ba2d812 100644 --- a/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNav-test.js.snap +++ b/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNav-test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`SideNav should render 1`] = ` - - - + - + `; diff --git a/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNavLink-test.js.snap b/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNavLink-test.js.snap index fd11112db550..50d5f92d796b 100644 --- a/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNavLink-test.js.snap +++ b/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNavLink-test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`SideNavLink should render 1`] = ` - - + `; exports[`SideNavLink should render 2`] = ` - - + `; diff --git a/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNavMenuItem-test.js.snap b/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNavMenuItem-test.js.snap index 2b1ae57cde64..df5da0118c16 100644 --- a/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNavMenuItem-test.js.snap +++ b/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNavMenuItem-test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`SideNavMenuItem should render 1`] = ` - - + `; exports[`SideNavMenuItem should render active styles with \`isActive\` or \`aria-current="page"\` 1`] = ` - - + `; exports[`SideNavMenuItem should render active styles with \`isActive\` or \`aria-current="page"\` 2`] = ` - - + `; diff --git a/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNavSwitcher-test.js.snap b/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNavSwitcher-test.js.snap index a0382be7c389..2d199159cd83 100644 --- a/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNavSwitcher-test.js.snap +++ b/packages/react/src/components/UIShell/__tests__/__snapshots__/SideNavSwitcher-test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`SideNavSwitcher should render 1`] = ` - - + `;