From 36987dbdfd919481651e2d66622ba88810c40c61 Mon Sep 17 00:00:00 2001 From: Johan Persson Date: Tue, 3 Mar 2026 14:18:29 +0100 Subject: [PATCH] chore(ui): add changesets and update API report Signed-off-by: Johan Persson --- .changeset/giant-singers-rush.md | 7 +++++++ .changeset/wide-pianos-pay.md | 7 +++++++ packages/ui/report.api.md | 32 +++++++++++++++++++------------- 3 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 .changeset/giant-singers-rush.md create mode 100644 .changeset/wide-pianos-pay.md diff --git a/.changeset/giant-singers-rush.md b/.changeset/giant-singers-rush.md new file mode 100644 index 0000000000..e1f0493caa --- /dev/null +++ b/.changeset/giant-singers-rush.md @@ -0,0 +1,7 @@ +--- +'@backstage/ui': patch +--- + +Fixed handling of the `style` prop on `Button`, `ButtonIcon`, and `ButtonLink` so that it is now correctly forwarded to the underlying element instead of being silently dropped. + +**Affected components:** Button, ButtonIcon, ButtonLink diff --git a/.changeset/wide-pianos-pay.md b/.changeset/wide-pianos-pay.md new file mode 100644 index 0000000000..1cbcfd993c --- /dev/null +++ b/.changeset/wide-pianos-pay.md @@ -0,0 +1,7 @@ +--- +'@backstage/ui': patch +--- + +Extended `AlertProps`, `ContainerProps`, `DialogBodyProps`, and `FieldLabelProps` with native div element props to allow passing attributes like `aria-*` and `data-*`. + +**Affected components:** Alert, Container, DialogBody, FieldLabel diff --git a/packages/ui/report.api.md b/packages/ui/report.api.md index 572b6701d7..b51c9722ed 100644 --- a/packages/ui/report.api.md +++ b/packages/ui/report.api.md @@ -243,7 +243,13 @@ export type AlertOwnProps = { }; // @public -export interface AlertProps extends MarginProps, AlertOwnProps {} +export interface AlertProps + extends MarginProps, + AlertOwnProps, + Omit< + React.ComponentPropsWithoutRef<'div'>, + keyof AlertOwnProps | keyof MarginProps + > {} // @public (undocumented) export type AlignItems = 'stretch' | 'start' | 'center' | 'end'; @@ -441,7 +447,6 @@ export const ButtonDefinition: { readonly iconEnd: {}; readonly children: {}; readonly className: {}; - readonly style: {}; }; }; @@ -475,7 +480,6 @@ export const ButtonIconDefinition: { }; readonly icon: {}; readonly className: {}; - readonly style: {}; }; }; @@ -486,12 +490,11 @@ export type ButtonIconOwnProps = { icon?: ReactElement; loading?: boolean; className?: string; - style?: CSSProperties; }; // @public export interface ButtonIconProps - extends Omit, + extends Omit, ButtonIconOwnProps {} // @public (undocumented) @@ -522,7 +525,6 @@ export const ButtonLinkDefinition: { readonly iconEnd: {}; readonly children: {}; readonly className: {}; - readonly style: {}; }; }; @@ -534,12 +536,11 @@ export type ButtonLinkOwnProps = { iconEnd?: ReactElement; children?: ReactNode; className?: string; - style?: CSSProperties; }; // @public export interface ButtonLinkProps - extends Omit, + extends Omit, ButtonLinkOwnProps {} // @public (undocumented) @@ -552,12 +553,11 @@ export type ButtonOwnProps = { loading?: boolean; children?: ReactNode; className?: string; - style?: CSSProperties; }; // @public export interface ButtonProps - extends Omit, + extends Omit, ButtonOwnProps {} // @public @@ -876,7 +876,9 @@ export type ContainerOwnProps = { }; // @public (undocumented) -export interface ContainerProps extends ContainerOwnProps { +export interface ContainerProps + extends ContainerOwnProps, + Omit, keyof ContainerOwnProps> { // (undocumented) mb?: SpaceProps['mb']; // (undocumented) @@ -950,7 +952,9 @@ export type DialogBodyOwnProps = { }; // @public -export interface DialogBodyProps extends DialogBodyOwnProps {} +export interface DialogBodyProps + extends DialogBodyOwnProps, + Omit, keyof DialogBodyOwnProps> {} // @public export const DialogDefinition: { @@ -1092,7 +1096,9 @@ export type FieldLabelOwnProps = { }; // @public (undocumented) -export interface FieldLabelProps extends FieldLabelOwnProps {} +export interface FieldLabelProps + extends FieldLabelOwnProps, + Omit, keyof FieldLabelOwnProps> {} // @public (undocumented) export interface FilterState {