@eui/ecl 22.0.0-alpha.28 → 22.0.0-alpha.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # eui documentation
2
2
 
3
- > Generated by compodoc 2.0.0 at 2026-09-28T07:18:23.123Z, llm-md export.
3
+ > Generated by compodoc 2.0.0 at 2026-09-28T12:10:29.742Z, llm-md export.
4
4
 
5
5
  ## Modules
6
6
 
@@ -2306,11 +2306,17 @@ Selector: `[eclRadioHelp]`
2306
2306
  Description: Component that displays help text for the ECL radio input. Supports styling for the disabled state and applies the proper ECL CSS classes. Should be placed inside a component using eclRadio.
2307
2307
 
2308
2308
  Inputs:
2309
- - `isDisabled: boolean = false` — Adds styling for a disabled help text.
2309
+ - `isDisabled: boolean = false` — Adds styling for a disabled help text. Exposed as a model so the parent eclRadio directive can synchronize the disabled state onto the projected help text.
2310
2310
  - `class: string`
2311
2311
  - `e2eAttr: any`
2312
2312
  - `tabindex: number`
2313
2313
 
2314
+ Outputs:
2315
+ - `isDisabled: boolean = false` — Adds styling for a disabled help text. Exposed as a model so the parent eclRadio directive can synchronize the disabled state onto the projected help text.
2316
+
2317
+ Properties:
2318
+ - `cssClasses: unknown = computed(() => [this.getCssClasses('ecl-radio__help')].join(' ').trim())` — Returns the CSS classes applied to the host element. Includes the base ecl-radio\_\_help class.
2319
+
2314
2320
  Methods:
2315
2321
  - `getCssClasses(rootClass: string): string`
2316
2322
 
@@ -2322,12 +2328,16 @@ Selector: `[eclRadioLabel]`
2322
2328
  Description: Component representing a label for an ECL radio button. Used inside an element with the \[eclRadio\] directive to provide a styled label that can reflect the radio's state.
2323
2329
 
2324
2330
  Inputs:
2325
- - `isDisabled: boolean = false` — Adds styling for a disabled state.
2326
- - `isInvalid: boolean = false` — Adds styling for an invalid state.
2331
+ - `isDisabled: boolean = false` — Adds styling for a disabled state. Exposed as a model so the parent eclRadio directive can synchronize the disabled state onto the label.
2332
+ - `isInvalid: boolean = false` — Adds styling for an invalid state. Exposed as a model so the parent eclRadio directive can synchronize the invalid state onto the label.
2327
2333
  - `class: string`
2328
2334
  - `e2eAttr: any`
2329
2335
  - `tabindex: number`
2330
2336
 
2337
+ Outputs:
2338
+ - `isDisabled: boolean = false` — Adds styling for a disabled state. Exposed as a model so the parent eclRadio directive can synchronize the disabled state onto the label.
2339
+ - `isInvalid: boolean = false` — Adds styling for an invalid state. Exposed as a model so the parent eclRadio directive can synchronize the invalid state onto the label.
2340
+
2331
2341
  Methods:
2332
2342
  - `getCssClasses(rootClass: string): string`
2333
2343
 
@@ -5492,8 +5502,8 @@ Selector: `[eclRadio]`
5492
5502
  Description: Directive that applies the ECL radio button styling and behavior. Should be applied to native radio input elements to enhance them with ECL styles and support for invalid, disabled and binary states.
5493
5503
 
5494
5504
  Inputs:
5495
- - `isDisabled: boolean = false` — Adds the ecl-radio--disabled class to the host element when true.
5496
- - `isInvalid: boolean = false` — Adds the ecl-radio--invalid class to the host element when true.
5505
+ - `isDisabled: boolean = false` — Consumer-provided disabled state, bound as an attribute on the host element.
5506
+ - `isInvalid: boolean = false` — Consumer-provided invalid state, bound as an attribute on the host element.
5497
5507
  - `isBinary: boolean = undefined` — Adds the ecl-radio--binary class when true.
5498
5508
  - `class: string`
5499
5509
  - `e2eAttr: any`
@@ -5502,8 +5512,11 @@ Inputs:
5502
5512
  Properties:
5503
5513
  - `eclRadioHelpComponent: unknown = contentChild(forwardRef(() => EclRadioHelpComponent))` — Reference to the projected EclRadioHelpComponent, if present. Used to synchronize the disabled state with the help text.
5504
5514
  - `eclRadioLabelComponent: unknown = contentChild(forwardRef(() => EclRadioLabelComponent))` — Reference to the projected EclRadioLabelComponent, if present. Used to synchronize disabled and invalid states with the label.
5515
+ - `isDisabled: unknown = computed(() => this.controlDisabled() ?? this.disabledInput())` — Effective disabled state, preferring the form-control-driven value when present. Adds the ecl-radio--disabled class to the host element when true. Precedence: when a child eclRadioInput is bound to a form control it calls setControlState , making controlDisabled a concrete boolean that takes over. While controlDisabled is undefined (no form control in play), the ?? falls back to the consumer-provided disabledInput attribute value.
5516
+ - `isInvalid: unknown = computed(() => this.controlInvalid() ?? this.invalidInput())` — Effective invalid state, preferring the form-control-driven value when present. Adds the ecl-radio--invalid class to the host element when true. Precedence: when a child eclRadioInput is bound to a form control it calls setControlState , making controlInvalid a concrete boolean that takes over. While controlInvalid is undefined (no form control in play), the ?? falls back to the consumer-provided invalidInput attribute value.
5505
5517
 
5506
5518
  Methods:
5519
+ - `setControlState(isInvalid: boolean, isDisabled: boolean): void` — Called by the child eclRadioInput directive to propagate the disabled and invalid states derived from the associated form control.
5507
5520
  - `getCssClasses(rootClass: string): string`
5508
5521
 
5509
5522
  ### EclRadioInputDirective
@@ -128,7 +128,7 @@
128
128
  </ol>
129
129
  <ul class="properties-list">
130
130
  <li>
131
- <b>Version</b> : 22.0.0-alpha.28</li>
131
+ <b>Version</b> : 22.0.0-alpha.29</li>
132
132
  </ul>
133
133
 
134
134
 
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { booleanAttribute, HostBinding, Input, Component, ViewEncapsulation, input, contentChild, forwardRef, Directive, inject, ChangeDetectorRef } from '@angular/core';
2
+ import { model, computed, Component, ViewEncapsulation, input, booleanAttribute, signal, contentChild, forwardRef, effect, Directive, inject, ChangeDetectorRef } from '@angular/core';
3
3
  import { ECLBaseDirective } from '@eui/ecl/core';
4
4
  import { NgControl } from '@angular/forms';
