@ariakit/react 0.4.24 → 0.4.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # @ariakit/react
2
2
 
3
+ ## 0.4.26
4
+
5
+ This version focuses on bug fixes across [`Dialog`](https://ariakit.com/reference/dialog), [`Portal`](https://ariakit.com/reference/portal), [`Radio`](https://ariakit.com/reference/radio), [`Combobox`](https://ariakit.com/reference/combobox), and [`MenuButton`](https://ariakit.com/reference/menu-button), along with improvements to how portals behave inside fullscreen elements, how dialogs handle events in popup windows, and how [`Radio`](https://ariakit.com/reference/radio) groups automatically generate unique `name` attributes.
6
+
7
+ ### Fixed events not handled in popup windows
8
+
9
+ [`Dialog`](https://ariakit.com/reference/dialog) and components that extend it, such as [`Menu`](https://ariakit.com/reference/menu) and [`Popover`](https://ariakit.com/reference/popover), now handle events correctly when rendered in a popup window opened via `window.open()`. [`hideOnEscape`](https://ariakit.com/reference/dialog#hideonescape), [`hideOnInteractOutside`](https://ariakit.com/reference/dialog#hideoninteractoutside), and focus restoration now use the content element's `ownerDocument` instead of the main window's `document` for event listeners.
10
+
11
+ ### Fixed `Portal` not rendering inside fullscreen elements
12
+
13
+ [`Portal`](https://ariakit.com/reference/portal) was always appended to `document.body`, which made it invisible when an ancestor element entered fullscreen mode via the Fullscreen API. Portals are now automatically moved to `document.fullscreenElement` when it's active, and back to `document.body` when fullscreen is exited.
14
+
15
+ ### Auto-generated `name` attribute for `Radio`
16
+
17
+ [`Radio`](https://ariakit.com/reference/radio) now automatically uses the [`RadioGroup`](https://ariakit.com/reference/radio-group) store's `id` as the default [`name`](https://ariakit.com/reference/radio#name) attribute when no explicit `name` prop is provided. This ensures consecutive [`RadioGroup`](https://ariakit.com/reference/radio-group) components have unique names, preventing the browser from treating all radio inputs as a single group and fixing Tab navigation and form submission issues.
18
+
19
+ ### Other updates
20
+
21
+ - Fixed [`Combobox`](https://ariakit.com/reference/combobox) pressing Enter from submitting a parent form when the popover is open but has no matching items.
22
+ - Fixed [`Dialog`](https://ariakit.com/reference/dialog) not removing `data-enter` when closed after using the [`render`](https://ariakit.com/reference/dialog#render) prop to wrap the dialog element in an outer element.
23
+ - Fixed [`Dialog`](https://ariakit.com/reference/dialog) not restoring focus to the disclosure element when the dialog was opened and closed quickly in succession.
24
+ - Fixed [`MenuButton`](https://ariakit.com/reference/menu-button) `aria-haspopup` attribute changing from `"menu"` to `"dialog"` when opening a menu that contains a combobox.
25
+ - Fixed [`render`](https://ariakit.com/guide/composition) prop merging when the rendered element passes falsy `className` or event handler values such as `undefined` or `null`.
26
+ - Fixed `Math.random()` being called unconditionally when creating composite stores ([`useTabStore`](https://ariakit.com/reference/use-tab-store), [`useComboboxStore`](https://ariakit.com/reference/use-combobox-store), [`useSelectStore`](https://ariakit.com/reference/use-select-store), etc.), even when an explicit `id` prop was provided. This was causing Next.js build errors with `cacheComponents` enabled.
27
+ - Updated dependencies: `@ariakit/react-core@0.4.26`
28
+
29
+ ## 0.4.25
30
+
31
+ ### Clicking outside no longer restores focus to the disclosure element
32
+
33
+ [`Dialog`](https://ariakit.com/reference/dialog) and components that extend it (such as [`Menu`](https://ariakit.com/reference/menu) and [`Popover`](https://ariakit.com/reference/popover)) no longer restore focus to the disclosure element when the dialog is closed by clicking or right-clicking outside. This aligns with native HTML `<dialog>` and `popover` behavior where trigger buttons don't receive focus when you interact outside.
34
+
35
+ Focus is still restored normally when the dialog is closed by other means, such as pressing Escape, selecting a menu item, or calling `store.hide()` programmatically. In these cases the disclosure element is now focused with default browser scrolling instead of `preventScroll`.
36
+
37
+ ### Improved Safari focus behavior for buttons, checkboxes, and radio buttons
38
+
39
+ On Safari, buttons, checkboxes, and radio buttons don't receive focus on mousedown like other browsers. Previously, this was handled by manually focusing the element in a `mousedown` handler. Now, an explicit `tabIndex` attribute is set on these elements in Safari, which causes the browser to focus them natively. This results in more predictable focus behavior and fewer timing-sensitive workarounds.
40
+
41
+ ### Other updates
42
+
43
+ - Fixed a race condition in [`Dialog`](https://ariakit.org/reference/dialog) where the deferred auto-focus could steal focus from the disclosure element after the dialog was closed.
44
+ - Fixed [`formStore.setError()`](https://ariakit.org/reference/use-form-store#seterror) and [`formStore.setFieldTouched()`](https://ariakit.org/reference/use-form-store#setfieldtouched) failing to set values on nested array field paths such as `items.0.name`.
45
+ - Fixed [`SelectItem`](https://ariakit.com/reference/select-item) store item `children` property reflecting the [`value`](https://ariakit.com/reference/select-item#value) prop instead of the actual rendered text content.
46
+ - Fixed [`MenuButton`](https://ariakit.com/reference/menu-button) to preserve [`accessibleWhenDisabled`](https://ariakit.com/reference/menu-button#accessiblewhendisabled) behavior when composed with a rendered [`Button`](https://ariakit.com/reference/button).
47
+ - Fixed [`Menu`](https://ariakit.org/reference/menu) with [`modal`](https://ariakit.org/reference/menu#modal) and [`getPersistentElements`](https://ariakit.org/reference/menu#getpersistentelements) so focusing a persistent [`MenuButton`](https://ariakit.org/reference/menu-button) doesn't immediately move focus back to the menu.
48
+ - Fixed [`TabPanel`](https://ariakit.com/reference/tab-panel) not re-evaluating tabbable children when the panel becomes visible.
49
+ - Fixed components not dropping their internal `aria-labelledby` when `aria-label` is passed.
50
+ - Updated dependencies: `@ariakit/react-core@0.4.25`
51
+
3
52
  ## 0.4.24
4
53
 
5
54
  This release improves React combobox and form reliability, including preserved combobox input and popover scroll position during result updates, more predictable focus behavior after filtering selects on iOS Safari, proper isolation of [`FormRadio`](https://ariakit.org/reference/form-radio) groups inside nested composite widgets, safer handling of explicitly undefined [`id`](https://ariakit.org/reference/select-item#id) props, and better generic typing for [`CheckboxProvider`](https://ariakit.org/reference/checkbox-provider) wrappers.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariakit/react",
3
- "version": "0.4.24",
3
+ "version": "0.4.26",
4
4
  "description": "Toolkit for building accessible web apps with React",
5
5
  "keywords": [
6
6
  "a11y",
@@ -10,7 +10,7 @@
10
10
  "toolkit",
11
11
  "ui"
12
12
  ],
13
- "homepage": "https://ariakit.org",
13
+ "homepage": "https://ariakit.com",
14
14
  "license": "MIT",
15
15
  "author": {
16
16
  "name": "Diego Haz",
@@ -32,7 +32,7 @@
32
32
  "module": "esm/index.js",
33
33
  "types": "cjs/index.d.ts",
34
34
  "dependencies": {
35
- "@ariakit/react-core": "0.4.24"
35
+ "@ariakit/react-core": "0.4.26"
36
36
  },
37
37
  "devDependencies": {
38
38
  "react": "18.3.1",
@@ -242,7 +242,6 @@
242
242
  "./package.json": "./package.json"
243
243
  },
244
244
  "scripts": {
245
- "lint": "oxlint . && oxfmt --check .",
246
245
  "build": "node ../../scripts/build/build.js",
247
246
  "clean": "node ../../scripts/build/clean.js"
248
247
  }
package/readme.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <p align="center">
4
4
  Toolkit for building accessible web apps with <a href="https://reactjs.org">React</a>.
5
5
  <br>
6
- <a href="https://ariakit.org"><strong>Explore website »</strong></a>
6
+ <a href="https://ariakit.com"><strong>Explore website »</strong></a>
7
7
  </p>
8
8
 
9
9
  <br>
@@ -27,7 +27,7 @@
27
27
  <img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/ariakit/ariakit?style=social">
28
28
  </a>
29
29
  &nbsp;
30
- <a href="https://bsky.app/profile/ariakit.org">
30
+ <a href="https://bsky.app/profile/ariakit.com">
31
31
  <img alt="Follow Ariakit on Bluesky" src="https://img.shields.io/badge/Bluesky-0285FF?logo=bluesky&logoColor=fff">
32
32
  </a>
33
33
  &nbsp;
@@ -1,4 +1,9 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
3
- "include": ["src"]
2
+ "extends": "../../tsconfig.react.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "rootDir": "src"
6
+ },
7
+ "include": ["src"],
8
+ "exclude": []
4
9
  }