From 9c11647a56563adc53d88016380491a358e6fc1f Mon Sep 17 00:00:00 2001 From: "ilia.brauer" Date: Tue, 18 Aug 2026 12:43:27 +0200 Subject: [PATCH 1/2] [icon] fixed builded types --- semcore/data-table/src/components/Head/Column.tsx | 2 +- semcore/icon/src/Icon.tsx | 2 +- semcore/icon/src/index.ts | 3 ++- semcore/icon/transform-svg-icon.ts | 4 ++-- semcore/modal/src/Modal.tsx | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/semcore/data-table/src/components/Head/Column.tsx b/semcore/data-table/src/components/Head/Column.tsx index 2fbce0af28..274902617f 100644 --- a/semcore/data-table/src/components/Head/Column.tsx +++ b/semcore/data-table/src/components/Head/Column.tsx @@ -17,7 +17,7 @@ import { handleFocusCell, handleKeydownFocusCell } from '../../enhancers/focusab import type { ROW_GROUP } from '../DataTable/DataTable'; import type { DataTableData, SortDirection } from '../DataTable/DataTable.types'; -const SORTING_ICON: { [key in SortDirection]: React.FC> } = { +const SORTING_ICON: { [key in SortDirection]: typeof SortAsc | typeof SortDesc } = { desc: SortDesc, asc: SortAsc, } as const; diff --git a/semcore/icon/src/Icon.tsx b/semcore/icon/src/Icon.tsx index ac7ff4f82f..28fd04cae0 100644 --- a/semcore/icon/src/Icon.tsx +++ b/semcore/icon/src/Icon.tsx @@ -124,6 +124,6 @@ function Icon({ ); } -type IconComponent = Intergalactic.Component<'svg', IconProps>; +export type IconComponent = Intergalactic.Component<'svg', IconProps>; export default createBaseComponent(Icon, { isIcon: true }); diff --git a/semcore/icon/src/index.ts b/semcore/icon/src/index.ts index 692802828f..45d2200aa2 100644 --- a/semcore/icon/src/index.ts +++ b/semcore/icon/src/index.ts @@ -1,7 +1,8 @@ -import type { IconProps } from './Icon'; +import type { IconProps, IconComponent } from './Icon'; export { default } from './Icon'; export type { + IconComponent, IconProps, }; diff --git a/semcore/icon/transform-svg-icon.ts b/semcore/icon/transform-svg-icon.ts index bfd108a436..27c9ca171f 100644 --- a/semcore/icon/transform-svg-icon.ts +++ b/semcore/icon/transform-svg-icon.ts @@ -48,8 +48,8 @@ async function transform() { await fs.mkdir(writeBasePath, { recursive: true }); const dts = ` -import type { IconProps } from '../..${(type === 'pay' || type === 'color') ? '/../' : '/'}types/index.mjs'; -declare const Icon: React.FC & IconProps>; +import type { IconComponent } from '../..${(type === 'pay' || type === 'color') ? '/../' : '/'}types'; +declare const Icon: IconComponent; export default Icon; `; diff --git a/semcore/modal/src/Modal.tsx b/semcore/modal/src/Modal.tsx index b13a4e44b7..63747297b3 100644 --- a/semcore/modal/src/Modal.tsx +++ b/semcore/modal/src/Modal.tsx @@ -222,7 +222,7 @@ function Close( ) : ( - + )} , From 31435b54940c8ca3f914b62fda939138f1ac5605 Mon Sep 17 00:00:00 2001 From: Valeryia Zimnitskaya Date: Mon, 24 Aug 2026 12:47:05 +0200 Subject: [PATCH 2/2] [modal] update unit test --- semcore/modal/__tests__/index.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/semcore/modal/__tests__/index.test.tsx b/semcore/modal/__tests__/index.test.tsx index eaa43a0e12..d01048b903 100644 --- a/semcore/modal/__tests__/index.test.tsx +++ b/semcore/modal/__tests__/index.test.tsx @@ -45,8 +45,8 @@ describe('Modal', () => { test.sequential('Verify supports onClose for CloseIcons', async () => { const spy = vi.fn(); - const { getByTitle } = render(); - await userEvent.click(getByTitle('Close').closest('button')!); + const { getByRole } = render(); + await userEvent.click(getByRole('button', { name: 'Close' })); expect(spy).toBeCalledWith('onCloseClick', expect.anything()); });