import { type ComponentPropsWithoutRef, type CSSProperties, type ReactNode } from 'react'; import { type GRID_TOKEN_VALUES } from './constants'; type GridScaleTokenShorthand = keyof typeof GRID_TOKEN_VALUES; export type StackProps = { /** * The children of the stack. */ children?: ReactNode; /** * Direction of the stack, same as `flex-direction` CSS property * * @default undefined */ direction?: CSSProperties['flexDirection']; /** * Gap between children, same as `gap` CSS property * * Accepts primitive grid tokens, pixel strings, or numbers. * * Use primitive grid tokens like `"horizontal.1"` (14px) or `"vertical.0-1of2"` (12px). * * @default 0 */ gap?: GridScaleTokenShorthand | `${number}px` | number; /** * Whether to wrap children or not, same as `flex-wrap` CSS property * * @default undefined */ wrap?: CSSProperties['flexWrap']; /** * Alignment of children on the cross axis, same as `align-items` CSS property * * @default undefined */ alignItems?: CSSProperties['alignItems']; /** * Alignment of children on the main axis, same as `justify-content` CSS property * * @default undefined */ justifyContent?: CSSProperties['justifyContent']; } & ComponentPropsWithoutRef<'div'>; export type HStackProps = Omit & { /** * Direction of the horizontal stack * - When `false`, it will be `row` * - When `true`, it will be `row-reverse` * * @default false */ reverse?: boolean; }; export type VStackProps = Omit & { /** * Direction of the vertical stack. * - When `false`, it will be `column` * - When `true`, it will be `column-reverse` * * @default false */ reverse?: boolean; }; export {};