From cb845bee3423ea598323d2a2429547abd9096452 Mon Sep 17 00:00:00 2001 From: Thomas Zerr Date: Tue, 5 Sep 2023 08:53:03 +0200 Subject: [PATCH] Components that are now deprecated are marked as such --- scm-ui/ui-components/src/Icon.tsx | 7 +++-- scm-ui/ui-components/src/Tooltip.tsx | 7 +++-- .../ui-components/src/buttons/AddButton.tsx | 3 ++ scm-ui/ui-components/src/buttons/Button.tsx | 3 ++ .../src/buttons/ButtonAddons.tsx | 3 ++ .../ui-components/src/buttons/ButtonGroup.tsx | 3 ++ .../src/buttons/CreateButton.tsx | 3 ++ .../src/buttons/DeleteButton.tsx | 3 ++ .../src/buttons/DownloadButton.tsx | 3 ++ .../ui-components/src/buttons/EditButton.tsx | 3 ++ .../src/buttons/LinkStyleButton.tsx | 3 ++ .../src/buttons/NoStyleButton.tsx | 3 ++ .../src/buttons/OpenInFullscreenButton.tsx | 3 ++ .../src/buttons/RemoveEntryOfTableButton.tsx | 3 ++ .../src/buttons/SubmitButton.tsx | 3 ++ .../src/forms/AddEntryToTableField.tsx | 4 +++ .../forms/AddKeyValueEntryToTableField.tsx | 5 +++- .../AutocompleteAddEntryToTableField.tsx | 3 ++ scm-ui/ui-components/src/forms/Checkbox.tsx | 3 ++ scm-ui/ui-components/src/forms/FileInput.tsx | 3 ++ scm-ui/ui-components/src/forms/FileUpload.tsx | 3 ++ .../ui-components/src/forms/FilterInput.tsx | 5 +++- .../src/forms/FormFieldTypes.tsx | 30 +++++++++++++++++++ .../src/forms/LabelWithHelpIcon.tsx | 3 ++ .../src/forms/MemberNameTagGroup.tsx | 6 ++++ .../src/forms/PasswordConfirmation.tsx | 3 ++ scm-ui/ui-components/src/forms/Radio.tsx | 3 ++ scm-ui/ui-components/src/forms/Select.tsx | 10 +++++-- scm-ui/ui-components/src/forms/TagGroup.tsx | 3 ++ scm-ui/ui-components/src/forms/Textarea.tsx | 6 ++++ .../src/forms/TriStateCheckbox.tsx | 3 ++ .../ui-components/src/forms/useAutofocus.ts | 3 ++ scm-ui/ui-components/src/forms/useInnerRef.ts | 3 ++ scm-ui/ui-components/src/popover/Popover.tsx | 15 ++++++---- .../ui-components/src/popover/usePopover.ts | 3 ++ scm-ui/ui-components/src/table/Column.tsx | 3 ++ scm-ui/ui-components/src/table/InfoTable.tsx | 3 ++ scm-ui/ui-components/src/table/SortIcon.tsx | 3 ++ scm-ui/ui-components/src/table/Table.tsx | 16 ++++++---- scm-ui/ui-components/src/table/TextColumn.tsx | 3 ++ 40 files changed, 179 insertions(+), 19 deletions(-) diff --git a/scm-ui/ui-components/src/Icon.tsx b/scm-ui/ui-components/src/Icon.tsx index f610344b3f..b5a0cdb9eb 100644 --- a/scm-ui/ui-components/src/Icon.tsx +++ b/scm-ui/ui-components/src/Icon.tsx @@ -38,6 +38,9 @@ type Props = { alt?: string; }; +/** + * @deprecated + */ const Icon: FC = ({ iconStyle = "fas", color = "secondary", @@ -48,12 +51,12 @@ const Icon: FC = ({ testId, tabIndex, onEnter, - alt = title + alt = title, }) => { return ( event.key === "Enter" && onEnter && onEnter(event)} + onKeyPress={(event) => event.key === "Enter" && onEnter && onEnter(event)} title={title} className={classNames(iconStyle, "fa-fw", "fa-" + name, `has-text-${color}`, className)} tabIndex={tabIndex} diff --git a/scm-ui/ui-components/src/Tooltip.tsx b/scm-ui/ui-components/src/Tooltip.tsx index 2d84ab48e8..2d134a0454 100644 --- a/scm-ui/ui-components/src/Tooltip.tsx +++ b/scm-ui/ui-components/src/Tooltip.tsx @@ -92,7 +92,7 @@ const Arrow = { bottom: ArrowBottom, left: ArrowLeft, right: ArrowRight, - top: ArrowTop + top: ArrowTop, }; const TooltipContainerBase = styled.div<{ multiline?: boolean }>` @@ -136,7 +136,7 @@ const Container = { bottom: TooltipContainerBottom, left: TooltipContainerLeft, right: TooltipContainerRight, - top: TooltipContainerTop + top: TooltipContainerTop, }; type Props = { @@ -150,6 +150,9 @@ type Props = { export type TooltipLocation = "bottom" | "right" | "top" | "left"; +/** + * @deprecated use {@link ui-overlays/Tooltip} instead + */ const Tooltip: FC = ({ className, message, location = "right", multiline, children, id }) => { const [open, setOpen] = useState(false); diff --git a/scm-ui/ui-components/src/buttons/AddButton.tsx b/scm-ui/ui-components/src/buttons/AddButton.tsx index 4c321d9d68..f6eab55773 100644 --- a/scm-ui/ui-components/src/buttons/AddButton.tsx +++ b/scm-ui/ui-components/src/buttons/AddButton.tsx @@ -24,6 +24,9 @@ import React from "react"; import Button, { ButtonProps } from "./Button"; +/** + * @deprecated Use {@link ui-buttons/src/Button.tsx} instead + */ class AddButton extends React.Component { render() { return