@ardium-ui/ui 5.0.0-alpha.101 → 5.0.0-alpha.103

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.
@@ -2,10 +2,10 @@ import 'first-last';
2
2
  import { Overlay, ScrollStrategyOptions, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
3
3
  import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
4
4
  import * as i0 from '@angular/core';
5
- import { signal, computed, InjectionToken, Directive, Input, HostBinding, input, output, ViewChildren, viewChild, contentChild, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, inject, ViewContainerRef, TemplateRef, forwardRef, HostListener, NgModule, effect, viewChildren, Pipe, model, ElementRef, ChangeDetectorRef, ContentChildren, Renderer2, linkedSignal, untracked, contentChildren, Injectable, Injector } from '@angular/core';
5
+ import { signal, computed, InjectionToken, Directive, Input, HostBinding, input, output, ViewChildren, viewChild, contentChild, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, inject, ViewContainerRef, TemplateRef, forwardRef, HostListener, NgModule, effect, viewChildren, Pipe, model, ElementRef, ChangeDetectorRef, ContentChildren, Renderer2, linkedSignal, untracked, contentChildren, reflectComponentType, Injectable, Injector } from '@angular/core';
6
6
  import { Validators, NG_VALUE_ACCESSOR, TouchedChangeEvent } from '@angular/forms';
7
7
  import * as i4 from '@ardium-ui/devkit';
8
- import { arraySignal, coerceBooleanProperty, coerceNumberProperty, trackBoundControl, coerceArrayProperty, ArdiumClickOutsideModule, ArdiumEscapeHTMLModule, FileSystemService, FileSystemMethod, ArdiumFilePipesModule, coerceDateProperty, getUTCDate as getUTCDate$1, ArdiumHoldModule } from '@ardium-ui/devkit';
8
+ import { arraySignal, coerceBooleanProperty, coerceNumberProperty, trackBoundControl, coerceArrayProperty, ArdiumClickOutsideModule, ArdiumEscapeHTMLModule, FileSystemService, FileSystemMethod, ArdiumFilePipesModule, coerceDateOnlyProperty, getUTCDate as getUTCDate$1, ArdiumHoldModule } from '@ardium-ui/devkit';
9
9
  import { isDefined, any, isPrimitive, isAnyString, isNull, isNumber, isString, isArray, isFunction, isRegExp, evaluate, isObject, isPromise, isDate } from 'simple-bool';
10
10
  import { resolvePath } from 'resolve-object-path';
11
11
  import { TakeChance } from 'take-chance';
@@ -670,10 +670,14 @@ class NumberInputModel {
670
670
  }
671
671
  setValue(v) {
672
672
  let stringV = isNumber(v) ? String(v) : v;
673
- // always store with dot as decimal separator for internal consistency
674
- const sep = this._ardHostCmp.decimalSeparator();
675
- if (stringV && sep && sep !== '.') {
676
- stringV = stringV.split(sep).join('.');
673
+ if (stringV) {
674
+ const sep = this._ardHostCmp.decimalSeparator();
675
+ if (sep) {
676
+ // always store with dot as decimal separator for internal consistency
677
+ if (sep !== '.') {
678
+ stringV = stringV.split(sep).join('.');
679
+ }
680
+ }
677
681
  }
678
682
  this._value.set(stringV);
679
683
  this._updateInputEl();
@@ -683,12 +687,23 @@ class NumberInputModel {
683
687
  if (isNull(v))
684
688
  return;
685
689
  v = this._applyStandardConstraints(v, adjustMinMax ?? this._ardHostCmp.minMaxBehavior() === ArdNumberInputMinMaxBehavior.AdjustOnBlur);
690
+ // remove trailing zeros after decimal point
691
+ if (v.includes('.')) {
692
+ v = v.replace(/(\.\d*?)0+$/, '$1');
693
+ }
694
+ // remove decimal point if no digits after it
695
+ if (v.endsWith('.')) {
696
+ v = v.slice(0, -1);
697
+ }
698
+ // remove leading zeros (but keep "0" if the value is zero)
699
+ if (!v.match(/^0(\.\d+)?$/)) {
700
+ v = v.replace(/^0+/, '');
701
+ }
702
+ // apply fixed decimal places if configured
686
703
  if (this._ardHostCmp.fixedDecimalPlaces()) {
687
704
  v = this._fixDecimalPlaces(v);
688
705
  }
689
- // internal storage remains using '.'; _updateInputEl handles display
690
- // convert to number and back to string to remove any trailing decimal separator without digits and to remove leading zeros
691
- this.setValue(Number(v));
706
+ this.setValue(v);
692
707
  }
693
708
  _fixDecimalPlaces(v) {
694
709
  const maxDp = this._ardHostCmp.maxDecimalPlaces();
@@ -720,6 +735,9 @@ class NumberInputModel {
720
735
  //normalize the value
721
736
  v = v?.toString?.() ?? String(v);
722
737
  }
738
+ // check if value is already the same as current value
739
+ if (v === null ? v === this._value() : Number(v) === this.numberValue())
740
+ return false;
723
741
  v = v === null ? null : String(v);
724
742
  return this._writeValue(v, applyConstraints);
725
743
  }
@@ -5924,6 +5942,18 @@ function getDateComponents(date, UTC) {
5924
5942
  date: UTC ? date.getUTCDate() : date.getDate(),
5925
5943
  };
5926
5944
  }
5945
+ function startOfDay(date, UTC = false) {
5946
+ if (UTC) {
5947
+ return getUTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());
5948
+ }
5949
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
5950
+ }
5951
+ function endOfDay(date, UTC = false) {
5952
+ if (UTC) {
5953
+ return getUTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 23, 59, 59, 999);
5954
+ }
5955
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59, 999);
5956
+ }
5927
5957
 
