Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default tags for ListboxOptions, ListboxOption, ComboboxOptions, ComboboxOption and TabGroup components #3109

Merged
merged 4 commits into from
Apr 18, 2024
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
1 change: 1 addition & 0 deletions packages/@headlessui-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- 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))
- Use `absolute` as the default Floating UI strategy ([#3097](https://github.com/tailwindlabs/headlessui/pull/3097))
- Change default tags for `ListboxOptions`, `ListboxOption`, `ComboboxOptions`, `ComboboxOption` and `TabGroup` components ([#3109](https://github.com/tailwindlabs/headlessui/pull/3109))

### Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ function ButtonFn<TTag extends ElementType = typeof DEFAULT_BUTTON_TAG>(

// ---

let DEFAULT_OPTIONS_TAG = 'ul' as const
let DEFAULT_OPTIONS_TAG = 'div' as const
type OptionsRenderPropArg = {
open: boolean
option: unknown
Expand Down Expand Up @@ -1630,7 +1630,7 @@ function OptionsFn<TTag extends ElementType = typeof DEFAULT_OPTIONS_TAG>(

// ---

let DEFAULT_OPTION_TAG = 'li' as const
let DEFAULT_OPTION_TAG = 'div' as const
type OptionRenderPropArg = {
focus: boolean
/** @deprecated use `focus` instead */
Expand Down
4 changes: 2 additions & 2 deletions packages/@headlessui-react/src/components/listbox/listbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ function ButtonFn<TTag extends ElementType = typeof DEFAULT_BUTTON_TAG>(

let SelectedOptionContext = createContext(false)

let DEFAULT_OPTIONS_TAG = 'ul' as const
let DEFAULT_OPTIONS_TAG = 'div' as const
type OptionsRenderPropArg = {
open: boolean
}
Expand Down Expand Up @@ -1100,7 +1100,7 @@ function OptionsFn<TTag extends ElementType = typeof DEFAULT_OPTIONS_TAG>(

// ---

let DEFAULT_OPTION_TAG = 'li' as const
let DEFAULT_OPTION_TAG = 'div' as const
type OptionRenderPropArg = {
/** @deprecated use `focus` instead */
active: boolean
Expand Down
3 changes: 1 addition & 2 deletions packages/@headlessui-react/src/components/tabs/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import { useFocusRing } from '@react-aria/focus'
import { useHover } from '@react-aria/interactions'
import React, {
Fragment,
createContext,
useContext,
useMemo,
Expand Down Expand Up @@ -220,7 +219,7 @@ function stateReducer(state: StateDefinition, action: Actions) {

// ---

let DEFAULT_TABS_TAG = Fragment
let DEFAULT_TABS_TAG = 'div' as const
type TabsRenderPropArg = {
selectedIndex: number
}
Expand Down
Loading