@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 +1 @@
1
- {"version":3,"file":"eui-eds-eds-badge.mjs","sources":["../../eds-badge/eds-badge.ts","../../eds-badge/eds-badge.html","../../eds-badge/index.ts","../../eds-badge/eui-eds-eds-badge.ts"],"sourcesContent":["import {\n Component,\n HostBinding,\n ChangeDetectionStrategy,\n Input,\n ViewChild,\n ElementRef,\n AfterViewInit,\n ChangeDetectorRef,\n booleanAttribute,\n inject,\n signal,\n OnInit,\n} from '@angular/core';\nimport { ObserversModule } from '@angular/cdk/observers';\nimport { EuiBaseColorVariantsDirective, EuiBaseSizeVariantsDirective } from '@eui/eds/shared';\n\n@Component({\n selector: 'div[edsBadge], span[edsBadge], eds-badge',\n templateUrl: './eds-badge.html',\n styleUrl: './eds-badge.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ObserversModule],\n hostDirectives: [\n {\n directive: EuiBaseSizeVariantsDirective,\n inputs: [\n 'euiSizeXS',\n 'euiSizeS',\n 'euiSizeM',\n 'euiSizeL',\n 'euiSizeVariant',\n ],\n },\n {\n directive: EuiBaseColorVariantsDirective,\n inputs: [\n 'euiNeutral',\n 'euiInfo',\n 'euiSuccess',\n 'euiWarning',\n 'euiCritical',\n 'euiColorVariant',\n ],\n }, \n ], \n})\nexport class EdsBadge implements OnInit, AfterViewInit {\n /**\n * @description\n * Computes and returns the CSS classes for the badge based on its current state\n *\n * @returns {string} Space-separated string of CSS class names\n */\n @HostBinding('class')\n public get cssClasses(): string {\n return [\n 'eds-badge',\n this.sizeVariantsBase.getCssClasses('eds-badge'),\n this.colorVariantsBase.getCssClasses('eds-badge'),\n this.isEmpty() || this.euiDottedBadge ? 'eds-badge--empty' : '',\n this.euiBadgeIcon ? 'eds-badge--icon-only' : '',\n this.euiOutline ? 'eds-badge--outline' : '',\n ].join(' ').trim();\n }\n\n /** @description Data attribute for e2e testing */\n @HostBinding('attr.data-e2e') @Input() e2eAttr = 'eds-badge';\n\n /** @description ARIA role for accessibility */\n @HostBinding('attr.role') role = 'status';\n\n /** @description ARIA label for accessibility */\n @HostBinding('attr.aria-label') @Input('aria-label') ariaLabel: string | null = 'badge';\n\n /**\n * Maximum number of characters to display before truncating.\n * When content exceeds this limit, it will be replaced with charReplacement value.\n * Useful for displaying large numbers in a compact format (e.g., \"99+\" for values over 99).\n */\n @Input() maxCharCount = 0;\n\n /**\n * String to display when content is truncated due to maxCharCount.\n * @default '99+'\n */\n @Input() charReplacement = '';\n\n /**\n * Whether the badge contains only an icon (displays as a small dot indicator).\n * When true, no text content is shown, creating a minimal status indicator.\n * @default false\n */\n @Input({ transform: booleanAttribute }) euiBadgeIcon = false;\n\n /**\n * Whether to display the badge with dotted styling variant.\n * Applies alternative visual treatment to the badge.\n * @default false\n */\n @Input({ transform: booleanAttribute }) euiDottedBadge = false;\n\n @Input({ transform: booleanAttribute }) euiOutline = false;\n \n @ViewChild('contentRef', { static: false }) content!: ElementRef;\n\n protected sizeVariantsBase: EuiBaseSizeVariantsDirective = inject(EuiBaseSizeVariantsDirective);\n protected colorVariantsBase: EuiBaseColorVariantsDirective = inject(EuiBaseColorVariantsDirective);\n\n protected hasContentUpdated = false;\n protected updatedContent!: string;\n // protected baseStatesDirective = inject(BaseStatesDirective);\n private cdRef = inject(ChangeDetectorRef);\n private isEmpty = signal(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 ngAfterViewInit(): void {\n if (this.content) {\n this.isEmpty.set(this.content.nativeElement.childNodes.length === 0);\n this.cdRef.detectChanges();\n if (!this.isEmpty()) {\n this._checkContent();\n this.cdRef.detectChanges(); \n }\n }\n }\n\n /**\n * @description\n * Handles content changes and triggers content checking\n */\n onContentChanged(): void {\n this._checkContent();\n }\n\n /**\n * @description\n * Checks if content exceeds maxCharCount and updates content if necessary\n * @private\n */\n private _checkContent(): void {\n if (this.maxCharCount !== 0) {\n const contentText = this.content.nativeElement.outerText;\n if (contentText && contentText.length > this.maxCharCount) {\n this.hasContentUpdated = true;\n this.updatedContent = this.charReplacement || '99+';\n this.cdRef.markForCheck();\n }\n }\n }\n}\n","@if (hasContentUpdated) {\n <span class=\"eds-badge-wrapper\">\n {{ updatedContent }}\n </span>\n} @else {\n <span class=\"eds-badge-wrapper\" #contentRef (cdkObserveContent)=\"onContentChanged()\">\n <ng-content></ng-content>\n </span>\n}\n","import { EdsBadge } from './eds-badge';\n\nexport * from './eds-badge';\n\nexport const EDS_BADGE = [\n EdsBadge,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"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AE,EAAE,MAAM,EAAE,KAAK,EAAE;;;AEpGvC,MAAM,SAAS,GAAG;IACrB,QAAQ;;;ACLZ;;AAEG;;;;"}
1
+ {"version":3,"file":"eui-eds-eds-badge.mjs","sources":["../../eds-badge/eds-badge.ts","../../eds-badge/eds-badge.html","../../eds-badge/index.ts","../../eds-badge/eui-eds-eds-badge.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n input,\n ElementRef,\n AfterViewInit,\n ChangeDetectorRef,\n booleanAttribute,\n inject,\n signal,computed,\n OnInit,\n viewChild,\n} from '@angular/core';\nimport { ObserversModule } from '@angular/cdk/observers';\nimport { EdsBaseColorVariantsDirective, EdsBaseSizeVariantsDirective } from '@eui/eds/shared';\n\n@Component({\n selector: 'div[edsBadge], span[edsBadge], eds-badge',\n templateUrl: './eds-badge.html',\n styleUrl: './eds-badge.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ObserversModule],\n host: {\n '[class]': 'hostClasses()',\n '[attr.data-e2e]': 'e2eAttr()',\n role: 'status',\n '[attr.aria-label]': 'ariaLabel()',\n },\n hostDirectives: [\n {\n directive: EdsBaseSizeVariantsDirective,\n inputs: [\n 'edsSizeXS',\n 'edsSizeS',\n 'edsSizeM',\n 'edsSizeL',\n 'edsSizeVariant',\n ],\n },\n {\n directive: EdsBaseColorVariantsDirective,\n inputs: [\n 'edsNeutral',\n 'edsInfo',\n 'edsSuccess',\n 'edsWarning',\n 'edsCritical',\n 'edsColorVariant',\n ],\n },\n ],\n})\nexport class EdsBadge implements OnInit, AfterViewInit {\n /**\n * @description\n * Computes and returns the CSS classes for the badge based on its current state\n *\n * @returns {string} Space-separated string of CSS class names\n */\n hostClasses = computed(() => {\n return [\n 'eds-badge',\n this.sizeVariantsBase.getCssClasses('eds-badge'),\n this.colorVariantsBase.getCssClasses('eds-badge'),\n this.isEmpty() || this.edsDottedBadge() ? 'eds-badge--empty' : '',\n this.edsBadgeIcon() ? 'eds-badge--icon-only' : '',\n this.edsOutline() ? 'eds-badge--outline' : '',\n ].join(' ').trim();\n });\n\n /** @description Data attribute for e2e testing */\n e2eAttr = input('eds-badge');\n\n /** @description ARIA label for accessibility */\n ariaLabel = input<string | null>('badge', { alias: 'aria-label' });\n\n /**\n * Maximum number of characters to display before truncating.\n * When content exceeds this limit, it will be replaced with charReplacement value.\n * Useful for displaying large numbers in a compact format (e.g., \"99+\" for values over 99).\n */\n maxCharCount = input(0);\n\n /**\n * String to display when content is truncated due to maxCharCount.\n * @default '99+'\n */\n charReplacement = input('');\n\n /**\n * Whether the badge contains only an icon (displays as a small dot indicator).\n * When true, no text content is shown, creating a minimal status indicator.\n * @default false\n */\n edsBadgeIcon = input(false, { transform: booleanAttribute });\n\n /**\n * Whether to display the badge with dotted styling variant.\n * Applies alternative visual treatment to the badge.\n * @default false\n */\n edsDottedBadge = input(false, { transform: booleanAttribute });\n\n edsOutline = input(false, { transform: booleanAttribute });\n\n readonly content = viewChild.required<ElementRef>('contentRef');\n\n protected sizeVariantsBase: EdsBaseSizeVariantsDirective = inject(EdsBaseSizeVariantsDirective);\n protected colorVariantsBase: EdsBaseColorVariantsDirective = inject(EdsBaseColorVariantsDirective);\n\n protected hasContentUpdated = false;\n protected updatedContent!: string;\n // protected baseStatesDirective = inject(BaseStatesDirective);\n private cdRef = inject(ChangeDetectorRef);\n private isEmpty = signal(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 ngAfterViewInit(): void {\n const content = this.content();\n if (content) {\n this.isEmpty.set(content.nativeElement.childNodes.length === 0);\n this.cdRef.detectChanges();\n if (!this.isEmpty()) {\n this._checkContent();\n this.cdRef.detectChanges();\n }\n }\n }\n\n /**\n * @description\n * Handles content changes and triggers content checking\n */\n onContentChanged(): void {\n this._checkContent();\n }\n\n /**\n * @description\n * Checks if content exceeds maxCharCount and updates content if necessary\n * @private\n */\n private _checkContent(): void {\n if (this.maxCharCount() !== 0) {\n const contentText = this.content().nativeElement.outerText;\n if (contentText && contentText.length > this.maxCharCount()) {\n this.hasContentUpdated = true;\n this.updatedContent = this.charReplacement() || '99+';\n this.cdRef.markForCheck();\n }\n }\n }\n}\n","@if (hasContentUpdated) {\n <span class=\"eds-badge-wrapper\">\n {{ updatedContent }}\n </span>\n} @else {\n <span class=\"eds-badge-wrapper\" #contentRef (cdkObserveContent)=\"onContentChanged()\">\n <ng-content></ng-content>\n </span>\n}\n","import { EdsBadge } from './eds-badge';\n\nexport * from './eds-badge';\n\nexport const EDS_BADGE = [\n EdsBadge,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAoDa,QAAQ,CAAA;AApCrB,IAAA,WAAA,GAAA;AAqCI;;;;;AAKG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;YACxB,OAAO;gBACH,WAAW;AACX,gBAAA,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,WAAW,CAAC;AAChD,gBAAA,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,WAAW,CAAC;AACjD,gBAAA,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,GAAG,kBAAkB,GAAG,EAAE;gBACjE,IAAI,CAAC,YAAY,EAAE,GAAG,sBAAsB,GAAG,EAAE;gBACjD,IAAI,CAAC,UAAU,EAAE,GAAG,oBAAoB,GAAG,EAAE;AAChD,aAAA,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;QACtB,CAAC;wFAAC;;QAGF,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,WAAW;oFAAC;;QAG5B,IAAA,CAAA,SAAS,GAAG,KAAK,CAAgB,OAAO,iFAAI,KAAK,EAAE,YAAY,EAAA,CAAG;AAElE;;;;AAIG;QACH,IAAA,CAA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A,SAAS,EAAE,6BAA6B;AACxC,4BAAA,MAAM,EAAE;gCACJ,YAAY;gCACZ,SAAS;gCACT,YAAY;gCACZ,YAAY;gCACZ,aAAa;gCACb,iBAAiB;AACpB,6BAAA;AACJ,yBAAA;AACJ,qBAAA,EAAA,QAAA,EAAA,6QAAA,EAAA,MAAA,EAAA,CAAA,y1JAAA,CAAA,EAAA;oxBAuDiD,YAAY,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErG3D,MAAM,SAAS,GAAG;IACrB,QAAQ;;;ACLZ;;AAEG;;;;"}
@@ -1,79 +1,85 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Renderer2, ElementRef, booleanAttribute, Input, HostBinding, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { computed, input, booleanAttribute, inject, Renderer2, ElementRef, Input, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
4
4
  import * as i1 from '@eui/eds/shared';
5
- import { EuiBaseSizeVariantsDirective, EuiBaseColorVariantsDirective } from '@eui/eds/shared';
5
+ import { EdsBaseSizeVariantsDirective, EdsBaseColorVariantsDirective } from '@eui/eds/shared';
6
6
 
7
7
  class EdsButton {
8
8
  constructor() {
9
+ /**
10
+ * @description
11
+ * Computes and returns the CSS classes for the button based on its current state
12
+ *
13
+ * @returns {string} Space-separated string of CSS class names
14
+ */
15
+ this.hostClasses = computed(() => {
16
+ return [
17
+ 'eds-button',
18
+ this.sizeVariantsBase.getCssClasses('eds-button'),
19
+ this.colorVariantsBase.getCssClasses('eds-button'),
20
+ (this.edsButtonPrimary() || this.edsTypeVariant() === 'primary') &&
21
+ !(this.edsButtonSecondary() || this.edsTypeVariant() === 'secondary') &&
22
+ !(this.edsButtonTertiary() || this.edsTypeVariant() === 'tertiary') ? 'eds-button--type-primary' : '',
23
+ (this.edsButtonSecondary() || this.edsTypeVariant() === 'secondary') ? 'eds-button--type-secondary' : '',
24
+ (this.edsButtonTertiary() || this.edsTypeVariant() === 'tertiary') ? 'eds-button--type-tertiary' : '',
25
+ this.edsButtonRounded() ? 'eds-button--rounded' : '',
26
+ ]
27
+ .join(' ')
28
+ .trim();
29
+ }, /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
9
31
  /**
10
32
  * @description Data attribute for e2e testing
11
- * @default eui-button
33
+ * @default eds-button
12
34
  */
13
- this.e2eAttr = 'eds-button';
35
+ this.e2eAttr = input('eds-button', /* @ts-ignore */
36
+ ...(ngDevMode ? [{ debugName: "e2eAttr" }] : /* istanbul ignore next */ []));
37
+ /** @description ID attribute for the button element */
38
+ this.id = input(undefined, /* @ts-ignore */
39
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
14
40
  /**
15
41
  * @description When true, makes the button full-width
16
42
  * @default false
17
43
  */
18
- this.euiBlockButton = false;
44
+ this.edsBlockButton = input(false, { ...(ngDevMode ? { debugName: "edsBlockButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
19
45
  /**
20
46
  * @description When true, styles the button for icon-only content
21
47
  * @default false
22
48
  */
23
- this.euiIconButton = false;
49
+ this.edsIconButton = input(false, { ...(ngDevMode ? { debugName: "edsIconButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
24
50
  /**
25
51
  * @description When true, style the button when used in avatar trigger (for dropdown trigger f.e. see actionable avatar)
26
52
  * @default false
27
53
  */
28
- this.euiAvatarButton = false;
54
+ this.edsAvatarButton = input(false, { ...(ngDevMode ? { debugName: "edsAvatarButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
29
55
  /**
30
56
  * @description When true, allows text content to wrap
31
57
  * @default false
32
58
  */
33
- this.euiLineWrap = false;
34
- this.euiButtonPrimary = true;
35
- this.euiButtonSecondary = false;
36
- this.euiButtonTertiary = false;
37
- this.euiButtonRounded = false;
38
- this.euiTypeVariant = 'primary';
39
- this.sizeVariantsBase = inject(EuiBaseSizeVariantsDirective);
40
- this.colorVariantsBase = inject(EuiBaseColorVariantsDirective);
59
+ this.edsLineWrap = input(false, { ...(ngDevMode ? { debugName: "edsLineWrap" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
60
+ this.edsButtonPrimary = input(true, { ...(ngDevMode ? { debugName: "edsButtonPrimary" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
61
+ this.edsButtonSecondary = input(false, { ...(ngDevMode ? { debugName: "edsButtonSecondary" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
62
+ this.edsButtonTertiary = input(false, { ...(ngDevMode ? { debugName: "edsButtonTertiary" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
63
+ this.edsButtonRounded = input(false, { ...(ngDevMode ? { debugName: "edsButtonRounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
64
+ this.edsTypeVariant = input('primary', /* @ts-ignore */
65
+ ...(ngDevMode ? [{ debugName: "edsTypeVariant" }] : /* istanbul ignore next */ []));
66
+ this.sizeVariantsBase = inject(EdsBaseSizeVariantsDirective);
67
+ this.colorVariantsBase = inject(EdsBaseColorVariantsDirective);
41
68
  this._renderer = inject(Renderer2);
42
69
  this._elementRef = inject(ElementRef);
43
- this._euiDisabled = false;
44
- }
45
- /**
46
- * @description
47
- * Computes and returns the CSS classes for the button based on its current state
48
- *
49
- * @returns {string} Space-separated string of CSS class names
50
- */
51
- get cssClasses() {
52
- return [
53
- 'eds-button',
54
- this.sizeVariantsBase.getCssClasses('eds-button'),
55
- this.colorVariantsBase.getCssClasses('eds-button'),
56
- (this.euiButtonPrimary || this.euiTypeVariant === 'primary') &&
57
- !(this.euiButtonSecondary || this.euiTypeVariant === 'secondary') &&
58
- !(this.euiButtonTertiary || this.euiTypeVariant === 'tertiary') ? 'eds-button--type-primary' : '',
59
- (this.euiButtonSecondary || this.euiTypeVariant === 'secondary') ? 'eds-button--type-secondary' : '',
60
- (this.euiButtonTertiary || this.euiTypeVariant === 'tertiary') ? 'eds-button--type-tertiary' : '',
61
- this.euiButtonRounded ? 'eds-button--rounded' : '',
62
- ]
63
- .join(' ')
64
- .trim();
70
+ this._edsDisabled = false;
65
71
  }
66
72
  /**
67
73
  * @description
68
74
  * Controls the disabled state of the button
69
75
  * When true, adds the disabled attribute and prevents interaction
70
76
  */
71
- get euiDisabled() {
72
- return this._euiDisabled;
77
+ get edsDisabled() {
78
+ return this._edsDisabled;
73
79
  }
74
- set euiDisabled(value) {
75
- this._euiDisabled = coerceBooleanProperty(value);
76
- if (this._euiDisabled) {
80
+ set edsDisabled(value) {
81
+ this._edsDisabled = coerceBooleanProperty(value);
82
+ if (this._edsDisabled) {
77
83
  this._renderer.setAttribute(this._elementRef.nativeElement, 'disabled', 'true');
78
84
  }
79
85
  else {
@@ -81,79 +87,44 @@ class EdsButton {
81
87
  }
82
88
  }
83
89
  ngOnInit() {
84
- if (!this.sizeVariantsBase.euiSizeVariant) {
85
- this.sizeVariantsBase.euiSizeM = true;
90
+ if (!this.sizeVariantsBase.edsSizeVariant) {
91
+ this.sizeVariantsBase.edsSizeM = true;
86
92
  }
87
- if (!this.colorVariantsBase.euiColorVariant) {
88
- this.colorVariantsBase.euiPrimary = true;
93
+ if (!this.colorVariantsBase.edsColorVariant) {
94
+ this.colorVariantsBase.edsPrimary = true;
89
95
  }
90
96
  }
91
97
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
92
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "22.0.5", type: EdsButton, isStandalone: true, selector: "button[edsButton]", inputs: { e2eAttr: "e2eAttr", id: "id", euiBlockButton: ["euiBlockButton", "euiBlockButton", booleanAttribute], euiIconButton: ["euiIconButton", "euiIconButton", booleanAttribute], euiAvatarButton: ["euiAvatarButton", "euiAvatarButton", booleanAttribute], euiLineWrap: ["euiLineWrap", "euiLineWrap", booleanAttribute], euiButtonPrimary: ["euiButtonPrimary", "euiButtonPrimary", booleanAttribute], euiButtonSecondary: ["euiButtonSecondary", "euiButtonSecondary", booleanAttribute], euiButtonTertiary: ["euiButtonTertiary", "euiButtonTertiary", booleanAttribute], euiButtonRounded: ["euiButtonRounded", "euiButtonRounded", booleanAttribute], euiTypeVariant: "euiTypeVariant", euiDisabled: "euiDisabled" }, host: { properties: { "class": "this.cssClasses", "attr.data-e2e": "this.e2eAttr", "attr.id": "this.id" } }, hostDirectives: [{ directive: i1.EuiBaseSizeVariantsDirective, inputs: ["euiSizeS", "euiSizeS", "euiSizeM", "euiSizeM", "euiSizeL", "euiSizeL", "euiSizeVariant", "euiSizeVariant"] }, { directive: i1.EuiBaseColorVariantsDirective, inputs: ["euiPrimary", "euiPrimary", "euiNeutral", "euiNeutral", "euiHighlight", "euiHighlight", "euiCritical", "euiCritical", "euiColorVariant", "euiColorVariant"] }], ngImport: i0, template: "<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n", styles: [".eui-21 :host.eds-button.eds-button--type-primary{--_border-width: var(--eds-bw-none);--_border-color: transparent}.eui-21 :host.eds-button.eds-button--type-primary.eds-button--primary{--_surface: var(--eds-c-surface-primary);--_on-surface: var(--eds-c-on-surface-primary);--_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-button.eds-button--type-primary.eds-button--highlight{--_surface: var(--eds-c-surface-highlight);--_on-surface: var(--eds-c-on-surface-highlight);--_surface-hover: var(--eds-c-surface-highlight--hover);--_on-surface-hover: var(--eds-c-on-surface-highlight--hover);--_surface-active: var(--eds-c-surface-highlight--pressed);--_on-surface-active: var(--eds-c-on-surface-highlight--pressed)}.eui-21 :host.eds-button.eds-button--type-primary.eds-button--critical{--_surface: var(--eds-c-surface-critical);--_on-surface: var(--eds-c-on-surface-critical);--_surface-hover: var(--eds-c-surface-critical--hover);--_on-surface-hover: var(--eds-c-on-surface-critical--hover);--_surface-active: var(--eds-c-surface-critical--pressed);--_on-surface-active: var(--eds-c-on-surface-critical--pressed)}.eui-21 :host.eds-button.eds-button--type-primary:disabled,.eui-21 :host.eds-button.eds-button--type-primary.disabled{--_surface: var(--eds-c-surface-disabled);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-disabled);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-disabled);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button.eds-button--type-secondary{--_border-width: var(--eds-bw-xs);--_surface: transparent}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--primary{--_border-color: var(--eds-c-border-primary);--_on-surface: var(--eds-c-foreground-primary);--_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-button.eds-button--type-secondary.eds-button--neutral{--_border-color: var(--eds-c-border-neutral);--_on-surface: var(--eds-c-foreground-neutral);--_surface-hover: var(--eds-c-surface-neutral-subtle);--_on-surface-hover: var(--eds-c-on-surface-neutral-subtle);--_surface-active: var(--eds-c-surface-neutral-subtle);--_on-surface-active: var(--eds-c-on-surface-neutral-subtle)}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--highlight{--_border-color: var(--eds-c-border-highlight);--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--critical{--_border-color: var(--eds-c-border-critical);--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--eds-c-surface-critical-subtler);--_on-surface-hover: var(--eds-c-on-surface-critical-subtler);--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button.eds-button--type-secondary:disabled,.eui-21 :host.eds-button.eds-button--type-secondary.disabled{--_border-width: var(--eds-bw-xs);--_border-color: var(--eds-c-border-disabled);--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button.eds-button--type-tertiary{--_border-width: var(--eds-bw-none);--_surface: transparent}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--primary{--_on-surface: var(--eds-c-foreground-primary);--_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-button.eds-button--type-tertiary.eds-button--neutral{--_on-surface: var(--eds-c-foreground-neutral);--_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));--_surface-active: var(--eds-c-surface-neutral-subtle);--_on-surface-active: var(--eds-c-on-surface-neutral-subtle)}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--highlight{--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--critical{--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-critical-subtler));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-critical-subtler));--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button.eds-button--type-tertiary:disabled,.eui-21 :host.eds-button.eds-button--type-tertiary.disabled{--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button.eds-button--size-m{--_font-size: var(--eds-f-s-m);--_padding: 0 var(--eds-sp-xs);--_size: var(--eds-sp-5xl);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-button.eds-button--size-s{--_font-size: var(--eds-f-s-s);--_padding: 0 var(--eds-sp-2xs);--_size: var(--eds-sp-3xl);--_icon-size: var(--eds-is-s)}.eui-21 :host.eds-button.eds-button--size-l{--_font-size: var(--eds-f-s-l);--_padding: 0 var(--eds-sp-s);--_size: var(--eds-sp-8xl);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-button{align-items:center;background-image:none;border-radius:var(--eds-br-s);box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;outline:none;text-transform:none;transition:none;vertical-align:middle;white-space:nowrap;border-style:solid}.eui-21 :host.eds-button: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-button .eds-button__container{align-items:center;display:inline-flex;position:relative;gap:var(--eds-sp-2xs);justify-content:center;width:100%}.eui-21 :host.eds-button{background-color:var(--_surface);color:var(--_on-surface);border-width:var(--_border-width);border-color:var(--_border-color);font-size:var(--_font-size);min-height:var(--_size);min-width:var(--_size);padding:var(--_padding)}.eui-21 :host.eds-button:hover{background-color:var(--_surface-hover);color:var(--_on-surface-hover)}.eui-21 :host.eds-button:active{background-color:var(--_surface-active);color:var(--_on-surface-active)}.eui-21 :host.eds-button.eds-button--rounded{border-radius:var(--eds-br-full)}.eui-21 :host.eds-button.eds-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"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
98
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: EdsButton, isStandalone: true, selector: "button[edsButton]", inputs: { e2eAttr: { classPropertyName: "e2eAttr", publicName: "e2eAttr", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, edsBlockButton: { classPropertyName: "edsBlockButton", publicName: "edsBlockButton", isSignal: true, isRequired: false, transformFunction: null }, edsIconButton: { classPropertyName: "edsIconButton", publicName: "edsIconButton", isSignal: true, isRequired: false, transformFunction: null }, edsAvatarButton: { classPropertyName: "edsAvatarButton", publicName: "edsAvatarButton", isSignal: true, isRequired: false, transformFunction: null }, edsLineWrap: { classPropertyName: "edsLineWrap", publicName: "edsLineWrap", isSignal: true, isRequired: false, transformFunction: null }, edsButtonPrimary: { classPropertyName: "edsButtonPrimary", publicName: "edsButtonPrimary", isSignal: true, isRequired: false, transformFunction: null }, edsButtonSecondary: { classPropertyName: "edsButtonSecondary", publicName: "edsButtonSecondary", isSignal: true, isRequired: false, transformFunction: null }, edsButtonTertiary: { classPropertyName: "edsButtonTertiary", publicName: "edsButtonTertiary", isSignal: true, isRequired: false, transformFunction: null }, edsButtonRounded: { classPropertyName: "edsButtonRounded", publicName: "edsButtonRounded", isSignal: true, isRequired: false, transformFunction: null }, edsTypeVariant: { classPropertyName: "edsTypeVariant", publicName: "edsTypeVariant", isSignal: true, isRequired: false, transformFunction: null }, edsDisabled: { classPropertyName: "edsDisabled", publicName: "edsDisabled", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()", "attr.data-e2e": "e2eAttr()", "attr.id": "id()" } }, hostDirectives: [{ directive: i1.EdsBaseSizeVariantsDirective, inputs: ["edsSizeS", "edsSizeS", "edsSizeM", "edsSizeM", "edsSizeL", "edsSizeL", "edsSizeVariant", "edsSizeVariant"] }, { directive: i1.EdsBaseColorVariantsDirective, inputs: ["edsPrimary", "edsPrimary", "edsNeutral", "edsNeutral", "edsHighlight", "edsHighlight", "edsCritical", "edsCritical", "edsColorVariant", "edsColorVariant"] }], ngImport: i0, template: "<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n", styles: [".eui-21 :host.eds-button.eds-button--type-primary{--_border-width: var(--eds-bw-none);--_border-color: transparent}.eui-21 :host.eds-button.eds-button--type-primary.eds-button--primary{--_surface: var(--eds-c-surface-primary);--_on-surface: var(--eds-c-on-surface-primary);--_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-button.eds-button--type-primary.eds-button--highlight{--_surface: var(--eds-c-surface-highlight);--_on-surface: var(--eds-c-on-surface-highlight);--_surface-hover: var(--eds-c-surface-highlight--hover);--_on-surface-hover: var(--eds-c-on-surface-highlight--hover);--_surface-active: var(--eds-c-surface-highlight--pressed);--_on-surface-active: var(--eds-c-on-surface-highlight--pressed)}.eui-21 :host.eds-button.eds-button--type-primary.eds-button--critical{--_surface: var(--eds-c-surface-critical);--_on-surface: var(--eds-c-on-surface-critical);--_surface-hover: var(--eds-c-surface-critical--hover);--_on-surface-hover: var(--eds-c-on-surface-critical--hover);--_surface-active: var(--eds-c-surface-critical--pressed);--_on-surface-active: var(--eds-c-on-surface-critical--pressed)}.eui-21 :host.eds-button.eds-button--type-primary:disabled,.eui-21 :host.eds-button.eds-button--type-primary.disabled{--_surface: var(--eds-c-surface-disabled);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-disabled);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-disabled);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button.eds-button--type-secondary{--_border-width: var(--eds-bw-xs);--_surface: transparent}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--primary{--_border-color: var(--eds-c-border-primary);--_on-surface: var(--eds-c-foreground-primary);--_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-button.eds-button--type-secondary.eds-button--neutral{--_border-color: var(--eds-c-border-neutral);--_on-surface: var(--eds-c-foreground-neutral);--_surface-hover: var(--eds-c-surface-neutral-subtle);--_on-surface-hover: var(--eds-c-on-surface-neutral-subtle);--_surface-active: var(--eds-c-surface-neutral-subtle);--_on-surface-active: var(--eds-c-on-surface-neutral-subtle)}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--highlight{--_border-color: var(--eds-c-border-highlight);--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--critical{--_border-color: var(--eds-c-border-critical);--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--eds-c-surface-critical-subtler);--_on-surface-hover: var(--eds-c-on-surface-critical-subtler);--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button.eds-button--type-secondary:disabled,.eui-21 :host.eds-button.eds-button--type-secondary.disabled{--_border-width: var(--eds-bw-xs);--_border-color: var(--eds-c-border-disabled);--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button.eds-button--type-tertiary{--_border-width: var(--eds-bw-none);--_surface: transparent}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--primary{--_on-surface: var(--eds-c-foreground-primary);--_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-button.eds-button--type-tertiary.eds-button--neutral{--_on-surface: var(--eds-c-foreground-neutral);--_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));--_surface-active: var(--eds-c-surface-neutral-subtle);--_on-surface-active: var(--eds-c-on-surface-neutral-subtle)}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--highlight{--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--critical{--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-critical-subtler));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-critical-subtler));--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button.eds-button--type-tertiary:disabled,.eui-21 :host.eds-button.eds-button--type-tertiary.disabled{--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button.eds-button--size-m{--_font-size: var(--eds-f-s-m);--_padding: 0 var(--eds-sp-xs);--_size: var(--eds-sp-5xl);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-button.eds-button--size-s{--_font-size: var(--eds-f-s-s);--_padding: 0 var(--eds-sp-2xs);--_size: var(--eds-sp-3xl);--_icon-size: var(--eds-is-s)}.eui-21 :host.eds-button.eds-button--size-l{--_font-size: var(--eds-f-s-l);--_padding: 0 var(--eds-sp-s);--_size: var(--eds-sp-8xl);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-button{align-items:center;background-image:none;border-radius:var(--eds-br-s);box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;outline:none;text-transform:none;transition:none;vertical-align:middle;white-space:nowrap;border-style:solid}.eui-21 :host.eds-button: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-button .eds-button__container{align-items:center;display:inline-flex;position:relative;gap:var(--eds-sp-2xs);justify-content:center;width:100%}.eui-21 :host.eds-button{background-color:var(--_surface);color:var(--_on-surface);border-width:var(--_border-width);border-color:var(--_border-color);font-size:var(--_font-size);min-height:var(--_size);min-width:var(--_size);padding:var(--_padding)}.eui-21 :host.eds-button:hover{background-color:var(--_surface-hover);color:var(--_on-surface-hover)}.eui-21 :host.eds-button:active{background-color:var(--_surface-active);color:var(--_on-surface-active)}.eui-21 :host.eds-button.eds-button--rounded{border-radius:var(--eds-br-full)}.eui-21 :host.eds-button.eds-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"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
93
99
  }
94
100
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EdsButton, decorators: [{
95
101
  type: Component,
96
- args: [{ selector: 'button[edsButton]', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
102
+ args: [{ selector: 'button[edsButton]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
103
+ '[class]': 'hostClasses()',
104
+ '[attr.data-e2e]': 'e2eAttr()',
105
+ '[attr.id]': 'id()',
106
+ }, hostDirectives: [
97
107
  {
98
- directive: EuiBaseSizeVariantsDirective,
108
+ directive: EdsBaseSizeVariantsDirective,
99
109
  inputs: [
100
- 'euiSizeS',
101
- 'euiSizeM',
102
- 'euiSizeL',
103
- 'euiSizeVariant',
110
+ 'edsSizeS',
111
+ 'edsSizeM',
112
+ 'edsSizeL',
113
+ 'edsSizeVariant',
104
114
  ],
105
115
  },
106
116
  {
107
- directive: EuiBaseColorVariantsDirective,
117
+ directive: EdsBaseColorVariantsDirective,
108
118
  inputs: [
109
- 'euiPrimary',
110
- 'euiNeutral',
111
- 'euiHighlight',
112
- 'euiCritical',
113
- 'euiColorVariant',
119
+ 'edsPrimary',
120
+ 'edsNeutral',
121
+ 'edsHighlight',
122
+ 'edsCritical',
123
+ 'edsColorVariant',
114
124
  ],
115
125
  },
116
126
  ], template: "<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n", styles: [".eui-21 :host.eds-button.eds-button--type-primary{--_border-width: var(--eds-bw-none);--_border-color: transparent}.eui-21 :host.eds-button.eds-button--type-primary.eds-button--primary{--_surface: var(--eds-c-surface-primary);--_on-surface: var(--eds-c-on-surface-primary);--_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-button.eds-button--type-primary.eds-button--highlight{--_surface: var(--eds-c-surface-highlight);--_on-surface: var(--eds-c-on-surface-highlight);--_surface-hover: var(--eds-c-surface-highlight--hover);--_on-surface-hover: var(--eds-c-on-surface-highlight--hover);--_surface-active: var(--eds-c-surface-highlight--pressed);--_on-surface-active: var(--eds-c-on-surface-highlight--pressed)}.eui-21 :host.eds-button.eds-button--type-primary.eds-button--critical{--_surface: var(--eds-c-surface-critical);--_on-surface: var(--eds-c-on-surface-critical);--_surface-hover: var(--eds-c-surface-critical--hover);--_on-surface-hover: var(--eds-c-on-surface-critical--hover);--_surface-active: var(--eds-c-surface-critical--pressed);--_on-surface-active: var(--eds-c-on-surface-critical--pressed)}.eui-21 :host.eds-button.eds-button--type-primary:disabled,.eui-21 :host.eds-button.eds-button--type-primary.disabled{--_surface: var(--eds-c-surface-disabled);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-disabled);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-disabled);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button.eds-button--type-secondary{--_border-width: var(--eds-bw-xs);--_surface: transparent}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--primary{--_border-color: var(--eds-c-border-primary);--_on-surface: var(--eds-c-foreground-primary);--_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-button.eds-button--type-secondary.eds-button--neutral{--_border-color: var(--eds-c-border-neutral);--_on-surface: var(--eds-c-foreground-neutral);--_surface-hover: var(--eds-c-surface-neutral-subtle);--_on-surface-hover: var(--eds-c-on-surface-neutral-subtle);--_surface-active: var(--eds-c-surface-neutral-subtle);--_on-surface-active: var(--eds-c-on-surface-neutral-subtle)}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--highlight{--_border-color: var(--eds-c-border-highlight);--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button.eds-button--type-secondary.eds-button--critical{--_border-color: var(--eds-c-border-critical);--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--eds-c-surface-critical-subtler);--_on-surface-hover: var(--eds-c-on-surface-critical-subtler);--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button.eds-button--type-secondary:disabled,.eui-21 :host.eds-button.eds-button--type-secondary.disabled{--_border-width: var(--eds-bw-xs);--_border-color: var(--eds-c-border-disabled);--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button.eds-button--type-tertiary{--_border-width: var(--eds-bw-none);--_surface: transparent}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--primary{--_on-surface: var(--eds-c-foreground-primary);--_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-button.eds-button--type-tertiary.eds-button--neutral{--_on-surface: var(--eds-c-foreground-neutral);--_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));--_surface-active: var(--eds-c-surface-neutral-subtle);--_on-surface-active: var(--eds-c-on-surface-neutral-subtle)}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--highlight{--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button.eds-button--type-tertiary.eds-button--critical{--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--_button-surface-hover, var(--eds-c-surface-critical-subtler));--_on-surface-hover: var(--_button-on-surface-hover, var(--eds-c-on-surface-critical-subtler));--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button.eds-button--type-tertiary:disabled,.eui-21 :host.eds-button.eds-button--type-tertiary.disabled{--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button.eds-button--size-m{--_font-size: var(--eds-f-s-m);--_padding: 0 var(--eds-sp-xs);--_size: var(--eds-sp-5xl);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-button.eds-button--size-s{--_font-size: var(--eds-f-s-s);--_padding: 0 var(--eds-sp-2xs);--_size: var(--eds-sp-3xl);--_icon-size: var(--eds-is-s)}.eui-21 :host.eds-button.eds-button--size-l{--_font-size: var(--eds-f-s-l);--_padding: 0 var(--eds-sp-s);--_size: var(--eds-sp-8xl);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-button{align-items:center;background-image:none;border-radius:var(--eds-br-s);box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;outline:none;text-transform:none;transition:none;vertical-align:middle;white-space:nowrap;border-style:solid}.eui-21 :host.eds-button: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-button .eds-button__container{align-items:center;display:inline-flex;position:relative;gap:var(--eds-sp-2xs);justify-content:center;width:100%}.eui-21 :host.eds-button{background-color:var(--_surface);color:var(--_on-surface);border-width:var(--_border-width);border-color:var(--_border-color);font-size:var(--_font-size);min-height:var(--_size);min-width:var(--_size);padding:var(--_padding)}.eui-21 :host.eds-button:hover{background-color:var(--_surface-hover);color:var(--_on-surface-hover)}.eui-21 :host.eds-button:active{background-color:var(--_surface-active);color:var(--_on-surface-active)}.eui-21 :host.eds-button.eds-button--rounded{border-radius:var(--eds-br-full)}.eui-21 :host.eds-button.eds-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"] }]
117
- }], propDecorators: { cssClasses: [{
118
- type: HostBinding,
119
- args: ['class']
120
- }], e2eAttr: [{
121
- type: HostBinding,
122
- args: ['attr.data-e2e']
123
- }, {
124
- type: Input
125
- }], id: [{
126
- type: HostBinding,
127
- args: ['attr.id']
128
- }, {
129
- type: Input
130
- }], euiBlockButton: [{
131
- type: Input,
132
- args: [{ transform: booleanAttribute }]
133
- }], euiIconButton: [{
134
- type: Input,
135
- args: [{ transform: booleanAttribute }]
136
- }], euiAvatarButton: [{
137
- type: Input,
138
- args: [{ transform: booleanAttribute }]
139
- }], euiLineWrap: [{
140
- type: Input,
141
- args: [{ transform: booleanAttribute }]
142
- }], euiButtonPrimary: [{
143
- type: Input,
144
- args: [{ transform: booleanAttribute }]
145
- }], euiButtonSecondary: [{
146
- type: Input,
147
- args: [{ transform: booleanAttribute }]
148
- }], euiButtonTertiary: [{
149
- type: Input,
150
- args: [{ transform: booleanAttribute }]
151
- }], euiButtonRounded: [{
152
- type: Input,
153
- args: [{ transform: booleanAttribute }]
154
- }], euiTypeVariant: [{
155
- type: Input
156
- }], euiDisabled: [{
127
+ }], propDecorators: { e2eAttr: [{ type: i0.Input, args: [{ isSignal: true, alias: "e2eAttr", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], edsBlockButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsBlockButton", required: false }] }], edsIconButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsIconButton", required: false }] }], edsAvatarButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsAvatarButton", required: false }] }], edsLineWrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsLineWrap", required: false }] }], edsButtonPrimary: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsButtonPrimary", required: false }] }], edsButtonSecondary: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsButtonSecondary", required: false }] }], edsButtonTertiary: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsButtonTertiary", required: false }] }], edsButtonRounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsButtonRounded", required: false }] }], edsTypeVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsTypeVariant", required: false }] }], edsDisabled: [{
157
128
  type: Input
158
129
  }] } });
159
130
 
@@ -1 +1 @@
1
- {"version":3,"file":"eui-eds-eds-button.mjs","sources":["../../eds-button/eds-button.ts","../../eds-button/eds-button.html","../../eds-button/index.ts","../../eds-button/eui-eds-eds-button.ts"],"sourcesContent":["import {\n Component,\n HostBinding,\n Input,\n ChangeDetectionStrategy,\n Renderer2,\n ElementRef,\n booleanAttribute,\n inject,\n OnInit,\n} from '@angular/core';\n\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { EuiBaseColorVariantsDirective, EuiBaseSizeVariantsDirective } from '@eui/eds/shared';\n\n@Component({\n templateUrl: './eds-button.html',\n // eslint-disable-next-line\n selector: 'button[edsButton]',\n styleUrl: './eds-button.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: EuiBaseSizeVariantsDirective,\n inputs: [\n 'euiSizeS',\n 'euiSizeM',\n 'euiSizeL',\n 'euiSizeVariant',\n ],\n },\n {\n directive: EuiBaseColorVariantsDirective,\n inputs: [\n 'euiPrimary',\n 'euiNeutral',\n 'euiHighlight',\n 'euiCritical',\n 'euiColorVariant',\n ],\n }, \n ], \n})\nexport class EdsButton implements OnInit {\n /**\n * @description\n * Computes and returns the CSS classes for the button 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-button',\n this.sizeVariantsBase.getCssClasses('eds-button'),\n this.colorVariantsBase.getCssClasses('eds-button'),\n (this.euiButtonPrimary || this.euiTypeVariant === 'primary') && \n !(this.euiButtonSecondary || this.euiTypeVariant === 'secondary') && \n !(this.euiButtonTertiary || this.euiTypeVariant === 'tertiary') ? 'eds-button--type-primary': '',\n (this.euiButtonSecondary || this.euiTypeVariant === 'secondary') ? 'eds-button--type-secondary': '',\n (this.euiButtonTertiary || this.euiTypeVariant === 'tertiary') ? 'eds-button--type-tertiary': '',\n\n this.euiButtonRounded ? 'eds-button--rounded': '',\n ]\n .join(' ')\n .trim();\n }\n\n /**\n * @description Data attribute for e2e testing\n * @default eui-button\n */\n @HostBinding('attr.data-e2e') @Input() e2eAttr = 'eds-button';\n\n /** @description ID attribute for the button element */\n @HostBinding('attr.id')\n @Input() id?: string;\n\n /**\n * @description When true, makes the button full-width\n * @default false\n */\n @Input({ transform: booleanAttribute }) euiBlockButton = false;\n\n /**\n * @description When true, styles the button for icon-only content\n * @default false\n */\n @Input({ transform: booleanAttribute }) euiIconButton = false;\n\n /**\n * @description When true, style the button when used in avatar trigger (for dropdown trigger f.e. see actionable avatar)\n * @default false\n */\n @Input({ transform: booleanAttribute }) euiAvatarButton = false;\n\n /**\n * @description When true, allows text content to wrap\n * @default false\n */\n @Input({ transform: booleanAttribute }) euiLineWrap = false;\n\n @Input({ transform: booleanAttribute }) euiButtonPrimary = true;\n @Input({ transform: booleanAttribute }) euiButtonSecondary = false;\n @Input({ transform: booleanAttribute }) euiButtonTertiary = false;\n @Input({ transform: booleanAttribute }) euiButtonRounded = false;\n \n @Input() euiTypeVariant: 'primary' | 'secondary' | 'tertiary' = 'primary';\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 protected sizeVariantsBase: EuiBaseSizeVariantsDirective = inject(EuiBaseSizeVariantsDirective);\n protected colorVariantsBase: EuiBaseColorVariantsDirective = inject(EuiBaseColorVariantsDirective);\n protected _renderer: Renderer2 = inject(Renderer2);\n protected _elementRef: ElementRef<HTMLButtonElement> = 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.euiPrimary = true;\n }\n }\n}\n","<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n","import { EdsButton } from './eds-button';\n\nexport * from './eds-button';\n\nexport const EDS_BUTTON = [\n EdsButton,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MA2Ca,SAAS,CAAA;AA5BtB,IAAA,WAAA,GAAA;AAqDI;;;AAGG;QACoC,IAAA,CAAA,OAAO,GAAG,YAAY;AAM7D;;;AAGG;QACqC,IAAA,CAAA,cAAc,GAAG,KAAK;AAE9D;;;AAGG;QACqC,IAAA,CAAA,aAAa,GAAG,KAAK;AAE7D;;;AAGG;QACqC,IAAA,CAAA,eAAe,GAAG,KAAK;AAE/D;;;AAGG;QACqC,IAAA,CAAA,WAAW,GAAG,KAAK;QAEnB,IAAA,CAAA,gBAAgB,GAAG,IAAI;QACvB,IAAA,CAAA,kBAAkB,GAAG,KAAK;QAC1B,IAAA,CAAA,iBAAiB,GAAG,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EAAE,gBAAgB,EAAE;;sBACrC,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;sBAErC;;sBAOA;;;AE9GE,MAAM,UAAU,GAAG;IACtB,SAAS;;;ACLb;;AAEG;;;;"}
1
+ {"version":3,"file":"eui-eds-eds-button.mjs","sources":["../../eds-button/eds-button.ts","../../eds-button/eds-button.html","../../eds-button/index.ts","../../eds-button/eui-eds-eds-button.ts"],"sourcesContent":["import {\n Component,\n Input,\n ChangeDetectionStrategy,\n Renderer2,\n ElementRef,\n booleanAttribute,\n inject,\n input,\n computed,\n OnInit,\n} from '@angular/core';\n\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { EdsBaseColorVariantsDirective, EdsBaseSizeVariantsDirective } from '@eui/eds/shared';\n\n@Component({\n templateUrl: './eds-button.html',\n // eslint-disable-next-line\n selector: 'button[edsButton]',\n styleUrl: './eds-button.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'hostClasses()',\n '[attr.data-e2e]': 'e2eAttr()',\n '[attr.id]': 'id()',\n },\n hostDirectives: [\n {\n directive: EdsBaseSizeVariantsDirective,\n inputs: [\n 'edsSizeS',\n 'edsSizeM',\n 'edsSizeL',\n 'edsSizeVariant',\n ],\n },\n {\n directive: EdsBaseColorVariantsDirective,\n inputs: [\n 'edsPrimary',\n 'edsNeutral',\n 'edsHighlight',\n 'edsCritical',\n 'edsColorVariant',\n ],\n }, \n ], \n})\nexport class EdsButton implements OnInit {\n /**\n * @description\n * Computes and returns the CSS classes for the button based on its current state\n *\n * @returns {string} Space-separated string of CSS class names\n */\n hostClasses = computed(() => {\n return [\n 'eds-button',\n this.sizeVariantsBase.getCssClasses('eds-button'),\n this.colorVariantsBase.getCssClasses('eds-button'),\n (this.edsButtonPrimary() || this.edsTypeVariant() === 'primary') && \n !(this.edsButtonSecondary() || this.edsTypeVariant() === 'secondary') && \n !(this.edsButtonTertiary() || this.edsTypeVariant() === 'tertiary') ? 'eds-button--type-primary': '',\n (this.edsButtonSecondary() || this.edsTypeVariant() === 'secondary') ? 'eds-button--type-secondary': '',\n (this.edsButtonTertiary() || this.edsTypeVariant() === 'tertiary') ? 'eds-button--type-tertiary': '',\n\n this.edsButtonRounded() ? 'eds-button--rounded': '',\n ]\n .join(' ')\n .trim();\n });\n\n /**\n * @description Data attribute for e2e testing\n * @default eds-button\n */\n e2eAttr = input('eds-button');\n\n /** @description ID attribute for the button element */\n id = input<string | undefined>(undefined);\n\n /**\n * @description When true, makes the button full-width\n * @default false\n */\n edsBlockButton = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, styles the button for icon-only content\n * @default false\n */\n edsIconButton = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, style the button when used in avatar trigger (for dropdown trigger f.e. see actionable avatar)\n * @default false\n */\n edsAvatarButton = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, allows text content to wrap\n * @default false\n */\n edsLineWrap = input(false, { transform: booleanAttribute });\n\n edsButtonPrimary = input(true, { transform: booleanAttribute });\n edsButtonSecondary = input(false, { transform: booleanAttribute });\n edsButtonTertiary = input(false, { transform: booleanAttribute });\n edsButtonRounded = input(false, { transform: booleanAttribute });\n \n edsTypeVariant = input<'primary' | 'secondary' | 'tertiary'>('primary');\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 protected sizeVariantsBase: EdsBaseSizeVariantsDirective = inject(EdsBaseSizeVariantsDirective);\n protected colorVariantsBase: EdsBaseColorVariantsDirective = inject(EdsBaseColorVariantsDirective);\n protected _renderer: Renderer2 = inject(Renderer2);\n protected _elementRef: ElementRef<HTMLButtonElement> = 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.edsPrimary = true;\n }\n }\n}\n","<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n","import { EdsButton } from './eds-button';\n\nexport * from './eds-button';\n\nexport const EDS_BUTTON = [\n EdsButton,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAiDa,SAAS,CAAA;AAjCtB,IAAA,WAAA,GAAA;AAkCI;;;;;AAKG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;YACxB,OAAO;gBACH,YAAY;AACZ,gBAAA,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,YAAY,CAAC;AACjD,gBAAA,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,YAAY,CAAC;gBAClD,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,KAAK,SAAS;AAC3D,oBAAA,EAAE,IAAI,CAAC,kBAAkB,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,KAAK,WAAW,CAAC;oBACrE,EAAE,IAAI,CAAC,iBAAiB,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,KAAK,UAAU,CAAC,GAAG,0BAA0B,GAAE,EAAE;AACxG,gBAAA,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,KAAK,WAAW,IAAI,4BAA4B,GAAE,EAAE;AACvG,gBAAA,CAAC,IAAI,CAAC,iBAAiB,EAAE,IAAI,IAAI,CAAC,cAAc,EAAE,KAAK,UAAU,IAAI,2BAA2B,GAAE,EAAE;gBAEpG,IAAI,CAAC,gBAAgB,EAAE,GAAG,qBAAqB,GAAE,EAAE;A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