carbon-components-angular 5.53.1 → 5.54.1

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 (214) hide show
  1. package/README.md +1 -1
  2. package/docs/documentation/components/Accordion.html +2 -2
  3. package/docs/documentation/components/AccordionItem.html +2 -2
  4. package/docs/documentation/components/ActionableNotification.html +2 -2
  5. package/docs/documentation/components/AlertModal.html +2 -2
  6. package/docs/documentation/components/BaseIconButton.html +2 -2
  7. package/docs/documentation/components/BaseNotification.html +2 -2
  8. package/docs/documentation/components/BaseTabHeader.html +2 -2
  9. package/docs/documentation/components/Breadcrumb.html +2 -2
  10. package/docs/documentation/components/BreadcrumbItemComponent.html +2 -2
  11. package/docs/documentation/components/ButtonSet.html +2 -2
  12. package/docs/documentation/components/Checkbox.html +2 -2
  13. package/docs/documentation/components/ClickableTile.html +2 -2
  14. package/docs/documentation/components/CodeSnippet.html +2 -2
  15. package/docs/documentation/components/ComboBox.html +2 -2
  16. package/docs/documentation/components/ContainedList.html +2 -2
  17. package/docs/documentation/components/ContainedListItem.html +2 -2
  18. package/docs/documentation/components/ContentSwitcher.html +2 -2
  19. package/docs/documentation/components/ContextMenuComponent.html +2 -2
  20. package/docs/documentation/components/ContextMenuDividerComponent.html +2 -2
  21. package/docs/documentation/components/ContextMenuGroupComponent.html +2 -2
  22. package/docs/documentation/components/ContextMenuItemComponent.html +2 -2
  23. package/docs/documentation/components/DatePicker.html +2 -2
  24. package/docs/documentation/components/DatePickerInput.html +2 -2
  25. package/docs/documentation/components/Dialog.html +2 -2
  26. package/docs/documentation/components/Documentation.html +2 -2
  27. package/docs/documentation/components/Dropdown.html +2 -2
  28. package/docs/documentation/components/DropdownList.html +2 -2
  29. package/docs/documentation/components/ExpandableTile.html +2 -2
  30. package/docs/documentation/components/FileComponent.html +2 -2
  31. package/docs/documentation/components/FileUploader.html +2 -2
  32. package/docs/documentation/components/Hamburger.html +2 -2
  33. package/docs/documentation/components/Header.html +2 -2
  34. package/docs/documentation/components/HeaderAction.html +2 -2
  35. package/docs/documentation/components/HeaderGlobal.html +2 -2
  36. package/docs/documentation/components/HeaderItem.html +2 -2
  37. package/docs/documentation/components/HeaderMenu.html +2 -2
  38. package/docs/documentation/components/HeaderNavigation.html +2 -2
  39. package/docs/documentation/components/IconButton.html +2 -2
  40. package/docs/documentation/components/InlineLoading.html +2 -2
  41. package/docs/documentation/components/Label.html +2 -2
  42. package/docs/documentation/components/ListColumn.html +2 -2
  43. package/docs/documentation/components/ListHeader.html +2 -2
  44. package/docs/documentation/components/ListRow.html +2 -2
  45. package/docs/documentation/components/Loading.html +2 -2
  46. package/docs/documentation/components/Modal.html +2 -2
  47. package/docs/documentation/components/ModalFooter.html +2 -2
  48. package/docs/documentation/components/ModalHeader.html +2 -2
  49. package/docs/documentation/components/Notification.html +2 -2
  50. package/docs/documentation/components/NumberComponent.html +2 -2
  51. package/docs/documentation/components/OverflowMenu.html +2 -2
  52. package/docs/documentation/components/OverflowMenuCustomPane.html +2 -2
  53. package/docs/documentation/components/OverflowMenuOption.html +2 -2
  54. package/docs/documentation/components/OverflowMenuPane.html +2 -2
  55. package/docs/documentation/components/Overlay.html +2 -2
  56. package/docs/documentation/components/Pagination.html +2 -2
  57. package/docs/documentation/components/PaginationNav.html +2 -2
  58. package/docs/documentation/components/PaginationNavItem.html +2 -2
  59. package/docs/documentation/components/PaginationOverflow.html +2 -2
  60. package/docs/documentation/components/Panel.html +2 -2
  61. package/docs/documentation/components/PasswordInputLabelComponent.html +2 -2
  62. package/docs/documentation/components/Placeholder.html +2 -2
  63. package/docs/documentation/components/PopoverContent.html +2 -2
  64. package/docs/documentation/components/ProgressBar.html +2 -2
  65. package/docs/documentation/components/ProgressIndicator.html +2 -2
  66. package/docs/documentation/components/Radio.html +2 -2
  67. package/docs/documentation/components/RadioGroup.html +2 -2
  68. package/docs/documentation/components/Search.html +2 -2
  69. package/docs/documentation/components/Select.html +2 -2
  70. package/docs/documentation/components/SelectionTile.html +2 -2
  71. package/docs/documentation/components/SideNav.html +2 -2
  72. package/docs/documentation/components/SideNavItem.html +2 -2
  73. package/docs/documentation/components/SideNavMenu.html +2 -2
  74. package/docs/documentation/components/SkeletonPlaceholder.html +2 -2
  75. package/docs/documentation/components/SkeletonText.html +2 -2
  76. package/docs/documentation/components/Slider.html +2 -2
  77. package/docs/documentation/components/StructuredList.html +2 -2
  78. package/docs/documentation/components/SwitcherList.html +2 -2
  79. package/docs/documentation/components/SwitcherListItem.html +2 -2
  80. package/docs/documentation/components/Tab.html +2 -2
  81. package/docs/documentation/components/TabHeaderGroup.html +2 -2
  82. package/docs/documentation/components/TabHeaders.html +2 -2
  83. package/docs/documentation/components/TabSkeleton.html +2 -2
  84. package/docs/documentation/components/Table.html +2 -2
  85. package/docs/documentation/components/TableBody.html +2 -2
  86. package/docs/documentation/components/TableCheckbox.html +2 -2
  87. package/docs/documentation/components/TableContainer.html +2 -2
  88. package/docs/documentation/components/TableData.html +2 -2
  89. package/docs/documentation/components/TableExpandButton.html +2 -2
  90. package/docs/documentation/components/TableExpandedRow.html +2 -2
  91. package/docs/documentation/components/TableHead.html +2 -2
  92. package/docs/documentation/components/TableHeadCell.html +2 -2
  93. package/docs/documentation/components/TableHeadCheckbox.html +2 -2
  94. package/docs/documentation/components/TableHeadExpand.html +2 -2
  95. package/docs/documentation/components/TableHeader.html +2 -2
  96. package/docs/documentation/components/TableRadio.html +2 -2
  97. package/docs/documentation/components/TableRowComponent.html +2 -2
  98. package/docs/documentation/components/TableToolbar.html +2 -2
  99. package/docs/documentation/components/TableToolbarActions.html +2 -2
  100. package/docs/documentation/components/TableToolbarContent.html +2 -2
  101. package/docs/documentation/components/TableToolbarSearch.html +2 -2
  102. package/docs/documentation/components/Tabs.html +2 -2
  103. package/docs/documentation/components/Tag.html +73 -13
  104. package/docs/documentation/components/TagFilter.html +116 -51
  105. package/docs/documentation/components/TagOperationalComponent.html +920 -0
  106. package/docs/documentation/components/TagSelectableComponent.html +1085 -0
  107. package/docs/documentation/components/TextInputLabelComponent.html +78 -32
  108. package/docs/documentation/components/TextareaLabelComponent.html +2 -2
  109. package/docs/documentation/components/Tile.html +2 -2
  110. package/docs/documentation/components/TileGroup.html +2 -2
  111. package/docs/documentation/components/TimePicker.html +2 -2
  112. package/docs/documentation/components/TimePickerSelect.html +2 -2
  113. package/docs/documentation/components/Toast.html +2 -2
  114. package/docs/documentation/components/Toggle.html +2 -2
  115. package/docs/documentation/components/Toggletip.html +2 -2
  116. package/docs/documentation/components/Tooltip.html +2 -2
  117. package/docs/documentation/components/TooltipDefinition.html +2 -2
  118. package/docs/documentation/components/TreeNodeComponent.html +2 -2
  119. package/docs/documentation/components/TreeViewComponent.html +2 -2
  120. package/docs/documentation/coverage.html +46 -10
  121. package/docs/documentation/directives/TagIconDirective.html +368 -0
  122. package/docs/documentation/graph/dependencies.svg +1750 -1678
  123. package/docs/documentation/index.html +1 -1
  124. package/docs/documentation/js/menu-wc.js +23 -3
  125. package/docs/documentation/js/menu-wc_es5.js +1 -1
  126. package/docs/documentation/js/search/search_index.js +2 -2
  127. package/docs/documentation/modules/ComboBoxModule/dependencies.svg +4 -4
  128. package/docs/documentation/modules/ComboBoxModule.html +4 -4
  129. package/docs/documentation/modules/DatePickerInputModule/dependencies.svg +4 -4
  130. package/docs/documentation/modules/DatePickerInputModule.html +4 -4
  131. package/docs/documentation/modules/DatePickerModule/dependencies.svg +39 -39
  132. package/docs/documentation/modules/DatePickerModule.html +39 -39
  133. package/docs/documentation/modules/FileUploaderModule/dependencies.svg +34 -34
  134. package/docs/documentation/modules/FileUploaderModule.html +34 -34
  135. package/docs/documentation/modules/InlineLoadingModule/dependencies.svg +4 -4
  136. package/docs/documentation/modules/InlineLoadingModule.html +4 -4
  137. package/docs/documentation/modules/LoadingModule/dependencies.svg +4 -4
  138. package/docs/documentation/modules/LoadingModule.html +4 -4
  139. package/docs/documentation/modules/NFormsModule/dependencies.svg +4 -4
  140. package/docs/documentation/modules/NFormsModule.html +4 -4
  141. package/docs/documentation/modules/NumberModule/dependencies.svg +24 -24
  142. package/docs/documentation/modules/NumberModule.html +24 -24
  143. package/docs/documentation/modules/ProgressBarModule/dependencies.svg +4 -4
  144. package/docs/documentation/modules/ProgressBarModule.html +4 -4
  145. package/docs/documentation/modules/ProgressIndicatorModule/dependencies.svg +4 -4
  146. package/docs/documentation/modules/ProgressIndicatorModule.html +4 -4
  147. package/docs/documentation/modules/RadioModule/dependencies.svg +53 -49
  148. package/docs/documentation/modules/RadioModule.html +53 -49
  149. package/docs/documentation/modules/SearchModule/dependencies.svg +6 -6
  150. package/docs/documentation/modules/SearchModule.html +6 -6
  151. package/docs/documentation/modules/SliderModule/dependencies.svg +4 -4
  152. package/docs/documentation/modules/SliderModule.html +4 -4
  153. package/docs/documentation/modules/TabsModule/dependencies.svg +69 -69
  154. package/docs/documentation/modules/TabsModule.html +69 -69
  155. package/docs/documentation/modules/TagModule/dependencies.svg +123 -51
  156. package/docs/documentation/modules/TagModule.html +160 -55
  157. package/docs/documentation/modules/ThemeModule/dependencies.svg +4 -4
  158. package/docs/documentation/modules/ThemeModule.html +4 -4
  159. package/docs/documentation/modules/TilesModule/dependencies.svg +108 -108
  160. package/docs/documentation/modules/TilesModule.html +108 -108
  161. package/docs/documentation/modules/TimePickerModule/dependencies.svg +4 -4
  162. package/docs/documentation/modules/TimePickerModule.html +4 -4
  163. package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +46 -42
  164. package/docs/documentation/modules/TimePickerSelectModule.html +46 -42
  165. package/docs/documentation/modules/ToggleModule/dependencies.svg +20 -20
  166. package/docs/documentation/modules/ToggleModule.html +20 -20
  167. package/docs/documentation/modules/ToggletipModule/dependencies.svg +37 -37
  168. package/docs/documentation/modules/ToggletipModule.html +37 -37
  169. package/docs/documentation/modules/TooltipModule/dependencies.svg +28 -28
  170. package/docs/documentation/modules/TooltipModule.html +28 -28
  171. package/docs/documentation/modules/TreeviewModule/dependencies.svg +36 -36
  172. package/docs/documentation/modules/TreeviewModule.html +36 -36
  173. package/docs/documentation/modules/UIShellModule/dependencies.svg +4 -4
  174. package/docs/documentation/modules/UIShellModule.html +4 -4
  175. package/docs/documentation/overview.html +1752 -1680
  176. package/docs/documentation.json +925 -67
  177. package/docs/storybook/{1345.4ae7e616.iframe.bundle.js → 1345.d1a47622.iframe.bundle.js} +1 -1
  178. package/docs/storybook/contained-list-contained-list-stories.b87addfb.iframe.bundle.js +1 -0
  179. package/docs/storybook/iframe.html +2 -2
  180. package/docs/storybook/index.json +1 -1
  181. package/docs/storybook/main.41f2a733.iframe.bundle.js +1 -0
  182. package/docs/storybook/{patterns-filtering-multiple-categories-stories.17085244.iframe.bundle.js → patterns-filtering-multiple-categories-stories.c7cc76c2.iframe.bundle.js} +1 -1
  183. package/docs/storybook/project.json +1 -1
  184. package/docs/storybook/{runtime~main.7aee42be.iframe.bundle.js → runtime~main.ba940694.iframe.bundle.js} +1 -1
  185. package/docs/storybook/stories.json +1 -1
  186. package/docs/storybook/tag-tag-stories.8b0e9efc.iframe.bundle.js +1 -0
  187. package/esm2020/input/text-input-label.component.mjs +4 -1
  188. package/esm2020/tag/index.mjs +4 -1
  189. package/esm2020/tag/tag-filter.component.mjs +47 -32
  190. package/esm2020/tag/tag-icon.directive.mjs +19 -0
  191. package/esm2020/tag/tag-operational.component.mjs +62 -0
  192. package/esm2020/tag/tag-selectable.component.mjs +89 -0
  193. package/esm2020/tag/tag.component.mjs +28 -4
  194. package/esm2020/tag/tag.module.mjs +27 -4
  195. package/fesm2015/carbon-components-angular-input.mjs +3 -0
  196. package/fesm2015/carbon-components-angular-input.mjs.map +1 -1
  197. package/fesm2015/carbon-components-angular-tag.mjs +259 -40
  198. package/fesm2015/carbon-components-angular-tag.mjs.map +1 -1
  199. package/fesm2020/carbon-components-angular-input.mjs +3 -0
  200. package/fesm2020/carbon-components-angular-input.mjs.map +1 -1
  201. package/fesm2020/carbon-components-angular-tag.mjs +259 -40
  202. package/fesm2020/carbon-components-angular-tag.mjs.map +1 -1
  203. package/input/text-input-label.component.d.ts +3 -2
  204. package/package.json +1 -1
  205. package/tag/index.d.ts +3 -0
  206. package/tag/tag-filter.component.d.ts +5 -1
  207. package/tag/tag-icon.directive.d.ts +26 -0
  208. package/tag/tag-operational.component.d.ts +35 -0
  209. package/tag/tag-selectable.component.d.ts +42 -0
  210. package/tag/tag.component.d.ts +7 -2
  211. package/tag/tag.module.d.ts +6 -3
  212. package/docs/storybook/contained-list-contained-list-stories.3c337840.iframe.bundle.js +0 -1
  213. package/docs/storybook/main.0374ee2c.iframe.bundle.js +0 -1
  214. package/docs/storybook/tag-tag-stories.60e1dec6.iframe.bundle.js +0 -1
