@ariakit/react 0.4.3 → 0.4.4
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 +42 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,47 @@
|
|
1
1
|
# @ariakit/react
|
2
2
|
|
3
|
+
## 0.4.4
|
4
|
+
|
5
|
+
### Combobox `autoFocusOnHide` behavior
|
6
|
+
|
7
|
+
Previously, the [`autoFocusOnHide`](https://ariakit.org/reference/combobox-popover#autofocusonhide) feature on [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover) was turned off by default. Most of the time, this didn't have any practical impact because the combobox input element was already focused when the popover was hidden.
|
8
|
+
|
9
|
+
Now, this feature is enabled by default and should work consistently even when [`virtualFocus`](https://ariakit.org/reference/combobox-provider#virtualfocus) is set to `false`.
|
10
|
+
|
11
|
+
### Better SVG strokes
|
12
|
+
|
13
|
+
The `strokeWidth` property on SVG elements rendered by [`CheckboxCheck`](https://ariakit.org/reference/checkbox-check), [`ComboboxCancel`](https://ariakit.org/reference/combobox-cancel), [`ComboboxDisclosure`](https://ariakit.org/reference/combobox-disclosure), [`DialogDismiss`](https://ariakit.org/reference/dialog-dismiss), [`HovercardDisclosure`](https://ariakit.org/reference/hovercard-disclosure), [`PopoverDisclosureArrow`](https://ariakit.org/reference/popover-disclosure-arrow), and all components that use any of these now defaults to `1.5px` instead of `1.5pt`. This should make the strokes slightly thinner.
|
14
|
+
|
15
|
+
Remember, you can always override the SVG element rendered by these components by rendering custom `children`.
|
16
|
+
|
17
|
+
### Minimum value length to show combobox options
|
18
|
+
|
19
|
+
A new [`showMinLength`](https://ariakit.org/reference/combobox#showminlength) prop has been added to the [`Combobox`](https://ariakit.org/reference/combobox) component. This prop lets you set the minimum length of the value before the combobox options appear. The default value is `0`.
|
20
|
+
|
21
|
+
```jsx
|
22
|
+
<Combobox showMinLength={2} />
|
23
|
+
```
|
24
|
+
|
25
|
+
Previously, achieving this behavior required combining three separate props: [`showOnChange`](https://ariakit.org/reference/combobox#showonchange), [`showOnClick`](https://ariakit.org/reference/combobox#showonclick), and [`showOnKeyPress`](https://ariakit.org/reference/combobox#showonkeypress). We've added this prop to simplify this common task.
|
26
|
+
|
27
|
+
These props continue to work as expected as they can be used to customize the behavior for each distinct event.
|
28
|
+
|
29
|
+
### Rendering composite items as input elements
|
30
|
+
|
31
|
+
We've added the ability to render [`CompositeItem`](https://ariakit.org/reference/composite-item) as an input element using the [`render`](https://ariakit.org/reference/composite-item#render) prop:
|
32
|
+
|
33
|
+
```jsx
|
34
|
+
<CompositeItem render={<input />} />
|
35
|
+
```
|
36
|
+
|
37
|
+
Before, you could only do this with the experimental `CompositeInput` component. Now, this functionality is integrated directly into the [`CompositeItem`](https://ariakit.org/reference/composite-item) component.
|
38
|
+
|
39
|
+
### Other updates
|
40
|
+
|
41
|
+
- Fixed [`Dialog`](https://ariakit.org/reference/dialog) calling [`autoFocusOnHide`](https://ariakit.org/reference/dialog#autofocusonhide) twice.
|
42
|
+
- Improved JSDocs.
|
43
|
+
- Updated dependencies: `@ariakit/react-core@0.4.4`
|
44
|
+
|
3
45
|
## 0.4.3
|
4
46
|
|
5
47
|
- Fixed TypeScript types for `ref`.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ariakit/react",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.4",
|
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.
|
40
|
+
"@ariakit/react-core": "0.4.4"
|
41
41
|
},
|
42
42
|
"peerDependencies": {
|
43
43
|
"react": "^17.0.0 || ^18.0.0",
|