Repository: tailwindlabs/headlessui
Pull request #3093 (2024-04-10 23:11:07)

Ensure import actions use the correct paths
This PR is a fix for internal usage while developing Headless UI itself. Until this PR, code actions in your editor for importing paths typically imported the wrong path.

It used absolute paths instead of relative paths. This did fail when building.
```diff
- import foo from 'utils/foo';
+ import foo from '../utils/foo';
```

This should now be fixed.


vercel[bot]: [vc]: #ASC1mzAOl+h4oBKWpbKT1brtQ8qV+cbXCnRHJVvSOa0=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJoZWFkbGVzc3VpLXZ1ZSIsInJvb3REaXJlY3RvcnkiOiJwbGF5Z3JvdW5kcy92dWUiLCJpbnNwZWN0b3JVcmwiOiJodHRwczovL3ZlcmNlbC5jb20vdGFpbHdpbmRsYWJzL2hlYWRsZXNzdWktdnVlLzYydnM0QlZVNEtDbTNyVHo2UmU1TENuVU5YRGIiLCJwcmV2aWV3VXJsIjoiaGVhZGxlc3N1aS12dWUtZ2l0LWZpeC1pbnRlcm5hbC1pbXBvcnQtcGF0aHMtdGFpbHdpbmRsYWJzLnZlcmNlbC5hcHAiLCJuZXh0Q29tbWl0U3RhdHVzIjoiUEVORElORyIsImxpdmVGZWVkYmFjayI6eyJyZXNvbHZlZCI6MCwidW5yZXNvbHZlZCI6MCwidG90YWwiOjAsImxpbmsiOiJoZWFkbGVzc3VpLXZ1ZS1naXQtZml4LWludGVybmFsLWltcG9ydC1wYXRocy10YWlsd2luZGxhYnMudmVyY2VsLmFwcCJ9fV19
**The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more)