@@ -1,8 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, HostBinding, EventEmitter, Output, NgModule } from '@angular/core';
3
- import * as i1 from 'carbon-components-angular/icon';
4
- import { IconModule } from 'carbon-components-angular/icon';
2
+ import { Component, Input, HostBinding, EventEmitter, Output, Directive, ChangeDetectionStrategy, HostListener, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common';
5
4
  import { CommonModule } from '@angular/common';
5
+ import * as i2 from 'carbon-components-angular/icon';
6
+ import { IconModule } from 'carbon-components-angular/icon';
6
7
 
7
8
  /**
8
9
  * Component that represents a tag for labelling/categorizing using keywords. Get started with importing the module:
@@ -24,18 +25,39 @@ class Tag {
24
25
  */
25
26
  this.size = "md";
26
27
  this.class = "";
28
+ this.skeleton = false;
27
29
  }
30
+ /**
31
+ * @todo
32
+ * Remove `cds--tag--${this.size}` in v7
33
+ */
28
34
  get attrClass() {
29
- return `cds--tag cds--tag--${this.type} cds--tag--${this.size} cds--layout--size-${this.size} ${this.class}`;
35
+ const skeletonClass = this.skeleton ? "cds--skeleton" : "";
36
+ const sizeClass = `cds--tag--${this.size} cds--layout--size-${this.size}`;
37
+ return `cds--tag cds--tag--${this.type} ${sizeClass} ${skeletonClass} ${this.class}`;
30
38
  }
