Skip to content

Commit ee42135

Browse files
committed
add light/system theme
1 parent 6762502 commit ee42135

File tree

110 files changed

+486
-386
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+486
-386
lines changed

src/app/(dashboard)/dns/settings/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const SettingDisabledManagementGroups = ({
128128
</div>
129129
<div
130130
className={
131-
"flex justify-end bg-nb-gray-900/20 border-t border-nb-gray-900 px-8 py-5"
131+
"flex justify-end bg-gray-50 dark:bg-nb-gray-900/20 border-t border-gray-200 dark:border-nb-gray-900 px-8 py-5"
132132
}
133133
>
134134
<Button

src/app/(dashboard)/network/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function NetworkOverview({ network }: Readonly<{ network: Network }>) {
8989
/>
9090
<button
9191
className={
92-
"flex items-center gap-2 dark:text-neutral-300 text-neutral-500 hover:text-neutral-100 transition-all hover:bg-nb-gray-800/60 py-2 px-3 rounded-md cursor-pointer"
92+
"flex items-center gap-2 interactive-cell"
9393
}
9494
onClick={() => setNetworkModal(true)}
9595
>

src/app/(dashboard)/peer/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ function PeerOverview() {
179179
<ModalTrigger>
180180
<div
181181
className={
182-
"flex items-center gap-2 dark:text-neutral-300 text-neutral-500 hover:text-neutral-100 transition-all hover:bg-nb-gray-800/60 py-2 px-3 rounded-md cursor-pointer"
182+
"flex items-center gap-2 interactive-cell"
183183
}
184184
>
185185
<PencilIcon size={16} />
@@ -241,10 +241,10 @@ function PeerOverview() {
241241
{isOwnerOrAdmin && !!peer?.user_id && (
242242
<div
243243
className={cn(
244-
"border border-nb-gray-900 border-t-0 rounded-b-md bg-nb-gray-940 px-[1.28rem] pt-3 pb-5 flex flex-col gap-4 mx-[0.25rem]",
244+
"border border-gray-200 dark:border-nb-gray-900 border-t-0 rounded-b-md bg-gray-50 dark:bg-nb-gray-940 px-[1.28rem] pt-3 pb-5 flex flex-col gap-4 mx-[0.25rem]",
245245
!loginExpiration
246246
? "opacity-50 pointer-events-none"
247-
: "bg-nb-gray-930/80",
247+
: "bg-subtle-emphasis",
248248
)}
249249
>
250250
<PeerExpirationToggle
@@ -548,7 +548,7 @@ function EditNameModal({ onSuccess, peer, initialName }: Readonly<ModalProps>) {
548548
If the domain name already exists, we add an increment number
549549
suffix to it.
550550
</HelpText>
551-
<div className={"text-netbird text-sm break-all whitespace-normal"}>
551+
<div className={"text-highlight text-sm break-all whitespace-normal"}>
552552
{domainNamePreview}
553553
</div>
554554
</Card>

src/app/(dashboard)/settings/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default function NetBirdSettings() {
5959
</VerticalTabs.Trigger>
6060
</VerticalTabs.List>
6161
<RestrictedAccess page={"Settings"}>
62-
<div className={"border-l border-nb-gray-930 w-full"}>
62+
<div className={"border-l border-gray-200 dark:border-nb-gray-930 w-full"}>
6363
{account && <AuthenticationTab account={account} />}
6464
{account && <PermissionsTab account={account} />}
6565
{account && <GroupsTab account={account} />}

src/app/(dashboard)/team/user/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ function UserOverview({ user, initialGroups }: Readonly<Props>) {
143143
<div className={"flex items-center gap-3"}>
144144
<div
145145
className={
146-
"w-10 h-10 rounded-full relative flex items-center justify-center text-white uppercase text-md font-medium bg-nb-gray-900"
146+
"w-10 h-10 rounded-full relative flex items-center justify-center text-gray-700 dark:text-white uppercase text-md font-medium bg-gray-200 dark:bg-nb-gray-900"
147147
}
148148
style={
149149
user.is_service_user

src/app/globals.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,43 @@
22
@tailwind components;
33
@tailwind utilities;
44

5+
@layer components {
6+
.interactive-cell {
7+
@apply dark:text-neutral-300 text-neutral-500 py-2 px-3 rounded-md;
8+
@apply transition-all hover:bg-gray-300 hover:text-neutral-800 dark:hover:text-neutral-100 dark:hover:bg-nb-gray-800/60 cursor-pointer;
9+
}
510

11+
.table-row-hoverable {
12+
@apply transition-all hover:bg-gray-100 dark:hover:bg-nb-gray-940 cursor-pointer;
13+
}
14+
15+
/* Semantic Text Classes */
16+
.text-primary {
17+
@apply text-gray-700 dark:text-nb-gray-100;
18+
}
19+
20+
.text-muted {
21+
@apply text-neutral-500 dark:text-neutral-400;
22+
}
23+
24+
.text-highlight {
25+
@apply text-netbird;
26+
}
27+
28+
/* Semantic Border Class */
29+
.border-default {
30+
@apply border-neutral-200 dark:border-nb-gray-700;
31+
}
32+
33+
/* Semantic Background Class */
34+
.bg-subtle-emphasis {
35+
@apply bg-gray-100 dark:bg-nb-gray-930/80;
36+
}
37+
38+
.bg-default {
39+
@apply bg-white dark:bg-nb-gray-950;
40+
}
41+
}
642

743
h1 {
844
@apply text-2xl font-medium text-gray-700 dark:text-nb-gray-100 my-1;

src/assets/netbird-full-light.svg

Lines changed: 19 additions & 0 deletions
Loading

src/auth/OIDCError.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const OIDCError = () => {
4040
>
4141
<div
4242
className={
43-
"bg-nb-gray-930 mb-3 border border-nb-gray-900 h-12 w-12 rounded-md flex items-center justify-center "
43+
"bg-gray-100 dark:bg-nb-gray-930 mb-3 border border-gray-200 dark:border-nb-gray-900 h-12 w-12 rounded-md flex items-center justify-center "
4444
}
4545
>
4646
<NetBirdIcon size={23} />

src/auth/SessionLost.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const SessionLost = () => {
2626
>
2727
<div
2828
className={
29-
"bg-nb-gray-930 mb-3 border border-nb-gray-900 h-10 w-10 rounded-md flex items-center justify-center "
29+
"bg-gray-100 dark:bg-nb-gray-930 mb-3 border border-gray-200 dark:border-nb-gray-900 h-10 w-10 rounded-md flex items-center justify-center "
3030
}
3131
>
3232
<NetBirdIcon size={20} />

src/components/Badge.tsx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,34 @@ const variants = cva("", {
1616
blue: [
1717
"bg-sky-100 border-sky-500 text-sky-800 border border-transparent",
1818
],
19-
blueDark: ["bg-sky-900 border-sky-500 text-white border"],
20-
"blue-darker": ["bg-sky-900 border-sky-500 text-white border"],
21-
red: ["bg-red-950/40 border-red-500 border text-red-500"],
22-
purple: ["bg-purple-950/50 border-purple-500 border text-purple-500"],
23-
yellow: ["bg-yellow-950 border-yellow-500 border text-yellow-400"],
24-
gray: ["bg-nb-gray-930/60 border-nb-gray-800/40 text-nb-gray-300 border"],
19+
blueDark: ["bg-sky-100 border-sky-600 text-sky-800 border dark:bg-sky-900 dark:border-sky-500 dark:text-white"],
20+
"blue-darker": ["bg-sky-100 border-sky-600 text-sky-800 border dark:bg-sky-900 dark:border-sky-500 dark:text-white"],
21+
red: ["bg-red-100 border-red-400 text-red-600 border dark:bg-red-950/40 dark:border-red-500 dark:text-red-500"],
22+
purple: ["bg-purple-100 border-purple-400 text-purple-600 border dark:bg-purple-950/50 dark:border-purple-500 dark:text-purple-500"],
23+
yellow: ["bg-yellow-100 border-yellow-400 text-yellow-600 border dark:bg-yellow-950 dark:border-yellow-500 dark:text-yellow-400"],
24+
gray: ["bg-gray-100 border-gray-300 text-gray-600 border dark:bg-nb-gray-930/60 dark:border-nb-gray-800/40 dark:text-nb-gray-300"],
2525
grayer: [
26-
"bg-nb-gray-900/40 border-nb-gray-800/40 text-nb-gray-300 border",
26+
"bg-gray-100 border-gray-300 text-gray-600 border dark:bg-nb-gray-900/40 dark:border-nb-gray-800/40 dark:text-nb-gray-300",
2727
],
2828
"gray-ghost": [
29-
"bg-nb-gray-900 border-nb-gray-800 text-nb-gray-300 border border-nb-gray-800/50",
29+
"bg-gray-50 border-gray-200 text-gray-500 border dark:bg-nb-gray-900 dark:border-nb-gray-800 dark:text-nb-gray-300 dark:border-nb-gray-800/50",
3030
],
31-
green: ["bg-green-950 border-green-500 border text-green-400"],
32-
netbird: ["bg-netbird-950 border-netbird-500 border text-netbird-500"],
31+
green: ["bg-green-100 border-green-400 text-green-600 border dark:bg-green-950 dark:border-green-500 dark:text-green-400"],
32+
netbird: ["bg-netbird-100 border-netbird-400 text-netbird-600 border dark:bg-netbird-950 dark:border-netbird-500 dark:text-netbird-500"],
3333
},
3434
hover: {
3535
none: [],
36-
blue: ["hover:bg-sky-200"],
37-
purple: ["hover:bg-purple-950/40"],
38-
yellow: ["hover:bg-yellow-950/40"],
39-
blueDark: ["hover:bg-sky-800"],
40-
"blue-darker": ["hover:bg-sky-800"],
41-
red: ["hover:bg-red-950/40"],
42-
gray: ["hover:bg-nb-gray-900"],
43-
grayer: ["hover:bg-nb-gray-900"],
44-
"gray-ghost": ["hover:bg-nb-gray-900"],
45-
green: ["hover:bg-green-950/50"],
46-
netbird: ["hover:bg-netbird-950/50"],
36+
blue: ["hover:bg-sky-200 dark:hover:bg-sky-800"],
37+
purple: ["hover:bg-purple-200 dark:hover:bg-purple-950/40"],
38+
yellow: ["hover:bg-yellow-200 dark:hover:bg-yellow-950/40"],
39+
blueDark: ["hover:bg-sky-200 dark:hover:bg-sky-800"],
40+
"blue-darker": ["hover:bg-sky-200 dark:hover:bg-sky-800"],
41+
red: ["hover:bg-red-200 dark:hover:bg-red-950/40"],
42+
gray: ["hover:bg-gray-200 dark:hover:bg-nb-gray-900"],
43+
grayer: ["hover:bg-gray-200 dark:hover:bg-nb-gray-900"],
44+
"gray-ghost": ["hover:bg-gray-100 dark:hover:bg-nb-gray-900"],
45+
green: ["hover:bg-green-200 dark:hover:bg-green-950/50"],
46+
netbird: ["hover:bg-netbird-200 dark:hover:bg-netbird-950/50"],
4747
},
4848
},
4949
});

0 commit comments

Comments
 (0)