@synergy-design-system/components
Version:
This package provides the base of the Synergy Design System as native web components. It uses [lit](https://www.lit.dev) and parts of [shoelace](https://shoelace.style/). Synergy officially supports the latest two versions of all major browsers (as define
47 lines (46 loc) • 1.81 kB
TypeScript
import type { CSSResultGroup } from 'lit';
import SynergyElement from '../../internal/synergy-element.js';
import SynDivider from '../divider/divider.component.js';
import type SynOption from '../option/option.component.js';
/**
* @summary The <syn-optgroup> element creates a grouping for <syn-option>s within a <syn-select>.
* @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-optgroup--docs
* @status stable
* @since 1.3.0
*
* @dependency syn-divider
*
* @slot - The given options. Must be `<syn-option>` elements.
* @slot prefix - A presentational prefix icon or similar element.
* @slot label - The label for the optgroup
* @slot suffix - A presentational suffix icon or similar element.
*
* @csspart base - The component's base wrapper.
* @csspart label-container - The container that wraps prefix, label and base
* @csspart divider - The divider that is displayed above the content
* @csspart prefix - The container that wraps the prefix.
* @csspart suffix - The container that wraps the suffix.
* @csspart options - The container that wraps the <syn-option> elements.
*
* @cssproperty --display-divider - Display property of the divider. Defaults to "block"
*/
export default class SynOptgroup extends SynergyElement {
static styles: CSSResultGroup;
static dependencies: {
'syn-divider': typeof SynDivider;
};
private readonly hasSlotController;
private mutationObserver;
private enableObserver;
assignedOptions: SynOption[];
/**
* Disables all options in the optgroup.
*/
disabled: boolean;
/**
* The optgroups label. If you need to display HTML, use the `label` slot instead.
*/
label: string;
connectedCallback(): void;
render(): import("lit").TemplateResult;
}