From 8c137662a26e80426923a83f27a4a4aeb899bf9d Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Mon, 27 Jan 2025 22:02:35 +0000 Subject: [PATCH] Update report Signed-off-by: Charles de Dreuille --- packages/canon/report.api.md | 173 +++++++++++++++++-- packages/canon/src/components/Grid/index.ts | 2 + packages/canon/src/components/Stack/index.ts | 2 + 3 files changed, 162 insertions(+), 15 deletions(-) diff --git a/packages/canon/report.api.md b/packages/canon/report.api.md index 64a1482867..33efa37c7d 100644 --- a/packages/canon/report.api.md +++ b/packages/canon/report.api.md @@ -289,6 +289,21 @@ export type FlexDirection = 'row' | 'column'; // @public (undocumented) export type FlexWrap = 'wrap' | 'nowrap' | 'wrap-reverse'; +// @public (undocumented) +export const gapPropDefs: { + gap: { + type: 'enum | string'; + className: string; + customProperties: '--gap'[]; + values: string[]; + responsive: true; + default: string; + }; +}; + +// @public (undocumented) +export type GapProps = GetPropDefTypes; + // @public (undocumented) export type GetPropDefType = Def extends BooleanPropDef ? Def extends ResponsivePropDef @@ -326,24 +341,144 @@ export const Grid: ForwardRefExoticComponent< >; }; +// @public (undocumented) +export type GridItemOwnProps = GetPropDefTypes; + +// @public (undocumented) +export const gridItemPropDefs: { + colSpan: { + type: 'enum | string'; + className: string; + customProperties: '--col-span'[]; + values: readonly [ + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + '10', + '11', + '12', + 'auto', + ]; + responsive: true; + }; + colEnd: { + type: 'enum | string'; + className: string; + customProperties: '--col-end'[]; + values: readonly [ + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + '10', + '11', + '12', + 'auto', + ]; + responsive: true; + }; + colStart: { + type: 'enum | string'; + className: string; + customProperties: '--col-start'[]; + values: readonly [ + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + '10', + '11', + '12', + 'auto', + ]; + responsive: true; + }; + rowSpan: { + type: 'enum | string'; + className: string; + customProperties: '--row-span'[]; + values: readonly [ + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + '10', + '11', + '12', + 'auto', + ]; + responsive: true; + }; +}; + // @public (undocumented) export interface GridItemProps { // (undocumented) - children: React.ReactNode; + children?: React.ReactNode; // (undocumented) className?: string; // (undocumented) - colEnd?: UtilityProps['colEnd']; + colEnd?: GridItemOwnProps['colEnd']; // (undocumented) - colSpan?: UtilityProps['colSpan']; + colSpan?: GridItemOwnProps['colSpan']; // (undocumented) - colStart?: UtilityProps['colStart']; + colStart?: GridItemOwnProps['colStart']; // (undocumented) - rowSpan?: UtilityProps['rowSpan']; + rowSpan?: GridItemOwnProps['rowSpan']; // (undocumented) style?: React.CSSProperties; } +// @public (undocumented) +export type GridOwnProps = GetPropDefTypes; + +// @public (undocumented) +export const gridPropDefs: { + columns: { + type: 'enum | string'; + className: string; + customProperties: '--columns'[]; + values: readonly [ + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + '10', + '11', + '12', + 'auto', + ]; + responsive: true; + default: string; + }; +}; + // @public (undocumented) export interface GridProps extends SpaceProps { // (undocumented) @@ -351,9 +486,9 @@ export interface GridProps extends SpaceProps { // (undocumented) className?: string; // (undocumented) - columns?: UtilityProps['columns']; + columns?: GridOwnProps['columns']; // (undocumented) - gap?: UtilityProps['gap']; + gap?: GapProps['gap']; // (undocumented) style?: React.CSSProperties; } @@ -723,22 +858,30 @@ export const Stack: ForwardRefExoticComponent< StackProps & RefAttributes >; +// @public (undocumented) +export type StackOwnProps = GetPropDefTypes; + +// @public (undocumented) +export const stackPropDefs: { + align: { + type: 'enum'; + className: string; + values: readonly ['start', 'center', 'end', 'baseline', 'stretch']; + responsive: true; + default: 'stretch'; + }; +}; + // @public (undocumented) export interface StackProps extends SpaceProps { // (undocumented) - align?: - | 'left' - | 'center' - | 'right' - | Partial>; - // (undocumented) - as?: AsProps; + align?: StackOwnProps['align']; // (undocumented) children: React.ReactNode; // (undocumented) className?: string; // (undocumented) - gap?: UtilityProps['gap']; + gap?: GapProps['gap']; // (undocumented) style?: React.CSSProperties; } diff --git a/packages/canon/src/components/Grid/index.ts b/packages/canon/src/components/Grid/index.ts index b2534c6b77..fd10e7fe68 100644 --- a/packages/canon/src/components/Grid/index.ts +++ b/packages/canon/src/components/Grid/index.ts @@ -14,4 +14,6 @@ * limitations under the License. */ export { Grid } from './Grid'; +export { gridPropDefs, gridItemPropDefs } from './Grid.props'; export type { GridProps, GridItemProps } from './types'; +export type { GridOwnProps, GridItemOwnProps } from './Grid.props'; diff --git a/packages/canon/src/components/Stack/index.ts b/packages/canon/src/components/Stack/index.ts index 7abbc3f439..122d0ee57c 100644 --- a/packages/canon/src/components/Stack/index.ts +++ b/packages/canon/src/components/Stack/index.ts @@ -14,4 +14,6 @@ * limitations under the License. */ export { Stack } from './Stack'; +export { stackPropDefs } from './Stack.props'; export type { StackProps } from './types'; +export type { StackOwnProps } from './Stack.props';