@ariakit/react 0.4.12 → 0.4.14

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +42 -1
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # @ariakit/react
2
2
 
3
+ ## 0.4.14
4
+
5
+ ### Improved performance on composite widgets
6
+
7
+ Composite item components such as [`ComboboxItem`](https://ariakit.org/reference/combobox-item) and [`SelectItem`](https://ariakit.org/reference/select-item) now render 20-30% faster compared to Ariakit v0.4.13.
8
+
9
+ This enhancement should decrease the time needed to render large collections of items in composite widgets and improve the Interaction to Next Paint (INP) metric. We're working on further optimizations to make composite widgets even faster in future releases.
10
+
11
+ ### Combobox auto-scroll
12
+
13
+ The [`Combobox`](https://ariakit.org/reference/combobox) component now scrolls the list to the top while typing when the [`autoSelect`](https://ariakit.org/reference/combobox#autoselect) prop is disabled.
14
+
15
+ The behavior is now consistent with the [`autoSelect`](https://ariakit.org/reference/combobox#autoselect) prop, except the first item won't be automatically focused.
16
+
17
+ ### Other updates
18
+
19
+ - Fixed the [`item`](https://ariakit.org/reference/use-collection-store#item) method to prevent it from returning items that have been removed from the collection store.
20
+ - Fixed the [`item`](https://ariakit.org/reference/use-menu-store#item) method when keeping different menu stores in sync.
21
+ - Added [`id`](https://ariakit.org/reference/use-composite-store#id) prop to composite stores.
22
+ - Fixed composite typeahead functionality when rendering virtualized lists.
23
+ - Fixed [`SelectValue`](https://ariakit.org/reference/select-value) to display the [`fallback`](https://ariakit.org/reference/select-value#fallback) when the value is an empty array or string.
24
+ - Fixed an issue where composite widgets might not navigate to the correct item when pressing <kbd>↑</kbd> while the composite base element was focused.
25
+ - Improved JSDocs.
26
+ - Updated dependencies: `@ariakit/react-core@0.4.14`
27
+
28
+ ## 0.4.13
29
+
30
+ ### Accessible composite widgets with invalid `activeId`
31
+
32
+ We've improved the logic for composite widgets such as [Tabs](https://ariakit.org/components/tab) and [Toolbar](https://ariakit.org/components/toolbar) when the [`activeId`](https://ariakit.org/reference/composite-provider#activeid) state points to an element that is disabled or missing from the DOM. This can happen if an item is dynamically removed, disabled, or lazily rendered, potentially making the composite widget inaccessible to keyboard users.
33
+
34
+ Now, when the [`activeId`](https://ariakit.org/reference/composite-provider#activeid) state is invalid, all composite items will remain tabbable, enabling users to <kbd>Tab</kbd> into the composite widget. Once a composite item receives focus or the element referenced by the [`activeId`](https://ariakit.org/reference/composite-provider#activeid) state becomes available, the roving tabindex behavior is restored.
35
+
36
+ ### Other updates
37
+
38
+ - Fixed regression in [`focusShift`](https://ariakit.org/reference/composite-provider#focusshift).
39
+ - Fixed [Radio](https://ariakit.org/components/radio) to prevent `onChange` from triggering on radios that are already checked.
40
+ - Fixed [`DisclosureContent`](https://ariakit.org/reference/disclosure-content) setting an incorrect `animating` state value during enter animations.
41
+ - Improved JSDocs.
42
+ - Updated dependencies: `@ariakit/react-core@0.4.13`
43
+
3
44
  ## 0.4.12
4
45
 
5
46
  ### Tab panels with scroll restoration
@@ -37,7 +78,7 @@ A new [`--dialog-viewport-height`](https://ariakit.org/guide/styling#--dialog-vi
37
78
 
38
79
  ### Overriding composite state for specific methods
39
80
 
40
- The [`next`](https://ariakit.org/reference/use-composite-store#next), [`previous`](https://ariakit.org/reference/use-composite-store#previous), [`up`](https://ariakit.org/reference/use-composite-store#up), and [`down`](https://ariakit.org/reference/use-composite-store#down) methods of the [composite store](https://ariakit.org/reference/use-composite-store) now accept an object as the first argument to override the composite state for that specific method. For example, you can pass a different [`activeId`](https://ariakit.org/reference/use-composite-store#activeId) value to the [`next`](https://ariakit.org/reference/use-composite-store#next) method so it returns the next item based on that value rather than the current active item in the composite store:
81
+ The [`next`](https://ariakit.org/reference/use-composite-store#next), [`previous`](https://ariakit.org/reference/use-composite-store#previous), [`up`](https://ariakit.org/reference/use-composite-store#up), and [`down`](https://ariakit.org/reference/use-composite-store#down) methods of the [composite store](https://ariakit.org/reference/use-composite-store) now accept an object as the first argument to override the composite state for that specific method. For example, you can pass a different [`activeId`](https://ariakit.org/reference/use-composite-store#activeid) value to the [`next`](https://ariakit.org/reference/use-composite-store#next) method so it returns the next item based on that value rather than the current active item in the composite store:
41
82
 
42
83
  ```js
43
84
  const store = useCompositeStore({ defaultActiveId: "item1" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariakit/react",
3
- "version": "0.4.12",
3
+ "version": "0.4.14",
4
4
  "description": "Toolkit for building accessible web apps with React",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",
@@ -37,7 +37,7 @@
37
37
  "components"
38
38
  ],
39
39
  "dependencies": {
40
- "@ariakit/react-core": "0.4.12"
40
+ "@ariakit/react-core": "0.4.14"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0",