File tree Expand file tree Collapse file tree 4 files changed +28
-0
lines changed
packages/core/src/components Expand file tree Collapse file tree 4 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import Search from "../Search/Search";
99import { BASE_SIZES } from "../../constants" ;
1010import { Button } from "@vibe/button" ;
1111import { Text } from "@vibe/typography" ;
12+ import { useWarnDeprecated } from "../../utils/warn-deprecated" ;
1213import ComboboxOption from "./components/ComboboxOption/ComboboxOption" ;
1314import { defaultFilter } from "./ComboboxService" ;
1415import { ComboboxItems } from "./components/ComboboxItems/ComboboxItems" ;
@@ -232,6 +233,12 @@ const Combobox = forwardRef(
232233 } : ComboboxProps ,
233234 ref : React . ForwardedRef < HTMLElement >
234235 ) => {
236+ useWarnDeprecated ( {
237+ component : "Combobox" ,
238+ message :
239+ "This component is deprecated and will be removed in the next major version. Please use Dropdown box mode from @vibe/core/next instead."
240+ } ) ;
241+
235242 const componentRef = useRef ( null ) ;
236243 const inputRef = useRef ( null ) ;
237244 const mergedRef = useMergeRef ( ref , componentRef ) ;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import { type VibeComponentProps } from "../../types";
1919import { getTestId } from "../../tests/test-ids-utils" ;
2020import { ComponentDefaultTestId , ComponentVibeId } from "../../tests/constants" ;
2121import { NOOP } from "../../utils/function-utils" ;
22+ import { useWarnDeprecated } from "../../utils/warn-deprecated" ;
2223import styles from "./DatePicker.module.scss" ;
2324// Make sure to update when upgrading react-dates
2425import "./external_datepicker.scss" ;
@@ -105,6 +106,12 @@ const DatePicker = forwardRef(
105106 } : DatePickerProps ,
106107 ref : React . ForwardedRef < HTMLDivElement >
107108 ) => {
109+ useWarnDeprecated ( {
110+ component : "DatePicker" ,
111+ message :
112+ "This component is deprecated and will be removed in the next major version. Please use DatePicker from @vibe/core/next instead."
113+ } ) ;
114+
108115 const [ focusedInput , setFocusedInput ] = useState ( FocusInput . startDate ) ;
109116 const [ isMonthYearSelection , setIsMonthYearSelection ] = useState ( false ) ; //show Month/Year selection dropdown
110117 const [ overrideDateForView , setOverrideDateForView ] = useState < Moment | null > ( null ) ;
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import {
2727import generateBaseStyles , { customTheme } from "./Dropdown.styles" ;
2828import Control from "./components/Control/Control" ;
2929import { Text } from "@vibe/typography" ;
30+ import { useWarnDeprecated } from "../../utils/warn-deprecated" ;
3031import menuStyles from "./components/menu/menu.module.scss" ;
3132import styles from "./Dropdown.module.scss" ;
3233import {
@@ -120,6 +121,12 @@ const Dropdown = forwardRef(
120121 } : DropdownComponentProps ,
121122 ref : React . ForwardedRef < HTMLElement >
122123 ) => {
124+ useWarnDeprecated ( {
125+ component : "Dropdown" ,
126+ message :
127+ "This component is deprecated and will be removed in the next major version. Please use Dropdown from @vibe/core/next instead."
128+ } ) ;
129+
123130 const controlRef = useRef ( ) ;
124131 const { layerRef } = useContext ( LayerContext ) ;
125132 const overrideMenuPortalTarget =
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import { NOOP } from "../../utils/function-utils";
1717import { withStaticPropsWithoutForwardRef } from "../../types" ;
1818import { getTestId } from "../../tests/test-ids-utils" ;
1919import { ComponentDefaultTestId } from "../../tests/constants" ;
20+ import { useWarnDeprecated } from "../../utils/warn-deprecated" ;
2021import styles from "./LegacyModal.module.scss" ;
2122import { type ModalWidth } from "./LegacyModal.types" ;
2223import { LayerProvider } from "@vibe/layer" ;
@@ -104,6 +105,12 @@ const Modal = ({
104105 unmountOnClose = true ,
105106 "data-testid" : dataTestId
106107} : LegacyModalProps ) => {
108+ useWarnDeprecated ( {
109+ component : "Modal (Legacy)" ,
110+ message :
111+ "This component is deprecated and will be removed in the next major version. Please use Modal from @vibe/core/next instead."
112+ } ) ;
113+
107114 const childrenArray : ReactElement [ ] = useMemo (
108115 ( ) => ( children ? ( React . Children . toArray ( children ) as ReactElement [ ] ) : [ ] ) ,
109116 [ children ]
You can’t perform that action at this time.
0 commit comments