@skyux/indicators 6.13.0 → 6.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/documentation.json +823 -721
  2. package/esm2020/lib/modules/alert/alert.component.mjs +19 -14
  3. package/esm2020/lib/modules/chevron/chevron.component.mjs +11 -12
  4. package/esm2020/lib/modules/expansion-indicator/expansion-indicator.component.mjs +8 -8
  5. package/esm2020/lib/modules/icon/icon-stack-item.mjs +1 -1
  6. package/esm2020/lib/modules/icon/icon-stack.component.mjs +4 -1
  7. package/esm2020/lib/modules/icon/icon.component.mjs +1 -1
  8. package/esm2020/lib/modules/key-info/key-info.component.mjs +3 -3
  9. package/esm2020/lib/modules/label/label.component.mjs +82 -29
  10. package/esm2020/lib/modules/label/label.module.mjs +19 -4
  11. package/esm2020/lib/modules/shared/indicator-description-type.mjs +1 -1
  12. package/esm2020/lib/modules/shared/sky-indicators-resources.module.mjs +17 -1
  13. package/esm2020/lib/modules/status-indicator/status-indicator.component.mjs +52 -44
  14. package/esm2020/testing/alert/alert-harness-filters.mjs +2 -0
  15. package/esm2020/testing/alert/alert-harness.mjs +72 -0
  16. package/esm2020/testing/alert-fixture.mjs +2 -1
  17. package/esm2020/testing/public-api.mjs +7 -1
  18. package/esm2020/testing/tokens/token-harness-filters.mjs +2 -0
  19. package/esm2020/testing/tokens/token-harness.mjs +44 -0
  20. package/esm2020/testing/tokens/tokens-harness-filters.mjs +2 -0
  21. package/esm2020/testing/tokens/tokens-harness.mjs +42 -0
  22. package/fesm2015/skyux-indicators-testing.mjs +179 -1
  23. package/fesm2015/skyux-indicators-testing.mjs.map +1 -1
  24. package/fesm2015/skyux-indicators.mjs +199 -106
  25. package/fesm2015/skyux-indicators.mjs.map +1 -1
  26. package/fesm2020/skyux-indicators-testing.mjs +157 -1
  27. package/fesm2020/skyux-indicators-testing.mjs.map +1 -1
  28. package/fesm2020/skyux-indicators.mjs +199 -106
  29. package/fesm2020/skyux-indicators.mjs.map +1 -1
  30. package/lib/modules/alert/alert.component.d.ts +8 -8
  31. package/lib/modules/chevron/chevron.component.d.ts +4 -5
  32. package/lib/modules/expansion-indicator/expansion-indicator.component.d.ts +2 -3
  33. package/lib/modules/icon/icon-stack-item.d.ts +3 -0
  34. package/lib/modules/icon/icon-stack.component.d.ts +3 -0
  35. package/lib/modules/icon/icon.component.d.ts +5 -4
  36. package/lib/modules/label/label.component.d.ts +20 -5
  37. package/lib/modules/label/label.module.d.ts +4 -2
  38. package/lib/modules/shared/indicator-description-type.d.ts +1 -1
  39. package/lib/modules/status-indicator/status-indicator.component.d.ts +5 -10
  40. package/package.json +6 -5
  41. package/testing/alert/alert-harness-filters.d.ts +6 -0
  42. package/testing/alert/alert-harness.d.ts +36 -0
  43. package/testing/alert-fixture.d.ts +5 -4
  44. package/testing/public-api.d.ts +6 -0
  45. package/testing/tokens/token-harness-filters.d.ts +10 -0
  46. package/testing/tokens/token-harness.d.ts +26 -0
  47. package/testing/tokens/tokens-harness-filters.d.ts +6 -0
  48. package/testing/tokens/tokens-harness.d.ts +27 -0
