@ardium-ui/ui 3.3.0 → 3.4.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.
Files changed (32) hide show
  1. package/esm2022/lib/_internal/item-storages/simple-item-storage.mjs +1 -1
  2. package/esm2022/lib/_internal/selectable-list-component.mjs +1 -1
  3. package/esm2022/lib/checkbox-list/checkbox-list.component.mjs +1 -1
  4. package/esm2022/lib/file-inputs/file-input/file-input.component.mjs +3 -3
  5. package/esm2022/lib/file-inputs/file-input-base.mjs +1 -1
  6. package/esm2022/lib/inputs/digit-input/digit-input.component.mjs +84 -18
  7. package/esm2022/lib/inputs/digit-input/digit-input.defaults.mjs +4 -1
  8. package/esm2022/lib/inputs/digit-input/digit-input.model.mjs +31 -7
  9. package/esm2022/lib/inputs/digit-input/digit-input.module.mjs +5 -4
  10. package/esm2022/lib/inputs/digit-input/digit-input.types.mjs +1 -1
  11. package/esm2022/lib/inputs/digit-input/digit-input.utils.mjs +1 -1
  12. package/esm2022/lib/radio/radio/radio.component.mjs +1 -1
  13. package/esm2022/lib/radio/radio/radio.defaults.mjs +1 -1
  14. package/esm2022/lib/radio/radio-group.component.mjs +1 -1
  15. package/esm2022/lib/segment/segment.component.mjs +3 -3
  16. package/esm2022/lib/slider/range-slider/range-slider.component.mjs +1 -1
  17. package/fesm2022/ardium-ui-ui.mjs +121 -28
  18. package/fesm2022/ardium-ui-ui.mjs.map +1 -1
  19. package/lib/inputs/digit-input/digit-input.component.d.ts +16 -4
  20. package/lib/inputs/digit-input/digit-input.defaults.d.ts +4 -1
  21. package/lib/inputs/digit-input/digit-input.model.d.ts +2 -0
  22. package/lib/inputs/digit-input/digit-input.module.d.ts +2 -1
  23. package/lib/inputs/digit-input/digit-input.types.d.ts +3 -1
  24. package/lib/inputs/digit-input/digit-input.utils.d.ts +2 -0
  25. package/lib/slider/range-slider/range-slider.component.d.ts +1 -1
  26. package/package.json +1 -1
  27. package/prebuilt-themes/default/inputs/digit-input.css +1 -0
  28. package/prebuilt-themes/default/inputs/digit-input.css.map +1 -1
  29. package/themes/default/inputs/digit-input.scss +1 -0
  30. package/themes/default/inputs/file-input.scss +79 -79
  31. package/themes/default/inputs/input.scss +45 -45
  32. package/themes/default/inputs/simple-input.scss +11 -11
@@ -1,4 +1,5 @@
1
1
  import 'first-last';
2
+ import { AutofillMonitor, CdkAutofill } from '@angular/cdk/text-field';
2
3
  import * as i0 from '@angular/core';
3
4
  import { input, signal, Directive, Input, HostBinding, computed, output, ViewChildren, inject, Injector, runInInjectionContext, InjectionToken, effect, viewChildren, forwardRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, NgModule, viewChild, contentChild, ViewContainerRef, TemplateRef, HostListener, Pipe, model, ElementRef, ChangeDetectorRef, ContentChildren, ViewChild, ContentChild, contentChildren, Renderer2, Injectable } from '@angular/core';
4
5
  import { NgControl, Validators, NG_VALUE_ACCESSOR } from '@angular/forms';
@@ -336,6 +337,9 @@ const _digitInputDefaults = {
336
337
  shape: DigitInputShape.Square,
337
338
  compact: false,
338
339
  outputAsString: false,
340
+ transform: null,
341
+ inputAttrs: {},
342
+ autoFillParseFn: v => v,
339
343
  };
340
344
  const ARD_DIGIT_INPUT_DEFAULTS = new InjectionToken('ard-digit-input-defaults', {
341
345
  factory: () => ({
@@ -488,6 +492,29 @@ class DigitInputModel {
488
492
  }
489
493
  }));
490
494
  }
495
+ resetInputValue(index) {
496
+ if (index < 0 || index > this._configArray().length)
497
+ return;
498
+ const config = this._configArray()[index];
499
+ let newValue = '';
500
+ if ('static' in config) {
501
+ newValue = config.static;
502
+ }
503
+ //get the corresponding HTML input element
504
+ const inputEl = this._ardHost.inputs()[index];
505
+ if (!inputEl) {
506
+ throw new Error("ARD-IS0048: <ard-digit-input>'s value changed, but its corresponding input element could not be found. If you are reading this, you probably experienced a problem with Ardium UI. Please report this issue to the creators.");
507
+ }
508
+ //update the input element and value array
509
+ inputEl.nativeElement.value = newValue;
510
+ this.value.update(arr => {
511
+ if (!arr)
512
+ arr = [];
513
+ const newArr = [...arr];
514
+ newArr[index] = newValue || null;
515
+ return newArr;
516
+ });
517
+ }
491
518
  //! validate against the config
492
519
  validateInputAndSetValue(input, index) {
493
520
  if (index < 0 || index > this._configArray().length)
@@ -526,7 +553,7 @@ class DigitInputModel {
526
553
  return newArr;
527
554
  });
528
555
  //return changes marker and validated value
529
- return { wasChanged: newVal !== before, resultChar: inputChar };
556
+ return { wasChanged: newVal !== before, wasValidChar: !isNull(inputChar), resultChar: inputChar };
530
557
  }
