Skip to content

Commit

Permalink
Add hidden attribute to internal <Hidden /> component when the `F…
Browse files Browse the repository at this point in the history
…eatures.Hidden` feature is used (#2955)

* add `hidden` attribute for `<Hidden features={Features.Hidden}>`

* update changelog
  • Loading branch information
RobinMalfait committed Jan 31, 2024
1 parent ce17c6d commit edbcb81
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/@headlessui-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Prevent default behaviour when clicking outside of a `Dialog.Panel` ([#2919](https://github.com/tailwindlabs/headlessui/pull/2919))
- Use `isFocused` instead of `isFocusVisible` for `Input` and `Textarea` components ([#2940](https://github.com/tailwindlabs/headlessui/pull/2940))
- Ensure `children` prop of `Field` component can be a render prop ([#2941](https://github.com/tailwindlabs/headlessui/pull/2941))
- Add `hidden` attribute to internal `<Hidden />` component when the `Features.Hidden` feature is used ([#2955](https://github.com/tailwindlabs/headlessui/pull/2955))

## [2.0.0-alpha.4] - 2024-01-03

Expand Down
1 change: 1 addition & 0 deletions packages/@headlessui-react/src/internal/hidden.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function VisuallyHidden<TTag extends ElementType = typeof DEFAULT_VISUALLY_HIDDE
(features & HiddenFeatures.Focusable) === HiddenFeatures.Focusable
? true
: theirProps['aria-hidden'] ?? undefined,
hidden: (features & HiddenFeatures.Hidden) === HiddenFeatures.Hidden ? true : undefined,
style: {
position: 'fixed',
top: 1,
Expand Down
1 change: 1 addition & 0 deletions packages/@headlessui-vue/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Expose `disabled` state on `<Tab />` component ([#2918](https://github.com/tailwindlabs/headlessui/pull/2918))
- Prevent default behaviour when clicking outside of a `DialogPanel` ([#2919](https://github.com/tailwindlabs/headlessui/pull/2919))
- Don’t override explicit `disabled` prop for components inside `<MenuItem>` ([#2929](https://github.com/tailwindlabs/headlessui/pull/2929))
- Add `hidden` attribute to internal `<Hidden />` component when the `Features.Hidden` feature is used ([#2955](https://github.com/tailwindlabs/headlessui/pull/2955))

## [1.7.17] - 2024-01-08

Expand Down
1 change: 1 addition & 0 deletions packages/@headlessui-vue/src/internal/hidden.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export let Hidden = defineComponent({
? true
: // @ts-ignore
theirProps['aria-hidden'] ?? undefined,
hidden: (features & Features.Hidden) === Features.Hidden ? true : undefined,
style: {
position: 'fixed',
top: 1,
Expand Down

0 comments on commit edbcb81

Please sign in to comment.