Skip to content

Commit

Permalink
fix(deps): update ui dependencies (#493)
Browse files Browse the repository at this point in the history
* fix(deps): update ui dependencies

* fix problems

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Marine-Berthier <[email protected]>
  • Loading branch information
renovate[bot] and Marine-Berthier authored Feb 20, 2023
1 parent 30a4b47 commit 5cd9d0b
Show file tree
Hide file tree
Showing 20 changed files with 457 additions and 176 deletions.
489 changes: 357 additions & 132 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@
},
"dependencies": {
"@chakra-ui/anatomy": "2.1.2",
"@chakra-ui/react": "2.5.0",
"@chakra-ui/react": "2.5.1",
"@chakra-ui/theme-tools": "2.0.17",
"@emotion/react": "11.10.5",
"@emotion/styled": "11.10.5",
"@emotion/react": "11.10.6",
"@emotion/styled": "11.10.6",
"@smg-automotive/i18n-pkg": "1.3.1",
"@smg-automotive/phrase-pkg": "1.0.2",
"@types/fs-extra": "11.0.1",
"embla-carousel-react": "7.0.9",
"framer-motion": "9.0.2",
"framer-motion": "9.0.4",
"fs-extra": "11.1.0",
"merge-json-file": "1.0.1",
"use-debounce": "9.0.3",
Expand Down
9 changes: 7 additions & 2 deletions src/components/grid/GridItem.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import React from 'react';
import {
GridItem as ChakraGridItem,
ComponentWithAs,
forwardRef,
GridItemProps,
} from '@chakra-ui/react';

const GridItem = forwardRef<GridItemProps, 'div'>((props, ref) => {
return <ChakraGridItem {...props} ref={ref} />;
const GridItem: ComponentWithAs<'div', GridItemProps> = forwardRef<
GridItemProps,
'div'
>((props, ref) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return <ChakraGridItem {...(props as GridItemProps)} ref={ref} />;
});

GridItem.displayName = 'GridItem';
Expand Down
16 changes: 12 additions & 4 deletions src/components/grid/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import React from 'react';
import { Grid as ChakraGrid, forwardRef, GridProps } from '@chakra-ui/react';
import {
Grid as ChakraGrid,
ComponentWithAs,
forwardRef,
GridProps,
} from '@chakra-ui/react';

const Grid = forwardRef<GridProps, 'div'>((props, ref) => {
return <ChakraGrid {...props} ref={ref} />;
});
const Grid: ComponentWithAs<'div', GridProps> = forwardRef<GridProps, 'div'>(
(props, ref) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return <ChakraGrid {...(props as GridProps)} ref={ref} />;
}
);

Grid.displayName = 'Grid';

Expand Down
9 changes: 6 additions & 3 deletions src/components/layout/app/AppLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { forwardRef } from '@chakra-ui/react';
import { ComponentWithAs, forwardRef } from '@chakra-ui/react';

import Grid, { GridProps } from 'src/components/grid';

Expand All @@ -9,15 +9,18 @@ const pageGirdArea = `
"footer"
`;

const AppLayout = forwardRef<GridProps, 'div'>((props, ref) => {
const AppLayout: ComponentWithAs<'div', GridProps> = forwardRef<
GridProps,
'div'
>((props, ref) => {
return (
<Grid
templateRows="min-content auto min-content"
templateAreas={pageGirdArea}
minHeight="100vh"
ref={ref}
textStyle="body"
{...props}
{...(props as GridProps)}
/>
);
});
Expand Down
9 changes: 6 additions & 3 deletions src/components/layout/app/Content.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import React from 'react';
import { forwardRef } from '@chakra-ui/react';
import { ComponentWithAs, forwardRef } from '@chakra-ui/react';

import GridItem, { GridItemProps } from 'src/components/grid/GridItem';

const AppLayoutContent = forwardRef<GridItemProps, 'div'>((props, ref) => {
return <GridItem area="content" ref={ref} {...props} />;
const AppLayoutContent: ComponentWithAs<'div', GridItemProps> = forwardRef<
GridItemProps,
'div'
>((props, ref) => {
return <GridItem area="content" ref={ref} {...(props as GridItemProps)} />;
});

AppLayoutContent.displayName = 'AppLayoutContent';
Expand Down
9 changes: 6 additions & 3 deletions src/components/layout/app/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import React from 'react';
import { forwardRef } from '@chakra-ui/react';
import { ComponentWithAs, forwardRef } from '@chakra-ui/react';

import GridItem, { GridItemProps } from 'src/components/grid/GridItem';

const AppLayoutFooter = forwardRef<GridItemProps, 'div'>((props, ref) => {
return <GridItem area="footer" ref={ref} {...props} />;
const AppLayoutFooter: ComponentWithAs<'div', GridItemProps> = forwardRef<
GridItemProps,
'div'
>((props, ref) => {
return <GridItem area="footer" ref={ref} {...(props as GridItemProps)} />;
});

AppLayoutFooter.displayName = 'AppLayoutFooter';
Expand Down
9 changes: 6 additions & 3 deletions src/components/layout/app/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import React from 'react';
import { forwardRef } from '@chakra-ui/react';
import { ComponentWithAs, forwardRef } from '@chakra-ui/react';

import GridItem, { GridItemProps } from 'src/components/grid/GridItem';

const AppLayoutHeader = forwardRef<GridItemProps, 'div'>((props, ref) => {
return <GridItem area="header" ref={ref} {...props} />;
const AppLayoutHeader: ComponentWithAs<'div', GridItemProps> = forwardRef<
GridItemProps,
'div'
>((props, ref) => {
return <GridItem area="header" ref={ref} {...(props as GridItemProps)} />;
});

AppLayoutHeader.displayName = 'AppLayoutFooter';
Expand Down
8 changes: 6 additions & 2 deletions src/themes/components/accordion.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { createMultiStyleConfigHelpers, defineStyle } from '@chakra-ui/react';
import {
ComponentStyleConfig,
createMultiStyleConfigHelpers,
defineStyle,
} from '@chakra-ui/react';
import { accordionAnatomy as parts } from '@chakra-ui/anatomy';

const { defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);
Expand Down Expand Up @@ -110,4 +114,4 @@ export default defineMultiStyleConfig({
defaultProps: {
variant: 'light',
},
});
}) as ComponentStyleConfig;
8 changes: 6 additions & 2 deletions src/themes/components/alert.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { cssVar, mode } from '@chakra-ui/theme-tools';
import { PartsStyleFunction, PartsStyleObject } from '@chakra-ui/react';
import {
ComponentStyleConfig,
PartsStyleFunction,
PartsStyleObject,
} from '@chakra-ui/react';
import { alertAnatomy as parts } from '@chakra-ui/anatomy';

const $fg = cssVar('alert-fg');
Expand Down Expand Up @@ -59,4 +63,4 @@ export default {
baseStyle,
variants,
defaultProps,
};
} as ComponentStyleConfig;
4 changes: 2 additions & 2 deletions src/themes/components/avatar.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SystemStyleObject } from '@chakra-ui/react';
import type { ComponentStyleConfig, SystemStyleObject } from '@chakra-ui/react';

const baseStyle: SystemStyleObject = {
cursor: 'pointer',
Expand All @@ -10,4 +10,4 @@ const baseStyle: SystemStyleObject = {

export default {
baseStyle,
};
} as ComponentStyleConfig;
4 changes: 2 additions & 2 deletions src/themes/components/badge.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineStyle } from '@chakra-ui/react';
import { ComponentStyleConfig, defineStyle } from '@chakra-ui/react';

const baseStyle = defineStyle(({ theme }) => {
const color = theme.name === 'AutoScout 24' ? 'black' : 'white';
Expand All @@ -16,4 +16,4 @@ const baseStyle = defineStyle(({ theme }) => {

export default {
baseStyle,
};
} as ComponentStyleConfig;
4 changes: 2 additions & 2 deletions src/themes/components/divider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SystemStyleObject } from '@chakra-ui/react';
import type { ComponentStyleConfig, SystemStyleObject } from '@chakra-ui/react';

const baseStyle: SystemStyleObject = {
borderColor: 'gray.100',
Expand All @@ -8,4 +8,4 @@ const baseStyle: SystemStyleObject = {

export default {
baseStyle,
};
} as ComponentStyleConfig;
4 changes: 3 additions & 1 deletion src/themes/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { ComponentStyleConfig } from '@chakra-ui/react';

import VehicleReference from './vehicleReference';
import Tooltip from './tooltip';
import Textarea from './textarea';
Expand Down Expand Up @@ -30,7 +32,7 @@ import ArticleTeaser from './articleTeaser';
import Alert from './alert';
import Accordion from './accordion';

export const components = {
export const components: Record<string, ComponentStyleConfig> = {
Accordion,
Alert,
ArticleTeaser,
Expand Down
8 changes: 6 additions & 2 deletions src/themes/components/list.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { createMultiStyleConfigHelpers, defineStyle } from '@chakra-ui/react';
import {
ComponentStyleConfig,
createMultiStyleConfigHelpers,
defineStyle,
} from '@chakra-ui/react';
import { listAnatomy as parts } from '@chakra-ui/anatomy';

const { defineMultiStyleConfig, definePartsStyle } =
Expand Down Expand Up @@ -37,4 +41,4 @@ export default defineMultiStyleConfig({
defaultProps: {
variant: 'md',
},
});
}) as ComponentStyleConfig;
8 changes: 6 additions & 2 deletions src/themes/components/menu.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { createMultiStyleConfigHelpers, defineStyle } from '@chakra-ui/react';
import {
ComponentStyleConfig,
createMultiStyleConfigHelpers,
defineStyle,
} from '@chakra-ui/react';
import { menuAnatomy as parts } from '@chakra-ui/anatomy';

import { opacity } from '../shared/opacity';
Expand Down Expand Up @@ -46,4 +50,4 @@ const baseStyle = definePartsStyle({

export default defineMultiStyleConfig({
baseStyle,
});
}) as ComponentStyleConfig;
8 changes: 6 additions & 2 deletions src/themes/components/modal.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { mode } from '@chakra-ui/theme-tools';
import { createMultiStyleConfigHelpers, defineStyle } from '@chakra-ui/react';
import {
ComponentStyleConfig,
createMultiStyleConfigHelpers,
defineStyle,
} from '@chakra-ui/react';
import { modalAnatomy as parts } from '@chakra-ui/anatomy';

import { opacity } from '../shared/opacity';
Expand Down Expand Up @@ -93,4 +97,4 @@ export default defineMultiStyleConfig({
baseStyle,
sizes,
defaultProps: { size: 'md' },
});
}) as ComponentStyleConfig;
8 changes: 6 additions & 2 deletions src/themes/components/spinner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { cssVar } from '@chakra-ui/theme-tools';
import { defineStyle, defineStyleConfig } from '@chakra-ui/react';
import {
ComponentStyleConfig,
defineStyle,
defineStyleConfig,
} from '@chakra-ui/react';

const $size = cssVar('spinner-size');

Expand Down Expand Up @@ -29,6 +33,6 @@ const spinnerTheme = defineStyleConfig({
defaultProps: {
size: 'sm',
},
});
}) as ComponentStyleConfig;

export default spinnerTheme;
3 changes: 2 additions & 1 deletion src/themes/components/textarea.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type {
ComponentStyleConfig,
SystemStyleInterpolation,
SystemStyleObject,
} from '@chakra-ui/react';
Expand Down Expand Up @@ -28,4 +29,4 @@ export default {
baseStyle,
variants,
defaultProps,
};
} as ComponentStyleConfig;
8 changes: 6 additions & 2 deletions src/themes/components/tooltip.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { cssVar } from '@chakra-ui/theme-tools';
import { defineStyle, defineStyleConfig } from '@chakra-ui/react';
import {
ComponentStyleConfig,
defineStyle,
defineStyleConfig,
} from '@chakra-ui/react';

const $bg = cssVar('tooltip-bg');
const $arrowBg = cssVar('popper-arrow-bg');
Expand All @@ -17,4 +21,4 @@ const baseStyle = defineStyle(() => {

export default defineStyleConfig({
baseStyle,
});
}) as ComponentStyleConfig;

0 comments on commit 5cd9d0b

Please sign in to comment.