@ariakit/react 0.4.3 → 0.4.5

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 +56 -0
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,61 @@
1
1
  # @ariakit/react
2
2
 
3
+ ## 0.4.5
4
+
5
+ ### Multi-selectable Combobox with inline autocomplete
6
+
7
+ When rendering a [Multi-selectable Combobox](https://ariakit.org/examples/combobox-multiple) with the [`autoComplete`](https://ariakit.org/reference/combobox#autocomplete) prop set to `"inline"` or `"both"`, the completion string will no longer be inserted into the input upon deselecting an item. This is because the completion string generally represents an addition action, whereas deselecting an item is a removal action.
8
+
9
+ ### Other updates
10
+
11
+ - Updated [`Combobox`](https://ariakit.org/reference/combobox) to no longer use `ReactDOM.flushSync` when updating the value.
12
+ - Added new [`resetValueOnSelect`](https://ariakit.org/reference/combobox-item#resetvalueonselect) prop to [`ComboboxItem`](https://ariakit.org/reference/combobox-item).
13
+ - Added new [`resetValue`](https://ariakit.org/reference/use-combobox-store#resetvalue) method to combobox store.
14
+ - Improved JSDocs.
15
+ - Updated dependencies: `@ariakit/react-core@0.4.5`
16
+
17
+ ## 0.4.4
18
+
19
+ ### Combobox `autoFocusOnHide` behavior
20
+
21
+ 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.
22
+
23
+ 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`.
24
+
25
+ ### Better SVG strokes
26
+
27
+ 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.
28
+
29
+ Remember, you can always override the SVG element rendered by these components by rendering custom `children`.
30
+
31
+ ### Minimum value length to show combobox options
32
+
33
+ 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`.
34
+
35
+ ```jsx
36
+ <Combobox showMinLength={2} />
37
+ ```
38
+
39
+ 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.
40
+
41
+ These props continue to work as expected as they can be used to customize the behavior for each distinct event.
42
+
43
+ ### Rendering composite items as input elements
44
+
45
+ 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:
46
+
47
+ ```jsx
48
+ <CompositeItem render={<input />} />
49
+ ```
50
+
51
+ 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.
52
+
53
+ ### Other updates
54
+
55
+ - Fixed [`Dialog`](https://ariakit.org/reference/dialog) calling [`autoFocusOnHide`](https://ariakit.org/reference/dialog#autofocusonhide) twice.
56
+ - Improved JSDocs.
57
+ - Updated dependencies: `@ariakit/react-core@0.4.4`
58
+
3
59
  ## 0.4.3
4
60
 
5
61
  - 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",
3
+ "version": "0.4.5",
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.3"
40
+ "@ariakit/react-core": "0.4.5"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "react": "^17.0.0 || ^18.0.0",