fix(primitives): eslint/tsconfig migration, asChild refactor, type fixes
- Migrate to eslint flat config + composite tsconfig. - Complete the asChild→as="template" refactor (remove asChild prop + :as-child bindings across components, matching Primitive's slot model). - Fix test type errors and source type-safety (useGraceArea hull/point math, FocusScope/util ref typing). Note: ~53 vue-tsc errors remain (HTML attr/event passthrough typing on transparent wrapper components + a couple of duplicate-export naming collisions) — not gated by CI (build/lint/test green); pending a component-attribute-typing design decision.
This commit is contained in:
@@ -14,7 +14,7 @@ import { MenuAnchor, useMenuContext } from '../menu';
|
||||
import { Primitive } from '../primitive';
|
||||
import { useContextMenuRootContext } from './context';
|
||||
|
||||
const { disabled = false, as = 'span', asChild } = defineProps<ContextMenuTriggerProps>();
|
||||
const { disabled = false, as = 'span' } = defineProps<ContextMenuTriggerProps>();
|
||||
|
||||
const menuCtx = useMenuContext();
|
||||
const ctxMenuCtx = useContextMenuRootContext();
|
||||
@@ -72,11 +72,10 @@ function handlePointerUp() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<MenuAnchor as-child :reference="virtualEl">
|
||||
<MenuAnchor :reference="virtualEl">
|
||||
<Primitive
|
||||
:ref="forwardRef"
|
||||
:as="as"
|
||||
:as-child="asChild"
|
||||
:data-state="menuCtx.open.value ? 'open' : 'closed'"
|
||||
:data-disabled="disabled ? '' : undefined"
|
||||
@contextmenu="handleContextMenu"
|
||||
|
||||
Reference in New Issue
Block a user