Fix report + changeset

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
Charles de Dreuille
2025-03-24 18:06:28 +00:00
parent b06f680a99
commit 5074d61cf1
5 changed files with 39 additions and 43 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/canon': minor
---
Added a new TextField component to replace the Field and Input component. After feedback, it became clear that we needed to build a more opinionated version to avoid any problem in the future.
+29 -43
View File
@@ -5,9 +5,7 @@
```ts
import { Context } from 'react';
import type { CSSProperties } from 'react';
import { Field as Field_2 } from '@base-ui-components/react/field';
import { ForwardRefExoticComponent } from 'react';
import { Input as Input_2 } from '@base-ui-components/react/input';
import { Menu as Menu_2 } from '@base-ui-components/react/menu';
import { default as React_2 } from 'react';
import * as React_3 from 'react';
@@ -245,36 +243,6 @@ export type EnumPropDef<T> = {
required?: boolean;
};
// @public (undocumented)
export const Field: {
Root: React_2.ForwardRefExoticComponent<
Omit<Field_2.Root.Props & React_2.RefAttributes<HTMLDivElement>, 'ref'> &
React_2.RefAttributes<HTMLDivElement>
>;
Label: React_2.ForwardRefExoticComponent<
Omit<Field_2.Label.Props & React_2.RefAttributes<any>, 'ref'> &
React_2.RefAttributes<any>
>;
Description: React_2.ForwardRefExoticComponent<
Omit<
Field_2.Description.Props & React_2.RefAttributes<HTMLParagraphElement>,
'ref'
> &
React_2.RefAttributes<HTMLParagraphElement>
>;
Error: React_2.ForwardRefExoticComponent<
Omit<Field_2.Error.Props & React_2.RefAttributes<HTMLDivElement>, 'ref'> &
React_2.RefAttributes<HTMLDivElement>
>;
Validity: ({
children,
className,
...props
}: React_2.ComponentPropsWithoutRef<typeof Field_2.Validity> & {
className?: string;
}) => React_2.JSX.Element;
};
// @public (undocumented)
export const Flex: ForwardRefExoticComponent<
FlexProps & RefAttributes<HTMLDivElement>
@@ -717,17 +685,6 @@ export interface IconProviderProps {
// @public (undocumented)
export const icons: IconMap;
// @public (undocumented)
export const Input: React_2.ForwardRefExoticComponent<
InputProps & React_2.RefAttributes<HTMLInputElement>
>;
// @public (undocumented)
export interface InputProps extends Omit<Input_2.Props, 'size'> {
// (undocumented)
size?: 'sm' | 'md';
}
// @public (undocumented)
export type JustifyContent =
| 'stretch'
@@ -1067,6 +1024,35 @@ const Text_2: React_2.ForwardRefExoticComponent<
>;
export { Text_2 as Text };
// @public (undocumented)
export const TextField: React_2.ForwardRefExoticComponent<
TextFieldProps & React_2.RefAttributes<HTMLInputElement>
>;
// @public (undocumented)
export type TextFieldOwnProps = GetPropDefTypes<typeof textFieldPropDefs>;
// @public (undocumented)
export const textFieldPropDefs: {
size: {
type: 'enum';
values: ('small' | 'medium')[];
className: string;
default: 'medium';
responsive: true;
};
};
// @public (undocumented)
export interface TextFieldProps
extends Omit<React.ComponentPropsWithoutRef<'input'>, 'size'> {
className?: string;
description?: string;
label?: string;
name: string;
size?: TextFieldOwnProps['size'];
}
// @public (undocumented)
export interface TextProps {
// (undocumented)
@@ -15,3 +15,6 @@
*/
export * from './TextField';
export type { TextFieldProps } from './types';
export { textFieldPropDefs } from './TextField.props';
export type { TextFieldOwnProps } from './TextField.props';
@@ -15,6 +15,7 @@
*/
import type { TextFieldOwnProps } from './TextField.props';
/** @public */
export interface TextFieldProps
extends Omit<React.ComponentPropsWithoutRef<'input'>, 'size'> {
/**
+1
View File
@@ -8,6 +8,7 @@
"plugins/*/dev",
"plugins/*/migrations"
],
"exclude": ["**/*.stories.tsx", "**/*.stories.ts"],
"compilerOptions": {
"outDir": "dist-types",
"rootDir": ".",