@eui/eds 22.0.0-alpha.43 → 22.0.0-alpha.44

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.
@@ -1 +1 @@
1
- {"version":3,"file":"eui-eds-eds-avatar.mjs","sources":["../../eds-avatar/eds-avatar-badge.ts","../../eds-avatar/eds-avatar-icon.ts","../../eds-avatar/eds-avatar-image.ts","../../eds-avatar/eds-avatar-image.html","../../eds-avatar/eds-avatar-content.ts","../../eds-avatar/eds-avatar-content.html","../../eds-avatar/eds-avatar-content-sublabel.ts","../../eds-avatar/eds-avatar-content-label.ts","../../eds-avatar/eds-avatar-list.ts","../../eds-avatar/eds-avatar-text.ts","../../eds-avatar/eds-avatar.ts","../../eds-avatar/eds-avatar.html","../../eds-avatar/index.ts","../../eds-avatar/eui-eds-eds-avatar.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n@Component({\n selector: 'eds-avatar-badge',\n template: '<ng-content/>',\n styleUrl: './eds-avatar-badge.scss',\n host: {\n class: 'eds-avatar-badge',\n '[attr.position]': 'isPositionBottom() ? \"bottom\" : \"top\"',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarBadge {\n /**\n * Whether the badge is positioned at the bottom of the avatar.\n * @default false\n */\n isPositionBottom = input(false, { transform: booleanAttribute });\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'eds-avatar-icon',\n template: '<ng-content/>',\n styleUrl: './eds-avatar-icon.scss',\n host: {\n class: 'eds-avatar-icon',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarIcon {}\n","import { ChangeDetectionStrategy, Component, input, computed } from '@angular/core';\nimport { EDS_ICON } from '@eui/eds/eds-icon';\n\n@Component({\n selector: 'eds-avatar-image',\n templateUrl: './eds-avatar-image.html',\n styleUrl: './eds-avatar-image.scss',\n imports: [\n ...EDS_ICON,\n ],\n host: {\n class: 'eds-avatar-image',\n '[attr.default]': 'isDefault() || null',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarImage {\n /**\n * URL of the image to be displayed in the avatar.\n * If not provided, a default (user icon) is shown.\n */\n imageUrl = input<string>('');\n\n /** Whether the default (no image URL) fallback is shown. */\n protected isDefault = computed(() => !this.imageUrl());\n\n /**\n * The final image URL to be used in the template.\n * This will be either the provided imageUrl or a default image URL.\n */\n public imageUrlGenerated = 'assets';\n}\n","@if (imageUrl()) {\n <div class=\"eds-avatar-image-wrapper\">\n <img [src]=\"imageUrl()\" alt=\"Avatar\"/>\n </div>\n} @else {\n <eds-icon icon=\"user:core\" color=\"neutral\"/>\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'eds-avatar-content',\n templateUrl: './eds-avatar-content.html',\n styleUrl: './eds-avatar-content.scss',\n host: {\n class: 'eds-avatar-content',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarContent {\n}\n","<ng-content select=\"eds-avatar-content-label\"/>\n<ng-content select=\"eds-avatar-content-sublabel\"/>","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'eds-avatar-content-sublabel',\n template: '<ng-content />',\n styleUrl: './eds-avatar-content-sublabel.scss',\n host: {\n class: 'eds-avatar-content-sublabel',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarContentSublabel {\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'eds-avatar-content-label',\n template: '<ng-content />',\n styleUrl: './eds-avatar-content-label.scss',\n host: {\n class: 'eds-avatar-content-label',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarContentLabel {\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'eds-avatar-list',\n template: '<ng-content/>',\n styleUrl: './eds-avatar-list.scss',\n host: {\n class: 'eds-avatar-list',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarList {\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'eds-avatar-text',\n template: '<ng-content/>',\n styleUrl: './eds-avatar-text.scss',\n host: {\n class: 'eds-avatar-text',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarText {\n}\n","import { Component, ChangeDetectionStrategy, input, contentChild, computed } from '@angular/core';\nimport { EdsAvatarImage } from './eds-avatar-image';\n\n/**\n * Local narrowed size union — the avatar's size contract.\n */\nexport type EdsAvatarSize = '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl';\n\n@Component({\n selector: 'div[edsAvatar], span[edsAvatar], eds-avatar',\n templateUrl: './eds-avatar.html',\n styleUrl: './eds-avatar.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'eds-avatar',\n role: 'img',\n '[attr.size]': 'size()',\n '[attr.color]': 'color() || null',\n '[attr.image]': 'hasImage() || null',\n '[attr.data-e2e]': 'e2eAttr()',\n '[attr.aria-label]': 'ariaLabel()',\n },\n})\nexport class EdsAvatar {\n /**\n * Data attribute for E2E testing\n * @default 'eds-avatar'\n */\n e2eAttr = input('eds-avatar');\n\n /**\n * Size of the avatar.\n * @default 'm'\n */\n size = input<EdsAvatarSize>('m');\n\n /**\n * ARIA label for accessibility.\n * Should describe the avatar's identity (e.g. user name, initials meaning).\n * When null, no aria-label is rendered — ensure visible text or an explicit label is provided.\n * @default null\n */\n ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n /**\n * Extra color palette applied to the avatar surface (maps to an EDS color palette,\n * e.g. `info`, `success`, `warning`, `critical`). Empty string uses the default neutral surface.\n * @default ''\n */\n color = input<string>('');\n\n /** Signal-based content query for avatar image sub-component. */\n protected avatarImage = contentChild(EdsAvatarImage);\n\n /** Whether an image sub-component is projected. */\n protected hasImage = computed(() => !!this.avatarImage());\n}\n","<div class=\"eds-avatar-wrapper\">\n <ng-content select=\"eds-avatar-icon\"/>\n <ng-content select=\"eds-avatar-text\"/>\n <ng-content select=\"eds-avatar-image\"/>\n <ng-content select=\"eds-avatar-badge\"/>\n</div>\n\n<ng-content select=\"eds-avatar-content\"/>\n","import { EdsAvatarBadge } from './eds-avatar-badge';\nimport { EdsAvatarIcon } from './eds-avatar-icon';\nimport { EdsAvatarImage } from './eds-avatar-image';\nimport { EdsAvatarContent } from './eds-avatar-content';\nimport { EdsAvatarContentSublabel } from './eds-avatar-content-sublabel';\nimport { EdsAvatarContentLabel } from './eds-avatar-content-label';\nimport { EdsAvatarList } from './eds-avatar-list';\nimport { EdsAvatarText } from './eds-avatar-text';\nimport { EdsAvatar } from './eds-avatar';\n\nexport * from './eds-avatar';\nexport * from './eds-avatar-icon';\nexport * from './eds-avatar-text';\nexport * from './eds-avatar-image';\nexport * from './eds-avatar-badge';\nexport * from './eds-avatar-list';\nexport * from './eds-avatar-content';\nexport * from './eds-avatar-content-label';\nexport * from './eds-avatar-content-sublabel';\n\nexport const EDS_AVATAR = [\n EdsAvatar,\n EdsAvatarIcon,\n EdsAvatarText,\n EdsAvatarImage,\n EdsAvatarBadge,\n EdsAvatarList,\n EdsAvatarContent,\n EdsAvatarContentLabel,\n EdsAvatarContentSublabel,\n] as const;","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAYa,cAAc,CAAA;AAV3B,IAAA,WAAA,GAAA;AAWI;;;AAGG;QACH,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAC,KAAK,wFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACnE,IAAA;8GANY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAA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AAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDea,SAAS,EAAA,UAAA,EAAA,CAAA;kBAfrB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,6CAA6C,EAAA,eAAA,EAGtC,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACF,wBAAA,KAAK,EAAE,YAAY;AACnB,wBAAA,IAAI,EAAE,KAAK;AACX,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,cAAc,EAAE,iBAAiB;AACjC,wBAAA,cAAc,EAAE,oBAAoB;AACpC,wBAAA,iBAAiB,EAAE,WAAW;AAC9B,wBAAA,mBAAmB,EAAE,aAAa;AACrC,qBAAA,EAAA,QAAA,EAAA,uRAAA,EAAA,MAAA,EAAA,CAAA,6xGAAA,CAAA,EAAA;mdA+BoC,cAAc,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhChD,MAAM,UAAU,GAAG;IAClB,SAAS;IACT,aAAa;IACb,aAAa;IACb,cAAc;IACd,cAAc;IACd,aAAa;IACb,gBAAgB;IAChB,qBAAqB;IACrB,wBAAwB;;;AC7BhC;;AAEG;;;;"}
1
+ {"version":3,"file":"eui-eds-eds-avatar.mjs","sources":["../../eds-avatar/eds-avatar-badge.ts","../../eds-avatar/eds-avatar-icon.ts","../../eds-avatar/eds-avatar-image.ts","../../eds-avatar/eds-avatar-image.html","../../eds-avatar/eds-avatar-content.ts","../../eds-avatar/eds-avatar-content.html","../../eds-avatar/eds-avatar-content-sublabel.ts","../../eds-avatar/eds-avatar-content-label.ts","../../eds-avatar/eds-avatar-list.ts","../../eds-avatar/eds-avatar-text.ts","../../eds-avatar/eds-avatar.ts","../../eds-avatar/eds-avatar.html","../../eds-avatar/index.ts","../../eds-avatar/eui-eds-eds-avatar.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n@Component({\n selector: 'eds-avatar-badge',\n template: '<ng-content/>',\n styleUrl: './eds-avatar-badge.scss',\n host: {\n class: 'eds-avatar-badge',\n '[attr.position]': 'isPositionBottom() ? \"bottom\" : \"top\"',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarBadge {\n /**\n * Whether the badge is positioned at the bottom of the avatar.\n * @default false\n */\n isPositionBottom = input(false, { transform: booleanAttribute });\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'eds-avatar-icon',\n template: '<ng-content/>',\n styleUrl: './eds-avatar-icon.scss',\n host: {\n class: 'eds-avatar-icon',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarIcon {}\n","import { ChangeDetectionStrategy, Component, input, computed } from '@angular/core';\nimport { EDS_ICON } from '@eui/eds/eds-icon';\n\n@Component({\n selector: 'eds-avatar-image',\n templateUrl: './eds-avatar-image.html',\n styleUrl: './eds-avatar-image.scss',\n imports: [\n ...EDS_ICON,\n ],\n host: {\n class: 'eds-avatar-image',\n '[attr.default]': 'isDefault() || null',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarImage {\n /**\n * URL of the image to be displayed in the avatar.\n * If not provided, a default (user icon) is shown.\n */\n imageUrl = input<string>('');\n\n /** Whether the default (no image URL) fallback is shown. */\n protected isDefault = computed(() => !this.imageUrl());\n\n /**\n * The final image URL to be used in the template.\n * This will be either the provided imageUrl or a default image URL.\n */\n public imageUrlGenerated = 'assets';\n}\n","@if (imageUrl()) {\n <div class=\"eds-avatar-image-wrapper\">\n <img [src]=\"imageUrl()\" alt=\"Avatar\"/>\n </div>\n} @else {\n <eds-icon icon=\"user:core\" color=\"neutral\"/>\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'eds-avatar-content',\n templateUrl: './eds-avatar-content.html',\n styleUrl: './eds-avatar-content.scss',\n host: {\n class: 'eds-avatar-content',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarContent {\n}\n","<ng-content select=\"eds-avatar-content-label\"/>\n<ng-content select=\"eds-avatar-content-sublabel\"/>","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'eds-avatar-content-sublabel',\n template: '<ng-content />',\n styleUrl: './eds-avatar-content-sublabel.scss',\n host: {\n class: 'eds-avatar-content-sublabel',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarContentSublabel {\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'eds-avatar-content-label',\n template: '<ng-content />',\n styleUrl: './eds-avatar-content-label.scss',\n host: {\n class: 'eds-avatar-content-label',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarContentLabel {\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'eds-avatar-list',\n template: '<ng-content/>',\n styleUrl: './eds-avatar-list.scss',\n host: {\n class: 'eds-avatar-list',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarList {\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'eds-avatar-text',\n template: '<ng-content/>',\n styleUrl: './eds-avatar-text.scss',\n host: {\n class: 'eds-avatar-text',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAvatarText {\n}\n","import { Component, ChangeDetectionStrategy, input, contentChild, computed } from '@angular/core';\nimport { EdsAvatarImage } from './eds-avatar-image';\n\n/**\n * Local narrowed size union — the avatar's size contract.\n */\nexport type EdsAvatarSize = '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl';\n\n@Component({\n selector: 'div[edsAvatar], span[edsAvatar], eds-avatar',\n templateUrl: './eds-avatar.html',\n styleUrl: './eds-avatar.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'eds-avatar',\n role: 'img',\n '[attr.size]': 'size()',\n '[attr.color]': 'color() || null',\n '[attr.image]': 'hasImage() || null',\n '[attr.data-e2e]': 'e2eAttr()',\n '[attr.aria-label]': 'ariaLabel()',\n },\n})\nexport class EdsAvatar {\n /**\n * Data attribute for E2E testing\n * @default 'eds-avatar'\n */\n e2eAttr = input('eds-avatar');\n\n /**\n * Size of the avatar.\n * @default 'm'\n */\n size = input<EdsAvatarSize>('m');\n\n /**\n * ARIA label for accessibility.\n * Should describe the avatar's identity (e.g. user name, initials meaning).\n * When null, no aria-label is rendered — ensure visible text or an explicit label is provided.\n * @default null\n */\n ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n /**\n * Extra color palette applied to the avatar surface (maps to an EDS color palette,\n * e.g. `info`, `success`, `warning`, `critical`). Empty string uses the default neutral surface.\n * @default ''\n */\n color = input<string>('');\n\n /** Signal-based content query for avatar image sub-component. */\n protected avatarImage = contentChild(EdsAvatarImage);\n\n /** Whether an image sub-component is projected. */\n protected hasImage = computed(() => !!this.avatarImage());\n}\n","<div class=\"eds-avatar-wrapper\">\n <ng-content select=\"eds-avatar-icon\"/>\n <ng-content select=\"eds-avatar-text\"/>\n <ng-content select=\"eds-avatar-image\"/>\n <ng-content select=\"eds-avatar-badge\"/>\n</div>\n\n<ng-content select=\"eds-avatar-content\"/>\n","import { EdsAvatarBadge } from './eds-avatar-badge';\nimport { EdsAvatarIcon } from './eds-avatar-icon';\nimport { EdsAvatarImage } from './eds-avatar-image';\nimport { EdsAvatarContent } from './eds-avatar-content';\nimport { EdsAvatarContentSublabel } from './eds-avatar-content-sublabel';\nimport { EdsAvatarContentLabel } from './eds-avatar-content-label';\nimport { EdsAvatarList } from './eds-avatar-list';\nimport { EdsAvatarText } from './eds-avatar-text';\nimport { EdsAvatar } from './eds-avatar';\n\nexport * from './eds-avatar';\nexport * from './eds-avatar-icon';\nexport * from './eds-avatar-text';\nexport * from './eds-avatar-image';\nexport * from './eds-avatar-badge';\nexport * from './eds-avatar-list';\nexport * from './eds-avatar-content';\nexport * from './eds-avatar-content-label';\nexport * from './eds-avatar-content-sublabel';\n\nexport const EDS_AVATAR = [\n EdsAvatar,\n EdsAvatarIcon,\n EdsAvatarText,\n EdsAvatarImage,\n EdsAvatarBadge,\n EdsAvatarList,\n EdsAvatarContent,\n EdsAvatarContentLabel,\n EdsAvatarContentSublabel,\n] as const;","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAYa,cAAc,CAAA;AAV3B,IAAA,WAAA,GAAA;AAWI;;;AAGG;QACH,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAC,KAAK,wFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACnE,IAAA;8GANY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,6WARb,eAAe,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,iEAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAQhB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAV1B,SAAS;+BACI,kBAAkB,EAAA,QAAA,EAClB,eAAe,EAAA,IAAA,EAEnB;AACF,wBAAA,KAAK,EAAE,kBAAkB;AACzB,wBAAA,iBAAiB,EAAE,uCAAuC;qBAC7D,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,iEAAA,CAAA,EAAA;;;MCCtC,aAAa,CAAA;8GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SA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BoC,cAAc,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhChD,MAAM,UAAU,GAAG;IAClB,SAAS;IACT,aAAa;IACb,aAAa;IACb,cAAc;IACd,cAAc;IACd,aAAa;IACb,gBAAgB;IAChB,qBAAqB;IACrB,wBAAwB;;;AC7BhC;;AAEG;;;;"}
@@ -134,7 +134,7 @@ class EdsBadge {
134
134
  }
135
135
  }
136
136
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsBadge, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
137
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: EdsBadge, isStandalone: true, selector: "eds-badge, span[edsBadge]", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, maxCharCount: { classPropertyName: "maxCharCount", publicName: "maxCharCount", isSignal: true, isRequired: false, transformFunction: null }, charReplacement: { classPropertyName: "charReplacement", publicName: "charReplacement", isSignal: true, isRequired: false, transformFunction: null }, e2eAttr: { classPropertyName: "e2eAttr", publicName: "e2eAttr", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "status" }, properties: { "attr.color": "color()", "attr.variant": "variant()", "attr.size": "size()", "attr.icon-only": "iconOnly() || null", "attr.empty": "isEmpty() || null", "attr.data-e2e": "e2eAttr()", "attr.aria-label": "ariaLabel()" } }, viewQueries: [{ propertyName: "content", first: true, predicate: ["contentRef"], descendants: true, isSignal: true }], ngImport: i0, template: "@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", styles: [":host{--_eds-badge-padding: 0 var(--eds-sp-3xs);--_eds-badge-border-radius: var(--eds-br-full);--_eds-badge-border-width: var(--eds-bw-xs);--_eds-badge-font: var(--eds-f-microcopy-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-height: calc(var(--eds-sp-m) + var(--eds-sp-3xs));--_eds-badge-min-width: calc(var(--eds-sp-m) + var(--eds-sp-3xs));--_eds-badge-empty-size: var(--eds-sp-s);--_eds-badge-surface: var(--eds-c-surface-neutral);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral);--_eds-badge-border-color: var(--eds-c-border-neutral-subtle);display:inline-flex;border:var(--_eds-badge-border-width) solid var(--_eds-badge-border-color);border-radius:var(--_eds-badge-border-radius);background-color:var(--_eds-badge-surface);--_eds-icon-on-surface: var(--_eds-badge-on-surface);--_icon-size: initial}:host .eds-badge__wrapper{display:inline-flex;align-items:center;justify-content:center;color:var(--_eds-badge-on-surface);height:var(--_eds-badge-height);min-width:var(--_eds-badge-min-width);padding:var(--_eds-badge-padding);font:var(--_eds-badge-font);font-weight:var(--_eds-badge-font-weight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([color=primary]){--_eds-badge-surface: var(--eds-c-surface-primary);--_eds-badge-on-surface: var(--eds-c-on-surface-primary);--_eds-badge-border-color: var(--eds-c-border-primary-subtle)}:host([color=neutral]){--_eds-badge-surface: var(--eds-c-surface-neutral);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral);--_eds-badge-border-color: var(--eds-c-border-neutral-subtle)}:host([color=success]){--_eds-badge-surface: var(--eds-c-surface-success);--_eds-badge-on-surface: var(--eds-c-on-surface-success);--_eds-badge-border-color: var(--eds-c-border-success-subtle)}:host([color=info]){--_eds-badge-surface: var(--eds-c-surface-info);--_eds-badge-on-surface: var(--eds-c-on-surface-info);--_eds-badge-border-color: var(--eds-c-border-info-subtle)}:host([color=warning]){--_eds-badge-surface: var(--eds-c-surface-warning);--_eds-badge-on-surface: var(--eds-c-on-surface-warning);--_eds-badge-border-color: var(--eds-c-border-warning-subtle)}:host([color=critical]){--_eds-badge-surface: var(--eds-c-surface-critical);--_eds-badge-on-surface: var(--eds-c-on-surface-critical);--_eds-badge-border-color: var(--eds-c-border-critical-subtle)}:host([variant=light][color=primary]){--_eds-badge-surface: var(--eds-c-surface-primary-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-primary-subtler);--_eds-badge-border-color: var(--eds-c-border-primary-subtler)}:host([variant=light][color=neutral]){--_eds-badge-surface: var(--eds-c-surface-neutral-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral-subtler);--_eds-badge-border-color: var(--eds-c-border-neutral-subtler)}:host([variant=light][color=success]){--_eds-badge-surface: var(--eds-c-surface-success-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-success-subtler);--_eds-badge-border-color: var(--eds-c-border-success-subtler)}:host([variant=light][color=info]){--_eds-badge-surface: var(--eds-c-surface-info-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-info-subtler);--_eds-badge-border-color: var(--eds-c-border-info-subtler)}:host([variant=light][color=warning]){--_eds-badge-surface: var(--eds-c-surface-warning-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-warning-subtler);--_eds-badge-border-color: var(--eds-c-border-warning-subtler)}:host([variant=light][color=critical]){--_eds-badge-surface: var(--eds-c-surface-critical-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-critical-subtler);--_eds-badge-border-color: var(--eds-c-border-critical-subtler)}:host([size=xs]){--_eds-badge-height: var(--eds-sp-s);--_eds-badge-min-width: var(--eds-sp-s);--_eds-badge-font: var(--eds-f-supportive-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-empty-size: var(--eds-sp-2xs)}:host([size=s]){--_eds-badge-height: var(--eds-sp-m);--_eds-badge-min-width: var(--eds-sp-m);--_eds-badge-font: var(--eds-f-supportive-m);--_eds-badge-font-weight: var(--eds-f-w-regular)}:host([size=l]){--_eds-badge-height: calc(var(--eds-sp-m) + var(--eds-sp-2xs));--_eds-badge-min-width: calc(var(--eds-sp-m) + var(--eds-sp-2xs));--_eds-badge-font: var(--eds-f-microcopy-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-empty-size: var(--eds-sp-m)}:host([empty]){width:var(--_eds-badge-empty-size);height:var(--_eds-badge-empty-size)}:host([icon-only]) .eds-badge__wrapper{padding:0;width:var(--_eds-badge-height);min-width:var(--_eds-badge-height)}:host-context(.eds-icon){position:absolute;left:60%;top:-20%}:host([empty]):host-context(.eds-icon){left:60%;top:-10%}:host([size=xs][empty]):host-context(.eds-icon){left:70%;top:-10%}:host-context(.eds-icon-button[size=\"2xs\"]){left:50%;top:-30%}:host-context(.eds-icon-button[size=xs]){left:50%;top:-40%}:host-context(.eds-icon-button[size=s]){left:50%;top:-50%}:host-context(.eds-icon-button[size=m]){left:50%;top:-40%}:host-context(.eds-icon-button[size=l]){left:50%;top:-25%}:host-context(.eds-avatar){border:var(--eds-bw-s) solid var(--eds-c-border-inverted)}\n"], dependencies: [{ kind: "ngmodule", type: ObserversModule }, { kind: "directive", type: i1.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
137
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: EdsBadge, isStandalone: true, selector: "eds-badge, span[edsBadge]", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, maxCharCount: { classPropertyName: "maxCharCount", publicName: "maxCharCount", isSignal: true, isRequired: false, transformFunction: null }, charReplacement: { classPropertyName: "charReplacement", publicName: "charReplacement", isSignal: true, isRequired: false, transformFunction: null }, e2eAttr: { classPropertyName: "e2eAttr", publicName: "e2eAttr", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "status" }, properties: { "attr.color": "color()", "attr.variant": "variant()", "attr.size": "size()", "attr.icon-only": "iconOnly() || null", "attr.empty": "isEmpty() || null", "attr.data-e2e": "e2eAttr()", "attr.aria-label": "ariaLabel()" } }, viewQueries: [{ propertyName: "content", first: true, predicate: ["contentRef"], descendants: true, isSignal: true }], ngImport: i0, template: "@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", styles: [":host{--_eds-badge-padding: 0 var(--eds-sp-3xs);--_eds-badge-border-radius: var(--eds-br-full);--_eds-badge-border-width: var(--eds-bw-xs);--_eds-badge-font: var(--eds-f-microcopy-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-height: calc(var(--eds-sp-m) + var(--eds-sp-3xs));--_eds-badge-min-width: calc(var(--eds-sp-m) + var(--eds-sp-3xs));--_eds-badge-empty-size: var(--eds-sp-s);--_eds-badge-surface: var(--eds-c-surface-neutral);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral);--_eds-badge-border-color: var(--eds-c-border-neutral-subtle);display:inline-flex;border:var(--_eds-badge-border-width) solid var(--_eds-badge-border-color);border-radius:var(--_eds-badge-border-radius);background-color:var(--_eds-badge-surface);--_eds-icon-on-surface: var(--_eds-badge-on-surface);--_icon-size: initial}:host .eds-badge__wrapper{display:inline-flex;align-items:center;justify-content:center;color:var(--_eds-badge-on-surface);height:var(--_eds-badge-height);min-width:var(--_eds-badge-min-width);padding:var(--_eds-badge-padding);font:var(--_eds-badge-font);font-weight:var(--_eds-badge-font-weight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([color=primary]){--_eds-badge-surface: var(--eds-c-surface-primary);--_eds-badge-on-surface: var(--eds-c-on-surface-primary);--_eds-badge-border-color: var(--eds-c-border-primary-subtle)}:host([color=neutral]){--_eds-badge-surface: var(--eds-c-surface-neutral);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral);--_eds-badge-border-color: var(--eds-c-border-neutral-subtle)}:host([color=success]){--_eds-badge-surface: var(--eds-c-surface-success);--_eds-badge-on-surface: var(--eds-c-on-surface-success);--_eds-badge-border-color: var(--eds-c-border-success-subtle)}:host([color=info]){--_eds-badge-surface: var(--eds-c-surface-info);--_eds-badge-on-surface: var(--eds-c-on-surface-info);--_eds-badge-border-color: var(--eds-c-border-info-subtle)}:host([color=warning]){--_eds-badge-surface: var(--eds-c-surface-warning);--_eds-badge-on-surface: var(--eds-c-on-surface-warning);--_eds-badge-border-color: var(--eds-c-border-warning-subtle)}:host([color=critical]){--_eds-badge-surface: var(--eds-c-surface-critical);--_eds-badge-on-surface: var(--eds-c-on-surface-critical);--_eds-badge-border-color: var(--eds-c-border-critical-subtle)}:host([variant=light][color=primary]){--_eds-badge-surface: var(--eds-c-surface-primary-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-primary-subtler);--_eds-badge-border-color: var(--eds-c-border-primary-subtler)}:host([variant=light][color=neutral]){--_eds-badge-surface: var(--eds-c-surface-neutral-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral-subtler);--_eds-badge-border-color: var(--eds-c-border-neutral-subtler)}:host([variant=light][color=success]){--_eds-badge-surface: var(--eds-c-surface-success-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-success-subtler);--_eds-badge-border-color: var(--eds-c-border-success-subtler)}:host([variant=light][color=info]){--_eds-badge-surface: var(--eds-c-surface-info-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-info-subtler);--_eds-badge-border-color: var(--eds-c-border-info-subtler)}:host([variant=light][color=warning]){--_eds-badge-surface: var(--eds-c-surface-warning-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-warning-subtler);--_eds-badge-border-color: var(--eds-c-border-warning-subtler)}:host([variant=light][color=critical]){--_eds-badge-surface: var(--eds-c-surface-critical-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-critical-subtler);--_eds-badge-border-color: var(--eds-c-border-critical-subtler)}:host([size=xs]){--_eds-badge-height: var(--eds-sp-s);--_eds-badge-min-width: var(--eds-sp-s);--_eds-badge-font: var(--eds-f-supportive-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-empty-size: var(--eds-sp-2xs)}:host([size=s]){--_eds-badge-height: var(--eds-sp-m);--_eds-badge-min-width: var(--eds-sp-m);--_eds-badge-font: var(--eds-f-supportive-m);--_eds-badge-font-weight: var(--eds-f-w-regular)}:host([size=l]){--_eds-badge-height: calc(var(--eds-sp-m) + var(--eds-sp-2xs));--_eds-badge-min-width: calc(var(--eds-sp-m) + var(--eds-sp-2xs));--_eds-badge-font: var(--eds-f-microcopy-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-empty-size: var(--eds-sp-m)}:host([empty]){width:var(--_eds-badge-empty-size);height:var(--_eds-badge-empty-size)}:host([icon-only]) .eds-badge__wrapper{padding:0;width:var(--_eds-badge-height);min-width:var(--_eds-badge-height)}:host-context(.eds-icon){position:absolute;left:60%;top:-20%}:host([empty]):host-context(.eds-icon){left:60%;top:-10%}:host([size=xs][empty]):host-context(.eds-icon){left:70%;top:-10%}:host-context(.eds-icon-button[size=\"2xs\"]){left:50%;top:-30%}:host-context(.eds-icon-button[size=xs]){left:50%;top:-40%}:host-context(.eds-icon-button[size=s]){left:50%;top:-50%}:host-context(.eds-icon-button[size=m]){left:50%;top:-40%}:host-context(.eds-icon-button[size=l]){left:50%;top:-25%}:host-context(.eds-avatar){box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:var(--_eds-avatar-badge-size);min-width:var(--_eds-avatar-badge-size);height:var(--_eds-avatar-badge-size);padding:0;border:var(--_eds-avatar-badge-ring-width, var(--eds-bw-s)) solid var(--eds-c-border-inverted);--_icon-size: var(--_eds-avatar-badge-icon-size)}:host-context(.eds-avatar) .eds-badge__wrapper{display:flex;flex:1 1 auto;align-items:center;justify-content:center;width:100%;min-width:0;height:100%;padding:0;line-height:0}\n"], dependencies: [{ kind: "ngmodule", type: ObserversModule }, { kind: "directive", type: i1.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
138
138
  }
139
139
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsBadge, decorators: [{
140
140
  type: Component,
@@ -147,7 +147,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
147
147
  '[attr.empty]': 'isEmpty() || null',
148
148
  '[attr.data-e2e]': 'e2eAttr()',
149
149
  '[attr.aria-label]': 'ariaLabel()',
150
- }, template: "@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", styles: [":host{--_eds-badge-padding: 0 var(--eds-sp-3xs);--_eds-badge-border-radius: var(--eds-br-full);--_eds-badge-border-width: var(--eds-bw-xs);--_eds-badge-font: var(--eds-f-microcopy-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-height: calc(var(--eds-sp-m) + var(--eds-sp-3xs));--_eds-badge-min-width: calc(var(--eds-sp-m) + var(--eds-sp-3xs));--_eds-badge-empty-size: var(--eds-sp-s);--_eds-badge-surface: var(--eds-c-surface-neutral);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral);--_eds-badge-border-color: var(--eds-c-border-neutral-subtle);display:inline-flex;border:var(--_eds-badge-border-width) solid var(--_eds-badge-border-color);border-radius:var(--_eds-badge-border-radius);background-color:var(--_eds-badge-surface);--_eds-icon-on-surface: var(--_eds-badge-on-surface);--_icon-size: initial}:host .eds-badge__wrapper{display:inline-flex;align-items:center;justify-content:center;color:var(--_eds-badge-on-surface);height:var(--_eds-badge-height);min-width:var(--_eds-badge-min-width);padding:var(--_eds-badge-padding);font:var(--_eds-badge-font);font-weight:var(--_eds-badge-font-weight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([color=primary]){--_eds-badge-surface: var(--eds-c-surface-primary);--_eds-badge-on-surface: var(--eds-c-on-surface-primary);--_eds-badge-border-color: var(--eds-c-border-primary-subtle)}:host([color=neutral]){--_eds-badge-surface: var(--eds-c-surface-neutral);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral);--_eds-badge-border-color: var(--eds-c-border-neutral-subtle)}:host([color=success]){--_eds-badge-surface: var(--eds-c-surface-success);--_eds-badge-on-surface: var(--eds-c-on-surface-success);--_eds-badge-border-color: var(--eds-c-border-success-subtle)}:host([color=info]){--_eds-badge-surface: var(--eds-c-surface-info);--_eds-badge-on-surface: var(--eds-c-on-surface-info);--_eds-badge-border-color: var(--eds-c-border-info-subtle)}:host([color=warning]){--_eds-badge-surface: var(--eds-c-surface-warning);--_eds-badge-on-surface: var(--eds-c-on-surface-warning);--_eds-badge-border-color: var(--eds-c-border-warning-subtle)}:host([color=critical]){--_eds-badge-surface: var(--eds-c-surface-critical);--_eds-badge-on-surface: var(--eds-c-on-surface-critical);--_eds-badge-border-color: var(--eds-c-border-critical-subtle)}:host([variant=light][color=primary]){--_eds-badge-surface: var(--eds-c-surface-primary-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-primary-subtler);--_eds-badge-border-color: var(--eds-c-border-primary-subtler)}:host([variant=light][color=neutral]){--_eds-badge-surface: var(--eds-c-surface-neutral-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral-subtler);--_eds-badge-border-color: var(--eds-c-border-neutral-subtler)}:host([variant=light][color=success]){--_eds-badge-surface: var(--eds-c-surface-success-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-success-subtler);--_eds-badge-border-color: var(--eds-c-border-success-subtler)}:host([variant=light][color=info]){--_eds-badge-surface: var(--eds-c-surface-info-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-info-subtler);--_eds-badge-border-color: var(--eds-c-border-info-subtler)}:host([variant=light][color=warning]){--_eds-badge-surface: var(--eds-c-surface-warning-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-warning-subtler);--_eds-badge-border-color: var(--eds-c-border-warning-subtler)}:host([variant=light][color=critical]){--_eds-badge-surface: var(--eds-c-surface-critical-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-critical-subtler);--_eds-badge-border-color: var(--eds-c-border-critical-subtler)}:host([size=xs]){--_eds-badge-height: var(--eds-sp-s);--_eds-badge-min-width: var(--eds-sp-s);--_eds-badge-font: var(--eds-f-supportive-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-empty-size: var(--eds-sp-2xs)}:host([size=s]){--_eds-badge-height: var(--eds-sp-m);--_eds-badge-min-width: var(--eds-sp-m);--_eds-badge-font: var(--eds-f-supportive-m);--_eds-badge-font-weight: var(--eds-f-w-regular)}:host([size=l]){--_eds-badge-height: calc(var(--eds-sp-m) + var(--eds-sp-2xs));--_eds-badge-min-width: calc(var(--eds-sp-m) + var(--eds-sp-2xs));--_eds-badge-font: var(--eds-f-microcopy-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-empty-size: var(--eds-sp-m)}:host([empty]){width:var(--_eds-badge-empty-size);height:var(--_eds-badge-empty-size)}:host([icon-only]) .eds-badge__wrapper{padding:0;width:var(--_eds-badge-height);min-width:var(--_eds-badge-height)}:host-context(.eds-icon){position:absolute;left:60%;top:-20%}:host([empty]):host-context(.eds-icon){left:60%;top:-10%}:host([size=xs][empty]):host-context(.eds-icon){left:70%;top:-10%}:host-context(.eds-icon-button[size=\"2xs\"]){left:50%;top:-30%}:host-context(.eds-icon-button[size=xs]){left:50%;top:-40%}:host-context(.eds-icon-button[size=s]){left:50%;top:-50%}:host-context(.eds-icon-button[size=m]){left:50%;top:-40%}:host-context(.eds-icon-button[size=l]){left:50%;top:-25%}:host-context(.eds-avatar){border:var(--eds-bw-s) solid var(--eds-c-border-inverted)}\n"] }]
150
+ }, template: "@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", styles: [":host{--_eds-badge-padding: 0 var(--eds-sp-3xs);--_eds-badge-border-radius: var(--eds-br-full);--_eds-badge-border-width: var(--eds-bw-xs);--_eds-badge-font: var(--eds-f-microcopy-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-height: calc(var(--eds-sp-m) + var(--eds-sp-3xs));--_eds-badge-min-width: calc(var(--eds-sp-m) + var(--eds-sp-3xs));--_eds-badge-empty-size: var(--eds-sp-s);--_eds-badge-surface: var(--eds-c-surface-neutral);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral);--_eds-badge-border-color: var(--eds-c-border-neutral-subtle);display:inline-flex;border:var(--_eds-badge-border-width) solid var(--_eds-badge-border-color);border-radius:var(--_eds-badge-border-radius);background-color:var(--_eds-badge-surface);--_eds-icon-on-surface: var(--_eds-badge-on-surface);--_icon-size: initial}:host .eds-badge__wrapper{display:inline-flex;align-items:center;justify-content:center;color:var(--_eds-badge-on-surface);height:var(--_eds-badge-height);min-width:var(--_eds-badge-min-width);padding:var(--_eds-badge-padding);font:var(--_eds-badge-font);font-weight:var(--_eds-badge-font-weight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([color=primary]){--_eds-badge-surface: var(--eds-c-surface-primary);--_eds-badge-on-surface: var(--eds-c-on-surface-primary);--_eds-badge-border-color: var(--eds-c-border-primary-subtle)}:host([color=neutral]){--_eds-badge-surface: var(--eds-c-surface-neutral);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral);--_eds-badge-border-color: var(--eds-c-border-neutral-subtle)}:host([color=success]){--_eds-badge-surface: var(--eds-c-surface-success);--_eds-badge-on-surface: var(--eds-c-on-surface-success);--_eds-badge-border-color: var(--eds-c-border-success-subtle)}:host([color=info]){--_eds-badge-surface: var(--eds-c-surface-info);--_eds-badge-on-surface: var(--eds-c-on-surface-info);--_eds-badge-border-color: var(--eds-c-border-info-subtle)}:host([color=warning]){--_eds-badge-surface: var(--eds-c-surface-warning);--_eds-badge-on-surface: var(--eds-c-on-surface-warning);--_eds-badge-border-color: var(--eds-c-border-warning-subtle)}:host([color=critical]){--_eds-badge-surface: var(--eds-c-surface-critical);--_eds-badge-on-surface: var(--eds-c-on-surface-critical);--_eds-badge-border-color: var(--eds-c-border-critical-subtle)}:host([variant=light][color=primary]){--_eds-badge-surface: var(--eds-c-surface-primary-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-primary-subtler);--_eds-badge-border-color: var(--eds-c-border-primary-subtler)}:host([variant=light][color=neutral]){--_eds-badge-surface: var(--eds-c-surface-neutral-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral-subtler);--_eds-badge-border-color: var(--eds-c-border-neutral-subtler)}:host([variant=light][color=success]){--_eds-badge-surface: var(--eds-c-surface-success-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-success-subtler);--_eds-badge-border-color: var(--eds-c-border-success-subtler)}:host([variant=light][color=info]){--_eds-badge-surface: var(--eds-c-surface-info-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-info-subtler);--_eds-badge-border-color: var(--eds-c-border-info-subtler)}:host([variant=light][color=warning]){--_eds-badge-surface: var(--eds-c-surface-warning-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-warning-subtler);--_eds-badge-border-color: var(--eds-c-border-warning-subtler)}:host([variant=light][color=critical]){--_eds-badge-surface: var(--eds-c-surface-critical-subtler);--_eds-badge-on-surface: var(--eds-c-on-surface-critical-subtler);--_eds-badge-border-color: var(--eds-c-border-critical-subtler)}:host([size=xs]){--_eds-badge-height: var(--eds-sp-s);--_eds-badge-min-width: var(--eds-sp-s);--_eds-badge-font: var(--eds-f-supportive-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-empty-size: var(--eds-sp-2xs)}:host([size=s]){--_eds-badge-height: var(--eds-sp-m);--_eds-badge-min-width: var(--eds-sp-m);--_eds-badge-font: var(--eds-f-supportive-m);--_eds-badge-font-weight: var(--eds-f-w-regular)}:host([size=l]){--_eds-badge-height: calc(var(--eds-sp-m) + var(--eds-sp-2xs));--_eds-badge-min-width: calc(var(--eds-sp-m) + var(--eds-sp-2xs));--_eds-badge-font: var(--eds-f-microcopy-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-empty-size: var(--eds-sp-m)}:host([empty]){width:var(--_eds-badge-empty-size);height:var(--_eds-badge-empty-size)}:host([icon-only]) .eds-badge__wrapper{padding:0;width:var(--_eds-badge-height);min-width:var(--_eds-badge-height)}:host-context(.eds-icon){position:absolute;left:60%;top:-20%}:host([empty]):host-context(.eds-icon){left:60%;top:-10%}:host([size=xs][empty]):host-context(.eds-icon){left:70%;top:-10%}:host-context(.eds-icon-button[size=\"2xs\"]){left:50%;top:-30%}:host-context(.eds-icon-button[size=xs]){left:50%;top:-40%}:host-context(.eds-icon-button[size=s]){left:50%;top:-50%}:host-context(.eds-icon-button[size=m]){left:50%;top:-40%}:host-context(.eds-icon-button[size=l]){left:50%;top:-25%}:host-context(.eds-avatar){box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:var(--_eds-avatar-badge-size);min-width:var(--_eds-avatar-badge-size);height:var(--_eds-avatar-badge-size);padding:0;border:var(--_eds-avatar-badge-ring-width, var(--eds-bw-s)) solid var(--eds-c-border-inverted);--_icon-size: var(--_eds-avatar-badge-icon-size)}:host-context(.eds-avatar) .eds-badge__wrapper{display:flex;flex:1 1 auto;align-items:center;justify-content:center;width:100%;min-width:0;height:100%;padding:0;line-height:0}\n"] }]
151
151
  }], ctorParameters: () => [], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], maxCharCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxCharCount", required: false }] }], charReplacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "charReplacement", required: false }] }], e2eAttr: [{ type: i0.Input, args: [{ isSignal: true, alias: "e2eAttr", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], content: [{ type: i0.ViewChild, args: ['contentRef', { isSignal: true }] }] } });
