@rivet-health/design-system 2.5.0 → 2.7.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.
- package/esm2020/lib/modal/tooltip/tooltip.component.mjs +16 -3
- package/esm2020/lib/modal/tooltip/tooltip.directive.mjs +13 -5
- package/esm2020/lib/riv.module.mjs +6 -1
- package/esm2020/lib/visualization/donut/donut.component.mjs +1 -1
- package/esm2020/lib/visualization/legend-item/legend-item.component.mjs +1 -1
- package/esm2020/lib/visualization/metric/metric.component.mjs +3 -3
- package/esm2020/lib/visualization/trend/trend.component.mjs +35 -0
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/rivet-health-design-system.mjs +68 -11
- package/fesm2015/rivet-health-design-system.mjs.map +1 -1
- package/fesm2020/rivet-health-design-system.mjs +68 -11
- package/fesm2020/rivet-health-design-system.mjs.map +1 -1
- package/lib/modal/tooltip/tooltip.component.d.ts +7 -1
- package/lib/modal/tooltip/tooltip.directive.d.ts +7 -4
- package/lib/riv.module.d.ts +10 -9
- package/lib/visualization/metric/metric.component.d.ts +1 -1
- package/lib/visualization/trend/trend.component.d.ts +9 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -675,13 +675,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
675
675
|
}]
|
|
676
676
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: CalloutService }]; } });
|
|
677
677
|
|
|
678
|
+
const TooltipAnchoredPositions = [
|
|
679
|
+
'top-center',
|
|
680
|
+
'center-right',
|
|
681
|
+
'bottom-center',
|
|
682
|
+
'center-left',
|
|
683
|
+
];
|
|
678
684
|
class TooltipComponent {
|
|
679
685
|
constructor() {
|
|
680
686
|
this.anchor = null;
|
|
681
687
|
this.theme = 'dark';
|
|
688
|
+
this.maxWidth = 'calc(var(--base-grid-size) * 50)';
|
|
689
|
+
this.preferredPosition = 'top-center';
|
|
682
690
|
this.onMouseEnter = new EventEmitter();
|
|
683
691
|
this.onMouseLeave = new EventEmitter();
|
|
684
692
|
this.isTemplate = isTemplate;
|
|
693
|
+
this.allowedPositions = [...TooltipAnchoredPositions];
|
|
685
694
|
}
|
|
686
695
|
_onMouseLeave(evt) {
|
|
687
696
|
this.onMouseLeave.emit(evt);
|
|
@@ -691,16 +700,20 @@ class TooltipComponent {
|
|
|
691
700
|
}
|
|
692
701
|
}
|
|
693
702
|
TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
694
|
-
TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TooltipComponent, selector: "riv-tooltip", inputs: { anchor: "anchor", content: "content", theme: "theme" }, outputs: { onMouseEnter: "onMouseEnter", onMouseLeave: "onMouseLeave" }, host: { listeners: { "mouseleave": "_onMouseLeave()", "mouseenter": "_onMouseEnter()" } }, ngImport: i0, template: "<riv-callout\n [anchor]=\"anchor\"\n [preferredPosition]=\"
|
|
703
|
+
TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TooltipComponent, selector: "riv-tooltip", inputs: { anchor: "anchor", content: "content", theme: "theme", maxWidth: "maxWidth", preferredPosition: "preferredPosition" }, outputs: { onMouseEnter: "onMouseEnter", onMouseLeave: "onMouseLeave" }, host: { listeners: { "mouseleave": "_onMouseLeave()", "mouseenter": "_onMouseEnter()" } }, ngImport: i0, template: "<riv-callout\n [anchor]=\"anchor\"\n [preferredPosition]=\"preferredPosition\"\n [allowedPositions]=\"allowedPositions\"\n [isModal]=\"false\"\n [theme]=\"theme\"\n>\n <ng-container *ngIf=\"content && isTemplate(content); else stringContent\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </ng-container>\n <ng-template #stringContent>\n <div class=\"string-content\" [style.max-width]=\"maxWidth\">\n {{ content }}\n </div>\n </ng-template>\n</riv-callout>\n", styles: [".string-content{padding:var(--size-xsmall) var(--size-small)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CalloutComponent, selector: "riv-callout", inputs: ["anchor", "isModal", "preferredPosition", "allowedPositions", "fallbackDirection", "showCaret", "theme"], outputs: ["close"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
695
704
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
696
705
|
type: Component,
|
|
697
|
-
args: [{ selector: 'riv-tooltip', changeDetection: ChangeDetectionStrategy.OnPush, template: "<riv-callout\n [anchor]=\"anchor\"\n [preferredPosition]=\"
|
|
706
|
+
args: [{ selector: 'riv-tooltip', changeDetection: ChangeDetectionStrategy.OnPush, template: "<riv-callout\n [anchor]=\"anchor\"\n [preferredPosition]=\"preferredPosition\"\n [allowedPositions]=\"allowedPositions\"\n [isModal]=\"false\"\n [theme]=\"theme\"\n>\n <ng-container *ngIf=\"content && isTemplate(content); else stringContent\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </ng-container>\n <ng-template #stringContent>\n <div class=\"string-content\" [style.max-width]=\"maxWidth\">\n {{ content }}\n </div>\n </ng-template>\n</riv-callout>\n", styles: [".string-content{padding:var(--size-xsmall) var(--size-small)}\n"] }]
|
|
698
707
|
}], propDecorators: { anchor: [{
|
|
699
708
|
type: Input
|
|
700
709
|
}], content: [{
|
|
701
710
|
type: Input
|
|
702
711
|
}], theme: [{
|
|
703
712
|
type: Input
|
|
713
|
+
}], maxWidth: [{
|
|
714
|
+
type: Input
|
|
715
|
+
}], preferredPosition: [{
|
|
716
|
+
type: Input
|
|
704
717
|
}], onMouseEnter: [{
|
|
705
718
|
type: Output
|
|
706
719
|
}], onMouseLeave: [{
|
|
@@ -721,7 +734,9 @@ class TooltipDirective {
|
|
|
721
734
|
this.el = el;
|
|
722
735
|
this.applicationRef = applicationRef;
|
|
723
736
|
this.rivTooltipTheme = 'dark';
|
|
724
|
-
this.
|
|
737
|
+
this.rivTooltipMaxWidth = 'calc(var(--base-grid-size) * 50)';
|
|
738
|
+
this.rivTooltipPreferredPosition = 'top-center';
|
|
739
|
+
this.rivTooltipCloseDelay = 100;
|
|
725
740
|
}
|
|
726
741
|
onMouseEnter() {
|
|
727
742
|
if (!this.rivTooltip)
|
|
@@ -736,6 +751,8 @@ class TooltipDirective {
|
|
|
736
751
|
tooltip.instance.anchor = this.el.nativeElement;
|
|
737
752
|
tooltip.instance.content = this.rivTooltip;
|
|
738
753
|
tooltip.instance.theme = this.rivTooltipTheme;
|
|
754
|
+
tooltip.instance.maxWidth = this.rivTooltipMaxWidth;
|
|
755
|
+
tooltip.instance.preferredPosition = this.rivTooltipPreferredPosition;
|
|
739
756
|
tooltip.instance.onMouseEnter.subscribe(this.cancelClose.bind(this));
|
|
740
757
|
tooltip.instance.onMouseLeave.subscribe(this.initiateClose.bind(this));
|
|
741
758
|
this.tooltipRef = tooltip;
|
|
@@ -749,14 +766,14 @@ class TooltipDirective {
|
|
|
749
766
|
var _a;
|
|
750
767
|
(_a = this.tooltipRef) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
751
768
|
this.tooltipRef = undefined;
|
|
752
|
-
}, this.
|
|
769
|
+
}, this.rivTooltipCloseDelay);
|
|
753
770
|
}
|
|
754
771
|
cancelClose() {
|
|
755
772
|
window.clearTimeout(this.closeTimeout);
|
|
756
773
|
}
|
|
757
774
|
}
|
|
758
775
|
TooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
759
|
-
TooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: TooltipDirective, selector: "[rivTooltip]", inputs: { rivTooltip: "rivTooltip", rivTooltipTheme: "rivTooltipTheme",
|
|
776
|
+
TooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: TooltipDirective, selector: "[rivTooltip]", inputs: { rivTooltip: "rivTooltip", rivTooltipTheme: "rivTooltipTheme", rivTooltipMaxWidth: "rivTooltipMaxWidth", rivTooltipPreferredPosition: "rivTooltipPreferredPosition", rivTooltipCloseDelay: "rivTooltipCloseDelay" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, ngImport: i0 });
|
|
760
777
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
761
778
|
type: Directive,
|
|
762
779
|
args: [{
|
|
@@ -766,7 +783,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
766
783
|
type: Input
|
|
767
784
|
}], rivTooltipTheme: [{
|
|
768
785
|
type: Input
|
|
769
|
-
}],
|
|
786
|
+
}], rivTooltipMaxWidth: [{
|
|
787
|
+
type: Input
|
|
788
|
+
}], rivTooltipPreferredPosition: [{
|
|
789
|
+
type: Input
|
|
790
|
+
}], rivTooltipCloseDelay: [{
|
|
770
791
|
type: Input
|
|
771
792
|
}], onMouseEnter: [{
|
|
772
793
|
type: HostListener,
|
|
@@ -872,7 +893,7 @@ class DonutComponent {
|
|
|
872
893
|
}
|
|
873
894
|
}
|
|
874
895
|
DonutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DonutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
875
|
-
DonutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DonutComponent, selector: "riv-donut", inputs: { displayLabel: "displayLabel", displayValue: "displayValue", data: "data", displayTooltip: "displayTooltip" }, ngImport: i0, template: "<div *ngIf=\"!empty; else zeroState\" class=\"container\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"100%\"\n [attr.height]=\"HEIGHT\"\n viewBox=\"-128 -128 256 256\"\n >\n <path\n *ngFor=\"let path of arcPaths; let i = index\"\n [attr.d]=\"path\"\n [attr.fill]=\"getFillStyle(i)\"\n ></path>\n </svg>\n <div class=\"display\">\n <div class=\"value\" [rivTooltip]=\"displayTooltip\">{{ displayValue }}</div>\n <div class=\"label\">{{ displayLabel }}</div>\n </div>\n</div>\n\n<ng-template #zeroState>\n <riv-zero-state></riv-zero-state>\n</ng-template>\n", styles: [".container{display:grid;grid-template-rows:1fr;grid-template-columns:1fr;justify-items:center;align-items:center}svg{grid-row:1 / 1;grid-column:1 / 1}.display{grid-row:1 / 1;grid-column:1 / 1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--size-small)}.value{font-size:var(--type-6-font-size);line-height:var(--type-6-line-height-0);font-weight:var(--font-weight-heavy)}.label{font-size:var(--type-1-font-size);line-height:var(--type-1-line-height-0);color:var(--type-light-low-contrast)}.value,.label{text-shadow:0 0 var(--size-small) var(--surface-light-0),0 0 var(--size-xsmall) var(--surface-light-0)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: TooltipDirective, selector: "[rivTooltip]", inputs: ["rivTooltip", "rivTooltipTheme", "
|
|
896
|
+
DonutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DonutComponent, selector: "riv-donut", inputs: { displayLabel: "displayLabel", displayValue: "displayValue", data: "data", displayTooltip: "displayTooltip" }, ngImport: i0, template: "<div *ngIf=\"!empty; else zeroState\" class=\"container\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"100%\"\n [attr.height]=\"HEIGHT\"\n viewBox=\"-128 -128 256 256\"\n >\n <path\n *ngFor=\"let path of arcPaths; let i = index\"\n [attr.d]=\"path\"\n [attr.fill]=\"getFillStyle(i)\"\n ></path>\n </svg>\n <div class=\"display\">\n <div class=\"value\" [rivTooltip]=\"displayTooltip\">{{ displayValue }}</div>\n <div class=\"label\">{{ displayLabel }}</div>\n </div>\n</div>\n\n<ng-template #zeroState>\n <riv-zero-state></riv-zero-state>\n</ng-template>\n", styles: [".container{display:grid;grid-template-rows:1fr;grid-template-columns:1fr;justify-items:center;align-items:center}svg{grid-row:1 / 1;grid-column:1 / 1}.display{grid-row:1 / 1;grid-column:1 / 1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--size-small)}.value{font-size:var(--type-6-font-size);line-height:var(--type-6-line-height-0);font-weight:var(--font-weight-heavy)}.label{font-size:var(--type-1-font-size);line-height:var(--type-1-line-height-0);color:var(--type-light-low-contrast)}.value,.label{text-shadow:0 0 var(--size-small) var(--surface-light-0),0 0 var(--size-xsmall) var(--surface-light-0)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: TooltipDirective, selector: "[rivTooltip]", inputs: ["rivTooltip", "rivTooltipTheme", "rivTooltipMaxWidth", "rivTooltipPreferredPosition", "rivTooltipCloseDelay"] }, { kind: "component", type: ZeroStateComponent, selector: "riv-zero-state", inputs: ["message"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
876
897
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DonutComponent, decorators: [{
|
|
877
898
|
type: Component,
|
|
878
899
|
args: [{ selector: 'riv-donut', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"!empty; else zeroState\" class=\"container\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"100%\"\n [attr.height]=\"HEIGHT\"\n viewBox=\"-128 -128 256 256\"\n >\n <path\n *ngFor=\"let path of arcPaths; let i = index\"\n [attr.d]=\"path\"\n [attr.fill]=\"getFillStyle(i)\"\n ></path>\n </svg>\n <div class=\"display\">\n <div class=\"value\" [rivTooltip]=\"displayTooltip\">{{ displayValue }}</div>\n <div class=\"label\">{{ displayLabel }}</div>\n </div>\n</div>\n\n<ng-template #zeroState>\n <riv-zero-state></riv-zero-state>\n</ng-template>\n", styles: [".container{display:grid;grid-template-rows:1fr;grid-template-columns:1fr;justify-items:center;align-items:center}svg{grid-row:1 / 1;grid-column:1 / 1}.display{grid-row:1 / 1;grid-column:1 / 1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--size-small)}.value{font-size:var(--type-6-font-size);line-height:var(--type-6-line-height-0);font-weight:var(--font-weight-heavy)}.label{font-size:var(--type-1-font-size);line-height:var(--type-1-line-height-0);color:var(--type-light-low-contrast)}.value,.label{text-shadow:0 0 var(--size-small) var(--surface-light-0),0 0 var(--size-xsmall) var(--surface-light-0)}\n"] }]
|
|
@@ -899,7 +920,7 @@ class LegendItemComponent {
|
|
|
899
920
|
}
|
|
900
921
|
}
|
|
901
922
|
LegendItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LegendItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
902
|
-
LegendItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: LegendItemComponent, selector: "riv-legend-item", inputs: { label: "label", colorToken: "colorToken", style: "style", visibility: "visibility", iconTooltip: "iconTooltip" }, outputs: { itemClick: "itemClick" }, ngImport: i0, template: "<button (click)=\"itemClick.emit()\" [rivTooltip]=\"iconTooltip\">\n <i\n *ngIf=\"visibility === 'visible'\"\n [class.striped]=\"style === 'striped'\"\n [style.background-color]=\"backgroundColor\"\n ></i>\n <riv-icon\n *ngIf=\"visibility === 'hidden'\"\n name=\"EyeOff\"\n [size]=\"16\"\n ></riv-icon>\n <riv-icon *ngIf=\"visibility === 'locked'\" name=\"Lock\" [size]=\"16\"></riv-icon>\n</button>\n<span [class.low-contrast]=\"visibility === 'hidden' || visibility === 'locked'\">\n {{ label }}\n</span>\n", styles: [":host{display:inline-flex;align-items:center;gap:var(--size-small)}i{width:var(--size-large);height:var(--size-large)}i.striped{background-image:repeating-linear-gradient(315deg,transparent 0px,transparent 2.5px,var(--white-100) 2.5px,var(--white-100) 3.5px,transparent 3.5px,transparent 6px)}span{color:var(--type-light-low-contrast);font-size:var(--type-1-font-size);line-height:var(--type-1-line-height-0)}button{display:inline-flex}riv-icon,span.low-contrast{color:var(--type-light-disabled)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "riv-icon", inputs: ["name", "size", "customSize", "strokeWidth"] }, { kind: "directive", type: TooltipDirective, selector: "[rivTooltip]", inputs: ["rivTooltip", "rivTooltipTheme", "
|
|
923
|
+
LegendItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: LegendItemComponent, selector: "riv-legend-item", inputs: { label: "label", colorToken: "colorToken", style: "style", visibility: "visibility", iconTooltip: "iconTooltip" }, outputs: { itemClick: "itemClick" }, ngImport: i0, template: "<button (click)=\"itemClick.emit()\" [rivTooltip]=\"iconTooltip\">\n <i\n *ngIf=\"visibility === 'visible'\"\n [class.striped]=\"style === 'striped'\"\n [style.background-color]=\"backgroundColor\"\n ></i>\n <riv-icon\n *ngIf=\"visibility === 'hidden'\"\n name=\"EyeOff\"\n [size]=\"16\"\n ></riv-icon>\n <riv-icon *ngIf=\"visibility === 'locked'\" name=\"Lock\" [size]=\"16\"></riv-icon>\n</button>\n<span [class.low-contrast]=\"visibility === 'hidden' || visibility === 'locked'\">\n {{ label }}\n</span>\n", styles: [":host{display:inline-flex;align-items:center;gap:var(--size-small)}i{width:var(--size-large);height:var(--size-large)}i.striped{background-image:repeating-linear-gradient(315deg,transparent 0px,transparent 2.5px,var(--white-100) 2.5px,var(--white-100) 3.5px,transparent 3.5px,transparent 6px)}span{color:var(--type-light-low-contrast);font-size:var(--type-1-font-size);line-height:var(--type-1-line-height-0)}button{display:inline-flex}riv-icon,span.low-contrast{color:var(--type-light-disabled)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "riv-icon", inputs: ["name", "size", "customSize", "strokeWidth"] }, { kind: "directive", type: TooltipDirective, selector: "[rivTooltip]", inputs: ["rivTooltip", "rivTooltipTheme", "rivTooltipMaxWidth", "rivTooltipPreferredPosition", "rivTooltipCloseDelay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
903
924
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LegendItemComponent, decorators: [{
|
|
904
925
|
type: Component,
|
|
905
926
|
args: [{ selector: 'riv-legend-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button (click)=\"itemClick.emit()\" [rivTooltip]=\"iconTooltip\">\n <i\n *ngIf=\"visibility === 'visible'\"\n [class.striped]=\"style === 'striped'\"\n [style.background-color]=\"backgroundColor\"\n ></i>\n <riv-icon\n *ngIf=\"visibility === 'hidden'\"\n name=\"EyeOff\"\n [size]=\"16\"\n ></riv-icon>\n <riv-icon *ngIf=\"visibility === 'locked'\" name=\"Lock\" [size]=\"16\"></riv-icon>\n</button>\n<span [class.low-contrast]=\"visibility === 'hidden' || visibility === 'locked'\">\n {{ label }}\n</span>\n", styles: [":host{display:inline-flex;align-items:center;gap:var(--size-small)}i{width:var(--size-large);height:var(--size-large)}i.striped{background-image:repeating-linear-gradient(315deg,transparent 0px,transparent 2.5px,var(--white-100) 2.5px,var(--white-100) 3.5px,transparent 3.5px,transparent 6px)}span{color:var(--type-light-low-contrast);font-size:var(--type-1-font-size);line-height:var(--type-1-line-height-0)}button{display:inline-flex}riv-icon,span.low-contrast{color:var(--type-light-disabled)}\n"] }]
|
|
@@ -925,10 +946,10 @@ class MetricComponent {
|
|
|
925
946
|
}
|
|
926
947
|
}
|
|
927
948
|
MetricComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MetricComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
928
|
-
MetricComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: MetricComponent, selector: "riv-metric", inputs: { label: "label", value: "value", card: "card" }, ngImport: i0, template: "<div *ngIf=\"card; else content\" class=\"card\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</div>\n<ng-template #content>\n <div class=\"label\">{{ label }}</div>\n <div class=\"value\">{{ value }}</div>\n</ng-template>\n", styles: [".card{border-radius:var(--size-xsmall);border:var(--border-width) solid var(--border-light-blend);padding:var(--size-xlarge)}.label{font-size:var(--type-1-font-size);line-height:var(--type-1-line-height-0);color:var(--type-light-low-contrast)}.value{font-size:var(--type-6-font-size);line-height:var(--type-6-line-height-0);font-weight:var(--font-weight-heavy)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
949
|
+
MetricComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: MetricComponent, selector: "riv-metric", inputs: { label: "label", value: "value", card: "card" }, ngImport: i0, template: "<div *ngIf=\"card; else content\" class=\"card\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</div>\n<ng-template #content>\n <div class=\"label\">{{ label }}</div>\n <div class=\"content\">\n <div class=\"value\">{{ value }}</div>\n <ng-content></ng-content>\n </div>\n</ng-template>\n", styles: [".card{border-radius:var(--size-xsmall);border:var(--border-width) solid var(--border-light-blend);padding:var(--size-xlarge)}.label{font-size:var(--type-1-font-size);line-height:var(--type-1-line-height-0);color:var(--type-light-low-contrast)}.value{font-size:var(--type-6-font-size);line-height:var(--type-6-line-height-0);font-weight:var(--font-weight-heavy)}.content{display:flex;align-items:flex-end;gap:var(--size-small)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
929
950
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MetricComponent, decorators: [{
|
|
930
951
|
type: Component,
|
|
931
|
-
args: [{ selector: 'riv-metric', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"card; else content\" class=\"card\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</div>\n<ng-template #content>\n <div class=\"label\">{{ label }}</div>\n <div class=\"value\">{{ value }}</div>\n</ng-template>\n", styles: [".card{border-radius:var(--size-xsmall);border:var(--border-width) solid var(--border-light-blend);padding:var(--size-xlarge)}.label{font-size:var(--type-1-font-size);line-height:var(--type-1-line-height-0);color:var(--type-light-low-contrast)}.value{font-size:var(--type-6-font-size);line-height:var(--type-6-line-height-0);font-weight:var(--font-weight-heavy)}\n"] }]
|
|
952
|
+
args: [{ selector: 'riv-metric', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"card; else content\" class=\"card\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</div>\n<ng-template #content>\n <div class=\"label\">{{ label }}</div>\n <div class=\"content\">\n <div class=\"value\">{{ value }}</div>\n <ng-content></ng-content>\n </div>\n</ng-template>\n", styles: [".card{border-radius:var(--size-xsmall);border:var(--border-width) solid var(--border-light-blend);padding:var(--size-xlarge)}.label{font-size:var(--type-1-font-size);line-height:var(--type-1-line-height-0);color:var(--type-light-low-contrast)}.value{font-size:var(--type-6-font-size);line-height:var(--type-6-line-height-0);font-weight:var(--font-weight-heavy)}.content{display:flex;align-items:flex-end;gap:var(--size-small)}\n"] }]
|
|
932
953
|
}], propDecorators: { label: [{
|
|
933
954
|
type: Input
|
|
934
955
|
}], value: [{
|
|
@@ -937,6 +958,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
937
958
|
type: Input
|
|
938
959
|
}] } });
|
|
939
960
|
|
|
961
|
+
class TrendComponent {
|
|
962
|
+
constructor() {
|
|
963
|
+
this.label = '';
|
|
964
|
+
this.value = 0;
|
|
965
|
+
this.successCondition = 'positive';
|
|
966
|
+
}
|
|
967
|
+
getClasses() {
|
|
968
|
+
const conditionalClass = this.value === 0
|
|
969
|
+
? ''
|
|
970
|
+
: this.successCondition === 'positive'
|
|
971
|
+
? this.value > 0
|
|
972
|
+
? 'success'
|
|
973
|
+
: 'danger'
|
|
974
|
+
: this.value < 0
|
|
975
|
+
? 'success'
|
|
976
|
+
: 'danger';
|
|
977
|
+
return 'trend ' + conditionalClass;
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
TrendComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TrendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
981
|
+
TrendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TrendComponent, selector: "riv-trend", inputs: { label: "label", value: "value", successCondition: "successCondition" }, ngImport: i0, template: "<span [class]=\"getClasses()\">\n <riv-icon\n class=\"icon\"\n [name]=\"\n value === 0 ? 'ArrowRight' : value > 0 ? 'TrendingUp' : 'TrendingDown'\n \"\n [size]=\"16\"\n ></riv-icon>\n <span>{{ label }}</span>\n</span>\n", styles: [".success{color:var(--baja-blast-90)}.danger{color:var(--fyre-50)}.trend{display:flex;font-size:var(--type-1-font-size);line-height:var(--type-1-line-height-1);font-weight:var(--font-weight-normal)}.icon{margin-right:var(--size-small)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "riv-icon", inputs: ["name", "size", "customSize", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
982
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TrendComponent, decorators: [{
|
|
983
|
+
type: Component,
|
|
984
|
+
args: [{ selector: 'riv-trend', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [class]=\"getClasses()\">\n <riv-icon\n class=\"icon\"\n [name]=\"\n value === 0 ? 'ArrowRight' : value > 0 ? 'TrendingUp' : 'TrendingDown'\n \"\n [size]=\"16\"\n ></riv-icon>\n <span>{{ label }}</span>\n</span>\n", styles: [".success{color:var(--baja-blast-90)}.danger{color:var(--fyre-50)}.trend{display:flex;font-size:var(--type-1-font-size);line-height:var(--type-1-line-height-1);font-weight:var(--font-weight-normal)}.icon{margin-right:var(--size-small)}\n"] }]
|
|
985
|
+
}], propDecorators: { label: [{
|
|
986
|
+
type: Input
|
|
987
|
+
}], value: [{
|
|
988
|
+
type: Input
|
|
989
|
+
}], successCondition: [{
|
|
990
|
+
type: Input
|
|
991
|
+
}] } });
|
|
992
|
+
|
|
940
993
|
function getDateRange$1(stacks) {
|
|
941
994
|
let min = Infinity;
|
|
942
995
|
let max = -Infinity;
|
|
@@ -1395,6 +1448,7 @@ RivModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
|
1395
1448
|
MetricComponent,
|
|
1396
1449
|
NumberPipe,
|
|
1397
1450
|
PercentagePipe,
|
|
1451
|
+
TrendComponent,
|
|
1398
1452
|
SmallCurrencyPipe,
|
|
1399
1453
|
StackedColumnComponent,
|
|
1400
1454
|
TextToggleComponent,
|
|
@@ -1415,6 +1469,7 @@ RivModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
|
1415
1469
|
MetricComponent,
|
|
1416
1470
|
NumberPipe,
|
|
1417
1471
|
PercentagePipe,
|
|
1472
|
+
TrendComponent,
|
|
1418
1473
|
SmallCurrencyPipe,
|
|
1419
1474
|
StackedColumnComponent,
|
|
1420
1475
|
TextToggleComponent,
|
|
@@ -1441,6 +1496,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1441
1496
|
MetricComponent,
|
|
1442
1497
|
NumberPipe,
|
|
1443
1498
|
PercentagePipe,
|
|
1499
|
+
TrendComponent,
|
|
1444
1500
|
SmallCurrencyPipe,
|
|
1445
1501
|
StackedColumnComponent,
|
|
1446
1502
|
TextToggleComponent,
|
|
@@ -1464,6 +1520,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1464
1520
|
MetricComponent,
|
|
1465
1521
|
NumberPipe,
|
|
1466
1522
|
PercentagePipe,
|
|
1523
|
+
TrendComponent,
|
|
1467
1524
|
SmallCurrencyPipe,
|
|
1468
1525
|
StackedColumnComponent,
|
|
1469
1526
|
TextToggleComponent,
|
|
@@ -1480,5 +1537,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1480
1537
|
* Generated bundle index. Do not edit.
|
|
1481
1538
|
*/
|
|
1482
1539
|
|
|
1483
|
-
export { CalloutComponent, CalloutDirective, CalloutOutletComponent, DataTableCellComponent, DataTableComponent, DataTableHeaderCellComponent, DataTableRowComponent, DaysPipe, DonutComponent, IconComponent, LegendItemComponent, MetricComponent, NumberPipe, PercentagePipe, RivModule, SmallCurrencyPipe, StackedColumnComponent, TextToggleComponent, TimeSeriesComponent, TooltipComponent, TooltipDirective, ZeroStateComponent };
|
|
1540
|
+
export { CalloutComponent, CalloutDirective, CalloutOutletComponent, DataTableCellComponent, DataTableComponent, DataTableHeaderCellComponent, DataTableRowComponent, DaysPipe, DonutComponent, IconComponent, LegendItemComponent, MetricComponent, NumberPipe, PercentagePipe, RivModule, SmallCurrencyPipe, StackedColumnComponent, TextToggleComponent, TimeSeriesComponent, TooltipAnchoredPositions, TooltipComponent, TooltipDirective, TrendComponent, ZeroStateComponent };
|
|
1484
1541
|
//# sourceMappingURL=rivet-health-design-system.mjs.map
|