@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.
- package/docs/changelog.html +13 -0
- package/docs/components/EdsInputButton.html +28 -3
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/EdsInputButton.md +13 -2
- package/docs/json/documentation.json +109 -23
- package/docs/llms.txt +2 -2
- package/docs/properties.html +1 -1
- package/fesm2022/eui-eds-eds-avatar.mjs +6 -6
- package/fesm2022/eui-eds-eds-avatar.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-badge.mjs +2 -2
- package/fesm2022/eui-eds-eds-badge.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-input-button.mjs +128 -6
- package/fesm2022/eui-eds-eds-input-button.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eui-eds-eds-input-button.d.ts +52 -2
- package/types/eui-eds-eds-input-button.d.ts.map +1 -1
|
@@ -24,9 +24,20 @@ commonly used for search inputs, password visibility toggles, or clear actions.
|
|
|
24
24
|
</eds-input-button>
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
### Focus model (roving tabindex)
|
|
28
|
+
- `Tab` moves focus directly onto the input field (the primary control); the
|
|
29
|
+
focus ring covers the whole host (the group). `Tab` again leaves the group.
|
|
30
|
+
- `ArrowLeft` / `ArrowRight` rove focus between the group's controls in visual
|
|
31
|
+
order — the input, the clearable "✕" icon (when present), and the button —
|
|
32
|
+
wrapping at the ends; `Home` / `End` jump to the first / last control.
|
|
33
|
+
- Only the active control is in the tab order, so `Tab` leaves the group from
|
|
34
|
+
wherever focus currently is. Focusing a child directly (click) adopts it as
|
|
35
|
+
the active roving target.
|
|
36
|
+
|
|
27
37
|
### Accessibility
|
|
28
|
-
-
|
|
29
|
-
-
|
|
38
|
+
- Single tab stop with arrow-key navigation between the controls
|
|
39
|
+
- The clearable icon participates in the arrow-key cycle when it is shown
|
|
40
|
+
- Ensure button has a descriptive label or aria-label
|
|
30
41
|
- Tab order follows visual layout
|
|
31
42
|
|
|
32
43
|
### Notes
|
|
@@ -26515,7 +26515,7 @@
|
|
|
26515
26515
|
"assetsDirs": [],
|
|
26516
26516
|
"styleUrlsData": [
|
|
26517
26517
|
{
|
|
26518
|
-
"data": "@use '../base' as base;\n\n:host {\n // surface channels consumed by projected sub-components (icon/text)\n --_surface: var(--eds-c-surface-neutral-subtler);\n --_on-surface: var(--eds-c-on-surface-neutral-subtler);\n\n // default size = m\n --_size: var(--eds-si-4xl);\n --_icon-size: var(--eds-is-m);\n --_font-size: var(--eds-f-s-xl);\n\n display: inline-flex;\n position: relative;\n align-items: center;\n gap: var(--eds-sp-s);\n border-radius: var(--eds-br-full);\n\n .eds-avatar-wrapper {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--eds-br-full);\n background-color: var(--_surface);\n color: var(--_on-surface);\n height: var(--_size);\n width: var(--_size);\n position: relative;\n }\n}\n\n// SIZE VARIANTS\n// -------------\n\n:host([size=\"2xs\"]) {\n --_size: var(--eds-si-m);\n --_icon-size: var(--eds-is-2xs);\n --_font-size: var(--eds-f-s-xs);\n}\n:host([size=\"xs\"]) {\n --_size: var(--eds-si-xl);\n --_icon-size: var(--eds-is-xs);\n --_font-size: var(--eds-f-s-s);\n}\n:host([size=\"s\"]) {\n --_size: var(--eds-si-3xl);\n --_icon-size: var(--eds-is-s);\n --_font-size: var(--eds-f-s-l);\n}\n:host([size=\"m\"]) {\n --_size: var(--eds-si-4xl);\n --_icon-size: var(--eds-is-m
|
|
26518
|
+
"data": "@use '../base' as base;\n\n:host {\n // surface channels consumed by projected sub-components (icon/text)\n --_surface: var(--eds-c-surface-neutral-subtler);\n --_on-surface: var(--eds-c-on-surface-neutral-subtler);\n\n // default size = m\n --_size: var(--eds-si-4xl);\n --_icon-size: var(--eds-is-m);\n --_font-size: var(--eds-f-s-xl);\n\n // Status-badge channels — set on the avatar host and INHERITED (no ::ng-deep) down\n // to the projected eds-avatar-badge > eds-badge > eds-icon, which consume them in\n // their own stylesheets (eds-badge.scss `:host-context(.eds-avatar)`). Defaults =\n // size m; each size variant below overrides them.\n --_eds-avatar-badge-size: var(--eds-sp-m); //EDS aligned 16px badge Ø\n --_eds-avatar-badge-icon-size: var(--eds-is-2xs); //EDS aligned 12px icon\n --_eds-avatar-badge-ring-width: var(--eds-bw-s); // inverted ring around the badge\n // When the projected badge is empty (dot indicator), eds-badge sizes itself from\n // its own `--_eds-badge-empty-size`; feed it the avatar's badge diameter (inherited)\n // so a dot badge matches the per-size footprint without ::ng-deep.\n --_eds-badge-empty-size: var(--_eds-avatar-badge-size);\n\n display: inline-flex;\n position: relative;\n align-items: center;\n gap: var(--eds-sp-s);\n outline: var(--eds-bw-s) solid var(--eds-c-border-inverted);\n outline-offset: -1px;\n border-radius: var(--eds-br-full);\n\n //For debug only!\n // outline: 1px solid red; outline-offset: 0; border-radius: 0;\n\n .eds-avatar-wrapper {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--eds-br-full);\n background-color: var(--_surface);\n color: var(--_on-surface);\n height: var(--_size);\n width: var(--_size);\n position: relative;\n }\n\n // STATUS BADGE — always anchored to the bottom-right of the avatar (see\n // eds-avatar-badge.scss for positioning). Sizing / centering / icon-scaling of the\n // projected eds-badge live in eds-badge.scss under `:host-context(.eds-avatar)`,\n // driven by the inherited `--_eds-avatar-badge-*` channels above — NO ::ng-deep.\n}\n\n// SIZE VARIANTS\n// -------------\n\n:host([size=\"2xs\"]) {\n --_size: var(--eds-si-m);\n --_icon-size: var(--eds-is-2xs);\n --_font-size: var(--eds-f-s-xs);\n // 16px avatar → dot-only badge, no inner icon.\n --_eds-avatar-badge-size: var(--eds-sp-xs); //EDS aligned 8px dot\n\n}\n:host([size=\"xs\"]) {\n --_size: var(--eds-si-xl);\n --_icon-size: var(--eds-is-xs);\n --_font-size: var(--eds-f-s-s);\n // 24px avatar → dot-only badge, no inner icon.\n --_eds-avatar-badge-size: var(--eds-sp-xs); //EDS aligned 8px dot\n}\n:host([size=\"s\"]) {\n --_size: var(--eds-si-3xl);\n --_icon-size: var(--eds-is-s);\n --_font-size: var(--eds-f-s-l);\n --_eds-avatar-badge-size: var(--eds-sp-s); //EDS aligned 12px badge Ø\n --_eds-avatar-badge-icon-size: var(--eds-is-3xs); //EDS aligned 8px icon\n}\n:host([size=\"m\"]) {\n --_size: var(--eds-si-4xl);\n --_icon-size: var(--eds-is-s); //m\n --_font-size: var(--eds-f-s-xl);\n --_eds-avatar-badge-size: var(--eds-sp-m); //EDS aligned 16px badge Ø\n --_eds-avatar-badge-icon-size: var(--eds-is-2xs); //EDS aligned 12px icon\n}\n:host([size=\"l\"]) {\n --_size: var(--eds-si-6xl);\n --_icon-size: var(--eds-is-l);\n --_font-size: var(--eds-f-s-2xl);\n --_eds-avatar-badge-size: var(--eds-sp-l); //EDS aligned 20px badge Ø\n --_eds-avatar-badge-icon-size: var(--eds-is-2xs); //EDS aligned 12px icon\n}\n:host([size=\"xl\"]) {\n --_size: var(--eds-si-9xl);\n --_icon-size: var(--eds-is-xl);\n --_font-size: var(--eds-f-s-4xl);\n --_eds-avatar-badge-size: var(--eds-sp-xl); // EDS aligned\n --_eds-avatar-badge-icon-size: var(--eds-is-xs); //EDS aligned 16px icon\n}\n\n// DOT-ONLY sizes (2xs, xs): render a bare colored dot. The avatar flags the dot mode\n// and collapses the status icon purely through INHERITED custom properties (no\n// ::ng-deep); eds-badge.scss `:host-context(.eds-avatar)` reads these channels.\n:host([size=\"2xs\"]),\n:host([size=\"xs\"]) {\n // thinner inverted ring so the small dot stays legible\n --_eds-avatar-badge-ring-width: var(--eds-bw-xs);\n // collapse any projected status icon to 0 → effectively a bare colored dot\n --_eds-avatar-badge-icon-size: 0px;\n}\n\n// COLOR PALETTE VARIANTS\n// ----------------------\n\n@each $color in base.$color-cm-map {\n :host([color=\"#{$color}\"]) {\n --_surface: var(--eds-c-surface-#{$color}-subtler);\n --_on-surface: var(--eds-c-on-surface-#{$color}-subtler);\n }\n}\n",
|
|
26519
26519
|
"styleUrl": "./eds-avatar.scss"
|
|
26520
26520
|
}
|
|
26521
26521
|
],
|
|
@@ -26603,7 +26603,7 @@
|
|
|
26603
26603
|
"assetsDirs": [],
|
|
26604
26604
|
"styleUrlsData": [
|
|
26605
26605
|
{
|
|
26606
|
-
"data": "
|
|
26606
|
+
"data": "// eds-avatar-badge is a thin positioning wrapper for a projected status badge.\n// It is always anchored to the bottom-right of the avatar; the exact offset and the\n// badge/icon scaling per avatar size are driven by the parent eds-avatar (see\n// eds-avatar.scss, keyed off the avatar's reflected `size` attribute) so the badge\n// stays correct regardless of the size passed to the inner eds-badge.\n:host {\n position: absolute;\n right: 0;\n bottom: 0;\n display: inline-flex;\n}\n",
|
|
26607
26607
|
"styleUrl": "./eds-avatar-badge.scss"
|
|
26608
26608
|
}
|
|
26609
26609
|
],
|
|
@@ -26913,7 +26913,7 @@
|
|
|
26913
26913
|
"assetsDirs": [],
|
|
26914
26914
|
"styleUrlsData": [
|
|
26915
26915
|
{
|
|
26916
|
-
"data": ".eds-avatar {\n :host.eds-avatar-image {\n .eds-avatar-image-wrapper {\n background-size: cover;\n height: var(--_size);\n width: var(--_size);\n\n img {\n border-radius: var(--eds-br-full);\n height: var(--_size);\n width: var(--_size);\n }\n }\n\n
|
|
26916
|
+
"data": ".eds-avatar {\n :host.eds-avatar-image {\n .eds-avatar-image-wrapper {\n display: flex;\n background-size: cover;\n height: var(--_size);\n width: var(--_size);\n\n img {\n border-radius: var(--eds-br-full);\n height: var(--_size);\n width: var(--_size);\n }\n }\n\n // Fallback user icon (shown when no imageUrl) fills the whole avatar circle.\n // Drive the projected eds-icon through its inherited `--_icon-size` channel so\n // it renders at the avatar diameter — no ::ng-deep needed to reach the svg.\n --_icon-size: var(--_size);\n }\n\n :host.eds-avatar-image[default] {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n",
|
|
26917
26917
|
"styleUrl": "./eds-avatar-image.scss"
|
|
26918
26918
|
}
|
|
26919
26919
|
],
|
|
@@ -27442,7 +27442,7 @@
|
|
|
27442
27442
|
"assetsDirs": [],
|
|
27443
27443
|
"styleUrlsData": [
|
|
27444
27444
|
{
|
|
27445
|
-
"data": "@use '../base' as base;\n\n:host {\n // Common defaults\n --_eds-badge-padding: 0 var(--eds-sp-3xs);\n --_eds-badge-border-radius: var(--eds-br-full);\n --_eds-badge-border-width: var(--eds-bw-xs);\n --_eds-badge-font: var(--eds-f-microcopy-m);\n --_eds-badge-font-weight: var(--eds-f-w-regular);\n --_eds-badge-height: calc(var(--eds-sp-m) + var(--eds-sp-3xs));\n --_eds-badge-min-width: calc(var(--eds-sp-m) + var(--eds-sp-3xs));\n --_eds-badge-empty-size: var(--eds-sp-s);\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: var(--eds-c-border-neutral-subtle);\n\n display: inline-flex;\n border: var(--_eds-badge-border-width) solid var(--_eds-badge-border-color);\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-on-surface: var(--_eds-badge-on-surface);\n\n // Reset the icon-size channel so a value inherited from a composing ancestor\n // (e.g. eds-avatar sets `--_icon-size` for its own slot) does NOT leak into the\n // badge's projected icon; the icon falls back to its own `size` attribute.\n --_icon-size: initial;\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-height);\n min-width: var(--_eds-badge-min-width);\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=\"primary\"]) {\n --_eds-badge-surface: var(--eds-c-surface-primary);\n --_eds-badge-on-surface: var(--eds-c-on-surface-primary);\n --_eds-badge-border-color: var(--eds-c-border-primary-subtle);\n}\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 --_eds-badge-border-color: var(--eds-c-border-neutral-subtle);\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 --_eds-badge-border-color: var(--eds-c-border-success-subtle);\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 --_eds-badge-border-color: var(--eds-c-border-info-subtle);\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 --_eds-badge-border-color: var(--eds-c-border-warning-subtle);\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 --_eds-badge-border-color: var(--eds-c-border-critical-subtle);\n}\n\n// VARIANT — light: subtle semantic surface with a matching subtler foreground\n:host([variant=\"light\"][color=\"primary\"]) {\n --_eds-badge-surface: var(--eds-c-surface-primary-subtler);\n --_eds-badge-on-surface: var(--eds-c-on-surface-primary-subtler);\n --_eds-badge-border-color: var(--eds-c-border-primary-subtler);\n}\n:host([variant=\"light\"][color=\"neutral\"]) {\n --_eds-badge-surface: var(--eds-c-surface-neutral-subtler);\n --_eds-badge-on-surface: var(--eds-c-on-surface-neutral-subtler);\n --_eds-badge-border-color: var(--eds-c-border-neutral-subtler);\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-height: var(--eds-sp-s);\n --_eds-badge-min-width: 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-height: var(--eds-sp-m);\n --_eds-badge-min-width: 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-height: calc(var(--eds-sp-m) + var(--eds-sp-2xs));\n --_eds-badge-min-width: 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 — circular indicator holding a single small icon, no wrapper padding\n:host([icon-only]) {\n .eds-badge__wrapper {\n padding: 0;\n width: var(--_eds-badge-height);\n min-width: var(--_eds-badge-height);\n }\n}\n\n// CONTEXTUAL POSITIONING — badge projected inside icon / icon-button / avatar\n// ---------------------------------------------------------------------------\n// The badge is content-projected into another component's host, so it must react\n// to that ancestor via :host-context() (the ancestor lives in a different\n// encapsulation scope; a plain descendant selector would not match).\n\n// icon > badge\n:host-context(.eds-icon) {\n position: absolute;\n left: 60%;\n top: -20%;\n}\n\n:host([empty]):host-context(.eds-icon) {\n left: 60%;\n top: -10%;\n}\n\n:host([size=\"xs\"][empty]):host-context(.eds-icon) {\n left: 70%;\n top: -10%;\n}\n\n// icon-button (per size) > icon > badge\n:host-context(.eds-icon-button[size=\"2xs\"]) {\n left: 50%;\n top: -30%;\n}\n\n:host-context(.eds-icon-button[size=\"xs\"]) {\n left: 50%;\n top: -40%;\n}\n\n:host-context(.eds-icon-button[size=\"s\"]) {\n left: 50%;\n top: -50%;\n}\n\n:host-context(.eds-icon-button[size=\"m\"]) {\n left: 50%;\n top: -40%;\n}\n\n:host-context(.eds-icon-button[size=\"l\"]) {\n left: 50%;\n top: -25%;\n}\n\n// avatar > badge\n:host-context(.eds-avatar) {\n border: var(--eds-bw-s) solid var(--eds-c-border-inverted);\n}\n",
|
|
27445
|
+
"data": "@use '../base' as base;\n\n:host {\n // Common defaults\n --_eds-badge-padding: 0 var(--eds-sp-3xs);\n --_eds-badge-border-radius: var(--eds-br-full);\n --_eds-badge-border-width: var(--eds-bw-xs);\n --_eds-badge-font: var(--eds-f-microcopy-m);\n --_eds-badge-font-weight: var(--eds-f-w-regular);\n --_eds-badge-height: calc(var(--eds-sp-m) + var(--eds-sp-3xs));\n --_eds-badge-min-width: calc(var(--eds-sp-m) + var(--eds-sp-3xs));\n --_eds-badge-empty-size: var(--eds-sp-s);\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: var(--eds-c-border-neutral-subtle);\n\n display: inline-flex;\n border: var(--_eds-badge-border-width) solid var(--_eds-badge-border-color);\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-on-surface: var(--_eds-badge-on-surface);\n\n // Reset the icon-size channel so a value inherited from a composing ancestor\n // (e.g. eds-avatar sets `--_icon-size` for its own slot) does NOT leak into the\n // badge's projected icon; the icon falls back to its own `size` attribute.\n --_icon-size: initial;\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-height);\n min-width: var(--_eds-badge-min-width);\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=\"primary\"]) {\n --_eds-badge-surface: var(--eds-c-surface-primary);\n --_eds-badge-on-surface: var(--eds-c-on-surface-primary);\n --_eds-badge-border-color: var(--eds-c-border-primary-subtle);\n}\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 --_eds-badge-border-color: var(--eds-c-border-neutral-subtle);\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 --_eds-badge-border-color: var(--eds-c-border-success-subtle);\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 --_eds-badge-border-color: var(--eds-c-border-info-subtle);\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 --_eds-badge-border-color: var(--eds-c-border-warning-subtle);\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 --_eds-badge-border-color: var(--eds-c-border-critical-subtle);\n}\n\n// VARIANT — light: subtle semantic surface with a matching subtler foreground\n:host([variant=\"light\"][color=\"primary\"]) {\n --_eds-badge-surface: var(--eds-c-surface-primary-subtler);\n --_eds-badge-on-surface: var(--eds-c-on-surface-primary-subtler);\n --_eds-badge-border-color: var(--eds-c-border-primary-subtler);\n}\n:host([variant=\"light\"][color=\"neutral\"]) {\n --_eds-badge-surface: var(--eds-c-surface-neutral-subtler);\n --_eds-badge-on-surface: var(--eds-c-on-surface-neutral-subtler);\n --_eds-badge-border-color: var(--eds-c-border-neutral-subtler);\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-height: var(--eds-sp-s);\n --_eds-badge-min-width: 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-height: var(--eds-sp-m);\n --_eds-badge-min-width: 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-height: calc(var(--eds-sp-m) + var(--eds-sp-2xs));\n --_eds-badge-min-width: 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 — circular indicator holding a single small icon, no wrapper padding\n:host([icon-only]) {\n .eds-badge__wrapper {\n padding: 0;\n width: var(--_eds-badge-height);\n min-width: var(--_eds-badge-height);\n }\n}\n\n// CONTEXTUAL POSITIONING — badge projected inside icon / icon-button / avatar\n// ---------------------------------------------------------------------------\n// The badge is content-projected into another component's host, so it must react\n// to that ancestor via :host-context() (the ancestor lives in a different\n// encapsulation scope; a plain descendant selector would not match).\n\n// icon > badge\n:host-context(.eds-icon) {\n position: absolute;\n left: 60%;\n top: -20%;\n}\n\n:host([empty]):host-context(.eds-icon) {\n left: 60%;\n top: -10%;\n}\n\n:host([size=\"xs\"][empty]):host-context(.eds-icon) {\n left: 70%;\n top: -10%;\n}\n\n// icon-button (per size) > icon > badge\n:host-context(.eds-icon-button[size=\"2xs\"]) {\n left: 50%;\n top: -30%;\n}\n\n:host-context(.eds-icon-button[size=\"xs\"]) {\n left: 50%;\n top: -40%;\n}\n\n:host-context(.eds-icon-button[size=\"s\"]) {\n left: 50%;\n top: -50%;\n}\n\n:host-context(.eds-icon-button[size=\"m\"]) {\n left: 50%;\n top: -40%;\n}\n\n:host-context(.eds-icon-button[size=\"l\"]) {\n left: 50%;\n top: -25%;\n}\n\n// avatar > badge\n// Sizing / centering / icon-scaling of a badge projected into an avatar is driven by\n// the avatar via INHERITED custom properties (--_eds-avatar-badge-*), consumed here so\n// the avatar needs no ::ng-deep to reach this projected badge.\n:host-context(.eds-avatar) {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--_eds-avatar-badge-size);\n min-width: var(--_eds-avatar-badge-size);\n height: var(--_eds-avatar-badge-size);\n padding: 0;\n border: var(--_eds-avatar-badge-ring-width, var(--eds-bw-s)) solid var(--eds-c-border-inverted);\n\n // Scale the projected status icon with the avatar size. eds-icon reads the\n // inherited `--_icon-size` channel (which eds-badge otherwise resets to `initial`);\n // this higher-specificity rule re-feeds it from the avatar's icon-size channel.\n --_icon-size: var(--_eds-avatar-badge-icon-size);\n\n .eds-badge__wrapper {\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n justify-content: center;\n width: 100%;\n min-width: 0;\n height: 100%;\n padding: 0;\n line-height: 0;\n }\n}\n",
|
|
27446
27446
|
"styleUrl": "./eds-badge.scss"
|
|
27447
27447
|
}
|
|
27448
27448
|
],
|
|
@@ -59776,7 +59776,7 @@
|
|
|
59776
59776
|
},
|
|
59777
59777
|
{
|
|
59778
59778
|
"name": "EdsInputButton",
|
|
59779
|
-
"id": "component-EdsInputButton-
|
|
59779
|
+
"id": "component-EdsInputButton-045d548163c1eb2f7bee0b8ed1cf9a7827818343809dc7b8071673d1abd2b5443d7260c3abc86b6161166d1e6cba7b170c72ac1704328fd6c08728c3fb7c835a",
|
|
59780
59780
|
"file": "packages/eds/eds-input-button/eds-input-button.ts",
|
|
59781
59781
|
"changeDetection": "ChangeDetectionStrategy.OnPush",
|
|
59782
59782
|
"encapsulation": [],
|
|
@@ -59807,20 +59807,20 @@
|
|
|
59807
59807
|
"indexKey": "",
|
|
59808
59808
|
"optional": false,
|
|
59809
59809
|
"description": "<p>Data attribute value for end-to-end testing identification.\nApplied as data-e2e attribute on the host element.\n'eds-input-button'</p>\n",
|
|
59810
|
-
"line":
|
|
59810
|
+
"line": 79,
|
|
59811
59811
|
"rawdescription": "\n\nData attribute value for end-to-end testing identification.\nApplied as data-e2e attribute on the host element.\n'eds-input-button'\n",
|
|
59812
59812
|
"jsdoctags": [
|
|
59813
59813
|
{
|
|
59814
|
-
"pos":
|
|
59815
|
-
"end":
|
|
59814
|
+
"pos": 2731,
|
|
59815
|
+
"end": 2764,
|
|
59816
59816
|
"kind": 328,
|
|
59817
59817
|
"id": 0,
|
|
59818
59818
|
"flags": 16842752,
|
|
59819
59819
|
"modifierFlagsCache": 0,
|
|
59820
59820
|
"transformFlags": 0,
|
|
59821
59821
|
"tagName": {
|
|
59822
|
-
"pos":
|
|
59823
|
-
"end":
|
|
59822
|
+
"pos": 2732,
|
|
59823
|
+
"end": 2739,
|
|
59824
59824
|
"kind": 80,
|
|
59825
59825
|
"id": 0,
|
|
59826
59826
|
"flags": 16842752,
|
|
@@ -59842,7 +59842,7 @@
|
|
|
59842
59842
|
"indexKey": "",
|
|
59843
59843
|
"optional": false,
|
|
59844
59844
|
"description": "<p>Positions the button at the end (right in LTR, left in RTL) of the input field.\nIgnored when edsButtonPositionStart is true. Defaults to true.</p>\n",
|
|
59845
|
-
"line":
|
|
59845
|
+
"line": 91,
|
|
59846
59846
|
"rawdescription": "\n\nPositions the button at the end (right in LTR, left in RTL) of the input field.\nIgnored when edsButtonPositionStart is true. Defaults to true.\n",
|
|
59847
59847
|
"required": false
|
|
59848
59848
|
},
|
|
@@ -59856,7 +59856,7 @@
|
|
|
59856
59856
|
"indexKey": "",
|
|
59857
59857
|
"optional": false,
|
|
59858
59858
|
"description": "<p>Positions the button at the start (left in LTR, right in RTL) of the input field.\nWhen true, overrides edsButtonPositionEnd. Defaults to false.</p>\n",
|
|
59859
|
-
"line":
|
|
59859
|
+
"line": 85,
|
|
59860
59860
|
"rawdescription": "\n\nPositions the button at the start (left in LTR, right in RTL) of the input field.\nWhen true, overrides edsButtonPositionEnd. Defaults to false.\n",
|
|
59861
59861
|
"required": false
|
|
59862
59862
|
}
|
|
@@ -59873,7 +59873,7 @@
|
|
|
59873
59873
|
"indexKey": "",
|
|
59874
59874
|
"optional": false,
|
|
59875
59875
|
"description": "<p>Resolved button position, reflected as the <code>position</code> host attribute.\n<code>start</code> takes precedence when both inputs are set.</p>\n",
|
|
59876
|
-
"line":
|
|
59876
|
+
"line": 97,
|
|
59877
59877
|
"rawdescription": "\n\nResolved button position, reflected as the `position` host attribute.\n`start` takes precedence when both inputs are set.\n",
|
|
59878
59878
|
"modifierKind": [
|
|
59879
59879
|
124,
|
|
@@ -59881,7 +59881,84 @@
|
|
|
59881
59881
|
]
|
|
59882
59882
|
}
|
|
59883
59883
|
],
|
|
59884
|
-
"methodsClass": [
|
|
59884
|
+
"methodsClass": [
|
|
59885
|
+
{
|
|
59886
|
+
"name": "onFocusIn",
|
|
59887
|
+
"coverageIgnore": false,
|
|
59888
|
+
"args": [
|
|
59889
|
+
{
|
|
59890
|
+
"name": "event",
|
|
59891
|
+
"type": "FocusEvent",
|
|
59892
|
+
"optional": false,
|
|
59893
|
+
"dotDotDotToken": false,
|
|
59894
|
+
"deprecated": false,
|
|
59895
|
+
"deprecationMessage": ""
|
|
59896
|
+
}
|
|
59897
|
+
],
|
|
59898
|
+
"optional": false,
|
|
59899
|
+
"returnType": "void",
|
|
59900
|
+
"typeParameters": [],
|
|
59901
|
+
"line": 163,
|
|
59902
|
+
"deprecated": false,
|
|
59903
|
+
"deprecationMessage": "",
|
|
59904
|
+
"rawdescription": "\n\nTrack focus entering a projected control so the arrow keys continue from\nthe control the user is actually on (e.g. after a click), and keep the\nroving tab stop in sync so a subsequent `Tab` leaves from here.\n",
|
|
59905
|
+
"description": "<p>Track focus entering a projected control so the arrow keys continue from\nthe control the user is actually on (e.g. after a click), and keep the\nroving tab stop in sync so a subsequent <code>Tab</code> leaves from here.</p>\n",
|
|
59906
|
+
"modifierKind": [
|
|
59907
|
+
124
|
|
59908
|
+
],
|
|
59909
|
+
"jsdoctags": [
|
|
59910
|
+
{
|
|
59911
|
+
"name": "event",
|
|
59912
|
+
"type": "FocusEvent",
|
|
59913
|
+
"optional": false,
|
|
59914
|
+
"dotDotDotToken": false,
|
|
59915
|
+
"deprecated": false,
|
|
59916
|
+
"deprecationMessage": "",
|
|
59917
|
+
"tagName": {
|
|
59918
|
+
"text": "param"
|
|
59919
|
+
}
|
|
59920
|
+
}
|
|
59921
|
+
]
|
|
59922
|
+
},
|
|
59923
|
+
{
|
|
59924
|
+
"name": "onKeydown",
|
|
59925
|
+
"coverageIgnore": false,
|
|
59926
|
+
"args": [
|
|
59927
|
+
{
|
|
59928
|
+
"name": "event",
|
|
59929
|
+
"type": "KeyboardEvent",
|
|
59930
|
+
"optional": false,
|
|
59931
|
+
"dotDotDotToken": false,
|
|
59932
|
+
"deprecated": false,
|
|
59933
|
+
"deprecationMessage": ""
|
|
59934
|
+
}
|
|
59935
|
+
],
|
|
59936
|
+
"optional": false,
|
|
59937
|
+
"returnType": "void",
|
|
59938
|
+
"typeParameters": [],
|
|
59939
|
+
"line": 171,
|
|
59940
|
+
"deprecated": false,
|
|
59941
|
+
"deprecationMessage": "",
|
|
59942
|
+
"rawdescription": "\n",
|
|
59943
|
+
"description": "",
|
|
59944
|
+
"modifierKind": [
|
|
59945
|
+
124
|
|
59946
|
+
],
|
|
59947
|
+
"jsdoctags": [
|
|
59948
|
+
{
|
|
59949
|
+
"name": "event",
|
|
59950
|
+
"type": "KeyboardEvent",
|
|
59951
|
+
"optional": false,
|
|
59952
|
+
"dotDotDotToken": false,
|
|
59953
|
+
"deprecated": false,
|
|
59954
|
+
"deprecationMessage": "",
|
|
59955
|
+
"tagName": {
|
|
59956
|
+
"text": "param"
|
|
59957
|
+
}
|
|
59958
|
+
}
|
|
59959
|
+
]
|
|
59960
|
+
}
|
|
59961
|
+
],
|
|
59885
59962
|
"coverageIgnore": false,
|
|
59886
59963
|
"deprecated": false,
|
|
59887
59964
|
"deprecationMessage": "",
|
|
@@ -59889,40 +59966,49 @@
|
|
|
59889
59966
|
"hostListeners": [],
|
|
59890
59967
|
"standalone": false,
|
|
59891
59968
|
"imports": [],
|
|
59892
|
-
"description": "<p>A layout component that positions button elements relative to input fields.\nEnables the creation of input groups with leading or trailing action buttons,\ncommonly used for search inputs, password visibility toggles, or clear actions.</p>\n<h3>Button at end of input (default)</h3>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-html\"><eds-input-button>\n <input edsInputText placeholder="Search..." />\n <button edsButton>Search</button>\n</eds-input-button></code></pre></div><h3>Button at start of input</h3>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-html\"><eds-input-button [edsButtonPositionStart]="true">\n <button edsIconButton icon="filter" ariaLabel="Filter"></button>\n <input edsInputText placeholder="Filter results..." />\n</eds-input-button></code></pre></div><h3>
|
|
59893
|
-
"rawdescription": "\n\nA layout component that positions button elements relative to input fields.\nEnables the creation of input groups with leading or trailing action buttons,\ncommonly used for search inputs, password visibility toggles, or clear actions.\n\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###
|
|
59969
|
+
"description": "<p>A layout component that positions button elements relative to input fields.\nEnables the creation of input groups with leading or trailing action buttons,\ncommonly used for search inputs, password visibility toggles, or clear actions.</p>\n<h3>Button at end of input (default)</h3>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-html\"><eds-input-button>\n <input edsInputText placeholder="Search..." />\n <button edsButton>Search</button>\n</eds-input-button></code></pre></div><h3>Button at start of input</h3>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-html\"><eds-input-button [edsButtonPositionStart]="true">\n <button edsIconButton icon="filter" ariaLabel="Filter"></button>\n <input edsInputText placeholder="Filter results..." />\n</eds-input-button></code></pre></div><h3>Focus model (roving tabindex)</h3>\n<ul>\n<li><code>Tab</code> moves focus directly onto the input field (the primary control); the\nfocus ring covers the whole host (the group). <code>Tab</code> again leaves the group.</li>\n<li><code>ArrowLeft</code> / <code>ArrowRight</code> rove focus between the group's controls in visual\norder — the input, the clearable "✕" icon (when present), and the button —\nwrapping at the ends; <code>Home</code> / <code>End</code> jump to the first / last control.</li>\n<li>Only the active control is in the tab order, so <code>Tab</code> leaves the group from\nwherever focus currently is. Focusing a child directly (click) adopts it as\nthe active roving target.</li>\n</ul>\n<h3>Accessibility</h3>\n<ul>\n<li>Single tab stop with arrow-key navigation between the controls</li>\n<li>The clearable icon participates in the arrow-key cycle when it is shown</li>\n<li>Ensure button has a descriptive label or aria-label</li>\n<li>Tab order follows visual layout</li>\n</ul>\n<h3>Notes</h3>\n<ul>\n<li>Default position is end (right in LTR)</li>\n<li>When <code>edsButtonPositionStart</code> is true, it overrides end positioning</li>\n<li>Works with all button variants (edsButton, edsIconButton)</li>\n<li>Commonly used for search, clear, and submit actions</li>\n</ul>\n",
|
|
59970
|
+
"rawdescription": "\n\nA layout component that positions button elements relative to input fields.\nEnables the creation of input groups with leading or trailing action buttons,\ncommonly used for search inputs, password visibility toggles, or clear actions.\n\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",
|
|
59894
59971
|
"type": "component",
|
|
59895
|
-
"sourceCode": "import {
|
|
59972
|
+
"sourceCode": "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",
|
|
59896
59973
|
"styleUrl": "./eds-input-button.scss",
|
|
59897
59974
|
"assetsDirs": [],
|
|
59898
59975
|
"styleUrlsData": [
|
|
59899
59976
|
{
|
|
59900
|
-
"data": "@use '../base' as base;\n\n.eui-21 {\n :host {\n display: flex;\n width: 100%;\n border-radius: var(--eds-br-s);\n\n ::ng-deep .eds-button {\n border: var(--eds-bw-xs) solid var(--eds-c-border-neutral);\n background-color: var(--eds-c-surface-elevation);\n position: relative;\n }\n }\n\n // Position variants — reflected as the `position` host attribute (String-Props model).\n :host([position=\"start\"]) {\n flex-direction: row-reverse;\n\n ::ng-deep .eds-button {\n border-right: none;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\n &::after {\n background-color: var(--eds-c-border-divider);\n content: \"\";\n display: block;\n height: 1.75rem;\n right: -1px;\n position: absolute;\n top: var(--eds-sp-2xs);\n width: 1px;\n }\n }\n\n ::ng-deep .eds-input-text {\n border-left: none;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n }\n\n :host([position=\"end\"]) {\n ::ng-deep .eds-button {\n border-left: none;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n &::before {\n background-color: var(--eds-c-border-divider);\n content: \"\";\n display: block;\n height: 1.75rem;\n left: -1px;\n position: absolute;\n top: var(--eds-sp-2xs);\n width: 1px;\n }\n }\n\n ::ng-deep .eds-input-text {\n border-right: none;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n }\n}\n",
|
|
59977
|
+
"data": "@use '../base' as base;\n\n.eui-21 {\n :host {\n display: flex;\n width: 100%;\n border-radius: var(--eds-br-s);\n outline: none;\n\n position: relative;\n\n // The input must fill all space left of the button; the button keeps its\n // intrinsic width. `order` makes the layout independent of DOM order:\n // input first (grows), then the collapsed clear-icon wrapper at the\n // input's trailing edge, then the button.\n > ::ng-deep .eds-input-text,\n > ::ng-deep input {\n flex: 1 1 auto;\n min-width: 0;\n order: 1;\n }\n\n > ::ng-deep .eds-button,\n > ::ng-deep button {\n flex: 0 0 auto;\n order: 3;\n }\n\n // The `clearable` eds-input-text injects a wrapper `div`\n // (`display:flex; width:100%`). Its placement is non-deterministic under\n // content projection: SOMETIMES the input is moved INTO the wrapper\n // (`div > input + clear-icon`), SOMETIMES the input stays a direct host\n // sibling and the wrapper is left EMPTY (icon only). Handle both:\n //\n // • Wrapper that CONTAINS the input → it is the real input container, so\n // grow it (and the input inside already fills it). `order:1` keeps it\n // aligned with the bare-input case.\n // • EMPTY icon-only wrapper → collapse it to zero row space and `order`\n // it to the input's trailing edge so its absolutely positioned\n // clear-icon anchors just inside the input's right edge.\n > ::ng-deep div:has(input),\n > ::ng-deep div:has(.eds-input-text) {\n flex: 1 1 auto !important;\n width: auto !important;\n min-width: 0;\n order: 1;\n }\n\n > ::ng-deep div:not(:has(input)):not(:has(.eds-input-text)) {\n flex: 0 0 0 !important;\n width: 0 !important;\n min-width: 0;\n order: 2;\n }\n\n // The focus ring covers the entire host (the group) whenever focus is\n // on one of the projected controls. Tab lands directly on the input;\n // arrow keys then rove between the input and the button, and the ring\n // stays on the whole group throughout.\n &:focus-within {\n outline: var(--eds-bw-s) solid var(--eds-c-border-focus);\n outline-offset: var(--eds-bw-s);\n\n // The group owns the focus ring — suppress the individual control's\n // own focus outline so only one ring (around the whole host) shows.\n // The projected eds-input-text wins with a high-specificity\n // `!important` rule (`.eds-input-text:focus-visible:not([readonly])`),\n // so the override must both use `!important` AND match or exceed that\n // specificity. We mirror its compound (class + state + :not) and add\n // the host context so this reliably wins.\n ::ng-deep .eds-input-text:focus-visible:not([readonly]),\n ::ng-deep .eds-input-text:focus:not([readonly]),\n ::ng-deep input:focus-visible {\n outline: none !important;\n outline-offset: 0 !important;\n box-shadow: none !important;\n }\n\n // When the inner button is the focused control (arrow-navigated to\n // it), draw its focus ring INSET with a NEGATIVE offset so the ring\n // sits inside the button's flush trailing edge and lines up with the\n // group — rather than the button's default outline spilling outside.\n // Covers both the text button (`.eds-button`) and the icon button\n // (`.eds-icon-button`, used e.g. by eds-input-password's toggle).\n ::ng-deep .eds-button:focus-visible,\n ::ng-deep .eds-button:focus,\n ::ng-deep .eds-icon-button:focus-visible,\n ::ng-deep .eds-icon-button:focus {\n outline: var(--eds-bw-s) solid var(--eds-c-border-focus) !important;\n outline-offset: calc(-1 * var(--eds-bw-s)) !important;\n }\n\n // Critical / invalid state → the whole-group focus ring turns\n // critical. The invalid signal is the projected input's `invalid`\n // attribute (standalone usage) or a reflected `invalid` host\n // attribute (set by a composing parent such as eds-input-password).\n &:has(input[invalid]),\n &:has(.eds-input-text[invalid]) {\n outline-color: var(--eds-c-focus-critical);\n\n ::ng-deep .eds-button:focus-visible,\n ::ng-deep .eds-button:focus,\n ::ng-deep .eds-icon-button:focus-visible,\n ::ng-deep .eds-icon-button:focus {\n outline-color: var(--eds-c-focus-critical) !important;\n }\n }\n }\n\n // The projected eds-button sets its own `background-color: var(--_surface)`\n // (transparent for the `secondary` variant) at EQUAL specificity to this\n // rule, so it would win on source order and the field button would read\n // as transparent. Force the elevated surface so the button always reads\n // as a raised field affordance. (Only the background needs `!important`;\n // the border is left overridable so the position-variant rules below can\n // still drop the inner border to seamlessly join the input.)\n ::ng-deep .eds-button {\n border: var(--eds-bw-xs) solid var(--eds-c-border-neutral);\n background-color: var(--eds-c-surface-elevation) !important;\n position: relative;\n }\n }\n\n // Reflected host `invalid` (set by a composing parent such as\n // eds-input-password) — critical whole-group focus ring while focus is\n // inside the group, including the focused button segment.\n :host([invalid]):focus-within {\n outline-color: var(--eds-c-focus-critical);\n\n ::ng-deep .eds-button:focus-visible,\n ::ng-deep .eds-button:focus,\n ::ng-deep .eds-icon-button:focus-visible,\n ::ng-deep .eds-icon-button:focus {\n outline-color: var(--eds-c-focus-critical) !important;\n }\n }\n\n // Position variants — reflected as the `position` host attribute (String-Props model).\n :host([position=\"start\"]) {\n flex-direction: row-reverse;\n\n ::ng-deep .eds-button {\n border-right: none;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\n &::after {\n background-color: var(--eds-c-border-divider);\n content: \"\";\n display: block;\n height: 1.75rem;\n right: -1px;\n position: absolute;\n top: var(--eds-sp-2xs);\n width: 1px;\n }\n }\n\n ::ng-deep .eds-input-text {\n border-left: none;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n }\n\n :host([position=\"end\"]) {\n ::ng-deep .eds-button {\n border-left: none;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n &::before {\n background-color: var(--eds-c-border-divider);\n content: \"\";\n display: block;\n height: 1.75rem;\n left: -1px;\n position: absolute;\n top: var(--eds-sp-2xs);\n width: 1px;\n }\n }\n\n ::ng-deep .eds-input-text {\n border-right: none;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n }\n}\n",
|
|
59901
59978
|
"styleUrl": "./eds-input-button.scss"
|
|
59902
59979
|
}
|
|
59903
59980
|
],
|
|
59904
59981
|
"stylesData": "",
|
|
59905
59982
|
"jsdoctags": [
|
|
59906
59983
|
{
|
|
59907
|
-
"pos":
|
|
59908
|
-
"end":
|
|
59984
|
+
"pos": 439,
|
|
59985
|
+
"end": 2054,
|
|
59909
59986
|
"kind": 328,
|
|
59910
59987
|
"id": 0,
|
|
59911
59988
|
"flags": 16777216,
|
|
59912
59989
|
"modifierFlagsCache": 0,
|
|
59913
59990
|
"transformFlags": 0,
|
|
59914
59991
|
"tagName": {
|
|
59915
|
-
"pos":
|
|
59916
|
-
"end":
|
|
59992
|
+
"pos": 440,
|
|
59993
|
+
"end": 450,
|
|
59917
59994
|
"kind": 80,
|
|
59918
59995
|
"id": 0,
|
|
59919
59996
|
"flags": 16777216,
|
|
59920
59997
|
"transformFlags": 0,
|
|
59921
59998
|
"escapedText": "usageNotes"
|
|
59922
59999
|
},
|
|
59923
|
-
"comment": "<h3>Button at end of input (default)</h3>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-html\"><eds-input-button>\n <input edsInputText placeholder="Search..." />\n <button edsButton>Search</button>\n</eds-input-button></code></pre></div><h3>Button at start of input</h3>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-html\"><eds-input-button [edsButtonPositionStart]="true">\n <button edsIconButton icon="filter" ariaLabel="Filter"></button>\n <input edsInputText placeholder="Filter results..." />\n</eds-input-button></code></pre></div><h3>
|
|
60000
|
+
"comment": "<h3>Button at end of input (default)</h3>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-html\"><eds-input-button>\n <input edsInputText placeholder="Search..." />\n <button edsButton>Search</button>\n</eds-input-button></code></pre></div><h3>Button at start of input</h3>\n<b>Example :</b><div><pre class=\"line-numbers\"><code class=\"language-html\"><eds-input-button [edsButtonPositionStart]="true">\n <button edsIconButton icon="filter" ariaLabel="Filter"></button>\n <input edsInputText placeholder="Filter results..." />\n</eds-input-button></code></pre></div><h3>Focus model (roving tabindex)</h3>\n<ul>\n<li><code>Tab</code> moves focus directly onto the input field (the primary control); the\nfocus ring covers the whole host (the group). <code>Tab</code> again leaves the group.</li>\n<li><code>ArrowLeft</code> / <code>ArrowRight</code> rove focus between the group's controls in visual\norder — the input, the clearable "✕" icon (when present), and the button —\nwrapping at the ends; <code>Home</code> / <code>End</code> jump to the first / last control.</li>\n<li>Only the active control is in the tab order, so <code>Tab</code> leaves the group from\nwherever focus currently is. Focusing a child directly (click) adopts it as\nthe active roving target.</li>\n</ul>\n<h3>Accessibility</h3>\n<ul>\n<li>Single tab stop with arrow-key navigation between the controls</li>\n<li>The clearable icon participates in the arrow-key cycle when it is shown</li>\n<li>Ensure button has a descriptive label or aria-label</li>\n<li>Tab order follows visual layout</li>\n</ul>\n<h3>Notes</h3>\n<ul>\n<li>Default position is end (right in LTR)</li>\n<li>When <code>edsButtonPositionStart</code> is true, it overrides end positioning</li>\n<li>Works with all button variants (edsButton, edsIconButton)</li>\n<li>Commonly used for search, clear, and submit actions</li>\n</ul>\n"
|
|
59924
60001
|
}
|
|
59925
60002
|
],
|
|
60003
|
+
"constructorObj": {
|
|
60004
|
+
"name": "constructor",
|
|
60005
|
+
"description": "",
|
|
60006
|
+
"deprecated": false,
|
|
60007
|
+
"deprecationMessage": "",
|
|
60008
|
+
"args": [],
|
|
60009
|
+
"line": 102,
|
|
60010
|
+
"rawdescription": "\n"
|
|
60011
|
+
},
|
|
59926
60012
|
"extends": [],
|
|
59927
60013
|
"relationships": {
|
|
59928
60014
|
"incoming": [],
|
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-09T14:58:15.510Z, llm-md export.
|
|
4
4
|
|
|
5
5
|
## Components
|
|
6
6
|
|
|
@@ -2244,7 +2244,7 @@ File: `packages/eds/eds-input-button/eds-input-button.ts`
|
|
|
2244
2244
|
Selector: `eds-input-button`
|
|
2245
2245
|
Change detection: `ChangeDetectionStrategy.OnPush`
|
|
2246
2246
|
|
|
2247
|
-
Description: A layout component that positions button elements relative to input fields. Enables the creation of input groups with leading or trailing action buttons, commonly used for search inputs, password visibility toggles, or clear actions. Button at end of input (default) Example : \<eds-input-button\> \<input edsInputText placeholder="Search..." /\> \<button edsButton\>Search\</button\> \</eds-input-button\> Button at start of input Example : \<eds-input-button \[edsButtonPositionStart\]="true"\> \<button edsIconButton icon="filter" ariaLabel="Filter"\>\</button\> \<input edsInputText placeholder="Filter results..." /\> \</eds-input-button\>
|
|
2247
|
+
Description: A layout component that positions button elements relative to input fields. Enables the creation of input groups with leading or trailing action buttons, commonly used for search inputs, password visibility toggles, or clear actions. Button at end of input (default) Example : \<eds-input-button\> \<input edsInputText placeholder="Search..." /\> \<button edsButton\>Search\</button\> \</eds-input-button\> Button at start of input Example : \<eds-input-button \[edsButtonPositionStart\]="true"\> \<button edsIconButton icon="filter" ariaLabel="Filter"\>\</button\> \<input edsInputText placeholder="Filter results..." /\> \</eds-input-button\> Focus model (roving tabindex) Tab moves focus directly onto the input field (the primary control); the focus ring covers the whole host (the group). Tab again leaves the group. ArrowLeft / ArrowRight rove focus between the group's controls in visual order — the input, the clearable "✕" icon (when present), and the button — wrapping at the ends; Home / End jump to the first / last control. Only the active control is in the tab order, so Tab leaves the group from wherever focus currently is. Focusing a child directly (click) adopts it as the active roving target. Accessibility Single tab stop with arrow-key navigation between the controls The clearable icon participates in the arrow-key cycle when it is shown Ensure button has a descriptive label or aria-label Tab order follows visual layout Notes Default position is end (right in LTR) When edsButtonPositionStart is true, it overrides end positioning Works with all button variants (edsButton, edsIconButton) Commonly used for search, clear, and submit actions
|
|
2248
2248
|
|
|
2249
2249
|
Inputs:
|
|
2250
2250
|
- `e2eAttr: string = 'eds-input-button'` — Data attribute value for end-to-end testing identification. Applied as data-e2e attribute on the host element. 'eds-input-button'
|
package/docs/properties.html
CHANGED
|
@@ -12,14 +12,14 @@ class EdsAvatarBadge {
|
|
|
12
12
|
this.isPositionBottom = input(false, { ...(ngDevMode ? { debugName: "isPositionBottom" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
13
13
|
}
|
|
14
14
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsAvatarBadge, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: EdsAvatarBadge, isStandalone: true, selector: "eds-avatar-badge", inputs: { isPositionBottom: { classPropertyName: "isPositionBottom", publicName: "isPositionBottom", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.position": "isPositionBottom() ? \"bottom\" : \"top\"" }, classAttribute: "eds-avatar-badge" }, ngImport: i0, template: '<ng-content/>', isInline: true, styles: ["
|
|
15
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: EdsAvatarBadge, isStandalone: true, selector: "eds-avatar-badge", inputs: { isPositionBottom: { classPropertyName: "isPositionBottom", publicName: "isPositionBottom", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.position": "isPositionBottom() ? \"bottom\" : \"top\"" }, classAttribute: "eds-avatar-badge" }, ngImport: i0, template: '<ng-content/>', isInline: true, styles: [":host{position:absolute;right:0;bottom:0;display:inline-flex}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
16
16
|
}
|
|
17
17
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsAvatarBadge, decorators: [{
|
|
18
18
|
type: Component,
|
|
19
19
|
args: [{ selector: 'eds-avatar-badge', template: '<ng-content/>', host: {
|
|
20
20
|
class: 'eds-avatar-badge',
|
|
21
21
|
'[attr.position]': 'isPositionBottom() ? "bottom" : "top"',
|
|
22
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["
|
|
22
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{position:absolute;right:0;bottom:0;display:inline-flex}\n"] }]
|
|
23
23
|
}], propDecorators: { isPositionBottom: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPositionBottom", required: false }] }] } });
|
|
24
24
|
|
|
25
25
|
class EdsAvatarIcon {
|
|
@@ -51,7 +51,7 @@ class EdsAvatarImage {
|
|
|
51
51
|
this.imageUrlGenerated = 'assets';
|
|
52
52
|
}
|
|
53
53
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsAvatarImage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
54
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: EdsAvatarImage, isStandalone: true, selector: "eds-avatar-image", inputs: { imageUrl: { classPropertyName: "imageUrl", publicName: "imageUrl", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.default": "isDefault() || null" }, classAttribute: "eds-avatar-image" }, ngImport: i0, template: "@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", styles: [".eds-avatar :host.eds-avatar-image .eds-avatar-image-wrapper{background-size:cover;height:var(--_size);width:var(--_size)}.eds-avatar :host.eds-avatar-image .eds-avatar-image-wrapper img{border-radius:var(--eds-br-full);height:var(--_size);width:var(--_size)}.eds-avatar :host.eds-avatar-image
|
|
54
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: EdsAvatarImage, isStandalone: true, selector: "eds-avatar-image", inputs: { imageUrl: { classPropertyName: "imageUrl", publicName: "imageUrl", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.default": "isDefault() || null" }, classAttribute: "eds-avatar-image" }, ngImport: i0, template: "@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", styles: [".eds-avatar :host.eds-avatar-image .eds-avatar-image-wrapper{display:flex;background-size:cover;height:var(--_size);width:var(--_size)}.eds-avatar :host.eds-avatar-image .eds-avatar-image-wrapper img{border-radius:var(--eds-br-full);height:var(--_size);width:var(--_size)}.eds-avatar :host.eds-avatar-image{--_icon-size: var(--_size)}.eds-avatar :host.eds-avatar-image[default]{display:flex;align-items:center;justify-content:center}\n"], dependencies: [{ kind: "component", type: i1.EdsIcon, selector: "eds-icon, span[edsIcon]", inputs: ["icon", "set", "color", "size", "ariaLabel", "ariaHidden", "rounded", "isLoading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
55
55
|
}
|
|
56
56
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsAvatarImage, decorators: [{
|
|
57
57
|
type: Component,
|
|
@@ -60,7 +60,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
|
|
|
60
60
|
], host: {
|
|
61
61
|
class: 'eds-avatar-image',
|
|
62
62
|
'[attr.default]': 'isDefault() || null',
|
|
63
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "@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", styles: [".eds-avatar :host.eds-avatar-image .eds-avatar-image-wrapper{background-size:cover;height:var(--_size);width:var(--_size)}.eds-avatar :host.eds-avatar-image .eds-avatar-image-wrapper img{border-radius:var(--eds-br-full);height:var(--_size);width:var(--_size)}.eds-avatar :host.eds-avatar-image
|
|
63
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "@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", styles: [".eds-avatar :host.eds-avatar-image .eds-avatar-image-wrapper{display:flex;background-size:cover;height:var(--_size);width:var(--_size)}.eds-avatar :host.eds-avatar-image .eds-avatar-image-wrapper img{border-radius:var(--eds-br-full);height:var(--_size);width:var(--_size)}.eds-avatar :host.eds-avatar-image{--_icon-size: var(--_size)}.eds-avatar :host.eds-avatar-image[default]{display:flex;align-items:center;justify-content:center}\n"] }]
|
|
64
64
|
}], propDecorators: { imageUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageUrl", required: false }] }] } });
|
|
65
65
|
|
|
66
66
|
class EdsAvatarContent {
|
|
@@ -154,7 +154,7 @@ class EdsAvatar {
|
|
|
154
154
|
...(ngDevMode ? [{ debugName: "hasImage" }] : /* istanbul ignore next */ []));
|
|
155
155
|
}
|
|
156
156
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsAvatar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
157
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.2", type: EdsAvatar, isStandalone: true, selector: "div[edsAvatar], span[edsAvatar], eds-avatar", inputs: { e2eAttr: { classPropertyName: "e2eAttr", publicName: "e2eAttr", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "img" }, properties: { "attr.size": "size()", "attr.color": "color() || null", "attr.image": "hasImage() || null", "attr.data-e2e": "e2eAttr()", "attr.aria-label": "ariaLabel()" }, classAttribute: "eds-avatar" }, queries: [{ propertyName: "avatarImage", first: true, predicate: EdsAvatarImage, descendants: true, isSignal: true }], ngImport: i0, template: "<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", styles: [":host{--_surface: var(--eds-c-surface-neutral-subtler);--_on-surface: var(--eds-c-on-surface-neutral-subtler);--_size: var(--eds-si-4xl);--_icon-size: var(--eds-is-m);--_font-size: var(--eds-f-s-xl);display:inline-flex;position:relative;align-items:center;gap:var(--eds-sp-s);border-radius:var(--eds-br-full)}:host .eds-avatar-wrapper{display:inline-flex;align-items:center;justify-content:center;border-radius:var(--eds-br-full);background-color:var(--_surface);color:var(--_on-surface);height:var(--_size);width:var(--_size);position:relative}:host([size=\"2xs\"]){--_size: var(--eds-si-m);--_icon-size: var(--eds-is-2xs);--_font-size: var(--eds-f-s-xs)}:host([size=xs]){--_size: var(--eds-si-xl);--_icon-size: var(--eds-is-xs);--_font-size: var(--eds-f-s-s)}:host([size=s]){--_size: var(--eds-si-3xl);--_icon-size: var(--eds-is-s);--_font-size: var(--eds-f-s-l)}:host([size=m]){--_size: var(--eds-si-4xl);--_icon-size: var(--eds-is-
|
|
157
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.2", type: EdsAvatar, isStandalone: true, selector: "div[edsAvatar], span[edsAvatar], eds-avatar", inputs: { e2eAttr: { classPropertyName: "e2eAttr", publicName: "e2eAttr", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "img" }, properties: { "attr.size": "size()", "attr.color": "color() || null", "attr.image": "hasImage() || null", "attr.data-e2e": "e2eAttr()", "attr.aria-label": "ariaLabel()" }, classAttribute: "eds-avatar" }, queries: [{ propertyName: "avatarImage", first: true, predicate: EdsAvatarImage, descendants: true, isSignal: true }], ngImport: i0, template: "<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", styles: [":host{--_surface: var(--eds-c-surface-neutral-subtler);--_on-surface: var(--eds-c-on-surface-neutral-subtler);--_size: var(--eds-si-4xl);--_icon-size: var(--eds-is-m);--_font-size: var(--eds-f-s-xl);--_eds-avatar-badge-size: var(--eds-sp-m);--_eds-avatar-badge-icon-size: var(--eds-is-2xs);--_eds-avatar-badge-ring-width: var(--eds-bw-s);--_eds-badge-empty-size: var(--_eds-avatar-badge-size);display:inline-flex;position:relative;align-items:center;gap:var(--eds-sp-s);outline:var(--eds-bw-s) solid var(--eds-c-border-inverted);outline-offset:-1px;border-radius:var(--eds-br-full)}:host .eds-avatar-wrapper{display:inline-flex;align-items:center;justify-content:center;border-radius:var(--eds-br-full);background-color:var(--_surface);color:var(--_on-surface);height:var(--_size);width:var(--_size);position:relative}:host([size=\"2xs\"]){--_size: var(--eds-si-m);--_icon-size: var(--eds-is-2xs);--_font-size: var(--eds-f-s-xs);--_eds-avatar-badge-size: var(--eds-sp-xs)}:host([size=xs]){--_size: var(--eds-si-xl);--_icon-size: var(--eds-is-xs);--_font-size: var(--eds-f-s-s);--_eds-avatar-badge-size: var(--eds-sp-xs)}:host([size=s]){--_size: var(--eds-si-3xl);--_icon-size: var(--eds-is-s);--_font-size: var(--eds-f-s-l);--_eds-avatar-badge-size: var(--eds-sp-s);--_eds-avatar-badge-icon-size: var(--eds-is-3xs)}:host([size=m]){--_size: var(--eds-si-4xl);--_icon-size: var(--eds-is-s);--_font-size: var(--eds-f-s-xl);--_eds-avatar-badge-size: var(--eds-sp-m);--_eds-avatar-badge-icon-size: var(--eds-is-2xs)}:host([size=l]){--_size: var(--eds-si-6xl);--_icon-size: var(--eds-is-l);--_font-size: var(--eds-f-s-2xl);--_eds-avatar-badge-size: var(--eds-sp-l);--_eds-avatar-badge-icon-size: var(--eds-is-2xs)}:host([size=xl]){--_size: var(--eds-si-9xl);--_icon-size: var(--eds-is-xl);--_font-size: var(--eds-f-s-4xl);--_eds-avatar-badge-size: var(--eds-sp-xl);--_eds-avatar-badge-icon-size: var(--eds-is-xs)}:host([size=\"2xs\"]),:host([size=xs]){--_eds-avatar-badge-ring-width: var(--eds-bw-xs);--_eds-avatar-badge-icon-size: 0px}:host([color=cm-blue-navy]){--_surface: var(--eds-c-surface-cm-blue-navy-subtler);--_on-surface: var(--eds-c-on-surface-cm-blue-navy-subtler)}:host([color=cm-blue-electric]){--_surface: var(--eds-c-surface-cm-blue-electric-subtler);--_on-surface: var(--eds-c-on-surface-cm-blue-electric-subtler)}:host([color=cm-green]){--_surface: var(--eds-c-surface-cm-green-subtler);--_on-surface: var(--eds-c-on-surface-cm-green-subtler)}:host([color=cm-green-dark]){--_surface: var(--eds-c-surface-cm-green-dark-subtler);--_on-surface: var(--eds-c-on-surface-cm-green-dark-subtler)}:host([color=cm-orange]){--_surface: var(--eds-c-surface-cm-orange-subtler);--_on-surface: var(--eds-c-on-surface-cm-orange-subtler)}:host([color=cm-purple]){--_surface: var(--eds-c-surface-cm-purple-subtler);--_on-surface: var(--eds-c-on-surface-cm-purple-subtler)}:host([color=cm-blue-ocean]){--_surface: var(--eds-c-surface-cm-blue-ocean-subtler);--_on-surface: var(--eds-c-on-surface-cm-blue-ocean-subtler)}:host([color=cm-green-lemon]){--_surface: var(--eds-c-surface-cm-green-lemon-subtler);--_on-surface: var(--eds-c-on-surface-cm-green-lemon-subtler)}:host([color=cm-green-pine]){--_surface: var(--eds-c-surface-cm-green-pine-subtler);--_on-surface: var(--eds-c-on-surface-cm-green-pine-subtler)}:host([color=cm-red-crayola]){--_surface: var(--eds-c-surface-cm-red-crayola-subtler);--_on-surface: var(--eds-c-on-surface-cm-red-crayola-subtler)}:host([color=cm-warm-grey]){--_surface: var(--eds-c-surface-cm-warm-grey-subtler);--_on-surface: var(--eds-c-on-surface-cm-warm-grey-subtler)}:host([color=cm-yellow-gold]){--_surface: var(--eds-c-surface-cm-yellow-gold-subtler);--_on-surface: var(--eds-c-on-surface-cm-yellow-gold-subtler)}:host([color=cm-orange-abricot]){--_surface: var(--eds-c-surface-cm-orange-abricot-subtler);--_on-surface: var(--eds-c-on-surface-cm-orange-abricot-subtler)}:host([color=cm-purple-violet]){--_surface: var(--eds-c-surface-cm-purple-violet-subtler);--_on-surface: var(--eds-c-on-surface-cm-purple-violet-subtler)}:host([color=cm-red-tomato]){--_surface: var(--eds-c-surface-cm-red-tomato-subtler);--_on-surface: var(--eds-c-on-surface-cm-red-tomato-subtler)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
158
158
|
}
|
|
159
159
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsAvatar, decorators: [{
|
|
160
160
|
type: Component,
|
|
@@ -166,7 +166,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
|
|
|
166
166
|
'[attr.image]': 'hasImage() || null',
|
|
167
167
|
'[attr.data-e2e]': 'e2eAttr()',
|
|
168
168
|
'[attr.aria-label]': 'ariaLabel()',
|
|
169
|
-
}, template: "<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", styles: [":host{--_surface: var(--eds-c-surface-neutral-subtler);--_on-surface: var(--eds-c-on-surface-neutral-subtler);--_size: var(--eds-si-4xl);--_icon-size: var(--eds-is-m);--_font-size: var(--eds-f-s-xl);display:inline-flex;position:relative;align-items:center;gap:var(--eds-sp-s);border-radius:var(--eds-br-full)}:host .eds-avatar-wrapper{display:inline-flex;align-items:center;justify-content:center;border-radius:var(--eds-br-full);background-color:var(--_surface);color:var(--_on-surface);height:var(--_size);width:var(--_size);position:relative}:host([size=\"2xs\"]){--_size: var(--eds-si-m);--_icon-size: var(--eds-is-2xs);--_font-size: var(--eds-f-s-xs)}:host([size=xs]){--_size: var(--eds-si-xl);--_icon-size: var(--eds-is-xs);--_font-size: var(--eds-f-s-s)}:host([size=s]){--_size: var(--eds-si-3xl);--_icon-size: var(--eds-is-s);--_font-size: var(--eds-f-s-l)}:host([size=m]){--_size: var(--eds-si-4xl);--_icon-size: var(--eds-is-
|
|
169
|
+
}, template: "<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", styles: [":host{--_surface: var(--eds-c-surface-neutral-subtler);--_on-surface: var(--eds-c-on-surface-neutral-subtler);--_size: var(--eds-si-4xl);--_icon-size: var(--eds-is-m);--_font-size: var(--eds-f-s-xl);--_eds-avatar-badge-size: var(--eds-sp-m);--_eds-avatar-badge-icon-size: var(--eds-is-2xs);--_eds-avatar-badge-ring-width: var(--eds-bw-s);--_eds-badge-empty-size: var(--_eds-avatar-badge-size);display:inline-flex;position:relative;align-items:center;gap:var(--eds-sp-s);outline:var(--eds-bw-s) solid var(--eds-c-border-inverted);outline-offset:-1px;border-radius:var(--eds-br-full)}:host .eds-avatar-wrapper{display:inline-flex;align-items:center;justify-content:center;border-radius:var(--eds-br-full);background-color:var(--_surface);color:var(--_on-surface);height:var(--_size);width:var(--_size);position:relative}:host([size=\"2xs\"]){--_size: var(--eds-si-m);--_icon-size: var(--eds-is-2xs);--_font-size: var(--eds-f-s-xs);--_eds-avatar-badge-size: var(--eds-sp-xs)}:host([size=xs]){--_size: var(--eds-si-xl);--_icon-size: var(--eds-is-xs);--_font-size: var(--eds-f-s-s);--_eds-avatar-badge-size: var(--eds-sp-xs)}:host([size=s]){--_size: var(--eds-si-3xl);--_icon-size: var(--eds-is-s);--_font-size: var(--eds-f-s-l);--_eds-avatar-badge-size: var(--eds-sp-s);--_eds-avatar-badge-icon-size: var(--eds-is-3xs)}:host([size=m]){--_size: var(--eds-si-4xl);--_icon-size: var(--eds-is-s);--_font-size: var(--eds-f-s-xl);--_eds-avatar-badge-size: var(--eds-sp-m);--_eds-avatar-badge-icon-size: var(--eds-is-2xs)}:host([size=l]){--_size: var(--eds-si-6xl);--_icon-size: var(--eds-is-l);--_font-size: var(--eds-f-s-2xl);--_eds-avatar-badge-size: var(--eds-sp-l);--_eds-avatar-badge-icon-size: var(--eds-is-2xs)}:host([size=xl]){--_size: var(--eds-si-9xl);--_icon-size: var(--eds-is-xl);--_font-size: var(--eds-f-s-4xl);--_eds-avatar-badge-size: var(--eds-sp-xl);--_eds-avatar-badge-icon-size: var(--eds-is-xs)}:host([size=\"2xs\"]),:host([size=xs]){--_eds-avatar-badge-ring-width: var(--eds-bw-xs);--_eds-avatar-badge-icon-size: 0px}:host([color=cm-blue-navy]){--_surface: var(--eds-c-surface-cm-blue-navy-subtler);--_on-surface: var(--eds-c-on-surface-cm-blue-navy-subtler)}:host([color=cm-blue-electric]){--_surface: var(--eds-c-surface-cm-blue-electric-subtler);--_on-surface: var(--eds-c-on-surface-cm-blue-electric-subtler)}:host([color=cm-green]){--_surface: var(--eds-c-surface-cm-green-subtler);--_on-surface: var(--eds-c-on-surface-cm-green-subtler)}:host([color=cm-green-dark]){--_surface: var(--eds-c-surface-cm-green-dark-subtler);--_on-surface: var(--eds-c-on-surface-cm-green-dark-subtler)}:host([color=cm-orange]){--_surface: var(--eds-c-surface-cm-orange-subtler);--_on-surface: var(--eds-c-on-surface-cm-orange-subtler)}:host([color=cm-purple]){--_surface: var(--eds-c-surface-cm-purple-subtler);--_on-surface: var(--eds-c-on-surface-cm-purple-subtler)}:host([color=cm-blue-ocean]){--_surface: var(--eds-c-surface-cm-blue-ocean-subtler);--_on-surface: var(--eds-c-on-surface-cm-blue-ocean-subtler)}:host([color=cm-green-lemon]){--_surface: var(--eds-c-surface-cm-green-lemon-subtler);--_on-surface: var(--eds-c-on-surface-cm-green-lemon-subtler)}:host([color=cm-green-pine]){--_surface: var(--eds-c-surface-cm-green-pine-subtler);--_on-surface: var(--eds-c-on-surface-cm-green-pine-subtler)}:host([color=cm-red-crayola]){--_surface: var(--eds-c-surface-cm-red-crayola-subtler);--_on-surface: var(--eds-c-on-surface-cm-red-crayola-subtler)}:host([color=cm-warm-grey]){--_surface: var(--eds-c-surface-cm-warm-grey-subtler);--_on-surface: var(--eds-c-on-surface-cm-warm-grey-subtler)}:host([color=cm-yellow-gold]){--_surface: var(--eds-c-surface-cm-yellow-gold-subtler);--_on-surface: var(--eds-c-on-surface-cm-yellow-gold-subtler)}:host([color=cm-orange-abricot]){--_surface: var(--eds-c-surface-cm-orange-abricot-subtler);--_on-surface: var(--eds-c-on-surface-cm-orange-abricot-subtler)}:host([color=cm-purple-violet]){--_surface: var(--eds-c-surface-cm-purple-violet-subtler);--_on-surface: var(--eds-c-on-surface-cm-purple-violet-subtler)}:host([color=cm-red-tomato]){--_surface: var(--eds-c-surface-cm-red-tomato-subtler);--_on-surface: var(--eds-c-on-surface-cm-red-tomato-subtler)}\n"] }]
|
|
170
170
|
}], propDecorators: { e2eAttr: [{ type: i0.Input, args: [{ isSignal: true, alias: "e2eAttr", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], avatarImage: [{ type: i0.ContentChild, args: [i0.forwardRef(() => EdsAvatarImage), { isSignal: true }] }] } });
|
|
171
171
|
|
|
172
172
|
const EDS_AVATAR = [
|