@synergy-design-system/angular
Version:
Angular wrappers for the Synergy Design System
80 lines (76 loc) • 3.44 kB
JavaScript
import * as i0 from '@angular/core';
import { Input, Component } from '@angular/core';
import '@synergy-design-system/components/components/optgroup/optgroup.js';
// ---------------------------------------------------------------------
// 🔒 AUTOGENERATED @synergy-design-system/angular wrappers for @synergy-design-system/components
// Please do not edit this file directly!
// It will get recreated when running pnpm build.
// ---------------------------------------------------------------------
/**
* @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"
*/
class SynOptgroupComponent {
nativeElement;
_ngZone;
constructor(e, ngZone) {
this.nativeElement = e.nativeElement;
this._ngZone = ngZone;
}
/**
* Disables all options in the optgroup.
*/
set disabled(v) {
this._ngZone.runOutsideAngular(() => (this.nativeElement.disabled = v === '' || v));
}
get disabled() {
return this.nativeElement.disabled;
}
/**
* The optgroups label.
* If you need to display HTML, use the `label` slot instead.
*/
set label(v) {
this._ngZone.runOutsideAngular(() => (this.nativeElement.label = v));
}
get label() {
return this.nativeElement.label;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SynOptgroupComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.1", type: SynOptgroupComponent, isStandalone: true, selector: "syn-optgroup", inputs: { disabled: "disabled", label: "label" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SynOptgroupComponent, decorators: [{
type: Component,
args: [{
selector: 'syn-optgroup',
standalone: true,
template: '<ng-content></ng-content>',
}]
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { disabled: [{
type: Input
}], label: [{
type: Input
}] } });
/**
* Generated bundle index. Do not edit.
*/
export { SynOptgroupComponent };
//# sourceMappingURL=synergy-design-system-angular-components-optgroup.mjs.map