@eui/eds 22.0.0-alpha.53 → 22.0.0-alpha.55
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 +79 -0
- package/docs/js/search/search_index.js +2 -2
- package/docs/json/documentation.json +7 -7
- package/docs/llms.txt +1 -1
- package/docs/properties.html +1 -1
- package/fesm2022/eui-eds-eds-button.mjs +2 -2
- package/fesm2022/eui-eds-eds-button.mjs.map +1 -1
- package/fesm2022/eui-eds-eds-rating.mjs +4 -4
- package/fesm2022/eui-eds-eds-rating.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eui-eds-eds-rating.d.ts +1 -1
|
@@ -30245,7 +30245,7 @@
|
|
|
30245
30245
|
"assetsDirs": [],
|
|
30246
30246
|
"styleUrlsData": [
|
|
30247
30247
|
{
|
|
30248
|
-
"data": "@use '../base' as base;\n\n.eui-21 {\n :host.eds-button {\n &[type-variant=\"primary\"] {\n --_border-width: var(--eds-bw-none);\n --_border-color: transparent;\n --_border-color-hover: transparent;\n --_border-color-active: transparent; \n\n &[color=\"primary\"] {\n --_surface: var(--eds-c-surface-primary);\n --_on-surface: var(--eds-c-on-surface-primary);\n --_surface-hover: var(--eds-c-surface-primary--hover);\n --_on-surface-hover: var(--eds-c-on-surface-primary);\n --_surface-active: var(--eds-c-surface-primary--pressed);\n --_on-surface-active: var(--eds-c-on-surface-primary);\n }\n &[color=\"highlight\"] {\n --_surface: var(--eds-c-surface-highlight);\n --_on-surface: var(--eds-c-on-surface-highlight);\n --_surface-hover: var(--eds-c-surface-highlight--hover);\n --_on-surface-hover: var(--eds-c-on-surface-highlight);\n --_surface-active: var(--eds-c-surface-highlight--pressed);\n --_on-surface-active: var(--eds-c-on-surface-highlight);\n }\n &[color=\"critical\"] {\n --_surface: var(--eds-c-surface-critical);\n --_on-surface: var(--eds-c-on-surface-critical);\n --_surface-hover: var(--eds-c-surface-critical--hover);\n --_on-surface-hover: var(--eds-c-on-surface-critical);\n --_surface-active: var(--eds-c-surface-critical--pressed);\n --_on-surface-active: var(--eds-c-on-surface-critical);\n }\n // Match BOTH the runtime-reflected `aria-disabled` (EdsButton forces the native\n // `disabled` off and conveys state via aria-disabled) AND the bare native\n // `[disabled]` the consumer writes in markup. The native attribute is present from\n // the very first paint, before the directive bootstraps and swaps it to aria-disabled;\n // matching it too holds the disabled affordance through hydration and removes the\n // first-load flash where a disabled button briefly rendered as enabled.\n &[aria-disabled=\"true\"],\n &[disabled] {\n --_surface: var(--eds-c-surface-disabled);\n --_on-surface: var(--eds-c-foreground-disabled);\n --_surface-hover: var(--eds-c-surface-disabled);\n --_on-surface-hover: var(--eds-c-foreground-disabled);\n --_surface-active: var(--eds-c-surface-disabled);\n --_on-surface-active: var(--eds-c-foreground-disabled);\n }\n }\n &[type-variant=\"secondary\"] {\n --_border-width: var(--eds-bw-xs);\n --_surface: transparent;\n\n &[color=\"primary\"] {\n --_border-color: var(--eds-c-border-primary);\n --_border-color-hover: var(--eds-c-border-primary--hover);\n --_border-color-active: var(--eds-c-border-primary--pressed);\n --_on-surface: var(--eds-c-foreground-primary);\n --_surface-hover: var(--eds-c-surface-primary-subtle);\n --_on-surface-hover: var(--eds-c-on-surface-primary-subtle);\n --_surface-active: var(--eds-c-surface-primary-subtle);\n --_on-surface-active: var(--eds-c-on-surface-primary-subtle);\n }\n &[color=\"neutral\"] {\n --_border-color: var(--eds-c-border-neutral);\n --_border-color-hover: var(--eds-c-border-neutral-strong);\n --_border-color-active: var(--eds-c-border-neutral-strong);\n --_on-surface: var(--eds-c-foreground-subtle);\n --_surface-hover: var(--eds-c-surface-neutral-subtler);\n --_on-surface-hover: var(--eds-c-on-surface-neutral-subtler);\n --_surface-active: var(--eds-c-surface-neutral-subtler);\n --_on-surface-active: var(--eds-c-on-surface-neutral-subtler);\n }\n &[color=\"highlight\"] {\n --_border-color: var(--eds-c-border-highlight);\n --_border-color-hover: var(--eds-c-border-highlight--hover);\n --_border-color-active: var(--eds-c-border-highlight--pressed);\n --_on-surface: var(--eds-c-foreground-highlight);\n --_surface-hover: var(--eds-c-surface-highlight-subtler);\n --_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);\n --_surface-active: var(--eds-c-surface-highlight-subtler);\n --_on-surface-active: var(--eds-c-on-surface-highlight-subtler);\n }\n &[color=\"critical\"] {\n --_border-color: var(--eds-c-border-critical);\n --_border-color-hover: var(--eds-c-border-critical);\n --_border-color-active: var(--eds-c-border-critical);\n --_on-surface: var(--eds-c-foreground-critical);\n --_surface-hover: var(--eds-c-surface-critical-subtler);\n --_on-surface-hover: var(--eds-c-on-surface-critical-subtler);\n --_surface-active: var(--eds-c-surface-critical-subtler);\n --_on-surface-active: var(--eds-c-on-surface-critical-subtler);\n }\n &[aria-disabled=\"true\"],\n &[disabled] {\n --_border-width: var(--eds-bw-xs);\n --_border-color: var(--eds-c-border-disabled);\n --_border-color-hover: var(--eds-c-border-disabled);\n --_border-color-active: var(--eds-c-border-disabled);\n --_surface: var(--eds-c-surface-elevation);\n --_on-surface: var(--eds-c-foreground-disabled);\n --_surface-hover: var(--eds-c-surface-elevation);\n --_on-surface-hover: var(--eds-c-foreground-disabled);\n --_surface-active: var(--eds-c-surface-elevation);\n --_on-surface-active: var(--eds-c-foreground-disabled);\n }\n }\n &[type-variant=\"tertiary\"] {\n --_border-width: var(--eds-bw-none);\n --_surface: transparent;\n\n &[color=\"primary\"] {\n --_on-surface: var(--eds-c-foreground-primary);\n --_surface-hover: var(--eds-c-surface-primary-subtle);\n --_on-surface-hover: var(--eds-c-on-surface-primary-subtle);\n --_surface-active: var(--eds-c-surface-primary-subtle);\n --_on-surface-active: var(--eds-c-on-surface-primary-subtle);\n }\n &[color=\"neutral\"] {\n --_on-surface: var(--eds-c-foreground);\n --_surface-hover: var(--eds-c-surface-neutral-subtler);\n --_on-surface-hover: var(--eds-c-on-surface-neutral-subtler);\n --_surface-active: var(--eds-c-surface-neutral-subtler);\n --_on-surface-active: var(--eds-c-on-surface-neutral-subtler);\n }\n &[color=\"highlight\"] {\n --_on-surface: var(--eds-c-foreground-highlight);\n --_surface-hover: var(--eds-c-surface-highlight-subtler);\n --_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);\n --_surface-active: var(--eds-c-surface-highlight-subtler);\n --_on-surface-active: var(--eds-c-on-surface-highlight-subtler);\n }\n &[aria-disabled=\"true\"],\n &[disabled] {\n --_surface: var(--eds-c-surface-elevation);\n --_on-surface: var(--eds-c-foreground-disabled);\n --_surface-hover: var(--eds-c-surface-elevation);\n --_on-surface-hover: var(--eds-c-foreground-disabled);\n --_surface-active: var(--eds-c-surface-elevation);\n --_on-surface-active: var(--eds-c-foreground-disabled);\n }\n }\n\n // 40px (default)\n &[size=\"m\"] {\n --_font-size: var(--eds-f-s-m);\n --_padding: var(--eds-sp-xs);\n --_size: var(--eds-si-4xl);\n --_icon-size: var(--eds-is-m);\n --_gap: var(--eds-is-3xs); // 6px\n }\n // 36px\n &[size=\"s\"] {\n --_font-size: var(--eds-f-s-s);\n --_padding: var(--eds-sp-2xs);\n --_size: calc(var(--eds-si-3xl) + var(--eds-si-2xs)); // 36px\n --_icon-size: var(--eds-is-s);\n --_gap: var(--eds-is-xs); // 8px\n }\n // 48px\n &[size=\"l\"] {\n --_font-size: var(--eds-f-s-l);\n --_padding: var(--eds-sp-s);\n --_size: var(--eds-si-6xl);\n --_icon-size: var(--eds-is-m);\n --_gap: calc(var(--eds-is-xs) + var(--eds-is-3xs)); // 10px\n }\n }\n\n // common styles\n :host.eds-button {\n align-items: center;\n background-image: none;\n border-radius: var(--eds-br-s);\n box-sizing: border-box;\n cursor: pointer;\n display: inline-flex;\n flex-shrink: 0;\n justify-content: center;\n outline: none;\n text-transform: none;\n transition: none;\n vertical-align: middle;\n white-space: nowrap;\n border-style: solid;\n @include base.eds-focus-visible-ring();\n\n .eds-button__container {\n align-items: center;\n display: inline-flex;\n position: relative;\n gap: var(--eds-sp-2xs);\n justify-content: center; // Needed for responsive\n width: 100%; // Needed for responsive\n }\n }\n\n // internal css vars mapping\n :host.eds-button {\n background-color: var(--_surface);\n color: var(--_on-surface);\n border-width: var(--_border-width);\n border-color: var(--_border-color);\n font-size: var(--_font-size);\n font-weight: var(--eds-f-w-medium);\n min-height: var(--_size);\n min-width: var(--_size);\n padding: var(--_padding);\n gap: var(--_gap);\n\n // a projected eds-icon follows the button foreground (on-surface) color\n --_eds-icon-color-inherit: var(--_on-surface);\n --_eds-icon-size-inherit: var(--_icon-size);\n\n &:hover,&:focus {\n background-color: var(--_surface-hover);\n color: var(--_on-surface-hover);\n border-color: var(--_border-color-hover);\n --_eds-icon-color-inherit: var(--_on-surface-hover);\n }\n &:active {\n background-color: var(--_surface-active);\n color: var(--_on-surface-active);\n border-color: var(--_border-color-active);\n --_eds-icon-color-inherit: var(--_on-surface-active);\n }\n\n @include base.eds-focus-visible-ring();\n\n &[color='critical'] {\n @include base.eds-focus-visible-ring-critical();\n }\n\n // Disabled: kept focusable/discoverable via aria-disabled (not native `disabled`),\n // so the focus-visible ring still applies. Signal non-interactivity with the cursor.\n // Pointer/click activation is blocked in TS (onActivate) and keyboard Enter/Space in\n // onKeydown, so the button stays reachable by Tab but never fires.\n &[aria-disabled=\"true\"],\n &[disabled] {\n cursor: not-allowed;\n }\n }\n\n // other states — reflected as host attributes (String-Props model)\n :host.eds-button[rounded] {\n border-radius: var(--eds-br-full);\n @include base.eds-focus-visible-ring();\n }\n\n :host.eds-button[avatar-button] {\n border-radius: var(--eds-br-full);\n border: var(--eds-bw-s) solid transparent;\n padding: 0;\n @include base.eds-focus-visible-ring();\n\n &:hover {\n border-color: var(--eds-c-border-primary--hover);\n }\n &:active {\n border-color: var(--eds-c-border-primary--pressed);\n }\n } \n\n // block / fluid — button fills its container width \n :host.eds-button[block] {\n align-items: center;\n display: flex;\n width: 100%;\n\n // Keep the icon + label on one centered line that truncates with an ellipsis\n // on overflow. The label is projected as a bare text node (no wrapper element),\n // so ellipsis must apply to the container's inline flow — hence `display: block`\n // with `text-align: center` rather than a flex row. A projected `eds-icon` sits\n // inline with the text and shares the single truncated line.\n .eds-button__container {\n display: block;\n min-width: 0;\n text-align: center;\n @include base.eds-ellipsis();\n\n .eds-icon {\n vertical-align: middle;\n }\n }\n }\n\n :host.eds-button[line-wrap] {\n white-space: normal;\n\n .eds-button__container {\n line-height: var(--eds-f-lh-m, 1.5rem);\n white-space: normal;\n }\n }\n}\n",
|
|
30248
|
+
"data": "@use '../base' as base;\n\n.eui-21 {\n :host.eds-button {\n &[type-variant=\"primary\"] {\n --_border-width: var(--eds-bw-none);\n --_border-color: transparent;\n --_border-color-hover: transparent;\n --_border-color-active: transparent; \n\n &[color=\"primary\"] {\n --_surface: var(--eds-c-surface-primary);\n --_on-surface: var(--eds-c-on-surface-primary);\n --_surface-hover: var(--eds-c-surface-primary--hover);\n --_on-surface-hover: var(--eds-c-on-surface-primary);\n --_surface-active: var(--eds-c-surface-primary--pressed);\n --_on-surface-active: var(--eds-c-on-surface-primary);\n }\n &[color=\"highlight\"] {\n --_surface: var(--eds-c-surface-highlight);\n --_on-surface: var(--eds-c-on-surface-highlight);\n --_surface-hover: var(--eds-c-surface-highlight--hover);\n --_on-surface-hover: var(--eds-c-on-surface-highlight);\n --_surface-active: var(--eds-c-surface-highlight--pressed);\n --_on-surface-active: var(--eds-c-on-surface-highlight);\n }\n &[color=\"critical\"] {\n --_surface: var(--eds-c-surface-critical);\n --_on-surface: var(--eds-c-on-surface-critical);\n --_surface-hover: var(--eds-c-surface-critical--hover);\n --_on-surface-hover: var(--eds-c-on-surface-critical);\n --_surface-active: var(--eds-c-surface-critical--pressed);\n --_on-surface-active: var(--eds-c-on-surface-critical);\n }\n // Match both `aria-disabled` (the runtime state EdsButton reflects) and the bare\n // native `[disabled]` present at first paint — avoids a disabled button flashing\n // as enabled before the directive bootstraps.\n &[aria-disabled=\"true\"],\n &[disabled] {\n --_surface: var(--eds-c-surface-disabled);\n --_on-surface: var(--eds-c-foreground-disabled);\n --_surface-hover: var(--eds-c-surface-disabled);\n --_on-surface-hover: var(--eds-c-foreground-disabled);\n --_surface-active: var(--eds-c-surface-disabled);\n --_on-surface-active: var(--eds-c-foreground-disabled);\n }\n }\n &[type-variant=\"secondary\"] {\n --_border-width: var(--eds-bw-xs);\n --_surface: transparent;\n\n &[color=\"primary\"] {\n --_border-color: var(--eds-c-border-primary);\n --_border-color-hover: var(--eds-c-border-primary--hover);\n --_border-color-active: var(--eds-c-border-primary--pressed);\n --_on-surface: var(--eds-c-foreground-primary);\n --_surface-hover: var(--eds-c-surface-primary-subtle);\n --_on-surface-hover: var(--eds-c-on-surface-primary-subtle);\n --_surface-active: var(--eds-c-surface-primary-subtle);\n --_on-surface-active: var(--eds-c-on-surface-primary-subtle);\n }\n &[color=\"neutral\"] {\n --_border-color: var(--eds-c-border-neutral);\n --_border-color-hover: var(--eds-c-border-neutral-strong);\n --_border-color-active: var(--eds-c-border-neutral-strong);\n --_on-surface: var(--eds-c-foreground-subtle);\n --_surface-hover: var(--eds-c-surface-neutral-subtler);\n --_on-surface-hover: var(--eds-c-on-surface-neutral-subtler);\n --_surface-active: var(--eds-c-surface-neutral-subtler);\n --_on-surface-active: var(--eds-c-on-surface-neutral-subtler);\n }\n &[color=\"highlight\"] {\n --_border-color: var(--eds-c-border-highlight);\n --_border-color-hover: var(--eds-c-border-highlight--hover);\n --_border-color-active: var(--eds-c-border-highlight--pressed);\n --_on-surface: var(--eds-c-foreground-highlight);\n --_surface-hover: var(--eds-c-surface-highlight-subtler);\n --_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);\n --_surface-active: var(--eds-c-surface-highlight-subtler);\n --_on-surface-active: var(--eds-c-on-surface-highlight-subtler);\n }\n &[color=\"critical\"] {\n --_border-color: var(--eds-c-border-critical);\n --_border-color-hover: var(--eds-c-border-critical);\n --_border-color-active: var(--eds-c-border-critical);\n --_on-surface: var(--eds-c-foreground-critical);\n --_surface-hover: var(--eds-c-surface-critical-subtler);\n --_on-surface-hover: var(--eds-c-on-surface-critical-subtler);\n --_surface-active: var(--eds-c-surface-critical-subtler);\n --_on-surface-active: var(--eds-c-on-surface-critical-subtler);\n }\n &[aria-disabled=\"true\"],\n &[disabled] {\n --_border-width: var(--eds-bw-xs);\n --_border-color: var(--eds-c-border-disabled);\n --_border-color-hover: var(--eds-c-border-disabled);\n --_border-color-active: var(--eds-c-border-disabled);\n --_surface: var(--eds-c-surface-elevation);\n --_on-surface: var(--eds-c-foreground-disabled);\n --_surface-hover: var(--eds-c-surface-elevation);\n --_on-surface-hover: var(--eds-c-foreground-disabled);\n --_surface-active: var(--eds-c-surface-elevation);\n --_on-surface-active: var(--eds-c-foreground-disabled);\n }\n }\n &[type-variant=\"tertiary\"] {\n --_border-width: var(--eds-bw-none);\n --_surface: transparent;\n\n &[color=\"primary\"] {\n --_on-surface: var(--eds-c-foreground-primary);\n --_surface-hover: var(--eds-c-surface-primary-subtle);\n --_on-surface-hover: var(--eds-c-on-surface-primary-subtle);\n --_surface-active: var(--eds-c-surface-primary-subtle);\n --_on-surface-active: var(--eds-c-on-surface-primary-subtle);\n }\n &[color=\"neutral\"] {\n --_on-surface: var(--eds-c-foreground);\n --_surface-hover: var(--eds-c-surface-neutral-subtler);\n --_on-surface-hover: var(--eds-c-on-surface-neutral-subtler);\n --_surface-active: var(--eds-c-surface-neutral-subtler);\n --_on-surface-active: var(--eds-c-on-surface-neutral-subtler);\n }\n &[color=\"highlight\"] {\n --_on-surface: var(--eds-c-foreground-highlight);\n --_surface-hover: var(--eds-c-surface-highlight-subtler);\n --_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);\n --_surface-active: var(--eds-c-surface-highlight-subtler);\n --_on-surface-active: var(--eds-c-on-surface-highlight-subtler);\n }\n &[aria-disabled=\"true\"],\n &[disabled] {\n --_surface: var(--eds-c-surface-elevation);\n --_on-surface: var(--eds-c-foreground-disabled);\n --_surface-hover: var(--eds-c-surface-elevation);\n --_on-surface-hover: var(--eds-c-foreground-disabled);\n --_surface-active: var(--eds-c-surface-elevation);\n --_on-surface-active: var(--eds-c-foreground-disabled);\n }\n }\n\n // 40px (default)\n &[size=\"m\"] {\n --_font-size: var(--eds-f-s-m);\n --_padding: var(--eds-sp-xs);\n --_size: var(--eds-si-4xl);\n --_icon-size: var(--eds-is-m);\n --_gap: var(--eds-is-3xs); // 6px\n }\n // 36px\n &[size=\"s\"] {\n --_font-size: var(--eds-f-s-s);\n --_padding: var(--eds-sp-2xs);\n --_size: calc(var(--eds-si-3xl) + var(--eds-si-2xs)); // 36px\n --_icon-size: var(--eds-is-s);\n --_gap: var(--eds-is-xs); // 8px\n }\n // 48px\n &[size=\"l\"] {\n --_font-size: var(--eds-f-s-l);\n --_padding: var(--eds-sp-s);\n --_size: var(--eds-si-6xl);\n --_icon-size: var(--eds-is-m);\n --_gap: calc(var(--eds-is-xs) + var(--eds-is-3xs)); // 10px\n }\n }\n\n // common styles\n :host.eds-button {\n align-items: center;\n background-image: none;\n border-radius: var(--eds-br-s);\n box-sizing: border-box;\n cursor: pointer;\n display: inline-flex;\n flex-shrink: 0;\n justify-content: center;\n outline: none;\n text-transform: none;\n transition: none;\n vertical-align: middle;\n white-space: nowrap;\n border-style: solid;\n @include base.eds-focus-visible-ring();\n\n .eds-button__container {\n align-items: center;\n display: inline-flex;\n position: relative;\n gap: var(--eds-sp-2xs);\n justify-content: center; // Needed for responsive\n width: 100%; // Needed for responsive\n }\n }\n\n // internal css vars mapping\n :host.eds-button {\n background-color: var(--_surface);\n color: var(--_on-surface);\n border-width: var(--_border-width);\n border-color: var(--_border-color);\n font-size: var(--_font-size);\n font-weight: var(--eds-f-w-medium);\n min-height: var(--_size);\n min-width: var(--_size);\n padding: var(--_padding);\n gap: var(--_gap);\n\n // a projected eds-icon follows the button foreground (on-surface) color\n --_eds-icon-color-inherit: var(--_on-surface);\n --_eds-icon-size-inherit: var(--_icon-size);\n\n &:hover,&:focus {\n background-color: var(--_surface-hover);\n color: var(--_on-surface-hover);\n border-color: var(--_border-color-hover);\n --_eds-icon-color-inherit: var(--_on-surface-hover);\n }\n &:active {\n background-color: var(--_surface-active);\n color: var(--_on-surface-active);\n border-color: var(--_border-color-active);\n --_eds-icon-color-inherit: var(--_on-surface-active);\n }\n\n @include base.eds-focus-visible-ring();\n\n &[color='critical'] {\n @include base.eds-focus-visible-ring-critical();\n }\n\n // Disabled via aria-disabled (not native `disabled`), so the button stays focusable\n // and keeps its focus ring; activation is blocked in TS. Cursor signals non-interactivity.\n &[aria-disabled=\"true\"],\n &[disabled] {\n cursor: not-allowed;\n }\n }\n\n // other states — reflected as host attributes (String-Props model)\n :host.eds-button[rounded] {\n border-radius: var(--eds-br-full);\n @include base.eds-focus-visible-ring();\n }\n\n :host.eds-button[avatar-button] {\n border-radius: var(--eds-br-full);\n border: var(--eds-bw-s) solid transparent;\n padding: 0;\n @include base.eds-focus-visible-ring();\n\n &:hover {\n border-color: var(--eds-c-border-primary--hover);\n }\n &:active {\n border-color: var(--eds-c-border-primary--pressed);\n }\n } \n\n // block / fluid — button fills its container width\n :host.eds-button[block] {\n align-items: center;\n display: flex;\n width: 100%;\n }\n\n :host.eds-button[line-wrap] {\n white-space: normal;\n\n .eds-button__container {\n line-height: var(--eds-f-lh-m, 1.5rem);\n white-space: normal;\n }\n }\n}\n",
|
|
30249
30249
|
"styleUrl": "./eds-button.scss"
|
|
30250
30250
|
}
|
|
30251
30251
|
],
|
|
@@ -75033,7 +75033,7 @@
|
|
|
75033
75033
|
},
|
|
75034
75034
|
{
|
|
75035
75035
|
"name": "EdsRating",
|
|
75036
|
-
"id": "component-EdsRating-
|
|
75036
|
+
"id": "component-EdsRating-eac2c4c4bcb459af899334b1f2fc17fa624c37e90078bf83f88db650ec1f9b99783fb0489ae7fe27d2e13aa74900f7eb7446a33a44c6a5eb342db01e4239f5ab",
|
|
75037
75037
|
"file": "packages/eds/eds-rating/eds-rating.ts",
|
|
75038
75038
|
"changeDetection": "ChangeDetectionStrategy.OnPush",
|
|
75039
75039
|
"encapsulation": [],
|
|
@@ -75550,15 +75550,15 @@
|
|
|
75550
75550
|
{
|
|
75551
75551
|
"name": "iconSize",
|
|
75552
75552
|
"coverageIgnore": false,
|
|
75553
|
-
"defaultValue": "computed<EdsIconSize>(() => (this.size() === 's' ? '
|
|
75553
|
+
"defaultValue": "computed<EdsIconSize>(() => (this.size() === 's' ? 's' : 'm'))",
|
|
75554
75554
|
"deprecated": false,
|
|
75555
75555
|
"deprecationMessage": "",
|
|
75556
75556
|
"type": "unknown",
|
|
75557
75557
|
"indexKey": "",
|
|
75558
75558
|
"optional": false,
|
|
75559
|
-
"description": "<p>Star icon size derived from the control <code>size</code>:\n<code>'m'</code> → <code>'
|
|
75559
|
+
"description": "<p>Star icon size derived from the control <code>size</code>:\n<code>'m'</code> → <code>'m'</code> icons (24×24), <code>'s'</code> → <code>'s'</code> icons (20×20).</p>\n",
|
|
75560
75560
|
"line": 168,
|
|
75561
|
-
"rawdescription": "\n\nStar icon size derived from the control `size`:\n`'m'` → `'
|
|
75561
|
+
"rawdescription": "\n\nStar icon size derived from the control `size`:\n`'m'` → `'m'` icons (24×24), `'s'` → `'s'` icons (20×20).\n",
|
|
75562
75562
|
"modifierKind": [
|
|
75563
75563
|
124,
|
|
75564
75564
|
148
|
|
@@ -76025,12 +76025,12 @@
|
|
|
76025
76025
|
"description": "",
|
|
76026
76026
|
"rawdescription": "\n",
|
|
76027
76027
|
"type": "component",
|
|
76028
|
-
"sourceCode": "import {\n Component,\n ChangeDetectionStrategy,\n input,\n output,\n computed,\n booleanAttribute,\n numberAttribute,\n forwardRef,\n signal,\n effect,\n afterNextRender,\n viewChildren,\n ElementRef,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { EDS_ICON, EdsIconSize } from '@eui/eds/eds-icon';\n\n/**\n * Local narrowed size union — the rating's size contract.\n */\nexport type EdsRatingSize = 's' | 'm';\n\n@Component({\n templateUrl: './eds-rating.html',\n selector: 'eds-rating',\n styleUrl: './eds-rating.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ...EDS_ICON,\n ],\n host: {\n class: 'eds-rating',\n '[attr.size]': 'size()',\n '[attr.has-text]': 'hasText() || null',\n '[attr.has-half-rating]': 'hasHalfRating() || null',\n '[attr.disabled]': 'internalDisabled() || null',\n '[attr.readonly]': 'readonly() || null',\n '[attr.data-e2e]': 'e2eAttr()',\n role: 'radiogroup',\n '[attr.aria-label]': 'ariaLabel()',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => EdsRating),\n multi: true,\n },\n ],\n})\nexport class EdsRating implements ControlValueAccessor {\n /**\n * Data attribute value for end-to-end testing identification.\n * @default 'eds-rating'\n */\n e2eAttr = input('eds-rating');\n\n /**\n * Accessible label for the rating group.\n * @default 'Rating'\n */\n ariaLabel = input('Rating');\n\n /**\n * Number of stars to display.\n * @default 5\n */\n numberOfStars = input(5, { transform: numberAttribute });\n\n /**\n * Visual size of the rating control. `'m'` (default) renders medium stars;\n * `'s'` renders smaller stars (matching the small icon-button sizing).\n * Reflected as the `size` host attribute.\n * @default 'm'\n */\n size = input<EdsRatingSize>('m');\n\n /**\n * Optional label displayed above the stars. Typically used in read-only displays\n * to show the rating value (e.g. `'4.7'`). When empty (default) no label is rendered.\n * @default ''\n */\n label = input('');\n\n /**\n * Optional sub-label displayed below the stars. Typically used in read-only displays\n * for supporting text (e.g. `'Based on 330k reviews'`). When empty (default) no\n * sub-label is rendered.\n * @default ''\n */\n sublabel = input('');\n\n /**\n * Current rating value. Supports fractional values: when the decimal part is\n * `>= 0.5` the next star is rendered half-filled (e.g. `3.5` → three full stars\n * plus one half star). Fractional values are intended for read-only display;\n * user interaction (click / keyboard) always produces whole-star ratings.\n * @default 0\n */\n rating = input(0, { transform: numberAttribute });\n\n /**\n * Whether the rating is disabled.\n * @default false\n */\n disabled = input(false, { transform: booleanAttribute });\n\n /**\n * Whether the rating is read-only. The value is displayed but cannot be changed\n * through user interaction. Unlike `disabled`, the control retains its normal\n * (non-dimmed) appearance.\n * @default false\n */\n readonly = input(false, { transform: booleanAttribute });\n\n /**\n * Allows editing in half-star steps. When enabled, clicking a star cycles that\n * position through half → full → removed, letting the user add or remove half a\n * star per click (so ratings like `2.5` can be set interactively). In this mode\n * the default stars use the regular star icon set.\n * @default false\n */\n hasHalfRating = input(false, { transform: booleanAttribute });\n\n /**\n * Icon for an empty (unfilled) star. Use the `iconName:setName` convention\n * (e.g. `'heart:regular'`). When empty, the default star icon is used.\n * @default '' (falls back to the default star icon)\n */\n emptyIcon = input('');\n\n /**\n * Icon for a half-filled star. Use the `iconName:setName` convention\n * (e.g. `'heart-half-fill:fill'`). When empty, the default half-star icon is used.\n * @default '' (falls back to the default half-star icon)\n */\n halfIcon = input('');\n\n /**\n * Icon for a filled star. Use the `iconName:setName` convention\n * (e.g. `'heart-fill:fill'`). When empty, the default filled-star icon is used.\n * @default '' (falls back to the default filled-star icon)\n */\n filledIcon = input('');\n\n /**\n * Emitted when the rating changes.\n * Payload: the new rating value (number).\n */\n ratingChange = output<number>();\n\n protected readonly starButtons = viewChildren('starButton', { read: ElementRef });\n\n protected internalRating = signal(0);\n protected internalDisabled = signal(false);\n\n /**\n * Combined non-interactive state — true when the control is disabled or read-only.\n * Blocks all rating mutations (click + keyboard).\n */\n protected readonly isNonInteractive = computed(() => this.internalDisabled() || this.readonly());\n\n /**\n * Star icon size derived from the control `size`:\n * `'m'` → `'s'` icons, `'s'` → `'xs'` icons (matching the small icon-button sizing).\n */\n protected readonly iconSize = computed<EdsIconSize>(() => (this.size() === 's' ? 'xs' : 's'));\n\n /**\n * True when a label or sub-label is set — switches the host to a stacked\n * (column) layout so the text sits above/below the stars.\n */\n protected readonly hasText = computed(() => !!this.label() || !!this.sublabel());\n\n /**\n * Resolved icon names for the three star states. Each falls back to a default\n * star icon when the matching input is not provided. The default filled/empty\n * stars use the regular star set in half-step editing mode (`hasHalfRating`) and the\n * compact `core` set otherwise.\n */\n protected readonly resolvedFilledIcon = computed(() =>\n this.filledIcon() || (this.hasHalfRating() ? 'star-fill:fill' : 'star-fill:core'));\n protected readonly resolvedHalfIcon = computed(() =>\n this.halfIcon() || 'star-half-fill:fill');\n protected readonly resolvedEmptyIcon = computed(() =>\n this.emptyIcon() || (this.hasHalfRating() ? 'star:regular' : 'star:core'));\n\n protected stars = computed(() => {\n const count = this.numberOfStars();\n const currentRating = this.internalRating();\n // A star is half-filled when the rating's fractional part is >= 0.5 and the\n // star sits just above the fully-filled stars (e.g. rating 3.5 → star 4 is half).\n const fullStars = Math.floor(currentRating);\n const hasHalf = currentRating - fullStars >= 0.5;\n return Array.from({ length: count }, (_, i) => {\n const index = i + 1;\n return {\n index,\n filled: index <= fullStars,\n half: hasHalf && index === fullStars + 1,\n };\n });\n });\n\n constructor() {\n effect(() => {\n const inputRating = this.rating();\n // Only sync input → internal when the input is explicitly set (non-zero).\n // writeValue from reactive forms also writes to internalRating directly.\n if (inputRating !== 0) {\n this.internalRating.set(inputRating);\n }\n });\n\n effect(() => {\n this.internalDisabled.set(this.disabled());\n });\n\n afterNextRender(() => {\n this.starButtons().forEach((buttonRef) => {\n buttonRef.nativeElement?.addEventListener('blur', () => this._onTouched());\n });\n });\n }\n\n // ControlValueAccessor\n writeValue(value: number): void {\n this.internalRating.set(value ?? 0);\n }\n\n registerOnChange(fn: (value: number) => void): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.internalDisabled.set(isDisabled);\n }\n\n /**\n * Returns the tabindex for a star button (roving tabindex pattern).\n */\n protected getTabIndex(starIndex: number): number {\n // Fractional ratings (e.g. 3.5) are display-only; snap to the nearest whole\n // star so the roving-tabindex pattern always has exactly one focusable star.\n const current = Math.round(this.internalRating());\n if (current === 0) {\n return starIndex === 1 ? 0 : -1;\n }\n return starIndex === current ? 0 : -1;\n }\n\n /**\n * Handles clicking a star — toggles off if same star clicked again.\n */\n protected onStarClick(starIndex: number): void {\n if (this.isNonInteractive()) return;\n\n if (this.hasHalfRating()) {\n // Cycle this star position through half → full → removed, so each click\n // adds or removes half a star.\n const current = this.internalRating();\n let newRating: number;\n if (current === starIndex - 0.5) {\n newRating = starIndex; // half → full\n } else if (current === starIndex) {\n newRating = starIndex - 1; // full → remove this star\n } else {\n newRating = starIndex - 0.5; // → half\n }\n this.updateRating(newRating);\n return;\n }\n\n const newRating = this.internalRating() === starIndex ? 0 : starIndex;\n this.updateRating(newRating);\n }\n\n /**\n * Handles keyboard navigation within the rating group.\n * Implements WAI-ARIA APG Radio Group pattern with wrapping arrows and Space key.\n */\n protected onKeydown(event: KeyboardEvent, starIndex: number): void {\n if (this.isNonInteractive()) return;\n\n const total = this.numberOfStars();\n\n // Half-step editing: arrows move the rating by 0.5 and clamp at the ends.\n if (this.hasHalfRating()) {\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp': {\n event.preventDefault();\n const next = Math.min(total, this.internalRating() + 0.5);\n this.updateRating(next);\n this.focusStar(Math.max(0, Math.ceil(next) - 1));\n break;\n }\n case 'ArrowLeft':\n case 'ArrowDown': {\n event.preventDefault();\n const prev = Math.max(0, this.internalRating() - 0.5);\n this.updateRating(prev);\n this.focusStar(Math.max(0, Math.ceil(prev) - 1));\n break;\n }\n case 'Home': {\n event.preventDefault();\n this.updateRating(0.5);\n this.focusStar(0);\n break;\n }\n case 'End': {\n event.preventDefault();\n this.updateRating(total);\n this.focusStar(total - 1);\n break;\n }\n }\n return;\n }\n\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp': {\n event.preventDefault();\n const nextIndex = starIndex === total ? 1 : starIndex + 1;\n this.updateRating(nextIndex);\n this.focusStar(nextIndex - 1);\n break;\n }\n case 'ArrowLeft':\n case 'ArrowDown': {\n event.preventDefault();\n const prevIndex = starIndex === 1 ? total : starIndex - 1;\n this.updateRating(prevIndex);\n this.focusStar(prevIndex - 1);\n break;\n }\n case ' ': {\n event.preventDefault();\n if (this.internalRating() !== starIndex) {\n this.updateRating(starIndex);\n }\n break;\n }\n case 'Home': {\n event.preventDefault();\n this.updateRating(1);\n this.focusStar(0);\n break;\n }\n case 'End': {\n event.preventDefault();\n this.updateRating(total);\n this.focusStar(total - 1);\n break;\n }\n }\n }\n\n protected onBlur(): void {\n this._onTouched();\n }\n\n private updateRating(value: number): void {\n this.internalRating.set(value);\n this.ratingChange.emit(value);\n this._onChange(value);\n }\n\n private focusStar(arrayIndex: number): void {\n const buttons = this.starButtons();\n if (buttons[arrayIndex]) {\n buttons[arrayIndex].nativeElement.focus();\n }\n }\n\n private _onChange: (value: number) => void = () => {/* noop */};\n private _onTouched: () => void = () => {/* noop */};\n}\n",
|
|
76028
|
+
"sourceCode": "import {\n Component,\n ChangeDetectionStrategy,\n input,\n output,\n computed,\n booleanAttribute,\n numberAttribute,\n forwardRef,\n signal,\n effect,\n afterNextRender,\n viewChildren,\n ElementRef,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { EDS_ICON, EdsIconSize } from '@eui/eds/eds-icon';\n\n/**\n * Local narrowed size union — the rating's size contract.\n */\nexport type EdsRatingSize = 's' | 'm';\n\n@Component({\n templateUrl: './eds-rating.html',\n selector: 'eds-rating',\n styleUrl: './eds-rating.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ...EDS_ICON,\n ],\n host: {\n class: 'eds-rating',\n '[attr.size]': 'size()',\n '[attr.has-text]': 'hasText() || null',\n '[attr.has-half-rating]': 'hasHalfRating() || null',\n '[attr.disabled]': 'internalDisabled() || null',\n '[attr.readonly]': 'readonly() || null',\n '[attr.data-e2e]': 'e2eAttr()',\n role: 'radiogroup',\n '[attr.aria-label]': 'ariaLabel()',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => EdsRating),\n multi: true,\n },\n ],\n})\nexport class EdsRating implements ControlValueAccessor {\n /**\n * Data attribute value for end-to-end testing identification.\n * @default 'eds-rating'\n */\n e2eAttr = input('eds-rating');\n\n /**\n * Accessible label for the rating group.\n * @default 'Rating'\n */\n ariaLabel = input('Rating');\n\n /**\n * Number of stars to display.\n * @default 5\n */\n numberOfStars = input(5, { transform: numberAttribute });\n\n /**\n * Visual size of the rating control. `'m'` (default) renders medium stars;\n * `'s'` renders smaller stars (matching the small icon-button sizing).\n * Reflected as the `size` host attribute.\n * @default 'm'\n */\n size = input<EdsRatingSize>('m');\n\n /**\n * Optional label displayed above the stars. Typically used in read-only displays\n * to show the rating value (e.g. `'4.7'`). When empty (default) no label is rendered.\n * @default ''\n */\n label = input('');\n\n /**\n * Optional sub-label displayed below the stars. Typically used in read-only displays\n * for supporting text (e.g. `'Based on 330k reviews'`). When empty (default) no\n * sub-label is rendered.\n * @default ''\n */\n sublabel = input('');\n\n /**\n * Current rating value. Supports fractional values: when the decimal part is\n * `>= 0.5` the next star is rendered half-filled (e.g. `3.5` → three full stars\n * plus one half star). Fractional values are intended for read-only display;\n * user interaction (click / keyboard) always produces whole-star ratings.\n * @default 0\n */\n rating = input(0, { transform: numberAttribute });\n\n /**\n * Whether the rating is disabled.\n * @default false\n */\n disabled = input(false, { transform: booleanAttribute });\n\n /**\n * Whether the rating is read-only. The value is displayed but cannot be changed\n * through user interaction. Unlike `disabled`, the control retains its normal\n * (non-dimmed) appearance.\n * @default false\n */\n readonly = input(false, { transform: booleanAttribute });\n\n /**\n * Allows editing in half-star steps. When enabled, clicking a star cycles that\n * position through half → full → removed, letting the user add or remove half a\n * star per click (so ratings like `2.5` can be set interactively). In this mode\n * the default stars use the regular star icon set.\n * @default false\n */\n hasHalfRating = input(false, { transform: booleanAttribute });\n\n /**\n * Icon for an empty (unfilled) star. Use the `iconName:setName` convention\n * (e.g. `'heart:regular'`). When empty, the default star icon is used.\n * @default '' (falls back to the default star icon)\n */\n emptyIcon = input('');\n\n /**\n * Icon for a half-filled star. Use the `iconName:setName` convention\n * (e.g. `'heart-half-fill:fill'`). When empty, the default half-star icon is used.\n * @default '' (falls back to the default half-star icon)\n */\n halfIcon = input('');\n\n /**\n * Icon for a filled star. Use the `iconName:setName` convention\n * (e.g. `'heart-fill:fill'`). When empty, the default filled-star icon is used.\n * @default '' (falls back to the default filled-star icon)\n */\n filledIcon = input('');\n\n /**\n * Emitted when the rating changes.\n * Payload: the new rating value (number).\n */\n ratingChange = output<number>();\n\n protected readonly starButtons = viewChildren('starButton', { read: ElementRef });\n\n protected internalRating = signal(0);\n protected internalDisabled = signal(false);\n\n /**\n * Combined non-interactive state — true when the control is disabled or read-only.\n * Blocks all rating mutations (click + keyboard).\n */\n protected readonly isNonInteractive = computed(() => this.internalDisabled() || this.readonly());\n\n /**\n * Star icon size derived from the control `size`:\n * `'m'` → `'m'` icons (24×24), `'s'` → `'s'` icons (20×20).\n */\n protected readonly iconSize = computed<EdsIconSize>(() => (this.size() === 's' ? 's' : 'm'));\n\n /**\n * True when a label or sub-label is set — switches the host to a stacked\n * (column) layout so the text sits above/below the stars.\n */\n protected readonly hasText = computed(() => !!this.label() || !!this.sublabel());\n\n /**\n * Resolved icon names for the three star states. Each falls back to a default\n * star icon when the matching input is not provided. The default filled/empty\n * stars use the regular star set in half-step editing mode (`hasHalfRating`) and the\n * compact `core` set otherwise.\n */\n protected readonly resolvedFilledIcon = computed(() =>\n this.filledIcon() || (this.hasHalfRating() ? 'star-fill:fill' : 'star-fill:core'));\n protected readonly resolvedHalfIcon = computed(() =>\n this.halfIcon() || 'star-half-fill:fill');\n protected readonly resolvedEmptyIcon = computed(() =>\n this.emptyIcon() || (this.hasHalfRating() ? 'star:regular' : 'star:core'));\n\n protected stars = computed(() => {\n const count = this.numberOfStars();\n const currentRating = this.internalRating();\n // A star is half-filled when the rating's fractional part is >= 0.5 and the\n // star sits just above the fully-filled stars (e.g. rating 3.5 → star 4 is half).\n const fullStars = Math.floor(currentRating);\n const hasHalf = currentRating - fullStars >= 0.5;\n return Array.from({ length: count }, (_, i) => {\n const index = i + 1;\n return {\n index,\n filled: index <= fullStars,\n half: hasHalf && index === fullStars + 1,\n };\n });\n });\n\n constructor() {\n effect(() => {\n const inputRating = this.rating();\n // Only sync input → internal when the input is explicitly set (non-zero).\n // writeValue from reactive forms also writes to internalRating directly.\n if (inputRating !== 0) {\n this.internalRating.set(inputRating);\n }\n });\n\n effect(() => {\n this.internalDisabled.set(this.disabled());\n });\n\n afterNextRender(() => {\n this.starButtons().forEach((buttonRef) => {\n buttonRef.nativeElement?.addEventListener('blur', () => this._onTouched());\n });\n });\n }\n\n // ControlValueAccessor\n writeValue(value: number): void {\n this.internalRating.set(value ?? 0);\n }\n\n registerOnChange(fn: (value: number) => void): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.internalDisabled.set(isDisabled);\n }\n\n /**\n * Returns the tabindex for a star button (roving tabindex pattern).\n */\n protected getTabIndex(starIndex: number): number {\n // Fractional ratings (e.g. 3.5) are display-only; snap to the nearest whole\n // star so the roving-tabindex pattern always has exactly one focusable star.\n const current = Math.round(this.internalRating());\n if (current === 0) {\n return starIndex === 1 ? 0 : -1;\n }\n return starIndex === current ? 0 : -1;\n }\n\n /**\n * Handles clicking a star — toggles off if same star clicked again.\n */\n protected onStarClick(starIndex: number): void {\n if (this.isNonInteractive()) return;\n\n if (this.hasHalfRating()) {\n // Cycle this star position through half → full → removed, so each click\n // adds or removes half a star.\n const current = this.internalRating();\n let newRating: number;\n if (current === starIndex - 0.5) {\n newRating = starIndex; // half → full\n } else if (current === starIndex) {\n newRating = starIndex - 1; // full → remove this star\n } else {\n newRating = starIndex - 0.5; // → half\n }\n this.updateRating(newRating);\n return;\n }\n\n const newRating = this.internalRating() === starIndex ? 0 : starIndex;\n this.updateRating(newRating);\n }\n\n /**\n * Handles keyboard navigation within the rating group.\n * Implements WAI-ARIA APG Radio Group pattern with wrapping arrows and Space key.\n */\n protected onKeydown(event: KeyboardEvent, starIndex: number): void {\n if (this.isNonInteractive()) return;\n\n const total = this.numberOfStars();\n\n // Half-step editing: arrows move the rating by 0.5 and clamp at the ends.\n if (this.hasHalfRating()) {\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp': {\n event.preventDefault();\n const next = Math.min(total, this.internalRating() + 0.5);\n this.updateRating(next);\n this.focusStar(Math.max(0, Math.ceil(next) - 1));\n break;\n }\n case 'ArrowLeft':\n case 'ArrowDown': {\n event.preventDefault();\n const prev = Math.max(0, this.internalRating() - 0.5);\n this.updateRating(prev);\n this.focusStar(Math.max(0, Math.ceil(prev) - 1));\n break;\n }\n case 'Home': {\n event.preventDefault();\n this.updateRating(0.5);\n this.focusStar(0);\n break;\n }\n case 'End': {\n event.preventDefault();\n this.updateRating(total);\n this.focusStar(total - 1);\n break;\n }\n }\n return;\n }\n\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp': {\n event.preventDefault();\n const nextIndex = starIndex === total ? 1 : starIndex + 1;\n this.updateRating(nextIndex);\n this.focusStar(nextIndex - 1);\n break;\n }\n case 'ArrowLeft':\n case 'ArrowDown': {\n event.preventDefault();\n const prevIndex = starIndex === 1 ? total : starIndex - 1;\n this.updateRating(prevIndex);\n this.focusStar(prevIndex - 1);\n break;\n }\n case ' ': {\n event.preventDefault();\n if (this.internalRating() !== starIndex) {\n this.updateRating(starIndex);\n }\n break;\n }\n case 'Home': {\n event.preventDefault();\n this.updateRating(1);\n this.focusStar(0);\n break;\n }\n case 'End': {\n event.preventDefault();\n this.updateRating(total);\n this.focusStar(total - 1);\n break;\n }\n }\n }\n\n protected onBlur(): void {\n this._onTouched();\n }\n\n private updateRating(value: number): void {\n this.internalRating.set(value);\n this.ratingChange.emit(value);\n this._onChange(value);\n }\n\n private focusStar(arrayIndex: number): void {\n const buttons = this.starButtons();\n if (buttons[arrayIndex]) {\n buttons[arrayIndex].nativeElement.focus();\n }\n }\n\n private _onChange: (value: number) => void = () => {/* noop */};\n private _onTouched: () => void = () => {/* noop */};\n}\n",
|
|
76029
76029
|
"styleUrl": "./eds-rating.scss",
|
|
76030
76030
|
"assetsDirs": [],
|
|
76031
76031
|
"styleUrlsData": [
|
|
76032
76032
|
{
|
|
76033
|
-
"data": "@use '../base' as base;\n\n:host {\n display: inline-flex;\n align-items: center;\n\n .eds-rating__stars {\n display: inline-flex;\n align-items: center;\n }\n\n .eds-rating__star {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: var(--eds-sp-
|
|
76033
|
+
"data": "@use '../base' as base;\n\n:host {\n display: inline-flex;\n align-items: center;\n\n .eds-rating__stars {\n display: inline-flex;\n align-items: center;\n }\n\n .eds-rating__star {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: var(--eds-sp-xs); //EDS aligned\n border: none;\n background: transparent;\n cursor: pointer;\n border-radius: var(--eds-br-full);\n color: var(--eds-c-foreground-subtler);\n transition: color 150ms ease-in-out, transform 150ms ease-in-out;\n\n @include base.eds-focus-visible-ring();\n\n &:hover:not(:disabled) {\n transform: scale(1.15);\n background-color: var(--eds-c-surface-neutral-subtler);\n }\n\n &--filled,\n &--half {\n --_eds-rating-on-surface: var(--eds-c-foreground-primary);\n color: var(--eds-c-foreground-primary);\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n }\n\n .eds-rating__label {\n font: var(--eds-f-heading-xl);\n font-weight: var(--eds-f-w-semibold);\n letter-spacing: var(--eds-f-ls-6xl);\n color: var(--eds-c-foreground);\n }\n\n .eds-rating__sublabel {\n font: var(--eds-f-paragraph-m);\n color: var(--eds-c-foreground-subtle);\n }\n}\n\n// Stacked layout when a label and/or sub-label is present.\n:host([has-text]) {\n align-items: center;\n display: inline-flex;\n flex-direction: column;\n}\n\n:host([size=\"s\"]) {\n .eds-rating__star {\n padding: var(--eds-sp-4xs);\n }\n\n .eds-rating__label {\n font: var(--eds-f-heading-l);\n letter-spacing: var(--eds-f-ls-4xl);\n }\n}\n\n:host([disabled]) {\n .eds-icon {\n --_eds-icon-color: var(--eds-c-foreground-disabled);\n }\n}\n\n:host([readonly]) {\n .eds-rating__star {\n cursor: default;\n\n &:hover:not(:disabled) {\n transform: none;\n }\n }\n}\n",
|
|
76034
76034
|
"styleUrl": "./eds-rating.scss"
|
|
76035
76035
|
}
|
|
76036
76036
|
],
|
package/docs/llms.txt
CHANGED
package/docs/properties.html
CHANGED
|
@@ -129,7 +129,7 @@ class EdsButton {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
132
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: EdsButton, isStandalone: true, selector: "button[edsButton]", inputs: { e2eAttr: { classPropertyName: "e2eAttr", publicName: "e2eAttr", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, isBlock: { classPropertyName: "isBlock", publicName: "isBlock", isSignal: true, isRequired: false, transformFunction: null }, hasLineWrap: { classPropertyName: "hasLineWrap", publicName: "hasLineWrap", isSignal: true, isRequired: false, transformFunction: null }, isRounded: { classPropertyName: "isRounded", publicName: "isRounded", isSignal: true, isRequired: false, transformFunction: null }, isAvatarButton: { classPropertyName: "isAvatarButton", publicName: "isAvatarButton", isSignal: true, isRequired: false, transformFunction: null }, isChecked: { classPropertyName: "isChecked", publicName: "isChecked", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.type-variant": "variant()", "attr.color": "color()", "attr.size": "size()", "attr.rounded": "isRounded() || null", "attr.avatar-button": "isAvatarButton() || null", "attr.block": "isBlock() || null", "attr.line-wrap": "hasLineWrap() || null", "attr.data-e2e": "e2eAttr()", "attr.id": "id()", "attr.aria-disabled": "disabled() || null", "attr.disabled": "null" }, classAttribute: "eds-button" }, ngImport: i0, template: "<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n", styles: [".eui-21 :host.eds-button[type-variant=primary]{--_border-width: var(--eds-bw-none);--_border-color: transparent;--_border-color-hover: transparent;--_border-color-active: transparent}.eui-21 :host.eds-button[type-variant=primary][color=primary]{--_surface: var(--eds-c-surface-primary);--_on-surface: var(--eds-c-on-surface-primary);--_surface-hover: var(--eds-c-surface-primary--hover);--_on-surface-hover: var(--eds-c-on-surface-primary);--_surface-active: var(--eds-c-surface-primary--pressed);--_on-surface-active: var(--eds-c-on-surface-primary)}.eui-21 :host.eds-button[type-variant=primary][color=highlight]{--_surface: var(--eds-c-surface-highlight);--_on-surface: var(--eds-c-on-surface-highlight);--_surface-hover: var(--eds-c-surface-highlight--hover);--_on-surface-hover: var(--eds-c-on-surface-highlight);--_surface-active: var(--eds-c-surface-highlight--pressed);--_on-surface-active: var(--eds-c-on-surface-highlight)}.eui-21 :host.eds-button[type-variant=primary][color=critical]{--_surface: var(--eds-c-surface-critical);--_on-surface: var(--eds-c-on-surface-critical);--_surface-hover: var(--eds-c-surface-critical--hover);--_on-surface-hover: var(--eds-c-on-surface-critical);--_surface-active: var(--eds-c-surface-critical--pressed);--_on-surface-active: var(--eds-c-on-surface-critical)}.eui-21 :host.eds-button[type-variant=primary][aria-disabled=true],.eui-21 :host.eds-button[type-variant=primary][disabled]{--_surface: var(--eds-c-surface-disabled);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-disabled);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-disabled);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[type-variant=secondary]{--_border-width: var(--eds-bw-xs);--_surface: transparent}.eui-21 :host.eds-button[type-variant=secondary][color=primary]{--_border-color: var(--eds-c-border-primary);--_border-color-hover: var(--eds-c-border-primary--hover);--_border-color-active: var(--eds-c-border-primary--pressed);--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button[type-variant=secondary][color=neutral]{--_border-color: var(--eds-c-border-neutral);--_border-color-hover: var(--eds-c-border-neutral-strong);--_border-color-active: var(--eds-c-border-neutral-strong);--_on-surface: var(--eds-c-foreground-subtle);--_surface-hover: var(--eds-c-surface-neutral-subtler);--_on-surface-hover: var(--eds-c-on-surface-neutral-subtler);--_surface-active: var(--eds-c-surface-neutral-subtler);--_on-surface-active: var(--eds-c-on-surface-neutral-subtler)}.eui-21 :host.eds-button[type-variant=secondary][color=highlight]{--_border-color: var(--eds-c-border-highlight);--_border-color-hover: var(--eds-c-border-highlight--hover);--_border-color-active: var(--eds-c-border-highlight--pressed);--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button[type-variant=secondary][color=critical]{--_border-color: var(--eds-c-border-critical);--_border-color-hover: var(--eds-c-border-critical);--_border-color-active: var(--eds-c-border-critical);--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--eds-c-surface-critical-subtler);--_on-surface-hover: var(--eds-c-on-surface-critical-subtler);--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button[type-variant=secondary][aria-disabled=true],.eui-21 :host.eds-button[type-variant=secondary][disabled]{--_border-width: var(--eds-bw-xs);--_border-color: var(--eds-c-border-disabled);--_border-color-hover: var(--eds-c-border-disabled);--_border-color-active: var(--eds-c-border-disabled);--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[type-variant=tertiary]{--_border-width: var(--eds-bw-none);--_surface: transparent}.eui-21 :host.eds-button[type-variant=tertiary][color=primary]{--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button[type-variant=tertiary][color=neutral]{--_on-surface: var(--eds-c-foreground);--_surface-hover: var(--eds-c-surface-neutral-subtler);--_on-surface-hover: var(--eds-c-on-surface-neutral-subtler);--_surface-active: var(--eds-c-surface-neutral-subtler);--_on-surface-active: var(--eds-c-on-surface-neutral-subtler)}.eui-21 :host.eds-button[type-variant=tertiary][color=highlight]{--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button[type-variant=tertiary][aria-disabled=true],.eui-21 :host.eds-button[type-variant=tertiary][disabled]{--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[size=m]{--_font-size: var(--eds-f-s-m);--_padding: var(--eds-sp-xs);--_size: var(--eds-si-4xl);--_icon-size: var(--eds-is-m);--_gap: var(--eds-is-3xs)}.eui-21 :host.eds-button[size=s]{--_font-size: var(--eds-f-s-s);--_padding: var(--eds-sp-2xs);--_size: calc(var(--eds-si-3xl) + var(--eds-si-2xs));--_icon-size: var(--eds-is-s);--_gap: var(--eds-is-xs)}.eui-21 :host.eds-button[size=l]{--_font-size: var(--eds-f-s-l);--_padding: var(--eds-sp-s);--_size: var(--eds-si-6xl);--_icon-size: var(--eds-is-m);--_gap: calc(var(--eds-is-xs) + var(--eds-is-3xs))}.eui-21 :host.eds-button{align-items:center;background-image:none;border-radius:var(--eds-br-s);box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;outline:none;text-transform:none;transition:none;vertical-align:middle;white-space:nowrap;border-style:solid}.eui-21 :host.eds-button .eds-button__container{align-items:center;display:inline-flex;position:relative;gap:var(--eds-sp-2xs);justify-content:center;width:100%}.eui-21 :host.eds-button{background-color:var(--_surface);color:var(--_on-surface);border-width:var(--_border-width);border-color:var(--_border-color);font-size:var(--_font-size);font-weight:var(--eds-f-w-medium);min-height:var(--_size);min-width:var(--_size);padding:var(--_padding);gap:var(--_gap);--_eds-icon-color-inherit: var(--_on-surface);--_eds-icon-size-inherit: var(--_icon-size)}.eui-21 :host.eds-button:hover,.eui-21 :host.eds-button:focus{background-color:var(--_surface-hover);color:var(--_on-surface-hover);border-color:var(--_border-color-hover);--_eds-icon-color-inherit: var(--_on-surface-hover)}.eui-21 :host.eds-button:active{background-color:var(--_surface-active);color:var(--_on-surface-active);border-color:var(--_border-color-active);--_eds-icon-color-inherit: var(--_on-surface-active)}.eui-21 :host.eds-button:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:2px!important}.eui-21 :host.eds-button[color=critical]:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-focus-critical)!important;outline-offset:2px!important}.eui-21 :host.eds-button[aria-disabled=true],.eui-21 :host.eds-button[disabled]{cursor:not-allowed}.eui-21 :host.eds-button[rounded]{border-radius:var(--eds-br-full)}.eui-21 :host.eds-button[rounded]:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:2px!important}.eui-21 :host.eds-button[avatar-button]{border-radius:var(--eds-br-full);border:var(--eds-bw-s) solid transparent;padding:0}.eui-21 :host.eds-button[avatar-button]:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:2px!important}.eui-21 :host.eds-button[avatar-button]:hover{border-color:var(--eds-c-border-primary--hover)}.eui-21 :host.eds-button[avatar-button]:active{border-color:var(--eds-c-border-primary--pressed)}.eui-21 :host.eds-button[block]{align-items:center;display:flex;width:100%}.eui-21 :host.eds-button[block] .eds-button__container{display:block;min-width:0;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.eui-21 :host.eds-button[block] .eds-button__container .eds-icon{vertical-align:middle}.eui-21 :host.eds-button[line-wrap]{white-space:normal}.eui-21 :host.eds-button[line-wrap] .eds-button__container{line-height:var(--eds-f-lh-m, 1.5rem);white-space:normal}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
132
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: EdsButton, isStandalone: true, selector: "button[edsButton]", inputs: { e2eAttr: { classPropertyName: "e2eAttr", publicName: "e2eAttr", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, isBlock: { classPropertyName: "isBlock", publicName: "isBlock", isSignal: true, isRequired: false, transformFunction: null }, hasLineWrap: { classPropertyName: "hasLineWrap", publicName: "hasLineWrap", isSignal: true, isRequired: false, transformFunction: null }, isRounded: { classPropertyName: "isRounded", publicName: "isRounded", isSignal: true, isRequired: false, transformFunction: null }, isAvatarButton: { classPropertyName: "isAvatarButton", publicName: "isAvatarButton", isSignal: true, isRequired: false, transformFunction: null }, isChecked: { classPropertyName: "isChecked", publicName: "isChecked", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.type-variant": "variant()", "attr.color": "color()", "attr.size": "size()", "attr.rounded": "isRounded() || null", "attr.avatar-button": "isAvatarButton() || null", "attr.block": "isBlock() || null", "attr.line-wrap": "hasLineWrap() || null", "attr.data-e2e": "e2eAttr()", "attr.id": "id()", "attr.aria-disabled": "disabled() || null", "attr.disabled": "null" }, classAttribute: "eds-button" }, ngImport: i0, template: "<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n", styles: [".eui-21 :host.eds-button[type-variant=primary]{--_border-width: var(--eds-bw-none);--_border-color: transparent;--_border-color-hover: transparent;--_border-color-active: transparent}.eui-21 :host.eds-button[type-variant=primary][color=primary]{--_surface: var(--eds-c-surface-primary);--_on-surface: var(--eds-c-on-surface-primary);--_surface-hover: var(--eds-c-surface-primary--hover);--_on-surface-hover: var(--eds-c-on-surface-primary);--_surface-active: var(--eds-c-surface-primary--pressed);--_on-surface-active: var(--eds-c-on-surface-primary)}.eui-21 :host.eds-button[type-variant=primary][color=highlight]{--_surface: var(--eds-c-surface-highlight);--_on-surface: var(--eds-c-on-surface-highlight);--_surface-hover: var(--eds-c-surface-highlight--hover);--_on-surface-hover: var(--eds-c-on-surface-highlight);--_surface-active: var(--eds-c-surface-highlight--pressed);--_on-surface-active: var(--eds-c-on-surface-highlight)}.eui-21 :host.eds-button[type-variant=primary][color=critical]{--_surface: var(--eds-c-surface-critical);--_on-surface: var(--eds-c-on-surface-critical);--_surface-hover: var(--eds-c-surface-critical--hover);--_on-surface-hover: var(--eds-c-on-surface-critical);--_surface-active: var(--eds-c-surface-critical--pressed);--_on-surface-active: var(--eds-c-on-surface-critical)}.eui-21 :host.eds-button[type-variant=primary][aria-disabled=true],.eui-21 :host.eds-button[type-variant=primary][disabled]{--_surface: var(--eds-c-surface-disabled);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-disabled);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-disabled);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[type-variant=secondary]{--_border-width: var(--eds-bw-xs);--_surface: transparent}.eui-21 :host.eds-button[type-variant=secondary][color=primary]{--_border-color: var(--eds-c-border-primary);--_border-color-hover: var(--eds-c-border-primary--hover);--_border-color-active: var(--eds-c-border-primary--pressed);--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button[type-variant=secondary][color=neutral]{--_border-color: var(--eds-c-border-neutral);--_border-color-hover: var(--eds-c-border-neutral-strong);--_border-color-active: var(--eds-c-border-neutral-strong);--_on-surface: var(--eds-c-foreground-subtle);--_surface-hover: var(--eds-c-surface-neutral-subtler);--_on-surface-hover: var(--eds-c-on-surface-neutral-subtler);--_surface-active: var(--eds-c-surface-neutral-subtler);--_on-surface-active: var(--eds-c-on-surface-neutral-subtler)}.eui-21 :host.eds-button[type-variant=secondary][color=highlight]{--_border-color: var(--eds-c-border-highlight);--_border-color-hover: var(--eds-c-border-highlight--hover);--_border-color-active: var(--eds-c-border-highlight--pressed);--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button[type-variant=secondary][color=critical]{--_border-color: var(--eds-c-border-critical);--_border-color-hover: var(--eds-c-border-critical);--_border-color-active: var(--eds-c-border-critical);--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--eds-c-surface-critical-subtler);--_on-surface-hover: var(--eds-c-on-surface-critical-subtler);--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button[type-variant=secondary][aria-disabled=true],.eui-21 :host.eds-button[type-variant=secondary][disabled]{--_border-width: var(--eds-bw-xs);--_border-color: var(--eds-c-border-disabled);--_border-color-hover: var(--eds-c-border-disabled);--_border-color-active: var(--eds-c-border-disabled);--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[type-variant=tertiary]{--_border-width: var(--eds-bw-none);--_surface: transparent}.eui-21 :host.eds-button[type-variant=tertiary][color=primary]{--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button[type-variant=tertiary][color=neutral]{--_on-surface: var(--eds-c-foreground);--_surface-hover: var(--eds-c-surface-neutral-subtler);--_on-surface-hover: var(--eds-c-on-surface-neutral-subtler);--_surface-active: var(--eds-c-surface-neutral-subtler);--_on-surface-active: var(--eds-c-on-surface-neutral-subtler)}.eui-21 :host.eds-button[type-variant=tertiary][color=highlight]{--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button[type-variant=tertiary][aria-disabled=true],.eui-21 :host.eds-button[type-variant=tertiary][disabled]{--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[size=m]{--_font-size: var(--eds-f-s-m);--_padding: var(--eds-sp-xs);--_size: var(--eds-si-4xl);--_icon-size: var(--eds-is-m);--_gap: var(--eds-is-3xs)}.eui-21 :host.eds-button[size=s]{--_font-size: var(--eds-f-s-s);--_padding: var(--eds-sp-2xs);--_size: calc(var(--eds-si-3xl) + var(--eds-si-2xs));--_icon-size: var(--eds-is-s);--_gap: var(--eds-is-xs)}.eui-21 :host.eds-button[size=l]{--_font-size: var(--eds-f-s-l);--_padding: var(--eds-sp-s);--_size: var(--eds-si-6xl);--_icon-size: var(--eds-is-m);--_gap: calc(var(--eds-is-xs) + var(--eds-is-3xs))}.eui-21 :host.eds-button{align-items:center;background-image:none;border-radius:var(--eds-br-s);box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;outline:none;text-transform:none;transition:none;vertical-align:middle;white-space:nowrap;border-style:solid}.eui-21 :host.eds-button .eds-button__container{align-items:center;display:inline-flex;position:relative;gap:var(--eds-sp-2xs);justify-content:center;width:100%}.eui-21 :host.eds-button{background-color:var(--_surface);color:var(--_on-surface);border-width:var(--_border-width);border-color:var(--_border-color);font-size:var(--_font-size);font-weight:var(--eds-f-w-medium);min-height:var(--_size);min-width:var(--_size);padding:var(--_padding);gap:var(--_gap);--_eds-icon-color-inherit: var(--_on-surface);--_eds-icon-size-inherit: var(--_icon-size)}.eui-21 :host.eds-button:hover,.eui-21 :host.eds-button:focus{background-color:var(--_surface-hover);color:var(--_on-surface-hover);border-color:var(--_border-color-hover);--_eds-icon-color-inherit: var(--_on-surface-hover)}.eui-21 :host.eds-button:active{background-color:var(--_surface-active);color:var(--_on-surface-active);border-color:var(--_border-color-active);--_eds-icon-color-inherit: var(--_on-surface-active)}.eui-21 :host.eds-button:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:2px!important}.eui-21 :host.eds-button[color=critical]:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-focus-critical)!important;outline-offset:2px!important}.eui-21 :host.eds-button[aria-disabled=true],.eui-21 :host.eds-button[disabled]{cursor:not-allowed}.eui-21 :host.eds-button[rounded]{border-radius:var(--eds-br-full)}.eui-21 :host.eds-button[rounded]:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:2px!important}.eui-21 :host.eds-button[avatar-button]{border-radius:var(--eds-br-full);border:var(--eds-bw-s) solid transparent;padding:0}.eui-21 :host.eds-button[avatar-button]:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:2px!important}.eui-21 :host.eds-button[avatar-button]:hover{border-color:var(--eds-c-border-primary--hover)}.eui-21 :host.eds-button[avatar-button]:active{border-color:var(--eds-c-border-primary--pressed)}.eui-21 :host.eds-button[block]{align-items:center;display:flex;width:100%}.eui-21 :host.eds-button[line-wrap]{white-space:normal}.eui-21 :host.eds-button[line-wrap] .eds-button__container{line-height:var(--eds-f-lh-m, 1.5rem);white-space:normal}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
133
133
|
}
|
|
134
134
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsButton, decorators: [{
|
|
135
135
|
type: Component,
|
|
@@ -155,7 +155,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
|
|
|
155
155
|
// element — which would remove it from the tab order and defeat the focusable-disabled
|
|
156
156
|
// behavior. Force the native attribute off so ONLY `aria-disabled` conveys the state.
|
|
157
157
|
'[attr.disabled]': 'null',
|
|
158
|
-
}, template: "<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n", styles: [".eui-21 :host.eds-button[type-variant=primary]{--_border-width: var(--eds-bw-none);--_border-color: transparent;--_border-color-hover: transparent;--_border-color-active: transparent}.eui-21 :host.eds-button[type-variant=primary][color=primary]{--_surface: var(--eds-c-surface-primary);--_on-surface: var(--eds-c-on-surface-primary);--_surface-hover: var(--eds-c-surface-primary--hover);--_on-surface-hover: var(--eds-c-on-surface-primary);--_surface-active: var(--eds-c-surface-primary--pressed);--_on-surface-active: var(--eds-c-on-surface-primary)}.eui-21 :host.eds-button[type-variant=primary][color=highlight]{--_surface: var(--eds-c-surface-highlight);--_on-surface: var(--eds-c-on-surface-highlight);--_surface-hover: var(--eds-c-surface-highlight--hover);--_on-surface-hover: var(--eds-c-on-surface-highlight);--_surface-active: var(--eds-c-surface-highlight--pressed);--_on-surface-active: var(--eds-c-on-surface-highlight)}.eui-21 :host.eds-button[type-variant=primary][color=critical]{--_surface: var(--eds-c-surface-critical);--_on-surface: var(--eds-c-on-surface-critical);--_surface-hover: var(--eds-c-surface-critical--hover);--_on-surface-hover: var(--eds-c-on-surface-critical);--_surface-active: var(--eds-c-surface-critical--pressed);--_on-surface-active: var(--eds-c-on-surface-critical)}.eui-21 :host.eds-button[type-variant=primary][aria-disabled=true],.eui-21 :host.eds-button[type-variant=primary][disabled]{--_surface: var(--eds-c-surface-disabled);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-disabled);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-disabled);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[type-variant=secondary]{--_border-width: var(--eds-bw-xs);--_surface: transparent}.eui-21 :host.eds-button[type-variant=secondary][color=primary]{--_border-color: var(--eds-c-border-primary);--_border-color-hover: var(--eds-c-border-primary--hover);--_border-color-active: var(--eds-c-border-primary--pressed);--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button[type-variant=secondary][color=neutral]{--_border-color: var(--eds-c-border-neutral);--_border-color-hover: var(--eds-c-border-neutral-strong);--_border-color-active: var(--eds-c-border-neutral-strong);--_on-surface: var(--eds-c-foreground-subtle);--_surface-hover: var(--eds-c-surface-neutral-subtler);--_on-surface-hover: var(--eds-c-on-surface-neutral-subtler);--_surface-active: var(--eds-c-surface-neutral-subtler);--_on-surface-active: var(--eds-c-on-surface-neutral-subtler)}.eui-21 :host.eds-button[type-variant=secondary][color=highlight]{--_border-color: var(--eds-c-border-highlight);--_border-color-hover: var(--eds-c-border-highlight--hover);--_border-color-active: var(--eds-c-border-highlight--pressed);--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button[type-variant=secondary][color=critical]{--_border-color: var(--eds-c-border-critical);--_border-color-hover: var(--eds-c-border-critical);--_border-color-active: var(--eds-c-border-critical);--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--eds-c-surface-critical-subtler);--_on-surface-hover: var(--eds-c-on-surface-critical-subtler);--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button[type-variant=secondary][aria-disabled=true],.eui-21 :host.eds-button[type-variant=secondary][disabled]{--_border-width: var(--eds-bw-xs);--_border-color: var(--eds-c-border-disabled);--_border-color-hover: var(--eds-c-border-disabled);--_border-color-active: var(--eds-c-border-disabled);--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[type-variant=tertiary]{--_border-width: var(--eds-bw-none);--_surface: transparent}.eui-21 :host.eds-button[type-variant=tertiary][color=primary]{--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button[type-variant=tertiary][color=neutral]{--_on-surface: var(--eds-c-foreground);--_surface-hover: var(--eds-c-surface-neutral-subtler);--_on-surface-hover: var(--eds-c-on-surface-neutral-subtler);--_surface-active: var(--eds-c-surface-neutral-subtler);--_on-surface-active: var(--eds-c-on-surface-neutral-subtler)}.eui-21 :host.eds-button[type-variant=tertiary][color=highlight]{--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button[type-variant=tertiary][aria-disabled=true],.eui-21 :host.eds-button[type-variant=tertiary][disabled]{--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[size=m]{--_font-size: var(--eds-f-s-m);--_padding: var(--eds-sp-xs);--_size: var(--eds-si-4xl);--_icon-size: var(--eds-is-m);--_gap: var(--eds-is-3xs)}.eui-21 :host.eds-button[size=s]{--_font-size: var(--eds-f-s-s);--_padding: var(--eds-sp-2xs);--_size: calc(var(--eds-si-3xl) + var(--eds-si-2xs));--_icon-size: var(--eds-is-s);--_gap: var(--eds-is-xs)}.eui-21 :host.eds-button[size=l]{--_font-size: var(--eds-f-s-l);--_padding: var(--eds-sp-s);--_size: var(--eds-si-6xl);--_icon-size: var(--eds-is-m);--_gap: calc(var(--eds-is-xs) + var(--eds-is-3xs))}.eui-21 :host.eds-button{align-items:center;background-image:none;border-radius:var(--eds-br-s);box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;outline:none;text-transform:none;transition:none;vertical-align:middle;white-space:nowrap;border-style:solid}.eui-21 :host.eds-button .eds-button__container{align-items:center;display:inline-flex;position:relative;gap:var(--eds-sp-2xs);justify-content:center;width:100%}.eui-21 :host.eds-button{background-color:var(--_surface);color:var(--_on-surface);border-width:var(--_border-width);border-color:var(--_border-color);font-size:var(--_font-size);font-weight:var(--eds-f-w-medium);min-height:var(--_size);min-width:var(--_size);padding:var(--_padding);gap:var(--_gap);--_eds-icon-color-inherit: var(--_on-surface);--_eds-icon-size-inherit: var(--_icon-size)}.eui-21 :host.eds-button:hover,.eui-21 :host.eds-button:focus{background-color:var(--_surface-hover);color:var(--_on-surface-hover);border-color:var(--_border-color-hover);--_eds-icon-color-inherit: var(--_on-surface-hover)}.eui-21 :host.eds-button:active{background-color:var(--_surface-active);color:var(--_on-surface-active);border-color:var(--_border-color-active);--_eds-icon-color-inherit: var(--_on-surface-active)}.eui-21 :host.eds-button:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:2px!important}.eui-21 :host.eds-button[color=critical]:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-focus-critical)!important;outline-offset:2px!important}.eui-21 :host.eds-button[aria-disabled=true],.eui-21 :host.eds-button[disabled]{cursor:not-allowed}.eui-21 :host.eds-button[rounded]{border-radius:var(--eds-br-full)}.eui-21 :host.eds-button[rounded]:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:2px!important}.eui-21 :host.eds-button[avatar-button]{border-radius:var(--eds-br-full);border:var(--eds-bw-s) solid transparent;padding:0}.eui-21 :host.eds-button[avatar-button]:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:2px!important}.eui-21 :host.eds-button[avatar-button]:hover{border-color:var(--eds-c-border-primary--hover)}.eui-21 :host.eds-button[avatar-button]:active{border-color:var(--eds-c-border-primary--pressed)}.eui-21 :host.eds-button[block]{align-items:center;display:flex;width:100%}.eui-21 :host.eds-button[
|
|
158
|
+
}, template: "<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n", styles: [".eui-21 :host.eds-button[type-variant=primary]{--_border-width: var(--eds-bw-none);--_border-color: transparent;--_border-color-hover: transparent;--_border-color-active: transparent}.eui-21 :host.eds-button[type-variant=primary][color=primary]{--_surface: var(--eds-c-surface-primary);--_on-surface: var(--eds-c-on-surface-primary);--_surface-hover: var(--eds-c-surface-primary--hover);--_on-surface-hover: var(--eds-c-on-surface-primary);--_surface-active: var(--eds-c-surface-primary--pressed);--_on-surface-active: var(--eds-c-on-surface-primary)}.eui-21 :host.eds-button[type-variant=primary][color=highlight]{--_surface: var(--eds-c-surface-highlight);--_on-surface: var(--eds-c-on-surface-highlight);--_surface-hover: var(--eds-c-surface-highlight--hover);--_on-surface-hover: var(--eds-c-on-surface-highlight);--_surface-active: var(--eds-c-surface-highlight--pressed);--_on-surface-active: var(--eds-c-on-surface-highlight)}.eui-21 :host.eds-button[type-variant=primary][color=critical]{--_surface: var(--eds-c-surface-critical);--_on-surface: var(--eds-c-on-surface-critical);--_surface-hover: var(--eds-c-surface-critical--hover);--_on-surface-hover: var(--eds-c-on-surface-critical);--_surface-active: var(--eds-c-surface-critical--pressed);--_on-surface-active: var(--eds-c-on-surface-critical)}.eui-21 :host.eds-button[type-variant=primary][aria-disabled=true],.eui-21 :host.eds-button[type-variant=primary][disabled]{--_surface: var(--eds-c-surface-disabled);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-disabled);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-disabled);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[type-variant=secondary]{--_border-width: var(--eds-bw-xs);--_surface: transparent}.eui-21 :host.eds-button[type-variant=secondary][color=primary]{--_border-color: var(--eds-c-border-primary);--_border-color-hover: var(--eds-c-border-primary--hover);--_border-color-active: var(--eds-c-border-primary--pressed);--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button[type-variant=secondary][color=neutral]{--_border-color: var(--eds-c-border-neutral);--_border-color-hover: var(--eds-c-border-neutral-strong);--_border-color-active: var(--eds-c-border-neutral-strong);--_on-surface: var(--eds-c-foreground-subtle);--_surface-hover: var(--eds-c-surface-neutral-subtler);--_on-surface-hover: var(--eds-c-on-surface-neutral-subtler);--_surface-active: var(--eds-c-surface-neutral-subtler);--_on-surface-active: var(--eds-c-on-surface-neutral-subtler)}.eui-21 :host.eds-button[type-variant=secondary][color=highlight]{--_border-color: var(--eds-c-border-highlight);--_border-color-hover: var(--eds-c-border-highlight--hover);--_border-color-active: var(--eds-c-border-highlight--pressed);--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button[type-variant=secondary][color=critical]{--_border-color: var(--eds-c-border-critical);--_border-color-hover: var(--eds-c-border-critical);--_border-color-active: var(--eds-c-border-critical);--_on-surface: var(--eds-c-foreground-critical);--_surface-hover: var(--eds-c-surface-critical-subtler);--_on-surface-hover: var(--eds-c-on-surface-critical-subtler);--_surface-active: var(--eds-c-surface-critical-subtler);--_on-surface-active: var(--eds-c-on-surface-critical-subtler)}.eui-21 :host.eds-button[type-variant=secondary][aria-disabled=true],.eui-21 :host.eds-button[type-variant=secondary][disabled]{--_border-width: var(--eds-bw-xs);--_border-color: var(--eds-c-border-disabled);--_border-color-hover: var(--eds-c-border-disabled);--_border-color-active: var(--eds-c-border-disabled);--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[type-variant=tertiary]{--_border-width: var(--eds-bw-none);--_surface: transparent}.eui-21 :host.eds-button[type-variant=tertiary][color=primary]{--_on-surface: var(--eds-c-foreground-primary);--_surface-hover: var(--eds-c-surface-primary-subtle);--_on-surface-hover: var(--eds-c-on-surface-primary-subtle);--_surface-active: var(--eds-c-surface-primary-subtle);--_on-surface-active: var(--eds-c-on-surface-primary-subtle)}.eui-21 :host.eds-button[type-variant=tertiary][color=neutral]{--_on-surface: var(--eds-c-foreground);--_surface-hover: var(--eds-c-surface-neutral-subtler);--_on-surface-hover: var(--eds-c-on-surface-neutral-subtler);--_surface-active: var(--eds-c-surface-neutral-subtler);--_on-surface-active: var(--eds-c-on-surface-neutral-subtler)}.eui-21 :host.eds-button[type-variant=tertiary][color=highlight]{--_on-surface: var(--eds-c-foreground-highlight);--_surface-hover: var(--eds-c-surface-highlight-subtler);--_on-surface-hover: var(--eds-c-on-surface-highlight-subtler);--_surface-active: var(--eds-c-surface-highlight-subtler);--_on-surface-active: var(--eds-c-on-surface-highlight-subtler)}.eui-21 :host.eds-button[type-variant=tertiary][aria-disabled=true],.eui-21 :host.eds-button[type-variant=tertiary][disabled]{--_surface: var(--eds-c-surface-elevation);--_on-surface: var(--eds-c-foreground-disabled);--_surface-hover: var(--eds-c-surface-elevation);--_on-surface-hover: var(--eds-c-foreground-disabled);--_surface-active: var(--eds-c-surface-elevation);--_on-surface-active: var(--eds-c-foreground-disabled)}.eui-21 :host.eds-button[size=m]{--_font-size: var(--eds-f-s-m);--_padding: var(--eds-sp-xs);--_size: var(--eds-si-4xl);--_icon-size: var(--eds-is-m);--_gap: var(--eds-is-3xs)}.eui-21 :host.eds-button[size=s]{--_font-size: var(--eds-f-s-s);--_padding: var(--eds-sp-2xs);--_size: calc(var(--eds-si-3xl) + var(--eds-si-2xs));--_icon-size: var(--eds-is-s);--_gap: var(--eds-is-xs)}.eui-21 :host.eds-button[size=l]{--_font-size: var(--eds-f-s-l);--_padding: var(--eds-sp-s);--_size: var(--eds-si-6xl);--_icon-size: var(--eds-is-m);--_gap: calc(var(--eds-is-xs) + var(--eds-is-3xs))}.eui-21 :host.eds-button{align-items:center;background-image:none;border-radius:var(--eds-br-s);box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;outline:none;text-transform:none;transition:none;vertical-align:middle;white-space:nowrap;border-style:solid}.eui-21 :host.eds-button .eds-button__container{align-items:center;display:inline-flex;position:relative;gap:var(--eds-sp-2xs);justify-content:center;width:100%}.eui-21 :host.eds-button{background-color:var(--_surface);color:var(--_on-surface);border-width:var(--_border-width);border-color:var(--_border-color);font-size:var(--_font-size);font-weight:var(--eds-f-w-medium);min-height:var(--_size);min-width:var(--_size);padding:var(--_padding);gap:var(--_gap);--_eds-icon-color-inherit: var(--_on-surface);--_eds-icon-size-inherit: var(--_icon-size)}.eui-21 :host.eds-button:hover,.eui-21 :host.eds-button:focus{background-color:var(--_surface-hover);color:var(--_on-surface-hover);border-color:var(--_border-color-hover);--_eds-icon-color-inherit: var(--_on-surface-hover)}.eui-21 :host.eds-button:active{background-color:var(--_surface-active);color:var(--_on-surface-active);border-color:var(--_border-color-active);--_eds-icon-color-inherit: var(--_on-surface-active)}.eui-21 :host.eds-button:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:2px!important}.eui-21 :host.eds-button[color=critical]:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-focus-critical)!important;outline-offset:2px!important}.eui-21 :host.eds-button[aria-disabled=true],.eui-21 :host.eds-button[disabled]{cursor:not-allowed}.eui-21 :host.eds-button[rounded]{border-radius:var(--eds-br-full)}.eui-21 :host.eds-button[rounded]:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:2px!important}.eui-21 :host.eds-button[avatar-button]{border-radius:var(--eds-br-full);border:var(--eds-bw-s) solid transparent;padding:0}.eui-21 :host.eds-button[avatar-button]:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:2px!important}.eui-21 :host.eds-button[avatar-button]:hover{border-color:var(--eds-c-border-primary--hover)}.eui-21 :host.eds-button[avatar-button]:active{border-color:var(--eds-c-border-primary--pressed)}.eui-21 :host.eds-button[block]{align-items:center;display:flex;width:100%}.eui-21 :host.eds-button[line-wrap]{white-space:normal}.eui-21 :host.eds-button[line-wrap] .eds-button__container{line-height:var(--eds-f-lh-m, 1.5rem);white-space:normal}\n"] }]
|
|
159
159
|
}], ctorParameters: () => [], propDecorators: { e2eAttr: [{ type: i0.Input, args: [{ isSignal: true, alias: "e2eAttr", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], isBlock: [{ type: i0.Input, args: [{ isSignal: true, alias: "isBlock", required: false }] }], hasLineWrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasLineWrap", required: false }] }], isRounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "isRounded", required: false }] }], isAvatarButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "isAvatarButton", required: false }] }], isChecked: [{ type: i0.Input, args: [{ isSignal: true, alias: "isChecked", required: false }] }] } });
|
|
160
160
|
|
|
161
161
|
/** Convenience array for importing all eds-button components. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-eds-eds-button.mjs","sources":["../../eds-button/eds-button.ts","../../eds-button/eds-button.html","../../eds-button/index.ts","../../eds-button/eui-eds-eds-button.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n booleanAttribute,\n input,\n inject,\n ElementRef,\n} from '@angular/core';\n\n/**\n * Local narrowed unions — the button's variant contract. No shared-token import.\n */\nexport type EdsButtonType = 'primary' | 'secondary' | 'tertiary';\n\n/**\n * Colors the button accepts. `primary` / `neutral` / `highlight` / `critical` have dedicated\n * SCSS branches; `warning` is accepted for parity but has no styled branch.\n */\nexport type EdsButtonColor = 'primary' | 'neutral' | 'highlight' | 'critical' | 'warning';\n\n/** Sizes the button styles (SCSS `:host([size=\"…\"])` branches). */\nexport type EdsButtonSize = 's' | 'm' | 'l';\n\n/**\n * EDS Button — a directive-style button component applied on native `<button>` elements.\n *\n * Supports multiple visual types (primary, secondary, tertiary), semantic color variants\n * (primary, neutral, highlight, critical), and sizes (s, m, l) via string inputs reflected\n * as host attributes.\n *\n * Usage:\n * ```html\n * <button edsButton size=\"m\" color=\"primary\">Label</button>\n * <button edsButton type=\"secondary\" color=\"neutral\" size=\"s\">Cancel</button>\n * <button edsButton type=\"tertiary\" color=\"critical\" [disabled]=\"isLoading\">Delete</button>\n * ```\n */\n@Component({\n templateUrl: './eds-button.html',\n // eslint-disable-next-line\n selector: 'button[edsButton]',\n styleUrl: './eds-button.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'eds-button',\n '[attr.type-variant]': 'variant()',\n '[attr.color]': 'color()',\n '[attr.size]': 'size()',\n '[attr.rounded]': 'isRounded() || null',\n '[attr.avatar-button]': 'isAvatarButton() || null',\n '[attr.block]': 'isBlock() || null',\n '[attr.line-wrap]': 'hasLineWrap() || null',\n '[attr.data-e2e]': 'e2eAttr()',\n '[attr.id]': 'id()',\n // A disabled button stays focusable and discoverable (WAI-ARIA \"focusable\n // disabled control\"): reflect state via `aria-disabled` instead of the native\n // `disabled` attribute, which would remove the element from the tab order and\n // suppress its focus style. Activation is cancelled by the capture-phase guards\n // registered in the constructor.\n '[attr.aria-disabled]': 'disabled() || null',\n // Consumers write the state as a bare `disabled` attribute (`<button edsButton disabled>`).\n // Since `disabled` is a native boolean attribute, Angular stamps it straight onto the\n // element — which would remove it from the tab order and defeat the focusable-disabled\n // behavior. Force the native attribute off so ONLY `aria-disabled` conveys the state.\n '[attr.disabled]': 'null',\n },\n})\nexport class EdsButton {\n /**\n * @description Data attribute for e2e testing\n * @default eds-button\n */\n e2eAttr = input('eds-button');\n\n /** @description ID attribute for the button element */\n id = input<string | undefined>(undefined);\n\n /**\n * Visual type of the button. `primary` = solid surface; `secondary` = bordered;\n * `tertiary` = text/ghost. Named `variant` (not `type`) on the Angular side to avoid\n * clashing with the native `<button type>` attribute; reflected as `[attr.type-variant]`\n * (the React projection exposes this axis as its `type` prop).\n * @default 'primary'\n */\n variant = input<EdsButtonType>('primary');\n\n /**\n * Semantic color of the button.\n * @default 'primary'\n */\n color = input<EdsButtonColor>('primary');\n\n /**\n * Size of the button.\n * @default 'm'\n */\n size = input<EdsButtonSize>('m');\n\n /**\n * @description Controls the disabled state of the button.\n * When true, adds the disabled attribute and prevents interaction.\n * @default false\n */\n disabled = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, makes the button full-width (block-level).\n * @default false\n */\n isBlock = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, allows text content to wrap.\n * @default false\n */\n hasLineWrap = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, applies a fully rounded border-radius.\n * @default false\n */\n isRounded = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, applies to avatar acting like a button trigger for the eds-dropdown\n * @default false\n */\n isAvatarButton = input(false, { transform: booleanAttribute });\n\n /**\n * @description\n * When true, marks the button as initially checked/selected within an eds-segmented-control.\n * The segmented-control reads this value during initialization to determine the initial selection state.\n * @default false\n */\n isChecked = input(false, { transform: booleanAttribute });\n\n private readonly host = inject<ElementRef<HTMLButtonElement>>(ElementRef);\n\n constructor() {\n const el = this.host.nativeElement;\n // Register in the CAPTURE phase so these guards run before any consumer-attached\n // `(click)` / `(keydown)` handler on the same element, regardless of registration\n // order. When disabled, cancel activation entirely (pointer + keyboard) while the\n // button remains in the tab order (aria-disabled, not native disabled).\n el.addEventListener('pointerdown', (event) => this.onPointerDown(event), true);\n el.addEventListener('click', (event) => this.onActivate(event), true);\n el.addEventListener('keydown', (event) => this.onKeydown(event), true);\n }\n\n /**\n * Keeps focus on the button when it is pressed while disabled. A disabled-styled button\n * (aria-disabled, not native `disabled`) does not reliably retain focus on mouse press\n * across engines, so focus lands on `document.body` and the next Tab restarts from the top\n * of the page. Explicitly focus the host on pointer-down to guarantee it stays the active\n * element. We do NOT `preventDefault()` (that would suppress the focus we want); activation\n * itself is still blocked in `onActivate` / `onKeydown`.\n */\n private onPointerDown(event: PointerEvent): void {\n if (this.disabled()) {\n event.stopImmediatePropagation();\n event.stopPropagation();\n this.host.nativeElement.focus();\n }\n }\n\n /**\n * Cancels activation while `aria-disabled` is set. Because the button keeps a native\n * `disabled`-less DOM (so it stays focusable/discoverable), clicks would otherwise fire\n * normally — including synthetic clicks from Enter/Space. Runs in the capture phase and\n * stops propagation so no consumer `(click)` handler runs. `preventDefault()` is not called\n * (it would drop focus); blocking propagation is enough to stop consumer handlers.\n */\n private onActivate(event: Event): void {\n if (this.disabled()) {\n event.stopImmediatePropagation();\n event.stopPropagation();\n }\n }\n\n /**\n * Blocks keyboard activation (Enter / Space) while disabled, before it turns into a click.\n */\n private onKeydown(event: KeyboardEvent): void {\n if (this.disabled() && (event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar')) {\n event.preventDefault();\n event.stopImmediatePropagation();\n event.stopPropagation();\n }\n }\n}\n","<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n","import { EdsButton } from './eds-button';\n\nexport { EdsButton };\n\n/** Convenience array for importing all eds-button components. */\nexport const EDS_BUTTON = [\n EdsButton,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAuBA;;;;;;;;;;;;;AAaG;MA+BU,SAAS,CAAA;AAwElB,IAAA,WAAA,GAAA;AAvEA;;;AAGG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,YAAY;oFAAC;;QAG7B,IAAA,CAAA,EAAE,GAAG,KAAK,CAAqB,SAAS;+EAAC;AAEzC;;;;;;AAMG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAgB,SAAS;oFAAC;AAEzC;;;AAGG;QACH,IAAA,CAAA,KAAK,GAAG,KAAK,CAAiB,SAAS;kFAAC;AAExC;;;AAGG;QACH,IAAA,CAAA,IAAI,GAAG,KAAK,CAAgB,GAAG;iFAAC;AAEhC;;;;AAIG;QACH,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExD;;;AAGG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEvD;;;AAGG;QACH,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,KAAK,mFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE3D;;;AAGG;QACH,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,KAAK,iFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEzD;;;AAGG;QACH,IAAA,CAAA,cAAc,GAAG,KAAK,CAAC,KAAK,sFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE9D;;;;;AAKG;QACH,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js","sources":["../../eds-button/eds-button.ts","../../eds-button/eds-button.html","../../eds-button/index.ts","../../eds-button/eui-eds-eds-button.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n booleanAttribute,\n input,\n inject,\n ElementRef,\n} from '@angular/core';\n\n/**\n * Local narrowed unions — the button's variant contract. No shared-token import.\n */\nexport type EdsButtonType = 'primary' | 'secondary' | 'tertiary';\n\n/**\n * Colors the button accepts. `primary` / `neutral` / `highlight` / `critical` have dedicated\n * SCSS branches; `warning` is accepted for parity but has no styled branch.\n */\nexport type EdsButtonColor = 'primary' | 'neutral' | 'highlight' | 'critical' | 'warning';\n\n/** Sizes the button styles (SCSS `:host([size=\"…\"])` branches). */\nexport type EdsButtonSize = 's' | 'm' | 'l';\n\n/**\n * EDS Button — a directive-style button component applied on native `<button>` elements.\n *\n * Supports multiple visual types (primary, secondary, tertiary), semantic color variants\n * (primary, neutral, highlight, critical), and sizes (s, m, l) via string inputs reflected\n * as host attributes.\n *\n * Usage:\n * ```html\n * <button edsButton size=\"m\" color=\"primary\">Label</button>\n * <button edsButton type=\"secondary\" color=\"neutral\" size=\"s\">Cancel</button>\n * <button edsButton type=\"tertiary\" color=\"critical\" [disabled]=\"isLoading\">Delete</button>\n * ```\n */\n@Component({\n templateUrl: './eds-button.html',\n // eslint-disable-next-line\n selector: 'button[edsButton]',\n styleUrl: './eds-button.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'eds-button',\n '[attr.type-variant]': 'variant()',\n '[attr.color]': 'color()',\n '[attr.size]': 'size()',\n '[attr.rounded]': 'isRounded() || null',\n '[attr.avatar-button]': 'isAvatarButton() || null',\n '[attr.block]': 'isBlock() || null',\n '[attr.line-wrap]': 'hasLineWrap() || null',\n '[attr.data-e2e]': 'e2eAttr()',\n '[attr.id]': 'id()',\n // A disabled button stays focusable and discoverable (WAI-ARIA \"focusable\n // disabled control\"): reflect state via `aria-disabled` instead of the native\n // `disabled` attribute, which would remove the element from the tab order and\n // suppress its focus style. Activation is cancelled by the capture-phase guards\n // registered in the constructor.\n '[attr.aria-disabled]': 'disabled() || null',\n // Consumers write the state as a bare `disabled` attribute (`<button edsButton disabled>`).\n // Since `disabled` is a native boolean attribute, Angular stamps it straight onto the\n // element — which would remove it from the tab order and defeat the focusable-disabled\n // behavior. Force the native attribute off so ONLY `aria-disabled` conveys the state.\n '[attr.disabled]': 'null',\n },\n})\nexport class EdsButton {\n /**\n * @description Data attribute for e2e testing\n * @default eds-button\n */\n e2eAttr = input('eds-button');\n\n /** @description ID attribute for the button element */\n id = input<string | undefined>(undefined);\n\n /**\n * Visual type of the button. `primary` = solid surface; `secondary` = bordered;\n * `tertiary` = text/ghost. Named `variant` (not `type`) on the Angular side to avoid\n * clashing with the native `<button type>` attribute; reflected as `[attr.type-variant]`\n * (the React projection exposes this axis as its `type` prop).\n * @default 'primary'\n */\n variant = input<EdsButtonType>('primary');\n\n /**\n * Semantic color of the button.\n * @default 'primary'\n */\n color = input<EdsButtonColor>('primary');\n\n /**\n * Size of the button.\n * @default 'm'\n */\n size = input<EdsButtonSize>('m');\n\n /**\n * @description Controls the disabled state of the button.\n * When true, adds the disabled attribute and prevents interaction.\n * @default false\n */\n disabled = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, makes the button full-width (block-level).\n * @default false\n */\n isBlock = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, allows text content to wrap.\n * @default false\n */\n hasLineWrap = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, applies a fully rounded border-radius.\n * @default false\n */\n isRounded = input(false, { transform: booleanAttribute });\n\n /**\n * @description When true, applies to avatar acting like a button trigger for the eds-dropdown\n * @default false\n */\n isAvatarButton = input(false, { transform: booleanAttribute });\n\n /**\n * @description\n * When true, marks the button as initially checked/selected within an eds-segmented-control.\n * The segmented-control reads this value during initialization to determine the initial selection state.\n * @default false\n */\n isChecked = input(false, { transform: booleanAttribute });\n\n private readonly host = inject<ElementRef<HTMLButtonElement>>(ElementRef);\n\n constructor() {\n const el = this.host.nativeElement;\n // Register in the CAPTURE phase so these guards run before any consumer-attached\n // `(click)` / `(keydown)` handler on the same element, regardless of registration\n // order. When disabled, cancel activation entirely (pointer + keyboard) while the\n // button remains in the tab order (aria-disabled, not native disabled).\n el.addEventListener('pointerdown', (event) => this.onPointerDown(event), true);\n el.addEventListener('click', (event) => this.onActivate(event), true);\n el.addEventListener('keydown', (event) => this.onKeydown(event), true);\n }\n\n /**\n * Keeps focus on the button when it is pressed while disabled. A disabled-styled button\n * (aria-disabled, not native `disabled`) does not reliably retain focus on mouse press\n * across engines, so focus lands on `document.body` and the next Tab restarts from the top\n * of the page. Explicitly focus the host on pointer-down to guarantee it stays the active\n * element. We do NOT `preventDefault()` (that would suppress the focus we want); activation\n * itself is still blocked in `onActivate` / `onKeydown`.\n */\n private onPointerDown(event: PointerEvent): void {\n if (this.disabled()) {\n event.stopImmediatePropagation();\n event.stopPropagation();\n this.host.nativeElement.focus();\n }\n }\n\n /**\n * Cancels activation while `aria-disabled` is set. Because the button keeps a native\n * `disabled`-less DOM (so it stays focusable/discoverable), clicks would otherwise fire\n * normally — including synthetic clicks from Enter/Space. Runs in the capture phase and\n * stops propagation so no consumer `(click)` handler runs. `preventDefault()` is not called\n * (it would drop focus); blocking propagation is enough to stop consumer handlers.\n */\n private onActivate(event: Event): void {\n if (this.disabled()) {\n event.stopImmediatePropagation();\n event.stopPropagation();\n }\n }\n\n /**\n * Blocks keyboard activation (Enter / Space) while disabled, before it turns into a click.\n */\n private onKeydown(event: KeyboardEvent): void {\n if (this.disabled() && (event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar')) {\n event.preventDefault();\n event.stopImmediatePropagation();\n event.stopPropagation();\n }\n }\n}\n","<span class=\"eds-button__container\">\n <ng-content></ng-content>\n</span>\n","import { EdsButton } from './eds-button';\n\nexport { EdsButton };\n\n/** Convenience array for importing all eds-button components. */\nexport const EDS_BUTTON = [\n EdsButton,\n] as const;\n","/**\n * Generated bundle index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EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,43DCnEtB,kFAGA,EAAA,MAAA,EAAA,CAAA,ikSAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDgEa,SAAS,EAAA,UAAA,EAAA,CAAA;kBA9BrB,SAAS;AAGI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EAAA,eAAA,EAEZ,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACF,wBAAA,KAAK,EAAE,YAAY;AACnB,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,cAAc,EAAE,SAAS;AACzB,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,gBAAgB,EAAE,qBAAqB;AACvC,wBAAA,sBAAsB,EAAE,0BAA0B;AAClD,wBAAA,cAAc,EAAE,mBAAmB;AACnC,wBAAA,kBAAkB,EAAE,uBAAuB;AAC3C,wBAAA,iBAAiB,EAAE,WAAW;AAC9B,wBAAA,WAAW,EAAE,MAAM;;;;;;AAMnB,wBAAA,sBAAsB,EAAE,oBAAoB;;;;;AAK5C,wBAAA,iBAAiB,EAAE,MAAM;AAC5B,qBAAA,EAAA,QAAA,EAAA,kFAAA,EAAA,MAAA,EAAA,CAAA,ikSAAA,CAAA,EAAA;;;AE7DL;AACO,MAAM,UAAU,GAAG;IACtB,SAAS;;;ACNb;;AAEG;;"}
|
|
@@ -113,9 +113,9 @@ class EdsRating {
|
|
|
113
113
|
...(ngDevMode ? [{ debugName: "isNonInteractive" }] : /* istanbul ignore next */ []));
|
|
114
114
|
/**
|
|
115
115
|
* Star icon size derived from the control `size`:
|
|
116
|
-
* `'m'` → `'
|
|
116
|
+
* `'m'` → `'m'` icons (24×24), `'s'` → `'s'` icons (20×20).
|
|
117
117
|
*/
|
|
118
|
-
this.iconSize = computed(() => (this.size() === 's' ? '
|
|
118
|
+
this.iconSize = computed(() => (this.size() === 's' ? 's' : 'm'), /* @ts-ignore */
|
|
119
119
|
...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
|
|
120
120
|
/**
|
|
121
121
|
* True when a label or sub-label is set — switches the host to a stacked
|
|
@@ -323,7 +323,7 @@ class EdsRating {
|
|
|
323
323
|
useExisting: forwardRef(() => EdsRating),
|
|
324
324
|
multi: true,
|
|
325
325
|
},
|
|
326
|
-
], viewQueries: [{ propertyName: "starButtons", predicate: ["starButton"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "@if (label()) {\n <div class=\"eds-rating__label\">{{ label() }}</div>\n}\n\n<div class=\"eds-rating__stars\">\n @for (star of stars(); track star.index) {\n <button\n #starButton\n type=\"button\"\n class=\"eds-rating__star\"\n [class.eds-rating__star--filled]=\"star.filled\"\n [class.eds-rating__star--half]=\"star.half\"\n [disabled]=\"isNonInteractive()\"\n [attr.tabindex]=\"getTabIndex(star.index)\"\n [attr.role]=\"'radio'\"\n [attr.aria-checked]=\"star.index === internalRating()\"\n [attr.aria-label]=\"'Star ' + star.index + ' of ' + numberOfStars()\"\n (click)=\"onStarClick(star.index)\"\n (keydown)=\"onKeydown($event, star.index)\"\n (blur)=\"onBlur()\">\n @if (star.filled) {\n <eds-icon [icon]=\"resolvedFilledIcon()\" [size]=\"iconSize()\"/>\n } @else if (star.half) {\n <eds-icon [icon]=\"resolvedHalfIcon()\" [size]=\"iconSize()\"/>\n } @else {\n <eds-icon [icon]=\"resolvedEmptyIcon()\" [size]=\"iconSize()\"/>\n }\n </button>\n }\n</div>\n\n@if (sublabel()) {\n <div class=\"eds-rating__sublabel\">{{ sublabel() }}</div>\n}\n", styles: [":host{display:inline-flex;align-items:center}:host .eds-rating__stars{display:inline-flex;align-items:center}:host .eds-rating__star{display:inline-flex;align-items:center;justify-content:center;padding:var(--eds-sp-
|
|
326
|
+
], viewQueries: [{ propertyName: "starButtons", predicate: ["starButton"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "@if (label()) {\n <div class=\"eds-rating__label\">{{ label() }}</div>\n}\n\n<div class=\"eds-rating__stars\">\n @for (star of stars(); track star.index) {\n <button\n #starButton\n type=\"button\"\n class=\"eds-rating__star\"\n [class.eds-rating__star--filled]=\"star.filled\"\n [class.eds-rating__star--half]=\"star.half\"\n [disabled]=\"isNonInteractive()\"\n [attr.tabindex]=\"getTabIndex(star.index)\"\n [attr.role]=\"'radio'\"\n [attr.aria-checked]=\"star.index === internalRating()\"\n [attr.aria-label]=\"'Star ' + star.index + ' of ' + numberOfStars()\"\n (click)=\"onStarClick(star.index)\"\n (keydown)=\"onKeydown($event, star.index)\"\n (blur)=\"onBlur()\">\n @if (star.filled) {\n <eds-icon [icon]=\"resolvedFilledIcon()\" [size]=\"iconSize()\"/>\n } @else if (star.half) {\n <eds-icon [icon]=\"resolvedHalfIcon()\" [size]=\"iconSize()\"/>\n } @else {\n <eds-icon [icon]=\"resolvedEmptyIcon()\" [size]=\"iconSize()\"/>\n }\n </button>\n }\n</div>\n\n@if (sublabel()) {\n <div class=\"eds-rating__sublabel\">{{ sublabel() }}</div>\n}\n", styles: [":host{display:inline-flex;align-items:center}:host .eds-rating__stars{display:inline-flex;align-items:center}:host .eds-rating__star{display:inline-flex;align-items:center;justify-content:center;padding:var(--eds-sp-xs);border:none;background:transparent;cursor:pointer;border-radius:var(--eds-br-full);color:var(--eds-c-foreground-subtler);transition:color .15s ease-in-out,transform .15s ease-in-out}:host .eds-rating__star:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:2px!important}:host .eds-rating__star:hover:not(:disabled){transform:scale(1.15);background-color:var(--eds-c-surface-neutral-subtler)}:host .eds-rating__star--filled,:host .eds-rating__star--half{--_eds-rating-on-surface: var(--eds-c-foreground-primary);color:var(--eds-c-foreground-primary)}:host .eds-rating__star:disabled{cursor:not-allowed}:host .eds-rating__label{font:var(--eds-f-heading-xl);font-weight:var(--eds-f-w-semibold);letter-spacing:var(--eds-f-ls-6xl);color:var(--eds-c-foreground)}:host .eds-rating__sublabel{font:var(--eds-f-paragraph-m);color:var(--eds-c-foreground-subtle)}:host([has-text]){align-items:center;display:inline-flex;flex-direction:column}:host([size=s]) .eds-rating__star{padding:var(--eds-sp-4xs)}:host([size=s]) .eds-rating__label{font:var(--eds-f-heading-l);letter-spacing:var(--eds-f-ls-4xl)}:host([disabled]) .eds-icon{--_eds-icon-color: var(--eds-c-foreground-disabled)}:host([readonly]) .eds-rating__star{cursor:default}:host([readonly]) .eds-rating__star:hover:not(:disabled){transform:none}\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 }); }
|
|
327
327
|
}
|
|
328
328
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EdsRating, decorators: [{
|
|
329
329
|
type: Component,
|
|
@@ -345,7 +345,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
|
|
|
345
345
|
useExisting: forwardRef(() => EdsRating),
|
|
346
346
|
multi: true,
|
|
347
347
|
},
|
|
348
|
-
], template: "@if (label()) {\n <div class=\"eds-rating__label\">{{ label() }}</div>\n}\n\n<div class=\"eds-rating__stars\">\n @for (star of stars(); track star.index) {\n <button\n #starButton\n type=\"button\"\n class=\"eds-rating__star\"\n [class.eds-rating__star--filled]=\"star.filled\"\n [class.eds-rating__star--half]=\"star.half\"\n [disabled]=\"isNonInteractive()\"\n [attr.tabindex]=\"getTabIndex(star.index)\"\n [attr.role]=\"'radio'\"\n [attr.aria-checked]=\"star.index === internalRating()\"\n [attr.aria-label]=\"'Star ' + star.index + ' of ' + numberOfStars()\"\n (click)=\"onStarClick(star.index)\"\n (keydown)=\"onKeydown($event, star.index)\"\n (blur)=\"onBlur()\">\n @if (star.filled) {\n <eds-icon [icon]=\"resolvedFilledIcon()\" [size]=\"iconSize()\"/>\n } @else if (star.half) {\n <eds-icon [icon]=\"resolvedHalfIcon()\" [size]=\"iconSize()\"/>\n } @else {\n <eds-icon [icon]=\"resolvedEmptyIcon()\" [size]=\"iconSize()\"/>\n }\n </button>\n }\n</div>\n\n@if (sublabel()) {\n <div class=\"eds-rating__sublabel\">{{ sublabel() }}</div>\n}\n", styles: [":host{display:inline-flex;align-items:center}:host .eds-rating__stars{display:inline-flex;align-items:center}:host .eds-rating__star{display:inline-flex;align-items:center;justify-content:center;padding:var(--eds-sp-
|
|
348
|
+
], template: "@if (label()) {\n <div class=\"eds-rating__label\">{{ label() }}</div>\n}\n\n<div class=\"eds-rating__stars\">\n @for (star of stars(); track star.index) {\n <button\n #starButton\n type=\"button\"\n class=\"eds-rating__star\"\n [class.eds-rating__star--filled]=\"star.filled\"\n [class.eds-rating__star--half]=\"star.half\"\n [disabled]=\"isNonInteractive()\"\n [attr.tabindex]=\"getTabIndex(star.index)\"\n [attr.role]=\"'radio'\"\n [attr.aria-checked]=\"star.index === internalRating()\"\n [attr.aria-label]=\"'Star ' + star.index + ' of ' + numberOfStars()\"\n (click)=\"onStarClick(star.index)\"\n (keydown)=\"onKeydown($event, star.index)\"\n (blur)=\"onBlur()\">\n @if (star.filled) {\n <eds-icon [icon]=\"resolvedFilledIcon()\" [size]=\"iconSize()\"/>\n } @else if (star.half) {\n <eds-icon [icon]=\"resolvedHalfIcon()\" [size]=\"iconSize()\"/>\n } @else {\n <eds-icon [icon]=\"resolvedEmptyIcon()\" [size]=\"iconSize()\"/>\n }\n </button>\n }\n</div>\n\n@if (sublabel()) {\n <div class=\"eds-rating__sublabel\">{{ sublabel() }}</div>\n}\n", styles: [":host{display:inline-flex;align-items:center}:host .eds-rating__stars{display:inline-flex;align-items:center}:host .eds-rating__star{display:inline-flex;align-items:center;justify-content:center;padding:var(--eds-sp-xs);border:none;background:transparent;cursor:pointer;border-radius:var(--eds-br-full);color:var(--eds-c-foreground-subtler);transition:color .15s ease-in-out,transform .15s ease-in-out}:host .eds-rating__star:focus-visible:not([readonly]){outline:var(--eds-bw-s) solid var(--eds-c-border-primary)!important;outline-offset:2px!important}:host .eds-rating__star:hover:not(:disabled){transform:scale(1.15);background-color:var(--eds-c-surface-neutral-subtler)}:host .eds-rating__star--filled,:host .eds-rating__star--half{--_eds-rating-on-surface: var(--eds-c-foreground-primary);color:var(--eds-c-foreground-primary)}:host .eds-rating__star:disabled{cursor:not-allowed}:host .eds-rating__label{font:var(--eds-f-heading-xl);font-weight:var(--eds-f-w-semibold);letter-spacing:var(--eds-f-ls-6xl);color:var(--eds-c-foreground)}:host .eds-rating__sublabel{font:var(--eds-f-paragraph-m);color:var(--eds-c-foreground-subtle)}:host([has-text]){align-items:center;display:inline-flex;flex-direction:column}:host([size=s]) .eds-rating__star{padding:var(--eds-sp-4xs)}:host([size=s]) .eds-rating__label{font:var(--eds-f-heading-l);letter-spacing:var(--eds-f-ls-4xl)}:host([disabled]) .eds-icon{--_eds-icon-color: var(--eds-c-foreground-disabled)}:host([readonly]) .eds-rating__star{cursor:default}:host([readonly]) .eds-rating__star:hover:not(:disabled){transform:none}\n"] }]
|
|
349
349
|
}], ctorParameters: () => [], propDecorators: { e2eAttr: [{ type: i0.Input, args: [{ isSignal: true, alias: "e2eAttr", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], numberOfStars: [{ type: i0.Input, args: [{ isSignal: true, alias: "numberOfStars", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], sublabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "sublabel", required: false }] }], rating: [{ type: i0.Input, args: [{ isSignal: true, alias: "rating", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], hasHalfRating: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasHalfRating", required: false }] }], emptyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyIcon", required: false }] }], halfIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "halfIcon", required: false }] }], filledIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "filledIcon", required: false }] }], ratingChange: [{ type: i0.Output, args: ["ratingChange"] }], starButtons: [{ type: i0.ViewChildren, args: ['starButton', { ...{ read: ElementRef }, isSignal: true }] }] } });
|
|
350
350
|
|
|
351
351
|
/** Convenience array for importing all eds-rating components. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-eds-eds-rating.mjs","sources":["../../eds-rating/eds-rating.ts","../../eds-rating/eds-rating.html","../../eds-rating/index.ts","../../eds-rating/eui-eds-eds-rating.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n input,\n output,\n computed,\n booleanAttribute,\n numberAttribute,\n forwardRef,\n signal,\n effect,\n afterNextRender,\n viewChildren,\n ElementRef,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { EDS_ICON, EdsIconSize } from '@eui/eds/eds-icon';\n\n/**\n * Local narrowed size union — the rating's size contract.\n */\nexport type EdsRatingSize = 's' | 'm';\n\n@Component({\n templateUrl: './eds-rating.html',\n selector: 'eds-rating',\n styleUrl: './eds-rating.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ...EDS_ICON,\n ],\n host: {\n class: 'eds-rating',\n '[attr.size]': 'size()',\n '[attr.has-text]': 'hasText() || null',\n '[attr.has-half-rating]': 'hasHalfRating() || null',\n '[attr.disabled]': 'internalDisabled() || null',\n '[attr.readonly]': 'readonly() || null',\n '[attr.data-e2e]': 'e2eAttr()',\n role: 'radiogroup',\n '[attr.aria-label]': 'ariaLabel()',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => EdsRating),\n multi: true,\n },\n ],\n})\nexport class EdsRating implements ControlValueAccessor {\n /**\n * Data attribute value for end-to-end testing identification.\n * @default 'eds-rating'\n */\n e2eAttr = input('eds-rating');\n\n /**\n * Accessible label for the rating group.\n * @default 'Rating'\n */\n ariaLabel = input('Rating');\n\n /**\n * Number of stars to display.\n * @default 5\n */\n numberOfStars = input(5, { transform: numberAttribute });\n\n /**\n * Visual size of the rating control. `'m'` (default) renders medium stars;\n * `'s'` renders smaller stars (matching the small icon-button sizing).\n * Reflected as the `size` host attribute.\n * @default 'm'\n */\n size = input<EdsRatingSize>('m');\n\n /**\n * Optional label displayed above the stars. Typically used in read-only displays\n * to show the rating value (e.g. `'4.7'`). When empty (default) no label is rendered.\n * @default ''\n */\n label = input('');\n\n /**\n * Optional sub-label displayed below the stars. Typically used in read-only displays\n * for supporting text (e.g. `'Based on 330k reviews'`). When empty (default) no\n * sub-label is rendered.\n * @default ''\n */\n sublabel = input('');\n\n /**\n * Current rating value. Supports fractional values: when the decimal part is\n * `>= 0.5` the next star is rendered half-filled (e.g. `3.5` → three full stars\n * plus one half star). Fractional values are intended for read-only display;\n * user interaction (click / keyboard) always produces whole-star ratings.\n * @default 0\n */\n rating = input(0, { transform: numberAttribute });\n\n /**\n * Whether the rating is disabled.\n * @default false\n */\n disabled = input(false, { transform: booleanAttribute });\n\n /**\n * Whether the rating is read-only. The value is displayed but cannot be changed\n * through user interaction. Unlike `disabled`, the control retains its normal\n * (non-dimmed) appearance.\n * @default false\n */\n readonly = input(false, { transform: booleanAttribute });\n\n /**\n * Allows editing in half-star steps. When enabled, clicking a star cycles that\n * position through half → full → removed, letting the user add or remove half a\n * star per click (so ratings like `2.5` can be set interactively). In this mode\n * the default stars use the regular star icon set.\n * @default false\n */\n hasHalfRating = input(false, { transform: booleanAttribute });\n\n /**\n * Icon for an empty (unfilled) star. Use the `iconName:setName` convention\n * (e.g. `'heart:regular'`). When empty, the default star icon is used.\n * @default '' (falls back to the default star icon)\n */\n emptyIcon = input('');\n\n /**\n * Icon for a half-filled star. Use the `iconName:setName` convention\n * (e.g. `'heart-half-fill:fill'`). When empty, the default half-star icon is used.\n * @default '' (falls back to the default half-star icon)\n */\n halfIcon = input('');\n\n /**\n * Icon for a filled star. Use the `iconName:setName` convention\n * (e.g. `'heart-fill:fill'`). When empty, the default filled-star icon is used.\n * @default '' (falls back to the default filled-star icon)\n */\n filledIcon = input('');\n\n /**\n * Emitted when the rating changes.\n * Payload: the new rating value (number).\n */\n ratingChange = output<number>();\n\n protected readonly starButtons = viewChildren('starButton', { read: ElementRef });\n\n protected internalRating = signal(0);\n protected internalDisabled = signal(false);\n\n /**\n * Combined non-interactive state — true when the control is disabled or read-only.\n * Blocks all rating mutations (click + keyboard).\n */\n protected readonly isNonInteractive = computed(() => this.internalDisabled() || this.readonly());\n\n /**\n * Star icon size derived from the control `size`:\n * `'m'` → `'s'` icons, `'s'` → `'xs'` icons (matching the small icon-button sizing).\n */\n protected readonly iconSize = computed<EdsIconSize>(() => (this.size() === 's' ? 'xs' : 's'));\n\n /**\n * True when a label or sub-label is set — switches the host to a stacked\n * (column) layout so the text sits above/below the stars.\n */\n protected readonly hasText = computed(() => !!this.label() || !!this.sublabel());\n\n /**\n * Resolved icon names for the three star states. Each falls back to a default\n * star icon when the matching input is not provided. The default filled/empty\n * stars use the regular star set in half-step editing mode (`hasHalfRating`) and the\n * compact `core` set otherwise.\n */\n protected readonly resolvedFilledIcon = computed(() =>\n this.filledIcon() || (this.hasHalfRating() ? 'star-fill:fill' : 'star-fill:core'));\n protected readonly resolvedHalfIcon = computed(() =>\n this.halfIcon() || 'star-half-fill:fill');\n protected readonly resolvedEmptyIcon = computed(() =>\n this.emptyIcon() || (this.hasHalfRating() ? 'star:regular' : 'star:core'));\n\n protected stars = computed(() => {\n const count = this.numberOfStars();\n const currentRating = this.internalRating();\n // A star is half-filled when the rating's fractional part is >= 0.5 and the\n // star sits just above the fully-filled stars (e.g. rating 3.5 → star 4 is half).\n const fullStars = Math.floor(currentRating);\n const hasHalf = currentRating - fullStars >= 0.5;\n return Array.from({ length: count }, (_, i) => {\n const index = i + 1;\n return {\n index,\n filled: index <= fullStars,\n half: hasHalf && index === fullStars + 1,\n };\n });\n });\n\n constructor() {\n effect(() => {\n const inputRating = this.rating();\n // Only sync input → internal when the input is explicitly set (non-zero).\n // writeValue from reactive forms also writes to internalRating directly.\n if (inputRating !== 0) {\n this.internalRating.set(inputRating);\n }\n });\n\n effect(() => {\n this.internalDisabled.set(this.disabled());\n });\n\n afterNextRender(() => {\n this.starButtons().forEach((buttonRef) => {\n buttonRef.nativeElement?.addEventListener('blur', () => this._onTouched());\n });\n });\n }\n\n // ControlValueAccessor\n writeValue(value: number): void {\n this.internalRating.set(value ?? 0);\n }\n\n registerOnChange(fn: (value: number) => void): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.internalDisabled.set(isDisabled);\n }\n\n /**\n * Returns the tabindex for a star button (roving tabindex pattern).\n */\n protected getTabIndex(starIndex: number): number {\n // Fractional ratings (e.g. 3.5) are display-only; snap to the nearest whole\n // star so the roving-tabindex pattern always has exactly one focusable star.\n const current = Math.round(this.internalRating());\n if (current === 0) {\n return starIndex === 1 ? 0 : -1;\n }\n return starIndex === current ? 0 : -1;\n }\n\n /**\n * Handles clicking a star — toggles off if same star clicked again.\n */\n protected onStarClick(starIndex: number): void {\n if (this.isNonInteractive()) return;\n\n if (this.hasHalfRating()) {\n // Cycle this star position through half → full → removed, so each click\n // adds or removes half a star.\n const current = this.internalRating();\n let newRating: number;\n if (current === starIndex - 0.5) {\n newRating = starIndex; // half → full\n } else if (current === starIndex) {\n newRating = starIndex - 1; // full → remove this star\n } else {\n newRating = starIndex - 0.5; // → half\n }\n this.updateRating(newRating);\n return;\n }\n\n const newRating = this.internalRating() === starIndex ? 0 : starIndex;\n this.updateRating(newRating);\n }\n\n /**\n * Handles keyboard navigation within the rating group.\n * Implements WAI-ARIA APG Radio Group pattern with wrapping arrows and Space key.\n */\n protected onKeydown(event: KeyboardEvent, starIndex: number): void {\n if (this.isNonInteractive()) return;\n\n const total = this.numberOfStars();\n\n // Half-step editing: arrows move the rating by 0.5 and clamp at the ends.\n if (this.hasHalfRating()) {\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp': {\n event.preventDefault();\n const next = Math.min(total, this.internalRating() + 0.5);\n this.updateRating(next);\n this.focusStar(Math.max(0, Math.ceil(next) - 1));\n break;\n }\n case 'ArrowLeft':\n case 'ArrowDown': {\n event.preventDefault();\n const prev = Math.max(0, this.internalRating() - 0.5);\n this.updateRating(prev);\n this.focusStar(Math.max(0, Math.ceil(prev) - 1));\n break;\n }\n case 'Home': {\n event.preventDefault();\n this.updateRating(0.5);\n this.focusStar(0);\n break;\n }\n case 'End': {\n event.preventDefault();\n this.updateRating(total);\n this.focusStar(total - 1);\n break;\n }\n }\n return;\n }\n\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp': {\n event.preventDefault();\n const nextIndex = starIndex === total ? 1 : starIndex + 1;\n this.updateRating(nextIndex);\n this.focusStar(nextIndex - 1);\n break;\n }\n case 'ArrowLeft':\n case 'ArrowDown': {\n event.preventDefault();\n const prevIndex = starIndex === 1 ? total : starIndex - 1;\n this.updateRating(prevIndex);\n this.focusStar(prevIndex - 1);\n break;\n }\n case ' ': {\n event.preventDefault();\n if (this.internalRating() !== starIndex) {\n this.updateRating(starIndex);\n }\n break;\n }\n case 'Home': {\n event.preventDefault();\n this.updateRating(1);\n this.focusStar(0);\n break;\n }\n case 'End': {\n event.preventDefault();\n this.updateRating(total);\n this.focusStar(total - 1);\n break;\n }\n }\n }\n\n protected onBlur(): void {\n this._onTouched();\n }\n\n private updateRating(value: number): void {\n this.internalRating.set(value);\n this.ratingChange.emit(value);\n this._onChange(value);\n }\n\n private focusStar(arrayIndex: number): void {\n const buttons = this.starButtons();\n if (buttons[arrayIndex]) {\n buttons[arrayIndex].nativeElement.focus();\n }\n }\n\n private _onChange: (value: number) => void = () => {/* noop */};\n private _onTouched: () => void = () => {/* noop */};\n}\n","@if (label()) {\n <div class=\"eds-rating__label\">{{ label() }}</div>\n}\n\n<div class=\"eds-rating__stars\">\n @for (star of stars(); track star.index) {\n <button\n #starButton\n type=\"button\"\n class=\"eds-rating__star\"\n [class.eds-rating__star--filled]=\"star.filled\"\n [class.eds-rating__star--half]=\"star.half\"\n [disabled]=\"isNonInteractive()\"\n [attr.tabindex]=\"getTabIndex(star.index)\"\n [attr.role]=\"'radio'\"\n [attr.aria-checked]=\"star.index === internalRating()\"\n [attr.aria-label]=\"'Star ' + star.index + ' of ' + numberOfStars()\"\n (click)=\"onStarClick(star.index)\"\n (keydown)=\"onKeydown($event, star.index)\"\n (blur)=\"onBlur()\">\n @if (star.filled) {\n <eds-icon [icon]=\"resolvedFilledIcon()\" [size]=\"iconSize()\"/>\n } @else if (star.half) {\n <eds-icon [icon]=\"resolvedHalfIcon()\" [size]=\"iconSize()\"/>\n } @else {\n <eds-icon [icon]=\"resolvedEmptyIcon()\" [size]=\"iconSize()\"/>\n }\n </button>\n }\n</div>\n\n@if (sublabel()) {\n <div class=\"eds-rating__sublabel\">{{ sublabel() }}</div>\n}\n","import { EdsRating } from './eds-rating';\n\nexport { EdsRating };\n\n/** Convenience array for importing all eds-rating components. */\nexport const EDS_RATING = [\n EdsRating,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAmDa,SAAS,CAAA;AA0JlB,IAAA,WAAA,GAAA;AAzJA;;;AAGG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,YAAY;oFAAC;AAE7B;;;AAGG;QACH,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,QAAQ;sFAAC;AAE3B;;;AAGG;QACH,IAAA,CAAA,aAAa,GAAG,KAA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AAA,EAAA,eAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,YAAY,EAAA,EAAA,GAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEpJpF;AACO,MAAM,UAAU,GAAG;IACtB,SAAS;;;ACNb;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"eui-eds-eds-rating.mjs","sources":["../../eds-rating/eds-rating.ts","../../eds-rating/eds-rating.html","../../eds-rating/index.ts","../../eds-rating/eui-eds-eds-rating.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n input,\n output,\n computed,\n booleanAttribute,\n numberAttribute,\n forwardRef,\n signal,\n effect,\n afterNextRender,\n viewChildren,\n ElementRef,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { EDS_ICON, EdsIconSize } from '@eui/eds/eds-icon';\n\n/**\n * Local narrowed size union — the rating's size contract.\n */\nexport type EdsRatingSize = 's' | 'm';\n\n@Component({\n templateUrl: './eds-rating.html',\n selector: 'eds-rating',\n styleUrl: './eds-rating.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ...EDS_ICON,\n ],\n host: {\n class: 'eds-rating',\n '[attr.size]': 'size()',\n '[attr.has-text]': 'hasText() || null',\n '[attr.has-half-rating]': 'hasHalfRating() || null',\n '[attr.disabled]': 'internalDisabled() || null',\n '[attr.readonly]': 'readonly() || null',\n '[attr.data-e2e]': 'e2eAttr()',\n role: 'radiogroup',\n '[attr.aria-label]': 'ariaLabel()',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => EdsRating),\n multi: true,\n },\n ],\n})\nexport class EdsRating implements ControlValueAccessor {\n /**\n * Data attribute value for end-to-end testing identification.\n * @default 'eds-rating'\n */\n e2eAttr = input('eds-rating');\n\n /**\n * Accessible label for the rating group.\n * @default 'Rating'\n */\n ariaLabel = input('Rating');\n\n /**\n * Number of stars to display.\n * @default 5\n */\n numberOfStars = input(5, { transform: numberAttribute });\n\n /**\n * Visual size of the rating control. `'m'` (default) renders medium stars;\n * `'s'` renders smaller stars (matching the small icon-button sizing).\n * Reflected as the `size` host attribute.\n * @default 'm'\n */\n size = input<EdsRatingSize>('m');\n\n /**\n * Optional label displayed above the stars. Typically used in read-only displays\n * to show the rating value (e.g. `'4.7'`). When empty (default) no label is rendered.\n * @default ''\n */\n label = input('');\n\n /**\n * Optional sub-label displayed below the stars. Typically used in read-only displays\n * for supporting text (e.g. `'Based on 330k reviews'`). When empty (default) no\n * sub-label is rendered.\n * @default ''\n */\n sublabel = input('');\n\n /**\n * Current rating value. Supports fractional values: when the decimal part is\n * `>= 0.5` the next star is rendered half-filled (e.g. `3.5` → three full stars\n * plus one half star). Fractional values are intended for read-only display;\n * user interaction (click / keyboard) always produces whole-star ratings.\n * @default 0\n */\n rating = input(0, { transform: numberAttribute });\n\n /**\n * Whether the rating is disabled.\n * @default false\n */\n disabled = input(false, { transform: booleanAttribute });\n\n /**\n * Whether the rating is read-only. The value is displayed but cannot be changed\n * through user interaction. Unlike `disabled`, the control retains its normal\n * (non-dimmed) appearance.\n * @default false\n */\n readonly = input(false, { transform: booleanAttribute });\n\n /**\n * Allows editing in half-star steps. When enabled, clicking a star cycles that\n * position through half → full → removed, letting the user add or remove half a\n * star per click (so ratings like `2.5` can be set interactively). In this mode\n * the default stars use the regular star icon set.\n * @default false\n */\n hasHalfRating = input(false, { transform: booleanAttribute });\n\n /**\n * Icon for an empty (unfilled) star. Use the `iconName:setName` convention\n * (e.g. `'heart:regular'`). When empty, the default star icon is used.\n * @default '' (falls back to the default star icon)\n */\n emptyIcon = input('');\n\n /**\n * Icon for a half-filled star. Use the `iconName:setName` convention\n * (e.g. `'heart-half-fill:fill'`). When empty, the default half-star icon is used.\n * @default '' (falls back to the default half-star icon)\n */\n halfIcon = input('');\n\n /**\n * Icon for a filled star. Use the `iconName:setName` convention\n * (e.g. `'heart-fill:fill'`). When empty, the default filled-star icon is used.\n * @default '' (falls back to the default filled-star icon)\n */\n filledIcon = input('');\n\n /**\n * Emitted when the rating changes.\n * Payload: the new rating value (number).\n */\n ratingChange = output<number>();\n\n protected readonly starButtons = viewChildren('starButton', { read: ElementRef });\n\n protected internalRating = signal(0);\n protected internalDisabled = signal(false);\n\n /**\n * Combined non-interactive state — true when the control is disabled or read-only.\n * Blocks all rating mutations (click + keyboard).\n */\n protected readonly isNonInteractive = computed(() => this.internalDisabled() || this.readonly());\n\n /**\n * Star icon size derived from the control `size`:\n * `'m'` → `'m'` icons (24×24), `'s'` → `'s'` icons (20×20).\n */\n protected readonly iconSize = computed<EdsIconSize>(() => (this.size() === 's' ? 's' : 'm'));\n\n /**\n * True when a label or sub-label is set — switches the host to a stacked\n * (column) layout so the text sits above/below the stars.\n */\n protected readonly hasText = computed(() => !!this.label() || !!this.sublabel());\n\n /**\n * Resolved icon names for the three star states. Each falls back to a default\n * star icon when the matching input is not provided. The default filled/empty\n * stars use the regular star set in half-step editing mode (`hasHalfRating`) and the\n * compact `core` set otherwise.\n */\n protected readonly resolvedFilledIcon = computed(() =>\n this.filledIcon() || (this.hasHalfRating() ? 'star-fill:fill' : 'star-fill:core'));\n protected readonly resolvedHalfIcon = computed(() =>\n this.halfIcon() || 'star-half-fill:fill');\n protected readonly resolvedEmptyIcon = computed(() =>\n this.emptyIcon() || (this.hasHalfRating() ? 'star:regular' : 'star:core'));\n\n protected stars = computed(() => {\n const count = this.numberOfStars();\n const currentRating = this.internalRating();\n // A star is half-filled when the rating's fractional part is >= 0.5 and the\n // star sits just above the fully-filled stars (e.g. rating 3.5 → star 4 is half).\n const fullStars = Math.floor(currentRating);\n const hasHalf = currentRating - fullStars >= 0.5;\n return Array.from({ length: count }, (_, i) => {\n const index = i + 1;\n return {\n index,\n filled: index <= fullStars,\n half: hasHalf && index === fullStars + 1,\n };\n });\n });\n\n constructor() {\n effect(() => {\n const inputRating = this.rating();\n // Only sync input → internal when the input is explicitly set (non-zero).\n // writeValue from reactive forms also writes to internalRating directly.\n if (inputRating !== 0) {\n this.internalRating.set(inputRating);\n }\n });\n\n effect(() => {\n this.internalDisabled.set(this.disabled());\n });\n\n afterNextRender(() => {\n this.starButtons().forEach((buttonRef) => {\n buttonRef.nativeElement?.addEventListener('blur', () => this._onTouched());\n });\n });\n }\n\n // ControlValueAccessor\n writeValue(value: number): void {\n this.internalRating.set(value ?? 0);\n }\n\n registerOnChange(fn: (value: number) => void): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.internalDisabled.set(isDisabled);\n }\n\n /**\n * Returns the tabindex for a star button (roving tabindex pattern).\n */\n protected getTabIndex(starIndex: number): number {\n // Fractional ratings (e.g. 3.5) are display-only; snap to the nearest whole\n // star so the roving-tabindex pattern always has exactly one focusable star.\n const current = Math.round(this.internalRating());\n if (current === 0) {\n return starIndex === 1 ? 0 : -1;\n }\n return starIndex === current ? 0 : -1;\n }\n\n /**\n * Handles clicking a star — toggles off if same star clicked again.\n */\n protected onStarClick(starIndex: number): void {\n if (this.isNonInteractive()) return;\n\n if (this.hasHalfRating()) {\n // Cycle this star position through half → full → removed, so each click\n // adds or removes half a star.\n const current = this.internalRating();\n let newRating: number;\n if (current === starIndex - 0.5) {\n newRating = starIndex; // half → full\n } else if (current === starIndex) {\n newRating = starIndex - 1; // full → remove this star\n } else {\n newRating = starIndex - 0.5; // → half\n }\n this.updateRating(newRating);\n return;\n }\n\n const newRating = this.internalRating() === starIndex ? 0 : starIndex;\n this.updateRating(newRating);\n }\n\n /**\n * Handles keyboard navigation within the rating group.\n * Implements WAI-ARIA APG Radio Group pattern with wrapping arrows and Space key.\n */\n protected onKeydown(event: KeyboardEvent, starIndex: number): void {\n if (this.isNonInteractive()) return;\n\n const total = this.numberOfStars();\n\n // Half-step editing: arrows move the rating by 0.5 and clamp at the ends.\n if (this.hasHalfRating()) {\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp': {\n event.preventDefault();\n const next = Math.min(total, this.internalRating() + 0.5);\n this.updateRating(next);\n this.focusStar(Math.max(0, Math.ceil(next) - 1));\n break;\n }\n case 'ArrowLeft':\n case 'ArrowDown': {\n event.preventDefault();\n const prev = Math.max(0, this.internalRating() - 0.5);\n this.updateRating(prev);\n this.focusStar(Math.max(0, Math.ceil(prev) - 1));\n break;\n }\n case 'Home': {\n event.preventDefault();\n this.updateRating(0.5);\n this.focusStar(0);\n break;\n }\n case 'End': {\n event.preventDefault();\n this.updateRating(total);\n this.focusStar(total - 1);\n break;\n }\n }\n return;\n }\n\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp': {\n event.preventDefault();\n const nextIndex = starIndex === total ? 1 : starIndex + 1;\n this.updateRating(nextIndex);\n this.focusStar(nextIndex - 1);\n break;\n }\n case 'ArrowLeft':\n case 'ArrowDown': {\n event.preventDefault();\n const prevIndex = starIndex === 1 ? total : starIndex - 1;\n this.updateRating(prevIndex);\n this.focusStar(prevIndex - 1);\n break;\n }\n case ' ': {\n event.preventDefault();\n if (this.internalRating() !== starIndex) {\n this.updateRating(starIndex);\n }\n break;\n }\n case 'Home': {\n event.preventDefault();\n this.updateRating(1);\n this.focusStar(0);\n break;\n }\n case 'End': {\n event.preventDefault();\n this.updateRating(total);\n this.focusStar(total - 1);\n break;\n }\n }\n }\n\n protected onBlur(): void {\n this._onTouched();\n }\n\n private updateRating(value: number): void {\n this.internalRating.set(value);\n this.ratingChange.emit(value);\n this._onChange(value);\n }\n\n private focusStar(arrayIndex: number): void {\n const buttons = this.starButtons();\n if (buttons[arrayIndex]) {\n buttons[arrayIndex].nativeElement.focus();\n }\n }\n\n private _onChange: (value: number) => void = () => {/* noop */};\n private _onTouched: () => void = () => {/* noop */};\n}\n","@if (label()) {\n <div class=\"eds-rating__label\">{{ label() }}</div>\n}\n\n<div class=\"eds-rating__stars\">\n @for (star of stars(); track star.index) {\n <button\n #starButton\n type=\"button\"\n class=\"eds-rating__star\"\n [class.eds-rating__star--filled]=\"star.filled\"\n [class.eds-rating__star--half]=\"star.half\"\n [disabled]=\"isNonInteractive()\"\n [attr.tabindex]=\"getTabIndex(star.index)\"\n [attr.role]=\"'radio'\"\n [attr.aria-checked]=\"star.index === internalRating()\"\n [attr.aria-label]=\"'Star ' + star.index + ' of ' + numberOfStars()\"\n (click)=\"onStarClick(star.index)\"\n (keydown)=\"onKeydown($event, star.index)\"\n (blur)=\"onBlur()\">\n @if (star.filled) {\n <eds-icon [icon]=\"resolvedFilledIcon()\" [size]=\"iconSize()\"/>\n } @else if (star.half) {\n <eds-icon [icon]=\"resolvedHalfIcon()\" [size]=\"iconSize()\"/>\n } @else {\n <eds-icon [icon]=\"resolvedEmptyIcon()\" [size]=\"iconSize()\"/>\n }\n </button>\n }\n</div>\n\n@if (sublabel()) {\n <div class=\"eds-rating__sublabel\">{{ sublabel() }}</div>\n}\n","import { EdsRating } from './eds-rating';\n\nexport { EdsRating };\n\n/** Convenience array for importing all eds-rating components. */\nexport const EDS_RATING = [\n EdsRating,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAmDa,SAAS,CAAA;AA0JlB,IAAA,WAAA,GAAA;AAzJA;;;AAGG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,YAAY;oFAAC;AAE7B;;;AAGG;QACH,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,QAAQ;sFAAC;AAE3B;;;AAGG;QACH,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,CAAC,qFAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AAExD;;;;;AAKG;QACH,IAAA,CAAA,IAAI,GAAG,KAAK,CAAgB,GAAG;iFAAC;AAEhC;;;;AAIG;QACH,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,EAAE;kFAAC;AAEjB;;;;;AAKG;QACH,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,EAAE;qFAAC;AAEpB;;;;;;AAMG;QACH,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,CAAC,8EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AAEjD;;;AAGG;QACH,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExD;;;;;AAKG;QACH,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExD;;;;;;AAMG;QACH,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,KAAK,qFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE7D;;;;AAIG;QACH,IAAA,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