style: Prettier format

This commit is contained in:
April Hall 2025-02-15 16:45:08 -05:00
parent 79552dd57c
commit 3b696209e6
Signed by: arithefirst
GPG Key ID: 4508A15C4DB91C5B
6 changed files with 111 additions and 111 deletions

View File

@ -1,10 +1,10 @@
import { Select as SelectPrimitive } from "bits-ui"; import { Select as SelectPrimitive } from 'bits-ui';
import Label from "./select-label.svelte"; import Label from './select-label.svelte';
import Item from "./select-item.svelte"; import Item from './select-item.svelte';
import Content from "./select-content.svelte"; import Content from './select-content.svelte';
import Trigger from "./select-trigger.svelte"; import Trigger from './select-trigger.svelte';
import Separator from "./select-separator.svelte"; import Separator from './select-separator.svelte';
const Root = SelectPrimitive.Root; const Root = SelectPrimitive.Root;
const Group = SelectPrimitive.Group; const Group = SelectPrimitive.Group;
@ -12,23 +12,23 @@ const Input = SelectPrimitive.Input;
const Value = SelectPrimitive.Value; const Value = SelectPrimitive.Value;
export { export {
Root, Root,
Item, Item,
Group, Group,
Input, Input,
Label, Label,
Value, Value,
Content, Content,
Trigger, Trigger,
Separator, Separator,
// //
Root as Select, Root as Select,
Item as SelectItem, Item as SelectItem,
Group as SelectGroup, Group as SelectGroup,
Input as SelectInput, Input as SelectInput,
Label as SelectLabel, Label as SelectLabel,
Value as SelectValue, Value as SelectValue,
Content as SelectContent, Content as SelectContent,
Trigger as SelectTrigger, Trigger as SelectTrigger,
Separator as SelectSeparator, Separator as SelectSeparator,
}; };

View File

@ -1,36 +1,36 @@
<script lang="ts"> <script lang="ts">
import { Select as SelectPrimitive } from "bits-ui"; import { Select as SelectPrimitive } from 'bits-ui';
import { scale } from "svelte/transition"; import { scale } from 'svelte/transition';
import { cn, flyAndScale } from "$lib/utils.js"; import { cn, flyAndScale } from '$lib/utils.js';
type $$Props = SelectPrimitive.ContentProps; type $$Props = SelectPrimitive.ContentProps;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export let sideOffset: $$Props["sideOffset"] = 4; export let sideOffset: $$Props['sideOffset'] = 4;
export let inTransition: $$Props["inTransition"] = flyAndScale; export let inTransition: $$Props['inTransition'] = flyAndScale;
export let inTransitionConfig: $$Props["inTransitionConfig"] = undefined; export let inTransitionConfig: $$Props['inTransitionConfig'] = undefined;
export let outTransition: $$Props["outTransition"] = scale; export let outTransition: $$Props['outTransition'] = scale;
export let outTransitionConfig: $$Props["outTransitionConfig"] = { export let outTransitionConfig: $$Props['outTransitionConfig'] = {
start: 0.95, start: 0.95,
opacity: 0, opacity: 0,
duration: 50, duration: 50,
}; };
export { className as class }; export { className as class };
</script> </script>
<SelectPrimitive.Content <SelectPrimitive.Content
{inTransition} {inTransition}
{inTransitionConfig} {inTransitionConfig}
{outTransition} {outTransition}
{outTransitionConfig} {outTransitionConfig}
{sideOffset} {sideOffset}
class={cn( class={cn(
"bg-popover text-popover-foreground relative z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-md focus:outline-none", 'relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md focus:outline-none',
className className,
)} )}
{...$$restProps} {...$$restProps}
> >
<div class="w-full p-1"> <div class="w-full p-1">
<slot /> <slot />
</div> </div>
</SelectPrimitive.Content> </SelectPrimitive.Content>

View File

