UNPKG

md2

Version:

Angular2 based Material Design components, directives and services are Accordion, Autocomplete, Chips(Tags), Collapse, Colorpicker, Data Table, Datepicker, Dialog(Modal), Menu, Multiselect, Select, Tabs, Tags(Chips), Toast and Tooltip.

64 lines 2.9 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; import { Component, ViewEncapsulation, Input } from '@angular/core'; import { mixinDisabled } from '../common-behaviors/disabled'; // Boilerplate for applying mixins to MdOptgroup. var MdOptgroupBase = (function () { function MdOptgroupBase() { } return MdOptgroupBase; }()); export { MdOptgroupBase }; export var _MdOptgroupMixinBase = mixinDisabled(MdOptgroupBase); // Counter for unique group ids. var _uniqueOptgroupIdCounter = 0; /** * Component that is used to group instances of `md-option`. */ var MdOptgroup = (function (_super) { __extends(MdOptgroup, _super); function MdOptgroup() { var _this = _super !== null && _super.apply(this, arguments) || this; /** Unique id for the underlying label. */ _this._labelId = "mat-optgroup-label-" + _uniqueOptgroupIdCounter++; return _this; } return MdOptgroup; }(_MdOptgroupMixinBase)); __decorate([ Input(), __metadata("design:type", String) ], MdOptgroup.prototype, "label", void 0); MdOptgroup = __decorate([ Component({selector: 'md-optgroup, mat-optgroup', template: "<label class=\"mat-optgroup-label\" [id]=\"_labelId\">{{ label }}</label><ng-content select=\"md-option, mat-option\"></ng-content>", encapsulation: ViewEncapsulation.None, inputs: ['disabled'], host: { 'class': 'mat-optgroup', 'role': 'group', '[class.mat-optgroup-disabled]': 'disabled', '[attr.aria-disabled]': 'disabled.toString()', '[attr.aria-labelledby]': '_labelId', } }) ], MdOptgroup); export { MdOptgroup }; //# sourceMappingURL=optgroup.js.map