@agorapulse/ui-components 22.4.11 → 22.4.13-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/agorapulse-ui-components-22.4.13-beta.1.tgz +0 -0
  2. package/fesm2022/agorapulse-ui-components-action-dropdown.mjs +1 -1
  3. package/fesm2022/agorapulse-ui-components-action-dropdown.mjs.map +1 -1
  4. package/fesm2022/agorapulse-ui-components-autocomplete.mjs.map +1 -1
  5. package/fesm2022/agorapulse-ui-components-avatar-group.mjs +1 -1
  6. package/fesm2022/agorapulse-ui-components-avatar-group.mjs.map +1 -1
  7. package/fesm2022/agorapulse-ui-components-datepicker.mjs +6 -5
  8. package/fesm2022/agorapulse-ui-components-datepicker.mjs.map +1 -1
  9. package/fesm2022/agorapulse-ui-components-filter-chips-list.mjs +4 -3
  10. package/fesm2022/agorapulse-ui-components-filter-chips-list.mjs.map +1 -1
  11. package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs +3 -3
  12. package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs.map +1 -1
  13. package/fesm2022/agorapulse-ui-components-floating.mjs +1 -1
  14. package/fesm2022/agorapulse-ui-components-floating.mjs.map +1 -1
  15. package/fesm2022/agorapulse-ui-components-form-field.mjs +168 -5
  16. package/fesm2022/agorapulse-ui-components-form-field.mjs.map +1 -1
  17. package/fesm2022/agorapulse-ui-components-form-message.mjs +14 -1
  18. package/fesm2022/agorapulse-ui-components-form-message.mjs.map +1 -1
  19. package/fesm2022/agorapulse-ui-components-input.mjs +5 -1
  20. package/fesm2022/agorapulse-ui-components-input.mjs.map +1 -1
  21. package/fesm2022/agorapulse-ui-components-labels.mjs +1 -1
  22. package/fesm2022/agorapulse-ui-components-labels.mjs.map +1 -1
  23. package/fesm2022/agorapulse-ui-components-nav-selector.mjs +4 -4
  24. package/fesm2022/agorapulse-ui-components-nav-selector.mjs.map +1 -1
  25. package/fesm2022/agorapulse-ui-components-overflow-base.mjs +1 -1
  26. package/fesm2022/agorapulse-ui-components-overflow-base.mjs.map +1 -1
  27. package/fesm2022/agorapulse-ui-components-radio-button-card.mjs +1 -1
  28. package/fesm2022/agorapulse-ui-components-radio-button-card.mjs.map +1 -1
  29. package/fesm2022/agorapulse-ui-components-segmented-control.mjs +4 -3
  30. package/fesm2022/agorapulse-ui-components-segmented-control.mjs.map +1 -1
  31. package/fesm2022/agorapulse-ui-components-select.mjs +25 -11
  32. package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
  33. package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs +1 -1
  34. package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs.map +1 -1
  35. package/fesm2022/agorapulse-ui-components-tooltip.mjs +19 -4
  36. package/fesm2022/agorapulse-ui-components-tooltip.mjs.map +1 -1
  37. package/package.json +1 -1
  38. package/types/agorapulse-ui-components-autocomplete.d.ts +1 -2
  39. package/types/agorapulse-ui-components-datepicker.d.ts +2 -3
  40. package/types/agorapulse-ui-components-floating.d.ts +5 -0
  41. package/types/agorapulse-ui-components-form-field.d.ts +76 -4
  42. package/types/agorapulse-ui-components-form-message.d.ts +2 -0
  43. package/types/agorapulse-ui-components-input.d.ts +2 -1
  44. package/types/agorapulse-ui-components-select.d.ts +5 -1
  45. package/types/agorapulse-ui-components-tooltip.d.ts +9 -2
  46. package/agorapulse-ui-components-22.4.11.tgz +0 -0
@@ -169,7 +169,7 @@ class OverflowBaseComponent {
169
169
  this.pendingFocus.set('more');
170
170
  }
