Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

light mode (#693)

Bill Yang2ee337705717
diff --git a/client/src/app/[site]/components/Sidebar/Sidebar.tsx b/client/src/app/[site]/components/Sidebar/Sidebar.tsx
index a7d509351..923216f69 100644
--- a/client/src/app/[site]/components/Sidebar/Sidebar.tsx
+++ b/client/src/app/[site]/components/Sidebar/Sidebar.tsx
@@ -57,13 +57,13 @@ function SidebarContent() {
const hasPrivateKey = segments.length > 1 && /^[a-f0-9]{12}$/i.test(segments[1]);
// Route is either segments[1] (no key) or segments[2] (with key)
- const route = hasPrivateKey ? (segments[2] || "main") : (segments[1] || "main");
+ const route = hasPrivateKey ? segments[2] || "main" : segments[1] || "main";
return route === tabName.toLowerCase();
};
return (
- <div className="w-56 bg-neutral-900 border-r border-neutral-850 flex flex-col h-dvh">
- <div className="flex flex-col p-3 border-b border-neutral-800">
+ <div className="w-56 bg-neutral-50 border-r border-neutral-150 dark:bg-neutral-900 dark:border-neutral-850 flex flex-col h-dvh">
+ <div className="flex flex-col p-3 border-b border-neutral-200 dark:border-neutral-800">
<SiteSelector />
</div>
<div className="flex flex-col p-3 pt-1">
@@ -180,7 +180,7 @@ function SidebarContent() {
<SiteSettings
siteId={site?.siteId ?? 0}
trigger={
- <div className="px-3 py-2 rounded-lg transition-colors w-full text-neutral-200 hover:text-white hover:bg-neutral-800/50 cursor-pointer">
+ <div className="px-3 py-2 rounded-lg transition-colors w-full text-neutral-700 hover:text-neutral-900 hover:bg-neutral-150 dark:text-neutral-200 dark:hover:text-white dark:hover:bg-neutral-800/50 cursor-pointer">
<div className="flex items-center gap-2">
<Settings className="h-4 w-4" />
<span className="text-sm">Site Settings</span>
diff --git a/client/src/app/[site]/components/Sidebar/SiteSelector.tsx b/client/src/app/[site]/components/Sidebar/SiteSelector.tsx
index bb78f3f3f..bbbc316e6 100644
--- a/client/src/app/[site]/components/Sidebar/SiteSelector.tsx
+++ b/client/src/app/[site]/components/Sidebar/SiteSelector.tsx
@@ -62,13 +62,13 @@ function SiteSelectorContent({ onSiteSelect }: { onSiteSelect: () => void }) {
onSiteSelect(); // Close popover immediately
}}
className={cn(
- "flex items-center justify-between p-2 cursor-pointer hover:bg-neutral-800/50 transition-colors rounded-md border-b border-neutral-800 last:border-b-0",
- isSelected && "bg-neutral-800"
+ "flex items-center justify-between p-2 cursor-pointer hover:bg-neutral-150 dark:hover:bg-neutral-800/50 transition-colors rounded-md border-b border-neutral-300 dark:border-neutral-800 last:border-b-0",
+ isSelected && "bg-neutral-200 dark:bg-neutral-800"
)}
>
<div className="flex items-center gap-3 flex-1 min-w-0">
<Favicon domain={site.domain} className="w-4 h-4 flex-shrink-0" />
- <div className="text-sm text-white truncate">{site.domain}</div>
+ <div className="text-sm text-neutral-900 dark:text-white truncate">{site.domain}</div>
</div>
</div>
);
@@ -106,16 +106,16 @@ function SiteSelectorContent({ onSiteSelect }: { onSiteSelect: () => void }) {
onSiteSelect(); // Close popover immediately
}}
className={cn(
- "flex items-center justify-between p-2 cursor-pointer hover:bg-neutral-800/50 transition-colors rounded-md border-b border-neutral-800 last:border-b-0",
- isSelected && "bg-neutral-800"
+ "flex items-center justify-between p-2 cursor-pointer hover:bg-neutral-150 dark:hover:bg-neutral-800/50 transition-colors rounded-md border-b border-neutral-100 dark:border-neutral-800 last:border-b-0",
+ isSelected && "bg-neutral-100 dark:bg-neutral-800"
)}
>
<div className="flex items-center gap-3 flex-1 min-w-0">
<Favicon domain={site.domain} className="w-4 h-4 flex-shrink-0" />
- <div className="text-sm text-white truncate">{site.domain}</div>
+ <div className="text-sm text-neutral-900 dark:text-white truncate">{site.domain}</div>
</div>
<div className="flex items-center gap-3">
- <div className="text-xs text-neutral-300 whitespace-nowrap">
+ <div className="text-xs text-neutral-600 dark:text-neutral-300 whitespace-nowrap">
{formatter(site.sessionsLast24Hours)} sessions (24h)
</div>
</div>
@@ -125,19 +125,19 @@ function SiteSelectorContent({ onSiteSelect }: { onSiteSelect: () => void }) {
: Array.from({ length: 3 }).map((_, index) => (
<div
key={`skeleton-${index}`}
- className="flex items-center justify-between p-2 animate-pulse rounded-md border-b border-neutral-800 last:border-b-0"
+ className="flex items-center justify-between p-2 animate-pulse rounded-md border-b border-neutral-300 dark:border-neutral-800 last:border-b-0"
>
<div className="flex items-center gap-3 flex-1">
- <div className="w-4 h-4 bg-neutral-700 rounded flex-shrink-0"></div>
- <div className="h-4 bg-neutral-700 rounded w-32"></div>
+ <div className="w-4 h-4 bg-neutral-200 dark:bg-neutral-700 rounded flex-shrink-0"></div>
+ <div className="h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-32"></div>
</div>
- <div className="h-3 bg-neutral-700 rounded w-20"></div>
+ <div className="h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-20"></div>
</div>
))}
</div>
{/* Add Site Section */}
- <div className="border-t border-neutral-800 pt-2 mt-2">
+ <div className="mt-2">
<AddSite
trigger={
<Button variant="ghost" className="w-full justify-start gap-2">
@@ -161,16 +161,16 @@ function SiteSelectorWrapper() {
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>
{site ? (
- <button className="flex gap-2 items-center border border-neutral-800 rounded-lg py-1.5 px-3 justify-start cursor-pointer hover:bg-neutral-800/50 transition-colors h-[36px] w-full">
+ <button className="flex gap-2 items-center border border-neutral-200 dark:border-neutral-800 rounded-lg py-1.5 px-3 justify-start cursor-pointer hover:bg-neutral-150 dark:hover:bg-neutral-800/50 transition-colors h-[36px] w-full">
<Favicon domain={site.domain} className="w-5 h-5" />
- <div className="text-white truncate text-sm flex-1 text-left">{site.domain}</div>
- {!embed && <ChevronDown className="w-4 h-4 text-neutral-400" />}
+ <div className="text-neutral-900 dark:text-white truncate text-sm flex-1 text-left">{site.domain}</div>
+ {!embed && <ChevronDown className="w-4 h-4 text-neutral-600 dark:text-neutral-400" />}
</button>
) : (
- <button className="flex gap-2 border border-neutral-800 rounded-lg py-1.5 px-3 justify-start items-center h-[36px] w-full animate-pulse">
- <div className="w-5 h-5 bg-neutral-800 rounded"></div>
- <div className="h-4 bg-neutral-800 rounded w-24 flex-1"></div>
- {!embed && <ChevronDown className="w-4 h-4 text-neutral-400" />}
+ <button className="flex gap-2 border border-neutral-200 dark:border-neutral-800 rounded-lg py-1.5 px-3 justify-start items-center h-[36px] w-full animate-pulse">
+ <div className="w-5 h-5 bg-neutral-200 dark:bg-neutral-800 rounded"></div>
+ <div className="h-4 bg-neutral-200 dark:bg-neutral-800 rounded w-24 flex-1"></div>
+ {!embed && <ChevronDown className="w-4 h-4 text-neutral-600 dark:text-neutral-400" />}
</button>
)}
</PopoverTrigger>
diff --git a/client/src/app/[site]/components/SubHeader/Filters/Filters.tsx b/client/src/app/[site]/components/SubHeader/Filters/Filters.tsx
index 0adaa75b4..59b1d8898 100644
--- a/client/src/app/[site]/components/SubHeader/Filters/Filters.tsx
+++ b/client/src/app/[site]/components/SubHeader/Filters/Filters.tsx
@@ -26,11 +26,11 @@ export function Filters({ availableFilters }: { availableFilters?: FilterParamet
<div
key={filter.parameter}
className={cn(
- "px-2 py-1 rounded-lg text-neutral-400 flex items-center gap-1 text-sm",
- disabled ? "bg-neutral-900" : "bg-neutral-850"
+ "px-2 py-1 rounded-lg text-neutral-500 dark:text-neutral-400 flex items-center gap-1 text-sm",
+ disabled ? "bg-neutral-200 dark:bg-neutral-900" : "bg-neutral-100 dark:bg-neutral-850"
)}
>
- <div className={cn(disabled ? "text-neutral-500" : "text-neutral-300")}>
+ <div className={cn(disabled ? "text-neutral-400 dark:text-neutral-500" : "text-neutral-600 dark:text-neutral-300")}>
{getParameterNameLabel(filter.parameter)}
</div>
<div
@@ -55,11 +55,11 @@ export function Filters({ availableFilters }: { availableFilters?: FilterParamet
>
{filterTypeToLabel(filter.type)}
</div>
- <div className={cn("text-neutral-100 font-medium whitespace-nowrap", disabled && "text-neutral-500")}>
+ <div className={cn("text-neutral-900 dark:text-neutral-100 font-medium whitespace-nowrap", disabled && "text-neutral-400 dark:text-neutral-500")}>
{getParameterValueLabel(filter, getRegionName)}
</div>
<div
- className="text-neutral-400 cursor-pointer hover:text-neutral-200"
+ className="text-neutral-500 dark:text-neutral-400 cursor-pointer hover:text-neutral-700 dark:hover:text-neutral-200"
onClick={() => removeFilter(filter)}
>
<X size={16} strokeWidth={3} />
diff --git a/client/src/app/[site]/components/SubHeader/Filters/NewFilterButton.tsx b/client/src/app/[site]/components/SubHeader/Filters/NewFilterButton.tsx
index fb761ad4f..51498b88e 100644
--- a/client/src/app/[site]/components/SubHeader/Filters/NewFilterButton.tsx
+++ b/client/src/app/[site]/components/SubHeader/Filters/NewFilterButton.tsx
@@ -77,7 +77,7 @@ export function NewFilterButton({ availableFilters }: { availableFilters?: Filte
/>
))}
</div>
- <div className="flex justify-between border-t border-neutral-750 p-3">
+ <div className="flex justify-between border-t border-neutral-200 dark:border-neutral-750 p-3">
<Button variant={"ghost"} onClick={() => addLocalFilter()} size={"sm"} className="gap-1">
<Plus className="w-3 h-3" />
Add Filter
diff --git a/client/src/app/[site]/components/SubHeader/LiveUserCount.tsx b/client/src/app/[site]/components/SubHeader/LiveUserCount.tsx
index 970b7fbd4..f29a456bc 100644
--- a/client/src/app/[site]/components/SubHeader/LiveUserCount.tsx
+++ b/client/src/app/[site]/components/SubHeader/LiveUserCount.tsx
@@ -6,7 +6,7 @@ export function LiveUserCount() {
const { data } = useGetLiveUsercount(5);
return (
- <div className="flex items-center gap-1 text-base text-neutral-200 mr-1">
+ <div className="flex items-center gap-1 text-base text-neutral-700 dark:text-neutral-200 mr-1">
<div className="flex justify-center">
<span className="relative flex h-3 w-3">
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-green-400 opacity-75"></span>
@@ -16,7 +16,7 @@ export function LiveUserCount() {
<Tooltip>
<TooltipTrigger>
- <span className="text-sm text-neutral-200 ml-1 font-medium">
+ <span className="text-sm text-neutral-700 dark:text-neutral-200 ml-1 font-medium">
{<NumberFlow respectMotionPreference={false} value={data?.count ?? 0} />}
<span className="ml-1"></span>
</span>
diff --git a/client/src/app/[site]/components/SubHeader/ShareSite.tsx b/client/src/app/[site]/components/SubHeader/ShareSite.tsx
index 5b90c7eff..c73469c49 100644
--- a/client/src/app/[site]/components/SubHeader/ShareSite.tsx
+++ b/client/src/app/[site]/components/SubHeader/ShareSite.tsx
@@ -45,7 +45,7 @@ export function ShareSite() {
<Input
value={`${globalThis.location.protocol}//${globalThis.location.host}/${site}/${privateLink?.privateLinkKey}`}
readOnly
- className="rounded-r-none bg-neutral-900"
+ className="rounded-r-none bg-white dark:bg-neutral-900"
/>
<Button
size="icon"
@@ -60,7 +60,7 @@ export function ShareSite() {
</Button>
</div>
<div
- className="text-xs text-neutral-500 mt-1 cursor-pointer hover:text-neutral-400"
+ className="text-xs text-neutral-500 dark:text-neutral-500 mt-1 cursor-pointer hover:text-neutral-600 dark:hover:text-neutral-400"
onClick={() => {
revokePrivateLinkKey(Number(site));
toast.success("Private link revoked");
@@ -70,7 +70,7 @@ export function ShareSite() {
</div>
</>
)}
- <span className="text-xs text-neutral-300 mt-2">
+ <span className="text-xs text-neutral-600 dark:text-neutral-300 mt-2">
Generate a private link to share a read-only view of this dashboard with your team.
</span>
</DropdownMenuContent>
diff --git a/client/src/app/[site]/components/shared/StandardSection/Row.tsx b/client/src/app/[site]/components/shared/StandardSection/Row.tsx
index 30626e678..a51c4328a 100644
--- a/client/src/app/[site]/components/shared/StandardSection/Row.tsx
+++ b/client/src/app/[site]/components/shared/StandardSection/Row.tsx
@@ -55,7 +55,7 @@ const RowItem = ({
return (
<div
key={getKey(item)}
- className="relative h-6 flex items-center cursor-pointer hover:bg-neutral-850 group"
+ className="relative h-6 flex items-center cursor-pointer hover:bg-neutral-150/50 dark:hover:bg-neutral-850 group"
onClick={() => onFilterToggle(filterParameter, getValue(item))}
>
<div
@@ -69,14 +69,16 @@ const RowItem = ({
{getLink && (
<a href={getLink(item)} target="_blank" onClick={e => e.stopPropagation()} className="flex-shrink-0">
<SquareArrowOutUpRight
- className="ml-0.5 w-3.5 h-3.5 text-neutral-300 hover:text-neutral-100"
+ className="ml-0.5 w-3.5 h-3.5 text-neutral-600 hover:text-neutral-900 dark:text-neutral-300 dark:hover:text-neutral-100"
strokeWidth={3}
/>
</a>
)}
</div>
<div className="text-xs flex gap-2 flex-shrink-0">
- <div className="hidden group-hover:block text-neutral-400">{round(item.percentage, 1)}%</div>
+ <div className="hidden group-hover:block text-neutral-600 dark:text-neutral-400">
+ {round(item.percentage, 1)}%
+ </div>
<NumberFlow respectMotionPreference={false} value={item.count} format={{ notation: "compact" }} />
</div>
</div>
@@ -170,7 +172,7 @@ export const Row = ({
const expandIcon = hasSubrow ? (
<Icon
- className="w-4 h-4 text-neutral-400 hover:text-neutral-100"
+ className="w-4 h-4 text-neutral-600 hover:text-neutral-900 dark:text-neutral-400 dark:hover:text-neutral-100"
strokeWidth={3}
onClick={e => {
e.stopPropagation();
diff --git a/client/src/app/[site]/components/shared/StandardSection/Skeleton.tsx b/client/src/app/[site]/components/shared/StandardSection/Skeleton.tsx
index 9a73fffe6..c15379faa 100644
--- a/client/src/app/[site]/components/shared/StandardSection/Skeleton.tsx
+++ b/client/src/app/[site]/components/shared/StandardSection/Skeleton.tsx
@@ -32,19 +32,19 @@ export const StandardSkeleton = memo(() => {
{Array.from({ length: 10 }).map((_, index) => (
<div key={index} className="relative h-6 flex items-center">
<div
- className="absolute inset-0 bg-neutral-800 py-2 rounded-md animate-pulse"
+ className="absolute inset-0 bg-neutral-150/50 dark:bg-neutral-800 py-2 rounded-md animate-pulse"
style={{ width: `${widths[index]}%` }}
></div>
<div className="z-5 mx-2 flex justify-between items-center text-sm w-full">
<div className="flex items-center gap-1">
<div
- className="h-4 bg-neutral-800 rounded animate-pulse"
+ className="h-4 bg-neutral-150 dark:bg-neutral-800 rounded animate-pulse"
style={{ width: `${labelWidths[index]}px` }}
></div>
</div>
<div className="text-sm flex gap-2">
<div
- className="h-4 bg-neutral-800 rounded animate-pulse"
+ className="h-4 bg-neutral-150 dark:bg-neutral-800 rounded animate-pulse"
style={{ width: `${valueWidths[index]}px` }}
></div>
</div>
diff --git a/client/src/app/[site]/components/shared/StandardSection/StandardSection.tsx b/client/src/app/[site]/components/shared/StandardSection/StandardSection.tsx
index 67fc6ee53..dafefc1d0 100644
--- a/client/src/app/[site]/components/shared/StandardSection/StandardSection.tsx
+++ b/client/src/app/[site]/components/shared/StandardSection/StandardSection.tsx
@@ -61,7 +61,7 @@ export function StandardSection({
</div>
)}
<div className="flex flex-col gap-2 max-h-[344px] overflow-y-auto overflow-x-hidden">
- <div className="flex flex-row gap-2 justify-between pr-1 text-xs text-neutral-400">
+ <div className="flex flex-row gap-2 justify-between pr-1 text-xs text-neutral-600 dark:text-neutral-400">
<div className="flex flex-row gap-1 items-center">
{title}
{IS_CLOUD && ["Countries", "Regions", "Cities"].includes(title) && (
@@ -104,7 +104,7 @@ export function StandardSection({
/>
))
) : (
- <div className="text-neutral-300 w-full text-center mt-6 flex flex-row gap-2 items-center justify-center">
+ <div className="text-neutral-600 dark:text-neutral-300 w-full text-center mt-6 flex flex-row gap-2 items-center justify-center">
<Info className="w-5 h-5" />
No Data
</div>
diff --git a/client/src/app/[site]/components/shared/StandardSection/StandardSectionDialog.tsx b/client/src/app/[site]/components/shared/StandardSection/StandardSectionDialog.tsx
index d691f31cb..b4b0b5637 100644
--- a/client/src/app/[site]/components/shared/StandardSection/StandardSectionDialog.tsx
+++ b/client/src/app/[site]/components/shared/StandardSection/StandardSectionDialog.tsx
@@ -92,7 +92,7 @@ export function StandardSectionDialog({
{getLink && (
<a href={getLink(row.original)} target="_blank" onClick={e => e.stopPropagation()}>
<SquareArrowOutUpRight
- className="ml-0.5 w-3.5 h-3.5 text-neutral-300 hover:text-neutral-100"
+ className="ml-0.5 w-3.5 h-3.5 text-neutral-600 hover:text-neutral-900 dark:text-neutral-300 dark:hover:text-neutral-100"
strokeWidth={3}
/>
</a>
@@ -191,7 +191,7 @@ export function StandardSectionDialog({
<Dialog open={expanded} onOpenChange={close}>
<DialogContent className="max-w-[1000px] w-[calc(100vw-2rem)] p-2 sm:p-4">
<div className="flex justify-center items-center h-40">
- <Loader2 className="h-8 w-8 animate-spin text-neutral-400" />
+ <Loader2 className="h-8 w-8 animate-spin text-neutral-600 dark:text-neutral-400" />
</div>
</DialogContent>
</Dialog>
@@ -206,11 +206,11 @@ export function StandardSectionDialog({
<DialogTitle>{title}</DialogTitle>
</DialogHeader>
<div className="relative">
- <Search className="absolute left-2.5 top-2.5 h-4 w-4 text-neutral-400" />
+ <Search className="absolute left-2.5 top-2.5 h-4 w-4 text-neutral-600 dark:text-neutral-400" />
<Input
type="text"
placeholder={`Filter ${allItems.length} items...`}
- className="pl-9 bg-neutral-900 border-neutral-700 text-xs"
+ className="pl-9 bg-white dark:bg-neutral-900 border-neutral-200 dark:border-neutral-700 text-xs"
value={searchTerm}
onChange={e => setSearchTerm(e.target.value)}
/>
@@ -218,7 +218,7 @@ export function StandardSectionDialog({
<div className="flex flex-col gap-2 overflow-x-auto">
<div className="max-h-[80vh] overflow-y-auto">
<table className="w-full text-xs text-left min-w-max">
- <thead className="bg-neutral-900 text-neutral-400 sticky top-0 z-10">
+ <thead className="bg-neutral-100 dark:bg-neutral-900 text-neutral-600 dark:text-neutral-400 sticky top-0 z-10">
{table.getHeaderGroups().map(headerGroup => (
<tr key={headerGroup.id}>
{headerGroup.headers.map((header, index) => (
@@ -254,8 +254,8 @@ export function StandardSectionDialog({
<tr
key={row.id}
className={cn(
- "border-b border-neutral-800 hover:bg-neutral-850 cursor-pointer group",
- rowIndex % 2 === 0 ? "bg-neutral-900" : "bg-neutral-950"
+ "border-b border-neutral-300 dark:border-neutral-800 hover:bg-neutral-150 dark:hover:bg-neutral-850 cursor-pointer group",
+ rowIndex % 2 === 0 ? "bg-white dark:bg-neutral-900" : "bg-neutral-50 dark:bg-neutral-950"
)}
onClick={() =>
addFilter({
@@ -283,13 +283,13 @@ export function StandardSectionDialog({
{filteredData.length > 0 && (
<div ref={ref} className="py-4 flex justify-center">
{isFetchingNextPage && (
- <div className="flex items-center gap-2 text-neutral-400 text-xs">
+ <div className="flex items-center gap-2 text-neutral-600 dark:text-neutral-400 text-xs">
<Loader2 className="h-4 w-4 animate-spin" />
Loading more...
</div>
)}
{!hasNextPage && !isFetchingNextPage && (
- <div className="text-neutral-500 text-xs">All items loaded</div>
+ <div className="text-neutral-500 dark:text-neutral-500 text-xs">All items loaded</div>
)}
</div>
)}
diff --git a/client/src/app/[site]/errors/components/EnableErrorTracking.tsx b/client/src/app/[site]/errors/components/EnableErrorTracking.tsx
index 669632a16..2f70d22a7 100644
--- a/client/src/app/[site]/errors/components/EnableErrorTracking.tsx
+++ b/client/src/app/[site]/errors/components/EnableErrorTracking.tsx
@@ -17,7 +17,7 @@ export function EnableErrorTracking() {
return (
<Alert className="p-4 bg-neutral-50/50 border-neutral-200/50 dark:bg-neutral-800/25 dark:border-amber-600/80">
<div className="flex items-start space-x-3">
- <AlertTriangle className="h-5 w-5 mt-0.5 text-neutral-100" />
+ <AlertTriangle className="h-5 w-5 mt-0.5 text-neutral-700 dark:text-neutral-100" />
<div className="flex-1">
<AlertTitle className="text-base font-semibold mb-1 text-neutral-700/90 dark:text-neutral-100">
Error Tracking is Disabled
diff --git a/client/src/app/[site]/errors/components/ErrorDetails.tsx b/client/src/app/[site]/errors/components/ErrorDetails.tsx
index b204f6ee7..52f3c6050 100644
--- a/client/src/app/[site]/errors/components/ErrorDetails.tsx
+++ b/client/src/app/[site]/errors/components/ErrorDetails.tsx
@@ -64,11 +64,11 @@ function ErrorEventItem({ errorEvent }: { errorEvent: ErrorEvent }) {
};
return (
- <div className="border border-neutral-800 rounded-lg p-4 bg-neutral-900/50">
+ <div className="border border-neutral-100 dark:border-neutral-800 rounded-lg p-4 bg-neutral-50 dark:bg-neutral-900/50">
{/* Header with timestamp and basic info */}
<div className="flex items-center justify-between mb-3">
<div className="flex items-center gap-4">
- <span className="text-sm text-neutral-200">{formatTimestamp(errorEvent.timestamp)}</span>
+ <span className="text-sm text-neutral-700 dark:text-neutral-200">{formatTimestamp(errorEvent.timestamp)}</span>
<div className="flex items-center gap-2">
{errorEvent.country && (
<Tooltip>
@@ -119,7 +119,7 @@ function ErrorEventItem({ errorEvent }: { errorEvent: ErrorEvent }) {
href={`https://${errorEvent.hostname}${errorEvent.pathname}`}
target="_blank"
rel="noopener noreferrer"
- className="text-sm text-neutral-300 break-words hover:underline"
+ className="text-sm text-neutral-600 dark:text-neutral-300 break-words hover:underline"
>
{errorEvent.hostname && errorEvent.pathname
? `${errorEvent.hostname}${errorEvent.pathname}`
@@ -161,31 +161,31 @@ function ErrorEventItem({ errorEvent }: { errorEvent: ErrorEvent }) {
<TriangleAlert className="w-4 h-4 mt-0.5 flex-shrink-0" />
<div className="flex-1 min-w-0">
<p className="text-sm font-medium mb-1">Error</p>
- <p className="text-sm text-neutral-300 break-words">{errorEvent.message || "No message available"}</p>
+ <p className="text-sm text-neutral-600 dark:text-neutral-300 break-words">{errorEvent.message || "No message available"}</p>
</div>
</div>
</div>
{/* Stack trace if available */}
{errorEvent.stack && (
- <div className="mt-3 pt-3 border-t border-neutral-700">
+ <div className="mt-3 pt-3 border-t border-neutral-200 dark:border-neutral-700">
<div className="flex items-start gap-2">
- <Code className="w-4 h-4 text-neutral-100 mt-0.5 flex-shrink-0" />
+ <Code className="w-4 h-4 text-neutral-900 dark:text-neutral-100 mt-0.5 flex-shrink-0" />
<div className="flex-1 min-w-0">
- <p className="text-sm font-medium text-neutral-100 mb-1">Stack Trace:</p>
+ <p className="text-sm font-medium text-neutral-900 dark:text-neutral-100 mb-1">Stack Trace:</p>
{/* File and line info */}
{(errorEvent.fileName || errorEvent.lineNumber) && (
<div className="mb-2">
<div className="flex-1 min-w-0">
<Link
href={`${errorEvent.fileName}`}
- className="text-sm text-neutral-300 break-words hover:underline"
+ className="text-sm text-neutral-600 dark:text-neutral-300 break-words hover:underline"
target="_blank"
rel="noopener noreferrer"
>
{errorEvent.fileName && <span>{truncateText(errorEvent.fileName, 100)}</span>}
{errorEvent.lineNumber && (
- <span className="text-neutral-100">
+ <span className="text-neutral-900 dark:text-neutral-100">
:{errorEvent.lineNumber}
{errorEvent.columnNumber && `:${errorEvent.columnNumber}`}
</span>
@@ -194,7 +194,7 @@ function ErrorEventItem({ errorEvent }: { errorEvent: ErrorEvent }) {
</div>
</div>
)}
- <pre className="text-xs text-neutral-100 bg-neutral-800 p-2 rounded overflow-x-auto whitespace-pre-wrap break-words">
+ <pre className="text-xs text-neutral-900 dark:text-neutral-100 bg-neutral-200 dark:bg-neutral-800 p-2 rounded overflow-x-auto whitespace-pre-wrap break-words">
{errorEvent.stack}
</pre>
</div>
@@ -227,10 +227,10 @@ export function ErrorDetails({ errorMessage }: ErrorDetailsProps) {
if (isLoading) {
return (
- <div className="p-4 bg-neutral-900 border-t border-neutral-800">
+ <div className="p-4 bg-white dark:bg-neutral-900 border-t border-neutral-100 dark:border-neutral-800">
<div className="space-y-3">
{Array.from({ length: 3 }).map((_, index) => (
- <div key={index} className="border border-neutral-800 rounded-lg p-4 bg-neutral-900/50">
+ <div key={index} className="border border-neutral-100 dark:border-neutral-800 rounded-lg p-4 bg-neutral-50 dark:bg-neutral-900/50">
{/* Header with timestamp and icons */}
<div className="flex items-center justify-between mb-3">
<div className="flex items-center gap-4">
@@ -263,7 +263,7 @@ export function ErrorDetails({ errorMessage }: ErrorDetailsProps) {
{/* Stack trace section (randomly show/hide) */}
{Math.random() > 0.5 && (
- <div className="mt-3 pt-3 border-t border-neutral-700">
+ <div className="mt-3 pt-3 border-t border-neutral-200 dark:border-neutral-700">
<div className="flex items-start gap-2">
<Skeleton className="h-4 w-4 mt-0.5" /> {/* Code icon */}
<div className="flex-1 min-w-0">
@@ -292,8 +292,8 @@ export function ErrorDetails({ errorMessage }: ErrorDetailsProps) {
if (!allErrorEvents || allErrorEvents.length === 0) {
return (
- <div className="p-4 bg-neutral-900 border-t border-neutral-800">
- <div className="text-center text-neutral-400">
+ <div className="p-4 bg-white dark:bg-neutral-900 border-t border-neutral-100 dark:border-neutral-800">
+ <div className="text-center text-neutral-500 dark:text-neutral-400">
<AlertTriangle className="w-6 h-6 mx-auto mb-2" />
<p>No error events found</p>
<p className="text-sm">This error may have occurred outside the current time range.</p>
@@ -303,7 +303,7 @@ export function ErrorDetails({ errorMessage }: ErrorDetailsProps) {
}
return (
- <div className="p-4 bg-neutral-900 border-t border-neutral-800 space-y-3 max-h-[70vh] overflow-y-auto">
+ <div className="p-4 bg-white dark:bg-neutral-900 border-t border-neutral-100 dark:border-neutral-800 space-y-3 max-h-[70vh] overflow-y-auto">
{allErrorEvents.map((errorEvent, index) => (
<ErrorEventItem key={`${errorEvent.session_id}-${errorEvent.timestamp}-${index}`} errorEvent={errorEvent} />
))}
@@ -329,7 +329,7 @@ export function ErrorDetails({ errorMessage }: ErrorDetailsProps) {
)}
{totalCount > 0 && (
- <div className="text-center text-xs text-gray-500 mt-2">
+ <div className="text-center text-xs text-neutral-500 dark:text-gray-500 mt-2">
Showing {allErrorEvents.length} of {totalCount} error events
</div>
)}
diff --git a/client/src/app/[site]/errors/components/ErrorListItem.tsx b/client/src/app/[site]/errors/components/ErrorListItem.tsx
index 29de59268..f941068ed 100644
--- a/client/src/app/[site]/errors/components/ErrorListItem.tsx
+++ b/client/src/app/[site]/errors/components/ErrorListItem.tsx
@@ -31,7 +31,7 @@ export function ErrorListItem({ errorData }: ErrorListItemProps) {
return (
<div
- className="mb-3 rounded-lg bg-neutral-900 border border-neutral-800"
+ className="mb-3 rounded-lg bg-white dark:bg-neutral-900 border border-neutral-100 dark:border-neutral-800"
onMouseEnter={() => setIsHovering(true)}
onMouseLeave={() => setIsHovering(false)}
>
@@ -80,9 +80,9 @@ export function ErrorListItem({ errorData }: ErrorListItemProps) {
{/* Expand/Collapse icon */}
<div className="ml-2 flex-shrink-0 flex">
{expanded ? (
- <ChevronDown className="w-4 h-4 text-gray-400" strokeWidth={3} />
+ <ChevronDown className="w-4 h-4 text-neutral-500 dark:text-gray-400" strokeWidth={3} />
) : (
- <ChevronRight className="w-4 h-4 text-gray-400" strokeWidth={3} />
+ <ChevronRight className="w-4 h-4 text-neutral-500 dark:text-gray-400" strokeWidth={3} />
)}
</div>
</div>
diff --git a/client/src/app/[site]/errors/components/ErrorListSkeleton.tsx b/client/src/app/[site]/errors/components/ErrorListSkeleton.tsx
index 8e8ff0e86..9105681d0 100644
--- a/client/src/app/[site]/errors/components/ErrorListSkeleton.tsx
+++ b/client/src/app/[site]/errors/components/ErrorListSkeleton.tsx
@@ -10,7 +10,7 @@ export function ErrorListSkeleton({ count = 5 }: ErrorListSkeletonProps) {
return (
<>
{Array.from({ length: count }).map((_, index) => (
- <div key={index} className="mb-3 rounded-lg bg-neutral-900 border border-neutral-800">
+ <div key={index} className="mb-3 rounded-lg bg-white dark:bg-neutral-900 border border-neutral-100 dark:border-neutral-800">
<div className="p-3">
<div className="flex flex-col md:flex-row justify-between items-start md:items-center w-full gap-4">
{/* Left side: Error name and message */}
diff --git a/client/src/app/[site]/errors/components/ErrorSparklineChart.tsx b/client/src/app/[site]/errors/components/ErrorSparklineChart.tsx
index 602963136..add42d828 100644
--- a/client/src/app/[site]/errors/components/ErrorSparklineChart.tsx
+++ b/client/src/app/[site]/errors/components/ErrorSparklineChart.tsx
@@ -2,10 +2,11 @@
import { GetErrorBucketedResponse } from "@/api/analytics/errors/useGetErrorBucketed";
import { hour12, userLocale } from "@/lib/dateTimeUtils";
-import { nivoTheme } from "@/lib/nivo";
+import { getNivoTheme } from "@/lib/nivo";
import { ResponsiveBar } from "@nivo/bar";
import { DateTime } from "luxon";
import { useMemo } from "react";
+import { useTheme } from "next-themes";
interface ErrorSparklineChartProps {
data: GetErrorBucketedResponse | undefined;
@@ -15,6 +16,9 @@ interface ErrorSparklineChartProps {
}
export function ErrorSparklineChart({ data, isHovering, errorMessage, isLoading }: ErrorSparklineChartProps) {
+ const { theme } = useTheme();
+ const nivoTheme = getNivoTheme(theme === "dark");
+
const chartData = useMemo(() => {
if (!data || data.length === 0) {
return [];
@@ -79,10 +83,12 @@ export function ErrorSparklineChart({ data, isHovering, errorMessage, isLoading
return (
<div
- className="bg-neutral-850 p-2 rounded-md text-xs border border-neutral-750 shadow-lg"
+ className="bg-neutral-150 dark:bg-neutral-850 p-2 rounded-md text-xs border border-neutral-300 dark:border-neutral-750 shadow-lg"
style={{ zIndex: 9999, position: "relative" }}
>
- <div className="font-semibold mb-1 text-neutral-200">{formatDateTime(currentTime)}</div>
+ <div className="font-semibold mb-1 text-neutral-700 dark:text-neutral-200">
+ {formatDateTime(currentTime)}
+ </div>
<div className="flex justify-between items-center">
<span className="font-medium text-red-400">
{currentY.toLocaleString()} {currentY === 1 ? "error" : "errors"}
diff --git a/client/src/app/[site]/events/components/EventList.tsx b/client/src/app/[site]/events/components/EventList.tsx
index 7ea845be1..6df71dc6d 100644
--- a/client/src/app/[site]/events/components/EventList.tsx
+++ b/client/src/app/[site]/events/components/EventList.tsx
@@ -43,7 +43,7 @@ const EventListSkeleton = memo(({ size = "small" }: { size?: "small" | "large" }
{Array.from({ length: 10 }).map((_, index) => (
<div key={index} className={cn("relative flex items-center", size === "small" ? "h-6" : "h-9")}>
<div
- className="absolute inset-0 bg-neutral-800 py-2 rounded-md animate-pulse"
+ className="absolute inset-0 bg-neutral-200 dark:bg-neutral-800 py-2 rounded-md animate-pulse"
style={{ width: `${widths[index]}%` }}
></div>
<div
@@ -53,15 +53,15 @@ const EventListSkeleton = memo(({ size = "small" }: { size?: "small" | "large" }
)}
>
<div className="flex items-center gap-1">
- <div className="h-4 w-4 bg-neutral-800 rounded animate-pulse mr-1"></div>
+ <div className="h-4 w-4 bg-neutral-200 dark:bg-neutral-800 rounded animate-pulse mr-1"></div>
<div
- className="h-4 bg-neutral-800 rounded animate-pulse"
+ className="h-4 bg-neutral-200 dark:bg-neutral-800 rounded animate-pulse"
style={{ width: `${labelWidths[index]}px` }}
></div>
</div>
<div className={cn("flex gap-2", size === "small" ? "text-xs" : "text-sm")}>
<div
- className="h-4 bg-neutral-800 rounded animate-pulse"
+ className="h-4 bg-neutral-200 dark:bg-neutral-800 rounded animate-pulse"
style={{ width: `${valueWidths[index]}px` }}
></div>
</div>
@@ -94,7 +94,7 @@ export function EventList({ events, isLoading, size = "small" }: EventListProps)
if (!events || events.length === 0) {
return size === "small" ? (
<div className="flex flex-col gap-2">
- <div className="text-neutral-300 w-full text-center mt-6 flex flex-row gap-2 items-center justify-center">
+ <div className="text-neutral-600 dark:text-neutral-300 w-full text-center mt-6 flex flex-row gap-2 items-center justify-center">
<Info className="w-5 h-5" />
No Data
</div>
@@ -102,7 +102,7 @@ export function EventList({ events, isLoading, size = "small" }: EventListProps)
target="_blank"
rel="noopener noreferrer"
href="https://www.rybbit.com/docs/track-events"
- className="text-neutral-400 w-full text-center mt-2 flex flex-row gap-1 items-center justify-center text-sm hover:underline hover:text-neutral-300"
+ className="text-neutral-500 dark:text-neutral-400 w-full text-center mt-2 flex flex-row gap-1 items-center justify-center text-sm hover:underline hover:text-neutral-700 dark:hover:text-neutral-300"
>
<BookOpen className="w-4 h-4" />
Learn how to track events
@@ -130,7 +130,7 @@ export function EventList({ events, isLoading, size = "small" }: EventListProps)
{/* Event Row */}
<div
className={cn(
- "relative flex items-center cursor-pointer hover:bg-neutral-850 group px-2 rounded-md",
+ "relative flex items-center cursor-pointer hover:bg-neutral-150/50 dark:hover:bg-neutral-850 group px-2 rounded-md",
size === "small" ? "h-6" : "h-9"
)}
onClick={() =>
@@ -159,15 +159,23 @@ export function EventList({ events, isLoading, size = "small" }: EventListProps)
}}
>
{isExpanded ? (
- <ChevronDown className="h-4 w-4 text-neutral-400 hover:text-neutral-100" strokeWidth={3} />
+ <ChevronDown
+ className="h-4 w-4 text-neutral-500 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-neutral-100"
+ strokeWidth={3}
+ />
) : (
- <ChevronRight className="h-4 w-4 text-neutral-400 hover:text-neutral-100" strokeWidth={3} />
+ <ChevronRight
+ className="h-4 w-4 text-neutral-500 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-neutral-100"
+ strokeWidth={3}
+ />
)}
</div>
{event.eventName}
</div>
<div className={cn("text-sm flex gap-2", size === "small" ? "text-xs" : "text-sm")}>
- <div className="hidden group-hover:block text-neutral-400">{Math.round(percentage * 10) / 10}%</div>
+ <div className="hidden group-hover:block text-neutral-500 dark:text-neutral-400">
+ {Math.round(percentage * 10) / 10}%
+ </div>
<NumberFlow respectMotionPreference={false} value={event.count} format={{ notation: "compact" }} />
</div>
</div>
@@ -175,7 +183,7 @@ export function EventList({ events, isLoading, size = "small" }: EventListProps)
{/* Properties Section (Expanded) */}
{isExpanded && (
- <div className="ml-4 mt-2 mb-4 border-l-2 border-neutral-800 pl-4">
+ <div className="ml-4 mt-2 mb-4 border-l-2 border-neutral-100 dark:border-neutral-800 pl-4">
<EventProperties
properties={eventPropertiesData || []}
isLoading={isLoadingProperties}
diff --git a/client/src/app/[site]/events/components/EventLog.tsx b/client/src/app/[site]/events/components/EventLog.tsx
index 171d16fb4..31b9a0cda 100644
--- a/client/src/app/[site]/events/components/EventLog.tsx
+++ b/client/src/app/[site]/events/components/EventLog.tsx
@@ -92,7 +92,7 @@ export function EventLog() {
</div>
{/* Pagination info */}
{data?.pages[0]?.pagination && (
- <div className="text-center text-xs text-neutral-400 pt-2">
+ <div className="text-center text-xs text-neutral-500 dark:text-neutral-400 pt-2">
Showing {allEvents.length} of {formatter(data.pages[0].pagination.total)} events
</div>
)}
diff --git a/client/src/app/[site]/events/components/EventLogItem.tsx b/client/src/app/[site]/events/components/EventLogItem.tsx
index 2cc6cb8fe..ea79af07c 100644
--- a/client/src/app/[site]/events/components/EventLogItem.tsx
+++ b/client/src/app/[site]/events/components/EventLogItem.tsx
@@ -63,10 +63,10 @@ export function EventLogItem({ event }: EventLogItemProps) {
}
return (
- <div className="mb-3 rounded-lg bg-neutral-850/50 border border-neutral-800 overflow-hidden p-3 hover:bg-neutral-800/70 transition-all duration-200">
+ <div className="mb-3 rounded-lg bg-neutral-50 dark:bg-neutral-850/50 border border-neutral-100 dark:border-neutral-800 overflow-hidden p-3 hover:bg-neutral-100 dark:hover:bg-neutral-800/70 transition-all duration-200">
<div className="flex flex-col space-y-2">
{/* Single row with event type, name/path, device info, and timestamp */}
- <div className="flex items-center gap-2 text-sm text-neutral-100">
+ <div className="flex items-center gap-2 text-sm text-neutral-900 dark:text-neutral-100">
{/* Left side content */}
<div className="flex items-center gap-2 flex-grow min-w-0">
{/* Event type icon */}
@@ -154,7 +154,7 @@ export function EventLogItem({ event }: EventLogItemProps) {
<Link href={`/${site}/user/${event.user_id}`} className="flex-shrink-0">
<Tooltip>
<TooltipTrigger asChild>
- <span className="text-sm font-mono text-neutral-400 hover:text-neutral-300">
+ <span className="text-sm font-mono text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300">
{event.user_id.substring(0, 12)}
</span>
</TooltipTrigger>
@@ -166,7 +166,7 @@ export function EventLogItem({ event }: EventLogItemProps) {
</div>
{/* Timestamp (right-aligned) */}
- <div className="text-sm flex-shrink-0 text-neutral-400 ml-auto">{eventTime.toRelative()}</div>
+ <div className="text-sm flex-shrink-0 text-neutral-500 dark:text-neutral-400 ml-auto">{eventTime.toRelative()}</div>
</div>
{/* Bottom row with event properties */}
@@ -176,9 +176,9 @@ export function EventLogItem({ event }: EventLogItemProps) {
<Badge
key={key}
variant="outline"
- className="px-1.5 py-0 h-5 text-xs bg-neutral-800 text-neutral-100 font-medium truncate max-w-[90%]"
+ className="px-1.5 py-0 h-5 text-xs bg-neutral-200 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100 font-medium truncate max-w-[90%]"
>
- <span className="text-neutral-300 font-light mr-1">{key}:</span>{" "}
+ <span className="text-neutral-600 dark:text-neutral-300 font-light mr-1">{key}:</span>{" "}
<Tooltip>
<TooltipTrigger asChild>
<span className="truncate">
@@ -208,25 +208,25 @@ export const EventLogItemSkeleton = memo(() => {
};
return (
- <div className="mb-3 rounded-lg bg-neutral-850/50 border border-neutral-800 overflow-hidden p-3">
+ <div className="mb-3 rounded-lg bg-neutral-50 dark:bg-neutral-850/50 border border-neutral-100 dark:border-neutral-800 overflow-hidden p-3">
<div className="flex flex-col space-y-2">
{/* Single row skeleton */}
<div className="flex items-center gap-2">
{/* Left side content */}
<div className="flex items-center gap-2 flex-grow">
- <div className="h-4 w-4 bg-neutral-800 rounded-sm animate-pulse flex-shrink-0"></div>
- <div className="h-4 w-40 bg-neutral-800 rounded animate-pulse flex-shrink-0"></div>
+ <div className="h-4 w-4 bg-neutral-200 dark:bg-neutral-800 rounded-sm animate-pulse flex-shrink-0"></div>
+ <div className="h-4 w-40 bg-neutral-200 dark:bg-neutral-800 rounded animate-pulse flex-shrink-0"></div>
<div className="flex space-x-1 flex-shrink-0">
- <div className="h-4 w-4 bg-neutral-800 rounded-sm animate-pulse"></div>
- <div className="h-4 w-4 bg-neutral-800 rounded-sm animate-pulse"></div>
- <div className="h-4 w-4 bg-neutral-800 rounded-sm animate-pulse"></div>
- <div className="h-4 w-4 bg-neutral-800 rounded-sm animate-pulse"></div>
+ <div className="h-4 w-4 bg-neutral-200 dark:bg-neutral-800 rounded-sm animate-pulse"></div>
+ <div className="h-4 w-4 bg-neutral-200 dark:bg-neutral-800 rounded-sm animate-pulse"></div>
+ <div className="h-4 w-4 bg-neutral-200 dark:bg-neutral-800 rounded-sm animate-pulse"></div>
+ <div className="h-4 w-4 bg-neutral-200 dark:bg-neutral-800 rounded-sm animate-pulse"></div>
</div>
- <div className="h-4 w-16 bg-neutral-800 rounded animate-pulse flex-shrink-0"></div>
+ <div className="h-4 w-16 bg-neutral-200 dark:bg-neutral-800 rounded animate-pulse flex-shrink-0"></div>
</div>
{/* Timestamp (right-aligned) */}
- <div className="h-4 w-24 bg-neutral-800 rounded animate-pulse flex-shrink-0 ml-auto"></div>
+ <div className="h-4 w-24 bg-neutral-200 dark:bg-neutral-800 rounded animate-pulse flex-shrink-0 ml-auto"></div>
</div>
{/* Bottom row skeleton (properties) - show randomly */}
@@ -235,7 +235,7 @@ export const EventLogItemSkeleton = memo(() => {
{Array.from({ length: Math.floor(Math.random() * 4) + 1 }).map((_, i) => (
<div
key={i}
- className="h-5 bg-neutral-800 rounded animate-pulse"
+ className="h-5 bg-neutral-200 dark:bg-neutral-800 rounded animate-pulse"
style={{ width: `${Math.random() * 60 + 40}px` }}
></div>
))}
diff --git a/client/src/app/[site]/events/components/EventProperties.tsx b/client/src/app/[site]/events/components/EventProperties.tsx
index 1ec33c229..ff4124f6f 100644
--- a/client/src/app/[site]/events/components/EventProperties.tsx
+++ b/client/src/app/[site]/events/components/EventProperties.tsx
@@ -21,7 +21,7 @@ export function EventProperties({ properties, isLoading, selectedEvent, size = "
if (!selectedEvent) {
return (
- <div className="text-neutral-300 w-full text-center py-8 flex flex-col gap-2 items-center justify-center">
+ <div className="text-neutral-600 dark:text-neutral-300 w-full text-center py-8 flex flex-col gap-2 items-center justify-center">
<Info className="w-6 h-6" />
<p>Select an event to view its properties</p>
</div>
@@ -30,7 +30,7 @@ export function EventProperties({ properties, isLoading, selectedEvent, size = "
if (!properties || properties.length === 0) {
return (
- <div className="text-neutral-300 w-full text-center py-8 flex flex-col gap-2 items-center justify-center">
+ <div className="text-neutral-600 dark:text-neutral-300 w-full text-center py-8 flex flex-col gap-2 items-center justify-center">
<Info className="w-6 h-6" />
<p>No properties found for this event</p>
</div>
@@ -65,7 +65,7 @@ export function EventProperties({ properties, isLoading, selectedEvent, size = "
return (
<div key={key} className={cn("flex flex-col gap-1", size === "small" ? "text-xs" : "text-sm")}>
{/* Property Key Header */}
- <div className="font-semibold text-primary py-1 border-b border-neutral-800">{key}</div>
+ <div className="font-semibold text-primary py-1 border-b border-neutral-100 dark:border-neutral-800">{key}</div>
{/* Property Values */}
<div className="pl-4 flex flex-col gap-2">
@@ -79,7 +79,7 @@ export function EventProperties({ properties, isLoading, selectedEvent, size = "
<div
key={`${property.propertyKey}-${property.propertyValue}`}
className={cn(
- "relative flex items-center hover:bg-neutral-850 group px-2 rounded-md",
+ "relative flex items-center hover:bg-neutral-100 dark:hover:bg-neutral-850 group px-2 rounded-md",
size === "small" ? "h-6" : "h-8"
)}
>
@@ -99,7 +99,7 @@ export function EventProperties({ properties, isLoading, selectedEvent, size = "
</Tooltip>
</div>
<div className="flex gap-2">
- <div className="hidden group-hover:block text-neutral-400">
+ <div className="hidden group-hover:block text-neutral-500 dark:text-neutral-400">
{Math.round(percentage * 10) / 10}%
</div>
<NumberFlow
@@ -139,8 +139,8 @@ const EventPropertiesSkeleton = memo(({ size = "small" }: { size?: "small" | "la
{Array.from({ length: groupCount }).map((_, groupIndex) => (
<div key={groupIndex} className={cn("flex flex-col gap-1", size === "small" ? "text-xs" : "text-sm")}>
{/* Property Key Header Skeleton */}
- <div className="font-semibold py-1 border-b border-neutral-800">
- <div className="h-4 bg-neutral-800 rounded animate-pulse w-24"></div>
+ <div className="font-semibold py-1 border-b border-neutral-100 dark:border-neutral-800">
+ <div className="h-4 bg-neutral-200 dark:bg-neutral-800 rounded animate-pulse w-24"></div>
</div>
{/* Property Values Skeleton */}
@@ -155,18 +155,18 @@ const EventPropertiesSkeleton = memo(({ size = "small" }: { size?: "small" | "la
className={cn("relative flex items-center px-2 rounded-md", size === "small" ? "h-6" : "h-8")}
>
<div
- className="absolute inset-0 bg-neutral-800 py-2 opacity-25 rounded-md animate-pulse"
+ className="absolute inset-0 bg-neutral-200 dark:bg-neutral-800 py-2 opacity-25 rounded-md animate-pulse"
style={{ width: `${barWidths[propIndex]}%` }}
></div>
<div className="z-10 flex justify-between items-center w-full">
<div className="truncate max-w-[70%]">
<div
- className="h-4 bg-neutral-800 rounded animate-pulse"
+ className="h-4 bg-neutral-200 dark:bg-neutral-800 rounded animate-pulse"
style={{ width: `${valueWidths[propIndex]}px` }}
></div>
</div>
<div className="flex gap-2">
- <div className="h-4 bg-neutral-800 rounded animate-pulse" style={{ width: "40px" }}></div>
+ <div className="h-4 bg-neutral-200 dark:bg-neutral-800 rounded animate-pulse" style={{ width: "40px" }}></div>
</div>
</div>
</div>
diff --git a/client/src/app/[site]/events/components/OutboundLinksList.tsx b/client/src/app/[site]/events/components/OutboundLinksList.tsx
index e73599feb..93475b4d5 100644
--- a/client/src/app/[site]/events/components/OutboundLinksList.tsx
+++ b/client/src/app/[site]/events/components/OutboundLinksList.tsx
@@ -33,7 +33,7 @@ const OutboundLinksListSkeleton = memo(({ size = "small" }: { size?: "small" | "
{Array.from({ length: 10 }).map((_, index) => (
<div key={index} className={cn("relative flex items-center", size === "small" ? "h-6" : "h-9")}>
<div
- className="absolute inset-0 bg-neutral-800 py-2 rounded-md animate-pulse"
+ className="absolute inset-0 bg-neutral-150/50 dark:bg-neutral-800 py-2 rounded-md animate-pulse"
style={{ width: `${widths[index]}%` }}
></div>
<div
@@ -43,15 +43,15 @@ const OutboundLinksListSkeleton = memo(({ size = "small" }: { size?: "small" | "
)}
>
<div className="flex items-center gap-1">
- <div className="h-4 w-4 bg-neutral-800 rounded animate-pulse mr-1"></div>
+ <div className="h-4 w-4 bg-neutral-200 dark:bg-neutral-800 rounded animate-pulse mr-1"></div>
<div
- className="h-4 bg-neutral-800 rounded animate-pulse"
+ className="h-4 bg-neutral-200 dark:bg-neutral-800 rounded animate-pulse"
style={{ width: `${labelWidths[index]}px` }}
></div>
</div>
<div className={cn("flex gap-2", size === "small" ? "text-xs" : "text-sm")}>
<div
- className="h-4 bg-neutral-800 rounded animate-pulse"
+ className="h-4 bg-neutral-200 dark:bg-neutral-800 rounded animate-pulse"
style={{ width: `${valueWidths[index]}px` }}
></div>
</div>
@@ -102,7 +102,7 @@ export function OutboundLinksList({ outboundLinks, isLoading, size = "small" }:
if (!outboundLinks || outboundLinks.length === 0) {
return (
- <div className="text-neutral-300 w-full text-center mt-6 flex flex-row gap-2 items-center justify-center">
+ <div className="text-neutral-500 dark:text-neutral-300 w-full text-center mt-6 flex flex-row gap-2 items-center justify-center">
<Info className="w-5 h-5" />
No Data
</div>
@@ -126,7 +126,7 @@ export function OutboundLinksList({ outboundLinks, isLoading, size = "small" }:
<div
key={`${link.url}-${index}`}
className={cn(
- "relative flex items-center hover:bg-neutral-850 group px-2 rounded-md",
+ "relative flex items-center hover:bg-neutral-100 dark:hover:bg-neutral-850 group px-2 rounded-md",
size === "small" ? "h-6" : "h-9"
)}
>
@@ -143,17 +143,19 @@ export function OutboundLinksList({ outboundLinks, isLoading, size = "small" }:
href={link.url}
target="_blank"
rel="noopener noreferrer"
- className="text-neutral-100 hover:underline truncate"
+ className="text-neutral-900 dark:text-neutral-100 hover:underline truncate"
title={link.url}
>
{truncateUrl(link.url)}
</a>
</div>
<div className={cn("text-sm flex gap-2 items-center", size === "small" ? "text-xs" : "text-sm")}>
- <div className="hidden group-hover:block text-neutral-400 text-xs">
+ <div className="hidden group-hover:block text-neutral-600 dark:text-neutral-400 text-xs">
{Math.round(percentage * 10) / 10}%
</div>
- <div className="hidden group-hover:block text-neutral-400 text-xs">{lastClicked.toRelative()}</div>
+ <div className="hidden group-hover:block text-neutral-600 dark:text-neutral-400 text-xs">
+ {lastClicked.toRelative()}
+ </div>
<NumberFlow respectMotionPreference={false} value={link.count} format={{ notation: "compact" }} />
</div>
</div>
diff --git a/client/src/app/[site]/funnels/components/Funnel.tsx b/client/src/app/[site]/funnels/components/Funnel.tsx
index 4d255fc5e..846574b33 100644
--- a/client/src/app/[site]/funnels/components/Funnel.tsx
+++ b/client/src/app/[site]/funnels/components/Funnel.tsx
@@ -101,10 +101,10 @@ function FunnelStepComponent({ step, index, steps, chartData, firstStep, siteId
<div key={step.stepNumber} className="relative pb-4">
{/* Step Header - Clickable */}
<div
- className="flex items-center cursor-pointer hover:bg-neutral-800/30 rounded-md p-2 -ml-2 transition-colors"
+ className="flex items-center cursor-pointer hover:bg-neutral-100 dark:hover:bg-neutral-800/30 rounded-md p-2 -ml-2 transition-colors"
onClick={toggleExpansion}
>
- <div className="flex-shrink-0 w-6 h-6 rounded-full bg-neutral-800 flex items-center justify-center text-xs mr-2">
+ <div className="flex-shrink-0 w-6 h-6 rounded-full bg-neutral-100 dark:bg-neutral-800 flex items-center justify-center text-xs mr-2">
{step.stepNumber}
</div>
<div className="font-medium text-sm flex items-center gap-2 flex-1">
@@ -122,7 +122,7 @@ function FunnelStepComponent({ step, index, steps, chartData, firstStep, siteId
<div className="flex-shrink-0 min-w-[130px] mr-4 space-y-1">
<div className="flex items-baseline">
<span className="text-base font-semibold">{step.visitors.toLocaleString()}</span>
- <span className="text-sm text-neutral-400 ml-1">sessions</span>
+ <span className="text-sm text-neutral-500 dark:text-neutral-400 ml-1">sessions</span>
</div>
{index !== 0 && (
<div className="flex items-baseline text-orange-500 text-xs font-medium">
@@ -132,7 +132,7 @@ function FunnelStepComponent({ step, index, steps, chartData, firstStep, siteId
</div>
{/* Bar */}
- <div className="flex-grow h-10 bg-neutral-800 rounded-md overflow-hidden relative mt-2">
+ <div className="flex-grow h-10 bg-neutral-100 dark:bg-neutral-800 rounded-md overflow-hidden relative mt-2">
{/* Relative conversion bar (from previous step) */}
{index > 0 && prevStep && (
<div
@@ -242,13 +242,13 @@ export function Funnel({ data, steps, isError, error, isPending }: FunnelProps)
</div>
) : (
<div className="h-[400px] flex items-center justify-center">
- <div className="text-neutral-400 text-sm">
+ <div className="text-neutral-500 dark:text-neutral-400 text-sm">
{isPending ? "Analyzing funnel..." : "Configure your funnel steps and click 'Analyze Funnel'"}
</div>
</div>
)}
<div className="flex justify-between items-center gap-2 ml-4">
- <div className="flex items-center gap-4 mt-3 text-xs text-neutral-400">
+ <div className="flex items-center gap-4 mt-3 text-xs text-neutral-500 dark:text-neutral-400">
<div className="flex items-center">
<div className="w-3 h-3 bg-emerald-500/70 rounded-sm mr-1"></div>
<span>Overall conversion</span>
diff --git a/client/src/app/[site]/funnels/components/FunnelForm.tsx b/client/src/app/[site]/funnels/components/FunnelForm.tsx
index 23c555454..452a17602 100644
--- a/client/src/app/[site]/funnels/components/FunnelForm.tsx
+++ b/client/src/app/[site]/funnels/components/FunnelForm.tsx
@@ -198,14 +198,14 @@ export function FunnelForm({
{steps.map((step, index) => (
<div
key={index}
- className="flex flex-col space-y-2 border border-neutral-750 p-4 rounded-lg bg-neutral-850"
+ className="flex flex-col space-y-2 border border-neutral-200 dark:border-neutral-750 p-4 rounded-lg bg-white dark:bg-neutral-850"
>
<div className="flex items-start gap-2">
- <div className="flex-shrink-0 w-6 h-6 rounded-full border border-neutral-400 bg-neutral-750 flex items-center justify-center text-xs mt-1.5">
+ <div className="flex-shrink-0 w-6 h-6 rounded-full border border-neutral-300 dark:border-neutral-400 bg-neutral-100 dark:bg-neutral-750 flex items-center justify-center text-xs mt-1.5">
{index + 1}
</div>
<Select value={step.type} onValueChange={value => updateStepType(index, value as "page" | "event")}>
- <SelectTrigger className="min-w-[80px] max-w-[80px] dark:border-neutral-700">
+ <SelectTrigger className="min-w-[80px] max-w-[80px] border-neutral-300 dark:border-neutral-700">
<SelectValue placeholder="Type" />
</SelectTrigger>
<SelectContent>
@@ -220,21 +220,21 @@ export function FunnelForm({
suggestions={hostnameSuggestions}
placeholder="Hostname (optional)"
value={step.hostname || ""}
- className="dark:border-neutral-700 w-30"
+ className="border-neutral-300 dark:border-neutral-700 w-30"
onChange={e => updateStep(index, "hostname", e.target.value)}
/>
<InputWithSuggestions
suggestions={step.type === "page" ? pathSuggestions : eventSuggestions}
placeholder={step.type === "page" ? "Path (e.g. /pricing)" : "Event name"}
value={step.value}
- className="dark:border-neutral-700 w-56"
+ className="border-neutral-300 dark:border-neutral-700 w-56"
onChange={e => updateStep(index, "value", e.target.value)}
/>
</div>
<div className="flex items-center gap-2">
<Input
placeholder="Label (optional)"
- className="dark:border-neutral-700"
+ className="border-neutral-300 dark:border-neutral-700"
value={step.name || ""}
onChange={e => updateStep(index, "name", e.target.value)}
/>
@@ -263,13 +263,13 @@ export function FunnelForm({
<div className="grid grid-cols-2 gap-2 mt-2">
<Input
placeholder="Property key"
- className="dark:border-neutral-700"
+ className="border-neutral-300 dark:border-neutral-700"
value={step.eventPropertyKey || ""}
onChange={e => updateStep(index, "eventPropertyKey", e.target.value)}
/>
<Input
placeholder="Property value"
- className="dark:border-neutral-700"
+ className="border-neutral-300 dark:border-neutral-700"
value={step.eventPropertyValue !== undefined ? String(step.eventPropertyValue) : ""}
onChange={e => updateStep(index, "eventPropertyValue", e.target.value)}
/>
@@ -288,7 +288,7 @@ export function FunnelForm({
</div>
<div className="flex justify-between items-center">
- <span className="text-xs text-neutral-500 ">
+ <span className="text-xs text-neutral-600 dark:text-neutral-500">
Use * to match a single path segment (e.g., /blog/*) or ** to match multiple segments (e.g., /docs/**/intro)
</span>
<div className="text-sm text-red-500">
diff --git a/client/src/app/[site]/funnels/components/FunnelRow.tsx b/client/src/app/[site]/funnels/components/FunnelRow.tsx
index 71b2225a7..46ddb0be1 100644
--- a/client/src/app/[site]/funnels/components/FunnelRow.tsx
+++ b/client/src/app/[site]/funnels/components/FunnelRow.tsx
@@ -64,14 +64,11 @@ export function FunnelRow({ funnel, index }: FunnelRowProps) {
<Card className="mb-4 overflow-hidden">
{/* Header row (always visible) */}
<div className="flex items-center justify-between py-2 px-5">
- <div
- className="flex items-center flex-grow cursor-pointer hover:bg-neutral-50 dark:hover:bg-neutral-900 transition-colors"
- onClick={handleExpand}
- >
- <div className="mt-1 text-xs text-neutral-400 flex flex-col gap-3">
+ <div className="flex items-center flex-grow cursor-pointer transition-colors" onClick={handleExpand}>
+ <div className="mt-1 text-xs text-neutral-500 dark:text-neutral-400 flex flex-col gap-3">
{/* Steps visualization */}
<div className="flex flex-wrap gap-1">
- <h3 className="font-medium text-neutral-100 text-base mr-2">{funnel.name}</h3>
+ <h3 className="font-medium text-neutral-900 dark:text-neutral-100 text-base mr-2">{funnel.name}</h3>
{funnel.steps.map((step, index) => (
<div key={index} className="flex items-center">
{index > 0 && <ArrowRight className="h-3 w-3 mx-1 text-neutral-400" />}
diff --git a/client/src/app/[site]/funnels/page.tsx b/client/src/app/[site]/funnels/page.tsx
index f8e541d51..3cb192702 100644
--- a/client/src/app/[site]/funnels/page.tsx
+++ b/client/src/app/[site]/funnels/page.tsx
@@ -16,27 +16,27 @@ import { FunnelRow } from "./components/FunnelRow";
// Skeleton for the funnel row component
const FunnelRowSkeleton = () => (
- <div className="rounded-md shadow-sm bg-neutral-900 border border-neutral-800 mb-4 overflow-hidden">
+ <div className="rounded-md shadow-sm bg-white dark:bg-neutral-900 border border-neutral-100 dark:border-neutral-800 mb-4 overflow-hidden">
<div className="flex items-center justify-between py-2 px-5 animate-pulse">
<div className="flex items-center flex-grow">
<div className="mt-1 text-xs flex flex-col gap-3 w-full">
{/* Funnel name and steps skeleton */}
<div className="flex flex-wrap gap-1 items-center">
- <div className="h-5 bg-neutral-800 rounded w-32 mb-1"></div>
+ <div className="h-5 bg-neutral-100 dark:bg-neutral-800 rounded w-32 mb-1"></div>
<div className="flex items-center">
- <div className="rounded bg-neutral-800 px-1.5 py-0.5 w-20 h-5 flex items-center">
- <div className="w-3 h-3 bg-neutral-700 rounded-full mr-1"></div>
- <div className="h-3 bg-neutral-700 rounded w-12 ml-1"></div>
+ <div className="rounded bg-neutral-100 dark:bg-neutral-800 px-1.5 py-0.5 w-20 h-5 flex items-center">
+ <div className="w-3 h-3 bg-neutral-150 dark:bg-neutral-700 rounded-full mr-1"></div>
+ <div className="h-3 bg-neutral-150 dark:bg-neutral-700 rounded w-12 ml-1"></div>
</div>
- <ArrowRight className="h-3 w-3 mx-1 text-neutral-600" />
- <div className="rounded bg-neutral-800 px-1.5 py-0.5 w-24 h-5 flex items-center">
- <div className="w-3 h-3 bg-neutral-700 rounded-full mr-1"></div>
- <div className="h-3 bg-neutral-700 rounded w-16 ml-1"></div>
+ <ArrowRight className="h-3 w-3 mx-1 text-neutral-300 dark:text-neutral-600" />
+ <div className="rounded bg-neutral-100 dark:bg-neutral-800 px-1.5 py-0.5 w-24 h-5 flex items-center">
+ <div className="w-3 h-3 bg-neutral-150 dark:bg-neutral-700 rounded-full mr-1"></div>
+ <div className="h-3 bg-neutral-150 dark:bg-neutral-700 rounded w-16 ml-1"></div>
</div>
- <ArrowRight className="h-3 w-3 mx-1 text-neutral-600" />
- <div className="rounded bg-neutral-800 px-1.5 py-0.5 w-20 h-5 flex items-center">
- <div className="w-3 h-3 bg-neutral-700 rounded-full mr-1"></div>
- <div className="h-3 bg-neutral-700 rounded w-12 ml-1"></div>
+ <ArrowRight className="h-3 w-3 mx-1 text-neutral-300 dark:text-neutral-600" />
+ <div className="rounded bg-neutral-100 dark:bg-neutral-800 px-1.5 py-0.5 w-20 h-5 flex items-center">
+ <div className="w-3 h-3 bg-neutral-150 dark:bg-neutral-700 rounded-full mr-1"></div>
+ <div className="h-3 bg-neutral-150 dark:bg-neutral-700 rounded w-12 ml-1"></div>
</div>
</div>
</div>
@@ -45,9 +45,9 @@ const FunnelRowSkeleton = () => (
<div className="flex items-center gap-4">
<div className="flex">
- <div className="h-8 w-8 bg-neutral-800 rounded-md mr-1"></div>
- <div className="h-8 w-8 bg-neutral-800 rounded-md mr-1"></div>
- <div className="h-8 w-8 bg-neutral-800 rounded-md"></div>
+ <div className="h-8 w-8 bg-neutral-100 dark:bg-neutral-800 rounded-md mr-1"></div>
+ <div className="h-8 w-8 bg-neutral-100 dark:bg-neutral-800 rounded-md mr-1"></div>
+ <div className="h-8 w-8 bg-neutral-100 dark:bg-neutral-800 rounded-md"></div>
</div>
</div>
</div>
diff --git a/client/src/app/[site]/globe/components/GlobeSessions.tsx b/client/src/app/[site]/globe/components/GlobeSessions.tsx
index 2e3f55c9c..d4d4e4ab6 100644
--- a/client/src/app/[site]/globe/components/GlobeSessions.tsx
+++ b/client/src/app/[site]/globe/components/GlobeSessions.tsx
@@ -33,31 +33,31 @@ function truncatePath(path: string, maxLength: number = 32) {
function SessionCardSkeleton() {
return (
- <div className="rounded-lg bg-neutral-850 border border-neutral-800 overflow-hidden p-2 space-y-2 animate-pulse">
- <div className="flex justify-between border-b border-neutral-700 pb-2">
+ <div className="rounded-lg bg-white dark:bg-neutral-850 border border-neutral-200 dark:border-neutral-800 overflow-hidden p-2 space-y-2 animate-pulse">
+ <div className="flex justify-between border-b border-neutral-200 dark:border-neutral-700 pb-2">
<div className="flex items-center gap-1.5">
- <div className="h-4 w-4 bg-neutral-700 rounded-full" />
- <div className="h-3 w-24 bg-neutral-700 rounded" />
+ <div className="h-4 w-4 bg-neutral-150 dark:bg-neutral-700 rounded-full" />
+ <div className="h-3 w-24 bg-neutral-150 dark:bg-neutral-700 rounded" />
</div>
<div className="flex items-center gap-1.5">
- <div className="h-3 w-20 bg-neutral-700 rounded" />
- <div className="h-3 w-1 bg-neutral-700 rounded" />
- <div className="h-3 w-10 bg-neutral-700 rounded hidden md:block" />
+ <div className="h-3 w-20 bg-neutral-150 dark:bg-neutral-700 rounded" />
+ <div className="h-3 w-1 bg-neutral-150 dark:bg-neutral-700 rounded" />
+ <div className="h-3 w-10 bg-neutral-150 dark:bg-neutral-700 rounded hidden md:block" />
</div>
</div>
<div className="flex space-x-2 items-center">
- <div className="h-4 w-4 bg-neutral-700 rounded-sm" />
- <div className="h-4 w-4 bg-neutral-700 rounded-sm" />
- <div className="h-4 w-4 bg-neutral-700 rounded-sm" />
- <div className="h-4 w-4 bg-neutral-700 rounded-sm" />
- <div className="h-[21px] w-12 bg-neutral-700 rounded-sm" />
- <div className="h-[21px] w-12 bg-neutral-700 rounded-sm" />
- <div className="h-[21px] w-16 bg-neutral-700 rounded-sm" />
+ <div className="h-4 w-4 bg-neutral-150 dark:bg-neutral-700 rounded-sm" />
+ <div className="h-4 w-4 bg-neutral-150 dark:bg-neutral-700 rounded-sm" />
+ <div className="h-4 w-4 bg-neutral-150 dark:bg-neutral-700 rounded-sm" />
+ <div className="h-4 w-4 bg-neutral-150 dark:bg-neutral-700 rounded-sm" />
+ <div className="h-[21px] w-12 bg-neutral-150 dark:bg-neutral-700 rounded-sm" />
+ <div className="h-[21px] w-12 bg-neutral-150 dark:bg-neutral-700 rounded-sm" />
+ <div className="h-[21px] w-16 bg-neutral-150 dark:bg-neutral-700 rounded-sm" />
</div>
<div className="items-center flex-1 min-w-0 hidden md:flex gap-2">
- <div className="h-3 w-32 bg-neutral-700 rounded" />
- <div className="h-3 w-3 bg-neutral-700 rounded" />
- <div className="h-3 w-32 bg-neutral-700 rounded" />
+ <div className="h-3 w-32 bg-neutral-150 dark:bg-neutral-700 rounded" />
+ <div className="h-3 w-3 bg-neutral-150 dark:bg-neutral-700 rounded" />
+ <div className="h-3 w-32 bg-neutral-150 dark:bg-neutral-700 rounded" />
</div>
</div>
);
diff --git a/client/src/app/[site]/globe/page.tsx b/client/src/app/[site]/globe/page.tsx
index 1a5ef8f3d..0cdf24af4 100644
--- a/client/src/app/[site]/globe/page.tsx
+++ b/client/src/app/[site]/globe/page.tsx
@@ -85,7 +85,7 @@ export default function GlobePage() {
return (
<DisabledOverlay message="Globe" featurePath="globe">
<div className="relative w-full h-dvh overflow-hidden">
- <div className="p-2 md:p-4 relative z-50">
+ <div className="p-2 md:p-4 relative z-50 dark">
<SubHeader />
</div>
<div className="absolute top-0 left-0 right-0 bottom-0 z-10">
@@ -96,11 +96,11 @@ export default function GlobePage() {
)}
<div className="absolute bottom-2 left-2 right-2 md:right-4 md:left-4 z-99999 flex flex-col gap-2 pointer-events-none ">
<div className="flex items-end gap-2 justify-between overflow-x-auto">
- <div className="pointer-events-auto">
+ <div className="pointer-events-auto dark">
<MapViewSelector />
</div>
{mapView === "timeline" ? (
- <div className="pointer-events-auto flex gap-2">
+ <div className="pointer-events-auto flex gap-2 dark">
{mapMode === "3D" && <MapStyleSelector />}
<Select
value={windowSize.toString()}
@@ -122,13 +122,13 @@ export default function GlobePage() {
</Select>
</div>
) : (
- <div className="pointer-events-auto hidden md:block">
+ <div className="pointer-events-auto hidden md:block dark">
<GlobeSessions />
</div>
)}
</div>
{mapView === "timeline" && (
- <div className="pointer-events-auto">
+ <div className="pointer-events-auto dark">
<TimelineScrubber />
</div>
)}
diff --git a/client/src/app/[site]/goals/components/GoalCard.tsx b/client/src/app/[site]/goals/components/GoalCard.tsx
index 85f9d44e0..87adb0146 100644
--- a/client/src/app/[site]/goals/components/GoalCard.tsx
+++ b/client/src/app/[site]/goals/components/GoalCard.tsx
@@ -69,9 +69,9 @@ export default function GoalCard({ goal, siteId }: GoalCardProps) {
return (
<>
- <div className="rounded-lg bg-neutral-900 border border-neutral-800 overflow-hidden relative">
+ <div className="rounded-lg bg-white dark:bg-neutral-900 border border-neutral-100 dark:border-neutral-800 overflow-hidden relative">
<div
- className="px-4 py-3 flex items-center mb-1 cursor-pointer hover:bg-neutral-800/50 transition-colors"
+ className="px-4 py-3 flex items-center mb-1 cursor-pointer hover:bg-neutral-50 dark:hover:bg-neutral-800/50 transition-colors"
onClick={toggleExpansion}
>
{/* Left section - Title and type */}
@@ -100,15 +100,15 @@ export default function GoalCard({ goal, siteId }: GoalCardProps) {
</h3>
<div className="mt-1">
- <span className="text-xs text-neutral-400 mr-2">Pattern:</span>
- <code className="text-xs bg-neutral-800 px-1 py-0.5 rounded">
+ <span className="text-xs text-neutral-500 dark:text-neutral-400 mr-2">Pattern:</span>
+ <code className="text-xs bg-neutral-200 dark:bg-neutral-800 px-1 py-0.5 rounded">
{goal.goalType === "path" ? goal.config.pathPattern : goal.config.eventName}
</code>
{goal.goalType === "event" && goal.config.eventPropertyKey && (
- <div className="mt-1 text-xs text-neutral-400">
+ <div className="mt-1 text-xs text-neutral-500 dark:text-neutral-400">
Property:{" "}
- <code className="text-xs bg-neutral-800 px-1 py-0.5 rounded text-neutral-100">
+ <code className="text-xs bg-neutral-200 dark:bg-neutral-800 px-1 py-0.5 rounded text-neutral-900 dark:text-neutral-100">
{goal.config.eventPropertyKey}: {String(goal.config.eventPropertyValue)}
</code>
</div>
@@ -121,11 +121,11 @@ export default function GoalCard({ goal, siteId }: GoalCardProps) {
<div className="grid grid-cols-2 gap-4">
<div className="text-center">
<div className="font-bold text-base">{goal.total_conversions.toLocaleString()}</div>
- <div className="text-xs text-neutral-400">Conversions</div>
+ <div className="text-xs text-neutral-500 dark:text-neutral-400">Conversions</div>
</div>
<div className="text-center">
<div className="font-bold text-base">{(goal.conversion_rate * 100).toFixed(2)}%</div>
- <div className="text-xs text-neutral-400">Conversion Rate</div>
+ <div className="text-xs text-neutral-500 dark:text-neutral-400">Conversion Rate</div>
</div>
</div>
</div>
@@ -199,7 +199,7 @@ export default function GoalCard({ goal, siteId }: GoalCardProps) {
</div>
</div>
<div className="relative">
- <div className="bg-neutral-700 h-1.5 w-full absolute bottom-0 left-0"></div>
+ <div className="bg-neutral-300 dark:bg-neutral-700 h-1.5 w-full absolute bottom-0 left-0"></div>
<div
style={{
width: goal.conversion_rate * 100 + "%",
@@ -210,8 +210,8 @@ export default function GoalCard({ goal, siteId }: GoalCardProps) {
{/* Expanded Sessions Section */}
{isExpanded && (
- <div className="border-t border-neutral-800 bg-neutral-900/50 p-4">
- <h4 className="text-sm font-medium text-neutral-200 mb-3">Converted Sessions</h4>
+ <div className="border-t border-neutral-100 dark:border-neutral-800 bg-neutral-50 dark:bg-neutral-900/50 p-4">
+ <h4 className="text-sm font-medium text-neutral-700 dark:text-neutral-200 mb-3">Converted Sessions</h4>
<SessionsList
sessions={sessions}
isLoading={isLoadingSessions}
diff --git a/client/src/app/[site]/goals/page.tsx b/client/src/app/[site]/goals/page.tsx
index c66a68733..e1879f0f3 100644
--- a/client/src/app/[site]/goals/page.tsx
+++ b/client/src/app/[site]/goals/page.tsx
@@ -16,16 +16,16 @@ import { Input } from "@/components/ui/input";
// Goal card skeleton component
const GoalCardSkeleton = () => (
- <div className="rounded-lg bg-neutral-900 border border-neutral-800 overflow-hidden relative animate-pulse">
+ <div className="rounded-lg bg-white dark:bg-neutral-900 border border-neutral-100 dark:border-neutral-800 overflow-hidden relative animate-pulse">
<div className="px-4 py-3 flex items-center mb-1">
{/* Left section skeleton */}
<div className="flex-1 pr-4">
<div className="flex items-center gap-2">
- <div className="w-4 h-4 bg-neutral-800 rounded-full"></div>
- <div className="h-5 bg-neutral-800 rounded w-36"></div>
+ <div className="w-4 h-4 bg-neutral-200 dark:bg-neutral-800 rounded-full"></div>
+ <div className="h-5 bg-neutral-200 dark:bg-neutral-800 rounded w-36"></div>
</div>
<div className="mt-2">
- <div className="h-4 bg-neutral-800 rounded w-48 mt-1"></div>
+ <div className="h-4 bg-neutral-200 dark:bg-neutral-800 rounded w-48 mt-1"></div>
</div>
</div>
@@ -33,26 +33,26 @@ const GoalCardSkeleton = () => (
<div className="flex-1 flex justify-center">
<div className="grid grid-cols-2 gap-4 w-full">
<div className="text-center">
- <div className="h-5 bg-neutral-800 rounded w-12 mx-auto"></div>
- <div className="h-3 bg-neutral-800 rounded w-16 mx-auto mt-1"></div>
+ <div className="h-5 bg-neutral-200 dark:bg-neutral-800 rounded w-12 mx-auto"></div>
+ <div className="h-3 bg-neutral-200 dark:bg-neutral-800 rounded w-16 mx-auto mt-1"></div>
</div>
<div className="text-center">
- <div className="h-5 bg-neutral-800 rounded w-12 mx-auto"></div>
- <div className="h-3 bg-neutral-800 rounded w-16 mx-auto mt-1"></div>
+ <div className="h-5 bg-neutral-200 dark:bg-neutral-800 rounded w-12 mx-auto"></div>
+ <div className="h-3 bg-neutral-200 dark:bg-neutral-800 rounded w-16 mx-auto mt-1"></div>
</div>
</div>
</div>
{/* Right section skeleton */}
<div className="flex flex-shrink-0 gap-1 pl-4">
- <div className="w-7 h-7 bg-neutral-800 rounded"></div>
- <div className="w-7 h-7 bg-neutral-800 rounded"></div>
- <div className="w-7 h-7 bg-neutral-800 rounded"></div>
- <div className="w-7 h-7 bg-neutral-800 rounded"></div>
+ <div className="w-7 h-7 bg-neutral-200 dark:bg-neutral-800 rounded"></div>
+ <div className="w-7 h-7 bg-neutral-200 dark:bg-neutral-800 rounded"></div>
+ <div className="w-7 h-7 bg-neutral-200 dark:bg-neutral-800 rounded"></div>
+ <div className="w-7 h-7 bg-neutral-200 dark:bg-neutral-800 rounded"></div>
</div>
</div>
- <div className="bg-neutral-700 h-1.5 w-full absolute bottom-0 left-0"></div>
- <div className="bg-neutral-800 h-1.5 w-1/3 absolute bottom-0 left-0"></div>
+ <div className="bg-neutral-300 dark:bg-neutral-700 h-1.5 w-full absolute bottom-0 left-0"></div>
+ <div className="bg-neutral-200 dark:bg-neutral-800 h-1.5 w-1/3 absolute bottom-0 left-0"></div>
</div>
);
diff --git a/client/src/app/[site]/gsc/select-property/page.tsx b/client/src/app/[site]/gsc/select-property/page.tsx
index 096a158e6..578e739f3 100644
--- a/client/src/app/[site]/gsc/select-property/page.tsx
+++ b/client/src/app/[site]/gsc/select-property/page.tsx
@@ -79,11 +79,11 @@ export default function SelectGSCPropertyPage() {
{properties.map(property => (
<div
key={property}
- className="flex items-center space-x-2 border-neutral-200 rounded-lg p-4 hover:bg-neutral-800/30"
+ className="flex items-center space-x-2 border border-neutral-100 dark:border-neutral-200 rounded-lg p-4 hover:bg-neutral-50 dark:hover:bg-neutral-800/30"
>
<RadioGroupItem value={property} id={property} />
<Label htmlFor={property} className="flex-1 cursor-pointer">
- <div className="font-medium text-white">
+ <div className="font-medium text-neutral-900 dark:text-white">
{property.startsWith("sc-domain:") ? property.replace("sc-domain:", "") : property}
</div>
<div className="text-xs text-muted-foreground">
diff --git a/client/src/app/[site]/journeys/components/SankeyDiagram.tsx b/client/src/app/[site]/journeys/components/SankeyDiagram.tsx
index 26b841b11..1c2381db4 100644
--- a/client/src/app/[site]/journeys/components/SankeyDiagram.tsx
+++ b/client/src/app/[site]/journeys/components/SankeyDiagram.tsx
@@ -1,6 +1,7 @@
"use client";
import * as d3 from "d3";
+import { useTheme } from "next-themes";
import { useEffect, useRef } from "react";
const MAX_LINK_HEIGHT = 100;
@@ -20,10 +21,19 @@ interface SankeyDiagramProps {
export function SankeyDiagram({ journeys, steps, maxJourneys, domain }: SankeyDiagramProps) {
const svgRef = useRef<SVGSVGElement>(null);
+ const { theme } = useTheme();
useEffect(() => {
if (!journeys || !svgRef.current || !domain) return;
+ // Define theme-based colors
+ const isDark = theme === "dark";
+ const linkColor = isDark ? "hsl(var(--neutral-500))" : "hsl(var(--neutral-400))";
+ const nodeBubbleBg = isDark ? "hsl(var(--neutral-850))" : "hsl(var(--neutral-100))";
+ const nodeBubbleBorder = isDark ? "hsl(var(--neutral-700))" : "hsl(var(--neutral-200))";
+ const pathTextColor = isDark ? "white" : "hsl(var(--neutral-900))";
+ const countTextColor = isDark ? "hsl(var(--neutral-300))" : "hsl(var(--neutral-600))";
+
const svg = d3.select(svgRef.current);
svg.selectAll("*").remove();
@@ -217,7 +227,7 @@ export function SankeyDiagram({ journeys, steps, maxJourneys, domain }: SankeyDi
${targetX},${targetY}`;
})
.attr("fill", "none")
- .attr("stroke", "hsl(var(--neutral-500))")
+ .attr("stroke", linkColor)
.attr("stroke-width", d => linkWidthScale(d.value))
.attr("opacity", 0.2)
.attr("data-source", d => d.source)
@@ -250,7 +260,7 @@ export function SankeyDiagram({ journeys, steps, maxJourneys, domain }: SankeyDi
const linkSource = d3.select(this).attr("data-source");
const linkTarget = d3.select(this).attr("data-target");
const thisLinkId = `${linkSource}|||${linkTarget}`;
- return connectedLinkIds.has(thisLinkId) ? "hsl(var(--emerald-600))" : "hsl(var(--neutral-500))";
+ return connectedLinkIds.has(thisLinkId) ? "hsl(var(--emerald-600))" : linkColor;
});
d3.selectAll(".node-rect").attr("opacity", function (nodeData: any) {
@@ -266,7 +276,7 @@ export function SankeyDiagram({ journeys, steps, maxJourneys, domain }: SankeyDi
});
})
.on("mouseleave", function () {
- d3.selectAll(".link").attr("opacity", 0.2).attr("stroke", "hsl(var(--neutral-500))");
+ d3.selectAll(".link").attr("opacity", 0.2).attr("stroke", linkColor);
d3.selectAll(".node-rect").attr("opacity", 1);
d3.selectAll(".node-bubble").attr("opacity", 1);
d3.selectAll(".node-text").attr("opacity", 1);
@@ -306,8 +316,8 @@ export function SankeyDiagram({ journeys, steps, maxJourneys, domain }: SankeyDi
return textWidth + 10;
})
.attr("height", 41)
- .attr("fill", "hsl(var(--neutral-850))")
- .attr("stroke", "hsl(var(--neutral-700))")
+ .attr("fill", nodeBubbleBg)
+ .attr("stroke", nodeBubbleBorder)
.attr("stroke-width", 1)
.attr("rx", 4)
.attr("ry", 4)
@@ -327,7 +337,7 @@ export function SankeyDiagram({ journeys, steps, maxJourneys, domain }: SankeyDi
.attr("y", 21)
.text(d => d.name)
.attr("font-size", "12px")
- .attr("fill", "white")
+ .attr("fill", pathTextColor)
.attr("text-anchor", "start")
.style("text-decoration", "none");
@@ -348,7 +358,7 @@ export function SankeyDiagram({ journeys, steps, maxJourneys, domain }: SankeyDi
.attr("y", 37)
.text(d => `${d.count.toLocaleString()} (${d.percentage.toFixed(1)}%)`)
.attr("font-size", "11px")
- .attr("fill", "hsl(var(--neutral-300))")
+ .attr("fill", countTextColor)
.attr("text-anchor", "start");
// Node hover effects
@@ -394,7 +404,7 @@ export function SankeyDiagram({ journeys, steps, maxJourneys, domain }: SankeyDi
const linkSource = d3.select(this).attr("data-source");
const linkTarget = d3.select(this).attr("data-target");
const thisLinkId = `${linkSource}|||${linkTarget}`;
- return connectedLinkIds.has(thisLinkId) ? "hsl(var(--emerald-600))" : "hsl(var(--neutral-500))";
+ return connectedLinkIds.has(thisLinkId) ? "hsl(var(--emerald-600))" : linkColor;
});
d3.selectAll(".node-rect").attr("opacity", function (nodeData: any) {
@@ -410,12 +420,12 @@ export function SankeyDiagram({ journeys, steps, maxJourneys, domain }: SankeyDi
});
})
.on("mouseleave", function () {
- d3.selectAll(".link").attr("opacity", 0.2).attr("stroke", "hsl(var(--neutral-500))");
+ d3.selectAll(".link").attr("opacity", 0.2).attr("stroke", linkColor);
d3.selectAll(".node-rect").attr("opacity", 1);
d3.selectAll(".node-bubble").attr("opacity", 1);
d3.selectAll(".node-text").attr("opacity", 1);
});
- }, [journeys, steps, maxJourneys, domain]);
+ }, [journeys, steps, maxJourneys, domain, theme]);
return (
<div className="overflow-x-auto w-full">
diff --git a/client/src/app/[site]/journeys/page.tsx b/client/src/app/[site]/journeys/page.tsx
index db6319285..534c9a670 100644
--- a/client/src/app/[site]/journeys/page.tsx
+++ b/client/src/app/[site]/journeys/page.tsx
@@ -40,7 +40,7 @@ export default function JourneysPage() {
<SubHeader availableFilters={JOURNEY_PAGE_FILTERS} />
<div className="flex items-center gap-6 mb-2">
<div className="flex items-center gap-3 w-[180px]">
- <span className="text-sm text-neutral-300 whitespace-nowrap">{steps} steps</span>
+ <span className="text-sm text-neutral-600 dark:text-neutral-300 whitespace-nowrap">{steps} steps</span>
<Slider
value={[steps]}
onValueChange={([value]) => setSteps(value)}
@@ -51,7 +51,9 @@ export default function JourneysPage() {
/>
</div>
<div className="flex items-center gap-3 w-[200px]">
- <span className="text-sm text-neutral-300 whitespace-nowrap">{maxJourneys} journeys</span>
+ <span className="text-sm text-neutral-600 dark:text-neutral-300 whitespace-nowrap">
+ {maxJourneys} journeys
+ </span>
<Slider
value={[maxJourneys]}
onValueChange={([value]) => setMaxJourneys(value)}
@@ -66,10 +68,10 @@ export default function JourneysPage() {
{siteMetadata?.domain ? (
<div className="relative">
{isLoading && (
- <div className="absolute inset-0 bg-neutral-900/30 backdrop-blur-sm z-10 flex items-center justify-center">
+ <div className="absolute inset-0 bg-white/30 dark:bg-neutral-900/30 backdrop-blur-sm z-10 flex items-center justify-center">
<div className="flex flex-col items-center gap-2">
<div className="h-8 w-8 rounded-full border-2 border-accent-400 border-t-transparent animate-spin"></div>
- <span className="text-sm text-neutral-300">Loading journey data...</span>
+ <span className="text-sm text-neutral-600 dark:text-neutral-300">Loading journey data...</span>
</div>
</div>
)}
@@ -77,15 +79,15 @@ export default function JourneysPage() {
{Array.from({ length: steps }, (_, i) => (
<div
key={i}
- className="flex-1 h-10 bg-neutral-800 flex items-center text-white text-sm relative px-3"
+ className="flex-1 h-10 bg-neutral-200 dark:bg-neutral-800 flex items-center text-neutral-900 dark:text-white text-sm relative px-3"
style={{
clipPath: "polygon(0 0, 10px 50%, 0 100%, calc(100% - 10px) 100%, 100% 50%, calc(100% - 10px) 0)",
}}
>
- <span className="ml-2 whitespace-nowrap text-neutral-200">Step {i + 1}</span>
+ <span className="ml-2 whitespace-nowrap text-neutral-700 dark:text-neutral-200">Step {i + 1}</span>
<Input
inputSize="sm"
- placeholder="path filter"
+ placeholder="Path filter"
value={stepFilters[i] || ""}
onChange={e => {
const newFilters = { ...stepFilters };
@@ -96,7 +98,7 @@ export default function JourneysPage() {
}
setStepFilters(newFilters);
}}
- className="h-7 bg-neutral-900 border-neutral-700 text-white placeholder:text-neutral-500 ml-3 mr-3"
+ className="h-7 bg-white bg-neutral-50 dark:bg-neutral-850 border-neutral-200 dark:border-neutral-700 text-neutral-900 dark:text-white placeholder:text-neutral-400 dark:placeholder:text-neutral-500 ml-3 mr-3"
/>
</div>
))}
diff --git a/client/src/app/[site]/layout.tsx b/client/src/app/[site]/layout.tsx
index f41f6946b..6625cafd7 100644
--- a/client/src/app/[site]/layout.tsx
+++ b/client/src/app/[site]/layout.tsx
@@ -3,7 +3,6 @@ import { useWindowSize } from "@uidotdev/usehooks";
import { usePathname } from "next/navigation";
import { useEffect } from "react";
import { AppSidebar } from "../../components/AppSidebar";
-import { TopBar } from "../../components/TopBar";
import { useStore } from "../../lib/store";
import { useSyncStateWithUrl } from "../../lib/urlParams";
import { Footer } from "../components/Footer";
diff --git a/client/src/app/[site]/main/components/MainSection/Chart.tsx b/client/src/app/[site]/main/components/MainSection/Chart.tsx
index 237e5fc0c..c3671a795 100644
--- a/client/src/app/[site]/main/components/MainSection/Chart.tsx
+++ b/client/src/app/[site]/main/components/MainSection/Chart.tsx
@@ -1,7 +1,8 @@
"use client";
import { TimeBucket } from "@rybbit/shared";
-import { nivoTheme } from "@/lib/nivo";
+import { getNivoTheme } from "@/lib/nivo";
import { StatType, useStore } from "@/lib/store";
+import { useTheme } from "next-themes";
import { LineCustomSvgLayer, LineCustomSvgLayerProps, LineSeries, ResponsiveLine } from "@nivo/line";
import { useWindowSize } from "@uidotdev/usehooks";
import { DateTime } from "luxon";
@@ -10,6 +11,7 @@ import { APIResponse } from "../../../../../api/types";
import { Time } from "../../../../../components/DateSelector/types";
import { formatSecondsAsMinutesAndSeconds, formatter } from "../../../../../lib/utils";
import { userLocale, hour12, formatChartDateTime } from "../../../../../lib/dateTimeUtils";
+import { ChartTooltip } from "../../../../../components/charts/ChartTooltip";
const getMax = (time: Time, bucket: TimeBucket) => {
const now = DateTime.now();
@@ -128,6 +130,8 @@ export function Chart({
}) {
const { time, bucket, selectedStat } = useStore();
const { width } = useWindowSize();
+ const { theme } = useTheme();
+ const nivoTheme = getNivoTheme(theme === "dark");
const maxTicks = Math.round((width ?? Infinity) / 75);
@@ -321,7 +325,7 @@ export function Chart({
const diffPercentage = previousY ? (diff / previousY) * 100 : null;
return (
- <div className="text-sm bg-neutral-850 rounded-lg border border-neutral-750">
+ <ChartTooltip>
{diffPercentage !== null && (
<div
className="text-base font-medium px-2 pt-1.5 pb-1"
@@ -333,7 +337,7 @@ export function Chart({
{diffPercentage.toFixed(2)}%
</div>
)}
- <div className="w-full h-[1px] bg-neutral-750"></div>
+ <div className="w-full h-[1px] bg-neutral-100 dark:bg-neutral-750"></div>
<div className="m-2">
<div className="flex justify-between text-sm w-40">
@@ -346,14 +350,14 @@ export function Chart({
{previousTime && (
<div className="flex justify-between text-sm text-muted-foreground">
<div className="flex items-center gap-2">
- <div className="w-1 h-3 rounded-[3px] bg-neutral-600" />
+ <div className="w-1 h-3 rounded-[3px] bg-neutral-200 dark:bg-neutral-750" />
{formatChartDateTime(previousTime, bucket)}
</div>
<div>{formatTooltipValue(previousY, selectedStat)}</div>
</div>
)}
</div>
- </div>
+ </ChartTooltip>
);
}}
layers={[
diff --git a/client/src/app/[site]/main/components/MainSection/MainSection.tsx b/client/src/app/[site]/main/components/MainSection/MainSection.tsx
index d84ff75c6..12086496f 100644
--- a/client/src/app/[site]/main/components/MainSection/MainSection.tsx
+++ b/client/src/app/[site]/main/components/MainSection/MainSection.tsx
@@ -12,6 +12,7 @@ import { BucketSelection } from "../../../../../components/BucketSelection";
import { Chart } from "./Chart";
import { Overview } from "./Overview";
import { PreviousChart } from "./PreviousChart";
+import { RybbitLogo } from "../../../../../components/RybbitLogo";
const SELECTED_STAT_MAP = {
pageviews: "Pageviews",
@@ -77,11 +78,11 @@ export function MainSection() {
href={session.data ? "/" : "https://rybbit.com"}
className={cn("text-lg font-semibold flex items-center gap-1.5 opacity-75", tilt_wrap.className)}
>
- <Image src="/rybbit.svg" alt="Rybbit" width={20} height={20} />
+ <RybbitLogo width={20} height={20} />
rybbit.com
</Link>
</div>
- <span className="text-sm text-neutral-200">{SELECTED_STAT_MAP[selectedStat]}</span>
+ <span className="text-sm text-neutral-700 dark:text-neutral-200">{SELECTED_STAT_MAP[selectedStat]}</span>
<BucketSelection />
</div>
<div className="h-[200px] md:h-[290px] relative">
diff --git a/client/src/app/[site]/main/components/MainSection/Overview.tsx b/client/src/app/[site]/main/components/MainSection/Overview.tsx
index e228bf9e0..1892536b7 100644
--- a/client/src/app/[site]/main/components/MainSection/Overview.tsx
+++ b/client/src/app/[site]/main/components/MainSection/Overview.tsx
@@ -97,8 +97,8 @@ const Stat = ({
return (
<div
className={cn(
- "flex flex-col cursor-pointer border-r border-neutral-800 last:border-r-0 text-nowrap",
- selectedStat === id && "bg-neutral-850"
+ "flex flex-col cursor-pointer border-r border-neutral-100 dark:border-neutral-800 last:border-r-0 text-nowrap",
+ selectedStat === id && "bg-neutral-0 dark:bg-neutral-850"
)}
onClick={() => setSelectedStat(id)}
onMouseEnter={() => setIsHovering(true)}
diff --git a/client/src/app/[site]/main/components/MainSection/PreviousChart.tsx b/client/src/app/[site]/main/components/MainSection/PreviousChart.tsx
index 6414a6db3..6d40e2736 100644
--- a/client/src/app/[site]/main/components/MainSection/PreviousChart.tsx
+++ b/client/src/app/[site]/main/components/MainSection/PreviousChart.tsx
@@ -1,6 +1,7 @@
"use client";
-import { nivoTheme } from "@/lib/nivo";
+import { getNivoTheme } from "@/lib/nivo";
import { useStore } from "@/lib/store";
+import { useTheme } from "next-themes";
import { ResponsiveLine } from "@nivo/line";
import { DateTime } from "luxon";
import { GetOverviewBucketedResponse } from "../../../../../api/analytics/useGetOverviewBucketed";
@@ -43,6 +44,8 @@ export function PreviousChart({
max: number;
}) {
const { previousTime: time, selectedStat, bucket } = useStore();
+ const { theme } = useTheme();
+ const nivoTheme = getNivoTheme(theme === "dark");
const size = (data?.data.length ?? 0 / 2) + 1;
const formattedData = data?.data
@@ -125,7 +128,7 @@ export function PreviousChart({
animate={false}
// motionConfig="stiff"
enableSlices={"x"}
- colors={["hsl(var(--neutral-700))"]}
+ colors={[theme === "dark" ? "hsl(var(--neutral-700))" : "hsl(var(--neutral-100))"]}
/>
);
}
diff --git a/client/src/app/[site]/main/components/MainSection/SparklinesChart.tsx b/client/src/app/[site]/main/components/MainSection/SparklinesChart.tsx
index ae24c6c14..e8386f1a3 100644
--- a/client/src/app/[site]/main/components/MainSection/SparklinesChart.tsx
+++ b/client/src/app/[site]/main/components/MainSection/SparklinesChart.tsx
@@ -1,7 +1,8 @@
"use client";
-import { nivoTheme } from "@/lib/nivo";
+import { getNivoTheme } from "@/lib/nivo";
import { ResponsiveLine } from "@nivo/line";
import { DateTime } from "luxon";
+import { useTheme } from "next-themes";
export function SparklinesChart({
data,
@@ -10,6 +11,9 @@ export function SparklinesChart({
data: { value: number; time: string }[] | undefined;
isHovering: boolean;
}) {
+ const { theme } = useTheme();
+ const nivoTheme = getNivoTheme(theme === "dark");
+
const formattedData = data
?.map((e, i) => {
// filter out dates from the future
diff --git a/client/src/app/[site]/main/components/sections/Countries.tsx b/client/src/app/[site]/main/components/sections/Countries.tsx
index 7bff78e49..573666811 100644
--- a/client/src/app/[site]/main/components/sections/Countries.tsx
+++ b/client/src/app/[site]/main/components/sections/Countries.tsx
@@ -52,7 +52,7 @@ export function Countries() {
<TabsTrigger value="timezones">Timezones</TabsTrigger>
</TabsList>
{tab !== "map" && (
- <div className="w-8">
+ <div className="w-7">
<Button size="smIcon" onClick={() => setExpanded(!expanded)}>
<Expand className="w-4 h-4" />
</Button>
diff --git a/client/src/app/[site]/main/components/sections/Devices.tsx b/client/src/app/[site]/main/components/sections/Devices.tsx
index e951b87e8..de3a0f2de 100644
--- a/client/src/app/[site]/main/components/sections/Devices.tsx
+++ b/client/src/app/[site]/main/components/sections/Devices.tsx
@@ -31,7 +31,7 @@ export function Devices() {
<TabsTrigger value="dimensions">Screen Dimensions</TabsTrigger>
</TabsList>
</div>
- <div className="w-8">
+ <div className="w-7">
<Button size="smIcon" onClick={() => setExpanded(!expanded)}>
<Expand className="w-4 h-4" />
</Button>
diff --git a/client/src/app/[site]/main/components/sections/Events.tsx b/client/src/app/[site]/main/components/sections/Events.tsx
index 9757da518..1d3278cf4 100644
--- a/client/src/app/[site]/main/components/sections/Events.tsx
+++ b/client/src/app/[site]/main/components/sections/Events.tsx
@@ -22,7 +22,7 @@ function Events_() {
</div>
)}
<div className="relative max-h-[420px] overflow-y-auto">
- <div className="flex flex-row gap-2 justify-between pr-1 text-xs text-neutral-400 mb-2">
+ <div className="flex flex-row gap-2 justify-between pr-1 text-xs text-neutral-600 dark:text-neutral-400 mb-2">
<div>Custom Events</div>
<div>Count</div>
</div>
@@ -43,7 +43,7 @@ function OutboundLinks({ expanded, close }: { expanded: boolean; close: () => vo
</div>
)}
<div className="relative">
- <div className="flex flex-row gap-2 justify-between pr-1 text-xs text-neutral-400 mb-2">
+ <div className="flex flex-row gap-2 justify-between pr-1 text-xs text-neutral-600 dark:text-neutral-400 mb-2">
<div>Outbound Links</div>
<div>Clicks</div>
</div>
diff --git a/client/src/app/[site]/main/components/sections/Network.tsx b/client/src/app/[site]/main/components/sections/Network.tsx
index 8e41a0f76..150907bb3 100644
--- a/client/src/app/[site]/main/components/sections/Network.tsx
+++ b/client/src/app/[site]/main/components/sections/Network.tsx
@@ -45,7 +45,7 @@ export function Network() {
<TabsTrigger value="asn_domain">ASN Domain</TabsTrigger>
</TabsList>
</div>
- <div className="w-8">
+ <div className="w-7">
<Button size="smIcon" onClick={() => setExpanded(!expanded)}>
<Expand className="w-4 h-4" />
</Button>
diff --git a/client/src/app/[site]/main/components/sections/OutboundLinksDialog.tsx b/client/src/app/[site]/main/components/sections/OutboundLinksDialog.tsx
index 88db70cc0..daf0534a4 100644
--- a/client/src/app/[site]/main/components/sections/OutboundLinksDialog.tsx
+++ b/client/src/app/[site]/main/components/sections/OutboundLinksDialog.tsx
@@ -91,11 +91,11 @@ export function OutboundLinksDialog({ outboundLinks, expanded, close }: Outbound
<DialogTitle>Outbound Links</DialogTitle>
</DialogHeader>
<div className="relative mb-2">
- <Search className="absolute left-2.5 top-2.5 h-4 w-4 text-neutral-400" />
+ <Search className="absolute left-2.5 top-2.5 h-4 w-4 text-neutral-600 dark:text-neutral-400" />
<Input
type="text"
placeholder={`Filter ${outboundLinks.length} links...`}
- className="pl-9 bg-neutral-900 border-neutral-700 text-xs"
+ className="pl-9 bg-white dark:bg-neutral-900 border-neutral-200 dark:border-neutral-700 text-xs"
value={searchTerm}
onChange={e => setSearchTerm(e.target.value)}
/>
@@ -103,7 +103,7 @@ export function OutboundLinksDialog({ outboundLinks, expanded, close }: Outbound
<div className="flex flex-col gap-2 overflow-x-auto">
<div className="max-h-[80vh] overflow-y-auto">
<table className="w-full text-xs text-left min-w-max">
- <thead className="bg-neutral-900 text-neutral-400 sticky top-0 z-10">
+ <thead className="bg-neutral-100 dark:bg-neutral-900 text-neutral-600 dark:text-neutral-400 sticky top-0 z-10">
<tr>
<th
className="px-2 py-1 font-medium whitespace-nowrap text-left cursor-pointer select-none"
@@ -152,8 +152,8 @@ export function OutboundLinksDialog({ outboundLinks, expanded, close }: Outbound
<tr
key={`${row.url}-${rowIndex}`}
className={cn(
- "border-b border-neutral-800 hover:bg-neutral-850",
- rowIndex % 2 === 0 ? "bg-neutral-900" : "bg-neutral-950"
+ "border-b border-neutral-300 dark:border-neutral-800 hover:bg-neutral-150 dark:hover:bg-neutral-850",
+ rowIndex % 2 === 0 ? "bg-white dark:bg-neutral-900" : "bg-neutral-50 dark:bg-neutral-950"
)}
>
<td className="px-2 py-2">
@@ -169,7 +169,7 @@ export function OutboundLinksDialog({ outboundLinks, expanded, close }: Outbound
</a>
<a href={row.url} target="_blank" rel="noopener noreferrer" onClick={e => e.stopPropagation()}>
<SquareArrowOutUpRight
- className="ml-0.5 w-3.5 h-3.5 text-neutral-300 hover:text-neutral-100"
+ className="ml-0.5 w-3.5 h-3.5 text-neutral-600 hover:text-neutral-900 dark:text-neutral-300 dark:hover:text-neutral-100"
strokeWidth={3}
/>
</a>
@@ -177,7 +177,7 @@ export function OutboundLinksDialog({ outboundLinks, expanded, close }: Outbound
</td>
<td className="px-2 py-2 text-right">{row.count.toLocaleString()}</td>
<td className="px-2 py-2 text-right">{row.percentage.toFixed(1)}%</td>
- <td className="px-2 py-2 text-right text-neutral-300">
+ <td className="px-2 py-2 text-right text-neutral-600 dark:text-neutral-300">
{(() => {
try {
const dt = DateTime.fromSQL(row.lastClicked, { zone: "utc" }).toLocal();
@@ -193,13 +193,13 @@ export function OutboundLinksDialog({ outboundLinks, expanded, close }: Outbound
</table>
{filteredAll.length > visibleCount && (
<div ref={ref} className="py-4 flex justify-center">
- <div className="flex items-center gap-2 text-neutral-400 text-xs">
+ <div className="flex items-center gap-2 text-neutral-600 dark:text-neutral-400 text-xs">
<Loader2 className="h-4 w-4 animate-spin" />
Loading more...
</div>
</div>
)}
- {!hasMore && <div className="py-4 text-center text-neutral-500 text-xs">All items loaded</div>}
+ {!hasMore && <div className="py-4 text-center text-neutral-500 dark:text-neutral-500 text-xs">All items loaded</div>}
</div>
</div>
</DialogContent>
diff --git a/client/src/app/[site]/main/components/sections/Pages.tsx b/client/src/app/[site]/main/components/sections/Pages.tsx
index 324891175..06ef85ea4 100644
--- a/client/src/app/[site]/main/components/sections/Pages.tsx
+++ b/client/src/app/[site]/main/components/sections/Pages.tsx
@@ -33,7 +33,7 @@ export function Pages() {
<TabsTrigger value="hostname">Hostnames</TabsTrigger>
</TabsList>
</div>
- <div className="w-8">
+ <div className="w-7">
<Button size="smIcon" onClick={() => setExpanded(!expanded)}>
<Expand className="w-4 h-4" />
</Button>
diff --git a/client/src/app/[site]/main/components/sections/Referrers.tsx b/client/src/app/[site]/main/components/sections/Referrers.tsx
index d9917002f..729c4b1b4 100644
--- a/client/src/app/[site]/main/components/sections/Referrers.tsx
+++ b/client/src/app/[site]/main/components/sections/Referrers.tsx
@@ -32,7 +32,7 @@ export function Referrers() {
<TabsTrigger value="utm_content">Content</TabsTrigger>
</TabsList>
</div>
- <div className="w-8">
+ <div className="w-7">
<Button size="smIcon" onClick={() => setExpanded(!expanded)}>
<Expand className="w-4 h-4" />
</Button>
diff --git a/client/src/app/[site]/main/components/sections/SearchConsole.tsx b/client/src/app/[site]/main/components/sections/SearchConsole.tsx
index bc86a01c7..7f1e660b0 100644
--- a/client/src/app/[site]/main/components/sections/SearchConsole.tsx
+++ b/client/src/app/[site]/main/components/sections/SearchConsole.tsx
@@ -19,7 +19,7 @@ function ConnectPrompt() {
return (
<div className="flex flex-col items-center justify-center mt-12 gap-4">
- <div className="text-sm text-neutral-400 text-center max-w-sm">
+ <div className="text-sm text-neutral-600 dark:text-neutral-400 text-center max-w-sm">
Connect your Google Search Console account to view search performance data including top keywords and pages.
</div>
<Button onClick={() => connect()} disabled={isPending}>
@@ -54,7 +54,7 @@ function DataList({ dimension, label, renderName, expanded, close }: DataListPro
)}
<div className="flex flex-col gap-2 max-h-[344px] overflow-y-auto z-10">
<div className="flex flex-col gap-2 overflow-x-hidden">
- <div className="flex flex-row gap-2 justify-between pr-1 text-xs text-neutral-400">
+ <div className="flex flex-row gap-2 justify-between pr-1 text-xs text-neutral-600 dark:text-neutral-400">
<div className="flex flex-row gap-1 items-center">{label}</div>
<div className="flex flex-row gap-2">
<div className="w-20 text-right">Clicks</div>
@@ -67,7 +67,7 @@ function DataList({ dimension, label, renderName, expanded, close }: DataListPro
return (
<div
key={index}
- className="relative flex flex-row gap-2 justify-between pr-1 text-xs py-1 hover:bg-neutral-850 rounded px-2 group"
+ className="relative flex flex-row gap-2 justify-between pr-1 text-xs py-1 hover:bg-neutral-150 dark:hover:bg-neutral-850 rounded px-2 group"
>
<div
className="absolute inset-0 bg-dataviz py-2 opacity-25 rounded-md"
@@ -78,7 +78,9 @@ function DataList({ dimension, label, renderName, expanded, close }: DataListPro
</div>
<div className="flex flex-row gap-2 z-10">
<div className="w-28 text-right pr-1 flex flex-row gap-2 items-center justify-end">
- <div className="hidden group-hover:block text-neutral-400">{round(percentage * 100, 1)}%</div>
+ <div className="hidden group-hover:block text-neutral-600 dark:text-neutral-400">
+ {round(percentage * 100, 1)}%
+ </div>
{formatter(item.clicks)}
</div>
<div className="w-24 text-right pr-1">{formatter(item.impressions)}</div>
@@ -89,9 +91,9 @@ function DataList({ dimension, label, renderName, expanded, close }: DataListPro
) : isLoading ? (
<StandardSkeleton />
) : (
- <div className="text-neutral-300 w-full text-center mt-6 flex flex-row gap-2 items-center justify-center">
- <div className="text-neutral-500">
- <div className="text-neutral-300 w-full text-center flex flex-row gap-2 items-center justify-center">
+ <div className="text-neutral-600 dark:text-neutral-300 w-full text-center mt-6 flex flex-row gap-2 items-center justify-center">
+ <div className="text-neutral-500 dark:text-neutral-500">
+ <div className="text-neutral-600 dark:text-neutral-300 w-full text-center flex flex-row gap-2 items-center justify-center">
<Info className="w-5 h-5" />
No Data
</div>
@@ -130,7 +132,7 @@ export function SearchConsole() {
<TabsTrigger value="devices">Devices</TabsTrigger>
</TabsList>
</div>
- <div className="w-8">
+ <div className="w-7">
<Button size="smIcon" onClick={() => setExpanded(!expanded)}>
<Expand className="w-4 h-4" />
</Button>
@@ -174,7 +176,7 @@ export function SearchConsole() {
<span className="truncate">{new URL(name).pathname || "/"}</span>
<a href={name} target="_blank" rel="noopener noreferrer" className="flex-shrink-0">
<SquareArrowOutUpRight
- className="ml-0.5 w-3.5 h-3.5 text-neutral-300 hover:text-neutral-100"
+ className="ml-0.5 w-3.5 h-3.5 text-neutral-600 hover:text-neutral-900 dark:text-neutral-300 dark:hover:text-neutral-100"
strokeWidth={3}
/>
</a>
diff --git a/client/src/app/[site]/main/components/sections/SearchConsoleDialog.tsx b/client/src/app/[site]/main/components/sections/SearchConsoleDialog.tsx
index 863b33c42..7cce28c6d 100644
--- a/client/src/app/[site]/main/components/sections/SearchConsoleDialog.tsx
+++ b/client/src/app/[site]/main/components/sections/SearchConsoleDialog.tsx
@@ -98,7 +98,7 @@ export function SearchConsoleDialog({ title, dimension, renderName, expanded, cl
<Dialog open={expanded} onOpenChange={close}>
<DialogContent className="max-w-[1000px] w-[calc(100vw-2rem)] p-2 sm:p-4">
<div className="flex justify-center items-center h-40">
- <Loader2 className="h-8 w-8 animate-spin text-neutral-400" />
+ <Loader2 className="h-8 w-8 animate-spin text-neutral-600 dark:text-neutral-400" />
</div>
</DialogContent>
</Dialog>
@@ -112,11 +112,11 @@ export function SearchConsoleDialog({ title, dimension, renderName, expanded, cl
<DialogTitle>{title}</DialogTitle>
</DialogHeader>
<div className="relative">
- <Search className="absolute left-2.5 top-2.5 h-4 w-4 text-neutral-400" />
+ <Search className="absolute left-2.5 top-2.5 h-4 w-4 text-neutral-600 dark:text-neutral-400" />
<Input
type="text"
placeholder={`Filter ${data.length} items...`}
- className="pl-9 bg-neutral-900 border-neutral-700 text-xs"
+ className="pl-9 bg-white dark:bg-neutral-900 border-neutral-200 dark:border-neutral-700 text-xs"
value={searchTerm}
onChange={e => setSearchTerm(e.target.value)}
/>
@@ -124,7 +124,7 @@ export function SearchConsoleDialog({ title, dimension, renderName, expanded, cl
<div className="flex flex-col gap-2 overflow-x-auto">
<div className="max-h-[80vh] overflow-y-auto">
<table className="w-full text-xs text-left min-w-max">
- <thead className="bg-neutral-900 text-neutral-400 sticky top-0 z-10">
+ <thead className="bg-neutral-100 dark:bg-neutral-900 text-neutral-600 dark:text-neutral-400 sticky top-0 z-10">
{table.getHeaderGroups().map(headerGroup => (
<tr key={headerGroup.id}>
{headerGroup.headers.map((header, index) => (
@@ -157,8 +157,8 @@ export function SearchConsoleDialog({ title, dimension, renderName, expanded, cl
<tr
key={row.id}
className={cn(
- "border-b border-neutral-800 hover:bg-neutral-850",
- rowIndex % 2 === 0 ? "bg-neutral-900" : "bg-neutral-950"
+ "border-b border-neutral-300 dark:border-neutral-800 hover:bg-neutral-150 dark:hover:bg-neutral-850",
+ rowIndex % 2 === 0 ? "bg-white dark:bg-neutral-900" : "bg-neutral-50 dark:bg-neutral-950"
)}
>
{row.getVisibleCells().map((cell, cellIndex) => (
@@ -175,7 +175,7 @@ export function SearchConsoleDialog({ title, dimension, renderName, expanded, cl
</table>
{filteredData.length === 0 && (
- <div className="py-8 text-center text-neutral-500 text-xs">No results found</div>
+ <div className="py-8 text-center text-neutral-500 dark:text-neutral-500 text-xs">No results found</div>
)}
</div>
</div>
diff --git a/client/src/app/[site]/main/components/sections/Weekdays.tsx b/client/src/app/[site]/main/components/sections/Weekdays.tsx
index 8b43eee93..7f67d4ef4 100644
--- a/client/src/app/[site]/main/components/sections/Weekdays.tsx
+++ b/client/src/app/[site]/main/components/sections/Weekdays.tsx
@@ -81,7 +81,7 @@ export function Weekdays() {
// Get color intensity based on value
const getColorIntensity = (value: number) => {
- if (maxValue === 0 || !isFinite(value) || isNaN(value)) return "bg-neutral-800";
+ if (maxValue === 0 || !isFinite(value) || isNaN(value)) return "bg-neutral-200 dark:bg-neutral-800";
// Calculate intensity level 1-10
const ratio = value / maxValue;
@@ -172,7 +172,7 @@ export function Weekdays() {
{Array(24)
.fill(0)
.map((_, hour) => (
- <div key={hour} className="h-4 text-xs flex items-center justify-end pr-2 text-neutral-400">
+ <div key={hour} className="h-4 text-xs flex items-center justify-end pr-2 text-neutral-600 dark:text-neutral-400">
{hour % 2 === 1 ? hourLabels[hour] : ""}
</div>
))}
@@ -182,7 +182,7 @@ export function Weekdays() {
{/* Day labels */}
<div className="flex h-5">
{shortDayNames.map((day, i) => (
- <div key={i} className="flex-1 text-center text-xs text-neutral-400">
+ <div key={i} className="flex-1 text-center text-xs text-neutral-600 dark:text-neutral-400">
{day}
</div>
))}
@@ -203,7 +203,7 @@ export function Weekdays() {
heatmapData[day].length > hour
? heatmapData[day][hour]
: 0;
- const colorClass = value > 0 ? getColorIntensity(value) : "bg-neutral-800";
+ const colorClass = value > 0 ? getColorIntensity(value) : "bg-neutral-200 dark:bg-neutral-800";
return (
<Tooltip key={day}>
<TooltipTrigger asChild>
diff --git a/client/src/app/[site]/pages/components/PageListItem.tsx b/client/src/app/[site]/pages/components/PageListItem.tsx
index 560c2ee94..74e37ac4a 100644
--- a/client/src/app/[site]/pages/components/PageListItem.tsx
+++ b/client/src/app/[site]/pages/components/PageListItem.tsx
@@ -89,7 +89,7 @@ export function PageListItem({ pageData, isLoading = false }: PageListItemProps)
{/* Left side: Page title/path with thumbnail */}
<div className="flex gap-3 flex-1 min-w-0">
{thumbnailUrl && !isLoadingMetadata && (
- <div className="hidden sm:block flex-shrink-0 h-12 w-16 relative rounded-md overflow-hidden border border-neutral-800">
+ <div className="hidden sm:block flex-shrink-0 h-12 w-16 relative rounded-md overflow-hidden border border-neutral-100 dark:border-neutral-800">
<img
src={thumbnailUrl}
alt={`Thumbnail for ${pageData.title || pageData.value}`}
diff --git a/client/src/app/[site]/pages/components/PageListSkeleton.tsx b/client/src/app/[site]/pages/components/PageListSkeleton.tsx
index 6b129b2aa..1b7abb26c 100644
--- a/client/src/app/[site]/pages/components/PageListSkeleton.tsx
+++ b/client/src/app/[site]/pages/components/PageListSkeleton.tsx
@@ -17,7 +17,7 @@ export function PageListSkeleton({ count = 5 }: PageListSkeletonProps) {
{/* Left side: Page title/path with thumbnail skeleton */}
<div className="flex gap-3 flex-1 min-w-0">
{/* Thumbnail skeleton - conditionally shown like in PageListItem */}
- <div className="hidden sm:block flex-shrink-0 h-12 w-16 relative rounded-md overflow-hidden border border-neutral-800">
+ <div className="hidden sm:block flex-shrink-0 h-12 w-16 relative rounded-md overflow-hidden border border-neutral-100 dark:border-neutral-800">
<Skeleton className="w-full h-full" />
</div>
diff --git a/client/src/app/[site]/pages/components/PageSparklineChart.tsx b/client/src/app/[site]/pages/components/PageSparklineChart.tsx
index 69e42bde5..b631bd2c1 100644
--- a/client/src/app/[site]/pages/components/PageSparklineChart.tsx
+++ b/client/src/app/[site]/pages/components/PageSparklineChart.tsx
@@ -6,6 +6,7 @@ import { hour12, userLocale } from "@/lib/dateTimeUtils";
import { nivoTheme } from "@/lib/nivo";
import { ResponsiveLine } from "@nivo/line";
import { DateTime } from "luxon";
+import { ChartTooltip } from "@/components/charts/ChartTooltip";
interface PageSparklineChartProps {
data: APIResponse<GetOverviewBucketedResponse> | undefined;
@@ -97,12 +98,14 @@ export function PageSparklineChart({ data, isHovering, pageTitle, isLoading }: P
const timestamp = point.data.time as DateTime;
return (
- <div className="text-sm bg-neutral-900 border border-neutral-700 p-2 rounded-md shadow-md">
- <div className="flex items-center justify-between gap-3">
- <div className="text-neutral-200">{formatDateTime(timestamp)}</div>
- <div className="font-medium">{value.toLocaleString()}</div>
+ <ChartTooltip>
+ <div className="p-2">
+ <div className="flex items-center justify-between gap-3">
+ <div>{formatDateTime(timestamp)}</div>
+ <div className="font-medium">{value.toLocaleString()}</div>
+ </div>
</div>
- </div>
+ </ChartTooltip>
);
}}
/>
diff --git a/client/src/app/[site]/performance/components/EnableWebVitals.tsx b/client/src/app/[site]/performance/components/EnableWebVitals.tsx
index 7288bb874..5cadd678c 100644
--- a/client/src/app/[site]/performance/components/EnableWebVitals.tsx
+++ b/client/src/app/[site]/performance/components/EnableWebVitals.tsx
@@ -17,7 +17,7 @@ export function EnableWebVitals() {
return (
<Alert className="p-4 bg-neutral-50/50 border-amber-200/50 dark:bg-neutral-800/25 dark:border-amber-600/80">
<div className="flex items-start space-x-3">
- <Gauge className="h-5 w-5 mt-0.5 text-neutral-100" />
+ <Gauge className="h-5 w-5 mt-0.5 text-amber-600 dark:text-neutral-100" />
<div className="flex-1">
<AlertTitle className="text-base font-semibold mb-1 text-neutral-700/90 dark:text-neutral-100">
Web Vitals Collection is Disabled
diff --git a/client/src/app/[site]/performance/components/PercentileSelector.tsx b/client/src/app/[site]/performance/components/PercentileSelector.tsx
index d42af3ca4..8cb7c0169 100644
--- a/client/src/app/[site]/performance/components/PercentileSelector.tsx
+++ b/client/src/app/[site]/performance/components/PercentileSelector.tsx
@@ -28,7 +28,9 @@ export function PercentileSelector() {
onClick={() => setSelectedPercentile(option.value)}
className={cn(
"flex items-center space-x-1.5 px-2 py-1 rounded text-xs font-medium transition-all",
- isSelected ? "bg-neutral-800 text-white" : "bg-neutral-900 text-neutral-500 hover:text-neutral-400"
+ isSelected
+ ? "bg-neutral-200 dark:bg-neutral-800 text-neutral-900 dark:text-white"
+ : "bg-neutral-100 dark:bg-neutral-900 text-neutral-600 dark:text-neutral-500 hover:text-neutral-700 dark:hover:text-neutral-400"
)}
>
<div
diff --git a/client/src/app/[site]/performance/components/PerformanceChart.tsx b/client/src/app/[site]/performance/components/PerformanceChart.tsx
index 9c9add317..f3a8011e1 100644
--- a/client/src/app/[site]/performance/components/PerformanceChart.tsx
+++ b/client/src/app/[site]/performance/components/PerformanceChart.tsx
@@ -2,21 +2,23 @@
import { Card, CardContent, CardLoader } from "@/components/ui/card";
import { Skeleton } from "@/components/ui/skeleton";
-import { nivoTheme } from "@/lib/nivo";
+import { getNivoTheme } from "@/lib/nivo";
import { ResponsiveLine } from "@nivo/line";
import { DateTime } from "luxon";
import { Tilt_Warp } from "next/font/google";
-import Image from "next/image";
import Link from "next/link";
import { useState } from "react";
+import { useTheme } from "next-themes";
import { useGetPerformanceTimeSeries } from "../../../../api/analytics/performance/useGetPerformanceTimeSeries";
import { BucketSelection } from "../../../../components/BucketSelection";
+import { RybbitLogo } from "../../../../components/RybbitLogo";
import { authClient } from "../../../../lib/auth";
import { formatChartDateTime, hour12, userLocale } from "../../../../lib/dateTimeUtils";
import { useStore } from "../../../../lib/store";
import { cn } from "../../../../lib/utils";
import { usePerformanceStore } from "../performanceStore";
import { formatMetricValue, getMetricUnit, getPerformanceThresholds, METRIC_LABELS } from "../utils/performanceUtils";
+import { ChartTooltip } from "../../../../components/charts/ChartTooltip";
const tilt_wrap = Tilt_Warp({
subsets: ["latin"],
@@ -27,6 +29,8 @@ export function PerformanceChart() {
const session = authClient.useSession();
const { site, bucket } = useStore();
const { selectedPerformanceMetric, selectedPercentile } = usePerformanceStore();
+ const { theme } = useTheme();
+ const nivoTheme = getNivoTheme(theme === "dark");
// State for toggling percentile visibility
const [visiblePercentiles, setVisiblePercentiles] = useState<Set<string>>(new Set(["P50", "P75", "P90", "P99"]));
@@ -195,12 +199,14 @@ export function PerformanceChart() {
href={session.data ? "/" : "https://rybbit.com"}
className={cn("text-lg font-semibold flex items-center gap-1.5 opacity-75", tilt_wrap.className)}
>
- <Image src="/rybbit.svg" alt="Rybbit" width={20} height={20} />
+ <RybbitLogo width={20} height={20} />
rybbit.com
</Link>
</div>
<div className="flex items-center space-x-4">
- <span className="text-sm text-neutral-200">{METRIC_LABELS[selectedPerformanceMetric]}</span>
+ <span className="text-sm text-neutral-600 dark:text-neutral-200">
+ {METRIC_LABELS[selectedPerformanceMetric]}
+ </span>
<div className="flex items-center space-x-2">
{(["P50", "P75", "P90", "P99"] as const).map(percentile => {
const colors = {
@@ -217,7 +223,9 @@ export function PerformanceChart() {
onClick={() => togglePercentile(percentile)}
className={cn(
"flex items-center space-x-1.5 px-2 py-1 rounded text-xs font-medium transition-all",
- isVisible ? "bg-neutral-800 text-white" : "bg-neutral-900 text-neutral-500 hover:text-neutral-400"
+ isVisible
+ ? "bg-neutral-150 dark:bg-neutral-800 text-neutral-900 dark:text-white"
+ : "bg-neutral-50 dark:bg-neutral-900 text-neutral-600 dark:text-neutral-500 hover:text-neutral-700 dark:hover:text-neutral-400"
)}
>
<div
@@ -294,29 +302,31 @@ export function PerformanceChart() {
const currentTime = DateTime.fromJSDate(new Date(slice.points[0].data.x));
return (
- <div className="text-sm bg-neutral-850 p-3 rounded-lg min-w-[150px] border border-neutral-750">
- {formatChartDateTime(currentTime, bucket)}
- <div className="space-y-2 mt-2">
- {slice.points.map((point: any) => {
- return (
- <div key={point.seriesId} className="flex justify-between items-center">
- <div className="flex items-center gap-2">
- <div className="w-1 h-3 rounded-[3px]" style={{ backgroundColor: point.seriesColor }} />
- <span className="text-neutral-200">{point.seriesId}</span>
- </div>
- <span>
- <span className="text-white">
- {formatMetricValue(selectedPerformanceMetric, Number(point.data.yFormatted))}
- </span>
- <span className="text-neutral-300">
- {getMetricUnit(selectedPerformanceMetric, Number(point.data.yFormatted))}
+ <ChartTooltip>
+ <div className="p-3 min-w-[150px]">
+ <div className="mb-2">{formatChartDateTime(currentTime, bucket)}</div>
+ <div className="space-y-2">
+ {slice.points.map((point: any) => {
+ return (
+ <div key={point.seriesId} className="flex justify-between items-center">
+ <div className="flex items-center gap-2">
+ <div className="w-1 h-3 rounded-[3px]" style={{ backgroundColor: point.seriesColor }} />
+ <span>{point.seriesId}</span>
+ </div>
+ <span>
+ <span className="font-medium">
+ {formatMetricValue(selectedPerformanceMetric, Number(point.data.yFormatted))}
+ </span>
+ <span className="text-muted-foreground">
+ {getMetricUnit(selectedPerformanceMetric, Number(point.data.yFormatted))}
+ </span>
</span>
- </span>
- </div>
- );
- })}
+ </div>
+ );
+ })}
+ </div>
</div>
- </div>
+ </ChartTooltip>
);
}}
/>
diff --git a/client/src/app/[site]/performance/components/PerformanceMap.tsx b/client/src/app/[site]/performance/components/PerformanceMap.tsx
index de34833db..a369db5b4 100644
--- a/client/src/app/[site]/performance/components/PerformanceMap.tsx
+++ b/client/src/app/[site]/performance/components/PerformanceMap.tsx
@@ -311,10 +311,10 @@ export function PerformanceMap({ height }: { height: string }) {
ref={ref}
>
{isLoadingData && (
- <div className="absolute inset-0 bg-neutral-900/30 backdrop-blur-sm z-10 flex items-center justify-center">
+ <div className="absolute inset-0 bg-neutral-100/30 dark:bg-neutral-900/30 backdrop-blur-sm z-10 flex items-center justify-center">
<div className="flex flex-col items-center gap-2">
<div className="h-8 w-8 rounded-full border-2 border-accent-400 border-t-transparent animate-spin"></div>
- <span className="text-sm text-neutral-300">Loading performance data...</span>
+ <span className="text-sm text-neutral-600 dark:text-neutral-300">Loading performance data...</span>
</div>
</div>
)}
@@ -330,7 +330,7 @@ export function PerformanceMap({ height }: { height: string }) {
/>
{tooltipContent && (
<div
- className="fixed z-50 bg-neutral-1000 text-white rounded-md p-3 shadow-lg text-sm pointer-events-none max-w-xs"
+ className="fixed z-50 bg-white dark:bg-neutral-1000 text-neutral-900 dark:text-white rounded-md p-3 shadow-lg text-sm pointer-events-none max-w-xs border border-neutral-300 dark:border-transparent"
style={{
left: tooltipPosition.x,
top: tooltipPosition.y - 10,
@@ -345,7 +345,7 @@ export function PerformanceMap({ height }: { height: string }) {
{tooltipContent.eventCount > 0 ? (
<>
<div className="mb-2">
- <span className="text-neutral-300">{tooltipContent.metricName}: </span>
+ <span className="text-neutral-600 dark:text-neutral-300">{tooltipContent.metricName}: </span>
{tooltipContent.metricValue !== null ? (
<span className="font-bold text-accent-400">
{formatMetricValue(selectedPerformanceMetric, tooltipContent.metricValue)}
@@ -357,14 +357,14 @@ export function PerformanceMap({ height }: { height: string }) {
</div>
<div className="text-xs">
- <div className="text-neutral-300">
+ <div className="text-neutral-600 dark:text-neutral-300">
<span className="font-bold text-accent-400">{tooltipContent.eventCount.toLocaleString()}</span>{" "}
performance events
</div>
</div>
</>
) : (
- <div className="text-neutral-400 text-xs">No performance data available</div>
+ <div className="text-neutral-500 dark:text-neutral-400 text-xs">No performance data available</div>
)}
</div>
)}
diff --git a/client/src/app/[site]/performance/components/PerformanceOverview.tsx b/client/src/app/[site]/performance/components/PerformanceOverview.tsx
index d3507b1f8..57fab4992 100644
--- a/client/src/app/[site]/performance/components/PerformanceOverview.tsx
+++ b/client/src/app/[site]/performance/components/PerformanceOverview.tsx
@@ -53,8 +53,8 @@ const Stat = ({
return (
<div
className={cn(
- "flex flex-col cursor-pointer border-r border-neutral-800 last:border-r-0 text-nowrap",
- selectedPerformanceMetric === id && "bg-neutral-850"
+ "flex flex-col cursor-pointer border-r border-neutral-100 dark:border-neutral-800 last:border-r-0 text-nowrap",
+ selectedPerformanceMetric === id && "bg-neutral-0 dark:bg-neutral-850"
)}
onClick={() => setSelectedPerformanceMetric(id)}
>
diff --git a/client/src/app/[site]/performance/components/PerformanceTable.tsx b/client/src/app/[site]/performance/components/PerformanceTable.tsx
index d4d2e2e7e..e2421d7ba 100644
--- a/client/src/app/[site]/performance/components/PerformanceTable.tsx
+++ b/client/src/app/[site]/performance/components/PerformanceTable.tsx
@@ -145,7 +145,7 @@ export function PerformanceTable({ dimension, title }: PerformanceTableProps) {
return (
<div
- className="text-white max-w-[300px] truncate flex items-center gap-2 cursor-pointer hover:underline"
+ className="text-neutral-900 dark:text-white max-w-[300px] truncate flex items-center gap-2 cursor-pointer hover:underline"
onClick={handleClick}
>
{dimension === "country" && value ? (
@@ -184,7 +184,7 @@ export function PerformanceTable({ dimension, title }: PerformanceTableProps) {
onClick={e => e.stopPropagation()}
>
<SquareArrowOutUpRight
- className="ml-0.5 w-3.5 h-3.5 text-neutral-300 hover:text-neutral-100"
+ className="ml-0.5 w-3.5 h-3.5 text-neutral-600 dark:text-neutral-300 hover:text-neutral-900 dark:hover:text-neutral-100"
strokeWidth={3}
/>
</a>
@@ -262,7 +262,7 @@ export function PerformanceTable({ dimension, title }: PerformanceTableProps) {
}),
columnHelper.accessor("event_count", {
header: "Events",
- cell: info => <div className="text-center text-neutral-300">{info.getValue()?.toLocaleString() ?? 0}</div>,
+ cell: info => <div className="text-center text-neutral-600 dark:text-neutral-300">{info.getValue()?.toLocaleString() ?? 0}</div>,
}),
],
[selectedPercentile]
@@ -321,33 +321,33 @@ export function PerformanceTable({ dimension, title }: PerformanceTableProps) {
{isLoading ? (
<Table>
<TableHeader>
- <TableRow className="border-neutral-800">
- <TableHead className="text-neutral-300">
+ <TableRow className="border-neutral-300 dark:border-neutral-800">
+ <TableHead className="text-neutral-600 dark:text-neutral-300">
<Skeleton className="h-4 w-20" />
</TableHead>
- <TableHead className="text-neutral-300 text-center">
+ <TableHead className="text-neutral-600 dark:text-neutral-300 text-center">
<Skeleton className="h-4 w-8 mx-auto" />
</TableHead>
- <TableHead className="text-neutral-300 text-center">
+ <TableHead className="text-neutral-600 dark:text-neutral-300 text-center">
<Skeleton className="h-4 w-8 mx-auto" />
</TableHead>
- <TableHead className="text-neutral-300 text-center">
+ <TableHead className="text-neutral-600 dark:text-neutral-300 text-center">
<Skeleton className="h-4 w-8 mx-auto" />
</TableHead>
- <TableHead className="text-neutral-300 text-center">
+ <TableHead className="text-neutral-600 dark:text-neutral-300 text-center">
<Skeleton className="h-4 w-8 mx-auto" />
</TableHead>
- <TableHead className="text-neutral-300 text-center">
+ <TableHead className="text-neutral-600 dark:text-neutral-300 text-center">
<Skeleton className="h-4 w-10 mx-auto" />
</TableHead>
- <TableHead className="text-neutral-300 text-center">
+ <TableHead className="text-neutral-600 dark:text-neutral-300 text-center">
<Skeleton className="h-4 w-12 mx-auto" />
</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{Array.from({ length: 10 }).map((_, i) => (
- <TableRow key={i} className="border-neutral-800">
+ <TableRow key={i} className="border-neutral-300 dark:border-neutral-800">
<TableCell>
<div className="flex items-center gap-2">
<Skeleton className="h-4 w-4 rounded" />
@@ -393,11 +393,11 @@ export function PerformanceTable({ dimension, title }: PerformanceTableProps) {
<Table>
<TableHeader>
{table.getHeaderGroups().map(headerGroup => (
- <TableRow key={headerGroup.id} className="border-neutral-800">
+ <TableRow key={headerGroup.id} className="border-neutral-300 dark:border-neutral-800">
{headerGroup.headers.map(header => (
<TableHead
key={header.id}
- className={`text-neutral-300 ${
+ className={`text-neutral-600 dark:text-neutral-300 ${
header.column.getCanSort()
? "cursor-pointer hover:text-white transition-colors select-none"
: ""
@@ -432,7 +432,7 @@ export function PerformanceTable({ dimension, title }: PerformanceTableProps) {
</TableRow>
) : (
table.getRowModel().rows.map(row => (
- <TableRow key={row.id} className="border-neutral-800 hover:bg-neutral-900/50">
+ <TableRow key={row.id} className="border-neutral-300 dark:border-neutral-800 hover:bg-neutral-100/50 dark:hover:bg-neutral-900/50">
{row.getVisibleCells().map(cell => (
<TableCell key={cell.id}>{flexRender(cell.column.columnDef.cell, cell.getContext())}</TableCell>
))}
diff --git a/client/src/app/[site]/performance/components/shared/MetricTooltip.tsx b/client/src/app/[site]/performance/components/shared/MetricTooltip.tsx
index 76eed21f7..76a244485 100644
--- a/client/src/app/[site]/performance/components/shared/MetricTooltip.tsx
+++ b/client/src/app/[site]/performance/components/shared/MetricTooltip.tsx
@@ -64,19 +64,19 @@ export function MetricTooltip({ metric, children }: MetricTooltipProps) {
return (
<Tooltip>
<TooltipTrigger asChild>
- {children || <HelpCircle className="h-3 w-3 text-neutral-300 hover:text-neutral-100 cursor-help" />}
+ {children || <HelpCircle className="h-3 w-3 text-neutral-600 dark:text-neutral-300 hover:text-neutral-900 dark:hover:text-neutral-100 cursor-help" />}
</TooltipTrigger>
<TooltipContent side="top" className="max-w-xs p-3">
<div className="space-y-2">
<div className="flex items-center justify-between">
- <span className="text-xs font-medium text-neutral-400 uppercase tracking-wide">
+ <span className="text-xs font-medium text-neutral-500 dark:text-neutral-400 uppercase tracking-wide">
{metricInfo.importance}
</span>
{metricInfo.importance === "Core Web Vital" && <div className="w-2 h-2 bg-blue-400 rounded-full"></div>}
</div>
- <p className="text-sm text-neutral-200 leading-relaxed">{metricInfo.description}</p>
- <div className="pt-1 border-t border-neutral-700">
- <p className="text-xs text-neutral-400 italic">{metricInfo.threshold}</p>
+ <p className="text-sm text-neutral-600 dark:text-neutral-200 leading-relaxed">{metricInfo.description}</p>
+ <div className="pt-1 border-t border-neutral-300 dark:border-neutral-700">
+ <p className="text-xs text-neutral-500 dark:text-neutral-400 italic">{metricInfo.threshold}</p>
</div>
</div>
</TooltipContent>
diff --git a/client/src/app/[site]/replay/components/EnableSessionReplay.tsx b/client/src/app/[site]/replay/components/EnableSessionReplay.tsx
index 2a74fe3a8..318d8a0a1 100644
--- a/client/src/app/[site]/replay/components/EnableSessionReplay.tsx
+++ b/client/src/app/[site]/replay/components/EnableSessionReplay.tsx
@@ -17,7 +17,7 @@ export function EnableSessionReplay() {
return (
<Alert className="p-4 bg-neutral-50/50 border-amber-200/50 dark:bg-neutral-800/25 dark:border-amber-600/80">
<div className="flex items-start space-x-3">
- <Video className="h-5 w-5 mt-0.5 text-neutral-100" />
+ <Video className="h-5 w-5 mt-0.5 text-amber-600 dark:text-neutral-100" />
<div className="flex-1">
<AlertTitle className="text-base font-semibold mb-1 text-neutral-700/90 dark:text-neutral-100">
Session Replay is Disabled
diff --git a/client/src/app/[site]/replay/components/ReplayBreadcrumbs.tsx b/client/src/app/[site]/replay/components/ReplayBreadcrumbs.tsx
index d896c5b10..183fcff9d 100644
--- a/client/src/app/[site]/replay/components/ReplayBreadcrumbs.tsx
+++ b/client/src/app/[site]/replay/components/ReplayBreadcrumbs.tsx
@@ -229,8 +229,8 @@ export function ReplayBreadcrumbs() {
if (isLoading || !data?.events) {
return (
- <div className="rounded-lg border border-neutral-800 p-4 flex items-center justify-center h-[calc(100vh-120px)]">
- <Loader2 className="w-6 h-6 animate-spin text-neutral-400" />
+ <div className="rounded-lg border border-neutral-100 dark:border-neutral-800 p-4 flex items-center justify-center h-[calc(100vh-120px)]">
+ <Loader2 className="w-6 h-6 animate-spin text-neutral-600 dark:text-neutral-400" />
</div>
);
}
@@ -255,7 +255,7 @@ export function ReplayBreadcrumbs() {
return (
<div className="flex flex-col gap-2">
- <div className="rounded-lg border border-neutral-800 bg-neutral-900 flex items-center justify-between gap-2 p-2 text-xs text-neutral-200">
+ <div className="rounded-lg border border-neutral-100 dark:border-neutral-800 bg-white dark:bg-neutral-900 flex items-center justify-between gap-2 p-2 text-xs text-neutral-900 dark:text-neutral-200">
<div className="flex items-center gap-2">
<Avatar id={data.metadata.user_id} size={20} />
{generateName(data.metadata.user_id)}
@@ -264,8 +264,8 @@ export function ReplayBreadcrumbs() {
<Button size="sm">View User</Button>
</Link>
</div>
- <div className="rounded-lg border border-neutral-800 flex flex-col">
- <div className="p-2 border-b border-neutral-800 bg-neutral-900 text-xs text-neutral-400">
+ <div className="rounded-lg border border-neutral-100 dark:border-neutral-800 flex flex-col">
+ <div className="p-2 border-b border-neutral-100 dark:border-neutral-800 bg-white dark:bg-neutral-900 text-xs text-neutral-600 dark:text-neutral-400">
{data.events.length} events captured ({groupedEvents.length} groups)
</div>
<ScrollArea className="h-[calc(100vh-215px)]">
@@ -283,26 +283,26 @@ export function ReplayBreadcrumbs() {
<div
key={`${group.startTime}-${index}`}
className={cn(
- "p-2 border-b border-neutral-800 bg-neutral-900",
- "hover:bg-neutral-800/80 transition-colors cursor-pointer",
+ "p-2 border-b border-neutral-100 dark:border-neutral-800 bg-white dark:bg-neutral-900",
+ "hover:bg-neutral-50 dark:hover:bg-neutral-800/80 transition-colors cursor-pointer",
"flex items-center gap-2 group"
)}
onClick={() => handleGroupClick(group)}
>
- <div className="text-xs text-neutral-400 w-10">
+ <div className="text-xs text-neutral-600 dark:text-neutral-400 w-10">
{Duration.fromMillis(startTimeMs).toFormat("mm:ss")}
</div>
<Icon className={cn("w-4 h-4 flex-shrink-0", color)} />
<div className="flex-1 min-w-0">
- <div className="text-xs text-neutral-200 font-medium truncate">{description}</div>
+ <div className="text-xs text-neutral-900 dark:text-neutral-200 font-medium truncate">{description}</div>
{group.count > 1 && durationMs > 0 && (
- <div className="text-xs text-neutral-500 mt-0.5">
+ <div className="text-xs text-neutral-500 dark:text-neutral-500 mt-0.5">
{Duration.fromMillis(durationMs).toFormat("s.SSS")}s duration
</div>
)}
</div>
{group.count > 5 && (
- <div className="text-xs text-neutral-500 bg-neutral-800 px-1.5 py-0.5 rounded">{group.count}</div>
+ <div className="text-xs text-neutral-700 dark:text-neutral-500 bg-neutral-100 dark:bg-neutral-800 px-1.5 py-0.5 rounded">{group.count}</div>
)}
</div>
);
diff --git a/client/src/app/[site]/replay/components/ReplayCard.tsx b/client/src/app/[site]/replay/components/ReplayCard.tsx
index ab5de8d63..cd8713a4d 100644
--- a/client/src/app/[site]/replay/components/ReplayCard.tsx
+++ b/client/src/app/[site]/replay/components/ReplayCard.tsx
@@ -79,9 +79,9 @@ export function ReplayCard({ replay }: { replay: SessionReplayListItem }) {
return (
<div
className={cn(
- "bg-neutral-900 border-b border-neutral-800 p-3 hover:bg-neutral-800/80 transition-colors cursor-pointer w-[200px] group relative",
+ "bg-white dark:bg-neutral-900 border-b border-neutral-100 dark:border-neutral-800 p-3 hover:bg-neutral-50 dark:hover:bg-neutral-800/80 transition-colors cursor-pointer w-[200px] group relative",
// "bg-neutral-900 border border-neutral-800 rounded-lg p-3 hover:bg-neutral-800/50 transition-colors cursor-pointer",
- sessionId === replay.session_id && "bg-neutral-800/80"
+ sessionId === replay.session_id && "bg-neutral-100 dark:bg-neutral-800/80"
)}
onClick={() => {
setSessionId(replay.session_id);
@@ -91,9 +91,9 @@ export function ReplayCard({ replay }: { replay: SessionReplayListItem }) {
{/* <div className="text-xs text-neutral-500">
{replay.user_id.slice(0, 12)}...
</div> */}
- <div className="text-xs text-neutral-400">{startTime.toRelative()}</div>
+ <div className="text-xs text-neutral-600 dark:text-neutral-400">{startTime.toRelative()}</div>
{duration && (
- <div className="flex items-center gap-1 text-neutral-400 text-xs">
+ <div className="flex items-center gap-1 text-neutral-600 dark:text-neutral-400 text-xs">
<Clock className="w-3 h-3" />
{formatDuration(duration)}
</div>
@@ -138,11 +138,11 @@ export function ReplayCard({ replay }: { replay: SessionReplayListItem }) {
</AlertDialog>
</div>
- <div className="text-xs text-neutral-200 truncate mb-2">
+ <div className="text-xs text-neutral-900 dark:text-neutral-200 truncate mb-2">
{replay.page_url.replace("https://", "").replace("http://", "").replace("www.", "")}
</div>
- <div className="flex items-center gap-2 text-sm text-neutral-400">
+ <div className="flex items-center gap-2 text-sm text-neutral-600 dark:text-neutral-400">
<CountryFlagTooltipIcon country={replay.country} city={replay.city} region={replay.region} />
<BrowserTooltipIcon browser={replay.browser} browser_version={replay.browser_version} />
<OperatingSystemTooltipIcon
@@ -155,7 +155,7 @@ export function ReplayCard({ replay }: { replay: SessionReplayListItem }) {
screen_height={replay.screen_height}
/>
- <Badge variant="outline" className="flex items-center gap-1 bg-neutral-800 text-gray-300">
+ <Badge variant="outline" className="flex items-center gap-1 bg-neutral-100 dark:bg-neutral-800 text-neutral-700 dark:text-gray-300">
<MousePointerClick className="w-4 h-4 text-amber-500" />
<span>{formatter(replay.event_count)}</span>
</Badge>
@@ -166,7 +166,7 @@ export function ReplayCard({ replay }: { replay: SessionReplayListItem }) {
export function ReplayCardSkeleton() {
return (
- <div className="bg-neutral-900 border-b border-neutral-800 p-3 hover:bg-neutral-800/80 transition-colors">
+ <div className="bg-white dark:bg-neutral-900 border-b border-neutral-100 dark:border-neutral-800 p-3 hover:bg-neutral-50 dark:hover:bg-neutral-800/80 transition-colors">
{/* Time and duration row */}
<div className="flex items-center gap-2 mb-1">
<Skeleton className="h-3 w-16" />
diff --git a/client/src/app/[site]/replay/components/ReplayList.tsx b/client/src/app/[site]/replay/components/ReplayList.tsx
index 57a8a0009..dfd1e2804 100644
--- a/client/src/app/[site]/replay/components/ReplayList.tsx
+++ b/client/src/app/[site]/replay/components/ReplayList.tsx
@@ -49,9 +49,9 @@ export function ReplayList() {
return (
<div className="flex flex-col gap-2">
- <div className="rounded-lg border border-neutral-800 bg-neutral-900 flex flex-col">
+ <div className="rounded-lg border border-neutral-100 dark:border-neutral-800 bg-white dark:bg-neutral-900 flex flex-col">
<div className="flex items-center gap-2 p-2">
- <div className="text-xs text-neutral-400">Min Duration</div>
+ <div className="text-xs text-neutral-600 dark:text-neutral-400">Min Duration</div>
<div className="flex items-center gap-1">
<Input
type="number"
@@ -60,11 +60,11 @@ export function ReplayList() {
onChange={e => setMinDuration(Number(e.target.value))}
className="w-16"
/>
- <div className="text-xs text-neutral-400">s</div>
+ <div className="text-xs text-neutral-600 dark:text-neutral-400">s</div>
</div>
</div>
</div>
- <div className="rounded-lg border border-neutral-800 flex flex-col">
+ <div className="rounded-lg border border-neutral-100 dark:border-neutral-800 flex flex-col">
<ScrollArea className="h-[calc(100vh-178px)]">
{isLoading ? (
Array.from({ length: 20 }).map((_, index) => <ReplayCardSkeleton key={`loading-${index}`} />)
@@ -83,13 +83,13 @@ export function ReplayList() {
{/* Infinite scroll anchor and loading indicator */}
<div ref={ref} className="py-3 flex justify-center">
{isFetchingNextPage && (
- <div className="flex items-center gap-2 text-neutral-400 text-xs">
+ <div className="flex items-center gap-2 text-neutral-600 dark:text-neutral-400 text-xs">
<Loader2 className="h-4 w-4 animate-spin" />
Loading more replays...
</div>
)}
{!hasNextPage && !isFetchingNextPage && flattenedData.length > 0 && (
- <div className="text-neutral-500 text-xs">All replays loaded</div>
+ <div className="text-neutral-500 dark:text-neutral-500 text-xs">All replays loaded</div>
)}
</div>
</>
diff --git a/client/src/app/[site]/replay/components/player/ReplayPlayer.tsx b/client/src/app/[site]/replay/components/player/ReplayPlayer.tsx
index b0eca1774..206903019 100644
--- a/client/src/app/[site]/replay/components/player/ReplayPlayer.tsx
+++ b/client/src/app/[site]/replay/components/player/ReplayPlayer.tsx
@@ -106,7 +106,7 @@ export function ReplayPlayer({ width, height }: { width: number; height: number
}
return (
- <div className="flex flex-col bg-neutral-950 overflow-hidden" style={{ width: width, height: height }}>
+ <div className="flex flex-col overflow-hidden" style={{ width: width, height: height }}>
<ReplayPlayerTopbar />
<ReplayPlayerCore data={data} width={width} height={height} onPlayPause={handlePlayPause} isPlaying={isPlaying} />
diff --git a/client/src/app/[site]/replay/components/player/ReplayPlayerControls.tsx b/client/src/app/[site]/replay/components/player/ReplayPlayerControls.tsx
index 89240def3..6d9730435 100644
--- a/client/src/app/[site]/replay/components/player/ReplayPlayerControls.tsx
+++ b/client/src/app/[site]/replay/components/player/ReplayPlayerControls.tsx
@@ -30,7 +30,7 @@ export function ReplayPlayerControls({
onSpeedChange,
}: ReplayPlayerControlsProps) {
return (
- <div className="border border-neutral-800 p-2 pb-3 bg-neutral-900 rounded-b-lg pt-6">
+ <div className="border border-neutral-100 dark:border-neutral-800 p-2 pb-3 bg-white dark:bg-neutral-900 rounded-b-lg pt-6">
<div className="flex items-center">
<Button variant="ghost" size="smIcon" onClick={onPlayPause} disabled={!player}>
{isPlaying ? (
@@ -51,7 +51,7 @@ export function ReplayPlayerControls({
className="w-full"
/>
</div>
- <div className="text-xs text-neutral-300 w-20 text-center">
+ <div className="text-xs text-neutral-700 dark:text-neutral-300 w-20 text-center">
{formatTime(currentTime)} / {formatTime(duration)}
</div>
diff --git a/client/src/app/[site]/replay/components/player/ReplayPlayerCore.tsx b/client/src/app/[site]/replay/components/player/ReplayPlayerCore.tsx
index 9ac462894..2c579eb14 100644
--- a/client/src/app/[site]/replay/components/player/ReplayPlayerCore.tsx
+++ b/client/src/app/[site]/replay/components/player/ReplayPlayerCore.tsx
@@ -16,7 +16,7 @@ export function ReplayPlayerCore({ data, width, height, onPlayPause, isPlaying }
<div className="flex-1 flex items-center justify-center overflow-hidden relative">
<div
ref={playerContainerRef}
- className="w-full bg-black rounded-lg shadow-2xl [&_.rr-player]:!bg-black"
+ className="w-full bg-black shadow-2xl [&_.rr-player]:!bg-black"
style={{
position: "relative",
}}
diff --git a/client/src/app/[site]/replay/components/player/ReplayPlayerTopbar.tsx b/client/src/app/[site]/replay/components/player/ReplayPlayerTopbar.tsx
index 77befd223..4d6089642 100644
--- a/client/src/app/[site]/replay/components/player/ReplayPlayerTopbar.tsx
+++ b/client/src/app/[site]/replay/components/player/ReplayPlayerTopbar.tsx
@@ -19,13 +19,13 @@ export function ReplayPlayerTopbar() {
if (!data?.metadata) {
return (
- <div className="border border-neutral-800 bg-neutral-900 px-2 py-2 rounded-t-lg overflow-hidden">
+ <div className="border border-neutral-200 dark:border-neutral-800 bg-neutral-50 dark:bg-neutral-900 px-2 py-2 rounded-t-lg overflow-hidden">
<div className="flex items-center justify-between min-w-0">
<div className="flex items-center gap-2 min-w-0 flex-1">
- <div className="h-4 w-32 bg-neutral-700 rounded animate-pulse" />
+ <div className="h-4 w-32 bg-neutral-150 dark:bg-neutral-700 rounded animate-pulse" />
</div>
<div className="flex items-center gap-1 flex-shrink-0 ml-2">
- <div className="h-4 w-24 bg-neutral-700 rounded animate-pulse" />
+ <div className="h-4 w-24 bg-neutral-150 dark:bg-neutral-700 rounded animate-pulse" />
</div>
</div>
</div>
@@ -70,11 +70,11 @@ export function ReplayPlayerTopbar() {
}, [pageViewEvents, currentTime, metadata.page_url]);
return (
- <div className="border border-neutral-800 bg-neutral-900 px-2 py-2 rounded-t-lg overflow-hidden">
+ <div className="border border-neutral-100 dark:border-neutral-800 bg-white dark:bg-neutral-900 px-2 py-2 rounded-t-lg overflow-hidden">
<div className="flex items-center justify-between min-w-0">
{/* Left side: Page path with external link */}
<Link
- className="text-xs text-neutral-300 truncate flex-1 min-w-0 flex items-center hover:underline"
+ className="text-xs text-neutral-700 dark:text-neutral-300 truncate flex-1 min-w-0 flex items-center hover:underline"
href={pageUrl}
target="_blank"
title={`Open ${pageUrl} in new tab`}
@@ -83,7 +83,7 @@ export function ReplayPlayerTopbar() {
</Link>
{/* Right side: Screen dimensions */}
- <div className="flex items-center gap-2 text-xs text-neutral-400 flex-shrink-0 ml-2">
+ <div className="flex items-center gap-2 text-xs text-neutral-600 dark:text-neutral-400 flex-shrink-0 ml-2">
<CountryFlagTooltipIcon
country={metadata.country}
city={metadata.city}
diff --git a/client/src/app/[site]/retention/RetentionChart.tsx b/client/src/app/[site]/retention/RetentionChart.tsx
index 4c22be346..3bf64534e 100644
--- a/client/src/app/[site]/retention/RetentionChart.tsx
+++ b/client/src/app/[site]/retention/RetentionChart.tsx
@@ -1,11 +1,12 @@
"use client";
-import { nivoTheme } from "@/lib/nivo";
+import { getNivoTheme } from "@/lib/nivo";
import { ResponsiveLine } from "@nivo/line";
import { DateTime } from "luxon";
import { useMemo } from "react";
import { ProcessedRetentionData, RetentionMode } from "../../../api/analytics/useGetRetention";
import { Skeleton } from "../../../components/ui/skeleton";
+import { useTheme } from "next-themes";
interface RetentionChartProps {
data: ProcessedRetentionData | undefined;
@@ -35,12 +36,12 @@ const cohortColors = [
const RetentionChartSkeleton = () => (
<div className="h-[400px] flex items-center justify-center">
<div className="w-full space-y-3">
- <Skeleton className="h-[300px] w-full bg-neutral-900 rounded-md animate-pulse" />
+ <Skeleton className="h-[300px] w-full bg-neutral-100 dark:bg-neutral-900 rounded-md animate-pulse" />
<div className="flex items-center justify-between px-6">
{Array.from({ length: 6 }).map((_, i) => (
<Skeleton
key={i}
- className="h-4 w-12 bg-neutral-700/50 animate-pulse"
+ className="h-4 w-12 bg-neutral-150/50 dark:bg-neutral-700/50 animate-pulse"
style={{
animationDelay: `${i * 100}ms`,
opacity: 0.3 + i * 0.1,
@@ -53,6 +54,9 @@ const RetentionChartSkeleton = () => (
);
export function RetentionChart({ data, isLoading, mode }: RetentionChartProps) {
+ const { theme } = useTheme();
+ const nivoTheme = getNivoTheme(theme === "dark");
+
// Get cohort keys once for both chart data and tooltip
const cohortKeys = useMemo(() => {
if (!data || !data.cohorts) return [];
@@ -109,7 +113,7 @@ export function RetentionChart({ data, isLoading, mode }: RetentionChartProps) {
if (!data || chartData.length === 0) {
return (
<div className="h-[400px] flex items-center justify-center">
- <div className="text-neutral-400 text-sm">No retention data available</div>
+ <div className="text-neutral-500 dark:text-neutral-400 text-sm">No retention data available</div>
</div>
);
}
@@ -180,7 +184,7 @@ export function RetentionChart({ data, isLoading, mode }: RetentionChartProps) {
},
},
],
- itemTextColor: "hsl(var(--neutral-200))",
+ itemTextColor: theme === "dark" ? "hsl(var(--neutral-200))" : "hsl(var(--neutral-700))",
},
]}
tooltip={({ point }) => {
@@ -212,11 +216,11 @@ export function RetentionChart({ data, isLoading, mode }: RetentionChartProps) {
}
return (
- <div className="text-sm bg-neutral-850 p-2 rounded-md border border-neutral-800 shadow-md">
+ <div className="text-sm bg-neutral-150 dark:bg-neutral-850 p-2 rounded-md border border-neutral-300 dark:border-neutral-800 shadow-md">
<div className="font-medium mb-1" style={{ color: point.seriesColor }}>
Cohort: {cohortDateDisplay}
</div>
- <div className="flex justify-between w-48 text-neutral-200">
+ <div className="flex justify-between w-48 text-neutral-700 dark:text-neutral-200">
<span>
{mode === "day" ? "Day" : "Week"} {xValue}
</span>
diff --git a/client/src/app/[site]/retention/page.tsx b/client/src/app/[site]/retention/page.tsx
index a2b3177c1..20ce81ad9 100644
--- a/client/src/app/[site]/retention/page.tsx
+++ b/client/src/app/[site]/retention/page.tsx
@@ -27,18 +27,18 @@ const RANGE_OPTIONS = [
];
// Dynamic color function that creates a smooth gradient based on retention percentage
-const getRetentionColor = (percentage: number | null): { backgroundColor: string; textColor: string } => {
+const getRetentionColor = (percentage: number | null, isDark: boolean): { backgroundColor: string; textColor: string } => {
if (percentage === null || isNaN(percentage)) {
return {
- backgroundColor: "rgb(38, 38, 38)", // bg-neutral-800
+ backgroundColor: isDark ? "rgb(38, 38, 38)" : "rgb(245, 245, 245)", // bg-neutral-800 : bg-neutral-100
textColor: "transparent",
};
}
if (percentage === 0) {
return {
- backgroundColor: "rgb(38, 38, 38)", // bg-neutral-800
- textColor: "white",
+ backgroundColor: isDark ? "rgb(38, 38, 38)" : "rgb(245, 245, 245)", // bg-neutral-800 : bg-neutral-100
+ textColor: isDark ? "white" : "black",
};
}
@@ -59,7 +59,7 @@ const getRetentionColor = (percentage: number | null): { backgroundColor: string
// Use the scaled opacity for the background color
return {
backgroundColor: `rgba(16, 185, 129, ${scaledOpacity.toFixed(2)})`,
- textColor: "white",
+ textColor: isDark ? "white" : "black",
};
};
@@ -71,6 +71,20 @@ export default function RetentionPage() {
// State for the data time range (days)
const [timeRange, setTimeRange] = useState<number>(30);
+ // Check if dark mode is active
+ const [isDark, setIsDark] = useState(true);
+
+ // Detect theme on client side
+ if (typeof window !== 'undefined') {
+ const checkTheme = () => {
+ const isDarkMode = document.documentElement.classList.contains('dark');
+ if (isDarkMode !== isDark) {
+ setIsDark(isDarkMode);
+ }
+ };
+ checkTheme();
+ }
+
// Use the updated hook without the limit parameter
const { data, isLoading, isError } = useGetRetention(mode, timeRange);
@@ -207,19 +221,19 @@ export default function RetentionPage() {
) : data ? (
<div className="overflow-x-auto">
<div
- className="inline-grid gap-px bg-neutral-900 rounded-lg shadow-lg"
+ className="inline-grid gap-px bg-neutral-200 dark:bg-neutral-900 rounded-lg shadow-lg"
style={{
gridTemplateColumns: `minmax(120px, auto) repeat(${data.maxPeriods + 1}, minmax(80px, auto))`,
}}
>
{/* Header Row */}
- <div className="p-2 text-sm font-semibold bg-neutral-900 text-neutral-100 text-center sticky left-0 z-10 border-b border-r border-neutral-700">
+ <div className="p-2 text-sm font-semibold bg-neutral-50 dark:bg-neutral-900 text-neutral-900 dark:text-neutral-100 text-center sticky left-0 z-10 border-b border-r border-neutral-200 dark:border-neutral-700">
Cohort
</div>
{periodHeaders.map(header => (
<div
key={header}
- className="p-2 text-sm bg-neutral-900 text-neutral-100 text-center border-b border-neutral-700"
+ className="p-2 text-sm bg-neutral-50 dark:bg-neutral-900 text-neutral-900 dark:text-neutral-100 text-center border-b border-neutral-200 dark:border-neutral-700"
>
{header}
</div>
@@ -229,19 +243,19 @@ export default function RetentionPage() {
{cohortKeys.map(cohortPeriod => (
<Fragment key={cohortPeriod}>
{/* Cohort Info Cell */}
- <div className="py-2 px-2 bg-neutral-900 text-sm sticky left-0 z-10 border-r border-neutral-800">
- <div className="whitespace-nowrap text-neutral-100">{formatDate(cohortPeriod)}</div>
- <div className="text-xs text-neutral-300 mt-1 whitespace-nowrap">
+ <div className="py-2 px-2 bg-neutral-50 dark:bg-neutral-900 text-sm sticky left-0 z-10 border-r border-neutral-200 dark:border-neutral-800">
+ <div className="whitespace-nowrap text-neutral-900 dark:text-neutral-100">{formatDate(cohortPeriod)}</div>
+ <div className="text-xs text-neutral-600 dark:text-neutral-300 mt-1 whitespace-nowrap">
{data.cohorts[cohortPeriod].size.toLocaleString()} users
</div>
</div>
{/* Retention Cells */}
{data.cohorts[cohortPeriod].percentages.map((percentage: number | null, index: number) => {
- const { backgroundColor, textColor } = getRetentionColor(percentage);
+ const { backgroundColor, textColor } = getRetentionColor(percentage, isDark);
return (
<div
key={`${cohortPeriod}-period-${index}`}
- className="m-[2px] text-center flex items-center justify-center font-medium transition-colors duration-150 bg-neutral-900 rounded-md"
+ className="m-[2px] text-center flex items-center justify-center font-medium transition-colors duration-150 bg-neutral-100 dark:bg-neutral-900 rounded-md"
style={{
backgroundColor,
color: textColor,
diff --git a/client/src/app/[site]/user/[userId]/components/Calendar.tsx b/client/src/app/[site]/user/[userId]/components/Calendar.tsx
index 04439bab0..9f6a87311 100644
--- a/client/src/app/[site]/user/[userId]/components/Calendar.tsx
+++ b/client/src/app/[site]/user/[userId]/components/Calendar.tsx
@@ -1,10 +1,13 @@
import { ResponsiveCalendar } from "@nivo/calendar";
import _ from "lodash";
import { DateTime } from "luxon";
+import { useTheme } from "next-themes";
import { UserSessionCountResponse } from "../../../../../api/analytics/useGetUserSessions";
-import { nivoTheme } from "../../../../../lib/nivo";
+import { getNivoTheme } from "../../../../../lib/nivo";
export const VisitCalendar = ({ sessionCount }: { sessionCount: UserSessionCountResponse[] }) => {
+ const { theme } = useTheme();
+ const nivoTheme = getNivoTheme(theme === "dark");
const data = sessionCount
.map(e => ({
value: e.sessions,
@@ -30,7 +33,7 @@ export const VisitCalendar = ({ sessionCount }: { sessionCount: UserSessionCount
theme={nivoTheme}
from={data.at(-1)?.day ?? ""}
to={data[0]?.day}
- emptyColor={"hsl(var(--neutral-750))"}
+ emptyColor={theme === "dark" ? "hsl(var(--neutral-750))" : "hsl(var(--neutral-100))"}
colors={["#10452A", "#006D32", "#3E9058", "#3CD456"]}
margin={{ top: 20, right: 0, bottom: 1, left: 20 }}
monthBorderColor="rgba(0, 0, 0, 0)"
@@ -39,8 +42,8 @@ export const VisitCalendar = ({ sessionCount }: { sessionCount: UserSessionCount
maxValue={maxValue}
tooltip={({ value, day }) => {
return (
- <div className="bg-neutral-900 p-2 rounded-md border border-neutral-800 text-sm">
- {value} <span className="text-neutral-300">session{Number(value) > 1 && "s"} on</span> {day}
+ <div className="bg-neutral-150 dark:bg-neutral-900 p-2 rounded-md border border-neutral-300 dark:border-neutral-800 text-sm">
+ {value} <span className="text-neutral-600 dark:text-neutral-300">session{Number(value) > 1 && "s"} on</span> {day}
</div>
);
}}
diff --git a/client/src/app/[site]/user/[userId]/page.tsx b/client/src/app/[site]/user/[userId]/page.tsx
index 22b272017..3abd172d4 100644
--- a/client/src/app/[site]/user/[userId]/page.tsx
+++ b/client/src/app/[site]/user/[userId]/page.tsx
@@ -74,16 +74,16 @@ export default function UserPage() {
<Avatar size={48} id={userId as string} />
<div>
<div className="text-lg font-bold">{name}</div>
- <span className="text-neutral-300 text-sm">ID: {userId}</span>
+ <span className="text-neutral-600 dark:text-neutral-300 text-sm">ID: {userId}</span>
</div>
</div>
{data?.ip && (
- <Badge variant="outline" className="flex gap-1 text-neutral-300">
- IP: <span className="text-neutral-100">{data?.ip}</span>
+ <Badge variant="outline" className="flex gap-1 text-neutral-600 dark:text-neutral-300">
+ IP: <span className="text-neutral-900 dark:text-neutral-100">{data?.ip}</span>
</Badge>
)}
</h1>
- <div className="bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-750 text-sm mb-3">
+ <div className="bg-white dark:bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-100 dark:border-neutral-750 text-sm mb-3">
{isLoading ? (
// Skeleton loading state for user info
<div className="grid grid-cols-1 md:grid-cols-2 gap-2">
@@ -114,40 +114,40 @@ export default function UserPage() {
maxLength={24}
className="inline-flex text-neutral-300"
/> */}
- <span className="text-neutral-100">Country:</span>
- <div className="text-neutral-300 flex gap-1 items-center">
+ <span className="text-neutral-900 dark:text-neutral-100">Country:</span>
+ <div className="text-neutral-600 dark:text-neutral-300 flex gap-1 items-center">
<CountryFlag country={data?.country || ""} />
{data?.country ? getCountryName(data.country) : "N/A"}
</div>
- <span className=" text-neutral-100">Region:</span>
- <div className="text-neutral-300">{data?.region ? getRegionName(data.region) : "N/A"}</div>
- <span className=" text-neutral-100">City:</span>
- <div className="text-neutral-300">{data?.city ?? "N/A"}</div>
- <span className=" text-neutral-100">Language:</span>
- <div className="text-neutral-300">{data?.language ? getLanguageName(data.language) : "N/A"}</div>
+ <span className=" text-neutral-900 dark:text-neutral-100">Region:</span>
+ <div className="text-neutral-600 dark:text-neutral-300">{data?.region ? getRegionName(data.region) : "N/A"}</div>
+ <span className=" text-neutral-900 dark:text-neutral-100">City:</span>
+ <div className="text-neutral-600 dark:text-neutral-300">{data?.city ?? "N/A"}</div>
+ <span className=" text-neutral-900 dark:text-neutral-100">Language:</span>
+ <div className="text-neutral-600 dark:text-neutral-300">{data?.language ? getLanguageName(data.language) : "N/A"}</div>
</div>
<div className="grid grid-cols-[110px_1fr] gap-2">
- <span className=" text-neutral-100">Device Type:</span>
- <div className="text-neutral-300 flex gap-1 items-center">
+ <span className=" text-neutral-900 dark:text-neutral-100">Device Type:</span>
+ <div className="text-neutral-600 dark:text-neutral-300 flex gap-1 items-center">
{data?.device_type === "Desktop" && <Monitor className="w-4 h-4" />}
{data?.device_type === "Mobile" && <Smartphone className="w-4 h-4" />}
{data?.device_type === "Tablet" && <Tablet className="w-4 h-4" />}
{data?.device_type}
</div>
- <span className=" text-neutral-100">Browser:</span>
- <div className="flex gap-1 text-neutral-300 items-center">
+ <span className=" text-neutral-900 dark:text-neutral-100">Browser:</span>
+ <div className="flex gap-1 text-neutral-600 dark:text-neutral-300 items-center">
<Browser browser={data?.browser || "Unknown"} />
{data?.browser}
{data?.browser_version && <span className="ml-1">v{data?.browser_version}</span>}
</div>
- <span className="text-neutral-100">OS:</span>
- <div className="flex gap-1 text-neutral-300 items-center">
+ <span className="text-neutral-900 dark:text-neutral-100">OS:</span>
+ <div className="flex gap-1 text-neutral-600 dark:text-neutral-300 items-center">
<OperatingSystem os={data?.operating_system || ""} />
{data?.operating_system}
{data?.operating_system_version && <span className="ml-1">v{data?.operating_system_version}</span>}
</div>
- <span className="text-neutral-100">Screen:</span>
- <div className="flex gap-1 text-neutral-300">
+ <span className="text-neutral-900 dark:text-neutral-100">Screen:</span>
+ <div className="flex gap-1 text-neutral-600 dark:text-neutral-300">
{data?.screen_width} x {data?.screen_height}
</div>
</div>
@@ -161,9 +161,9 @@ export default function UserPage() {
{Array.from({ length: 6 }).map((_, index) => (
<div
key={index}
- className="bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-750 flex-grow"
+ className="bg-white dark:bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-100 dark:border-neutral-750 flex-grow"
>
- <div className="text-xs text-neutral-400 flex items-center gap-1">
+ <div className="text-xs text-neutral-500 dark:text-neutral-400 flex items-center gap-1">
<Skeleton className="w-4 h-4" />
<Skeleton className="h-3 w-20" />
</div>
@@ -174,36 +174,36 @@ export default function UserPage() {
) : (
// Actual data
<>
- <div className="bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-750 flex-grow">
- <div className="text-xs text-neutral-400 flex items-center gap-1">
+ <div className="bg-white dark:bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-100 dark:border-neutral-750 flex-grow">
+ <div className="text-xs text-neutral-500 dark:text-neutral-400 flex items-center gap-1">
<Clock className="w-4 h-4" />
Avg. Session Duration
</div>
<div className="font-semibold">{data?.duration ? formatDuration(data.duration) : "N/A"}</div>
</div>
- <div className="bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-800 flex-grow">
- <div className="text-xs text-neutral-400 flex items-center gap-1">
+ <div className="bg-white dark:bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-100 dark:border-neutral-800 flex-grow">
+ <div className="text-xs text-neutral-500 dark:text-neutral-400 flex items-center gap-1">
<Files className="w-4 h-4" />
Sessions
</div>
<div className="font-semibold">{data?.sessions}</div>
</div>
- <div className="bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-800 flex-grow">
- <div className="text-xs text-neutral-400 flex items-center gap-1">
+ <div className="bg-white dark:bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-100 dark:border-neutral-800 flex-grow">
+ <div className="text-xs text-neutral-500 dark:text-neutral-400 flex items-center gap-1">
<PageviewIcon />
Pageviews
</div>
<div className="font-semibold">{data?.pageviews}</div>
</div>
- <div className="bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-800 flex-grow">
- <div className="text-xs text-neutral-400 flex items-center gap-1">
+ <div className="bg-white dark:bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-100 dark:border-neutral-800 flex-grow">
+ <div className="text-xs text-neutral-500 dark:text-neutral-400 flex items-center gap-1">
<EventIcon />
Events
</div>
<div className="font-semibold">{data?.events}</div>
</div>
- <div className="bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-800 flex-grow">
- <div className="text-xs text-neutral-400 flex items-center gap-1">
+ <div className="bg-white dark:bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-100 dark:border-neutral-800 flex-grow">
+ <div className="text-xs text-neutral-500 dark:text-neutral-400 flex items-center gap-1">
<Calendar className="w-4 h-4" />
First Seen
</div>
@@ -213,8 +213,8 @@ export default function UserPage() {
.toLocaleString(DateTime.DATETIME_SHORT)}
</div>
</div>
- <div className="bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-800 flex-grow">
- <div className="text-xs text-neutral-400 flex items-center gap-1">
+ <div className="bg-white dark:bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-100 dark:border-neutral-800 flex-grow">
+ <div className="text-xs text-neutral-500 dark:text-neutral-400 flex items-center gap-1">
<CalendarCheck className="w-4 h-4" />
Last Seen
</div>
@@ -228,7 +228,7 @@ export default function UserPage() {
)}
</div>
</div>
- <div className="bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-800 h-[150px]">
+ <div className="bg-white dark:bg-neutral-900 p-3 rounded-lg flex flex-col gap-1 border border-neutral-100 dark:border-neutral-800 h-[150px]">
<VisitCalendar sessionCount={sessionCount?.data ?? []} />
</div>
diff --git a/client/src/app/[site]/users/page.tsx b/client/src/app/[site]/users/page.tsx
index 85770576c..051d8a182 100644
--- a/client/src/app/[site]/users/page.tsx
+++ b/client/src/app/[site]/users/page.tsx
@@ -276,10 +276,10 @@ export default function UsersPage() {
<DisabledOverlay message="Users" featurePath="users">
<div className="p-2 md:p-4 max-w-[1400px] mx-auto space-y-3">
<SubHeader availableFilters={USER_PAGE_FILTERS} />
- <div className="rounded-md border border-neutral-800 bg-neutral-900">
+ <div className="rounded-md border border-neutral-100 dark:border-neutral-800 bg-white dark:bg-neutral-900">
<div className="relative overflow-x-auto">
<table className="w-full text-sm text-left">
- <thead className="bg-neutral-850 text-neutral-400 ">
+ <thead className="bg-neutral-50 dark:bg-neutral-850 text-neutral-500 dark:text-neutral-400 ">
{table.getHeaderGroups().map(headerGroup => (
<tr key={headerGroup.id}>
{headerGroup.headers.map(header => (
@@ -300,17 +300,17 @@ export default function UsersPage() {
<tbody>
{isLoading ? (
Array.from({ length: 15 }).map((_, index) => (
- <tr key={index} className="border-b border-neutral-800 animate-pulse">
+ <tr key={index} className="border-b border-neutral-100 dark:border-neutral-800 animate-pulse">
{Array.from({ length: columns.length }).map((_, cellIndex) => (
<td key={cellIndex} className="px-3 py-3">
- <div className="h-4 bg-neutral-800 rounded"></div>
+ <div className="h-4 bg-neutral-200 dark:bg-neutral-800 rounded"></div>
</td>
))}
</tr>
))
) : table.getRowModel().rows.length === 0 ? (
<tr>
- <td colSpan={columns.length} className="px-3 py-8 text-center text-neutral-400">
+ <td colSpan={columns.length} className="px-3 py-8 text-center text-neutral-500 dark:text-neutral-400">
No users found
</td>
</tr>
@@ -320,7 +320,7 @@ export default function UsersPage() {
const href = `/${site}/user/${userId}`;
return (
- <tr key={row.id} className="border-b border-neutral-800 group">
+ <tr key={row.id} className="border-b border-neutral-100 dark:border-neutral-800 group">
{row.getVisibleCells().map(cell => (
<td key={cell.id} className="px-3 py-3 relative">
{/* <Link
@@ -344,7 +344,7 @@ export default function UsersPage() {
</div>
{/* Pagination */}
- <div className="border-t border-neutral-800">
+ <div className="border-t border-neutral-100 dark:border-neutral-800">
<div className="px-4 py-3">
<Pagination
table={table}
diff --git a/client/src/app/admin/components/shared/GrowthChart.tsx b/client/src/app/admin/components/shared/GrowthChart.tsx
index b1e9a0857..530632b2c 100644
--- a/client/src/app/admin/components/shared/GrowthChart.tsx
+++ b/client/src/app/admin/components/shared/GrowthChart.tsx
@@ -7,6 +7,7 @@ import { nivoTheme } from "@/lib/nivo";
import { formatter } from "@/lib/utils";
import { DateTime } from "luxon";
import { useWindowSize } from "@uidotdev/usehooks";
+import { ChartTooltip } from "@/components/charts/ChartTooltip";
interface GrowthChartProps {
data?: Array<{ createdAt: string }>;
@@ -109,16 +110,18 @@ export function GrowthChart({ data, color = "#3b82f6", title }: GrowthChartProps
const currentTime = DateTime.fromSQL(point.data.x as string);
return (
- <div className="text-sm bg-neutral-850 p-3 rounded-md min-w-[100px] border border-neutral-750">
- <div className="font-medium mb-1">{point.data.currentTime.toLocaleString(DateTime.DATE_SHORT)}</div>
- <div className="flex justify-between gap-4 text-sm">
- <div className="flex items-center gap-2 text-neutral-300">
- <div className="w-2 h-2 rounded-full" style={{ backgroundColor: point.seriesColor }} />
- <span>New {title}</span>
+ <ChartTooltip>
+ <div className="p-3 min-w-[100px]">
+ <div className="font-medium mb-1">{point.data.currentTime.toLocaleString(DateTime.DATE_SHORT)}</div>
+ <div className="flex justify-between gap-4">
+ <div className="flex items-center gap-2">
+ <div className="w-2 h-2 rounded-full" style={{ backgroundColor: point.seriesColor }} />
+ <span>New {title}</span>
+ </div>
+ <div>{formatter(Number(point.data.yFormatted))}</div>
</div>
- <div>{formatter(Number(point.data.yFormatted))}</div>
</div>
- </div>
+ </ChartTooltip>
);
}}
/>
diff --git a/client/src/app/admin/components/shared/ServiceUsageChart.tsx b/client/src/app/admin/components/shared/ServiceUsageChart.tsx
index 315820b07..3631b0918 100644
--- a/client/src/app/admin/components/shared/ServiceUsageChart.tsx
+++ b/client/src/app/admin/components/shared/ServiceUsageChart.tsx
@@ -7,6 +7,7 @@ import { formatter } from "@/lib/utils";
import { ResponsiveLine } from "@nivo/line";
import { useWindowSize } from "@uidotdev/usehooks";
import { DateTime } from "luxon";
+import { ChartTooltip } from "@/components/charts/ChartTooltip";
interface ServiceUsageChartProps {
startDate?: string;
@@ -162,26 +163,28 @@ export function ServiceUsageChart({ startDate, endDate, title }: ServiceUsageCha
const total = slice.points.reduce((acc: number, point: any) => acc + Number(point.data.yFormatted), 0);
return (
- <div className="text-sm bg-neutral-850 p-3 rounded-md min-w-[100px] border border-neutral-750">
- <div className="font-medium mb-1">{currentTime.toLocaleString(DateTime.DATE_SHORT)}</div>
- {slice.points
- .sort((a: any, b: any) => a.seriesId.localeCompare(b.seriesId))
- .map((point: any) => {
- return (
- <div key={point.serieId} className="flex justify-between gap-4 text-sm">
- <div className="flex items-center gap-2 text-neutral-300">
- <div className="w-2 h-2 rounded-full" style={{ backgroundColor: point.seriesColor }} />
- <span>{point.seriesId.charAt(0).toUpperCase() + point.seriesId.slice(1)}</span>
+ <ChartTooltip>
+ <div className="p-3 min-w-[100px]">
+ <div className="font-medium mb-1">{currentTime.toLocaleString(DateTime.DATE_SHORT)}</div>
+ {slice.points
+ .sort((a: any, b: any) => a.seriesId.localeCompare(b.seriesId))
+ .map((point: any) => {
+ return (
+ <div key={point.serieId} className="flex justify-between gap-4">
+ <div className="flex items-center gap-2">
+ <div className="w-2 h-2 rounded-full" style={{ backgroundColor: point.seriesColor }} />
+ <span>{point.seriesId.charAt(0).toUpperCase() + point.seriesId.slice(1)}</span>
+ </div>
+ <div>{formatter(Number(point.data.yFormatted))}</div>
</div>
- <div>{formatter(Number(point.data.yFormatted))}</div>
- </div>
- );
- })}
- <div className="text-sm mt-2 flex justify-between">
- <div className="text-neutral-300">Total</div>
- <div className="font-semibold">{formatter(total)}</div>
+ );
+ })}
+ <div className="mt-2 flex justify-between border-t border-neutral-100 dark:border-neutral-750 pt-2">
+ <div>Total</div>
+ <div className="font-semibold">{formatter(total)}</div>
+ </div>
</div>
- </div>
+ </ChartTooltip>
);
}}
/>
diff --git a/client/src/app/as/callback/page.tsx b/client/src/app/as/callback/page.tsx
index 6dcb07a8f..22c0f02a1 100644
--- a/client/src/app/as/callback/page.tsx
+++ b/client/src/app/as/callback/page.tsx
@@ -20,6 +20,7 @@ import { authClient } from "../../../lib/auth";
import { IS_CLOUD } from "../../../lib/const";
import { userStore } from "../../../lib/userStore";
import { cn, isValidDomain, normalizeDomain } from "../../../lib/utils";
+import { RybbitTextLogo } from "../../../components/RybbitLogo";
// Animation variants for step transitions
const contentVariants = {
@@ -330,9 +331,7 @@ export default function AppSumoSignupPage() {
return (
<motion.div initial="hidden" animate="visible" variants={contentVariants}>
<h2 className="text-2xl font-semibold mb-2">Add your site (optional)</h2>
- <p className="text-sm text-muted-foreground mb-6">
- You can always add sites later from your dashboard
- </p>
+ <p className="text-sm text-muted-foreground mb-6">You can always add sites later from your dashboard</p>
<div className="space-y-4">
<div className="space-y-2">
<Label htmlFor="domain">Website Domain</Label>
@@ -394,7 +393,7 @@ export default function AppSumoSignupPage() {
{/* Logo and title above the card */}
<div className="relative z-10 mb-6 text-center">
<a href="https://rybbit.com" target="_blank" className="inline-block mb-2">
- <Image src="/rybbit-text.svg" alt="Rybbit" width={150} height={34} />
+ <RybbitTextLogo />
</a>
<h1 className="text-lg text-neutral-300">AppSumo License Activation</h1>
</div>
diff --git a/client/src/app/components/AddSite.tsx b/client/src/app/components/AddSite.tsx
index 09acee217..37c897499 100644
--- a/client/src/app/components/AddSite.tsx
+++ b/client/src/app/components/AddSite.tsx
@@ -151,7 +151,7 @@ export function AddSite({ trigger, disabled }: { trigger?: React.ReactNode; disa
<div className="grid gap-4 py-2">
<div className="grid w-full items-center gap-1.5">
- <Label htmlFor="domain" className="text-sm font-medium text-white">
+ <Label htmlFor="domain" className="text-sm font-medium">
Domain
</Label>
<Input
@@ -164,7 +164,7 @@ export function AddSite({ trigger, disabled }: { trigger?: React.ReactNode; disa
{/* Public Analytics Setting */}
<div className="flex items-center justify-between">
<div>
- <Label htmlFor="isPublic" className="text-sm font-medium text-white">
+ <Label htmlFor="isPublic" className="text-sm font-medium">
Public Analytics
</Label>
<p className="text-xs text-muted-foreground mt-1">
@@ -177,7 +177,7 @@ export function AddSite({ trigger, disabled }: { trigger?: React.ReactNode; disa
{/* User ID Salting Setting */}
<div className="flex items-center justify-between">
<div>
- <Label htmlFor="saltUserIds" className="text-sm font-medium text-white">
+ <Label htmlFor="saltUserIds" className="text-sm font-medium">
Enable User ID Salting
</Label>
<p className="text-xs text-muted-foreground mt-1">
diff --git a/client/src/app/globals.css b/client/src/app/globals.css
index 042f58dcb..605baa032 100644
--- a/client/src/app/globals.css
+++ b/client/src/app/globals.css
@@ -8,7 +8,7 @@ body {
@layer base {
:root {
- --background: 0 0% 100%;
+ --background: 0 0% 97%;
--foreground: 0 0% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 0 0% 3.9%;
@@ -27,8 +27,8 @@ body {
--ring: 0 0% 10%;
--radius: 0.3rem;
- --dataviz: 230 100% 85%;
- --dataviz-2: 230 100% 92%;
+ --dataviz: 230 100% 80%;
+ --dataviz-2: 230 100% 87%;
--accent-50: var(--emerald-50);
--accent-100: var(--emerald-100);
@@ -82,6 +82,7 @@ body {
--zinc-950: 240 10% 3.9%;
/* Neutral */
+ --neutral-0: 0 0% 97%;
--neutral-50: 0 0% 95%;
--neutral-100: 0 0% 90%;
--neutral-150: 0 0% 85%;
@@ -358,6 +359,9 @@ body {
--input: 240 3.7% 15.9%;
--ring: 240 4.9% 83.9%;
+
+ --dataviz: 230 100% 85%;
+ --dataviz-2: 230 100% 92%;
}
/* Dark scrollbar styles */
diff --git a/client/src/app/invitation/page.tsx b/client/src/app/invitation/page.tsx
index dd078b484..9c307b272 100644
--- a/client/src/app/invitation/page.tsx
+++ b/client/src/app/invitation/page.tsx
@@ -1,11 +1,10 @@
"use client";
import { AlertCircle } from "lucide-react";
-import Image from "next/image";
import { useRouter, useSearchParams } from "next/navigation";
import { Suspense, useState } from "react";
import { ThreeDotLoader } from "../../components/Loaders";
-import { TopBar } from "../../components/TopBar";
+import { RybbitLogo } from "../../components/RybbitLogo";
import { Alert, AlertDescription, AlertTitle } from "../../components/ui/alert";
import { Button } from "../../components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "../../components/ui/card";
@@ -22,7 +21,7 @@ function AuthComponent() {
return (
<Card className="w-full max-w-md p-1">
<CardHeader>
- <Image src="/rybbit.svg" alt="Rybbit" width={32} height={32} />
+ <RybbitLogo width={32} height={32} />
<CardTitle className="text-2xl flex justify-center">Join {organization}</CardTitle>
<p className="text-center text-sm text-muted-foreground mt-2">You've been invited by {inviterEmail}</p>
</CardHeader>
@@ -76,7 +75,7 @@ function AcceptInvitationInner() {
return (
<Card className="w-full max-w-md">
<CardHeader>
- <Image src="/rybbit.svg" alt="Rybbit" width={32} height={32} />
+ <RybbitLogo width={32} height={32} />
<CardTitle className="text-2xl flex justify-center">Invitation</CardTitle>
</CardHeader>
<CardContent>
@@ -112,8 +111,6 @@ function InvitationContent() {
export default function AcceptInvitation() {
return (
<div className="flex flex-col min-h-dvh">
- <TopBar />
-
<div className="flex justify-center items-center flex-grow p-4">
<Suspense fallback={<ThreeDotLoader />}>
<InvitationContent />
diff --git a/client/src/app/layout.tsx b/client/src/app/layout.tsx
index fbd787a99..602290c46 100644
--- a/client/src/app/layout.tsx
+++ b/client/src/app/layout.tsx
@@ -26,7 +26,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<html lang="en" suppressHydrationWarning>
<ReactScan />
<body className={cn("bg-background text-foreground h-full", inter.className)} suppressHydrationWarning>
- <ThemeProvider attribute="class" defaultTheme="dark" enableSystem={false}>
+ <ThemeProvider attribute="class" defaultTheme="dark" enableSystem={true}>
<TooltipProvider>
<QueryProvider>
<OrganizationInitializer />
diff --git a/client/src/app/login/page.tsx b/client/src/app/login/page.tsx
index 00bcfa199..839ade5ae 100644
--- a/client/src/app/login/page.tsx
+++ b/client/src/app/login/page.tsx
@@ -1,20 +1,20 @@
"use client";
+import { AuthButton } from "@/components/auth/AuthButton";
+import { AuthError } from "@/components/auth/AuthError";
+import { AuthInput } from "@/components/auth/AuthInput";
+import { SocialButtons } from "@/components/auth/SocialButtons";
+import { Turnstile } from "@/components/auth/Turnstile";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
-import Image from "next/image";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useState } from "react";
+import { RybbitLogo } from "../../components/RybbitLogo";
import { useSetPageTitle } from "../../hooks/useSetPageTitle";
import { authClient } from "../../lib/auth";
-import { userStore } from "../../lib/userStore";
import { useConfigs } from "../../lib/configs";
import { IS_CLOUD } from "../../lib/const";
-import { AuthInput } from "@/components/auth/AuthInput";
-import { AuthButton } from "@/components/auth/AuthButton";
-import { AuthError } from "@/components/auth/AuthError";
-import { SocialButtons } from "@/components/auth/SocialButtons";
-import { Turnstile } from "@/components/auth/Turnstile";
+import { userStore } from "../../lib/userStore";
export default function Page() {
const { configs, isLoading: isLoadingConfigs } = useConfigs();
@@ -76,7 +76,7 @@ export default function Page() {
<div></div>
<Card className="w-full max-w-sm p-1">
<CardHeader>
- <Image src="/rybbit.svg" alt="Rybbit" width={32} height={32} />
+ <RybbitLogo width={32} height={32} />
<CardTitle className="text-2xl flex justify-center">Sign in</CardTitle>
</CardHeader>
<CardContent>
diff --git a/client/src/app/reset-password/page.tsx b/client/src/app/reset-password/page.tsx
index c032c6ef7..cae582ee3 100644
--- a/client/src/app/reset-password/page.tsx
+++ b/client/src/app/reset-password/page.tsx
@@ -1,17 +1,17 @@
"use client";
+import { AuthButton } from "@/components/auth/AuthButton";
+import { AuthError } from "@/components/auth/AuthError";
+import { AuthInput } from "@/components/auth/AuthInput";
+import { Turnstile } from "@/components/auth/Turnstile";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
-import Image from "next/image";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useState } from "react";
+import { RybbitLogo } from "../../components/RybbitLogo";
import { useSetPageTitle } from "../../hooks/useSetPageTitle";
import { authClient } from "../../lib/auth";
import { IS_CLOUD } from "../../lib/const";
-import { AuthInput } from "@/components/auth/AuthInput";
-import { AuthButton } from "@/components/auth/AuthButton";
-import { AuthError } from "@/components/auth/AuthError";
-import { Turnstile } from "@/components/auth/Turnstile";
export default function ResetPasswordPage() {
useSetPageTitle("Rybbit · Reset Password");
@@ -102,7 +102,7 @@ export default function ResetPasswordPage() {
<div className="flex justify-center items-center h-dvh w-full p-4">
<Card className="w-full max-w-sm p-1">
<CardHeader>
- <Image src="/rybbit.svg" alt="Rybbit" width={32} height={32} />
+ <RybbitLogo width={32} height={32} />
<CardTitle className="text-2xl flex justify-center">
{resetSuccess ? "Password Reset Successful" : otpSent ? "Enter OTP Code" : "Reset Password"}
</CardTitle>
@@ -110,14 +110,14 @@ export default function ResetPasswordPage() {
<CardContent>
{resetSuccess ? (
<div className="flex flex-col items-center space-y-6 py-4">
- <div className="h-20 w-20 rounded-full bg-green-900/20 flex items-center justify-center border-2 border-green-500 text-green-500">
+ <div className="h-20 w-20 rounded-full bg-green-100 dark:bg-green-900/20 flex items-center justify-center border-2 border-green-500 text-green-500">
<span className="text-3xl font-bold">✓</span>
</div>
<div className="text-center space-y-2">
<h3 className="text-xl font-medium text-green-500">Success!</h3>
<p className="text-muted-foreground">Your password has been reset successfully.</p>
</div>
- <div className="w-full rounded-md bg-neutral-800/30 p-3 mt-4">
+ <div className="w-full rounded-md bg-neutral-100 dark:bg-neutral-800/30 p-3 mt-4">
<div className="flex justify-center">
<p className="text-sm text-muted-foreground">Redirecting to login page...</p>
</div>
diff --git a/client/src/app/signup/page.tsx b/client/src/app/signup/page.tsx
index d746cf591..9db103b3f 100644
--- a/client/src/app/signup/page.tsx
+++ b/client/src/app/signup/page.tsx
@@ -11,11 +11,11 @@ import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { motion } from "framer-motion";
import { ArrowRight, Check } from "lucide-react";
-import Image from "next/image";
import Link from "next/link";
import { useRouter, useSearchParams } from "next/navigation";
import React, { Suspense, useEffect, useState } from "react";
import { addSite } from "../../api/admin/sites";
+import { RybbitLogo, RybbitTextLogo } from "../../components/RybbitLogo";
import { useSetPageTitle } from "../../hooks/useSetPageTitle";
import { authClient } from "../../lib/auth";
import { useConfigs } from "../../lib/configs";
@@ -269,7 +269,7 @@ export default function SignupPage() {
value={orgName}
onChange={e => handleOrgNameChange(e.target.value)}
required
- className="h-10 transition-all bg-neutral-800/50 border-neutral-700"
+ className="h-10 transition-all bg-neutral-100 dark:bg-neutral-800/50 border-neutral-200 dark:border-neutral-700"
/>
</div>
@@ -324,7 +324,7 @@ export default function SignupPage() {
value={domain}
onChange={e => setDomain(e.target.value.toLowerCase())}
required
- className="h-10 transition-all bg-neutral-800/50 border-neutral-700"
+ className="h-10 transition-all bg-neutral-100 dark:bg-neutral-800/50 border-neutral-200 dark:border-neutral-700"
/>
<p className="text-xs text-muted-foreground">Enter the domain of the website you want to track</p>
</div>
@@ -357,7 +357,7 @@ export default function SignupPage() {
<div className="flex justify-center items-center h-dvh w-full">
<Card className="w-full max-w-sm p-1">
<CardHeader>
- <Image src="/rybbit.svg" alt="Rybbit" width={32} height={32} />
+ <RybbitLogo width={32} height={32} />
<CardTitle className="text-2xl flex justify-center">Sign Up Disabled</CardTitle>
</CardHeader>
<CardContent>
@@ -385,23 +385,23 @@ export default function SignupPage() {
</Suspense>
{/* Background gradients similar to docs page */}
- <div className="absolute top-0 left-0 w-[550px] h-[550px] bg-emerald-500/40 rounded-full blur-[80px] opacity-40"></div>
+ {/* <div className="absolute top-0 left-0 w-[550px] h-[550px] bg-emerald-500/40 rounded-full blur-[80px] opacity-40"></div>
<div className="absolute top-20 left-20 w-[400px] h-[400px] bg-emerald-600/30 rounded-full blur-[70px] opacity-30"></div>
<div className="absolute bottom-0 right-0 w-[500px] h-[500px] bg-blue-500/40 rounded-full blur-[80px] opacity-30"></div>
<div className="absolute bottom-40 right-20 w-[350px] h-[350px] bg-indigo-500/30 rounded-full blur-[75px] opacity-30"></div>
- <div className="absolute top-1/4 right-0 w-[320px] h-[320px] bg-purple-500/40 rounded-full blur-[70px] opacity-20"></div>
+ <div className="absolute top-1/4 right-0 w-[320px] h-[320px] bg-purple-500/40 rounded-full blur-[70px] opacity-20"></div> */}
{/* Logo and title above the card */}
<div className="relative z-10 mb-6 text-center">
<a href="https://rybbit.com" target="_blank" className="inline-block mb-2">
- <Image src="/rybbit-text.svg" alt="Rybbit" width={150} height={34} />
+ <RybbitTextLogo />
</a>
- <h1 className="text-lg text-neutral-300">Get started with Rybbit</h1>
+ <h1 className="text-lg text-neutral-600 dark:text-neutral-300">Get started with Rybbit</h1>
</div>
- <Card className="w-full md:w-[500px] p-0 overflow-hidden shadow-2xl border-neutral-700/50 backdrop-blur-sm bg-neutral-800/20 z-10 p-8">
+ <Card className="w-full md:w-[500px] p-0 overflow-hidden shadow-2xl border-neutral-200/50 dark:border-neutral-700/50 backdrop-blur-sm bg-white/80 dark:bg-neutral-800/20 z-10 p-8">
{/* Horizontal step indicator */}
<div className="flex items-center w-full mb-4">
{[1, 2, 3].map((step, index) => (
diff --git a/client/src/app/subscribe/components/FAQSection.tsx b/client/src/app/subscribe/components/FAQSection.tsx
index 0b94d15b6..0087d2117 100644
--- a/client/src/app/subscribe/components/FAQSection.tsx
+++ b/client/src/app/subscribe/components/FAQSection.tsx
@@ -25,12 +25,12 @@ const FAQ_ITEMS: FAQItem[] = [
export function FAQSection() {
return (
<div className="mt-10 space-y-6">
- <h3 className="text-xl font-semibold mb-4">Frequently Asked Questions</h3>
+ <h3 className="text-xl font-semibold mb-4 text-neutral-900 dark:text-neutral-100">Frequently Asked Questions</h3>
{FAQ_ITEMS.map((faq, index) => (
- <div key={index} className="bg-neutral-800/20 p-5 rounded-lg border border-neutral-700">
- <h4 className="font-medium mb-2">{faq.question}</h4>
- <p className="text-neutral-300">{faq.answer}</p>
+ <div key={index} className="bg-neutral-50 dark:bg-neutral-800/20 p-5 rounded-lg border border-neutral-200 dark:border-neutral-700">
+ <h4 className="font-medium mb-2 text-neutral-900 dark:text-neutral-100">{faq.question}</h4>
+ <p className="text-neutral-600 dark:text-neutral-300">{faq.answer}</p>
</div>
))}
</div>
diff --git a/client/src/app/subscribe/components/PricingCard.tsx b/client/src/app/subscribe/components/PricingCard.tsx
index dbffc1bde..62d9bd1a2 100644
--- a/client/src/app/subscribe/components/PricingCard.tsx
+++ b/client/src/app/subscribe/components/PricingCard.tsx
@@ -123,8 +123,8 @@ export function PricingCard({ isLoggedIn }: { isLoggedIn: boolean }) {
className={cn(
"px-3 py-1 rounded-full transition-colors cursor-pointer",
!isAnnual
- ? "bg-emerald-500/20 text-emerald-400 font-medium"
- : "text-neutral-400 hover:text-neutral-200"
+ ? "bg-emerald-500/20 text-emerald-600 dark:text-emerald-400 font-medium"
+ : "text-neutral-600 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-neutral-200"
)}
>
Monthly
@@ -134,8 +134,8 @@ export function PricingCard({ isLoggedIn }: { isLoggedIn: boolean }) {
className={cn(
"px-3 py-1 rounded-full transition-colors cursor-pointer",
isAnnual
- ? "bg-emerald-500/20 text-emerald-400 font-medium"
- : "text-neutral-400 hover:text-neutral-200"
+ ? "bg-emerald-500/20 text-emerald-600 dark:text-emerald-400 font-medium"
+ : "text-neutral-600 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-neutral-200"
)}
>
Annual
@@ -155,9 +155,12 @@ export function PricingCard({ isLoggedIn }: { isLoggedIn: boolean }) {
className="mb-3"
/>
- <div className="flex justify-between text-xs text-neutral-400">
+ <div className="flex justify-between text-xs text-neutral-600 dark:text-neutral-400">
{EVENT_TIERS.map((tier, index) => (
- <span key={index} className={cn(eventLimitIndex === index && "font-bold text-emerald-400")}>
+ <span
+ key={index}
+ className={cn(eventLimitIndex === index && "font-bold text-emerald-600 dark:text-emerald-400")}
+ >
{formatEventTier(tier)}
</span>
))}
@@ -167,25 +170,25 @@ export function PricingCard({ isLoggedIn }: { isLoggedIn: boolean }) {
{/* Cards section */}
<div className="grid min-[1100px]:grid-cols-4 min-[600px]:grid-cols-2 min-[400px]:grid-cols-1 gap-6 max-w-6xl mx-auto">
{/* Free Plan Card */}
- <div className="bg-neutral-800/15 rounded-xl border border-neutral-700/60 overflow-hidden text-neutral-300">
+ <div className="bg-neutral-100/30 dark:bg-neutral-800/15 rounded-xl border border-neutral-150 dark:border-neutral-800/60 overflow-hidden text-neutral-600 dark:text-neutral-300 shadow:lg">
<div className="p-6">
<div className="mb-4">
<h3 className="text-xl font-bold mb-2">Free</h3>
- <p className="text-sm text-neutral-400 h-10">Perfect for hobby projects</p>
+ <p className="text-sm text-neutral-600 dark:text-neutral-400 h-10">Perfect for hobby projects</p>
</div>
{/* Price display */}
<div className="mb-6">
<div>
<span className="text-3xl font-bold">{DEFAULT_EVENT_LIMIT.toLocaleString()}</span>
- <span className="ml-1 text-neutral-400">/month events</span>
+ <span className="ml-1 text-neutral-600 dark:text-neutral-400">/month events</span>
</div>
</div>
{/* Current plan button */}
<button
disabled
- className="w-full bg-neutral-700/50 text-neutral-400 font-medium px-5 py-3 rounded-xl border border-neutral-600/50 cursor-not-allowed opacity-50"
+ className="w-full bg-neutral-300 dark:bg-neutral-700 text-neutral-500 dark:text-neutral-400 font-medium px-5 py-3 rounded-xl border border-neutral-200 dark:border-neutral-600 cursor-not-allowed opacity-50"
>
Current Plan
</button>
@@ -194,7 +197,7 @@ export function PricingCard({ isLoggedIn }: { isLoggedIn: boolean }) {
<div className="space-y-3 mt-6">
{FREE_FEATURES.map((feature, i) => (
<div key={i} className="flex items-center">
- <Check className="h-4 w-4 text-emerald-400 mr-3 shrink-0" />
+ <Check className="h-4 w-4 text-emerald-600 dark:text-emerald-400 mr-3 shrink-0" />
<span className="text-sm">{feature}</span>
</div>
))}
@@ -203,11 +206,13 @@ export function PricingCard({ isLoggedIn }: { isLoggedIn: boolean }) {
</div>
{/* Standard Plan Card */}
- <div className="bg-neutral-800/50 rounded-xl border border-neutral-700 overflow-hidden">
+ <div className="bg-white dark:bg-neutral-800/50 rounded-xl border border-neutral-150 dark:border-neutral-800/90 overflow-hidden text-neutral-900 dark:text-neutral-100 shadow-lg">
<div className="p-6">
<div className="mb-4">
<h3 className="text-xl font-bold mb-2">Standard</h3>
- <p className="text-sm text-neutral-400 h-10">Everything you need to get started as a small business</p>
+ <p className="text-sm text-neutral-600 dark:text-neutral-400 h-10">
+ Everything you need to get started as a small business
+ </p>
</div>
{/* Price display */}
@@ -219,7 +224,7 @@ export function PricingCard({ isLoggedIn }: { isLoggedIn: boolean }) {
<span className="text-3xl font-bold">
${isAnnual ? Math.round(standardAnnualPrice / 12) : standardMonthlyPrice}
</span>
- <span className="ml-1 text-neutral-400">/month</span>
+ <span className="ml-1 text-neutral-600 dark:text-neutral-400">/month</span>
</div>
)}
</div>
@@ -237,7 +242,7 @@ export function PricingCard({ isLoggedIn }: { isLoggedIn: boolean }) {
<div className="space-y-3 mt-6">
{STANDARD_FEATURES.map((feature, i) => (
<div key={i} className="flex items-center">
- <Check className="h-4 w-4 text-emerald-400 mr-3 shrink-0" />
+ <Check className="h-4 w-4 text-emerald-600 dark:text-emerald-400 mr-3 shrink-0" />
<span className="text-sm">{feature}</span>
</div>
))}
@@ -246,16 +251,18 @@ export function PricingCard({ isLoggedIn }: { isLoggedIn: boolean }) {
</div>
{/* Pro Plan Card */}
- <div className="bg-neutral-800/100 rounded-xl border-2 border-emerald-500 overflow-hidden">
+ <div className="bg-white dark:bg-neutral-800/100 rounded-xl border-2 border-emerald-500 overflow-hidden text-neutral-900 dark:text-neutral-100 shadow-lg">
<div className="p-6">
<div className="mb-4">
<div className="flex items-center gap-2 mb-2">
<h3 className="text-xl font-bold">Pro</h3>
- <span className="px-2 py-0.5 text-xs font-semibold bg-emerald-500/20 text-emerald-400 rounded-full border border-emerald-500/30">
+ <span className="px-2 py-0.5 text-xs font-semibold bg-emerald-500/30 dark:bg-emerald-500/20 text-emerald-600 dark:text-emerald-400 rounded-full border border-emerald-500/40 dark:border-emerald-500/30">
Recommended
</span>
</div>
- <p className="text-sm text-neutral-400 h-10">Advanced features for professional teams</p>
+ <p className="text-sm text-neutral-600 dark:text-neutral-400 h-10">
+ Advanced features for professional teams
+ </p>
</div>
{/* Price display */}
@@ -267,7 +274,7 @@ export function PricingCard({ isLoggedIn }: { isLoggedIn: boolean }) {
<span className="text-3xl font-bold">
${isAnnual ? Math.round(proAnnualPrice / 12) : proMonthlyPrice}
</span>
- <span className="ml-1 text-neutral-400">/month</span>
+ <span className="ml-1 text-neutral-600 dark:text-neutral-400">/month</span>
</div>
)}
</div>
@@ -285,7 +292,7 @@ export function PricingCard({ isLoggedIn }: { isLoggedIn: boolean }) {
<div className="space-y-3 mt-6">
{PRO_FEATURES.map((feature, i) => (
<div key={i} className="flex items-center">
- <Check className="h-4 w-4 text-emerald-400 mr-3 shrink-0" />
+ <Check className="h-4 w-4 text-emerald-600 dark:text-emerald-400 mr-3 shrink-0" />
<span className="text-sm">{feature}</span>
</div>
))}
@@ -294,11 +301,13 @@ export function PricingCard({ isLoggedIn }: { isLoggedIn: boolean }) {
</div>
{/* Enterprise Plan Card */}
- <div className="bg-neutral-800/50 rounded-xl border border-neutral-700 overflow-hidden">
+ <div className="bg-white dark:bg-neutral-800/50 rounded-xl border border-neutral-150 dark:border-neutral-800/90 overflow-hidden text-neutral-900 dark:text-neutral-100 shadow-lg">
<div className="p-6">
<div className="mb-4">
<h3 className="text-xl font-bold mb-2">Enterprise</h3>
- <p className="text-sm text-neutral-400 h-10">Advanced features for enterprise teams</p>
+ <p className="text-sm text-neutral-600 dark:text-neutral-400 h-10">
+ Advanced features for enterprise teams
+ </p>
</div>
{/* Price display */}
@@ -317,7 +326,7 @@ export function PricingCard({ isLoggedIn }: { isLoggedIn: boolean }) {
<div className="space-y-3 mt-6">
{ENTERPRISE_FEATURES.map((feature, i) => (
<div key={i} className="flex items-center">
- <Check className="h-4 w-4 text-emerald-400 mr-3 shrink-0" />
+ <Check className="h-4 w-4 text-emerald-600 dark:text-emerald-400 mr-3 shrink-0" />
<span className="text-sm">{feature}</span>
</div>
))}
@@ -327,7 +336,7 @@ export function PricingCard({ isLoggedIn }: { isLoggedIn: boolean }) {
</div>
{/* Footer text */}
- <p className="text-center text-sm text-neutral-400 mt-6">
+ <p className="text-center text-sm text-neutral-600 dark:text-neutral-400 mt-6">
{isCustomTier ? "Email us at [email protected] for custom pricing" : "Secure checkout powered by Stripe."}
</p>
</div>
diff --git a/client/src/app/subscribe/components/PricingHeader.tsx b/client/src/app/subscribe/components/PricingHeader.tsx
index 4b9537560..053b4e156 100644
--- a/client/src/app/subscribe/components/PricingHeader.tsx
+++ b/client/src/app/subscribe/components/PricingHeader.tsx
@@ -3,10 +3,10 @@ import React from "react";
export function PricingHeader() {
return (
<div className="mb-10 text-center max-w-3xl mx-auto">
- <h1 className="text-4xl md:text-5xl font-bold tracking-tight pb-4 text-transparent bg-clip-text bg-gradient-to-b from-white via-gray-200 to-gray-400">
+ <h1 className="text-4xl md:text-5xl font-bold tracking-tight pb-4 text-transparent bg-clip-text bg-gradient-to-b from-neutral-900 via-neutral-700 to-neutral-500 dark:from-white dark:via-gray-200 dark:to-gray-400">
Simple, Transparent Pricing
</h1>
- <p className="text-lg text-neutral-300 mb-6">Privacy-friendly analytics with all the features you need to grow</p>
+ <p className="text-lg text-neutral-600 dark:text-neutral-300 mb-6">Privacy-friendly analytics with all the features you need to grow</p>
</div>
);
}
diff --git a/client/src/app/subscribe/page.tsx b/client/src/app/subscribe/page.tsx
index 7d69b9c67..661a9f8aa 100644
--- a/client/src/app/subscribe/page.tsx
+++ b/client/src/app/subscribe/page.tsx
@@ -38,7 +38,7 @@ export default function Subscribe() {
{/* Usage Stats and Chart */}
{organizationId && (
- <div className="max-w-lg mx-auto mt-6 bg-blue-900/20 rounded-xl border border-blue-800 p-6">
+ <div className="max-w-lg mx-auto mt-6 bg-blue-50 dark:bg-blue-900/20 rounded-xl border border-blue-200 dark:border-blue-800 p-6">
<UsageChart organizationId={organizationId} startDate={startDate} endDate={endDate} />
</div>
)}
diff --git a/client/src/app/uptime/monitors/components/MonitorResponseTimeChart.tsx b/client/src/app/uptime/monitors/components/MonitorResponseTimeChart.tsx
index a50dad20c..4b8fd5e52 100644
--- a/client/src/app/uptime/monitors/components/MonitorResponseTimeChart.tsx
+++ b/client/src/app/uptime/monitors/components/MonitorResponseTimeChart.tsx
@@ -12,6 +12,7 @@ import { useEffect, useState } from "react";
import { UptimeBucketSelection } from "./UptimeBucketSelection";
import { useUptimeStore } from "./uptimeStore";
import { getHoursFromTimeRange } from "./utils";
+import { ChartTooltip } from "@/components/charts/ChartTooltip";
const MONITOR_COLORS = {
dns: "hsl(160, 70%, 50%)",
@@ -374,42 +375,44 @@ export function MonitorResponseTimeChart({
: 0;
return (
- <div className="text-sm bg-neutral-850 p-3 rounded-md min-w-[200px] border border-neutral-750 text-neutral-200">
- {formatChartDateTime(currentTime, bucket)}
+ <ChartTooltip>
+ <div className="p-3 min-w-[200px]">
+ <div className="mb-2">{formatChartDateTime(currentTime, bucket)}</div>
+
+ {/* Show failure status if any failures */}
+ {dataPoint && dataPoint.failure_percentage > 0 && (
+ <div
+ className={cn(
+ "text-xs px-2 py-1 rounded mb-2",
+ dataPoint.failure_percentage >= 50
+ ? "bg-red-500/20 text-red-400"
+ : "bg-yellow-500/20 text-yellow-400"
+ )}
+ >
+ {dataPoint.failure_count + dataPoint.timeout_count} of {dataPoint.check_count} checks failed (
+ {dataPoint.failure_percentage.toFixed(1)}%)
+ </div>
+ )}
- {/* Show failure status if any failures */}
- {dataPoint && dataPoint.failure_percentage > 0 && (
- <div
- className={cn(
- "text-xs px-2 py-1 rounded mt-2 mb-2",
- dataPoint.failure_percentage >= 50
- ? "bg-red-500/20 text-red-400"
- : "bg-yellow-500/20 text-yellow-400"
+ <div className="space-y-1.5 text-xs">
+ {slice.points.map((point: any) => (
+ <div key={point.seriesId} className="flex justify-between items-center">
+ <div className="flex items-center gap-2">
+ <div className="w-2 h-2 rounded-sm" style={{ backgroundColor: point.seriesColor }} />
+ <span>{point.seriesId}</span>
+ </div>
+ <span className="font-medium">{formatTooltipValue(Number(point.data.yFormatted))}</span>
+ </div>
+ ))}
+ {monitorType === "http" && (
+ <div className="flex justify-between items-center pt-1.5 border-t border-neutral-100 dark:border-neutral-750">
+ <span>Total</span>
+ <span className="font-semibold">{formatTooltipValue(total)}</span>
+ </div>
)}
- >
- {dataPoint.failure_count + dataPoint.timeout_count} of {dataPoint.check_count} checks failed (
- {dataPoint.failure_percentage.toFixed(1)}%)
</div>
- )}
-
- <div className="space-y-1.5 mt-2 text-xs">
- {slice.points.map((point: any) => (
- <div key={point.seriesId} className="flex justify-between items-center">
- <div className="flex items-center gap-2">
- <div className="w-2 h-2 rounded-sm" style={{ backgroundColor: point.seriesColor }} />
- <span className="text-neutral-300">{point.seriesId}</span>
- </div>
- <span className="text-neutral-200">{formatTooltipValue(Number(point.data.yFormatted))}</span>
- </div>
- ))}
- {monitorType === "http" && (
- <div className="flex justify-between items-center pt-1.5 border-t border-neutral-700">
- <span className="text-neutral-300">Total</span>
- <span className="text-white font-medium">{formatTooltipValue(total)}</span>
- </div>
- )}
</div>
- </div>
+ </ChartTooltip>
);
}}
/>
diff --git a/client/src/app/uptime/monitors/components/UptimeBar.tsx b/client/src/app/uptime/monitors/components/UptimeBar.tsx
index 4f96f0c56..e355fe245 100644
--- a/client/src/app/uptime/monitors/components/UptimeBar.tsx
+++ b/client/src/app/uptime/monitors/components/UptimeBar.tsx
@@ -19,7 +19,7 @@ export function UptimeBar({ monitorId, className }: UptimeBarProps) {
return (
<div className={cn("flex gap-1 h-6", className)}>
{Array.from({ length: 7 }).map((_, i) => (
- <div key={i} className="w-[10px] rounded-md bg-neutral-300 dark:bg-neutral-600 animate-pulse" />
+ <div key={i} className="w-[10px] rounded-md bg-neutral-150 dark:bg-neutral-600 animate-pulse" />
))}
</div>
);
diff --git a/client/src/components/AppSidebar.tsx b/client/src/components/AppSidebar.tsx
index 6dd3de99a..b4a06ae64 100644
--- a/client/src/components/AppSidebar.tsx
+++ b/client/src/components/AppSidebar.tsx
@@ -1,14 +1,14 @@
"use client";
import { BarChart, ShieldUser, User } from "lucide-react";
-import Image from "next/image";
import Link from "next/link";
import { usePathname } from "next/navigation";
-import { useState, Suspense } from "react";
-import { useAdminPermission } from "../app/admin/hooks/useAdminPermission";
-import { cn } from "../lib/utils";
+import { Suspense, useState } from "react";
import { useEmbedablePage } from "../app/[site]/utils";
+import { useAdminPermission } from "../app/admin/hooks/useAdminPermission";
import { IS_CLOUD } from "../lib/const";
+import { cn } from "../lib/utils";
+import { RybbitLogo } from "./RybbitLogo";
import { ThemeSwitcher } from "./ThemeSwitcher";
function AppSidebarContent() {
@@ -22,7 +22,7 @@ function AppSidebarContent() {
return (
<div
className={cn(
- "flex flex-col items-start justify-between h-dvh p-2 py-3 bg-neutral-900 border-r border-neutral-850 gap-3 transition-all duration-1s00",
+ "flex flex-col items-start justify-between h-dvh p-2 py-3 bg-neutral-50 dark:bg-neutral-900 border-r border-neutral-200 dark:border-neutral-850 gap-3 transition-all duration-1s00",
isExpanded ? "w-44" : "w-[45px]"
)}
onMouseEnter={() => setIsExpanded(true)}
@@ -30,7 +30,7 @@ function AppSidebarContent() {
>
<div className="flex flex-col items-start gap-2">
<Link href="/" className="mb-3 mt-1 ml-0.5 flex items-center justify-center">
- <Image src="/rybbit.svg" alt="Rybbit" width={24} height={18} />
+ <RybbitLogo width={24} height={18} />
</Link>
<SidebarLink
href="/"
@@ -98,7 +98,9 @@ function SidebarLink({
<div
className={cn(
"p-1 rounded-md transition-all duration-200 flex items-center gap-2",
- active ? "bg-neutral-800 text-white" : "text-neutral-400 hover:text-white hover:bg-neutral-800/80"
+ active
+ ? "bg-neutral-200 dark:bg-neutral-800 text-neutral-900 dark:text-white"
+ : "text-neutral-600 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-white hover:bg-neutral-150 dark:hover:bg-neutral-800/80"
// expanded ? "w-40" : "w-12"
)}
>
diff --git a/client/src/components/Channel.tsx b/client/src/components/Channel.tsx
index 9b75a4b9a..e602088fb 100644
--- a/client/src/components/Channel.tsx
+++ b/client/src/components/Channel.tsx
@@ -21,37 +21,37 @@ import { Favicon } from "./Favicon";
export const getChannelIcon = (channel: string) => {
switch (channel) {
case "Direct":
- return <Link className="w-4 h-4 text-gray-400" />;
+ return <Link className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
case "Organic Search":
- return <Search className="w-4 h-4 text-gray-400" />;
+ return <Search className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
case "Referral":
- return <ExternalLink className="w-4 h-4 text-gray-400" />;
+ return <ExternalLink className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
case "Organic Social":
- return <Users className="w-4 h-4 text-gray-400" />;
+ return <Users className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
case "Email":
- return <Mail className="w-4 h-4 text-gray-400" />;
+ return <Mail className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
case "Unknown":
- return <HelpCircle className="w-4 h-4 text-gray-400" />;
+ return <HelpCircle className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
case "Paid Search":
- return <Search className="w-4 h-4 text-gray-400" />;
+ return <Search className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
case "Paid Unknown":
- return <DollarSign className="w-4 h-4 text-gray-400" />;
+ return <DollarSign className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
case "Paid Social":
- return <Users className="w-4 h-4 text-gray-400" />;
+ return <Users className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
case "Display":
- return <Monitor className="w-4 h-4 text-gray-400" />;
+ return <Monitor className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
case "Organic Video":
- return <Video className="w-4 h-4 text-gray-400" />;
+ return <Video className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
case "Affiliate":
- return <Handshake className="w-4 h-4 text-gray-400" />;
+ return <Handshake className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
case "Content":
- return <FileText className="w-4 h-4 text-gray-400" />;
+ return <FileText className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
case "Organic Shopping":
- return <ShoppingCart className="w-4 h-4 text-gray-400" />;
+ return <ShoppingCart className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
case "Event":
- return <Calendar className="w-4 h-4 text-gray-400" />;
+ return <Calendar className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
case "Audio":
- return <Headphones className="w-4 h-4 text-gray-400" />;
+ return <Headphones className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
default:
return null;
}
@@ -139,7 +139,7 @@ export function Channel({ channel, referrer }: { channel: string; referrer: stri
if (domain) {
const displayName = getDisplayName(domain);
return (
- <Badge className="flex items-center gap-1 bg-neutral-800 text-gray-300">
+ <Badge className="flex items-center gap-1 bg-neutral-100 dark:bg-neutral-800 text-neutral-600 dark:text-gray-300">
<Favicon domain={domain} className="w-4 h-4" />
<span>{displayName}</span>
</Badge>
@@ -147,7 +147,7 @@ export function Channel({ channel, referrer }: { channel: string; referrer: stri
}
return (
- <Badge className="flex items-center gap-1 bg-neutral-800 text-gray-300">
+ <Badge className="flex items-center gap-1 bg-neutral-100 dark:bg-neutral-800 text-neutral-600 dark:text-gray-300">
{getChannelIcon(channel)}
<span>{channel}</span>
</Badge>
diff --git a/client/src/components/ErrorState.tsx b/client/src/components/ErrorState.tsx
index ba7c083b8..bdae918f1 100644
--- a/client/src/components/ErrorState.tsx
+++ b/client/src/components/ErrorState.tsx
@@ -6,8 +6,8 @@ export function ErrorState({ title, message, refetch }: { title: string; message
<div className="py-6 flex-1 flex flex-col items-center justify-center gap-3 transition-all">
<AlertCircle className="text-amber-400 w-8 h-8" />
<div className="text-center">
- <div className="text-neutral-100 font-medium mb-1">{title || "Failed to load data"}</div>
- <div className="text-sm text-neutral-400 max-w-md mx-auto mb-3">
+ <div className="text-neutral-900 dark:text-neutral-100 font-medium mb-1">{title || "Failed to load data"}</div>
+ <div className="text-sm text-neutral-500 dark:text-neutral-400 max-w-md mx-auto mb-3">
{message || "An error occurred while fetching data"}
</div>
</div>
@@ -15,7 +15,7 @@ export function ErrorState({ title, message, refetch }: { title: string; message
<Button
variant="outline"
size="sm"
- className="bg-transparent hover:bg-neutral-800 border-neutral-700 text-neutral-300 hover:text-neutral-100"
+ className="bg-transparent hover:bg-neutral-100 dark:hover:bg-neutral-800 border-neutral-200 dark:border-neutral-700 text-neutral-600 dark:text-neutral-300 hover:text-neutral-900 dark:hover:text-neutral-100"
onClick={() => refetch()}
>
<RefreshCcw className="w-3 h-3" /> Try Again
diff --git a/client/src/components/Loaders.tsx b/client/src/components/Loaders.tsx
index e00e61fed..1de8bcff2 100644
--- a/client/src/components/Loaders.tsx
+++ b/client/src/components/Loaders.tsx
@@ -4,9 +4,9 @@ export function ThreeDotLoader({ className }: { className?: string }) {
return (
<div className={cn("flex justify-center items-center h-[500px]", className)}>
<div className="animate-pulse flex items-center">
- <div className="h-2 w-2 bg-neutral-500 rounded-full mr-1 animate-bounce"></div>
- <div className="h-2 w-2 bg-neutral-500 rounded-full mr-1 animate-bounce [animation-delay:0.2s]"></div>
- <div className="h-2 w-2 bg-neutral-500 rounded-full animate-bounce [animation-delay:0.4s]"></div>
+ <div className="h-2 w-2 bg-neutral-600 dark:bg-neutral-500 rounded-full mr-1 animate-bounce"></div>
+ <div className="h-2 w-2 bg-neutral-600 dark:bg-neutral-500 rounded-full mr-1 animate-bounce [animation-delay:0.2s]"></div>
+ <div className="h-2 w-2 bg-neutral-600 dark:bg-neutral-500 rounded-full animate-bounce [animation-delay:0.4s]"></div>
</div>
</div>
);
diff --git a/client/src/components/MultiSelect.tsx b/client/src/components/MultiSelect.tsx
index 7acd68e02..bfc925328 100644
--- a/client/src/components/MultiSelect.tsx
+++ b/client/src/components/MultiSelect.tsx
@@ -24,7 +24,7 @@ export const MultiSelect = forwardRef<any, MultiSelectProps<any>>(({ className,
classNames={{
control: ({ isFocused }) =>
cn(
- "flex min-h-[36px] rounded-md px-3 py-[3px] text-sm shadow-sm transition-colors ",
+ "flex min-h-[36px] rounded-md px-3 py-[3px] text-sm shadow-sm transition-colors border border-neutral-200 dark:border-neutral-750",
"placeholder:text-muted-foreground ",
"disabled:cursor-not-allowed disabled:opacity-50",
isFocused && "ring-1 ring-ring",
@@ -32,7 +32,8 @@ export const MultiSelect = forwardRef<any, MultiSelectProps<any>>(({ className,
),
placeholder: () => "text-muted-foreground",
input: () => "text-sm",
- menu: () => "mt-2 rounded-md border-neutral-200 bg-neutral-900 text-neutral-50 shadow-md py-1",
+ menu: () =>
+ "mt-2 rounded-md border border-neutral-150 bg-white text-neutral-900 dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-50 shadow-md py-1",
menuList: () => "text-sm",
option: ({ isFocused, isSelected }) =>
cn(
@@ -41,7 +42,8 @@ export const MultiSelect = forwardRef<any, MultiSelectProps<any>>(({ className,
isFocused && !isSelected && "bg-accent text-accent-foreground",
!isFocused && !isSelected && "text-popover-foreground hover:bg-accent hover:text-accent-foreground"
),
- multiValue: () => "inline-flex items-center bg-neutral-750 rounded-md text-secondary-foreground mr-1",
+ multiValue: () =>
+ "inline-flex items-center bg-neutral-200 dark:bg-neutral-750 rounded-md text-secondary-foreground mr-1",
multiValueLabel: () => "px-2 text-xs leading-none",
multiValueRemove: () =>
cn("flex items-center justify-center p-1", "hover:bg-destructive hover:text-destructive-foreground"),
@@ -51,12 +53,6 @@ export const MultiSelect = forwardRef<any, MultiSelectProps<any>>(({ className,
indicatorSeparator: () => "bg-input mx-2 my-2 w-[1px]",
noOptionsMessage: () => "text-muted-foreground p-2 text-sm",
}}
- styles={{
- control: base => ({
- ...base,
- border: "1px solid hsl(var(--neutral-750))",
- }),
- }}
{...props}
/>
);
diff --git a/client/src/components/RybbitLogo.tsx b/client/src/components/RybbitLogo.tsx
new file mode 100644
index 000000000..ba46371a1
--- /dev/null
+++ b/client/src/components/RybbitLogo.tsx
@@ -0,0 +1,9 @@
+import Image from "next/image";
+
+export function RybbitLogo({ width = 32, height = 32 }: { width?: number; height?: number }) {
+ return <Image src="/rybbit.svg" alt="Rybbit" width={width} height={height} className="invert dark:invert-0" />;
+}
+
+export function RybbitTextLogo({ width = 150, height = 34 }: { width?: number; height?: number }) {
+ return <Image src="/rybbit-text.svg" alt="Rybbit" width={width} height={height} className="dark:invert-0 invert" />;
+}
diff --git a/client/src/components/Sessions/SessionCard.tsx b/client/src/components/Sessions/SessionCard.tsx
index e23bb82f0..f1a1dd07d 100644
--- a/client/src/components/Sessions/SessionCard.tsx
+++ b/client/src/components/Sessions/SessionCard.tsx
@@ -53,12 +53,12 @@ export function SessionCard({ session, onClick, userId, expandedByDefault }: Ses
const name = generateName(session.user_id);
return (
- <div className="rounded-lg bg-neutral-900 border border-neutral-800 overflow-hidden">
+ <div className="rounded-lg bg-white dark:bg-neutral-900 border border-neutral-100 dark:border-neutral-800 overflow-hidden">
<div className="p-3 cursor-pointer" onClick={handleCardClick}>
<div className="flex items-center gap-2">
<div className="hidden md:flex items-center gap-2">
<Avatar size={24} id={session.user_id} />
- <span className="text-xs text-neutral-200 w-24 truncate">{name}</span>
+ <span className="text-xs text-neutral-600 dark:text-neutral-200 w-24 truncate">{name}</span>
</div>
{/* Icons section */}
@@ -78,7 +78,7 @@ export function SessionCard({ session, onClick, userId, expandedByDefault }: Ses
/>
<Tooltip>
<TooltipTrigger asChild>
- <Badge className="flex items-center gap-1 bg-neutral-800 text-gray-300">
+ <Badge className="flex items-center gap-1 bg-neutral-100 dark:bg-neutral-800 text-neutral-600 dark:text-gray-300">
<PageviewIcon />
<span>{formatter(session.pageviews)}</span>
</Badge>
@@ -87,7 +87,7 @@ export function SessionCard({ session, onClick, userId, expandedByDefault }: Ses
</Tooltip>
<Tooltip>
<TooltipTrigger asChild>
- <Badge className="flex items-center gap-1 bg-neutral-800 text-gray-300">
+ <Badge className="flex items-center gap-1 bg-neutral-100 dark:bg-neutral-800 text-neutral-600 dark:text-gray-300">
<EventIcon />
<span>{formatter(session.events)}</span>
</Badge>
@@ -101,7 +101,7 @@ export function SessionCard({ session, onClick, userId, expandedByDefault }: Ses
<div className="items-center ml-3 flex-1 min-w-0 hidden md:flex">
<Tooltip>
<TooltipTrigger asChild>
- <span className="text-xs text-gray-400 truncate max-w-[200px] inline-block">
+ <span className="text-xs text-neutral-500 dark:text-gray-400 truncate max-w-[200px] inline-block">
{truncatePath(session.entry_page)}
</span>
</TooltipTrigger>
@@ -110,11 +110,11 @@ export function SessionCard({ session, onClick, userId, expandedByDefault }: Ses
</TooltipContent>
</Tooltip>
- <ArrowRight className="mx-2 w-3 h-3 flex-shrink-0 text-gray-400" />
+ <ArrowRight className="mx-2 w-3 h-3 flex-shrink-0 text-neutral-500 dark:text-gray-400" />
<Tooltip>
<TooltipTrigger asChild>
- <span className="text-xs text-gray-400 truncate max-w-[200px] inline-block">
+ <span className="text-xs text-neutral-500 dark:text-gray-400 truncate max-w-[200px] inline-block">
{truncatePath(session.exit_page)}
</span>
</TooltipTrigger>
@@ -126,8 +126,8 @@ export function SessionCard({ session, onClick, userId, expandedByDefault }: Ses
{/* Time information */}
- <div className="flex items-center gap-1.5 text-xs text-gray-300">
- <span className="text-gray-400">
+ <div className="flex items-center gap-1.5 text-xs text-neutral-600 dark:text-gray-300">
+ <span className="text-neutral-500 dark:text-gray-400">
{DateTime.fromSQL(session.session_start, {
zone: "utc",
})
@@ -135,16 +135,16 @@ export function SessionCard({ session, onClick, userId, expandedByDefault }: Ses
.toLocal()
.toFormat(hour12 ? "MMM d, h:mm a" : "dd MMM, HH:mm")}
</span>
- <span className="text-gray-400">•</span>
+ <span className="text-neutral-500 dark:text-gray-400">•</span>
<span className="hidden md:block">{duration}</span>
</div>
{/* Expand/Collapse icon */}
<div className="ml-2 flex-shrink-0 hidden md:flex">
{expanded ? (
- <ChevronDown className="w-4 h-4 text-gray-400" strokeWidth={3} />
+ <ChevronDown className="w-4 h-4 text-neutral-500 dark:text-gray-400" strokeWidth={3} />
) : (
- <ChevronRight className="w-4 h-4 text-gray-400" strokeWidth={3} />
+ <ChevronRight className="w-4 h-4 text-neutral-500 dark:text-gray-400" strokeWidth={3} />
)}
</div>
</div>
@@ -177,7 +177,10 @@ export const SessionCardSkeleton = memo(() => {
// Create multiple skeletons for a realistic loading state
const skeletons = Array.from({ length: 25 }).map((_, index) => (
- <div className="rounded-lg bg-neutral-900 border border-neutral-800 overflow-hidden" key={index}>
+ <div
+ className="rounded-lg bg-white dark:bg-neutral-900 border border-neutral-100 dark:border-neutral-800 overflow-hidden"
+ key={index}
+ >
<div className="p-3">
<div className="flex items-center gap-2">
{/* Avatar and User ID */}
@@ -204,14 +207,14 @@ export const SessionCardSkeleton = memo(() => {
{/* Entry/Exit paths with randomized widths */}
<div className="items-center ml-3 flex-1 min-w-0 hidden md:flex">
<Skeleton className={cn("h-3 max-w-[200px]", getRandomWidth())} />
- <ArrowRight className="mx-2 w-3 h-3 flex-shrink-0 text-gray-400 opacity-20" />
+ <ArrowRight className="mx-2 w-3 h-3 flex-shrink-0 text-neutral-500 dark:text-gray-400 opacity-20" />
<Skeleton className={cn("h-3 max-w-[200px]", getRandomWidth())} />
</div>
{/* Time information */}
<div className="flex items-center gap-1.5">
<Skeleton className={cn("h-3", getRandomTimeWidth())} />
- <span className="text-gray-400 opacity-20">•</span>
+ <span className="text-neutral-500 dark:text-gray-400 opacity-20">•</span>
<Skeleton className={cn("h-3 hidden md:block", getRandomDurationWidth())} />
</div>
diff --git a/client/src/components/Sessions/SessionDetails.tsx b/client/src/components/Sessions/SessionDetails.tsx
index 5926391fb..f31bed222 100644
--- a/client/src/components/Sessions/SessionDetails.tsx
+++ b/client/src/components/Sessions/SessionDetails.tsx
@@ -57,7 +57,7 @@ function PageviewItem({
<div className="relative flex-shrink-0">
{!isLast && (
<div
- className="absolute top-8 left-4 w-[1px] bg-neutral-700"
+ className="absolute top-8 left-4 w-[1px] bg-neutral-200 dark:bg-neutral-600/25"
style={{
height: "calc(100% - 20px)",
}}
@@ -67,13 +67,7 @@ function PageviewItem({
<div
className={cn(
"flex items-center justify-center w-8 h-8 rounded-full border",
- isEvent
- ? "bg-amber-900/30 border-amber-500/50"
- : isError
- ? "bg-red-900/30 border-red-500/50"
- : isOutbound
- ? "bg-purple-900/30 border-purple-500/50"
- : "bg-blue-900/30 border-blue-500/50"
+ "bg-neutral-50 border-neutral-200 dark:bg-neutral-600/10 dark:border-neutral-600/25"
)}
>
<span className="text-sm font-medium">{index + 1}</span>
@@ -129,28 +123,28 @@ function PageviewItem({
)}
</div>
- <div className="text-xs text-neutral-400 flex-shrink-0">{formattedTime}</div>
+ <div className="text-xs text-neutral-500 dark:text-neutral-400 flex-shrink-0">{formattedTime}</div>
</div>
{isPageview && duration && (
<div className="flex items-center pl-7 mt-1">
- <div className="text-xs text-neutral-400">
- <Clock className="w-3 h-3 inline mr-1 text-neutral-400" />
+ <div className="text-xs text-neutral-500 dark:text-neutral-400">
+ <Clock className="w-3 h-3 inline mr-1 text-neutral-500 dark:text-neutral-400" />
{duration}
</div>
</div>
)}
{isEvent && (
<div className="flex items-center pl-7 mt-1">
- <div className="text-xs text-neutral-400">
+ <div className="text-xs text-neutral-500 dark:text-neutral-400">
{item.props && Object.keys(item.props).length > 0 ? (
<span className="flex flex-wrap gap-2 mt-1">
{Object.entries(item.props).map(([key, value]) => (
<Badge
key={key}
variant="outline"
- className="px-1.5 py-0 h-5 text-xs bg-neutral-800 text-neutral-100 font-medium"
+ className="px-1.5 py-0 h-5 text-xs bg-neutral-200 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100 font-medium"
>
- <span className="text-neutral-300 font-light mr-1">{key}:</span>{" "}
+ <span className="text-neutral-600 dark:text-neutral-300 font-light mr-1">{key}:</span>{" "}
<Tooltip>
<TooltipTrigger asChild>
<span className="truncate">
@@ -172,23 +166,25 @@ function PageviewItem({
)}
{isOutbound && (
<div className="flex items-center pl-7 mt-1">
- <div className="text-xs text-neutral-400">
+ <div className="text-xs text-neutral-500 dark:text-neutral-400">
{item.props && Object.keys(item.props).length > 0 ? (
<span className="flex flex-wrap gap-2 mt-1">
{item.props.text ? (
<Badge
variant="outline"
- className="px-1.5 py-0 h-5 text-xs bg-neutral-800 text-neutral-100 font-medium"
+ className="px-1.5 py-0 h-5 text-xs bg-neutral-200 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100 font-medium"
>
- <span className="text-neutral-300 font-light mr-1">text:</span> {String(item.props.text)}
+ <span className="text-neutral-600 dark:text-neutral-300 font-light mr-1">text:</span>{" "}
+ {String(item.props.text)}
</Badge>
) : null}
{item.props.target ? (
<Badge
variant="outline"
- className="px-1.5 py-0 h-5 text-xs bg-neutral-800 text-neutral-100 font-medium"
+ className="px-1.5 py-0 h-5 text-xs bg-neutral-200 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100 font-medium"
>
- <span className="text-neutral-300 font-light mr-1">target:</span> {String(item.props.target)}
+ <span className="text-neutral-600 dark:text-neutral-300 font-light mr-1">target:</span>{" "}
+ {String(item.props.target)}
</Badge>
) : null}
</span>
@@ -198,23 +194,24 @@ function PageviewItem({
)}
{isError && (
<div className="flex items-center pl-7 mt-1">
- <div className="text-xs text-neutral-400">
+ <div className="text-xs text-neutral-500 dark:text-neutral-400">
{item.props ? (
<span>
{item.props.message && (
<Badge
key="message"
variant="outline"
- className="px-1.5 py-0 h-5 text-xs bg-neutral-800 text-neutral-100 font-medium"
+ className="px-1.5 py-0 h-5 text-xs bg-neutral-200 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100 font-medium"
>
- <span className="text-neutral-300 font-light mr-1">message:</span> {String(item.props.message)}
+ <span className="text-neutral-600 dark:text-neutral-300 font-light mr-1">message:</span>{" "}
+ {String(item.props.message)}
</Badge>
)}
{item.props.stack && (
<div>
- <p className="mt-2 mb-1 text-neutral-300 font-light">Stack Trace:</p>
- <pre className="text-xs text-neutral-100 bg-neutral-800 p-2 rounded overflow-x-auto whitespace-pre-wrap break-words">
+ <p className="mt-2 mb-1 text-neutral-600 dark:text-neutral-300 font-light">Stack Trace:</p>
+ <pre className="text-xs text-neutral-900 dark:text-neutral-100 bg-neutral-200 dark:bg-neutral-800 p-2 rounded overflow-x-auto whitespace-pre-wrap break-words">
{item.props.stack}
</pre>
</div>
@@ -313,7 +310,7 @@ export function SessionDetails({ session, userId }: SessionDetailsProps) {
const { getRegionName } = useGetRegionName();
return (
- <div className="px-4 bg-neutral-900 border-t border-neutral-800">
+ <div className="px-4 bg-white dark:bg-neutral-900 border-t border-neutral-300 dark:border-neutral-800">
{isLoading ? (
<SessionDetailsTimelineSkeleton itemCount={session.pageviews + session.events} />
) : error ? (
@@ -323,7 +320,7 @@ export function SessionDetails({ session, userId }: SessionDetailsProps) {
) : sessionDetailsData?.pages[0]?.data ? (
<Tabs defaultValue="timeline" className="mt-4">
<div className="flex justify-between items-center mb-6">
- <TabsList className="bg-neutral-800">
+ <TabsList>
<TabsTrigger value="timeline">Timeline</TabsTrigger>
<TabsTrigger value="info">Session Info</TabsTrigger>
</TabsList>
@@ -380,7 +377,7 @@ export function SessionDetails({ session, userId }: SessionDetailsProps) {
)}
{sessionDetailsData.pages[0]?.data?.pagination?.total > 0 && (
- <div className="text-center text-xs text-neutral-500 mt-2">
+ <div className="text-center text-xs text-neutral-400 dark:text-neutral-500 mt-2">
Showing {allEvents.length} of {sessionDetailsData.pages[0]?.data?.pagination?.total} events
</div>
)}
@@ -391,22 +388,22 @@ export function SessionDetails({ session, userId }: SessionDetailsProps) {
<div className="grid grid-cols-1 lg:grid-cols-[auto_auto_auto] gap-8 mb-6">
{/* User Information */}
<div>
- <h4 className="text-sm font-medium mb-3 text-neutral-300 border-b border-neutral-800 pb-2">
+ <h4 className="text-sm font-medium mb-3 text-neutral-600 dark:text-neutral-300 border-b border-neutral-300 dark:border-neutral-800 pb-2">
User Information
</h4>
<div className="space-y-3">
{sessionDetails?.user_id && (
<div className="flex items-center gap-2">
- <div className="h-10 w-10 bg-neutral-800 rounded-full flex items-center justify-center flex-shrink-0">
+ <div className="h-10 w-10 bg-neutral-200 dark:bg-neutral-800 rounded-full flex items-center justify-center flex-shrink-0">
<Avatar size={40} id={sessionDetails.user_id} />
</div>
<div>
- <div className="text-sm text-neutral-400 flex items-center">
- <span className="font-medium text-neutral-300">User ID:</span>
+ <div className="text-sm text-neutral-500 dark:text-neutral-400 flex items-center">
+ <span className="font-medium text-neutral-600 dark:text-neutral-300">User ID:</span>
<CopyText text={sessionDetails.user_id} maxLength={24} className="inline-flex ml-2" />
</div>
- <div className="text-sm text-neutral-400 flex items-center">
- <span className="font-medium text-neutral-300">Session ID:</span>
+ <div className="text-sm text-neutral-500 dark:text-neutral-400 flex items-center">
+ <span className="font-medium text-neutral-600 dark:text-neutral-300">Session ID:</span>
<CopyText text={sessionDetails.session_id} maxLength={20} className="inline-flex ml-2" />
</div>
</div>
@@ -425,8 +422,10 @@ export function SessionDetails({ session, userId }: SessionDetailsProps) {
{sessionDetails?.country && (
<div className="flex items-center gap-2 text-sm">
- <span className="font-medium text-neutral-300 min-w-[80px]">Country:</span>
- <div className="flex items-center gap-1 text-neutral-400">
+ <span className="font-medium text-neutral-600 dark:text-neutral-300 min-w-[80px]">
+ Country:
+ </span>
+ <div className="flex items-center gap-1 text-neutral-500 dark:text-neutral-400">
<CountryFlag country={sessionDetails.country} />
<span>{getCountryName(sessionDetails.country)}</span>
{sessionDetails.region && <span>({sessionDetails.region})</span>}
@@ -435,13 +434,13 @@ export function SessionDetails({ session, userId }: SessionDetailsProps) {
)}
{sessionDetails?.region && getRegionName(sessionDetails.region) && (
<div className="flex items-center gap-2 text-sm">
- <span className="font-medium text-neutral-300 min-w-[80px]">Region:</span>
+ <span className="font-medium text-neutral-600 dark:text-neutral-300 min-w-[80px]">Region:</span>
<span className="text-neutral-400">{getRegionName(sessionDetails.region)}</span>
</div>
)}
{sessionDetails?.city && (
<div className="flex items-center gap-2 text-sm">
- <span className="font-medium text-neutral-300 min-w-[80px]">City:</span>
+ <span className="font-medium text-neutral-600 dark:text-neutral-300 min-w-[80px]">City:</span>
<span className="text-neutral-400">{sessionDetails.city}</span>
</div>
)}
@@ -451,7 +450,7 @@ export function SessionDetails({ session, userId }: SessionDetailsProps) {
{/* Device Information */}
<div>
- <h4 className="text-sm font-medium mb-3 text-neutral-300 border-b border-neutral-800 pb-2">
+ <h4 className="text-sm font-medium mb-3 text-neutral-600 dark:text-neutral-300 border-b border-neutral-300 dark:border-neutral-800 pb-2">
Device Information
</h4>
<div className="space-y-3">
@@ -510,7 +509,7 @@ export function SessionDetails({ session, userId }: SessionDetailsProps) {
{/* Source Information */}
<div>
- <h4 className="text-sm font-medium mb-3 text-neutral-300 border-b border-neutral-800 pb-2">
+ <h4 className="text-sm font-medium mb-3 text-neutral-600 dark:text-neutral-300 border-b border-neutral-300 dark:border-neutral-800 pb-2">
Source Information
</h4>
<div className="space-y-3">
diff --git a/client/src/components/Sessions/SessionsList.tsx b/client/src/components/Sessions/SessionsList.tsx
index 1fa078db5..68662c2df 100644
--- a/client/src/components/Sessions/SessionsList.tsx
+++ b/client/src/components/Sessions/SessionsList.tsx
@@ -40,7 +40,7 @@ export function SessionsList({
<Button variant="ghost" size="smIcon" onClick={() => onPageChange(page - 1)} disabled={!hasPrevPage}>
<ChevronLeft className="h-4 w-4" />
</Button>
- <span className="text-sm text-neutral-400">Page {page}</span>
+ <span className="text-sm text-neutral-500 dark:text-neutral-400">Page {page}</span>
<Button variant="ghost" size="smIcon" onClick={() => onPageChange(page + 1)} disabled={!hasNextPage}>
<ChevronRight className="h-4 w-4" />
</Button>
diff --git a/client/src/components/SiteCard.tsx b/client/src/components/SiteCard.tsx
index cc2d279ed..d6a11f66f 100644
--- a/client/src/components/SiteCard.tsx
+++ b/client/src/components/SiteCard.tsx
@@ -65,7 +65,7 @@ export function SiteCard({ siteId, domain }: SiteCardProps) {
return (
<div
ref={ref}
- className="flex flex-col rounded-lg bg-neutral-900/70 p-4 border border-neutral-850 shadow-lg hover:shadow-xl hover:border-neutral-800 transition-all duration-300 hover:translate-y-[-2px]"
+ className="flex flex-col rounded-lg bg-white dark:bg-neutral-900/70 p-4 border border-neutral-100 dark:border-neutral-850 shadow-lg hover:shadow-xl hover:border-neutral-200 dark:hover:border-neutral-800 transition-all duration-300 hover:translate-y-[-2px]"
>
{showSkeleton ? (
<>
@@ -81,12 +81,12 @@ export function SiteCard({ siteId, domain }: SiteCardProps) {
</div>
<div className="grid grid-cols-3 gap-2 mt-2">
- <div className="flex flex-col gap-1 items-center bg-neutral-800/50 rounded-md p-2">
+ <div className="flex flex-col gap-1 items-center bg-neutral-100 dark:bg-neutral-800/50 rounded-md p-2">
<Skeleton className="h-3 w-16 rounded" />
<Skeleton className="h-6 w-10 rounded mt-1" />
</div>
- <div className="flex flex-col gap-1 items-center bg-neutral-800/50 rounded-md p-2">
+ <div className="flex flex-col gap-1 items-center bg-neutral-100 dark:bg-neutral-800/50 rounded-md p-2">
<Skeleton className="h-3 w-16 rounded" />
<Skeleton className="h-6 w-10 rounded mt-1" />
</div>
@@ -108,20 +108,20 @@ export function SiteCard({ siteId, domain }: SiteCardProps) {
<div className="relative mt-1 mb-1 rounded-md p-2 overflow-hidden">
<SiteSessionChart data={data?.data ?? []} height={110} />
{!hasData && (
- <div className="absolute inset-0 flex items-center justify-center bg-neutral-900/70 backdrop-blur-sm">
- <span className="text-sm text-neutral-400">No data available</span>
+ <div className="absolute inset-0 flex items-center justify-center bg-white/70 dark:bg-neutral-900/70 backdrop-blur-sm">
+ <span className="text-sm text-neutral-500 dark:text-neutral-400">No data available</span>
</div>
)}
</div>
<div className="grid grid-cols-3 gap-2 mt-2">
- <div className="flex flex-col gap-1 items-center bg-neutral-800/50 rounded-md p-2 hover:bg-neutral-800 transition-colors">
- <div className="text-xs text-neutral-400">Sessions</div>
+ <div className="flex flex-col gap-1 items-center bg-neutral-50 dark:bg-neutral-800/50 rounded-md p-2 hover:bg-neutral-150 dark:hover:bg-neutral-800 transition-colors">
+ <div className="text-xs text-neutral-500 dark:text-neutral-400">Sessions</div>
<div className="font-semibold">{overviewData?.data?.sessions?.toLocaleString() || "0"}</div>
</div>
- <div className="flex flex-col gap-1 items-center bg-neutral-800/50 rounded-md p-2 hover:bg-neutral-800 transition-colors">
- <div className="text-xs text-neutral-400">Users</div>
+ <div className="flex flex-col gap-1 items-center bg-neutral-50 dark:bg-neutral-800/50 rounded-md p-2 hover:bg-neutral-150 dark:hover:bg-neutral-800 transition-colors">
+ <div className="text-xs text-neutral-500 dark:text-neutral-400">Users</div>
<div className="font-semibold">{overviewData?.data?.users?.toLocaleString() || "0"}</div>
</div>
@@ -129,7 +129,7 @@ export function SiteCard({ siteId, domain }: SiteCardProps) {
<Button
variant="outline"
size="sm"
- className="w-full h-full border-neutral-700 bg-neutral-800/50 hover:bg-neutral-800 hover:text-blue-400 transition-all"
+ className="w-full h-full border-neutral-150 dark:border-neutral-700 bg-neutral-50 dark:bg-neutral-800/50 hover:bg-neutral-150 dark:hover:bg-neutral-800 hover:text-blue-400 transition-all"
>
<span className="mr-1">View</span>
<ArrowRight size={14} className="transition-transform group-hover:translate-x-0.5" />
diff --git a/client/src/components/SiteSessionChart.tsx b/client/src/components/SiteSessionChart.tsx
index 23af961d8..bdb10046d 100644
--- a/client/src/components/SiteSessionChart.tsx
+++ b/client/src/components/SiteSessionChart.tsx
@@ -5,6 +5,7 @@ import { useMemo } from "react";
import { GetOverviewBucketedResponse } from "../api/analytics/useGetOverviewBucketed";
import { formatter } from "../lib/utils";
import { hour12 } from "../lib/dateTimeUtils";
+import { ChartTooltip } from "./charts/ChartTooltip";
interface SiteSessionChartProps {
data: GetOverviewBucketedResponse;
@@ -89,13 +90,15 @@ export function SiteSessionChart({ data, height = 100 }: SiteSessionChartProps)
const currentTime = slice.points[0].data.currentTime as DateTime;
return (
- <div className="bg-neutral-800 border-neutral-700 border p-2 rounded-md">
- <div className="text-xs mb-1">Sessions</div>
- <div className="flex justify-between text-xs w-20">
- <div className="text-muted-foreground">{currentTime.toFormat(hour12 ? "ha" : "HH:mm")}</div>
- <div className="font-medium">{currentY.toLocaleString()}</div>
+ <ChartTooltip>
+ <div className="p-2">
+ <div className="text-xs mb-1">Sessions</div>
+ <div className="flex justify-between text-xs w-20">
+ <div className="text-muted-foreground">{currentTime.toFormat(hour12 ? "ha" : "HH:mm")}</div>
+ <div className="font-medium">{currentY.toLocaleString()}</div>
+ </div>
</div>
- </div>
+ </ChartTooltip>
);
}}
/>
diff --git a/client/src/components/SiteSettings/GSCManager.tsx b/client/src/components/SiteSettings/GSCManager.tsx
index b45481ffe..414d54665 100644
--- a/client/src/components/SiteSettings/GSCManager.tsx
+++ b/client/src/components/SiteSettings/GSCManager.tsx
@@ -1,14 +1,13 @@
"use client";
-import { ExternalLink } from "lucide-react";
-import { Button } from "@/components/ui/button";
-import { useGSCConnection, useConnectGSC, useDisconnectGSC } from "@/api/gsc/useGSCConnection";
-import { toast } from "sonner";
+import { useConnectGSC, useDisconnectGSC, useGSCConnection } from "@/api/gsc/useGSCConnection";
import { ConfirmationModal } from "@/components/ConfirmationModal";
-import { useStore } from "@/lib/store";
-import { useEffect, useState } from "react";
-import { useSearchParams } from "next/navigation";
+import { Button } from "@/components/ui/button";
import { SiGoogle } from "@icons-pack/react-simple-icons";
+import { ExternalLink } from "lucide-react";
+import { useSearchParams } from "next/navigation";
+import { useEffect, useState } from "react";
+import { toast } from "sonner";
interface GSCManagerProps {
disabled?: boolean;
diff --git a/client/src/components/ThemeSwitcher.tsx b/client/src/components/ThemeSwitcher.tsx
index 19dab77fb..9958af658 100644
--- a/client/src/components/ThemeSwitcher.tsx
+++ b/client/src/components/ThemeSwitcher.tsx
@@ -15,7 +15,7 @@ export function ThemeSwitcher() {
if (!mounted) {
return (
- <div className="bg-neutral-800 p-0.5 rounded-full w-[52px] h-[26px]" />
+ <div className="bg-neutral-200 dark:bg-neutral-800 p-0.5 rounded-full w-[52px] h-[26px]" />
);
}
@@ -24,7 +24,7 @@ export function ThemeSwitcher() {
return (
<button
onClick={() => setTheme(isDark ? "light" : "dark")}
- className="bg-neutral-800 p-0.5 rounded-full flex items-center gap-0.5 transition-colors hover:bg-neutral-700"
+ className="bg-neutral-200 dark:bg-neutral-800 p-0.5 rounded-full flex items-center gap-0.5 transition-colors hover:bg-neutral-300 dark:hover:bg-neutral-700"
aria-label="Toggle theme"
>
<div
@@ -39,7 +39,7 @@ export function ThemeSwitcher() {
isDark ? "bg-neutral-700 shadow-sm" : "bg-transparent"
}`}
>
- <Moon className={`w-3 h-3 ${isDark ? "text-white" : "text-neutral-500"}`} />
+ <Moon className={`w-3 h-3 ${isDark ? "text-white" : "text-neutral-400"}`} />
</div>
</button>
);
diff --git a/client/src/components/TopBar.tsx b/client/src/components/TopBar.tsx
deleted file mode 100644
index 1aad79eea..000000000
--- a/client/src/components/TopBar.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-"use client";
-
-import { useQueryClient } from "@tanstack/react-query";
-import { User } from "lucide-react";
-import Image from "next/image";
-import Link from "next/link";
-import { useRouter } from "next/navigation";
-import { authClient } from "../lib/auth";
-import { Button } from "./ui/button";
-import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "./ui/dropdown-menu";
-import { Skeleton } from "./ui/skeleton";
-import { DEMO_HOSTNAME, IS_CLOUD } from "../lib/const";
-
-export function TopBar() {
- const { data: session, isPending } = authClient.useSession();
- const router = useRouter();
- const queryClient = useQueryClient();
-
- return (
- <div className="flex py-2 pr-3 pl-6 items-center w-full bg-neutral-950 justify-center border-b border-neutral-750">
- <div className="flex items-center justify-between flex-1">
- <div className="flex items-center space-x-4">
- <Link href={session ? "/" : "https://rybbit.com"}>
- <Image src="/rybbit-text.svg" alt="Rybbit" width={100} height={22} />
- </Link>
- </div>
- {session ? (
- <DropdownMenu>
- <DropdownMenuTrigger
- className="flex items-center gap-1 text-xs font-medium px-2 py-0"
- variant="ghost"
- size="xs"
- >
- <User className="w-4 h-4" />
- {session?.user.name}
- </DropdownMenuTrigger>
- <DropdownMenuContent align="end">
- <Link href="/account" passHref>
- <DropdownMenuItem>Account</DropdownMenuItem>
- </Link>
- <Link href="/organization/members" passHref>
- <DropdownMenuItem>Organization</DropdownMenuItem>
- </Link>
- <DropdownMenuItem
- onClick={async () => {
- // Clear the query cache before signing out
- queryClient.clear();
- await authClient.signOut();
- router.push("/login");
- }}
- >
- Sign out
- </DropdownMenuItem>
- {session?.user.role === "admin" && IS_CLOUD && (
- <Link href="/admin" passHref>
- <DropdownMenuItem>Admin</DropdownMenuItem>
- </Link>
- )}
- </DropdownMenuContent>
- </DropdownMenu>
- ) : isPending ? (
- <Skeleton className="w-20 h-4 mr-2" />
- ) : (
- <Link
- href={
- typeof window !== "undefined" && globalThis.location.hostname === DEMO_HOSTNAME
- ? "https://app.rybbit.io/signup"
- : "/signup"
- }
- passHref
- >
- <Button variant="ghost" size="xs">
- Sign up
- </Button>
- </Link>
- )}
- </div>
- </div>
- );
-}
diff --git a/client/src/components/UsageChart.tsx b/client/src/components/UsageChart.tsx
index 43c6f245f..e4d46f2d0 100644
--- a/client/src/components/UsageChart.tsx
+++ b/client/src/components/UsageChart.tsx
@@ -1,5 +1,5 @@
"use client";
-import { nivoTheme } from "@/lib/nivo";
+import { getNivoTheme } from "@/lib/nivo";
import { ResponsiveLine } from "@nivo/line";
import { useWindowSize } from "@uidotdev/usehooks";
import { DateTime } from "luxon";
@@ -7,6 +7,8 @@ import { useGetOrgEventCount } from "../api/analytics/useGetOrgEventCount";
import { userLocale } from "../lib/dateTimeUtils";
import { formatter } from "../lib/utils";
import { Badge } from "./ui/badge";
+import { useTheme } from "next-themes";
+import { ChartTooltip } from "./charts/ChartTooltip";
interface UsageChartProps {
organizationId: string;
@@ -17,6 +19,8 @@ interface UsageChartProps {
export function UsageChart({ organizationId, startDate, endDate, timeZone = "UTC" }: UsageChartProps) {
const { width } = useWindowSize();
+ const { theme } = useTheme();
+ const nivoTheme = getNivoTheme(theme === "dark");
// Fetch the data inside the component
const { data, isLoading, error } = useGetOrgEventCount({
@@ -110,9 +114,9 @@ export function UsageChart({ organizationId, startDate, endDate, timeZone = "UTC
return (
<div>
- <h3 className="font-medium text-sm text-neutral-300 mb-2 flex items-center gap-2 mb-4">
+ <h3 className="font-medium text-sm text-neutral-600 dark:text-neutral-300 mb-2 flex items-center gap-2 mb-4">
Last 30 Days Usage
- <Badge variant="outline" className="text-neutral-300">
+ <Badge variant="outline" className="text-neutral-600 dark:text-neutral-300">
{totalEvents.toLocaleString()} events
</Badge>
</h3>
@@ -172,26 +176,28 @@ export function UsageChart({ organizationId, startDate, endDate, timeZone = "UTC
const total = slice.points.reduce((acc: number, point: any) => acc + Number(point.data.yFormatted), 0);
return (
- <div className="text-sm bg-neutral-850 p-3 rounded-md min-w-[100px] border border-neutral-750">
- <div className="font-medium mb-1">{currentTime.toLocaleString(DateTime.DATE_MED)}</div>
- {slice.points
- .sort((a: any, b: any) => a.seriesId.localeCompare(b.seriesId))
- .map((point: any) => {
- return (
- <div key={point.serieId} className="flex justify-between gap-4 text-sm">
- <div className="flex items-center gap-2 text-neutral-300">
- <div className="w-2 h-2 rounded-full" style={{ backgroundColor: point.seriesColor }} />
- <span>{point.seriesId.charAt(0).toUpperCase() + point.seriesId.slice(1)}</span>
+ <ChartTooltip>
+ <div className="p-3 min-w-[100px]">
+ <div className="font-medium mb-1">{currentTime.toLocaleString(DateTime.DATE_MED)}</div>
+ {slice.points
+ .sort((a: any, b: any) => a.seriesId.localeCompare(b.seriesId))
+ .map((point: any) => {
+ return (
+ <div key={point.serieId} className="flex justify-between gap-4">
+ <div className="flex items-center gap-2">
+ <div className="w-2 h-2 rounded-full" style={{ backgroundColor: point.seriesColor }} />
+ <span>{point.seriesId.charAt(0).toUpperCase() + point.seriesId.slice(1)}</span>
+ </div>
+ <div>{Number(point.data.yFormatted).toLocaleString()}</div>
</div>
- <div>{Number(point.data.yFormatted).toLocaleString()}</div>
- </div>
- );
- })}
- <div className="text-sm mt-2 flex justify-between">
- <div className="text-neutral-300">Total</div>
- <div className="font-semibold">{total.toLocaleString()}</div>
+ );
+ })}
+ <div className="mt-2 flex justify-between border-t border-neutral-100 dark:border-neutral-750 pt-2">
+ <div>Total</div>
+ <div className="font-semibold">{total.toLocaleString()}</div>
+ </div>
</div>
- </div>
+ </ChartTooltip>
);
}}
/>
diff --git a/client/src/components/auth/AuthInput.tsx b/client/src/components/auth/AuthInput.tsx
index b668b2a2d..3cd23cb48 100644
--- a/client/src/components/auth/AuthInput.tsx
+++ b/client/src/components/auth/AuthInput.tsx
@@ -40,7 +40,6 @@ export function AuthInput({
value={value}
onChange={onChange}
required={required}
- className="h-10 transition-all bg-neutral-800/50 border-neutral-700"
minLength={type === "password" ? 8 : undefined}
/>
</div>
diff --git a/client/src/components/auth/SocialButtons.tsx b/client/src/components/auth/SocialButtons.tsx
index 48a65a7ae..0f1761181 100644
--- a/client/src/components/auth/SocialButtons.tsx
+++ b/client/src/components/auth/SocialButtons.tsx
@@ -33,21 +33,11 @@ export function SocialButtons({ onError, callbackURL, mode = "signin", className
</div>
<div className={`flex flex-col gap-2 ${className}`}>
- <Button
- type="button"
- variant="outline"
- onClick={() => handleSocialAuth("google")}
- className="transition-all duration-300 hover:bg-muted bg-neutral-800/50 border-neutral-700"
- >
+ <Button type="button" onClick={() => handleSocialAuth("google")}>
<SiGoogle />
Google
</Button>
- <Button
- type="button"
- variant="outline"
- onClick={() => handleSocialAuth("github")}
- className="transition-all duration-300 hover:bg-muted bg-neutral-800/50 border-neutral-700"
- >
+ <Button type="button" onClick={() => handleSocialAuth("github")}>
<SiGithub />
GitHub
</Button>
diff --git a/client/src/components/charts/ChartTooltip.tsx b/client/src/components/charts/ChartTooltip.tsx
new file mode 100644
index 000000000..f7cfc5126
--- /dev/null
+++ b/client/src/components/charts/ChartTooltip.tsx
@@ -0,0 +1,13 @@
+import { ReactNode } from "react";
+
+interface ChartTooltipProps {
+ children: ReactNode;
+}
+
+export function ChartTooltip({ children }: ChartTooltipProps) {
+ return (
+ <div className="text-sm bg-white dark:bg-neutral-850 rounded-lg border border-neutral-100 dark:border-neutral-750 shadow-md">
+ {children}
+ </div>
+ );
+}
diff --git a/client/src/components/sidebar/Sidebar.tsx b/client/src/components/sidebar/Sidebar.tsx
index 986233ff2..801c51c3e 100644
--- a/client/src/components/sidebar/Sidebar.tsx
+++ b/client/src/components/sidebar/Sidebar.tsx
@@ -3,19 +3,23 @@ import Link from "next/link";
import { cn } from "../../lib/utils";
function Root({ children }: { children: React.ReactNode }) {
- return <div className="w-56 bg-neutral-900 border-r border-neutral-850 flex flex-col">{children}</div>;
+ return (
+ <div className="w-56 bg-neutral-50 border-r border-neutral-150 dark:bg-neutral-900 dark:border-neutral-850 flex flex-col">
+ {children}
+ </div>
+ );
}
function Title({ children }: { children: React.ReactNode }) {
return (
- <div className="flex flex-col p-3 pt-4 border-b border-neutral-800">
- <div className="text-base text-neutral-100 mx-1 font-medium">{children}</div>
+ <div className="flex flex-col p-3 pt-4 border-b border-neutral-300 dark:border-neutral-800">
+ <div className="text-base text-neutral-900 dark:text-neutral-100 mx-1 font-medium">{children}</div>
</div>
);
}
function SectionHeader({ children }: { children: React.ReactNode }) {
- return <div className="text-xs text-neutral-400 mt-3 mb-1 mx-3 font-medium">{children}</div>;
+ return <div className="text-xs text-neutral-600 dark:text-neutral-400 mt-3 mb-1 mx-3 font-medium">{children}</div>;
}
function Items({ children }: { children: React.ReactNode }) {
@@ -39,7 +43,9 @@ function Item({
<div
className={cn(
"px-3 py-2 rounded-lg transition-colors w-full",
- active ? "bg-neutral-800 text-white" : "text-neutral-200 hover:text-white hover:bg-neutral-800/50"
+ active
+ ? "bg-neutral-100 text-neutral-900 dark:bg-neutral-800 dark:text-white"
+ : "text-neutral-800 hover:text-neutral-950 hover:bg-neutral-150 dark:text-neutral-200 dark:hover:text-white dark:hover:bg-neutral-800/50"
)}
>
<div className="flex items-center gap-2">
diff --git a/client/src/components/subscription/PaidPlain/PaidPlan.tsx b/client/src/components/subscription/PaidPlain/PaidPlan.tsx
index b51a9c200..7af7b1fc2 100644
--- a/client/src/components/subscription/PaidPlain/PaidPlan.tsx
+++ b/client/src/components/subscription/PaidPlain/PaidPlan.tsx
@@ -145,7 +145,7 @@ export function PaidPlan() {
<div className="flex justify-between items-start">
<div className="space-y-1">
<p className="text-3xl font-bold">{currentPlanDetails?.name || activeSubscription.planName} </p>
- <p className="text text-gray-300">
+ <p className="text text-neutral-600 dark:text-gray-300">
{getFormattedPrice()} • {activeSubscription.eventLimit.toLocaleString()} events
</p>
{isAnnualPlan && (
diff --git a/client/src/components/subscription/PaidPlain/PlanChangePreviewDialog.tsx b/client/src/components/subscription/PaidPlain/PlanChangePreviewDialog.tsx
index 7b2d76ef2..321ebab6d 100644
--- a/client/src/components/subscription/PaidPlain/PlanChangePreviewDialog.tsx
+++ b/client/src/components/subscription/PaidPlain/PlanChangePreviewDialog.tsx
@@ -49,16 +49,16 @@ export function PlanChangePreviewDialog({
<div className="space-y-4">
{/* Current Plan */}
<div className="text-sm">
- <div className="text-neutral-400">Current Plan</div>
- <div className="text-neutral-100 font-medium">
+ <div className="text-neutral-500 dark:text-neutral-400">Current Plan</div>
+ <div className="text-neutral-900 dark:text-neutral-100 font-medium">
${previewData.currentPlan.amount / 100}/{previewData.currentPlan.interval === "year" ? "yr" : "mo"}
</div>
</div>
{/* New Plan */}
<div className="text-sm">
- <div className="text-neutral-400">New Plan</div>
- <div className="text-neutral-100 font-medium">
+ <div className="text-neutral-500 dark:text-neutral-400">New Plan</div>
+ <div className="text-neutral-900 dark:text-neutral-100 font-medium">
${previewData.newPlan.amount / 100}/{previewData.newPlan.interval === "year" ? "yr" : "mo"}
</div>
</div>
@@ -67,27 +67,27 @@ export function PlanChangePreviewDialog({
<div className="pt-1">
{previewData.proration.charge > 0 && (
<div className="flex justify-between text-sm mb-2">
- <span className="text-neutral-400">New plan charge (prorated)</span>
- <span className="text-neutral-100">${previewData.proration.charge.toFixed(2)}</span>
+ <span className="text-neutral-500 dark:text-neutral-400">New plan charge (prorated)</span>
+ <span className="text-neutral-900 dark:text-neutral-100">${previewData.proration.charge.toFixed(2)}</span>
</div>
)}
{previewData.proration.credit > 0 && (
<div className="flex justify-between text-sm mb-2">
- <span className="text-neutral-400">Unused time credit</span>
+ <span className="text-neutral-500 dark:text-neutral-400">Unused time credit</span>
<span className="text-emerald-400">-${previewData.proration.credit.toFixed(2)}</span>
</div>
)}
<div className="flex justify-between text-sm font-medium pt-2">
- <span className="text-neutral-100">Due now</span>
- <span className={previewData.proration.immediatePayment > 0 ? "text-neutral-100" : "text-emerald-400"}>
+ <span className="text-neutral-900 dark:text-neutral-100">Due now</span>
+ <span className={previewData.proration.immediatePayment > 0 ? "text-neutral-900 dark:text-neutral-100" : "text-emerald-400"}>
${previewData.proration.immediatePayment.toFixed(2)}
</span>
</div>
</div>
{previewData.proration.nextBillingDate && (
- <div className="text-xs text-neutral-400">
+ <div className="text-xs text-neutral-500 dark:text-neutral-400">
Your next billing date: {new Date(previewData.proration.nextBillingDate).toLocaleDateString()}
</div>
)}
diff --git a/client/src/components/subscription/PaidPlain/PlanDialog.tsx b/client/src/components/subscription/PaidPlain/PlanDialog.tsx
index 2608ba75f..409e887a2 100644
--- a/client/src/components/subscription/PaidPlain/PlanDialog.tsx
+++ b/client/src/components/subscription/PaidPlain/PlanDialog.tsx
@@ -146,7 +146,7 @@ export function PlanDialog({ open, onOpenChange, currentPlanName, hasActiveSubsc
"px-4 py-2 rounded-full transition-colors cursor-pointer",
!isAnnual
? "bg-emerald-500/20 text-emerald-400 font-medium"
- : "text-neutral-400 hover:text-neutral-200"
+ : "text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-200"
)}
>
Monthly
@@ -157,7 +157,7 @@ export function PlanDialog({ open, onOpenChange, currentPlanName, hasActiveSubsc
"px-4 py-2 rounded-full transition-colors cursor-pointer",
isAnnual
? "bg-emerald-500/20 text-emerald-400 font-medium"
- : "text-neutral-400 hover:text-neutral-200"
+ : "text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-200"
)}
>
Annual
@@ -175,7 +175,7 @@ export function PlanDialog({ open, onOpenChange, currentPlanName, hasActiveSubsc
<div key={type} className="space-y-3">
<div className="mb-4">
<h3 className="text-xl font-bold">{title}</h3>
- <p className="text-sm text-neutral-400">{subtitle}</p>
+ <p className="text-sm text-neutral-500 dark:text-neutral-400">{subtitle}</p>
</div>
<div className="space-y-2">
{STRIPE_TIERS.map(tier => {
@@ -191,18 +191,18 @@ export function PlanDialog({ open, onOpenChange, currentPlanName, hasActiveSubsc
"flex flex-col gap-2 justify-between p-3 rounded-lg border cursor-pointer",
isCurrent
? "bg-emerald-500/10 border-emerald-500"
- : "bg-neutral-800/20 border-neutral-700/50 hover:bg-neutral-800/30",
+ : "bg-neutral-100 dark:bg-neutral-800/20 border-neutral-300 dark:border-neutral-700/50 hover:bg-neutral-200 dark:hover:bg-neutral-800/30",
isLoading && "opacity-50"
)}
onClick={() => handlePlanSelection(plan.priceId, plan.name)}
>
<div className="flex justify-between w-full">
- <div className="text-neutral-100 font-medium flex-end">
+ <div className="text-neutral-900 dark:text-neutral-100 font-medium flex-end">
{tier.shortName} events{" "}
- <span className="text-neutral-400 text-xs font-normal">/ month</span>
+ <span className="text-neutral-500 dark:text-neutral-400 text-xs font-normal">/ month</span>
</div>
- <div className="text-xs text-neutral-400">
- <span className="text-neutral-200 font-semibold text-base">
+ <div className="text-xs text-neutral-500 dark:text-neutral-400">
+ <span className="text-neutral-700 dark:text-neutral-200 font-semibold text-base">
${isAnnual ? Math.round(plan.price / 12) : plan.price}
</span>{" "}
/month
@@ -222,7 +222,7 @@ export function PlanDialog({ open, onOpenChange, currentPlanName, hasActiveSubsc
href="https://www.rybbit.com/pricing"
target="_blank"
rel="noopener noreferrer"
- className="text-neutral-200 hover:text-neutral-100 text-sm underline"
+ className="text-neutral-600 dark:text-neutral-200 hover:text-neutral-900 dark:hover:text-neutral-100 text-sm underline"
>
View detailed feature comparison →
</a>
diff --git a/client/src/components/ui/activity-slider.tsx b/client/src/components/ui/activity-slider.tsx
index 4a6dcd7fb..a90e613f2 100644
--- a/client/src/components/ui/activity-slider.tsx
+++ b/client/src/components/ui/activity-slider.tsx
@@ -71,9 +71,9 @@ const ActivitySlider = React.forwardRef<React.ElementRef<typeof SliderPrimitive.
className={cn("relative flex w-full touch-none select-none items-center", className)}
{...props}
>
- <SliderPrimitive.Track className="relative h-1.5 w-full grow overflow-hidden rounded-full bg-neutral-800">
+ <SliderPrimitive.Track className="relative h-1.5 w-full grow overflow-hidden rounded-full bg-neutral-200 dark:bg-neutral-800">
{/* Inactive background */}
- <div className="absolute h-full w-full bg-neutral-700" />
+ <div className="absolute h-full w-full bg-neutral-300 dark:bg-neutral-700" />
{/* Activity periods */}
{activityPeriods.map((period, index) => {
@@ -83,7 +83,7 @@ const ActivitySlider = React.forwardRef<React.ElementRef<typeof SliderPrimitive.
return (
<div
key={index}
- className="absolute h-full bg-neutral-600"
+ className="absolute h-full bg-neutral-400 dark:bg-neutral-600"
style={{
left: `${startPercent}%`,
width: `${widthPercent}%`,
diff --git a/client/src/components/ui/alert-dialog.tsx b/client/src/components/ui/alert-dialog.tsx
index 410db886a..468f7d9f8 100644
--- a/client/src/components/ui/alert-dialog.tsx
+++ b/client/src/components/ui/alert-dialog.tsx
@@ -36,7 +36,7 @@ const AlertDialogContent = React.forwardRef<
<AlertDialogPrimitive.Content
ref={ref}
className={cn(
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full dark:border-neutral-800 dark:bg-neutral-950",
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-150 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full dark:border-neutral-800 dark:bg-neutral-950",
className
)}
{...props}
diff --git a/client/src/components/ui/badge.tsx b/client/src/components/ui/badge.tsx
index 522e93605..f7129b283 100644
--- a/client/src/components/ui/badge.tsx
+++ b/client/src/components/ui/badge.tsx
@@ -4,18 +4,18 @@ import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils";
const badgeVariants = cva(
- "inline-flex items-center rounded-md border px-1.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-neutral-300",
+ "inline-flex items-center rounded-md border px-1.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-neutral-300 dark:focus:ring-neutral-300",
{
variants: {
variant: {
- default: "border-neutral-800 bg-neutral-800 text-neutral-100 hover:bg-neutral-700",
- secondary: "border-neutral-800 bg-neutral-900 text-neutral-300 hover:bg-neutral-800",
- destructive: "border-transparent bg-red-500/20 text-red-400 hover:bg-red-500/30",
- warning: "border-transparent bg-yellow-500/20 text-yellow-400 hover:bg-yellow-500/30",
- success: "border-transparent bg-emerald-500/20 text-emerald-400 hover:bg-emerald-500/30",
- info: "border-transparent bg-blue-500/20 text-blue-400 hover:bg-blue-500/30",
- outline: "border-neutral-700 bg-transparent text-neutral-300 hover:bg-neutral-800",
- ghost: "border-transparent bg-transparent text-neutral-300 hover:bg-neutral-800",
+ default: "border-neutral-100 bg-neutral-100 text-neutral-900 hover:bg-neutral-150 dark:border-neutral-800 dark:bg-neutral-800 dark:text-neutral-100 dark:hover:bg-neutral-700",
+ secondary: "border-neutral-100 bg-neutral-50 text-neutral-600 hover:bg-neutral-100 dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-300 dark:hover:bg-neutral-800",
+ destructive: "border-transparent bg-red-500/20 text-red-600 hover:bg-red-500/30 dark:text-red-400",
+ warning: "border-transparent bg-yellow-500/20 text-yellow-600 hover:bg-yellow-500/30 dark:text-yellow-400",
+ success: "border-transparent bg-emerald-500/20 text-emerald-600 hover:bg-emerald-500/30 dark:text-emerald-400",
+ info: "border-transparent bg-blue-500/20 text-blue-600 hover:bg-blue-500/30 dark:text-blue-400",
+ outline: "border-neutral-100 bg-transparent text-neutral-700 hover:bg-neutral-50 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",
+ ghost: "border-transparent bg-transparent text-neutral-700 hover:bg-neutral-50 dark:text-neutral-300 dark:hover:bg-neutral-800",
},
},
defaultVariants: {
diff --git a/client/src/components/ui/button.tsx b/client/src/components/ui/button.tsx
index aa0eb1ab8..8d68bd68f 100644
--- a/client/src/components/ui/button.tsx
+++ b/client/src/components/ui/button.tsx
@@ -10,21 +10,21 @@ const buttonVariants = cva(
variants: {
variant: {
default:
- "bg-neutral-50 text-neutral-950 border border-neutral-200 shadow hover:bg-neutral-900/90 dark:bg-neutral-850 dark:border-neutral-750 dark:text-neutral-50 dark:hover:bg-neutral-800/90 dark:hover:border-neutral-650",
+ "bg-white text-neutral-950 border border-neutral-150 hover:bg-neutral-50 hover:border-neutral-300 dark:bg-neutral-850 dark:border-neutral-750 dark:text-neutral-50 dark:hover:bg-neutral-800/90 dark:hover:border-neutral-650",
secondary:
- "bg-neutral-900 border border-neutral-800 shadow-sm hover:bg-neutral-800/80 hover:border-neutral-700",
+ "bg-neutral-50 text-neutral-900 border border-neutral-150 hover:bg-neutral-100 hover:border-neutral-200 dark:bg-neutral-900 dark:text-neutral-50 dark:border-neutral-800 dark:hover:bg-neutral-800/80 dark:hover:border-neutral-700",
accent:
- "bg-neutral-500 text-neutral-900 shadow-sm hover:bg-neutral-500/80 dark:bg-accent-600 dark:text-neutral-50 dark:hover:bg-accent-600/90",
+ "bg-accent-500 text-neutral-50 border border-accent-600 hover:bg-accent-500/90 dark:bg-accent-600 dark:text-neutral-50 dark:border-accent-700 dark:hover:bg-accent-600/90",
success:
- "bg-accent-500 text-neutral-50 border border-accent-600 shadow-sm hover:bg-accent-500/90 dark:bg-accent-800 dark:border-accent-600 dark:text-neutral-50 dark:hover:bg-accent-800/90 dark:hover:border-accent-500",
+ "bg-accent-500 text-neutral-50 border border-accent-600 hover:bg-accent-500/90 dark:bg-accent-800 dark:border-accent-600 dark:text-neutral-50 dark:hover:bg-accent-800/90 dark:hover:border-accent-500",
destructive:
- "bg-red-500 text-neutral-50 border border-red-500 shadow-sm hover:bg-red-500/90 dark:bg-red-900 dark:border-red-700 dark:text-neutral-50 dark:hover:bg-red-900/90 dark:hover:border-red-500",
+ "bg-red-500 text-neutral-50 border border-red-500 hover:bg-red-500/90 dark:bg-red-900 dark:border-red-700 dark:text-neutral-50 dark:hover:bg-red-900/90 dark:hover:border-red-500",
warning:
- "bg-yellow-500 text-neutral-900 border border-yellow-500 shadow-sm hover:bg-yellow-500/90 dark:bg-yellow-700 dark:border-yellow-500 dark:text-neutral-50 dark:hover:bg-yellow-700/90 dark:hover:border-yellow-400",
+ "bg-yellow-500 text-neutral-900 border border-yellow-500 hover:bg-yellow-500/90 dark:bg-yellow-700 dark:border-yellow-500 dark:text-neutral-50 dark:hover:bg-yellow-700/90 dark:hover:border-yellow-400",
outline:
- "border border-neutral-200 shadow-sm hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-700 dark:hover:bg-neutral-900 dark:hover:border-neutral-600 dark:hover:text-neutral-50",
+ "border border-neutral-100 bg-transparent text-neutral-700 hover:bg-neutral-50 hover:text-neutral-900 hover:border-neutral-200 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-900 dark:hover:border-neutral-600 dark:hover:text-neutral-50",
ghost:
- "hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50 border border-transparent",
+ "bg-transparent text-neutral-700 hover:bg-neutral-50 hover:text-neutral-900 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:hover:text-neutral-50 border border-transparent",
link: "text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50",
},
size: {
diff --git a/client/src/components/ui/card.tsx b/client/src/components/ui/card.tsx
index c46cc7659..41119548a 100644
--- a/client/src/components/ui/card.tsx
+++ b/client/src/components/ui/card.tsx
@@ -3,6 +3,7 @@
import { cn } from "@/lib/utils";
import { Zoomies } from "ldrs/react";
import "ldrs/react/Zoomies.css";
+import { useTheme } from "next-themes";
import * as React from "react";
// Default values shown
@@ -10,7 +11,7 @@ const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElemen
<div
ref={ref}
className={cn(
- "relative rounded-lg border border-neutral-200 bg-white text-neutral-950 dark:border-neutral-850 dark:bg-neutral-900 dark:text-neutral-50 overflow-hidden transition-all duration-300 ",
+ "relative rounded-lg border border-neutral-100 bg-white text-neutral-950 dark:border-neutral-850 dark:bg-neutral-900 dark:text-neutral-50 overflow-hidden transition-all duration-300 ",
className
)}
{...props}
@@ -20,9 +21,12 @@ Card.displayName = "Card";
const CardLoader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
({ className, ...props }, ref) => {
+ const { theme } = useTheme();
+ const loaderColor = theme === "dark" ? "hsl(var(--neutral-400))" : "hsl(var(--neutral-200))";
+
return (
<div className="mt-[-15px] absolute top-0 left-0 w-full">
- <Zoomies size={1400} stroke="3" bg-opacity="0.1" speed="1.4" color="hsl(var(--neutral-400))" />
+ <Zoomies size={1400} stroke="3" bg-opacity="0.1" speed="1.4" color={loaderColor} />
</div>
);
}
diff --git a/client/src/components/ui/dialog.tsx b/client/src/components/ui/dialog.tsx
index a56c82470..fa7f74a63 100644
--- a/client/src/components/ui/dialog.tsx
+++ b/client/src/components/ui/dialog.tsx
@@ -38,7 +38,7 @@ const DialogContent = React.forwardRef<
<DialogPrimitive.Content
ref={ref}
className={cn(
- "fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",
+ "fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-150 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",
className
)}
{...props}
diff --git a/client/src/components/ui/dropdown-menu.tsx b/client/src/components/ui/dropdown-menu.tsx
index c22710fd9..a99a874fb 100644
--- a/client/src/components/ui/dropdown-menu.tsx
+++ b/client/src/components/ui/dropdown-menu.tsx
@@ -58,7 +58,7 @@ const DropdownMenuSubContent = React.forwardRef<
<DropdownMenuPrimitive.SubContent
ref={ref}
className={cn(
- "z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-850 dark:text-neutral-50",
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-150 bg-white p-1 text-neutral-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-850 dark:text-neutral-50",
className
)}
{...props}
@@ -75,7 +75,7 @@ const DropdownMenuContent = React.forwardRef<
ref={ref}
sideOffset={sideOffset}
className={cn(
- "z-50 min-w-[8rem] rounded-lg border border-neutral-200 bg-white p-1 text-neutral-950 shadow-2xl dark:border-neutral-750 dark:bg-neutral-850 dark:text-neutral-50",
+ "z-50 min-w-[8rem] rounded-lg border border-neutral-150 bg-white p-1 text-neutral-950 shadow-2xl dark:border-neutral-750 dark:bg-neutral-850 dark:text-neutral-50",
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
)}
diff --git a/client/src/components/ui/input-with-suggestions.tsx b/client/src/components/ui/input-with-suggestions.tsx
index 4e859e709..ef0880cd5 100644
--- a/client/src/components/ui/input-with-suggestions.tsx
+++ b/client/src/components/ui/input-with-suggestions.tsx
@@ -73,7 +73,7 @@ export const InputWithSuggestions = React.forwardRef<HTMLInputElement, InputWith
{...props}
/>
{open && filteredSuggestions.length > 0 && (
- <div className="absolute z-50 mt-1 w-full max-h-60 overflow-auto rounded-md border border-neutral-200 bg-white shadow-md dark:border-neutral-800 dark:bg-neutral-900">
+ <div className="absolute z-50 mt-1 w-full max-h-60 overflow-auto rounded-md border border-neutral-150 bg-white shadow-md dark:border-neutral-800 dark:bg-neutral-900">
{filteredSuggestions.map(suggestion => (
<div
key={suggestion.value}
diff --git a/client/src/components/ui/label.tsx b/client/src/components/ui/label.tsx
index a5af96bfc..767c9a9da 100644
--- a/client/src/components/ui/label.tsx
+++ b/client/src/components/ui/label.tsx
@@ -7,7 +7,7 @@ import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils";
const labelVariants = cva(
- "text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-neutral-400"
+ "text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-neutral-800 dark:text-neutral-200"
);
const Label = React.forwardRef<
diff --git a/client/src/components/ui/navigation-menu.tsx b/client/src/components/ui/navigation-menu.tsx
index 1fb979ee0..3e8de01e8 100644
--- a/client/src/components/ui/navigation-menu.tsx
+++ b/client/src/components/ui/navigation-menu.tsx
@@ -81,7 +81,7 @@ const NavigationMenuViewport = React.forwardRef<
<div className={cn("absolute left-0 top-full flex justify-center")}>
<NavigationMenuPrimitive.Viewport
className={cn(
- "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border border-neutral-200 bg-white text-neutral-950 shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)] dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
+ "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border border-neutral-150 bg-white text-neutral-950 shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)] dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
className
)}
ref={ref}
diff --git a/client/src/components/ui/popover.tsx b/client/src/components/ui/popover.tsx
index 845729530..91b0e242d 100644
--- a/client/src/components/ui/popover.tsx
+++ b/client/src/components/ui/popover.tsx
@@ -21,7 +21,7 @@ const PopoverContent = React.forwardRef<
align={align}
sideOffset={sideOffset}
className={cn(
- "z-50 w-72 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-xl outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-50",
+ "z-50 w-72 rounded-lg border border-neutral-150 bg-white p-4 text-neutral-950 shadow-xl outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-50",
className
)}
{...props}
diff --git a/client/src/components/ui/radio-group.tsx b/client/src/components/ui/radio-group.tsx
index 05db71d16..6a17cc389 100644
--- a/client/src/components/ui/radio-group.tsx
+++ b/client/src/components/ui/radio-group.tsx
@@ -15,7 +15,7 @@ function RadioGroupItem({ className, ...props }: React.ComponentProps<typeof Rad
<RadioGroupPrimitive.Item
data-slot="radio-group-item"
className={cn(
- "border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-neutral-800 dark:border-neutral-700 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
+ "border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive bg-white border-neutral-300 dark:bg-neutral-800 dark:border-neutral-700 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
className
)}
{...props}
diff --git a/client/src/components/ui/select.tsx b/client/src/components/ui/select.tsx
index c3305a9a5..6cb315d1f 100644
--- a/client/src/components/ui/select.tsx
+++ b/client/src/components/ui/select.tsx
@@ -21,7 +21,7 @@ const SelectTrigger = React.forwardRef<
<SelectPrimitive.Trigger
ref={ref}
className={cn(
- "flex w-full items-center justify-between whitespace-nowrap rounded-md border border-neutral-200 bg-neutral-900/70 px-3 text-sm shadow-sm ring-offset-white placeholder:text-neutral-500 focus:outline-none focus:ring-1 focus:ring-neutral-950 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 dark:border-neutral-750 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-300",
+ "flex w-full items-center justify-between whitespace-nowrap rounded-md border border-neutral-150 bg-white px-3 text-sm shadow-sm ring-offset-white placeholder:text-neutral-500 focus:outline-none focus:ring-1 focus:ring-neutral-950 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 dark:border-neutral-750 dark:bg-neutral-900/70 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-300",
size === "default" && "h-9 py-2",
size === "sm" && "h-7 py-1 text-xs",
className
@@ -74,7 +74,7 @@ const SelectContent = React.forwardRef<
<SelectPrimitive.Content
ref={ref}
className={cn(
- "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-50",
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-neutral-150 bg-white text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-50",
position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
size === "sm" && "text-xs",
diff --git a/client/src/components/ui/skeleton.tsx b/client/src/components/ui/skeleton.tsx
index 546706489..eb06a05d9 100644
--- a/client/src/components/ui/skeleton.tsx
+++ b/client/src/components/ui/skeleton.tsx
@@ -1,7 +1,7 @@
import { cn } from "@/lib/utils";
function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
- return <div className={cn("animate-pulse rounded-md bg-neutral-850", className)} {...props} />;
+ return <div className={cn("animate-pulse rounded-md bg-neutral-200 dark:bg-neutral-850", className)} {...props} />;
}
export { Skeleton };
diff --git a/client/src/components/ui/table.tsx b/client/src/components/ui/table.tsx
index 1f62975d1..6855afee4 100644
--- a/client/src/components/ui/table.tsx
+++ b/client/src/components/ui/table.tsx
@@ -13,14 +13,14 @@ Table.displayName = "Table";
const TableHeader = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(
({ className, ...props }, ref) => (
- <thead ref={ref} className={cn("[&_tr]:border-b-neutral-700 bg-neutral-850", className)} {...props} />
+ <thead ref={ref} className={cn("[&_tr]:border-b-neutral-300 bg-neutral-100 dark:[&_tr]:border-b-neutral-700 dark:bg-neutral-850", className)} {...props} />
)
);
TableHeader.displayName = "TableHeader";
const TableBody = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(
({ className, ...props }, ref) => (
- <tbody ref={ref} className={cn("[&_tr:last-child]:border-0 bg-neutral-900", className)} {...props} />
+ <tbody ref={ref} className={cn("[&_tr:last-child]:border-0 bg-white dark:bg-neutral-900", className)} {...props} />
)
);
TableBody.displayName = "TableBody";
@@ -41,7 +41,7 @@ const TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTML
<tr
ref={ref}
className={cn(
- "border-b border-b-neutral-700 transition-colors hover:bg-neutral-100/50 data-[state=selected]:bg-neutral-100 dark:hover:bg-neutral-800/50 dark:data-[state=selected]:bg-neutral-800",
+ "border-b border-b-neutral-300 transition-colors hover:bg-neutral-100/50 data-[state=selected]:bg-neutral-100 dark:border-b-neutral-700 dark:hover:bg-neutral-800/50 dark:data-[state=selected]:bg-neutral-800",
className
)}
{...props}
diff --git a/client/src/components/ui/tooltip.tsx b/client/src/components/ui/tooltip.tsx
index 6069914f1..31f40bb3a 100644
--- a/client/src/components/ui/tooltip.tsx
+++ b/client/src/components/ui/tooltip.tsx
@@ -22,7 +22,7 @@ const TooltipContent = React.forwardRef<
ref={ref}
sideOffset={sideOffset}
className={cn(
- "z-50 overflow-hidden rounded-md bg-neutral-850 border border-neutral-750 px-3 py-1.5 text-xs text-neutral-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
+ "z-50 overflow-hidden rounded-md bg-neutral-900 border border-neutral-700 px-3 py-1.5 text-xs text-neutral-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:bg-neutral-850 dark:border-neutral-750",
className
)}
{...props}
diff --git a/client/src/lib/nivo.ts b/client/src/lib/nivo.ts
index 52c60c000..aa35d74a4 100644
--- a/client/src/lib/nivo.ts
+++ b/client/src/lib/nivo.ts
@@ -1,22 +1,22 @@
import { PartialTheme } from "@nivo/theming";
-export const nivoTheme: PartialTheme = {
+export const getNivoTheme = (isDark: boolean = true): PartialTheme => ({
axis: {
legend: {
text: {
- fill: "hsl(var(--neutral-400))",
+ fill: isDark ? "hsl(var(--neutral-400))" : "hsl(var(--neutral-600))",
},
},
ticks: {
line: {},
text: {
- fill: "hsl(var(--neutral-400))",
+ fill: isDark ? "hsl(var(--neutral-400))" : "hsl(var(--neutral-500))",
},
},
},
grid: {
line: {
- stroke: "hsl(var(--neutral-800))",
+ stroke: isDark ? "hsl(var(--neutral-800))" : "hsl(var(--neutral-100))",
strokeWidth: 1,
},
},
@@ -26,22 +26,25 @@ export const nivoTheme: PartialTheme = {
},
container: {
backdropFilter: "blur( 7px )",
- background: "rgb(40, 40, 40, 0.8)",
- color: "rgb(255, 255, 255)",
+ background: isDark ? "rgb(40, 40, 40, 0.8)" : "rgb(245, 245, 245, 0.8)",
+ color: isDark ? "rgb(255, 255, 255)" : "rgb(0, 0, 0)",
},
},
- crosshair: { line: { stroke: "hsl(var(--neutral-50))" } },
+ crosshair: { line: { stroke: isDark ? "hsl(var(--neutral-50))" : "hsl(var(--neutral-900))" } },
annotations: {
text: {
- fill: "hsl(var(--neutral-400))",
+ fill: isDark ? "hsl(var(--neutral-400))" : "hsl(var(--neutral-600))",
},
},
text: {
- fill: "hsl(var(--neutral-400))",
+ fill: isDark ? "hsl(var(--neutral-400))" : "hsl(var(--neutral-600))",
},
labels: {
text: {
- fill: "hsl(var(--neutral-400))",
+ fill: isDark ? "hsl(var(--neutral-400))" : "hsl(var(--neutral-600))",
},
},
-};
+});
+
+// Export default dark theme for backwards compatibility
+export const nivoTheme: PartialTheme = getNivoTheme(true);
diff --git a/client/tailwind.config.ts b/client/tailwind.config.ts
index 6c1a12e5b..c184befc9 100644
--- a/client/tailwind.config.ts
+++ b/client/tailwind.config.ts
@@ -1,12 +1,7 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: ["class"],
- content: [
- "./pages/**/*.{ts,tsx}",
- "./components/**/*.{ts,tsx}",
- "./app/**/*.{ts,tsx}",
- "./src/**/*.{ts,tsx}",
- ],
+ content: ["./pages/**/*.{ts,tsx}", "./components/**/*.{ts,tsx}", "./app/**/*.{ts,tsx}", "./src/**/*.{ts,tsx}"],
theme: {
container: {
center: true,
@@ -41,6 +36,7 @@ module.exports = {
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
+
50: "hsl(var(--accent-50))",
100: "hsl(var(--accent-100))",
200: "hsl(var(--accent-200))",
@@ -66,6 +62,7 @@ module.exports = {
foreground: "hsl(var(--card-foreground))",
},
neutral: {
+ 0: "hsl(var(--neutral-0))",
50: "hsl(var(--neutral-50))",
100: "hsl(var(--neutral-100))",
150: "hsl(var(--neutral-150))",
diff --git a/docs/src/app/layout.tsx b/docs/src/app/layout.tsx
index a0ea69763..98500bac7 100644
--- a/docs/src/app/layout.tsx
+++ b/docs/src/app/layout.tsx
@@ -169,8 +169,9 @@ export default function Layout({ children }: { children: ReactNode }) {
<body className={`flex flex-col min-h-screen ${inter.variable} font-sans`}>
<RootProvider
theme={{
- defaultTheme: "dark",
enabled: true,
+ enableSystem: true,
+ defaultTheme: "dark",
}}
>
{children}
diff --git a/docs/src/components/Cards/UserSessions.tsx b/docs/src/components/Cards/UserSessions.tsx
index fa5356183..1ca955fb4 100644
--- a/docs/src/components/Cards/UserSessions.tsx
+++ b/docs/src/components/Cards/UserSessions.tsx
@@ -45,8 +45,8 @@ export function UserSessions() {
{/* Event 1 */}
<div className="flex mb-2">
<div className="relative flex-shrink-0">
- <div className="absolute top-7 left-3.5 w-[1px] bg-neutral-400 dark:bg-neutral-700 h-[calc(100%-16px)]" />
- <div className="flex items-center justify-center w-7 h-7 rounded-full bg-blue-900/30 border border-blue-500/50">
+ <div className="absolute top-7 left-3.5 w-[1px] bg-neutral-200 dark:bg-neutral-700 h-[calc(100%-16px)]" />
+ <div className="flex items-center justify-center w-7 h-7 rounded-full bg-neutral-50 border border-neutral-200 dark:bg-neutral-600/25 dark:border-neutral-600/25">
<span className="text-xs font-medium">1</span>
</div>
</div>
@@ -70,8 +70,8 @@ export function UserSessions() {
{/* Event 2 */}
<div className="flex mb-2">
<div className="relative flex-shrink-0">
- <div className="absolute top-7 left-3.5 w-[1px] bg-neutral-400 dark:bg-neutral-700 h-[calc(100%-16px)]" />
- <div className="flex items-center justify-center w-7 h-7 rounded-full bg-amber-900/30 border border-amber-500/50">
+ <div className="absolute top-7 left-3.5 w-[1px] bg-neutral-300 dark:bg-neutral-700 h-[calc(100%-16px)]" />
+ <div className="flex items-center justify-center w-7 h-7 rounded-full bg-neutral-50 border border-neutral-200 dark:bg-neutral-600/25 dark:border-neutral-600/25">
<span className="text-xs font-medium">2</span>
</div>
</div>
@@ -102,8 +102,8 @@ export function UserSessions() {
{/* Event 3 */}
<div className="flex mb-2">
<div className="relative flex-shrink-0">
- <div className="absolute top-7 left-3.5 w-[1px] bg-neutral-400 dark:bg-neutral-700 h-[calc(100%-16px)]" />
- <div className="flex items-center justify-center w-7 h-7 rounded-full bg-blue-900/30 border border-blue-500/50">
+ <div className="absolute top-7 left-3.5 w-[1px] bg-neutral-300 dark:bg-neutral-700 h-[calc(100%-16px)]" />
+ <div className="flex items-center justify-center w-7 h-7 rounded-full bg-neutral-50 border border-neutral-200 dark:bg-neutral-600/25 dark:border-neutral-600/25">
<span className="text-xs font-medium">3</span>
</div>
</div>
@@ -128,7 +128,7 @@ export function UserSessions() {
{/* Event 4 */}
<div className="flex mb-2">
<div className="relative flex-shrink-0">
- <div className="flex items-center justify-center w-7 h-7 rounded-full bg-amber-900/30 border border-amber-500/50">
+ <div className="flex items-center justify-center w-7 h-7 rounded-full bg-neutral-50 border border-neutral-200 dark:bg-neutral-600/25 dark:border-neutral-600/25">
<span className="text-xs font-medium">4</span>
</div>
</div>