Skip to content

Open source alternative to Semrush and Ahrefs

Remove DaisyUI now that every page is on shadcn (EVE-318) (#762)

Carter Smith9c423966d648
diff --git a/knip.jsonc b/knip.jsonc
index 10789fdd..e7c03c68 100644
--- a/knip.jsonc
+++ b/knip.jsonc
@@ -43,7 +43,6 @@
"ignoreDependencies": [
// Tailwindcss used via @tailwindcss/vite plugin
"tailwindcss",
- "daisyui",
// Imported by app.css; shadcn is also the component CLI
"tw-animate-css",
"shadcn",
diff --git a/package.json b/package.json
index b2b6918f..f63518e0 100644
--- a/package.json
+++ b/package.json
@@ -100,7 +100,6 @@
"class-variance-authority": "^0.7.1",
"cloudflare": "^5.2.0",
"cn": "^0.3.0",
- "daisyui": "^5.5.5",
"drizzle-orm": "^0.45.2",
"fast-xml-parser": "^5.4.1",
"htmlparser2": "^10.1.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d8598534..4c827342 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -108,9 +108,6 @@ importers:
cn:
specifier: ^0.3.0
version: 0.3.0
- daisyui:
- specifier: ^5.5.5
- version: 5.5.19
drizzle-orm:
specifier: ^0.45.2
@@ -3758,9 +3755,6 @@ packages:
resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==}
engines: {node: '>=12'}
- resolution: {integrity: sha512-pbFAkl1VCEh/MPCeclKL61I/MqRIFFhNU7yiXoDDRapXN4/qNCoMxeCCswyxEEhqL5eiTTfwHvucFtOE71C9sA==}
-
resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==}
engines: {node: '>= 12'}
@@ -9926,8 +9920,6 @@ snapshots:
-
diff --git a/src/client/components/Markdown.tsx b/src/client/components/Markdown.tsx
index 728ef908..be93ff74 100644
--- a/src/client/components/Markdown.tsx
+++ b/src/client/components/Markdown.tsx
@@ -13,8 +13,7 @@ type Props = {
* Shared Markdown renderer with explicit per-element Tailwind classes.
*
* OpenSEO doesn't ship `@tailwindcss/typography`, so `prose` classes are
- * no-ops — every block element is styled here instead. Tables use daisyUI's
- * `table table-sm` so model- and strategy-generated tables stay readable.
+ * no-ops — every block element is styled here instead.
*
* Anchor URLs are sanitized to http(s) only — LLMs can be coaxed into
* emitting `javascript:` payloads.
@@ -45,7 +44,7 @@ function SafeAnchor({ href, children, ...rest }: AnchorProps) {
href={safeHref}
target="_blank"
rel="noreferrer"
- className="link link-primary"
+ className="text-primary underline underline-offset-2 hover:text-primary/80"
>
{children}
</a>
@@ -85,11 +84,11 @@ export const MARKDOWN_COMPONENTS = {
<em className="italic">{children}</em>
),
blockquote: ({ children }: { children?: ReactNode }) => (
- <blockquote className="my-2 border-l-2 border-base-300 pl-3 text-base-content/80 italic">
+ <blockquote className="my-2 border-l-2 border-border pl-3 text-foreground/80 italic">
{children}
</blockquote>
),
- hr: () => <hr className="my-3 border-base-300" />,
+ hr: () => <hr className="my-3 border-border" />,
code: ({ children, className }: ComponentPropsWithoutRef<"code">) => {
// Inline code (no `language-*` className from remark) gets the badge style;
// block code is rendered by `pre` with a different shell.
@@ -97,27 +96,25 @@ export const MARKDOWN_COMPONENTS = {
return <code className={className}>{children}</code>;
}
return (
- <code className="rounded bg-base-200 px-1 py-0.5 text-xs font-mono">
+ <code className="rounded bg-muted px-1 py-0.5 text-xs font-mono">
{children}
</code>
);
},
pre: ({ children }: { children?: ReactNode }) => (
- <pre className="my-2 overflow-x-auto rounded-lg bg-base-200 p-3 text-xs font-mono">
+ <pre className="my-2 overflow-x-auto rounded-lg bg-muted p-3 text-xs font-mono">
{children}
</pre>
),
table: ({ children }: { children?: ReactNode }) => (
<div className="my-3 overflow-x-auto">
- <table className="table table-sm border border-base-300">
- {children}
- </table>
+ <table className="w-full border border-border text-xs">{children}</table>
</div>
),
thead: ({ children }: { children?: ReactNode }) => <thead>{children}</thead>,
tbody: ({ children }: { children?: ReactNode }) => <tbody>{children}</tbody>,
tr: ({ children }: { children?: ReactNode }) => (
- <tr className="border-b border-base-300 last:border-0">{children}</tr>
+ <tr className="border-b border-border last:border-0">{children}</tr>
),
th: ({ children }: { children?: ReactNode }) => (
<th className="px-2 py-1.5 text-left font-semibold">{children}</th>
diff --git a/src/client/components/Modal.tsx b/src/client/components/Modal.tsx
deleted file mode 100644
index 0a10d115..00000000
--- a/src/client/components/Modal.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-import { useEffect, type ReactNode } from "react";
-
-export function Modal({
- maxWidth = "max-w-sm",
- children,
- onClose,
- labelledBy,
-}: {
- maxWidth?: string;
- children: ReactNode;
- onClose?: () => void;
- labelledBy?: string;
-}) {
- useEffect(() => {
- if (!onClose) return;
-
- const handleKeyDown = (event: KeyboardEvent) => {
- if (event.key !== "Escape" || event.defaultPrevented) return;
- event.preventDefault();
- onClose();
- };
-
- window.addEventListener("keydown", handleKeyDown);
- return () => window.removeEventListener("keydown", handleKeyDown);
- }, [onClose]);
-
- return (
- <div className="fixed inset-0 z-50 flex justify-center overflow-y-auto bg-black/50 p-4">
- <div
- role="dialog"
- aria-modal="true"
- aria-labelledby={labelledBy}
- className={`card bg-base-100 border border-base-300 m-auto w-full ${maxWidth} max-h-full shadow-xl`}
- >
- <div className="card-body gap-4 overflow-y-auto">{children}</div>
- </div>
- </div>
- );
-}
diff --git a/src/client/components/ResearchScopeSelect.tsx b/src/client/components/ResearchScopeSelect.tsx
index 6df57d42..5dd05d5b 100644
--- a/src/client/components/ResearchScopeSelect.tsx
+++ b/src/client/components/ResearchScopeSelect.tsx
@@ -1,5 +1,11 @@
-import { useEffect, useRef, useState } from "react";
-import { Check } from "lucide-react";
+import { cn } from "cn";
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/client/components/ui/select";
import {
RESEARCH_SCOPES,
RESEARCH_SCOPE_DESCRIPTIONS,
@@ -17,130 +23,55 @@ type Props = {
"aria-label"?: string;
};
+const SCOPE_ITEMS = RESEARCH_SCOPES.map((scope) => ({
+ value: scope,
+ label: RESEARCH_SCOPE_LABELS[scope],
+}));
+
/**
* The shared research-scope selector: Exact URL / Subfolder / Domain /
- * Subdomains. A custom dropdown (not a native select) so each option can
- * explain what it covers. Every research input that accepts a URL or domain
- * renders this next to the input so scope is explicit instead of inferred.
+ * Subdomains. Each option explains what it covers. Every research input that
+ * accepts a URL or domain renders this next to the input so scope is explicit
+ * instead of inferred.
*/
export function ResearchScopeSelect({
value,
onChange,
disabledReason,
- className = "",
+ className,
"aria-label": ariaLabel = "Research scope",
}: Props) {
- const [open, setOpen] = useState(false);
- const [activeScope, setActiveScope] = useState<ResearchScope>(value);
- const containerRef = useRef<HTMLDivElement>(null);
-
- useEffect(() => {
- if (open) setActiveScope(value);
- }, [open, value]);
-
- // Close on outside click so it behaves like the surrounding native selects.
- useEffect(() => {
- if (!open) return;
- const handlePointerDown = (event: PointerEvent) => {
- const target = event.target;
- if (target instanceof Node && !containerRef.current?.contains(target)) {
- setOpen(false);
- }
- };
- document.addEventListener("pointerdown", handlePointerDown);
- return () => document.removeEventListener("pointerdown", handlePointerDown);
- }, [open]);
-
- const select = (scope: ResearchScope) => {
- onChange(scope);
- setOpen(false);
- };
-
- const moveActive = (step: 1 | -1) => {
- const currentIndex = RESEARCH_SCOPES.indexOf(activeScope);
- const nextIndex = Math.min(
- Math.max(currentIndex + step, 0),
- RESEARCH_SCOPES.length - 1,
- );
- const next = RESEARCH_SCOPES[nextIndex];
- if (next) setActiveScope(next);
- };
-
- const handleKeyDown = (event: React.KeyboardEvent) => {
- if (!open) return;
- switch (event.key) {
- case "ArrowDown":
- event.preventDefault();
- moveActive(1);
- break;
- case "ArrowUp":
- event.preventDefault();
- moveActive(-1);
- break;
- case "Enter":
- case " ":
- event.preventDefault();
- select(activeScope);
- break;
- case "Escape":
- event.preventDefault();
- setOpen(false);
- break;
- }
- };
-
return (
- <div ref={containerRef} className={`relative ${className}`}>
- <button
- type="button"
- className="select select-bordered flex w-full items-center justify-between gap-2 text-left font-normal"
+ <Select
+ items={SCOPE_ITEMS}
+ value={value}
+ onValueChange={(scope) => {
+ if (scope != null) onChange(scope);
+ }}
+ disabled={disabledReason != null}
+ >
+ <SelectTrigger
+ className={cn("data-[size=default]:h-10", className)}
aria-label={ariaLabel}
- aria-haspopup="listbox"
- aria-expanded={open}
- disabled={disabledReason != null}
title={disabledReason}
- onClick={() => setOpen((prev) => !prev)}
- onKeyDown={handleKeyDown}
>
- <span className="truncate">{RESEARCH_SCOPE_LABELS[value]}</span>
- </button>
-
- {open ? (
- <ul
- role="listbox"
- aria-label={ariaLabel}
- className="menu absolute right-0 z-30 mt-2 w-72 flex-nowrap rounded-box border border-base-300 bg-base-100 p-2 shadow-lg"
- >
- {RESEARCH_SCOPES.map((scope) => {
- const isSelected = scope === value;
- return (
- <li key={scope} role="option" aria-selected={isSelected}>
- <button
- type="button"
- className={`w-full items-start ${scope === activeScope ? "menu-focus" : ""}`}
- onClick={() => select(scope)}
- onMouseEnter={() => setActiveScope(scope)}
- >
- <span className="flex-1">
- <span className="block">
- {RESEARCH_SCOPE_LABELS[scope]}
- </span>
- <span className="block text-xs text-base-content/60">
- {RESEARCH_SCOPE_DESCRIPTIONS[scope]}
- </span>
- <span className="block font-mono text-xs text-base-content/40">
- {RESEARCH_SCOPE_EXAMPLES[scope]}
- </span>
- </span>
- {isSelected ? (
- <Check className="mt-1 size-4 shrink-0 text-primary" />
- ) : null}
- </button>
- </li>
- );
- })}
- </ul>
- ) : null}
- </div>
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent align="end" alignItemWithTrigger={false} className="w-72">
+ {RESEARCH_SCOPES.map((scope) => (
+ <SelectItem key={scope} value={scope} className="items-start py-1.5">
+ <span className="flex flex-col whitespace-normal">
+ <span>{RESEARCH_SCOPE_LABELS[scope]}</span>
+ <span className="text-xs text-muted-foreground">
+ {RESEARCH_SCOPE_DESCRIPTIONS[scope]}
+ </span>
+ <span className="font-mono text-xs text-muted-foreground/70">
+ {RESEARCH_SCOPE_EXAMPLES[scope]}
+ </span>
+ </span>
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
);
}
diff --git a/src/client/components/SearchCard.tsx b/src/client/components/SearchCard.tsx
index 5a184fc6..84855b52 100644
--- a/src/client/components/SearchCard.tsx
+++ b/src/client/components/SearchCard.tsx
@@ -33,14 +33,12 @@ export function SearchCard({
secondRow?: ReactNode;
}) {
return (
- // ResearchScopeSelect opens an absolute menu below the row, so the card
- // must not clip it.
- <Card className="overflow-visible">
+ <Card>
<CardContent className="space-y-3">
<form noValidate className="space-y-3" onSubmit={onSubmit}>
<div className="flex flex-col gap-3 lg:flex-row lg:items-center">
{children}
- {/* 40px, to match the DaisyUI selects that still sit in the row. */}
+ {/* 40px, the height of the fields in the row. */}
<Button
type="submit"
size="lg"
diff --git a/src/client/components/table/ExportToSheetsModal.tsx b/src/client/components/table/ExportToSheetsModal.tsx
index 29715193..b1ac3935 100644
--- a/src/client/components/table/ExportToSheetsModal.tsx
+++ b/src/client/components/table/ExportToSheetsModal.tsx
@@ -1,7 +1,15 @@
import { useEffect } from "react";
import { useLocation } from "@tanstack/react-router";
-import { Check, ExternalLink, X } from "lucide-react";
-import { Modal } from "@/client/components/Modal";
+import { Check, ExternalLink } from "lucide-react";
+import { Button } from "@/client/components/ui/button";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from "@/client/components/ui/dialog";
import {
closeExportToSheetsModal,
openGoogleSheetsTab,
@@ -28,44 +36,31 @@ export function ExportToSheetsModal() {
};
return (
- <Modal
- maxWidth="max-w-md"
- onClose={closeExportToSheetsModal}
- labelledBy="export-to-sheets-title"
+ <Dialog
+ open
+ onOpenChange={(open) => {
+ if (!open) closeExportToSheetsModal();
+ }}
>
- <div className="flex items-start justify-between gap-3">
- <div className="flex items-center gap-2">
- <span className="inline-flex size-8 items-center justify-center rounded-full bg-success/15 text-success">
- <Check className="size-4" />
- </span>
- <h3 id="export-to-sheets-title" className="text-base font-semibold">
+ <DialogContent className="sm:max-w-md">
+ <DialogHeader>
+ <DialogTitle className="flex items-center gap-2 pr-8 leading-snug">
+ <span className="inline-flex size-8 shrink-0 items-center justify-center rounded-full bg-success/15 text-success">
+ <Check className="size-4" />
+ </span>
Copied {rowCount} row{rowCount === 1 ? "" : "s"} to your clipboard
- </h3>
- </div>
- <button
- type="button"
- className="btn btn-ghost btn-xs btn-square"
- onClick={closeExportToSheetsModal}
- aria-label="Close"
- >
- <X className="size-4" />
- </button>
- </div>
-
- <p className="text-sm text-base-content/75">
- Open a new Google Sheet and paste to fill it.
- </p>
-
- <div className="flex justify-end">
- <button
- type="button"
- className="btn btn-primary btn-sm gap-1.5"
- onClick={handleOpenSheet}
- >
- Open new Google Sheet
- <ExternalLink className="size-3.5" />
- </button>
- </div>
- </Modal>
+ </DialogTitle>
+ <DialogDescription>
+ Open a new Google Sheet and paste to fill it.
+ </DialogDescription>
+ </DialogHeader>
+ <DialogFooter>
+ <Button onClick={handleOpenSheet}>
+ Open new Google Sheet
+ <ExternalLink data-icon="inline-end" />
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
);
}
diff --git a/src/client/features/auth/TurnstileWidget.tsx b/src/client/features/auth/TurnstileWidget.tsx
index 72441219..cb89c5c9 100644
--- a/src/client/features/auth/TurnstileWidget.tsx
+++ b/src/client/features/auth/TurnstileWidget.tsx
@@ -135,7 +135,7 @@ export function TurnstileWidget({
if (!TURNSTILE_SITE_KEY) return null;
if (scriptFailed) {
return (
- <p className="text-sm text-error">
+ <p role="alert" className="text-sm text-destructive">
The security check couldn&rsquo;t load. Allow challenges.cloudflare.com
in your browser or ad blocker, then reload the page.
</p>
diff --git a/src/client/features/billing/FreePlanBanner.tsx b/src/client/features/billing/FreePlanBanner.tsx
index 749fb865..af755b09 100644
--- a/src/client/features/billing/FreePlanBanner.tsx
+++ b/src/client/features/billing/FreePlanBanner.tsx
@@ -15,12 +15,15 @@ export function FreePlanBanner() {
<Link
to={SUBSCRIBE_ROUTE}
search={{ upgrade: true }}
- className="link link-primary font-medium"
+ className="font-medium text-primary underline-offset-4 hover:underline"
>
Upgrade your plan
</Link>
) : (
- <Link to={BILLING_ROUTE} className="link link-primary font-medium">
+ <Link
+ to={BILLING_ROUTE}
+ className="font-medium text-primary underline-offset-4 hover:underline"
+ >
Buy more credits
</Link>
);
@@ -50,12 +53,15 @@ export function FreePlanBanner() {
<Link
to={SUBSCRIBE_ROUTE}
search={{ upgrade: true }}
- className="link link-primary font-medium"
+ className="font-medium text-primary underline-offset-4 hover:underline"
>
Upgrade anytime
</Link>{" "}
or{" "}
- <Link to="/support" className="link link-primary font-medium">
+ <Link
+ to="/support"
+ className="font-medium text-primary underline-offset-4 hover:underline"
+ >
reach out with questions
</Link>
.
diff --git a/src/client/features/dashboard/DashboardCards.tsx b/src/client/features/dashboard/DashboardCards.tsx
index 241b80af..b69fe626 100644
--- a/src/client/features/dashboard/DashboardCards.tsx
+++ b/src/client/features/dashboard/DashboardCards.tsx
@@ -180,7 +180,7 @@ export function AuditHealthCard({
<span
className={`size-2 shrink-0 rounded-full ${
issue.severity === "critical"
- ? "bg-error"
+ ? "bg-destructive"
: issue.severity === "warning"
? "bg-warning"
: "bg-muted-foreground/30"
diff --git a/src/client/features/gsc/GscReEngagementModal.tsx b/src/client/features/gsc/GscReEngagementModal.tsx
index 591cb4af..61b9119e 100644
--- a/src/client/features/gsc/GscReEngagementModal.tsx
+++ b/src/client/features/gsc/GscReEngagementModal.tsx
@@ -1,6 +1,14 @@
import * as React from "react";
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
-import { Modal } from "@/client/components/Modal";
+import { Button } from "@/client/components/ui/button";
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from "@/client/components/ui/dialog";
import { GoogleGlyph } from "@/client/features/gsc/GoogleGlyph";
import { startGoogleLink } from "@/client/features/integrations/startGoogleLink";
import { onboardingAnswersQueryOptions } from "@/client/features/onboarding/onboardingModel";
@@ -96,34 +104,32 @@ export function GscReEngagementModal({
}
return (
- <Modal
- maxWidth="max-w-lg"
- onClose={handleDismiss}
- labelledBy="gsc-nudge-title"
+ <Dialog
+ open
+ onOpenChange={(open) => {
+ if (!open) handleDismiss();
+ }}
>
- <div className="space-y-1">
- <h2 id="gsc-nudge-title" className="text-lg font-semibold">
- New: Connect Google Search Console
- </h2>
- <p className="text-sm text-base-content/70">
- Bring your real clicks, impressions, and rankings into OpenSEO and
- query them from Claude or Codex over MCP. It never uses credits.
- </p>
- </div>
-
- <div className="mt-2 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end">
- <button type="button" className="btn btn-ghost" onClick={handleDismiss}>
- Maybe later
- </button>
- <button
- type="button"
- onClick={handleConnect}
- className="inline-flex items-center justify-center gap-2.5 rounded-lg border border-base-300 bg-base-100 px-4 py-2.5 text-sm font-semibold text-base-content shadow-sm transition hover:bg-base-200 hover:shadow focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"
- >
- <GoogleGlyph className="size-[18px]" />
- Connect with Google
- </button>
- </div>
- </Modal>
+ <DialogContent className="sm:max-w-lg">
+ <DialogHeader>
+ <DialogTitle className="text-lg">
+ New: Connect Google Search Console
+ </DialogTitle>
+ <DialogDescription>
+ Bring your real clicks, impressions, and rankings into OpenSEO and
+ query them from Claude or Codex over MCP. It never uses credits.
+ </DialogDescription>
+ </DialogHeader>
+ <DialogFooter>
+ <Button variant="ghost" onClick={handleDismiss}>
+ Maybe later
+ </Button>
+ <Button variant="outline" onClick={handleConnect}>
+ <GoogleGlyph className="size-[18px]" />
+ Connect with Google
+ </Button>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
);
}
diff --git a/src/client/styles/app.css b/src/client/styles/app.css
index 00d45390..1e97bcb4 100644
--- a/src/client/styles/app.css
+++ b/src/client/styles/app.css
@@ -3,8 +3,7 @@
@import "shadcn/tailwind.css";
/* shadcn components here are built on Base UI. The shadcn variables below are
- the source of truth for theme colors. The DaisyUI theme blocks alias them,
- so pages that still use DaisyUI classes render the same values. */
+ the source of truth for theme colors. */
@custom-variant dark (&:where([data-theme=openseo-dark], [data-theme=openseo-dark] *));
@@ -34,7 +33,7 @@
--color-warning-foreground: var(--warning-foreground);
--color-info: var(--info);
--color-info-foreground: var(--info-foreground);
- --color-border: var(--border-color);
+ --color-border: var(--border);
--color-input: var(--input);
--color-ring: var(--ring);
--color-chart-1: var(--chart-1);
@@ -62,11 +61,9 @@
--radius-4xl: calc(var(--radius) * 4);
}
-/* shadcn names its border color --border, but DaisyUI already uses --border
- for its border width. Rename --border-color to --border when DaisyUI is
- removed. */
:where(:root),
[data-theme="openseo"] {
+ color-scheme: light;
--radius: 0.5rem;
--background: oklch(95.5% 0 0);
--foreground: oklch(20% 0 0);
@@ -89,7 +86,7 @@
--warning-foreground: oklch(25% 0.05 80);
--info: oklch(70% 0.15 230);
--info-foreground: oklch(100% 0 0);
- --border-color: oklch(92% 0 0);
+ --border: oklch(92% 0 0);
--input: oklch(92% 0 0);
--ring: oklch(50% 0.12 262);
--chart-1: oklch(57.5% 0.163 255.5);
@@ -108,6 +105,7 @@
}
[data-theme="openseo-dark"] {
+ color-scheme: dark;
--background: oklch(18% 0 0);
--foreground: oklch(92% 0 0);
--card: oklch(23% 0 0);
@@ -129,7 +127,7 @@
--warning-foreground: oklch(25% 0.05 80);
--info: oklch(70% 0.15 230);
--info-foreground: oklch(100% 0 0);
- --border-color: oklch(30% 0 0);
+ --border: oklch(30% 0 0);
--input: oklch(30% 0 0);
--ring: oklch(66% 0.12 262);
--chart-1: oklch(62.2% 0.161 255.1);
@@ -157,91 +155,21 @@
--trend-tooltip-shadow: oklch(0% 0 0 / 0.1);
}
-@plugin "daisyui" {
- /* @property isn't supported by some browsers and gives a noisy warning https://github.com/saadeghi/daisyui/issues/3882 */
- exclude: properties;
-}
-
-/* Light theme */
-@plugin "daisyui/theme" {
- name: "openseo";
- default: true;
- prefersdark: false;
- color-scheme: light;
- --color-base-100: var(--card);
- --color-base-200: var(--background);
- --color-base-300: var(--border-color);
- --color-base-content: var(--foreground);
- --color-primary: var(--primary);
- --color-primary-content: var(--primary-foreground);
- --color-secondary: var(--secondary);
- --color-secondary-content: var(--secondary-foreground);
- --color-accent: var(--accent);
- --color-accent-content: var(--accent-foreground);
- --color-neutral: oklch(25% 0 0);
- --color-neutral-content: oklch(100% 0 0);
- --color-info: var(--info);
- --color-info-content: var(--info-foreground);
- --color-success: var(--success);
- --color-success-content: var(--success-foreground);
- --color-warning: var(--warning);
- --color-warning-content: var(--warning-foreground);
- --color-error: var(--destructive);
- --color-error-content: oklch(100% 0 0);
- --radius-selector: var(--radius);
- --radius-field: var(--radius);
- --radius-box: calc(var(--radius) * 1.5);
- --size-selector: 0.25rem;
- --size-field: 0.25rem;
- --border: 1px;
- --depth: 0;
- --noise: 0;
-}
-
-/* Dark theme - auto-activates via prefers-color-scheme */
-@plugin "daisyui/theme" {
- name: "openseo-dark";
- prefersdark: true;
- color-scheme: dark;
- --color-base-100: var(--card);
- --color-base-200: var(--background);
- --color-base-300: var(--border-color);
- --color-base-content: var(--foreground);
- --color-primary: var(--primary);
- --color-primary-content: var(--primary-foreground);
- --color-secondary: var(--secondary);
- --color-secondary-content: var(--secondary-foreground);
- --color-accent: var(--accent);
- --color-accent-content: var(--accent-foreground);
- --color-neutral: oklch(85% 0 0);
- --color-neutral-content: oklch(20% 0 0);
- --color-info: var(--info);
- --color-info-content: var(--info-foreground);
- --color-success: var(--success);
- --color-success-content: var(--success-foreground);
- --color-warning: var(--warning);
- --color-warning-content: var(--warning-foreground);
- --color-error: var(--destructive);
- --color-error-content: oklch(100% 0 0);
- --radius-selector: var(--radius);
- --radius-field: var(--radius);
- --radius-box: calc(var(--radius) * 1.5);
- --size-selector: 0.25rem;
- --size-field: 0.25rem;
- --border: 1px;
- --depth: 0;
- --noise: 0;
-}
-
html,
body {
- @apply m-0 bg-base-200;
+ @apply m-0 bg-background text-foreground;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
height: 100%;
overflow: hidden;
}
+/* Thin scrollbars in the muted text color, in both themes. */
+:root {
+ scrollbar-color: color-mix(in oklch, currentColor 35%, transparent)
+ transparent;
+}
+
/* Prevent Safari mobile from zooming on input focus (requires 16px minimum).
This rule is outside a layer, so it beats every utility. shadcn controls
(the ones with data-slot) are left out: they are 16px below md and 14px
@@ -252,16 +180,6 @@ select:not([data-slot]) {
@apply text-base;
}
-/* Global input focus styling - use primary color instead of default ring */
-.input:focus,
-.input:focus-visible,
-.textarea:focus,
-.textarea:focus-visible {
- outline: none;
- border-color: var(--color-primary);
- background-color: color-mix(in oklab, var(--color-primary) 10%, transparent);
-}
-
/* Safe area utilities for mobile devices */
@layer utilities {
.pb-safe {
@@ -285,82 +203,6 @@ select:not([data-slot]) {
}
}
-/* DaisyUI draws a small triangle caret on .select. Draw the chevron that the
- shadcn Select uses instead, in the same place: 16px, 8px from the right
- edge, in the muted text color. A native select cannot hold an icon, so the
- chevron is a background image. */
-.select {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161616' stroke-opacity='.6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
- background-position: right 0.5rem center;
- background-size: 1rem 1rem;
- background-repeat: no-repeat;
- padding-inline-end: 2rem;
-}
-
-html[data-theme="openseo-dark"] .select {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e5e5e5' stroke-opacity='.6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
-}
-
-/* Dark mode: neutral interactive surfaces should lift above the panel, not
- sink below it. DaisyUI derives default buttons and the tabs-box well from
- base-200, which is darker than the base-100 content panel in dark mode,
- so they read as sunken/disabled. Colored variants (primary, error, ...)
- set their own --btn-color and are excluded. */
-html[data-theme="openseo-dark"]
- .btn:not(
- .btn-primary,
- .btn-error,
- .btn-neutral,
- .btn-ghost,
- .btn-outline,
- .btn-soft
- ) {
- --btn-color: oklch(25% 0 0);
-}
-
-/* Light mode: the base-200 default button is nearly invisible on the
- base-100 content panel; use a white surface with a visible border,
- matching inputs/selects. */
-html[data-theme="openseo"]
- .btn:not(
- .btn-primary,
- .btn-error,
- .btn-neutral,
- .btn-ghost,
- .btn-outline,
- .btn-soft
- ) {
- --btn-color: var(--color-base-100);
- --btn-border: var(--color-base-300);
-}
-
-/* Underline tabs: DaisyUI's tabs-border underlines the active tab with
- currentColor; use the primary accent instead (PostHog-style). */
-.tabs-border > .tab.tab-active::before {
- --tab-border-color: var(--color-primary);
-}
-
-/* Custom alert styling with darker borders and transparent background */
-.alert {
- @apply flex gap-3 rounded-lg border p-4 text-base-content/70;
-}
-
-.alert-warning {
- @apply border-warning/70 bg-warning/40 text-base-content/90;
-}
-
-.alert-info {
- @apply border-info/70 bg-info/40 text-base-content/90;
-}
-
-.alert-success {
- @apply border-success/70 bg-success/40 text-base-content/90;
-}
-
-.alert-error {
- @apply border-error/70 bg-error/40 text-base-content/90;
-}
-
/* Tag chip colors — muted background + readable text in both themes.
Text uses darker shades on light theme for contrast, lighter on dark. */
.tag-chip-slate {
@@ -507,19 +349,3 @@ html[data-theme="openseo-dark"] {
--trend-tooltip-border: oklch(40% 0.01 255 / 0.65);
--trend-tooltip-shadow: oklch(0% 0 0 / 0.35);
}
-
-html[data-theme="openseo-dark"] .alert-warning {
- @apply border-warning/60 bg-warning/20;
-}
-
-html[data-theme="openseo-dark"] .alert-info {
- @apply border-info/60 bg-info/20;
-}
-
-html[data-theme="openseo-dark"] .alert-success {
- @apply border-success/60 bg-success/20;
-}
-
-html[data-theme="openseo-dark"] .alert-error {
- @apply border-error/60 bg-error/20;
-}
diff --git a/src/routes/_app/billing_.fix-payment.tsx b/src/routes/_app/billing_.fix-payment.tsx
index 84d6d33d..f9a5f84d 100644
--- a/src/routes/_app/billing_.fix-payment.tsx
+++ b/src/routes/_app/billing_.fix-payment.tsx
@@ -12,6 +12,9 @@ import { getStandardErrorMessage } from "@/client/lib/error-messages";
import { captureClientError, captureClientEvent } from "@/client/lib/posthog";
import { getBillingRouteState } from "@/client/features/billing/route-state";
import { BILLING_ROUTE } from "@/shared/billing";
+import { QueryError } from "@/client/components/QueryState";
+import { Spinner } from "@/client/components/Spinner";
+import { Button } from "@/client/components/ui/button";
const SUPPORT_EMAIL = "[email protected]";
@@ -132,19 +135,12 @@ function FixPaymentPage() {
if (routeState === "error") {
return (
<Page title="Billing unavailable">
- <p className="text-sm text-base-content/70">
- {getStandardErrorMessage(
- customerQuery.error,
- "We couldn't load your billing details right now. Please try again.",
- )}
- </p>
- <button
- type="button"
- className="btn btn-soft btn-sm"
- onClick={() => void customerQuery.refetch()}
- >
- Try again
- </button>
+ <QueryError
+ error={customerQuery.error}
+ fallback="We couldn't load your billing details right now. Please try again."
+ onRetry={() => void customerQuery.refetch()}
+ isRetrying={customerQuery.isFetching}
+ />
</Page>
);
}
@@ -152,8 +148,8 @@ function FixPaymentPage() {
if (isChecking) {
return (
<Page title="Checking your payment…">
- <span className="loading loading-spinner loading-md" />
- <p className="text-sm text-base-content/70">
+ <Spinner />
+ <p className="text-sm text-muted-foreground">
Stripe is retrying the charge with your updated card. This usually
takes a few seconds.
</p>
@@ -164,11 +160,14 @@ function FixPaymentPage() {
if (!isPastDue) {
return (
<Page title={returned ? "You're all set" : "Your billing is up to date"}>
- <p className="text-sm text-base-content/70">
+ <p className="text-sm text-muted-foreground">
{returned
? "The payment went through and your subscription is active again."
: "There's nothing outstanding on your account."}{" "}
- <Link to={BILLING_ROUTE} className="link link-primary font-medium">
+ <Link
+ to={BILLING_ROUTE}
+ className="font-medium text-primary underline-offset-4 hover:underline"
+ >
Back to billing
</Link>
</p>
@@ -179,7 +178,7 @@ function FixPaymentPage() {
if (!canManageBilling) {
return (
<Page title="Fix your payment">
- <p className="text-sm text-base-content/70">
+ <p className="text-sm text-muted-foreground">
A payment for this organization didn&rsquo;t go through. Only the
organization owner can update the card, so please ask them to visit
this page.
@@ -190,29 +189,33 @@ function FixPaymentPage() {
return (
<Page title={returned ? "Still showing as unpaid" : "Fix your payment"}>
- <p className="text-sm text-base-content/70">
+ <p className="text-sm text-muted-foreground">
{returned
? "Your subscription is still marked past due. Stripe can take a few minutes to retry the charge. If you added a new card but the invoice is still listed as open in the portal, you can pay it there directly."
: "Your last payment didn't go through. This usually means the card expired or the bank declined the charge. Nothing has been turned off yet."}
</p>
- <div className="rounded-lg border border-base-300 bg-base-100 p-4">
+ <div className="rounded-lg border border-border bg-card p-4">
<p className="text-sm font-semibold">Update your payment method</p>
- <p className="mt-1 text-sm text-base-content/60">
+ <p className="mt-1 text-sm text-muted-foreground">
Add a working card in the billing portal. It becomes your default for
future renewals, and the open invoice can be paid on the same screen.
</p>
- <button
- type="button"
- className="btn btn-primary btn-sm mt-3"
- disabled={isOpeningPortal}
+ <Button
+ size="sm"
+ className="mt-3"
+ pending={isOpeningPortal}
onClick={() => void openPortal()}
>
{isOpeningPortal ? "Opening Stripe..." : "Open billing portal"}
- </button>
+ </Button>
</div>
- {error ? <p className="text-sm text-error">{error}</p> : null}
+ {error ? (
+ <p role="alert" className="text-sm text-destructive">
+ {error}
+ </p>
+ ) : null}
</Page>
);
}
@@ -221,11 +224,11 @@ function Page({ title, children }: { title: string; children: ReactNode }) {
return (
<div className="mx-auto w-full max-w-xl space-y-5 p-4 py-10 md:p-6 md:py-12">
<div>
- <p className="text-sm font-medium text-base-content/40">Billing</p>
+ <p className="text-sm font-medium text-muted-foreground">Billing</p>
<h1 className="mt-1 text-2xl font-bold tracking-tight">{title}</h1>
</div>
{children}
- <p className="text-xs text-base-content/40">
+ <p className="text-xs text-muted-foreground">
Something look wrong? Email {SUPPORT_EMAIL}.
</p>
</div>
diff --git a/src/routes/_authenticated.subscribe.tsx b/src/routes/_authenticated.subscribe.tsx
index a786f6f8..eaeb92c1 100644
--- a/src/routes/_authenticated.subscribe.tsx
+++ b/src/routes/_authenticated.subscribe.tsx
@@ -265,7 +265,10 @@ function SubscribePage() {
<div className="text-center space-y-2">
<p className="text-sm text-muted-foreground">
Questions? Email{" "}
- <a className="link" href={`mailto:${SUPPORT_EMAIL}`}>
+ <a
+ className="underline underline-offset-2 hover:text-foreground"
+ href={`mailto:${SUPPORT_EMAIL}`}
+ >
{SUPPORT_EMAIL}
</a>
.
diff --git a/src/routes/_authenticated.yc.tsx b/src/routes/_authenticated.yc.tsx
index b46be1f3..264c43d3 100644
--- a/src/routes/_authenticated.yc.tsx
+++ b/src/routes/_authenticated.yc.tsx
@@ -2,6 +2,9 @@ import { Link, createFileRoute, notFound } from "@tanstack/react-router";
import { useCustomer } from "autumn-js/react";
import { useState } from "react";
import { ArrowRight, Tag } from "lucide-react";
+import { QueryError } from "@/client/components/QueryState";
+import { StatusScreen } from "@/client/components/StatusScreen";
+import { Button } from "@/client/components/ui/button";
import { PlanPageAccountMenu } from "@/client/features/billing/PlanPageAccountMenu";
import { PlanOfferCard } from "@/client/features/billing/PlanOfferCard";
import {
@@ -72,33 +75,14 @@ function YcPlanPage() {
if (routeState === "error") {
return (
- <div className="w-full max-w-xs space-y-4">
- <div className="text-center space-y-3">
- <img
- src="/transparent-logo.png"
- alt="OpenSEO"
- className="mx-auto size-10 rounded-lg"
- />
- <h1 className="text-xl font-semibold">Billing unavailable</h1>
- </div>
-
- <p className="text-sm text-center text-base-content/70">
- {getStandardErrorMessage(
- customerQuery.error,
- "We couldn't verify your billing status right now. Please try again.",
- )}
- </p>
-
- <button
- type="button"
- className="btn btn-soft w-full"
- onClick={() => {
- void customerQuery.refetch();
- }}
- >
- Try again
- </button>
- </div>
+ <StatusScreen logo title="Billing unavailable" size="sm">
+ <QueryError
+ error={customerQuery.error}
+ fallback="We couldn't verify your billing status right now. Please try again."
+ onRetry={() => void customerQuery.refetch()}
+ isRetrying={customerQuery.isFetching}
+ />
+ </StatusScreen>
);
}
@@ -140,17 +124,17 @@ function YcPlanPage() {
className="mx-auto size-10 rounded-lg"
/>
<h1 className="text-xl font-semibold">OpenSEO for YC founders</h1>
- <p className="text-sm text-base-content/60">
+ <p className="text-sm text-muted-foreground">
A bigger monthly credit pool for teams doing serious SEO work, with
your first month free through the YC deal.
</p>
</div>
<PlanOfferCard offer={YC_PLAN_OFFER} features={PLAN_FEATURES}>
- <div className="flex gap-2.5 rounded-md bg-base-200 p-3 text-sm">
- <Tag className="mt-0.5 size-4 shrink-0 text-base-content/60" />
- <p className="text-base-content/70">
- <span className="font-medium text-base-content">
+ <div className="flex gap-2.5 rounded-md bg-muted p-3 text-sm">
+ <Tag className="mt-0.5 size-4 shrink-0 text-muted-foreground" />
+ <p className="text-muted-foreground">
+ <span className="font-medium text-foreground">
Don&rsquo;t forget your promo code.
</span>{" "}
Enter the code from the YC deal under &ldquo;Add promotion
@@ -158,21 +142,29 @@ function YcPlanPage() {
</p>
</div>
- {error ? <p className="text-sm text-error">{error}</p> : null}
+ {error ? (
+ <p role="alert" className="text-sm text-destructive">
+ {error}
+ </p>
+ ) : null}
{isOnYcPlan ? (
- <p className="text-sm text-base-content/60">
+ <p className="text-sm text-muted-foreground">
You&rsquo;re already on the {YC_PLAN_OFFER.name}.{" "}
- <Link to={BILLING_ROUTE} className="link">
+ <Link
+ to={BILLING_ROUTE}
+ className="underline underline-offset-2 hover:text-foreground"
+ >
Manage it on Billing
</Link>
.
</p>
) : canManageBilling ? (
<div className="space-y-2">
- <button
- className="btn btn-soft w-full"
- disabled={isAttaching}
+ <Button
+ className="w-full"
+ variant="secondary"
+ pending={isAttaching}
onClick={() => void handleSubscribe()}
>
{isAttaching
@@ -180,15 +172,15 @@ function YcPlanPage() {
: isPaid
? `Switch to the ${YC_PLAN_OFFER.name}`
: `Get the ${YC_PLAN_OFFER.name}`}
- </button>
+ </Button>
{isPaid ? (
- <p className="text-center text-xs text-base-content/50">
+ <p className="text-center text-xs text-muted-foreground">
Replaces your current subscription.
</p>
) : null}
</div>
) : (
- <p className="text-sm text-base-content/60">
+ <p className="text-sm text-muted-foreground">
Only the organization owner can change the plan. Ask them to switch
this organization to the {YC_PLAN_OFFER.name}.
</p>
@@ -196,16 +188,19 @@ function YcPlanPage() {
</PlanOfferCard>
<div className="text-center space-y-2">
- <p className="text-sm text-base-content/60">
+ <p className="text-sm text-muted-foreground">
Questions? Email{" "}
- <a className="link" href={`mailto:${SUPPORT_EMAIL}`}>
+ <a
+ className="underline underline-offset-2 hover:text-foreground"
+ href={`mailto:${SUPPORT_EMAIL}`}
+ >
{SUPPORT_EMAIL}
</a>
.
</p>
<Link
to="/"
- className="inline-flex items-center gap-1.5 text-sm font-medium text-base-content/70 hover:text-base-content transition-colors"
+ className="inline-flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors"
>
<ArrowRight className="size-3.5 rotate-180" />
Back to app