@rivet-health/design-system 40.36.0 → 40.37.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/layout/setting-row/setting-row.component.mjs +111 -0
- package/esm2020/lib/riv.module.mjs +6 -1
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/rivet-health-design-system.mjs +109 -1
- package/fesm2015/rivet-health-design-system.mjs.map +1 -1
- package/fesm2020/rivet-health-design-system.mjs +109 -1
- package/fesm2020/rivet-health-design-system.mjs.map +1 -1
- package/lib/layout/setting-row/setting-row.component.d.ts +72 -0
- package/lib/riv.module.d.ts +44 -43
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -6418,6 +6418,110 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
6418
6418
|
CardMediaComponent.Fits = ['cover', 'contain', 'fill'];
|
|
6419
6419
|
})(CardMediaComponent || (CardMediaComponent = {}));
|
|
6420
6420
|
|
|
6421
|
+
/**
|
|
6422
|
+
* One labelled setting that is read in place and edited inline.
|
|
6423
|
+
*
|
|
6424
|
+
* Reading shows the label, the current value, and an edit button. Editing
|
|
6425
|
+
* swaps the value for a consumer-supplied field plus Cancel and Save buttons.
|
|
6426
|
+
* The row holds no state of its own — bind `editing` and act on `edit`,
|
|
6427
|
+
* `cancel`, and `save`.
|
|
6428
|
+
*
|
|
6429
|
+
* Set the value shown while reading with `value` for plain text, or project
|
|
6430
|
+
* richer content such as a `riv-badge` into the `[display-value]` slot. Use
|
|
6431
|
+
* one or the other: when `value` is set, the slot isn't shown.
|
|
6432
|
+
*
|
|
6433
|
+
* Two content slots:
|
|
6434
|
+
* - `[display-value]` — content shown while reading, when `value` is empty
|
|
6435
|
+
* - `#editor` template — any field component to edit the value with, such as
|
|
6436
|
+
* `riv-text-field`, `riv-currency-field`, or `riv-simple-select`. The row
|
|
6437
|
+
* wraps it in a `<label>` named after `label`, so don't give the field its
|
|
6438
|
+
* own label. Only the first control in the template gets that name, so keep
|
|
6439
|
+
* it to one field.
|
|
6440
|
+
*
|
|
6441
|
+
* ```html
|
|
6442
|
+
* <riv-setting-row
|
|
6443
|
+
* [label]="'Threshold'"
|
|
6444
|
+
* [infoTooltip]="'Applies to new claims only'"
|
|
6445
|
+
* [editing]="editing"
|
|
6446
|
+
* [saving]="saving"
|
|
6447
|
+
* (edit)="editing = true"
|
|
6448
|
+
* (cancel)="editing = false"
|
|
6449
|
+
* (save)="save()"
|
|
6450
|
+
* [value]="threshold + '%'"
|
|
6451
|
+
* >
|
|
6452
|
+
* <ng-template #editor>
|
|
6453
|
+
* <riv-text-field [(value)]="draft"></riv-text-field>
|
|
6454
|
+
* </ng-template>
|
|
6455
|
+
* </riv-setting-row>
|
|
6456
|
+
* ```
|
|
6457
|
+
*
|
|
6458
|
+
* Stack rows directly to build a settings list; each row pads itself
|
|
6459
|
+
* vertically and lays out on a shared twelve-column grid so labels, values,
|
|
6460
|
+
* and actions line up between rows.
|
|
6461
|
+
*/
|
|
6462
|
+
class SettingRowComponent {
|
|
6463
|
+
constructor() {
|
|
6464
|
+
/** Names the setting. Also gives the edit button its screen-reader name, "Edit {label}". */
|
|
6465
|
+
this.label = '';
|
|
6466
|
+
/**
|
|
6467
|
+
* The value shown while reading, as plain text and already formatted, such
|
|
6468
|
+
* as `'$250'`. For anything richer, leave this empty and project it into
|
|
6469
|
+
* `[display-value]` instead.
|
|
6470
|
+
*/
|
|
6471
|
+
this.value = '';
|
|
6472
|
+
/** Explains the setting from an info icon beside the label. */
|
|
6473
|
+
this.infoTooltip = '';
|
|
6474
|
+
/**
|
|
6475
|
+
* Whether the edit field is shown. The consumer (the parent component) owns
|
|
6476
|
+
* this state, so it can keep only one row open for editing at a time.
|
|
6477
|
+
*/
|
|
6478
|
+
this.editing = false;
|
|
6479
|
+
/** Blocks Save, for a draft that is not yet valid. */
|
|
6480
|
+
this.saveDisabled = false;
|
|
6481
|
+
/** Shows Save as loading and blocks Save and Cancel while a save is in flight. */
|
|
6482
|
+
this.saving = false;
|
|
6483
|
+
this.tooltipMaxWidth = '320px';
|
|
6484
|
+
this.edit = new EventEmitter();
|
|
6485
|
+
this.cancel = new EventEmitter();
|
|
6486
|
+
this.save = new EventEmitter();
|
|
6487
|
+
}
|
|
6488
|
+
get editingClass() {
|
|
6489
|
+
return this.editing;
|
|
6490
|
+
}
|
|
6491
|
+
}
|
|
6492
|
+
SettingRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SettingRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6493
|
+
SettingRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SettingRowComponent, selector: "riv-setting-row", inputs: { label: "label", value: "value", infoTooltip: "infoTooltip", editing: "editing", saveDisabled: "saveDisabled", saving: "saving", tooltipMaxWidth: "tooltipMaxWidth" }, outputs: { edit: "edit", cancel: "cancel", save: "save" }, host: { properties: { "class.editing": "this.editingClass" } }, queries: [{ propertyName: "editor", first: true, predicate: ["editor"], descendants: true }], ngImport: i0, template: "<span class=\"label\">\n <riv-icon\n *ngIf=\"infoTooltip\"\n [name]=\"'Info'\"\n [size]=\"16\"\n [rivTooltip]=\"infoTooltip\"\n [rivTooltipMaxWidth]=\"tooltipMaxWidth\"\n ></riv-icon>\n {{ label }}\n</span>\n\n<ng-container *ngIf=\"!editing; else editMode\">\n <span class=\"value\">\n <ng-container *ngIf=\"value; else projectedValue\">{{ value }}</ng-container>\n <ng-template #projectedValue>\n <ng-content select=\"[display-value]\"></ng-content>\n </ng-template>\n </span>\n <div class=\"actions\">\n <button\n rivButton\n type=\"button\"\n [icon]=\"'Edit2'\"\n [rivTooltip]=\"'Edit'\"\n [variant]=\"'ghost'\"\n [attr.aria-label]=\"'Edit ' + label\"\n (click)=\"edit.emit()\"\n ></button>\n </div>\n</ng-container>\n\n<ng-template #editMode>\n <label class=\"field\">\n <riv-sr-only>{{ label }}</riv-sr-only>\n <ng-container *ngTemplateOutlet=\"editor ?? null\"></ng-container>\n </label>\n\n <div class=\"actions\">\n <button\n rivButton\n type=\"button\"\n [variant]=\"'basic'\"\n [size]=\"'medium'\"\n [disabled]=\"saving\"\n (click)=\"cancel.emit()\"\n >\n Cancel\n </button>\n <button\n rivButton\n type=\"button\"\n [variant]=\"'primary'\"\n [size]=\"'medium'\"\n [disabled]=\"saveDisabled || saving\"\n [loading]=\"saving\"\n (click)=\"save.emit()\"\n >\n Save\n </button>\n </div>\n</ng-template>\n", styles: [":host{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--size-large);align-items:center;padding-block:var(--size-medium);color:var(--type-light-high-contrast)}.label,.value,.actions{display:flex;align-items:center;gap:var(--size-small)}.label{grid-column-end:span 4;font:var(--title-02)}.value{grid-column-end:span 7;font:var(--body-medium)}.field{grid-column-end:span 4}.actions{grid-column-end:span 1;justify-content:flex-end}:host.editing .actions{grid-column-end:span 4}\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: ButtonComponent, selector: "[rivButton]", inputs: ["locked", "disabled", "loading", "full", "size", "variant", "icon", "iconPosition", "current"] }, { kind: "component", type: IconComponent, selector: "riv-icon", inputs: ["name", "fillColor", "size", "customSize", "strokeWidth"] }, { kind: "component", type: SrOnlyComponent, selector: "riv-sr-only" }, { kind: "directive", type: TooltipDirective, selector: "[rivTooltip]", inputs: ["rivTooltip", "rivTooltipTheme", "rivTooltipMaxWidth", "rivTooltipPreferredPosition", "rivTooltipAnchor", "rivTooltipCloseDelay", "rivTooltipOpenDelay", "rivTooltipGracePeriod"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6494
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SettingRowComponent, decorators: [{
|
|
6495
|
+
type: Component,
|
|
6496
|
+
args: [{ selector: 'riv-setting-row', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span class=\"label\">\n <riv-icon\n *ngIf=\"infoTooltip\"\n [name]=\"'Info'\"\n [size]=\"16\"\n [rivTooltip]=\"infoTooltip\"\n [rivTooltipMaxWidth]=\"tooltipMaxWidth\"\n ></riv-icon>\n {{ label }}\n</span>\n\n<ng-container *ngIf=\"!editing; else editMode\">\n <span class=\"value\">\n <ng-container *ngIf=\"value; else projectedValue\">{{ value }}</ng-container>\n <ng-template #projectedValue>\n <ng-content select=\"[display-value]\"></ng-content>\n </ng-template>\n </span>\n <div class=\"actions\">\n <button\n rivButton\n type=\"button\"\n [icon]=\"'Edit2'\"\n [rivTooltip]=\"'Edit'\"\n [variant]=\"'ghost'\"\n [attr.aria-label]=\"'Edit ' + label\"\n (click)=\"edit.emit()\"\n ></button>\n </div>\n</ng-container>\n\n<ng-template #editMode>\n <label class=\"field\">\n <riv-sr-only>{{ label }}</riv-sr-only>\n <ng-container *ngTemplateOutlet=\"editor ?? null\"></ng-container>\n </label>\n\n <div class=\"actions\">\n <button\n rivButton\n type=\"button\"\n [variant]=\"'basic'\"\n [size]=\"'medium'\"\n [disabled]=\"saving\"\n (click)=\"cancel.emit()\"\n >\n Cancel\n </button>\n <button\n rivButton\n type=\"button\"\n [variant]=\"'primary'\"\n [size]=\"'medium'\"\n [disabled]=\"saveDisabled || saving\"\n [loading]=\"saving\"\n (click)=\"save.emit()\"\n >\n Save\n </button>\n </div>\n</ng-template>\n", styles: [":host{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--size-large);align-items:center;padding-block:var(--size-medium);color:var(--type-light-high-contrast)}.label,.value,.actions{display:flex;align-items:center;gap:var(--size-small)}.label{grid-column-end:span 4;font:var(--title-02)}.value{grid-column-end:span 7;font:var(--body-medium)}.field{grid-column-end:span 4}.actions{grid-column-end:span 1;justify-content:flex-end}:host.editing .actions{grid-column-end:span 4}\n"] }]
|
|
6497
|
+
}], propDecorators: { label: [{
|
|
6498
|
+
type: Input
|
|
6499
|
+
}], value: [{
|
|
6500
|
+
type: Input
|
|
6501
|
+
}], infoTooltip: [{
|
|
6502
|
+
type: Input
|
|
6503
|
+
}], editing: [{
|
|
6504
|
+
type: Input
|
|
6505
|
+
}], saveDisabled: [{
|
|
6506
|
+
type: Input
|
|
6507
|
+
}], saving: [{
|
|
6508
|
+
type: Input
|
|
6509
|
+
}], tooltipMaxWidth: [{
|
|
6510
|
+
type: Input
|
|
6511
|
+
}], edit: [{
|
|
6512
|
+
type: Output
|
|
6513
|
+
}], cancel: [{
|
|
6514
|
+
type: Output
|
|
6515
|
+
}], save: [{
|
|
6516
|
+
type: Output
|
|
6517
|
+
}], editor: [{
|
|
6518
|
+
type: ContentChild,
|
|
6519
|
+
args: ['editor']
|
|
6520
|
+
}], editingClass: [{
|
|
6521
|
+
type: HostBinding,
|
|
6522
|
+
args: ['class.editing']
|
|
6523
|
+
}] } });
|
|
6524
|
+
|
|
6421
6525
|
/**
|
|
6422
6526
|
* A borderless heading with a click-to-edit title and an optional
|
|
6423
6527
|
* click-to-edit description, plus a projected slot for actions.
|
|
@@ -18268,6 +18372,7 @@ RivModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
|
|
18268
18372
|
SelectComponent,
|
|
18269
18373
|
SelectNodeComponent,
|
|
18270
18374
|
SentenceCasePipe,
|
|
18375
|
+
SettingRowComponent,
|
|
18271
18376
|
SideSheetComponent,
|
|
18272
18377
|
SimpleSelectComponent,
|
|
18273
18378
|
SimpleTabComponent,
|
|
@@ -18376,6 +18481,7 @@ RivModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
|
|
18376
18481
|
SearchSelectComponent,
|
|
18377
18482
|
SelectComponent,
|
|
18378
18483
|
SentenceCasePipe,
|
|
18484
|
+
SettingRowComponent,
|
|
18379
18485
|
SideSheetComponent,
|
|
18380
18486
|
SimpleSelectComponent,
|
|
18381
18487
|
SimpleTabComponent,
|
|
@@ -18492,6 +18598,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
18492
18598
|
SelectComponent,
|
|
18493
18599
|
SelectNodeComponent,
|
|
18494
18600
|
SentenceCasePipe,
|
|
18601
|
+
SettingRowComponent,
|
|
18495
18602
|
SideSheetComponent,
|
|
18496
18603
|
SimpleSelectComponent,
|
|
18497
18604
|
SimpleTabComponent,
|
|
@@ -18603,6 +18710,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
18603
18710
|
SearchSelectComponent,
|
|
18604
18711
|
SelectComponent,
|
|
18605
18712
|
SentenceCasePipe,
|
|
18713
|
+
SettingRowComponent,
|
|
18606
18714
|
SideSheetComponent,
|
|
18607
18715
|
SimpleSelectComponent,
|
|
18608
18716
|
SimpleTabComponent,
|
|
@@ -18651,5 +18759,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
18651
18759
|
* Generated bundle index. Do not edit.
|
|
18652
18760
|
*/
|
|
18653
18761
|
|
|
18654
|
-
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, 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, 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 };
|
|
18762
|
+
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, 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 };
|
|
18655
18763
|
//# sourceMappingURL=rivet-health-design-system.mjs.map
|