-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: initial formatting fixes (#15)
Initial formatting for everything
- Loading branch information
1 parent
f824953
commit 509beb4
Showing
41 changed files
with
578 additions
and
563 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ | |
"utils": "@lib/utils" | ||
}, | ||
"typescript": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
<script lang="ts"> | ||
import { cn } from "@lib/utils.js"; | ||
import { badgeVariants, type Variant } from "./index.js"; | ||
import { cn } from '@lib/utils.js'; | ||
import { badgeVariants, type Variant } from './index.js'; | ||
let className: string | undefined | null = undefined; | ||
export let href: string | undefined = undefined; | ||
export let variant: Variant = "default"; | ||
export { className as class }; | ||
let className: string | undefined | null = undefined; | ||
export let href: string | undefined = undefined; | ||
export let variant: Variant = 'default'; | ||
export { className as class }; | ||
</script> | ||
|
||
<svelte:element | ||
this={href ? "a" : "span"} | ||
{href} | ||
class={cn(badgeVariants({ variant, className }))} | ||
{...$$restProps} | ||
> | ||
<slot /> | ||
this={href ? 'a' : 'span'} | ||
{href} | ||
class={cn(badgeVariants({ variant, className }))} | ||
{...$$restProps}> | ||
<slot /> | ||
</svelte:element> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
import { tv, type VariantProps } from "tailwind-variants"; | ||
export { default as Badge } from "./badge.svelte"; | ||
import { tv, type VariantProps } from 'tailwind-variants'; | ||
export { default as Badge } from './badge.svelte'; | ||
|
||
export const badgeVariants = tv({ | ||
base: "inline-flex items-center border rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none select-none focus:ring-2 focus:ring-ring focus:ring-offset-2", | ||
variants: { | ||
variant: { | ||
default: "bg-primary hover:bg-primary/80 border-transparent text-primary-foreground", | ||
secondary: | ||
"bg-secondary hover:bg-secondary/80 border-transparent text-secondary-foreground", | ||
destructive: | ||
"bg-destructive hover:bg-destructive/80 border-transparent text-destructive-foreground", | ||
outline: "text-foreground", | ||
}, | ||
}, | ||
defaultVariants: { | ||
variant: "default", | ||
}, | ||
base: 'inline-flex items-center border rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none select-none focus:ring-2 focus:ring-ring focus:ring-offset-2', | ||
variants: { | ||
variant: { | ||
default: | ||
'bg-primary hover:bg-primary/80 border-transparent text-primary-foreground', | ||
secondary: | ||
'bg-secondary hover:bg-secondary/80 border-transparent text-secondary-foreground', | ||
destructive: | ||
'bg-destructive hover:bg-destructive/80 border-transparent text-destructive-foreground', | ||
outline: 'text-foreground' | ||
} | ||
}, | ||
defaultVariants: { | ||
variant: 'default' | ||
} | ||
}); | ||
|
||
export type Variant = VariantProps<typeof badgeVariants>["variant"]; | ||
export type Variant = VariantProps<typeof badgeVariants>['variant']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
<script lang="ts"> | ||
import { Button as ButtonPrimitive } from "bits-ui"; | ||
import { cn } from "@lib/utils.js"; | ||
import { buttonVariants, type Props, type Events } from "./index.js"; | ||
import { Button as ButtonPrimitive } from 'bits-ui'; | ||
import { cn } from '@lib/utils.js'; | ||
import { buttonVariants, type Props, type Events } from './index.js'; | ||
type $$Props = Props; | ||
type $$Events = Events; | ||
type $$Props = Props; | ||
type $$Events = Events; | ||
let className: $$Props["class"] = undefined; | ||
export let variant: $$Props["variant"] = "default"; | ||
export let size: $$Props["size"] = "default"; | ||
export let builders: $$Props["builders"] = []; | ||
export { className as class }; | ||
let className: $$Props['class'] = undefined; | ||
export let variant: $$Props['variant'] = 'default'; | ||
export let size: $$Props['size'] = 'default'; | ||
export let builders: $$Props['builders'] = []; | ||
export { className as class }; | ||
</script> | ||
|
||
<ButtonPrimitive.Root | ||
{builders} | ||
class={cn(buttonVariants({ variant, size, className }))} | ||
type="button" | ||
{...$$restProps} | ||
on:click | ||
on:keydown | ||
> | ||
<slot /> | ||
{builders} | ||
class={cn(buttonVariants({ variant, size, className }))} | ||
type="button" | ||
{...$$restProps} | ||
on:click | ||
on:keydown> | ||
<slot /> | ||
</ButtonPrimitive.Root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,50 @@ | ||
import Root from "./button.svelte"; | ||
import { tv, type VariantProps } from "tailwind-variants"; | ||
import type { Button as ButtonPrimitive } from "bits-ui"; | ||
import Root from './button.svelte'; | ||
import { tv, type VariantProps } from 'tailwind-variants'; | ||
import type { Button as ButtonPrimitive } from 'bits-ui'; | ||
|
||
const buttonVariants = tv({ | ||
base: "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", | ||
variants: { | ||
variant: { | ||
default: "bg-primary text-primary-foreground hover:bg-primary/90", | ||
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90", | ||
outline: | ||
"border border-input bg-background hover:bg-accent hover:text-accent-foreground", | ||
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80", | ||
ghost: "hover:bg-accent hover:text-accent-foreground", | ||
link: "text-primary underline-offset-4 hover:underline", | ||
}, | ||
size: { | ||
default: "h-10 px-4 py-2", | ||
sm: "h-9 rounded-md px-3", | ||
lg: "h-11 rounded-md px-8", | ||
icon: "h-10 w-10", | ||
}, | ||
}, | ||
defaultVariants: { | ||
variant: "default", | ||
size: "default", | ||
}, | ||
base: 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', | ||
variants: { | ||
variant: { | ||
default: 'bg-primary text-primary-foreground hover:bg-primary/90', | ||
destructive: | ||
'bg-destructive text-destructive-foreground hover:bg-destructive/90', | ||
outline: | ||
'border border-input bg-background hover:bg-accent hover:text-accent-foreground', | ||
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80', | ||
ghost: 'hover:bg-accent hover:text-accent-foreground', | ||
link: 'text-primary underline-offset-4 hover:underline' | ||
}, | ||
size: { | ||
default: 'h-10 px-4 py-2', | ||
sm: 'h-9 rounded-md px-3', | ||
lg: 'h-11 rounded-md px-8', | ||
icon: 'h-10 w-10' | ||
} | ||
}, | ||
defaultVariants: { | ||
variant: 'default', | ||
size: 'default' | ||
} | ||
}); | ||
|
||
type Variant = VariantProps<typeof buttonVariants>["variant"]; | ||
type Size = VariantProps<typeof buttonVariants>["size"]; | ||
type Variant = VariantProps<typeof buttonVariants>['variant']; | ||
type Size = VariantProps<typeof buttonVariants>['size']; | ||
|
||
type Props = ButtonPrimitive.Props & { | ||
variant?: Variant; | ||
size?: Size; | ||
variant?: Variant; | ||
size?: Size; | ||
}; | ||
|
||
type Events = ButtonPrimitive.Events; | ||
|
||
export { | ||
Root, | ||
type Props, | ||
type Events, | ||
// | ||
Root as Button, | ||
type Props as ButtonProps, | ||
type Events as ButtonEvents, | ||
buttonVariants, | ||
Root, | ||
type Props, | ||
type Events, | ||
// | ||
Root as Button, | ||
type Props as ButtonProps, | ||
type Events as ButtonEvents, | ||
buttonVariants | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
<script lang="ts"> | ||
import { cn } from "@lib/utils.js"; | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from '@lib/utils.js'; | ||
import type { HTMLAttributes } from 'svelte/elements'; | ||
type $$Props = HTMLAttributes<HTMLDivElement>; | ||
type $$Props = HTMLAttributes<HTMLDivElement>; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
let className: $$Props['class'] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<div class={cn("p-6 pt-0", className)} {...$$restProps}> | ||
<slot /> | ||
<div | ||
class={cn('p-6 pt-0', className)} | ||
{...$$restProps}> | ||
<slot /> | ||
</div> |
16 changes: 9 additions & 7 deletions
16
apps/mailtools/src/components/ui/card/card-description.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from "@lib/utils.js"; | ||
import type { HTMLAttributes } from 'svelte/elements'; | ||
import { cn } from '@lib/utils.js'; | ||
type $$Props = HTMLAttributes<HTMLParagraphElement>; | ||
type $$Props = HTMLAttributes<HTMLParagraphElement>; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
let className: $$Props['class'] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<p class={cn("text-sm text-muted-foreground", className)} {...$$restProps}> | ||
<slot /> | ||
<p | ||
class={cn('text-muted-foreground text-sm', className)} | ||
{...$$restProps}> | ||
<slot /> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from "@lib/utils.js"; | ||
import type { HTMLAttributes } from 'svelte/elements'; | ||
import { cn } from '@lib/utils.js'; | ||
type $$Props = HTMLAttributes<HTMLDivElement>; | ||
type $$Props = HTMLAttributes<HTMLDivElement>; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
let className: $$Props['class'] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<div class={cn("flex items-center p-6 pt-0", className)} {...$$restProps}> | ||
<slot /> | ||
<div | ||
class={cn('flex items-center p-6 pt-0', className)} | ||
{...$$restProps}> | ||
<slot /> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from "@lib/utils.js"; | ||
import type { HTMLAttributes } from 'svelte/elements'; | ||
import { cn } from '@lib/utils.js'; | ||
type $$Props = HTMLAttributes<HTMLDivElement>; | ||
type $$Props = HTMLAttributes<HTMLDivElement>; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
let className: $$Props['class'] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<div class={cn("flex flex-col space-y-1.5 p-6", className)} {...$$restProps}> | ||
<slot /> | ||
<div | ||
class={cn('flex flex-col space-y-1.5 p-6', className)} | ||
{...$$restProps}> | ||
<slot /> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from "@lib/utils.js"; | ||
import type { HeadingLevel } from "./index.js"; | ||
import type { HTMLAttributes } from 'svelte/elements'; | ||
import { cn } from '@lib/utils.js'; | ||
import type { HeadingLevel } from './index.js'; | ||
type $$Props = HTMLAttributes<HTMLHeadingElement> & { | ||
tag?: HeadingLevel; | ||
}; | ||
type $$Props = HTMLAttributes<HTMLHeadingElement> & { | ||
tag?: HeadingLevel; | ||
}; | ||
let className: $$Props["class"] = undefined; | ||
export let tag: $$Props["tag"] = "h3"; | ||
export { className as class }; | ||
let className: $$Props['class'] = undefined; | ||
export let tag: $$Props['tag'] = 'h3'; | ||
export { className as class }; | ||
</script> | ||
|
||
<svelte:element | ||
this={tag} | ||
class={cn("text-lg font-semibold leading-none tracking-tight", className)} | ||
{...$$restProps} | ||
> | ||
<slot /> | ||
this={tag} | ||
class={cn('text-lg font-semibold leading-none tracking-tight', className)} | ||
{...$$restProps}> | ||
<slot /> | ||
</svelte:element> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
import { cn } from "@lib/utils.js"; | ||
import type { HTMLAttributes } from 'svelte/elements'; | ||
import { cn } from '@lib/utils.js'; | ||
type $$Props = HTMLAttributes<HTMLDivElement>; | ||
type $$Props = HTMLAttributes<HTMLDivElement>; | ||
let className: $$Props["class"] = undefined; | ||
export { className as class }; | ||
let className: $$Props['class'] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<div | ||
class={cn("rounded-lg border bg-card text-card-foreground shadow-sm", className)} | ||
{...$$restProps} | ||
> | ||
<slot /> | ||
class={cn( | ||
'bg-card text-card-foreground rounded-lg border shadow-sm', | ||
className | ||
)} | ||
{...$$restProps}> | ||
<slot /> | ||
</div> |
Oops, something went wrong.