@vsn-ux/ngx-gaia 0.11.1 → 0.11.2
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.
|
@@ -5320,6 +5320,10 @@ let nextUniqueId$2 = 0;
|
|
|
5320
5320
|
class GaSwitchComponent {
|
|
5321
5321
|
icons = { Check };
|
|
5322
5322
|
/** @ignore */
|
|
5323
|
+
formFieldConnector = inject(GaFormFieldConnector, {
|
|
5324
|
+
optional: true,
|
|
5325
|
+
});
|
|
5326
|
+
/** @ignore */
|
|
5323
5327
|
implicitNgControlState = injectNgControlState();
|
|
5324
5328
|
/** @ignore */
|
|
5325
5329
|
_uniqueId = `ga-switch-${++nextUniqueId$2}`;
|
|
@@ -5354,6 +5358,13 @@ class GaSwitchComponent {
|
|
|
5354
5358
|
? this.ariaInvalid() === 'true'
|
|
5355
5359
|
: this.implicitNgControlState.inError();
|
|
5356
5360
|
}, ...(ngDevMode ? [{ debugName: "invalidComputed" }] : []));
|
|
5361
|
+
constructor() {
|
|
5362
|
+
const formFieldConnector = this.formFieldConnector;
|
|
5363
|
+
if (formFieldConnector) {
|
|
5364
|
+
effect(() => formFieldConnector.controlDisabled.set(this.disabledModel()));
|
|
5365
|
+
effect(() => formFieldConnector.controlId.set(this.inputId()));
|
|
5366
|
+
}
|
|
5367
|
+
}
|
|
5357
5368
|
/** @ignore */
|
|
5358
5369
|
onInputChange(event) {
|
|
5359
5370
|
const target = event.target;
|
|
@@ -5398,7 +5409,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.4", ngImpor
|
|
|
5398
5409
|
'[attr.aria-errormessage]': 'null',
|
|
5399
5410
|
'[attr.aria-invalid]': 'null',
|
|
5400
5411
|
}, template: "<input\n #input\n type=\"checkbox\"\n class=\"ga-switch__input\"\n [attr.id]=\"inputId()\"\n [name]=\"name()\"\n [checked]=\"checkedModel()\"\n [disabled]=\"disabledModel()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.aria-errormessage]=\"ariaErrormessage()\"\n [attr.aria-invalid]=\"invalidComputed() ? 'true' : null\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n/>\n<div class=\"ga-switch__marker\">\n <ga-icon\n [icon]=\"icons.Check\"\n class=\"ga-switch__check-icon\"\n [size]=\"16\"\n aria-hidden=\"true\"\n />\n <span class=\"ga-switch__slider\"></span>\n</div>\n@if (label()) {\n <label [attr.for]=\"inputId()\" class=\"ga-switch__label\">{{ label() }}</label>\n}\n" }]
|
|
5401
|
-
}], propDecorators: { tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-invalid", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], ariaErrormessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-errormessage", required: false }] }], nameInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }] } });
|
|
5412
|
+
}], ctorParameters: () => [], propDecorators: { tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-invalid", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], ariaErrormessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-errormessage", required: false }] }], nameInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }] } });
|
|
5402
5413
|
|
|
5403
5414
|
class GaSwitchModule {
|
|
5404
5415
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.4", ngImport: i0, type: GaSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|