Skip to content

Commit 167c8d9

Browse files
committed
update epic-stack
1 parent 3d19868 commit 167c8d9

Some content is hidden

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

48 files changed

+1251
-1305
lines changed

app/components/error-boundary.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function GeneralErrorBoundary({
4141
}, [error, isResponse])
4242

4343
return (
44-
<div className="container flex items-center justify-center p-20 text-h2">
44+
<div className="text-h2 container flex items-center justify-center p-20">
4545
{isResponse
4646
? (statusHandlers?.[error.status] ?? defaultStatusHandler)({
4747
error,

app/components/floating-toolbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export const floatingToolbarClassName =
2-
'absolute bottom-3 left-3 right-3 flex items-center gap-2 rounded-lg bg-muted/80 p-4 pl-5 shadow-xl shadow-accent backdrop-blur-sm md:gap-4 md:pl-7 justify-end'
2+
'absolute bottom-3 inset-x-3 flex items-center gap-2 rounded-lg bg-muted/80 p-4 pl-5 shadow-xl shadow-accent backdrop-blur-xs md:gap-4 md:pl-7 justify-end'

app/components/forms.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function ErrorList({
2626
return (
2727
<ul id={id} className="flex flex-col gap-1">
2828
{errorsToRender.map((e) => (
29-
<li key={e} className="text-[10px] text-foreground-destructive">
29+
<li key={e} className="text-foreground-destructive text-[10px]">
3030
{e}
3131
</li>
3232
))}
@@ -57,7 +57,7 @@ export function Field({
5757
aria-describedby={errorId}
5858
{...inputProps}
5959
/>
60-
<div className="min-h-[32px] px-4 pb-3 pt-1">
60+
<div className="min-h-[32px] px-4 pt-1 pb-3">
6161
{errorId ? <ErrorList id={errorId} errors={errors} /> : null}
6262
</div>
6363
</div>
@@ -101,7 +101,7 @@ export function OTPField({
101101
<InputOTPSlot index={5} />
102102
</InputOTPGroup>
103103
</InputOTP>
104-
<div className="min-h-[32px] px-4 pb-3 pt-1">
104+
<div className="min-h-[32px] px-4 pt-1 pb-3">
105105
{errorId ? <ErrorList id={errorId} errors={errors} /> : null}
106106
</div>
107107
</div>
@@ -131,7 +131,7 @@ export function TextareaField({
131131
aria-describedby={errorId}
132132
{...textareaProps}
133133
/>
134-
<div className="min-h-[32px] px-4 pb-3 pt-1">
134+
<div className="min-h-[32px] px-4 pt-1 pb-3">
135135
{errorId ? <ErrorList id={errorId} errors={errors} /> : null}
136136
</div>
137137
</div>
@@ -191,10 +191,10 @@ export function CheckboxField({
191191
<label
192192
htmlFor={id}
193193
{...labelProps}
194-
className="self-center text-body-xs text-muted-foreground"
194+
className="text-body-xs text-muted-foreground self-center"
195195
/>
196196
</div>
197-
<div className="px-4 pb-3 pt-1">
197+
<div className="px-4 pt-1 pb-3">
198198
{errorId ? <ErrorList id={errorId} errors={errors} /> : null}
199199
</div>
200200
</div>

app/components/progress-bar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ function EpicProgress() {
3232
role="progressbar"
3333
aria-hidden={delayedPending ? undefined : true}
3434
aria-valuetext={delayedPending ? 'Loading' : undefined}
35-
className="fixed inset-x-0 left-0 top-0 z-50 h-[0.20rem] animate-pulse"
35+
className="fixed inset-x-0 top-0 z-50 h-[0.20rem] animate-pulse"
3636
>
3737
<div
3838
ref={ref}
3939
className={cn(
40-
'h-full w-0 bg-foreground duration-500 ease-in-out',
40+
'bg-foreground h-full w-0 duration-500 ease-in-out',
4141
transition.state === 'idle' &&
4242
(animationComplete
4343
? 'transition-none'
@@ -51,7 +51,7 @@ function EpicProgress() {
5151
<Icon
5252
name="update"
5353
size="md"
54-
className="m-1 animate-spin text-foreground"
54+
className="text-foreground m-1 animate-spin"
5555
aria-hidden
5656
/>
5757
</div>

app/components/ui/button.tsx

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import * as React from 'react'
55
import { cn } from '#app/utils/misc.tsx'
66

77
const buttonVariants = cva(
8-
'inline-flex items-center justify-center rounded-md text-sm font-medium outline-none ring-ring ring-offset-2 ring-offset-background transition-colors focus-within:ring-2 focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50',
8+
'ring-ring ring-offset-background inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-2 outline-hidden transition-colors focus-within:ring-2 focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50',
99
{
1010
variants: {
1111
variant: {
1212
default: 'bg-primary text-primary-foreground hover:bg-primary/80',
1313
destructive:
1414
'bg-destructive text-destructive-foreground hover:bg-destructive/80',
1515
outline:
16-
'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
16+
'border-input bg-background hover:bg-accent hover:text-accent-foreground border',
1717
secondary:
1818
'bg-secondary text-secondary-foreground hover:bg-secondary/80',
1919
ghost: 'hover:bg-accent hover:text-accent-foreground',
@@ -25,7 +25,7 @@ const buttonVariants = cva(
2525
sm: 'h-9 rounded-md px-3',
2626
lg: 'h-11 rounded-md px-8',
2727
pill: 'px-12 py-3 leading-3',
28-
icon: 'h-10 w-10',
28+
icon: 'size-10',
2929
},
3030
},
3131
defaultVariants: {
@@ -35,24 +35,26 @@ const buttonVariants = cva(
3535
},
3636
)
3737

38-
export interface ButtonProps
39-
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
40-
VariantProps<typeof buttonVariants> {
41-
asChild?: boolean
42-
}
38+
export type ButtonVariant = VariantProps<typeof buttonVariants>
4339

44-
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
45-
({ className, variant, size, asChild = false, ...props }, ref) => {
46-
const Comp = asChild ? Slot : 'button'
47-
return (
48-
<Comp
49-
className={cn(buttonVariants({ variant, size, className }))}
50-
ref={ref}
51-
{...props}
52-
/>
53-
)
54-
},
55-
)
56-
Button.displayName = 'Button'
40+
const Button = ({
41+
className,
42+
variant,
43+
size,
44+
asChild = false,
45+
...props
46+
}: React.ComponentProps<'button'> &
47+
ButtonVariant & {
48+
asChild?: boolean
49+
}) => {
50+
const Comp = asChild ? Slot : 'button'
51+
return (
52+
<Comp
53+
data-slot="button"
54+
className={cn(buttonVariants({ variant, size, className }))}
55+
{...props}
56+
/>
57+
)
58+
}
5759

5860
export { Button, buttonVariants }

app/components/ui/checkbox.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,20 @@ export type CheckboxProps = Omit<
1010
type?: string
1111
}
1212

13-
const Checkbox = React.forwardRef<
14-
React.ElementRef<typeof CheckboxPrimitive.Root>,
15-
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
16-
>(({ className, ...props }, ref) => (
13+
const Checkbox = ({
14+
className,
15+
...props
16+
}: React.ComponentProps<typeof CheckboxPrimitive.Root>) => (
1717
<CheckboxPrimitive.Root
18-
ref={ref}
18+
data-slot="checkbox"
1919
className={cn(
20-
'peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',
20+
'peer border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground size-4 shrink-0 rounded-sm border focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50',
2121
className,
2222
)}
2323
{...props}
2424
>
2525
<CheckboxPrimitive.Indicator
26+
data-slot="checkbox-indicator"
2627
className={cn('flex items-center justify-center text-current')}
2728
>
2829
<svg viewBox="0 0 8 8">
@@ -35,7 +36,6 @@ const Checkbox = React.forwardRef<
3536
</svg>
3637
</CheckboxPrimitive.Indicator>
3738
</CheckboxPrimitive.Root>
38-
))
39-
Checkbox.displayName = CheckboxPrimitive.Root.displayName
39+
)
4040

4141
export { Checkbox }

0 commit comments

Comments
 (0)