Skip to content

Commit d170724

Browse files
committed
* fix lint/format issues
* exclude cache files
1 parent 509c5f6 commit d170724

16 files changed

+54
-64
lines changed

.cache/.eslintcache

-1
This file was deleted.

.cache/.prettiercache

-1
This file was deleted.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/.pnp
66
.pnp.js
77
.yarn/install-state.gz
8+
/.cache
89

910
# testing
1011
/coverage

content/aria-docs/react-hooks/use-notification.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Before proceeding, ensure you have the following:
4646

4747
- [local file - absolute path](/docs/aria-docs/getting-started)
4848

49-
- [local file - relative path](../use-inventory)
49+
- [local file - relative path](./use-inventory)
5050

5151
- [local link - absolute path with hash](/docs/aria-docs/react-hooks/use-notification#prerequisites)
5252

src/components/ui/accordion.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
"use client"
22

33
import * as React from "react"
4+
import { cn } from "@/lib/utils"
45
import * as AccordionPrimitive from "@radix-ui/react-accordion"
56
import { ChevronDownIcon } from "lucide-react"
67

7-
import { cn } from "@/lib/utils"
8-
98
function Accordion({
109
...props
1110
}: React.ComponentProps<typeof AccordionPrimitive.Root>) {
@@ -36,7 +35,7 @@ function AccordionTrigger({
3635
data-slot="accordion-trigger"
3736
className={cn(
3837
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
39-
className
38+
className,
4039
)}
4140
{...props}
4241
>

src/components/ui/alert.tsx

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1+
import type { VariantProps } from "class-variance-authority"
12
import * as React from "react"
2-
import { cva, type VariantProps } from "class-variance-authority"
3-
43
import { cn } from "@/lib/utils"
4+
import { cva } from "class-variance-authority"
55

66
const alertVariants = cva(
7-
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
7+
"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
88
{
99
variants: {
1010
variant: {
1111
default: "bg-card text-card-foreground",
1212
destructive:
13-
"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
13+
"text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current",
1414
},
1515
},
1616
defaultVariants: {
1717
variant: "default",
1818
},
19-
}
19+
},
2020
)
2121

2222
function Alert({
@@ -40,7 +40,7 @@ function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
4040
data-slot="alert-title"
4141
className={cn(
4242
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
43-
className
43+
className,
4444
)}
4545
{...props}
4646
/>
@@ -56,7 +56,7 @@ function AlertDescription({
5656
data-slot="alert-description"
5757
className={cn(
5858
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
59-
className
59+
className,
6060
)}
6161
{...props}
6262
/>

src/components/ui/badge.tsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1+
import type { VariantProps } from "class-variance-authority"
12
import * as React from "react"
2-
import { Slot } from "@radix-ui/react-slot"
3-
import { cva, type VariantProps } from "class-variance-authority"
4-
53
import { cn } from "@/lib/utils"
4+
import { Slot } from "@radix-ui/react-slot"
5+
import { cva } from "class-variance-authority"
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+
"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3",
99
{
1010
variants: {
1111
variant: {
1212
default:
13-
"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
13+
"bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",
1414
secondary:
15-
"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
15+
"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",
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/70",
17+
"bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70 border-transparent text-white",
1818
outline:
1919
"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
2020
},
2121
},
2222
defaultVariants: {
2323
variant: "default",
2424
},
25-
}
25+
},
2626
)
2727

2828
function Badge({

src/components/ui/breadcrumb.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import * as React from "react"
2+
import { cn } from "@/lib/utils"
23
import { Slot } from "@radix-ui/react-slot"
34
import { ChevronRight, MoreHorizontal } from "lucide-react"
45

5-
import { cn } from "@/lib/utils"
6-
76
function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
87
return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />
98
}
@@ -14,7 +13,7 @@ function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
1413
data-slot="breadcrumb-list"
1514
className={cn(
1615
"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
17-
className
16+
className,
1817
)}
1918
{...props}
2019
/>

src/components/ui/button.tsx

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1+
import type { VariantProps } from "class-variance-authority"
12
import * as React from "react"
2-
import { Slot } from "@radix-ui/react-slot"
3-
import { cva, type VariantProps } from "class-variance-authority"
4-
53
import { cn } from "@/lib/utils"
4+
import { Slot } from "@radix-ui/react-slot"
5+
import { cva } from "class-variance-authority"
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+
"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
99
{
1010
variants: {
1111
variant: {
1212
default:
13-
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
13+
"bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs",
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 hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white shadow-xs",
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+
"bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs",
1818
secondary:
19-
"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
19+
"bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-xs",
2020
ghost:
2121
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
2222
link: "text-primary underline-offset-4 hover:underline",
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
},
@@ -32,7 +32,7 @@ const buttonVariants = cva(
3232
variant: "default",
3333
size: "default",
3434
},
35-
}
35+
},
3636
)
3737

3838
function Button({

src/components/ui/dialog.tsx

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
"use client"
22

33
import * as React from "react"
4+
import { cn } from "@/lib/utils"
45
import * as DialogPrimitive from "@radix-ui/react-dialog"
56
import { XIcon } from "lucide-react"
67

7-
import { cn } from "@/lib/utils"
8-
98
function Dialog({
109
...props
1110
}: React.ComponentProps<typeof DialogPrimitive.Root>) {
@@ -39,7 +38,7 @@ function DialogOverlay({
3938
data-slot="dialog-overlay"
4039
className={cn(
4140
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
42-
className
41+
className,
4342
)}
4443
{...props}
4544
/>
@@ -58,7 +57,7 @@ function DialogContent({
5857
data-slot="dialog-content"
5958
className={cn(
6059
"bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
61-
className
60+
className,
6261
)}
6362
{...props}
6463
>
@@ -88,7 +87,7 @@ function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {
8887
data-slot="dialog-footer"
8988
className={cn(
9089
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
91-
className
90+
className,
9291
)}
9392
{...props}
9493
/>

src/components/ui/input.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as React from "react"
2-
32
import { cn } from "@/lib/utils"
43

54
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
@@ -11,7 +10,7 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
1110
"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",
1211
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
1312
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
14-
className
13+
className,
1514
)}
1615
{...props}
1716
/>

src/components/ui/select.tsx

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
"use client"
22

33
import * as React from "react"
4+
import { cn } from "@/lib/utils"
45
import * as SelectPrimitive from "@radix-ui/react-select"
56
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
67

7-
import { cn } from "@/lib/utils"
8-
98
function Select({
109
...props
1110
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
@@ -38,7 +37,7 @@ function SelectTrigger({
3837
data-size={size}
3938
className={cn(
4039
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
41-
className
40+
className,
4241
)}
4342
{...props}
4443
>
@@ -64,7 +63,7 @@ function SelectContent({
6463
"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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
6564
position === "popper" &&
6665
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
67-
className
66+
className,
6867
)}
6968
position={position}
7069
{...props}
@@ -74,7 +73,7 @@ function SelectContent({
7473
className={cn(
7574
"p-1",
7675
position === "popper" &&
77-
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
76+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1",
7877
)}
7978
>
8079
{children}
@@ -108,7 +107,7 @@ function SelectItem({
108107
data-slot="select-item"
109108
className={cn(
110109
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
111-
className
110+
className,
112111
)}
113112
{...props}
114113
>
@@ -144,7 +143,7 @@ function SelectScrollUpButton({
144143
data-slot="select-scroll-up-button"
145144
className={cn(
146145
"flex cursor-default items-center justify-center py-1",
147-
className
146+
className,
148147
)}
149148
{...props}
150149
>
@@ -162,7 +161,7 @@ function SelectScrollDownButton({
162161
data-slot="select-scroll-down-button"
163162
className={cn(
164163
"flex cursor-default items-center justify-center py-1",
165-
className
164+
className,
166165
)}
167166
{...props}
168167
>

src/components/ui/separator.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
"use client"
22

33
import * as React from "react"
4-
import * as SeparatorPrimitive from "@radix-ui/react-separator"
5-
64
import { cn } from "@/lib/utils"
5+
import * as SeparatorPrimitive from "@radix-ui/react-separator"
76

87
function Separator({
98
className,
@@ -18,7 +17,7 @@ function Separator({
1817
orientation={orientation}
1918
className={cn(
2019
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
21-
className
20+
className,
2221
)}
2322
{...props}
2423
/>

src/components/ui/table.tsx

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"use client"
22

33
import * as React from "react"
4-
54
import { cn } from "@/lib/utils"
65

76
function Table({ className, ...props }: React.ComponentProps<"table">) {
@@ -45,7 +44,7 @@ function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
4544
data-slot="table-footer"
4645
className={cn(
4746
"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
48-
className
47+
className,
4948
)}
5049
{...props}
5150
/>
@@ -58,7 +57,7 @@ function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
5857
data-slot="table-row"
5958
className={cn(
6059
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
61-
className
60+
className,
6261
)}
6362
{...props}
6463
/>
@@ -71,7 +70,7 @@ function TableHead({ className, ...props }: React.ComponentProps<"th">) {
7170
data-slot="table-head"
7271
className={cn(
7372
"text-muted-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
74-
className
73+
className,
7574
)}
7675
{...props}
7776
/>
@@ -84,7 +83,7 @@ function TableCell({ className, ...props }: React.ComponentProps<"td">) {
8483
data-slot="table-cell"
8584
className={cn(
8685
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
87-
className
86+
className,
8887
)}
8988
{...props}
9089
/>

0 commit comments

Comments
 (0)