31
39
  }
32
40
  Tag.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: Tag, deps: [], target: i0.ɵɵFactoryTarget.Component });
33
- Tag.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: Tag, selector: "cds-tag, ibm-tag", inputs: { type: "type", size: "size", class: "class" }, host: { properties: { "attr.class": "this.attrClass" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
41
+ Tag.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: Tag, selector: "cds-tag, ibm-tag", inputs: { type: "type", size: "size", class: "class", skeleton: "skeleton" }, host: { properties: { "attr.class": "this.attrClass" } }, ngImport: i0, template: `
42
+ <ng-container *ngIf="!skeleton">
43
+ <ng-content select="[cdsTagIcon],[ibmTagIcon]"></ng-content>
44
+ <span class="cds--tag__label">
45
+ <ng-content></ng-content>
46
+ </span>
47
+ </ng-container>
48
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
34
49
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: Tag, decorators: [{
35
50
  type: Component,
36
51
  args: [{
37
52
  selector: "cds-tag, ibm-tag",
38
- template: `<ng-content></ng-content>`
53
+ template: `
54
+ <ng-container *ngIf="!skeleton">
55
+ <ng-content select="[cdsTagIcon],[ibmTagIcon]"></ng-content>
56
+ <span class="cds--tag__label">
57
+ <ng-content></ng-content>
58
+ </span>
59
+ </ng-container>
60
+ `
39
61
  }]
40
62
  }], propDecorators: { type: [{
41
63
  type: Input
@@ -43,6 +65,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
43
65
  type: Input
44
66
  }], class: [{
45
67
  type: Input
68
+ }], skeleton: [{
69
+ type: Input
46
70
  }], attrClass: [{
47
71
  type: HostBinding,
48
72
  args: ["attr.class"]
@@ -52,6 +76,7 @@ class TagFilter extends Tag {
52
76
  constructor() {
53
77
  super(...arguments);
54
78
  this.closeButtonLabel = "Clear Filter";
79
+ this.disabled = false;
55
80
  /**
56
81
  * Function for close/delete the tag
57
82
  */
@@ -77,8 +102,15 @@ class TagFilter extends Tag {
77
102
  this.click.emit({ action: "close" });
78
103
  this.close.emit();
79
104
  }
105
+ /**
106
+ * @todo
107
+ * Remove `cds--tag--${this.size}` in v7
108
+ */
80
109
  get attrClass() {
81
- return `cds--tag cds--tag--filter cds--tag--${this.type} cds--tag--${this.size} cds--layout--size-${this.size} ${this.class}${this.disabled ? " cds--tag--disabled" : ""}`;
110
+ const disabledClass = this.disabled ? "cds--tag--disabled" : "";
111
+ const sizeClass = `cds--tag--${this.size} cds--layout--size-${this.size}`;
112
+ const skeletonClass = this.skeleton ? "cds--skeleton" : "";
113
+ return `cds--tag cds--tag--filter cds--tag--${this.type} ${disabledClass} ${sizeClass} ${skeletonClass} ${this.class}`;
82
114
  }
83
115
  get attrAriaLabel() {
84
116
  return `${this.title || ""} ${this.closeButtonLabel}`.trim();
@@ -86,40 +118,46 @@ class TagFilter extends Tag {
86
118
  }
87
119
  TagFilter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TagFilter, deps: null, target: i0.ɵɵFactoryTarget.Component });
88
120
  TagFilter.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TagFilter, selector: "cds-tag-filter, ibm-tag-filter", inputs: { closeButtonLabel: "closeButtonLabel", disabled: "disabled", title: "title" }, outputs: { close: "close", click: "click" }, host: { properties: { "attr.class": "this.attrClass", "attr.aria-label": "this.attrAriaLabel" } }, usesInheritance: true, ngImport: i0, template: `
89
- <span
90
- class="cds--tag__label"
91
- [attr.title]="title ? title : null"
92
- (click)="onClick($event)">
93
- <ng-content></ng-content>
94
- </span>
95
- <button
96
- class="cds--tag__close-icon"
97
- (click)="onClose($event)"
98
- [disabled]="disabled"
99
- [title]="closeButtonLabel">
100
- <span class="cds--visually-hidden">{{closeButtonLabel}}</span>
101
- <svg cdsIcon="close" size="16"></svg>
102
- </button>
103
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }] });
121
+ <ng-container *ngIf="!skeleton">
122
+ <ng-content select="[cdsTagIcon],[ibmTagIcon]"></ng-content>
123
+ <span
124
+ class="cds--tag__label"
125
+ [attr.title]="title ? title : null"
126
+ (click)="onClick($event)">
127
+ <ng-content></ng-content>
128
+ </span>
129
+ <button
130
+ class="cds--tag__close-icon"
131
+ (click)="onClose($event)"
132
+ [disabled]="disabled"
133
+ [title]="closeButtonLabel">
134
+ <span class="cds--visually-hidden">{{closeButtonLabel}}</span>
135
+ <svg cdsIcon="close" size="16"></svg>
136
+ </button>
137
+ </ng-container>
138
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }] });
104
139
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TagFilter, decorators: [{
105
140
  type: Component,
106
141
  args: [{
107
142
  selector: "cds-tag-filter, ibm-tag-filter",
108
143
  template: `
109
- <span
110
- class="cds--tag__label"
111
- [attr.title]="title ? title : null"
112
- (click)="onClick($event)">
113
- <ng-content></ng-content>
114
- </span>
115
- <button
116
- class="cds--tag__close-icon"
117
- (click)="onClose($event)"
118
- [disabled]="disabled"
119
- [title]="closeButtonLabel">
120
- <span class="cds--visually-hidden">{{closeButtonLabel}}</span>
121
- <svg cdsIcon="close" size="16"></svg>
122
- </button>
144
+ <ng-container *ngIf="!skeleton">
145
+ <ng-content select="[cdsTagIcon],[ibmTagIcon]"></ng-content>
146
+ <span
147
+ class="cds--tag__label"
148
+ [attr.title]="title ? title : null"
149
+ (click)="onClick($event)">
150
+ <ng-content></ng-content>
151
+ </span>
152
+ <button
153
+ class="cds--tag__close-icon"
154
+ (click)="onClose($event)"
155
+ [disabled]="disabled"
156
+ [title]="closeButtonLabel">
157
+ <span class="cds--visually-hidden">{{closeButtonLabel}}</span>
158
+ <svg cdsIcon="close" size="16"></svg>
159
+ </button>
160
+ </ng-container>
123
161
  `
124
162
  }]
125
163
  }], propDecorators: { closeButtonLabel: [{
@@ -140,16 +178,197 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
140
178
  args: ["attr.aria-label"]
141
179
  }] } });
