@clr/angular 16.2.0 → 17.0.0-beta.1

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 (37) hide show
  1. package/accordion/accordion-panel.d.ts +0 -12
  2. package/accordion/accordion.d.ts +0 -3
  3. package/clarity.api.md +49 -40
  4. package/emphasis/alert/alert.d.ts +6 -2
  5. package/emphasis/alert/alert.module.d.ts +2 -1
  6. package/esm2020/accordion/accordion-panel.mjs +1 -13
  7. package/esm2020/accordion/accordion.mjs +3 -6
  8. package/esm2020/data/datagrid/datagrid-row.mjs +3 -3
  9. package/esm2020/data/datagrid/utils/key-navigation-grid.controller.mjs +2 -2
  10. package/esm2020/data/tree-view/tree-node.mjs +1 -1
  11. package/esm2020/emphasis/alert/alert-item.mjs +9 -3
  12. package/esm2020/emphasis/alert/alert.mjs +24 -9
  13. package/esm2020/emphasis/alert/alert.module.mjs +5 -4
  14. package/esm2020/emphasis/alert/alerts.mjs +3 -2
  15. package/esm2020/emphasis/alert/providers/icon-and-types.service.mjs +16 -1
  16. package/esm2020/emphasis/alert/utils/alert-types.mjs +2 -2
  17. package/esm2020/forms/common/abstract-container.mjs +20 -18
  18. package/esm2020/forms/common/error.mjs +3 -2
  19. package/esm2020/forms/common/success.mjs +3 -2
  20. package/esm2020/forms/common/wrapped-control.mjs +27 -7
  21. package/esm2020/forms/password/password-container.mjs +3 -3
  22. package/esm2020/modal/modal.mjs +3 -8
  23. package/esm2020/progress/progress-bars/progress-bar.mjs +8 -26
  24. package/esm2020/utils/i18n/common-strings.default.mjs +3 -1
  25. package/esm2020/utils/i18n/common-strings.interface.mjs +1 -1
  26. package/esm2020/wizard/wizard.mjs +6 -29
  27. package/fesm2015/clr-angular.mjs +128 -129
  28. package/fesm2015/clr-angular.mjs.map +1 -1
  29. package/fesm2020/clr-angular.mjs +128 -128
  30. package/fesm2020/clr-angular.mjs.map +1 -1
  31. package/forms/common/abstract-container.d.ts +4 -6
  32. package/forms/common/wrapped-control.d.ts +10 -3
  33. package/modal/modal.d.ts +1 -2
  34. package/package.json +6 -6
  35. package/progress/progress-bars/progress-bar.d.ts +2 -10
  36. package/utils/i18n/common-strings.interface.d.ts +8 -0
  37. package/wizard/wizard.d.ts +2 -12
@@ -27,12 +27,10 @@ export declare abstract class ClrAbstractContainer implements DynamicWrapper, On
27
27
  constructor(ifControlStateService: IfControlStateService, layoutService: LayoutService, controlClassService: ControlClassService, ngControlService: NgControlService);
28
28
  /**
29
29
  * @NOTE
30
- * Helper control is a bit different than the others, it must be visible most of the time:
31
- * - Helper must NOT be visible when CONTROL_STATE is not NONE and Success or Error components are \
32
- * defined.
33
- *
34
- * For example user implement only Error control then if CONTROL_STATE is VALID then helper
35
- * control must be visible.
30
+ * Helper control is a bit different than the others, it must be always visible:
31
+ * - Labels and instructions must always accompany forms and are persistent.
32
+ * - The recommendation here is to always have helper text or anything instructions visible.
33
+ * - The expectation is to have error text + helper text in the errored state. this way all users will have the helper text information always available.
36
34
  */
37
35
  get showHelper(): boolean;
38
36
  get showValid(): boolean;
@@ -1,11 +1,15 @@
1
- import { ElementRef, InjectionToken, Injector, OnDestroy, OnInit, Renderer2, Type, ViewContainerRef } from '@angular/core';
1
+ import { DoCheck, ElementRef, InjectionToken, Injector, OnDestroy, OnInit, Renderer2, Type, ViewContainerRef } from '@angular/core';
2
2
  import { NgControl } from '@angular/forms';
3
3
  import { Subscription } from 'rxjs';
4
4
  import { DynamicWrapper } from '../../utils/host-wrapping/dynamic-wrapper';
5
5
  import { ControlIdService } from './providers/control-id.service';
