diff --git a/app/scripts/components/common/banner/index.tsx b/app/scripts/components/common/banner/index.tsx index 94e2472cc..ea2e15dde 100644 --- a/app/scripts/components/common/banner/index.tsx +++ b/app/scripts/components/common/banner/index.tsx @@ -8,7 +8,7 @@ import { USWDSBannerIcon, USWDSBannerGuidance, USWDSMediaBlockBody -} from '$components/common/uswds/banner'; +} from '$uswds'; interface Guidance { left?: GuidanceContent; diff --git a/app/scripts/components/common/cookie-consent/index.tsx b/app/scripts/components/common/cookie-consent/index.tsx index fe40b4748..70d05bb59 100644 --- a/app/scripts/components/common/cookie-consent/index.tsx +++ b/app/scripts/components/common/cookie-consent/index.tsx @@ -7,7 +7,7 @@ import { USWDSAlert, USWDSButton, USWDSButtonGroup -} from '$components/common/uswds'; +} from '$uswds'; import './index.scss'; interface cookieConsentTheme { diff --git a/app/scripts/components/common/page-header-legacy/nav-menu-item.tsx b/app/scripts/components/common/page-header-legacy/nav-menu-item.tsx index d4ea7d812..0d2fc7ad2 100644 --- a/app/scripts/components/common/page-header-legacy/nav-menu-item.tsx +++ b/app/scripts/components/common/page-header-legacy/nav-menu-item.tsx @@ -16,8 +16,8 @@ import { NavItem, NavItemType } from '../page-header/types'; -import { USWDSButton } from '../uswds/button'; import { useFeedbackModal } from '../layout-root'; +import { USWDSButton } from '$uswds'; import GlobalMenuLinkCSS from '$styles/menu-link'; import { useMediaQuery } from '$utils/use-media-query'; import { LinkProperties } from '$types/veda'; diff --git a/app/scripts/components/common/page-header/index.tsx b/app/scripts/components/common/page-header/index.tsx index 1c662fe92..ceaa3f553 100644 --- a/app/scripts/components/common/page-header/index.tsx +++ b/app/scripts/components/common/page-header/index.tsx @@ -9,7 +9,7 @@ import { USWDSHeaderTitle, USWDSNavMenuButton, USWDSExtendedNav -} from '$components/common/uswds'; +} from '$uswds'; import { LinkProperties } from '$types/veda'; interface PageHeaderProps { mainNavItems: NavItem[]; diff --git a/app/scripts/components/common/page-header/nav/nav-dropdown-button.tsx b/app/scripts/components/common/page-header/nav/nav-dropdown-button.tsx index 5b7f1f5c6..6af35bfdc 100644 --- a/app/scripts/components/common/page-header/nav/nav-dropdown-button.tsx +++ b/app/scripts/components/common/page-header/nav/nav-dropdown-button.tsx @@ -1,8 +1,7 @@ import React, { useCallback } from 'react'; -import { USWDSNavDropDownButton } from '../../uswds/header/nav-drop-down-button'; -import { USWDSMenu } from '../../uswds/header/menu'; import { DropdownNavLink } from '../types'; import { createDynamicNavMenuList } from './create-dynamic-nav-menu-list'; +import { USWDSNavDropDownButton, USWDSMenu } from '$uswds'; import { SetState } from '$types/aliases'; import { LinkProperties } from '$types/veda'; import { useClickOutside } from '$utils/use-click-outside'; diff --git a/app/scripts/components/common/site-alert/index.tsx b/app/scripts/components/common/site-alert/index.tsx index b5a780701..e655b094f 100644 --- a/app/scripts/components/common/site-alert/index.tsx +++ b/app/scripts/components/common/site-alert/index.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import { Icon } from '@trussworks/react-uswds'; -import { USWDSSiteAlert } from '$components/common/uswds/site-alert'; +import { USWDSSiteAlert } from '$uswds'; const ALERT_KEY = 'dismissedSiteAlertUrl'; diff --git a/app/scripts/components/common/uswds/index.tsx b/app/scripts/components/common/uswds/index.tsx index 157e364d7..5b2c409ed 100644 --- a/app/scripts/components/common/uswds/index.tsx +++ b/app/scripts/components/common/uswds/index.tsx @@ -1,8 +1,11 @@ export { USWDSAlert } from './alert'; +export { USWDSSiteAlert } from './site-alert'; export { USWDSButtonGroup, USWDSButton } from './button'; export { USWDSLink } from './link'; -export { USWDSBanner, USWDSBannerContent } from './banner'; +export { USWDSBanner, USWDSBannerContent, USWDSBannerButton, USWDSBannerFlag, USWDSBannerHeader, USWDSBannerIcon, USWDSBannerGuidance, USWDSMediaBlockBody } from './banner'; export { USWDSHeader, USWDSHeaderTitle } from './header'; +export { USWDSMenu } from './header/menu'; export { USWDSNavMenuButton } from './header/nav-menu-button'; +export { USWDSNavDropDownButton } from './header/nav-drop-down-button'; export { USWDSExtendedNav } from './header/extended-nav'; export { USWDSTextInput, USWDSTextInputMask } from './input'; diff --git a/app/scripts/components/exploration/components/datasets/colorRangeSlider/index.tsx b/app/scripts/components/exploration/components/datasets/colorRangeSlider/index.tsx index f706be6f1..14a798608 100644 --- a/app/scripts/components/exploration/components/datasets/colorRangeSlider/index.tsx +++ b/app/scripts/components/exploration/components/datasets/colorRangeSlider/index.tsx @@ -12,7 +12,7 @@ import { } from './utils'; import { colorMapScale } from '$components/exploration/types.d.ts'; -import { USWDSTextInput } from '$components/common/uswds'; +import { USWDSTextInput } from '$uswds'; interface ColorrangeRangeSlideProps { // Absolute minimum of color range diff --git a/package.json b/package.json index db9a5c273..8f24bf300 100644 --- a/package.json +++ b/package.json @@ -258,6 +258,7 @@ "$types": "~/app/scripts/types", "$context": "~/app/scripts/context", "$data-layer": "~/app/scripts/data-layer", + "$uswds": "~/app/scripts/components/common/uswds", "$test": "~/test" } } diff --git a/tsconfig.json b/tsconfig.json index 973dd823f..cb1d2a10e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,7 +14,8 @@ "$utils/*": ["app/scripts/utils/*"], "$types/*": ["app/scripts/types/*"], "$context/*": ["app/scripts/context/*"], - "$data-layer/*": ["app/scripts/data-layer/*"] + "$data-layer/*": ["app/scripts/data-layer/*"], + "$uswds": ["app/scripts/components/common/uswds/"], } }, "exclude": [