import React from 'react'; import '../../styles/base.module.css'; import { ButtonTheme } from '../button'; import { ThemePrefixer } from '../../utils/themePrefixer'; import { AllElementPropsWithoutRef } from '../../utils/elementTypings'; type CloseButtonTheme = ThemePrefixer; export interface AccordionTheme extends CloseButtonTheme { '--background-color'?: string; '--border-color'?: string; '--content-color'?: string; '--content-font-size'?: string; '--content-line-height'?: string; '--header-outline-color-focus'?: string; '--header-color'?: string; '--header-font-size'?: string; '--header-font-weight'?: string; '--header-letter-spacing'?: string; '--header-line-height'?: string; '--padding-horizontal'?: string; '--padding-vertical'?: string; } export declare enum AccordionSize { Small = "small", Medium = "medium", Large = "large" } type Language = 'en' | 'fi' | 'sv'; export type CommonAccordionProps = React.PropsWithChildren<{ /** * If `true` border will be drawn around the accordion card. */ border?: false; /** * Use the card variant if `true` */ card?: false; /** * Additional class names for accordion */ className?: string; /** * Boolean indicating whether there is a close button at the bottom of the accordion or not. * @Default true */ closeButton?: boolean; /** * className for close button to enable custom styling */ closeButtonClassName?: string; /** * Heading text. */ heading?: string; /** * Heading level * @default 2 */ headingLevel?: number; /** * Boolean indicating whether the accordion is initially opened. * @default false */ initiallyOpen?: boolean; /** * The language of the component. It affects which language is used for the close button text. * * @default "fi" */ language?: Language; /** * Size * @default AccordionSize.Medium */ size?: AccordionSize; /** * Additional styles */ style?: React.CSSProperties; /** * Custom theme styles */ theme?: AccordionTheme; }>; export type CardAccordionProps = Omit & { /** * If `true` border will be drawn around the accordion card. */ border?: boolean; /** * Use the card variant if `true` */ card: true; }; export type AccordionProps = AllElementPropsWithoutRef<'div'> & (CommonAccordionProps | CardAccordionProps); export declare const Accordion: ({ border, card, children, className, closeButtonClassName, closeButton, heading, headingLevel, id, initiallyOpen, language, size, theme, ...rest }: AccordionProps) => React.JSX.Element; export {};