Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Dark mode improvements

Blue Mouse1060abe517e8
diff --git a/web/app/components/Header/index.tsx b/web/app/components/Header/index.tsx
index 1508707e6..ef65fb443 100644
--- a/web/app/components/Header/index.tsx
+++ b/web/app/components/Header/index.tsx
@@ -305,14 +305,14 @@ const ProfileMenu = ({ logoutHandler }: { logoutHandler: () => void }) => {
leaveTo='transform opacity-0 scale-95'
>
<DisclosurePanel
- className='absolute right-0 z-50 w-full min-w-max origin-top-right rounded-md bg-white p-1 ring-1 ring-slate-200 focus:outline-hidden dark:bg-slate-800 dark:ring-slate-800'
+ className='absolute right-0 z-50 w-full min-w-max origin-top-right rounded-md bg-white p-1 ring-1 ring-slate-200 focus:outline-hidden dark:bg-slate-900 dark:ring-slate-700/80'
static
>
{_map(whitelist, (lng) => (
<DisclosureButton
key={lng}
as='span'
- className='block cursor-pointer rounded-md p-2 text-sm text-gray-700 transition-colors hover:bg-gray-200 dark:bg-slate-800 dark:text-gray-50 dark:hover:bg-gray-600'
+ className='block cursor-pointer rounded-md p-2 text-sm text-gray-700 transition-colors hover:bg-gray-200 dark:text-gray-50 dark:hover:bg-slate-800'
onClick={() => changeLanguage(lng)}
>
<div className='flex'>
diff --git a/web/app/pages/Dashboard/Dashboard.tsx b/web/app/pages/Dashboard/Dashboard.tsx
index 1c918e7a4..092cedb96 100644
--- a/web/app/pages/Dashboard/Dashboard.tsx
+++ b/web/app/pages/Dashboard/Dashboard.tsx
@@ -50,6 +50,7 @@ import { NoProjects } from './NoProjects'
import { PeriodSelector } from './PeriodSelector'
import { ProjectCard } from './ProjectCard'
import { SortSelector, SORT_OPTIONS } from './SortSelector'
+import Button from '~/ui/Button'
const PAGE_SIZE_OPTIONS = [12, 24, 48, 96]
@@ -408,7 +409,7 @@ const Dashboard = () => {
id='project-search'
onChange={onSearch}
value={search}
- className='block h-7 w-full rounded-lg border-none bg-gray-50 p-2.5 text-sm text-gray-900 ring-1 ring-gray-300 focus:ring-gray-500 sm:pl-10 dark:bg-slate-900 dark:text-white dark:placeholder-gray-400 dark:ring-slate-600 dark:focus:ring-slate-200'
+ className='block h-7 w-full rounded-lg border-none bg-white p-2.5 text-sm text-gray-900 ring-1 ring-gray-300 ring-inset focus:ring-slate-900 sm:pl-10 dark:bg-slate-900 dark:text-gray-50 dark:placeholder-gray-400 dark:ring-slate-700/80 dark:focus:ring-slate-300'
placeholder={t('project.search')}
/>
</div>
@@ -450,14 +451,10 @@ const Dashboard = () => {
</button>
) : null}
</div>
- <button
- type='button'
- onClick={onNewProject}
- className='ml-3 inline-flex cursor-pointer items-center justify-center rounded-md border border-transparent bg-slate-900 p-2 text-center text-sm font-medium text-white transition-colors hover:bg-slate-700 dark:border-gray-800 dark:bg-slate-800 dark:text-gray-50 dark:hover:bg-slate-700'
- >
+ <Button onClick={onNewProject} primary large>
<FolderPlusIcon className='mr-1 h-5 w-5' strokeWidth={1.5} />
{t('dashboard.newProject')}
- </button>
+ </Button>
</div>
</div>
{isSearchActive ? (
diff --git a/web/app/pages/Dashboard/ProjectCard.tsx b/web/app/pages/Dashboard/ProjectCard.tsx
index 48e34572a..f92c0c795 100644
--- a/web/app/pages/Dashboard/ProjectCard.tsx
+++ b/web/app/pages/Dashboard/ProjectCard.tsx
@@ -342,7 +342,7 @@ export const ProjectCard = ({
}}
onClick={onElementClick}
className={cx(
- 'group relative cursor-pointer overflow-hidden rounded-xl border border-gray-200 bg-gray-50 transition-colors hover:bg-gray-200/70 dark:border-slate-800/25 dark:bg-slate-800/70 dark:hover:bg-slate-700/60',
+ 'group relative cursor-pointer overflow-hidden rounded-xl border border-gray-200 bg-gray-50 transition-colors hover:bg-gray-200/70 dark:border-slate-800/60 dark:bg-slate-800/25 dark:hover:bg-slate-800/60',
viewMode === 'list'
? 'flex items-center justify-between px-6 py-4'
: 'min-h-[153.1px]',
diff --git a/web/app/pages/Organisations/AddOrganisation.tsx b/web/app/pages/Organisations/AddOrganisation.tsx
index 627912335..e204048ff 100644
--- a/web/app/pages/Organisations/AddOrganisation.tsx
+++ b/web/app/pages/Organisations/AddOrganisation.tsx
@@ -18,9 +18,9 @@ export const AddOrganisation = ({
type='button'
onClick={onClick}
className={cx(
- 'group flex h-auto min-h-[153.1px] cursor-pointer items-center justify-center rounded-lg border border-dashed border-gray-300 transition-colors hover:border-gray-400 dark:border-gray-500 dark:hover:border-gray-600',
+ 'group flex h-auto min-h-[153.1px] cursor-pointer items-center justify-center rounded-lg border-2 border-dashed border-gray-300 hover:border-gray-400',
{
- 'lg:min-h-[auto]': sitesCount % 3 !== 0,
+ 'lg:min-h-auto': sitesCount % 3 !== 0,
},
)}
>
diff --git a/web/app/pages/Organisations/OrganisationCard.tsx b/web/app/pages/Organisations/OrganisationCard.tsx
index de192031c..ef91cb8c7 100644
--- a/web/app/pages/Organisations/OrganisationCard.tsx
+++ b/web/app/pages/Organisations/OrganisationCard.tsx
@@ -101,9 +101,9 @@ export const OrganisationCard = ({ organisation }: OrganisationCardProps) => {
const isViewer = membership?.role === 'viewer'
const cardClassName = cx(
- 'min-h-[153.1px] overflow-hidden rounded-xl border border-gray-200 bg-gray-50 transition-colors dark:border-slate-800/25 dark:bg-slate-800/70',
+ 'min-h-[153.1px] overflow-hidden rounded-xl border border-gray-200 bg-gray-50 transition-colors dark:border-slate-800/60 dark:bg-slate-800/25',
{
- 'cursor-pointer hover:bg-gray-200/70 dark:hover:bg-slate-700/60':
+ 'cursor-pointer hover:bg-gray-200/70 dark:hover:bg-slate-800/60':
!isViewer,
},
)
diff --git a/web/app/pages/Organisations/Organisations.tsx b/web/app/pages/Organisations/Organisations.tsx
index edd57ca4e..785172f2f 100644
--- a/web/app/pages/Organisations/Organisations.tsx
+++ b/web/app/pages/Organisations/Organisations.tsx
@@ -20,6 +20,7 @@ import type {
OrganisationsActionData,
OrganisationsLoaderData,
} from '~/routes/organisations._index'
+import Button from '~/ui/Button'
import Input from '~/ui/Input'
import Modal from '~/ui/Modal'
import Pagination from '~/ui/Pagination'
@@ -242,14 +243,13 @@ const Organisations = () => {
</div>
) : null}
</div>
- <button
- type='button'
- onClick={onNewOrganisation}
- className='inline-flex cursor-pointer items-center justify-center rounded-md border border-transparent bg-slate-900 p-2 text-center text-sm leading-4 font-medium text-white transition-colors hover:bg-slate-700 focus:ring-2 focus:ring-slate-500 focus:ring-offset-2 focus:outline-hidden dark:border-gray-800 dark:bg-slate-800 dark:text-gray-50 dark:hover:bg-slate-700'
- >
- <BuildingOffice2Icon className='mr-1 h-5 w-5' />
+ <Button onClick={onNewOrganisation} primary large>
+ <BuildingOffice2Icon
+ className='mr-1 h-5 w-5'
+ strokeWidth={1.5}
+ />
{t('organisations.new')}
- </button>
+ </Button>
</div>
{isSearchActive ? (
<div className='mb-2 flex w-full items-center sm:hidden'>
@@ -278,7 +278,7 @@ const Organisations = () => {
{_isEmpty(organisations) ? (
<NoOrganisations onClick={onNewOrganisation} />
) : (
- <div className='grid grid-cols-1 gap-x-6 gap-y-3 lg:grid-cols-3 lg:gap-y-6'>
+ <div className='grid grid-cols-1 gap-3 lg:grid-cols-3'>
{_map(organisations, (organisation) => (
<OrganisationCard
key={organisation.id}
diff --git a/web/app/pages/Project/View/Panels.tsx b/web/app/pages/Project/View/Panels.tsx
index 02e8bc95b..2724fa430 100644
--- a/web/app/pages/Project/View/Panels.tsx
+++ b/web/app/pages/Project/View/Panels.tsx
@@ -193,13 +193,13 @@ const PanelContainer = ({
</div>
</div>
) : null}
- <div className='relative flex h-[19.6rem] flex-col overflow-auto'>
+ <div className='relative flex h-[19.6rem] flex-col overflow-hidden'>
{children}
</div>
{onDetailsClick ? (
<div className='mt-2 flex items-center justify-center'>
<Button
- className='max-w-max border border-transparent bg-white px-3 py-2 text-sm font-medium text-gray-700 hover:border-gray-200 hover:bg-gray-50 dark:border-slate-800/50 dark:bg-slate-800 dark:text-gray-200 hover:dark:bg-slate-700'
+ className='max-w-max border border-transparent bg-transparent px-3 py-2 text-sm font-medium text-gray-700 hover:border-gray-200 hover:bg-gray-50 dark:text-gray-200 hover:dark:border-slate-700/80 hover:dark:bg-slate-900'
type='button'
onClick={onDetailsClick}
>
@@ -819,7 +819,7 @@ const CustomEvents = ({
return (
<>
- <div className='sticky top-0 z-20 mb-1 flex items-center justify-between bg-white px-1 py-1 dark:bg-slate-800/90'>
+ <div className='mb-1 flex items-center justify-between p-1'>
<Text size='sm' weight='medium' colour='muted' className='w-4/6'>
{t('project.event')}
</Text>
@@ -833,7 +833,7 @@ const CustomEvents = ({
</Text>
</div>
- <div className='space-y-0.5'>
+ <div className='space-y-0.5 overflow-auto'>
{_map(
_orderBy(
keysToDisplay.map((ev) => ({ key: ev, value: eventsData[ev] })),
@@ -854,7 +854,7 @@ const CustomEvents = ({
return (
<div
key={`${ev}-${item.value}`}
- className='group relative flex cursor-pointer items-center rounded-sm px-1 py-1.5 hover:bg-gray-50 dark:text-gray-50 hover:dark:bg-slate-800'
+ className='group relative flex cursor-pointer items-center rounded-sm px-1 py-1.5 hover:bg-gray-50 dark:text-gray-50 hover:dark:bg-slate-800/60'
onClick={() => {
navigate(link)
}}
@@ -1259,7 +1259,7 @@ const MetadataKeyPanel = ({
return (
<>
- <div className='sticky top-0 z-20 mb-1 flex items-center justify-between bg-white px-1 py-1 dark:bg-slate-800/90'>
+ <div className='mb-1 flex items-center justify-between p-1'>
<Text size='sm' weight='medium' colour='muted' className='w-2/6'>
{t('project.key')}
</Text>
@@ -1284,7 +1284,7 @@ const MetadataKeyPanel = ({
</Text>
</div>
- <div className='space-y-0.5'>
+ <div className='space-y-0.5 overflow-auto'>
{_map(
valuesToDisplay as Array<{
key: string
@@ -1299,7 +1299,7 @@ const MetadataKeyPanel = ({
return (
<div
key={`${key}-${value}`}
- className='group relative flex cursor-pointer items-center rounded-sm px-1 py-1.5 hover:bg-gray-50 dark:text-gray-50 hover:dark:bg-slate-800'
+ className='group relative flex cursor-pointer items-center rounded-sm px-1 py-1.5 hover:bg-gray-50 dark:text-gray-50 hover:dark:bg-slate-800/60'
onClick={() => {
navigate(link)
}}
@@ -1358,7 +1358,7 @@ const MetadataKeyPanel = ({
return (
<>
- <div className='sticky top-0 z-20 mb-1 flex items-center justify-between bg-white px-1 py-1 dark:bg-slate-800/90'>
+ <div className='mb-1 flex items-center justify-between p-1'>
<Text size='sm' weight='medium' colour='muted' className='w-4/6'>
{t('project.value')}
</Text>
@@ -1380,7 +1380,7 @@ const MetadataKeyPanel = ({
</Text>
</div>
- <div className='space-y-0.5'>
+ <div className='space-y-0.5 overflow-auto'>
{_map(
valuesToDisplay as Array<{ value: string; count: number }>,
({ value, count }) => {
@@ -1391,7 +1391,7 @@ const MetadataKeyPanel = ({
return (
<div
key={value}
- className='group relative flex cursor-pointer items-center rounded-sm px-1 py-1.5 hover:bg-gray-50 dark:text-gray-50 hover:dark:bg-slate-800'
+ className='group relative flex cursor-pointer items-center rounded-sm px-1 py-1.5 hover:bg-gray-50 dark:text-gray-50 hover:dark:bg-slate-800/60'
onClick={() => {
navigate(link)
}}
@@ -1673,7 +1673,7 @@ const DetailsTable = ({
placeholder={t('project.search')}
value={search}
onChange={(e) => setSearch(e.target.value)}
- className='w-full rounded-md border border-gray-200 bg-white px-2 py-1 text-sm text-gray-900 placeholder-gray-400 focus:border-blue-500 focus:outline-none dark:border-slate-700 dark:bg-slate-800 dark:text-gray-50'
+ className='w-full rounded-md border border-gray-200 bg-white px-2 py-1 text-sm text-gray-900 placeholder-gray-400 focus:border-blue-500 focus:outline-none dark:border-slate-700/80 dark:bg-slate-900 dark:text-gray-50'
/>
</div>
<div ref={parentRef} className='max-h-[500px] overflow-y-auto'>
@@ -1987,7 +1987,7 @@ const Panel = ({
<PanelEmptyState message={t('project.noParamData')} />
) : (
<>
- <div className='sticky top-0 z-20 mb-1 flex items-center justify-between bg-white px-1 py-1 dark:bg-slate-800/90'>
+ <div className='mb-1 flex items-center justify-between p-1'>
<span className='text-sm font-medium text-gray-600 dark:text-gray-400'>
{tnMapping[activeTabId as keyof typeof tnMapping]}
</span>
@@ -1996,7 +1996,7 @@ const Panel = ({
</span>
</div>
- <div className='space-y-0.5'>
+ <div className='space-y-0.5 overflow-auto'>
{_map(entriesToDisplay, (entry) => {
const { count, name: entryName, ...rest } = entry
const perc = _round((count / total) * 100, 2)
@@ -2017,7 +2017,7 @@ const Panel = ({
className={cx(
'relative flex h-8 items-center justify-between rounded-sm px-1 py-1.5 dark:text-gray-50',
{
- 'group hover:bg-gray-50 hover:dark:bg-slate-800':
+ 'group hover:bg-gray-50 hover:dark:bg-slate-800/60':
!hideFilters &&
!dataLoading &&
(link || hasVersionsForItem),
@@ -2029,9 +2029,9 @@ const Panel = ({
className={cx('absolute inset-0 rounded-sm', {
'bg-blue-50 dark:bg-blue-900/30':
highlightColour === 'blue',
- 'bg-red-50 dark:bg-red-900/20':
+ 'bg-red-50 dark:bg-slate-500/15':
highlightColour === 'red',
- 'bg-orange-50 dark:bg-orange-400/20':
+ 'bg-orange-50 dark:bg-slate-500/15':
highlightColour === 'orange',
})}
style={{ width: `${perc}%` }}
@@ -2046,7 +2046,7 @@ const Panel = ({
e.stopPropagation()
toggleExpanded(entryName)
}}
- className='mr-1 rounded p-0.5 hover:bg-gray-200 dark:hover:bg-slate-600'
+ className='mr-1 rounded p-0.5 hover:bg-gray-200 dark:hover:bg-slate-700/80'
aria-label={
isExpanded ? 'Collapse versions' : 'Expand versions'
}
@@ -2137,7 +2137,7 @@ const Panel = ({
className={cx(
'relative flex items-center justify-between rounded-sm px-1 py-1.5 dark:text-gray-50',
{
- 'group cursor-pointer hover:bg-gray-50 hover:dark:bg-slate-800':
+ 'group cursor-pointer hover:bg-gray-50 hover:dark:bg-slate-800/60':
!disableRowClick &&
!hideFilters &&
!dataLoading &&
@@ -2147,7 +2147,14 @@ const Panel = ({
)}
>
<div
- className='absolute inset-0 rounded-sm bg-blue-50 dark:bg-blue-900/10'
+ className={cx('absolute inset-0 rounded-sm', {
+ 'bg-blue-50 dark:bg-blue-900/10':
+ highlightColour === 'blue',
+ 'bg-red-50 dark:bg-slate-600/15':
+ highlightColour === 'red',
+ 'bg-orange-50 dark:bg-slate-600/15':
+ highlightColour === 'orange',
+ })}
style={{ width: `${versionPerc}%` }}
/>
diff --git a/web/app/pages/Project/View/components/ChartTypeSwitcher.tsx b/web/app/pages/Project/View/components/ChartTypeSwitcher.tsx
new file mode 100644
index 000000000..5bed671d0
--- /dev/null
+++ b/web/app/pages/Project/View/components/ChartTypeSwitcher.tsx
@@ -0,0 +1,39 @@
+import { ChartColumnBigIcon, ChartLineIcon } from 'lucide-react'
+import { useTranslation } from 'react-i18next'
+import { chartTypes } from '~/lib/constants'
+
+interface ChartTypeSwitcherProps {
+ type: (typeof chartTypes)[keyof typeof chartTypes]
+ onSwitch: (type: (typeof chartTypes)[keyof typeof chartTypes]) => void
+}
+
+export const ChartTypeSwitcher = ({
+ type,
+ onSwitch,
+}: ChartTypeSwitcherProps) => {
+ const { t } = useTranslation('common')
+
+ if (type === chartTypes.bar) {
+ return (
+ <button
+ type='button'
+ title={t('project.lineChart')}
+ onClick={() => onSwitch(chartTypes.line)}
+ className='rounded-md border border-transparent p-1.5 text-sm font-medium transition-colors ring-inset hover:border-gray-300 hover:bg-white focus:z-10 focus:ring-1 focus:ring-indigo-500 focus:outline-hidden hover:dark:border-slate-700/80 hover:dark:bg-slate-900 focus:dark:ring-gray-200'
+ >
+ <ChartLineIcon className='h-5 w-5 text-gray-700 dark:text-gray-50' />
+ </button>
+ )
+ }
+
+ return (
+ <button
+ type='button'
+ title={t('project.barChart')}
+ onClick={() => onSwitch(chartTypes.bar)}
+ className='rounded-md border border-transparent p-1.5 text-sm font-medium transition-colors ring-inset hover:border-gray-300 hover:bg-white focus:z-10 focus:ring-1 focus:ring-indigo-500 focus:outline-hidden hover:dark:border-slate-700/80 hover:dark:bg-slate-900 focus:dark:ring-gray-200'
+ >
+ <ChartColumnBigIcon className='h-5 w-5 text-gray-700 dark:text-gray-50' />
+ </button>
+ )
+}
diff --git a/web/app/pages/Project/View/components/ProjectSidebar.tsx b/web/app/pages/Project/View/components/ProjectSidebar.tsx
index 325337c66..64371700f 100644
--- a/web/app/pages/Project/View/components/ProjectSidebar.tsx
+++ b/web/app/pages/Project/View/components/ProjectSidebar.tsx
@@ -76,7 +76,7 @@ const ICON_COLORS: Record<string, string> = {
// CAPTCHA
captcha: 'text-emerald-500',
// Settings
- settings: 'text-gray-500',
+ misc: 'text-gray-900 dark:text-gray-50',
}
interface Tab {
@@ -474,7 +474,7 @@ const ProjectSidebar: React.FC<ProjectSidebarProps> = ({
className,
)}
>
- <div className='sticky top-0 z-10 flex items-center justify-between border-b border-gray-200 bg-white px-4 py-2 dark:border-slate-800/60 dark:bg-slate-800/25'>
+ <div className='sticky top-0 z-10 flex items-center justify-between border-b border-gray-200 px-4 py-2 dark:border-slate-800/60'>
{isCollapsed && !isMobileOpen ? (
<Tooltip
text={projectName}
@@ -644,28 +644,28 @@ const ProjectSidebar: React.FC<ProjectSidebarProps> = ({
))}
</div>
- <div className='sticky bottom-0 flex flex-col gap-0.5 border-t border-gray-200 bg-white px-2 py-2 dark:border-slate-800/60 dark:bg-slate-800/25'>
+ <div className='sticky bottom-0 flex flex-col gap-0.5 border-t border-gray-200 px-2 py-2 dark:border-slate-800/60'>
{!isMobileOpen ? (
<button
type='button'
onClick={toggleCollapsed}
className={cn(
- 'group flex w-full items-center rounded-md px-2.5 py-2 text-sm font-medium transition-colors',
- 'text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-slate-800/60 dark:hover:text-gray-200',
+ 'group flex w-full items-center rounded-md px-2.5 py-2 text-sm font-medium tracking-normal transition-colors',
+ 'text-gray-900 hover:bg-gray-100 dark:text-gray-50 dark:hover:bg-slate-800/60',
isCollapsed ? 'justify-center' : 'gap-2.5',
)}
aria-label={isCollapsed ? t('common.expand') : t('common.collapse')}
>
{isCollapsed ? (
<PanelLeftOpenIcon
- className='h-5 w-5 shrink-0'
+ className={cn('h-5 w-5 shrink-0', ICON_COLORS.misc)}
strokeWidth={1.5}
aria-hidden='true'
/>
) : (
<>
<PanelLeftCloseIcon
- className='h-5 w-5 shrink-0'
+ className={cn('h-5 w-5 shrink-0', ICON_COLORS.misc)}
strokeWidth={1.5}
aria-hidden='true'
/>
@@ -680,14 +680,14 @@ const ProjectSidebar: React.FC<ProjectSidebarProps> = ({
to={routes.project_settings.replace(':id', projectId)}
onClick={onMobileClose}
className={cn(
- 'group flex w-full items-center rounded-md px-2.5 py-2 text-sm font-medium transition-colors',
- 'text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-slate-800/60 dark:hover:text-gray-200',
+ 'group flex w-full items-center rounded-md px-2.5 py-2 text-sm font-medium tracking-normal transition-colors',
+ 'text-gray-900 hover:bg-gray-100 dark:text-gray-50 dark:hover:bg-slate-800/60',
isCollapsed && !isMobileOpen ? 'justify-center' : 'gap-2.5',
)}
aria-label={t('common.settings')}
>
<SettingsIcon
- className={cn('h-5 w-5 shrink-0', ICON_COLORS.settings)}
+ className={cn('h-5 w-5 shrink-0', ICON_COLORS.misc)}
strokeWidth={1.5}
aria-hidden='true'
/>
diff --git a/web/app/pages/Project/tabs/Alerts/ProjectAlertsView.tsx b/web/app/pages/Project/tabs/Alerts/ProjectAlertsView.tsx
index a6c55a584..7f8ef2756 100644
--- a/web/app/pages/Project/tabs/Alerts/ProjectAlertsView.tsx
+++ b/web/app/pages/Project/tabs/Alerts/ProjectAlertsView.tsx
@@ -144,7 +144,7 @@ const AlertRow = ({
<>
<li
onClick={() => openAlert(id)}
- className='group relative mb-3 cursor-pointer overflow-hidden rounded-lg border border-gray-200 bg-gray-50 transition-colors hover:bg-gray-100 dark:border-slate-800/25 dark:bg-slate-800/70 dark:hover:bg-slate-700/60'
+ className='group relative mb-3 cursor-pointer overflow-hidden rounded-lg border border-gray-200 bg-gray-50 transition-colors hover:bg-gray-100 dark:border-slate-800/60 dark:bg-slate-800/25 dark:hover:bg-slate-800/60'
>
<div className='flex items-center justify-between gap-4 px-4 py-3 sm:px-5'>
{/* Left section: Icon + Name + Badge */}
diff --git a/web/app/pages/Project/tabs/Errors/ErrorsView.tsx b/web/app/pages/Project/tabs/Errors/ErrorsView.tsx
index d724d0eed..6b23a79f3 100644
--- a/web/app/pages/Project/tabs/Errors/ErrorsView.tsx
+++ b/web/app/pages/Project/tabs/Errors/ErrorsView.tsx
@@ -291,7 +291,7 @@ interface StatCardProps {
}
const StatCard = ({ icon, value, label }: StatCardProps) => (
- <div className='relative overflow-hidden rounded-xl border border-gray-200 bg-white p-4 dark:border-slate-700 dark:bg-slate-800'>
+ <div className='relative overflow-hidden rounded-lg border border-gray-200 bg-white p-4 dark:border-slate-800/60 dark:bg-slate-800/25'>
<div className='pointer-events-none absolute -bottom-5 -left-5 opacity-10 [&>svg]:size-24'>
{icon}
</div>
@@ -361,7 +361,7 @@ const ErrorItem = ({ error }: ErrorItemProps) => {
return (
<Link to={{ search: params.toString() }}>
- <li className='relative mb-3 flex cursor-pointer justify-between gap-x-6 overflow-hidden rounded-xl border border-gray-200 bg-gray-50 px-4 py-4 transition-colors hover:bg-gray-200/70 sm:px-6 dark:border-slate-800/25 dark:bg-slate-800/70 dark:hover:bg-slate-700/60'>
+ <li className='relative mb-3 flex cursor-pointer justify-between gap-x-6 overflow-hidden rounded-lg border border-gray-200 bg-gray-50 px-4 py-4 transition-colors hover:bg-gray-200/70 sm:px-6 dark:border-slate-800/60 dark:bg-slate-800/25 dark:hover:bg-slate-800/60'>
<div className='flex min-w-0 gap-x-4'>
<div className='min-w-0 flex-auto'>
<div className='flex items-center gap-x-2 leading-6'>
@@ -1275,7 +1275,7 @@ const ErrorsViewInner = ({ deferredData }: ErrorsViewInnerProps) => {
<>
<div className='flex flex-col gap-2 lg:flex-row'>
{chartOptions && overview?.chart ? (
- <div className='w-full rounded-xl border border-gray-200 bg-white p-4 lg:w-[65%] dark:border-slate-700 dark:bg-slate-800'>
+ <div className='w-full rounded-lg border border-gray-200 bg-white p-4 lg:w-[65%] dark:border-slate-800/60 dark:bg-slate-800/25'>
<BillboardChart options={chartOptions} className='h-[220px]' />
</div>
) : null}
diff --git a/web/app/pages/Project/tabs/Experiments/ExperimentsView.tsx b/web/app/pages/Project/tabs/Experiments/ExperimentsView.tsx
index 5e4e210db..56d811443 100644
--- a/web/app/pages/Project/tabs/Experiments/ExperimentsView.tsx
+++ b/web/app/pages/Project/tabs/Experiments/ExperimentsView.tsx
@@ -162,7 +162,7 @@ const ExperimentRow = ({
return (
<>
- <li className='relative mb-3 overflow-hidden rounded-lg border border-gray-200 bg-gray-50 transition-colors dark:border-slate-800/25 dark:bg-slate-800/70'>
+ <li className='relative mb-3 overflow-hidden rounded-lg border border-gray-200 bg-gray-50 transition-colors dark:border-slate-800/60 dark:bg-slate-800/25'>
<div className='flex justify-between gap-x-6 px-4 py-4 sm:px-6'>
<div className='flex min-w-0 gap-x-4'>
<div className='min-w-0 flex-auto'>
@@ -738,7 +738,7 @@ const ExperimentsView = ({
placeholder={t('experiments.filterExperiments')}
value={filterQuery}
onChange={handleSearchChange}
- className='w-full rounded-lg border border-gray-300 bg-white py-2 pr-4 pl-9 text-sm text-gray-900 placeholder-gray-500 ring-inset focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 focus:outline-none sm:w-64 dark:border-slate-700 dark:bg-slate-800 dark:text-gray-100 dark:placeholder-gray-400 dark:focus:border-indigo-400 dark:focus:ring-indigo-400'
+ className='w-full rounded-lg border-0 bg-white py-2 pr-4 pl-9 text-sm text-gray-900 placeholder-gray-500 ring-1 ring-gray-300 ring-inset focus:ring-slate-900 focus:outline-none sm:w-64 dark:bg-slate-900 dark:text-gray-50 dark:placeholder-gray-400 dark:ring-slate-700/80 dark:focus:ring-slate-300'
/>
</div>
<Button onClick={handleNewExperiment} primary regular>
diff --git a/web/app/pages/Project/tabs/FeatureFlags/FeatureFlagsView.tsx b/web/app/pages/Project/tabs/FeatureFlags/FeatureFlagsView.tsx
index 27f5d4730..683c7a19d 100644
--- a/web/app/pages/Project/tabs/FeatureFlags/FeatureFlagsView.tsx
+++ b/web/app/pages/Project/tabs/FeatureFlags/FeatureFlagsView.tsx
@@ -210,11 +210,11 @@ const FeatureFlagRow = ({
return (
<>
- <li className='relative mb-3 overflow-hidden rounded-lg border border-gray-200 bg-gray-50 transition-colors dark:border-slate-800/25 dark:bg-slate-800/70'>
+ <li className='relative mb-3 overflow-hidden rounded-lg border border-gray-200 bg-gray-50 transition-colors dark:border-slate-800/60 dark:bg-slate-800/25'>
{/* Main row - clickable to expand */}
<div
onClick={() => onToggleExpand(flag.id)}
- className='flex cursor-pointer justify-between gap-x-6 px-4 py-4 transition-colors hover:bg-gray-200/70 sm:px-6 dark:hover:bg-slate-700/60'
+ className='flex cursor-pointer justify-between gap-x-6 px-4 py-4 transition-colors hover:bg-gray-200/70 sm:px-6 dark:hover:bg-slate-800/60'
>
<div className='flex min-w-0 gap-x-4'>
<div className='min-w-0 flex-auto'>
@@ -997,7 +997,7 @@ const FeatureFlagsViewInner = ({
placeholder={t('featureFlags.filterFlags')}
value={filterQuery}
onChange={handleSearchChange}
- className='w-full rounded-lg border border-gray-300 bg-white py-2 pr-4 pl-9 text-sm text-gray-900 placeholder-gray-500 ring-inset focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 focus:outline-none sm:w-64 dark:border-slate-700 dark:bg-slate-800 dark:text-gray-100 dark:placeholder-gray-400 dark:focus:border-indigo-400 dark:focus:ring-indigo-400'
+ className='w-full rounded-lg border-0 bg-white py-2 pr-4 pl-9 text-sm text-gray-900 placeholder-gray-500 ring-1 ring-gray-300 ring-inset focus:ring-slate-900 focus:outline-none sm:w-64 dark:bg-slate-900 dark:text-gray-50 dark:placeholder-gray-400 dark:ring-slate-700/80 dark:focus:ring-slate-300'
/>
</div>
<Button onClick={handleNewFlag} primary regular>
diff --git a/web/app/pages/Project/tabs/Funnels/FunnelsList.tsx b/web/app/pages/Project/tabs/Funnels/FunnelsList.tsx
index fbac29573..65063e6df 100644
--- a/web/app/pages/Project/tabs/Funnels/FunnelsList.tsx
+++ b/web/app/pages/Project/tabs/Funnels/FunnelsList.tsx
@@ -50,7 +50,7 @@ const FunnelCard = ({
to={{
search,
}}
- className='min-h-[120px] cursor-pointer overflow-hidden rounded-lg border border-gray-200 bg-gray-50 transition-colors hover:bg-gray-200/70 dark:border-slate-800/25 dark:bg-slate-800/70 dark:hover:bg-slate-700/60'
+ className='min-h-[120px] cursor-pointer overflow-hidden rounded-lg border border-gray-200 bg-gray-50 transition-colors hover:bg-gray-200/70 dark:border-slate-800/60 dark:bg-slate-800/25 dark:hover:bg-slate-800/60'
>
<div className='px-4 py-4'>
<div className='flex items-center justify-between'>
diff --git a/web/app/pages/Project/tabs/Goals/GoalsView.tsx b/web/app/pages/Project/tabs/Goals/GoalsView.tsx
index 0d5d43058..cbe0b3573 100644
--- a/web/app/pages/Project/tabs/Goals/GoalsView.tsx
+++ b/web/app/pages/Project/tabs/Goals/GoalsView.tsx
@@ -319,11 +319,11 @@ const GoalRow = ({
return (
<>
- <li className='relative mb-3 overflow-hidden rounded-lg border border-gray-200 bg-gray-50 transition-colors dark:border-slate-800/25 dark:bg-slate-800/70'>
+ <li className='relative mb-3 overflow-hidden rounded-lg border border-gray-200 bg-gray-50 transition-colors dark:border-slate-800/60 dark:bg-slate-800/25'>
{/* Main row - clickable to expand */}
<div
onClick={() => onToggleExpand(goal.id)}
- className='flex cursor-pointer justify-between gap-x-6 px-4 py-4 transition-colors hover:bg-gray-200/70 sm:px-6 dark:hover:bg-slate-700/60'
+ className='flex cursor-pointer justify-between gap-x-6 px-4 py-4 transition-colors hover:bg-gray-200/70 sm:px-6 dark:hover:bg-slate-800/60'
>
<div className='flex min-w-0 gap-x-4'>
<div className='min-w-0 flex-auto'>
@@ -885,7 +885,7 @@ const GoalsViewInner = ({
placeholder={t('goals.filterGoals')}
value={filterQuery}
onChange={(e) => setFilterQuery(e.target.value)}
- className='w-full rounded-lg border border-gray-300 bg-white py-2 pr-4 pl-9 text-sm text-gray-900 placeholder-gray-500 ring-inset focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 focus:outline-none sm:w-64 dark:border-slate-700 dark:bg-slate-800 dark:text-gray-100 dark:placeholder-gray-400 dark:focus:border-indigo-400 dark:focus:ring-indigo-400'
+ className='w-full rounded-lg border-0 bg-white py-2 pr-4 pl-9 text-sm text-gray-900 placeholder-gray-500 ring-1 ring-gray-300 ring-inset focus:ring-slate-900 focus:outline-none sm:w-64 dark:bg-slate-900 dark:text-gray-50 dark:placeholder-gray-400 dark:ring-slate-700/80 dark:focus:ring-slate-300'
/>
</div>
<Button onClick={handleNewGoal} primary regular>
diff --git a/web/app/pages/Project/tabs/Performance/PerformanceView.tsx b/web/app/pages/Project/tabs/Performance/PerformanceView.tsx
index cebc9a4a1..d16ff5f2b 100644
--- a/web/app/pages/Project/tabs/Performance/PerformanceView.tsx
+++ b/web/app/pages/Project/tabs/Performance/PerformanceView.tsx
@@ -56,6 +56,7 @@ import Dropdown from '~/ui/Dropdown'
import LoadingBar from '~/ui/LoadingBar'
import { getStringFromTime, getTimeFromSeconds } from '~/utils/generic'
import { LoaderView } from '../../View/components/LoaderView'
+import { ChartTypeSwitcher } from '../../View/components/ChartTypeSwitcher'
const InteractiveMap = lazy(
() => import('~/pages/Project/View/components/InteractiveMap'),
@@ -365,62 +366,6 @@ const PerformanceViewInner = ({
)
}
- const ChartTypeSwitcher = ({
- type,
- onSwitch,
- }: {
- type: string
- onSwitch: (type: 'line' | 'bar') => void
- }) => {
- if (type === chartTypes.bar) {
- return (
- <button
- type='button'
- title={t('project.lineChart')}
- onClick={() => onSwitch('line')}
- className='rounded-md border border-transparent bg-gray-50 p-2 text-sm font-medium transition-colors ring-inset hover:border-gray-300 hover:bg-white focus:z-10 focus:ring-1 focus:ring-indigo-500 focus:outline-hidden dark:bg-slate-900 hover:dark:border-slate-700/80 dark:hover:bg-slate-800 focus:dark:ring-gray-200'
- >
- <svg
- className='h-5 w-5 text-gray-700 dark:text-gray-50'
- fill='none'
- viewBox='0 0 24 24'
- strokeWidth='1.5'
- stroke='currentColor'
- >
- <path
- strokeLinecap='round'
- strokeLinejoin='round'
- d='M7.5 14.25v2.25m3-4.5v4.5m3-6.75v6.75m3-9v9M6 20.25h12A2.25 2.25 0 0020.25 18V6A2.25 2.25 0 0018 3.75H6A2.25 2.25 0 003.75 6v12A2.25 2.25 0 006 20.25z'
- />
- </svg>
- </button>
- )
- }
-
- return (
- <button
- type='button'
- title={t('project.barChart')}
- onClick={() => onSwitch('bar')}
- className='rounded-md border border-transparent bg-gray-50 p-2 text-sm font-medium transition-colors ring-inset hover:border-gray-300 hover:bg-white focus:z-10 focus:ring-1 focus:ring-indigo-500 focus:outline-hidden dark:bg-slate-900 hover:dark:border-slate-700/80 dark:hover:bg-slate-800 focus:dark:ring-gray-200'
- >
- <svg
- className='h-5 w-5 text-gray-700 dark:text-gray-50'
- fill='none'
- viewBox='0 0 24 24'
- strokeWidth='1.5'
- stroke='currentColor'
- >
- <path
- strokeLinecap='round'
- strokeLinejoin='round'
- d='M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z'
- />
- </svg>
- </button>
- )
- }
-
// Fullscreen map view - takes over the entire content area
if (isMapFullscreen && fullscreenMapRef.current) {
const countryData = panelsData.data?.cc || []
@@ -468,7 +413,7 @@ const PerformanceViewInner = ({
<Filters className='mb-3' tnMapping={tnMapping} />
) : null}
<div className='relative overflow-hidden rounded-lg border border-gray-200 bg-white p-4 dark:border-slate-800/60 dark:bg-slate-800/25'>
- <div className='mb-3 flex w-full items-center justify-end gap-2 lg:absolute lg:top-2 lg:right-2 lg:mb-0 lg:w-auto lg:justify-normal'>
+ <div className='mb-3 flex w-full items-center justify-end gap-1.5 lg:absolute lg:top-2 lg:right-2 lg:mb-0 lg:w-auto lg:justify-normal'>
<Dropdown
items={chartMetrics}
className='xs:min-w-0'
@@ -485,7 +430,7 @@ const PerformanceViewInner = ({
onSelect={({ id: pairID }) => {
setActiveChartMetrics(pairID)
}}
- buttonClassName='!px-2 bg-gray-50 rounded-md border border-transparent hover:border-gray-300 hover:bg-white dark:bg-slate-900 hover:dark:border-slate-700/80 dark:hover:bg-slate-800 focus:dark:ring-gray-200'
+ buttonClassName='!p-1.5 rounded-md border border-transparent hover:border-gray-300 hover:bg-white hover:dark:border-slate-700/80 hover:dark:bg-slate-900 focus:dark:ring-gray-200'
chevron='mini'
headless
/>
@@ -508,7 +453,7 @@ const PerformanceViewInner = ({
onSelect={({ id: pairID }) => {
setActiveMeasure(pairID)
}}
- buttonClassName='!px-2 bg-gray-50 rounded-md border border-transparent hover:border-gray-300 hover:bg-white dark:bg-slate-900 hover:dark:border-slate-700/80 dark:hover:bg-slate-800 focus:dark:ring-gray-200'
+ buttonClassName='!p-1.5 rounded-md border border-transparent hover:border-gray-300 hover:bg-white hover:dark:border-slate-700/80 hover:dark:bg-slate-900 focus:dark:ring-gray-200'
chevron='mini'
headless
/>
diff --git a/web/app/pages/Project/tabs/Profiles/Profiles.tsx b/web/app/pages/Project/tabs/Profiles/Profiles.tsx
index 94491c2eb..4c561ffc6 100644
--- a/web/app/pages/Project/tabs/Profiles/Profiles.tsx
+++ b/web/app/pages/Project/tabs/Profiles/Profiles.tsx
@@ -101,7 +101,7 @@ const ProfileRow = ({ profile, timeFormat }: ProfileRowProps) => {
return (
<Link to={{ search: params.toString() }}>
- <li className='relative mb-3 flex cursor-pointer justify-between gap-x-6 overflow-hidden rounded-lg border border-gray-200 bg-gray-50 px-4 py-4 transition-colors hover:bg-gray-200/70 sm:px-6 dark:border-slate-800/25 dark:bg-slate-800/70 dark:hover:bg-slate-700/60'>
+ <li className='relative mb-3 flex cursor-pointer justify-between gap-x-6 overflow-hidden rounded-lg border border-gray-200 bg-gray-50 px-4 py-4 transition-colors hover:bg-gray-200/70 sm:px-6 dark:border-slate-800/60 dark:bg-slate-800/25 dark:hover:bg-slate-800/60'>
<div className='flex min-w-0 gap-x-3'>
<div className='relative shrink-0'>
<ProfileAvatar
diff --git a/web/app/pages/Project/tabs/Sessions/Sessions.tsx b/web/app/pages/Project/tabs/Sessions/Sessions.tsx
index d43557b0b..4a75f726e 100644
--- a/web/app/pages/Project/tabs/Sessions/Sessions.tsx
+++ b/web/app/pages/Project/tabs/Sessions/Sessions.tsx
@@ -178,7 +178,7 @@ const Session = ({
return (
<Link to={{ search: params.toString() }}>
- <li className='relative mb-3 flex cursor-pointer justify-between gap-x-6 overflow-hidden rounded-lg border border-gray-200 bg-gray-50 px-4 py-4 transition-colors hover:bg-gray-200/70 sm:px-6 dark:border-slate-800/25 dark:bg-slate-800/70 dark:hover:bg-slate-700/60'>
+ <li className='relative mb-3 flex cursor-pointer justify-between gap-x-6 overflow-hidden rounded-lg border border-gray-200 bg-gray-50 px-4 py-4 transition-colors hover:bg-gray-200/70 sm:px-6 dark:border-slate-800/60 dark:bg-slate-800/25 dark:hover:bg-slate-800/60'>
<div className='flex min-w-0 gap-x-3'>
{hideUserDetails ? null : (
<div className='relative shrink-0'>
diff --git a/web/app/pages/Project/tabs/Traffic/TrafficView.tsx b/web/app/pages/Project/tabs/Traffic/TrafficView.tsx
index 06d3b3166..bf2faf8d4 100644
--- a/web/app/pages/Project/tabs/Traffic/TrafficView.tsx
+++ b/web/app/pages/Project/tabs/Traffic/TrafficView.tsx
@@ -103,6 +103,7 @@ import { getLocaleDisplayName, nLocaleFormatter } from '~/utils/generic'
import { groupRefEntries } from '~/utils/referrers'
import routes from '~/utils/routes'
import { LoaderView } from '../../View/components/LoaderView'
+import { ChartTypeSwitcher } from '../../View/components/ChartTypeSwitcher'
const InteractiveMap = lazy(
() => import('~/pages/Project/View/components/InteractiveMap'),
@@ -906,38 +907,6 @@ const TrafficViewInner = ({
)
}
- const ChartTypeSwitcher = ({
- type,
- onSwitch,
- }: {
- type: string
- onSwitch: (type: 'line' | 'bar') => void
- }) => {
- if (type === chartTypes.bar) {
- return (
- <button
- type='button'
- title={t('project.lineChart')}
- onClick={() => onSwitch('line')}
- className='rounded-md border border-transparent bg-gray-50 p-2 text-sm font-medium transition-colors ring-inset hover:border-gray-300 hover:bg-white focus:z-10 focus:ring-1 focus:ring-indigo-500 focus:outline-hidden dark:bg-slate-900 hover:dark:border-slate-700/80 dark:hover:bg-slate-800 focus:dark:ring-gray-200'
- >
- <ChartLineIcon className='h-5 w-5 text-gray-700 dark:text-gray-50' />
- </button>
- )
- }
-
- return (
- <button
- type='button'
- title={t('project.barChart')}
- onClick={() => onSwitch('bar')}
- className='rounded-md border border-transparent bg-gray-50 p-2 text-sm font-medium transition-colors ring-inset hover:border-gray-300 hover:bg-white focus:z-10 focus:ring-1 focus:ring-indigo-500 focus:outline-hidden dark:bg-slate-900 hover:dark:border-slate-700/80 dark:hover:bg-slate-800 focus:dark:ring-gray-200'
- >
- <ChartColumnBigIcon className='h-5 w-5 text-gray-700 dark:text-gray-50' />
- </button>
- )
- }
-
// Fullscreen map view - takes over the entire content area
if (isMapFullscreen && fullscreenMapRef.current) {
const countryData = panelsData.data?.cc || []
@@ -985,7 +954,7 @@ const TrafficViewInner = ({
<Filters className='mb-3' tnMapping={tnMapping} />
) : null}
<div className='relative overflow-hidden rounded-lg border border-gray-200 bg-white p-4 dark:border-slate-800/60 dark:bg-slate-800/25'>
- <div className='mb-3 flex w-full items-center justify-end gap-2 lg:absolute lg:top-2 lg:right-2 lg:mb-0 lg:w-auto lg:justify-normal'>
+ <div className='mb-3 flex w-full items-center justify-end gap-1 lg:absolute lg:top-2 lg:right-2 lg:mb-0 lg:w-auto lg:justify-normal'>
<Dropdown
header={t('project.metricVis')}
items={
@@ -1048,7 +1017,7 @@ const TrafficViewInner = ({
/>
)
}}
- buttonClassName='!px-2 bg-gray-50 rounded-md border border-transparent hover:border-gray-300 hover:bg-white dark:bg-slate-900 hover:dark:border-slate-700/80 dark:hover:bg-slate-800 focus:dark:ring-gray-200'
+ buttonClassName='!p-1.5 rounded-md border border-transparent hover:border-gray-300 hover:bg-white hover:dark:border-slate-700/80 hover:dark:bg-slate-900 focus:dark:ring-gray-200'
selectItemClassName='p-0'
keyExtractor={(pair) => pair?.id || ''}
onSelect={(pair, e) => {
diff --git a/web/app/ui/Button.tsx b/web/app/ui/Button.tsx
index 939613905..334b7fafc 100644
--- a/web/app/ui/Button.tsx
+++ b/web/app/ui/Button.tsx
@@ -56,25 +56,26 @@ const Button = ({
className={cn(
'relative inline-flex items-center rounded-md border leading-4 font-medium transition-all select-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',
{
- 'border-transparent bg-slate-900 text-gray-50 shadow-xs hover:bg-slate-700 dark:border-slate-700/50 dark:bg-slate-800 dark:hover:bg-slate-700':
+ 'border-transparent bg-slate-900 text-gray-50 shadow-xs hover:bg-slate-700 dark:bg-slate-100 dark:text-slate-900 dark:hover:bg-white':
primary,
- 'border-transparent bg-slate-300 text-slate-900 hover:bg-slate-200':
+ 'border-transparent bg-slate-200 text-slate-900 hover:bg-slate-300 dark:bg-slate-700 dark:text-slate-100 dark:hover:bg-slate-600':
secondary,
- 'border-transparent bg-white text-gray-700 hover:bg-gray-50': white,
- 'border-transparent bg-red-500 text-gray-50 hover:bg-red-600 dark:bg-red-600 dark:hover:bg-red-700':
+ 'border-transparent bg-white text-gray-700 hover:bg-gray-50 dark:bg-slate-800 dark:text-gray-100 dark:ring-1 dark:ring-slate-700 dark:hover:bg-slate-700':
+ white,
+ 'border-transparent bg-red-500 text-gray-50 hover:bg-red-600 dark:bg-red-600 dark:hover:bg-red-500':
danger,
- 'border-1 border-red-600 text-red-500 hover:bg-red-500 hover:text-white dark:border-red-500 dark:text-red-200 dark:hover:bg-red-600':
+ 'border border-red-500 text-red-600 hover:bg-red-500 hover:text-white dark:border-red-400 dark:text-red-400 dark:hover:bg-red-500 dark:hover:text-white':
semiDanger,
- 'border-transparent bg-transparent text-gray-700 hover:border-gray-300 hover:bg-white dark:text-gray-200 dark:hover:border-slate-700/80 dark:hover:bg-slate-800':
+ 'border-transparent bg-transparent text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-slate-800 dark:hover:text-gray-100':
ghost,
- 'border-none text-gray-700 focus:border-none focus:ring-0 focus:ring-offset-0 dark:text-white':
+ 'border-none text-gray-700 focus:border-none focus:ring-0 focus:ring-offset-0 dark:text-gray-200':
noBorder,
'px-2.5 py-1.5 text-xs': small,
'px-2.5 py-1.5 text-sm': semiSmall,
'px-4 py-2 text-sm': large,
'px-6 py-3 text-base': giant,
'px-3 py-2 text-sm': regular,
- 'focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:outline-hidden':
+ 'focus:ring-2 focus:ring-slate-900 focus:ring-offset-2 focus:outline-hidden dark:focus:ring-slate-300 dark:focus:ring-offset-slate-900':
focus,
},
className,
diff --git a/web/app/ui/Checkbox.tsx b/web/app/ui/Checkbox.tsx
index cabfc647c..13900aeaf 100644
--- a/web/app/ui/Checkbox.tsx
+++ b/web/app/ui/Checkbox.tsx
@@ -36,9 +36,9 @@ const Checkbox = ({
name={name}
checked={checked}
onChange={onChange}
- className='group size-4 shrink-0 cursor-pointer rounded-sm bg-white ring-1 ring-gray-200 transition-colors duration-100 ease-out ring-inset data-[checked]:bg-slate-900 data-[checked]:ring-slate-900 dark:bg-white/10 dark:ring-white/15 dark:data-[checked]:bg-white dark:data-[checked]:ring-white/15'
+ className='group size-4 shrink-0 cursor-pointer rounded-sm bg-white ring-1 ring-gray-300 transition-colors duration-100 ease-out ring-inset data-[checked]:bg-slate-900 data-[checked]:ring-slate-900 dark:bg-slate-900 dark:ring-slate-700/80 dark:data-[checked]:bg-slate-100 dark:data-[checked]:ring-slate-100'
>
- <CheckIcon className='pointer-events-none size-4 scale-90 text-white opacity-0 transition-all duration-100 group-data-[checked]:scale-100 group-data-[checked]:opacity-100 dark:text-black' />
+ <CheckIcon className='pointer-events-none size-4 scale-90 text-white opacity-0 transition-all duration-100 group-data-[checked]:scale-100 group-data-[checked]:opacity-100 dark:text-slate-900' />
</HeadlessCheckbox>
<Label className='cursor-pointer text-sm font-medium text-gray-900 dark:text-gray-200'>
{label}
diff --git a/web/app/ui/Dropdown.tsx b/web/app/ui/Dropdown.tsx
index 9f5812c5a..923ade8f9 100644
--- a/web/app/ui/Dropdown.tsx
+++ b/web/app/ui/Dropdown.tsx
@@ -78,7 +78,7 @@ function Dropdown<T>({
{
'justify-between': aside,
'justify-center': !aside,
- 'inline-flex w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium hover:bg-gray-50 focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:ring-offset-gray-100 focus:outline-hidden md:px-4 dark:border-gray-800 dark:bg-slate-800 dark:hover:bg-slate-700':
+ 'inline-flex w-full rounded-md border-0 bg-white px-3 py-2 text-sm font-medium ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:ring-2 focus:ring-slate-900 focus:outline-hidden md:px-4 dark:bg-slate-900 dark:text-gray-50 dark:ring-slate-700/80 dark:hover:bg-slate-800 dark:focus:ring-slate-300':
!headless,
'group inline-flex w-full px-3 py-2 text-sm font-medium outline-hidden md:px-4':
headless,
@@ -130,7 +130,7 @@ function Dropdown<T>({
}}
modal={false}
className={cn(
- 'z-50 w-40 min-w-max rounded-md bg-gray-50 p-1 ring-1 ring-black/10 focus:outline-hidden dark:bg-slate-800',
+ 'z-50 w-40 min-w-max rounded-md bg-white p-1 ring-1 ring-black/10 focus:outline-hidden dark:bg-slate-900 dark:ring-slate-700/80',
menuItemsClassName,
)}
>
@@ -153,7 +153,7 @@ function Dropdown<T>({
>
<span
className={cn(
- 'block cursor-pointer rounded-md p-2 text-sm text-gray-700 transition-colors hover:bg-gray-200 dark:text-gray-50 dark:hover:bg-slate-700',
+ 'block cursor-pointer rounded-md p-2 text-sm text-gray-700 transition-colors hover:bg-gray-100 dark:text-gray-50 dark:hover:bg-slate-800',
selectItemClassName,
)}
role='menuitem'
diff --git a/web/app/ui/Input.tsx b/web/app/ui/Input.tsx
index da4105faa..bcd5c37e9 100644
--- a/web/app/ui/Input.tsx
+++ b/web/app/ui/Input.tsx
@@ -45,10 +45,10 @@ const Input = ({
const inputElement = (
<HeadlessInput
className={cx(
- 'w-full rounded-md border-0 ring-1 ring-inset focus:ring-indigo-500 sm:text-sm dark:bg-slate-800 dark:text-gray-50 dark:placeholder-gray-400',
+ 'w-full rounded-md border-0 ring-1 ring-inset focus:ring-slate-900 sm:text-sm dark:bg-slate-900 dark:text-gray-50 dark:placeholder-gray-400 dark:focus:ring-slate-300',
{
'text-red-900 placeholder-red-300 ring-red-600': isError,
- 'ring-gray-300 dark:ring-slate-800/50': !isError,
+ 'ring-gray-300 dark:ring-slate-700/80': !isError,
'cursor-text bg-gray-100 text-gray-500 dark:bg-slate-700 dark:text-gray-400':
disabled,
'pr-10': isPassword,
diff --git a/web/app/ui/Modal.tsx b/web/app/ui/Modal.tsx
index e37c33b93..98e466bcf 100644
--- a/web/app/ui/Modal.tsx
+++ b/web/app/ui/Modal.tsx
@@ -163,20 +163,31 @@ const Modal = ({
<button
type='button'
className={cn(
- 'inline-flex w-full justify-center rounded-md px-4 py-2 text-base font-medium text-white transition-colors sm:ml-3 sm:w-auto sm:text-sm',
+ 'inline-flex w-full justify-center rounded-md px-4 py-2 text-base font-medium transition-colors sm:ml-3 sm:w-auto sm:text-sm',
{
- 'bg-indigo-600': submitType === 'regular',
- 'bg-red-600': submitType === 'danger',
- 'cursor-not-allowed opacity-70': submitDisabled,
- 'hover:bg-indigo-700':
+ 'bg-slate-900 text-white hover:bg-slate-700 dark:bg-slate-100 dark:text-slate-900 dark:hover:bg-white':
submitType === 'regular' && !submitDisabled,
- 'hover:bg-red-700':
+ 'bg-slate-900 text-white dark:bg-slate-100 dark:text-slate-900':
+ submitType === 'regular' && submitDisabled,
+ 'bg-red-600 text-white hover:bg-red-700 dark:bg-red-600 dark:hover:bg-red-500':
submitType === 'danger' && !submitDisabled,
+ 'bg-red-600 text-white dark:bg-red-600':
+ submitType === 'danger' && submitDisabled,
+ 'cursor-not-allowed opacity-70': submitDisabled,
},
)}
onClick={onSubmit}
>
- {isLoading ? <Spin alwaysLight /> : null}
+ {isLoading ? (
+ <Spin
+ alwaysLight={submitType === 'danger'}
+ className={
+ submitType === 'regular'
+ ? 'text-white dark:text-slate-900'
+ : undefined
+ }
+ />
+ ) : null}
{submitText}
</button>
) : null}
diff --git a/web/app/ui/Pagination.tsx b/web/app/ui/Pagination.tsx
index a43932bac..5a9ffa0d9 100644
--- a/web/app/ui/Pagination.tsx
+++ b/web/app/ui/Pagination.tsx
@@ -42,7 +42,7 @@ const Pagination = ({
return (
<div
className={cx(
- 'flex items-center justify-between border-t border-gray-200 py-3 dark:border-gray-700',
+ 'flex items-center justify-between border-t border-gray-200 py-3 dark:border-slate-700/80',
className,
)}
>
@@ -58,10 +58,10 @@ const Pagination = ({
}}
disabled={page === 1}
className={cx(
- 'relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 dark:border-gray-600 dark:bg-slate-800 dark:text-gray-200',
+ 'relative inline-flex items-center rounded-md border-0 bg-white px-4 py-2 text-sm font-medium text-gray-700 ring-1 ring-gray-300 ring-inset dark:bg-slate-900 dark:text-gray-50 dark:ring-slate-700/80',
{
- 'cursor-not-allowed': page === 1,
- 'hover:bg-gray-100 dark:hover:bg-slate-700': page !== 1,
+ 'cursor-not-allowed opacity-50': page === 1,
+ 'hover:bg-gray-50 dark:hover:bg-slate-800': page !== 1,
},
)}
>
@@ -78,10 +78,10 @@ const Pagination = ({
}}
disabled={page === pageAmount}
className={cx(
- 'relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 dark:border-gray-600 dark:bg-slate-800 dark:text-gray-200',
+ 'relative ml-3 inline-flex items-center rounded-md border-0 bg-white px-4 py-2 text-sm font-medium text-gray-700 ring-1 ring-gray-300 ring-inset dark:bg-slate-900 dark:text-gray-50 dark:ring-slate-700/80',
{
- 'cursor-not-allowed': page === pageAmount,
- 'hover:bg-gray-100 dark:hover:bg-slate-700': page !== pageAmount,
+ 'cursor-not-allowed opacity-50': page === pageAmount,
+ 'hover:bg-gray-50 dark:hover:bg-slate-800': page !== pageAmount,
},
)}
>
@@ -130,10 +130,10 @@ const Pagination = ({
}}
disabled={page === 1}
className={cx(
- 'relative inline-flex items-center rounded-l-md border border-gray-300 px-2 py-2 text-gray-400 focus:z-20 dark:border-gray-800',
+ 'relative inline-flex items-center rounded-l-md border border-gray-300 bg-white px-2 py-2 text-gray-400 focus:z-20 dark:border-slate-700/80 dark:bg-slate-900 dark:text-gray-500',
{
- 'cursor-not-allowed': page === 1,
- 'hover:bg-gray-100 dark:hover:bg-slate-700': page !== 1,
+ 'cursor-not-allowed opacity-50': page === 1,
+ 'hover:bg-gray-50 dark:hover:bg-slate-800': page !== 1,
},
)}
>
@@ -155,7 +155,7 @@ const Pagination = ({
setPage(middlePage)
}}
- className='relative inline-flex items-center border border-gray-300 px-4 py-2 text-sm font-semibold text-gray-700 hover:bg-gray-100 dark:border-gray-800 dark:text-gray-200 dark:hover:bg-slate-700'
+ className='relative inline-flex items-center border border-gray-300 bg-white px-4 py-2 text-sm font-semibold text-gray-700 hover:bg-gray-50 dark:border-slate-700/80 dark:bg-slate-900 dark:text-gray-50 dark:hover:bg-slate-800'
>
{DOTS}
</button>
@@ -168,11 +168,11 @@ const Pagination = ({
key={item}
onClick={() => setPage(item)}
className={cx(
- 'relative inline-flex items-center border border-gray-300 px-4 py-2 text-sm font-semibold focus:z-20 dark:border-gray-800',
+ 'relative inline-flex items-center border border-gray-300 px-4 py-2 text-sm font-semibold focus:z-20 dark:border-slate-700/80',
{
- 'z-10 bg-slate-800 text-white dark:bg-slate-700':
+ 'z-10 bg-slate-900 text-white dark:bg-slate-100 dark:text-slate-900':
item === page,
- 'text-gray-900 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-slate-700':
+ 'bg-white text-gray-900 hover:bg-gray-50 dark:bg-slate-900 dark:text-gray-50 dark:hover:bg-slate-800':
item !== page,
},
)}
@@ -192,10 +192,10 @@ const Pagination = ({
}}
disabled={page === pageAmount}
className={cx(
- 'relative inline-flex items-center rounded-r-md border border-gray-300 px-2 py-2 text-gray-400 focus:z-20 dark:border-gray-800',
+ 'relative inline-flex items-center rounded-r-md border border-gray-300 bg-white px-2 py-2 text-gray-400 focus:z-20 dark:border-slate-700/80 dark:bg-slate-900 dark:text-gray-500',
{
- 'cursor-not-allowed': page === pageAmount,
- 'hover:bg-gray-100 dark:hover:bg-slate-700':
+ 'cursor-not-allowed opacity-50': page === pageAmount,
+ 'hover:bg-gray-50 dark:hover:bg-slate-800':
page !== pageAmount,
},
)}
diff --git a/web/app/ui/Select.tsx b/web/app/ui/Select.tsx
index 7d59b80c2..f5acce4c7 100644
--- a/web/app/ui/Select.tsx
+++ b/web/app/ui/Select.tsx
@@ -77,7 +77,7 @@ function Select<T>({
<div className={cx('relative', className)}>
<ListboxButton
className={cx(
- 'relative w-full rounded-md border border-gray-300 bg-white py-2 pr-10 pl-3 text-left font-medium transition-colors hover:bg-gray-50 focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:ring-offset-gray-100 focus:outline-hidden sm:text-sm dark:border-gray-800 dark:bg-slate-800 dark:text-gray-50 dark:hover:bg-slate-700',
+ 'relative w-full rounded-md border-0 bg-white py-2 pr-10 pl-3 text-left font-medium ring-1 ring-gray-300 transition-colors ring-inset hover:bg-gray-50 focus:ring-2 focus:ring-slate-900 focus:outline-hidden sm:text-sm dark:bg-slate-900 dark:text-gray-50 dark:ring-slate-700/80 dark:hover:bg-slate-800 dark:focus:ring-slate-300',
buttonClassName,
)}
>
@@ -108,7 +108,8 @@ function Select<T>({
>
<ListboxOptions
static
- className='absolute z-30 mt-1 max-h-60 w-full overflow-auto rounded-md bg-gray-50 py-1 text-base ring-1 ring-black/10 focus:outline-hidden sm:text-sm dark:bg-slate-800'
+ modal={false}
+ className='absolute z-30 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base ring-1 ring-black/10 focus:outline-hidden sm:text-sm dark:bg-slate-900 dark:ring-slate-700/80'
>
{_map(items, (item, index) => {
const selected = isItemSelected(item)
@@ -121,8 +122,9 @@ function Select<T>({
cx(
'relative mx-1 cursor-pointer rounded-md py-2 pr-4 pl-8 transition-colors select-none',
{
- 'bg-gray-200 dark:bg-slate-700': focus && !selected,
- 'bg-gray-300 dark:bg-slate-600': selected,
+ 'bg-gray-100 dark:bg-slate-800/80':
+ focus && !selected,
+ 'bg-gray-200 dark:bg-slate-800/80': selected,
'text-gray-700 dark:text-gray-50':
!focus && !selected,
'text-gray-900 dark:text-white': focus || selected,
diff --git a/web/app/ui/Switch.tsx b/web/app/ui/Switch.tsx
index 4826fb60a..fbb7c334b 100644
--- a/web/app/ui/Switch.tsx
+++ b/web/app/ui/Switch.tsx
@@ -39,9 +39,9 @@ export const Switch = ({
}
}}
className={cx(
- 'relative inline-flex h-4 w-7 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white/75',
+ 'relative inline-flex h-4 w-7 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-900 focus-visible:ring-offset-2 dark:focus-visible:ring-slate-300 dark:focus-visible:ring-offset-slate-900',
{
- 'bg-slate-900 dark:bg-slate-500': checked,
+ 'bg-slate-900 dark:bg-slate-200': checked,
'bg-gray-300 dark:bg-slate-600': !checked,
'cursor-not-allowed opacity-50': disabled,
},
@@ -50,10 +50,12 @@ export const Switch = ({
<span
aria-hidden='true'
className={cx(
- 'pointer-events-none inline-block size-3 transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out',
+ 'pointer-events-none inline-block size-3 transform rounded-full shadow-lg ring-0 transition duration-200 ease-in-out',
{
'translate-x-3': checked,
'translate-x-0': !checked,
+ 'bg-white dark:bg-slate-900': checked,
+ 'bg-white': !checked,
},
)}
/>
diff --git a/web/app/ui/Textarea.tsx b/web/app/ui/Textarea.tsx
index b452b83ce..ef59a8c42 100644
--- a/web/app/ui/Textarea.tsx
+++ b/web/app/ui/Textarea.tsx
@@ -52,10 +52,10 @@ const Textarea = ({
rows={rows}
name={name}
className={cn(
- 'w-full rounded-md border-0 ring-1 focus:ring-indigo-500 sm:text-sm dark:bg-slate-800 dark:text-gray-50 dark:placeholder-gray-400',
+ 'w-full rounded-md border-0 ring-1 ring-inset focus:ring-slate-900 sm:text-sm dark:bg-slate-900 dark:text-gray-50 dark:placeholder-gray-400 dark:focus:ring-slate-300',
{
'text-red-900 placeholder-red-300 ring-red-600': isError,
- 'ring-gray-300 dark:ring-slate-800/50': !isError,
+ 'ring-gray-300 dark:ring-slate-700/80': !isError,
'cursor-not-allowed bg-gray-100 text-gray-500 dark:bg-slate-700 dark:text-gray-400':
disabled,
},