@eui/eds 22.0.0-alpha.50 → 22.0.0-alpha.51
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.
- package/docs/changelog.html +60 -0
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/documentation.json +43 -43
- package/docs/llms.txt +2 -2
- package/docs/miscellaneous/typealiases.html +1 -1
- package/docs/properties.html +1 -1
- package/fesm2022/eui-eds-eds-badge.mjs +2 -2
- package/fesm2022/eui-eds-eds-badge.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eui-eds-eds-badge.d.ts +1 -1
|
@@ -27327,7 +27327,7 @@
|
|
|
27327
27327
|
},
|
|
27328
27328
|
{
|
|
27329
27329
|
"name": "EdsBadge",
|
|
27330
|
-
"id": "component-EdsBadge-
|
|
27330
|
+
"id": "component-EdsBadge-eff53ba20e9394f26b855080eb8d97a406bdd50bc340954261976d393b3bc37538d689581b50c85b8d60ff833f326a355c96005d6361a65f630b3199d100c85b",
|
|
27331
27331
|
"file": "packages/eds/eds-badge/eds-badge.ts",
|
|
27332
27332
|
"changeDetection": "ChangeDetectionStrategy.OnPush",
|
|
27333
27333
|
"encapsulation": [],
|
|
@@ -27362,16 +27362,16 @@
|
|
|
27362
27362
|
"rawdescription": "\n\nARIA label for accessibility. When `null`, the visible content serves as the\naccessible name.\n\n'badge'\n",
|
|
27363
27363
|
"jsdoctags": [
|
|
27364
27364
|
{
|
|
27365
|
-
"pos":
|
|
27366
|
-
"end":
|
|
27365
|
+
"pos": 2570,
|
|
27366
|
+
"end": 2592,
|
|
27367
27367
|
"kind": 328,
|
|
27368
27368
|
"id": 0,
|
|
27369
27369
|
"flags": 16842752,
|
|
27370
27370
|
"modifierFlagsCache": 0,
|
|
27371
27371
|
"transformFlags": 0,
|
|
27372
27372
|
"tagName": {
|
|
27373
|
-
"pos":
|
|
27374
|
-
"end":
|
|
27373
|
+
"pos": 2571,
|
|
27374
|
+
"end": 2578,
|
|
27375
27375
|
"kind": 80,
|
|
27376
27376
|
"id": 0,
|
|
27377
27377
|
"flags": 16842752,
|
|
@@ -27397,16 +27397,16 @@
|
|
|
27397
27397
|
"rawdescription": "\n\nText shown when the content is truncated by `maxCharCount`. Falls back to `'99+'`.\n\n''\n",
|
|
27398
27398
|
"jsdoctags": [
|
|
27399
27399
|
{
|
|
27400
|
-
"pos":
|
|
27401
|
-
"end":
|
|
27400
|
+
"pos": 2261,
|
|
27401
|
+
"end": 2278,
|
|
27402
27402
|
"kind": 328,
|
|
27403
27403
|
"id": 0,
|
|
27404
27404
|
"flags": 16842752,
|
|
27405
27405
|
"modifierFlagsCache": 0,
|
|
27406
27406
|
"transformFlags": 0,
|
|
27407
27407
|
"tagName": {
|
|
27408
|
-
"pos":
|
|
27409
|
-
"end":
|
|
27408
|
+
"pos": 2262,
|
|
27409
|
+
"end": 2269,
|
|
27410
27410
|
"kind": 80,
|
|
27411
27411
|
"id": 0,
|
|
27412
27412
|
"flags": 16842752,
|
|
@@ -27432,16 +27432,16 @@
|
|
|
27432
27432
|
"rawdescription": "\n\nSemantic color of the badge.\n\n'neutral'\n",
|
|
27433
27433
|
"jsdoctags": [
|
|
27434
27434
|
{
|
|
27435
|
-
"pos":
|
|
27436
|
-
"end":
|
|
27435
|
+
"pos": 1438,
|
|
27436
|
+
"end": 1462,
|
|
27437
27437
|
"kind": 328,
|
|
27438
27438
|
"id": 0,
|
|
27439
27439
|
"flags": 16842752,
|
|
27440
27440
|
"modifierFlagsCache": 0,
|
|
27441
27441
|
"transformFlags": 0,
|
|
27442
27442
|
"tagName": {
|
|
27443
|
-
"pos":
|
|
27444
|
-
"end":
|
|
27443
|
+
"pos": 1439,
|
|
27444
|
+
"end": 1446,
|
|
27445
27445
|
"kind": 80,
|
|
27446
27446
|
"id": 0,
|
|
27447
27447
|
"flags": 16842752,
|
|
@@ -27467,16 +27467,16 @@
|
|
|
27467
27467
|
"rawdescription": "\n\nData attribute for e2e testing.\n\n'eds-badge'\n",
|
|
27468
27468
|
"jsdoctags": [
|
|
27469
27469
|
{
|
|
27470
|
-
"pos":
|
|
27471
|
-
"end":
|
|
27470
|
+
"pos": 2376,
|
|
27471
|
+
"end": 2402,
|
|
27472
27472
|
"kind": 328,
|
|
27473
27473
|
"id": 0,
|
|
27474
27474
|
"flags": 16842752,
|
|
27475
27475
|
"modifierFlagsCache": 0,
|
|
27476
27476
|
"transformFlags": 0,
|
|
27477
27477
|
"tagName": {
|
|
27478
|
-
"pos":
|
|
27479
|
-
"end":
|
|
27478
|
+
"pos": 2377,
|
|
27479
|
+
"end": 2384,
|
|
27480
27480
|
"kind": 80,
|
|
27481
27481
|
"id": 0,
|
|
27482
27482
|
"flags": 16842752,
|
|
@@ -27502,16 +27502,16 @@
|
|
|
27502
27502
|
"rawdescription": "\n\nMaximum number of characters to display before truncating. When the content\nexceeds this limit it is replaced with `charReplacement`. `0` disables truncation.\n\n0\n",
|
|
27503
27503
|
"jsdoctags": [
|
|
27504
27504
|
{
|
|
27505
|
-
"pos":
|
|
27506
|
-
"end":
|
|
27505
|
+
"pos": 2068,
|
|
27506
|
+
"end": 2084,
|
|
27507
27507
|
"kind": 328,
|
|
27508
27508
|
"id": 0,
|
|
27509
27509
|
"flags": 16842752,
|
|
27510
27510
|
"modifierFlagsCache": 0,
|
|
27511
27511
|
"transformFlags": 0,
|
|
27512
27512
|
"tagName": {
|
|
27513
|
-
"pos":
|
|
27514
|
-
"end":
|
|
27513
|
+
"pos": 2069,
|
|
27514
|
+
"end": 2076,
|
|
27515
27515
|
"kind": 80,
|
|
27516
27516
|
"id": 0,
|
|
27517
27517
|
"flags": 16842752,
|
|
@@ -27537,16 +27537,16 @@
|
|
|
27537
27537
|
"rawdescription": "\n\nSize of the badge.\n\n'm'\n",
|
|
27538
27538
|
"jsdoctags": [
|
|
27539
27539
|
{
|
|
27540
|
-
"pos":
|
|
27541
|
-
"end":
|
|
27540
|
+
"pos": 1814,
|
|
27541
|
+
"end": 1832,
|
|
27542
27542
|
"kind": 328,
|
|
27543
27543
|
"id": 0,
|
|
27544
27544
|
"flags": 16842752,
|
|
27545
27545
|
"modifierFlagsCache": 0,
|
|
27546
27546
|
"transformFlags": 0,
|
|
27547
27547
|
"tagName": {
|
|
27548
|
-
"pos":
|
|
27549
|
-
"end":
|
|
27548
|
+
"pos": 1815,
|
|
27549
|
+
"end": 1822,
|
|
27550
27550
|
"kind": 80,
|
|
27551
27551
|
"id": 0,
|
|
27552
27552
|
"flags": 16842752,
|
|
@@ -27572,16 +27572,16 @@
|
|
|
27572
27572
|
"rawdescription": "\n\nVisual variant of the badge. `filled` uses a solid semantic surface; `light`\nuses a subtle semantic surface with a matching subtler foreground.\n\n'filled'\n",
|
|
27573
27573
|
"jsdoctags": [
|
|
27574
27574
|
{
|
|
27575
|
-
"pos":
|
|
27576
|
-
"end":
|
|
27575
|
+
"pos": 1691,
|
|
27576
|
+
"end": 1714,
|
|
27577
27577
|
"kind": 328,
|
|
27578
27578
|
"id": 0,
|
|
27579
27579
|
"flags": 16842752,
|
|
27580
27580
|
"modifierFlagsCache": 0,
|
|
27581
27581
|
"transformFlags": 0,
|
|
27582
27582
|
"tagName": {
|
|
27583
|
-
"pos":
|
|
27584
|
-
"end":
|
|
27583
|
+
"pos": 1692,
|
|
27584
|
+
"end": 1699,
|
|
27585
27585
|
"kind": 80,
|
|
27586
27586
|
"id": 0,
|
|
27587
27587
|
"flags": 16842752,
|
|
@@ -27712,28 +27712,28 @@
|
|
|
27712
27712
|
"description": "<p>A badge component that displays text, numbers, or a dot indicator with semantic\ncolor, size, and variant styling. Supports content truncation, an automatic empty\n(dot) state, and an auto-detected icon-only mode when the sole projected content is\na single icon.</p>\n",
|
|
27713
27713
|
"rawdescription": "\n\nA badge component that displays text, numbers, or a dot indicator with semantic\ncolor, size, and variant styling. Supports content truncation, an automatic empty\n(dot) state, and an auto-detected icon-only mode when the sole projected content is\na single icon.\n",
|
|
27714
27714
|
"type": "component",
|
|
27715
|
-
"sourceCode": "import {\n Component,\n ChangeDetectionStrategy,\n ElementRef,\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 = '
|
|
27715
|
+
"sourceCode": "import {\n Component,\n ChangeDetectionStrategy,\n ElementRef,\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 = '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 * (dot) state, and an auto-detected icon-only mode when the sole projected content is\n * a single icon.\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]': 'isIconOnly() || 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 * 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 /**\n * Whether the sole projected content is a single icon (drives the circular,\n * padless icon-only state). Auto-detected from the projected content — not an input.\n */\n protected readonly isIconOnly = 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._evaluateContent(content.nativeElement);\n }\n });\n }\n\n /**\n * Handles projected content changes and re-evaluates the empty / icon-only /\n * truncation states.\n */\n onContentChanged(): void {\n const content = this.content();\n if (content) {\n this._evaluateContent(content.nativeElement);\n }\n }\n\n /**\n * Derives the empty and icon-only states from the projected content, then\n * re-evaluates truncation when there is content.\n */\n private _evaluateContent(el: HTMLElement): void {\n this.isEmpty.set(el.childNodes.length === 0);\n this.isIconOnly.set(this._isIconOnlyContent(el));\n if (!this.isEmpty()) {\n this._checkContent();\n }\n }\n\n /**\n * Whether the only meaningful projected content is a single icon element\n * (an `eds-icon` / `[edsIcon]`), with no accompanying text.\n */\n private _isIconOnlyContent(el: HTMLElement): boolean {\n const meaningful = Array.from(el.childNodes).filter(\n (node) =>\n node.nodeType === Node.ELEMENT_NODE ||\n (node.nodeType === Node.TEXT_NODE && !!node.textContent?.trim()),\n );\n if (meaningful.length !== 1 || meaningful[0].nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n const element = meaningful[0] as HTMLElement;\n return element.tagName.toLowerCase() === 'eds-icon' || element.hasAttribute('edsIcon');\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",
|
|
27716
27716
|
"styleUrl": "./eds-badge.scss",
|
|
27717
27717
|
"assetsDirs": [],
|
|
27718
27718
|
"styleUrlsData": [
|
|
27719
27719
|
{
|
|
27720
|
-
"data": "@use '../base' as base;\n\n:host {\n // inherited vars\n --_eds-badge-size: var(--_eds-badge-size-inherit, calc(var(--eds-sp-m) + var(--eds-sp-3xs)));\n --_eds-badge-empty-size: var(--_eds-badge-empty-size-inherit, var(--eds-sp-s));\n --_eds-badge-icon-size: var(--_eds-badge-icon-size-inherit, var(--eds-is-xs));\n\n // Common defaults\n --_eds-badge-padding: 0 var(--eds-sp-3xs);\n --_eds-badge-border-radius: var(--eds-br-full);\n --_eds-badge-font: var(--eds-f-microcopy-m);\n --_eds-badge-font-weight: var(--eds-f-w-regular);\n\n // Default color (neutral)\n --_eds-badge-surface: var(--eds-c-surface-neutral);\n --_eds-badge-on-surface: var(--eds-c-on-surface-neutral);\n --_eds-badge-border-color: transparent;\n\n display: inline-flex;\n border-radius: var(--_eds-badge-border-radius);\n background-color: var(--_eds-badge-surface);\n\n // a projected eds-icon follows the badge foreground (on-surface) color\n --_eds-icon-color-inherit: var(--_eds-badge-on-surface);\n --_eds-icon-size-inherit: var(--_eds-badge-icon-size);\n\n .eds-badge__wrapper {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: var(--_eds-badge-on-surface);\n height: var(--_eds-badge-size);\n min-width: var(--_eds-badge-size);\n padding: var(--_eds-badge-padding);\n font: var(--_eds-badge-font);\n font-weight: var(--_eds-badge-font-weight);\n @include base.eds-ellipsis();\n }\n}\n\n// COLOR — filled (default) surface / foreground / border\n:host([color=\"
|
|
27720
|
+
"data": "@use '../base' as base;\n\n:host {\n // inherited vars\n --_eds-badge-size: var(--_eds-badge-size-inherit, calc(var(--eds-sp-m) + var(--eds-sp-3xs)));\n --_eds-badge-empty-size: var(--_eds-badge-empty-size-inherit, var(--eds-sp-s));\n --_eds-badge-icon-size: var(--_eds-badge-icon-size-inherit, var(--eds-is-xs));\n\n // Common defaults\n --_eds-badge-padding: 0 var(--eds-sp-3xs);\n --_eds-badge-border-radius: var(--eds-br-full);\n --_eds-badge-font: var(--eds-f-microcopy-m);\n --_eds-badge-font-weight: var(--eds-f-w-regular);\n\n // Default color (neutral)\n --_eds-badge-surface: var(--eds-c-surface-neutral);\n --_eds-badge-on-surface: var(--eds-c-on-surface-neutral);\n --_eds-badge-border-color: transparent;\n\n display: inline-flex;\n border-radius: var(--_eds-badge-border-radius);\n border: var(--eds-bw-xs) solid var(--_eds-badge-border-color);\n background-color: var(--_eds-badge-surface);\n\n // a projected eds-icon follows the badge foreground (on-surface) color\n --_eds-icon-color-inherit: var(--_eds-badge-on-surface);\n --_eds-icon-size-inherit: var(--_eds-badge-icon-size);\n\n .eds-badge__wrapper {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: var(--_eds-badge-on-surface);\n height: var(--_eds-badge-size);\n min-width: var(--_eds-badge-size);\n padding: var(--_eds-badge-padding);\n font: var(--_eds-badge-font);\n font-weight: var(--_eds-badge-font-weight);\n @include base.eds-ellipsis();\n }\n}\n\n// COLOR — filled (default) surface / foreground / border\n:host([color=\"neutral\"]) {\n --_eds-badge-surface: var(--eds-c-surface-neutral);\n --_eds-badge-on-surface: var(--eds-c-on-surface-neutral);\n}\n:host([color=\"success\"]) {\n --_eds-badge-surface: var(--eds-c-surface-success);\n --_eds-badge-on-surface: var(--eds-c-on-surface-success);\n}\n:host([color=\"info\"]) {\n --_eds-badge-surface: var(--eds-c-surface-info);\n --_eds-badge-on-surface: var(--eds-c-on-surface-info);\n}\n:host([color=\"warning\"]) {\n --_eds-badge-surface: var(--eds-c-surface-warning);\n --_eds-badge-on-surface: var(--eds-c-on-surface-warning);\n}\n:host([color=\"critical\"]) {\n --_eds-badge-surface: var(--eds-c-surface-critical);\n --_eds-badge-on-surface: var(--eds-c-on-surface-critical);\n}\n\n// VARIANT — light: subtle semantic surface with a matching subtler foreground\n:host([variant=\"light\"][color=\"neutral\"]) {\n --_eds-badge-surface: var(--eds-c-surface-elevation-sunken);\n --_eds-badge-on-surface: var(--eds-c-foreground-subtle);\n --_eds-badge-border-color: var(--eds-c-border-divider);\n}\n:host([variant=\"light\"][color=\"success\"]) {\n --_eds-badge-surface: var(--eds-c-surface-success-subtler);\n --_eds-badge-on-surface: var(--eds-c-on-surface-success-subtler);\n --_eds-badge-border-color: var(--eds-c-border-success-subtler);\n}\n:host([variant=\"light\"][color=\"info\"]) {\n --_eds-badge-surface: var(--eds-c-surface-info-subtler);\n --_eds-badge-on-surface: var(--eds-c-on-surface-info-subtler);\n --_eds-badge-border-color: var(--eds-c-border-info-subtler);\n}\n:host([variant=\"light\"][color=\"warning\"]) {\n --_eds-badge-surface: var(--eds-c-surface-warning-subtler);\n --_eds-badge-on-surface: var(--eds-c-on-surface-warning-subtler);\n --_eds-badge-border-color: var(--eds-c-border-warning-subtler);\n}\n:host([variant=\"light\"][color=\"critical\"]) {\n --_eds-badge-surface: var(--eds-c-surface-critical-subtler);\n --_eds-badge-on-surface: var(--eds-c-on-surface-critical-subtler);\n --_eds-badge-border-color: var(--eds-c-border-critical-subtler);\n}\n\n// SIZE\n:host([size=\"xs\"]) {\n --_eds-badge-size: var(--eds-sp-s);\n --_eds-badge-font: var(--eds-f-supportive-m);\n --_eds-badge-font-weight: var(--eds-f-w-regular);\n --_eds-badge-empty-size: var(--eds-sp-2xs);\n}\n:host([size=\"s\"]) {\n --_eds-badge-size: var(--eds-sp-m);\n --_eds-badge-font: var(--eds-f-supportive-m);\n --_eds-badge-font-weight: var(--eds-f-w-regular);\n}\n:host([size=\"l\"]) {\n --_eds-badge-size: calc(var(--eds-sp-m) + var(--eds-sp-2xs));\n --_eds-badge-font: var(--eds-f-microcopy-m);\n --_eds-badge-font-weight: var(--eds-f-w-regular);\n --_eds-badge-empty-size: var(--eds-sp-m);\n}\n\n// EMPTY — dot badge, no content in wrapper\n:host([empty]) {\n width: var(--_eds-badge-empty-size);\n height: var(--_eds-badge-empty-size);\n}\n\n// ICON-ONLY — auto-detected when the sole projected content is a single icon:\n// circular indicator holding that icon, no wrapper padding\n:host([icon-only]) {\n .eds-badge__wrapper {\n padding: 0;\n width: var(--_eds-badge-size);\n min-width: var(--_eds-badge-size);\n }\n}\n\n// icon > badge\n.eds-icon {\n :host {\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(40%, -25%);\n }\n}\n",
|
|
27721
27721
|
"styleUrl": "./eds-badge.scss"
|
|
27722
27722
|
}
|
|
27723
27723
|
],
|
|
27724
27724
|
"stylesData": "",
|
|
27725
27725
|
"jsdoctags": [
|
|
27726
27726
|
{
|
|
27727
|
-
"pos":
|
|
27728
|
-
"end":
|
|
27727
|
+
"pos": 520,
|
|
27728
|
+
"end": 807,
|
|
27729
27729
|
"kind": 328,
|
|
27730
27730
|
"id": 0,
|
|
27731
27731
|
"flags": 16777216,
|
|
27732
27732
|
"modifierFlagsCache": 0,
|
|
27733
27733
|
"transformFlags": 0,
|
|
27734
27734
|
"tagName": {
|
|
27735
|
-
"pos":
|
|
27736
|
-
"end":
|
|
27735
|
+
"pos": 521,
|
|
27736
|
+
"end": 532,
|
|
27737
27737
|
"kind": 80,
|
|
27738
27738
|
"id": 0,
|
|
27739
27739
|
"flags": 16777216,
|
|
@@ -97253,7 +97253,7 @@
|
|
|
97253
97253
|
"name": "nextId",
|
|
97254
97254
|
"ctype": "miscellaneous",
|
|
97255
97255
|
"subtype": "variable",
|
|
97256
|
-
"file": "packages/eds/eds-
|
|
97256
|
+
"file": "packages/eds/eds-icon-toggle/eds-icon-toggle.ts",
|
|
97257
97257
|
"coverageIgnore": false,
|
|
97258
97258
|
"deprecated": false,
|
|
97259
97259
|
"deprecationMessage": "",
|
|
@@ -97264,7 +97264,7 @@
|
|
|
97264
97264
|
"name": "nextId",
|
|
97265
97265
|
"ctype": "miscellaneous",
|
|
97266
97266
|
"subtype": "variable",
|
|
97267
|
-
"file": "packages/eds/eds-
|
|
97267
|
+
"file": "packages/eds/eds-tree-list/eds-tree-list-item.ts",
|
|
97268
97268
|
"coverageIgnore": false,
|
|
97269
97269
|
"deprecated": false,
|
|
97270
97270
|
"deprecationMessage": "",
|
|
@@ -99684,7 +99684,7 @@
|
|
|
99684
99684
|
"ctype": "miscellaneous",
|
|
99685
99685
|
"subtype": "typealias",
|
|
99686
99686
|
"coverageIgnore": false,
|
|
99687
|
-
"rawtype": "\"
|
|
99687
|
+
"rawtype": "\"neutral\" | \"success\" | \"info\" | \"warning\" | \"critical\"",
|
|
99688
99688
|
"file": "packages/eds/eds-badge/eds-badge.ts",
|
|
99689
99689
|
"deprecated": false,
|
|
99690
99690
|
"deprecationMessage": "",
|
|
@@ -103716,12 +103716,12 @@
|
|
|
103716
103716
|
"defaultValue": "['S', 'M', 'T', 'W', 'T', 'F', 'S']"
|
|
103717
103717
|
}
|
|
103718
103718
|
],
|
|
103719
|
-
"packages/eds/eds-
|
|
103719
|
+
"packages/eds/eds-icon-toggle/eds-icon-toggle.ts": [
|
|
103720
103720
|
{
|
|
103721
103721
|
"name": "nextId",
|
|
103722
103722
|
"ctype": "miscellaneous",
|
|
103723
103723
|
"subtype": "variable",
|
|
103724
|
-
"file": "packages/eds/eds-
|
|
103724
|
+
"file": "packages/eds/eds-icon-toggle/eds-icon-toggle.ts",
|
|
103725
103725
|
"coverageIgnore": false,
|
|
103726
103726
|
"deprecated": false,
|
|
103727
103727
|
"deprecationMessage": "",
|
|
@@ -103729,12 +103729,12 @@
|
|
|
103729
103729
|
"defaultValue": "0"
|
|
103730
103730
|
}
|
|
103731
103731
|
],
|
|
103732
|
-
"packages/eds/eds-
|
|
103732
|
+
"packages/eds/eds-tree-list/eds-tree-list-item.ts": [
|
|
103733
103733
|
{
|
|
103734
103734
|
"name": "nextId",
|
|
103735
103735
|
"ctype": "miscellaneous",
|
|
103736
103736
|
"subtype": "variable",
|
|
103737
|
-
"file": "packages/eds/eds-
|
|
103737
|
+
"file": "packages/eds/eds-tree-list/eds-tree-list-item.ts",
|
|
103738
103738
|
"coverageIgnore": false,
|
|
103739
103739
|
"deprecated": false,
|
|
103740
103740
|
"deprecationMessage": "",
|
|
@@ -106357,7 +106357,7 @@
|
|
|
106357
106357
|
"ctype": "miscellaneous",
|
|
106358
106358
|
"subtype": "typealias",
|
|
106359
106359
|
"coverageIgnore": false,
|
|
106360
|
-
"rawtype": "\"
|
|
106360
|
+
"rawtype": "\"neutral\" | \"success\" | \"info\" | \"warning\" | \"critical\"",
|
|
106361
106361
|
"file": "packages/eds/eds-badge/eds-badge.ts",
|
|
106362
106362
|
"deprecated": false,
|
|
106363
106363
|
"deprecationMessage": "",
|
package/docs/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# eui documentation
|
|
2
2
|
|
|
3
|
-
> Generated by compodoc 2.0.0 at 2026-10-
|
|
3
|
+
> Generated by compodoc 2.0.0 at 2026-10-26T19:10:31.079Z, llm-md export.
|
|
4
4
|
|
|
5
5
|
## Components
|
|
6
6
|
|
|
@@ -6484,7 +6484,7 @@ Properties:
|
|
|
6484
6484
|
- `type EdsAutocompleteMatching = "contains" | "startWith"` — Matching strategy for filtering options.
|
|
6485
6485
|
- `type EdsAutocompleteSortOrder = "ASC" | "DESC"` — Sort order used for chips and dropdown items.
|
|
6486
6486
|
- `type EdsAvatarSize = "2xs" | "xs" | "s" | "m" | "l" | "xl"` — Local narrowed size union — the avatar's size contract.
|
|
6487
|
-
- `type EdsBadgeColor = "
|
|
6487
|
+
- `type EdsBadgeColor = "neutral" | "success" | "info" | "warning" | "critical"` — Local narrowed unions — the badge's variant contract. No shared-token import.
|
|
6488
6488
|
- `type EdsBadgeSize = "xs" | "s" | "m" | "l"`
|
|
6489
6489
|
- `type EdsBadgeVariant = "filled" | "light"`
|
|
6490
6490
|
- `type EdsBannerFontColor = "light" | "dark"`
|
|
@@ -979,7 +979,7 @@ and is forwarded as-is to the internal <code>eds-icon-state</code> status icon.<
|
|
|
979
979
|
</tr>
|
|
980
980
|
<tr>
|
|
981
981
|
<td class="col-md-4">
|
|
982
|
-
<code> <code>"
|
|
982
|
+
<code> <code>"neutral" | "success" | "info" | "warning" | "critical"</code>
|
|
983
983
|
</code>
|
|
984
984
|
</td>
|
|
985
985
|
</tr>
|
package/docs/properties.html
CHANGED
|
@@ -133,7 +133,7 @@ class EdsBadge {
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsBadge, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
136
|
-
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 }, 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": "isIconOnly() || 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-size: var(--_eds-badge-size-inherit, calc(var(--eds-sp-m) + var(--eds-sp-3xs)));--_eds-badge-empty-size: var(--_eds-badge-empty-size-inherit, var(--eds-sp-s));--_eds-badge-icon-size: var(--_eds-badge-icon-size-inherit, var(--eds-is-xs));--_eds-badge-padding: 0 var(--eds-sp-3xs);--_eds-badge-border-radius: var(--eds-br-full);--_eds-badge-font: var(--eds-f-microcopy-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-surface: var(--eds-c-surface-neutral);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral);--_eds-badge-border-color: transparent;display:inline-flex;border-radius:var(--_eds-badge-border-radius);background-color:var(--_eds-badge-surface);--_eds-icon-color-inherit: var(--_eds-badge-on-surface);--_eds-icon-size-inherit: var(--_eds-badge-icon-size)}:host .eds-badge__wrapper{display:inline-flex;align-items:center;justify-content:center;color:var(--_eds-badge-on-surface);height:var(--_eds-badge-size);min-width:var(--_eds-badge-size);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=
|
|
136
|
+
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 }, 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": "isIconOnly() || 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-size: var(--_eds-badge-size-inherit, calc(var(--eds-sp-m) + var(--eds-sp-3xs)));--_eds-badge-empty-size: var(--_eds-badge-empty-size-inherit, var(--eds-sp-s));--_eds-badge-icon-size: var(--_eds-badge-icon-size-inherit, var(--eds-is-xs));--_eds-badge-padding: 0 var(--eds-sp-3xs);--_eds-badge-border-radius: var(--eds-br-full);--_eds-badge-font: var(--eds-f-microcopy-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-surface: var(--eds-c-surface-neutral);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral);--_eds-badge-border-color: transparent;display:inline-flex;border-radius:var(--_eds-badge-border-radius);border:var(--eds-bw-xs) solid var(--_eds-badge-border-color);background-color:var(--_eds-badge-surface);--_eds-icon-color-inherit: var(--_eds-badge-on-surface);--_eds-icon-size-inherit: var(--_eds-badge-icon-size)}:host .eds-badge__wrapper{display:inline-flex;align-items:center;justify-content:center;color:var(--_eds-badge-on-surface);height:var(--_eds-badge-size);min-width:var(--_eds-badge-size);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=neutral]){--_eds-badge-surface: var(--eds-c-surface-neutral);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral)}:host([color=success]){--_eds-badge-surface: var(--eds-c-surface-success);--_eds-badge-on-surface: var(--eds-c-on-surface-success)}:host([color=info]){--_eds-badge-surface: var(--eds-c-surface-info);--_eds-badge-on-surface: var(--eds-c-on-surface-info)}:host([color=warning]){--_eds-badge-surface: var(--eds-c-surface-warning);--_eds-badge-on-surface: var(--eds-c-on-surface-warning)}:host([color=critical]){--_eds-badge-surface: var(--eds-c-surface-critical);--_eds-badge-on-surface: var(--eds-c-on-surface-critical)}:host([variant=light][color=neutral]){--_eds-badge-surface: var(--eds-c-surface-elevation-sunken);--_eds-badge-on-surface: var(--eds-c-foreground-subtle);--_eds-badge-border-color: var(--eds-c-border-divider)}: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-size: 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-size: 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-size: 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-size);min-width:var(--_eds-badge-size)}.eds-icon :host{position:absolute;top:0;right:0;transform:translate(40%,-25%)}\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
137
|
}
|
|
138
138
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsBadge, decorators: [{
|
|
139
139
|
type: Component,
|
|
@@ -146,7 +146,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
|
|
|
146
146
|
'[attr.empty]': 'isEmpty() || null',
|
|
147
147
|
'[attr.data-e2e]': 'e2eAttr()',
|
|
148
148
|
'[attr.aria-label]': 'ariaLabel()',
|
|
149
|
-
}, 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-size: var(--_eds-badge-size-inherit, calc(var(--eds-sp-m) + var(--eds-sp-3xs)));--_eds-badge-empty-size: var(--_eds-badge-empty-size-inherit, var(--eds-sp-s));--_eds-badge-icon-size: var(--_eds-badge-icon-size-inherit, var(--eds-is-xs));--_eds-badge-padding: 0 var(--eds-sp-3xs);--_eds-badge-border-radius: var(--eds-br-full);--_eds-badge-font: var(--eds-f-microcopy-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-surface: var(--eds-c-surface-neutral);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral);--_eds-badge-border-color: transparent;display:inline-flex;border-radius:var(--_eds-badge-border-radius);background-color:var(--_eds-badge-surface);--_eds-icon-color-inherit: var(--_eds-badge-on-surface);--_eds-icon-size-inherit: var(--_eds-badge-icon-size)}:host .eds-badge__wrapper{display:inline-flex;align-items:center;justify-content:center;color:var(--_eds-badge-on-surface);height:var(--_eds-badge-size);min-width:var(--_eds-badge-size);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=
|
|
149
|
+
}, 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-size: var(--_eds-badge-size-inherit, calc(var(--eds-sp-m) + var(--eds-sp-3xs)));--_eds-badge-empty-size: var(--_eds-badge-empty-size-inherit, var(--eds-sp-s));--_eds-badge-icon-size: var(--_eds-badge-icon-size-inherit, var(--eds-is-xs));--_eds-badge-padding: 0 var(--eds-sp-3xs);--_eds-badge-border-radius: var(--eds-br-full);--_eds-badge-font: var(--eds-f-microcopy-m);--_eds-badge-font-weight: var(--eds-f-w-regular);--_eds-badge-surface: var(--eds-c-surface-neutral);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral);--_eds-badge-border-color: transparent;display:inline-flex;border-radius:var(--_eds-badge-border-radius);border:var(--eds-bw-xs) solid var(--_eds-badge-border-color);background-color:var(--_eds-badge-surface);--_eds-icon-color-inherit: var(--_eds-badge-on-surface);--_eds-icon-size-inherit: var(--_eds-badge-icon-size)}:host .eds-badge__wrapper{display:inline-flex;align-items:center;justify-content:center;color:var(--_eds-badge-on-surface);height:var(--_eds-badge-size);min-width:var(--_eds-badge-size);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=neutral]){--_eds-badge-surface: var(--eds-c-surface-neutral);--_eds-badge-on-surface: var(--eds-c-on-surface-neutral)}:host([color=success]){--_eds-badge-surface: var(--eds-c-surface-success);--_eds-badge-on-surface: var(--eds-c-on-surface-success)}:host([color=info]){--_eds-badge-surface: var(--eds-c-surface-info);--_eds-badge-on-surface: var(--eds-c-on-surface-info)}:host([color=warning]){--_eds-badge-surface: var(--eds-c-surface-warning);--_eds-badge-on-surface: var(--eds-c-on-surface-warning)}:host([color=critical]){--_eds-badge-surface: var(--eds-c-surface-critical);--_eds-badge-on-surface: var(--eds-c-on-surface-critical)}:host([variant=light][color=neutral]){--_eds-badge-surface: var(--eds-c-surface-elevation-sunken);--_eds-badge-on-surface: var(--eds-c-foreground-subtle);--_eds-badge-border-color: var(--eds-c-border-divider)}: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-size: 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-size: 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-size: 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-size);min-width:var(--_eds-badge-size)}.eds-icon :host{position:absolute;top:0;right:0;transform:translate(40%,-25%)}\n"] }]
|
|
150
150
|
}], 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 }] }], 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 }] }] } });
|
|
151
151
|
|
|
152
152
|
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 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 * (dot) state, and an auto-detected icon-only mode when the sole projected content is\n * a single icon.\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]': 'isIconOnly() || 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 * 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 /**\n * Whether the sole projected content is a single icon (drives the circular,\n * padless icon-only state). Auto-detected from the projected content — not an input.\n */\n protected readonly isIconOnly = 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._evaluateContent(content.nativeElement);\n }\n });\n }\n\n /**\n * Handles projected content changes and re-evaluates the empty / icon-only /\n * truncation states.\n */\n onContentChanged(): void {\n const content = this.content();\n if (content) {\n this._evaluateContent(content.nativeElement);\n }\n }\n\n /**\n * Derives the empty and icon-only states from the projected content, then\n * re-evaluates truncation when there is content.\n */\n private _evaluateContent(el: HTMLElement): void {\n this.isEmpty.set(el.childNodes.length === 0);\n this.isIconOnly.set(this._isIconOnlyContent(el));\n if (!this.isEmpty()) {\n this._checkContent();\n }\n }\n\n /**\n * Whether the only meaningful projected content is a single icon element\n * (an `eds-icon` / `[edsIcon]`), with no accompanying text.\n */\n private _isIconOnlyContent(el: HTMLElement): boolean {\n const meaningful = Array.from(el.childNodes).filter(\n (node) =>\n node.nodeType === Node.ELEMENT_NODE ||\n (node.nodeType === Node.TEXT_NODE && !!node.textContent?.trim()),\n );\n if (meaningful.length !== 1 || meaningful[0].nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n const element = meaningful[0] as HTMLElement;\n return element.tagName.toLowerCase() === 'eds-icon' || element.hasAttribute('edsIcon');\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":";;;;;AAoBA;;;;;;AAMG;MAkBU,QAAQ,CAAA;AAsEjB,IAAA,WAAA,GAAA;AArEA;;;;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;;;;;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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ds-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 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 = '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 * (dot) state, and an auto-detected icon-only mode when the sole projected content is\n * a single icon.\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]': 'isIconOnly() || 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 * 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 /**\n * Whether the sole projected content is a single icon (drives the circular,\n * padless icon-only state). Auto-detected from the projected content — not an input.\n */\n protected readonly isIconOnly = 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._evaluateContent(content.nativeElement);\n }\n });\n }\n\n /**\n * Handles projected content changes and re-evaluates the empty / icon-only /\n * truncation states.\n */\n onContentChanged(): void {\n const content = this.content();\n if (content) {\n this._evaluateContent(content.nativeElement);\n }\n }\n\n /**\n * Derives the empty and icon-only states from the projected content, then\n * re-evaluates truncation when there is content.\n */\n private _evaluateContent(el: HTMLElement): void {\n this.isEmpty.set(el.childNodes.length === 0);\n this.isIconOnly.set(this._isIconOnlyContent(el));\n if (!this.isEmpty()) {\n this._checkContent();\n }\n }\n\n /**\n * Whether the only meaningful projected content is a single icon element\n * (an `eds-icon` / `[edsIcon]`), with no accompanying text.\n */\n private _isIconOnlyContent(el: HTMLElement): boolean {\n const meaningful = Array.from(el.childNodes).filter(\n (node) =>\n node.nodeType === Node.ELEMENT_NODE ||\n (node.nodeType === Node.TEXT_NODE && !!node.textContent?.trim()),\n );\n if (meaningful.length !== 1 || meaningful[0].nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n const element = meaningful[0] as HTMLElement;\n return element.tagName.toLowerCase() === 'eds-icon' || element.hasAttribute('edsIcon');\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":";;;;;AAoBA;;;;;;AAMG;MAkBU,QAAQ,CAAA;AAsEjB,IAAA,WAAA,GAAA;AArEA;;;;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;;;;;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;A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EAAA,CAAA,2sHAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDuBc,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,sBAAsB;AAC1C,wBAAA,cAAc,EAAE,mBAAmB;AACnC,wBAAA,iBAAiB,EAAE,WAAW;AAC9B,wBAAA,mBAAmB,EAAE,aAAa;AACrC,qBAAA,EAAA,QAAA,EAAA,mRAAA,EAAA,MAAA,EAAA,CAAA,2sHAAA,CAAA,EAAA;qwBAuD+D,YAAY,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE7FzE,MAAM,SAAS,GAAG;IACrB,QAAQ;;;ACLZ;;AAEG;;"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { ElementRef } from '@angular/core';
|
|
|
4
4
|
/**
|
|
5
5
|
* Local narrowed unions — the badge's variant contract. No shared-token import.
|
|
6
6
|
*/
|
|
7
|
-
type EdsBadgeColor = '
|
|
7
|
+
type EdsBadgeColor = 'neutral' | 'success' | 'info' | 'warning' | 'critical';
|
|
8
8
|
type EdsBadgeVariant = 'filled' | 'light';
|
|
9
9
|
type EdsBadgeSize = 'xs' | 's' | 'm' | 'l';
|
|
10
10
|
/**
|