import { EventEmitter } from "../../stencil-public-runtime"; import { ThemeableComponent } from "../../common"; import { DuetHeadingLevel, DuetMargin, DuetTheme } from "../../common-types"; export type DuetCollapsibleWeight = "semibold" | "normal"; export type DuetCollapsibleHeadingFontSize = "x-small" | "small" | "medium" | "large" | "x-large" | "xx-large" | "xxx-large" | "xxxx-large" | undefined; export type DuetCollapsibleToggleEvent = { component: "duet-collapsible"; originalEvent: KeyboardEvent | MouseEvent; }; /** * @part duet-collapsible-heading-content - piercing selector for styling the heading content * @part duet-collapsible-after-heading - piercing selector for styling the after heading * @part duet-collapsible-content - piercing selector for styling the content * @slot after-heading - Content after the heading can be for example badges. * @slot heading - Instead of using heading property you can also use a native h1..h6 heading. Do not use a duet-heading here. */ export declare class DuetCollapsible implements ThemeableComponent { /** * Own Properties */ private nativeButton?; private id; private hasAfterHeadingSlot?; private hasHeadingSlot?; private headingTags; /** * Reference to host HTML element. */ element: HTMLElement; /** * Theme of the collapsible. */ theme: DuetTheme; /** * Negative variation for collapsible on dark background */ negative: boolean; /** * Adds accessible label for the collapsible that is only shown for screen readers. * Typically, this label text replaces the visible text on the button for * users who use assistive technology. */ accessibleLabel: string; /** * The content for the collapsible heading. */ heading: string; /** * The caption text to display below the heading. */ caption: string; /** * Makes collapsible heading full width */ headingFullWidth: boolean; /** * Centers heading inside its container */ centerHeading: boolean; /** * The font weight of the heading */ headingWeight: DuetCollapsibleWeight; /** * Custom headingSize to be used for font size of heading, as a design token entered * in kebab-case x-small -> font-size-x-small. * Example: * # 12px (0.75rem) ------ +2px (x-small) * # 14px (0.875rem) ------ +2px (small) * # 16px (1rem) ------ +2px (medium) * # 20px (1.25rem) ------ +4px (large) * # 24px (1.5rem) ------ +4px (x-large) * # 36px (2.25rem) ------ +12px (xx-large) * # 48px (3rem) ------ +12px (xxx-large) * # 72px (4.5rem) ------ +24px (xxxx-large) */ headingSize: DuetCollapsibleHeadingFontSize; /** * The actual heading level used for the heading in html markup. This setting * exists for accessibility reasons. It doesn’t change the style visually. * only variations of h1-h6 area accepted */ headingLevel: DuetHeadingLevel | undefined; /** * Controls the margin of the component. */ margin: DuetMargin; /** * Is the component expanded or collapsed. */ open: boolean; /** * Event emitted when opened/closed */ duetToggle: EventEmitter; /** * Component lifecycle events. */ componentWillLoad(): void; connectedCallback(): void; disconnectedCallback(): void; private handleKeyDown; private getFontSizeFromTokens; private getEquivalentIconSize; private getAccessibleLabel; private handleClick; /** * Sets focus on the specified `duet-collapsible`. Use this method instead of the global * `collapsible.focus()`. */ setFocus(options?: FocusOptions): Promise; /** * render() function * Always the last one in the class. */ render(): any; }