diff --git a/webapp/packages/core-blocks/src/Button.tsx b/webapp/packages/core-blocks/src/Button.tsx index 5ba253b03b..0ba370ba01 100644 --- a/webapp/packages/core-blocks/src/Button.tsx +++ b/webapp/packages/core-blocks/src/Button.tsx @@ -1,12 +1,13 @@ /* * CloudBeaver - Cloud Database Manager - * Copyright (C) 2020-2024 DBeaver Corp and others + * Copyright (C) 2020-2025 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ import { observable } from 'mobx'; import { observer } from 'mobx-react-lite'; +import { Button as UIKitButton, type UiKitButtonProps } from '@dbeaver/ui-kit'; import style from './Button.module.css'; import { IconOrImage } from './IconOrImage.js'; @@ -25,7 +26,7 @@ export type ButtonProps = (React.ButtonHTMLAttributes(function Button({ icon, viewBox, mod, - tag = 'button', + render, type = 'button', disabled = false, loading, @@ -78,12 +79,10 @@ export const Button = observer(function Button({ disabled = true; } - const Button = tag; return ( - + ); }); diff --git a/webapp/packages/core-blocks/src/FormControls/InputFileTextContent.tsx b/webapp/packages/core-blocks/src/FormControls/InputFileTextContent.tsx index 94f6136ed5..435e57a701 100644 --- a/webapp/packages/core-blocks/src/FormControls/InputFileTextContent.tsx +++ b/webapp/packages/core-blocks/src/FormControls/InputFileTextContent.tsx @@ -1,6 +1,6 @@ /* * CloudBeaver - Cloud Database Manager - * Copyright (C) 2020-2024 DBeaver Corp and others + * Copyright (C) 2020-2025 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. @@ -139,7 +139,7 @@ export const InputFileTextContent: InputFileTextContentType = observer(function {children} - diff --git a/webapp/packages/core-blocks/src/FormControls/InputFiles.tsx b/webapp/packages/core-blocks/src/FormControls/InputFiles.tsx index cc4a7b8b4d..787eaf0407 100644 --- a/webapp/packages/core-blocks/src/FormControls/InputFiles.tsx +++ b/webapp/packages/core-blocks/src/FormControls/InputFiles.tsx @@ -1,6 +1,6 @@ /* * CloudBeaver - Cloud Database Manager - * Copyright (C) 2020-2024 DBeaver Corp and others + * Copyright (C) 2020-2025 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. @@ -182,7 +182,7 @@ export const InputFiles: InputFilesType = observer(
- diff --git a/webapp/packages/core-blocks/src/FormControls/Textarea.tsx b/webapp/packages/core-blocks/src/FormControls/Textarea.tsx index 26b909e6d7..aeab240a7c 100644 --- a/webapp/packages/core-blocks/src/FormControls/Textarea.tsx +++ b/webapp/packages/core-blocks/src/FormControls/Textarea.tsx @@ -1,6 +1,6 @@ /* * CloudBeaver - Cloud Database Manager - * Copyright (C) 2020-2024 DBeaver Corp and others + * Copyright (C) 2020-2025 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. @@ -137,7 +137,7 @@ export const Textarea: TextareaType = observer(function Textarea({ } }} > - diff --git a/webapp/packages/core-blocks/src/IconButton.tsx b/webapp/packages/core-blocks/src/IconButton.tsx index c246243b63..ec81900c8f 100644 --- a/webapp/packages/core-blocks/src/IconButton.tsx +++ b/webapp/packages/core-blocks/src/IconButton.tsx @@ -1,13 +1,13 @@ /* * CloudBeaver - Cloud Database Manager - * Copyright (C) 2020-2024 DBeaver Corp and others + * Copyright (C) 2020-2025 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ import { observer } from 'mobx-react-lite'; import type React from 'react'; -import { type ButtonProps, Button as ReakitButton } from 'reakit'; +import { type UiKitButtonProps, Button as UIKitButton } from '@dbeaver/ui-kit'; import { Icon } from './Icon.js'; import IconButtonStyles from './IconButton.module.css'; @@ -15,26 +15,21 @@ import { s } from './s.js'; import { StaticImage } from './StaticImage.js'; import { useS } from './useS.js'; -interface Props { - tag?: 'button' | 'a' | 'div'; +export interface IconButtonProps extends UiKitButtonProps { name: string; img?: boolean; viewBox?: string; } -export type IconButtonProps = Props & ButtonProps; - -export const IconButton: React.FC = observer(function IconButton({ tag, name, img, viewBox, className, ...rest }) { +export const IconButton: React.FC = observer(function IconButton({ name, img, viewBox, className, ...rest }: IconButtonProps) { const styles = useS(IconButtonStyles); - const Button = tag ?? ReakitButton; - return ( - + ); }); diff --git a/webapp/packages/core-blocks/src/Menu/MenuBarSmallItem.tsx b/webapp/packages/core-blocks/src/Menu/MenuBarSmallItem.tsx index a8212f3c04..b23fe4013b 100644 --- a/webapp/packages/core-blocks/src/Menu/MenuBarSmallItem.tsx +++ b/webapp/packages/core-blocks/src/Menu/MenuBarSmallItem.tsx @@ -1,18 +1,18 @@ /* * CloudBeaver - Cloud Database Manager - * Copyright (C) 2020-2024 DBeaver Corp and others + * Copyright (C) 2020-2025 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. */ -import type { ButtonProps } from 'reakit'; +import type { UiKitButtonProps } from '@dbeaver/ui-kit'; import { IconButton } from '../IconButton.js'; import { s } from '../s.js'; import { useS } from '../useS.js'; import moduleStyles from './MenuBarSmallItem.module.css'; -interface Props extends Omit { +interface Props extends Omit { icon?: string; viewBox?: string; onClick?: React.MouseEventHandler; diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSHKeyUploader.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSHKeyUploader.tsx index ec6bf3e2ea..7306decd32 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSHKeyUploader.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSHKeyUploader.tsx @@ -1,6 +1,6 @@ /* * CloudBeaver - Cloud Database Manager - * Copyright (C) 2020-2024 DBeaver Corp and others + * Copyright (C) 2020-2025 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. @@ -52,7 +52,7 @@ export const SSHKeyUploader = observer(function SSHKeyUploader({ state, s - diff --git a/webapp/packages/plugin-data-export/src/ExportNotification/ExportNotification.tsx b/webapp/packages/plugin-data-export/src/ExportNotification/ExportNotification.tsx index 595e1fe6b5..8fc6757ca8 100644 --- a/webapp/packages/plugin-data-export/src/ExportNotification/ExportNotification.tsx +++ b/webapp/packages/plugin-data-export/src/ExportNotification/ExportNotification.tsx @@ -1,6 +1,6 @@ /* * CloudBeaver - Cloud Database Manager - * Copyright (C) 2020-2024 DBeaver Corp and others + * Copyright (C) 2020-2025 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. @@ -59,7 +59,7 @@ export const ExportNotification = observer(function ExportNotification({ - diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorTools.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorTools.tsx index ca7cb731a2..6f3391a36e 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorTools.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditorTools.tsx @@ -1,6 +1,6 @@ /* * CloudBeaver - Cloud Database Manager - * Copyright (C) 2020-2024 DBeaver Corp and others + * Copyright (C) 2020-2025 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. @@ -80,7 +80,7 @@ export const SqlEditorTools = observer(function SqlEditorTools({ data, st reset onChange={handleScriptUpload} > - + } name="/icons/import.svg" disabled={data.readonly} img /> )}