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:
@@ -21,7 +21,6 @@ const {
|
||||
disabled = false,
|
||||
textValue: textValueProp,
|
||||
as = 'div',
|
||||
asChild,
|
||||
} = defineProps<MenuItemImplProps>();
|
||||
|
||||
const emit = defineEmits<MenuItemImplEmits>();
|
||||
@@ -71,11 +70,10 @@ function handleKeyDown(event: KeyboardEvent) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RovingFocusItem as-child :focusable="!disabled" :active="isHighlighted">
|
||||
<RovingFocusItem :focusable="!disabled" :active="isHighlighted">
|
||||
<Primitive
|
||||
:ref="(el: unknown) => { itemRef = el as HTMLElement | null }"
|
||||
:as="as"
|
||||
:as-child="asChild"
|
||||
role="menuitem"
|
||||
data-primitives-menu-item=""
|
||||
:data-primitive-menu-item-text-value="textValue"
|
||||
|
||||
Reference in New Issue
Block a user