1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-04 13:21:45 +00:00

refactor: run formatter

This commit is contained in:
Elias Schneider
2026-01-02 17:45:53 +01:00
parent 386add08c4
commit e4a8ca476c
19 changed files with 139 additions and 138 deletions

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -13,7 +13,7 @@
<div <div
bind:this={ref} bind:this={ref}
data-slot="field-content" data-slot="field-content"
class={cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className)} class={cn('group/field-content flex flex-1 flex-col gap-1.5 leading-snug', className)}
{...restProps} {...restProps}
> >
{@render children?.()} {@render children?.()}

View File

@@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
import type { Snippet } from "svelte"; import type { Snippet } from 'svelte';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -38,7 +38,7 @@
bind:this={ref} bind:this={ref}
role="alert" role="alert"
data-slot="field-error" data-slot="field-error"
class={cn("text-destructive text-sm font-normal", className)} class={cn('text-destructive text-sm font-normal', className)}
{...restProps} {...restProps}
> >
{#if children} {#if children}

View File

@@ -1,15 +1,15 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
class: className, class: className,
variant = "legend", variant = 'legend',
children, children,
...restProps ...restProps
}: WithElementRef<HTMLAttributes<HTMLLegendElement>> & { }: WithElementRef<HTMLAttributes<HTMLLegendElement>> & {
variant?: "legend" | "label"; variant?: 'legend' | 'label';
} = $props(); } = $props();
</script> </script>
@@ -18,9 +18,9 @@
data-slot="field-legend" data-slot="field-legend"
data-variant={variant} data-variant={variant}
class={cn( class={cn(
"mb-3 font-medium", 'mb-3 font-medium',
"data-[variant=legend]:text-base", 'data-[variant=legend]:text-base',
"data-[variant=label]:text-sm", 'data-[variant=label]:text-sm',
className className
)} )}
{...restProps} {...restProps}

View File

@@ -1,8 +1,8 @@
<script lang="ts"> <script lang="ts">
import { Separator } from "$lib/components/ui/separator/index.js"; import { Separator } from '$lib/components/ui/separator/index.js';
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
import type { Snippet } from "svelte"; import type { Snippet } from 'svelte';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -20,10 +20,7 @@
bind:this={ref} bind:this={ref}
data-slot="field-separator" data-slot="field-separator"
data-content={hasContent} data-content={hasContent}
class={cn( class={cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className)}
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
className
)}
{...restProps} {...restProps}
> >
<Separator class="absolute inset-0 top-1/2" /> <Separator class="absolute inset-0 top-1/2" />

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -14,7 +14,7 @@
bind:this={ref} bind:this={ref}
data-slot="field-title" data-slot="field-title"
class={cn( class={cn(
"flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled=true]/field:opacity-50", 'flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled=true]/field:opacity-50',
className className
)} )}
{...restProps} {...restProps}

View File

