Skip to content

Commit f82caa8

Browse files
feat: update ui
1 parent ce9369d commit f82caa8

File tree

10 files changed

+91
-63
lines changed

10 files changed

+91
-63
lines changed

src/app.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,16 @@
1616
--color-gray-800: oklch(0.274 0.006 286.033);
1717
--color-gray-900: oklch(0.21 0.006 285.885);
1818
--color-gray-950: oklch(0.141 0.005 285.823);
19+
20+
--color-primary-50: oklch(0.979 0.021 166.113);
21+
--color-primary-100: oklch(0.95 0.052 163.051);
22+
--color-primary-200: oklch(0.905 0.093 164.15);
23+
--color-primary-300: oklch(0.845 0.143 164.978);
24+
--color-primary-400: oklch(0.765 0.177 163.223);
25+
--color-primary-500: oklch(0.696 0.17 162.48);
26+
--color-primary-600: oklch(0.596 0.145 163.225);
27+
--color-primary-700: oklch(0.508 0.118 165.612);
28+
--color-primary-800: oklch(0.432 0.095 166.913);
29+
--color-primary-900: oklch(0.378 0.077 168.94);
30+
--color-primary-950: oklch(0.262 0.051 172.552);
1931
}

src/components/ExportButton.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
onclick={handleClick}
2828
disabled={blocked}
2929
type="button"
30-
class="flex items-center justify-center gap-x-2 rounded-md bg-indigo-600 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-indigo-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 disabled:cursor-not-allowed disabled:opacity-50"
30+
class="flex items-center justify-center gap-x-2 rounded-md bg-primary-600 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-primary-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 disabled:cursor-not-allowed disabled:opacity-50"
3131
>
3232
{#if blocked}
3333
<ArrowPathIcon aria-hidden="true" class="-ml-0.5 size-5 animate-spin" />

src/components/FileInfo.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@
2020
}
2121
</script>
2222

23-
<div class="rounded-lg border border-green-200 bg-green-50 p-4 dark:border-green-800 dark:bg-green-900/20">
23+
<div class="rounded-lg border border-primary-200 bg-primary-50 p-4 dark:border-primary-800 dark:bg-primary-900/20">
2424
<div class="flex items-center justify-between">
2525
<div class="flex items-center space-x-3">
26-
<div class="flex-shrink-0">
27-
<DocumentArrowUpIcon class="size-5 text-green-600 dark:text-green-400" />
26+
<div class="shrink-0">
27+
<DocumentArrowUpIcon class="size-5 text-primary-600 dark:text-primary-400" />
2828
</div>
2929
<div class="min-w-0 flex-1">
30-
<p class="text-sm font-medium text-green-800 dark:text-green-200">
30+
<p class="text-sm font-medium text-primary-800 dark:text-primary-200">
3131
{m.fileinfo_loaded({ filename: fileName })}
3232
</p>
33-
<p class="text-sm text-green-600 dark:text-green-300">
33+
<p class="text-sm text-primary-600 dark:text-primary-300">
3434
{m.fileinfo_ready_edit()}
3535
</p>
3636
</div>
3737
</div>
38-
<button type="button" onclick={handleClick} disabled={blocked} class="text-sm font-medium text-green-700 hover:text-green-900 disabled:cursor-not-allowed disabled:opacity-50 dark:text-green-300 dark:hover:text-green-100">
38+
<button type="button" onclick={handleClick} disabled={blocked} class="text-sm font-medium text-primary-700 hover:text-primary-900 disabled:cursor-not-allowed disabled:opacity-50 dark:text-primary-300 dark:hover:text-primary-100">
3939
{m.fileinfo_load_different()}
4040
</button>
4141
</div>

