@rivet-health/design-system 40.44.3 → 40.44.4
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/esm2022/lib/input/date-range/date-range.component.mjs +3 -2
- package/esm2022/lib/input/select/select/select.component.mjs +3 -2
- package/esm2022/lib/layout/card/card-link.component.mjs +28 -7
- package/esm2022/lib/layout/card/card.component.mjs +21 -6
- package/esm2022/lib/overlay/callout/callout.component.mjs +2 -2
- package/esm2022/lib/overlay/callout/menu/menu.component.mjs +3 -2
- package/fesm2022/rivet-health-design-system.mjs +52 -14
- package/fesm2022/rivet-health-design-system.mjs.map +1 -1
- package/lib/layout/card/card-link.component.d.ts +14 -4
- package/lib/layout/card/card.component.d.ts +16 -6
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ElementRef, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { ElementRef, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { CardComponent } from './card.component';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* Makes a `riv-card` activate, applied to a native `<a>` or `<button>` inside
|
|
@@ -34,18 +35,27 @@ import * as i0 from "@angular/core";
|
|
|
34
35
|
* When `stretch` is used, keep the visible link text meaningful on its own —
|
|
35
36
|
* it is the accessible name for the whole card.
|
|
36
37
|
*/
|
|
37
|
-
export declare class CardLinkComponent implements OnChanges {
|
|
38
|
+
export declare class CardLinkComponent implements OnInit, OnChanges, OnDestroy {
|
|
38
39
|
private readonly el;
|
|
39
40
|
private readonly renderer;
|
|
40
|
-
|
|
41
|
+
private readonly card;
|
|
42
|
+
constructor(el: ElementRef, renderer: Renderer2, card: CardComponent | null);
|
|
41
43
|
/** Whether the hit area covers the whole card or only the wrapped region. */
|
|
42
44
|
mode: CardLinkComponent.Mode;
|
|
43
45
|
disabled?: boolean;
|
|
44
46
|
get classes(): string;
|
|
45
47
|
get ariaDisabled(): 'true' | null;
|
|
46
48
|
get tabIndex(): '-1' | null;
|
|
49
|
+
/**
|
|
50
|
+
* Tells the enclosing card when this link covers it, so the card raises the
|
|
51
|
+
* same hover shadow as a clickable one. Registered on init too, since an
|
|
52
|
+
* unbound `mode` defaults to `stretch` without triggering `ngOnChanges`.
|
|
53
|
+
*/
|
|
54
|
+
ngOnInit(): void;
|
|
47
55
|
ngOnChanges(changes: SimpleChanges): void;
|
|
48
|
-
|
|
56
|
+
ngOnDestroy(): void;
|
|
57
|
+
private registerStretch;
|
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CardLinkComponent, [null, null, { optional: true; }]>;
|
|
49
59
|
static ɵcmp: i0.ɵɵComponentDeclaration<CardLinkComponent, "[riv-card-link]", never, { "mode": { "alias": "mode"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
50
60
|
}
|
|
51
61
|
export declare namespace CardLinkComponent {
|
|
@@ -114,15 +114,17 @@ export declare class CardComponent implements OnInit {
|
|
|
114
114
|
/** Corner radius, matching the `--border-radius-*` tokens. */
|
|
115
115
|
radius: CardComponent.Radius;
|
|
116
116
|
/**
|
|
117
|
-
* Shadow raised on hover, matching the `--depth-*` tokens.
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
117
|
+
* Shadow raised on hover, matching the `--depth-*` tokens. This shadow is
|
|
118
|
+
* the card's only hover feedback; the surface is not tinted. Defaults to `1`
|
|
119
|
+
* for a card that activates as a whole — `clickable`, or holding an enabled
|
|
120
|
+
* stretch `[riv-card-link]` — `2` for such a card when elevated, and `none`
|
|
121
|
+
* otherwise. A hover shadow reads as clickable, so set it on any other card
|
|
122
|
+
* only when the card's own controls make it interactive.
|
|
121
123
|
*/
|
|
122
124
|
hoverDepth?: CardComponent.Depth;
|
|
123
125
|
/**
|
|
124
|
-
* Makes the whole surface activate, emitting `cardClick`. Adds
|
|
125
|
-
*
|
|
126
|
+
* Makes the whole surface activate, emitting `cardClick`. Adds keyboard
|
|
127
|
+
* support and a hover shadow (see `hoverDepth`).
|
|
126
128
|
*/
|
|
127
129
|
clickable: boolean;
|
|
128
130
|
/**
|
|
@@ -154,6 +156,8 @@ export declare class CardComponent implements OnInit {
|
|
|
154
156
|
private titleId?;
|
|
155
157
|
/** Set by a projected `riv-card-header` that is expandable. */
|
|
156
158
|
private expandRegionId?;
|
|
159
|
+
/** Set by a projected `[riv-card-link]` whose overlay covers the card. */
|
|
160
|
+
private stretchLink;
|
|
157
161
|
/**
|
|
158
162
|
* Id an expandable header's toggle points `aria-controls` at, worn by a
|
|
159
163
|
* projected `riv-card-content`.
|
|
@@ -183,6 +187,12 @@ export declare class CardComponent implements OnInit {
|
|
|
183
187
|
* longer the one in use.
|
|
184
188
|
*/
|
|
185
189
|
clearRegionId(id: string): void;
|
|
190
|
+
/**
|
|
191
|
+
* Records whether an enabled stretch `[riv-card-link]` covers the card, which
|
|
192
|
+
* makes the whole surface activate and so earns the clickable hover shadow.
|
|
193
|
+
* Called by `riv-card-link`; not part of the public API.
|
|
194
|
+
*/
|
|
195
|
+
setStretchLink(present: boolean): void;
|
|
186
196
|
/**
|
|
187
197
|
* Element whose text names the click target, unless `clickLabel` is set. The
|
|
188
198
|
* host id is read from the DOM rather than cached, so a bound `[id]` that
|