diff --git a/.changeset/strange-bears-tap.md b/.changeset/strange-bears-tap.md new file mode 100644 index 00000000000..befd894526e --- /dev/null +++ b/.changeset/strange-bears-tap.md @@ -0,0 +1,5 @@ +--- +'@primer/react': patch +--- + +When an inline description is added to the item the normal text is set to bold diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-colorblind-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-colorblind-linux.png index aaad560cb67..31c87fcd9f2 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-colorblind-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-colorblind-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-dimmed-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-dimmed-linux.png index 8fe6d06e103..9cd856aa23e 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-dimmed-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-dimmed-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-high-contrast-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-high-contrast-linux.png index 4397717bccd..862f5e0c8a2 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-high-contrast-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-high-contrast-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-linux.png index e437f6387b2..48a7fec75de 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-tritanopia-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-tritanopia-linux.png index 295fecc32d5..b4cf0e60a29 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-tritanopia-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-dark-tritanopia-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-colorblind-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-colorblind-linux.png index f0c61f66984..1cbd055b0a7 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-colorblind-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-colorblind-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-high-contrast-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-high-contrast-linux.png index aa3c342f9ae..1cc602b0c66 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-high-contrast-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-high-contrast-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-linux.png index b354b0a6c6d..ca3918feedc 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-tritanopia-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-tritanopia-linux.png index 9836a663652..bdda5a0af20 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-tritanopia-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Inline-Description-light-tritanopia-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-colorblind-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-colorblind-linux.png index 238fae14f12..92541108aa9 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-colorblind-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-colorblind-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-dimmed-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-dimmed-linux.png index 9d6ddc7745f..f20d2620eb9 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-dimmed-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-dimmed-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-high-contrast-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-high-contrast-linux.png index 5c7ffb28e43..fe34790e5bb 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-high-contrast-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-high-contrast-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-linux.png index 238fae14f12..2c22f440098 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-tritanopia-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-tritanopia-linux.png index 238fae14f12..92541108aa9 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-tritanopia-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-dark-tritanopia-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-colorblind-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-colorblind-linux.png index e65e40b864e..ca873909d38 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-colorblind-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-colorblind-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-high-contrast-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-high-contrast-linux.png index 46a7ed6abc2..c1908ca03f9 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-high-contrast-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-high-contrast-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-linux.png index e65e40b864e..9d65080db84 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-linux.png differ diff --git a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-tritanopia-linux.png b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-tritanopia-linux.png index e65e40b864e..ca873909d38 100644 Binary files a/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-tritanopia-linux.png and b/.playwright/snapshots/components/ActionList.test.ts-snapshots/ActionList-Text-Wrap-And-Truncation-light-tritanopia-linux.png differ diff --git a/src/ActionList/Item.tsx b/src/ActionList/Item.tsx index d30d86a2f51..ca479ff450f 100644 --- a/src/ActionList/Item.tsx +++ b/src/ActionList/Item.tsx @@ -208,7 +208,14 @@ export const Item = React.forwardRef( if={Boolean(slots.InlineDescription)} sx={{display: 'flex', flexGrow: 1, alignItems: 'baseline', minWidth: 0}} > - + {props.children} {slots.InlineDescription} diff --git a/src/NavList/__snapshots__/NavList.test.tsx.snap b/src/NavList/__snapshots__/NavList.test.tsx.snap index 4901416b63a..20a4fc9ba53 100644 --- a/src/NavList/__snapshots__/NavList.test.tsx.snap +++ b/src/NavList/__snapshots__/NavList.test.tsx.snap @@ -21,6 +21,7 @@ exports[`NavList renders a simple list 1`] = ` -webkit-flex-grow: 1; -ms-flex-positive: 1; flex-grow: 1; + font-weight: 400; } .c0 { @@ -383,6 +384,7 @@ exports[`NavList renders with groups 1`] = ` -webkit-flex-grow: 1; -ms-flex-positive: 1; flex-grow: 1; + font-weight: 400; } .c1 { @@ -807,6 +809,7 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav -webkit-flex-grow: 1; -ms-flex-positive: 1; flex-grow: 1; + font-weight: 400; } .c1 { @@ -1268,6 +1271,7 @@ exports[`NavList.Item with NavList.SubNav has active styles if SubNav contains t -webkit-flex-grow: 1; -ms-flex-positive: 1; flex-grow: 1; + font-weight: 400; } .c1 {