142
180
 
181
+ class TagIconDirective {
182
+ constructor() {
183
+ this.tagIcon = true;
184
+ }
185
+ }
186
+ TagIconDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TagIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
187
+ TagIconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: TagIconDirective, selector: "[cdsTagIcon], [ibmTagIcon]", host: { properties: { "class.cds--tag__custom-icon": "this.tagIcon" } }, ngImport: i0 });
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TagIconDirective, decorators: [{
189
+ type: Directive,
190
+ args: [{
191
+ selector: "[cdsTagIcon], [ibmTagIcon]"
192
+ }]
193
+ }], propDecorators: { tagIcon: [{
194
+ type: HostBinding,
195
+ args: ["class.cds--tag__custom-icon"]
196
+ }] } });
197
+
198
+ class TagSelectableComponent {
199
+ constructor() {
200
+ this.role = "button";
201
+ this.buttonType = "button";
202
+ this.tabIndex = 0;
203
+ this.size = "md";
204
+ this.skeleton = false;
205
+ this.disabled = false;
206
+ this.class = "";
207
+ this.selected = false;
208
+ this.selectedChange = new EventEmitter();
209
+ }
210
+ get ariaPressed() {
211
+ return this.selected;
212
+ }
213
+ onClick() {
214
+ this.selected = !this.selected;
215
+ this.selectedChange.emit(this.selected);
216
+ }
217
+ /**
218
+ * @todo
219
+ * Remove `cds--tag--${this.size}` in v7
220
+ */
221
+ get attrClass() {
222
+ const disabledClass = this.disabled ? "cds--tag--disabled" : "";
223
+ const sizeClass = `cds--tag--${this.size} cds--layout--size-${this.size}`;
224
+ const skeletonClass = this.skeleton ? "cds--skeleton" : "";
225
+ const selectedClass = this.selected ? "cds--tag--selectable-selected" : "";
226
+ return `cds--tag cds--tag--selectable ${selectedClass} ${disabledClass} ${sizeClass} ${skeletonClass} ${this.class}`;
227
+ }
228
+ }
229
+ TagSelectableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TagSelectableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
230
+ TagSelectableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TagSelectableComponent, selector: "cds-tag-selectable, ibm-tag-selectable", inputs: { size: "size", skeleton: "skeleton", disabled: "disabled", class: "class", selected: "selected" }, outputs: { selectedChange: "selectedChange" }, host: { listeners: { "click": "onClick()" }, properties: { "attr.role": "this.role", "attr.type": "this.buttonType", "attr.tabindex": "this.tabIndex", "attr.aria-pressed": "this.ariaPressed", "attr.class": "this.attrClass" } }, ngImport: i0, template: `
231
+ <ng-container *ngIf="!skeleton">
232
+ <ng-content select="[cdsTagIcon],[ibmTagIcon]"></ng-content>
233
+ <span class="cds--tag__label">
234
+ <ng-content></ng-content>
235
+ </span>
236
+ </ng-container>
237
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
238
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TagSelectableComponent, decorators: [{
239
+ type: Component,
240
+ args: [{
241
+ selector: "cds-tag-selectable, ibm-tag-selectable",
242
+ template: `
243
+ <ng-container *ngIf="!skeleton">
244
+ <ng-content select="[cdsTagIcon],[ibmTagIcon]"></ng-content>
245
+ <span class="cds--tag__label">
246
+ <ng-content></ng-content>
247
+ </span>
248
+ </ng-container>
249
+ `,
250
+ changeDetection: ChangeDetectionStrategy.OnPush
251
+ }]
252
+ }], propDecorators: { role: [{
253
+ type: HostBinding,
254
+ args: ["attr.role"]
255
+ }], buttonType: [{
256
+ type: HostBinding,
257
+ args: ["attr.type"]
258
+ }], tabIndex: [{
259
+ type: HostBinding,
260
+ args: ["attr.tabindex"]
261
+ }], ariaPressed: [{
262
+ type: HostBinding,
263
+ args: ["attr.aria-pressed"]
264
+ }], size: [{
265
+ type: Input
266
+ }], skeleton: [{
267
+ type: Input
268
+ }], disabled: [{
269
+ type: Input
270
+ }], class: [{
271
+ type: Input
272
+ }], selected: [{
273
+ type: Input
274
+ }], selectedChange: [{
275
+ type: Output
276
+ }], onClick: [{
277
+ type: HostListener,
278
+ args: ["click"]
279
+ }], attrClass: [{
280
+ type: HostBinding,
281
+ args: ["attr.class"]
282
+ }] } });
283
+
284
+ class TagOperationalComponent extends Tag {
285
+ constructor() {
286
+ super(...arguments);
287
+ this.role = "button";
288
+ this.buttonType = "button";
289
+ this.tabIndex = 0;
290
+ this.disabled = false;
291
+ }
292
+ /**
293
+ * @todo
294
+ * Remove `cds--tag--${this.size}` in v7
295
+ */
296
+ get attrClass() {
297
+ const disabledClass = this.disabled ? "cds--tag--disabled" : "";
298
+ const sizeClass = `cds--tag--${this.size} cds--layout--size-${this.size}`;
299
+ const skeletonClass = this.skeleton ? "cds--skeleton" : "";
300
+ return `cds--tag cds--tag--operational cds--tag--${this.type} ${disabledClass} ${sizeClass} ${skeletonClass} ${this.class}`;
301
+ }
302
+ }
303
+ TagOperationalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TagOperationalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
304
+ TagOperationalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TagOperationalComponent, selector: "cds-tag-operational, ibm-tag-operational", inputs: { disabled: "disabled" }, host: { properties: { "attr.role": "this.role", "attr.type": "this.buttonType", "attr.tabindex": "this.tabIndex", "attr.class": "this.attrClass" } }, usesInheritance: true, ngImport: i0, template: `
305
+ <ng-container *ngIf="!skeleton">
306
+ <ng-content select="[cdsTagIcon],[ibmTagIcon]"></ng-content>
307
+ <span class="cds--tag__label">
308
+ <ng-content></ng-content>
309
+ </span>
310
+ </ng-container>
311
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
312
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TagOperationalComponent, decorators: [{
313
+ type: Component,
314
+ args: [{
315
+ selector: "cds-tag-operational, ibm-tag-operational",
316
+ template: `
317
+ <ng-container *ngIf="!skeleton">
318
+ <ng-content select="[cdsTagIcon],[ibmTagIcon]"></ng-content>
319
+ <span class="cds--tag__label">
320
+ <ng-content></ng-content>
321
+ </span>
322
+ </ng-container>
323
+ `,
324
+ changeDetection: ChangeDetectionStrategy.OnPush
325
+ }]
326
+ }], propDecorators: { role: [{
327
+ type: HostBinding,
328
+ args: ["attr.role"]
329
+ }], buttonType: [{
330
+ type: HostBinding,
331
+ args: ["attr.type"]
332
+ }], tabIndex: [{
333
+ type: HostBinding,
334
+ args: ["attr.tabindex"]
335
+ }], disabled: [{
336
+ type: Input
337
+ }], attrClass: [{
338
+ type: HostBinding,
339
+ args: ["attr.class"]
340
+ }] } });
341
+
143
342
  class TagModule {
144
343
  }
