@rivet-health/design-system 41.0.2 → 41.1.1

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.
@@ -3897,8 +3897,8 @@ var LoadingCoverComponent = class LoadingCoverComponent {
3897
3897
  errorMessage: "errorMessage"
3898
3898
  },
3899
3899
  ngImport: i0,
3900
- template: "<ng-content></ng-content>\n<div *ngIf=\"loading\" class=\"cover\" [style.z-index]=\"zIndexOverride ?? null\">\n <riv-loading [size]=\"loadingSize\"></riv-loading>\n</div>\n<div\n *ngIf=\"errorMessage\"\n class=\"cover\"\n [style.z-index]=\"zIndexOverride ?? null\"\n>\n <span class=\"error-icon\">🙁</span>\n <span>{{ errorMessage }}</span>\n</div>\n",
3901
- styles: [":host{display:block;max-width:100%;position:relative}.cover{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--size-xsmall);background-color:var(--white-90);border-radius:var(--border-radius-medium);text-align:center;color:var(--type-light-low-contrast);z-index:var(--loadable-z-index);font:var(--body-medium)}.error-icon{font-size:var(--type-5-font-size)}\n"],
3900
+ template: "<ng-content></ng-content>\n<div *ngIf=\"loading\" class=\"cover\" [style.z-index]=\"zIndexOverride ?? null\">\n <riv-loading [size]=\"loadingSize\"></riv-loading>\n</div>\n<div\n *ngIf=\"errorMessage\"\n class=\"cover error\"\n [style.z-index]=\"zIndexOverride ?? null\"\n>\n <div class=\"illustration riv-illustration-unplugged\"></div>\n <span>{{ errorMessage }}</span>\n</div>\n",
3901
+ styles: [":host{display:block;max-width:100%;position:relative}.cover{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--size-xsmall);background-color:var(--white-90);border-radius:var(--border-radius-medium);text-align:center;color:var(--type-light-low-contrast);z-index:var(--loadable-z-index);font:var(--body-medium)}.error{container-type:size;gap:var(--size-medium)}.illustration{width:min(100%,calc(var(--base-grid-size) * 60));max-height:50%;aspect-ratio:657 / 483}@container (height < 200px){.illustration{display:none}}\n"],
3902
3902
  dependencies: [{
3903
3903
  kind: "directive",
3904
3904
  type: i1.NgIf,
@@ -3929,8 +3929,8 @@ i0.ɵɵngDeclareClassMetadata({
3929
3929
  selector: "riv-loading-cover",
3930
3930
  changeDetection: ChangeDetectionStrategy.OnPush,
3931
3931
  standalone: false,
3932
- template: "<ng-content></ng-content>\n<div *ngIf=\"loading\" class=\"cover\" [style.z-index]=\"zIndexOverride ?? null\">\n <riv-loading [size]=\"loadingSize\"></riv-loading>\n</div>\n<div\n *ngIf=\"errorMessage\"\n class=\"cover\"\n [style.z-index]=\"zIndexOverride ?? null\"\n>\n <span class=\"error-icon\">🙁</span>\n <span>{{ errorMessage }}</span>\n</div>\n",
3933
- styles: [":host{display:block;max-width:100%;position:relative}.cover{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--size-xsmall);background-color:var(--white-90);border-radius:var(--border-radius-medium);text-align:center;color:var(--type-light-low-contrast);z-index:var(--loadable-z-index);font:var(--body-medium)}.error-icon{font-size:var(--type-5-font-size)}\n"]
3932
+ template: "<ng-content></ng-content>\n<div *ngIf=\"loading\" class=\"cover\" [style.z-index]=\"zIndexOverride ?? null\">\n <riv-loading [size]=\"loadingSize\"></riv-loading>\n</div>\n<div\n *ngIf=\"errorMessage\"\n class=\"cover error\"\n [style.z-index]=\"zIndexOverride ?? null\"\n>\n <div class=\"illustration riv-illustration-unplugged\"></div>\n <span>{{ errorMessage }}</span>\n</div>\n",
3933
+ styles: [":host{display:block;max-width:100%;position:relative}.cover{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--size-xsmall);background-color:var(--white-90);border-radius:var(--border-radius-medium);text-align:center;color:var(--type-light-low-contrast);z-index:var(--loadable-z-index);font:var(--body-medium)}.error{container-type:size;gap:var(--size-medium)}.illustration{width:min(100%,calc(var(--base-grid-size) * 60));max-height:50%;aspect-ratio:657 / 483}@container (height < 200px){.illustration{display:none}}\n"]
3934
3934
  }]
3935
3935
  }],
