Skip to content

Commit ed4066c

Browse files
committed
fix: lint
1 parent d45297c commit ed4066c

File tree

13 files changed

+54
-54
lines changed

13 files changed

+54
-54
lines changed

apps/dashboard/components/ui/avatar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import * as React from 'react';
3+
import type * as React from 'react';
44
import * as AvatarPrimitive from '@radix-ui/react-avatar';
55

66
import { cn } from '@/lib/utils';
@@ -42,7 +42,7 @@ function AvatarFallback({
4242
<AvatarPrimitive.Fallback
4343
data-slot="avatar-fallback"
4444
className={cn(
45-
'bg-muted flex size-full items-center justify-center rounded-full',
45+
'flex size-full items-center justify-center rounded-full bg-muted',
4646
className
4747
)}
4848
{...props}

apps/dashboard/components/ui/badge.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import * as React from 'react';
1+
import type * as React from 'react';
22
import { Slot } from '@radix-ui/react-slot';
33
import { cva, type VariantProps } from 'class-variance-authority';
44

55
import { cn } from '@/lib/utils';
66

77
const badgeVariants = cva(
8-
'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden',
8+
'inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-md border px-2 py-0.5 font-medium text-xs transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3',
99
{
1010
variants: {
1111
variant: {
@@ -14,7 +14,7 @@ const badgeVariants = cva(
1414
secondary:
1515
'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',
1616
destructive:
17-
'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
17+
'border-transparent bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90',
1818
outline:
1919
'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',
2020
},

apps/dashboard/components/ui/button.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
import * as React from 'react';
1+
import type * as React from 'react';
22
import { Slot } from '@radix-ui/react-slot';
33
import { cva, type VariantProps } from 'class-variance-authority';
44

55
import { cn } from '@/lib/utils';
66

77
const buttonVariants = cva(
8-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
8+
"inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-none transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
99
{
1010
variants: {
1111
variant: {
1212
default:
1313
'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
1414
destructive:
15-
'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
15+
'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40',
1616
outline:
17-
'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
17+
'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50',
1818
secondary:
1919
'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',
2020
ghost:
@@ -23,7 +23,7 @@ const buttonVariants = cva(
2323
},
2424
size: {
2525
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
26-
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
26+
sm: 'h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5',
2727
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
2828
icon: 'size-9',
2929
},

apps/dashboard/components/ui/carousel.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function Carousel({
6262
const [canScrollNext, setCanScrollNext] = React.useState(false);
6363

6464
const onSelect = React.useCallback((api: CarouselApi) => {
65-
if (!api) return;
65+
if (!api) { return; }
6666
setCanScrollPrev(api.canScrollPrev());
6767
setCanScrollNext(api.canScrollNext());
6868
}, []);
@@ -89,12 +89,12 @@ function Carousel({
8989
);
9090

9191
React.useEffect(() => {
92-
if (!api || !setApi) return;
92+
if (!(api && setApi)) { return; }
9393
setApi(api);
9494
}, [api, setApi]);
9595

9696
React.useEffect(() => {
97-
if (!api) return;
97+
if (!api) { return; }
9898
onSelect(api);
9999
api.on('reInit', onSelect);
100100
api.on('select', onSelect);
@@ -108,7 +108,7 @@ function Carousel({
108108
<CarouselContext.Provider
109109
value={{
110110
carouselRef,
111-
api: api,
111+
api,
112112
opts,
113113
orientation:
114114
orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),
@@ -187,8 +187,8 @@ function CarouselPrevious({
187187
className={cn(
188188
'absolute size-8 rounded-full',
189189
orientation === 'horizontal'
190-
? 'top-1/2 -left-12 -translate-y-1/2'
191-
: '-top-12 left-1/2 -translate-x-1/2 rotate-90',
190+
? '-left-12 -translate-y-1/2 top-1/2'
191+
: '-top-12 -translate-x-1/2 left-1/2 rotate-90',
192192
className
193193
)}
194194
disabled={!canScrollPrev}
@@ -217,8 +217,8 @@ function CarouselNext({
217217
className={cn(
218218
'absolute size-8 rounded-full',
219219
orientation === 'horizontal'
220-
? 'top-1/2 -right-12 -translate-y-1/2'
221-
: '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',
220+
? '-right-12 -translate-y-1/2 top-1/2'
221+
: '-bottom-12 -translate-x-1/2 left-1/2 rotate-90',
222222
className
223223
)}
224224
disabled={!canScrollNext}

apps/dashboard/components/ui/dropdown-menu.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import * as React from 'react';
3+
import type * as React from 'react';
44
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
55
import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
66

@@ -42,7 +42,7 @@ function DropdownMenuContent({
4242
data-slot="dropdown-menu-content"
4343
sideOffset={sideOffset}
4444
className={cn(
45-
'bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',
45+
'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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in',
4646
className
4747
)}
4848
{...props}
@@ -74,7 +74,7 @@ function DropdownMenuItem({
7474
data-inset={inset}
7575
data-variant={variant}
7676
className={cn(
77-
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
77+
"data-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[disabled]:opacity-50 data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",
7878
className
7979
)}
8080
{...props}
@@ -92,7 +92,7 @@ function DropdownMenuCheckboxItem({
9292
<DropdownMenuPrimitive.CheckboxItem
9393
data-slot="dropdown-menu-checkbox-item"
9494
className={cn(
95-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
95+
"relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
9696
className
9797
)}
9898
checked={checked}
@@ -128,7 +128,7 @@ function DropdownMenuRadioItem({
128128
<DropdownMenuPrimitive.RadioItem
129129
data-slot="dropdown-menu-radio-item"
130130
className={cn(
131-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
131+
"relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
132132
className
133133
)}
134134
{...props}
@@ -155,7 +155,7 @@ function DropdownMenuLabel({
155155
data-slot="dropdown-menu-label"
156156
data-inset={inset}
157157
className={cn(
158-
'px-2 py-1.5 text-sm font-medium data-[inset]:pl-8',
158+
'px-2 py-1.5 font-medium text-sm data-[inset]:pl-8',
159159
className
160160
)}
161161
{...props}
@@ -170,7 +170,7 @@ function DropdownMenuSeparator({
170170
return (
171171
<DropdownMenuPrimitive.Separator
172172
data-slot="dropdown-menu-separator"
173-
className={cn('bg-border -mx-1 my-1 h-px', className)}
173+
className={cn('-mx-1 my-1 h-px bg-border', className)}
174174
{...props}
175175
/>
176176
);
@@ -184,7 +184,7 @@ function DropdownMenuShortcut({
184184
<span
185185
data-slot="dropdown-menu-shortcut"
186186
className={cn(
187-
'text-muted-foreground ml-auto text-xs tracking-widest',
187+
'ml-auto text-muted-foreground text-xs tracking-widest',
188188
className
189189
)}
190190
{...props}
@@ -211,7 +211,7 @@ function DropdownMenuSubTrigger({
211211
data-slot="dropdown-menu-sub-trigger"
212212
data-inset={inset}
213213
className={cn(
214-
'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8',
214+
'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[inset]:pl-8 data-[state=open]:text-accent-foreground',
215215
className
216216
)}
217217
{...props}
@@ -230,7 +230,7 @@ function DropdownMenuSubContent({
230230
<DropdownMenuPrimitive.SubContent
231231
data-slot="dropdown-menu-sub-content"
232232
className={cn(
233-
'bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg',
233+
'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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=open]:animate-in',
234234
className
235235
)}
236236
{...props}

apps/dashboard/components/ui/hover-card.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import * as React from 'react';
3+
import type * as React from 'react';
44
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
55

66
import { cn } from '@/lib/utils';
@@ -32,7 +32,7 @@ function HoverCardContent({
3232
align={align}
3333
sideOffset={sideOffset}
3434
className={cn(
35-
'bg-popover text-popover-foreground 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 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',
35+
'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 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=closed]:animate-out data-[state=open]:animate-in',
3636
className
3737
)}
3838
{...props}

apps/dashboard/components/ui/input.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from 'react';
1+
import type * as React from 'react';
22

33
import { cn } from '@/lib/utils';
44

@@ -8,9 +8,9 @@ function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
88
type={type}
99
data-slot="input"
1010
className={cn(
11-
'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
12-
'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
13-
'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
11+
'flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30',
12+
'focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50',
13+
'aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40',
1414
className
1515
)}
1616
{...props}

apps/dashboard/components/ui/progress.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import * as React from 'react';
3+
import type * as React from 'react';
44
import * as ProgressPrimitive from '@radix-ui/react-progress';
55

66
import { cn } from '@/lib/utils';
@@ -14,14 +14,14 @@ function Progress({
1414
<ProgressPrimitive.Root
1515
data-slot="progress"
1616
className={cn(
17-
'bg-primary/20 relative h-2 w-full overflow-hidden rounded-full',
17+
'relative h-2 w-full overflow-hidden rounded-full bg-primary/20',
1818
className
1919
)}
2020
{...props}
2121
>
2222
<ProgressPrimitive.Indicator
2323
data-slot="progress-indicator"
24-
className="bg-primary h-full w-full flex-1 transition-all"
24+
className="h-full w-full flex-1 bg-primary transition-all"
2525
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
2626
/>
2727
</ProgressPrimitive.Root>

apps/dashboard/components/ui/scroll-area.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import * as React from 'react';
3+
import type * as React from 'react';
44
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
55

66
import { cn } from '@/lib/utils';
@@ -18,7 +18,7 @@ function ScrollArea({
1818
>
1919
<ScrollAreaPrimitive.Viewport
2020
data-slot="scroll-area-viewport"
21-
className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
21+
className="size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] focus-visible:ring-ring/50"
2222
>
2323
{children}
2424
</ScrollAreaPrimitive.Viewport>
@@ -38,7 +38,7 @@ function ScrollBar({
3838
data-slot="scroll-area-scrollbar"
3939
orientation={orientation}
4040
className={cn(
41-
'flex touch-none p-px transition-colors select-none',
41+
'flex touch-none select-none p-px transition-colors',
4242
orientation === 'vertical' &&
4343
'h-full w-2.5 border-l border-l-transparent',
4444
orientation === 'horizontal' &&
@@ -49,7 +49,7 @@ function ScrollBar({
4949
>
5050
<ScrollAreaPrimitive.ScrollAreaThumb
5151
data-slot="scroll-area-thumb"
52-
className="bg-border relative flex-1 rounded-full"
52+
className="relative flex-1 rounded-full bg-border"
5353
/>
5454
</ScrollAreaPrimitive.ScrollAreaScrollbar>
5555
);

0 commit comments

Comments
 (0)