UNPKG

@synergy-design-system/angular

Version:
1 lines 4.11 kB
{"version":3,"file":"synergy-design-system-angular-components-option.mjs","sources":["../../components/option/option.component.ts","../../components/option/synergy-design-system-angular-components-option.ts"],"sourcesContent":["// ---------------------------------------------------------------------\n// 🔒 AUTOGENERATED @synergy-design-system/angular wrappers for @synergy-design-system/components\n// Please do not edit this file directly!\n// It will get recreated when running pnpm build.\n// ---------------------------------------------------------------------\nimport {\n Component,\n ElementRef,\n NgZone,\n Input,\n Output,\n EventEmitter,\n AfterContentInit,\n} from '@angular/core';\nimport type { SynOption } from '@synergy-design-system/components';\n\nimport '@synergy-design-system/components/components/option/option.js';\n\n/**\n * @summary Options define the selectable items within various form controls such as [select](/components/select).\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-option--docs\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon\n *\n * @slot - The option's label.\n * @slot prefix - Used to prepend an icon or similar element to the menu item.\n * @slot suffix - Used to append an icon or similar element to the menu item.\n *\n * @csspart checked-icon - The checked icon, an `<syn-icon>` element.\n * @csspart base - The component's base wrapper.\n * @csspart label - The option's label.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart suffix - The container that wraps the suffix.\n */\n@Component({\n selector: 'syn-option',\n standalone: true,\n template: '<ng-content></ng-content>',\n})\nexport class SynOptionComponent {\n public nativeElement: SynOption;\n private _ngZone: NgZone;\n\n constructor(e: ElementRef, ngZone: NgZone) {\n this.nativeElement = e.nativeElement;\n this._ngZone = ngZone;\n }\n\n /**\n* The option's value.\n* When selected, the containing form control will receive this value.\n* The value must be unique\nfrom other options in the same group.\n* Values may not contain spaces, as spaces are used as delimiters when listing\nmultiple values.\n */\n @Input()\n set value(v: SynOption['value']) {\n this._ngZone.runOutsideAngular(() => (this.nativeElement.value = v));\n }\n get value(): SynOption['value'] {\n return this.nativeElement.value;\n }\n\n /**\n * Draws the option in a disabled state, preventing selection.\n */\n @Input()\n set disabled(v: '' | SynOption['disabled']) {\n this._ngZone.runOutsideAngular(\n () => (this.nativeElement.disabled = v === '' || v),\n );\n }\n get disabled(): SynOption['disabled'] {\n return this.nativeElement.disabled;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './option.component';\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AAcA;;;;;;;;;;;;;;;;;AAiBG;MAMU,kBAAkB,CAAA;AACtB,IAAA,aAAa;AACZ,IAAA,OAAO;IAEf,WAAY,CAAA,CAAa,EAAE,MAAc,EAAA;AACvC,QAAA,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,aAAa;AACpC,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM;;AAGvB;;;;;;;AAOC;IACD,IACI,KAAK,CAAC,CAAqB,EAAA;AAC7B,QAAA,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;;AAEtE,IAAA,IAAI,KAAK,GAAA;AACP,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK;;AAGjC;;AAEG;IACH,IACI,QAAQ,CAAC,CAA6B,EAAA;QACxC,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAC5B,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CACpD;;AAEH,IAAA,IAAI,QAAQ,GAAA;AACV,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ;;uGAnCzB,kBAAkB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IA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