5928
5958
  //public (exported)
5929
5959
  class ArdDateInputPrefixTemplateDirective {
@@ -6170,8 +6200,12 @@ class _AbstractDateInput extends _FormFieldComponentBase {
6170
6200
  return value;
6171
6201
  },
6172
6202
  });
6173
- this.min = input(this._DEFAULTS.min, { transform: v => coerceDateProperty(v, this._DEFAULTS.min) });
6174
- this.max = input(this._DEFAULTS.max, { transform: v => coerceDateProperty(v, this._DEFAULTS.max) });
6203
+ this.min = input(this._DEFAULTS.min, {
6204
+ transform: v => (v === null ? null : coerceDateOnlyProperty(v, this._DEFAULTS.min, true)),
6205
+ });
6206
+ this.max = input(this._DEFAULTS.max, {
6207
+ transform: v => (v === null ? null : coerceDateOnlyProperty(v, this._DEFAULTS.max, true)),
6208
+ });
6175
6209
  this.UTC = input(this._DEFAULTS.UTC, { transform: v => coerceBooleanProperty(v) });
6176
6210
  this._UTCAfterInit = signal(this._DEFAULTS.UTC);
6177
6211
  this.filter = input(this._DEFAULTS.filter);
@@ -7732,10 +7766,10 @@ class _AbstractCalendar extends _FormFieldComponentBase {
7732
7766
  this.yearSelect = output();
7733
7767
  this.monthSelect = output();
7734
7768
  this.min = input(this._DEFAULTS.min, {
7735
- transform: v => (v === null ? null : coerceDateProperty(v, this._DEFAULTS.min, true)),
7769
+ transform: v => (v === null ? null : coerceDateOnlyProperty(v, this._DEFAULTS.min, true)),
7736
7770
  });
7737
7771
  this.max = input(this._DEFAULTS.max, {
7738
- transform: v => (v === null ? null : coerceDateProperty(v, this._DEFAULTS.max, true)),
7772
+ transform: v => (v === null ? null : coerceDateOnlyProperty(v, this._DEFAULTS.max, true)),
7739
7773
  });
7740
7774
  this.UTC = input(this._DEFAULTS.UTC, { transform: v => coerceBooleanProperty(v) });
7741
7775
  this._UTCAfterInit = signal(this._DEFAULTS.UTC);
@@ -8831,17 +8865,30 @@ class ArdiumDateInputComponent extends _AbstractDateInput {
8831
8865
  if (this.minMaxStrategy() === ArdDateInputMinMaxStrategy.Adjust && date) {
8832
8866
  const min = this.min();
8833
8867
  const max = this.max();
8868
+ // min and max are always in UTC when they are set, so we need to convert the date to UTC for comparison
8869
+ date = getUTCDate(date.getFullYear(), date.getMonth(), date.getDate());
8834
8870
  if (min && date < min) {
8835
- date = new Date(min);
8871
+ date = min;
8836
8872
  }
8837
8873
  else if (max && date > max) {
8838
- date = new Date(max);
8874
+ date = max;
8875
+ }
8876
+ // convert the date back to local time if the UTC mode is off
8877
+ if (!this._UTCAfterInit()) {
8878
+ date = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());
8879
+ }
8880
+ if (date.toISOString() !== this.value()?.toISOString()) {
8881
+ this.value.set(date);
8839
8882
  }
8883
+ return;
8840
8884
  }
8885
+ // deserialized date should always be in local time, so we need to convert it to UTC if the UTC mode is on
8841
8886
  if (date && this._UTCAfterInit()) {
8842
8887
  date = getUTCDate(date.getFullYear(), date.getMonth(), date.getDate());
8843
8888
  }
8844
- this.value.set(date);
8889
+ if (date?.toISOString() !== this.value()?.toISOString()) {
8890
+ this.value.set(date);
8891
+ }
8845
8892
  }
