design: improve menus

This commit is contained in:
James Xylight committed 2025-08-21 17:04:25 -07:00
1 parent bfe93cf762
commit 930bb93282
14 files changed
+177 -192

No files matched your search

+2 -2
View File
@@ -58,8 +58,8 @@
let {
elevation = 'flat',
padding = 'md',
rounding = 'lg',
color = 'default',
rounding = 'xl',
color = 'uniform',
element = 'div',
class: clazz = '',
children,
+2 -4
View File
@@ -49,12 +49,10 @@
>
{#snippet popover()}
<div
class="w-full max-w-[280px] origin-top-left
max-h-128 overflow-auto list-none shadow-lg rounded-2xl"
class="w-full max-w-sm origin-top-left max-h-128 overflow-auto list-none shadow-lg rounded-2xl"
>
<div
class="flex flex-col py-2 list-none bg-white/80 dark:bg-zinc-900/90 px-2 gap-px
rounded-2xl
class="flex flex-col px-0 list-none bg-white/80 dark:bg-zinc-900/90 gap-px rounded-2xl
border border-slate-300 dark:border-zinc-800 border-opacity-50"
>
{@render children?.(open)}
+3 -2
View File
@@ -37,9 +37,10 @@
<Button
{...rest}
{color}
size="custom"
rounding="none"
class={[
'w-full px-2 rounded-lg min-h-8 font-normal duration-100',
'w-full px-4 py-2 min-h-7 font-normal duration-100',
disabled && 'opacity-70 pointer-events-none cursor-not-allowed',
color == 'tertiary' && 'dark:hover:bg-zinc-800/70',
clazz,
@@ -53,7 +54,7 @@
<div
class={[
'contents shrink-0',
color == 'tertiary' && 'text-slate-600 dark:text-zinc-400',
color == 'tertiary' && 'text-slate-500 dark:text-zinc-500',
]}
>
{#if icon}
+1 -1
View File
@@ -9,7 +9,7 @@
</script>
<div
class="text-slate-800 dark:text-zinc-200 text-xs font-medium py-2 px-2 flex items-center gap-1"
class="text-slate-800 dark:text-zinc-200 text-xs font-medium m-4 mb-1 flex items-center gap-1"
>
<div>{@render children?.()}</div>
<hr
+6 -1
View File
@@ -134,7 +134,12 @@
{#if open}
<Portal class="z-150">
<div
transition:scale={{ duration: 300, start: 0.97, easing: expoOut }}
transition:scale={{
duration: 175,
start: 0.95,
opacity: 0,
easing: expoOut,
}}
class="z-150 {popoverClass}"
use:customFloatingContent
use:focusTrap