@synergy-design-system/angular
Version:
Angular wrappers for the Synergy Design System
80 lines (76 loc) • 3.36 kB
JavaScript
import * as i0 from '@angular/core';
import { Input, Component } from '@angular/core';
import '@synergy-design-system/components/components/option/option.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 Options define the selectable items within various form controls such as [select](/components/select).
* @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-option--docs
* @status stable
* @since 2.0
*
* @dependency syn-icon
*
* @slot - The option's label.
* @slot prefix - Used to prepend an icon or similar element to the menu item.
* @slot suffix - Used to append an icon or similar element to the menu item.
*
* @csspart checked-icon - The checked icon, an `<syn-icon>` element.
* @csspart base - The component's base wrapper.
* @csspart label - The option's label.
* @csspart prefix - The container that wraps the prefix.
* @csspart suffix - The container that wraps the suffix.
*/
class SynOptionComponent {
nativeElement;
_ngZone;
constructor(e, ngZone) {
this.nativeElement = e.nativeElement;
this._ngZone = ngZone;
}
/**
* The option's value.
* When selected, the containing form control will receive this value.
* The value must be unique
from other options in the same group.
* Values may not contain spaces, as spaces are used as delimiters when listing
multiple values.
*/
set value(v) {
this._ngZone.runOutsideAngular(() => (this.nativeElement.value = v));
}
get value() {
return this.nativeElement.value;
}
/**
* Draws the option in a disabled state, preventing selection.
*/
set disabled(v) {
this._ngZone.runOutsideAngular(() => (this.nativeElement.disabled = v === '' || v));
}
get disabled() {
return this.nativeElement.disabled;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SynOptionComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.1", type: SynOptionComponent, isStandalone: true, selector: "syn-option", inputs: { value: "value", disabled: "disabled" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SynOptionComponent, decorators: [{
type: Component,
args: [{
selector: 'syn-option',
standalone: true,
template: '<ng-content></ng-content>',
}]
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { value: [{
type: Input
}], disabled: [{
type: Input
}] } });
/**
* Generated bundle index. Do not edit.
*/
export { SynOptionComponent };
//# sourceMappingURL=synergy-design-system-angular-components-option.mjs.map