@eui/eds 21.3.4-snapshot-1783677674979

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 (144) hide show
  1. package/docs/classes/EdsChipModel.html +606 -0
  2. package/docs/classes/EuiChipTooltip.html +425 -0
  3. package/docs/components/EdsBadge.html +810 -0
  4. package/docs/components/EdsButton.html +793 -0
  5. package/docs/components/EdsChip.html +911 -0
  6. package/docs/components/EdsIcon.html +675 -0
  7. package/docs/components/EdsIconImage.html +604 -0
  8. package/docs/directives/EuiBaseColorVariantsDirective.html +1165 -0
  9. package/docs/directives/EuiBaseSizeVariantsDirective.html +1402 -0
  10. package/docs/fonts/ionicons.eot +0 -0
  11. package/docs/fonts/ionicons.svg +2090 -0
  12. package/docs/fonts/ionicons.ttf +0 -0
  13. package/docs/fonts/ionicons.woff +0 -0
  14. package/docs/fonts/ionicons.woff2 +0 -0
  15. package/docs/fonts/roboto-v15-latin-300.eot +0 -0
  16. package/docs/fonts/roboto-v15-latin-300.svg +314 -0
  17. package/docs/fonts/roboto-v15-latin-300.ttf +0 -0
  18. package/docs/fonts/roboto-v15-latin-300.woff +0 -0
  19. package/docs/fonts/roboto-v15-latin-300.woff2 +0 -0
  20. package/docs/fonts/roboto-v15-latin-700.eot +0 -0
  21. package/docs/fonts/roboto-v15-latin-700.svg +310 -0
  22. package/docs/fonts/roboto-v15-latin-700.ttf +0 -0
  23. package/docs/fonts/roboto-v15-latin-700.woff +0 -0
  24. package/docs/fonts/roboto-v15-latin-700.woff2 +0 -0
  25. package/docs/fonts/roboto-v15-latin-italic.eot +0 -0
  26. package/docs/fonts/roboto-v15-latin-italic.svg +323 -0
  27. package/docs/fonts/roboto-v15-latin-italic.ttf +0 -0
  28. package/docs/fonts/roboto-v15-latin-italic.woff +0 -0
  29. package/docs/fonts/roboto-v15-latin-italic.woff2 +0 -0
  30. package/docs/fonts/roboto-v15-latin-regular.eot +0 -0
  31. package/docs/fonts/roboto-v15-latin-regular.svg +308 -0
  32. package/docs/fonts/roboto-v15-latin-regular.ttf +0 -0
  33. package/docs/fonts/roboto-v15-latin-regular.woff +0 -0
  34. package/docs/fonts/roboto-v15-latin-regular.woff2 +0 -0
  35. package/docs/images/compodoc-vectorise-inverted.png +0 -0
  36. package/docs/images/compodoc-vectorise-inverted.svg +201 -0
  37. package/docs/images/compodoc-vectorise.png +0 -0
  38. package/docs/images/compodoc-vectorise.svg +201 -0
  39. package/docs/images/favicon.ico +0 -0
  40. package/docs/index.html +2264 -0
  41. package/docs/js/compodoc.js +14 -0
  42. package/docs/js/lazy-load-graphs.js +44 -0
  43. package/docs/js/libs/EventDispatcher.js +5 -0
  44. package/docs/js/libs/bootstrap-native.js +2 -0
  45. package/docs/js/libs/clipboard.min.js +7 -0
  46. package/docs/js/libs/custom-elements-es5-adapter.js +15 -0
  47. package/docs/js/libs/custom-elements.min.js +38 -0
  48. package/docs/js/libs/d3.v3.min.js +2 -0
  49. package/docs/js/libs/deep-iterator.js +2 -0
  50. package/docs/js/libs/es6-shim.min.js +12 -0
  51. package/docs/js/libs/htmlparser.js +23 -0
  52. package/docs/js/libs/innersvg.js +9 -0
  53. package/docs/js/libs/jszip.min.js +13 -0
  54. package/docs/js/libs/lit-html.js +1 -0
  55. package/docs/js/libs/prism.js +46 -0
  56. package/docs/js/libs/promise.min.js +6 -0
  57. package/docs/js/libs/svg-pan-zoom.min.js +3 -0
  58. package/docs/js/libs/tablesort.min.js +6 -0
  59. package/docs/js/libs/tablesort.number.min.js +6 -0
  60. package/docs/js/libs/vis-network.min.js +78 -0
  61. package/docs/js/libs/zepto.min.js +2 -0
  62. package/docs/js/menu-wc.js +119 -0
  63. package/docs/js/menu-wc_es5.js +40 -0
  64. package/docs/js/menu.js +269 -0
  65. package/docs/js/routes/routes_index.js +1 -0
  66. package/docs/js/routes.js +308 -0
  67. package/docs/js/search/lunr.min.js +6 -0
  68. package/docs/js/search/search-lunr.js +65 -0
  69. package/docs/js/search/search.js +273 -0
  70. package/docs/js/search/search_index.js +4 -0
  71. package/docs/js/sourceCode.js +58 -0
  72. package/docs/js/svg-pan-zoom.controls.js +53 -0
  73. package/docs/js/tabs.js +21 -0
  74. package/docs/js/tree.js +147 -0
  75. package/docs/json/EdsBadge.md +28 -0
  76. package/docs/json/EdsButton.md +31 -0
  77. package/docs/json/EdsChip.md +30 -0
  78. package/docs/json/EdsIcon.md +32 -0
  79. package/docs/json/EdsIconImage.md +13 -0
  80. package/docs/json/EuiBaseColorVariantsDirective.md +20 -0
  81. package/docs/json/EuiBaseSizeVariantsDirective.md +23 -0
  82. package/docs/json/HbsRenderService.md +6 -0
  83. package/docs/json/TemplateEditorService.md +6 -0
  84. package/docs/json/TemplatePlaygroundComponent.md +8 -0
  85. package/docs/json/ZipExportService.md +6 -0
  86. package/docs/json/documentation.json +5209 -0
  87. package/docs/miscellaneous/variables.html +415 -0
  88. package/docs/modules.html +201 -0
  89. package/docs/overview.html +236 -0
  90. package/docs/routes.html +204 -0
  91. package/docs/styles/bootstrap-card.css +219 -0
  92. package/docs/styles/bootstrap.min.css +6 -0
  93. package/docs/styles/compodoc.css +1124 -0
  94. package/docs/styles/dark.css +121 -0
  95. package/docs/styles/ionicons.min.css +11 -0
  96. package/docs/styles/laravel.css +113 -0
  97. package/docs/styles/material.css +131 -0
  98. package/docs/styles/original.css +51 -0
  99. package/docs/styles/postmark.css +238 -0
  100. package/docs/styles/prism.css +301 -0
  101. package/docs/styles/readthedocs.css +117 -0
  102. package/docs/styles/reset.css +129 -0
  103. package/docs/styles/stripe.css +106 -0
  104. package/docs/styles/style.css +7 -0
  105. package/docs/styles/tablesort.css +33 -0
  106. package/docs/styles/vagrant.css +130 -0
  107. package/docs/template-playground/default-templates.json +192 -0
  108. package/docs/template-playground/hbs-render.service.ts +212 -0
  109. package/docs/template-playground/main.ts +9 -0
  110. package/docs/template-playground/template-editor.service.ts +173 -0
  111. package/docs/template-playground/template-playground.component.ts +614 -0
  112. package/docs/template-playground/template-playground.module.ts +29 -0
  113. package/docs/template-playground/zip-export.service.ts +86 -0
  114. package/docs/template-playground-app/app.js +1389 -0
  115. package/docs/template-playground-app/index.html +462 -0
  116. package/fesm2022/eui-eds-eds-badge.mjs +175 -0
  117. package/fesm2022/eui-eds-eds-badge.mjs.map +1 -0
  118. package/fesm2022/eui-eds-eds-button.mjs +169 -0
  119. package/fesm2022/eui-eds-eds-button.mjs.map +1 -0
  120. package/fesm2022/eui-eds-eds-chip.mjs +196 -0
  121. package/fesm2022/eui-eds-eds-chip.mjs.map +1 -0
  122. package/fesm2022/eui-eds-eds-icon-image.mjs +65 -0
  123. package/fesm2022/eui-eds-eds-icon-image.mjs.map +1 -0
  124. package/fesm2022/eui-eds-eds-icon.mjs +136 -0
  125. package/fesm2022/eui-eds-eds-icon.mjs.map +1 -0
  126. package/fesm2022/eui-eds-shared.mjs +322 -0
  127. package/fesm2022/eui-eds-shared.mjs.map +1 -0
  128. package/fesm2022/eui-eds.mjs +6 -0
  129. package/fesm2022/eui-eds.mjs.map +1 -0
  130. package/package.json +72 -0
  131. package/types/eui-eds-eds-badge.d.ts +74 -0
  132. package/types/eui-eds-eds-badge.d.ts.map +1 -0
  133. package/types/eui-eds-eds-button.d.ts +75 -0
  134. package/types/eui-eds-eds-button.d.ts.map +1 -0
  135. package/types/eui-eds-eds-chip.d.ts +105 -0
  136. package/types/eui-eds-eds-chip.d.ts.map +1 -0
  137. package/types/eui-eds-eds-icon-image.d.ts +34 -0
  138. package/types/eui-eds-eds-icon-image.d.ts.map +1 -0
  139. package/types/eui-eds-eds-icon.d.ts +50 -0
  140. package/types/eui-eds-eds-icon.d.ts.map +1 -0
  141. package/types/eui-eds-shared.d.ts +86 -0
  142. package/types/eui-eds-shared.d.ts.map +1 -0
  143. package/types/eui-eds.d.ts +3 -0
  144. package/types/eui-eds.d.ts.map +1 -0
