@clr/angular 18.0.0-beta.1 → 18.0.0-beta.3

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 (89) hide show
  1. package/fesm2022/clr-angular-accordion.mjs +1 -1
  2. package/fesm2022/clr-angular-accordion.mjs.map +1 -1
  3. package/fesm2022/clr-angular-button.mjs +6 -6
  4. package/fesm2022/clr-angular-button.mjs.map +1 -1
  5. package/fesm2022/clr-angular-data-datagrid.mjs +19 -33
  6. package/fesm2022/clr-angular-data-datagrid.mjs.map +1 -1
  7. package/fesm2022/clr-angular-data-tree-view.mjs +2 -2
  8. package/fesm2022/clr-angular-data-tree-view.mjs.map +1 -1
  9. package/fesm2022/clr-angular-data.mjs +11 -9116
  10. package/fesm2022/clr-angular-data.mjs.map +1 -1
  11. package/fesm2022/clr-angular-emphasis-alert.mjs +2 -2
  12. package/fesm2022/clr-angular-emphasis-alert.mjs.map +1 -1
  13. package/fesm2022/clr-angular-emphasis.mjs +12 -778
  14. package/fesm2022/clr-angular-emphasis.mjs.map +1 -1
  15. package/fesm2022/clr-angular-forms-checkbox.mjs +13 -44
  16. package/fesm2022/clr-angular-forms-checkbox.mjs.map +1 -1
  17. package/fesm2022/clr-angular-forms-combobox.mjs +97 -64
  18. package/fesm2022/clr-angular-forms-combobox.mjs.map +1 -1
  19. package/fesm2022/clr-angular-forms-common.mjs +62 -57
  20. package/fesm2022/clr-angular-forms-common.mjs.map +1 -1
  21. package/fesm2022/clr-angular-forms-datalist.mjs +2 -14
  22. package/fesm2022/clr-angular-forms-datalist.mjs.map +1 -1
  23. package/fesm2022/clr-angular-forms-datepicker.mjs +20 -28
  24. package/fesm2022/clr-angular-forms-datepicker.mjs.map +1 -1
  25. package/fesm2022/clr-angular-forms-file-input.mjs +72 -53
  26. package/fesm2022/clr-angular-forms-file-input.mjs.map +1 -1
  27. package/fesm2022/clr-angular-forms-input.mjs +4 -18
  28. package/fesm2022/clr-angular-forms-input.mjs.map +1 -1
  29. package/fesm2022/clr-angular-forms-number-input.mjs +2 -14
  30. package/fesm2022/clr-angular-forms-number-input.mjs.map +1 -1
  31. package/fesm2022/clr-angular-forms-password.mjs +2 -14
  32. package/fesm2022/clr-angular-forms-password.mjs.map +1 -1
  33. package/fesm2022/clr-angular-forms-radio.mjs +13 -44
  34. package/fesm2022/clr-angular-forms-radio.mjs.map +1 -1
  35. package/fesm2022/clr-angular-forms-range.mjs +3 -16
  36. package/fesm2022/clr-angular-forms-range.mjs.map +1 -1
  37. package/fesm2022/clr-angular-forms-select.mjs +3 -16
  38. package/fesm2022/clr-angular-forms-select.mjs.map +1 -1
  39. package/fesm2022/clr-angular-forms-textarea.mjs +4 -17
  40. package/fesm2022/clr-angular-forms-textarea.mjs.map +1 -1
  41. package/fesm2022/clr-angular-forms.mjs +68 -8560
  42. package/fesm2022/clr-angular-forms.mjs.map +1 -1
  43. package/fesm2022/clr-angular-layout-tabs.mjs +1 -1
  44. package/fesm2022/clr-angular-layout-tabs.mjs.map +1 -1
  45. package/fesm2022/clr-angular-layout.mjs +15 -2057
  46. package/fesm2022/clr-angular-layout.mjs.map +1 -1
  47. package/fesm2022/clr-angular-modal.mjs +2 -2
  48. package/fesm2022/clr-angular-modal.mjs.map +1 -1
  49. package/fesm2022/clr-angular-popover-common.mjs +151 -85
  50. package/fesm2022/clr-angular-popover-common.mjs.map +1 -1
  51. package/fesm2022/clr-angular-popover-dropdown.mjs +7 -4
  52. package/fesm2022/clr-angular-popover-dropdown.mjs.map +1 -1
  53. package/fesm2022/clr-angular-popover-signpost.mjs +30 -15
  54. package/fesm2022/clr-angular-popover-signpost.mjs.map +1 -1
  55. package/fesm2022/clr-angular-popover-tooltip.mjs +7 -7
  56. package/fesm2022/clr-angular-popover-tooltip.mjs.map +1 -1
  57. package/fesm2022/clr-angular-popover.mjs +12 -2242
  58. package/fesm2022/clr-angular-popover.mjs.map +1 -1
  59. package/fesm2022/clr-angular-stepper.mjs +5 -5
  60. package/fesm2022/clr-angular-stepper.mjs.map +1 -1
  61. package/fesm2022/clr-angular-utils.mjs +15 -485
  62. package/fesm2022/clr-angular-utils.mjs.map +1 -1
  63. package/fesm2022/clr-angular-wizard.mjs +19 -11
  64. package/fesm2022/clr-angular-wizard.mjs.map +1 -1
  65. package/fesm2022/clr-angular.mjs +94 -38740
  66. package/fesm2022/clr-angular.mjs.map +1 -1
  67. package/package.json +2 -2
  68. package/popover/common/README.md +14 -12
  69. package/types/clr-angular-accordion.d.ts +1 -1
  70. package/types/clr-angular-button.d.ts +1 -1
  71. package/types/clr-angular-data-datagrid.d.ts +23 -33
  72. package/types/clr-angular-data.d.ts +4 -2136
  73. package/types/clr-angular-emphasis.d.ts +4 -220
  74. package/types/clr-angular-forms-combobox.d.ts +12 -5
  75. package/types/clr-angular-forms-common.d.ts +9 -9
  76. package/types/clr-angular-forms-datepicker.d.ts +8 -1
  77. package/types/clr-angular-forms-file-input.d.ts +5 -2
  78. package/types/clr-angular-forms.d.ts +26 -2062
  79. package/types/clr-angular-layout-tabs.d.ts +1 -1
  80. package/types/clr-angular-layout.d.ts +6 -463
  81. package/types/clr-angular-popover-common.d.ts +38 -13
  82. package/types/clr-angular-popover-dropdown.d.ts +2 -1
  83. package/types/clr-angular-popover-signpost.d.ts +15 -7
  84. package/types/clr-angular-popover-tooltip.d.ts +1 -1
  85. package/types/clr-angular-popover.d.ts +7 -559
  86. package/types/clr-angular-stepper.d.ts +1 -1
  87. package/types/clr-angular-utils.d.ts +8 -175
  88. package/types/clr-angular-wizard.d.ts +7 -4
  89. package/types/clr-angular.d.ts +22 -10238