145
344
  TagModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TagModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
146
- TagModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: TagModule, declarations: [Tag, TagFilter], imports: [CommonModule, IconModule], exports: [Tag, TagFilter] });
345
+ TagModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: TagModule, declarations: [Tag,
346
+ TagFilter,
347
+ TagIconDirective,
348
+ TagSelectableComponent,
349
+ TagOperationalComponent], imports: [CommonModule, IconModule], exports: [Tag,
350
+ TagFilter,
351
+ TagIconDirective,
352
+ TagSelectableComponent,
353
+ TagOperationalComponent] });
147
354
  TagModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TagModule, imports: [CommonModule, IconModule] });
148
355
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TagModule, decorators: [{
149
356
  type: NgModule,
150
357
  args: [{
151
- declarations: [Tag, TagFilter],
152
- exports: [Tag, TagFilter],
358
+ declarations: [
359
+ Tag,
360
+ TagFilter,
361
+ TagIconDirective,
362
+ TagSelectableComponent,
363
+ TagOperationalComponent
364
+ ],
365
+ exports: [
366
+ Tag,
367
+ TagFilter,
368
+ TagIconDirective,
369
+ TagSelectableComponent,
370
+ TagOperationalComponent
371
+ ],
153
372
  imports: [CommonModule, IconModule]
154
373
  }]
155
374
  }] });
@@ -158,5 +377,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
158
377
  * Generated bundle index. Do not edit.
159
378
  */
160
379
 