@@ -0,0 +1,169 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Renderer2, ElementRef, booleanAttribute, Input, HostBinding, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
4
+ import * as i1 from '@eui/eds/shared';
5
+ import { EuiBaseSizeVariantsDirective, EuiBaseColorVariantsDirective } from '@eui/eds/shared';
6
+
7
+ class EdsButton {
8
+ constructor() {
9
+ /**
10
+ * @description Data attribute for e2e testing
11
+ * @default eui-button
12
+ */
13
+ this.e2eAttr = 'eds-button';
14
+ /**
15
+ * @description When true, makes the button full-width
16
+ * @default false
17
+ */
18
+ this.euiBlockButton = false;
19
+ /**
20
+ * @description When true, styles the button for icon-only content
21
+ * @default false
22
+ */
23
+ this.euiIconButton = false;
24
+ /**
25
+ * @description When true, style the button when used in avatar trigger (for dropdown trigger f.e. see actionable avatar)
26
+ * @default false
27
+ */
28
+ this.euiAvatarButton = false;
29
+ /**
30
+ * @description When true, allows text content to wrap
31
+ * @default false
32
+ */
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);
41
+ this._renderer = inject(Renderer2);
42
+ 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();
65
+ }
66
+ /**
67
+ * @description
68
+ * Controls the disabled state of the button
69
+ * When true, adds the disabled attribute and prevents interaction
70
+ */
71
+ get euiDisabled() {
72
+ return this._euiDisabled;
73
+ }
74
+ set euiDisabled(value) {
75
+ this._euiDisabled = coerceBooleanProperty(value);
76
+ if (this._euiDisabled) {
77
+ this._renderer.setAttribute(this._elementRef.nativeElement, 'disabled', 'true');
78
+ }
79
+ else {
80
+ this._renderer.removeAttribute(this._elementRef.nativeElement, 'disabled');
81
+ }
82
+ }
83
+ ngOnInit() {
84
+ if (!this.sizeVariantsBase.euiSizeVariant) {
85
+ this.sizeVariantsBase.euiSizeM = true;
86
+ }
87
+ if (!this.colorVariantsBase.euiColorVariant) {
88
+ this.colorVariantsBase.euiPrimary = true;
89
+ }
90
+ }
91
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: EdsButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
92
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "21.2.17", 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\">\r\n <ng-content></ng-content>\r\n</span>\r\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(--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-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(--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-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(--eui-bw-s) solid var(--eui-c-primary-border)!important;outline-offset:1px!important;border-radius:var(--eui-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(--eui-bw-s) solid var(--eui-c-primary-border)!important;outline-offset:1px!important;border-radius:var(--eui-br-max)!important}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
93
+ }
94
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: EdsButton, decorators: [{
95
+ type: Component,
96
+ args: [{ selector: 'button[edsButton]', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
97
+ {
98
+ directive: EuiBaseSizeVariantsDirective,
99
+ inputs: [
100
+ 'euiSizeS',
101
+ 'euiSizeM',
102
+ 'euiSizeL',
103
+ 'euiSizeVariant',
104
+ ],
105
+ },
106
+ {
107
+ directive: EuiBaseColorVariantsDirective,
108
+ inputs: [
109
+ 'euiPrimary',
110
+ 'euiNeutral',
111
+ 'euiHighlight',
112
+ 'euiCritical',
113
+ 'euiColorVariant',
114
+ ],
115
+ },
116
+ ], template: "<span class=\"eds-button__container\">\r\n <ng-content></ng-content>\r\n</span>\r\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(--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-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(--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-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(--eui-bw-s) solid var(--eui-c-primary-border)!important;outline-offset:1px!important;border-radius:var(--eui-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(--eui-bw-s) solid var(--eui-c-primary-border)!important;outline-offset:1px!important;border-radius:var(--eui-br-max)!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: [{
157
+ type: Input
158
+ }] } });
159
+
160
+ const EDS_BUTTON = [
161
+ EdsButton,
162
+ ];
163
+
164
+ /**
165
+ * Generated bundle index. Do not edit.
166
+ */
167
+
168
+ export { EDS_BUTTON, EdsButton };
169
+ //# sourceMappingURL=eui-eds-eds-button.mjs.map
@@ -0,0 +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 {\r\n Component,\r\n HostBinding,\r\n Input,\r\n ChangeDetectionStrategy,\r\n Renderer2,\r\n ElementRef,\r\n booleanAttribute,\r\n inject,\r\n OnInit,\r\n} from '@angular/core';\r\n\r\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { EuiBaseColorVariantsDirective, EuiBaseSizeVariantsDirective } from '@eui/eds/shared';\r\n\r\n@Component({\r\n templateUrl: './eds-button.html',\r\n // eslint-disable-next-line\r\n selector: 'button[edsButton]',\r\n styleUrl: './eds-button.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n hostDirectives: [\r\n {\r\n directive: EuiBaseSizeVariantsDirective,\r\n inputs: [\r\n 'euiSizeS',\r\n 'euiSizeM',\r\n 'euiSizeL',\r\n 'euiSizeVariant',\r\n ],\r\n },\r\n {\r\n directive: EuiBaseColorVariantsDirective,\r\n inputs: [\r\n 'euiPrimary',\r\n 'euiNeutral',\r\n 'euiHighlight',\r\n 'euiCritical',\r\n 'euiColorVariant',\r\n ],\r\n }, \r\n ], \r\n})\r\nexport class EdsButton implements OnInit {\r\n /**\r\n * @description\r\n * Computes and returns the CSS classes for the button based on its current state\r\n *\r\n * @returns {string} Space-separated string of CSS class names\r\n */\r\n @HostBinding('class')\r\n get cssClasses(): string {\r\n return [\r\n 'eds-button',\r\n this.sizeVariantsBase.getCssClasses('eds-button'),\r\n this.colorVariantsBase.getCssClasses('eds-button'),\r\n (this.euiButtonPrimary || this.euiTypeVariant === 'primary') && \r\n !(this.euiButtonSecondary || this.euiTypeVariant === 'secondary') && \r\n !(this.euiButtonTertiary || this.euiTypeVariant === 'tertiary') ? 'eds-button--type-primary': '',\r\n (this.euiButtonSecondary || this.euiTypeVariant === 'secondary') ? 'eds-button--type-secondary': '',\r\n (this.euiButtonTertiary || this.euiTypeVariant === 'tertiary') ? 'eds-button--type-tertiary': '',\r\n\r\n this.euiButtonRounded ? 'eds-button--rounded': '',\r\n ]\r\n .join(' ')\r\n .trim();\r\n }\r\n\r\n /**\r\n * @description Data attribute for e2e testing\r\n * @default eui-button\r\n */\r\n @HostBinding('attr.data-e2e') @Input() e2eAttr = 'eds-button';\r\n\r\n /** @description ID attribute for the button element */\r\n @HostBinding('attr.id')\r\n @Input() id?: string;\r\n\r\n /**\r\n * @description When true, makes the button full-width\r\n * @default false\r\n */\r\n @Input({ transform: booleanAttribute }) euiBlockButton = false;\r\n\r\n /**\r\n * @description When true, styles the button for icon-only content\r\n * @default false\r\n */\r\n @Input({ transform: booleanAttribute }) euiIconButton = false;\r\n\r\n /**\r\n * @description When true, style the button when used in avatar trigger (for dropdown trigger f.e. see actionable avatar)\r\n * @default false\r\n */\r\n @Input({ transform: booleanAttribute }) euiAvatarButton = false;\r\n\r\n /**\r\n * @description When true, allows text content to wrap\r\n * @default false\r\n */\r\n @Input({ transform: booleanAttribute }) euiLineWrap = false;\r\n\r\n @Input({ transform: booleanAttribute }) euiButtonPrimary = true;\r\n @Input({ transform: booleanAttribute }) euiButtonSecondary = false;\r\n @Input({ transform: booleanAttribute }) euiButtonTertiary = false;\r\n @Input({ transform: booleanAttribute }) euiButtonRounded = false;\r\n \r\n @Input() euiTypeVariant: 'primary' | 'secondary' | 'tertiary' = 'primary';\r\n\r\n /**\r\n * @description\r\n * Controls the disabled state of the button\r\n * When true, adds the disabled attribute and prevents interaction\r\n */\r\n @Input()\r\n public get euiDisabled(): boolean {\r\n return this._euiDisabled;\r\n }\r\n public set euiDisabled(value: BooleanInput) {\r\n this._euiDisabled = coerceBooleanProperty(value);\r\n if (this._euiDisabled) {\r\n this._renderer.setAttribute(this._elementRef.nativeElement, 'disabled', 'true');\r\n } else {\r\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'disabled');\r\n }\r\n }\r\n protected sizeVariantsBase: EuiBaseSizeVariantsDirective = inject(EuiBaseSizeVariantsDirective);\r\n protected colorVariantsBase: EuiBaseColorVariantsDirective = inject(EuiBaseColorVariantsDirective);\r\n protected _renderer: Renderer2 = inject(Renderer2);\r\n protected _elementRef: ElementRef<HTMLButtonElement> = inject(ElementRef);\r\n private _euiDisabled = false;\r\n\r\n ngOnInit(): void {\r\n if (!this.sizeVariantsBase.euiSizeVariant) {\r\n this.sizeVariantsBase.euiSizeM = true;\r\n }\r\n if (!this.colorVariantsBase.euiColorVariant) {\r\n this.colorVariantsBase.euiPrimary = true;\r\n }\r\n }\r\n}\r\n","<span class=\"eds-button__container\">\r\n <ng-content></ng-content>\r\n</span>\r\n","import { EdsButton } from './eds-button';\r\n\r\nexport * from './eds-button';\r\n\r\nexport const EDS_BUTTON = [\r\n EdsButton,\r\n] as const;\r\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,KAAK;QACzB,IAAA,CAAA,gBAAgB,GAAG,KAAK;QAEvD,IAAA,CAAA,cAAc,GAAyC,SAAS;AAmB/D,QAAA,IAAA,CAAA,gBAAgB,GAAiC,MAAM,CAAC,4BAA4B,CAAC;AACrF,QAAA,IAAA,CAAA,iBAAiB,GAAkC,MAAM,CAAC,6BAA6B,CAAC;AACxF,QAAA,IAAA,CAAA,SAAS,GAAc,MAAM,CAAC,SAAS,CAAC;AACxC,QAAA,IAAA,CAAA,WAAW,GAAkC,MAAM,CAAC,UAAU,CAAC;QACjE,IAAA,CAAA,YAAY,GAAG,KAAK;AAU/B,IAAA;AAhGG;;;;;AAKG;AACH,IAAA,IACI,UAAU,GAAA;QACV,OAAO;YACH,YAAY;AACZ,YAAA,IAAI,CAAC,gBAAgB,CAAC,aAAa,CA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6BAAA;AACJ,yBAAA;AACD,wBAAA;AACI,4BAAA,SAAS,EAAE,6BAA6B;AACxC,4BAAA,MAAM,EAAE;gCACJ,YAAY;gCACZ,YAAY;gCACZ,cAAc;gCACd,aAAa;gCACb,iBAAiB;AACpB,6BAAA;AACJ,yBAAA;AACJ,qBAAA,EAAA,QAAA,EAAA,wFAAA,EAAA,MAAA,EAAA,CAAA,umPAAA,CAAA,EAAA;;sBASA,WAAW;uBAAC,OAAO;;sBAsBnB,WAAW;uBAAC,eAAe;;sBAAG;;sBAG9B,WAAW;uBAAC,SAAS;;sBACrB;;sBAMA,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;sBAMrC,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;sBAMrC,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;sBAMrC,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;sBAErC,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;sBACrC,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;sBACrC,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;sBACrC,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;sBAErC;;sBAOA;;;AE9GE,MAAM,UAAU,GAAG;IACtB,SAAS;;;ACLb;;AAEG;;;;"}
@@ -0,0 +1,196 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, inject, ElementRef, booleanAttribute, ViewChild, Output, Input, HostBinding, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import * as i1 from '@eui/eds/shared';
4
+ import { EuiBaseSizeVariantsDirective, EuiBaseColorVariantsDirective } from '@eui/eds/shared';
5
+ import * as i2 from '@eui/eds/eds-icon';
6
+ import { EDS_ICON } from '@eui/eds/eds-icon';
7
+ import * as i3 from '@eui/eds/eds-button';
8
+ import { EDS_BUTTON } from '@eui/eds/eds-button';
9
+
10
+ class EdsChip {
11
+ constructor() {
12
+ /**
13
+ * Sets the `role` attribute for the host element.
14
+ *
15
+ * @default 'status'
16
+ */
17
+ this.role = 'status';
18
+ /**
19
+ * Sets the `aria-label` attribute for the host element.
20
+ *
21
+ * @default 'Chip content'
22
+ */
23
+ this.ariaLabel = 'Chip content';
24
+ /**
25
+ * Sets the `data-e2e` attribute for the host element.
26
+ *
27
+ * @default 'eui-chip'
28
+ */
29
+ this.e2eAttr = 'eui-chip';
30
+ /**
31
+ * Sets the data of the chip like tooltip configuration.
32
+ */
33
+ // TODO: type should be specific
34
+ // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html
35
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
36
+ this.data = {
37
+ id: crypto.randomUUID(),
38
+ tooltip: {
39
+ color: 'euiTooltipPrimary',
40
+ contentAlignment: null,
41
+ position: 'above',
42
+ },
43
+ };
44
+ /**
45
+ * Wether the chip can be removed.
46
+ *
47
+ * @default false
48
+ */
49
+ this.isChipRemovable = false;
50
+ /**
51
+ * Event emitted when the chip is removed.
52
+ */
53
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
54
+ this.remove = new EventEmitter();
55
+ this.sizeVariantsBase = inject(EuiBaseSizeVariantsDirective);
56
+ this.colorVariantsBase = inject(EuiBaseColorVariantsDirective);
57
+ this._elementRef = inject(ElementRef);
58
+ }
59
+ /**
60
+ * @description
61
+ * Computes and returns the CSS classes for the component based on its current state.
62
+ *
63
+ * @returns {string} Space-separated string of CSS class names
64
+ */
65
+ get cssClasses() {
66
+ return [
67
+ 'eds-chip',
68
+ this.sizeVariantsBase.getCssClasses('eds-chip'),
69
+ this.colorVariantsBase.getCssClasses('eds-chip'),
70
+ this.isChipRemovable ? 'eui-chip--removable' : '',
71
+ ].join(' ').trim();
72
+ }
73
+ ngOnInit() {
74
+ if (!this.sizeVariantsBase.euiSizeVariant) {
75
+ this.sizeVariantsBase.euiSizeM = true;
76
+ }
77
+ if (!this.colorVariantsBase.euiColorVariant) {
78
+ this.colorVariantsBase.euiNeutral = true;
79
+ }
80
+ }
81
+ ngAfterContentInit() {
82
+ if (!this.data.id && this.id) {
83
+ this.data = Object.assign(this.data, { id: this.id });
84
+ }
85
+ // checks if the parent element is an eui-chip-list to set role listitem or if a parent above in case cdkdroplist interferes
86
+ if (this._elementRef.nativeElement.parentElement?.classList.contains('eui-chip-list__chip-container') || this._elementRef.nativeElement.parentElement?.parentElement?.classList.contains('eui-chip-list__chip-container')) {
87
+ this.role = 'listitem';
88
+ }
89
+ }
90
+ /**
91
+ * Remove chip handler
92
+ *
93
+ * @param event Click event
94
+ */
95
+ onRemove(event) {
96
+ if (event instanceof KeyboardEvent && event.code === 'Backspace') {
97
+ this.remove.emit({ chip: this.data, event });
98
+ }
99
+ else {
100
+ this.remove.emit(this.data);
101
+ }
102
+ }
103
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: EdsChip, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
104
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", 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] }, outputs: { remove: "remove" }, host: { properties: { "class": "this.cssClasses", "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: ["euiSizeXS", "euiSizeXS", "euiSizeS", "euiSizeS", "euiSizeM", "euiSizeM", "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>\r\n <ng-content></ng-content>\r\n</div>\r\n@if (isChipRemovable) {\r\n <button edsButton \r\n class=\"eds-chip__close\"\r\n ariaLabel=\"Remove {{ chipLabel.textContent }} chip\"\r\n [euiColorVariant]=\"colorVariantsBase.euiColorVariant\"\r\n (click)=\"onRemove($event)\"\r\n euiSizeS\r\n euiRounded\r\n euiButtonTertiary>\r\n <eds-icon icon=\"x\" euiSizeXS/>\r\n </button>\r\n}\r\n", styles: [".eui-21 :host.eds-chip.eds-chip--size-s{--_font: var(--eds-f-label-s);--_padding: var(--eds-sp-4xs) var(--eds-sp-2xs);--_icon-size: var(--eds-is-s)}.eui-21 :host.eds-chip.eds-chip--size-m{--_font: var(--eds-f-label-s);--_padding: var(--eds-sp-4xs) var(--eds-sp-2xs);--_icon-size: var(--eds-is-s)}.eui-21 :host.eds-chip.eds-chip--size-l{--_font: var(--eds-f-label-s);--_padding: var(--eds-sp-3xs) var(--eds-sp-2xs);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-chip.eds-chip--neutral{--_surface: var(--eds-c-surface-elevation-sunken);--_on-surface: var(--eds-c-foreground-subtle);--_border-color: var(--eds-c-border-divider)}.eui-21 :host.eds-chip.eds-chip--info{--_surface: var(--eds-c-surface-info-subtler);--_on-surface: var(--eds-c-on-surface-info-subtler);--_border-color: var(--eds-c-border-info-subtle)}.eui-21 :host.eds-chip.eds-chip--success{--_surface: var(--eds-c-surface-success-subtler);--_on-surface: var(--eds-c-on-surface-success-subtler);--_border-color: var(--eds-c-border-success-subtle)}.eui-21 :host.eds-chip.eds-chip--warning{--_surface: var(--eds-c-surface-warning-subtler);--_on-surface: var(--eds-c-on-surface-warning-subtler);--_border-color: var(--eds-c-border-warning-subtle)}.eui-21 :host.eds-chip.eds-chip--critical{--_surface: var(--eds-c-surface-critical-subtler);--_on-surface: var(--eds-c-on-surface-critical-subtler);--_border-color: var(--eds-c-border-critical-subtle)}.eui-21 :host.eds-chip{align-items:center;border-radius:var(--eds-br-full);display:inline-flex;border:var(--eds-bw-xs) solid var(--_border-color);padding:var(--_padding);font:var(--_font);background-color:var(--_surface);color:var(--_on-surface)}.eui-21 :host.eds-chip .eds-chip__content{display:flex;align-items:center;background:transparent;gap:var(--eds-sp-3xs)}.eui-21 :host.eds-chip .eds-chip__close{--_size: auto}\n"], dependencies: [{ kind: "component", type: i2.EdsIcon, selector: "eds-icon, span[edsIcon]", inputs: ["icon", "set", "ariaLabel", "ariaHidden"] }, { kind: "component", type: i3.EdsButton, selector: "button[edsButton]", inputs: ["e2eAttr", "id", "euiBlockButton", "euiIconButton", "euiAvatarButton", "euiLineWrap", "euiButtonPrimary", "euiButtonSecondary", "euiButtonTertiary", "euiButtonRounded", "euiTypeVariant", "euiDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
105
+ }
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: EdsChip, decorators: [{
107
+ type: Component,
108
+ args: [{ selector: 'eds-chip, span[edsChip], li[edsChip]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
109
+ ...EDS_ICON,
110
+ ...EDS_BUTTON,
111
+ ], hostDirectives: [
112
+ {
113
+ directive: EuiBaseSizeVariantsDirective,
114
+ inputs: [
115
+ 'euiSizeXS',
116
+ 'euiSizeS',
117
+ 'euiSizeM',
118
+ 'euiSizeVariant',
119
+ ],
120
+ },
121
+ {
122
+ directive: EuiBaseColorVariantsDirective,
123
+ inputs: [
124
+ 'euiNeutral',
125
+ 'euiSuccess',
126
+ 'euiInfo',
127
+ 'euiWarning',
128
+ 'euiCritical',
129
+ 'euiColorVariant',
130
+ ],
131
+ },
132
+ ], template: "<div class=\"eds-chip__content\" #chipLabel>\r\n <ng-content></ng-content>\r\n</div>\r\n@if (isChipRemovable) {\r\n <button edsButton \r\n class=\"eds-chip__close\"\r\n ariaLabel=\"Remove {{ chipLabel.textContent }} chip\"\r\n [euiColorVariant]=\"colorVariantsBase.euiColorVariant\"\r\n (click)=\"onRemove($event)\"\r\n euiSizeS\r\n euiRounded\r\n euiButtonTertiary>\r\n <eds-icon icon=\"x\" euiSizeXS/>\r\n </button>\r\n}\r\n", styles: [".eui-21 :host.eds-chip.eds-chip--size-s{--_font: var(--eds-f-label-s);--_padding: var(--eds-sp-4xs) var(--eds-sp-2xs);--_icon-size: var(--eds-is-s)}.eui-21 :host.eds-chip.eds-chip--size-m{--_font: var(--eds-f-label-s);--_padding: var(--eds-sp-4xs) var(--eds-sp-2xs);--_icon-size: var(--eds-is-s)}.eui-21 :host.eds-chip.eds-chip--size-l{--_font: var(--eds-f-label-s);--_padding: var(--eds-sp-3xs) var(--eds-sp-2xs);--_icon-size: var(--eds-is-m)}.eui-21 :host.eds-chip.eds-chip--neutral{--_surface: var(--eds-c-surface-elevation-sunken);--_on-surface: var(--eds-c-foreground-subtle);--_border-color: var(--eds-c-border-divider)}.eui-21 :host.eds-chip.eds-chip--info{--_surface: var(--eds-c-surface-info-subtler);--_on-surface: var(--eds-c-on-surface-info-subtler);--_border-color: var(--eds-c-border-info-subtle)}.eui-21 :host.eds-chip.eds-chip--success{--_surface: var(--eds-c-surface-success-subtler);--_on-surface: var(--eds-c-on-surface-success-subtler);--_border-color: var(--eds-c-border-success-subtle)}.eui-21 :host.eds-chip.eds-chip--warning{--_surface: var(--eds-c-surface-warning-subtler);--_on-surface: var(--eds-c-on-surface-warning-subtler);--_border-color: var(--eds-c-border-warning-subtle)}.eui-21 :host.eds-chip.eds-chip--critical{--_surface: var(--eds-c-surface-critical-subtler);--_on-surface: var(--eds-c-on-surface-critical-subtler);--_border-color: var(--eds-c-border-critical-subtle)}.eui-21 :host.eds-chip{align-items:center;border-radius:var(--eds-br-full);display:inline-flex;border:var(--eds-bw-xs) solid var(--_border-color);padding:var(--_padding);font:var(--_font);background-color:var(--_surface);color:var(--_on-surface)}.eui-21 :host.eds-chip .eds-chip__content{display:flex;align-items:center;background:transparent;gap:var(--eds-sp-3xs)}.eui-21 :host.eds-chip .eds-chip__close{--_size: auto}\n"] }]
133
+ }], propDecorators: { cssClasses: [{
134
+ type: HostBinding,
135
+ args: ['class']
136
+ }], role: [{
137
+ type: HostBinding,
138
+ args: ['attr.role']
139
+ }], ariaLabel: [{
140
+ type: Input
141
+ }, {
142
+ type: HostBinding,
143
+ args: ['attr.aria-label']
144
+ }], e2eAttr: [{
145
+ type: HostBinding,
146
+ args: ['attr.data-e2e']
147
+ }, {
148
+ type: Input
149
+ }], euiInternalId: [{
150
+ type: Input
151
+ }], tooltipMessage: [{
152
+ type: Input
153
+ }], id: [{
154
+ type: Input
155
+ }], data: [{
156
+ type: Input
157
+ }], isChipRemovable: [{
158
+ type: Input,
159
+ args: [{ transform: booleanAttribute }]
160
+ }], remove: [{
161
+ type: Output
162
+ }], chipLabel: [{
163
+ type: ViewChild,
164
+ args: ['chipLabel']
165
+ }] } });
166
+
167
+ class EdsChipModel {
168
+ constructor(values = {}) {
169
+ this.isRemovable = false;
170
+ this.isOutline = false;
171
+ this.isRounded = false;
172
+ this.isDisabled = false;
173
+ this.variant = 'primary';
174
+ this.tooltip = new EuiChipTooltip();
175
+ Object.assign(this, values);
176
+ }
177
+ }
178
+ class EuiChipTooltip {
179
+ constructor(values = {}) {
180
+ this.position = 'above';
181
+ this.contentAlignment = 'center';
182
+ this.delay = 0;
183
+ Object.assign(this, values);
184
+ }
185
+ }
186
+
187
+ const EDS_CHIP = [
188
+ EdsChip,
189
+ ];
190
+
191
+ /**
192
+ * Generated bundle index. Do not edit.
193
+ */
194
+
195
+ export { EDS_CHIP, EdsChip, EdsChipModel, EuiChipTooltip };
196
+ //# sourceMappingURL=eui-eds-eds-chip.mjs.map
@@ -0,0 +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 {\r\n Component,\r\n HostBinding,\r\n Input,\r\n ChangeDetectionStrategy,\r\n AfterContentInit,\r\n Output,\r\n EventEmitter,\r\n ViewChild,\r\n ElementRef,\r\n booleanAttribute,\r\n inject,\r\n OnInit,\r\n} from '@angular/core';\r\n\r\nimport { EuiBaseColorVariantsDirective, EuiBaseSizeVariantsDirective } from '@eui/eds/shared';\r\nimport { EDS_ICON } from '@eui/eds/eds-icon';\r\nimport { EDS_BUTTON } from '@eui/eds/eds-button';\r\n\r\n@Component({\r\n templateUrl: './eds-chip.html',\r\n selector: 'eds-chip, span[edsChip], li[edsChip]',\r\n styleUrl: './eds-chip.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n ...EDS_ICON,\r\n ...EDS_BUTTON,\r\n ],\r\n hostDirectives: [\r\n {\r\n directive: EuiBaseSizeVariantsDirective,\r\n inputs: [\r\n 'euiSizeXS',\r\n 'euiSizeS',\r\n 'euiSizeM',\r\n 'euiSizeVariant',\r\n ],\r\n }, \r\n {\r\n directive: EuiBaseColorVariantsDirective,\r\n inputs: [\r\n 'euiNeutral',\r\n 'euiSuccess',\r\n 'euiInfo',\r\n 'euiWarning',\r\n 'euiCritical',\r\n 'euiColorVariant',\r\n ],\r\n },\r\n ],\r\n})\r\nexport class EdsChip implements OnInit, AfterContentInit {\r\n /**\r\n * @description\r\n * Computes and returns the CSS classes for the component based on its current state.\r\n *\r\n * @returns {string} Space-separated string of CSS class names\r\n */\r\n @HostBinding('class')\r\n get cssClasses(): string {\r\n return [\r\n 'eds-chip',\r\n this.sizeVariantsBase.getCssClasses('eds-chip'),\r\n this.colorVariantsBase.getCssClasses('eds-chip'),\r\n this.isChipRemovable ? 'eui-chip--removable' : '',\r\n ].join(' ').trim();\r\n }\r\n\r\n /**\r\n * Sets the `role` attribute for the host element.\r\n *\r\n * @default 'status'\r\n */\r\n @HostBinding('attr.role') role = 'status';\r\n /**\r\n * Sets the `aria-label` attribute for the host element.\r\n *\r\n * @default 'Chip content'\r\n */\r\n @Input() @HostBinding('attr.aria-label') ariaLabel = 'Chip content';\r\n\r\n /**\r\n * Sets the `data-e2e` attribute for the host element.\r\n *\r\n * @default 'eui-chip'\r\n */\r\n @HostBinding('attr.data-e2e')\r\n @Input()\r\n e2eAttr = 'eui-chip';\r\n\r\n /**\r\n * Sets the euiInternalId of the chip.\r\n *\r\n * @default null\r\n */\r\n @Input() euiInternalId!: string;\r\n /**\r\n * Sets the label of the tooltip to diaply on hover.\r\n */\r\n @Input() tooltipMessage!: string;\r\n /**\r\n * Sets the id of the chip.\r\n */\r\n @Input() id!: string | number;\r\n /**\r\n * Sets the data of the chip like tooltip configuration.\r\n */\r\n // TODO: type should be specific\r\n // TODO: find the correct type or turn into a generic, https://www.typescriptlang.org/docs/handbook/2/generics.html\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n @Input() data: any = {\r\n id: crypto.randomUUID(),\r\n tooltip: {\r\n color: 'euiTooltipPrimary',\r\n contentAlignment: null,\r\n position: 'above',\r\n },\r\n };\r\n\r\n /**\r\n * Wether the chip can be removed.\r\n *\r\n * @default false\r\n */\r\n @Input({ transform: booleanAttribute }) isChipRemovable = false;\r\n /**\r\n * Event emitted when the chip is removed.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n @Output() remove = new EventEmitter<any>();\r\n\r\n /**\r\n * Icon declares by user in the chip\r\n */\r\n @ViewChild('chipLabel') chipLabel!: ElementRef<HTMLInputElement>;\r\n \r\n protected sizeVariantsBase: EuiBaseSizeVariantsDirective = inject(EuiBaseSizeVariantsDirective);\r\n protected colorVariantsBase: EuiBaseColorVariantsDirective = inject(EuiBaseColorVariantsDirective);\r\n\r\n private _elementRef = inject(ElementRef);\r\n\r\n ngOnInit(): void {\r\n if (!this.sizeVariantsBase.euiSizeVariant) {\r\n this.sizeVariantsBase.euiSizeM = true;\r\n }\r\n if (!this.colorVariantsBase.euiColorVariant) {\r\n this.colorVariantsBase.euiNeutral = true;\r\n } \r\n }\r\n\r\n ngAfterContentInit(): void {\r\n if (!this.data.id && this.id) {\r\n this.data = Object.assign(this.data, { id: this.id });\r\n }\r\n // checks if the parent element is an eui-chip-list to set role listitem or if a parent above in case cdkdroplist interferes\r\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')) {\r\n this.role = 'listitem'\r\n }\r\n }\r\n\r\n /**\r\n * Remove chip handler\r\n *\r\n * @param event Click event\r\n */\r\n public onRemove(event?: Event): void {\r\n if (event instanceof KeyboardEvent && (event as KeyboardEvent).code === 'Backspace') {\r\n this.remove.emit({ chip: this.data, event });\r\n } else {\r\n this.remove.emit(this.data);\r\n }\r\n }\r\n}\r\n","<div class=\"eds-chip__content\" #chipLabel>\r\n <ng-content></ng-content>\r\n</div>\r\n@if (isChipRemovable) {\r\n <button edsButton \r\n class=\"eds-chip__close\"\r\n ariaLabel=\"Remove {{ chipLabel.textContent }} chip\"\r\n [euiColorVariant]=\"colorVariantsBase.euiColorVariant\"\r\n (click)=\"onRemove($event)\"\r\n euiSizeS\r\n euiRounded\r\n euiButtonTertiary>\r\n <eds-icon icon=\"x\" euiSizeXS/>\r\n </button>\r\n}\r\n","export class EdsChipModel {\r\n id!: string | number;\r\n euiInternalId!: string;\r\n label!: string;\r\n isRemovable = false;\r\n isOutline = false;\r\n isRounded = false;\r\n isDisabled = false;\r\n variant: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger' | 'accent' = 'primary';\r\n tooltip: EuiChipTooltip = new EuiChipTooltip();\r\n iconClass?: string;\r\n iconSvgName?: string;\r\n\r\n constructor(values = {}) {\r\n Object.assign(this, values);\r\n }\r\n}\r\n\r\nexport class EuiChipTooltip {\r\n tooltipMessage!: string;\r\n position?: 'above' | 'below' | 'left' | 'right' | 'before' | 'after' = 'above';\r\n contentAlignment?: 'center' | 'left' | 'right' | 'justify' = 'center';\r\n delay? = 0;\r\n\r\n constructor(values = {}) {\r\n Object.assign(this, values);\r\n }\r\n}\r\n","import { EdsChip } from './eds-chip';\r\n\r\nexport * from './models/eui-chip.model';\r\nexport * from './eds-chip';\r\n\r\nexport const EDS_CHIP = [\r\n EdsChip,\r\n] as const;\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAmDa,OAAO,CAAA;AAhCpB,IAAA,WAAA,GAAA;AAiDI;;;;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,IAAI,GAAQ;AACjB,YAAA,EAAE,EAAE,MAAM,CAAC,UAAU,EAAE;AACvB,YAAA,OAAO,EAAE;AACL,gBAAA,KAAK,EAAE,mBAAmB;AAC1B,gBAAA,gBAAgB,EAAE,IAAI;AACtB,gBAAA,QAAQ,EAAE,OAAO;AACpB,aAAA;SACJ;AAED;;;;AAIG;QACqC,IAAA,CAAA,eAAe,GAAG,KAAK;AAC/D;;AAEG;;AAEO,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAAO;AAOhC,QAAA,IAAA,CAAA,gBAAgB,GAAiC,MAAM,CAAC,4BAA4B,CAAC;AACrF,QAAA,IAAA,CAAA,iBAAiB,GAAkC,MAAM,CAAC,6BAA6B,CAAC;AAE1F,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAiC3C,IAAA;AAxHG;;;;;AAKG;AACH,IAAA,IACI,UAAU,GAAA;QACV,OAAO;YACH,UAAU;AACV,YAAA,IAAI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,qBAAA,EAAA,QAAA,EAAA,6eAAA,EAAA,MAAA,EAAA,CAAA,qyDAAA,CAAA,EAAA;;sBASA,WAAW;uBAAC,OAAO;;sBAenB,WAAW;uBAAC,WAAW;;sBAMvB;;sBAAS,WAAW;uBAAC,iBAAiB;;sBAOtC,WAAW;uBAAC,eAAe;;sBAC3B;;sBAQA;;sBAIA;;sBAIA;;sBAOA;;sBAcA,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;sBAKrC;;sBAKA,SAAS;uBAAC,WAAW;;;MEtIb,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;;;;"}
@@ -0,0 +1,65 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, booleanAttribute, HostBinding, Input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { EUI_CONFIG_TOKEN } from '@eui/core';
4
+
5
+ class EdsIconImage {
6
+ constructor() {
7
+ this.ariaRole = 'img';
8
+ this.assetsBaseUrl = 'assets';
9
+ /**
10
+ * Hides the icon from assistive technologies when purely decorative.
11
+ * Set to false when icon conveys meaningful information requiring announcement.
12
+ * @default true
13
+ */
14
+ this.ariaHidden = true;
15
+ this.config = inject(EUI_CONFIG_TOKEN, { optional: true });
16
+ }
17
+ get cssClasses() {
18
+ return [
19
+ 'eds-icon-image',
20
+ ]
21
+ .join(' ')
22
+ .trim();
23
+ }
24
+ ngOnInit() {
25
+ const assetsBaseUrl = this.config?.appConfig?.global?.eui?.assetsBaseUrl;
26
+ if (assetsBaseUrl) {
27
+ this.assetsBaseUrl = this.config?.appConfig?.global?.eui?.assetsBaseUrl || 'assets';
28
+ }
29
+ }
30
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: EdsIconImage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
31
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "21.2.17", type: EdsIconImage, isStandalone: true, selector: "eds-icon, span[edsIcon]", inputs: { iconUrl: "iconUrl", ariaLabel: "ariaLabel", ariaHidden: ["ariaHidden", "ariaHidden", booleanAttribute] }, host: { properties: { "attr.role": "this.ariaRole", "class": "this.cssClasses", "attr.aria-label": "this.ariaLabel", "ariaHidden": "this.ariaHidden" } }, ngImport: i0, template: "<svg class=\"eds-icon-svg-image\"\r\n [attr.aria-hidden]=\"ariaHidden\"\r\n [attr.role]=\"'img'\">\r\n <image [attr.href]=\"iconUrl\" [class]=\"'eds-icon-svg-image'\"></image>\r\n</svg>\r\n", styles: [".eui-21 :host.eds-icon-image{--_height: var(--_icon-size);--_width: var(--_icon-size)}.eui-21 :host.eds-icon-image{display:inline-flex;position:relative}.eui-21 :host.eds-icon-image .eds-icon-svg-image{height:var(--_height);width:var(--_width)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
32
+ }
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: EdsIconImage, decorators: [{
34
+ type: Component,
35
+ args: [{ selector: 'eds-icon, span[edsIcon]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg class=\"eds-icon-svg-image\"\r\n [attr.aria-hidden]=\"ariaHidden\"\r\n [attr.role]=\"'img'\">\r\n <image [attr.href]=\"iconUrl\" [class]=\"'eds-icon-svg-image'\"></image>\r\n</svg>\r\n", styles: [".eui-21 :host.eds-icon-image{--_height: var(--_icon-size);--_width: var(--_icon-size)}.eui-21 :host.eds-icon-image{display:inline-flex;position:relative}.eui-21 :host.eds-icon-image .eds-icon-svg-image{height:var(--_height);width:var(--_width)}\n"] }]
36
+ }], propDecorators: { ariaRole: [{
37
+ type: HostBinding,
38
+ args: ['attr.role']
39
+ }], iconUrl: [{
40
+ type: Input
41
+ }], cssClasses: [{
42
+ type: HostBinding,
43
+ args: ['class']
44
+ }], ariaLabel: [{
45
+ type: HostBinding,
46
+ args: ['attr.aria-label']
47
+ }, {
48
+ type: Input
49
+ }], ariaHidden: [{
50
+ type: HostBinding
51
+ }, {
52
+ type: Input,
53
+ args: [{ transform: booleanAttribute }]
54
+ }] } });
55
+
56
+ const EDS_ICON_IMAGE = [
57
+ EdsIconImage,
58
+ ];
59
+
60
+ /**
61
+ * Generated bundle index. Do not edit.
62
+ */
63
+
64
+ export { EDS_ICON_IMAGE, EdsIconImage };
65
+ //# sourceMappingURL=eui-eds-eds-icon-image.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eui-eds-eds-icon-image.mjs","sources":["../../eds-icon-image/eds-icon-image.ts","../../eds-icon-image/eds-icon-image.html","../../eds-icon-image/index.ts","../../eds-icon-image/eui-eds-eds-icon-image.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n Input,\r\n HostBinding,\r\n OnInit,\r\n inject,\r\n booleanAttribute,\r\n} from '@angular/core';\r\nimport { EUI_CONFIG_TOKEN } from '@eui/core';\r\nimport { EuiConfig } from '@eui/core';\r\n\r\n@Component({\r\n selector: 'eds-icon, span[edsIcon]',\r\n templateUrl: './eds-icon-image.html',\r\n styleUrls: ['./eds-icon-image.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class EdsIconImage implements OnInit {\r\n @HostBinding('attr.role') ariaRole = 'img';\r\n\r\n /**\r\n * Direct URL to an SVG icon file, bypassing the icon set resolution.\r\n * Useful for loading custom or external icons not in configured icon sets.\r\n */\r\n @Input() iconUrl!: string;\r\n\r\n @HostBinding('class')\r\n public get cssClasses(): string {\r\n return [\r\n 'eds-icon-image',\r\n ]\r\n .join(' ')\r\n .trim();\r\n }\r\n\r\n /**\r\n * Accessible label for screen readers describing the icon's purpose.\r\n * Provides semantic meaning when icon conveys information beyond decoration.\r\n */\r\n @HostBinding('attr.aria-label')\r\n @Input() ariaLabel!: string;\r\n\r\n public assetsBaseUrl = 'assets';\r\n\r\n /**\r\n * Hides the icon from assistive technologies when purely decorative.\r\n * Set to false when icon conveys meaningful information requiring announcement.\r\n * @default true\r\n */\r\n @HostBinding() @Input({ transform: booleanAttribute }) ariaHidden = true;\r\n \r\n private config = inject<EuiConfig>(EUI_CONFIG_TOKEN, { optional: true })!;\r\n\r\n ngOnInit(): void {\r\n const assetsBaseUrl = this.config?.appConfig?.global?.eui?.assetsBaseUrl;\r\n if (assetsBaseUrl) {\r\n this.assetsBaseUrl = this.config?.appConfig?.global?.eui?.assetsBaseUrl || 'assets';\r\n }\r\n }\r\n}\r\n","<svg class=\"eds-icon-svg-image\"\r\n [attr.aria-hidden]=\"ariaHidden\"\r\n [attr.role]=\"'img'\">\r\n <image [attr.href]=\"iconUrl\" [class]=\"'eds-icon-svg-image'\"></image>\r\n</svg>\r\n","import { EdsIconImage } from './eds-icon-image';\r\n\r\nexport * from './eds-icon-image';\r\n\r\nexport const EDS_ICON_IMAGE = [\r\n EdsIconImage,\r\n] as const;\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":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