From d4de766cd87475fcc1a514e153cb04e60b44324b Mon Sep 17 00:00:00 2001 From: Kerry Powell <1776069+powellkerry@users.noreply.github.com> Date: Tue, 12 Nov 2024 10:42:23 -0700 Subject: [PATCH 1/7] Rename font-size-base to font-size-root, add source-sans-normalized with associated utility class --- .gitignore | 5 +++++ config/gulp/css.js | 8 ++++++++ src/_data/tokens/vads-font-primitive.csv | 3 ++- src/_data/tokens/vads-font-semantic.csv | 2 +- src/_data/tokens/vads.tokens.json | 19 +++++++++++++++++-- src/_foundation/utilities/html/font-size.html | 10 ++++++---- src/_includes/head.html | 1 + 7 files changed, 40 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index f1d2b06ed..912e02de3 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,11 @@ node_modules tmp_remote_assets src/.jekyll-cache src/assets/stylesheets/component-library.css +src/assets/stylesheets/core.css +src/assets/stylesheets/mobile-typography.css +src/assets/stylesheets/shame.css +src/assets/stylesheets/uswds-typography.css +src/assets/stylesheets/utilities.css src/formation.min.css src/vendor src/_data/component-docs.json diff --git a/config/gulp/css.js b/config/gulp/css.js index 6bd31cf47..ea67ccb94 100644 --- a/config/gulp/css.js +++ b/config/gulp/css.js @@ -17,6 +17,14 @@ gulp.task('copy-web-components-css', function (done) { return stream; }); +gulp.task('copy-css-library', function (done) { + console.log('copying web-components CSS'); + var stream = gulp.src('./node_modules/@department-of-veterans-affairs/css-library/dist/stylesheets/*.css') + .pipe(gulp.dest('src/assets/stylesheets/')); + + return stream; +}); + gulp.task(task, gulp.series( 'copy-formation-css', 'copy-web-components-css' diff --git a/src/_data/tokens/vads-font-primitive.csv b/src/_data/tokens/vads-font-primitive.csv index c49123259..42d7b1a2d 100644 --- a/src/_data/tokens/vads-font-primitive.csv +++ b/src/_data/tokens/vads-font-primitive.csv @@ -15,7 +15,8 @@ vads-font-line-length-5,Primitive,vads-size-line-length-5,,uswds-system-font-lin vads-font-line-length-6,Primitive,vads-size-line-length-6,88ex,uswds-system-font-line-length-6,88ex,From USWDS. vads-font-line-length-none,Primitive,vads-size-line-length-none,,uswds-system-font-line-length-none,none,From USWDS. vads-font-size-2xl,Primitive,vads-font-size-2xl,,uswds-system-font-size-14,40px, -vads-font-size-base,Primitive,vads-font-size-base,17px,uswds-system-font-size-6,17px, +vads-font-size-root,Primitive,vads-font-size-root,16px,uswds-system-font-size-6,16px, +vads-font-size-source-sans-normalized,Primitive,vads-font-size-source-sans-normalized,16.96px,uswds-system-font-size-7,16.96px, vads-font-size-lg,Primitive,vads-font-size-lg,,uswds-system-font-size-8,20px, vads-font-size-md,Primitive,vads-font-size-md,,uswds-system-font-size-6,17px, vads-font-size-sm,Primitive,vads-font-size-sm,,uswds-system-font-size-4,15px, diff --git a/src/_data/tokens/vads-font-semantic.csv b/src/_data/tokens/vads-font-semantic.csv index 8c97fc44a..72b3831aa 100644 --- a/src/_data/tokens/vads-font-semantic.csv +++ b/src/_data/tokens/vads-font-semantic.csv @@ -6,7 +6,7 @@ vads-font-size-body-large,Semantic,vads-font-size-body-large,uswds-system-font-s vads-font-size-body-lead,Semantic,vads-font-size-body-lead,,,vads-font-size-body-large,Lead font size for body text. For lead paragraphs.,20px vads-font-size-body-medium,Semantic,vads-font-size-body-medium,uswds-system-font-size-6,17px,,Medium body font size, vads-font-size-body-small,Semantic,vads-font-size-body-small,uswds-system-font-size-4,15px,,Smallest body font size, -vads-font-size-eyebrow,Semantic,vads-font-size-eyebrow,,,vads-font-size-base,Eyebrow is an experimental request which adds type above an h1.,17px +vads-font-size-eyebrow,Semantic,vads-font-size-eyebrow,,,vads-font-size-root,Eyebrow is an experimental request which adds type above an h1.,16px vads-font-size-heading-level-1,Semantic,vads-font-size-heading-level-1,uswds-system-font-size-14,40px,,Heading level 1. h1 value., vads-font-size-heading-level-2,Semantic,vads-font-size-heading-level-2,uswds-system-font-size-12,32px,,Heading level 2. h2 value. Was 30px, vads-font-size-heading-level-3,Semantic,vads-font-size-heading-level-3,uswds-system-font-size-8,20px,,Heading level 3. h3 value., diff --git a/src/_data/tokens/vads.tokens.json b/src/_data/tokens/vads.tokens.json index 225267d12..0ecbe42fc 100644 --- a/src/_data/tokens/vads.tokens.json +++ b/src/_data/tokens/vads.tokens.json @@ -2814,7 +2814,7 @@ } } }, - "vads-font-size-base": { + "vads-font-size-root": { "type": "dimension", "value": "{uswds.font.size.uswds-system-font-size-6}", "extensions": { @@ -2829,6 +2829,21 @@ } } }, + "vads-u-font-size--source-sans-normalized": { + "type": "dimension", + "value": "{uswds.font.size.uswds-system-font-size-7}", + "extensions": { + "org.lukasoppermann.figmaDesignTokens": { + "mode": "Value", + "collection": "vads-primitives", + "scopes": [ + "ALL_SCOPES" + ], + "variableId": "VariableID:562:4293", + "exportKey": "variables" + } + } + }, "vads-font-size-lg": { "type": "dimension", "value": "{uswds.font.size.uswds-system-font-size-8}", @@ -3228,7 +3243,7 @@ }, "vads-label-font-size": { "type": "color", - "value": "{vads-primitives.font.size.vads-font-size-base}", + "value": "{vads-primitives.font.size.vads-font-size-root}", "extensions": { "org.lukasoppermann.figmaDesignTokens": { "mode": "Mode 1", diff --git a/src/_foundation/utilities/html/font-size.html b/src/_foundation/utilities/html/font-size.html index 7bdb6d7f9..70bebf187 100644 --- a/src/_foundation/utilities/html/font-size.html +++ b/src/_foundation/utilities/html/font-size.html @@ -1,17 +1,19 @@

Sizing by name

-
+

15px .vads-u-font-size--sm

-

16px .vads-u-font-size--base

+

16px .vads-u-font-size--root

+

 

17px .vads-u-font-size--md

20px .vads-u-font-size--lg

30px .vads-u-font-size--xl

40px .vads-u-font-size--2xl

-
+

15px .vads-u-font-size--sm

-

16px .vads-u-font-size--base

+

16px .vads-u-font-size--root

+

16.96px .vads-u-font-size--source-sans-normalized

17px .vads-u-font-size--md

20px .vads-u-font-size--lg

30px .vads-u-font-size--xl

diff --git a/src/_includes/head.html b/src/_includes/head.html index e4c75c7a3..2526a15fb 100644 --- a/src/_includes/head.html +++ b/src/_includes/head.html @@ -37,6 +37,7 @@ + From 8a9a78387c8e9a346243ceb8866c95d40fd4110e Mon Sep 17 00:00:00 2001 From: Kerry Powell <1776069+powellkerry@users.noreply.github.com> Date: Thu, 14 Nov 2024 08:23:16 -0700 Subject: [PATCH 2/7] Update src/_data/tokens/vads-font-primitive.csv Co-authored-by: Micah Chiang --- src/_data/tokens/vads-font-primitive.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_data/tokens/vads-font-primitive.csv b/src/_data/tokens/vads-font-primitive.csv index 42d7b1a2d..ce7b2b4f0 100644 --- a/src/_data/tokens/vads-font-primitive.csv +++ b/src/_data/tokens/vads-font-primitive.csv @@ -15,7 +15,7 @@ vads-font-line-length-5,Primitive,vads-size-line-length-5,,uswds-system-font-lin vads-font-line-length-6,Primitive,vads-size-line-length-6,88ex,uswds-system-font-line-length-6,88ex,From USWDS. vads-font-line-length-none,Primitive,vads-size-line-length-none,,uswds-system-font-line-length-none,none,From USWDS. vads-font-size-2xl,Primitive,vads-font-size-2xl,,uswds-system-font-size-14,40px, -vads-font-size-root,Primitive,vads-font-size-root,16px,uswds-system-font-size-6,16px, +font-size-root,Primitive,font-size-root,16px,uswds-system-font-size-6,16px, vads-font-size-source-sans-normalized,Primitive,vads-font-size-source-sans-normalized,16.96px,uswds-system-font-size-7,16.96px, vads-font-size-lg,Primitive,vads-font-size-lg,,uswds-system-font-size-8,20px, vads-font-size-md,Primitive,vads-font-size-md,,uswds-system-font-size-6,17px, From 07653f70de4ff26a821c6a2009e72e523d0ce77c Mon Sep 17 00:00:00 2001 From: Kerry Powell <1776069+powellkerry@users.noreply.github.com> Date: Thu, 14 Nov 2024 08:25:13 -0700 Subject: [PATCH 3/7] Update src/_foundation/utilities/html/font-size.html Co-authored-by: Micah Chiang --- src/_foundation/utilities/html/font-size.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_foundation/utilities/html/font-size.html b/src/_foundation/utilities/html/font-size.html index 70bebf187..b0165f0ab 100644 --- a/src/_foundation/utilities/html/font-size.html +++ b/src/_foundation/utilities/html/font-size.html @@ -12,7 +12,7 @@

Sizing by name

15px .vads-u-font-size--sm

-

16px .vads-u-font-size--root

+

16px .vads-u-font-size--base

16.96px .vads-u-font-size--source-sans-normalized

17px .vads-u-font-size--md

20px .vads-u-font-size--lg

From 960dbf6807af30a9de815ec3971db7efe1cf1f37 Mon Sep 17 00:00:00 2001 From: Kerry Powell <1776069+powellkerry@users.noreply.github.com> Date: Thu, 14 Nov 2024 09:32:17 -0700 Subject: [PATCH 4/7] Fix issue with css-library css not copying --- config/gulp/css.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/gulp/css.js b/config/gulp/css.js index ea67ccb94..3e3353edc 100644 --- a/config/gulp/css.js +++ b/config/gulp/css.js @@ -18,7 +18,7 @@ gulp.task('copy-web-components-css', function (done) { }); gulp.task('copy-css-library', function (done) { - console.log('copying web-components CSS'); + console.log('copying css-library CSS'); var stream = gulp.src('./node_modules/@department-of-veterans-affairs/css-library/dist/stylesheets/*.css') .pipe(gulp.dest('src/assets/stylesheets/')); @@ -27,5 +27,6 @@ gulp.task('copy-css-library', function (done) { gulp.task(task, gulp.series( 'copy-formation-css', - 'copy-web-components-css' + 'copy-web-components-css', + 'copy-css-library' )); From e523d8e9ef015d6d87490f6fc1772d9ee0661489 Mon Sep 17 00:00:00 2001 From: Kerry Powell <1776069+powellkerry@users.noreply.github.com> Date: Thu, 14 Nov 2024 09:33:15 -0700 Subject: [PATCH 5/7] standardize naming --- config/gulp/css.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/gulp/css.js b/config/gulp/css.js index 3e3353edc..5d18ffe21 100644 --- a/config/gulp/css.js +++ b/config/gulp/css.js @@ -17,7 +17,7 @@ gulp.task('copy-web-components-css', function (done) { return stream; }); -gulp.task('copy-css-library', function (done) { +gulp.task('copy-css-library-css', function (done) { console.log('copying css-library CSS'); var stream = gulp.src('./node_modules/@department-of-veterans-affairs/css-library/dist/stylesheets/*.css') .pipe(gulp.dest('src/assets/stylesheets/')); @@ -28,5 +28,5 @@ gulp.task('copy-css-library', function (done) { gulp.task(task, gulp.series( 'copy-formation-css', 'copy-web-components-css', - 'copy-css-library' + 'copy-css-library-css' )); From 37a5267aa2a2c2e72277db5ba45586a979ee3402 Mon Sep 17 00:00:00 2001 From: Kerry Powell <1776069+powellkerry@users.noreply.github.com> Date: Mon, 18 Nov 2024 13:17:41 -0700 Subject: [PATCH 6/7] update component-library packages --- package.json | 7 ++++--- yarn.lock | 40 +++++++++++++++++++--------------------- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 1b72c5ee7..0aec675e3 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/department-of-veterans-affairs/vets-design-system-documentation#readme", "devDependencies": { - "@department-of-veterans-affairs/component-library": "^47.1.0", + "@department-of-veterans-affairs/component-library": "^48.0.2", "gulp": "^4.0.2", "gulp-clean": "^0.4.0", "gulp-rename": "^2.0.0", @@ -38,9 +38,10 @@ }, "dependencies": { "@department-of-veterans-affairs/formation": "^11.0.12", - "@department-of-veterans-affairs/css-library": "^0.12.2" + "@department-of-veterans-affairs/css-library": "^0.15.0" }, "engines": { "npm": "6.14.8" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/yarn.lock b/yarn.lock index 117f96e00..baf60766d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,25 +9,25 @@ dependencies: regenerator-runtime "^0.14.0" -"@department-of-veterans-affairs/component-library@^47.1.0": - version "47.1.0" - resolved "https://registry.yarnpkg.com/@department-of-veterans-affairs/component-library/-/component-library-47.1.0.tgz#2162d343b38614057632af42e444c658bf68d908" - integrity sha512-ZKTDY8kiQ3F3i3hL3OLQ+fyv9B4Xi1qQkUnBegu8TC6KjXDNed3PxAuVO+5iJXYi604cgBW72gXYZYbi63ITFQ== +"@department-of-veterans-affairs/component-library@^48.0.2": + version "48.0.2" + resolved "https://registry.yarnpkg.com/@department-of-veterans-affairs/component-library/-/component-library-48.0.2.tgz#01e9a25430c27cfbb67ebffb7b7ec15bf254dfe6" + integrity sha512-2lUryYdaxeP08Z9mT/wYoTsm2rxic5tSdivmp4P3Rg9AT3hvA397TkDYS6Jvvuo5f4bLg0+mOXOI8+aEI0dy4Q== dependencies: "@department-of-veterans-affairs/react-components" "28.1.0" - "@department-of-veterans-affairs/web-components" "15.1.0" + "@department-of-veterans-affairs/web-components" "16.0.2" i18next "^21.6.14" i18next-browser-languagedetector "^6.1.4" react-focus-on "^3.5.1" react-transition-group "^1.0.0" -"@department-of-veterans-affairs/css-library@^0.12.2": - version "0.12.2" - resolved "https://registry.yarnpkg.com/@department-of-veterans-affairs/css-library/-/css-library-0.12.2.tgz#da2554d1d71c1927b7462fa70d9cc8b482f8206e" - integrity sha512-nkrgeEGPWLEuoAfCdfFFPNIWIc9BDnxXZZ3HxZrKjL3yIAgNZYB+gm02JbYUHNXZZfXdfHxseaBY4M5C+Z3Iqg== +"@department-of-veterans-affairs/css-library@^0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@department-of-veterans-affairs/css-library/-/css-library-0.15.0.tgz#22aa45ab093c32fb492e7537c287aca28fed4f09" + integrity sha512-JhOUMHpEsuX6echHZEtOOMXa8ULSBR6nqf5HlaXdAnPG/B4kfNNII6VEXXvByuavGVduaL7N0u1LpEpdVlDGig== dependencies: "@divriots/style-dictionary-to-figma" "^0.4.0" - "@uswds/uswds" "^3.8.1" + "@uswds/uswds" "^3.9.0" rimraf "^5.0.5" "@department-of-veterans-affairs/formation@^11.0.12": @@ -51,12 +51,11 @@ react-transition-group "1" recast "^0.14.4" -"@department-of-veterans-affairs/web-components@15.1.0": - version "15.1.0" - resolved "https://registry.yarnpkg.com/@department-of-veterans-affairs/web-components/-/web-components-15.1.0.tgz#ec0a6952a591f9ed0a7d3ddea2211047a3471d71" - integrity sha512-/kUPjVJb+Ira1rekD3suBNDJqYFzW1rsF5xT6d2NLe58kY6JnbMV+/w9KH1fG1uCIaXV5RaKVK0bDjSjMhRxAw== +"@department-of-veterans-affairs/web-components@16.0.2": + version "16.0.2" + resolved "https://registry.yarnpkg.com/@department-of-veterans-affairs/web-components/-/web-components-16.0.2.tgz#d278ad7572220fcf0767944cf6abb73211e22300" + integrity sha512-W3uXYDtIJa//kUVOZqosYHMx54PPVgzwWQtThw/AbdwjGTFWh6p+4DFc+BBpE0j8pRFjgFxtaT01iDPloTRWqg== dependencies: - "@department-of-veterans-affairs/css-library" "^0.12.2" "@stencil/core" "4.20.0" aria-hidden "^1.1.3" body-scroll-lock "^4.0.0-beta.0" @@ -96,12 +95,11 @@ resolved "https://registry.yarnpkg.com/@stencil/core/-/core-4.20.0.tgz#221f2b36ab999891560449b02d6915862c435f49" integrity sha512-WPrTHFngvN081RY+dJPneKQLwnOFD60OMCOQGmmSHfCW0f4ujPMzzhwWU1gcSwXPWXz5O+8cBiiCaxAbJU7kAg== -"@uswds/uswds@^3.8.1": - version "3.8.2" - resolved "https://registry.npmjs.org/@uswds/uswds/-/uswds-3.8.2.tgz#230668293c33f6866995ba9d03d6f42aba251336" - integrity sha512-8sTx/GqlbTwSIK+0AFOGrYdaW1rKVB7Bp0+v9AMVt3I5vPK7CL0+I6vlclSf3U7ysJZeTTdkNS8q89sIAeL+AA== +"@uswds/uswds@^3.9.0": + version "3.10.0" + resolved "https://registry.yarnpkg.com/@uswds/uswds/-/uswds-3.10.0.tgz#f78ab69e26dec0080a92845b3dd1d9ddab26e6e9" + integrity sha512-LWFTQzp4e3kqtnD/Wsyfx9uGTkn5GEpzhscNWJMIsdWBGKtiu96QT99oRJUmcsB6HbGhR0Th0FtlK/Zzx2WghA== dependencies: - object-assign "4.1.1" receptor "1.0.0" resolve-id-refs "0.1.0" @@ -1898,7 +1896,7 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== -object-assign@4.1.1, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== From bbbe9ef7d4d0683b6d52ed140405fec3bf4de58a Mon Sep 17 00:00:00 2001 From: Kerry Powell <1776069+powellkerry@users.noreply.github.com> Date: Mon, 18 Nov 2024 13:45:06 -0700 Subject: [PATCH 7/7] resolve undefined variable --- src/assets/stylesheets/_layout/_content-wrappers.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/stylesheets/_layout/_content-wrappers.scss b/src/assets/stylesheets/_layout/_content-wrappers.scss index f02f7b3f2..63cac9292 100644 --- a/src/assets/stylesheets/_layout/_content-wrappers.scss +++ b/src/assets/stylesheets/_layout/_content-wrappers.scss @@ -19,7 +19,7 @@ .highlight pre { margin: 0; color: $vads-color-base; - font-size: $font-size-base; + font-size: $font-size-root; line-height: 1.5; }