diff --git a/packages/ui/src/components/Box/definition.ts b/packages/ui/src/components/Box/definition.ts index 3837dc8ea4..c3a38326b2 100644 --- a/packages/ui/src/components/Box/definition.ts +++ b/packages/ui/src/components/Box/definition.ts @@ -52,6 +52,9 @@ export const BoxDefinition = defineComponent()({ 'py', 'position', 'display', + 'grow', + 'shrink', + 'basis', 'width', 'minWidth', 'maxWidth', diff --git a/packages/ui/src/components/Box/types.ts b/packages/ui/src/components/Box/types.ts index 1b4259099b..e333690e2e 100644 --- a/packages/ui/src/components/Box/types.ts +++ b/packages/ui/src/components/Box/types.ts @@ -15,7 +15,12 @@ */ import type { ReactNode, CSSProperties } from 'react'; -import type { Responsive, ProviderBg, SpaceProps } from '../../types'; +import type { + Responsive, + ProviderBg, + SpaceProps, + FlexItemProps, +} from '../../types'; /** @public */ export type BoxOwnProps = { @@ -43,6 +48,7 @@ export type BoxUtilityProps = { /** @public */ export interface BoxProps extends SpaceProps, + FlexItemProps, BoxOwnProps, BoxUtilityProps, Omit, 'children'> {} diff --git a/packages/ui/src/components/Card/Card.tsx b/packages/ui/src/components/Card/Card.tsx index aecca09512..6b46980c90 100644 --- a/packages/ui/src/components/Card/Card.tsx +++ b/packages/ui/src/components/Card/Card.tsx @@ -41,7 +41,7 @@ const INTERACTIVE_ELEMENT_SELECTOR = * @public */ export const Card = forwardRef((props, ref) => { - const { ownProps, restProps, dataAttributes } = useDefinition( + const { ownProps, restProps, dataAttributes, utilityStyle } = useDefinition( CardDefinition, props, ); @@ -98,6 +98,7 @@ export const Card = forwardRef((props, ref) => { {...dataAttributes} {...restProps} onClick={isInteractive ? handleClick : undefined} + style={{ ...ownProps.style, ...utilityStyle }} > {href && ( ()({ target: {}, rel: {}, download: {}, + style: {}, }, + utilityProps: ['grow', 'shrink', 'basis'], }); /** diff --git a/packages/ui/src/components/Card/types.ts b/packages/ui/src/components/Card/types.ts index 5809384c16..08fb906058 100644 --- a/packages/ui/src/components/Card/types.ts +++ b/packages/ui/src/components/Card/types.ts @@ -16,9 +16,13 @@ import type { ReactNode } from 'react'; import type { ButtonProps as RAButtonProps } from 'react-aria-components'; +import type { FlexItemProps } from '../../types'; /** @public */ -export type CardBaseProps = { children?: ReactNode; className?: string }; +export type CardBaseProps = { + children?: ReactNode; + className?: string; +}; /** @public */ export type CardButtonVariant = { @@ -63,6 +67,7 @@ export type CardStaticVariant = { * @public */ export type CardProps = CardBaseProps & + FlexItemProps & Omit, 'onClick'> & (CardButtonVariant | CardLinkVariant | CardStaticVariant); diff --git a/packages/ui/src/components/Flex/definition.ts b/packages/ui/src/components/Flex/definition.ts index 802464c4e1..1bc9c54217 100644 --- a/packages/ui/src/components/Flex/definition.ts +++ b/packages/ui/src/components/Flex/definition.ts @@ -53,5 +53,8 @@ export const FlexDefinition = defineComponent()({ 'align', 'justify', 'direction', + 'grow', + 'shrink', + 'basis', ], }); diff --git a/packages/ui/src/components/Flex/types.ts b/packages/ui/src/components/Flex/types.ts index 1c7f887e62..5b295e1825 100644 --- a/packages/ui/src/components/Flex/types.ts +++ b/packages/ui/src/components/Flex/types.ts @@ -15,7 +15,13 @@ */ import type { ReactNode, CSSProperties } from 'react'; -import type { Responsive, Space, SpaceProps, ProviderBg } from '../../types'; +import type { + Responsive, + Space, + SpaceProps, + ProviderBg, + FlexItemProps, +} from '../../types'; /** @public */ export type FlexOwnProps = { @@ -28,6 +34,7 @@ export type FlexOwnProps = { /** @public */ export interface FlexProps extends SpaceProps, + FlexItemProps, FlexOwnProps, Omit, 'children'> { gap?: Responsive; diff --git a/packages/ui/src/components/Grid/definition.ts b/packages/ui/src/components/Grid/definition.ts index 606b286b3c..2d83e9db6a 100644 --- a/packages/ui/src/components/Grid/definition.ts +++ b/packages/ui/src/components/Grid/definition.ts @@ -51,6 +51,9 @@ export const GridDefinition = defineComponent()({ 'pt', 'px', 'py', + 'grow', + 'shrink', + 'basis', ], }); diff --git a/packages/ui/src/components/Grid/types.ts b/packages/ui/src/components/Grid/types.ts index 6ad5d564c6..90699c59d2 100644 --- a/packages/ui/src/components/Grid/types.ts +++ b/packages/ui/src/components/Grid/types.ts @@ -21,6 +21,7 @@ import type { Responsive, Columns, ProviderBg, + FlexItemProps, } from '../../types'; /** @public */ @@ -34,6 +35,7 @@ export type GridOwnProps = { /** @public */ export interface GridProps extends SpaceProps, + FlexItemProps, GridOwnProps, Omit, 'children'> { columns?: Responsive;