@@ -1,13 +1,13 @@
import Field from "./field.svelte"; import Field from './field.svelte';
import Set from "./field-set.svelte"; import Set from './field-set.svelte';
import Legend from "./field-legend.svelte"; import Legend from './field-legend.svelte';
import Group from "./field-group.svelte"; import Group from './field-group.svelte';
import Content from "./field-content.svelte"; import Content from './field-content.svelte';
import Label from "./field-label.svelte"; import Label from './field-label.svelte';
import Title from "./field-title.svelte"; import Title from './field-title.svelte';
import Description from "./field-description.svelte"; import Description from './field-description.svelte';
import Separator from "./field-separator.svelte"; import Separator from './field-separator.svelte';
import Error from "./field-error.svelte"; import Error from './field-error.svelte';
export { export {
Field, Field,
@@ -29,5 +29,5 @@ export {
Title as FieldTitle, Title as FieldTitle,
Description as FieldDescription, Description as FieldDescription,
Separator as FieldSeparator, Separator as FieldSeparator,
Error as FieldError, Error as FieldError
}; };

View File

@@ -1,13 +1,13 @@
import Root from "./item.svelte"; import Root from './item.svelte';
import Group from "./item-group.svelte"; import Group from './item-group.svelte';
import Separator from "./item-separator.svelte"; import Separator from './item-separator.svelte';
import Header from "./item-header.svelte"; import Header from './item-header.svelte';
import Footer from "./item-footer.svelte"; import Footer from './item-footer.svelte';
import Content from "./item-content.svelte"; import Content from './item-content.svelte';
import Title from "./item-title.svelte"; import Title from './item-title.svelte';
import Description from "./item-description.svelte"; import Description from './item-description.svelte';
import Actions from "./item-actions.svelte"; import Actions from './item-actions.svelte';
import Media from "./item-media.svelte"; import Media from './item-media.svelte';
export { export {
Root, Root,
@@ -30,5 +30,5 @@ export {
Title as ItemTitle, Title as ItemTitle,
Description as ItemDescription, Description as ItemDescription,
Actions as ItemActions, Actions as ItemActions,
Media as ItemMedia, Media as ItemMedia
}; };

View File

@@ -16,7 +16,11 @@
<div <div
bind:this={ref} bind:this={ref}
data-slot="item-actions" data-slot="item-actions"
class={cn('flex items-center gap-2', wrapOnMobile && 'w-full pl-8 sm:w-auto sm:pl-0 pt-1', className)} class={cn(
'flex items-center gap-2',
wrapOnMobile && 'w-full pl-8 sm:w-auto sm:pl-0 pt-1',
className
)}
{...restProps} {...restProps}
> >
{@render children?.()} {@render children?.()}

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -13,7 +13,7 @@
<div <div
bind:this={ref} bind:this={ref}
data-slot="item-content" data-slot="item-content"
class={cn("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", className)} class={cn('flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none', className)}
{...restProps} {...restProps}
> >
{@render children?.()} {@render children?.()}

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -14,8 +14,8 @@
bind:this={ref} bind:this={ref}
data-slot="item-description" data-slot="item-description"
class={cn( class={cn(
"text-muted-foreground text-balance text-sm font-normal leading-normal", 'text-muted-foreground text-balance text-sm font-normal leading-normal',
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',
className className
)} )}
{...restProps} {...restProps}

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -13,7 +13,7 @@
<div <div
bind:this={ref} bind:this={ref}
data-slot="item-footer" data-slot="item-footer"
class={cn("flex basis-full items-center justify-between gap-2", className)} class={cn('flex basis-full items-center justify-between gap-2', className)}
{...restProps} {...restProps}
> >
{@render children?.()} {@render children?.()}

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -14,7 +14,7 @@
bind:this={ref} bind:this={ref}
role="list" role="list"
data-slot="item-group" data-slot="item-group"
class={cn("group/item-group flex flex-col", className)} class={cn('group/item-group flex flex-col', className)}
{...restProps} {...restProps}
> >
{@render children?.()} {@render children?.()}

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -13,7 +13,7 @@
<div <div
bind:this={ref} bind:this={ref}
data-slot="item-header" data-slot="item-header"
class={cn("flex basis-full items-center justify-between gap-2", className)} class={cn('flex basis-full items-center justify-between gap-2', className)}
{...restProps} {...restProps}
> >
{@render children?.()} {@render children?.()}

View File

@@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { Separator } from "$lib/components/ui/separator/index.js"; import { Separator } from '$lib/components/ui/separator/index.js';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
import type { ComponentProps } from "svelte"; import type { ComponentProps } from 'svelte';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -14,6 +14,6 @@
bind:ref bind:ref
data-slot="item-separator" data-slot="item-separator"
orientation="horizontal" orientation="horizontal"
class={cn("my-0", className)} class={cn('my-0', className)}
{...restProps} {...restProps}
/> />

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -15,7 +15,7 @@
role="heading" role="heading"
aria-level="3" aria-level="3"
data-slot="item-title" data-slot="item-title"
class={cn("flex w-fit items-center gap-2 font-semibold leading-snug", className)} class={cn('flex w-fit items-center gap-2 font-semibold leading-snug', className)}
{...restProps} {...restProps}
> >
{@render children?.()} {@render children?.()}

View File

@@ -1 +1 @@
export { default as Spinner } from "./spinner.svelte"; export { default as Spinner } from './spinner.svelte';

View File

@@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
import Loader2Icon from "@lucide/svelte/icons/loader-2"; import Loader2Icon from '@lucide/svelte/icons/loader-2';
import type { ComponentProps } from "svelte"; import type { ComponentProps } from 'svelte';
let { class: className, ...restProps }: ComponentProps<typeof Loader2Icon> = $props(); let { class: className, ...restProps }: ComponentProps<typeof Loader2Icon> = $props();
</script> </script>
@@ -9,6 +9,6 @@
<Loader2Icon <Loader2Icon
role="status" role="status"
aria-label="Loading" aria-label="Loading"
class={cn("size-4 animate-spin", className)} class={cn('size-4 animate-spin', className)}
{...restProps} {...restProps}
/> />