carbon-components-angular 3.8.0 → 3.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/bundle/carbon-angular.umd.js +2 -2
  2. package/bundle/carbon-angular.umd.js.map +1 -1
  3. package/checkbox/checkbox.component.d.ts +4 -0
  4. package/checkbox/checkbox.component.js +6 -1
  5. package/checkbox/checkbox.component.js.map +1 -1
  6. package/checkbox/checkbox.component.metadata.json +1 -1
  7. package/checkbox/checkbox.component.ngfactory.js +2 -2
  8. package/checkbox/checkbox.component.ngfactory.js.map +1 -1
  9. package/checkbox/checkbox.component.ngsummary.json +1 -1
  10. package/checkbox/checkbox.module.ngfactory.js.map +1 -1
  11. package/combobox/combobox.component.d.ts +14 -4
  12. package/combobox/combobox.component.js +12 -9
  13. package/combobox/combobox.component.js.map +1 -1
  14. package/combobox/combobox.component.metadata.json +1 -1
  15. package/combobox/combobox.component.ngfactory.js +15 -8
  16. package/combobox/combobox.component.ngfactory.js.map +1 -1
  17. package/combobox/combobox.component.ngsummary.json +1 -1
  18. package/combobox/combobox.module.ngfactory.js.map +1 -1
  19. package/content-switcher/content-switcher.component.d.ts +1 -0
  20. package/content-switcher/content-switcher.component.js +18 -5
  21. package/content-switcher/content-switcher.component.js.map +1 -1
  22. package/content-switcher/content-switcher.component.metadata.json +1 -1
  23. package/content-switcher/content-switcher.component.ngfactory.js +2 -2
  24. package/content-switcher/content-switcher.component.ngfactory.js.map +1 -1
  25. package/content-switcher/content-switcher.component.ngsummary.json +1 -1
  26. package/content-switcher/content-switcher.module.ngfactory.js.map +1 -1
  27. package/datepicker/datepicker.component.d.ts +1 -1
  28. package/datepicker/datepicker.component.js.map +1 -1
  29. package/datepicker-input/datepicker-input.component.d.ts +2 -2
  30. package/datepicker-input/datepicker-input.component.js +1 -1
  31. package/datepicker-input/datepicker-input.component.js.map +1 -1
  32. package/datepicker-input/datepicker-input.component.metadata.json +1 -1
  33. package/datepicker-input/datepicker-input.component.ngfactory.js +14 -11
  34. package/datepicker-input/datepicker-input.component.ngfactory.js.map +1 -1
  35. package/datepicker-input/datepicker-input.module.ngfactory.js.map +1 -1
  36. package/docs/documentation/classes/CheckboxChange.html +7 -1
  37. package/docs/documentation/classes/NumberChange.html +11 -7
  38. package/docs/documentation/classes/ToggleChange.html +13 -5
  39. package/docs/documentation/components/Checkbox.html +74 -41
  40. package/docs/documentation/components/ComboBox.html +366 -184
  41. package/docs/documentation/components/ContentSwitcher.html +136 -12
  42. package/docs/documentation/components/DatePicker.html +2 -2
  43. package/docs/documentation/components/DatePickerInput.html +24 -22
  44. package/docs/documentation/components/Dropdown.html +335 -62
  45. package/docs/documentation/components/File.html +10 -6
  46. package/docs/documentation/components/FileUploader.html +26 -24
  47. package/docs/documentation/components/HeaderItem.html +2 -2
  48. package/docs/documentation/components/Label.html +3 -3
  49. package/docs/documentation/components/Number.html +57 -41
  50. package/docs/documentation/components/Select.html +55 -42
  51. package/docs/documentation/components/Slider.html +254 -142
  52. package/docs/documentation/components/TimePicker.html +103 -17
  53. package/docs/documentation/components/TimePickerSelect.html +65 -37
  54. package/docs/documentation/components/Toggle.html +168 -55
  55. package/docs/documentation/coverage.html +20 -20
  56. package/docs/documentation/js/search/search_index.js +2 -2
  57. package/docs/storybook/iframe.html +3 -3
  58. package/docs/storybook/{main.56858f6c72e70f546e4c.bundle.js → main.e71ec014aa45dc1d6679.bundle.js} +194 -104
  59. package/docs/storybook/main.e71ec014aa45dc1d6679.bundle.js.map +1 -0
  60. package/docs/storybook/{runtime~main.56858f6c72e70f546e4c.bundle.js → runtime~main.e71ec014aa45dc1d6679.bundle.js} +1 -1
  61. package/docs/storybook/{runtime~main.56858f6c72e70f546e4c.bundle.js.map → runtime~main.e71ec014aa45dc1d6679.bundle.js.map} +1 -1
  62. package/docs/storybook/{vendors~main.56858f6c72e70f546e4c.bundle.js → vendors~main.e71ec014aa45dc1d6679.bundle.js} +1 -1
  63. package/docs/storybook/{vendors~main.56858f6c72e70f546e4c.bundle.js.map → vendors~main.e71ec014aa45dc1d6679.bundle.js.map} +1 -1
  64. package/dropdown/dropdown.component.d.ts +12 -0
  65. package/dropdown/dropdown.component.js +12 -2
  66. package/dropdown/dropdown.component.js.map +1 -1
  67. package/dropdown/dropdown.component.metadata.json +1 -1
  68. package/dropdown/dropdown.component.ngfactory.js +18 -11
  69. package/dropdown/dropdown.component.ngfactory.js.map +1 -1
  70. package/dropdown/dropdown.component.ngsummary.json +1 -1
  71. package/dropdown/dropdown.module.ngfactory.js.map +1 -1
  72. package/file-uploader/file-uploader.component.js +1 -1
  73. package/file-uploader/file-uploader.component.js.map +1 -1
  74. package/file-uploader/file-uploader.component.metadata.json +1 -1
  75. package/file-uploader/file-uploader.component.ngfactory.js +1 -1
  76. package/file-uploader/file-uploader.component.ngfactory.js.map +1 -1
  77. package/file-uploader/file.component.js +1 -1
  78. package/file-uploader/file.component.js.map +1 -1
  79. package/file-uploader/file.component.metadata.json +1 -1
  80. package/file-uploader/file.component.ngfactory.js +7 -1
  81. package/file-uploader/file.component.ngfactory.js.map +1 -1
  82. package/input/label.component.d.ts +1 -1
  83. package/input/label.component.js.map +1 -1
  84. package/number-input/number.component.d.ts +3 -3
  85. package/number-input/number.component.js +1 -1
  86. package/number-input/number.component.js.map +1 -1
  87. package/number-input/number.component.metadata.json +1 -1
  88. package/number-input/number.component.ngfactory.js +25 -21
  89. package/number-input/number.component.ngfactory.js.map +1 -1
  90. package/number-input/number.module.ngfactory.js.map +1 -1
  91. package/package.json +1 -1
  92. package/select/select.component.d.ts +3 -3
  93. package/select/select.component.js +4 -8
  94. package/select/select.component.js.map +1 -1
  95. package/select/select.component.metadata.json +1 -1
  96. package/select/select.component.ngfactory.js +21 -15
  97. package/select/select.component.ngfactory.js.map +1 -1
  98. package/select/select.component.ngsummary.json +1 -1
  99. package/slider/slider.component.d.ts +4 -1
  100. package/slider/slider.component.js +7 -3
  101. package/slider/slider.component.js.map +1 -1
  102. package/slider/slider.component.metadata.json +1 -1
  103. package/slider/slider.component.ngfactory.js +10 -7
  104. package/slider/slider.component.ngfactory.js.map +1 -1
  105. package/slider/slider.component.ngsummary.json +1 -1
  106. package/timepicker/timepicker.component.d.ts +3 -2
  107. package/timepicker/timepicker.component.js +5 -2
  108. package/timepicker/timepicker.component.js.map +1 -1
  109. package/timepicker/timepicker.component.metadata.json +1 -1
  110. package/timepicker/timepicker.component.ngfactory.js +4 -1
  111. package/timepicker/timepicker.component.ngfactory.js.map +1 -1
  112. package/timepicker/timepicker.component.ngsummary.json +1 -1
  113. package/timepicker-select/timepicker-select.component.d.ts +1 -0
  114. package/timepicker-select/timepicker-select.component.js +1 -0
  115. package/timepicker-select/timepicker-select.component.js.map +1 -1
  116. package/timepicker-select/timepicker-select.component.metadata.json +1 -1
  117. package/timepicker-select/timepicker-select.component.ngsummary.json +1 -1
  118. package/toggle/toggle.component.d.ts +3 -2
  119. package/toggle/toggle.component.js +5 -2
  120. package/toggle/toggle.component.js.map +1 -1
  121. package/toggle/toggle.component.metadata.json +1 -1
  122. package/toggle/toggle.component.ngfactory.js +7 -4
  123. package/toggle/toggle.component.ngfactory.js.map +1 -1
  124. package/toggle/toggle.component.ngsummary.json +1 -1
  125. package/ui-shell/header/header-item.component.js +1 -1
  126. package/ui-shell/header/header-item.component.js.map +1 -1
  127. package/docs/storybook/main.56858f6c72e70f546e4c.bundle.js.map +0 -1
