import { ElementType, CSSProperties } from 'react'; import { PolymorphicComponentPropsWithRef } from '@plyxui/core'; import { B as BoxVariants } from './config-BxBDDgtl.cjs'; import 'class-variance-authority/types'; import 'class-variance-authority'; /** * Box (web). * * The single most-used primitive. Polymorphic: renders any HTML element * via the `as` prop while preserving the element's native attribute types. * * ```tsx * Link * Submit * ``` * * The matching `index.native.tsx` always renders a `` (RN has no * polymorphism story worth simulating). `as` is silently ignored on native. * * Variants resolve via cva for type-safe className output AND via inline * styles from the active theme so the primitive works without a stylesheet. * Classes are kept as override hooks for consumers who want their own CSS. */ type BoxOwnProps = BoxVariants & { className?: string; style?: CSSProperties; }; type BoxProps = PolymorphicComponentPropsWithRef; /** * Forwarded-ref + polymorphic Box. * * NOTE: React's forwardRef erases polymorphic generics, so the cast below * is intentional. The exported type carries the generics; runtime is unchanged. */ declare const Box: (props: BoxProps) => React.ReactElement | null; export { Box, type BoxProps };