531
558
  validateValueAndUpdate() {
532
559
  const v = this.value();
@@ -566,15 +593,16 @@ class DigitInputModel {
566
593
  if (!canAccept)
567
594
  return null;
568
595
  // transform if needed
569
- if (config.transform) {
570
- if (config.transform === TransformType.Lowercase) {
596
+ const transform = config.transform ?? this._ardHost.transform();
597
+ if (transform) {
598
+ if (transform === TransformType.Lowercase) {
571
599
  return char.toLowerCase();
572
600
  }
573
- if (config.transform === TransformType.Uppercase) {
601
+ if (transform === TransformType.Uppercase) {
574
602
  return char.toUpperCase();
575
603
  }
576
- if (isFunction(config.transform)) {
577
- return config.transform(char).charAt(0);
604
+ if (isFunction(transform)) {
605
+ return transform(char).charAt(0);
578
606
  }
579
607
  console.warn(`ARD-IS0049T: <ard-digit-input>'s value validator encountered an unexpected value of the config's "transform" property. Ardium UI was able to handle this issue, but please report it to the creators.`);
580
608
  }
@@ -585,8 +613,15 @@ class DigitInputModel {
585
613
  class ArdiumDigitInputComponent extends _FormFieldComponentBase {
586
614
  constructor(defaults) {
587
615
  super(defaults);
616
+ this._autoFillMonitor = inject(AutofillMonitor);
588
617
  //! inputs ref
589
618
  this.inputs = viewChildren('input');
619
+ this.inputAttrs = input(this._DEFAULTS.inputAttrs);
620
+ //! auto-fill
621
+ this.autoFillParseFn = input(this._DEFAULTS.autoFillParseFn);
622
+ this.isAutofilled = signal(false);
623
+ this._wasAutofillValueRead = signal(false);
624
+ this._autoFillSubs = [];
590
625
  //! data model
591
626
  this.model = new DigitInputModel(this);
592
627
  //! appearance
@@ -599,12 +634,14 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
599
634
  `ard-variant-${this.variant()}`,
600
635
  `ard-shape-${this.shape()}`,
601
636
  this.compact() ? 'ard-compact' : '',
637
+ this.isAutofilled() ? 'ard-autofilled' : '',
602
638
  ].join(' '));
603
639
  //! model access points
604
640
  this.config = input.required({
605
641
  transform: v => this.model.setConfig(v),
606
642
  });
607
643
  this.configArrayData = this.model.configArrayData;
644
+ this.transform = input(this._DEFAULTS.transform);
608
645
  this._oldConfigArrayDataLength = -1;
609
646
  this.configArrayDataEffect = effect(() => {
610
647
  if (this.configArrayData().length === this._oldConfigArrayDataLength)
@@ -628,6 +665,43 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
628
665
  this.focusIndexEvent = output({ alias: 'focusIndex' });
629
666
  this.blurIndexEvent = output({ alias: 'blurIndex' });
630
667
  }
668
+ _setInputAttributes() {
669
+ const inputs = this.inputs();
670
+ for (const input of inputs) {
671
+ const inputEl = input.nativeElement;
672
+ const attributes = {
673
+ autocorrect: 'off',
674
+ autocapitalize: 'off',
675
+ autocomplete: 'off',
676
+ ...this.inputAttrs(),
677
+ };
678
+ for (const key of Object.keys(attributes)) {
679
+ inputEl.setAttribute(key, attributes[key]);
680
+ }
681
+ }
682
+ }
683
+ _subscribeToAutoFillOnInputs() {
684
+ const inputs = this.inputs();
685
+ for (const input of inputs) {
686
+ const sub = this._autoFillMonitor.monitor(input).subscribe(event => {
687
+ this.isAutofilled.set(event.isAutofilled);
688
+ });
689
+ this._autoFillSubs.push(sub);
690
+ }
691
+ }
692
+ _unsubscribeFromAutoFill() {
693
+ const inputs = this.inputs();
694
+ for (const input of inputs) {
695
+ this._autoFillMonitor.stopMonitoring(input);
696
+ }
697
+ for (const sub of this._autoFillSubs) {
698
+ sub.unsubscribe();
699
+ }
700
+ }
701
+ ngOnDestroy() {
702
+ super.ngOnDestroy();
703
+ this._unsubscribeFromAutoFill();
704
+ }
631
705
  ngOnInit() {
632
706
  super.ngOnInit();
633
707
  this._oldConfigArrayDataLength = this.configArrayData().length;
@@ -650,6 +724,8 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
650
724
  if (this._valueBeforeViewInit) {
651
725
  this._writeValue(this._valueBeforeViewInit);
652
726
  }
727
+ this._setInputAttributes();
728
+ this._subscribeToAutoFillOnInputs();
653
729
  }
654
730
  set value(v) {
655
731
  this.writeValue(v);
@@ -661,28 +737,44 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
661
737
  event.preventDefault();
662
738
  if (!value)
663
739
  return;
664
- const maxLength = this.inputs().length - index;
740
+ this._handleMultiDigitChange(value, index);
741
+ }
742
+ onInput(event, index) {
743
+ const value = event.target.value;
744
+ if (this.isAutofilled()) {
745
+ if (!this._wasAutofillValueRead()) {
746
+ this._wasAutofillValueRead.set(true);
747
+ setTimeout(() => {
748
+ this._wasAutofillValueRead.set(false);
749
+ const parsedValue = this.autoFillParseFn()(value);
750
+ this._handleMultiDigitChange(parsedValue, 0);
751
+ }, 0);
752
+ }
753
+ return;
754
+ }
755
+ const wasValidCharacter = this._updateSingleInputValue(value, index);
756
+ if (!wasValidCharacter)
757
+ return;
758
+ this.focusByIndex(index + 1);
759
+ }
760
+ _handleMultiDigitChange(value, startIndex) {
761
+ const maxLength = this.inputs().length - startIndex;
665
762
  value
666
763
  .slice(0, maxLength)
667
764
  .split('')
668
765
  .forEach((char, i) => {
669
- this.model.validateInputAndSetValue(char, index + i);
766
+ this.model.resetInputValue(startIndex + i);
767
+ this.model.validateInputAndSetValue(char, startIndex + i);
670
768
  });
671
- this.focusByIndex(index - 1 + Math.min(value.length, maxLength));
769
+ this.focusByIndex(startIndex - 1 + Math.min(value.length, maxLength));
672
770
  this._emitChange();
673
771
  }
674
- onInput(event, index) {
675
- const changeSuccessful = this._updateSingleInputValue(event.target.value, index);
676
- if (!changeSuccessful)
677
- return;
678
- this.focusByIndex(index + 1);
679
- }
680
772
  _updateSingleInputValue(value, index) {
681
773
  const changeResult = this.model.validateInputAndSetValue(value, index);
682
- if (!changeResult?.wasChanged)
683
- return false;
684
- this._emitChange();
685
- return true;
774
+ if (changeResult?.wasChanged) {
775
+ this._emitChange();
776
+ }
777
+ return changeResult?.wasValidChar ?? false;
686
778
  }
687
779
  focusByIndex(index, tryFocusingNext, direction) {
688
780
  if (index < 0 || index >= this.inputs().length)
@@ -702,6 +794,7 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
702
794
  //focus, blur, change
703
795
  onFocusMaster(event, index) {
704
796
  this.focusIndexEvent.emit(index);
797
+ event.target.setSelectionRange(0, 1);
705
798
  this.onFocus(event);
706
799
  }
707
800
  onBlurMaster(event, index) {
@@ -740,7 +833,7 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
740
833
  }
741
834
  }
742
835
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumDigitInputComponent, deps: [{ token: ARD_DIGIT_INPUT_DEFAULTS }], target: i0.ɵɵFactoryTarget.Component }); }
743
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ArdiumDigitInputComponent, selector: "ard-digit-input", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, outputAsString: { classPropertyName: "outputAsString", publicName: "outputAsString", isSignal: true, isRequired: false, transformFunction: null }, outputControlValueAccessorOnFinish: { classPropertyName: "outputControlValueAccessorOnFinish", publicName: "outputControlValueAccessorOnFinish", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", finishedValue: "finishedValue", focusIndexEvent: "focusIndex", blurIndexEvent: "blurIndex" }, providers: [
836
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ArdiumDigitInputComponent, selector: "ard-digit-input", inputs: { inputAttrs: { classPropertyName: "inputAttrs", publicName: "inputAttrs", isSignal: true, isRequired: false, transformFunction: null }, autoFillParseFn: { classPropertyName: "autoFillParseFn", publicName: "autoFillParseFn", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, transform: { classPropertyName: "transform", publicName: "transform", isSignal: true, isRequired: false, transformFunction: null }, outputAsString: { classPropertyName: "outputAsString", publicName: "outputAsString", isSignal: true, isRequired: false, transformFunction: null }, outputControlValueAccessorOnFinish: { classPropertyName: "outputControlValueAccessorOnFinish", publicName: "outputControlValueAccessorOnFinish", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", finishedValue: "finishedValue", focusIndexEvent: "focusIndex", blurIndexEvent: "blurIndex" }, providers: [
744
837
  {
745
838
  provide: NG_VALUE_ACCESSOR,
746
839
  useExisting: forwardRef(() => ArdiumDigitInputComponent),
@@ -750,7 +843,7 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
750
843
  provide: _FormFieldComponentBase,
751
844
  useExisting: ArdiumDigitInputComponent,
752
845
  },
753
- ], viewQueries: [{ propertyName: "inputs", predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"ard-digit-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-error]=\"hasError()\"\r\n [class.ard-is-success]=\"isSuccess()\"\r\n>\r\n @for (data of configArrayData(); track $index) {\r\n <div\r\n class=\"ard-digit-input__item\"\r\n [class.ard-digit-input__item-with-input]=\"data.type === 'input'\"\r\n >\r\n @if (data.type === 'input') {\r\n <input\r\n #input\r\n #focusableElement\r\n class=\"ard-digit-input__input\"\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n [readonly]=\"data.readonly\"\r\n [placeholder]=\"data.placeholder\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [class.ard-digit-input__input-readonly]=\"data.readonly\"\r\n [class.ard-digit-input__input-empty]=\"isInputEmpty(data.index!)\"\r\n (paste)=\"onPaste($event, data.index!)\"\r\n (input)=\"onInput($event, data.index!)\"\r\n (focus)=\"onFocusMaster($event, data.index!)\"\r\n (blur)=\"onBlurMaster($event, data.index!)\"\r\n (keydown)=\"onKeydown($event, data.index!)\"\r\n />\r\n } @else {\r\n <div class=\"ard-digit-input__static\">\r\n {{ data.char }}\r\n </div>\r\n <input\r\n #input\r\n type=\"text\"\r\n class=\"ard-digit-input__static-input\"\r\n data-ard-static\r\n autocomplete=\"off\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n [value]=\"data.char\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".ard-digit-input__static-input{position:absolute;opacity:0;appearance:none;pointer-events:none;width:0;height:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
846
+ ], viewQueries: [{ propertyName: "inputs", predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"ard-digit-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-error]=\"hasError()\"\r\n [class.ard-is-success]=\"isSuccess()\"\r\n>\r\n @for (data of configArrayData(); track $index) {\r\n <div\r\n class=\"ard-digit-input__item\"\r\n [class.ard-digit-input__item-with-input]=\"data.type === 'input'\"\r\n >\r\n @if (data.type === 'input') {\r\n <input\r\n #input\r\n #focusableElement\r\n class=\"ard-digit-input__input\"\r\n type=\"text\"\r\n [readonly]=\"data.readonly\"\r\n [placeholder]=\"data.placeholder\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [class.ard-digit-input__input-readonly]=\"data.readonly\"\r\n [class.ard-digit-input__input-empty]=\"isInputEmpty(data.index!)\"\r\n (paste)=\"onPaste($event, data.index!)\"\r\n (input)=\"onInput($event, data.index!)\"\r\n (focus)=\"onFocusMaster($event, data.index!)\"\r\n (blur)=\"onBlurMaster($event, data.index!)\"\r\n (keydown)=\"onKeydown($event, data.index!)\"\r\n />\r\n } @else {\r\n <div class=\"ard-digit-input__static\">\r\n {{ data.char }}\r\n </div>\r\n <input\r\n #input\r\n type=\"text\"\r\n class=\"ard-digit-input__static-input\"\r\n data-ard-static\r\n autocomplete=\"off\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n [value]=\"data.char\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".ard-digit-input__static-input{position:absolute;opacity:0;appearance:none;pointer-events:none;width:0;height:0}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
754
847
  }
755
848
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumDigitInputComponent, decorators: [{
756
849
  type: Component,
@@ -764,7 +857,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
764
857
  provide: _FormFieldComponentBase,
765
858
  useExisting: ArdiumDigitInputComponent,
766
859
  },
767
- ], template: "<div\r\n class=\"ard-digit-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-error]=\"hasError()\"\r\n [class.ard-is-success]=\"isSuccess()\"\r\n>\r\n @for (data of configArrayData(); track $index) {\r\n <div\r\n class=\"ard-digit-input__item\"\r\n [class.ard-digit-input__item-with-input]=\"data.type === 'input'\"\r\n >\r\n @if (data.type === 'input') {\r\n <input\r\n #input\r\n #focusableElement\r\n class=\"ard-digit-input__input\"\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n [readonly]=\"data.readonly\"\r\n [placeholder]=\"data.placeholder\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [class.ard-digit-input__input-readonly]=\"data.readonly\"\r\n [class.ard-digit-input__input-empty]=\"isInputEmpty(data.index!)\"\r\n (paste)=\"onPaste($event, data.index!)\"\r\n (input)=\"onInput($event, data.index!)\"\r\n (focus)=\"onFocusMaster($event, data.index!)\"\r\n (blur)=\"onBlurMaster($event, data.index!)\"\r\n (keydown)=\"onKeydown($event, data.index!)\"\r\n />\r\n } @else {\r\n <div class=\"ard-digit-input__static\">\r\n {{ data.char }}\r\n </div>\r\n <input\r\n #input\r\n type=\"text\"\r\n class=\"ard-digit-input__static-input\"\r\n data-ard-static\r\n autocomplete=\"off\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n [value]=\"data.char\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".ard-digit-input__static-input{position:absolute;opacity:0;appearance:none;pointer-events:none;width:0;height:0}\n"] }]
860
+ ], template: "<div\r\n class=\"ard-digit-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-error]=\"hasError()\"\r\n [class.ard-is-success]=\"isSuccess()\"\r\n>\r\n @for (data of configArrayData(); track $index) {\r\n <div\r\n class=\"ard-digit-input__item\"\r\n [class.ard-digit-input__item-with-input]=\"data.type === 'input'\"\r\n >\r\n @if (data.type === 'input') {\r\n <input\r\n #input\r\n #focusableElement\r\n class=\"ard-digit-input__input\"\r\n type=\"text\"\r\n [readonly]=\"data.readonly\"\r\n [placeholder]=\"data.placeholder\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [class.ard-digit-input__input-readonly]=\"data.readonly\"\r\n [class.ard-digit-input__input-empty]=\"isInputEmpty(data.index!)\"\r\n (paste)=\"onPaste($event, data.index!)\"\r\n (input)=\"onInput($event, data.index!)\"\r\n (focus)=\"onFocusMaster($event, data.index!)\"\r\n (blur)=\"onBlurMaster($event, data.index!)\"\r\n (keydown)=\"onKeydown($event, data.index!)\"\r\n />\r\n } @else {\r\n <div class=\"ard-digit-input__static\">\r\n {{ data.char }}\r\n </div>\r\n <input\r\n #input\r\n type=\"text\"\r\n class=\"ard-digit-input__static-input\"\r\n data-ard-static\r\n autocomplete=\"off\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n [value]=\"data.char\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".ard-digit-input__static-input{position:absolute;opacity:0;appearance:none;pointer-events:none;width:0;height:0}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}\n"] }]
768
861
  }], ctorParameters: () => [{ type: undefined, decorators: [{
769
862
  type: Inject,
770
863
  args: [ARD_DIGIT_INPUT_DEFAULTS]
@@ -774,14 +867,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
774
867
 
775
868
  class ArdiumDigitInputModule {
776
869
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumDigitInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
777
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ArdiumDigitInputModule, declarations: [ArdiumDigitInputComponent], imports: [CommonModule], exports: [ArdiumDigitInputComponent] }); }
870
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ArdiumDigitInputModule, declarations: [ArdiumDigitInputComponent], imports: [CommonModule, CdkAutofill], exports: [ArdiumDigitInputComponent] }); }
778
871
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumDigitInputModule, imports: [CommonModule] }); }
779
872
  }
780
873
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumDigitInputModule, decorators: [{
781
874
  type: NgModule,
782
875
  args: [{
783
876
  declarations: [ArdiumDigitInputComponent],
784
- imports: [CommonModule],
877
+ imports: [CommonModule, CdkAutofill],
785
878
  exports: [ArdiumDigitInputComponent],
786
879
  }]
787
880
  }] });