@@ -1,11 +1,12 @@
1
1
  import { FormControl, FormGroup } from '@angular/forms';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, EventEmitter, Output, Input, Directive, NgModule, TemplateRef, ViewChild, Component, ElementRef, HostListener, HostBinding, Optional, InjectionToken, Inject, PLATFORM_ID, DOCUMENT, ContentChildren, SkipSelf, Renderer2 } from '@angular/core';
3
+ import { Injectable, EventEmitter, Output, Input, Directive, NgModule, TemplateRef, ViewChild, Component, ElementRef, HostListener, HostBinding, InjectionToken, PLATFORM_ID, DOCUMENT, Inject, Optional, ContentChildren, SkipSelf, Renderer2 } from '@angular/core';
4
4
  import { CommonModule, isPlatformBrowser } from '@angular/common';
5
5
  import * as i2 from '@angular/animations';
6
6
  import { animation, style, animate, state, transition, trigger, useAnimation } from '@angular/animations';
7
+ export * from '@clr/angular/utils/loading';
8
+ export * from '@clr/angular/utils/conditional';
7
9
  import { Subject, fromEvent, Observable, isObservable, of } from 'rxjs';
8
- import { ClrLoadingState as ClrLoadingState$1 } from '@clr/angular/utils/loading';
9
10
  import { takeUntil } from 'rxjs/operators';
10
11
  import * as i1 from '@angular/cdk/a11y';
11
12
  import { CdkTrapFocus } from '@angular/cdk/a11y';
