Redesign - Shared field foundation rules (duplicated across 15 form components and emitted globally) are now identical everywhere, so later copies no longer silently override earlier redesigns. - Drawn checkbox and radio controls, white switch thumbs (the thumb was the text colour, a black blob in light mode), recessed field wells, keycap actions in Modal, Drawer, Popover, Toaster, Pagination, Stepper, DataTable. - Menus (Dropdown, ContextMenu, Popover, Select dropdown, Navbar panels) share one flat raised panel with neutral hover rows and mono section labels. - Alerts with an accent rail and icon chip; card headers without the grey band; accordion, collapse, list, list group, timeline, stats, metrics, chat, skeleton, avatar group, clipboard, splitter, section, sidebar, navbar and upload progress restyled. - Chart rebuilt: nice y-axis ticks, gridlines, rounded bars, line and area modes, hover tooltips, hidden series leave the scale. Fixes - Checkbox and radio labels toggle their input again (empty for="" broke it). - TimePicker kept every clicked time pressed; only the chosen hour and minute are pressed now, and nothing is pressed before a value exists. - ColorPicker hex readout now follows the picked colour. - Disabled FileInput no longer shows the native file-input text. - Date and time panels float instead of pushing content. - ContextMenu opened at the pointer closes on scroll. - Drawer left/top/bottom placements slide from their own edge again. - Image-only Card no longer renders an empty body strip. - Timeline supports item.time, current/upcoming states, sizes and compact/alternate variants; showcase demos use distinct variants. - ChatBubble: delivery receipts (sending/sent/delivered/read/failed/error) and meta aligned to its bubble. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
657 lines
19 KiB
Plaintext
657 lines
19 KiB
Plaintext
component MetricCard {
|
|
outputs {
|
|
select(payload: { label: string; value: string; href: string; sourceEvent: Event })
|
|
action(payload: { label: string; value: string; href: string; sourceEvent: Event })
|
|
}
|
|
|
|
props {
|
|
|
|
label: string = "Metric"
|
|
value: string = "0"
|
|
description: string = ""
|
|
icon: string = ""
|
|
iconStyle: string = "soft"
|
|
prefix: string = ""
|
|
suffix: string = ""
|
|
badge: string = ""
|
|
trend: string = ""
|
|
trendLabel: string = ""
|
|
trendDirection: string = "neutral"
|
|
progress: number = -1
|
|
progressLabel: string = ""
|
|
href: string = ""
|
|
target: string = ""
|
|
rel: string = ""
|
|
external: boolean = false
|
|
actionLabel: string = ""
|
|
actionIcon: string = ""
|
|
showArrow: boolean = true
|
|
selectable: boolean = false
|
|
disabled: boolean = false
|
|
size: string = "default"
|
|
color: string = "primary"
|
|
variant: string = "default"
|
|
hover: string = "none"
|
|
align: string = "left"
|
|
class: string = ""
|
|
}
|
|
|
|
functions {
|
|
client function selectCard(sourceEvent) {
|
|
if (disabled || !selectable) {
|
|
return
|
|
}
|
|
if (sourceEvent.target.closest(".wrn-metric-card__action")) {
|
|
return
|
|
}
|
|
output.select({
|
|
label: label,
|
|
value: value,
|
|
href: href,
|
|
sourceEvent: sourceEvent
|
|
})
|
|
}
|
|
|
|
client function activateAction(sourceEvent) {
|
|
if (disabled) {
|
|
sourceEvent.preventDefault()
|
|
return
|
|
}
|
|
output.action({
|
|
label: label,
|
|
value: value,
|
|
href: href,
|
|
sourceEvent: sourceEvent
|
|
})
|
|
}
|
|
}
|
|
|
|
view {
|
|
<article
|
|
{...attrs}
|
|
data-ui-component="MetricCard"
|
|
data-size='{size}'
|
|
data-color='{color}'
|
|
data-variant='{variant}'
|
|
data-hover='{hover}'
|
|
data-align='{align}'
|
|
data-icon-style='{iconStyle}'
|
|
data-disabled='{disabled ? "true" : "false"}'
|
|
data-selectable='{selectable ? "true" : "false"}'
|
|
class='wrn-metric-card {class}'
|
|
role='{selectable ? "button" : ""}'
|
|
tabindex='{selectable && !disabled ? "0" : "-1"}'
|
|
@click='selectCard(event)'
|
|
@keydown='if (selectable && (event.key === "Enter" || event.key === " ")) { event.preventDefault(); selectCard(event) }'
|
|
style='--wrn-metric-progress: {progress}%;'
|
|
>
|
|
<div class="wrn-metric-card__top">
|
|
<div class="wrn-metric-card__heading">
|
|
{#if label}
|
|
<p class="wrn-metric-card__label">{label}</p>
|
|
{/if}
|
|
|
|
{#if badge}
|
|
<span class="wrn-metric-card__badge">{badge}</span>
|
|
{/if}
|
|
</div>
|
|
|
|
{#if icon}
|
|
<div class="wrn-metric-card__icon" aria-hidden="true">
|
|
<span class='{icon}'></span>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
|
|
<div class="wrn-metric-card__value-row">
|
|
{#if prefix}
|
|
<span class="wrn-metric-card__prefix">{prefix}</span>
|
|
{/if}
|
|
|
|
<strong class="wrn-metric-card__value">{value}</strong>
|
|
|
|
{#if suffix}
|
|
<span class="wrn-metric-card__suffix">{suffix}</span>
|
|
{/if}
|
|
</div>
|
|
|
|
{#if description}
|
|
<p class="wrn-metric-card__description">{description}</p>
|
|
{/if}
|
|
|
|
<slot></slot>
|
|
|
|
{#if progress >= 0}
|
|
<div class="wrn-metric-card__progress-block">
|
|
<div class="wrn-metric-card__progress-meta">
|
|
<span>{progressLabel || "Progress"}</span>
|
|
<strong>{progress}%</strong>
|
|
</div>
|
|
<div
|
|
class="wrn-metric-card__progress-track"
|
|
role="progressbar"
|
|
aria-label='{progressLabel || label}'
|
|
aria-valuemin="0"
|
|
aria-valuemax="100"
|
|
aria-valuenow='{progress}'
|
|
>
|
|
<span class="wrn-metric-card__progress-value"></span>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
|
|
{#if trend || trendLabel}
|
|
<div
|
|
class="wrn-metric-card__trend"
|
|
data-direction='{trendDirection}'
|
|
>
|
|
{#if trendDirection === "up" || trendDirection === "positive"}
|
|
<span class="icon-[lucide--trending-up] wrn-metric-card__trend-icon" aria-hidden="true"></span>
|
|
{:else if trendDirection === "down" || trendDirection === "negative"}
|
|
<span class="icon-[lucide--trending-down] wrn-metric-card__trend-icon" aria-hidden="true"></span>
|
|
{:else}
|
|
<span class="icon-[lucide--minus] wrn-metric-card__trend-icon" aria-hidden="true"></span>
|
|
{/if}
|
|
|
|
{#if trend}
|
|
<strong class="wrn-metric-card__trend-value">{trend}</strong>
|
|
{/if}
|
|
|
|
{#if trendLabel}
|
|
<span class="wrn-metric-card__trend-label">{trendLabel}</span>
|
|
{/if}
|
|
</div>
|
|
{/if}
|
|
|
|
<div class="wrn-metric-card__footer">
|
|
<slot name="footer"></slot>
|
|
|
|
{#if href}
|
|
<a
|
|
href='{href}'
|
|
target='{target}'
|
|
rel='{external || target === "_blank" ? "noopener noreferrer" : rel}'
|
|
class="wrn-metric-card__action"
|
|
aria-disabled='{disabled ? "true" : "false"}'
|
|
@click='activateAction(event)'
|
|
>
|
|
<span>{actionLabel || "View details"}</span>
|
|
|
|
{#if actionIcon}
|
|
<span class='wrn-metric-card__action-icon {actionIcon}' aria-hidden="true"></span>
|
|
{:else if external}
|
|
<span class="wrn-metric-card__action-icon icon-[lucide--external-link]" aria-hidden="true"></span>
|
|
{:else if showArrow}
|
|
<span class="wrn-metric-card__action-icon icon-[lucide--arrow-right]" aria-hidden="true"></span>
|
|
{/if}
|
|
</a>
|
|
{:else if actionLabel}
|
|
<button
|
|
type="button"
|
|
class="wrn-metric-card__action"
|
|
disabled='{disabled}'
|
|
@click='activateAction(event)'
|
|
>
|
|
<span>{actionLabel}</span>
|
|
{#if actionIcon}
|
|
<span class='wrn-metric-card__action-icon {actionIcon}' aria-hidden="true"></span>
|
|
{:else if showArrow}
|
|
<span class="wrn-metric-card__action-icon icon-[lucide--arrow-right]" aria-hidden="true"></span>
|
|
{/if}
|
|
</button>
|
|
{/if}
|
|
</div>
|
|
</article>
|
|
}
|
|
|
|
style {
|
|
.wrn-metric-card {
|
|
--metric-accent: var(--wrn-color-primary);
|
|
--metric-accent-hover: var(--wrn-color-primary-hover);
|
|
--metric-accent-soft: var(--wrn-color-primary-soft);
|
|
--metric-accent-muted: var(--wrn-color-primary-muted);
|
|
--metric-contrast: var(--wrn-color-primary-contrast);
|
|
--metric-border: var(--wrn-color-border);
|
|
position: relative;
|
|
isolation: isolate;
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 100%;
|
|
min-width: 0;
|
|
height: 100%;
|
|
padding: var(--wrn-space-panel, 1.25rem);
|
|
color: var(--wrn-color-text);
|
|
background: var(--wrn-color-surface);
|
|
border: 1px solid var(--metric-border);
|
|
border-radius: var(--wrn-radius);
|
|
box-shadow: var(--wrn-shadow-1);
|
|
overflow: hidden;
|
|
transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
|
|
}
|
|
|
|
.wrn-metric-card[data-color="secondary"] {
|
|
--metric-accent: var(--wrn-color-secondary);
|
|
--metric-accent-hover: var(--wrn-color-secondary-hover);
|
|
--metric-accent-soft: var(--wrn-color-secondary-soft);
|
|
--metric-accent-muted: var(--wrn-color-secondary-muted);
|
|
--metric-contrast: var(--wrn-color-secondary-contrast);
|
|
}
|
|
|
|
.wrn-metric-card[data-color="info"] {
|
|
--metric-accent: var(--wrn-color-info);
|
|
--metric-accent-hover: var(--wrn-color-info-hover);
|
|
--metric-accent-soft: var(--wrn-color-info-soft);
|
|
--metric-accent-muted: var(--wrn-color-info-muted);
|
|
--metric-contrast: var(--wrn-color-info-contrast);
|
|
}
|
|
|
|
.wrn-metric-card[data-color="success"] {
|
|
--metric-accent: var(--wrn-color-success);
|
|
--metric-accent-hover: var(--wrn-color-success-hover);
|
|
--metric-accent-soft: var(--wrn-color-success-soft);
|
|
--metric-accent-muted: var(--wrn-color-success-muted);
|
|
--metric-contrast: var(--wrn-color-success-contrast);
|
|
}
|
|
|
|
.wrn-metric-card[data-color="warning"] {
|
|
--metric-accent: var(--wrn-color-warning);
|
|
--metric-accent-hover: var(--wrn-color-warning-hover);
|
|
--metric-accent-soft: var(--wrn-color-warning-soft);
|
|
--metric-accent-muted: var(--wrn-color-warning-muted);
|
|
--metric-contrast: var(--wrn-color-warning-contrast);
|
|
}
|
|
|
|
.wrn-metric-card[data-color="danger"] {
|
|
--metric-accent: var(--wrn-color-danger);
|
|
--metric-accent-hover: var(--wrn-color-danger-hover);
|
|
--metric-accent-soft: var(--wrn-color-danger-soft);
|
|
--metric-accent-muted: var(--wrn-color-danger-muted);
|
|
--metric-contrast: var(--wrn-color-danger-contrast);
|
|
}
|
|
|
|
.wrn-metric-card[data-size="sm"] {
|
|
padding: 1.1rem;
|
|
border-radius: 1rem;
|
|
}
|
|
|
|
.wrn-metric-card[data-size="lg"] {
|
|
padding: 1.5rem;
|
|
border-radius: var(--wrn-radius-lg);
|
|
}
|
|
|
|
.wrn-metric-card[data-variant="soft"] {
|
|
background:
|
|
var(--wrn-color-surface-raised);
|
|
box-shadow: none;
|
|
}
|
|
|
|
.wrn-metric-card[data-variant="raised"] {
|
|
box-shadow: var(--wrn-highlight-edge, none), var(--wrn-shadow-3);
|
|
}
|
|
|
|
.wrn-metric-card[data-variant="outline"] {
|
|
background: transparent;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.wrn-metric-card[data-variant="minimal"] {
|
|
padding-inline: 0;
|
|
background: transparent;
|
|
border-color: transparent;
|
|
border-radius: 0;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.wrn-metric-card[data-variant="solid"] {
|
|
color: var(--metric-contrast);
|
|
background:
|
|
var(--metric-accent);
|
|
border-color: color-mix(in srgb, white 22%, transparent);
|
|
box-shadow: var(--wrn-shadow-3);
|
|
}
|
|
|
|
.wrn-metric-card[data-variant="gradient"] {
|
|
background:
|
|
linear-gradient(
|
|
145deg,
|
|
color-mix(in srgb, var(--metric-accent) 20%, var(--wrn-color-surface-raised)),
|
|
var(--wrn-color-surface-raised) 58%
|
|
);
|
|
}
|
|
|
|
.wrn-metric-card[data-disabled="true"] {
|
|
cursor: not-allowed;
|
|
opacity: 0.58;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.wrn-metric-card[data-selectable="true"]:not([data-disabled="true"]) {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.wrn-metric-card[data-hover="lift"]:hover {
|
|
transform: translateY(-2px);
|
|
border-color: var(--wrn-color-border-strong, var(--wrn-color-border));
|
|
box-shadow: var(--wrn-shadow-2);
|
|
}
|
|
|
|
.wrn-metric-card[data-hover="border"]:hover {
|
|
border-color: var(--metric-accent);
|
|
}
|
|
|
|
.wrn-metric-card[data-hover="glow"]:hover {
|
|
border-color: color-mix(in srgb, var(--metric-accent) 45%, var(--wrn-color-border));
|
|
box-shadow: 0 0 0 3px color-mix(in srgb, var(--metric-accent) 12%, transparent), var(--wrn-shadow-2);
|
|
}
|
|
|
|
.wrn-metric-card[data-align="center"] {
|
|
align-items: center;
|
|
text-align: center;
|
|
}
|
|
|
|
.wrn-metric-card[data-align="right"] {
|
|
align-items: flex-end;
|
|
text-align: right;
|
|
}
|
|
|
|
.wrn-metric-card__top {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 1rem;
|
|
width: 100%;
|
|
}
|
|
|
|
.wrn-metric-card__heading {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: 0.55rem;
|
|
min-width: 0;
|
|
}
|
|
|
|
.wrn-metric-card__label {
|
|
margin: 0;
|
|
color: var(--wrn-color-text-muted);
|
|
font-size: 0.8125rem;
|
|
font-weight: 550;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.wrn-metric-card__badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-height: 1.375rem;
|
|
padding: 0.125rem 0.5rem;
|
|
color: var(--wrn-color-primary-text, var(--metric-accent));
|
|
background: color-mix(in srgb, var(--metric-accent) 10%, var(--wrn-color-surface));
|
|
border: 1px solid color-mix(in srgb, var(--metric-accent) 22%, transparent);
|
|
border-radius: 999px;
|
|
font-size: 0.6875rem;
|
|
font-weight: 650;
|
|
line-height: 1;
|
|
}
|
|
|
|
.wrn-metric-card[data-variant="solid"] .wrn-metric-card__label,
|
|
.wrn-metric-card[data-variant="solid"] .wrn-metric-card__description,
|
|
.wrn-metric-card[data-variant="solid"] .wrn-metric-card__trend-label,
|
|
.wrn-metric-card[data-variant="solid"] .wrn-metric-card__progress-meta {
|
|
color: color-mix(in srgb, currentColor 78%, transparent);
|
|
}
|
|
|
|
.wrn-metric-card[data-variant="solid"] .wrn-metric-card__badge {
|
|
color: currentColor;
|
|
background: color-mix(in srgb, white 14%, transparent);
|
|
border-color: color-mix(in srgb, white 22%, transparent);
|
|
}
|
|
|
|
.wrn-metric-card__icon {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex: 0 0 auto;
|
|
width: 2.5rem;
|
|
height: 2.5rem;
|
|
color: var(--metric-accent);
|
|
background: color-mix(in srgb, var(--metric-accent) 10%, var(--wrn-color-surface));
|
|
border: 1px solid color-mix(in srgb, var(--metric-accent) 18%, transparent);
|
|
border-radius: var(--wrn-radius-sm);
|
|
font-size: 1.125rem;
|
|
}
|
|
|
|
.wrn-metric-card[data-icon-style="ghost"] .wrn-metric-card__icon {
|
|
background: transparent;
|
|
border-color: transparent;
|
|
}
|
|
|
|
.wrn-metric-card[data-icon-style="outline"] .wrn-metric-card__icon {
|
|
background: transparent;
|
|
border-color: color-mix(in srgb, var(--metric-accent) 34%, var(--wrn-color-border));
|
|
}
|
|
|
|
.wrn-metric-card[data-icon-style="solid"] .wrn-metric-card__icon,
|
|
.wrn-metric-card[data-variant="solid"] .wrn-metric-card__icon {
|
|
color: var(--metric-contrast);
|
|
background: var(--metric-accent);
|
|
border-color: transparent;
|
|
}
|
|
|
|
.wrn-metric-card[data-variant="solid"] .wrn-metric-card__icon {
|
|
color: currentColor;
|
|
background: color-mix(in srgb, white 14%, transparent);
|
|
border-color: color-mix(in srgb, white 20%, transparent);
|
|
}
|
|
|
|
.wrn-metric-card__value-row {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: 0.2rem;
|
|
width: 100%;
|
|
margin-top: 0.75rem;
|
|
}
|
|
|
|
.wrn-metric-card[data-align="center"] .wrn-metric-card__value-row {
|
|
justify-content: center;
|
|
}
|
|
|
|
.wrn-metric-card[data-align="right"] .wrn-metric-card__value-row {
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.wrn-metric-card__value {
|
|
color: var(--wrn-color-text);
|
|
font-size: clamp(1.75rem, 3vw, 2.125rem);
|
|
font-weight: 650;
|
|
line-height: 1;
|
|
letter-spacing: -0.04em;
|
|
white-space: nowrap;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.wrn-metric-card[data-size="sm"] .wrn-metric-card__value {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.wrn-metric-card[data-size="lg"] .wrn-metric-card__value {
|
|
font-size: clamp(2rem, 4vw, 2.5rem);
|
|
}
|
|
|
|
.wrn-metric-card[data-variant="solid"] .wrn-metric-card__value {
|
|
color: currentColor;
|
|
}
|
|
|
|
.wrn-metric-card__prefix,
|
|
.wrn-metric-card__suffix {
|
|
color: var(--wrn-color-text-subtle, var(--wrn-color-text-muted));
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.wrn-metric-card[data-variant="solid"] .wrn-metric-card__prefix,
|
|
.wrn-metric-card[data-variant="solid"] .wrn-metric-card__suffix {
|
|
color: currentColor;
|
|
}
|
|
|
|
.wrn-metric-card__description {
|
|
max-width: 38rem;
|
|
margin: 0.8rem 0 0;
|
|
color: var(--wrn-color-text-muted);
|
|
font-size: 0.8125rem;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.wrn-metric-card__progress-block {
|
|
width: 100%;
|
|
margin-top: 1.25rem;
|
|
}
|
|
|
|
.wrn-metric-card__progress-meta {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 1rem;
|
|
margin-bottom: 0.45rem;
|
|
color: var(--wrn-color-text-muted);
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
.wrn-metric-card__progress-track {
|
|
width: 100%;
|
|
height: 0.375rem;
|
|
overflow: hidden;
|
|
background: var(--wrn-color-surface-muted, var(--wrn-color-surface-2));
|
|
box-shadow: inset 0 1px 1px rgb(0 0 0 / 0.08);
|
|
border-radius: 999px;
|
|
}
|
|
|
|
.wrn-metric-card__progress-value {
|
|
display: block;
|
|
width: clamp(0%, var(--wrn-metric-progress), 100%);
|
|
height: 100%;
|
|
background: var(--metric-accent);
|
|
border-radius: inherit;
|
|
}
|
|
|
|
.wrn-metric-card[data-variant="solid"] .wrn-metric-card__progress-track {
|
|
background: color-mix(in srgb, white 20%, transparent);
|
|
}
|
|
|
|
.wrn-metric-card[data-variant="solid"] .wrn-metric-card__progress-value {
|
|
background: currentColor;
|
|
}
|
|
|
|
.wrn-metric-card__trend {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
align-self: flex-start;
|
|
gap: 0.375rem;
|
|
margin-top: 1rem;
|
|
color: var(--wrn-color-text-muted);
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
line-height: 1.4;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.wrn-metric-card[data-align="center"] .wrn-metric-card__trend {
|
|
align-self: center;
|
|
}
|
|
|
|
.wrn-metric-card[data-align="right"] .wrn-metric-card__trend {
|
|
align-self: flex-end;
|
|
}
|
|
|
|
.wrn-metric-card__trend[data-direction="up"],
|
|
.wrn-metric-card__trend[data-direction="positive"] {
|
|
color: var(--wrn-color-success-text, var(--wrn-color-success));
|
|
}
|
|
|
|
.wrn-metric-card__trend[data-direction="down"],
|
|
.wrn-metric-card__trend[data-direction="negative"] {
|
|
color: var(--wrn-color-danger-text, var(--wrn-color-danger));
|
|
}
|
|
|
|
.wrn-metric-card__trend-icon {
|
|
width: 0.95rem;
|
|
height: 0.95rem;
|
|
}
|
|
|
|
.wrn-metric-card__trend-label {
|
|
color: var(--wrn-color-text-muted);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.wrn-metric-card__footer {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 0.8rem;
|
|
width: 100%;
|
|
margin-top: auto;
|
|
padding-top: 1.35rem;
|
|
}
|
|
|
|
.wrn-metric-card__action {
|
|
appearance: none;
|
|
padding: 0;
|
|
background: transparent;
|
|
border: 0;
|
|
font: inherit;
|
|
cursor: pointer;
|
|
position: relative;
|
|
z-index: 1;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.375rem;
|
|
color: var(--wrn-color-primary-text, var(--metric-accent));
|
|
font-size: 0.8125rem;
|
|
font-weight: 600;
|
|
line-height: 1.3;
|
|
text-decoration: none;
|
|
transition: color 160ms ease, gap 160ms ease;
|
|
}
|
|
|
|
.wrn-metric-card__action:hover {
|
|
gap: 0.62rem;
|
|
color: var(--metric-accent-hover);
|
|
}
|
|
|
|
.wrn-metric-card[data-variant="solid"] .wrn-metric-card__action {
|
|
color: currentColor;
|
|
}
|
|
|
|
.wrn-metric-card__action-icon {
|
|
width: 1rem;
|
|
height: 1rem;
|
|
}
|
|
|
|
.wrn-metric-card__action:focus-visible {
|
|
outline: 2px solid var(--wrn-color-focus);
|
|
outline-offset: 4px;
|
|
border-radius: 0.35rem;
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
.wrn-metric-card {
|
|
padding: 1.2rem;
|
|
}
|
|
|
|
.wrn-metric-card__value {
|
|
font-size: 2.05rem;
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.wrn-metric-card,
|
|
.wrn-metric-card__action {
|
|
transition: none;
|
|
}
|
|
|
|
.wrn-metric-card[data-hover="lift"]:hover {
|
|
transform: none;
|
|
}
|
|
}
|
|
}
|
|
}
|