Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
chore: update dropdown menu component
Kyle Mendellcde041a06853
diff --git a/frontend/package-lock.json b/frontend/package-lock.jsonindex afe4448b1..65dec3902 100644--- a/frontend/package-lock.json+++ b/frontend/package-lock.json@@ -25,7 +25,8 @@"devDependencies": {"@eslint/compat": "^1.3.0","@eslint/js": "^9.29.0",- "@lucide/svelte": "^0.525.0",+ "@internationalized/date": "^3.8.2",+ "@lucide/svelte": "^0.515.0","@playwright/test": "^1.52.0","@sveltejs/kit": "^2.22.2","@sveltejs/vite-plugin-svelte": "^5.1.0",@@ -1089,7 +1090,6 @@"integrity": "sha512-/wENk7CbvLbkUvX1tu0mwq49CVkkWpkXubGel6birjRPyo6uQ4nQpnq5xZu823zRCwwn82zgHrvgF1vZyvmVgA==","dev": true,"license": "Apache-2.0",- "peer": true,"dependencies": {"@swc/helpers": "^0.5.0"}@@ -1240,9 +1240,9 @@}},"node_modules/@lucide/svelte": {- "version": "0.525.0",- "resolved": "https://registry.npmjs.org/@lucide/svelte/-/svelte-0.525.0.tgz",- "integrity": "sha512-dyUxkXzepagLUzL8jHQNdeH286nC66ClLACsg+Neu/bjkRJWPWMzkT+H0DKlE70QdkicGCfs1ZGmXCc351hmZA==",+ "version": "0.515.0",+ "resolved": "https://registry.npmjs.org/@lucide/svelte/-/svelte-0.515.0.tgz",+ "integrity": "sha512-CEAyqcZmNBfYzVgaRmK2RFJP5tnbXxekRyDk0XX/eZQRfsJmkDvmQwXNX8C869BgNeryzmrRyjHhUL6g9ZOHNA==","dev": true,"license": "ISC","peerDependencies": {@@ -1723,7 +1723,6 @@"integrity": "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==","dev": true,"license": "Apache-2.0",- "peer": true,"dependencies": {"tslib": "^2.8.0"}diff --git a/frontend/package.json b/frontend/package.jsonindex 34baeb5a6..ec5691538 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -39,7 +39,8 @@"devDependencies": {"@eslint/compat": "^1.3.0","@eslint/js": "^9.29.0",- "@lucide/svelte": "^0.525.0",+ "@internationalized/date": "^3.8.2",+ "@lucide/svelte": "^0.515.0","@playwright/test": "^1.52.0","@sveltejs/kit": "^2.22.2","@sveltejs/vite-plugin-svelte": "^5.1.0",diff --git a/frontend/src/lib/components/action-buttons.svelte b/frontend/src/lib/components/action-buttons.svelteindex 2dfbdd057..b5518d789 100644--- a/frontend/src/lib/components/action-buttons.svelte+++ b/frontend/src/lib/components/action-buttons.svelte@@ -34,7 +34,9 @@validating: false});- const isRunning = $derived(itemState === 'running' || (type === 'stack' && itemState === 'partially running'));+ const isRunning = $derived(+ itemState === 'running' || (type === 'stack' && itemState === 'partially running')+ );$effect(() => {isLoading.start = loading.start ?? false;@@ -55,21 +57,22 @@label: type === 'stack' ? 'Destroy' : 'Remove',destructive: true,action: async (checkboxStates) => {- console.log('Debug - received checkbox states:', checkboxStates);-- // Ensure these are proper booleansconst removeFiles = checkboxStates['removeFiles'] === true;const removeVolumes = checkboxStates['removeVolumes'] === true;- console.log('Debug - removeFiles:', removeFiles, 'removeVolumes:', removeVolumes);-isLoading.remove = true;handleApiResultWithCallbacks({- result: await tryCatch(type === 'container' ? environmentAPI.deleteContainer(id) : environmentAPI.destroyStack(id, removeVolumes, removeFiles)),+ result: await tryCatch(+ type === 'container'+ ? environmentAPI.deleteContainer(id)+ : environmentAPI.destroyStack(id, removeVolumes, removeFiles)+ ),message: `Failed to ${type === 'stack' ? 'Destroy' : 'Remove'} ${type}`,setLoadingState: (value) => (isLoading.remove = value),onSuccess: async () => {- toast.success(`${type.charAt(0).toUpperCase() + type.slice(1)} ${type === 'stack' ? 'Destroyed' : 'Removed'} Successfully`);+ toast.success(+ `${type.charAt(0).toUpperCase() + type.slice(1)} ${type === 'stack' ? 'Destroyed' : 'Removed'} Successfully`+ );await invalidateAll();goto(`/${type}s`);}@@ -98,7 +101,9 @@message: `Failed to Redeploy ${type}`,setLoadingState: (value) => (isLoading.redeploy = value),onSuccess: async () => {- toast.success(`${type.charAt(0).toUpperCase() + type.slice(1)} Redeployed Successfully`);+ toast.success(+ `${type.charAt(0).toUpperCase() + type.slice(1)} Redeployed Successfully`+ );await invalidateAll();}});@@ -111,7 +116,9 @@async function handleStart() {isLoading.start = true;handleApiResultWithCallbacks({- result: await tryCatch(type === 'container' ? environmentAPI.startContainer(id) : environmentAPI.startStack(id)),+ result: await tryCatch(+ type === 'container' ? environmentAPI.startContainer(id) : environmentAPI.startStack(id)+ ),message: `Failed to Start ${type}`,setLoadingState: (value) => (isLoading.start = value),onSuccess: async () => {@@ -137,7 +144,9 @@async function handleStop() {isLoading.stop = true;handleApiResultWithCallbacks({- result: await tryCatch(type === 'container' ? environmentAPI.stopContainer(id) : environmentAPI.stopStack(id)),+ result: await tryCatch(+ type === 'container' ? environmentAPI.stopContainer(id) : environmentAPI.stopStack(id)+ ),message: `Failed to Stop ${type}`,setLoadingState: (value) => (isLoading.stop = value),onSuccess: async () => {@@ -150,7 +159,9 @@async function handleRestart() {isLoading.restart = true;handleApiResultWithCallbacks({- result: await tryCatch(type === 'container' ? environmentAPI.restartContainer(id) : environmentAPI.restartStack(id)),+ result: await tryCatch(+ type === 'container' ? environmentAPI.restartContainer(id) : environmentAPI.restartStack(id)+ ),message: `Failed to Restart ${type}`,setLoadingState: (value) => (isLoading.restart = value),onSuccess: async () => {@@ -163,7 +174,11 @@async function handlePull() {isLoading.pulling = true;handleApiResultWithCallbacks({- result: await tryCatch(type === 'container' ? environmentAPI.pullContainerImage(id) : environmentAPI.pullStackImages(id)),+ result: await tryCatch(+ type === 'container'+ ? environmentAPI.pullContainerImage(id)+ : environmentAPI.pullStackImages(id)+ ),message: 'Failed to Pull Image(s)',setLoadingState: (value) => (isLoading.pulling = value),onSuccess: async () => {@@ -176,17 +191,39 @@<div class="flex items-center gap-2">{#if !isRunning}- <ArcaneButton action={type === 'container' ? 'start' : 'deploy'} onClick={type === 'container' ? () => handleStart() : () => handleDeploy()} loading={isLoading.start} />+ <ArcaneButton+ action={type === 'container' ? 'start' : 'deploy'}+ onClick={type === 'container' ? () => handleStart() : () => handleDeploy()}+ loading={isLoading.start}+ />{:else}- <ArcaneButton label={type === 'stack' ? 'Down' : 'Stop'} action="stop" onClick={() => handleStop()} loading={isLoading.stop} />+ <ArcaneButton+ label={type === 'stack' ? 'Down' : 'Stop'}+ action="stop"+ onClick={() => handleStop()}+ loading={isLoading.stop}+ /><ArcaneButton action="restart" onClick={() => handleRestart()} loading={isLoading.restart} />{/if}{#if type === 'container'}- <ArcaneButton action="remove" onClick={() => confirmAction('remove')} loading={isLoading.remove} />+ <ArcaneButton+ action="remove"+ onClick={() => confirmAction('remove')}+ loading={isLoading.remove}+ />{:else}- <ArcaneButton action="redeploy" onClick={() => confirmAction('redeploy')} loading={isLoading.redeploy} />+ <ArcaneButton+ action="redeploy"+ onClick={() => confirmAction('redeploy')}+ loading={isLoading.redeploy}+ /><ArcaneButton action="pull" onClick={handlePull} loading={isLoading.pulling} />- <ArcaneButton label={type === 'stack' ? 'Destroy' : 'Remove'} action="remove" onClick={() => confirmAction('remove')} loading={isLoading.remove} />+ <ArcaneButton+ label={type === 'stack' ? 'Destroy' : 'Remove'}+ action="remove"+ onClick={() => confirmAction('remove')}+ loading={isLoading.remove}+ />{/if}</div>diff --git a/frontend/src/lib/components/confirm-dialog/confirm-dialog.svelte b/frontend/src/lib/components/confirm-dialog/confirm-dialog.svelteindex 0a558640c..0cd10af6f 100644--- a/frontend/src/lib/components/confirm-dialog/confirm-dialog.svelte+++ b/frontend/src/lib/components/confirm-dialog/confirm-dialog.svelte@@ -21,36 +21,54 @@});function handleConfirm() {- console.log('Final checkbox states before confirm:', checkboxStates);$confirmDialogStore.confirm.action(checkboxStates);$confirmDialogStore.open = false;}</script><Dialog.Root bind:open={$confirmDialogStore.open}>- <Dialog.Content class="w-full max-w-md">- <Dialog.Header>- <Dialog.Title class="flex items-center gap-2 text-lg font-semibold">- <AlertTriangle class="text-destructive size-5 shrink-0" />- {$confirmDialogStore.title}+ <Dialog.Content class="w-full max-w-md sm:max-w-lg">+ <Dialog.Header class="space-y-3">+ <Dialog.Title class="flex items-start gap-3 text-lg font-semibold leading-tight">+ <AlertTriangle class="text-destructive mt-0.5 size-5 shrink-0" />+ <span class="min-w-0 break-words">+ {$confirmDialogStore.title}+ </span></Dialog.Title></Dialog.Header>- <div class="text-muted-foreground mt-2 min-w-0 text-sm break-words">+ <div+ class="text-muted-foreground mt-4 min-w-0 text-sm leading-relaxed break-words whitespace-pre-wrap"+ >{$confirmDialogStore.message}</div><!-- Checkboxes -->{#if $confirmDialogStore.checkboxes && $confirmDialogStore.checkboxes.length > 0}- <div class="border-border mt-4 flex flex-col gap-3 border-t pt-4 pb-2">+ <div class="border-border mt-6 flex flex-col gap-4 border-t pt-4">{#each $confirmDialogStore.checkboxes as checkbox (checkbox.id)}- <div class="flex items-center space-x-2">+ <div class="flex items-start space-x-3">{#if checkboxStates[checkbox.id] !== undefined}- <Checkbox id={checkbox.id} bind:checked={checkboxStates[checkbox.id]} aria-labelledby={`${checkbox.id}-label`} />+ <Checkbox+ id={checkbox.id}+ bind:checked={checkboxStates[checkbox.id]}+ aria-labelledby={`${checkbox.id}-label`}+ class="mt-0.5"+ />{:else}- <Checkbox id={checkbox.id} checked={false} onchange={(e) => (checkboxStates[checkbox.id] = true)} aria-labelledby={`${checkbox.id}-label`} />+ <Checkbox+ id={checkbox.id}+ checked={false}+ onchange={(e) => (checkboxStates[checkbox.id] = true)}+ aria-labelledby={`${checkbox.id}-label`}+ class="mt-0.5"+ />{/if}- <Label id={`${checkbox.id}-label`} for={checkbox.id} class="text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70">+ <Label+ id={`${checkbox.id}-label`}+ for={checkbox.id}+ class="text-sm leading-relaxed font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70 min-w-0 break-words"+ >{checkbox.label}</Label></div>@@ -59,9 +77,19 @@{/if}<Dialog.Footer class="mt-6">- <div class="flex justify-end gap-2">- <Button class="arcane-button-cancel" variant="outline" onclick={() => ($confirmDialogStore.open = false)}>Cancel</Button>- <Button class="arcane-button-create" variant={$confirmDialogStore.confirm.destructive ? 'destructive' : 'default'} onclick={handleConfirm}>+ <div class="flex justify-end gap-3 w-full">+ <Button+ class="min-w-[80px]"+ variant="outline"+ onclick={() => ($confirmDialogStore.open = false)}+ >+ Cancel+ </Button>+ <Button+ class="min-w-[80px]"+ variant={$confirmDialogStore.confirm.destructive ? 'destructive' : 'default'}+ onclick={handleConfirm}+ >{$confirmDialogStore.confirm.label}</Button></div>diff --git a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelteindex 2eb7c5b84..e03f94916 100644--- a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte+++ b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte@@ -1,9 +1,9 @@<script lang="ts">- import { DropdownMenu as DropdownMenuPrimitive, type WithoutChildrenOrChild } from 'bits-ui';- import Check from '@lucide/svelte/icons/check';- import Minus from '@lucide/svelte/icons/minus';- import { cn } from '$lib/utils.js';- import type { Snippet } from 'svelte';+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";+ import CheckIcon from "@lucide/svelte/icons/check";+ import MinusIcon from "@lucide/svelte/icons/minus";+ import { cn, type WithoutChildrenOrChild } from "$lib/utils.js";+ import type { Snippet } from "svelte";let {ref = $bindable(null),@@ -21,15 +21,19 @@bind:refbind:checkedbind:indeterminate- class={cn('data-highlighted:bg-accent data-highlighted:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50', className)}+ data-slot="dropdown-menu-checkbox-item"+ class={cn(+ "focus:bg-accent focus:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",+ className+ )}{...restProps}>{#snippet children({ checked, indeterminate })}- <span class="absolute left-2 flex size-3.5 items-center justify-center">+ <span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">{#if indeterminate}- <Minus class="size-4" />+ <MinusIcon class="size-4" />{:else}- <Check class={cn('size-4', !checked && 'text-transparent')} />+ <CheckIcon class={cn("size-4", !checked && "text-transparent")} />{/if}</span>{@render childrenProp?.()}diff --git a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelteindex 6fe32187e..a44beed32 100644--- a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte+++ b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte@@ -16,9 +16,10 @@<DropdownMenuPrimitive.Portal {...portalProps}><DropdownMenuPrimitive.Contentbind:ref+ data-slot="dropdown-menu-content"{sideOffset}class={cn(- 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border p-1 shadow-md outline-none',+ 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-h-(--radix-dropdown-menu-content-available-height) origin-(--radix-dropdown-menu-content-transform-origin) z-50 min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md outline-none',className)}{...restProps}diff --git a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelteindex 5adebb428..48d14a916 100644--- a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte+++ b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte@@ -1,15 +1,22 @@<script lang="ts">- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';- import { cn } from '$lib/utils.js';+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";+ import { cn } from "$lib/utils.js";+ import type { ComponentProps } from "svelte";let {ref = $bindable(null),class: className,inset,...restProps- }: DropdownMenuPrimitive.GroupHeadingProps & {+ }: ComponentProps<typeof DropdownMenuPrimitive.GroupHeading> & {inset?: boolean;} = $props();</script>-<DropdownMenuPrimitive.GroupHeading bind:ref class={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)} {...restProps} />+<DropdownMenuPrimitive.GroupHeading+ bind:ref+ data-slot="dropdown-menu-group-heading"+ data-inset={inset}+ class={cn("px-2 py-1.5 text-sm font-semibold data-[inset]:pl-8", className)}+ {...restProps}+/>diff --git a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-group.svelte b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-group.sveltenew file mode 100644index 000000000..aca1f7bd5--- /dev/null+++ b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-group.svelte@@ -0,0 +1,7 @@+<script lang="ts">+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";++ let { ref = $bindable(null), ...restProps }: DropdownMenuPrimitive.GroupProps = $props();+</script>++<DropdownMenuPrimitive.Group bind:ref data-slot="dropdown-menu-group" {...restProps} />diff --git a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelteindex 503f34c77..64bb28310 100644--- a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte+++ b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte@@ -1,22 +1,26 @@<script lang="ts">- import { cn } from '$lib/utils.js';- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';+ import { cn } from "$lib/utils.js";+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";let {ref = $bindable(null),class: className,inset,+ variant = "default",...restProps}: DropdownMenuPrimitive.ItemProps & {inset?: boolean;+ variant?: "default" | "destructive";} = $props();</script><DropdownMenuPrimitive.Itembind:ref+ data-slot="dropdown-menu-item"+ data-inset={inset}+ data-variant={variant}class={cn(- 'data-highlighted:bg-accent data-highlighted:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',- inset && 'pl-8',+ "data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-[variant=destructive]:data-highlighted:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",className)}{...restProps}diff --git a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelteindex b337da672..f72e477e1 100644--- a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte+++ b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte@@ -1,7 +1,6 @@<script lang="ts">- import { cn } from '$lib/utils.js';- import { type WithElementRef } from 'bits-ui';- import type { HTMLAttributes } from 'svelte/elements';+ import { cn, type WithElementRef } from "$lib/utils.js";+ import type { HTMLAttributes } from "svelte/elements";let {ref = $bindable(null),@@ -14,6 +13,12 @@} = $props();</script>-<div bind:this={ref} class={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)} {...restProps}>+<div+ bind:this={ref}+ data-slot="dropdown-menu-label"+ data-inset={inset}+ class={cn("px-2 py-1.5 text-sm font-semibold data-[inset]:pl-8", className)}+ {...restProps}+>{@render children?.()}</div>diff --git a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.sveltenew file mode 100644index 000000000..189aef40e--- /dev/null+++ b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte@@ -0,0 +1,16 @@+<script lang="ts">+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";++ let {+ ref = $bindable(null),+ value = $bindable(),+ ...restProps+ }: DropdownMenuPrimitive.RadioGroupProps = $props();+</script>++<DropdownMenuPrimitive.RadioGroup+ bind:ref+ bind:value+ data-slot="dropdown-menu-radio-group"+ {...restProps}+/>diff --git a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelteindex 19d71d774..513170aa3 100644--- a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte+++ b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte@@ -1,20 +1,29 @@<script lang="ts">- import { DropdownMenu as DropdownMenuPrimitive, type WithoutChild } from 'bits-ui';- import Circle from '@lucide/svelte/icons/circle';- import { cn } from '$lib/utils.js';+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";+ import CircleIcon from "@lucide/svelte/icons/circle";+ import { cn, type WithoutChild } from "$lib/utils.js";- let { ref = $bindable(null), class: className, children: childrenProp, ...restProps }: WithoutChild<DropdownMenuPrimitive.RadioItemProps> = $props();+ let {+ ref = $bindable(null),+ class: className,+ children: childrenProp,+ ...restProps+ }: WithoutChild<DropdownMenuPrimitive.RadioItemProps> = $props();</script><DropdownMenuPrimitive.RadioItembind:ref- class={cn('data-highlighted:bg-accent data-highlighted:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50', className)}+ data-slot="dropdown-menu-radio-item"+ class={cn(+ "focus:bg-accent focus:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",+ className+ )}{...restProps}>{#snippet children({ checked })}- <span class="absolute left-2 flex size-3.5 items-center justify-center">+ <span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">{#if checked}- <Circle class="size-2 fill-current" />+ <CircleIcon class="size-2 fill-current" />{/if}</span>{@render childrenProp?.({ checked })}diff --git a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelteindex a61157161..90f1b6f10 100644--- a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte+++ b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte@@ -1,8 +1,17 @@<script lang="ts">- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';- import { cn } from '$lib/utils.js';+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";+ import { cn } from "$lib/utils.js";- let { ref = $bindable(null), class: className, ...restProps }: DropdownMenuPrimitive.SeparatorProps = $props();+ let {+ ref = $bindable(null),+ class: className,+ ...restProps+ }: DropdownMenuPrimitive.SeparatorProps = $props();</script>-<DropdownMenuPrimitive.Separator bind:ref class={cn('bg-muted -mx-1 my-1 h-px', className)} {...restProps} />+<DropdownMenuPrimitive.Separator+ bind:ref+ data-slot="dropdown-menu-separator"+ class={cn("bg-border -mx-1 my-1 h-px", className)}+ {...restProps}+/>diff --git a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelteindex a47a6a837..697494778 100644--- a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte+++ b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte@@ -1,11 +1,20 @@<script lang="ts">- import type { HTMLAttributes } from 'svelte/elements';- import { type WithElementRef } from 'bits-ui';- import { cn } from '$lib/utils.js';+ import type { HTMLAttributes } from "svelte/elements";+ import { cn, type WithElementRef } from "$lib/utils.js";- let { ref = $bindable(null), class: className, children, ...restProps }: WithElementRef<HTMLAttributes<HTMLSpanElement>> = $props();+ let {+ ref = $bindable(null),+ class: className,+ children,+ ...restProps+ }: WithElementRef<HTMLAttributes<HTMLSpanElement>> = $props();</script>-<span bind:this={ref} class={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...restProps}>+<span+ bind:this={ref}+ data-slot="dropdown-menu-shortcut"+ class={cn("text-muted-foreground ml-auto text-xs tracking-widest", className)}+ {...restProps}+>{@render children?.()}</span>diff --git a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelteindex e53b55529..30deb9eb9 100644--- a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte+++ b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte@@ -1,8 +1,20 @@<script lang="ts">- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';- import { cn } from '$lib/utils.js';+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";+ import { cn } from "$lib/utils.js";- let { ref = $bindable(null), class: className, ...restProps }: DropdownMenuPrimitive.SubContentProps = $props();+ let {+ ref = $bindable(null),+ class: className,+ ...restProps+ }: DropdownMenuPrimitive.SubContentProps = $props();</script>-<DropdownMenuPrimitive.SubContent bind:ref class={cn('bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-lg focus:outline-none', className)} {...restProps} />+<DropdownMenuPrimitive.SubContent+ bind:ref+ data-slot="dropdown-menu-sub-content"+ class={cn(+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-dropdown-menu-content-transform-origin) z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg",+ className+ )}+ {...restProps}+/>diff --git a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelteindex df1be36ad..f9b286a29 100644--- a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte+++ b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte@@ -1,7 +1,7 @@<script lang="ts">- import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';- import ChevronRight from '@lucide/svelte/icons/chevron-right';- import { cn } from '$lib/utils.js';+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";+ import ChevronRightIcon from "@lucide/svelte/icons/chevron-right";+ import { cn } from "$lib/utils.js";let {ref = $bindable(null),@@ -16,9 +16,14 @@<DropdownMenuPrimitive.SubTriggerbind:ref- class={cn('data-highlighted:bg-accent data-[state=open]:bg-accent flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', inset && 'pl-8', className)}+ data-slot="dropdown-menu-sub-trigger"+ data-inset={inset}+ class={cn(+ "data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground outline-hidden [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",+ className+ )}{...restProps}>{@render children?.()}- <ChevronRight class="ml-auto" />+ <ChevronRightIcon class="ml-auto size-4" /></DropdownMenuPrimitive.SubTrigger>diff --git a/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.svelte b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.sveltenew file mode 100644index 000000000..cb053444d--- /dev/null+++ b/frontend/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.svelte@@ -0,0 +1,7 @@+<script lang="ts">+ import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";++ let { ref = $bindable(null), ...restProps }: DropdownMenuPrimitive.TriggerProps = $props();+</script>++<DropdownMenuPrimitive.Trigger bind:ref data-slot="dropdown-menu-trigger" {...restProps} />diff --git a/frontend/src/lib/components/ui/dropdown-menu/index.ts b/frontend/src/lib/components/ui/dropdown-menu/index.tsindex 85c8b9dc6..1cf9f701c 100644--- a/frontend/src/lib/components/ui/dropdown-menu/index.ts+++ b/frontend/src/lib/components/ui/dropdown-menu/index.ts@@ -1,20 +1,19 @@-import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';-import CheckboxItem from './dropdown-menu-checkbox-item.svelte';-import Content from './dropdown-menu-content.svelte';-import GroupHeading from './dropdown-menu-group-heading.svelte';-import Item from './dropdown-menu-item.svelte';-import Label from './dropdown-menu-label.svelte';-import RadioItem from './dropdown-menu-radio-item.svelte';-import Separator from './dropdown-menu-separator.svelte';-import Shortcut from './dropdown-menu-shortcut.svelte';-import SubContent from './dropdown-menu-sub-content.svelte';-import SubTrigger from './dropdown-menu-sub-trigger.svelte';-+import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui";+import CheckboxItem from "./dropdown-menu-checkbox-item.svelte";+import Content from "./dropdown-menu-content.svelte";+import Group from "./dropdown-menu-group.svelte";+import Item from "./dropdown-menu-item.svelte";+import Label from "./dropdown-menu-label.svelte";+import RadioGroup from "./dropdown-menu-radio-group.svelte";+import RadioItem from "./dropdown-menu-radio-item.svelte";+import Separator from "./dropdown-menu-separator.svelte";+import Shortcut from "./dropdown-menu-shortcut.svelte";+import Trigger from "./dropdown-menu-trigger.svelte";+import SubContent from "./dropdown-menu-sub-content.svelte";+import SubTrigger from "./dropdown-menu-sub-trigger.svelte";+import GroupHeading from "./dropdown-menu-group-heading.svelte";const Sub = DropdownMenuPrimitive.Sub;const Root = DropdownMenuPrimitive.Root;-const Trigger = DropdownMenuPrimitive.Trigger;-const Group = DropdownMenuPrimitive.Group;-const RadioGroup = DropdownMenuPrimitive.RadioGroup;export {CheckboxItem,@@ -23,7 +22,6 @@ export {CheckboxItem as DropdownMenuCheckboxItem,Content as DropdownMenuContent,Group as DropdownMenuGroup,- GroupHeading as DropdownMenuGroupHeading,Item as DropdownMenuItem,Label as DropdownMenuLabel,RadioGroup as DropdownMenuRadioGroup,@@ -34,6 +32,7 @@ export {SubContent as DropdownMenuSubContent,SubTrigger as DropdownMenuSubTrigger,Trigger as DropdownMenuTrigger,+ GroupHeading as DropdownMenuGroupHeading,Group,GroupHeading,Item,@@ -46,5 +45,5 @@ export {Sub,SubContent,SubTrigger,- Trigger+ Trigger,};