Skip to content

Commit

Permalink
chore(deps): update @primer/octicons-react to 19.14.0 (#5422)
Browse files Browse the repository at this point in the history
* chore(deps): update @primer/octicons-react to 19.14.0

* refactor: update removed icon reference

* test(vrt): update snapshots

* test: update snapshots

* refactor(Octicon): ignore sx prop from being forwarded to icon component

---------

Co-authored-by: joshblack <joshblack@users.noreply.github.com>
Co-authored-by: Lukas Oppermann <lukasoppermann@github.com>
  • Loading branch information
3 people authored Jan 9, 2025
1 parent 8ef06a9 commit 37901a8
Show file tree
Hide file tree
Showing 13 changed files with 481 additions and 700 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"@primer/octicons-react": "^19.9.0",
"@primer/octicons-react": "^19.14.0",
"@primer/react": "37.9.1",
"clsx": "^1.2.1",
"next": "^14.2.15",
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions packages/react/src/NavList/__snapshots__/NavList.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1363,11 +1363,13 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav
>
<svg
aria-hidden="true"
class="c9"
class="octicon octicon-chevron-down c9"
display="inline-block"
fill="currentColor"
focusable="false"
height="16"
style="display: inline-block; user-select: none; vertical-align: text-bottom; overflow: visible;"
overflow="visible"
style="vertical-align: text-bottom;"
viewBox="0 0 16 16"
width="16"
>
Expand Down Expand Up @@ -1884,11 +1886,13 @@ exports[`NavList.Item with NavList.SubNav has active styles if SubNav contains t
>
<svg
aria-hidden="true"
class="c9"
class="octicon octicon-chevron-down c9"
display="inline-block"
fill="currentColor"
focusable="false"
height="16"
style="display: inline-block; user-select: none; vertical-align: text-bottom; overflow: visible;"
overflow="visible"
style="vertical-align: text-bottom;"
viewBox="0 0 16 16"
width="16"
>
Expand Down
8 changes: 6 additions & 2 deletions packages/react/src/Octicon/Octicon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {SxProp} from '../sx'
import sx from '../sx'
import type {ComponentProps} from '../utils/types'

type StyledOcticonProps = {icon: React.ElementType; color?: string} & IconProps
type StyledOcticonProps = {icon: React.ElementType; color?: string} & IconProps & SxProp

const Icon = React.forwardRef((props: StyledOcticonProps, ref: React.Ref<SVGSVGElement>) => {
const {icon: IconComponent, ...rest} = props
Expand All @@ -15,7 +15,11 @@ const Icon = React.forwardRef((props: StyledOcticonProps, ref: React.Ref<SVGSVGE
/**
* @deprecated Use the icon component directly from `@primer/octicons-react` instead
*/
const Octicon = styled(Icon)<SxProp>`
const Octicon = styled(Icon).withConfig({
shouldForwardProp(prop) {
return prop !== 'sx'
},
})<SxProp>`
${({color, sx: sxProp}) => sx({sx: {color, ...sxProp}})}
`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,15 @@ exports[`StateLabel renders children 1`] = `
>
<svg
aria-label="Issue"
className="c1"
className="octicon octicon-issue-opened c1"
display="inline-block"
fill="currentColor"
focusable="false"
height={16}
overflow="visible"
role="img"
style={
{
"display": "inline-block",
"overflow": "visible",
"userSelect": "none",
"verticalAlign": "text-bottom",
}
}
Expand Down Expand Up @@ -95,16 +94,15 @@ exports[`StateLabel respects the status prop 1`] = `
>
<svg
aria-label="Issue"
className="c1"
className="octicon octicon-issue-opened c1"
display="inline-block"
fill="currentColor"
focusable="false"
height={16}
overflow="visible"
role="img"
style={
{
"display": "inline-block",
"overflow": "visible",
"userSelect": "none",
"verticalAlign": "text-bottom",
}
}
Expand Down Expand Up @@ -155,16 +153,15 @@ exports[`StateLabel respects the status prop 2`] = `
>
<svg
aria-label="Issue"
className="c1"
className="octicon octicon-issue-closed c1"
display="inline-block"
fill="currentColor"
focusable="false"
height={16}
overflow="visible"
role="img"
style={
{
"display": "inline-block",
"overflow": "visible",
"userSelect": "none",
"verticalAlign": "text-bottom",
}
}
Expand Down Expand Up @@ -215,16 +212,15 @@ exports[`StateLabel respects the status prop 3`] = `
>
<svg
aria-label="Issue, not planned"
className="c1"
className="octicon octicon-skip c1"
display="inline-block"
fill="currentColor"
focusable="false"
height={16}
overflow="visible"
role="img"
style={
{
"display": "inline-block",
"overflow": "visible",
"userSelect": "none",
"verticalAlign": "text-bottom",
}
}
Expand Down Expand Up @@ -272,16 +268,15 @@ exports[`StateLabel respects the status prop 4`] = `
>
<svg
aria-label="Pull request"
className="c1"
className="octicon octicon-git-merge c1"
display="inline-block"
fill="currentColor"
focusable="false"
height={16}
overflow="visible"
role="img"
style={
{
"display": "inline-block",
"overflow": "visible",
"userSelect": "none",
"verticalAlign": "text-bottom",
}
}
Expand Down Expand Up @@ -329,16 +324,15 @@ exports[`StateLabel respects the status prop 5`] = `
>
<svg
aria-label="Pull request"
className="c1"
className="octicon octicon-git-merge-queue c1"
display="inline-block"
fill="currentColor"
focusable="false"
height={16}
overflow="visible"
role="img"
style={
{
"display": "inline-block",
"overflow": "visible",
"userSelect": "none",
"verticalAlign": "text-bottom",
}
}
Expand Down Expand Up @@ -386,16 +380,15 @@ exports[`StateLabel respects the variant prop 1`] = `
>
<svg
aria-label="Issue"
className="c1"
className="octicon octicon-issue-opened c1"
display="inline-block"
fill="currentColor"
focusable="false"
height={16}
overflow="visible"
role="img"
style={
{
"display": "inline-block",
"overflow": "visible",
"userSelect": "none",
"verticalAlign": "text-bottom",
}
}
Expand Down Expand Up @@ -446,16 +439,15 @@ exports[`StateLabel respects the variant prop 2`] = `
>
<svg
aria-label="Issue"
className="c1"
className="octicon octicon-issue-opened c1"
display="inline-block"
fill="currentColor"
focusable="false"
height={16}
overflow="visible"
role="img"
style={
{
"display": "inline-block",
"overflow": "visible",
"userSelect": "none",
"verticalAlign": "text-bottom",
}
}
Expand Down
Loading

0 comments on commit 37901a8

Please sign in to comment.