import { PropertyValues } from 'lit'; import { DDSElement } from "../../base/index.js"; /** * The tree section component that can be used within `daikin-tree` component. * * The tree section accepts either a tree item or a tree section. By stacking tree sections, you can create a multi-level structure. * * Hierarchy: * - `daikin-tree` > `daikin-tree-section` > `daikin-tree-item` * - `daikin-tree` > `daikin-tree-section` > `daikin-tree-section` ... * * @tokenImports ../tree-item/daikin-tree-item.ts * * @fires toggle - _Cancellable._ A custom event emitted when the user clicks the header. * @fires tree-move-focus - _Internal use._ A custom event used to move the focus within a tree. * * @slot - A slot for tree children. Place `daikin-tree-section` and `daikin-tree-item` elements here. * @slot label - A slot for section header content. Place a `span` element here. * * @example * * ```js * import "@daikin-oss/design-system-web-components/components/tree-item/index.js"; * import "@daikin-oss/design-system-web-components/components/tree-section/index.js"; * ``` * * ```html * * Tree section * Tree item 1 * Tree item 2 * Tree item 3 * * ``` */ export declare class DaikinTreeSection extends DDSElement { static readonly styles: import('lit').CSSResult; /** * An unique value within the tree. * This value is used by the `daikin-tree` component to manage the selection target. * While not required, you can use a value based on the hierarchy to ensure uniqueness. (For example, if the parent is "foo", use "foo.bar".) */ value: string; /** * Whether the tree section is disabled. */ disabled: boolean; /** * Whether the tree item is selected. * Controlled by `daikin-tree`. * Do not specify this manually, as it will be overwritten by the `daikin-tree` component. * * @private */ selected: boolean; /** * Whether the tree section is open. * Treated as `false` when `disabled` is `true`. */ open: boolean; /** * _Internal use._ * The current nesting depth when the root's children are 0. * Automatically set by the parent. * * @private */ level: number; private readonly _children; private readonly _focusableRef; private get _open(); private get _selected(); private _updateChildrenLevel; private _handleClick; private _handleSlotChange; private _handleTreeMoveFocus; private _handleKeyDown; render(): import('lit-html').TemplateResult<1>; protected updated(changedProperties: PropertyValues): void; /** * Focuses on the inner button. *s * @param options focus options */ focus(options?: FocusOptions): void; /** * Focuses on the last enabled item in the slot recursively. * If the tree is closed or there are no enabled items in the slot, this will focus on itself. * This is called from the next item to move the focus to the item above it in the display. * * @param options focus options * @private */ focusLastItem(options?: FocusOptions): void; /** * Updates the selection state (`this.selected`) to true if the argument `value` matches `this.value`. Otherwise, sets it to false. * In addition, calls `selectItems` for the tree sections and tree items of the child elements in the slot in the same way. * * @param value Tree item value. * @private */ selectItems(values: readonly string[]): void; /** * Returns an array of the `value` of the currently selected sections and items. * If nothing is selected, returns `[]`. * * @returns An array of the `value` of the currently selected sections and items (if any). `[]` if there is none. * @private */ getSelectedItems(): string[]; } declare global { interface HTMLElementTagNameMap { "daikin-tree-section": DaikinTreeSection; } }