diff --git a/app/assets/stylesheets/_uswds-core.scss b/app/assets/stylesheets/_uswds-core.scss index 2da34521ec5..3f9d36d90d1 100644 --- a/app/assets/stylesheets/_uswds-core.scss +++ b/app/assets/stylesheets/_uswds-core.scss @@ -1,5 +1,6 @@ @forward '@18f/identity-design-system/packages/uswds-core' with ( $theme-body-font-size: 'sm', + $theme-button-icon-gap: 0.5, $theme-font-path: '', $theme-image-path: '', $theme-global-border-box-sizing: true, diff --git a/app/components/icon_component.scss b/app/components/icon_component.scss index 2591b1d1b9c..49b41ae68f8 100644 --- a/app/components/icon_component.scss +++ b/app/components/icon_component.scss @@ -7,23 +7,3 @@ mask-size: 100%; background-color: currentColor; } - -$icon-min-padding: 2px; - -// Upstream: https://github.com/uswds/uswds/pull/4493 -.usa-icon { - .usa-button > &:first-child { - // Note: This diverges from the upstream pull request in a couple ways: - // 1. There should not be any margins offsetting to account for line height, since Login.gov - // Design System normalizes button line height to 1. - // 2. Float is replaced by `vertical-align`, since otherwise it will have the effect of having - // the icon appear to the far edge of the button, rather than next to the text. - vertical-align: bottom; - margin-right: 0.25rem; - } - - .usa-button:not(.usa-button--unstyled) > &:first-child { - margin-left: -1 * $icon-min-padding; - margin-right: #{0.5rem - px-to-rem($icon-min-padding)}; - } -} diff --git a/app/components/tab_navigation_component.scss b/app/components/tab_navigation_component.scss index d9f2847755e..013eb6b4dda 100644 --- a/app/components/tab_navigation_component.scss +++ b/app/components/tab_navigation_component.scss @@ -2,19 +2,6 @@ @forward 'usa-button-group/src/styles'; -// Upstream: https://github.com/uswds/uswds/pull/5324 -.usa-button-group--segmented { - .usa-button { - @include u-display('flex'); - @include u-flex('align-center', 'justify-center'); - } - - .usa-button-group__item { - @include u-display('flex'); - @include grid-col('auto'); - } -} - .tab-navigation .usa-button-group--segmented { .usa-button-group__item { flex-basis: 50%; diff --git a/app/javascript/packages/clipboard-button/package.json b/app/javascript/packages/clipboard-button/package.json index 0d8a3265721..4ff9deff387 100644 --- a/app/javascript/packages/clipboard-button/package.json +++ b/app/javascript/packages/clipboard-button/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "private": true, "dependencies": { - "@18f/identity-design-system": "^9.0.0" + "@18f/identity-design-system": "^9.1.0" }, "sideEffects": [ "./clipboard-button-element.ts" diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 9f4331c6143..63716c5ae50 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,3 +1,7 @@ +<%= content_for(:head) do %> + <%= javascript_include_tag('init.js') %> +<% end %> + <%= extends_layout :base, body_class: local_assigns.fetch(:body_class, 'site tablet:bg-primary-lighter') do %> <%= link_to t('shared.skip_link'), '#main-content', class: 'usa-skipnav' %>
@@ -34,4 +38,6 @@ session_timeout_in: Devise.timeout_in, } %> <% end %> + + <%= javascript_packs_tag_once('application') %> <% end %> diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index 8af746f3dad..185e4c6e8e7 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -68,7 +68,6 @@ { type: 'application/json', data: { config: '' } }, false, ) %> - <%= javascript_packs_tag_once('application') %> <%= javascript_packs_tag_once('track-errors', async: true) if BrowserSupport.supported?(request.user_agent) %> <%= render_javascript_pack_once_tags %> diff --git a/app/views/shared/_banner.html.erb b/app/views/shared/_banner.html.erb index 80f4665c1f2..b8e8d57c21f 100644 --- a/app/views/shared/_banner.html.erb +++ b/app/views/shared/_banner.html.erb @@ -22,9 +22,6 @@
- <%= javascript_tag(nonce: true) do %> - document.getElementById('gov-banner').setAttribute('hidden', ''); - <% end %>
<%= image_tag( diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index ee4467c3b7c..f2deae0bf7a 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -11,4 +11,5 @@ 'node_modules/intl-tel-input/build/css', 'node_modules/@18f/identity-design-system/dist/assets/img', 'node_modules/@18f/identity-design-system/dist/assets/fonts', + 'node_modules/@18f/identity-design-system/dist/assets/js', ) diff --git a/package.json b/package.json index 0fdce421c18..163cf4a1ca9 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "build:css": "build-sass app/assets/stylesheets/*.css.scss app/components/*.scss --load-path=app/assets/stylesheets --out-dir=app/assets/builds" }, "dependencies": { - "@18f/identity-design-system": "^9.0.0", + "@18f/identity-design-system": "^9.1.0", "@babel/core": "^7.20.7", "@babel/preset-env": "^7.15.6", "@babel/preset-react": "^7.14.5", diff --git a/yarn.lock b/yarn.lock index 7debbb3409f..4d4d8566683 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,13 +2,13 @@ # yarn lockfile v1 -"@18f/identity-design-system@^9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@18f/identity-design-system/-/identity-design-system-9.0.0.tgz#d10756f79371fc379a0c45fb7517eb59325acd04" - integrity sha512-l1cdTlp6lHRnWypqDkXCDAfkQMGbgaU1LicLyNXxDZ5sAMskGxfR1dKC5Igt/JL05XbBs2kBzyLW/UHs+KkMow== +"@18f/identity-design-system@^9.1.0": + version "9.1.0" + resolved "https://registry.yarnpkg.com/@18f/identity-design-system/-/identity-design-system-9.1.0.tgz#745a6b18ea30fe6fd7f18ebcaca777a5d51bf139" + integrity sha512-8eQBP6fHi+0MQYJu7YCF7sPtxgwDvTjnhZ2vL4XDIgjMknDOOZeyUmPrhjsnT2pAXlE11hS/eBfUm7KE8rifKw== dependencies: - "@types/uswds__uswds" "^3.7.0" - "@uswds/uswds" "^3.7.1" + "@types/uswds__uswds" "^3.8.0" + "@uswds/uswds" "^3.8.0" "@aashutoshrathi/word-wrap@^1.2.3": version "1.2.6" @@ -1718,10 +1718,10 @@ dependencies: "@types/react-test-renderer" "*" -"@types/uswds__uswds@^3.7.0": - version "3.7.0" - resolved "https://registry.yarnpkg.com/@types/uswds__uswds/-/uswds__uswds-3.7.0.tgz#6ce7b3dbff304113f4e7acaa88fff4c771dfb02d" - integrity sha512-HlOhwJPLpmv3rC8IN81DmvnRvi9Qzsf7MdxlE1XCB+fsPqTakkrpLdDoQOL+9lcCOurt7VhBXClSi6ZCKskZHw== +"@types/uswds__uswds@^3.8.0": + version "3.8.0" + resolved "https://registry.yarnpkg.com/@types/uswds__uswds/-/uswds__uswds-3.8.0.tgz#f5e7e05b7f5a450a0dddf303fde765814b626d7b" + integrity sha512-bpM1KLaY7pNpLj7xlouMa+OSXeTCCNN56VJle+gacbyMG1XJXRfQIIihLVKnX7M+P70WZYMM8zXvVTrZzS5wog== "@types/wrap-ansi@^3.0.0": version "3.0.0" @@ -1890,10 +1890,10 @@ resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== -"@uswds/uswds@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@uswds/uswds/-/uswds-3.7.1.tgz#455dee2d7a9c7b316192bb2e21ecd0df6fad3085" - integrity sha512-32u2S50bf5dwIujebqL+f1Jgx2rmRrpxcaccSZzdo3Qv9HaDUdcmeavlrxHqN30edHc7p8kRPjvjevOmOJKB7w== +"@uswds/uswds@^3.8.0": + version "3.8.0" + resolved "https://registry.yarnpkg.com/@uswds/uswds/-/uswds-3.8.0.tgz#dba0b0b38182053779276f9ae6809474bd31d548" + integrity sha512-rMwCXe/u4HGkfskvS1Iuabapi/EXku3ChaIFW7y/dUhc7R1TXQhbbfp8YXEjmXPF0yqJnv9T08WPgS0fQqWZ8w== dependencies: classlist-polyfill "1.2.0" object-assign "4.1.1"