@@ -1185,6 +1185,10 @@ var Checkbox = /** @class */ (function () {
1185
1185
  * Set to `true` for a loading checkbox.
1186
1186
  */
1187
1187
  this.skeleton = false;
1188
+ /**
1189
+ * Set to `true` to hide the checkbox labels.
1190
+ */
1191
+ this.hideLabel = false;
1188
1192
  /**
1189
1193
  * The unique id for the checkbox component.
1190
1194
  */
@@ -1404,6 +1408,10 @@ var Checkbox = /** @class */ (function () {
1404
1408
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
1405
1409
  __metadata("design:type", Object)
1406
1410
  ], Checkbox.prototype, "skeleton", void 0);
1411
+ __decorate([
1412
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
1413
+ __metadata("design:type", Object)
1414
+ ], Checkbox.prototype, "hideLabel", void 0);
1407
1415
  __decorate([
1408
1416
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
1409
1417
  __metadata("design:type", String)
@@ -1463,7 +1471,7 @@ var Checkbox = /** @class */ (function () {
1463
1471
  Checkbox = Checkbox_1 = __decorate([
1464
1472
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
1465
1473
  selector: "ibm-checkbox",
1466
- template: "\n\t\t<input\n\t\t\t#inputCheckbox\n\t\t\tclass=\"bx--checkbox\"\n\t\t\ttype=\"checkbox\"\n\t\t\t[id]=\"id\"\n\t\t\t[value]=\"value\"\n\t\t\t[name]=\"name\"\n\t\t\t[required]=\"required\"\n\t\t\t[checked]=\"checked\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[indeterminate]=\"indeterminate\"\n\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t[attr.aria-labelledby]=\"ariaLabelledby\"\n\t\t\t[attr.aria-checked]=\"(indeterminate ? 'mixed' : checked)\"\n\t\t\t(change)=\"onChange($event)\"\n\t\t\t(click)=\"onClick($event)\">\n\t\t<label\n\t\t\t[for]=\"id\"\n\t\t\tclass=\"bx--checkbox-label\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'bx--skeleton' : skeleton\n\t\t\t}\">\n\t\t\t<ng-content></ng-content>\n\t\t</label>\n\t",
1474
+ template: "\n\t\t<input\n\t\t\t#inputCheckbox\n\t\t\tclass=\"bx--checkbox\"\n\t\t\ttype=\"checkbox\"\n\t\t\t[id]=\"id\"\n\t\t\t[value]=\"value\"\n\t\t\t[name]=\"name\"\n\t\t\t[required]=\"required\"\n\t\t\t[checked]=\"checked\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[indeterminate]=\"indeterminate\"\n\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\t[attr.aria-labelledby]=\"ariaLabelledby\"\n\t\t\t[attr.aria-checked]=\"(indeterminate ? 'mixed' : checked)\"\n\t\t\t(change)=\"onChange($event)\"\n\t\t\t(click)=\"onClick($event)\">\n\t\t<label\n\t\t\t[for]=\"id\"\n\t\t\tclass=\"bx--checkbox-label\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'bx--skeleton' : skeleton\n\t\t\t}\">\n\t\t\t<span [ngClass]=\"{'bx--visually-hidden' : hideLabel}\">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</span>\n\t\t</label>\n\t",
1467
1475
  providers: [
1468
1476
  {
1469
1477
  provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
@@ -1556,8 +1564,8 @@ __webpack_require__.r(__webpack_exports__);
1556
1564
  /* harmony import */ var _storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__);
1557
1565
  /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ */ "./src/index.ts");
1558
1566
  var withStorySource = __webpack_require__(/*! @storybook/addon-storysource */ "./node_modules/@storybook/addon-storysource/dist/index.js").withStorySource;
1559
- var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, boolean } from '@storybook/addon-knobs/angular';\n\nimport { CheckboxModule, DocumentationModule } from '../';\n\nstoriesOf('Checkbox', module)\n .addDecorator(\n moduleMetadata({\n imports: [CheckboxModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t<fieldset class=\"bx--fieldset\">\n\t\t\t<legend class=\"bx--label\">Checkbox</legend>\n\t\t\t<ibm-checkbox\n\t\t\t\tchecked=\"true\"\n\t\t\t\t(change)=\"onChange($event)\">\n\t\t\t\tCheckbox\n\t\t\t</ibm-checkbox>\n\t\t\t<ibm-checkbox\n\t\t\t\tindeterminate=\"true\"\n\t\t\t\t(change)=\"onChange($event)\"\n\t\t\t\t(indeterminateChange)=\"onIndeterminateChange($event)\">\n\t\t\t\tIndeterminate checkbox\n\t\t\t</ibm-checkbox>\n\t\t\t<ibm-checkbox\n\t\t\t\tdisabled=\"true\"\n\t\t\t\t(change)=\"onChange($event)\"\n\t\t\t\t(indeterminateChange)=\"onIndeterminateChange($event)\">\n\t\t\t\tDisabled checkbox\n\t\t\t</ibm-checkbox>\n\t\t</fieldset>\n\t`,\n props: {\n onChange: action('Change fired!'),\n onIndeterminateChange: action('Indeterminate change fired!'),\n },\n }))\n .add('Skeleton', () => ({\n template: `<ibm-checkbox skeleton=\"true\"></ibm-checkbox>`,\n }))\n .add('Documentation', () => ({\n template: `\n\t\t<ibm-documentation src=\"documentation/components/Checkbox.html\"></ibm-documentation>\n\t`,\n }));\n";
1560
- var __ADDS_MAP__ = { "checkbox--documentation": { "startLoc": { "col": 7, "line": 45 }, "endLoc": { "col": 4, "line": 49 } }, "checkbox--skeleton": { "startLoc": { "col": 7, "line": 42 }, "endLoc": { "col": 4, "line": 44 } }, "checkbox--basic": { "startLoc": { "col": 7, "line": 14 }, "endLoc": { "col": 4, "line": 41 } } };
1567
+ var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, boolean, text } from '@storybook/addon-knobs/angular';\n\nimport { CheckboxModule, DocumentationModule } from '../';\n\nstoriesOf('Checkbox', module)\n .addDecorator(\n moduleMetadata({\n imports: [CheckboxModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t<fieldset class=\"bx--fieldset\">\n\t\t\t<legend class=\"bx--label\">{{label}}</legend>\n\t\t\t<ibm-checkbox\n\t\t\t\tchecked=\"true\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t(change)=\"onChange($event)\">\n\t\t\t\tCheckbox\n\t\t\t</ibm-checkbox>\n\t\t\t<ibm-checkbox\n\t\t\t\tindeterminate=\"true\"\n\t\t\t\t(change)=\"onChange($event)\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t(indeterminateChange)=\"onIndeterminateChange($event)\">\n\t\t\t\tIndeterminate checkbox\n\t\t\t</ibm-checkbox>\n\t\t\t<ibm-checkbox\n\t\t\t\tdisabled=\"true\"\n\t\t\t\t(change)=\"onChange($event)\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t(indeterminateChange)=\"onIndeterminateChange($event)\">\n\t\t\t\tDisabled checkbox\n\t\t\t</ibm-checkbox>\n\t\t</fieldset>\n\t`,\n props: {\n onChange: action('Change fired!'),\n onIndeterminateChange: action('Indeterminate change fired!'),\n label: text('Label text', 'Checkbox'),\n hideLabel: boolean('Hide labels', false),\n },\n }))\n .add('Skeleton', () => ({\n template: `<ibm-checkbox skeleton=\"true\"></ibm-checkbox>`,\n }))\n .add('Documentation', () => ({\n template: `\n\t\t<ibm-documentation src=\"documentation/components/Checkbox.html\"></ibm-documentation>\n\t`,\n }));\n";
1568
+ var __ADDS_MAP__ = { "checkbox--documentation": { "startLoc": { "col": 7, "line": 50 }, "endLoc": { "col": 4, "line": 54 } }, "checkbox--skeleton": { "startLoc": { "col": 7, "line": 47 }, "endLoc": { "col": 4, "line": 49 } }, "checkbox--basic": { "startLoc": { "col": 7, "line": 14 }, "endLoc": { "col": 4, "line": 46 } } };
1561
1569
 
1562
1570
 
1563
1571
 
@@ -1567,10 +1575,12 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Checkbox",
1567
1575
  }))
1568
1576
  .addDecorator(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["withKnobs"])
1569
1577
  .add("Basic", function () { return ({
1570
- template: "\n\t\t<fieldset class=\"bx--fieldset\">\n\t\t\t<legend class=\"bx--label\">Checkbox</legend>\n\t\t\t<ibm-checkbox\n\t\t\t\tchecked=\"true\"\n\t\t\t\t(change)=\"onChange($event)\">\n\t\t\t\tCheckbox\n\t\t\t</ibm-checkbox>\n\t\t\t<ibm-checkbox\n\t\t\t\tindeterminate=\"true\"\n\t\t\t\t(change)=\"onChange($event)\"\n\t\t\t\t(indeterminateChange)=\"onIndeterminateChange($event)\">\n\t\t\t\tIndeterminate checkbox\n\t\t\t</ibm-checkbox>\n\t\t\t<ibm-checkbox\n\t\t\t\tdisabled=\"true\"\n\t\t\t\t(change)=\"onChange($event)\"\n\t\t\t\t(indeterminateChange)=\"onIndeterminateChange($event)\">\n\t\t\t\tDisabled checkbox\n\t\t\t</ibm-checkbox>\n\t\t</fieldset>\n\t",
1578
+ template: "\n\t\t<fieldset class=\"bx--fieldset\">\n\t\t\t<legend class=\"bx--label\">{{label}}</legend>\n\t\t\t<ibm-checkbox\n\t\t\t\tchecked=\"true\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t(change)=\"onChange($event)\">\n\t\t\t\tCheckbox\n\t\t\t</ibm-checkbox>\n\t\t\t<ibm-checkbox\n\t\t\t\tindeterminate=\"true\"\n\t\t\t\t(change)=\"onChange($event)\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t(indeterminateChange)=\"onIndeterminateChange($event)\">\n\t\t\t\tIndeterminate checkbox\n\t\t\t</ibm-checkbox>\n\t\t\t<ibm-checkbox\n\t\t\t\tdisabled=\"true\"\n\t\t\t\t(change)=\"onChange($event)\"\n\t\t\t\t[hideLabel]=\"hideLabel\"\n\t\t\t\t(indeterminateChange)=\"onIndeterminateChange($event)\">\n\t\t\t\tDisabled checkbox\n\t\t\t</ibm-checkbox>\n\t\t</fieldset>\n\t",
1571
1579
  props: {
1572
1580
  onChange: Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__["action"])("Change fired!"),
1573
- onIndeterminateChange: Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__["action"])("Indeterminate change fired!")
1581
+ onIndeterminateChange: Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__["action"])("Indeterminate change fired!"),
1582
+ label: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Label text", "Checkbox"),
1583
+ hideLabel: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["boolean"])("Hide labels", false)
1574
1584
  }
1575
1585
  }); })
1576
1586
  .add("Skeleton", function () { return ({
@@ -2046,6 +2056,7 @@ var ComboBox = /** @class */ (function () {
2046
2056
  */
2047
2057
  function ComboBox(elementRef) {
2048
2058
  this.elementRef = elementRef;
2059
+ this.id = "dropdown-" + ComboBox_1.comboBoxCount++;
2049
2060
  /**
2050
2061
  * List of items to fill the content with.
2051
2062
  *
@@ -2130,7 +2141,7 @@ var ComboBox = /** @class */ (function () {
2130
2141
  this.submit = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
2131
2142
  /** emits an empty event when the menu is closed */
2132
2143
  this.close = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
2133
- this.class = "bx--combo-box bx--list-box";
2144
+ this.hostClass = true;
2134
2145
  this.role = "combobox";
2135
2146
  this.display = "block";
2136
2147
  this.open = false;
@@ -2154,11 +2165,6 @@ var ComboBox = /** @class */ (function () {
2154
2165
  this.updateSelected();
2155
2166
  }
2156
2167
  };
2157
- ComboBox.prototype.ngOnInit = function () {
2158
- if (this.type === "multi") {
2159
- this.class = "bx--multi-select bx--combo-box bx--list-box";
2160
- }
2161
- };
2162
2168
  /**
2163
2169
  * Sets initial state that depends on child components
2164
2170
  * Subscribes to select events and handles focus/filtering/initial list updates
@@ -2354,6 +2360,9 @@ var ComboBox = /** @class */ (function () {
2354
2360
  }
2355
2361
  });
2356
2362
  };
2363
+ ComboBox.prototype.isTemplate = function (value) {
2364
+ return value instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"];
2365
+ };
2357
2366
  ComboBox.prototype.updateSelected = function () {
2358
2367
  var selected = this.view.getSelected();
2359
2368
  if (selected) {
@@ -2366,7 +2375,12 @@ var ComboBox = /** @class */ (function () {
2366
2375
  }
2367
2376
  }
2368
2377
  };
2369
- var ComboBox_1, _a, _b, _c, _d, _e, _f;
2378
+ var ComboBox_1, _a, _b, _c, _d, _e, _f, _g, _h;
2379
+ ComboBox.comboBoxCount = 0;
2380
+ __decorate([
2381
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
2382
+ __metadata("design:type", Object)
2383
+ ], ComboBox.prototype, "id", void 0);
2370
2384
  __decorate([
2371
2385
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
2372
2386
  __metadata("design:type", typeof (_a = typeof Array !== "undefined" && Array) === "function" && _a || Object)
@@ -2383,6 +2397,14 @@ var ComboBox = /** @class */ (function () {
2383
2397
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
2384
2398
  __metadata("design:type", String)
2385
2399
  ], ComboBox.prototype, "size", void 0);
2400
+ __decorate([
2401
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
2402
+ __metadata("design:type", Object)
2403
+ ], ComboBox.prototype, "label", void 0);
2404
+ __decorate([
2405
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
2406
+ __metadata("design:type", Object)
2407
+ ], ComboBox.prototype, "helperText", void 0);
2386
2408
  __decorate([
2387
2409
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])("attr.aria-disabled"), Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
2388
2410
  __metadata("design:type", Object)
@@ -2393,24 +2415,24 @@ var ComboBox = /** @class */ (function () {
2393
2415
  ], ComboBox.prototype, "selected", void 0);
2394
2416
  __decorate([
2395
2417
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
2396
- __metadata("design:type", typeof (_b = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _b || Object)
2418
+ __metadata("design:type", typeof (_d = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _d || Object)
2397
2419
  ], ComboBox.prototype, "submit", void 0);
2398
2420
  __decorate([
2399
2421
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
2400
- __metadata("design:type", typeof (_c = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _c || Object)
2422
+ __metadata("design:type", typeof (_e = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _e || Object)
2401
2423
  ], ComboBox.prototype, "close", void 0);
2402
2424
  __decorate([
2403
2425
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"])(_dropdown_abstract_dropdown_view_class__WEBPACK_IMPORTED_MODULE_1__["AbstractDropdownView"]),
2404
- __metadata("design:type", typeof (_d = typeof _dropdown_abstract_dropdown_view_class__WEBPACK_IMPORTED_MODULE_1__["AbstractDropdownView"] !== "undefined" && _dropdown_abstract_dropdown_view_class__WEBPACK_IMPORTED_MODULE_1__["AbstractDropdownView"]) === "function" && _d || Object)
2426
+ __metadata("design:type", typeof (_f = typeof _dropdown_abstract_dropdown_view_class__WEBPACK_IMPORTED_MODULE_1__["AbstractDropdownView"] !== "undefined" && _dropdown_abstract_dropdown_view_class__WEBPACK_IMPORTED_MODULE_1__["AbstractDropdownView"]) === "function" && _f || Object)
2405
2427
  ], ComboBox.prototype, "view", void 0);
2406
2428
  __decorate([
2407
2429
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])("dropdownMenu"),
2408
2430
  __metadata("design:type", Object)
2409
2431
  ], ComboBox.prototype, "dropdownMenu", void 0);
2410
2432
  __decorate([
2411
- Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])("class"),
2433
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])("class.bx--list-box__wrapper"),
2412
2434
  __metadata("design:type", Object)
2413
- ], ComboBox.prototype, "class", void 0);
2435
+ ], ComboBox.prototype, "hostClass", void 0);
2414
2436
  __decorate([
2415
2437
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])("attr.role"),
2416
2438
  __metadata("design:type", Object)
@@ -2422,13 +2444,13 @@ var ComboBox = /** @class */ (function () {
2422
2444
  __decorate([
2423
2445
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])("keydown", ["$event"]),
2424
2446
  __metadata("design:type", Function),
2425
- __metadata("design:paramtypes", [typeof (_e = typeof KeyboardEvent !== "undefined" && KeyboardEvent) === "function" && _e || Object]),
2447
+ __metadata("design:paramtypes", [typeof (_g = typeof KeyboardEvent !== "undefined" && KeyboardEvent) === "function" && _g || Object]),
2426
2448
  __metadata("design:returntype", void 0)
2427
2449
  ], ComboBox.prototype, "hostkeys", null);
2428
2450
  ComboBox = ComboBox_1 = __decorate([
2429
2451
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
2430
2452
  selector: "ibm-combo-box",
2431
- template: "\n\t\t<div\n\t\t\t[attr.aria-expanded]=\"open\"\n\t\t\trole=\"button\"\n\t\t\tclass=\"bx--list-box__field\"\n\t\t\ttabindex=\"0\"\n\t\t\ttype=\"button\"\n\t\t\taria-label=\"close menu\"\n\t\t\taria-haspopup=\"true\"\n\t\t\t(click)=\"toggleDropdown()\">\n\t\t\t<div\n\t\t\t\t*ngIf=\"type === 'multi' && pills.length > 0\"\n\t\t\t\t(click)=\"clearSelected()\"\n\t\t\t\trole=\"button\"\n\t\t\t\tclass=\"bx--list-box__selection bx--list-box__selection--multi\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\ttitle=\"Clear all selected items\">\n\t\t\t\t{{ pills.length }}\n\t\t\t\t<svg\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\trole=\"img\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<input\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(keyup)=\"onSearch($event.target.value)\"\n\t\t\t\t[value]=\"selectedValue\"\n\t\t\t\tclass=\"bx--text-input\"\n\t\t\t\trole=\"combobox\"\n\t\t\t\taria-label=\"ListBox input field\"\n\t\t\t\tautocomplete=\"off\"\n\t\t\t\t[placeholder]=\"placeholder\"/>\n\t\t\t\t<ibm-icon-chevron-down16\n\t\t\t\t\t[ngClass]=\"{'bx--list-box__menu-icon--open': open}\"\n\t\t\t\t\tclass=\"bx--list-box__menu-icon\"\n\t\t\t\t\tariaLabel=\"Close menu\">\n\t\t\t\t</ibm-icon-chevron-down16>\n\t\t</div>\n\t\t<div\n\t\t\t#dropdownMenu\n\t\t\t*ngIf=\"open\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t",
2453
+ template: "\n\t\t<label [for]=\"id\" class=\"bx--label\">\n\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t</label>\n\t\t<div *ngIf=\"helperText\" class=\"bx--form__helper-text\">\n\t\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t\t</div>\n\t\t<div\n\t\t\tclass=\"bx--combo-box bx--list-box\"\n\t\t\t[ngClass]=\"{'bx--multi-select' : type === 'multi'}\">\n\t\t\t<div\n\t\t\t\t[attr.aria-expanded]=\"open\"\n\t\t\t\trole=\"button\"\n\t\t\t\tclass=\"bx--list-box__field\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\ttype=\"button\"\n\t\t\t\taria-label=\"close menu\"\n\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t(click)=\"toggleDropdown()\">\n\t\t\t\t<div\n\t\t\t\t\t*ngIf=\"type === 'multi' && pills.length > 0\"\n\t\t\t\t\t(click)=\"clearSelected()\"\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\tclass=\"bx--list-box__selection bx--list-box__selection--multi\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\ttitle=\"Clear all selected items\">\n\t\t\t\t\t{{ pills.length }}\n\t\t\t\t\t<svg\n\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\t\trole=\"img\"\n\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t\t<input\n\t\t\t\t\t[id]=\"id\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t(keyup)=\"onSearch($event.target.value)\"\n\t\t\t\t\t[value]=\"selectedValue\"\n\t\t\t\t\tclass=\"bx--text-input\"\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-label=\"ListBox input field\"\n\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t[placeholder]=\"placeholder\"/>\n\t\t\t\t\t<ibm-icon-chevron-down16\n\t\t\t\t\t\t[ngClass]=\"{'bx--list-box__menu-icon--open': open}\"\n\t\t\t\t\t\tclass=\"bx--list-box__menu-icon\"\n\t\t\t\t\t\tariaLabel=\"Close menu\">\n\t\t\t\t\t</ibm-icon-chevron-down16>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\t#dropdownMenu\n\t\t\t\t*ngIf=\"open\">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</div>\n\t\t</div>\n\t",
2432
2454
  providers: [
2433
2455
  {
2434
2456
  provide: _angular_forms__WEBPACK_IMPORTED_MODULE_2__["NG_VALUE_ACCESSOR"],
@@ -2437,7 +2459,7 @@ var ComboBox = /** @class */ (function () {
2437
2459
  }
2438
2460
  ]
2439
2461
  }),
2440
- __metadata("design:paramtypes", [typeof (_f = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _f || Object])
2462
+ __metadata("design:paramtypes", [typeof (_h = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _h || Object])
2441
2463
  ], ComboBox);
2442
2464
  return ComboBox;
2443
2465
  }());
@@ -2524,8 +2546,8 @@ __webpack_require__.r(__webpack_exports__);
2524
2546
  /* harmony import */ var _storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__);
2525
2547
  /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ */ "./src/index.ts");
2526
2548
  var withStorySource = __webpack_require__(/*! @storybook/addon-storysource */ "./node_modules/@storybook/addon-storysource/dist/index.js").withStorySource;
2527
- var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, boolean, object } from '@storybook/addon-knobs/angular';\n\nimport { ComboBoxModule, DocumentationModule } from '../';\n\nstoriesOf('Combobox', module)\n .addDecorator(\n moduleMetadata({\n imports: [ComboBoxModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t\t<ibm-combo-box [items]=\"items\" (selected)=\"selected($event)\">\n\t\t\t\t<ibm-dropdown-list></ibm-dropdown-list>\n\t\t\t</ibm-combo-box>\n\t\t`,\n props: {\n items: [\n {\n content: 'one',\n },\n {\n content: 'two',\n },\n {\n content: 'three',\n },\n {\n content: 'four',\n },\n ],\n selected: action('selection changed'),\n },\n }))\n .add('Multi-select', () => ({\n template: `\n\t\t\t<ibm-combo-box [items]=\"items\" type=\"multi\" (selected)=\"selected($event)\">\n\t\t\t\t<ibm-dropdown-list></ibm-dropdown-list>\n\t\t\t</ibm-combo-box>\n\t\t`,\n props: {\n items: [\n {\n content: 'one',\n },\n {\n content: 'two',\n },\n {\n content: 'three',\n },\n {\n content: 'four',\n },\n ],\n selected: action('selection changed'),\n },\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/ComboBox.html\"></ibm-documentation>\n\t\t`,\n }));\n";
2528
- var __ADDS_MAP__ = { "combobox--documentation": { "startLoc": { "col": 7, "line": 62 }, "endLoc": { "col": 4, "line": 66 } }, "combobox--multi-select": { "startLoc": { "col": 7, "line": 38 }, "endLoc": { "col": 4, "line": 61 } }, "combobox--basic": { "startLoc": { "col": 7, "line": 14 }, "endLoc": { "col": 4, "line": 37 } } };
2549
+ var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, object, text } from '@storybook/addon-knobs/angular';\n\nimport { ComboBoxModule, DocumentationModule } from '../';\n\nstoriesOf('Combobox', module)\n .addDecorator(\n moduleMetadata({\n imports: [ComboBoxModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t\t<ibm-combo-box\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[items]=\"items\"\n\t\t\t\t(selected)=\"selected($event)\">\n\t\t\t\t<ibm-dropdown-list></ibm-dropdown-list>\n\t\t\t</ibm-combo-box>\n\t\t`,\n props: {\n label: text('Label', 'ComboBox label'),\n helperText: text('Helper text', 'Optional helper text.'),\n items: [\n {\n content: 'one',\n },\n {\n content: 'two',\n },\n {\n content: 'three',\n },\n {\n content: 'four',\n },\n ],\n selected: action('selection changed'),\n },\n }))\n .add('Multi-select', () => ({\n template: `\n\t\t\t<ibm-combo-box\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[items]=\"items\"\n\t\t\t\ttype=\"multi\"\n\t\t\t\t(selected)=\"selected($event)\">\n\t\t\t\t<ibm-dropdown-list></ibm-dropdown-list>\n\t\t\t</ibm-combo-box>\n\t\t`,\n props: {\n label: text('Label', 'ComboBox label'),\n helperText: text('Helper text', 'Optional helper text.'),\n items: [\n {\n content: 'one',\n },\n {\n content: 'two',\n },\n {\n content: 'three',\n },\n {\n content: 'four',\n },\n ],\n selected: action('selection changed'),\n },\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/ComboBox.html\"></ibm-documentation>\n\t\t`,\n }));\n";
2550
+ var __ADDS_MAP__ = { "combobox--documentation": { "startLoc": { "col": 7, "line": 75 }, "endLoc": { "col": 4, "line": 79 } }, "combobox--multi-select": { "startLoc": { "col": 7, "line": 44 }, "endLoc": { "col": 4, "line": 74 } }, "combobox--basic": { "startLoc": { "col": 7, "line": 14 }, "endLoc": { "col": 4, "line": 43 } } };
2529
2551
 
2530
2552
 
2531
2553
 
@@ -2539,8 +2561,10 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Combobox",
2539
2561
  }))
2540
2562
  .addDecorator(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["withKnobs"])
2541
2563
  .add("Basic", function () { return ({
2542
- template: "\n\t\t\t<ibm-combo-box [items]=\"items\" (selected)=\"selected($event)\">\n\t\t\t\t<ibm-dropdown-list></ibm-dropdown-list>\n\t\t\t</ibm-combo-box>\n\t\t",
2564
+ template: "\n\t\t\t<ibm-combo-box\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[items]=\"items\"\n\t\t\t\t(selected)=\"selected($event)\">\n\t\t\t\t<ibm-dropdown-list></ibm-dropdown-list>\n\t\t\t</ibm-combo-box>\n\t\t",
2543
2565
  props: {
2566
+ label: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Label", "ComboBox label"),
2567
+ helperText: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Helper text", "Optional helper text."),
2544
2568
  items: [
2545
2569
  {
2546
2570
  content: "one"
@@ -2559,8 +2583,10 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Combobox",
2559
2583
  }
2560
2584
  }); })
2561
2585
  .add("Multi-select", function () { return ({
2562
- template: "\n\t\t\t<ibm-combo-box [items]=\"items\" type=\"multi\" (selected)=\"selected($event)\">\n\t\t\t\t<ibm-dropdown-list></ibm-dropdown-list>\n\t\t\t</ibm-combo-box>\n\t\t",
2586
+ template: "\n\t\t\t<ibm-combo-box\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[items]=\"items\"\n\t\t\t\ttype=\"multi\"\n\t\t\t\t(selected)=\"selected($event)\">\n\t\t\t\t<ibm-dropdown-list></ibm-dropdown-list>\n\t\t\t</ibm-combo-box>\n\t\t",
2563
2587
  props: {
2588
+ label: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Label", "ComboBox label"),
2589
+ helperText: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Helper text", "Optional helper text."),
2564
2590
  items: [
2565
2591
  {
2566
2592
  content: "one"
@@ -2889,15 +2915,27 @@ var __metadata = (undefined && undefined.__metadata) || function (k, v) {
2889
2915
  var ContentSwitcher = /** @class */ (function () {
2890
2916
  function ContentSwitcher(elementRef) {
2891
2917
  this.elementRef = elementRef;
2892
- /**
2893
- * aria-label for the content switcher. Should be set to something descriptive
2894
- */
2895
- this.label = "content switcher";
2918
+ this.ariaLabel = "content switcher";
2896
2919
  /**
2897
2920
  * Emits the activated `ContentSwitcherOption`
2898
2921
  */
2899
2922
  this.selected = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
2900
2923
  }
2924
+ Object.defineProperty(ContentSwitcher.prototype, "label", {
2925
+ get: function () {
2926
+ console.warn("`label` is deprecated (to be removed in next major version). Use `ariaLabel` instead.");
2927
+ return this.ariaLabel;
2928
+ },
2929
+ /**
2930
+ * aria-label for the content switcher. Should be set to something descriptive
2931
+ */
2932
+ set: function (value) {
2933
+ console.warn("`label` is deprecated (to be removed in next major version). Use `ariaLabel` instead.");
2934
+ this.ariaLabel = value;
2935
+ },
2936
+ enumerable: true,
2937
+ configurable: true
2938
+ });
2901
2939
  ContentSwitcher.prototype.ngAfterViewInit = function () {
2902
2940
  var _this = this;
2903
2941
  var firstActive = this.options.find(function (option) { return option.active; });
@@ -2954,10 +2992,15 @@ var ContentSwitcher = /** @class */ (function () {
2954
2992
  }
2955
2993
  };
2956
2994
  var _a, _b, _c;
2995
+ __decorate([
2996
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
2997
+ __metadata("design:type", String),
2998
+ __metadata("design:paramtypes", [String])
2999
+ ], ContentSwitcher.prototype, "label", null);
2957
3000
  __decorate([
2958
3001
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
2959
3002
  __metadata("design:type", Object)
2960
- ], ContentSwitcher.prototype, "label", void 0);
3003
+ ], ContentSwitcher.prototype, "ariaLabel", void 0);
2961
3004
  __decorate([
2962
3005
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
2963
3006
  __metadata("design:type", Object)
@@ -2975,7 +3018,7 @@ var ContentSwitcher = /** @class */ (function () {
2975
3018
  ContentSwitcher = __decorate([
2976
3019
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
2977
3020
  selector: "ibm-content-switcher",
2978
- template: "\n\t\t<div\n\t\t\t[attr.aria-label]=\"label\"\n\t\t\tclass=\"bx--content-switcher\"\n\t\t\trole=\"tablist\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t"
3021
+ template: "\n\t\t<div\n\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\tclass=\"bx--content-switcher\"\n\t\t\trole=\"tablist\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t"
2979
3022
  }),
2980
3023
  __metadata("design:paramtypes", [typeof (_c = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _c || Object])
2981
3024
  ], ContentSwitcher);
@@ -3129,7 +3172,7 @@ var DatePickerInput = /** @class */ (function () {
3129
3172
  DatePickerInput.prototype.isTemplate = function (value) {
3130
3173
  return value instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"];
3131
3174
  };
3132
- var DatePickerInput_1, _a, _b;
3175
+ var DatePickerInput_1, _a, _b, _c;
3133
3176
  DatePickerInput.datePickerCount = 0;
3134
3177
  __decorate([
3135
3178
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
@@ -3145,7 +3188,7 @@ var DatePickerInput = /** @class */ (function () {
3145
3188
  ], DatePickerInput.prototype, "hasIcon", void 0);
3146
3189
  __decorate([
3147
3190
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
3148
- __metadata("design:type", String)
3191
+ __metadata("design:type", Object)
3149
3192
  ], DatePickerInput.prototype, "label", void 0);
3150
3193
  __decorate([
3151
3194
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
@@ -3157,7 +3200,7 @@ var DatePickerInput = /** @class */ (function () {
3157
3200
  ], DatePickerInput.prototype, "pattern", void 0);
3158
3201
  __decorate([
3159
3202
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
3160
- __metadata("design:type", typeof (_a = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _a || Object)
3203
+ __metadata("design:type", typeof (_b = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _b || Object)
3161
3204
  ], DatePickerInput.prototype, "valueChange", void 0);
3162
3205
  __decorate([
3163
3206
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
@@ -3182,7 +3225,7 @@ var DatePickerInput = /** @class */ (function () {
3182
3225
  DatePickerInput = DatePickerInput_1 = __decorate([
3183
3226
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
3184
3227
  selector: "ibm-date-picker-input",
3185
- template: "\n\t<div class=\"bx--form-item\">\n\t\t<div class=\"bx--date-picker\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'bx--date-picker--single' : type === 'single',\n\t\t\t\t'bx--date-picker--range' : type === 'range',\n\t\t\t\t'bx--date-picker--light' : theme === 'light',\n\t\t\t\t'bx--skeleton' : skeleton\n\t\t\t}\">\n\t\t\t<div class=\"bx--date-picker-container\">\n\t\t\t\t<label [for]=\"id\" class=\"bx--label\">\n\t\t\t\t\t{{label}}\n\t\t\t\t</label>\n\t\t\t\t<ibm-icon-calendar16\n\t\t\t\t\t*ngIf=\"type == 'single'\"\n\t\t\t\t\tdata-date-picker-icon\n\t\t\t\t\tclass=\"bx--date-picker__icon\"\n\t\t\t\t\tdata-open>\n\t\t\t\t</ibm-icon-calendar16>\n\t\t\t\t<input\n\t\t\t\t #dateInput\n\t\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tclass=\"bx--date-picker__input\"\n\t\t\t\t\t[pattern]=\"pattern\"\n\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\tdata-date-picker-input\n\t\t\t\t\t[attr.data-input] = \"type == 'single' || type == 'range' ? '' : null\"\n\t\t\t\t\t[id]= \"id\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t[attr.data-invalid]=\"(invalid ? true : null)\"\n\t\t\t\t\t(change) = \"valueChange.emit(dateInput.value)\"/>\n\t\t\t\t\t<div *ngIf=\"invalid\" class=\"bx--form-requirement\">\n\t\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{invalidText}}</ng-container>\n\t\t\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<ibm-icon-calendar16\n\t\t\t\t*ngIf= \"type == 'range' && hasIcon\"\n\t\t\t\tdata-date-picker-icon\n\t\t\t\tclass=\"bx--date-picker__icon\"\n\t\t\t\tdata-open>\n\t\t\t</ibm-icon-calendar16>\n\t\t</div>\n\t</div>\n\t"
3228
+ template: "\n\t<div class=\"bx--form-item\">\n\t\t<div class=\"bx--date-picker\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'bx--date-picker--single' : type === 'single',\n\t\t\t\t'bx--date-picker--range' : type === 'range',\n\t\t\t\t'bx--date-picker--light' : theme === 'light',\n\t\t\t\t'bx--skeleton' : skeleton\n\t\t\t}\">\n\t\t\t<div class=\"bx--date-picker-container\">\n\t\t\t\t<label [for]=\"id\" class=\"bx--label\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t\t\t</label>\n\t\t\t\t<ibm-icon-calendar16\n\t\t\t\t\t*ngIf=\"type == 'single'\"\n\t\t\t\t\tdata-date-picker-icon\n\t\t\t\t\tclass=\"bx--date-picker__icon\"\n\t\t\t\t\tdata-open>\n\t\t\t\t</ibm-icon-calendar16>\n\t\t\t\t<input\n\t\t\t\t #dateInput\n\t\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tclass=\"bx--date-picker__input\"\n\t\t\t\t\t[pattern]=\"pattern\"\n\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\tdata-date-picker-input\n\t\t\t\t\t[attr.data-input] = \"type == 'single' || type == 'range' ? '' : null\"\n\t\t\t\t\t[id]= \"id\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t[attr.data-invalid]=\"(invalid ? true : null)\"\n\t\t\t\t\t(change) = \"valueChange.emit(dateInput.value)\"/>\n\t\t\t\t\t<div *ngIf=\"invalid\" class=\"bx--form-requirement\">\n\t\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{invalidText}}</ng-container>\n\t\t\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<ibm-icon-calendar16\n\t\t\t\t*ngIf= \"type == 'range' && hasIcon\"\n\t\t\t\tdata-date-picker-icon\n\t\t\t\tclass=\"bx--date-picker__icon\"\n\t\t\t\tdata-open>\n\t\t\t</ibm-icon-calendar16>\n\t\t</div>\n\t</div>\n\t"
3186
3229
  })
3187
3230
  ], DatePickerInput);
3188
3231
  return DatePickerInput;
@@ -3382,7 +3425,7 @@ var DatePicker = /** @class */ (function () {
3382
3425
  var ng2FlatPickrElement = this.elementRef.nativeElement.querySelector(".ng2-flatpickr-input-container");
3383
3426
  ng2FlatPickrElement._flatpickr.destroy();
3384
3427
  };
3385
- var DatePicker_1, _a, _b, _c, _d;
3428
+ var DatePicker_1, _a, _b, _c, _d, _e;
3386
3429
  DatePicker.datePickerCount = 0;
3387
3430
  __decorate([
3388
3431
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
@@ -3394,7 +3437,7 @@ var DatePicker = /** @class */ (function () {
3394
3437
  ], DatePicker.prototype, "dateFormat", void 0);
3395
3438
  __decorate([
3396
3439
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
3397
- __metadata("design:type", String)
3440
+ __metadata("design:type", Object)
3398
3441
  ], DatePicker.prototype, "label", void 0);
3399
3442
  __decorate([
3400
3443
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
@@ -3414,7 +3457,7 @@ var DatePicker = /** @class */ (function () {
3414
3457
  ], DatePicker.prototype, "id", void 0);
3415
3458
  __decorate([
3416
3459
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
3417
- __metadata("design:type", typeof (_a = typeof Array !== "undefined" && Array) === "function" && _a || Object)
3460
+ __metadata("design:type", typeof (_b = typeof Array !== "undefined" && Array) === "function" && _b || Object)
3418
3461
  ], DatePicker.prototype, "value", void 0);
3419
3462
  __decorate([
3420
3463
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
@@ -3438,7 +3481,7 @@ var DatePicker = /** @class */ (function () {
3438
3481
  ], DatePicker.prototype, "skeleton", void 0);
3439
3482
  __decorate([
3440
3483
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
3441
- __metadata("design:type", typeof (_c = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _c || Object)
3484
+ __metadata("design:type", typeof (_d = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _d || Object)
3442
3485
  ], DatePicker.prototype, "valueChange", void 0);
3443
3486
  DatePicker = DatePicker_1 = __decorate([
3444
3487
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
@@ -3449,7 +3492,7 @@ var DatePicker = /** @class */ (function () {
3449
3492
  ],
3450
3493
  encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
3451
3494
  }),
3452
- __metadata("design:paramtypes", [typeof (_d = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _d || Object])
3495
+ __metadata("design:paramtypes", [typeof (_e = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _e || Object])
3453
3496
  ], DatePicker);
3454
3497
  return DatePicker;
3455
3498
  }());
@@ -5681,7 +5724,7 @@ __webpack_require__.r(__webpack_exports__);
5681
5724
  /* harmony import */ var _carbon_icons_angular_lib_information_filled_16__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @carbon/icons-angular/lib/information--filled/16 */ "./node_modules/@carbon/icons-angular/lib/information--filled/16.js");
5682
5725
  /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ */ "./src/index.ts");
5683
5726
  var withStorySource = __webpack_require__(/*! @storybook/addon-storysource */ "./node_modules/@storybook/addon-storysource/dist/index.js").withStorySource;
5684
- var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, text, select } from '@storybook/addon-knobs/angular';\n\nimport { InformationFilled16Module } from '@carbon/icons-angular/lib/information--filled/16';\nimport { DialogModule, PlaceholderModule, DocumentationModule } from '../../';\n\nstoriesOf('Tooltip', module)\n .addDecorator(\n moduleMetadata({\n imports: [DialogModule, PlaceholderModule, InformationFilled16Module, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t\t<div>\n\t\t\t\t<ng-template #template let-tooltip=\"tooltip\">\n\t\t\t\t\t<p>This is some tooltip text. This box shows the maximum amount of text that should appear inside.\n\t\t\t\t\t\tIf more room is needed please use a modal instead.</p>\n\t\t\t\t\t<div class=\"bx--tooltip__footer\">\n\t\t\t\t\t\t<a href=\"/\" class=\"bx--link\">Learn More</a>\n\t\t\t\t\t\t<button class=\"bx--btn bx--btn--primary\" (click)=\"tooltip.doClose()\">Close</button>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-template>\n\n\t\t\t\t<div class=\"bx--tooltip__label\">\n\t\t\t\t\t{{triggerText}}\n\t\t\t\t\t<span\n\t\t\t\t\t\t[ibmTooltip]=\"template\"\n\t\t\t\t\t\ttrigger=\"click\"\n\t\t\t\t\t\t[placement]=\"placement\">\n\t\t\t\t\t\t<div role=\"button\">\n\t\t\t\t\t\t\t<ibm-icon-information-filled16></ibm-icon-information-filled16>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t<ibm-placeholder></ibm-placeholder>\n\t\t\t</div>\n\t\t`,\n props: {\n placement: select('Tooltip direction', ['bottom', 'top', 'left', 'right'], 'bottom'),\n triggerText: text('Trigger text', 'Tooltip label'),\n },\n }))\n .add('No icon', () => ({\n template: `\n\t\t\t\t<div>\n\t\t\t\t\t<ng-template #template let-tooltip=\"tooltip\">\n\t\t\t\t\t\t<p>This is some tooltip text. This box shows the maximum amount of text that should appear inside.\n\t\t\t\t\t\t\tIf more room is needed please use a modal instead.</p>\n\t\t\t\t\t\t<div class=\"bx--tooltip__footer\">\n\t\t\t\t\t\t\t<a href=\"/\" class=\"bx--link\">Learn More</a>\n\t\t\t\t\t\t\t<button class=\"bx--btn bx--btn--primary\" (click)=\"tooltip.doClose()\">Close</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</ng-template>\n\n\t\t\t\t\t<span\n\t\t\t\t\t\t[ibmTooltip]=\"template\"\n\t\t\t\t\t\ttrigger=\"click\"\n\t\t\t\t\t\t[placement]=\"placement\">\n\t\t\t\t\t\t{{triggerText}}\n\t\t\t\t\t</span>\n\t\t\t\t\t<ibm-placeholder></ibm-placeholder>\n\t\t\t\t</div>\n\t\t\t`,\n props: {\n placement: select('Tooltip direction', ['bottom', 'top', 'left', 'right'], 'bottom'),\n triggerText: text('Trigger text', 'Tooltip label'),\n },\n }))\n .add('Only icon', () => ({\n template: `\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<ng-template #template let-tooltip=\"tooltip\">\n\t\t\t\t\t\t\t<p>This is some tooltip text. This box shows the maximum amount of text that should appear inside.\n\t\t\t\t\t\t\t\tIf more room is needed please use a modal instead.</p>\n\t\t\t\t\t\t\t<div class=\"bx--tooltip__footer\">\n\t\t\t\t\t\t\t\t<a href=\"/\" class=\"bx--link\">Learn More</a>\n\t\t\t\t\t\t\t\t<button class=\"bx--btn bx--btn--primary\" (click)=\"tooltip.doClose()\">Close</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</ng-template>\n\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t[ibmTooltip]=\"template\"\n\t\t\t\t\t\t\ttrigger=\"click\"\n\t\t\t\t\t\t\t[placement]=\"placement\">\n\t\t\t\t\t\t\t<div role=\"button\" class=\"bx--tooltip__trigger\">\n\t\t\t\t\t\t\t\t<svg focusable=\"false\" aria-label=\"tooltip\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" role=\"img\" style=\"will-change: transform;\">\n\t\t\t\t\t\t\t\t\t<circle cx=\"8\" cy=\"3\" r=\"1\"></circle><circle cx=\"8\" cy=\"8\" r=\"1\"></circle><circle cx=\"8\" cy=\"13\" r=\"1\"></circle>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<ibm-placeholder></ibm-placeholder>\n\t\t\t\t\t</div>\n\t\t\t\t`,\n props: {\n placement: select('Tooltip direction', ['bottom', 'top', 'left', 'right'], 'bottom'),\n },\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/directives/Tooltip.html\"></ibm-documentation>\n\t\t`,\n }));\n";
5727
+ var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, text, select } from '@storybook/addon-knobs/angular';\n\nimport { InformationFilled16Module } from '@carbon/icons-angular/lib/information--filled/16';\nimport { DialogModule, PlaceholderModule, DocumentationModule } from '../../';\n\nstoriesOf('Tooltip', module)\n .addDecorator(\n moduleMetadata({\n imports: [DialogModule, PlaceholderModule, InformationFilled16Module, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t\t<div>\n\t\t\t\t<ng-template #template let-tooltip=\"tooltip\">\n\t\t\t\t\t<p>This is some tooltip text. This box shows the maximum amount of text that should appear inside.\n\t\t\t\t\t\tIf more room is needed please use a modal instead.</p>\n\t\t\t\t\t<div class=\"bx--tooltip__footer\">\n\t\t\t\t\t\t<a href=\"/\" class=\"bx--link\">Learn More</a>\n\t\t\t\t\t\t<button class=\"bx--btn bx--btn--primary\" (click)=\"tooltip.doClose()\">Close</button>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-template>\n\n\t\t\t\t<div class=\"bx--tooltip__label\">\n\t\t\t\t\t{{triggerText}}\n\t\t\t\t\t<span\n\t\t\t\t\t\t[ibmTooltip]=\"template\"\n\t\t\t\t\t\ttrigger=\"click\"\n\t\t\t\t\t\t[placement]=\"placement\">\n\t\t\t\t\t\t<div role=\"button\">\n\t\t\t\t\t\t\t<ibm-icon-information-filled16></ibm-icon-information-filled16>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t<ibm-placeholder></ibm-placeholder>\n\t\t\t</div>\n\t\t`,\n props: {\n placement: select('Tooltip direction', ['bottom', 'top', 'left', 'right'], 'bottom'),\n triggerText: text('Trigger text', 'Tooltip label'),\n },\n }))\n .add('No icon', () => ({\n template: `\n\t\t\t\t<div>\n\t\t\t\t\t<ng-template #template let-tooltip=\"tooltip\">\n\t\t\t\t\t\t<p>This is some tooltip text. This box shows the maximum amount of text that should appear inside.\n\t\t\t\t\t\t\tIf more room is needed please use a modal instead.</p>\n\t\t\t\t\t\t<div class=\"bx--tooltip__footer\">\n\t\t\t\t\t\t\t<a href=\"/\" class=\"bx--link\">Learn More</a>\n\t\t\t\t\t\t\t<button class=\"bx--btn bx--btn--primary\" (click)=\"tooltip.doClose()\">Close</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</ng-template>\n\n\t\t\t\t\t<span\n\t\t\t\t\t\t[ibmTooltip]=\"template\"\n\t\t\t\t\t\ttrigger=\"click\"\n\t\t\t\t\t\t[placement]=\"placement\">\n\t\t\t\t\t\t{{triggerText}}\n\t\t\t\t\t</span>\n\t\t\t\t\t<ibm-placeholder></ibm-placeholder>\n\t\t\t\t</div>\n\t\t\t`,\n props: {\n placement: select('Tooltip direction', ['bottom', 'top', 'left', 'right'], 'bottom'),\n triggerText: text('Trigger text', 'Tooltip label'),\n },\n }))\n .add('Only icon', () => ({\n template: `\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<ng-template #template let-tooltip=\"tooltip\">\n\t\t\t\t\t\t\t<p>This is some tooltip text. This box shows the maximum amount of text that should appear inside.\n\t\t\t\t\t\t\t\tIf more room is needed please use a modal instead.</p>\n\t\t\t\t\t\t\t<div class=\"bx--tooltip__footer\">\n\t\t\t\t\t\t\t\t<a href=\"/\" class=\"bx--link\">Learn More</a>\n\t\t\t\t\t\t\t\t<button class=\"bx--btn bx--btn--primary\" (click)=\"tooltip.doClose()\">Close</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</ng-template>\n\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t[ibmTooltip]=\"template\"\n\t\t\t\t\t\t\ttrigger=\"click\"\n\t\t\t\t\t\t\t[placement]=\"placement\">\n\t\t\t\t\t\t\t<div role=\"button\" class=\"bx--tooltip__trigger\">\n\t\t\t\t\t\t\t\t<svg focusable=\"false\" aria-label=\"tooltip\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" role=\"img\" style=\"will-change: transform;\">\n\t\t\t\t\t\t\t\t\t<circle cx=\"8\" cy=\"3\" r=\"1\"></circle><circle cx=\"8\" cy=\"8\" r=\"1\"></circle><circle cx=\"8\" cy=\"13\" r=\"1\"></circle>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<ibm-placeholder></ibm-placeholder>\n\t\t\t\t\t</div>\n\t\t\t\t`,\n props: {\n placement: select('Tooltip direction', ['bottom', 'top', 'left', 'right'], 'bottom'),\n },\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/directives/TooltipDirective.html\"></ibm-documentation>\n\t\t`,\n }));\n";
5685
5728
  var __ADDS_MAP__ = { "tooltip--documentation": { "startLoc": { "col": 7, "line": 101 }, "endLoc": { "col": 4, "line": 105 } }, "tooltip--only-icon": { "startLoc": { "col": 7, "line": 72 }, "endLoc": { "col": 4, "line": 100 } }, "tooltip--no-icon": { "startLoc": { "col": 7, "line": 46 }, "endLoc": { "col": 4, "line": 71 } }, "tooltip--basic": { "startLoc": { "col": 7, "line": 15 }, "endLoc": { "col": 4, "line": 45 } } };
5686
5729
 
5687
5730
 
@@ -5718,7 +5761,7 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Tooltip",
5718
5761
  }
5719
5762
  }); })
5720
5763
  .add("Documentation", function () { return ({
5721
- template: "\n\t\t\t<ibm-documentation src=\"documentation/directives/Tooltip.html\"></ibm-documentation>\n\t\t"
5764
+ template: "\n\t\t\t<ibm-documentation src=\"documentation/directives/TooltipDirective.html\"></ibm-documentation>\n\t\t"
5722
5765
  }); });
5723
5766
 
5724
5767
  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/webpack/buildin/harmony-module.js */ "./node_modules/webpack/buildin/harmony-module.js")(module)))
@@ -6024,6 +6067,7 @@ var Dropdown = /** @class */ (function () {
6024
6067
  this.elementRef = elementRef;
6025
6068
  this.i18n = i18n;
6026
6069
  this.dropdownService = dropdownService;
6070
+ this.id = "dropdown-" + Dropdown_1.dropdownCount++;
6027
6071
  /**
6028
6072
  * Value displayed if no item is selected.
6029
6073
  */
@@ -6087,6 +6131,7 @@ var Dropdown = /** @class */ (function () {
6087
6131
  * Emits event notifying to other classes that the `Dropdown` has been closed (collapsed).
6088
6132
  */
6089
6133
  this.close = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
6134
+ this.hostClass = true;
6090
6135
  /**
6091
6136
  * Set to `true` if the dropdown is closed (not expanded).
6092
6137
  */
@@ -6487,7 +6532,23 @@ var Dropdown = /** @class */ (function () {
6487
6532
  }
6488
6533
  return false;
6489
6534
  };
6490
- var Dropdown_1, _a, _b, _c, _d, _e, _f, _g, _h, _j;
6535
+ Dropdown.prototype.isTemplate = function (value) {
6536
+ return value instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"];
6537
+ };
6538
+ var Dropdown_1, _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
6539
+ Dropdown.dropdownCount = 0;
6540
+ __decorate([
6541
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
6542
+ __metadata("design:type", Object)
6543
+ ], Dropdown.prototype, "id", void 0);
6544
+ __decorate([
6545
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
6546
+ __metadata("design:type", Object)
6547
+ ], Dropdown.prototype, "label", void 0);
6548
+ __decorate([
6549
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
6550
+ __metadata("design:type", Object)
6551
+ ], Dropdown.prototype, "helperText", void 0);
6491
6552
  __decorate([
6492
6553
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
6493
6554
  __metadata("design:type", Object)
@@ -6551,19 +6612,19 @@ var Dropdown = /** @class */ (function () {
6551
6612
  ], Dropdown.prototype, "selectedLabel", void 0);
6552
6613
  __decorate([
6553
6614
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
6554
- __metadata("design:type", typeof (_b = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _b || Object)
6615
+ __metadata("design:type", typeof (_d = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _d || Object)
6555
6616
  ], Dropdown.prototype, "selected", void 0);
6556
6617
  __decorate([
6557
6618
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
6558
- __metadata("design:type", typeof (_c = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _c || Object)
6619
+ __metadata("design:type", typeof (_e = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _e || Object)
6559
6620
  ], Dropdown.prototype, "onClose", void 0);
6560
6621
  __decorate([
6561
6622
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
6562
- __metadata("design:type", typeof (_d = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _d || Object)
6623
+ __metadata("design:type", typeof (_f = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _f || Object)
6563
6624
  ], Dropdown.prototype, "close", void 0);
6564
6625
  __decorate([
6565
6626
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChild"])(_abstract_dropdown_view_class__WEBPACK_IMPORTED_MODULE_3__["AbstractDropdownView"]),
6566
- __metadata("design:type", typeof (_e = typeof _abstract_dropdown_view_class__WEBPACK_IMPORTED_MODULE_3__["AbstractDropdownView"] !== "undefined" && _abstract_dropdown_view_class__WEBPACK_IMPORTED_MODULE_3__["AbstractDropdownView"]) === "function" && _e || Object)
6627
+ __metadata("design:type", typeof (_g = typeof _abstract_dropdown_view_class__WEBPACK_IMPORTED_MODULE_3__["AbstractDropdownView"] !== "undefined" && _abstract_dropdown_view_class__WEBPACK_IMPORTED_MODULE_3__["AbstractDropdownView"]) === "function" && _g || Object)
6567
6628
  ], Dropdown.prototype, "view", void 0);
6568
6629
  __decorate([
6569
6630
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])("dropdownButton"),
@@ -6573,18 +6634,22 @@ var Dropdown = /** @class */ (function () {
6573
6634
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])("dropdownMenu"),
6574
6635
  __metadata("design:type", Object)
6575
6636
  ], Dropdown.prototype, "dropdownMenu", void 0);
6637
+ __decorate([
6638
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])("class.bx--dropdown__wrapper"),
6639
+ __metadata("design:type", Object)
6640
+ ], Dropdown.prototype, "hostClass", void 0);
6576
6641
  __decorate([
6577
6642
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])("keydown", ["$event"])
6578
6643
  // "Esc", "Spacebar", "Down", and "Up" are IE specific values
6579
6644
  ,
6580
6645
  __metadata("design:type", Function),
6581
- __metadata("design:paramtypes", [typeof (_f = typeof KeyboardEvent !== "undefined" && KeyboardEvent) === "function" && _f || Object]),
6646
+ __metadata("design:paramtypes", [typeof (_h = typeof KeyboardEvent !== "undefined" && KeyboardEvent) === "function" && _h || Object]),
6582
6647
  __metadata("design:returntype", void 0)
6583
6648
  ], Dropdown.prototype, "onKeyDown", null);
6584
6649
  Dropdown = Dropdown_1 = __decorate([
6585
6650
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
6586
6651
  selector: "ibm-dropdown",
6587
- template: "\n\t<div\n\t\tclass=\"bx--dropdown bx--list-box\"\n\t\t[ngClass]=\"{\n\t\t\t'bx--dropdown--light': theme === 'light',\n\t\t\t'bx--list-box--inline': inline,\n\t\t\t'bx--skeleton': skeleton,\n\t\t\t'bx--dropdown--disabled bx--list-box--disabled': disabled\n\t\t}\">\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\t#dropdownButton\n\t\t\tclass=\"bx--list-box__field\"\n\t\t\t[ngClass]=\"{'a': !menuIsClosed}\"\n\t\t\t[attr.aria-expanded]=\"!menuIsClosed\"\n\t\t\t[attr.aria-disabled]=\"disabled\"\n\t\t\t(click)=\"toggleMenu()\"\n\t\t\t(blur)=\"onBlur()\"\n\t\t\t[disabled]=\"disabled\">\n\t\t\t<div\n\t\t\t\t(click)=\"clearSelected()\"\n\t\t\t\t*ngIf=\"type === 'multi' && getSelectedCount() > 0\"\n\t\t\t\tclass=\"bx--list-box__selection--multi\"\n\t\t\t\ttitle=\"Clear all selected items\">\n\t\t\t\t{{getSelectedCount()}}\n\t\t\t\t<svg\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\trole=\"img\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<span *ngIf=\"isRenderString()\" class=\"bx--list-box__label\">{{getDisplayStringValue() | async}}</span>\n\t\t\t<ng-template\n\t\t\t\t*ngIf=\"!isRenderString()\"\n\t\t\t\t[ngTemplateOutletContext]=\"getRenderTemplateContext()\"\n\t\t\t\t[ngTemplateOutlet]=\"displayValue\">\n\t\t\t</ng-template>\n\t\t\t<ibm-icon-chevron-down16\n\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\tclass=\"bx--list-box__menu-icon\"\n\t\t\t\t[attr.aria-label]=\"menuButtonLabel\"\n\t\t\t\t[ngClass]=\"{'bx--list-box__menu-icon--open': !menuIsClosed }\">\n\t\t\t</ibm-icon-chevron-down16>\n\t\t</button>\n\t\t<div\n\t\t\t#dropdownMenu\n\t\t\t[ngClass]=\"{\n\t\t\t\t'drop-up': dropUp\n\t\t\t}\">\n\t\t\t<ng-content *ngIf=\"!menuIsClosed\"></ng-content>\n\t\t</div>\n\t</div>\n\t",
6652
+ template: "\n\t<label [for]=\"id\" class=\"bx--label\">\n\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t</label>\n\t<div *ngIf=\"helperText\" class=\"bx--form__helper-text\">\n\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t</div>\n\t<div\n\t\t[id]=\"id\"\n\t\tclass=\"bx--dropdown bx--list-box\"\n\t\t[ngClass]=\"{\n\t\t\t'bx--dropdown--light': theme === 'light',\n\t\t\t'bx--list-box--inline': inline,\n\t\t\t'bx--skeleton': skeleton,\n\t\t\t'bx--dropdown--disabled bx--list-box--disabled': disabled\n\t\t}\">\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\t#dropdownButton\n\t\t\tclass=\"bx--list-box__field\"\n\t\t\t[ngClass]=\"{'a': !menuIsClosed}\"\n\t\t\t[attr.aria-expanded]=\"!menuIsClosed\"\n\t\t\t[attr.aria-disabled]=\"disabled\"\n\t\t\t(click)=\"toggleMenu()\"\n\t\t\t(blur)=\"onBlur()\"\n\t\t\t[disabled]=\"disabled\">\n\t\t\t<div\n\t\t\t\t(click)=\"clearSelected()\"\n\t\t\t\t*ngIf=\"type === 'multi' && getSelectedCount() > 0\"\n\t\t\t\tclass=\"bx--list-box__selection--multi\"\n\t\t\t\ttitle=\"Clear all selected items\">\n\t\t\t\t{{getSelectedCount()}}\n\t\t\t\t<svg\n\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\tpreserveAspectRatio=\"xMidYMid meet\"\n\t\t\t\t\tstyle=\"will-change: transform;\"\n\t\t\t\t\trole=\"img\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"16\"\n\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<path d=\"M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z\"></path>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<span *ngIf=\"isRenderString()\" class=\"bx--list-box__label\">{{getDisplayStringValue() | async}}</span>\n\t\t\t<ng-template\n\t\t\t\t*ngIf=\"!isRenderString()\"\n\t\t\t\t[ngTemplateOutletContext]=\"getRenderTemplateContext()\"\n\t\t\t\t[ngTemplateOutlet]=\"displayValue\">\n\t\t\t</ng-template>\n\t\t\t<ibm-icon-chevron-down16\n\t\t\t\t*ngIf=\"!skeleton\"\n\t\t\t\tclass=\"bx--list-box__menu-icon\"\n\t\t\t\t[attr.aria-label]=\"menuButtonLabel\"\n\t\t\t\t[ngClass]=\"{'bx--list-box__menu-icon--open': !menuIsClosed }\">\n\t\t\t</ibm-icon-chevron-down16>\n\t\t</button>\n\t\t<div\n\t\t\t#dropdownMenu\n\t\t\t[ngClass]=\"{\n\t\t\t\t'drop-up': dropUp\n\t\t\t}\">\n\t\t\t<ng-content *ngIf=\"!menuIsClosed\"></ng-content>\n\t\t</div>\n\t</div>\n\t",
6588
6653
  providers: [
6589
6654
  {
6590
6655
  provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
@@ -6593,7 +6658,7 @@ var Dropdown = /** @class */ (function () {
6593
6658
  }
6594
6659
  ]
6595
6660
  }),
6596
- __metadata("design:paramtypes", [typeof (_g = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _g || Object, typeof (_h = typeof _i18n_i18n_module__WEBPACK_IMPORTED_MODULE_4__["I18n"] !== "undefined" && _i18n_i18n_module__WEBPACK_IMPORTED_MODULE_4__["I18n"]) === "function" && _h || Object, typeof (_j = typeof _dropdown_service__WEBPACK_IMPORTED_MODULE_5__["DropdownService"] !== "undefined" && _dropdown_service__WEBPACK_IMPORTED_MODULE_5__["DropdownService"]) === "function" && _j || Object])
6661
+ __metadata("design:paramtypes", [typeof (_j = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _j || Object, typeof (_k = typeof _i18n_i18n_module__WEBPACK_IMPORTED_MODULE_4__["I18n"] !== "undefined" && _i18n_i18n_module__WEBPACK_IMPORTED_MODULE_4__["I18n"]) === "function" && _k || Object, typeof (_l = typeof _dropdown_service__WEBPACK_IMPORTED_MODULE_5__["DropdownService"] !== "undefined" && _dropdown_service__WEBPACK_IMPORTED_MODULE_5__["DropdownService"]) === "function" && _l || Object])
6597
6662
  ], Dropdown);
6598
6663
  return Dropdown;
6599
6664
  }());
@@ -6836,8 +6901,8 @@ __webpack_require__.r(__webpack_exports__);
6836
6901
  /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
6837
6902
  /* harmony import */ var _placeholder_placeholder_module__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../placeholder/placeholder.module */ "./src/placeholder/placeholder.module.ts");
6838
6903
  var withStorySource = __webpack_require__(/*! @storybook/addon-storysource */ "./node_modules/@storybook/addon-storysource/dist/index.js").withStorySource;
6839
- var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, select, boolean, object, text } from '@storybook/addon-knobs/angular';\n\nimport { DropdownModule, DocumentationModule } from '../';\nimport { of } from 'rxjs';\nimport { PlaceholderModule } from '../placeholder/placeholder.module';\n\nstoriesOf('Dropdown', module)\n .addDecorator(\n moduleMetadata({\n imports: [DropdownModule, PlaceholderModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t</div>\n\t\t<ibm-placeholder></ibm-placeholder>\n\t`,\n props: {\n disabled: boolean('disabled', false),\n items: object('items', [{ content: 'one' }, { content: 'two' }, { content: 'three' }, { content: 'four' }]),\n selected: action('Selected fired for dropdown'),\n onClose: action('Dropdown closed'),\n theme: select('theme', ['dark', 'light'], 'dark'),\n },\n }))\n .add('Multi-select', () => ({\n template: `\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\ttype=\"multi\"\n\t\t\t\tplaceholder=\"Multi-select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t</div>\n\t`,\n props: {\n disabled: boolean('disabled', false),\n items: object('items', [{ content: 'one' }, { content: 'two' }, { content: 'three' }, { content: 'four' }]),\n selected: action('Selected fired for multi-select dropdown'),\n onClose: action('Multi-select dropdown closed'),\n },\n }))\n .add('With ngModel', () => ({\n template: `\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[(ngModel)]=\"model\"\n\t\t\t\tvalue=\"content\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t\t<span>{{model | json}}</span>\n\t\t</div>\n\t\t`,\n props: {\n disabled: boolean('disabled', false),\n items: [{ content: 'one' }, { content: 'two' }, { content: 'three' }, { content: 'four' }],\n model: null,\n },\n }))\n .add('With Observable items', () => ({\n template: `\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t</div>\n\t`,\n props: {\n disabled: boolean('disabled', false),\n items: of([{ content: 'one' }, { content: 'two' }, { content: 'three' }, { content: 'four' }]),\n selected: action('Selected fired for dropdown'),\n onClose: action('Dropdown closed'),\n theme: select('theme', ['dark', 'light'], 'dark'),\n },\n }))\n .add('With Template', () => ({\n template: `\n\t\t<div style=\"width: 300px;\">\n\t\t\t<ibm-dropdown\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[displayValue]=\"dropdownRenderer\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\" [listTpl]=\"dropdownRenderer\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t\t<ng-template #dropdownRenderer let-item=\"item\">\n\t\t\t\t<div *ngIf=\"item && item.content\" style=\"font-size: 14px;\">\n\t\t\t\t\t<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\twidth=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\" style=\"will-change: transform;\">\n\t\t\t\t\t\t<path d=\"M9.3 3.7l3.8 3.8H1v1h12.1l-3.8 3.8.7.7 5-5-5-5z\"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t\t&nbsp;{{item.content}}\n\t\t\t\t</div>\n\t\t\t</ng-template>\n\t\t</div>\n\t`,\n props: {\n disabled: boolean('disabled', false),\n items: object('items', [\n { content: 'one', selected: true },\n { content: 'two' },\n { content: 'three' },\n { content: 'four' },\n ]),\n selected: action('Selected fired for dropdown'),\n onClose: action('Dropdown closed'),\n theme: select('theme', ['dark', 'light'], 'dark'),\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown skeleton=\"true\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t\t&nbsp;\n\t\t\t<ibm-dropdown skeleton=\"true\" inline=\"true\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t</div>\n\t\t`,\n props: {\n items: [{ content: 'one' }, { content: 'two' }, { content: 'three' }, { content: 'four' }],\n },\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/Dropdown.html\"></ibm-documentation>\n\t\t`,\n }));\n";
6840
- var __ADDS_MAP__ = { "dropdown--documentation": { "startLoc": { "col": 7, "line": 150 }, "endLoc": { "col": 4, "line": 154 } }, "dropdown--skeleton": { "startLoc": { "col": 7, "line": 134 }, "endLoc": { "col": 4, "line": 149 } }, "dropdown--with-template": { "startLoc": { "col": 7, "line": 98 }, "endLoc": { "col": 4, "line": 133 } }, "dropdown--with-observable-items": { "startLoc": { "col": 7, "line": 77 }, "endLoc": { "col": 4, "line": 97 } }, "dropdown--with-ngmodel": { "startLoc": { "col": 7, "line": 58 }, "endLoc": { "col": 4, "line": 76 } }, "dropdown--multi-select": { "startLoc": { "col": 7, "line": 38 }, "endLoc": { "col": 4, "line": 57 } }, "dropdown--basic": { "startLoc": { "col": 7, "line": 16 }, "endLoc": { "col": 4, "line": 37 } } };
6904
+ var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, select, boolean, object, text } from '@storybook/addon-knobs/angular';\n\nimport { DropdownModule, DocumentationModule } from '../';\nimport { of } from 'rxjs';\nimport { PlaceholderModule } from '../placeholder/placeholder.module';\n\nstoriesOf('Dropdown', module)\n .addDecorator(\n moduleMetadata({\n imports: [DropdownModule, PlaceholderModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t</div>\n\t\t<ibm-placeholder></ibm-placeholder>\n\t`,\n props: {\n disabled: boolean('disabled', false),\n label: text('Label', 'Dropdown label'),\n helperText: text('Helper text', 'Optional helper text.'),\n items: object('items', [{ content: 'one' }, { content: 'two' }, { content: 'three' }, { content: 'four' }]),\n selected: action('Selected fired for dropdown'),\n onClose: action('Dropdown closed'),\n theme: select('theme', ['dark', 'light'], 'dark'),\n },\n }))\n .add('Multi-select', () => ({\n template: `\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\ttype=\"multi\"\n\t\t\t\tplaceholder=\"Multi-select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t</div>\n\t`,\n props: {\n disabled: boolean('disabled', false),\n label: text('Label', 'Dropdown label'),\n helperText: text('Helper text', 'Optional helper text.'),\n items: object('items', [{ content: 'one' }, { content: 'two' }, { content: 'three' }, { content: 'four' }]),\n selected: action('Selected fired for multi-select dropdown'),\n onClose: action('Multi-select dropdown closed'),\n },\n }))\n .add('With ngModel', () => ({\n template: `\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[(ngModel)]=\"model\"\n\t\t\t\tvalue=\"content\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t\t<span>{{model | json}}</span>\n\t\t</div>\n\t\t`,\n props: {\n disabled: boolean('disabled', false),\n label: text('Label', 'Dropdown label'),\n helperText: text('Helper text', 'Optional helper text.'),\n items: [{ content: 'one' }, { content: 'two' }, { content: 'three' }, { content: 'four' }],\n model: null,\n },\n }))\n .add('With Observable items', () => ({\n template: `\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t</div>\n\t`,\n props: {\n disabled: boolean('disabled', false),\n label: text('Label', 'Dropdown label'),\n helperText: text('Helper text', 'Optional helper text.'),\n items: of([{ content: 'one' }, { content: 'two' }, { content: 'three' }, { content: 'four' }]),\n selected: action('Selected fired for dropdown'),\n onClose: action('Dropdown closed'),\n theme: select('theme', ['dark', 'light'], 'dark'),\n },\n }))\n .add('With Template', () => ({\n template: `\n\t\t<div style=\"width: 300px;\">\n\t\t\t<ibm-dropdown\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[displayValue]=\"dropdownRenderer\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\" [listTpl]=\"dropdownRenderer\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t\t<ng-template #dropdownRenderer let-item=\"item\">\n\t\t\t\t<div *ngIf=\"item && item.content\" style=\"font-size: 14px;\">\n\t\t\t\t\t<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\twidth=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\" style=\"will-change: transform;\">\n\t\t\t\t\t\t<path d=\"M9.3 3.7l3.8 3.8H1v1h12.1l-3.8 3.8.7.7 5-5-5-5z\"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t\t&nbsp;{{item.content}}\n\t\t\t\t</div>\n\t\t\t</ng-template>\n\t\t</div>\n\t`,\n props: {\n disabled: boolean('disabled', false),\n items: object('items', [\n { content: 'one', selected: true },\n { content: 'two' },\n { content: 'three' },\n { content: 'four' },\n ]),\n selected: action('Selected fired for dropdown'),\n onClose: action('Dropdown closed'),\n theme: select('theme', ['dark', 'light'], 'dark'),\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown skeleton=\"true\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t\t&nbsp;\n\t\t\t<ibm-dropdown skeleton=\"true\" inline=\"true\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t</div>\n\t\t`,\n props: {\n items: [{ content: 'one' }, { content: 'two' }, { content: 'three' }, { content: 'four' }],\n },\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/Dropdown.html\"></ibm-documentation>\n\t\t`,\n }));\n";
6905
+ var __ADDS_MAP__ = { "dropdown--documentation": { "startLoc": { "col": 7, "line": 166 }, "endLoc": { "col": 4, "line": 170 } }, "dropdown--skeleton": { "startLoc": { "col": 7, "line": 150 }, "endLoc": { "col": 4, "line": 165 } }, "dropdown--with-template": { "startLoc": { "col": 7, "line": 114 }, "endLoc": { "col": 4, "line": 149 } }, "dropdown--with-observable-items": { "startLoc": { "col": 7, "line": 89 }, "endLoc": { "col": 4, "line": 113 } }, "dropdown--with-ngmodel": { "startLoc": { "col": 7, "line": 66 }, "endLoc": { "col": 4, "line": 88 } }, "dropdown--multi-select": { "startLoc": { "col": 7, "line": 42 }, "endLoc": { "col": 4, "line": 65 } }, "dropdown--basic": { "startLoc": { "col": 7, "line": 16 }, "endLoc": { "col": 4, "line": 41 } } };
6841
6906
 
6842
6907
 
6843
6908
 
@@ -6854,9 +6919,11 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Dropdown",
6854
6919
  }))
6855
6920
  .addDecorator(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["withKnobs"])
6856
6921
  .add("Basic", function () { return ({
6857
- template: "\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t</div>\n\t\t<ibm-placeholder></ibm-placeholder>\n\t",
6922
+ template: "\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t</div>\n\t\t<ibm-placeholder></ibm-placeholder>\n\t",
6858
6923
  props: {
6859
6924
  disabled: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["boolean"])("disabled", false),
6925
+ label: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Label", "Dropdown label"),
6926
+ helperText: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Helper text", "Optional helper text."),
6860
6927
  items: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["object"])("items", [
6861
6928
  { content: "one" },
6862
6929
  { content: "two" },
@@ -6869,9 +6936,11 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Dropdown",
6869
6936
  }
6870
6937
  }); })
6871
6938
  .add("Multi-select", function () { return ({
6872
- template: "\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\ttype=\"multi\"\n\t\t\t\tplaceholder=\"Multi-select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t</div>\n\t",
6939
+ template: "\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\ttype=\"multi\"\n\t\t\t\tplaceholder=\"Multi-select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t</div>\n\t",
6873
6940
  props: {
6874
6941
  disabled: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["boolean"])("disabled", false),
6942
+ label: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Label", "Dropdown label"),
6943
+ helperText: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Helper text", "Optional helper text."),
6875
6944
  items: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["object"])("items", [
6876
6945
  { content: "one" },
6877
6946
  { content: "two" },
@@ -6883,9 +6952,11 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Dropdown",
6883
6952
  }
6884
6953
  }); })
6885
6954
  .add("With ngModel", function () { return ({
6886
- template: "\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[(ngModel)]=\"model\"\n\t\t\t\tvalue=\"content\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t\t<span>{{model | json}}</span>\n\t\t</div>\n\t\t",
6955
+ template: "\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[(ngModel)]=\"model\"\n\t\t\t\tvalue=\"content\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t\t<span>{{model | json}}</span>\n\t\t</div>\n\t\t",
6887
6956
  props: {
6888
6957
  disabled: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["boolean"])("disabled", false),
6958
+ label: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Label", "Dropdown label"),
6959
+ helperText: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Helper text", "Optional helper text."),
6889
6960
  items: [
6890
6961
  { content: "one" },
6891
6962
  { content: "two" },
@@ -6896,9 +6967,11 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Dropdown",
6896
6967
  }
6897
6968
  }); })
6898
6969
  .add("With Observable items", function () { return ({
6899
- template: "\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t</div>\n\t",
6970
+ template: "\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-dropdown\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\tplaceholder=\"Select\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(selected)=\"selected($event)\"\n\t\t\t\t(onClose)=\"onClose($event)\">\n\t\t\t\t<ibm-dropdown-list [items]=\"items\"></ibm-dropdown-list>\n\t\t\t</ibm-dropdown>\n\t\t</div>\n\t",
6900
6971
  props: {
6901
6972
  disabled: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["boolean"])("disabled", false),
6973
+ label: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Label", "Dropdown label"),
6974
+ helperText: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Helper text", "Optional helper text."),
6902
6975
  items: Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["of"])([
6903
6976
  { content: "one" },
6904
6977
  { content: "two" },
@@ -8047,7 +8120,7 @@ var FileUploader = /** @class */ (function () {
8047
8120
  FileUploader = FileUploader_1 = __decorate([
8048
8121
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
8049
8122
  selector: "ibm-file-uploader",
8050
- template: "\n\t\t<ng-container *ngIf=\"!skeleton; else skeletonTemplate\">\n\t\t\t<strong class=\"bx--file--label\">{{title}}</strong>\n\t\t\t<p class=\"bx--label-description\">{{description}}</p>\n\t\t\t<div class=\"bx--file\">\n\t\t\t\t<button\n\t\t\t\t\tibmButton=\"primary\"\n\t\t\t\t\t(click)=\"fileInput.click()\"\n\t\t\t\t\t[attr.for]=\"fileUploaderId\">\n\t\t\t\t\t{{buttonText}}\n\t\t\t\t</button>\n\t\t\t\t<input\n\t\t\t\t\t#fileInput\n\t\t\t\t\ttype=\"file\"\n\t\t\t\t\tclass=\"bx--file-input\"\n\t\t\t\t\t[accept]=\"accept\"\n\t\t\t\t\t[id]=\"fileUploaderId\"\n\t\t\t\t\t[multiple]=\"multiple\"\n\t\t\t\t\t(change)=\"onFilesAdded()\"/>\n\t\t\t\t<div class=\"bx--file-container\">\n\t\t\t\t\t<ibm-file *ngFor=\"let fileItem of files\" [fileItem]=\"fileItem\" (remove)=\"removeFile(fileItem)\"></ibm-file>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-container>\n\n\t\t<ng-template #skeletonTemplate>\n\t\t\t<div class=\"bx--skeleton__text\" style=\"width: 100px\"></div>\n\t\t\t<div class=\"bx--skeleton__text\" style=\"width: 225px\"></div>\n\t\t\t<button ibmButton skeleton=\"true\"></button>\n\t\t</ng-template>\n\t",
8123
+ template: "\n\t\t<ng-container *ngIf=\"!skeleton; else skeletonTemplate\">\n\t\t\t<strong class=\"bx--file--label\">{{title}}</strong>\n\t\t\t<p class=\"bx--label-description\">{{description}}</p>\n\t\t\t<div class=\"bx--file\">\n\t\t\t\t<button\n\t\t\t\t\tibmButton=\"primary\"\n\t\t\t\t\t(click)=\"fileInput.click()\"\n\t\t\t\t\t[attr.for]=\"fileUploaderId\">\n\t\t\t\t\t{{buttonText}}\n\t\t\t\t</button>\n\t\t\t\t<input\n\t\t\t\t\t#fileInput\n\t\t\t\t\ttype=\"file\"\n\t\t\t\t\tclass=\"bx--file-input\"\n\t\t\t\t\t[accept]=\"accept\"\n\t\t\t\t\t[id]=\"fileUploaderId\"\n\t\t\t\t\t[multiple]=\"multiple\"\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t(change)=\"onFilesAdded()\"/>\n\t\t\t\t<div class=\"bx--file-container\">\n\t\t\t\t\t<ibm-file *ngFor=\"let fileItem of files\" [fileItem]=\"fileItem\" (remove)=\"removeFile(fileItem)\"></ibm-file>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-container>\n\n\t\t<ng-template #skeletonTemplate>\n\t\t\t<div class=\"bx--skeleton__text\" style=\"width: 100px\"></div>\n\t\t\t<div class=\"bx--skeleton__text\" style=\"width: 225px\"></div>\n\t\t\t<button ibmButton skeleton=\"true\"></button>\n\t\t</ng-template>\n\t",
8051
8124
  providers: [
8052
8125
  {
8053
8126
  provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
@@ -8400,7 +8473,7 @@ var File = /** @class */ (function () {
8400
8473
  File = __decorate([
8401
8474
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
8402
8475
  selector: "ibm-file",
8403
- template: "\n\t\t<p class=\"bx--file-filename\">{{fileItem.file.name}}</p>\n\t\t<span\n\t\t\t*ngIf=\"fileItem.state === 'edit'\"\n\t\t\tclass=\"bx--file__state-container\"\n\t\t\t(click)=\"remove.emit()\"\n\t\t\ttabindex=\"0\">\n\t\t\t<ibm-icon-close16\n\t\t\t\tclass=\"bx--file-close\"\n\t\t\t\t[ariaLabel]=\"translations.REMOVE_BUTTON\">\n\t\t\t</ibm-icon-close16>\n\t\t</span>\n\t\t<span *ngIf=\"fileItem.state === 'upload'\">\n\t\t\t<ibm-loading size=\"sm\"></ibm-loading>\n\t\t</span>\n\t\t<span\n\t\t\t*ngIf=\"fileItem.state === 'complete'\"\n\t\t\tclass=\"bx--file__state-container\"\n\t\t\ttabindex=\"0\">\n\t\t\t<ibm-icon-checkmark-filled16\n\t\t\t\tclass=\"bx--file-complete\"\n\t\t\t\t[ariaLabel]=\"translations.CHECKMARK\">\n\t\t\t</ibm-icon-checkmark-filled16>\n\t\t</span>\n\t"
8476
+ template: "\n\t\t<p class=\"bx--file-filename\">{{fileItem.file.name}}</p>\n\t\t<span\n\t\t\t*ngIf=\"fileItem.state === 'edit'\"\n\t\t\tclass=\"bx--file__state-container\"\n\t\t\t(click)=\"remove.emit()\"\n\t\t\t(keyup.enter)=\"remove.emit()\"\n\t\t\t(keyup.space)=\"remove.emit()\"\n\t\t\ttabindex=\"0\">\n\t\t\t<ibm-icon-close16\n\t\t\t\tclass=\"bx--file-close\"\n\t\t\t\t[ariaLabel]=\"translations.REMOVE_BUTTON\">\n\t\t\t</ibm-icon-close16>\n\t\t</span>\n\t\t<span *ngIf=\"fileItem.state === 'upload'\">\n\t\t\t<ibm-loading size=\"sm\"></ibm-loading>\n\t\t</span>\n\t\t<span\n\t\t\t*ngIf=\"fileItem.state === 'complete'\"\n\t\t\tclass=\"bx--file__state-container\"\n\t\t\ttabindex=\"0\">\n\t\t\t<ibm-icon-checkmark-filled16\n\t\t\t\tclass=\"bx--file-complete\"\n\t\t\t\t[ariaLabel]=\"translations.CHECKMARK\">\n\t\t\t</ibm-icon-checkmark-filled16>\n\t\t</span>\n\t"
8404
8477
  }),
8405
8478
  __metadata("design:paramtypes", [typeof (_b = typeof _i18n_i18n_module__WEBPACK_IMPORTED_MODULE_1__["I18n"] !== "undefined" && _i18n_i18n_module__WEBPACK_IMPORTED_MODULE_1__["I18n"]) === "function" && _b || Object])
8406
8479
  ], File);
@@ -12867,7 +12940,7 @@ var Number = /** @class */ (function () {
12867
12940
  Number.prototype.isTemplate = function (value) {
12868
12941
  return value instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"];
12869
12942
  };
12870
- var Number_1, _a;
12943
+ var Number_1, _a, _b, _c;
12871
12944
  /**
12872
12945
  * Variable used for creating unique ids for number input components.
12873
12946
  */
@@ -12931,7 +13004,7 @@ var Number = /** @class */ (function () {
12931
13004
  Number = Number_1 = __decorate([
12932
13005
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
12933
13006
  selector: "ibm-number",
12934
- template: "\n\t\t<label *ngIf=\"skeleton && label\" class=\"bx--label bx--skeleton\"></label>\n\t\t<label *ngIf=\"!skeleton && label\" [for]=\"id\" class=\"bx--label\">{{label}}</label>\n\t\t<div *ngIf=\"helperText\" class=\"bx--form__helper-text\">{{helperText}}</div>\n\t\t<div\n\t\t\tdata-numberinput\n\t\t\t[attr.data-invalid]=\"(invalid ? true : null)\"\n\t\t\tclass=\"bx--number\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'bx--number--light': theme === 'light',\n\t\t\t\t'bx--number--nolabel': !label,\n\t\t\t\t'bx--number--helpertext': helperText,\n\t\t\t\t'bx--skeleton' : skeleton\n\t\t\t}\">\n\t\t\t<label *ngIf=\"!skeleton && label\" [for]=\"id\" class=\"bx--label\">{{label}}</label>\n\t\t\t<div *ngIf=\"helperText\" class=\"bx--form__helper-text\">{{helperText}}</div>\n\t\t\t<div class=\"bx--number__input-wrapper\">\n\t\t\t\t<input\n\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t[id]=\"id\"\n\t\t\t\t\t[value]=\"value\"\n\t\t\t\t\t[min]=\"min\"\n\t\t\t\t\t[max]=\"max\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t[required]=\"required\"\n\t\t\t\t\t(input)=\"onNumberInputChange($event)\"/>\n\t\t\t\t<ibm-icon-warning-filled16\n\t\t\t\t\t*ngIf=\"!skeleton && invalid\"\n\t\t\t\t\tclass=\"bx--number__invalid\"\n\t\t\t\t\tstyle=\"display: inherit;\">\n\t\t\t\t</ibm-icon-warning-filled16>\n\t\t\t\t<div *ngIf=\"!skeleton\" class=\"bx--number__controls\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"bx--number__control-btn up-icon\"\n\t\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t\t\taria-atomic=\"true\"\n\t\t\t\t\t\t(click)=\"onIncrement()\">\n\t\t\t\t\t\t<ibm-icon-caret-up16></ibm-icon-caret-up16>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"bx--number__control-btn down-icon\"\n\t\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t\t\taria-atomic=\"true\"\n\t\t\t\t\t\t(click)=\"onDecrement()\">\n\t\t\t\t\t\t<ibm-icon-caret-down16></ibm-icon-caret-down16>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"invalid\" class=\"bx--form-requirement\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{invalidText}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t</div>\n\t\t</div>\n\t",
13007
+ template: "\n\t\t<label *ngIf=\"skeleton && label\" class=\"bx--label bx--skeleton\"></label>\n\t\t<label *ngIf=\"!skeleton && label\" [for]=\"id\" class=\"bx--label\">\n\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t</label>\n\t\t<div *ngIf=\"helperText\" class=\"bx--form__helper-text\">\n\t\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t\t</div>\n\t\t<div\n\t\t\tdata-numberinput\n\t\t\t[attr.data-invalid]=\"(invalid ? true : null)\"\n\t\t\tclass=\"bx--number\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'bx--number--light': theme === 'light',\n\t\t\t\t'bx--number--nolabel': !label,\n\t\t\t\t'bx--number--helpertext': helperText,\n\t\t\t\t'bx--skeleton' : skeleton\n\t\t\t}\">\n\t\t\t<div class=\"bx--number__input-wrapper\">\n\t\t\t\t<input\n\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t[id]=\"id\"\n\t\t\t\t\t[value]=\"value\"\n\t\t\t\t\t[min]=\"min\"\n\t\t\t\t\t[max]=\"max\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t[required]=\"required\"\n\t\t\t\t\t(input)=\"onNumberInputChange($event)\"/>\n\t\t\t\t<ibm-icon-warning-filled16\n\t\t\t\t\t*ngIf=\"!skeleton && invalid\"\n\t\t\t\t\tclass=\"bx--number__invalid\"\n\t\t\t\t\tstyle=\"display: inherit;\">\n\t\t\t\t</ibm-icon-warning-filled16>\n\t\t\t\t<div *ngIf=\"!skeleton\" class=\"bx--number__controls\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"bx--number__control-btn up-icon\"\n\t\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t\t\taria-atomic=\"true\"\n\t\t\t\t\t\t(click)=\"onIncrement()\">\n\t\t\t\t\t\t<ibm-icon-caret-up16></ibm-icon-caret-up16>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"bx--number__control-btn down-icon\"\n\t\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t\t\taria-atomic=\"true\"\n\t\t\t\t\t\t(click)=\"onDecrement()\">\n\t\t\t\t\t\t<ibm-icon-caret-down16></ibm-icon-caret-down16>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"invalid\" class=\"bx--form-requirement\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{invalidText}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t</div>\n\t\t</div>\n\t",
12935
13008
  providers: [
12936
13009
  {
12937
13010
  provide: _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NG_VALUE_ACCESSOR"],
@@ -13029,7 +13102,7 @@ __webpack_require__.r(__webpack_exports__);
13029
13102
  /* harmony import */ var _storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__);
13030
13103
  /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ */ "./src/index.ts");
13031
13104
  var withStorySource = __webpack_require__(/*! @storybook/addon-storysource */ "./node_modules/@storybook/addon-storysource/dist/index.js").withStorySource;
13032
- var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { withKnobs, boolean, number, select, text } from '@storybook/addon-knobs/angular';\n\nimport { NumberModule, DocumentationModule } from '../';\n\nstoriesOf('Number', module)\n .addDecorator(\n moduleMetadata({\n imports: [NumberModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t\t<ibm-number\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"[helperText]\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[min]=\"min\"\n\t\t\t\t[max]=\"max\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[disabled]=\"disabled\">\n\t\t\t</ibm-number>\n\t\t`,\n props: {\n label: text('label', 'Number Input Label'),\n helperText: text('helper text', 'Optional helper text here'),\n invalidText: text('Form validation content', 'Invalid number'),\n theme: select('theme', ['dark', 'light'], 'dark'),\n min: number('min', 0),\n max: number('max', 100),\n invalid: boolean('Show form validation', false),\n disabled: boolean('disabled', false),\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t\t<ibm-number [label]=\"label\" skeleton=\"true\"></ibm-number>\n\t\t`,\n props: {\n label: text('label', 'Number Input Label'),\n },\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/Number.html\"></ibm-documentation>\n\t\t`,\n }));\n";
13105
+ var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { withKnobs, boolean, number, select, text } from '@storybook/addon-knobs/angular';\n\nimport { NumberModule, DocumentationModule } from '../';\n\nstoriesOf('Number', module)\n .addDecorator(\n moduleMetadata({\n imports: [NumberModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t\t<ibm-number\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"[helperText]\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[min]=\"min\"\n\t\t\t\t[max]=\"max\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[disabled]=\"disabled\">\n\t\t\t</ibm-number>\n\t\t`,\n props: {\n label: text('label', 'Number Input Label'),\n helperText: text('helper text', 'Optional helper text.'),\n invalidText: text('Form validation content', 'Invalid number'),\n theme: select('theme', ['dark', 'light'], 'dark'),\n min: number('min', 0),\n max: number('max', 100),\n invalid: boolean('Show form validation', false),\n disabled: boolean('disabled', false),\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t\t<ibm-number [label]=\"label\" skeleton=\"true\"></ibm-number>\n\t\t`,\n props: {\n label: text('label', 'Number Input Label'),\n },\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/Number.html\"></ibm-documentation>\n\t\t`,\n }));\n";
13033
13106
  var __ADDS_MAP__ = { "number--documentation": { "startLoc": { "col": 7, "line": 45 }, "endLoc": { "col": 4, "line": 49 } }, "number--skeleton": { "startLoc": { "col": 7, "line": 37 }, "endLoc": { "col": 4, "line": 44 } }, "number--basic": { "startLoc": { "col": 7, "line": 13 }, "endLoc": { "col": 4, "line": 36 } } };
13034
13107
 
13035
13108
 
@@ -13042,7 +13115,7 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Number", m
13042
13115
  template: "\n\t\t\t<ibm-number\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"[helperText]\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[min]=\"min\"\n\t\t\t\t[max]=\"max\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[disabled]=\"disabled\">\n\t\t\t</ibm-number>\n\t\t",
13043
13116
  props: {
13044
13117
  label: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["text"])("label", "Number Input Label"),
13045
- helperText: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["text"])("helper text", "Optional helper text here"),
13118
+ helperText: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["text"])("helper text", "Optional helper text."),
13046
13119
  invalidText: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["text"])("Form validation content", "Invalid number"),
13047
13120
  theme: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["select"])("theme", ["dark", "light"], "dark"),
13048
13121
  min: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["number"])("min", 0),
@@ -14698,8 +14771,8 @@ __webpack_require__.r(__webpack_exports__);
14698
14771
  /* harmony import */ var _storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__);
14699
14772
  /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ */ "./src/index.ts");
14700
14773
  var withStorySource = __webpack_require__(/*! @storybook/addon-storysource */ "./node_modules/@storybook/addon-storysource/dist/index.js").withStorySource;
14701
- var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, boolean } from '@storybook/addon-knobs/angular';\n\nimport { RadioModule, DocumentationModule } from '../';\n\nstoriesOf('Radio', module)\n .addDecorator(\n moduleMetadata({\n imports: [RadioModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t<ibm-radio-group aria-label=\"radiogroup\" [(ngModel)]=\"radio\" (change)=\"onChange($event)\">\n\t\t\t<ibm-radio\n\t\t\t\tvalue=\"radio\"\n\t\t\t\t[checked]=\"true\">\n\t\t\t\tzero\n\t\t\t</ibm-radio>\n\t\t\t<ibm-radio *ngFor=\"let radio of manyRadios\"\n\t\t\t\t[value]=\"radio.num\"\n\t\t\t\t[disabled]=\"radio.disabled\">\n\t\t\t\t{{radio.num}}\n\t\t\t</ibm-radio>\n\t\t</ibm-radio-group>\n\t\t`,\n props: {\n onChange: action('Radio change'),\n manyRadios: [{ num: 'one' }, { num: 'two' }, { num: 'three' }, { num: 'four', disabled: true }],\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t<ibm-radio-group skeleton=\"true\">\n\t\t\t<ibm-radio></ibm-radio>\n\t\t</ibm-radio-group>\n\t\t`,\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/RadioGroup.html\"></ibm-documentation>\n\t\t`,\n }));\n";
14702
- var __ADDS_MAP__ = { "radio--documentation": { "startLoc": { "col": 7, "line": 41 }, "endLoc": { "col": 4, "line": 45 } }, "radio--skeleton": { "startLoc": { "col": 7, "line": 34 }, "endLoc": { "col": 4, "line": 40 } }, "radio--basic": { "startLoc": { "col": 7, "line": 14 }, "endLoc": { "col": 4, "line": 33 } } };
14774
+ var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, text } from '@storybook/addon-knobs/angular';\n\nimport { RadioModule, DocumentationModule } from '../';\n\nstoriesOf('Radio', module)\n .addDecorator(\n moduleMetadata({\n imports: [RadioModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t<fieldset class=\"bx--fieldset\">\n\t\t\t<legend class=\"bx--label\">{{label}}</legend>\n\t\t\t<ibm-radio-group\n\t\t\t\taria-label=\"radiogroup\"\n\t\t\t\t[(ngModel)]=\"radio\"\n\t\t\t\t(change)=\"onChange($event)\">\n\t\t\t\t<ibm-radio\n\t\t\t\t\tvalue=\"radio\"\n\t\t\t\t\t[checked]=\"true\">\n\t\t\t\t\tzero\n\t\t\t\t</ibm-radio>\n\t\t\t\t<ibm-radio *ngFor=\"let radio of manyRadios\"\n\t\t\t\t\t[value]=\"radio.num\"\n\t\t\t\t\t[disabled]=\"radio.disabled\">\n\t\t\t\t\t{{radio.num}}\n\t\t\t\t</ibm-radio>\n\t\t\t</ibm-radio-group>\n\t\t</fieldset>\n\t\t`,\n props: {\n onChange: action('Radio change'),\n label: text('Label text', 'Radio Button heading'),\n manyRadios: [{ num: 'one' }, { num: 'two' }, { num: 'three' }, { num: 'four', disabled: true }],\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t<ibm-radio-group skeleton=\"true\">\n\t\t\t<ibm-radio></ibm-radio>\n\t\t</ibm-radio-group>\n\t\t`,\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/RadioGroup.html\"></ibm-documentation>\n\t\t`,\n }));\n";
14775
+ var __ADDS_MAP__ = { "radio--documentation": { "startLoc": { "col": 7, "line": 48 }, "endLoc": { "col": 4, "line": 52 } }, "radio--skeleton": { "startLoc": { "col": 7, "line": 41 }, "endLoc": { "col": 4, "line": 47 } }, "radio--basic": { "startLoc": { "col": 7, "line": 14 }, "endLoc": { "col": 4, "line": 40 } } };
14703
14776
 
14704
14777
 
14705
14778
 
@@ -14709,9 +14782,10 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Radio", mo
14709
14782
  }))
14710
14783
  .addDecorator(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["withKnobs"])
14711
14784
  .add("Basic", function () { return ({
14712
- template: "\n\t\t<ibm-radio-group aria-label=\"radiogroup\" [(ngModel)]=\"radio\" (change)=\"onChange($event)\">\n\t\t\t<ibm-radio\n\t\t\t\tvalue=\"radio\"\n\t\t\t\t[checked]=\"true\">\n\t\t\t\tzero\n\t\t\t</ibm-radio>\n\t\t\t<ibm-radio *ngFor=\"let radio of manyRadios\"\n\t\t\t\t[value]=\"radio.num\"\n\t\t\t\t[disabled]=\"radio.disabled\">\n\t\t\t\t{{radio.num}}\n\t\t\t</ibm-radio>\n\t\t</ibm-radio-group>\n\t\t",
14785
+ template: "\n\t\t<fieldset class=\"bx--fieldset\">\n\t\t\t<legend class=\"bx--label\">{{label}}</legend>\n\t\t\t<ibm-radio-group\n\t\t\t\taria-label=\"radiogroup\"\n\t\t\t\t[(ngModel)]=\"radio\"\n\t\t\t\t(change)=\"onChange($event)\">\n\t\t\t\t<ibm-radio\n\t\t\t\t\tvalue=\"radio\"\n\t\t\t\t\t[checked]=\"true\">\n\t\t\t\t\tzero\n\t\t\t\t</ibm-radio>\n\t\t\t\t<ibm-radio *ngFor=\"let radio of manyRadios\"\n\t\t\t\t\t[value]=\"radio.num\"\n\t\t\t\t\t[disabled]=\"radio.disabled\">\n\t\t\t\t\t{{radio.num}}\n\t\t\t\t</ibm-radio>\n\t\t\t</ibm-radio-group>\n\t\t</fieldset>\n\t\t",
14713
14786
  props: {
14714
14787
  onChange: Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__["action"])("Radio change"),
14788
+ label: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Label text", "Radio Button heading"),
14715
14789
  manyRadios: [
14716
14790
  { num: "one" },
14717
14791
  { num: "two" },
@@ -15298,10 +15372,6 @@ var Select = /** @class */ (function () {
15298
15372
  * `inline` or `default` select displays
15299
15373
  */
15300
15374
  this.display = "default";
15301
- /**
15302
- * Label for the select. Appears above the input.
15303
- */
15304
- this.label = "Select label";
15305
15375
  /**
15306
15376
  * Sets the unique ID. Defaults to `select-${total count of selects instantiated}`
15307
15377
  */
@@ -15375,16 +15445,16 @@ var Select = /** @class */ (function () {
15375
15445
  this.onChangeHandler(event.target.value);
15376
15446
  this.selected.emit(event.target.value);
15377
15447
  };
15448
+ Select.prototype.isTemplate = function (value) {
15449
+ return value instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"];
15450
+ };
15378
15451
  /**
15379
15452
  * Listens for the host blurring, and notifies the model
15380
15453
  */
15381
15454
  Select.prototype.blur = function () {
15382
15455
  this.onTouchedHandler();
15383
15456
  };
15384
- Select.prototype.isTemplate = function (value) {
15385
- return value instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"];
15386
- };
15387
- var Select_1, _a, _b;
15457
+ var Select_1, _a, _b, _c, _d;
15388
15458
  /**
15389
15459
  * Tracks the total number of selects instantiated. Used to generate unique IDs
15390
15460
  */
@@ -15399,7 +15469,7 @@ var Select = /** @class */ (function () {
15399
15469
  ], Select.prototype, "label", void 0);
15400
15470
  __decorate([
15401
15471
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
15402
- __metadata("design:type", String)
15472
+ __metadata("design:type", Object)
15403
15473
  ], Select.prototype, "helperText", void 0);
15404
15474
  __decorate([
15405
15475
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
@@ -15431,7 +15501,7 @@ var Select = /** @class */ (function () {
15431
15501
  ], Select.prototype, "selected", void 0);
15432
15502
  __decorate([
15433
15503
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])("select"),
15434
- __metadata("design:type", typeof (_b = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _b || Object)
15504
+ __metadata("design:type", typeof (_d = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _d || Object)
15435
15505
  ], Select.prototype, "select", void 0);
15436
15506
  __decorate([
15437
15507
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostListener"])("blur"),
@@ -15442,7 +15512,7 @@ var Select = /** @class */ (function () {
15442
15512
  Select = Select_1 = __decorate([
15443
15513
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
15444
15514
  selector: "ibm-select",
15445
- template: "\n\t\t<div class=\"bx--form-item\">\n\t\t\t<div\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'bx--select--inline': display === 'inline',\n\t\t\t\t\t'bx--select--light': theme === 'light',\n\t\t\t\t\t'bx--skeleton': skeleton\n\t\t\t\t}\"\n\t\t\t\tclass=\"bx--select\"\n\t\t\t\tstyle=\"width: 100%\">\n\t\t\t\t<label *ngIf=\"skeleton\" [attr.for]=\"id\" class=\"bx--label bx--skeleton\"></label>\n\t\t\t\t<label *ngIf=\"!skeleton\" [attr.for]=\"id\" class=\"bx--label\">{{label}}</label>\n\t\t\t\t<div *ngIf=\"helperText\" class=\"bx--form__helper-text\">{{helperText}}</div>\n\t\t\t\t<div class=\"bx--select-input__wrapper\" [attr.data-invalid]=\"(invalid ? true : null)\">\n\t\t\t\t\t<select\n\t\t\t\t\t\t#select\n\t\t\t\t\t\t[attr.id]=\"id\"\n\t\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t\t(change)=\"onChange($event)\"\n\t\t\t\t\t\tclass=\"bx--select-input\">\n\t\t\t\t\t\t<ng-content></ng-content>\n\t\t\t\t\t</select>\n\t\t\t\t\t<ibm-icon-warning-filled16\n\t\t\t\t\t\t*ngIf=\"!skeleton && invalid\"\n\t\t\t\t\t\tclass=\"bx--select__invalid-icon\"\n\t\t\t\t\t\tstyle=\"display: inherit;\">\n\t\t\t\t\t</ibm-icon-warning-filled16>\n\t\t\t\t\t<ibm-icon-chevron-down16 *ngIf=\"!skeleton\" class=\"bx--select__arrow\" style=\"display: inherit;\"></ibm-icon-chevron-down16>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf=\"invalid\" class=\"bx--form-requirement\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{invalidText}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t",
15515
+ template: "\n\t\t<div class=\"bx--form-item\">\n\t\t\t<div\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'bx--select--inline': display === 'inline',\n\t\t\t\t\t'bx--select--light': theme === 'light',\n\t\t\t\t\t'bx--skeleton': skeleton\n\t\t\t\t}\"\n\t\t\t\tclass=\"bx--select\"\n\t\t\t\tstyle=\"width: 100%\">\n\t\t\t\t<label *ngIf=\"skeleton\" [for]=\"id\" class=\"bx--label bx--skeleton\"></label>\n\t\t\t\t<label *ngIf=\"!skeleton\" [for]=\"id\" class=\"bx--label\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t\t\t</label>\n\t\t\t\t<div *ngIf=\"helperText\" class=\"bx--form__helper-text\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(helperText)\">{{helperText}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(helperText)\" [ngTemplateOutlet]=\"helperText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"bx--select-input__wrapper\" [attr.data-invalid]=\"(invalid ? true : null)\">\n\t\t\t\t\t<select\n\t\t\t\t\t\t#select\n\t\t\t\t\t\t[attr.id]=\"id\"\n\t\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\t\t(change)=\"onChange($event)\"\n\t\t\t\t\t\tclass=\"bx--select-input\">\n\t\t\t\t\t\t<ng-content></ng-content>\n\t\t\t\t\t</select>\n\t\t\t\t\t<ibm-icon-warning-filled16\n\t\t\t\t\t\t*ngIf=\"!skeleton && invalid\"\n\t\t\t\t\t\tclass=\"bx--select__invalid-icon\"\n\t\t\t\t\t\tstyle=\"display: inherit;\">\n\t\t\t\t\t</ibm-icon-warning-filled16>\n\t\t\t\t\t<ibm-icon-chevron-down16 *ngIf=\"!skeleton\" class=\"bx--select__arrow\" style=\"display: inherit;\"></ibm-icon-chevron-down16>\n\t\t\t\t</div>\n\t\t\t\t<div *ngIf=\"invalid\" class=\"bx--form-requirement\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(invalidText)\">{{invalidText}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(invalidText)\" [ngTemplateOutlet]=\"invalidText\"></ng-template>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t",
15446
15516
  styles: ["\n\t\t[data-invalid] ~ .bx--select__arrow {\n\t\t\tbottom: 2.25rem;\n\t\t}\n\t"],
15447
15517
  providers: [
15448
15518
  {
@@ -15548,8 +15618,8 @@ __webpack_require__.r(__webpack_exports__);
15548
15618
  /* harmony import */ var _storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__);
15549
15619
  /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ */ "./src/index.ts");
15550
15620
  var withStorySource = __webpack_require__(/*! @storybook/addon-storysource */ "./node_modules/@storybook/addon-storysource/dist/index.js").withStorySource;
15551
- var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, select, boolean, text } from '@storybook/addon-knobs/angular';\n\nimport { SelectModule, DocumentationModule } from '../';\n\nstoriesOf('Select', module)\n .addDecorator(\n moduleMetadata({\n imports: [SelectModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t\t<ibm-select\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[display]=\"display\">\n\t\t\t\t<option value=\"\" disabled selected hidden>Choose an option</option>\n\t\t\t\t<option value=\"solong\">A much longer option that is worth having around to check how text flows</option>\n\t\t\t\t<optgroup label=\"Category 1\">\n\t\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t\t</optgroup>\n\t\t\t\t<optgroup label=\"Category 2\">\n\t\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t\t</optgroup>\n\t\t\t</ibm-select>\n\t`,\n props: {\n disabled: boolean('Disabled', false),\n invalid: boolean('Show form validation', false),\n invalidText: text('Form validation content', 'Please select an option.'),\n helperText: text('Helper text', 'Optional helper text.'),\n theme: select('Theme', ['dark', 'light'], 'dark'),\n display: select('Display', ['default', 'inline'], 'default'),\n },\n }))\n .add('With ngModel', () => ({\n template: `\n\t\t\t<div style=\"width: 165px\">\n\t\t\t\t<ibm-select [(ngModel)]=\"model\">\n\t\t\t\t\t<option value=\"default\" disabled selected hidden>Choose an option</option>\n\t\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t\t\t<option value=\"option3\">Option 3</option>\n\t\t\t\t</ibm-select>\n\t\t\t\t<br>\n\t\t\t\t<span>Selected: {{ model }}</span>\n\t\t\t</div>\n\t\t`,\n props: {\n model: 'default',\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-select skeleton=\"true\"></ibm-select>\n\t\t</div>\n\t\t`,\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/Select.html\"></ibm-documentation>\n\t\t`,\n }));\n";
15552
- var __ADDS_MAP__ = { "select--documentation": { "startLoc": { "col": 7, "line": 68 }, "endLoc": { "col": 4, "line": 72 } }, "select--skeleton": { "startLoc": { "col": 7, "line": 61 }, "endLoc": { "col": 4, "line": 67 } }, "select--with-ngmodel": { "startLoc": { "col": 7, "line": 44 }, "endLoc": { "col": 4, "line": 60 } }, "select--basic": { "startLoc": { "col": 7, "line": 14 }, "endLoc": { "col": 4, "line": 43 } } };
15621
+ var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, select, boolean, text } from '@storybook/addon-knobs/angular';\n\nimport { SelectModule, DocumentationModule } from '../';\n\nstoriesOf('Select', module)\n .addDecorator(\n moduleMetadata({\n imports: [SelectModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t\t<ibm-select\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[display]=\"display\">\n\t\t\t\t<option value=\"\" disabled selected hidden>Choose an option</option>\n\t\t\t\t<option value=\"solong\">A much longer option that is worth having around to check how text flows</option>\n\t\t\t\t<optgroup label=\"Category 1\">\n\t\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t\t</optgroup>\n\t\t\t\t<optgroup label=\"Category 2\">\n\t\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t\t</optgroup>\n\t\t\t</ibm-select>\n\t`,\n props: {\n disabled: boolean('Disabled', false),\n invalid: boolean('Show form validation', false),\n invalidText: text('Form validation content', 'Please select an option.'),\n label: text('Label text', 'Select Label'),\n helperText: text('Helper text', 'Optional helper text.'),\n theme: select('Theme', ['dark', 'light'], 'dark'),\n display: select('Display', ['default', 'inline'], 'default'),\n },\n }))\n .add('With ngModel', () => ({\n template: `\n\t\t\t<div style=\"width: 165px\">\n\t\t\t\t<ibm-select [(ngModel)]=\"model\">\n\t\t\t\t\t<option value=\"default\" disabled selected hidden>Choose an option</option>\n\t\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t\t\t<option value=\"option3\">Option 3</option>\n\t\t\t\t</ibm-select>\n\t\t\t\t<br>\n\t\t\t\t<span>Selected: {{ model }}</span>\n\t\t\t</div>\n\t\t`,\n props: {\n model: 'default',\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t<div style=\"width: 300px\">\n\t\t\t<ibm-select skeleton=\"true\"></ibm-select>\n\t\t</div>\n\t\t`,\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/Select.html\"></ibm-documentation>\n\t\t`,\n }));\n";
15622
+ var __ADDS_MAP__ = { "select--documentation": { "startLoc": { "col": 7, "line": 70 }, "endLoc": { "col": 4, "line": 74 } }, "select--skeleton": { "startLoc": { "col": 7, "line": 63 }, "endLoc": { "col": 4, "line": 69 } }, "select--with-ngmodel": { "startLoc": { "col": 7, "line": 46 }, "endLoc": { "col": 4, "line": 62 } }, "select--basic": { "startLoc": { "col": 7, "line": 14 }, "endLoc": { "col": 4, "line": 45 } } };
15553
15623
 
15554
15624
 
15555
15625
 
@@ -15558,11 +15628,12 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Select", m
15558
15628
  }))
15559
15629
  .addDecorator(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["withKnobs"])
15560
15630
  .add("Basic", function () { return ({
15561
- template: "\n\t\t\t<ibm-select\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[display]=\"display\">\n\t\t\t\t<option value=\"\" disabled selected hidden>Choose an option</option>\n\t\t\t\t<option value=\"solong\">A much longer option that is worth having around to check how text flows</option>\n\t\t\t\t<optgroup label=\"Category 1\">\n\t\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t\t</optgroup>\n\t\t\t\t<optgroup label=\"Category 2\">\n\t\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t\t</optgroup>\n\t\t\t</ibm-select>\n\t",
15631
+ template: "\n\t\t\t<ibm-select\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[invalid]=\"invalid\"\n\t\t\t\t[invalidText]=\"invalidText\"\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[helperText]=\"helperText\"\n\t\t\t\t[theme]=\"theme\"\n\t\t\t\t[display]=\"display\">\n\t\t\t\t<option value=\"\" disabled selected hidden>Choose an option</option>\n\t\t\t\t<option value=\"solong\">A much longer option that is worth having around to check how text flows</option>\n\t\t\t\t<optgroup label=\"Category 1\">\n\t\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t\t</optgroup>\n\t\t\t\t<optgroup label=\"Category 2\">\n\t\t\t\t\t<option value=\"option1\">Option 1</option>\n\t\t\t\t\t<option value=\"option2\">Option 2</option>\n\t\t\t\t</optgroup>\n\t\t\t</ibm-select>\n\t",
15562
15632
  props: {
15563
15633
  disabled: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["boolean"])("Disabled", false),
15564
15634
  invalid: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["boolean"])("Show form validation", false),
15565
15635
  invalidText: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["text"])("Form validation content", "Please select an option."),
15636
+ label: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["text"])("Label text", "Select Label"),
15566
15637
  helperText: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["text"])("Helper text", "Optional helper text."),
15567
15638
  theme: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["select"])("Theme", ["dark", "light"], "dark"),
15568
15639
  display: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["select"])("Display", ["default", "inline"], "default")
@@ -15873,7 +15944,10 @@ var Slider = /** @class */ (function () {
15873
15944
  this.incrementValue(multiplier);
15874
15945
  }
15875
15946
  };
15876
- var Slider_1, _a, _b, _c, _d, _e;
15947
+ Slider.prototype.isTemplate = function (value) {
15948
+ return value instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"];
15949
+ };
15950
+ var Slider_1, _a, _b, _c, _d, _e, _f;
15877
15951
  /** Used to generate unique IDs */
15878
15952
  Slider.count = 0;
15879
15953
  __decorate([
@@ -15905,6 +15979,10 @@ var Slider = /** @class */ (function () {
15905
15979
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
15906
15980
  __metadata("design:type", Object)
15907
15981
  ], Slider.prototype, "skeleton", void 0);
15982
+ __decorate([
15983
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
15984
+ __metadata("design:type", Object)
15985
+ ], Slider.prototype, "label", void 0);
15908
15986
  __decorate([
15909
15987
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
15910
15988
  __metadata("design:type", Object)
@@ -15916,28 +15994,28 @@ var Slider = /** @class */ (function () {
15916
15994
  ], Slider.prototype, "disabled", null);
15917
15995
  __decorate([
15918
15996
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
15919
- __metadata("design:type", typeof (_a = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _a || Object)
15997
+ __metadata("design:type", typeof (_b = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _b || Object)
15920
15998
  ], Slider.prototype, "valueChange", void 0);
15921
15999
  __decorate([
15922
- Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])("class.bx--slider-container"),
16000
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])("class.bx--form-item"),
15923
16001
  __metadata("design:type", Object)
15924
16002
  ], Slider.prototype, "hostClass", void 0);
15925
16003
  __decorate([
15926
16004
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])("thumb"),
15927
- __metadata("design:type", typeof (_b = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _b || Object)
16005
+ __metadata("design:type", typeof (_c = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _c || Object)
15928
16006
  ], Slider.prototype, "thumb", void 0);
15929
16007
  __decorate([
15930
16008
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])("track"),
15931
- __metadata("design:type", typeof (_c = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _c || Object)
16009
+ __metadata("design:type", typeof (_d = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _d || Object)
15932
16010
  ], Slider.prototype, "track", void 0);
15933
16011
  __decorate([
15934
16012
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])("range"),
15935
- __metadata("design:type", typeof (_d = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _d || Object)
16013
+ __metadata("design:type", typeof (_e = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _e || Object)
15936
16014
  ], Slider.prototype, "range", void 0);
15937
16015
  Slider = Slider_1 = __decorate([
15938
16016
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
15939
16017
  selector: "ibm-slider",
15940
- template: "\n\t\t<ng-container *ngIf=\"!skeleton; else skeletonTemplate\">\n\t\t\t<label [id]=\"bottomRangeId\" class=\"bx--slider__range-label\">\n\t\t\t\t<ng-content select=\"[minLabel]\"></ng-content>\n\t\t\t</label>\n\t\t\t<div\n\t\t\t\tclass=\"bx--slider\"\n\t\t\t\t[ngClass]=\"{'bx--slider--disabled': disabled}\">\n\t\t\t\t<div\n\t\t\t\t\t#thumb\n\t\t\t\t\tclass=\"bx--slider__thumb\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t[ngStyle]=\"{'left.%': getFractionComplete() * 100}\"\n\t\t\t\t\t(mousedown)=\"onMouseDown($event)\"\n\t\t\t\t\t(keydown)=\"onKeyDown($event)\">\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\t#track\n\t\t\t\t\tclass=\"bx--slider__track\"\n\t\t\t\t\t(click)=\"onClick($event)\">\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"bx--slider__filled-track\"\n\t\t\t\t\t[ngStyle]=\"{transform: 'translate(0%, -50%)' + scaleX(getFractionComplete())}\">\n\t\t\t\t</div>\n\t\t\t\t<input\n\t\t\t\t\t#range\n\t\t\t\t\taria-label=\"slider\"\n\t\t\t\t\tclass=\"bx--slider__input\"\n\t\t\t\t\ttype=\"range\"\n\t\t\t\t\t[step]=\"step\"\n\t\t\t\t\t[min]=\"min\"\n\t\t\t\t\t[max]=\"max\"\n\t\t\t\t\t[value]=\"value.toString()\">\n\t\t\t</div>\n\t\t\t<label [id]=\"topRangeId\" class=\"bx--slider__range-label\">\n\t\t\t\t<ng-content select=\"[maxLabel]\"></ng-content>\n\t\t\t</label>\n\t\t\t<ng-content select=\"input\"></ng-content>\n\t\t</ng-container>\n\n\t\t<ng-template #skeletonTemplate>\n\t\t\t<div class=\"bx--form-item\">\n\t\t\t\t<label class=\"bx--label bx--skeleton\"></label>\n\t\t\t\t<div class=\"bx--slider-container bx--skeleton\">\n\t\t\t\t\t<span class=\"bx--slider__range-label\"></span>\n\t\t\t\t\t<div class=\"bx--slider\">\n\t\t\t\t\t\t<div class=\"bx--slider__thumb\"></div>\n\t\t\t\t\t\t<div class=\"bx--slider__track\"></div>\n\t\t\t\t\t\t<div class=\"bx--slider__filled-track\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<span class=\"bx--slider__range-label\"></span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</ng-template>\n\t",
16018
+ template: "\n\t\t<ng-container *ngIf=\"!skeleton; else skeletonTemplate\">\n\t\t\t<label for=\"slider\" class=\"bx--label\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t\t</label>\n\t\t\t<div class=\"bx--slider-container\">\n\t\t\t\t<label [id]=\"bottomRangeId\" class=\"bx--slider__range-label\">\n\t\t\t\t\t<ng-content select=\"[minLabel]\"></ng-content>\n\t\t\t\t</label>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"bx--slider\"\n\t\t\t\t\t[ngClass]=\"{'bx--slider--disabled': disabled}\">\n\t\t\t\t\t<div\n\t\t\t\t\t\t#thumb\n\t\t\t\t\t\tclass=\"bx--slider__thumb\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t[ngStyle]=\"{'left.%': getFractionComplete() * 100}\"\n\t\t\t\t\t\t(mousedown)=\"onMouseDown($event)\"\n\t\t\t\t\t\t(keydown)=\"onKeyDown($event)\">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div\n\t\t\t\t\t\t#track\n\t\t\t\t\t\tclass=\"bx--slider__track\"\n\t\t\t\t\t\t(click)=\"onClick($event)\">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"bx--slider__filled-track\"\n\t\t\t\t\t\t[ngStyle]=\"{transform: 'translate(0%, -50%)' + scaleX(getFractionComplete())}\">\n\t\t\t\t\t</div>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#range\n\t\t\t\t\t\taria-label=\"slider\"\n\t\t\t\t\t\tclass=\"bx--slider__input\"\n\t\t\t\t\t\ttype=\"range\"\n\t\t\t\t\t\t[step]=\"step\"\n\t\t\t\t\t\t[min]=\"min\"\n\t\t\t\t\t\t[max]=\"max\"\n\t\t\t\t\t\t[value]=\"value.toString()\">\n\t\t\t\t</div>\n\t\t\t\t<label [id]=\"topRangeId\" class=\"bx--slider__range-label\">\n\t\t\t\t\t<ng-content select=\"[maxLabel]\"></ng-content>\n\t\t\t\t</label>\n\t\t\t\t<ng-content select=\"input\"></ng-content>\n\t\t\t</div>\n\t\t</ng-container>\n\n\t\t<ng-template #skeletonTemplate>\n\t\t\t<label class=\"bx--label bx--skeleton\"></label>\n\t\t\t<div class=\"bx--slider-container bx--skeleton\">\n\t\t\t\t<span class=\"bx--slider__range-label\"></span>\n\t\t\t\t<div class=\"bx--slider\">\n\t\t\t\t\t<div class=\"bx--slider__thumb\"></div>\n\t\t\t\t\t<div class=\"bx--slider__track\"></div>\n\t\t\t\t\t<div class=\"bx--slider__filled-track\"></div>\n\t\t\t\t</div>\n\t\t\t\t<span class=\"bx--slider__range-label\"></span>\n\t\t\t</div>\n\t\t</ng-template>\n\t",
15941
16019
  providers: [
15942
16020
  {
15943
16021
  provide: _angular_forms__WEBPACK_IMPORTED_MODULE_2__["NG_VALUE_ACCESSOR"],
@@ -15946,7 +16024,7 @@ var Slider = /** @class */ (function () {
15946
16024
  }
15947
16025
  ]
15948
16026
  }),
15949
- __metadata("design:paramtypes", [typeof (_e = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _e || Object])
16027
+ __metadata("design:paramtypes", [typeof (_f = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]) === "function" && _f || Object])
15950
16028
  ], Slider);
15951
16029
  return Slider;
15952
16030
  }());
@@ -16017,8 +16095,8 @@ __webpack_require__.r(__webpack_exports__);
16017
16095
  /* harmony import */ var _slider_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slider.module */ "./src/slider/slider.module.ts");
16018
16096
  /* harmony import */ var _documentation_component_documentation_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../documentation-component/documentation.module */ "./src/documentation-component/documentation.module.ts");
16019
16097
  var withStorySource = __webpack_require__(/*! @storybook/addon-storysource */ "./node_modules/@storybook/addon-storysource/dist/index.js").withStorySource;
16020
- var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, number, text, boolean } from '@storybook/addon-knobs/angular';\n\nimport { SliderModule } from './slider.module';\nimport { DocumentationModule } from './../documentation-component/documentation.module';\n\nstoriesOf('Slider', module)\n .addDecorator(\n moduleMetadata({\n imports: [SliderModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `<ibm-slider [disabled]=\"disabled\"></ibm-slider>`,\n props: {\n disabled: boolean('disabled', false),\n },\n }))\n .add('Advanced', () => ({\n template: `\n\t\t<ibm-slider\n\t\t\t[min]=\"min\"\n\t\t\t[max]=\"max\"\n\t\t\t[step]=\"step\"\n\t\t\t[value]=\"value\"\n\t\t\t[shiftMultiplier]=\"shiftMultiplier\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t<span minLabel>{{minLabel}}</span>\n\t\t\t<span maxLabel>{{maxLabel}}</span>\n\t\t\t<input/>\n\t\t</ibm-slider>\n\t`,\n props: {\n min: number('min', 0),\n max: number('max', 100),\n step: number('step', 1),\n value: number('value', 0),\n minLabel: text('minLabel', '0'),\n maxLabel: text('maxLabel', '100'),\n disabled: boolean('disabled', false),\n shiftMultiplier: number('shiftMultiplier', 4),\n valueChange: action('Value changed'),\n },\n }))\n .add('With NgModel', () => ({\n template: `\n\t\t<ibm-slider [(ngModel)]=\"model\" [disabled]=\"disabled\"></ibm-slider>\n\t\t<br>\n\t\t<span>model: {{model}}</span>\n\t`,\n props: {\n model: 0,\n disabled: boolean('disabled', false),\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t<ibm-slider skeleton=\"true\"></ibm-slider>\n\t`,\n }))\n .add('Documentation', () => ({\n template: `\n\t\t<ibm-documentation src=\"documentation/components/Slider.html\"></ibm-documentation>\n\t`,\n }));\n";
16021
- var __ADDS_MAP__ = { "slider--documentation": { "startLoc": { "col": 7, "line": 64 }, "endLoc": { "col": 4, "line": 68 } }, "slider--skeleton": { "startLoc": { "col": 7, "line": 59 }, "endLoc": { "col": 4, "line": 63 } }, "slider--with-ngmodel": { "startLoc": { "col": 7, "line": 48 }, "endLoc": { "col": 4, "line": 58 } }, "slider--advanced": { "startLoc": { "col": 7, "line": 21 }, "endLoc": { "col": 4, "line": 47 } }, "slider--basic": { "startLoc": { "col": 7, "line": 15 }, "endLoc": { "col": 4, "line": 20 } } };
16098
+ var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { action } from '@storybook/addon-actions';\nimport { withKnobs, number, text, boolean, select } from '@storybook/addon-knobs/angular';\n\nimport { SliderModule } from './slider.module';\nimport { DocumentationModule } from './../documentation-component/documentation.module';\n\nstoriesOf('Slider', module)\n .addDecorator(\n moduleMetadata({\n imports: [SliderModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `<ibm-slider [disabled]=\"disabled\"></ibm-slider>`,\n props: {\n disabled: boolean('disabled', false),\n },\n }))\n .add('Advanced', () => ({\n template: `\n\t\t<ibm-slider\n\t\t\t[label]=\"label\"\n\t\t\t[min]=\"min\"\n\t\t\t[max]=\"max\"\n\t\t\t[step]=\"step\"\n\t\t\t[value]=\"value\"\n\t\t\t[shiftMultiplier]=\"shiftMultiplier\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t<span minLabel>{{minLabel}}</span>\n\t\t\t<span maxLabel>{{maxLabel}}</span>\n\t\t\t<input [ngClass]=\"{'bx--text-input--light': theme === 'light'}\"/>\n\t\t</ibm-slider>\n\t`,\n props: {\n min: number('min', 0),\n max: number('max', 100),\n step: number('step', 1),\n value: number('value', 0),\n label: text('Label text', 'Slider Label'),\n minLabel: text('minLabel', '0'),\n maxLabel: text('maxLabel', '100'),\n theme: select('Theme', ['dark', 'light'], 'dark'),\n disabled: boolean('disabled', false),\n shiftMultiplier: number('shiftMultiplier', 4),\n valueChange: action('Value changed'),\n },\n }))\n .add('With NgModel', () => ({\n template: `\n\t\t<ibm-slider [(ngModel)]=\"model\" [disabled]=\"disabled\"></ibm-slider>\n\t\t<br>\n\t\t<span>model: {{model}}</span>\n\t`,\n props: {\n model: 0,\n disabled: boolean('disabled', false),\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t<ibm-slider skeleton=\"true\"></ibm-slider>\n\t`,\n }))\n .add('Documentation', () => ({\n template: `\n\t\t<ibm-documentation src=\"documentation/components/Slider.html\"></ibm-documentation>\n\t`,\n }));\n";
16099
+ var __ADDS_MAP__ = { "slider--documentation": { "startLoc": { "col": 7, "line": 67 }, "endLoc": { "col": 4, "line": 71 } }, "slider--skeleton": { "startLoc": { "col": 7, "line": 62 }, "endLoc": { "col": 4, "line": 66 } }, "slider--with-ngmodel": { "startLoc": { "col": 7, "line": 51 }, "endLoc": { "col": 4, "line": 61 } }, "slider--advanced": { "startLoc": { "col": 7, "line": 21 }, "endLoc": { "col": 4, "line": 50 } }, "slider--basic": { "startLoc": { "col": 7, "line": 15 }, "endLoc": { "col": 4, "line": 20 } } };
16022
16100
 
16023
16101
 
16024
16102
 
@@ -16035,14 +16113,16 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Slider", m
16035
16113
  }
16036
16114
  }); })
16037
16115
  .add("Advanced", function () { return ({
16038
- template: "\n\t\t<ibm-slider\n\t\t\t[min]=\"min\"\n\t\t\t[max]=\"max\"\n\t\t\t[step]=\"step\"\n\t\t\t[value]=\"value\"\n\t\t\t[shiftMultiplier]=\"shiftMultiplier\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t<span minLabel>{{minLabel}}</span>\n\t\t\t<span maxLabel>{{maxLabel}}</span>\n\t\t\t<input/>\n\t\t</ibm-slider>\n\t",
16116
+ template: "\n\t\t<ibm-slider\n\t\t\t[label]=\"label\"\n\t\t\t[min]=\"min\"\n\t\t\t[max]=\"max\"\n\t\t\t[step]=\"step\"\n\t\t\t[value]=\"value\"\n\t\t\t[shiftMultiplier]=\"shiftMultiplier\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t(valueChange)=\"valueChange($event)\">\n\t\t\t<span minLabel>{{minLabel}}</span>\n\t\t\t<span maxLabel>{{maxLabel}}</span>\n\t\t\t<input [ngClass]=\"{'bx--text-input--light': theme === 'light'}\"/>\n\t\t</ibm-slider>\n\t",
16039
16117
  props: {
16040
16118
  min: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["number"])("min", 0),
16041
16119
  max: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["number"])("max", 100),
16042
16120
  step: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["number"])("step", 1),
16043
16121
  value: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["number"])("value", 0),
16122
+ label: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("Label text", "Slider Label"),
16044
16123
  minLabel: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("minLabel", "0"),
16045
16124
  maxLabel: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["text"])("maxLabel", "100"),
16125
+ theme: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["select"])("Theme", ["dark", "light"], "dark"),
16046
16126
  disabled: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["boolean"])("disabled", false),
16047
16127
  shiftMultiplier: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_2__["number"])("shiftMultiplier", 4),
16048
16128
  valueChange: Object(_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_1__["action"])("Value changed")
@@ -18895,7 +18975,7 @@ var __metadata = (undefined && undefined.__metadata) || function (k, v) {
18895
18975
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
18896
18976
  };
18897
18977
  var withStorySource = __webpack_require__(/*! @storybook/addon-storysource */ "./node_modules/@storybook/addon-storysource/dist/index.js").withStorySource;
18898
- var __STORY__ = "import { PaginationModule } from './../pagination/pagination.module';\nimport { TemplateRef, Component, ViewChild, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { withKnobs, boolean, select, number, text } from '@storybook/addon-knobs/angular';\n\nimport {\n Table,\n TableModule,\n TableModel,\n TableItem,\n TableHeaderItem,\n NFormsModule,\n DialogModule,\n SearchModule,\n ButtonModule,\n DocumentationModule,\n} from '../';\n\nimport { Settings16Module } from '@carbon/icons-angular/lib/settings/16';\nimport { Delete16Module } from '@carbon/icons-angular/lib/delete/16';\nimport { Save16Module } from '@carbon/icons-angular/lib/save/16';\nimport { Download16Module } from '@carbon/icons-angular/lib/download/16';\nimport { Add20Module } from '@carbon/icons-angular/lib/add/20';\n\nimport { clone } from '../utils/utils';\n\n@Component({\n selector: 'app-table',\n template: `\n <ibm-table\n style=\"display: block; width: 650px;\"\n [model]=\"model\"\n [size]=\"size\"\n [showSelectionColumn]=\"showSelectionColumn\"\n [striped]=\"striped\"\n [isDataGrid]=\"isDataGrid\"\n (sort)=\"simpleSort($event)\"\n >\n <ng-content></ng-content>\n </ibm-table>\n `,\n})\nclass TableStory implements OnInit, OnChanges {\n @Input() model = new TableModel();\n @Input() size = 'md';\n @Input() showSelectionColumn = true;\n @Input() striped = true;\n @Input() sortable = true;\n @Input() isDataGrid = false;\n\n ngOnInit() {\n this.model.header = [\n new TableHeaderItem({\n data: 'Name',\n }),\n new TableHeaderItem({\n data: 'hwer',\n className: 'my-class',\n }),\n ];\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.sortable) {\n for (let column of this.model.header) {\n column.sortable = changes.sortable.currentValue;\n }\n }\n }\n\n simpleSort(index: number) {\n sort(simpleModel, index);\n }\n}\n\n@Component({\n selector: 'app-custom-table',\n template: `\n <ibm-table-toolbar [model]=\"model\">\n <button ibmButton=\"primary\" (click)=\"addRow()\">Add row</button>\n <button ibmButton=\"primary\" (click)=\"addColumn()\">Add column</button>\n </ibm-table-toolbar>\n\n <ng-template #customTableItemTemplate let-data=\"data\">\n <a [attr.href]=\"data.link\">{{ data.name }} {{ data.surname }}</a>\n </ng-template>\n <ng-template #customHeaderTemplate let-data=\"data\">\n <i\n ><a [attr.href]=\"data.link\">{{ data.name }}</a></i\n >\n </ng-template>\n\n <ibm-table\n style=\"display: block; width: 650px;\"\n [model]=\"model\"\n [size]=\"size\"\n [showSelectionColumn]=\"showSelectionColumn\"\n [striped]=\"striped\"\n [isDataGrid]=\"isDataGrid\"\n (sort)=\"customSort($event)\"\n >\n </ibm-table>\n `,\n})\nclass DynamicTableStory implements OnInit {\n @Input() model = new TableModel();\n @Input() size = 'md';\n @Input() showSelectionColumn = true;\n @Input() striped = true;\n @Input() isDataGrid = false;\n\n @ViewChild('customHeaderTemplate')\n protected customHeaderTemplate: TemplateRef<any>;\n @ViewChild('customTableItemTemplate')\n protected customTableItemTemplate: TemplateRef<any>;\n\n ngOnInit() {\n this.model.data = [\n [\n new TableItem({ data: 'Name 1' }),\n new TableItem({ data: { name: 'Lessy', link: '/table' }, template: this.customTableItemTemplate }),\n ],\n [new TableItem({ data: 'Name 3' }), new TableItem({ data: 'swer' })],\n [\n new TableItem({ data: 'Name 2' }),\n new TableItem({ data: { name: 'Alice', surname: 'Bob' }, template: this.customTableItemTemplate }),\n ],\n [new TableItem({ data: 'Name 4' }), new TableItem({ data: 'twer' })],\n ];\n this.model.header = [\n new TableHeaderItem({ data: 'Very long title indeed' }),\n new CustomHeaderItem({\n data: { name: 'Custom header', link: '/table' },\n template: this.customHeaderTemplate,\n style: { width: 'auto' },\n }),\n ];\n }\n\n customSort(index: number) {\n this.sort(this.model, index);\n }\n\n sort(model, index: number) {\n if (model.header[index].sorted) {\n // if already sorted flip sorting direction\n model.header[index].ascending = model.header[index].descending;\n }\n model.sort(index);\n }\n\n addRow() {\n const lastRowCopy = clone(this.model.row(this.model.data.length - 1));\n this.model.addRow(lastRowCopy);\n }\n\n addColumn() {\n let column = Array(this.model.data.length).fill(new TableItem({ data: `Column ${this.model.row(0).length}` }));\n this.model.addColumn(column);\n }\n}\n\n@Component({\n selector: 'app-expansion-table',\n template: `\n <ng-template #customTableItemTemplate let-data=\"data\">\n <a [attr.href]=\"data.link\">{{ data.name }} {{ data.surname }}</a>\n </ng-template>\n <ng-template #customHeaderTemplate let-data=\"data\">\n <i\n ><a [attr.href]=\"data.link\">{{ data.name }}</a></i\n >\n </ng-template>\n\n <ibm-table\n style=\"display: block; width: 650px;\"\n [model]=\"model\"\n [size]=\"size\"\n [showSelectionColumn]=\"showSelectionColumn\"\n [striped]=\"striped\"\n (sort)=\"customSort($event)\"\n [isDataGrid]=\"isDataGrid\"\n >\n </ibm-table>\n `,\n})\nclass ExpansionTableStory implements OnInit {\n @Input() model = new TableModel();\n @Input() size = 'md';\n @Input() showSelectionColumn = true;\n @Input() striped = true;\n @Input() isDataGrid = false;\n\n @ViewChild('customHeaderTemplate')\n protected customHeaderTemplate: TemplateRef<any>;\n @ViewChild('customTableItemTemplate')\n protected customTableItemTemplate: TemplateRef<any>;\n\n ngOnInit() {\n this.model.data = [\n [\n new TableItem({ data: 'Name 1', expandedData: 'No template' }),\n new TableItem({ data: { name: 'Lessy', link: '#' }, template: this.customTableItemTemplate }),\n ],\n [\n new TableItem({\n data: 'Name 3',\n expandedData: { name: 'In', surname: 'Template' },\n expandedTemplate: this.customTableItemTemplate,\n }),\n new TableItem({ data: 'swer' }),\n ],\n [\n new TableItem({ data: 'Name 2' }),\n new TableItem({ data: { name: 'Alice', surname: 'Bob' }, template: this.customTableItemTemplate }),\n ],\n [new TableItem({ data: 'Name 4' }), new TableItem({ data: 'twer' })],\n ];\n this.model.header = [\n new TableHeaderItem({ data: 'Very long title indeed' }),\n new CustomHeaderItem({\n data: { name: 'Custom header', link: '#' },\n template: this.customHeaderTemplate,\n style: { width: 'auto' },\n }),\n ];\n }\n\n customSort(index: number) {\n this.sort(this.model, index);\n }\n\n sort(model, index: number) {\n if (model.header[index].sorted) {\n // if already sorted flip sorting direction\n model.header[index].ascending = model.header[index].descending;\n }\n model.sort(index);\n }\n}\n\n@Component({\n selector: 'app-overflow-table',\n template: `\n <ng-template #overflowMenuItemTemplate let-data=\"data\">\n <ibm-overflow-menu>\n <ibm-overflow-menu-option>\n First Option\n </ibm-overflow-menu-option>\n <ibm-overflow-menu-option>\n Second Option\n </ibm-overflow-menu-option>\n <ibm-overflow-menu-option>\n Third Option\n </ibm-overflow-menu-option>\n </ibm-overflow-menu>\n </ng-template>\n\n <ibm-table\n style=\"display: block; width: 650px;\"\n [model]=\"model\"\n [size]=\"size\"\n [showSelectionColumn]=\"showSelectionColumn\"\n [isDataGrid]=\"isDataGrid\"\n [striped]=\"striped\"\n >\n </ibm-table>\n `,\n})\nclass OverflowTableStory implements OnInit {\n @Input() model = new TableModel();\n @Input() size = 'md';\n @Input() showSelectionColumn = true;\n @Input() striped = true;\n @Input() isDataGrid = false;\n\n @ViewChild('overflowMenuItemTemplate')\n protected overflowMenuItemTemplate: TemplateRef<any>;\n\n ngOnInit() {\n this.model.data = [\n [\n new TableItem({ data: 'Name 1' }),\n new TableItem({ data: { id: '1' }, template: this.overflowMenuItemTemplate }),\n ],\n [\n new TableItem({ data: 'Name 2' }),\n new TableItem({ data: { id: '2' }, template: this.overflowMenuItemTemplate }),\n ],\n [\n new TableItem({ data: 'Name 3' }),\n new TableItem({ data: { id: '3' }, template: this.overflowMenuItemTemplate }),\n ],\n [\n new TableItem({ data: 'Name 4' }),\n new TableItem({ data: { id: '4' }, template: this.overflowMenuItemTemplate }),\n ],\n ];\n this.model.header = [new TableHeaderItem({ data: 'Name' }), new TableHeaderItem({ data: 'Actions' })];\n }\n}\n\n@Component({\n selector: 'app-pagination-table',\n template: `\n <ng-template #paginationTableItemTemplate let-data=\"data\">\n <a [attr.href]=\"data.link\">{{ data.name }} {{ data.surname }}</a>\n </ng-template>\n <ng-template #filterableHeaderTemplate let-data=\"data\">\n <i\n ><a [attr.href]=\"data.link\">{{ data.name }}</a></i\n >\n </ng-template>\n <ng-template #filter let-popover=\"popover\" let-filter=\"data\">\n <ibm-label class=\"first-label\">\n Value\n <input type=\"text\" [(ngModel)]=\"filter1\" class=\"input-field\" />\n <button class=\"btn--primary\" (click)=\"filter.data = filter1; popover.doClose()\">Apply</button>\n <button class=\"btn--secondary\" (click)=\"popover.doClose()\">Cancel</button>\n </ibm-label>\n </ng-template>\n\n <ibm-table style=\"display: block; width: 650px;\" [model]=\"model\" (sort)=\"paginationSort($event)\"></ibm-table>\n <ibm-pagination [model]=\"model\" (selectPage)=\"selectPage($event)\"></ibm-pagination>\n `,\n})\nclass PaginationTableStory implements OnInit {\n @Input() model = new TableModel();\n\n @Input() get totalDataLength() {\n return this.model.totalDataLength;\n }\n set totalDataLength(value) {\n this.model.totalDataLength = value;\n }\n\n @ViewChild('filter')\n filter: TemplateRef<any>;\n @ViewChild('filterableHeaderTemplate')\n protected filterableHeaderTemplate: TemplateRef<any>;\n @ViewChild('paginationTableItemTemplate')\n protected paginationTableItemTemplate: TemplateRef<any>;\n\n ngOnInit() {\n this.model.data = [[]];\n this.model.header = [\n new TableHeaderItem({ data: 'Very long title indeed' }),\n new TableHeaderItem({\n data: 'Very long title indeed',\n style: { width: 'auto' },\n }),\n ];\n\n this.model.pageLength = 10;\n this.model.totalDataLength = 105;\n this.selectPage(1);\n }\n\n customSort(index: number) {\n this.sort(this.model, index);\n }\n\n sort(model, index: number) {\n if (model.header[index].sorted) {\n // if already sorted flip sorting direction\n model.header[index].ascending = model.header[index].descending;\n }\n model.sort(index);\n }\n\n getPage(page: number) {\n const line = line => [`Item ${line}:1!`, { name: 'Item', surname: `${line}:2` }];\n\n const fullPage = [];\n\n for (\n let i = (page - 1) * this.model.pageLength;\n i < page * this.model.pageLength && i < this.model.totalDataLength;\n i++\n ) {\n fullPage.push(line(i + 1));\n }\n\n return new Promise(resolve => {\n setTimeout(() => resolve(fullPage), 150);\n });\n }\n\n selectPage(page) {\n this.getPage(page).then((data: Array<Array<any>>) => {\n // set the data and update page\n this.model.data = this.prepareData(data);\n this.model.currentPage = page;\n });\n }\n\n protected prepareData(data: Array<Array<any>>) {\n // create new data from the service data\n let newData = [];\n data.forEach(dataRow => {\n let row = [];\n dataRow.forEach(dataElement => {\n row.push(\n new TableItem({\n data: dataElement,\n template: typeof dataElement === 'string' ? undefined : this.paginationTableItemTemplate,\n // your template can handle all the data types so you don't have to conditionally set it\n // you can also set different templates for different columns based on index\n })\n );\n });\n newData.push(row);\n });\n return newData;\n }\n}\n\nclass CustomHeaderItem extends TableHeaderItem {\n // used for custom sorting\n compare(one: TableItem, two: TableItem) {\n const stringOne = (one.data.name || one.data.surname || one.data).toLowerCase();\n const stringTwo = (two.data.name || two.data.surname || two.data).toLowerCase();\n\n if (stringOne > stringTwo) {\n return 1;\n } else if (stringOne < stringTwo) {\n return -1;\n } else {\n return 0;\n }\n }\n}\n\nconst simpleModel = new TableModel();\nsimpleModel.data = [\n [new TableItem({ data: 'Name 1' }), new TableItem({ data: 'qwer' })],\n [new TableItem({ data: 'Name 3' }), new TableItem({ data: 'zwer' })],\n [new TableItem({ data: 'Name 2' }), new TableItem({ data: 'swer' })],\n [new TableItem({ data: 'Name 4' }), new TableItem({ data: 'twer' })],\n];\nsimpleModel.header = [new TableHeaderItem({ data: 'Name' }), new TableHeaderItem({ data: 'hwer' })];\n\nconst emptyModel = new TableModel();\nemptyModel.header = [\n new TableHeaderItem({ data: 'Name' }),\n new TableHeaderItem({ data: 'hwer', style: { width: 'auto' } }),\n];\n\nfunction sort(model, index: number) {\n if (model.header[index].sorted) {\n // if already sorted flip sorting direction\n model.header[index].ascending = model.header[index].descending;\n }\n model.sort(index);\n}\n\n@Component({\n selector: 'app-skeleton-table',\n template: `\n <ibm-table\n style=\"display: block; width: 800px;\"\n [model]=\"skeletonModel\"\n [skeleton]=\"skeleton\"\n [size]=\"size\"\n [striped]=\"striped\"\n >\n <ng-content></ng-content>\n </ibm-table>\n `,\n})\nclass SkeletonTableStory implements OnInit, OnChanges {\n @Input() size = 'md';\n @Input() striped = false;\n @Input() skeleton = true;\n @Input() skeletonModel = new TableModel();\n\n ngOnInit() {\n // Creates an empty table with 5 rows and 5 columns\n this.skeletonModel = Table.skeletonModel(5, 5);\n }\n}\n\nstoriesOf('Table', module)\n .addDecorator(\n moduleMetadata({\n imports: [\n NFormsModule,\n TableModule,\n DialogModule,\n PaginationModule,\n SearchModule,\n ButtonModule,\n Settings16Module,\n Delete16Module,\n Save16Module,\n Download16Module,\n Add20Module,\n DocumentationModule,\n ],\n declarations: [\n TableStory,\n DynamicTableStory,\n ExpansionTableStory,\n OverflowTableStory,\n PaginationTableStory,\n SkeletonTableStory,\n ],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t<ibm-table-container>\n\t\t\t<ibm-table-header>\n\t\t\t\t<h4 ibmTableHeaderTitle>{{title}}</h4>\n\t\t\t\t<p ibmTableHeaderDescription>{{description}}</p>\n\t\t\t</ibm-table-header>\n\t\t\t<app-table\n\t\t\t\t[model]=\"model\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[showSelectionColumn]=\"showSelectionColumn\"\n\t\t\t\t[striped]=\"striped\"\n\t\t\t\t[sortable]=\"sortable\"\n\t\t\t\t[isDataGrid]=\"isDataGrid\">\n\t\t\t</app-table>\n\t\t</ibm-table-container>\n\t`,\n props: {\n model: simpleModel,\n size: select('size', { Small: 'sm', Normal: 'md', Large: 'lg' }, 'md'),\n title: text('Title', 'Table title'),\n description: text('Description', ''),\n showSelectionColumn: boolean('showSelectionColumn', true),\n striped: boolean('striped', false),\n sortable: boolean('sortable', true),\n isDataGrid: boolean('Data grid keyboard interactions', false),\n },\n }))\n .add('With no data', () => ({\n template: `\n\t\t<ibm-table-container>\n\t\t\t<ibm-table-header>\n\t\t\t\t<h4 ibmTableHeaderTitle>{{title}}</h4>\n\t\t\t\t<p ibmTableHeaderDescription>{{description}}</p>\n\t\t\t</ibm-table-header>\n\t\t\t<app-table\n\t\t\t\t[model]=\"model\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[showSelectionColumn]=\"showSelectionColumn\"\n\t\t\t\t[striped]=\"striped\">\n\t\t\t\t<tbody><tr><td class=\"no-data\" colspan=\"3\"><div>No data.</div></td></tr></tbody>\n\t\t\t</app-table>\n\t\t</ibm-table-container>\n\t\t`,\n styles: [\n `\n\t\t\t.no-data {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 150px;\n\t\t\t\ttext-align: center;\n\t\t\t}\n\t\t`,\n ],\n props: {\n model: emptyModel,\n size: select('size', { Small: 'sm', Normal: 'md', Large: 'lg' }, 'md'),\n title: text('Title', 'Table title'),\n description: text('Description', 'With no data'),\n showSelectionColumn: boolean('showSelectionColumn', true),\n striped: boolean('striped', false),\n },\n }))\n .add('With toolbar', () => ({\n template: `\n\t\t<ibm-table-container>\n\t\t\t<ibm-table-header>\n\t\t\t\t<h4 ibmTableHeaderTitle>{{title}}</h4>\n\t\t\t\t<p ibmTableHeaderDescription>{{description}}</p>\n\t\t\t</ibm-table-header>\n\t\t\t<ibm-table-toolbar [model]=\"model\">\n\t\t\t\t<ibm-table-toolbar-actions>\n\t\t\t\t\t<button ibmButton=\"primary\">\n\t\t\t\t\t\tDelete\n\t\t\t\t\t\t<ibm-icon-delete16 class=\"bx--btn__icon\"></ibm-icon-delete16>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button ibmButton=\"primary\">\n\t\t\t\t\t\tSave\n\t\t\t\t\t\t<ibm-icon-save16 class=\"bx--btn__icon\"></ibm-icon-save16>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button ibmButton=\"primary\">\n\t\t\t\t\t\tDownload\n\t\t\t\t\t\t<ibm-icon-download16 class=\"bx--btn__icon\"></ibm-icon-download16>\n\t\t\t\t\t</button>\n\t\t\t\t</ibm-table-toolbar-actions>\n\t\t\t\t\t<ibm-table-toolbar-content>\n\t\t\t\t\t<ibm-table-toolbar-search [expandable]=\"true\"></ibm-table-toolbar-search>\n\t\t\t\t\t<button ibmButton=\"toolbar-action\">\n\t\t\t\t\t\t<ibm-icon-settings16 class=\"bx--toolbar-action__icon\"></ibm-icon-settings16>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button ibmButton=\"primary\" size=\"sm\">\n\t\t\t\t\t\tPrimary Button\n\t\t\t\t\t\t<ibm-icon-add20 class=\"bx--btn__icon\"></ibm-icon-add20>\n\t\t\t\t\t</button>\n\t\t\t\t</ibm-table-toolbar-content>\n\t\t\t</ibm-table-toolbar>\n\n\t\t\t<app-table\n\t\t\t\t[model]=\"model\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[showSelectionColumn]=\"showSelectionColumn\"\n\t\t\t\t[striped]=\"striped\"\n\t\t\t\t[sortable]=\"sortable\"\n\t\t\t\t[isDataGrid]=\"isDataGrid\">\n\t\t\t</app-table>\n\t\t</ibm-table-container>\n\t`,\n props: {\n model: simpleModel,\n size: select('size', { Small: 'sm', Normal: 'md', Large: 'lg' }, 'md'),\n title: text('Title', 'Table title'),\n description: text('Description', 'With toolbar'),\n showSelectionColumn: boolean('showSelectionColumn', true),\n striped: boolean('striped', false),\n sortable: boolean('sortable', true),\n isDataGrid: boolean('Data grid keyboard interactions', false),\n },\n }))\n .add('With expansion', () => ({\n template: `\n\t\t<ibm-table-container>\n\t\t\t<ibm-table-header>\n\t\t\t\t<h4 ibmTableHeaderTitle>{{title}}</h4>\n\t\t\t\t<p ibmTableHeaderDescription>{{description}}</p>\n\t\t\t</ibm-table-header>\n\t\t\t<app-expansion-table\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[showSelectionColumn]=\"showSelectionColumn\"\n\t\t\t\t[striped]=\"striped\"\n\t\t\t\t[isDataGrid]=\"isDataGrid\">\n\t\t\t</app-expansion-table>\n\t\t</ibm-table-container>\n\t\t`,\n props: {\n size: select('size', { Small: 'sm', Normal: 'md', Large: 'lg' }, 'md'),\n title: text('Title', 'Table title'),\n description: text('Description', 'With expansion'),\n showSelectionColumn: boolean('showSelectionColumn', true),\n striped: boolean('striped', false),\n isDataGrid: boolean('Data grid keyboard interactions', false),\n },\n }))\n .add('With dynamic content', () => ({\n template: `\n\t\t<ibm-table-container>\n\t\t\t<ibm-table-header>\n\t\t\t\t<h4 ibmTableHeaderTitle>{{title}}</h4>\n\t\t\t\t<p ibmTableHeaderDescription>{{description}}</p>\n\t\t\t</ibm-table-header>\n\t\t\t<app-custom-table\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[showSelectionColumn]=\"showSelectionColumn\"\n\t\t\t\t[striped]=\"striped\"\n\t\t\t\t[isDataGrid]=\"isDataGrid\">\n\t\t\t</app-custom-table>\n\t\t</ibm-table-container>\n\t\t`,\n props: {\n size: select('size', { Small: 'sm', Normal: 'md', Large: 'lg' }, 'md'),\n title: text('Title', 'Table title'),\n description: text('Description', 'With dynamic content'),\n showSelectionColumn: boolean('showSelectionColumn', true),\n striped: boolean('striped', false),\n isDataGrid: boolean('Data grid keyboard interactions', false),\n },\n }))\n .add('With overflow menu', () => ({\n template: `\n\t\t<ibm-table-container>\n\t\t\t<ibm-table-header>\n\t\t\t\t<h4 ibmTableHeaderTitle>{{title}}</h4>\n\t\t\t\t<p ibmTableHeaderDescription>{{description}}</p>\n\t\t\t</ibm-table-header>\n\t\t\t<app-overflow-table\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[showSelectionColumn]=\"showSelectionColumn\"\n\t\t\t\t[striped]=\"striped\"\n\t\t\t\t[isDataGrid]=\"isDataGrid\">\n\t\t\t</app-overflow-table>\n\t\t</ibm-table-container>\n\t\t`,\n props: {\n size: select('size', { Small: 'sm', Normal: 'md', Large: 'lg' }, 'md'),\n title: text('Title', 'Table title'),\n description: text('Description', 'With overflow menu'),\n showSelectionColumn: boolean('showSelectionColumn', true),\n striped: boolean('striped', false),\n isDataGrid: boolean('Data grid keyboard interactions', false),\n },\n }))\n .add('With pagination', () => ({\n template: `\n\t\t<ibm-table-container>\n\t\t\t<ibm-table-header>\n\t\t\t\t<h4 ibmTableHeaderTitle>{{title}}</h4>\n\t\t\t\t<p ibmTableHeaderDescription>{{description}}</p>\n\t\t\t</ibm-table-header>\n\t\t\t<app-pagination-table [totalDataLength]=\"totalDataLength\" [model]=\"model\"></app-pagination-table>\n\t\t</ibm-table-container>\n\t\t`,\n props: {\n model: simpleModel,\n totalDataLength: number('totalDataLength', 105),\n title: text('Title', 'Table title'),\n description: text('Description', 'With pagination'),\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t\t<app-skeleton-table\n\t\t\t\t[skeletonModel]=\"skeletonModel\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[striped]=\"striped\">\n\t\t\t</app-skeleton-table>\n\t`,\n props: {\n size: select('size', { Small: 'sm', Normal: 'md', Large: 'lg' }, 'md'),\n striped: boolean('striped', false),\n },\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/Table.html\"></ibm-documentation>\n\t\t`,\n }));\n";
18978
+ var __STORY__ = "import { PaginationModule } from './../pagination/pagination.module';\nimport { TemplateRef, Component, ViewChild, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { withKnobs, boolean, select, number, text } from '@storybook/addon-knobs/angular';\n\nimport {\n Table,\n TableModule,\n TableModel,\n TableItem,\n TableHeaderItem,\n NFormsModule,\n DialogModule,\n SearchModule,\n ButtonModule,\n DocumentationModule,\n} from '../';\n\nimport { Settings16Module } from '@carbon/icons-angular/lib/settings/16';\nimport { Delete16Module } from '@carbon/icons-angular/lib/delete/16';\nimport { Save16Module } from '@carbon/icons-angular/lib/save/16';\nimport { Download16Module } from '@carbon/icons-angular/lib/download/16';\nimport { Add20Module } from '@carbon/icons-angular/lib/add/20';\n\nimport { clone } from '../utils/utils';\n\n@Component({\n selector: 'app-table',\n template: `\n <ibm-table\n style=\"display: block; width: 650px;\"\n [model]=\"model\"\n [size]=\"size\"\n [showSelectionColumn]=\"showSelectionColumn\"\n [striped]=\"striped\"\n [isDataGrid]=\"isDataGrid\"\n (sort)=\"simpleSort($event)\"\n >\n <ng-content></ng-content>\n </ibm-table>\n `,\n})\nclass TableStory implements OnInit, OnChanges {\n @Input() model = new TableModel();\n @Input() size = 'md';\n @Input() showSelectionColumn = true;\n @Input() striped = true;\n @Input() sortable = true;\n @Input() isDataGrid = false;\n\n ngOnInit() {\n this.model.header = [\n new TableHeaderItem({\n data: 'Name',\n }),\n new TableHeaderItem({\n data: 'hwer',\n className: 'my-class',\n }),\n ];\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.sortable) {\n for (let column of this.model.header) {\n column.sortable = changes.sortable.currentValue;\n }\n }\n }\n\n simpleSort(index: number) {\n sort(simpleModel, index);\n }\n}\n\n@Component({\n selector: 'app-custom-table',\n template: `\n <ibm-table-toolbar [model]=\"model\">\n <button ibmButton=\"primary\" (click)=\"addRow()\">Add row</button>\n <button ibmButton=\"primary\" (click)=\"addColumn()\">Add column</button>\n </ibm-table-toolbar>\n\n <ng-template #customTableItemTemplate let-data=\"data\">\n <a [attr.href]=\"data.link\">{{ data.name }} {{ data.surname }}</a>\n </ng-template>\n <ng-template #customHeaderTemplate let-data=\"data\">\n <i\n ><a [attr.href]=\"data.link\">{{ data.name }}</a></i\n >\n </ng-template>\n\n <ibm-table\n style=\"display: block; width: 650px;\"\n [model]=\"model\"\n [size]=\"size\"\n [showSelectionColumn]=\"showSelectionColumn\"\n [striped]=\"striped\"\n [isDataGrid]=\"isDataGrid\"\n (sort)=\"customSort($event)\"\n >\n </ibm-table>\n `,\n})\nclass DynamicTableStory implements OnInit {\n @Input() model = new TableModel();\n @Input() size = 'md';\n @Input() showSelectionColumn = true;\n @Input() striped = true;\n @Input() isDataGrid = false;\n\n @ViewChild('customHeaderTemplate')\n protected customHeaderTemplate: TemplateRef<any>;\n @ViewChild('customTableItemTemplate')\n protected customTableItemTemplate: TemplateRef<any>;\n\n ngOnInit() {\n this.model.data = [\n [\n new TableItem({ data: 'Name 1' }),\n new TableItem({ data: { name: 'Lessy', link: '#' }, template: this.customTableItemTemplate }),\n ],\n [new TableItem({ data: 'Name 3' }), new TableItem({ data: 'swer' })],\n [\n new TableItem({ data: 'Name 2' }),\n new TableItem({ data: { name: 'Alice', surname: 'Bob' }, template: this.customTableItemTemplate }),\n ],\n [new TableItem({ data: 'Name 4' }), new TableItem({ data: 'twer' })],\n ];\n this.model.header = [\n new TableHeaderItem({ data: 'Very long title indeed' }),\n new CustomHeaderItem({\n data: { name: 'Custom header', link: '#' },\n template: this.customHeaderTemplate,\n style: { width: 'auto' },\n }),\n ];\n }\n\n customSort(index: number) {\n this.sort(this.model, index);\n }\n\n sort(model, index: number) {\n if (model.header[index].sorted) {\n // if already sorted flip sorting direction\n model.header[index].ascending = model.header[index].descending;\n }\n model.sort(index);\n }\n\n addRow() {\n const lastRowCopy = clone(this.model.row(this.model.data.length - 1));\n this.model.addRow(lastRowCopy);\n }\n\n addColumn() {\n let column = Array(this.model.data.length).fill(new TableItem({ data: `Column ${this.model.row(0).length}` }));\n this.model.addColumn(column);\n }\n}\n\n@Component({\n selector: 'app-expansion-table',\n template: `\n <ng-template #customTableItemTemplate let-data=\"data\">\n <a [attr.href]=\"data.link\">{{ data.name }} {{ data.surname }}</a>\n </ng-template>\n <ng-template #customHeaderTemplate let-data=\"data\">\n <i\n ><a [attr.href]=\"data.link\">{{ data.name }}</a></i\n >\n </ng-template>\n\n <ibm-table\n style=\"display: block; width: 650px;\"\n [model]=\"model\"\n [size]=\"size\"\n [showSelectionColumn]=\"showSelectionColumn\"\n [striped]=\"striped\"\n (sort)=\"customSort($event)\"\n [isDataGrid]=\"isDataGrid\"\n >\n </ibm-table>\n `,\n})\nclass ExpansionTableStory implements OnInit {\n @Input() model = new TableModel();\n @Input() size = 'md';\n @Input() showSelectionColumn = true;\n @Input() striped = true;\n @Input() isDataGrid = false;\n\n @ViewChild('customHeaderTemplate')\n protected customHeaderTemplate: TemplateRef<any>;\n @ViewChild('customTableItemTemplate')\n protected customTableItemTemplate: TemplateRef<any>;\n\n ngOnInit() {\n this.model.data = [\n [\n new TableItem({ data: 'Name 1', expandedData: 'No template' }),\n new TableItem({ data: { name: 'Lessy', link: '#' }, template: this.customTableItemTemplate }),\n ],\n [\n new TableItem({\n data: 'Name 3',\n expandedData: { name: 'In', surname: 'Template' },\n expandedTemplate: this.customTableItemTemplate,\n }),\n new TableItem({ data: 'swer' }),\n ],\n [\n new TableItem({ data: 'Name 2' }),\n new TableItem({ data: { name: 'Alice', surname: 'Bob' }, template: this.customTableItemTemplate }),\n ],\n [new TableItem({ data: 'Name 4' }), new TableItem({ data: 'twer' })],\n ];\n this.model.header = [\n new TableHeaderItem({ data: 'Very long title indeed' }),\n new CustomHeaderItem({\n data: { name: 'Custom header', link: '#' },\n template: this.customHeaderTemplate,\n style: { width: 'auto' },\n }),\n ];\n }\n\n customSort(index: number) {\n this.sort(this.model, index);\n }\n\n sort(model, index: number) {\n if (model.header[index].sorted) {\n // if already sorted flip sorting direction\n model.header[index].ascending = model.header[index].descending;\n }\n model.sort(index);\n }\n}\n\n@Component({\n selector: 'app-overflow-table',\n template: `\n <ng-template #overflowMenuItemTemplate let-data=\"data\">\n <ibm-overflow-menu>\n <ibm-overflow-menu-option>\n First Option\n </ibm-overflow-menu-option>\n <ibm-overflow-menu-option>\n Second Option\n </ibm-overflow-menu-option>\n <ibm-overflow-menu-option>\n Third Option\n </ibm-overflow-menu-option>\n </ibm-overflow-menu>\n </ng-template>\n\n <ibm-table\n style=\"display: block; width: 650px;\"\n [model]=\"model\"\n [size]=\"size\"\n [showSelectionColumn]=\"showSelectionColumn\"\n [isDataGrid]=\"isDataGrid\"\n [striped]=\"striped\"\n >\n </ibm-table>\n `,\n})\nclass OverflowTableStory implements OnInit {\n @Input() model = new TableModel();\n @Input() size = 'md';\n @Input() showSelectionColumn = true;\n @Input() striped = true;\n @Input() isDataGrid = false;\n\n @ViewChild('overflowMenuItemTemplate')\n protected overflowMenuItemTemplate: TemplateRef<any>;\n\n ngOnInit() {\n this.model.data = [\n [\n new TableItem({ data: 'Name 1' }),\n new TableItem({ data: { id: '1' }, template: this.overflowMenuItemTemplate }),\n ],\n [\n new TableItem({ data: 'Name 2' }),\n new TableItem({ data: { id: '2' }, template: this.overflowMenuItemTemplate }),\n ],\n [\n new TableItem({ data: 'Name 3' }),\n new TableItem({ data: { id: '3' }, template: this.overflowMenuItemTemplate }),\n ],\n [\n new TableItem({ data: 'Name 4' }),\n new TableItem({ data: { id: '4' }, template: this.overflowMenuItemTemplate }),\n ],\n ];\n this.model.header = [new TableHeaderItem({ data: 'Name' }), new TableHeaderItem({ data: 'Actions' })];\n }\n}\n\n@Component({\n selector: 'app-pagination-table',\n template: `\n <ng-template #paginationTableItemTemplate let-data=\"data\">\n <a [attr.href]=\"data.link\">{{ data.name }} {{ data.surname }}</a>\n </ng-template>\n <ng-template #filterableHeaderTemplate let-data=\"data\">\n <i\n ><a [attr.href]=\"data.link\">{{ data.name }}</a></i\n >\n </ng-template>\n <ng-template #filter let-popover=\"popover\" let-filter=\"data\">\n <ibm-label class=\"first-label\">\n Value\n <input type=\"text\" [(ngModel)]=\"filter1\" class=\"input-field\" />\n <button class=\"btn--primary\" (click)=\"filter.data = filter1; popover.doClose()\">Apply</button>\n <button class=\"btn--secondary\" (click)=\"popover.doClose()\">Cancel</button>\n </ibm-label>\n </ng-template>\n\n <ibm-table style=\"display: block; width: 650px;\" [model]=\"model\" (sort)=\"paginationSort($event)\"></ibm-table>\n <ibm-pagination [model]=\"model\" (selectPage)=\"selectPage($event)\"></ibm-pagination>\n `,\n})\nclass PaginationTableStory implements OnInit {\n @Input() model = new TableModel();\n\n @Input() get totalDataLength() {\n return this.model.totalDataLength;\n }\n set totalDataLength(value) {\n this.model.totalDataLength = value;\n }\n\n @ViewChild('filter')\n filter: TemplateRef<any>;\n @ViewChild('filterableHeaderTemplate')\n protected filterableHeaderTemplate: TemplateRef<any>;\n @ViewChild('paginationTableItemTemplate')\n protected paginationTableItemTemplate: TemplateRef<any>;\n\n ngOnInit() {\n this.model.data = [[]];\n this.model.header = [\n new TableHeaderItem({ data: 'Very long title indeed' }),\n new TableHeaderItem({\n data: 'Very long title indeed',\n style: { width: 'auto' },\n }),\n ];\n\n this.model.pageLength = 10;\n this.model.totalDataLength = 105;\n this.selectPage(1);\n }\n\n customSort(index: number) {\n this.sort(this.model, index);\n }\n\n sort(model, index: number) {\n if (model.header[index].sorted) {\n // if already sorted flip sorting direction\n model.header[index].ascending = model.header[index].descending;\n }\n model.sort(index);\n }\n\n getPage(page: number) {\n const line = line => [`Item ${line}:1!`, { name: 'Item', surname: `${line}:2` }];\n\n const fullPage = [];\n\n for (\n let i = (page - 1) * this.model.pageLength;\n i < page * this.model.pageLength && i < this.model.totalDataLength;\n i++\n ) {\n fullPage.push(line(i + 1));\n }\n\n return new Promise(resolve => {\n setTimeout(() => resolve(fullPage), 150);\n });\n }\n\n selectPage(page) {\n this.getPage(page).then((data: Array<Array<any>>) => {\n // set the data and update page\n this.model.data = this.prepareData(data);\n this.model.currentPage = page;\n });\n }\n\n protected prepareData(data: Array<Array<any>>) {\n // create new data from the service data\n let newData = [];\n data.forEach(dataRow => {\n let row = [];\n dataRow.forEach(dataElement => {\n row.push(\n new TableItem({\n data: dataElement,\n template: typeof dataElement === 'string' ? undefined : this.paginationTableItemTemplate,\n // your template can handle all the data types so you don't have to conditionally set it\n // you can also set different templates for different columns based on index\n })\n );\n });\n newData.push(row);\n });\n return newData;\n }\n}\n\nclass CustomHeaderItem extends TableHeaderItem {\n // used for custom sorting\n compare(one: TableItem, two: TableItem) {\n const stringOne = (one.data.name || one.data.surname || one.data).toLowerCase();\n const stringTwo = (two.data.name || two.data.surname || two.data).toLowerCase();\n\n if (stringOne > stringTwo) {\n return 1;\n } else if (stringOne < stringTwo) {\n return -1;\n } else {\n return 0;\n }\n }\n}\n\nconst simpleModel = new TableModel();\nsimpleModel.data = [\n [new TableItem({ data: 'Name 1' }), new TableItem({ data: 'qwer' })],\n [new TableItem({ data: 'Name 3' }), new TableItem({ data: 'zwer' })],\n [new TableItem({ data: 'Name 2' }), new TableItem({ data: 'swer' })],\n [new TableItem({ data: 'Name 4' }), new TableItem({ data: 'twer' })],\n];\nsimpleModel.header = [new TableHeaderItem({ data: 'Name' }), new TableHeaderItem({ data: 'hwer' })];\n\nconst emptyModel = new TableModel();\nemptyModel.header = [\n new TableHeaderItem({ data: 'Name' }),\n new TableHeaderItem({ data: 'hwer', style: { width: 'auto' } }),\n];\n\nfunction sort(model, index: number) {\n if (model.header[index].sorted) {\n // if already sorted flip sorting direction\n model.header[index].ascending = model.header[index].descending;\n }\n model.sort(index);\n}\n\n@Component({\n selector: 'app-skeleton-table',\n template: `\n <ibm-table\n style=\"display: block; width: 800px;\"\n [model]=\"skeletonModel\"\n [skeleton]=\"skeleton\"\n [size]=\"size\"\n [striped]=\"striped\"\n >\n <ng-content></ng-content>\n </ibm-table>\n `,\n})\nclass SkeletonTableStory implements OnInit, OnChanges {\n @Input() size = 'md';\n @Input() striped = false;\n @Input() skeleton = true;\n @Input() skeletonModel = new TableModel();\n\n ngOnInit() {\n // Creates an empty table with 5 rows and 5 columns\n this.skeletonModel = Table.skeletonModel(5, 5);\n }\n}\n\nstoriesOf('Table', module)\n .addDecorator(\n moduleMetadata({\n imports: [\n NFormsModule,\n TableModule,\n DialogModule,\n PaginationModule,\n SearchModule,\n ButtonModule,\n Settings16Module,\n Delete16Module,\n Save16Module,\n Download16Module,\n Add20Module,\n DocumentationModule,\n ],\n declarations: [\n TableStory,\n DynamicTableStory,\n ExpansionTableStory,\n OverflowTableStory,\n PaginationTableStory,\n SkeletonTableStory,\n ],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t<ibm-table-container>\n\t\t\t<ibm-table-header>\n\t\t\t\t<h4 ibmTableHeaderTitle>{{title}}</h4>\n\t\t\t\t<p ibmTableHeaderDescription>{{description}}</p>\n\t\t\t</ibm-table-header>\n\t\t\t<app-table\n\t\t\t\t[model]=\"model\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[showSelectionColumn]=\"showSelectionColumn\"\n\t\t\t\t[striped]=\"striped\"\n\t\t\t\t[sortable]=\"sortable\"\n\t\t\t\t[isDataGrid]=\"isDataGrid\">\n\t\t\t</app-table>\n\t\t</ibm-table-container>\n\t`,\n props: {\n model: simpleModel,\n size: select('size', { Small: 'sm', Normal: 'md', Large: 'lg' }, 'md'),\n title: text('Title', 'Table title'),\n description: text('Description', ''),\n showSelectionColumn: boolean('showSelectionColumn', true),\n striped: boolean('striped', false),\n sortable: boolean('sortable', true),\n isDataGrid: boolean('Data grid keyboard interactions', false),\n },\n }))\n .add('With no data', () => ({\n template: `\n\t\t<ibm-table-container>\n\t\t\t<ibm-table-header>\n\t\t\t\t<h4 ibmTableHeaderTitle>{{title}}</h4>\n\t\t\t\t<p ibmTableHeaderDescription>{{description}}</p>\n\t\t\t</ibm-table-header>\n\t\t\t<app-table\n\t\t\t\t[model]=\"model\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[showSelectionColumn]=\"showSelectionColumn\"\n\t\t\t\t[striped]=\"striped\">\n\t\t\t\t<tbody><tr><td class=\"no-data\" colspan=\"3\"><div>No data.</div></td></tr></tbody>\n\t\t\t</app-table>\n\t\t</ibm-table-container>\n\t\t`,\n styles: [\n `\n\t\t\t.no-data {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 150px;\n\t\t\t\ttext-align: center;\n\t\t\t}\n\t\t`,\n ],\n props: {\n model: emptyModel,\n size: select('size', { Small: 'sm', Normal: 'md', Large: 'lg' }, 'md'),\n title: text('Title', 'Table title'),\n description: text('Description', 'With no data'),\n showSelectionColumn: boolean('showSelectionColumn', true),\n striped: boolean('striped', false),\n },\n }))\n .add('With toolbar', () => ({\n template: `\n\t\t<ibm-table-container>\n\t\t\t<ibm-table-header>\n\t\t\t\t<h4 ibmTableHeaderTitle>{{title}}</h4>\n\t\t\t\t<p ibmTableHeaderDescription>{{description}}</p>\n\t\t\t</ibm-table-header>\n\t\t\t<ibm-table-toolbar [model]=\"model\">\n\t\t\t\t<ibm-table-toolbar-actions>\n\t\t\t\t\t<button ibmButton=\"primary\">\n\t\t\t\t\t\tDelete\n\t\t\t\t\t\t<ibm-icon-delete16 class=\"bx--btn__icon\"></ibm-icon-delete16>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button ibmButton=\"primary\">\n\t\t\t\t\t\tSave\n\t\t\t\t\t\t<ibm-icon-save16 class=\"bx--btn__icon\"></ibm-icon-save16>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button ibmButton=\"primary\">\n\t\t\t\t\t\tDownload\n\t\t\t\t\t\t<ibm-icon-download16 class=\"bx--btn__icon\"></ibm-icon-download16>\n\t\t\t\t\t</button>\n\t\t\t\t</ibm-table-toolbar-actions>\n\t\t\t\t\t<ibm-table-toolbar-content>\n\t\t\t\t\t<ibm-table-toolbar-search [expandable]=\"true\"></ibm-table-toolbar-search>\n\t\t\t\t\t<button ibmButton=\"toolbar-action\">\n\t\t\t\t\t\t<ibm-icon-settings16 class=\"bx--toolbar-action__icon\"></ibm-icon-settings16>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button ibmButton=\"primary\" size=\"sm\">\n\t\t\t\t\t\tPrimary Button\n\t\t\t\t\t\t<ibm-icon-add20 class=\"bx--btn__icon\"></ibm-icon-add20>\n\t\t\t\t\t</button>\n\t\t\t\t</ibm-table-toolbar-content>\n\t\t\t</ibm-table-toolbar>\n\n\t\t\t<app-table\n\t\t\t\t[model]=\"model\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[showSelectionColumn]=\"showSelectionColumn\"\n\t\t\t\t[striped]=\"striped\"\n\t\t\t\t[sortable]=\"sortable\"\n\t\t\t\t[isDataGrid]=\"isDataGrid\">\n\t\t\t</app-table>\n\t\t</ibm-table-container>\n\t`,\n props: {\n model: simpleModel,\n size: select('size', { Small: 'sm', Normal: 'md', Large: 'lg' }, 'md'),\n title: text('Title', 'Table title'),\n description: text('Description', 'With toolbar'),\n showSelectionColumn: boolean('showSelectionColumn', true),\n striped: boolean('striped', false),\n sortable: boolean('sortable', true),\n isDataGrid: boolean('Data grid keyboard interactions', false),\n },\n }))\n .add('With expansion', () => ({\n template: `\n\t\t<ibm-table-container>\n\t\t\t<ibm-table-header>\n\t\t\t\t<h4 ibmTableHeaderTitle>{{title}}</h4>\n\t\t\t\t<p ibmTableHeaderDescription>{{description}}</p>\n\t\t\t</ibm-table-header>\n\t\t\t<app-expansion-table\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[showSelectionColumn]=\"showSelectionColumn\"\n\t\t\t\t[striped]=\"striped\"\n\t\t\t\t[isDataGrid]=\"isDataGrid\">\n\t\t\t</app-expansion-table>\n\t\t</ibm-table-container>\n\t\t`,\n props: {\n size: select('size', { Small: 'sm', Normal: 'md', Large: 'lg' }, 'md'),\n title: text('Title', 'Table title'),\n description: text('Description', 'With expansion'),\n showSelectionColumn: boolean('showSelectionColumn', true),\n striped: boolean('striped', false),\n isDataGrid: boolean('Data grid keyboard interactions', false),\n },\n }))\n .add('With dynamic content', () => ({\n template: `\n\t\t<ibm-table-container>\n\t\t\t<ibm-table-header>\n\t\t\t\t<h4 ibmTableHeaderTitle>{{title}}</h4>\n\t\t\t\t<p ibmTableHeaderDescription>{{description}}</p>\n\t\t\t</ibm-table-header>\n\t\t\t<app-custom-table\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[showSelectionColumn]=\"showSelectionColumn\"\n\t\t\t\t[striped]=\"striped\"\n\t\t\t\t[isDataGrid]=\"isDataGrid\">\n\t\t\t</app-custom-table>\n\t\t</ibm-table-container>\n\t\t`,\n props: {\n size: select('size', { Small: 'sm', Normal: 'md', Large: 'lg' }, 'md'),\n title: text('Title', 'Table title'),\n description: text('Description', 'With dynamic content'),\n showSelectionColumn: boolean('showSelectionColumn', true),\n striped: boolean('striped', false),\n isDataGrid: boolean('Data grid keyboard interactions', false),\n },\n }))\n .add('With overflow menu', () => ({\n template: `\n\t\t<ibm-table-container>\n\t\t\t<ibm-table-header>\n\t\t\t\t<h4 ibmTableHeaderTitle>{{title}}</h4>\n\t\t\t\t<p ibmTableHeaderDescription>{{description}}</p>\n\t\t\t</ibm-table-header>\n\t\t\t<app-overflow-table\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[showSelectionColumn]=\"showSelectionColumn\"\n\t\t\t\t[striped]=\"striped\"\n\t\t\t\t[isDataGrid]=\"isDataGrid\">\n\t\t\t</app-overflow-table>\n\t\t</ibm-table-container>\n\t\t`,\n props: {\n size: select('size', { Small: 'sm', Normal: 'md', Large: 'lg' }, 'md'),\n title: text('Title', 'Table title'),\n description: text('Description', 'With overflow menu'),\n showSelectionColumn: boolean('showSelectionColumn', true),\n striped: boolean('striped', false),\n isDataGrid: boolean('Data grid keyboard interactions', false),\n },\n }))\n .add('With pagination', () => ({\n template: `\n\t\t<ibm-table-container>\n\t\t\t<ibm-table-header>\n\t\t\t\t<h4 ibmTableHeaderTitle>{{title}}</h4>\n\t\t\t\t<p ibmTableHeaderDescription>{{description}}</p>\n\t\t\t</ibm-table-header>\n\t\t\t<app-pagination-table [totalDataLength]=\"totalDataLength\" [model]=\"model\"></app-pagination-table>\n\t\t</ibm-table-container>\n\t\t`,\n props: {\n model: simpleModel,\n totalDataLength: number('totalDataLength', 105),\n title: text('Title', 'Table title'),\n description: text('Description', 'With pagination'),\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t\t<app-skeleton-table\n\t\t\t\t[skeletonModel]=\"skeletonModel\"\n\t\t\t\t[size]=\"size\"\n\t\t\t\t[striped]=\"striped\">\n\t\t\t</app-skeleton-table>\n\t`,\n props: {\n size: select('size', { Small: 'sm', Normal: 'md', Large: 'lg' }, 'md'),\n striped: boolean('striped', false),\n },\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/Table.html\"></ibm-documentation>\n\t\t`,\n }));\n";
18899
18979
  var __ADDS_MAP__ = { "table--documentation": { "startLoc": { "col": 7, "line": 730 }, "endLoc": { "col": 4, "line": 734 } }, "table--skeleton": { "startLoc": { "col": 7, "line": 717 }, "endLoc": { "col": 4, "line": 729 } }, "table--with-pagination": { "startLoc": { "col": 7, "line": 700 }, "endLoc": { "col": 4, "line": 716 } }, "table--with-overflow-menu": { "startLoc": { "col": 7, "line": 676 }, "endLoc": { "col": 4, "line": 699 } }, "table--with-dynamic-content": { "startLoc": { "col": 7, "line": 652 }, "endLoc": { "col": 4, "line": 675 } }, "table--with-expansion": { "startLoc": { "col": 7, "line": 628 }, "endLoc": { "col": 4, "line": 651 } }, "table--with-toolbar": { "startLoc": { "col": 7, "line": 573 }, "endLoc": { "col": 4, "line": 627 } }, "table--with-no-data": { "startLoc": { "col": 7, "line": 539 }, "endLoc": { "col": 4, "line": 572 } }, "table--basic": { "startLoc": { "col": 7, "line": 511 }, "endLoc": { "col": 4, "line": 538 } } };
18900
18980
 
18901
18981
 
@@ -18981,7 +19061,7 @@ var DynamicTableStory = /** @class */ (function () {
18981
19061
  }
18982
19062
  DynamicTableStory.prototype.ngOnInit = function () {
18983
19063
  this.model.data = [
18984
- [new ___WEBPACK_IMPORTED_MODULE_4__["TableItem"]({ data: "Name 1" }), new ___WEBPACK_IMPORTED_MODULE_4__["TableItem"]({ data: { name: "Lessy", link: "/table" }, template: this.customTableItemTemplate })],
19064
+ [new ___WEBPACK_IMPORTED_MODULE_4__["TableItem"]({ data: "Name 1" }), new ___WEBPACK_IMPORTED_MODULE_4__["TableItem"]({ data: { name: "Lessy", link: "#" }, template: this.customTableItemTemplate })],
18985
19065
  [new ___WEBPACK_IMPORTED_MODULE_4__["TableItem"]({ data: "Name 3" }), new ___WEBPACK_IMPORTED_MODULE_4__["TableItem"]({ data: "swer" })],
18986
19066
  [new ___WEBPACK_IMPORTED_MODULE_4__["TableItem"]({ data: "Name 2" }), new ___WEBPACK_IMPORTED_MODULE_4__["TableItem"]({ data: { name: "Alice", surname: "Bob" }, template: this.customTableItemTemplate })],
18987
19067
  [new ___WEBPACK_IMPORTED_MODULE_4__["TableItem"]({ data: "Name 4" }), new ___WEBPACK_IMPORTED_MODULE_4__["TableItem"]({ data: "twer" })]
@@ -18989,7 +19069,7 @@ var DynamicTableStory = /** @class */ (function () {
18989
19069
  this.model.header = [
18990
19070
  new ___WEBPACK_IMPORTED_MODULE_4__["TableHeaderItem"]({ data: "Very long title indeed" }),
18991
19071
  new CustomHeaderItem({
18992
- data: { name: "Custom header", link: "/table" },
19072
+ data: { name: "Custom header", link: "#" },
18993
19073
  template: this.customHeaderTemplate,
18994
19074
  style: { "width": "auto" }
18995
19075
  })
@@ -21384,6 +21464,10 @@ var TimePickerSelect = /** @class */ (function (_super) {
21384
21464
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
21385
21465
  __metadata("design:type", String)
21386
21466
  ], TimePickerSelect.prototype, "theme", void 0);
21467
+ __decorate([
21468
+ Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
21469
+ __metadata("design:type", String)
21470
+ ], TimePickerSelect.prototype, "label", void 0);
21387
21471
  __decorate([
21388
21472
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["HostBinding"])("class.bx--skeleton"),
21389
21473
  __metadata("design:type", Object)
@@ -21556,7 +21640,10 @@ var TimePicker = /** @class */ (function () {
21556
21640
  TimePicker.prototype.onChange = function (event) {
21557
21641
  this.valueChange.emit(event.target.value);
21558
21642
  };
21559
- var TimePicker_1, _a;
21643
+ TimePicker.prototype.isTemplate = function (value) {
21644
+ return value instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"];
21645
+ };
21646
+ var TimePicker_1, _a, _b;
21560
21647
  /**
21561
21648
  * Tracks the total number of selects instantiated. Used to generate unique IDs
21562
21649
  */
@@ -21599,12 +21686,12 @@ var TimePicker = /** @class */ (function () {
21599
21686
  ], TimePicker.prototype, "theme", void 0);
21600
21687
  __decorate([
21601
21688
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
21602
- __metadata("design:type", typeof (_a = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _a || Object)
21689
+ __metadata("design:type", typeof (_b = typeof _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]) === "function" && _b || Object)
21603
21690
  ], TimePicker.prototype, "valueChange", void 0);
21604
21691
  TimePicker = TimePicker_1 = __decorate([
21605
21692
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
21606
21693
  selector: "ibm-timepicker",
21607
- template: "\n\t\t\t<div class=\"bx--time-picker__input\">\n\t\t\t\t<label *ngIf=\"!skeleton\" [attr.for]=\"id\" class=\"bx--label\">{{label}}</label>\n\t\t\t\t<input\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'bx--text-input--light': theme === 'light',\n\t\t\t\t\t\t'bx--skeleton': skeleton\n\t\t\t\t\t}\"\n\t\t\t\t\t[value]=\"value\"\n\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t[pattern]=\"pattern\"\n\t\t\t\t\t[attr.id]=\"id\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\tmaxlength=\"5\"\n\t\t\t\t\t(change)=\"onChange($event)\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tclass=\"bx--time-picker__input-field bx--text-input\">\n\t\t\t</div>\n\t\t\t<ng-content></ng-content>\n\t"
21694
+ template: "\n\t\t\t<div class=\"bx--time-picker__input\">\n\t\t\t\t<label *ngIf=\"!skeleton\" [for]=\"id\" class=\"bx--label\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t\t\t</label>\n\t\t\t\t<input\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'bx--text-input--light': theme === 'light',\n\t\t\t\t\t\t'bx--skeleton': skeleton\n\t\t\t\t\t}\"\n\t\t\t\t\t[value]=\"value\"\n\t\t\t\t\t[placeholder]=\"placeholder\"\n\t\t\t\t\t[pattern]=\"pattern\"\n\t\t\t\t\t[attr.id]=\"id\"\n\t\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t\tmaxlength=\"5\"\n\t\t\t\t\t(change)=\"onChange($event)\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tclass=\"bx--time-picker__input-field bx--text-input\">\n\t\t\t</div>\n\t\t\t<ng-content></ng-content>\n\t"
21608
21695
  })
21609
21696
  ], TimePicker);
21610
21697
  return TimePicker;
@@ -21860,7 +21947,10 @@ var Toggle = /** @class */ (function (_super) {
21860
21947
  this.propagateChange(this.checked);
21861
21948
  this.change.emit(event);
21862
21949
  };
21863
- var Toggle_1, _a, _b;
21950
+ Toggle.prototype.isTemplate = function (value) {
21951
+ return value instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__["TemplateRef"];
21952
+ };
21953
+ var Toggle_1, _a, _b, _c;
21864
21954
  /**
21865
21955
  * Variable used for creating unique ids for toggle components.
21866
21956
  */
@@ -21877,7 +21967,7 @@ var Toggle = /** @class */ (function (_super) {
21877
21967
  ], Toggle.prototype, "onText", null);
21878
21968
  __decorate([
21879
21969
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
21880
- __metadata("design:type", String)
21970
+ __metadata("design:type", Object)
21881
21971
  ], Toggle.prototype, "label", void 0);
21882
21972
  __decorate([
21883
21973
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
@@ -21894,7 +21984,7 @@ var Toggle = /** @class */ (function (_super) {
21894
21984
  Toggle = Toggle_1 = __decorate([
21895
21985
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
21896
21986
  selector: "ibm-toggle",
21897
- template: "\n\t\t<div *ngIf=\"label\" class=\"bx--label\" [id]=\"ariaLabelledby\">{{label}}</div>\n\t\t<input\n\t\t\tclass=\"bx--toggle\"\n\t\t\ttype=\"checkbox\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'bx--toggle--small': size === 'sm',\n\t\t\t\t'bx--skeleton': skeleton\n\t\t\t}\"\n\t\t\t[id]=\"id\"\n\t\t\t[value]=\"value\"\n\t\t\t[name]=\"name\"\n\t\t\t[required]=\"required\"\n\t\t\t[checked]=\"checked\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[attr.aria-labelledby]=\"ariaLabelledby\"\n\t\t\t[attr.aria-checked]=\"checked\"\n\t\t\t(change)=\"onChange($event)\"\n\t\t\t(click)=\"onClick($event)\">\n\t\t<label\n\t\t\tclass=\"bx--toggle__label\"\n\t\t\t[for]=\"id\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'bx--skeleton': skeleton\n\t\t\t}\">\n\t\t\t<span class=\"bx--toggle__text--left\">{{(!skeleton ? offText : null) | async }}</span>\n\t\t\t<span class=\"bx--toggle__appearance\">\n\t\t\t\t<svg *ngIf=\"size === 'sm'\" class=\"bx--toggle__check\" width=\"6px\" height=\"5px\" viewBox=\"0 0 6 5\">\n\t\t\t\t\t<path d=\"M2.2 2.7L5 0 6 1 2.2 5 0 2.7 1 1.5z\"/>\n\t\t\t\t</svg>\n\t\t\t</span>\n\t\t\t<span class=\"bx--toggle__text--right\">{{(!skeleton ? onText : null) | async}}</span>\n\t\t</label>\n\t",
21987
+ template: "\n\t\t<label *ngIf=\"label\" [id]=\"ariaLabelledby\" class=\"bx--label\">\n\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t</label>\n\t\t<input\n\t\t\tclass=\"bx--toggle\"\n\t\t\ttype=\"checkbox\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'bx--toggle--small': size === 'sm',\n\t\t\t\t'bx--skeleton': skeleton\n\t\t\t}\"\n\t\t\t[id]=\"id\"\n\t\t\t[value]=\"value\"\n\t\t\t[name]=\"name\"\n\t\t\t[required]=\"required\"\n\t\t\t[checked]=\"checked\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[attr.aria-labelledby]=\"ariaLabelledby\"\n\t\t\t[attr.aria-checked]=\"checked\"\n\t\t\t(change)=\"onChange($event)\"\n\t\t\t(click)=\"onClick($event)\">\n\t\t<label\n\t\t\tclass=\"bx--toggle__label\"\n\t\t\t[for]=\"id\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'bx--skeleton': skeleton\n\t\t\t}\">\n\t\t\t<span class=\"bx--toggle__text--left\">{{(!skeleton ? offText : null) | async }}</span>\n\t\t\t<span class=\"bx--toggle__appearance\">\n\t\t\t\t<svg *ngIf=\"size === 'sm'\" class=\"bx--toggle__check\" width=\"6px\" height=\"5px\" viewBox=\"0 0 6 5\">\n\t\t\t\t\t<path d=\"M2.2 2.7L5 0 6 1 2.2 5 0 2.7 1 1.5z\"/>\n\t\t\t\t</svg>\n\t\t\t</span>\n\t\t\t<span class=\"bx--toggle__text--right\">{{(!skeleton ? onText : null) | async}}</span>\n\t\t</label>\n\t",
21898
21988
  providers: [
21899
21989
  {
21900
21990
  provide: _angular_forms__WEBPACK_IMPORTED_MODULE_2__["NG_VALUE_ACCESSOR"],
@@ -21903,7 +21993,7 @@ var Toggle = /** @class */ (function (_super) {
21903
21993
  }
21904
21994
  ]
21905
21995
  }),
21906
- __metadata("design:paramtypes", [typeof (_a = typeof _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]) === "function" && _a || Object, typeof (_b = typeof _i18n_i18n_module__WEBPACK_IMPORTED_MODULE_3__["I18n"] !== "undefined" && _i18n_i18n_module__WEBPACK_IMPORTED_MODULE_3__["I18n"]) === "function" && _b || Object])
21996
+ __metadata("design:paramtypes", [typeof (_b = typeof _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"] !== "undefined" && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]) === "function" && _b || Object, typeof (_c = typeof _i18n_i18n_module__WEBPACK_IMPORTED_MODULE_3__["I18n"] !== "undefined" && _i18n_i18n_module__WEBPACK_IMPORTED_MODULE_3__["I18n"]) === "function" && _c || Object])
21907
21997
  ], Toggle);
21908
21998
  return Toggle;
21909
21999
  }(_checkbox_checkbox_component__WEBPACK_IMPORTED_MODULE_0__["Checkbox"]));
@@ -21987,7 +22077,7 @@ __webpack_require__.r(__webpack_exports__);
21987
22077
  /* harmony import */ var _storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__);
21988
22078
  /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ */ "./src/index.ts");
21989
22079
  var withStorySource = __webpack_require__(/*! @storybook/addon-storysource */ "./node_modules/@storybook/addon-storysource/dist/index.js").withStorySource;
21990
- var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { withKnobs, boolean, select, text } from '@storybook/addon-knobs/angular';\n\nimport { ToggleModule, DocumentationModule } from '../';\n\nstoriesOf('Toggle', module)\n .addDecorator(\n moduleMetadata({\n imports: [ToggleModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t\t<ibm-toggle\n\t\t\t\t[label]=\"labelText\"\n\t\t\t\t[onText]=\"onText\"\n\t\t\t\t[offText]=\"offText\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[checked]=\"checked\"\n\t\t\t\t[size]=\"size\">\n\t\t\t</ibm-toggle>\n\t\t`,\n props: {\n disabled: boolean('Disabled', false),\n checked: boolean('Checked', false),\n size: select('Size', ['md', 'sm'], 'md'),\n labelText: text('Label text', ''),\n onText: text('On text', 'On'),\n offText: text('Off text', 'Off'),\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t\t<ibm-toggle skeleton=\"true\"></ibm-toggle>\n\t\t\t&nbsp;\n\t\t\t<ibm-toggle skeleton=\"true\" size=\"sm\"></ibm-toggle>\n\t\t`,\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/Toggle.html\"></ibm-documentation>\n\t\t`,\n }));\n";
22080
+ var __STORY__ = "import { storiesOf, moduleMetadata } from '@storybook/angular';\nimport { withKnobs, boolean, select, text } from '@storybook/addon-knobs/angular';\n\nimport { ToggleModule, DocumentationModule } from '../';\n\nstoriesOf('Toggle', module)\n .addDecorator(\n moduleMetadata({\n imports: [ToggleModule, DocumentationModule],\n })\n )\n .addDecorator(withKnobs)\n .add('Basic', () => ({\n template: `\n\t\t\t<ibm-toggle\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[onText]=\"onText\"\n\t\t\t\t[offText]=\"offText\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[checked]=\"checked\"\n\t\t\t\t[size]=\"size\">\n\t\t\t</ibm-toggle>\n\t\t`,\n props: {\n disabled: boolean('Disabled', false),\n checked: boolean('Checked', false),\n size: select('Size', ['md', 'sm'], 'md'),\n label: text('Label text', ''),\n onText: text('On text', 'On'),\n offText: text('Off text', 'Off'),\n },\n }))\n .add('Skeleton', () => ({\n template: `\n\t\t\t<ibm-toggle skeleton=\"true\"></ibm-toggle>\n\t\t\t&nbsp;\n\t\t\t<ibm-toggle skeleton=\"true\" size=\"sm\"></ibm-toggle>\n\t\t`,\n }))\n .add('Documentation', () => ({\n template: `\n\t\t\t<ibm-documentation src=\"documentation/components/Toggle.html\"></ibm-documentation>\n\t\t`,\n }));\n";
21991
22081
  var __ADDS_MAP__ = { "toggle--documentation": { "startLoc": { "col": 7, "line": 40 }, "endLoc": { "col": 4, "line": 44 } }, "toggle--skeleton": { "startLoc": { "col": 7, "line": 33 }, "endLoc": { "col": 4, "line": 39 } }, "toggle--basic": { "startLoc": { "col": 7, "line": 13 }, "endLoc": { "col": 4, "line": 32 } } };
21992
22082
 
21993
22083
 
@@ -21997,12 +22087,12 @@ Object(_storybook_angular__WEBPACK_IMPORTED_MODULE_0__["storiesOf"])("Toggle", m
21997
22087
  }))
21998
22088
  .addDecorator(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["withKnobs"])
21999
22089
  .add("Basic", function () { return ({
22000
- template: "\n\t\t\t<ibm-toggle\n\t\t\t\t[label]=\"labelText\"\n\t\t\t\t[onText]=\"onText\"\n\t\t\t\t[offText]=\"offText\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[checked]=\"checked\"\n\t\t\t\t[size]=\"size\">\n\t\t\t</ibm-toggle>\n\t\t",
22090
+ template: "\n\t\t\t<ibm-toggle\n\t\t\t\t[label]=\"label\"\n\t\t\t\t[onText]=\"onText\"\n\t\t\t\t[offText]=\"offText\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[checked]=\"checked\"\n\t\t\t\t[size]=\"size\">\n\t\t\t</ibm-toggle>\n\t\t",
22001
22091
  props: {
22002
22092
  disabled: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["boolean"])("Disabled", false),
22003
22093
  checked: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["boolean"])("Checked", false),
22004
22094
  size: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["select"])("Size", ["md", "sm"], "md"),
22005
- labelText: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["text"])("Label text", ""),
22095
+ label: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["text"])("Label text", ""),
22006
22096
  onText: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["text"])("On text", "On"),
22007
22097
  offText: Object(_storybook_addon_knobs_angular__WEBPACK_IMPORTED_MODULE_1__["text"])("Off text", "Off")
22008
22098
  }
@@ -22185,7 +22275,7 @@ var __metadata = (undefined && undefined.__metadata) || function (k, v) {
22185
22275
 
22186
22276
  var HeaderItem = /** @class */ (function () {
22187
22277
  function HeaderItem() {
22188
- this.href = "#";
22278
+ this.href = "javascript:void(0)";
22189
22279
  }
22190
22280
  __decorate([
22191
22281
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
@@ -23352,4 +23442,4 @@ module.exports = __webpack_require__(/*! /home/travis/build/IBM/carbon-component
23352
23442
  /***/ })
23353
23443
 
23354
23444
  },[[0,"runtime~main","vendors~main"]]]);
23355
- //# sourceMappingURL=main.56858f6c72e70f546e4c.bundle.js.map
23445
+ //# sourceMappingURL=main.e71ec014aa45dc1d6679.bundle.js.map