Skip to content

Commit bc114bd

Browse files
christiancp100joshuaellis
authored andcommitted
chore(wip): update styled-components to v6
1 parent 9fdfdde commit bc114bd

File tree

30 files changed

+521
-531
lines changed

30 files changed

+521
-531
lines changed

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"react": "18.2.0",
1515
"react-dom": "18.2.0",
1616
"storybook-dark-mode": "^3.0.3",
17-
"styled-components": "^5.3.11"
17+
"styled-components": "6.1.8"
1818
},
1919
"devDependencies": {
2020
"@storybook/blocks": "^7.6.17",

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"@types/react-dom": "18.2.24",
4545
"@typescript-eslint/eslint-plugin": "^7.4.0",
4646
"@typescript-eslint/parser": "^7.4.0",
47-
"cross-env": "^7.0.3",
4847
"eslint": "^8.57.0",
4948
"eslint-config-prettier": "^9.1.0",
5049
"eslint-import-resolver-typescript": "^3.6.1",

packages/primitives/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"react-remove-scroll": "^2.5.9"
4444
},
4545
"devDependencies": {
46-
"@strapi/pack-up": "^5.0.0",
46+
"@strapi/pack-up": "5.0.0",
4747
"react": "18.2.0",
4848
"react-dom": "18.2.0",
4949
"rimraf": "^5.0.5",

packages/strapi-design-system/package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,17 @@
2626
"devDependencies": {
2727
"@strapi/icons": "^2.0.0-beta.2",
2828
"@strapi/pack-up": "^5.0.0",
29-
"@types/react-router-dom": "^5.3.3",
30-
"@types/styled-components": "^5.1.26",
31-
"cross-env": "^7.0.3",
3229
"react": "18.2.0",
3330
"react-dom": "18.2.0",
3431
"rimraf": "^5.0.5",
35-
"styled-components": "^5.3.11",
32+
"styled-components": "6.1.8",
3633
"typescript": "^5.4.4"
3734
},
3835
"peerDependencies": {
39-
"@strapi/icons": "^2.0.0-beta.0",
36+
"@strapi/icons": "^2.0.0 || ^2.0.0-beta || ^2.0.0-alpha",
4037
"react": "^17.0.0 || ^18.0.0",
4138
"react-dom": "^17.0.0 || ^18.0.0",
42-
"styled-components": "^5.2.1"
39+
"styled-components": "^6.0.0"
4340
},
4441
"scripts": {
4542
"build": "pack-up build",

packages/strapi-design-system/src/Accordion/Accordion.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const getBorder = ({ theme, expanded, variant, disabled, error }: GetBorderParam
3333
};
3434

3535
const AccordionTypography = styled(Typography)``;
36+
const AccordionFlex = styled(Flex)``;
3637

3738
type AccordionWrapperProps = Pick<AccordionProps, 'expanded' | 'disabled' | 'variant' | 'error'>;
3839

@@ -46,11 +47,11 @@ const AccordionWrapper = styled(Box)<AccordionWrapperProps>`
4647
color: ${({ theme, expanded }) => (expanded ? undefined : theme.colors.primary700)};
4748
}
4849
49-
${Typography} {
50+
${AccordionTypography} {
5051
color: ${({ theme, expanded }) => (expanded ? undefined : theme.colors.primary600)};
5152
}
5253
53-
& > ${Flex} {
54+
& > ${AccordionFlex} {
5455
background: ${({ theme }) => theme.colors.primary100};
5556
}
5657

packages/strapi-design-system/src/Alert/Alert.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const CloseButton = styled(Box)`
1414
${buttonFocusStyle};
1515
`;
1616

17-
const AlertIconWrapper = styled(Flex)`
17+
const AlertIconWrapper = styled(Flex)<{ variant: AlertVariant }>`
1818
svg {
1919
height: 100%;
2020
width: 100%;
@@ -41,7 +41,7 @@ const AlertIcon = ({ variant, ...props }: AlertIconProps) => {
4141
return <Information {...props} />;
4242
};
4343

44-
const ActionBox = styled(Box)`
44+
const ActionBox = styled(Box)<{ variant: AlertVariant }>`
4545
& a > span {
4646
color: ${handleIconColor};
4747
}

packages/strapi-design-system/src/BaseCheckbox/BaseCheckbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export interface CheckboxInputProps {
1414
size: BaseCheckboxSize;
1515
}
1616

17-
const CheckboxInput = styled.input`
17+
const CheckboxInput = styled.input<{ size: BaseCheckboxSize }>`
1818
height: ${getCheckboxSize};
1919
min-width: ${getCheckboxSize};
2020
margin: 0;

packages/strapi-design-system/src/BaseRadio/BaseRadio.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export const BaseRadio = React.forwardRef<HTMLInputElement, BaseRadioProps>(
6161
checked={isSelected}
6262
disabled={disabled}
6363
id={generatedId}
64-
// @ts-expect-error size is a html prop already.
6564
size={size}
6665
onChange={onChange}
6766
{...props}

0 commit comments

Comments
 (0)