Skip to content

Commit aba61e4

Browse files
committed
chore(app): use new utilities
1 parent 2245bbd commit aba61e4

17 files changed

+48
-47
lines changed

src/App.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ if (cookie.value !== 'accepted') {
120120
v-model:open="open"
121121
collapsible
122122
resizable
123-
class="bg-(--ui-bg-elevated)/25"
124-
:ui="{ footer: 'lg:border-t lg:border-(--ui-border)' }"
123+
class="bg-elevated/25"
124+
:ui="{ footer: 'lg:border-t lg:border-default' }"
125125
>
126126
<template #header="{ collapsed }">
127127
<TeamsMenu :collapsed="collapsed" />
@@ -130,7 +130,7 @@ if (cookie.value !== 'accepted') {
130130
<template #default="{ collapsed }">
131131
<UDashboardSearchButton
132132
:collapsed="collapsed"
133-
class="bg-transparent ring-(--ui-border)"
133+
class="bg-transparent ring-default"
134134
/>
135135

136136
<UNavigationMenu

src/components/NotificationsSlideover.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const { data: notifications } = useFetch('https://dashboard-template.nuxt.dev/ap
1818
v-for="notification in notifications"
1919
:key="notification.id"
2020
:to="`/inbox?id=${notification.id}`"
21-
class="px-3 py-2.5 rounded-md hover:bg-(--ui-bg-elevated)/50 flex items-center gap-3 relative -mx-3 first:-mt-3 last:-mb-3"
21+
class="px-3 py-2.5 rounded-md hover:bg-elevated/50 flex items-center gap-3 relative -mx-3 first:-mt-3 last:-mb-3"
2222
>
2323
<UChip
2424
color="error"
@@ -34,16 +34,16 @@ const { data: notifications } = useFetch('https://dashboard-template.nuxt.dev/ap
3434

3535
<div class="text-sm flex-1">
3636
<p class="flex items-center justify-between">
37-
<span class="text-(--ui-text-highlighted) font-medium">{{ notification.sender.name }}</span>
37+
<span class="text-highlighted font-medium">{{ notification.sender.name }}</span>
3838

3939
<time
4040
:datetime="notification.date"
41-
class="text-(--ui-text-muted) text-xs"
41+
class="text-muted text-xs"
4242
v-text="formatTimeAgo(new Date(notification.date))"
4343
/>
4444
</p>
4545

46-
<p class="text-(--ui-text-dimmed)">
46+
<p class="text-dimmed">
4747
{{ notification.body }}
4848
</p>
4949
</div>

src/components/TeamsMenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ const items = computed(() => {
5858
variant="ghost"
5959
block
6060
:square="collapsed"
61-
class="data-[state=open]:bg-(--ui-bg-elevated)"
61+
class="data-[state=open]:bg-elevated"
6262
:class="[!collapsed && 'py-2']"
6363
:ui="{
64-
trailingIcon: 'text-(--ui-text-dimmed)'
64+
trailingIcon: 'text-dimmed'
6565
}"
6666
/>
6767
</UDropdownMenu>

src/components/UserMenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ const items = computed<DropdownMenuItem[][]>(() => ([[{
9595
variant="ghost"
9696
block
9797
:square="collapsed"
98-
class="data-[state=open]:bg-(--ui-bg-elevated)"
98+
class="data-[state=open]:bg-elevated"
9999
:ui="{
100-
trailingIcon: 'text-(--ui-text-dimmed)'
100+
trailingIcon: 'text-dimmed'
101101
}"
102102
/>
103103
</UDropdownMenu>

src/components/home/HomeChart.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ const template = (d: DataRecord) => `${formatDate(d.date)}: ${formatNumber(d.amo
6464
<UCard ref="cardRef" :ui="{ body: '!px-0 !pt-0 !pb-3' }">
6565
<template #header>
6666
<div>
67-
<p class="text-xs text-(--ui-text-muted) uppercase mb-1.5">
67+
<p class="text-xs text-muted uppercase mb-1.5">
6868
Revenue
6969
</p>
70-
<p class="text-3xl text-(--ui-text-highlighted) font-semibold">
70+
<p class="text-3xl text-highlighted font-semibold">
7171
{{ formatNumber(total) }}
7272
</p>
7373
</div>

src/components/home/HomeDateRangePicker.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const selectRange = (range: { days?: number, months?: number, years?: number })
8484
color="neutral"
8585
variant="ghost"
8686
icon="i-lucide-calendar"
87-
class="data-[state=open]:bg-(--ui-bg-elevated) group"
87+
class="data-[state=open]:bg-elevated group"
8888
>
8989
<span class="truncate">
9090
<template v-if="selected.start">
@@ -101,12 +101,12 @@ const selectRange = (range: { days?: number, months?: number, years?: number })
101101
</span>
102102

103103
<template #trailing>
104-
<UIcon name="i-lucide-chevron-down" class="shrink-0 text-(--ui-text-dimmed) size-5 group-data-[state=open]:rotate-180 transition-transform duration-200" />
104+
<UIcon name="i-lucide-chevron-down" class="shrink-0 text-dimmed size-5 group-data-[state=open]:rotate-180 transition-transform duration-200" />
105105
</template>
106106
</UButton>
107107

108108
<template #content>
109-
<div class="flex items-stretch sm:divide-x divide-(--ui-border)">
109+
<div class="flex items-stretch sm:divide-x divide-default">
110110
<div class="hidden sm:flex flex-col justify-center">
111111
<UButton
112112
v-for="(range, index) in ranges"
@@ -115,7 +115,7 @@ const selectRange = (range: { days?: number, months?: number, years?: number })
115115
color="neutral"
116116
variant="ghost"
117117
class="rounded-none px-4"
118-
:class="[isRangeSelected(range) ? 'bg-(--ui-bg-elevated)' : 'hover:bg-(--ui-bg-elevated)/50']"
118+
:class="[isRangeSelected(range) ? 'bg-elevated' : 'hover:bg-elevated/50']"
119119
truncate
120120
@click="selectRange(range)"
121121
/>

src/components/home/HomePeriodSelect.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ watch(periods, () => {
4444
v-model="model"
4545
:items="periods"
4646
variant="ghost"
47-
class="data-[state=open]:bg-(--ui-bg-elevated)"
47+
class="data-[state=open]:bg-elevated"
4848
:ui="{ value: 'capitalize', itemLabel: 'capitalize', trailingIcon: 'group-data-[state=open]:rotate-180 transition-transform duration-200' }"
4949
/>
5050
</template>

src/components/home/HomeSales.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ const columns: TableColumn<Sale>[] = [
103103
class="shrink-0"
104104
:ui="{
105105
base: 'table-fixed border-separate border-spacing-0',
106-
thead: '[&>tr]:bg-(--ui-bg-elevated)/50 [&>tr]:after:content-none',
106+
thead: '[&>tr]:bg-elevated/50 [&>tr]:after:content-none',
107107
tbody: '[&>tr]:last:[&>td]:border-b-0',
108-
th: 'first:rounded-l-[calc(var(--ui-radius)*2)] last:rounded-r-[calc(var(--ui-radius)*2)] border-y border-(--ui-border) first:border-l last:border-r',
109-
td: 'border-b border-(--ui-border)'
108+
th: 'first:rounded-l-lg last:rounded-r-lg border-y border-default first:border-l last:border-r',
109+
td: 'border-b border-default'
110110
}"
111111
/>
112112
</template>

src/components/home/HomeStats.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,14 @@ watch([() => props.period, () => props.range], () => {
7575
variant="subtle"
7676
:ui="{
7777
container: 'gap-y-1.5',
78-
leading: 'p-2.5 rounded-full bg-(--ui-primary)/10 ring ring-inset ring-(--ui-primary)/25',
79-
title: 'font-normal text-(--ui-text-muted) text-xs uppercase'
78+
wrapper: 'items-start',
79+
leading: 'p-2.5 rounded-full bg-primary/10 ring ring-inset ring-primary/25',
80+
title: 'font-normal text-muted text-xs uppercase'
8081
}"
81-
class="lg:rounded-none first:rounded-l-[calc(var(--ui-radius)*2)] last:rounded-r-[calc(var(--ui-radius)*2)] hover:z-1"
82+
class="lg:rounded-none first:rounded-l-lg last:rounded-r-lg hover:z-1"
8283
>
8384
<div class="flex items-center gap-2">
84-
<span class="text-2xl font-semibold text-(--ui-text-highlighted)">
85+
<span class="text-2xl font-semibold text-highlighted">
8586
{{ stat.value }}
8687
</span>
8788

src/components/inbox/InboxList.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ defineShortcuts({
4444
</script>
4545

4646
<template>
47-
<div class="overflow-y-auto divide-y divide-(--ui-border)">
47+
<div class="overflow-y-auto divide-y divide-default">
4848
<div
4949
v-for="(mail, index) in mails"
5050
:key="index"
@@ -53,8 +53,8 @@ defineShortcuts({
5353
<div
5454
class="p-4 sm:px-6 text-sm cursor-pointer border-l-2 transition-colors"
5555
:class="[
56-
mail.unread ? 'text-(--ui-text-highlighted)' : 'text-(--ui-text-toned)',
57-
selectedMail && selectedMail.id === mail.id ? 'border-(--ui-primary) bg-(--ui-primary)/10' : 'border-(--ui-bg) hover:border-(--ui-primary) hover:bg-(--ui-primary)/5'
56+
mail.unread ? 'text-highlighted' : 'text-toned',
57+
selectedMail && selectedMail.id === mail.id ? 'border-primary bg-primary/10' : 'border-(--ui-bg) hover:border-primary hover:bg-primary/5'
5858
]"
5959
@click="selectedMail = mail"
6060
>
@@ -70,7 +70,7 @@ defineShortcuts({
7070
<p class="truncate" :class="[mail.unread && 'font-semibold']">
7171
{{ mail.subject }}
7272
</p>
73-
<p class="text-(--ui-text-dimmed) line-clamp-1">
73+
<p class="text-dimmed line-clamp-1">
7474
{{ mail.body }}
7575
</p>
7676
</div>

0 commit comments

Comments
 (0)