@@ -5143,7 +5236,7 @@ class ArdiumFileInputComponent extends _FileInputComponentBase {
5143
5236
  useExisting: forwardRef(() => ArdiumFileInputComponent),
5144
5237
  multi: true,
5145
5238
  },
5146
- ], queries: [{ propertyName: "placeholderTemplate", first: true, predicate: ArdFileInputPlaceholderTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "prefixTemplate", first: true, predicate: ArdFileInputPrefixTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "suffixTemplate", first: true, predicate: ArdFileInputSuffixTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "idleTemplate", first: true, predicate: ArdiumFileInputIdleContentTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "dragoverTemplate", first: true, predicate: ArdiumFileInputDragoverContentTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "uploadedTemplate", first: true, predicate: ArdiumFileInputUploadedContentTemplateDirective, descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<ard-form-field-frame\n class=\"ard-file-input-form-field-frame\"\n [appearance]=\"appearance()\"\n [variant]=\"variant()\"\n [compact]=\"compact()\"\n [isFocused]=\"isFocused()\"\n [prefixTemplate]=\"prefixTemplate\"\n [suffixTemplate]=\"suffixTemplate\"\n (dragover)=\"onDragover($event)\"\n (dragleave)=\"onDragleave()\"\n (drop)=\"onDrop($event)\"\n (ardClickOutside)=\"onDragleave()\"\n>\n <div\n class=\"ard-file-input\"\n [ngClass]=\"ngClasses()\"\n >\n <div class=\"ard-input-container\">\n @if (shouldDisplayPlaceholder) {\n <ng-template #defaultPlaceholderTemplate>\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\n </ng-template>\n\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\" />\n }\n\n <div class=\"ard-file-input__value\">\n @if (currentViewState() === 'idle') {\n <ng-template\n [ngTemplateOutlet]=\"idleTemplate ?? defaultIdleTemplate\"\n [ngTemplateOutletContext]=\"getIdleContext()\"\n />\n }\n @if (currentViewState() === 'dragover') {\n <ng-template\n [ngTemplateOutlet]=\"dragoverTemplate ?? defaultDragoverTemplate\"\n [ngTemplateOutletContext]=\"getDragoverContext()\"\n />\n }\n @if (currentViewState() === 'uploaded') {\n <ng-template\n [ngTemplateOutlet]=\"uploadedTemplate ?? defaultUploadedTemplate\"\n [ngTemplateOutletContext]=\"getUploadedContext()\"\n />\n }\n </div>\n </div>\n\n @if (shouldShowClearButton) {\n <ard-clear-button\n #focusableElement\n [title]=\"clearButtonTitle()\"\n (mouseup)=\"onClearButtonClick($event)\"\n />\n }\n @if (!shouldBeBlocked) {\n <button\n #focusableElement\n type=\"button\"\n class=\"ard-browse-button\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (click)=\"openBrowseDialog()\"\n >\n <div class=\"ard-focus-overlay\"></div>\n <ard-icon>folder</ard-icon>\n </button>\n }\n </div>\n</ard-form-field-frame>\n\n<input\n #fileInput\n class=\"ard-file-input__input\"\n type=\"file\"\n [name]=\"name()\"\n [multiple]=\"multiple()\"\n [attr.id]=\"htmlId()\"\n (change)=\"onInputChange()\"\n/>\n\n<ng-template\n #defaultIdleTemplate\n let-browse=\"browse\"\n>\n <span class=\"ard-file-input__idle\">\n @if (multiple()) {\n <span>Upload a file</span>\n } @else {\n <span>Upload files</span>\n }\n </span>\n</ng-template>\n\n<ng-template\n #defaultDragoverTemplate\n let-amount=\"amount\"\n>\n <span class=\"ard-file-input__dragover-text\">Drop </span>\n @if (multiple()) {\n <span class=\"ard-file-input__dragover-amount\">\n {{ amount }}\n <ng-container [ngPlural]=\"amount\">\n <ng-template ngPluralCase=\"=1\">file</ng-template>\n <ng-template ngPluralCase=\"other\">files</ng-template>\n </ng-container>\n </span>\n } @else {\n <span class=\"ard-file-input__dragover-amount\"> a file </span>\n }\n <span class=\"ard-file-input__dragover-text\"> here to upload </span>\n</ng-template>\n\n<ng-template\n #defaultUploadedTemplate\n let-amount=\"amount\"\n>\n <div class=\"ard-file-input__uploaded\">\n <span class=\"ard-file-input__uploaded-amount\">\n {{ amount }}\n <ng-container [ngPlural]=\"amount\">\n <ng-template ngPluralCase=\"=1\">file</ng-template>\n <ng-template ngPluralCase=\"other\">files</ng-template>\n </ng-container>\n </span>\n <span class=\"ard-file-input__uploaded-text\"> uploaded.</span>\n </div>\n</ng-template>\n", styles: [".ard-file-input__input{position:absolute;appearance:none;opacity:0;pointer-events: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: "directive", type: i1.NgPlural, selector: "[ngPlural]", inputs: ["ngPlural"] }, { kind: "directive", type: i1.NgPluralCase, selector: "[ngPluralCase]" }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isSuccess", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }, { kind: "component", type: _ClearButtonComponent, selector: "ard-clear-button" }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
5239
+ ], queries: [{ propertyName: "placeholderTemplate", first: true, predicate: ArdFileInputPlaceholderTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "prefixTemplate", first: true, predicate: ArdFileInputPrefixTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "suffixTemplate", first: true, predicate: ArdFileInputSuffixTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "idleTemplate", first: true, predicate: ArdiumFileInputIdleContentTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "dragoverTemplate", first: true, predicate: ArdiumFileInputDragoverContentTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "uploadedTemplate", first: true, predicate: ArdiumFileInputUploadedContentTemplateDirective, descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<ard-form-field-frame\r\n class=\"ard-file-input-form-field-frame\"\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused()\"\r\n [prefixTemplate]=\"prefixTemplate\"\r\n [suffixTemplate]=\"suffixTemplate\"\r\n (dragover)=\"onDragover($event)\"\r\n (dragleave)=\"onDragleave()\"\r\n (drop)=\"onDrop($event)\"\r\n (ardClickOutside)=\"onDragleave()\"\r\n>\r\n <div\r\n class=\"ard-file-input\"\r\n [ngClass]=\"ngClasses()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\" />\r\n }\r\n\r\n <div class=\"ard-file-input__value\">\r\n @if (currentViewState() === 'idle') {\r\n <ng-template\r\n [ngTemplateOutlet]=\"idleTemplate ?? defaultIdleTemplate\"\r\n [ngTemplateOutletContext]=\"getIdleContext()\"\r\n />\r\n }\r\n @if (currentViewState() === 'dragover') {\r\n <ng-template\r\n [ngTemplateOutlet]=\"dragoverTemplate ?? defaultDragoverTemplate\"\r\n [ngTemplateOutletContext]=\"getDragoverContext()\"\r\n />\r\n }\r\n @if (currentViewState() === 'uploaded') {\r\n <ng-template\r\n [ngTemplateOutlet]=\"uploadedTemplate ?? defaultUploadedTemplate\"\r\n [ngTemplateOutletContext]=\"getUploadedContext()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (shouldShowClearButton) {\r\n <ard-clear-button\r\n #focusableElement\r\n [title]=\"clearButtonTitle()\"\r\n (mouseup)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n @if (!shouldBeBlocked) {\r\n <button\r\n #focusableElement\r\n type=\"button\"\r\n class=\"ard-browse-button\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (click)=\"openBrowseDialog()\"\r\n >\r\n <div class=\"ard-focus-overlay\"></div>\r\n <ard-icon>folder</ard-icon>\r\n </button>\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<input\r\n #fileInput\r\n class=\"ard-file-input__input\"\r\n type=\"file\"\r\n [name]=\"name()\"\r\n [multiple]=\"multiple()\"\r\n [attr.id]=\"htmlId()\"\r\n (change)=\"onInputChange()\"\r\n/>\r\n\r\n<ng-template\r\n #defaultIdleTemplate\r\n let-browse=\"browse\"\r\n>\r\n <span class=\"ard-file-input__idle\">\r\n @if (multiple()) {\r\n <span>Upload a file</span>\r\n } @else {\r\n <span>Upload files</span>\r\n }\r\n </span>\r\n</ng-template>\r\n\r\n<ng-template\r\n #defaultDragoverTemplate\r\n let-amount=\"amount\"\r\n>\r\n <span class=\"ard-file-input__dragover-text\">Drop </span>\r\n @if (multiple()) {\r\n <span class=\"ard-file-input__dragover-amount\">\r\n {{ amount }}\r\n <ng-container [ngPlural]=\"amount\">\r\n <ng-template ngPluralCase=\"=1\">file</ng-template>\r\n <ng-template ngPluralCase=\"other\">files</ng-template>\r\n </ng-container>\r\n </span>\r\n } @else {\r\n <span class=\"ard-file-input__dragover-amount\"> a file </span>\r\n }\r\n <span class=\"ard-file-input__dragover-text\"> here to upload </span>\r\n</ng-template>\r\n\r\n<ng-template\r\n #defaultUploadedTemplate\r\n let-amount=\"amount\"\r\n>\r\n <div class=\"ard-file-input__uploaded\">\r\n <span class=\"ard-file-input__uploaded-amount\">\r\n {{ amount }}\r\n <ng-container [ngPlural]=\"amount\">\r\n <ng-template ngPluralCase=\"=1\">file</ng-template>\r\n <ng-template ngPluralCase=\"other\">files</ng-template>\r\n </ng-container>\r\n </span>\r\n <span class=\"ard-file-input__uploaded-text\"> uploaded.</span>\r\n </div>\r\n</ng-template>\r\n", styles: [".ard-file-input__input{position:absolute;appearance:none;opacity:0;pointer-events: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: "directive", type: i1.NgPlural, selector: "[ngPlural]", inputs: ["ngPlural"] }, { kind: "directive", type: i1.NgPluralCase, selector: "[ngPluralCase]" }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isSuccess", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }, { kind: "component", type: _ClearButtonComponent, selector: "ard-clear-button" }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
5147
5240
  }
5148
5241
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumFileInputComponent, decorators: [{
5149
5242
  type: Component,
@@ -5153,7 +5246,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5153
5246
  useExisting: forwardRef(() => ArdiumFileInputComponent),
5154
5247
  multi: true,
5155
5248
  },
5156
- ], template: "<ard-form-field-frame\n class=\"ard-file-input-form-field-frame\"\n [appearance]=\"appearance()\"\n [variant]=\"variant()\"\n [compact]=\"compact()\"\n [isFocused]=\"isFocused()\"\n [prefixTemplate]=\"prefixTemplate\"\n [suffixTemplate]=\"suffixTemplate\"\n (dragover)=\"onDragover($event)\"\n (dragleave)=\"onDragleave()\"\n (drop)=\"onDrop($event)\"\n (ardClickOutside)=\"onDragleave()\"\n>\n <div\n class=\"ard-file-input\"\n [ngClass]=\"ngClasses()\"\n >\n <div class=\"ard-input-container\">\n @if (shouldDisplayPlaceholder) {\n <ng-template #defaultPlaceholderTemplate>\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\n </ng-template>\n\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\" />\n }\n\n <div class=\"ard-file-input__value\">\n @if (currentViewState() === 'idle') {\n <ng-template\n [ngTemplateOutlet]=\"idleTemplate ?? defaultIdleTemplate\"\n [ngTemplateOutletContext]=\"getIdleContext()\"\n />\n }\n @if (currentViewState() === 'dragover') {\n <ng-template\n [ngTemplateOutlet]=\"dragoverTemplate ?? defaultDragoverTemplate\"\n [ngTemplateOutletContext]=\"getDragoverContext()\"\n />\n }\n @if (currentViewState() === 'uploaded') {\n <ng-template\n [ngTemplateOutlet]=\"uploadedTemplate ?? defaultUploadedTemplate\"\n [ngTemplateOutletContext]=\"getUploadedContext()\"\n />\n }\n </div>\n </div>\n\n @if (shouldShowClearButton) {\n <ard-clear-button\n #focusableElement\n [title]=\"clearButtonTitle()\"\n (mouseup)=\"onClearButtonClick($event)\"\n />\n }\n @if (!shouldBeBlocked) {\n <button\n #focusableElement\n type=\"button\"\n class=\"ard-browse-button\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (click)=\"openBrowseDialog()\"\n >\n <div class=\"ard-focus-overlay\"></div>\n <ard-icon>folder</ard-icon>\n </button>\n }\n </div>\n</ard-form-field-frame>\n\n<input\n #fileInput\n class=\"ard-file-input__input\"\n type=\"file\"\n [name]=\"name()\"\n [multiple]=\"multiple()\"\n [attr.id]=\"htmlId()\"\n (change)=\"onInputChange()\"\n/>\n\n<ng-template\n #defaultIdleTemplate\n let-browse=\"browse\"\n>\n <span class=\"ard-file-input__idle\">\n @if (multiple()) {\n <span>Upload a file</span>\n } @else {\n <span>Upload files</span>\n }\n </span>\n</ng-template>\n\n<ng-template\n #defaultDragoverTemplate\n let-amount=\"amount\"\n>\n <span class=\"ard-file-input__dragover-text\">Drop </span>\n @if (multiple()) {\n <span class=\"ard-file-input__dragover-amount\">\n {{ amount }}\n <ng-container [ngPlural]=\"amount\">\n <ng-template ngPluralCase=\"=1\">file</ng-template>\n <ng-template ngPluralCase=\"other\">files</ng-template>\n </ng-container>\n </span>\n } @else {\n <span class=\"ard-file-input__dragover-amount\"> a file </span>\n }\n <span class=\"ard-file-input__dragover-text\"> here to upload </span>\n</ng-template>\n\n<ng-template\n #defaultUploadedTemplate\n let-amount=\"amount\"\n>\n <div class=\"ard-file-input__uploaded\">\n <span class=\"ard-file-input__uploaded-amount\">\n {{ amount }}\n <ng-container [ngPlural]=\"amount\">\n <ng-template ngPluralCase=\"=1\">file</ng-template>\n <ng-template ngPluralCase=\"other\">files</ng-template>\n </ng-container>\n </span>\n <span class=\"ard-file-input__uploaded-text\"> uploaded.</span>\n </div>\n</ng-template>\n", styles: [".ard-file-input__input{position:absolute;appearance:none;opacity:0;pointer-events:none}\n"] }]
5249
+ ], template: "<ard-form-field-frame\r\n class=\"ard-file-input-form-field-frame\"\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused()\"\r\n [prefixTemplate]=\"prefixTemplate\"\r\n [suffixTemplate]=\"suffixTemplate\"\r\n (dragover)=\"onDragover($event)\"\r\n (dragleave)=\"onDragleave()\"\r\n (drop)=\"onDrop($event)\"\r\n (ardClickOutside)=\"onDragleave()\"\r\n>\r\n <div\r\n class=\"ard-file-input\"\r\n [ngClass]=\"ngClasses()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\" />\r\n }\r\n\r\n <div class=\"ard-file-input__value\">\r\n @if (currentViewState() === 'idle') {\r\n <ng-template\r\n [ngTemplateOutlet]=\"idleTemplate ?? defaultIdleTemplate\"\r\n [ngTemplateOutletContext]=\"getIdleContext()\"\r\n />\r\n }\r\n @if (currentViewState() === 'dragover') {\r\n <ng-template\r\n [ngTemplateOutlet]=\"dragoverTemplate ?? defaultDragoverTemplate\"\r\n [ngTemplateOutletContext]=\"getDragoverContext()\"\r\n />\r\n }\r\n @if (currentViewState() === 'uploaded') {\r\n <ng-template\r\n [ngTemplateOutlet]=\"uploadedTemplate ?? defaultUploadedTemplate\"\r\n [ngTemplateOutletContext]=\"getUploadedContext()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (shouldShowClearButton) {\r\n <ard-clear-button\r\n #focusableElement\r\n [title]=\"clearButtonTitle()\"\r\n (mouseup)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n @if (!shouldBeBlocked) {\r\n <button\r\n #focusableElement\r\n type=\"button\"\r\n class=\"ard-browse-button\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (click)=\"openBrowseDialog()\"\r\n >\r\n <div class=\"ard-focus-overlay\"></div>\r\n <ard-icon>folder</ard-icon>\r\n </button>\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<input\r\n #fileInput\r\n class=\"ard-file-input__input\"\r\n type=\"file\"\r\n [name]=\"name()\"\r\n [multiple]=\"multiple()\"\r\n [attr.id]=\"htmlId()\"\r\n (change)=\"onInputChange()\"\r\n/>\r\n\r\n<ng-template\r\n #defaultIdleTemplate\r\n let-browse=\"browse\"\r\n>\r\n <span class=\"ard-file-input__idle\">\r\n @if (multiple()) {\r\n <span>Upload a file</span>\r\n } @else {\r\n <span>Upload files</span>\r\n }\r\n </span>\r\n</ng-template>\r\n\r\n<ng-template\r\n #defaultDragoverTemplate\r\n let-amount=\"amount\"\r\n>\r\n <span class=\"ard-file-input__dragover-text\">Drop </span>\r\n @if (multiple()) {\r\n <span class=\"ard-file-input__dragover-amount\">\r\n {{ amount }}\r\n <ng-container [ngPlural]=\"amount\">\r\n <ng-template ngPluralCase=\"=1\">file</ng-template>\r\n <ng-template ngPluralCase=\"other\">files</ng-template>\r\n </ng-container>\r\n </span>\r\n } @else {\r\n <span class=\"ard-file-input__dragover-amount\"> a file </span>\r\n }\r\n <span class=\"ard-file-input__dragover-text\"> here to upload </span>\r\n</ng-template>\r\n\r\n<ng-template\r\n #defaultUploadedTemplate\r\n let-amount=\"amount\"\r\n>\r\n <div class=\"ard-file-input__uploaded\">\r\n <span class=\"ard-file-input__uploaded-amount\">\r\n {{ amount }}\r\n <ng-container [ngPlural]=\"amount\">\r\n <ng-template ngPluralCase=\"=1\">file</ng-template>\r\n <ng-template ngPluralCase=\"other\">files</ng-template>\r\n </ng-container>\r\n </span>\r\n <span class=\"ard-file-input__uploaded-text\"> uploaded.</span>\r\n </div>\r\n</ng-template>\r\n", styles: [".ard-file-input__input{position:absolute;appearance:none;opacity:0;pointer-events:none}\n"] }]
5157
5250
  }], ctorParameters: () => [{ type: undefined, decorators: [{
5158
5251
  type: Inject,
5159
5252
  args: [ARD_FILE_INPUT_DEFAULTS]
@@ -7081,7 +7174,7 @@ class ArdiumSegmentComponent extends _SelectableListComponentBase {
7081
7174
  provide: _FormFieldComponentBase,
7082
7175
  useExisting: ArdiumSegmentComponent,
7083
7176
  },
7084
- ], queries: [{ propertyName: "optionTemplate", first: true, predicate: ArdSegmentOptionTemplateDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n #focusableElement\n class=\"ard-segment-container\"\n [class.ard-disabled]=\"disabled()\"\n [ariaDisabled]=\"disabled()\"\n [ngClass]=\"ngClasses()\"\n [class.ard-focus-visible]=\"isFocused() && !isMouseBeingUsed\"\n [class.ard-using-keyboard]=\"!isMouseBeingUsed\"\n [attr.tabindex]=\"tabIndex()\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n>\n @for (row of itemRows(); track $index) {\n <div\n class=\"ard-segment-row\"\n [class.ard-segment-row-partial]=\"row.isNotFull\"\n [class.ard-segment-row-uniform]=\"uniformWidths() || itemsPerRow() < items.length\"\n [style]=\"{ '--ard-_segment-row-items': itemsInActualRow }\"\n >\n @for (option of row.options; track $index) {\n <button\n type=\"button\"\n class=\"ard-segment-option\"\n tabindex=\"-1\"\n [class.ard-option-disabled]=\"option.disabled() || (isItemLimitReached() && !option.selected())\"\n [class.ard-option-selected]=\"option.selected()\"\n [class.ard-option-highlighted]=\"option.highlighted()\"\n [ariaSelected]=\"option.selected()\"\n (mouseenter)=\"onItemMouseEnter(option, $event)\"\n (mouseleave)=\"onItemMouseLeave(option, $event)\"\n (click)=\"onItemClick(option, $event)\"\n >\n <div class=\"ard-focus-overlay\"></div>\n <div class=\"ard-button-content\">\n <span class=\"ard-option-label\">\n <ng-template #defaultOptionTemplate>\n {{ option.label() }}\n </ng-template>\n\n <ng-template\n [ngTemplateOutlet]=\"optionTemplate()?.template || defaultOptionTemplate\"\n [ngTemplateOutletContext]=\"getOptionContext(option)\"\n />\n </span>\n </div>\n </button>\n }\n </div>\n }\n</div>\n", styles: [".ard-segment-container{display:flex;flex-direction:column}.ard-segment-container.ard-align-left .ard-segment-option{justify-content:left}.ard-segment-container.ard-align-middle .ard-segment-option{justify-content:center}.ard-segment-container.ard-align-right .ard-segment-option{justify-content:right}.ard-segment-row{width:100%;display:flex;align-items:center}.ard-segment-row.ard-segment-row-uniform{display:grid;grid-template-columns:repeat(var(--ard-_segment-row-items),1fr)}.ard-segment-option{-webkit-user-select:none;user-select:none}.ard-option-disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
7177
+ ], queries: [{ propertyName: "optionTemplate", first: true, predicate: ArdSegmentOptionTemplateDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n #focusableElement\r\n class=\"ard-segment-container\"\r\n [class.ard-disabled]=\"disabled()\"\r\n [ariaDisabled]=\"disabled()\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-focus-visible]=\"isFocused() && !isMouseBeingUsed\"\r\n [class.ard-using-keyboard]=\"!isMouseBeingUsed\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n>\r\n @for (row of itemRows(); track $index) {\r\n <div\r\n class=\"ard-segment-row\"\r\n [class.ard-segment-row-partial]=\"row.isNotFull\"\r\n [class.ard-segment-row-uniform]=\"uniformWidths() || itemsPerRow() < items.length\"\r\n [style]=\"{ '--ard-_segment-row-items': itemsInActualRow }\"\r\n >\r\n @for (option of row.options; track $index) {\r\n <button\r\n type=\"button\"\r\n class=\"ard-segment-option\"\r\n tabindex=\"-1\"\r\n [class.ard-option-disabled]=\"option.disabled() || (isItemLimitReached() && !option.selected())\"\r\n [class.ard-option-selected]=\"option.selected()\"\r\n [class.ard-option-highlighted]=\"option.highlighted()\"\r\n [ariaSelected]=\"option.selected()\"\r\n (mouseenter)=\"onItemMouseEnter(option, $event)\"\r\n (mouseleave)=\"onItemMouseLeave(option, $event)\"\r\n (click)=\"onItemClick(option, $event)\"\r\n >\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <span class=\"ard-option-label\">\r\n <ng-template #defaultOptionTemplate>\r\n {{ option.label() }}\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"optionTemplate()?.template || defaultOptionTemplate\"\r\n [ngTemplateOutletContext]=\"getOptionContext(option)\"\r\n />\r\n </span>\r\n </div>\r\n </button>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".ard-segment-container{display:flex;flex-direction:column}.ard-segment-container.ard-align-left .ard-segment-option{justify-content:left}.ard-segment-container.ard-align-middle .ard-segment-option{justify-content:center}.ard-segment-container.ard-align-right .ard-segment-option{justify-content:right}.ard-segment-row{width:100%;display:flex;align-items:center}.ard-segment-row.ard-segment-row-uniform{display:grid;grid-template-columns:repeat(var(--ard-_segment-row-items),1fr)}.ard-segment-option{-webkit-user-select:none;user-select:none}.ard-option-disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
7085
7178
  }
7086
7179
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumSegmentComponent, decorators: [{
7087
7180
  type: Component,
@@ -7095,7 +7188,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
7095
7188
  provide: _FormFieldComponentBase,
7096
7189
  useExisting: ArdiumSegmentComponent,
7097
7190
  },
7098
- ], template: "<div\n #focusableElement\n class=\"ard-segment-container\"\n [class.ard-disabled]=\"disabled()\"\n [ariaDisabled]=\"disabled()\"\n [ngClass]=\"ngClasses()\"\n [class.ard-focus-visible]=\"isFocused() && !isMouseBeingUsed\"\n [class.ard-using-keyboard]=\"!isMouseBeingUsed\"\n [attr.tabindex]=\"tabIndex()\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n>\n @for (row of itemRows(); track $index) {\n <div\n class=\"ard-segment-row\"\n [class.ard-segment-row-partial]=\"row.isNotFull\"\n [class.ard-segment-row-uniform]=\"uniformWidths() || itemsPerRow() < items.length\"\n [style]=\"{ '--ard-_segment-row-items': itemsInActualRow }\"\n >\n @for (option of row.options; track $index) {\n <button\n type=\"button\"\n class=\"ard-segment-option\"\n tabindex=\"-1\"\n [class.ard-option-disabled]=\"option.disabled() || (isItemLimitReached() && !option.selected())\"\n [class.ard-option-selected]=\"option.selected()\"\n [class.ard-option-highlighted]=\"option.highlighted()\"\n [ariaSelected]=\"option.selected()\"\n (mouseenter)=\"onItemMouseEnter(option, $event)\"\n (mouseleave)=\"onItemMouseLeave(option, $event)\"\n (click)=\"onItemClick(option, $event)\"\n >\n <div class=\"ard-focus-overlay\"></div>\n <div class=\"ard-button-content\">\n <span class=\"ard-option-label\">\n <ng-template #defaultOptionTemplate>\n {{ option.label() }}\n </ng-template>\n\n <ng-template\n [ngTemplateOutlet]=\"optionTemplate()?.template || defaultOptionTemplate\"\n [ngTemplateOutletContext]=\"getOptionContext(option)\"\n />\n </span>\n </div>\n </button>\n }\n </div>\n }\n</div>\n", styles: [".ard-segment-container{display:flex;flex-direction:column}.ard-segment-container.ard-align-left .ard-segment-option{justify-content:left}.ard-segment-container.ard-align-middle .ard-segment-option{justify-content:center}.ard-segment-container.ard-align-right .ard-segment-option{justify-content:right}.ard-segment-row{width:100%;display:flex;align-items:center}.ard-segment-row.ard-segment-row-uniform{display:grid;grid-template-columns:repeat(var(--ard-_segment-row-items),1fr)}.ard-segment-option{-webkit-user-select:none;user-select:none}.ard-option-disabled{pointer-events:none}\n"] }]
7191
+ ], template: "<div\r\n #focusableElement\r\n class=\"ard-segment-container\"\r\n [class.ard-disabled]=\"disabled()\"\r\n [ariaDisabled]=\"disabled()\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-focus-visible]=\"isFocused() && !isMouseBeingUsed\"\r\n [class.ard-using-keyboard]=\"!isMouseBeingUsed\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n>\r\n @for (row of itemRows(); track $index) {\r\n <div\r\n class=\"ard-segment-row\"\r\n [class.ard-segment-row-partial]=\"row.isNotFull\"\r\n [class.ard-segment-row-uniform]=\"uniformWidths() || itemsPerRow() < items.length\"\r\n [style]=\"{ '--ard-_segment-row-items': itemsInActualRow }\"\r\n >\r\n @for (option of row.options; track $index) {\r\n <button\r\n type=\"button\"\r\n class=\"ard-segment-option\"\r\n tabindex=\"-1\"\r\n [class.ard-option-disabled]=\"option.disabled() || (isItemLimitReached() && !option.selected())\"\r\n [class.ard-option-selected]=\"option.selected()\"\r\n [class.ard-option-highlighted]=\"option.highlighted()\"\r\n [ariaSelected]=\"option.selected()\"\r\n (mouseenter)=\"onItemMouseEnter(option, $event)\"\r\n (mouseleave)=\"onItemMouseLeave(option, $event)\"\r\n (click)=\"onItemClick(option, $event)\"\r\n >\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <span class=\"ard-option-label\">\r\n <ng-template #defaultOptionTemplate>\r\n {{ option.label() }}\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"optionTemplate()?.template || defaultOptionTemplate\"\r\n [ngTemplateOutletContext]=\"getOptionContext(option)\"\r\n />\r\n </span>\r\n </div>\r\n </button>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".ard-segment-container{display:flex;flex-direction:column}.ard-segment-container.ard-align-left .ard-segment-option{justify-content:left}.ard-segment-container.ard-align-middle .ard-segment-option{justify-content:center}.ard-segment-container.ard-align-right .ard-segment-option{justify-content:right}.ard-segment-row{width:100%;display:flex;align-items:center}.ard-segment-row.ard-segment-row-uniform{display:grid;grid-template-columns:repeat(var(--ard-_segment-row-items),1fr)}.ard-segment-option{-webkit-user-select:none;user-select:none}.ard-option-disabled{pointer-events:none}\n"] }]
7099
7192
  }], ctorParameters: () => [{ type: undefined, decorators: [{
7100
7193
  type: Inject,
7101
7194
  args: [ARD_SEGMENT_DEFAULTS]