@eui/eds 23.0.0-alpha.6 → 23.0.0-alpha.8

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 (232) hide show
  1. package/docs/changelog.html +86 -0
  2. package/docs/classes/EdsChipModel.html +6 -6
  3. package/docs/classes/{EuiChipTooltip.html → EdsChipTooltip.html} +2 -2
  4. package/docs/components/EdsAlert.html +27 -226
  5. package/docs/components/EdsAlertTitle.html +2 -2
  6. package/docs/components/EdsAvatar.html +35 -108
  7. package/docs/components/EdsAvatarBadge.html +2 -2
  8. package/docs/components/EdsAvatarContent.html +2 -2
  9. package/docs/components/EdsAvatarContentLabel.html +2 -2
  10. package/docs/components/EdsAvatarContentSublabel.html +2 -2
  11. package/docs/components/EdsAvatarIcon.html +2 -2
  12. package/docs/components/EdsAvatarImage.html +2 -2
  13. package/docs/components/EdsAvatarList.html +2 -2
  14. package/docs/components/EdsAvatarText.html +2 -2
  15. package/docs/components/EdsBadge.html +41 -175
  16. package/docs/components/EdsButton.html +123 -123
  17. package/docs/components/EdsChip.html +135 -254
  18. package/docs/components/EdsIcon.html +93 -145
  19. package/docs/components/EdsIconButton.html +72 -86
  20. package/docs/components/EdsIconImage.html +5 -5
  21. package/docs/components/EdsIconState.html +47 -61
  22. package/docs/components/EdsLanguageSelector.html +870 -0
  23. package/docs/components/EdsMenu.html +631 -0
  24. package/docs/components/EdsMenuItemComponent.html +728 -0
  25. package/docs/components/EdsOverlay.html +804 -0
  26. package/docs/components/EdsOverlayContent.html +315 -0
  27. package/docs/components/EdsOverlayFooter.html +315 -0
  28. package/docs/components/EdsOverlayHeader.html +458 -0
  29. package/docs/components/EdsOverlayHeaderActionItems.html +315 -0
  30. package/docs/components/EdsOverlayHeaderLabel.html +315 -0
  31. package/docs/components/EdsOverlayHeaderSublabel.html +315 -0
  32. package/docs/components/EdsPage.html +315 -0
  33. package/docs/components/EdsPageContent.html +319 -0
  34. package/docs/components/EdsPageFooter.html +387 -0
  35. package/docs/components/EdsPageHeader.html +673 -0
  36. package/docs/components/EdsPageHeaderActionItems.html +315 -0
  37. package/docs/components/EdsPageHeaderBody.html +315 -0
  38. package/docs/components/EdsPageHeaderLabel.html +315 -0
  39. package/docs/components/EdsPageHeaderSublabel.html +315 -0
  40. package/docs/components/EdsShell.html +1078 -0
  41. package/docs/components/EdsShellContent.html +315 -0
  42. package/docs/components/EdsShellFooter.html +383 -0
  43. package/docs/components/EdsShellHeader.html +383 -0
  44. package/docs/components/EdsShellHeaderApp.html +443 -0
  45. package/docs/components/EdsShellHeaderEnd.html +311 -0
  46. package/docs/components/EdsShellHeaderEnvironment.html +315 -0
  47. package/docs/components/EdsShellHeaderLogo.html +561 -0
  48. package/docs/components/EdsShellHeaderStart.html +311 -0
  49. package/docs/components/EdsShellMenuToggle.html +458 -0
  50. package/docs/components/EdsShellSidebar.html +413 -0
  51. package/docs/components/EdsShellSidebarBottomNav.html +624 -0
  52. package/docs/components/EdsShellSidebarFooter.html +315 -0
  53. package/docs/components/EdsShellSidebarHeader.html +508 -0
  54. package/docs/components/EdsShellSidebarNav.html +624 -0
  55. package/docs/components/EdsShellToolbar.html +315 -0
  56. package/docs/components/EdsShellToolbarApp.html +443 -0
  57. package/docs/components/EdsShellToolbarEnd.html +315 -0
  58. package/docs/components/EdsShellToolbarEnvironment.html +315 -0
  59. package/docs/components/EdsShellToolbarLogo.html +315 -0
  60. package/docs/components/EdsShellToolbarStart.html +315 -0
  61. package/docs/components/EdsShellTopMessage.html +574 -0
  62. package/docs/components/EdsTab.html +6 -10
  63. package/docs/components/EdsTabBody.html +6 -10
  64. package/docs/components/EdsTabHeader.html +6 -10
  65. package/docs/components/EdsTabHeaderLabel.html +2 -2
  66. package/docs/components/EdsTabHeaderLeftContent.html +2 -2
  67. package/docs/components/EdsTabHeaderRightContent.html +2 -2
  68. package/docs/components/EdsTabHeaderSublabel.html +2 -2
  69. package/docs/components/EdsTabs.html +61 -126
  70. package/docs/components/EdsTabsRightContent.html +2 -2
  71. package/docs/components/EdsTag.html +82 -182
  72. package/docs/components/EdsTooltipContainer.html +2 -2
  73. package/docs/components/EdsUserProfile.html +1336 -0
  74. package/docs/components/EdsUserProfileMenu.html +315 -0
  75. package/docs/components/EdsUserProfileMenuItem.html +511 -0
  76. package/docs/directives/{EuiBaseColorVariantsDirective.html → EdsBaseColorVariantsDirective.html} +174 -91
  77. package/docs/directives/{EuiBaseSizeVariantsDirective.html → EdsBaseSizeVariantsDirective.html} +107 -107
  78. package/docs/directives/EdsResizable.html +586 -0
  79. package/docs/directives/EdsTooltip.html +21 -21
  80. package/docs/interfaces/EdsLanguage.html +368 -0
  81. package/docs/interfaces/EdsMenuItem.html +731 -0
  82. package/docs/js/menu-wc.js +146 -5
  83. package/docs/js/search/search_index.js +2 -2
  84. package/docs/json/EdsAlert.md +7 -7
  85. package/docs/json/EdsAvatar.md +8 -7
  86. package/docs/json/EdsBadge.md +14 -14
  87. package/docs/json/EdsBaseColorVariantsDirective.md +22 -0
  88. package/docs/json/EdsBaseSizeVariantsDirective.md +23 -0
  89. package/docs/json/EdsButton.md +21 -21
  90. package/docs/json/EdsChip.md +15 -14
  91. package/docs/json/EdsIcon.md +23 -23
  92. package/docs/json/EdsIconButton.md +18 -17
  93. package/docs/json/EdsIconImage.md +10 -10
  94. package/docs/json/EdsIconState.md +12 -12
  95. package/docs/json/EdsLanguageSelector.md +16 -0
  96. package/docs/json/EdsMenu.md +17 -0
  97. package/docs/json/EdsMenuItemComponent.md +18 -0
  98. package/docs/json/EdsOverlay.md +19 -0
  99. package/docs/json/EdsOverlayContent.md +8 -0
  100. package/docs/json/EdsOverlayFooter.md +8 -0
  101. package/docs/json/EdsOverlayHeader.md +11 -0
  102. package/docs/json/EdsOverlayHeaderActionItems.md +8 -0
  103. package/docs/json/EdsOverlayHeaderLabel.md +8 -0
  104. package/docs/json/EdsOverlayHeaderSublabel.md +8 -0
  105. package/docs/json/EdsPage.md +8 -0
  106. package/docs/json/EdsPageContent.md +8 -0
  107. package/docs/json/EdsPageFooter.md +11 -0
  108. package/docs/json/EdsPageHeader.md +18 -0
  109. package/docs/json/EdsPageHeaderActionItems.md +8 -0
  110. package/docs/json/EdsPageHeaderBody.md +8 -0
  111. package/docs/json/EdsPageHeaderLabel.md +8 -0
  112. package/docs/json/EdsPageHeaderSublabel.md +8 -0
  113. package/docs/json/EdsResizable.md +24 -0
  114. package/docs/json/EdsShell.md +14 -0
  115. package/docs/json/EdsShellContent.md +8 -0
  116. package/docs/json/EdsShellFooter.md +11 -0
  117. package/docs/json/EdsShellHeader.md +11 -0
  118. package/docs/json/EdsShellHeaderApp.md +13 -0
  119. package/docs/json/EdsShellHeaderEnd.md +8 -0
  120. package/docs/json/EdsShellHeaderEnvironment.md +8 -0
  121. package/docs/json/EdsShellHeaderLogo.md +15 -0
  122. package/docs/json/EdsShellHeaderStart.md +8 -0
  123. package/docs/json/EdsShellMenuToggle.md +11 -0
  124. package/docs/json/EdsShellSidebar.md +12 -0
  125. package/docs/json/EdsShellSidebarBottomNav.md +17 -0
  126. package/docs/json/EdsShellSidebarFooter.md +8 -0
  127. package/docs/json/EdsShellSidebarHeader.md +15 -0
  128. package/docs/json/EdsShellSidebarNav.md +17 -0
  129. package/docs/json/EdsShellToolbar.md +8 -0
  130. package/docs/json/EdsShellToolbarApp.md +13 -0
  131. package/docs/json/EdsShellToolbarEnd.md +8 -0
  132. package/docs/json/EdsShellToolbarEnvironment.md +8 -0
  133. package/docs/json/EdsShellToolbarLogo.md +8 -0
  134. package/docs/json/EdsShellToolbarStart.md +8 -0
  135. package/docs/json/EdsShellTopMessage.md +19 -0
  136. package/docs/json/EdsTabs.md +4 -4
  137. package/docs/json/EdsTag.md +14 -13
  138. package/docs/json/EdsTooltip.md +7 -7
  139. package/docs/json/EdsUserProfile.md +21 -0
  140. package/docs/json/EdsUserProfileMenu.md +8 -0
  141. package/docs/json/EdsUserProfileMenuItem.md +8 -0
  142. package/docs/json/documentation.json +9649 -5338
  143. package/docs/llms.txt +641 -123
  144. package/docs/miscellaneous/typealiases.html +309 -0
  145. package/docs/miscellaneous/variables.html +342 -0
  146. package/docs/overview.html +3 -3
  147. package/docs/properties.html +1 -1
  148. package/eds-language-selector/package.json +4 -0
  149. package/eds-menu/package.json +4 -0
  150. package/eds-overlay/package.json +4 -0
  151. package/eds-page/package.json +4 -0
  152. package/eds-resizable/package.json +4 -0
  153. package/eds-shell/package.json +4 -0
  154. package/eds-user-profile/package.json +4 -0
  155. package/fesm2022/eui-eds-eds-alert.mjs +33 -61
  156. package/fesm2022/eui-eds-eds-alert.mjs.map +1 -1
  157. package/fesm2022/eui-eds-eds-avatar.mjs +29 -43
  158. package/fesm2022/eui-eds-eds-avatar.mjs.map +1 -1
  159. package/fesm2022/eui-eds-eds-badge.mjs +65 -89
  160. package/fesm2022/eui-eds-eds-badge.mjs.map +1 -1
  161. package/fesm2022/eui-eds-eds-button.mjs +70 -99
  162. package/fesm2022/eui-eds-eds-button.mjs.map +1 -1
  163. package/fesm2022/eui-eds-eds-chip.mjs +118 -111
  164. package/fesm2022/eui-eds-eds-chip.mjs.map +1 -1
  165. package/fesm2022/eui-eds-eds-icon-button.mjs +49 -55
  166. package/fesm2022/eui-eds-eds-icon-button.mjs.map +1 -1
  167. package/fesm2022/eui-eds-eds-icon-state.mjs +38 -34
  168. package/fesm2022/eui-eds-eds-icon-state.mjs.map +1 -1
  169. package/fesm2022/eui-eds-eds-icon.mjs +92 -107
  170. package/fesm2022/eui-eds-eds-icon.mjs.map +1 -1
  171. package/fesm2022/eui-eds-eds-language-selector.mjs +67 -0
  172. package/fesm2022/eui-eds-eds-language-selector.mjs.map +1 -0
  173. package/fesm2022/eui-eds-eds-menu.mjs +90 -0
  174. package/fesm2022/eui-eds-eds-menu.mjs.map +1 -0
  175. package/fesm2022/eui-eds-eds-overlay.mjs +141 -0
  176. package/fesm2022/eui-eds-eds-overlay.mjs.map +1 -0
  177. package/fesm2022/eui-eds-eds-page.mjs +129 -0
  178. package/fesm2022/eui-eds-eds-page.mjs.map +1 -0
  179. package/fesm2022/eui-eds-eds-resizable.mjs +193 -0
  180. package/fesm2022/eui-eds-eds-resizable.mjs.map +1 -0
  181. package/fesm2022/eui-eds-eds-shell.mjs +481 -0
  182. package/fesm2022/eui-eds-eds-shell.mjs.map +1 -0
  183. package/fesm2022/eui-eds-eds-tabs.mjs +71 -101
  184. package/fesm2022/eui-eds-eds-tabs.mjs.map +1 -1
  185. package/fesm2022/eui-eds-eds-tag.mjs +74 -77
  186. package/fesm2022/eui-eds-eds-tag.mjs.map +1 -1
  187. package/fesm2022/eui-eds-eds-tooltip.mjs +23 -23
  188. package/fesm2022/eui-eds-eds-tooltip.mjs.map +1 -1
  189. package/fesm2022/eui-eds-eds-user-profile.mjs +231 -0
  190. package/fesm2022/eui-eds-eds-user-profile.mjs.map +1 -0
  191. package/fesm2022/eui-eds-shared.mjs +255 -243
  192. package/fesm2022/eui-eds-shared.mjs.map +1 -1
  193. package/package.json +29 -1
  194. package/types/eui-eds-eds-alert.d.ts +7 -29
  195. package/types/eui-eds-eds-alert.d.ts.map +1 -1
  196. package/types/eui-eds-eds-avatar.d.ts +11 -12
  197. package/types/eui-eds-eds-avatar.d.ts.map +1 -1
  198. package/types/eui-eds-eds-badge.d.ts +15 -20
  199. package/types/eui-eds-eds-badge.d.ts.map +1 -1
  200. package/types/eui-eds-eds-button.d.ts +22 -30
  201. package/types/eui-eds-eds-button.d.ts.map +1 -1
  202. package/types/eui-eds-eds-chip.d.ts +36 -36
  203. package/types/eui-eds-eds-chip.d.ts.map +1 -1
  204. package/types/eui-eds-eds-icon-button.d.ts +13 -16
  205. package/types/eui-eds-eds-icon-button.d.ts.map +1 -1
  206. package/types/eui-eds-eds-icon-state.d.ts +8 -8
  207. package/types/eui-eds-eds-icon-state.d.ts.map +1 -1
  208. package/types/eui-eds-eds-icon.d.ts +22 -29
  209. package/types/eui-eds-eds-icon.d.ts.map +1 -1
  210. package/types/eui-eds-eds-language-selector.d.ts +34 -0
  211. package/types/eui-eds-eds-language-selector.d.ts.map +1 -0
  212. package/types/eui-eds-eds-menu.d.ts +65 -0
  213. package/types/eui-eds-eds-menu.d.ts.map +1 -0
  214. package/types/eui-eds-eds-overlay.d.ts +64 -0
  215. package/types/eui-eds-eds-overlay.d.ts.map +1 -0
  216. package/types/eui-eds-eds-page.d.ts +63 -0
  217. package/types/eui-eds-eds-page.d.ts.map +1 -0
  218. package/types/eui-eds-eds-resizable.d.ts +49 -0
  219. package/types/eui-eds-eds-resizable.d.ts.map +1 -0
  220. package/types/eui-eds-eds-shell.d.ts +229 -0
  221. package/types/eui-eds-eds-shell.d.ts.map +1 -0
  222. package/types/eui-eds-eds-tabs.d.ts +32 -30
  223. package/types/eui-eds-eds-tabs.d.ts.map +1 -1
  224. package/types/eui-eds-eds-tag.d.ts +22 -25
  225. package/types/eui-eds-eds-tag.d.ts.map +1 -1
  226. package/types/eui-eds-eds-tooltip.d.ts +16 -16
  227. package/types/eui-eds-eds-user-profile.d.ts +78 -0
  228. package/types/eui-eds-eds-user-profile.d.ts.map +1 -0
  229. package/types/eui-eds-shared.d.ts +82 -79
  230. package/types/eui-eds-shared.d.ts.map +1 -1
  231. package/docs/json/EuiBaseColorVariantsDirective.md +0 -21
  232. package/docs/json/EuiBaseSizeVariantsDirective.md +0 -23
