import type * as TStyles from "../../styles/types"; import type * as G from "../../types/global"; import type { Attributes, ClassName } from "@reshaped/headless"; import type React from "react"; type Columns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "auto"; export type Direction = "row" | "column" | "row-reverse" | "column-reverse"; export type Props = { /** Node for inserting the content */ children?: React.ReactNode; /** Render as a different element */ as?: TagName extends keyof React.JSX.IntrinsicElements ? TagName : keyof React.JSX.IntrinsicElements; /** Render a divider between each child */ divided?: boolean; /** Flex direction for the content */ direction?: G.Responsive; /** Gap between children, base unit token number multiplier */ gap?: G.Responsive; /** Flex wrap for the content */ wrap?: G.Responsive; /** Flex align-items for the content */ align?: G.Responsive; /** Flex justify-content for the content */ justify?: G.Responsive; /** Height style, literal string value or a base unit token number multiplier */ height?: G.Responsive; /** Width style, literal string value or a base unit token number multiplier */ width?: G.Responsive; /** Aspect ratio style, represented as width / height */ aspectRatio?: G.Responsive; /** Maximum height style, literal string value or a base unit token number multiplier */ maxHeight?: G.Responsive; /** Maximum width style, literal string value or a base unit token number multiplier */ maxWidth?: G.Responsive; /** Minimum height style, literal string value or a base unit token number multiplier */ minHeight?: G.Responsive; /** Minimum width style, literal string value or a base unit token number multiplier */ minWidth?: G.Responsive; /** Padding style for all sides, base unit token number multiplier */ padding?: G.Responsive; /** Padding top, base unit token number multiplier */ paddingTop?: G.Responsive; /** Padding bottom, base unit token number multiplier */ paddingBottom?: G.Responsive; /** Padding inline start, base unit token number multiplier */ paddingStart?: G.Responsive; /** Padding inline end, base unit token number multiplier */ paddingEnd?: G.Responsive; /** Padding inline, base unit token number multiplier */ paddingInline?: G.Responsive; /** Padding block, base unit token number multiplier */ paddingBlock?: G.Responsive; /** Apply negative margin and remove side borders, base unit token number multiplier */ bleed?: G.Responsive; /** Text align for the content */ textAlign?: G.Responsive; /** Background color, based on the color tokens */ backgroundColor?: "neutral" | "neutral-faded" | "critical" | "critical-faded" | "positive" | "warning" | "warning-faded" | "positive-faded" | "primary" | "primary-faded" | "elevation-base" | "elevation-raised" | "elevation-overlay" | "page" | "page-faded" | "disabled" | "disabled-faded" | "brand" | "white" | "black"; /** Border color, based on the color tokens */ borderColor?: G.Responsive; /** Add border to all sides */ border?: G.Responsive; /** Add border to the top side */ borderTop?: G.Responsive; /** Add border to the bottom side */ borderBottom?: G.Responsive; /** Add border to the inline start side */ borderStart?: G.Responsive; /** Add border to the inline end side */ borderEnd?: G.Responsive; /** Add border to the inline direction */ borderInline?: G.Responsive; /** Add border to the block direction */ borderBlock?: G.Responsive; /** Border radius, based on the radius tokens */ borderRadius?: G.Responsive; /** Position style */ position?: G.Responsive; /** Inset style, base unit token number multiplier when used as a number */ inset?: G.Responsive; /** Inset start, base unit token number multiplier when used as a number */ insetStart?: G.Responsive; /** Inset end, base unit token number multiplier when used as a number */ insetEnd?: G.Responsive; /** Inset top, base unit token number multiplier when used as a number */ insetTop?: G.Responsive; /** Inset bottom, base unit token number multiplier when used as a number */ insetBottom?: G.Responsive; /** z-index style */ zIndex?: number; /** Shadow style, based on the shadow tokens */ shadow?: "raised" | "overlay"; /** Overflow style */ overflow?: "hidden" | "auto"; /** Add transition for the properties */ animated?: boolean; /** Additional classname for the root element */ className?: ClassName; /** Additional attributes for the root element */ attributes?: Attributes; } & Pick; export type ItemProps = { /** Flex order of the item inside the parent */ order?: G.Responsive; /** Number of columns the item should span in the parent, View uses 12 columns */ columns?: G.Responsive; /** Apply flex-grow, using it on View.Item applies additional styles on the parent View */ grow?: G.Responsive; /** Apply flex-shrink */ shrink?: boolean; /** Individual gap before the item, overrides the parent View gap */ gapBefore?: G.Responsive | "auto"; /** Render as a different element */ as?: TagName extends keyof React.JSX.IntrinsicElements ? TagName : keyof React.JSX.IntrinsicElements; /** Additional attributes for the root element */ attributes?: Attributes; /** Additional classname for the root element */ className?: ClassName; /** Node for inserting the item content */ children?: React.ReactNode; }; export type RenderItem = (args: { className?: string; child: any; index: number; }) => React.ReactNode; export type RenderDivider = (args: { className?: string; key: string; }) => React.ReactNode; export {};