diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ce8eab88f55..e5e0acd3c05 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,4 +5,4 @@ updates: schedule: interval: 'daily' allow: - - dependency-name: 'identity-style-guide' + - dependency-name: '@18f/identity-design-system' diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index 7b77d811d49..6b147d7d533 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -5,6 +5,6 @@ //= link intl-tel-input/build/img/flags.png //= link intl-tel-input/build/img/flags@2x.png -//= link_tree ../../../node_modules/identity-style-guide/dist/assets/img -//= link_tree ../../../node_modules/identity-style-guide/dist/assets/fonts +//= link_tree ../../../node_modules/@18f/identity-design-system/dist/assets/img +//= link_tree ../../../node_modules/@18f/identity-design-system/dist/assets/fonts //= link_tree ../builds diff --git a/app/assets/stylesheets/_required.scss b/app/assets/stylesheets/_required.scss index f07e6942c03..248473430ec 100644 --- a/app/assets/stylesheets/_required.scss +++ b/app/assets/stylesheets/_required.scss @@ -1 +1,50 @@ -@import 'variables/vendor'; +@use 'uswds-core' with ( + $theme-body-font-size: 'sm', + $theme-font-path: '.', + $theme-image-path: '@18f/identity-design-system/dist/assets/img', + $theme-global-border-box-sizing: true, + $theme-global-link-styles: true, + $theme-grid-container-max-width: 'tablet-lg', + $theme-header-min-width: 'tablet', + $theme-link-visited-color: 'primary', + $theme-style-body-element: true, + $output-these-utilities: ( + 'add-list-reset', + 'align-items', + 'align-self', + 'background-color', + 'border', + 'border-color', + 'border-style', + 'border-width', + 'bottom', + 'clearfix', + 'color', + 'display', + 'flex', + 'flex-direction', + 'flex-wrap', + 'float', + 'font', + 'font-family', + 'font-feature', + 'font-style', + 'font-weight', + 'height', + 'justify-content', + 'left', + 'margin', + 'margin-horizontal', + 'margin-vertical', + 'maxw', + 'padding', + 'position', + 'right', + 'text-align', + 'text-transform', + 'top', + 'vertical-align', + 'whitespace', + 'width', + ) +); diff --git a/app/assets/stylesheets/_uswds.scss b/app/assets/stylesheets/_uswds.scss new file mode 100644 index 00000000000..0862381ea69 --- /dev/null +++ b/app/assets/stylesheets/_uswds.scss @@ -0,0 +1,28 @@ +@use 'uswds-core' as *; + +@forward 'uswds-global'; +@forward 'uswds-helpers'; +@forward 'usa-accordion'; +@forward 'usa-alert'; +@forward 'usa-banner'; +@forward 'usa-button'; +@forward 'usa-collection'; +@forward 'usa-form'; +@forward 'usa-header'; +@forward 'usa-icon-list'; +@forward 'usa-icon'; +@forward 'usa-layout-grid'; +@forward 'usa-link'; +@forward 'usa-list'; +@forward 'usa-media-block'; +@forward 'usa-modal'; +@forward 'usa-nav'; +@forward 'usa-process-list'; +@forward 'usa-prose'; +@forward 'usa-sidenav'; +@forward 'usa-skipnav'; +@forward 'usa-step-indicator'; +@forward 'usa-tag'; +@forward 'usa-verification-badge'; +@forward 'uswds-form-controls'; +@forward 'uswds-utilities'; diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 4b83d93d31c..efa8abb2768 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -1,10 +1,6 @@ -@import 'variables/app'; -@import 'required'; -@import 'identity-style-guide/dist/assets/scss/packages/required'; -@import 'design-system-waiting-room'; -@import 'identity-style-guide/dist/assets/scss/packages/global'; -@import 'identity-style-guide/dist/assets/scss/packages/components'; -@import 'components/all'; -@import 'identity-style-guide/dist/assets/scss/packages/utilities'; -@import 'utilities/all'; -@import 'print'; +@forward 'required'; +@forward 'uswds'; +@forward 'design-system-waiting-room'; +@forward 'components/all'; +@forward 'utilities/all'; +@forward 'print'; diff --git a/app/assets/stylesheets/components/_account-header.scss b/app/assets/stylesheets/components/_account-header.scss index 66a1a7fb2e6..578e8587e33 100644 --- a/app/assets/stylesheets/components/_account-header.scss +++ b/app/assets/stylesheets/components/_account-header.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + .account-header__badges { @include at-media-max('tablet') { @include u-pin-x; diff --git a/app/assets/stylesheets/components/_alert.scss b/app/assets/stylesheets/components/_alert.scss index 9fe7191669d..506cafceb76 100644 --- a/app/assets/stylesheets/components/_alert.scss +++ b/app/assets/stylesheets/components/_alert.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + .usa-alert--info-important { @include u-bg('accent-cool-darker'); color: color('white'); @@ -27,3 +29,8 @@ .usa-alert__text > p:last-child { margin-bottom: 0; } + +// Upstream fix: https://github.com/uswds/uswds/pull/5187 +.usa-alert .usa-alert__body::before { + height: units(2); +} diff --git a/app/assets/stylesheets/components/_banner.scss b/app/assets/stylesheets/components/_banner.scss index 3a3fc6a8876..5fdca668e76 100644 --- a/app/assets/stylesheets/components/_banner.scss +++ b/app/assets/stylesheets/components/_banner.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + .usa-banner__inner { @include at-media('tablet') { justify-content: center; diff --git a/app/assets/stylesheets/components/_block-link.scss b/app/assets/stylesheets/components/_block-link.scss index 0b370bbfd8d..52fd59731a9 100644 --- a/app/assets/stylesheets/components/_block-link.scss +++ b/app/assets/stylesheets/components/_block-link.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + .block-link { @include u-position('relative'); @include u-display('block'); diff --git a/app/assets/stylesheets/components/_btn.scss b/app/assets/stylesheets/components/_btn.scss index ef7815d1b7c..40a40929554 100644 --- a/app/assets/stylesheets/components/_btn.scss +++ b/app/assets/stylesheets/components/_btn.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + .usa-button { // Temporary: To be backported to design system. Margins should be applied at the button element, // or at the very least (a) we don't want the margins to offset full-width buttons on mobile, and diff --git a/app/assets/stylesheets/components/_card.scss b/app/assets/stylesheets/components/_card.scss index 116d9f274dc..da275bb1d68 100644 --- a/app/assets/stylesheets/components/_card.scss +++ b/app/assets/stylesheets/components/_card.scss @@ -1,3 +1,6 @@ +@use 'uswds-core' as *; +@use '../variables/app' as *; + .card { background-color: color('white'); max-width: $container-skinny-width; diff --git a/app/assets/stylesheets/components/_code.scss b/app/assets/stylesheets/components/_code.scss new file mode 100644 index 00000000000..23e7a0d549b --- /dev/null +++ b/app/assets/stylesheets/components/_code.scss @@ -0,0 +1,7 @@ +@use 'uswds-core' as *; + +code { + font-size: 0.875rem; + background-color: #fafafa; + border-radius: border-radius('sm'); +} diff --git a/app/assets/stylesheets/components/_file-input.scss b/app/assets/stylesheets/components/_file-input.scss index a313b69dc97..a8c626ef081 100644 --- a/app/assets/stylesheets/components/_file-input.scss +++ b/app/assets/stylesheets/components/_file-input.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + // =============================================== // Pending upstream Login Design System revisions: // =============================================== diff --git a/app/assets/stylesheets/components/_footer.scss b/app/assets/stylesheets/components/_footer.scss index a72e951a516..fe1bb21e5f0 100644 --- a/app/assets/stylesheets/components/_footer.scss +++ b/app/assets/stylesheets/components/_footer.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + html, body { height: 100%; diff --git a/app/assets/stylesheets/components/_form-steps.scss b/app/assets/stylesheets/components/_form-steps.scss index a00777b8dfe..a083b1e02e5 100644 --- a/app/assets/stylesheets/components/_form-steps.scss +++ b/app/assets/stylesheets/components/_form-steps.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + .form-steps__focus-anchor[tabindex='-1']:focus { outline: none; diff --git a/app/assets/stylesheets/components/_form.scss b/app/assets/stylesheets/components/_form.scss index 8c2e7599494..3720422d42c 100644 --- a/app/assets/stylesheets/components/_form.scss +++ b/app/assets/stylesheets/components/_form.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { /* stylelint-disable-next-line property-no-vendor-prefix */ @@ -11,7 +13,6 @@ input::-webkit-inner-spin-button { .usa-form-group--error { border-left-style: none; - margin-top: units(3); // Remove after: https://github.com/uswds/uswds/issues/4189 padding-left: 0; @include at-media('desktop') { diff --git a/app/assets/stylesheets/components/_full-screen.scss b/app/assets/stylesheets/components/_full-screen.scss index bac859c1c90..17f229fcc5b 100644 --- a/app/assets/stylesheets/components/_full-screen.scss +++ b/app/assets/stylesheets/components/_full-screen.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + .has-full-screen-overlay { overflow: hidden; } diff --git a/app/assets/stylesheets/components/_hr.scss b/app/assets/stylesheets/components/_hr.scss index aecfc015677..70c57ce0aa8 100644 --- a/app/assets/stylesheets/components/_hr.scss +++ b/app/assets/stylesheets/components/_hr.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + hr { border: 0; border-bottom: 1px solid color('primary-light'); diff --git a/app/assets/stylesheets/components/_icon.scss b/app/assets/stylesheets/components/_icon.scss index 2e464637836..05b22f6a71d 100644 --- a/app/assets/stylesheets/components/_icon.scss +++ b/app/assets/stylesheets/components/_icon.scss @@ -1,3 +1,6 @@ +@use 'uswds-core' as *; +@use '../variables/app' as *; + $icon-min-padding: 2px; // Upstream: https://github.com/uswds/uswds/pull/4493 diff --git a/app/assets/stylesheets/components/_language-picker.scss b/app/assets/stylesheets/components/_language-picker.scss index 3d8037993d5..e6d14f6823b 100644 --- a/app/assets/stylesheets/components/_language-picker.scss +++ b/app/assets/stylesheets/components/_language-picker.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + .language-picker { position: relative; width: auto; @@ -64,10 +66,10 @@ } &::after { - background-image: url(identity-style-guide/dist/assets/img/angle-arrow-up.svg); + background-image: url(@18f/identity-design-system/dist/assets/img/angle-arrow-up.svg); @include at-media('tablet') { - background-image: url(identity-style-guide/dist/assets/img/angle-arrow-up-white.svg); + background-image: url(@18f/identity-design-system/dist/assets/img/angle-arrow-up-white.svg); } } } @@ -77,7 +79,7 @@ color: color('white'); &::after { - background-image: url(identity-style-guide/dist/assets/img/angle-arrow-down-white.svg); + background-image: url(@18f/identity-design-system/dist/assets/img/angle-arrow-down-white.svg); } } } diff --git a/app/assets/stylesheets/components/_memorable-date.scss b/app/assets/stylesheets/components/_memorable-date.scss index 6c353de0045..5f4dc92c801 100644 --- a/app/assets/stylesheets/components/_memorable-date.scss +++ b/app/assets/stylesheets/components/_memorable-date.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + .usa-memorable-date input[type='text'] { @include u-padding-x(1); } diff --git a/app/assets/stylesheets/components/_modal.scss b/app/assets/stylesheets/components/_modal.scss index e70f729faa8..7611bc77fc0 100644 --- a/app/assets/stylesheets/components/_modal.scss +++ b/app/assets/stylesheets/components/_modal.scss @@ -1,3 +1,6 @@ +@use 'uswds-core' as *; +@use '../variables/app' as *; + .usa-modal-overlay { // Temporary styles to avoid inheriting too much of the USWDS opinionated modal styling until // modal styles are settled in the Login.gov Design System. @@ -6,9 +9,6 @@ align-items: start; justify-content: center; - // Pending upstream Login Design System revision: - background: rgba(color('base-darker'), 50%); - @include at-media('tablet') { align-items: center; } diff --git a/app/assets/stylesheets/components/_nav.scss b/app/assets/stylesheets/components/_nav.scss index 9ee550f61a6..eda03137337 100644 --- a/app/assets/stylesheets/components/_nav.scss +++ b/app/assets/stylesheets/components/_nav.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + .page-header--basic { @include u-flex('align-center', 'justify-center'); @include u-display('flex'); @@ -10,8 +12,19 @@ } .sidenav-mobile .usa-nav__close { - @include add-background-svg('close-blue-60v-alt'); + @include add-background-svg('close-primary'); @include u-square(6); background-position: center center; background-repeat: no-repeat; } + +@media (prefers-reduced-motion) { + // The design system should be responsible for disabling inessential animations when user prefers + // reduced motion. This is not currently implemented, but the style is implemented ad hoc here + // for use in feature specs (see BrowserEmulationHelper#emulate_reduced_motion). + // + // Upstream issue: https://github.com/uswds/uswds/issues/5256 + .usa-nav.is-visible { + animation: none; + } +} diff --git a/app/assets/stylesheets/components/_one-time-code-input.scss b/app/assets/stylesheets/components/_one-time-code-input.scss index 709714730f9..6bbf026d0e2 100644 --- a/app/assets/stylesheets/components/_one-time-code-input.scss +++ b/app/assets/stylesheets/components/_one-time-code-input.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + lg-one-time-code-input { display: block; diff --git a/app/assets/stylesheets/components/_page-heading.scss b/app/assets/stylesheets/components/_page-heading.scss index 3edf953d8a5..c71999ea2fe 100644 --- a/app/assets/stylesheets/components/_page-heading.scss +++ b/app/assets/stylesheets/components/_page-heading.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + .page-heading { @include u-margin-top(0); @include u-margin-bottom(2); diff --git a/app/assets/stylesheets/components/_password-toggle.scss b/app/assets/stylesheets/components/_password-toggle.scss index 469b26d5cb3..13f472f8ed8 100644 --- a/app/assets/stylesheets/components/_password-toggle.scss +++ b/app/assets/stylesheets/components/_password-toggle.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + lg-password-toggle { display: block; diff --git a/app/assets/stylesheets/components/_password.scss b/app/assets/stylesheets/components/_password.scss index 741656eece5..9b537c3e1fb 100644 --- a/app/assets/stylesheets/components/_password.scss +++ b/app/assets/stylesheets/components/_password.scss @@ -1,4 +1,4 @@ -// password strength module +@use 'uswds-core' as *; $weak: #e80e0e; $average: #ffac00; diff --git a/app/assets/stylesheets/components/_personal-key.scss b/app/assets/stylesheets/components/_personal-key.scss index 3dcf488795b..27d55bc560e 100644 --- a/app/assets/stylesheets/components/_personal-key.scss +++ b/app/assets/stylesheets/components/_personal-key.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + .personal-key-block { @include u-padding-y(2); background-image: url('personal-key/pkey-block.svg'); diff --git a/app/assets/stylesheets/components/_phone-input.scss b/app/assets/stylesheets/components/_phone-input.scss index 6cea19c5b13..07f0e973b95 100644 --- a/app/assets/stylesheets/components/_phone-input.scss +++ b/app/assets/stylesheets/components/_phone-input.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + lg-phone-input { display: block; diff --git a/app/assets/stylesheets/components/_profile-section.scss b/app/assets/stylesheets/components/_profile-section.scss index 05472dafb6e..497c10edf9e 100644 --- a/app/assets/stylesheets/components/_profile-section.scss +++ b/app/assets/stylesheets/components/_profile-section.scss @@ -1,3 +1,6 @@ +@use 'uswds-core' as *; +@use '../variables/app' as *; + .profile-info-box { border: 0; border-radius: 0; diff --git a/app/assets/stylesheets/components/_spinner-button.scss b/app/assets/stylesheets/components/_spinner-button.scss index 467521ae8cf..5d931537a15 100644 --- a/app/assets/stylesheets/components/_spinner-button.scss +++ b/app/assets/stylesheets/components/_spinner-button.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + lg-spinner-button { display: block; diff --git a/app/assets/stylesheets/components/_step-indicator.scss b/app/assets/stylesheets/components/_step-indicator.scss index c56e753d614..95a3835e984 100644 --- a/app/assets/stylesheets/components/_step-indicator.scss +++ b/app/assets/stylesheets/components/_step-indicator.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + $step-indicator-current-step-border-width: 3px; $step-indicator-line-height: 4px; diff --git a/app/assets/stylesheets/components/_tag.scss b/app/assets/stylesheets/components/_tag.scss deleted file mode 100644 index 155568cfb7a..00000000000 --- a/app/assets/stylesheets/components/_tag.scss +++ /dev/null @@ -1,13 +0,0 @@ -// =============================================== -// Pending upstream Login Design System revisions: -// =============================================== - -.usa-tag { - display: inline-block; - text-transform: none; - font-weight: bold; -} - -.usa-tag--informative { - @include u-bg('accent-cool-darker'); -} diff --git a/app/assets/stylesheets/components/_troubleshooting-options.scss b/app/assets/stylesheets/components/_troubleshooting-options.scss index 41a823e9440..61a965b589b 100644 --- a/app/assets/stylesheets/components/_troubleshooting-options.scss +++ b/app/assets/stylesheets/components/_troubleshooting-options.scss @@ -1,3 +1,6 @@ +@use 'uswds-core' as *; +@use '../utilities/typography' as *; + .troubleshooting-options { @include u-margin-y(4); diff --git a/app/assets/stylesheets/components/all.scss b/app/assets/stylesheets/components/all.scss index 951a5fd3e18..8e5f74236e7 100644 --- a/app/assets/stylesheets/components/all.scss +++ b/app/assets/stylesheets/components/all.scss @@ -5,6 +5,7 @@ @import 'block-link'; @import 'btn'; @import 'card'; +@import 'code'; @import 'click-observer'; @import 'file-input'; @import 'form-steps'; @@ -28,6 +29,5 @@ @import 'spinner-button'; @import 'spinner-dots'; @import 'step-indicator'; -@import 'tag'; @import 'troubleshooting-options'; @import 'memorable-date'; diff --git a/app/assets/stylesheets/document-capture.css.scss b/app/assets/stylesheets/document-capture.css.scss index 5fc7f686456..e96206b0dd6 100644 --- a/app/assets/stylesheets/document-capture.css.scss +++ b/app/assets/stylesheets/document-capture.css.scss @@ -1,2 +1,2 @@ -@import 'required'; -@import '../../javascript/packages/document-capture/styles'; +@forward 'required'; +@forward '../../javascript/packages/document-capture/styles'; diff --git a/app/assets/stylesheets/email.css.scss b/app/assets/stylesheets/email.css.scss index 84102adbf4b..3c3c523cb0e 100644 --- a/app/assets/stylesheets/email.css.scss +++ b/app/assets/stylesheets/email.css.scss @@ -1,7 +1,8 @@ -@import 'required'; +@forward 'required'; +@use 'uswds-core' as *; +@import 'variables/app'; @import 'variables/email'; @import 'foundation-emails/scss/foundation-emails'; -@import 'identity-style-guide/dist/assets/scss/packages/required'; .gray { &:active, diff --git a/app/assets/stylesheets/utilities/_background.scss b/app/assets/stylesheets/utilities/_background.scss index 9265d8de4a6..9fb4e2f9211 100644 --- a/app/assets/stylesheets/utilities/_background.scss +++ b/app/assets/stylesheets/utilities/_background.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + @include at-media('tablet') { /* stylelint-disable-next-line selector-class-pattern */ .tablet\:bg-primary-lighter { diff --git a/app/assets/stylesheets/utilities/_border.scss b/app/assets/stylesheets/utilities/_border.scss index 9cbf075ca4c..fff06e145e0 100644 --- a/app/assets/stylesheets/utilities/_border.scss +++ b/app/assets/stylesheets/utilities/_border.scss @@ -1,3 +1,5 @@ +@use '../variables/app' as *; + .rounded-xl { border-radius: $border-radius-xl; } diff --git a/app/assets/stylesheets/utilities/_typography.scss b/app/assets/stylesheets/utilities/_typography.scss index 3b5b0307f32..3b52fa8b0f4 100644 --- a/app/assets/stylesheets/utilities/_typography.scss +++ b/app/assets/stylesheets/utilities/_typography.scss @@ -1,3 +1,6 @@ +@use 'uswds-core' as *; +@use '../variables/app' as *; + body { -webkit-font-smoothing: antialiased; } diff --git a/app/assets/stylesheets/utilities/_util.scss b/app/assets/stylesheets/utilities/_util.scss index ab017797ef5..804be19afaa 100644 --- a/app/assets/stylesheets/utilities/_util.scss +++ b/app/assets/stylesheets/utilities/_util.scss @@ -1,4 +1,4 @@ -// supplemental utility classes +@use 'uswds-core' as *; html.no-js .js { display: none; diff --git a/app/assets/stylesheets/variables/_vendor.scss b/app/assets/stylesheets/variables/_vendor.scss deleted file mode 100644 index d1bb16c2ed2..00000000000 --- a/app/assets/stylesheets/variables/_vendor.scss +++ /dev/null @@ -1,20 +0,0 @@ -$theme-body-font-size: 'sm'; -$theme-font-path: '.'; -$theme-image-path: 'identity-style-guide/dist/assets/img'; -$theme-global-border-box-sizing: true; -$theme-global-link-styles: true; -$theme-grid-container-max-width: 'tablet-lg'; -$theme-header-min-width: 'tablet'; -$theme-link-visited-color: 'primary'; -$theme-style-body-element: true; -$theme-utility-breakpoints: ( - 'card': false, - 'card-lg': false, - 'mobile': false, - 'mobile-lg': false, - 'tablet': true, - 'tablet-lg': false, - 'desktop': false, - 'desktop-lg': false, - 'widescreen': false, -); diff --git a/app/helpers/asset_helper.rb b/app/helpers/asset_helper.rb index 3fb76b7456b..4a4d013ca9c 100644 --- a/app/helpers/asset_helper.rb +++ b/app/helpers/asset_helper.rb @@ -1,5 +1,5 @@ module AssetHelper - DESIGN_SYSTEM_ASSET_ROOT = 'identity-style-guide/dist/assets'.freeze + DESIGN_SYSTEM_ASSET_ROOT = '@18f/identity-design-system/dist/assets'.freeze def design_system_asset_path(path) File.join(DESIGN_SYSTEM_ASSET_ROOT, path) diff --git a/app/helpers/script_helper.rb b/app/helpers/script_helper.rb index 2a25870c853..1f7ba137b16 100644 --- a/app/helpers/script_helper.rb +++ b/app/helpers/script_helper.rb @@ -39,7 +39,7 @@ def render_javascript_pack_once_tags(*names) private SAME_ORIGIN_ASSETS = %w[ - identity-style-guide/dist/assets/img/sprite.svg + @18f/identity-design-system/dist/assets/img/sprite.svg ].to_set.freeze def local_crossorigin_sources? diff --git a/app/javascript/packages/build-sass/get-error-sass-stack-paths.js b/app/javascript/packages/build-sass/get-error-sass-stack-paths.js index ec24c482b3c..e7044fcb776 100644 --- a/app/javascript/packages/build-sass/get-error-sass-stack-paths.js +++ b/app/javascript/packages/build-sass/get-error-sass-stack-paths.js @@ -4,15 +4,15 @@ * @example * ``` * getErrorSassStackPaths( - * 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/_functions.scss 35:8 divide()\n' + - * 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/mixins/_icon.scss 77:12 add-color-icon()\n' + + * 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/_functions.scss 35:8 divide()\n' + + * 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/mixins/_icon.scss 77:12 add-color-icon()\n' + * 'app/assets/stylesheets/components/_alert.scss 13:5 @import\n' + * 'app/assets/stylesheets/components/all.scss 3:9 @import\n' + * 'app/assets/stylesheets/application.css.scss 7:9 root stylesheet\n', * ); * // [ - * // 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/_functions.scss', - * // 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/mixins/_icon.scss', + * // 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/_functions.scss', + * // 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/mixins/_icon.scss', * // 'app/assets/stylesheets/components/_alert.scss', * // 'app/assets/stylesheets/components/all.scss', * // 'app/assets/stylesheets/application.css.scss', diff --git a/app/javascript/packages/build-sass/get-error-sass-stack-paths.spec.js b/app/javascript/packages/build-sass/get-error-sass-stack-paths.spec.js index e1d43c3e3b8..c27615993ac 100644 --- a/app/javascript/packages/build-sass/get-error-sass-stack-paths.spec.js +++ b/app/javascript/packages/build-sass/get-error-sass-stack-paths.spec.js @@ -3,16 +3,16 @@ import getErrorSassStackPaths from './get-error-sass-stack-paths.js'; describe('getErrorSassStackPaths', () => { it('returns an array of paths from a sass stack message', () => { const stackPaths = getErrorSassStackPaths( - 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/_functions.scss 35:8 divide()\n' + - 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/mixins/_icon.scss 77:12 add-color-icon()\n' + + 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/_functions.scss 35:8 divide()\n' + + 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/mixins/_icon.scss 77:12 add-color-icon()\n' + 'app/assets/stylesheets/components/_alert.scss 13:5 @import\n' + 'app/assets/stylesheets/components/all.scss 3:9 @import\n' + 'app/assets/stylesheets/application.css.scss 7:9 root stylesheet\n', ); expect(stackPaths).to.deep.equal([ - 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/_functions.scss', - 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/mixins/_icon.scss', + 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/_functions.scss', + 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/mixins/_icon.scss', 'app/assets/stylesheets/components/_alert.scss', 'app/assets/stylesheets/components/all.scss', 'app/assets/stylesheets/application.css.scss', @@ -22,16 +22,16 @@ describe('getErrorSassStackPaths', () => { context('with a stack path containing a space', () => { it('returns an array of paths from a sass stack message', () => { const stackPaths = getErrorSassStackPaths( - 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/_functions.scss 35:8 divide()\n' + - 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/mixins/_icon.scss 77:12 add-color-icon()\n' + + 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/_functions.scss 35:8 divide()\n' + + 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/mixins/_icon.scss 77:12 add-color-icon()\n' + 'app/assets/stylesheets/components/_alert example.scss 13:5 @import\n' + 'app/assets/stylesheets/components/all.scss 3:9 @import\n' + 'app/assets/stylesheets/application.css.scss 7:9 root stylesheet\n', ); expect(stackPaths).to.deep.equal([ - 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/_functions.scss', - 'node_modules/identity-style-guide/dist/assets/scss/uswds/core/mixins/_icon.scss', + 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/_functions.scss', + 'node_modules/@18f/identity-design-system/dist/assets/scss/uswds/core/mixins/_icon.scss', 'app/assets/stylesheets/components/_alert example.scss', 'app/assets/stylesheets/components/all.scss', 'app/assets/stylesheets/application.css.scss', diff --git a/app/javascript/packages/components/README.md b/app/javascript/packages/components/README.md index 99abc5b09c4..5f94e09d6f2 100644 --- a/app/javascript/packages/components/README.md +++ b/app/javascript/packages/components/README.md @@ -4,7 +4,7 @@ React components for common UI interactions. These components are intended to be reusable, whereas domain-specific React components should be found in the package corresponding to the specific page or feature. -Many of these components are React implementations for components of the [Login.gov Design System](https://github.com/18f/identity-style-guide). +Many of these components are React implementations for components of the [Login.gov Design System](https://github.com/18f/identity-design-system). ## Example diff --git a/app/javascript/packages/components/icon.tsx b/app/javascript/packages/components/icon.tsx index 887bafcf70b..5bd6d85083c 100644 --- a/app/javascript/packages/components/icon.tsx +++ b/app/javascript/packages/components/icon.tsx @@ -1,6 +1,6 @@ import { getAssetPath } from '@18f/identity-assets'; -const SPRITE_URL = getAssetPath('identity-style-guide/dist/assets/img/sprite.svg'); +const SPRITE_URL = getAssetPath('@18f/identity-design-system/dist/assets/img/sprite.svg'); export type DesignSystemIcon = | 'accessibility_new' diff --git a/app/javascript/packages/document-capture/components/acuant-capture.scss b/app/javascript/packages/document-capture/components/acuant-capture.scss index d02e8e8f6ba..2ed7922a445 100644 --- a/app/javascript/packages/document-capture/components/acuant-capture.scss +++ b/app/javascript/packages/document-capture/components/acuant-capture.scss @@ -1,3 +1,4 @@ +@use 'uswds-core' as *; @use 'sass:math'; .document-capture-acuant-capture { diff --git a/app/javascript/packages/document-capture/components/location-collection-item.scss b/app/javascript/packages/document-capture/components/location-collection-item.scss index 4ae9cf06257..aefbc37d3e9 100644 --- a/app/javascript/packages/document-capture/components/location-collection-item.scss +++ b/app/javascript/packages/document-capture/components/location-collection-item.scss @@ -1,3 +1,5 @@ +@use 'uswds-core' as *; + .location-collection-item { max-width: 64ex; list-style-type: none; diff --git a/app/javascript/packages/document-capture/styles.scss b/app/javascript/packages/document-capture/styles.scss index 7fad52a07e8..1bf22932693 100644 --- a/app/javascript/packages/document-capture/styles.scss +++ b/app/javascript/packages/document-capture/styles.scss @@ -1,4 +1,3 @@ -@import 'identity-style-guide/dist/assets/scss/packages/required'; @import './components/acuant-capture'; @import './components/acuant-capture-canvas'; @import './components/location-collection-item'; diff --git a/app/javascript/packs/application.ts b/app/javascript/packs/application.ts index 227b3ade7f2..6cd8cb725d5 100644 --- a/app/javascript/packs/application.ts +++ b/app/javascript/packs/application.ts @@ -1,4 +1,4 @@ -import { accordion, banner, skipnav } from 'identity-style-guide'; +import { accordion, banner, skipnav } from '@18f/identity-design-system'; const components = [accordion, banner, skipnav]; components.forEach((component) => component.on()); diff --git a/app/javascript/packs/navigation.ts b/app/javascript/packs/navigation.ts index 7bf8dffa242..804c024e86a 100644 --- a/app/javascript/packs/navigation.ts +++ b/app/javascript/packs/navigation.ts @@ -1,3 +1,3 @@ -import { navigation } from 'identity-style-guide'; +import { header } from '@18f/identity-design-system'; -navigation.on(); +header.on(); diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index cdf71bb54c9..65bfd2a6b24 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -64,7 +64,11 @@
<%= link_to t('shared.skip_link'), '#main-content', class: 'usa-skipnav' %> - <%= yield(:mobile_nav) if content_for?(:mobile_nav) %> + <% if content_for?(:mobile_nav) %> +