5
5
 
@@ -14,32 +14,29 @@ class EclRadioHelpComponent extends ECLBaseDirective {
14
14
  super(...arguments);
15
15
  /**
16
16
  * Adds styling for a disabled help text.
17
+ *
18
+ * Exposed as a model so the parent `eclRadio` directive can synchronize
19
+ * the disabled state onto the projected help text.
17
20
  */
18
- this.isDisabled = false;
19
- }
20
- /**
21
- * Returns the CSS classes applied to the host element.
22
- * Includes the base ecl-radio__help class.
23
- */
24
- get cssClasses() {
25
- return [super.getCssClasses('ecl-radio__help')].join(' ').trim();
21
+ this.isDisabled = model(false, /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
23
+ /**
24
+ * Returns the CSS classes applied to the host element.
25
+ * Includes the base ecl-radio__help class.
26
+ */
27
+ this.cssClasses = computed(() => [this.getCssClasses('ecl-radio__help')].join(' ').trim(), /* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "cssClasses" }] : /* istanbul ignore next */ []));
26
29
  }
27
30
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclRadioHelpComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
28
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "22.1.2", type: EclRadioHelpComponent, isStandalone: true, selector: "[eclRadioHelp]", inputs: { isDisabled: ["isDisabled", "isDisabled", booleanAttribute] }, host: { properties: { "class.ecl-radio__help--disabled": "this.isDisabled", "class": "this.cssClasses" } }, usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\n" }); }
31
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: EclRadioHelpComponent, isStandalone: true, selector: "[eclRadioHelp]", inputs: { isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isDisabled: "isDisabledChange" }, host: { properties: { "class": "cssClasses()", "class.ecl-radio__help--disabled": "isDisabled()" } }, usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\n" }); }
29
32
  }
30
33
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclRadioHelpComponent, decorators: [{
31
34
  type: Component,
32
- args: [{ selector: '[eclRadioHelp]', template: "<ng-content></ng-content>\n" }]
33
- }], propDecorators: { isDisabled: [{
34
- type: Input,
35
- args: [{ transform: booleanAttribute }]
36
- }, {
37
- type: HostBinding,
38
- args: ['class.ecl-radio__help--disabled']
39
- }], cssClasses: [{
40
- type: HostBinding,
41
- args: ['class']
42
- }] } });
35
+ args: [{ selector: '[eclRadioHelp]', host: {
36
+ '[class]': 'cssClasses()',
37
+ '[class.ecl-radio__help--disabled]': 'isDisabled()',
38
+ }, template: "<ng-content></ng-content>\n" }]
39
+ }], propDecorators: { isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }, { type: i0.Output, args: ["isDisabledChange"] }] } });
43
40
 
44
41
  /**
45
42
  * Component representing a label for an ECL radio button.
@@ -52,12 +49,20 @@ class EclRadioLabelComponent extends ECLBaseDirective {
52
49
  super(...arguments);
53
50
  /**
54
51
  * Adds styling for an invalid state.
52
+ *
53
+ * Exposed as a model so the parent `eclRadio` directive can synchronize
54
+ * the invalid state onto the label.
55
55
  */
56
- this.isInvalid = false;
56
+ this.isInvalid = model(false, /* @ts-ignore */
57
+ ...(ngDevMode ? [{ debugName: "isInvalid" }] : /* istanbul ignore next */ []));
57
58
  /**
58
59
  * Adds styling for a disabled state.
60
+ *
61
+ * Exposed as a model so the parent `eclRadio` directive can synchronize
62
+ * the disabled state onto the label.
59
63
  */
60
- this.isDisabled = false;
64
+ this.isDisabled = model(false, /* @ts-ignore */
65
+ ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
61
66
  }
62
67
  /**
63
68
  * Returns the CSS classes applied to the host element.
@@ -67,21 +72,14 @@ class EclRadioLabelComponent extends ECLBaseDirective {
67
72
  return [super.getCssClasses('ecl-radio__label')].join(' ').trim();
68
73
  }
69
74
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclRadioLabelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
70
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "22.1.2", type: EclRadioLabelComponent, isStandalone: true, selector: "[eclRadioLabel]", inputs: { isInvalid: ["isInvalid", "isInvalid", booleanAttribute], isDisabled: ["isDisabled", "isDisabled", booleanAttribute] }, host: { properties: { "class": "this.cssClasses" } }, usesInheritance: true, ngImport: i0, template: "<span class=\"ecl-radio__box\" [class.ecl-radio__box--disabled]=\"isDisabled\" [class.ecl-radio__box--invalid]=\"isInvalid\">\n <span class=\"ecl-radio__box-inner\"></span>\n</span>\n\n<ng-content></ng-content>\n", encapsulation: i0.ViewEncapsulation.None }); }
75
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: EclRadioLabelComponent, isStandalone: true, selector: "[eclRadioLabel]", inputs: { isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isInvalid: "isInvalidChange", isDisabled: "isDisabledChange" }, host: { properties: { "class": "cssClasses" } }, usesInheritance: true, ngImport: i0, template: "<span class=\"ecl-radio__box\" [class.ecl-radio__box--disabled]=\"isDisabled()\" [class.ecl-radio__box--invalid]=\"isInvalid()\">\n <span class=\"ecl-radio__box-inner\"></span>\n</span>\n\n<ng-content></ng-content>\n", encapsulation: i0.ViewEncapsulation.None }); }
71
76
  }
72
77
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclRadioLabelComponent, decorators: [{
73
78
  type: Component,
74
- args: [{ selector: '[eclRadioLabel]', encapsulation: ViewEncapsulation.None, template: "<span class=\"ecl-radio__box\" [class.ecl-radio__box--disabled]=\"isDisabled\" [class.ecl-radio__box--invalid]=\"isInvalid\">\n <span class=\"ecl-radio__box-inner\"></span>\n</span>\n\n<ng-content></ng-content>\n" }]
75
- }], propDecorators: { isInvalid: [{
76
- type: Input,
77
- args: [{ transform: booleanAttribute }]
78
- }], isDisabled: [{
79
- type: Input,
80
- args: [{ transform: booleanAttribute }]
81
- }], cssClasses: [{
82
- type: HostBinding,
83
- args: ['class']
84
- }] } });
79
+ args: [{ selector: '[eclRadioLabel]', encapsulation: ViewEncapsulation.None, host: {
80
+ '[class]': 'cssClasses',
81
+ }, template: "<span class=\"ecl-radio__box\" [class.ecl-radio__box--disabled]=\"isDisabled()\" [class.ecl-radio__box--invalid]=\"isInvalid()\">\n <span class=\"ecl-radio__box-inner\"></span>\n</span>\n\n<ng-content></ng-content>\n" }]
82
+ }], propDecorators: { isInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "isInvalid", required: false }] }, { type: i0.Output, args: ["isInvalidChange"] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }, { type: i0.Output, args: ["isDisabledChange"] }] } });
85
83
 
86
84
  /**
87
85
  * Directive that applies the ECL radio button styling and behavior.
@@ -91,19 +89,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
91
89
  */
