@rivet-health/design-system 40.25.0 → 40.26.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.
@@ -89,8 +89,8 @@ import * as i0 from "@angular/core";
89
89
  * its corners. Popups (`riv-menu`, `rivTooltip`) render through the overlay
90
90
  * outlet, so they are not affected by that clipping.
91
91
  *
92
- * Per-instance radius can be overridden with the `--card-border-radius`
93
- * custom property.
92
+ * Set the corner radius with `radius`. The `--card-border-radius` custom
93
+ * property still overrides it, for radii off the token scale.
94
94
  */
95
95
  export declare class CardComponent implements OnInit {
96
96
  private readonly el;
@@ -111,6 +111,15 @@ export declare class CardComponent implements OnInit {
111
111
  * their own padding.
112
112
  */
113
113
  padding: CardComponent.Padding;
114
+ /** Corner radius, matching the `--border-radius-*` tokens. */
115
+ radius: CardComponent.Radius;
116
+ /**
117
+ * Shadow raised on hover, matching the `--depth-*` tokens. Defaults to `1`
118
+ * for a clickable card, `2` for a clickable elevated card, and `none`
119
+ * otherwise. A hover shadow reads as clickable, so set it on a card that
120
+ * is not `clickable` only when the card's own controls make it interactive.
121
+ */
122
+ hoverDepth?: CardComponent.Depth;
114
123
  /**
115
124
  * Makes the whole surface activate, emitting `cardClick`. Adds the hover
116
125
  * affordance and keyboard support.
@@ -184,7 +193,7 @@ export declare class CardComponent implements OnInit {
184
193
  get ariaCurrent(): string | null;
185
194
  get classes(): string;
186
195
  static ɵfac: i0.ɵɵFactoryDeclaration<CardComponent, never>;
187
- static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent, "riv-card", never, { "variant": "variant"; "surface": "surface"; "tone": "tone"; "orientation": "orientation"; "padding": "padding"; "clickable": "clickable"; "clickLabel": "clickLabel"; "selected": "selected"; "disabled": "disabled"; }, { "cardClick": "cardClick"; }, never, ["*"], false, never>;
196
+ static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent, "riv-card", never, { "variant": "variant"; "surface": "surface"; "tone": "tone"; "orientation": "orientation"; "padding": "padding"; "radius": "radius"; "hoverDepth": "hoverDepth"; "clickable": "clickable"; "clickLabel": "clickLabel"; "selected": "selected"; "disabled": "disabled"; }, { "cardClick": "cardClick"; }, never, ["*"], false, never>;
188
197
  }
189
198
  export declare namespace CardComponent {
190
199
  const Variants: readonly ["outlined", "elevated", "flat", "dashed"];
@@ -198,4 +207,9 @@ export declare namespace CardComponent {
198
207
  /** Shared padding scale for the card and its sub-components. */
199
208
  const Paddings: readonly ["none", "small", "medium", "large", "xlarge", "xxlarge"];
200
209
  type Padding = (typeof Paddings)[number];
210
+ const Radii: readonly ["small", "medium", "large", "xlarge"];
211
+ type Radius = (typeof Radii)[number];
212
+ const Depths: readonly ["none", "1", "2", "3", "4"];
213
+ type Depth = (typeof Depths)[number];
214
+ function defaultHoverDepth({ clickable, variant, }: Pick<CardComponent, 'clickable' | 'variant'>): Depth;
201
215
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivet-health/design-system",
3
- "version": "40.25.0",
3
+ "version": "40.26.0",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": ">=14.0.0",
6
6
  "@angular/common": ">=14.0.0",