From 2822e90904d30e37e55325d000c48f78509579cf Mon Sep 17 00:00:00 2001 From: Josh Black Date: Wed, 19 Jun 2019 23:21:48 -0500 Subject: [PATCH] chore(react): update to use new icon imports --- .../Accordion/Accordion.Skeleton.js | 2 +- .../AccordionItem/AccordionItem-test.js | 2 +- .../components/AccordionItem/AccordionItem.js | 2 +- .../src/components/Button/Button-story.js | 3 +- .../src/components/Button/Button-test.js | 2 +- .../src/components/CodeSnippet/CodeSnippet.js | 2 +- .../react/src/components/ComboBox/ComboBox.js | 2 +- .../components/ComposedModal/ComposedModal.js | 2 +- .../components/CopyButton/CopyButton-test.js | 2 +- .../src/components/CopyButton/CopyButton.js | 2 +- .../DangerButton/DangerButton-test.js | 2 +- .../components/DataTable/TableBatchAction.js | 2 +- .../components/DataTable/TableExpandHeader.js | 2 +- .../components/DataTable/TableExpandRow.js | 2 +- .../src/components/DataTable/TableHeader.js | 6 +- .../components/DataTable/TableToolbarMenu.js | 2 +- .../__tests__/TableToolbarMenu-test.js | 2 +- .../__snapshots__/DataTable-test.js.snap | 545 +++++------------- .../TableBatchAction-test.js.snap | 86 +-- .../__snapshots__/TableExpandRow-test.js.snap | 42 +- .../TableToolbarMenu-test.js.snap | 113 +--- .../TableToolbarSearch-test.js.snap | 84 +-- .../DataTable/stories/with-batch-actions.js | 8 +- .../DataTable/stories/with-dynamic-content.js | 8 +- .../DatePickerInput/DatePickerInput.js | 2 +- .../react/src/components/Dropdown/Dropdown.js | 2 +- .../__snapshots__/Dropdown-test.js.snap | 147 ++--- .../FileUploader/FileUploader-test.js | 2 +- .../components/FileUploader/FileUploader.js | 3 +- .../react/src/components/ListBox/ListBox.js | 2 +- .../src/components/ListBox/ListBoxMenuIcon.js | 2 +- .../components/ListBox/ListBoxSelection.js | 2 +- .../__snapshots__/ListBoxField-test.js.snap | 42 +- .../ListBoxMenuIcon-test.js.snap | 98 ++-- .../ListBoxSelection-test.js.snap | 84 +-- .../react/src/components/Modal/Modal-test.js | 2 +- packages/react/src/components/Modal/Modal.js | 2 +- .../ModalWrapper/ModalWrapper-story.js | 3 +- .../__snapshots__/ModalWrapper-test.js.snap | 43 +- .../MultiSelect/FilterableMultiSelect.js | 2 +- .../src/components/MultiSelect/MultiSelect.js | 2 +- .../FilterableMultiSelect-test.js.snap | 49 +- .../__snapshots__/MultiSelect-test.js.snap | 49 +- .../Notification/Notification-test.js | 4 +- .../components/Notification/Notification.js | 10 +- .../NumberInput/NumberInput-test.js | 3 +- .../src/components/NumberInput/NumberInput.js | 8 +- .../OverflowMenu/OverflowMenu-test.js | 2 +- .../components/OverflowMenu/OverflowMenu.js | 2 +- .../components/Pagination/Pagination-test.js | 3 +- .../src/components/Pagination/Pagination.js | 3 +- .../PrimaryButton/PrimaryButton-test.js | 2 +- .../ProgressIndicator/ProgressIndicator.js | 3 +- .../src/components/RadioTile/RadioTile.js | 2 +- .../src/components/Search/Search-test.js | 3 +- .../react/src/components/Search/Search.js | 4 +- .../SearchFilterButton-test.js | 2 +- .../SearchFilterButton/SearchFilterButton.js | 2 +- .../SearchLayoutButton-test.js | 3 +- .../SearchLayoutButton/SearchLayoutButton.js | 3 +- .../SecondaryButton/SecondaryButton-test.js | 2 +- .../src/components/Select/Select-test.js | 2 +- .../react/src/components/Select/Select.js | 3 +- .../StructuredList/StructuredList-story.js | 2 +- .../react/src/components/Tabs/Tabs-test.js | 2 +- packages/react/src/components/Tabs/Tabs.js | 2 +- packages/react/src/components/Tag/Tag.js | 2 +- .../react/src/components/TextArea/TextArea.js | 2 +- .../TextInput/ControlledPasswordInput.js | 4 +- .../src/components/TextInput/PasswordInput.js | 4 +- .../src/components/TextInput/TextInput.js | 2 +- .../react/src/components/Tile/Tile-test.js | 2 +- packages/react/src/components/Tile/Tile.js | 6 +- .../TimePickerSelect/TimePickerSelect.js | 2 +- .../src/components/Toolbar/Toolbar-story.js | 2 +- .../components/ToolbarSearch/ToolbarSearch.js | 2 +- .../src/components/Tooltip/Tooltip-story.js | 2 +- .../src/components/Tooltip/Tooltip-test.js | 8 +- .../react/src/components/Tooltip/Tooltip.js | 2 +- .../TooltipIcon/TooltipIcon-story.js | 2 +- .../src/components/UIShell/HeaderMenu.js | 9 +- .../components/UIShell/HeaderMenuButton.js | 10 +- .../src/components/UIShell/SideNavFooter.js | 10 +- .../src/components/UIShell/SideNavMenu.js | 9 +- .../src/components/UIShell/SideNavSwitcher.js | 9 +- .../src/components/UIShell/UIShell-story.js | 11 +- .../__tests__/HeaderGlobalAction-test.js | 9 +- .../__tests__/HeaderMenuButton-test.js | 9 +- .../HeaderGlobalAction-test.js.snap | 42 +- .../__snapshots__/HeaderMenu-test.js.snap | 42 +- .../HeaderMenuButton-test.js.snap | 42 +- .../__snapshots__/SideNav-test.js.snap | 42 +- .../__snapshots__/SideNavFooter-test.js.snap | 84 +-- .../__snapshots__/SideNavMenu-test.js.snap | 42 +- .../SideNavSwitcher-test.js.snap | 42 +- 95 files changed, 840 insertions(+), 1149 deletions(-) diff --git a/packages/react/src/components/Accordion/Accordion.Skeleton.js b/packages/react/src/components/Accordion/Accordion.Skeleton.js index e081f9d25088..664fe6ceec49 100644 --- a/packages/react/src/components/Accordion/Accordion.Skeleton.js +++ b/packages/react/src/components/Accordion/Accordion.Skeleton.js @@ -8,7 +8,7 @@ import PropTypes from 'prop-types'; import React from 'react'; import SkeletonText from '../SkeletonText'; -import ChevronRight16 from '@carbon/icons-react/lib/chevron--right/16'; +import { ChevronRight16 } from '@carbon/icons-react'; import { settings } from 'carbon-components'; const { prefix } = settings; diff --git a/packages/react/src/components/AccordionItem/AccordionItem-test.js b/packages/react/src/components/AccordionItem/AccordionItem-test.js index 8c26699b3414..64d227b4c362 100644 --- a/packages/react/src/components/AccordionItem/AccordionItem-test.js +++ b/packages/react/src/components/AccordionItem/AccordionItem-test.js @@ -7,7 +7,7 @@ import React from 'react'; import AccordionItem from '../AccordionItem'; -import ChevronRight16 from '@carbon/icons-react/lib/chevron--right/16'; +import { ChevronRight16 } from '@carbon/icons-react'; import { shallow, mount } from 'enzyme'; import { settings } from 'carbon-components'; diff --git a/packages/react/src/components/AccordionItem/AccordionItem.js b/packages/react/src/components/AccordionItem/AccordionItem.js index e2f8602de041..a256c1001494 100644 --- a/packages/react/src/components/AccordionItem/AccordionItem.js +++ b/packages/react/src/components/AccordionItem/AccordionItem.js @@ -9,7 +9,7 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import classnames from 'classnames'; import { settings } from 'carbon-components'; -import ChevronRight16 from '@carbon/icons-react/lib/chevron--right/16'; +import { ChevronRight16 } from '@carbon/icons-react'; import { match, keys } from '../../tools/key'; const { prefix } = settings; diff --git a/packages/react/src/components/Button/Button-story.js b/packages/react/src/components/Button/Button-story.js index a01ddd018ed4..719ab038a9c7 100644 --- a/packages/react/src/components/Button/Button-story.js +++ b/packages/react/src/components/Button/Button-story.js @@ -11,8 +11,7 @@ import { action } from '@storybook/addon-actions'; import { withKnobs, boolean, select, text } from '@storybook/addon-knobs'; import { settings } from 'carbon-components'; import { iconAddSolid, iconSearch } from 'carbon-icons'; -import AddFilled16 from '@carbon/icons-react/lib/add--filled/16'; -import Search16 from '@carbon/icons-react/lib/search/16'; +import { AddFilled16, Search16 } from '@carbon/icons-react'; import Button from '../Button'; import ButtonSkeleton from '../Button/Button.Skeleton'; diff --git a/packages/react/src/components/Button/Button-test.js b/packages/react/src/components/Button/Button-test.js index 73c99baee813..4a70fbfdf5db 100644 --- a/packages/react/src/components/Button/Button-test.js +++ b/packages/react/src/components/Button/Button-test.js @@ -6,7 +6,7 @@ */ import React from 'react'; -import Search16 from '@carbon/icons-react/lib/search/16'; +import { Search16 } from '@carbon/icons-react'; import Button from '../Button'; import Link from '../Link'; import ButtonSkeleton from '../Button/Button.Skeleton'; diff --git a/packages/react/src/components/CodeSnippet/CodeSnippet.js b/packages/react/src/components/CodeSnippet/CodeSnippet.js index af6211d15676..34b5ef09bbf2 100644 --- a/packages/react/src/components/CodeSnippet/CodeSnippet.js +++ b/packages/react/src/components/CodeSnippet/CodeSnippet.js @@ -8,7 +8,7 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import classNames from 'classnames'; -import ChevronDown16 from '@carbon/icons-react/lib/chevron--down/16'; +import { ChevronDown16 } from '@carbon/icons-react'; import { settings } from 'carbon-components'; import Copy from '../Copy'; import CopyButton from '../CopyButton'; diff --git a/packages/react/src/components/ComboBox/ComboBox.js b/packages/react/src/components/ComboBox/ComboBox.js index 277047aedaba..af655b420ca4 100644 --- a/packages/react/src/components/ComboBox/ComboBox.js +++ b/packages/react/src/components/ComboBox/ComboBox.js @@ -10,7 +10,7 @@ import Downshift from 'downshift'; import PropTypes from 'prop-types'; import React from 'react'; import { settings } from 'carbon-components'; -import WarningFilled16 from '@carbon/icons-react/lib/warning--filled/16'; +import { WarningFilled16 } from '@carbon/icons-react'; import ListBox, { PropTypes as ListBoxPropTypes } from '../ListBox'; const { prefix } = settings; diff --git a/packages/react/src/components/ComposedModal/ComposedModal.js b/packages/react/src/components/ComposedModal/ComposedModal.js index efd9907d4bc0..cbb66341caad 100644 --- a/packages/react/src/components/ComposedModal/ComposedModal.js +++ b/packages/react/src/components/ComposedModal/ComposedModal.js @@ -10,7 +10,7 @@ import PropTypes from 'prop-types'; import Button from '../Button'; import classNames from 'classnames'; import { settings } from 'carbon-components'; -import Close20 from '@carbon/icons-react/lib/close/20'; +import { Close20 } from '@carbon/icons-react'; const { prefix } = settings; diff --git a/packages/react/src/components/CopyButton/CopyButton-test.js b/packages/react/src/components/CopyButton/CopyButton-test.js index 89cefe45c5bb..7a6879ec6532 100644 --- a/packages/react/src/components/CopyButton/CopyButton-test.js +++ b/packages/react/src/components/CopyButton/CopyButton-test.js @@ -7,7 +7,7 @@ import React from 'react'; import CopyButton from '../CopyButton'; -import Copy16 from '@carbon/icons-react/lib/copy/16'; +import { Copy16 } from '@carbon/icons-react'; import { shallow, mount } from 'enzyme'; import { settings } from 'carbon-components'; diff --git a/packages/react/src/components/CopyButton/CopyButton.js b/packages/react/src/components/CopyButton/CopyButton.js index 4fcafd39710b..61989e9a5515 100644 --- a/packages/react/src/components/CopyButton/CopyButton.js +++ b/packages/react/src/components/CopyButton/CopyButton.js @@ -9,7 +9,7 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import classnames from 'classnames'; import { settings } from 'carbon-components'; -import Copy16 from '@carbon/icons-react/lib/copy/16'; +import { Copy16 } from '@carbon/icons-react'; const { prefix } = settings; diff --git a/packages/react/src/components/DangerButton/DangerButton-test.js b/packages/react/src/components/DangerButton/DangerButton-test.js index 995856356ba8..d39cf62f48f5 100644 --- a/packages/react/src/components/DangerButton/DangerButton-test.js +++ b/packages/react/src/components/DangerButton/DangerButton-test.js @@ -8,7 +8,7 @@ import React from 'react'; import DangerButton from '../DangerButton'; import { shallow, mount } from 'enzyme'; -import Search16 from '@carbon/icons-react/lib/search/16'; +import { Search16 } from '@carbon/icons-react'; import { settings } from 'carbon-components'; const { prefix } = settings; diff --git a/packages/react/src/components/DataTable/TableBatchAction.js b/packages/react/src/components/DataTable/TableBatchAction.js index 30eb618f4bab..347aee29c8cc 100644 --- a/packages/react/src/components/DataTable/TableBatchAction.js +++ b/packages/react/src/components/DataTable/TableBatchAction.js @@ -7,7 +7,7 @@ import PropTypes from 'prop-types'; import React from 'react'; -import iconAddSolid from '@carbon/icons-react/lib/add--filled/16'; +import { AddFilled16 as iconAddSolid } from '@carbon/icons-react'; import Button from '../Button'; const TableBatchAction = props => @@ -2163,27 +2043,6 @@ exports[`DataTable should render 1`] = ` renderIcon={ Object { "$$typeof": Symbol(react.forward_ref), - "defaultProps": Object { - "height": 16, - "preserveAspectRatio": "xMidYMid meet", - "viewBox": "0 0 16 16", - "width": 16, - "xmlns": "http://www.w3.org/2000/svg", - }, - "displayName": "AddFilled16", - "propTypes": Object { - "aria-hidden": [Function], - "aria-label": [Function], - "aria-labelledby": [Function], - "children": [Function], - "className": [Function], - "height": [Function], - "preserveAspectRatio": [Function], - "tabIndex": [Function], - "viewBox": [Function], - "width": [Function], - "xmlns": [Function], - }, "render": [Function], } } @@ -2196,27 +2055,6 @@ exports[`DataTable should render 1`] = ` renderIcon={ Object { "$$typeof": Symbol(react.forward_ref), - "defaultProps": Object { - "height": 16, - "preserveAspectRatio": "xMidYMid meet", - "viewBox": "0 0 16 16", - "width": 16, - "xmlns": "http://www.w3.org/2000/svg", - }, - "displayName": "AddFilled16", - "propTypes": Object { - "aria-hidden": [Function], - "aria-label": [Function], - "aria-labelledby": [Function], - "children": [Function], - "className": [Function], - "height": [Function], - "preserveAspectRatio": [Function], - "tabIndex": [Function], - "viewBox": [Function], - "width": [Function], - "xmlns": [Function], - }, "render": [Function], } } @@ -2232,38 +2070,44 @@ exports[`DataTable should render 1`] = ` type="button" > Ghost - - - - - + + + + + @@ -2273,27 +2117,6 @@ exports[`DataTable should render 1`] = ` renderIcon={ Object { "$$typeof": Symbol(react.forward_ref), - "defaultProps": Object { - "height": 16, - "preserveAspectRatio": "xMidYMid meet", - "viewBox": "0 0 16 16", - "width": 16, - "xmlns": "http://www.w3.org/2000/svg", - }, - "displayName": "AddFilled16", - "propTypes": Object { - "aria-hidden": [Function], - "aria-label": [Function], - "aria-labelledby": [Function], - "children": [Function], - "className": [Function], - "height": [Function], - "preserveAspectRatio": [Function], - "tabIndex": [Function], - "viewBox": [Function], - "width": [Function], - "xmlns": [Function], - }, "render": [Function], } } @@ -2306,27 +2129,6 @@ exports[`DataTable should render 1`] = ` renderIcon={ Object { "$$typeof": Symbol(react.forward_ref), - "defaultProps": Object { - "height": 16, - "preserveAspectRatio": "xMidYMid meet", - "viewBox": "0 0 16 16", - "width": 16, - "xmlns": "http://www.w3.org/2000/svg", - }, - "displayName": "AddFilled16", - "propTypes": Object { - "aria-hidden": [Function], - "aria-label": [Function], - "aria-labelledby": [Function], - "children": [Function], - "className": [Function], - "height": [Function], - "preserveAspectRatio": [Function], - "tabIndex": [Function], - "viewBox": [Function], - "width": [Function], - "xmlns": [Function], - }, "render": [Function], } } @@ -2342,38 +2144,44 @@ exports[`DataTable should render 1`] = ` type="button" > Ghost - - - - - + + + + + @@ -2445,37 +2253,43 @@ exports[`DataTable should render 1`] = ` className="bx--search bx--search--sm bx--search-maginfier" role="search" > - - - - - + + + + +