8846
8893
  _setDateInputAttributes() {
8847
8894
  const input = this.dateInput()?.nativeElement;
@@ -10319,9 +10366,9 @@ class ArdiumNumberInputComponent extends _FormFieldComponentBase {
10319
10366
  });
10320
10367
  // refresh input display when decimalSeparator changes
10321
10368
  effect(() => {
10322
- const sep = this.decimalSeparator();
10369
+ this.decimalSeparator();
10323
10370
  // calling rewrite ensures element value includes new separator
10324
- this.inputModel.rewriteValueAfterHostUpdate();
10371
+ untracked(() => this.inputModel.rewriteValueAfterHostUpdate());
10325
10372
  });
10326
10373
  }
10327
10374
  ngAfterViewInit() {
@@ -10669,10 +10716,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
10669
10716
  }]
10670
10717
  }] });
10671
10718
 
10719
+ function contextToInputs(context, component) {
10720
+ let allowed;
10721
+ return computed(() => {
10722
+ if (!component)
10723
+ return {};
10724
+ if (!allowed) {
10725
+ const meta = reflectComponentType(component);
10726
+ if (!meta)
10727
+ return {};
10728
+ allowed = new Set(meta.inputs.map(i => i.templateName));
10729
+ }
10730
+ return Object.fromEntries(Object.entries(context()).filter(([key]) => allowed.has(key)));
10731
+ });
10732
+ }
10733
+
10672
10734
  const _checkboxDefaults = {
10673
10735
  ..._booleanComponentDefaults,
10674
10736
  color: SimpleComponentColor.Primary,
10675
10737
  unselectedColor: SimpleComponentColor.None,
10738
+ CheckboxIconComponent: undefined,
10676
10739
  };