6
6
  import { NgControlService } from './providers/ng-control.service';
7
7
  import * as i0 from "@angular/core";
8
- export declare class WrappedFormControl<W extends DynamicWrapper> implements OnInit, OnDestroy {
8
+ export declare enum CHANGE_KEYS {
9
+ FORM = "form",
10
+ MODEL = "model"
11
+ }
12
+ export declare class WrappedFormControl<W extends DynamicWrapper> implements OnInit, DoCheck, OnDestroy {
9
13
  protected vcr: ViewContainerRef;
10
14
  protected wrapperType: Type<W>;
11
15
  private ngControl;
@@ -21,10 +25,13 @@ export declare class WrappedFormControl<W extends DynamicWrapper> implements OnI
21
25
  private markControlService;
22
26
  private containerIdService;
23
27
  private _containerInjector;
24
- constructor(vcr: ViewContainerRef, wrapperType: Type<W>, injector: Injector, ngControl: NgControl | null, renderer: Renderer2, el: ElementRef);
28
+ private differs;
29
+ private differ;
30
+ constructor(vcr: ViewContainerRef, wrapperType: Type<W>, injector: Injector, ngControl: NgControl, renderer: Renderer2, el: ElementRef);
25
31
  get id(): string;
26
32
  set id(value: string);
27
33
  ngOnInit(): void;
34
+ ngDoCheck(): void;
28
35
  ngOnDestroy(): void;
29
36
  triggerValidation(): void;
30
37
  protected getProviderFromContainer<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T): T;
package/modal/modal.d.ts CHANGED
@@ -19,7 +19,6 @@ export declare class ClrModal implements OnChanges, OnDestroy {
19
19
  stopClose: boolean;
20
20
  altClose: EventEmitter<boolean>;
21
21
  labelledBy: string;
22
- bypassScrollService: boolean;
23
22
  constructor(_scrollingService: ScrollingService, commonStrings: ClrCommonStringsService, modalStackService: ModalStackService);
24
23
  ngOnChanges(changes: {
25
24
  [propName: string]: SimpleChange;
@@ -29,5 +28,5 @@ export declare class ClrModal implements OnChanges, OnDestroy {
29
28
  close(): void;
30
29
  fadeDone(e: AnimationEvent): void;
31
30
  static ɵfac: i0.ɵɵFactoryDeclaration<ClrModal, never>;
32
- static ɵcmp: i0.ɵɵComponentDeclaration<ClrModal, "clr-modal", never, { "_open": "clrModalOpen"; "closable": "clrModalClosable"; "closeButtonAriaLabel": "clrModalCloseButtonAriaLabel"; "size": "clrModalSize"; "staticBackdrop": "clrModalStaticBackdrop"; "skipAnimation": "clrModalSkipAnimation"; "stopClose": "clrModalPreventClose"; "labelledBy": "clrModalLabelledById"; "bypassScrollService": "clrModalOverrideScrollService"; }, { "_openChanged": "clrModalOpenChange"; "altClose": "clrModalAlternateClose"; }, never, [".modal-nav", ".modal-title", ".modal-body", ".modal-footer"], false, never>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClrModal, "clr-modal", never, { "_open": "clrModalOpen"; "closable": "clrModalClosable"; "closeButtonAriaLabel": "clrModalCloseButtonAriaLabel"; "size": "clrModalSize"; "staticBackdrop": "clrModalStaticBackdrop"; "skipAnimation": "clrModalSkipAnimation"; "stopClose": "clrModalPreventClose"; "labelledBy": "clrModalLabelledById"; }, { "_openChanged": "clrModalOpenChange"; "altClose": "clrModalAlternateClose"; }, never, [".modal-nav", ".modal-title", ".modal-body", ".modal-footer"], false, never>;
33
32
  }
package/package.json CHANGED
@@ -18,11 +18,11 @@
18
18
  "url": "https://github.com/vmware-clarity/ng-clarity/issues"
19
19
  },
20
20
  "peerDependencies": {
21
- "@angular/cdk": "15 || 16",
22
- "@angular/common": "15 || 16",
23
- "@angular/core": "15 || 16",
24
- "@cds/core": ">= 6.7.0",
25
- "@clr/ui": "16.2.0"
21
+ "@angular/cdk": "15 || 16 || 17",
22
+ "@angular/common": "15 || 16 || 17",
23
+ "@angular/core": "15 || 16 || 17",
24
+ "@cds/core": ">= 6.8.0",
25
+ "@clr/ui": "17.0.0-beta.1"
26
26
  },
27
27
  "module": "fesm2015/clr-angular.mjs",
28
28
  "es2020": "fesm2020/clr-angular.mjs",
@@ -47,5 +47,5 @@
47
47
  "dependencies": {
48
48
  "tslib": "^2.3.0"
49
49
  },
50
- "version": "16.2.0"
50
+ "version": "17.0.0-beta.1"
51
51
  }
@@ -2,15 +2,13 @@ import * as i0 from "@angular/core";
2
2
  export declare class ClrProgressBar {
3
3
  max: number | string;
4
4
  displayval: string;
5
+ color: string;
5
6
  value: number | string;
6
7
  externalId: string;
7
8
  private _ID;
8
9
  private _labeled;
9
10
  private _fade;
10
11
  private _loop;
11
- private _success;
12
- private _danger;
13
- private _warning;
14
12
  private _flash;
15
13
  private _flashDanger;
16
14
  private _compact;
@@ -25,14 +23,8 @@ export declare class ClrProgressBar {
25
23
  get fadeClass(): boolean;
26
24
  set clrLoop(value: boolean | string);
27
25
  get loopClass(): boolean;
28
- /** @deprecated since 2.0, remove in 4.0 */
29
- set clrWarning(value: boolean | string);
30
26
  get warningClass(): boolean;
31
- /** @deprecated since 2.0, remove in 4.0 */
32
- set clrSuccess(value: boolean | string);
33
27
  get successClass(): boolean;
34
- /** @deprecated since 2.0, remove in 4.0 */
35
- set clrDanger(value: boolean | string);
36
28
  get dangerClass(): boolean;
37
29
  set clrFlash(value: boolean | string);
38
30
  get flashClass(): boolean;
@@ -49,5 +41,5 @@ export declare class ClrProgressBar {
49
41
  */
50
42
  displayStringValue(): boolean;
51
43
  static ɵfac: i0.ɵɵFactoryDeclaration<ClrProgressBar, never>;
52
- static ɵcmp: i0.ɵɵComponentDeclaration<ClrProgressBar, "clr-progress-bar", never, { "max": "clrMax"; "displayval": "clrDisplayval"; "value": "clrValue"; "id": "id"; "clrCompact": "clrCompact"; "clrLabeled": "clrLabeled"; "clrFade": "clrFade"; "clrLoop": "clrLoop"; "clrWarning": "clrWarning"; "clrSuccess": "clrSuccess"; "clrDanger": "clrDanger"; "clrFlash": "clrFlash"; "clrFlashDanger": "clrFlashDanger"; }, {}, never, never, false, never>;
44
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClrProgressBar, "clr-progress-bar", never, { "max": "clrMax"; "displayval": "clrDisplayval"; "color": "clrColor"; "value": "clrValue"; "id": "id"; "clrCompact": "clrCompact"; "clrLabeled": "clrLabeled"; "clrFade": "clrFade"; "clrLoop": "clrLoop"; "clrFlash": "clrFlash"; "clrFlashDanger": "clrFlashDanger"; }, {}, never, never, false, never>;
53
45
  }
@@ -63,6 +63,14 @@ export interface ClrCommonStrings {
63
63
  * Alert levels: danger
64
64
  */
65
65
  danger: string;
66
+ /**
67
+ * Alert levels: neutral
68
+ */
69
+ neutral: string;
70
+ /**
71
+ * Alert levels: unknown
72
+ */
73
+ unknown: string;
66
74
  /**
67
75
  * Datagrid: row actions
68
76
  */
@@ -15,7 +15,6 @@ export declare class ClrWizard implements OnDestroy, AfterContentInit, DoCheck {
15
15
  pageCollection: PageCollectionService;
16
16
  buttonService: ButtonHubService;
17
17
  headerActionService: HeaderActionService;
18
- private elementRef;
19
18
  /**
20
19
  * Set the aria-label for the stepnav section of the wizard. Set using `[clrWizardStepnavAriaLabel]` input.
21
20
  */
@@ -29,12 +28,6 @@ export declare class ClrWizard implements OnDestroy, AfterContentInit, DoCheck {
29
28
  * in the top right corner. Set using `[clrWizardClosable]` input.
30
29
  */
31
30
  closable: boolean;
32
- /**
33
- * Used to communicate to the underlying modal that animations are not
34
- * wanted. Primary use is for the display of static/inline wizards.
35
- * Set using `[clrWizardPreventModalAnimation]` input.
36
- */
37
- _stopModalAnimations: boolean;
38
31
  /**
39
32
  * Emits when the wizard is opened or closed.
40
33
  * Listen via `(clrWizardOpenChange)` event.
@@ -85,7 +78,7 @@ export declare class ClrWizard implements OnDestroy, AfterContentInit, DoCheck {
85
78
  private _disableStepnav;
86
79
  private differ;
87
80
  private subscriptions;
88
- constructor(platformId: any, commonStrings: ClrCommonStringsService, navService: WizardNavigationService, pageCollection: PageCollectionService, buttonService: ButtonHubService, headerActionService: HeaderActionService, elementRef: ElementRef<HTMLElement>, differs: IterableDiffers);
81
+ constructor(platformId: any, commonStrings: ClrCommonStringsService, navService: WizardNavigationService, pageCollection: PageCollectionService, buttonService: ButtonHubService, headerActionService: HeaderActionService, differs: IterableDiffers);
89
82
  /**
90
83
  * Resets page completed states when navigating backwards.
91
84
  * Set using `[clrWizardForceForwardNavigation]` input.
@@ -138,8 +131,6 @@ export declare class ClrWizard implements OnDestroy, AfterContentInit, DoCheck {
138
131
  set currentPage(page: ClrWizardPage);
139
132
  get isLast(): boolean;
140
133
  get isFirst(): boolean;
141
- get isInline(): boolean;
142
- get stopModalAnimations(): string;
143
134
  ngAfterContentInit(): void;
144
135
  ngDoCheck(): void;
145
136
  ngOnDestroy(): void;
@@ -238,8 +229,7 @@ export declare class ClrWizard implements OnDestroy, AfterContentInit, DoCheck {
238
229
  private listenForFinishedChanges;
239
230
  private listenForPageChanges;
240
231
  private updateNavOnPageChanges;
241
- private initializeButtons;
242
232
  private emitWizardFinished;
243
233
  static ɵfac: i0.ɵɵFactoryDeclaration<ClrWizard, never>;
244
- static ɵcmp: i0.ɵɵComponentDeclaration<ClrWizard, "clr-wizard", never, { "stepnavAriaLabel": "clrWizardStepnavAriaLabel"; "size": "clrWizardSize"; "closable": "clrWizardClosable"; "_stopModalAnimations": "clrWizardPreventModalAnimation"; "forceForward": "clrWizardForceForwardNavigation"; "clrWizardOpen": "clrWizardOpen"; "stopNext": "clrWizardPreventDefaultNext"; "stopCancel": "clrWizardPreventDefaultCancel"; "stopNavigation": "clrWizardPreventNavigation"; "disableStepnav": "clrWizardDisableStepnav"; }, { "_openChanged": "clrWizardOpenChange"; "onCancel": "clrWizardOnCancel"; "wizardFinished": "clrWizardOnFinish"; "onReset": "clrWizardOnReset"; "currentPageChanged": "clrWizardCurrentPageChanged"; "onMoveNext": "clrWizardOnNext"; "onMovePrevious": "clrWizardOnPrevious"; }, ["wizardTitle", "pages", "headerActions"], ["clr-wizard-title", "clr-wizard-header-action", "*", "clr-wizard-button"], false, never>;
234
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClrWizard, "clr-wizard", never, { "stepnavAriaLabel": "clrWizardStepnavAriaLabel"; "size": "clrWizardSize"; "closable": "clrWizardClosable"; "forceForward": "clrWizardForceForwardNavigation"; "clrWizardOpen": "clrWizardOpen"; "stopNext": "clrWizardPreventDefaultNext"; "stopCancel": "clrWizardPreventDefaultCancel"; "stopNavigation": "clrWizardPreventNavigation"; "disableStepnav": "clrWizardDisableStepnav"; }, { "_openChanged": "clrWizardOpenChange"; "onCancel": "clrWizardOnCancel"; "wizardFinished": "clrWizardOnFinish"; "onReset": "clrWizardOnReset"; "currentPageChanged": "clrWizardCurrentPageChanged"; "onMoveNext": "clrWizardOnNext"; "onMovePrevious": "clrWizardOnPrevious"; }, ["wizardTitle", "pages", "headerActions"], ["clr-wizard-title", "clr-wizard-header-action", "*", "clr-wizard-button"], false, never>;
245
235
  }