@@ -1,34 +1,34 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { SkyIconStackItem } from '../icon/icon-stack-item';
3
+ import { SkyIndicatorIconType } from '../shared/indicator-icon-type';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class SkyAlertComponent implements OnInit {
6
+ #private;
5
7
  /**
6
8
  * Specifies a style for the alert to determine the icon and background color.
7
9
  * The valid options are `danger`, `info`, `success`, and `warning`.
8
10
  * @default "warning"
9
11
  */
10
- set alertType(value: string);
11
- get alertType(): string;
12
+ set alertType(value: string | undefined);
12
13
  /**
13
14
  * Indicates whether to include a close button for users to dismiss the alert.
14
15
  * @default false
15
16
  */
16
- closeable: boolean;
17
+ closeable: boolean | undefined;
17
18
  /**
18
19
  * Indicates whether the alert is closed.
19
20
  * @default false
20
21
  */
21
- closed: boolean;
22
+ closed: boolean | undefined;
22
23
  /**
23
24
  * Fires when users close the alert.
24
25
  */
25
26
  closedChange: EventEmitter<boolean>;
26
- alertBaseIcon: SkyIconStackItem;
27
- alertTopIcon: SkyIconStackItem;
28
- private _alertType;
27
+ alertBaseIcon: SkyIconStackItem | undefined;
28
+ alertTopIcon: SkyIconStackItem | undefined;
29
+ alertTypeOrDefault: SkyIndicatorIconType;
29
30
  ngOnInit(): void;
30
31
  close(): void;
31
- private updateAlertIcon;
32
32
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyAlertComponent, never>;
33
33
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyAlertComponent, "sky-alert", never, { "alertType": "alertType"; "closeable": "closeable"; "closed": "closed"; }, { "closedChange": "closedChange"; }, never, ["*"]>;
34
34
  }
