Skip to content

Commit af982cd

Browse files
committed
fix: linter fixes
1 parent 4510de0 commit af982cd

File tree

10 files changed

+19
-21
lines changed

10 files changed

+19
-21
lines changed

packages/ui/src/components/button.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ const buttonVariants = cva(
1212
variant: {
1313
default:
1414
'bg-background-5 text-foreground-6 hover:bg-background-10 disabled:bg-background-6 disabled:text-foreground-9',
15-
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm',
15+
destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
1616
outline:
17-
'border-borders-2 hover:border-borders-6 text-foreground-2 hover:text-foreground-8 border bg-transparent',
18-
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm',
19-
tertiary: 'bg-tertiary text-secondary-foreground hover:bg-tertiary/80 shadow-sm',
17+
'border border-borders-2 bg-transparent text-foreground-2 hover:border-borders-6 hover:text-foreground-8',
18+
secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
19+
tertiary: 'bg-tertiary text-secondary-foreground shadow-sm hover:bg-tertiary/80',
2020
ghost: 'hover:bg-background-12 hover:text-accent-foreground',
2121
link: 'text-primary underline-offset-4 hover:underline',
2222
link_accent: 'text-foreground-accent underline-offset-4 hover:underline',

packages/ui/src/components/checkbox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ const Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root
1515
<div className={cn('flex gap-x-2.5', className)}>
1616
<CheckboxPrimitive.Root
1717
ref={ref}
18-
className="border-icons-1 data-[state=checked]:bg-primary data-[state=checked]:border-icons-2 data-[state=checked]:text-primary-foreground hover:border-icons-3 disabled:border-icons-4 peer size-4 shrink-0 rounded-sm border shadow disabled:cursor-not-allowed"
18+
className="peer size-4 shrink-0 rounded-sm border border-icons-1 shadow hover:border-icons-3 disabled:cursor-not-allowed disabled:border-icons-4 data-[state=checked]:border-icons-2 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground"
1919
{...props}
2020
>
2121
<CheckboxPrimitive.Indicator className={cn('flex items-center justify-center text-current')}>
2222
<Icon className="h-1.5 w-2" name="checkbox" width={8} height={6} />
2323
</CheckboxPrimitive.Indicator>
2424
</CheckboxPrimitive.Root>
2525
{label && (
26-
<Label className="text-foreground-1 font-normal leading-tight tracking-tight" htmlFor={props.id}>
26+
<Label className="font-normal leading-tight tracking-tight text-foreground-1" htmlFor={props.id}>
2727
{label}
2828
</Label>
2929
)}

packages/ui/src/components/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ export * from './no-data'
2525
export * from './tabs'
2626
export * from './command'
2727
export * from './search-files'
28-
export * from './input'
2928
export * from './radio-group'
30-
export * from './textarea'
3129
export * from './checkbox'
3230
export * from './toast'
3331
export * from './styled-link'

packages/ui/src/components/input.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ export interface BaseInputProps
1313
size?: 'sm' | 'md'
1414
}
1515

16-
const inputVariants = cva('text-foreground-1 bg-transparent px-2.5 py-1 disabled:cursor-not-allowed', {
16+
const inputVariants = cva('bg-transparent px-2.5 py-1 text-foreground-1 disabled:cursor-not-allowed', {
1717
variants: {
1818
variant: {
1919
default:
20-
'placeholder:text-foreground-4 flex w-full rounded border text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:rounded focus-visible:outline-none',
20+
'flex w-full rounded border text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-foreground-4 focus-visible:rounded focus-visible:outline-none',
2121
extended: 'grow border-none focus-visible:outline-none'
2222
},
2323
size: {
@@ -26,7 +26,7 @@ const inputVariants = cva('text-foreground-1 bg-transparent px-2.5 py-1 disabled
2626
},
2727
theme: {
2828
default:
29-
'border-borders-2 focus-visible:border-borders-3 disabled:placeholder:text-foreground-9 disabled:border-borders-1',
29+
'border-borders-2 focus-visible:border-borders-3 disabled:border-borders-1 disabled:placeholder:text-foreground-9',
3030
danger: 'border-borders-danger'
3131
}
3232
},
@@ -71,7 +71,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
7171
</FormErrorMessage>
7272
)}
7373
{caption && (
74-
<Text className="text-foreground-4 mt-1 leading-snug" size={2}>
74+
<Text className="mt-1 leading-snug text-foreground-4" size={2}>
7575
{caption}
7676
</Text>
7777
)}

packages/ui/src/components/label.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ interface LabelProps extends VariantProps<typeof labelVariants>, React.PropsWith
4141
const Label = ({ htmlFor, optional, theme, variant, children, className }: LabelProps) => {
4242
return (
4343
<LabelRoot htmlFor={htmlFor} variant={variant} theme={theme} className={className}>
44-
{children} {optional && <span className="text-foreground-7 align-top">(optional)</span>}
44+
{children} {optional && <span className="align-top text-foreground-7">(optional)</span>}
4545
</LabelRoot>
4646
)
4747
}

packages/ui/src/components/radio-group.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const RadioButton = React.forwardRef<
6868
)}
6969
{...props}
7070
>
71-
<RadioGroupPrimitive.Indicator className="bg-icons-2 size-2 rounded-full" />
71+
<RadioGroupPrimitive.Indicator className="size-2 rounded-full bg-icons-2" />
7272
</RadioGroupPrimitive.Item>
7373
)
7474
})

