@rivet-health/design-system 40.12.2 → 40.13.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.
@@ -4399,6 +4399,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4399
4399
  DateComponent.isValidDate = isValidDate;
4400
4400
  })(DateComponent || (DateComponent = {}));
4401
4401
 
4402
+ class FilterChipComponent {
4403
+ constructor() {
4404
+ this.selected$ = new BehaviorSubject(false);
4405
+ this.chipClicked = new EventEmitter();
4406
+ }
4407
+ set selected(v) {
4408
+ if (v !== this.selected$.getValue()) {
4409
+ this.selected$.next(v);
4410
+ }
4411
+ }
4412
+ get selected() {
4413
+ return this.selected$.getValue();
4414
+ }
4415
+ get classes() {
4416
+ return Object.entries({
4417
+ selected: this.selected,
4418
+ })
4419
+ .filter(([_, v]) => v)
4420
+ .map(([k]) => k)
4421
+ .join(' ');
4422
+ }
4423
+ onClick(e) {
4424
+ this.chipClicked.emit(!this.selected);
4425
+ }
4426
+ }
4427
+ FilterChipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FilterChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4428
+ FilterChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FilterChipComponent, selector: "riv-filter-chip", inputs: { selected: "selected" }, outputs: { chipClicked: "chipClicked" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class": "this.classes" } }, ngImport: i0, template: "<riv-icon\n *ngIf=\"selected\"\n class=\"checkmark\"\n [name]=\"'Check'\"\n [size]=\"12\"\n></riv-icon>\n<ng-content></ng-content>\n", styles: [":host{--badge-multiplier: 4;display:inline-flex;align-items:center;font-size:var(--type-1-font-size);line-height:var(--type-1-line-height-1);font-weight:var(--font-weight-heavy);white-space:nowrap;border-radius:calc(var(--base-grid-size) * var(--badge-multiplier));min-width:calc(var(--base-grid-size) * var(--badge-multiplier));min-height:calc(var(--base-grid-size) * var(--badge-multiplier));max-width:100%;background-color:var(--badge-background-color);border:var(--border-width) solid var(--border-light-blend);padding:var(--size-xsmall) var(--size-medium)}:host:not(.selected){--badge-background-color: var(--surface-light-0)}:host.selected{--badge-background-color: var(--baloo-05)}.checkmark{padding-right:var(--size-xsmall)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "riv-icon", inputs: ["name", "fillColor", "size", "customSize", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4429
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FilterChipComponent, decorators: [{
4430
+ type: Component,
4431
+ args: [{ selector: 'riv-filter-chip', changeDetection: ChangeDetectionStrategy.OnPush, template: "<riv-icon\n *ngIf=\"selected\"\n class=\"checkmark\"\n [name]=\"'Check'\"\n [size]=\"12\"\n></riv-icon>\n<ng-content></ng-content>\n", styles: [":host{--badge-multiplier: 4;display:inline-flex;align-items:center;font-size:var(--type-1-font-size);line-height:var(--type-1-line-height-1);font-weight:var(--font-weight-heavy);white-space:nowrap;border-radius:calc(var(--base-grid-size) * var(--badge-multiplier));min-width:calc(var(--base-grid-size) * var(--badge-multiplier));min-height:calc(var(--base-grid-size) * var(--badge-multiplier));max-width:100%;background-color:var(--badge-background-color);border:var(--border-width) solid var(--border-light-blend);padding:var(--size-xsmall) var(--size-medium)}:host:not(.selected){--badge-background-color: var(--surface-light-0)}:host.selected{--badge-background-color: var(--baloo-05)}.checkmark{padding-right:var(--size-xsmall)}\n"] }]
4432
+ }], ctorParameters: function () { return []; }, propDecorators: { selected: [{
4433
+ type: Input
4434
+ }], chipClicked: [{
4435
+ type: Output
4436
+ }], classes: [{
4437
+ type: HostBinding,
4438
+ args: ['class']
4439
+ }], onClick: [{
4440
+ type: HostListener,
4441
+ args: ['click', ['$event']]
4442
+ }] } });
4443
+
4402
4444
  const ZWS = '​';
4403
4445
  const ZWS_REGEX = /​/g;