@@ -10,17 +10,16 @@ export declare class SkyChevronComponent {
10
10
  * This sets the chevron's aria-controls attribute
11
11
  * [to support accessibility](https://developer.blackbaud.com/skyux/learn/accessibility).
12
12
  */
13
- ariaControls: string;
13
+ ariaControls: string | undefined;
14
14
  /**
15
15
  * Specifies an ARIA label for the chevron. This sets the chevron's aria-label attribute
16
16
  * [to support accessibility](https://developer.blackbaud.com/skyux/learn/accessibility).
17
17
  */
18
- ariaLabel: string;
18
+ ariaLabel: string | undefined;
19
19
  /**
20
20
  * Specifies whether the chevron points up or down.
21
21
  */
22
- set direction(value: string);
23
- get direction(): string;
22
+ set direction(value: string | undefined);
24
23
  /**
25
24
  * Indicates whether to disable the chevron button.
26
25
  */
@@ -30,7 +29,7 @@ export declare class SkyChevronComponent {
30
29
  */
31
30
  directionChange: EventEmitter<string>;
32
31
  ariaExpanded: boolean;
33
- private _direction;
32
+ directionOrDefault: string;
34
33
  chevronClick(event: Event): void;
35
34
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyChevronComponent, never>;
36
35
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyChevronComponent, "sky-chevron", never, { "ariaControls": "ariaControls"; "ariaLabel": "ariaLabel"; "direction": "direction"; "disabled": "disabled"; }, { "directionChange": "directionChange"; }, never, never>;
@@ -7,9 +7,8 @@ export declare class SkyExpansionIndicatorComponent {
7
7
  /**
8
8
  * Specifies whether the chevron points up or down.
9
9
  */
10
- set direction(value: string);
11
- get direction(): string;
12
- private _direction;
10
+ set direction(value: string | undefined);
11
+ directionOrDefault: string;
13
12
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyExpansionIndicatorComponent, never>;
14
13
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyExpansionIndicatorComponent, "sky-expansion-indicator", never, { "direction": "direction"; }, {}, never, never>;
15
14
  }
@@ -1,4 +1,7 @@
1
1
  import { SkyIconType } from './types/icon-type';
2
+ /**
3
+ * @internal
4
+ */
2
5
  export interface SkyIconStackItem {
3
6
  /**
4
7
  * Specifies the name of
@@ -1,5 +1,8 @@
1
1
  import { SkyIconStackItem } from './icon-stack-item';
2
2
  import * as i0 from "@angular/core";
3
+ /**
4
+ * @internal
5
+ */
3
6
  export declare class SkyIconStackComponent {
4
7
  /**
5
8
  * Specifies the size of the icon using
@@ -4,8 +4,8 @@ import * as i0 from "@angular/core";
4
4
  export declare class SkyIconComponent {
5
5
  /**
6
6
  * Specifies the name of
7
- * [the Font Awesome 4.7 icon](https://fontawesome.com/v4.7/icons/) to
8
- * display. Do not specify the `fa fa-` classes.
7
+ * [the Font Awesome 4.7 icon](https://fontawesome.com/v4.7/icons/) or the SKY UX icon to
8
+ * display. When specifying a Font Awesome icon, do not prefix the name with `fa-`.
9
9
  * @required
10
10
  */
11
11
  icon: string | undefined;
@@ -18,16 +18,17 @@ export declare class SkyIconComponent {
18
18
  iconType: SkyIconType;
19
19
  /**
20
20
  * Specifies the size of the icon using
21
- * [Font Awesome sizes](https://fontawesome.com/how-to-use/on-the-web/styling/sizing-icons).
21
+ * [Font Awesome sizes](https://fontawesome.com/how-to-use/on-the-web/styling/sizing-icons). Do not prefix the size with `fa-`.
22
22
  */
23
23
  size: string;
24
24
  /**
25
25
  * Indicates whether the icon has a fixed width.
26
+ * @default false
26
27
  */
27
28
  fixedWidth: boolean;
28
29
  /**
29
30
  * Specifies the icon variant (`"line"` or `"solid"`). If the variant doesn't exist for the
30
- * specified icon, the normal icon is displayed.
31
+ * specified icon, the normal icon is displayed. This property only applies when using SKY UX icons.
31
32
  */
32
33
  variant: SkyIconVariantType;
33
34
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyIconComponent, never>;
@@ -1,19 +1,34 @@
1
+ import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
2
+ import { SkyLibResourcesService } from '@skyux/i18n';
1
3
  import { SkyIconStackItem } from '../icon/icon-stack-item';
4
+ import { SkyIndicatorDescriptionType } from '../shared/indicator-description-type';
2
5
  import { SkyLabelType } from './label-type';
3
6
  import * as i0 from "@angular/core";
4
- export declare class SkyLabelComponent {
7
+ export declare class SkyLabelComponent implements OnDestroy, OnInit {
5
8
  #private;
6
9
  /**
7
10
  * The type of label to display.
8
- * @required
11
+ * @default 'info'
9
12
  */
10
13
  set labelType(value: SkyLabelType | undefined);
11
- get labelType(): SkyLabelType | undefined;
14
+ /**
15
+ * Specifies the predefined text to be read by screen readers for users who cannot see the indicator icon.
16
+ * This property is optional but will be required in future versions of SKY UX.
17
+ */
18
+ set descriptionType(value: SkyIndicatorDescriptionType | undefined);
19
+ /**
20
+ * Specifies the text to be read by screen readers for users who cannot see
21
+ * the indicator icon when `descriptionType` is `custom`.
22
+ */
23
+ set customDescription(value: string | undefined);
12
24
  baseIcon: SkyIconStackItem | undefined;
25
+ descriptionComputed: string | undefined;
13
26
  icon: string | undefined;
14
27
  labelTypeOrDefault: SkyLabelType;
15
28
  topIcon: SkyIconStackItem | undefined;
16
- private updateIcon;
29
+ constructor(changeDetector: ChangeDetectorRef, resources: SkyLibResourcesService);
30
+ ngOnInit(): void;
31
+ ngOnDestroy(): void;
17
32
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyLabelComponent, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<SkyLabelComponent, "sky-label", never, { "labelType": "labelType"; }, {}, never, ["*"]>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkyLabelComponent, "sky-label", never, { "labelType": "labelType"; "descriptionType": "descriptionType"; "customDescription": "customDescription"; }, {}, never, ["*"]>;
19
34
  }
@@ -1,9 +1,11 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./label.component";
3
3
  import * as i2 from "@angular/common";
4
- import * as i3 from "../icon/icon.module";
4
+ import * as i3 from "@skyux/i18n";
5
+ import * as i4 from "../icon/icon.module";
6
+ import * as i5 from "../shared/sky-indicators-resources.module";
5
7
  export declare class SkyLabelModule {
6
8
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyLabelModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<SkyLabelModule, [typeof i1.SkyLabelComponent], [typeof i2.CommonModule, typeof i3.SkyIconModule], [typeof i1.SkyLabelComponent]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SkyLabelModule, [typeof i1.SkyLabelComponent], [typeof i2.CommonModule, typeof i3.SkyI18nModule, typeof i4.SkyIconModule, typeof i5.SkyIndicatorsResourcesModule], [typeof i1.SkyLabelComponent]>;
8
10
  static ɵinj: i0.ɵɵInjectorDeclaration<SkyLabelModule>;
9
11
  }
@@ -1 +1 @@
1
- export declare type SkyIndicatorDescriptionType = 'completed' | 'custom' | 'error' | 'important-info' | 'none' | 'warning';
1
+ export declare type SkyIndicatorDescriptionType = 'attention' | 'caution' | 'completed' | 'custom' | 'danger' | 'error' | 'important-info' | 'important-warning' | 'none' | 'success' | 'warning';
@@ -1,4 +1,4 @@
1
- import { ChangeDetectorRef } from '@angular/core';
1
+ import { ChangeDetectorRef, OnInit } from '@angular/core';
2
2
  import { SkyLibResourcesService } from '@skyux/i18n';
3
3
  import { SkyIconStackItem } from '../icon/icon-stack-item';
4
4
  import { SkyIndicatorDescriptionType } from '../shared/indicator-description-type';
@@ -10,15 +10,13 @@ import * as i0 from "@angular/core";
10
10
  * `sky-help-inline`, in the `sky-status-indicator` element and a `sky-control-help`
11
11
  * CSS class on that help button element.
12
12
  */
13
- export declare class SkyStatusIndicatorComponent {
14
- private changeDetector;
15
- private resources;
13
+ export declare class SkyStatusIndicatorComponent implements OnInit {
14
+ #private;
16
15
  /**
17
16
  * Specifies a style for the status indicator to determine the icon.
18
17
  * @default "warning"
19
18
  */
20
19
  set indicatorType(value: SkyIndicatorIconType);
21
- get indicatorType(): SkyIndicatorIconType;
22
20
  /**
23
21
  * Specifies the predefined text to be read by screen readers for users
24
22
  * who cannot see the indicator icon.
@@ -35,13 +33,10 @@ export declare class SkyStatusIndicatorComponent {
35
33
  descriptionComputed: string;
36
34
  baseIcon: SkyIconStackItem;
37
35
  icon: string;
36
+ indicatorTypeOrDefault: SkyIndicatorIconType;
38
37
  topIcon: SkyIconStackItem;
39
- private _indicatorType;
40
- private _descriptionType;
41
- private _customDescription;
42
38
  constructor(changeDetector: ChangeDetectorRef, resources: SkyLibResourcesService);
43
- private updateIcon;
44
- private updateDescriptionComputed;
39
+ ngOnInit(): void;
45
40
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyStatusIndicatorComponent, never>;
46
41
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyStatusIndicatorComponent, "sky-status-indicator", never, { "indicatorType": "indicatorType"; "descriptionType": "descriptionType"; "customDescription": "customDescription"; }, {}, never, ["*", ".sky-control-help"]>;
47
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/indicators",
3
- "version": "6.13.0",
3
+ "version": "6.16.0",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -41,13 +41,14 @@
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@angular/animations": "^13.3.2",
44
+ "@angular/cdk": "^13.3.2",
44
45
  "@angular/common": "^13.3.2",
45
46
  "@angular/core": "^13.3.2",
46
47
  "@angular/platform-browser": "^13.3.2",
47
- "@skyux-sdk/testing": "6.13.0",
48
- "@skyux/core": "6.13.0",
49
- "@skyux/i18n": "6.13.0",
50
- "@skyux/theme": "6.13.0"
48
+ "@skyux-sdk/testing": "6.16.0",
49
+ "@skyux/core": "6.16.0",
50
+ "@skyux/i18n": "6.16.0",
51
+ "@skyux/theme": "6.16.0"
51
52
  },
52
53
  "dependencies": {
53
54
  "tslib": "^2.3.1"
@@ -0,0 +1,6 @@
1
+ import { SkyHarnessFilters } from '@skyux/core/testing';
2
+ /**
3
+ * A set of criteria that can be used to filter a list of SkyAlertHarness instances.
4
+ */
5
+ export interface SkyAlertHarnessFilters extends SkyHarnessFilters {
6
+ }
@@ -0,0 +1,36 @@
1
+ import { HarnessPredicate } from '@angular/cdk/testing';
2
+ import { SkyComponentHarness } from '@skyux/core/testing';
3
+ import { SkyIndicatorIconType } from '@skyux/indicators';
4
+ import { SkyAlertHarnessFilters } from './alert-harness-filters';
5
+ /**
6
+ * Harness for interacting with an alert component in tests.
7
+ */
8
+ export declare class SkyAlertHarness extends SkyComponentHarness {
9
+ #private;
10
+ static hostSelector: string;
11
+ /**
12
+ * Gets a `HarnessPredicate` that can be used to search for a
13
+ * `SkyAlertHarness` that meets certain criteria.
14
+ */
15
+ static with(filters: SkyAlertHarnessFilters): HarnessPredicate<SkyAlertHarness>;
16
+ /**
17
+ * Gets the current alert type.
18
+ */
19
+ getAlertType(): Promise<SkyIndicatorIconType | undefined>;
20
+ /**
21
+ * Gets the current alert text.
22
+ */
23
+ getText(): Promise<string>;
24
+ /**
25
+ * Closes the alert.
26
+ */
27
+ close(): Promise<void>;
28
+ /**
29
+ * Indicates whether the user has closed the alert.
30
+ */
31
+ isClosed(): Promise<boolean>;
32
+ /**
33
+ * Indicates whether the user can close the alert.
34
+ */
35
+ isCloseable(): Promise<boolean>;
36
+ }
@@ -1,16 +1,17 @@
1
1
  import { ComponentFixture } from '@angular/core/testing';
2
2
  /**
3
3
  * Allows interaction with a SKY UX alert component.
4
+ * @deprecated Use `SkyAlertHarness` instead.
4
5
  */
5
6
  export declare class SkyAlertFixture {
6
7
  /**
7
8
  * The alert's current text.
8
9
  */
9
- get text(): string;
10
+ get text(): string | undefined;
10
11
  /**
11
12
  * A flag indicating whether the alert can be closed.
12
13
  */
13
- get closeable(): boolean;
14
+ get closeable(): boolean | undefined;
14
15
  /**
15
16
  * Returns a flag indicating whether the alert is closed.
16
17
  */
@@ -18,9 +19,9 @@ export declare class SkyAlertFixture {
18
19
  /**
19
20
  * The alert's current type.
20
21
  */
21
- get alertType(): string;
22
+ get alertType(): string | undefined;
22
23
  private debugEl;
23
- constructor(fixture: ComponentFixture<any>, skyTestId: string);
24
+ constructor(fixture: ComponentFixture<unknown>, skyTestId: string);
24
25
  /**
25
26
  * Closes the alert. If the alert is not closeable, an error is thrown.
26
27
  */
@@ -1,3 +1,9 @@
1
+ export * from './tokens/token-harness';
2
+ export * from './tokens/token-harness-filters';
3
+ export * from './tokens/tokens-harness';
4
+ export * from './tokens/tokens-harness-filters';
1
5
  export * from './alert-fixture';
2
6
  export * from './label-fixture';
3
7
  export * from './wait-fixture';
8
+ export * from './alert/alert-harness';
9
+ export * from './alert/alert-harness-filters';
@@ -0,0 +1,10 @@
1
+ import { BaseHarnessFilters } from '@angular/cdk/testing';
2
+ /**
3
+ * A set of criteria that can be used to filter a list of `SkyTokenHarness` instances.
4
+ */
5
+ export interface SkyTokenHarnessFilters extends BaseHarnessFilters {
6
+ /**
7
+ * Only find instances whose text content matches the given value.
8
+ */
9
+ text?: string | RegExp;
10
+ }
@@ -0,0 +1,26 @@
1
+ import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
2
+ import { SkyTokenHarnessFilters } from './token-harness-filters';
3
+ /**
4
+ * Harness for interacting with a token component in tests.
5
+ */
6
+ export declare class SkyTokenHarness extends ComponentHarness {
7
+ #private;
8
+ static hostSelector: string;
9
+ /**
10
+ * Gets a `HarnessPredicate` that can be used to search for a
11
+ * `SkyTokenHarness` that meets certain criteria.
12
+ */
13
+ static with(filters: SkyTokenHarnessFilters): HarnessPredicate<SkyTokenHarness>;
14
+ /**
15
+ * Dismisses the token.
16
+ */
17
+ dismiss(): Promise<void>;
18
+ /**
19
+ * Returns the text content of the token.
20
+ */
21
+ getText(): Promise<string>;
22
+ /**
23
+ * Whether the token is dismissible.
24
+ */
25
+ isDismissible(): Promise<boolean>;
26
+ }
@@ -0,0 +1,6 @@
1
+ import { SkyHarnessFilters } from '@skyux/core/testing';
2
+ /**
3
+ * A set of criteria that can be used to filter a list of `SkyTokensHarness` instances.
4
+ */
5
+ export interface SkyTokensHarnessFilters extends SkyHarnessFilters {
6
+ }
@@ -0,0 +1,27 @@
1
+ import { SkyComponentHarness } from '@skyux/core/testing';
2
+ import { SkyTokenHarness } from './token-harness';
3
+ import { SkyTokenHarnessFilters } from './token-harness-filters';
4
+ import { SkyTokensHarnessFilters } from './tokens-harness-filters';
5
+ /**
6
+ * Harness for interacting with a tokens component in tests.
7
+ */
8
+ export declare class SkyTokensHarness extends SkyComponentHarness {
9
+ static hostSelector: string;
10
+ /**
11
+ * Gets a `HarnessPredicate` that can be used to search for a
12
+ * `SkyTokensHarness` that meets certain criteria.
13
+ */
14
+ static with(filters: SkyTokensHarnessFilters): import("@angular/cdk/testing").HarnessPredicate<SkyTokensHarness>;
15
+ /**
16
+ * Dismisses all tokens, or tokens that meet certain criteria.
17
+ */
18
+ dismissTokens(filters?: SkyTokenHarnessFilters): Promise<void>;
19
+ /**
20
+ * Returns a list of tokens.
21
+ */
22
+ getTokens(filters?: SkyTokenHarnessFilters): Promise<SkyTokenHarness[]>;
23
+ /**
24
+ * Returns the text content of all tokens.
25
+ */
26
+ getTokensText(): Promise<string[]>;
27
+ }