UNPKG

@synergy-design-system/angular

Version:
1 lines 4.21 kB
{"version":3,"file":"synergy-design-system-angular-components-optgroup.mjs","sources":["../../components/optgroup/optgroup.component.ts","../../components/optgroup/synergy-design-system-angular-components-optgroup.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 { SynOptgroup } from '@synergy-design-system/components';\n\nimport '@synergy-design-system/components/components/optgroup/optgroup.js';\n\n/**\n * @summary The <syn-optgroup> element creates a grouping for <syn-option>s within a <syn-select>.\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-optgroup--docs\n * @status stable\n * @since 1.3.0\n *\n * @dependency syn-divider\n *\n * @slot - The given options. Must be `<syn-option>` elements.\n * @slot prefix - A presentational prefix icon or similar element.\n * @slot label - The label for the optgroup\n * @slot suffix - A presentational suffix icon or similar element.\n *\n * @csspart base - The component's base wrapper.\n * @csspart label-container - The container that wraps prefix, label and base\n * @csspart divider - The divider that is displayed above the content\n * @csspart prefix - The container that wraps the prefix.\n * @csspart suffix - The container that wraps the suffix.\n * @csspart options - The container that wraps the <syn-option> elements.\n *\n * @cssproperty --display-divider - Display property of the divider. Defaults to \"block\"\n */\n@Component({\n selector: 'syn-optgroup',\n standalone: true,\n template: '<ng-content></ng-content>',\n})\nexport class SynOptgroupComponent {\n public nativeElement: SynOptgroup;\n private _ngZone: NgZone;\n\n constructor(e: ElementRef, ngZone: NgZone) {\n this.nativeElement = e.nativeElement;\n this._ngZone = ngZone;\n }\n\n /**\n * Disables all options in the optgroup.\n */\n @Input()\n set disabled(v: '' | SynOptgroup['disabled']) {\n this._ngZone.runOutsideAngular(\n () => (this.nativeElement.disabled = v === '' || v),\n );\n }\n get disabled(): SynOptgroup['disabled'] {\n return this.nativeElement.disabled;\n }\n\n /**\n * The optgroups label.\n * If you need to display HTML, use the `label` slot instead.\n */\n @Input()\n set label(v: SynOptgroup['label']) {\n this._ngZone.runOutsideAngular(() => (this.nativeElement.label = v));\n }\n get label(): SynOptgroup['label'] {\n return this.nativeElement.label;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './optgroup.component';\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AAcA;;;;;;;;;;;;;;;;;;;;;AAqBG;MAMU,oBAAoB,CAAA;AACxB,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;;AAEG;IACH,IACI,QAAQ,CAAC,CAA+B,EAAA;QAC1C,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;;AAGpC;;;AAGG;IACH,IACI,KAAK,CAAC,CAAuB,EAAA;AAC/B,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;;uGA/BtB,oBAAoB,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;AAApB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