Skip to content

πŸ“§βœ¨ Beautiful email. For everyone.

feat: migrate desktop UI to Tailwind CSS v4 (#25)

Paul Koeckd1032d0c5053
diff --git a/README.md b/README.md
index 2a6820a..c0217d5 100644
--- a/README.md
+++ b/README.md
@@ -120,6 +120,8 @@ pnpm dev:web # browser preview with sample mail, no real accounts
Add `?stress=1` to the browser preview's URL for five synthetic 50,000-message inboxes, or run `pnpm dev -- --demo` for a sample workspace in the desktop app. On NixOS, run `nix develop path:.` first. The shell provides a compatible Electron.
+The desktop UI uses Tailwind CSS v4 through the Vite plugin, with its CSS-first theme in `packages/ui/src/styles.css`. Put styling directly in React `className` props, using `cn` for conditional utilities and component variants. Keep utility names complete so Tailwind can detect them. Reserve regular CSS for global defaults, theme variables, keyframes, and editor-generated HTML; use inline styles for runtime values such as account colors and measured sizes. Colors follow the app's appearance setting, and spacing uses a fixed 4px unit to preserve the desktop's 14px typography.
+
<details>
<summary><b>Checks, packaging and releases</b></summary>
diff --git a/apps/desktop/src/renderer/src/AccountAvatarPicker.tsx b/apps/desktop/src/renderer/src/AccountAvatarPicker.tsx
index 695f61f..97cd7fa 100644
--- a/apps/desktop/src/renderer/src/AccountAvatarPicker.tsx
+++ b/apps/desktop/src/renderer/src/AccountAvatarPicker.tsx
@@ -37,7 +37,12 @@ export function AccountAvatarPicker({
render={
<button
type="button"
- className={cn('account-tile-button', dragging && 'dragging')}
+ className={cn(
+ 'account-tile-button inline-flex p-0 border-0 rounded-full bg-none bg-transparent transition-[box-shadow]',
+ 'duration-120 ease-[ease] hover:shadow-[0_0_0_1px_var(--border-strong)]',
+ 'data-popup-open:shadow-[0_0_0_1px_var(--border-strong)] [&.dragging]:shadow-[0_0_0_2px_var(--accent-solid)]',
+ dragging && 'dragging',
+ )}
aria-label={'Change avatar for ' + name}
title="Change avatar"
onDragOver={(e) => {
@@ -58,8 +63,15 @@ export function AccountAvatarPicker({
<AccountTile account={{ ...value, email }} />
</Menu.Trigger>
<Menu.Portal container={portalContainer}>
- <Menu.Positioner sideOffset={6} align="start" className="account-avatar-menu">
- <Menu.Popup className="dropdown">
+ <Menu.Positioner sideOffset={6} align="start" className="account-avatar-menu z-130">
+ <Menu.Popup
+ className={cn(
+ 'dropdown min-w-45 bg-raised border border-solid border-border-strong rounded-lg shadow-popup p-1.25 z-120',
+ 'origin-[var(--transform-origin)] transition-[opacity,transform] duration-100 ease-[ease]',
+ 'data-starting-style:opacity-0 data-starting-style:transform-[scale(0.98)] data-ending-style:opacity-0',
+ 'data-ending-style:transform-[scale(0.98)]',
+ )}
+ >
<MenuItem onClick={() => input.current?.click()}>
<ImageUpload size={15} />
{value.image ? 'Replace picture…' : 'Upload picture…'}
diff --git a/apps/desktop/src/renderer/src/AccountMark.tsx b/apps/desktop/src/renderer/src/AccountMark.tsx
index 9afa555..27f517b 100644
--- a/apps/desktop/src/renderer/src/AccountMark.tsx
+++ b/apps/desktop/src/renderer/src/AccountMark.tsx
@@ -21,7 +21,15 @@ export function AccountMark({
useEffect(() => setImageFailed(false), [account.image])
return (
<span
- className={cn('account-mark', className)}
+ className={cn(
+ 'account-mark [--mark-size:16px] [--mark-ring:rgb(255_255_255_/_0.08)] relative w-[var(--mark-size)]',
+ 'h-[var(--mark-size)] shrink-0 inline-flex rounded-full overflow-hidden light:[--mark-ring:rgb(0_0_0_/_0.08)]',
+ "after:content-[''] after:absolute after:inset-0 after:rounded-[inherit]",
+ 'after:shadow-[inset_0_0_0_1px_var(--mark-ring)] after:pointer-events-none [&>svg]:block [&>svg]:w-full',
+ '[&>svg]:h-full [&>svg]:object-cover [&>img]:block [&>img]:w-full [&>img]:h-full [&>img]:object-cover',
+ '[&.disconnected]:opacity-40',
+ className,
+ )}
title={title}
style={{ '--mark-size': size + 'px' } as CSSProperties}
>
diff --git a/apps/desktop/src/renderer/src/AccountSetup.tsx b/apps/desktop/src/renderer/src/AccountSetup.tsx
index a505085..49cb10f 100644
--- a/apps/desktop/src/renderer/src/AccountSetup.tsx
+++ b/apps/desktop/src/renderer/src/AccountSetup.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import {
useEffect,
useId,
@@ -143,7 +144,12 @@ function TextField({
}) {
const id = useId()
return (
- <label className={'form-field' + (className ? ' ' + className : '')}>
+ <label
+ className={cn(
+ "form-field mt-3.75 [&_input]:mt-1.5 [&_input]:text-[12px] [&_input[aria-invalid='true']]:border-danger/70",
+ className,
+ )}
+ >
{label}
<input
aria-invalid={error ? true : undefined}
@@ -151,12 +157,12 @@ function TextField({
{...props}
/>
{error ? (
- <span id={id} className="field-error">
+ <span id={id} className="field-error block mt-1.25 text-[11px] text-danger">
{error}
</span>
) : (
hint && (
- <span id={id} className="field-hint">
+ <span id={id} className="field-hint text-muted text-[11px] block mt-1.25">
{hint}
</span>
)
@@ -177,8 +183,17 @@ function CheckRow({
pending: boolean
}) {
return (
- <li className={'connection-check ' + (check ? (check.ok ? 'ok' : 'failed') : 'pending')}>
- <span className="connection-check-icon">
+ <li
+ className={cn(
+ 'connection-check grid grid-cols-[16px_64px_minmax(0,_auto)_minmax(0,_1fr)] gap-2.5 items-baseline py-2.5 px-3.5',
+ 'text-[12px] [&+.connection-check]:border-t [&+.connection-check]:border-solid',
+ '[&+.connection-check]:border-t-border [&_strong]:font-medium [&.ok_.connection-check-icon]:text-success',
+ '[&.ok_.connection-check-result]:text-success [&.failed_.connection-check-icon]:text-danger',
+ '[&.failed_.connection-check-result]:text-danger',
+ check ? (check.ok ? 'ok' : 'failed') : 'pending',
+ )}
+ >
+ <span className="connection-check-icon flex self-center text-muted">
{check ? (
check.ok ? (
<Check size={13} />
@@ -190,8 +205,10 @@ function CheckRow({
) : null}
</span>
<strong>{label}</strong>
- <span className="connection-check-host">{host}</span>
- <span className="connection-check-result">
+ <span className="connection-check-host text-muted overflow-hidden text-ellipsis whitespace-nowrap">
+ {host}
+ </span>
+ <span className="connection-check-result text-muted leading-[1.5]">
{check
? check.ok
? 'Signed in'
@@ -207,22 +224,36 @@ function CheckRow({
/** The server settings of a discovered or saved configuration, shown before any password is sent. */
function ServerSummary({ fields }: { fields: Fields }) {
return fields.protocol === 'jmap' ? (
- <dl className="server-summary">
+ <dl
+ className={cn(
+ 'server-summary [&>div]:grid [&>div]:grid-cols-[118px_minmax(0,_1fr)] [&>div]:gap-3 [&>div]:py-2 [&>div]:px-0',
+ '[&>div+div]:border-t [&>div+div]:border-solid [&>div+div]:border-t-border [&_dt]:text-muted [&_dd]:flex',
+ '[&_dd]:flex-wrap [&_dd]:gap-[4px_14px] [&_dd]:m-0 [&_dd]:min-w-0 [&_dd]:text-foreground',
+ '[&_dd]:[overflow-wrap:anywhere] m-0 text-[12px]',
+ )}
+ >
<div>
<dt>Server Β· JMAP</dt>
<dd>
- <span className="server-host">{fields.serverUrl}</span>
+ <span className="server-host font-medium text-strong">{fields.serverUrl}</span>
</dd>
</div>
</dl>
) : (
- <dl className="server-summary">
+ <dl
+ className={cn(
+ 'server-summary [&>div]:grid [&>div]:grid-cols-[118px_minmax(0,_1fr)] [&>div]:gap-3 [&>div]:py-2 [&>div]:px-0',
+ '[&>div+div]:border-t [&>div+div]:border-solid [&>div+div]:border-t-border [&_dt]:text-muted [&_dd]:flex',
+ '[&_dd]:flex-wrap [&_dd]:gap-[4px_14px] [&_dd]:m-0 [&_dd]:min-w-0 [&_dd]:text-foreground',
+ '[&_dd]:[overflow-wrap:anywhere] m-0 text-[12px]',
+ )}
+ >
{(['incoming', 'outgoing'] as const).map((kind) => (
<div key={kind}>
<dt>{kind === 'incoming' ? 'Incoming Β· IMAP' : 'Outgoing Β· SMTP'}</dt>
<dd>
- <span className="server-host">{fields[kind].host}</span>
- <span className="server-meta">
+ <span className="server-host font-medium text-strong">{fields[kind].host}</span>
+ <span className="server-meta text-secondary tabular-nums">
Port {fields[kind].port} Β· {securityLabel[fields[kind].security]}
</span>
</dd>
@@ -569,13 +600,20 @@ export function AccountSetup({
const failed = test && (!test.incoming.ok || (test.outgoing && !test.outgoing.ok))
return (
- <form className="account-form" ref={form} onSubmit={(e) => void submit(e)} noValidate>
- <Button variant="ghost" size="small" className="account-form-back" onClick={onBack}>
+ <form className="account-form max-w-140" ref={form} onSubmit={(e) => void submit(e)} noValidate>
+ <Button
+ variant="ghost"
+ size="small"
+ className="account-form-back -ml-2.5 text-muted"
+ onClick={onBack}
+ >
<ArrowLeft size={13} />
Back to accounts
</Button>
- <header className="account-form-title">
- <h3>{phase === 'folders' ? 'Check folders' : title}</h3>
+ <header className="account-form-title [&_p]:text-muted [&_p]:text-[12px] [&_p]:leading-[1.6] [&_p]:mt-1.5 [&_p]:mb-0 [&_p]:mx-0 mt-4.5 mb-2 mx-0">
+ <h3 className="m-0 text-[20px] font-[550] tracking-[-0.5px]">
+ {phase === 'folders' ? 'Check folders' : title}
+ </h3>
{phase === 'email' ? (
<p>
Enter your email address and Inlark looks up your server settings. You’ll see them
@@ -588,12 +626,12 @@ export function AccountSetup({
conversations. You can change this later.
</p>
) : (
- <p className="account-form-address">
+ <p className="account-form-address [&>span]:text-secondary [&>span]:[overflow-wrap:anywhere] [&_.text-action]:text-[12px] flex items-baseline gap-2.5">
<span>{email}</span>
{mode === 'add' && (
<button
type="button"
- className="text-action"
+ className="border-0 bg-none bg-transparent text-primary text-[11px] p-0 text-left hover:underline"
onClick={() => {
setPhase('email')
setError('')
@@ -606,14 +644,20 @@ export function AccountSetup({
)}
</header>
{accountProblem && phase === 'server' && (
- <div className="form-error account-form-problem">
+ <div className="form-error flex gap-2 text-[11px] leading-[1.6] my-3.75 text-danger [&_svg]:shrink-0 [&_svg]:mt-[3px] account-form-problem mt-3.5 mb-0 mx-0">
<AlertCircle size={14} />
<span>{accountProblem}</span>
</div>
)}
{phase === 'email' && (
- <section className="account-form-section">
+ <section
+ className={cn(
+ 'account-form-section pt-5.5 pb-1 px-0 [&+.account-form-section]:border-t [&+.account-form-section]:border-solid',
+ '[&+.account-form-section]:border-t-border [&+.account-form-section]:mt-4.5 [&_h4]:text-[11px]',
+ '[&_h4]:font-medium [&_h4]:mt-0 [&_h4]:mb-[2px] [&_h4]:mx-0 [&_h4]:text-secondary [&>.checkbox-label]:mt-4.5',
+ )}
+ >
<TextField
label="Email address"
type="email"
@@ -628,7 +672,10 @@ export function AccountSetup({
setEmailError('')
}}
/>
- <div className="setup-lookup" role="status">
+ <div
+ className="setup-lookup flex items-center gap-2 min-h-4.5 mt-3 text-[12px] text-muted"
+ role="status"
+ >
{discovering && (
<>
<Spinner size={12} />
@@ -641,14 +688,23 @@ export function AccountSetup({
{phase === 'server' &&
(loadingSaved ? (
- <div className="setup-lookup" role="status">
+ <div
+ className="setup-lookup flex items-center gap-2 min-h-4.5 mt-3 text-[12px] text-muted"
+ role="status"
+ >
<Spinner size={12} />
Loading saved settings…
</div>
) : (
<>
- <section className="account-form-section">
- <div className="account-form-section-heading">
+ <section
+ className={cn(
+ 'account-form-section pt-5.5 pb-1 px-0 [&+.account-form-section]:border-t [&+.account-form-section]:border-solid',
+ '[&+.account-form-section]:border-t-border [&+.account-form-section]:mt-4.5 [&_h4]:text-[11px]',
+ '[&_h4]:font-medium [&_h4]:mt-0 [&_h4]:mb-[2px] [&_h4]:mx-0 [&_h4]:text-secondary [&>.checkbox-label]:mt-4.5',
+ )}
+ >
+ <div className="account-form-section-heading [&_h4]:m-0 [&_.button]:-mr-2 [&_.button]:text-muted flex items-center justify-between gap-3 min-h-6.5">
<h4>Server</h4>
{editing ? (
(candidates.length > 0 || savedSettings) &&
@@ -679,24 +735,32 @@ export function AccountSetup({
)}
</div>
{notice && (
- <div className="form-notice setup-notice" role="status">
+ <div
+ className="form-notice flex gap-2 text-[11px] leading-[1.6] my-3.75 text-muted [&_svg]:shrink-0 [&_svg]:mt-[3px] setup-notice mt-2.5 mb-1 mx-0"
+ role="status"
+ >
<AlertCircle size={14} />
<span>{notice}</span>
</div>
)}
{!editing && candidates.length > 1 && (
<div
- className="server-options"
+ className="server-options grid gap-1.5 mt-3 mb-2.5 mx-0"
role="radiogroup"
aria-label="Server settings found"
>
{candidates.map((candidate, index) => (
<label
key={index}
- className={
- 'server-option' +
- (origin.kind === 'candidate' && origin.index === index ? ' chosen' : '')
- }
+ className={cn(
+ 'server-option flex items-center gap-2.5 min-w-0 py-2.25 px-3 border border-solid border-border-strong',
+ 'rounded-lg text-[12px] text-secondary cursor-pointer transition-[border-color,background] duration-120',
+ 'ease-[ease] hover:bg-hover [&.chosen]:border-primary-solid/60 [&.chosen]:bg-primary-tint [&.chosen]:text-strong',
+ '[&.chosen_.theme-radio]:shadow-[inset_0_0_0_4px_var(--accent-solid)] [&:has(input:focus-visible)]:outline-2',
+ '[&:has(input:focus-visible)]:outline-solid [&:has(input:focus-visible)]:outline-primary',
+ '[&:has(input:focus-visible)]:outline-offset-[2px]',
+ origin.kind === 'candidate' && origin.index === index && 'chosen',
+ )}
>
<input
type="radio"
@@ -705,22 +769,41 @@ export function AccountSetup({
checked={origin.kind === 'candidate' && origin.index === index}
onChange={() => choose(index)}
/>
- <span className="theme-radio" aria-hidden="true" />
- <span className="protocol-tag">{candidate.protocol.toUpperCase()}</span>
- <span className="server-option-title">{candidateTitle(candidate)}</span>
- <span className="server-option-source">{sourceLabel(candidate)}</span>
+ <span
+ className="theme-radio w-3.5 h-3.5 shrink-0 rounded-full shadow-[inset_0_0_0_1px_var(--faint)] transition-[box-shadow] duration-120 ease-[ease]"
+ aria-hidden="true"
+ />
+ <span
+ className={cn(
+ 'protocol-tag inline-flex items-center h-4.5 py-0 px-1.5 border border-solid border-border-strong rounded-xs',
+ 'text-[10px] font-medium tracking-[0.3px] text-muted whitespace-nowrap shrink-0',
+ )}
+ >
+ {candidate.protocol.toUpperCase()}
+ </span>
+ <span className="server-option-title min-w-0 overflow-hidden text-ellipsis whitespace-nowrap">
+ {candidateTitle(candidate)}
+ </span>
+ <span className="server-option-source ml-auto shrink-0 text-[11px] text-muted max-[700px]:hidden">
+ {sourceLabel(candidate)}
+ </span>
</label>
))}
</div>
)}
{!editing && (
- <div className="server-card">
+ <div className="server-card mt-3 pt-3 pb-1 px-3.5 border border-solid border-border-strong rounded-lg bg-field">
{candidates.length < 2 && (
- <div className="server-card-heading">
- <span className="protocol-tag">
+ <div className="server-card-heading flex items-center gap-2.5 mb-1">
+ <span
+ className={cn(
+ 'protocol-tag inline-flex items-center h-4.5 py-0 px-1.5 border border-solid border-border-strong rounded-xs',
+ 'text-[10px] font-medium tracking-[0.3px] text-muted whitespace-nowrap shrink-0',
+ )}
+ >
{fields.protocol === 'jmap' ? 'JMAP' : 'IMAP Β· SMTP'}
</span>
- <span className="server-card-source">
+ <span className="server-card-source text-[11px] text-muted">
{selected
? sourceLabel(selected)
: origin.kind === 'saved'
@@ -733,9 +816,11 @@ export function AccountSetup({
</div>
)}
{editing && (
- <div className="server-fields">
- <div className="form-field">
- <span className="form-label">Protocol</span>
+ <div className="server-fields [&_.form-field]:mt-3.5">
+ <div className="form-field mt-3.75 [&_input]:mt-1.5 [&_input]:text-[12px] [&_input[aria-invalid='true']]:border-danger/70">
+ <span className="form-label block mb-1.5 text-[12px] text-secondary">
+ Protocol
+ </span>
<SegmentedControl
label="Protocol"
value={fields.protocol}
@@ -757,11 +842,19 @@ export function AccountSetup({
/>
) : (
(['incoming', 'outgoing'] as const).map((kind) => (
- <fieldset className="server-group" key={kind}>
+ <fieldset
+ className="server-group [&_legend]:p-0 [&_legend]:text-[11px] [&_legend]:font-medium [&_legend]:text-secondary mt-4.5 mb-0 mx-0 p-0 border-0 min-w-0"
+ key={kind}
+ >
<legend>
{kind === 'incoming' ? 'Incoming mail Β· IMAP' : 'Outgoing mail Β· SMTP'}
</legend>
- <div className="server-row">
+ <div
+ className={cn(
+ 'server-row grid grid-cols-[minmax(0,_1fr)_76px_auto] gap-[0_12px] items-start [&_.form-field]:mt-2',
+ 'max-[700px]:grid-cols-[minmax(0,_1fr)_76px] max-[700px]:[&>:last-child]:col-span-full',
+ )}
+ >
<TextField
label="Server"
autoFocus={kind === 'incoming' && mode !== 'edit'}
@@ -786,8 +879,10 @@ export function AccountSetup({
)
}
/>
- <div className="form-field">
- <span className="form-label">Security</span>
+ <div className="form-field mt-3.75 [&_input]:mt-1.5 [&_input]:text-[12px] [&_input[aria-invalid='true']]:border-danger/70">
+ <span className="form-label block mb-1.5 text-[12px] text-secondary">
+ Security
+ </span>
<SegmentedControl
label={
(kind === 'incoming' ? 'Incoming' : 'Outgoing') + ' server security'
@@ -808,9 +903,15 @@ export function AccountSetup({
)}
</section>
- <section className="account-form-section">
+ <section
+ className={cn(
+ 'account-form-section pt-5.5 pb-1 px-0 [&+.account-form-section]:border-t [&+.account-form-section]:border-solid',
+ '[&+.account-form-section]:border-t-border [&+.account-form-section]:mt-4.5 [&_h4]:text-[11px]',
+ '[&_h4]:font-medium [&_h4]:mt-0 [&_h4]:mb-[2px] [&_h4]:mx-0 [&_h4]:text-secondary [&>.checkbox-label]:mt-4.5',
+ )}
+ >
<h4>Sign in</h4>
- <div className="form-row">
+ <div className="form-row grid grid-cols-[1fr_1fr] gap-[0_14px] items-start">
<TextField
label="Username"
autoComplete="username"
@@ -847,7 +948,7 @@ export function AccountSetup({
</div>
{fields.protocol === 'imap' && (
<>
- <label className="checkbox-label">
+ <label className="checkbox-label flex items-center gap-2.25 text-[12px]">
<Checkbox
checked={fields.sameLogin}
onCheckedChange={(sameLogin) =>
@@ -857,7 +958,7 @@ export function AccountSetup({
Outgoing server uses the same login
</label>
{!fields.sameLogin && (
- <div className="form-row">
+ <div className="form-row grid grid-cols-[1fr_1fr] gap-[0_14px] items-start">
<TextField
label="Outgoing username"
autoComplete="off"
@@ -885,7 +986,7 @@ export function AccountSetup({
)}
</>
)}
- <label className="checkbox-label">
+ <label className="checkbox-label flex items-center gap-2.25 text-[12px]">
<Checkbox
checked={remember}
disabled={isDemo}
@@ -896,7 +997,7 @@ export function AccountSetup({
: 'Remember this login on this device'}
</label>
{!bootstrap.secureStorage && (
- <div className="form-notice">
+ <div className="form-notice flex gap-2 text-[11px] leading-[1.6] my-3.75 mx-0 text-muted [&_svg]:shrink-0 [&_svg]:mt-[3px]">
<LockKeyhole size={14} />
<span>
{isDemo
@@ -908,9 +1009,15 @@ export function AccountSetup({
</section>
{mode === 'add' && (
- <section className="account-form-section">
+ <section
+ className={cn(
+ 'account-form-section pt-5.5 pb-1 px-0 [&+.account-form-section]:border-t [&+.account-form-section]:border-solid',
+ '[&+.account-form-section]:border-t-border [&+.account-form-section]:mt-4.5 [&_h4]:text-[11px]',
+ '[&_h4]:font-medium [&_h4]:mt-0 [&_h4]:mb-[2px] [&_h4]:mx-0 [&_h4]:text-secondary [&>.checkbox-label]:mt-4.5',
+ )}
+ >
<h4>How it appears</h4>
- <div className="form-row">
+ <div className="form-row grid grid-cols-[1fr_1fr] gap-[0_14px] items-start">
<TextField
label="Label"
placeholder="Personal"
@@ -929,7 +1036,7 @@ export function AccountSetup({
hint={
<>
Recipients see{' '}
- <span className="sender-preview">
+ <span className="sender-preview [overflow-wrap:anywhere] text-secondary">
{(senderName.trim() || 'your server’s name') + ' <' + email + '>'}
</span>
</>
@@ -940,9 +1047,16 @@ export function AccountSetup({
)}
{fields.protocol === 'imap' && (busy === 'testing' || test) && (
- <section className="account-form-section" aria-live="polite">
+ <section
+ className={cn(
+ 'account-form-section pt-5.5 pb-1 px-0 [&+.account-form-section]:border-t [&+.account-form-section]:border-solid',
+ '[&+.account-form-section]:border-t-border [&+.account-form-section]:mt-4.5 [&_h4]:text-[11px]',
+ '[&_h4]:font-medium [&_h4]:mt-0 [&_h4]:mb-[2px] [&_h4]:mx-0 [&_h4]:text-secondary [&>.checkbox-label]:mt-4.5',
+ )}
+ aria-live="polite"
+ >
<h4>Connection check</h4>
- <ul className="connection-checks">
+ <ul className="connection-checks list-none mt-2.5 mb-0 mx-0 p-0 border border-solid border-border-strong rounded-lg">
<CheckRow
label="Incoming"
host={fields.incoming.host}
@@ -957,7 +1071,7 @@ export function AccountSetup({
/>
</ul>
{failed && (
- <p className="connection-check-hint">
+ <p className="connection-check-hint mt-2.5 mb-0 mx-0 text-[11px] text-muted">
Nothing was saved. Check the password or the server settings above, then try
again.
</p>
@@ -968,7 +1082,13 @@ export function AccountSetup({
))}
{phase === 'folders' && review && (
- <section className="account-form-section">
+ <section
+ className={cn(
+ 'account-form-section pt-5.5 pb-1 px-0 [&+.account-form-section]:border-t [&+.account-form-section]:border-solid',
+ '[&+.account-form-section]:border-t-border [&+.account-form-section]:mt-4.5 [&_h4]:text-[11px]',
+ '[&_h4]:font-medium [&_h4]:mt-0 [&_h4]:mb-[2px] [&_h4]:mx-0 [&_h4]:text-secondary [&>.checkbox-label]:mt-4.5',
+ )}
+ >
<FolderMappingEditor
review={review}
value={choices}
@@ -979,14 +1099,21 @@ export function AccountSetup({
)}
{error && (
- <div role="alert" className="form-error">
+ <div
+ role="alert"
+ className="form-error flex gap-2 text-[11px] leading-[1.6] my-3.75 mx-0 text-danger [&_svg]:shrink-0 [&_svg]:mt-[3px]"
+ >
<AlertCircle size={14} />
<span>{error}</span>
</div>
)}
- <footer className="account-form-footer">
+ <footer className="account-form-footer flex justify-end gap-2 mt-5.5 pt-4.5 border-t border-solid border-t-border">
{phase === 'email' && (
- <Button variant="ghost" className="account-form-manual" onClick={setUpManually}>
+ <Button
+ variant="ghost"
+ className="account-form-manual mr-auto -ml-2.5 text-muted"
+ onClick={setUpManually}
+ >
Set up manually
</Button>
)}
diff --git a/apps/desktop/src/renderer/src/App.tsx b/apps/desktop/src/renderer/src/App.tsx
index 758e9e6..1e9f23f 100644
--- a/apps/desktop/src/renderer/src/App.tsx
+++ b/apps/desktop/src/renderer/src/App.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { useEffect, useMemo, useRef, useState, lazy, Suspense } from 'react'
import { useInfiniteQuery, useQueries, useQuery } from '@tanstack/react-query'
import { useNavigate, useSearch } from '@tanstack/react-router'
@@ -1450,7 +1451,15 @@ export function App() {
}
}
return (
- <div className={'app-shell ' + (collapsed ? 'sidebar-collapsed ' : '') + 'density-' + density}>
+ <div
+ className={cn(
+ 'app-shell flex h-full min-w-0 py-2 pr-2 pl-0 bg-sidebar [--row-height:64px] [--rail:224px]',
+ '[&.sidebar-collapsed]:[--rail:64px] [&.density-compact]:[--row-height:44px]',
+ 'max-[1100px]:[&:not(.sidebar-collapsed)]:[--rail:204px] max-[700px]:[&:not(.sidebar-collapsed)]:[--rail:188px]',
+ collapsed && 'sidebar-collapsed',
+ 'density-' + density,
+ )}
+ >
<Sidebar
accounts={accounts}
boxesByAccount={mailboxCounts.boxesByAccount}
@@ -1474,7 +1483,7 @@ export function App() {
setFolderDialog({ operation, accountId, folder })
}
/>
- <main className="main-content">
+ <main className="main-content @container/mail shadow-[0_2px_8px_#0000000a] relative flex-1 min-w-0 flex flex-col bg-background border border-solid border-border-strong rounded-xl overflow-hidden">
<UpdateNotice status={updateStatus} />
{!boot.data ? (
<EmptyState
@@ -1549,42 +1558,79 @@ export function App() {
)
) : (
<>
- <div className="list-heading">
- <div className="list-title">
- <div className="list-eyebrow">
+ <div
+ className={cn(
+ 'list-heading flex items-center justify-between pt-5.25 pb-4.75 px-7 shrink-0 gap-4 [&_h1]:m-0 [&_h1]:flex',
+ '[&_h1]:items-center [&_h1]:gap-2.5 [&_h1]:text-[22px] [&_h1]:tracking-[-0.65px] [&_h1]:leading-[1.3]',
+ '[&_h1]:font-semibold [&_h1>span]:text-[12px] [&_h1>span]:tracking-[0] [&_h1>span]:font-medium',
+ '[&_h1>span]:text-muted [&_h1>span]:bg-surface [&_h1>span]:border [&_h1>span]:border-solid',
+ '[&_h1>span]:border-border [&_h1>span]:py-[2px] [&_h1>span]:px-1.75 [&_h1>span]:rounded-md',
+ '[&_h1>span]:tabular-nums [&_p]:text-muted [&_p]:text-[12px] [&_p]:mt-1.75 [&_p]:mb-0 [&_p]:mx-0',
+ '@max-[900px]/mail:pl-5.5 @max-[900px]/mail:pr-5.5 @max-[680px]/mail:pt-5 @max-[680px]/mail:pb-4.25',
+ '@max-[680px]/mail:px-5 @max-[440px]/mail:[&_h1]:text-[21px]',
+ )}
+ >
+ <div className="list-title min-w-0">
+ <div className="list-eyebrow [&_svg]:text-faint flex items-center gap-1.75 text-[11px] text-muted mb-1.5">
Mail <ChevronRight size={10} />
<Dropdown
trigger={
- <button className="account-switcher" aria-label="Switch account">
+ <button
+ className={cn(
+ 'account-switcher inline-flex items-center gap-1.5 py-[2px] px-1.25 my-[-2px] -mx-1.25 border-0 rounded-xs',
+ 'bg-none bg-transparent text-[inherit] min-w-0 [&>span:not(.account-mark)]:overflow-hidden',
+ '[&>span:not(.account-mark)]:text-ellipsis [&>span:not(.account-mark)]:whitespace-nowrap hover:text-foreground',
+ 'hover:bg-hover data-popup-open:text-foreground data-popup-open:bg-hover',
+ )}
+ aria-label="Switch account"
+ >
{account && <AccountMark account={account} size={16} />}
<span>{account?.name || 'All accounts'}</span>
<ChevronDown size={11} />
</button>
}
>
- <div className="account-menu">
- <div className="menu-label">Mail accounts</div>
+ <div className="account-menu [&_.menu-item]:min-h-12 [&_.menu-item]:gap-3 w-62.5 max-w-[calc(100vw_-_40px)] max-h-[min(420px,_65vh)] overflow-y-auto">
+ <div className="menu-label py-1.75 px-2.5 text-[11px] text-muted">
+ Mail accounts
+ </div>
<MenuItem onClick={() => go({ view, q: route.q })}>
<Inbox size={15} />
- <span className="account-menu-label">
+ <span
+ className={cn(
+ 'account-menu-label [&_strong]:block [&_strong]:overflow-hidden [&_strong]:text-ellipsis',
+ '[&_strong]:whitespace-nowrap [&_small]:block [&_small]:overflow-hidden [&_small]:text-ellipsis',
+ '[&_small]:whitespace-nowrap [&_strong]:font-medium [&_small]:text-muted [&_small]:text-[10px]',
+ '[&_small]:mt-[2px] flex-1 min-w-0',
+ )}
+ >
<strong>All accounts</strong>
<small>Unified inbox</small>
</span>
- {!account && <Check size={14} className="account-menu-check" />}
+ {!account && (
+ <Check size={14} className="account-menu-check text-primary" />
+ )}
</MenuItem>
- <div className="account-menu-divider" />
+ <div className="account-menu-divider h-[1px] m-1.25 bg-border" />
{accounts.map((item) => (
<MenuItem
key={item.id}
onClick={() => go({ view, q: route.q, account: item.id })}
>
<AccountMark account={item} size={28} />
- <span className="account-menu-label">
+ <span
+ className={cn(
+ 'account-menu-label [&_strong]:block [&_strong]:overflow-hidden [&_strong]:text-ellipsis',
+ '[&_strong]:whitespace-nowrap [&_small]:block [&_small]:overflow-hidden [&_small]:text-ellipsis',
+ '[&_small]:whitespace-nowrap [&_strong]:font-medium [&_small]:text-muted [&_small]:text-[10px]',
+ '[&_small]:mt-[2px] flex-1 min-w-0',
+ )}
+ >
<strong>{item.name}</strong>
<small>{item.email}</small>
</span>
{item.id === account?.id && (
- <Check size={14} className="account-menu-check" />
+ <Check size={14} className="account-menu-check text-primary" />
)}
</MenuItem>
))}
@@ -1607,7 +1653,7 @@ export function App() {
</h1>
{route.q && <p>Results for β€œ{route.q}”</p>}
</div>
- <div className="list-heading-actions">
+ <div className="list-heading-actions flex items-center gap-1.25 @max-[680px]/mail:gap-[2px]">
<IconButton
label="Refresh mail"
shortcut={keys('refresh')}
@@ -1615,7 +1661,9 @@ export function App() {
>
<RefreshCw
size={15}
- className={mail.isFetching && !mail.isFetchingNextPage ? 'spin' : ''}
+ className={cn(
+ mail.isFetching && !mail.isFetchingNextPage && 'spin animate-spin',
+ )}
/>
</IconButton>
<IconButton label="Search mail" shortcut={keys('search')} onClick={focusSearch}>
@@ -1629,15 +1677,17 @@ export function App() {
</IconButton>
}
>
- <div className="menu-label">Message density</div>
+ <div className="menu-label py-1.75 px-2.5 text-[11px] text-muted">
+ Message density
+ </div>
<MenuItem onClick={() => setDensity('comfortable')}>
- <span className="menu-check">
+ <span className="menu-check w-3.75 inline-flex text-primary">
{density === 'comfortable' && <Check size={14} />}
</span>
Comfortable
</MenuItem>
<MenuItem onClick={() => setDensity('compact')}>
- <span className="menu-check">
+ <span className="menu-check w-3.75 inline-flex text-primary">
{density === 'compact' && <Check size={14} />}
</span>
Compact
@@ -1648,7 +1698,13 @@ export function App() {
</div>
{searchOpen && (
<form
- className="mail-search"
+ className={cn(
+ 'mail-search mt-0 mb-4 mx-7 flex items-center gap-2.5 border border-solid border-border-strong bg-surface',
+ 'py-[3px] pr-2 pl-3.25 rounded-[7px] text-muted [&_input]:border-0 [&_input]:bg-none [&_input]:bg-transparent',
+ '[&_input]:py-1.75 [&_input]:px-0 [&_input]:text-[13px] focus-within:border-primary-solid',
+ 'focus-within:shadow-[0_0_0_3px_var(--accent-tint)] [&_input:focus-visible]:outline-none @max-[680px]/mail:ml-5',
+ '@max-[680px]/mail:mr-5',
+ )}
onSubmit={(e) => {
e.preventDefault()
go({ q: search || undefined, ...(search ? { view: 'all' } : {}) }, false)
@@ -1676,11 +1732,18 @@ export function App() {
</form>
)}
{!!filterChips.length && (
- <div className="active-filters" aria-label="Active filters">
+ <div
+ className="active-filters flex flex-wrap items-center gap-1.5 pt-0 pb-3.5 px-7 @max-[680px]/mail:pl-5 @max-[680px]/mail:pr-5"
+ aria-label="Active filters"
+ >
{filterChips.map(([key, value]) => (
<button
key={key}
- className="filter-chip"
+ className={cn(
+ 'filter-chip [&_span]:overflow-hidden [&_span]:text-ellipsis [&_span]:whitespace-nowrap inline-flex items-center',
+ 'gap-2 max-w-65 py-1 px-2 text-[11px] text-primary border border-solid border-primary/25 bg-primary-tint',
+ 'rounded-sm',
+ )}
aria-label={'Remove ' + (filterLabels[key] || key) + ' filter'}
onClick={() => setFilters((current) => ({ ...current, [key]: undefined }))}
>
@@ -1692,13 +1755,22 @@ export function App() {
<X size={12} />
</button>
))}
- <button className="clear-filters" onClick={() => setFilters({})}>
+ <button
+ className="clear-filters border-0 bg-none bg-transparent text-muted text-[11px] py-1 px-2 hover:text-foreground"
+ onClick={() => setFilters({})}
+ >
Clear all
</button>
</div>
)}
{view !== 'drafts' && (
- <div className="list-toolbar">
+ <div
+ className={cn(
+ 'list-toolbar flex items-center gap-4 h-11.5 py-0 px-7 border-b border-solid border-b-border shrink-0',
+ '@max-[900px]/mail:pl-5.5 @max-[900px]/mail:pr-5.5 @max-[680px]/mail:py-0 @max-[680px]/mail:px-5',
+ '@max-[680px]/mail:gap-3.5',
+ )}
+ >
<Checkbox
aria-label={selected.size ? 'Deselect all' : 'Select loaded conversations'}
checked={
@@ -1716,17 +1788,25 @@ export function App() {
setAllMatching(false)
}}
/>
- <div className="list-tabs">
+ <div
+ className={cn(
+ 'list-tabs flex gap-5 h-full [&_button]:bg-none [&_button]:bg-transparent [&_button]:border-0',
+ '[&_button]:border-b-2 [&_button]:border-solid [&_button]:border-b-transparent [&_button]:py-0',
+ '[&_button]:px-[1px] [&_button]:text-[12px] [&_button]:text-muted [&_button:hover]:text-foreground',
+ '[&_button.active]:text-foreground [&_button.active]:border-b-primary [&_button.active]:font-medium',
+ '@max-[440px]/mail:gap-4',
+ )}
+ >
<button
aria-pressed={!filters.unread}
- className={!filters.unread ? 'active' : ''}
+ className={cn(!filters.unread && 'active')}
onClick={() => setFilters((f) => ({ ...f, unread: undefined }))}
>
All messages
</button>
<button
aria-pressed={!!filters.unread}
- className={filters.unread ? 'active' : ''}
+ className={cn(filters.unread && 'active')}
title={
'Show only unread conversations' +
(keys('toggleUnread') ? ' Β· ' + keys('toggleUnread') : '')
@@ -1736,7 +1816,7 @@ export function App() {
Unread
</button>
</div>
- <div className="list-toolbar-actions">
+ <div className="list-toolbar-actions flex items-center gap-4.5 ml-auto [&>.button]:font-normal @max-[680px]/mail:gap-2.5">
<Button
variant="ghost"
size="small"
@@ -1744,20 +1824,36 @@ export function App() {
onClick={() => setFilterOpen(true)}
>
<SlidersHorizontal size={13} />
- Filter{hasFilters && <span className="filter-dot" />}
+ Filter
+ {hasFilters && (
+ <span className="filter-dot bg-primary w-1.25 h-1.25 rounded-full" />
+ )}
</Button>
</div>
</div>
)}
{!!selected.size && view !== 'drafts' && (
- <div className="selection-bar" role="region" aria-label="Selection actions">
- <div className="selection-summary">
- <span className="selection-count" role="status">
+ <div
+ className={cn(
+ 'selection-bar absolute z-10 bottom-12.5 left-[50%] transform-[translateX(-50%)] flex items-center gap-1.25',
+ 'py-2.5 px-3 max-w-[calc(100%_-_24px)] whitespace-nowrap border border-solid border-border-strong rounded-xl',
+ 'bg-raised shadow-[0_8px_28px_#0003,_0_2px_5px_#0002] animate-[selection-appear_140ms_ease-out]',
+ '@max-[440px]/mail:gap-[2px] @max-[440px]/mail:p-2 @max-[440px]/mail:[&_.toolbar-divider]:my-0',
+ '@max-[440px]/mail:[&_.toolbar-divider]:mx-[2px]',
+ )}
+ role="region"
+ aria-label="Selection actions"
+ >
+ <div className="selection-summary flex flex-col gap-[2px] min-w-20.5 py-0 px-1.5 @max-[440px]/mail:min-w-18.5 @max-[440px]/mail:py-0 @max-[440px]/mail:px-1">
+ <span
+ className="selection-count text-[12px] text-foreground font-medium tabular-nums"
+ role="status"
+ >
{selectedCount.toLocaleString()} selected
</span>
{!allMatching && total > selected.size && (
<button
- className="text-action"
+ className="border-0 bg-none bg-transparent text-primary text-[11px] p-0 text-left hover:underline"
disabled={busy}
onClick={() => setAllMatching(true)}
>
@@ -1765,7 +1861,7 @@ export function App() {
</button>
)}
</div>
- <span className="toolbar-divider" />
+ <span className="toolbar-divider w-[1px] h-4.25 bg-border-strong my-0 mx-1" />
{offersAction(listView, 'archive') && (
<HintIconButton
label="Archive selected"
@@ -1811,12 +1907,12 @@ export function App() {
<MenuItem onClick={() => void act('unread')}>
<Mail size={14} />
Mark as unread
- <ShortcutHint id="unread" className="menu-shortcut" />
+ <ShortcutHint id="unread" className="menu-shortcut ml-auto" />
</MenuItem>
<MenuItem onClick={() => void act(selectionStarred ? 'unstar' : 'star')}>
<Star size={14} />
{selectionStarred ? 'Remove star' : 'Star'}
- <ShortcutHint id="star" className="menu-shortcut" />
+ <ShortcutHint id="star" className="menu-shortcut ml-auto" />
</MenuItem>
<MenuItem
onClick={() => openMove(targets())}
@@ -1824,13 +1920,13 @@ export function App() {
>
<FolderInput size={14} />
Move to folder
- <ShortcutHint id="move" className="menu-shortcut" />
+ <ShortcutHint id="move" className="menu-shortcut ml-auto" />
</MenuItem>
{offersAction(listView, 'spam') && (
<MenuItem onClick={() => void act('spam')} disabled={!!unavailable('spam')}>
<ShieldX size={14} />
Mark as spam
- <ShortcutHint id="spam" className="menu-shortcut" />
+ <ShortcutHint id="spam" className="menu-shortcut ml-auto" />
</MenuItem>
)}
{offersAction(listView, 'notSpam') && (
@@ -1840,7 +1936,7 @@ export function App() {
>
<ShieldCheck size={14} />
Not spam
- <ShortcutHint id="notSpam" className="menu-shortcut" />
+ <ShortcutHint id="notSpam" className="menu-shortcut ml-auto" />
</MenuItem>
)}
{offersAction(listView, 'restore') && (
@@ -1850,7 +1946,7 @@ export function App() {
>
<Inbox size={14} />
Restore to inbox
- <ShortcutHint id="restore" className="menu-shortcut" />
+ <ShortcutHint id="restore" className="menu-shortcut ml-auto" />
</MenuItem>
)}
{offersAction(listView, 'destroy') && (
@@ -1871,12 +1967,15 @@ export function App() {
]
.filter(Boolean)
.map((reason) => (
- <p className="menu-note" key={String(reason)}>
+ <p
+ className="menu-note max-w-60 mt-1 mb-0 mx-0 pt-1.75 pb-1.25 px-2.5 border-t border-solid border-t-border text-[11px] leading-[1.5] text-muted"
+ key={String(reason)}
+ >
{reason}
</p>
))}
</Dropdown>
- <span className="toolbar-divider" />
+ <span className="toolbar-divider w-[1px] h-4.25 bg-border-strong my-0 mx-1" />
<IconButton
label="Clear selection"
shortcut={keys('back')}
@@ -1903,7 +2002,12 @@ export function App() {
/>
)}
{(mail.isError || mail.data?.pages.some((p) => p.failedAccounts.length)) && (
- <div className="connection-banner">
+ <div
+ className={cn(
+ 'connection-banner [&_button]:ml-auto [&_button]:border-0 [&_button]:bg-none [&_button]:bg-transparent',
+ '[&_button]:text-primary py-2.25 px-7.5 text-[11px] flex items-center gap-2.25 text-secondary bg-primary-tint',
+ )}
+ >
<WifiOff size={13} />
{mail.isError
? friendlyError(mail.error)
@@ -1912,7 +2016,13 @@ export function App() {
</div>
)}
{!!incomplete.length && view !== 'drafts' && (
- <div className="indexing-notice" role="status">
+ <div
+ className={cn(
+ 'indexing-notice flex flex-wrap items-center justify-between gap-[4px_14px] py-2 px-7 border-b border-solid',
+ 'border-b-border text-[11px] text-muted @max-[680px]/mail:pl-5 @max-[680px]/mail:pr-5',
+ )}
+ role="status"
+ >
<span>
Still indexing {incomplete.map((a) => a.name).join(' and ')} β€” older mail may be
missing
@@ -1923,7 +2033,7 @@ export function App() {
</div>
)}
{view === 'drafts' ? (
- <div className="draft-list">
+ <div className="draft-list flex-1 overflow-auto">
<SubmissionList
submissions={pendingSends.filter(
(s) => !route.account || s.accountId === route.account,
@@ -1933,7 +2043,9 @@ export function App() {
notify={notify}
/>
{!!pendingSends.length && !!draftItems.length && (
- <h2 className="draft-section-label">Drafts</h2>
+ <h2 className="draft-section-label m-0 pt-4.5 pb-1.5 px-8 text-[11px] font-medium text-muted @max-[680px]/mail:pl-5 @max-[680px]/mail:pr-5">
+ Drafts
+ </h2>
)}
<DraftRows
items={draftItems}
@@ -1944,7 +2056,7 @@ export function App() {
onDelete={discardDrafts}
/>
{mail.hasNextPage && (
- <div className="load-more">
+ <div className="load-more flex items-center justify-center gap-2 text-[12px] text-muted p-3.75">
<Button
disabled={mail.isFetchingNextPage}
onClick={() => void mail.fetchNextPage()}
@@ -1964,23 +2076,96 @@ export function App() {
)}
</div>
) : !conversations.length && mail.isLoading ? (
- <div className="mail-list list-skeleton" aria-busy="true" aria-label="Loading mail">
+ <div
+ className={cn(
+ 'mail-list flex-1 overflow-auto min-h-0 outline-none [overflow-anchor:none] [scrollbar-gutter:stable] pb-4',
+ 'focus-visible:shadow-[inset_0_0_0_1px_var(--border-strong)] focus-visible:rounded-none [&:has(.selected)]:pb-22',
+ '[&:has(.selected)_.row-selector_.checkbox]:opacity-100 [&:has(.selected)_.unread-dot]:opacity-0 list-skeleton',
+ '[&_.skeleton-row:nth-child(n+6)]:opacity-60 [&_.skeleton-row:nth-child(n+8)]:opacity-30',
+ )}
+ aria-busy="true"
+ aria-label="Loading mail"
+ >
{Array.from({ length: 9 }, (_, i) => (
- <div className="mail-row skeleton-row" key={i}>
- <span className="row-selector" />
- <span className="skeleton-avatar" />
- <span className="skeleton-line" style={{ width: 120 + ((i * 37) % 50) }} />
- <span className="row-content">
+ <div
+ className={cn(
+ 'mail-row flex items-center h-[var(--row-height)] py-0 pr-5 pl-7 gap-4 border-b border-solid border-b-border',
+ 'text-[13px] relative [&.unread]:bg-[color-mix(in_srgb,_var(--surface)_32%,_var(--bg))]',
+ '[&.focused]:shadow-[inset_2px_0_var(--accent)] [&.focused]:bg-selected [&.selected]:bg-selected',
+ '[&:hover_.row-selector_.checkbox]:opacity-100 [&.selected_.row-selector_.checkbox]:opacity-100',
+ '[&:hover_.unread-dot]:opacity-0 [&.selected_.unread-dot]:opacity-0 [&:hover_.row-star]:opacity-100',
+ '[&:focus-within_.row-star]:opacity-100 [&:hover_.row-quick-actions]:opacity-100',
+ '[&:hover_.row-quick-actions]:pointer-events-auto [&:focus-within_.row-quick-actions]:opacity-100',
+ '[&:focus-within_.row-quick-actions]:pointer-events-auto @max-[900px]/mail:gap-3 @max-[900px]/mail:pl-5.5',
+ '@max-[900px]/mail:pr-3.5 @max-[680px]/mail:py-0 @max-[680px]/mail:pr-4 @max-[680px]/mail:pl-5',
+ '@max-[680px]/mail:gap-3 @max-[680px]/mail:[.density-comfortable_&]:grid',
+ '@max-[680px]/mail:[.density-comfortable_&]:grid-cols-[16px_minmax(0,_1fr)_auto]',
+ '@max-[680px]/mail:[.density-comfortable_&]:grid-rows-[22px_20px]',
+ '@max-[680px]/mail:[.density-comfortable_&]:gap-[2px_12px]',
+ '@max-[680px]/mail:[.density-comfortable_&]:content-center skeleton-row cursor-default pointer-events-none',
+ 'hover:bg-none hover:bg-transparent [&>.skeleton-line:first-of-type]:shrink-0',
+ '[&>.skeleton-line:first-of-type]:w-30 [&_.row-content]:gap-2.25',
+ '[.density-compact_&_.skeleton-line.faint]:hidden',
+ )}
+ key={i}
+ >
+ <span
+ className={cn(
+ 'row-selector relative w-4 shrink-0 h-6 flex items-center justify-center [&_.checkbox]:absolute',
+ '[&_.checkbox]:opacity-0 [&:focus-within_.checkbox]:opacity-100 [&:focus-within_.unread-dot]:opacity-0',
+ '@max-[680px]/mail:[.density-comfortable_&]:col-start-1 @max-[680px]/mail:[.density-comfortable_&]:row-start-1',
+ '@max-[680px]/mail:[.density-comfortable_&]:row-end-3',
+ )}
+ />
+ <span
+ className={cn(
+ 'skeleton-avatar block',
+ 'bg-[linear-gradient(_90deg,_var(--skeleton)_0%,_color-mix(in_srgb,_var(--skeleton)_45%,_transparent)_50%,_var(--skeleton)_100%_)]',
+ '[background-size:200%_100%] animate-[shimmer_1.4s_ease-in-out_infinite] w-7 h-7 rounded-[7px] shrink-0 -mr-1.5',
+ )}
+ />
+ <span
+ className={cn(
+ 'skeleton-line block h-2.5 rounded-sm',
+ 'bg-[linear-gradient(_90deg,_var(--skeleton)_0%,_color-mix(in_srgb,_var(--skeleton)_45%,_transparent)_50%,_var(--skeleton)_100%_)]',
+ '[background-size:200%_100%] animate-[shimmer_1.4s_ease-in-out_infinite] [&.faint]:opacity-55',
+ )}
+ style={{ width: 120 + ((i * 37) % 50) }}
+ />
+ <span
+ className={cn(
+ 'row-content flex-1 min-w-0 flex flex-col gap-[3px] overflow-hidden whitespace-nowrap',
+ '[.density-compact_&]:flex-row [.density-compact_&]:gap-3 [.density-compact_&]:items-baseline',
+ '@max-[680px]/mail:[.density-comfortable_&]:col-start-2 @max-[680px]/mail:[.density-comfortable_&]:col-end-4',
+ '@max-[680px]/mail:[.density-comfortable_&]:row-start-2 @max-[680px]/mail:[.density-comfortable_&]:flex-row',
+ '@max-[680px]/mail:[.density-comfortable_&]:gap-2.5 @max-[680px]/mail:[.density-comfortable_&]:items-baseline',
+ )}
+ >
<span
- className="skeleton-line"
+ className={cn(
+ 'skeleton-line block h-2.5 rounded-sm',
+ 'bg-[linear-gradient(_90deg,_var(--skeleton)_0%,_color-mix(in_srgb,_var(--skeleton)_45%,_transparent)_50%,_var(--skeleton)_100%_)]',
+ '[background-size:200%_100%] animate-[shimmer_1.4s_ease-in-out_infinite] [&.faint]:opacity-55',
+ )}
style={{ width: 40 + ((i * 23) % 35) + '%' }}
/>
<span
- className="skeleton-line faint"
+ className={cn(
+ 'skeleton-line block h-2.5 rounded-sm',
+ 'bg-[linear-gradient(_90deg,_var(--skeleton)_0%,_color-mix(in_srgb,_var(--skeleton)_45%,_transparent)_50%,_var(--skeleton)_100%_)]',
+ '[background-size:200%_100%] animate-[shimmer_1.4s_ease-in-out_infinite] [&.faint]:opacity-55 faint',
+ )}
style={{ width: 55 + ((i * 17) % 30) + '%' }}
/>
</span>
- <span className="skeleton-line" style={{ width: 44 }} />
+ <span
+ className={cn(
+ 'skeleton-line block h-2.5 rounded-sm',
+ 'bg-[linear-gradient(_90deg,_var(--skeleton)_0%,_color-mix(in_srgb,_var(--skeleton)_45%,_transparent)_50%,_var(--skeleton)_100%_)]',
+ '[background-size:200%_100%] animate-[shimmer_1.4s_ease-in-out_infinite] [&.faint]:opacity-55',
+ )}
+ style={{ width: 44 }}
+ />
</div>
))}
</div>
@@ -2001,7 +2186,7 @@ export function App() {
<Button onClick={() => setFilters({})}>Clear filters</Button>
)}
{view === 'inbox' && !route.q && !hasFilters && keys('compose') && (
- <span className="empty-hint">
+ <span className="empty-hint inline-flex items-center gap-2 text-[12px] text-faint">
<ShortcutHint id="compose" /> Write a message
</span>
)}
@@ -2036,7 +2221,14 @@ export function App() {
}
/>
)}
- <footer className="list-footer">
+ <footer
+ className={cn(
+ 'list-footer flex items-center justify-between border-t border-solid border-t-border min-h-8.25 py-0 px-6',
+ 'text-muted text-[10px] gap-4 [&>span]:flex [&>span]:items-center [&>span]:gap-1.5 [&_kbd]:h-4.25',
+ '[&_kbd]:min-w-4.25 [&_kbd]:py-0 [&_kbd]:px-[3px] [&_kbd]:text-[9px] @max-[900px]/mail:py-0',
+ '@max-[900px]/mail:px-5',
+ )}
+ >
<span role="status">
{busy ? (
<>
@@ -2046,10 +2238,11 @@ export function App() {
) : (
<>
<span
- className={
- 'connection-dot ' +
- (accounts.some((a) => a.status !== 'connected') ? 'connection-pending' : '')
- }
+ className={cn(
+ 'connection-dot w-1.25 h-1.25 rounded-full bg-success inline-block shrink-0',
+ accounts.some((a) => a.status !== 'connected') &&
+ 'connection-pending bg-danger',
+ )}
/>
{accounts.every((a) => a.status === 'connected')
? 'All accounts connected'
@@ -2061,7 +2254,11 @@ export function App() {
)}
</span>
<button
- className="footer-shortcuts"
+ className={cn(
+ 'footer-shortcuts flex items-center gap-1.5 bg-none bg-transparent border-0 text-muted text-[10px] py-1 px-0',
+ 'hover:text-foreground [&>span:not(.shortcut-keys)]:mr-2.25 @max-[900px]/mail:[&_span]:hidden',
+ '@max-[440px]/mail:[&>.shortcut-keys:not(.footer-help-keys)]:hidden',
+ )}
onClick={() => setHelp(true)}
aria-label="Show keyboard shortcuts"
>
@@ -2079,7 +2276,21 @@ export function App() {
</main>
{toast && (
<div
- className={'toast' + (toast.tone === 'error' ? ' toast-error' : '')}
+ className={cn(
+ 'toast fixed bottom-5.75 left-[calc(50%+var(--rail)_/_2_-_4px)] transform-[translateX(-50%)] z-150 flex gap-3.25',
+ 'items-center max-w-[75vw] bg-raised border border-solid border-border-strong shadow-popup py-2.75 px-3.75',
+ 'rounded-lg text-[12px] [&>svg]:text-primary [&>span]:max-w-150 [&_button]:border-0 [&_button]:bg-none',
+ '[&_button]:bg-transparent [&_button]:text-primary [&_button]:text-[11px] [&_button]:p-[3px]',
+ '[&_button:last-child]:text-muted max-[700px]:max-w-[calc(100vw_-_var(--rail)_-_32px)]',
+ 'max-[700px]:w-[max-content] overflow-hidden animate-[toast-in_180ms_cubic-bezier(0.2,_0.9,_0.3,_1.2)]',
+ '[&_.toast-undo]:inline-flex [&_.toast-undo]:items-center [&_.toast-undo]:gap-1.5 [&_.toast-undo]:py-[3px]',
+ '[&_.toast-undo]:pr-1 [&_.toast-undo]:pl-2 [&_.toast-undo]:rounded-sm [&_.toast-undo]:font-medium',
+ '[&_.toast-undo:hover]:bg-primary-tint [&_.toast-dismiss]:grid [&_.toast-dismiss]:place-items-center',
+ '[&_.toast-dismiss]:rounded-sm [&_.toast-dismiss]:text-muted [&_.toast-dismiss:hover]:text-foreground',
+ '[&_.toast-dismiss:hover]:bg-hover',
+ toast.tone === 'error' &&
+ 'toast-error [&>svg:first-child]:text-danger [&_.toast-timer]:bg-danger/45',
+ )}
role={toast.tone === 'error' ? 'alert' : 'status'}
onMouseEnter={() => setToastHeld(true)}
onMouseLeave={() => setToastHeld(false)}
@@ -2094,7 +2305,10 @@ export function App() {
)}
<span>{toast.text}</span>
{canUndo && (
- <button className="toast-undo" onClick={() => void undo()}>
+ <button
+ className="toast-undo [&_kbd]:h-4 [&_kbd]:min-w-4 [&_kbd]:text-[9px] [&_kbd]:text-primary [&_kbd]:border-primary/35"
+ onClick={() => void undo()}
+ >
Undo <ShortcutHint id="undo" />
</button>
)}
@@ -2107,7 +2321,7 @@ export function App() {
</button>
{!toastHeld && (
<span
- className="toast-timer"
+ className="toast-timer absolute left-0 bottom-0 h-[2px] w-full bg-primary/45 origin-left animate-[toast-timer_linear_forwards]"
style={{ animationDuration: toastDuration + 'ms' }}
aria-hidden="true"
/>
@@ -2116,7 +2330,22 @@ export function App() {
)}
<Suspense
fallback={
- <div className="toast" role="status">
+ <div
+ className={cn(
+ 'toast fixed bottom-5.75 left-[calc(50%+var(--rail)_/_2_-_4px)] transform-[translateX(-50%)] z-150 flex gap-3.25',
+ 'items-center max-w-[75vw] bg-raised border border-solid border-border-strong shadow-popup py-2.75 px-3.75',
+ 'rounded-lg text-[12px] [&>svg]:text-primary [&>span]:max-w-150 [&_button]:border-0 [&_button]:bg-none',
+ '[&_button]:bg-transparent [&_button]:text-primary [&_button]:text-[11px] [&_button]:p-[3px]',
+ '[&_button:last-child]:text-muted max-[700px]:max-w-[calc(100vw_-_var(--rail)_-_32px)]',
+ 'max-[700px]:w-[max-content] overflow-hidden animate-[toast-in_180ms_cubic-bezier(0.2,_0.9,_0.3,_1.2)]',
+ '[&_.toast-undo]:inline-flex [&_.toast-undo]:items-center [&_.toast-undo]:gap-1.5 [&_.toast-undo]:py-[3px]',
+ '[&_.toast-undo]:pr-1 [&_.toast-undo]:pl-2 [&_.toast-undo]:rounded-sm [&_.toast-undo]:font-medium',
+ '[&_.toast-undo:hover]:bg-primary-tint [&_.toast-dismiss]:grid [&_.toast-dismiss]:place-items-center',
+ '[&_.toast-dismiss]:rounded-sm [&_.toast-dismiss]:text-muted [&_.toast-dismiss:hover]:text-foreground',
+ '[&_.toast-dismiss:hover]:bg-hover',
+ )}
+ role="status"
+ >
<Spinner />
Opening…
</div>
diff --git a/apps/desktop/src/renderer/src/AppDialogs.tsx b/apps/desktop/src/renderer/src/AppDialogs.tsx
index 7bf5bb0..676984a 100644
--- a/apps/desktop/src/renderer/src/AppDialogs.tsx
+++ b/apps/desktop/src/renderer/src/AppDialogs.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { Fragment, useState } from 'react'
import { Button, DatePicker, Modal, Switch } from '@inlark/ui'
import type { MailAction, Mailbox, MailQuery } from '@inlark/core'
@@ -12,7 +13,12 @@ export function ShortcutDialog({ open, onClose }: { open: boolean; onClose: () =
}}
title="Keyboard shortcuts"
description="Click any keys to change them, or + to add another. Letter shortcuts are paused while you type in a field."
- className="shortcut-modal"
+ className={cn(
+ 'shortcut-modal [&_.shortcut-toolbar]:sticky [&_.shortcut-toolbar]:-top-5.75 [&_.shortcut-toolbar]:z-2',
+ '[&_.shortcut-toolbar]:-mt-2.5 [&_.shortcut-toolbar]:-mb-1.5 [&_.shortcut-toolbar]:mx-0',
+ '[&_.shortcut-toolbar]:py-2.5 [&_.shortcut-toolbar]:px-0 [&_.shortcut-toolbar]:bg-surface',
+ 'w-[min(760px,_calc(100vw_-_40px))]',
+ )}
>
<ShortcutEditor />
</Modal>
@@ -41,7 +47,7 @@ export function FilterDialog({
}}
title="Filter conversations"
description="Searches your whole mailbox on the server, not just what’s loaded."
- className="filter-modal"
+ className="filter-modal w-[min(520px,_calc(100vw_-_40px))]"
>
<form
onSubmit={(event) => {
@@ -49,7 +55,7 @@ export function FilterDialog({
onApply(values)
}}
>
- <div className="filter-fields">
+ <div className="filter-fields [&_input]:mt-1.5 [&_input]:text-[12px] grid grid-cols-[1fr_1fr] gap-[16px_12px]">
{(['from', 'to'] as const).map((key) => (
<label key={key}>
{{ from: 'From', to: 'To' }[key]}
@@ -62,7 +68,7 @@ export function FilterDialog({
/>
</label>
))}
- <label className="filter-wide">
+ <label className="filter-wide col-span-full">
Subject
<input
value={values.subject || ''}
@@ -72,12 +78,14 @@ export function FilterDialog({
}
/>
</label>
- <div className="filter-field filter-wide">
+ <div className="filter-field [&_.filter-date-range]:mt-1.5 [&_.filter-date-range]:text-[12px] [&>span]:block [&>span]:text-[12px] [&>span]:text-secondary filter-wide col-span-full">
<span>Date</span>
- <div className="filter-date-range">
+ <div className="filter-date-range grid grid-cols-[1fr_auto_1fr] items-center gap-2">
{(['after', 'before'] as const).map((key, index) => (
<Fragment key={key}>
- {index > 0 && <span className="filter-date-separator">to</span>}
+ {index > 0 && (
+ <span className="filter-date-separator text-[12px] text-faint">to</span>
+ )}
<DatePicker
aria-label={{ after: 'After', before: 'Before' }[key]}
placeholder={{ after: 'Start date', before: 'End date' }[key]}
@@ -93,7 +101,13 @@ export function FilterDialog({
))}
</div>
</div>
- <div className="filter-switch filter-wide">
+ <div
+ className={cn(
+ 'filter-switch flex items-center justify-between gap-4 pt-4 border-t border-solid border-t-border',
+ '[&_strong]:block [&_strong]:text-[12px] [&_strong]:font-normal [&_strong]:text-foreground [&_small]:block',
+ '[&_small]:mt-[2px] [&_small]:text-[11px] [&_small]:text-muted filter-wide col-span-full',
+ )}
+ >
<span>
<strong>Has attachments</strong>
<small>Only show conversations with files attached.</small>
@@ -107,7 +121,13 @@ export function FilterDialog({
/>
</div>
</div>
- <div className="modal-actions filter-actions">
+ <div
+ className={cn(
+ 'modal-actions flex gap-2 [&>.modal-action-start]:mr-auto [&>.modal-action-start]:-ml-2.5',
+ '[&>.modal-action-start]:text-muted [&>.modal-action-start:hover:not(:disabled)]:text-danger filter-actions',
+ 'justify-between mt-5.5 [&>.button-ghost]:-ml-2.5 [&>.button-ghost]:text-muted',
+ )}
+ >
<Button
variant="ghost"
disabled={!filterKeys.some((key) => values[key])}
@@ -174,12 +194,17 @@ export function FolderDialog({
}}
>
{operation !== 'delete' && (
- <label className="modal-field">
+ <label className="modal-field [&_input]:mt-1.5">
Folder name
<input autoFocus value={name} onChange={(event) => setName(event.target.value)} />
</label>
)}
- <div className="modal-actions">
+ <div
+ className={cn(
+ 'modal-actions flex justify-end gap-2 mt-6 [&>.modal-action-start]:mr-auto [&>.modal-action-start]:-ml-2.5',
+ '[&>.modal-action-start]:text-muted [&>.modal-action-start:hover:not(:disabled)]:text-danger',
+ )}
+ >
<Button onClick={onClose}>Cancel</Button>
<Button
type="submit"
@@ -259,7 +284,12 @@ export function ConfirmActionDialog({
title={copy ? copy.title : ''}
description={copy?.description}
>
- <div className="modal-actions">
+ <div
+ className={cn(
+ 'modal-actions flex justify-end gap-2 mt-6 [&>.modal-action-start]:mr-auto [&>.modal-action-start]:-ml-2.5',
+ '[&>.modal-action-start]:text-muted [&>.modal-action-start:hover:not(:disabled)]:text-danger',
+ )}
+ >
<Button onClick={onClose}>Cancel</Button>
<Button
variant={shown.action === 'destroy' ? 'danger' : 'primary'}
diff --git a/apps/desktop/src/renderer/src/CommandPalette.tsx b/apps/desktop/src/renderer/src/CommandPalette.tsx
index 3777ea5..3533523 100644
--- a/apps/desktop/src/renderer/src/CommandPalette.tsx
+++ b/apps/desktop/src/renderer/src/CommandPalette.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { Fragment, useEffect, useId, useRef, useState } from 'react'
import { ArrowDown, ArrowUp, Check, CornerDownLeft, Inbox, Search } from '@inlark/ui/icons'
import { Modal } from '@inlark/ui'
@@ -110,9 +111,21 @@ export function CommandPalette({
if (!open) onClose()
}}
title="Search & commands"
- className="command-modal"
+ className={cn(
+ 'command-modal p-0 w-152.5 [&>.modal-heading]:absolute [&>.modal-heading]:w-[1px] [&>.modal-heading]:h-[1px]',
+ '[&>.modal-heading]:overflow-hidden [&>.modal-heading]:[clip-path:inset(50%)] [&>.modal-heading_.button]:hidden',
+ 'top-[min(16vh,_140px)] transform-[translate(-50%,_0)]',
+ 'data-starting-style:transform-[translate(-50%,_-6px)_scale(0.985)]',
+ 'data-ending-style:transform-[translate(-50%,_-6px)_scale(0.985)]',
+ )}
>
- <div className="command-input">
+ <div
+ className={cn(
+ 'command-input flex gap-3.25 items-center py-4.5 px-5.25 border-b border-solid border-b-border-strong text-muted',
+ '[&_input]:border-0 [&_input]:py-[3px] [&_input]:px-0 [&_input]:bg-none [&_input]:bg-transparent',
+ '[&_input]:text-[14px] [&_input:focus-visible]:outline-none focus-within:border-b-primary-solid',
+ )}
+ >
<Search size={18} />
<input
autoFocus
@@ -147,12 +160,25 @@ export function CommandPalette({
}
}}
/>
- <button className="command-dismiss" onClick={onClose} aria-label="Close search">
+ <button
+ className="command-dismiss border-0 bg-none bg-transparent p-0"
+ onClick={onClose}
+ aria-label="Close search"
+ >
<kbd>Esc</kbd>
</button>
</div>
<div
- className="command-results"
+ className={cn(
+ 'command-results p-2.25 max-h-[min(430px,_calc(100vh_-_260px))] overflow-auto [&_button]:w-full [&_button]:flex',
+ '[&_button]:items-center [&_button]:bg-none [&_button]:bg-transparent [&_button]:border-0 [&_button]:rounded-md',
+ '[&_button]:text-secondary [&_button]:text-left [&_button.active]:bg-hover [&_button.active]:text-foreground',
+ '[&_button:hover]:bg-hover [&_button:hover]:text-foreground [&_button.active_svg]:text-primary',
+ '[&_button]:text-[13px] pt-1 pb-2 px-2 [&_button]:gap-2.75 [&_button]:py-1.75 [&_button]:px-2.5',
+ '[&_button.active_.command-icon]:text-strong [&_button.active_.command-icon]:border-foreground/22',
+ '[&_button.unavailable_.command-text>:first-child]:opacity-55 [&_button.unavailable_.command-icon]:opacity-55',
+ '[&_button.unavailable_.command-keys]:opacity-55',
+ )}
id={listId}
role="listbox"
aria-label="Commands and mail search"
@@ -161,12 +187,18 @@ export function CommandPalette({
{options.map((c, i) => (
<Fragment key={c.id}>
{(query ? i === 0 && c.id !== 'search' : options[i - 1]?.group !== c.group) && (
- <div className="command-label" role="presentation">
+ <div
+ className="command-label text-[11px] text-muted pt-3 pb-1.25 px-3"
+ role="presentation"
+ >
{query ? 'Best matches' : c.group}
</div>
)}
{query && c.id === 'search' && i > 0 && (
- <div className="command-label" role="presentation">
+ <div
+ className="command-label text-[11px] text-muted pt-3 pb-1.25 px-3"
+ role="presentation"
+ >
Mail
</div>
)}
@@ -176,22 +208,34 @@ export function CommandPalette({
aria-selected={activeIndex === i}
aria-disabled={c.disabled || undefined}
tabIndex={-1}
- className={(activeIndex === i ? 'active' : '') + (c.disabled ? ' unavailable' : '')}
+ className={cn(activeIndex === i && 'active', c.disabled && 'unavailable')}
onMouseMove={() => activeIndex !== i && setIndex(i)}
onMouseDown={(event) => event.preventDefault()}
onClick={() => run(i)}
>
- <span className="command-icon">
+ <span
+ className={cn(
+ 'command-icon grid place-items-center border border-solid border-border-strong rounded-md bg-surface w-6.5 h-6.5',
+ 'text-muted [&:has(>_.account-mark)]:border-0 [&:has(>_.account-mark)]:bg-none',
+ '[&:has(>_.account-mark)]:bg-transparent',
+ )}
+ >
{c.account ? <AccountMark account={c.account} size={26} /> : <c.icon size={15} />}
</span>
- <span className="command-text">
+ <span className="command-text flex-1 overflow-hidden text-ellipsis whitespace-nowrap min-w-0">
{c.label}
- {c.description && <small className="command-description">{c.description}</small>}
+ {c.description && (
+ <small className="command-description block mt-[2px] text-[11px] text-muted whitespace-normal">
+ {c.description}
+ </small>
+ )}
</span>
- {query && c.id !== 'search' && <span className="command-group">{c.group}</span>}
- {c.checked && <Check size={14} className="command-check" />}
+ {query && c.id !== 'search' && (
+ <span className="command-group text-[11px] text-faint">{c.group}</span>
+ )}
+ {c.checked && <Check size={14} className="command-check text-primary" />}
{c.key && (
- <span className="command-keys">
+ <span className="command-keys flex gap-[3px]">
{c.key.split(' ').map((k) => (
<kbd key={k}>{k}</kbd>
))}
@@ -200,9 +244,13 @@ export function CommandPalette({
</button>
</Fragment>
))}
- {!options.length && <div className="command-empty">No commands</div>}
+ {!options.length && (
+ <div className="command-empty py-5.5 px-3 text-center text-[12px] text-muted">
+ No commands
+ </div>
+ )}
</div>
- <div className="command-footer">
+ <div className="command-footer border-t border-solid border-t-border py-3 px-5.25 flex gap-2 items-center text-[11px] text-muted">
<kbd>
<ArrowUp size={11} />
</kbd>
@@ -210,13 +258,13 @@ export function CommandPalette({
<ArrowDown size={11} />
</kbd>{' '}
Navigate
- <span className="command-enter">
+ <span className="command-enter flex items-center gap-1.75 ml-3">
<kbd>
<CornerDownLeft size={11} />
</kbd>{' '}
Run
</span>
- <Wordmark className="command-footer-brand" height={12} />
+ <Wordmark className="command-footer-brand ml-auto text-faint" height={12} />
</div>
</Modal>
)
diff --git a/apps/desktop/src/renderer/src/Composer.tsx b/apps/desktop/src/renderer/src/Composer.tsx
index 94639d2..812b9af 100644
--- a/apps/desktop/src/renderer/src/Composer.tsx
+++ b/apps/desktop/src/renderer/src/Composer.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { useEffect, useRef, useState } from 'react'
import { useQuery } from '@tanstack/react-query'
import { useForm } from '@tanstack/react-form'
@@ -176,7 +177,12 @@ export function Composer({
.replace(/\n/g, '<br/>') +
'</p>',
editorProps: {
- attributes: { class: 'compose-editor', 'aria-label': 'Message body', spellcheck: 'true' },
+ attributes: {
+ class:
+ "compose-editor [&[contenteditable='false']_.compose-signature-remove]:hidden min-h-45 outline-none text-[15px] leading-[1.8] text-foreground",
+ 'aria-label': 'Message body',
+ spellcheck: 'true',
+ },
},
onUpdate: ({ editor }) => update({ html: editor.getHTML(), text: editor.getText() }),
})
@@ -426,9 +432,17 @@ export function Composer({
}}
>
<Dialog.Portal>
- <Dialog.Backdrop className="compose-backdrop" />
+ <Dialog.Backdrop className="compose-backdrop fixed inset-0 bg-[#0004] z-70 transition-[opacity] duration-160 ease-[ease] data-starting-style:opacity-0 data-ending-style:opacity-0" />
<Dialog.Popup
- className={'composer ' + (expanded ? 'composer-expanded' : '')}
+ className={cn(
+ 'composer fixed right-6 bottom-6 w-[min(660px,_calc(100vw_-_48px))] h-[min(700px,_calc(100vh_-_48px))]',
+ 'bg-surface border border-solid border-border-strong rounded-2xl shadow-popup z-71 flex flex-col overflow-hidden',
+ 'transition-[opacity,transform] duration-160 ease-[ease] data-starting-style:opacity-0',
+ 'data-starting-style:transform-[translateY(10px)_scale(0.99)] data-ending-style:opacity-0',
+ 'data-ending-style:transform-[translateY(10px)_scale(0.99)]',
+ expanded &&
+ 'composer-expanded top-[50%] left-[50%] right-auto bottom-auto transform-[translate(-50%,_-50%)] h-[85vh] w-[min(900px,_90vw)] rounded-[11px] data-starting-style:transform-[translate(-50%,_-48%)_scale(0.99)] data-ending-style:transform-[translate(-50%,_-48%)_scale(0.99)]',
+ )}
initialFocus={() =>
initial.to.length && initial.subject && !locked
? document.querySelector<HTMLElement>('.compose-editor')
@@ -436,9 +450,15 @@ export function Composer({
}
>
<Dialog.Title className="sr-only">Compose email</Dialog.Title>
- <div className="compose-heading">
+ <div
+ className={cn(
+ 'compose-heading [&>span]:text-[12px] [&>span]:font-medium [&>div]:flex [&>div]:items-center [&>div]:gap-1.25',
+ 'flex items-center justify-between h-12 py-0 pr-4.25 pl-6 bg-raised border-b border-solid border-b-border',
+ 'shrink-0',
+ )}
+ >
<span>
- <span className="compose-dot" />{' '}
+ <span className="compose-dot w-1.25 h-1.25 rounded-full inline-block bg-primary mr-1.5" />{' '}
{initial.replyThreadId
? 'Reply'
: /^fwd:/i.test(initial.subject)
@@ -446,7 +466,10 @@ export function Composer({
: 'New message'}
</span>
<div>
- <span className="draft-state" role="status">
+ <span
+ className="draft-state flex items-center gap-1.25 text-muted text-[11px] mr-3"
+ role="status"
+ >
{sending || state === 'Saving…' ? (
<Spinner size={11} />
) : state.startsWith('Sav') || state === 'All changes saved' ? (
@@ -482,8 +505,25 @@ export function Composer({
</Dialog.Close>
</div>
</div>
- <div className="compose-addresses">
- <div className="compose-field">
+ <div className="compose-addresses py-1.25 px-6 shrink-0">
+ <div
+ className={cn(
+ 'compose-field flex items-center min-h-10.5 border-b border-solid border-b-border gap-2.75 [&>label]:w-10.75',
+ '[&>label]:shrink-0 [&>label]:text-[11px] [&>label]:text-muted [&>span]:w-10.75 [&>span]:shrink-0',
+ '[&>span]:text-[11px] [&>span]:text-muted [&_input]:flex-1 [&_input]:border-0 [&_input]:py-1.75 [&_input]:px-0',
+ '[&_input]:bg-none [&_input]:bg-transparent [&_input]:text-[12px] [&_input]:min-w-0 [&>.select-trigger]:flex-1',
+ '[&>.select-trigger]:h-8 [&>.select-trigger]:py-0 [&>.select-trigger]:pr-1 [&>.select-trigger]:pl-0',
+ '[&>.select-trigger]:border-0 [&>.select-trigger]:bg-none [&>.select-trigger]:bg-transparent',
+ '[&>.select-trigger]:text-foreground [&>.select-trigger]:text-[12px] [&>.select-trigger]:whitespace-normal',
+ '[&>.select-trigger:hover:not([data-disabled])]:bg-none',
+ '[&>.select-trigger:hover:not([data-disabled])]:bg-transparent [&>button]:text-[11px] [&>button]:bg-none',
+ '[&>button]:bg-transparent [&>button]:border-0 [&>button]:text-muted [&>button]:whitespace-nowrap',
+ '[&_.subject-input]:font-medium [&_input:focus-visible]:outline-none',
+ '[&>.select-trigger:focus-visible]:outline-none focus-within:border-b-primary-solid',
+ '[&>.compose-cc-toggle]:self-start [&>.compose-cc-toggle]:mt-2.25 [&>.compose-cc-toggle]:py-0',
+ '[&>.compose-cc-toggle]:px-[2px] [&>.compose-cc-toggle:hover]:text-foreground',
+ )}
+ >
<label htmlFor="compose-from">From</label>
<Select
id="compose-from"
@@ -506,7 +546,24 @@ export function Composer({
/>
</div>
{(identities.data?.length || 0) > 1 && (
- <div className="compose-field">
+ <div
+ className={cn(
+ 'compose-field flex items-center min-h-10.5 border-b border-solid border-b-border gap-2.75 [&>label]:w-10.75',
+ '[&>label]:shrink-0 [&>label]:text-[11px] [&>label]:text-muted [&>span]:w-10.75 [&>span]:shrink-0',
+ '[&>span]:text-[11px] [&>span]:text-muted [&_input]:flex-1 [&_input]:border-0 [&_input]:py-1.75 [&_input]:px-0',
+ '[&_input]:bg-none [&_input]:bg-transparent [&_input]:text-[12px] [&_input]:min-w-0 [&>.select-trigger]:flex-1',
+ '[&>.select-trigger]:h-8 [&>.select-trigger]:py-0 [&>.select-trigger]:pr-1 [&>.select-trigger]:pl-0',
+ '[&>.select-trigger]:border-0 [&>.select-trigger]:bg-none [&>.select-trigger]:bg-transparent',
+ '[&>.select-trigger]:text-foreground [&>.select-trigger]:text-[12px] [&>.select-trigger]:whitespace-normal',
+ '[&>.select-trigger:hover:not([data-disabled])]:bg-none',
+ '[&>.select-trigger:hover:not([data-disabled])]:bg-transparent [&>button]:text-[11px] [&>button]:bg-none',
+ '[&>button]:bg-transparent [&>button]:border-0 [&>button]:text-muted [&>button]:whitespace-nowrap',
+ '[&_.subject-input]:font-medium [&_input:focus-visible]:outline-none',
+ '[&>.select-trigger:focus-visible]:outline-none focus-within:border-b-primary-solid',
+ '[&>.compose-cc-toggle]:self-start [&>.compose-cc-toggle]:mt-2.25 [&>.compose-cc-toggle]:py-0',
+ '[&>.compose-cc-toggle]:px-[2px] [&>.compose-cc-toggle:hover]:text-foreground',
+ )}
+ >
<label htmlFor="compose-identity">Identity</label>
<Select
disabled={locked}
@@ -529,7 +586,24 @@ export function Composer({
)}
<form.Field name="subject">
{(field) => (
- <div className="compose-field compose-subject">
+ <div
+ className={cn(
+ 'compose-field flex items-center min-h-10.5 border-b border-solid border-b-border gap-2.75 [&>label]:w-10.75',
+ '[&>label]:shrink-0 [&>label]:text-[11px] [&>label]:text-muted [&>span]:w-10.75 [&>span]:shrink-0',
+ '[&>span]:text-[11px] [&>span]:text-muted [&_input]:flex-1 [&_input]:border-0 [&_input]:py-1.75 [&_input]:px-0',
+ '[&_input]:bg-none [&_input]:bg-transparent [&_input]:text-[12px] [&_input]:min-w-0 [&>.select-trigger]:flex-1',
+ '[&>.select-trigger]:h-8 [&>.select-trigger]:py-0 [&>.select-trigger]:pr-1 [&>.select-trigger]:pl-0',
+ '[&>.select-trigger]:border-0 [&>.select-trigger]:bg-none [&>.select-trigger]:bg-transparent',
+ '[&>.select-trigger]:text-foreground [&>.select-trigger]:text-[12px] [&>.select-trigger]:whitespace-normal',
+ '[&>.select-trigger:hover:not([data-disabled])]:bg-none',
+ '[&>.select-trigger:hover:not([data-disabled])]:bg-transparent [&>button]:text-[11px] [&>button]:bg-none',
+ '[&>button]:bg-transparent [&>button]:border-0 [&>button]:text-muted [&>button]:whitespace-nowrap',
+ '[&_.subject-input]:font-medium [&_input:focus-visible]:outline-none',
+ '[&>.select-trigger:focus-visible]:outline-none focus-within:border-b-primary-solid',
+ '[&>.compose-cc-toggle]:self-start [&>.compose-cc-toggle]:mt-2.25 [&>.compose-cc-toggle]:py-0',
+ '[&>.compose-cc-toggle]:px-[2px] [&>.compose-cc-toggle:hover]:text-foreground compose-subject',
+ )}
+ >
<label htmlFor="compose-subject">Subject</label>
<input
disabled={locked}
@@ -545,12 +619,19 @@ export function Composer({
)}
</form.Field>
</div>
- <div className="compose-body">
+ <div className="compose-body flex-1 overflow-auto py-5 px-6 min-h-0">
<EditorContent editor={editor} />
{draft.attachments.length > 0 && (
- <div className="compose-attachments">
+ <div className="compose-attachments flex gap-1.75 flex-wrap mt-3.75">
{draft.attachments.map((a) => (
- <div className="compose-attachment" key={a.id}>
+ <div
+ className={cn(
+ 'compose-attachment [&_small]:text-muted [&_button]:border-0 [&_button]:bg-none [&_button]:bg-transparent',
+ '[&_button]:p-0 [&_button]:text-muted flex gap-1.75 items-center py-1.75 px-2.25 border border-solid',
+ 'border-border-strong rounded-md text-[11px]',
+ )}
+ key={a.id}
+ >
<FileText size={14} />
<span>{a.name}</span>
<small>{formatBytes(a.size)}</small>
@@ -573,12 +654,17 @@ export function Composer({
)}
</div>
{problem && draft.status !== 'uncertain' && (
- <div className="compose-warning" role="status">
+ <div
+ className="compose-warning [&_span]:flex-1 [&_.button]:shrink-0 flex items-center gap-2 py-2.5 px-5.5 text-[11px] text-danger bg-danger/8"
+ role="status"
+ >
<AlertCircle size={15} />
<span>
{problem.text}
{problem.detail && problem.detail !== problem.text && (
- <small className="compose-warning-detail">{problem.detail}</small>
+ <small className="compose-warning-detail block mt-[2px] text-muted">
+ {problem.detail}
+ </small>
)}
</span>
{(shown.errorKind === 'conflict' || shown.error?.includes('another client')) && (
@@ -603,24 +689,32 @@ export function Composer({
</div>
)}
{draft.status === 'uncertain' && (
- <div className="compose-warning">
+ <div className="compose-warning [&_span]:flex-1 [&_.button]:shrink-0 flex items-center gap-2 py-2.5 px-5.5 text-[11px] text-danger bg-danger/8">
<AlertCircle size={15} />
The server may have accepted this message. Check delivery to avoid sending it twice.
</div>
)}
- <fieldset className="compose-format" disabled={locked}>
+ <fieldset
+ className={cn(
+ 'compose-format flex gap-1.25 items-center py-1.75 px-4.5 border-t border-solid border-t-border',
+ '[&:is(fieldset)]:m-0 [&:is(fieldset)]:min-w-0 [&:is(fieldset)]:border-l-0 [&:is(fieldset)]:border-r-0',
+ '[&:is(fieldset)]:border-b-0 [&:is(fieldset):disabled]:opacity-50 m-0 border-r-0 border-l-0 border-b-0 min-w-0',
+ '[&_.active-format]:bg-primary-tint [&_.active-format]:text-primary',
+ )}
+ disabled={locked}
+ >
<IconButton
label="Bold"
shortcut={boldKeys}
onClick={() => editor?.chain().focus().toggleBold().run()}
- className={formatting?.bold ? 'active-format' : ''}
+ className={cn(formatting?.bold && 'active-format bg-hover text-primary')}
aria-pressed={formatting?.bold || false}
>
<Bold size={14} />
</IconButton>
<IconButton
label="Italic"
- className={formatting?.italic ? 'active-format' : ''}
+ className={cn(formatting?.italic && 'active-format bg-hover text-primary')}
aria-pressed={formatting?.italic || false}
shortcut={italicKeys}
onClick={() => editor?.chain().focus().toggleItalic().run()}
@@ -629,7 +723,7 @@ export function Composer({
</IconButton>
<IconButton
label="Bulleted list"
- className={formatting?.bulletList ? 'active-format' : ''}
+ className={cn(formatting?.bulletList && 'active-format bg-hover text-primary')}
aria-pressed={formatting?.bulletList || false}
onClick={() => editor?.chain().focus().toggleBulletList().run()}
>
@@ -637,7 +731,7 @@ export function Composer({
</IconButton>
<IconButton
label={formatting?.link ? 'Edit link' : 'Add link'}
- className={formatting?.link ? 'active-format' : ''}
+ className={cn(formatting?.link && 'active-format bg-hover text-primary')}
aria-pressed={formatting?.link || false}
onClick={() => {
const href: string = editor?.getAttributes('link').href || ''
@@ -649,7 +743,7 @@ export function Composer({
>
<Link2 size={15} />
</IconButton>
- <span className="toolbar-divider" />
+ <span className="toolbar-divider w-[1px] h-4.25 bg-border-strong my-0 mx-1" />
<IconButton
label="Attach files"
shortcut={keys('attachFiles')}
@@ -658,7 +752,7 @@ export function Composer({
<Paperclip size={15} />
</IconButton>
</fieldset>
- <div className="compose-footer">
+ <div className="compose-footer flex items-center gap-2.5 py-3.25 px-5 border-t border-solid border-t-border">
<Button
variant="primary"
onClick={() => void send()}
@@ -674,9 +768,15 @@ export function Composer({
: isDemo
? 'Simulate send'
: 'Send message'}
- {sendShortcut && <span className="send-shortcut">{bindingText(sendShortcut)}</span>}
+ {sendShortcut && (
+ <span className="send-shortcut text-[11px] opacity-60 ml-2.5">
+ {bindingText(sendShortcut)}
+ </span>
+ )}
</Button>
- <span className="compose-account">{account.email}</span>
+ <span className="compose-account flex-1 text-right text-muted text-[11px] max-[700px]:text-[10px]">
+ {account.email}
+ </span>
<IconButton
label="Discard draft"
shortcut={keys('discardDraft')}
@@ -694,7 +794,12 @@ export function Composer({
title="Discard this draft?"
description="This deletes the saved draft and its attachments."
>
- <div className="modal-actions">
+ <div
+ className={cn(
+ 'modal-actions flex justify-end gap-2 mt-6 [&>.modal-action-start]:mr-auto [&>.modal-action-start]:-ml-2.5',
+ '[&>.modal-action-start]:text-muted [&>.modal-action-start:hover:not(:disabled)]:text-danger',
+ )}
+ >
<Button onClick={() => setDiscardOpen(false)}>Keep writing</Button>
<Button
variant="danger"
@@ -725,7 +830,7 @@ export function Composer({
insertLink()
}}
>
- <label className="modal-field">
+ <label className="modal-field [&_input]:mt-1.5">
Web or email address
<input
autoFocus
@@ -741,11 +846,20 @@ export function Composer({
/>
</label>
{linkError && (
- <span className="field-error" id="compose-link-error" role="alert">
+ <span
+ className="field-error block mt-1.25 text-[11px] text-danger"
+ id="compose-link-error"
+ role="alert"
+ >
{linkError}
</span>
)}
- <div className="modal-actions">
+ <div
+ className={cn(
+ 'modal-actions flex justify-end gap-2 mt-6 [&>.modal-action-start]:mr-auto [&>.modal-action-start]:-ml-2.5',
+ '[&>.modal-action-start]:text-muted [&>.modal-action-start:hover:not(:disabled)]:text-danger',
+ )}
+ >
{editingLink && (
<Button
variant="ghost"
diff --git a/apps/desktop/src/renderer/src/ConversationList.tsx b/apps/desktop/src/renderer/src/ConversationList.tsx
index aba8cc0..e3fd100 100644
--- a/apps/desktop/src/renderer/src/ConversationList.tsx
+++ b/apps/desktop/src/renderer/src/ConversationList.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import {
useCallback,
useEffect,
@@ -240,7 +241,11 @@ export function ConversationList({
return (
<div
- className="mail-list"
+ className={cn(
+ 'mail-list flex-1 overflow-auto min-h-0 outline-none [overflow-anchor:none] [scrollbar-gutter:stable] pb-4',
+ 'focus-visible:shadow-[inset_0_0_0_1px_var(--border-strong)] focus-visible:rounded-none [&:has(.selected)]:pb-22',
+ '[&:has(.selected)_.row-selector_.checkbox]:opacity-100 [&:has(.selected)_.unread-dot]:opacity-0',
+ )}
ref={listRef}
tabIndex={0}
role="grid"
@@ -281,7 +286,15 @@ export function ConversationList({
}}
>
{'group' in row ? (
- <div className="date-group">{row.group}</div>
+ <div
+ className={cn(
+ 'date-group h-9 flex items-center py-0 px-7 text-muted text-[11px] font-medium bg-background border-b',
+ 'border-solid border-b-border @max-[900px]/mail:pl-5.5 @max-[900px]/mail:pr-5.5 @max-[680px]/mail:py-0',
+ '@max-[680px]/mail:px-5',
+ )}
+ >
+ {row.group}
+ </div>
) : (
<ListConversationRow
conversation={row.conversation}
@@ -302,7 +315,7 @@ export function ConversationList({
})}
</div>
{isFetchingNextPage && (
- <div className="load-more">
+ <div className="load-more flex items-center justify-center gap-2 text-[12px] text-muted p-3.75">
<Spinner size={14} />
Loading more conversations…
</div>
diff --git a/apps/desktop/src/renderer/src/ConversationRow.tsx b/apps/desktop/src/renderer/src/ConversationRow.tsx
index d577b5f..7aaf335 100644
--- a/apps/desktop/src/renderer/src/ConversationRow.tsx
+++ b/apps/desktop/src/renderer/src/ConversationRow.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { Archive, Mail, MailOpen, Paperclip, Star, Trash2 } from '@inlark/ui/icons'
import { Checkbox, IconButton } from '@inlark/ui'
import { isDraft, type Account, type Conversation } from '@inlark/core'
@@ -49,28 +50,70 @@ export function ConversationRow({
const count = c.count - drafts
return (
<div
- className={
- 'mail-row ' +
- (c.unread ? 'unread ' : '') +
- (selected ? 'selected ' : '') +
- (focused ? 'focused' : '')
- }
+ className={cn(
+ 'mail-row flex items-center h-[var(--row-height)] py-0 pr-5 pl-7 gap-4 cursor-pointer border-b border-solid',
+ 'border-b-border text-[13px] relative hover:bg-hover',
+ '[&:hover_.row-selector_.checkbox]:opacity-100 [&.selected_.row-selector_.checkbox]:opacity-100',
+ '[&:hover_.unread-dot]:opacity-0 [&.selected_.unread-dot]:opacity-0 [&:hover_.row-star]:opacity-100',
+ '[&:focus-within_.row-star]:opacity-100 [&:hover_.row-quick-actions]:opacity-100',
+ '[&:hover_.row-quick-actions]:pointer-events-auto [&:focus-within_.row-quick-actions]:opacity-100',
+ '[&:focus-within_.row-quick-actions]:pointer-events-auto @max-[900px]/mail:gap-3 @max-[900px]/mail:pl-5.5',
+ '@max-[900px]/mail:pr-3.5 @max-[680px]/mail:py-0 @max-[680px]/mail:pr-4 @max-[680px]/mail:pl-5',
+ '@max-[680px]/mail:gap-3 @max-[680px]/mail:[.density-comfortable_&]:grid',
+ '@max-[680px]/mail:[.density-comfortable_&]:grid-cols-[16px_minmax(0,_1fr)_auto]',
+ '@max-[680px]/mail:[.density-comfortable_&]:grid-rows-[22px_20px]',
+ '@max-[680px]/mail:[.density-comfortable_&]:gap-[2px_12px]',
+ '@max-[680px]/mail:[.density-comfortable_&]:content-center',
+ c.unread && 'unread bg-[color-mix(in_srgb,_var(--surface)_32%,_var(--bg))]',
+ (selected || focused) && 'bg-selected hover:bg-selected',
+ selected && 'selected',
+ focused && 'focused shadow-[inset_2px_0_var(--accent)]',
+ )}
role="row"
id={'mail-' + encodeURIComponent(c.key)}
aria-selected={selected}
onClick={onOpen}
onMouseDown={onFocus}
>
- <div className="row-selector" role="gridcell" onClick={(event) => event.stopPropagation()}>
+ <div
+ className={cn(
+ 'row-selector relative w-4 shrink-0 h-6 flex items-center justify-center [&_.checkbox]:absolute',
+ '[&_.checkbox]:opacity-0 [&:focus-within_.checkbox]:opacity-100 [&:focus-within_.unread-dot]:opacity-0',
+ '@max-[680px]/mail:[.density-comfortable_&]:col-start-1 @max-[680px]/mail:[.density-comfortable_&]:row-start-1',
+ '@max-[680px]/mail:[.density-comfortable_&]:row-end-3',
+ )}
+ role="gridcell"
+ onClick={(event) => event.stopPropagation()}
+ >
<Checkbox
aria-label={'Select ' + subject}
checked={selected}
disabled={busy}
onCheckedChange={(_, event) => onSelect(!!(event as MouseEvent).shiftKey)}
/>
- <span className={'unread-dot ' + (c.unread ? 'visible' : '')} />
+ <span
+ className={cn(
+ 'unread-dot w-1.25 h-1.25 rounded-full bg-primary opacity-0 pointer-events-none [&.visible]:opacity-100',
+ c.unread && 'visible',
+ )}
+ />
</div>
- <div className="row-sender" role="gridcell">
+ <div
+ className={cn(
+ 'row-sender flex items-center gap-2.5 w-[min(var(--sender-width,_180px),_38%)] shrink-0 text-secondary',
+ '[&>span:not(.avatar)]:overflow-hidden [&>span:not(.avatar)]:text-ellipsis',
+ '[&>span:not(.avatar)]:whitespace-nowrap [&_small]:text-muted [&_small]:text-[10px] [&_small]:py-0',
+ '[&_small]:px-1 [&_small]:bg-surface [&_small]:rounded-xs [&_.avatar]:rounded-[7px]',
+ '[&_.avatar]:[font-size:10px]!',
+ '[&_.avatar]:shadow-[inset_0_0_0_1px_color-mix(in_srgb,_var(--avatar-color)_9%,_transparent)]',
+ '[.unread_&]:text-strong [.unread_&]:font-[550] [.density-compact_&_.avatar]:[width:24px]!',
+ '[.density-compact_&_.avatar]:[height:24px]! @max-[900px]/mail:[&_.avatar]:hidden',
+ '@max-[680px]/mail:[.density-comfortable_&]:col-start-2 @max-[680px]/mail:[.density-comfortable_&]:row-start-1',
+ '@max-[680px]/mail:[.density-comfortable_&]:w-auto @max-[680px]/mail:[.density-comfortable_&]:min-w-0',
+ '@max-[440px]/mail:[.density-compact_&]:text-[11px]',
+ )}
+ role="gridcell"
+ >
<SenderAvatar
name={c.from[0]?.name || c.from[0]?.email || '?'}
email={c.from[0]?.email}
@@ -80,14 +123,46 @@ export function ConversationRow({
/>
<span title={c.from.map((sender) => sender.email).join(', ')}>{senderLabel(c)}</span>
{count > 1 && <small>{count}</small>}
- {drafts > 0 && <span className="row-draft">Draft</span>}
+ {drafts > 0 && (
+ <span className="row-draft shrink-0 text-draft text-[11px] font-semibold">Draft</span>
+ )}
</div>
- <div className="row-content" role="gridcell">
- <span className="row-subject">{subject}</span>
- <span className="row-preview">{c.preview}</span>
+ <div
+ className={cn(
+ 'row-content flex-1 min-w-0 flex flex-col gap-[3px] overflow-hidden whitespace-nowrap',
+ '[.density-compact_&]:flex-row [.density-compact_&]:gap-3 [.density-compact_&]:items-baseline',
+ '@max-[680px]/mail:[.density-comfortable_&]:col-start-2 @max-[680px]/mail:[.density-comfortable_&]:col-end-4',
+ '@max-[680px]/mail:[.density-comfortable_&]:row-start-2 @max-[680px]/mail:[.density-comfortable_&]:flex-row',
+ '@max-[680px]/mail:[.density-comfortable_&]:gap-2.5 @max-[680px]/mail:[.density-comfortable_&]:items-baseline',
+ )}
+ role="gridcell"
+ >
+ <span
+ className={cn(
+ 'row-subject overflow-hidden text-ellipsis text-secondary leading-[20px] [.unread_&]:text-strong',
+ '[.unread_&]:font-[550] [.density-compact_&]:max-w-[75%] [.density-compact_&]:shrink-0',
+ '@max-[900px]/mail:[.density-compact_&]:max-w-full @max-[680px]/mail:[.density-comfortable_&]:shrink-0',
+ '@max-[680px]/mail:[.density-comfortable_&]:max-w-[75%] @max-[680px]/mail:[.density-comfortable_&]:text-[12px]',
+ '@max-[440px]/mail:[.density-comfortable_&]:max-w-full @max-[440px]/mail:[.density-compact_&]:text-[12px]',
+ )}
+ >
+ {subject}
+ </span>
+ <span className="row-preview overflow-hidden text-ellipsis text-muted text-[12px] leading-[18px] @max-[900px]/mail:[.density-compact_&]:hidden @max-[440px]/mail:[.density-comfortable_&]:hidden">
+ {c.preview}
+ </span>
</div>
- <div className="row-meta" role="gridcell">
- <span className="row-attachment">
+ <div
+ className={cn(
+ 'row-meta flex items-center gap-2.25 text-muted shrink-0 relative [&_time]:w-14.5 [&_time]:text-right',
+ '[&_time]:text-[11px] [&_time]:tabular-nums @max-[680px]/mail:[.density-comfortable_&]:col-start-3',
+ '@max-[680px]/mail:[.density-comfortable_&]:row-start-1 @max-[680px]/mail:[.density-comfortable_&]:gap-1.75',
+ '@max-[680px]/mail:[&_time]:text-[10px] @max-[680px]/mail:[&_time]:w-13.5 @max-[680px]/mail:gap-1.5',
+ '@max-[440px]/mail:[.density-compact_&_time]:hidden',
+ )}
+ role="gridcell"
+ >
+ <span className="row-attachment w-3.25">
{c.hasAttachment && <Paperclip size={13} aria-label="Has attachments" />}
</span>
{a && <AccountMark account={a} size={22} title={a.name} />}
@@ -95,7 +170,15 @@ export function ConversationRow({
{shortDate(c.receivedAt)}
</time>
<button
- className={'row-star ' + (c.starred ? 'starred' : '')}
+ className={cn(
+ 'row-star grid place-items-center bg-none bg-transparent border-0 rounded-sm p-1.25 text-faint opacity-0',
+ 'transition-[opacity,color,background-color] duration-120 ease-[ease]',
+ '[&_svg]:[transition:fill_120ms_ease,_transform_160ms_cubic-bezier(0.3,_1.5,_0.6,_1)] [&.starred]:opacity-100',
+ '[&:hover:not(:disabled)]:text-secondary [&:hover:not(:disabled)]:bg-strong/8',
+ '[&:active:not(:disabled)_svg]:transform-[scale(0.85)] [&.starred]:text-star',
+ '[&.starred:hover:not(:disabled)]:text-star [&.starred_svg]:fill-current @max-[680px]/mail:p-[3px]',
+ c.starred && 'starred [&:is(svg)]:fill-current text-star',
+ )}
aria-label={(c.starred ? 'Unstar ' : 'Star ') + subject}
aria-pressed={c.starred}
disabled={busy}
@@ -106,7 +189,10 @@ export function ConversationRow({
>
<Star size={14} />
</button>
- <div className="row-quick-actions" onClick={(event) => event.stopPropagation()}>
+ <div
+ className="row-quick-actions absolute right-7.5 flex gap-[2px] p-[2px] border border-solid border-border-strong rounded-md bg-raised shadow-[0_2px_6px_#0002] opacity-0 pointer-events-none"
+ onClick={(event) => event.stopPropagation()}
+ >
<IconButton
label={c.unread ? 'Mark as read' : 'Mark as unread'}
shortcut={keys(c.unread ? 'read' : 'unread')}
diff --git a/apps/desktop/src/renderer/src/DraftList.tsx b/apps/desktop/src/renderer/src/DraftList.tsx
index d0a69ed..1ab327f 100644
--- a/apps/desktop/src/renderer/src/DraftList.tsx
+++ b/apps/desktop/src/renderer/src/DraftList.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { ArrowUpRight, FileText, Trash2, X } from '@inlark/ui/icons'
import { Checkbox, IconButton } from '@inlark/ui'
import type { Account, Draft, Message } from '@inlark/core'
@@ -28,14 +29,36 @@ export function DraftRows({
}) {
const keys = useShortcutText()
return (
- <div className={'draft-rows' + (selected.size ? ' selecting' : '')}>
+ <div
+ className={cn(
+ 'draft-rows [&:has(.selected)]:pb-22',
+ '[&.selecting_.draft-selector:not(:has([data-disabled]))_.checkbox]:opacity-100',
+ '[&.selecting_.draft-selector:not(:has([data-disabled]))>svg]:opacity-0',
+ selected.size && 'selecting',
+ )}
+ >
{items.map((item) => {
const subject =
item.kind === 'server' ? item.message.subject : item.draft.subject || 'New message'
const canDelete = deletable(item)
return (
- <div className={'draft-row' + (selected.has(item.key) ? ' selected' : '')} key={item.key}>
- <span className="draft-selector">
+ <div
+ className={cn(
+ 'draft-row flex gap-4 items-center border-b border-solid border-b-border py-0 pr-6.5 pl-8 text-secondary',
+ 'hover:bg-hover [&.selected]:bg-selected',
+ '[&:hover_.draft-selector:not(:has([data-disabled]))_.checkbox]:opacity-100',
+ '[&:hover_.draft-selector:not(:has([data-disabled]))>svg]:opacity-0 [&:hover_.draft-actions_.button]:opacity-100',
+ '[&:hover_.draft-actions:has(.button)>svg]:opacity-0',
+ selected.has(item.key) && 'selected',
+ )}
+ key={item.key}
+ >
+ <span
+ className={cn(
+ 'draft-selector [&_.checkbox]:absolute [&_.checkbox]:opacity-0 [&:focus-within_.checkbox]:opacity-100',
+ '[&:focus-within>svg]:opacity-0 relative grid place-items-center shrink-0 w-4.25 h-4.25',
+ )}
+ >
<FileText size={17} />
<Checkbox
aria-label={'Select ' + subject}
@@ -44,7 +67,15 @@ export function DraftRows({
onCheckedChange={(_, event) => onSelect(item.key, !!(event as MouseEvent).shiftKey)}
/>
</span>
- <button className="draft-open" onClick={() => onOpen(item)}>
+ <button
+ className={cn(
+ 'draft-open [&>div]:flex-1 [&>div]:min-w-0 [&_strong]:block [&_strong]:font-medium [&_strong]:text-[13px]',
+ '[&_strong]:text-foreground [&_span]:block [&_span]:text-[11px] [&_span]:text-muted [&_span]:mt-1',
+ '[&_small]:text-[11px] [&_small]:text-muted [&_time]:text-[11px] [&_time]:text-muted flex flex-1 gap-4',
+ 'items-center min-w-0 py-4.75 px-0 bg-none bg-transparent border-0 text-left',
+ )}
+ onClick={() => onOpen(item)}
+ >
<div>
<strong>{subject}</strong>
<span>
@@ -64,7 +95,13 @@ export function DraftRows({
{shortDate(item.kind === 'server' ? item.message.receivedAt : item.draft.updatedAt)}
</time>
</button>
- <span className="draft-actions">
+ <span
+ className={cn(
+ 'draft-actions [&_.button]:absolute [&_.button]:inset-0 [&_.button]:opacity-0',
+ '[&:focus-within_.button]:opacity-100 [&:focus-within>svg]:opacity-0 relative grid place-items-center shrink-0',
+ 'w-7 h-7',
+ )}
+ >
<ArrowUpRight size={14} aria-hidden="true" />
{canDelete && (
<IconButton
@@ -98,18 +135,34 @@ export function DraftSelectionBar({
}) {
const keys = useShortcutText()
return (
- <div className="selection-bar" role="region" aria-label="Selection actions">
- <div className="selection-summary">
- <span className="selection-count" role="status">
+ <div
+ className={cn(
+ 'selection-bar absolute z-10 bottom-12.5 left-[50%] transform-[translateX(-50%)] flex items-center gap-1.25',
+ 'py-2.5 px-3 max-w-[calc(100%_-_24px)] whitespace-nowrap border border-solid border-border-strong rounded-xl',
+ 'bg-raised shadow-[0_8px_28px_#0003,_0_2px_5px_#0002] animate-[selection-appear_140ms_ease-out]',
+ '@max-[440px]/mail:gap-[2px] @max-[440px]/mail:p-2 @max-[440px]/mail:[&_.toolbar-divider]:my-0',
+ '@max-[440px]/mail:[&_.toolbar-divider]:mx-[2px]',
+ )}
+ role="region"
+ aria-label="Selection actions"
+ >
+ <div className="selection-summary flex flex-col gap-[2px] min-w-20.5 py-0 px-1.5 @max-[440px]/mail:min-w-18.5 @max-[440px]/mail:py-0 @max-[440px]/mail:px-1">
+ <span
+ className="selection-count text-[12px] text-foreground font-medium tabular-nums"
+ role="status"
+ >
{count.toLocaleString()} selected
</span>
{total > count && (
- <button className="text-action" onClick={onSelectAll}>
+ <button
+ className="border-0 bg-none bg-transparent text-primary text-[11px] p-0 text-left hover:underline"
+ onClick={onSelectAll}
+ >
Select all {total.toLocaleString()}
</button>
)}
</div>
- <span className="toolbar-divider" />
+ <span className="toolbar-divider w-[1px] h-4.25 bg-border-strong my-0 mx-1" />
<IconButton
label={count > 1 ? 'Delete drafts' : 'Delete draft'}
shortcut={keys('trash')}
@@ -117,7 +170,7 @@ export function DraftSelectionBar({
>
<Trash2 size={16} />
</IconButton>
- <span className="toolbar-divider" />
+ <span className="toolbar-divider w-[1px] h-4.25 bg-border-strong my-0 mx-1" />
<IconButton label="Clear selection" shortcut={keys('back')} onClick={onClear}>
<X size={14} />
</IconButton>
diff --git a/apps/desktop/src/renderer/src/FolderMappings.tsx b/apps/desktop/src/renderer/src/FolderMappings.tsx
index 89109cf..959d77e 100644
--- a/apps/desktop/src/renderer/src/FolderMappings.tsx
+++ b/apps/desktop/src/renderer/src/FolderMappings.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { useEffect, useMemo, useState } from 'react'
import { useQuery } from '@tanstack/react-query'
import { AlertCircle, Check } from '@inlark/ui/icons'
@@ -77,7 +78,7 @@ export function FolderMappingEditor({
const folders = review.folders.filter((f) => f.path.toUpperCase() !== 'INBOX')
const proposal = useMemo(() => initialFolderChoices(review), [review])
return (
- <div className="folder-roles">
+ <div className="folder-roles grid">
{folderRoles.map((role) => {
const info = roles[role]
const mapping = review.mappings[role]
@@ -108,16 +109,36 @@ export function FolderMappingEditor({
: { text: 'Not found on the server Β· check this', tone: 'uncertain' }
const id = 'folder-role-' + role
return (
- <div className="folder-role" key={role}>
- <div className="folder-role-text">
+ <div
+ className={cn(
+ 'folder-role grid grid-cols-[minmax(0,_1fr)_220px] gap-4 items-center py-3 px-0 [&+.folder-role]:border-t',
+ '[&+.folder-role]:border-solid [&+.folder-role]:border-t-border max-[700px]:grid-cols-[minmax(0,_1fr)_180px]',
+ )}
+ key={role}
+ >
+ <div
+ className={cn(
+ 'folder-role-text [&_label]:text-foreground [&_strong]:text-[13px] [&_strong]:font-medium [&_p]:basis-full',
+ '[&_p]:m-0 [&_p]:text-[11px] [&_p]:text-muted flex flex-wrap items-baseline gap-[2px_10px] min-w-0',
+ )}
+ >
<label htmlFor={id}>
<strong>{info.label}</strong>
</label>
- <span className={'folder-role-status ' + status.tone}>
+ <span
+ className={cn(
+ 'folder-role-status inline-flex items-center gap-1.25 text-[11px] text-muted [&.confirmed_svg]:text-success',
+ '[&.uncertain]:text-primary',
+ status.tone,
+ )}
+ >
{status.tone === 'confirmed' ? (
<Check size={11} />
) : status.tone === 'uncertain' ? (
- <span className="folder-role-dot" aria-hidden="true" />
+ <span
+ className="folder-role-dot w-1.5 h-1.5 rounded-full bg-primary"
+ aria-hidden="true"
+ />
) : null}
{status.text}
</span>
@@ -181,7 +202,7 @@ export function FolderMappingsDialog({
}}
title={'Folders for ' + (account?.name || 'this account')}
description="Choose where Inlark keeps sent mail and drafts, and where Archive, Mark as spam and Move to trash put conversations."
- className="folder-modal"
+ className="folder-modal w-[min(600px,_calc(100vw_-_40px))]"
>
<form
onSubmit={async (e) => {
@@ -203,7 +224,10 @@ export function FolderMappingsDialog({
}}
>
{review.isError ? (
- <div role="alert" className="form-error">
+ <div
+ role="alert"
+ className="form-error flex gap-2 text-[11px] leading-[1.6] my-3.75 mx-0 text-danger [&_svg]:shrink-0 [&_svg]:mt-[3px]"
+ >
<AlertCircle size={14} />
{friendlyError(review.error)}
</div>
@@ -215,18 +239,29 @@ export function FolderMappingsDialog({
disabled={saving}
/>
) : (
- <div className="folder-roles-loading" role="status">
+ <div
+ className="folder-roles-loading flex items-center gap-2 py-5 px-0 text-[12px] text-muted"
+ role="status"
+ >
<Spinner size={14} />
Loading folders…
</div>
)}
{error && (
- <div role="alert" className="form-error">
+ <div
+ role="alert"
+ className="form-error flex gap-2 text-[11px] leading-[1.6] my-3.75 mx-0 text-danger [&_svg]:shrink-0 [&_svg]:mt-[3px]"
+ >
<AlertCircle size={14} />
{error}
</div>
)}
- <div className="modal-actions">
+ <div
+ className={cn(
+ 'modal-actions flex justify-end gap-2 mt-6 [&>.modal-action-start]:mr-auto [&>.modal-action-start]:-ml-2.5',
+ '[&>.modal-action-start]:text-muted [&>.modal-action-start:hover:not(:disabled)]:text-danger',
+ )}
+ >
<Button onClick={onClose} disabled={saving}>
Cancel
</Button>
diff --git a/apps/desktop/src/renderer/src/HintIconButton.tsx b/apps/desktop/src/renderer/src/HintIconButton.tsx
index 5b4329a..c181a64 100644
--- a/apps/desktop/src/renderer/src/HintIconButton.tsx
+++ b/apps/desktop/src/renderer/src/HintIconButton.tsx
@@ -41,10 +41,10 @@ export function HintIconButton({
</Tooltip.Trigger>
<Tooltip.Portal>
<Tooltip.Positioner sideOffset={7}>
- <Tooltip.Popup className="tooltip tooltip-with-hint">
- <span className="tooltip-text">
+ <Tooltip.Popup className="tooltip flex gap-3 py-1.5 px-2.25 bg-raised border border-solid border-border-strong rounded-md text-[11px] shadow-popup z-200 tooltip-with-hint items-start max-w-70">
+ <span className="tooltip-text flex flex-col gap-[2px]">
{label}
- <span className="tooltip-hint">{hint}</span>
+ <span className="tooltip-hint text-muted leading-[1.5]">{hint}</span>
</span>
{shortcut && <kbd>{shortcut}</kbd>}
</Tooltip.Popup>
diff --git a/apps/desktop/src/renderer/src/IndexingMeter.tsx b/apps/desktop/src/renderer/src/IndexingMeter.tsx
index cbe6d56..6c822f7 100644
--- a/apps/desktop/src/renderer/src/IndexingMeter.tsx
+++ b/apps/desktop/src/renderer/src/IndexingMeter.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import type { IndexingProgress } from '@inlark/core'
/** β€œIndexing mail Β· 12,340 of 50,000” with a slim bar; quiet, since indexing needs no action. */
@@ -11,12 +12,16 @@ export function IndexingMeter({
const total = Math.max(indexing.total, indexing.indexed)
const ratio = total ? indexing.indexed / total : 0
return (
- <span className="indexing-meter">
+ <span className="indexing-meter inline-flex items-center gap-2.5 tabular-nums">
<span>
{label} Β· {indexing.indexed.toLocaleString()} of {total.toLocaleString()}
</span>
<span
- className="indexing-bar"
+ className={cn(
+ 'indexing-bar [&>span]:absolute [&>span]:inset-y-0 [&>span]:left-0 [&>span]:rounded-[inherit]',
+ '[&>span]:bg-primary [&>span]:transition-[width] [&>span]:duration-400 [&>span]:ease-[ease] relative w-18',
+ 'h-[3px] shrink-0 rounded-[2px] bg-border-strong overflow-hidden',
+ )}
role="progressbar"
aria-label={label}
aria-valuemin={0}
diff --git a/apps/desktop/src/renderer/src/MoveDialog.tsx b/apps/desktop/src/renderer/src/MoveDialog.tsx
index af0f81b..46321e8 100644
--- a/apps/desktop/src/renderer/src/MoveDialog.tsx
+++ b/apps/desktop/src/renderer/src/MoveDialog.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { useEffect, useId, useRef, useState } from 'react'
import { useQuery } from '@tanstack/react-query'
import { ChevronRight, Folder, Search } from '@inlark/ui/icons'
@@ -75,12 +76,22 @@ export function MoveDialog({
? 'Select conversations within one account to move them to a folder.'
: accounts.find((a) => a.id === accountId)?.email
}
- className="move-modal"
+ className="move-modal w-[min(440px,_calc(100vw_-_40px))]"
>
- {limit && <p className="modal-body-text">{limit}</p>}
+ {limit && (
+ <p className="modal-body-text m-0 text-[12px] leading-[1.6] text-secondary">{limit}</p>
+ )}
{choosable && (
<>
- <div className="folder-search">
+ <div
+ className={cn(
+ 'folder-search flex items-center gap-2 h-9 mb-2 py-0 px-2.75 text-muted bg-field border border-solid',
+ 'border-border-strong rounded-[7px] transition-[border-color,box-shadow] duration-120 ease-[ease]',
+ 'focus-within:border-primary-solid focus-within:shadow-[0_0_0_3px_var(--accent-tint)] [&_input]:h-full',
+ '[&_input]:p-0 [&_input]:text-[12px] [&_input]:bg-none [&_input]:bg-transparent [&_input]:border-0',
+ '[&_input:focus-visible]:outline-none',
+ )}
+ >
<Search size={14} />
<input
autoFocus
@@ -114,7 +125,21 @@ export function MoveDialog({
}}
/>
</div>
- <div className="folder-picker" role="listbox" id={listId} aria-label="Folders" ref={list}>
+ <div
+ className={cn(
+ 'folder-picker [&_button]:w-full [&_button]:flex [&_button]:items-center [&_button]:gap-3 [&_button]:bg-none',
+ '[&_button]:bg-transparent [&_button]:border-0 [&_button]:py-2.5 [&_button]:px-3 [&_button]:rounded-md',
+ '[&_button]:text-[12px] [&_button]:text-left [&_button]:text-secondary [&_button>span]:flex-1',
+ '[&_button>span]:min-w-0 [&_button>span]:overflow-hidden [&_button>span]:text-ellipsis',
+ '[&_button>span]:whitespace-nowrap [&_button_svg]:text-muted [&_button.active]:bg-hover',
+ '[&_button.active]:text-strong [&_button.active_svg]:text-strong max-h-[min(340px,_calc(100vh_-_280px))]',
+ 'overflow-y-auto my-0 -mx-1.5 py-0 px-1.5',
+ )}
+ role="listbox"
+ id={listId}
+ aria-label="Folders"
+ ref={list}
+ >
{folders.map((b, i) => (
<button
key={b.id}
@@ -122,7 +147,7 @@ export function MoveDialog({
role="option"
aria-selected={i === highlighted}
tabIndex={-1}
- className={i === highlighted ? 'active' : ''}
+ className={cn(i === highlighted && 'active')}
onMouseMove={() => i !== highlighted && setActive(i)}
onMouseDown={(event) => event.preventDefault()}
onClick={() => onMove(b.id)}
@@ -133,18 +158,24 @@ export function MoveDialog({
</button>
))}
{boxes.isLoading && (
- <div className="folder-picker-note" role="status">
+ <div
+ className="folder-picker-note flex items-center gap-2 py-3.5 px-3 text-[12px] text-muted"
+ role="status"
+ >
<Spinner size={14} />
Loading folders…
</div>
)}
{boxes.isError && (
- <div className="folder-picker-note" role="alert">
+ <div
+ className="folder-picker-note flex items-center gap-2 py-3.5 px-3 text-[12px] text-muted"
+ role="alert"
+ >
{friendlyError(boxes.error)}
</div>
)}
{boxes.data && !folders.length && (
- <div className="folder-picker-note">
+ <div className="folder-picker-note flex items-center gap-2 py-3.5 px-3 text-[12px] text-muted">
{text.trim() ? 'No folders match β€œ' + text.trim() + '”' : 'No folders to move to'}
</div>
)}
diff --git a/apps/desktop/src/renderer/src/Reader.tsx b/apps/desktop/src/renderer/src/Reader.tsx
index a4045aa..9506245 100644
--- a/apps/desktop/src/renderer/src/Reader.tsx
+++ b/apps/desktop/src/renderer/src/Reader.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { useEffect, useLayoutEffect, useRef, useState } from 'react'
import DOMPurify from 'dompurify'
import {
@@ -100,7 +101,7 @@ const fontStack = "Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif"
const paperStyles =
'html,body{margin:0;background:#fff;color:#24262b;font:16px/1.75 ' +
fontStack +
- ';overflow-wrap:anywhere}body{padding:22px 24px 26px}p{margin:0 0 16px}a{color:#5a4fb0}blockquote{margin:16px 0;padding-left:16px;border-left:2px solid #d5d5dc;color:#5d6068}hr{border:0;border-top:1px solid #e3e3e8;margin:24px 0}summary{color:#70737d}summary:hover{background:#f0f0f3}'
+ ';overflow-wrap:anywhere}body{padding:22px 24px 26px}p{margin:0 0 16px}a{color:#5a4fb0}blockquote{margin:16px 0;padding-left:16px;border-l:2px solid #d5d5dc;color:#5d6068}hr{border:0;border-t:1px solid #e3e3e8;margin:24px 0}summary{color:#70737d}summary:hover{background:#f0f0f3}'
const adaptiveStyles = (theme: 'light' | 'dark') =>
'html,body{margin:0;background:transparent;color:' +
token('--text') +
@@ -112,11 +113,11 @@ const adaptiveStyles = (theme: 'light' | 'dark') =>
token('--accent') +
';text-decoration:underline;text-decoration-color:' +
token('--border-strong') +
- ';text-underline-offset:3px}a:hover{text-decoration-color:currentColor}blockquote{margin:14px 0;padding-left:14px;border-left:2px solid ' +
+ ';text-underline-offset:3px}a:hover{text-decoration-color:currentColor}blockquote{margin:14px 0;padding-left:14px;border-l:2px solid ' +
token('--border-strong') +
';color:' +
token('--muted') +
- '}hr{border:0;border-top:1px solid ' +
+ '}hr{border:0;border-t:1px solid ' +
token('--border-strong') +
';margin:22px 0}summary{color:' +
token('--muted') +
@@ -421,7 +422,7 @@ export function EmailBody({
return (
<>
{blocked && (
- <div className="image-notice">
+ <div className="image-notice flex gap-1.75 items-center text-muted text-[11px] pt-2 pb-4.25 px-0">
<ImageOff size={13} />
Remote images are off. You can enable them in Settings.
</div>
@@ -431,7 +432,12 @@ export function EmailBody({
ref={frame}
title={'Message from ' + (message.from[0]?.name || message.from[0]?.email || 'sender')}
sandbox="allow-same-origin"
- className={'email-frame' + (adaptive ? ' email-frame-adaptive' : '')}
+ className={cn(
+ 'email-frame [color-scheme:light] w-full border-0 block min-h-10',
+ adaptive
+ ? 'email-frame-adaptive [color-scheme:inherit] bg-transparent rounded-none'
+ : 'bg-white rounded-lg',
+ )}
referrerPolicy="no-referrer"
onLoad={onFrameLoad}
onError={() => {
@@ -442,7 +448,17 @@ export function EmailBody({
/>
)}
{loading && (
- <div className="body-skeleton" aria-label="Loading message" role="status">
+ <div
+ className={cn(
+ 'body-skeleton [&_span]:block [&_span]:h-2.5 [&_span]:rounded-sm',
+ '[&_span]:bg-[linear-gradient(_90deg,_var(--skeleton)_0%,_color-mix(in_srgb,_var(--skeleton)_45%,_transparent)_50%,_var(--skeleton)_100%_)]',
+ '[&_span]:[background-size:200%_100%] [&_span]:animate-[shimmer_1.4s_ease-in-out_infinite]',
+ '[&_span:nth-child(1)]:w-[32%] [&_span:nth-child(2)]:w-[92%] [&_span:nth-child(3)]:w-[84%]',
+ '[&_span:nth-child(4)]:w-[58%] grid gap-3 pt-1.5 pb-2.5 px-0',
+ )}
+ aria-label="Loading message"
+ role="status"
+ >
<span />
<span />
<span />
@@ -451,12 +467,20 @@ export function EmailBody({
)}
{!frameReady && !loading && (
<>
- <div className="email-fallback">
+ <div className="email-fallback font-sans text-[15px] leading-[1.7] [overflow-wrap:anywhere] pt-[2px] pb-1 px-0 text-foreground whitespace-pre-wrap">
{(message.text?.trim() ? message.text : message.preview?.trim()) ||
'No readable message body is available.'}
</div>
{renderIssue && (
- <details className="email-render-details">
+ <details
+ className={cn(
+ 'email-render-details [&_summary]:cursor-pointer [&_p]:my-2 [&_p]:mx-0 [&_pre]:max-h-55 [&_pre]:p-3',
+ '[&_pre]:overflow-auto [&_pre]:border [&_pre]:border-solid [&_pre]:border-border [&_pre]:rounded-md',
+ '[&_pre]:select-text [&_pre]:whitespace-pre-wrap [&_button]:mr-2.5 [&_button]:py-1.25 [&_button]:px-2',
+ '[&_button]:border [&_button]:border-solid [&_button]:border-border [&_button]:rounded-sm',
+ '[&_button]:bg-transparent [&_button]:text-inherit [&_button]:cursor-pointer mt-3 text-muted text-[12px]',
+ )}
+ >
<summary>HTML rendering details</summary>
<p>
Review these details before sharing them. Error text can contain message
@@ -520,7 +544,11 @@ function UnsubscribeButton({ state, onClick }: { state: UnsubscribeState; onClic
render={
<Button
variant="ghost"
- className={'unsubscribe-button unsubscribe-' + state}
+ className={cn(
+ 'unsubscribe-button min-h-7.25 h-7.25 py-0 pr-2.5 pl-2 gap-1.5 [&_svg]:shrink-0 disabled:opacity-100 @max-[440px]/mail:w-7.25 @max-[440px]/mail:p-1.25 @max-[440px]/mail:[&_span]:hidden unsubscribe-' +
+ state,
+ state === 'pending' ? ' text-muted' : state === 'done' ? ' text-success' : '',
+ )}
aria-label={
state === 'available'
? 'Unsubscribe from this mailing list'
@@ -543,7 +571,7 @@ function UnsubscribeButton({ state, onClick }: { state: UnsubscribeState; onClic
</Tooltip.Trigger>
<Tooltip.Portal>
<Tooltip.Positioner sideOffset={7}>
- <Tooltip.Popup className="tooltip">
+ <Tooltip.Popup className="tooltip flex gap-3 items-center py-1.5 px-2.25 bg-raised border border-solid border-border-strong rounded-md text-[11px] shadow-popup z-200">
Unsubscribe from this mailing list
<ShortcutHint id="unsubscribe" />
</Tooltip.Popup>
@@ -642,11 +670,18 @@ export function Reader({
...new Set(history.flatMap((m) => m.from.map((a) => a.name || a.email.split('@')[0]))),
]
return (
- <div className="reader-page">
- <div className="reader-toolbar">
+ <div className="reader-page flex-1 flex flex-col min-h-0 relative">
+ <div
+ className={cn(
+ 'reader-toolbar h-14.25 border-b border-solid border-b-border flex items-center py-0 px-5 gap-1.25 shrink-0',
+ '@max-[680px]/mail:py-0 @max-[680px]/mail:px-4 @max-[680px]/mail:gap-[2px] @max-[440px]/mail:py-0',
+ '@max-[440px]/mail:px-2.5 @max-[440px]/mail:[&>.toolbar-divider]:my-0',
+ '@max-[440px]/mail:[&>.toolbar-divider]:mx-[2px]',
+ )}
+ >
<Button
variant="ghost"
- className="reader-back"
+ className="reader-back [&_span]:overflow-hidden [&_span]:text-ellipsis @max-[680px]/mail:[&_span]:hidden max-w-45 -ml-1.5"
aria-label={'Back to ' + backLabel.toLowerCase()}
onClick={onBack}
title={'Back' + (keys('back') ? ' Β· ' + keys('back') : '')}
@@ -654,7 +689,7 @@ export function Reader({
<ArrowLeft size={16} />
<span>{backLabel}</span>
</Button>
- <span className="toolbar-divider" />
+ <span className="toolbar-divider w-[1px] h-4.25 bg-border-strong my-0 mx-1" />
{offersAction(view, 'archive') && (
<HintIconButton
disabled={busy}
@@ -692,7 +727,7 @@ export function Reader({
shortcut={keys('star')}
onClick={() => onAction(starred ? 'unstar' : 'star')}
>
- <Star size={16} className={starred ? 'starred' : ''} />
+ <Star size={16} className={cn(starred && 'starred [&:is(svg)]:fill-current text-star')} />
</IconButton>
<Dropdown
trigger={
@@ -709,27 +744,27 @@ export function Reader({
<MenuItem onClick={onMove} disabled={!!moveLimit}>
<FolderInput size={14} />
Move to folder
- <ShortcutHint id="move" className="menu-shortcut" />
+ <ShortcutHint id="move" className="menu-shortcut ml-auto" />
</MenuItem>
{offersAction(view, 'spam') && (
<MenuItem onClick={() => onAction('spam')} disabled={!!moveLimit}>
<ShieldX size={14} />
Mark as spam
- <ShortcutHint id="spam" className="menu-shortcut" />
+ <ShortcutHint id="spam" className="menu-shortcut ml-auto" />
</MenuItem>
)}
{offersAction(view, 'notSpam') && (
<MenuItem onClick={() => onAction('notSpam')} disabled={!!moveLimit}>
<ShieldCheck size={14} />
Not spam
- <ShortcutHint id="notSpam" className="menu-shortcut" />
+ <ShortcutHint id="notSpam" className="menu-shortcut ml-auto" />
</MenuItem>
)}
{offersAction(view, 'restore') && (
<MenuItem onClick={() => onAction('restore')} disabled={!!moveLimit}>
<Inbox size={14} />
Restore to inbox
- <ShortcutHint id="restore" className="menu-shortcut" />
+ <ShortcutHint id="restore" className="menu-shortcut ml-auto" />
</MenuItem>
)}
{offersAction(view, 'destroy') && (
@@ -741,18 +776,27 @@ export function Reader({
{[...new Set([moveLimit, offersAction(view, 'destroy') && destroyLimit])]
.filter(Boolean)
.map((reason) => (
- <p className="menu-note" key={String(reason)}>
+ <p
+ className="menu-note max-w-60 mt-1 mb-0 mx-0 pt-1.75 pb-1.25 px-2.5 border-t border-solid border-t-border text-[11px] leading-[1.5] text-muted"
+ key={String(reason)}
+ >
{reason}
</p>
))}
</Dropdown>
{unsubscribe && (
<>
- <span className="toolbar-divider" />
+ <span className="toolbar-divider w-[1px] h-4.25 bg-border-strong my-0 mx-1" />
<UnsubscribeButton state={unsubscribe} onClick={onUnsubscribe} />
</>
)}
- <div className="reader-navigation">
+ <div
+ className={cn(
+ 'reader-navigation ml-auto flex gap-1.5 items-center [&>span]:text-[11px] [&>span]:text-muted [&>span]:mr-2.5',
+ '[&>span]:tabular-nums [&>span]:whitespace-nowrap @max-[680px]/mail:gap-[2px] @max-[680px]/mail:[&>span]:mr-1',
+ '@max-[440px]/mail:[&>span]:text-[10px]',
+ )}
+ >
<span role="status">{busy ? 'Updating…' : position}</span>
<IconButton
label="Previous conversation"
@@ -772,9 +816,21 @@ export function Reader({
</IconButton>
</div>
</div>
- <div className="reader-scroll" ref={scroller} tabIndex={-1}>
- <div className="reader-content">
- <div className="reader-eyebrow">
+ <div
+ className="reader-scroll flex-1 overflow-auto focus-visible:outline-none"
+ ref={scroller}
+ tabIndex={-1}
+ >
+ <div
+ className={cn(
+ 'reader-content w-[min(840px,_100%)] my-0 mx-auto pt-10 pb-12 px-10 [&_h1]:text-[27px] [&_h1]:font-[550]',
+ '[&_h1]:tracking-[-0.7px] [&_h1]:leading-[1.4] [&_h1]:mt-3.5 [&_h1]:mb-7.5 [&_h1]:mx-0',
+ '[&_h1]:[overflow-wrap:anywhere] @max-[680px]/mail:py-7 @max-[680px]/mail:px-6.5',
+ '@max-[680px]/mail:[&_h1]:text-[24px] @max-[680px]/mail:[&_h1]:mb-6 @max-[440px]/mail:py-6.5',
+ '@max-[440px]/mail:px-5',
+ )}
+ >
+ <div className="reader-eyebrow [&>span:last-child]:text-muted flex gap-2.25 items-center text-[11px] text-secondary">
<AccountMark account={account} size={16} />
<span title={account.email}>{account.name}</span>
<ChevronRight size={11} />
@@ -792,7 +848,18 @@ export function Reader({
{[...history, ...drafts].map((message) => {
if (foldedIds.has(message.id))
return message.id === folded[0].id ? (
- <button key="folded" className="folded-messages" onClick={() => setShowAll(true)}>
+ <button
+ key="folded"
+ className={cn(
+ 'folded-messages [&_span]:absolute [&_span]:-top-2.75 [&_span]:py-[2px] [&_span]:px-2.5 [&_span]:text-[11px]',
+ '[&_span]:text-muted [&_span]:bg-background [&_span]:border [&_span]:border-solid [&_span]:border-border-strong',
+ '[&_span]:rounded-[11px] [&_span]:transition-[color,border-color] [&_span]:duration-120 [&_span]:ease-[ease]',
+ '[&:hover_span]:text-foreground [&:hover_span]:border-foreground/30 [&+.message-card]:border-t-0',
+ '[&+.message-card]:pt-0 relative flex justify-center w-full h-8.5 m-0 p-0 border-0 border-t border-solid',
+ 'border-t-border-strong bg-none bg-transparent',
+ )}
+ onClick={() => setShowAll(true)}
+ >
<span>{folded.length} earlier messages</span>
</button>
) : null
@@ -805,17 +872,22 @@ export function Reader({
message.attachments?.filter((a) => !a.cid || a.disposition === 'attachment') || []
return (
<article
- className={
- 'message-card' +
- (draft ? ' draft-message' : '') +
- (!open ? ' collapsed-message' : '')
- }
+ className={cn(
+ 'message-card py-6 px-0 border-t border-solid border-t-border-strong',
+ draft &&
+ 'draft-message mt-1.5 mb-0 -mx-5 pt-4.5 pb-5 px-5 border border-dashed border-foreground/22 rounded-xl [&+.draft-message]:mt-2.5 [&.collapsed-message]:pt-3.5 [&.collapsed-message]:pb-3.5 [&.collapsed-message_.message-heading]:opacity-100 [&_.sender-name]:flex [&_.sender-name]:items-center [&_.sender-name]:gap-2 [&_.sender-name]:text-secondary [&_.sender-name]:font-medium [&_.message-content]:pt-4.5',
+ !open &&
+ 'collapsed-message [&_.message-heading]:opacity-70 py-4.5 px-0 [&:hover_.message-heading]:opacity-100',
+ )}
aria-label={draft ? 'Draft, not sent' : undefined}
key={message.id}
>
- <div className="message-heading">
+ <div className="message-heading flex gap-3 items-center [&_time]:text-muted [&_time]:text-[11px] [&_time]:whitespace-nowrap @max-[680px]/mail:gap-2.25 @max-[680px]/mail:[&_time_span]:hidden">
{draft ? (
- <span className="draft-mark" aria-hidden="true">
+ <span
+ className="draft-mark grid place-items-center w-8.75 h-8.75 shrink-0 border border-dashed border-foreground/28 rounded-full text-muted"
+ aria-hidden="true"
+ >
<PencilEdit size={16} />
</span>
) : (
@@ -828,23 +900,27 @@ export function Reader({
/>
)}
<button
- className="message-person"
+ className="message-person flex flex-col min-w-0 flex-1 items-start text-left bg-none bg-transparent border-0 p-0 disabled:cursor-default disabled:opacity-100"
onClick={() => toggle(message.id, setExpanded)}
aria-expanded={open}
disabled={messages.length === 1}
>
{draft ? (
- <span className="sender-name">
- <span className="draft-badge">Draft</span>
+ <span className="sender-name text-[13px] font-[550] max-w-full overflow-hidden text-ellipsis">
+ <span className="draft-badge py-0 px-1.5 rounded-xs bg-draft/14 text-draft text-[11px] font-[550] leading-[18px]">
+ Draft
+ </span>
Not sent yet
</span>
) : (
- <span className="sender-name">
+ <span className="sender-name text-[13px] font-[550] max-w-full overflow-hidden text-ellipsis">
{sender?.name || sender?.email}
- <span className="sender-address">{sender?.name ? sender.email : ''}</span>
+ <span className="sender-address font-normal text-[11px] text-muted ml-2 @max-[900px]/mail:hidden">
+ {sender?.name ? sender.email : ''}
+ </span>
</span>
)}
- <span className="message-to">
+ <span className="message-to text-muted text-[11px] mt-[3px] whitespace-nowrap overflow-hidden text-ellipsis max-w-full">
{!open
? message.preview
: recipients.length
@@ -855,7 +931,10 @@ export function Reader({
</span>
</button>
{!!message.attachments?.length && !open && (
- <Paperclip size={13} className="message-attachment-hint" />
+ <Paperclip
+ size={13}
+ className="message-attachment-hint text-muted shrink-0"
+ />
)}
<time dateTime={message.receivedAt} title={longDate(message.receivedAt)}>
{draft && 'Saved '}
@@ -870,13 +949,22 @@ export function Reader({
>
<ChevronDown
size={13}
- className={'details-chevron' + (details.has(message.id) ? ' open' : '')}
+ className={cn(
+ 'details-chevron transition-[transform] duration-140 ease-[ease] [&.open]:transform-[rotate(180deg)]',
+ details.has(message.id) && 'open',
+ )}
/>
</IconButton>
)}
</div>
{details.has(message.id) && (
- <dl className="message-details">
+ <dl
+ className={cn(
+ 'message-details grid grid-cols-[70px_1fr] gap-1.5 py-3.5 px-4 mt-4 mb-0 mr-0 ml-11.75 bg-surface rounded-[7px]',
+ 'text-[11px] [&_dt]:text-muted [&_dd]:m-0 [&_dd]:[overflow-wrap:anywhere] [&+.message-content]:pt-4.5',
+ '@max-[680px]/mail:ml-0',
+ )}
+ >
<dt>From</dt>
<dd>{message.from.map(formatAddress).join(', ')}</dd>
{message.replyTo.length > 0 && (
@@ -904,7 +992,7 @@ export function Reader({
</dl>
)}
{open && (
- <div className="message-content">
+ <div className="message-content pt-6 pb-[2px] pr-0 pl-11.75 @max-[680px]/mail:pl-0">
<EmailBody
message={message}
remoteImages={settings.remoteImages}
@@ -913,13 +1001,24 @@ export function Reader({
onMailto={onMailto}
/>
{attachments.length > 0 && (
- <div className="attachment-list">
+ <div className="attachment-list flex gap-2.5 flex-wrap mt-5">
{attachments.map((attachment) => {
const Icon = attachmentIcon(attachment.type, attachment.name)
return (
- <div className="attachment-card" key={attachment.blobId}>
+ <div
+ className={cn(
+ 'attachment-card flex items-center border border-solid border-border-strong rounded-lg p-2.75 max-w-full',
+ 'bg-surface [&>button:not(.button)]:border-0 [&>button:not(.button)]:bg-none',
+ '[&>button:not(.button)]:bg-transparent [&>button:not(.button)]:text-left [&>button:not(.button)]:p-0',
+ '[&>button:not(.button)]:min-w-0 [&_strong]:block [&_strong]:overflow-hidden [&_strong]:text-ellipsis',
+ '[&_strong]:whitespace-nowrap [&_strong]:text-[11px] [&_strong]:font-medium [&_span]:text-muted',
+ '[&_span]:text-[11px] py-1.5 pr-1.5 pl-2 gap-1 transition-[border-color] duration-120 ease-[ease]',
+ 'hover:border-foreground/22',
+ )}
+ key={attachment.blobId}
+ >
<button
- className="attachment-open"
+ className="attachment-open flex items-center gap-2.5 min-w-0 max-w-65 py-[3px] pr-1 pl-0 border-0 bg-none bg-transparent text-left"
title={'Open ' + attachment.name}
onClick={() =>
void api
@@ -927,10 +1026,10 @@ export function Reader({
.catch((e) => notify(friendlyError(e), 'error'))
}
>
- <span className="attachment-icon">
+ <span className="attachment-icon grid place-items-center w-8.5 h-8.5 shrink-0 p-0 rounded-[7px] text-primary bg-primary-tint">
<Icon size={18} strokeWidth={1.6} />
</span>
- <span className="attachment-label">
+ <span className="attachment-label [&>span]:block [&>span]:mt-[1px] min-w-0">
<strong>{attachment.name}</strong>
<span>
{extension(attachment.name)} Β· {formatBytes(attachment.size)}
@@ -953,7 +1052,7 @@ export function Reader({
</div>
)}
{draft && (
- <div className="draft-message-actions">
+ <div className="draft-message-actions flex gap-1.5 mt-4">
<Button onClick={() => onEditDraft(message)}>
<PencilEdit size={14} />
Continue editing
@@ -971,15 +1070,29 @@ export function Reader({
})}
</div>
{last && (
- <div className="reply-panel">
- <button className="reply-prompt" onClick={() => onReply(last, 'reply')}>
+ <div
+ className={cn(
+ 'reply-panel mt-3 mb-0 mr-0 ml-11.75 border border-solid border-border-strong rounded-xl',
+ 'bg-[color-mix(in_srgb,_var(--surface)_45%,_var(--bg))] overflow-hidden @max-[680px]/mail:ml-0',
+ )}
+ >
+ <button
+ className={cn(
+ 'reply-prompt flex items-center gap-3.25 w-full bg-none bg-transparent border-0 text-left p-5 text-muted',
+ 'hover:bg-hover [&>span:not(.shortcut-keys)]:flex-1 [&>span:not(.shortcut-keys)]:min-w-0 [&_strong]:block',
+ '[&_strong]:text-foreground [&_strong]:text-[13px] [&_strong]:font-medium [&_strong]:overflow-hidden',
+ '[&_strong]:text-ellipsis [&_strong]:whitespace-nowrap [&_span_span]:block [&_span_span]:text-[12px]',
+ '[&_span_span]:mt-1',
+ )}
+ onClick={() => onReply(last, 'reply')}
+ >
<Reply size={17} />
<span>
<strong>Reply to {last.from[0]?.name || last.from[0]?.email || 'sender'}</strong>
</span>
<ShortcutHint id="reply" />
</button>
- <div className="reply-bar">
+ <div className="reply-bar flex gap-2.5 pt-0 pb-3 pr-3.5 pl-11.25 [&_.button]:text-[11px] @max-[680px]/mail:pl-11 [&_kbd]:ml-[2px] [&_kbd]:h-4 [&_kbd]:min-w-4 [&_kbd]:text-[9px]">
<Button variant="ghost" onClick={() => onReply(last, 'replyAll')}>
<ReplyAll size={14} />
Reply all
@@ -996,7 +1109,14 @@ export function Reader({
</div>
</div>
{link && (
- <div className="link-status" aria-hidden="true">
+ <div
+ className={cn(
+ 'link-status shadow-[0_4px_14px_#0003] absolute left-3 bottom-3 max-w-[min(640px,_calc(100%_-_24px))] py-1.25',
+ 'px-2.25 overflow-hidden text-ellipsis whitespace-nowrap text-[11px] text-secondary bg-raised border',
+ 'border-solid border-border-strong rounded-md pointer-events-none z-5',
+ )}
+ aria-hidden="true"
+ >
{link}
</div>
)}
diff --git a/apps/desktop/src/renderer/src/RecipientField.tsx b/apps/desktop/src/renderer/src/RecipientField.tsx
index 2c04bb2..073065d 100644
--- a/apps/desktop/src/renderer/src/RecipientField.tsx
+++ b/apps/desktop/src/renderer/src/RecipientField.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { useId, useRef, useState, type ReactNode } from 'react'
import { X } from '@inlark/ui/icons'
import { parseAddresses, type Address } from '@inlark/core'
@@ -72,13 +73,40 @@ export function RecipientField({
const showing = open && matches.length > 0
const highlighted = Math.min(active, matches.length - 1)
return (
- <div className="compose-field recipient-field" onClick={() => input.current?.focus()}>
+ <div
+ className={cn(
+ 'compose-field flex items-center min-h-10.5 border-b border-solid border-b-border gap-2.75 [&>label]:w-10.75',
+ '[&>label]:shrink-0 [&>label]:text-[11px] [&>label]:text-muted [&>span]:w-10.75 [&>span]:shrink-0',
+ '[&>span]:text-[11px] [&>span]:text-muted [&_input]:flex-1 [&_input]:border-0 [&_input]:py-1.75 [&_input]:px-0',
+ '[&_input]:bg-none [&_input]:bg-transparent [&_input]:text-[12px] [&_input]:min-w-0 [&>.select-trigger]:flex-1',
+ '[&>.select-trigger]:h-8 [&>.select-trigger]:py-0 [&>.select-trigger]:pr-1 [&>.select-trigger]:pl-0',
+ '[&>.select-trigger]:border-0 [&>.select-trigger]:bg-none [&>.select-trigger]:bg-transparent',
+ '[&>.select-trigger]:text-foreground [&>.select-trigger]:text-[12px] [&>.select-trigger]:whitespace-normal',
+ '[&>.select-trigger:hover:not([data-disabled])]:bg-none',
+ '[&>.select-trigger:hover:not([data-disabled])]:bg-transparent [&>button]:text-[11px] [&>button]:bg-none',
+ '[&>button]:bg-transparent [&>button]:border-0 [&>button]:text-muted [&>button]:whitespace-nowrap',
+ '[&_.subject-input]:font-medium [&_input:focus-visible]:outline-none',
+ '[&>.select-trigger:focus-visible]:outline-none focus-within:border-b-primary-solid',
+ '[&>.compose-cc-toggle]:self-start [&>.compose-cc-toggle]:mt-2.25 [&>.compose-cc-toggle]:py-0',
+ '[&>.compose-cc-toggle]:px-[2px] [&>.compose-cc-toggle:hover]:text-foreground recipient-field relative',
+ 'cursor-text py-1 px-0',
+ )}
+ onClick={() => input.current?.focus()}
+ >
<label htmlFor={id}>{label}</label>
- <div className="recipient-chips">
+ <div className="recipient-chips [&_input]:flex-1 [&_input]:min-w-30 [&_input]:py-1.25 [&_input]:px-0 flex-1 min-w-0 flex flex-wrap items-center gap-1">
{chips.map((chip, i) => (
<span
key={chip.email + i}
- className={'recipient-chip' + (valid(chip.email) ? '' : ' invalid')}
+ className={cn(
+ 'recipient-chip inline-flex items-center gap-[3px] h-6 max-w-65 py-0 pr-1 pl-2 overflow-hidden text-[12px]',
+ 'whitespace-nowrap text-ellipsis text-foreground bg-hover border border-solid border-border-strong rounded-2xl',
+ 'cursor-default [&.invalid]:text-danger [&.invalid]:border-danger/45 [&.invalid]:bg-danger/8 [&_button]:grid',
+ '[&_button]:place-items-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border-0',
+ '[&_button]:rounded-full [&_button]:bg-none [&_button]:bg-transparent [&_button]:text-muted',
+ '[&_button:hover]:text-strong [&_button:hover]:bg-border-strong',
+ valid(chip.email) ? '' : ' invalid',
+ )}
title={valid(chip.email) ? chip.email : chip.email + ' is not a valid address'}
onDoubleClick={() => {
if (disabled) return
@@ -168,7 +196,20 @@ export function RecipientField({
</div>
{children}
{showing && (
- <div className="recipient-suggestions" role="listbox" id={listId}>
+ <div
+ className={cn(
+ 'recipient-suggestions [&_button]:flex [&_button]:items-center [&_button]:gap-2.5 [&_button]:w-full',
+ '[&_button]:py-1.5 [&_button]:px-2 [&_button]:text-left [&_button]:border-0 [&_button]:rounded-sm',
+ '[&_button]:bg-none [&_button]:bg-transparent [&_button.active]:bg-hover [&_span:not(.avatar)]:min-w-0',
+ '[&_strong]:block [&_strong]:overflow-hidden [&_strong]:text-ellipsis [&_strong]:whitespace-nowrap',
+ '[&_small]:block [&_small]:overflow-hidden [&_small]:text-ellipsis [&_small]:whitespace-nowrap',
+ '[&_strong]:text-[12px] [&_strong]:font-medium [&_small]:text-[11px] [&_small]:text-muted absolute z-5',
+ 'top-[calc(100%+4px)] left-10.75 w-[min(360px,_calc(100%_-_43px))] p-1 bg-raised border border-solid',
+ 'border-border-strong rounded-lg shadow-popup',
+ )}
+ role="listbox"
+ id={listId}
+ >
{matches.map((match, i) => (
<button
type="button"
@@ -176,7 +217,7 @@ export function RecipientField({
id={listId + '-' + i}
role="option"
aria-selected={i === highlighted}
- className={i === highlighted ? 'active' : ''}
+ className={cn(i === highlighted && 'active')}
tabIndex={-1}
onMouseDown={(event) => event.preventDefault()}
onMouseMove={() => setActive(i)}
diff --git a/apps/desktop/src/renderer/src/SegmentedControl.tsx b/apps/desktop/src/renderer/src/SegmentedControl.tsx
index 563b6d8..788923b 100644
--- a/apps/desktop/src/renderer/src/SegmentedControl.tsx
+++ b/apps/desktop/src/renderer/src/SegmentedControl.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { useId } from 'react'
/**
@@ -24,13 +25,24 @@ export function SegmentedControl<Value extends string>({
<div
role="radiogroup"
aria-label={label}
- className={'segmented' + (className ? ' ' + className : '')}
+ className={cn(
+ 'segmented inline-flex p-[2px] gap-[2px] border border-solid border-border-strong rounded-[7px] bg-field',
+ 'data-disabled:opacity-50',
+ className,
+ )}
data-disabled={disabled || undefined}
>
{options.map((option) => (
<label
key={option.value}
- className={'segmented-option' + (option.value === value ? ' chosen' : '')}
+ className={cn(
+ 'segmented-option has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-solid',
+ 'has-[:focus-visible]:outline-primary has-[:focus-visible]:outline-offset-2 inline-flex',
+ 'items-center h-7.5 py-0 px-2.75 rounded-sm text-[12px] text-muted whitespace-nowrap cursor-pointer',
+ 'transition-[background,color] duration-120 ease-[ease] hover:text-foreground',
+ option.value === value &&
+ 'chosen bg-selected text-strong hover:text-strong font-medium shadow-[0_1px_2px_#0000001a]',
+ )}
>
<input
type="radio"
diff --git a/apps/desktop/src/renderer/src/SendingStatus.tsx b/apps/desktop/src/renderer/src/SendingStatus.tsx
index b63f72b..4f74100 100644
--- a/apps/desktop/src/renderer/src/SendingStatus.tsx
+++ b/apps/desktop/src/renderer/src/SendingStatus.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { useState } from 'react'
import { AlertCircle, Check, RefreshCw, Send } from '@inlark/ui/icons'
import { Button, Modal, Spinner } from '@inlark/ui'
@@ -182,16 +183,30 @@ export function SubmissionList({
)
}
return (
- <section className="submissions" aria-labelledby="submissions-title">
- <h2 className="draft-section-label" id="submissions-title">
+ <section
+ className="submissions border-b border-solid border-b-border pb-1.5"
+ aria-labelledby="submissions-title"
+ >
+ <h2
+ className="draft-section-label m-0 pt-4.5 pb-1.5 px-8 text-[11px] font-medium text-muted @max-[680px]/mail:pl-5 @max-[680px]/mail:pr-5"
+ id="submissions-title"
+ >
Needs attention
</h2>
{submissions.map((s) => {
const account = accounts.find((a) => a.id === s.accountId)
const text = describe(s)
return (
- <div className={'submission submission-' + text.tone} key={s.draftId}>
- <span className="submission-icon" aria-hidden="true">
+ <div
+ className={cn(
+ 'submission flex gap-4 items-start py-3.5 px-8 [&+.submission]:border-t [&+.submission]:border-solid',
+ '[&+.submission]:border-t-border [&_time]:shrink-0 [&_time]:text-[11px] [&_time]:text-muted',
+ '@max-[680px]/mail:pl-5 @max-[680px]/mail:pr-5 submission-',
+ text.tone,
+ )}
+ key={s.draftId}
+ >
+ <span className="submission-icon flex mt-[1px] text-muted" aria-hidden="true">
{s.state === 'uncertain' ? (
<AlertCircle size={16} />
) : s.state === 'partial' ? (
@@ -202,19 +217,21 @@ export function SubmissionList({
<Check size={16} />
)}
</span>
- <div className="submission-text">
+ <div className="submission-text [&_strong]:block [&_strong]:text-[13px] [&_strong]:font-medium [&_strong]:text-foreground flex-1 min-w-0">
<strong>{s.subject || '(No subject)'}</strong>
- <span className="submission-state">
+ <span className="submission-state flex flex-wrap items-center gap-[4px_12px] mt-[3px] text-[12px] text-secondary">
{text.state}
{account && (
- <span className="submission-account">
+ <span className="submission-account inline-flex items-center gap-1.5 text-[11px] text-muted">
<AccountMark account={account} size={14} />
{account.name}
</span>
)}
</span>
- <span className="submission-detail">{text.detail}</span>
- <div className="submission-actions">{actions(s)}</div>
+ <span className="submission-detail [overflow-wrap:anywhere] block mt-1 max-w-140 text-[11px] leading-[1.6] text-muted">
+ {text.detail}
+ </span>
+ <div className="submission-actions flex flex-wrap gap-1.5 mt-2.5">{actions(s)}</div>
</div>
<time dateTime={s.at} title={new Date(s.at).toLocaleString()}>
{shortDate(s.at)}
@@ -234,11 +251,16 @@ export function SubmissionList({
'” was delivered. If it was, recipients will receive it twice.'
}
>
- <p className="modal-body-text">
+ <p className="modal-body-text m-0 text-[12px] leading-[1.6] text-secondary">
The replacement opens as a new draft for you to review. Nothing is sent until you choose
Send. The unconfirmed message stays listed here, so you can still check it.
</p>
- <div className="modal-actions">
+ <div
+ className={cn(
+ 'modal-actions flex justify-end gap-2 mt-6 [&>.modal-action-start]:mr-auto [&>.modal-action-start]:-ml-2.5',
+ '[&>.modal-action-start]:text-muted [&>.modal-action-start:hover:not(:disabled)]:text-danger',
+ )}
+ >
<Button onClick={() => setReplace(undefined)}>Cancel</Button>
<Button
variant="primary"
@@ -267,7 +289,12 @@ export function SubmissionList({
'” was delivered and remove its unconfirmed draft from this device. Look in Sent first if you’re unsure.'
}
>
- <div className="modal-actions">
+ <div
+ className={cn(
+ 'modal-actions flex justify-end gap-2 mt-6 [&>.modal-action-start]:mr-auto [&>.modal-action-start]:-ml-2.5',
+ '[&>.modal-action-start]:text-muted [&>.modal-action-start:hover:not(:disabled)]:text-danger',
+ )}
+ >
<Button onClick={() => setDismiss(undefined)}>Keep tracking</Button>
<Button
variant="danger"
diff --git a/apps/desktop/src/renderer/src/Settings.tsx b/apps/desktop/src/renderer/src/Settings.tsx
index 1a6f330..eaecc4a 100644
--- a/apps/desktop/src/renderer/src/Settings.tsx
+++ b/apps/desktop/src/renderer/src/Settings.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { useEffect, useRef, useState } from 'react'
import { Wordmark } from '@inlark/ui/components/wordmark'
import appIcon from '../../../resources/icon.svg?no-inline'
@@ -37,17 +38,28 @@ import { ShortcutEditor } from './ShortcutEditor'
/** A miniature of the app window in one theme. */
function ThemePreview({ theme, className }: { theme: 'dark' | 'light'; className?: string }) {
return (
- <span className={'mini-window mini-window-' + theme + (className ? ' ' + className : '')}>
- <span className="mini-sidebar">
- <span className="mini-nav active" />
- <span className="mini-nav" />
- <span className="mini-nav" />
+ <span
+ className={cn(
+ 'mini-window [--w-bg:#171718] [--w-sidebar:#111112] [--w-border:#ffffff12] [--w-line:#ffffff17]',
+ '[--w-nav:#ffffff12] [--w-accent:#aaa6ec] inset-0 absolute grid grid-cols-[30%_1fr] bg-[var(--w-sidebar)]',
+ theme === 'light' &&
+ 'mini-window-light [--w-bg:#ffffff] [--w-sidebar:#f2f3f5] [--w-border:#17191f14] [--w-line:#17191f17] [--w-nav:#17191f12] [--w-accent:#6962c1]',
+ className,
+ )}
+ >
+ <span className="mini-sidebar flex flex-col gap-[7%] py-[18%] px-[14%]">
+ <span className="mini-nav h-1.25 rounded-[2px] bg-[var(--w-nav)] [&.active]:bg-[color-mix(in_srgb,_var(--w-accent)_45%,_transparent)] last:w-[70%] active" />
+ <span className="mini-nav h-1.25 rounded-[2px] bg-[var(--w-nav)] [&.active]:bg-[color-mix(in_srgb,_var(--w-accent)_45%,_transparent)] last:w-[70%]" />
+ <span className="mini-nav h-1.25 rounded-[2px] bg-[var(--w-nav)] [&.active]:bg-[color-mix(in_srgb,_var(--w-accent)_45%,_transparent)] last:w-[70%]" />
</span>
- <span className="mini-list">
+ <span className="mini-list shadow-[0_0_0_1px_var(--w-border)] flex flex-col gap-[12%] mt-[10%] pt-[12%] pb-0 px-[12%] rounded-tl-[6px] bg-[var(--w-bg)]">
{[0, 1, 2].map((row) => (
- <span className="mini-row" key={row}>
- <span className="mini-avatar" />
- <span className="mini-line" />
+ <span
+ className="mini-row [&:nth-child(2)_.mini-line]:flex-[0_1_70%] [&:nth-child(3)_.mini-line]:flex-[0_1_85%] flex items-center gap-[8%]"
+ key={row}
+ >
+ <span className="mini-avatar w-2.25 h-2.25 shrink-0 rounded-full bg-[color-mix(in_srgb,_var(--w-accent)_60%,_transparent)]" />
+ <span className="mini-line flex-1 h-1.25 rounded-[2px] bg-[var(--w-line)]" />
</span>
))}
</span>
@@ -70,7 +82,7 @@ function AccountDetailsForm({
const [saving, setSaving] = useState(false)
return (
<form
- className="account-details-form"
+ className="account-details-form [&_.form-field]:mt-0 grid grid-cols-[1fr_1fr] gap-[0_14px] -mt-1 mb-0 mx-0 pt-0 pb-4.5 pr-0 pl-11.5"
onSubmit={async (e) => {
e.preventDefault()
setSaving(true)
@@ -89,7 +101,7 @@ function AccountDetailsForm({
}
}}
>
- <label className="form-field">
+ <label className="form-field mt-3.75 [&_input]:mt-1.5 [&_input]:text-[12px] [&_input[aria-invalid='true']]:border-danger/70">
Label
<input
autoFocus
@@ -98,9 +110,9 @@ function AccountDetailsForm({
placeholder="Personal"
onChange={(e) => setName(e.target.value)}
/>
- <span className="field-hint">Only you see this.</span>
+ <span className="field-hint text-muted text-[11px] block mt-1.25">Only you see this.</span>
</label>
- <label className="form-field">
+ <label className="form-field mt-3.75 [&_input]:mt-1.5 [&_input]:text-[12px] [&_input[aria-invalid='true']]:border-danger/70">
Your name
<input
value={senderName}
@@ -109,14 +121,14 @@ function AccountDetailsForm({
placeholder="Jane Doe"
onChange={(e) => setSenderName(e.target.value)}
/>
- <span className="field-hint">
+ <span className="field-hint text-muted text-[11px] block mt-1.25">
Recipients see{' '}
- <span className="sender-preview">
+ <span className="sender-preview [overflow-wrap:anywhere] text-secondary">
{(senderName.trim() || 'Your server’s name') + ' <' + account.email + '>'}
</span>
</span>
</label>
- <div className="account-details-actions">
+ <div className="account-details-actions col-span-full flex justify-end gap-2 mt-3.5">
<Button size="small" onClick={onDone}>
Cancel
</Button>
@@ -202,11 +214,25 @@ export function SettingsPanel({
if (!value) onClose()
}}
title="Settings"
- className="settings-modal"
+ className={cn(
+ 'settings-modal [&>.modal-heading]:absolute [&>.modal-heading]:inset-x-0 [&>.modal-heading]:top-0',
+ '[&>.modal-heading]:z-1 [&>.modal-heading]:items-center [&>.modal-heading]:m-0 [&>.modal-heading]:pt-3.5',
+ '[&>.modal-heading]:pb-0 [&>.modal-heading]:pr-3.5 [&>.modal-heading]:pl-5',
+ '[&>.modal-heading]:pointer-events-none [&>.modal-heading>*]:pointer-events-auto [&_.modal-title]:text-[12px]',
+ '[&_.modal-title]:font-medium [&_.modal-title]:tracking-[0] [&_.modal-title]:text-muted',
+ '[&>.modal-heading>.button]:text-muted max-[700px]:[&>.modal-heading]:pl-4 w-[min(880px,_calc(100vw_-_40px))]',
+ 'p-0 overflow-visible',
+ )}
popupRef={modalRef}
>
- <div className="settings-layout">
- <nav className="settings-nav" aria-label="Settings sections">
+ <div className="settings-layout flex min-h-0 h-[min(620px,_calc(100dvh_-_80px))] overflow-hidden rounded-[inherit]">
+ <nav
+ className={cn(
+ 'settings-nav w-50 shrink-0 bg-sidebar pt-12.5 pb-3 px-2.5 flex flex-col gap-[2px] border-r border-solid',
+ 'border-r-border max-[700px]:w-34 max-[700px]:pt-12.5 max-[700px]:pb-3 max-[700px]:px-2',
+ )}
+ aria-label="Settings sections"
+ >
{[
['general', 'General', SlidersHorizontal],
['accounts', 'Accounts', Mail],
@@ -219,25 +245,42 @@ export function SettingsPanel({
<button
key={String(id)}
aria-current={tab === id ? 'page' : undefined}
- className={tab === id ? 'active' : ''}
+ className={cn(
+ 'flex gap-2.5 items-center h-8 bg-transparent border-0 py-0 px-2.5 text-left text-secondary rounded-md',
+ 'transition-[color,background] duration-120 ease-[ease] text-[13px] hover:bg-hover hover:text-foreground',
+ 'max-[700px]:px-2 max-[700px]:text-[12px] max-[700px]:gap-1.75',
+ tab === id &&
+ 'active bg-selected hover:bg-selected text-strong hover:text-strong font-medium',
+ )}
onClick={() => {
setTab(String(id))
setSetup(undefined)
}}
>
- <Component size={15} />
+ <Component className={cn('text-muted', tab === id && 'text-strong')} size={15} />
{String(name)}
</button>
)
})}
</nav>
- <div className="settings-content">
+ <div
+ className={cn(
+ 'settings-content flex-1 overflow-auto pt-12 pb-10 px-12 min-w-0',
+ 'max-[700px]:pt-12 max-[700px]:pb-5 max-[700px]:px-5',
+ )}
+ >
{tab === 'general' && (
<>
- <h3>General</h3>
- <div className="setting-section">
+ <h3 className="m-0 text-[20px] font-[550] tracking-[-0.5px]">General</h3>
+ <div
+ className={cn(
+ 'setting-section my-6.25 mx-0 [&_h4]:text-[11px] [&_h4]:font-medium [&_h4]:mt-0 [&_h4]:mb-3 [&_h4]:mx-0',
+ '[&_h4]:text-secondary [&+.setting-section]:border-t [&+.setting-section]:border-solid',
+ '[&+.setting-section]:border-t-border [&+.setting-section]:pt-5.5',
+ )}
+ >
<h4>Appearance</h4>
- <div className="theme-options">
+ <div className="theme-options grid grid-cols-[repeat(3,_1fr)] gap-3.5 max-[700px]:gap-2.5">
{(
[
['dark', 'Dark'],
@@ -247,49 +290,84 @@ export function SettingsPanel({
).map(([id, label]) => (
<button
key={id}
- className={
- 'theme-option' + (bootstrap.settings.theme === id ? ' chosen' : '')
- }
+ className={cn(
+ 'theme-option flex flex-col gap-2.5 min-w-0 p-0 border-0 bg-none bg-transparent text-secondary text-[12px]',
+ 'text-left focus-visible:outline-none [&:hover:not(.chosen):not(:focus-visible)_.theme-preview]:shadow-[0_0_0_1px_var(--faint)]',
+ '[&.chosen_.theme-preview]:shadow-[0_0_0_2px_var(--surface),_0_0_0_4px_var(--accent-solid)]',
+ '[&:focus-visible_.theme-preview]:shadow-[0_0_0_2px_var(--surface),_0_0_0_4px_var(--accent-solid)]',
+ '[&.chosen_.theme-option-label]:text-strong [&.chosen_.theme-radio]:shadow-[inset_0_0_0_4px_var(--accent-solid)]',
+ bootstrap.settings.theme === id && 'chosen',
+ )}
aria-pressed={bootstrap.settings.theme === id}
onClick={() => void update({ theme: id })}
>
- <span className="theme-preview" aria-hidden="true">
+ <span
+ className="theme-preview relative block aspect-[16_/_10] rounded-lg overflow-hidden shadow-[0_0_0_1px_var(--border-strong)] transition-[box-shadow] duration-120 ease-[ease]"
+ aria-hidden="true"
+ >
{id === 'system' ? (
<>
<ThemePreview theme="dark" />
- <ThemePreview theme="light" className="theme-split" />
+ <ThemePreview
+ theme="light"
+ className="theme-split [clip-path:inset(0_0_0_50%)]"
+ />
</>
) : (
<ThemePreview theme={id} />
)}
</span>
- <span className="theme-option-label">
- <span className="theme-radio" />
+ <span className="theme-option-label flex items-center gap-2 pl-[2px]">
+ <span className="theme-radio w-3.5 h-3.5 shrink-0 rounded-full shadow-[inset_0_0_0_1px_var(--faint)] transition-[box-shadow] duration-120 ease-[ease]" />
{label}
</span>
</button>
))}
</div>
</div>
- <div className="setting-section">
+ <div
+ className={cn(
+ 'setting-section my-6.25 mx-0 [&_h4]:text-[11px] [&_h4]:font-medium [&_h4]:mt-0 [&_h4]:mb-3 [&_h4]:mx-0',
+ '[&_h4]:text-secondary [&+.setting-section]:border-t [&+.setting-section]:border-solid',
+ '[&+.setting-section]:border-t-border [&+.setting-section]:pt-5.5',
+ )}
+ >
<h4>Reading</h4>
- <div className="setting-row">
+ <div
+ className={cn(
+ 'setting-row flex items-center justify-between my-3.5 mx-0 gap-6 [&_strong]:font-normal [&_p]:text-muted',
+ '[&_p]:my-[3px] [&_p]:mx-0 [&_input]:shrink-0 [&>.button]:shrink-0 [&_p]:text-[12px] [&_p]:leading-[1.6]',
+ '[&_strong]:text-[13px] max-[700px]:gap-3.5',
+ )}
+ >
<div>
<strong>After archiving or deleting</strong>
<p>Where to go when a conversation leaves the list you’re reading.</p>
</div>
<Select
aria-label="After archiving or deleting"
- className="setting-select"
+ className="setting-select w-auto min-w-60 shrink-0"
value={bootstrap.settings.afterArchive || 'next'}
options={afterArchiveOptions}
onValueChange={(afterArchive) => void update({ afterArchive })}
/>
</div>
</div>
- <div className="setting-section">
+ <div
+ className={cn(
+ 'setting-section my-6.25 mx-0 [&_h4]:text-[11px] [&_h4]:font-medium [&_h4]:mt-0 [&_h4]:mb-3 [&_h4]:mx-0',
+ '[&_h4]:text-secondary [&+.setting-section]:border-t [&+.setting-section]:border-solid',
+ '[&+.setting-section]:border-t-border [&+.setting-section]:pt-5.5',
+ )}
+ >
<h4>Privacy</h4>
- <div className="setting-row">
+ <div
+ className={cn(
+ 'setting-row flex items-center justify-between my-3.5 mx-0 gap-6 [&_strong]:font-normal [&_p]:text-muted',
+ '[&_p]:my-[3px] [&_p]:mx-0 [&_input]:shrink-0 [&>.button]:shrink-0 [&_p]:text-[12px] [&_p]:leading-[1.6]',
+ '[&_strong]:text-[13px] max-[700px]:gap-3.5',
+ )}
+ >
<div>
<strong>Load remote images</strong>
<p>Display images in incoming email and sender pictures automatically.</p>
@@ -300,16 +378,28 @@ export function SettingsPanel({
onCheckedChange={(remoteImages) => void update({ remoteImages })}
/>
</div>
- <p className="setting-footnote">
+ <p className="setting-footnote text-faint text-[12px] leading-[1.6]">
Email images are requested directly, so senders may know when you read a
message. Gravatar receives a hash of each sender’s address; sender websites or
their icon hosts receive icon requests. If those fail, Twenty Icons receives the
sender’s root domain. DuckDuckGo receives it only if Twenty has no icon.
</p>
</div>
- <div className="setting-section">
+ <div
+ className={cn(
+ 'setting-section my-6.25 mx-0 [&_h4]:text-[11px] [&_h4]:font-medium [&_h4]:mt-0 [&_h4]:mb-3 [&_h4]:mx-0',
+ '[&_h4]:text-secondary [&+.setting-section]:border-t [&+.setting-section]:border-solid',
+ '[&+.setting-section]:border-t-border [&+.setting-section]:pt-5.5',
+ )}
+ >
<h4>Desktop</h4>
- <div className="setting-row">
+ <div
+ className={cn(
+ 'setting-row flex items-center justify-between my-3.5 mx-0 gap-6 [&_strong]:font-normal [&_p]:text-muted',
+ '[&_p]:my-[3px] [&_p]:mx-0 [&_input]:shrink-0 [&>.button]:shrink-0 [&_p]:text-[12px] [&_p]:leading-[1.6]',
+ '[&_strong]:text-[13px] max-[700px]:gap-3.5',
+ )}
+ >
<div>
<strong>New mail notifications</strong>
<p>Get notified when new conversations arrive.</p>
@@ -320,7 +410,13 @@ export function SettingsPanel({
onCheckedChange={(notifications) => void update({ notifications })}
/>
</div>
- <div className="setting-row">
+ <div
+ className={cn(
+ 'setting-row flex items-center justify-between my-3.5 mx-0 gap-6 [&_strong]:font-normal [&_p]:text-muted',
+ '[&_p]:my-[3px] [&_p]:mx-0 [&_input]:shrink-0 [&>.button]:shrink-0 [&_p]:text-[12px] [&_p]:leading-[1.6]',
+ '[&_strong]:text-[13px] max-[700px]:gap-3.5',
+ )}
+ >
<div>
<strong>Keep running in the tray</strong>
<p>Keep checking for new mail after the window is closed.</p>
@@ -333,16 +429,28 @@ export function SettingsPanel({
</div>
</div>
{bootstrap.accounts.length > 1 && (
- <div className="setting-section">
+ <div
+ className={cn(
+ 'setting-section my-6.25 mx-0 [&_h4]:text-[11px] [&_h4]:font-medium [&_h4]:mt-0 [&_h4]:mb-3 [&_h4]:mx-0',
+ '[&_h4]:text-secondary [&+.setting-section]:border-t [&+.setting-section]:border-solid',
+ '[&+.setting-section]:border-t-border [&+.setting-section]:pt-5.5',
+ )}
+ >
<h4>Writing</h4>
- <div className="setting-row">
+ <div
+ className={cn(
+ 'setting-row flex items-center justify-between my-3.5 mx-0 gap-6 [&_strong]:font-normal [&_p]:text-muted',
+ '[&_p]:my-[3px] [&_p]:mx-0 [&_input]:shrink-0 [&>.button]:shrink-0 [&_p]:text-[12px] [&_p]:leading-[1.6]',
+ '[&_strong]:text-[13px] max-[700px]:gap-3.5',
+ )}
+ >
<div>
<strong>Default sending account</strong>
<p>New messages start from this account unless you’re in another one.</p>
</div>
<Select
aria-label="Default sending account"
- className="setting-select"
+ className="setting-select w-auto min-w-60 shrink-0"
value={
bootstrap.settings.defaultAccountId || bootstrap.accounts[0]?.id || ''
}
@@ -372,9 +480,9 @@ export function SettingsPanel({
/>
) : (
<>
- <div className="settings-section-heading">
+ <div className="settings-section-heading flex justify-between items-start gap-2.5">
<div>
- <h3>Accounts</h3>
+ <h3 className="m-0 text-[20px] font-[550] tracking-[-0.5px]">Accounts</h3>
</div>
{!!bootstrap.accounts.length && (
<Button
@@ -394,8 +502,20 @@ export function SettingsPanel({
(account.status !== 'connected' && account.status !== 'connecting') ||
!!account.outgoingError
return (
- <div className="settings-account-entry" key={account.id}>
- <div className="settings-account">
+ <div
+ className="settings-account-entry border-b border-solid border-b-border"
+ key={account.id}
+ >
+ <div
+ className={cn(
+ 'settings-account [&_strong]:block [&_strong]:font-medium [&_small]:flex [&_small]:gap-1.25',
+ '[&_small]:items-center [&_small]:text-[11px] [&_small]:mt-1 [&_strong]:text-[13px]',
+ '[&_strong_.protocol-tag]:ml-2 [&_strong_.protocol-tag]:[vertical-align:1px] [&_strong_.protocol-tag]:h-4',
+ '[&_strong_.protocol-tag]:text-[9px] [&_small.outgoing-error]:items-start [&_small.outgoing-error]:mt-[3px]',
+ '[&_small.outgoing-error_svg]:shrink-0 [&_small.outgoing-error_svg]:mt-[2px] flex items-center gap-2.5 py-4.5',
+ 'px-0',
+ )}
+ >
<AccountAvatarPicker
name={account.name}
email={account.email}
@@ -404,11 +524,14 @@ export function SettingsPanel({
onChange={(appearance) => updateAppearance(account, appearance)}
onError={(e) => notify(friendlyError(e), 'error')}
/>
- <div className="settings-account-text">
+ <div className="settings-account-text flex-1 min-w-0">
<strong>
{account.name}
<span
- className="protocol-tag"
+ className={cn(
+ 'protocol-tag inline-flex items-center h-4.5 py-0 px-1.5 border border-solid border-border-strong rounded-xs',
+ 'text-[10px] font-medium tracking-[0.3px] text-muted whitespace-nowrap shrink-0',
+ )}
title={
protocol === 'imap'
? 'Connected with IMAP and SMTP'
@@ -418,13 +541,17 @@ export function SettingsPanel({
{protocol.toUpperCase()}
</span>
</strong>
- <span className="settings-account-email">{account.email}</span>
+ <span className="settings-account-email block text-muted text-[12px] leading-[1.6]">
+ {account.email}
+ </span>
<small
- className={
- account.status === 'connected' ? 'connected' : 'connection-error'
- }
+ className={cn(
+ account.status === 'connected'
+ ? 'connected text-success'
+ : 'connection-error [&_.connection-dot]:bg-danger text-danger',
+ )}
>
- <span className="connection-dot" />
+ <span className="connection-dot w-1.25 h-1.25 rounded-full bg-success inline-block shrink-0" />
{account.status === 'connected'
? account.outgoingError
? 'Receiving mail'
@@ -436,18 +563,18 @@ export function SettingsPanel({
: account.error || 'Disconnected'}
</small>
{account.outgoingError && (
- <small className="connection-error outgoing-error">
+ <small className="connection-error [&_.connection-dot]:bg-danger text-danger outgoing-error">
<Send size={11} />
<span>Sending unavailable: {account.outgoingError}</span>
</small>
)}
{account.indexing && !account.indexing.complete && (
- <small className="account-indexing">
+ <small className="account-indexing text-muted">
<IndexingMeter indexing={account.indexing} />
</small>
)}
</div>
- <div className="account-actions">
+ <div className="account-actions flex gap-1">
{needsSignIn && (
<Button
size="small"
@@ -458,11 +585,11 @@ export function SettingsPanel({
)}
<Dropdown
container={modalRef}
- className="settings-account-menu"
+ className="settings-account-menu [&_.menu-item]:min-h-7.75 w-55"
trigger={
<Button
size="small"
- className="account-manage-trigger"
+ className="account-manage-trigger data-popup-open:bg-hover data-popup-open:text-strong [&[data-popup-open]_svg]:transform-[rotate(180deg)]"
aria-label={'Manage ' + account.name + ' account'}
>
Manage
@@ -499,7 +626,7 @@ export function SettingsPanel({
<RefreshCw size={14} />
Reconnect
</MenuItem>
- <div className="account-menu-divider" />
+ <div className="account-menu-divider h-[1px] m-1.25 bg-border" />
<MenuItem danger onClick={() => setRemove(account)}>
<Trash2 size={14} />
Remove account…
@@ -519,7 +646,7 @@ export function SettingsPanel({
})}
</div>
{!bootstrap.accounts.length && (
- <div className="no-accounts">
+ <div className="no-accounts [&_.empty-state]:pb-12 flex min-h-90">
<EmptyState
icon={Mail}
title="No accounts yet"
@@ -536,10 +663,10 @@ export function SettingsPanel({
))}
{tab === 'signatures' && (
<>
- <h3>Signatures</h3>
+ <h3 className="m-0 text-[20px] font-[550] tracking-[-0.5px]">Signatures</h3>
{bootstrap.accounts.length ? (
<>
- <p className="settings-lead">
+ <p className="settings-lead text-muted mt-1.5 mb-6 mx-0 text-[12px] leading-[1.6]">
Added to new messages, replies and forwards. Write plain text or HTML. Changes
save as you type.
</p>
@@ -554,7 +681,7 @@ export function SettingsPanel({
/>
</>
) : (
- <div className="no-accounts">
+ <div className="no-accounts [&_.empty-state]:pb-12 flex min-h-90">
<EmptyState
icon={PenLine}
title="No signatures yet"
@@ -577,8 +704,8 @@ export function SettingsPanel({
)}
{tab === 'shortcuts' && (
<>
- <h3>Keyboard shortcuts</h3>
- <p className="settings-lead">
+ <h3 className="m-0 text-[20px] font-[550] tracking-[-0.5px]">Keyboard shortcuts</h3>
+ <p className="settings-lead text-muted mt-1.5 mb-6 mx-0 text-[12px] leading-[1.6]">
Click any keys to change them, or + to add another. Changes save right away.
</p>
<ShortcutEditor />
@@ -586,19 +713,44 @@ export function SettingsPanel({
)}
{tab === 'about' && (
<>
- <div className="about-hero">
- <img className="about-mark" src={appIcon} alt="" width={52} height={52} />
+ <div
+ className={cn(
+ 'about-hero [&>div]:flex-1 [&>div]:min-w-0 [&_p]:text-muted [&_p]:text-[12px] [&_p]:mt-[3px] [&_p]:mb-0',
+ '[&_p]:mx-0 flex items-center gap-4 pb-6.5 border-b border-solid border-b-border',
+ )}
+ >
+ <img
+ className="about-mark w-13 h-13 block shrink-0"
+ src={appIcon}
+ alt=""
+ width={52}
+ height={52}
+ />
<div>
- <h3>
+ <h3 className="m-0 text-[20px] font-[550] tracking-[-0.5px]">
<Wordmark height={24} />
</h3>
<p>A desktop email client for JMAP and IMAP servers.</p>
</div>
- <span className="about-version">Version {bootstrap.version}</span>
+ <span className="about-version shrink-0 py-[3px] px-2 border border-solid border-border-strong rounded-3xl text-secondary text-[11px] tabular-nums">
+ Version {bootstrap.version}
+ </span>
</div>
- <div className="setting-section">
+ <div
+ className={cn(
+ 'setting-section my-6.25 mx-0 [&_h4]:text-[11px] [&_h4]:font-medium [&_h4]:mt-0 [&_h4]:mb-3 [&_h4]:mx-0',
+ '[&_h4]:text-secondary [&+.setting-section]:border-t [&+.setting-section]:border-solid',
+ '[&+.setting-section]:border-t-border [&+.setting-section]:pt-5.5',
+ )}
+ >
<h4>Privacy</h4>
- <div className="setting-row">
+ <div
+ className={cn(
+ 'setting-row flex items-center justify-between my-3.5 mx-0 gap-6 [&_strong]:font-normal [&_p]:text-muted',
+ '[&_p]:my-[3px] [&_p]:mx-0 [&_input]:shrink-0 [&>.button]:shrink-0 [&_p]:text-[12px] [&_p]:leading-[1.6]',
+ '[&_strong]:text-[13px] max-[700px]:gap-3.5',
+ )}
+ >
<div>
<strong>Direct connection</strong>
<p>
@@ -607,16 +759,34 @@ export function SettingsPanel({
</p>
</div>
</div>
- <div className="setting-row">
+ <div
+ className={cn(
+ 'setting-row flex items-center justify-between my-3.5 mx-0 gap-6 [&_strong]:font-normal [&_p]:text-muted',
+ '[&_p]:my-[3px] [&_p]:mx-0 [&_input]:shrink-0 [&>.button]:shrink-0 [&_p]:text-[12px] [&_p]:leading-[1.6]',
+ '[&_strong]:text-[13px] max-[700px]:gap-3.5',
+ )}
+ >
<div>
<strong>No telemetry</strong>
<p>Inlark collects no usage data or analytics.</p>
</div>
</div>
</div>
- <div className="setting-section">
+ <div
+ className={cn(
+ 'setting-section my-6.25 mx-0 [&_h4]:text-[11px] [&_h4]:font-medium [&_h4]:mt-0 [&_h4]:mb-3 [&_h4]:mx-0',
+ '[&_h4]:text-secondary [&+.setting-section]:border-t [&+.setting-section]:border-solid',
+ '[&+.setting-section]:border-t-border [&+.setting-section]:pt-5.5',
+ )}
+ >
<h4>Troubleshooting</h4>
- <div className="setting-row">
+ <div
+ className={cn(
+ 'setting-row flex items-center justify-between my-3.5 mx-0 gap-6 [&_strong]:font-normal [&_p]:text-muted',
+ '[&_p]:my-[3px] [&_p]:mx-0 [&_input]:shrink-0 [&>.button]:shrink-0 [&_p]:text-[12px] [&_p]:leading-[1.6]',
+ '[&_strong]:text-[13px] max-[700px]:gap-3.5',
+ )}
+ >
<div>
<strong>Diagnostics</strong>
<p>
@@ -659,7 +829,12 @@ export function SettingsPanel({
title="Remove this account?"
description="This removes the connection, local cached mail, and local drafts for this connection. Mail on the server stays where it is."
>
- <div className="modal-actions">
+ <div
+ className={cn(
+ 'modal-actions flex justify-end gap-2 mt-6 [&>.modal-action-start]:mr-auto [&>.modal-action-start]:-ml-2.5',
+ '[&>.modal-action-start]:text-muted [&>.modal-action-start:hover:not(:disabled)]:text-danger',
+ )}
+ >
<Button onClick={() => setRemove(undefined)}>Keep account</Button>
<Button
variant="danger"
diff --git a/apps/desktop/src/renderer/src/ShortcutEditor.tsx b/apps/desktop/src/renderer/src/ShortcutEditor.tsx
index 7572740..64e73ca 100644
--- a/apps/desktop/src/renderer/src/ShortcutEditor.tsx
+++ b/apps/desktop/src/renderer/src/ShortcutEditor.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { Fragment, useEffect, useRef, useState } from 'react'
import { Button, IconButton, Modal } from '@inlark/ui'
import { friendlyError } from '@inlark/core'
@@ -84,7 +85,13 @@ function ShortcutRecorder({
tabIndex={0}
role="textbox"
aria-label={'Press a new shortcut for ' + label}
- className="shortcut-recorder"
+ className={cn(
+ 'shortcut-recorder relative overflow-hidden inline-flex items-center gap-1 h-6 my-0 mx-[2px] py-0 px-2.25',
+ 'text-[11px] text-primary bg-primary-tint border border-solid border-primary-solid rounded-md',
+ 'shadow-[0_0_0_3px_var(--accent-tint)] animate-[shortcut-listen_1.6s_ease-in-out_infinite]',
+ 'focus-visible:outline-none [&_kbd]:text-primary [&_kbd]:border-primary/40 [&_.shortcut-then]:text-inherit',
+ 'motion-reduce:animate-none',
+ )}
onBlur={() => {
if (state.current.done) return
state.current.done = true
@@ -95,9 +102,9 @@ function ShortcutRecorder({
{steps.length ? (
<>
<ShortcutKeys binding={steps} />
- <span className="shortcut-then">then…</span>
+ <span className="shortcut-then my-0 mx-[1px] text-[10px] text-faint">then…</span>
<span
- className="shortcut-recorder-timer"
+ className="shortcut-recorder-timer inset-x-0 bottom-0 origin-left animate-[shortcut-timer_linear_forwards] absolute h-[2px] bg-primary-solid"
style={{ animationDuration: sequenceWait + 'ms' }}
/>
</>
@@ -191,9 +198,17 @@ export function ShortcutEditor({ autoFocus }: { autoFocus?: boolean }) {
const customized = shortcutDefinitions.some(({ id }) => isCustomized(bindings, id))
return (
- <div className="shortcut-editor">
- <div className="shortcut-toolbar">
- <label className="shortcut-search">
+ <div className="shortcut-editor flex flex-col gap-4.5">
+ <div className="shortcut-toolbar flex items-center gap-2.5 [&>.button]:shrink-0 [&>.button]:text-secondary">
+ <label
+ className={cn(
+ 'shortcut-search flex-1 flex items-center gap-2 h-8 py-0 px-2.5 text-muted bg-field border border-solid',
+ 'border-border-strong rounded-[7px] transition-[border-color,box-shadow] duration-120 ease-[ease]',
+ 'focus-within:border-primary-solid focus-within:shadow-[0_0_0_3px_var(--accent-tint)] [&_input]:h-full',
+ '[&_input]:p-0 [&_input]:text-[12px] [&_input]:bg-none [&_input]:bg-transparent [&_input]:border-0',
+ '[&_input::-webkit-search-cancel-button]:hidden',
+ )}
+ >
<Search size={14} />
<input
autoFocus={autoFocus}
@@ -219,18 +234,28 @@ export function ShortcutEditor({ autoFocus }: { autoFocus?: boolean }) {
)}
</div>
{error && (
- <p className="form-error shortcut-error" role="alert">
+ <p
+ className="form-error flex gap-2 text-[11px] leading-[1.6] text-danger [&_svg]:shrink-0 [&_svg]:mt-[3px] shortcut-error m-0"
+ role="alert"
+ >
<AlertCircle size={14} />
<span>Couldn’t save your shortcuts. {error}</span>
</p>
)}
- <div className="shortcut-sections">
+ <div
+ className={cn(
+ 'shortcut-sections [columns:2_280px] [&_section]:break-inside-avoid [&_section]:mb-5.5 [&_h3]:mt-0 [&_h3]:mb-1',
+ '[&_h3]:mx-0 gap-x-9',
+ )}
+ >
{shortcutSections.map((section) => {
const items = matches.filter((definition) => definition.section === section)
if (!items.length) return null
return (
<section key={section}>
- <h3>{section}</h3>
+ <h3 className="mt-0 mb-1 mx-0 text-[11px] font-medium text-muted [.settings-content_&]:tracking-[-0.5px]">
+ {section}
+ </h3>
{items.map((definition) => {
const { id } = definition
const name = shortcutName(definition)
@@ -238,17 +263,24 @@ export function ShortcutEditor({ autoFocus }: { autoFocus?: boolean }) {
const rowNotice = notice?.id === id ? notice : undefined
return (
<div
- className={
- 'shortcut-item' + (recording?.id === id ? ' shortcut-item-recording' : '')
- }
+ className={cn(
+ 'shortcut-item [&:hover_.shortcut-add]:opacity-100 [&:focus-within_.shortcut-add]:opacity-100 break-inside-avoid',
+ 'border-b border-solid border-b-border',
+ recording?.id === id && 'shortcut-item-recording',
+ )}
key={id}
>
- <div className="shortcut-row">
- <span className="shortcut-label">
+ <div className="shortcut-row flex items-center justify-between gap-3 min-h-8.5 text-[12px] text-secondary">
+ <span className="shortcut-label [&_small]:text-[10px] [&_small]:text-faint flex flex-col min-w-0 py-1.5 px-0">
{definition.label}
{'description' in definition && <small>{definition.description}</small>}
</span>
- <span className="shortcut-bindings">
+ <span
+ className={cn(
+ 'shortcut-bindings [&>.button]:w-6 [&>.button]:h-6 [&>.button]:min-h-6 [&>.button]:p-1 [&>.button]:text-muted',
+ '[&>.shortcut-reset]:text-primary flex flex-wrap items-center justify-end gap-[2px] py-1 px-0',
+ )}
+ >
{list.map((binding, index) =>
recording?.id === id && recording.index === index ? (
<ShortcutRecorder
@@ -262,10 +294,23 @@ export function ShortcutEditor({ autoFocus }: { autoFocus?: boolean }) {
}}
/>
) : (
- <span className="shortcut-binding" key={index}>
+ <span
+ className={cn(
+ 'shortcut-binding [&:hover_.shortcut-remove]:opacity-100 [&:hover_.shortcut-remove]:transform-none',
+ '[&:focus-within_.shortcut-remove]:opacity-100 [&:focus-within_.shortcut-remove]:transform-none relative',
+ 'inline-flex',
+ )}
+ key={index}
+ >
<button
id={elementId(id, index)}
- className="shortcut-binding-keys"
+ className={cn(
+ 'shortcut-binding-keys inline-flex items-center p-[3px] bg-none bg-transparent border-0 rounded-md',
+ 'transition-[background] duration-120 ease-[ease] hover:bg-hover focus-visible:bg-hover',
+ 'focus-visible:outline-offset-[0] [&_kbd]:transition-[color,border-color] [&_kbd]:duration-120',
+ '[&_kbd]:ease-[ease] [&:hover_kbd]:text-foreground [&:hover_kbd]:border-muted',
+ '[&:focus-visible_kbd]:text-foreground [&:focus-visible_kbd]:border-muted',
+ )}
aria-label={'Change ' + bindingName(binding) + ' for ' + name}
onClick={() => startRecording({ id, index })}
onKeyDown={(event) => {
@@ -279,7 +324,11 @@ export function ShortcutEditor({ autoFocus }: { autoFocus?: boolean }) {
<ShortcutKeys binding={binding} />
</button>
<button
- className="shortcut-remove"
+ className={cn(
+ 'shortcut-remove absolute top-[-3px] right-[-3px] grid place-items-center w-3.5 h-3.5 p-0 text-muted bg-raised',
+ 'border border-solid border-border-strong rounded-full opacity-0 transform-[scale(0.8)]',
+ 'transition-[opacity,transform,color] duration-120 ease-[ease] hover:text-danger hover:border-danger/45',
+ )}
aria-label={'Remove ' + bindingName(binding) + ' from ' + name}
title="Remove"
onClick={() => {
@@ -305,7 +354,7 @@ export function ShortcutEditor({ autoFocus }: { autoFocus?: boolean }) {
) : list.length ? (
<IconButton
id={elementId(id)}
- className="shortcut-add"
+ className="shortcut-add opacity-0 transition-[opacity] duration-120 ease-[ease]"
label={'Add another shortcut'}
aria-label={'Add a shortcut for ' + name}
onClick={() => startRecording({ id })}
@@ -315,7 +364,11 @@ export function ShortcutEditor({ autoFocus }: { autoFocus?: boolean }) {
) : (
<button
id={elementId(id)}
- className="shortcut-empty"
+ className={cn(
+ 'shortcut-empty inline-flex items-center gap-1 h-6 py-0 px-2 text-[11px] text-faint bg-none bg-transparent',
+ 'border border-dashed border-border-strong rounded-md transition-[color,border-color] duration-120 ease-[ease]',
+ 'hover:text-foreground hover:border-muted',
+ )}
aria-label={'Add a shortcut for ' + name}
onClick={() => startRecording({ id })}
>
@@ -336,19 +389,33 @@ export function ShortcutEditor({ autoFocus }: { autoFocus?: boolean }) {
</span>
</div>
{rowNotice?.kind === 'recording' && (
- <p className="shortcut-notice" role="status">
+ <p
+ className="shortcut-notice mt-0 mb-2.5 mx-0 text-[11px] leading-[1.7] text-muted [&_kbd]:h-4 [&_kbd]:min-w-4 [&_kbd]:text-[9px]"
+ role="status"
+ >
Press the keys you want to use, or Esc to cancel. For a sequence like{' '}
<ShortcutKeys binding={['G', 'I']} />, press the second key right after the
first.
</p>
)}
{rowNotice?.kind === 'duplicate' && (
- <p className="shortcut-notice" role="status">
+ <p
+ className="shortcut-notice mt-0 mb-2.5 mx-0 text-[11px] leading-[1.7] text-muted [&_kbd]:h-4 [&_kbd]:min-w-4 [&_kbd]:text-[9px]"
+ role="status"
+ >
That’s already a shortcut for {name}.
</p>
)}
{rowNotice?.kind === 'conflict' && (
- <div className="shortcut-notice shortcut-conflict" role="alert">
+ <div
+ className={cn(
+ 'shortcut-notice mt-0 mb-2.5 mx-0 text-[11px] leading-[1.7] [&_kbd]:h-4 [&_kbd]:min-w-4 [&_kbd]:text-[9px]',
+ 'shortcut-conflict flex flex-wrap items-center gap-[8px_12px] py-2 px-2.5 text-secondary bg-star/7 border',
+ 'border-solid border-star/22 rounded-[7px] [&_p]:flex-[1_1_180px] [&_p]:m-0 [&_strong]:font-medium',
+ '[&_strong]:text-strong',
+ )}
+ role="alert"
+ >
<p>
<ShortcutKeys binding={rowNotice.binding} /> conflicts with{' '}
{rowNotice.conflicts.map((conflict, index) => (
@@ -366,7 +433,7 @@ export function ShortcutEditor({ autoFocus }: { autoFocus?: boolean }) {
))}
.
</p>
- <span className="shortcut-conflict-actions">
+ <span className="shortcut-conflict-actions flex gap-1.5 ml-auto">
<Button
size="small"
variant="ghost"
@@ -401,7 +468,9 @@ export function ShortcutEditor({ autoFocus }: { autoFocus?: boolean }) {
)
})}
{!matches.length && (
- <p className="shortcut-no-results">No shortcuts match β€œ{query.trim()}”.</p>
+ <p className="shortcut-no-results m-0 py-7 px-0 text-[12px] text-center text-muted">
+ No shortcuts match β€œ{query.trim()}”.
+ </p>
)}
</div>
<Modal
@@ -410,7 +479,12 @@ export function ShortcutEditor({ autoFocus }: { autoFocus?: boolean }) {
title="Restore default shortcuts?"
description="Every shortcut goes back to its original keys. Your changes are removed."
>
- <div className="modal-actions">
+ <div
+ className={cn(
+ 'modal-actions flex justify-end gap-2 mt-6 [&>.modal-action-start]:mr-auto [&>.modal-action-start]:-ml-2.5',
+ '[&>.modal-action-start]:text-muted [&>.modal-action-start:hover:not(:disabled)]:text-danger',
+ )}
+ >
<Button onClick={() => setConfirmReset(false)}>Cancel</Button>
<Button
variant="primary"
diff --git a/apps/desktop/src/renderer/src/Sidebar.tsx b/apps/desktop/src/renderer/src/Sidebar.tsx
index 6bf039c..00c5c63 100644
--- a/apps/desktop/src/renderer/src/Sidebar.tsx
+++ b/apps/desktop/src/renderer/src/Sidebar.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { useEffect, useState } from 'react'
import {
Archive,
@@ -111,18 +112,42 @@ export function Sidebar({
localStorage.setItem('sidebar-account-expanded', JSON.stringify(accountExpanded))
}, [accountExpanded])
return (
- <aside className="sidebar">
- <div className="sidebar-brand">
+ <aside
+ className={cn(
+ 'sidebar relative w-56 shrink-0 flex flex-col py-0 px-3 overflow-hidden [.sidebar-collapsed_&]:w-16',
+ '[.sidebar-collapsed_&]:py-0 [.sidebar-collapsed_&]:px-2.25 max-[1100px]:w-51 max-[700px]:w-47 max-[700px]:py-0',
+ 'max-[700px]:px-2.5',
+ )}
+ >
+ <div
+ className={cn(
+ 'sidebar-brand h-14 flex items-center gap-1.5 py-0 px-2 shrink-0 [.sidebar-collapsed_&]:justify-center',
+ '[.sidebar-collapsed_&]:p-1.25 max-[1100px]:gap-1.5 max-[1100px]:py-0 max-[1100px]:px-1.25 max-[700px]:gap-1.5',
+ 'max-[700px]:py-0 max-[700px]:px-[3px]',
+ )}
+ >
<img
- className="brand-mark"
+ className="brand-mark h-6 w-6 block shrink-0 light:brightness-0 max-[700px]:w-6 max-[700px]:h-6"
src={appIcon}
alt={collapsed ? 'Inlark' : ''}
width={24}
height={24}
/>
- {!collapsed && <Wordmark className="brand-wordmark" />}
+ {!collapsed && (
+ <Wordmark className="brand-wordmark text-white h-4 w-auto light:[color:#000] max-[1100px]:h-3.75 max-[700px]:h-3.5" />
+ )}
</div>
- <div className="sidebar-tools">
+ <div
+ className={cn(
+ 'sidebar-tools absolute top-3.5 right-3 flex items-center gap-1 shrink-0 [&_.button]:w-6.75 [&_.button]:h-6.75',
+ '[&_.button]:min-h-6.75 [&_.button]:p-0 [&_.button]:text-muted [&_.sidebar-compose]:rounded-[7px]',
+ '[&_.sidebar-compose]:bg-raised [&_.sidebar-compose]:text-strong [.sidebar-collapsed_&]:static',
+ '[.sidebar-collapsed_&]:flex-col [.sidebar-collapsed_&]:gap-1.5 [.sidebar-collapsed_&]:pt-0',
+ '[.sidebar-collapsed_&]:pb-3.75 [.sidebar-collapsed_&]:px-0 max-[700px]:right-1.75 max-[700px]:gap-[2px]',
+ 'max-[700px]:[&_.button]:w-6 max-[700px]:[&_.button]:h-6 max-[700px]:[&_.button]:min-h-6',
+ '[@media(max-height:700px)]:[.sidebar-collapsed_&]:pb-3',
+ )}
+ >
<IconButton label="Search and commands" shortcut={keys('commandMenu')} onClick={onSearch}>
<Search size={14} />
</IconButton>
@@ -135,7 +160,7 @@ export function Sidebar({
<SquarePen size={16} />
</IconButton>
</div>
- <div className="sidebar-scroll">
+ <div className="sidebar-scroll flex-1 min-h-0 overflow-y-hidden [scrollbar-gutter:stable] -mr-2.25 pt-0 pb-4 pr-[3px] pl-0 hover:overflow-y-auto focus-within:overflow-y-auto">
<nav className="main-nav" aria-label="Mail views">
{views
.filter(
@@ -157,11 +182,20 @@ export function Sidebar({
aria-current={
view === v.id && !route.account && !route.folder && !route.q ? 'page' : undefined
}
- className={
- 'nav-item ' +
- (v.id === 'archive' ? 'nav-secondary-start ' : '') +
- (view === v.id && !route.account && !route.folder && !route.q ? 'active' : '')
- }
+ className={cn(
+ 'nav-item flex gap-2.5 items-center w-full h-8.5 py-0 px-2.5 border-0 bg-none bg-transparent rounded-md',
+ 'text-secondary text-[13px] text-left my-[2px] mx-0 transition-[color,background] duration-120 ease-[ease]',
+ 'focus-visible:outline-offset-[-2px] [&>svg]:text-muted [&>span:not(.account-mark)]:flex-1',
+ '[&>span:not(.account-mark)]:overflow-hidden [&>span:not(.account-mark)]:text-ellipsis',
+ '[&>span:not(.account-mark)]:whitespace-nowrap [&>span:not(.account-mark)]:relative',
+ '[&>span:not(.account-mark)]:top-[1px] [&>small]:relative [&>small]:top-[1px] hover:bg-hover',
+ 'hover:text-foreground [&.active]:bg-selected [&.active]:text-strong [&.active]:font-medium',
+ '[&.active_svg]:text-strong [&_small]:text-[11px] [&_small]:text-muted [&_small]:tabular-nums',
+ '[&>.account-mark]:my-0 [&>.account-mark]:mx-[-1px] [.sidebar-collapsed_&]:justify-center',
+ '[.sidebar-collapsed_&]:p-1.75',
+ v.id === 'archive' && 'nav-secondary-start mt-3.25',
+ view === v.id && !route.account && !route.folder && !route.q && 'active',
+ )}
onClick={() => go({ view: v.id })}
>
<v.icon size={16} strokeWidth={1.65} />
@@ -178,15 +212,26 @@ export function Sidebar({
))}
</nav>
{accounts.length > 0 && (
- <div className="sidebar-section-label">
+ <div
+ className={cn(
+ 'sidebar-section-label mt-5.75 mb-1.25 mr-[3px] ml-2.5 flex justify-between items-center text-muted text-[11px]',
+ 'font-medium h-6 [.sidebar-collapsed_&]:h-0 [.sidebar-collapsed_&]:mt-3.25 [.sidebar-collapsed_&]:mb-0',
+ '[.sidebar-collapsed_&]:mx-0',
+ )}
+ >
{!collapsed && (
<button
- className="sidebar-section-toggle"
+ className={cn(
+ 'sidebar-section-toggle inline-flex items-center gap-1.5 min-w-0 p-0 border-0 bg-none bg-transparent',
+ 'text-inherit [font:inherit] cursor-pointer hover:text-foreground [&_svg]:shrink-0',
+ '[&_svg]:transition-[transform] [&_svg]:duration-120 [&_svg]:ease-[ease]',
+ '[&_svg.closed]:transform-[rotate(-90deg)]',
+ )}
aria-expanded={accountsExpanded}
onClick={() => setAccountsExpanded((open) => !open)}
>
<span>Accounts</span>
- <ChevronDown size={12} className={accountsExpanded ? '' : 'closed'} />
+ <ChevronDown size={12} className={cn(accountsExpanded ? '' : 'closed')} />
</button>
)}
</div>
@@ -198,9 +243,20 @@ export function Sidebar({
return (
<div className="account-tree" key={a.id}>
<button
- className={
- 'nav-item account-toggle ' + (route.account === a.id ? 'account-current' : '')
- }
+ className={cn(
+ 'nav-item flex gap-2.5 items-center w-full h-8.5 py-0 px-2.5 border-0 bg-none bg-transparent rounded-md',
+ 'text-secondary text-[13px] text-left my-[2px] mx-0 transition-[color,background] duration-120 ease-[ease]',
+ 'focus-visible:outline-offset-[-2px] [&>svg]:text-muted [&>span:not(.account-mark)]:flex-1',
+ '[&>span:not(.account-mark)]:overflow-hidden [&>span:not(.account-mark)]:text-ellipsis',
+ '[&>span:not(.account-mark)]:whitespace-nowrap [&>span:not(.account-mark)]:relative',
+ '[&>span:not(.account-mark)]:top-[1px] [&>small]:relative [&>small]:top-[1px] hover:bg-hover',
+ 'hover:text-foreground [&.active]:bg-selected [&.active]:text-strong [&.active]:font-medium',
+ '[&.active_svg]:text-strong [&_small]:text-[11px] [&_small]:text-muted [&_small]:tabular-nums',
+ '[&>.account-mark]:my-0 [&>.account-mark]:mx-[-1px] [.sidebar-collapsed_&]:justify-center',
+ '[.sidebar-collapsed_&]:p-1.75 account-toggle [&.account-current]:text-foreground [&_.account-chevron]:ml-auto',
+ '[&_.account-chevron]:text-faint',
+ route.account === a.id && 'account-current',
+ )}
title={
a.email +
' Β· ' +
@@ -216,7 +272,7 @@ export function Sidebar({
<AccountMark
account={a}
size={18}
- className={a.status !== 'connected' ? 'disconnected' : undefined}
+ className={cn(a.status !== 'connected' ? 'disconnected' : undefined)}
/>
{!collapsed && (
<>
@@ -226,7 +282,7 @@ export function Sidebar({
) : a.status !== 'connected' ? (
<WifiOff
size={12}
- className="account-offline"
+ className="account-offline text-faint"
aria-label="Not connected"
/>
) : accountUnread[a.id] ? (
@@ -234,14 +290,17 @@ export function Sidebar({
) : null}
<ChevronDown
size={12}
- className={'account-chevron ' + (expanded ? '' : 'closed')}
+ className={cn(
+ 'account-chevron shrink-0 transition-[transform] duration-120 ease-[ease] [&.closed]:transform-[rotate(-90deg)]',
+ expanded ? '' : 'closed',
+ )}
/>
</>
)}
</button>
{!collapsed && expanded && (
<div
- className="account-children"
+ className="account-children [&_.nav-item]:h-7.5 [&_.nav-item]:text-[12px] [&_.nav-item>svg]:shrink-0 mt-[1px] mb-2 mr-0 ml-4.5 pl-1.25 border-l border-solid border-l-border"
id={'account-folders-' + a.id}
role="group"
aria-label={a.name + ' folders'}
@@ -251,12 +310,23 @@ export function Sidebar({
.map((v) => (
<button
key={v.id}
- className={
- 'nav-item ' +
- (route.account === a.id && !route.folder && !route.q && view === v.id
- ? 'active'
- : '')
- }
+ className={cn(
+ 'nav-item flex gap-2.5 items-center w-full h-8.5 py-0 px-2.5 border-0 bg-none bg-transparent rounded-md',
+ 'text-secondary text-[13px] text-left my-[2px] mx-0 transition-[color,background] duration-120 ease-[ease]',
+ 'focus-visible:outline-offset-[-2px] [&>svg]:text-muted [&>span:not(.account-mark)]:flex-1',
+ '[&>span:not(.account-mark)]:overflow-hidden [&>span:not(.account-mark)]:text-ellipsis',
+ '[&>span:not(.account-mark)]:whitespace-nowrap [&>span:not(.account-mark)]:relative',
+ '[&>span:not(.account-mark)]:top-[1px] [&>small]:relative [&>small]:top-[1px] hover:bg-hover',
+ 'hover:text-foreground [&.active]:bg-selected [&.active]:text-strong [&.active]:font-medium',
+ '[&.active_svg]:text-strong [&_small]:text-[11px] [&_small]:text-muted [&_small]:tabular-nums',
+ '[&>.account-mark]:my-0 [&>.account-mark]:mx-[-1px] [.sidebar-collapsed_&]:justify-center',
+ '[.sidebar-collapsed_&]:p-1.75',
+ route.account === a.id &&
+ !route.folder &&
+ !route.q &&
+ view === v.id &&
+ 'active',
+ )}
aria-current={
route.account === a.id && !route.folder && !route.q && view === v.id
? 'page'
@@ -274,12 +344,24 @@ export function Sidebar({
{(boxesByAccount[a.id] || [])
.filter((b) => !b.role)
.map((b) => (
- <div className="folder-nav-row" key={b.id}>
+ <div
+ className="folder-nav-row [&_.nav-item]:flex-1 [&_.nav-item]:min-w-0 [&>.button]:opacity-0 [&:hover>.button]:opacity-100 [&:focus-within>.button]:opacity-100 flex items-center"
+ key={b.id}
+ >
<button
- className={
- 'nav-item ' +
- (route.folder === b.id && route.account === a.id ? 'active' : '')
- }
+ className={cn(
+ 'nav-item flex gap-2.5 items-center w-full h-8.5 py-0 px-2.5 border-0 bg-none bg-transparent rounded-md',
+ 'text-secondary text-[13px] text-left my-[2px] mx-0 transition-[color,background] duration-120 ease-[ease]',
+ 'focus-visible:outline-offset-[-2px] [&>svg]:text-muted [&>span:not(.account-mark)]:flex-1',
+ '[&>span:not(.account-mark)]:overflow-hidden [&>span:not(.account-mark)]:text-ellipsis',
+ '[&>span:not(.account-mark)]:whitespace-nowrap [&>span:not(.account-mark)]:relative',
+ '[&>span:not(.account-mark)]:top-[1px] [&>small]:relative [&>small]:top-[1px] hover:bg-hover',
+ 'hover:text-foreground [&.active]:bg-selected [&.active]:text-strong [&.active]:font-medium',
+ '[&.active_svg]:text-strong [&_small]:text-[11px] [&_small]:text-muted [&_small]:tabular-nums',
+ '[&>.account-mark]:my-0 [&>.account-mark]:mx-[-1px] [.sidebar-collapsed_&]:justify-center',
+ '[.sidebar-collapsed_&]:p-1.75',
+ route.folder === b.id && route.account === a.id && 'active',
+ )}
aria-current={
route.folder === b.id && route.account === a.id ? 'page' : undefined
}
@@ -315,7 +397,18 @@ export function Sidebar({
</div>
))}
<button
- className="nav-item account-create-folder"
+ className={cn(
+ 'nav-item flex gap-2.5 items-center w-full h-8.5 py-0 px-2.5 border-0 bg-none bg-transparent rounded-md',
+ 'text-[13px] text-left my-[2px] mx-0 transition-[color,background] duration-120 ease-[ease]',
+ 'focus-visible:outline-offset-[-2px] [&>svg]:text-muted [&>span:not(.account-mark)]:flex-1',
+ '[&>span:not(.account-mark)]:overflow-hidden [&>span:not(.account-mark)]:text-ellipsis',
+ '[&>span:not(.account-mark)]:whitespace-nowrap [&>span:not(.account-mark)]:relative',
+ '[&>span:not(.account-mark)]:top-[1px] [&>small]:relative [&>small]:top-[1px] hover:bg-hover',
+ 'hover:text-foreground [&.active]:bg-selected [&.active]:text-strong [&.active]:font-medium',
+ '[&.active_svg]:text-strong [&_small]:text-[11px] [&_small]:text-muted [&_small]:tabular-nums',
+ '[&>.account-mark]:my-0 [&>.account-mark]:mx-[-1px] [.sidebar-collapsed_&]:justify-center',
+ '[.sidebar-collapsed_&]:p-1.75 account-create-folder text-muted',
+ )}
onClick={() => onFolderAction('create', a.id)}
>
<Plus size={14} />
@@ -329,10 +422,28 @@ export function Sidebar({
</nav>
)}
</div>
- <div className="sidebar-bottom">
+ <div
+ className={cn(
+ "sidebar-bottom relative mt-auto pt-4 shrink-0 before:content-[''] before:absolute before:bottom-full",
+ 'before:left-0 before:right-0 before:h-7 before:bg-[linear-gradient(transparent,_var(--sidebar))]',
+ 'before:pointer-events-none [@media(max-height:700px)]:pt-2',
+ )}
+ >
{sendingIssues > 0 && (
<button
- className={'nav-item sidebar-sending' + (view === 'drafts' ? ' active' : '')}
+ className={cn(
+ 'nav-item flex gap-2.5 items-center w-full h-8.5 py-0 px-2.5 border-0 bg-none bg-transparent rounded-md',
+ 'text-secondary text-[13px] text-left my-[2px] mx-0 transition-[color,background] duration-120 ease-[ease]',
+ 'focus-visible:outline-offset-[-2px] [&>span:not(.account-mark)]:flex-1',
+ '[&>span:not(.account-mark)]:overflow-hidden [&>span:not(.account-mark)]:text-ellipsis',
+ '[&>span:not(.account-mark)]:whitespace-nowrap [&>span:not(.account-mark)]:relative',
+ '[&>span:not(.account-mark)]:top-[1px] [&>small]:relative [&>small]:top-[1px] hover:bg-hover',
+ 'hover:text-foreground [&.active]:bg-selected [&.active]:text-strong [&.active]:font-medium',
+ '[&.active_svg]:text-strong [&_small]:text-[11px] [&_small]:text-muted [&_small]:tabular-nums',
+ '[&>.account-mark]:my-0 [&>.account-mark]:mx-[-1px] [.sidebar-collapsed_&]:justify-center',
+ '[.sidebar-collapsed_&]:p-1.75 sidebar-sending [&>svg]:text-primary [&>span]:text-primary [&_small]:ml-auto',
+ view === 'drafts' && 'active',
+ )}
title={sendingText + ' Β· review in Drafts'}
aria-label={sendingText + '. Review in Drafts.'}
onClick={() => go({ view: 'drafts' })}
@@ -348,7 +459,18 @@ export function Sidebar({
)}
{unavailable.length > 0 && (
<button
- className="nav-item sidebar-status"
+ className={cn(
+ 'nav-item flex gap-2.5 items-center w-full h-8.5 py-0 px-2.5 border-0 bg-none bg-transparent rounded-md',
+ 'text-[13px] text-left my-[2px] mx-0 transition-[color,background] duration-120 ease-[ease]',
+ 'focus-visible:outline-offset-[-2px] [&>span:not(.account-mark)]:flex-1',
+ '[&>span:not(.account-mark)]:overflow-hidden [&>span:not(.account-mark)]:text-ellipsis',
+ '[&>span:not(.account-mark)]:whitespace-nowrap [&>span:not(.account-mark)]:relative',
+ '[&>span:not(.account-mark)]:top-[1px] [&>small]:relative [&>small]:top-[1px] [&.active]:bg-selected',
+ '[&.active]:text-strong [&.active]:font-medium [&.active_svg]:text-strong [&_small]:text-[11px]',
+ '[&_small]:text-muted [&_small]:tabular-nums [&>.account-mark]:my-0 [&>.account-mark]:mx-[-1px]',
+ '[.sidebar-collapsed_&]:justify-center [.sidebar-collapsed_&]:p-1.75 sidebar-status text-danger',
+ '[&>svg]:text-danger hover:text-danger hover:bg-danger/10',
+ )}
title={unavailable.map((a) => a.email + ' Β· ' + statusLabel[a.status]).join('\n')}
aria-label={statusText}
onClick={() => onSettings('accounts')}
@@ -357,7 +479,16 @@ export function Sidebar({
{!collapsed && <span>{statusText}</span>}
</button>
)}
- <div className="sidebar-footer">
+ <div
+ className={cn(
+ 'sidebar-footer flex items-center gap-1 border-t border-solid border-t-border pt-2 pb-2.5 px-0',
+ '[&>.nav-item]:flex-1 [&>.nav-item]:min-w-0 [&>.nav-item_kbd]:opacity-0 [&>.nav-item_kbd]:transition-[opacity]',
+ '[&>.nav-item_kbd]:duration-120 [&>.nav-item_kbd]:ease-[ease] [&>.nav-item:hover_kbd]:opacity-100',
+ '[&>.nav-item:focus-visible_kbd]:opacity-100 [&>.button]:text-muted [.sidebar-collapsed_&]:flex-col',
+ '[.sidebar-collapsed_&]:items-stretch [.sidebar-collapsed_&>.button]:self-center [@media(max-height:700px)]:pt-1',
+ '[@media(max-height:700px)]:pb-1.5 [@media(max-height:700px)]:px-0',
+ )}
+ >
{collapsed && (
<IconButton
label="Expand sidebar"
@@ -368,7 +499,18 @@ export function Sidebar({
</IconButton>
)}
<button
- className="nav-item"
+ className={cn(
+ 'nav-item flex gap-2.5 items-center w-full h-8.5 py-0 px-2.5 border-0 bg-none bg-transparent rounded-md',
+ 'text-secondary text-[13px] text-left my-[2px] mx-0 transition-[color,background] duration-120 ease-[ease]',
+ 'focus-visible:outline-offset-[-2px] [&>svg]:text-muted [&>span:not(.account-mark)]:flex-1',
+ '[&>span:not(.account-mark)]:overflow-hidden [&>span:not(.account-mark)]:text-ellipsis',
+ '[&>span:not(.account-mark)]:whitespace-nowrap [&>span:not(.account-mark)]:relative',
+ '[&>span:not(.account-mark)]:top-[1px] [&>small]:relative [&>small]:top-[1px] hover:bg-hover',
+ 'hover:text-foreground [&.active]:bg-selected [&.active]:text-strong [&.active]:font-medium',
+ '[&.active_svg]:text-strong [&_small]:text-[11px] [&_small]:text-muted [&_small]:tabular-nums',
+ '[&>.account-mark]:my-0 [&>.account-mark]:mx-[-1px] [.sidebar-collapsed_&]:justify-center',
+ '[.sidebar-collapsed_&]:p-1.75',
+ )}
title={'Settings' + (keys('settings') ? ' Β· ' + keys('settings') : '')}
aria-label="Settings"
onClick={() => onSettings('general')}
diff --git a/apps/desktop/src/renderer/src/SignatureSettings.tsx b/apps/desktop/src/renderer/src/SignatureSettings.tsx
index 8896656..bce8e16 100644
--- a/apps/desktop/src/renderer/src/SignatureSettings.tsx
+++ b/apps/desktop/src/renderer/src/SignatureSettings.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { useEffect, useRef, useState } from 'react'
import { useQueries } from '@tanstack/react-query'
import { Check } from '@inlark/ui/icons'
@@ -110,7 +111,7 @@ export function SignatureSettings({
const formatSwitch = (identity: Identity, address?: string) => (
<SegmentedControl
- className="signature-format"
+ className="signature-format ml-auto [&_.segmented-option]:h-6 [&_.segmented-option]:py-0 [&_.segmented-option]:px-2.25 [&_.segmented-option]:text-[11px]"
label={'Signature format' + (address ? ' for ' + address : '')}
value={identitySignature(values, identity).format}
options={formats}
@@ -128,7 +129,16 @@ export function SignatureSettings({
? query.data[0]
: undefined
return (
- <section className="signature-account" key={account.id}>
+ <section
+ className={cn(
+ 'signature-account [&>header]:flex [&>header]:items-center [&>header]:gap-2.5 [&>header]:mb-3 [&>header]:min-w-0',
+ '[&>header_strong]:text-[13px] [&>header_strong]:font-medium [&>header_strong]:text-strong',
+ '[&>header_strong]:whitespace-nowrap [&>header_span]:text-[12px] [&>header_span]:text-muted',
+ '[&>header_span]:overflow-hidden [&>header_span]:text-ellipsis [&>header_span]:whitespace-nowrap',
+ '[&>header_.signature-format]:shrink-0 py-5 px-0 border-t border-solid border-t-border',
+ )}
+ key={account.id}
+ >
<header>
<AccountMark account={account} size={20} />
<strong>{account.name}</strong>
@@ -136,13 +146,17 @@ export function SignatureSettings({
{lone && account.status === 'connected' && formatSwitch(lone)}
</header>
{account.status !== 'connected' ? (
- <p className="signature-note">Reconnect this account to edit its signatures.</p>
+ <p className="signature-note flex items-center gap-2 m-0 text-[12px] text-muted">
+ Reconnect this account to edit its signatures.
+ </p>
) : query.isPending ? (
- <p className="signature-note">
+ <p className="signature-note flex items-center gap-2 m-0 text-[12px] text-muted">
<Spinner size={12} /> Loading addresses…
</p>
) : query.isError ? (
- <p className="signature-note">Couldn’t load this account’s addresses.</p>
+ <p className="signature-note flex items-center gap-2 m-0 text-[12px] text-muted">
+ Couldn’t load this account’s addresses.
+ </p>
) : (
query.data.map((identity) => {
const key = identityKey(account.id, identity.id)
@@ -151,9 +165,22 @@ export function SignatureSettings({
const html = signature.format === 'html'
const name = identity === lone ? account.name + ' signature' : undefined
return (
- <div className="signature-identity" key={key}>
+ <div
+ className={cn(
+ 'signature-identity [&+.signature-identity]:mt-4.5 [&_textarea]:block [&_textarea]:min-h-19',
+ '[&_textarea]:text-[12px] [&_textarea]:leading-[1.6] [&_textarea]:resize-y [&_textarea.signature-code]:min-h-30',
+ '[&_textarea.signature-code]:font-mono [&_textarea.signature-code]:text-[11.5px]',
+ '[&_textarea.signature-code]:[tab-size:2] [&_textarea.signature-code]:[overflow-wrap:anywhere]',
+ )}
+ key={key}
+ >
{identity !== lone && (
- <div className="signature-identity-heading">
+ <div
+ className={cn(
+ 'signature-identity-heading [&_label]:flex-1 [&_label]:min-w-0 [&_label]:m-0 [&_label]:text-secondary',
+ '[&_label]:overflow-hidden [&_label]:text-ellipsis [&_label]:whitespace-nowrap flex items-center gap-3 mb-2',
+ )}
+ >
<label htmlFor={id}>
{identity.name ? identity.name + ' Β· ' : ''}
{identity.email}
@@ -161,11 +188,11 @@ export function SignatureSettings({
{formatSwitch(identity, identity.email)}
</div>
)}
- <div className="signature-editor">
+ <div className="signature-editor relative">
<textarea
id={id}
rows={html ? 6 : 3}
- className={html ? 'signature-code' : undefined}
+ className={cn(html ? 'signature-code' : undefined)}
aria-label={name && (html ? name + ' HTML' : name)}
value={signature.value}
placeholder={html ? 'Paste or write HTML…' : 'No signature'}
@@ -176,7 +203,11 @@ export function SignatureSettings({
onBlur={() => void save(latest.current)}
/>
<span
- className={'signature-saved' + (savedKey === key ? ' visible' : '')}
+ className={cn(
+ 'signature-saved absolute right-2.5 bottom-2 inline-flex items-center gap-1 text-[11px] text-muted opacity-0',
+ 'transition-[opacity] duration-160 ease-[ease] pointer-events-none [&.visible]:opacity-100',
+ savedKey === key && 'visible',
+ )}
aria-live="polite"
>
{savedKey === key && (
@@ -187,12 +218,12 @@ export function SignatureSettings({
</span>
</div>
{html && signature.value.trim() && (
- <div className="signature-preview">
+ <div className="signature-preview [&>span]:block [&>span]:mb-1.5 [&>span]:text-[11px] [&>span]:text-muted [&>div]:max-h-65 [&>div]:overflow-auto [&_.signature-note]:mt-2 mt-2.5">
<span>Preview</span>
<SignaturePreview html={signature.value} />
{!remoteImages &&
/<img[^>]+src\s*=\s*["']?https?:/i.test(signature.value) && (
- <p className="signature-note">
+ <p className="signature-note flex items-center gap-2 m-0 text-[12px] text-muted">
Turn on Load remote images in General to preview linked images.
Recipients still see them.
</p>
diff --git a/apps/desktop/src/renderer/src/UpdateNotice.tsx b/apps/desktop/src/renderer/src/UpdateNotice.tsx
index e37452b..5420c74 100644
--- a/apps/desktop/src/renderer/src/UpdateNotice.tsx
+++ b/apps/desktop/src/renderer/src/UpdateNotice.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { ArrowUpRight, Download, RefreshCw } from '@inlark/ui/icons'
import type { UpdateStatus } from '@inlark/core'
import { api } from './api'
@@ -6,11 +7,21 @@ export function UpdateNotice({ status }: { status: UpdateStatus }) {
if (status.phase === 'idle') return null
const manual = status.phase === 'manual'
return (
- <section className={'update-notice' + (manual ? ' update-notice-manual' : '')}>
- <span className="update-notice-icon" aria-hidden="true">
+ <section
+ className={cn(
+ 'update-notice flex items-center gap-3 py-3 px-5.5 border-b border-solid border-b-border shrink-0',
+ manual
+ ? ' update-notice-manual bg-[color-mix(in_srgb,_var(--raised)_75%,_var(--bg))]'
+ : ' bg-[color-mix(in_srgb,_var(--accent)_7%,_var(--bg))]',
+ )}
+ >
+ <span
+ className="update-notice-icon w-7.5 h-7.5 rounded-lg grid place-items-center text-primary bg-primary-tint shrink-0"
+ aria-hidden="true"
+ >
{manual ? <Download size={17} /> : <RefreshCw size={17} />}
</span>
- <div className="update-notice-copy">
+ <div className="update-notice-copy [&_strong]:text-foreground [&_strong]:font-semibold [&>span]:text-muted min-w-0 flex-1 flex flex-col gap-[2px] text-[12px] leading-[1.4]">
<strong>
{manual
? `Inlark ${status.version} is available`
@@ -27,7 +38,11 @@ export function UpdateNotice({ status }: { status: UpdateStatus }) {
</span>
{status.phase === 'downloading' && (
<div
- className="update-notice-progress"
+ className={cn(
+ 'update-notice-progress [&_span]:block [&_span]:h-full [&_span]:rounded-[inherit] [&_span]:bg-primary',
+ '[&_span]:transition-[width] [&_span]:duration-180 [&_span]:ease-[ease] mt-1.75 w-[min(280px,_100%)] h-[3px]',
+ 'rounded-xs bg-border-strong overflow-hidden',
+ )}
role="progressbar"
aria-label="Update download"
aria-valuemin={0}
@@ -41,7 +56,11 @@ export function UpdateNotice({ status }: { status: UpdateStatus }) {
{manual && (
<button
type="button"
- className="update-notice-action"
+ className={cn(
+ 'update-notice-action inline-flex items-center gap-1.25 whitespace-nowrap border border-solid',
+ 'border-border-strong rounded-md py-1.75 px-2.25 text-foreground bg-raised text-[11px] font-semibold',
+ 'cursor-pointer hover:bg-hover',
+ )}
onClick={() => void api.openExternal('https://inlark.com/download').catch(() => {})}
>
Download update <ArrowUpRight size={14} />
diff --git a/apps/desktop/src/renderer/src/main.tsx b/apps/desktop/src/renderer/src/main.tsx
index fde74a7..fb81429 100644
--- a/apps/desktop/src/renderer/src/main.tsx
+++ b/apps/desktop/src/renderer/src/main.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import React from 'react'
import { createRoot } from 'react-dom/client'
import { QueryClientProvider } from '@tanstack/react-query'
@@ -66,10 +67,18 @@ class ErrorBoundary extends React.Component<{ children: React.ReactNode }, { err
}
render() {
return this.state.error ? (
- <div className="startup-error">
+ <div className="startup-error [&_h1]:text-[23px] [&_p]:text-muted [&_p]:leading-[1.8] max-w-130 my-[20vh] mx-auto p-6.25">
<h1>Something went wrong</h1>
<p>Inlark ran into an unexpected problem. Your saved drafts are safe on this device.</p>
- <button className="button" onClick={() => location.reload()}>
+ <button
+ className={cn(
+ 'button inline-flex items-center justify-center gap-1.75 border border-solid border-border-strong bg-surface',
+ 'rounded-md py-1.5 px-2.75 text-[12px] font-medium whitespace-nowrap transition-[background,color] duration-120',
+ 'ease-[ease] min-h-8 [&:hover:not(:disabled)]:bg-hover [&:hover:not(:disabled)]:border-foreground/24',
+ "[&[aria-disabled='true']]:opacity-40 [&[aria-disabled='true']]:cursor-default",
+ )}
+ onClick={() => location.reload()}
+ >
Reload Inlark
</button>
</div>
diff --git a/apps/desktop/src/renderer/src/shortcuts.tsx b/apps/desktop/src/renderer/src/shortcuts.tsx
index f38df2a..8776ca4 100644
--- a/apps/desktop/src/renderer/src/shortcuts.tsx
+++ b/apps/desktop/src/renderer/src/shortcuts.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { Fragment, createContext, useContext } from 'react'
import {
detectPlatform,
@@ -318,10 +319,12 @@ export function useShortcutHandlers(
/** The keys of a binding, with β€œthen” between the steps of a sequence. */
export function ShortcutKeys({ binding, className }: { binding: Binding; className?: string }) {
return (
- <span className={'shortcut-keys' + (className ? ' ' + className : '')}>
+ <span className={cn('shortcut-keys inline-flex items-center gap-[3px]', className)}>
{binding.map((chord, step) => (
<Fragment key={step}>
- {step > 0 && <span className="shortcut-then">then</span>}
+ {step > 0 && (
+ <span className="shortcut-then my-0 mx-[1px] text-[10px] text-faint">then</span>
+ )}
{chordKeys(chord).map((key, index) => (
<kbd key={index}>{key}</kbd>
))}
diff --git a/apps/desktop/src/renderer/src/signature.tsx b/apps/desktop/src/renderer/src/signature.tsx
index 6b04438..af19a46 100644
--- a/apps/desktop/src/renderer/src/signature.tsx
+++ b/apps/desktop/src/renderer/src/signature.tsx
@@ -1,3 +1,4 @@
+import { cn } from '@inlark/ui'
import { useEffect, useRef } from 'react'
import DOMPurify from 'dompurify'
import {
@@ -114,13 +115,23 @@ export function SignaturePreview({ html }: { html: string }) {
function SignatureView({ node, selected, deleteNode }: ReactNodeViewProps) {
return (
<NodeViewWrapper
- className={'compose-signature' + (selected ? ' selected' : '')}
+ className={cn(
+ 'compose-signature relative mt-1 mb-4 mx-0 rounded-[7px] [outline:1px_solid_transparent] outline-offset-[4px]',
+ 'transition-[outline-color] duration-120 ease-[ease] hover:outline-[var(--border)] [&.selected]:outline-2',
+ '[&.selected]:outline-solid [&.selected]:outline-primary [&:hover_.compose-signature-remove]:opacity-100',
+ '[&.selected_.compose-signature-remove]:opacity-100',
+ selected && 'selected',
+ )}
contentEditable={false}
>
<SignaturePreview html={node.attrs.html} />
<button
type="button"
- className="compose-signature-remove"
+ className={cn(
+ 'compose-signature-remove absolute top-[-2px] right-[-2px] grid place-items-center w-5.5 h-5.5 border',
+ 'border-solid border-border-strong rounded-md bg-raised text-muted opacity-0 transition-[opacity] duration-120',
+ 'ease-[ease] focus-visible:opacity-100 hover:text-foreground',
+ )}
aria-label="Remove signature"
title="Remove signature"
onClick={deleteNode}
diff --git a/apps/desktop/src/renderer/src/styles.css b/apps/desktop/src/renderer/src/styles.css
index 834c0bf..d44bf7f 100644
--- a/apps/desktop/src/renderer/src/styles.css
+++ b/apps/desktop/src/renderer/src/styles.css
@@ -1,3000 +1,44 @@
#root {
height: 100vh;
}
-.app-shell {
- display: flex;
- height: 100%;
- min-width: 0;
- padding: 8px 8px 8px 0;
- background: var(--sidebar);
- --row-height: 64px;
- /* Width of the navigation rail; overlays such as the toast centre on the content beside it. */
- --rail: 224px;
-}
-.app-shell.sidebar-collapsed {
- --rail: 64px;
-}
-.app-shell.density-compact {
- --row-height: 44px;
-}
-.sidebar {
- position: relative;
- width: 224px;
- flex-shrink: 0;
- display: flex;
- flex-direction: column;
- padding: 0 12px;
- overflow: hidden;
-}
-.sidebar-brand {
- height: 56px;
- display: flex;
- align-items: center;
- gap: 6px;
- padding: 0 8px;
- flex-shrink: 0;
-}
-.brand-mark {
- height: 24px;
- width: 24px;
- display: block;
- flex-shrink: 0;
-}
-.brand-wordmark {
- color: #fff;
- height: 16px;
- width: auto;
-}
-:root[data-theme='light'] .brand-mark {
- filter: brightness(0);
-}
-:root[data-theme='light'] .brand-wordmark {
- color: #000;
-}
-.sidebar-tools {
- position: absolute;
- top: 14px;
- right: 12px;
- display: flex;
- align-items: center;
- gap: 4px;
- flex-shrink: 0;
-}
-.sidebar-tools .button {
- width: 27px;
- height: 27px;
- min-height: 27px;
- padding: 0;
- color: var(--muted);
-}
-.sidebar-tools .sidebar-compose {
- border-radius: 7px;
- background: var(--raised);
- color: var(--text-strong);
-}
-.sidebar-scroll {
- flex: 1;
- min-height: 0;
- /* The scrollbar appears on hover; toggling overflow (rather than the thumb colour) makes
- Chromium repaint it, and the stable gutter keeps the items from shifting. */
- overflow-y: hidden;
- scrollbar-gutter: stable;
- /* Pull the scrollbar into the sidebar's edge padding so it never crowds the items. */
- margin-right: -9px;
- padding: 0 3px 16px 0;
-}
-.sidebar-scroll:hover,
-.sidebar-scroll:focus-within {
- overflow-y: auto;
-}
-.nav-item {
- display: flex;
- gap: 10px;
- align-items: center;
- width: 100%;
- height: 34px;
- padding: 0 10px;
- border: 0;
- background: none;
- border-radius: 6px;
- color: var(--secondary);
- font-size: 13px;
- text-align: left;
- margin: 2px 0;
- transition:
- color 120ms,
- background 120ms;
-}
-/* The scroll area clips anything outside it, so draw the ring inside the item. */
-.nav-item:focus-visible {
- outline-offset: -2px;
-}
-.nav-item > svg {
- color: var(--muted);
-}
-.nav-item > span:not(.account-mark) {
- flex: 1;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.nav-item > span:not(.account-mark),
-.nav-item > small {
- position: relative;
- top: 1px;
-}
-.nav-item:hover {
- background: var(--hover);
- color: var(--text);
-}
-.nav-item.active {
- background: var(--selected);
- color: var(--text-strong);
- font-weight: 500;
-}
-.nav-item.active svg {
- color: var(--text-strong);
-}
-.nav-item small {
- font-size: 11px;
- color: var(--muted);
- font-variant-numeric: tabular-nums;
-}
-.nav-secondary-start {
- margin-top: 13px;
-}
-.sidebar-section-label {
- margin: 23px 3px 5px 10px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- color: var(--muted);
- font-size: 11px;
- font-weight: 500;
- height: 24px;
-}
-.sidebar-section-toggle {
- display: inline-flex;
- align-items: center;
- gap: 6px;
- min-width: 0;
- padding: 0;
- border: 0;
- background: none;
- color: inherit;
- font: inherit;
- cursor: pointer;
-}
-.sidebar-section-toggle:hover {
- color: var(--text);
-}
-.sidebar-section-toggle svg,
-.account-chevron {
- flex-shrink: 0;
- transition: transform 120ms;
-}
-.sidebar-section-toggle svg.closed,
-.account-chevron.closed {
- transform: rotate(-90deg);
-}
-.account-toggle.account-current {
- color: var(--text);
-}
-.account-toggle .account-chevron {
- margin-left: auto;
- color: var(--faint);
-}
-.account-children {
- margin: 1px 0 8px 18px;
- padding-left: 5px;
- border-left: 1px solid var(--border);
-}
-.account-children .nav-item {
- height: 30px;
- font-size: 12px;
-}
-.account-children .nav-item > svg {
- flex-shrink: 0;
-}
-.account-create-folder {
- color: var(--muted);
-}
-/* A round avatar: the account's picture, or its generated marble pattern. */
-.account-mark {
- --mark-size: 16px;
- --mark-ring: rgb(255 255 255 / 0.08);
- position: relative;
- width: var(--mark-size);
- height: var(--mark-size);
- flex-shrink: 0;
- display: inline-flex;
- border-radius: 50%;
- overflow: hidden;
-}
-:root[data-theme='light'] .account-mark {
- --mark-ring: rgb(0 0 0 / 0.08);
-}
-/* A hairline keeps pictures with a background like the surface from blending into it. */
-.account-mark::after {
- content: '';
- position: absolute;
- inset: 0;
- border-radius: inherit;
- box-shadow: inset 0 0 0 1px var(--mark-ring);
- pointer-events: none;
-}
-.account-mark > svg,
-.account-mark > img {
- display: block;
- width: 100%;
- height: 100%;
- object-fit: cover;
-}
-/* Wider than the 16px nav icons, so pull it in to keep the labels aligned. */
-.nav-item > .account-mark {
- margin: 0 -1px;
-}
-.account-mark.disconnected {
- opacity: 0.4;
-}
-.folder-nav-row {
- display: flex;
- align-items: center;
-}
-.folder-nav-row .nav-item {
- flex: 1;
- min-width: 0;
-}
-.folder-nav-row > .button {
- opacity: 0;
-}
-.folder-nav-row:hover > .button,
-.folder-nav-row:focus-within > .button {
- opacity: 1;
-}
-.sidebar-bottom {
- position: relative;
- margin-top: auto;
- padding-top: 16px;
- flex-shrink: 0;
-}
-/* Fade scrolled items out above the footer instead of cutting them off. */
-.sidebar-bottom::before {
- content: '';
- position: absolute;
- bottom: 100%;
- left: 0;
- right: 0;
- height: 28px;
- background: linear-gradient(transparent, var(--sidebar));
- pointer-events: none;
-}
-.connection-dot {
- width: 5px;
- height: 5px;
- border-radius: 50%;
- background: var(--green);
- display: inline-block;
- flex-shrink: 0;
-}
-.sidebar-footer {
- display: flex;
- align-items: center;
- gap: 4px;
- border-top: 1px solid var(--border);
- padding: 8px 0 10px;
-}
-.sidebar-footer > .nav-item {
- flex: 1;
- min-width: 0;
-}
-.sidebar-footer > .nav-item kbd {
- opacity: 0;
- transition: opacity 120ms;
-}
-.sidebar-footer > .nav-item:hover kbd,
-.sidebar-footer > .nav-item:focus-visible kbd {
- opacity: 1;
-}
-.sidebar-footer > .button {
- color: var(--muted);
-}
-.sidebar-status,
-.sidebar-status > svg {
- color: var(--red);
-}
-.sidebar-status:hover {
- color: var(--red);
- background: color-mix(in srgb, var(--red) 10%, transparent);
-}
-.sidebar-collapsed .sidebar {
- width: 64px;
- padding: 0 9px;
-}
-.sidebar-collapsed .sidebar-brand {
- justify-content: center;
- padding: 5px;
-}
-.sidebar-collapsed .sidebar-tools {
- position: static;
- flex-direction: column;
- gap: 6px;
- padding: 0 0 15px;
-}
-.sidebar-collapsed .nav-item {
- justify-content: center;
- padding: 7px;
-}
-/* The label is empty when collapsed; keep only the same gap as between the view groups. */
-.sidebar-collapsed .sidebar-section-label {
- height: 0;
- margin: 13px 0 0;
-}
-.sidebar-collapsed .sidebar-footer {
- flex-direction: column;
- align-items: stretch;
-}
-.sidebar-collapsed .sidebar-footer > .button {
- align-self: center;
-}
-.main-content {
- container-type: inline-size;
- position: relative;
- flex: 1;
- min-width: 0;
- display: flex;
- flex-direction: column;
- background: var(--bg);
- border: 1px solid var(--border-strong);
- border-radius: 10px;
- overflow: hidden;
- box-shadow: 0 2px 8px #0000000a;
-}
-.update-notice {
- display: flex;
- align-items: center;
- gap: 12px;
- padding: 12px 22px;
- border-bottom: 1px solid var(--border);
- background: color-mix(in srgb, var(--accent) 7%, var(--bg));
- flex-shrink: 0;
-}
-.update-notice-manual {
- background: color-mix(in srgb, var(--raised) 75%, var(--bg));
-}
-.update-notice-icon {
- width: 30px;
- height: 30px;
- border-radius: 8px;
- display: grid;
- place-items: center;
- color: var(--accent);
- background: var(--accent-tint);
- flex-shrink: 0;
-}
-.update-notice-copy {
- min-width: 0;
- flex: 1;
- display: flex;
- flex-direction: column;
- gap: 2px;
- font-size: 12px;
- line-height: 1.4;
-}
-.update-notice-copy strong {
- color: var(--text);
- font-weight: 600;
-}
-.update-notice-copy > span {
- color: var(--muted);
-}
-.update-notice-progress {
- margin-top: 7px;
- width: min(280px, 100%);
- height: 3px;
- border-radius: 4px;
- background: var(--border-strong);
- overflow: hidden;
-}
-.update-notice-progress span {
- display: block;
- height: 100%;
- border-radius: inherit;
- background: var(--accent);
- transition: width 180ms ease;
-}
-.update-notice-action {
- display: inline-flex;
- align-items: center;
- gap: 5px;
- white-space: nowrap;
- border: 1px solid var(--border-strong);
- border-radius: 6px;
- padding: 7px 9px;
- color: var(--text);
- background: var(--raised);
- font-size: 11px;
- font-weight: 600;
- cursor: pointer;
-}
-.update-notice-action:hover {
- background: var(--hover);
-}
-.list-heading {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 21px 28px 19px;
- flex-shrink: 0;
- gap: 16px;
-}
-.list-heading h1 {
- margin: 0;
- display: flex;
- align-items: center;
- gap: 10px;
- font-size: 22px;
- letter-spacing: -0.65px;
- line-height: 1.3;
- font-weight: 600;
-}
-.list-heading h1 > span {
- font-size: 12px;
- letter-spacing: 0;
- font-weight: 500;
- color: var(--muted);
- background: var(--surface);
- border: 1px solid var(--border);
- padding: 2px 7px;
- border-radius: 6px;
- font-variant-numeric: tabular-nums;
-}
-.list-heading p {
- color: var(--muted);
- font-size: 12px;
- margin: 7px 0 0;
-}
-.list-heading-actions {
- display: flex;
- align-items: center;
- gap: 5px;
-}
-.filter-dot {
- background: var(--accent);
- width: 5px;
- height: 5px;
- border-radius: 50%;
-}
-.menu-label {
- padding: 7px 10px;
- font-size: 11px;
- color: var(--muted);
-}
-.menu-check {
- width: 15px;
- display: inline-flex;
- color: var(--accent);
-}
-.list-toolbar {
- display: flex;
- align-items: center;
- gap: 16px;
- height: 46px;
- padding: 0 28px;
- border-bottom: 1px solid var(--border);
- flex-shrink: 0;
-}
-.list-tabs {
- display: flex;
- gap: 20px;
- height: 100%;
-}
-.list-tabs button {
- background: none;
- border: 0;
- border-bottom: 2px solid transparent;
- padding: 0 1px;
- font-size: 12px;
- color: var(--muted);
-}
-.list-tabs button:hover {
- color: var(--text);
-}
-.list-tabs button.active {
- color: var(--text);
- border-bottom-color: var(--accent);
- font-weight: 500;
-}
-.selection-count {
- font-size: 12px;
- color: var(--text);
-}
-.text-action {
- border: 0;
- background: none;
- color: var(--accent);
- font-size: 11px;
- padding: 0;
- text-align: left;
-}
-.text-action:hover {
- text-decoration: underline;
-}
-.mail-search {
- margin: 0 28px 16px;
- display: flex;
- align-items: center;
- gap: 10px;
- border: 1px solid var(--border-strong);
- background: var(--surface);
- padding: 3px 8px 3px 13px;
- border-radius: 7px;
- color: var(--muted);
-}
-.mail-search input {
- border: 0;
- background: none;
- padding: 7px 0;
- font-size: 13px;
-}
-.mail-search:focus-within {
- border-color: var(--accent-solid);
- box-shadow: 0 0 0 3px var(--accent-tint);
-}
-.mail-list {
- flex: 1;
- overflow: auto;
- min-height: 0;
- outline: none;
- overflow-anchor: none;
- scrollbar-gutter: stable;
- padding-bottom: 16px;
-}
-.mail-list:focus-visible {
- box-shadow: inset 0 0 0 1px var(--border-strong);
- border-radius: 0;
-}
-.date-group {
- height: 36px;
- display: flex;
- align-items: center;
- padding: 0 28px;
- color: var(--muted);
- font-size: 11px;
- font-weight: 500;
- background: var(--bg);
- border-bottom: 1px solid var(--border);
-}
-.mail-row {
- display: flex;
- align-items: center;
- height: var(--row-height);
- padding: 0 20px 0 28px;
- gap: 16px;
- cursor: pointer;
- border-bottom: 1px solid var(--border);
- font-size: 13px;
- position: relative;
-}
-.mail-row.unread {
- background: color-mix(in srgb, var(--surface) 32%, var(--bg));
-}
-.mail-row:hover {
- background: var(--hover);
-}
-.mail-row.focused {
- box-shadow: inset 2px 0 var(--accent);
- background: var(--selected);
-}
-.mail-row.selected {
- background: var(--selected);
-}
-.mail-list:has(.selected) {
- padding-bottom: 88px;
-}
-.row-selector {
- position: relative;
- width: 16px;
- flex-shrink: 0;
- height: 24px;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-.row-selector .checkbox {
- position: absolute;
- opacity: 0;
-}
-.unread-dot {
- width: 5px;
- height: 5px;
- border-radius: 50%;
- background: var(--accent);
- opacity: 0;
- pointer-events: none;
-}
-.unread-dot.visible {
- opacity: 1;
-}
-.mail-list:has(.selected) .row-selector .checkbox,
-.mail-row:hover .row-selector .checkbox,
-.mail-row.selected .row-selector .checkbox,
-.row-selector:focus-within .checkbox {
- opacity: 1;
-}
-.mail-list:has(.selected) .unread-dot,
-.mail-row:hover .unread-dot,
-.mail-row.selected .unread-dot,
-.row-selector:focus-within .unread-dot {
- opacity: 0;
-}
-.row-sender {
- display: flex;
- align-items: center;
- gap: 10px;
- width: min(var(--sender-width, 180px), 38%);
- flex-shrink: 0;
- color: var(--secondary);
-}
-.row-sender > span:not(.avatar) {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.row-sender small {
- color: var(--muted);
- font-size: 10px;
- padding: 0 4px;
- background: var(--surface);
- border-radius: 4px;
-}
-.row-sender .avatar {
- border-radius: 7px;
- font-size: 10px !important;
- box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--avatar-color) 9%, transparent);
-}
-.row-content {
- flex: 1;
- min-width: 0;
- display: flex;
- flex-direction: column;
- gap: 3px;
- overflow: hidden;
- white-space: nowrap;
-}
-.row-subject,
-.row-preview {
- overflow: hidden;
- text-overflow: ellipsis;
-}
-.row-subject {
- color: var(--secondary);
- line-height: 20px;
-}
-.row-preview {
- color: var(--muted);
- font-size: 12px;
- line-height: 18px;
-}
-.unread .row-subject,
-.unread .row-sender {
- color: var(--text-strong);
- font-weight: 550;
-}
-.row-meta {
- display: flex;
- align-items: center;
- gap: 9px;
- color: var(--muted);
- flex-shrink: 0;
- position: relative;
-}
-.row-meta time {
- width: 58px;
- text-align: right;
- font-size: 11px;
- font-variant-numeric: tabular-nums;
-}
-.row-attachment {
- width: 13px;
-}
-.row-star {
- display: grid;
- place-items: center;
- background: none;
- border: 0;
- border-radius: 5px;
- padding: 5px;
- color: var(--faint);
- opacity: 0;
- transition:
- opacity 120ms ease,
- color 120ms ease,
- background-color 120ms ease;
-}
-.row-star svg {
- transition:
- fill 120ms ease,
- transform 160ms cubic-bezier(0.3, 1.5, 0.6, 1);
-}
-.mail-row:hover .row-star,
-.mail-row:focus-within .row-star,
-.row-star.starred {
- opacity: 1;
-}
-.row-star:hover:not(:disabled) {
- color: var(--secondary);
- background: color-mix(in srgb, var(--text-strong) 8%, transparent);
-}
-.row-star:active:not(:disabled) svg {
- transform: scale(0.85);
-}
-.row-star.starred,
-.row-star.starred:hover:not(:disabled) {
- color: var(--star);
-}
-.row-star.starred svg,
-svg.starred {
- fill: currentColor;
-}
-.starred {
- color: var(--star);
-}
-.row-quick-actions {
- position: absolute;
- right: 30px;
- display: flex;
- gap: 2px;
- padding: 2px;
- border: 1px solid var(--border-strong);
- border-radius: 6px;
- background: var(--raised);
- box-shadow: 0 2px 6px #0002;
- opacity: 0;
- pointer-events: none;
-}
-.mail-row:hover .row-quick-actions,
-.mail-row:focus-within .row-quick-actions {
- opacity: 1;
- pointer-events: auto;
-}
-.density-compact .row-content {
- flex-direction: row;
- gap: 12px;
- align-items: baseline;
-}
-.density-compact .row-subject {
- max-width: 75%;
- flex-shrink: 0;
-}
-.density-compact .row-sender .avatar {
- width: 24px !important;
- height: 24px !important;
-}
-.list-footer {
- display: flex;
- align-items: center;
- justify-content: space-between;
- border-top: 1px solid var(--border);
- min-height: 33px;
- padding: 0 24px;
- color: var(--muted);
- font-size: 10px;
- gap: 16px;
-}
-.list-footer > span,
-.footer-shortcuts {
- display: flex;
- align-items: center;
- gap: 6px;
-}
-.footer-shortcuts {
- background: none;
- border: 0;
- color: var(--muted);
- font-size: 10px;
- padding: 4px 0;
-}
-.footer-shortcuts:hover {
- color: var(--text);
-}
-.footer-shortcuts > span:not(.shortcut-keys) {
- margin-right: 9px;
-}
-.list-footer kbd {
- height: 17px;
- min-width: 17px;
- padding: 0 3px;
- font-size: 9px;
-}
-.load-more {
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 8px;
- font-size: 12px;
- color: var(--muted);
- padding: 15px;
-}
-.connection-banner {
- padding: 9px 30px;
- font-size: 11px;
- display: flex;
- align-items: center;
- gap: 9px;
- color: var(--secondary);
- background: var(--accent-tint);
-}
-.connection-banner button {
- margin-left: auto;
- border: 0;
- background: none;
- color: var(--accent);
-}
-.reader-page {
- flex: 1;
- display: flex;
- flex-direction: column;
- min-height: 0;
-}
-.reader-toolbar {
- height: 57px;
- border-bottom: 1px solid var(--border);
- display: flex;
- align-items: center;
- padding: 0 20px;
- gap: 5px;
- flex-shrink: 0;
-}
-.toolbar-divider {
- width: 1px;
- height: 17px;
- background: var(--border-strong);
- margin: 0 4px;
-}
-.reader-navigation {
- margin-left: auto;
- display: flex;
- gap: 6px;
- align-items: center;
-}
-.reader-navigation > span {
- font-size: 11px;
- color: var(--muted);
- margin-right: 10px;
-}
-.reader-scroll {
- flex: 1;
- overflow: auto;
-}
-/* Focused on open so the keyboard scrolls the conversation; the whole pane needs no ring. */
-.reader-scroll:focus-visible {
- outline: none;
-}
-.reader-content {
- width: min(840px, 100%);
- margin: 0 auto;
- padding: 40px 40px 48px;
-}
-.reader-eyebrow {
- display: flex;
- gap: 9px;
- align-items: center;
- font-size: 11px;
- color: var(--secondary);
-}
-.reader-eyebrow > span:last-child {
- color: var(--muted);
-}
-.reader-content h1 {
- font-size: 27px;
- font-weight: 550;
- letter-spacing: -0.7px;
- line-height: 1.4;
- margin: 14px 0 30px;
- overflow-wrap: anywhere;
-}
-.message-card {
- padding: 24px 0;
- border-top: 1px solid var(--border-strong);
-}
-.message-heading {
- display: flex;
- gap: 12px;
- align-items: center;
-}
-.message-person {
- display: flex;
- flex-direction: column;
- min-width: 0;
- flex: 1;
- align-items: flex-start;
- text-align: left;
- background: none;
- border: 0;
- padding: 0;
-}
-.sender-name {
- font-size: 13px;
- font-weight: 550;
- max-width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-.sender-address {
- font-weight: 400;
- font-size: 11px;
- color: var(--muted);
- margin-left: 8px;
-}
-.message-to {
- color: var(--muted);
- font-size: 11px;
- margin-top: 3px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- max-width: 100%;
-}
-.message-heading time {
- color: var(--muted);
- font-size: 11px;
- white-space: nowrap;
-}
-.message-content {
- padding: 24px 0 2px 47px;
-}
-.email-frame {
- width: 100%;
- border: 0;
- border-radius: 8px;
- display: block;
- min-height: 40px;
- background: #fff;
- color-scheme: light;
-}
-.email-frame-adaptive {
- background: transparent;
- border-radius: 0;
- color-scheme: inherit;
-}
-.email-fallback {
- padding: 2px 0 4px;
- color: var(--text);
- font:
- 15px/1.7 Inter,
- -apple-system,
- BlinkMacSystemFont,
- 'Segoe UI',
- sans-serif;
- overflow-wrap: anywhere;
- white-space: pre-wrap;
-}
-.email-render-details {
- margin-top: 12px;
- color: var(--muted);
- font-size: 12px;
-}
-.email-render-details summary {
- cursor: pointer;
-}
-.email-render-details p {
- margin: 8px 0;
-}
-.email-render-details pre {
- max-height: 220px;
- padding: 12px;
- overflow: auto;
- border: 1px solid var(--border);
- border-radius: 6px;
- user-select: text;
- white-space: pre-wrap;
-}
-.email-render-details button {
- margin-right: 10px;
- padding: 5px 8px;
- border: 1px solid var(--border);
- border-radius: 5px;
- background: transparent;
- color: inherit;
- cursor: pointer;
-}
-.image-notice {
- display: flex;
- gap: 7px;
- align-items: center;
- color: var(--muted);
- font-size: 11px;
- padding: 8px 0 17px;
-}
-.message-details {
- display: grid;
- grid-template-columns: 70px 1fr;
- gap: 6px;
- padding: 14px 16px;
- margin: 16px 0 0 47px;
- background: var(--surface);
- border-radius: 7px;
- font-size: 11px;
-}
-.message-details dt {
- color: var(--muted);
-}
-.message-details dd {
- margin: 0;
- overflow-wrap: anywhere;
-}
-.collapsed-message .message-heading {
- opacity: 0.7;
-}
-/* Leaving a mailing list is a conversation action, so it sits with the others in the toolbar. */
-.unsubscribe-button {
- min-height: 29px;
- height: 29px;
- padding: 0 10px 0 8px;
- gap: 6px;
-}
-.unsubscribe-button svg {
- flex-shrink: 0;
-}
-.unsubscribe-button:disabled {
- opacity: 1;
-}
-.unsubscribe-pending {
- color: var(--muted);
-}
-.unsubscribe-done {
- color: var(--green);
-}
-.attachment-list {
- display: flex;
- gap: 10px;
- flex-wrap: wrap;
- margin-top: 20px;
-}
-.attachment-card {
- display: flex;
- align-items: center;
- gap: 10px;
- border: 1px solid var(--border-strong);
- border-radius: 8px;
- padding: 11px;
- max-width: 100%;
- background: var(--surface);
-}
-.attachment-icon {
- color: var(--muted);
- padding: 0 4px;
-}
-.attachment-card > button:not(.button) {
- border: 0;
- background: none;
- text-align: left;
- padding: 0;
- min-width: 0;
-}
-.attachment-card strong {
- display: block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-size: 11px;
- font-weight: 500;
-}
-.attachment-card span {
- color: var(--muted);
- font-size: 11px;
-}
-.reply-bar {
- display: flex;
- gap: 10px;
- padding: 0 14px 12px 45px;
-}
-.toast {
- position: fixed;
- bottom: 23px;
- left: calc(50% + var(--rail) / 2 - 4px);
- transform: translateX(-50%);
- z-index: 150;
- display: flex;
- gap: 13px;
- align-items: center;
- max-width: 75vw;
- background: var(--raised);
- border: 1px solid var(--border-strong);
- box-shadow: var(--shadow);
- padding: 11px 15px;
- border-radius: 8px;
- font-size: 12px;
-}
-.toast > svg {
- color: var(--accent);
-}
-.toast > span {
- max-width: 600px;
-}
-.toast button {
- border: 0;
- background: none;
- color: var(--accent);
- font-size: 11px;
- padding: 3px;
-}
-.toast button:last-child {
- color: var(--muted);
-}
-.modal-actions {
- display: flex;
- justify-content: flex-end;
- gap: 8px;
- margin-top: 24px;
-}
-.checkbox-label {
- display: flex;
- align-items: center;
- gap: 9px;
- font-size: 12px;
-}
-.form-field {
- margin-top: 15px;
-}
-.form-field input {
- margin-top: 6px;
- font-size: 12px;
-}
-.field-hint {
- color: var(--muted);
- font-size: 11px;
- display: block;
- margin-top: 5px;
-}
-.form-error,
-.form-notice {
- display: flex;
- gap: 8px;
- font-size: 11px;
- line-height: 1.6;
- margin: 15px 0;
- color: var(--red);
-}
-.form-notice {
- color: var(--muted);
-}
-.form-notice svg,
-.form-error svg {
- flex-shrink: 0;
- margin-top: 3px;
-}
-.settings-modal {
- width: min(880px, calc(100vw - 40px));
- padding: 0;
- overflow: visible;
-}
-/* No title bar: the title labels the navigation column and the close button floats in the corner. */
-.settings-modal > .modal-heading {
- position: absolute;
- inset: 0 0 auto;
- z-index: 1;
- align-items: center;
- margin: 0;
- padding: 14px 14px 0 20px;
- pointer-events: none;
-}
-.settings-modal > .modal-heading > * {
- pointer-events: auto;
-}
-.settings-modal .modal-title {
- font-size: 12px;
- font-weight: 500;
- letter-spacing: 0;
- color: var(--muted);
-}
-.settings-modal > .modal-heading > .button {
- color: var(--muted);
-}
-.settings-layout {
- display: flex;
- min-height: 0;
- height: min(620px, calc(100dvh - 80px));
- overflow: hidden;
- border-radius: inherit;
-}
-.settings-nav {
- width: 200px;
- flex-shrink: 0;
- background: var(--sidebar);
- padding: 50px 10px 12px;
- display: flex;
- flex-direction: column;
- gap: 2px;
- border-right: 1px solid var(--border);
-}
-.settings-nav button {
- display: flex;
- gap: 10px;
- align-items: center;
- height: 32px;
- background: none;
- border: 0;
- padding: 0 10px;
- text-align: left;
- font-size: 12px;
- color: var(--secondary);
- border-radius: 6px;
- transition:
- color 120ms,
- background 120ms;
-}
-.settings-nav button svg {
- color: var(--muted);
-}
-.settings-nav button:hover {
- background: var(--hover);
- color: var(--text);
-}
-.settings-nav button.active {
- background: var(--selected);
- color: var(--text-strong);
- font-weight: 500;
-}
-.settings-nav button.active svg {
- color: var(--text-strong);
-}
-.settings-content {
- flex: 1;
- overflow: auto;
- padding: 48px 48px 40px;
- min-width: 0;
-}
-.settings-content h3 {
- font-size: 17px;
- letter-spacing: -0.4px;
- margin: 0;
- font-weight: 500;
-}
-.settings-lead {
- color: var(--muted);
- font-size: 11px;
- margin: 6px 0 24px;
-}
-.setting-section {
- margin: 25px 0;
-}
-.setting-section h4 {
- font-size: 11px;
- font-weight: 500;
- margin: 0 0 12px;
- color: var(--secondary);
-}
-.theme-options {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: 14px;
-}
-.theme-option {
- display: flex;
- flex-direction: column;
- gap: 10px;
- min-width: 0;
- padding: 0;
- border: 0;
- background: none;
- color: var(--secondary);
- font-size: 12px;
- text-align: left;
-}
-.theme-option:focus-visible {
- outline: none;
-}
-.theme-preview {
- position: relative;
- display: block;
- aspect-ratio: 16 / 10;
- border-radius: 8px;
- overflow: hidden;
- box-shadow: 0 0 0 1px var(--border-strong);
- transition: box-shadow 120ms;
-}
-.theme-option:hover .theme-preview {
- box-shadow: 0 0 0 1px var(--faint);
-}
-.theme-option.chosen .theme-preview,
-.theme-option:focus-visible .theme-preview {
- box-shadow:
- 0 0 0 2px var(--surface),
- 0 0 0 4px var(--accent-solid);
-}
-.theme-option-label {
- display: flex;
- align-items: center;
- gap: 8px;
- padding-left: 2px;
-}
-.theme-option.chosen .theme-option-label {
- color: var(--text-strong);
-}
-.theme-radio {
- width: 14px;
- height: 14px;
- flex-shrink: 0;
- border-radius: 50%;
- box-shadow: inset 0 0 0 1px var(--faint);
- transition: box-shadow 120ms;
-}
-.theme-option.chosen .theme-radio {
- box-shadow: inset 0 0 0 4px var(--accent-solid);
-}
-/* Miniature windows use fixed palettes so each shows its theme regardless of the current one. */
-.mini-window {
- --w-bg: #171718;
- --w-sidebar: #111112;
- --w-border: #ffffff12;
- --w-line: #ffffff17;
- --w-nav: #ffffff12;
- --w-accent: #aaa6ec;
- position: absolute;
- inset: 0;
- display: grid;
- grid-template-columns: 30% 1fr;
- background: var(--w-sidebar);
-}
-.mini-window-light {
- --w-bg: #ffffff;
- --w-sidebar: #f2f3f5;
- --w-border: #17191f14;
- --w-line: #17191f17;
- --w-nav: #17191f12;
- --w-accent: #6962c1;
-}
-.theme-split {
- clip-path: inset(0 0 0 50%);
-}
-.mini-sidebar {
- display: flex;
- flex-direction: column;
- gap: 7%;
- padding: 18% 14%;
-}
-.mini-nav {
- height: 5px;
- border-radius: 2px;
- background: var(--w-nav);
-}
-.mini-nav.active {
- background: color-mix(in srgb, var(--w-accent) 45%, transparent);
-}
-.mini-nav:last-child {
- width: 70%;
-}
-.mini-list {
- display: flex;
- flex-direction: column;
- gap: 12%;
- margin-top: 10%;
- padding: 12% 12% 0;
- border-top-left-radius: 6px;
- background: var(--w-bg);
- box-shadow: 0 0 0 1px var(--w-border);
-}
-.mini-row {
- display: flex;
- align-items: center;
- gap: 8%;
-}
-.mini-avatar {
- width: 9px;
- height: 9px;
- flex-shrink: 0;
- border-radius: 50%;
- background: color-mix(in srgb, var(--w-accent) 60%, transparent);
-}
-.mini-line {
- flex: 1;
- height: 5px;
- border-radius: 2px;
- background: var(--w-line);
-}
-.mini-row:nth-child(2) .mini-line {
- flex: 0 1 70%;
-}
-.mini-row:nth-child(3) .mini-line {
- flex: 0 1 85%;
-}
-.setting-row {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin: 14px 0;
- gap: 24px;
-}
-.setting-row strong {
- font-size: 12px;
- font-weight: 400;
-}
-.setting-row p {
- color: var(--muted);
- font-size: 11px;
- margin: 3px 0;
-}
-.setting-row input {
- flex-shrink: 0;
-}
-.setting-footnote {
- font-size: 11px;
- color: var(--faint);
- line-height: 1.6;
-}
-.settings-section-heading {
- display: flex;
- justify-content: space-between;
- align-items: flex-start;
- gap: 10px;
-}
-.settings-section-heading h3 {
- font-size: 16px;
-}
-.settings-account-entry {
- border-bottom: 1px solid var(--border);
-}
-.settings-account {
- display: flex;
- align-items: center;
- gap: 10px;
- padding: 18px 0;
-}
-.account-details-form {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 0 14px;
- margin: -4px 0 0;
- padding: 0 0 18px 46px;
-}
-.account-details-form .form-field {
- margin-top: 0;
-}
-.sender-preview {
- color: var(--secondary);
- overflow-wrap: anywhere;
-}
-.account-details-actions {
- grid-column: 1 / -1;
- display: flex;
- justify-content: flex-end;
- gap: 8px;
- margin-top: 14px;
-}
-.settings-account-text {
- flex: 1;
- min-width: 0;
-}
-.settings-account strong {
- display: block;
- font-size: 12px;
- font-weight: 500;
-}
-.settings-account-email {
- display: block;
- font-size: 11px;
- color: var(--muted);
-}
-.settings-account small {
- display: flex;
- gap: 5px;
- align-items: center;
- font-size: 11px;
- margin-top: 4px;
-}
-.connected {
- color: var(--green);
-}
-.connection-error {
- color: var(--red);
-}
-.connection-error .connection-dot {
- background: var(--red);
-}
-.account-actions {
- display: flex;
- gap: 4px;
-}
-.account-manage-trigger[data-popup-open] {
- background: var(--hover);
- color: var(--text-strong);
-}
-.account-manage-trigger[data-popup-open] svg {
- transform: rotate(180deg);
-}
-.settings-account-menu {
- width: 220px;
-}
-.settings-account-menu .menu-item {
- min-height: 31px;
-}
-.account-form {
- max-width: 560px;
-}
-/* Pull the ghost button's padding into the margin so its text lines up with the form. */
-.account-form-back {
- margin-left: -10px;
- color: var(--muted);
-}
-.account-form-title {
- margin: 18px 0 8px;
-}
-.account-form-title p {
- color: var(--muted);
- font-size: 12px;
- line-height: 1.6;
- margin: 6px 0 0;
-}
-.account-form-section {
- padding: 22px 0 4px;
-}
-.account-form-section + .account-form-section {
- border-top: 1px solid var(--border);
- margin-top: 18px;
-}
-.account-form-section h4 {
- font-size: 11px;
- font-weight: 500;
- margin: 0 0 2px;
- color: var(--secondary);
-}
-.form-row {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 0 14px;
- align-items: start;
-}
-.account-form-section > .checkbox-label {
- margin-top: 18px;
-}
-.account-form-footer {
- display: flex;
- justify-content: flex-end;
- gap: 8px;
- margin-top: 22px;
- padding-top: 18px;
- border-top: 1px solid var(--border);
-}
-/* Fill the pane so the empty state centres in it rather than hugging the heading. */
-.no-accounts {
- display: flex;
- min-height: 360px;
-}
-.no-accounts .empty-state {
- padding-bottom: 48px;
-}
-.signature-account {
- padding: 20px 0;
- border-top: 1px solid var(--border);
-}
-.signature-account > header {
- display: flex;
- align-items: center;
- gap: 10px;
- margin-bottom: 12px;
- min-width: 0;
-}
-.signature-account > header strong {
- font-size: 13px;
- font-weight: 500;
- color: var(--text-strong);
- white-space: nowrap;
-}
-.signature-account > header span {
- font-size: 12px;
- color: var(--muted);
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.signature-identity + .signature-identity {
- margin-top: 18px;
-}
-.signature-identity-heading {
- display: flex;
- align-items: center;
- gap: 12px;
- margin-bottom: 8px;
-}
-.signature-account > header .signature-format {
- flex-shrink: 0;
-}
-.signature-identity-heading label {
- flex: 1;
- min-width: 0;
- margin: 0;
- color: var(--secondary);
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.signature-format {
- margin-left: auto;
-}
-.signature-format .segmented-option {
- height: 24px;
- padding: 0 9px;
- font-size: 11px;
-}
-.signature-editor {
- position: relative;
-}
-.signature-identity textarea {
- display: block;
- min-height: 76px;
- font-size: 12px;
- line-height: 1.6;
- resize: vertical;
-}
-.signature-identity textarea.signature-code {
- min-height: 120px;
- font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
- font-size: 11.5px;
- tab-size: 2;
- overflow-wrap: anywhere;
-}
-.signature-preview {
- margin-top: 10px;
-}
-.signature-preview > span {
- display: block;
- margin-bottom: 6px;
- font-size: 11px;
- color: var(--muted);
-}
-.signature-preview > div {
- max-height: 260px;
- overflow: auto;
-}
-.signature-preview .signature-note {
- margin-top: 8px;
-}
-.signature-saved {
- position: absolute;
- right: 10px;
- bottom: 8px;
- display: inline-flex;
- align-items: center;
- gap: 4px;
- font-size: 11px;
- color: var(--muted);
- opacity: 0;
- transition: opacity 160ms ease;
- pointer-events: none;
-}
-.signature-saved.visible {
- opacity: 1;
-}
-.signature-note {
- display: flex;
- align-items: center;
- gap: 8px;
- margin: 0;
- font-size: 12px;
- color: var(--muted);
-}
-.about-hero {
- display: flex;
- align-items: center;
- gap: 16px;
- padding-bottom: 26px;
- border-bottom: 1px solid var(--border);
-}
-.about-mark {
- width: 52px;
- height: 52px;
- display: block;
- flex-shrink: 0;
-}
-.about-hero > div {
- flex: 1;
- min-width: 0;
-}
-.about-hero p {
- color: var(--muted);
- font-size: 12px;
- margin: 3px 0 0;
-}
-.about-version {
- flex-shrink: 0;
- padding: 3px 8px;
- border: 1px solid var(--border-strong);
- border-radius: 20px;
- color: var(--secondary);
- font-size: 11px;
- font-variant-numeric: tabular-nums;
-}
-.setting-row > .button {
- flex-shrink: 0;
-}
-.compose-backdrop {
- position: fixed;
- inset: 0;
- background: #0004;
- z-index: 70;
-}
-.composer {
- position: fixed;
- right: 24px;
- bottom: 24px;
- width: min(660px, calc(100vw - 48px));
- height: min(700px, calc(100vh - 48px));
- background: var(--surface);
- border: 1px solid var(--border-strong);
- border-radius: 12px;
- box-shadow: var(--shadow);
- z-index: 71;
- display: flex;
- flex-direction: column;
- overflow: hidden;
-}
-.composer-expanded {
- top: 50%;
- left: 50%;
- right: auto;
- bottom: auto;
- transform: translate(-50%, -50%);
- height: 85vh;
- width: min(900px, 90vw);
- border-radius: 11px;
-}
-.compose-header {
- display: flex;
- align-items: center;
- gap: 9px;
- height: 48px;
- padding: 0 19px;
- background: var(--raised);
- border-bottom: 1px solid var(--border);
- flex-shrink: 0;
-}
-.compose-header strong {
- font-size: 12px;
- font-weight: 500;
-}
-.compose-header > span {
- margin-left: auto;
- font-size: 11px;
- color: var(--muted);
-}
-.compose-header .compose-window-actions {
- display: flex;
- gap: 3px;
-}
-.compose-fields {
- padding: 6px 23px;
-}
-.compose-field {
- display: flex;
- align-items: center;
- min-height: 42px;
- border-bottom: 1px solid var(--border);
- gap: 11px;
-}
-.compose-field > label,
-.compose-field > span {
- width: 43px;
- flex-shrink: 0;
- font-size: 11px;
- color: var(--muted);
-}
-.compose-field input {
- flex: 1;
- border: 0;
- padding: 7px 0;
- background: none;
- font-size: 12px;
- min-width: 0;
-}
-/* Borderless pickers that read as part of the address block. */
-.compose-field > .select-trigger {
- flex: 1;
- height: 32px;
- padding: 0 4px 0 0;
- border: 0;
- background: none;
- color: var(--text);
- font-size: 12px;
- white-space: normal;
-}
-.compose-field > .select-trigger:hover:not([data-disabled]) {
- background: none;
-}
-.compose-field > button {
- font-size: 11px;
- background: none;
- border: 0;
- color: var(--muted);
- white-space: nowrap;
-}
-.compose-field .subject-input {
- font-weight: 500;
-}
-.compose-body {
- flex: 1;
- overflow: auto;
- padding: 20px 24px;
- min-height: 0;
-}
-.compose-editor {
- min-height: 180px;
- outline: none;
- font-size: 15px;
- line-height: 1.8;
- color: var(--text);
-}
-.compose-editor p {
- margin: 0 0 13px;
-}
-.compose-editor ul,
-.compose-editor ol {
- padding-left: 25px;
-}
-.compose-editor ul {
- list-style: disc;
-}
-.compose-editor ol {
- list-style: decimal;
-}
-.compose-editor blockquote {
- border-left: 2px solid var(--border-strong);
- padding-left: 16px;
- color: var(--muted);
-}
-/* An HTML signature is one block: shown as recipients see it, removed as a whole. */
-.compose-signature {
- position: relative;
- margin: 4px 0 16px;
- border-radius: 7px;
- outline: 1px solid transparent;
- outline-offset: 4px;
- transition: outline-color 120ms ease;
-}
-.compose-signature:hover {
- outline-color: var(--border);
-}
-.compose-signature.selected {
- outline: 2px solid var(--accent);
-}
-.compose-signature-remove {
- position: absolute;
- top: -2px;
- right: -2px;
- display: grid;
- place-items: center;
- width: 22px;
- height: 22px;
- border: 1px solid var(--border-strong);
- border-radius: 6px;
- background: var(--raised);
- color: var(--muted);
- opacity: 0;
- transition: opacity 120ms ease;
-}
-.compose-signature:hover .compose-signature-remove,
-.compose-signature.selected .compose-signature-remove,
-.compose-signature-remove:focus-visible {
- opacity: 1;
-}
-.compose-signature-remove:hover {
- color: var(--text);
-}
-.compose-editor[contenteditable='false'] .compose-signature-remove {
- display: none;
-}
-.compose-editor p.is-editor-empty:first-child:before {
- content: attr(data-placeholder);
- color: var(--faint);
- float: left;
- height: 0;
- pointer-events: none;
-}
-.compose-format {
- display: flex;
- gap: 5px;
- align-items: center;
- padding: 7px 18px;
- border-top: 1px solid var(--border);
-}
-.active-format {
- background: var(--hover);
- color: var(--accent);
-}
-.compose-footer {
- display: flex;
- align-items: center;
- gap: 10px;
- padding: 13px 20px;
- border-top: 1px solid var(--border);
-}
-.send-shortcut {
- font-size: 11px;
- opacity: 0.6;
- margin-left: 10px;
-}
-.compose-account {
- flex: 1;
- text-align: right;
- color: var(--muted);
- font-size: 11px;
-}
-.compose-warning {
- display: flex;
- align-items: center;
- gap: 8px;
- padding: 10px 22px;
- font-size: 11px;
- color: var(--red);
- background: color-mix(in srgb, var(--red) 8%, transparent);
-}
-.compose-attachments {
- display: flex;
- gap: 7px;
- flex-wrap: wrap;
- margin-top: 15px;
-}
-.compose-attachment {
- display: flex;
- gap: 7px;
- align-items: center;
- padding: 7px 9px;
- border: 1px solid var(--border-strong);
- border-radius: 6px;
- font-size: 11px;
-}
-.compose-attachment small {
- color: var(--muted);
-}
-.compose-attachment button {
- border: 0;
- background: none;
- padding: 0;
- color: var(--muted);
-}
-.draft-list {
- flex: 1;
- overflow: auto;
-}
-.draft-rows:has(.selected) {
- padding-bottom: 88px;
-}
-.draft-row {
- display: flex;
- gap: 16px;
- align-items: center;
- border-bottom: 1px solid var(--border);
- padding: 0 26px 0 32px;
- color: var(--secondary);
-}
-.draft-row:hover {
- background: var(--hover);
-}
-.draft-row.selected {
- background: var(--selected);
-}
-.draft-selector {
- position: relative;
- display: grid;
- place-items: center;
- flex-shrink: 0;
- width: 17px;
- height: 17px;
-}
-.draft-selector .checkbox {
- position: absolute;
- opacity: 0;
-}
-.draft-rows.selecting .draft-selector:not(:has([data-disabled])) .checkbox,
-.draft-row:hover .draft-selector:not(:has([data-disabled])) .checkbox,
-.draft-selector:focus-within .checkbox {
- opacity: 1;
-}
-.draft-rows.selecting .draft-selector:not(:has([data-disabled])) > svg,
-.draft-row:hover .draft-selector:not(:has([data-disabled])) > svg,
-.draft-selector:focus-within > svg {
- opacity: 0;
-}
-.draft-open {
- display: flex;
- flex: 1;
- gap: 16px;
- align-items: center;
- min-width: 0;
- padding: 19px 0;
- background: none;
- border: 0;
- text-align: left;
-}
-.draft-open > div {
- flex: 1;
- min-width: 0;
-}
-.draft-open strong {
- display: block;
- font-weight: 500;
- font-size: 13px;
- color: var(--text);
-}
-.draft-open span {
- display: block;
- font-size: 11px;
- color: var(--muted);
- margin-top: 4px;
-}
-.draft-open small,
-.draft-open time {
- font-size: 11px;
- color: var(--muted);
-}
-.draft-actions {
- position: relative;
- display: grid;
- place-items: center;
- flex-shrink: 0;
- width: 28px;
- height: 28px;
-}
-.draft-actions .button {
- position: absolute;
- inset: 0;
- opacity: 0;
-}
-.draft-row:hover .draft-actions .button,
-.draft-actions:focus-within .button {
- opacity: 1;
-}
-.draft-row:hover .draft-actions:has(.button) > svg,
-.draft-actions:focus-within > svg {
- opacity: 0;
-}
-.command-modal {
- padding: 0;
- width: 610px;
-}
-.command-modal > .modal-heading {
- position: absolute;
- width: 1px;
- height: 1px;
- overflow: hidden;
- clip-path: inset(50%);
-}
-.command-modal > .modal-heading .button {
- display: none;
-}
-.command-input {
- display: flex;
- gap: 13px;
- align-items: center;
- padding: 18px 21px;
- border-bottom: 1px solid var(--border-strong);
- color: var(--muted);
-}
-.command-input input {
- border: 0;
- padding: 3px 0;
- background: none;
- font-size: 14px;
-}
-.command-results {
- padding: 9px;
- max-height: min(430px, calc(100vh - 260px));
- overflow: auto;
-}
-.command-label {
- padding: 16px 22px 3px;
- font-size: 11px;
- color: var(--muted);
-}
-.command-results button {
- width: 100%;
- display: flex;
- gap: 12px;
- align-items: center;
- padding: 11px 13px;
- background: none;
- border: 0;
- border-radius: 6px;
- font-size: 12px;
- color: var(--secondary);
- text-align: left;
-}
-
-.command-results button.active,
-.command-results button:hover {
- background: var(--hover);
- color: var(--text);
-}
-.command-results button.active svg {
- color: var(--accent);
-}
-.command-footer {
- border-top: 1px solid var(--border);
- padding: 12px 21px;
- display: flex;
- gap: 8px;
- align-items: center;
- font-size: 11px;
- color: var(--muted);
-}
-.shortcut-grid {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 16px 30px;
-}
-.shortcut-grid > div {
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-size: 11px;
- color: var(--secondary);
-}
-.filter-modal {
- width: min(520px, calc(100vw - 40px));
-}
-.filter-fields {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 16px 12px;
-}
-.filter-wide {
- grid-column: 1 / -1;
-}
-.filter-fields input,
-.filter-field .filter-date-range {
- margin-top: 6px;
- font-size: 12px;
-}
-.filter-field > span {
- display: block;
- font-size: 12px;
- color: var(--secondary);
-}
-.filter-date-range {
- display: grid;
- grid-template-columns: 1fr auto 1fr;
- align-items: center;
- gap: 8px;
-}
-.filter-date-separator {
- font-size: 12px;
- color: var(--faint);
-}
-.filter-switch {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 16px;
- padding-top: 16px;
- border-top: 1px solid var(--border);
-}
-.filter-switch strong {
- display: block;
- font-size: 12px;
- font-weight: 400;
- color: var(--text);
-}
-.filter-switch small {
- display: block;
- margin-top: 2px;
- font-size: 11px;
- color: var(--muted);
-}
-/* Clearing sits apart from the main action so it isn't hit by accident. */
-.filter-actions {
- justify-content: space-between;
- margin-top: 22px;
-}
-.filter-actions > .button-ghost {
- margin-left: -10px;
- color: var(--muted);
-}
-.move-modal {
- width: min(440px, calc(100vw - 40px));
-}
-.folder-search {
- display: flex;
- align-items: center;
- gap: 8px;
- height: 36px;
- margin-bottom: 8px;
- padding: 0 11px;
- color: var(--muted);
- background: var(--field);
- border: 1px solid var(--border-strong);
- border-radius: 7px;
- transition:
- border-color 120ms,
- box-shadow 120ms;
-}
-.folder-search:focus-within {
- border-color: var(--accent-solid);
- box-shadow: 0 0 0 3px var(--accent-tint);
-}
-.folder-search input {
- height: 100%;
- padding: 0;
- font-size: 12px;
- background: none;
- border: 0;
-}
-.folder-search input:focus-visible {
- outline: none;
-}
-/* Long folder lists scroll inside the dialog so the search field stays in view. */
-.folder-picker {
- max-height: min(340px, calc(100vh - 280px));
- overflow-y: auto;
- margin: 0 -6px;
- padding: 0 6px;
-}
-.folder-picker button {
- width: 100%;
- display: flex;
- align-items: center;
- gap: 12px;
- background: none;
- border: 0;
- padding: 10px 12px;
- border-radius: 6px;
- font-size: 12px;
- text-align: left;
- color: var(--secondary);
-}
-.folder-picker button > span {
- flex: 1;
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.folder-picker button svg {
- color: var(--muted);
-}
-.folder-picker button.active {
- background: var(--hover);
- color: var(--text-strong);
-}
-.folder-picker button.active svg {
- color: var(--text-strong);
-}
-.folder-picker-note {
- display: flex;
- align-items: center;
- gap: 8px;
- padding: 14px 12px;
- font-size: 12px;
- color: var(--muted);
-}
-/* A text field directly inside a dialog, labelled above. */
-.modal-field input {
- margin-top: 6px;
-}
-/* A secondary choice such as β€œRemove link” sits apart from Cancel and the main action. */
-.modal-actions > .modal-action-start {
- margin-right: auto;
- margin-left: -10px;
- color: var(--muted);
-}
-.modal-actions > .modal-action-start:hover:not(:disabled) {
- color: var(--red);
-}
-.startup-error {
- max-width: 520px;
- margin: 20vh auto;
- padding: 25px;
-}
-.startup-error h1 {
- font-size: 23px;
-}
-.startup-error p {
- color: var(--muted);
- line-height: 1.8;
-}
-.compose-heading {
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: 48px;
- padding: 0 17px 0 24px;
- background: var(--raised);
- border-bottom: 1px solid var(--border);
- flex-shrink: 0;
-}
-.compose-heading > span {
- font-size: 12px;
- font-weight: 500;
-}
-.compose-dot {
- width: 5px;
- height: 5px;
- border-radius: 50%;
- display: inline-block;
- background: var(--accent);
- margin-right: 6px;
-}
-.compose-heading > div {
- display: flex;
- align-items: center;
- gap: 5px;
-}
-.draft-state {
- display: flex;
- align-items: center;
- gap: 5px;
- color: var(--muted);
- font-size: 11px;
- margin-right: 12px;
-}
-.compose-addresses {
- padding: 5px 24px;
-}
-fieldset.compose-format {
- margin: 0;
- min-width: 0;
- border-left: 0;
- border-right: 0;
- border-bottom: 0;
-}
-fieldset.compose-format:disabled {
- opacity: 0.5;
-}
-.compose-warning span {
- flex: 1;
-}
-.compose-warning .button {
- flex-shrink: 0;
-}
-
-.command-results button {
- padding: 8px 12px;
- font-size: 13px;
-}
-.command-icon {
- width: 28px;
- height: 28px;
- display: grid;
- place-items: center;
- border: 1px solid var(--border-strong);
- border-radius: 6px;
- background: var(--surface);
-}
-.command-dismiss {
- border: 0;
- background: none;
- padding: 0;
-}
-.command-enter {
- display: flex;
- align-items: center;
- gap: 7px;
- margin-left: 12px;
-}
-.command-footer-brand {
- margin-left: auto;
- color: var(--faint);
-}
-.setting-section + .setting-section {
- border-top: 1px solid var(--border);
- padding-top: 22px;
-}
-.command-input input:focus-visible,
-.mail-search input:focus-visible {
- outline: none;
-}
-.command-input:focus-within {
- border-bottom-color: var(--accent-solid);
-}
-.settings-content h3 {
- font-size: 20px;
- font-weight: 550;
- letter-spacing: -0.5px;
-}
-.settings-lead,
-.setting-row p,
-.setting-footnote,
-.settings-account-email {
- font-size: 12px;
- line-height: 1.6;
-}
-.setting-row strong,
-.settings-nav button,
-.settings-account strong {
- font-size: 13px;
-}
-
-.active-filters {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 6px;
- padding: 0 28px 14px;
-}
-.filter-chip {
- display: inline-flex;
- align-items: center;
- gap: 8px;
- max-width: 260px;
- padding: 4px 8px;
- font-size: 11px;
- color: var(--accent);
- border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
- background: var(--accent-tint);
- border-radius: 5px;
-}
-.filter-chip span {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.clear-filters {
- border: 0;
- background: none;
- color: var(--muted);
- font-size: 11px;
- padding: 4px 8px;
-}
-.clear-filters:hover {
- color: var(--text);
-}
-
-.compose-field input:focus-visible,
-.compose-field > .select-trigger:focus-visible {
- outline: none;
-}
-.compose-field:focus-within {
- border-bottom-color: var(--accent-solid);
-}
-.compose-backdrop {
- transition: opacity 160ms ease;
-}
-.composer {
- transition:
- opacity 160ms ease,
- transform 160ms ease;
-}
-.compose-backdrop[data-starting-style],
-.compose-backdrop[data-ending-style] {
- opacity: 0;
-}
-.composer[data-starting-style],
-.composer[data-ending-style] {
- opacity: 0;
- transform: translateY(10px) scale(0.99);
-}
-.composer-expanded[data-starting-style],
-.composer-expanded[data-ending-style] {
- transform: translate(-50%, -48%) scale(0.99);
-}
-
-/* Inbox chrome stays compact so the messages remain the primary surface. */
-.list-title {
- min-width: 0;
-}
-.list-eyebrow {
- display: flex;
- align-items: center;
- gap: 7px;
- font-size: 11px;
- color: var(--muted);
- margin-bottom: 6px;
-}
-.list-eyebrow svg {
- color: var(--faint);
-}
-.account-switcher {
- display: inline-flex;
- align-items: center;
- gap: 6px;
- padding: 2px 5px;
- margin: -2px -5px;
- border: 0;
- border-radius: 4px;
- background: none;
- color: inherit;
- font-size: inherit;
- min-width: 0;
-}
-.account-switcher > span:not(.account-mark) {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.account-switcher:hover,
-.account-switcher[data-popup-open] {
- color: var(--text);
- background: var(--hover);
-}
-.account-menu {
- width: 250px;
- max-width: calc(100vw - 40px);
- max-height: min(420px, 65vh);
- overflow-y: auto;
-}
-.account-menu .menu-item {
- min-height: 48px;
- gap: 12px;
-}
-.account-menu-label {
- flex: 1;
- min-width: 0;
-}
-.account-menu-label strong,
-.account-menu-label small {
- display: block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.account-menu-label strong {
- font-weight: 500;
-}
-.account-menu-label small {
- color: var(--muted);
- font-size: 10px;
- margin-top: 2px;
-}
-.account-menu-check {
- color: var(--accent);
-}
-.account-menu-divider {
- height: 1px;
- margin: 5px;
- background: var(--border);
-}
-.list-toolbar-actions {
- display: flex;
- align-items: center;
- gap: 18px;
- margin-left: auto;
-}
-.list-toolbar-actions > .button {
- font-weight: 400;
-}
-.selection-bar {
- position: absolute;
- z-index: 10;
- bottom: 50px;
- left: 50%;
- transform: translateX(-50%);
- display: flex;
- align-items: center;
- gap: 5px;
- padding: 10px 12px;
- max-width: calc(100% - 24px);
- white-space: nowrap;
- border: 1px solid var(--border-strong);
- border-radius: 10px;
- background: var(--raised);
- box-shadow:
- 0 8px 28px #0003,
- 0 2px 5px #0002;
- animation: selection-appear 140ms ease-out;
-}
-.selection-summary {
- display: flex;
- flex-direction: column;
- gap: 2px;
- min-width: 82px;
- padding: 0 6px;
-}
-.selection-count {
- font-weight: 500;
- font-variant-numeric: tabular-nums;
-}
-@keyframes selection-appear {
- from {
- opacity: 0;
- transform: translate(-50%, 5px);
- }
- to {
- opacity: 1;
- transform: translate(-50%, 0);
- }
-}
-.connection-pending {
- background: var(--red);
-}
-.reader-back {
- max-width: 180px;
- margin-left: -6px;
-}
-.reader-back span {
- overflow: hidden;
- text-overflow: ellipsis;
-}
-.reader-navigation > span {
- font-variant-numeric: tabular-nums;
- white-space: nowrap;
-}
-.reply-panel {
- margin: 12px 0 0 47px;
- border: 1px solid var(--border-strong);
- border-radius: 10px;
- background: color-mix(in srgb, var(--surface) 45%, var(--bg));
- overflow: hidden;
-}
-.reply-prompt {
- display: flex;
- align-items: center;
- gap: 13px;
- width: 100%;
- background: none;
- border: 0;
- text-align: left;
- padding: 20px;
- color: var(--muted);
-}
-.reply-prompt:hover {
- background: var(--hover);
-}
-/* Only the label grows; the shortcut hint is a span too and belongs at the far end. */
-.reply-prompt > span:not(.shortcut-keys) {
- flex: 1;
- min-width: 0;
-}
-.reply-prompt strong {
- display: block;
- color: var(--text);
- font-size: 13px;
- font-weight: 500;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.reply-prompt span span {
- display: block;
- font-size: 12px;
- margin-top: 4px;
-}
-.reply-bar .button {
- font-size: 11px;
-}
-.collapsed-message {
- padding: 18px 0;
-}
-.collapsed-message:hover .message-heading {
- opacity: 1;
-}
-.message-details + .message-content {
- padding-top: 18px;
-}
-.compose-format {
- margin: 0;
- border-right: 0;
- border-left: 0;
- border-bottom: 0;
- min-width: 0;
-}
-.compose-format .active-format {
- background: var(--accent-tint);
- color: var(--accent);
-}
-.compose-addresses {
- flex-shrink: 0;
-}
-
-@media (max-width: 1100px) {
- .app-shell:not(.sidebar-collapsed) {
- --rail: 204px;
- }
- .sidebar {
- width: 204px;
- }
- .sidebar-brand {
- gap: 6px;
- padding: 0 5px;
- }
- .brand-wordmark {
- height: 15px;
- }
-}
-/* Container queries also respond when the navigation rail is collapsed. */
-@container (max-width: 900px) {
- .mail-row {
- gap: 12px;
- padding-left: 22px;
- padding-right: 14px;
- }
- .list-heading,
- .list-toolbar,
- .date-group {
- padding-left: 22px;
- padding-right: 22px;
- }
- .row-sender .avatar {
- display: none;
- }
- .density-compact .row-preview {
- display: none;
- }
- .density-compact .row-subject {
- max-width: 100%;
- }
- .sender-address {
- display: none;
- }
- .list-footer {
- padding: 0 20px;
- }
- .footer-shortcuts span {
- display: none;
- }
-}
-@container (max-width: 680px) {
- .list-heading {
- padding: 20px 20px 17px;
- }
- .list-toolbar {
- padding: 0 20px;
- gap: 14px;
- }
- .list-toolbar-actions {
- gap: 10px;
- }
- .list-heading-actions {
- gap: 2px;
- }
- .date-group {
- padding: 0 20px;
- }
- .mail-row {
- padding: 0 16px 0 20px;
- gap: 12px;
- }
- .density-comfortable .mail-row {
- display: grid;
- grid-template-columns: 16px minmax(0, 1fr) auto;
- grid-template-rows: 22px 20px;
- gap: 2px 12px;
- align-content: center;
- }
- .density-comfortable .row-selector {
- grid-column: 1;
- grid-row: 1 / 3;
- }
- .density-comfortable .row-sender {
- grid-column: 2;
- grid-row: 1;
- width: auto;
- min-width: 0;
- }
- .density-comfortable .row-meta {
- grid-column: 3;
- grid-row: 1;
- gap: 7px;
- }
- .density-comfortable .row-content {
- grid-column: 2 / 4;
- grid-row: 2;
- flex-direction: row;
- gap: 10px;
- align-items: baseline;
- }
- .density-comfortable .row-subject {
- flex-shrink: 0;
- max-width: 75%;
- font-size: 12px;
- }
- .row-meta time {
- font-size: 10px;
- width: 54px;
- }
- .row-star {
- padding: 3px;
- }
- .row-meta {
- gap: 6px;
- }
- .reader-toolbar {
- padding: 0 16px;
- gap: 2px;
- }
- .reader-back span {
- display: none;
- }
- .reader-navigation {
- gap: 2px;
- }
- .reader-navigation > span {
- margin-right: 4px;
- }
- .reader-content {
- padding: 28px 26px;
- }
- .reader-content h1 {
- font-size: 24px;
- margin-bottom: 24px;
- }
- .message-content {
- padding-left: 0;
- }
- .message-details {
- margin-left: 0;
- }
- .reply-panel {
- margin-left: 0;
- }
- .reply-bar {
- padding-left: 44px;
- }
- .message-heading {
- gap: 9px;
- }
- .message-heading time span {
- display: none;
- }
- .mail-search {
- margin-left: 20px;
- margin-right: 20px;
- }
- .active-filters {
- padding-left: 20px;
- padding-right: 20px;
- }
-}
-@container (max-width: 440px) {
- .list-tabs {
- gap: 16px;
- }
- .list-heading h1 {
- font-size: 21px;
- }
- .density-comfortable .row-preview {
- display: none;
- }
- .density-comfortable .row-subject {
- max-width: 100%;
- }
- .density-compact .row-sender {
- font-size: 11px;
- }
- .density-compact .row-meta time {
- display: none;
- }
- .density-compact .row-subject {
- font-size: 12px;
- }
- .footer-shortcuts > .shortcut-keys:not(.footer-help-keys) {
- display: none;
- }
- .reader-toolbar {
- padding: 0 10px;
- }
- .reader-toolbar > .toolbar-divider {
- margin: 0 2px;
- }
- .reader-navigation > span {
- font-size: 10px;
- }
- .reader-content {
- padding: 26px 20px;
- }
- .selection-bar {
- gap: 2px;
- padding: 8px;
- }
- .selection-summary {
- min-width: 74px;
- padding: 0 4px;
- }
- .selection-bar .toolbar-divider {
- margin: 0 2px;
- }
- .unsubscribe-button {
- width: 29px;
- padding: 5px;
- }
- .unsubscribe-button span {
- display: none;
- }
-}
-@media (max-width: 700px) {
- .app-shell:not(.sidebar-collapsed) {
- --rail: 188px;
- }
- .sidebar {
- width: 188px;
- padding: 0 10px;
- }
- .sidebar-tools {
- right: 7px;
- gap: 2px;
- }
- .sidebar-tools .button {
- width: 24px;
- height: 24px;
- min-height: 24px;
- }
- .sidebar-brand {
- gap: 6px;
- padding: 0 3px;
- }
- .brand-wordmark {
- height: 14px;
- }
- .brand-mark {
- width: 24px;
- height: 24px;
- }
- .settings-modal > .modal-heading {
- padding-left: 16px;
- }
- .settings-nav {
- width: 136px;
- padding: 50px 8px 12px;
+@layer components {
+ /* These elements are generated by the rich-text editor rather than React. */
+ .compose-editor p {
+ margin: 0 0 13px;
}
- .settings-nav button {
- padding: 0 8px;
- font-size: 12px;
- gap: 7px;
+ .compose-editor ul,
+ .compose-editor ol {
+ padding-left: 25px;
}
- .settings-content {
- padding: 48px 20px 20px;
+ .compose-editor ul {
+ list-style: disc;
}
- .theme-options {
- gap: 10px;
+ .compose-editor ol {
+ list-style: decimal;
}
- .setting-row {
- gap: 14px;
- }
- .compose-account {
- font-size: 10px;
+ .compose-editor blockquote {
+ border-left: 2px solid var(--border-strong);
+ padding-left: 16px;
+ color: var(--muted);
}
- .toast {
- max-width: calc(100vw - var(--rail) - 32px);
- width: max-content;
+ .compose-editor p.is-editor-empty:first-child:before {
+ content: attr(data-placeholder);
+ color: var(--faint);
+ float: left;
+ height: 0;
+ pointer-events: none;
}
}
-@media (max-height: 700px) {
- .sidebar-collapsed .sidebar-tools {
- padding-bottom: 12px;
- }
- .sidebar-bottom {
- padding-top: 8px;
+@keyframes selection-appear {
+ from {
+ opacity: 0;
+ transform: translate(-50%, 5px);
}
- .sidebar-footer {
- padding: 4px 0 6px;
+ to {
+ opacity: 1;
+ transform: translate(-50%, 0);
}
}
-
-/* β€”β€”β€” Reader β€”β€”β€” */
-.reader-page {
- position: relative;
-}
-.body-skeleton {
- display: grid;
- gap: 12px;
- padding: 6px 0 10px;
-}
-.body-skeleton span,
-.skeleton-line,
-.skeleton-avatar {
- display: block;
- height: 10px;
- border-radius: 5px;
- background: linear-gradient(
- 90deg,
- var(--skeleton) 0%,
- color-mix(in srgb, var(--skeleton) 45%, transparent) 50%,
- var(--skeleton) 100%
- );
- background-size: 200% 100%;
- animation: shimmer 1.4s ease-in-out infinite;
-}
-.body-skeleton span:nth-child(1) {
- width: 32%;
-}
-.body-skeleton span:nth-child(2) {
- width: 92%;
-}
-.body-skeleton span:nth-child(3) {
- width: 84%;
-}
-.body-skeleton span:nth-child(4) {
- width: 58%;
-}
@keyframes shimmer {
from {
background-position: 100% 0;
@@ -3003,265 +47,6 @@ fieldset.compose-format:disabled {
background-position: -100% 0;
}
}
-.link-status {
- position: absolute;
- left: 12px;
- bottom: 12px;
- max-width: min(640px, calc(100% - 24px));
- padding: 5px 9px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- font-size: 11px;
- color: var(--secondary);
- background: var(--raised);
- border: 1px solid var(--border-strong);
- border-radius: 6px;
- box-shadow: 0 4px 14px #0003;
- pointer-events: none;
- z-index: 5;
-}
-.folded-messages {
- position: relative;
- display: flex;
- justify-content: center;
- width: 100%;
- height: 34px;
- margin: 0;
- padding: 0;
- border: 0;
- border-top: 1px solid var(--border-strong);
- background: none;
-}
-.folded-messages span {
- position: absolute;
- top: -11px;
- padding: 2px 10px;
- font-size: 11px;
- color: var(--muted);
- background: var(--bg);
- border: 1px solid var(--border-strong);
- border-radius: 11px;
- transition:
- color 120ms,
- border-color 120ms;
-}
-.folded-messages:hover span {
- color: var(--text);
- border-color: color-mix(in srgb, var(--text) 30%, transparent);
-}
-.folded-messages + .message-card {
- border-top: 0;
- padding-top: 0;
-}
-.message-person:disabled {
- cursor: default;
- opacity: 1;
-}
-.message-attachment-hint {
- color: var(--muted);
- flex-shrink: 0;
-}
-.details-chevron {
- transition: transform 140ms ease;
-}
-.details-chevron.open {
- transform: rotate(180deg);
-}
-/* An unsent draft must never pass for sent mail. A dashed outline marks it as unfinished, and
- the small amber label is its only colour. The card bleeds past the column so its mark still
- lines up with the senders above. */
-.draft-message {
- margin: 6px -20px 0;
- padding: 18px 20px 20px;
- border: 1px dashed color-mix(in srgb, var(--text) 22%, transparent);
- border-radius: 10px;
-}
-.draft-message + .draft-message {
- margin-top: 10px;
-}
-.draft-message.collapsed-message {
- padding-top: 14px;
- padding-bottom: 14px;
-}
-.draft-message.collapsed-message .message-heading {
- opacity: 1;
-}
-.draft-mark {
- display: grid;
- place-items: center;
- width: 35px;
- height: 35px;
- flex-shrink: 0;
- border: 1px dashed color-mix(in srgb, var(--text) 28%, transparent);
- border-radius: 50%;
- color: var(--muted);
-}
-.draft-message .sender-name {
- display: flex;
- align-items: center;
- gap: 8px;
- color: var(--secondary);
- font-weight: 500;
-}
-.draft-badge {
- padding: 0 6px;
- border-radius: 4px;
- background: color-mix(in srgb, var(--draft) 14%, transparent);
- color: var(--draft);
- font-size: 11px;
- font-weight: 550;
- line-height: 18px;
-}
-.draft-message .message-content {
- padding-top: 18px;
-}
-.draft-message-actions {
- display: flex;
- gap: 6px;
- margin-top: 16px;
-}
-.row-draft {
- flex-shrink: 0;
- color: var(--draft);
- font-size: 11px;
- font-weight: 600;
-}
-.attachment-card {
- padding: 6px 6px 6px 8px;
- gap: 4px;
- transition: border-color 120ms;
-}
-.attachment-card:hover {
- border-color: color-mix(in srgb, var(--text) 22%, transparent);
-}
-.attachment-open {
- display: flex;
- align-items: center;
- gap: 10px;
- min-width: 0;
- max-width: 260px;
- padding: 3px 4px 3px 0;
- border: 0;
- background: none;
- text-align: left;
-}
-.attachment-icon {
- display: grid;
- place-items: center;
- width: 34px;
- height: 34px;
- flex-shrink: 0;
- padding: 0;
- border-radius: 7px;
- color: var(--accent);
- background: var(--accent-tint);
-}
-.attachment-label {
- min-width: 0;
-}
-.attachment-label > span {
- display: block;
- margin-top: 1px;
-}
-.menu-item kbd,
-.menu-shortcut {
- margin-left: auto;
-}
-.reply-bar kbd {
- margin-left: 2px;
- height: 16px;
- min-width: 16px;
- font-size: 9px;
-}
-
-/* β€”β€”β€” List β€”β€”β€” */
-.skeleton-row {
- cursor: default;
- pointer-events: none;
-}
-.skeleton-row:hover {
- background: none;
-}
-.skeleton-row > .skeleton-line:first-of-type {
- flex-shrink: 0;
- width: 120px;
-}
-.skeleton-row .row-content {
- gap: 9px;
-}
-.skeleton-avatar {
- width: 28px;
- height: 28px;
- border-radius: 7px;
- flex-shrink: 0;
- margin-right: -6px;
-}
-.skeleton-line.faint {
- opacity: 0.55;
-}
-.density-compact .skeleton-row .skeleton-line.faint {
- display: none;
-}
-.list-skeleton .skeleton-row:nth-child(n + 6) {
- opacity: 0.6;
-}
-.list-skeleton .skeleton-row:nth-child(n + 8) {
- opacity: 0.3;
-}
-.account-offline {
- color: var(--faint);
-}
-
-/* β€”β€”β€” Toast β€”β€”β€” */
-.toast {
- overflow: hidden;
- animation: toast-in 180ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
-}
-.toast-error > svg:first-child {
- color: var(--red);
-}
-.toast .toast-undo {
- display: inline-flex;
- align-items: center;
- gap: 6px;
- padding: 3px 4px 3px 8px;
- border-radius: 5px;
- font-weight: 500;
-}
-.toast .toast-undo:hover {
- background: var(--accent-tint);
-}
-.toast-undo kbd {
- height: 16px;
- min-width: 16px;
- font-size: 9px;
- color: var(--accent);
- border-color: color-mix(in srgb, var(--accent) 35%, transparent);
-}
-.toast .toast-dismiss {
- display: grid;
- place-items: center;
- border-radius: 5px;
- color: var(--muted);
-}
-.toast .toast-dismiss:hover {
- color: var(--text);
- background: var(--hover);
-}
-.toast-timer {
- position: absolute;
- left: 0;
- bottom: 0;
- height: 2px;
- width: 100%;
- background: color-mix(in srgb, var(--accent) 45%, transparent);
- transform-origin: left;
- animation: toast-timer linear forwards;
-}
-.toast-error .toast-timer {
- background: color-mix(in srgb, var(--red) 45%, transparent);
-}
@keyframes toast-in {
from {
opacity: 0;
@@ -3273,304 +58,6 @@ fieldset.compose-format:disabled {
transform: scaleX(0);
}
}
-
-/* β€”β€”β€” Command menu β€”β€”β€” */
-.command-results {
- padding: 4px 8px 8px;
-}
-.command-label {
- padding: 12px 12px 5px;
-}
-.command-results button {
- gap: 11px;
- padding: 7px 10px;
-}
-.command-icon {
- width: 26px;
- height: 26px;
- color: var(--muted);
-}
-/* An account's avatar stands in for the icon frame. */
-.command-icon:has(> .account-mark) {
- border: 0;
- background: none;
-}
-.command-results button.active .command-icon {
- color: var(--text-strong);
- border-color: color-mix(in srgb, var(--text) 22%, transparent);
-}
-.command-text {
- flex: 1;
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.command-group {
- font-size: 11px;
- color: var(--faint);
-}
-.command-check {
- color: var(--accent);
-}
-.command-keys {
- display: flex;
- gap: 3px;
-}
-.command-empty {
- padding: 22px 12px;
- text-align: center;
- font-size: 12px;
- color: var(--muted);
-}
-
-/* β€”β€”β€” Shortcut editor β€”β€”β€” */
-.shortcut-modal {
- width: min(760px, calc(100vw - 40px));
-}
-.shortcut-editor {
- display: flex;
- flex-direction: column;
- gap: 18px;
-}
-.shortcut-toolbar {
- display: flex;
- align-items: center;
- gap: 10px;
-}
-/* In the dialog the search stays in reach while the list scrolls. */
-.shortcut-modal .shortcut-toolbar {
- position: sticky;
- top: -23px;
- z-index: 2;
- margin: -10px 0 -6px;
- padding: 10px 0;
- background: var(--surface);
-}
-.shortcut-search {
- flex: 1;
- display: flex;
- align-items: center;
- gap: 8px;
- height: 32px;
- padding: 0 10px;
- color: var(--muted);
- background: var(--field);
- border: 1px solid var(--border-strong);
- border-radius: 7px;
- transition:
- border-color 120ms,
- box-shadow 120ms;
-}
-.shortcut-search:focus-within {
- border-color: var(--accent-solid);
- box-shadow: 0 0 0 3px var(--accent-tint);
-}
-.shortcut-search input {
- height: 100%;
- padding: 0;
- font-size: 12px;
- background: none;
- border: 0;
-}
-.shortcut-search input::-webkit-search-cancel-button {
- display: none;
-}
-.shortcut-toolbar > .button {
- flex-shrink: 0;
- color: var(--secondary);
-}
-.shortcut-error {
- margin: 0;
-}
-.shortcut-sections {
- columns: 2 280px;
- column-gap: 36px;
-}
-.shortcut-sections section {
- break-inside: avoid;
- margin-bottom: 22px;
-}
-.shortcut-sections h3 {
- margin: 0 0 4px;
- font-size: 11px;
- font-weight: 500;
- color: var(--muted);
-}
-.shortcut-item {
- break-inside: avoid;
- border-bottom: 1px solid var(--border);
-}
-.shortcut-row {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 12px;
- min-height: 34px;
- font-size: 12px;
- color: var(--secondary);
-}
-.shortcut-label {
- display: flex;
- flex-direction: column;
- min-width: 0;
- padding: 6px 0;
-}
-.shortcut-label small {
- font-size: 10px;
- color: var(--faint);
-}
-.shortcut-bindings {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- justify-content: flex-end;
- gap: 2px;
- padding: 4px 0;
-}
-.shortcut-keys {
- display: inline-flex;
- align-items: center;
- gap: 3px;
-}
-.shortcut-then {
- margin: 0 1px;
- font-size: 10px;
- color: var(--faint);
-}
-.shortcut-binding {
- position: relative;
- display: inline-flex;
-}
-.shortcut-binding-keys {
- display: inline-flex;
- align-items: center;
- padding: 3px;
- background: none;
- border: 0;
- border-radius: 6px;
- transition: background 120ms;
-}
-.shortcut-binding-keys:hover,
-.shortcut-binding-keys:focus-visible {
- background: var(--hover);
-}
-.shortcut-binding-keys:focus-visible {
- outline-offset: 0;
-}
-.shortcut-binding-keys kbd {
- transition:
- color 120ms,
- border-color 120ms;
-}
-.shortcut-binding-keys:hover kbd,
-.shortcut-binding-keys:focus-visible kbd {
- color: var(--text);
- border-color: var(--muted);
-}
-/* Sits on the corner of its keys, so removing one never shifts the others. */
-.shortcut-remove {
- position: absolute;
- top: -3px;
- right: -3px;
- display: grid;
- place-items: center;
- width: 14px;
- height: 14px;
- padding: 0;
- color: var(--muted);
- background: var(--raised);
- border: 1px solid var(--border-strong);
- border-radius: 50%;
- opacity: 0;
- transform: scale(0.8);
- transition:
- opacity 120ms,
- transform 120ms,
- color 120ms;
-}
-.shortcut-binding:hover .shortcut-remove,
-.shortcut-binding:focus-within .shortcut-remove {
- opacity: 1;
- transform: none;
-}
-.shortcut-remove:hover {
- color: var(--red);
- border-color: color-mix(in srgb, var(--red) 45%, transparent);
-}
-.shortcut-bindings > .button {
- width: 24px;
- height: 24px;
- min-height: 24px;
- padding: 4px;
- color: var(--muted);
-}
-.shortcut-add {
- opacity: 0;
- transition: opacity 120ms;
-}
-.shortcut-item:hover .shortcut-add,
-.shortcut-item:focus-within .shortcut-add {
- opacity: 1;
-}
-.shortcut-bindings > .shortcut-reset {
- color: var(--accent);
-}
-.shortcut-empty {
- display: inline-flex;
- align-items: center;
- gap: 4px;
- height: 24px;
- padding: 0 8px;
- font-size: 11px;
- color: var(--faint);
- background: none;
- border: 1px dashed var(--border-strong);
- border-radius: 6px;
- transition:
- color 120ms,
- border-color 120ms;
-}
-.shortcut-empty:hover {
- color: var(--text);
- border-color: var(--muted);
-}
-.shortcut-recorder {
- position: relative;
- overflow: hidden;
- display: inline-flex;
- align-items: center;
- gap: 4px;
- height: 24px;
- margin: 0 2px;
- padding: 0 9px;
- font-size: 11px;
- color: var(--accent);
- background: var(--accent-tint);
- border: 1px solid var(--accent-solid);
- border-radius: 6px;
- box-shadow: 0 0 0 3px var(--accent-tint);
- animation: shortcut-listen 1.6s ease-in-out infinite;
-}
-.shortcut-recorder:focus-visible {
- outline: none;
-}
-.shortcut-recorder kbd {
- color: var(--accent);
- border-color: color-mix(in srgb, var(--accent) 40%, transparent);
-}
-.shortcut-recorder .shortcut-then {
- color: inherit;
-}
-/* Counts down the moment left to add a second key. */
-.shortcut-recorder-timer {
- position: absolute;
- inset: auto 0 0;
- height: 2px;
- background: var(--accent-solid);
- transform-origin: left;
- animation: shortcut-timer linear forwards;
-}
@keyframes shortcut-listen {
50% {
border-color: color-mix(in srgb, var(--accent-solid) 45%, transparent);
@@ -3581,766 +68,3 @@ fieldset.compose-format:disabled {
transform: scaleX(0);
}
}
-@media (prefers-reduced-motion: reduce) {
- .shortcut-recorder {
- animation: none;
- }
-}
-.shortcut-notice {
- margin: 0 0 10px;
- font-size: 11px;
- line-height: 1.7;
- color: var(--muted);
-}
-.shortcut-notice kbd {
- height: 16px;
- min-width: 16px;
- font-size: 9px;
-}
-.shortcut-conflict {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 8px 12px;
- padding: 8px 10px;
- color: var(--secondary);
- background: color-mix(in srgb, var(--star) 7%, transparent);
- border: 1px solid color-mix(in srgb, var(--star) 22%, transparent);
- border-radius: 7px;
-}
-.shortcut-conflict p {
- flex: 1 1 180px;
- margin: 0;
-}
-.shortcut-conflict strong {
- font-weight: 500;
- color: var(--text-strong);
-}
-.shortcut-conflict-actions {
- display: flex;
- gap: 6px;
- margin-left: auto;
-}
-.shortcut-no-results {
- margin: 0;
- padding: 28px 0;
- font-size: 12px;
- text-align: center;
- color: var(--muted);
-}
-
-/* β€”β€”β€” Settings β€”β€”β€” */
-.setting-select {
- width: auto;
- min-width: 240px;
- flex-shrink: 0;
-}
-/* Anchored near the top so the input stays put while results change height. */
-.command-modal {
- top: min(16vh, 140px);
- transform: translate(-50%, 0);
-}
-.command-modal[data-starting-style],
-.command-modal[data-ending-style] {
- transform: translate(-50%, -6px) scale(0.985);
-}
-
-/* β€”β€”β€” Recipients β€”β€”β€” */
-.recipient-field {
- position: relative;
- cursor: text;
- padding: 4px 0;
-}
-.recipient-chips {
- flex: 1;
- min-width: 0;
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 4px;
-}
-.recipient-chips input {
- flex: 1;
- min-width: 120px;
- padding: 5px 0;
-}
-.recipient-chip {
- display: inline-flex;
- align-items: center;
- gap: 3px;
- height: 24px;
- max-width: 260px;
- padding: 0 4px 0 8px;
- overflow: hidden;
- font-size: 12px;
- white-space: nowrap;
- text-overflow: ellipsis;
- color: var(--text);
- background: var(--hover);
- border: 1px solid var(--border-strong);
- border-radius: 12px;
- cursor: default;
-}
-.recipient-chip.invalid {
- color: var(--red);
- border-color: color-mix(in srgb, var(--red) 45%, transparent);
- background: color-mix(in srgb, var(--red) 8%, transparent);
-}
-.recipient-chip button {
- display: grid;
- place-items: center;
- width: 16px;
- height: 16px;
- padding: 0;
- border: 0;
- border-radius: 50%;
- background: none;
- color: var(--muted);
-}
-.recipient-chip button:hover {
- color: var(--text-strong);
- background: var(--border-strong);
-}
-.compose-field > .compose-cc-toggle {
- align-self: flex-start;
- margin-top: 9px;
- padding: 0 2px;
-}
-.compose-field > .compose-cc-toggle:hover {
- color: var(--text);
-}
-.recipient-suggestions {
- position: absolute;
- z-index: 5;
- top: calc(100% + 4px);
- left: 43px;
- width: min(360px, calc(100% - 43px));
- padding: 4px;
- background: var(--raised);
- border: 1px solid var(--border-strong);
- border-radius: 8px;
- box-shadow: var(--shadow);
-}
-.recipient-suggestions button {
- display: flex;
- align-items: center;
- gap: 10px;
- width: 100%;
- padding: 6px 8px;
- text-align: left;
- border: 0;
- border-radius: 5px;
- background: none;
-}
-.recipient-suggestions button.active {
- background: var(--hover);
-}
-.recipient-suggestions span:not(.avatar) {
- min-width: 0;
-}
-.recipient-suggestions strong,
-.recipient-suggestions small {
- display: block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.recipient-suggestions strong {
- font-size: 12px;
- font-weight: 500;
-}
-.recipient-suggestions small {
- font-size: 11px;
- color: var(--muted);
-}
-
-.account-tile-button {
- display: inline-flex;
- padding: 0;
- border: 0;
- border-radius: 50%;
- background: none;
- transition: box-shadow 120ms;
-}
-.account-tile-button:hover,
-.account-tile-button[data-popup-open] {
- box-shadow: 0 0 0 1px var(--border-strong);
-}
-.account-tile-button.dragging {
- box-shadow: 0 0 0 2px var(--accent-solid);
-}
-/* Opens from the settings dialog, so it has to sit above it. */
-.account-avatar-menu {
- z-index: 130;
-}
-
-/* β€”β€”β€” Account setup β€”β€”β€” */
-.form-label {
- display: block;
- margin-bottom: 6px;
- font-size: 12px;
- color: var(--secondary);
-}
-.field-error {
- display: block;
- margin-top: 5px;
- font-size: 11px;
- color: var(--red);
-}
-.form-field input[aria-invalid='true'] {
- border-color: color-mix(in srgb, var(--red) 70%, transparent);
-}
-.account-form-address {
- display: flex;
- align-items: baseline;
- gap: 10px;
-}
-.account-form-address > span {
- color: var(--secondary);
- overflow-wrap: anywhere;
-}
-.account-form-address .text-action {
- font-size: 12px;
-}
-.account-form-problem {
- margin: 14px 0 0;
-}
-.account-form-section-heading {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 12px;
- min-height: 26px;
-}
-.account-form-section-heading h4 {
- margin: 0;
-}
-.account-form-section-heading .button {
- margin-right: -8px;
- color: var(--muted);
-}
-.account-form-manual {
- margin-right: auto;
- margin-left: -10px;
- color: var(--muted);
-}
-.setup-lookup {
- display: flex;
- align-items: center;
- gap: 8px;
- min-height: 18px;
- margin-top: 12px;
- font-size: 12px;
- color: var(--muted);
-}
-.setup-notice {
- margin: 10px 0 4px;
-}
-.protocol-tag {
- display: inline-flex;
- align-items: center;
- height: 18px;
- padding: 0 6px;
- border: 1px solid var(--border-strong);
- border-radius: 4px;
- font-size: 10px;
- font-weight: 500;
- letter-spacing: 0.3px;
- color: var(--muted);
- white-space: nowrap;
- flex-shrink: 0;
-}
-.server-options {
- display: grid;
- gap: 6px;
- margin: 12px 0 10px;
-}
-.server-option {
- display: flex;
- align-items: center;
- gap: 10px;
- min-width: 0;
- padding: 9px 12px;
- border: 1px solid var(--border-strong);
- border-radius: 8px;
- font-size: 12px;
- color: var(--secondary);
- cursor: pointer;
- transition:
- border-color 120ms,
- background 120ms;
-}
-.server-option:hover {
- background: var(--hover);
-}
-.server-option.chosen {
- border-color: color-mix(in srgb, var(--accent-solid) 60%, transparent);
- background: var(--accent-tint);
- color: var(--text-strong);
-}
-.server-option.chosen .theme-radio {
- box-shadow: inset 0 0 0 4px var(--accent-solid);
-}
-.server-option:has(input:focus-visible),
-.segmented-option:has(input:focus-visible) {
- outline: 2px solid var(--accent);
- outline-offset: 2px;
-}
-.server-option-title {
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.server-option-source {
- margin-left: auto;
- flex-shrink: 0;
- font-size: 11px;
- color: var(--muted);
-}
-.server-card {
- margin-top: 12px;
- padding: 12px 14px 4px;
- border: 1px solid var(--border-strong);
- border-radius: 8px;
- background: var(--field);
-}
-.server-card-heading {
- display: flex;
- align-items: center;
- gap: 10px;
- margin-bottom: 4px;
-}
-.server-card-source {
- font-size: 11px;
- color: var(--muted);
-}
-.server-summary {
- margin: 0;
- font-size: 12px;
-}
-.server-summary > div {
- display: grid;
- grid-template-columns: 118px minmax(0, 1fr);
- gap: 12px;
- padding: 8px 0;
-}
-.server-summary > div + div {
- border-top: 1px solid var(--border);
-}
-.server-summary dt {
- color: var(--muted);
-}
-.server-summary dd {
- display: flex;
- flex-wrap: wrap;
- gap: 4px 14px;
- margin: 0;
- min-width: 0;
- color: var(--text);
- overflow-wrap: anywhere;
-}
-.server-host {
- font-weight: 500;
- color: var(--text-strong);
-}
-.server-meta {
- color: var(--secondary);
- font-variant-numeric: tabular-nums;
-}
-.server-fields .form-field {
- margin-top: 14px;
-}
-.server-group {
- margin: 18px 0 0;
- padding: 0;
- border: 0;
- min-width: 0;
-}
-.server-group legend {
- padding: 0;
- font-size: 11px;
- font-weight: 500;
- color: var(--secondary);
-}
-.server-row {
- display: grid;
- grid-template-columns: minmax(0, 1fr) 76px auto;
- gap: 0 12px;
- align-items: start;
-}
-.server-row .form-field {
- margin-top: 8px;
-}
-.segmented {
- display: inline-flex;
- padding: 2px;
- gap: 2px;
- border: 1px solid var(--border-strong);
- border-radius: 7px;
- background: var(--field);
-}
-.segmented[data-disabled] {
- opacity: 0.5;
-}
-.segmented-option {
- display: inline-flex;
- align-items: center;
- height: 30px;
- padding: 0 11px;
- border-radius: 5px;
- font-size: 12px;
- color: var(--muted);
- white-space: nowrap;
- cursor: pointer;
- transition:
- background 120ms,
- color 120ms;
-}
-.segmented-option:hover {
- color: var(--text);
-}
-.segmented-option.chosen {
- background: var(--selected);
- color: var(--text-strong);
- font-weight: 500;
- box-shadow: 0 1px 2px #0000001a;
-}
-.connection-checks {
- list-style: none;
- margin: 10px 0 0;
- padding: 0;
- border: 1px solid var(--border-strong);
- border-radius: 8px;
-}
-.connection-check {
- display: grid;
- grid-template-columns: 16px 64px minmax(0, auto) minmax(0, 1fr);
- gap: 10px;
- align-items: baseline;
- padding: 10px 14px;
- font-size: 12px;
-}
-.connection-check + .connection-check {
- border-top: 1px solid var(--border);
-}
-.connection-check strong {
- font-weight: 500;
-}
-.connection-check-icon {
- display: flex;
- align-self: center;
- color: var(--muted);
-}
-.connection-check.ok .connection-check-icon,
-.connection-check.ok .connection-check-result {
- color: var(--green);
-}
-.connection-check.failed .connection-check-icon,
-.connection-check.failed .connection-check-result {
- color: var(--red);
-}
-.connection-check-host {
- color: var(--muted);
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.connection-check-result {
- color: var(--muted);
- line-height: 1.5;
-}
-.connection-check-hint {
- margin: 10px 0 0;
- font-size: 11px;
- color: var(--muted);
-}
-.modal-body-text {
- margin: 0;
- font-size: 12px;
- line-height: 1.6;
- color: var(--secondary);
-}
-
-/* β€”β€”β€” Folder roles β€”β€”β€” */
-.folder-modal {
- width: min(600px, calc(100vw - 40px));
-}
-.folder-roles {
- display: grid;
-}
-.folder-role {
- display: grid;
- grid-template-columns: minmax(0, 1fr) 220px;
- gap: 16px;
- align-items: center;
- padding: 12px 0;
-}
-.folder-role + .folder-role {
- border-top: 1px solid var(--border);
-}
-.folder-role-text {
- display: flex;
- flex-wrap: wrap;
- align-items: baseline;
- gap: 2px 10px;
- min-width: 0;
-}
-.folder-role-text label {
- color: var(--text);
-}
-.folder-role-text strong {
- font-size: 13px;
- font-weight: 500;
-}
-.folder-role-text p {
- flex-basis: 100%;
- margin: 0;
- font-size: 11px;
- color: var(--muted);
-}
-.folder-role-status {
- display: inline-flex;
- align-items: center;
- gap: 5px;
- font-size: 11px;
- color: var(--muted);
-}
-.folder-role-status.confirmed svg {
- color: var(--green);
-}
-.folder-role-status.uncertain {
- color: var(--accent);
-}
-.folder-role-dot {
- width: 6px;
- height: 6px;
- border-radius: 50%;
- background: var(--accent);
-}
-.folder-roles-loading {
- display: flex;
- align-items: center;
- gap: 8px;
- padding: 20px 0;
- font-size: 12px;
- color: var(--muted);
-}
-
-/* β€”β€”β€” Account list additions β€”β€”β€” */
-.settings-account strong .protocol-tag {
- margin-left: 8px;
- vertical-align: 1px;
- height: 16px;
- font-size: 9px;
-}
-.settings-account small.outgoing-error {
- align-items: flex-start;
- margin-top: 3px;
-}
-.settings-account small.outgoing-error svg {
- flex-shrink: 0;
- margin-top: 2px;
-}
-.account-indexing {
- color: var(--muted);
-}
-.indexing-meter {
- display: inline-flex;
- align-items: center;
- gap: 10px;
- font-variant-numeric: tabular-nums;
-}
-.indexing-bar {
- position: relative;
- width: 72px;
- height: 3px;
- flex-shrink: 0;
- border-radius: 2px;
- background: var(--border-strong);
- overflow: hidden;
-}
-.indexing-bar > span {
- position: absolute;
- inset: 0 auto 0 0;
- border-radius: inherit;
- background: var(--accent);
- transition: width 400ms ease;
-}
-
-/* β€”β€”β€” Incomplete results β€”β€”β€” */
-.indexing-notice {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- justify-content: space-between;
- gap: 4px 14px;
- padding: 8px 28px;
- border-bottom: 1px solid var(--border);
- font-size: 11px;
- color: var(--muted);
-}
-
-/* β€”β€”β€” Sending status β€”β€”β€” */
-.draft-section-label {
- margin: 0;
- padding: 18px 32px 6px;
- font-size: 11px;
- font-weight: 500;
- color: var(--muted);
-}
-.submissions {
- border-bottom: 1px solid var(--border);
- padding-bottom: 6px;
-}
-.submission {
- display: flex;
- gap: 16px;
- align-items: flex-start;
- padding: 14px 32px;
-}
-.submission + .submission {
- border-top: 1px solid var(--border);
-}
-.submission-icon {
- display: flex;
- margin-top: 1px;
- color: var(--muted);
-}
-.submission-attention .submission-icon {
- color: var(--accent);
-}
-.submission-text {
- flex: 1;
- min-width: 0;
-}
-.submission-text strong {
- display: block;
- font-size: 13px;
- font-weight: 500;
- color: var(--text);
-}
-.submission-state {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 4px 12px;
- margin-top: 3px;
- font-size: 12px;
- color: var(--secondary);
-}
-.submission-attention .submission-state {
- color: var(--text-strong);
-}
-.submission-account {
- display: inline-flex;
- align-items: center;
- gap: 6px;
- font-size: 11px;
- color: var(--muted);
-}
-.submission-detail {
- display: block;
- margin-top: 4px;
- max-width: 560px;
- font-size: 11px;
- line-height: 1.6;
- color: var(--muted);
- overflow-wrap: anywhere;
-}
-.submission-actions {
- display: flex;
- flex-wrap: wrap;
- gap: 6px;
- margin-top: 10px;
-}
-.submission time {
- flex-shrink: 0;
- font-size: 11px;
- color: var(--muted);
-}
-.sidebar-sending > svg,
-.sidebar-sending > span {
- color: var(--accent);
-}
-.sidebar-sending small {
- margin-left: auto;
-}
-
-/* β€”β€”β€” Unavailable actions β€”β€”β€” */
-.menu-note {
- max-width: 240px;
- margin: 4px 0 0;
- padding: 7px 10px 5px;
- border-top: 1px solid var(--border);
- font-size: 11px;
- line-height: 1.5;
- color: var(--muted);
-}
-.command-text {
- min-width: 0;
-}
-.command-description {
- display: block;
- margin-top: 2px;
- font-size: 11px;
- color: var(--muted);
- white-space: normal;
-}
-.command-results button.unavailable .command-text > :first-child,
-.command-results button.unavailable .command-icon,
-.command-results button.unavailable .command-keys {
- opacity: 0.55;
-}
-.compose-warning-detail {
- display: block;
- margin-top: 2px;
- color: var(--muted);
-}
-@container (max-width: 680px) {
- .indexing-notice {
- padding-left: 20px;
- padding-right: 20px;
- }
- .submission,
- .draft-section-label {
- padding-left: 20px;
- padding-right: 20px;
- }
-}
-@media (max-width: 700px) {
- .server-row {
- grid-template-columns: minmax(0, 1fr) 76px;
- }
- .server-row > :last-child {
- grid-column: 1 / -1;
- }
- .folder-role {
- grid-template-columns: minmax(0, 1fr) 180px;
- }
- .server-option-source {
- display: none;
- }
-}
-.tooltip-with-hint {
- align-items: flex-start;
- max-width: 280px;
-}
-.tooltip-text {
- display: flex;
- flex-direction: column;
- gap: 2px;
-}
-.tooltip-hint {
- color: var(--muted);
- line-height: 1.5;
-}
-/* Unavailable but still focusable, so the tooltip can explain why. */
-.button[aria-disabled='true'] {
- opacity: 0.4;
- cursor: default;
-}
-.button-ghost[aria-disabled='true']:hover {
- background: transparent;
- color: var(--secondary);
-}
diff --git a/packages/ui/src/components/checkbox.tsx b/packages/ui/src/components/checkbox.tsx
index 0714710..0286a39 100644
--- a/packages/ui/src/components/checkbox.tsx
+++ b/packages/ui/src/components/checkbox.tsx
@@ -24,10 +24,17 @@ export function Checkbox({
indeterminate={indeterminate}
disabled={disabled}
aria-label={ariaLabel}
- className={cn('checkbox', className)}
+ className={cn(
+ 'checkbox inline-grid place-content-center shrink-0 w-3.75 h-3.75 border border-solid border-faint rounded-xs',
+ 'bg-transparent text-white cursor-pointer transition-[background,border-color] duration-100 ease-[ease]',
+ '[&:hover:not([data-disabled])]:border-muted data-checked:bg-primary-solid data-checked:border-primary-solid',
+ 'data-indeterminate:bg-primary-solid data-indeterminate:border-primary-solid data-disabled:opacity-40',
+ 'data-disabled:cursor-default',
+ className,
+ )}
onCheckedChange={(next, details) => onCheckedChange(next, details.event)}
>
- <BaseCheckbox.Indicator className="checkbox-indicator">
+ <BaseCheckbox.Indicator className="checkbox-indicator flex data-unchecked:hidden">
{indeterminate ? (
<Minus size={11} strokeWidth={2.5} />
) : (
diff --git a/packages/ui/src/components/date-picker.tsx b/packages/ui/src/components/date-picker.tsx
index 1e657a6..282095f 100644
--- a/packages/ui/src/components/date-picker.tsx
+++ b/packages/ui/src/components/date-picker.tsx
@@ -4,6 +4,15 @@ import { DayPicker } from 'react-day-picker'
import { cn } from '../lib/utils'
import { Calendar, ChevronLeft, ChevronRight, X } from '../icons'
+const calendarNavigationClasses = cn(
+ 'button inline-flex items-center justify-center gap-1.75 border border-solid rounded-md text-[12px] font-medium',
+ 'whitespace-nowrap transition-[background,color] duration-120 ease-[ease] [&:hover:not(:disabled)]:bg-hover',
+ "[&[aria-disabled='true']]:opacity-40 [&[aria-disabled='true']]:cursor-default button-ghost bg-transparent",
+ 'border-transparent [&:hover:not(:disabled)]:border-transparent [&:hover:not(:disabled)]:text-strong',
+ "[&[aria-disabled='true']:hover]:bg-transparent [&[aria-disabled='true']:hover]:text-secondary button-icon",
+ 'calendar-nav-button w-7 h-7 min-h-7 p-0 text-muted',
+)
+
/** Parses a `yyyy-mm-dd` string as a local calendar day. */
const parseDay = (value?: string) => {
const match = value && /^(\d{4})-(\d{2})-(\d{2})/.exec(value)
@@ -34,10 +43,26 @@ export function DatePicker({
const selected = parseDay(value)
return (
<Popover.Root open={open} onOpenChange={setOpen}>
- <div className={cn('date-picker', className)}>
- <Popover.Trigger className="select-trigger date-trigger" aria-label={ariaLabel}>
- <Calendar size={14} className="date-trigger-icon" />
- <span className={cn('select-value', !selected && 'placeholder')}>
+ <div
+ className={cn('date-picker relative [&:has(.date-clear)_.date-trigger]:pr-8', className)}
+ >
+ <Popover.Trigger
+ className={cn(
+ 'select-trigger flex items-center gap-2 w-full min-w-0 h-9 py-0 pr-2.5 pl-2.75 text-foreground bg-field border',
+ 'border-solid border-border-strong rounded-md text-[12px] text-left transition-[border-color,background]',
+ 'duration-120 ease-[ease] [&:hover:not([data-disabled])]:bg-field-hover data-popup-open:border-primary-solid',
+ 'data-popup-open:outline-none focus-visible:border-primary-solid focus-visible:outline-none',
+ 'data-disabled:opacity-50 data-disabled:cursor-default date-trigger',
+ )}
+ aria-label={ariaLabel}
+ >
+ <Calendar size={14} className="date-trigger-icon text-muted" />
+ <span
+ className={cn(
+ 'select-value flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap [&.placeholder]:text-muted',
+ !selected && 'placeholder',
+ )}
+ >
{selected
? selected.toLocaleDateString(undefined, { dateStyle: 'medium' })
: placeholder}
@@ -46,7 +71,10 @@ export function DatePicker({
{selected && (
<button
type="button"
- className="date-clear"
+ className={cn(
+ 'date-clear absolute top-[50%] right-1.75 transform-[translateY(-50%)] grid place-content-center w-5.5 h-5.5 p-0',
+ 'border-0 rounded-sm bg-none bg-transparent text-muted hover:bg-hover hover:text-foreground',
+ )}
aria-label={'Clear ' + (ariaLabel || 'date')}
onClick={() => onValueChange(undefined)}
>
@@ -55,8 +83,15 @@ export function DatePicker({
)}
</div>
<Popover.Portal>
- <Popover.Positioner sideOffset={6} align="start" className="date-positioner">
- <Popover.Popup className="dropdown date-popup">
+ <Popover.Positioner sideOffset={6} align="start" className="date-positioner z-120">
+ <Popover.Popup
+ className={cn(
+ 'dropdown bg-raised border border-solid border-border-strong rounded-lg shadow-popup z-120',
+ 'origin-[var(--transform-origin)] transition-[opacity,transform] duration-100 ease-[ease]',
+ 'data-starting-style:opacity-0 data-starting-style:transform-[scale(0.98)] data-ending-style:opacity-0',
+ 'data-ending-style:transform-[scale(0.98)] date-popup min-w-0 p-3',
+ )}
+ >
<DayPicker
mode="single"
autoFocus
@@ -72,20 +107,26 @@ export function DatePicker({
orientation === 'left' ? <ChevronLeft size={14} /> : <ChevronRight size={14} />,
}}
classNames={{
- root: 'calendar',
+ root: 'calendar relative text-[12px]',
months: 'calendar-months',
month: 'calendar-month',
- month_caption: 'calendar-caption',
- caption_label: 'calendar-caption-label',
- nav: 'calendar-nav',
- button_previous: 'button button-ghost button-icon calendar-nav-button',
- button_next: 'button button-ghost button-icon calendar-nav-button',
- month_grid: 'calendar-grid',
+ month_caption: 'calendar-caption flex items-center h-7 py-0 px-1',
+ caption_label: 'calendar-caption-label font-medium text-strong',
+ nav: 'calendar-nav absolute top-0 right-0 flex gap-[2px]',
+ button_previous: calendarNavigationClasses,
+ button_next: calendarNavigationClasses,
+ month_grid: 'calendar-grid border-collapse mt-1.5',
weekdays: 'calendar-weekdays',
- weekday: 'calendar-weekday',
+ weekday: 'calendar-weekday w-8.5 h-7 text-[11px] font-normal text-faint',
week: 'calendar-week',
- day: 'calendar-day',
- day_button: 'calendar-day-button',
+ day: cn(
+ 'calendar-day p-[1px] text-center [&.today_.calendar-day-button]:text-primary',
+ '[&.today_.calendar-day-button]:font-semibold [&.outside_.calendar-day-button]:text-faint',
+ '[&.selected_.calendar-day-button]:bg-primary-solid [&.selected_.calendar-day-button]:text-white',
+ '[&.selected_.calendar-day-button]:font-medium [&.disabled_.calendar-day-button]:opacity-40 [&.hidden]:invisible',
+ ),
+ day_button:
+ 'calendar-day-button w-8 h-8 p-0 border-0 rounded-md bg-none bg-transparent text-foreground tabular-nums transition-[background] duration-100 ease-[ease] hover:bg-hover',
selected: 'selected',
today: 'today',
outside: 'outside',
diff --git a/packages/ui/src/components/select.tsx b/packages/ui/src/components/select.tsx
index 4f293ae..d55e162 100644
--- a/packages/ui/src/components/select.tsx
+++ b/packages/ui/src/components/select.tsx
@@ -34,29 +34,48 @@ export function Select<Value extends string>({
<BaseSelect.Trigger
id={id}
aria-label={ariaLabel}
- className={cn('select-trigger', className)}
+ className={cn(
+ 'select-trigger flex items-center gap-2 w-full min-w-0 h-9 py-0 pr-2.5 pl-2.75 text-foreground bg-field border',
+ 'border-solid border-border-strong rounded-md text-[12px] text-left transition-[border-color,background]',
+ 'duration-120 ease-[ease] [&:hover:not([data-disabled])]:bg-field-hover data-popup-open:border-primary-solid',
+ 'data-popup-open:outline-none focus-visible:border-primary-solid focus-visible:outline-none',
+ 'data-disabled:opacity-50 data-disabled:cursor-default',
+ className,
+ )}
>
- <BaseSelect.Value className="select-value" />
- <BaseSelect.Icon className="select-icon">
+ <BaseSelect.Value className="select-value flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap [&.placeholder]:text-muted" />
+ <BaseSelect.Icon className="select-icon flex text-muted">
<ChevronDown size={13} />
</BaseSelect.Icon>
</BaseSelect.Trigger>
<BaseSelect.Portal>
<BaseSelect.Positioner
- className="select-positioner"
+ className="select-positioner z-120"
sideOffset={6}
alignItemWithTrigger={false}
>
- <BaseSelect.Popup className="dropdown select-popup">
+ <BaseSelect.Popup
+ className={cn(
+ 'dropdown bg-raised border border-solid border-border-strong rounded-lg shadow-popup p-1.25 z-120',
+ 'origin-[var(--transform-origin)] transition-[opacity,transform] duration-100 ease-[ease]',
+ 'data-starting-style:opacity-0 data-starting-style:transform-[scale(0.98)] data-ending-style:opacity-0',
+ 'data-ending-style:transform-[scale(0.98)] select-popup min-w-[var(--anchor-width)]',
+ 'max-h-[min(320px,_var(--available-height))] overflow-y-auto',
+ )}
+ >
<BaseSelect.List>
{options.map((option) => (
<BaseSelect.Item
key={option.value}
value={option.value}
- className="menu-item select-item"
+ className={cn(
+ 'menu-item flex items-center gap-2.25 text-[12px] py-1.75 px-2.5 rounded-xs outline-none cursor-pointer',
+ 'data-highlighted:bg-hover data-highlighted:text-strong data-disabled:opacity-40 [&.danger]:text-danger',
+ '[&_kbd]:ml-auto select-item justify-between',
+ )}
>
<BaseSelect.ItemText>{option.label}</BaseSelect.ItemText>
- <BaseSelect.ItemIndicator className="select-item-indicator">
+ <BaseSelect.ItemIndicator className="select-item-indicator flex text-primary">
<Check size={13} />
</BaseSelect.ItemIndicator>
</BaseSelect.Item>
diff --git a/packages/ui/src/components/switch.tsx b/packages/ui/src/components/switch.tsx
index 3a0343d..e0c2dab 100644
--- a/packages/ui/src/components/switch.tsx
+++ b/packages/ui/src/components/switch.tsx
@@ -19,10 +19,15 @@ export function Switch({
checked={checked}
disabled={disabled}
aria-label={ariaLabel}
- className={cn('switch', className)}
+ className={cn(
+ 'switch group/switch relative inline-flex shrink-0 w-7.5 h-4.5 p-[2px] rounded-3xl bg-hover',
+ 'shadow-[inset_0_0_0_1px_var(--border-strong)] cursor-pointer transition-[background] duration-120 ease-[ease]',
+ 'data-checked:bg-primary-solid data-checked:shadow-none data-disabled:opacity-40 data-disabled:cursor-default',
+ className,
+ )}
onCheckedChange={(next) => onCheckedChange(next)}
>
- <BaseSwitch.Thumb className="switch-thumb" />
+ <BaseSwitch.Thumb className="switch-thumb w-3.5 h-3.5 rounded-full bg-muted [transition:transform_140ms_ease,_background_120ms] group-data-checked/switch:bg-white group-data-checked/switch:transform-[translateX(12px)]" />
</BaseSwitch.Root>
)
}
diff --git a/packages/ui/src/index.tsx b/packages/ui/src/index.tsx
index dc4d629..4bdc5d5 100644
--- a/packages/ui/src/index.tsx
+++ b/packages/ui/src/index.tsx
@@ -5,6 +5,20 @@ import { Menu } from '@base-ui/react/menu'
import { cn } from './lib/utils'
export { cn } from './lib/utils'
import { X, LoaderCircle } from './icons'
+const buttonVariants = {
+ default: '',
+ primary:
+ 'button-primary bg-primary-solid border-transparent text-white shadow-[inset_0_1px_#ffffff12] [&:hover:not(:disabled)]:bg-[color-mix(in_srgb,_var(--accent-solid)_85%,_white)] [&:hover:not(:disabled)]:border-transparent',
+ ghost:
+ "button-ghost bg-transparent border-transparent text-secondary [&:hover:not(:disabled)]:border-transparent [&:hover:not(:disabled)]:text-strong [&[aria-disabled='true']:hover]:bg-transparent [&[aria-disabled='true']:hover]:text-secondary",
+ danger: 'button-danger text-danger',
+}
+const buttonSizes = {
+ default: '',
+ icon: 'button-icon p-1.25 w-7.25 h-7.25 min-h-7.25',
+ small: 'button-small min-h-6.5 py-[3px] px-2 text-[11px]',
+}
+
export function Button({
className,
variant = 'default',
@@ -17,7 +31,15 @@ export function Button({
return (
<button
type="button"
- className={cn('button', 'button-' + variant, 'button-' + size, className)}
+ className={cn(
+ 'button inline-flex items-center justify-center gap-1.75 border border-solid border-border-strong bg-surface',
+ 'rounded-md py-1.5 px-2.75 text-[12px] font-medium whitespace-nowrap transition-[background,color] duration-120',
+ 'ease-[ease] min-h-8 [&:hover:not(:disabled)]:bg-hover [&:hover:not(:disabled)]:border-foreground/24',
+ "[&[aria-disabled='true']]:opacity-40 [&[aria-disabled='true']]:cursor-default",
+ buttonVariants[variant],
+ buttonSizes[size],
+ className,
+ )}
{...props}
/>
)
@@ -37,7 +59,7 @@ export function IconButton({
</Tooltip.Trigger>
<Tooltip.Portal>
<Tooltip.Positioner sideOffset={7}>
- <Tooltip.Popup className="tooltip">
+ <Tooltip.Popup className="tooltip flex gap-3 items-center py-1.5 px-2.25 bg-raised border border-solid border-border-strong rounded-md text-[11px] shadow-popup z-200">
{label}
{shortcut && <kbd>{shortcut}</kbd>}
</Tooltip.Popup>
@@ -66,13 +88,27 @@ export function Modal({
return (
<Dialog.Root open={open} onOpenChange={onOpenChange}>
<Dialog.Portal>
- <Dialog.Backdrop className="modal-backdrop" />
- <Dialog.Popup ref={popupRef} className={cn('modal', className)}>
- <div className="modal-heading">
+ <Dialog.Backdrop className="modal-backdrop fixed inset-0 bg-[#0505079c] backdrop-blur-[5px] transition-[opacity] duration-160 ease-[ease] z-100 data-starting-style:opacity-0 data-ending-style:opacity-0" />
+ <Dialog.Popup
+ ref={popupRef}
+ className={cn(
+ 'modal fixed top-[50%] left-[50%] transform-[translate(-50%,_-50%)] w-[min(560px,_calc(100vw_-_40px))]',
+ 'max-h-[calc(100vh_-_70px)] overflow-y-auto bg-surface border border-solid border-border-strong rounded-2xl',
+ 'shadow-popup p-5.75 z-101 max-w-[calc(100vw_-_40px)] transition-[opacity,transform] duration-160 ease-[ease]',
+ 'data-starting-style:opacity-0 data-starting-style:transform-[translate(-50%,_-48%)_scale(0.98)]',
+ 'data-ending-style:opacity-0 data-ending-style:transform-[translate(-50%,_-48%)_scale(0.98)]',
+ className,
+ )}
+ >
+ <div className="modal-heading flex items-start justify-between gap-3.75 mb-5.5">
<div>
- <Dialog.Title className="modal-title">{title}</Dialog.Title>
+ <Dialog.Title className="modal-title text-[16px] font-[550] m-0 tracking-[-0.3px]">
+ {title}
+ </Dialog.Title>
{description && (
- <Dialog.Description className="modal-description">{description}</Dialog.Description>
+ <Dialog.Description className="modal-description text-[12px] leading-[1.6] text-secondary mt-1.25 mb-0 mx-0">
+ {description}
+ </Dialog.Description>
)}
</div>
<Dialog.Close render={<Button variant="ghost" size="icon" aria-label="Close dialog" />}>
@@ -101,7 +137,17 @@ export function Dropdown({
<Menu.Trigger render={trigger} />
<Menu.Portal container={container}>
<Menu.Positioner sideOffset={6} align="end">
- <Menu.Popup className={cn('dropdown', className)}>{children}</Menu.Popup>
+ <Menu.Popup
+ className={cn(
+ 'dropdown min-w-45 bg-raised border border-solid border-border-strong rounded-lg shadow-popup p-1.25 z-120',
+ 'origin-[var(--transform-origin)] transition-[opacity,transform] duration-100 ease-[ease]',
+ 'data-starting-style:opacity-0 data-starting-style:transform-[scale(0.98)] data-ending-style:opacity-0',
+ 'data-ending-style:transform-[scale(0.98)]',
+ className,
+ )}
+ >
+ {children}
+ </Menu.Popup>
</Menu.Positioner>
</Menu.Portal>
</Menu.Root>
@@ -120,7 +166,12 @@ export function MenuItem({
}) {
return (
<Menu.Item
- className={cn('menu-item', danger && 'danger')}
+ className={cn(
+ 'menu-item flex items-center gap-2.25 text-[12px] py-1.75 px-2.5 rounded-xs outline-none cursor-pointer',
+ 'data-highlighted:bg-hover data-highlighted:text-strong data-disabled:opacity-40',
+ '[&_kbd]:ml-auto',
+ danger && 'danger text-danger data-highlighted:text-danger',
+ )}
onClick={onClick}
disabled={disabled}
>
@@ -130,7 +181,7 @@ export function MenuItem({
}
export const TooltipProvider = Tooltip.Provider
export function Spinner({ size = 16 }: { size?: number }) {
- return <LoaderCircle className="spin" size={size} aria-label="Loading" />
+ return <LoaderCircle className="spin animate-spin" size={size} aria-label="Loading" />
}
export function EmptyState({
icon: Icon,
@@ -144,12 +195,23 @@ export function EmptyState({
children?: React.ReactNode
}) {
return (
- <div className="empty-state">
- <div className="empty-icon">
+ <div
+ className={cn(
+ 'empty-state flex-1 flex flex-col items-center justify-center pt-12 pb-[12vh] px-8 text-center',
+ '[&>h2+:not(p)]:mt-3.5 [&>.button]:mt-[2px]',
+ )}
+ >
+ <div className="empty-icon grid place-items-center w-16 h-16 mb-3.5 rounded-full text-muted bg-[radial-gradient(_circle,_color-mix(in_srgb,_var(--accent)_12%,_transparent)_0,_transparent_70%_)]">
<Icon size={26} strokeWidth={1.4} />
</div>
- <h2>{title}</h2>
- {description && <p>{description}</p>}
+ <h2 className="text-[15px] font-[550] text-strong mt-0 mb-1.5 mx-0 tracking-[-0.2px]">
+ {title}
+ </h2>
+ {description && (
+ <p className="text-[13px] text-muted max-w-75 mt-0 mb-5 mx-0 leading-[1.6] text-balance">
+ {description}
+ </p>
+ )}
{children}
</div>
)
@@ -177,7 +239,11 @@ export function Avatar({
.toUpperCase() || '?'
return (
<span
- className="avatar"
+ className={cn(
+ 'avatar inline-flex shrink-0 items-center justify-center rounded-lg',
+ 'bg-[color-mix(in_srgb,_var(--avatar-color)_12%,_transparent)] text-[var(--avatar-color)] font-semibold',
+ 'tracking-[-0.4px] overflow-hidden',
+ )}
style={
{
'--avatar-color': color || '#a69aef',
@@ -188,7 +254,12 @@ export function Avatar({
}
>
{image && !imageFailed ? (
- <img src={image} alt="" onError={() => setImageFailed(true)} />
+ <img
+ className="block w-full h-full object-cover"
+ src={image}
+ alt=""
+ onError={() => setImageFailed(true)}
+ />
) : (
letters
)}
diff --git a/packages/ui/src/styles.css b/packages/ui/src/styles.css
index 4ae62af..1cc0035 100644
--- a/packages/ui/src/styles.css
+++ b/packages/ui/src/styles.css
@@ -1,8 +1,8 @@
-@import 'tailwindcss';
+@import 'tailwindcss' source(none);
+@custom-variant light (&:where([data-theme='light'], [data-theme='light'] *));
@source "./";
-@source "../../../apps/desktop/src/renderer";
-
-/* Bundled locally: no font service or network request is needed at runtime. */
+@source "../../../apps/desktop/src/renderer/src";
+/* Bundle the font locally so the desktop never needs a remote font request. */
@font-face {
font-family: 'Inter';
font-style: normal;
@@ -14,667 +14,228 @@
@theme inline {
--color-background: var(--bg);
--color-foreground: var(--text);
+ --color-sidebar: var(--sidebar);
+ --color-surface: var(--surface);
+ --color-raised: var(--raised);
+ --color-field: var(--field);
+ --color-field-hover: var(--field-hover);
+ --color-hover: var(--hover);
+ --color-selected: var(--selected);
+ --color-strong: var(--text-strong);
+ --color-secondary: var(--secondary);
--color-muted: var(--muted);
+ --color-faint: var(--faint);
--color-border: var(--border);
+ --color-border-strong: var(--border-strong);
--color-primary: var(--accent);
+ --color-primary-solid: var(--accent-solid);
+ --color-primary-tint: var(--accent-tint);
+ --color-success: var(--green);
+ --color-danger: var(--red);
+ --color-star: var(--star);
+ --color-draft: var(--draft);
+ --color-skeleton: var(--skeleton);
+ --shadow-popup: var(--shadow);
}
-:root {
- color-scheme: dark;
- --bg: #171718;
- --sidebar: #111112;
- --surface: #1e1e20;
- --raised: #252527;
- /* Form fields sit slightly above the surface they're on, so they read as places to type. */
- --field: #ffffff08;
- --field-hover: #ffffff0d;
- --hover: #242426;
- --selected: #2a2a2c;
- --accent: #aaa6ec;
- --accent-solid: #6d67cb;
- --accent-tint: #aaa6ec12;
- --text: #dedee1;
- --text-strong: #f2f2f3;
- --secondary: #b7b7bd;
- --muted: #96969e;
- --faint: #77777f;
- --border: #ffffff0b;
- --border-strong: #ffffff1a;
- --green: #76bc9a;
- --red: #ea9198;
- --star: #d4b36e;
- /* The label on unsent drafts, so they never pass for sent mail. */
- --draft: #d4b36e;
- --skeleton: #ffffff0d;
- --shadow: 0 24px 80px #0005, 0 4px 16px #0003;
- font-family:
- Inter,
- -apple-system,
- BlinkMacSystemFont,
- 'Segoe UI',
- sans-serif;
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- font-size: 14px;
- line-height: 1.5;
- font-weight: 400;
- -webkit-font-smoothing: antialiased;
-}
-:root[data-theme='light'] {
- color-scheme: light;
- --bg: #fcfcfd;
- --sidebar: #f7f8fa;
- --surface: #ffffff;
- --raised: #ffffff;
- --field: #ffffff;
- --field-hover: #fbfbfc;
- --hover: #eff0f2;
- --selected: #e8e9ec;
- --accent: #635db5;
- --accent-solid: #6962c1;
- --accent-tint: #6962c10c;
- --text: #383a40;
- --text-strong: #202127;
- --secondary: #5d6068;
- --muted: #70737d;
- --faint: #838691;
- --border: #17191f0b;
- --border-strong: #17191f1d;
- --green: #3d9066;
- --red: #b94d55;
- --star: #b8892c;
- --draft: #8f661a;
- --skeleton: #17191f0e;
- --shadow: 0 18px 70px #10121a1a;
-}
-* {
- box-sizing: border-box;
-}
-body {
- margin: 0;
- overflow: hidden;
- background: var(--bg);
- color: var(--text);
-}
-button,
-input,
-textarea {
- font: inherit;
-}
-button {
- cursor: pointer;
- color: inherit;
-}
-button:disabled {
- cursor: default;
- opacity: 0.4;
-}
-button,
-a,
-input,
-textarea,
-[tabindex] {
- outline: none;
-}
-:focus-visible {
- outline: 2px solid var(--accent);
- outline-offset: 3px;
- border-radius: 5px;
-}
-::selection {
- background: color-mix(in srgb, var(--accent) 28%, transparent);
-}
-input,
-textarea {
- color: var(--text);
- background: var(--field);
- border: 1px solid var(--border-strong);
- border-radius: 6px;
- padding: 9px 11px;
- width: 100%;
-}
-input::placeholder,
-textarea::placeholder {
- color: var(--muted);
-}
-input:focus,
-textarea:focus {
- border-color: var(--accent-solid);
-}
-label {
- display: block;
- font-size: 12px;
- color: var(--secondary);
-}
-a {
- color: var(--accent);
- text-decoration: none;
-}
-button svg {
- flex-shrink: 0;
-}
-svg {
- vertical-align: middle;
-}
-::-webkit-scrollbar {
- width: 6px;
- height: 6px;
-}
-/* The transparent border keeps the grab area at 6px while the thumb looks 4px wide. */
-::-webkit-scrollbar-thumb {
- background: var(--border-strong);
- background-clip: padding-box;
- border: 1px solid transparent;
- border-radius: 20px;
-}
-::-webkit-scrollbar-thumb:hover {
- background-color: var(--faint);
-}
-::-webkit-scrollbar-thumb:active {
- background-color: var(--muted);
-}
-::-webkit-scrollbar-corner {
- background: transparent;
-}
-::-webkit-scrollbar-track {
- background: transparent;
-}
-.button {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- gap: 7px;
- border: 1px solid var(--border-strong);
- background: var(--surface);
- border-radius: 6px;
- padding: 6px 11px;
- font-size: 12px;
- font-weight: 500;
- white-space: nowrap;
- transition:
- background 0.12s,
- color 0.12s;
- min-height: 32px;
-}
-.button:hover:not(:disabled) {
- background: var(--hover);
- border-color: color-mix(in srgb, var(--text) 24%, transparent);
-}
-.button-primary {
- background: var(--accent-solid);
- border-color: transparent;
- color: #fff;
- box-shadow: inset 0 1px #ffffff12;
-}
-.button-primary:hover:not(:disabled) {
- background: color-mix(in srgb, var(--accent-solid) 85%, white);
- border-color: transparent;
-}
-.button-ghost {
- background: transparent;
- border-color: transparent;
- color: var(--secondary);
-}
-.button-ghost:hover:not(:disabled) {
- border-color: transparent;
- color: var(--text-strong);
-}
-.button-danger {
- color: var(--red);
-}
-.button-icon {
- padding: 5px;
- width: 29px;
- height: 29px;
- min-height: 29px;
-}
-.button-small {
- min-height: 26px;
- padding: 3px 8px;
- font-size: 11px;
-}
-.tooltip {
- display: flex;
- gap: 12px;
- align-items: center;
- padding: 6px 9px;
- background: var(--raised);
- border: 1px solid var(--border-strong);
- border-radius: 6px;
- font-size: 11px;
- box-shadow: var(--shadow);
- z-index: 200;
-}
-kbd {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- min-width: 17px;
- height: 18px;
- padding: 0 4px;
- font-family: inherit;
- font-size: 10px;
- line-height: 1;
- color: var(--muted);
- border: 1px solid var(--border-strong);
- border-radius: 4px;
-}
-.modal-backdrop {
- position: fixed;
- inset: 0;
- background: #0505079c;
- backdrop-filter: blur(5px);
- transition: opacity 160ms ease;
- z-index: 100;
-}
-.modal {
- position: fixed;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: min(560px, calc(100vw - 40px));
- max-height: calc(100vh - 70px);
- overflow-y: auto;
- background: var(--surface);
- border: 1px solid var(--border-strong);
- border-radius: 12px;
- box-shadow: var(--shadow);
- padding: 23px;
- z-index: 101;
- max-width: calc(100vw - 40px);
- transition:
- opacity 160ms ease,
- transform 160ms ease;
-}
-.modal-heading {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- gap: 15px;
- margin-bottom: 22px;
-}
-.modal-title {
- font-size: 16px;
- font-weight: 550;
- margin: 0;
- letter-spacing: -0.3px;
-}
-.modal-description {
- font-size: 12px;
- line-height: 1.6;
- color: var(--secondary);
- margin: 5px 0 0;
-}
-.dropdown {
- min-width: 180px;
- background: var(--raised);
- border: 1px solid var(--border-strong);
- border-radius: 8px;
- box-shadow: var(--shadow);
- padding: 5px;
- z-index: 120;
- transform-origin: var(--transform-origin);
- transition:
- opacity 100ms ease,
- transform 100ms ease;
-}
-.menu-item {
- display: flex;
- align-items: center;
- gap: 9px;
- font-size: 12px;
- padding: 7px 10px;
- border-radius: 4px;
- outline: none;
- cursor: pointer;
-}
-.menu-item[data-highlighted] {
- background: var(--hover);
- color: var(--text-strong);
-}
-.menu-item[data-disabled] {
- opacity: 0.4;
-}
-.menu-item.danger {
- color: var(--red);
-}
-/* β€”β€”β€” Form controls (Base UI) β€”β€”β€” */
-.select-trigger {
- display: flex;
- align-items: center;
- gap: 8px;
- width: 100%;
- min-width: 0;
- height: 36px;
- padding: 0 10px 0 11px;
- color: var(--text);
- background: var(--field);
- border: 1px solid var(--border-strong);
- border-radius: 6px;
- font-size: 12px;
- text-align: left;
- transition:
- border-color 120ms,
- background 120ms;
-}
-.select-trigger:hover:not([data-disabled]) {
- background: var(--field-hover);
-}
-.select-trigger[data-popup-open],
-.select-trigger:focus-visible {
- border-color: var(--accent-solid);
- outline: none;
-}
-.select-trigger[data-disabled] {
- opacity: 0.5;
- cursor: default;
-}
-.select-value {
- flex: 1;
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.select-value.placeholder {
- color: var(--muted);
-}
-.select-icon {
- display: flex;
- color: var(--muted);
-}
-.select-positioner,
-.date-positioner {
- z-index: 120;
-}
-.select-popup {
- min-width: var(--anchor-width);
- max-height: min(320px, var(--available-height));
- overflow-y: auto;
-}
-.select-item {
- justify-content: space-between;
-}
-.select-item-indicator {
- display: flex;
- color: var(--accent);
-}
-.checkbox {
- display: inline-grid;
- place-content: center;
- flex-shrink: 0;
- width: 15px;
- height: 15px;
- border: 1px solid var(--faint);
- border-radius: 4px;
- background: transparent;
- color: #fff;
- cursor: pointer;
- transition:
- background 100ms,
- border-color 100ms;
-}
-.checkbox:hover:not([data-disabled]) {
- border-color: var(--muted);
-}
-.checkbox[data-checked],
-.checkbox[data-indeterminate] {
- background: var(--accent-solid);
- border-color: var(--accent-solid);
-}
-.checkbox[data-disabled] {
- opacity: 0.4;
- cursor: default;
-}
-.checkbox-indicator {
- display: flex;
-}
-.checkbox-indicator[data-unchecked] {
- display: none;
-}
-.switch {
- position: relative;
- display: inline-flex;
- flex-shrink: 0;
- width: 30px;
- height: 18px;
- padding: 2px;
- border-radius: 20px;
- background: var(--hover);
- box-shadow: inset 0 0 0 1px var(--border-strong);
- cursor: pointer;
- transition: background 120ms;
-}
-.switch[data-checked] {
- background: var(--accent-solid);
- box-shadow: none;
-}
-.switch[data-disabled] {
- opacity: 0.4;
- cursor: default;
-}
-.switch-thumb {
- width: 14px;
- height: 14px;
- border-radius: 50%;
- background: var(--muted);
- transition:
- transform 140ms ease,
- background 120ms;
-}
-.switch[data-checked] .switch-thumb {
- background: #fff;
- transform: translateX(12px);
-}
-.date-picker {
- position: relative;
-}
-.date-trigger-icon {
- color: var(--muted);
-}
-.date-picker:has(.date-clear) .date-trigger {
- padding-right: 32px;
-}
-.date-clear {
- position: absolute;
- top: 50%;
- right: 7px;
- transform: translateY(-50%);
- display: grid;
- place-content: center;
- width: 22px;
- height: 22px;
- padding: 0;
- border: 0;
- border-radius: 5px;
- background: none;
- color: var(--muted);
-}
-.date-clear:hover {
- background: var(--hover);
- color: var(--text);
-}
-.date-popup {
- min-width: 0;
- padding: 12px;
-}
-.calendar {
- position: relative;
- font-size: 12px;
-}
-.calendar-caption {
- display: flex;
- align-items: center;
- height: 28px;
- padding: 0 4px;
-}
-.calendar-caption-label {
- font-weight: 500;
- color: var(--text-strong);
-}
-.calendar-nav {
- position: absolute;
- top: 0;
- right: 0;
- display: flex;
- gap: 2px;
-}
-.calendar-nav-button {
- width: 28px;
- height: 28px;
- min-height: 28px;
- padding: 0;
- color: var(--muted);
-}
-.calendar-grid {
- border-collapse: collapse;
- margin-top: 6px;
-}
-.calendar-weekday {
- width: 34px;
- height: 28px;
- font-size: 11px;
- font-weight: 400;
- color: var(--faint);
-}
-.calendar-day {
- padding: 1px;
- text-align: center;
-}
-.calendar-day-button {
- width: 32px;
- height: 32px;
- padding: 0;
- border: 0;
- border-radius: 6px;
- background: none;
- color: var(--text);
- font-variant-numeric: tabular-nums;
- transition: background 100ms;
-}
-.calendar-day-button:hover {
- background: var(--hover);
-}
-.calendar-day.today .calendar-day-button {
- color: var(--accent);
- font-weight: 600;
-}
-.calendar-day.outside .calendar-day-button {
- color: var(--faint);
-}
-.calendar-day.selected .calendar-day-button {
- background: var(--accent-solid);
- color: #fff;
- font-weight: 500;
-}
-.calendar-day.disabled .calendar-day-button {
- opacity: 0.4;
-}
-.calendar-day.hidden {
- visibility: hidden;
-}
-.avatar {
- display: inline-flex;
- flex-shrink: 0;
- align-items: center;
- justify-content: center;
- border-radius: 8px;
- background: color-mix(in srgb, var(--avatar-color) 12%, transparent);
- color: var(--avatar-color);
- font-weight: 600;
- letter-spacing: -0.4px;
- overflow: hidden;
-}
-.avatar img {
- display: block;
- width: 100%;
- height: 100%;
- object-fit: cover;
-}
-.spin {
- animation: spin 1s linear infinite;
+
+@theme {
+ /* Keep spacing independent of the desktop's 14px root font size. */
+ --spacing: 4px;
+ --font-sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
+ --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
+ --radius-xs: 4px;
+ --radius-sm: 5px;
+ --radius-md: 6px;
+ --radius-lg: 8px;
+ --radius-xl: 10px;
+ --radius-2xl: 12px;
+ --radius-3xl: 20px;
}
-@keyframes spin {
- to {
- transform: rotate(360deg);
+
+@layer base {
+ :root {
+ color-scheme: dark;
+ --bg: #171718;
+ --sidebar: #111112;
+ --surface: #1e1e20;
+ --raised: #252527;
+ /* Form fields sit slightly above the surface they're on, so they read as places to type. */
+ --field: #ffffff08;
+ --field-hover: #ffffff0d;
+ --hover: #242426;
+ --selected: #2a2a2c;
+ --accent: #aaa6ec;
+ --accent-solid: #6d67cb;
+ --accent-tint: #aaa6ec12;
+ --text: #dedee1;
+ --text-strong: #f2f2f3;
+ --secondary: #b7b7bd;
+ --muted: #96969e;
+ --faint: #77777f;
+ --border: #ffffff0b;
+ --border-strong: #ffffff1a;
+ --green: #76bc9a;
+ --red: #ea9198;
+ --star: #d4b36e;
+ /* The label on unsent drafts, so they never pass for sent mail. */
+ --draft: #d4b36e;
+ --skeleton: #ffffff0d;
+ --shadow: 0 24px 80px #0005, 0 4px 16px #0003;
+ font-family:
+ Inter,
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ sans-serif;
+ font-synthesis: none;
+ text-rendering: optimizeLegibility;
+ font-size: 14px;
+ line-height: 1.5;
+ font-weight: 400;
+ -webkit-font-smoothing: antialiased;
}
-}
-.empty-state {
- flex: 1;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- /* Sit slightly above the true centre, where the eye expects it. */
- padding: 48px 32px 12vh;
- text-align: center;
-}
-/* A soft halo instead of a boxed tile keeps the icon quiet but present. */
-.empty-icon {
- display: grid;
- place-items: center;
- width: 64px;
- height: 64px;
- margin-bottom: 14px;
- border-radius: 50%;
- color: var(--muted);
- background: radial-gradient(
- circle,
- color-mix(in srgb, var(--accent) 12%, transparent) 0,
- transparent 70%
- );
-}
-.empty-state h2 {
- font-size: 15px;
- font-weight: 550;
- color: var(--text-strong);
- margin: 0 0 6px;
- letter-spacing: -0.2px;
-}
-/* Without a description, give the title the same room above a spinner or button. */
-.empty-state h2 + :not(p) {
- margin-top: 14px;
-}
-.empty-state p {
- font-size: 13px;
- color: var(--muted);
- max-width: 300px;
- margin: 0 0 20px;
- line-height: 1.6;
- text-wrap: balance;
-}
-.empty-state > .button {
- margin-top: 2px;
-}
-.empty-hint {
- display: inline-flex;
- align-items: center;
- gap: 8px;
- font-size: 12px;
- color: var(--faint);
-}
-.modal-backdrop[data-starting-style],
-.modal-backdrop[data-ending-style] {
- opacity: 0;
-}
-.modal[data-starting-style],
-.modal[data-ending-style] {
- opacity: 0;
- transform: translate(-50%, -48%) scale(0.98);
-}
-.dropdown[data-starting-style],
-.dropdown[data-ending-style] {
- opacity: 0;
- transform: scale(0.98);
-}
-button:active:not(:disabled) {
- transition-duration: 60ms;
-}
-@media (prefers-reduced-motion: reduce) {
- *,
- *::before,
- *::after {
- animation-duration: 0.01ms !important;
- transition-duration: 0.01ms !important;
- scroll-behavior: auto !important;
+ :root[data-theme='light'] {
+ color-scheme: light;
+ --bg: #fcfcfd;
+ --sidebar: #f7f8fa;
+ --surface: #ffffff;
+ --raised: #ffffff;
+ --field: #ffffff;
+ --field-hover: #fbfbfc;
+ --hover: #eff0f2;
+ --selected: #e8e9ec;
+ --accent: #635db5;
+ --accent-solid: #6962c1;
+ --accent-tint: #6962c10c;
+ --text: #383a40;
+ --text-strong: #202127;
+ --secondary: #5d6068;
+ --muted: #70737d;
+ --faint: #838691;
+ --border: #17191f0b;
+ --border-strong: #17191f1d;
+ --green: #3d9066;
+ --red: #b94d55;
+ --star: #b8892c;
+ --draft: #8f661a;
+ --skeleton: #17191f0e;
+ --shadow: 0 18px 70px #10121a1a;
+ }
+ * {
+ box-sizing: border-box;
+ }
+ body {
+ margin: 0;
+ overflow: hidden;
+ background: var(--bg);
+ color: var(--text);
+ }
+ button,
+ input,
+ textarea {
+ font: inherit;
+ }
+ button {
+ cursor: pointer;
+ color: inherit;
+ }
+ button:disabled {
+ cursor: default;
+ opacity: 0.4;
+ }
+ button,
+ a,
+ input,
+ textarea,
+ [tabindex] {
+ outline: none;
+ }
+ :focus-visible {
+ outline: 2px solid var(--accent);
+ outline-offset: 3px;
+ border-radius: 5px;
+ }
+ ::selection {
+ background: color-mix(in srgb, var(--accent) 28%, transparent);
+ }
+ input,
+ textarea {
+ color: var(--text);
+ background: var(--field);
+ border: 1px solid var(--border-strong);
+ border-radius: 6px;
+ padding: 9px 11px;
+ width: 100%;
+ }
+ input::placeholder,
+ textarea::placeholder {
+ color: var(--muted);
+ }
+ input:focus,
+ textarea:focus {
+ border-color: var(--accent-solid);
+ }
+ label {
+ display: block;
+ font-size: 12px;
+ color: var(--secondary);
+ }
+ a {
+ color: var(--accent);
+ text-decoration: none;
+ }
+ button svg {
+ flex-shrink: 0;
+ }
+ svg {
+ vertical-align: middle;
+ }
+ ::-webkit-scrollbar {
+ width: 6px;
+ height: 6px;
+ }
+ ::-webkit-scrollbar-thumb {
+ background: var(--border-strong);
+ background-clip: padding-box;
+ border: 1px solid transparent;
+ border-radius: 20px;
+ }
+ ::-webkit-scrollbar-thumb:hover {
+ background-color: var(--faint);
+ }
+ ::-webkit-scrollbar-thumb:active {
+ background-color: var(--muted);
+ }
+ ::-webkit-scrollbar-corner {
+ background: transparent;
+ }
+ ::-webkit-scrollbar-track {
+ background: transparent;
+ }
+ kbd {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ min-width: 17px;
+ height: 18px;
+ padding: 0 4px;
+ font-family: inherit;
+ font-size: 10px;
+ line-height: 1;
+ color: var(--muted);
+ border: 1px solid var(--border-strong);
+ border-radius: 4px;
+ }
+ button:active:not(:disabled) {
+ transition-duration: 60ms;
+ }
+ @media (prefers-reduced-motion: reduce) {
+ *,
+ *::before,
+ *::after {
+ animation-duration: 0.01ms !important;
+ transition-duration: 0.01ms !important;
+ scroll-behavior: auto !important;
+ }
}
}
diff --git a/tests/reader-body.test.ts b/tests/reader-body.test.ts
index ed6af25..5e8bf22 100644
--- a/tests/reader-body.test.ts
+++ b/tests/reader-body.test.ts
@@ -18,7 +18,7 @@ describe('email body fallback', () => {
const markup = renderToStaticMarkup(
createElement(EmailBody, { message, remoteImages: false }),
)
- expect(markup).toContain('class="email-fallback"')
+ expect(markup).toMatch(/class="[^"]*\bemail-fallback\b[^"]*"/)
expect(markup).toContain('The message body remains readable.')
} finally {
vi.unstubAllGlobals()