/** * Shared type definitions used across all components. * * Exports: * - ColorProp — semantic color names for the `color` prop * - SxObject — flat token shorthand record for the `sx` prop * - SxProps — full sx prop type (object or array) * - SlotPropsConfig — generic slots + slotProps pattern * - isColorProp() — type guard * - colorRoleMap — maps ColorProp → four colorScheme keys */ import type { ColorScheme } from '../tokens/colors'; /** * The set of semantic color values accepted by the `color` prop on every * component. Values correspond to `colorScheme` role groups in the theme. */ export type ColorProp = 'primary' | 'secondary' | 'tertiary' | 'error' | 'success' | 'warning' | 'info'; /** Type guard — returns true when `value` is a valid `ColorProp`. */ export declare function isColorProp(value: unknown): value is ColorProp; /** Maps each ColorProp to the four colorScheme keys used for filled surfaces. */ export declare const colorRoleMap: Record; /** * Flat shorthand record for inline token overrides via the `sx` prop. * * Spacing keys resolve through `theme.spacing`. * Color keys resolve through `theme.colorScheme` when the value is a ColorProp. * All other values are passed through to the React Native style object as-is. * * CSS-only properties (pseudo-selectors, @media, child selectors) are silently * ignored with an `// RN-DEVIATION:` comment in useSx.ts. */ export type SxObject = { m?: number | string; mt?: number | string; mb?: number | string; ml?: number | string; mr?: number | string; mx?: number | string; my?: number | string; p?: number | string; pt?: number | string; pb?: number | string; pl?: number | string; pr?: number | string; px?: number | string; py?: number | string; color?: ColorProp | string; bg?: ColorProp | string; backgroundColor?: ColorProp | string; borderColor?: ColorProp | string; width?: number | string; w?: number | string; height?: number | string; h?: number | string; flex?: number; display?: 'flex' | 'none'; gap?: number | string; rowGap?: number | string; columnGap?: number | string; alignItems?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline'; justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly'; flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse'; flexWrap?: 'wrap' | 'nowrap' | 'wrap-reverse'; flexGrow?: number; flexShrink?: number; flexBasis?: number | string; position?: 'relative' | 'absolute'; top?: number | string; bottom?: number | string; left?: number | string; right?: number | string; zIndex?: number; opacity?: number; overflow?: 'visible' | 'hidden' | 'scroll'; borderRadius?: number | string; borderWidth?: number; [key: string]: unknown; }; /** * Full `sx` prop type. * Accepts a single SxObject or an array containing SxObjects and falsy guards. */ export type SxProps = SxObject | ReadonlyArray; /** * Generic slots + slotProps pattern for composite components. * * `TSlots` is an interface mapping slot names (e.g. `'root' | 'icon'`) to the * React component type expected for that slot. * * Usage: * ```ts * interface ChipSlots { Root: React.ComponentType; DeleteIcon: React.ComponentType } * interface ChipProps extends SlotPropsConfig { ... } * ``` */ export interface SlotPropsConfig>> { /** Override sub-component implementations. */ slots?: Partial; /** Additional props forwarded to each sub-component slot. */ slotProps?: Partial<{ [K in keyof TSlots]: TSlots[K] extends React.ComponentType ? Partial

: never; }>; } //# sourceMappingURL=shared.d.ts.map