@arolariu/components
Version:
🎨 70+ beautiful, accessible React components built on Base UI. TypeScript-first, CSS Modules styling, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡
226 lines • 7.56 kB
TypeScript
import * as React from "react";
import { Separator } from "./separator";
/** Supported surface variants for {@link Item}. */
export type ItemVariant = "default" | "outline" | "muted";
/** Supported size variants for {@link Item}. */
export type ItemSize = "default" | "sm";
/** Supported media treatments for {@link ItemMedia}. */
export type ItemMediaVariant = "default" | "icon" | "image";
/**
* Props for the {@link ItemGroup} component.
*/
export type ItemGroupProps = React.ComponentPropsWithoutRef<"div">;
/**
* Props for the {@link ItemSeparator} component.
*/
export type ItemSeparatorProps = React.ComponentPropsWithoutRef<typeof Separator>;
/**
* Props for the {@link Item} component.
*/
export interface ItemProps extends React.ComponentPropsWithoutRef<"div"> {
/** Enables rendering an existing div-compatible child element. @default false */
asChild?: boolean;
/** Compactness applied to the item container. @default "default" */
size?: ItemSize;
/** Visual surface treatment for the item container. @default "default" */
variant?: ItemVariant;
}
/**
* Props for the {@link ItemMedia} component.
*/
export interface ItemMediaProps extends React.ComponentPropsWithoutRef<"div"> {
/** Visual treatment used for the media slot. @default "default" */
variant?: ItemMediaVariant;
}
/**
* Props for the {@link ItemContent} component.
*/
export type ItemContentProps = React.ComponentPropsWithoutRef<"div">;
/**
* Props for the {@link ItemTitle} component.
*/
export type ItemTitleProps = React.ComponentPropsWithoutRef<"div">;
/**
* Props for the {@link ItemDescription} component.
*/
export type ItemDescriptionProps = React.ComponentPropsWithoutRef<"p">;
/**
* Props for the {@link ItemActions} component.
*/
export type ItemActionsProps = React.ComponentPropsWithoutRef<"div">;
/**
* Props for the {@link ItemHeader} component.
*/
export type ItemHeaderProps = React.ComponentPropsWithoutRef<"div">;
/**
* Props for the {@link ItemFooter} component.
*/
export type ItemFooterProps = React.ComponentPropsWithoutRef<"div">;
/**
* Groups a collection of list-like items with consistent spacing.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders a `<div>` element
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <ItemGroup>
* <Item />
* </ItemGroup>
* ```
*
* @see {@link ItemGroupProps} for available props
*/
declare const ItemGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
/**
* Inserts a separator between adjacent items.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders a wrapped `Separator` component
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <ItemSeparator />
* ```
*
* @see {@link ItemSeparatorProps} for available props
*/
declare const ItemSeparator: React.ForwardRefExoticComponent<Omit<Omit<import("./separator").SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
/**
* Creates a flexible data-display row with optional media and actions.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders a `<div>` element by default
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <Item variant='outline'>Content</Item>
* ```
*
* @see {@link ItemProps} for available props
*/
declare const Item: React.ForwardRefExoticComponent<ItemProps & React.RefAttributes<HTMLDivElement>>;
/**
* Renders the leading media slot for an item.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders a `<div>` element
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <ItemMedia variant='icon'>⭐</ItemMedia>
* ```
*
* @see {@link ItemMediaProps} for available props
*/
declare const ItemMedia: React.ForwardRefExoticComponent<ItemMediaProps & React.RefAttributes<HTMLDivElement>>;
/**
* Wraps the main textual content for an item.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders a `<div>` element
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <ItemContent>Details</ItemContent>
* ```
*
* @see {@link ItemContentProps} for available props
*/
declare const ItemContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
/**
* Displays the primary title text for an item.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders a `<div>` element
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <ItemTitle>Title</ItemTitle>
* ```
*
* @see {@link ItemTitleProps} for available props
*/
declare const ItemTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
/**
* Displays secondary descriptive content for an item.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders a `<p>` element
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <ItemDescription>Support text</ItemDescription>
* ```
*
* @see {@link ItemDescriptionProps} for available props
*/
declare const ItemDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
/**
* Hosts action controls aligned to the trailing edge of an item.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders a `<div>` element
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <ItemActions>
* <button type='button'>Edit</button>
* </ItemActions>
* ```
*
* @see {@link ItemActionsProps} for available props
*/
declare const ItemActions: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
/**
* Wraps leading title and description content for an item.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders a `<div>` element
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <ItemHeader>
* <ItemTitle>Profile</ItemTitle>
* </ItemHeader>
* ```
*
* @see {@link ItemHeaderProps} for available props
*/
declare const ItemHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
/**
* Wraps trailing metadata or supplementary content for an item.
*
* @remarks
* - Pure CSS component (no Base UI primitive)
* - Renders a `<div>` element
* - Styling via CSS Modules with `--ac-*` custom properties
*
* @example
* ```tsx
* <ItemFooter>Updated 2m ago</ItemFooter>
* ```
*
* @see {@link ItemFooterProps} for available props
*/
declare const ItemFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
//# sourceMappingURL=item.d.ts.map