Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cleanup / add uswds shortcut and add all exports #1354

Merged
merged 4 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/scripts/components/common/banner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
USWDSBannerIcon,
USWDSBannerGuidance,
USWDSMediaBlockBody
} from '$components/common/uswds/banner';
} from '$uswds';

interface Guidance {
left?: GuidanceContent;
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/components/common/cookie-consent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
USWDSAlert,
USWDSButton,
USWDSButtonGroup
} from '$components/common/uswds';
} from '$uswds';

import './index.scss';
interface cookieConsentTheme {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/components/common/page-header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
USWDSHeaderTitle,
USWDSNavMenuButton,
USWDSExtendedNav
} from '$components/common/uswds';
} from '$uswds';
import { LinkProperties } from '$types/veda';
interface PageHeaderProps {
mainNavItems: NavItem[];
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/components/common/site-alert/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import { Icon } from '@trussworks/react-uswds';
import { decode } from 'he';
import { USWDSSiteAlert } from '$components/common/uswds/site-alert';
import { USWDSSiteAlert } from '$uswds';

const ALERT_KEY = 'dismissedSiteAlertUrl';

Expand Down
5 changes: 4 additions & 1 deletion app/scripts/components/common/uswds/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@
"$types": "~/app/scripts/types",
"$context": "~/app/scripts/context",
"$data-layer": "~/app/scripts/data-layer",
"$uswds": "~/app/scripts/components/common/uswds",
"$test": "~/test"
}
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
Loading