@ -1,37 +1,37 @@
<script lang="ts"> <script lang="ts">
import { Select as SelectPrimitive } from "bits-ui"; import { Select as SelectPrimitive } from 'bits-ui';
import Check from "svelte-radix/Check.svelte"; import Check from 'svelte-radix/Check.svelte';
import { cn } from "$lib/utils.js"; import { cn } from '$lib/utils.js';
type $$Props = SelectPrimitive.ItemProps; type $$Props = SelectPrimitive.ItemProps;
type $$Events = Required<SelectPrimitive.ItemEvents>; type $$Events = Required<SelectPrimitive.ItemEvents>;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export let value: $$Props["value"]; export let value: $$Props['value'];
export let label: $$Props["label"] = undefined; export let label: $$Props['label'] = undefined;
export let disabled: $$Props["disabled"] = undefined; export let disabled: $$Props['disabled'] = undefined;
export { className as class }; export { className as class };
</script> </script>
<SelectPrimitive.Item <SelectPrimitive.Item
{value} {value}
{disabled} {disabled}
{label} {label}
class={cn( class={cn(
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50", 'relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50',
className className,
)} )}
{...$$restProps} {...$$restProps}
on:click on:click
on:pointermove on:pointermove
on:focusin on:focusin
> >
<span class="absolute right-2 flex h-3.5 w-3.5 items-center justify-center"> <span class="absolute right-2 flex h-3.5 w-3.5 items-center justify-center">
<SelectPrimitive.ItemIndicator> <SelectPrimitive.ItemIndicator>
<Check class="h-4 w-4" /> <Check class="h-4 w-4" />
</SelectPrimitive.ItemIndicator> </SelectPrimitive.ItemIndicator>
</span> </span>
<slot> <slot>
{label || value} {label || value}
</slot> </slot>
</SelectPrimitive.Item> </SelectPrimitive.Item>

View File

@ -1,13 +1,13 @@
<script lang="ts"> <script lang="ts">
import { Select as SelectPrimitive } from "bits-ui"; import { Select as SelectPrimitive } from 'bits-ui';
import { cn } from "$lib/utils.js"; import { cn } from '$lib/utils.js';
type $$Props = SelectPrimitive.LabelProps; type $$Props = SelectPrimitive.LabelProps;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>
<SelectPrimitive.Label class={cn("px-2 py-1.5 text-sm font-semibold", className)} {...$$restProps}> <SelectPrimitive.Label class={cn('px-2 py-1.5 text-sm font-semibold', className)} {...$$restProps}>
<slot /> <slot />
</SelectPrimitive.Label> </SelectPrimitive.Label>

View File

@ -1,11 +1,11 @@
<script lang="ts"> <script lang="ts">
import { Select as SelectPrimitive } from "bits-ui"; import { Select as SelectPrimitive } from 'bits-ui';
import { cn } from "$lib/utils.js"; import { cn } from '$lib/utils.js';
type $$Props = SelectPrimitive.SeparatorProps; type $$Props = SelectPrimitive.SeparatorProps;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>
<SelectPrimitive.Separator class={cn("bg-muted -mx-1 my-1 h-px", className)} {...$$restProps} /> <SelectPrimitive.Separator class={cn('-mx-1 my-1 h-px bg-muted', className)} {...$$restProps} />

View File

@ -1,24 +1,24 @@
<script lang="ts"> <script lang="ts">
import { Select as SelectPrimitive } from "bits-ui"; import { Select as SelectPrimitive } from 'bits-ui';
import CaretSort from "svelte-radix/CaretSort.svelte"; import CaretSort from 'svelte-radix/CaretSort.svelte';
import { cn } from "$lib/utils.js"; import { cn } from '$lib/utils.js';
type $$Props = SelectPrimitive.TriggerProps; type $$Props = SelectPrimitive.TriggerProps;
type $$Events = SelectPrimitive.TriggerEvents; type $$Events = SelectPrimitive.TriggerEvents;
let className: $$Props["class"] = undefined; let className: $$Props['class'] = undefined;
export { className as class }; export { className as class };
</script> </script>
<SelectPrimitive.Trigger <SelectPrimitive.Trigger
class={cn( class={cn(
"border-input ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring aria-[invalid]:border-destructive data-[placeholder]:[&>span]:text-muted-foreground flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", 'flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-[invalid]:border-destructive [&>span]:line-clamp-1 data-[placeholder]:[&>span]:text-muted-foreground',
className className,
)} )}
{...$$restProps} {...$$restProps}
> >
<slot /> <slot />
<div> <div>
<CaretSort class="h-4 w-4 opacity-50" /> <CaretSort class="h-4 w-4 opacity-50" />
</div> </div>
</SelectPrimitive.Trigger> </SelectPrimitive.Trigger>