UNPKG

@als-tp/als-react-ts-ui

Version:

A comprehensive React TypeScript UI component library built with Base UI by ALSInnovation

67 lines 2.73 kB
import React from "react"; import { Accordion } from "@base-ui-components/react/accordion"; type AccordionVariant = "default" | "bordered" | "separated" | "minimal"; type AccordionSize = "sm" | "md" | "lg"; interface ALSAccordionRootProps { /** The controlled value of the item(s) that should be expanded */ value?: string[]; /** The default value of items that should be expanded (uncontrolled) */ defaultValue?: string[]; /** Callback when accordion items change */ onValueChange?: React.ComponentProps<typeof Accordion.Root>["onValueChange"]; /** Whether multiple items can be open at the same time */ openMultiple?: boolean; /** Whether the accordion is disabled */ disabled?: boolean; /** The visual orientation of the accordion */ orientation?: "horizontal" | "vertical"; /** Visual variant of the accordion */ variant?: AccordionVariant; /** Size variant */ size?: AccordionSize; /** Additional class name */ className?: string; /** Children */ children: React.ReactNode; } interface ALSAccordionItemProps { /** Unique value for this item */ value: string; /** Whether this item is disabled */ disabled?: boolean; /** Callback when this item opens or closes */ onOpenChange?: (open: boolean) => void; /** Additional class name */ className?: string; /** Children */ children: React.ReactNode; } interface ALSAccordionHeaderProps { /** Additional class name */ className?: string; /** Children */ children: React.ReactNode; } interface ALSAccordionTriggerProps { /** Additional class name */ className?: string; /** Children */ children: React.ReactNode; } interface ALSAccordionPanelProps { /** Whether to keep the panel in DOM when closed */ keepMounted?: boolean; /** Additional class name */ className?: string; /** Children */ children: React.ReactNode; } export declare const ALSAccordion: { Root: React.ForwardRefExoticComponent<ALSAccordionRootProps & React.RefAttributes<HTMLDivElement>>; Item: React.ForwardRefExoticComponent<ALSAccordionItemProps & React.RefAttributes<HTMLDivElement>>; Header: React.ForwardRefExoticComponent<ALSAccordionHeaderProps & React.RefAttributes<HTMLHeadingElement>>; Trigger: React.ForwardRefExoticComponent<ALSAccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>; Panel: React.ForwardRefExoticComponent<ALSAccordionPanelProps & React.RefAttributes<HTMLDivElement>>; }; export type { ALSAccordionRootProps, ALSAccordionItemProps, ALSAccordionHeaderProps, ALSAccordionTriggerProps, ALSAccordionPanelProps, AccordionVariant, AccordionSize, }; //# sourceMappingURL=index.d.ts.map