@@ -313,7 +314,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
313
314
  /**
314
315
  * HostWrapper must be called in OnInit to ensure that the Views are ready. If its called in a constructor the view is
315
316
  * still undefined.
316
- * TODO - make sure these comment annotations do not break ng-packgr.
317
317
  */
318
318
  class HostWrapper {
319
319
  constructor(containerType, vcr, index = 0) {
@@ -699,442 +699,6 @@ function slide(direction) {
699
699
  * The full license information can be found in LICENSE in the root directory of this project.
700
700
  */
701
701
 
702
- /*
703
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
704
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
705
- * This software is released under MIT license.
706
- * The full license information can be found in LICENSE in the root directory of this project.
707
- */
708
- /**
709
- * This is an abstract class because we need it to still be a valid token for dependency injection after transpiling.
710
- * This does not mean you should extend it, simply implementing it is fine.
711
- */
712
- class LoadingListener {
713
- }
714
-
715
- /*
716
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
717
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
718
- * This software is released under MIT license.
719
- * The full license information can be found in LICENSE in the root directory of this project.
720
- */
721
- var ClrLoadingState;
722
- (function (ClrLoadingState) {
723
- ClrLoadingState[ClrLoadingState["DEFAULT"] = 0] = "DEFAULT";
724
- ClrLoadingState[ClrLoadingState["LOADING"] = 1] = "LOADING";
725
- ClrLoadingState[ClrLoadingState["SUCCESS"] = 2] = "SUCCESS";
726
- ClrLoadingState[ClrLoadingState["ERROR"] = 3] = "ERROR";
727
- })(ClrLoadingState || (ClrLoadingState = {}));
728
- class ClrLoading {
729
- // We find the first parent that handles something loading
730
- constructor(listener) {
731
- this.listener = listener;
732
- this._loadingState = ClrLoadingState.DEFAULT;
733
- }
734
- get loadingState() {
735
- return this._loadingState;
736
- }
737
- set loadingState(value) {
738
- if (value === true) {
739
- value = ClrLoadingState.LOADING;
740
- }
741
- else if (!value) {
742
- value = ClrLoadingState.DEFAULT;
743
- }
744
- if (value === this._loadingState) {
745
- return;
746
- }
747
- this._loadingState = value;
748
- if (this.listener) {
749
- this.listener.loadingStateChange(value);
750
- }
751
- }
752
- ngOnDestroy() {
753
- this.loadingState = ClrLoadingState.DEFAULT;
754
- }
755
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrLoading, deps: [{ token: LoadingListener, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
756
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: ClrLoading, isStandalone: false, selector: "[clrLoading]", inputs: { loadingState: ["clrLoading", "loadingState"] }, ngImport: i0 }); }
757
- }
758
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrLoading, decorators: [{
759
- type: Directive,
760
- args: [{
761
- selector: '[clrLoading]',
762
- standalone: false,
763
- }]
764
- }], ctorParameters: () => [{ type: LoadingListener, decorators: [{
765
- type: Optional
766
- }] }], propDecorators: { loadingState: [{
767
- type: Input,
768
- args: ['clrLoading']
769
- }] } });
770
-
771
- /*
772
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
773
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
774
- * This software is released under MIT license.
775
- * The full license information can be found in LICENSE in the root directory of this project.
776
- */
777
- const CLR_LOADING_DIRECTIVES = [ClrLoading];
778
- class ClrLoadingModule {
779
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrLoadingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
780
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.3", ngImport: i0, type: ClrLoadingModule, declarations: [ClrLoading], imports: [CommonModule], exports: [ClrLoading] }); }
781
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrLoadingModule, imports: [CommonModule] }); }
782
- }
783
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrLoadingModule, decorators: [{
784
- type: NgModule,
785
- args: [{
786
- imports: [CommonModule],
787
- declarations: [CLR_LOADING_DIRECTIVES],
788
- exports: [CLR_LOADING_DIRECTIVES],
789
- }]
790
- }] });
791
-
792
- /*
793
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
794
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
795
- * This software is released under MIT license.
796
- * The full license information can be found in LICENSE in the root directory of this project.
797
- */
798
-
799
- /*
800
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
801
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
802
- * This software is released under MIT license.
803
- * The full license information can be found in LICENSE in the root directory of this project.
804
- */
805
- let activeCounter = 0;
806
- const IF_ACTIVE_ID = new InjectionToken('IF_ACTIVE_ID');
807
- function tokenFactory() {
808
- return ++activeCounter;
809
- }
810
- const IF_ACTIVE_ID_PROVIDER = {
811
- provide: IF_ACTIVE_ID,
812
- useFactory: tokenFactory,
813
- };
814
- /*********
815
- * @class IfActiveService
816
- *
817
- * @description
818
- * An injectable service used by IfActive structural directives and the components that implement IfActive in their
819
- * templates. It holds the value of the current state and provides an Observable that both the directive and the
820
- * implementing component can subscribe to in order to take action on current value changes.
821
- *
822
- */
823
- class IfActiveService {
824
- constructor() {
825
- /********
826
- * @property _currentChange
827
- *
828
- * @description
829
- * A RXJS Subject that updates and provides subscriptions to for the current current state of a component template
830
- * implemting the IfActive structural directive.
831
- *
832
- */
833
- this._currentChange = new Subject();
834
- }
835
- /*********
836
- *
837
- * @description
838
- * A getter function that provides an observable for the _current Subject.
839
- *
840
- */
841
- get currentChange() {
842
- return this._currentChange.asObservable();
843
- }
844
- /*********
845
- *
846
- * @description
847
- * A property that gets/sets the current state of _current for this instance of IfActive structural directive.
848
- * And, broadcasts the new value to all subscribers.
849
- *
850
- */
851
- get current() {
852
- return this._current;
853
- }
854
- set current(value) {
855
- if (this._current !== value) {
856
- this._current = value;
857
- this._currentChange.next(value);
858
- }
859
- }
860
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: IfActiveService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
861
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: IfActiveService }); }
862
- }
863
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: IfActiveService, decorators: [{
864
- type: Injectable
865
- }] });
866
-
867
- /*
868
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
869
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
870
- * This software is released under MIT license.
871
- * The full license information can be found in LICENSE in the root directory of this project.
872
- */
873
- /**********
874
- *
875
- * @class ClrIfActive
876
- *
877
- * @description
878
- * A structural directive that controls whether or not the associated TemplateRef is instantiated or not.
879
- * It makes use of a Component instance level service: IfActiveService to maintain state between itself and
880
- * the component using it in the component template.
881
- *
882
- */
883
- class ClrIfActive {
884
- constructor(ifActiveService, id, template, container) {
885
- this.ifActiveService = ifActiveService;
886
- this.id = id;
887
- this.template = template;
888
- this.container = container;
889
- /**********
890
- * @property activeChange
891
- *
892
- * @description
893
- * An event emitter that emits when the active property is set to allow for 2way binding when the directive is
894
- * used with de-structured / de-sugared syntax.
895
- *
896
- */
897
- this.activeChange = new EventEmitter(false);
898
- this.wasActive = false;
899
- this.checkAndUpdateView(ifActiveService.current);
900
- this.subscription = ifActiveService.currentChange.subscribe(newCurrentId => {
901
- this.checkAndUpdateView(newCurrentId);
902
- });
903
- }
904
- /**
905
- * @description
906
- * A property that gets/sets IfActiveService.active with value.
907
- *
908
- */
909
- get active() {
910
- return this.ifActiveService.current === this.id;
911
- }
912
- set active(value) {
913
- if (value) {
914
- this.ifActiveService.current = this.id;
915
- }
916
- }
917
- ngOnDestroy() {
918
- this.subscription.unsubscribe();
919
- }
920
- /**
921
- * @description
922
- * Function that takes a any value and either created an embedded view for the associated ViewContainerRef or,
923
- * Clears all views from the ViewContainerRef
924
- */
925
- updateView(value) {
926
- if (value) {
927
- this.container.createEmbeddedView(this.template);
928
- }
929
- else {
930
- this.container.clear();
931
- }
932
- }
933
- checkAndUpdateView(currentId) {
934
- const isNowActive = currentId === this.id;
935
- // only emit if the new active state is changed since last time.
936
- if (isNowActive !== this.wasActive) {
937
- this.updateView(isNowActive);
938
- this.activeChange.emit(isNowActive);
939
- this.wasActive = isNowActive;
940
- }
941
- }
942
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrIfActive, deps: [{ token: IfActiveService }, { token: IF_ACTIVE_ID }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
943
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: ClrIfActive, isStandalone: true, selector: "[clrIfActive]", inputs: { active: ["clrIfActive", "active"] }, outputs: { activeChange: "clrIfActiveChange" }, ngImport: i0 }); }
944
- }
945
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrIfActive, decorators: [{
946
- type: Directive,
947
- args: [{
948
- selector: '[clrIfActive]',
949
- }]
950
- }], ctorParameters: () => [{ type: IfActiveService }, { type: undefined, decorators: [{
951
- type: Inject,
952
- args: [IF_ACTIVE_ID]
953
- }] }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }], propDecorators: { activeChange: [{
954
- type: Output,
955
- args: ['clrIfActiveChange']
956
- }], active: [{
957
- type: Input,
958
- args: ['clrIfActive']
959
- }] } });
960
-
961
- /*
962
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
963
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
964
- * This software is released under MIT license.
965
- * The full license information can be found in LICENSE in the root directory of this project.
966
- */
967
- class IfExpandService {
968
- constructor() {
969
- this.expandable = 0;
970
- this.hasExpandTemplate = false;
971
- this._loading = false;
972
- this._expanded = false;
973
- this._expandChange = new Subject();
974
- }
975
- get loading() {
976
- return this._loading;
977
- }
978
- set loading(value) {
979
- value = !!value;
980
- if (value !== this._loading) {
981
- this._loading = value;
982
- }
983
- }
984
- get expanded() {
985
- return this._expanded;
986
- }
987
- set expanded(value) {
988
- value = !!value;
989
- if (value !== this._expanded) {
990
- this._expanded = value;
991
- this._expandChange.next(value);
992
- }
993
- }
994
- get expandChange() {
995
- return this._expandChange.asObservable();
996
- }
997
- toggle() {
998
- this.expanded = !this._expanded;
999
- }
1000
- loadingStateChange(state) {
1001
- switch (state) {
1002
- case ClrLoadingState$1.LOADING:
1003
- this.loading = true;
1004
- break;
1005
- default:
1006
- this.loading = false;
1007
- break;
1008
- }
1009
- }
1010
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: IfExpandService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1011
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: IfExpandService }); }
1012
- }
1013
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: IfExpandService, decorators: [{
1014
- type: Injectable
1015
- }] });
1016
-
1017
- /*
1018
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1019
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1020
- * This software is released under MIT license.
1021
- * The full license information can be found in LICENSE in the root directory of this project.
1022
- */
1023
- class ClrIfExpanded {
1024
- constructor(template, container, el, renderer, expand) {
1025
- this.template = template;
1026
- this.container = container;
1027
- this.el = el;
1028
- this.renderer = renderer;
1029
- this.expand = expand;
1030
- this.expandedChange = new EventEmitter(true);
1031
- this._expanded = false;
1032
- /**
1033
- * Subscriptions to all the services and queries changes
1034
- */
1035
- this._subscriptions = [];
1036
- this._subscriptions.push(expand.expandChange.subscribe(() => {
1037
- this.updateView();
1038
- this.expandedChange.emit(expand.expanded);
1039
- }));
1040
- expand.hasExpandTemplate = !!template;
1041
- }
1042
- get expanded() {
1043
- return this._expanded;
1044
- }
1045
- set expanded(value) {
1046
- if (typeof value === 'boolean') {
1047
- this.expand.expanded = value;
1048
- this._expanded = value;
1049
- }
1050
- }
1051
- ngOnInit() {
1052
- this.expand.expandable++;
1053
- this.updateView();
1054
- }
1055
- ngOnDestroy() {
1056
- this.expand.expandable--;
1057
- this._subscriptions.forEach((sub) => sub.unsubscribe());
1058
- }
1059
- updateView() {
1060
- if (this.expand.expanded && this.container.length !== 0) {
1061
- return;
1062
- }
1063
- if (this.template) {
1064
- if (this.expand.expanded) {
1065
- // Should we pass a context? I don't see anything useful to pass right now,
1066
- // but we can come back to it in the future as a solution for additional features.
1067
- this.container.createEmbeddedView(this.template);
1068
- }
1069
- else {
1070
- // TODO: Move when we move the animation logic to Datagrid Row Expand
1071
- // We clear before the animation is over. Not ideal, but doing better would involve a much heavier
1072
- // process for very little gain. Once Angular animations are dynamic enough, we should be able to
1073
- // get the optimal behavior.
1074
- this.container.clear();
1075
- }
1076
- }
1077
- else {
1078
- try {
1079
- // If we don't have a template ref, we fallback to a crude display: none for now.
1080
- if (this.expand.expanded) {
1081
- this.renderer.setStyle(this.el.nativeElement, 'display', null);
1082
- }
1083
- else {
1084
- this.renderer.setStyle(this.el.nativeElement, 'display', 'none');
1085
- }
1086
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1087
- }
1088
- catch (e) {
1089
- // We catch the case where clrIfExpanded was put on a non-DOM element, and we just do nothing
1090
- }
1091
- }
1092
- }
1093
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrIfExpanded, deps: [{ token: i0.TemplateRef, optional: true }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: IfExpandService }], target: i0.ɵɵFactoryTarget.Directive }); }
1094
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: ClrIfExpanded, isStandalone: true, selector: "[clrIfExpanded]", inputs: { expanded: ["clrIfExpanded", "expanded"] }, outputs: { expandedChange: "clrIfExpandedChange" }, ngImport: i0 }); }
1095
- }
1096
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrIfExpanded, decorators: [{
1097
- type: Directive,
1098
- args: [{
1099
- selector: '[clrIfExpanded]',
1100
- }]
1101
- }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
1102
- type: Optional
1103
- }] }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: IfExpandService }], propDecorators: { expandedChange: [{
1104
- type: Output,
1105
- args: ['clrIfExpandedChange']
1106
- }], expanded: [{
1107
- type: Input,
1108
- args: ['clrIfExpanded']
1109
- }] } });
1110
-
1111
- /*
1112
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1113
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1114
- * This software is released under MIT license.
1115
- * The full license information can be found in LICENSE in the root directory of this project.
1116
- */
1117
- const CONDITIONAL_DIRECTIVES = [ClrIfActive, ClrIfExpanded];
1118
- class ClrConditionalModule {
1119
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrConditionalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1120
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.3", ngImport: i0, type: ClrConditionalModule, imports: [CommonModule, ClrIfActive, ClrIfExpanded], exports: [ClrIfActive, ClrIfExpanded] }); }
1121
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrConditionalModule, imports: [CommonModule] }); }
1122
- }
1123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrConditionalModule, decorators: [{
1124
- type: NgModule,
1125
- args: [{
1126
- imports: [CommonModule, CONDITIONAL_DIRECTIVES],
1127
- exports: [CONDITIONAL_DIRECTIVES],
1128
- }]
1129
- }] });
1130
-
1131
- /*
1132
- * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1133
- * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
1134
- * This software is released under MIT license.
1135
- * The full license information can be found in LICENSE in the root directory of this project.
1136
- */
1137
-
1138
702
  /*
1139
703
  * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
1140
704
  * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
@@ -1565,15 +1129,6 @@ var Keys;
1565
1129
  Keys["PageDown"] = "PageDown";
1566
1130
  Keys["PageUp"] = "PageUp";
1567
1131
  })(Keys || (Keys = {}));
1568
- var IEKeys;
1569
- (function (IEKeys) {
1570
- IEKeys["ArrowUp"] = "Up";
1571
- IEKeys["ArrowDown"] = "Down";
1572
- IEKeys["ArrowRight"] = "Right";
1573
- IEKeys["ArrowLeft"] = "Left";
1574
- IEKeys["Space"] = "Spacebar";
1575
- IEKeys["Escape"] = "Esc";
1576
- })(IEKeys || (IEKeys = {}));
1577
1132
 
1578
1133
  /*
1579
1134
  * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
@@ -1581,31 +1136,8 @@ var IEKeys;
1581
1136
  * This software is released under MIT license.
1582
1137
  * The full license information can be found in LICENSE in the root directory of this project.
1583
1138
  */