src/components/Nav.svelte

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import { languages, themes, type LocalSettingsStore } from '$lib';
33
import { m } from '$lib/paraglide/messages';
4-
import { NavigationMenu, Select } from 'bits-ui';
4+
import { Dialog, NavigationMenu, Select } from 'bits-ui';
55
import { getContext } from 'svelte';
66
import { page } from '$app/state';
77
@@ -17,7 +17,7 @@
1717
{href}
1818
{active}
1919
class={active
20-
? 'inline-flex h-full items-center border-b-2 border-indigo-600 px-1 pt-1 text-sm font-medium text-gray-900 dark:border-indigo-500 dark:text-white'
20+
? 'inline-flex h-full items-center border-b-2 border-primary-600 px-1 pt-1 text-sm font-medium text-gray-900 dark:border-primary-500 dark:text-white'
2121
: 'inline-flex h-full items-center border-b-2 border-transparent px-1 pt-1 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-300 dark:hover:border-white/20 dark:hover:text-white'}>{text}</NavigationMenu.Link
2222
>
2323
</NavigationMenu.Item>
@@ -41,11 +41,11 @@
4141
<Select.Trigger
4242
aria-haspopup="listbox"
4343
type="button"
44-
class="grid cursor-default grid-cols-1 rounded-md bg-white py-1.5 pr-2 pl-3 text-left text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:focus-visible:outline-indigo-500"
44+
class="grid cursor-default grid-cols-1 rounded-md bg-white py-1.5 pr-2 pl-3 text-left text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:focus-visible:outline-primary-500"
4545
>
4646
<div class="col-start-1 row-start-1 flex items-center gap-3 pr-6">
4747
<currentThemeObject.icon class="size-5 shrink-0 rounded-full" width="20" height="20" />
48-
<span class="block truncate">{currentThemeObject.name}</span>
48+
<span class="hidden truncate md:block">{currentThemeObject.name}</span>
4949
</div>
5050
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="col-start-1 row-start-1 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
5151
<path
@@ -60,13 +60,13 @@
6060
{#each Object.values(themes) as theme (theme.id)}
6161
<Select.Item
6262
value={theme.id}
63-
class="group/option relative block cursor-default py-2 pr-9 pl-3 text-gray-900 select-none focus:bg-indigo-600 focus:text-white focus:outline-hidden dark:text-white dark:focus:bg-indigo-500 dark:focus:text-white"
63+
class="group/option relative block cursor-default py-2 pr-9 pl-3 text-gray-900 select-none focus:bg-primary-600 focus:text-white focus:outline-hidden dark:text-white dark:focus:bg-primary-500 dark:focus:text-white"
6464
>
6565
<div class="flex items-center">
6666
<theme.icon class="size-5 shrink-0 rounded-full text-gray-900 dark:text-white" width="20" height="20" />
6767
<span class="ml-3 block truncate font-normal group-aria-selected/option:font-semibold">{theme.name}</span>
6868
</div>
69-
<span class="absolute inset-y-0 right-0 flex items-center pr-4 text-indigo-600 group-not-aria-selected/option:hidden group-focus/option:text-white in-[el-selectedcontent]:hidden dark:text-indigo-400">
69+
<span class="absolute inset-y-0 right-0 flex items-center pr-4 text-primary-600 group-not-aria-selected/option:hidden group-focus/option:text-white in-[el-selectedcontent]:hidden dark:text-primary-400">
7070
<svg viewBox="0 0 20 20" fill="currentColor" data-slot="icon" aria-hidden="true" class="size-5">
7171
<path d="M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z" clip-rule="evenodd" fill-rule="evenodd" />
7272
</svg>
@@ -81,7 +81,7 @@
8181
<Select.Trigger
8282
aria-haspopup="listbox"
8383
type="button"
84-
class="grid cursor-default grid-cols-1 rounded-md bg-white py-1.5 pr-2 pl-3 text-left text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:focus-visible:outline-indigo-500"
84+
class="grid cursor-default grid-cols-1 rounded-md bg-white py-1.5 pr-2 pl-3 text-left text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:focus-visible:outline-primary-500"
8585
>
8686
<div class="col-start-1 row-start-1 flex items-center gap-3 pr-6">
8787
<!--temp fix-->
@@ -92,7 +92,7 @@
9292
{:else}
9393
<enhanced:img src={languages.en.flag} alt="" class="size-5 shrink-0 rounded-full bg-gray-100 dark:bg-gray-700 dark:-outline-offset-1 dark:outline-white/10" />
9494
{/if}
95-
<span class="block truncate">{currentLanguageObject.name}</span>
95+
<span class="hidden truncate md:block">{currentLanguageObject.name}</span>
9696
</div>
9797
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="col-start-1 row-start-1 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
9898
<path
@@ -107,13 +107,13 @@
107107
{#each Object.values(languages) as lang (lang.id)}
108108
<Select.Item
109109
value={lang.id}
110-
class="group/option relative block cursor-default py-2 pr-9 pl-3 text-gray-900 select-none focus:bg-indigo-600 focus:text-white focus:outline-hidden dark:text-white dark:focus:bg-indigo-500 dark:focus:text-white"
110+
class="group/option relative block cursor-default py-2 pr-9 pl-3 text-gray-900 select-none focus:bg-primary-600 focus:text-white focus:outline-hidden dark:text-white dark:focus:bg-primary-500 dark:focus:text-white"
111111
>
112112
<div class="flex items-center">
113113
<enhanced:img src={lang.flag} alt="" class="size-5 shrink-0 rounded-full" />
114114
<span class="ml-3 block truncate font-normal group-aria-selected/option:font-semibold">{lang.name}</span>
115115
</div>
116-
<span class="absolute inset-y-0 right-0 flex items-center pr-4 text-indigo-600 group-not-aria-selected/option:hidden group-focus/option:text-white in-[el-selectedcontent]:hidden dark:text-indigo-400">
116+
<span class="absolute inset-y-0 right-0 flex items-center pr-4 text-primary-600 group-not-aria-selected/option:hidden group-focus/option:text-white in-[el-selectedcontent]:hidden dark:text-primary-400">
117117
<svg viewBox="0 0 20 20" fill="currentColor" data-slot="icon" aria-hidden="true" class="size-5">
118118
<path d="M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z" clip-rule="evenodd" fill-rule="evenodd" />
119119
</svg>
@@ -125,22 +125,32 @@
125125
</Select.Root>
126126
</div>
127127
<div class="-mr-2 flex items-center sm:hidden">
128-
<!-- Mobile menu button -->
129-
<button
130-
type="button"
131-
command="--toggle"
132-
commandfor="mobile-menu"
133-
class="relative inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:outline-2 focus:-outline-offset-1 focus:outline-indigo-600"
134-
>
135-
<span class="absolute -inset-0.5"></span>
136-
<span class="sr-only">Open main menu</span>
137-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" data-slot="icon" aria-hidden="true" class="size-6 in-aria-expanded:hidden">
138-
<path d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" stroke-linecap="round" stroke-linejoin="round" />
139-
</svg>
140-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" data-slot="icon" aria-hidden="true" class="size-6 not-in-aria-expanded:hidden">
141-
<path d="M6 18 18 6M6 6l12 12" stroke-linecap="round" stroke-linejoin="round" />
142-
</svg>
143-
</button>
128+
<Dialog.Root>
129+
<Dialog.Trigger
130+
type="button"
131+
command="--toggle"
132+
commandfor="mobile-menu"
133+
class="relative inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:outline-2 focus:-outline-offset-1 focus:outline-primary-600"
134+
>
135+
<span class="absolute -inset-0.5"></span>
136+
<span class="sr-only">Open main menu</span>
137+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" data-slot="icon" aria-hidden="true" class="size-6">
138+
<path d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" stroke-linecap="round" stroke-linejoin="round" />
139+
</svg>
140+
</Dialog.Trigger>
141+
<Dialog.Portal>
142+
<Dialog.Overlay class="fixed inset-0 z-50 bg-black/80" />
143+
<Dialog.Content class="fixed inset-0 z-50 overflow-auto bg-white p-4 dark:bg-gray-800">
144+
<div class="space-y-1 pt-2 pb-3">
145+
<!-- Current: "bg-primary-50 border-primary-600 text-primary-700", Default: "border-transparent text-gray-500 hover:border-gray-300 hover:bg-gray-50 hover:text-gray-700" -->
146+
<a href="#" class="block border-l-4 border-primary-600 bg-primary-50 py-2 pr-4 pl-3 text-base font-medium text-primary-700">Dashboard</a>
147+
<a href="#" class="block border-l-4 border-transparent py-2 pr-4 pl-3 text-base font-medium text-gray-500 hover:border-gray-300 hover:bg-gray-50 hover:text-gray-700">Team</a>
148+
<a href="#" class="block border-l-4 border-transparent py-2 pr-4 pl-3 text-base font-medium text-gray-500 hover:border-gray-300 hover:bg-gray-50 hover:text-gray-700">Projects</a>
149+
<a href="#" class="block border-l-4 border-transparent py-2 pr-4 pl-3 text-base font-medium text-gray-500 hover:border-gray-300 hover:bg-gray-50 hover:text-gray-700">Calendar</a>
150+
</div>
151+
</Dialog.Content>
152+
</Dialog.Portal>
153+
</Dialog.Root>
144154
</div>
145155
</div>
146156
</div>

src/components/Sidebar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
type="button"
1515
onclick={() => (value = sidebarItem.tab)}
1616
class={'group flex w-full cursor-pointer gap-x-3 rounded-md p-2 text-sm/6 font-semibold ' +
17-
(sidebarItem.tab === value ? 'bg-gray-50 text-indigo-600 dark:bg-white/5 dark:text-white' : 'text-gray-700 hover:bg-gray-50 hover:text-indigo-600 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-white')}
17+
(sidebarItem.tab === value ? 'bg-gray-50 text-primary-600 dark:bg-white/5 dark:text-white' : 'text-gray-700 hover:bg-gray-50 hover:text-primary-600 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-white')}
1818
>
1919
{#if sidebarItem.icon}
2020
<sidebarItem.icon width="24" height="24" class="size-6 shrink-0" />

src/components/UploadForm.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
disabled={isProcessing}
213213
onclick={() => inputElement.click()}
214214
bind:this={buttonElement}
215-
class={'relative mt-16 block w-full cursor-pointer rounded-lg border-2 p-12 text-center transition-all duration-200 focus:outline-2 focus:outline-offset-2 focus:outline-indigo-500 ' +
215+
class={'relative mt-16 block w-full cursor-pointer rounded-lg border-2 p-12 text-center transition-all duration-200 focus:outline-2 focus:outline-offset-2 focus:outline-primary-500 ' +
216216
(isProcessing
217217
? 'cursor-not-allowed border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-800'
218218
: draggedOver

src/components/editors/InputNumber.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
type="number"
1818
{max}
1919
{min}
20-
class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:placeholder:text-gray-500 dark:focus:outline-indigo-500"
20+
class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-primary-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:placeholder:text-gray-500 dark:focus:outline-primary-500"
2121
/>
2222
</div>
2323
</div>

0 commit comments

Comments
 (0)