Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/design-system/src/components/OcDrop/OcDrop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<Teleport :disabled="!teleport" :to="teleport ? teleport : undefined">
<div
v-if="isOpen"
v-bind="attrs"
:id="dropId"
ref="drop"
class="oc-drop shadow-sm/10 rounded-xl bg-role-surface border border-role-surface-container-highest"
Expand Down Expand Up @@ -156,6 +157,12 @@ const {
const emit = defineEmits<Emits>()
defineSlots<Slots>()

// Suppress Vue's auto-inheritance — OcDrop's root is a fragment
// (oc-mobile-drop OR Transition+Teleport). Without this, every parent
// pass-through (class, role, ...) flushes a console.warn per render.
// `attrs.class` is forwarded manually to the inner div below.
defineOptions({ inheritAttrs: false })

const attrs = useAttrs()
const { registerEventListener, unregisterEventListeners } = useEventListeners()
const { isMobile } = useIsMobile()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`SpaceHeader > should add the "squashed"-class when the sidebar is opene
return svg;
}" aria-hidden="true" focusable="false" class="size-5"></svg></span>
</button>
<transition-stub name="oc-drop" appear="false" persisted="false" css="true" options="[object Object]">
<transition-stub name="oc-drop" appear="false" persisted="false" css="true">
<!--teleport start-->
<!--v-if-->
<!--teleport end-->
Expand Down Expand Up @@ -61,7 +61,7 @@ exports[`SpaceHeader > space description > should show the description 1`] = `
return svg;
}" aria-hidden="true" focusable="false" class="size-5"></svg></span>
</button>
<transition-stub name="oc-drop" appear="false" persisted="false" css="true" options="[object Object]">
<transition-stub name="oc-drop" appear="false" persisted="false" css="true">
<!--teleport start-->
<!--v-if-->
<!--teleport end-->
Expand Down Expand Up @@ -106,7 +106,7 @@ exports[`SpaceHeader > space image > should show the set image 1`] = `
return svg;
}" aria-hidden="true" focusable="false" class="size-5"></svg></span>
</button>
<transition-stub name="oc-drop" appear="false" persisted="false" css="true" options="[object Object]">
<transition-stub name="oc-drop" appear="false" persisted="false" css="true">
<!--teleport start-->
<!--v-if-->
<!--teleport end-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ exports[`ContextActionMenu component > renders the menu with drop menu items 1`]
return svg;
}" aria-hidden="true" focusable="false" class="size-4"></svg></span>
</button>
<transition-stub name="oc-drop" appear="false" persisted="false" css="true" class="w-3xs oc-files-context-action-drop">
<transition-stub name="oc-drop" appear="false" persisted="false" css="true">
<!--teleport start-->
<!--teleport end-->
</transition-stub>
Expand Down Expand Up @@ -63,7 +63,7 @@ exports[`ContextActionMenu component > renders the menu with drop menu items 1`]
return svg;
}" aria-hidden="true" focusable="false" class="size-4"></svg></span>
</button>
<transition-stub name="oc-drop" appear="false" persisted="false" css="true" class="w-3xs oc-files-context-action-drop">
<transition-stub name="oc-drop" appear="false" persisted="false" css="true">
<!--teleport start-->
<!--teleport end-->
</transition-stub>
Expand All @@ -88,7 +88,7 @@ exports[`ContextActionMenu component > renders the menu with drop menu items 1`]
return svg;
}" aria-hidden="true" focusable="false" class="size-4"></svg></span>
</button>
<transition-stub name="oc-drop" appear="false" persisted="false" css="true" class="w-3xs oc-files-context-action-drop">
<transition-stub name="oc-drop" appear="false" persisted="false" css="true">
<!--teleport start-->
<!--teleport end-->
</transition-stub>
Expand Down