92
90
  class EclRadioDirective extends ECLBaseDirective {
93
91
  constructor() {
94
- super(...arguments);
92
+ super();
95
93
  /**
96
94
  * Adds the `ecl-radio--binary` class when true.
97
95
  */
98
96
  this.isBinary = input(undefined, { ...(ngDevMode ? { debugName: "isBinary" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
99
97
  /**
98
+ * Consumer-provided disabled state, bound as an attribute on the host element.
99
+ */
100
+ this.disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'isDisabled' });
101
+ /**
102
+ * Consumer-provided invalid state, bound as an attribute on the host element.
103
+ */
104
+ this.invalidInput = input(false, { ...(ngDevMode ? { debugName: "invalidInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'isInvalid' });
105
+ /**
106
+ * Disabled state derived from the child `eclRadioInput` form control, if any.
107
+ * Overrides the consumer-provided value when the control drives the state.
108
+ */
109
+ this.controlDisabled = signal(undefined, /* @ts-ignore */
110
+ ...(ngDevMode ? [{ debugName: "controlDisabled" }] : /* istanbul ignore next */ []));
111
+ /**
112
+ * Invalid state derived from the child `eclRadioInput` form control, if any.
113
+ * Overrides the consumer-provided value when the control drives the state.
114
+ */
115
+ this.controlInvalid = signal(undefined, /* @ts-ignore */
116
+ ...(ngDevMode ? [{ debugName: "controlInvalid" }] : /* istanbul ignore next */ []));
117
+ /**
118
+ * Effective disabled state, preferring the form-control-driven value when present.
100
119
  * Adds the `ecl-radio--disabled` class to the host element when true.
120
+ *
121
+ * Precedence: when a child `eclRadioInput` is bound to a form control it calls
122
+ * `setControlState`, making `controlDisabled` a concrete boolean that takes over.
123
+ * While `controlDisabled` is `undefined` (no form control in play), the `??`
124
+ * falls back to the consumer-provided `disabledInput` attribute value.
101
125
  */
102
- this.isDisabled = false;
126
+ this.isDisabled = computed(() => this.controlDisabled() ?? this.disabledInput(), /* @ts-ignore */
127
+ ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
103
128
  /**
129
+ * Effective invalid state, preferring the form-control-driven value when present.
104
130
  * Adds the `ecl-radio--invalid` class to the host element when true.
131
+ *
132
+ * Precedence: when a child `eclRadioInput` is bound to a form control it calls
133
+ * `setControlState`, making `controlInvalid` a concrete boolean that takes over.
134
+ * While `controlInvalid` is `undefined` (no form control in play), the `??`
135
+ * falls back to the consumer-provided `invalidInput` attribute value.
105
136
  */
106
- this.isInvalid = false;
137
+ this.isInvalid = computed(() => this.controlInvalid() ?? this.invalidInput(), /* @ts-ignore */
138
+ ...(ngDevMode ? [{ debugName: "isInvalid" }] : /* istanbul ignore next */ []));
107
139
  /**
108
140
  * Reference to the projected EclRadioLabelComponent, if present.
109
141
  * Used to synchronize disabled and invalid states with the label.
@@ -116,6 +148,7 @@ class EclRadioDirective extends ECLBaseDirective {
116
148
  */
117
149
  this.eclRadioHelpComponent = contentChild(forwardRef(() => EclRadioHelpComponent), /* @ts-ignore */
118
150
  ...(ngDevMode ? [{ debugName: "eclRadioHelpComponent" }] : /* istanbul ignore next */ []));
151
+ this.synchronizeChildElements();
119
152
  }
120
153
  /**
121
154
  * Returns the CSS classes to apply on the host element.
@@ -125,47 +158,46 @@ class EclRadioDirective extends ECLBaseDirective {
125
158
  return [super.getCssClasses('ecl-radio'), this.isBinary() ? 'ecl-radio--binary' : ''].join(' ').trim();
126
159
  }
127
160
  /**
128
- * Angular lifecycle hook called during every change detection run.
129
- * Used to update child components with the current disabled and invalid states.
161
+ * Called by the child `eclRadioInput` directive to propagate the disabled and
162
+ * invalid states derived from the associated form control.
130
163
  */
131
- ngDoCheck() {
132
- this.updateChildElements();
164
+ setControlState(isInvalid, isDisabled) {
165
+ this.controlInvalid.set(isInvalid);
166
+ this.controlDisabled.set(isDisabled);
133
167
  }
134
- updateChildElements() {
135
- const eclRadioLabelComponent = this.eclRadioLabelComponent();
136
- if (eclRadioLabelComponent) {
137
- eclRadioLabelComponent.isInvalid = this.isInvalid;
138
- eclRadioLabelComponent.isDisabled = this.isDisabled;
139
- }
140
- const eclRadioHelpComponent = this.eclRadioHelpComponent();
141
- if (eclRadioHelpComponent) {
142
- eclRadioHelpComponent.isDisabled = this.isDisabled;
143
- }
168
+ /**
169
+ * Keeps the projected label and help components in sync with the
170
+ * directive's disabled and invalid states whenever they change.
171
+ */
172
+ synchronizeChildElements() {
173
+ effect(() => {
174
+ const isDisabled = this.isDisabled();
175
+ const isInvalid = this.isInvalid();
176
+ const eclRadioLabelComponent = this.eclRadioLabelComponent();
177
+ if (eclRadioLabelComponent) {
178
+ eclRadioLabelComponent.isInvalid.set(isInvalid);
179
+ eclRadioLabelComponent.isDisabled.set(isDisabled);
180
+ }
181
+ const eclRadioHelpComponent = this.eclRadioHelpComponent();
182
+ if (eclRadioHelpComponent) {
183
+ eclRadioHelpComponent.isDisabled.set(isDisabled);
184
+ }
185
+ });
144
186
  }
145
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclRadioDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
146
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.1.2", type: EclRadioDirective, isStandalone: true, selector: "[eclRadio]", inputs: { isBinary: { classPropertyName: "isBinary", publicName: "isBinary", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: false, isRequired: false, transformFunction: booleanAttribute } }, host: { properties: { "class.ecl-radio--disabled": "this.isDisabled", "class.ecl-radio--invalid": "this.isInvalid", "class": "this.cssClasses" } }, queries: [{ propertyName: "eclRadioLabelComponent", first: true, predicate: i0.forwardRef(() => EclRadioLabelComponent), descendants: true, isSignal: true }, { propertyName: "eclRadioHelpComponent", first: true, predicate: i0.forwardRef(() => EclRadioHelpComponent), descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 }); }
187
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclRadioDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
188
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.1.2", type: EclRadioDirective, isStandalone: true, selector: "[eclRadio]", inputs: { isBinary: { classPropertyName: "isBinary", publicName: "isBinary", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, invalidInput: { classPropertyName: "invalidInput", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cssClasses", "class.ecl-radio--disabled": "isDisabled()", "class.ecl-radio--invalid": "isInvalid()" } }, queries: [{ propertyName: "eclRadioLabelComponent", first: true, predicate: i0.forwardRef(() => EclRadioLabelComponent), descendants: true, isSignal: true }, { propertyName: "eclRadioHelpComponent", first: true, predicate: i0.forwardRef(() => EclRadioHelpComponent), descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 }); }
147
189
  }
148
190
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclRadioDirective, decorators: [{
149
191
  type: Directive,
150
192
  args: [{
151
193
  selector: '[eclRadio]',
194
+ host: {
195
+ '[class]': 'cssClasses',
196
+ '[class.ecl-radio--disabled]': 'isDisabled()',
197
+ '[class.ecl-radio--invalid]': 'isInvalid()',
198
+ },
152
199
  }]
153
- }], propDecorators: { isBinary: [{ type: i0.Input, args: [{ isSignal: true, alias: "isBinary", required: false }] }], isDisabled: [{
154
- type: Input,
155
- args: [{ transform: booleanAttribute }]
156
- }, {
157
- type: HostBinding,
158
- args: ['class.ecl-radio--disabled']
159
- }], isInvalid: [{
160
- type: Input,
161
- args: [{ transform: booleanAttribute }]
162
- }, {
163
- type: HostBinding,
164
- args: ['class.ecl-radio--invalid']
165
- }], eclRadioLabelComponent: [{ type: i0.ContentChild, args: [forwardRef(() => EclRadioLabelComponent), { isSignal: true }] }], eclRadioHelpComponent: [{ type: i0.ContentChild, args: [forwardRef(() => EclRadioHelpComponent), { isSignal: true }] }], cssClasses: [{
166
- type: HostBinding,
167
- args: ['class']
168
- }] } });
200
+ }], ctorParameters: () => [], propDecorators: { isBinary: [{ type: i0.Input, args: [{ isSignal: true, alias: "isBinary", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], invalidInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "isInvalid", required: false }] }], eclRadioLabelComponent: [{ type: i0.ContentChild, args: [forwardRef(() => EclRadioLabelComponent), { isSignal: true }] }], eclRadioHelpComponent: [{ type: i0.ContentChild, args: [forwardRef(() => EclRadioHelpComponent), { isSignal: true }] }] } });
169
201
 
