@rivet-health/design-system 2.4.0 → 2.6.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.
@@ -0,0 +1,22 @@
1
+ import { EventEmitter, TemplateRef } from '@angular/core';
2
+ import { AnchoredPosition } from '../callout/callout-position';
3
+ import * as i0 from "@angular/core";
4
+ export declare const TooltipAnchoredPositions: readonly ["top-center", "center-right", "bottom-center", "center-left"];
5
+ export declare type TooltipAnchoredPosition = Extract<(typeof TooltipAnchoredPositions)[number], AnchoredPosition>;
6
+ export declare class TooltipComponent {
7
+ anchor: Element | DOMRect | null;
8
+ content?: string | TemplateRef<unknown>;
9
+ theme: 'dark' | 'light';
10
+ maxWidth: string;
11
+ preferredPosition: TooltipAnchoredPosition;
12
+ onMouseEnter: EventEmitter<MouseEvent>;
13
+ onMouseLeave: EventEmitter<MouseEvent>;
14
+ _onMouseLeave(evt: MouseEvent): void;
15
+ _onMouseEnter(evt: MouseEvent): void;
16
+ readonly isTemplate: typeof isTemplate;
17
+ readonly allowedPositions: ("top-center" | "center-right" | "bottom-center" | "center-left")[];
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "riv-tooltip", never, { "anchor": "anchor"; "content": "content"; "theme": "theme"; "maxWidth": "maxWidth"; "preferredPosition": "preferredPosition"; }, { "onMouseEnter": "onMouseEnter"; "onMouseLeave": "onMouseLeave"; }, never, never, false>;
20
+ }
21
+ declare function isTemplate(v: string | TemplateRef<unknown>): v is TemplateRef<unknown>;
22
+ export {};
@@ -0,0 +1,21 @@
1
+ import { ApplicationRef, ElementRef, TemplateRef } from '@angular/core';
2
+ import { TooltipAnchoredPosition } from './tooltip.component';
3
+ import * as i0 from "@angular/core";
4
+ export declare class TooltipDirective {
5
+ private readonly el;
6
+ private readonly applicationRef;
7
+ constructor(el: ElementRef, applicationRef: ApplicationRef);
8
+ rivTooltip?: string | TemplateRef<unknown>;
9
+ rivTooltipTheme: 'dark' | 'light';
10
+ rivTooltipMaxWidth: string;
11
+ rivTooltipPreferredPosition: TooltipAnchoredPosition;
12
+ closeDelay: number;
13
+ private tooltipRef?;
14
+ private closeTimeout?;
15
+ onMouseEnter(): void;
16
+ onMouseLeave(): void;
17
+ private initiateClose;
18
+ private cancelClose;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective, never>;
20
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[rivTooltip]", never, { "rivTooltip": "rivTooltip"; "rivTooltipTheme": "rivTooltipTheme"; "rivTooltipMaxWidth": "rivTooltipMaxWidth"; "rivTooltipPreferredPosition": "rivTooltipPreferredPosition"; "closeDelay": "closeDelay"; }, {}, never, never, false>;
21
+ }
@@ -17,10 +17,12 @@ import * as i15 from "./format/pipes/small-currency.pipe";
17
17
  import * as i16 from "./visualization/stacked-column/stacked-column.component";
18
18
  import * as i17 from "./content-toggle/text-toggle/text-toggle.component";
19
19
  import * as i18 from "./visualization/time-series/time-series.component";
