Skip to content

Commit fe4c240

Browse files
author
Kubit
committed
Fix typescript errors
1 parent 5ba20d9 commit fe4c240

File tree

8 files changed

+41
-40
lines changed

8 files changed

+41
-40
lines changed

package.json

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kubit-ui-web/react-components",
3-
"version": "1.16.1",
3+
"version": "1.17.0",
44
"description": "Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience",
55
"author": {
66
"name": "Kubit",
@@ -87,60 +87,62 @@
8787
"license": "Apache-2.0",
8888
"devDependencies": {
8989
"@babel/core": "^7.26.0",
90+
"@babel/helper-environment-visitor": "^7.24.7",
91+
"@babel/helper-split-export-declaration": "^7.24.7",
9092
"@babel/preset-env": "^7.26.0",
91-
"@babel/preset-react": "^7.25.9",
93+
"@babel/preset-react": "^7.26.3",
9294
"@babel/preset-typescript": "^7.26.0",
93-
"@eslint/compat": "^1.2.3",
95+
"@eslint/compat": "^1.2.4",
9496
"@eslint/eslintrc": "^3.2.0",
95-
"@eslint/js": "^9.15.0",
97+
"@eslint/js": "^9.16.0",
9698
"@kubit-ui-web/eslint-plugin-no-index-import": "^1.0.2",
97-
"@storybook/addon-a11y": "^8.4.4",
98-
"@storybook/addon-controls": "^8.4.4",
99+
"@storybook/addon-a11y": "^8.4.7",
100+
"@storybook/addon-controls": "^8.4.7",
99101
"@storybook/addon-coverage": "^1.0.4",
100-
"@storybook/addon-essentials": "^8.4.4",
101-
"@storybook/addon-interactions": "^8.4.4",
102-
"@storybook/addon-links": "^8.4.4",
103-
"@storybook/addon-themes": "^8.4.4",
104-
"@storybook/blocks": "^8.4.4",
105-
"@storybook/react": "^8.4.4",
106-
"@storybook/react-vite": "^8.4.4",
102+
"@storybook/addon-essentials": "^8.4.7",
103+
"@storybook/addon-interactions": "^8.4.7",
104+
"@storybook/addon-links": "^8.4.7",
105+
"@storybook/addon-themes": "^8.4.7",
106+
"@storybook/blocks": "^8.4.7",
107+
"@storybook/react": "^8.4.7",
108+
"@storybook/react-vite": "^8.4.7",
107109
"@testing-library/jest-dom": "^6.6.3",
108-
"@testing-library/react": "^16.0.1",
110+
"@testing-library/react": "^16.1.0",
109111
"@testing-library/react-hooks": "^8.0.1",
110112
"@testing-library/user-event": "^14.5.2",
111113
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
112114
"@types/jest": "^29.5.14",
113115
"@types/jest-axe": "^3.5.9",
114-
"@types/mocha": "^10.0.9",
116+
"@types/mocha": "^10.0.10",
115117
"@types/react": "^18.3.12",
116118
"@types/react-dom": "^18.3.1",
117119
"@types/styled-components": "^5.1.34",
118120
"@types/ungap__structured-clone": "^1.2.0",
119-
"@typescript-eslint/eslint-plugin": "^8.14.0",
120-
"@typescript-eslint/parser": "^8.14.0",
121+
"@typescript-eslint/eslint-plugin": "^8.17.0",
122+
"@typescript-eslint/parser": "^8.17.0",
121123
"@ungap/structured-clone": "^1.2.0",
122-
"@vitejs/plugin-react": "^4.3.3",
124+
"@vitejs/plugin-react": "^4.3.4",
123125
"babel-jest": "^29.7.0",
124126
"cpy-cli": "^5.0.0",
125-
"eslint": "^9.15.0",
127+
"eslint": "^9.16.0",
126128
"eslint-config-prettier": "^9.1.0",
127129
"eslint-config-standard-with-typescript": "^43.0.1",
128-
"eslint-import-resolver-typescript": "^3.6.3",
130+
"eslint-import-resolver-typescript": "^3.7.0",
129131
"eslint-plugin-import": "^2.31.0",
130132
"eslint-plugin-jest": "^28.9.0",
131133
"eslint-plugin-jsx-a11y": "^6.10.2",
132-
"eslint-plugin-n": "^17.13.2",
134+
"eslint-plugin-n": "^17.14.0",
133135
"eslint-plugin-node": "^11.1.0",
134136
"eslint-plugin-prettier": "5.2.1",
135-
"eslint-plugin-promise": "^7.1.0",
137+
"eslint-plugin-promise": "^7.2.1",
136138
"eslint-plugin-react": "^7.37.2",
137-
"eslint-plugin-react-hooks": "^5.0.0",
138-
"eslint-plugin-react-refresh": "^0.4.14",
139-
"eslint-plugin-storybook": "^0.11.0",
139+
"eslint-plugin-react-hooks": "^5.1.0",
140+
"eslint-plugin-react-refresh": "^0.4.16",
141+
"eslint-plugin-storybook": "^0.11.1",
140142
"eslint-plugin-unused-imports": "^4.1.4",
141-
"globals": "^15.12.0",
143+
"globals": "^15.13.0",
142144
"gts": "^6.0.2",
143-
"html-validate": "^8.25.0",
145+
"html-validate": "^8.27.0",
144146
"jest": "^29.7.0",
145147
"jest-axe": "^9.0.0",
146148
"jest-canvas-mock": "^2.5.2",
@@ -149,15 +151,15 @@
149151
"jest-junit": "^16.0.0",
150152
"jest-styled-components": "^7.2.0",
151153
"json-beautify": "^1.1.1",
152-
"prettier": "^3.3.3",
154+
"prettier": "^3.4.2",
153155
"react-transition-group": "^4.4.5",
154156
"sort-imports": "^1.1.0",
155-
"storybook": "^8.4.4",
157+
"storybook": "^8.4.7",
156158
"ts-jest": "^29.2.5",
157159
"tsc-alias": "1.8.10",
158-
"typedoc": "^0.26.11",
159-
"typescript": "^5.6.3",
160-
"vite": "^5.4.11",
160+
"typedoc": "^0.27.3",
161+
"typescript": "^5.7.2",
162+
"vite": "^6.0.3",
161163
"vite-tsconfig-paths": "^4.3.2",
162164
"yarn-deduplicate": "^6.0.2"
163165
},

src/components/drawer/drawerStandAlone.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const DrawerStandAloneComponent = (
5454
<DrawerTitleContentFooterContainerStyled blocked={blocked} styles={props.styles}>
5555
<DrawerTitleStyled
5656
data-drawer-title
57-
as={Text}
57+
as={Text as any}
5858
component={titleComponent as unknown as TextComponentType}
5959
customTypography={props.styles.title}
6060
id={titleIdFinal}
@@ -79,7 +79,7 @@ const DrawerStandAloneComponent = (
7979
{props.footer?.content && (props.styles.footer?.variant || props.footer.variant) && (
8080
<DrawerFooterStyled
8181
data-drawer-footer
82-
as={Footer}
82+
as={Footer as any}
8383
customFooterStyles={props.styles}
8484
variant={props.styles.footer?.variant}
8585
{...props.footer}

src/components/elementOrIcon/elementOrIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const ElementOrIconComponent = (
2323
);
2424
}
2525
// element as jsx element
26-
return <>{element}</>;
26+
return <>{element as React.ReactNode}</>;
2727
};
2828

2929
/**

src/components/elementOrIllustration/elementOrIllustration.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const ElementOrIllustrationComponent = (
1818
return <Illustration {...rest} ref={ref} illustration={element} />;
1919
}
2020
// element as jsx element
21-
return <>{element}</>;
21+
return <>{element as React.ReactNode}</>;
2222
};
2323

2424
/**

src/components/navigationCard/navigationCardStandAlone.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const NavigationCardStandaloneComponent = (
3636
return (
3737
// Can not be spread -> styled component breaks
3838
<NavigationCardStyled
39-
ref={ref as React.ForwardedRef<HTMLButtonElement>}
39+
ref={ref as any}
4040
aria-disabled={props['aria-disabled']}
4141
as={props.url ? props.component : 'button'}
4242
className={props.className}

src/components/pillV2/pillStandAlone.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const PillStandAloneComponent = (
3131
ref={ref}
3232
{...ariaProps}
3333
aria-selected={type === PillType.TAB ? props.selected : undefined}
34-
as={[PillType.BUTTON, PillType.TAB].includes(type) ? PillAsButton : undefined}
34+
as={([PillType.BUTTON, PillType.TAB].includes(type) ? PillAsButton : undefined) as any}
3535
data-testid={dataTestId}
3636
role={type === PillType.TAB ? ROLES.TAB : undefined}
3737
styles={props.styles}

src/types/styled.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ export interface CustomTheme {
2121
}
2222

2323
declare module 'styled-components' {
24-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
2524
export interface DefaultTheme extends CustomTheme {}
2625
}

tsconfig.tsbuildinfo

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)