From 6ddf198f29ce4595d97c5be12bc908d60f527978 Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Tue, 17 Dec 2024 18:42:38 +0000 Subject: [PATCH] Fix report Signed-off-by: Charles de Dreuille --- packages/canon/report.api.md | 37 +++++++++++++++++++ packages/canon/src/components/Field/Field.tsx | 1 + packages/canon/src/components/Field/index.ts | 16 ++++++++ packages/canon/src/components/Input/Input.tsx | 1 + packages/canon/src/components/Input/index.ts | 16 ++++++++ packages/canon/src/index.ts | 2 + 6 files changed, 73 insertions(+) create mode 100644 packages/canon/src/components/Field/index.ts create mode 100644 packages/canon/src/components/Input/index.ts diff --git a/packages/canon/report.api.md b/packages/canon/report.api.md index d3f9e6fa80..e50077c7df 100644 --- a/packages/canon/report.api.md +++ b/packages/canon/report.api.md @@ -5,7 +5,9 @@ ```ts /// +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 { default as React_2 } from 'react'; import * as React_3 from 'react'; import { RefAttributes } from 'react'; @@ -216,6 +218,35 @@ export type DisplayProps = | 'block' | Partial>; +// @public (undocumented) +export const Field: { + Root: React_2.ForwardRefExoticComponent< + Omit, 'ref'> & + React_2.RefAttributes + >; + Label: React_2.ForwardRefExoticComponent< + Omit, 'ref'> & + React_2.RefAttributes + >; + Description: React_2.ForwardRefExoticComponent< + Omit< + Field_2.Description.Props & React_2.RefAttributes, + 'ref' + > & + React_2.RefAttributes + >; + Error: React_2.ForwardRefExoticComponent< + Omit, 'ref'> & + React_2.RefAttributes + >; + Validity: ({ + children, + ...props + }: React_2.ComponentPropsWithoutRef< + typeof Field_2.Validity + >) => React_2.JSX.Element; +}; + // @public (undocumented) export type FlexDirectionProps = | 'row' @@ -331,6 +362,12 @@ export interface InlineProps extends SpaceProps, ColorProps { style?: React.CSSProperties; } +// @public (undocumented) +export const Input: React_2.ForwardRefExoticComponent< + Omit, 'ref'> & + React_2.RefAttributes +>; + // @public (undocumented) export type JustifyContentProps = | 'stretch' diff --git a/packages/canon/src/components/Field/Field.tsx b/packages/canon/src/components/Field/Field.tsx index 78cc638662..a121baab9f 100644 --- a/packages/canon/src/components/Field/Field.tsx +++ b/packages/canon/src/components/Field/Field.tsx @@ -75,6 +75,7 @@ const FieldValidity = ({ ); +/** @public */ export const Field = { Root: FieldRoot, Label: FieldLabel, diff --git a/packages/canon/src/components/Field/index.ts b/packages/canon/src/components/Field/index.ts new file mode 100644 index 0000000000..b96bd91ebe --- /dev/null +++ b/packages/canon/src/components/Field/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export { Field } from './Field'; diff --git a/packages/canon/src/components/Input/Input.tsx b/packages/canon/src/components/Input/Input.tsx index c5b3aad5f5..ca90e94f8f 100644 --- a/packages/canon/src/components/Input/Input.tsx +++ b/packages/canon/src/components/Input/Input.tsx @@ -18,6 +18,7 @@ import React from 'react'; import { Input as InputPrimitive } from '@base-ui-components/react/input'; import clsx from 'clsx'; +/** @public */ const Input = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef diff --git a/packages/canon/src/components/Input/index.ts b/packages/canon/src/components/Input/index.ts new file mode 100644 index 0000000000..a757e30478 --- /dev/null +++ b/packages/canon/src/components/Input/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export { Input } from './Input'; diff --git a/packages/canon/src/index.ts b/packages/canon/src/index.ts index d6a375b8dd..e06207bd06 100644 --- a/packages/canon/src/index.ts +++ b/packages/canon/src/index.ts @@ -35,3 +35,5 @@ export * from './components/Button'; export * from './components/Icon'; export * from './components/Checkbox'; export * from './components/Table'; +export * from './components/Field'; +export * from './components/Input';