1584
- function normalizeKey(key) {
1585
- if (key === Keys.ArrowUp || key === IEKeys.ArrowUp) {
1586
- return Keys.ArrowUp;
1587
- }
1588
- else if (key === Keys.ArrowDown || key === IEKeys.ArrowDown) {
1589
- return Keys.ArrowDown;
1590
- }
1591
- else if (key === Keys.ArrowRight || key === IEKeys.ArrowRight) {
1592
- return Keys.ArrowRight;
1593
- }
1594
- else if (key === Keys.ArrowLeft || key === IEKeys.ArrowLeft) {
1595
- return Keys.ArrowLeft;
1596
- }
1597
- else if (key === Keys.Space || key === IEKeys.Space) {
1598
- return Keys.Space;
1599
- }
1600
- else if (key === Keys.Escape || key === IEKeys.Escape) {
1601
- return Keys.Escape;
1602
- }
1603
- else {
1604
- return key;
1605
- }
1606
- }
1607
1139
  function preventArrowKeyScroll(event) {
1608
- const key = normalizeKey(event.key);
1140
+ const key = event.key;
1609
1141
  if (key === Keys.ArrowUp || key === Keys.ArrowDown || key === Keys.ArrowLeft || key === Keys.ArrowRight) {
1610
1142
  // prevent element container scroll
1611
1143
  // MDN references this is really the only way to prevent native browser interactions
@@ -1710,7 +1242,7 @@ class ClrKeyFocus {
1710
1242
  }
1711
1243
  focusCurrent() {
1712
1244
  this.currentItem.focus();
1713
- this.focusChange.next(this._current);
1245
+ this.focusChange.emit(this._current);
1714
1246
  }
1715
1247
  moveTo(position) {
1716
1248
  if (this.positionInRange(position)) {
@@ -1742,27 +1274,25 @@ class ClrKeyFocus {
1742
1274
  }
1743
1275
  }
1744
1276
  nextKeyPressed(event) {
1745
- const key = normalizeKey(event.key);
1746
1277
  switch (this.direction) {
1747
1278
  case ClrFocusDirection.VERTICAL:
1748
- return key === Keys.ArrowDown;
1279
+ return event.key === Keys.ArrowDown;
1749
1280
  case ClrFocusDirection.HORIZONTAL:
1750
- return key === Keys.ArrowRight;
1281
+ return event.key === Keys.ArrowRight;
1751
1282
  case ClrFocusDirection.BOTH:
1752
- return key === Keys.ArrowDown || key === Keys.ArrowRight;
1283
+ return event.key === Keys.ArrowDown || event.key === Keys.ArrowRight;
1753
1284
  default:
1754
1285
  return false;
1755
1286
  }
1756
1287
  }
1757
1288
  prevKeyPressed(event) {
1758
- const key = normalizeKey(event.key);
1759
1289
  switch (this.direction) {
1760
1290
  case ClrFocusDirection.VERTICAL:
1761
- return key === Keys.ArrowUp;
1291
+ return event.key === Keys.ArrowUp;
1762
1292
  case ClrFocusDirection.HORIZONTAL:
1763
- return key === Keys.ArrowLeft;
1293
+ return event.key === Keys.ArrowLeft;
1764
1294
  case ClrFocusDirection.BOTH:
1765
- return key === Keys.ArrowUp || key === Keys.ArrowLeft;
1295
+ return event.key === Keys.ArrowUp || event.key === Keys.ArrowLeft;
1766
1296
  default:
1767
1297
  return false;
1768
1298
  }
@@ -2427,11 +1957,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
2427
1957
  *
2428
1958
  *
2429
1959
  * Consumers tell us that they want something to display on the TOP_LEFT of the trigger and that they want the
2430
- * _content_ container to anchor/orient AT the bottom left.
2431
- * In order to calculate the position for the content I need to match up the anchor/toggle ClrPosition with the
1960
+ * _content_ container to orient AT the bottom left.
1961
+ * In order to calculate the position for the content I need to match up the origin/trigger ClrPosition with the
2432
1962
  * content ClrPosition.
2433
1963
  *
2434
- * Anchor TOP_LEFT **AT** Content BOTTOM_LEFT.
1964
+ * Origin TOP_LEFT **AT** Content BOTTOM_LEFT.
2435
1965
  * -----------
2436
1966
  * | |
2437
1967
  * | |
@@ -2540,5 +2070,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
2540
2070
  * Generated bundle index. Do not edit.
2541
2071
  */
2542
2072
 
2543
- export { ArrowKeyDirection, BASIC_FOCUSABLE_ITEM_PROVIDER, BaseExpandableAnimation, BasicFocusableItem, CLR_LOADING_DIRECTIVES, CONDITIONAL_DIRECTIVES, CdkDragModule, CdkDragModule_CdkDrag, CdkTrapFocusModule, CdkTrapFocusModule_CdkTrapFocus, ClrCommonStringsService, ClrConditionalModule, ClrDestroyService, ClrExpandableAnimation, ClrExpandableAnimationDirective, ClrExpandableAnimationModule, ClrFocusOnViewInit, ClrFocusOnViewInitModule, ClrHostWrappingModule, ClrIfActive, ClrIfExpanded, ClrKeyFocus, ClrKeyFocusItem, ClrKeyFocusModule, ClrLoading, ClrLoadingModule, ClrLoadingState, ClrOutsideClickModule, ClrPosition, ClrRovingTabindex, ClrStandaloneCdkTrapFocus, ClrTemplateRefModule, DATEPICKER_ENABLE_BREAKPOINT, DomAdapter, EXPANDABLE_ANIMATION_DIRECTIVES, EXTRA_LARGE_BREAKPOINT, EmptyAnchor, FOCUS_ON_VIEW_INIT, FOCUS_ON_VIEW_INIT_DIRECTIVES, FOCUS_SERVICE_PROVIDER, FocusService, FocusableItem, HostWrapper, IEKeys, IF_ACTIVE_ID, IF_ACTIVE_ID_PROVIDER, IfActiveService, IfExpandService, Keys, LARGE_BREAKPOINT, Linkers, LoadingListener, MEDIUM_BREAKPOINT, MOCK_DOM_ADAPTER_PROVIDER, MockDomAdapter, MockFocusableItem, OUSTIDE_CLICK_DIRECTIVES, OompaLoompa, OutsideClick, SMALL_BREAKPOINT, ScrollingService, TemplateRefContainer, WillyWonka, assertNever, clrFocusServiceFactory, collapse, commonStringsDefault, customFocusableItemProvider, defaultAnimationTiming, defaultExpandAnimation, fade, fadeSlide, isBooleanAttributeSet, isKeyEitherLetterOrNumber, normalizeKey, preventArrowKeyScroll, slide, tokenFactory, triggerAllFormControlValidation, uniqueIdFactory, wrapObservable };
2073
+ export { ArrowKeyDirection, BASIC_FOCUSABLE_ITEM_PROVIDER, BaseExpandableAnimation, BasicFocusableItem, CdkDragModule, CdkDragModule_CdkDrag, CdkTrapFocusModule, CdkTrapFocusModule_CdkTrapFocus, ClrCommonStringsService, ClrDestroyService, ClrExpandableAnimation, ClrExpandableAnimationDirective, ClrExpandableAnimationModule, ClrFocusOnViewInit, ClrFocusOnViewInitModule, ClrHostWrappingModule, ClrKeyFocus, ClrKeyFocusItem, ClrKeyFocusModule, ClrOutsideClickModule, ClrPosition, ClrRovingTabindex, ClrStandaloneCdkTrapFocus, ClrTemplateRefModule, DATEPICKER_ENABLE_BREAKPOINT, DomAdapter, EXPANDABLE_ANIMATION_DIRECTIVES, EXTRA_LARGE_BREAKPOINT, EmptyAnchor, FOCUS_ON_VIEW_INIT, FOCUS_ON_VIEW_INIT_DIRECTIVES, FOCUS_SERVICE_PROVIDER, FocusService, FocusableItem, HostWrapper, Keys, LARGE_BREAKPOINT, Linkers, MEDIUM_BREAKPOINT, MOCK_DOM_ADAPTER_PROVIDER, MockDomAdapter, MockFocusableItem, OUSTIDE_CLICK_DIRECTIVES, OompaLoompa, OutsideClick, SMALL_BREAKPOINT, ScrollingService, TemplateRefContainer, WillyWonka, assertNever, clrFocusServiceFactory, collapse, commonStringsDefault, customFocusableItemProvider, defaultAnimationTiming, defaultExpandAnimation, fade, fadeSlide, isBooleanAttributeSet, isKeyEitherLetterOrNumber, preventArrowKeyScroll, slide, triggerAllFormControlValidation, uniqueIdFactory, wrapObservable };
2544
2074
  //# sourceMappingURL=clr-angular-utils.mjs.map