161
- export { Tag, TagFilter, TagModule };
380
+ export { Tag, TagFilter, TagIconDirective, TagModule, TagOperationalComponent, TagSelectableComponent };
162
381
  //# sourceMappingURL=carbon-components-angular-tag.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"carbon-components-angular-tag.mjs","sources":["../../src/tag/tag.component.ts","../../src/tag/tag-filter.component.ts","../../src/tag/tag.module.ts","../../src/tag/carbon-components-angular-tag.ts"],"sourcesContent":["import {\n\tComponent,\n\tInput,\n\tHostBinding\n} from \"@angular/core\";\n\n/**\n * Supported tag types for carbon v10\n */\nexport type TagType = \"red\" |\n\t\"magenta\" |\n\t\"purple\" |\n\t\"blue\" |\n\t\"cyan\" |\n\t\"teal\" |\n\t\"green\" |\n\t\"gray\" |\n\t\"cool-gray\" |\n\t\"warm-gray\" |\n\t\"high-contrast\" |\n\t\"outline\";\n\n/**\n * Component that represents a tag for labelling/categorizing using keywords. Get started with importing the module:\n *\n * ```typescript\n * import { TagModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-tag--basic)\n */\n@Component({\n\tselector: \"cds-tag, ibm-tag\",\n\ttemplate: `<ng-content></ng-content>`\n})\nexport class Tag {\n\t/**\n\t * Type of the tag determines the styling\n\t */\n\t@Input() type: TagType = \"gray\";\n\n\t/**\n\t * Tag render size\n\t */\n\t@Input() size: \"sm\" | \"md\" = \"md\";\n\n\t@Input() class = \"\";\n\n\t@HostBinding(\"attr.class\") get attrClass() {\n\t\treturn `cds--tag cds--tag--${this.type} cds--tag--${this.size} cds--layout--size-${this.size} ${this.class}`;\n\t}\n}\n","import {\n\tComponent,\n\tOutput,\n\tEventEmitter,\n\tHostBinding,\n\tInput\n} from \"@angular/core\";\nimport { Tag } from \"./tag.component\";\n\n@Component({\n\tselector: \"cds-tag-filter, ibm-tag-filter\",\n\ttemplate: `\n\t\t<span\n\t\t\tclass=\"cds--tag__label\"\n\t\t\t[attr.title]=\"title ? title : null\"\n\t\t\t(click)=\"onClick($event)\">\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t\t<button\n\t\t\tclass=\"cds--tag__close-icon\"\n\t\t\t(click)=\"onClose($event)\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[title]=\"closeButtonLabel\">\n\t\t\t<span class=\"cds--visually-hidden\">{{closeButtonLabel}}</span>\n\t\t\t<svg cdsIcon=\"close\" size=\"16\"></svg>\n\t\t</button>\n\t`\n})\nexport class TagFilter extends Tag {\n\t@Input() closeButtonLabel = \"Clear Filter\";\n\t@Input() disabled: boolean;\n\t@Input() title: string;\n\n\t/**\n\t * Function for close/delete the tag\n\t */\n\t@Output() close = new EventEmitter<any>();\n\n\t/**\n\t * We need to stop the immedate propagation of click on the close button\n\t * to prevent undesired effects when used within dialogs.\n\t *\n\t * We need to emit a click event on close to allow for clicks to be listened\n\t * to on the immediate close button element. `action` distinguishes between clicks on\n\t * the tag vs. clicks on the close button.\n\t */\n\t@Output() click = new EventEmitter<{ action: \"click\" | \"close\" }>();\n\n\tonClick(event: any) {\n\t\tevent.stopImmediatePropagation();\n\t\tif (!this.disabled) {\n\t\t\tthis.click.emit({ action: \"click\" });\n\t\t}\n\t}\n\n\tonClose(event: any) {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.click.emit({ action: \"close\" });\n\t\tthis.close.emit();\n\t}\n\n\t@HostBinding(\"attr.class\") get attrClass() {\n\t\treturn `cds--tag cds--tag--filter cds--tag--${this.type} cds--tag--${this.size} cds--layout--size-${this.size} ${this.class}${this.disabled ? \" cds--tag--disabled\" : \"\"}`;\n\t}\n\n\t@HostBinding(\"attr.aria-label\") get attrAriaLabel() {\n\t\treturn `${this.title || \"\"} ${this.closeButtonLabel}`.trim();\n\t}\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { Tag } from \"./tag.component\";\nimport { TagFilter } from \"./tag-filter.component\";\nimport { IconModule } from \"carbon-components-angular/icon\";\n\n@NgModule({\n\tdeclarations: [ Tag, TagFilter ],\n\texports: [ Tag, TagFilter ],\n\timports: [ CommonModule, IconModule ]\n})\nexport class TagModule { }\n","/**\n *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AC,YAAY,CAAA;gBAIW,aAAa,EAAA,CAAA;sBAAhD,WAAW;uBAAC,iBAAiB,CAAA;;;MCrDlB,SAAS,CAAA;;sGAAT,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;uGAAT,SAAS,EAAA,YAAA,EAAA,CAJL,GAAG,EAAE,SAAS,CAAA,EAAA,OAAA,EAAA,CAEnB,YAAY,EAAE,UAAU,CAAA,EAAA,OAAA,EAAA,CADxB,GAAG,EAAE,SAAS,CAAA,EAAA,CAAA,CAAA;uGAGb,SAAS,EAAA,OAAA,EAAA,CAFV,YAAY,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;2FAEvB,SAAS,EAAA,UAAA,EAAA,CAAA;kBALrB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,CAAE,GAAG,EAAE,SAAS,CAAE;AAChC,oBAAA,OAAO,EAAE,CAAE,GAAG,EAAE,SAAS,CAAE;AAC3B,oBAAA,OAAO,EAAE,CAAE,YAAY,EAAE,UAAU,CAAE;AACrC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"carbon-components-angular-tag.mjs","sources":["../../src/tag/tag.component.ts","../../src/tag/tag-filter.component.ts","../../src/tag/tag-icon.directive.ts","../../src/tag/tag-selectable.component.ts","../../src/tag/tag-operational.component.ts","../../src/tag/tag.module.ts","../../src/tag/carbon-components-angular-tag.ts"],"sourcesContent":["import {\n\tComponent,\n\tInput,\n\tHostBinding\n} from \"@angular/core\";\n\n/**\n * Supported tag types for carbon v10\n */\nexport type TagType = \"red\" |\n\t\"magenta\" |\n\t\"purple\" |\n\t\"blue\" |\n\t\"cyan\" |\n\t\"teal\" |\n\t\"green\" |\n\t\"gray\" |\n\t\"cool-gray\" |\n\t\"warm-gray\" |\n\t\"high-contrast\" |\n\t\"outline\";\n\n/**\n * Component that represents a tag for labelling/categorizing using keywords. Get started with importing the module:\n *\n * ```typescript\n * import { TagModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-tag--basic)\n */\n@Component({\n\tselector: \"cds-tag, ibm-tag\",\n\ttemplate: `\n\t\t<ng-container *ngIf=\"!skeleton\">\n\t\t\t<ng-content select=\"[cdsTagIcon],[ibmTagIcon]\"></ng-content>\n\t\t\t<span class=\"cds--tag__label\">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</span>\n\t\t</ng-container>\n\t`\n})\nexport class Tag {\n\t/**\n\t * Type of the tag determines the styling\n\t */\n\t@Input() type: TagType = \"gray\";\n\n\t/**\n\t * Tag render size\n\t */\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\n\t@Input() class = \"\";\n\n\t@Input() skeleton = false;\n\n\t/**\n\t * @todo\n\t * Remove `cds--tag--${this.size}` in v7\n\t */\n\t@HostBinding(\"attr.class\") get attrClass() {\n\t\tconst skeletonClass = this.skeleton ? \"cds--skeleton\" : \"\";\n\t\tconst sizeClass = `cds--tag--${this.size} cds--layout--size-${this.size}`;\n\n\t\treturn `cds--tag cds--tag--${this.type} ${sizeClass} ${skeletonClass} ${this.class}`;\n\t}\n}\n","import {\n\tComponent,\n\tOutput,\n\tEventEmitter,\n\tHostBinding,\n\tInput,\n\tTemplateRef\n} from \"@angular/core\";\nimport { Tag } from \"./tag.component\";\n\n@Component({\n\tselector: \"cds-tag-filter, ibm-tag-filter\",\n\ttemplate: `\n\t\t<ng-container *ngIf=\"!skeleton\">\n\t\t\t<ng-content select=\"[cdsTagIcon],[ibmTagIcon]\"></ng-content>\n\t\t\t<span\n\t\t\t\tclass=\"cds--tag__label\"\n\t\t\t\t[attr.title]=\"title ? title : null\"\n\t\t\t\t(click)=\"onClick($event)\">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</span>\n\t\t\t<button\n\t\t\t\tclass=\"cds--tag__close-icon\"\n\t\t\t\t(click)=\"onClose($event)\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[title]=\"closeButtonLabel\">\n\t\t\t\t<span class=\"cds--visually-hidden\">{{closeButtonLabel}}</span>\n\t\t\t\t<svg cdsIcon=\"close\" size=\"16\"></svg>\n\t\t\t</button>\n\t\t</ng-container>\n\t`\n})\nexport class TagFilter extends Tag {\n\t@Input() closeButtonLabel = \"Clear Filter\";\n\t@Input() disabled = false;\n\t@Input() title: string;\n\n\t/**\n\t * Function for close/delete the tag\n\t */\n\t@Output() close = new EventEmitter<any>();\n\n\t/**\n\t * We need to stop the immedate propagation of click on the close button\n\t * to prevent undesired effects when used within dialogs.\n\t *\n\t * We need to emit a click event on close to allow for clicks to be listened\n\t * to on the immediate close button element. `action` distinguishes between clicks on\n\t * the tag vs. clicks on the close button.\n\t */\n\t@Output() click = new EventEmitter<{ action: \"click\" | \"close\" }>();\n\n\tonClick(event: any) {\n\t\tevent.stopImmediatePropagation();\n\t\tif (!this.disabled) {\n\t\t\tthis.click.emit({ action: \"click\" });\n\t\t}\n\t}\n\n\tonClose(event: any) {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.click.emit({ action: \"close\" });\n\t\tthis.close.emit();\n\t}\n\n\t/**\n\t * @todo\n\t * Remove `cds--tag--${this.size}` in v7\n\t */\n\t@HostBinding(\"attr.class\") get attrClass() {\n\t\tconst disabledClass = this.disabled ? \"cds--tag--disabled\" : \"\";\n\t\tconst sizeClass = `cds--tag--${this.size} cds--layout--size-${this.size}`;\n\t\tconst skeletonClass = this.skeleton ? \"cds--skeleton\" : \"\";\n\n\t\treturn `cds--tag cds--tag--filter cds--tag--${this.type} ${disabledClass} ${sizeClass} ${skeletonClass} ${this.class}`;\n\t}\n\n\t@HostBinding(\"attr.aria-label\") get attrAriaLabel() {\n\t\treturn `${this.title || \"\"} ${this.closeButtonLabel}`.trim();\n\t}\n}\n","import { Directive, HostBinding } from \"@angular/core\";\n\n@Directive({\n\tselector: \"[cdsTagIcon], [ibmTagIcon]\"\n})\nexport class TagIconDirective {\n\t@HostBinding(\"class.cds--tag__custom-icon\") tagIcon = true;\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tEventEmitter,\n\tHostBinding,\n\tHostListener,\n\tInput,\n\tOutput\n} from \"@angular/core\";\n\n@Component({\n\tselector: \"cds-tag-selectable, ibm-tag-selectable\",\n\ttemplate: `\n\t\t<ng-container *ngIf=\"!skeleton\">\n\t\t\t<ng-content select=\"[cdsTagIcon],[ibmTagIcon]\"></ng-content>\n\t\t\t<span class=\"cds--tag__label\">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</span>\n\t\t</ng-container>\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TagSelectableComponent {\n\t@HostBinding(\"attr.role\") role = \"button\";\n\t@HostBinding(\"attr.type\") buttonType = \"button\";\n\t@HostBinding(\"attr.tabindex\") tabIndex = 0;\n\t@HostBinding(\"attr.aria-pressed\") get ariaPressed() {\n\t\treturn this.selected;\n\t}\n\n\t@Input() size: \"sm\" | \"md\" | \"lg\" = \"md\";\n\t@Input() skeleton = false;\n\t@Input() disabled = false;\n\t@Input() class = \"\";\n\t@Input() selected = false;\n\n\t@Output() selectedChange = new EventEmitter<boolean>();\n\n\t@HostListener(\"click\")\n\tonClick() {\n\t\tthis.selected = !this.selected;\n\t\tthis.selectedChange.emit(this.selected);\n\t}\n\n\t/**\n\t * @todo\n\t * Remove `cds--tag--${this.size}` in v7\n\t */\n\t@HostBinding(\"attr.class\") get attrClass() {\n\t\tconst disabledClass = this.disabled ? \"cds--tag--disabled\" : \"\";\n\t\tconst sizeClass = `cds--tag--${this.size} cds--layout--size-${this.size}`;\n\t\tconst skeletonClass = this.skeleton ? \"cds--skeleton\" : \"\";\n\t\tconst selectedClass = this.selected ? \"cds--tag--selectable-selected\" : \"\";\n\n\t\treturn `cds--tag cds--tag--selectable ${selectedClass} ${disabledClass} ${sizeClass} ${skeletonClass} ${this.class}`;\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tHostBinding,\n\tInput\n} from \"@angular/core\";\nimport { Tag } from \"./tag.component\";\n\n@Component({\n\tselector: \"cds-tag-operational, ibm-tag-operational\",\n\ttemplate: `\n\t\t<ng-container *ngIf=\"!skeleton\">\n\t\t\t<ng-content select=\"[cdsTagIcon],[ibmTagIcon]\"></ng-content>\n\t\t\t<span class=\"cds--tag__label\">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</span>\n\t\t</ng-container>\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TagOperationalComponent extends Tag {\n\t@HostBinding(\"attr.role\") role = \"button\";\n\t@HostBinding(\"attr.type\") buttonType = \"button\";\n\t@HostBinding(\"attr.tabindex\") tabIndex = 0;\n\n\t@Input() disabled = false;\n\n\t/**\n\t * @todo\n\t * Remove `cds--tag--${this.size}` in v7\n\t */\n\t@HostBinding(\"attr.class\") get attrClass() {\n\t\tconst disabledClass = this.disabled ? \"cds--tag--disabled\" : \"\";\n\t\tconst sizeClass = `cds--tag--${this.size} cds--layout--size-${this.size}`;\n\t\tconst skeletonClass = this.skeleton ? \"cds--skeleton\" : \"\";\n\n\t\treturn `cds--tag cds--tag--operational cds--tag--${this.type} ${disabledClass} ${sizeClass} ${skeletonClass} ${this.class}`;\n\t}\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { Tag } from \"./tag.component\";\nimport { TagFilter } from \"./tag-filter.component\";\nimport { IconModule } from \"carbon-components-angular/icon\";\nimport { TagIconDirective } from \"./tag-icon.directive\";\nimport { TagSelectableComponent } from \"./tag-selectable.component\";\nimport { TagOperationalComponent } from \"./tag-operational.component\";\n\n@NgModule({\n\tdeclarations: [\n\t\tTag,\n\t\tTagFilter,\n\t\tTagIconDirective,\n\t\tTagSelectableComponent,\n\t\tTagOperationalComponent\n\t],\n\texports: [\n\t\tTag,\n\t\tTagFilter,\n\t\tTagIconDirective,\n\t\tTagSelectableComponent,\n\t\tTagOperationalComponent\n\t],\n\timports: [CommonModule, IconModule]\n})\nexport class TagModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAsBA;;;;;;;;AAQG;MAYU,GAAG,CAAA;AAXhB,IAAA,WAAA,GAAA;AAYC;;AAEG;QACM,IAAI,CAAA,IAAA,GAAY,MAAM,CAAC;AAEhC;;AAEG;QACM,IAAI,CAAA,IAAA,GAAuB,IAAI,CAAC;QAEhC,IAAK,CAAA,KAAA,GAAG,EAAE,CAAC;QAEX,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AAY1B,KAAA;AAVA;;;AAGG;AACH,IAAA,IAA+B,SAAS,GAAA;AACvC,QAAA,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,GAAG,eAAe,GAAG,EAAE,CAAC;QAC3D,MAAM,SAAS,GAAG,CAAA,UAAA,EAAa,IAAI,CAAC,IAAI,CAAA,mBAAA,EAAsB,IAAI,CAAC,IAAI,CAAA,CAAE,CAAC;AAE1E,QAAA,OAAO,CAAsB,mBAAA,EAAA,IAAI,CAAC,IAAI,CAAI,CAAA,EAAA,SAAS,CAAI,CAAA,EAAA,aAAa,CAAI,CAAA,EAAA,IAAI,CAAC,KAAK,EAAE,CAAC;KACrF;;gGAxBW,GAAG,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAH,GAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,GAAG,EATL,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,MAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,YAAA,EAAA,gB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AS,iBAfpB,GAAG;QACH,SAAS;QACT,gBAAgB;QAChB,sBAAsB;AACtB,QAAA,uBAAuB,CASd,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,UAAU,aANjC,GAAG;QACH,SAAS;QACT,gBAAgB;QAChB,sBAAsB;QACtB,uBAAuB,CAAA,EAAA,CAAA,CAAA;uGAIZ,SAAS,EAAA,OAAA,EAAA,CAFX,YAAY,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;2FAEtB,SAAS,EAAA,UAAA,EAAA,CAAA;kBAjBrB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE;wBACb,GAAG;wBACH,SAAS;wBACT,gBAAgB;wBAChB,sBAAsB;wBACtB,uBAAuB;AACvB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACR,GAAG;wBACH,SAAS;wBACT,gBAAgB;wBAChB,sBAAsB;wBACtB,uBAAuB;AACvB,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACnC,iBAAA,CAAA;;;AC1BD;;AAEG;;;;"}