4404
4446
  /**
@@ -15036,54 +15078,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
15036
15078
  DonutComponent.Sizes = ['xsmall', 'small', 'medium', 'large'];
15037
15079
  })(DonutComponent || (DonutComponent = {}));
15038
15080
 
15039
- class MiniPieComponent {
15040
- constructor() {
15041
- this.value = 0;
15042
- this.size = 'small';
15043
- this.colorToken = '--purp-60';
15044
- }
15045
- get classes() {
15046
- return this.size;
15047
- }
15048
- get clampedValue() {
15049
- return Math.max(0, Math.min(100, this.value));
15050
- }
15051
- get fillColor() {
15052
- return `var(${this.colorToken})`;
15053
- }
15054
- get isFull() {
15055
- return this.clampedValue >= 100;
15056
- }
15057
- get wedgePath() {
15058
- const pct = this.clampedValue / 100;
15059
- if (pct <= 0 || pct >= 1)
15060
- return '';
15061
- const angle = pct * 2 * Math.PI;
15062
- const x = Math.sin(angle) * 8;
15063
- const y = -Math.cos(angle) * 8;
15064
- const largeArc = pct > 0.5 ? 1 : 0;
15065
- return `M 0 0 L 0 -8 A 8 8 0 ${largeArc} 1 ${x} ${y} Z`;
15066
- }
15067
- }
15068
- MiniPieComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MiniPieComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15069
- MiniPieComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MiniPieComponent, selector: "riv-mini-pie", inputs: { value: "value", size: "size", colorToken: "colorToken" }, host: { properties: { "class": "this.classes" } }, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-10 -10 20 20\">\n <circle cx=\"0\" cy=\"0\" r=\"8\" class=\"track\" />\n <circle *ngIf=\"isFull\" cx=\"0\" cy=\"0\" r=\"8\" [attr.fill]=\"fillColor\" />\n <path\n *ngIf=\"clampedValue > 0 && !isFull\"\n [attr.d]=\"wedgePath\"\n [attr.fill]=\"fillColor\"\n />\n</svg>\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}:host.small{width:20px;height:20px}:host.medium{width:24px;height:24px}:host.large{width:32px;height:32px}svg{width:100%;height:100%}.track{fill:var(--border-light)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15070
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MiniPieComponent, decorators: [{
15071
- type: Component,
15072
- args: [{ selector: 'riv-mini-pie', changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-10 -10 20 20\">\n <circle cx=\"0\" cy=\"0\" r=\"8\" class=\"track\" />\n <circle *ngIf=\"isFull\" cx=\"0\" cy=\"0\" r=\"8\" [attr.fill]=\"fillColor\" />\n <path\n *ngIf=\"clampedValue > 0 && !isFull\"\n [attr.d]=\"wedgePath\"\n [attr.fill]=\"fillColor\"\n />\n</svg>\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}:host.small{width:20px;height:20px}:host.medium{width:24px;height:24px}:host.large{width:32px;height:32px}svg{width:100%;height:100%}.track{fill:var(--border-light)}\n"] }]
15073
- }], propDecorators: { value: [{
15074
- type: Input
15075
- }], size: [{
15076
- type: Input
15077
- }], colorToken: [{
15078
- type: Input
15079
- }], classes: [{
15080
- type: HostBinding,
15081
- args: ['class']
15082
- }] } });
15083
- (function (MiniPieComponent) {
15084
- MiniPieComponent.Sizes = ['small', 'medium', 'large'];
15085
- })(MiniPieComponent || (MiniPieComponent = {}));
15086
-
15087
15081
  function aggregateValues(values) {
15088
15082
  return values.map((v, ix) => v + values.slice(ix + 1).reduce((acc, n) => acc + n, 0));
15089
15083
  }
@@ -15278,6 +15272,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
15278
15272
  type: Input
15279
15273
  }] } });
15280
15274
 
15275
+ class MiniPieComponent {
15276
+ constructor() {
15277
+ this.value = 0;
15278
+ this.size = 'small';
15279
+ this.colorToken = '--purp-60';
15280
+ }
15281
+ get classes() {
15282
+ return this.size;
15283
+ }
15284
+ get clampedValue() {
15285
+ return Math.max(0, Math.min(100, this.value));
15286
+ }
15287
+ get fillColor() {
15288
+ return `var(${this.colorToken})`;
15289
+ }
15290
+ get isFull() {
15291
+ return this.clampedValue >= 100;
15292
+ }
15293
+ get wedgePath() {
15294
+ const pct = this.clampedValue / 100;
15295
+ if (pct <= 0 || pct >= 1)
15296
+ return '';
15297
+ const angle = pct * 2 * Math.PI;
15298
+ const x = Math.sin(angle) * 8;
15299
+ const y = -Math.cos(angle) * 8;
15300
+ const largeArc = pct > 0.5 ? 1 : 0;
15301
+ return `M 0 0 L 0 -8 A 8 8 0 ${largeArc} 1 ${x} ${y} Z`;
15302
+ }
15303
+ }
15304
+ MiniPieComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MiniPieComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15305
+ MiniPieComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MiniPieComponent, selector: "riv-mini-pie", inputs: { value: "value", size: "size", colorToken: "colorToken" }, host: { properties: { "class": "this.classes" } }, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-10 -10 20 20\">\n <circle cx=\"0\" cy=\"0\" r=\"8\" class=\"track\" />\n <circle *ngIf=\"isFull\" cx=\"0\" cy=\"0\" r=\"8\" [attr.fill]=\"fillColor\" />\n <path\n *ngIf=\"clampedValue > 0 && !isFull\"\n [attr.d]=\"wedgePath\"\n [attr.fill]=\"fillColor\"\n />\n</svg>\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}:host.small{width:20px;height:20px}:host.medium{width:24px;height:24px}:host.large{width:32px;height:32px}svg{width:100%;height:100%}.track{fill:var(--border-light)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15306
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MiniPieComponent, decorators: [{
15307
+ type: Component,
15308
+ args: [{ selector: 'riv-mini-pie', changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-10 -10 20 20\">\n <circle cx=\"0\" cy=\"0\" r=\"8\" class=\"track\" />\n <circle *ngIf=\"isFull\" cx=\"0\" cy=\"0\" r=\"8\" [attr.fill]=\"fillColor\" />\n <path\n *ngIf=\"clampedValue > 0 && !isFull\"\n [attr.d]=\"wedgePath\"\n [attr.fill]=\"fillColor\"\n />\n</svg>\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}:host.small{width:20px;height:20px}:host.medium{width:24px;height:24px}:host.large{width:32px;height:32px}svg{width:100%;height:100%}.track{fill:var(--border-light)}\n"] }]
15309
+ }], propDecorators: { value: [{
15310
+ type: Input
15311
+ }], size: [{
15312
+ type: Input
15313
+ }], colorToken: [{
15314
+ type: Input
15315
+ }], classes: [{
15316
+ type: HostBinding,
15317
+ args: ['class']
15318
+ }] } });
15319
+ (function (MiniPieComponent) {
15320
+ MiniPieComponent.Sizes = ['small', 'medium', 'large'];
15321
+ })(MiniPieComponent || (MiniPieComponent = {}));
15322
+
15281
15323
  class ProgressComponent {
15282
15324
  constructor() {
15283
15325
  this.value = 0;
@@ -16478,6 +16520,7 @@ RivModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
16478
16520
  DonutComponent,
16479
16521
  EditableHeadingComponent,
16480
16522
  EditViewComponent,
16523
+ FilterChipComponent,
16481
16524
  FunnelChartComponent,
16482
16525
  HelpComponent,
16483
16526
  HighlightComponent,
@@ -16582,6 +16625,7 @@ RivModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
16582
16625
  DonutComponent,
16583
16626
  EditableHeadingComponent,
16584
16627
  EditViewComponent,
16628
+ FilterChipComponent,
16585
16629
  FunnelChartComponent,
16586
16630
  HelpComponent,
16587
16631
  HighlightComponent,
@@ -16690,6 +16734,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
16690
16734
  DonutComponent,
16691
16735
  EditableHeadingComponent,
16692
16736
  EditViewComponent,
16737
+ FilterChipComponent,
16693
16738
  FunnelChartComponent,
16694
16739
  HelpComponent,
16695
16740
  HighlightComponent,
@@ -16797,6 +16842,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
16797
16842
  DonutComponent,
16798
16843
  EditableHeadingComponent,
16799
16844
  EditViewComponent,
16845
+ FilterChipComponent,
16800
16846
  FunnelChartComponent,
16801
16847
  HelpComponent,
16802
16848
  HighlightComponent,
@@ -16876,5 +16922,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
16876
16922
  * Generated bundle index. Do not edit.
16877
16923
  */