packages/ui/src/components/select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const Select: React.FC<SelectProps> = ({
4949
</FormErrorMessage>
5050
)}
5151
{caption && (
52-
<Text className="text-foreground-4 mt-1 leading-snug" size={2}>
52+
<Text className="mt-1 leading-snug text-foreground-4" size={2}>
5353
{caption}
5454
</Text>
5555
)}

packages/ui/src/components/textarea.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
4545
</FormErrorMessage>
4646
)}
4747
{caption && (
48-
<Text className="text-foreground-4 mt-1 leading-snug" size={2}>
48+
<Text className="mt-1 leading-snug text-foreground-4" size={2}>
4949
{caption}
5050
</Text>
5151
)}

packages/ui/src/components/toast/toast.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ const toastVariants = cva(
2727
{
2828
variants: {
2929
variant: {
30-
default: 'bg-background-3 border-borders-1 text-foreground [&_svg]:text-icons-1',
31-
destructive: 'bg-foreground-danger text-foreground-1 [&_svg]:text-icons-2 border-borders-danger'
30+
default: 'border-borders-1 bg-background-3 text-foreground [&_svg]:text-icons-1',
31+
destructive: 'border-borders-danger bg-foreground-danger text-foreground-1 [&_svg]:text-icons-2'
3232
}
3333
},
3434
defaultVariants: {

packages/ui/src/views/repo/repo-create/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export function RepoCreatePage({
114114
Create a new repository
115115
</Text>
116116
<Spacer size={2.5} />
117-
<Text className="text-foreground-2 max-w-[476px]" size={2} as="p">
117+
<Text className="max-w-[476px] text-foreground-2" size={2} as="p">
118118
A repository contains all project files, including the revision history. Already have a project repository
119119
elsewhere?{' '}
120120
<StyledLink to="../import" relative="path">
@@ -219,7 +219,7 @@ export function RepoCreatePage({
219219
{/* ACCESS */}
220220
<Fieldset>
221221
<ControlGroup>
222-
<Text className="text-foreground-2 leading-none" size={2}>
222+
<Text className="leading-none text-foreground-2" size={2}>
223223
Who has access
224224
</Text>
225225
<RadioGroup className="mt-6" value={accessValue} onValueChange={handleAccessChange} id="access">
@@ -250,7 +250,7 @@ export function RepoCreatePage({
250250
{/* README */}
251251
<Fieldset>
252252
<ControlGroup>
253-
<Text className="text-foreground-2 leading-none" size={2}>
253+
<Text className="leading-none text-foreground-2" size={2}>
254254
Initialize this repository with
255255
</Text>
256256
<RadioGroupItem

0 commit comments

Comments
 (0)