20
- import * as i19 from "./visualization/zero-state/zero-state.component";
21
- import * as i20 from "@angular/common";
20
+ import * as i19 from "./modal/tooltip/tooltip.component";
21
+ import * as i20 from "./modal/tooltip/tooltip.directive";
22
+ import * as i21 from "./visualization/zero-state/zero-state.component";
23
+ import * as i22 from "@angular/common";
22
24
  export declare class RivModule {
23
25
  static ɵfac: i0.ɵɵFactoryDeclaration<RivModule, never>;
24
- static ɵmod: i0.ɵɵNgModuleDeclaration<RivModule, [typeof i1.CalloutComponent, typeof i2.CalloutDirective, typeof i3.CalloutOutletComponent, typeof i4.DataTableCellComponent, typeof i5.DataTableComponent, typeof i6.DataTableHeaderCellComponent, typeof i7.DataTableRowComponent, typeof i8.DaysPipe, typeof i9.DonutComponent, typeof i10.IconComponent, typeof i11.LegendItemComponent, typeof i12.MetricComponent, typeof i13.NumberPipe, typeof i14.PercentagePipe, typeof i15.SmallCurrencyPipe, typeof i16.StackedColumnComponent, typeof i17.TextToggleComponent, typeof i18.TimeSeriesComponent, typeof i19.ZeroStateComponent], [typeof i20.CommonModule], [typeof i1.CalloutComponent, typeof i2.CalloutDirective, typeof i3.CalloutOutletComponent, typeof i4.DataTableCellComponent, typeof i5.DataTableComponent, typeof i6.DataTableHeaderCellComponent, typeof i7.DataTableRowComponent, typeof i8.DaysPipe, typeof i9.DonutComponent, typeof i10.IconComponent, typeof i11.LegendItemComponent, typeof i12.MetricComponent, typeof i13.NumberPipe, typeof i14.PercentagePipe, typeof i15.SmallCurrencyPipe, typeof i16.StackedColumnComponent, typeof i17.TextToggleComponent, typeof i18.TimeSeriesComponent, typeof i19.ZeroStateComponent]>;
26
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RivModule, [typeof i1.CalloutComponent, typeof i2.CalloutDirective, typeof i3.CalloutOutletComponent, typeof i4.DataTableCellComponent, typeof i5.DataTableComponent, typeof i6.DataTableHeaderCellComponent, typeof i7.DataTableRowComponent, typeof i8.DaysPipe, typeof i9.DonutComponent, typeof i10.IconComponent, typeof i11.LegendItemComponent, typeof i12.MetricComponent, typeof i13.NumberPipe, typeof i14.PercentagePipe, typeof i15.SmallCurrencyPipe, typeof i16.StackedColumnComponent, typeof i17.TextToggleComponent, typeof i18.TimeSeriesComponent, typeof i19.TooltipComponent, typeof i20.TooltipDirective, typeof i21.ZeroStateComponent], [typeof i22.CommonModule], [typeof i1.CalloutComponent, typeof i2.CalloutDirective, typeof i3.CalloutOutletComponent, typeof i4.DataTableCellComponent, typeof i5.DataTableComponent, typeof i6.DataTableHeaderCellComponent, typeof i7.DataTableRowComponent, typeof i8.DaysPipe, typeof i9.DonutComponent, typeof i10.IconComponent, typeof i11.LegendItemComponent, typeof i12.MetricComponent, typeof i13.NumberPipe, typeof i14.PercentagePipe, typeof i15.SmallCurrencyPipe, typeof i16.StackedColumnComponent, typeof i17.TextToggleComponent, typeof i18.TimeSeriesComponent, typeof i19.TooltipComponent, typeof i20.TooltipDirective, typeof i21.ZeroStateComponent]>;
25
27
  static ɵinj: i0.ɵɵInjectorDeclaration<RivModule>;
26
28
  }
@@ -7,10 +7,11 @@ export declare class DonutComponent {
7
7
  displayLabel: string;
8
8
  displayValue: string;
9
9
  data: DonutDataPoint[];
10
+ displayTooltip?: string;
10
11
  readonly HEIGHT = 256;
11
12
  get arcPaths(): (string | null)[];
12
13
  getFillStyle(idx: number): string;
13
14
  get empty(): boolean;
14
15
  static ɵfac: i0.ɵɵFactoryDeclaration<DonutComponent, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<DonutComponent, "riv-donut", never, { "displayLabel": "displayLabel"; "displayValue": "displayValue"; "data": "data"; }, {}, never, never, false>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<DonutComponent, "riv-donut", never, { "displayLabel": "displayLabel"; "displayValue": "displayValue"; "data": "data"; "displayTooltip": "displayTooltip"; }, {}, never, never, false>;
16
17
  }
@@ -5,8 +5,9 @@ export declare class LegendItemComponent {
5
5
  colorToken: string;
6
6
  style: 'solid' | 'striped';
7
7
  visibility: 'visible' | 'hidden' | 'locked';
8
+ iconTooltip?: string;
8
9
  get backgroundColor(): string;
9
10
  itemClick: EventEmitter<any>;
10
11
  static ɵfac: i0.ɵɵFactoryDeclaration<LegendItemComponent, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<LegendItemComponent, "riv-legend-item", never, { "label": "label"; "colorToken": "colorToken"; "style": "style"; "visibility": "visibility"; }, { "itemClick": "itemClick"; }, never, never, false>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<LegendItemComponent, "riv-legend-item", never, { "label": "label"; "colorToken": "colorToken"; "style": "style"; "visibility": "visibility"; "iconTooltip": "iconTooltip"; }, { "itemClick": "itemClick"; }, never, never, false>;
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivet-health/design-system",
3
- "version": "2.4.0",
3
+ "version": "2.6.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.0.0",
6
6
  "@angular/core": "^14.0.0",
package/public-api.d.ts CHANGED
@@ -7,6 +7,8 @@ export * from './lib/icon/icon.component';
7
7
  export * from './lib/modal/callout/callout-outlet.component';
8
8
  export * from './lib/modal/callout/callout.component';
9
9
  export * from './lib/modal/callout/callout.directive';
10
+ export * from './lib/modal/tooltip/tooltip.component';
11
+ export * from './lib/modal/tooltip/tooltip.directive';
10
12
  export * from './lib/riv.module';
11
13
  export * from './lib/visualization/data-table/data-table-cell.component';
12
14
  export * from './lib/visualization/data-table/data-table-header-cell.component';