Skip to content

A self-hosted media server and file management system

fix: rounding on popover and context menu items are not consistent

aminnausinff526daec45f
diff --git a/resources/js/components/cedar-ui/context-menu/ContextMenu.vue b/resources/js/components/cedar-ui/context-menu/ContextMenu.vue
index 25dcee13..5aa99b58 100644
--- a/resources/js/components/cedar-ui/context-menu/ContextMenu.vue
+++ b/resources/js/components/cedar-ui/context-menu/ContextMenu.vue
@@ -135,7 +135,7 @@ defineExpose({ contextMenuToggle, contextMenuOpen });
:class="
cn(
'absolute z-50 w-48 max-w-[100vw]',
- 'rounded-md border p-1 shadow-xs backdrop-blur-xs',
+ 'rounded-lg border p-1 shadow-xs backdrop-blur-xs',
'bg-overlay-2-t border-overlay-border/10 pointer-events-auto',
'origin-top-left text-xs transition-[opacity,scale]',
style,
diff --git a/resources/js/components/cedar-ui/context-menu/ContextMenuItem.vue b/resources/js/components/cedar-ui/context-menu/ContextMenuItem.vue
index 27ee1dac..b8af33c2 100644
--- a/resources/js/components/cedar-ui/context-menu/ContextMenuItem.vue
+++ b/resources/js/components/cedar-ui/context-menu/ContextMenuItem.vue
@@ -33,7 +33,13 @@ useMutationObserver(subMenu, () => (isFloating.value = subMenu.value?.dataset.fl
<div v-else class="relative" :class="{ 'group/submenu': hasChildren }">
<ButtonBase
v-bind="wrapperProps"
- :class="cn({ [selectedStyle]: selected }, 'hocus:bg-overlay-accent h-7 w-full justify-start rounded-sm px-2 py-1.5 select-none focus:outline-none', style)"
+ :class="
+ cn(
+ { [selectedStyle]: selected },
+ 'hocus:bg-overlay-accent h-7 w-full justify-start rounded-md px-2 py-1.5 ring ring-transparent select-none ring-inset focus:outline-none dark:focus-within:ring-white dark:focus-visible:bg-neutral-950/90',
+ style,
+ )
+ "
:disabled="disabled"
@click="
(e: MouseEvent) => {
diff --git a/resources/js/components/cedar-ui/popover/BasePopover.vue b/resources/js/components/cedar-ui/popover/BasePopover.vue
index 74610bb2..28de9652 100644
--- a/resources/js/components/cedar-ui/popover/BasePopover.vue
+++ b/resources/js/components/cedar-ui/popover/BasePopover.vue
@@ -158,7 +158,7 @@ defineExpose({ handleClose });
ref="popover"
:style="popoverStyles"
:options="{ allowOutsideClick: true, preventScroll: true }"
- :class="cn('absolute z-50 w-75 max-w-lg', 'p-3', 'ring-r-button bg-overlay-2-t ring-1', 'rounded-md shadow backdrop-blur-xs', popoverClass)"
+ :class="cn('absolute z-50 w-75 max-w-lg', 'p-3', 'ring-r-button bg-overlay-2-t ring-1', 'rounded-lg shadow backdrop-blur-xs', popoverClass)"
@keydown.esc="popoverOpen = false"
>
<div