152
152
 
153
153
  const EDS_BADGE = [
@@ -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 ChangeDetectionStrategy,\n ElementRef,\n booleanAttribute,\n numberAttribute,\n computed,\n effect,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ObserversModule } from '@angular/cdk/observers';\n\n/**\n * Local narrowed unions — the badge's variant contract. No shared-token import.\n */\nexport type EdsBadgeColor = 'primary' | 'neutral' | 'success' | 'info' | 'warning' | 'critical';\nexport type EdsBadgeVariant = 'filled' | 'light';\nexport type EdsBadgeSize = 'xs' | 's' | 'm' | 'l';\n\n/**\n * @description\n * A badge component that displays text, numbers, or a dot indicator with semantic\n * color, size, and variant styling. Supports content truncation, an automatic empty\n * state, and an icon-only (dot) mode.\n *\n * @usageNotes\n * #### Basic badge\n * ```html\n * <eds-badge>99</eds-badge>\n * ```\n *\n * #### Semantic colors\n * ```html\n * <eds-badge color=\"success\">Active</eds-badge>\n * <eds-badge color=\"critical\">Error</eds-badge>\n * ```\n *\n * #### Variant\n * ```html\n * <eds-badge color=\"info\" variant=\"light\">New</eds-badge>\n * ```\n *\n * #### Truncation\n * ```html\n * <eds-badge [maxCharCount]=\"2\" charReplacement=\"99+\">150</eds-badge>\n * ```\n *\n * #### Icon-only (dot indicator)\n * ```html\n * <eds-badge iconOnly color=\"critical\"></eds-badge>\n * ```\n */\n@Component({\n selector: 'eds-badge, span[edsBadge]',\n templateUrl: './eds-badge.html',\n styleUrl: './eds-badge.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ObserversModule],\n host: {\n role: 'status',\n '[attr.color]': 'color()',\n '[attr.variant]': 'variant()',\n '[attr.size]': 'size()',\n '[attr.icon-only]': 'iconOnly() || null',\n '[attr.empty]': 'isEmpty() || null',\n '[attr.data-e2e]': 'e2eAttr()',\n '[attr.aria-label]': 'ariaLabel()',\n },\n})\nexport class EdsBadge {\n /**\n * Semantic color of the badge.\n *\n * @default 'neutral'\n */\n color = input<EdsBadgeColor>('neutral');\n\n /**\n * Visual variant of the badge. `filled` uses a solid semantic surface; `light`\n * uses a subtle semantic surface with a matching subtler foreground.\n *\n * @default 'filled'\n */\n variant = input<EdsBadgeVariant>('filled');\n\n /**\n * Size of the badge.\n *\n * @default 'm'\n */\n size = input<EdsBadgeSize>('m');\n\n /**\n * Whether the badge is a small dot indicator with no text content.\n *\n * @default false\n */\n iconOnly = input(false, { transform: booleanAttribute });\n\n /**\n * Maximum number of characters to display before truncating. When the content\n * exceeds this limit it is replaced with `charReplacement`. `0` disables truncation.\n *\n * @default 0\n */\n maxCharCount = input(0, { transform: numberAttribute });\n\n /**\n * Text shown when the content is truncated by `maxCharCount`. Falls back to `'99+'`.\n *\n * @default ''\n */\n charReplacement = input('');\n\n /**\n * Data attribute for e2e testing.\n *\n * @default 'eds-badge'\n */\n e2eAttr = input('eds-badge');\n\n /**\n * ARIA label for accessibility. When `null`, the visible content serves as the\n * accessible name.\n *\n * @default 'badge'\n */\n ariaLabel = input<string | null>('badge');\n\n protected readonly content = viewChild<ElementRef<HTMLElement>>('contentRef');\n\n /** Whether the projected content is empty (drives the dot/empty state). */\n protected readonly isEmpty = signal(false);\n\n /** Whether the content was truncated by `maxCharCount`. */\n protected readonly hasContentUpdated = signal(false);\n\n /** The replacement text shown when content is truncated. */\n protected readonly updatedContent = computed(() => this.charReplacement() || '99+');\n\n constructor() {\n effect(() => {\n const content = this.content();\n if (content) {\n this.isEmpty.set(content.nativeElement.childNodes.length === 0);\n if (!this.isEmpty()) {\n this._checkContent();\n }\n }\n });\n }\n\n /**\n * Handles projected content changes and re-evaluates truncation.\n */\n onContentChanged(): void {\n this._checkContent();\n }\n\n /**\n * Checks whether the content exceeds `maxCharCount` and flags truncation.\n */\n private _checkContent(): void {\n const maxCharCount = this.maxCharCount();\n const contentEl = this.content();\n if (maxCharCount !== 0 && contentEl) {\n const contentText = contentEl.nativeElement.outerText;\n this.hasContentUpdated.set(!!contentText && contentText.length > maxCharCount);\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":";;;;;AAqBA;;;;;;;;;;;;;;;;;;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,EAAA,UAAA,EAAA,IAAA,EDkDc,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,2BAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAYhB,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAjBpB,SAAS;+BACI,2BAA2B,EAAA,eAAA,EAGpB,uBAAuB,CAAC,MAAM,WACtC,CAAC,eAAe,CAAC,EAAA,IAAA,EACpB;AACF,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,cAAc,EAAE,SAAS;AACzB,wBAAA,gBAAgB,EAAE,WAAW;AAC7B,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,kBAAkB,EAAE,oBAAoB;AACxC,wBAAA,cAAc,EAAE,mBAAmB;AACnC,wBAAA,iBAAiB,EAAE,WAAW;AAC9B,wBAAA,mBAAmB,EAAE,aAAa;AACrC,qBAAA,EAAA,QAAA,EAAA,mRAAA,EAAA,MAAA,EAAA,CAAA,0hKAAA,CAAA,EAAA;q2BA8D+D,YAAY,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE/HzE,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 ElementRef,\n booleanAttribute,\n numberAttribute,\n computed,\n effect,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ObserversModule } from '@angular/cdk/observers';\n\n/**\n * Local narrowed unions — the badge's variant contract. No shared-token import.\n */\nexport type EdsBadgeColor = 'primary' | 'neutral' | 'success' | 'info' | 'warning' | 'critical';\nexport type EdsBadgeVariant = 'filled' | 'light';\nexport type EdsBadgeSize = 'xs' | 's' | 'm' | 'l';\n\n/**\n * @description\n * A badge component that displays text, numbers, or a dot indicator with semantic\n * color, size, and variant styling. Supports content truncation, an automatic empty\n * state, and an icon-only (dot) mode.\n *\n * @usageNotes\n * #### Basic badge\n * ```html\n * <eds-badge>99</eds-badge>\n * ```\n *\n * #### Semantic colors\n * ```html\n * <eds-badge color=\"success\">Active</eds-badge>\n * <eds-badge color=\"critical\">Error</eds-badge>\n * ```\n *\n * #### Variant\n * ```html\n * <eds-badge color=\"info\" variant=\"light\">New</eds-badge>\n * ```\n *\n * #### Truncation\n * ```html\n * <eds-badge [maxCharCount]=\"2\" charReplacement=\"99+\">150</eds-badge>\n * ```\n *\n * #### Icon-only (dot indicator)\n * ```html\n * <eds-badge iconOnly color=\"critical\"></eds-badge>\n * ```\n */\n@Component({\n selector: 'eds-badge, span[edsBadge]',\n templateUrl: './eds-badge.html',\n styleUrl: './eds-badge.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ObserversModule],\n host: {\n role: 'status',\n '[attr.color]': 'color()',\n '[attr.variant]': 'variant()',\n '[attr.size]': 'size()',\n '[attr.icon-only]': 'iconOnly() || null',\n '[attr.empty]': 'isEmpty() || null',\n '[attr.data-e2e]': 'e2eAttr()',\n '[attr.aria-label]': 'ariaLabel()',\n },\n})\nexport class EdsBadge {\n /**\n * Semantic color of the badge.\n *\n * @default 'neutral'\n */\n color = input<EdsBadgeColor>('neutral');\n\n /**\n * Visual variant of the badge. `filled` uses a solid semantic surface; `light`\n * uses a subtle semantic surface with a matching subtler foreground.\n *\n * @default 'filled'\n */\n variant = input<EdsBadgeVariant>('filled');\n\n /**\n * Size of the badge.\n *\n * @default 'm'\n */\n size = input<EdsBadgeSize>('m');\n\n /**\n * Whether the badge is a small dot indicator with no text content.\n *\n * @default false\n */\n iconOnly = input(false, { transform: booleanAttribute });\n\n /**\n * Maximum number of characters to display before truncating. When the content\n * exceeds this limit it is replaced with `charReplacement`. `0` disables truncation.\n *\n * @default 0\n */\n maxCharCount = input(0, { transform: numberAttribute });\n\n /**\n * Text shown when the content is truncated by `maxCharCount`. Falls back to `'99+'`.\n *\n * @default ''\n */\n charReplacement = input('');\n\n /**\n * Data attribute for e2e testing.\n *\n * @default 'eds-badge'\n */\n e2eAttr = input('eds-badge');\n\n /**\n * ARIA label for accessibility. When `null`, the visible content serves as the\n * accessible name.\n *\n * @default 'badge'\n */\n ariaLabel = input<string | null>('badge');\n\n protected readonly content = viewChild<ElementRef<HTMLElement>>('contentRef');\n\n /** Whether the projected content is empty (drives the dot/empty state). */\n protected readonly isEmpty = signal(false);\n\n /** Whether the content was truncated by `maxCharCount`. */\n protected readonly hasContentUpdated = signal(false);\n\n /** The replacement text shown when content is truncated. */\n protected readonly updatedContent = computed(() => this.charReplacement() || '99+');\n\n constructor() {\n effect(() => {\n const content = this.content();\n if (content) {\n this.isEmpty.set(content.nativeElement.childNodes.length === 0);\n if (!this.isEmpty()) {\n this._checkContent();\n }\n }\n });\n }\n\n /**\n * Handles projected content changes and re-evaluates truncation.\n */\n onContentChanged(): void {\n this._checkContent();\n }\n\n /**\n * Checks whether the content exceeds `maxCharCount` and flags truncation.\n */\n private _checkContent(): void {\n const maxCharCount = this.maxCharCount();\n const contentEl = this.content();\n if (maxCharCount !== 0 && contentEl) {\n const contentText = contentEl.nativeElement.outerText;\n this.hasContentUpdated.set(!!contentText && contentText.length > maxCharCount);\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":";;;;;AAqBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;MAkBU,QAAQ,CAAA;AAuEjB,IAAA,WAAA,GAAA;AAtEA;;;;AAIG;QACH,IAAA,CAAA,KAAK,GAAG,KAAK,CAAgB,SAAS;kFAAC;AAEvC;;;;;AAKG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAkB,QAAQ;oFAAC;AAE1C;;;;AAIG;QACH,IAAA,CAAA,IAAI,GAAG,KAAK,CAAe,GAAG;iFAAC;AAE/B;;;;AAIG;QACH,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExD;;;;;AAKG;QACH,IAAA,CAAA,YAAY,GAAG,KAAK,CAAC,CAAC,oFAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AAEvD;;;;AAIG;QACH,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,EAAE;4FAAC;AAE3B;;;;AAIG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,WAAW;oFAAC;AAE5B;;;;;AAKG;QACH,IAAA,CAAA,SAAS,GAAG,KAAK,CAAgB,OAAO;sFAAC;QAEtB,IAAA,CAAA,OAAO,GAAG,SAAS,CAA0B,YAAY;oFAAC;;QAG1D,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,KAAK;oFAAC;;QAGvB,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,KAAK;8FAAC;;QAGjC,IAAA,CAAA,cAAc,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,eAAe,EAAE,IAAI,KAAK;2FAAC;QAG/E,MAAM,CAAC,MAAK;AACR,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;YAC9B,IAA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ectionStrategy, Component } from '@angular/core';
2
+ import { inject, ElementRef, input, booleanAttribute, computed, signal, afterNextRender, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
 
4
4
  /**
5
5
  * A layout component that positions button elements relative to input fields.
@@ -23,9 +23,20 @@ import { input, booleanAttribute, computed, ChangeDetectionStrategy, Component }
23
23
  * </eds-input-button>
24
24
  * ```
25
25
  *
26
+ * ### Focus model (roving tabindex)
27
+ * - `Tab` moves focus directly onto the input field (the primary control); the
28
+ * focus ring covers the whole host (the group). `Tab` again leaves the group.
29
+ * - `ArrowLeft` / `ArrowRight` rove focus between the group's controls in visual
30
+ * order — the input, the clearable "✕" icon (when present), and the button —
31
+ * wrapping at the ends; `Home` / `End` jump to the first / last control.
32
+ * - Only the active control is in the tab order, so `Tab` leaves the group from
33
+ * wherever focus currently is. Focusing a child directly (click) adopts it as
34
+ * the active roving target.
35
+ *
26
36
  * ### Accessibility
27
- * - Button and input maintain separate focus states
28
- * - Ensure button has descriptive label or aria-label
37
+ * - Single tab stop with arrow-key navigation between the controls
38
+ * - The clearable icon participates in the arrow-key cycle when it is shown
39
+ * - Ensure button has a descriptive label or aria-label
29
40
  * - Tab order follows visual layout
30
41
  *
31
42
  * ### Notes
@@ -36,6 +47,7 @@ import { input, booleanAttribute, computed, ChangeDetectionStrategy, Component }
36
47
  */
37
48
  class EdsInputButton {
38
49
  constructor() {
50
+ this.host = inject(ElementRef);
39
51
  /**
40
52
  * Data attribute value for end-to-end testing identification.
41
53
  * Applied as data-e2e attribute on the host element.
@@ -59,18 +71,128 @@ class EdsInputButton {
59
71
  */
60
72
  this.position = computed(() => this.edsButtonPositionStart() ? 'start' : 'end', /* @ts-ignore */
61
73
  ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
74
+ /** Index (within {@link managedChildren}) of the roving active control. */
75
+ this.activeIndex = signal(0, /* @ts-ignore */
76
+ ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
77
+ afterNextRender(() => this.resetRovingTabStop());
78
+ }
79
+ /**
80
+ * The group's controls that participate in arrow-key roving, in DOM order:
81
+ * the projected input/button plus the clearable "✕" icon (a `[tabindex]`
82
+ * element the eds-input-text clearable directive injects). Disabled and
83
+ * not-currently-rendered controls (e.g. the hidden clearable icon when the
84
+ * field is empty) are excluded so the cycle only visits reachable targets.
85
+ */
86
+ managedChildren() {
87
+ const selector = 'input, button, select, textarea, .eds-clearable-icon';
88
+ return Array.from(this.host.nativeElement.querySelectorAll(selector)).filter((el) => {
89
+ if (el === this.host.nativeElement || el.hasAttribute('disabled')) {
90
+ return false;
91
+ }
92
+ // Skip controls that are not actually visible/rendered — notably the
93
+ // clearable icon, which is hidden (visibility:hidden) when empty.
94
+ if (getComputedStyle(el).visibility === 'hidden') {
95
+ return false;
96
+ }
97
+ return el.offsetParent !== null || getComputedStyle(el).position === 'fixed';
98
+ });
99
+ }
100
+ /**
101
+ * Index of the primary control that owns the natural tab stop — the input
102
+ * field (first `input`/`textarea`/`select`), so `Tab` lands directly on it.
103
+ * Falls back to the first child when there is no input-like control.
104
+ */
105
+ primaryIndex() {
106
+ const children = this.managedChildren();
107
+ const inputIndex = children.findIndex((el) => /^(input|textarea|select)$/i.test(el.tagName));
108
+ return inputIndex >= 0 ? inputIndex : 0;
109
+ }
110
+ /**
111
+ * Roving tabindex: the primary (input) control stays in the natural tab
112
+ * order so `Tab` focuses it directly; every other control is reachable only
113
+ * via the arrow keys.
114
+ */
115
+ resetRovingTabStop() {
116
+ const primary = this.primaryIndex();
117
+ this.activeIndex.set(primary);
118
+ this.managedChildren().forEach((el, index) => el.setAttribute('tabindex', index === primary ? '0' : '-1'));
119
+ }
120
+ /**
121
+ * Track focus entering a projected control so the arrow keys continue from
122
+ * the control the user is actually on (e.g. after a click), and keep the
123
+ * roving tab stop in sync so a subsequent `Tab` leaves from here.
124
+ */
125
+ onFocusIn(event) {
126
+ const target = event.target;
127
+ const index = this.managedChildren().indexOf(target);
128
+ if (index >= 0) {
129
+ this.setActive(index);
130
+ }
131
+ }
132
+ onKeydown(event) {
133
+ const children = this.managedChildren();
134
+ if (children.length === 0) {
135
+ return;
136
+ }
137
+ switch (event.key) {
138
+ case 'ArrowRight':
139
+ case 'ArrowDown':
140
+ event.preventDefault();
141
+ this.focusChild(this.nextIndex(1));
142
+ break;
143
+ case 'ArrowLeft':
144
+ case 'ArrowUp':
145
+ event.preventDefault();
146
+ this.focusChild(this.nextIndex(-1));
147
+ break;
148
+ case 'Home':
149
+ event.preventDefault();
150
+ this.focusChild(0);
151
+ break;
152
+ case 'End':
153
+ event.preventDefault();
154
+ this.focusChild(children.length - 1);
155
+ break;
156
+ default:
157
+ break;
158
+ }
159
+ }
160
+ nextIndex(delta) {
161
+ const count = this.managedChildren().length;
162
+ const current = this.activeIndex();
163
+ return (current + delta + count) % count;
164
+ }
165
+ focusChild(index) {
166
+ const target = this.managedChildren()[index];
167
+ if (!target) {
168
+ return;
169
+ }
170
+ this.setActive(index);
171
+ target.focus();
172
+ }
173
+ /**
174
+ * Move the single roving tab stop (`tabindex="0"`) onto the active control
175
+ * and set every other control to `tabindex="-1"`, so after arrow navigation
176
+ * `Tab` leaves the group from wherever focus currently is.
177
+ */
178
+ setActive(index) {
179
+ this.activeIndex.set(index);
180
+ this.managedChildren().forEach((el, i) => el.setAttribute('tabindex', i === index ? '0' : '-1'));
62
181
  }
63
182
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsInputButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
64
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: EdsInputButton, isStandalone: true, selector: "eds-input-button", inputs: { e2eAttr: { classPropertyName: "e2eAttr", publicName: "e2eAttr", isSignal: true, isRequired: false, transformFunction: null }, edsButtonPositionStart: { classPropertyName: "edsButtonPositionStart", publicName: "edsButtonPositionStart", isSignal: true, isRequired: false, transformFunction: null }, edsButtonPositionEnd: { classPropertyName: "edsButtonPositionEnd", publicName: "edsButtonPositionEnd", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.position": "position()", "attr.data-e2e": "e2eAttr()" }, classAttribute: "eds-input-button" }, ngImport: i0, template: "<ng-content />\n<ng-content select=\"button\"/>\n", styles: [".eui-21 :host{display:flex;width:100%;border-radius:var(--eds-br-s)}.eui-21 :host ::ng-deep .eds-button{border:var(--eds-bw-xs) solid var(--eds-c-border-neutral);background-color:var(--eds-c-surface-elevation);position:relative}.eui-21 :host([position=start]){flex-direction:row-reverse}.eui-21 :host([position=start]) ::ng-deep .eds-button{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.eui-21 :host([position=start]) ::ng-deep .eds-button:after{background-color:var(--eds-c-border-divider);content:\"\";display:block;height:1.75rem;right:-1px;position:absolute;top:var(--eds-sp-2xs);width:1px}.eui-21 :host([position=start]) ::ng-deep .eds-input-text{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.eui-21 :host([position=end]) ::ng-deep .eds-button{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.eui-21 :host([position=end]) ::ng-deep .eds-button:before{background-color:var(--eds-c-border-divider);content:\"\";display:block;height:1.75rem;left:-1px;position:absolute;top:var(--eds-sp-2xs);width:1px}.eui-21 :host([position=end]) ::ng-deep .eds-input-text{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
183
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: EdsInputButton, isStandalone: true, selector: "eds-input-button", inputs: { e2eAttr: { classPropertyName: "e2eAttr", publicName: "e2eAttr", isSignal: true, isRequired: false, transformFunction: null }, edsButtonPositionStart: { classPropertyName: "edsButtonPositionStart", publicName: "edsButtonPositionStart", isSignal: true, isRequired: false, transformFunction: null }, edsButtonPositionEnd: { classPropertyName: "edsButtonPositionEnd", publicName: "edsButtonPositionEnd", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, listeners: { "focusin": "onFocusIn($event)", "keydown": "onKeydown($event)" }, properties: { "attr.position": "position()", "attr.data-e2e": "e2eAttr()" }, classAttribute: "eds-input-button" }, ngImport: i0, template: "<ng-content />\n<ng-content select=\"button\"/>\n", styles: [".eui-21 :host{display:flex;width:100%;border-radius:var(--eds-br-s);outline:none;position:relative}.eui-21 :host>::ng-deep .eds-input-text,.eui-21 :host>::ng-deep input{flex:1 1 auto;min-width:0;order:1}.eui-21 :host>::ng-deep .eds-button,.eui-21 :host>::ng-deep button{flex:0 0 auto;order:3}.eui-21 :host>::ng-deep div:has(input),.eui-21 :host>::ng-deep div:has(.eds-input-text){flex:1 1 auto!important;width:auto!important;min-width:0;order:1}.eui-21 :host>::ng-deep div:not(:has(input)):not(:has(.eds-input-text)){flex:0 0 0!important;width:0!important;min-width:0;order:2}.eui-21 :host:focus-within{outline:var(--eds-bw-s) solid var(--eds-c-border-focus);outline-offset:var(--eds-bw-s)}.eui-21 :host:focus-within ::ng-deep .eds-input-text:focus-visible:not([readonly]),.eui-21 :host:focus-within ::ng-deep .eds-input-text:focus:not([readonly]),.eui-21 :host:focus-within ::ng-deep input:focus-visible{outline:none!important;outline-offset:0!important;box-shadow:none!important}.eui-21 :host:focus-within ::ng-deep .eds-button:focus-visible,.eui-21 :host:focus-within ::ng-deep .eds-button:focus,.eui-21 :host:focus-within ::ng-deep .eds-icon-button:focus-visible,.eui-21 :host:focus-within ::ng-deep .eds-icon-button:focus{outline:var(--eds-bw-s) solid var(--eds-c-border-focus)!important;outline-offset:calc(-1 * var(--eds-bw-s))!important}.eui-21 :host:focus-within:has(input[invalid]),.eui-21 :host:focus-within:has(.eds-input-text[invalid]){outline-color:var(--eds-c-focus-critical)}.eui-21 :host:focus-within:has(input[invalid]) ::ng-deep .eds-button:focus-visible,.eui-21 :host:focus-within:has(input[invalid]) ::ng-deep .eds-button:focus,.eui-21 :host:focus-within:has(input[invalid]) ::ng-deep .eds-icon-button:focus-visible,.eui-21 :host:focus-within:has(input[invalid]) ::ng-deep .eds-icon-button:focus,.eui-21 :host:focus-within:has(.eds-input-text[invalid]) ::ng-deep .eds-button:focus-visible,.eui-21 :host:focus-within:has(.eds-input-text[invalid]) ::ng-deep .eds-button:focus,.eui-21 :host:focus-within:has(.eds-input-text[invalid]) ::ng-deep .eds-icon-button:focus-visible,.eui-21 :host:focus-within:has(.eds-input-text[invalid]) ::ng-deep .eds-icon-button:focus{outline-color:var(--eds-c-focus-critical)!important}.eui-21 :host ::ng-deep .eds-button{border:var(--eds-bw-xs) solid var(--eds-c-border-neutral);background-color:var(--eds-c-surface-elevation)!important;position:relative}.eui-21 :host([invalid]):focus-within{outline-color:var(--eds-c-focus-critical)}.eui-21 :host([invalid]):focus-within ::ng-deep .eds-button:focus-visible,.eui-21 :host([invalid]):focus-within ::ng-deep .eds-button:focus,.eui-21 :host([invalid]):focus-within ::ng-deep .eds-icon-button:focus-visible,.eui-21 :host([invalid]):focus-within ::ng-deep .eds-icon-button:focus{outline-color:var(--eds-c-focus-critical)!important}.eui-21 :host([position=start]){flex-direction:row-reverse}.eui-21 :host([position=start]) ::ng-deep .eds-button{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.eui-21 :host([position=start]) ::ng-deep .eds-button:after{background-color:var(--eds-c-border-divider);content:\"\";display:block;height:1.75rem;right:-1px;position:absolute;top:var(--eds-sp-2xs);width:1px}.eui-21 :host([position=start]) ::ng-deep .eds-input-text{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.eui-21 :host([position=end]) ::ng-deep .eds-button{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.eui-21 :host([position=end]) ::ng-deep .eds-button:before{background-color:var(--eds-c-border-divider);content:\"\";display:block;height:1.75rem;left:-1px;position:absolute;top:var(--eds-sp-2xs);width:1px}.eui-21 :host([position=end]) ::ng-deep .eds-input-text{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
65
184
  }
66
185
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsInputButton, decorators: [{
67
186
  type: Component,
68
187
  args: [{ selector: 'eds-input-button', changeDetection: ChangeDetectionStrategy.OnPush, host: {
69
188
  class: 'eds-input-button',
189
+ role: 'group',
70
190
  '[attr.position]': 'position()',
71
191
  '[attr.data-e2e]': 'e2eAttr()',
72
- }, template: "<ng-content />\n<ng-content select=\"button\"/>\n", styles: [".eui-21 :host{display:flex;width:100%;border-radius:var(--eds-br-s)}.eui-21 :host ::ng-deep .eds-button{border:var(--eds-bw-xs) solid var(--eds-c-border-neutral);background-color:var(--eds-c-surface-elevation);position:relative}.eui-21 :host([position=start]){flex-direction:row-reverse}.eui-21 :host([position=start]) ::ng-deep .eds-button{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.eui-21 :host([position=start]) ::ng-deep .eds-button:after{background-color:var(--eds-c-border-divider);content:\"\";display:block;height:1.75rem;right:-1px;position:absolute;top:var(--eds-sp-2xs);width:1px}.eui-21 :host([position=start]) ::ng-deep .eds-input-text{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.eui-21 :host([position=end]) ::ng-deep .eds-button{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.eui-21 :host([position=end]) ::ng-deep .eds-button:before{background-color:var(--eds-c-border-divider);content:\"\";display:block;height:1.75rem;left:-1px;position:absolute;top:var(--eds-sp-2xs);width:1px}.eui-21 :host([position=end]) ::ng-deep .eds-input-text{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}\n"] }]
73
- }], propDecorators: { e2eAttr: [{ type: i0.Input, args: [{ isSignal: true, alias: "e2eAttr", required: false }] }], edsButtonPositionStart: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsButtonPositionStart", required: false }] }], edsButtonPositionEnd: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsButtonPositionEnd", required: false }] }] } });
192
+ '(focusin)': 'onFocusIn($event)',
193
+ '(keydown)': 'onKeydown($event)',
194
+ }, template: "<ng-content />\n<ng-content select=\"button\"/>\n", styles: [".eui-21 :host{display:flex;width:100%;border-radius:var(--eds-br-s);outline:none;position:relative}.eui-21 :host>::ng-deep .eds-input-text,.eui-21 :host>::ng-deep input{flex:1 1 auto;min-width:0;order:1}.eui-21 :host>::ng-deep .eds-button,.eui-21 :host>::ng-deep button{flex:0 0 auto;order:3}.eui-21 :host>::ng-deep div:has(input),.eui-21 :host>::ng-deep div:has(.eds-input-text){flex:1 1 auto!important;width:auto!important;min-width:0;order:1}.eui-21 :host>::ng-deep div:not(:has(input)):not(:has(.eds-input-text)){flex:0 0 0!important;width:0!important;min-width:0;order:2}.eui-21 :host:focus-within{outline:var(--eds-bw-s) solid var(--eds-c-border-focus);outline-offset:var(--eds-bw-s)}.eui-21 :host:focus-within ::ng-deep .eds-input-text:focus-visible:not([readonly]),.eui-21 :host:focus-within ::ng-deep .eds-input-text:focus:not([readonly]),.eui-21 :host:focus-within ::ng-deep input:focus-visible{outline:none!important;outline-offset:0!important;box-shadow:none!important}.eui-21 :host:focus-within ::ng-deep .eds-button:focus-visible,.eui-21 :host:focus-within ::ng-deep .eds-button:focus,.eui-21 :host:focus-within ::ng-deep .eds-icon-button:focus-visible,.eui-21 :host:focus-within ::ng-deep .eds-icon-button:focus{outline:var(--eds-bw-s) solid var(--eds-c-border-focus)!important;outline-offset:calc(-1 * var(--eds-bw-s))!important}.eui-21 :host:focus-within:has(input[invalid]),.eui-21 :host:focus-within:has(.eds-input-text[invalid]){outline-color:var(--eds-c-focus-critical)}.eui-21 :host:focus-within:has(input[invalid]) ::ng-deep .eds-button:focus-visible,.eui-21 :host:focus-within:has(input[invalid]) ::ng-deep .eds-button:focus,.eui-21 :host:focus-within:has(input[invalid]) ::ng-deep .eds-icon-button:focus-visible,.eui-21 :host:focus-within:has(input[invalid]) ::ng-deep .eds-icon-button:focus,.eui-21 :host:focus-within:has(.eds-input-text[invalid]) ::ng-deep .eds-button:focus-visible,.eui-21 :host:focus-within:has(.eds-input-text[invalid]) ::ng-deep .eds-button:focus,.eui-21 :host:focus-within:has(.eds-input-text[invalid]) ::ng-deep .eds-icon-button:focus-visible,.eui-21 :host:focus-within:has(.eds-input-text[invalid]) ::ng-deep .eds-icon-button:focus{outline-color:var(--eds-c-focus-critical)!important}.eui-21 :host ::ng-deep .eds-button{border:var(--eds-bw-xs) solid var(--eds-c-border-neutral);background-color:var(--eds-c-surface-elevation)!important;position:relative}.eui-21 :host([invalid]):focus-within{outline-color:var(--eds-c-focus-critical)}.eui-21 :host([invalid]):focus-within ::ng-deep .eds-button:focus-visible,.eui-21 :host([invalid]):focus-within ::ng-deep .eds-button:focus,.eui-21 :host([invalid]):focus-within ::ng-deep .eds-icon-button:focus-visible,.eui-21 :host([invalid]):focus-within ::ng-deep .eds-icon-button:focus{outline-color:var(--eds-c-focus-critical)!important}.eui-21 :host([position=start]){flex-direction:row-reverse}.eui-21 :host([position=start]) ::ng-deep .eds-button{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.eui-21 :host([position=start]) ::ng-deep .eds-button:after{background-color:var(--eds-c-border-divider);content:\"\";display:block;height:1.75rem;right:-1px;position:absolute;top:var(--eds-sp-2xs);width:1px}.eui-21 :host([position=start]) ::ng-deep .eds-input-text{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.eui-21 :host([position=end]) ::ng-deep .eds-button{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.eui-21 :host([position=end]) ::ng-deep .eds-button:before{background-color:var(--eds-c-border-divider);content:\"\";display:block;height:1.75rem;left:-1px;position:absolute;top:var(--eds-sp-2xs);width:1px}.eui-21 :host([position=end]) ::ng-deep .eds-input-text{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}\n"] }]
195
+ }], ctorParameters: () => [], propDecorators: { e2eAttr: [{ type: i0.Input, args: [{ isSignal: true, alias: "e2eAttr", required: false }] }], edsButtonPositionStart: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsButtonPositionStart", required: false }] }], edsButtonPositionEnd: [{ type: i0.Input, args: [{ isSignal: true, alias: "edsButtonPositionEnd", required: false }] }] } });
74
196
 
75
197
  /** Convenience array for importing all eds-input-button components. */
76
198
  const EDS_INPUT_BUTTON = [
@@ -1 +1 @@
1
- {"version":3,"file":"eui-eds-eds-input-button.mjs","sources":["../../eds-input-button/eds-input-button.ts","../../eds-input-button/eds-input-button.html","../../eds-input-button/index.ts","../../eds-input-button/eui-eds-eds-input-button.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, booleanAttribute, input, computed } from '@angular/core';\n\n/**\n * A layout component that positions button elements relative to input fields.\n * Enables the creation of input groups with leading or trailing action buttons,\n * commonly used for search inputs, password visibility toggles, or clear actions.\n *\n * @usageNotes\n * ### Button at end of input (default)\n * ```html\n * <eds-input-button>\n * <input edsInputText placeholder=\"Search...\" />\n * <button edsButton>Search</button>\n * </eds-input-button>\n * ```\n *\n * ### Button at start of input\n * ```html\n * <eds-input-button [edsButtonPositionStart]=\"true\">\n * <button edsIconButton icon=\"filter\" ariaLabel=\"Filter\"></button>\n * <input edsInputText placeholder=\"Filter results...\" />\n * </eds-input-button>\n * ```\n *\n * ### Accessibility\n * - Button and input maintain separate focus states\n * - Ensure button has descriptive label or aria-label\n * - Tab order follows visual layout\n *\n * ### Notes\n * - Default position is end (right in LTR)\n * - When `edsButtonPositionStart` is true, it overrides end positioning\n * - Works with all button variants (edsButton, edsIconButton)\n * - Commonly used for search, clear, and submit actions\n */\n@Component({\n selector: 'eds-input-button',\n templateUrl: './eds-input-button.html',\n styleUrl: './eds-input-button.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'eds-input-button',\n '[attr.position]': 'position()',\n '[attr.data-e2e]': 'e2eAttr()',\n },\n})\nexport class EdsInputButton {\n /**\n * Data attribute value for end-to-end testing identification.\n * Applied as data-e2e attribute on the host element.\n * @default 'eds-input-button'\n */\n e2eAttr = input('eds-input-button');\n\n /**\n * Positions the button at the start (left in LTR, right in RTL) of the input field.\n * When true, overrides edsButtonPositionEnd. Defaults to false.\n */\n edsButtonPositionStart = input(false, { transform: booleanAttribute });\n\n /**\n * Positions the button at the end (right in LTR, left in RTL) of the input field.\n * Ignored when edsButtonPositionStart is true. Defaults to true.\n */\n edsButtonPositionEnd = input(true, { transform: booleanAttribute });\n\n /**\n * Resolved button position, reflected as the `position` host attribute.\n * `start` takes precedence when both inputs are set.\n */\n protected readonly position = computed<'start' | 'end'>(() =>\n this.edsButtonPositionStart() ? 'start' : 'end',\n );\n}\n","<ng-content />\n<ng-content select=\"button\"/>\n","import { EdsInputButton } from './eds-input-button';\n\nexport { EdsInputButton };\n\n/** Convenience array for importing all eds-input-button components. */\nexport const EDS_INPUT_BUTTON = [\n EdsInputButton,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;MAYU,cAAc,CAAA;AAX3B,IAAA,WAAA,GAAA;AAYI;;;;AAIG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,kBAAkB;oFAAC;AAEnC;;;AAGG;QACH,IAAA,CAAA,sBAAsB,GAAG,KAAK,CAAC,KAAK,8FAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEtE;;;AAGG;QACH,IAAA,CAAA,oBAAoB,GAAG,KAAK,CAAC,IAAI,4FAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEnE;;;AAGG;AACgB,QAAA,IAAA,CAAA,QAAQ,GAAG,QAAQ,CAAkB,MACpD,IAAI,CAAC,sBAAsB,EAAE,GAAG,OAAO,GAAG,KAAK;qFAClD;AACJ,IAAA;8GA3BY,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,iqBC9C3B,mDAEA,EAAA,MAAA,EAAA,CAAA,2rCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FD4Ca,cAAc,EAAA,UAAA,EAAA,CAAA;kBAX1B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAAA,eAAA,EAGX,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACF,wBAAA,KAAK,EAAE,kBAAkB;AACzB,wBAAA,iBAAiB,EAAE,YAAY;AAC/B,wBAAA,iBAAiB,EAAE,WAAW;AACjC,qBAAA,EAAA,QAAA,EAAA,mDAAA,EAAA,MAAA,EAAA,CAAA,2rCAAA,CAAA,EAAA;;;AExCL;AACO,MAAM,gBAAgB,GAAG;IAC5B,cAAc;;;ACNlB;;AAEG;;;;"}
1
+ {"version":3,"file":"eui-eds-eds-input-button.mjs","sources":["../../eds-input-button/eds-input-button.ts","../../eds-input-button/eds-input-button.html","../../eds-input-button/index.ts","../../eds-input-button/eui-eds-eds-input-button.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n afterNextRender,\n booleanAttribute,\n computed,\n inject,\n input,\n signal,\n} from '@angular/core';\n\n/**\n * A layout component that positions button elements relative to input fields.\n * Enables the creation of input groups with leading or trailing action buttons,\n * commonly used for search inputs, password visibility toggles, or clear actions.\n *\n * @usageNotes\n * ### Button at end of input (default)\n * ```html\n * <eds-input-button>\n * <input edsInputText placeholder=\"Search...\" />\n * <button edsButton>Search</button>\n * </eds-input-button>\n * ```\n *\n * ### Button at start of input\n * ```html\n * <eds-input-button [edsButtonPositionStart]=\"true\">\n * <button edsIconButton icon=\"filter\" ariaLabel=\"Filter\"></button>\n * <input edsInputText placeholder=\"Filter results...\" />\n * </eds-input-button>\n * ```\n *\n * ### Focus model (roving tabindex)\n * - `Tab` moves focus directly onto the input field (the primary control); the\n * focus ring covers the whole host (the group). `Tab` again leaves the group.\n * - `ArrowLeft` / `ArrowRight` rove focus between the group's controls in visual\n * order — the input, the clearable \"✕\" icon (when present), and the button —\n * wrapping at the ends; `Home` / `End` jump to the first / last control.\n * - Only the active control is in the tab order, so `Tab` leaves the group from\n * wherever focus currently is. Focusing a child directly (click) adopts it as\n * the active roving target.\n *\n * ### Accessibility\n * - Single tab stop with arrow-key navigation between the controls\n * - The clearable icon participates in the arrow-key cycle when it is shown\n * - Ensure button has a descriptive label or aria-label\n * - Tab order follows visual layout\n *\n * ### Notes\n * - Default position is end (right in LTR)\n * - When `edsButtonPositionStart` is true, it overrides end positioning\n * - Works with all button variants (edsButton, edsIconButton)\n * - Commonly used for search, clear, and submit actions\n */\n@Component({\n selector: 'eds-input-button',\n templateUrl: './eds-input-button.html',\n styleUrl: './eds-input-button.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'eds-input-button',\n role: 'group',\n '[attr.position]': 'position()',\n '[attr.data-e2e]': 'e2eAttr()',\n '(focusin)': 'onFocusIn($event)',\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class EdsInputButton {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Data attribute value for end-to-end testing identification.\n * Applied as data-e2e attribute on the host element.\n * @default 'eds-input-button'\n */\n e2eAttr = input('eds-input-button');\n\n /**\n * Positions the button at the start (left in LTR, right in RTL) of the input field.\n * When true, overrides edsButtonPositionEnd. Defaults to false.\n */\n edsButtonPositionStart = input(false, { transform: booleanAttribute });\n\n /**\n * Positions the button at the end (right in LTR, left in RTL) of the input field.\n * Ignored when edsButtonPositionStart is true. Defaults to true.\n */\n edsButtonPositionEnd = input(true, { transform: booleanAttribute });\n\n /**\n * Resolved button position, reflected as the `position` host attribute.\n * `start` takes precedence when both inputs are set.\n */\n protected readonly position = computed<'start' | 'end'>(() =>\n this.edsButtonPositionStart() ? 'start' : 'end',\n );\n\n /** Index (within {@link managedChildren}) of the roving active control. */\n private readonly activeIndex = signal(0);\n\n constructor() {\n afterNextRender(() => this.resetRovingTabStop());\n }\n\n /**\n * The group's controls that participate in arrow-key roving, in DOM order:\n * the projected input/button plus the clearable \"✕\" icon (a `[tabindex]`\n * element the eds-input-text clearable directive injects). Disabled and\n * not-currently-rendered controls (e.g. the hidden clearable icon when the\n * field is empty) are excluded so the cycle only visits reachable targets.\n */\n private managedChildren(): HTMLElement[] {\n const selector = 'input, button, select, textarea, .eds-clearable-icon';\n return Array.from(\n this.host.nativeElement.querySelectorAll<HTMLElement>(selector),\n ).filter((el) => {\n if (el === this.host.nativeElement || el.hasAttribute('disabled')) {\n return false;\n }\n // Skip controls that are not actually visible/rendered — notably the\n // clearable icon, which is hidden (visibility:hidden) when empty.\n if (getComputedStyle(el).visibility === 'hidden') {\n return false;\n }\n return el.offsetParent !== null || getComputedStyle(el).position === 'fixed';\n });\n }\n\n /**\n * Index of the primary control that owns the natural tab stop — the input\n * field (first `input`/`textarea`/`select`), so `Tab` lands directly on it.\n * Falls back to the first child when there is no input-like control.\n */\n private primaryIndex(): number {\n const children = this.managedChildren();\n const inputIndex = children.findIndex((el) =>\n /^(input|textarea|select)$/i.test(el.tagName),\n );\n return inputIndex >= 0 ? inputIndex : 0;\n }\n\n /**\n * Roving tabindex: the primary (input) control stays in the natural tab\n * order so `Tab` focuses it directly; every other control is reachable only\n * via the arrow keys.\n */\n private resetRovingTabStop(): void {\n const primary = this.primaryIndex();\n this.activeIndex.set(primary);\n this.managedChildren().forEach((el, index) =>\n el.setAttribute('tabindex', index === primary ? '0' : '-1'),\n );\n }\n\n /**\n * Track focus entering a projected control so the arrow keys continue from\n * the control the user is actually on (e.g. after a click), and keep the\n * roving tab stop in sync so a subsequent `Tab` leaves from here.\n */\n protected onFocusIn(event: FocusEvent): void {\n const target = event.target as HTMLElement;\n const index = this.managedChildren().indexOf(target);\n if (index >= 0) {\n this.setActive(index);\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const children = this.managedChildren();\n if (children.length === 0) {\n return;\n }\n\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowDown':\n event.preventDefault();\n this.focusChild(this.nextIndex(1));\n break;\n case 'ArrowLeft':\n case 'ArrowUp':\n event.preventDefault();\n this.focusChild(this.nextIndex(-1));\n break;\n case 'Home':\n event.preventDefault();\n this.focusChild(0);\n break;\n case 'End':\n event.preventDefault();\n this.focusChild(children.length - 1);\n break;\n default:\n break;\n }\n }\n\n private nextIndex(delta: number): number {\n const count = this.managedChildren().length;\n const current = this.activeIndex();\n return (current + delta + count) % count;\n }\n\n private focusChild(index: number): void {\n const target = this.managedChildren()[index];\n if (!target) {\n return;\n }\n this.setActive(index);\n target.focus();\n }\n\n /**\n * Move the single roving tab stop (`tabindex=\"0\"`) onto the active control\n * and set every other control to `tabindex=\"-1\"`, so after arrow navigation\n * `Tab` leaves the group from wherever focus currently is.\n */\n private setActive(index: number): void {\n this.activeIndex.set(index);\n this.managedChildren().forEach((el, i) =>\n el.setAttribute('tabindex', i === index ? '0' : '-1'),\n );\n }\n}\n","<ng-content />\n<ng-content select=\"button\"/>\n","import { EdsInputButton } from './eds-input-button';\n\nexport { EdsInputButton };\n\n/** Convenience array for importing all eds-input-button components. */\nexport const EDS_INPUT_BUTTON = [\n EdsInputButton,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CG;MAeU,cAAc,CAAA;AAiCvB,IAAA,WAAA,GAAA;AAhCiB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAA0B,UAAU,CAAC;AAEnE;;;;AAIG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,kBAAkB;oFAAC;AAEnC;;;AAGG;QACH,IAAA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,mDAEA,EAAA,MAAA,EAAA,CAAA,kuHAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDoEa,cAAc,EAAA,UAAA,EAAA,CAAA;kBAd1B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAAA,eAAA,EAGX,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACF,wBAAA,KAAK,EAAE,kBAAkB;AACzB,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,iBAAiB,EAAE,YAAY;AAC/B,wBAAA,iBAAiB,EAAE,WAAW;AAC9B,wBAAA,WAAW,EAAE,mBAAmB;AAChC,wBAAA,WAAW,EAAE,mBAAmB;AACnC,qBAAA,EAAA,QAAA,EAAA,mDAAA,EAAA,MAAA,EAAA,CAAA,kuHAAA,CAAA,EAAA;;;AEhEL;AACO,MAAM,gBAAgB,GAAG;IAC5B,cAAc;;;ACNlB;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/eds",
3
- "version": "22.0.0-alpha.43",
3
+ "version": "22.0.0-alpha.44",
4
4
  "tag": "next",
5
5
  "description": "eUI EDS components package",
6
6
  "homepage": "https://eui.ecdevops.eu",
@@ -22,9 +22,20 @@ import * as _angular_core from '@angular/core';
22
22
  * </eds-input-button>
23
23
  * ```
24
24
  *
25
+ * ### Focus model (roving tabindex)
26
+ * - `Tab` moves focus directly onto the input field (the primary control); the
27
+ * focus ring covers the whole host (the group). `Tab` again leaves the group.
28
+ * - `ArrowLeft` / `ArrowRight` rove focus between the group's controls in visual
29
+ * order — the input, the clearable "✕" icon (when present), and the button —
30
+ * wrapping at the ends; `Home` / `End` jump to the first / last control.
31
+ * - Only the active control is in the tab order, so `Tab` leaves the group from
32
+ * wherever focus currently is. Focusing a child directly (click) adopts it as
33
+ * the active roving target.
34
+ *
25
35
  * ### Accessibility
26
- * - Button and input maintain separate focus states
27
- * - Ensure button has descriptive label or aria-label
36
+ * - Single tab stop with arrow-key navigation between the controls
37
+ * - The clearable icon participates in the arrow-key cycle when it is shown
38
+ * - Ensure button has a descriptive label or aria-label
28
39
  * - Tab order follows visual layout
29
40
  *
30
41
  * ### Notes
@@ -34,6 +45,7 @@ import * as _angular_core from '@angular/core';
34
45
  * - Commonly used for search, clear, and submit actions
35
46
  */
36
47
  declare class EdsInputButton {
48
+ private readonly host;
37
49
  /**
38
50
  * Data attribute value for end-to-end testing identification.
39
51
  * Applied as data-e2e attribute on the host element.
@@ -55,6 +67,44 @@ declare class EdsInputButton {
55
67
  * `start` takes precedence when both inputs are set.
56
68
  */
57
69
  protected readonly position: _angular_core.Signal<"start" | "end">;
70
+ /** Index (within {@link managedChildren}) of the roving active control. */
71
+ private readonly activeIndex;
72
+ constructor();
73
+ /**
74
+ * The group's controls that participate in arrow-key roving, in DOM order:
75
+ * the projected input/button plus the clearable "✕" icon (a `[tabindex]`
76
+ * element the eds-input-text clearable directive injects). Disabled and
77
+ * not-currently-rendered controls (e.g. the hidden clearable icon when the
78
+ * field is empty) are excluded so the cycle only visits reachable targets.
79
+ */
80
+ private managedChildren;
81
+ /**
82
+ * Index of the primary control that owns the natural tab stop — the input
83
+ * field (first `input`/`textarea`/`select`), so `Tab` lands directly on it.
84
+ * Falls back to the first child when there is no input-like control.
85
+ */
86
+ private primaryIndex;
87
+ /**
88
+ * Roving tabindex: the primary (input) control stays in the natural tab
89
+ * order so `Tab` focuses it directly; every other control is reachable only
90
+ * via the arrow keys.
91
+ */
92
+ private resetRovingTabStop;
93
+ /**
94
+ * Track focus entering a projected control so the arrow keys continue from
95
+ * the control the user is actually on (e.g. after a click), and keep the
96
+ * roving tab stop in sync so a subsequent `Tab` leaves from here.
97
+ */
98
+ protected onFocusIn(event: FocusEvent): void;
99
+ protected onKeydown(event: KeyboardEvent): void;
100
+ private nextIndex;
101
+ private focusChild;
102
+ /**
103
+ * Move the single roving tab stop (`tabindex="0"`) onto the active control
104
+ * and set every other control to `tabindex="-1"`, so after arrow navigation
105
+ * `Tab` leaves the group from wherever focus currently is.
106
+ */
107
+ private setActive;
58
108
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EdsInputButton, never>;
59
109
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EdsInputButton, "eds-input-button", never, { "e2eAttr": { "alias": "e2eAttr"; "required": false; "isSignal": true; }; "edsButtonPositionStart": { "alias": "edsButtonPositionStart"; "required": false; "isSignal": true; }; "edsButtonPositionEnd": { "alias": "edsButtonPositionEnd"; "required": false; "isSignal": true; }; }, {}, never, ["*", "button"], true, never>;
60
110
  }
@@ -1 +1 @@
1
- {"version":3,"file":"eui-eds-eds-input-button.d.ts","sources":["../../eds-input-button/eds-input-button.ts","../../eds-input-button/index.ts"],"mappings":";;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;AACH,cAWa,cAAc;AACvB;;;;AAIG;AACH,aAAO,aAAA,CAAA,WAAA;AAEP;;;AAGG;AACH,4BAAsB,aAAA,CAAA,wBAAA;AAEtB;;;AAGG;AACH,0BAAoB,aAAA,CAAA,wBAAA;AAEpB;;;AAGG;AACH,iCAA2B,aAAA,CAAA,MAAA;oDAxBlB,cAAc;sDAAd,cAAc;AA2B1B;;ACrED;AACA,cAAa,gBAAgB,mBAAA,cAAA;;;;","names":[]}
1
+ {"version":3,"file":"eui-eds-eds-input-button.d.ts","sources":["../../eds-input-button/eds-input-button.ts","../../eds-input-button/index.ts"],"mappings":";;AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CG;AACH,cAca,cAAc;AACvB;AAEA;;;;AAIG;AACH,aAAO,aAAA,CAAA,WAAA;AAEP;;;AAGG;AACH,4BAAsB,aAAA,CAAA,wBAAA;AAEtB;;;AAGG;AACH,0BAAoB,aAAA,CAAA,wBAAA;AAEpB;;;AAGG;AACH,iCAA2B,aAAA,CAAA,MAAA;;AAK3B;;AAMA;;;;;;AAMG;AACH;AAiBA;;;;AAIG;AACH;AAQA;;;;AAIG;AACH;AAQA;;;;AAIG;AACH,+BAA2B,UAAU;AAQrC,+BAA2B,aAAa;AA8BxC;AAMA;AASA;;;;AAIG;AACH;oDAtJS,cAAc;sDAAd,cAAc;AA4J1B;;AC9ND;AACA,cAAa,gBAAgB,mBAAA,cAAA;;;;","names":[]}