@impartner/design-components 1.0.1 → 1.0.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.
@@ -1,4 +1,4 @@
1
- import { QueryList } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, QueryList } from '@angular/core';
2
2
  import { BreadcrumbItemComponent } from './breadcrumb-item.component';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
@@ -6,13 +6,16 @@ import * as i0 from "@angular/core";
6
6
  * to a previous page. Items within must be wrapped with `BreadcrumbItemComponent` (`<impdc-breadcrumb-item`).
7
7
  * To use, import `BreadcrumbModule` or another module that imports and exports that module from `@impartner/design-components`.
8
8
  */
9
- export declare class BreadcrumbComponent {
9
+ export declare class BreadcrumbComponent implements AfterViewInit {
10
+ private _changeDetectorRef;
10
11
  /**
11
12
  * Sets the `aria-label` attribute for the Breadcrumb's `nav` element for accessibility.
12
13
  */
13
14
  label: string;
14
15
  private impdcBreadcrumb;
15
- protected _breadcrumbs: QueryList<BreadcrumbItemComponent>;
16
+ protected breadcrumbItems: QueryList<BreadcrumbItemComponent>;
17
+ constructor(_changeDetectorRef: ChangeDetectorRef);
18
+ ngAfterViewInit(): void;
16
19
  static ɵfac: i0.ɵɵFactoryDeclaration<BreadcrumbComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<BreadcrumbComponent, "impdc-breadcrumb, div[impdc-breadcrumb]", never, { "label": "label"; }, {}, ["_breadcrumbs"], never, false>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<BreadcrumbComponent, "impdc-breadcrumb, div[impdc-breadcrumb]", never, { "label": "label"; }, {}, ["breadcrumbItems"], never, false>;
18
21
  }
@@ -1,9 +1,9 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "./breadcrumb.component";
3
- import * as i2 from "./breadcrumb-item.component";
2
+ import * as i1 from "./breadcrumb-item.component";
3
+ import * as i2 from "./breadcrumb.component";
4
4
  import * as i3 from "@angular/common";
5
5
  export declare class BreadcrumbModule {
6
6
  static ɵfac: i0.ɵɵFactoryDeclaration<BreadcrumbModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<BreadcrumbModule, [typeof i1.BreadcrumbComponent, typeof i2.BreadcrumbItemComponent], [typeof i3.CommonModule], [typeof i1.BreadcrumbComponent, typeof i2.BreadcrumbItemComponent]>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<BreadcrumbModule, [typeof i1.BreadcrumbItemComponent, typeof i2.BreadcrumbComponent], [typeof i3.CommonModule], [typeof i1.BreadcrumbItemComponent, typeof i2.BreadcrumbComponent]>;
8
8
  static ɵinj: i0.ɵɵInjectorDeclaration<BreadcrumbModule>;
9
9
  }
@@ -0,0 +1,72 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * The `CardHeadingComponent` (`<impdc-data-card` or `<any impdc-data-card`) is to display data snapshots with support for
5
+ * previous values and differences.
6
+ * To use, import `DataCardModule` or another module that imports and exports that module from `@impartner/design-components`.
7
+ */
8
+ export declare class DataCardComponent {
9
+ /**
10
+ * The subject text for the Data Card.
11
+ */
12
+ title: string;
13
+ /**
14
+ * The current data value. Any number/currency format is supported.
15
+ */
16
+ current: string;
17
+ /**
18
+ * The previous data value. Any number/currency format is supported.
19
+ */
20
+ previous: string;
21
+ /**
22
+ * The difference between the current and previous values. A numerical or percentage value is preferred,
23
+ * but any number/currency format is supported.
24
+ */
25
+ difference: string;
26
+ /**
27
+ * Text for the link at the bottom of the Data Card. If provided, enables the `linkClicked` event to be emitted.
28
+ */
29
+ linkText: string;
30
+ /**
31
+ * When stacking multiple Data Card elements together, it's common to combine their borders.
32
+ */
33
+ sharedBorders: boolean;
34
+ /**
35
+ * Makes the title stand out more than it does by default.
36
+ */
37
+ titleAttention: boolean;
38
+ /**
39
+ * Determines if the difference value will be wrapped in a `rounded-pill`.
40
+ */
41
+ differencePill: boolean;
42
+ /**
43
+ * Changes the text color for the current value.
44
+ */
45
+ currentColor: string;
46
+ /**
47
+ * Changes the color of the icon.
48
+ */
49
+ iconColor: string;
50
+ /**
51
+ * Changes the color of the icon's background.
52
+ */
53
+ iconBgColor: string;
54
+ /**
55
+ * Emitted when the link text is clicked.
56
+ */
57
+ linkClicked: EventEmitter<MouseEvent | Event>;
58
+ /**
59
+ * Emitted when the corner content is clicked.
60
+ */
61
+ cornerClicked: EventEmitter<MouseEvent | Event>;
62
+ private get classDataCard();
63
+ private get classDataCardSharedBorders();
64
+ get differenceNumber(): number;
65
+ get differenceNegative(): boolean;
66
+ get differencePositive(): boolean;
67
+ get differenceDisplay(): string;
68
+ handleLinkClick(event: MouseEvent | Event): void;
69
+ handleCornerClick(event: MouseEvent | Event): void;
70
+ static ɵfac: i0.ɵɵFactoryDeclaration<DataCardComponent, never>;
71
+ static ɵcmp: i0.ɵɵComponentDeclaration<DataCardComponent, "impdc-data-card, [impdc-data-card]", never, { "title": "title"; "current": "current"; "previous": "previous"; "difference": "difference"; "linkText": "linkText"; "sharedBorders": "sharedBorders"; "differencePill": "differencePill"; "currentColor": "currentColor"; "iconColor": "iconColor"; "iconBgColor": "iconBgColor"; }, { "linkClicked": "linkClicked"; "cornerClicked": "cornerClicked"; }, never, ["[icon]", "*", "[corner]", "[footer]"], false>;
72
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./data-card.component";
3
+ import * as i2 from "@angular/common";
4
+ export declare class DataCardModule {
5
+ constructor();
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<DataCardModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DataCardModule, [typeof i1.DataCardComponent], [typeof i2.CommonModule], [typeof i1.DataCardComponent]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<DataCardModule>;
9
+ }
@@ -0,0 +1,2 @@
1
+ export { DataCardComponent } from './data-card.component';
2
+ export { DataCardModule } from './data-card.module';
package/lib/index.d.ts CHANGED
@@ -22,4 +22,5 @@ export * from './pagination';
22
22
  export * from './scrollable';
23
23
  export * from './size-detection';
24
24
  export * from './select-icon';
25
+ export * from './data-card';
25
26
  export { DesignComponentsModule };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@impartner/design-components",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "author": "Impartner",
5
5
  "license": "BSD-3-Clause",
6
6
  "private": false,