import * as React from 'react'; /** * Product preview of the admin apps (OPS): ONE picture-plus-text pattern for every place a product is listed — * order / quote / sale lines, pickers, record details. Screens compose it; none draws its own thumbnail. * * - `ProductThumb`: the picture alone. Fixed aspect ratio, `object-contain` on a soft surface (parts photographed on * white are never cropped), lazy + async decoding, shimmer while it loads, and a designed fallback (initial of the * name, or a package glyph) when there is no image, it fails, or the product no longer exists. `zoomable` opens a * light lightbox (dialog) with the full picture; the hover lifts the image slightly. * - `ProductPreview`: thumb + name (2 lines) + variant + SKU + quantity and prices with a clear hierarchy. * * Plain Tailwind on the theme tokens (`bg-muted`, `text-muted-foreground`, `border`): light and dark come for free. * The sibling for the stores (no Tailwind) is `@asteby/storefront-react/ui` `ProductThumb`/`ProductPreview`, same * props and the same fallback rules. */ export type ProductThumbSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; /** Letters of the fallback: two initials for two words, one otherwise, '' when nothing usable. */ export declare function productInitials(name: string | null | undefined): string; export interface ProductThumbProps { /** Resolved URL of the picture (product or variant). Empty / nullish: the fallback. */ src?: string | null; /** `srcset` when the host has derivatives (e.g. 320 px thumb + main). */ srcSet?: string; /** `sizes` for the `srcset`. */ sizes?: string; /** Product name: alt text, zoom title and source of the fallback initial. */ name?: string | null; size?: ProductThumbSize; /** `contain` (default) never crops; `cover` fills the box. */ fit?: 'contain' | 'cover'; /** Aspect ratio of the box, CSS `aspect-ratio` value. Default `1 / 1`. */ ratio?: string; /** The name sits next to the picture as text: `alt=""` and the fallback is hidden from screen readers. */ decorative?: boolean; /** Click opens the picture large. Ignored without a working picture. */ zoomable?: boolean; /** Label of the zoom button (`Ver imagen de {name}` by default is built from `zoomLabel`). */ zoomLabel?: string; /** Quantity badge, shown when greater than 1. */ quantity?: number; /** Above the fold: eager load. */ priority?: boolean; className?: string; } /** Picture of a product with fixed ratio, shimmer, lazy loading and a fallback that always looks designed. */ export declare function ProductThumb({ src, srcSet, sizes, name, size, fit, ratio, decorative, zoomable, zoomLabel, quantity, priority, className, }: ProductThumbProps): React.JSX.Element; export interface ProductPreviewProps extends Pick { /** Product name. Empty = the product no longer exists: a "no disponible" row, never a blank one. */ name?: string | null; /** Variant ("Rojo / L"). */ variant?: React.ReactNode; sku?: string | null; quantity?: number | null; /** Unit price, formatted. Shown next to the quantity when it is greater than 1. */ unitPrice?: React.ReactNode; /** Line total, formatted: right-aligned, the strongest number. */ total?: React.ReactNode; /** Trailing cell when there is no total (status badge, action). */ trailing?: React.ReactNode; /** Under the text: status, location, notes. */ children?: React.ReactNode; size?: ProductThumbSize; /** Prefix of the SKU. Default `SKU`. */ skuLabel?: string; /** "Cantidad" label. Default `Cantidad`. */ quantityLabel?: string; /** Text for a product that no longer exists. */ unavailableLabel?: string; className?: string; } /** * A product line: picture, name (2 lines), variant, SKU, quantity and prices with a clear hierarchy. * Degrades to a designed placeholder when there is no image or no product. */ export declare function ProductPreview({ src, srcSet, sizes, name, variant, sku, quantity, unitPrice, total, trailing, children, size, fit, ratio, zoomable, zoomLabel, priority, skuLabel, quantityLabel, unavailableLabel, className, }: ProductPreviewProps): React.JSX.Element; //# sourceMappingURL=product-preview.d.ts.map