From de855d8d4335645eef6a12a108ac7483ca7438df Mon Sep 17 00:00:00 2001 From: Brandon Lenz Date: Tue, 12 Oct 2021 19:32:51 -0400 Subject: [PATCH 01/12] Fix typo in Icon name - Unify spacing in files with large lists of icons - Add convenience hoc for internal use in deprecating components. Particularly useful for Icons which are generated. - Deprecate IconVisiblity, to remove on next major release. --- example/src/pages/Icons.tsx | 4 +- src/components/Icon/Icon.stories.tsx | 225 +++++++++++++++++- src/components/Icon/Icons.stories.tsx | 4 +- src/components/Icon/Icons.ts | 201 +++++++++++++++- .../hoc/withDeprecationWarning.test.tsx | 31 +++ src/components/hoc/withDeprecationWarning.tsx | 17 ++ 6 files changed, 474 insertions(+), 8 deletions(-) create mode 100644 src/components/hoc/withDeprecationWarning.test.tsx create mode 100644 src/components/hoc/withDeprecationWarning.tsx diff --git a/example/src/pages/Icons.tsx b/example/src/pages/Icons.tsx index f54533dfa5..124334d719 100644 --- a/example/src/pages/Icons.tsx +++ b/example/src/pages/Icons.tsx @@ -228,7 +228,7 @@ import { IconUploadFile, IconVerified, IconVerifiedUser, - IconVisiblity, + IconVisibility, IconVisibilityOff, IconVolumeOff, IconWarning, @@ -479,7 +479,7 @@ const IconsPage = (): React.ReactElement => { - + diff --git a/src/components/Icon/Icon.stories.tsx b/src/components/Icon/Icon.stories.tsx index 223018c78d..8f13363c1a 100644 --- a/src/components/Icon/Icon.stories.tsx +++ b/src/components/Icon/Icon.stories.tsx @@ -228,7 +228,7 @@ import { IconUploadFile, IconVerified, IconVerifiedUser, - IconVisiblity, + IconVisibility, IconVisibilityOff, IconVolumeOff, IconWarning, @@ -296,138 +296,181 @@ export const add = (args: StorybookArgs): React.ReactElement => ( export const addCircle = (args: StorybookArgs): React.ReactElement => ( ) + export const addCircleOutline = (args: StorybookArgs): React.ReactElement => ( ) + export const alarm = (args: StorybookArgs): React.ReactElement => ( ) + export const alternateEmail = (args: StorybookArgs): React.ReactElement => ( ) + export const announcement = (args: StorybookArgs): React.ReactElement => ( ) + export const arrowBack = (args: StorybookArgs): React.ReactElement => ( ) + export const arrowDownward = (args: StorybookArgs): React.ReactElement => ( ) + export const arrowDropDown = (args: StorybookArgs): React.ReactElement => ( ) + export const arrowDropUp = (args: StorybookArgs): React.ReactElement => ( ) + export const arrowForward = (args: StorybookArgs): React.ReactElement => ( ) + export const arrowUpward = (args: StorybookArgs): React.ReactElement => ( ) + export const api = (args: StorybookArgs): React.ReactElement => ( ) + export const assessment = (args: StorybookArgs): React.ReactElement => ( ) + export const attachFile = (args: StorybookArgs): React.ReactElement => ( ) + export const attachMoney = (args: StorybookArgs): React.ReactElement => ( ) + export const autorenew = (args: StorybookArgs): React.ReactElement => ( ) + export const backpack = (args: StorybookArgs): React.ReactElement => ( ) + export const bathtub = (args: StorybookArgs): React.ReactElement => ( ) + export const bedding = (args: StorybookArgs): React.ReactElement => ( ) + export const bookmark = (args: StorybookArgs): React.ReactElement => ( ) + export const bugReport = (args: StorybookArgs): React.ReactElement => ( ) + export const build = (args: StorybookArgs): React.ReactElement => ( ) + export const calendarToday = (args: StorybookArgs): React.ReactElement => ( ) + export const campaign = (args: StorybookArgs): React.ReactElement => ( ) + export const camping = (args: StorybookArgs): React.ReactElement => ( ) + export const cancel = (args: StorybookArgs): React.ReactElement => ( ) + export const chat = (args: StorybookArgs): React.ReactElement => ( ) + export const check = (args: StorybookArgs): React.ReactElement => ( ) + export const checkBoxOutlineBlank = ( args: StorybookArgs ): React.ReactElement => export const checkCircle = (args: StorybookArgs): React.ReactElement => ( ) + export const checkCircleOutline = (args: StorybookArgs): React.ReactElement => ( ) + export const checkroom = (args: StorybookArgs): React.ReactElement => ( ) + export const cleanHands = (args: StorybookArgs): React.ReactElement => ( ) + export const clothes = (args: StorybookArgs): React.ReactElement => ( ) + export const close = (args: StorybookArgs): React.ReactElement => ( ) + export const closedCaption = (args: StorybookArgs): React.ReactElement => ( ) + export const cloud = (args: StorybookArgs): React.ReactElement => ( ) + export const code = (args: StorybookArgs): React.ReactElement => ( ) + export const comment = (args: StorybookArgs): React.ReactElement => ( ) + export const connectWithoutContact = ( args: StorybookArgs ): React.ReactElement => export const construction = (args: StorybookArgs): React.ReactElement => ( ) + export const constructionWorker = (args: StorybookArgs): React.ReactElement => ( ) + export const contactPage = (args: StorybookArgs): React.ReactElement => ( ) + export const contentCopy = (args: StorybookArgs): React.ReactElement => ( ) + export const coronavirus = (args: StorybookArgs): React.ReactElement => ( ) + export const creditCard = (args: StorybookArgs): React.ReactElement => ( ) @@ -435,420 +478,554 @@ export const creditCard = (args: StorybookArgs): React.ReactElement => ( export const deck = (args: StorybookArgs): React.ReactElement => ( ) + export const deleteIcon = (args: StorybookArgs): React.ReactElement => ( ) + export const deviceThermostat = (args: StorybookArgs): React.ReactElement => ( ) + export const directions = (args: StorybookArgs): React.ReactElement => ( ) + export const directionsBike = (args: StorybookArgs): React.ReactElement => ( ) + export const directionsBus = (args: StorybookArgs): React.ReactElement => ( ) + export const directionsCar = (args: StorybookArgs): React.ReactElement => ( ) + export const directionsWalk = (args: StorybookArgs): React.ReactElement => ( ) + export const doNotDisturb = (args: StorybookArgs): React.ReactElement => ( ) + export const doNotTouch = (args: StorybookArgs): React.ReactElement => ( ) + export const dragHandle = (args: StorybookArgs): React.ReactElement => ( ) + export const eco = (args: StorybookArgs): React.ReactElement => ( ) + export const electricalServices = (args: StorybookArgs): React.ReactElement => ( ) + export const emojiEvents = (args: StorybookArgs): React.ReactElement => ( ) + export const error = (args: StorybookArgs): React.ReactElement => ( ) + export const errorOutline = (args: StorybookArgs): React.ReactElement => ( ) + export const event = (args: StorybookArgs): React.ReactElement => ( ) + export const expandLess = (args: StorybookArgs): React.ReactElement => ( ) + export const expandMore = (args: StorybookArgs): React.ReactElement => ( ) + export const facebook = (args: StorybookArgs): React.ReactElement => ( ) + export const fastForward = (args: StorybookArgs): React.ReactElement => ( ) + export const fastRewind = (args: StorybookArgs): React.ReactElement => ( ) + export const favorite = (args: StorybookArgs): React.ReactElement => ( ) + export const favoriteBorder = (args: StorybookArgs): React.ReactElement => ( ) + export const fileDownload = (args: StorybookArgs): React.ReactElement => ( ) + export const filePresent = (args: StorybookArgs): React.ReactElement => ( ) + export const fileUpload = (args: StorybookArgs): React.ReactElement => ( ) + export const filterAlt = (args: StorybookArgs): React.ReactElement => ( ) + export const filterList = (args: StorybookArgs): React.ReactElement => ( ) + export const fingerprint = (args: StorybookArgs): React.ReactElement => ( ) + export const firstPage = (args: StorybookArgs): React.ReactElement => ( ) + export const flag = (args: StorybookArgs): React.ReactElement => ( ) + export const flickr = (args: StorybookArgs): React.ReactElement => ( ) + export const flight = (args: StorybookArgs): React.ReactElement => ( ) + export const flooding = (args: StorybookArgs): React.ReactElement => ( ) + export const folder = (args: StorybookArgs): React.ReactElement => ( ) + export const folderOpen = (args: StorybookArgs): React.ReactElement => ( ) + export const formatQuote = (args: StorybookArgs): React.ReactElement => ( ) + export const formatSize = (args: StorybookArgs): React.ReactElement => ( ) + export const forum = (args: StorybookArgs): React.ReactElement => ( ) + export const github = (args: StorybookArgs): React.ReactElement => ( ) + export const gridView = (args: StorybookArgs): React.ReactElement => ( ) + export const groupAdd = (args: StorybookArgs): React.ReactElement => ( ) + export const groups = (args: StorybookArgs): React.ReactElement => ( ) + export const hearing = (args: StorybookArgs): React.ReactElement => ( ) + export const help = (args: StorybookArgs): React.ReactElement => ( ) + export const helpOutline = (args: StorybookArgs): React.ReactElement => ( ) + export const highlightOff = (args: StorybookArgs): React.ReactElement => ( ) + export const history = (args: StorybookArgs): React.ReactElement => ( ) + export const home = (args: StorybookArgs): React.ReactElement => ( ) + export const hospital = (args: StorybookArgs): React.ReactElement => ( ) + export const hotel = (args: StorybookArgs): React.ReactElement => ( ) + export const hourglassEmpty = (args: StorybookArgs): React.ReactElement => ( ) + export const hurricane = (args: StorybookArgs): React.ReactElement => ( ) + export const identification = (args: StorybookArgs): React.ReactElement => ( ) + export const image = (args: StorybookArgs): React.ReactElement => ( ) + export const info = (args: StorybookArgs): React.ReactElement => ( ) + export const infoOutline = (args: StorybookArgs): React.ReactElement => ( ) + export const insights = (args: StorybookArgs): React.ReactElement => ( ) + export const instagram = (args: StorybookArgs): React.ReactElement => ( ) + export const keyboard = (args: StorybookArgs): React.ReactElement => ( ) + export const label = (args: StorybookArgs): React.ReactElement => ( ) + export const language = (args: StorybookArgs): React.ReactElement => ( ) + export const lastPage = (args: StorybookArgs): React.ReactElement => ( ) + export const launch = (args: StorybookArgs): React.ReactElement => ( ) + export const lightbulb = (args: StorybookArgs): React.ReactElement => ( ) + export const lightbulbOutline = (args: StorybookArgs): React.ReactElement => ( ) + export const link = (args: StorybookArgs): React.ReactElement => ( ) + export const linkOff = (args: StorybookArgs): React.ReactElement => ( ) + export const list = (args: StorybookArgs): React.ReactElement => ( ) + export const localCafe = (args: StorybookArgs): React.ReactElement => ( ) + export const localFireDepartment = ( args: StorybookArgs ): React.ReactElement => export const localGasStation = (args: StorybookArgs): React.ReactElement => ( ) + export const localGroceryStore = (args: StorybookArgs): React.ReactElement => ( ) + export const localHospital = (args: StorybookArgs): React.ReactElement => ( ) + export const localLaundryService = ( args: StorybookArgs ): React.ReactElement => export const localLibrary = (args: StorybookArgs): React.ReactElement => ( ) + export const localOffer = (args: StorybookArgs): React.ReactElement => ( ) + export const localParking = (args: StorybookArgs): React.ReactElement => ( ) + export const localPharmacy = (args: StorybookArgs): React.ReactElement => ( ) + export const localPolice = (args: StorybookArgs): React.ReactElement => ( ) + export const localTaxi = (args: StorybookArgs): React.ReactElement => ( ) + export const locationCity = (args: StorybookArgs): React.ReactElement => ( ) + export const locationOn = (args: StorybookArgs): React.ReactElement => ( ) + export const lock = (args: StorybookArgs): React.ReactElement => ( ) + export const lockOpen = (args: StorybookArgs): React.ReactElement => ( ) + export const lockOutline = (args: StorybookArgs): React.ReactElement => ( ) + export const login = (args: StorybookArgs): React.ReactElement => ( ) + export const logout = (args: StorybookArgs): React.ReactElement => ( ) + export const loop = (args: StorybookArgs): React.ReactElement => ( ) + export const mail = (args: StorybookArgs): React.ReactElement => ( ) + export const mailOutline = (args: StorybookArgs): React.ReactElement => ( ) + export const map = (args: StorybookArgs): React.ReactElement => ( ) + export const masks = (args: StorybookArgs): React.ReactElement => ( ) + export const medicalServices = (args: StorybookArgs): React.ReactElement => ( ) + export const menu = (args: StorybookArgs): React.ReactElement => ( ) + export const militaryTech = (args: StorybookArgs): React.ReactElement => ( ) + export const moreHoriz = (args: StorybookArgs): React.ReactElement => ( ) + export const moreVert = (args: StorybookArgs): React.ReactElement => ( ) + export const myLocation = (args: StorybookArgs): React.ReactElement => ( ) + export const navigateBefore = (args: StorybookArgs): React.ReactElement => ( ) + export const navigateNext = (args: StorybookArgs): React.ReactElement => ( ) + export const navigateFarBefore = (args: StorybookArgs): React.ReactElement => ( ) + export const navigateFarNext = (args: StorybookArgs): React.ReactElement => ( ) + export const nearMe = (args: StorybookArgs): React.ReactElement => ( ) + export const notifications = (args: StorybookArgs): React.ReactElement => ( ) + export const notificationsActive = ( args: StorybookArgs ): React.ReactElement => export const notificationsNone = (args: StorybookArgs): React.ReactElement => ( ) + export const notificationsOff = (args: StorybookArgs): React.ReactElement => ( ) + export const park = (args: StorybookArgs): React.ReactElement => ( ) + export const people = (args: StorybookArgs): React.ReactElement => ( ) + export const person = (args: StorybookArgs): React.ReactElement => ( ) + export const pets = (args: StorybookArgs): React.ReactElement => ( ) + export const phone = (args: StorybookArgs): React.ReactElement => ( ) + export const photoCamera = (args: StorybookArgs): React.ReactElement => ( ) + export const print = (args: StorybookArgs): React.ReactElement => ( ) + export const priorityHigh = (args: StorybookArgs): React.ReactElement => ( ) + export const publicIcon = (args: StorybookArgs): React.ReactElement => ( ) + export const pushPin = (args: StorybookArgs): React.ReactElement => ( ) + export const radioButtonUnchecked = ( args: StorybookArgs ): React.ReactElement => export const rain = (args: StorybookArgs): React.ReactElement => ( ) + export const reduceCapacity = (args: StorybookArgs): React.ReactElement => ( ) + export const remove = (args: StorybookArgs): React.ReactElement => ( ) + export const report = (args: StorybookArgs): React.ReactElement => ( ) + export const restaurant = (args: StorybookArgs): React.ReactElement => ( ) + export const rssFeed = (args: StorybookArgs): React.ReactElement => ( ) + export const safetyDivider = (args: StorybookArgs): React.ReactElement => ( ) + export const sanitizer = (args: StorybookArgs): React.ReactElement => ( ) + export const saveAlt = (args: StorybookArgs): React.ReactElement => ( ) + export const severeWeather = (args: StorybookArgs): React.ReactElement => ( ) + export const schedule = (args: StorybookArgs): React.ReactElement => ( ) + export const school = (args: StorybookArgs): React.ReactElement => ( ) + export const science = (args: StorybookArgs): React.ReactElement => ( ) + export const search = (args: StorybookArgs): React.ReactElement => ( ) + export const security = (args: StorybookArgs): React.ReactElement => ( ) + export const send = (args: StorybookArgs): React.ReactElement => ( ) + export const sentimentDissatisfied = ( args: StorybookArgs ): React.ReactElement => export const sentimentNeutral = (args: StorybookArgs): React.ReactElement => ( ) + export const sentimentSatisfied = (args: StorybookArgs): React.ReactElement => ( ) + export const sentimentSatisfiedAlt = ( args: StorybookArgs ): React.ReactElement => @@ -858,135 +1035,179 @@ export const sentimentVeryDissatisfied = ( export const settings = (args: StorybookArgs): React.ReactElement => ( ) + export const share = (args: StorybookArgs): React.ReactElement => ( ) + export const shield = (args: StorybookArgs): React.ReactElement => ( ) + export const shoppingBasket = (args: StorybookArgs): React.ReactElement => ( ) + export const snow = (args: StorybookArgs): React.ReactElement => ( ) + export const soap = (args: StorybookArgs): React.ReactElement => ( ) + export const socialDistance = (args: StorybookArgs): React.ReactElement => ( ) + export const sortArrow = (args: StorybookArgs): React.ReactElement => ( ) + export const spellcheck = (args: StorybookArgs): React.ReactElement => ( ) + export const star = (args: StorybookArgs): React.ReactElement => ( ) + export const starHalf = (args: StorybookArgs): React.ReactElement => ( ) + export const starOutline = (args: StorybookArgs): React.ReactElement => ( ) + export const store = (args: StorybookArgs): React.ReactElement => ( ) + export const support = (args: StorybookArgs): React.ReactElement => ( ) + export const supportAgent = (args: StorybookArgs): React.ReactElement => ( ) + export const textFields = (args: StorybookArgs): React.ReactElement => ( ) + export const thumbDownAlt = (args: StorybookArgs): React.ReactElement => ( ) + export const thumbUpAlt = (args: StorybookArgs): React.ReactElement => ( ) + export const timer = (args: StorybookArgs): React.ReactElement => ( ) + export const toggleOff = (args: StorybookArgs): React.ReactElement => ( ) + export const toggleOn = (args: StorybookArgs): React.ReactElement => ( ) + export const topic = (args: StorybookArgs): React.ReactElement => ( ) + export const tornado = (args: StorybookArgs): React.ReactElement => ( ) + export const translate = (args: StorybookArgs): React.ReactElement => ( ) + export const trendingDown = (args: StorybookArgs): React.ReactElement => ( ) + export const trendingUp = (args: StorybookArgs): React.ReactElement => ( ) + export const twitter = (args: StorybookArgs): React.ReactElement => ( ) + export const undo = (args: StorybookArgs): React.ReactElement => ( ) + export const unfoldLess = (args: StorybookArgs): React.ReactElement => ( ) + export const unfoldMore = (args: StorybookArgs): React.ReactElement => ( ) + export const update = (args: StorybookArgs): React.ReactElement => ( ) + export const uploadFile = (args: StorybookArgs): React.ReactElement => ( ) + export const verified = (args: StorybookArgs): React.ReactElement => ( ) + export const verifiedUser = (args: StorybookArgs): React.ReactElement => ( ) + export const visibility = (args: StorybookArgs): React.ReactElement => ( - + ) + export const visibilityOff = (args: StorybookArgs): React.ReactElement => ( ) + export const volumeOff = (args: StorybookArgs): React.ReactElement => ( ) + export const warning = (args: StorybookArgs): React.ReactElement => ( ) + export const wash = (args: StorybookArgs): React.ReactElement => ( ) + export const wifi = (args: StorybookArgs): React.ReactElement => ( ) + export const work = (args: StorybookArgs): React.ReactElement => ( ) + export const youtube = (args: StorybookArgs): React.ReactElement => ( ) + export const zoomIn = (args: StorybookArgs): React.ReactElement => ( ) + export const zoomOutMap = (args: StorybookArgs): React.ReactElement => ( ) + export const zoomOut = (args: StorybookArgs): React.ReactElement => ( ) diff --git a/src/components/Icon/Icons.stories.tsx b/src/components/Icon/Icons.stories.tsx index 61e52ee3f9..10fabc82b0 100644 --- a/src/components/Icon/Icons.stories.tsx +++ b/src/components/Icon/Icons.stories.tsx @@ -228,7 +228,7 @@ import { IconUploadFile, IconVerified, IconVerifiedUser, - IconVisiblity, + IconVisibility, IconVisibilityOff, IconVolumeOff, IconWarning, @@ -497,7 +497,7 @@ export const allIcons = (args: StorybookArgs): React.ReactElement => ( - + diff --git a/src/components/Icon/Icons.ts b/src/components/Icon/Icons.ts index 94272e418e..a33863cb3d 100644 --- a/src/components/Icon/Icons.ts +++ b/src/components/Icon/Icons.ts @@ -226,7 +226,7 @@ import UpdateSvg from 'uswds/dist/img/usa-icons/update.svg?svgr' import UploadFileSvg from 'uswds/dist/img/usa-icons/upload_file.svg?svgr' import VerifiedSvg from 'uswds/dist/img/usa-icons/verified.svg?svgr' import VerifiedUserSvg from 'uswds/dist/img/usa-icons/verified_user.svg?svgr' -import VisiblitySvg from 'uswds/dist/img/usa-icons/visibility.svg?svgr' +import VisibilitySvg from 'uswds/dist/img/usa-icons/visibility.svg?svgr' import VisibilityOffSvg from 'uswds/dist/img/usa-icons/visibility_off.svg?svgr' import VolumeOffSvg from 'uswds/dist/img/usa-icons/volume_off.svg?svgr' import WarningSvg from 'uswds/dist/img/usa-icons/warning.svg?svgr' @@ -240,6 +240,7 @@ import ZoomOutSvg from 'uswds/dist/img/usa-icons/zoom_out.svg?svgr' import { makeUSWDSIcon, IconProps } from './Icon' import React from 'react' +import { withDeprecationWarning } from '../hoc/withDeprecationWarning' export const IconAccessibilityNew: React.ComponentType = makeUSWDSIcon(AccessibilityNewSvg) @@ -312,133 +313,204 @@ export const IconBathtub: React.ComponentType = export const IconBedding: React.ComponentType = makeUSWDSIcon(BeddingSvg) + export const IconBookmark: React.ComponentType = makeUSWDSIcon(BookmarkSvg) + export const IconBugReport: React.ComponentType = makeUSWDSIcon(BugReportSvg) + export const IconBuild: React.ComponentType = makeUSWDSIcon(BuildSvg) + export const IconCalendarToday: React.ComponentType = makeUSWDSIcon(CalendarTodaySvg) + export const IconCampaign: React.ComponentType = makeUSWDSIcon(CampaignSvg) + export const IconCamping: React.ComponentType = makeUSWDSIcon(CampingSvg) + export const IconCancel: React.ComponentType = makeUSWDSIcon(CancelSvg) + export const IconChat: React.ComponentType = makeUSWDSIcon(ChatSvg) + export const IconCheck: React.ComponentType = makeUSWDSIcon(CheckSvg) + export const IconCheckBoxOutlineBlank: React.ComponentType = makeUSWDSIcon(CheckBoxOutlineBlankSvg) + export const IconCheckCircle: React.ComponentType = makeUSWDSIcon(CheckCircleSvg) + export const IconCheckCircleOutline: React.ComponentType = makeUSWDSIcon(CheckCircleOutlineSvg) + export const IconCheckroom: React.ComponentType = makeUSWDSIcon(CheckroomSvg) + export const IconCleanHands: React.ComponentType = makeUSWDSIcon(CleanHandsSvg) + export const IconClothes: React.ComponentType = makeUSWDSIcon(ClothesSvg) + export const IconClose: React.ComponentType = makeUSWDSIcon(CloseSvg) + export const IconClosedCaption: React.ComponentType = makeUSWDSIcon(ClosedCaptionSvg) + export const IconCloud: React.ComponentType = makeUSWDSIcon(CloudSvg) + export const IconCode: React.ComponentType = makeUSWDSIcon(CodeSvg) + export const IconComment: React.ComponentType = makeUSWDSIcon(CommentSvg) + export const IconConnectWithoutContact: React.ComponentType = makeUSWDSIcon(ConnectWithoutContactSvg) + export const IconConstruction: React.ComponentType = makeUSWDSIcon(ConstructionSvg) + export const IconConstructionWorker: React.ComponentType = makeUSWDSIcon(ConstructionWorkerSvg) + export const IconContactPage: React.ComponentType = makeUSWDSIcon(ContactPageSvg) + export const IconContentCopy: React.ComponentType = makeUSWDSIcon(ContentCopySvg) + export const IconCoronavirus: React.ComponentType = makeUSWDSIcon(CoronavirusSvg) + export const IconCreditCard: React.ComponentType = makeUSWDSIcon(CreditCardSvg) + export const IconDeck: React.ComponentType = makeUSWDSIcon(DeckSvg) + export const IconDelete: React.ComponentType = makeUSWDSIcon(DeleteSvg) + export const IconDeviceThermostat: React.ComponentType = makeUSWDSIcon(DeviceThermostatSvg) + export const IconDirections: React.ComponentType = makeUSWDSIcon(DirectionsSvg) + export const IconDirectionsBike: React.ComponentType = makeUSWDSIcon(DirectionsBikeSvg) + export const IconDirectionsBus: React.ComponentType = makeUSWDSIcon(DirectionsBusSvg) + export const IconDirectionsCar: React.ComponentType = makeUSWDSIcon(DirectionsCarSvg) + export const IconDirectionsWalk: React.ComponentType = makeUSWDSIcon(DirectionsWalkSvg) + export const IconDoNotDisturb: React.ComponentType = makeUSWDSIcon(DoNotDisturbSvg) + export const IconDoNotTouch: React.ComponentType = makeUSWDSIcon(DoNotTouchSvg) + export const IconDragHandle: React.ComponentType = makeUSWDSIcon(DragHandleSvg) + export const IconEco: React.ComponentType = makeUSWDSIcon(EcoSvg) + export const IconEdit: React.ComponentType = makeUSWDSIcon(EditSvg) + export const IconElectricalServices: React.ComponentType = makeUSWDSIcon(ElectricalServicesSvg) + export const IconEmojiEvents: React.ComponentType = makeUSWDSIcon(EmojiEventsSvg) + export const IconError: React.ComponentType = makeUSWDSIcon(ErrorSvg) + export const IconErrorOutline: React.ComponentType = makeUSWDSIcon(ErrorOutlineSvg) + export const IconEvent: React.ComponentType = makeUSWDSIcon(EventSvg) + export const IconExpandLess: React.ComponentType = makeUSWDSIcon(ExpandLessSvg) + export const IconExpandMore: React.ComponentType = makeUSWDSIcon(ExpandMoreSvg) + export const IconFacebook: React.ComponentType = makeUSWDSIcon(FacebookSvg) + export const IconFastForward: React.ComponentType = makeUSWDSIcon(FastForwardSvg) + export const IconFastRewind: React.ComponentType = makeUSWDSIcon(FastRewindSvg) + export const IconFavorite: React.ComponentType = makeUSWDSIcon(FavoriteSvg) + export const IconFavoriteBorder: React.ComponentType = makeUSWDSIcon(FavoriteBorderSvg) + export const IconFileDownload: React.ComponentType = makeUSWDSIcon(FileDownloadSvg) + export const IconFilePresent: React.ComponentType = makeUSWDSIcon(FilePresentSvg) + export const IconFileUpload: React.ComponentType = makeUSWDSIcon(FileUploadSvg) + export const IconFilterAlt: React.ComponentType = makeUSWDSIcon(FilterAltSvg) + export const IconFilterList: React.ComponentType = makeUSWDSIcon(FilterListSvg) + export const IconFingerprint: React.ComponentType = makeUSWDSIcon(FingerprintSvg) + export const IconFirstPage: React.ComponentType = makeUSWDSIcon(FirstPageSvg) + export const IconFlag: React.ComponentType = makeUSWDSIcon(FlagSvg) + export const IconFlickr: React.ComponentType = makeUSWDSIcon(FlickrSvg) + export const IconFlight: React.ComponentType = makeUSWDSIcon(FlightSvg) + export const IconFlooding: React.ComponentType = makeUSWDSIcon(FloodingSvg) + export const IconFolder: React.ComponentType = makeUSWDSIcon(FolderSvg) + export const IconFolderOpen: React.ComponentType = makeUSWDSIcon(FolderOpenSvg) + export const IconFormatQuote: React.ComponentType = makeUSWDSIcon(FormatQuoteSvg) + export const IconFormatSize: React.ComponentType = makeUSWDSIcon(FormatSizeSvg) + export const IconForum: React.ComponentType = makeUSWDSIcon(ForumSvg) + export const IconGithub: React.ComponentType = makeUSWDSIcon(GithubSvg) + export const IconGridView: React.ComponentType = makeUSWDSIcon(GridViewSvg) + export const IconGroupAdd: React.ComponentType = makeUSWDSIcon(GroupAddSvg) @@ -509,214 +581,339 @@ export const IconLightbulbOutline: React.ComponentType = makeUSWDSIcon(LightbulbOutlineSvg) export const IconLink: React.ComponentType = makeUSWDSIcon(LinkSvg) + export const IconLinkOff: React.ComponentType = makeUSWDSIcon(LinkOffSvg) + export const IconList: React.ComponentType = makeUSWDSIcon(ListSvg) + export const IconLocalCafe: React.ComponentType = makeUSWDSIcon(LocalCafeSvg) + export const IconLocalFireDepartment: React.ComponentType = makeUSWDSIcon(LocalFireDepartmentSvg) + export const IconLocalGasStation: React.ComponentType = makeUSWDSIcon(LocalGasStationSvg) + export const IconLocalGroceryStore: React.ComponentType = makeUSWDSIcon(LocalGroceryStoreSvg) + export const IconLocalHospital: React.ComponentType = makeUSWDSIcon(LocalHospitalSvg) + export const IconLocalLaundryService: React.ComponentType = makeUSWDSIcon(LocalLaundryServiceSvg) + export const IconLocalLibrary: React.ComponentType = makeUSWDSIcon(LocalLibrarySvg) + export const IconLocalOffer: React.ComponentType = makeUSWDSIcon(LocalOfferSvg) + export const IconLocalParking: React.ComponentType = makeUSWDSIcon(LocalParkingSvg) + export const IconLocalPharmacy: React.ComponentType = makeUSWDSIcon(LocalPharmacySvg) + export const IconLocalPolice: React.ComponentType = makeUSWDSIcon(LocalPoliceSvg) + export const IconLocalTaxi: React.ComponentType = makeUSWDSIcon(LocalTaxiSvg) + export const IconLocationCity: React.ComponentType = makeUSWDSIcon(LocationCitySvg) + export const IconLocationOn: React.ComponentType = makeUSWDSIcon(LocationOnSvg) + export const IconLock: React.ComponentType = makeUSWDSIcon(LockSvg) + export const IconLockOpen: React.ComponentType = makeUSWDSIcon(LockOpenSvg) + export const IconLockOutline: React.ComponentType = makeUSWDSIcon(LockOutlineSvg) + export const IconLogin: React.ComponentType = makeUSWDSIcon(LoginSvg) + export const IconLogout: React.ComponentType = makeUSWDSIcon(LogoutSvg) + export const IconLoop: React.ComponentType = makeUSWDSIcon(LoopSvg) + export const IconMail: React.ComponentType = makeUSWDSIcon(MailSvg) + export const IconMailOutline: React.ComponentType = makeUSWDSIcon(MailOutlineSvg) + export const IconMap: React.ComponentType = makeUSWDSIcon(MapSvg) + export const IconMasks: React.ComponentType = makeUSWDSIcon(MasksSvg) + export const IconMedicalServices: React.ComponentType = makeUSWDSIcon(MedicalServicesSvg) + export const IconMenu: React.ComponentType = makeUSWDSIcon(MenuSvg) + export const IconMilitaryTech: React.ComponentType = makeUSWDSIcon(MilitaryTechSvg) + export const IconMoreHoriz: React.ComponentType = makeUSWDSIcon(MoreHorizSvg) + export const IconMoreVert: React.ComponentType = makeUSWDSIcon(MoreVertSvg) + export const IconMyLocation: React.ComponentType = makeUSWDSIcon(MyLocationSvg) + export const IconNavigateBefore: React.ComponentType = makeUSWDSIcon(NavigateBeforeSvg) + export const IconNavigateNext: React.ComponentType = makeUSWDSIcon(NavigateNextSvg) + export const IconNavigateFarBefore: React.ComponentType = makeUSWDSIcon(NavigateFarBeforeSvg) + export const IconNavigateFarNext: React.ComponentType = makeUSWDSIcon(NavigateFarNextSvg) + export const IconNearMe: React.ComponentType = makeUSWDSIcon(NearMeSvg) + export const IconNotifications: React.ComponentType = makeUSWDSIcon(NotificationsSvg) + export const IconNotificationsActive: React.ComponentType = makeUSWDSIcon(NotificationsActiveSvg) + export const IconNotificationsNone: React.ComponentType = makeUSWDSIcon(NotificationsNoneSvg) + export const IconNotificationsOff: React.ComponentType = makeUSWDSIcon(NotificationsOffSvg) + export const IconPark: React.ComponentType = makeUSWDSIcon(ParkSvg) + export const IconPeople: React.ComponentType = makeUSWDSIcon(PeopleSvg) + export const IconPerson: React.ComponentType = makeUSWDSIcon(PersonSvg) + export const IconPets: React.ComponentType = makeUSWDSIcon(PetsSvg) + export const IconPhone: React.ComponentType = makeUSWDSIcon(PhoneSvg) + export const IconPhotoCamera: React.ComponentType = makeUSWDSIcon(PhotoCameraSvg) + export const IconPrint: React.ComponentType = makeUSWDSIcon(PrintSvg) + export const IconPriorityHigh: React.ComponentType = makeUSWDSIcon(PriorityHighSvg) + export const IconPublic: React.ComponentType = makeUSWDSIcon(PublicSvg) + export const IconPushPin: React.ComponentType = makeUSWDSIcon(PushPinSvg) + export const IconRadioButtonUnchecked: React.ComponentType = makeUSWDSIcon(RadioButtonUncheckedSvg) + export const IconRain: React.ComponentType = makeUSWDSIcon(RainSvg) + export const IconReduceCapacity: React.ComponentType = makeUSWDSIcon(ReduceCapacitySvg) + export const IconRemove: React.ComponentType = makeUSWDSIcon(RemoveSvg) + export const IconReport: React.ComponentType = makeUSWDSIcon(ReportSvg) + export const IconRestaurant: React.ComponentType = makeUSWDSIcon(RestaurantSvg) + export const IconRssFeed: React.ComponentType = makeUSWDSIcon(RssFeedSvg) + export const IconSafetyDivider: React.ComponentType = makeUSWDSIcon(SafetyDividerSvg) + export const IconSanitizer: React.ComponentType = makeUSWDSIcon(SanitizerSvg) + export const IconSaveAlt: React.ComponentType = makeUSWDSIcon(SaveAltSvg) + export const IconSevereWeather: React.ComponentType = makeUSWDSIcon(SevereWeatherSvg) + export const IconSchedule: React.ComponentType = makeUSWDSIcon(ScheduleSvg) + export const IconSchool: React.ComponentType = makeUSWDSIcon(SchoolSvg) + export const IconScience: React.ComponentType = makeUSWDSIcon(ScienceSvg) + export const IconSearch: React.ComponentType = makeUSWDSIcon(SearchSvg) + export const IconSecurity: React.ComponentType = makeUSWDSIcon(SecuritySvg) + export const IconSend: React.ComponentType = makeUSWDSIcon(SendSvg) + export const IconSentimentDissatisfied: React.ComponentType = makeUSWDSIcon(SentimentDissatisfiedSvg) + export const IconSentimentNeutral: React.ComponentType = makeUSWDSIcon(SentimentNeutralSvg) + export const IconSentimentSatisfied: React.ComponentType = makeUSWDSIcon(SentimentSatisfiedSvg) + export const IconSentimentSatisfiedAlt: React.ComponentType = makeUSWDSIcon(SentimentSatisfiedAltSvg) + export const IconSentimentVeryDissatisfied: React.ComponentType = makeUSWDSIcon(SentimentVeryDissatisfiedSvg) + export const IconSettings: React.ComponentType = makeUSWDSIcon(SettingsSvg) + export const IconShare: React.ComponentType = makeUSWDSIcon(ShareSvg) + export const IconShield: React.ComponentType = makeUSWDSIcon(ShieldSvg) + export const IconShoppingBasket: React.ComponentType = makeUSWDSIcon(ShoppingBasketSvg) + export const IconSnow: React.ComponentType = makeUSWDSIcon(SnowSvg) + export const IconSoap: React.ComponentType = makeUSWDSIcon(SoapSvg) + export const IconSocialDistance: React.ComponentType = makeUSWDSIcon(SocialDistanceSvg) + export const IconSortArrow: React.ComponentType = makeUSWDSIcon(SortArrowSvg) + export const IconSpellcheck: React.ComponentType = makeUSWDSIcon(SpellcheckSvg) + export const IconStar: React.ComponentType = makeUSWDSIcon(StarSvg) + export const IconStarHalf: React.ComponentType = makeUSWDSIcon(StarHalfSvg) + export const IconStarOutline: React.ComponentType = makeUSWDSIcon(StarOutlineSvg) + export const IconStore: React.ComponentType = makeUSWDSIcon(StoreSvg) + export const IconSupport: React.ComponentType = makeUSWDSIcon(SupportSvg) + export const IconSupportAgent: React.ComponentType = makeUSWDSIcon(SupportAgentSvg) + export const IconTextFields: React.ComponentType = makeUSWDSIcon(TextFieldsSvg) + export const IconThumbDownAlt: React.ComponentType = makeUSWDSIcon(ThumbDownAltSvg) + export const IconThumbUpAlt: React.ComponentType = makeUSWDSIcon(ThumbUpAltSvg) + export const IconTimer: React.ComponentType = makeUSWDSIcon(TimerSvg) + export const IconToggleOff: React.ComponentType = makeUSWDSIcon(ToggleOffSvg) + export const IconToggleOn: React.ComponentType = makeUSWDSIcon(ToggleOnSvg) + export const IconTopic: React.ComponentType = makeUSWDSIcon(TopicSvg) + export const IconTornado: React.ComponentType = makeUSWDSIcon(TornadoSvg) + export const IconTranslate: React.ComponentType = makeUSWDSIcon(TranslateSvg) + export const IconTrendingDown: React.ComponentType = makeUSWDSIcon(TrendingDownSvg) + export const IconTrendingUp: React.ComponentType = makeUSWDSIcon(TrendingUpSvg) + export const IconTwitter: React.ComponentType = makeUSWDSIcon(TwitterSvg) + export const IconUndo: React.ComponentType = makeUSWDSIcon(UndoSvg) + export const IconUnfoldLess: React.ComponentType = makeUSWDSIcon(UnfoldLessSvg) + export const IconUnfoldMore: React.ComponentType = makeUSWDSIcon(UnfoldMoreSvg) + export const IconUpdate: React.ComponentType = makeUSWDSIcon(UpdateSvg) + export const IconUploadFile: React.ComponentType = makeUSWDSIcon(UploadFileSvg) + export const IconVerified: React.ComponentType = makeUSWDSIcon(VerifiedSvg) + export const IconVerifiedUser: React.ComponentType = makeUSWDSIcon(VerifiedUserSvg) + +export const IconVisibility: React.ComponentType = + makeUSWDSIcon(VisibilitySvg) + +/** @deprecated, use IconVisibility */ export const IconVisiblity: React.ComponentType = - makeUSWDSIcon(VisiblitySvg) + withDeprecationWarning( + IconVisibility, + '`IconVisiblity` is deprecated and will be removed in the next major release. Please use `IconVisibility`.' + ) + export const IconVisibilityOff: React.ComponentType = makeUSWDSIcon(VisibilityOffSvg) + export const IconVolumeOff: React.ComponentType = makeUSWDSIcon(VolumeOffSvg) + export const IconWarning: React.ComponentType = makeUSWDSIcon(WarningSvg) + export const IconWash: React.ComponentType = makeUSWDSIcon(WashSvg) + export const IconWifi: React.ComponentType = makeUSWDSIcon(WifiSvg) + export const IconWork: React.ComponentType = makeUSWDSIcon(WorkSvg) + export const IconYoutube: React.ComponentType = makeUSWDSIcon(YoutubeSvg) + export const IconZoomIn: React.ComponentType = makeUSWDSIcon(ZoomInSvg) + export const IconZoomOutMap: React.ComponentType = makeUSWDSIcon(ZoomOutMapSvg) + export const IconZoomOut: React.ComponentType = makeUSWDSIcon(ZoomOutSvg) diff --git a/src/components/hoc/withDeprecationWarning.test.tsx b/src/components/hoc/withDeprecationWarning.test.tsx new file mode 100644 index 0000000000..fe1573322b --- /dev/null +++ b/src/components/hoc/withDeprecationWarning.test.tsx @@ -0,0 +1,31 @@ +import React from 'react' +import { render } from '@testing-library/react' + +jest.mock('../../deprecation') +import { deprecationWarning } from '../../deprecation' +import { Button } from '../Button/Button' +import { withDeprecationWarning } from './withDeprecationWarning' + +describe('withDeprecationWarning HOC', () => { + beforeEach(() => { + jest.clearAllMocks() + }) + + it('should call deprecationWarning before rendering the wrapped component', () => { + const deprecationWarningMessage = 'That component is deprecated!' + const DeprecatedButton = withDeprecationWarning( + Button, + deprecationWarningMessage + ) + const buttonText = 'Deprecated Button' + const { queryByTestId } = render( + {buttonText} + ) + + const renderedButton = queryByTestId('button') + expect(renderedButton).toBeInTheDocument() + expect(renderedButton).toHaveTextContent(buttonText) + expect(deprecationWarning).toHaveBeenCalledTimes(1) + expect(deprecationWarning).toHaveBeenCalledWith(deprecationWarningMessage) + }) +}) diff --git a/src/components/hoc/withDeprecationWarning.tsx b/src/components/hoc/withDeprecationWarning.tsx new file mode 100644 index 0000000000..7811fb9632 --- /dev/null +++ b/src/components/hoc/withDeprecationWarning.tsx @@ -0,0 +1,17 @@ +import React, { ComponentType, useEffect } from 'react' + +import { deprecationWarning } from '../../deprecation' + +export function withDeprecationWarning

( + Component: ComponentType

, + warning: string +) { + // eslint-disable-next-line react/display-name + return (props: P): JSX.Element => { + useEffect(() => { + deprecationWarning(warning) + }, []) + + return + } +} From c15a5391c53891a344c2ef061c64dd9b23eaf7b8 Mon Sep 17 00:00:00 2001 From: Brandon Lenz Date: Wed, 13 Oct 2021 14:56:26 -0400 Subject: [PATCH 02/12] First pass of IconList --- src/components/IconList/IconList.stories.tsx | 147 ++++++++++++++++++ src/components/IconList/IconList.tsx | 19 +++ .../IconList/IconListItem/IconListItem.tsx | 41 +++++ .../IconList/IconListTitle/IconListTitle.tsx | 37 +++++ 4 files changed, 244 insertions(+) create mode 100644 src/components/IconList/IconList.stories.tsx create mode 100644 src/components/IconList/IconList.tsx create mode 100644 src/components/IconList/IconListItem/IconListItem.tsx create mode 100644 src/components/IconList/IconListTitle/IconListTitle.tsx diff --git a/src/components/IconList/IconList.stories.tsx b/src/components/IconList/IconList.stories.tsx new file mode 100644 index 0000000000..0d248557f8 --- /dev/null +++ b/src/components/IconList/IconList.stories.tsx @@ -0,0 +1,147 @@ +import React, { ReactElement } from 'react' +import { + IconAttachMoney, + IconCancel, + IconCheckCircle, + IconHelp, + IconThumbUpAlt, +} from '../Icon/Icons' +import { IconList } from './IconList' +import { IconListItem } from './IconListItem/IconListItem' +import { IconListTitle } from './IconListTitle/IconListTitle' + +export default { + title: 'Components/Icon list', + parameters: { + docs: { + description: { + component: ` +###USWDS 2.0 Icon list component +Source: https://designsystem.digital.gov/components/icon-list/ +`, + }, + }, + }, +} + +export const Default = (): ReactElement => ( + + + Wash your hands for 20 seconds with soap + + + Stay six feet away from others + + + Avoid large gatherings + + +) + +export const SimpleContent = (): ReactElement => ( + <> +

Benefits of joining Global Entry program:

+ + No processing lines + + Access to expedited entry benefits in other countries + + + Available at major U.S. airports + + Reduced wait times + + +) + +export const RichContent = (): ReactElement => ( + + + Donate cash when possible. +

+ Financial contributions to recognized disaster relief organizations are + the fastest, most flexible and most effective method of donating. + Organizations on the ground know what items and quantities are needed, + often buy in bulk with discounts and, if possible, purchase through + businesses local to the disaster, which supports economic recovery. +

+
+ + + Confirm what donations are needed. + +

+ Unneeded and unsolicited goods burden local organizations’ ability to + meet survivors’ confirmed needs, drawing away valuable volunteer labor, + transportation and warehouse space. +

+
+ + + Talk to trusted organizations about volunteering. + +

+ Financial contributions to recognized disaster relief organizations are + the fastest, most flexible and most effective method of donating. + Organizations on the ground know what items and quantities are needed, + often buy in bulk with discounts and, if possible, purchase through + businesses local to the disaster, which supports economic recovery. +

+
+
+) + +export const CustomSizeWithRichContent = (): ReactElement => ( + <> +

+ Here are a few easy ways you can help reduce energy use and costs while + spending more time at home. +

+ + + Let the sun shine. +

+ On sunny days, open your curtains to allow the sun to naturally warm + the rooms of your home without using electricity. Natural sunlight can + also lift your mood to help brighten your day. On warm days, close + your curtains to help keep your house cool. +

+
+ + Adjust your schedule. +

+ Instead of running high-energy-use appliances such as dishwashers and + clothes dryers during mid-afternoon or early evening hours, operate + them early in the morning or late at night. Some utilities charge less + at off-peak times, which will help reduce your costs. +

+
+ + Fill it up. +

+ Wash full loads, whether it’s clothes or dishes. Washing multiple + small loads means you’re using and heating more water, which can + increase your expenses. Using cold water for clothes washing can also + help lower your costs. +

+
+
+ +) + +export const CustomSize = (): ReactElement => ( + + + Timing. Is now the right time to start + a business? + + + Funding. Do I have enough money to + launch a business? + + + Need. Will this business fill a real + need for my customers? + + +) diff --git a/src/components/IconList/IconList.tsx b/src/components/IconList/IconList.tsx new file mode 100644 index 0000000000..1b370d2a02 --- /dev/null +++ b/src/components/IconList/IconList.tsx @@ -0,0 +1,19 @@ +import React, { ReactElement } from 'react' +import classnames from 'classnames' + +// TODO: Size, Color? +interface IconListProps { + children: React.ReactNode // TODO: Constrain further? + className?: string +} + +export const IconList = ({ + children, + className, +}: IconListProps & JSX.IntrinsicElements['ul']): ReactElement => { + const classes = classnames(className, 'usa-icon-list') + + return
    {children}
+} + +export default IconList diff --git a/src/components/IconList/IconListItem/IconListItem.tsx b/src/components/IconList/IconListItem/IconListItem.tsx new file mode 100644 index 0000000000..b09c2cfa35 --- /dev/null +++ b/src/components/IconList/IconListItem/IconListItem.tsx @@ -0,0 +1,41 @@ +import React, { ComponentType, ReactElement, ReactNode } from 'react' +import classnames from 'classnames' +import { IconProps } from '../../Icon/Icon' + +interface IconListItemProps { + icon: ComponentType + iconClassName?: string + iconDivClassName?: string + contentDivClassName?: string + className?: string + children: ReactNode +} + +export const IconListItem = ({ + icon, + iconClassName, + iconDivClassName, + contentDivClassName, + className, + children, +}: IconListItemProps & JSX.IntrinsicElements['li']): ReactElement => { + const classes = classnames(className, 'usa-icon-list__item') + const iconClasses = classnames(iconDivClassName, 'usa-icon-list__icon') // TODO: Extract into own component (whether or not that is externally exposed)? + const contentClasses = classnames( + // TODO: Extract into own component (whether or not that is externally exposed)? + contentDivClassName, + 'usa-icon-list__content' + ) + const Icon = icon + + return ( +
  • +
    + +
    +
    {children}
    +
  • + ) +} + +export default IconListItem diff --git a/src/components/IconList/IconListTitle/IconListTitle.tsx b/src/components/IconList/IconListTitle/IconListTitle.tsx new file mode 100644 index 0000000000..218ced4028 --- /dev/null +++ b/src/components/IconList/IconListTitle/IconListTitle.tsx @@ -0,0 +1,37 @@ +import React, { ReactElement } from 'react' +import classnames from 'classnames' + +interface BaseIconListTitleProps { + type: string + children: React.ReactNode + className?: string +} + +interface HeadingIconListTitleProps extends BaseIconListTitleProps { + type: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' +} + +interface ParagraphIconListTitleProps extends BaseIconListTitleProps { + type: 'p' +} + +type IconListHeadingTitleProps = HeadingIconListTitleProps & + React.DetailedHTMLProps< + React.HTMLAttributes, + HTMLHeadingElement + > + +type IconListParagraphTitleProps = ParagraphIconListTitleProps & + JSX.IntrinsicElements['p'] + +export const IconListTitle = ({ + type, + children, + className, +}: IconListParagraphTitleProps | IconListHeadingTitleProps): ReactElement => { + const classes = classnames(className, 'usa-icon-list__title') + const Tag = type + return {children} +} + +export default IconListTitle From e7543edc629287de0068dac7d81844b65d053600 Mon Sep 17 00:00:00 2001 From: Brandon Lenz Date: Wed, 13 Oct 2021 15:00:36 -0400 Subject: [PATCH 03/12] Export components from Index.ts --- src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.ts b/src/index.ts index a1f9fc05fa..a11bd565c8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -63,6 +63,11 @@ export { NavDropDownButton } from './components/header/NavDropDownButton/NavDrop export { PrimaryNav } from './components/header/PrimaryNav/PrimaryNav' export { Title } from './components/header/Title/Title' +// IconList +export { IconList as IconListCONFLICT } from './components/IconList/IconList' +export { IconListItem } from './components/IconList/IconListItem/IconListItem' +export { IconListTitle } from './components/IconList/IconListTitle/IconListTitle' + // Icons export * from './components/Icon/Icons' From 0f77b10c2c08c7b334489ad4c8adb457e2006b7c Mon Sep 17 00:00:00 2001 From: Brandon Lenz Date: Mon, 25 Oct 2021 14:20:43 -0400 Subject: [PATCH 04/12] feat!: Use "dot" syntax for Icons to avoid name collision --- example/src/pages/Icons.tsx | 717 +++++---------- src/components/Icon/Icon.stories.tsx | 717 +++++---------- src/components/Icon/Icon.test.tsx | 10 +- src/components/Icon/Icons.stories.tsx | 717 +++++---------- src/components/Icon/Icons.ts | 870 +++++++++--------- .../ModalCloseButton/ModalCloseButton.tsx | 7 +- src/index.ts | 2 +- 7 files changed, 1160 insertions(+), 1880 deletions(-) diff --git a/example/src/pages/Icons.tsx b/example/src/pages/Icons.tsx index 124334d719..6da2c6eff6 100644 --- a/example/src/pages/Icons.tsx +++ b/example/src/pages/Icons.tsx @@ -1,245 +1,6 @@ import React from 'react' -import { - IconAccessibilityNew, - IconAccessibleForward, - IconAccountBalance, - IconAccountBox, - IconAccountCircle, - IconAdd, - IconAddCircle, - IconAddCircleOutline, - IconAlarm, - IconAlternateEmail, - IconAnnouncement, - IconArrowBack, - IconArrowDownward, - IconArrowDropDown, - IconArrowDropUp, - IconArrowForward, - IconArrowUpward, - IconApi, - IconAssessment, - IconAttachFile, - IconAttachMoney, - IconAutorenew, - IconBackpack, - IconBathtub, - IconBedding, - IconBookmark, - IconBugReport, - IconBuild, - IconCalendarToday, - IconCampaign, - IconCamping, - IconCancel, - IconChat, - IconCheck, - IconCheckBoxOutlineBlank, - IconCheckCircle, - IconCheckCircleOutline, - IconCheckroom, - IconCleanHands, - IconClothes, - IconClose, - IconClosedCaption, - IconCloud, - IconCode, - IconComment, - IconConnectWithoutContact, - IconConstruction, - IconConstructionWorker, - IconContactPage, - IconContentCopy, - IconCoronavirus, - IconCreditCard, - IconDeck, - IconDelete, - IconDeviceThermostat, - IconDirections, - IconDirectionsBike, - IconDirectionsBus, - IconDirectionsCar, - IconDirectionsWalk, - IconDoNotDisturb, - IconDoNotTouch, - IconDragHandle, - IconEco, - IconElectricalServices, - IconEmojiEvents, - IconError, - IconErrorOutline, - IconEvent, - IconExpandLess, - IconExpandMore, - IconFacebook, - IconFastForward, - IconFastRewind, - IconFavorite, - IconFavoriteBorder, - IconFileDownload, - IconFilePresent, - IconFileUpload, - IconFilterAlt, - IconFilterList, - IconFingerprint, - IconFirstPage, - IconFlag, - IconFlickr, - IconFlight, - IconFlooding, - IconFolder, - IconFolderOpen, - IconFormatQuote, - IconFormatSize, - IconForum, - IconGithub, - IconGridView, - IconGroupAdd, - IconGroups, - IconHearing, - IconHelp, - IconHelpOutline, - IconHighlightOff, - IconHistory, - IconHome, - IconHospital, - IconHotel, - IconHourglassEmpty, - IconHurricane, - IconIdentification, - IconImage, - IconInfo, - IconInfoOutline, - IconInsights, - IconInstagram, - IconKeyboard, - IconLabel, - IconLanguage, - IconLastPage, - IconLaunch, - IconLightbulb, - IconLightbulbOutline, - IconLink, - IconLinkOff, - IconList, - IconLocalCafe, - IconLocalFireDepartment, - IconLocalGasStation, - IconLocalGroceryStore, - IconLocalHospital, - IconLocalLaundryService, - IconLocalLibrary, - IconLocalOffer, - IconLocalParking, - IconLocalPharmacy, - IconLocalPolice, - IconLocalTaxi, - IconLocationCity, - IconLocationOn, - IconLock, - IconLockOpen, - IconLockOutline, - IconLogin, - IconLogout, - IconLoop, - IconMail, - IconMailOutline, - IconMap, - IconMasks, - IconMedicalServices, - IconMenu, - IconMilitaryTech, - IconMoreHoriz, - IconMoreVert, - IconMyLocation, - IconNavigateBefore, - IconNavigateNext, - IconNavigateFarBefore, - IconNavigateFarNext, - IconNearMe, - IconNotifications, - IconNotificationsActive, - IconNotificationsNone, - IconNotificationsOff, - IconPark, - IconPeople, - IconPerson, - IconPets, - IconPhone, - IconPhotoCamera, - IconPrint, - IconPriorityHigh, - IconPublic, - IconPushPin, - IconRadioButtonUnchecked, - IconRain, - IconReduceCapacity, - IconRemove, - IconReport, - IconRestaurant, - IconRssFeed, - IconSafetyDivider, - IconSanitizer, - IconSaveAlt, - IconSevereWeather, - IconSchedule, - IconSchool, - IconScience, - IconSearch, - IconSecurity, - IconSend, - IconSentimentDissatisfied, - IconSentimentNeutral, - IconSentimentSatisfied, - IconSentimentSatisfiedAlt, - IconSentimentVeryDissatisfied, - IconSettings, - IconShare, - IconShield, - IconShoppingBasket, - IconSnow, - IconSoap, - IconSocialDistance, - IconSortArrow, - IconSpellcheck, - IconStar, - IconStarHalf, - IconStarOutline, - IconStore, - IconSupport, - IconSupportAgent, - IconTextFields, - IconThumbDownAlt, - IconThumbUpAlt, - IconTimer, - IconToggleOff, - IconToggleOn, - IconTopic, - IconTornado, - IconTranslate, - IconTrendingDown, - IconTrendingUp, - IconTwitter, - IconUndo, - IconUnfoldLess, - IconUnfoldMore, - IconUpdate, - IconUploadFile, - IconVerified, - IconVerifiedUser, - IconVisibility, - IconVisibilityOff, - IconVolumeOff, - IconWarning, - IconWash, - IconWifi, - IconWork, - IconYoutube, - IconZoomIn, - IconZoomOutMap, - IconZoomOut, -} from '@trussworks/react-uswds' +import { Icon } from '@trussworks/react-uswds' const IconsPage = (): React.ReactElement => { const args = { size: 6 } as const @@ -252,244 +13,244 @@ const IconsPage = (): React.ReactElement => {

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ) diff --git a/src/components/Icon/Icon.stories.tsx b/src/components/Icon/Icon.stories.tsx index 8f13363c1a..a643ed662f 100644 --- a/src/components/Icon/Icon.stories.tsx +++ b/src/components/Icon/Icon.stories.tsx @@ -1,245 +1,6 @@ import React from 'react' -import { - IconAccessibilityNew, - IconAccessibleForward, - IconAccountBalance, - IconAccountBox, - IconAccountCircle, - IconAdd, - IconAddCircle, - IconAddCircleOutline, - IconAlarm, - IconAlternateEmail, - IconAnnouncement, - IconArrowBack, - IconArrowDownward, - IconArrowDropDown, - IconArrowDropUp, - IconArrowForward, - IconArrowUpward, - IconApi, - IconAssessment, - IconAttachFile, - IconAttachMoney, - IconAutorenew, - IconBackpack, - IconBathtub, - IconBedding, - IconBookmark, - IconBugReport, - IconBuild, - IconCalendarToday, - IconCampaign, - IconCamping, - IconCancel, - IconChat, - IconCheck, - IconCheckBoxOutlineBlank, - IconCheckCircle, - IconCheckCircleOutline, - IconCheckroom, - IconCleanHands, - IconClothes, - IconClose, - IconClosedCaption, - IconCloud, - IconCode, - IconComment, - IconConnectWithoutContact, - IconConstruction, - IconConstructionWorker, - IconContactPage, - IconContentCopy, - IconCoronavirus, - IconCreditCard, - IconDeck, - IconDelete, - IconDeviceThermostat, - IconDirections, - IconDirectionsBike, - IconDirectionsBus, - IconDirectionsCar, - IconDirectionsWalk, - IconDoNotDisturb, - IconDoNotTouch, - IconDragHandle, - IconEco, - IconElectricalServices, - IconEmojiEvents, - IconError, - IconErrorOutline, - IconEvent, - IconExpandLess, - IconExpandMore, - IconFacebook, - IconFastForward, - IconFastRewind, - IconFavorite, - IconFavoriteBorder, - IconFileDownload, - IconFilePresent, - IconFileUpload, - IconFilterAlt, - IconFilterList, - IconFingerprint, - IconFirstPage, - IconFlag, - IconFlickr, - IconFlight, - IconFlooding, - IconFolder, - IconFolderOpen, - IconFormatQuote, - IconFormatSize, - IconForum, - IconGithub, - IconGridView, - IconGroupAdd, - IconGroups, - IconHearing, - IconHelp, - IconHelpOutline, - IconHighlightOff, - IconHistory, - IconHome, - IconHospital, - IconHotel, - IconHourglassEmpty, - IconHurricane, - IconIdentification, - IconImage, - IconInfo, - IconInfoOutline, - IconInsights, - IconInstagram, - IconKeyboard, - IconLabel, - IconLanguage, - IconLastPage, - IconLaunch, - IconLightbulb, - IconLightbulbOutline, - IconLink, - IconLinkOff, - IconList, - IconLocalCafe, - IconLocalFireDepartment, - IconLocalGasStation, - IconLocalGroceryStore, - IconLocalHospital, - IconLocalLaundryService, - IconLocalLibrary, - IconLocalOffer, - IconLocalParking, - IconLocalPharmacy, - IconLocalPolice, - IconLocalTaxi, - IconLocationCity, - IconLocationOn, - IconLock, - IconLockOpen, - IconLockOutline, - IconLogin, - IconLogout, - IconLoop, - IconMail, - IconMailOutline, - IconMap, - IconMasks, - IconMedicalServices, - IconMenu, - IconMilitaryTech, - IconMoreHoriz, - IconMoreVert, - IconMyLocation, - IconNavigateBefore, - IconNavigateNext, - IconNavigateFarBefore, - IconNavigateFarNext, - IconNearMe, - IconNotifications, - IconNotificationsActive, - IconNotificationsNone, - IconNotificationsOff, - IconPark, - IconPeople, - IconPerson, - IconPets, - IconPhone, - IconPhotoCamera, - IconPrint, - IconPriorityHigh, - IconPublic, - IconPushPin, - IconRadioButtonUnchecked, - IconRain, - IconReduceCapacity, - IconRemove, - IconReport, - IconRestaurant, - IconRssFeed, - IconSafetyDivider, - IconSanitizer, - IconSaveAlt, - IconSevereWeather, - IconSchedule, - IconSchool, - IconScience, - IconSearch, - IconSecurity, - IconSend, - IconSentimentDissatisfied, - IconSentimentNeutral, - IconSentimentSatisfied, - IconSentimentSatisfiedAlt, - IconSentimentVeryDissatisfied, - IconSettings, - IconShare, - IconShield, - IconShoppingBasket, - IconSnow, - IconSoap, - IconSocialDistance, - IconSortArrow, - IconSpellcheck, - IconStar, - IconStarHalf, - IconStarOutline, - IconStore, - IconSupport, - IconSupportAgent, - IconTextFields, - IconThumbDownAlt, - IconThumbUpAlt, - IconTimer, - IconToggleOff, - IconToggleOn, - IconTopic, - IconTornado, - IconTranslate, - IconTrendingDown, - IconTrendingUp, - IconTwitter, - IconUndo, - IconUnfoldLess, - IconUnfoldMore, - IconUpdate, - IconUploadFile, - IconVerified, - IconVerifiedUser, - IconVisibility, - IconVisibilityOff, - IconVolumeOff, - IconWarning, - IconWash, - IconWifi, - IconWork, - IconYoutube, - IconZoomIn, - IconZoomOutMap, - IconZoomOut, -} from './Icons' +import { Icon } from './Icons' type StorybookArgs = { size: 3 | 4 | 5 | 6 | 7 | 8 | 9 @@ -270,944 +31,944 @@ Source: https://designsystem.digital.gov/components/icon/ } export const accessibilityNew = (args: StorybookArgs): React.ReactElement => ( - + ) export const accessibleForward = (args: StorybookArgs): React.ReactElement => ( - + ) export const accountBalance = (args: StorybookArgs): React.ReactElement => ( - + ) export const accountBox = (args: StorybookArgs): React.ReactElement => ( - + ) export const accountCircle = (args: StorybookArgs): React.ReactElement => ( - + ) export const add = (args: StorybookArgs): React.ReactElement => ( - + ) export const addCircle = (args: StorybookArgs): React.ReactElement => ( - + ) export const addCircleOutline = (args: StorybookArgs): React.ReactElement => ( - + ) export const alarm = (args: StorybookArgs): React.ReactElement => ( - + ) export const alternateEmail = (args: StorybookArgs): React.ReactElement => ( - + ) export const announcement = (args: StorybookArgs): React.ReactElement => ( - + ) export const arrowBack = (args: StorybookArgs): React.ReactElement => ( - + ) export const arrowDownward = (args: StorybookArgs): React.ReactElement => ( - + ) export const arrowDropDown = (args: StorybookArgs): React.ReactElement => ( - + ) export const arrowDropUp = (args: StorybookArgs): React.ReactElement => ( - + ) export const arrowForward = (args: StorybookArgs): React.ReactElement => ( - + ) export const arrowUpward = (args: StorybookArgs): React.ReactElement => ( - + ) export const api = (args: StorybookArgs): React.ReactElement => ( - + ) export const assessment = (args: StorybookArgs): React.ReactElement => ( - + ) export const attachFile = (args: StorybookArgs): React.ReactElement => ( - + ) export const attachMoney = (args: StorybookArgs): React.ReactElement => ( - + ) export const autorenew = (args: StorybookArgs): React.ReactElement => ( - + ) export const backpack = (args: StorybookArgs): React.ReactElement => ( - + ) export const bathtub = (args: StorybookArgs): React.ReactElement => ( - + ) export const bedding = (args: StorybookArgs): React.ReactElement => ( - + ) export const bookmark = (args: StorybookArgs): React.ReactElement => ( - + ) export const bugReport = (args: StorybookArgs): React.ReactElement => ( - + ) export const build = (args: StorybookArgs): React.ReactElement => ( - + ) export const calendarToday = (args: StorybookArgs): React.ReactElement => ( - + ) export const campaign = (args: StorybookArgs): React.ReactElement => ( - + ) export const camping = (args: StorybookArgs): React.ReactElement => ( - + ) export const cancel = (args: StorybookArgs): React.ReactElement => ( - + ) export const chat = (args: StorybookArgs): React.ReactElement => ( - + ) export const check = (args: StorybookArgs): React.ReactElement => ( - + ) export const checkBoxOutlineBlank = ( args: StorybookArgs -): React.ReactElement => +): React.ReactElement => export const checkCircle = (args: StorybookArgs): React.ReactElement => ( - + ) export const checkCircleOutline = (args: StorybookArgs): React.ReactElement => ( - + ) export const checkroom = (args: StorybookArgs): React.ReactElement => ( - + ) export const cleanHands = (args: StorybookArgs): React.ReactElement => ( - + ) export const clothes = (args: StorybookArgs): React.ReactElement => ( - + ) export const close = (args: StorybookArgs): React.ReactElement => ( - + ) export const closedCaption = (args: StorybookArgs): React.ReactElement => ( - + ) export const cloud = (args: StorybookArgs): React.ReactElement => ( - + ) export const code = (args: StorybookArgs): React.ReactElement => ( - + ) export const comment = (args: StorybookArgs): React.ReactElement => ( - + ) export const connectWithoutContact = ( args: StorybookArgs -): React.ReactElement => +): React.ReactElement => export const construction = (args: StorybookArgs): React.ReactElement => ( - + ) export const constructionWorker = (args: StorybookArgs): React.ReactElement => ( - + ) export const contactPage = (args: StorybookArgs): React.ReactElement => ( - + ) export const contentCopy = (args: StorybookArgs): React.ReactElement => ( - + ) export const coronavirus = (args: StorybookArgs): React.ReactElement => ( - + ) export const creditCard = (args: StorybookArgs): React.ReactElement => ( - + ) export const deck = (args: StorybookArgs): React.ReactElement => ( - + ) export const deleteIcon = (args: StorybookArgs): React.ReactElement => ( - + ) export const deviceThermostat = (args: StorybookArgs): React.ReactElement => ( - + ) export const directions = (args: StorybookArgs): React.ReactElement => ( - + ) export const directionsBike = (args: StorybookArgs): React.ReactElement => ( - + ) export const directionsBus = (args: StorybookArgs): React.ReactElement => ( - + ) export const directionsCar = (args: StorybookArgs): React.ReactElement => ( - + ) export const directionsWalk = (args: StorybookArgs): React.ReactElement => ( - + ) export const doNotDisturb = (args: StorybookArgs): React.ReactElement => ( - + ) export const doNotTouch = (args: StorybookArgs): React.ReactElement => ( - + ) export const dragHandle = (args: StorybookArgs): React.ReactElement => ( - + ) export const eco = (args: StorybookArgs): React.ReactElement => ( - + ) export const electricalServices = (args: StorybookArgs): React.ReactElement => ( - + ) export const emojiEvents = (args: StorybookArgs): React.ReactElement => ( - + ) export const error = (args: StorybookArgs): React.ReactElement => ( - + ) export const errorOutline = (args: StorybookArgs): React.ReactElement => ( - + ) export const event = (args: StorybookArgs): React.ReactElement => ( - + ) export const expandLess = (args: StorybookArgs): React.ReactElement => ( - + ) export const expandMore = (args: StorybookArgs): React.ReactElement => ( - + ) export const facebook = (args: StorybookArgs): React.ReactElement => ( - + ) export const fastForward = (args: StorybookArgs): React.ReactElement => ( - + ) export const fastRewind = (args: StorybookArgs): React.ReactElement => ( - + ) export const favorite = (args: StorybookArgs): React.ReactElement => ( - + ) export const favoriteBorder = (args: StorybookArgs): React.ReactElement => ( - + ) export const fileDownload = (args: StorybookArgs): React.ReactElement => ( - + ) export const filePresent = (args: StorybookArgs): React.ReactElement => ( - + ) export const fileUpload = (args: StorybookArgs): React.ReactElement => ( - + ) export const filterAlt = (args: StorybookArgs): React.ReactElement => ( - + ) export const filterList = (args: StorybookArgs): React.ReactElement => ( - + ) export const fingerprint = (args: StorybookArgs): React.ReactElement => ( - + ) export const firstPage = (args: StorybookArgs): React.ReactElement => ( - + ) export const flag = (args: StorybookArgs): React.ReactElement => ( - + ) export const flickr = (args: StorybookArgs): React.ReactElement => ( - + ) export const flight = (args: StorybookArgs): React.ReactElement => ( - + ) export const flooding = (args: StorybookArgs): React.ReactElement => ( - + ) export const folder = (args: StorybookArgs): React.ReactElement => ( - + ) export const folderOpen = (args: StorybookArgs): React.ReactElement => ( - + ) export const formatQuote = (args: StorybookArgs): React.ReactElement => ( - + ) export const formatSize = (args: StorybookArgs): React.ReactElement => ( - + ) export const forum = (args: StorybookArgs): React.ReactElement => ( - + ) export const github = (args: StorybookArgs): React.ReactElement => ( - + ) export const gridView = (args: StorybookArgs): React.ReactElement => ( - + ) export const groupAdd = (args: StorybookArgs): React.ReactElement => ( - + ) export const groups = (args: StorybookArgs): React.ReactElement => ( - + ) export const hearing = (args: StorybookArgs): React.ReactElement => ( - + ) export const help = (args: StorybookArgs): React.ReactElement => ( - + ) export const helpOutline = (args: StorybookArgs): React.ReactElement => ( - + ) export const highlightOff = (args: StorybookArgs): React.ReactElement => ( - + ) export const history = (args: StorybookArgs): React.ReactElement => ( - + ) export const home = (args: StorybookArgs): React.ReactElement => ( - + ) export const hospital = (args: StorybookArgs): React.ReactElement => ( - + ) export const hotel = (args: StorybookArgs): React.ReactElement => ( - + ) export const hourglassEmpty = (args: StorybookArgs): React.ReactElement => ( - + ) export const hurricane = (args: StorybookArgs): React.ReactElement => ( - + ) export const identification = (args: StorybookArgs): React.ReactElement => ( - + ) export const image = (args: StorybookArgs): React.ReactElement => ( - + ) export const info = (args: StorybookArgs): React.ReactElement => ( - + ) export const infoOutline = (args: StorybookArgs): React.ReactElement => ( - + ) export const insights = (args: StorybookArgs): React.ReactElement => ( - + ) export const instagram = (args: StorybookArgs): React.ReactElement => ( - + ) export const keyboard = (args: StorybookArgs): React.ReactElement => ( - + ) export const label = (args: StorybookArgs): React.ReactElement => ( - + ) export const language = (args: StorybookArgs): React.ReactElement => ( - + ) export const lastPage = (args: StorybookArgs): React.ReactElement => ( - + ) export const launch = (args: StorybookArgs): React.ReactElement => ( - + ) export const lightbulb = (args: StorybookArgs): React.ReactElement => ( - + ) export const lightbulbOutline = (args: StorybookArgs): React.ReactElement => ( - + ) export const link = (args: StorybookArgs): React.ReactElement => ( - + ) export const linkOff = (args: StorybookArgs): React.ReactElement => ( - + ) export const list = (args: StorybookArgs): React.ReactElement => ( - + ) export const localCafe = (args: StorybookArgs): React.ReactElement => ( - + ) export const localFireDepartment = ( args: StorybookArgs -): React.ReactElement => +): React.ReactElement => export const localGasStation = (args: StorybookArgs): React.ReactElement => ( - + ) export const localGroceryStore = (args: StorybookArgs): React.ReactElement => ( - + ) export const localHospital = (args: StorybookArgs): React.ReactElement => ( - + ) export const localLaundryService = ( args: StorybookArgs -): React.ReactElement => +): React.ReactElement => export const localLibrary = (args: StorybookArgs): React.ReactElement => ( - + ) export const localOffer = (args: StorybookArgs): React.ReactElement => ( - + ) export const localParking = (args: StorybookArgs): React.ReactElement => ( - + ) export const localPharmacy = (args: StorybookArgs): React.ReactElement => ( - + ) export const localPolice = (args: StorybookArgs): React.ReactElement => ( - + ) export const localTaxi = (args: StorybookArgs): React.ReactElement => ( - + ) export const locationCity = (args: StorybookArgs): React.ReactElement => ( - + ) export const locationOn = (args: StorybookArgs): React.ReactElement => ( - + ) export const lock = (args: StorybookArgs): React.ReactElement => ( - + ) export const lockOpen = (args: StorybookArgs): React.ReactElement => ( - + ) export const lockOutline = (args: StorybookArgs): React.ReactElement => ( - + ) export const login = (args: StorybookArgs): React.ReactElement => ( - + ) export const logout = (args: StorybookArgs): React.ReactElement => ( - + ) export const loop = (args: StorybookArgs): React.ReactElement => ( - + ) export const mail = (args: StorybookArgs): React.ReactElement => ( - + ) export const mailOutline = (args: StorybookArgs): React.ReactElement => ( - + ) export const map = (args: StorybookArgs): React.ReactElement => ( - + ) export const masks = (args: StorybookArgs): React.ReactElement => ( - + ) export const medicalServices = (args: StorybookArgs): React.ReactElement => ( - + ) export const menu = (args: StorybookArgs): React.ReactElement => ( - + ) export const militaryTech = (args: StorybookArgs): React.ReactElement => ( - + ) export const moreHoriz = (args: StorybookArgs): React.ReactElement => ( - + ) export const moreVert = (args: StorybookArgs): React.ReactElement => ( - + ) export const myLocation = (args: StorybookArgs): React.ReactElement => ( - + ) export const navigateBefore = (args: StorybookArgs): React.ReactElement => ( - + ) export const navigateNext = (args: StorybookArgs): React.ReactElement => ( - + ) export const navigateFarBefore = (args: StorybookArgs): React.ReactElement => ( - + ) export const navigateFarNext = (args: StorybookArgs): React.ReactElement => ( - + ) export const nearMe = (args: StorybookArgs): React.ReactElement => ( - + ) export const notifications = (args: StorybookArgs): React.ReactElement => ( - + ) export const notificationsActive = ( args: StorybookArgs -): React.ReactElement => +): React.ReactElement => export const notificationsNone = (args: StorybookArgs): React.ReactElement => ( - + ) export const notificationsOff = (args: StorybookArgs): React.ReactElement => ( - + ) export const park = (args: StorybookArgs): React.ReactElement => ( - + ) export const people = (args: StorybookArgs): React.ReactElement => ( - + ) export const person = (args: StorybookArgs): React.ReactElement => ( - + ) export const pets = (args: StorybookArgs): React.ReactElement => ( - + ) export const phone = (args: StorybookArgs): React.ReactElement => ( - + ) export const photoCamera = (args: StorybookArgs): React.ReactElement => ( - + ) export const print = (args: StorybookArgs): React.ReactElement => ( - + ) export const priorityHigh = (args: StorybookArgs): React.ReactElement => ( - + ) export const publicIcon = (args: StorybookArgs): React.ReactElement => ( - + ) export const pushPin = (args: StorybookArgs): React.ReactElement => ( - + ) export const radioButtonUnchecked = ( args: StorybookArgs -): React.ReactElement => +): React.ReactElement => export const rain = (args: StorybookArgs): React.ReactElement => ( - + ) export const reduceCapacity = (args: StorybookArgs): React.ReactElement => ( - + ) export const remove = (args: StorybookArgs): React.ReactElement => ( - + ) export const report = (args: StorybookArgs): React.ReactElement => ( - + ) export const restaurant = (args: StorybookArgs): React.ReactElement => ( - + ) export const rssFeed = (args: StorybookArgs): React.ReactElement => ( - + ) export const safetyDivider = (args: StorybookArgs): React.ReactElement => ( - + ) export const sanitizer = (args: StorybookArgs): React.ReactElement => ( - + ) export const saveAlt = (args: StorybookArgs): React.ReactElement => ( - + ) export const severeWeather = (args: StorybookArgs): React.ReactElement => ( - + ) export const schedule = (args: StorybookArgs): React.ReactElement => ( - + ) export const school = (args: StorybookArgs): React.ReactElement => ( - + ) export const science = (args: StorybookArgs): React.ReactElement => ( - + ) export const search = (args: StorybookArgs): React.ReactElement => ( - + ) export const security = (args: StorybookArgs): React.ReactElement => ( - + ) export const send = (args: StorybookArgs): React.ReactElement => ( - + ) export const sentimentDissatisfied = ( args: StorybookArgs -): React.ReactElement => +): React.ReactElement => export const sentimentNeutral = (args: StorybookArgs): React.ReactElement => ( - + ) export const sentimentSatisfied = (args: StorybookArgs): React.ReactElement => ( - + ) export const sentimentSatisfiedAlt = ( args: StorybookArgs -): React.ReactElement => +): React.ReactElement => export const sentimentVeryDissatisfied = ( args: StorybookArgs -): React.ReactElement => +): React.ReactElement => export const settings = (args: StorybookArgs): React.ReactElement => ( - + ) export const share = (args: StorybookArgs): React.ReactElement => ( - + ) export const shield = (args: StorybookArgs): React.ReactElement => ( - + ) export const shoppingBasket = (args: StorybookArgs): React.ReactElement => ( - + ) export const snow = (args: StorybookArgs): React.ReactElement => ( - + ) export const soap = (args: StorybookArgs): React.ReactElement => ( - + ) export const socialDistance = (args: StorybookArgs): React.ReactElement => ( - + ) export const sortArrow = (args: StorybookArgs): React.ReactElement => ( - + ) export const spellcheck = (args: StorybookArgs): React.ReactElement => ( - + ) export const star = (args: StorybookArgs): React.ReactElement => ( - + ) export const starHalf = (args: StorybookArgs): React.ReactElement => ( - + ) export const starOutline = (args: StorybookArgs): React.ReactElement => ( - + ) export const store = (args: StorybookArgs): React.ReactElement => ( - + ) export const support = (args: StorybookArgs): React.ReactElement => ( - + ) export const supportAgent = (args: StorybookArgs): React.ReactElement => ( - + ) export const textFields = (args: StorybookArgs): React.ReactElement => ( - + ) export const thumbDownAlt = (args: StorybookArgs): React.ReactElement => ( - + ) export const thumbUpAlt = (args: StorybookArgs): React.ReactElement => ( - + ) export const timer = (args: StorybookArgs): React.ReactElement => ( - + ) export const toggleOff = (args: StorybookArgs): React.ReactElement => ( - + ) export const toggleOn = (args: StorybookArgs): React.ReactElement => ( - + ) export const topic = (args: StorybookArgs): React.ReactElement => ( - + ) export const tornado = (args: StorybookArgs): React.ReactElement => ( - + ) export const translate = (args: StorybookArgs): React.ReactElement => ( - + ) export const trendingDown = (args: StorybookArgs): React.ReactElement => ( - + ) export const trendingUp = (args: StorybookArgs): React.ReactElement => ( - + ) export const twitter = (args: StorybookArgs): React.ReactElement => ( - + ) export const undo = (args: StorybookArgs): React.ReactElement => ( - + ) export const unfoldLess = (args: StorybookArgs): React.ReactElement => ( - + ) export const unfoldMore = (args: StorybookArgs): React.ReactElement => ( - + ) export const update = (args: StorybookArgs): React.ReactElement => ( - + ) export const uploadFile = (args: StorybookArgs): React.ReactElement => ( - + ) export const verified = (args: StorybookArgs): React.ReactElement => ( - + ) export const verifiedUser = (args: StorybookArgs): React.ReactElement => ( - + ) export const visibility = (args: StorybookArgs): React.ReactElement => ( - + ) export const visibilityOff = (args: StorybookArgs): React.ReactElement => ( - + ) export const volumeOff = (args: StorybookArgs): React.ReactElement => ( - + ) export const warning = (args: StorybookArgs): React.ReactElement => ( - + ) export const wash = (args: StorybookArgs): React.ReactElement => ( - + ) export const wifi = (args: StorybookArgs): React.ReactElement => ( - + ) export const work = (args: StorybookArgs): React.ReactElement => ( - + ) export const youtube = (args: StorybookArgs): React.ReactElement => ( - + ) export const zoomIn = (args: StorybookArgs): React.ReactElement => ( - + ) export const zoomOutMap = (args: StorybookArgs): React.ReactElement => ( - + ) export const zoomOut = (args: StorybookArgs): React.ReactElement => ( - + ) diff --git a/src/components/Icon/Icon.test.tsx b/src/components/Icon/Icon.test.tsx index e90ad1bf8d..8a8bf90603 100644 --- a/src/components/Icon/Icon.test.tsx +++ b/src/components/Icon/Icon.test.tsx @@ -1,29 +1,29 @@ import React from 'react' import { render, screen } from '@testing-library/react' -import { IconAccessibilityNew } from './Icons' +import { Icon } from './Icons' describe('Icon component', () => { it('renders without errors', () => { - render() + render() expect(screen.getByRole('img')).toBeInTheDocument() }) it('accepts a size prop', () => { - render() + render() expect(screen.getByRole('img')).toHaveClass('usa-icon--size-7') }) it('accepts a className', () => { - render() + render() expect(screen.getByRole('img')).toHaveClass('custom-class') }) it('accepts an aria-label', () => { - render() + render() expect(screen.getByRole('img')).toHaveAttribute( 'aria-label', diff --git a/src/components/Icon/Icons.stories.tsx b/src/components/Icon/Icons.stories.tsx index 10fabc82b0..76051f305a 100644 --- a/src/components/Icon/Icons.stories.tsx +++ b/src/components/Icon/Icons.stories.tsx @@ -1,245 +1,6 @@ import React from 'react' -import { - IconAccessibilityNew, - IconAccessibleForward, - IconAccountBalance, - IconAccountBox, - IconAccountCircle, - IconAdd, - IconAddCircle, - IconAddCircleOutline, - IconAlarm, - IconAlternateEmail, - IconAnnouncement, - IconArrowBack, - IconArrowDownward, - IconArrowDropDown, - IconArrowDropUp, - IconArrowForward, - IconArrowUpward, - IconApi, - IconAssessment, - IconAttachFile, - IconAttachMoney, - IconAutorenew, - IconBackpack, - IconBathtub, - IconBedding, - IconBookmark, - IconBugReport, - IconBuild, - IconCalendarToday, - IconCampaign, - IconCamping, - IconCancel, - IconChat, - IconCheck, - IconCheckBoxOutlineBlank, - IconCheckCircle, - IconCheckCircleOutline, - IconCheckroom, - IconCleanHands, - IconClothes, - IconClose, - IconClosedCaption, - IconCloud, - IconCode, - IconComment, - IconConnectWithoutContact, - IconConstruction, - IconConstructionWorker, - IconContactPage, - IconContentCopy, - IconCoronavirus, - IconCreditCard, - IconDeck, - IconDelete, - IconDeviceThermostat, - IconDirections, - IconDirectionsBike, - IconDirectionsBus, - IconDirectionsCar, - IconDirectionsWalk, - IconDoNotDisturb, - IconDoNotTouch, - IconDragHandle, - IconEco, - IconElectricalServices, - IconEmojiEvents, - IconError, - IconErrorOutline, - IconEvent, - IconExpandLess, - IconExpandMore, - IconFacebook, - IconFastForward, - IconFastRewind, - IconFavorite, - IconFavoriteBorder, - IconFileDownload, - IconFilePresent, - IconFileUpload, - IconFilterAlt, - IconFilterList, - IconFingerprint, - IconFirstPage, - IconFlag, - IconFlickr, - IconFlight, - IconFlooding, - IconFolder, - IconFolderOpen, - IconFormatQuote, - IconFormatSize, - IconForum, - IconGithub, - IconGridView, - IconGroupAdd, - IconGroups, - IconHearing, - IconHelp, - IconHelpOutline, - IconHighlightOff, - IconHistory, - IconHome, - IconHospital, - IconHotel, - IconHourglassEmpty, - IconHurricane, - IconIdentification, - IconImage, - IconInfo, - IconInfoOutline, - IconInsights, - IconInstagram, - IconKeyboard, - IconLabel, - IconLanguage, - IconLastPage, - IconLaunch, - IconLightbulb, - IconLightbulbOutline, - IconLink, - IconLinkOff, - IconList, - IconLocalCafe, - IconLocalFireDepartment, - IconLocalGasStation, - IconLocalGroceryStore, - IconLocalHospital, - IconLocalLaundryService, - IconLocalLibrary, - IconLocalOffer, - IconLocalParking, - IconLocalPharmacy, - IconLocalPolice, - IconLocalTaxi, - IconLocationCity, - IconLocationOn, - IconLock, - IconLockOpen, - IconLockOutline, - IconLogin, - IconLogout, - IconLoop, - IconMail, - IconMailOutline, - IconMap, - IconMasks, - IconMedicalServices, - IconMenu, - IconMilitaryTech, - IconMoreHoriz, - IconMoreVert, - IconMyLocation, - IconNavigateBefore, - IconNavigateNext, - IconNavigateFarBefore, - IconNavigateFarNext, - IconNearMe, - IconNotifications, - IconNotificationsActive, - IconNotificationsNone, - IconNotificationsOff, - IconPark, - IconPeople, - IconPerson, - IconPets, - IconPhone, - IconPhotoCamera, - IconPrint, - IconPriorityHigh, - IconPublic, - IconPushPin, - IconRadioButtonUnchecked, - IconRain, - IconReduceCapacity, - IconRemove, - IconReport, - IconRestaurant, - IconRssFeed, - IconSafetyDivider, - IconSanitizer, - IconSaveAlt, - IconSevereWeather, - IconSchedule, - IconSchool, - IconScience, - IconSearch, - IconSecurity, - IconSend, - IconSentimentDissatisfied, - IconSentimentNeutral, - IconSentimentSatisfied, - IconSentimentSatisfiedAlt, - IconSentimentVeryDissatisfied, - IconSettings, - IconShare, - IconShield, - IconShoppingBasket, - IconSnow, - IconSoap, - IconSocialDistance, - IconSortArrow, - IconSpellcheck, - IconStar, - IconStarHalf, - IconStarOutline, - IconStore, - IconSupport, - IconSupportAgent, - IconTextFields, - IconThumbDownAlt, - IconThumbUpAlt, - IconTimer, - IconToggleOff, - IconToggleOn, - IconTopic, - IconTornado, - IconTranslate, - IconTrendingDown, - IconTrendingUp, - IconTwitter, - IconUndo, - IconUnfoldLess, - IconUnfoldMore, - IconUpdate, - IconUploadFile, - IconVerified, - IconVerifiedUser, - IconVisibility, - IconVisibilityOff, - IconVolumeOff, - IconWarning, - IconWash, - IconWifi, - IconWork, - IconYoutube, - IconZoomIn, - IconZoomOutMap, - IconZoomOut, -} from './Icons' +import { Icon } from './Icons' type StorybookArgs = { size: 3 | 4 | 5 | 6 | 7 | 8 | 9 @@ -270,243 +31,243 @@ Source: https://designsystem.digital.gov/components/icon/ export const allIcons = (args: StorybookArgs): React.ReactElement => (
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ) diff --git a/src/components/Icon/Icons.ts b/src/components/Icon/Icons.ts index a33863cb3d..19d81ba5af 100644 --- a/src/components/Icon/Icons.ts +++ b/src/components/Icon/Icons.ts @@ -240,680 +240,676 @@ import ZoomOutSvg from 'uswds/dist/img/usa-icons/zoom_out.svg?svgr' import { makeUSWDSIcon, IconProps } from './Icon' import React from 'react' -import { withDeprecationWarning } from '../hoc/withDeprecationWarning' -export const IconAccessibilityNew: React.ComponentType = - makeUSWDSIcon(AccessibilityNewSvg) +export class Icon { + public static AccessibilityNew: React.ComponentType = + makeUSWDSIcon(AccessibilityNewSvg) -export const IconAccessibleForward: React.ComponentType = - makeUSWDSIcon(AccessibleForwardSvg) + public static AccessibleForward: React.ComponentType = + makeUSWDSIcon(AccessibleForwardSvg) -export const IconAccountBalance: React.ComponentType = - makeUSWDSIcon(AccountBalanceSvg) + public static AccountBalance: React.ComponentType = + makeUSWDSIcon(AccountBalanceSvg) -export const IconAccountBox: React.ComponentType = - makeUSWDSIcon(AccountBoxSvg) + public static AccountBox: React.ComponentType = + makeUSWDSIcon(AccountBoxSvg) -export const IconAccountCircle: React.ComponentType = - makeUSWDSIcon(AccountCircleSvg) + public static AccountCircle: React.ComponentType = + makeUSWDSIcon(AccountCircleSvg) -export const IconAdd: React.ComponentType = makeUSWDSIcon(AddSvg) + public static Add: React.ComponentType = makeUSWDSIcon(AddSvg) -export const IconAddCircle: React.ComponentType = - makeUSWDSIcon(AddCircleSvg) + public static AddCircle: React.ComponentType = + makeUSWDSIcon(AddCircleSvg) -export const IconAddCircleOutline: React.ComponentType = - makeUSWDSIcon(AddCircleOutlineSvg) + public static AddCircleOutline: React.ComponentType = + makeUSWDSIcon(AddCircleOutlineSvg) -export const IconAlarm: React.ComponentType = makeUSWDSIcon(AlarmSvg) + public static Alarm: React.ComponentType = makeUSWDSIcon(AlarmSvg) -export const IconAlternateEmail: React.ComponentType = - makeUSWDSIcon(AlternateEmailSvg) + public static AlternateEmail: React.ComponentType = + makeUSWDSIcon(AlternateEmailSvg) -export const IconAnnouncement: React.ComponentType = - makeUSWDSIcon(AnnouncementSvg) + public static Announcement: React.ComponentType = + makeUSWDSIcon(AnnouncementSvg) -export const IconArrowBack: React.ComponentType = - makeUSWDSIcon(ArrowBackSvg) + public static ArrowBack: React.ComponentType = + makeUSWDSIcon(ArrowBackSvg) -export const IconArrowDownward: React.ComponentType = - makeUSWDSIcon(ArrowDownwardSvg) + public static ArrowDownward: React.ComponentType = + makeUSWDSIcon(ArrowDownwardSvg) -export const IconArrowDropDown: React.ComponentType = - makeUSWDSIcon(ArrowDropDownSvg) + public static ArrowDropDown: React.ComponentType = + makeUSWDSIcon(ArrowDropDownSvg) -export const IconArrowDropUp: React.ComponentType = - makeUSWDSIcon(ArrowDropUpSvg) + public static ArrowDropUp: React.ComponentType = + makeUSWDSIcon(ArrowDropUpSvg) -export const IconArrowForward: React.ComponentType = - makeUSWDSIcon(ArrowForwardSvg) + public static ArrowForward: React.ComponentType = + makeUSWDSIcon(ArrowForwardSvg) -export const IconArrowUpward: React.ComponentType = - makeUSWDSIcon(ArrowUpwardSvg) + public static ArrowUpward: React.ComponentType = + makeUSWDSIcon(ArrowUpwardSvg) -export const IconApi: React.ComponentType = makeUSWDSIcon(ApiSvg) + public static Api: React.ComponentType = makeUSWDSIcon(ApiSvg) -export const IconAssessment: React.ComponentType = - makeUSWDSIcon(AssessmentSvg) + public static Assessment: React.ComponentType = + makeUSWDSIcon(AssessmentSvg) -export const IconAttachFile: React.ComponentType = - makeUSWDSIcon(AttachFileSvg) + public static AttachFile: React.ComponentType = + makeUSWDSIcon(AttachFileSvg) -export const IconAttachMoney: React.ComponentType = - makeUSWDSIcon(AttachMoneySvg) + public static AttachMoney: React.ComponentType = + makeUSWDSIcon(AttachMoneySvg) -export const IconAutorenew: React.ComponentType = - makeUSWDSIcon(AutorenewSvg) + public static Autorenew: React.ComponentType = + makeUSWDSIcon(AutorenewSvg) -export const IconBackpack: React.ComponentType = - makeUSWDSIcon(BackpackSvg) + public static Backpack: React.ComponentType = + makeUSWDSIcon(BackpackSvg) -export const IconBathtub: React.ComponentType = - makeUSWDSIcon(BathtubSvg) + public static Bathtub: React.ComponentType = + makeUSWDSIcon(BathtubSvg) -export const IconBedding: React.ComponentType = - makeUSWDSIcon(BeddingSvg) + public static Bedding: React.ComponentType = + makeUSWDSIcon(BeddingSvg) -export const IconBookmark: React.ComponentType = - makeUSWDSIcon(BookmarkSvg) + public static Bookmark: React.ComponentType = + makeUSWDSIcon(BookmarkSvg) -export const IconBugReport: React.ComponentType = - makeUSWDSIcon(BugReportSvg) + public static BugReport: React.ComponentType = + makeUSWDSIcon(BugReportSvg) -export const IconBuild: React.ComponentType = makeUSWDSIcon(BuildSvg) + public static Build: React.ComponentType = makeUSWDSIcon(BuildSvg) -export const IconCalendarToday: React.ComponentType = - makeUSWDSIcon(CalendarTodaySvg) + public static CalendarToday: React.ComponentType = + makeUSWDSIcon(CalendarTodaySvg) -export const IconCampaign: React.ComponentType = - makeUSWDSIcon(CampaignSvg) + public static Campaign: React.ComponentType = + makeUSWDSIcon(CampaignSvg) -export const IconCamping: React.ComponentType = - makeUSWDSIcon(CampingSvg) + public static Camping: React.ComponentType = + makeUSWDSIcon(CampingSvg) -export const IconCancel: React.ComponentType = - makeUSWDSIcon(CancelSvg) + public static Cancel: React.ComponentType = + makeUSWDSIcon(CancelSvg) -export const IconChat: React.ComponentType = makeUSWDSIcon(ChatSvg) + public static Chat: React.ComponentType = makeUSWDSIcon(ChatSvg) -export const IconCheck: React.ComponentType = makeUSWDSIcon(CheckSvg) + public static Check: React.ComponentType = makeUSWDSIcon(CheckSvg) -export const IconCheckBoxOutlineBlank: React.ComponentType = - makeUSWDSIcon(CheckBoxOutlineBlankSvg) + public static CheckBoxOutlineBlank: React.ComponentType = + makeUSWDSIcon(CheckBoxOutlineBlankSvg) -export const IconCheckCircle: React.ComponentType = - makeUSWDSIcon(CheckCircleSvg) + public static CheckCircle: React.ComponentType = + makeUSWDSIcon(CheckCircleSvg) -export const IconCheckCircleOutline: React.ComponentType = - makeUSWDSIcon(CheckCircleOutlineSvg) + public static CheckCircleOutline: React.ComponentType = + makeUSWDSIcon(CheckCircleOutlineSvg) -export const IconCheckroom: React.ComponentType = - makeUSWDSIcon(CheckroomSvg) + public static Checkroom: React.ComponentType = + makeUSWDSIcon(CheckroomSvg) -export const IconCleanHands: React.ComponentType = - makeUSWDSIcon(CleanHandsSvg) + public static CleanHands: React.ComponentType = + makeUSWDSIcon(CleanHandsSvg) -export const IconClothes: React.ComponentType = - makeUSWDSIcon(ClothesSvg) + public static Clothes: React.ComponentType = + makeUSWDSIcon(ClothesSvg) -export const IconClose: React.ComponentType = makeUSWDSIcon(CloseSvg) + public static Close: React.ComponentType = makeUSWDSIcon(CloseSvg) -export const IconClosedCaption: React.ComponentType = - makeUSWDSIcon(ClosedCaptionSvg) + public static ClosedCaption: React.ComponentType = + makeUSWDSIcon(ClosedCaptionSvg) -export const IconCloud: React.ComponentType = makeUSWDSIcon(CloudSvg) + public static Cloud: React.ComponentType = makeUSWDSIcon(CloudSvg) -export const IconCode: React.ComponentType = makeUSWDSIcon(CodeSvg) + public static Code: React.ComponentType = makeUSWDSIcon(CodeSvg) -export const IconComment: React.ComponentType = - makeUSWDSIcon(CommentSvg) + public static Comment: React.ComponentType = + makeUSWDSIcon(CommentSvg) -export const IconConnectWithoutContact: React.ComponentType = - makeUSWDSIcon(ConnectWithoutContactSvg) + public static ConnectWithoutContact: React.ComponentType = + makeUSWDSIcon(ConnectWithoutContactSvg) -export const IconConstruction: React.ComponentType = - makeUSWDSIcon(ConstructionSvg) + public static Construction: React.ComponentType = + makeUSWDSIcon(ConstructionSvg) -export const IconConstructionWorker: React.ComponentType = - makeUSWDSIcon(ConstructionWorkerSvg) + public static ConstructionWorker: React.ComponentType = + makeUSWDSIcon(ConstructionWorkerSvg) -export const IconContactPage: React.ComponentType = - makeUSWDSIcon(ContactPageSvg) + public static ContactPage: React.ComponentType = + makeUSWDSIcon(ContactPageSvg) -export const IconContentCopy: React.ComponentType = - makeUSWDSIcon(ContentCopySvg) + public static ContentCopy: React.ComponentType = + makeUSWDSIcon(ContentCopySvg) -export const IconCoronavirus: React.ComponentType = - makeUSWDSIcon(CoronavirusSvg) + public static Coronavirus: React.ComponentType = + makeUSWDSIcon(CoronavirusSvg) -export const IconCreditCard: React.ComponentType = - makeUSWDSIcon(CreditCardSvg) + public static CreditCard: React.ComponentType = + makeUSWDSIcon(CreditCardSvg) -export const IconDeck: React.ComponentType = makeUSWDSIcon(DeckSvg) + public static Deck: React.ComponentType = makeUSWDSIcon(DeckSvg) -export const IconDelete: React.ComponentType = - makeUSWDSIcon(DeleteSvg) + public static Delete: React.ComponentType = + makeUSWDSIcon(DeleteSvg) -export const IconDeviceThermostat: React.ComponentType = - makeUSWDSIcon(DeviceThermostatSvg) + public static DeviceThermostat: React.ComponentType = + makeUSWDSIcon(DeviceThermostatSvg) -export const IconDirections: React.ComponentType = - makeUSWDSIcon(DirectionsSvg) + public static Directions: React.ComponentType = + makeUSWDSIcon(DirectionsSvg) -export const IconDirectionsBike: React.ComponentType = - makeUSWDSIcon(DirectionsBikeSvg) + public static DirectionsBike: React.ComponentType = + makeUSWDSIcon(DirectionsBikeSvg) -export const IconDirectionsBus: React.ComponentType = - makeUSWDSIcon(DirectionsBusSvg) + public static DirectionsBus: React.ComponentType = + makeUSWDSIcon(DirectionsBusSvg) -export const IconDirectionsCar: React.ComponentType = - makeUSWDSIcon(DirectionsCarSvg) + public static DirectionsCar: React.ComponentType = + makeUSWDSIcon(DirectionsCarSvg) -export const IconDirectionsWalk: React.ComponentType = - makeUSWDSIcon(DirectionsWalkSvg) + public static DirectionsWalk: React.ComponentType = + makeUSWDSIcon(DirectionsWalkSvg) -export const IconDoNotDisturb: React.ComponentType = - makeUSWDSIcon(DoNotDisturbSvg) + public static DoNotDisturb: React.ComponentType = + makeUSWDSIcon(DoNotDisturbSvg) -export const IconDoNotTouch: React.ComponentType = - makeUSWDSIcon(DoNotTouchSvg) + public static DoNotTouch: React.ComponentType = + makeUSWDSIcon(DoNotTouchSvg) -export const IconDragHandle: React.ComponentType = - makeUSWDSIcon(DragHandleSvg) + public static DragHandle: React.ComponentType = + makeUSWDSIcon(DragHandleSvg) -export const IconEco: React.ComponentType = makeUSWDSIcon(EcoSvg) + public static Eco: React.ComponentType = makeUSWDSIcon(EcoSvg) -export const IconEdit: React.ComponentType = makeUSWDSIcon(EditSvg) + public static Edit: React.ComponentType = makeUSWDSIcon(EditSvg) -export const IconElectricalServices: React.ComponentType = - makeUSWDSIcon(ElectricalServicesSvg) + public static ElectricalServices: React.ComponentType = + makeUSWDSIcon(ElectricalServicesSvg) -export const IconEmojiEvents: React.ComponentType = - makeUSWDSIcon(EmojiEventsSvg) + public static EmojiEvents: React.ComponentType = + makeUSWDSIcon(EmojiEventsSvg) -export const IconError: React.ComponentType = makeUSWDSIcon(ErrorSvg) + public static Error: React.ComponentType = makeUSWDSIcon(ErrorSvg) -export const IconErrorOutline: React.ComponentType = - makeUSWDSIcon(ErrorOutlineSvg) + public static ErrorOutline: React.ComponentType = + makeUSWDSIcon(ErrorOutlineSvg) -export const IconEvent: React.ComponentType = makeUSWDSIcon(EventSvg) + public static Event: React.ComponentType = makeUSWDSIcon(EventSvg) -export const IconExpandLess: React.ComponentType = - makeUSWDSIcon(ExpandLessSvg) + public static ExpandLess: React.ComponentType = + makeUSWDSIcon(ExpandLessSvg) -export const IconExpandMore: React.ComponentType = - makeUSWDSIcon(ExpandMoreSvg) + public static ExpandMore: React.ComponentType = + makeUSWDSIcon(ExpandMoreSvg) -export const IconFacebook: React.ComponentType = - makeUSWDSIcon(FacebookSvg) + public static Facebook: React.ComponentType = + makeUSWDSIcon(FacebookSvg) -export const IconFastForward: React.ComponentType = - makeUSWDSIcon(FastForwardSvg) + public static FastForward: React.ComponentType = + makeUSWDSIcon(FastForwardSvg) -export const IconFastRewind: React.ComponentType = - makeUSWDSIcon(FastRewindSvg) + public static FastRewind: React.ComponentType = + makeUSWDSIcon(FastRewindSvg) -export const IconFavorite: React.ComponentType = - makeUSWDSIcon(FavoriteSvg) + public static Favorite: React.ComponentType = + makeUSWDSIcon(FavoriteSvg) -export const IconFavoriteBorder: React.ComponentType = - makeUSWDSIcon(FavoriteBorderSvg) + public static FavoriteBorder: React.ComponentType = + makeUSWDSIcon(FavoriteBorderSvg) -export const IconFileDownload: React.ComponentType = - makeUSWDSIcon(FileDownloadSvg) + public static FileDownload: React.ComponentType = + makeUSWDSIcon(FileDownloadSvg) -export const IconFilePresent: React.ComponentType = - makeUSWDSIcon(FilePresentSvg) + public static FilePresent: React.ComponentType = + makeUSWDSIcon(FilePresentSvg) -export const IconFileUpload: React.ComponentType = - makeUSWDSIcon(FileUploadSvg) + public static FileUpload: React.ComponentType = + makeUSWDSIcon(FileUploadSvg) -export const IconFilterAlt: React.ComponentType = - makeUSWDSIcon(FilterAltSvg) + public static FilterAlt: React.ComponentType = + makeUSWDSIcon(FilterAltSvg) -export const IconFilterList: React.ComponentType = - makeUSWDSIcon(FilterListSvg) + public static FilterList: React.ComponentType = + makeUSWDSIcon(FilterListSvg) -export const IconFingerprint: React.ComponentType = - makeUSWDSIcon(FingerprintSvg) + public static Fingerprint: React.ComponentType = + makeUSWDSIcon(FingerprintSvg) -export const IconFirstPage: React.ComponentType = - makeUSWDSIcon(FirstPageSvg) + public static FirstPage: React.ComponentType = + makeUSWDSIcon(FirstPageSvg) -export const IconFlag: React.ComponentType = makeUSWDSIcon(FlagSvg) + public static Flag: React.ComponentType = makeUSWDSIcon(FlagSvg) -export const IconFlickr: React.ComponentType = - makeUSWDSIcon(FlickrSvg) + public static Flickr: React.ComponentType = + makeUSWDSIcon(FlickrSvg) -export const IconFlight: React.ComponentType = - makeUSWDSIcon(FlightSvg) + public static Flight: React.ComponentType = + makeUSWDSIcon(FlightSvg) -export const IconFlooding: React.ComponentType = - makeUSWDSIcon(FloodingSvg) + public static Flooding: React.ComponentType = + makeUSWDSIcon(FloodingSvg) -export const IconFolder: React.ComponentType = - makeUSWDSIcon(FolderSvg) + public static Folder: React.ComponentType = + makeUSWDSIcon(FolderSvg) -export const IconFolderOpen: React.ComponentType = - makeUSWDSIcon(FolderOpenSvg) + public static FolderOpen: React.ComponentType = + makeUSWDSIcon(FolderOpenSvg) -export const IconFormatQuote: React.ComponentType = - makeUSWDSIcon(FormatQuoteSvg) + public static FormatQuote: React.ComponentType = + makeUSWDSIcon(FormatQuoteSvg) -export const IconFormatSize: React.ComponentType = - makeUSWDSIcon(FormatSizeSvg) + public static FormatSize: React.ComponentType = + makeUSWDSIcon(FormatSizeSvg) -export const IconForum: React.ComponentType = makeUSWDSIcon(ForumSvg) + public static Forum: React.ComponentType = makeUSWDSIcon(ForumSvg) -export const IconGithub: React.ComponentType = - makeUSWDSIcon(GithubSvg) + public static Github: React.ComponentType = + makeUSWDSIcon(GithubSvg) -export const IconGridView: React.ComponentType = - makeUSWDSIcon(GridViewSvg) + public static GridView: React.ComponentType = + makeUSWDSIcon(GridViewSvg) -export const IconGroupAdd: React.ComponentType = - makeUSWDSIcon(GroupAddSvg) + public static GroupAdd: React.ComponentType = + makeUSWDSIcon(GroupAddSvg) -export const IconGroups: React.ComponentType = - makeUSWDSIcon(GroupsSvg) + public static Groups: React.ComponentType = + makeUSWDSIcon(GroupsSvg) -export const IconHearing: React.ComponentType = - makeUSWDSIcon(HearingSvg) + public static Hearing: React.ComponentType = + makeUSWDSIcon(HearingSvg) -export const IconHelp: React.ComponentType = makeUSWDSIcon(HelpSvg) + public static Help: React.ComponentType = makeUSWDSIcon(HelpSvg) -export const IconHelpOutline: React.ComponentType = - makeUSWDSIcon(HelpOutlineSvg) + public static HelpOutline: React.ComponentType = + makeUSWDSIcon(HelpOutlineSvg) -export const IconHighlightOff: React.ComponentType = - makeUSWDSIcon(HighlightOffSvg) + public static HighlightOff: React.ComponentType = + makeUSWDSIcon(HighlightOffSvg) -export const IconHistory: React.ComponentType = - makeUSWDSIcon(HistorySvg) + public static History: React.ComponentType = + makeUSWDSIcon(HistorySvg) -export const IconHome: React.ComponentType = makeUSWDSIcon(HomeSvg) + public static Home: React.ComponentType = makeUSWDSIcon(HomeSvg) -export const IconHospital: React.ComponentType = - makeUSWDSIcon(HospitalSvg) + public static Hospital: React.ComponentType = + makeUSWDSIcon(HospitalSvg) -export const IconHotel: React.ComponentType = makeUSWDSIcon(HotelSvg) + public static Hotel: React.ComponentType = makeUSWDSIcon(HotelSvg) -export const IconHourglassEmpty: React.ComponentType = - makeUSWDSIcon(HourglassEmptySvg) + public static HourglassEmpty: React.ComponentType = + makeUSWDSIcon(HourglassEmptySvg) -export const IconHurricane: React.ComponentType = - makeUSWDSIcon(HurricaneSvg) + public static Hurricane: React.ComponentType = + makeUSWDSIcon(HurricaneSvg) -export const IconIdentification: React.ComponentType = - makeUSWDSIcon(IdentificationSvg) + public static Identification: React.ComponentType = + makeUSWDSIcon(IdentificationSvg) -export const IconImage: React.ComponentType = makeUSWDSIcon(ImageSvg) + public static Image: React.ComponentType = makeUSWDSIcon(ImageSvg) -export const IconInfo: React.ComponentType = makeUSWDSIcon(InfoSvg) + public static Info: React.ComponentType = makeUSWDSIcon(InfoSvg) -export const IconInfoOutline: React.ComponentType = - makeUSWDSIcon(InfoOutlineSvg) + public static InfoOutline: React.ComponentType = + makeUSWDSIcon(InfoOutlineSvg) -export const IconInsights: React.ComponentType = - makeUSWDSIcon(InsightsSvg) + public static Insights: React.ComponentType = + makeUSWDSIcon(InsightsSvg) -export const IconInstagram: React.ComponentType = - makeUSWDSIcon(InstagramSvg) + public static Instagram: React.ComponentType = + makeUSWDSIcon(InstagramSvg) -export const IconKeyboard: React.ComponentType = - makeUSWDSIcon(KeyboardSvg) + public static Keyboard: React.ComponentType = + makeUSWDSIcon(KeyboardSvg) -export const IconLabel: React.ComponentType = makeUSWDSIcon(LabelSvg) + public static Label: React.ComponentType = makeUSWDSIcon(LabelSvg) -export const IconLanguage: React.ComponentType = - makeUSWDSIcon(LanguageSvg) + public static Language: React.ComponentType = + makeUSWDSIcon(LanguageSvg) -export const IconLastPage: React.ComponentType = - makeUSWDSIcon(LastPageSvg) + public static LastPage: React.ComponentType = + makeUSWDSIcon(LastPageSvg) -export const IconLaunch: React.ComponentType = - makeUSWDSIcon(LaunchSvg) + public static Launch: React.ComponentType = + makeUSWDSIcon(LaunchSvg) -export const IconLightbulb: React.ComponentType = - makeUSWDSIcon(LightbulbSvg) + public static Lightbulb: React.ComponentType = + makeUSWDSIcon(LightbulbSvg) -export const IconLightbulbOutline: React.ComponentType = - makeUSWDSIcon(LightbulbOutlineSvg) + public static LightbulbOutline: React.ComponentType = + makeUSWDSIcon(LightbulbOutlineSvg) -export const IconLink: React.ComponentType = makeUSWDSIcon(LinkSvg) + public static Link: React.ComponentType = makeUSWDSIcon(LinkSvg) -export const IconLinkOff: React.ComponentType = - makeUSWDSIcon(LinkOffSvg) + public static LinkOff: React.ComponentType = + makeUSWDSIcon(LinkOffSvg) -export const IconList: React.ComponentType = makeUSWDSIcon(ListSvg) + public static List: React.ComponentType = makeUSWDSIcon(ListSvg) -export const IconLocalCafe: React.ComponentType = - makeUSWDSIcon(LocalCafeSvg) + public static LocalCafe: React.ComponentType = + makeUSWDSIcon(LocalCafeSvg) -export const IconLocalFireDepartment: React.ComponentType = - makeUSWDSIcon(LocalFireDepartmentSvg) + public static LocalFireDepartment: React.ComponentType = + makeUSWDSIcon(LocalFireDepartmentSvg) -export const IconLocalGasStation: React.ComponentType = - makeUSWDSIcon(LocalGasStationSvg) + public static LocalGasStation: React.ComponentType = + makeUSWDSIcon(LocalGasStationSvg) -export const IconLocalGroceryStore: React.ComponentType = - makeUSWDSIcon(LocalGroceryStoreSvg) + public static LocalGroceryStore: React.ComponentType = + makeUSWDSIcon(LocalGroceryStoreSvg) -export const IconLocalHospital: React.ComponentType = - makeUSWDSIcon(LocalHospitalSvg) + public static LocalHospital: React.ComponentType = + makeUSWDSIcon(LocalHospitalSvg) -export const IconLocalLaundryService: React.ComponentType = - makeUSWDSIcon(LocalLaundryServiceSvg) + public static LocalLaundryService: React.ComponentType = + makeUSWDSIcon(LocalLaundryServiceSvg) -export const IconLocalLibrary: React.ComponentType = - makeUSWDSIcon(LocalLibrarySvg) + public static LocalLibrary: React.ComponentType = + makeUSWDSIcon(LocalLibrarySvg) -export const IconLocalOffer: React.ComponentType = - makeUSWDSIcon(LocalOfferSvg) + public static LocalOffer: React.ComponentType = + makeUSWDSIcon(LocalOfferSvg) -export const IconLocalParking: React.ComponentType = - makeUSWDSIcon(LocalParkingSvg) + public static LocalParking: React.ComponentType = + makeUSWDSIcon(LocalParkingSvg) -export const IconLocalPharmacy: React.ComponentType = - makeUSWDSIcon(LocalPharmacySvg) + public static LocalPharmacy: React.ComponentType = + makeUSWDSIcon(LocalPharmacySvg) -export const IconLocalPolice: React.ComponentType = - makeUSWDSIcon(LocalPoliceSvg) + public static LocalPolice: React.ComponentType = + makeUSWDSIcon(LocalPoliceSvg) -export const IconLocalTaxi: React.ComponentType = - makeUSWDSIcon(LocalTaxiSvg) + public static LocalTaxi: React.ComponentType = + makeUSWDSIcon(LocalTaxiSvg) -export const IconLocationCity: React.ComponentType = - makeUSWDSIcon(LocationCitySvg) + public static LocationCity: React.ComponentType = + makeUSWDSIcon(LocationCitySvg) -export const IconLocationOn: React.ComponentType = - makeUSWDSIcon(LocationOnSvg) + public static LocationOn: React.ComponentType = + makeUSWDSIcon(LocationOnSvg) -export const IconLock: React.ComponentType = makeUSWDSIcon(LockSvg) + public static Lock: React.ComponentType = makeUSWDSIcon(LockSvg) -export const IconLockOpen: React.ComponentType = - makeUSWDSIcon(LockOpenSvg) + public static LockOpen: React.ComponentType = + makeUSWDSIcon(LockOpenSvg) -export const IconLockOutline: React.ComponentType = - makeUSWDSIcon(LockOutlineSvg) + public static LockOutline: React.ComponentType = + makeUSWDSIcon(LockOutlineSvg) -export const IconLogin: React.ComponentType = makeUSWDSIcon(LoginSvg) + public static Login: React.ComponentType = makeUSWDSIcon(LoginSvg) -export const IconLogout: React.ComponentType = - makeUSWDSIcon(LogoutSvg) + public static Logout: React.ComponentType = + makeUSWDSIcon(LogoutSvg) -export const IconLoop: React.ComponentType = makeUSWDSIcon(LoopSvg) + public static Loop: React.ComponentType = makeUSWDSIcon(LoopSvg) -export const IconMail: React.ComponentType = makeUSWDSIcon(MailSvg) + public static Mail: React.ComponentType = makeUSWDSIcon(MailSvg) -export const IconMailOutline: React.ComponentType = - makeUSWDSIcon(MailOutlineSvg) + public static MailOutline: React.ComponentType = + makeUSWDSIcon(MailOutlineSvg) -export const IconMap: React.ComponentType = makeUSWDSIcon(MapSvg) + public static Map: React.ComponentType = makeUSWDSIcon(MapSvg) -export const IconMasks: React.ComponentType = makeUSWDSIcon(MasksSvg) + public static Masks: React.ComponentType = makeUSWDSIcon(MasksSvg) -export const IconMedicalServices: React.ComponentType = - makeUSWDSIcon(MedicalServicesSvg) + public static MedicalServices: React.ComponentType = + makeUSWDSIcon(MedicalServicesSvg) -export const IconMenu: React.ComponentType = makeUSWDSIcon(MenuSvg) + public static Menu: React.ComponentType = makeUSWDSIcon(MenuSvg) -export const IconMilitaryTech: React.ComponentType = - makeUSWDSIcon(MilitaryTechSvg) + public static MilitaryTech: React.ComponentType = + makeUSWDSIcon(MilitaryTechSvg) -export const IconMoreHoriz: React.ComponentType = - makeUSWDSIcon(MoreHorizSvg) + public static MoreHoriz: React.ComponentType = + makeUSWDSIcon(MoreHorizSvg) -export const IconMoreVert: React.ComponentType = - makeUSWDSIcon(MoreVertSvg) + public static MoreVert: React.ComponentType = + makeUSWDSIcon(MoreVertSvg) -export const IconMyLocation: React.ComponentType = - makeUSWDSIcon(MyLocationSvg) + public static MyLocation: React.ComponentType = + makeUSWDSIcon(MyLocationSvg) -export const IconNavigateBefore: React.ComponentType = - makeUSWDSIcon(NavigateBeforeSvg) + public static NavigateBefore: React.ComponentType = + makeUSWDSIcon(NavigateBeforeSvg) -export const IconNavigateNext: React.ComponentType = - makeUSWDSIcon(NavigateNextSvg) + public static NavigateNext: React.ComponentType = + makeUSWDSIcon(NavigateNextSvg) -export const IconNavigateFarBefore: React.ComponentType = - makeUSWDSIcon(NavigateFarBeforeSvg) + public static NavigateFarBefore: React.ComponentType = + makeUSWDSIcon(NavigateFarBeforeSvg) -export const IconNavigateFarNext: React.ComponentType = - makeUSWDSIcon(NavigateFarNextSvg) + public static NavigateFarNext: React.ComponentType = + makeUSWDSIcon(NavigateFarNextSvg) -export const IconNearMe: React.ComponentType = - makeUSWDSIcon(NearMeSvg) + public static NearMe: React.ComponentType = + makeUSWDSIcon(NearMeSvg) -export const IconNotifications: React.ComponentType = - makeUSWDSIcon(NotificationsSvg) + public static Notifications: React.ComponentType = + makeUSWDSIcon(NotificationsSvg) -export const IconNotificationsActive: React.ComponentType = - makeUSWDSIcon(NotificationsActiveSvg) + public static NotificationsActive: React.ComponentType = + makeUSWDSIcon(NotificationsActiveSvg) -export const IconNotificationsNone: React.ComponentType = - makeUSWDSIcon(NotificationsNoneSvg) + public static NotificationsNone: React.ComponentType = + makeUSWDSIcon(NotificationsNoneSvg) -export const IconNotificationsOff: React.ComponentType = - makeUSWDSIcon(NotificationsOffSvg) + public static NotificationsOff: React.ComponentType = + makeUSWDSIcon(NotificationsOffSvg) -export const IconPark: React.ComponentType = makeUSWDSIcon(ParkSvg) + public static Park: React.ComponentType = makeUSWDSIcon(ParkSvg) -export const IconPeople: React.ComponentType = - makeUSWDSIcon(PeopleSvg) + public static People: React.ComponentType = + makeUSWDSIcon(PeopleSvg) -export const IconPerson: React.ComponentType = - makeUSWDSIcon(PersonSvg) + public static Person: React.ComponentType = + makeUSWDSIcon(PersonSvg) -export const IconPets: React.ComponentType = makeUSWDSIcon(PetsSvg) + public static Pets: React.ComponentType = makeUSWDSIcon(PetsSvg) -export const IconPhone: React.ComponentType = makeUSWDSIcon(PhoneSvg) + public static Phone: React.ComponentType = makeUSWDSIcon(PhoneSvg) -export const IconPhotoCamera: React.ComponentType = - makeUSWDSIcon(PhotoCameraSvg) + public static PhotoCamera: React.ComponentType = + makeUSWDSIcon(PhotoCameraSvg) -export const IconPrint: React.ComponentType = makeUSWDSIcon(PrintSvg) + public static Print: React.ComponentType = makeUSWDSIcon(PrintSvg) -export const IconPriorityHigh: React.ComponentType = - makeUSWDSIcon(PriorityHighSvg) + public static PriorityHigh: React.ComponentType = + makeUSWDSIcon(PriorityHighSvg) -export const IconPublic: React.ComponentType = - makeUSWDSIcon(PublicSvg) + public static Public: React.ComponentType = + makeUSWDSIcon(PublicSvg) -export const IconPushPin: React.ComponentType = - makeUSWDSIcon(PushPinSvg) + public static PushPin: React.ComponentType = + makeUSWDSIcon(PushPinSvg) -export const IconRadioButtonUnchecked: React.ComponentType = - makeUSWDSIcon(RadioButtonUncheckedSvg) + public static RadioButtonUnchecked: React.ComponentType = + makeUSWDSIcon(RadioButtonUncheckedSvg) -export const IconRain: React.ComponentType = makeUSWDSIcon(RainSvg) + public static Rain: React.ComponentType = makeUSWDSIcon(RainSvg) -export const IconReduceCapacity: React.ComponentType = - makeUSWDSIcon(ReduceCapacitySvg) + public static ReduceCapacity: React.ComponentType = + makeUSWDSIcon(ReduceCapacitySvg) -export const IconRemove: React.ComponentType = - makeUSWDSIcon(RemoveSvg) + public static Remove: React.ComponentType = + makeUSWDSIcon(RemoveSvg) -export const IconReport: React.ComponentType = - makeUSWDSIcon(ReportSvg) + public static Report: React.ComponentType = + makeUSWDSIcon(ReportSvg) -export const IconRestaurant: React.ComponentType = - makeUSWDSIcon(RestaurantSvg) + public static Restaurant: React.ComponentType = + makeUSWDSIcon(RestaurantSvg) -export const IconRssFeed: React.ComponentType = - makeUSWDSIcon(RssFeedSvg) + public static RssFeed: React.ComponentType = + makeUSWDSIcon(RssFeedSvg) -export const IconSafetyDivider: React.ComponentType = - makeUSWDSIcon(SafetyDividerSvg) + public static SafetyDivider: React.ComponentType = + makeUSWDSIcon(SafetyDividerSvg) -export const IconSanitizer: React.ComponentType = - makeUSWDSIcon(SanitizerSvg) + public static Sanitizer: React.ComponentType = + makeUSWDSIcon(SanitizerSvg) -export const IconSaveAlt: React.ComponentType = - makeUSWDSIcon(SaveAltSvg) + public static SaveAlt: React.ComponentType = + makeUSWDSIcon(SaveAltSvg) -export const IconSevereWeather: React.ComponentType = - makeUSWDSIcon(SevereWeatherSvg) + public static SevereWeather: React.ComponentType = + makeUSWDSIcon(SevereWeatherSvg) -export const IconSchedule: React.ComponentType = - makeUSWDSIcon(ScheduleSvg) + public static Schedule: React.ComponentType = + makeUSWDSIcon(ScheduleSvg) -export const IconSchool: React.ComponentType = - makeUSWDSIcon(SchoolSvg) + public static School: React.ComponentType = + makeUSWDSIcon(SchoolSvg) -export const IconScience: React.ComponentType = - makeUSWDSIcon(ScienceSvg) + public static Science: React.ComponentType = + makeUSWDSIcon(ScienceSvg) -export const IconSearch: React.ComponentType = - makeUSWDSIcon(SearchSvg) + public static Search: React.ComponentType = + makeUSWDSIcon(SearchSvg) -export const IconSecurity: React.ComponentType = - makeUSWDSIcon(SecuritySvg) + public static Security: React.ComponentType = + makeUSWDSIcon(SecuritySvg) -export const IconSend: React.ComponentType = makeUSWDSIcon(SendSvg) + public static Send: React.ComponentType = makeUSWDSIcon(SendSvg) -export const IconSentimentDissatisfied: React.ComponentType = - makeUSWDSIcon(SentimentDissatisfiedSvg) + public static SentimentDissatisfied: React.ComponentType = + makeUSWDSIcon(SentimentDissatisfiedSvg) -export const IconSentimentNeutral: React.ComponentType = - makeUSWDSIcon(SentimentNeutralSvg) + public static SentimentNeutral: React.ComponentType = + makeUSWDSIcon(SentimentNeutralSvg) -export const IconSentimentSatisfied: React.ComponentType = - makeUSWDSIcon(SentimentSatisfiedSvg) + public static SentimentSatisfied: React.ComponentType = + makeUSWDSIcon(SentimentSatisfiedSvg) -export const IconSentimentSatisfiedAlt: React.ComponentType = - makeUSWDSIcon(SentimentSatisfiedAltSvg) + public static SentimentSatisfiedAlt: React.ComponentType = + makeUSWDSIcon(SentimentSatisfiedAltSvg) -export const IconSentimentVeryDissatisfied: React.ComponentType = - makeUSWDSIcon(SentimentVeryDissatisfiedSvg) + public static SentimentVeryDissatisfied: React.ComponentType = + makeUSWDSIcon(SentimentVeryDissatisfiedSvg) -export const IconSettings: React.ComponentType = - makeUSWDSIcon(SettingsSvg) + public static Settings: React.ComponentType = + makeUSWDSIcon(SettingsSvg) -export const IconShare: React.ComponentType = makeUSWDSIcon(ShareSvg) + public static Share: React.ComponentType = makeUSWDSIcon(ShareSvg) -export const IconShield: React.ComponentType = - makeUSWDSIcon(ShieldSvg) + public static Shield: React.ComponentType = + makeUSWDSIcon(ShieldSvg) -export const IconShoppingBasket: React.ComponentType = - makeUSWDSIcon(ShoppingBasketSvg) + public static ShoppingBasket: React.ComponentType = + makeUSWDSIcon(ShoppingBasketSvg) -export const IconSnow: React.ComponentType = makeUSWDSIcon(SnowSvg) + public static Snow: React.ComponentType = makeUSWDSIcon(SnowSvg) -export const IconSoap: React.ComponentType = makeUSWDSIcon(SoapSvg) + public static Soap: React.ComponentType = makeUSWDSIcon(SoapSvg) -export const IconSocialDistance: React.ComponentType = - makeUSWDSIcon(SocialDistanceSvg) + public static SocialDistance: React.ComponentType = + makeUSWDSIcon(SocialDistanceSvg) -export const IconSortArrow: React.ComponentType = - makeUSWDSIcon(SortArrowSvg) + public static SortArrow: React.ComponentType = + makeUSWDSIcon(SortArrowSvg) -export const IconSpellcheck: React.ComponentType = - makeUSWDSIcon(SpellcheckSvg) + public static Spellcheck: React.ComponentType = + makeUSWDSIcon(SpellcheckSvg) -export const IconStar: React.ComponentType = makeUSWDSIcon(StarSvg) + public static Star: React.ComponentType = makeUSWDSIcon(StarSvg) -export const IconStarHalf: React.ComponentType = - makeUSWDSIcon(StarHalfSvg) + public static StarHalf: React.ComponentType = + makeUSWDSIcon(StarHalfSvg) -export const IconStarOutline: React.ComponentType = - makeUSWDSIcon(StarOutlineSvg) + public static StarOutline: React.ComponentType = + makeUSWDSIcon(StarOutlineSvg) -export const IconStore: React.ComponentType = makeUSWDSIcon(StoreSvg) + public static Store: React.ComponentType = makeUSWDSIcon(StoreSvg) -export const IconSupport: React.ComponentType = - makeUSWDSIcon(SupportSvg) + public static Support: React.ComponentType = + makeUSWDSIcon(SupportSvg) -export const IconSupportAgent: React.ComponentType = - makeUSWDSIcon(SupportAgentSvg) + public static SupportAgent: React.ComponentType = + makeUSWDSIcon(SupportAgentSvg) -export const IconTextFields: React.ComponentType = - makeUSWDSIcon(TextFieldsSvg) + public static TextFields: React.ComponentType = + makeUSWDSIcon(TextFieldsSvg) -export const IconThumbDownAlt: React.ComponentType = - makeUSWDSIcon(ThumbDownAltSvg) + public static ThumbDownAlt: React.ComponentType = + makeUSWDSIcon(ThumbDownAltSvg) -export const IconThumbUpAlt: React.ComponentType = - makeUSWDSIcon(ThumbUpAltSvg) + public static ThumbUpAlt: React.ComponentType = + makeUSWDSIcon(ThumbUpAltSvg) -export const IconTimer: React.ComponentType = makeUSWDSIcon(TimerSvg) + public static Timer: React.ComponentType = makeUSWDSIcon(TimerSvg) -export const IconToggleOff: React.ComponentType = - makeUSWDSIcon(ToggleOffSvg) + public static ToggleOff: React.ComponentType = + makeUSWDSIcon(ToggleOffSvg) -export const IconToggleOn: React.ComponentType = - makeUSWDSIcon(ToggleOnSvg) + public static ToggleOn: React.ComponentType = + makeUSWDSIcon(ToggleOnSvg) -export const IconTopic: React.ComponentType = makeUSWDSIcon(TopicSvg) + public static Topic: React.ComponentType = makeUSWDSIcon(TopicSvg) -export const IconTornado: React.ComponentType = - makeUSWDSIcon(TornadoSvg) + public static Tornado: React.ComponentType = + makeUSWDSIcon(TornadoSvg) -export const IconTranslate: React.ComponentType = - makeUSWDSIcon(TranslateSvg) + public static Translate: React.ComponentType = + makeUSWDSIcon(TranslateSvg) -export const IconTrendingDown: React.ComponentType = - makeUSWDSIcon(TrendingDownSvg) + public static TrendingDown: React.ComponentType = + makeUSWDSIcon(TrendingDownSvg) -export const IconTrendingUp: React.ComponentType = - makeUSWDSIcon(TrendingUpSvg) + public static TrendingUp: React.ComponentType = + makeUSWDSIcon(TrendingUpSvg) -export const IconTwitter: React.ComponentType = - makeUSWDSIcon(TwitterSvg) + public static Twitter: React.ComponentType = + makeUSWDSIcon(TwitterSvg) -export const IconUndo: React.ComponentType = makeUSWDSIcon(UndoSvg) + public static Undo: React.ComponentType = makeUSWDSIcon(UndoSvg) -export const IconUnfoldLess: React.ComponentType = - makeUSWDSIcon(UnfoldLessSvg) + public static UnfoldLess: React.ComponentType = + makeUSWDSIcon(UnfoldLessSvg) -export const IconUnfoldMore: React.ComponentType = - makeUSWDSIcon(UnfoldMoreSvg) + public static UnfoldMore: React.ComponentType = + makeUSWDSIcon(UnfoldMoreSvg) -export const IconUpdate: React.ComponentType = - makeUSWDSIcon(UpdateSvg) + public static Update: React.ComponentType = + makeUSWDSIcon(UpdateSvg) -export const IconUploadFile: React.ComponentType = - makeUSWDSIcon(UploadFileSvg) + public static UploadFile: React.ComponentType = + makeUSWDSIcon(UploadFileSvg) -export const IconVerified: React.ComponentType = - makeUSWDSIcon(VerifiedSvg) + public static Verified: React.ComponentType = + makeUSWDSIcon(VerifiedSvg) -export const IconVerifiedUser: React.ComponentType = - makeUSWDSIcon(VerifiedUserSvg) + public static VerifiedUser: React.ComponentType = + makeUSWDSIcon(VerifiedUserSvg) -export const IconVisibility: React.ComponentType = - makeUSWDSIcon(VisibilitySvg) + public static Visibility: React.ComponentType = + makeUSWDSIcon(VisibilitySvg) -/** @deprecated, use IconVisibility */ -export const IconVisiblity: React.ComponentType = - withDeprecationWarning( - IconVisibility, - '`IconVisiblity` is deprecated and will be removed in the next major release. Please use `IconVisibility`.' - ) + public static VisibilityOff: React.ComponentType = + makeUSWDSIcon(VisibilityOffSvg) -export const IconVisibilityOff: React.ComponentType = - makeUSWDSIcon(VisibilityOffSvg) + public static VolumeOff: React.ComponentType = + makeUSWDSIcon(VolumeOffSvg) -export const IconVolumeOff: React.ComponentType = - makeUSWDSIcon(VolumeOffSvg) + public static Warning: React.ComponentType = + makeUSWDSIcon(WarningSvg) -export const IconWarning: React.ComponentType = - makeUSWDSIcon(WarningSvg) + public static Wash: React.ComponentType = makeUSWDSIcon(WashSvg) -export const IconWash: React.ComponentType = makeUSWDSIcon(WashSvg) + public static Wifi: React.ComponentType = makeUSWDSIcon(WifiSvg) -export const IconWifi: React.ComponentType = makeUSWDSIcon(WifiSvg) + public static Work: React.ComponentType = makeUSWDSIcon(WorkSvg) -export const IconWork: React.ComponentType = makeUSWDSIcon(WorkSvg) + public static Youtube: React.ComponentType = + makeUSWDSIcon(YoutubeSvg) -export const IconYoutube: React.ComponentType = - makeUSWDSIcon(YoutubeSvg) + public static ZoomIn: React.ComponentType = + makeUSWDSIcon(ZoomInSvg) -export const IconZoomIn: React.ComponentType = - makeUSWDSIcon(ZoomInSvg) + public static ZoomOutMap: React.ComponentType = + makeUSWDSIcon(ZoomOutMapSvg) -export const IconZoomOutMap: React.ComponentType = - makeUSWDSIcon(ZoomOutMapSvg) + public static ZoomOut: React.ComponentType = + makeUSWDSIcon(ZoomOutSvg) +} -export const IconZoomOut: React.ComponentType = - makeUSWDSIcon(ZoomOutSvg) +export default Icon diff --git a/src/components/Modal/ModalCloseButton/ModalCloseButton.tsx b/src/components/Modal/ModalCloseButton/ModalCloseButton.tsx index e695bbbad7..35f96faa42 100644 --- a/src/components/Modal/ModalCloseButton/ModalCloseButton.tsx +++ b/src/components/Modal/ModalCloseButton/ModalCloseButton.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { IconClose } from '../../Icon/Icons' +import { Icon } from '../../Icon/Icons' import { Button } from '../../Button/Button' interface ModalCloseButtonProps { @@ -18,8 +18,9 @@ export const ModalCloseButton = ({ aria-label="Close this window" onClick={handleClose} data-close-modal - type="button"> -