16878
16924
 
16879
- export { ANIMATION_CONSTANTS, AllViewsModalComponent, AlphabeticFieldComponent, AutoFocusDirective, BadgeComponent, BannerActionComponent, BannerComponent, ButtonComponent, ButtonGroupComponent, CalloutComponent, CardActionsComponent, CardCheckboxComponent, CardComponent, CardContentComponent, CardHeaderComponent, CardLinkComponent, CardMediaComponent, Chart, ChartComponent, CheckboxComponent, CurrencyFieldComponent, DataTableCellComponent, DataTableComponent, DataTableHeaderCellComponent, DataTableRowComponent, DateComponent, DatePipe, DateRangeComponent, DaysPipe, DialogComponent, DollarsPipe, DonutComponent, DownloadService, EditViewComponent, EditableHeadingComponent, FunnelChartComponent, HelpComponent, HighlightComponent, IconComponent, InputLabelComponent, IssueComponent, LegendItemComponent, LinkComponent, LoadingComponent, LoadingCoverComponent, LockedTooltipDirective, MapIndicatorComponent, MentionsInputComponent, MenuComponent, MenuItemComponent, MetricComponent, MiniPieComponent, ModalComponent, NotificationBadgeComponent, NumberFieldComponent, NumberPipe, OptionGroupPipe, OverlayDirective, OverlayOutletComponent, PageHeaderComponent, PercentageFieldComponent, PercentagePipe, PermissionPickerComponent, PhoneFieldComponent, ProgressComponent, RadioComponent, RivModule, RivSelect, RivTable, RivViews, SVGTextTruncateDirective, SearchComponent, SearchSelectComponent, SelectComponent, SelectNodeComponent, SentenceCasePipe, SideSheetComponent, SimpleSelectComponent, SimpleTableCellComponent, SimpleTableComponent, SimpleTableHeaderCellComponent, SimpleTableRowComponent, SizeDirective, SmallCurrencyPipe, SrOnlyComponent, StackedColumnComponent, StackedRowComponent, SwitchCheckboxComponent, TabComponent, TableColumnSettingsComponent, TableColumnSettingsSideSheetComponent, TableComponent, TableCsvExportComponent, TableSearchColumnsComponent, TableSearchComponent, TabsComponent, TextFieldComponent, TextareaFieldComponent, TimeSeriesComponent, ToastActionComponent, ToastComponent, TooltipComponent, TooltipDirective, TrendComponent, TruncateComponent, ValidationMessageComponent, ViewMenuComponent, ViewsComponent, VisibilityDirective, ZeroStateComponent, toSentenceCase };
16925
+ export { ANIMATION_CONSTANTS, AllViewsModalComponent, AlphabeticFieldComponent, AutoFocusDirective, BadgeComponent, BannerActionComponent, BannerComponent, ButtonComponent, ButtonGroupComponent, CalloutComponent, CardActionsComponent, CardCheckboxComponent, CardComponent, CardContentComponent, CardHeaderComponent, CardLinkComponent, CardMediaComponent, Chart, ChartComponent, CheckboxComponent, CurrencyFieldComponent, DataTableCellComponent, DataTableComponent, DataTableHeaderCellComponent, DataTableRowComponent, DateComponent, DatePipe, DateRangeComponent, DaysPipe, DialogComponent, DollarsPipe, DonutComponent, DownloadService, EditViewComponent, EditableHeadingComponent, FilterChipComponent, FunnelChartComponent, HelpComponent, HighlightComponent, IconComponent, InputLabelComponent, IssueComponent, LegendItemComponent, LinkComponent, LoadingComponent, LoadingCoverComponent, LockedTooltipDirective, MapIndicatorComponent, MentionsInputComponent, MenuComponent, MenuItemComponent, MetricComponent, MiniPieComponent, ModalComponent, NotificationBadgeComponent, NumberFieldComponent, NumberPipe, OptionGroupPipe, OverlayDirective, OverlayOutletComponent, PageHeaderComponent, PercentageFieldComponent, PercentagePipe, PermissionPickerComponent, PhoneFieldComponent, ProgressComponent, RadioComponent, RivModule, RivSelect, RivTable, RivViews, SVGTextTruncateDirective, SearchComponent, SearchSelectComponent, SelectComponent, SelectNodeComponent, SentenceCasePipe, SideSheetComponent, SimpleSelectComponent, SimpleTableCellComponent, SimpleTableComponent, SimpleTableHeaderCellComponent, SimpleTableRowComponent, SizeDirective, SmallCurrencyPipe, SrOnlyComponent, StackedColumnComponent, StackedRowComponent, SwitchCheckboxComponent, TabComponent, TableColumnSettingsComponent, TableColumnSettingsSideSheetComponent, TableComponent, TableCsvExportComponent, TableSearchColumnsComponent, TableSearchComponent, TabsComponent, TextFieldComponent, TextareaFieldComponent, TimeSeriesComponent, ToastActionComponent, ToastComponent, TooltipComponent, TooltipDirective, TrendComponent, TruncateComponent, ValidationMessageComponent, ViewMenuComponent, ViewsComponent, VisibilityDirective, ZeroStateComponent, toSentenceCase };
16880
16926
  //# sourceMappingURL=rivet-health-design-system.mjs.map