@eui/ecl 22.0.0-alpha.27 → 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.
@@ -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];
@@ -1 +1 @@
1
- {"version":3,"file":"eui-ecl-components-ecl-radio.d.ts","sources":["../../components/ecl-radio/ecl-radio-help.component.ts","../../components/ecl-radio/ecl-radio.directive.ts","../../components/ecl-radio/ecl-radio-input.directive.ts","../../components/ecl-radio/ecl-radio-label.component.ts","../../components/ecl-radio/index.ts"],"mappings":";;;;;AAGA;;;;;AAKG;AACH,cAKa,qBAAsB,SAAQ,gBAAgB;AACvD;;AAEG;AAGH;AAEA;;;AAGG;;yCAXM,qBAAqB;2CAArB,qBAAqB;;AAgBjC;;ACzBD;;;;;AAKG;AACH,cAGa,iBAAkB,SAAQ,gBAAiB,YAAW,OAAO;AACtE;;AAEG;uBACcA,EAAA,CAAA,wBAAA;AAEjB;;AAEG;AAGH;AAEA;;AAEG;AAGH;AAEA;;;AAGG;qCAC4BA,EAAA,CAAA,MAAA;AAE/B;;;AAGG;oCAC2BA,EAAA,CAAA,MAAA;AAE9B;;;AAGG;;AAMH;;;AAGG;AACH;AAIA;yCAjDS,iBAAiB;2CAAjB,iBAAiB;;;AA6D7B;;ACtED;;;;;;AAMG;AACH,cAGa,sBAAuB,SAAQ,gBAAiB,YAAW,OAAO;AAC3E,cAAQ,iBAAA;yBACW,SAAA;kBACP,iBAAA;AAEZ;;;AAGG;;AAMH;yCAdS,sBAAsB;2CAAtB,sBAAsB;AAsBlC;;AClCD;;;;;AAKG;AACH,cAMa,sBAAuB,SAAQ,gBAAgB;AACxD;;AAEG;AACqC;AAExC;;AAEG;AACqC;AAExC;;;AAGG;;yCAdM,sBAAsB;2CAAtB,sBAAsB;;;AAmBlC;;ACxBD,cAAa,aAAa,mBAAA,iBAAA,SAAA,sBAAA,SAAA,sBAAA,SAAA,qBAAA;;;;","names":["_angular_core"]}
1
+ {"version":3,"file":"eui-ecl-components-ecl-radio.d.ts","sources":["../../components/ecl-radio/ecl-radio-help.component.ts","../../components/ecl-radio/ecl-radio.directive.ts","../../components/ecl-radio/ecl-radio-input.directive.ts","../../components/ecl-radio/ecl-radio-label.component.ts","../../components/ecl-radio/index.ts"],"mappings":";;;;;AAGA;;;;;AAKG;AACH,cASa,qBAAsB,SAAQ,gBAAgB;AACvD;;;;;AAKG;yBACgB,aAAA,CAAA,WAAA;AAEnB;;;AAGG;yBACgB,aAAA,CAAA,MAAA;oDAbV,qBAAqB;sDAArB,qBAAqB;AAcjC;;AC3BD;;;;;AAKG;AACH,cAQa,iBAAkB,SAAQ,gBAAgB;AACnD;;AAEG;uBACc,aAAA,CAAA,wBAAA;AAEjB;;AAEG;4BACmB,aAAA,CAAA,wBAAA;AAEtB;;AAEG;2BACkB,aAAA,CAAA,wBAAA;AAErB;;;AAGG;AACH;AAEA;;;AAGG;AACH;AAEA;;;;;;;;AAQG;yBACgB,aAAA,CAAA,MAAA;AAEnB;;;;;;;;AAQG;wBACe,aAAA,CAAA,MAAA;AAElB;;;AAGG;qCAC4B,aAAA,CAAA,MAAA;AAE/B;;;AAGG;oCAC2B,aAAA,CAAA,MAAA;;AAO9B;;;AAGG;;AAKH;;;AAGG;;AAMH;;;AAGG;AACH;oDAxFS,iBAAiB;sDAAjB,iBAAiB;AAyG7B;;ACvHD;;;;;;AAMG;AACH,cAMa,sBAAuB,SAAQ,gBAAiB,YAAW,OAAO;AAC3E,cAAQ,iBAAA;yBACW,SAAA;kBACP,iBAAA;AAEZ;;;AAGG;;AAKH;oDAbS,sBAAsB;sDAAtB,sBAAsB;AAuBlC;;ACtCD;;;;;AAKG;AACH,cASa,sBAAuB,SAAQ,gBAAgB;AACxD;;;;;AAKG;wBACe,aAAA,CAAA,WAAA;AAElB;;;;;AAKG;yBACgB,aAAA,CAAA,WAAA;AAEnB;;;AAGG;;oDApBM,sBAAsB;sDAAtB,sBAAsB;AAwBlC;;AChCD,cAAa,aAAa,mBAAA,iBAAA,SAAA,sBAAA,SAAA,sBAAA,SAAA,qBAAA;;;;","names":[]}