10677
10740
  const ARD_CHECKBOX_DEFAULTS = new InjectionToken('ard-checkbox-defaults', {
10678
10741
  factory: () => ({
@@ -10735,6 +10798,7 @@ class ArdiumCheckboxComponent extends _BooleanComponentBase {
10735
10798
  });
10736
10799
  this.State = CheckboxState;
10737
10800
  //! templates
10801
+ this.checkboxIconComponent = this._DEFAULTS.CheckboxIconComponent;
10738
10802
  this.templateRepository = contentChild(_CheckboxTemplateRepositoryDirective);
10739
10803
  this.checkboxTemplate = contentChild(ArdCheckboxTemplateDirective);
10740
10804
  this.checkboxTemplateContext = computed(() => ({
@@ -10744,6 +10808,7 @@ class ArdiumCheckboxComponent extends _BooleanComponentBase {
10744
10808
  state: this.state(),
10745
10809
  internalState: this.internalState(),
10746
10810
  }));
10811
+ this.checkboxIconInputs = contextToInputs(this.checkboxTemplateContext, this.checkboxIconComponent);
10747
10812
  }
10748
10813
  //override the "selected" setter, so it changes the state too.
10749
10814
  set _selected(v) {
@@ -10765,13 +10830,13 @@ class ArdiumCheckboxComponent extends _BooleanComponentBase {
10765
10830
  this._emitTouched();
10766
10831
  }
10767
10832
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumCheckboxComponent, deps: [{ token: ARD_CHECKBOX_DEFAULTS }], target: i0.ɵɵFactoryTarget.Component }); }
10768
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.15", type: ArdiumCheckboxComponent, isStandalone: false, selector: "ard-checkbox", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, unselectedColor: { classPropertyName: "unselectedColor", publicName: "unselectedColor", isSignal: true, isRequired: false, transformFunction: null }, internalState: { classPropertyName: "internalState", publicName: "state", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { internalState: "stateChange" }, providers: [
10833
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: ArdiumCheckboxComponent, isStandalone: false, selector: "ard-checkbox", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, unselectedColor: { classPropertyName: "unselectedColor", publicName: "unselectedColor", isSignal: true, isRequired: false, transformFunction: null }, internalState: { classPropertyName: "internalState", publicName: "state", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { internalState: "stateChange" }, providers: [
10769
10834
  {
10770
10835
  provide: NG_VALUE_ACCESSOR,
10771
10836
  useExisting: forwardRef(() => ArdiumCheckboxComponent),
10772
10837
  multi: true,
10773
10838
  },
10774
- ], queries: [{ propertyName: "templateRepository", first: true, predicate: _CheckboxTemplateRepositoryDirective, descendants: true, isSignal: true }, { propertyName: "checkboxTemplate", first: true, predicate: ArdCheckboxTemplateDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<button\r\n class=\"ard-checkbox\"\r\n role=\"checkbox\"\r\n type=\"button\"\r\n [attr.id]=\"htmlId()\"\r\n [attr.name]=\"htmlName()\"\r\n [attr.aria-checked]=\"selectedAccountingForReverse()\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n [tabindex]=\"tabIndex()\"\r\n [ngClass]=\"ngClasses()\"\r\n (click)=\"toggleState()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n>\r\n <div class=\"ard-hitbox\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n\r\n <ng-template\r\n #defaultCheckboxTemplate\r\n let-state=\"state\"\r\n let-selected=\"selected\"\r\n >\r\n <ard-icon\r\n [icon]=\"\r\n state === State.Selected\r\n ? 'check_box'\r\n : state === State.Unselected\r\n ? 'check_box_outline_blank'\r\n : 'indeterminate_check_box'\r\n \"\r\n [filled]=\"state !== State.Indeterminate\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"templateRepository()?.checkboxTmp()?.template ?? checkboxTemplate()?.template ?? defaultCheckboxTemplate\"\r\n [ngTemplateOutletContext]=\"checkboxTemplateContext()\"\r\n />\r\n</button>\r\n", styles: ["@layer ard-ui{ard-checkbox{display:block}.ard-checkbox{font-size:inherit}.ard-checkbox>ard-icon{font-size:1.5em}ard-checkbox.ard-readonly .ard-checkbox,ard-checkbox.ard-disabled .ard-checkbox{cursor:default}ard-checkbox.ard-readonly .ard-checkbox .ard-focus-overlay,ard-checkbox.ard-disabled .ard-checkbox .ard-focus-overlay{display:none}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
10839
+ ], queries: [{ propertyName: "templateRepository", first: true, predicate: _CheckboxTemplateRepositoryDirective, descendants: true, isSignal: true }, { propertyName: "checkboxTemplate", first: true, predicate: ArdCheckboxTemplateDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<button\r\n class=\"ard-checkbox\"\r\n role=\"checkbox\"\r\n type=\"button\"\r\n [attr.id]=\"htmlId()\"\r\n [attr.name]=\"htmlName()\"\r\n [attr.aria-checked]=\"selectedAccountingForReverse()\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n [tabindex]=\"tabIndex()\"\r\n [ngClass]=\"ngClasses()\"\r\n (click)=\"toggleState()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n>\r\n <div class=\"ard-hitbox\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n\r\n @if (checkboxIconComponent) {\r\n <!-- render the component -->\r\n <ng-template\r\n [ngComponentOutlet]=\"checkboxIconComponent\"\r\n [ngComponentOutletInputs]=\"checkboxIconInputs()\"\r\n />\r\n } @else {\r\n <ng-template\r\n #defaultCheckboxTemplate\r\n let-state=\"state\"\r\n let-selected=\"selected\"\r\n >\r\n <ard-icon\r\n [icon]=\"\r\n state === State.Selected\r\n ? 'check_box'\r\n : state === State.Unselected\r\n ? 'check_box_outline_blank'\r\n : 'indeterminate_check_box'\r\n \"\r\n [filled]=\"state !== State.Indeterminate\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"\r\n templateRepository()?.checkboxTmp()?.template ?? checkboxTemplate()?.template ?? defaultCheckboxTemplate\r\n \"\r\n [ngTemplateOutletContext]=\"checkboxTemplateContext()\"\r\n />\r\n }\r\n</button>\r\n", styles: ["@layer ard-ui{ard-checkbox{display:block}.ard-checkbox{font-size:inherit}.ard-checkbox>ard-icon{font-size:1.5em}ard-checkbox.ard-readonly .ard-checkbox,ard-checkbox.ard-disabled .ard-checkbox{cursor:default}ard-checkbox.ard-readonly .ard-checkbox .ard-focus-overlay,ard-checkbox.ard-disabled .ard-checkbox .ard-focus-overlay{display:none}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
10775
10840
  }
10776
10841
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumCheckboxComponent, decorators: [{
10777
10842
  type: Component,
@@ -10781,7 +10846,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
10781
10846
  useExisting: forwardRef(() => ArdiumCheckboxComponent),
10782
10847
  multi: true,
10783
10848
  },
10784
- ], template: "<button\r\n class=\"ard-checkbox\"\r\n role=\"checkbox\"\r\n type=\"button\"\r\n [attr.id]=\"htmlId()\"\r\n [attr.name]=\"htmlName()\"\r\n [attr.aria-checked]=\"selectedAccountingForReverse()\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n [tabindex]=\"tabIndex()\"\r\n [ngClass]=\"ngClasses()\"\r\n (click)=\"toggleState()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n>\r\n <div class=\"ard-hitbox\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n\r\n <ng-template\r\n #defaultCheckboxTemplate\r\n let-state=\"state\"\r\n let-selected=\"selected\"\r\n >\r\n <ard-icon\r\n [icon]=\"\r\n state === State.Selected\r\n ? 'check_box'\r\n : state === State.Unselected\r\n ? 'check_box_outline_blank'\r\n : 'indeterminate_check_box'\r\n \"\r\n [filled]=\"state !== State.Indeterminate\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"templateRepository()?.checkboxTmp()?.template ?? checkboxTemplate()?.template ?? defaultCheckboxTemplate\"\r\n [ngTemplateOutletContext]=\"checkboxTemplateContext()\"\r\n />\r\n</button>\r\n", styles: ["@layer ard-ui{ard-checkbox{display:block}.ard-checkbox{font-size:inherit}.ard-checkbox>ard-icon{font-size:1.5em}ard-checkbox.ard-readonly .ard-checkbox,ard-checkbox.ard-disabled .ard-checkbox{cursor:default}ard-checkbox.ard-readonly .ard-checkbox .ard-focus-overlay,ard-checkbox.ard-disabled .ard-checkbox .ard-focus-overlay{display:none}}\n"] }]
10849
+ ], template: "<button\r\n class=\"ard-checkbox\"\r\n role=\"checkbox\"\r\n type=\"button\"\r\n [attr.id]=\"htmlId()\"\r\n [attr.name]=\"htmlName()\"\r\n [attr.aria-checked]=\"selectedAccountingForReverse()\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n [tabindex]=\"tabIndex()\"\r\n [ngClass]=\"ngClasses()\"\r\n (click)=\"toggleState()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n>\r\n <div class=\"ard-hitbox\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n\r\n @if (checkboxIconComponent) {\r\n <!-- render the component -->\r\n <ng-template\r\n [ngComponentOutlet]=\"checkboxIconComponent\"\r\n [ngComponentOutletInputs]=\"checkboxIconInputs()\"\r\n />\r\n } @else {\r\n <ng-template\r\n #defaultCheckboxTemplate\r\n let-state=\"state\"\r\n let-selected=\"selected\"\r\n >\r\n <ard-icon\r\n [icon]=\"\r\n state === State.Selected\r\n ? 'check_box'\r\n : state === State.Unselected\r\n ? 'check_box_outline_blank'\r\n : 'indeterminate_check_box'\r\n \"\r\n [filled]=\"state !== State.Indeterminate\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"\r\n templateRepository()?.checkboxTmp()?.template ?? checkboxTemplate()?.template ?? defaultCheckboxTemplate\r\n \"\r\n [ngTemplateOutletContext]=\"checkboxTemplateContext()\"\r\n />\r\n }\r\n</button>\r\n", styles: ["@layer ard-ui{ard-checkbox{display:block}.ard-checkbox{font-size:inherit}.ard-checkbox>ard-icon{font-size:1.5em}ard-checkbox.ard-readonly .ard-checkbox,ard-checkbox.ard-disabled .ard-checkbox{cursor:default}ard-checkbox.ard-readonly .ard-checkbox .ard-focus-overlay,ard-checkbox.ard-disabled .ard-checkbox .ard-focus-overlay{display:none}}\n"] }]
10785
10850
  }], ctorParameters: () => [{ type: undefined, decorators: [{
10786
10851
  type: Inject,
10787
10852
  args: [ARD_CHECKBOX_DEFAULTS]