ud-components 0.1.9 → 0.2.0

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.
@@ -2287,7 +2287,8 @@ class ToggleComponent {
2287
2287
  isDisabled = false;
2288
2288
  controlContainer = inject(ControlContainer, { optional: true, skipSelf: true });
2289
2289
  destroy$ = new Subject();
2290
- onChange = () => { };
2290
+ onChange = new EventEmitter();
2291
+ _onChange = () => { };
2291
2292
  onTouched = () => { };
2292
2293
  get formControl() {
2293
2294
  if (!this.controlName || !this.controlContainer?.control)
@@ -2319,15 +2320,16 @@ class ToggleComponent {
2319
2320
  }
2320
2321
  else {
2321
2322
  this.checked = !this.checked;
2322
- this.onChange(this.checked);
2323
+ this._onChange(this.checked);
2323
2324
  this.onTouched();
2324
2325
  }
2326
+ this.onChange.emit(this.checked);
2325
2327
  }
2326
2328
  writeValue(value) {
2327
2329
  this.checked = !!value;
2328
2330
  }
2329
2331
  registerOnChange(fn) {
2330
- this.onChange = fn;
2332
+ this._onChange = fn;
2331
2333
  }
2332
2334
  registerOnTouched(fn) {
2333
2335
  this.onTouched = fn;
@@ -2336,7 +2338,7 @@ class ToggleComponent {
2336
2338
  this.isDisabled = isDisabled;
2337
2339
  }
2338
2340
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: ToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2339
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: ToggleComponent, isStandalone: true, selector: "ud-toggle", inputs: { controlName: "controlName", size: "size", label: "label", labelPosition: "labelPosition", ariaLabel: "ariaLabel" }, host: { properties: { "class.size-sm": "this.isSm", "class.size-md": "this.isMd", "class.size-lg": "this.isLg" } }, providers: [
2341
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: ToggleComponent, isStandalone: true, selector: "ud-toggle", inputs: { controlName: "controlName", size: "size", label: "label", labelPosition: "labelPosition", ariaLabel: "ariaLabel" }, outputs: { onChange: "onChange" }, host: { properties: { "class.size-sm": "this.isSm", "class.size-md": "this.isMd", "class.size-lg": "this.isLg" } }, providers: [
2340
2342
  {
2341
2343
  provide: NG_VALUE_ACCESSOR,
2342
2344
  useExisting: forwardRef(() => ToggleComponent),
@@ -2382,6 +2384,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
2382
2384
  }], isLg: [{
2383
2385
  type: HostBinding,
2384
2386
  args: ['class.size-lg']
2387
+ }], onChange: [{
2388
+ type: Output
2385
2389
  }] } });
2386
2390
 
2387
2391
  /*