3936
3936
  propDecorators: {
@@ -6127,11 +6127,16 @@ var DateComponent = class DateComponent extends InputLabelComponent {
6127
6127
  }
6128
6128
  onDocumentMouseDown(target) {
6129
6129
  if (!this.open$.getValue() || !(target instanceof Element)) return;
6130
- if (this.host.nativeElement.contains(target)) return;
6131
- if (target.closest(".callout, .scrim, .overlay-container")) return;
6130
+ if (this.isInsidePicker(target)) return;
6132
6131
  this.open$.next(false);
6133
6132
  this.cdr.markForCheck();
6134
6133
  }
6134
+ isInsidePicker(target) {
6135
+ const host = this.host.nativeElement;
6136
+ if (host.contains(target)) return true;
6137
+ const layer = target.closest(".callout, .scrim, .overlay-container");
6138
+ return !!layer && !layer.contains(host);
6139
+ }
6135
6140
  clearValue() {
6136
6141
  this.commit(void 0);
6137
6142
  this.open$.next(false);
@@ -6162,7 +6167,7 @@ var DateComponent = class DateComponent extends InputLabelComponent {
6162
6167
  else this.syncInputText();
6163
6168
  this.previewValue = void 0;
6164
6169
  const nextTarget = event?.relatedTarget;
6165
- if (!(nextTarget instanceof Element && (this.host.nativeElement.contains(nextTarget) || !!nextTarget.closest(".callout, .scrim, .overlay-container")))) this.open$.next(false);
6170
+ if (!(nextTarget instanceof Element && this.isInsidePicker(nextTarget))) this.open$.next(false);
6166
6171
  this.cdr.markForCheck();
6167
6172
  }
6168
6173
  onDateSelect(date) {
@@ -12220,6 +12225,138 @@ i0.ɵɵngDeclareClassMetadata({
12220
12225
  "info"
12221
12226
  ];
12222
12227
  })(BannerComponent || (BannerComponent = {}));
12228
+ var ErrorPageComponent = class ErrorPageComponent {
12229
+ constructor() {
12230
+ this.status = 500;
12231
+ this.retry = new EventEmitter();
12232
+ this.contactSupport = new EventEmitter();
12233
+ }
12234
+ get page() {
12235
+ return ErrorPageComponent.Pages[this.status];
12236
+ }
12237
+ get illustration() {
12238
+ return ErrorPageComponent.illustrationFor(this.status);
12239
+ }
12240
+ static {
12241
+ this.ɵfac = i0.ɵɵngDeclareFactory({
12242
+ minVersion: "12.0.0",
12243
+ version: "22.2.4",
12244
+ ngImport: i0,
12245
+ type: ErrorPageComponent,
12246
+ deps: [],
12247
+ target: i0.ɵɵFactoryTarget.Component
12248
+ });
12249
+ }
12250
+ static {
12251
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
12252
+ minVersion: "14.0.0",
12253
+ version: "22.2.4",
12254
+ type: ErrorPageComponent,
12255
+ isStandalone: false,
12256
+ selector: "riv-error-page",
12257
+ inputs: { status: "status" },
12258
+ outputs: {
12259
+ retry: "retry",
12260
+ contactSupport: "contactSupport"
12261
+ },
12262
+ ngImport: i0,
12263
+ template: "<div class=\"content\">\n <h1 class=\"heading\">\n <span class=\"status\">{{ status }}</span>\n <span class=\"title\">{{ page.title }}</span>\n </h1>\n <div class=\"body\">\n <p class=\"message\">{{ page.message }}</p>\n <div class=\"actions\">\n <button\n *ngIf=\"page.retryable\"\n type=\"button\"\n rivButton\n (click)=\"retry.emit()\"\n >\n Try again\n </button>\n <button type=\"button\" rivButton (click)=\"contactSupport.emit()\">\n Contact support\n </button>\n </div>\n </div>\n</div>\n<div class=\"illustration riv-illustration-{{ illustration }}\"></div>\n",
12264
+ styles: [":host{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--size-xlarge);padding:var(--size-xxlarge);background-color:var(--purp-10)}.content{display:flex;flex-direction:column;gap:var(--size-xlarge);max-width:calc(var(--base-grid-size) * 88)}.heading{display:flex;flex-direction:column;gap:var(--size-xsmall)}.status{font:var(--font-weight-heavy) calc(var(--base-grid-size) * 41) / 1 var(--font-stack);color:#9980c1}.title{font:var(--title-06)}.body{display:flex;flex-direction:column;gap:var(--size-large)}.message{font:var(--body-medium)}.actions{display:flex;flex-wrap:wrap;gap:var(--size-small)}.illustration{flex:1 1 calc(var(--base-grid-size) * 75)}.riv-illustration-searching{max-width:461px;aspect-ratio:461 / 451}.riv-illustration-unplugged{max-width:657px;aspect-ratio:657 / 483}\n"],
12265
+ dependencies: [{
12266
+ kind: "directive",
12267
+ type: i1.NgIf,
12268
+ selector: "[ngIf]",
12269
+ inputs: [
12270
+ "ngIf",
12271
+ "ngIfThen",
12272
+ "ngIfElse"
12273
+ ]
12274
+ }, {
12275
+ kind: "component",
12276
+ type: ButtonComponent,
12277
+ selector: "[rivButton]",
12278
+ inputs: [
12279
+ "locked",
12280
+ "disabled",
12281
+ "loading",
12282
+ "full",
12283
+ "size",
12284
+ "variant",
12285
+ "icon",
12286
+ "iconPosition",
12287
+ "current"
12288
+ ]
12289
+ }],
12290
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
12291
+ });
12292
+ }
12293
+ };
12294
+ i0.ɵɵngDeclareClassMetadata({
12295
+ minVersion: "12.0.0",
12296
+ version: "22.2.4",
12297
+ ngImport: i0,
12298
+ type: ErrorPageComponent,
12299
+ decorators: [{
12300
+ type: Component,
12301
+ args: [{
12302
+ selector: "riv-error-page",
12303
+ changeDetection: ChangeDetectionStrategy.OnPush,
12304
+ standalone: false,
12305
+ template: "<div class=\"content\">\n <h1 class=\"heading\">\n <span class=\"status\">{{ status }}</span>\n <span class=\"title\">{{ page.title }}</span>\n </h1>\n <div class=\"body\">\n <p class=\"message\">{{ page.message }}</p>\n <div class=\"actions\">\n <button\n *ngIf=\"page.retryable\"\n type=\"button\"\n rivButton\n (click)=\"retry.emit()\"\n >\n Try again\n </button>\n <button type=\"button\" rivButton (click)=\"contactSupport.emit()\">\n Contact support\n </button>\n </div>\n </div>\n</div>\n<div class=\"illustration riv-illustration-{{ illustration }}\"></div>\n",
12306
+ styles: [":host{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--size-xlarge);padding:var(--size-xxlarge);background-color:var(--purp-10)}.content{display:flex;flex-direction:column;gap:var(--size-xlarge);max-width:calc(var(--base-grid-size) * 88)}.heading{display:flex;flex-direction:column;gap:var(--size-xsmall)}.status{font:var(--font-weight-heavy) calc(var(--base-grid-size) * 41) / 1 var(--font-stack);color:#9980c1}.title{font:var(--title-06)}.body{display:flex;flex-direction:column;gap:var(--size-large)}.message{font:var(--body-medium)}.actions{display:flex;flex-wrap:wrap;gap:var(--size-small)}.illustration{flex:1 1 calc(var(--base-grid-size) * 75)}.riv-illustration-searching{max-width:461px;aspect-ratio:461 / 451}.riv-illustration-unplugged{max-width:657px;aspect-ratio:657 / 483}\n"]
12307
+ }]
12308
+ }],
12309
+ propDecorators: {
12310
+ status: [{ type: Input }],
12311
+ retry: [{ type: Output }],
12312
+ contactSupport: [{ type: Output }]
12313
+ }
12314
+ });
12315
+ (function(ErrorPageComponent) {
12316
+ ErrorPageComponent.Statuses = [
12317
+ 400,
12318
+ 403,
12319
+ 404,
12320
+ 500,
12321
+ 503
12322
+ ];
12323
+ ErrorPageComponent.Illustrations = ["searching", "unplugged"];
12324
+ ErrorPageComponent.Pages = {
12325
+ 400: {
12326
+ title: "Bad page request",
12327
+ message: "We ran into a problem with your request, likely due to incorrect or missing information. Try refreshing the page, submitting your request again, or clearing your browser cache.",
12328
+ retryable: true
12329
+ },
12330
+ 403: {
12331
+ title: "Access denied",
12332
+ message: "You don't have access to this page. If you think you should, ask your account admin for access or contact support.",
12333
+ retryable: false
12334
+ },
12335
+ 404: {
12336
+ title: "Page not found",
12337
+ message: "We couldn't find that page. It may have moved, been renamed, or the link is outdated. Double check the URL or return to Rivet to keep going.",
12338
+ retryable: false
12339
+ },
12340
+ 500: {
12341
+ title: "Internal server error",
12342
+ message: "We hit an unexpected error processing your request. Our engineering team has been automatically alerted. Don't worry - any actions you've taken or data you've submitted haven't been lost.",
12343
+ retryable: true
12344
+ },
12345
+ 503: {
12346
+ title: "Service unavailable",
12347
+ message: "The app is temporarily unavailable due to scheduled maintenance or high traffic. It should be back up shortly.",
12348
+ retryable: true
12349
+ }
12350
+ };
12351
+ function statusFor(httpStatus) {
12352
+ return ErrorPageComponent.Statuses.find((status) => status === httpStatus) ?? (httpStatus >= 400 && httpStatus < 500 ? 400 : 500);
12353
+ }
12354
+ ErrorPageComponent.statusFor = statusFor;
12355
+ function illustrationFor(status) {
12356
+ return status < 500 ? "searching" : "unplugged";
12357
+ }
12358
+ ErrorPageComponent.illustrationFor = illustrationFor;
12359
+ })(ErrorPageComponent || (ErrorPageComponent = {}));
12223
12360
  const mapIndicators = {
12224
12361
  SingleSmall: `<svg aria-label="single small map-indicator" width="12" height="16" viewBox="0 0 12 16" fill="none" xmlns="http://www.w3.org/2000/svg" filter="drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.25))"><path d="M11.9949 6.4C11.8159 10.8779 5.99968 16 5.99968 16C5.99968 16 0.174787 10.968 0.00444185 6.4C-0.12727 2.86798 2.6886 0 5.99968 0C9.31074 0 12.1361 2.86837 11.9949 6.4Z" fill="white"/></svg>`,
12225
12362
  SingleRegular: `<svg aria-label="single regular map-indicator" width="18" height="22" viewBox="0 0 18 22" fill="none" xmlns="http://www.w3.org/2000/svg" filter="drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.25))"><path d="M18 8.8C18 14.08 9 22 9 22C9 22 0 14.08 0 8.8C0 3.93989 4.02943 0 9 0C13.9705 0 18 3.93989 18 8.8Z" fill="white"/></svg>`,
@@ -12642,7 +12779,7 @@ i0.ɵɵngDeclareClassMetadata({
12642
12779
  "select:not([disabled])",
12643
12780
  "textarea:not([disabled])",
12644
12781
  "[contenteditable=\"true\"]"
12645
- ].map((field) => `.body ${field}`).join(", ");
12782
+ ].map((field) => `.body ${field}:not([aria-haspopup])`).join(", ");
12646
12783
  function focusInitial(dialog) {
12647
12784
  if (!dialog.contains(document.activeElement)) (dialog.querySelector(initialFocusSelector) ?? dialog).focus();
12648
12785
  }
@@ -22873,6 +23010,7 @@ var RivModule = class RivModule {
22873
23010
  DonutComponent,
22874
23011
  EditableHeadingComponent,
22875
23012
  EditViewComponent,
23013
+ ErrorPageComponent,
22876
23014
  FilterChipComponent,
22877
23015
  FilterDropdownComponent,
22878
23016
  FormDialogComponent,
@@ -22989,6 +23127,7 @@ var RivModule = class RivModule {
22989
23127
  DonutComponent,
22990
23128
  EditableHeadingComponent,
22991
23129
  EditViewComponent,
23130
+ ErrorPageComponent,
22992
23131
  FilterChipComponent,
22993
23132
  FilterDropdownComponent,
22994
23133
  FormDialogComponent,
@@ -23122,6 +23261,7 @@ i0.ɵɵngDeclareClassMetadata({
23122
23261
  DonutComponent,
23123
23262
  EditableHeadingComponent,
23124
23263
  EditViewComponent,
23264
+ ErrorPageComponent,
23125
23265
  FilterChipComponent,
23126
23266
  FilterDropdownComponent,
23127
23267
  FormDialogComponent,
@@ -23237,6 +23377,7 @@ i0.ɵɵngDeclareClassMetadata({
23237
23377
  DonutComponent,
23238
23378
  EditableHeadingComponent,
23239
23379
  EditViewComponent,
23380
+ ErrorPageComponent,
23240
23381
  FilterChipComponent,
23241
23382
  FilterDropdownComponent,
23242
23383
  FormDialogComponent,
@@ -23320,6 +23461,6 @@ i0.ɵɵngDeclareClassMetadata({
23320
23461
  }]
23321
23462
  }]
23322
23463
  });
23323
- 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, FilterDropdownComponent, FormDialogComponent, 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, SettingRowComponent, SideSheetComponent, SimpleSelectComponent, SimpleTabComponent, SimpleTableCellComponent, SimpleTableComponent, SimpleTableHeaderCellComponent, SimpleTableRowComponent, SimpleTabsComponent, SizeDirective, SmallCurrencyPipe, SmallNumberPipe, SrOnlyComponent, StackedColumnComponent, StackedRowComponent, SwitchCheckboxComponent, TabComponent, TableCollapseAllComponent, TableColumnSettingsComponent, TableColumnSettingsSideSheetComponent, TableComponent, TableCsvExportComponent, TableSearchColumnsComponent, TableSearchComponent, TabsComponent, TextFieldComponent, TextareaFieldComponent, TimeSeriesComponent, ToastActionComponent, ToastComponent, TooltipComponent, TooltipDirective, TrendComponent, TruncateComponent, ValidationMessageComponent, ViewMenuComponent, ViewsComponent, VisibilityDirective, ZeroStateComponent, toSentenceCase };
23464
+ 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, ErrorPageComponent, FilterChipComponent, FilterDropdownComponent, FormDialogComponent, 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, SettingRowComponent, SideSheetComponent, SimpleSelectComponent, SimpleTabComponent, SimpleTableCellComponent, SimpleTableComponent, SimpleTableHeaderCellComponent, SimpleTableRowComponent, SimpleTabsComponent, SizeDirective, SmallCurrencyPipe, SmallNumberPipe, SrOnlyComponent, StackedColumnComponent, StackedRowComponent, SwitchCheckboxComponent, TabComponent, TableCollapseAllComponent, TableColumnSettingsComponent, TableColumnSettingsSideSheetComponent, TableComponent, TableCsvExportComponent, TableSearchColumnsComponent, TableSearchComponent, TabsComponent, TextFieldComponent, TextareaFieldComponent, TimeSeriesComponent, ToastActionComponent, ToastComponent, TooltipComponent, TooltipDirective, TrendComponent, TruncateComponent, ValidationMessageComponent, ViewMenuComponent, ViewsComponent, VisibilityDirective, ZeroStateComponent, toSentenceCase };
23324
23465
 
23325
23466
  //# sourceMappingURL=rivet-health-design-system.mjs.map