@kopexa/sight
Version:
Kopexa Sight Design System — React component library for GRC applications
57 lines (54 loc) • 2.45 kB
text/typescript
import * as react_jsx_runtime from 'react/jsx-runtime';
import { AccordionVariantProps } from '@kopexa/theme';
import { ReactNode } from 'react';
type AccordionRootProps = AccordionVariantProps & {
/** `"single"` (default) allows one open item, `"multiple"` allows many. */
type?: "single" | "multiple";
/**
* Single mode: the open item's id (or `""` for none). Multiple mode: array
* of open item ids. Controlled.
*/
value?: string | string[];
/** Initial open item(s). Uncontrolled. */
defaultValue?: string | string[];
/** Called with the open item id (single) or ids (multiple). */
onValueChange?: (value: string & string[]) => void;
/**
* Single mode: whether the open item can be collapsed (always true here —
* react-aria single mode is collapsible). Accepted for API compatibility.
*/
collapsible?: boolean;
/** Disable all items. */
disabled?: boolean;
className?: string;
children?: ReactNode;
id?: string;
};
declare function AccordionRoot({ type, value, defaultValue, onValueChange, collapsible: _collapsible, disabled, className, color, radius, spacing, border, triggerSpacing, children, id, }: AccordionRootProps): react_jsx_runtime.JSX.Element;
type AccordionItemProps = {
/** Unique id of the item (maps to the open value/key). */
value: string;
disabled?: boolean;
className?: string;
children?: ReactNode;
};
declare function AccordionItem({ value, disabled, className, children, }: AccordionItemProps): react_jsx_runtime.JSX.Element;
type AccordionTriggerProps = {
className?: string;
children?: ReactNode;
/**
* Content rendered outside the trigger button but inside the header. Use for
* interactive elements (buttons, popovers) that must not be nested inside the
* accordion trigger button.
*/
action?: ReactNode;
id?: string;
disabled?: boolean;
};
declare function AccordionTrigger({ className, children, action, id, disabled, }: AccordionTriggerProps): react_jsx_runtime.JSX.Element;
type AccordionContentProps = {
className?: string;
children?: ReactNode;
};
declare function AccordionContent({ className, children, }: AccordionContentProps): react_jsx_runtime.JSX.Element;
export { AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionRoot, type AccordionRootProps, AccordionTrigger, type AccordionTriggerProps };