Skip to content

Commit

Permalink
fix(no-deprecated-type-references): add IInputGroupProps2 (#6075)
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya authored Apr 18, 2023
1 parent 6dab069 commit 120130a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/common/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export type OptionProps = IOptionProps;
const INVALID_PROPS = [
"active",
"alignText",
"asyncControl", // IInputGroupProps2
"asyncControl", // InputGroupProps2
"containerRef",
"current",
"elementRef",
Expand Down
9 changes: 5 additions & 4 deletions packages/core/src/components/forms/inputGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ import { Icon, IconName } from "../icon/icon";
import { AsyncControllableInput } from "./asyncControllableInput";
import type { InputSharedProps } from "./inputSharedProps";

/** @deprecated use InputGroupProps2 */
// eslint-disable-next-line deprecation/deprecation
export type InputGroupProps = IInputGroupProps;

/**
* @deprecated use IInputGroupProps2.
* @deprecated use InputGroupProps2.
*
* NOTE: This interface does not extend HTMLInputProps due to incompatiblity with `IControlledProps`.
* Instead, we union the props in the component definition, which does work and properly disallows `string[]` values.
Expand Down Expand Up @@ -122,10 +123,10 @@ export interface IInputGroupProps
type?: string;
}

// eslint-disable-next-line deprecation/deprecation
export type InputGroupProps2 = IInputGroupProps2;
/** @deprecated use InputGroupProps2 */
export interface IInputGroupProps2
export type IInputGroupProps2 = InputGroupProps2;

export interface InputGroupProps2
extends Omit<HTMLInputProps, keyof ControlledProps2>,
ControlledProps2,
InputSharedProps {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/forms/text-inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ but there is basic support for it using the `asyncControl` prop. Note that the i
to the end of the input if the speed of text entry (time between change events) is faster than the
speed of the async update.

@interface IInputGroupProps
@interface InputGroupProps2

@### CSS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ const DEPRECATED_TYPE_REFERENCES_BY_PACKAGE = {
"IIntentProps",
"IActionProps",
"ILinkProps",
"IControlledProps",
["IControlledProps", "ControlledProps2"],
"IControlledProps2",
"IOptionProps",
"IKeyAllowlist",
"IKeyDenylist",
Expand All @@ -53,7 +54,8 @@ const DEPRECATED_TYPE_REFERENCES_BY_PACKAGE = {
"ICheckboxProps",
"IFileInputProps",
"IFormGroupProps",
"IInputGroupProps",
["IInputGroupProps", "InputGroupProps2"],
"IInputGroupProps2",
"INumericInputProps",
"IRadioGroupProps",
"ITextAreaProps",
Expand Down

1 comment on commit 120130a

@adidahiya
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix(no-deprecated-type-references): add IInputGroupProps2 (#6075)

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Please sign in to comment.