171
171
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: OverflowBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
172
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: OverflowBaseComponent, isStandalone: true, selector: "ap-overflow-base", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, itemText: { classPropertyName: "itemText", publicName: "itemText", isSignal: true, isRequired: false, transformFunction: null }, tooltipListItem: { classPropertyName: "tooltipListItem", publicName: "tooltipListItem", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--ap-overflow-base-gap": "gap() + 'px'" } }, queries: [{ propertyName: "itemTemplate", first: true, predicate: OverflowBaseItemDirective, descendants: true, isSignal: true }, { propertyName: "moreTemplate", first: true, predicate: OverflowBaseMoreDirective, descendants: true, isSignal: true }, { propertyName: "lessTemplate", first: true, predicate: OverflowBaseLessDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "overflowCount", first: true, predicate: OverflowCountDirective, descendants: true, isSignal: true }, { propertyName: "moreButton", first: true, predicate: ["moreButton"], descendants: true, isSignal: true }, { propertyName: "lessButton", first: true, predicate: ["lessButton"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #overflow=\"apOverflowCount\"\n class=\"overflow-row\"\n apOverflowCount\n [class.overflow-row-wrap]=\"!collapsing()\"\n [collapse]=\"collapsing()\"\n [gap]=\"gap()\"\n [max]=\"max()\">\n @for (item of items(); track trackBy()(item); let index = $index, count = $count) {\n <div\n class=\"overflow-item\"\n apOverflowItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate().templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index, count }\" />\n </div>\n }\n @if (collapsing() && overflow.hiddenCount() > 0) {\n @let hidden = hiddenItems(overflow.hiddenCount());\n @if (mode() === 'count') {\n <span\n class=\"overflow-more\"\n apOverflowCounter>\n <ng-container\n [ngTemplateOutlet]=\"moreContent\"\n [ngTemplateOutletContext]=\"{ $implicit: hidden.length }\" />\n </span>\n } @else {\n <button\n #moreButton\n type=\"button\"\n class=\"overflow-more\"\n apOverflowCounter\n apStopPropagation\n [apTooltip]=\"tooltipListItem() ? '' : hiddenList\"\n [apTooltipDisabled]=\"mode() !== 'tooltip'\"\n [apTooltipType]=\"tooltipListItem() ? CustomTooltipType.LIST : CustomTooltipType.DEFAULT\"\n [apTooltipListItems]=\"listItems(hidden)\"\n [apTooltipTemplateContext]=\"{ $implicit: hidden }\"\n [apTooltipTrigger]=\"trigger()\"\n [attr.aria-expanded]=\"mode() === 'expand' ? false : null\"\n [attr.aria-describedby]=\"namesId\"\n (click)=\"onMore()\">\n <ng-container\n [ngTemplateOutlet]=\"moreContent\"\n [ngTemplateOutletContext]=\"{ $implicit: hidden.length }\" />\n </button>\n <span\n hidden\n [id]=\"namesId\">\n {{ hiddenNames(hidden) }}\n </span>\n }\n }\n @if (mode() === 'expand' && expanded() && lessTemplate(); as less) {\n <button\n #lessButton\n type=\"button\"\n class=\"overflow-less\"\n apStopPropagation\n aria-expanded=\"true\"\n (click)=\"onLess()\">\n <ng-container [ngTemplateOutlet]=\"less.templateRef\" />\n </button>\n }\n</div>\n\n<ng-template\n #moreContent\n let-count>\n @if (moreTemplate(); as more) {\n <ng-container\n [ngTemplateOutlet]=\"more.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: count }\" />\n } @else {\n +{{ count }}\n }\n</ng-template>\n\n<ng-template\n #hiddenList\n let-hidden>\n <div class=\"overflow-hidden-items\">\n @for (item of hidden; track trackBy()(item); let index = $index, count = $count) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate().templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index, count }\" />\n }\n </div>\n</ng-template>\n", styles: [":host{display:block;min-width:0}.overflow-row{display:flex;align-items:center;gap:max(var(--ap-overflow-base-gap),0px);min-width:0}.overflow-row.overflow-row-wrap{flex-wrap:wrap}.overflow-item{display:flex;flex-shrink:0;min-width:0}.overflow-row-wrap>.overflow-item{flex-shrink:1;max-width:100%}.overflow-item+.overflow-item,.overflow-more{margin-inline-start:min(var(--ap-overflow-base-gap),0px)}.overflow-more,.overflow-less{display:flex;flex-shrink:0}button.overflow-more,.overflow-less{padding:0;border:none;border-radius:var(--comp-label-border-radius);background:none;color:var(--sys-text-color-default);font:inherit;cursor:pointer}button.overflow-more:focus-visible,.overflow-less:focus-visible{outline:2px solid var(--ref-color-electric-blue-100);outline-offset:-2px}.overflow-hidden-items{display:flex;flex-wrap:wrap;gap:var(--ref-spacing-xxxs)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: OverflowCountDirective, selector: "[apOverflowCount]", inputs: ["gap", "counterFallbackWidth", "minVisible", "max", "collapse"], exportAs: ["apOverflowCount"] }, { kind: "directive", type: OverflowCounterDirective, selector: "[apOverflowCounter]" }, { kind: "directive", type: OverflowItemDirective, selector: "[apOverflowItem]" }, { kind: "directive", type: StopPropagationDirective, selector: "[apStopPropagation]" }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipArrow", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
172
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: OverflowBaseComponent, isStandalone: true, selector: "ap-overflow-base", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, itemText: { classPropertyName: "itemText", publicName: "itemText", isSignal: true, isRequired: false, transformFunction: null }, tooltipListItem: { classPropertyName: "tooltipListItem", publicName: "tooltipListItem", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--ap-overflow-base-gap": "gap() + 'px'" } }, queries: [{ propertyName: "itemTemplate", first: true, predicate: OverflowBaseItemDirective, descendants: true, isSignal: true }, { propertyName: "moreTemplate", first: true, predicate: OverflowBaseMoreDirective, descendants: true, isSignal: true }, { propertyName: "lessTemplate", first: true, predicate: OverflowBaseLessDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "overflowCount", first: true, predicate: OverflowCountDirective, descendants: true, isSignal: true }, { propertyName: "moreButton", first: true, predicate: ["moreButton"], descendants: true, isSignal: true }, { propertyName: "lessButton", first: true, predicate: ["lessButton"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #overflow=\"apOverflowCount\"\n class=\"overflow-row\"\n apOverflowCount\n [class.overflow-row-wrap]=\"!collapsing()\"\n [collapse]=\"collapsing()\"\n [gap]=\"gap()\"\n [max]=\"max()\">\n @for (item of items(); track trackBy()(item); let index = $index, count = $count) {\n <div\n class=\"overflow-item\"\n apOverflowItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate().templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index, count }\" />\n </div>\n }\n @if (collapsing() && overflow.hiddenCount() > 0) {\n @let hidden = hiddenItems(overflow.hiddenCount());\n @if (mode() === 'count') {\n <span\n class=\"overflow-more\"\n apOverflowCounter>\n <ng-container\n [ngTemplateOutlet]=\"moreContent\"\n [ngTemplateOutletContext]=\"{ $implicit: hidden.length }\" />\n </span>\n } @else {\n <button\n #moreButton\n type=\"button\"\n class=\"overflow-more\"\n apOverflowCounter\n apStopPropagation\n [apTooltip]=\"tooltipListItem() ? '' : hiddenList\"\n [apTooltipDisabled]=\"mode() !== 'tooltip'\"\n [apTooltipType]=\"tooltipListItem() ? CustomTooltipType.LIST : CustomTooltipType.DEFAULT\"\n [apTooltipListItems]=\"listItems(hidden)\"\n [apTooltipTemplateContext]=\"{ $implicit: hidden }\"\n [apTooltipTrigger]=\"trigger()\"\n [attr.aria-expanded]=\"mode() === 'expand' ? false : null\"\n [attr.aria-describedby]=\"namesId\"\n (click)=\"onMore()\">\n <ng-container\n [ngTemplateOutlet]=\"moreContent\"\n [ngTemplateOutletContext]=\"{ $implicit: hidden.length }\" />\n </button>\n <span\n hidden\n [id]=\"namesId\">\n {{ hiddenNames(hidden) }}\n </span>\n }\n }\n @if (mode() === 'expand' && expanded() && lessTemplate(); as less) {\n <button\n #lessButton\n type=\"button\"\n class=\"overflow-less\"\n apStopPropagation\n aria-expanded=\"true\"\n (click)=\"onLess()\">\n <ng-container [ngTemplateOutlet]=\"less.templateRef\" />\n </button>\n }\n</div>\n\n<ng-template\n #moreContent\n let-count>\n @if (moreTemplate(); as more) {\n <ng-container\n [ngTemplateOutlet]=\"more.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: count }\" />\n } @else {\n +{{ count }}\n }\n</ng-template>\n\n<ng-template\n #hiddenList\n let-hidden>\n <div class=\"overflow-hidden-items\">\n @for (item of hidden; track trackBy()(item); let index = $index, count = $count) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate().templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index, count }\" />\n }\n </div>\n</ng-template>\n", styles: [":host{display:block;min-width:0}.overflow-row{display:flex;align-items:center;gap:max(var(--ap-overflow-base-gap),0px);min-width:0}.overflow-row.overflow-row-wrap{flex-wrap:wrap}.overflow-item{display:flex;flex-shrink:0;min-width:0}.overflow-row-wrap>.overflow-item{flex-shrink:1;max-width:100%}.overflow-item+.overflow-item,.overflow-more{margin-inline-start:min(var(--ap-overflow-base-gap),0px)}.overflow-more,.overflow-less{display:flex;flex-shrink:0}button.overflow-more,.overflow-less{padding:0;border:none;border-radius:var(--comp-label-border-radius);background:none;color:var(--sys-text-color-default);font:inherit;cursor:pointer}button.overflow-more:focus-visible,.overflow-less:focus-visible{outline:2px solid var(--ref-color-electric-blue-100);outline-offset:-2px}.overflow-hidden-items{display:flex;flex-wrap:wrap;gap:var(--ref-spacing-xxxs)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: OverflowCountDirective, selector: "[apOverflowCount]", inputs: ["gap", "counterFallbackWidth", "minVisible", "max", "collapse"], exportAs: ["apOverflowCount"] }, { kind: "directive", type: OverflowCounterDirective, selector: "[apOverflowCounter]" }, { kind: "directive", type: OverflowItemDirective, selector: "[apOverflowItem]" }, { kind: "directive", type: StopPropagationDirective, selector: "[apStopPropagation]" }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipArrow", "apTooltipAnchor", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
173
173
  }
174
174
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: OverflowBaseComponent, decorators: [{
175
175
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components-overflow-base.mjs","sources":["../../../libs/ui-components/overflow-base/src/overflow-base.component.ts","../../../libs/ui-components/overflow-base/src/overflow-base.component.html","../../../libs/ui-components/overflow-base/src/agorapulse-ui-components-overflow-base.ts"],"sourcesContent":["import {\n OverflowCountDirective,\n OverflowCounterDirective,\n OverflowItemDirective,\n StopPropagationDirective,\n} from '@agorapulse/ui-components/directives';\nimport { CustomTooltipAvatarItem, CustomTooltipType, TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n afterRenderEffect,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n Directive,\n ElementRef,\n inject,\n input,\n signal,\n TemplateRef,\n viewChild,\n} from '@angular/core';\n\nlet nextId = 0;\n\n/**\n * What becomes of the items that do not fit on the line.\n * - `tooltip`: one line, then a \"+N\" whose tooltip lists the hidden items.\n * - `expand`: one line, then a \"+N\" that unfolds the list onto several lines; the `apOverflowBaseLess` button folds it back.\n * - `wrap`: nothing is hidden, the list wraps onto as many lines as it needs.\n * - `count`: one line, then a \"+N\" that does nothing, for a control that already shows the hidden items, like a select field.\n */\nexport type OverflowBaseMode = 'tooltip' | 'expand' | 'wrap' | 'count';\n\nexport interface OverflowBaseItemContext<T> {\n $implicit: T;\n /** Position of the item in `items`. */\n index: number;\n /** How many items the list holds. */\n count: number;\n}\n\nexport interface OverflowBaseMoreContext {\n /** How many items the \"+N\" stands for. */\n $implicit: number;\n}\n\n/**\n * Template of one item, rendered in the row and again in the tooltip that lists the hidden ones.\n *\n * Bind it to the same list as `ap-overflow-base` to type `let-item`; without the binding the item is `unknown`.\n *\n * @example\n * ```html\n * <ng-template let-label [apOverflowBaseItem]=\"labels\">\n * <ap-label [content]=\"label\" />\n * </ng-template>\n * ```\n */\n@Directive({\n selector: 'ng-template[apOverflowBaseItem]',\n})\nexport class OverflowBaseItemDirective<T> {\n readonly templateRef = inject<TemplateRef<OverflowBaseItemContext<T>>>(TemplateRef);\n\n /** The list the template renders, read only to type the template context. */\n readonly apOverflowBaseItem = input<readonly T[]>();\n\n static ngTemplateContextGuard<T>(_directive: OverflowBaseItemDirective<T>, _context: unknown): _context is OverflowBaseItemContext<T> {\n return true;\n }\n}\n\n/**\n * Replaces the default \"+N\" text, with a chip for instance. `let-count` is the number of hidden\n * items; the button around it, its tooltip and its accessible name stay the list's.\n */\n@Directive({\n selector: 'ng-template[apOverflowBaseMore]',\n})\nexport class OverflowBaseMoreDirective {\n readonly templateRef = inject<TemplateRef<OverflowBaseMoreContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: OverflowBaseMoreDirective, _context: unknown): _context is OverflowBaseMoreContext {\n return true;\n }\n}\n\n/** Content of the button that folds an unfolded `expand` list back, \"See less\" for instance. Without it the list stays unfolded. */\n@Directive({\n selector: 'ng-template[apOverflowBaseLess]',\n})\nexport class OverflowBaseLessDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef);\n}\n\n/**\n * Shows as many items as fit on one line, then a \"+N\" button: its tooltip lists the hidden items,\n * rendered with the item template itself, or it unfolds the list (see `mode`). Built on\n * `apOverflowCount`: the widths are measured, never estimated.\n *\n * The building block of `ap-overflow-list` and `ap-avatar-group`: use them for labels, tags and avatars,\n * and this only for a kind of item they do not render.\n *\n * The host takes the width its container gives it: `display: block`, or `flex: 1; min-width: 0` in a\n * flex parent. The \"+N\" click never reaches the ancestors, so the list works inside a clickable row.\n *\n * @example\n * ```html\n * <ap-overflow-base [items]=\"labels\">\n * <ng-template let-label [apOverflowBaseItem]=\"labels\">\n * <ap-label [content]=\"label\" />\n * </ng-template>\n * </ap-overflow-base>\n * ```\n */\n@Component({\n selector: 'ap-overflow-base',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './overflow-base.component.html',\n styleUrls: ['./overflow-base.component.scss'],\n imports: [\n NgTemplateOutlet,\n OverflowCountDirective,\n OverflowCounterDirective,\n OverflowItemDirective,\n StopPropagationDirective,\n TooltipDirective,\n ],\n host: {\n '[style.--ap-overflow-base-gap]': \"gap() + 'px'\",\n },\n})\nexport class OverflowBaseComponent<T> {\n /** The items, in display order: the hidden ones are always the last. */\n readonly items = input.required<readonly T[]>();\n /** What becomes of the items that do not fit on the line. */\n readonly mode = input<OverflowBaseMode>('tooltip');\n /** What opens the tooltip of the hidden items, in `tooltip` mode. */\n readonly trigger = input<'hover' | 'click'>('hover');\n /** Most items shown whatever the width; `wrap` shows them all. */\n readonly max = input<number | undefined>(undefined);\n /** Space between two items, in pixels. Negative, the items overlap, like a stack of avatars. */\n readonly gap = input(4);\n /** Text of an item, for the accessible description of the \"+N\" button. */\n readonly itemText = input<(item: T) => string>(item => String(item));\n /** Maps an item to an entry of a `LIST` tooltip (avatar and name); without it the tooltip renders the item template. */\n readonly tooltipListItem = input<(item: T) => CustomTooltipAvatarItem>();\n /** Identifies an item across changes of `items`, so that its element is kept; the item itself by default. */\n readonly trackBy = input<(item: T) => unknown>(item => item);\n\n protected readonly itemTemplate = contentChild.required<OverflowBaseItemDirective<T>>(OverflowBaseItemDirective);\n protected readonly moreTemplate = contentChild(OverflowBaseMoreDirective);\n protected readonly lessTemplate = contentChild(OverflowBaseLessDirective);\n\n protected readonly expanded = signal(false);\n protected readonly collapsing = computed(() => this.mode() !== 'wrap' && !(this.mode() === 'expand' && this.expanded()));\n protected readonly CustomTooltipType = CustomTooltipType;\n\n protected readonly namesId = `ap-overflow-base-names-${nextId++}`;\n\n private readonly overflowCount = viewChild.required(OverflowCountDirective);\n private readonly moreButton = viewChild<ElementRef<HTMLElement>>('moreButton');\n private readonly lessButton = viewChild<ElementRef<HTMLElement>>('lessButton');\n /** The button that replaces the one just clicked, focused once rendered so the focus does not fall back to the page. */\n private readonly pendingFocus = signal<'more' | 'less' | undefined>(undefined);\n\n constructor() {\n afterRenderEffect(() => {\n if (this.expanded() && this.overflowCount().hiddenCount() === 0) {\n this.expanded.set(false);\n }\n });\n afterRenderEffect(() => {\n const pending = this.pendingFocus();\n if (!pending) {\n return;\n }\n const button = pending === 'more' ? this.moreButton() : this.lessButton();\n const coming = pending === 'more' ? this.collapsing() && this.overflowCount().hiddenCount() > 0 : this.expanded();\n if (button || !coming) {\n button?.nativeElement.focus();\n this.pendingFocus.set(undefined);\n }\n });\n }\n\n protected hiddenItems(hiddenCount: number): readonly T[] {\n const items = this.items();\n return items.slice(Math.max(0, items.length - hiddenCount));\n }\n\n protected hiddenNames(hidden: readonly T[]): string {\n return hidden.map(item => this.itemText()(item)).join(', ');\n }\n\n protected listItems(hidden: readonly T[]): CustomTooltipAvatarItem[] {\n const toListItem = this.tooltipListItem();\n return toListItem ? hidden.map(item => toListItem(item)) : [];\n }\n\n protected onMore(): void {\n if (this.mode() === 'expand') {\n this.expanded.set(true);\n this.pendingFocus.set(this.lessTemplate() ? 'less' : undefined);\n }\n }\n\n protected onLess(): void {\n this.expanded.set(false);\n this.pendingFocus.set('more');\n }\n}\n","<div\n #overflow=\"apOverflowCount\"\n class=\"overflow-row\"\n apOverflowCount\n [class.overflow-row-wrap]=\"!collapsing()\"\n [collapse]=\"collapsing()\"\n [gap]=\"gap()\"\n [max]=\"max()\">\n @for (item of items(); track trackBy()(item); let index = $index, count = $count) {\n <div\n class=\"overflow-item\"\n apOverflowItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate().templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index, count }\" />\n </div>\n }\n @if (collapsing() && overflow.hiddenCount() > 0) {\n @let hidden = hiddenItems(overflow.hiddenCount());\n @if (mode() === 'count') {\n <span\n class=\"overflow-more\"\n apOverflowCounter>\n <ng-container\n [ngTemplateOutlet]=\"moreContent\"\n [ngTemplateOutletContext]=\"{ $implicit: hidden.length }\" />\n </span>\n } @else {\n <button\n #moreButton\n type=\"button\"\n class=\"overflow-more\"\n apOverflowCounter\n apStopPropagation\n [apTooltip]=\"tooltipListItem() ? '' : hiddenList\"\n [apTooltipDisabled]=\"mode() !== 'tooltip'\"\n [apTooltipType]=\"tooltipListItem() ? CustomTooltipType.LIST : CustomTooltipType.DEFAULT\"\n [apTooltipListItems]=\"listItems(hidden)\"\n [apTooltipTemplateContext]=\"{ $implicit: hidden }\"\n [apTooltipTrigger]=\"trigger()\"\n [attr.aria-expanded]=\"mode() === 'expand' ? false : null\"\n [attr.aria-describedby]=\"namesId\"\n (click)=\"onMore()\">\n <ng-container\n [ngTemplateOutlet]=\"moreContent\"\n [ngTemplateOutletContext]=\"{ $implicit: hidden.length }\" />\n </button>\n <span\n hidden\n [id]=\"namesId\">\n {{ hiddenNames(hidden) }}\n </span>\n }\n }\n @if (mode() === 'expand' && expanded() && lessTemplate(); as less) {\n <button\n #lessButton\n type=\"button\"\n class=\"overflow-less\"\n apStopPropagation\n aria-expanded=\"true\"\n (click)=\"onLess()\">\n <ng-container [ngTemplateOutlet]=\"less.templateRef\" />\n </button>\n }\n</div>\n\n<ng-template\n #moreContent\n let-count>\n @if (moreTemplate(); as more) {\n <ng-container\n [ngTemplateOutlet]=\"more.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: count }\" />\n } @else {\n +{{ count }}\n }\n</ng-template>\n\n<ng-template\n #hiddenList\n let-hidden>\n <div class=\"overflow-hidden-items\">\n @for (item of hidden; track trackBy()(item); let index = $index, count = $count) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate().templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index, count }\" />\n }\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAuBA,IAAI,MAAM,GAAG,CAAC;AAwBd;;;;;;;;;;;AAWG;MAIU,yBAAyB,CAAA;AACzB,IAAA,WAAW,GAAG,MAAM,CAA0C,WAAW,CAAC;;AAG1E,IAAA,kBAAkB,GAAG,KAAK;sGAAgB;AAEnD,IAAA,OAAO,sBAAsB,CAAI,UAAwC,EAAE,QAAiB,EAAA;AACxF,QAAA,OAAO,IAAI;IACf;uGARS,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAA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A,EAAA,CACZ,YAAY,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnKjF;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-components-overflow-base.mjs","sources":["../../../libs/ui-components/overflow-base/src/overflow-base.component.ts","../../../libs/ui-components/overflow-base/src/overflow-base.component.html","../../../libs/ui-components/overflow-base/src/agorapulse-ui-components-overflow-base.ts"],"sourcesContent":["import {\n OverflowCountDirective,\n OverflowCounterDirective,\n OverflowItemDirective,\n StopPropagationDirective,\n} from '@agorapulse/ui-components/directives';\nimport { CustomTooltipAvatarItem, CustomTooltipType, TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n afterRenderEffect,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n Directive,\n ElementRef,\n inject,\n input,\n signal,\n TemplateRef,\n viewChild,\n} from '@angular/core';\n\nlet nextId = 0;\n\n/**\n * What becomes of the items that do not fit on the line.\n * - `tooltip`: one line, then a \"+N\" whose tooltip lists the hidden items.\n * - `expand`: one line, then a \"+N\" that unfolds the list onto several lines; the `apOverflowBaseLess` button folds it back.\n * - `wrap`: nothing is hidden, the list wraps onto as many lines as it needs.\n * - `count`: one line, then a \"+N\" that does nothing, for a control that already shows the hidden items, like a select field.\n */\nexport type OverflowBaseMode = 'tooltip' | 'expand' | 'wrap' | 'count';\n\nexport interface OverflowBaseItemContext<T> {\n $implicit: T;\n /** Position of the item in `items`. */\n index: number;\n /** How many items the list holds. */\n count: number;\n}\n\nexport interface OverflowBaseMoreContext {\n /** How many items the \"+N\" stands for. */\n $implicit: number;\n}\n\n/**\n * Template of one item, rendered in the row and again in the tooltip that lists the hidden ones.\n *\n * Bind it to the same list as `ap-overflow-base` to type `let-item`; without the binding the item is `unknown`.\n *\n * @example\n * ```html\n * <ng-template let-label [apOverflowBaseItem]=\"labels\">\n * <ap-label [content]=\"label\" />\n * </ng-template>\n * ```\n */\n@Directive({\n selector: 'ng-template[apOverflowBaseItem]',\n})\nexport class OverflowBaseItemDirective<T> {\n readonly templateRef = inject<TemplateRef<OverflowBaseItemContext<T>>>(TemplateRef);\n\n /** The list the template renders, read only to type the template context. */\n readonly apOverflowBaseItem = input<readonly T[]>();\n\n static ngTemplateContextGuard<T>(_directive: OverflowBaseItemDirective<T>, _context: unknown): _context is OverflowBaseItemContext<T> {\n return true;\n }\n}\n\n/**\n * Replaces the default \"+N\" text, with a chip for instance. `let-count` is the number of hidden\n * items; the button around it, its tooltip and its accessible name stay the list's.\n */\n@Directive({\n selector: 'ng-template[apOverflowBaseMore]',\n})\nexport class OverflowBaseMoreDirective {\n readonly templateRef = inject<TemplateRef<OverflowBaseMoreContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: OverflowBaseMoreDirective, _context: unknown): _context is OverflowBaseMoreContext {\n return true;\n }\n}\n\n/** Content of the button that folds an unfolded `expand` list back, \"See less\" for instance. Without it the list stays unfolded. */\n@Directive({\n selector: 'ng-template[apOverflowBaseLess]',\n})\nexport class OverflowBaseLessDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef);\n}\n\n/**\n * Shows as many items as fit on one line, then a \"+N\" button: its tooltip lists the hidden items,\n * rendered with the item template itself, or it unfolds the list (see `mode`). Built on\n * `apOverflowCount`: the widths are measured, never estimated.\n *\n * The building block of `ap-overflow-list` and `ap-avatar-group`: use them for labels, tags and avatars,\n * and this only for a kind of item they do not render.\n *\n * The host takes the width its container gives it: `display: block`, or `flex: 1; min-width: 0` in a\n * flex parent. The \"+N\" click never reaches the ancestors, so the list works inside a clickable row.\n *\n * @example\n * ```html\n * <ap-overflow-base [items]=\"labels\">\n * <ng-template let-label [apOverflowBaseItem]=\"labels\">\n * <ap-label [content]=\"label\" />\n * </ng-template>\n * </ap-overflow-base>\n * ```\n */\n@Component({\n selector: 'ap-overflow-base',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './overflow-base.component.html',\n styleUrls: ['./overflow-base.component.scss'],\n imports: [\n NgTemplateOutlet,\n OverflowCountDirective,\n OverflowCounterDirective,\n OverflowItemDirective,\n StopPropagationDirective,\n TooltipDirective,\n ],\n host: {\n '[style.--ap-overflow-base-gap]': \"gap() + 'px'\",\n },\n})\nexport class OverflowBaseComponent<T> {\n /** The items, in display order: the hidden ones are always the last. */\n readonly items = input.required<readonly T[]>();\n /** What becomes of the items that do not fit on the line. */\n readonly mode = input<OverflowBaseMode>('tooltip');\n /** What opens the tooltip of the hidden items, in `tooltip` mode. */\n readonly trigger = input<'hover' | 'click'>('hover');\n /** Most items shown whatever the width; `wrap` shows them all. */\n readonly max = input<number | undefined>(undefined);\n /** Space between two items, in pixels. Negative, the items overlap, like a stack of avatars. */\n readonly gap = input(4);\n /** Text of an item, for the accessible description of the \"+N\" button. */\n readonly itemText = input<(item: T) => string>(item => String(item));\n /** Maps an item to an entry of a `LIST` tooltip (avatar and name); without it the tooltip renders the item template. */\n readonly tooltipListItem = input<(item: T) => CustomTooltipAvatarItem>();\n /** Identifies an item across changes of `items`, so that its element is kept; the item itself by default. */\n readonly trackBy = input<(item: T) => unknown>(item => item);\n\n protected readonly itemTemplate = contentChild.required<OverflowBaseItemDirective<T>>(OverflowBaseItemDirective);\n protected readonly moreTemplate = contentChild(OverflowBaseMoreDirective);\n protected readonly lessTemplate = contentChild(OverflowBaseLessDirective);\n\n protected readonly expanded = signal(false);\n protected readonly collapsing = computed(() => this.mode() !== 'wrap' && !(this.mode() === 'expand' && this.expanded()));\n protected readonly CustomTooltipType = CustomTooltipType;\n\n protected readonly namesId = `ap-overflow-base-names-${nextId++}`;\n\n private readonly overflowCount = viewChild.required(OverflowCountDirective);\n private readonly moreButton = viewChild<ElementRef<HTMLElement>>('moreButton');\n private readonly lessButton = viewChild<ElementRef<HTMLElement>>('lessButton');\n /** The button that replaces the one just clicked, focused once rendered so the focus does not fall back to the page. */\n private readonly pendingFocus = signal<'more' | 'less' | undefined>(undefined);\n\n constructor() {\n afterRenderEffect(() => {\n if (this.expanded() && this.overflowCount().hiddenCount() === 0) {\n this.expanded.set(false);\n }\n });\n afterRenderEffect(() => {\n const pending = this.pendingFocus();\n if (!pending) {\n return;\n }\n const button = pending === 'more' ? this.moreButton() : this.lessButton();\n const coming = pending === 'more' ? this.collapsing() && this.overflowCount().hiddenCount() > 0 : this.expanded();\n if (button || !coming) {\n button?.nativeElement.focus();\n this.pendingFocus.set(undefined);\n }\n });\n }\n\n protected hiddenItems(hiddenCount: number): readonly T[] {\n const items = this.items();\n return items.slice(Math.max(0, items.length - hiddenCount));\n }\n\n protected hiddenNames(hidden: readonly T[]): string {\n return hidden.map(item => this.itemText()(item)).join(', ');\n }\n\n protected listItems(hidden: readonly T[]): CustomTooltipAvatarItem[] {\n const toListItem = this.tooltipListItem();\n return toListItem ? hidden.map(item => toListItem(item)) : [];\n }\n\n protected onMore(): void {\n if (this.mode() === 'expand') {\n this.expanded.set(true);\n this.pendingFocus.set(this.lessTemplate() ? 'less' : undefined);\n }\n }\n\n protected onLess(): void {\n this.expanded.set(false);\n this.pendingFocus.set('more');\n }\n}\n","<div\n #overflow=\"apOverflowCount\"\n class=\"overflow-row\"\n apOverflowCount\n [class.overflow-row-wrap]=\"!collapsing()\"\n [collapse]=\"collapsing()\"\n [gap]=\"gap()\"\n [max]=\"max()\">\n @for (item of items(); track trackBy()(item); let index = $index, count = $count) {\n <div\n class=\"overflow-item\"\n apOverflowItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate().templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index, count }\" />\n </div>\n }\n @if (collapsing() && overflow.hiddenCount() > 0) {\n @let hidden = hiddenItems(overflow.hiddenCount());\n @if (mode() === 'count') {\n <span\n class=\"overflow-more\"\n apOverflowCounter>\n <ng-container\n [ngTemplateOutlet]=\"moreContent\"\n [ngTemplateOutletContext]=\"{ $implicit: hidden.length }\" />\n </span>\n } @else {\n <button\n #moreButton\n type=\"button\"\n class=\"overflow-more\"\n apOverflowCounter\n apStopPropagation\n [apTooltip]=\"tooltipListItem() ? '' : hiddenList\"\n [apTooltipDisabled]=\"mode() !== 'tooltip'\"\n [apTooltipType]=\"tooltipListItem() ? CustomTooltipType.LIST : CustomTooltipType.DEFAULT\"\n [apTooltipListItems]=\"listItems(hidden)\"\n [apTooltipTemplateContext]=\"{ $implicit: hidden }\"\n [apTooltipTrigger]=\"trigger()\"\n [attr.aria-expanded]=\"mode() === 'expand' ? false : null\"\n [attr.aria-describedby]=\"namesId\"\n (click)=\"onMore()\">\n <ng-container\n [ngTemplateOutlet]=\"moreContent\"\n [ngTemplateOutletContext]=\"{ $implicit: hidden.length }\" />\n </button>\n <span\n hidden\n [id]=\"namesId\">\n {{ hiddenNames(hidden) }}\n </span>\n }\n }\n @if (mode() === 'expand' && expanded() && lessTemplate(); as less) {\n <button\n #lessButton\n type=\"button\"\n class=\"overflow-less\"\n apStopPropagation\n aria-expanded=\"true\"\n (click)=\"onLess()\">\n <ng-container [ngTemplateOutlet]=\"less.templateRef\" />\n </button>\n }\n</div>\n\n<ng-template\n #moreContent\n let-count>\n @if (moreTemplate(); as more) {\n <ng-container\n [ngTemplateOutlet]=\"more.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: count }\" />\n } @else {\n +{{ count }}\n }\n</ng-template>\n\n<ng-template\n #hiddenList\n let-hidden>\n <div class=\"overflow-hidden-items\">\n @for (item of hidden; track trackBy()(item); let index = $index, count = $count) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate().templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index, count }\" />\n }\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAuBA,IAAI,MAAM,GAAG,CAAC;AAwBd;;;;;;;;;;;AAWG;MAIU,yBAAyB,CAAA;AACzB,IAAA,WAAW,GAAG,MAAM,CAA0C,WAAW,CAAC;;AAG1E,IAAA,kBA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AAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CACT,YAAY,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CACZ,YAAY,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnKjF;;AAEG;;;;"}
@@ -99,7 +99,7 @@ class RadioButtonCardComponent {
99
99
  this.onModelTouched = fn;
100
100
  }
101
101
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: RadioButtonCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
102
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: RadioButtonCardComponent, isStandalone: true, selector: "ap-radio-button-card", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, radioId: { classPropertyName: "radioId", publicName: "radioId", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, linkUrl: { classPropertyName: "linkUrl", publicName: "linkUrl", isSignal: true, isRequired: false, transformFunction: null }, linkTitle: { classPropertyName: "linkTitle", publicName: "linkTitle", isSignal: true, isRequired: false, transformFunction: null }, titleSymbolId: { classPropertyName: "titleSymbolId", publicName: "titleSymbolId", isSignal: true, isRequired: false, transformFunction: null }, tooltipText: { classPropertyName: "tooltipText", publicName: "tooltipText", isSignal: true, isRequired: false, transformFunction: null }, statusBadge: { classPropertyName: "statusBadge", publicName: "statusBadge", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, featureLocked: { classPropertyName: "featureLocked", publicName: "featureLocked", isSignal: true, isRequired: false, transformFunction: null }, hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null }, centered: { classPropertyName: "centered", publicName: "centered", isSignal: true, isRequired: false, transformFunction: null } }, providers: [withSymbols(apInfo)], ngImport: i0, template: "<div\n class=\"radio-button-card__container\"\n [class.radio-button-card__container--default]=\"mode() === 'default'\"\n [class.radio-button-card__container--card]=\"mode() === 'card'\"\n [class.radio-button-card__container--locked]=\"featureLocked()\"\n [class.radio-button-card__container--error]=\"hasError()\"\n [class.radio-button-card__container--centered]=\"centeredLayout()\">\n <input\n type=\"radio\"\n class=\"radio-button-card__input\"\n [attr.id]=\"radioId()\"\n [attr.name]=\"computedName()\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [value]=\"value()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled() || featureLocked()\"\n (change)=\"select()\" />\n <label\n class=\"radio-button-card__label\"\n [attr.for]=\"radioId()\">\n @if (featureLocked()) {\n <div class=\"radio-button-card__lock-icon\">\n <ap-symbol symbolId=\"feature-lock\" />\n </div>\n } @else {\n <div class=\"radio-button-card__indicator\">\n <div class=\"radio-button-card__indicator-outer\">\n <div class=\"radio-button-card__indicator-inner\"></div>\n </div>\n </div>\n }\n <div class=\"radio-button-card__content\">\n @if (customContentEnabled()) {\n <div class=\"radio-button-card__structured-content\">\n <div class=\"radio-button-card__header\">\n <div class=\"radio-button-card__header-left\">\n @if (titleSymbolId()) {\n <ap-symbol\n class=\"radio-button-card__title-symbol\"\n color=\"grey-blue\"\n [symbolId]=\"titleSymbolId()\" />\n }\n @if (title()) {\n <div class=\"radio-button-card__title\">{{ title() }}</div>\n }\n </div>\n <div class=\"radio-button-card__header-right\">\n @if (statusBadge()) {\n <ap-status\n class=\"radio-button-card__status\"\n color=\"grey\"\n [dot]=\"false\">\n {{ statusBadge() }}\n </ap-status>\n }\n @if (tooltipText()) {\n <ap-symbol\n apTooltipPosition=\"top\"\n class=\"radio-button-card__tooltip-icon\"\n symbolId=\"info\"\n [apTooltip]=\"tooltipText()\" />\n }\n </div>\n </div>\n @if (description()) {\n <div class=\"radio-button-card__description\">{{ description() }}</div>\n }\n @if (linkUrl()) {\n <a\n class=\"standalone radio-button-card__link\"\n apStopPropagation\n [href]=\"linkUrl()\">\n {{ linkTitle() }}\n </a>\n }\n </div>\n } @else {\n <ng-content />\n }\n </div>\n </label>\n</div>\n", styles: ["ap-radio-button-card{display:block}ap-radio-button-card .radio-button-card__container{--radio-background: var(--ref-color-white);--radio-border-color: var(--ref-color-grey-20);--radio-border-color-hover: var(--ref-color-grey-80);--radio-border-color-focus: var(--ref-color-grey-100);--radio-indicator-border: var(--ref-color-grey-60);--radio-indicator-border-hover: var(--ref-color-grey-80);--radio-indicator-border-focus: var(--ref-color-grey-100);--radio-indicator-fill: var(--ref-color-electric-blue-100);--radio-content-opacity: 1;--radio-cursor: pointer;position:relative;display:block;width:100%;transition:all .2s ease-in-out;border:1px solid var(--radio-border-color);border-radius:var(--ref-border-radius-md);background:var(--radio-background)}ap-radio-button-card .radio-button-card__container:has(input:not(:disabled)):hover:not(:focus-within){border-color:var(--radio-border-color-hover)}ap-radio-button-card .radio-button-card__container:focus-within:has(input:not(:disabled)){border-color:var(--radio-border-color-focus)}ap-radio-button-card .radio-button-card__container:has(input:focus-visible){outline:2px solid var(--ref-color-electric-blue-100);outline-offset:2px}ap-radio-button-card .radio-button-card__container--default.radio-button-card__container{--radio-border-color: transparent;--radio-border-color-hover: transparent;--radio-border-color-focus: var(--ref-color-electric-blue-100);border-radius:var(--ref-border-radius-md)}ap-radio-button-card .radio-button-card__container--default.radio-button-card__container:has(input:focus-visible){outline:none}ap-radio-button-card .radio-button-card__container--default.radio-button-card__container:has(input:checked){--radio-border-color: transparent;--radio-border-color-hover: transparent;--radio-border-color-focus: transparent}ap-radio-button-card .radio-button-card__container--centered{display:flex;align-items:center}ap-radio-button-card .radio-button-card__container--centered .radio-button-card__header{align-items:center}ap-radio-button-card .radio-button-card__container--centered .radio-button-card__indicator,ap-radio-button-card .radio-button-card__container--centered .radio-button-card__lock-icon{top:50%;transform:translateY(-50%)}ap-radio-button-card .radio-button-card__container:has(input:checked){--radio-border-color: var(--ref-color-electric-blue-100);--radio-border-color-hover: var(--ref-color-electric-blue-100);--radio-border-color-focus: var(--ref-color-electric-blue-100);--radio-indicator-border: var(--ref-color-electric-blue-100);--radio-indicator-border-hover: var(--ref-color-electric-blue-100);--radio-indicator-border-focus: var(--ref-color-electric-blue-100)}ap-radio-button-card .radio-button-card__container:has(input:disabled){--radio-border-color: var(--ref-color-grey-20);--radio-border-color-hover: var(--ref-color-grey-20);--radio-border-color-focus: var(--ref-color-grey-20);--radio-indicator-border: var(--ref-color-grey-40);--radio-indicator-border-hover: var(--ref-color-grey-40);--radio-indicator-border-focus: var(--ref-color-grey-40);--radio-indicator-fill: var(--ref-color-grey-60);--radio-content-opacity: .6;--radio-cursor: not-allowed}ap-radio-button-card .radio-button-card__container:has(input:disabled):has(input:checked){--radio-border-color: var(--ref-color-grey-40)}ap-radio-button-card .radio-button-card__container--default:has(input:disabled){--radio-border-color: transparent}ap-radio-button-card .radio-button-card__container--locked:has(input:disabled){--radio-border-color: var(--ref-color-purple-20);--radio-border-color-hover: var(--ref-color-purple-20);--radio-border-color-focus: var(--ref-color-purple-20);--radio-background: var(--ref-color-purple-10);--radio-cursor: not-allowed}ap-radio-button-card .radio-button-card__container--error{--radio-border-color: var(--ref-color-red-100);--radio-border-color-hover: var(--ref-color-red-60);--radio-border-color-focus: var(--ref-color-red-100);--radio-indicator-border: var(--ref-color-red-100);--radio-indicator-border-hover: var(--ref-color-red-60);--radio-indicator-border-focus: var(--ref-color-red-100);--radio-indicator-fill: var(--ref-color-red-100)}ap-radio-button-card .radio-button-card__container--error:has(input:checked){--radio-border-color: var(--ref-color-red-100);--radio-border-color-hover: var(--ref-color-red-60);--radio-border-color-focus: var(--ref-color-red-100);--radio-indicator-border: var(--ref-color-red-100);--radio-indicator-border-hover: var(--ref-color-red-60);--radio-indicator-border-focus: var(--ref-color-red-100)}ap-radio-button-card .radio-button-card__container--error:has(input:disabled){--radio-border-color-hover: var(--ref-color-red-100);--radio-border-color-focus: var(--ref-color-red-100)}ap-radio-button-card .radio-button-card__label{display:block;width:100%;padding:var(--ref-spacing-xs);padding-left:36px;cursor:var(--radio-cursor);text-align:left;font-family:inherit;font-size:inherit}ap-radio-button-card .radio-button-card__input{position:absolute;opacity:0;width:0;height:0;pointer-events:none}ap-radio-button-card .radio-button-card__indicator{position:absolute;top:13px;left:12px;opacity:var(--radio-content-opacity)}ap-radio-button-card .radio-button-card__lock-icon{position:absolute;top:13px;left:12px;width:16px;height:16px;display:flex;align-items:center;justify-content:center;color:var(--ref-color-purple-100)}ap-radio-button-card .radio-button-card__lock-icon ap-symbol{width:16px;height:16px}ap-radio-button-card .radio-button-card__indicator-outer{width:16px;height:16px;border:1px solid var(--radio-indicator-border);border-radius:50%;background:var(--ref-color-white);transition:all .2s ease-in-out;display:flex;align-items:center;justify-content:center}ap-radio-button-card .radio-button-card__container:has(input:not(:disabled)):hover:not(:focus-within) .radio-button-card__indicator-outer{border-color:var(--radio-indicator-border-hover)}ap-radio-button-card .radio-button-card__container:focus-within:has(input:not(:disabled)) .radio-button-card__indicator-outer{border-color:var(--radio-indicator-border-focus)}ap-radio-button-card .radio-button-card__container:has(input:disabled) .radio-button-card__indicator-outer{background:var(--ref-color-grey-10)}ap-radio-button-card .radio-button-card__indicator-inner{width:10px;height:10px;border-radius:50%;background:var(--radio-indicator-fill);transform:scale(0);transition:transform .2s ease-in-out}ap-radio-button-card .radio-button-card__container:has(input:checked) .radio-button-card__indicator-inner{transform:scale(1)}ap-radio-button-card .radio-button-card__content{display:block;font-family:var(--sys-text-style-body-font-family);font-size:var(--sys-text-style-body-size);line-height:var(--sys-text-style-body-line-height);color:var(--ref-color-grey-100);cursor:var(--radio-cursor)}ap-radio-button-card .radio-button-card__content:not(:has(.radio-button-card__structured-content)){opacity:var(--radio-content-opacity)}ap-radio-button-card .radio-button-card__structured-content{display:flex;flex-direction:column;gap:var(--ref-spacing-xxxs)}ap-radio-button-card .radio-button-card__header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--ref-spacing-sm)}ap-radio-button-card .radio-button-card__header-left{display:flex;align-items:center;gap:var(--ref-spacing-xxxs);flex:1;min-width:0;opacity:var(--radio-content-opacity)}ap-radio-button-card .radio-button-card__header-right{display:flex;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0}ap-radio-button-card .radio-button-card__title-symbol{flex-shrink:0;width:16px;height:16px}ap-radio-button-card .radio-button-card__title{font-size:var(--ref-font-size-sm);font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-sm);flex:1;min-width:0;opacity:var(--radio-content-opacity)}ap-radio-button-card .radio-button-card__status{flex-shrink:0}ap-radio-button-card .radio-button-card__tooltip-icon{width:16px;height:16px;color:var(--ref-color-grey-60);flex-shrink:0}ap-radio-button-card .radio-button-card__tooltip-icon:hover{color:var(--ref-color-grey-80)}ap-radio-button-card .radio-button-card__description{font-size:var(--ref-font-size-sm);font-style:normal;line-height:var(--ref-font-line-height-sm);color:var(--ref-color-grey-80);opacity:var(--radio-content-opacity)}ap-radio-button-card a{display:block;gap:0}ap-radio-button-card.ng-invalid.ng-dirty .radio-button-card__container{--radio-border-color: var(--ref-color-red-100);--radio-border-color-hover: var(--ref-color-red-60);--radio-indicator-border: var(--ref-color-red-100);--radio-indicator-fill: var(--ref-color-red-100)}ap-radio-button-card.ng-invalid.ng-dirty .radio-button-card__container.radio-button-card__container--default{--radio-border-color: transparent;--radio-border-color-hover: transparent}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: StatusComponent, selector: "ap-status", inputs: ["color", "dot"] }, { kind: "directive", type: StopPropagationDirective, selector: "[apStopPropagation]" }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipArrow", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
102
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: RadioButtonCardComponent, isStandalone: true, selector: "ap-radio-button-card", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, radioId: { classPropertyName: "radioId", publicName: "radioId", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, linkUrl: { classPropertyName: "linkUrl", publicName: "linkUrl", isSignal: true, isRequired: false, transformFunction: null }, linkTitle: { classPropertyName: "linkTitle", publicName: "linkTitle", isSignal: true, isRequired: false, transformFunction: null }, titleSymbolId: { classPropertyName: "titleSymbolId", publicName: "titleSymbolId", isSignal: true, isRequired: false, transformFunction: null }, tooltipText: { classPropertyName: "tooltipText", publicName: "tooltipText", isSignal: true, isRequired: false, transformFunction: null }, statusBadge: { classPropertyName: "statusBadge", publicName: "statusBadge", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, featureLocked: { classPropertyName: "featureLocked", publicName: "featureLocked", isSignal: true, isRequired: false, transformFunction: null }, hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null }, centered: { classPropertyName: "centered", publicName: "centered", isSignal: true, isRequired: false, transformFunction: null } }, providers: [withSymbols(apInfo)], ngImport: i0, template: "<div\n class=\"radio-button-card__container\"\n [class.radio-button-card__container--default]=\"mode() === 'default'\"\n [class.radio-button-card__container--card]=\"mode() === 'card'\"\n [class.radio-button-card__container--locked]=\"featureLocked()\"\n [class.radio-button-card__container--error]=\"hasError()\"\n [class.radio-button-card__container--centered]=\"centeredLayout()\">\n <input\n type=\"radio\"\n class=\"radio-button-card__input\"\n [attr.id]=\"radioId()\"\n [attr.name]=\"computedName()\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [value]=\"value()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled() || featureLocked()\"\n (change)=\"select()\" />\n <label\n class=\"radio-button-card__label\"\n [attr.for]=\"radioId()\">\n @if (featureLocked()) {\n <div class=\"radio-button-card__lock-icon\">\n <ap-symbol symbolId=\"feature-lock\" />\n </div>\n } @else {\n <div class=\"radio-button-card__indicator\">\n <div class=\"radio-button-card__indicator-outer\">\n <div class=\"radio-button-card__indicator-inner\"></div>\n </div>\n </div>\n }\n <div class=\"radio-button-card__content\">\n @if (customContentEnabled()) {\n <div class=\"radio-button-card__structured-content\">\n <div class=\"radio-button-card__header\">\n <div class=\"radio-button-card__header-left\">\n @if (titleSymbolId()) {\n <ap-symbol\n class=\"radio-button-card__title-symbol\"\n color=\"grey-blue\"\n [symbolId]=\"titleSymbolId()\" />\n }\n @if (title()) {\n <div class=\"radio-button-card__title\">{{ title() }}</div>\n }\n </div>\n <div class=\"radio-button-card__header-right\">\n @if (statusBadge()) {\n <ap-status\n class=\"radio-button-card__status\"\n color=\"grey\"\n [dot]=\"false\">\n {{ statusBadge() }}\n </ap-status>\n }\n @if (tooltipText()) {\n <ap-symbol\n apTooltipPosition=\"top\"\n class=\"radio-button-card__tooltip-icon\"\n symbolId=\"info\"\n [apTooltip]=\"tooltipText()\" />\n }\n </div>\n </div>\n @if (description()) {\n <div class=\"radio-button-card__description\">{{ description() }}</div>\n }\n @if (linkUrl()) {\n <a\n class=\"standalone radio-button-card__link\"\n apStopPropagation\n [href]=\"linkUrl()\">\n {{ linkTitle() }}\n </a>\n }\n </div>\n } @else {\n <ng-content />\n }\n </div>\n </label>\n</div>\n", styles: ["ap-radio-button-card{display:block}ap-radio-button-card .radio-button-card__container{--radio-background: var(--ref-color-white);--radio-border-color: var(--ref-color-grey-20);--radio-border-color-hover: var(--ref-color-grey-80);--radio-border-color-focus: var(--ref-color-grey-100);--radio-indicator-border: var(--ref-color-grey-60);--radio-indicator-border-hover: var(--ref-color-grey-80);--radio-indicator-border-focus: var(--ref-color-grey-100);--radio-indicator-fill: var(--ref-color-electric-blue-100);--radio-content-opacity: 1;--radio-cursor: pointer;position:relative;display:block;width:100%;transition:all .2s ease-in-out;border:1px solid var(--radio-border-color);border-radius:var(--ref-border-radius-md);background:var(--radio-background)}ap-radio-button-card .radio-button-card__container:has(input:not(:disabled)):hover:not(:focus-within){border-color:var(--radio-border-color-hover)}ap-radio-button-card .radio-button-card__container:focus-within:has(input:not(:disabled)){border-color:var(--radio-border-color-focus)}ap-radio-button-card .radio-button-card__container:has(input:focus-visible){outline:2px solid var(--ref-color-electric-blue-100);outline-offset:2px}ap-radio-button-card .radio-button-card__container--default.radio-button-card__container{--radio-border-color: transparent;--radio-border-color-hover: transparent;--radio-border-color-focus: var(--ref-color-electric-blue-100);border-radius:var(--ref-border-radius-md)}ap-radio-button-card .radio-button-card__container--default.radio-button-card__container:has(input:focus-visible){outline:none}ap-radio-button-card .radio-button-card__container--default.radio-button-card__container:has(input:checked){--radio-border-color: transparent;--radio-border-color-hover: transparent;--radio-border-color-focus: transparent}ap-radio-button-card .radio-button-card__container--centered{display:flex;align-items:center}ap-radio-button-card .radio-button-card__container--centered .radio-button-card__header{align-items:center}ap-radio-button-card .radio-button-card__container--centered .radio-button-card__indicator,ap-radio-button-card .radio-button-card__container--centered .radio-button-card__lock-icon{top:50%;transform:translateY(-50%)}ap-radio-button-card .radio-button-card__container:has(input:checked){--radio-border-color: var(--ref-color-electric-blue-100);--radio-border-color-hover: var(--ref-color-electric-blue-100);--radio-border-color-focus: var(--ref-color-electric-blue-100);--radio-indicator-border: var(--ref-color-electric-blue-100);--radio-indicator-border-hover: var(--ref-color-electric-blue-100);--radio-indicator-border-focus: var(--ref-color-electric-blue-100)}ap-radio-button-card .radio-button-card__container:has(input:disabled){--radio-border-color: var(--ref-color-grey-20);--radio-border-color-hover: var(--ref-color-grey-20);--radio-border-color-focus: var(--ref-color-grey-20);--radio-indicator-border: var(--ref-color-grey-40);--radio-indicator-border-hover: var(--ref-color-grey-40);--radio-indicator-border-focus: var(--ref-color-grey-40);--radio-indicator-fill: var(--ref-color-grey-60);--radio-content-opacity: .6;--radio-cursor: not-allowed}ap-radio-button-card .radio-button-card__container:has(input:disabled):has(input:checked){--radio-border-color: var(--ref-color-grey-40)}ap-radio-button-card .radio-button-card__container--default:has(input:disabled){--radio-border-color: transparent}ap-radio-button-card .radio-button-card__container--locked:has(input:disabled){--radio-border-color: var(--ref-color-purple-20);--radio-border-color-hover: var(--ref-color-purple-20);--radio-border-color-focus: var(--ref-color-purple-20);--radio-background: var(--ref-color-purple-10);--radio-cursor: not-allowed}ap-radio-button-card .radio-button-card__container--error{--radio-border-color: var(--ref-color-red-100);--radio-border-color-hover: var(--ref-color-red-60);--radio-border-color-focus: var(--ref-color-red-100);--radio-indicator-border: var(--ref-color-red-100);--radio-indicator-border-hover: var(--ref-color-red-60);--radio-indicator-border-focus: var(--ref-color-red-100);--radio-indicator-fill: var(--ref-color-red-100)}ap-radio-button-card .radio-button-card__container--error:has(input:checked){--radio-border-color: var(--ref-color-red-100);--radio-border-color-hover: var(--ref-color-red-60);--radio-border-color-focus: var(--ref-color-red-100);--radio-indicator-border: var(--ref-color-red-100);--radio-indicator-border-hover: var(--ref-color-red-60);--radio-indicator-border-focus: var(--ref-color-red-100)}ap-radio-button-card .radio-button-card__container--error:has(input:disabled){--radio-border-color-hover: var(--ref-color-red-100);--radio-border-color-focus: var(--ref-color-red-100)}ap-radio-button-card .radio-button-card__label{display:block;width:100%;padding:var(--ref-spacing-xs);padding-left:36px;cursor:var(--radio-cursor);text-align:left;font-family:inherit;font-size:inherit}ap-radio-button-card .radio-button-card__input{position:absolute;opacity:0;width:0;height:0;pointer-events:none}ap-radio-button-card .radio-button-card__indicator{position:absolute;top:13px;left:12px;opacity:var(--radio-content-opacity)}ap-radio-button-card .radio-button-card__lock-icon{position:absolute;top:13px;left:12px;width:16px;height:16px;display:flex;align-items:center;justify-content:center;color:var(--ref-color-purple-100)}ap-radio-button-card .radio-button-card__lock-icon ap-symbol{width:16px;height:16px}ap-radio-button-card .radio-button-card__indicator-outer{width:16px;height:16px;border:1px solid var(--radio-indicator-border);border-radius:50%;background:var(--ref-color-white);transition:all .2s ease-in-out;display:flex;align-items:center;justify-content:center}ap-radio-button-card .radio-button-card__container:has(input:not(:disabled)):hover:not(:focus-within) .radio-button-card__indicator-outer{border-color:var(--radio-indicator-border-hover)}ap-radio-button-card .radio-button-card__container:focus-within:has(input:not(:disabled)) .radio-button-card__indicator-outer{border-color:var(--radio-indicator-border-focus)}ap-radio-button-card .radio-button-card__container:has(input:disabled) .radio-button-card__indicator-outer{background:var(--ref-color-grey-10)}ap-radio-button-card .radio-button-card__indicator-inner{width:10px;height:10px;border-radius:50%;background:var(--radio-indicator-fill);transform:scale(0);transition:transform .2s ease-in-out}ap-radio-button-card .radio-button-card__container:has(input:checked) .radio-button-card__indicator-inner{transform:scale(1)}ap-radio-button-card .radio-button-card__content{display:block;font-family:var(--sys-text-style-body-font-family);font-size:var(--sys-text-style-body-size);line-height:var(--sys-text-style-body-line-height);color:var(--ref-color-grey-100);cursor:var(--radio-cursor)}ap-radio-button-card .radio-button-card__content:not(:has(.radio-button-card__structured-content)){opacity:var(--radio-content-opacity)}ap-radio-button-card .radio-button-card__structured-content{display:flex;flex-direction:column;gap:var(--ref-spacing-xxxs)}ap-radio-button-card .radio-button-card__header{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--ref-spacing-sm)}ap-radio-button-card .radio-button-card__header-left{display:flex;align-items:center;gap:var(--ref-spacing-xxxs);flex:1;min-width:0;opacity:var(--radio-content-opacity)}ap-radio-button-card .radio-button-card__header-right{display:flex;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0}ap-radio-button-card .radio-button-card__title-symbol{flex-shrink:0;width:16px;height:16px}ap-radio-button-card .radio-button-card__title{font-size:var(--ref-font-size-sm);font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-sm);flex:1;min-width:0;opacity:var(--radio-content-opacity)}ap-radio-button-card .radio-button-card__status{flex-shrink:0}ap-radio-button-card .radio-button-card__tooltip-icon{width:16px;height:16px;color:var(--ref-color-grey-60);flex-shrink:0}ap-radio-button-card .radio-button-card__tooltip-icon:hover{color:var(--ref-color-grey-80)}ap-radio-button-card .radio-button-card__description{font-size:var(--ref-font-size-sm);font-style:normal;line-height:var(--ref-font-line-height-sm);color:var(--ref-color-grey-80);opacity:var(--radio-content-opacity)}ap-radio-button-card a{display:block;gap:0}ap-radio-button-card.ng-invalid.ng-dirty .radio-button-card__container{--radio-border-color: var(--ref-color-red-100);--radio-border-color-hover: var(--ref-color-red-60);--radio-indicator-border: var(--ref-color-red-100);--radio-indicator-fill: var(--ref-color-red-100)}ap-radio-button-card.ng-invalid.ng-dirty .radio-button-card__container.radio-button-card__container--default{--radio-border-color: transparent;--radio-border-color-hover: transparent}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: StatusComponent, selector: "ap-status", inputs: ["color", "dot"] }, { kind: "directive", type: StopPropagationDirective, selector: "[apStopPropagation]" }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipArrow", "apTooltipAnchor", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
103
103
  }
104
104
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: RadioButtonCardComponent, decorators: [{
105
105
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components-radio-button-card.mjs","sources":["../../../libs/ui-components/radio-button-card/src/radio-button-card.component.ts","../../../libs/ui-components/radio-button-card/src/radio-button-card.component.html","../../../libs/ui-components/radio-button-card/src/agorapulse-ui-components-radio-button-card.ts"],"sourcesContent":["import { StopPropagationDirective } from '@agorapulse/ui-components/directives';\nimport { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';\nimport { StatusComponent } from '@agorapulse/ui-components/status';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { apInfo, SymbolComponent, SymbolRegistry, withSymbols } from '@agorapulse/ui-symbol';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, signal, ViewEncapsulation } from '@angular/core';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-radio-button-card',\n styleUrls: ['./radio-button-card.component.scss'],\n standalone: true,\n imports: [SymbolComponent, StatusComponent, StopPropagationDirective, TooltipDirective],\n providers: [withSymbols(apInfo)],\n templateUrl: './radio-button-card.component.html',\n encapsulation: ViewEncapsulation.None,\n})\nexport class RadioButtonCardComponent implements ControlValueAccessor {\n private static nextId = 0;\n private readonly symbolRegistry: SymbolRegistry = inject(SymbolRegistry);\n private readonly ngControl = inject(NgControl, { optional: true, self: true });\n\n // Accessibility inputs\n readonly ariaLabel = input<string>('');\n readonly ariaLabelledby = input<string | null>(null);\n readonly ariaDescribedby = input<string>('');\n\n // Basic configuration inputs\n readonly disabled = input(false);\n readonly radioId = input<string>(`ap-radio-button-${RadioButtonCardComponent.nextId++}`);\n readonly value = input.required<string>();\n readonly name = input<string>('');\n\n // Card mode content inputs\n readonly title = input<string>('');\n readonly description = input<string>('');\n readonly linkUrl = input<string>('');\n readonly linkTitle = input<string>('');\n readonly titleSymbolId = input<string>('');\n readonly tooltipText = input<string>('');\n readonly statusBadge = input<string>('');\n\n // Display and state inputs\n readonly mode = input<'default' | 'card'>('card');\n readonly featureLocked = input(false);\n readonly hasError = input(false);\n // Vertically centers the content within the card height.\n readonly centered = input(false);\n\n // Internal state signals\n readonly checked = signal(false);\n readonly computedName = computed(() => {\n return this.name() || this.ngControl?.name || '';\n });\n\n readonly customContentEnabled = computed(() => {\n return this.title() || this.titleSymbolId() || this.statusBadge() || this.tooltipText() || this.description() || this.linkUrl();\n });\n\n // True when the card content should be vertically centered: explicitly opted in via centered,\n // or a structured single-row card (no description or link) that centers automatically.\n readonly centeredLayout = computed(() => {\n return this.centered() || (Boolean(this.customContentEnabled()) && !this.description() && !this.linkUrl());\n });\n\n constructor() {\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n\n // Set valueAccessor to avoid Angular error\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n select() {\n const currentValue = this.value();\n this.checked.set(true);\n this.onModelChange(currentValue);\n }\n\n writeValue(value: unknown): void {\n const currentValue = this.value();\n const shouldBeChecked = value == currentValue;\n this.checked.set(shouldBeChecked);\n }\n\n onModelChange: (value: unknown) => void = () => {\n // No-op until Angular registers the actual callback\n };\n\n onModelTouched: () => void = () => {\n // No-op until Angular registers the actual callback\n };\n\n registerOnChange(fn: () => void): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onModelTouched = fn;\n }\n}\n","<div\n class=\"radio-button-card__container\"\n [class.radio-button-card__container--default]=\"mode() === 'default'\"\n [class.radio-button-card__container--card]=\"mode() === 'card'\"\n [class.radio-button-card__container--locked]=\"featureLocked()\"\n [class.radio-button-card__container--error]=\"hasError()\"\n [class.radio-button-card__container--centered]=\"centeredLayout()\">\n <input\n type=\"radio\"\n class=\"radio-button-card__input\"\n [attr.id]=\"radioId()\"\n [attr.name]=\"computedName()\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [value]=\"value()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled() || featureLocked()\"\n (change)=\"select()\" />\n <label\n class=\"radio-button-card__label\"\n [attr.for]=\"radioId()\">\n @if (featureLocked()) {\n <div class=\"radio-button-card__lock-icon\">\n <ap-symbol symbolId=\"feature-lock\" />\n </div>\n } @else {\n <div class=\"radio-button-card__indicator\">\n <div class=\"radio-button-card__indicator-outer\">\n <div class=\"radio-button-card__indicator-inner\"></div>\n </div>\n </div>\n }\n <div class=\"radio-button-card__content\">\n @if (customContentEnabled()) {\n <div class=\"radio-button-card__structured-content\">\n <div class=\"radio-button-card__header\">\n <div class=\"radio-button-card__header-left\">\n @if (titleSymbolId()) {\n <ap-symbol\n class=\"radio-button-card__title-symbol\"\n color=\"grey-blue\"\n [symbolId]=\"titleSymbolId()\" />\n }\n @if (title()) {\n <div class=\"radio-button-card__title\">{{ title() }}</div>\n }\n </div>\n <div class=\"radio-button-card__header-right\">\n @if (statusBadge()) {\n <ap-status\n class=\"radio-button-card__status\"\n color=\"grey\"\n [dot]=\"false\">\n {{ statusBadge() }}\n </ap-status>\n }\n @if (tooltipText()) {\n <ap-symbol\n apTooltipPosition=\"top\"\n class=\"radio-button-card__tooltip-icon\"\n symbolId=\"info\"\n [apTooltip]=\"tooltipText()\" />\n }\n </div>\n </div>\n @if (description()) {\n <div class=\"radio-button-card__description\">{{ description() }}</div>\n }\n @if (linkUrl()) {\n <a\n class=\"standalone radio-button-card__link\"\n apStopPropagation\n [href]=\"linkUrl()\">\n {{ linkTitle() }}\n </a>\n }\n </div>\n } @else {\n <ng-content />\n }\n </div>\n </label>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;MAkBa,wBAAwB,CAAA;AACzB,IAAA,OAAO,MAAM,GAAG,CAAC;AACR,IAAA,cAAc,GAAmB,MAAM,CAAC,cAAc,CAAC;AACvD,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;IAGrE,SAAS,GAAG,KAAK,CAAS,EAAE;kFAAC;IAC7B,cAAc,GAAG,KAAK,CAAgB,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AAsB,EAAA,UAAA,EAEpB,IAAI,EAAA,OAAA,EACP,CAAC,eAAe,EAAE,eAAe,EAAE,wBAAwB,EAAE,gBAAgB,CAAC,EAAA,SAAA,EAC5E,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,EAAA,aAAA,EAEjB,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,8wHAAA,EAAA,MAAA,EAAA,CAAA,4lRAAA,CAAA,EAAA;;;AEhBzC;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-components-radio-button-card.mjs","sources":["../../../libs/ui-components/radio-button-card/src/radio-button-card.component.ts","../../../libs/ui-components/radio-button-card/src/radio-button-card.component.html","../../../libs/ui-components/radio-button-card/src/agorapulse-ui-components-radio-button-card.ts"],"sourcesContent":["import { StopPropagationDirective } from '@agorapulse/ui-components/directives';\nimport { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';\nimport { StatusComponent } from '@agorapulse/ui-components/status';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { apInfo, SymbolComponent, SymbolRegistry, withSymbols } from '@agorapulse/ui-symbol';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, signal, ViewEncapsulation } from '@angular/core';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-radio-button-card',\n styleUrls: ['./radio-button-card.component.scss'],\n standalone: true,\n imports: [SymbolComponent, StatusComponent, StopPropagationDirective, TooltipDirective],\n providers: [withSymbols(apInfo)],\n templateUrl: './radio-button-card.component.html',\n encapsulation: ViewEncapsulation.None,\n})\nexport class RadioButtonCardComponent implements ControlValueAccessor {\n private static nextId = 0;\n private readonly symbolRegistry: SymbolRegistry = inject(SymbolRegistry);\n private readonly ngControl = inject(NgControl, { optional: true, self: true });\n\n // Accessibility inputs\n readonly ariaLabel = input<string>('');\n readonly ariaLabelledby = input<string | null>(null);\n readonly ariaDescribedby = input<string>('');\n\n // Basic configuration inputs\n readonly disabled = input(false);\n readonly radioId = input<string>(`ap-radio-button-${RadioButtonCardComponent.nextId++}`);\n readonly value = input.required<string>();\n readonly name = input<string>('');\n\n // Card mode content inputs\n readonly title = input<string>('');\n readonly description = input<string>('');\n readonly linkUrl = input<string>('');\n readonly linkTitle = input<string>('');\n readonly titleSymbolId = input<string>('');\n readonly tooltipText = input<string>('');\n readonly statusBadge = input<string>('');\n\n // Display and state inputs\n readonly mode = input<'default' | 'card'>('card');\n readonly featureLocked = input(false);\n readonly hasError = input(false);\n // Vertically centers the content within the card height.\n readonly centered = input(false);\n\n // Internal state signals\n readonly checked = signal(false);\n readonly computedName = computed(() => {\n return this.name() || this.ngControl?.name || '';\n });\n\n readonly customContentEnabled = computed(() => {\n return this.title() || this.titleSymbolId() || this.statusBadge() || this.tooltipText() || this.description() || this.linkUrl();\n });\n\n // True when the card content should be vertically centered: explicitly opted in via centered,\n // or a structured single-row card (no description or link) that centers automatically.\n readonly centeredLayout = computed(() => {\n return this.centered() || (Boolean(this.customContentEnabled()) && !this.description() && !this.linkUrl());\n });\n\n constructor() {\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n\n // Set valueAccessor to avoid Angular error\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n select() {\n const currentValue = this.value();\n this.checked.set(true);\n this.onModelChange(currentValue);\n }\n\n writeValue(value: unknown): void {\n const currentValue = this.value();\n const shouldBeChecked = value == currentValue;\n this.checked.set(shouldBeChecked);\n }\n\n onModelChange: (value: unknown) => void = () => {\n // No-op until Angular registers the actual callback\n };\n\n onModelTouched: () => void = () => {\n // No-op until Angular registers the actual callback\n };\n\n registerOnChange(fn: () => void): void {\n this.onModelChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onModelTouched = fn;\n }\n}\n","<div\n class=\"radio-button-card__container\"\n [class.radio-button-card__container--default]=\"mode() === 'default'\"\n [class.radio-button-card__container--card]=\"mode() === 'card'\"\n [class.radio-button-card__container--locked]=\"featureLocked()\"\n [class.radio-button-card__container--error]=\"hasError()\"\n [class.radio-button-card__container--centered]=\"centeredLayout()\">\n <input\n type=\"radio\"\n class=\"radio-button-card__input\"\n [attr.id]=\"radioId()\"\n [attr.name]=\"computedName()\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [value]=\"value()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled() || featureLocked()\"\n (change)=\"select()\" />\n <label\n class=\"radio-button-card__label\"\n [attr.for]=\"radioId()\">\n @if (featureLocked()) {\n <div class=\"radio-button-card__lock-icon\">\n <ap-symbol symbolId=\"feature-lock\" />\n </div>\n } @else {\n <div class=\"radio-button-card__indicator\">\n <div class=\"radio-button-card__indicator-outer\">\n <div class=\"radio-button-card__indicator-inner\"></div>\n </div>\n </div>\n }\n <div class=\"radio-button-card__content\">\n @if (customContentEnabled()) {\n <div class=\"radio-button-card__structured-content\">\n <div class=\"radio-button-card__header\">\n <div class=\"radio-button-card__header-left\">\n @if (titleSymbolId()) {\n <ap-symbol\n class=\"radio-button-card__title-symbol\"\n color=\"grey-blue\"\n [symbolId]=\"titleSymbolId()\" />\n }\n @if (title()) {\n <div class=\"radio-button-card__title\">{{ title() }}</div>\n }\n </div>\n <div class=\"radio-button-card__header-right\">\n @if (statusBadge()) {\n <ap-status\n class=\"radio-button-card__status\"\n color=\"grey\"\n [dot]=\"false\">\n {{ statusBadge() }}\n </ap-status>\n }\n @if (tooltipText()) {\n <ap-symbol\n apTooltipPosition=\"top\"\n class=\"radio-button-card__tooltip-icon\"\n symbolId=\"info\"\n [apTooltip]=\"tooltipText()\" />\n }\n </div>\n </div>\n @if (description()) {\n <div class=\"radio-button-card__description\">{{ description() }}</div>\n }\n @if (linkUrl()) {\n <a\n class=\"standalone radio-button-card__link\"\n apStopPropagation\n [href]=\"linkUrl()\">\n {{ linkTitle() }}\n </a>\n }\n </div>\n } @else {\n <ng-content />\n }\n </div>\n </label>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;MAkBa,wBAAwB,CAAA;AACzB,IAAA,OAAO,MAAM,GAAG,CAAC;AACR,IAAA,cAAc,GAAmB,MAAM,CAAC,cAAc,CAAC;AACvD,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;IAGrE,SAAS,GAAG,KAAK,CAAS,EAAE;kFAAC;IAC7B,cAAc,GAAG,KAAK,CAAgB,IAAI;uFAAC;IAC3C,eAAe,GAAG,KAAK,CAAS,EAAE;wFAAC;;IAGnC,QAAQ,GAAG,KAAK,CAAC,KAAK;iFAAC;IACvB,OAAO,GAAG,KAAK,CAAS,CAAA,gBAAA,EAAmB,wBAAwB,CAAC,MAAM,EAAE,CAAA,CAAE;gFAAC;IAC/E,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAU;IAChC,IAAI,GAAG,KAAK,CAAS,EAAE;6EAAC;;IAGxB,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;IACzB,WAAW,GAAG,KAAK,CAAS,EAAE;oFAAC;IAC/B,OAAO,GAAG,KAAK,CAAS,EAAE;gFAAC;IAC3B,SAAS,GAAG,KAAK,CAAS,EAAE;kFAAC;IAC7B,aAAa,GAAG,KAAK,CAAS,EAAE;sFAAC;IACjC,WAAW,GAAG,KAAK,CAAS,EAAE;oFAAC;IAC/B,WAAW,GAAG,KAAK,CAAS,EAAE;oFAAC;;IAG/B,IAAI,GAAG,KAAK,CAAqB,MAAM;6EAAC;IACxC,aAAa,GAAG,KAAK,CAAC,KAAK;sFAAC;IAC5B,QAAQ,GAAG,KAAK,CAAC,KAAK;iFAAC;;IAEvB,QAAQ,GAAG,KAAK,CAAC,KAAK;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AA,EAAA,mBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,mBAAA,EAAA,4BAAA,EAAA,0BAAA,EAAA,+BAAA,EAAA,kBAAA,EAAA,gBAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,8BAAA,EAAA,oBAAA,EAAA,4BAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAK7E,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAVpC,SAAS;sCACW,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,sBAAsB,EAAA,UAAA,EAEpB,IAAI,EAAA,OAAA,EACP,CAAC,eAAe,EAAE,eAAe,EAAE,wBAAwB,EAAE,gBAAgB,CAAC,EAAA,SAAA,EAC5E,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,EAAA,aAAA,EAEjB,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,8wHAAA,EAAA,MAAA,EAAA,CAAA,4lRAAA,CAAA,EAAA;;;AEhBzC;;AAEG;;;;"}
@@ -1,3 +1,4 @@
1
+ import { FormFieldControlDirective } from '@agorapulse/ui-components/form-field';
1
2
  import { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';
2
3
  import { SymbolRegistry, SymbolComponent } from '@agorapulse/ui-symbol';
3
4
  import * as i0 from '@angular/core';
@@ -49,13 +50,13 @@ class SegmentedControlComponent {
49
50
  this.value.set(option.value);
50
51
  }
51
52
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SegmentedControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
52
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SegmentedControlComponent, isStandalone: true, selector: "ap-segmented-control", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class.ap-segmented-control--full-width": "fullWidth()" } }, ngImport: i0, template: "<div\n class=\"ap-segmented-control\"\n role=\"group\"\n [attr.aria-label]=\"ariaLabel() || null\">\n @for (option of options(); track option.value) {\n <button\n type=\"button\"\n class=\"ap-segmented-control__segment\"\n [class.ap-segmented-control__segment--selected]=\"value() === option.value\"\n [attr.aria-pressed]=\"value() === option.value\"\n [disabled]=\"disabled() || (option.disabled ?? false)\"\n (click)=\"select(option)\">\n @if (option.symbolId) {\n <ap-symbol\n class=\"ap-segmented-control__icon\"\n [symbolId]=\"option.symbolId\"\n [size]=\"16\"\n [color]=\"value() === option.value ? 'blue' : 'grey-blue'\" />\n }\n <span class=\"ap-segmented-control__label\">{{ option.label }}</span>\n </button>\n }\n</div>\n", styles: ["ap-segmented-control{display:inline-block}ap-segmented-control.ap-segmented-control--full-width{display:block}ap-segmented-control.ap-segmented-control--full-width .ap-segmented-control{display:flex;width:100%}ap-segmented-control.ap-segmented-control--full-width .ap-segmented-control__segment{flex:1 1 0}.ap-segmented-control{display:inline-flex;align-items:center}.ap-segmented-control .ap-segmented-control__segment{display:inline-flex;align-items:center;justify-content:center;gap:var(--ref-spacing-xxs);box-sizing:border-box;min-height:36px;margin:0;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);border:1px solid var(--ref-color-grey-20);background-color:var(--ref-color-white);color:var(--ref-color-grey-100);font-family:var(--ref-font-family);font-size:var(--ref-font-size-sm);font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-md);white-space:nowrap;cursor:pointer;transition:color .15s ease,border-color .15s ease,background-color .15s ease}.ap-segmented-control .ap-segmented-control__segment:not(:first-child){margin-left:-1px}.ap-segmented-control .ap-segmented-control__segment:first-child{border-top-left-radius:var(--ref-border-radius-sm);border-bottom-left-radius:var(--ref-border-radius-sm)}.ap-segmented-control .ap-segmented-control__segment:last-child{border-top-right-radius:var(--ref-border-radius-sm);border-bottom-right-radius:var(--ref-border-radius-sm)}.ap-segmented-control .ap-segmented-control__segment:hover:not(:disabled){z-index:1;border-color:var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment:focus-visible{z-index:2;outline:none;border-color:var(--ref-color-electric-blue-100);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment.ap-segmented-control__segment--selected{z-index:1;border-color:var(--ref-color-electric-blue-100);color:var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment:disabled{border-color:var(--ref-color-grey-20);background-color:var(--ref-color-grey-05);color:var(--ref-color-grey-40);cursor:not-allowed}.ap-segmented-control .ap-segmented-control__label{font:inherit;min-width:0;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
53
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SegmentedControlComponent, isStandalone: true, selector: "ap-segmented-control", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class.ap-segmented-control--full-width": "fullWidth()" } }, ngImport: i0, template: "<div\n class=\"ap-segmented-control\"\n role=\"group\"\n [apFormFieldControl]=\"ariaLabel() || undefined\"\n [disabled]=\"disabled()\">\n @for (option of options(); track option.value) {\n <button\n type=\"button\"\n class=\"ap-segmented-control__segment\"\n [class.ap-segmented-control__segment--selected]=\"value() === option.value\"\n [attr.aria-pressed]=\"value() === option.value\"\n [disabled]=\"disabled() || (option.disabled ?? false)\"\n (click)=\"select(option)\">\n @if (option.symbolId) {\n <ap-symbol\n class=\"ap-segmented-control__icon\"\n [symbolId]=\"option.symbolId\"\n [size]=\"16\"\n [color]=\"value() === option.value ? 'blue' : 'grey-blue'\" />\n }\n <span class=\"ap-segmented-control__label\">{{ option.label }}</span>\n </button>\n }\n</div>\n", styles: ["ap-segmented-control{display:inline-block}ap-segmented-control.ap-segmented-control--full-width{display:block}ap-segmented-control.ap-segmented-control--full-width .ap-segmented-control{display:flex;width:100%}ap-segmented-control.ap-segmented-control--full-width .ap-segmented-control__segment{flex:1 1 0}.ap-segmented-control{display:inline-flex;align-items:center}.ap-segmented-control .ap-segmented-control__segment{display:inline-flex;align-items:center;justify-content:center;gap:var(--ref-spacing-xxs);box-sizing:border-box;min-height:36px;margin:0;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);border:1px solid var(--ref-color-grey-20);background-color:var(--ref-color-white);color:var(--ref-color-grey-100);font-family:var(--ref-font-family);font-size:var(--ref-font-size-sm);font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-md);white-space:nowrap;cursor:pointer;transition:color .15s ease,border-color .15s ease,background-color .15s ease}.ap-segmented-control .ap-segmented-control__segment:not(:first-child){margin-left:-1px}.ap-segmented-control .ap-segmented-control__segment:first-child{border-top-left-radius:var(--ref-border-radius-sm);border-bottom-left-radius:var(--ref-border-radius-sm)}.ap-segmented-control .ap-segmented-control__segment:last-child{border-top-right-radius:var(--ref-border-radius-sm);border-bottom-right-radius:var(--ref-border-radius-sm)}.ap-segmented-control .ap-segmented-control__segment:hover:not(:disabled){z-index:1;border-color:var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment:focus-visible{z-index:2;outline:none;border-color:var(--ref-color-electric-blue-100);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment.ap-segmented-control__segment--selected{z-index:1;border-color:var(--ref-color-electric-blue-100);color:var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment:disabled{border-color:var(--ref-color-grey-20);background-color:var(--ref-color-grey-05);color:var(--ref-color-grey-40);cursor:not-allowed}.ap-segmented-control .ap-segmented-control__label{font:inherit;min-width:0;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: FormFieldControlDirective, selector: "[apFormFieldControl]", inputs: ["apFormFieldControl", "disabled"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
53
54
  }
54
55
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SegmentedControlComponent, decorators: [{
55
56
  type: Component,
56
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-segmented-control', imports: [SymbolComponent], host: {
57
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-segmented-control', imports: [FormFieldControlDirective, SymbolComponent], host: {
57
58
  '[class.ap-segmented-control--full-width]': 'fullWidth()',
58
- }, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"ap-segmented-control\"\n role=\"group\"\n [attr.aria-label]=\"ariaLabel() || null\">\n @for (option of options(); track option.value) {\n <button\n type=\"button\"\n class=\"ap-segmented-control__segment\"\n [class.ap-segmented-control__segment--selected]=\"value() === option.value\"\n [attr.aria-pressed]=\"value() === option.value\"\n [disabled]=\"disabled() || (option.disabled ?? false)\"\n (click)=\"select(option)\">\n @if (option.symbolId) {\n <ap-symbol\n class=\"ap-segmented-control__icon\"\n [symbolId]=\"option.symbolId\"\n [size]=\"16\"\n [color]=\"value() === option.value ? 'blue' : 'grey-blue'\" />\n }\n <span class=\"ap-segmented-control__label\">{{ option.label }}</span>\n </button>\n }\n</div>\n", styles: ["ap-segmented-control{display:inline-block}ap-segmented-control.ap-segmented-control--full-width{display:block}ap-segmented-control.ap-segmented-control--full-width .ap-segmented-control{display:flex;width:100%}ap-segmented-control.ap-segmented-control--full-width .ap-segmented-control__segment{flex:1 1 0}.ap-segmented-control{display:inline-flex;align-items:center}.ap-segmented-control .ap-segmented-control__segment{display:inline-flex;align-items:center;justify-content:center;gap:var(--ref-spacing-xxs);box-sizing:border-box;min-height:36px;margin:0;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);border:1px solid var(--ref-color-grey-20);background-color:var(--ref-color-white);color:var(--ref-color-grey-100);font-family:var(--ref-font-family);font-size:var(--ref-font-size-sm);font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-md);white-space:nowrap;cursor:pointer;transition:color .15s ease,border-color .15s ease,background-color .15s ease}.ap-segmented-control .ap-segmented-control__segment:not(:first-child){margin-left:-1px}.ap-segmented-control .ap-segmented-control__segment:first-child{border-top-left-radius:var(--ref-border-radius-sm);border-bottom-left-radius:var(--ref-border-radius-sm)}.ap-segmented-control .ap-segmented-control__segment:last-child{border-top-right-radius:var(--ref-border-radius-sm);border-bottom-right-radius:var(--ref-border-radius-sm)}.ap-segmented-control .ap-segmented-control__segment:hover:not(:disabled){z-index:1;border-color:var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment:focus-visible{z-index:2;outline:none;border-color:var(--ref-color-electric-blue-100);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment.ap-segmented-control__segment--selected{z-index:1;border-color:var(--ref-color-electric-blue-100);color:var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment:disabled{border-color:var(--ref-color-grey-20);background-color:var(--ref-color-grey-05);color:var(--ref-color-grey-40);cursor:not-allowed}.ap-segmented-control .ap-segmented-control__label{font:inherit;min-width:0;overflow:hidden;text-overflow:ellipsis}\n"] }]
59
+ }, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"ap-segmented-control\"\n role=\"group\"\n [apFormFieldControl]=\"ariaLabel() || undefined\"\n [disabled]=\"disabled()\">\n @for (option of options(); track option.value) {\n <button\n type=\"button\"\n class=\"ap-segmented-control__segment\"\n [class.ap-segmented-control__segment--selected]=\"value() === option.value\"\n [attr.aria-pressed]=\"value() === option.value\"\n [disabled]=\"disabled() || (option.disabled ?? false)\"\n (click)=\"select(option)\">\n @if (option.symbolId) {\n <ap-symbol\n class=\"ap-segmented-control__icon\"\n [symbolId]=\"option.symbolId\"\n [size]=\"16\"\n [color]=\"value() === option.value ? 'blue' : 'grey-blue'\" />\n }\n <span class=\"ap-segmented-control__label\">{{ option.label }}</span>\n </button>\n }\n</div>\n", styles: ["ap-segmented-control{display:inline-block}ap-segmented-control.ap-segmented-control--full-width{display:block}ap-segmented-control.ap-segmented-control--full-width .ap-segmented-control{display:flex;width:100%}ap-segmented-control.ap-segmented-control--full-width .ap-segmented-control__segment{flex:1 1 0}.ap-segmented-control{display:inline-flex;align-items:center}.ap-segmented-control .ap-segmented-control__segment{display:inline-flex;align-items:center;justify-content:center;gap:var(--ref-spacing-xxs);box-sizing:border-box;min-height:36px;margin:0;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);border:1px solid var(--ref-color-grey-20);background-color:var(--ref-color-white);color:var(--ref-color-grey-100);font-family:var(--ref-font-family);font-size:var(--ref-font-size-sm);font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-md);white-space:nowrap;cursor:pointer;transition:color .15s ease,border-color .15s ease,background-color .15s ease}.ap-segmented-control .ap-segmented-control__segment:not(:first-child){margin-left:-1px}.ap-segmented-control .ap-segmented-control__segment:first-child{border-top-left-radius:var(--ref-border-radius-sm);border-bottom-left-radius:var(--ref-border-radius-sm)}.ap-segmented-control .ap-segmented-control__segment:last-child{border-top-right-radius:var(--ref-border-radius-sm);border-bottom-right-radius:var(--ref-border-radius-sm)}.ap-segmented-control .ap-segmented-control__segment:hover:not(:disabled){z-index:1;border-color:var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment:focus-visible{z-index:2;outline:none;border-color:var(--ref-color-electric-blue-100);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment.ap-segmented-control__segment--selected{z-index:1;border-color:var(--ref-color-electric-blue-100);color:var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment:disabled{border-color:var(--ref-color-grey-20);background-color:var(--ref-color-grey-05);color:var(--ref-color-grey-40);cursor:not-allowed}.ap-segmented-control .ap-segmented-control__label{font:inherit;min-width:0;overflow:hidden;text-overflow:ellipsis}\n"] }]
59
60
  }], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
60
61
 
61
62
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components-segmented-control.mjs","sources":["../../../libs/ui-components/segmented-control/src/segmented-control.component.ts","../../../libs/ui-components/segmented-control/src/segmented-control.component.html","../../../libs/ui-components/segmented-control/src/agorapulse-ui-components-segmented-control.ts"],"sourcesContent":["import { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';\nimport { agorapulseSymbol, SymbolComponent, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport { ChangeDetectionStrategy, Component, effect, inject, input, model, untracked, ViewEncapsulation } from '@angular/core';\n\nexport interface SegmentedControlOption {\n /** The value bound to the control when this option is selected. */\n value: string;\n /** The text shown on the segment. */\n label: string;\n /** Optional leading icon symbol id. */\n symbolId?: agorapulseSymbol;\n /** Disables this segment only. */\n disabled?: boolean;\n}\n\n/**\n * A single-select control for switching between a small set (2–4) of mutually\n * exclusive options laid out side by side.\n *\n * @example\n * ```html\n * <ap-segmented-control\n * [options]=\"[{ value: 'list', label: 'List' }, { value: 'board', label: 'Board' }]\"\n * [(value)]=\"view\"\n * ariaLabel=\"Choose a view\" />\n * ```\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-segmented-control',\n templateUrl: './segmented-control.component.html',\n styleUrls: ['./segmented-control.component.scss'],\n imports: [SymbolComponent],\n host: {\n '[class.ap-segmented-control--full-width]': 'fullWidth()',\n },\n // Emit plain, global `.ap-segmented-control*` classes (no Angular scoping) so the\n // styling stays framework-agnostic and readable/reusable outside Angular.\n encapsulation: ViewEncapsulation.None,\n})\nexport class SegmentedControlComponent {\n private readonly symbolRegistry = inject(SymbolRegistry);\n\n readonly options = input.required<SegmentedControlOption[]>();\n /** The currently selected value. Supports two-way binding via `[(value)]`. Defaults to the first option's value when unset. */\n readonly value = model<string>('');\n /** Disables the whole control. */\n readonly disabled = input(false);\n /** When true, the control fills its container width and segments share it equally instead of fitting their text. */\n readonly fullWidth = input(false);\n /** Accessible name for the group of segments. */\n readonly ariaLabel = input('');\n\n // Keep `value` defined: fall back to the first option whenever it is unset.\n private readonly defaultValueEffect = effect(() => {\n const [firstOption] = this.options();\n if (!this.value() && firstOption) {\n untracked(() => this.value.set(firstOption.value));\n }\n });\n\n constructor() {\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n }\n\n protected select(option: SegmentedControlOption): void {\n if (this.disabled() || option.disabled) {\n return;\n }\n this.value.set(option.value);\n }\n}\n","<div\n class=\"ap-segmented-control\"\n role=\"group\"\n [attr.aria-label]=\"ariaLabel() || null\">\n @for (option of options(); track option.value) {\n <button\n type=\"button\"\n class=\"ap-segmented-control__segment\"\n [class.ap-segmented-control__segment--selected]=\"value() === option.value\"\n [attr.aria-pressed]=\"value() === option.value\"\n [disabled]=\"disabled() || (option.disabled ?? false)\"\n (click)=\"select(option)\">\n @if (option.symbolId) {\n <ap-symbol\n class=\"ap-segmented-control__icon\"\n [symbolId]=\"option.symbolId\"\n [size]=\"16\"\n [color]=\"value() === option.value ? 'blue' : 'grey-blue'\" />\n }\n <span class=\"ap-segmented-control__label\">{{ option.label }}</span>\n </button>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAeA;;;;;;;;;;;AAWG;MAcU,yBAAyB,CAAA;AACjB,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAE/C,OAAO,GAAG,KAAK,CAAC,QAAQ;gFAA4B;;IAEpD,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;;IAEzB,QAAQ,GAAG,KAAK,CAAC,KAAK;iFAAC;;IAEvB,SAAS,GAAG,KAAK,CAAC,KAAK;kFAAC;;IAExB,SAAS,GAAG,KAAK,CAAC,EAAE;kFAAC;;AAGb,IAAA,kBAAkB,GAAG,MAAM,CAAC,MAAK;QAC9C,MAAM,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE;QACpC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,WAAW,EAAE;AAC9B,YAAA,SAAS,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,GA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A,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,KAAA,EAAA,aAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,wCAAA,EAAA,aAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECxCtC,y7BAuBA,EAAA,MAAA,EAAA,CAAA,quEAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDSc,eAAe,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,OAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAQhB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAbrC,SAAS;sCACW,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,sBAAsB,WAGvB,CAAC,eAAe,CAAC,EAAA,IAAA,EACpB;AACF,wBAAA,0CAA0C,EAAE,aAAa;qBAC5D,EAAA,aAAA,EAGc,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,y7BAAA,EAAA,MAAA,EAAA,CAAA,quEAAA,CAAA,EAAA;;;AEtCzC;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-components-segmented-control.mjs","sources":["../../../libs/ui-components/segmented-control/src/segmented-control.component.ts","../../../libs/ui-components/segmented-control/src/segmented-control.component.html","../../../libs/ui-components/segmented-control/src/agorapulse-ui-components-segmented-control.ts"],"sourcesContent":["import { FormFieldControlDirective } from '@agorapulse/ui-components/form-field';\nimport { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';\nimport { agorapulseSymbol, SymbolComponent, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport { ChangeDetectionStrategy, Component, effect, inject, input, model, untracked, ViewEncapsulation } from '@angular/core';\n\nexport interface SegmentedControlOption {\n /** The value bound to the control when this option is selected. */\n value: string;\n /** The text shown on the segment. */\n label: string;\n /** Optional leading icon symbol id. */\n symbolId?: agorapulseSymbol;\n /** Disables this segment only. */\n disabled?: boolean;\n}\n\n/**\n * A single-select control for switching between a small set (2–4) of mutually\n * exclusive options laid out side by side.\n *\n * @example\n * ```html\n * <ap-segmented-control\n * [options]=\"[{ value: 'list', label: 'List' }, { value: 'board', label: 'Board' }]\"\n * [(value)]=\"view\"\n * ariaLabel=\"Choose a view\" />\n * ```\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-segmented-control',\n templateUrl: './segmented-control.component.html',\n styleUrls: ['./segmented-control.component.scss'],\n imports: [FormFieldControlDirective, SymbolComponent],\n host: {\n '[class.ap-segmented-control--full-width]': 'fullWidth()',\n },\n // Emit plain, global `.ap-segmented-control*` classes (no Angular scoping) so the\n // styling stays framework-agnostic and readable/reusable outside Angular.\n encapsulation: ViewEncapsulation.None,\n})\nexport class SegmentedControlComponent {\n private readonly symbolRegistry = inject(SymbolRegistry);\n\n readonly options = input.required<SegmentedControlOption[]>();\n /** The currently selected value. Supports two-way binding via `[(value)]`. Defaults to the first option's value when unset. */\n readonly value = model<string>('');\n /** Disables the whole control. */\n readonly disabled = input(false);\n /** When true, the control fills its container width and segments share it equally instead of fitting their text. */\n readonly fullWidth = input(false);\n /** Accessible name for the group of segments. */\n readonly ariaLabel = input('');\n\n // Keep `value` defined: fall back to the first option whenever it is unset.\n private readonly defaultValueEffect = effect(() => {\n const [firstOption] = this.options();\n if (!this.value() && firstOption) {\n untracked(() => this.value.set(firstOption.value));\n }\n });\n\n constructor() {\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n }\n\n protected select(option: SegmentedControlOption): void {\n if (this.disabled() || option.disabled) {\n return;\n }\n this.value.set(option.value);\n }\n}\n","<div\n class=\"ap-segmented-control\"\n role=\"group\"\n [apFormFieldControl]=\"ariaLabel() || undefined\"\n [disabled]=\"disabled()\">\n @for (option of options(); track option.value) {\n <button\n type=\"button\"\n class=\"ap-segmented-control__segment\"\n [class.ap-segmented-control__segment--selected]=\"value() === option.value\"\n [attr.aria-pressed]=\"value() === option.value\"\n [disabled]=\"disabled() || (option.disabled ?? false)\"\n (click)=\"select(option)\">\n @if (option.symbolId) {\n <ap-symbol\n class=\"ap-segmented-control__icon\"\n [symbolId]=\"option.symbolId\"\n [size]=\"16\"\n [color]=\"value() === option.value ? 'blue' : 'grey-blue'\" />\n }\n <span class=\"ap-segmented-control__label\">{{ option.label }}</span>\n </button>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAgBA;;;;;;;;;;;AAWG;MAcU,yBAAyB,CAAA;AACjB,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAE/C,OAAO,GAAG,KAAK,CAAC,QAAQ;gFAA4B;;IAEpD,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;;IAEzB,QAAQ,GAAG,KAAK,CAAC,KAAK;iFAAC;;IAEvB,SAAS,GAAG,KAAK,CAAC,KAAK;kFAAC;;IAExB,SAAS,GAAG,KAAK,CAAC,EAAE;kFAAC;;AAGb,IAAA,kBAAkB,GAAG,MAAM,CAAC,MAAK;QAC9C,MAAM,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE;QACpC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,WAAW,EAAE;AAC9B,YAAA,SAAS,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACtD;IACJ,CAAC;2FAAC;AAEF,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