@@ -1,115 +1,151 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, inject, Renderer2, ElementRef, booleanAttribute, ViewChild, Output, Input, HostBinding, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { computed, input, booleanAttribute, output, viewChild, inject, Renderer2, ElementRef, Input, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import * as i1 from '@eui/eds/shared';
4
- import { EuiBaseSizeVariantsDirective, EuiBaseColorVariantsDirective } from '@eui/eds/shared';
4
+ import { EdsBaseSizeVariantsDirective, EdsBaseColorVariantsDirective } from '@eui/eds/shared';
5
+ import * as i2 from '@eui/eds/eds-icon';
5
6
  import { EDS_ICON } from '@eui/eds/eds-icon';
6
- import { EDS_BUTTON } from '@eui/eds/eds-button';
7
- import * as i2 from '@eui/eds/eds-icon-button';
8
7
  import { EDS_ICON_BUTTON } from '@eui/eds/eds-icon-button';
9
8
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
10
9
 
11
10
  class EdsChip {
12
11
  constructor() {
13
12
  /**
14
- * Sets the `role` attribute for the host element.
13
+ * @description
14
+ * Computes and returns the CSS classes for the component based on its current state.
15
15
  *
16
- * @default 'status'
16
+ * @returns {string} Space-separated string of CSS class names
17
17
  */
18
- this.role = 'status';
18
+ this.hostClasses = computed(() => {
19
+ return [
20
+ 'eds-chip',
21
+ this.sizeVariantsBase.getCssClasses('eds-chip'),
22
+ this.colorVariantsBase.getCssClasses('eds-chip'),
23
+ this.isRemovable() ? 'eds-chip--removable' : '',
24
+ this.isActive() ? 'eds-chip--active' : '',
25
+ this.edsDisabled ? 'eds-chip--disabled' : '',
26
+ ].join(' ').trim();
27
+ }, /* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
19
29
  /**
20
30
  * Sets the `aria-label` attribute for the host element.
21
31
  *
22
32
  * @default 'Chip content'
23
33
  */
24
- this.ariaLabel = 'Chip content';
34
+ this.ariaLabel = input('Chip content', /* @ts-ignore */
35
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
36
+ /**
37
+ * Sets the `role` attribute for the host element.
38
+ *
39
+ * @default 'status'
40
+ */
41
+ this.role = 'status';
25
42
  /**
26
43
  * Sets the `data-e2e` attribute for the host element.
27
44
  *
28
- * @default 'eui-chip'
45
+ * @default 'eds-chip'
29
46
  */
30
- this.e2eAttr = 'eui-chip';
47
+ this.e2eAttr = input('eds-chip', /* @ts-ignore */
48
+ ...(ngDevMode ? [{ debugName: "e2eAttr" }] : /* istanbul ignore next */ []));
49
+ /**
50
+ * Sets the edsInternalId of the chip.
51
+ *
52
+ * @default null
53
+ */
54
+ this.edsInternalId = input('', /* @ts-ignore */
55
+ ...(ngDevMode ? [{ debugName: "edsInternalId" }] : /* istanbul ignore next */ []));
56
+ /**
57
+ * Sets the label of the tooltip to diaply on hover.
58
+ */
59
+ this.tooltipMessage = input('', /* @ts-ignore */
60
+ ...(ngDevMode ? [{ debugName: "tooltipMessage" }] : /* istanbul ignore next */ []));
61
+ /**
62
+ * Sets the id of the chip.
63
+ */
64
+ this.id = input('', /* @ts-ignore */
65
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
31
66
  /**
32
67
  * Sets the data of the chip like tooltip configuration.
33
68
  */
34
69
  // TODO: type should be specific
35
70
  // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html
36
71
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
- this.data = {
72
+ this.data = input({
38
73
  id: crypto.randomUUID(),
39
74
  tooltip: {
40
- color: 'euiTooltipPrimary',
75
+ color: 'edsTooltipPrimary',
41
76
  contentAlignment: null,
42
77
  position: 'above',
43
78
  },
44
- };
79
+ }, /* @ts-ignore */
80
+ ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
45
81
  /**
46
82
  * Wether the chip can be removed.
47
83
  *
48
84
  * @default false
49
85
  */
50
- this.isChipRemovable = false;
51
- this.isActive = false;
86
+ this.isRemovable = input(false, { ...(ngDevMode ? { debugName: "isRemovable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
87
+ this.isActive = input(false, { ...(ngDevMode ? { debugName: "isActive" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
52
88
  /**
53
89
  * Event emitted when the chip is removed.
54
90
  */
55
91
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
56
- this.remove = new EventEmitter();
57
- this.sizeVariantsBase = inject(EuiBaseSizeVariantsDirective);
58
- this.colorVariantsBase = inject(EuiBaseColorVariantsDirective);
92
+ this.chipRemove = output();
93
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
94
+ this.chipClick = output();
95
+ /**
96
+ * Icon declares by user in the chip
97
+ */
98
+ this.chipLabel = viewChild.required('chipLabel');
99
+ this.sizeVariantsBase = inject(EdsBaseSizeVariantsDirective);
100
+ this.colorVariantsBase = inject(EdsBaseColorVariantsDirective);
59
101
  this._renderer = inject(Renderer2);
60
102
  this._elementRef = inject(ElementRef);
61
- this._euiDisabled = false;
62
- }
63
- /**
64
- * @description
65
- * Computes and returns the CSS classes for the component based on its current state.
66
- *
67
- * @returns {string} Space-separated string of CSS class names
68
- */
69
- get cssClasses() {
70
- return [
71
- 'eds-chip',
72
- this.sizeVariantsBase.getCssClasses('eds-chip'),
73
- this.colorVariantsBase.getCssClasses('eds-chip'),
74
- this.isChipRemovable ? 'eds-chip--removable' : '',
75
- this.isActive ? 'eds-chip--active' : '',
76
- this.euiDisabled ? 'eds-chip--disabled' : '',
77
- ].join(' ').trim();
78
- }
79
- get tabindexAttr() {
80
- return (this.isChipRemovable || this.euiDisabled) ? '-1' : '0';
103
+ this._edsDisabled = false;
81
104
  }
82
105
  /**
83
106
  * @description
84
107
  * Controls the disabled state of the button
85
108
  * When true, adds the disabled attribute and prevents interaction
86
109
  */
87
- get euiDisabled() {
88
- return this._euiDisabled;
110
+ get edsDisabled() {
111
+ return this._edsDisabled;
89
112
  }
90
- set euiDisabled(value) {
91
- this._euiDisabled = coerceBooleanProperty(value);
92
- if (this._euiDisabled) {
113
+ set edsDisabled(value) {
114
+ this._edsDisabled = coerceBooleanProperty(value);
115
+ if (this._edsDisabled) {
93
116
  this._renderer.setAttribute(this._elementRef.nativeElement, 'disabled', 'true');
94
117
  }
95
118
  else {
96
119
  this._renderer.removeAttribute(this._elementRef.nativeElement, 'disabled');
97
120
  }
98
121
  }
122
+ onHostClick(event) {
123
+ if (this.edsDisabled) {
124
+ return;
125
+ }
126
+ if (this.isRemovable()) {
127
+ this.onRemove(event);
128
+ }
129
+ else {
130
+ this.onClick(event);
131
+ }
132
+ }
99
133
  ngOnInit() {
100
- if (!this.sizeVariantsBase.euiSizeVariant) {
101
- this.sizeVariantsBase.euiSizeM = true;
134
+ if (!this.sizeVariantsBase.edsSizeVariant) {
135
+ this.sizeVariantsBase.edsSizeM = true;
102
136
  }
103
- if (!this.colorVariantsBase.euiColorVariant) {
104
- this.colorVariantsBase.euiNeutral = true;
137
+ if (!this.colorVariantsBase.edsColorVariant) {
138
+ this.colorVariantsBase.edsNeutral = true;
105
139
  }
106
140
  }
107
141
  ngAfterContentInit() {
108
- if (!this.data.id && this.id) {
109
- this.data = Object.assign(this.data, { id: this.id });
142
+ if (!this.data().id && this.id()) {
143
+ // Note: input signals are read-only, so we work with the value
144
+ const currentData = this.data();
145
+ Object.assign(currentData, { id: this.id() });
110
146
  }
111
- // checks if the parent element is an eui-chip-list to set role listitem or if a parent above in case cdkdroplist interferes
112
- if (this._elementRef.nativeElement.parentElement?.classList.contains('eui-chip-list__chip-container') || this._elementRef.nativeElement.parentElement?.parentElement?.classList.contains('eui-chip-list__chip-container')) {
147
+ // checks if the parent element is an eds-chip-list to set role listitem or if a parent above in case cdkdroplist interferes
148
+ if (this._elementRef.nativeElement.parentElement?.classList.contains('eds-chip-list__chip-container') || this._elementRef.nativeElement.parentElement?.parentElement?.classList.contains('eds-chip-list__chip-container')) {
113
149
  this.role = 'listitem';
114
150
  }
115
151
  }
@@ -120,83 +156,54 @@ class EdsChip {
120
156
  */
121
157
  onRemove(event) {
122
158
  if (event instanceof KeyboardEvent && event.code === 'Backspace') {
123
- this.remove.emit({ chip: this.data, event });
159
+ this.chipRemove.emit({ chip: this.data(), event });
124
160
  }
125
161
  else {
126
- this.remove.emit(this.data);
162
+ this.chipRemove.emit(this.data());
127
163
  }
128
164
  }
165
+ onClick(event) {
166
+ this.chipClick.emit(this.data());
167
+ }
129
168
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsChip, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
130
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EdsChip, isStandalone: true, selector: "eds-chip, span[edsChip], li[edsChip]", inputs: { ariaLabel: "ariaLabel", e2eAttr: "e2eAttr", euiInternalId: "euiInternalId", tooltipMessage: "tooltipMessage", id: "id", data: "data", isChipRemovable: ["isChipRemovable", "isChipRemovable", booleanAttribute], isActive: ["isActive", "isActive", booleanAttribute], euiDisabled: "euiDisabled" }, outputs: { remove: "remove" }, host: { properties: { "class": "this.cssClasses", "attr.tabindex": "this.tabindexAttr", "attr.role": "this.role", "attr.aria-label": "this.ariaLabel", "attr.data-e2e": "this.e2eAttr" } }, viewQueries: [{ propertyName: "chipLabel", first: true, predicate: ["chipLabel"], descendants: true }], hostDirectives: [{ directive: i1.EuiBaseSizeVariantsDirective, inputs: ["euiSizeM", "euiSizeM", "euiSizeL", "euiSizeL", "euiSizeVariant", "euiSizeVariant"] }, { directive: i1.EuiBaseColorVariantsDirective, inputs: ["euiNeutral", "euiNeutral", "euiSuccess", "euiSuccess", "euiInfo", "euiInfo", "euiWarning", "euiWarning", "euiCritical", "euiCritical", "euiColorVariant", "euiColorVariant"] }], ngImport: i0, template: "<div class=\"eds-chip__content\" #chipLabel>\n <ng-content></ng-content>\n</div>\n@if (isChipRemovable) {\n <button edsIconButton class=\"eds-chip__close\"\n ariaLabel=\"Remove {{ chipLabel.textContent }} chip\"\n icon=\"x\" euiSizeXS euiRounded>\n </button>\n}\n", styles: [".eui-21 :host.eds-chip.eds-chip--size-m{--_font-size: var(--eds-f-s-s);--_chip-padding: var(--eds-sp-4xs) var(--eds-sp-2xs);--_icon-size: var(--eds-is-s);--_height: var(--eds-sp-xl)}.eui-21 :host.eds-chip.eds-chip--size-l{--_font-size: var(--eds-f-s-m);--_chip-padding: var(--eds-sp-3xs) var(--eds-sp-2xs);--_icon-size: var(--eds-is-m);--_height: var(--eds-sp-2xl)}.eui-21 :host.eds-chip.eds-chip{--_surface: transparent;--_on-surface: var(--eds-c-foreground-primary);--_border-color: var(--eds-c-border-primary-subtle);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-chip.eds-chip--active{--_surface: var(--eds-c-surface-primary);--_on-surface: var(--eds-c-on-surface-primary);--_border-color: transparent;--_surface-hover: var(--eds-c-surface-primary--hover);--_on-surface-hover: var(--eds-c-on-surface-primary--hover);--_surface-active: var(--eds-c-surface-primary--pressed);--_on-surface-active: var(--eds-c-on-surface-primary--pressed)}.eui-21 :host.eds-chip.eds-chip--disabled{--_surface: var(--eds-c-surface-disabled-subtle);--_on-surface: var(--eds-c-foreground-disabled);--_border-color: var(--eds-c-border-disabled);--_surface-hover: var(--eds-c-surface-disabled-subtle);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-disabled-subtle);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-chip{border-radius:var(--eds-br-full);display:inline-flex;border:var(--eds-bw-xs) solid var(--_border-color);padding:var(--_chip-padding);font-size:var(--_font-size);background-color:var(--_surface);color:var(--_on-surface);height:var(--_height);cursor:pointer}.eui-21 :host.eds-chip:not(.eds-chip--disabled):focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-full)!important}.eui-21 :host.eds-chip.eds-chip--disabled{cursor:default}.eui-21 :host.eds-chip:hover{background-color:var(--_surface-hover);color:var(--_on-surface-hover)}.eui-21 :host.eds-chip:active{background-color:var(--_surface-active);color:var(--_on-surface-active)}.eui-21 :host.eds-chip .eds-chip__content{display:inline-flex;align-items:center;background:transparent;gap:var(--eds-sp-2xs)}.eui-21 :host.eds-chip .eds-chip__close{padding-left:var(--eds-sp-3xs);--_button-padding: var(--eds-sp-4xs);--_surface-hover: var(--_surface-hover)}\n"], dependencies: [{ kind: "component", type: i2.EdsIconButton, selector: "button[edsIconButton]", inputs: ["icon", "ariaLabel", "euiRounded", "euiDisabled"], outputs: ["buttonClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
169
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EdsChip, isStandalone: true, selector: "eds-chip, span[edsChip], li[edsChip]", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, e2eAttr: { classPropertyName: "e2eAttr", publicName: "e2eAttr", isSignal: true, isRequired: false, transformFunction: null }, edsInternalId: { classPropertyName: "edsInternalId", publicName: "edsInternalId", isSignal: true, isRequired: false, transformFunction: null }, tooltipMessage: { classPropertyName: "tooltipMessage", publicName: "tooltipMessage", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, isRemovable: { classPropertyName: "isRemovable", publicName: "isRemovable", isSignal: true, isRequired: false, transformFunction: null }, isActive: { classPropertyName: "isActive", publicName: "isActive", isSignal: true, isRequired: false, transformFunction: null }, edsDisabled: { classPropertyName: "edsDisabled", publicName: "edsDisabled", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { chipRemove: "chipRemove", chipClick: "chipClick" }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class": "hostClasses()", "attr.tabindex": "edsDisabled ? \"-1\" : \"0\"", "attr.role": "role", "attr.aria-label": "ariaLabel()", "attr.data-e2e": "e2eAttr()" } }, viewQueries: [{ propertyName: "chipLabel", first: true, predicate: ["chipLabel"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.EdsBaseSizeVariantsDirective, inputs: ["edsSizeM", "edsSizeM", "edsSizeL", "edsSizeL", "edsSizeVariant", "edsSizeVariant"] }, { directive: i1.EdsBaseColorVariantsDirective, inputs: ["edsNeutral", "edsNeutral", "edsSuccess", "edsSuccess", "edsInfo", "edsInfo", "edsWarning", "edsWarning", "edsCritical", "edsCritical", "edsColorVariant", "edsColorVariant"] }], ngImport: i0, template: "<div class=\"eds-chip__content\" #chipLabel>\n <ng-content></ng-content>\n</div>\n@if (isRemovable()) {\n <eds-icon ariaLabel=\"Remove {{ chipLabel.textContent }} chip\" icon=\"x\" edsSizeXS/>\n}\n", styles: [".eui-21 :host.eds-chip.eds-chip--size-m{--_font: var(--eds-f-paragraph-s);--_chip-padding: var(--eds-sp-4xs) var(--eds-sp-2xs);--_icon-size: var(--eds-is-s);--_height: var(--eds-sp-xl)}.eui-21 :host.eds-chip.eds-chip--size-l{--_font: var(--eds-f-paragraph-s);--_chip-padding: var(--eds-sp-3xs) var(--eds-sp-2xs);--_icon-size: var(--eds-is-m);--_height: var(--eds-sp-2xl)}.eui-21 :host.eds-chip.eds-chip{--_surface: transparent;--_on-surface: var(--eds-c-foreground-primary);--_border-color: var(--eds-c-border-primary-subtle);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-chip.eds-chip--active{--_surface: var(--eds-c-surface-primary);--_on-surface: var(--eds-c-on-surface-primary);--_border-color: transparent;--_surface-hover: var(--eds-c-surface-primary--hover);--_on-surface-hover: var(--eds-c-on-surface-primary--hover);--_surface-active: var(--eds-c-surface-primary--pressed);--_on-surface-active: var(--eds-c-on-surface-primary--pressed)}.eui-21 :host.eds-chip.eds-chip--disabled{--_surface: var(--eds-c-surface-disabled-subtle);--_on-surface: var(--eds-c-foreground-disabled);--_border-color: var(--eds-c-border-disabled);--_surface-hover: var(--eds-c-surface-disabled-subtle);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-disabled-subtle);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-chip{border-radius:var(--eds-br-full);display:inline-flex;border:var(--eds-bw-xs) solid var(--_border-color);padding:var(--_chip-padding);font:var(--_font);background-color:var(--_surface);color:var(--_on-surface);height:var(--_height);cursor:pointer;gap:var(--eds-sp-2xs);align-items:center}.eui-21 :host.eds-chip:not(.eds-chip--disabled):focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-full)!important}.eui-21 :host.eds-chip.eds-chip--disabled{cursor:default}.eui-21 :host.eds-chip:hover{background-color:var(--_surface-hover);color:var(--_on-surface-hover)}.eui-21 :host.eds-chip:active{background-color:var(--_surface-active);color:var(--_on-surface-active)}.eui-21 :host.eds-chip .eds-chip__content{display:inline-flex;align-items:center;background:transparent;gap:var(--eds-sp-2xs)}.eui-21 :host.eds-chip .eds-chip__close{margin-left:var(--eds-sp-xs)}\n"], dependencies: [{ kind: "component", type: i2.EdsIcon, selector: "eds-icon, span[edsIcon]", inputs: ["icon", "set", "ariaLabel", "ariaHidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
131
170
  }
132
171
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsChip, decorators: [{
133
172
  type: Component,
134
173
  args: [{ selector: 'eds-chip, span[edsChip], li[edsChip]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
135
174
  ...EDS_ICON,
136
175
  ...EDS_ICON_BUTTON,
137
- ...EDS_BUTTON,
138
- ], hostDirectives: [
176
+ ], host: {
177
+ '[class]': 'hostClasses()',
178
+ '[attr.tabindex]': 'edsDisabled ? "-1" : "0"',
179
+ '[attr.role]': 'role',
180
+ '[attr.aria-label]': 'ariaLabel()',
181
+ '[attr.data-e2e]': 'e2eAttr()',
182
+ '(click)': 'onHostClick($event)',
183
+ }, hostDirectives: [
139
184
  {
140
- directive: EuiBaseSizeVariantsDirective,
185
+ directive: EdsBaseSizeVariantsDirective,
141
186
  inputs: [
142
- 'euiSizeM',
143
- 'euiSizeL',
144
- 'euiSizeVariant',
187
+ 'edsSizeM',
188
+ 'edsSizeL',
189
+ 'edsSizeVariant',
145
190
  ],
146
191
  },
147
192
  {
148
- directive: EuiBaseColorVariantsDirective,
193
+ directive: EdsBaseColorVariantsDirective,
149
194
  inputs: [
150
- 'euiNeutral',
151
- 'euiSuccess',
152
- 'euiInfo',
153
- 'euiWarning',
154
- 'euiCritical',
155
- 'euiColorVariant',
195
+ 'edsNeutral',
196
+ 'edsSuccess',
197
+ 'edsInfo',
198
+ 'edsWarning',
199
+ 'edsCritical',
200
+ 'edsColorVariant',
156
201
  ],
157
202
  },
158
- ], template: "<div class=\"eds-chip__content\" #chipLabel>\n <ng-content></ng-content>\n</div>\n@if (isChipRemovable) {\n <button edsIconButton class=\"eds-chip__close\"\n ariaLabel=\"Remove {{ chipLabel.textContent }} chip\"\n icon=\"x\" euiSizeXS euiRounded>\n </button>\n}\n", styles: [".eui-21 :host.eds-chip.eds-chip--size-m{--_font-size: var(--eds-f-s-s);--_chip-padding: var(--eds-sp-4xs) var(--eds-sp-2xs);--_icon-size: var(--eds-is-s);--_height: var(--eds-sp-xl)}.eui-21 :host.eds-chip.eds-chip--size-l{--_font-size: var(--eds-f-s-m);--_chip-padding: var(--eds-sp-3xs) var(--eds-sp-2xs);--_icon-size: var(--eds-is-m);--_height: var(--eds-sp-2xl)}.eui-21 :host.eds-chip.eds-chip{--_surface: transparent;--_on-surface: var(--eds-c-foreground-primary);--_border-color: var(--eds-c-border-primary-subtle);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-chip.eds-chip--active{--_surface: var(--eds-c-surface-primary);--_on-surface: var(--eds-c-on-surface-primary);--_border-color: transparent;--_surface-hover: var(--eds-c-surface-primary--hover);--_on-surface-hover: var(--eds-c-on-surface-primary--hover);--_surface-active: var(--eds-c-surface-primary--pressed);--_on-surface-active: var(--eds-c-on-surface-primary--pressed)}.eui-21 :host.eds-chip.eds-chip--disabled{--_surface: var(--eds-c-surface-disabled-subtle);--_on-surface: var(--eds-c-foreground-disabled);--_border-color: var(--eds-c-border-disabled);--_surface-hover: var(--eds-c-surface-disabled-subtle);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-disabled-subtle);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-chip{border-radius:var(--eds-br-full);display:inline-flex;border:var(--eds-bw-xs) solid var(--_border-color);padding:var(--_chip-padding);font-size:var(--_font-size);background-color:var(--_surface);color:var(--_on-surface);height:var(--_height);cursor:pointer}.eui-21 :host.eds-chip:not(.eds-chip--disabled):focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-full)!important}.eui-21 :host.eds-chip.eds-chip--disabled{cursor:default}.eui-21 :host.eds-chip:hover{background-color:var(--_surface-hover);color:var(--_on-surface-hover)}.eui-21 :host.eds-chip:active{background-color:var(--_surface-active);color:var(--_on-surface-active)}.eui-21 :host.eds-chip .eds-chip__content{display:inline-flex;align-items:center;background:transparent;gap:var(--eds-sp-2xs)}.eui-21 :host.eds-chip .eds-chip__close{padding-left:var(--eds-sp-3xs);--_button-padding: var(--eds-sp-4xs);--_surface-hover: var(--_surface-hover)}\n"] }]
159
- }], propDecorators: { cssClasses: [{
160
- type: HostBinding,
161
- args: ['class']
162
- }], tabindexAttr: [{
163
- type: HostBinding,
164
- args: ['attr.tabindex']
165
- }], role: [{
166
- type: HostBinding,
167
- args: ['attr.role']
168
- }], ariaLabel: [{
169
- type: Input
170
- }, {
171
- type: HostBinding,
172
- args: ['attr.aria-label']
173
- }], e2eAttr: [{
174
- type: HostBinding,
175
- args: ['attr.data-e2e']
176
- }, {
177
- type: Input
178
- }], euiInternalId: [{
179
- type: Input
180
- }], tooltipMessage: [{
181
- type: Input
182
- }], id: [{
183
- type: Input
184
- }], data: [{
185
- type: Input
186
- }], isChipRemovable: [{
187
- type: Input,
188
- args: [{ transform: booleanAttribute }]
189
- }], isActive: [{
190
- type: Input,
191
- args: [{ transform: booleanAttribute }]
192
- }], euiDisabled: [{
203
+ ], template: "<div class=\"eds-chip__content\" #chipLabel>\n <ng-content></ng-content>\n</div>\n@if (isRemovable()) {\n <eds-icon ariaLabel=\"Remove {{ chipLabel.textContent }} chip\" icon=\"x\" edsSizeXS/>\n}\n", styles: [".eui-21 :host.eds-chip.eds-chip--size-m{--_font: var(--eds-f-paragraph-s);--_chip-padding: var(--eds-sp-4xs) var(--eds-sp-2xs);--_icon-size: var(--eds-is-s);--_height: var(--eds-sp-xl)}.eui-21 :host.eds-chip.eds-chip--size-l{--_font: var(--eds-f-paragraph-s);--_chip-padding: var(--eds-sp-3xs) var(--eds-sp-2xs);--_icon-size: var(--eds-is-m);--_height: var(--eds-sp-2xl)}.eui-21 :host.eds-chip.eds-chip{--_surface: transparent;--_on-surface: var(--eds-c-foreground-primary);--_border-color: var(--eds-c-border-primary-subtle);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-chip.eds-chip--active{--_surface: var(--eds-c-surface-primary);--_on-surface: var(--eds-c-on-surface-primary);--_border-color: transparent;--_surface-hover: var(--eds-c-surface-primary--hover);--_on-surface-hover: var(--eds-c-on-surface-primary--hover);--_surface-active: var(--eds-c-surface-primary--pressed);--_on-surface-active: var(--eds-c-on-surface-primary--pressed)}.eui-21 :host.eds-chip.eds-chip--disabled{--_surface: var(--eds-c-surface-disabled-subtle);--_on-surface: var(--eds-c-foreground-disabled);--_border-color: var(--eds-c-border-disabled);--_surface-hover: var(--eds-c-surface-disabled-subtle);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-disabled-subtle);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-chip{border-radius:var(--eds-br-full);display:inline-flex;border:var(--eds-bw-xs) solid var(--_border-color);padding:var(--_chip-padding);font:var(--_font);background-color:var(--_surface);color:var(--_on-surface);height:var(--_height);cursor:pointer;gap:var(--eds-sp-2xs);align-items:center}.eui-21 :host.eds-chip:not(.eds-chip--disabled):focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-full)!important}.eui-21 :host.eds-chip.eds-chip--disabled{cursor:default}.eui-21 :host.eds-chip:hover{background-color:var(--_surface-hover);color:var(--_on-surface-hover)}.eui-21 :host.eds-chip:active{background-color:var(--_surface-active);color:var(--_on-surface-active)}.eui-21 :host.eds-chip .eds-chip__content{display:inline-flex;align-items:center;background:transparent;gap:var(--eds-sp-2xs)}.eui-21 :host.eds-chip .eds-chip__close{margin-left:var(--eds-sp-xs)}\n"] }]
204
+ }], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], e2eAttr: [{ type: i0.Input, args: [{ isSignal: true, alias: "e2eAttr", required: false }] }], edsInternalId: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsInternalId", required: false }] }], tooltipMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipMessage", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], isRemovable: [{ type: i0.Input, args: [{ isSignal: true, alias: "isRemovable", required: false }] }], isActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "isActive", required: false }] }], edsDisabled: [{
193
205
  type: Input
194
- }], remove: [{
195
- type: Output
196
- }], chipLabel: [{
197
- type: ViewChild,
198
- args: ['chipLabel']
199
- }] } });
206
+ }], chipRemove: [{ type: i0.Output, args: ["chipRemove"] }], chipClick: [{ type: i0.Output, args: ["chipClick"] }], chipLabel: [{ type: i0.ViewChild, args: ['chipLabel', { isSignal: true }] }] } });
200
207
 
201
208
  class EdsChipModel {
202
209
  constructor(values = {}) {
@@ -205,11 +212,11 @@ class EdsChipModel {
205
212
  this.isRounded = false;
206
213
  this.isDisabled = false;
207
214
  this.variant = 'primary';
208
- this.tooltip = new EuiChipTooltip();
215
+ this.tooltip = new EdsChipTooltip();
209
216
  Object.assign(this, values);
210
217
  }
211
218
  }
212
- class EuiChipTooltip {
219
+ class EdsChipTooltip {
213
220
  constructor(values = {}) {
214
221
  this.position = 'above';
215
222
  this.contentAlignment = 'center';
@@ -226,5 +233,5 @@ const EDS_CHIP = [
226
233
  * Generated bundle index. Do not edit.
227
234
  */
228
235
 
229
- export { EDS_CHIP, EdsChip, EdsChipModel, EuiChipTooltip };
236
+ export { EDS_CHIP, EdsChip, EdsChipModel, EdsChipTooltip };
230
237
  //# sourceMappingURL=eui-eds-eds-chip.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"eui-eds-eds-chip.mjs","sources":["../../eds-chip/eds-chip.ts","../../eds-chip/eds-chip.html","../../eds-chip/models/eui-chip.model.ts","../../eds-chip/index.ts","../../eds-chip/eui-eds-eds-chip.ts"],"sourcesContent":["import {\n Component,\n HostBinding,\n Input,\n ChangeDetectionStrategy,\n AfterContentInit,\n Output,\n EventEmitter,\n ViewChild,\n ElementRef,\n booleanAttribute,\n inject,\n OnInit,\n Renderer2,\n} from '@angular/core';\n\nimport { EuiBaseColorVariantsDirective, EuiBaseSizeVariantsDirective } from '@eui/eds/shared';\nimport { EDS_ICON } from '@eui/eds/eds-icon';\nimport { EDS_BUTTON } from '@eui/eds/eds-button';\nimport { EDS_ICON_BUTTON } from '@eui/eds/eds-icon-button';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\n\n@Component({\n templateUrl: './eds-chip.html',\n selector: 'eds-chip, span[edsChip], li[edsChip]',\n styleUrl: './eds-chip.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ...EDS_ICON,\n ...EDS_ICON_BUTTON,\n ...EDS_BUTTON,\n ],\n hostDirectives: [\n {\n directive: EuiBaseSizeVariantsDirective,\n inputs: [\n 'euiSizeM',\n 'euiSizeL',\n 'euiSizeVariant',\n ],\n }, \n {\n directive: EuiBaseColorVariantsDirective,\n inputs: [\n 'euiNeutral',\n 'euiSuccess',\n 'euiInfo',\n 'euiWarning',\n 'euiCritical',\n 'euiColorVariant',\n ],\n },\n ],\n})\nexport class EdsChip implements OnInit, AfterContentInit {\n /**\n * @description\n * Computes and returns the CSS classes for the component based on its current state.\n *\n * @returns {string} Space-separated string of CSS class names\n */\n @HostBinding('class')\n get cssClasses(): string {\n return [\n 'eds-chip',\n this.sizeVariantsBase.getCssClasses('eds-chip'),\n this.colorVariantsBase.getCssClasses('eds-chip'),\n this.isChipRemovable ? 'eds-chip--removable' : '',\n this.isActive ? 'eds-chip--active': '',\n this.euiDisabled ? 'eds-chip--disabled': '',\n ].join(' ').trim();\n }\n @HostBinding('attr.tabindex') get tabindexAttr(): string | null {\n return (this.isChipRemovable || this.euiDisabled) ? '-1' : '0';\n } \n\n /**\n * Sets the `role` attribute for the host element.\n *\n * @default 'status'\n */\n @HostBinding('attr.role') role = 'status';\n /**\n * Sets the `aria-label` attribute for the host element.\n *\n * @default 'Chip content'\n */\n @Input() @HostBinding('attr.aria-label') ariaLabel = 'Chip content';\n\n /**\n * Sets the `data-e2e` attribute for the host element.\n *\n * @default 'eui-chip'\n */\n @HostBinding('attr.data-e2e')\n @Input()\n e2eAttr = 'eui-chip';\n\n /**\n * Sets the euiInternalId of the chip.\n *\n * @default null\n */\n @Input() euiInternalId!: string;\n /**\n * Sets the label of the tooltip to diaply on hover.\n */\n @Input() tooltipMessage!: string;\n /**\n * Sets the id of the chip.\n */\n @Input() id!: string | number;\n /**\n * Sets the data of the chip like tooltip configuration.\n */\n // TODO: type should be specific\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Input() data: any = {\n id: crypto.randomUUID(),\n tooltip: {\n color: 'euiTooltipPrimary',\n contentAlignment: null,\n position: 'above',\n },\n };\n\n /**\n * Wether the chip can be removed.\n *\n * @default false\n */\n @Input({ transform: booleanAttribute }) isChipRemovable = false;\n\n @Input({ transform: booleanAttribute }) isActive = false;\n\n /**\n * @description\n * Controls the disabled state of the button\n * When true, adds the disabled attribute and prevents interaction\n */\n @Input()\n public get euiDisabled(): boolean {\n return this._euiDisabled;\n }\n public set euiDisabled(value: BooleanInput) {\n this._euiDisabled = coerceBooleanProperty(value);\n if (this._euiDisabled) {\n this._renderer.setAttribute(this._elementRef.nativeElement, 'disabled', 'true');\n } else {\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'disabled');\n }\n }\n\n /**\n * Event emitted when the chip is removed.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Output() remove = new EventEmitter<any>();\n\n /**\n * Icon declares by user in the chip\n */\n @ViewChild('chipLabel') chipLabel!: ElementRef<HTMLInputElement>;\n \n protected sizeVariantsBase: EuiBaseSizeVariantsDirective = inject(EuiBaseSizeVariantsDirective);\n protected colorVariantsBase: EuiBaseColorVariantsDirective = inject(EuiBaseColorVariantsDirective);\n\n protected _renderer: Renderer2 = inject(Renderer2);\n private _elementRef = inject(ElementRef);\n private _euiDisabled = false;\n\n ngOnInit(): void {\n if (!this.sizeVariantsBase.euiSizeVariant) {\n this.sizeVariantsBase.euiSizeM = true;\n }\n if (!this.colorVariantsBase.euiColorVariant) {\n this.colorVariantsBase.euiNeutral = true;\n } \n }\n\n ngAfterContentInit(): void {\n if (!this.data.id && this.id) {\n this.data = Object.assign(this.data, { id: this.id });\n }\n // checks if the parent element is an eui-chip-list to set role listitem or if a parent above in case cdkdroplist interferes\n if (this._elementRef.nativeElement.parentElement?.classList.contains('eui-chip-list__chip-container') || this._elementRef.nativeElement.parentElement?.parentElement?.classList.contains('eui-chip-list__chip-container')) {\n this.role = 'listitem'\n }\n }\n\n /**\n * Remove chip handler\n *\n * @param event Click event\n */\n public onRemove(event?: Event): void {\n if (event instanceof KeyboardEvent && (event as KeyboardEvent).code === 'Backspace') {\n this.remove.emit({ chip: this.data, event });\n } else {\n this.remove.emit(this.data);\n }\n }\n}\n","<div class=\"eds-chip__content\" #chipLabel>\n <ng-content></ng-content>\n</div>\n@if (isChipRemovable) {\n <button edsIconButton class=\"eds-chip__close\"\n ariaLabel=\"Remove {{ chipLabel.textContent }} chip\"\n icon=\"x\" euiSizeXS euiRounded>\n </button>\n}\n","export class EdsChipModel {\n id!: string | number;\n euiInternalId!: string;\n label!: string;\n isRemovable = false;\n isOutline = false;\n isRounded = false;\n isDisabled = false;\n variant: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger' | 'accent' = 'primary';\n tooltip: EuiChipTooltip = new EuiChipTooltip();\n iconClass?: string;\n iconSvgName?: string;\n\n constructor(values = {}) {\n Object.assign(this, values);\n }\n}\n\nexport class EuiChipTooltip {\n tooltipMessage!: string;\n position?: 'above' | 'below' | 'left' | 'right' | 'before' | 'after' = 'above';\n contentAlignment?: 'center' | 'left' | 'right' | 'justify' = 'center';\n delay? = 0;\n\n constructor(values = {}) {\n Object.assign(this, values);\n }\n}\n","import { EdsChip } from './eds-chip';\n\nexport * from './models/eui-chip.model';\nexport * from './eds-chip';\n\nexport const EDS_CHIP = [\n EdsChip,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAsDa,OAAO,CAAA;AAhCpB,IAAA,WAAA,GAAA;AAsDI;;;;AAIG;QACuB,IAAA,CAAA,IAAI,GAAG,QAAQ;AACzC;;;;AAIG;QACsC,IAAA,CAAA,SAAS,GAAG,cAAc;AAEnE;;;;AAIG;QAGH,IAAA,CAAA,OAAO,GAAG,UAAU;AAgBpB;;AAEG;;;;AAIM,QAAA,IAAA,CAAA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K;QAClB,IAAA,CAAA,OAAO,GAAmF,SAAS;AACnG,QAAA,IAAA,CAAA,OAAO,GAAmB,IAAI,cAAc,EAAE;AAK1C,QAAA,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC;IAC/B;AACH;MAEY,cAAc,CAAA;IAMvB,WAAA,CAAY,MAAM,GAAG,EAAE,EAAA;QAJvB,IAAA,CAAA,QAAQ,GAA+D,OAAO;QAC9E,IAAA,CAAA,gBAAgB,GAA6C,QAAQ;QACrE,IAAA,CAAA,KAAK,GAAI,CAAC;AAGN,QAAA,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC;IAC/B;AACH;;ACtBM,MAAM,QAAQ,GAAG;IACpB,OAAO;;;ACNX;;AAEG;;;;"}
1
+ {"version":3,"file":"eui-eds-eds-chip.mjs","sources":["../../eds-chip/eds-chip.ts","../../eds-chip/eds-chip.html","../../eds-chip/models/eui-chip.model.ts","../../eds-chip/index.ts","../../eds-chip/eui-eds-eds-chip.ts"],"sourcesContent":["import {\n Component,\n Input,\n ChangeDetectionStrategy,\n AfterContentInit,\n viewChild,\n ElementRef,\n booleanAttribute,\n inject,\n input,\n output,\n computed,\n OnInit,\n Renderer2,\n} from '@angular/core';\n\nimport { EdsBaseColorVariantsDirective, EdsBaseSizeVariantsDirective } from '@eui/eds/shared';\nimport { EDS_ICON } from '@eui/eds/eds-icon';\nimport { EDS_ICON_BUTTON } from '@eui/eds/eds-icon-button';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\n\n@Component({\n templateUrl: './eds-chip.html',\n selector: 'eds-chip, span[edsChip], li[edsChip]',\n styleUrl: './eds-chip.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ...EDS_ICON,\n ...EDS_ICON_BUTTON,\n ],\n host: {\n '[class]': 'hostClasses()',\n '[attr.tabindex]': 'edsDisabled ? \"-1\" : \"0\"',\n '[attr.role]': 'role',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.data-e2e]': 'e2eAttr()',\n '(click)': 'onHostClick($event)',\n },\n hostDirectives: [\n {\n directive: EdsBaseSizeVariantsDirective,\n inputs: [\n 'edsSizeM',\n 'edsSizeL',\n 'edsSizeVariant',\n ],\n },\n {\n directive: EdsBaseColorVariantsDirective,\n inputs: [\n 'edsNeutral',\n 'edsSuccess',\n 'edsInfo',\n 'edsWarning',\n 'edsCritical',\n 'edsColorVariant',\n ],\n },\n ],\n})\nexport class EdsChip implements OnInit, AfterContentInit {\n /**\n * @description\n * Computes and returns the CSS classes for the component based on its current state.\n *\n * @returns {string} Space-separated string of CSS class names\n */\n hostClasses = computed(() => {\n return [\n 'eds-chip',\n this.sizeVariantsBase.getCssClasses('eds-chip'),\n this.colorVariantsBase.getCssClasses('eds-chip'),\n this.isRemovable() ? 'eds-chip--removable' : '',\n this.isActive() ? 'eds-chip--active': '',\n this.edsDisabled ? 'eds-chip--disabled': '',\n ].join(' ').trim();\n });\n\n /**\n * Sets the `aria-label` attribute for the host element.\n *\n * @default 'Chip content'\n */\n ariaLabel = input('Chip content');\n\n /**\n * Sets the `role` attribute for the host element.\n *\n * @default 'status'\n */\n role = 'status';\n\n /**\n * Sets the `data-e2e` attribute for the host element.\n *\n * @default 'eds-chip'\n */\n e2eAttr = input('eds-chip');\n\n /**\n * Sets the edsInternalId of the chip.\n *\n * @default null\n */\n edsInternalId = input<string>('');\n /**\n * Sets the label of the tooltip to diaply on hover.\n */\n tooltipMessage = input<string>('');\n /**\n * Sets the id of the chip.\n */\n id = input<string | number>('');\n /**\n * Sets the data of the chip like tooltip configuration.\n */\n // TODO: type should be specific\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n data = input<any>({\n id: crypto.randomUUID(),\n tooltip: {\n color: 'edsTooltipPrimary',\n contentAlignment: null,\n position: 'above',\n },\n });\n\n /**\n * Wether the chip can be removed.\n *\n * @default false\n */\n isRemovable = input(false, { transform: booleanAttribute });\n\n isActive = input(false, { transform: booleanAttribute });\n\n /**\n * @description\n * Controls the disabled state of the button\n * When true, adds the disabled attribute and prevents interaction\n */\n @Input()\n public get edsDisabled(): boolean {\n return this._edsDisabled;\n }\n public set edsDisabled(value: BooleanInput) {\n this._edsDisabled = coerceBooleanProperty(value);\n if (this._edsDisabled) {\n this._renderer.setAttribute(this._elementRef.nativeElement, 'disabled', 'true');\n } else {\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'disabled');\n }\n }\n\n /**\n * Event emitted when the chip is removed.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n chipRemove = output<any>();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n chipClick = output<any>();\n\n /**\n * Icon declares by user in the chip\n */\n readonly chipLabel = viewChild.required<ElementRef<HTMLInputElement>>('chipLabel');\n\n onHostClick(event?: Event): void {\n if (this.edsDisabled) {\n return;\n }\n\n if (this.isRemovable()) {\n this.onRemove(event);\n } else {\n this.onClick(event);\n }\n }\n\n protected sizeVariantsBase: EdsBaseSizeVariantsDirective = inject(EdsBaseSizeVariantsDirective);\n protected colorVariantsBase: EdsBaseColorVariantsDirective = inject(EdsBaseColorVariantsDirective);\n\n protected _renderer: Renderer2 = inject(Renderer2);\n private _elementRef = inject(ElementRef);\n private _edsDisabled = false;\n\n ngOnInit(): void {\n if (!this.sizeVariantsBase.edsSizeVariant) {\n this.sizeVariantsBase.edsSizeM = true;\n }\n if (!this.colorVariantsBase.edsColorVariant) {\n this.colorVariantsBase.edsNeutral = true;\n }\n }\n\n ngAfterContentInit(): void {\n if (!this.data().id && this.id()) {\n // Note: input signals are read-only, so we work with the value\n const currentData = this.data();\n Object.assign(currentData, { id: this.id() });\n }\n // checks if the parent element is an eds-chip-list to set role listitem or if a parent above in case cdkdroplist interferes\n if (this._elementRef.nativeElement.parentElement?.classList.contains('eds-chip-list__chip-container') || this._elementRef.nativeElement.parentElement?.parentElement?.classList.contains('eds-chip-list__chip-container')) {\n this.role = 'listitem'\n }\n }\n\n /**\n * Remove chip handler\n *\n * @param event Click event\n */\n private onRemove(event?: Event): void {\n if (event instanceof KeyboardEvent && (event as KeyboardEvent).code === 'Backspace') {\n this.chipRemove.emit({ chip: this.data(), event });\n } else {\n this.chipRemove.emit(this.data());\n }\n }\n\n private onClick(event?: Event): void {\n this.chipClick.emit(this.data());\n }\n}\n","<div class=\"eds-chip__content\" #chipLabel>\n <ng-content></ng-content>\n</div>\n@if (isRemovable()) {\n <eds-icon ariaLabel=\"Remove {{ chipLabel.textContent }} chip\" icon=\"x\" edsSizeXS/>\n}\n","export class EdsChipModel {\n id!: string | number;\n edsInternalId!: string;\n label!: string;\n isRemovable = false;\n isOutline = false;\n isRounded = false;\n isDisabled = false;\n variant: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger' | 'accent' = 'primary';\n tooltip: EdsChipTooltip = new EdsChipTooltip();\n iconClass?: string;\n iconSvgName?: string;\n\n constructor(values = {}) {\n Object.assign(this, values);\n }\n}\n\nexport class EdsChipTooltip {\n tooltipMessage!: string;\n position?: 'above' | 'below' | 'left' | 'right' | 'before' | 'after' = 'above';\n contentAlignment?: 'center' | 'left' | 'right' | 'justify' = 'center';\n delay? = 0;\n\n constructor(values = {}) {\n Object.assign(this, values);\n }\n}\n","import { EdsChip } from './eds-chip';\n\nexport * from './models/eui-chip.model';\nexport * from './eds-chip';\n\nexport const EDS_CHIP = [\n EdsChip,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MA4Da,OAAO,CAAA;AAvCpB,IAAA,WAAA,GAAA;AAwCI;;;;;AAKG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;YACxB,OAAO;gBACH,UAAU;AACV,gBAAA,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,UAAU,CAAC;AAC/C,gBAAA,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC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B,6BAAA;AACJ,yBAAA;AACJ,qBAAA,EAAA,QAAA,EAAA,6MAAA,EAAA,MAAA,EAAA,CAAA,y+EAAA,CAAA,EAAA;;sBAoFA;yKAwBqE,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;MEtKxE,YAAY,CAAA;IAarB,WAAA,CAAY,MAAM,GAAG,EAAE,EAAA;QATvB,IAAA,CAAA,WAAW,GAAG,KAAK;QACnB,IAAA,CAAA,SAAS,GAAG,KAAK;QACjB,IAAA,CAAA,SAAS,GAAG,KAAK;QACjB,IAAA,CAAA,UAAU,GAAG,KAAK;QAClB,IAAA,CAAA,OAAO,GAAmF,SAAS;AACnG,QAAA,IAAA,CAAA,OAAO,GAAmB,IAAI,cAAc,EAAE;AAK1C,QAAA,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC;IAC/B;AACH;MAEY,cAAc,CAAA;IAMvB,WAAA,CAAY,MAAM,GAAG,EAAE,EAAA;QAJvB,IAAA,CAAA,QAAQ,GAA+D,OAAO;QAC9E,IAAA,CAAA,gBAAgB,GAA6C,QAAQ;QACrE,IAAA,CAAA,KAAK,GAAI,CAAC;AAGN,QAAA,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC;IAC/B;AACH;;ACtBM,MAAM,QAAQ,GAAG;IACpB,OAAO;;;ACNX;;AAEG;;;;"}
@@ -1,93 +1,87 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, EventEmitter, booleanAttribute, Output, Input, HostBinding, Component } from '@angular/core';
2
+ import { computed, input, booleanAttribute, inject, output, Component } from '@angular/core';
3
3
  import * as i2 from '@eui/eds/eds-icon';
4
4
  import { EDS_ICON } from '@eui/eds/eds-icon';
5
5
  import * as i1 from '@eui/eds/shared';
6
- import { EuiBaseSizeVariantsDirective, EuiBaseColorVariantsDirective } from '@eui/eds/shared';
6
+ import { EdsBaseSizeVariantsDirective, EdsBaseColorVariantsDirective } from '@eui/eds/shared';
7
7
 
8
8
  class EdsIconButton {
9
9
  constructor() {
10
+ this.hostClasses = computed(() => {
11
+ return [
12
+ 'eds-icon-button',
13
+ this.sizeVariantsBase.getCssClasses('eds-icon-button'),
14
+ this.colorVariantsBase.getCssClasses('eds-icon-button'),
15
+ this.edsRounded() ? 'eds-icon-button--rounded' : '',
16
+ this.edsDisabled() ? 'eds-icon-button--disabled' : '',
17
+ ]
18
+ .join(' ')
19
+ .trim();
20
+ }, /* @ts-ignore */
21
+ ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
22
+ /**
23
+ * The name of the icon to display from the eUI icon library.
24
+ */
25
+ this.icon = input('', /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
10
27
  /**
11
28
  * Accessible label for screen readers describing the button's purpose.
12
- * @default 'eUI Icon button'
29
+ * @default 'EDS Icon button'
13
30
  */
14
- this.ariaLabel = 'eUI Icon button';
31
+ this.ariaLabel = input('EDS Icon button', /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
15
33
  /**
16
34
  * Applies rounded corners to the button shape instead of default square corners. Default: false
17
35
  */
18
- this.euiRounded = false;
19
- this.euiDisabled = false;
20
- this.sizeVariantsBase = inject(EuiBaseSizeVariantsDirective);
21
- this.colorVariantsBase = inject(EuiBaseColorVariantsDirective);
36
+ this.edsRounded = input(false, { ...(ngDevMode ? { debugName: "edsRounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
37
+ this.edsDisabled = input(false, { ...(ngDevMode ? { debugName: "edsDisabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
38
+ this.sizeVariantsBase = inject(EdsBaseSizeVariantsDirective);
39
+ this.colorVariantsBase = inject(EdsBaseColorVariantsDirective);
22
40
  /**
23
41
  * Emitted when the button is clicked. Payload contains the native click Event object.
24
42
  */
25
- this.buttonClick = new EventEmitter();
26
- }
27
- get cssClasses() {
28
- return [
29
- 'eds-icon-button',
30
- this.sizeVariantsBase.getCssClasses('eds-icon-button'),
31
- this.colorVariantsBase.getCssClasses('eds-icon-button'),
32
- this.euiRounded ? 'eds-icon-button--rounded' : '',
33
- this.euiDisabled ? 'eds-icon-button--disabled' : '',
34
- ]
35
- .join(' ')
36
- .trim();
43
+ this.buttonClick = output();
37
44
  }
38
45
  onClick(event) {
39
46
  this.buttonClick.emit(event);
40
47
  }
41
48
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsIconButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
42
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "22.0.5", type: EdsIconButton, isStandalone: true, selector: "button[edsIconButton]", inputs: { icon: "icon", ariaLabel: "ariaLabel", euiRounded: ["euiRounded", "euiRounded", booleanAttribute], euiDisabled: ["euiDisabled", "euiDisabled", booleanAttribute] }, outputs: { buttonClick: "buttonClick" }, host: { listeners: { "click": "onClick($any($event))" }, properties: { "tabIndex": "euiDisabled ? -1 : 0", "attr.ariaLabel": "ariaLabel", "class": "this.cssClasses" } }, hostDirectives: [{ directive: i1.EuiBaseSizeVariantsDirective, inputs: ["euiSize2XS", "euiSize2XS", "euiSizeXS", "euiSizeXS", "euiSizeS", "euiSizeS", "euiSizeM", "euiSizeM", "euiSizeL", "euiSizeL", "euiSizeVariant", "euiSizeVariant"] }, { directive: i1.EuiBaseColorVariantsDirective, inputs: ["euiNeutral", "euiNeutral", "euiSuccess", "euiSuccess", "euiInfo", "euiInfo", "euiWarning", "euiWarning", "euiCritical", "euiCritical", "euiDisabled", "euiDisabled", "euiColorVariant", "euiColorVariant"] }], ngImport: i0, template: "<eds-icon [icon]=\"icon\" [euiColorVariant]=\"colorVariantsBase.euiColorVariant\" [euiSizeVariant]=\"sizeVariantsBase.euiSizeVariant\">\n <ng-content select=\"eui-badge\"/>\n</eds-icon>\n", styles: [".eui-21 :host.eds-icon-button{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-neutral-subtle));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-neutral-subtle));--_padding: var(--_button-padding, var(--eds-sp-3xs));--_color: var(--eds-c-foreground-subtle)}.eui-21 :host.eds-icon-button.eds-icon-button--neutral{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-neutral-subtle--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-neutral-subtle--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--info{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-info-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-info-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--success{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-success-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-success-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--warning{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-warning-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-warning-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--critical{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-critical-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-critical-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--disabled{--_color: var(--_button-color, var(--eds-c-foreground-disabled));--_surface-hover: transparent;--_on-surface-hover: var(--_color)}.eui-21 :host.eds-icon-button.eds-icon-button--size-2xs{--_padding: var(--_button-padding, var(--eds-sp-2xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-xs{--_padding: var(--_button-padding, var(--eds-sp-2xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-s{--_padding: var(--_button-padding, var(--eds-sp-2xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-m{--_padding: var(--_button-padding, var(--eds-sp-xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-l{--_padding: var(--_button-padding, var(--eds-sp-s))}.eui-21 :host.eds-icon-button{display:inline-flex;border:none;cursor:pointer;background-color:inherit;padding:var(--_padding);position:relative}.eui-21 :host.eds-icon-button:hover,.eui-21 :host.eds-icon-button:active{background-color:var(--_surface-hover);color:var(--_on-surface-hover)}.eui-21 :host.eds-icon-button.eds-icon-button--rounded{border-radius:var(--eds-br-full)}.eui-21 :host.eds-icon-button.eds-icon-button--disabled{cursor:default}.eui-21 :host.eds-icon-button:not(.eds-icon-button:disabled):focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-xs)!important}.eui-21 :host.eds-icon-button:not(.eds-icon-button:disabled).eds-icon-button--rounded:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-full)!important}\n"], dependencies: [{ kind: "component", type: i2.EdsIcon, selector: "eds-icon, span[edsIcon]", inputs: ["icon", "set", "ariaLabel", "ariaHidden"] }] }); }
49
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: EdsIconButton, isStandalone: true, selector: "button[edsIconButton]", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, edsRounded: { classPropertyName: "edsRounded", publicName: "edsRounded", isSignal: true, isRequired: false, transformFunction: null }, edsDisabled: { classPropertyName: "edsDisabled", publicName: "edsDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick" }, host: { listeners: { "click": "onClick($any($event))" }, properties: { "class": "hostClasses()", "tabIndex": "edsDisabled() ? -1 : 0", "attr.ariaLabel": "ariaLabel()" } }, hostDirectives: [{ directive: i1.EdsBaseSizeVariantsDirective, inputs: ["edsSize2XS", "edsSize2XS", "edsSizeXS", "edsSizeXS", "edsSizeS", "edsSizeS", "edsSizeM", "edsSizeM", "edsSizeL", "edsSizeL", "edsSizeVariant", "edsSizeVariant"] }, { directive: i1.EdsBaseColorVariantsDirective, inputs: ["edsBrand", "edsBrand", "edsNeutral", "edsNeutral", "edsSuccess", "edsSuccess", "edsInfo", "edsInfo", "edsWarning", "edsWarning", "edsCritical", "edsCritical", "edsDisabled", "edsDisabled", "edsColorVariant", "edsColorVariant"] }], ngImport: i0, template: "<eds-icon [icon]=\"icon()\" [edsColorVariant]=\"colorVariantsBase.edsColorVariant\" [edsSizeVariant]=\"sizeVariantsBase.edsSizeVariant\">\n <ng-content select=\"eds-badge\"/>\n</eds-icon>\n", styles: [".eui-21 :host.eds-icon-button{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-neutral-subtle));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-neutral-subtle));--_padding: var(--_button-padding, var(--eds-sp-3xs));--_color: var(--eds-c-foreground-subtle)}.eui-21 :host.eds-icon-button.eds-icon-button--brand{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-brand--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-brand--hover));--_color: var(--_button-color, var(--eds-c-on-surface-brand))}.eui-21 :host.eds-icon-button.eds-icon-button--neutral{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-neutral-subtle--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-neutral-subtle--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--info{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-info-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-info-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--success{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-success-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-success-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--warning{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-warning-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-warning-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--critical{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-critical-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-critical-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--disabled{--_color: var(--_button-color, var(--eds-c-foreground-disabled));--_surface-hover: transparent;--_on-surface-hover: var(--_color)}.eui-21 :host.eds-icon-button.eds-icon-button--size-2xs{--_padding: var(--_button-padding, var(--eds-sp-2xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-xs{--_padding: var(--_button-padding, var(--eds-sp-2xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-s{--_padding: var(--_button-padding, var(--eds-sp-2xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-m{--_padding: var(--_button-padding, var(--eds-sp-xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-l{--_padding: var(--_button-padding, var(--eds-sp-s))}.eui-21 :host.eds-icon-button{display:inline-flex;border:none;cursor:pointer;background-color:inherit;padding:var(--_padding);position:relative;color:var(--_color)}.eui-21 :host.eds-icon-button:hover,.eui-21 :host.eds-icon-button:active{background-color:var(--_surface-hover);color:var(--_on-surface-hover)}.eui-21 :host.eds-icon-button.eds-icon-button--rounded{border-radius:var(--eds-br-full)}.eui-21 :host.eds-icon-button.eds-icon-button--disabled{cursor:default}.eui-21 :host.eds-icon-button:not(.eds-icon-button:disabled):focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-xs)!important}.eui-21 :host.eds-icon-button:not(.eds-icon-button:disabled).eds-icon-button--rounded:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-full)!important}\n"], dependencies: [{ kind: "component", type: i2.EdsIcon, selector: "eds-icon, span[edsIcon]", inputs: ["icon", "set", "ariaLabel", "ariaHidden"] }] }); }
43
50
  }
44
51
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsIconButton, decorators: [{
45
52
  type: Component,
46
53
  args: [{ selector: 'button[edsIconButton]', imports: [...EDS_ICON], host: {
47
- '[tabIndex]': 'euiDisabled ? -1 : 0',
48
- '[attr.ariaLabel]': 'ariaLabel',
54
+ '[class]': 'hostClasses()',
55
+ '[tabIndex]': 'edsDisabled() ? -1 : 0',
56
+ '[attr.ariaLabel]': 'ariaLabel()',
49
57
  '(click)': 'onClick($any($event))',
50
58
  }, hostDirectives: [
51
59
  {
52
- directive: EuiBaseSizeVariantsDirective,
60
+ directive: EdsBaseSizeVariantsDirective,
53
61
  inputs: [
54
- 'euiSize2XS',
55
- 'euiSizeXS',
56
- 'euiSizeS',
57
- 'euiSizeM',
58
- 'euiSizeL',
59
- 'euiSizeVariant',
62
+ 'edsSize2XS',
63
+ 'edsSizeXS',
64
+ 'edsSizeS',
65
+ 'edsSizeM',
66
+ 'edsSizeL',
67
+ 'edsSizeVariant',
60
68
  ],
61
69
  },
62
70
  {
63
- directive: EuiBaseColorVariantsDirective,
71
+ directive: EdsBaseColorVariantsDirective,
64
72
  inputs: [
65
- 'euiNeutral',
66
- 'euiSuccess',
67
- 'euiInfo',
68
- 'euiWarning',
69
- 'euiCritical',
70
- 'euiDisabled',
71
- 'euiColorVariant',
73
+ 'edsBrand',
74
+ 'edsNeutral',
75
+ 'edsSuccess',
76
+ 'edsInfo',
77
+ 'edsWarning',
78
+ 'edsCritical',
79
+ 'edsDisabled',
80
+ 'edsColorVariant',
72
81
  ],
73
82
  },
74
- ], template: "<eds-icon [icon]=\"icon\" [euiColorVariant]=\"colorVariantsBase.euiColorVariant\" [euiSizeVariant]=\"sizeVariantsBase.euiSizeVariant\">\n <ng-content select=\"eui-badge\"/>\n</eds-icon>\n", styles: [".eui-21 :host.eds-icon-button{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-neutral-subtle));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-neutral-subtle));--_padding: var(--_button-padding, var(--eds-sp-3xs));--_color: var(--eds-c-foreground-subtle)}.eui-21 :host.eds-icon-button.eds-icon-button--neutral{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-neutral-subtle--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-neutral-subtle--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--info{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-info-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-info-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--success{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-success-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-success-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--warning{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-warning-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-warning-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--critical{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-critical-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-critical-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--disabled{--_color: var(--_button-color, var(--eds-c-foreground-disabled));--_surface-hover: transparent;--_on-surface-hover: var(--_color)}.eui-21 :host.eds-icon-button.eds-icon-button--size-2xs{--_padding: var(--_button-padding, var(--eds-sp-2xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-xs{--_padding: var(--_button-padding, var(--eds-sp-2xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-s{--_padding: var(--_button-padding, var(--eds-sp-2xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-m{--_padding: var(--_button-padding, var(--eds-sp-xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-l{--_padding: var(--_button-padding, var(--eds-sp-s))}.eui-21 :host.eds-icon-button{display:inline-flex;border:none;cursor:pointer;background-color:inherit;padding:var(--_padding);position:relative}.eui-21 :host.eds-icon-button:hover,.eui-21 :host.eds-icon-button:active{background-color:var(--_surface-hover);color:var(--_on-surface-hover)}.eui-21 :host.eds-icon-button.eds-icon-button--rounded{border-radius:var(--eds-br-full)}.eui-21 :host.eds-icon-button.eds-icon-button--disabled{cursor:default}.eui-21 :host.eds-icon-button:not(.eds-icon-button:disabled):focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-xs)!important}.eui-21 :host.eds-icon-button:not(.eds-icon-button:disabled).eds-icon-button--rounded:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-full)!important}\n"] }]
75
- }], propDecorators: { cssClasses: [{
76
- type: HostBinding,
77
- args: ['class']
78
- }], icon: [{
79
- type: Input
80
- }], ariaLabel: [{
81
- type: Input
82
- }], euiRounded: [{
83
- type: Input,
84
- args: [{ transform: booleanAttribute }]
85
- }], euiDisabled: [{
86
- type: Input,
87
- args: [{ transform: booleanAttribute }]
88
- }], buttonClick: [{
89
- type: Output
90
- }] } });
83
+ ], template: "<eds-icon [icon]=\"icon()\" [edsColorVariant]=\"colorVariantsBase.edsColorVariant\" [edsSizeVariant]=\"sizeVariantsBase.edsSizeVariant\">\n <ng-content select=\"eds-badge\"/>\n</eds-icon>\n", styles: [".eui-21 :host.eds-icon-button{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-neutral-subtle));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-neutral-subtle));--_padding: var(--_button-padding, var(--eds-sp-3xs));--_color: var(--eds-c-foreground-subtle)}.eui-21 :host.eds-icon-button.eds-icon-button--brand{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-brand--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-brand--hover));--_color: var(--_button-color, var(--eds-c-on-surface-brand))}.eui-21 :host.eds-icon-button.eds-icon-button--neutral{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-neutral-subtle--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-neutral-subtle--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--info{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-info-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-info-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--success{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-success-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-success-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--warning{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-warning-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-warning-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--critical{--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-critical-subtler--hover));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-critical-subtler--hover))}.eui-21 :host.eds-icon-button.eds-icon-button--disabled{--_color: var(--_button-color, var(--eds-c-foreground-disabled));--_surface-hover: transparent;--_on-surface-hover: var(--_color)}.eui-21 :host.eds-icon-button.eds-icon-button--size-2xs{--_padding: var(--_button-padding, var(--eds-sp-2xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-xs{--_padding: var(--_button-padding, var(--eds-sp-2xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-s{--_padding: var(--_button-padding, var(--eds-sp-2xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-m{--_padding: var(--_button-padding, var(--eds-sp-xs))}.eui-21 :host.eds-icon-button.eds-icon-button--size-l{--_padding: var(--_button-padding, var(--eds-sp-s))}.eui-21 :host.eds-icon-button{display:inline-flex;border:none;cursor:pointer;background-color:inherit;padding:var(--_padding);position:relative;color:var(--_color)}.eui-21 :host.eds-icon-button:hover,.eui-21 :host.eds-icon-button:active{background-color:var(--_surface-hover);color:var(--_on-surface-hover)}.eui-21 :host.eds-icon-button.eds-icon-button--rounded{border-radius:var(--eds-br-full)}.eui-21 :host.eds-icon-button.eds-icon-button--disabled{cursor:default}.eui-21 :host.eds-icon-button:not(.eds-icon-button:disabled):focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-xs)!important}.eui-21 :host.eds-icon-button:not(.eds-icon-button:disabled).eds-icon-button--rounded:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:1px!important;border-radius:var(--eds-br-full)!important}\n"] }]
84
+ }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], edsRounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsRounded", required: false }] }], edsDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsDisabled", required: false }] }], buttonClick: [{ type: i0.Output, args: ["buttonClick"] }] } });
91
85
 
92
86
  const EDS_ICON_BUTTON = [
93
87
  EdsIconButton,