@synergy-design-system/angular
Version:
Angular wrappers for the Synergy Design System
83 lines (79 loc) • 3.29 kB
JavaScript
import * as i0 from '@angular/core';
import { EventEmitter, Output, Input, Component } from '@angular/core';
import '@synergy-design-system/components/components/tag/tag.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 Tags are used as labels to organize things or to indicate a selection.
* @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-tag--docs
* @status stable
* @since 2.0
*
* @dependency syn-icon-button
*
* @slot - The tag's content.
*
* @event syn-remove - Emitted when the remove button is activated.
*
* @csspart base - The component's base wrapper.
* @csspart content - The tag's content.
* @csspart remove-button - The tag's remove button, an `<syn-icon-button>`.
* @csspart remove-button__base - The remove button's exported `base` part.
*/
class SynTagComponent {
nativeElement;
_ngZone;
constructor(e, ngZone) {
this.nativeElement = e.nativeElement;
this._ngZone = ngZone;
this.nativeElement.addEventListener('syn-remove', (e) => {
this.synRemoveEvent.emit(e);
});
}
/**
* The tag's size.
*/
set size(v) {
this._ngZone.runOutsideAngular(() => (this.nativeElement.size = v));
}
get size() {
return this.nativeElement.size;
}
/**
* Makes the tag removable and shows a remove button.
*/
set removable(v) {
this._ngZone.runOutsideAngular(() => (this.nativeElement.removable = v === '' || v));
}
get removable() {
return this.nativeElement.removable;
}
/**
* Emitted when the remove button is activated.
*/
synRemoveEvent = new EventEmitter();
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SynTagComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.1", type: SynTagComponent, isStandalone: true, selector: "syn-tag", inputs: { size: "size", removable: "removable" }, outputs: { synRemoveEvent: "synRemoveEvent" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SynTagComponent, decorators: [{
type: Component,
args: [{
selector: 'syn-tag',
standalone: true,
template: '<ng-content></ng-content>',
}]
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { size: [{
type: Input
}], removable: [{
type: Input
}], synRemoveEvent: [{
type: Output
}] } });
/**
* Generated bundle index. Do not edit.
*/
export { SynTagComponent };
//# sourceMappingURL=synergy-design-system-angular-components-tag.mjs.map