From fb925aecdb27af47d40706f8bf14eae110f60b5c Mon Sep 17 00:00:00 2001 From: Bruno Henriques Date: Fri, 17 Jan 2025 15:58:50 +0000 Subject: [PATCH] docs: add @deprecate to deprecated components --- packages/core/src/Box/Box.tsx | 1 + packages/core/src/Focus/Focus.tsx | 1 + packages/core/src/Kpi/Kpi.tsx | 1 + packages/core/src/Link/Link.tsx | 1 + packages/core/src/List/List.tsx | 1 + packages/core/src/hocs/withTooltip.tsx | 1 + 6 files changed, 6 insertions(+) diff --git a/packages/core/src/Box/Box.tsx b/packages/core/src/Box/Box.tsx index 7796ffe8ee..977795c296 100644 --- a/packages/core/src/Box/Box.tsx +++ b/packages/core/src/Box/Box.tsx @@ -25,6 +25,7 @@ const sxFn = (sx: HvBoxProps["sx"]) => { * Customizable layout component that can be used to wrap other components. * It can be used to add styles to the wrapped components. * It can also be used to create a layout using the flexbox properties. + * @deprecated use native elements instead (e.g. `div`) */ export const HvBox = fixedForwardRef(function HvBox< C extends React.ElementType = "div", diff --git a/packages/core/src/Focus/Focus.tsx b/packages/core/src/Focus/Focus.tsx index cd3b5dd087..f7e3ac9d34 100644 --- a/packages/core/src/Focus/Focus.tsx +++ b/packages/core/src/Focus/Focus.tsx @@ -52,6 +52,7 @@ interface Focuses { jump: Element; } +/** @deprecated internal use only. this component has navigation issues. */ export const HvFocus = ({ classes: classesProp, children, diff --git a/packages/core/src/Kpi/Kpi.tsx b/packages/core/src/Kpi/Kpi.tsx index 668332ad65..3b8df48f77 100644 --- a/packages/core/src/Kpi/Kpi.tsx +++ b/packages/core/src/Kpi/Kpi.tsx @@ -60,6 +60,7 @@ export interface HvKpiProps extends HvBaseProps { * Key Performance Indicator is a type of performance measurement. It monitors a business indicator * and its success/failure against a given target. KPIs are the first item read on a dashboard. * Communicates simple, immediate and vital information for operational decision making. + * @deprecated build KPIs with `HvCard`, or with your custom layouts */ export const HvKpi = (props: HvKpiProps) => { const { diff --git a/packages/core/src/Link/Link.tsx b/packages/core/src/Link/Link.tsx index 484567d23b..945cee1963 100644 --- a/packages/core/src/Link/Link.tsx +++ b/packages/core/src/Link/Link.tsx @@ -19,6 +19,7 @@ export interface HvLinkProps extends HvBaseProps { classes?: HvLinkClasses; } +/** @deprecated use `` instead */ export const HvLink = (props: HvLinkProps) => { const { onClick, diff --git a/packages/core/src/List/List.tsx b/packages/core/src/List/List.tsx index c8040622f4..d3eb33b9ee 100644 --- a/packages/core/src/List/List.tsx +++ b/packages/core/src/List/List.tsx @@ -92,6 +92,7 @@ const DEFAULT_LABELS = { /** * Component used to show a set of related data to the user. + * @deprecated use `HvListContainer` + `HvListItem` instead */ export const HvList = (props: HvListProps) => { const { diff --git a/packages/core/src/hocs/withTooltip.tsx b/packages/core/src/hocs/withTooltip.tsx index 0fd10ae5f4..ca4197a111 100644 --- a/packages/core/src/hocs/withTooltip.tsx +++ b/packages/core/src/hocs/withTooltip.tsx @@ -11,6 +11,7 @@ const styles: { truncate: React.CSSProperties } = { }, }; +/** @deprecated wrap your component with `HvTooltip` */ export const withTooltip = ( Component: React.FunctionComponent,