170
202
  /**
171
203
  * Directive that decorates native <input> elements to be styled as ECL radio inputs.
@@ -191,23 +223,22 @@ class EclRadioInputDirective extends ECLBaseDirective {
191
223
  ngDoCheck() {
192
224
  if (this.ngControl) {
193
225
  if (this.eclRadio) {
194
- this.eclRadio.isInvalid = this.ngControl.invalid && this.ngControl.touched;
195
- this.eclRadio.isDisabled = this.ngControl.disabled;
226
+ this.eclRadio.setControlState(this.ngControl.invalid && this.ngControl.touched, this.ngControl.disabled);
196
227
  }
197
228
  }
198
229
  }
199
230
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclRadioInputDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
200
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: EclRadioInputDirective, isStandalone: true, selector: "input[eclRadioInput]", host: { properties: { "class": "this.cssClasses" } }, usesInheritance: true, ngImport: i0 }); }
231
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: EclRadioInputDirective, isStandalone: true, selector: "input[eclRadioInput]", host: { properties: { "class": "cssClasses" } }, usesInheritance: true, ngImport: i0 }); }
201
232
  }
202
233
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: EclRadioInputDirective, decorators: [{
203
234
  type: Directive,
204
235
  args: [{
205
236
  selector: 'input[eclRadioInput]',
237
+ host: {
238
+ '[class]': 'cssClasses',
239
+ },
206
240
  }]
207
- }], propDecorators: { cssClasses: [{
208
- type: HostBinding,
209
- args: ['class']
210
- }] } });
241
+ }] });
211
242
 
212
243
  const EUI_ECL_RADIO = [
213
244
  EclRadioDirective, EclRadioInputDirective, EclRadioLabelComponent, EclRadioHelpComponent,
@@ -1 +1 @@
1
- {"version":3,"file":"eui-ecl-components-ecl-radio.mjs","sources":["../../components/ecl-radio/ecl-radio-help.component.ts","../../components/ecl-radio/ecl-radio-help.component.html","../../components/ecl-radio/ecl-radio-label.component.ts","../../components/ecl-radio/ecl-radio-label.component.html","../../components/ecl-radio/ecl-radio.directive.ts","../../components/ecl-radio/ecl-radio-input.directive.ts","../../components/ecl-radio/index.ts","../../components/ecl-radio/eui-ecl-components-ecl-radio.ts"],"sourcesContent":["import { Component, HostBinding, Input, booleanAttribute } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Component that displays help text for the ECL radio input.\n *\n * Supports styling for the disabled state and applies the proper ECL CSS classes.\n * Should be placed inside a component using eclRadio.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[eclRadioHelp]',\n templateUrl: './ecl-radio-help.component.html',\n})\nexport class EclRadioHelpComponent extends ECLBaseDirective {\n /**\n * Adds styling for a disabled help text.\n */\n @Input({ transform: booleanAttribute }) \n @HostBinding('class.ecl-radio__help--disabled')\n isDisabled = false;\n\n /**\n * Returns the CSS classes applied to the host element.\n * Includes the base ecl-radio__help class.\n */\n @HostBinding('class')\n get cssClasses(): string {\n return [super.getCssClasses('ecl-radio__help')].join(' ').trim();\n }\n}\n","<ng-content></ng-content>\n","import { Component, HostBinding, Input, ViewEncapsulation, booleanAttribute } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Component representing a label for an ECL radio button.\n *\n * Used inside an element with the [eclRadio] directive to provide\n * a styled label that can reflect the radio's state.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[eclRadioLabel]',\n templateUrl: './ecl-radio-label.component.html',\n encapsulation: ViewEncapsulation.None,\n})\nexport class EclRadioLabelComponent extends ECLBaseDirective {\n /**\n * Adds styling for an invalid state.\n */\n @Input({ transform: booleanAttribute }) isInvalid = false;\n\n /**\n * Adds styling for a disabled state.\n */\n @Input({ transform: booleanAttribute }) isDisabled = false;\n\n /**\n * Returns the CSS classes applied to the host element.\n * Includes the base `ecl-radio__label` class.\n */\n @HostBinding('class')\n get cssClasses(): string {\n return [super.getCssClasses('ecl-radio__label')].join(' ').trim();\n }\n}\n","<span class=\"ecl-radio__box\" [class.ecl-radio__box--disabled]=\"isDisabled\" [class.ecl-radio__box--invalid]=\"isInvalid\">\n <span class=\"ecl-radio__box-inner\"></span>\n</span>\n\n<ng-content></ng-content>\n","import { booleanAttribute, Directive, DoCheck, forwardRef, HostBinding, Input, input, contentChild } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclRadioHelpComponent } from './ecl-radio-help.component';\nimport { EclRadioLabelComponent } from './ecl-radio-label.component';\n\n/**\n * Directive that applies the ECL radio button styling and behavior.\n *\n * Should be applied to native radio input elements to enhance them\n * with ECL styles and support for invalid, disabled and binary states.\n */\n@Directive({\n selector: '[eclRadio]',\n})\nexport class EclRadioDirective extends ECLBaseDirective implements DoCheck {\n /**\n * Adds the `ecl-radio--binary` class when true.\n */\n readonly isBinary = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Adds the `ecl-radio--disabled` class to the host element when true.\n */\n @Input({ transform: booleanAttribute })\n @HostBinding('class.ecl-radio--disabled')\n isDisabled = false;\n\n /**\n * Adds the `ecl-radio--invalid` class to the host element when true.\n */\n @Input({ transform: booleanAttribute })\n @HostBinding('class.ecl-radio--invalid')\n isInvalid = false;\n\n /**\n * Reference to the projected EclRadioLabelComponent, if present.\n * Used to synchronize disabled and invalid states with the label.\n */\n readonly eclRadioLabelComponent = contentChild(forwardRef(() => EclRadioLabelComponent));\n\n /**\n * Reference to the projected EclRadioHelpComponent, if present.\n * Used to synchronize the disabled state with the help text.\n */\n readonly eclRadioHelpComponent = contentChild(forwardRef(() => EclRadioHelpComponent));\n\n /**\n * Returns the CSS classes to apply on the host element.\n * Includes the base `ecl-radio` class and the binary modifier if applicable.\n */\n @HostBinding('class')\n get cssClasses(): string {\n return [super.getCssClasses('ecl-radio'), this.isBinary() ? 'ecl-radio--binary' : ''].join(' ').trim();\n }\n\n /**\n * Angular lifecycle hook called during every change detection run.\n * Used to update child components with the current disabled and invalid states.\n */\n ngDoCheck(): void {\n this.updateChildElements();\n }\n\n private updateChildElements(): void {\n const eclRadioLabelComponent = this.eclRadioLabelComponent();\n if (eclRadioLabelComponent) {\n eclRadioLabelComponent.isInvalid = this.isInvalid;\n eclRadioLabelComponent.isDisabled = this.isDisabled;\n }\n\n const eclRadioHelpComponent = this.eclRadioHelpComponent();\n if (eclRadioHelpComponent) {\n eclRadioHelpComponent.isDisabled = this.isDisabled;\n }\n }\n}\n","import { Directive, HostBinding, ChangeDetectorRef, DoCheck, inject } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { EclRadioDirective } from './ecl-radio.directive';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Directive that decorates native <input> elements to be styled as ECL radio inputs.\n *\n * Applies the proper ECL CSS classes and integrates with Angular forms\n * to reflect validation states (invalid, disabled) in the parent ECL radio directive.\n * Should be used together with the eclRadio directive.\n */\n@Directive({\n selector: 'input[eclRadioInput]',\n})\nexport class EclRadioInputDirective extends ECLBaseDirective implements DoCheck {\n eclRadio = inject(EclRadioDirective);\n protected ngControl = inject(NgControl, { optional: true, self: true });\n protected cd = inject(ChangeDetectorRef);\n\n /**\n * Returns the CSS classes applied to the host input element.\n * Includes the base ecl-radio__input class.\n */\n @HostBinding('class')\n get cssClasses(): string {\n return [super.getCssClasses('ecl-radio__input')].join(' ').trim();\n }\n\n ngDoCheck(): void {\n if (this.ngControl) {\n if (this.eclRadio) {\n this.eclRadio.isInvalid = this.ngControl.invalid && this.ngControl.touched;\n this.eclRadio.isDisabled = this.ngControl.disabled;\n }\n }\n }\n}\n","import { EclRadioHelpComponent } from './ecl-radio-help.component';\nimport { EclRadioInputDirective } from './ecl-radio-input.directive';\nimport { EclRadioLabelComponent } from './ecl-radio-label.component';\nimport { EclRadioDirective } from './ecl-radio.directive';\n\nexport * from './ecl-radio-input.directive';\nexport * from './ecl-radio.directive';\nexport * from './ecl-radio-label.component';\nexport * from './ecl-radio-help.component';\n\nexport const EUI_ECL_RADIO = [\n EclRadioDirective, EclRadioInputDirective, EclRadioLabelCom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;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sBAAsB;AACnC,iBAAA;;sBAUI,WAAW;uBAAC,OAAO;;;ACdjB,MAAM,aAAa,GAAG;AACzB,IAAA,iBAAiB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,qBAAqB;;;ACX5F;;AAEG;;;;"}
1
+ {"version":3,"file":"eui-ecl-components-ecl-radio.mjs","sources":["../../components/ecl-radio/ecl-radio-help.component.ts","../../components/ecl-radio/ecl-radio-help.component.html","../../components/ecl-radio/ecl-radio-label.component.ts","../../components/ecl-radio/ecl-radio-label.component.html","../../components/ecl-radio/ecl-radio.directive.ts","../../components/ecl-radio/ecl-radio-input.directive.ts","../../components/ecl-radio/index.ts","../../components/ecl-radio/eui-ecl-components-ecl-radio.ts"],"sourcesContent":["import { Component, computed, model } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Component that displays help text for the ECL radio input.\n *\n * Supports styling for the disabled state and applies the proper ECL CSS classes.\n * Should be placed inside a component using eclRadio.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[eclRadioHelp]',\n templateUrl: './ecl-radio-help.component.html',\n host: {\n '[class]': 'cssClasses()',\n '[class.ecl-radio__help--disabled]': 'isDisabled()',\n },\n})\nexport class EclRadioHelpComponent extends ECLBaseDirective {\n /**\n * Adds styling for a disabled help text.\n *\n * Exposed as a model so the parent `eclRadio` directive can synchronize\n * the disabled state onto the projected help text.\n */\n readonly isDisabled = model(false);\n\n /**\n * Returns the CSS classes applied to the host element.\n * Includes the base ecl-radio__help class.\n */\n readonly cssClasses = computed(() => [this.getCssClasses('ecl-radio__help')].join(' ').trim());\n}\n","<ng-content></ng-content>\n","import { Component, ViewEncapsulation, model } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Component representing a label for an ECL radio button.\n *\n * Used inside an element with the [eclRadio] directive to provide\n * a styled label that can reflect the radio's state.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[eclRadioLabel]',\n templateUrl: './ecl-radio-label.component.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'cssClasses',\n },\n})\nexport class EclRadioLabelComponent extends ECLBaseDirective {\n /**\n * Adds styling for an invalid state.\n *\n * Exposed as a model so the parent `eclRadio` directive can synchronize\n * the invalid state onto the label.\n */\n readonly isInvalid = model(false);\n\n /**\n * Adds styling for a disabled state.\n *\n * Exposed as a model so the parent `eclRadio` directive can synchronize\n * the disabled state onto the label.\n */\n readonly isDisabled = model(false);\n\n /**\n * Returns the CSS classes applied to the host element.\n * Includes the base `ecl-radio__label` class.\n */\n get cssClasses(): string {\n return [super.getCssClasses('ecl-radio__label')].join(' ').trim();\n }\n}\n","<span class=\"ecl-radio__box\" [class.ecl-radio__box--disabled]=\"isDisabled()\" [class.ecl-radio__box--invalid]=\"isInvalid()\">\n <span class=\"ecl-radio__box-inner\"></span>\n</span>\n\n<ng-content></ng-content>\n","import { booleanAttribute, computed, Directive, effect, forwardRef, input, signal, contentChild } from '@angular/core';\nimport { ECLBaseDirective } from '@eui/ecl/core';\nimport { EclRadioHelpComponent } from './ecl-radio-help.component';\nimport { EclRadioLabelComponent } from './ecl-radio-label.component';\n\n/**\n * Directive that applies the ECL radio button styling and behavior.\n *\n * Should be applied to native radio input elements to enhance them\n * with ECL styles and support for invalid, disabled and binary states.\n */\n@Directive({\n selector: '[eclRadio]',\n host: {\n '[class]': 'cssClasses',\n '[class.ecl-radio--disabled]': 'isDisabled()',\n '[class.ecl-radio--invalid]': 'isInvalid()',\n },\n})\nexport class EclRadioDirective extends ECLBaseDirective {\n /**\n * Adds the `ecl-radio--binary` class when true.\n */\n readonly isBinary = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Consumer-provided disabled state, bound as an attribute on the host element.\n */\n readonly disabledInput = input<boolean, unknown>(false, { transform: booleanAttribute, alias: 'isDisabled' });\n\n /**\n * Consumer-provided invalid state, bound as an attribute on the host element.\n */\n readonly invalidInput = input<boolean, unknown>(false, { transform: booleanAttribute, alias: 'isInvalid' });\n\n /**\n * Disabled state derived from the child `eclRadioInput` form control, if any.\n * Overrides the consumer-provided value when the control drives the state.\n */\n private readonly controlDisabled = signal<boolean | undefined>(undefined);\n\n /**\n * Invalid state derived from the child `eclRadioInput` form control, if any.\n * Overrides the consumer-provided value when the control drives the state.\n */\n private readonly controlInvalid = signal<boolean | undefined>(undefined);\n\n /**\n * Effective disabled state, preferring the form-control-driven value when present.\n * Adds the `ecl-radio--disabled` class to the host element when true.\n *\n * Precedence: when a child `eclRadioInput` is bound to a form control it calls\n * `setControlState`, making `controlDisabled` a concrete boolean that takes over.\n * While `controlDisabled` is `undefined` (no form control in play), the `??`\n * falls back to the consumer-provided `disabledInput` attribute value.\n */\n readonly isDisabled = computed(() => this.controlDisabled() ?? this.disabledInput());\n\n /**\n * Effective invalid state, preferring the form-control-driven value when present.\n * Adds the `ecl-radio--invalid` class to the host element when true.\n *\n * Precedence: when a child `eclRadioInput` is bound to a form control it calls\n * `setControlState`, making `controlInvalid` a concrete boolean that takes over.\n * While `controlInvalid` is `undefined` (no form control in play), the `??`\n * falls back to the consumer-provided `invalidInput` attribute value.\n */\n readonly isInvalid = computed(() => this.controlInvalid() ?? this.invalidInput());\n\n /**\n * Reference to the projected EclRadioLabelComponent, if present.\n * Used to synchronize disabled and invalid states with the label.\n */\n readonly eclRadioLabelComponent = contentChild(forwardRef(() => EclRadioLabelComponent));\n\n /**\n * Reference to the projected EclRadioHelpComponent, if present.\n * Used to synchronize the disabled state with the help text.\n */\n readonly eclRadioHelpComponent = contentChild(forwardRef(() => EclRadioHelpComponent));\n\n constructor() {\n super();\n this.synchronizeChildElements();\n }\n\n /**\n * Returns the CSS classes to apply on the host element.\n * Includes the base `ecl-radio` class and the binary modifier if applicable.\n */\n get cssClasses(): string {\n return [super.getCssClasses('ecl-radio'), this.isBinary() ? 'ecl-radio--binary' : ''].join(' ').trim();\n }\n\n /**\n * Called by the child `eclRadioInput` directive to propagate the disabled and\n * invalid states derived from the associated form control.\n */\n setControlState(isInvalid: boolean, isDisabled: boolean): void {\n this.controlInvalid.set(isInvalid);\n this.controlDisabled.set(isDisabled);\n }\n\n /**\n * Keeps the projected label and help components in sync with the\n * directive's disabled and invalid states whenever they change.\n */\n private synchronizeChildElements(): void {\n effect(() => {\n const isDisabled = this.isDisabled();\n const isInvalid = this.isInvalid();\n\n const eclRadioLabelComponent = this.eclRadioLabelComponent();\n if (eclRadioLabelComponent) {\n eclRadioLabelComponent.isInvalid.set(isInvalid);\n eclRadioLabelComponent.isDisabled.set(isDisabled);\n }\n\n const eclRadioHelpComponent = this.eclRadioHelpComponent();\n if (eclRadioHelpComponent) {\n eclRadioHelpComponent.isDisabled.set(isDisabled);\n }\n });\n }\n}\n","import { Directive, ChangeDetectorRef, DoCheck, inject } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { EclRadioDirective } from './ecl-radio.directive';\nimport { ECLBaseDirective } from '@eui/ecl/core';\n\n/**\n * Directive that decorates native <input> elements to be styled as ECL radio inputs.\n *\n * Applies the proper ECL CSS classes and integrates with Angular forms\n * to reflect validation states (invalid, disabled) in the parent ECL radio directive.\n * Should be used together with the eclRadio directive.\n */\n@Directive({\n selector: 'input[eclRadioInput]',\n host: {\n '[class]': 'cssClasses',\n },\n})\nexport class EclRadioInputDirective extends ECLBaseDirective implements DoCheck {\n eclRadio = inject(EclRadioDirective);\n protected ngControl = inject(NgControl, { optional: true, self: true });\n protected cd = inject(ChangeDetectorRef);\n\n /**\n * Returns the CSS classes applied to the host input element.\n * Includes the base ecl-radio__input class.\n */\n get cssClasses(): string {\n return [super.getCssClasses('ecl-radio__input')].join(' ').trim();\n }\n\n ngDoCheck(): void {\n if (this.ngControl) {\n if (this.eclRadio) {\n this.eclRadio.setControlState(\n this.ngControl.invalid && this.ngControl.touched,\n this.ngControl.disabled,\n );\n }\n }\n }\n}\n","import { EclRadioHelpComponent } from './ecl-radio-help.component';\nimport { EclRadioInputDirective } from './ecl-radio-input.directive';\nimport { EclRadioLabelComponent } from './ecl-radio-label.component';\nimport { EclRadioDirective } from './ecl-radio.directive';\n\nexport * from './ecl-radio-input.directive';\nexport * from './ecl-radio.directive';\nexport * from './ecl-radio-label.component';\nexport * from './ecl-radio-help.component';\n\nexport const EUI_ECL_RADIO = [\n EclRadioDirective, EclRadioInputDirective, EclRadioLabelComponent, EclRadioHelpComponent,\n] as const;","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;;;;;AAKG;AAUG,MAAO,qBAAsB,SAAQ,gBAAgB,CAAA;AAT3D,IAAA,WAAA,GAAA;;AAUI;;;;;AAKG;QACM,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,KAAK;uFAAC;AAElC;;;AAGG;QACM,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;uFAAC;AACjG,IAAA;8GAdY,qBAAqB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,uYClBlC,6BACA,EAAA,CAAA,CAAA;;2FDiBa,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBATjC,SAAS;AAEI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAAA,IAAA,EAEpB;AACF,wBAAA,SAAS,EAAE,cAAc;AACzB,wBAAA,mCAAmC,EAAE,cAAc;AACtD,qBAAA,EAAA,QAAA,EAAA,6BAAA,EAAA;;;AEbL;;;;;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C,CAAC,IAAI,EAAE;IACrE;IAEA,SAAS,GAAA;AACL,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACf,IAAI,CAAC,QAAQ,CAAC,eAAe,CACzB,IAAI,CAAC,SAAS,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,EAChD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAC1B;YACL;QACJ;IACJ;8GAtBS,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,YAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBANlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,IAAI,EAAE;AACF,wBAAA,SAAS,EAAE,YAAY;AAC1B,qBAAA;AACJ,iBAAA;;;ACPM,MAAM,aAAa,GAAG;AACzB,IAAA,iBAAiB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,qBAAqB;;;ACX5F;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/ecl",
3
- "version": "22.0.0-alpha.28",
3
+ "version": "22.0.0-alpha.29",
4
4
  "tag": "next",
5
5
  "description": "eUI ECL components package",
6
6
  "homepage": "https://eui.ecdevops.eu",
@@ -1,6 +1,6 @@
1
- import { ECLBaseDirective } from '@eui/ecl/core';
2
- import * as i0 from '@angular/core';
1
+ import * as _angular_core from '@angular/core';
3
2
  import { DoCheck, ChangeDetectorRef } from '@angular/core';
3
+ import { ECLBaseDirective } from '@eui/ecl/core';
4
4
  import { NgControl } from '@angular/forms';
5
5
 
6
6
  /**
@@ -12,16 +12,18 @@ import { NgControl } from '@angular/forms';
12
12
  declare class EclRadioHelpComponent extends ECLBaseDirective {
13
13
  /**
14
14
  * Adds styling for a disabled help text.
15
+ *
16
+ * Exposed as a model so the parent `eclRadio` directive can synchronize
17
+ * the disabled state onto the projected help text.
15
18
  */
16
- isDisabled: boolean;
19
+ readonly isDisabled: _angular_core.ModelSignal<boolean>;
17
20
  /**
18
21
  * Returns the CSS classes applied to the host element.
19
22
  * Includes the base ecl-radio__help class.
20
23
  */
21
- get cssClasses(): string;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<EclRadioHelpComponent, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<EclRadioHelpComponent, "[eclRadioHelp]", never, { "isDisabled": { "alias": "isDisabled"; "required": false; }; }, {}, never, ["*"], true, never>;
24
- static ngAcceptInputType_isDisabled: unknown;
24
+ readonly cssClasses: _angular_core.Signal<string>;
25
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EclRadioHelpComponent, never>;
26
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EclRadioHelpComponent, "[eclRadioHelp]", never, { "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; }, { "isDisabled": "isDisabledChange"; }, never, ["*"], true, never>;
25
27
  }
26
28
 
27
29
  /**
@@ -30,44 +32,77 @@ declare class EclRadioHelpComponent extends ECLBaseDirective {
30
32
  * Should be applied to native radio input elements to enhance them
31
33
  * with ECL styles and support for invalid, disabled and binary states.
32
34
  */
33
- declare class EclRadioDirective extends ECLBaseDirective implements DoCheck {
35
+ declare class EclRadioDirective extends ECLBaseDirective {
34
36
  /**
35
37
  * Adds the `ecl-radio--binary` class when true.
36
38
  */
37
- readonly isBinary: i0.InputSignalWithTransform<boolean, unknown>;
39
+ readonly isBinary: _angular_core.InputSignalWithTransform<boolean, unknown>;
40
+ /**
41
+ * Consumer-provided disabled state, bound as an attribute on the host element.
42
+ */
43
+ readonly disabledInput: _angular_core.InputSignalWithTransform<boolean, unknown>;
44
+ /**
45
+ * Consumer-provided invalid state, bound as an attribute on the host element.
46
+ */
47
+ readonly invalidInput: _angular_core.InputSignalWithTransform<boolean, unknown>;
38
48
  /**
49
+ * Disabled state derived from the child `eclRadioInput` form control, if any.
50
+ * Overrides the consumer-provided value when the control drives the state.
51
+ */
52
+ private readonly controlDisabled;
53
+ /**
54
+ * Invalid state derived from the child `eclRadioInput` form control, if any.
55
+ * Overrides the consumer-provided value when the control drives the state.
56
+ */
57
+ private readonly controlInvalid;
58
+ /**
59
+ * Effective disabled state, preferring the form-control-driven value when present.
39
60
  * Adds the `ecl-radio--disabled` class to the host element when true.
61
+ *
62
+ * Precedence: when a child `eclRadioInput` is bound to a form control it calls
63
+ * `setControlState`, making `controlDisabled` a concrete boolean that takes over.
64
+ * While `controlDisabled` is `undefined` (no form control in play), the `??`
65
+ * falls back to the consumer-provided `disabledInput` attribute value.
40
66
  */
41
- isDisabled: boolean;
67
+ readonly isDisabled: _angular_core.Signal<boolean>;
42
68
  /**
69
+ * Effective invalid state, preferring the form-control-driven value when present.
43
70
  * Adds the `ecl-radio--invalid` class to the host element when true.
71
+ *
72
+ * Precedence: when a child `eclRadioInput` is bound to a form control it calls
73
+ * `setControlState`, making `controlInvalid` a concrete boolean that takes over.
74
+ * While `controlInvalid` is `undefined` (no form control in play), the `??`
75
+ * falls back to the consumer-provided `invalidInput` attribute value.
44
76
  */
45
- isInvalid: boolean;
77
+ readonly isInvalid: _angular_core.Signal<boolean>;
46
78
  /**
47
79
  * Reference to the projected EclRadioLabelComponent, if present.
48
80
  * Used to synchronize disabled and invalid states with the label.
49
81
  */
50
- readonly eclRadioLabelComponent: i0.Signal<any>;
82
+ readonly eclRadioLabelComponent: _angular_core.Signal<any>;
51
83
  /**
52
84
  * Reference to the projected EclRadioHelpComponent, if present.
53
85
  * Used to synchronize the disabled state with the help text.
54
86
  */
55
- readonly eclRadioHelpComponent: i0.Signal<any>;
87
+ readonly eclRadioHelpComponent: _angular_core.Signal<any>;
88
+ constructor();
56
89
  /**
57
90
  * Returns the CSS classes to apply on the host element.
58
91
  * Includes the base `ecl-radio` class and the binary modifier if applicable.
59
92
  */
60
93
  get cssClasses(): string;
61
94
  /**
62
- * Angular lifecycle hook called during every change detection run.
63
- * Used to update child components with the current disabled and invalid states.
95
+ * Called by the child `eclRadioInput` directive to propagate the disabled and
96
+ * invalid states derived from the associated form control.
64
97
  */
65
- ngDoCheck(): void;
66
- private updateChildElements;
67
- static ɵfac: i0.ɵɵFactoryDeclaration<EclRadioDirective, never>;
68
- static ɵdir: i0.ɵɵDirectiveDeclaration<EclRadioDirective, "[eclRadio]", never, { "isBinary": { "alias": "isBinary"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "isInvalid": { "alias": "isInvalid"; "required": false; }; }, {}, ["eclRadioLabelComponent", "eclRadioHelpComponent"], never, true, never>;
69
- static ngAcceptInputType_isDisabled: unknown;
70
- static ngAcceptInputType_isInvalid: unknown;
98
+ setControlState(isInvalid: boolean, isDisabled: boolean): void;
99
+ /**
100
+ * Keeps the projected label and help components in sync with the
101
+ * directive's disabled and invalid states whenever they change.
102
+ */
103
+ private synchronizeChildElements;
104
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EclRadioDirective, never>;
105
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<EclRadioDirective, "[eclRadio]", never, { "isBinary": { "alias": "isBinary"; "required": false; "isSignal": true; }; "disabledInput": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "invalidInput": { "alias": "isInvalid"; "required": false; "isSignal": true; }; }, {}, ["eclRadioLabelComponent", "eclRadioHelpComponent"], never, true, never>;
71
106
  }
72
107
 
73
108
  /**
@@ -87,8 +122,8 @@ declare class EclRadioInputDirective extends ECLBaseDirective implements DoCheck
87
122
  */
88
123
  get cssClasses(): string;
89
124
  ngDoCheck(): void;
90
- static ɵfac: i0.ɵɵFactoryDeclaration<EclRadioInputDirective, never>;
91
- static ɵdir: i0.ɵɵDirectiveDeclaration<EclRadioInputDirective, "input[eclRadioInput]", never, {}, {}, never, never, true, never>;
125
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EclRadioInputDirective, never>;
126
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<EclRadioInputDirective, "input[eclRadioInput]", never, {}, {}, never, never, true, never>;
92
127
  }
93
128
 
94
129
  /**
@@ -100,21 +135,25 @@ declare class EclRadioInputDirective extends ECLBaseDirective implements DoCheck
100
135
  declare class EclRadioLabelComponent extends ECLBaseDirective {
101
136
  /**
102
137
  * Adds styling for an invalid state.
138
+ *
139
+ * Exposed as a model so the parent `eclRadio` directive can synchronize
140
+ * the invalid state onto the label.
103
141
  */
104
- isInvalid: boolean;
142
+ readonly isInvalid: _angular_core.ModelSignal<boolean>;
105
143
  /**
106
144
  * Adds styling for a disabled state.
145
+ *
146
+ * Exposed as a model so the parent `eclRadio` directive can synchronize
147
+ * the disabled state onto the label.
107
148
  */
108
- isDisabled: boolean;
149
+ readonly isDisabled: _angular_core.ModelSignal<boolean>;
109
150
  /**
110
151
  * Returns the CSS classes applied to the host element.
111
152
  * Includes the base `ecl-radio__label` class.
112
153
  */
113
154
  get cssClasses(): string;
114
- static ɵfac: i0.ɵɵFactoryDeclaration<EclRadioLabelComponent, never>;
115
- static ɵcmp: i0.ɵɵComponentDeclaration<EclRadioLabelComponent, "[eclRadioLabel]", never, { "isInvalid": { "alias": "isInvalid"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; }, {}, never, ["*"], true, never>;
116
- static ngAcceptInputType_isInvalid: unknown;
117
- static ngAcceptInputType_isDisabled: unknown;
155
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EclRadioLabelComponent, never>;
156
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EclRadioLabelComponent, "[eclRadioLabel]", never, { "isInvalid": { "alias": "isInvalid"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; }, { "isInvalid": "isInvalidChange"; "isDisabled": "isDisabledChange"; }, never, ["*"], true, never>;
118
157
  }
119
158
 
120
159
  declare const EUI_ECL_RADIO: readonly [typeof EclRadioDirective, typeof EclRadioInputDirective, typeof EclRadioLabelComponent, typeof EclRadioHelpComponent];