Skip to content
Open
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
1 change: 1 addition & 0 deletions app/components/Package/SkillsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ function getWarningTooltip(skill: SkillListItem): string | undefined {
aria-hidden="true"
:text="getWarningTooltip(skill)"
to="#skills-modal"
defer
>
<span class="i-lucide:circle-alert w-3.5 h-3.5 text-amber-500" />
</TooltipApp>
Expand Down
3 changes: 3 additions & 0 deletions app/components/Tooltip/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const props = defineProps<{
interactive?: boolean
/** Teleport target for the tooltip content (defaults to 'body') */
to?: string | HTMLElement
/** Whether to defer teleport rendering until after the component is mounted */
defer?: boolean
/** Offset distance in pixels (default: 4) */
offset?: number
}>()
Expand Down Expand Up @@ -52,6 +54,7 @@ const tooltipAttrs = computed(() => {
:position
:interactive
:to
:defer
:offset
:tooltip-attr="tooltipAttrs"
@mouseenter="show"
Expand Down
4 changes: 3 additions & 1 deletion app/components/Tooltip/Base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const props = withDefaults(
tooltipAttr?: HTMLAttributes
/** Teleport target for the tooltip content (defaults to 'body') */
to?: string | HTMLElement
/** Whether to defer teleport rendering until after the component is mounted */
defer?: boolean
/** Offset distance in pixels (default: 4) */
offset?: number
/** Strategy for the tooltip - prefer fixed for sticky containers (defaults to 'absolute') */
Expand Down Expand Up @@ -46,7 +48,7 @@ const { floatingStyles } = useFloating(triggerRef, tooltipRef, {
<div ref="triggerRef" class="inline-flex">
<slot />

<Teleport :to="props.to">
<Teleport :to="props.to" :defer>
<Transition
enter-active-class="transition-opacity duration-150 motion-reduce:transition-none"
leave-active-class="transition-opacity duration-100 motion-reduce:transition-none"
Expand Down
Loading