Migrate UI theme variables to react-zen tokens and update dependency package

This commit is contained in:
Mike Cao committed 2026-08-24 17:02:57 -07:00
1 parent af542569bf
commit eea124bbf8
17 files changed
+129 -93

No files matched your search

+2 -2
View File
@@ -46,7 +46,7 @@ export function TopNav() {
paddingRight="5"
width="100%"
zIndex={100}
backgroundColor="surface-raised"
backgroundColor="surface-base"
>
<Row alignItems="center">
<TeamsButton />
@@ -109,7 +109,7 @@ export function TopNav() {
left: 0,
right: 0,
height: 16,
background: 'linear-gradient(to bottom, var(--surface-raised), transparent)',
background: 'linear-gradient(to bottom, var(--zen-surface-base), transparent)',
pointerEvents: 'none',
}}
/>
+1 -1
View File
@@ -48,7 +48,7 @@ export function WebsiteSparkline({
maxWidth: 88,
height: 24,
borderRadius: 9999,
background: 'var(--surface-sunken)',
background: 'var(--zen-surface-sunken)',
}}
/>
);
@@ -12,7 +12,7 @@
.railDivider {
width: 1px;
height: 100%;
background: var(--gray-300, #d1d5db);
background: var(--zen-gray-300, #d1d5db);
justify-self: center;
}
@@ -49,12 +49,12 @@
}
.pageButton:hover {
background: var(--surface-sunken);
background: var(--zen-surface-sunken);
}
.pageButtonSelected,
.pageButtonSelected:hover {
background: var(--surface-sunken);
background: var(--zen-surface-sunken);
font-weight: 600;
}
@@ -74,8 +74,8 @@
.mobileSelectedPageButton {
width: 100%;
text-align: left;
border: 1px solid var(--border-base);
background: var(--surface-raised);
border: 1px solid var(--zen-border-default);
background: var(--zen-surface-raised);
border-radius: 8px;
padding: 10px 12px;
cursor: pointer;
@@ -84,7 +84,7 @@
}
.mobileSelectedPageButton:hover {
background: var(--surface-sunken);
background: var(--zen-surface-sunken);
}
.summaryHeader {
@@ -108,8 +108,8 @@
align-items: center;
padding: 4px 10px;
border-radius: 999px;
background: var(--surface-raised);
border: 1px solid var(--border-base);
background: var(--zen-surface-raised);
border: 1px solid var(--zen-border-default);
white-space: nowrap;
}
@@ -175,9 +175,9 @@
.canvas {
position: relative;
overflow: hidden;
border: 1px solid var(--border-base);
border: 1px solid var(--zen-border-default);
border-radius: 8px;
background: var(--surface-sunken);
background: var(--zen-surface-sunken);
flex: 0 0 auto;
margin-inline: auto;
}
@@ -224,7 +224,7 @@
width: 100%;
height: 100%;
border: 0;
background: var(--surface-base);
background: var(--zen-surface-base);
overflow: hidden;
pointer-events: none;
}
@@ -243,7 +243,7 @@
position: absolute;
inset: 0;
z-index: 2;
background: var(--surface-sunken);
background: var(--zen-surface-sunken);
display: flex;
align-items: center;
justify-content: center;
@@ -3,9 +3,9 @@
height: 100%;
position: relative;
--journey-line-color: var(--border-strong);
--journey-active-color: var(--primary);
--journey-faded-color: var(--interactive-bg);
--journey-line-color: var(--zen-border-strong);
--journey-active-color: var(--zen-primary);
--journey-faded-color: var(--zen-interactive-bg);
}
.view {
@@ -43,8 +43,8 @@
.dropoff {
font-weight: 600;
color: var(--text-muted);
background: var(--surface-sunken);
color: var(--zen-text-muted);
background: var(--zen-surface-sunken);
padding: 4px 8px;
border-radius: 5px;
}
@@ -58,8 +58,8 @@
height: 50px;
font-size: 16px;
font-weight: 700;
color: var(--surface-base);
background: var(--surface-inverted);
color: var(--zen-surface-base);
background: var(--zen-surface-inverted);
z-index: 1;
margin: 0 auto 20px;
}
@@ -84,7 +84,7 @@
position: relative;
cursor: pointer;
padding: 10px 20px;
background: var(--interactive-bg);
background: var(--zen-interactive-bg);
border-radius: 5px;
display: flex;
align-items: center;
@@ -96,27 +96,27 @@
}
.node:hover:not(.selected) {
background: var(--interactive-bg-hover);
background: var(--zen-interactive-bg-hover);
}
.node.selected {
color: var(--surface-base);
background: var(--surface-inverted);
color: var(--zen-surface-base);
background: var(--zen-surface-inverted);
}
.node.active {
color: var(--primary-foreground);
background: var(--primary);
color: var(--zen-primary-foreground);
background: var(--zen-primary);
}
.node.selected .count {
color: var(--surface-base);
background: var(--surface-inverted);
color: var(--zen-surface-base);
background: var(--zen-surface-inverted);
}
.node.selected.active .count {
color: var(--primary-foreground);
background: var(--primary);
color: var(--zen-primary-foreground);
background: var(--zen-primary);
}
.name {
@@ -212,7 +212,7 @@
position: absolute;
border-radius: 100%;
border: 3px solid var(--journey-line-color);
background: var(--surface-base);
background: var(--zen-surface-base);
width: 14px;
height: 14px;
}
@@ -1,3 +1,3 @@
.sampleCount {
color: var(--base-color-text-secondary);
color: var(--zen-text-muted);
}
@@ -169,8 +169,8 @@ export function ReplayPlayer({ events }: { events: any[] }) {
height: showUnavailable ? playerHeight : playerOuterHeight,
overflow: 'hidden',
borderRadius: '8px',
border: '1px solid var(--base300)',
background: 'var(--base75)',
border: '1px solid var(--zen-border-default)',
background: 'var(--zen-surface-sunken)',
}}
>
<div
+11 -11
View File
@@ -1,15 +1,15 @@
:root {
--font-family: var(--font-inter), sans-serif;
--primary: oklch(62.3% 0.214 259.815);
--primary-foreground: oklch(98.5% 0 0);
--zen-font-family: var(--font-inter), sans-serif;
--zen-primary: oklch(62.3% 0.214 259.815);
--zen-primary-foreground: oklch(98.5% 0 0);
}
html,
body {
font-family: var(--font-family), sans-serif;
font-family: var(--zen-font-family), sans-serif;
font-size: 14px;
color: var(--text-primary);
background-color: var(--surface-raised);
color: var(--zen-text-primary);
background-color: var(--zen-surface-raised);
width: 100%;
min-height: 100vh;
}
@@ -29,11 +29,11 @@ textarea:is(:-webkit-autofill, :autofill):focus,
select:is(:-webkit-autofill, :autofill),
select:is(:-webkit-autofill, :autofill):hover,
select:is(:-webkit-autofill, :autofill):focus {
color: var(--text-primary) !important;
caret-color: var(--text-primary);
box-shadow: 0 0 0 1000px var(--surface-base) inset !important;
-webkit-box-shadow: 0 0 0 1000px var(--surface-base) inset !important;
-webkit-text-fill-color: var(--text-primary) !important;
color: var(--zen-text-primary) !important;
caret-color: var(--zen-text-primary);
box-shadow: 0 0 0 1000px var(--zen-surface-base) inset !important;
-webkit-box-shadow: 0 0 0 1000px var(--zen-surface-base) inset !important;
-webkit-text-fill-color: var(--zen-text-primary) !important;
transition:
background-color 5000s ease-in-out 0s,
color 5000s ease-in-out 0s;
@@ -97,7 +97,7 @@ export function LoginTwoFactorPage() {
<Text>{t(messages.twoFactorLoginDescription)}</Text>
{!!lockUntil && lockMessage && (
<Text style={{ color: 'var(--color-danger, red)' }}>{lockMessage}</Text>
<Text style={{ color: 'var(--zen-status-error)' }}>{lockMessage}</Text>
)}
<Form onSubmit={handleSubmit} error={error ?? undefined} style={{ minWidth: 300 }}>