@@ -18,7 +18,7 @@
18
18
  */
19
19
 
20
20
 
21
- import { AfterViewInit, ChangeDetectorRef, ElementRef, TemplateRef } from "@angular/core";
21
+ import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, TemplateRef } from "@angular/core";
22
22
  import * as i0 from "@angular/core";
23
23
  /**
24
24
  * Get started with importing the module:
@@ -36,7 +36,7 @@ import * as i0 from "@angular/core";
36
36
  *
37
37
  * [See demo](../../?path=/story/components-input--basic)
38
38
  */
39
- export declare class TextInputLabelComponent implements AfterViewInit {
39
+ export declare class TextInputLabelComponent implements AfterViewInit, AfterContentInit {
40
40
  protected changeDetectorRef: ChangeDetectorRef;
41
41
  /**
42
42
  * Used to build the id of the input item associated with the `Label`.
@@ -103,6 +103,7 @@ export declare class TextInputLabelComponent implements AfterViewInit {
103
103
  * Sets the id on the input item associated with the `Label`.
104
104
  */
105
105
  ngAfterViewInit(): void;
106
+ ngAfterContentInit(): void;
106
107
  isTemplate(value: any): boolean;
107
108
  static ɵfac: i0.ɵɵFactoryDeclaration<TextInputLabelComponent, never>;
108
109
  static ɵcmp: i0.ɵɵComponentDeclaration<TextInputLabelComponent, "cds-text-label, ibm-text-label", never, { "labelInputID": "labelInputID"; "disabled": "disabled"; "skeleton": "skeleton"; "labelTemplate": "labelTemplate"; "textInputTemplate": "textInputTemplate"; "helperText": "helperText"; "invalidText": "invalidText"; "invalid": "invalid"; "warn": "warn"; "warnText": "warnText"; "ariaLabel": "ariaLabel"; "fluid": "fluid"; }, {}, never, ["*", "[cdsText],[ibmText],input[type=text],div"], false>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-components-angular",
3
- "version": "5.53.1",
3
+ "version": "5.54.1",
4
4
  "description": "Next generation components",
5
5
  "main": "index.js",
6
6
  "repository": {
package/tag/index.d.ts CHANGED
@@ -20,4 +20,7 @@
20
20
 
21
21
  export * from "./tag-filter.component";
22
22
  export * from "./tag.component";
23
+ export * from "./tag-icon.directive";
24
+ export * from "./tag-selectable.component";
25
+ export * from "./tag-operational.component";
23
26
  export * from "./tag.module";
@@ -42,8 +42,12 @@ export declare class TagFilter extends Tag {
42
42
  }>;
43
43
  onClick(event: any): void;
44
44
  onClose(event: any): void;
45
+ /**
46
+ * @todo
47
+ * Remove `cds--tag--${this.size}` in v7
48
+ */
45
49
  get attrClass(): string;
46
50
  get attrAriaLabel(): string;
47
51
  static ɵfac: i0.ɵɵFactoryDeclaration<TagFilter, never>;
48
- static ɵcmp: i0.ɵɵComponentDeclaration<TagFilter, "cds-tag-filter, ibm-tag-filter", never, { "closeButtonLabel": "closeButtonLabel"; "disabled": "disabled"; "title": "title"; }, { "close": "close"; "click": "click"; }, never, ["*"], false>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<TagFilter, "cds-tag-filter, ibm-tag-filter", never, { "closeButtonLabel": "closeButtonLabel"; "disabled": "disabled"; "title": "title"; }, { "close": "close"; "click": "click"; }, never, ["[cdsTagIcon],[ibmTagIcon]", "*"], false>;
49
53
  }
@@ -0,0 +1,26 @@
1
+ /**
2
+ *
3
+ * carbon-angular v0.0.0 | tag-icon.directive.d.ts
4
+ *
5
+ * Copyright 2014, 2024 IBM
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+
20
+
21
+ import * as i0 from "@angular/core";
22
+ export declare class TagIconDirective {
23
+ tagIcon: boolean;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<TagIconDirective, never>;
25
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TagIconDirective, "[cdsTagIcon], [ibmTagIcon]", never, {}, {}, never, never, false>;
26
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ *
3
+ * carbon-angular v0.0.0 | tag-operational.component.d.ts
4
+ *
5
+ * Copyright 2014, 2024 IBM
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+
20
+
21
+ import { Tag } from "./tag.component";
22
+ import * as i0 from "@angular/core";
23
+ export declare class TagOperationalComponent extends Tag {
24
+ role: string;
25
+ buttonType: string;
26
+ tabIndex: number;
27
+ disabled: boolean;
28
+ /**
29
+ * @todo
30
+ * Remove `cds--tag--${this.size}` in v7
31
+ */
32
+ get attrClass(): string;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<TagOperationalComponent, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<TagOperationalComponent, "cds-tag-operational, ibm-tag-operational", never, { "disabled": "disabled"; }, {}, never, ["[cdsTagIcon],[ibmTagIcon]", "*"], false>;
35
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ *
3
+ * carbon-angular v0.0.0 | tag-selectable.component.d.ts
4
+ *
5
+ * Copyright 2014, 2024 IBM
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+
20
+
21
+ import { EventEmitter } from "@angular/core";
22
+ import * as i0 from "@angular/core";
23
+ export declare class TagSelectableComponent {
24
+ role: string;
25
+ buttonType: string;
26
+ tabIndex: number;
27
+ get ariaPressed(): boolean;
28
+ size: "sm" | "md" | "lg";
29
+ skeleton: boolean;
30
+ disabled: boolean;
31
+ class: string;
32
+ selected: boolean;
33
+ selectedChange: EventEmitter<boolean>;
34
+ onClick(): void;
35
+ /**
36
+ * @todo
37
+ * Remove `cds--tag--${this.size}` in v7
38
+ */
39
+ get attrClass(): string;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<TagSelectableComponent, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<TagSelectableComponent, "cds-tag-selectable, ibm-tag-selectable", never, { "size": "size"; "skeleton": "skeleton"; "disabled": "disabled"; "class": "class"; "selected": "selected"; }, { "selectedChange": "selectedChange"; }, never, ["[cdsTagIcon],[ibmTagIcon]", "*"], false>;
42
+ }
@@ -40,9 +40,14 @@ export declare class Tag {
40
40
  /**
41
41
  * Tag render size
42
42
  */
43
- size: "sm" | "md";
43
+ size: "sm" | "md" | "lg";
44
44
  class: string;
45
+ skeleton: boolean;
46
+ /**
47
+ * @todo
48
+ * Remove `cds--tag--${this.size}` in v7
49
+ */
45
50
  get attrClass(): string;
46
51
  static ɵfac: i0.ɵɵFactoryDeclaration<Tag, never>;
47
- static ɵcmp: i0.ɵɵComponentDeclaration<Tag, "cds-tag, ibm-tag", never, { "type": "type"; "size": "size"; "class": "class"; }, {}, never, ["*"], false>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<Tag, "cds-tag, ibm-tag", never, { "type": "type"; "size": "size"; "class": "class"; "skeleton": "skeleton"; }, {}, never, ["[cdsTagIcon],[ibmTagIcon]", "*"], false>;
48
53
  }
@@ -21,10 +21,13 @@
21
21
  import * as i0 from "@angular/core";
22
22
  import * as i1 from "./tag.component";
23
23
  import * as i2 from "./tag-filter.component";
24
- import * as i3 from "@angular/common";
25
- import * as i4 from "carbon-components-angular/icon";
24
+ import * as i3 from "./tag-icon.directive";
25
+ import * as i4 from "./tag-selectable.component";
26
+ import * as i5 from "./tag-operational.component";
27
+ import * as i6 from "@angular/common";
28
+ import * as i7 from "carbon-components-angular/icon";
26
29
  export declare class TagModule {
27
30
  static ɵfac: i0.ɵɵFactoryDeclaration<TagModule, never>;
28
- static ɵmod: i0.ɵɵNgModuleDeclaration<TagModule, [typeof i1.Tag, typeof i2.TagFilter], [typeof i3.CommonModule, typeof i4.IconModule], [typeof i1.Tag, typeof i2.TagFilter]>;
31
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TagModule, [typeof i1.Tag, typeof i2.TagFilter, typeof i3.TagIconDirective, typeof i4.TagSelectableComponent, typeof i5.TagOperationalComponent], [typeof i6.CommonModule, typeof i7.IconModule], [typeof i1.Tag, typeof i2.TagFilter, typeof i3.TagIconDirective, typeof i4.TagSelectableComponent, typeof i5.TagOperationalComponent]>;
29
32
  static ɵinj: i0.ɵɵInjectorDeclaration<TagModule>;
30
33
  }