| Name | Status | Preview | Comments | Updated (UTC) |
| :--- | :----- | :------ | :------- | :------ |
| **headlessui-vue** | 🔄 Building ([Inspect](https://vercel.com/tailwindlabs/headlessui-vue/62vs4BVU4KCm3rTz6Re5LCnUNXDb)) | [Visit Preview](https://vercel.live/open-feedback/headlessui-vue-git-fix-internal-import-paths-tailwindlabs.vercel.app?via=pr-comment-visit-preview-link&passThrough=1) | 💬 [**Add feedback**](https://vercel.live/open-feedback/headlessui-vue-git-fix-internal-import-paths-tailwindlabs.vercel.app?via=pr-comment-feedback-link) | Apr 10, 2024 11:11pm |


thecrypticace: Can we go ahead and make this change for Vue as well?

Patch:
diff --git a/packages/@headlessui-react/CHANGELOG.md b/packages/@headlessui-react/CHANGELOG.md
index 3d8cebe..6c9ecf2 100644
--- a/packages/@headlessui-react/CHANGELOG.md
+++ b/packages/@headlessui-react/CHANGELOG.md
@@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - Attempt form submission when pressing `Enter` on the `<Listbox.Button />` component ([#2972](https://github.com/tailwindlabs/headlessui/pull/2972))
 - Make the `Combobox` component `nullable` by default ([#3064](https://github.com/tailwindlabs/headlessui/pull/3064))
 - Deprecate the `entered` prop on the `Transition` component ([#3089](https://github.com/tailwindlabs/headlessui/pull/3089))
+- Use native `useId` and `useSyncExternalStore` hooks ([#3092](https://github.com/tailwindlabs/headlessui/pull/3092))
 
 ### Added
 
diff --git a/packages/@headlessui-react/src/components/button/button.tsx b/packages/@headlessui-react/src/components/button/button.tsx
index daf3e9b..ba5cdb9 100644
--- a/packages/@headlessui-react/src/components/button/button.tsx
+++ b/packages/@headlessui-react/src/components/button/button.tsx
@@ -78,4 +78,4 @@ export interface _internal_ComponentButton extends HasDisplayName {
   ): JSX.Element
 }
 
-export let Button = forwardRefWithAs(ButtonFn) as unknown as _internal_ComponentButton
+export let Button = forwardRefWithAs(ButtonFn) as _internal_ComponentButton
diff --git a/packages/@headlessui-react/src/components/checkbox/checkbox.tsx b/packages/@headlessui-react/src/components/checkbox/checkbox.tsx
index 8ee45ba..1c179ec 100644
--- a/packages/@headlessui-react/src/components/checkbox/checkbox.tsx
+++ b/packages/@headlessui-react/src/components/checkbox/checkbox.tsx
@@ -198,4 +198,4 @@ export interface _internal_ComponentCheckbox extends HasDisplayName {
   ): JSX.Element
 }
 
-export let Checkbox = forwardRefWithAs(CheckboxFn) as unknown as _internal_ComponentCheckbox
+export let Checkbox = forwardRefWithAs(CheckboxFn) as _internal_ComponentCheckbox
diff --git a/packages/@headlessui-react/src/components/combobox/combobox.tsx b/packages/@headlessui-react/src/components/combobox/combobox.tsx
index 0556083..900ec34 100644
--- a/packages/@headlessui-react/src/components/combobox/combobox.tsx
+++ b/packages/@headlessui-react/src/components/combobox/combobox.tsx
@@ -814,7 +814,7 @@ function ComboboxFn<TValue, TTag extends ElementType = typeof DEFAULT_COMBOBOX_T
           copy.splice(idx, 1)
         }
 
-        return theirOnChange?.(copy as unknown as TValue[])
+        return theirOnChange?.(copy as TValue[])
       },
     })
   })
@@ -970,7 +970,7 @@ function InputFn<
   // yourself using the selected option(s).
   let currentDisplayValue = useMemo(() => {
     if (typeof displayValue === 'function' && data.value !== undefined) {
-      return displayValue(data.value as unknown as TType) ?? ''
+      return displayValue(data.value as TType) ?? ''
     } else if (typeof data.value === 'string') {
       return data.value
     } else {
@@ -1319,9 +1319,7 @@ function InputFn<
       'aria-autocomplete': 'list',
       defaultValue:
         props.defaultValue ??
-        (data.defaultValue !== undefined
-          ? displayValue?.(data.defaultValue as unknown as TType)
-          : null) ??
+        (data.defaultValue !== undefined ? displayValue?.(data.defaultValue as TType) : null) ??
         data.defaultValue,
       disabled: disabled || undefined,
       autoFocus,
@@ -1869,19 +1867,13 @@ export interface _internal_ComponentComboboxOption extends HasDisplayName {
   ): JSX.Element
 }
 
-let ComboboxRoot = forwardRefWithAs(ComboboxFn) as unknown as _internal_ComponentCombobox
-export let ComboboxButton = forwardRefWithAs(
-  ButtonFn
-) as unknown as _internal_ComponentComboboxButton
-export let ComboboxInput = forwardRefWithAs(InputFn) as unknown as _internal_ComponentComboboxInput
+let ComboboxRoot = forwardRefWithAs(ComboboxFn) as _internal_ComponentCombobox
+export let ComboboxButton = forwardRefWithAs(ButtonFn) as _internal_ComponentComboboxButton
+export let ComboboxInput = forwardRefWithAs(InputFn) as _internal_ComponentComboboxInput
 /** @deprecated use `<Label>` instead of `<ComboboxLabel>` */
 export let ComboboxLabel = Label as _internal_ComponentComboboxLabel
-export let ComboboxOptions = forwardRefWithAs(
-  OptionsFn
-) as unknown as _internal_ComponentComboboxOptions
-export let ComboboxOption = forwardRefWithAs(
-  OptionFn
-) as unknown as _internal_ComponentComboboxOption
+export let ComboboxOptions = forwardRefWithAs(OptionsFn) as _internal_ComponentComboboxOptions
+export let ComboboxOption = forwardRefWithAs(OptionFn) as _internal_ComponentComboboxOption
 
 export let Combobox = Object.assign(ComboboxRoot, {
   Input: ComboboxInput,
diff --git a/packages/@headlessui-react/src/components/data-interactive/data-interactive.tsx b/packages/@headlessui-react/src/components/data-interactive/data-interactive.tsx
index d80fcb7..9f5b7de 100644
--- a/packages/@headlessui-react/src/components/data-interactive/data-interactive.tsx
+++ b/packages/@headlessui-react/src/components/data-interactive/data-interactive.tsx
@@ -64,4 +64,4 @@ export interface _internal_ComponentDataInteractive extends HasDisplayName {
 
 export let DataInteractive = forwardRefWithAs(
   DataInteractiveFn
-) as unknown as _internal_ComponentDataInteractive
+) as _internal_ComponentDataInteractive
diff --git a/packages/@headlessui-react/src/components/description/description.tsx b/packages/@headlessui-react/src/components/description/description.tsx
index 455dd2a..9b8c711 100644
--- a/packages/@headlessui-react/src/components/description/description.tsx
+++ b/packages/@headlessui-react/src/components/description/description.tsx
@@ -137,7 +137,7 @@ export interface _internal_ComponentDescription extends HasDisplayName {
   ): JSX.Element
 }
 
-let DescriptionRoot = forwardRefWithAs(DescriptionFn) as unknown as _internal_ComponentDescription
+let DescriptionRoot = forwardRefWithAs(DescriptionFn) as _internal_ComponentDescription
 
 export let Description = Object.assign(DescriptionRoot, {
   //
diff --git a/packages/@headlessui-react/src/components/dialog/dialog.tsx b/packages/@headlessui-react/src/components/dialog/dialog.tsx
index 79685de..93a5118 100644
--- a/packages/@headlessui-react/src/components/dialog/dialog.tsx
+++ b/packages/@headlessui-react/src/components/dialog/dialog.tsx
@@ -667,15 +667,11 @@ export interface _internal_ComponentDialogTitle extends HasDisplayName {
 
 export interface _internal_ComponentDialogDescription extends _internal_ComponentDescription {}
 
-let DialogRoot = forwardRefWithAs(DialogFn) as unknown as _internal_ComponentDialog
-export let DialogBackdrop = forwardRefWithAs(
-  BackdropFn
-) as unknown as _internal_ComponentDialogBackdrop
-export let DialogPanel = forwardRefWithAs(PanelFn) as unknown as _internal_ComponentDialogPanel
-export let DialogOverlay = forwardRefWithAs(
-  OverlayFn
-) as unknown as _internal_ComponentDialogOverlay
-export let DialogTitle = forwardRefWithAs(TitleFn) as unknown as _internal_ComponentDialogTitle
+let DialogRoot = forwardRefWithAs(DialogFn) as _internal_ComponentDialog
+export let DialogBackdrop = forwardRefWithAs(BackdropFn) as _internal_ComponentDialogBackdrop
+export let DialogPanel = forwardRefWithAs(PanelFn) as _internal_ComponentDialogPanel
+export let DialogOverlay = forwardRefWithAs(OverlayFn) as _internal_ComponentDialogOverlay
+export let DialogTitle = forwardRefWithAs(TitleFn) as _internal_ComponentDialogTitle
 /** @deprecated use `<Description>` instead of `<DialogDescription>` */
 export let DialogDescription = Description as _internal_ComponentDialogDescription
 
diff --git a/packages/@headlessui-react/src/components/disclosure/disclosure.tsx b/packages/@headlessui-react/src/components/disclosure/disclosure.tsx
index 4c6d01d..775a594 100644
--- a/packages/@headlessui-react/src/components/disclosure/disclosure.tsx
+++ b/packages/@headlessui-react/src/components/disclosure/disclosure.tsx
@@ -180,7 +180,7 @@ function DisclosureFn<TTag extends ElementType = typeof DEFAULT_DISCLOSURE_TAG>(
     ref,
     optionalRef(
       (ref) => {
-        internalDisclosureRef.current = ref as unknown as HTMLElement | null
+        internalDisclosureRef.current = ref as HTMLElement | null
       },
       props.as === undefined ||
         // @ts-expect-error The `as` prop _can_ be a Fragment
@@ -506,13 +506,9 @@ export interface _internal_ComponentDisclosurePanel extends HasDisplayName {
   ): JSX.Element
 }
 
-let DisclosureRoot = forwardRefWithAs(DisclosureFn) as unknown as _internal_ComponentDisclosure
-export let DisclosureButton = forwardRefWithAs(
-  ButtonFn
-) as unknown as _internal_ComponentDisclosureButton
-export let DisclosurePanel = forwardRefWithAs(
-  PanelFn
-) as unknown as _internal_ComponentDisclosurePanel
+let DisclosureRoot = forwardRefWithAs(DisclosureFn) as _internal_ComponentDisclosure
+export let DisclosureButton = forwardRefWithAs(ButtonFn) as _internal_ComponentDisclosureButton
+export let DisclosurePanel = forwardRefWithAs(PanelFn) as _internal_ComponentDisclosurePanel
 
 export let Disclosure = Object.assign(DisclosureRoot, {
   Button: DisclosureButton,
diff --git a/packages/@headlessui-react/src/components/field/field.tsx b/packages/@headlessui-react/src/components/field/field.tsx
index 5225433..a4d6812 100644
--- a/packages/@headlessui-react/src/components/field/field.tsx
+++ b/packages/@headlessui-react/src/components/field/field.tsx
@@ -76,4 +76,4 @@ export interface _internal_ComponentField extends HasDisplayName {
   <TTag extends ElementType = typeof DEFAULT_FIELD_TAG>(props: FieldProps<TTag>): JSX.Element
 }
 
-export let Field = forwardRefWithAs(FieldFn) as unknown as _internal_ComponentField
+export let Field = forwardRefWithAs(FieldFn) as _internal_ComponentField
diff --git a/packages/@headlessui-react/src/components/fieldset/fieldset.tsx b/packages/@headlessui-react/src/components/fieldset/fieldset.tsx
index 5e39642..81f3972 100644
--- a/packages/@headlessui-react/src/components/fieldset/fieldset.tsx
+++ b/packages/@headlessui-react/src/components/fieldset/fieldset.tsx
@@ -58,4 +58,4 @@ export interface _internal_ComponentFieldset extends HasDisplayName {
   <TTag extends ElementType = typeof DEFAULT_FIELDSET_TAG>(props: FieldsetProps<TTag>): JSX.Element
 }
 
-export let Fieldset = forwardRefWithAs(FieldsetFn) as unknown as _internal_ComponentFieldset
+export let Fieldset = forwardRefWithAs(FieldsetFn) as _internal_ComponentFieldset
diff --git a/packages/@headlessui-react/src/components/focus-trap/focus-trap.tsx b/packages/@headlessui-react/src/components/focus-trap/focus-trap.tsx
index a793444..fe80987 100644
--- a/packages/@headlessui-react/src/components/focus-trap/focus-trap.tsx
+++ b/packages/@headlessui-react/src/components/focus-trap/focus-trap.tsx
@@ -230,7 +230,7 @@ export interface _internal_ComponentFocusTrap extends HasDisplayName {
   ): JSX.Element
 }
 
-let FocusTrapRoot = forwardRefWithAs(FocusTrapFn) as unknown as _internal_ComponentFocusTrap
+let FocusTrapRoot = forwardRefWithAs(FocusTrapFn) as _internal_ComponentFocusTrap
 
 export let FocusTrap = Object.assign(FocusTrapRoot, {
   features: FocusTrapFeatures,
diff --git a/packages/@headlessui-react/src/components/input/input.tsx b/packages/@headlessui-react/src/components/input/input.tsx
index 2eac0d9..c17409f 100644
--- a/packages/@headlessui-react/src/components/input/input.tsx
+++ b/packages/@headlessui-react/src/components/input/input.tsx
@@ -93,4 +93,4 @@ export interface _internal_ComponentInput extends HasDisplayName {
   ): JSX.Element
 }
 
-export let Input = forwardRefWithAs(InputFn) as unknown as _internal_ComponentInput
+export let Input = forwardRefWithAs(InputFn) as _internal_ComponentInput
diff --git a/packages/@headlessui-react/src/components/label/label.tsx b/packages/@headlessui-react/src/components/label/label.tsx
index 50bc4dd..d65ae03 100644
--- a/packages/@headlessui-react/src/components/label/label.tsx
+++ b/packages/@headlessui-react/src/components/label/label.tsx
@@ -220,7 +220,7 @@ export interface _internal_ComponentLabel extends HasDisplayName {
   ): JSX.Element
 }
 
-let LabelRoot = forwardRefWithAs(LabelFn) as unknown as _internal_ComponentLabel
+let LabelRoot = forwardRefWithAs(LabelFn) as _internal_ComponentLabel
 
 export let Label = Object.assign(LabelRoot, {
   //
diff --git a/packages/@headlessui-react/src/components/legend/legend.tsx b/packages/@headlessui-react/src/components/legend/legend.tsx
index da50f1a..12c27c7 100644
--- a/packages/@headlessui-react/src/components/legend/legend.tsx
+++ b/packages/@headlessui-react/src/components/legend/legend.tsx
@@ -31,4 +31,4 @@ export interface _internal_ComponentLegend extends HasDisplayName {
   <TTag extends ElementType = typeof DEFAULT_LEGEND_TAG>(props: LegendProps<TTag>): JSX.Element
 }
 
-export let Legend = forwardRefWithAs(LegendFn) as unknown as _internal_ComponentLegend
+export let Legend = forwardRefWithAs(LegendFn) as _internal_ComponentLegend
diff --git a/packages/@headlessui-react/src/components/listbox/listbox.tsx b/packages/@headlessui-react/src/components/listbox/listbox.tsx
index cb2b6e1..177eace 100644
--- a/packages/@headlessui-react/src/components/listbox/listbox.tsx
+++ b/packages/@headlessui-react/src/components/listbox/listbox.tsx
@@ -510,9 +510,7 @@ function ListboxFn<
     (compareValue) =>
       match(data.mode, {
         [ValueMode.Multi]: () => {
-          return (value as unknown as EnsureArray<TType>).some((option) =>
-            compare(option, compareValue)
-          )
+          return (value as EnsureArray<TType>).some((option) => compare(option, compareValue))
         },
         [ValueMode.Single]: () => {
           return compare(value as TActualType, compareValue)
@@ -1362,17 +1360,15 @@ export interface _internal_ComponentListboxSelectedOption extends HasDisplayName
   ): JSX.Element
 }
 
-let ListboxRoot = forwardRefWithAs(ListboxFn) as unknown as _internal_ComponentListbox
-export let ListboxButton = forwardRefWithAs(ButtonFn) as unknown as _internal_ComponentListboxButton
+let ListboxRoot = forwardRefWithAs(ListboxFn) as _internal_ComponentListbox
+export let ListboxButton = forwardRefWithAs(ButtonFn) as _internal_ComponentListboxButton
 /** @deprecated use `<Label>` instead of `<ListboxLabel>` */
 export let ListboxLabel = Label as _internal_ComponentListboxLabel
-export let ListboxOptions = forwardRefWithAs(
-  OptionsFn
-) as unknown as _internal_ComponentListboxOptions
-export let ListboxOption = forwardRefWithAs(OptionFn) as unknown as _internal_ComponentListboxOption
+export let ListboxOptions = forwardRefWithAs(OptionsFn) as _internal_ComponentListboxOptions
+export let ListboxOption = forwardRefWithAs(OptionFn) as _internal_ComponentListboxOption
 export let ListboxSelectedOption = forwardRefWithAs(
   SelectedFn
-) as unknown as _internal_ComponentListboxSelectedOption
+) as _internal_ComponentListboxSelectedOption
 
 export let Listbox = Object.assign(ListboxRoot, {
   Button: ListboxButton,
diff --git a/packages/@headlessui-react/src/components/menu/menu.tsx b/packages/@headlessui-react/src/components/menu/menu.tsx
index 46c2953..451daf5 100644
--- a/packages/@headlessui-react/src/components/menu/menu.tsx
+++ b/packages/@headlessui-react/src/components/menu/menu.tsx
@@ -1087,15 +1087,13 @@ export interface _internal_ComponentMenuSeparator extends HasDisplayName {
   ): JSX.Element
 }
 
-let MenuRoot = forwardRefWithAs(MenuFn) as unknown as _internal_ComponentMenu
-export let MenuButton = forwardRefWithAs(ButtonFn) as unknown as _internal_ComponentMenuButton
-export let MenuItems = forwardRefWithAs(ItemsFn) as unknown as _internal_ComponentMenuItems
-export let MenuItem = forwardRefWithAs(ItemFn) as unknown as _internal_ComponentMenuItem
-export let MenuSection = forwardRefWithAs(SectionFn) as unknown as _internal_ComponentMenuSection
-export let MenuHeading = forwardRefWithAs(HeadingFn) as unknown as _internal_ComponentMenuHeading
-export let MenuSeparator = forwardRefWithAs(
-  SeparatorFn
-) as unknown as _internal_ComponentMenuSeparator
+let MenuRoot = forwardRefWithAs(MenuFn) as _internal_ComponentMenu
+export let MenuButton = forwardRefWithAs(ButtonFn) as _internal_ComponentMenuButton
+export let MenuItems = forwardRefWithAs(ItemsFn) as _internal_ComponentMenuItems
+export let MenuItem = forwardRefWithAs(ItemFn) as _internal_ComponentMenuItem
+export let MenuSection = forwardRefWithAs(SectionFn) as _internal_ComponentMenuSection
+export let MenuHeading = forwardRefWithAs(HeadingFn) as _internal_ComponentMenuHeading
+export let MenuSeparator = forwardRefWithAs(SeparatorFn) as _internal_ComponentMenuSeparator
 
 export let Menu = Object.assign(MenuRoot, {
   Button: MenuButton,
diff --git a/packages/@headlessui-react/src/components/popover/popover.tsx b/packages/@headlessui-react/src/components/popover/popover.tsx
index 3c67bf5..8ac30ef 100644
--- a/packages/@headlessui-react/src/components/popover/popover.tsx
+++ b/packages/@headlessui-react/src/components/popover/popover.tsx
@@ -1194,13 +1194,11 @@ export interface _internal_ComponentPopoverGroup extends HasDisplayName {
   ): JSX.Element
 }
 
-let PopoverRoot = forwardRefWithAs(PopoverFn) as unknown as _internal_ComponentPopover
-export let PopoverButton = forwardRefWithAs(ButtonFn) as unknown as _internal_ComponentPopoverButton
-export let PopoverOverlay = forwardRefWithAs(
-  OverlayFn
-) as unknown as _internal_ComponentPopoverOverlay
-export let PopoverPanel = forwardRefWithAs(PanelFn) as unknown as _internal_ComponentPopoverPanel
-export let PopoverGroup = forwardRefWithAs(GroupFn) as unknown as _internal_ComponentPopoverGroup
+let PopoverRoot = forwardRefWithAs(PopoverFn) as _internal_ComponentPopover
+export let PopoverButton = forwardRefWithAs(ButtonFn) as _internal_ComponentPopoverButton
+export let PopoverOverlay = forwardRefWithAs(OverlayFn) as _internal_ComponentPopoverOverlay
+export let PopoverPanel = forwardRefWithAs(PanelFn) as _internal_ComponentPopoverPanel
+export let PopoverGroup = forwardRefWithAs(GroupFn) as _internal_ComponentPopoverGroup
 
 export let Popover = Object.assign(PopoverRoot, {
   Button: PopoverButton,
diff --git a/packages/@headlessui-react/src/components/portal/portal.tsx b/packages/@headlessui-react/src/components/portal/portal.tsx
index 0d09ff2..adc38e8 100644
--- a/packages/@headlessui-react/src/components/portal/portal.tsx
+++ b/packages/@headlessui-react/src/components/portal/portal.tsx
@@ -237,6 +237,6 @@ export interface _internal_ComponentPortalGroup extends HasDisplayName {
 }
 
 let PortalRoot = forwardRefWithAs(PortalFn) as unknown as _internal_ComponentPortal
-export let PortalGroup = forwardRefWithAs(GroupFn) as unknown as _internal_ComponentPortalGroup
+export let PortalGroup = forwardRefWithAs(GroupFn) as _internal_ComponentPortalGroup
 
 export let Portal = Object.assign(PortalRoot, { Group: PortalGroup })
diff --git a/packages/@headlessui-react/src/components/radio-group/radio-group.tsx b/packages/@headlessui-react/src/components/radio-group/radio-group.tsx
index c3c46ce..93fce6f 100644
--- a/packages/@headlessui-react/src/components/radio-group/radio-group.tsx
+++ b/packages/@headlessui-react/src/components/radio-group/radio-group.tsx
@@ -182,7 +182,7 @@ function RadioGroupFn<TTag extends ElementType = typeof DEFAULT_RADIO_GROUP_TAG,
 
   let compare = useByComparator(by)
   let [state, dispatch] = useReducer(stateReducer, { options: [] } as StateDefinition<TType>)
-  let options = state.options as unknown as Option<TType>[]
+  let options = state.options as Option<TType>[]
   let [labelledby, LabelProvider] = useLabels()
   let [describedby, DescriptionProvider] = useDescriptions()
   let internalRadioGroupRef = useRef<HTMLElement | null>(null)
@@ -586,11 +586,9 @@ export interface _internal_ComponentRadio extends HasDisplayName {
 export interface _internal_ComponentRadioLabel extends _internal_ComponentLabel {}
 export interface _internal_ComponentRadioDescription extends _internal_ComponentDescription {}
 
-let RadioGroupRoot = forwardRefWithAs(RadioGroupFn) as unknown as _internal_ComponentRadioGroup
-export let RadioGroupOption = forwardRefWithAs(
-  OptionFn
-) as unknown as _internal_ComponentRadioOption
-export let Radio = forwardRefWithAs(RadioFn) as unknown as _internal_ComponentRadio
+let RadioGroupRoot = forwardRefWithAs(RadioGroupFn) as _internal_ComponentRadioGroup
+export let RadioGroupOption = forwardRefWithAs(OptionFn) as _internal_ComponentRadioOption
+export let Radio = forwardRefWithAs(RadioFn) as _internal_ComponentRadio
 /** @deprecated use `<Label>` instead of `<RadioGroupLabel>` */
 export let RadioGroupLabel = Label as _internal_ComponentRadioLabel
 /** @deprecated use `<Description>` instead of `<RadioGroupDescription>` */
diff --git a/packages/@headlessui-react/src/components/select/select.tsx b/packages/@headlessui-react/src/components/select/select.tsx
index c3823b3..9115794 100644
--- a/packages/@headlessui-react/src/components/select/select.tsx
+++ b/packages/@headlessui-react/src/components/select/select.tsx
@@ -104,4 +104,4 @@ export interface _internal_ComponentSelect extends HasDisplayName {
   ): JSX.Element
 }
 
-export let Select = forwardRefWithAs(SelectFn) as unknown as _internal_ComponentSelect
+export let Select = forwardRefWithAs(SelectFn) as _internal_ComponentSelect
diff --git a/packages/@headlessui-react/src/components/switch/switch.tsx b/packages/@headlessui-react/src/components/switch/switch.tsx
index 78bf9a3..56b6c7b 100644
--- a/packages/@headlessui-react/src/components/switch/switch.tsx
+++ b/packages/@headlessui-react/src/components/switch/switch.tsx
@@ -267,8 +267,8 @@ export interface _internal_ComponentSwitchGroup extends HasDisplayName {
 export interface _internal_ComponentSwitchLabel extends _internal_ComponentLabel {}
 export interface _internal_ComponentSwitchDescription extends _internal_ComponentDescription {}
 
-let SwitchRoot = forwardRefWithAs(SwitchFn) as unknown as _internal_ComponentSwitch
-export let SwitchGroup = GroupFn as unknown as _internal_ComponentSwitchGroup
+let SwitchRoot = forwardRefWithAs(SwitchFn) as _internal_ComponentSwitch
+export let SwitchGroup = GroupFn as _internal_ComponentSwitchGroup
 /** @deprecated use `<Label>` instead of `<SwitchLabel>` */
 export let SwitchLabel = Label as _internal_ComponentSwitchLabel
 /** @deprecated use `<Description>` instead of `<SwitchDescription>` */
diff --git a/packages/@headlessui-react/src/components/tabs/tabs.tsx b/packages/@headlessui-react/src/components/tabs/tabs.tsx
index e98e813..3b01592 100644
--- a/packages/@headlessui-react/src/components/tabs/tabs.tsx
+++ b/packages/@headlessui-react/src/components/tabs/tabs.tsx
@@ -696,11 +696,11 @@ export interface _internal_ComponentTabPanel extends HasDisplayName {
   ): JSX.Element
 }
 
-let TabRoot = forwardRefWithAs(TabFn) as unknown as _internal_ComponentTab
-export let TabGroup = forwardRefWithAs(GroupFn) as unknown as _internal_ComponentTabGroup
-export let TabList = forwardRefWithAs(ListFn) as unknown as _internal_ComponentTabList
-export let TabPanels = forwardRefWithAs(PanelsFn) as unknown as _internal_ComponentTabPanels
-export let TabPanel = forwardRefWithAs(PanelFn) as unknown as _internal_ComponentTabPanel
+let TabRoot = forwardRefWithAs(TabFn) as _internal_ComponentTab
+export let TabGroup = forwardRefWithAs(GroupFn) as _internal_ComponentTabGroup
+export let TabList = forwardRefWithAs(ListFn) as _internal_ComponentTabList
+export let TabPanels = forwardRefWithAs(PanelsFn) as _internal_ComponentTabPanels
+export let TabPanel = forwardRefWithAs(PanelFn) as _internal_ComponentTabPanel
 
 export let Tab = Object.assign(TabRoot, {
   Group: TabGroup,
diff --git a/packages/@headlessui-react/src/components/textarea/textarea.tsx b/packages/@headlessui-react/src/components/textarea/textarea.tsx
index f1fcf9d..67cd363 100644
--- a/packages/@headlessui-react/src/components/textarea/textarea.tsx
+++ b/packages/@headlessui-react/src/components/textarea/textarea.tsx
@@ -93,4 +93,4 @@ export interface _internal_ComponentTextarea extends HasDisplayName {
   ): JSX.Element
 }
 
-export let Textarea = forwardRefWithAs(TextareaFn) as unknown as _internal_ComponentTextarea
+export let Textarea = forwardRefWithAs(TextareaFn) as _internal_ComponentTextarea
diff --git a/packages/@headlessui-react/src/components/tooltip/tooltip.tsx b/packages/@headlessui-react/src/components/tooltip/tooltip.tsx
index efbe7c8..d277955 100644
--- a/packages/@headlessui-react/src/components/tooltip/tooltip.tsx
+++ b/packages/@headlessui-react/src/components/tooltip/tooltip.tsx
@@ -494,6 +494,6 @@ export interface _internal_ComponentPanel extends HasDisplayName {
   ): JSX.Element
 }
 
-export let Tooltip = forwardRefWithAs(TooltipFn) as unknown as _internal_ComponentTooltip
-export let TooltipTrigger = forwardRefWithAs(TriggerFn) as unknown as _internal_ComponentTrigger
-export let TooltipPanel = forwardRefWithAs(PanelFn) as unknown as _internal_ComponentPanel
+export let Tooltip = forwardRefWithAs(TooltipFn) as _internal_ComponentTooltip
+export let TooltipTrigger = forwardRefWithAs(TriggerFn) as _internal_ComponentTrigger
+export let TooltipPanel = forwardRefWithAs(PanelFn) as _internal_ComponentPanel
diff --git a/packages/@headlessui-react/src/components/transition/transition.tsx b/packages/@headlessui-react/src/components/transition/transition.tsx
index d2c5b04..de66b8a 100644
--- a/packages/@headlessui-react/src/components/transition/transition.tsx
+++ b/packages/@headlessui-react/src/components/transition/transition.tsx
@@ -621,15 +621,11 @@ export interface _internal_ComponentTransitionChild extends HasDisplayName {
   ): JSX.Element
 }
 
-let TransitionRoot = forwardRefWithAs(
-  TransitionRootFn
-) as unknown as _internal_ComponentTransitionRoot
+let TransitionRoot = forwardRefWithAs(TransitionRootFn) as _internal_ComponentTransitionRoot
 let InternalTransitionChild = forwardRefWithAs(
   TransitionChildFn
-) as unknown as _internal_ComponentTransitionChild
-export let TransitionChild = forwardRefWithAs(
-  ChildFn
-) as unknown as _internal_ComponentTransitionChild
+) as _internal_ComponentTransitionChild
+export let TransitionChild = forwardRefWithAs(ChildFn) as _internal_ComponentTransitionChild
 
 export let Transition = Object.assign(TransitionRoot, {
   Child: TransitionChild,
diff --git a/packages/@headlessui-react/src/hooks/use-by-comparator.ts b/packages/@headlessui-react/src/hooks/use-by-comparator.ts
index f1f7800..953393e 100644
--- a/packages/@headlessui-react/src/hooks/use-by-comparator.ts
+++ b/packages/@headlessui-react/src/hooks/use-by-comparator.ts
@@ -23,7 +23,7 @@ export function useByComparator<T>(by: ByComparator<T> = defaultBy) {
   return useCallback(
     (a: T, z: T) => {
       if (typeof by === 'string') {
-        let property = by as unknown as keyof T
+        let property = by as keyof T
         return a?.[property] === z?.[property]
       }
 
diff --git a/packages/@headlessui-react/src/hooks/use-id.ts b/packages/@headlessui-react/src/hooks/use-id.ts
index 8b18bf7..1003f0b 100644
--- a/packages/@headlessui-react/src/hooks/use-id.ts
+++ b/packages/@headlessui-react/src/hooks/use-id.ts
@@ -1,24 +1,2 @@
-import React from 'react'
-import { env } from '../utils/env'
-import { useIsoMorphicEffect } from './use-iso-morphic-effect'
-import { useServerHandoffComplete } from './use-server-handoff-complete'
-
-// We used a "simple" approach first which worked for SSR and rehydration on the client. However we
-// didn't take care of the Suspense case. To fix this we used the approach the @reach-ui/auto-id
-// uses.
-//
-// Credits: https://github.com/reach/reach-ui/blob/develop/packages/auto-id/src/index.tsx
-
-export let useId =
-  // Prefer React's `useId` if it's available.
-  React.useId ??
-  function useId() {
-    let ready = useServerHandoffComplete()
-    let [id, setId] = React.useState(ready ? () => env.nextId() : null)
-
-    useIsoMorphicEffect(() => {
-      if (id === null) setId(env.nextId())
-    }, [id])
-
-    return id != null ? '' + id : undefined
-  }
+// Re-exporting the useId hook such that we can easily mock this hook in tests.
+export { useId } from 'react'
diff --git a/packages/@headlessui-react/src/hooks/use-store.ts b/packages/@headlessui-react/src/hooks/use-store.ts
index 25f14ef..f625d91 100644
--- a/packages/@headlessui-react/src/hooks/use-store.ts
+++ b/packages/@headlessui-react/src/hooks/use-store.ts
@@ -1,4 +1,4 @@
-import { useSyncExternalStore } from '../use-sync-external-store-shim/index'
+import { useSyncExternalStore } from 'react'
 import type { Store } from '../utils/store'
 
 export function useStore<T>(store: Store<T, any>) {
diff --git a/packages/@headlessui-react/src/hooks/use-watch.ts b/packages/@headlessui-react/src/hooks/use-watch.ts
index ccdc167..f167b25 100644
--- a/packages/@headlessui-react/src/hooks/use-watch.ts
+++ b/packages/@headlessui-react/src/hooks/use-watch.ts
@@ -5,11 +5,11 @@ export function useWatch<T extends any[]>(
   cb: (newValues: [...T], oldValues: [...T]) => void | (() => void),
   dependencies: [...T]
 ) {
-  let track = useRef<typeof dependencies>([] as unknown as [...T])
+  let track = useRef([] as unknown as typeof dependencies)
   let action = useEvent(cb)
 
   useEffect(() => {
-    let oldValues = [...track.current] as unknown as [...T]
+    let oldValues = [...track.current] as [...T]
 
     for (let [idx, value] of dependencies.entries()) {
       if (track.current[idx] !== value) {
diff --git a/packages/@headlessui-react/src/internal/hidden.tsx b/packages/@headlessui-react/src/internal/hidden.tsx
index 6cf4ee5..65589c3 100644
--- a/packages/@headlessui-react/src/internal/hidden.tsx
+++ b/packages/@headlessui-react/src/internal/hidden.tsx
@@ -70,4 +70,4 @@ interface ComponentHidden extends HasDisplayName {
   ): JSX.Element
 }
 
-export let Hidden = forwardRefWithAs(VisuallyHidden) as unknown as ComponentHidden
+export let Hidden = forwardRefWithAs(VisuallyHidden) as ComponentHidden
diff --git a/packages/@headlessui-react/src/internal/modal.tsx b/packages/@headlessui-react/src/internal/modal.tsx
index 75cbdbd..0d3570b 100644
--- a/packages/@headlessui-react/src/internal/modal.tsx
+++ b/packages/@headlessui-react/src/internal/modal.tsx
@@ -213,6 +213,6 @@ export interface _internal_ComponentModal extends HasDisplayName {
   ): JSX.Element
 }
 
-let ModalRoot = forwardRefWithAs(ModalFn) as unknown as _internal_ComponentModal
+let ModalRoot = forwardRefWithAs(ModalFn) as _internal_ComponentModal
 
 export let Modal = Object.assign(ModalRoot, {})
diff --git a/packages/@headlessui-react/src/use-sync-external-store-shim/index.ts b/packages/@headlessui-react/src/use-sync-external-store-shim/index.ts
deleted file mode 100644
index 28a6609..0000000
--- a/packages/@headlessui-react/src/use-sync-external-store-shim/index.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-// This was taken from the ESM / CJS compatible version found in Remix Router:
-// https://github.com/remix-run/react-router/tree/43cc1aacd8b132507618a4a1dd7de3674cd7bcf4/packages/react-router/lib/use-sync-external-store-shim
-
-/**
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- * @flow
- */
-
-import * as React from 'react'
-import { useSyncExternalStore as client } from './useSyncExternalStoreShimClient'
-import { useSyncExternalStore as server } from './useSyncExternalStoreShimServer'
-
-const canUseDOM: boolean = !!(
-  typeof window !== 'undefined' &&
-  typeof window.document !== 'undefined' &&
-  typeof window.document.createElement !== 'undefined'
-)
-
-const isServerEnvironment = !canUseDOM
-const shim = isServerEnvironment ? server : client
-
-type UseSyncExternalStoreFn = <T>(
-  subscribe: (fn: () => void) => () => void,
-  getSnapshot: () => T,
-  // Note: The shim does not use getServerSnapshot, because pre-18 versions of
-  // React do not expose a way to check if we're hydrating. So users of the shim
-  // will need to track that themselves and return the correct value
-  // from `getSnapshot`.
-  getServerSnapshot?: () => T
-) => T
-
-// @ts-ignore
-export const useSyncExternalStore: UseSyncExternalStoreFn =
-  'useSyncExternalStore' in React ? ((r) => r.useSyncExternalStore)(React) : shim
diff --git a/packages/@headlessui-react/src/use-sync-external-store-shim/useSyncExternalStoreShimClient.ts b/packages/@headlessui-react/src/use-sync-external-store-shim/useSyncExternalStoreShimClient.ts
deleted file mode 100644
index 2ebb849..0000000
--- a/packages/@headlessui-react/src/use-sync-external-store-shim/useSyncExternalStoreShimClient.ts
+++ /dev/null
@@ -1,154 +0,0 @@
-// @ts-nocheck
-
-/**
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-import * as React from 'react'
-
-// Make typescript happy
-declare var __DEV__: boolean
-
-/**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
-function isPolyfill(x: any, y: any) {
-  return (
-    (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare
-  )
-}
-
-const is: (x: any, y: any) => boolean = typeof Object.is === 'function' ? Object.is : isPolyfill
-
-// Intentionally not using named imports because Rollup uses dynamic
-// dispatch for CommonJS interop named imports.
-const { useState, useEffect, useLayoutEffect, useDebugValue } = React
-
-let didWarnOld18Alpha = false
-let didWarnUncachedGetSnapshot = false
-
-// Disclaimer: This shim breaks many of the rules of React, and only works
-// because of a very particular set of implementation details and assumptions
-// -- change any one of them and it will break. The most important assumption
-// is that updates are always synchronous, because concurrent rendering is
-// only available in versions of React that also have a built-in
-// useSyncExternalStore API. And we only use this shim when the built-in API
-// does not exist.
-//
-// Do not assume that the clever hacks used by this hook also work in general.
-// The point of this shim is to replace the need for hacks by other libraries.
-export function useSyncExternalStore<T>(
-  subscribe: (fn: () => void) => () => void,
-  getSnapshot: () => T,
-  // Note: The shim does not use getServerSnapshot, because pre-18 versions of
-  // React do not expose a way to check if we're hydrating. So users of the shim
-  // will need to track that themselves and return the correct value
-  // from `getSnapshot`.
-  getServerSnapshot?: () => T
-): T {
-  if (__DEV__) {
-    if (!didWarnOld18Alpha) {
-      if ('startTransition' in React) {
-        didWarnOld18Alpha = true
-        console.error(
-          'You are using an outdated, pre-release alpha of React 18 that ' +
-            'does not support useSyncExternalStore. The ' +
-            'use-sync-external-store shim will not work correctly. Upgrade ' +
-            'to a newer pre-release.'
-        )
-      }
-    }
-  }
-
-  // Read the current snapshot from the store on every render. Again, this
-  // breaks the rules of React, and only works here because of specific
-  // implementation details, most importantly that updates are
-  // always synchronous.
-  const value = getSnapshot()
-  if (__DEV__) {
-    if (!didWarnUncachedGetSnapshot) {
-      const cachedValue = getSnapshot()
-      if (!is(value, cachedValue)) {
-        console.error('The result of getSnapshot should be cached to avoid an infinite loop')
-        didWarnUncachedGetSnapshot = true
-      }
-    }
-  }
-
-  // Because updates are synchronous, we don't queue them. Instead we force a
-  // re-render whenever the subscribed state changes by updating an some
-  // arbitrary useState hook. Then, during render, we call getSnapshot to read
-  // the current value.
-  //
-  // Because we don't actually use the state returned by the useState hook, we
-  // can save a bit of memory by storing other stuff in that slot.
-  //
-  // To implement the early bailout, we need to track some things on a mutable
-  // object. Usually, we would put that in a useRef hook, but we can stash it in
-  // our useState hook instead.
-  //
-  // To force a re-render, we call forceUpdate({inst}). That works because the
-  // new object always fails an equality check.
-  const [{ inst }, forceUpdate] = useState({ inst: { value, getSnapshot } })
-
-  // Track the latest getSnapshot function with a ref. This needs to be updated
-  // in the layout phase so we can access it during the tearing check that
-  // happens on subscribe.
-  useLayoutEffect(() => {
-    inst.value = value
-    inst.getSnapshot = getSnapshot
-
-    // Whenever getSnapshot or subscribe changes, we need to check in the
-    // commit phase if there was an interleaved mutation. In concurrent mode
-    // this can happen all the time, but even in synchronous mode, an earlier
-    // effect may have mutated the store.
-    if (checkIfSnapshotChanged(inst)) {
-      // Force a re-render.
-      forceUpdate({ inst })
-    }
-    // eslint-disable-next-line react-hooks/exhaustive-deps
-  }, [subscribe, value, getSnapshot])
-
-  useEffect(() => {
-    // Check for changes right before subscribing. Subsequent changes will be
-    // detected in the subscription handler.
-    if (checkIfSnapshotChanged(inst)) {
-      // Force a re-render.
-      forceUpdate({ inst })
-    }
-    const handleStoreChange = () => {
-      // TODO: Because there is no cross-renderer API for batching updates, it's
-      // up to the consumer of this library to wrap their subscription event
-      // with unstable_batchedUpdates. Should we try to detect when this isn't
-      // the case and print a warning in development?
-
-      // The store changed. Check if the snapshot changed since the last time we
-      // read from the store.
-      if (checkIfSnapshotChanged(inst)) {
-        // Force a re-render.
-        forceUpdate({ inst })
-      }
-    }
-    // Subscribe to the store and return a clean-up function.
-    return subscribe(handleStoreChange)
-    // eslint-disable-next-line react-hooks/exhaustive-deps
-  }, [subscribe])
-
-  useDebugValue(value)
-  return value
-}
-
-function checkIfSnapshotChanged(inst: any) {
-  const latestGetSnapshot = inst.getSnapshot
-  const prevValue = inst.value
-  try {
-    const nextValue = latestGetSnapshot()
-    return !is(prevValue, nextValue)
-  } catch (error) {
-    return true
-  }
-}
diff --git a/packages/@headlessui-react/src/use-sync-external-store-shim/useSyncExternalStoreShimServer.ts b/packages/@headlessui-react/src/use-sync-external-store-shim/useSyncExternalStoreShimServer.ts
deleted file mode 100644
index 2d550da..0000000
--- a/packages/@headlessui-react/src/use-sync-external-store-shim/useSyncExternalStoreShimServer.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-// @ts-nocheck
-
-/**
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- * @flow
- */
-
-export function useSyncExternalStore<T>(
-  subscribe: (fn: () => void) => () => void,
-  getSnapshot: () => T,
-  getServerSnapshot?: () => T
-): T {
-  // Note: The shim does not use getServerSnapshot, because pre-18 versions of
-  // React do not expose a way to check if we're hydrating. So users of the shim
-  // will need to track that themselves and return the correct value
-  // from `getSnapshot`.
-  return getSnapshot()
-}
diff --git a/packages/@headlessui-react/src/utils/focus-management.ts b/packages/@headlessui-react/src/utils/focus-management.ts
index 150ce03..7567d65 100644
--- a/packages/@headlessui-react/src/utils/focus-management.ts
+++ b/packages/@headlessui-react/src/utils/focus-management.ts
@@ -198,7 +198,7 @@ function isSelectableElement(
 
 export function sortByDomNode<T>(
   nodes: T[],
-  resolveKey: (item: T) => HTMLElement | null = (i) => i as unknown as HTMLElement | null
+  resolveKey: (item: T) => HTMLElement | null = (i) => i as HTMLElement | null
 ): T[] {
   return nodes.slice().sort((aItem, zItem) => {
     let a = resolveKey(aItem)
diff --git a/packages/@headlessui-react/src/utils/render.ts b/packages/@headlessui-react/src/utils/render.ts
index 85357b8..f3eda31 100644
--- a/packages/@headlessui-react/src/utils/render.ts
+++ b/packages/@headlessui-react/src/utils/render.ts
@@ -427,7 +427,7 @@ export function mergeProps<T extends Props<any, any>[]>(...listOfProps: T) {
 export function forwardRefWithAs<T extends { name: string; displayName?: string }>(
   component: T
 ): T & { displayName: string } {
-  return Object.assign(forwardRef(component as unknown as any) as any, {
+  return Object.assign(forwardRef(component as any) as any, {
     displayName: component.displayName ?? component.name,
   })
 }
diff --git a/packages/@headlessui-react/tsconfig.json b/packages/@headlessui-react/tsconfig.json
index 3ad746e..7664841 100644
--- a/packages/@headlessui-react/tsconfig.json
+++ b/packages/@headlessui-react/tsconfig.json
@@ -6,7 +6,6 @@
     "importHelpers": true,
     "declaration": true,
     "sourceMap": true,
-    "rootDir": "./src",
     "strict": true,
     "noUnusedLocals": true,
     "noUnusedParameters": true,
@@ -14,11 +13,6 @@
     "noFallthroughCasesInSwitch": true,
     "downlevelIteration": true,
     "moduleResolution": "node",
-    "baseUrl": "./",
-    "paths": {
-      "@headlessui/react": ["src"],
-      "*": ["src/*", "node_modules/*"]
-    },
     "jsx": "react",
     "esModuleInterop": true,
     "target": "ESNext",
diff --git a/packages/@headlessui-vue/tsconfig.json b/packages/@headlessui-vue/tsconfig.json
index ecee5b7..8df2643 100644
--- a/packages/@headlessui-vue/tsconfig.json
+++ b/packages/@headlessui-vue/tsconfig.json
@@ -6,7 +6,6 @@
     "importHelpers": true,
     "declaration": true,
     "sourceMap": true,
-    "rootDir": "./src",
     "strict": true,
     "noUnusedLocals": true,
     "noUnusedParameters": true,
@@ -14,11 +13,6 @@
     "noFallthroughCasesInSwitch": true,
     "downlevelIteration": true,
     "moduleResolution": "node",
-    "baseUrl": "./",
-    "paths": {
-      "@headlessui/vue": ["src"],
-      "*": ["src/*", "node_modules/*"]
-    },
     "esModuleInterop": true,
     "target": "ESNext",
     "allowJs": true,


Test patch:
diff --git a/packages/@headlessui-react/src/components/combobox/combobox.test.tsx b/packages/@headlessui-react/src/components/combobox/combobox.test.tsx
index 15a6447..76d4dfc 100644
--- a/packages/@headlessui-react/src/components/combobox/combobox.test.tsx
+++ b/packages/@headlessui-react/src/components/combobox/combobox.test.tsx
@@ -2015,7 +2015,7 @@ describe.each([{ virtual: true }, { virtual: false }])(
               options,
               disabled: isDisabled,
             }}
-            value={'test' as unknown as T}
+            value={'test' as T}
             onChange={NOOP}
             {...comboboxProps}
           >
@@ -4456,7 +4456,7 @@ describe.each([{ virtual: true }, { virtual: false }])('Mouse interactions %s',
       return typeof option === 'string'
         ? false
         : typeof option === 'object' && option !== null && 'disabled' in option
-          ? (option?.disabled as unknown as boolean | undefined) ?? false
+          ? (option?.disabled as boolean | undefined) ?? false
           : false
     }
     if (virtual) {
@@ -4466,7 +4466,7 @@ describe.each([{ virtual: true }, { virtual: false }])('Mouse interactions %s',
             options,
             disabled: isDisabled,
           }}
-          value={'test' as unknown as T}
+          value={'test' as T}
           onChange={NOOP}
           {...comboboxProps}
         >
diff --git a/packages/@headlessui-react/src/components/popover/popover.test.tsx b/packages/@headlessui-react/src/components/popover/popover.test.tsx
index 126902f..6fff12f 100644
--- a/packages/@headlessui-react/src/components/popover/popover.test.tsx
+++ b/packages/@headlessui-react/src/components/popover/popover.test.tsx
@@ -18,7 +18,7 @@ import { Portal } from '../portal/portal'
 import { Transition } from '../transition/transition'
 import { Popover } from './popover'
 
-let act = _act as unknown as <T>(fn: () => T) => PromiseLike<T>
+let act = _act as <T>(fn: () => T) => PromiseLike<T>
 
 jest.mock('../../hooks/use-id')
 
diff --git a/packages/@headlessui-react/src/components/transition/transition.test.tsx b/packages/@headlessui-react/src/components/transition/transition.test.tsx
index f40f34d..ac4adfa 100644
--- a/packages/@headlessui-react/src/components/transition/transition.test.tsx
+++ b/packages/@headlessui-react/src/components/transition/transition.test.tsx
@@ -7,7 +7,7 @@ import { createSnapshot } from '../../test-utils/snapshot'
 import { suppressConsoleLogs } from '../../test-utils/suppress-console-logs'
 import { Transition } from './transition'
 
-let act = _act as unknown as <T>(fn: () => T) => PromiseLike<T>
+let act = _act as <T>(fn: () => T) => PromiseLike<T>
 
 function nextFrame() {
   return new Promise<void>((resolve) => {